{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "archive",
  "title": "Archive",
  "description": "A database of people, places and machines, one dossier each.",
  "dependencies": [
    "lucide-react@1.73.0"
  ],
  "registryDependencies": [
    "https://www.cyberspec.dev/r/cyber.json",
    "https://www.cyberspec.dev/r/badge.json",
    "https://www.cyberspec.dev/r/breadcrumb.json",
    "https://www.cyberspec.dev/r/button.json",
    "https://www.cyberspec.dev/r/drawer.json",
    "https://www.cyberspec.dev/r/glitch-text.json",
    "https://www.cyberspec.dev/r/item-list.json",
    "https://www.cyberspec.dev/r/micro.json",
    "https://www.cyberspec.dev/r/readout.json",
    "https://www.cyberspec.dev/r/screen.json",
    "https://www.cyberspec.dev/r/side-tabs.json",
    "https://www.cyberspec.dev/r/text-field.json",
    "https://www.cyberspec.dev/r/toaster.json",
    "https://www.cyberspec.dev/r/toggle.json"
  ],
  "files": [
    {
      "path": "registry/cyber/blocks/archive/archive.css",
      "content": "@layer ui-sdk, cyber.tokens, cyber.base, cyber.ui, cyber.blocks, cyber.fx, cyber.a11y;\n\n@layer cyber.blocks {\n  /* The screen is measured, so the section inside it can go from three\n     columns to one by the room it has rather than the window's. */\n  [data-skin=\"cyber\"] [data-kit=\"archive\"] {\n    container: archive / inline-size;\n    min-width: 0;\n  }\n\n  /* What's tracked, at the far end of the status strip. */\n  [data-skin=\"cyber\"] [data-archive-now] {\n    display: flex;\n    margin: 0;\n\n    & div {\n      display: grid;\n      gap: 4px;\n      justify-items: start;\n    }\n\n    & dt {\n      font-size: var(--cy-text-xs);\n      color: var(--cy-ink-mute);\n    }\n\n    & dd {\n      min-height: 20px;\n      display: flex;\n      align-items: center;\n      font-size: var(--cy-text-md);\n      font-weight: 600;\n      letter-spacing: var(--cy-track);\n      text-transform: uppercase;\n      color: var(--cy-ink-mute);\n\n      /* The one yellow thing on the screen, with a mark so it isn't yellow\n         alone. */\n      &[data-tracked] {\n        color: var(--cy-flag);\n\n        &::before {\n          content: \"\";\n          width: 7px;\n          height: 7px;\n          margin-inline-end: 8px;\n          background: var(--cy-flag);\n          rotate: 45deg;\n        }\n      }\n    }\n  }\n\n  /* ── A section: the index beside the dossier ───────────────────────── */\n\n  [data-skin=\"cyber\"] [data-archive-section] {\n    display: grid;\n    grid-template-columns: minmax(0, 1fr);\n    gap: 24px;\n    align-items: start;\n    min-width: 0;\n\n    @container archive (min-width: 660px) {\n      grid-template-columns: minmax(245px, 32%) minmax(0, 1fr);\n      gap: clamp(20px, 2.4cqi, 36px);\n    }\n\n    /* A 420px directory has room for the four section names on its rail. */\n    @container archive (min-width: 1080px) {\n      grid-template-columns: minmax(420px, 32%) minmax(0, 1fr);\n    }\n  }\n\n  [data-skin=\"cyber\"] [data-archive-browser] {\n    display: grid;\n    min-width: 0;\n    gap: 10px;\n  }\n\n  [data-skin=\"cyber\"] [data-archive-browse] {\n    display: none;\n  }\n\n  @container archive (max-width: 659px) {\n    [data-skin=\"cyber\"] [data-archive-browse] {\n      display: flex;\n      width: 100%;\n      min-height: 44px;\n\n      &[aria-expanded=\"true\"] svg:last-child { rotate: 180deg; }\n    }\n    [data-skin=\"cyber\"] [data-archive-browse-current] {\n      margin-inline-start: auto;\n      color: var(--cy-signal);\n      font-size: var(--cy-text-xs);\n    }\n    [data-skin=\"cyber\"] [data-archive-directory]:not([data-expanded]) {\n      display: none;\n    }\n  }\n\n  [data-skin=\"cyber\"] [data-archive-directory] { min-width: 0; }\n\n  [data-skin=\"cyber\"] [data-archive-no-results] {\n    display: grid;\n    justify-items: start;\n    gap: 12px;\n    padding: 24px;\n    border: 1px dashed var(--cy-line-deco);\n\n    & > svg { color: var(--cy-signal); }\n    & h2 { font-size: var(--cy-text-xl); }\n  }\n\n  [data-skin=\"cyber\"] [data-archive-index] {\n    display: grid;\n    gap: 14px;\n    align-content: start;\n    min-width: 0;\n\n    @media (pointer: coarse) {\n      & input { font-size: max(16px, 1em); }\n    }\n  }\n\n  [data-skin=\"cyber\"] [data-archive-index-foot] {\n    display: grid;\n    gap: 5px;\n    min-width: 0;\n    overflow: hidden;\n  }\n\n  /* ── The dossier: a plate and the record's sheet ───────────────────── */\n\n  [data-skin=\"cyber\"] [data-archive-dossier] {\n    display: grid;\n    grid-template-columns: minmax(78px, 26%) minmax(0, 1fr);\n    grid-template-areas: \"location location\" \"plate name\" \"sheet sheet\";\n    gap: 14px;\n    align-content: start;\n    align-items: center;\n    min-width: 0;\n\n    @container archive (min-width: 1000px) {\n      grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.3fr);\n      grid-template-areas: \"plate location\" \"plate name\" \"plate sheet\";\n      align-items: start;\n      gap: 12px clamp(16px, 2cqi, 28px);\n    }\n  }\n\n  [data-skin=\"cyber\"] [data-archive-location] {\n    grid-area: location;\n    min-width: 0;\n  }\n\n  /* The plate: a still behind scanlines, with print in its margins. */\n  [data-skin=\"cyber\"] [data-archive-plate] {\n    --frame-cut: var(--cy-cut-lg);\n    --frame-line: var(--cy-line-ctl);\n    --frame-fill: var(--cy-panel);\n    --frame-image: linear-gradient(to top, var(--cy-fill-hover), transparent 55%);\n\n    display: grid;\n    grid-area: plate;\n    gap: 6px;\n    padding: 10px 12px 12px;\n    min-width: 0;\n\n    @container archive (max-width: 999px) {\n      --frame-cut: var(--cy-cut);\n      padding: 5px;\n    }\n  }\n\n  [data-skin=\"cyber\"] :is([data-archive-plate-head], [data-archive-plate-foot]) {\n    display: flex;\n    justify-content: space-between;\n    gap: 12px;\n    min-width: 0;\n    overflow: hidden;\n\n    @container archive (max-width: 999px) { display: none; }\n  }\n\n  [data-skin=\"cyber\"] [data-archive-plate-head] {\n    padding-inline-start: var(--cy-cut-lg);\n  }\n\n  [data-skin=\"cyber\"] [data-archive-plate-foot] {\n    align-items: end;\n    padding-inline-end: var(--cy-cut-lg);\n  }\n\n  [data-skin=\"cyber\"] [data-archive-still] {\n    overflow: hidden;\n    /* Short on a narrow screen, so the record's name is still in view under\n       it; the drawing keeps its proportions and sits in the middle. */\n    aspect-ratio: 1;\n\n    @container archive (min-width: 1000px) {\n      aspect-ratio: 4 / 5;\n    }\n\n    /* A new record is read onto the plate: it tears in, and one band\n       passes down it. */\n    &[data-swap] {\n      animation: var(--cy-fx-in) 260ms var(--cy-ease-snap) backwards;\n    }\n\n    &::before {\n      content: \"\";\n      position: absolute;\n      inset: 0;\n      z-index: 1;\n      pointer-events: none;\n      background: linear-gradient(\n        to bottom,\n        transparent 40%,\n        color-mix(in srgb, var(--cy-signal) 10%, transparent) 94%,\n        color-mix(in srgb, var(--cy-signal) 70%, transparent) 98%,\n        transparent\n      );\n      opacity: 0;\n    }\n\n    &[data-swap]::before {\n      opacity: var(--cy-fx);\n      animation: var(--cy-fx-scan) 620ms linear 120ms both;\n    }\n  }\n\n  [data-skin=\"cyber\"] [data-archive-art] {\n    display: block;\n    width: 100%;\n    height: 100%;\n  }\n\n  [data-skin=\"cyber\"] [data-archive-sheet] {\n    grid-area: sheet;\n    display: grid;\n    gap: 16px;\n    align-content: start;\n    min-width: 0;\n  }\n\n  [data-skin=\"cyber\"] [data-archive-entry] {\n    display: grid;\n    gap: 14px;\n    min-width: 0;\n\n    &[data-swap] {\n      animation: var(--cy-fx-in) 240ms var(--cy-ease-snap) backwards;\n    }\n  }\n\n  [data-skin=\"cyber\"] [data-archive-name] {\n    grid-area: name;\n    display: grid;\n    gap: 8px;\n    min-width: 0;\n\n    & h2 {\n      font-size: var(--cy-text-2xl);\n      font-weight: 700;\n      line-height: 1;\n      letter-spacing: var(--cy-track);\n      text-transform: uppercase;\n      text-wrap: balance;\n      overflow-wrap: anywhere;\n      color: var(--cy-ink);\n      /* It takes focus when a linked record is followed. */\n      outline-offset: 4px;\n    }\n\n    @container archive (min-width: 1000px) {\n      padding-block-end: 12px;\n      border-block-end: 1px solid var(--cy-line-ctl);\n    }\n  }\n\n  [data-skin=\"cyber\"] [data-archive-tags] {\n    display: flex;\n    flex-wrap: wrap;\n    gap: 6px;\n  }\n\n  /* The line of facts: labels in ink, what they read in the signal color. */\n  [data-skin=\"cyber\"] [data-archive-facts] {\n    display: grid;\n    grid-template-columns: repeat(2, minmax(0, 1fr));\n    gap: 10px 16px;\n    margin: 0;\n\n    & div {\n      display: grid;\n      gap: 1px;\n      padding-inline-start: 8px;\n      border-inline-start: 1px solid var(--cy-line-deco);\n      min-width: 0;\n    }\n\n    & dt {\n      font-size: var(--cy-text-xs);\n      font-weight: 600;\n      letter-spacing: var(--cy-track);\n      text-transform: uppercase;\n      color: var(--cy-ink-mute);\n    }\n\n    & dd {\n      font-size: var(--cy-text-md);\n      font-weight: 600;\n      color: var(--cy-signal);\n      overflow-wrap: anywhere;\n    }\n  }\n\n  [data-skin=\"cyber\"] [data-archive-text] {\n    display: grid;\n    gap: 10px;\n    max-width: 62ch;\n    font-size: max(16px, var(--cy-text-md));\n    line-height: 1.5;\n    color: var(--cy-ink-hi);\n    text-wrap: pretty;\n  }\n\n  [data-skin=\"cyber\"] [data-archive-actions] {\n    display: flex;\n    flex-wrap: wrap;\n    gap: var(--cy-gap);\n\n    @container archive (max-width: 659px) {\n      & > button { flex: 1 1 auto; min-height: 44px; }\n    }\n  }\n\n  [data-skin=\"cyber\"] [data-archive-links] {\n    display: grid;\n    gap: 8px;\n    padding-block-start: 12px;\n    border-block-start: 1px solid var(--cy-line-deco);\n\n    & ul {\n      display: flex;\n      flex-wrap: wrap;\n      gap: var(--cy-gap);\n      margin: 0;\n      padding: 0;\n      list-style: none;\n    }\n\n    @container archive (max-width: 659px) {\n      & ul { display: grid; }\n      & button { width: 100%; min-height: 44px; justify-content: start; }\n      & button svg:last-child { margin-inline-start: auto; }\n    }\n  }\n\n  [data-skin=\"cyber\"] [data-archive-sheet-foot] {\n    display: grid;\n    gap: 6px;\n    min-width: 0;\n    overflow: hidden;\n\n    & > div {\n      display: flex;\n      align-items: end;\n      justify-content: space-between;\n      gap: 12px;\n    }\n  }\n\n  /* The foot of the full record, on the sheet. */\n  [data-skin=\"cyber\"] [data-archive-record-foot] {\n    display: flex;\n    align-items: end;\n    justify-content: space-between;\n    gap: 12px;\n    padding-block-start: 4px;\n    overflow: hidden;\n  }\n}\n",
      "type": "registry:file",
      "target": "@components/blocks/archive/archive.css"
    },
    {
      "path": "registry/cyber/blocks/archive/archive.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { ArrowUpRight, ChevronDown, Cpu, MapPin, Search, SquareTerminal, Users } from \"lucide-react\"\nimport { Plate } from \"@/registry/cyber/blocks/archive/art\"\nimport { entries, entriesIn, entryOf, sectionOf, sections, type Entry, type Section } from \"@/registry/cyber/blocks/archive/data\"\nimport { Badge } from \"@/registry/cyber/ui/badge\"\nimport { Breadcrumb } from \"@/registry/cyber/ui/breadcrumb\"\nimport { Button } from \"@/registry/cyber/ui/button\"\nimport { Drawer } from \"@/registry/cyber/ui/drawer\"\nimport { GlitchText } from \"@/registry/cyber/ui/glitch-text\"\nimport { ItemList } from \"@/registry/cyber/ui/item-list\"\nimport { Barcode, Corners, DataStream, Micro, Ruler } from \"@/registry/cyber/ui/micro\"\nimport { Readout } from \"@/registry/cyber/ui/readout\"\nimport { Screen } from \"@/registry/cyber/ui/screen\"\nimport { SideTabs } from \"@/registry/cyber/ui/side-tabs\"\nimport { TextField } from \"@/registry/cyber/ui/text-field\"\nimport { notify } from \"@/registry/cyber/ui/toaster\"\nimport { Toggle } from \"@/registry/cyber/ui/toggle\"\nimport \"@/registry/cyber/blocks/archive/archive.css\"\n\n// The archive: what the deck knows about the Sprawl, in four sections. The\n// keys down the side pick a section, the list picks a record, and the\n// dossier beside it shows that record: a plate, the facts, the first of the\n// text. \"Open record\" puts the whole entry on a sheet.\n//\n// Each section remembers its own record and its own filter, so coming back\n// to a section finds it as it was left. A filter never changes what was\n// chosen: while the chosen record is filtered out the dossier shows the\n// first match, and clearing the filter brings the choice back.\n//\n// One record can be tracked. It's the only thing here in yellow.\n\nconst icons: Record<Section, React.ReactNode> = {\n  people: <Users aria-hidden />,\n  places: <MapPin aria-hidden />,\n  machines: <Cpu aria-hidden />,\n  programs: <SquareTerminal aria-hidden />,\n}\n\nconst two = (n: number) => String(n).padStart(2, \"0\")\n\n// A filter looks through everything the dossier prints about a record\n// except its paragraphs: \"lowtide\" finds the district and the people based\n// there.\nconst haystack = (entry: Entry) => [entry.name, entry.meta, entry.code, ...entry.facts.map(([, value]) => value)].join(\" \").toLowerCase()\n\nfunction match(section: Section, filter: string) {\n  const all = entriesIn(section)\n  const query = filter.trim().toLowerCase()\n  return query ? all.filter((entry) => haystack(entry).includes(query)) : all\n}\n\nfunction Facts({ entry, full }: { entry: Entry; full?: boolean }) {\n  const facts = full ? [...entry.facts, [\"Record\", entry.code] as const, [\"Section\", sectionOf(entry.section).label] as const] : entry.facts\n  return (\n    <dl data-archive-facts=\"\">\n      {facts.map(([term, value]) => (\n        <div key={term}>\n          <dt>{term}</dt>\n          <dd>{value}</dd>\n        </div>\n      ))}\n    </dl>\n  )\n}\n\nfunction RecordIndex({\n  section,\n  shown,\n  entry,\n  filter,\n  tracked,\n  onChoose,\n  onFilter,\n  onOpen,\n  onRowClick,\n}: {\n  section: Section\n  shown: Entry[]\n  entry: Entry\n  filter: string\n  tracked: string | null\n  onChoose: (id: string) => void\n  onFilter: (text: string) => void\n  onOpen: () => void\n  onRowClick: () => void\n}) {\n  const { label, seek } = sectionOf(section)\n  const all = entriesIn(section)\n  return (\n    <div\n      data-archive-index=\"\"\n      onClick={(event) => {\n        if ((event.target as Element).closest('[role=\"option\"]')) onRowClick()\n      }}\n      // Enter on a row opens the record it has already chosen.\n      onKeyDown={(event) => {\n        if (event.key === \"Enter\" && (event.target as Element).closest('[role=\"option\"]')) onOpen()\n      }}\n    >\n      <TextField\n        label={`Filter ${label.toLowerCase()}`}\n        icon={<Search />}\n        value={filter}\n        onValueChange={onFilter}\n        placeholder={seek}\n        hint={`${shown.length} of ${all.length} shown`}\n        autoComplete=\"off\"\n        clearable\n        data-archive-filter=\"\"\n      />\n      {shown.length > 0 && (\n        <ItemList\n          label={`${label} on file`}\n          items={shown.map((item) => ({\n            value: item.id,\n            label: item.name,\n            meta: item.meta,\n            flag: item.id === tracked ? \"Tracked\" : undefined,\n          }))}\n          value={entry.id}\n          onValueChange={(id) => {\n            if (id) onChoose(id)\n          }}\n        />\n      )}\n      <div data-archive-index-foot=\"\" aria-hidden>\n        <Ruler />\n        <Micro>\n          IDX {section.slice(0, 3)} // {two(shown.length)} of {two(all.length)} // NODE 3F:A2\n        </Micro>\n      </div>\n    </div>\n  )\n}\n\nfunction Dossier({\n  entry,\n  tracked,\n  open,\n  onOpenChange,\n  onTrack,\n  onJump,\n  onShown,\n}: {\n  entry: Entry\n  tracked: string | null\n  open: boolean\n  onOpenChange: (open: boolean) => void\n  onTrack: (id: string | null) => void\n  onJump: (id: string) => void\n  onShown: (id: string, heading: HTMLElement | null) => void\n}) {\n  const dossier = React.useRef<HTMLElement>(null)\n  const heading = React.useId()\n  const [first] = React.useState(entry.id)\n  const [moved, setMoved] = React.useState(false)\n  if (!moved && entry.id !== first) setMoved(true)\n  const section = entry.section\n  const { label } = sectionOf(section)\n  const all = entriesIn(section)\n  const place = all.indexOf(entry)\n  const isTracked = tracked === entry.id\n\n  React.useEffect(() => {\n    onShown(entry.id, dossier.current?.querySelector(\"h2\") ?? null)\n  }, [entry.id, onShown])\n\n  return (\n    <article data-archive-dossier=\"\" aria-labelledby={heading} ref={dossier}>\n      <div data-archive-plate=\"\" data-frame=\"tl br\">\n        <div data-archive-plate-head=\"\">\n          <Micro>\n            {entry.code} // PLATE {two(place + 1)}/{two(all.length)}\n          </Micro>\n          <Micro>REV 0.1</Micro>\n        </div>\n        <div key={entry.id} data-archive-still=\"\" data-scanlines=\"\" data-swap={moved ? \"\" : undefined}>\n          <Plate entry={entry} variant={place} />\n          <Corners inset={6} size={10} />\n        </div>\n        <div data-archive-plate-foot=\"\">\n          <DataStream rows={4} bytes={3} seed={entry.id} />\n          <Barcode value={entry.code} size={22} />\n        </div>\n      </div>\n\n      <div data-archive-location=\"\">\n        <Breadcrumb label=\"Record location\" items={[{ label: \"Archive\" }, { label }, { label: entry.name }]} />\n      </div>\n      <header data-archive-name=\"\" key={entry.id}>\n        <GlitchText as=\"h2\" id={heading} tabIndex={-1} decode={moved ? \"mount\" : \"none\"}>\n          {entry.name}\n        </GlitchText>\n        <p data-archive-tags=\"\">\n          <Badge tone=\"mute\">{entry.code}</Badge>\n          {/* A district's list column is its sector, which its serial already says. */}\n          <Badge tone=\"signal\">{section === \"places\" ? \"District\" : entry.meta}</Badge>\n          {isTracked && <Badge tone=\"flag\">Tracked</Badge>}\n        </p>\n      </header>\n      <div data-archive-sheet=\"\">\n        <div key={entry.id} data-archive-entry=\"\" data-swap={moved ? \"\" : undefined}>\n          <Facts entry={entry} />\n          <div data-archive-text=\"\">\n            {entry.text.slice(0, 2).map((paragraph) => (\n              <p key={paragraph}>{paragraph}</p>\n            ))}\n          </div>\n        </div>\n\n        <div data-archive-actions=\"\">\n          <Drawer\n            trigger=\"Open record\"\n            triggerTone=\"primary\"\n            title={entry.name}\n            description={entry.summary}\n            code={`${entry.code} // FULL RECORD`}\n            open={open}\n            onOpenChange={onOpenChange}\n          >\n            <Facts entry={entry} full />\n            <div data-archive-text=\"\">\n              {entry.text.map((paragraph) => (\n                <p key={paragraph}>{paragraph}</p>\n              ))}\n            </div>\n            <h3 data-kit=\"label\">Field notes</h3>\n            <ol>\n              {entry.notes.map(([at, note]) => (\n                <li key={at}>\n                  <time>{at}</time>\n                  <span>{note}</span>\n                </li>\n              ))}\n            </ol>\n            <div data-archive-record-foot=\"\" aria-hidden>\n              <Barcode value={`${entry.code} ${entry.id}`} size={20} />\n              <Micro>PROTOCOL 7741-C // READ ONLY</Micro>\n            </div>\n          </Drawer>\n          <Toggle\n            pressed={isTracked}\n            onPressedChange={(pressed) => {\n              onTrack(pressed ? entry.id : null)\n              if (pressed) notify(`Tracking ${entry.name}`, { description: \"Its row is flagged, and the status strip follows it.\" })\n              else notify(`${entry.name} released`, { description: \"Nothing is tracked.\" })\n            }}\n          >\n            Track record\n          </Toggle>\n        </div>\n\n        <section data-archive-links=\"\" aria-labelledby={`${heading}-links`}>\n          <h3 id={`${heading}-links`} data-kit=\"label\">\n            Linked records\n          </h3>\n          <ul>\n            {entry.links.map((id) => {\n              const link = entryOf(id)\n              return (\n                <li key={id}>\n                  <Button size=\"sm\" onClick={() => onJump(id)}>\n                    {icons[link.section]}\n                    <span data-sr-only>Go to </span>\n                    {link.name}\n                    <ArrowUpRight aria-hidden />\n                  </Button>\n                </li>\n              )\n            })}\n          </ul>\n        </section>\n\n        <div data-archive-sheet-foot=\"\" aria-hidden>\n          <Ruler />\n          <div>\n            <Barcode value={entry.id} size={14} />\n            <Micro>CS-A7 // {entry.code} // LINK STABLE</Micro>\n          </div>\n        </div>\n      </div>\n    </article>\n  )\n}\n\nconst typing = 'input, textarea, select, [contenteditable=\"\"], [contenteditable=\"true\"]'\n\nexport default function Archive() {\n  const [section, setSection] = React.useState<Section>(\"people\")\n  const [chosen, setChosen] = React.useState<Record<Section, string>>({\n    people: \"mara-voss\",\n    places: \"lowtide\",\n    machines: \"vanta-mk2\",\n    programs: \"ghostwrite\",\n  })\n  const [filters, setFilters] = React.useState<Record<Section, string>>({ people: \"\", places: \"\", machines: \"\", programs: \"\" })\n  const [tracked, setTracked] = React.useState<string | null>(\"sable-quinn\")\n  const [read, setRead] = React.useState<readonly string[]>([])\n  const [browse, setBrowse] = React.useState(false)\n  const [open, setOpen] = React.useState(false)\n  const directoryId = React.useId()\n  const browseKey = React.useRef<HTMLButtonElement>(null)\n  const root = React.useRef<HTMLDivElement>(null)\n  // Set by a jump: the record it leaves has taken the pressed key with it,\n  // so focus goes to the heading of the record it lands on.\n  const landing = React.useRef(false)\n\n  const shown = match(section, filters[section])\n  const entry = shown.find((item) => item.id === chosen[section]) ?? shown[0] ?? entryOf(chosen[section])\n\n  const jump = (id: string) => {\n    const target = entryOf(id)\n    landing.current = target.id !== entry.id || !shown.length\n    setBrowse(false)\n    setSection(target.section)\n    setChosen((now) => ({ ...now, [target.section]: id }))\n    // A filter that would hide the record gives way to it.\n    if (!match(target.section, filters[target.section]).includes(target)) setFilters((now) => ({ ...now, [target.section]: \"\" }))\n  }\n\n  const onShown = React.useCallback((id: string, heading: HTMLElement | null) => {\n    setRead((now) => (now.includes(id) ? now : [...now, id]))\n    if (!landing.current) return\n    landing.current = false\n    heading?.focus()\n  }, [])\n\n  // \"/\" goes to the filter from anywhere on the screen.\n  React.useEffect(() => {\n    const onKey = (event: KeyboardEvent) => {\n      if (event.key !== \"/\" || event.metaKey || event.ctrlKey || event.altKey) return\n      if ((event.target as Element | null)?.closest?.(`${typing}, [role=\"dialog\"]`)) return\n      event.preventDefault()\n      if (browseKey.current?.getClientRects().length) setBrowse(true)\n      requestAnimationFrame(() => {\n        const field = root.current?.querySelector<HTMLInputElement>(\"[data-archive-filter]\")\n        field?.focus()\n        field?.select()\n      })\n    }\n    document.addEventListener(\"keydown\", onKey)\n    return () => document.removeEventListener(\"keydown\", onKey)\n  }, [])\n\n  const following = tracked ? entryOf(tracked) : null\n\n  return (\n    <div data-kit=\"archive\" ref={root}>\n      <Screen\n        label=\"Archive\"\n        status={\n          <>\n            <Readout label=\"Records on file\" value={entries.length} size=\"sm\" tone=\"accent\" />\n            <Readout label=\"Records read\" value={read.length} size=\"sm\" />\n            <Readout label=\"In this section\" value={shown.length} size=\"sm\" />\n          </>\n        }\n        aside={\n          <>\n            <dl data-archive-now=\"\">\n              <div>\n                <dt data-kit=\"label\">Tracking</dt>\n                <dd data-tracked={following ? \"\" : undefined}>{following ? following.name : \"Nothing\"}</dd>\n              </div>\n            </dl>\n            <Button size=\"sm\" disabled={!following || (shown.length > 0 && following.id === entry.id)} onClick={() => following && jump(following.id)}>\n              Go to tracked record\n            </Button>\n          </>\n        }\n        hints={[\n          { keys: [\"↑\", \"↓\"], label: \"Browse\" },\n          { keys: \"↵\", label: \"Open\" },\n          { keys: \"/\", label: \"Filter\" },\n          { keys: \"Esc\", label: \"Close\" },\n        ]}\n        code=\"CS-A7 // ARCHIVE // READ ONLY // PROTOCOL 7741-C\"\n      >\n        <div data-archive-section=\"\">\n          <aside data-archive-browser=\"\" aria-label=\"Record index\">\n            <Button\n              ref={browseKey}\n              data-archive-browse=\"\"\n              aria-controls={directoryId}\n              aria-expanded={browse}\n              onClick={() => setBrowse(!browse)}\n            >\n              <Search aria-hidden />\n              Browse records\n              <span data-archive-browse-current=\"\">{sectionOf(section).label}</span>\n              <ChevronDown aria-hidden />\n            </Button>\n            <div data-archive-directory=\"\" id={directoryId} data-expanded={browse || undefined}>\n              <SideTabs\n                label=\"Archive sections\"\n                code=\"HALCYON SPRAWL\"\n                value={section}\n                onValueChange={(value) => {\n                  if (value) setSection(value as Section)\n                }}\n                tabs={sections.map(({ value, label }) => ({\n                  value,\n                  label,\n                  icon: icons[value],\n                  content: value === section && (\n                    <RecordIndex\n                      section={value}\n                      shown={shown}\n                      entry={entry}\n                      filter={filters[value]}\n                      tracked={tracked}\n                      onChoose={(id) => setChosen((now) => ({ ...now, [value]: id }))}\n                      onFilter={(text) => setFilters((now) => ({ ...now, [value]: text }))}\n                      onOpen={() => setOpen(true)}\n                      onRowClick={() => {\n                        if (!browseKey.current?.getClientRects().length) return\n                        setBrowse(false)\n                        browseKey.current.focus()\n                      }}\n                    />\n                  ),\n                }))}\n              />\n            </div>\n          </aside>\n          {shown.length ? (\n            <Dossier\n              entry={entry}\n              tracked={tracked}\n              open={open}\n              onOpenChange={setOpen}\n              onTrack={setTracked}\n              onJump={jump}\n              onShown={onShown}\n            />\n          ) : (\n            <div data-archive-no-results=\"\">\n              <Search aria-hidden />\n              <h2 role=\"status\">No matching records</h2>\n              <p>Try another name, location or record code.</p>\n              <Button\n                onClick={() => {\n                  setFilters((now) => ({ ...now, [section]: \"\" }))\n                  if (browseKey.current?.getClientRects().length && !browse) browseKey.current.focus()\n                  else root.current?.querySelector<HTMLInputElement>(\"[data-archive-filter]\")?.focus()\n                }}\n              >\n                Clear filter\n              </Button>\n            </div>\n          )}\n        </div>\n      </Screen>\n    </div>\n  )\n}\n",
      "type": "registry:component",
      "target": "@components/blocks/archive/archive.tsx"
    },
    {
      "path": "registry/cyber/blocks/archive/art.tsx",
      "content": "\"use client\"\n\nimport type * as React from \"react\"\nimport type { Entry, MachineShape } from \"@/registry/cyber/blocks/archive/data\"\n\n// The plates in the archive, drawn rather than fetched: a faceted bust for a\n// person, a skyline for a district, an outline for a machine and a sigil for\n// a program. Each sits on a 320 × 400 field and takes its colors from the\n// theme. They are decoration: the record beside a plate says everything the\n// plate shows.\n\n// A small deterministic stream of numbers from a string, so a record always\n// draws the same picture.\nfunction seeded(seed: string) {\n  let state = [...seed].reduce((sum, letter) => (sum * 31 + letter.charCodeAt(0)) >>> 0, 7)\n  return () => {\n    state = (state * 1664525 + 1013904223) >>> 0\n    return state / 4294967296\n  }\n}\n\nconst deco = \"var(--cy-line-deco)\"\nconst line = \"var(--cy-line-ctl)\"\nconst ink = \"var(--cy-ink)\"\nconst hot = \"var(--cy-accent)\"\nconst signal = \"var(--cy-signal)\"\n\n// A six-sided \"circle\": nothing in this world is round.\nfunction hex(cx: number, cy: number, r: number, turn = 0) {\n  return (\n    Array.from({ length: 6 }, (_, i) => {\n      const a = ((i * 60 + turn - 90) * Math.PI) / 180\n      return `${i ? \"L\" : \"M\"}${(cx + r * Math.cos(a)).toFixed(1)} ${(cy + r * Math.sin(a)).toFixed(1)}`\n    }).join(\"\") + \"Z\"\n  )\n}\n\nconst diamond = (cx: number, cy: number, r: number) => `M${cx} ${cy - r}L${cx + r} ${cy}L${cx} ${cy + r}L${cx - r} ${cy}Z`\n\n// What every plate stands on: scan rows, and a height rule down one side.\nfunction Field() {\n  return (\n    <g fill=\"none\" strokeWidth=\"1\">\n      {Array.from({ length: 9 }, (_, row) => (\n        <path key={row} d={`M0 ${40 + row * 40}H320`} stroke={deco} strokeDasharray={row % 3 === 2 ? undefined : \"2 8\"} />\n      ))}\n      {Array.from({ length: 31 }, (_, tick) => (\n        <path key={tick} d={`M10 ${40 + tick * 11}h${tick % 5 === 0 ? 12 : 6}`} stroke={line} />\n      ))}\n    </g>\n  )\n}\n\n// Three heads over the same bust: a crop, a long fringe and a hood.\nconst hair = [\n  \"M114 128 118 82 160 58 202 82 206 128 196 98 160 86 124 98Z\",\n  \"M108 192 116 80 160 54 204 80 210 150 198 98 152 94 130 132 122 176Z\",\n  \"M94 240 104 98 160 44 216 98 226 240 206 128 196 84 160 70 124 84 114 128Z\",\n]\n\n// And three sets of optics: a band, two slits, a single lens.\nconst optics = [\"M120 132H200L196 147H124Z\", \"M122 134H152L150 144H124ZM168 134H198L196 144H170Z\", hex(182, 139, 12) + \"M120 139H150\"]\n\nfunction Bust({ seed, variant }: { seed: string; variant: number }) {\n  const next = seeded(seed)\n  return (\n    <>\n      <g fill=\"var(--cy-panel-2)\" stroke={line} strokeWidth=\"1\">\n        <path d=\"M140 244 76 272 44 316 36 400H284L276 316 244 272 180 244Z\" />\n        <path d=\"M144 206 140 244 160 268 180 244 176 206Z\" />\n      </g>\n      <path\n        d=\"M76 272 160 268 244 272M44 316 160 268 276 316M160 268V400M100 400 160 268 220 400M76 272 100 400M244 272 220 400\"\n        fill=\"none\"\n        stroke={deco}\n        strokeWidth=\"1\"\n      />\n      <path d=\"M124 84 160 70 196 84 206 128 198 176 176 206H144L122 176 114 128Z\" fill=\"var(--cy-panel)\" stroke={ink} strokeWidth=\"1.5\" />\n      <path\n        d=\"M124 84 160 120 196 84M160 70V120M114 128 160 120 206 128M160 120V164M122 176 160 164 198 176M144 206 160 164 176 206M114 128 122 176M206 128 198 176\"\n        fill=\"none\"\n        stroke={line}\n        strokeWidth=\"1\"\n      />\n      <path d={hair[variant % 3]} fill=\"var(--cy-fill-active)\" stroke={hot} strokeWidth=\"1\" />\n      <path d={optics[(variant + (variant > 2 ? 1 : 0)) % 3]} fill=\"var(--cy-signal-fill)\" stroke={signal} strokeWidth=\"1.5\" />\n      {/* Recognition marks: brackets round the face, and a few points the\n          scan locked on, different for each one. */}\n      <path d=\"M96 60H84V72M224 60H236V72M96 224H84V212M224 224H236V212\" fill=\"none\" stroke={signal} strokeWidth=\"1\" />\n      {Array.from({ length: 5 }, (_, point) => {\n        const x = Math.round(122 + next() * 76)\n        const y = Math.round(92 + next() * 104)\n        return <path key={point} d={`M${x - 3} ${y}h6M${x} ${y - 3}v6`} stroke={signal} strokeWidth=\"1\" />\n      })}\n      {Array.from({ length: 16 }, (_, bar) => (\n        <rect key={bar} x={206 + bar * 5} y={346} width={next() > 0.5 ? 3 : 1} height={14 + Math.round(next() * 22)} fill={line} />\n      ))}\n    </>\n  )\n}\n\nfunction Skyline({ seed }: { seed: string }) {\n  const next = seeded(seed)\n  const ground = 300\n  const far: { x: number; top: number; width: number }[] = []\n  for (let x = 0; x < 320; ) {\n    const width = 14 + Math.round(next() * 26)\n    far.push({ x, top: 110 + Math.round(next() * 110), width })\n    x += width + 2\n  }\n  const near: { x: number; top: number; width: number; step: boolean; mast: boolean }[] = []\n  for (let x = 30; x < 290; ) {\n    const width = 22 + Math.round(next() * 26)\n    near.push({ x, top: 96 + Math.round(next() * 150), width, step: next() > 0.5, mast: next() > 0.6 })\n    x += width + 4 + Math.round(next() * 8)\n  }\n  // One tower is the address on file. It gets the marker.\n  const target = near[1 + Math.floor(next() * (near.length - 2))]\n  const mid = target.x + target.width / 2\n  return (\n    <>\n      <g fill=\"none\" stroke={deco} strokeWidth=\"1\">\n        {far.map((tower) => (\n          <path key={tower.x} d={`M${tower.x} ${ground}V${tower.top}h${tower.width}V${ground}`} />\n        ))}\n      </g>\n      {near.map((tower) => {\n        const { x, top, width, step, mast } = tower\n        const chosen = tower === target\n        const inset = Math.round(width / 3)\n        return (\n          <g key={x} fill=\"var(--cy-panel)\" stroke={chosen ? signal : line} strokeWidth={chosen ? 1.5 : 1}>\n            <path\n              d={\n                step\n                  ? `M${x} ${ground}V${top + 18}h${inset}V${top}h${width - inset}V${ground}Z`\n                  : `M${x} ${ground}V${top}h${width}V${ground}Z`\n              }\n            />\n            {mast && <path d={`M${x + width - 5} ${top}v-22m-4 8h8`} fill=\"none\" />}\n            {/* Windows: a dashed line per floor. */}\n            {Array.from({ length: Math.floor((ground - top - 30) / 12) }, (_, floor) => (\n              <path\n                key={floor}\n                d={`M${x + 4} ${top + 30 + floor * 12}h${width - 8}`}\n                fill=\"none\"\n                stroke={chosen ? signal : next() > 0.3 ? line : hot}\n                strokeWidth=\"1\"\n                strokeDasharray={`${2 + Math.round(next() * 4)} ${2 + Math.round(next() * 3)}`}\n              />\n            ))}\n          </g>\n        )\n      })}\n      <path d={`${diamond(mid, target.top - 44, 7)}M${mid} ${target.top - 37}V${target.top - 4}`} fill=\"none\" stroke={signal} strokeWidth=\"1.5\" />\n      {/* The waterline, and the towers standing in it. */}\n      <path d={`M0 ${ground}H320`} stroke={ink} strokeWidth=\"1.5\" />\n      {Array.from({ length: 7 }, (_, row) => (\n        <path\n          key={row}\n          d={`M${row * 9} ${ground + 12 + row * 12}H${320 - row * 9}`}\n          stroke={row % 2 ? deco : line}\n          strokeWidth=\"1\"\n          strokeDasharray={`${14 - row} ${4 + row * 2}`}\n        />\n      ))}\n    </>\n  )\n}\n\n// A point on the deck's top face, from how far along and how far across.\nconst iso = (s: number, t: number) => `${(60 + s * 130 + t * 80).toFixed(1)} ${(176 - s * 60 + t * 46).toFixed(1)}`\nconst face = (s0: number, t0: number, s1: number, t1: number) => `M${iso(s0, t0)}L${iso(s1, t0)}L${iso(s1, t1)}L${iso(s0, t1)}Z`\n\nconst machines: Record<MachineShape, React.ReactNode> = {\n  deck: (\n    <>\n      <path d=\"M60 176v16l80 46 130-60v-16\" fill=\"var(--cy-panel-2)\" stroke={line} strokeWidth=\"1\" />\n      <path d={`${face(0, 0, 1, 1)}M140 222v16`} fill=\"var(--cy-panel)\" stroke={ink} strokeWidth=\"1.5\" />\n      <path d={face(0.06, 0.08, 0.94, 0.4)} fill=\"var(--cy-signal-fill)\" stroke={signal} strokeWidth=\"1\" />\n      <g fill=\"none\" stroke={line} strokeWidth=\"1\">\n        {Array.from({ length: 3 }, (_, row) =>\n          Array.from({ length: 9 }, (_, key) => (\n            <path key={`${row}-${key}`} d={face(0.06 + key * 0.1, 0.5 + row * 0.15, 0.13 + key * 0.1, 0.6 + row * 0.15)} />\n          )),\n        )}\n      </g>\n      {/* Four ports on the near edge, one of them carrying the link. */}\n      <path d=\"M160 221l8-3.7v6l-8 3.7ZM178 212.7l8-3.7v6l-8 3.7ZM196 204.4l8-3.7v6l-8 3.7Z\" fill=\"none\" stroke={line} strokeWidth=\"1\" />\n      <path d=\"M214 196l8-3.7v6l-8 3.7Z\" fill={signal} />\n      <path d=\"M218 200 250 240H300\" fill=\"none\" stroke={signal} strokeWidth=\"1\" strokeDasharray=\"4 3\" />\n    </>\n  ),\n  carbine: (\n    <>\n      <path d=\"M30 188 86 182V214L58 224 30 220Z\" fill=\"var(--cy-panel-2)\" stroke={line} strokeWidth=\"1\" />\n      <path d=\"M150 210H176L168 258 140 254ZM112 214H132L124 250 104 246Z\" fill=\"var(--cy-panel-2)\" stroke={line} strokeWidth=\"1\" />\n      <path d=\"M86 176H206V180H262V186H292V194H262V200H206V210H86Z\" fill=\"var(--cy-panel)\" stroke={ink} strokeWidth=\"1.5\" />\n      <path d=\"M214 184H254M214 190H254M214 196H254M96 176V210M196 176V210M136 210 142 222H150\" fill=\"none\" stroke={line} strokeWidth=\"1\" />\n      <path d=\"M122 176V162H178V176M130 162V154H170V162\" fill=\"var(--cy-signal-fill)\" stroke={signal} strokeWidth=\"1\" />\n      <path d=\"M96 170H206\" stroke={line} strokeWidth=\"3\" strokeDasharray=\"2 4\" />\n    </>\n  ),\n  van: (\n    <>\n      <path d=\"M34 244V172L50 146H212L254 178 286 190V244Z\" fill=\"var(--cy-panel)\" stroke={ink} strokeWidth=\"1.5\" />\n      <path d=\"M216 152 246 178H216Z\" fill=\"var(--cy-signal-fill)\" stroke={signal} strokeWidth=\"1\" />\n      <path d=\"M204 146V244M120 146V244M34 196H204M46 160H110M130 160H194M262 200H286M34 226H286\" fill=\"none\" stroke={line} strokeWidth=\"1\" />\n      <g fill=\"var(--cy-panel-2)\" stroke={ink} strokeWidth=\"1.5\">\n        <path d={hex(86, 246, 22, 30)} />\n        <path d={hex(238, 246, 22, 30)} />\n      </g>\n      <path d={hex(86, 246, 9, 30) + hex(238, 246, 9, 30)} fill=\"none\" stroke={line} strokeWidth=\"1\" />\n      <path d=\"M0 268H320\" stroke={line} strokeWidth=\"1\" />\n      <path d=\"M12 276H308\" stroke={deco} strokeWidth=\"1\" strokeDasharray=\"18 8\" />\n    </>\n  ),\n  lifter: (\n    <>\n      <path d=\"M160 196 86 144M160 196 234 144M160 216 86 262M160 216 234 262\" fill=\"none\" stroke={line} strokeWidth=\"5\" />\n      {[\n        [86, 144],\n        [234, 144],\n        [86, 262],\n        [234, 262],\n      ].map(([x, y]) => (\n        <g key={`${x}-${y}`} fill=\"none\" strokeWidth=\"1\">\n          <path d={hex(x, y, 40)} stroke={line} strokeDasharray=\"3 4\" />\n          <path d={hex(x, y, 9)} fill=\"var(--cy-panel-2)\" stroke={ink} />\n          <path d={`M${x - 34} ${y - 12}L${x + 34} ${y + 12}M${x - 12} ${y + 34}L${x + 12} ${y - 34}`} stroke={hot} />\n        </g>\n      ))}\n      <path d=\"M160 116 182 150V250L172 292H148L138 250V150Z\" fill=\"var(--cy-panel)\" stroke={ink} strokeWidth=\"1.5\" />\n      <path d=\"M146 150 160 128 174 150Z\" fill=\"var(--cy-signal-fill)\" stroke={signal} strokeWidth=\"1\" />\n      <path d=\"M138 190H182M138 232H182M160 232V292\" fill=\"none\" stroke={line} strokeWidth=\"1\" />\n      <path d={diamond(160, 211, 10)} fill=\"none\" stroke={signal} strokeWidth=\"1.5\" />\n    </>\n  ),\n}\n\n// What a machine's plate adds round the outline: a dimension line under it\n// and a leader to a detail, the way a service sheet is drawn.\nfunction Machine({ shape }: { shape: MachineShape }) {\n  return (\n    <>\n      {machines[shape]}\n      <g fill=\"none\" stroke={line} strokeWidth=\"1\">\n        <path d=\"M34 322H286M34 314V330M286 314V330M160 318V326\" />\n        <path d=\"M34 322l8-4v8ZM286 322l-8-4v8Z\" fill={line} />\n        <path d={`${hex(262, 92, 20)}M250 108 232 132`} />\n      </g>\n      <path d={diamond(262, 92, 6)} fill={signal} />\n    </>\n  )\n}\n\n// A program has no outline, so its plate is a sigil: rings, spokes and nodes\n// read off its name. The same name always draws the same mark.\nfunction Sigil({ seed }: { seed: string }) {\n  const next = seeded(seed)\n  const cx = 160\n  const cy = 200\n  const point = (r: number, step: number, of: number) => {\n    const a = ((step * 360) / of - 90) * (Math.PI / 180)\n    return `${(cx + r * Math.cos(a)).toFixed(1)} ${(cy + r * Math.sin(a)).toFixed(1)}`\n  }\n  const rings = [44, 76, 108, 136]\n  const core = Math.floor(next() * 3)\n  return (\n    <>\n      <g fill=\"none\" strokeWidth=\"1\">\n        {rings.map((r, ring) =>\n          Array.from({ length: 12 }, (_, side) => {\n            const roll = next()\n            if (roll < 0.28) return null\n            return (\n              <path\n                key={`${ring}-${side}`}\n                d={`M${point(r, side, 12)}L${point(r, side + 1, 12)}`}\n                stroke={roll > 0.8 ? hot : ring % 2 ? line : ink}\n                strokeWidth={roll > 0.8 ? 2 : 1}\n              />\n            )\n          }),\n        )}\n        {Array.from({ length: 12 }, (_, spoke) => {\n          const from = rings[Math.floor(next() * 3)]\n          const to = rings[3 - Math.floor(next() * 2)]\n          if (next() < 0.35 || from >= to) return null\n          return <path key={spoke} d={`M${point(from, spoke, 12)}L${point(to, spoke, 12)}`} stroke={line} />\n        })}\n      </g>\n      {Array.from({ length: 6 }, (_, node) => {\n        const [x, y] = point(rings[1 + Math.floor(next() * 3)], Math.floor(next() * 12), 12).split(\" \").map(Number)\n        return <path key={node} d={diamond(x, y, 4)} fill={node < 2 ? signal : \"var(--cy-panel)\"} stroke={signal} strokeWidth=\"1\" />\n      })}\n      <path\n        d={[hex(cx, cy, 24), diamond(cx, cy, 26), `M${cx - 20} ${cy - 20}h40v40h-40Z`][core]}\n        fill=\"var(--cy-signal-fill)\"\n        stroke={signal}\n        strokeWidth=\"1.5\"\n      />\n      <path d={diamond(cx, cy, 6)} fill={signal} />\n    </>\n  )\n}\n\n// The plate for a record. `variant` is the record's place in its section,\n// which is what tells one bust from the next.\nfunction Plate({ entry, variant }: { entry: Entry; variant: number }) {\n  return (\n    <svg data-archive-art=\"\" viewBox=\"0 0 320 400\" preserveAspectRatio=\"xMidYMid slice\" aria-hidden focusable=\"false\">\n      <Field />\n      {entry.section === \"people\" && <Bust seed={entry.id} variant={variant} />}\n      {entry.section === \"places\" && <Skyline seed={entry.id} />}\n      {entry.section === \"machines\" && <Machine shape={entry.shape ?? \"deck\"} />}\n      {entry.section === \"programs\" && <Sigil seed={entry.id} />}\n    </svg>\n  )\n}\n\nexport { Plate }\n",
      "type": "registry:component",
      "target": "@components/blocks/archive/art.tsx"
    },
    {
      "path": "registry/cyber/blocks/archive/data.ts",
      "content": "// What the archive holds: eighteen records in four sections. Every record\n// has the same shape, so one dossier draws them all. `links` name other\n// records by id, across sections.\n\ntype Section = \"people\" | \"places\" | \"machines\" | \"programs\"\n\ntype MachineShape = \"deck\" | \"carbine\" | \"van\" | \"lifter\"\n\ntype Entry = {\n  id: string\n  section: Section\n  name: string\n  /** The list's second column: a role, a sector, a class. */\n  meta: string\n  /** The record's serial. */\n  code: string\n  /** One line, for the sheet's description. */\n  summary: string\n  facts: [term: string, value: string][]\n  /** The first two show in the dossier; the sheet shows them all. */\n  text: string[]\n  notes: [at: string, line: string][]\n  links: string[]\n  /** Which outline a machine's plate draws. */\n  shape?: MachineShape\n}\n\n// `one` is the section's noun for a single record, and `seek` what its\n// filter suggests typing.\nconst sections: { value: Section; label: string; one: string; seek: string }[] = [\n  { value: \"people\", label: \"People\", one: \"person\", seek: \"Name, role, district\" },\n  { value: \"places\", label: \"Places\", one: \"place\", seek: \"Name, sector, crew\" },\n  { value: \"machines\", label: \"Machines\", one: \"machine\", seek: \"Name, maker, class\" },\n  { value: \"programs\", label: \"Programs\", one: \"program\", seek: \"Name, class, author\" },\n]\n\nconst entries: Entry[] = [\n  {\n    id: \"mara-voss\",\n    section: \"people\",\n    name: \"Mara Voss\",\n    meta: \"Fixer\",\n    code: \"P-0114\",\n    summary: \"Fixer. Works the Lowtide seawall and vouches for most of this archive.\",\n    facts: [\n      [\"Role\", \"Fixer\"],\n      [\"Base\", \"Lowtide\"],\n      [\"Crew\", \"Independent\"],\n      [\"Standing\", \"Trusted\"],\n    ],\n    text: [\n      \"Mara Voss takes her calls at a noodle counter on the Lowtide seawall and has not missed a payment in eleven years. Most crews in the Sprawl got their first job from her. Several got their last.\",\n      \"She carries no deck and no augments anyone has found. What she knows is in her head or in a paper ledger, which Vanta Systems has offered to buy twice.\",\n      \"She vouches for most of the people in this archive. Ask her about the rest before you call them.\",\n    ],\n    notes: [\n      [\"11.02\", \"Paid the Glasswater job in full, a day early.\"],\n      [\"11.09\", \"Declined to say who asked about the ledger.\"],\n      [\"11.14\", \"Counter closed for one evening. No reason given.\"],\n    ],\n    links: [\"lowtide\", \"sable-quinn\", \"dex-marlowe\"],\n  },\n  {\n    id: \"ilya-brandt\",\n    section: \"people\",\n    name: \"Ilya Brandt\",\n    meta: \"Tech\",\n    code: \"P-0127\",\n    summary: \"Tech. Repairs decks behind an unmarked shutter on level 27 of the Stacks.\",\n    facts: [\n      [\"Role\", \"Tech\"],\n      [\"Base\", \"The Stacks\"],\n      [\"Crew\", \"Static Saints\"],\n      [\"Standing\", \"Reliable\"],\n    ],\n    text: [\n      \"Ilya Brandt repairs decks at a bench on level 27 of the Stacks, behind a shutter with no sign. If the shutter is down, the bench is busy. Knocking does not help.\",\n      \"He left Vanta Systems with a severance and a copy of the Mk.II firmware. Only the severance was authorized.\",\n      \"Rates are fixed and posted on the wall. The wall also lists three people he no longer works for.\",\n    ],\n    notes: [\n      [\"10.28\", \"Reflashed two decks overnight. Both held.\"],\n      [\"11.06\", \"Asked for payment in parts, not credits.\"],\n      [\"11.15\", \"Shutter down for nine hours.\"],\n    ],\n    links: [\"vanta-mk2\", \"the-stacks\", \"ghostwrite\"],\n  },\n  {\n    id: \"juno-okafor\",\n    section: \"people\",\n    name: \"Juno Okafor\",\n    meta: \"Medic\",\n    code: \"P-0131\",\n    summary: \"Medic. Flew for Solace Mutual, now runs a clinic in Glasswater with no forms.\",\n    facts: [\n      [\"Role\", \"Medic\"],\n      [\"Base\", \"Glasswater\"],\n      [\"Crew\", \"Independent\"],\n      [\"Standing\", \"Trusted\"],\n    ],\n    text: [\n      \"Juno Okafor flew four years of medevac for Solace Mutual and resigned the week the company began checking policies before landing.\",\n      \"Her clinic is two rooms over a laundry in Glasswater. It has no forms and no waiting list, and it closes when the supplies run out.\",\n      \"She will patch anyone once. The second visit comes with questions.\",\n    ],\n    notes: [\n      [\"10.19\", \"Treated two of the Lowtide Union after the dock strike.\"],\n      [\"11.03\", \"Out of coagulant. Restocked through Mara Voss.\"],\n      [\"11.12\", \"Turned away a Meridian Biotech recruiter.\"],\n    ],\n    links: [\"solace-lifter\", \"glasswater\", \"mara-voss\"],\n  },\n  {\n    id: \"dex-marlowe\",\n    section: \"people\",\n    name: \"Dex Marlowe\",\n    meta: \"Driver\",\n    code: \"P-0140\",\n    summary: \"Driver. Knows every unlit road between Cinder Row and the seawall.\",\n    facts: [\n      [\"Role\", \"Driver\"],\n      [\"Base\", \"Cinder Row\"],\n      [\"Crew\", \"Lowtide Union\"],\n      [\"Standing\", \"Reliable\"],\n    ],\n    text: [\n      \"Dex Marlowe drives a van called Patience and has never been stopped at a checkpoint he chose to approach. He chooses carefully.\",\n      \"He grew up over a foundry in Cinder Row and can name every road in the district that lost its lights. Those are the roads he uses.\",\n      \"He does not wait longer than agreed. This has been tested.\",\n    ],\n    notes: [\n      [\"10.30\", \"Glasswater to the Stacks in eleven minutes. Disputed.\"],\n      [\"11.08\", \"Replaced the van's plates. Third set this year.\"],\n      [\"11.13\", \"Waited four minutes as agreed, then left.\"],\n    ],\n    links: [\"patience\", \"cinder-row\", \"mara-voss\"],\n  },\n  {\n    id: \"sable-quinn\",\n    section: \"people\",\n    name: \"Sable Quinn\",\n    meta: \"Runner\",\n    code: \"P-0152\",\n    summary: \"Runner. Quick on a deck, quicker to leave. No fixed address on file.\",\n    facts: [\n      [\"Role\", \"Runner\"],\n      [\"Base\", \"Unlisted\"],\n      [\"Crew\", \"Static Saints\"],\n      [\"Standing\", \"Unverified\"],\n    ],\n    text: [\n      \"Sable Quinn runs intrusion for the Static Saints and has been inside more Vanta relays than most Vanta technicians.\",\n      \"No fixed address is on file. Messages reach her through Ilya Brandt's bench, usually within a day.\",\n      \"She writes her own daemons and names them after weather. Two are in this archive. The others are not for sale.\",\n    ],\n    notes: [\n      [\"10.22\", \"Cleared a Meridian Heights relay in under a minute.\"],\n      [\"11.01\", \"Lost a deck in Cinder Row. Did not go back for it.\"],\n      [\"11.16\", \"Asked what this archive says about her.\"],\n    ],\n    links: [\"vanta-mk2\", \"mirrorfall\", \"ilya-brandt\"],\n  },\n  {\n    id: \"lowtide\",\n    section: \"places\",\n    name: \"Lowtide\",\n    meta: \"LT-04\",\n    code: \"D-LT04\",\n    summary: \"The old harbor district. It floods on a schedule and the schedule is posted.\",\n    facts: [\n      [\"Sector\", \"LT-04\"],\n      [\"Held by\", \"Lowtide Union\"],\n      [\"Residents\", \"410 000\"],\n      [\"Risk\", \"Moderate\"],\n    ],\n    text: [\n      \"Lowtide is the old harbor, built before the seawall and rebuilt behind it. The lower streets flood twice a day. The schedule is posted at every stair.\",\n      \"The Lowtide Union runs the docks, the pumps and the night market. Patrols from Meridian Heights stop at the seawall and turn around.\",\n      \"Most work in the Sprawl starts here, at a counter or on a pier, and most of it is paid here too.\",\n    ],\n    notes: [\n      [\"10.25\", \"Pump station 3 offline for two tides.\"],\n      [\"11.05\", \"Night market moved one pier east.\"],\n      [\"11.14\", \"Seawall cameras dark for forty minutes.\"],\n    ],\n    links: [\"mara-voss\", \"glasswater\", \"patience\"],\n  },\n  {\n    id: \"glasswater\",\n    section: \"places\",\n    name: \"Glasswater\",\n    meta: \"GW-11\",\n    code: \"D-GW11\",\n    summary: \"Canal district of clinics and showrooms. Clean streets, long memory.\",\n    facts: [\n      [\"Sector\", \"GW-11\"],\n      [\"Held by\", \"Meridian Biotech\"],\n      [\"Residents\", \"186 000\"],\n      [\"Risk\", \"Low\"],\n    ],\n    text: [\n      \"Glasswater is canals, clinics and showrooms. Meridian Biotech owns most of the frontage and all of the cameras.\",\n      \"The streets are clean and the district remembers faces. A route through Glasswater is easy to walk and hard to walk twice.\",\n      \"Behind the showrooms are the laundries, kitchens and bench clinics that keep the frontage running. Nobody films those.\",\n    ],\n    notes: [\n      [\"10.27\", \"New camera mast at the east lock.\"],\n      [\"11.04\", \"Checkpoint hours extended to midnight.\"],\n      [\"11.11\", \"Route through the laundry row confirmed clear.\"],\n    ],\n    links: [\"juno-okafor\", \"lowtide\", \"static-bloom\"],\n  },\n  {\n    id: \"cinder-row\",\n    section: \"places\",\n    name: \"Cinder Row\",\n    meta: \"CR-02\",\n    code: \"D-CR02\",\n    summary: \"Foundry district. Half the lights are out and both crews like it that way.\",\n    facts: [\n      [\"Sector\", \"CR-02\"],\n      [\"Held by\", \"Contested\"],\n      [\"Residents\", \"97 000\"],\n      [\"Risk\", \"High\"],\n    ],\n    text: [\n      \"Cinder Row is foundries, scrapyards and the housing built to serve them. Half the street lighting failed years ago and nobody has asked for it back.\",\n      \"The Neon Jackals hold the yards and the Static Saints hold the roofs. The line between them moves about a block a month.\",\n      \"Kestrel Arms tests here under a permit that lists the district as unoccupied.\",\n    ],\n    notes: [\n      [\"10.21\", \"Yard 6 changed hands. Quietly.\"],\n      [\"11.07\", \"Patrol sweep at dusk. No arrests.\"],\n      [\"11.15\", \"Foundry 2 running a night shift again.\"],\n    ],\n    links: [\"dex-marlowe\", \"kestrel-kr9\", \"the-stacks\"],\n  },\n  {\n    id: \"the-stacks\",\n    section: \"places\",\n    name: \"The Stacks\",\n    meta: \"ST-27\",\n    code: \"D-ST27\",\n    summary: \"Forty levels of container housing. The lifts stop at twelve.\",\n    facts: [\n      [\"Sector\", \"ST-27\"],\n      [\"Held by\", \"Static Saints\"],\n      [\"Residents\", \"530 000\"],\n      [\"Risk\", \"Moderate\"],\n    ],\n    text: [\n      \"The Stacks are forty levels of container housing bolted to a frame that was meant to be temporary. The lifts stop at level twelve. Everything above that is stairs.\",\n      \"The Static Saints keep the power on and the stairwells clear, and take their fee through the meter.\",\n      \"Signal is poor above level thirty. People who live there consider that a feature.\",\n    ],\n    notes: [\n      [\"10.24\", \"Level 19 walkway closed for welding.\"],\n      [\"11.02\", \"Meter rates up four percent.\"],\n      [\"11.13\", \"No signal above level 30 for six hours.\"],\n    ],\n    links: [\"ilya-brandt\", \"cinder-row\", \"null-ping\"],\n  },\n  {\n    id: \"vanta-mk2\",\n    section: \"machines\",\n    name: \"Vanta Mk.II deck\",\n    meta: \"Deck\",\n    code: \"M-VT02\",\n    summary: \"Intrusion deck by Vanta Systems. Sixteen units of memory, two revisions behind.\",\n    facts: [\n      [\"Maker\", \"Vanta Systems\"],\n      [\"Class\", \"Intrusion deck\"],\n      [\"Memory\", \"16 units\"],\n      [\"Firmware\", \"Rev 0.1\"],\n    ],\n    text: [\n      \"The Mk.II is the deck Vanta Systems issues to its own relay technicians: sixteen units of memory, four ports and a case that opens without tools.\",\n      \"Most of the ones in the Sprawl left Vanta without paperwork. Their firmware is two revisions behind, which is why they still run daemons the new ones refuse.\",\n      \"It runs hot under load. Ilya Brandt fits a second heat spreader and charges for it.\",\n    ],\n    notes: [\n      [\"10.28\", \"Reflashed at the Stacks bench.\"],\n      [\"11.06\", \"Port 3 intermittent. Reseated.\"],\n      [\"11.12\", \"Held three daemons for forty minutes without a fault.\"],\n    ],\n    links: [\"ilya-brandt\", \"ghostwrite\", \"deadlock\"],\n    shape: \"deck\",\n  },\n  {\n    id: \"kestrel-kr9\",\n    section: \"machines\",\n    name: \"Kestrel KR-9 carbine\",\n    meta: \"Carbine\",\n    code: \"M-KR09\",\n    summary: \"Short carbine by Kestrel Arms. Licensed to corporate security, common elsewhere.\",\n    facts: [\n      [\"Maker\", \"Kestrel Arms\"],\n      [\"Class\", \"Carbine\"],\n      [\"Feed\", \"30 rounds\"],\n      [\"License\", \"Restricted\"],\n    ],\n    text: [\n      \"The KR-9 is a short carbine sold to corporate security under a restricted license. Kestrel Arms reports that none have been lost.\",\n      \"It takes Onyx Lumen optics on a top rail and logs every round to a chip in the stock. The chip is the first thing a tech removes.\",\n      \"Reliable in salt air, which is why Lowtide prefers it.\",\n    ],\n    notes: [\n      [\"10.20\", \"Crate of twelve listed as destroyed in transit.\"],\n      [\"11.03\", \"Seen at the night market, pier 4.\"],\n      [\"11.10\", \"Log chip pulled and wiped at the Stacks bench.\"],\n    ],\n    links: [\"cinder-row\", \"ilya-brandt\", \"lowtide\"],\n    shape: \"carbine\",\n  },\n  {\n    id: \"patience\",\n    section: \"machines\",\n    name: \"Patience, cargo van\",\n    meta: \"Van\",\n    code: \"M-PT01\",\n    summary: \"Dex Marlowe's van. Unbadged, grey, and faster than it has any reason to be.\",\n    facts: [\n      [\"Maker\", \"Unbadged\"],\n      [\"Class\", \"Cargo van\"],\n      [\"Range\", \"640 km\"],\n      [\"Keeper\", \"Dex Marlowe\"],\n    ],\n    text: [\n      \"Patience is a grey cargo van with no badge and a registration that changes about three times a year. It is kept charged under the Stacks.\",\n      \"The cargo floor lifts. What is under it has not been recorded here at the keeper's request.\",\n      \"It seats two in front and as many as needed in the back, briefly.\",\n    ],\n    notes: [\n      [\"10.30\", \"New plates fitted.\"],\n      [\"11.08\", \"Rear door seal replaced after a Lowtide tide.\"],\n      [\"11.13\", \"Parked under the Stacks, bay 14.\"],\n    ],\n    links: [\"dex-marlowe\", \"the-stacks\", \"lowtide\"],\n    shape: \"van\",\n  },\n  {\n    id: \"solace-lifter\",\n    section: \"machines\",\n    name: \"Solace medevac lifter\",\n    meta: \"Aircraft\",\n    code: \"M-SL06\",\n    summary: \"Tilt-rotor ambulance flown by Solace Mutual. It checks the policy on approach.\",\n    facts: [\n      [\"Maker\", \"Solace Mutual\"],\n      [\"Class\", \"Tilt-rotor\"],\n      [\"Crew\", \"3\"],\n      [\"Response\", \"6 to 40 min\"],\n    ],\n    text: [\n      \"The lifter is a four-rotor ambulance with a crew of three and room for two patients. Solace Mutual keeps eleven in the air over the Sprawl.\",\n      \"Response is six minutes in Meridian Heights and about forty in Lowtide. The policy is checked on approach. A lapsed one turns the lifter around.\",\n      \"Juno Okafor flew one for four years and can describe the sound it makes leaving.\",\n    ],\n    notes: [\n      [\"10.23\", \"Two lifters grounded for rotor inspection.\"],\n      [\"11.05\", \"Turned back over Cinder Row. Policy lapsed.\"],\n      [\"11.14\", \"Landed in Glasswater in five minutes.\"],\n    ],\n    links: [\"juno-okafor\", \"glasswater\", \"cinder-row\"],\n    shape: \"lifter\",\n  },\n  {\n    id: \"ghostwrite\",\n    section: \"programs\",\n    name: \"Ghostwrite\",\n    meta: \"4 RAM\",\n    code: \"X-GW04\",\n    summary: \"Masking daemon. Rewrites a tracer's log so the route reads as someone else's.\",\n    facts: [\n      [\"Class\", \"Masking\"],\n      [\"Cost\", \"4 RAM\"],\n      [\"Author\", \"Unknown\"],\n      [\"Status\", \"Stable\"],\n    ],\n    text: [\n      \"Ghostwrite rewrites a tracer's log while the tracer is still writing it. The route stays open and reads as someone else's.\",\n      \"It is small, old and passed around freely. Nobody claims to have written it, which is the point.\",\n      \"It does not hide traffic. It misattributes it. Choose the someone else with care.\",\n    ],\n    notes: [\n      [\"10.26\", \"Held against a Vanta tracer for nine minutes.\"],\n      [\"11.04\", \"Fails on relays patched after Rev 0.3.\"],\n      [\"11.12\", \"Copy verified against the Stacks bench original.\"],\n    ],\n    links: [\"vanta-mk2\", \"ilya-brandt\", \"null-ping\"],\n  },\n  {\n    id: \"static-bloom\",\n    section: \"programs\",\n    name: \"Static Bloom\",\n    meta: \"6 RAM\",\n    code: \"X-SB06\",\n    summary: \"Jamming daemon. Floods nearby cameras with noise for about ninety seconds.\",\n    facts: [\n      [\"Class\", \"Jamming\"],\n      [\"Cost\", \"6 RAM\"],\n      [\"Author\", \"Sable Quinn\"],\n      [\"Status\", \"Stable\"],\n    ],\n    text: [\n      \"Static Bloom floods every camera on a relay with noise for about ninety seconds. The footage survives. It shows weather.\",\n      \"It is loud. Anyone watching the relay knows something happened, and roughly where.\",\n      \"Written for Glasswater, where being recorded costs more than being noticed.\",\n    ],\n    notes: [\n      [\"10.29\", \"Ninety-four seconds on the east lock mast.\"],\n      [\"11.07\", \"Second use on one relay cut the window in half.\"],\n      [\"11.11\", \"Cleared the laundry row route.\"],\n    ],\n    links: [\"glasswater\", \"sable-quinn\", \"deadlock\"],\n  },\n  {\n    id: \"deadlock\",\n    section: \"programs\",\n    name: \"Deadlock\",\n    meta: \"8 RAM\",\n    code: \"X-DL08\",\n    summary: \"Lockout daemon. Seals a door system in whatever state it finds it.\",\n    facts: [\n      [\"Class\", \"Lockout\"],\n      [\"Cost\", \"8 RAM\"],\n      [\"Author\", \"Static Saints\"],\n      [\"Status\", \"Stable\"],\n    ],\n    text: [\n      \"Deadlock freezes a door system in its current state and holds it there until the deck lets go. Open stays open. Shut stays shut.\",\n      \"It holds for as long as it has memory, and it takes half a Mk.II to run. Plan the rest of the route around that.\",\n      \"It cannot tell which side of the door you are on.\",\n    ],\n    notes: [\n      [\"10.22\", \"Held a Meridian Heights service door for six minutes.\"],\n      [\"11.01\", \"Released early when the deck overheated.\"],\n      [\"11.09\", \"Sealed the wrong stairwell. Noted.\"],\n    ],\n    links: [\"vanta-mk2\", \"the-stacks\", \"static-bloom\"],\n  },\n  {\n    id: \"mirrorfall\",\n    section: \"programs\",\n    name: \"Mirrorfall\",\n    meta: \"11 RAM\",\n    code: \"X-MF11\",\n    summary: \"Decoy daemon. Copies a runner's signature to a second relay across the district.\",\n    facts: [\n      [\"Class\", \"Decoy\"],\n      [\"Cost\", \"11 RAM\"],\n      [\"Author\", \"Sable Quinn\"],\n      [\"Status\", \"Restricted\"],\n    ],\n    text: [\n      \"Mirrorfall copies a runner's signature to a second relay and lets the trace follow the copy. The original keeps working.\",\n      \"It needs eleven units and a relay nobody will miss. The copy lasts until someone arrives to look at it.\",\n      \"Restricted. Sable Quinn decides who gets a copy and has so far decided on no one.\",\n    ],\n    notes: [\n      [\"10.22\", \"First field use. Trace followed the copy to Cinder Row.\"],\n      [\"11.06\", \"Request for a copy declined.\"],\n      [\"11.16\", \"Request for a copy declined again.\"],\n    ],\n    links: [\"sable-quinn\", \"cinder-row\", \"ghostwrite\"],\n  },\n  {\n    id: \"null-ping\",\n    section: \"programs\",\n    name: \"Null Ping\",\n    meta: \"2 RAM\",\n    code: \"X-NP02\",\n    summary: \"Probe daemon. Asks a relay whether anyone is listening and reports the silence.\",\n    facts: [\n      [\"Class\", \"Probe\"],\n      [\"Cost\", \"2 RAM\"],\n      [\"Author\", \"Unknown\"],\n      [\"Status\", \"Stable\"],\n    ],\n    text: [\n      \"Null Ping sends a relay a request with nothing in it and times the answer. A fast answer means the relay is idle. A slow one means it is being watched.\",\n      \"It costs almost nothing and leaves no entry in the log. Run it first.\",\n      \"No answer at all means no signal. Above level thirty of the Stacks, that is normal.\",\n    ],\n    notes: [\n      [\"10.24\", \"Idle relay answered in 12 ms.\"],\n      [\"11.02\", \"Watched relay answered in 340 ms.\"],\n      [\"11.13\", \"No answer from the Stacks, level 31.\"],\n    ],\n    links: [\"the-stacks\", \"ghostwrite\", \"vanta-mk2\"],\n  },\n]\n\nconst entryOf = (id: string) => entries.find((entry) => entry.id === id)!\nconst entriesIn = (section: Section) => entries.filter((entry) => entry.section === section)\nconst sectionOf = (value: Section) => sections.find((section) => section.value === value)!\n\nexport { entries, entriesIn, entryOf, sectionOf, sections }\nexport type { Entry, MachineShape, Section }\n",
      "type": "registry:component",
      "target": "@components/blocks/archive/data.ts"
    }
  ],
  "categories": [
    "screen"
  ],
  "type": "registry:block"
}
