/* Nosotros + Servicios */ (function () { const { useRef, useEffect, useState } = React; function useInView(opts) { const ref = useRef(null); const [seen, setSeen] = useState(false); useEffect(() => { const el = ref.current;if (!el) return; const io = new IntersectionObserver(([e]) => {if (e.isIntersecting) {setSeen(true);io.disconnect();}}, opts || { threshold: 0.4 }); io.observe(el); const t = setTimeout(() => setSeen(true), 2400); return () => {clearTimeout(t);io.disconnect();}; }, []); return [ref, seen]; } function CountUp({ to, prefix, suffix }) { const [ref, seen] = useInView(); const [n, setN] = useState(0); useEffect(() => { if (!seen) return; if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) {setN(to);return;} let raf, start; const dur = 1400; const step = (t) => { if (!start) start = t; const p = Math.min((t - start) / dur, 1); const e = 1 - Math.pow(1 - p, 3); setN(Math.round(to * e)); if (p < 1) raf = requestAnimationFrame(step); }; raf = requestAnimationFrame(step); const guard = setTimeout(() => setN(to), dur + 400); // asegura valor final si rAF se pausa return () => {cancelAnimationFrame(raf);clearTimeout(guard);}; }, [seen, to]); return {prefix}{n}{suffix}; } function Nosotros({ data }) { const a = data.about; return ( {a.eyebrow} {a.title} {a.body} {a.mission.title} {a.mission.text} {a.vision.title} {a.vision.text} {data.stats.map((s, i) => {s.label} )} {[...a.certs, ...a.certs, ...a.certs].map((c, i) => {c} )} ); } const SERVICE_ICON = { inmobiliarios: "building", financieros: "coin", industriales: "tools", agropecuarios: "plant" }; function ServiceRow({ s, i }) { const flip = i % 2 === 1; return ( {String(i + 1).padStart(2, "0")} {s.tag} {s.name} {s.items.map((it, j) => {it} )} ); } function Servicios({ data }) { return ( Servicios Cuatro líneas, un mismo estándar de calidad. {e.preventDefault();document.querySelector("#contacto")?.scrollIntoView({ behavior: "smooth" });}}> Solicitar información {data.services.map((s, i) => )} ); } window.Nosotros = Nosotros; window.Servicios = Servicios; })();
{a.body}
{a.mission.text}
{a.vision.text}