PageSourceSearch

https://adlensapp.com/_astro/dashboard.astro_astro_type_script_index_0_lang.BQh0tkrR.js

js adlensapp.com collected 2026-10-02 01:21:15 UTC 5,696 bytes, 5 lines download raw bytes

1const S="modulepreload",C=function(m){return"/"+m},v={},N=function(b,p,E){let y=Promise.resolve();if(p&&p.length>0){let a=function(s){return Promise.all(s.map(r=>Promise.resolve(r).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),h=i?.nonce||i?.getAttribute("nonce");y=a(p.map(s=>{if(s=C(s),s in v)return;v[s]=!0;const r=s.endsWith(".css"),g=r?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${s}"]${g}`))return;const c=document.createElement("link");if(c.rel=r?"stylesheet":S,r||(c.as="script"),c.crossOrigin="",c.href=s,h&&c.setAttribute("nonce",h),document.head.appendChild(c),r)return new Promise((e,d)=>{c.addEventListener("load",e),c.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${s}`)))})}))}function w(a){const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=a,window.dispatchEvent(i),!i.defaultPrevented)throw a}return y.then(a=>{for(const i of a||[])i.status==="rejected"&&w(i.reason);return b().catch(w)})};document.addEventListener("DOMContentLoaded",async function(){const m=document.getElementById("loading-state"),b=document.getElementById("not-authenticated"),p=document.getElementById("dashboard-content"),E=document.getElementById("no-subscription"),y=document.getElementById("active-subscription"),w=document.getElementById("manage-subscription-btn");let a=0;const i=100,h=()=>{if(a++,window.firebaseAuth){const e=window.firebaseAuth.currentUser;e?s(e):a>=i?(m.classList.add("hidden"),b.classList.remove("hidden")):setTimeout(h,100)}else a<i?setTimeout(h,100):(m.classList.add("hidden"),b.classList.remove("hidden"))};async function s(e){try{const d=document.getElementById("user-avatar"),n=document.getElementById("user-name"),o=document.getElementById("user-email");d&&n&&o&&(d.textContent=e.displayName?e.displayName.charAt(0).toUpperCase():e.email.charAt(0).toUpperCase(),n.textContent=e.displayName||e.email.split("@")[0],o.textContent=e.email);const t=window.firestoreDoc(window.firestore,"users",e.uid),{getDoc:f}=await N(async()=>{const{getDoc:u}=await import("https://www.gstatic.com/firebasejs/12.3.0/firebase-firestore.js");return{getDoc:u}},[]),l=await f(t);if(l.exists()){const u=l.data(),x=u.checkout_id||u.transaction_id||u.paddle_subscription_id,L=["active","trialing","past_due"].includes(u.status);x&&L?g(u):r()}else r();m.classList.add("hidden"),p.classList.remove("hidden")}catch(d){console.error("Error loading dashboard:",d),m.classList.add("hidden"),p.classList.remove("hidden"),r()}}function r(){E.classList.remove("hidden"),y.classList.add("hidden");const e=document.getElementById("subscription-status-badge");e&&e.classList.add("hidden")}function g(e){E.classList.add("hidden"),y.classList.remove("hidden");const d=document.getElementById("subscription-plan"),n=document.getElementById("subscription-status"),o=document.getElementById("subscription-renew-date"),t=document.getElementById("subscription-status-badge");if(d&&(d.textContent=e.plan||"Standard"),n){const l=e.status==="active"||e.status==="trialing"?"Active":e.status.charAt(0).toUpperCase()+e.status.slice(1);n.textContent=l,e.status==="active"||e.status==="trialing"?n.className="text-base font-semibold text-green-600":e.status==="past_due"?n.className="text-base font-semibold text-orange-600":n.className="text-base font-semibold text-base-600"}const f=o?.previousElementSibling;if(f&&(f.textContent="Next Billing Date"),o&&e.renew_date){let l;if(typeof e.renew_date=="string"?l=new Date(e.renew_date):e.renew_date.toDate&&(l=e.renew_date.toDate()),l&&!isNaN(l.getTime())){const u=l.toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"});o.textContent=u}else o.textContent="Not available"}else o&&(o.textContent="Not available");t&&(t.classList.remove("hidden"),e.status==="active"||e.status==="trialing"?(t.textContent="Active",t.className="px-3 py-1 text-sm font-medium rounded-full bg-green-100 text-green-800"):e.status==="past_due"?(t.textContent="Past Due",t.className="px-3 py-1 text-sm font-medium rounded-full bg-orange-100 text-orange-800"):e.status==="canceled"||e.status==="cancelled"?(t.textContent="Canceled",t.className="px-3 py-1 text-sm font-medium rounded-full bg-red-100 text-red-800"):(t.textContent="Inactive",t.className="px-3 py-1 text-sm font-medium rounded-full bg-base-100 text-base-600")),w&&w.addEventListener("click",function(){c(e)})}async function c(e){document.getElementById("manage-subscription-btn").innerHTML;try{const n=e.customer_id;if(!n)throw new Error("No customer ID found. Subscription may not be fully synced yet.");const o=await fetch("/api/get-portal-link",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({customerId:n})}),t=await o.json();if(!o.ok||!t.success)throw new Error(t.error||"Failed to get portal link");const f=t.data.urls;if(f.general&&f.general.overview)window.open(f.general.overview,"_blank");else throw new Error("No portal URL returned from Paddle")}catch(n){console.error("Portal link error:",n),confirm(`Unable to open subscription management automatically.
2
3Error: `+n.message+`
4
5Would you like to open your email client to contact support?`)&&(window.location.href="mailto:[email protected]?subject=Subscription%20Management&body=I%20need%20help%20managing%20my%20subscription.%20Email:%20"+encodeURIComponent(e.email||""))}}window.addEventListener("userSignedIn",function(){window.firebaseAuth?.currentUser&&s(window.firebaseAuth.currentUser)}),window.addEventListener("userSignedOut",function(){m.classList.add("hidden"),b.classList.remove("hidden"),p.classList.add("hidden")}),h()});

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.