function normalizeProfileId(b){return b.trim().toLowerCase()}document.getElementById("addprofilebtn").addEventListener("click",function(){const b=encodeURIComponent(document.getElementById("profileid").value);window.open(`https://www.google.com/maps/search/${b}`)});document.getElementById("demo_link").addEventListener("click",function(){chrome.tabs.create({url:"demo.html"})});document.getElementById("demo_video").addEventListener("click",function(){chrome.tabs.create({url:"https://youtu.be/svsDoqsBt8s"})});
$(document).ready(function(){document.getElementById("managesubscription").style.display="none";chrome.storage.sync.get(null,function(b){var c=b.displayName;b.uid?(document.getElementById("loginbtn").innerHTML="Logout "+c,document.getElementById("loginbtn").addEventListener("click",function(){chrome.storage.sync.clear();window.location.assign("popup.html")}),rolecheck().then(function(a){if(0!==Object.keys(a).length){var d=a.quota-a.used;"Free"==a.plan||0>=d?document.getElementById("upgradebtn").style.display=
"block":document.getElementById("upgradebtn").style.display="None";document.getElementById("accountinfo").innerHTML=`Current Plan: ${a.plan}, Quota: ${a.quota}, Used: ${a.used}`}}),document.getElementById("managesubscription").style.display="block"):(document.getElementById("loginbtn").innerHTML="Login",document.getElementById("upgradebtn").style.display="None",document.getElementById("loginbtn").addEventListener("click",function(){login()}))});document.getElementById("customerportal").addEventListener("click",
customerportal)});document.getElementById("upgradebtn").addEventListener("click",function(){upgradeToPro()});
