1!function(){"use strict";angular.module("DuoGourmet",["ui.mask","ui.utils.masks"]).filter("brl",function(){return function(e){return isNaN(e)||null==e?"R$ 0":"R$ "+Number(e).toLocaleString("pt-BR",{minimumFractionDigits:0,maximumFractionDigits:0})}}).filter("brlDec",function(){return function(e){return isNaN(e)||null==e?"R$ 0":"R$ "+Number(e).toLocaleString("pt-BR",{minimumFractionDigits:0,maximumFractionDigits:2})}}).run(function(){angular.element(document).ready(function(){})})}(),$(window).ready(function(){window.Iugu?window.Iugu.setAccountID("F19D09D7B8F9BB4D5C2E77507C0CBC33"):console.log("Iugu is not available"),$.ajaxSetup({headers:{"X-CSRF-TOKEN":$('meta[name="csrf-token"]').attr("content")}}),$(document).ready(function(){$("#text_interaction").on("mouseenter","span",function(){$("#iphone img").removeClass("visible");const e=$(this).index();$("#iphone img").eq(e).addClass("visible"),$("#text_interaction span").removeClass("selected"),$(this).addClass("selected")})}),$('[data-toggle="tooltip"]').tooltip(),$("#sidebar").mCustomScrollbar({theme:"minimal"}),$("#dismiss, .overlay, #sidebar li a").on("click",function(){$("#sidebar").removeClass("active"),$(".overlay").fadeOut(),$("body").removeClass("hidden-overflow-y")}),$("#sidebarCollapse").on("click",function(){$("#sidebar").addClass("active"),$(".overlay").fadeIn(),$(".collapse.in").toggleClass("in"),$("a[aria-expanded=true]").attr("aria-expanded","false"),$("body").addClass("hidden-overflow-y")})}),function(){"use strict";function e(e,t){const n=this;let o=0;n.birthday=null,angular.element(document).ready(function(){$("#birthday").mask("00/00/0000"),$(".form-checkcpf").on("submit",function(a){if(a.preventDefault(),!function(){const e=moment(n.birthday,"DD/MM/YYYY"),t=moment().diff(moment(e,"DD/MM/YYYY"),"years");return!(t<=10||t>=130)||($("#birthday").notify("Data de nascimento inválida!",{position:"bottom center",autoHideDelay:1e4}),!1)}())return;if(0===grecaptcha.getResponse().length&&($(".g-recaptcha").notify("Confirme que você não é um robô ð¤!",{position:"bottom center",autoHideDelay:1500}),1))return;++o,e.showLoadingMessage("Aguarde...",!1);const r={fullName:n.fullname,cpf:n.cpf,birthday:moment(n.birthday,"DD/MM/YYYY").format("YYYY-MM-DD"),recaptchaToken:grecaptcha.getResponse()};function i(){$("body").loading("stop"),grecaptcha.reset()}t.checkCPF(r).then(function(t){t.data.result?e.redirectTo(n.redirectTo?n.redirectTo:t.redirectTo):($("#birthday").notify("Seus dados parecem incorretos, verifique-os e tente novamente!",{position:"bottom center",autoHideDelay:1e4}),3===o&&(swal("Oops...","Número de tentativas excedidas!","warning"),window.setTimeout(function(){window.location="sair"},5e3))),i()}).catch(function(e){swal("Oops...",e.message,"error"),i()})})})}angular.module("DuoGourmet").controller("CheckCpfController",e),e.$inject=["Utilities","CheckCpfService"]}(),function(){"use strict";function e(e){this.subscriptionOnclick=function(t,n){t.preventDefault(),$.ajax({type:"POST",url:"/selected-family-plan",dataType:"JSON",timeout:12e4,data:{planId:n},success:function(t){e.redirectTo(t.redirectTo)},error:function(e){swal("Oops...",e.responseJSON.message,"error")}})},$(".btn-subscription").click(function(e){e.preventDefault(),$.ajax({type:"POST",url:"/selected-plan",dataType:"JSON",data:{plan:$(this).data("plan")},success:function(){window.location="/pagamento"},error:function(e){swal({title:"Oops...",text:e.responseJSON.message||"Tente novamente!",type:"error"}).then(function(){window.location.reload()})}})})}angular.module("DuoGourmet").controller("ChoosePlanController",e),e.$inject=["Utilities"]}(),function(){"use strict";function e(e,t,n){const o=this;function a(e){if(!e)return swal("Oops...","Atualize a página e tente novamente!","error"),void grecaptcha.reset();const a={companyName:o.companyName,companySite:o.companySite,personName:o.personName,personRole:o.personRole,city:o.city,phone:o.phone,email:o.email,recaptchaToken:e};t.showLoadingMessage("Aguarde...",!1),n.subscribeB2b(a).then(function(){t.hideLoadingMessage(),swal("","Sua solicitação foi enviada com sucesso. Obrigado!","success"),o.companyName="",o.companySite="",o.personName="",o.personRole="",o.city="",o.phone="",o.email="",grecaptcha.reset()},function(e){t.hideLoadingMessage(),swal("Oops...",e.message,"error"),grecaptcha.reset()})}
1o.onSubmit=a,o.validate=function(){grecaptcha.execute()},e.onSubmit=a}angular.module("DuoGourmet").controller("DuoB2bController",e),e.$inject=["$window","Utilities","DuoB2bService"]}(),function(){"use strict";angular.module("DuoGourmet").controller("ExperiencesController",function(){const e=this;e.form={},e.isSecondSearch=0,e.onChangeSelectCity=function(){$("body").loading({message:"Alterando a cidade...",onStart:function(e){e.overlay.slideDown(400)},onStop:function(e){e.overlay.slideUp(400)}});const e=$("#filterCity").val();window.location.replace("/experiencias/"+e)},angular.element(document).ready(function(){function t(t){const n=$(".restaurants-list"),o=n.find(".restaurant-card");return function(t,n,a,r,i){e.isSecondSearch++;let s=!1,c=0,u=0;t&&u++;n&&u++;a&&u++;r&&u++;i&&u++;let l=0;o.each(function(){if(t||n||a||r||i){if(s=!1,c=0,t){const e={keys:["title"],id:"name",threshold:.3},n=new window.Fuse([{title:$(this).data("title")}],e).search(t);n&&n.length>0&&(s=!0,c++)}n&&$(this).data("category")===n&&(s=!0,c++),i&&"yes"===$(this).data(i)&&(s=!0,c++),s&&c>=u?($(this).show(300),l++):$(this).hide(300)}else $(this).show(300),l++;(t||n||a||r||i)&&(window.scrollTo(0,$(window).scrollTop()-10),window.scrollTo(0,$(window).scrollTop()+10))}),0===l?$(".msg-no-restaurants-found").show():$(".msg-no-restaurants-found").hide()}(e.form.title,e.form.category,e.form.mealTime,e.form.weekDay,e.form.availabilityOption)}window.sessionStorage.getItem("alert-diff-printed-digital")||$(".alert-diff-printed-digital").show(500),function(){const e=n("dia"),t=n("horario")||n("horário");"almoco"===t||"almoço"===t?$(".meal-time").val("lunch"):"jantar"===t&&$(".meal-time").val("dinner");if(e)switch(e){case"domingo":$(".week-day").val("0");break;case"segunda":$(".week-day").val("1");break;case"terca":case"terça":$(".week-day").val("2");break;case"quarta":$(".week-day").val("3");break;case"quinta":$(".week-day").val("4");break;case"sexta":$(".week-day").val("5");break;case"sabado":case"sábado":$(".week-day").val("6")}function n(e){const t=decodeURIComponent(window.location.search.substring(1)),n=t.split("&");let o,a;for(a=0;a<n.length;a++)if((o=n[a].split("="))[0]===e)return void 0===o[1]||o[1]}}(),$(".lazy").lazy({scrollDirection:"vertical",threshold:0,afterLoad:function(e){$(e).css({"background-image":"linear-gradient(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.55)), "+$(e).css("background-image")})}}),$(".btn-alert-diff-printed-digital").on("click",function(){try{window.sessionStorage.setItem("alert-diff-printed-digital",1)}catch(e){console.error(e)}}),RegExp.escape||(RegExp.escape=function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}),t(),$(".restaurant-culinary, .week-day, .meal-time, .available-in").on("change",function(){t(!0)}),$(".field-search.restaurant-name").keyup(function(){t()}),$(".form-search").on("submit",function(e){e.preventDefault(),t(!0)})})})}(),function(){"use strict";function e(e,t,n,o){const a=this;a.sendRecoveryEmail=function(){if(!a.cpf||!n.isValidCpf(a.cpf))return void swal("Oops...","Informe o CPF para recuperação!","error");a.pageIndex=1,n.showLoadingMessage("Aguarde...",!1),e.sendRecoveryEmail(a.cpf).then(function(){var e;e=60,a.countDownResend=e,a.interval=t(function(){a.countDownResend-=1,0===a.countDownResend&&t.cancel(a.interval)},1e3),n.hideLoadingMessage()},function(e){n.hideLoadingMessage(),swal("Oops...",e.message,"error")})},a.checkCodeRecovery=function(t){if(t.preventDefault(),1===a.pageIndex){if(!a.codeToSend)return void swal("Oops...","Informe o código de recuperação!","error");n.showLoadingMessage("Aguarde...",!1),e.checkCodeToRecover(a.cpf,a.codeToSend).then(e=>{a.userName=e.data.userName,a.userBirthday=e.data.userBirthday,n.hideLoadingMessage(),a.pageIndex=2},e=>{n.hideLoadingMessage(),swal("Oops...",e.message,"error")})}},a.saveNewPassword=function(){if(!a.firstPassword)return void swal("Oops...","Informe uma nova senha para continuar","error");if(a.firstPassword!==a.secondPassword)return void swal("Oops...","As senhas devem ser iguais","error");o.checkingPassword(a.firstPassword,a.userName,a.userBirthday)?(n.showLoadingMessage("Aguarde...",!1),o.saveNewPassword(a.cpf,a.codeToSend,a.firstPassword).then(e=>{n.hideLoadingMessage(),swal("Sucesso",e.data.message,"success"),a.disabled=!0,window.setTimeout(function(){n.redirectTo("/entrar")},3e3)},e=>{n.hideLoadingMessage(),swal("Oops...",e.data.message,"error")}
1)):swal("Oops...","Senha deve cumprir os requisitos","error")},a.countDownResend=null,a.interval=null,a.codeToSend=null,a.showRequirements=!1,a.userName=null,a.userBirthday=null,a.disabled=!1,a.pageIndex=0,a.passwordRequirements=[{textRequirement:"Senha deve ter no mÃnimo 8 caracteres.",validatePassword:function(){return a.firstPassword&&a.firstPassword.length>=8}},{textRequirement:"Pelo menos uma letra maiúscula.",validatePassword:function(){return a.firstPassword&&/^(?=.*[A-Z])/.test(a.firstPassword)}},{textRequirement:"Pelo menos uma letra minúscula.",validatePassword:function(){return a.firstPassword&&/^(?=.*[a-z])/.test(a.firstPassword)}},{textRequirement:"Pelo menos um número.",validatePassword:function(){return a.firstPassword&&/^(?=.*[0-9])/.test(a.firstPassword)}},{textRequirement:"Pelo menos um caractere especial. (Ex: ! ? . @ )",validatePassword:function(){return a.firstPassword&&/[^a-zA-Z0-9]/.test(a.firstPassword)}},{textRequirement:"Não possuir sequência de letras e números.",validatePassword:function(){return a.firstPassword&&function(e){for(const t in e)if(+e[+t+1]==+e[t]+1&&+e[+t+2]==+e[t]+2)return!1;for(const t in e)if(String.fromCharCode(e.charCodeAt(t)+1)===e[+t+1]&&String.fromCharCode(e.charCodeAt(t)+2)===e[+t+2])return!1;return!0}(a.firstPassword)}},{textRequirement:"Não conter informações pessoais.",validatePassword:function(){if(a.firstPassword){let e=!0;const t=a.userName.split(" "),n=new Date(a.userBirthday).toLocaleDateString(),o=n.replace(/\//g,"");return t.forEach(t=>{a.firstPassword&&t.length>3&&a.firstPassword.toLowerCase().includes(t.toLowerCase())&&(e=!1)}),a.firstPassword&&e&&!a.firstPassword.includes(n)&&!a.firstPassword.includes(o)&&!a.firstPassword.includes(n.split("/")[2])}}}],a.requirementsContainer={display:"block"},a.pageConfigs=[{textAboveInput:"Informe seu CPF para continuar",textBelowInput:""},{textAboveInput:"Digite o código enviado ao seu e-mail cadastrado para seguir com a recuperação da sua senha:",textBelowInput:"Verifique se o e-mail não está em sua caixa de spam, caso ainda não tenha recebido."},{textAboveInput:"Digite aqui sua nova senha",textBelowInput:""}]}angular.module("DuoGourmet").controller("ForgotPasswordController",e),e.$inject=["ForgotPasswordService","$interval","Utilities","AuthService"]}(),function(){"use strict";function e(){angular.element(document).ready(function(){function e(e){window.dataLayer||(window.dataLayer=[]),window.dataLayer.push({event:"prev"===e?"duo_how_to_carousel_prev":"duo_how_to_carousel_next"})}$(".section-main-img").on("click",function(){window.location="/aplicativo"});const t=$(".how-to-carousel");t.length&&(t.slick({slidesToShow:2,slidesToScroll:1,dots:!0,arrows:!0,infinite:!0,autoplay:!0,autoplaySpeed:5e3,pauseOnHover:!0,adaptiveHeight:!0,prevArrow:'<button type="button" class="how-to-carousel__arrow how-to-carousel__arrow--prev" aria-label="Passo anterior"><span aria-hidden="true">‹</span></button>',nextArrow:'<button type="button" class="how-to-carousel__arrow how-to-carousel__arrow--next" aria-label="Próximo passo"><span aria-hidden="true">›</span></button>',responsive:[{breakpoint:991,settings:{slidesToShow:1,slidesToScroll:1}}]}),t.on("click",".how-to-carousel__arrow--prev",function(){e("prev")}),t.on("click",".how-to-carousel__arrow--next",function(){e("next")}))})}angular.module("DuoGourmet").controller("HomeController",e),e.$inject=[]}(),function(){"use strict";function e(e,t,n){const o=this;function a(a){if(!n.isValidCpf(o.cpf))return $("#cpf").focus().notify("Informe o CPF corretamente!",{position:"bottom"}),void grecaptcha.reset();if(!a)return swal("Oops...","Atualize a página e tente novamente!","error"),void grecaptcha.reset();n.showLoadingMessage("Aguarde...",!1),o.isLogging=!0;const r=o.cpf.replace(/[.-]/gi,"");t.beforeAuth(r,o.redirectTo,a).then(function(t){n.hideLoadingMessage(),o.isLogging=!1,t.nextStep?e.location.href=t.nextStep:$("#cpf").focus().notify("Informe o CPF corretamente!",{position:"bottom"});grecaptcha.reset()},function(e){n.hideLoadingMessage(),swal("Oops...",e.message,"error"),o.isLogging=!1,grecaptcha.reset()})}o.cpf=null,o.isLogging=!1,o.redirectTo=null,o.onSubmit=a,e.onSubmit=a,o.validate=function(){gre
1captcha.execute()},o.redirectLogin=function(){n.redirectTo("/entrar")}}angular.module("DuoGourmet").controller("IdentifierController",e),e.$inject=["$window","AuthService","Utilities"]}(),function(){"use strict";function e(e,t,n,o){const a=this;function r(e){if(!o.isValidCpf(a.cpf))return $("#cpf").focus().notify("Informe o CPF corretamente!",{position:"bottom"}),void grecaptcha.reset();o.showLoadingMessage("Aguarde...",!1),a.isLogging=!0,t.login(a.cpf.replace(/[.-]/gi,""),a.password,a.redirectTo,e).then(function(e){o.hideLoadingMessage(),a.isLogging=!1,grecaptcha.reset(),o.redirectTo(e.redirectTo)},function(e){o.hideLoadingMessage(),grecaptcha.reset(),swal("Oops...",e.message,"error"),a.isLogging=!1})}a.cpf=null,a.password=null,a.isLogging=!1,a.redirectTo=null,a.login=r,e.login=r,a.authWithFacebook=function(){e.location.href="/auth/facebook/redirect?redirectTo="+a.redirectTo},a.authWithApple=function(){e.location.href="/auth/apple/redirect?redirectTo="+a.redirectTo},a.validate=function(){grecaptcha.execute()}}angular.module("DuoGourmet").controller("LoginController",e),e.$inject=["$window","LoginService","AuthService","Utilities"]}(),function(){"use strict";function e(e){const t=this;t.subscriber={name:null,email:null},t.formSubmit=function(){$("body").loading({message:"Aguarde...",stoppable:!1,zIndex:1051,onStart:function(e){e.overlay.slideDown(400)},onStop:function(e){e.overlay.slideUp(400)}});const n={name:t.subscriber.name,email:t.subscriber.email,city:t.subscriber.city};$.ajax({type:"POST",url:"/newsletter",dataType:"JSON",data:n,timeout:12e4,success:function(){$("body").loading("stop"),swal("Obrigado!","Agora você receberá as novidades sobre o Duo Gourmet!","success"),e(()=>{t.subscriber.name="",t.subscriber.email="",t.confirmation=!1},100)},error:function(e){$("body").loading("stop"),swal("Oops...",e.responseJSON.message,"error")}})},angular.element(document).ready(function(){$(".form-subscribe-newsletter").on("submit",function(e){e.preventDefault()}),$("footer #select-cities").on("change",function(){$("body").loading({message:"Alterando a cidade...",onStart:function(e){e.overlay.slideDown(400)},onStop:function(e){e.overlay.slideUp(400)}}),0===window.location.pathname.indexOf("/guia-impresso")?window.location.replace("/guia-impresso/"+$(this).val()):window.location.replace("/restaurantes/"+$(this).val())})})}angular.module("DuoGourmet").controller("MainController",e),e.$inject=["$timeout"]}(),function(){"use strict";function e(e,t){const n=this,o=65,a=364;function r(){return n.promoAnual?n.promoAnual.precoPromo:n.precoAnual}function i(){return n.promoSemestral?n.promoSemestral.precoPromo:n.precoSemestral}function s(e,t){return Math.round(100*(1-t/e))}function c(){const e=r(),t=i();n.precoAnualMes=Math.round(n.precoAnual/12),n.precoSemestralMes=Math.round(n.precoSemestral/6),n.promoAnualPromoMes=n.promoAnual?e/12:null,n.precoSemPromoMes=n.promoSemestral?t/6:null,n.promoAnualPct=n.promoAnual?s(n.promoAnual.precoOriginal,n.promoAnual.precoPromo):null,n.promoSemPct=n.promoSemestral?s(n.promoSemestral.precoOriginal,n.promoSemestral.precoPromo):null}function u(e){return String(e).replace(/[&<>"']/g,function(e){return{"&":"&","<":"<",">":">",'"':""","'":"'"}[e]})}function l(e,t){window.dataLayer&&window.dataLayer.push(angular.extend({event:e},t||{}))}function d(){e(function(){const e=document.querySelector(".chat-plan-window");e&&(e.scrollTop=e.scrollHeight)},50)}n.promoAnual=null,n.promoSemestral=null,n.precoAnual=708,n.precoSemestral=270,n.step=0,n.typing=!1,n.answers={},n.recommendedPlan=null,n.economyYear=0,n.economySemester=0,n.roiAnual=0,n.roiSemestral=0,n.chatResultMessages=[],n.resultsReady=!1,n.nameInput="",n.userName="",n.nameConfirming=!1,n.initAnnualPromo=function(e){n.promoAnual=e||null,n.promoSemestral=null,c()},n.submitName=function(){const e=(n.nameInput||"").trim();if(!e)return;n.userName=e,n.nameConfirming=!0,d()},n.confirmName=function(t){t?(l("quiz_meu_plano_start"),n.typing=!0,e(function(){n.typing=!1,n.step=1,d()},900)):(n.nameInput="",n.userName="",n.nameConfirming=!1,d())},n.answer=function(s,c,m){n.answers[s]={value:c,label:m},l("quiz_meu_plano_answer",{quiz_question:s,quiz_answer:m}),s<4?(n.typing=!0,e(function(){n.typing=!1,n.step=s+1,d()},900)):(n.typing=!0,e(function(){n.typing=!1,n.step=5,function(){const s=n.answers[
11]?n.answers[1].value:0,c=n.answers[2]?n.answers[2].value:0,m=n.answers[3]?n.answers[3].value:"nao",f=n.answers[4]?n.answers[4].value:"nao";n.economyYear=s*o*12+c*a,n.economySemester=s*o*6+c*a/2,n.recommendedPlan=function(e,t,n,o){return e>=3?"anual":function(e){return"sim_acumula"===e||"quer_acumular"===e}(n)?"anual":function(e){return"sim"===e||"talvez"===e}(o)?"anual":t>=4?"anual":2===e?"semestral":"anual"}(s,c,m,f);const p=n.economyYear/12;n.roiAnual=p>0?Math.ceil(r()/p):null,n.roiSemestral=p>0?Math.ceil(i()/p):null;const g=[];"anual"===n.recommendedPlan?(g.push("Com base no seu perfil, o <strong>Plano Anual</strong> é a melhor opção para você, "+u(n.userName)+"! ð"),g.push("Além de recuperar o investimento em poucas idas a restaurantes e parceiros, você tem acesso ao upgrade para o <strong>Inter Prime</strong> â um dos maiores benefÃcios do plano."),g.push("O Inter Prime é um segmento premium com cartão de acúmulo de pontos, acesso a <strong>salas VIP em aeroportos pelo mundo</strong>, assessoria de investimentos dedicada e benefÃcios exclusivos para viagens."),c>0&&g.push("âï¸ Como você viaja, as salas VIP vão ser muito úteis â você tem <strong>acesso ilimitado à s salas Lounge Inter</strong> no Brasil e ainda 6 acessos ao <strong>Priority Pass</strong> em aeroportos ao redor do mundo."),"sim_acumula"!==m&&"quer_acumular"!==m||g.push("ð³ Para quem acumula milhas, o Inter Prime oferece <strong>até 4x mais pontos</strong> nas compras do cartão â acelerando a troca por passagens e outros benefÃcios."),"sim"!==f&&"talvez"!==f||g.push("ð Com a <strong>assessoria de investimentos</strong> dedicada, você terá apoio especializado para fazer o seu dinheiro trabalhar melhor para você.")):(g.push("Com base no seu perfil, o <strong>Plano Semestral</strong> é a melhor escolha por agora, "+u(n.userName)+"! ð"),g.push("Com ele, você já tem acesso a todos os benefÃcios Duo Gourmet â 2 pratos pelo pre
1ço de 1, mais de 4.000 parceiros e descontos exclusivos â sem precisar de um compromisso anual."),(c>0||"nao"!==m||"nao"!==f)&&g.push("Se no futuro você quiser ainda mais benefÃcios â como o upgrade para o <strong>Inter Prime</strong> com salas VIP, acúmulo de pontos e assessoria de investimentos â o plano Anual pode ser uma ótima evolução."));n.chatResultMessages=[],n.resultsReady=!1,function o(a,r){if(r>=a.length)return void e(function(){n.resultsReady=!0,l("quiz_meu_plano_result",{quiz_plan:n.recommendedPlan,quiz_economy:n.economyYear,quiz_promo:"anual"===n.recommendedPlan&&!!n.promoAnual}),d()},500);n.typing=!0;d();e(function(){n.typing=!1,n.chatResultMessages.push(t.trustAsHtml(a[r])),d(),e(function(){o(a,r+1)},500)},1e3)}(g,0)}(),d()},1200))},n.restart=function(){l("quiz_meu_plano_restart"),n.step=0,n.typing=!1,n.answers={},n.recommendedPlan=null,n.economyYear=0,n.economySemester=0,n.roiAnual=0,n.roiSemestral=0,n.chatResultMessages=[],n.resultsReady=!1,n.nameInput="",n.userName="",n.nameConfirming=!1,n.openFaq=null,e(function(){const e=document.querySelector(".chat-plan-section");e&&e.scrollIntoView({behavior:"smooth"})},50)},n.toggleFaq=function(e){n.openFaq=n.openFaq===e?null:e,null!==n.openFaq&&l("quiz_meu_plano_faq",{faq_index:e})},n.trackCta=function(e,t){l("quiz_meu_plano_cta_click",{quiz_plan:e,quiz_promo:!!t})},n.openFaq=null,c()}angular.module("DuoGourmet").controller("MeuPlanoController",e),e.$inject=["$timeout","$sce"]}(),function(){"use strict";function e(e,t){const n=this;function o(){n.loading=!0,t.getInfluencerStatus().then(function(e){if(function(e){n.isEnabled=Boolean(e.enabled),n.canConfigure=Boolean(e.canConfigureInfluencerProfile),n.instagramOAuthConfigured=Boolean(e.instagramOAuthConfigured),n.profile=e.profile,n.isRegistered=n.profile&&"active"===r(n.profile),n.showInfluencerSection=n.isEnabled&&n.canConfigure}(e),n.isRegistered)return t.getInfluencerMentions(1,20).then(function(e){n.mentions=e.mentions||[]});n.mentions=[]}).catch(function(e){console.log("getInfluencerStatus error",e),n.showInfluencerSection=!1}).finally(function(){n.loading=!1})}function a(e,t){const n=e&&e.message?e.message:t;swal("Oops...",n,"error")}function r(e){if(!e)return null;const t=e.status;return"active"===t||"pending"===t||"rejected"===t||"deactivated"===t?t:e.deactivatedAt?"deactivated":e.instagramVerifiedAt||e.activatedAt?"active":t}n.mentions=[],n.canConfigure=!1,n.isRegistered=!1,n.isEnabled=!1,n.instagramOAuthConfigured=!1,n.profile=null,n.loading=!0,n.showInfluencerSection=!1,n.connectInstagram=function(){if(!n.instagramOAuthConfigured)return void swal("Oops...","Conexão com Instagram indisponÃvel no momento.","warning");e.showLoadingMessage("Aguarde...",!1);const o=window.location.origin+"/minha-conta/instagram/callback";t.getInstagramOAuthUrl(o).then(function(e){e&&e.authorizationUrl?window.location.href=e.authorizationUrl:swal("Oops...","Não foi possÃvel iniciar a conexão com o Instagram.","error")}).catch(function(e){a(e,"Não foi possÃvel iniciar a conexão com o Instagram.")}).finally(function(){e.hideLoadingMessage()})},n.deactivate=function(){e.showLoadingMessage("Aguarde...",!1),t.deactivateInfluencer().then(function(e){e?(n.profile=e,n.isRegistered=!1):(n.profile=null,n.isRegistered=!1),n.mentions=[],swal("Sucesso","Participação como influenciador desativada.","success")}).catch(function(e){a(e,"Não foi possÃvel desativar sua participação como influenciador.")}).finally(function(){e.hideLoadingMessage()})},n.getProfileStatus=r,n.getStatusLabel=function(e){return{pending:"Pendente de aprovação",active:"Ativo",rejected:"Rejeitado",deactivated:"Desativado"}[e]||e||""},n.getStatusClass=function(e){return{pending:"status-pending",active:"status-active",rejected:"status-rejected",deactivated:"status-deactivated"}[e]||"status-default"},n.openMention=function(e){if(!e||!e.permalink)return;window.open(e.permalink,"_blank")},o(),angular.element(document).ready(function(){const e=new window.URLSearchParams(window.location.search);"1"===e.get("instagram_connected")?(swal("Sucesso","Instagram conectado com sucesso!","success"),o()):"1"===e.get("instagram_error")&&swal("Oops...","Não foi possÃvel conectar seu Instagram. Tente novamente.","error"),(e.has("instagram_connected")||e.has("instagram_error"))&&window.history&&window.history.replaceState&&window.history.replaceState({},document.title,window.location.pathname)})}angular.module("DuoGourmet").controller("MyAccountController",e),e.$inject=["Utilities","InfluencersService"]}(),function(){"use strict";function e(e,t,n){const o=this;
1o.validate=function(){grecaptcha.execute()},o.getWeekDayLabel=function(e){return 0===e?"Domingo":1===e?"Segunda":2===e?"Terça":3===e?"Quarta":4===e?"Quinta":5===e?"Sexta":"Sábado"},o.showThanksMessage=!1,o.managerIdx=-1,o.ownerIdx=-1,o.totalErrors=0,o.manager={role:"manager"},o.owner={role:"owner"},e.onSubmit=function(e){if(!e)return swal("Oops...","Atualize a página e tente novamente!","error"),void grecaptcha.reset();o.owner.name&&(o.ownerIdx>=0?o.contacts[o.ownerIdx]=o.owner:o.contacts.push(o.owner));o.manager.name&&(o.managerIdx>=0?o.contacts[o.managerIdx]=o.manager:o.contacts.push(o.manager));if(o.restaurant.instagramUsername&&(a=o.restaurant.instagramUsername,/[^A-Za-z._0-9]/g.test(a)))return swal("Oops...","Informe o usuário do instagram corretamente (sem o @)!","error"),window.document.getElementById("instagramUsername").focus(),void grecaptcha.reset();var a;let r=0;if(o.restaurant.weekCalendar.forEach(function(e){r+=e.lunch||e.dinner?1:0}),0===r)return swal("Oops...","Marque os dias em que o benefÃcio estará disponÃvel!","error"),$("html, body").animate({scrollTop:$($("#weekCalendar")).offset().top-50},100),void grecaptcha.reset();function i(){$("body").loading("stop"),grecaptcha.reset()}o.restaurant.contacts=o.contacts,t.showLoadingMessage("Aguarde...",!1),n.updatePartner({restaurant:o.restaurant,recaptchaToken:e}).then(function(){o.showThanksMessage=!0,i()},function(){swal("Oops...","Atualize a página e tente novamente!","error"),o.totalErrors>=2?window.location.reload():o.totalErrors++,i()})},o.checkContacts=function(){o.contacts&&o.contacts.length>
10?o.contacts.forEach(function(e,t){"owner"===e.role?(o.owner=e,o.ownerIdx=t):"manager"===e.role&&(o.manager=e,o.managerIdx=t)}):o.contacts=[]},angular.element(document).ready(function(){const e=function(e){return 11===e.replace(/\D/g,"").length?"(00) 00000-0000":"(00) 0000-00009"},t={onKeyPress:function(t,n,o,a){o.mask(e.apply({},arguments),a)}};$("#phone").mask(e,t),$("#ownerPhone").mask(e,t),$("#managerPhone").mask(e,t),$("#whatsAppPhone").mask(e,t)})}angular.module("DuoGourmet").controller("PartnerController",e),e.$inject=["$window","Utilities","PartnerService"]}(),function(){"use strict";function e(e,t,n){const o=this;function a(e){if(!e)return swal("Oops...","Atualize a página e tente novamente!","error"),void grecaptcha.reset();const a={restaurantName:o.restaurantName,personName:o.personName,personRole:o.personRole,personPhone:o.personPhone,personEmail:o.personEmail,restaurantCity:o.restaurantCity,restaurantInstagram:o.restaurantInstagram,restaurantSite:o.restaurantSite,recaptchaToken:e};t.showLoadingMessage("Aguarde...",!1),n.subscribePartner(a).then(function(){t.hideLoadingMessage(),swal("","Sua solicitação foi enviada com sucesso. Obrigado!","success"),o.restaurantName="",o.personRole="",o.personName="",o.personPhone="",o.personEmail="",o.restaurantCity="",o.restaurantInstagram="",o.restaurantSite="",grecaptcha.reset()},function(e){t.hideLoadingMessage(),swal("Oops...",e.message,"error"),grecaptcha.reset()})}o.onSubmit=a,o.validate=function(){grecaptcha.execute()},e.onSubmit=a}angular.module("DuoGourmet").controller("PartnersHomeController",e),e.$inject=["$window","Utilities","PartnersHomeService"]}(),function(){"use strict";function e(e,t,n,o){const a=this;function r(n=!1){n||t.showLoadingMessage("Aguarde...",!1),e.checkPaymentPix().then(function(e){t.hideLoadingMessage(),e.data.eligibleToCheck?e.data.paymentSuccessful?(swal("Pagamento efetuado com sucesso!","","success").then(()=>{a.isRedirected=!0,window.location.href="/boas-vindas"}),o(()=>{a.isRedirected||(a.isRedirected=!0,window.location.href="/boas-vindas")},3e3)):n||swal("Pagamento não identificado!","Caso o pagamento já tenha sido efetuado, aguarde alguns minutos e tente novamente.","info"):window.location.href="/minha-conta"}).catch(function(){t.hideLoadingMessage(),n||swal("Pagamento não efetuado!","O pagamento não foi efetuado!","error")})}a.isFinishing=!1,a.notValidateCreditCard=!1,a.creditCard={},a.payWith="credit_card",a.isRedirected=!1,a.copyPixCode=function(){const e=document.getElementById("pix-code").value;navigator.clipboard.writeText(e);const t=document.createElement("div");t.style.position="fixed",t.style.top="80%",t.style.left="50%",t.style.transform="translate(-50%, -50%)",t.style.backgroundColor="rgba(0, 0, 0, 0.5)",t.style.color="#fff",t.style.padding="10px",t.style.borderRadius="5px",t.style.zIndex="1000",document.body.appendChild(t),t.innerHTML="Código Pix copiado com sucesso!",o(()=>{t.remove()},3e3)},a.checkPaymentPix=r,n(function(){r(!0)},12e4)}angular.module("DuoGourmet").controller("PaymentPixController",e),e.$inject=["PaymentService","Utilities","$interval","$timeout"]}(),function(){"use strict";function e(e,t){const n=this;function o(){return window.crypto&&window.crypto.randomUUID?window.crypto.randomUUID():Date.now()+"-"+Math.random().toString(36).slice(2)}function a(e){const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null}function r(e){return{metaEventId:e,metaFbp:a("_fbp"),metaFbc:a("_fbc"),eventSourceUrl:"https://www.duogourmet.com.br/boas-vindas"}}function i(){return!!n.termsOfUse||($("#terms-of-use").notify("Aceite os termos de uso para continuar",{position:"bottom"}),!1)}function s(o){e.finishSubscription(o).then(function(){n.isFinishing=!1,t.hideLoadingMessage(),"pix"===o.payWith?window.location="/pagamento/pix":window.location="/boas-vindas"},function(e){n.isFinishing=!1,t.hideLoadingMessage(),swal("Oops...",e.message,"error")})}function c(e){const t={number:null,name:null,cvv:null,expMonth:null,expYear:null};if("credit_card"===n.payWith){const e=n.creditCard.expiration.split("/");t.number=n.creditCard.number,t.name=n.creditCard.name,t.cvv=n.creditCard.cvv,t.expMonth=e[0],t.expYear=e[1]}s({paymentToken:e,cardInfo:t,installments:n.installments,payWith:n.payWith,...r(o())})}function u(){$(".ccv").focus(),$(".ccv").notify("Informe o código de segurança corretamente!",{position:"bottom"})}n.isFinishing=!1,n.notValidateCreditCard=!1,n.finishSubscription=function(a){a.preventDefault(),n.isFinishing=!0,t.hideLoadingMessage();const l="credit_card"===n.payWith,d="pix"===n.payWith;if(l&&!n.notValidateCreditCard&&!(function(){const e=n.creditCard.number?n.creditCard.number.trim():"";return e.length>=15&&e.length<=16||($(".number").focus(),$(".number").notify("Informe número do cartão corretamente!",{position:"bottom"}),!1)}()&&function(){const e=n.creditCard.name.split(" ");return!!(e.length>=2&&e[1])||($(".inputname").focus(),$(".inputname").notify("Informe o nome completo do titular!",{position:"bottom"}),!1)}()&&function(){if($(".expire").val().length<5)return $(".expire").focus(),$(".expire").notify("Informe o mês e ano corretamente! Ex: 12/30",{position:"bottom"}),!1;return!0}()&&function(){const e=n.creditCard.cvv;return!(!e||3!==e.length&&4!==e.length)||(u(),!1)}()&&i()))return void(n.isFinishing=!1);if(n.notValidateCreditCard)t.showLoadingMessage("Aguarde...",!1),s({payWith:n.payWith,installments:n.installments,cardInfo:{number:null,name:null,cvv:null,expMonth:null,expYear:null},...r(o())});else if(l){t.showLoadingMessage("Aguarde...",!1);const o=n.creditCard.expiration.split("/");e.createPaymentToken({number:n.creditCard.number,cvv:n.creditCard.cvv,name:n.creditCard.name,expMonth:o[0],expYear:o[1]}).then(function(e){c(e)}).catch(function(e){n.isFinishing=!1,t.hideLoadingMessage();const o=e&&e.message?e.message:"Ocorreu um erro, tente novamente!";return swal("Oops...",o,"error")})}else if(d){if(!i())return void(n.isFinishing=!1);t.showLoadingMessage("Aguarde...",!1),c()}},n.tokenResponseHandler=function(e){if(e.errors)return n.isFinishing=!1,t.hideLoadingMessage(),e.errors.number?($(".
1number").focus(),void $(".number").notify("Informe o número do cartão corretamente!",{position:"bottom"})):e.errors.verification_value?u():e.errors.expiration?($(".expire").focus(),void $(".expire").notify("Informe uma data de validade correta! Ex: 12/"+((new Date).getFullYear()+1),{position:"bottom"})):swal("Oops...","Ocorreu um erro, tente novamente!","error");c(e.id)},n.setPayWith=function(e){n.payWith=e,"pix"===e?(n.previousInstallments=n.installments,n.installments=1):n.installments=n.previousInstallments;window.dataLayer.push({event:"duo_set_pay_with_"+e})},n.creditCard={},n.previousInstallments=1,n.payWith="credit_card",window.dataLayer||(window.dataLayer=[]),angular.element(document).ready(function(){$(".cpf").mask("000.000.000-00",{reverse:!0}),$(".btn-subscription").click(function(e){e.preventDefault(),$.ajax({type:"POST",url:"/selected-plan",dataType:"JSON",timeout:12e4,data:{plan:$(this).data("plan")},success:function(){window.location.reload()},error:function(e){swal("Oops...",e.responseJSON.message,"error")}})}),$(".form-update-cpf").on("submit",function(e){e.preventDefault(),function(){const e=$(".cpf").val();return!!t.isValidCpf(e)||($(".cpf").focus(),$(".cpf").notify("Informe o CPF corretamente!",{position:"bottom"}),!1)}()&&($("body").loading({message:"Aguarde...",stoppable:!1,zIndex:1051,onStart:function(e){e.overlay.slideDown(400)},onStop:function(e){e.overlay.slideUp(400)}}),$.ajax({type:"POST",url:"/update-cpf",dataType:"JSON",timeout:12e4,data:{cpf:$(".cpf").val()},success:function(){t.hideLoadingMessage(),window.location.reload()},error:function(e){t.hideLoadingMessage(),swal("Oops...",e.responseJSON.message,"error")}}))}),$(".insert-promotional-code").on("submit",function(e){e.preventDefault(),$(".promotional-code").val()&&($("body").loading({message:"Aplicando o cupom...",stoppable:!0,zIndex:1051,onStart:function(e){e.overlay.slideDown(400)},onStop:function(e){e.overlay.slideUp(400)}}),$.ajax({type:"POST",url:"/promotional-plan",timeout:12e4,dataType:"JSON",data:{promotionalCode:$(".promotional-code").val()},success:function(){t.hideLoadingMessage(),window.location.reload()},error:function(e){t.hideLoadingMessage(),swal("Oops...",e.responseJSON.message,"error")}}))})})}angular.module("DuoGourmet").controller("PaymentController",e),e.$inject=["PaymentService","Utilities"]}(),function(){"use strict";angular.module("DuoGourmet").controller("RestaurantController",function(){this.form={},angular.element(document).ready(function(){})})}(),function(){"use strict";function e(e,t){const n=this,o=40,a=49,r={minPins:50,maxMarkersPerCluster:40,disableClusteringAtZoom:16},i=20,s="https://tiles.openfreemap.org/styles/liberty",c=["poi_transit"],u={0:"Domingo",1:"Segunda-feira",2:"Terça-feira",3:"Quarta-feira",4:"Quinta-feira",5:"Sexta-feira",6:"Sábado"},l={lunch:"Almoço",dinner:"Jantar"},d=991,m=12,f={PEEK:"peek",HALF:"half",LARGE:"large"};n.form={},n.noResults=!1,n.visibleResults=[],n.resultsCount=0,n.activeFilterChips=[],n.activeFiltersCount=0,n.hasActiveFilters=!1,n.filtersOpen=!1,n.cityPickerOpen=!1,n.citySearch="",n.cities=[],n.filteredCities=[],n.selectedCityName=window.mapSelectedCity||"",n.selectedPinSlug=null,n.sheetDetent=f.PEEK,n.panelCollapsed=window.innerWidth>d,n.showCityChangeHint=!1,n.onFilterChange=b,n.toggleFilters=function(){n.filtersOpen||(n.cityPickerOpen=!1);const e=!n.filtersOpen;if(n.filtersOpen=!n.filtersOpen,e)return void w("duo_map_open_filters",y());w("duo_map_close_filters",v()),n.hasActiveFilters&&w("duo_map_apply_filters",v())},n.togglePanel=function(){if(!j())return void D();if(n.sheetDetent===f.PEEK)return void N(f.HALF);N(f.PEEK)},n.onMobilePanelToggle=function(e){e&&e.stopPropagation();if(!j())return void D();if(n.sheetDetent===f.LARGE)return void N(f.HALF);N(f.PEEK)},n.isPanelPeek=function(){if(j())return n.sheetDetent===f.PEEK;return n.panelCollapsed},n.isSheetOpen=function(){return j()&&n.sheetDetent!==f.PEEK},n.onPanelHeaderClick=function(){if(!j()||n.sheetDetent!==f.PEEK)return;if(Date.now()-h.lastDragEndAt<350)return;N(f.HALF)},n.openCityPicker=C,n.closeCityPicker=A,n.onCitySearchChange=function(){x()},n.selectCity=function(e){if(!e||!e.slug)return;if(e.name===n.selectedCityName)return void A();w("duo_map_select_city",angular.extend(y(),{city:e.name,city_slug:e.slug,previous_city:n.selectedCityName||""})),$("body").loading({message:"Alterando a cidade...",onStart:function(e){e.overlay.slideDown(400)},onStop:function(e){e.overlay.slideUp(400)}}),window.location.replace("/restaurantes/"+e.slug+"/mapa")},n.clearFilters=function(){w("duo_map_clear_filters",v()),n.form.name="",n.form.culinary="",n.form.weekDay="",n.form.mealTime="",b()},n.removeFilter=function(e){w("duo_map_remove_filter",angular.extend(v(),{filter_key:e})),"name"===e?n.form.name="":n.form[e]="";b()},n.focusPin=function(e){G(e,"list")},n.trackViewRestaurant=function(e,t){t&&t.stopPropagation();w("duo_map_view_restaurant",angular.extend(y(),{restaurant_name:e.name,restaurant_slug:e.slug}))},n.trackGoToList=function(){w("duo_map_go_to_list",y())},n.onCityHintClick=function(){w("duo_map_city_hint_click",y()),S(),C()},n.dismissCityChangeHint=function(){w("duo_map_dismiss_city_hint",y()),S(),n.showCityChangeHint=!1};const p={map:null,markersLayer:null,useCluster:!1,selectedMarker:null,markers:[],markersBySlug:{},filterTimer:null,userMarker:null,userAccuracyCircle:null,userLocation:null,autoLocateAttempted:!1,suppressCityHintUntil:0,cityHintBound:!1,cityHintConsumed:!1,lastMapZoom:null,fitBoundsButton:null},g={active:!1,scrollY:0},h={panelEl:null,bodyEl:null,listEl:null,dragZoneEl:null,active:!1,pending:!1,fromList:!1,hadDrag:!1,startY:0,startHeight:0,lastY:0,lastTime:0,velocityY:0,lastDragEndAt:0};function w(e,t){window.dataLayer||(window.dataLayer=[]),window.dataLayer.push(angular.extend({event:e},t||{}))}function y(){return{city:n.selectedCityName||"",results_count:n.resultsCount||0,is_mobile:j()}}function v(){return angular.extend(y(),{search_name:n.form.name||"",culinary:n.form.culinary||"",week_day:n.form.weekDay||"",meal_time:n.form.mealTime||"",active_filters_count:n.activeFiltersCount||0})}function b(){p.filterTimer&&window.clearTimeout(p.filterTimer),p.filterTimer=window.setTimeout(K,150)}function C(){n.filtersOpen=!1,n.cityPickerOpen=!0,n.citySearch="",x(),w("duo_map_open_city_picker",y()),e(function(){const e=document.getElementById("mapCitySearch");e&&e.focus()},300)}function S(){p.cityHintConsumed=!0}function k(){p.suppressCityHintUntil=Date.now()+600}function P(){if(!p.map||!p.markers.length||p.cityHintConsumed)return void(n.showCityChangeHint=!1);if(Date.now()<p.suppressCityHintUntil)return void L();const e=p.map.getZoom(),t=p.lastMapZoom,o=null!==t&&e<t&&e<=m,a=n.showCityChangeHint;if(L(),!o&&a)return n.showCityChangeHint=!1,void(null!==t&&e>t&&(p.cityHintConsumed=!0));o?(n.showCityChangeHint=!0,a||w("duo_map_show_city_hint",angular.extend(y(),{zoom:e,previous_zoom:t}))):n.showCityChangeHint=!1}function L(){p.map&&(p.lastMapZoom=p.map.getZoom())}function A(){n.cityPickerOpen=!1,n.citySearch="",x(),w("duo_map_close_city_picker",y())}function I(e){return String(e||"").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function x(){const e=I(n.citySearch);n.filteredCities=e?n.cities.filter(function(t){return-1!==I(t.name+" "+t.state).indexOf(e)}):n.cities.slice()}function D(){n.panelCollapsed&&B();const t=n.panelCollapsed;n.panelCollapsed=!n.panelCollapsed,w(t?"duo_map_expand_list":"duo_map_collapse_list",y()),e(Q,350)}function _(e,t,n){return Math.min(n,Math.max(e,t))}function M(){E();const e=document.querySelector(".map-experience"),t=e?e.offsetHeight:Math.max(420,window.innerHeight-120),n=function(){const e=document.querySelector(".map-experience");if(!e)return 132;const t=parseFloat(window.getComputedStyle(e).getPropertyValue("--map-sheet-top-inset"));return isNaN(t)?132:t}(),o=_(200,.3*window.innerHeight,280);return{peek:56,half:o,large:Math.max(o+48,t-n),topInset:n}}
1function E(){if(!j())return;const e=document.querySelector(".map-experience"),t=document.querySelector(".map-search-overlay");if(!e)return;let n=132;if(t){const o=e.getBoundingClientRect(),a=t.getBoundingClientRect();n=Math.ceil(a.bottom-o.top+12)}n=Math.max(96,n),e.style.setProperty("--map-sheet-top-inset",n+"px")}function T(){h.active=!1,h.pending=!1,h.fromList=!1,h.velocityY=0,h.hadDrag=!1}function O(e){if(!j())return;const t=h.listEl?h.listEl.scrollTop:0;(function(e,t){return!!(j()&&(h.dragZoneEl&&h.dragZoneEl.contains(e)||h.listEl&&h.listEl.contains(e)&&t<=0))})(e.target,t)&&(h.pending=!0,h.fromList=h.listEl&&h.listEl.contains(e.target)&&!(h.dragZoneEl&&h.dragZoneEl.contains(e.target)),h.startY=e.touches[0].clientY,h.startHeight=h.panelEl.offsetHeight,h.lastY=h.startY,h.lastTime=Date.now(),h.velocityY=0)}function F(e){if(!h.pending&&!h.active)return;if(!j())return void T();const t=e.touches[0].clientY,n=h.startY-t;if(h.pending&&!h.active){if(h.fromList){if(h.listEl.scrollTop>0)return void T();if(n>0)return void T();if(Math.abs(n)<8)return}else if(Math.abs(n)<5)return;h.active=!0,h.pending=!1,h.hadDrag=!0,h.panelEl.classList.add("is-dragging")}if(!h.active)return;e.preventDefault();const o=M();!function(e){const t=h.panelEl,n=h.bodyEl;if(!t||!n)return;const o=Math.round(e)+"px";t.classList.add("is-dragging-custom"),t.style.removeProperty("top"),t.style.setProperty("--map-sheet-current",o),t.style.height=o,t.style.maxHeight=o,n.classList.add("map-experience__body--sheet-dragging"),n.style.setProperty("--map-sheet-current",o),Q()}(_(o.peek,h.startHeight+n,o.large));const a=Date.now(),r=a-h.lastTime;r>0&&(h.velocityY=(t-h.lastY)/r),h.lastY=t,h.lastTime=a}function R(){if(!h.active&&!h.pending)return;if(!h.active)return void T();const e=M(),n=function(e,t,n){const o=(n.peek+n.half)/2,a=(n.half+n.large)/2;return t<-.45?e<o?f.HALF:f.LARGE:t>.45?e>a?f.HALF:f.PEEK:e<o?f.PEEK:e<a?f.HALF:f.LARGE}(h.panelEl.offsetHeight,h.velocityY,e);h.panelEl.classList.remove("is-dragging"),h.lastDragEndAt=Date.now(),T(),t.$apply(function(){N(n)})}function N(t){const o=n.sheetDetent;!function(){const e=h.panelEl,t=h.bodyEl;e&&(e.classList.remove("is-dragging","is-dragging-custom"),e.style.removeProperty("--map-sheet-current"),e.style.removeProperty("height"),e.style.removeProperty("max-height"),e.style.removeProperty("top")),t&&(t.classList.remove("map-experience__body--sheet-dragging"),t.style.removeProperty("--map-sheet-current"))}(),E(),n.sheetDetent=t,q(),function(e,t){if(e===t)return;if(e===f.PEEK&&t===f.HALF)return void w("duo_map_expand_list",y());if(t===f.PEEK)return void w("duo_map_collapse_list",y());if(t===f.LARGE)return void w("duo_map_expand_list_full",angular.extend(y(),{sheet_detent:f.LARGE}));e===f.LARGE&&t===f.HALF&&w("duo_map_shrink_list",y())}(o,t),e(Q,350)}function q(){const e=document.querySelector(".section-restaurants-map.map-search-experience");return j()?n.sheetDetent===f.PEEK?(U(),void(e&&e.classList.remove("map-search-experience--sheet-open"))):(U(),void(e&&e.classList.add("map-search-experience--sheet-open"))):(U(),void(e&&e.classList.remove("map-search-experience--sheet-open")))}function U(){if(!g.active)return;const e=g.scrollY;document.body.classList.remove("map-map-sheet-scroll-lock"),document.body.style.top="",g.active=!1,window.scrollTo(0,e)}function j(){return window.innerWidth<=d}function B(){p.map&&p.map.closePopup()}function z(t){e(function(){const e=document.querySelector('.map-result-card[data-slug="'+t+'"]');e&&e.scrollIntoView({behavior:"smooth",block:"nearest"})},50)}function G(t,o){const a=p.markersBySlug[t.slug];if(!a||!p.map)return;w("duo_map_select_restaurant",angular.extend(y(),{restaurant_name:t.name,restaurant_slug:t.slug,source:o||"map"}));const r=j()?n.sheetDetent===f.PEEK:n.panelCollapsed;if(n.selectedPinSlug=t.slug,function(e){p.selectedMarker&&p.selectedMarker!==e&&p.selectedMarker.setIcon(me(p.selectedMarker.mapPin,!1));e.setIcon(me(e.mapPin,!0)),p.selectedMarker=e,n.selectedPinSlug=e.mapPin.slug}(a),B(),k(),p.map.setView([t.latitude,t.longitude],Math.max(p.map.getZoom(),16),{animate:!0}),r)return j()?N(f.HALF):(n.panelCollapsed=!1,e(Q,350)),void e(function(){z(t.slug)},350);z(t.slug)}function H(e,t){return t&&Array.isArray(t.layers)?(t.layers=t.layers.map(function(e){return function(e){return!(!e||"object"!=typeof e)&&(c.indexOf(e.id)>=0||"symbol"===e.type&&"poi"===e["source-layer"])}(e)?Object.assign({},e,{layout:Object.assign({},e.layout||{},{visibility:"none"})}):e}),t):t}function Y(e){return window.L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',maxZoom:i,maxNativeZoom:19}).addTo(e)}function V(){return!(!window.L||"function"!=typeof window.L.maplibreGL||!window.maplibregl)&&(!("function"==typeof window.maplibregl.supp
1orted&&!window.maplibregl.supported())&&function(){try{var e=document.createElement("canvas");return!!window.WebGLRenderingContext&&!!(e.getContext("webgl2")||e.getContext("webgl")||e.getContext("experimental-webgl"))}catch(e){return!1}}())}function Z(e){return function(e){if(!V())return Y(e);try{return window.L.maplibreGL({style:s,pane:"tilePane",padding:0,interactive:!1,transformStyle:H}).addTo(e)}catch(t){return Y(e)}}(e)}function W(){if(!window.L||!window.mapPins||!window.mapPins.length)return void(!window.L&&window.mapPins&&window.mapPins.length&&window.setTimeout(W,50));const t=document.getElementById("restaurants-map");t&&(p.map=window.L.map(t,{scrollWheelZoom:!0,zoomControl:!1,attributionControl:!0,maxBounds:[[-85.05113,-180],[85.05113,180]],maxBoundsViscosity:1,minZoom:1,maxZoom:i}),p.map.attributionControl&&p.map.attributionControl.setPrefix(!1),Z(p.map),window.mapPins.forEach(function(e){const t=window.L.marker([e.latitude,e.longitude],{icon:me(e,!1),title:e.name});t.mapPin=e,t.bindPopup(function(e){const t=e.imageSmallCoverUrl?'<img class="map-popup-card__img" src="'+ge(e.imageSmallCoverUrl)+'" alt="" />':"",n=e.cooking?'<div class="category">'+ge(e.cooking)+"</div>":"",o=e.rating?'<div class="rating"><i class="fas fa-star" style="color: #fbcd4b"></i> '+ge(e.rating)+"</div>":"",a=n||o?'<div class="map-popup-card__meta">'+n+o+"</div>":"",r=e.district?'<div class="neighborhood">'+ge(e.district)+"</div>":"",i=e.listDistanceLabel||e.distanceDescription,s=i?'<div class="distance"><i class="glyphicon glyphicon-flag"></i> '+ge(i)+"</div>":"";return'<div class="restaurants-list map-popup-card"><button type="button" class="map-popup-card__close" aria-label="Fechar"><span aria-hidden="true">×</span></button><div class="card"><a href="'+ge(e.url)+'"><div class="cover">'+t+a+'<div class="details"><h3 class="name">'+ge(e.name)+"</h3>"+r+s+"</div></div></a></div></div>"}(e),{maxWidth:j()?260:280,minWidth:j()?200:250,className:"duo-map-restaurant-popup"+(j()?" duo-map-restaurant-popup--compact":""),closeButton:!1}),t.on("click",function(){G(e,"map")}),t.on("popupopen",function(){!function(e){const t=e.getPopup()&&e.getPopup().getElement();if(!t)return;const o=t.querySelector(".map-popup-card__close");if(!o||o._duoBound)return;o._duoBound=!0,window.L.DomEvent.on(o,"click",function(t){window.L.DomEvent.stop(t),e.closePopup(),p.selectedMarker===e&&(p.selectedMarker.setIcon(me(p.selectedMarker.mapPin,!1)),p.selectedMarker=null,n.selectedPinSlug=null)})}(t)}),p.markers.push({pin:e,marker:t}),p.markersBySlug[e.slug]=t}),function(){const t=p.map,o=window.L.Control.extend({options:{position:"bottomright"},onAdd:function(){const o=window.L.DomUtil.create("div","leaflet-bar leaflet-control leaflet-duo-map-controls");o.setAttribute("data-tap-disabled","true"),window.L.DomEvent.disableClickPropagation(o),window.L.DomEvent.disableScrollPropagation(o);const a=X(o,"+","Aumentar zoom"),r=X(o,"â","Diminuir zoom"),i=X(o,'<i class="fas fa-expand-arrows-alt" aria-hidden="true"></i>',"Centralizar mapa nos resultados","leaflet-duo-icon-btn"),s=X(o,'<i class="fas fa-location-arrow" aria-hidden="true"></i>',"Minha localização","leaflet-duo-icon-btn");return p.fitBoundsButton=i,te(a,function(){t.zoomIn()}),te(r,function(){t.zoomOut()}),te(i,function(){!function(){if(!p.map)return;const t=n.form.name,o=n.form.culinary,a=n.form.mealTime,r=n.form.weekDay,i=[];if(p.markers.forEach(function(e){de(e.pin,t,o,a,r)&&i.push([e.pin.latitude,e.pin.longitude])}),!i.length)return;k(),J(i),e(function(){Q(),L()},100),w("duo_map_fit_bounds",y())}()}),te(s,function(){oe({button:s,silent:!1,centerMap:!0})}),ee(n.resultsCount>0),o}});p.map.addControl(new o)}(),K(),p.map&&!p.cityHintBound&&(p.cityHintBound=!0,p.map.on("zoomend",function(){e(P)})),w("duo_map_page_view",angular.extend(y(),{restaurants_count:window.mapPins?window.mapPins.length:0})),window.setTimeout(Q,100),window.setTimeout(Q,300),window.addEventListener("load",Q),window.addEventListener("resize",function(){Q(),q()}),q(),e(ne,250))}function K(){if(!p.map)return;const t=n.form.name,o=n.form.culinary,a=n.form.mealTime,i=n.form.weekDay,s=[],c=[],d=[];
1p.markers.forEach(function(e){de(e.pin,t,o,a,i)?(s.push(e.marker),c.push([e.pin.latitude,e.pin.longitude]),d.push(e.pin)):p.selectedMarker===e.marker&&(p.selectedMarker=null,n.selectedPinSlug=null)}),d.sort(function(e,t){if(p.userLocation){const n=ie(e)-ie(t);if(0!==n)return n}return e.name.localeCompare(t.name,"pt-BR")}),ce(d);const m=s.length;e(function(){n.visibleResults=d,n.resultsCount=m,n.noResults=0===m,n.activeFilterChips=function(e,t,n,o){const a=[];e&&a.push({key:"name",label:'"'+e+'"'});t&&a.push({key:"culinary",label:t});o&&a.push({key:"weekDay",label:u[o]||o});n&&a.push({key:"mealTime",label:l[n]||n});return a}(t,o,a,i),n.activeFiltersCount=n.activeFilterChips.length,n.hasActiveFilters=n.activeFiltersCount>0,e(E,0),p.userLocation&&(ce(d),ue())}),function(e){if(!p.map)return;if(p.useCluster===e&&p.markersLayer)return;p.markersLayer&&(p.map.removeLayer(p.markersLayer),p.markersLayer.clearLayers(),p.markersLayer=null);p.useCluster=e,p.selectedMarker=null,p.markersLayer=e?window.L.markerClusterGroup({showCoverageOnHover:!1,zoomToBoundsOnClick:!0,spiderfyOnMaxZoom:!0,removeOutsideVisibleBounds:!1,disableClusteringAtZoom:r.disableClusteringAtZoom,maxClusterRadius:pe,iconCreateFunction:fe}):window.L.layerGroup(),p.map.addLayer(p.markersLayer)}(m>r.minPins),p.markersLayer&&(p.markersLayer.clearLayers(),s.forEac
1h(function(e){p.markersLayer.addLayer(e)})),m>0?(k(),J(c),e(function(){Q(),L()},100)):n.showCityChangeHint=!1,ee(m>0)}function J(e){p.map&&e&&e.length&&(1!==e.length?p.map.fitBounds(e,{padding:[40,40]}):p.map.setView(e[0],15,{animate:!0}))}function Q(){E(),p.map&&p.map.invalidateSize()}function X(e,t,n,o){const a=window.L.DomUtil.create("button","leaflet-duo-map-btn"+(o?" "+o:" leaflet-duo-zoom-btn"),e);return a.type="button",a.setAttribute("data-tap-disabled","true"),a.setAttribute("aria-label",n),a.innerHTML=t,a}function ee(e){p.fitBoundsButton&&(p.fitBoundsButton.style.display=e?"":"none")}function te(e,t){function n(e){window.L.DomEvent.stop(e),t(e)}window.L.DomEvent.disableClickPropagation(e),window.L.DomEvent.on(e,"click",n),window.L.DomEvent.on(e,"touchend",function(e){window.L.DomEvent.preventDefault(e),n(e)})}function ne(){!p.autoLocateAttempted&&p.map&&navigator.geolocation&&(p.autoLocateAttempted=!0,navigator.permissions&&navigator.permissions.query?navigator.permissions.query({name:"geolocation"}).then(function(e){"granted"===e.state&&oe({silent:!0,centerMap:!1})}).catch(function(){}):oe({silent:!0,centerMap:!1,cachedOnly:!0}))}function oe(t){if(t=t||{},!p.map)return;if(!navigator.geolocation)return void(t.silent||le("Seu navegador não suporta geolocalização."));const n=t.button;n&&(n.classList.add("is-loading"),n.disabled=!0),navigator.geolocation.getCurrentPosition(function(o){n&&(n.classList.remove("is-loading"),n.disabled=!1),function(t,n){n=n||{},function(t,n,o){p.userLocation={latitude:t,longitude:n};const a=[t,n];if(p.userMarker?p.userMarker.setLatLng(a):(p.userMarker=window.L.circleMarker(a,{radius:9,fillColor:"#1a73e8",color:"#ffffff",weight:3,opacity:1,fillOpacity:1,interactive:!1}).addTo(p.map),p.userMarker.bindPopup("Você está aqui")),!o)return ce(),void e(ue);p.userAccuracyCircle?(p.userAccuracyCircle.setLatLng(a),p.userAccuracyCircle.setRadius(o)):p.userAccuracyCircle=window.L.circle(a,{radius:o,fillColor:"#1a73e8",color:"#1a73e8",weight:1,opacity:.2,fillOpacity:.15,interactive:!1}).addTo(p.map),ce(),e(ue)}(t.coords.latitude,t.coords.longitude,t.coords.accuracy),n.centerMap&&(k(),p.map.setView([t.coords.latitude,t.coords.longitude],Math.max(p.map.getZoom(),15),{animate:!0}));if(n.silent)return void w("duo_map_auto_locate_user",y());w("duo_map_locate_user",y())}(o,t)},function(e){n&&(n.classList.remove("is-loading"),n.disabled=!1),t.silent||le(function(e){switch(e.code){case e.PERMISSION_DENIED:return"Permita o acesso à sua localização para usar este recurso.";case e.POSITION_UNAVAILABLE:return"Não foi possÃvel obter sua localização no momento.";case e.TIMEOUT:return"A busca pela sua localização demorou muito. Tente novamente.";default:return"Não foi possÃvel obter sua localização."}}(e))},{enableHighAccuracy:!t.cachedOnly,timeout:t.silent?1e4:15e3,maximumAge:t.cachedOnly?3e5:6e4})}function ae(e){return"number"==typeof e&&!isNaN(e)}function re(e){return e*Math.PI/180}function ie(e){return p.userLocation&&ae(e.latitude)&&ae(e.longitude)?function(e,t,n,o){const a=re(n-e),r=re(o-t),i=Math.sin(a/2)*Math.sin(a/2)+Math.cos(re(e))*Math.cos(re(n))*Math.sin(r/2)*Math.sin(r/2);return 2*Math.atan2(Math.sqrt(i),Math.sqrt(1-i))*6371e3}(p.userLocation.latitude,p.userLocation.longitude,e.latitude,e.longitude):null}function se(e){const t=ie(e);return null===t?null:function(e){if(e<1e3)return Math.round(e)+" m";const t=e/1e3;return t<10?t.toFixed(1).replace(".",",")+" km":Math.round(t)+" km"}(t)}function ce(e){(e||p.markers.map(function(e){return e.pin})).forEach(function(e){e.listDistanceLabel=se(e)})}function ue(){p.userLocation&&n.visibleResults.length&&(n.visibleResults=n.visibleResults.slice().sort(function(e,t){const n=ie(e)-ie(t);return 0!==n?n:e.name.localeCompare(t.name,"pt-BR")}))}function le(e){window.swal?window.swal("Oops...",e,"error"):window.alert(e)}function de(e,t,n,o,a){if(!(t||n||o||a))return!0;let r=!1,i=0,s=0;if(t&&s++,n&&s++,o&&s++,a&&s++,t){const n=new window.Fuse([{name:e.name,district:e.district}],{keys:["name","district"],id:"name",threshold:.3}).search(t);n&&n.length>0&&(r=!0,i++)}(n&&e.cooking===n||n&&e.otherCookings&&-1!==e.otherCookings.indexOf(n))&&(r=!0,i++);const c=e.weekCalendar;return c&&(o&&a?c[a][o]&&(r=!0,i++,i++):a?(c[a].dinner||c[a].lunch)&&(r=!0,i++):o&&(c[0][o]||c[1][o]||c[2][o]||c[3][o]||c[4][o]||c[5][o]||c[6][o])&&(r=!0,i++)),r&&i>=s}function me(e,t){const n=e.imageLogoUrl,r=t?" is-selected":"",i=n?'<img class="duo-ma
1p-marker-logo" src="'+ge(n)+'" alt="" onerror="this.style.display=\'none\'" />':"";return window.L.divIcon({html:'<div class="duo-map-marker-pin'+r+'"><div class="duo-map-marker-head">'+i+'</div><span class="duo-map-marker-tail" aria-hidden="true"></span></div>',className:"duo-map-marker-wrap",iconSize:[o,a],iconAnchor:[o/2,a]})}function fe(){return window.L.divIcon({html:'<div class="duo-map-cluster"><span class="duo-map-cluster-plus" aria-hidden="true">+</span></div>',className:"duo-map-cluster-wrap",iconSize:[44,44],iconAnchor:[22,22]})}function pe(e){return r.maxMarkersPerCluster<=40?e<=10?16:e<=12?22:e<=14?28:e<=15?36:44:e<=10?20:e<=12?28:e<=14?36:e<=15?44:52}function ge(e){return String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}angular.element(document).ready(function(){RegExp.escape||(RegExp.escape=function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}),function(){const e=o("dia"),t=o("horario")||o("horário");"almoco"===t||"almoço"===t?n.form.mealTime="lunch":"jantar"===t&&(n.form.mealTime="dinner");if(e)switch(e){case"domingo":n.form.weekDay="0";break;case"segunda":n.form.weekDay="1";break;case"terca":case"terça":n.form.weekDay="2";break;case"quarta":n.form.weekDay="3";break;case"quinta":n.form.weekDay="4";break;case"sexta":n.form.weekDay="5";break;case"sabado":case"sábado":n.form.weekDay="6"}function o(e){const t=decodeURIComponent(window.location.search.substring(1)),n=t.split("&");let o,a;for(a=0;a<n.length;a++)if((o=n[a].split("="))[0]===e)return void 0===o[1]||o[1]}}(),n.cities=window.mapCityOptions||[],n.filteredCities=n.cities.slice(),n.selectedCityName=window.mapSelectedCity||n.selectedCityName||"",function(){const e=document.querySelector(".map-results-panel__list");if(!e||"1"===e.dataset.scrollBound)return;e.dataset.scrollBound="1";let t=0;e.addEventListener("touchstart",function(e){t=e.touches[0].clientY},{passive:!0}),e.addEventListener("touchmove",function(o){if(!j()||n.sheetDetent===f.PEEK||h.active||h.pending)return;const a=e.scrollTop,r=e.scrollHeight,i=e.offsetHeight,s=o.touches[0].clientY,c=s-t;t=s;const u=c<0,l=a+i>=r-1;l&&u&&o.preventDefault()},{passive:!1})}(),function(){const e=document.querySelector(".map-results-panel"),t=document.querySelector(".map-experience__body"),n=document.querySelector(".map-results-panel__drag-zone"),o=document.querySelector(".map-results-panel__list");if(!e||!t||"1"===e.dataset.sheetDragBound)return;e.dataset.sheetDragBound="1",h.panelEl=e,h.bodyEl=t,h.dragZoneEl=n,h.listEl=o,e.addEventListener("touchstart",O,{passive:!0}),e.addEventListener("touchmove",F,{passive:!1}),e.addEventListener("touchend",R),e.addEventListener("touchcancel",R)}(),W(),e(E,100),e(E,400)}),t.$on("$destroy",function(){U()})}angular.module("DuoGourmet").controller("RestaurantsMapController",e),e.$inject=["$timeout","$scope"]}(),function(){"use strict";angular.module("DuoGourmet").controller("RestaurantsController",function(){const e=this;e.form={},e.isSecondSearch=0,e.onChangeSelectCity=function(){$("body").loading({message:"Alterando a cidade...",onStart:function(e){e.overlay.slideDown(400)},onStop:function(e){e.overlay.slideUp(400)}});const e=$("#filterCity").val();window.location.replace("/restaurantes/"+e)},angular.element(document).ready(function(){function t(t){const n=$(".restaurants-list"),o=n.find(".restaurant-card");return function(t,n,a,r,i){e.isSecondSearch++;let s=!1,c=0,u=0;t&&u++;n&&u++;a&&u++;r&&u++;i&&u++;let l=0;o.each(function(){if(t||n||a||r||i){if(s=!1,c=0,t){const e={keys:["name","district"],id:"name",threshold:.3},n=new window.Fuse([{name:$(this).data("name"),district:$(this).data("district")}],e).search(t);n&&n.length>0&&(s=!0,c++)}(n&&$(this).data("culinary")===n||n&&-1!==$(this).data("othercookings").indexOf(n))&&(s=!0,c++),i&&"yes"===$(this).data(i)&&(s=!0,c++);const e=$(this).data("week-calendar");e&&(a&&r?e[r][a]&&(s=!0,c++,c++):r?(e[r].dinner||e[r].lunch)&&(s=!0,c++):a&&(e[0][a]||e[1][a]||e[2][a]||e[3][a]||e[4][a]||e[5][a]||e[6][a])&&(s=!0,c++)),s&&c>=u?($(this).show(300),l++):$(this).hide(300)}else $(this).show(300),l++;(t||n||a||r||i)&&(window.scrollTo(0,$(window).scrollTop()-10),window.scrollTo(0,$(window).scrollTop()+10))}),0===l?$(".msg-no-restaurants-found").show():$(".msg-no-restaurants-found").hide()}(e.form.name,e.form.culinary,e.form.mealTime,e.form.weekDay,e.form.availabilityOption)}window.sessionStorage.getItem("alert-diff-printed-digital")||$(".alert-diff-printed-digital").show(500),function(){const e=n("dia"),t=n("horario")||n("horário");"almoco"===t||"almoço"===t?$(".meal-time").val("lunch"):"jantar"===t&&$(".meal-time").val("dinner");if(e)switch(e){case"domingo":$(".week-day").val("0");break;case"segunda":$(".week-day").val("1");break;case"terca":case"terça":$(".week-day").val("2");break;case"quarta":$(".week-day").val("3");break;case"quinta":$(".week-day").val("4");break;case"sexta":$(".week-day").val("5");break;case"sabado":case"sábado":$(".week-day").val("6")}function n(e){const t=decodeURIComponent(window.location.search.substring(1)),n=t.split("&");let o,a;for(a=0;a<n.length;a++)if((o=n[a].split("="))[0]===e)return void 0===o[1]||o[1]}}(),$(".lazy").lazy({scrollDirection:"vertical",threshold:0,afterLoad:function(e){$(e).css({"background-image":"linear-gradient(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.55)), "+$(e).css("background-image")})}}),$(".btn-alert-diff-printed-digital").on("click",function(){try{window.sessionStorage.setItem("alert-diff-printed-digital",1)}catch(e){console.error(e)}}),RegExp.escape||(RegExp.escape=function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}),t(),$(".restaurant-culinary, .week-day, .meal-time, .available-in").on("change",function(){t(!0)}),$(".field-search.restaurant-name").keyup(function(){t()}),$(".form-search").on("submit",function(e){e.preventDefault(),t(!0)})})})}(),function(){"use strict";function e(e,t,n){const o=this;function a(){const e=n.defer();return o.imgBlog?(e.resolve(o.imgBlog),e.promise):(window.fetch(o.storyToShare).then(t=>{t.blob().then(t=>{o.imgBlog=t,e.resolve(o.imgBlog)}).catch(t=>{e.reject(t)})}).catch(t=>{e.reject(t)}),e.promise)}o.isMobile=function(){return e.isMobile()},o.init=function(e){o.hasLoaded=!0;const n=e.stories;if(o.storyToShare=e.storyToShare,o.status=e.status,"processed"!==o.status)return void window.setInterval(()=>{window.location.reload()},6e3);new window.Zuck("stories",{backNative:!0,previousTap:!0,skin:"Snapgram",autoFullScreen:!1,avatars:!1,paginationArrows:!1,list:!1,
1cubeEffect:!1,localStorage:!1,stories:[n]}),t.find(".story").first().click(),a()},o.storyToShare=null,o.status=null,o.hasLoaded=!1,o.hasShareFeat=navigator&&navigator.share,o.isSharing=!1,document.getElementById("share-retro").addEventListener("click",function(){if(!o.storyToShare)return;try{const e=window.location.pathname.replace("/retrospectiva/","");window.dataLayer||(window.dataLayer=[]),window.dataLayer.push({event:"duo_share_retrospective",retrospective_id:e})}catch(e){console.error(e)}try{o.isSharing=!0,a().then(e=>{const t=new window.File([e],"retrospectiva.png",{type:"image/png"});o.isSharing=!1,navigator.share({title:"Retrospectiva",text:"Minha retrospectiva Duo Gourmet 2025!",files:[t]}).then(()=>{})}).catch(e=>{console.error(e)})}catch(e){o.isSharing=!1,console.error(e)}}),document.getElementById("btn-reload").addEventListener("click",()=>{window.location.reload()})}angular.module("DuoGourmet").controller("RetrospectiveController",e),e.$inject=["Utilities","$document","$q"]}(),function(){"use strict";function e(e,t,n,o){const a=this;a.isValidFullName=d,a.isValidPhone=m,a.isValidBirthday=f,a.validate=function(){grecaptcha.execute()},a.onSubmit=u,n.onSubmit=u,window.dataLayer||(window.dataLayer=[]);const r=function(){return"(00) 00000-0000"},i={onKeyPress:function(e,t,n,o){n.mask(r.apply({},arguments),o)}};o(function(){!function(){if(!n.location||!n.location.search)return;const e=new window.URLSearchParams(n.location.search),t=e.get("name"),r=e.get("email"),i=e.get("phone");let s=!1;t&&!a.fullname&&(a.fullname=t,s=!0);r&&!a.email&&(a.email=r,s=!0);i&&!a.phone&&(a.phone=function(e){if(!e)return e;let t=e.replace(/\D/g,"");13===t.length&&0===t.indexOf("55")&&(t=t.substring(2));if(11===t.length)return t;return e}(i),o(function(){l()},0),s=!0);s&&window.dataLayer.push({event:"duo_signup_autofill"})}()},1e3),$("#birthday").mask("00/00/0000"),a.disabledStyle={backgroundColor:"#e0e0e0"};let s=null;function c(e){const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null}function u(n){if(!n)return swal("Oops...","Atualize a página e tente novamente!","error"),void grecaptcha.reset();if(!d(!0)||!m(!0)||!function(e){const t=a.password,n=a.fullname.split(" ");let o=!0;if(t.length<8)return!0===e&&$("#password").focus(),$("#password").notify("A senha deve ter pelo menos 8 caracteres!",{position:"bottom",autoHideDelay:1500}),!1;if(n.forEach(e=>{if(t&&e.length>3&&t.toLowerCase().includes(e.toLowerCase()))return o=!1,!1}),!o)return $("#password").notify("Não utilizar sequências numéricas, partes do nome ou data de nascimento.",{position:"bottom",autoHideDelay:1500}),!1;if(!p(t))return $("#password").notify("Não utilizar sequências numéricas, partes do nome ou data de nascimento.",{position:"bottom",autoHideDelay:1500}),!1;if(!/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})/.test(t)||!/[^a-zA-Z0-9]/.test(t))return $("#password").notify("A senha deve cumprir os requisitos.",{position:"bottom",autoHideDelay:1500}),!1;return!0}(!0)||!function(t){const n=a.cpf;return!(!n||!e.isValidCpf(n))||(!0===t&&$("#cpf").focus(),$("#cpf").notify("Informe o CPF corretamente!",{position:"bottom"}),!1)}(!0)||0===grecaptcha.getResponse().length&&($(".g-recaptcha").notify("Confirme que você não é um robô ð¤!",{position:"bottom center",autoHideDelay:1500}),1)||(r=!0,a.email!==a.confirmEmail&&(!0===r&&$("#confirmemail").focus(),$("#confirmemail").notify("O email não é igual ao informado anteriormente!",{position:"bottom",autoHideDelay:1500}),1))||!f(!0))return void grecaptcha.reset();var r;e.showLoadingMessage("Aguarde...",!1);const i=window.crypto&&window.crypto.randomUUID?window.crypto.randomUUID():Date.now()+"-"+Math.random().toString(36).slice(2),u={fullName:a.fullname,email:a.email,phone:a.phone,password:a.password,recaptchaToken:n,fbToken:$("#fbToken").val(),cpf:a.cpf,birthday:moment(a.birthday,"DD/MM/YYYY").format("YYYY-MM-DD"),redirectTo:a.redirectTo,fingerprint:s,metaEventId:i,metaFbp:c("_fbp"),metaFbc:c("_fbc"),eventSourceUrl:window.location.href};function l(){$("body").loading("stop"),grecaptcha.reset()}t.signUp(u).then(function(t){window.dataLayer.push({event:"duo_signup_success",metaEventId:i}),o(function(){e.redirectTo(t.redirectTo)},300),l()}).catch(function(e){swal("Oops...",e.message,"error"),l()})}function l(){const e=$("#phone");e.mask(r,i),e.val()&&(e.trigger("input"),a.phone=e.val())}function d(e){let t=a.fullname;
1return!((t=t?t.split(" "):"").length<=1||!t[0]||!t[1])||(!0===e&&$("#fullname").focus(),$("#fullname").notify("Informe o nome completo!",{position:"bottom",autoHideDelay:1500}),!1)}function m(e){const t=a.phone;return!(!t||15!==t.length)||(!0===e&&$("#phone").focus(),$("#phone").notify("Informe um número de telefone válido!",{position:"bottom",autoHideDelay:1500}),!1)}function f(e){if(!a.birthday)return!0;if(!moment(a.birthday,"DD/MM/YYYY").isValid())return n(),!1;const t=moment().diff(moment(a.birthday,"DD/MM/YYYY"),"years");return!(t<=10||t>=130)||(n(),!1);function n(){!0===e&&$("#birthday").focus(),$("#birthday").notify("Data de nascimento inválida!",{position:"bottom center",autoHideDelay:1e4})}}function p(e){for(const t in e)if(+e[+t+1]==+e[t]+1&&+e[+t+2]==+e[t]+2)return!1;for(const t in e)if(String.fromCharCode(e.charCodeAt(t)+1)===e[+t+1]&&String.fromCharCode(e.charCodeAt(t)+2)===e[+t+2])return!1;return!0}a.requirementsContainer={display:"block"},a.showRequirements=!1,a.passwordRequirements=[{textRequirement:"Senha deve ter no mÃnimo 8 caracteres.",validatePassword:function(){return a.password&&a.password.length>=8}},{textRequirement:"Pelo menos uma letra maiúscula.",validatePassword:function(){return a.password&&/^(?=.*[A-Z])/.test(a.password)}},{textRequirement:"Pelo menos uma letra minúscula.",validatePassword:function(){return a.password&&/^(?=.*[a-z])/.test(a.password)}},{textRequirement:"Pelo menos um número.",validatePassword:function(){return a.password&&/^(?=.*[0-9])/.test(a.password)}},{textRequirement:"Pelo menos um caractere especial. (Ex: ! ? . @ )",validatePassword:function(){return a.password&&/[^a-zA-Z0-9]/.test(a.password)}},{textRequirement:"Não possuir sequência de letras e números.",validatePassword:function(){return a.password&&p(a.password)}},{textRequirement:"Não conter informações pessoais.",validatePassword:function(){if(a.password){let e=!0;return a.fullname.split(" ").forEach(t=>{a.password&&t.length>3&&a.password.toLowerCase().includes(t.toLowerCase())&&(e=!1)}),a.password&&e}}}],angular.element(document).ready(function(){window.setTimeout(function(){!function(){try{window.Fingerprint2.get({},function(e){const t=e.map(function(e){return e.value});s=window.Fingerprint2.x64hash128(t.join(""),31)})}catch(e){}}()},500),l()})}angular.module("DuoGourmet").controller("SignUpController",e),e.$inject=["Utilities","SignUpService","$window","$timeout"]}(),function(){"use strict";angular.module("DuoGourmet").controller("SubscriptionController",function(){angular.element(document).ready(function(){$(".scroll-to-plans").click(function(){$("html, body").animate({scrollTop:$(".plans").offset().top},200)})})})}(),function(){"use strict";function e(e,t){return{payFamilyPlan:function(n){const o=e.defer();return t.callApi("/family",n,12e4).then(function(e){o.resolve({paid:!0,redirectTo:e.redirectTo})},function(e){const t=e.message||"";o.reject({paid:!1,message:t})}),o.promise},sendInvitesByEmail:function(n,o,a){const r=e.defer();return t.callApi("/sendInvitesByEmail",{giftId:n,buyerName:o,buyerEmail:a},12e4).then(function(){r.resolve({sent:!0})},function(e){r.reject({sent:!1,message:e.message})}),r.promise}}}angular.module("DuoGourmet").factory("FamilyService",e),e.$inject=["$q","Utilities"]}(),function(){"use strict";function e(e,t){return{payGift:function(n){const o=e.defer();return t.callApi("/gift",n,12e4).then(function(e){o.resolve({paid:!0,giftId:e.giftId})},function(e){const t=e.message||"";o.reject({paid:!1,message:t})}),o.promise},sendEmail:function(n,o,a,r){const i=e.defer();return t.callApi("/sendGiftByEmail",{giftId:n,buyerName:o,recipientEmail:a,recipientName:r},12e4).then(function(){i.resolve({sent:!0})},function(e){i.reject({sent:!1,message:e.message})}),i.promise}}}angular.module("DuoGourmet").factory("GiftService",e),e.$inject=["$q","Utilities"]}(),function(){"use strict";function e(e){return{beforeAuth:function(t,n,o){return e.callApi("/identifier",{cpf:t,redirectTo:n,recaptchaToken:o})},forgotPassword:function(t){return e.callApi("/forgot-password",{cpf:t})},checkingPassword:function(e,t,n){const o=t.split(" ");let a=!0;const r=new Date(n).toLocaleDateString(),i=r.replace(/\//g,"");
1if(o.forEach(t=>{if(e&&t.length>3&&e.toLowerCase().includes(t.toLowerCase()))return a=!1,!1}),!a)return!1;if(e.includes(r)||e.includes(i)||e.includes(r.split("/")[2]))return!1;if(!function(e){for(const t in e)if(+e[+t+1]==+e[t]+1&&+e[+t+2]==+e[t]+2)return!1;for(const t in e)if(String.fromCharCode(e.charCodeAt(t)+1)===e[+t+1]&&String.fromCharCode(e.charCodeAt(t)+2)===e[+t+2])return!1;return!0}(e))return!1;if(!/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})/.test(e)||!/[^a-zA-Z0-9]/.test(e))return!1;return!0},saveNewPassword:function(t,n,o){const a={userCpf:t,codeToCheck:n,newPassword:o};return e.callApi("/new-password",a)}}}angular.module("DuoGourmet").factory("AuthService",e),e.$inject=["Utilities"]}(),function(){"use strict";function e(e,t){return{checkCPF:function(n){const o=e.defer();return t.callApi("/check-cpf",n).then(function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise}}}angular.module("DuoGourmet").factory("CheckCpfService",e),e.$inject=["$q","Utilities"]}(),function(){"use strict";function e(e,t){return{subscribeB2b:function(n){const o=e.defer();return t.callApi("/b2b-subscribe",n).then(function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise}}}angular.module("DuoGourmet").factory("DuoB2bService",e),e.$inject=["$q","Utilities"]}(),function(){"use strict";function e(e,t){return{sendRecoveryEmail:function(e){return t.callApi("/forgot-password",{userCpf:e})},checkCodeToRecover:function(n,o){const a=e.defer(),r={task:"checkRecoveryCode",codeToCheck:o,cpf:n};return t.callApi("/check-code",r).then(function(e){a.resolve(e)},function(e){a.reject(e)}),a.promise}}}angular.module("DuoGourmet").factory("ForgotPasswordService",e),e.$inject=["$q","Utilities"]}(),function(){"use strict";function e(e,t){return{getInfluencerStatus:function(){return n("getInfluencerStatus")},getInstagramOAuthUrl:function(e){return n("getInstagramOAuthUrl",{redirectUri:e})},completeInstagramOAuth:function(e,t){return n("completeInstagramOAuth",{code:e,state:t})},deactivateInfluencer:function(){return n("deactivateInfluencer")},getInfluencerMentions:function(e,t){return n("getInfluencerMentions",{page:e,itemsPerPage:t})}};function n(n,o){const a=e.defer(),r=angular.extend({task:n},o||{});return t.callApi("/influencers",r).then(function(e){200===e.httpStatus?a.resolve(e.data):a.reject({message:e.message||"Não foi possÃvel completar a operação."})},function(e){a.reject(e)}),a.promise}}angular.module("DuoGourmet").factory("InfluencersService",e),e.$inject=["$q","Utilities"]}(),function(){"use strict";function e(e,t){return{login:function(n,o,a,r){const i=e.defer(),s={cpf:n,password:o,redirectTo:a,recaptchaToken:r};return t.callApi("/login",s).then(function(e){i.resolve(e)},function(e){i.reject(e)}),i.promise}}}angular.module("DuoGourmet").factory("LoginService",e),e.$inject=["$q","Utilities"]}(),function(){"use strict";function e(e,t){return{updatePartner:function(n){const o=e.defer();return t.callApi("/partner",n,6e4).then(function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise}}}angular.module("DuoGourmet").factory("PartnerService",e),e.$inject=["$q","Utilities"]}(),function(){"use strict";function e(e,t){return{subscribePartner:function(n){const o=e.defer();return t.callApi("/parcerias-subscribe",n).then(function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise}}}angular.module("DuoGourmet").factory("PartnersHomeService",e),e.$inject=["$q","Utilities"]}(),function(){"use strict";function e(e,t){return{finishSubscription:function(n){const o=e.defer();return t.callApi("/subscription",n,12e4).then(function(){o.resolve({subscribed:!0})},function(e){const t=e.message||"";o.reject({subscribed:!1,message:t})}),o.promise},createPaymentToken:function(n={number:null,verification_value:null,first_name:null,last_name:null,month:null,year:null}){const o=e.defer();return t.callApi("/payment-token",{cardInfo:n},12e4).then(function(e){o.resolve(e.data.paymentTokenId)},function(e){const t=e.message||"";o.reject({subscribed:!1,message:t})}),o.promise},checkPaymentPix:function(){return t.callApi("/check-payment-pix",{})}}}angular.module("DuoGourmet").factory("PaymentService",e),e.$inject=["$q","Utilities"]}(),function(){"use strict";function e(e,t){return{signUp:function(n){const o=e.defer();return t.callApi("/signup",n).then(function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise}}}angular.module("DuoGourmet").factory("SignUpService",e),e.$inject=["$q","Utilities"]}(),function(){"use strict";function e(e,o){return{callApi:function(t,n,a){const r=o.defer();return e({method:"POST",url:t,timeout:a=a||3e4,headers:{"Content-Type":"application/json"},data:n}).then(function(e){r.resolve(e.data)},function(e){const t=e&&e.data?e.data:{};t.message=t.message||"",r.reject(t)}),r.promise},showLoadingMessage:function(e,t){$("body").loading({message:e,stoppable:t,zIndex:1051,onStart:function(e){e.overlay.slideDown(400)},onStop:function(e){e.overlay.slideUp(400)}})},hideLoadingMessage:function(){$("body").loading("stop")},isValidCpf:function(e){if(!e)return!1;let t=(e=jQuery.trim(e)).replace(/[.-]/gi,"");for(;t.length<11;)t="0"+t;const n=[];let o=Number(0),a=11;for(let e=0;e<11;e++)n[e]=t.charAt(e),e<9&&(o+=n[e]*--a);let r=null;(r=o%11)<2?n[9]=0:n[9]=11-r;o=0,a=11;for(let e=0;e<10;e++)o+=n[e]*a--;(r=o%11)<2?n[10]=0:n[10]=11-r;if(Number(t.charAt(9))!==n[9]||Number(t.charAt(10))!==n[10]||t.match(/^0+$|^
11+$|^2+$|^3+$|^4+$|^5+$|^6+$|^7+$|^8+$|^9+$/))return!1;return!0},onlyNumbers:function(e){return e.replace(/[^0-9]/g,"")},getUserLastNames:function(e){if(e){const t=e.split(" ");if(t.length>1){let e="";return t.splice(0,1),t.forEach(t=>{e+=a(t)+" "}),e.trim()}return""}return""},capitalizeFirstLetter:a,getUserFirstName:function(e){if(e){const t=e.split(" ");return a(t[0])}return""},redirectTo:t,isMobile:n};function a(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}}function t(e){if(e.indexOf("http:")>=0||e.indexOf("https:")>=0){const t=e;t.includes(window.location.origin)?window.location.replace(t):window.location.replace(window.location.origin+"/minha-conta")}else window.location.replace(window.location.origin+e)}function n(){return!!(navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/webOS/i)||navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPod/i)||navigator.userAgent.match(/BlackBerry/i)||navigator.userAgent.match(/Windows Phone/i))}angular.module("DuoGourmet").factory("Utilities",e),e.$inject=["$http","$q"]}(),function(){"use strict";function e(e,t,n){return{sendVoucherInfo:function(n){const o=e.defer();return t.callApi("/voucher/pagamento",n,12e4).then(function(){o.resolve({subscribed:!0})},function(e){const t=e.message||"";o.reject({subscribed:!1,message:t})}),o.promise},signUp:function(n){const o=e.defer();return t.callApi("/signup",n).then(function(e){o.resolve(e)},function(e){o.reject(e)}),o.promise},getAddressByCep:function(t){const o=e.defer();return t=t?t.replace("-",""):"",n({method:"GET",url:"https://viacep.com.br/ws/"+t+"/json/",headers:{"Content-Type":"application/json"},timeout:18e4}).then(function(e){o.resolve(e?e.data:null)},function(){o.reject()}),o.promise}}}angular.module("DuoGourmet").factory("VoucherService",e),e.$inject=["$q","Utilities","$http"]}(),function(){"use strict";function e(e){this.subscriptionOnclick=function(t,n){t.preventDefault(),$.ajax({type:"POST",url:"/selected-family-plan",dataType:"JSON",timeout:12e4,data:{planId:n},success:function(){e.redirectTo("/familia/pagamento")},error:function(e){swal("Oops...",e.responseJSON.message,"error")}})}}angular.module("DuoGourmet").controller("FamilyController",e),e.$inject=["Utilities"]}(),function(){"use strict";function e(e,t){const n=this;n.giftId=null,n.buyerEmail="",n.buyerName="",n.sendGift=function(){if(!n.buyerName)return window.alert("Informe um nome para receber seus cupons!");if(!n.buyerEmail)return window.alert("Informe um email para receber seus cupons!");t.showLoadingMessage("Aguarde...",!1),e.sendInvitesByEmail(n.giftId,n.buyerName,n.buyerEmail).then(function(){t.hideLoadingMessage(),swal("Cupons enviados com sucesso!","","success")}).catch(function(e){t.hideLoadingMessage(),swal("Oops...",e.message,"error")})}}angular.module("DuoGourmet").controller("FamilyInviteController",e),e.$inject=["FamilyService","Utilities"]}(),function(){"use strict";function e(e,t,n){const o=this;o.isFinishing=!1,o.finishSubscription=function(a){if(a.preventDefault(),o.isFinishing=!0,t.hideLoadingMessage(),!(function(){const e=o.creditCard.name.split(" ");return!!(e.length>=2&&e[1])||($(".inputname").focus(),$(".inputname").notify("Informe o nome completo do titular!",{position:"bottom"}),!1)}()&&function(){let e=$(".expire").val();if(e.length<5)return n("Informe o mês e ano corretamente! Ex: 12/30"),!1;e=e.split("/");const t=parseInt(moment().format("YY"))-1;return e[0]>12||"00"===e[0]?(n("Informe o mês da validade corretamente!"),!1):!(e[1]<=t)||(n("Ops! Cartão com validade expirada!"),!1);function n(e){$(".expire").focus(),$(".expire").notify(e,{position:"bottom"})}}()&&function(){const e=$(".ccv").val();return 3===e.length||4===e.length||($(".ccv").focus(),$(".ccv").notify("Informe o código de segurança corretamente!",{position:"bottom"}),!1)}()&&(o.termsOfUse||($("#terms-of-use").notify("Aceite os termos de uso para continuar",{position:"bottom"}),0))))return void(o.isFinishing=!1);t.showLoadingMessage("Aguarde...",!1);const r=o.creditCard.expiration.split("/");n.createPaymentToken({number:o.creditCard.number,cvv:o.creditCard.cvv,name:o.creditCard.name,expMonth:r[0],expYear:r[1]}).then(function(n){const a={paymentToken:n,installments:o.installments,totalCodes:o.totalCodes};var r;r=a,e.payFamilyPlan(r).then(function(){o.isFinishing=!1,t.hideLoadingMessage(),window.location.replace("/familia/obrigado")},function(e){o.isFinishing=!1,t.hideLoadingMessage(),swal("Oops...",e.message,"error")})}).catch(function(e){o.isFinishing=!1,t.hideLoadingMessage();const n=e&&e.message?e.message:"Ocorreu um erro, tente novamente!";return swal("Oops...",n,"error")})},o.creditCard={},o.showMessageIncorretExpirationDate=function(){$(".expire").focus(),$(".expire").notify("Informe uma data de validade correta! Ex: 12/"+((new Date).getFullYear()+1),{position:"bottom"})},o.showMessageIncorretCardNumber=function(){$(".number").focus(),$(".number").notify("Informe o número do cartão corretamente!",{position:"bottom"})}}angular.module("DuoGourmet").controller("FamilyPaymentController",e),e.$inject=["FamilyService","Utilities","PaymentService"]}(),function(){"use strict";function e(e,t,n){const o=this;
1o.isFinishing=!1,o.finishSubscription=function(a){if(a.preventDefault(),o.isFinishing=!0,t.hideLoadingMessage(),!(function(){const e=o.creditCard.name.split(" ");return!!(e.length>=2&&e[1])||($(".inputname").focus(),$(".inputname").notify("Informe o nome completo do titular!",{position:"bottom"}),!1)}()&&function(){let e=$(".expire").val();if(e.length<5)return n("Informe o mês e ano corretamente! Ex: 12/30"),!1;e=e.split("/");const t=parseInt(moment().format("YY"))-1;return e[0]>12||"00"===e[0]?(n("Informe o mês da validade corretamente!"),!1):!(e[1]<=t)||(n("Ops! Cartão com validade expirada!"),!1);function n(e){$(".expire").focus(),$(".expire").notify(e,{position:"bottom"})}}()&&function(){const e=$(".ccv").val();return 3===e.length||4===e.length||($(".ccv").focus(),$(".ccv").notify("Informe o código de segurança corretamente!",{position:"bottom"}),!1)}()&&(o.termsOfUse||($("#terms-of-use").notify("Aceite os termos de uso para continuar",{position:"bottom"}),0))))return void(o.isFinishing=!1);t.showLoadingMessage("Aguarde...",!1);const r=o.creditCard.expiration.split("/");n.createPaymentToken({number:o.creditCard.number,cvv:o.creditCard.cvv,name:o.creditCard.name,expMonth:r[0],expYear:r[1]}).then(function(n){const a={paymentToken:n,installments:o.installments};var r;r=a,e.payGift(r).then(function(e){o.isFinishing=!1,t.hideLoadingMessage(),window.location=window.location.origin+"/presente/obrigado?giftId="+e.giftId},function(e){o.isFinishing=!1,t.hideLoadingMessage(),swal("Oops...",e.message,"error")})}).catch(function(e){o.isFinishing=!1,t.hideLoadingMessage();const n=e&&e.message?e.message:"Ocorreu um erro, tente novamente!";return swal("Oops...",n,"error")})},o.installments=1,o.creditCard={},o.showMessageIncorretExpirationDate=function(){$(".expire").focus(),$(".expire").notify("Informe uma data de validade correta! Ex: 12/"+((new Date).getFullYear()+1),{position:"bottom"})},o.showMessageIncorretCardNumber=function(){$(".number").focus(),$(".number").notify("Informe o número do cartão corretamente!",{position:"bottom"})}}angular.module("DuoGourmet").controller("GiftPaymentController",e),e.$inject=["GiftService","Utilities","PaymentService"]}(),function(){"use strict";function e(e,t){const n=this;n.giftId=null,n.recipientName="",n.recipientEmail="",n.buyerName="",n.giftCode="",n.sendViaEmail=!1,n.sendViaWhatsApp=!1,n.onClickSendBtn=function(e){n.sendViaEmail="whatsapp"===e,n.sendViaWhatsApp="email"===e},n.sendGift=function(){if(n.sendViaWhatsApp){if(!n.phoneRecipient)return window.alert("Informe o telefone do presenteado!");const e=t.onlyNumbers(n.phoneRecipient);if(e.length<10)return window.alert("Informe o telefone do presenteado corretamente!");const o="ðð´ð·\nUm presente especial para quem ama comer bem!\n\nOi, *"+n.recipientName+"*, você ganhou uma assinatura do Duo Gourmet App!\n\nUse este cupom: *"+n.giftCode+"*\n\nSiga os passos para ativar a assinatura:\n1⣠Baixe o Duo Gourmet App\n2⣠Faça seu cadastro\n3⣠Use o cupom *"+n.giftCode+"* para assinar\n\n--\nâ¤";window.open("https://api.whatsapp.com/send?phone=55"+e+"&text="+encodeURI(o),"_blank")}else{if(!n.recipientEmail)return window.alert("Informe o email do presenteado!");n.sendingByEmail=!0,t.showLoadingMessage("Aguarde...",!1),e.sendEmail(n.giftId,n.buyerName,n.recipientEmail,n.recipientName).then(function(){n.sendingByEmail=!1,t.hideLoadingMessage(),swal("Presente enviado com sucesso!","","success"),n.recipientEmail=""}).catch(function(e){n.sendingByEmail=!1,t.hideLoadingMessage(),swal("Oops...",e.message,"error")})}},$(window).ready(function(){const e=function(e){return 11===e.replace(/\D/g,"").length?"(00) 00000-0000":"(00) 0000-00009"},t={onKeyPress:function(t,n,o,a){o.mask(e.apply({},arguments),a)}};$("#phoneRecipient").mask(e,t)})}angular.module("DuoGourmet").controller("GiftShareController",e),e.$inject=["GiftService","Utilities"]}(),function(){"use strict";function e(e,t,n,o,a){const r=this;r.cpf=null,r.isLogging=!1,r.redirectTo=null,r.showBtnFacebook=!1,r.password=null,r.storeRestaurant=c,r.onSubmit=l,r.validate=function(){gre
1captcha.execute()},r.showFormIdentifier=!0,r.showFormLogin=!1,r.showCardThanks=!1,r.showFormNewUser=!1,r.showFormPayment=!1,r.isLogging=!1,r.voucherAmount=1,r.login=function(){if(!n.isValidCpf(r.cpf))return void $("#cpf").focus().notify("Informe o CPF corretamente!",{position:"bottom"});n.showLoadingMessage("Aguarde...",!1),r.isLogging=!0,o.login(r.cpf.replace(/[.-]/gi,""),r.password).then(function(e){n.hideLoadingMessage(),r.isLogging=!1,r.showFormLogin=!1,e.logged?(r.showFormPayment=!0,r.isLoggedId="yes"):r.showFormIdentifier=!0},function(e){n.hideLoadingMessage(),swal("Oops...",e.message,"error"),r.isLogging=!1})},e.onSubmit=l,r.direcionador=s,e.direcionador=s,r.isFinishing=!1,r.sendVoucherInfo=function(e){if(e.preventDefault(),r.isFinishing=!0,n.hideLoadingMessage(),!(r.voucherAmount>0||($(".voucherAmount").focus(),$(".voucherAmount").notify("Informe o valor do voucher! Ex: R$100",{position:"bottom"}),0))||!function(){const e=r.cardInfo.ownerName.split(" ");return!!(e.length>=2&&e[1])||($(".inputname").focus(),$(".inputname").notify("Informe o nome completo do titular!",{position:"bottom"}),!1)}()||$(".expire").val().length<5&&($(".expire").focus(),$(".expire").notify("Informe o mês e ano corretamente! Ex: 12/30",{position:"bottom"}),1)||!function(){const e=$(".ccv").val();return 3===e.length||4===e.length||($(".ccv").focus(),$(".ccv").notify("Informe o código de segurança corretamente!",{position:"bottom"}),!1)}())return void(r.isFinishing=!1);n.showLoadingMessage("Aguarde...",!1);const t={cardInfo:r.cardInfo,restaurantId:r.restaurantId,voucherAmount:r.voucherAmount,address:r.address};a.sendVoucherInfo(t).then(function(){r.isFinishing=!1,n.hideLoadingMessage(),r.showFormPayment=!1,r.showCardThanks=!0},function(e){r.isFinishing=!1,n.hideLoadingMessage(),r.showFormPayment=!0,r.showCardThanks=!1,swal("Oops...",e.message,"error")})},r.installments=1,r.onChangeSelectCity=function(){$("body").loading({message:"Alterando a cidade...",onStart:function(e){e.overlay.slideDown(400)},onStop:function(e){e.overlay.slideUp(400)}});const e=$("#filterCity").val();r.cityPath=e,window.location.replace("/valorizeagastronomia?cidade="+e+"#restaurants-area")},r.authWithFacebook=function(){window.localStorage.setItem("restaurantId",r.restaurantId),window.localStorage.setItem("restaurantName",r.restaurantName),e.location.href="/auth/facebook/redirect?redirectTo=/valorizeagastronomia"},r.showFormPaymentAfterFacebook=function(){r.showMsgFacebook=!1,r.showFormPayment=!0},r.address={},r.updateAddress=u,r.onClickSignUp=d,e.onClickSignUp=d,r.isValidFullName=m,r.isValidPhone=f;let i=null;function s(e){r.showFormIdentifier?l(e):r.showFormNewUser&&d(e)}function c(e,t){r.restaurantId=e,r.restaurantName=t,r.restaurantReplace=r.restaurantName.replace(" - DELIVERY","").replace(" - PARA RETIRAR",""),r.showFormPayment="yes"===r.isLoggedId,r.showFormLogin=!r.showFormIdentifier&&"no"===r.isLoggedId,r.showFormIdentifier=r.showFormIdentifier&&"no"===r.isLoggedId,r.showCardThanks=!1,$("#modalId").modal({backdrop:"static"})}function u(e,t,n,o,a){r.address.street=e,r.address.placeNumber=t,r.address.district=n,r.address.city=o,r.address.state=a}function l(e){if(!n.isValidCpf(r.cpf))return $("#cpf").focus().notify("Informe o CPF corretamente!",{position:"bottom"}),void grecaptcha.reset();if(!e)return swal("Oops...","Atualize a página e tente novamente!","error"),void grecaptcha.reset();n.showLoadingMessage("Aguarde...",!1),r.isLogging=!0;const o=r.cpf.replace(/[.-]/gi,"");t.beforeAuth(o,r.redirectTo,e).then(function(e){n.hideLoadingMessage(),r.isLogging=!1,r.showFormIdentifier=!1,r.showBtnFacebook=!0===e.data.showBtnFacebook,e.data.registeredByCpf?r.showFormLogin=!0:r.showFormNewUser=!0;grecaptcha.reset()},function(e){n.hideLoadingMessage(),swal("Oops...",e.message,"error"),r.isLogging=!1,grecaptcha.reset()})}function d(e){if(!e)return swal("Oops...","Atualize a página e tente novamente!","error"),void grecaptcha.reset();if(!(m(!0)&&f(!0)&&function(e){if(r.password.length<6)return!0===e&&$("#password").focus(),$("#password").notify("A senha deve ter pelo menos 6 caracteres!",{position:"bottom",autoHideDelay:1500}),!1;return!0}(!0)&&function(e){const t=r.cpf;return!(!t||!n.isValidCpf(t))||(!0===e&&$("#cpf").focus(),$("#cpf").notify("Informe o CPF corretamente!",{position:"bottom"}),!1)}(!0)))return;n.showLoadingMessage("Aguarde...",!1);const t={fullName:r.fullname,email:r.email,phone:r.phone,password:r.password,recaptchaToken:e,fbToken:$("#fbToken").val(),cpf:r.cpf,redirectTo:r.redirectTo,fingerprint:i};function o(){$("body").loading("stop"),grecaptcha.reset()}a.signUp(t).then(function(){o(),r.showFormNewUser=!1,r.showFormPayment=!0,r.showFormLogin=!1,r.isLoggedId="yes"},function(e){o(),swal("Oops...",e.message,"error")})}function m(e){let t=r.fullname;
1return!((t=t?t.split(" "):"").length<=1||!t[0]||!t[1])||(!0===e&&$("#fullname").focus(),$("#fullname").notify("Informe o nome completo!",{position:"bottom",autoHideDelay:1500}),!1)}function f(e){const t=r.phone;return!(!t||14!==t.length&&15!==t.length)||(!0===e&&$("#phone").focus(),$("#phone").notify("Informe um número de telefone válido!",{position:"bottom",autoHideDelay:1500}),!1)}r.getAddressByCep=function(){r.address.cep&&(r.gettingAddress=!0,r.disableChangeAddress=!1,a.getAddressByCep(r.address.cep).then(function(e){e&&e.uf&&(r.gettingAddress=!1,u(e.logradouro,null,e.bairro,e.localidade,e.uf))},function(){r.gettingAddress=!1}))},r.cardInfo={},r.cardInfo.number="",r.cardInfo.ownerName="",r.cardInfo.expire="",r.cardInfo.cvv="",r.statesList=["AC","AL","AP","AM","BA","CE","DF","ES","GO","MA","MT","MS","MG","PA","PB","PR","PE","PI","RJ","RN","RS","RO","RR","SC","SP","SE","TO"],r.restaurantId=window.localStorage.getItem("restaurantId"),r.restaurantName=window.localStorage.getItem("restaurantName"),r.restaurantId&&r.restaurantName&&(r.showMsgFacebook=!0,c(r.restaurantId,r.restaurantName),window.localStorage.removeItem("restaurantId"),window.localStorage.removeItem("restaurantName")),angular.element(document).ready(function(){window.setTimeout(function(){!function(){try{window.Fingerprint2.get({},function(e){const t=e.map(function(e){return e.value});i=window.Fingerprint2.x64hash128(t.join(""),31)})}catch(e){}}()},500),$("#cvv").mask("00/00"),$("#cardNumber").mask("0000 0000 0000 0000"),$("#cep").mask("00000-000");const e=function(e){return 11===e.replace(/\D/g,"").length?"(00) 00000-0000":"(00) 0000-00009"},t={onKeyPress:function(t,n,o,a){o.mask(e.apply({},arguments),a)}};$("#phone").mask(e,t)})}angular.module("DuoGourmet").controller("VoucherController",e),e.$inject=["$window","AuthService","Utilities","LoginService","VoucherService"]}();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.