1import{j as t}from"./jsx-runtime.u17CrQMm.js";import{r}from"./index.uFOh2Gdi.js";import{u as F,a as z}from"./use-spring.BMJukl4r.js";import{m as p}from"./proxy.DqjQWaU4.js";const Z=2500;function ee(){const[e,n]=r.useState(!1),a=r.useRef(null),s=F(-9999),i=F(-9999),l=z(s,{stiffness:60,damping:20}),f=z(i,{stiffness:60,damping:20});return r.useEffect(()=>{if(!window.matchMedia("(hover: hover) and (pointer: fine)").matches)return;const w=()=>{a.current!=null&&window.clearTimeout(a.current),a.current=window.setTimeout(()=>n(!1),Z)},u=b=>{n(!0),s.set(b.clientX),i.set(b.clientY),w()};return window.addEventListener("mousemove",u,{passive:!0}),()=>{window.removeEventListener("mousemove",u),a.current!=null&&window.clearTimeout(a.current)}},[s,i]),e?t.jsx(p.div,{className:"hero-blob",style:{left:l,top:f,translateX:"-50%",translateY:"-50%"},"aria-hidden":"true"}):null}const S=28,te=1,U=108,se=11,W=.16,q=[.22,1,.36,1];function ne(e){const{tools:n,prefix:a}=e;if(n.length===0)return null;const s=n[Math.floor(Math.random()*n.length)];return{label:`${a}${s.name}`,href:s.href}}function oe(e,n){const[a,s]=r.useState(n);return r.useEffect(()=>{const i=ne(e);i&&s(i)},[e]),a}function re(e,n,a=1200){const[s,i]=r.useState(0);return r.useEffect(()=>{if(!n)return;let l=0;const f=e/(a/16),x=setInterval(()=>{l+=f,l>=e?(i(e),clearInterval(x)):i(Math.floor(l))},16);return()=>clearInterval(x)},[n,e,a]),s}function ae(){return t.jsxs("svg",{className:"stat-lock-icon",width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[t.jsx("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2"}),t.jsx("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]})}function ie({stat:e,trigger:n,index:a}){const s=re(e.value??0,n&&e.display===void 0&&!e.icon),i=e.value??0,l=e.display??`${e.prefix??""}${n?s:i}${e.suffix??""}`;return t.jsxs(p.div,{className:"hero-stat",initial:!1,animate:{opacity:1,y:0},transition:{delay:.9+a*.08,duration:.5,ease:q},children:[e.icon?t.jsx("span",{className:"stat-value stat-value--icon",children:t.jsx(ae,{})}):t.jsx("span",{className:"stat-value",children:l}),t.jsx("span",{className:"stat-label",children:e.label})]})}function le({words:e}){const[n,a]=r.useState(0),[s,i]=r.useState(e[0]??""),[l,f]=r.useState("pausing");r.useEffect(()=>{if(e.length<=1)return;const w=e[n%e.length];let u;return l==="typing"?s.length<w.length?u=setTimeout(()=>i(w.slice(0,s.length+1)),65):u=setTimeout(()=>f("pausing"),100):l==="pausing"?u=setTimeout(()=>f("deleting"),2400):l==="deleting"&&(s.length>0?u=setTimeout(()=>i(s.slice(0,-1)),38):u=setTimeout(()=>{a(b=>b+1),f("typing")},120)),()=>clearTimeout(u)},[s,l,n,e]),r.useEffect(()=>{e.length===1&&i(e[0])},[e]);const x=e.length>1;return t.jsxs("span",{className:"hero-typed","aria-live":"polite",children:[s,x&&t.jsx("span",{className:"hero-cursor","aria-hidden":"true",children:"|"})]})}function ve({h1Line1:e,h1Muted:n,typedWords:a,sub:s,ctaBrowse:i,ctaBrowseHref:l,ctaTryFallback:f,randomCta:x,stats:w}){const u=oe(x,f),[b,G]=r.useState(!1),[J,R]=r.useState(!1),k=r.useRef(null),H=r.useRef(null),L=r.useRef(null);r.useEffect(()=>{const h=new IntersectionObserver(([d])=>{d.isIntersecting&&(G(!0),h.disconnect())},{threshold:.3});return L.current&&h.observe(L.current),()=>h.disconnect()},[]),r.useEffect(()=>{const h=k.current,d=H.current;if(!h||!d)return;const C=h.closest(".hero-tools-wrap")??h;if(!window.matchMedia("(hover: hover) and (pointer: fine)").matches){R(!1);return}R(!0);const g=d.getContext("2d");if(!g)return;const X=()=>document.documentElement.getAttribute("data-theme")==="light"?"rgba(80, 80, 120, 0.19)":"rgba(100, 100, 120, 0.16)";let Y=X(),I=[],j=0,y=0,A=0,E=null,N=null;const D=()=>{const o=C.getBoundingClientRect();j=o.width,y=o.height;const c=Math.min(window.devicePixelRatio||1,2);d.width=Math.max(1,Math.floor(j*c)),d.height=Math.max(1,Math.floor(y*c)),d.style.width=`${j}px`,d.style.height=`${y}px`,g.setTransform(c,0,0,c,0,0),I=[];for(let m=0;m<=y+S;m+=S)for(let v=0;v<=j+S;v+=S)I.push({baseX:v,baseY:m,x:v,y:m})},_=o=>{const c=C.getBoundingClientRect(),m=o.clientX>=c.left&&o.clientX<=c.right,v=o.clientY>=c.top&&o.clientY<=c.bottom;if(!m||!v){E=null,N=null;return}E=o.clientX-c.left,N=o.clientY-c.top},O=()=>{E=null,N=null},Q=()=>{Y=X()},$=new MutationObserver(Q);$.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]});const P=()=>{g.clearRect(0,0,j,y),g.fillStyle=Y;for(const o of I){let c=o.baseX,m=o.baseY;if(E!==null&&N!==null){const v=o.baseX-E,V=o.baseY-N,T=Math.hypot(v,V);if(T>1e-4&&T<U){const B=(1-T/U)*se;c+=v/T*B,m+=V/T*B}}o.x+=(c-o.x)*W,o.y+=(m-o.y)*W,g.beginPath(),g.arc(o.x,o.y,te,0,Math.PI*2),g.fill()}A=window.requestAnimationFrame(P)};return D(),P(),window.addEventListener("resize",D),window.addEventListener("mousemove",_),C.addEventListener("mouseleave",O),()=>{window.cancelAnimationFrame(A),window.removeEventListener("resize",D),window.removeEventListener("mousemove",_),C.removeEventListener("mouseleave",O),$.disconnect(),R(!1)}},[]);const K={hidden:{},visible:{transition:{staggerChildren:.1}}},M={hidden:{opacity:0,y:24},visible:{opacity:1,y:0,transition:{duration:.6,ease:q}}};return t.jsxs("section",{ref:k,className:`hero-react${J?" has-dot-canvas":""}`,children:[t.jsx(ee,{}),t.jsx("canvas",{ref:H,className:"hero-dot-canvas","aria-hidden":"true"}),t.jsx("div",{className:"hero-grid-overlay"}),t.jsx("div",{className:"hero-react-inner",children:t.jsxs(p.div,{className:"hero-content",variants:K,initial:!1,animate:"visible",children:[t.jsxs(p.h1,{className:"hero-h1",variants:M,children:[t.jsx("span",{className:"hero-h1-row",children:e}),t.jsx("span",{className:"hero-h1-row hero-h1-row--typed",children:t.jsx(le,{words:a})}),n?t.jsx("span",{className:"hero-h1-row hero-h1-row--muted",children:t.jsx("span",{className:"hero-h1-muted",children:n})}):null]}),t.jsx(p.p,{className:"hero-p",variants:M,children:s}),t.jsxs(p.div,{className:"hero-ctas",variants:M,children:[t.jsxs(p.a,{href:l,className:"btn-hero-primary",whileHover:{scale:1.03},whileTap:{scale:.97},transition:{duration:.18},children:[i,t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("path",{d:"M5 12h14M12 5l7 7-7 7"})})]}),t.jsx(p.a,{href:u.href,className:"btn-hero-secondary",whileHover:{scale:1.02,borderColor:"rgba(255,255,255,0.3)"},whileTap:{scale:.97},transition:{duration:.18},children:u.label})]}),t.jsx(p.div,{ref:L,className:"hero-stats-react",variants:M,children:w.map((h,d)=>t.jsx(ie,{stat:h,trigger:b,index:d},h.label))})]})})]})}export{ve as default};
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.