/* The citation reader (/books/read): a cited passage in the reviewed document it came from, highlighted, with the chapter around it, its figures, and the page scans. Parameters (after # or ?): book, part (the section's ordinal), rev (the revision the answer used), start/end (character span in that revision), fig (a figure number to show), page (a PDF page), view (text | scan), path and pages (labels from the citation). The chat's Sources panel opens it in a frame. */ (() => { "use strict"; const P = new URLSearchParams((location.hash || location.search).slice(1)); const book = P.get("book"), part = Number(P.get("part")); const rev = P.get("rev") ? Number(P.get("rev")) : null; const start = P.get("start") !== null ? Number(P.get("start")) : null; const end = P.get("end") !== null ? Number(P.get("end")) : null; const fig = (P.get("fig") || "").toLowerCase(); const $ = (id) => document.getElementById(id); const esc = window.SeeMedMd.esc; const PAGE = /^