function esc(str) { const d = document.createElement('div'); d.textContent = String(str ?? ''); return d.innerHTML; } const EMPTY_ICON_SVG = ` `; export function renderEmptyState(options = {}) { const message = String(options.message || '').trim(); if (!message) { return ''; } const hint = String(options.hint || '').trim(); const sizeRaw = String(options.size || 'compact').trim().toLowerCase(); const size = ['default', 'compact', 'small'].includes(sizeRaw) ? sizeRaw : 'compact'; const alignRaw = String(options.align || 'center').trim().toLowerCase(); const align = ['center', 'left'].includes(alignRaw) ? alignRaw : 'center'; const icon = options.icon === true; return `