https://www.caffeinearmy.com.br/cdn/shop/t/359/assets/login-utils.js?v=78591861067051956041789394577
1window.addEventListener("DOMContentLoaded",function(){const urlParams=new URLSearchParams(window.location.search);let redirectTo=urlParams.get("checkout_url")||urlParams.get("redirectTo");const planInfo=urlParams.get("plan"),customerEmailInput=document.getElementById("CustomerEmail"),currentEmail=localStorage.getItem("currentEmail");currentEmail!=null&&(customerEmailInput.value=currentEmail),redirectTo!=null&&(sessionStorage.removeItem("shopFlow"),planInfo!=null?(localStorage.setItem("redirectParam",redirectTo+`&plan=${planInfo}`),localStorage.setItem("returnTo",redirectTo+`&plan=${planInfo}`)):(localStorage.setItem("redirectParam",redirectTo),localStorage.setItem("returnTo",redirectTo))),window?.navigator?.userAgent?.includes("Instagram")&&document.getElementById("googleLoginButton")?.remove();const passwordInput=document.getElementById("CustomerPassword");passwordInput!=null&&(passwordInput.value="",passwordInput.addEventListener("keydown",function(event){const capsLockWarning=document.getElementById("capsLockWarning");event!=null&&event?.getModifierState!=null&&(event.getModifierState("CapsLock")?capsLockWarning.classList.remove("hidden"):capsLockWarning.classList.add("hidden"))}))});function handleRefresh(){return window.location.reload()}function setCustomerEmail(){const emailInput=document.querySelector("#RecoverEmail");emailInput!=null&&localStorage.setItem("currentEmail",emailInput.value)}async function handleLogin(){const customerLoginButton=document.querySelector(".login-btn"),customerLoginForm=document.getElementById("customer_login"),customerEmailInput=document.getElementById("CustomerEmail"),customerPasswordInput=document.getElementById("CustomerPassword");customerLoginButton!=null&&(customerLoginButton.innerHTML="<span style='width: 20px; height:20px;' class='loader'></span>"),await fetch("/apps/proxy/create-customer-access-token",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:customerEmailInput.value,password:customerPasswordInput.value})}).then(response=>response.json()).then(data=>{if(data?.customerAccessToken){const currentDate=new Date,differenceInMilliseconds=new Date(data.expiresAt)-currentDate,differenceInDays=Math.ceil(differenceInMilliseconds/(1e3*60*60*24));Cookies.set("customerAccessToken",data.customerAccessToken,{domain:"caffeinearmy.com.br",expires:differenceInDays})}customerLoginForm.submit()}).catch(err=>console.log(err))} 2//# sourceMappingURL=/cdn/shop/t/359/assets/login-utils.js.map?v=78591861067051956041789394577
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.