// ============================================================
// SHARED: icons, small primitives, reveal-on-scroll
// ============================================================
// Resolve asset paths. In the standalone bundle, window.__resources maps
// each path to an inlined blob URL. In dev, falls back to the raw path.
function R(p) {
if (!p) return p;
return (window.__resources && window.__resources[p]) || p;
}
const Icon = {
arrow: () => (
),
whatsapp: () => (
),
calendar: () => (
),
check: () => (
),
star: () => '★',
plus: () => '+'
};
function useReveal() {
React.useEffect(() => {
const els = document.querySelectorAll('.reveal');
const io = new IntersectionObserver((entries) => {
entries.forEach(e => {
if (e.isIntersecting) {
e.target.classList.add('in');
io.unobserve(e.target);
}
});
}, { threshold: 0.08, rootMargin: '0px 0px -40px 0px' });
els.forEach(el => io.observe(el));
return () => io.disconnect();
}, []);
}
function StarRow({ n = 5, size = 14 }) {
return (
{Array.from({ length: 5 }).map((_, i) => (
★
))}
);
}
Object.assign(window, { Icon, useReveal, StarRow, R });