// ============================================
// App shell — nav with lang/curr, ordered sections
// ============================================
const { useState: useStateA, useEffect: useEffectA, useRef: useRefA } = React;
const Ia = window.MS_I;
function NavPill({ label, items, value, onSelect, head, align = 'right' }) {
const [open, setOpen] = useStateA(false);
const ref = useRefA(null);
useEffectA(() => {
const onDoc = (e) => { if (ref.current && !ref.current.contains(e.target)) setOpen(false); };
document.addEventListener('mousedown', onDoc);
return () => document.removeEventListener('mousedown', onDoc);
}, []);
return (
{open && (
{head &&
{head}
}
{items.map(it => (
))}
)}
);
}
function Nav() {
const { useMS, useT, LANG_LIST, CURR_LIST } = window.MS_CTX;
const { lang, curr, setLang, setCurr } = useMS();
const t = useT();
const [scrolled, setScrolled] = useStateA(false);
const [overHero, setOverHero] = useStateA(true);
useEffectA(() => {
const onScroll = () => {
setScrolled(window.scrollY > 60);
setOverHero(window.scrollY < window.innerHeight - 80);
};
onScroll();
window.addEventListener('scroll', onScroll, { passive: true });
return () => window.removeEventListener('scroll', onScroll);
}, []);
const langItem = LANG_LIST.find(l => l.id === lang);
return (
);
}
function Footer() {
const { useT, COMPANY } = window.MS_CTX;
const t = useT();
return (
);
}
function AppInner() {
useEffectA(() => {
const observe = () => {
const els = document.querySelectorAll('.reveal:not(.in)');
const io = new IntersectionObserver(entries => {
entries.forEach(e => { if (e.isIntersecting) { e.target.classList.add('in'); io.unobserve(e.target); } });
}, { threshold: 0.12, rootMargin: '0px 0px -60px 0px' });
els.forEach(el => io.observe(el));
return io;
};
let io = observe();
const re = setInterval(() => { io.disconnect(); io = observe(); }, 1200);
return () => { io.disconnect(); clearInterval(re); };
}, []);
return (
<>
{window.MS_QuickBookHost && }
{window.MS_Chatbot && }
{window.MS_Weather && }
{window.MS_CookieBanner && }
>
);
}
function App() {
const { MSProvider } = window.MS_CTX;
return (
);
}
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render();