PageSourceSearch

https://hailbytes.com/js/main.min.227142f6a95df8910a26e52a76eb4800a4ac4beb84e7b333e4eae4ae47b0a9b2.js

js hailbytes.com collected 2026-10-03 21:12:03 UTC 39,004 bytes, 124 lines download raw bytes

1const MIXPANEL_TOKEN="b0e310702bee56554dee9a0e3a862edd",MIXPANEL_CUSTOM_LIB_URL=window.__HB_MIXPANEL_URL||"/js/mixpanel-2-latest.min.js";(function(){(function(e,t){if(!t.__SV){n=window;try{var n,i,a,c,l,r=n.location,o=r.hash,s=function(e,t){return(l=e.match(RegExp(t+"=([^&]*)")))?l[1]:null};o&&s(o,"state")&&(a=JSON.parse(decodeURIComponent(s(o,"state"))),"mpeditor"===a.action&&(n.sessionStorage.setItem("_mpcehash",o),history.replaceState(a.desiredHash||"",e.title,r.pathname+r.search)))}catch{}window.mixpanel=t,t._i=[],t.init=function(e,n,s){function a(e,t){var n=t.split(".");2==n.length&&(e=e[n[0]],t=n[1]),e[t]=function(){e.push([t].concat(Array.prototype.slice.call(arguments,0)))}}var o=t;"undefined"!=typeof s?o=t[s]=[]:s="mixpanel",o.people=o.people||[],o.toString=function(e){var t="mixpanel";return"mixpanel"!==s&&(t+="."+s),e||(t+=" (stub)"),t},o.people.toString=function(){return o.toString(1)+".people (stub)"},c="disable time_event track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config reset opt_in_tracking opt_out_tracking has_opted_in_tracking has_opted_out_tracking clear_opt_in_out_tracking people.set people.set_once people.unset people.increment people.append people.union people.track_charge people.clear_charges people.delete_user".split(" ");for(i=0;i<c.length;i++)a(o,c[i]);t._i.push([e,n,s])},t.__SV=1.2,n=e.createElement("script"),n.type="text/javascript",n.async=!0,n.src="undefined"!=typeof MIXPANEL_CUSTOM_LIB_URL?MIXPANEL_CUSTOM_LIB_URL:"https://cdn4.mxpnl.com/libs/mixpanel-2-latest.min.js",s=e.getElementsByTagName("script")[0],s.parentNode.insertBefore(n,s)}})(document,window.mixpanel||[]),mixpanel.init(MIXPANEL_TOKEN,{debug:["localhost","127.0.0.1"].includes(window.location.hostname),track_pageview:!0,persistence:"localStorage"})})();const Analytics={_ga4Event(e,t={}){typeof gtag=="function"&&gtag("event",e,t)},trackPageView(e,t={}){mixpanel.track("Page View",{page_name:e,page_url:window.location.href,page_path:window.location.pathname,referrer:document.referrer,...t})},trackProductInterest(e,t,n={}){mixpanel.track("Product Interest",{product_name:e,action:t,...n})},trackCTAClick(e,t,n){mixpanel.track("CTA Click",{cta_name:e,cta_type:t,destination:n,page:window.location.pathname}),this._ga4Event("cta_click",{cta_name:e,cta_type:t,link_url:n})},trackDeployClick(e,t,n={}){mixpanel.track("Deploy Button Click",{platform:e,product:t,page:window.location.pathname,...n}),this._ga4Event("deploy_click",{platform:e,product:t,source_page:window.location.pathname,...n})},trackDemoRequest(e,t={}){mixpanel.track("Demo Request",{product_name:e,...t}),this._ga4Event("generate_lead",{product_name:e,form_type:"demo_request"})},trackContactForm(e,t={}){mixpanel.track("Contact Form Submit",{form_type:e,...t}),this._ga4Event("generate_lead",{form_type:e})},trackDocView(e,t){mixpanel.track("Documentation View",{doc_section:e,doc_title:t})},trackPricingView(e,t){mixpanel.track("Pricing View",{product_name:e,pricing_tier:t})},trackVideoPlay(e,t){mixpanel.track("Video Play",{video_title:e,video_url:t})},trackExternalLink(e,t){mixpanel.track("External Link Click",{link_name:e,link_url:t,page:window.location.pathname}),this._ga4Event("click",{link_name:e,link_url:t,outbound:!0})},trackScrollDepth(e){mixpanel.track("Scroll Depth",{percentage:e,page:window.location.pathname})},trackFeatureInterest(e,t){mixpanel.track("Feature Interest",{feature_name:e,product_name:t})},_redditPixelId:"a2_gm9ylf7cid88",_getExternalId(){try{let e=localStorage.getItem("hb_external_id");return e||(e=window.crypto&&window.crypto.randomUUID?window.crypto.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2)}`,localStorage.setItem("hb_external_id",e)),e}catch{return 0[0]}},async _sha256Hex(e){if(!e||!window.crypto||!window.crypto.subtle)return 0[0];const t=(new TextEncoder).encode(String(e).trim().toLowerCase()),n=await window.crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(n),e=>e.toString(16).padStart(2,"0")).join("")},async _trackRedditConversion(e,{email:t,...n}={}){if(typeof window.rdt!="function")return;const s=await this._sha256Hex(t),o=this._getExternalId();if(s||o){const e={optOut:!1,useDecimalCurrencyValues:!0};s&&(e.email=s),o&&(e.externalId=o),window.rdt("init",this._redditPixelId,e)}const i=window.crypto&&window.crypto.randomUUID?window.crypto.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2)}`;window.rdt("track",e,{conversionId:i,...n})},trackRedditLead(e,t={}){this._trackRedditConversion("Lead",{email:e,...t})},trackRedditSignUp(e,t={}){this._trackRedditConversion("SignUp",{email:e,...t})},trackRageClick(e,t){const n={tag_name:e.tagName.toLowerCase(),class_list:e.className,id:e.id||"none",text_content:e.textContent.substring(0,50),click_count:t,page:window.location.pathname};mixpanel.track("Rage Click",n),isDevMode()&&console.warn("Rage click detected:",n)}},MARKETPLACE_PRODUCT_IDS={"prodview-yyk6iton3ghu4":"sat","prodview-66d5bswmbtfhs":"asm","gophish-phishing-simulator":"sat",hardened_ubuntu_with_rengine:"asm",gophish_cloud_support_hub:"support"};function getMarketplaceLinkInfo(e){if(!e)return null;let t,n;try{const s=new URL(e,window.location.origin);t=s.hostname,n=s.href}catch{return null}let s;if(t==="aws.amazon.com"&&n.includes("/marketplace/"))s="aws";else if(t==="marketplace.microsoft.com"||t==="azuremarketplace.microsoft.com")s="azure";else return null;let o="unknown";
1for(const e in MARKETPLACE_PRODUCT_IDS)if(n.includes(e)){o=MARKETPLACE_PRODUCT_IDS[e];break}return{platform:s,product:o}}document.addEventListener("DOMContentLoaded",function(){const t=document.title.replace(" | HailBytes","");Analytics.trackPageView(t),document.querySelectorAll("[data-track-cta]").forEach(e=>{e.addEventListener("click",function(){const t=this.dataset.trackCta,n=this.dataset.ctaType||"button",s=this.href||this.dataset.destination||"unknown";Analytics.trackCTAClick(t,n,s)})}),document.querySelectorAll("[data-track-deploy]").forEach(e=>{e.addEventListener("click",function(){const t=this.dataset.platform||"unknown",n=this.dataset.product||"unknown";Analytics.trackDeployClick(t,n)})}),document.querySelectorAll("a[href]").forEach(e=>{if(e.hasAttribute("data-track-deploy"))return;const t=getMarketplaceLinkInfo(e.href);if(!t)return;e.addEventListener("click",function(){Analytics.trackDeployClick(t.platform,t.product,{link_url:e.href,link_text:(e.textContent||"").trim().slice(0,80)})})}),document.querySelectorAll("[data-track-product]").forEach(e=>{e.addEventListener("click",function(){const t=this.dataset.trackProduct,n=this.dataset.productAction||"click";Analytics.trackProductInterest(t,n)})}),document.querySelectorAll('a[href^="http"]').forEach(e=>{if(e.hostname.includes(window.location.hostname))return;if(e.hasAttribute("data-track-deploy")||getMarketplaceLinkInfo(e.href))return;e.addEventListener("click",function(){const t=this.textContent.trim()||this.title||"External Link",n=this.href;Analytics.trackExternalLink(t,n)})});let e={25:!1,50:!1,75:!1,100:!1};window.addEventListener("scroll",throttle(function(){const t=Math.round(window.scrollY/(document.documentElement.scrollHeight-window.innerHeight)*100);Object.keys(e).forEach(n=>{t>=parseInt(n)&&!e[n]&&(e[n]=!0,Analytics.trackScrollDepth(parseInt(n)))})},500)),initMobileNav(),initHeaderDropdowns(),initSmoothScroll(),initFormHandlers(),initPricingCalculator(),initROICalculator(),initCookieConsent(),initSearch(),initRageClickTracking(),initYouTubeFacades(),initScrollProgress(),initAnimatedCounters(),initScrollReveal(),initStaggeredGrids(),initInlineValidation(),document.querySelectorAll("[data-phone-number]").forEach(function(e){e.addEventListener("click",function(e){/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)&&(e.preventDefault(),window.location.href=this.dataset.phoneNumber)})}),initParallax(),initMagneticButtons(),initLazyLoading(),initExpiringNotes(),initScrollableRegions()});function initExpiringNotes(){const e=Date.now();document.querySelectorAll("[data-expires]").forEach(function(t){const n=t.dataset.expires;if(!n)return;const s=new Date(n+"T23:59:59");!isNaN(s)&&e>s.getTime()&&t.remove()})}const SCROLLABLE_CANDIDATES='pre, .diagram-container, [style*="overflow"]';function initScrollableRegions(){const e=Array.from(document.querySelectorAll(SCROLLABLE_CANDIDATES));if(e.length===0)return;function s(e){const t=getComputedStyle(e),n=function(e){return e==="auto"||e==="scroll"};return n(t.overflowX)&&e.scrollWidth>e.clientWidth||n(t.overflowY)&&e.scrollHeight>e.clientHeight}function t(){e.forEach(function(e){if(e.dataset.scrollTabstop!=="true"&&e.hasAttribute("tabindex"))return;if(e.querySelector("a[href], button, input, select, textarea, [tabindex]"))return;s(e)?(e.setAttribute("tabindex","0"),e.dataset.scrollTabstop="true"):e.dataset.scrollTabstop==="true"&&(e.removeAttribute("tabindex"),delete e.dataset.scrollTabstop)})}t();let n;window.addEventListener("resize",function(){clearTimeout(n),n=setTimeout(t,150)})}function initMobileNav(){const t=document.querySelector(".nav-toggle"),e=document.querySelector("#nav-menu");if(!t||!e)return;function s(){return Array.from(e.querySelectorAll('a[href], button:not([disabled]), [tabindex]:not([tabindex="-1"])'))}function o(){e.classList.add("active"),t.setAttribute("aria-expanded","true"),t.setAttribute("aria-label","Close navigation menu");const n=s()[0];n&&n.focus()}function n(n){e.classList.remove("active"),t.setAttribute("aria-expanded","false"),t.setAttribute("aria-label","Open navigation menu"),n&&t.focu
1s()}t.addEventListener("click",function(){e.classList.contains("active")?n(!0):o()}),document.addEventListener("keydown",function(t){t.key==="Escape"&&e.classList.contains("active")&&n(!0)}),e.addEventListener("keydown",function(e){if(e.key!=="Tab")return;const t=s();if(t.length===0)return;const n=t[0],o=t[t.length-1];e.shiftKey?document.activeElement===n&&(e.preventDefault(),o.focus()):document.activeElement===o&&(e.preventDefault(),n.focus())}),document.addEventListener("click",function(s){!t.contains(s.target)&&!e.contains(s.target)&&n(!1)}),e.querySelectorAll("a.nav-link, .nav-dropdown-link, .megamenu-item").forEach(e=>{e.addEventListener("click",function(){n(!1)})})}function initHeaderDropdowns(){const e=document.querySelectorAll(".nav-has-dropdown");if(e.length===0)return;const t=()=>window.matchMedia("(max-width: 768px)").matches;function n(t){e.forEach(e=>{if(e===t)return;e.classList.remove("open");const n=e.querySelector(".nav-dropdown-toggle");n&&n.setAttribute("aria-expanded","false")})}e.forEach(e=>{const s=e.querySelector(".nav-dropdown-toggle");if(!s)return;s.addEventListener("click",function(t){t.preventDefault(),t.stopPropagation();const o=e.classList.contains("open");n(e),o?(e.classList.remove("open"),s.setAttribute("aria-expanded","false")):(e.classList.add("open"),s.setAttribute("aria-expanded","true"))}),e.addEventListener("mouseenter",function(){if(t())return;n(e),e.classList.add("open"),s.setAttribute("aria-expanded","true")}),e.addEventListener("mouseleave",function(){if(t())return;e.classList.remove("open"),s.setAttribute("aria-expanded","false")}),e.addEventListener("keydown",function(t){t.key==="Escape"&&e.classList.contains("open")&&(e.classList.remove("open"),s.setAttribute("aria-expanded","false"),s.focus())})}),document.addEventListener("click",function(t){e.forEach(e=>{if(!e.contains(t.target)&&e.classList.contains("open")){e.classList.remove("open");const t=e.querySelector(".nav-dropdown-toggle");t&&t.setAttribute("aria-expanded","false")}})})}function initSmoothScroll(){document.querySelectorAll('a[href^="#"]').forEach(e=>{e.addEventListener("click",function(e){const t=this.getAttribute("href");if(t==="#")return;const n=document.querySelector(t);n&&(e.preventDefault(),n.scrollIntoView({behavior:"smooth",block:"start"}),history.pushState(null,"",t))})})}const FORM_API_URL="https://hailbytes-forms-handler.hailbytes.workers.dev/",EMAIL_REGEX=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;function isValidEmail(e){return typeof e=="string"&&e.length<=254&&EMAIL_REGEX.test(e)}function isDevMode(){return window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"}async function submitForm(e,t){const s=t.getFormData(e);if(!s.email||!isValidEmail(s.email)){showNotification("Please enter a valid email address","error");return}const n=e.querySelector('button[type="submit"]'),o=n?.textContent;n&&(n.textContent=t.loadingText);try{const i=await fetch(FORM_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!i.ok)throw new Error(`Server error: ${i.status} ${i.statusText}`);const a=await i.json();a.success?(showNotification(t.successMessage,"success"),n&&addButtonSuccessState(n,o),e.reset(),t.onSuccess&&t.onSuccess(s)):(showNotification(a.error||t.errorMessage,"error"),n&&(n.textContent=o))}catch(e){isDevMode()&&console.error("Form submission error:",e),showNotification(t.errorMessage,"error"),n&&(n.textContent=o)}}function initFormHandlers(){document.querySelectorAll("#newsletter-form, #footer-newsletter-form").forEach(function(e){e.addEventListener("submit",function(e){e.preventDefault(),submitForm(this,{getFormData:e=>({email:e.querySelector('[type="email"]')?.value,formType:"newsletter"}),loadingText:"Subscribing...",successMessage:"Thank you for subscribing to our newsletter!",errorMessage:"Subscription failed. Please try again.",onSuccess:e=>{Analytics.trackContactForm("newsletter_subscribe",{email:e.email}),Analytics.trackRedditSignUp(e.email)}})})});const e=document.querySelector("#contact-form");if(e){const n=e.querySelector('[name="inquiry-type"]'),s=e.querySelector("#partner-fields");function t(){if(!n||!s)return;const e=n.value;s.hidden=e!=="partner"&&e!=="reseller"}if(n&&s){const s=new URLSearchParams(window.location.search),e=s.get("inquiry");e&&Array.from(n.options).some(t=>t.value===e)&&(n.value=e),t(),n.addEventListener("change",t)}e.addEventListener("submit",function(e){e.preventDefault();const t=this.querySelector('[name="inquiry-type"]')?.value,n=t==="partner"||t==="reseller";submitForm(this,{getFormData:e=>({name:e.querySelector('[name="name"]')?.value,email:e.querySelector('[name="email"]')?.value,company:e.querySelector('[name="company"]')?.value,phone:e.querySelector('[name="phone"]')?.value,message:e.querySelector('[name="message"]')?.value,inquiryType:t,awsAccountId:n?e.querySelector('[name="aws-account-id"]')?.value:0[0],azureTenantId:n?e.querySelector('[name="azure-tenant-id"]')?.value:0[0],formType:"contact"}
1),loadingText:"Sending...",successMessage:"Thank you! We'll be in touch soon.",errorMessage:"Failed to send message. Please try again.",onSuccess:e=>{Analytics.trackContactForm("general_contact",e),Analytics.trackRedditLead(e.email)}})})}document.querySelectorAll(".demo-form, #demo-form").forEach(function(e){e.addEventListener("submit",function(e){e.preventDefault(),submitForm(this,{getFormData:e=>({name:e.querySelector('[name="name"]')?.value,email:e.querySelector('[name="email"]')?.value,company:e.querySelector('[name="company"]')?.value,product:e.querySelector('[name="product"]')?.value,useCase:e.querySelector('[name="use_case"]')?.value,formType:"demo"}),loadingText:"Requesting...",successMessage:"Demo request received! We'll contact you within 24 hours.",errorMessage:"Failed to submit request. Please try again.",onSuccess:e=>{Analytics.trackDemoRequest(e.product,e),Analytics.trackRedditLead(e.email,{product:e.product})}})})}),document.querySelectorAll("[data-demo-modal-open]").forEach(function(e){e.addEventListener("click",function(){const n=this.getAttribute("data-demo-modal-open"),e=document.getElementById(n);if(!e)return;e.hidden=!1,e.classList.add("is-open"),document.body.style.overflow="hidden";const t=e.querySelector("input, button");t&&t.focus()})});function n(e){e.hidden=!0,e.classList.remove("is-open"),document.body.style.overflow=""}document.querySelectorAll("[data-demo-modal-close]").forEach(function(e){e.addEventListener("click",function(){const e=this.closest(".demo-modal");e&&n(e)})}),document.addEventListener("keydown",function(e){if(e.key!=="Escape")return;document.querySelectorAll(".demo-modal.is-open").forEach(n)});const s=document.querySelector("#case-study-form");s&&s.addEventListener("submit",function(e){e.preventDefault(),submitForm(this,{getFormData:e=>({name:e.querySelector('[name="name"]')?.value,email:e.querySelector('[name="email"]')?.value,company:e.querySelector('[name="company"]')?.value,role:e.querySelector('[name="role"]')?.value,product:e.querySelector('[name="product"]')?.value,companySize:e.querySelector('[name="company-size"]')?.value,currentTools:e.querySelector('[name="current-tools"]')?.value,painPoints:e.querySelector('[name="pain-points"]')?.value,useCase:e.querySelector('[name="use-case"]')?.value,timeline:e.querySelector('[name="timeline"]')?.value,feedbackConsent:e.querySelector('[name="feedback-consent"]')?.checked,publicConsent:e.querySelector('[name="public-consent"]')?.value,phoneConsent:e.querySelector('[name="phone-consent"]')?.checked,formType:"caseStudy"}),loadingText:"Submitting...",successMessage:"Application submitted! We'll review and contact you within 48 hours.",errorMessage:"Failed to submit application. Please try again.",onSuccess:e=>{Analytics.trackContactForm("case_study_application",e),Analytics.trackRedditLead(e.email,{product:e.product})}})}),document.querySelectorAll(".guide-signup-form").forEach(function(e){e.addEventListener("submit",function(e){e.preventDefault();var n=this.dataset.guide,t=this.dataset.redirect;submitForm(this,{getFormData:e=>({email:e.querySelector('[type="email"]')?.value,guide:n,formType:"guide"}),loadingText:t?"Unlocking…":"Signing up...",successMessage:t?"Success! Opening your resource…":"Check your inbox! Your getting started guide is on the way.",errorMessage:"Signup failed. Please try again.",onSuccess:e=>{Analytics.trackContactForm("guide_signup",{guide:n,email:e.email}),Analytics.trackRedditSignUp(e.email,{guide:n}),t&&window.location.assign(t)}})})})}function throttle(e,t){let n;return function(...s){n||(e.apply(this,s),n=!0,setTimeout(()=>n=!1,t))}}function debounce(e,t){let n;return function(...s){clearTimeout(n),n=setTimeout(()=>e.apply(this,s),t)}}function showNotification(e,t="info"){NotificationManager.show(e,t)}const style=document.createElement("style");style.textContent=`
2  @keyframes slideIn {
3    from {
4      transform: translateX(400px);
5      opacity: 0;
6    }
7    to {
8      transform: translateX(0);
9      opacity: 1;
10    }
11  }
12  @keyframes slideOut {
13    from {
14      transform: translateX(0);
15      opacity: 1;
16    }
17    to {
18      transform: translateX(400px);
19      opacity: 0;
20    }
21  }
22`,document.head.appendChild(style);function initPricingCalculator(){const e=document.querySelector("#pricing-calculator");if(!e)return;const t=e.querySelector("#vcpu-count"),m=e.querySelector("#team-size"),r=e.querySelector("#cloud-provider"),o=e.querySelector("#product-type");if(!t)return;const i=e.querySelector("#node-count"),l=.24,c=730,s={sat:[2,4,8,16,32,48,64],asm:[4,8,16,32,48,64]};function a(e){return s[e]||s.sat}function d(e,t){const s=a(t),n=parseInt(e,10);return Number.isFinite(n)?s.reduce((e,t)=>
22Math.abs(t-n)<Math.abs(e-n)?t:e):s[0]}function u(e,t){return e*t}function h(e){return Math.round(l*e*c/10)*10}function n(){const r=o?.value==="asm"?"asm":"sat",f=a(r);t?.options&&Array.from(t.options).forEach(e=>{const t=!f.includes(parseInt(e.value,10));e.hidden=t,e.disabled=t});const n=d(t.value,r);String(n)!==t.value&&(t.value=String(n));const c=parseInt(i?.value||"1",10)===2?2:1,s=u(n,c),l=h(s);e.querySelector("#vcpu-display").textContent=n,e.querySelector("#vcpu-cost").textContent=l.toLocaleString("en-US"),e.querySelector("#monthly-total").textContent=l.toLocaleString("en-US");const m=e.querySelector("#metered-display");m&&(m.textContent=c===2?`${s} metered vCores (2 × ${n})`:`${s} metered vCores`)}t?.addEventListener("input",n),i?.addEventListener("change",n),m?.addEventListener("change",n),r?.addEventListener("change",n),o?.addEventListener("change",n),n()}function initROICalculator(){const e=document.querySelector("#roi-calculator");if(!e)return;const n=e.querySelector("#current-cost"),s=e.querySelector("#employee-count"),t=e.querySelector("#calculate-roi");if(!t)return;t.addEventListener("click",function(){const c=parseFloat(n?.value||5e4),l=parseInt(s?.value||500),a=16800,r=280*12,t=a+r,o=e.querySelector("#roi-results"),i=Math.round(c-t);if(!(i>0)){o.innerHTML=`
23        <div class="card" style="margin-top: var(--spacing-lg);">
24          <p style="color: var(--color-text-secondary);">
25            A HailBytes deployment at the 8 vCPU entry size runs about
26            <strong style="color: var(--color-text-primary);">$${t.toLocaleString()}/year</strong>
27            : $${a.toLocaleString()} in marketplace software fees plus roughly
28            $${r.toLocaleString()} of cloud infrastructure billed to your own AWS or Azure
29            account. That is more than the budget you entered, so this calculator has no savings to show.
30            A one-, two- or three-year commitment takes 30&ndash;40% off the software fee through a private
31            offer. <a href="/contact/" style="color: var(--color-accent-blue);">talk to us about sizing</a>.
32          </p>
33        </div>
34      `,o.style.display="block",Analytics.trackPricingView("ROI Calculator","calculated");return}const d=(i/c*100).toFixed(1),u=(t/l).toFixed(2),h=(t/(i/12)).toFixed(1);o.innerHTML=`
35      <div class="grid grid-2" style="gap: var(--spacing-lg); margin-top: var(--spacing-lg);">
36        <div class="card" style="text-align: center;">
37          <h4 style="color: var(--color-accent-green); font-size: var(--font-size-3xl); margin-bottom: var(--spacing-sm);">
38            $${i.toLocaleString()}
39          </h4>
40          <p style="color: var(--color-text-secondary);">Annual Savings (${d}%)</p>
41        </div>
42        <div class="card" style="text-align: center;">
43          <h4 style="color: var(--color-accent-blue); font-size: var(--font-size-3xl); margin-bottom: var(--spacing-sm);">
44            ${h} months
45          </h4>
46          <p style="color: var(--color-text-secondary);">Return on Investment</p>
47        </div>
48        <div class="card" style="text-align: center;">
49          <h4 style="color: var(--color-accent-green); font-size: var(--font-size-3xl); margin-bottom: var(--spacing-sm);">
50            $${u}
51          </h4>
52          <p style="color: var(--color-text-secondary);">All-In Cost Per Employee</p>
53        </div>
54        <div class="card" style="text-align: center;">
55          <h4 style="color: var(--color-accent-blue); font-size: var(--font-size-3xl); margin-bottom: var(--spacing-sm);">
56            $${t.toLocaleString()}
57          </h4>
58          <p style="color: var(--color-text-secondary);">
59            HailBytes All-In / Year<br>
60            <small>$${a.toLocaleString()} software + $${r.toLocaleString()} cloud infra</small>
61          </p>
62        </div>
63      </div>
64      <p style="color: var(--color-text-tertiary); font-size: var(--font-size-sm); margin-top: var(--spacing-md);">
65        All-in basis: every figure above compares the budget you entered against
66        $${t.toLocaleString()}/year: the 8 vCPU marketplace software fee plus the cloud
67        infrastructure your own AWS or Azure account is billed for at roughly $35/vCPU/month.
68        A one-, two- or three-year commitment takes 30&ndash;40% off the software fee through a
69        private offer, which this estimate does not assume.
70      </p>
71    `,o.style.display="block",Analytics.trackPricingView("ROI Calculator","calculated")})}function initCookieConsent(){const t="hailbytes_cookie_consent",i=localStorage.getItem(t);if(i)return;const n=document.activeElement,e=document.createElement("div");e.id="cookie-consent",e.setAttribute("role","alertdialog"),e.setAttribute("aria-modal","true"),e.setAttribute("aria-label","Cookie consent"),e.setAttribute("aria-describedby","cookie-consent-message"),e.setAttribute("tabindex","-1"),e.innerHTML=`
72    <div style="position: fixed; bottom: 0; left: 0; right: 0; background: var(--color-bg-secondary); border-top: 1px solid var(--color-border); padding: var(--spacing-lg); z-index: var(--z-modal); box-shadow: var(--shadow-xl);">
73      <div class="container" style="display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--spacing-md);">
74        <div style="flex: 1; min-width: 300px;">
75          <p style="color: var(--color-text-primary); margin-bottom: var(--spacing-xs);">
76            <strong>We value your privacy</strong>
77          </p>
78          <p id="cookie-consent-message" style="color: var(--color-text-secondary); font-size: var(--font-size-sm);">
79            We use cookies and analytics to improve your experience and understand how you use our site.
80            <a href="/privacy/" style="color: var(--color-accent-blue);">Learn more</a>
81          </p>
82        </div>
83        <div style="display: flex; gap: var(--spacing-sm);">
84          <button id="cookie-accept" class="btn btn-primary">Accept</button>
85          <button id="cookie-decline" class="btn btn-outline">Decline</button>
86        </div>
87      </div>
88    </div>
89  `,document.body.appendChild(e);function s(){e.removeEventListener("keydown",o),e.remove(),n&&typeof n.focus=="function"&&n.focus()}function o(t){if(t.key!=="Tab")return;const n=e.querySelectorAll("a[href], button");if(!n.length)return;const s=n[0],o=n[n.length-1];t.shiftKey&&document.activeElement===s?(t.preventDefault(),o.focus()):!t.shiftKey&&document.activeElement===o&&(t.preventDefault(),s.focus())}e.addEventListener("keydown",o),document.getElementById("cookie-accept").addEventListener("click",function(){localStorage.setItem(t,"accepted"),s()}),document.getElementById("cookie-decline").addEventListener("click",function(){localStorage.setItem(t,"declined"),s()}),e.focus()}function initSearch(){const e=document.querySelector("#search-toggle"),t=document.querySelector("#search-modal");if(!e)return;e.addEventListener("click",function(e){e.preventDefault(),openSearchModal()}),document.addEventListener("keydown",function(e){(e.ctrlKey||e.metaKey)&&e.key==="k"&&(e.preventDefault(),openSearchModal())})}function openSearchModal(){let e=document.querySelector("#search-modal");if(!e){const s=document.activeElement;e=document.createElement("div"),e.id="search-modal",e.setAttribute("role","dialog"),e.setAttribute("aria-modal","true"),e.setAttribute("aria-label","Search"),e.innerHTML=`
90      <div style="position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.8); z-index: var(--z-modal); display: flex; align-items: flex-start; justify-content: center; padding-top: 10vh;" id="search-overlay">
91        <div style="background: var(--color-bg-secondary); border-radius: var(--radius-lg); max-width: 600px; width: 90%; box-shadow: var(--shadow-xl); border: 1px solid var(--color-border);">
92          <div style="padding: var(--spacing-lg); border-bottom: 1px solid var(--color-border);">
93            <label for="search-input" class="visually-hidden">Search documentation, blog, and resources</label>
94            <input type="text" id="search-input" placeholder="Search documentation, blog, and resources..."
95              style="width: 100%; background: var(--color-bg-tertiary); border: 1px solid var(--color-border); padding: var(--spacing-md); border-radius: var(--radius-md); color: var(--color-text-primary); font-size: var(--font-size-base);"
96              autofocus>
97          </div>
98          <div id="search-results" role="region" aria-live="polite" aria-label="Search results" style="max-height: 400px; overflow-y: auto; padding: var(--spacing-md);">
99            <p style="color: var(--color-text-tertiary); text-align: center; padding: var(--spacing-xl);">
100              Start typing to search...
101            </p>
102          </div>
103        </div>
104      </div>
105    `,document.body.appendChild(e);function t(){document.removeEventListener("keydown",n),e.remove(),s&&typeof s.focus=="function"&&s.focus()}function n(n){if(n.key==="Escape"){t();return}if(n.key==="Tab"){const t=e.querySelectorAll('a[href], button, input, [tabindex]:not([tabindex="-1"])');if(!t.length)return;const s=t[0],o=t[t.length-1];n.shiftKey&&document.activeElement===s?(n.preventDefault(),o.focus()):!n.shiftKey&&document.activeElement===o&&(n.preventDefault(),s.focus())}}document.getElementById("search-overlay").addEventListener("click",function(e){e.target.id==="search-overlay"&&t()}),document.addEventListener("keydown",n),document.getElementById("search-input").focus();const i=document.getElementById("search-input"),o=document.getElementById("search-results"),a=[{title:"HailBytes SAT",url:"/sat/",category:"Product"},{title:"HailBytes ASM",url:"/asm/",category:"Product"},{title:"API Reference",url:"pages/api.html",category:"Documentation"},{title:"Documentation",url:"pages/documentation.html",category:"Documentation"},{title:"Pricing",url:"pages/marketplace.html#pricing",category:"Resources"},{title:"Deploy on AWS",url:"pages/marketplace.html#aws-deploy",category:"Deployment"},{title:"Deploy on Azure",url:"pages/marketplace.html#azure-deploy",category:"Deployment"},{title:"Blog",url:"pages/blog.html",category:"Resources"},{title:"Contact Us",url:"pages/contact.html",category:"Company"},{title:"About",url:"pages/about.html",category:"Company"}];i.addEventListener("input",debounce(function(e){const t=e.target.value.toLowerCase().trim();if(t.length<2){o.innerHTML='<p style="color: var(--color-text-tertiary); text-align: center; padding: var(--spacing-xl);">Start typing to search...</p>';return}const n=a.filter(e=>e.title.toLowerCase().includes(t)||e.category.toLowerCase().includes(t));if(n.length===0){o.innerHTML='<p style="color: var(--color-text-tertiary); text-align: center; padding: var(--spacing-xl);">No results found</p>';return}o.innerHTML=n.map(e=>`
106        <a href="${e.url}" style="display: block; padding: var(--spacing-md); border-radius: var(--radius-md); margin-bottom: var(--spacing-xs); text-decoration: none; transition: background var(--transition-fast);"
107          onmouseover="this.style.background='var(--color-bg-hover)'"
108          onmouseout="this.style.background='transparent'">
109          <div style="display: flex; align-items: center; justify-content: space-between;">
110            <div>
111              <div style="color: var(--color-text-primary); font-weight: 600; margin-bottom: var(--spacing-xs);">
112                ${e.title}
113              </div>
114              <div style="color: var(--color-text-tertiary); font-size: var(--font-size-sm);">
115                ${e.category}
116              </div>
117            </div>
118            <div style="color: var(--color-accent-blue);">→</div>
119          </div>
120        </a>
121      `).join("")},300))}}function initRageClickTracking(){const e=new Map,t=3,n=1e3;function s(e){let t=e;for(;t&&t!==document.body;){const n=t.tagName.toLowerCase();if(["a","button","input","select","textarea"].includes(n))return!0;if(t.hasAttribute("onclick")||t.hasAttribute("href")||t.hasAttribute("data-track-cta")||t.hasAttribute("data-track-deploy")||t.hasAttribute("data-track-product")||t.style.cursor==="pointer"||t.classList.contains("btn"))return!0;const e=t.getAttribute("role");if(e&&["button","link","tab","menuitem"].includes(e))return!0;t=t.parentElement}return!1}document.addEventListener("click",function(i){const r=i.target;if(s(r))return;const c=o(r);let a=e.get(c);const l=Date.now();a||(a={element:r,clicks:[],rageReported:!1},e.set(c,a)),a.clicks.push(l),a.clicks=a.clicks.filter(e=>l-e<n),a.clicks.length>=t&&!a.rageReported&&(Analytics.trackRageClick(r,a.clicks.length),a.rageReported=!0,isDevMode()&&(r.style.outline="2px dashed red",setTimeout(()=>{r.style.outline=""},2e3))),setTimeout(()=>{(a.clicks.length===0||l-a.clicks[a.clicks.length-1]>5e3)&&e.delete(c)},5e3)});function o(e){const n=[];let t=e;for(;t&&t!==document.body;){let e=t.tagName.toLowerCase();if(t.id){e+="#"+t.id,n.unshift(e);break}t.className&&(e+="."+t.className.split(" ").join("."));const s=t.parentElement?Array.from(t.parentElement.children).filter(e=>e.tagName===t.tagName&&e.className===t.className):[];if(s.length>1){const n=s.indexOf(t);e+=":nth-child("+(n+1)+")"}n.unshift(e),t=t.parentElement}return n.join(" > ")}}function initYouTubeFacades(){function e(e){if(e.dataset.activated==="1")return;e.dataset.activated="1";
121const s=e.dataset.id;if(!s)return;const n=parseInt(e.dataset.start,10)||0,o=e.dataset.title||"HailBytes demo video",i=new URLSearchParams({autoplay:"1",rel:"0",modestbranding:"1",playsinline:"1"});n>0&&i.set("start",String(n));const t=document.createElement("iframe");t.src=`https://www.youtube-nocookie.com/embed/${encodeURIComponent(s)}?${i.toString()}`,t.title=o,t.allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",t.allowFullscreen=!0,t.loading="eager",t.width=1280,t.height=720,e.replaceWith(t);try{Analytics.trackVideoPlay(o,`https://youtu.be/${s}${n>0?`?t=${n}`:""}`)}catch{}}document.addEventListener("click",function(t){const n=t.target.closest&&t.target.closest(".yt-lite");n&&e(n)}),document.addEventListener("keydown",function(t){if(t.key!=="Enter"&&t.key!==" ")return;const n=t.target.closest&&t.target.closest(".yt-lite");n&&(t.preventDefault(),e(n))})}function initScrollProgress(){const e=document.createElement("div");e.className="scroll-progress",document.body.appendChild(e);const t=throttle(function(){const t=window.innerHeight,n=document.documentElement.scrollHeight,s=window.scrollY||document.documentElement.scrollTop,o=s/(n-t)*100;e.style.width=Math.min(o,100)+"%"},50);window.addEventListener("scroll",t),t()}function initAnimatedCounters(){const t=document.querySelectorAll(".stat-value"),n=e=>{const a=e.textContent,n=a.match(/^([\d,]+(?:\.\d+)?)(.*?)$/);if(!n)return;const r=n[1].replace(/,/g,""),o=n[2],t=parseFloat(r);if(isNaN(t))return;const c=2e3,l=t/(c/16);let s=0;const i=()=>{if(s+=l,s<t){const t=Math.floor(s).toLocaleString();e.textContent=t+o,requestAnimationFrame(i)}else{const n=t%1===0?t.toLocaleString():t.toString();e.textContent=n+o}};i()},e=new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&!t.target.dataset.animated&&(t.target.dataset.animated="true",n(t.target),e.unobserve(t.target))})},{threshold:.5});t.forEach(t=>e.observe(t))}const NotificationManager={container:null,notifications:[],init(){this.container||(this.container=document.createElement("div"),this.container.className="notification-container",document.body.appendChild(this.container))},show(e,t="info",n=4e3){this.init();const s=document.createElement("div");s.className=`notification notification-${t}`;const o=this.getIcon(t);return s.innerHTML=`
122      <span>${o}</span>
123      <span>${e}</span>
124    `,this.container.appendChild(s),this.notifications.push(s),n>0&&setTimeout(()=>{this.remove(s)},n),s},remove(e){e.classList.add("notification-exit"),setTimeout(()=>{e.parentNode&&e.parentNode.removeChild(e),this.notifications=this.notifications.filter(t=>t!==e)},300)},getIcon(e){const t={success:"✓",error:"✕",warning:"⚠",info:"ℹ"};return t[e]||t.info}};function addButtonSuccessState(e,t){const n=e.textContent;e.classList.add("btn-success-state"),e.textContent="",setTimeout(()=>{e.classList.remove("btn-success-state"),e.textContent=t||n},2e3)}function initScrollReveal(){const t=document.querySelectorAll(".reveal"),e=new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&(t.target.classList.add("revealed"),e.unobserve(t.target))})},{threshold:0,rootMargin:"0px 0px -50px 0px"});t.forEach(t=>e.observe(t))}function initStaggeredGrids(){const t=document.querySelectorAll(".grid-stagger"),e=new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&(t.target.classList.add("revealed"),e.unobserve(t.target))})},{threshold:0,rootMargin:"0px 0px -50px 0px"});t.forEach(t=>e.observe(t))}function initInlineValidation(){const e=document.querySelectorAll("form");e.forEach(e=>{const t=e.querySelectorAll(".form-input, .form-textarea");t.forEach(e=>{if(!e.nextElementSibling||!e.nextElementSibling.classList.contains("form-error")){const t=document.createElement("div");t.className="form-error",e.parentNode.insertBefore(t,e.nextSibling)}const t=e.nextElementSibling;t.id||(t.id=`error-${e.id||e.name||Math.random().toString(36).slice(2)}`,t.setAttribute("aria-live","polite")),e.getAttribute("aria-describedby")||e.setAttribute("aria-describedby",t.id),e.addEventListener("blur",()=>{validateInput(e,t)}),e.addEventListener("input",()=>
124{(e.classList.contains("invalid")||e.classList.contains("valid"))&&validateInput(e,t)})})})}function validateInput(e,t){const s=e.value.trim(),i=e.type,a=e.name;let n=!0,o="";if(e.hasAttribute("required")&&!s)n=!1,o="This field is required";else if(i==="email"&&s){const e=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;e.test(s)||(n=!1,o="Please enter a valid email address")}else if(e.hasAttribute("minlength")){const t=parseInt(e.getAttribute("minlength"));s.length<t&&(n=!1,o=`Minimum ${t} characters required`)}return n?(e.classList.remove("invalid"),e.classList.add("valid"),e.setAttribute("aria-invalid","false"),t.textContent=""):(e.classList.remove("valid"),e.classList.add("invalid"),e.setAttribute("aria-invalid","true"),t.textContent=o),n}function initParallax(){const e=document.querySelectorAll(".parallax-layer");if(e.length===0)return;const t=throttle(()=>{const t=window.scrollY;e.forEach((e,n)=>{const s=e.dataset.parallaxSpeed||.3+n*.1,o=-(t*s);e.style.transform=`translate3d(0, ${o}px, 0)`})},16);window.addEventListener("scroll",t),t()}function initMagneticButtons(){const e=document.querySelectorAll(".btn-magnetic");e.forEach(e=>{e.addEventListener("mousemove",t=>{const n=e.getBoundingClientRect(),s=t.clientX-n.left-n.width/2,o=t.clientY-n.top-n.height/2,a=(s*s+o*o)**.5,i=100;if(a<i){const t=(i-a)/i,n=s*t*.3,r=o*t*.3;e.style.transform=`translate(${n}px, ${r}px)`}}),e.addEventListener("mouseleave",()=>{e.style.transform="translate(0, 0)"})})}function initLazyLoading(){const e=document.querySelectorAll(".lazy-image img");if("IntersectionObserver"in window){const t=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting){const n=e.target,s=n.closest(".lazy-image");s.classList.add("loading");const o=()=>{n.src=n.dataset.src||n.src,n.srcset=n.dataset.srcset||n.srcset,n.onload=()=>{s.classList.remove("loading"),s.classList.add("loaded")}};setTimeout(o,100),t.unobserve(n)}})},{rootMargin:"50px 0px",threshold:.01});e.forEach(e=>t.observe(e))}else e.forEach(e=>{const t=e.closest(".lazy-image");t&&t.classList.add("loaded"),e.src=e.dataset.src||e.src})}window.HailBytes={Analytics,showNotification,NotificationManager,addButtonSuccessState,throttle,debounce,initPricingCalculator,initROICalculator}

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.