// app-preview.jsx — MinutesPreview: formatted legal-style minutes document (function () { const { STATUSES } = window.MeetingData; const STATUS_LABEL = {}; STATUSES.forEach((s) => { STATUS_LABEL[s.key] = s.label; }); function fmtDate(iso) { if (!iso) return ""; const d = new Date(iso + "T00:00:00"); if (isNaN(d)) return iso; return d.toLocaleDateString("en-US", { weekday: "long", year: "numeric", month: "long", day: "numeric" }); } function fmtDue(iso) { if (!iso) return ""; const d = new Date(iso + "T00:00:00"); if (isNaN(d)) return iso; return d.toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" }); } function voteSentence(v) { const f = parseInt(v.for, 10) || 0; const a = parseInt(v.against, 10) || 0; const ab = parseInt(v.abstain, 10) || 0; if (!f && !a && !ab) return ""; let s = "The motion " + (f > a ? "carried" : "failed") + " by a vote of " + f + " in favor to " + a + " opposed"; if (ab) s += ", with " + ab + " abstaining"; return s + "."; } function MinutesPreview({ meta, items }) { const present = (meta.present || "").split(/[,\n]/).map((s) => s.trim()).filter(Boolean); const absent = (meta.absent || "").split(/[,\n]/).map((s) => s.trim()).filter(Boolean); return (
{p}
)} {vs &&{vs}
} {it.actions.length > 0 && (