PageSourceSearch

https://www.shortstack.com/_astro/pricing.astro_astro_type_script_index_0_lang.D_Lvp7we.js

js shortstack.com collected 2026-10-02 02:32:10 UTC 9,565 bytes, 1 lines download raw bytes

1function g(t){return t.toLocaleString("en-US")}function W(t){return t>=1e6?(t/1e6).toFixed(t%1e6?1:0)+"M":t>=1e3?(t/1e3).toFixed(0)+"K":String(t)}function o(t,e){return document.querySelector(t)}function d(t,e){return Array.from((e||document).querySelectorAll(t))}let w="annual",C=null,m="launch",$=!1,O=0,q=0;const st="pricing-default-billing-2026-07";let B=!1,k=!1;function I(t){w=t,d(".billing-btn",o("#billing-toggle")).forEach(n=>{n.classList.toggle("is-active",n.dataset.p===t)}),d("[data-monthly][data-annual]").forEach(n=>{n.textContent=n.dataset[t]||n.dataset.monthly}),d(".billnote-annual").forEach(n=>{n.style.display=t==="annual"?"":"none"}),d(".billnote-monthly").forEach(n=>{n.style.display=t==="monthly"?"":"none"});const e=o("#ovr-billing");e&&d(".ovr-bill-btn",e).forEach(n=>{n.classList.toggle("is-active",n.dataset.p===t)}),o("#ovr-views-slider")&&M()}function D(t){B=!0,I(t)}function H(){if(k||B||!o("#billing-toggle")||!(window.posthog&&typeof posthog.getFeatureFlag=="function"))return;const t=posthog.getFeatureFlag(st);t!==void 0&&(k=!0,(t==="test"||t==="monthly")&&I("monthly"))}function K(t){const e=o("#infotip-pop");if(!e)return;const n=t.getBoundingClientRect();o("#infotip-title").textContent=t.dataset.tipTitle||"",o("#infotip-body").textContent=t.dataset.tipBody||"";const s=o("#infotip-note");s.textContent=t.dataset.tipNote||"",s.style.display=t.dataset.tipNote?"":"none",e.style.display="block";const i=e.offsetWidth||240;let a=n.left+n.width/2-i/2;a=Math.max(8,Math.min(a,window.innerWidth-i-8));let c=n.top-e.offsetHeight-8;c<8&&(c=n.bottom+8),e.style.left=a+"px",e.style.top=c+"px",C=t}function _(){const t=o("#infotip-pop");t&&(t.style.display="none"),C=null}function at(t){const e=t.target.closest(".infotip-btn");e?(t.stopPropagation(),C===e?_():K(e)):C&&_()}function lt(t){const e=t.target.closest(".infotip-btn");e&&window.matchMedia("(hover: hover)").matches&&K(e)}function rt(t){t.target.closest(".infotip-btn")&&window.matchMedia("(hover: hover)").matches&&_()}const F=1e6,P=2e5,j=4,y=1e3;function V(t,e){return Math.pow(t/y,j)*e}function L(t,e){return Math.round(Math.pow(t/e,1/j)*y)}function X(t){return t<=0?0:t<1e3?Math.round(t/50)*50:t<1e4?Math.round(t/100)*100:t<1e5?Math.round(t/1e3)*1e3:Math.round(t/5e3)*5e3}function J(t){const e=o(`#ovr-plan-seg [data-plan="${t}"]`);return e?{id:t,views:parseInt(e.dataset.views),entries:parseInt(e.dataset.entries),viewRate:parseFloat(e.dataset.viewRate),entryRate:parseFloat(e.dataset.entryRate),monthly:parseInt(e.dataset.monthly),annualMonthly:parseInt(e.dataset.annualMonthly),annualTotal:parseInt(e.dataset.annualTotal),name:e.textContent.trim()}:null}function Q(t){return w==="annual"&&t.annualMonthly>0?t.annualMonthly:t.monthly}function ct(t,e,n){const s=J(t);if(!s)return 1/0;const i=Math.max(0,e-s.views),a=Math.max(0,n-s.entries);if(i>0&&!(s.viewRate>0)||a>0&&!(s.entryRate>0))return 1/0;const c=i>0?Math.ceil(i/1e4)*s.viewRate:0,l=a>0?Math.ceil(a/1e3)*s.entryRate:0;return Q(s)+c+l}function dt(t,e){let n=null,s=1/0;return d(".ovr-plan-chip[data-plan]",o("#ovr-plan-seg")).forEach(i=>{const a=ct(i.dataset.plan,t,e);a<s&&(s=a,n=i.dataset.plan)}),n}function M(){const t=o("#ovr-views-slider"),e=o("#ovr-entries-slider");if(!t||!e)return;const n=X(V(parseInt(t.value),F)),s=X(V(parseInt(e.value),P));O=n,q=s,m=dt(n,s)||"launch";const i=J(m);if(!i)return;const a=Q(i);o("#ovr-views-label").textContent=g(n),o("#ovr-views-mark").style.left=Math.min(L(i.views,F)/y*100,96)+"%",o("#ovr-views-mark-label").textContent=W(i.views)+" included",o("#ovr-entries-label").textContent=g(s),o("#ovr-entries-mark").style.left=Math.min(L(i.entries,P)/y*100,96)+"%",o("#ovr-entries-mark-label").textContent=W(i.entries)+" included";const c=Math.max(0,n-i.views),l=Math.max(0,s-i.entries),f=Math.ceil(c/1e4),h=Math.ceil(l/1e3),r=c>0?f*i.viewRate:0,p=l>0?h*i.entryRate:0,b=a+r+p;o("#ovr-base-label").textContent=`${i.name} base plan`,o("#ovr-base-cost").textContent=`$${a}/mo`;const E=o("#ovr-views-line");c>0?(E.style.display="",o("#ovr-views-units-label").textContent=`${g(c)} extra views · ${f} unit${f!==1?"s":""} × $${i.viewRate}`,o("#ovr-views-units-cost").textContent=`+$${r.toFixed(2)}`):E.style.display="none";const x=o("#ovr-entries-line");l>0?(x.style.display="",o("#ovr-entries-units-label").textContent=`${g(l)} extra entries · ${h} unit${h!==1?"s":""} × $${i.entryRate}`,o("#ovr-entries-units-cost").textContent=`+$${p.toFixed(2)}`):x.style.display="none",o("#ovr-total-cost").textContent=`$${b.toFixed(b%1===0?0:2)}/mo`;const S=o("#ovr-annual-note");S&&(w==="annual"&&a>0&&i.annualTotal>0?(S.textContent=`Base billed annually — $${g(i.annualTotal)}/yr. Any overages are invoiced monthly as you use them.`,S.style.display=""):S.style.display="none"),d(".ovr-plan-chip[data-plan]",o("#ovr-plan-seg")).forEac
1h(U=>{U.classList.toggle("is-recommended",U.dataset.plan===m)});const it=m==="max"&&(c>0||l>0);o("#ovr-ent").style.display=it?"":"none",Z()}function Y(){const t=o("#ovr-section");t&&(t.style.display="",tt(!0),M(),setTimeout(()=>t.scrollIntoView({behavior:"smooth",block:"nearest"}),50))}function z(){const t=o("#ovr-section");t&&(t.style.display="none"),tt(!1),Z()}function G(t){return Math.max(0,Math.min(y,t))}function Z(){if(!$)return;const t=o("#ovr-section"),e=!!t&&t.style.display!=="none",n=new URLSearchParams(location.search);e?(n.set("est","1"),n.set("views",String(O)),n.set("entries",String(q)),n.set("billing",w)):["est","views","entries","billing"].forEach(i=>n.delete(i));const s=n.toString();history.replaceState(history.state,"",location.pathname+(s?"?"+s:"")+location.hash)}function ut(){const t=new URLSearchParams(location.search);if(t.get("est")!=="1")return;const e=parseInt(t.get("views")),n=parseInt(t.get("entries")),s=o("#ovr-views-slider"),i=o("#ovr-entries-slider");s&&Number.isFinite(e)&&(s.value=G(L(e,F))),i&&Number.isFinite(n)&&(i.value=G(L(n,P)));const a=t.get("billing");(a==="monthly"||a==="annual")&&(B=!0,I(a)),Y()}function tt(t){const e=o("#toggle-estimator");e&&(e.querySelector(".ft-label-show").style.display=t?"none":"",e.querySelector(".ft-label-hide").style.display=t?"":"none",e.classList.toggle("is-active",t))}const pt=768;let v=null;function A(){return window.innerWidth<pt}function et(){const t=o("#cmp-table");t&&d(".cmp-group-row",t).forEach(e=>{e.classList.remove("is-open");const n=e.dataset.group;d(`.cmp-row[data-group="${n}"]`,t).forEach(s=>s.classList.add("is-hidden"))})}function ft(){const t=o("#cmp-table");t&&(d(".cmp-group-row",t).forEach(e=>e.classList.remove("is-open")),d(".cmp-row",t).forEach(e=>e.classList.remove("is-hidden")))}const N=64;let u=null,R=null;function ht(t){const e=document.createElement("div");e.className="cmp-sticky-header";const n=document.createElement("table");n.className="cmp-table",n.appendChild(t.cloneNode(!0)),e.appendChild(n),document.body.appendChild(e),u=e,R=n}function nt(){if(!u)return;const t=o(".cmp-scroll"),e=o("#cmp-table"),n=e&&e.querySelector("thead");if(!t||!e||!n)return;const s=e.getBoundingClientRect();u.style.top=N+"px",u.style.left=s.left+"px",u.style.width=s.width+"px",u.style.height=n.getBoundingClientRect().height+"px",R.style.width=e.offsetWidth+"px",R.style.marginLeft=-t.scrollLeft+"px";const i=Array.from(n.querySelectorAll("th")),a=Array.from(u.querySelectorAll("th"));i.forEach((c,l)=>{a[l]&&(a[l].style.width=c.getBoundingClientRect().width+"px")})}function T(){u&&(u.remove(),u=null,R=null)}function ot(){const t=o("#cmp-table"),e=o(".compare-section"),n=t&&t.querySelector("thead");if(!t||!e||!n){T();return}const s=n.getBoundingClientRect().bottom,i=e.getBoundingClientRect().bottom;s<N&&i>N+80?(u||ht(n),nt()):T()}function vt(){const t=A();v!==null&&(v&&!t?ft():!v&&t&&et()),v=t,T(),ot()}function gt(){const t=document.getElementById("plan-grid");if(!t||t.dataset.pricingBooted==="1")return;t.dataset.pricingBooted="1",w="annual",m="launch",$=!1,O=0,q=0,B=!1,k=!1,T();const e=o("#billing-toggle");e&&d(".billing-btn",e).forEach(r=>{r.addEventListener("click",()=>D(r.dataset.p))});const n=o("#ovr-billing");n&&d(".ovr-bill-btn",n).forEach(r=>{r.addEventListener("click",()=>D(r.dataset.p))});const s=o("#ovr-views-slider"),i=o("#ovr-entries-slider");s&&s.addEventListener("input",M),i&&i.addEventListener("input",M);const a=o("#toggle-estimator");a&&a.addEventListener("click",()=>{const r=o("#ovr-section");r&&r.style.display==="none"?Y():z()});const c=o("#hide-estimator");c&&c.addEventListener("click",z);const l=o("#cmp-table");l&&(l.addEventListener("mouseover",r=>{const p=r.target.closest("[data-plan]");p&&(l.dataset.hoverCol=p.dataset.plan)}),l.addEventListener("mouseleave",()=>{delete l.dataset.hoverCol}),l.addEventListener("click",r=>{if(!A())return;const p=r.target.closest(".cmp-group-row");if(!p)return;const b=p.dataset.group,E=p.classList.toggle("is-open");d(`.cmp-row[data-group="${b}"]`,l).forEach(x=>x.classList.toggle("is-hidden",!E))}));const f=o(".cmp-scroll");f&&f.addEventListener("scroll",()=>{u&&nt()},{passive:!0});const h=o("#scroll-to-ent");h&&h.addEventListener("click",()=>{const r=o("#ent");r&&r.scrollIntoView({behavior:"smooth",block:"start"})}),I("annual"),v=A(),v&&et(),ut(),$=!0,H()}window.__pricingBound||(window.__pricingBound=!0,document.addEventListener("click",at),document.addEventListener("mouseover",lt),document.addEventListener("mouseout",rt),window.addEventListener("scroll",ot,{passive:!0}),window.addEventListener("resize",vt,{passive:!0}),document.addEventListener("astro:page-load",gt),window.posthog&&typeof posthog.onFeatureFlags=="function"&&posthog.onFeatureFlags(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.