// The analysis item's page (chrome-analysis.mjs): the plan's figures and nothing else, calm motion (no slam, no // overshoot, nothing grows past its size), a bound drawn hollow, the clip's citation and code only with audio. import { test } from "node:test"; import assert from "node:assert/strict"; import { analysisCite, analysisHtml, analysisTimes } from "./chrome-analysis.mjs"; import { ANALYSIS_MOTION, analysisPlan, analysisProblems, readHoldOf, readingWords } from "./analysis-plan.mjs"; const SCHEMA = { kind: "measure", unit: "lb", bandGapDays: 60, tracks: [{ key: "weight", role: "value", label: "Weight" }], fields: [{ key: "qualifier", label: "Bound", kind: "enum", options: [">", "<", "≈"], render: "cell" }], }; const W = (id, population, date, value, extra = {}) => ({ id, scope: "weight", population, date, value, ...extra }); const LEDGER = [ W("w83", "delta", "2026-07-23", -5), W("w91", "past", "2026-08-03", 349, { asOf: "2026-07-19" }), W("w104", "delta", "2026-09-04", -31.5), W("w110", "current", "2026-09-24", 310.5), W("w115", "current", "2026-10-15", 300, { qualifier: "<" }), W("w118", "current", "2026-10-26", 291.5, { asOf: "2026-10-23" }), W("w137", "current", "2026-11-07", 288.5), ]; const CTX = { ledger: LEDGER, schema: SCHEMA, render: { width: 1920, height: 1080, fps: 30, palette: { bg: "#0f1311", fg: "#edf0ec" } }, timeline: [{ type: "clip", id: "c46", video: "v1", start: 100, end: 160 }], }; const ITEM = { type: "analysis", id: "an1", title: "What his own numbers say", kicker: "THE RUN", series: { rows: ["w91", "w104", "w110", "w115", "w118", "w137"] }, band: { from: "2026-10-23", to: "2026-11-07", label: "WORLD SERIES" }, marks: [{ row: "w118", label: "offers the scale video" }], pace: [{ from: "w110", to: "w115" }, { from: "w115", to: "w118" }], status: [{ label: "SCALE VIDEO", value: "NOT POSTED", note: "offered 23 Oct", color: "red" }], reading: "The loss is steady.", footnote: "His own statements.", mark: { row: "w115" }, }; const dataOf = (html) => JSON.parse(/