@loadmap/react 0.40.0 → 0.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,49 +1,130 @@
1
- import { _ as Insets, a as LoadmapProps, c as handleOf, d as LoadmapController, f as LoadmapOptions, g as Engine, h as Dot, i as LoadmapPanel, l as usePageTheme, m as Cue, n as Loadmap, o as LoadmapRoot, p as useLoadmap, r as LoadmapHandle, s as Theme, t as LOADMAP_PANELS, u as FullScreenMode } from "./Loadmap-BMlU1-mr.js";
1
+ import { _ as useLoadmap, a as LoadmapProps, b as Engine, c as handleOf, d as Diagram, f as DiagramProps, g as LoadmapOptions, h as LoadmapController, i as LoadmapPanel, l as panelsOf, m as FullScreenMode, n as Loadmap, o as LoadmapRoot, p as Chrome, r as LoadmapHandle, s as Theme, t as LOADMAP_PANELS, u as usePageTheme, v as Cue, y as Dot } from "./Loadmap-CyxcmVoc.js";
2
2
  import { Comparison, Model } from "@loadmap/core";
3
3
  import { fitLinear } from "@loadmap/core/calibrate";
4
4
  import { compact, fmt, multiple, pct, secs } from "@loadmap/core/format";
5
5
  import { MEASURES, fromSnapshot, originText, parseSnapshot, summarize } from "@loadmap/core/measure";
6
6
  import { AnyNodeDef, ClusterDef, EdgeDef, ElkEngine, ElkEngine as ElkEngine$1, FlowColor, FlowView, Label, NodeDef, PoolDef, SubsystemDef, TierDef, View, ViewDef, cluster, defineView, directionOf, edge, node, pool } from "@loadmap/layout";
7
- import { ReactNode } from "react";
7
+ import { CSSProperties, ReactNode, Ref } from "react";
8
8
  export * from "@loadmap/core";
9
- /** The architecture: SVG for the structure, a canvas on top for the dots. Expands to full screen. */
10
- interface DiagramProps {
9
+ /**
10
+ * Where a canvas changes its arrangement, by its own size in pixels (never the window's): from `wide` the panels' tabs
11
+ * are a rail down its edge, narrower a row over the console; under `compact` the open panel is a sheet on the console;
12
+ * lower than `short` the bars fold to a row each; and a full screen from `pin` wide keeps the panel open. `rail` and
13
+ * `panel` are the widths of the rail and of the panel beside the diagram, `tabs` the height of the row of tabs,
14
+ * `menu` that of the row the menu of a low canvas lies in, `sheet` the least a sheet stands.
15
+ */
16
+ export declare const CANVAS: {
17
+ readonly compact: 520;
18
+ readonly wide: 900;
19
+ readonly short: 420;
20
+ readonly pin: 1280;
21
+ readonly rail: 44;
22
+ readonly panel: 340;
23
+ readonly tabs: 36;
24
+ readonly menu: 40;
25
+ readonly sheet: 160;
26
+ };
27
+ /** A canvas's size class: what its width and height give it room for. */
28
+ interface CanvasSize {
29
+ width: 'compact' | 'regular' | 'wide';
30
+ /** Too low for two rows of bars. */
31
+ short: boolean;
32
+ /** Full screen and wide enough: the panel stays open beside the diagram. */
33
+ pinned: boolean;
34
+ }
35
+ interface Slots {
36
+ size: CanvasSize;
37
+ bar: (el: HTMLElement | null) => void;
38
+ console: (el: HTMLElement | null) => void;
39
+ /** The ids of the canvas's panels, in their order. */
40
+ panels: readonly string[];
41
+ /** The panel that is open, by its id. */
42
+ open: string | null;
43
+ /** Opens a panel, or closes the open one (null). `from` gets the keyboard back when it closes. */
44
+ show: (id: string | null, from?: HTMLElement | null) => void;
45
+ /** Something lies over the bar for a while (`over`): the bar is out of reach under it. */
46
+ under: boolean;
47
+ }
48
+ /** The size class of the canvas this is drawn in: a part folds by it, never by the window. */
49
+ export declare function useCanvasSize(): CanvasSize;
50
+ /**
51
+ * The panels of the canvas this is drawn in: their ids, the one that is open, `show` to open or close one, and
52
+ * whether they are away for a while (`under`: something lies over the bar).
53
+ */
54
+ export declare function useCanvasPanels(): Pick<Slots, 'panels' | 'open' | 'show' | 'under'>;
55
+ interface CanvasProps extends Pick<DiagramProps, 'legend' | 'onNodeClick' | 'selected'> {
11
56
  lm: LoadmapController;
12
- legend?: boolean;
13
- /** A click (or Enter) on a box, by its id. Every box is a button then, one without a component too. */
14
- onNodeClick?: (id: string) => void;
15
- /** The box drawn as selected, by its id. */
16
- selected?: string | null;
57
+ /** The region's name for a screen reader. Defaults to the model's title. */
58
+ label?: string;
59
+ /** The panel that is open, by its id; null for none. Leave it out and the canvas keeps it itself. */
60
+ open?: string | null;
61
+ /** The panel open at first, when the canvas keeps it itself. */
62
+ defaultOpen?: string | null;
63
+ /** A panel opened or closed (null). */
64
+ onOpen?: (id: string | null) => void;
65
+ /**
66
+ * What takes the canvas's top for a while (a story's text): it lies over the bar, as tall as it needs, the view
67
+ * moves under it, and the tabs and the open panel are away until it goes. The diagram is not laid out again.
68
+ */
69
+ over?: ReactNode;
17
70
  /**
18
- * The board fills its container, which gives it a height, as a canvas the reader pans and zooms (the wheel alone
19
- * zooms it), with no Full screen button. Insets are the pixels on each side that something of the page floats over:
20
- * Fit frames the diagram in what they leave, and the legend and the zoom buttons stay clear of them.
71
+ * The page around the canvas scrolls: the plain wheel and one finger are the page's, and Ctrl or ⌘ with the wheel,
72
+ * or two fingers, the diagram's. Default: true in a page, false in a root that fills its container. Never in full
73
+ * screen, which has no page under it.
21
74
  */
22
- canvas?: boolean | Partial<Insets>;
75
+ scrolls?: boolean;
76
+ /** The canvas's own element. */
77
+ ref?: Ref<HTMLDivElement>;
78
+ className?: string;
79
+ /** The box's own style: its height, when the page's CSS does not give it. */
80
+ style?: CSSProperties;
81
+ /**
82
+ * `Canvas.Bar` and `Canvas.Console`, each at most once, and a `Canvas.Panel` for each panel: as direct children,
83
+ * since the canvas places them by type.
84
+ */
85
+ children?: ReactNode;
86
+ }
87
+ interface PanelProps {
88
+ /** Its name among the canvas's panels. */
89
+ id: string;
90
+ /** What its tab says. */
91
+ title: string;
92
+ /** Drawn only while the panel is open. */
93
+ children?: ReactNode;
23
94
  }
24
- export declare function Diagram({ lm, legend, onNodeClick, selected, canvas }: DiagramProps): import("react").JSX.Element;
25
95
  /**
26
- * ELK in the worker `make` starts, falling back to the main thread: `<Loadmap elk={workerElk(…)}>` for a page whose
27
- * bundler inlines the worker (`@loadmap/react/elk.worker.js`), or that serves it from another place. Make it once,
28
- * outside a component: each engine starts its own worker.
96
+ * Everything of a loadmap in one box the page sizes: the diagram fills it as a board the reader pans and zooms, a bar
97
+ * lies over its top and a console over its bottom, and one panel at a time opens from its tabs. The diagram is arranged
98
+ * for what the bars and the size class always leave; a panel that opens only moves the view.
29
99
  */
30
- export declare function workerElk(make: () => Worker): ElkEngine$1;
31
- /** The model's one-sentence answer for the current values, and which capacity to measure when it is unsure. */
32
- export declare function Verdict({ lm }: {
33
- lm: LoadmapController;
100
+ export declare function Canvas({ lm, label, open: given, defaultOpen, onOpen, over, scrolls, ref, className, style, children, legend, onNodeClick, selected }: CanvasProps): import("react").JSX.Element;
101
+ export declare namespace Canvas {
102
+ export { Bar };
103
+ export { Console };
104
+ export { Panel };
105
+ }
106
+ /** Over the canvas's top: what the reader chooses from (the scenarios, the story, the tools). */
107
+ declare function Bar({ children }: {
108
+ children?: ReactNode;
34
109
  }): import("react").JSX.Element;
35
- /** Each component's utilization in the order they reach the target, with where they cross it and 100 %. */
36
- export declare function Limits({ lm, title }: {
37
- lm: LoadmapController;
38
- title?: ReactNode;
110
+ /** Over the canvas's bottom: the load and the answer, always in view. */
111
+ declare function Console({ children }: {
112
+ children?: ReactNode;
39
113
  }): import("react").JSX.Element;
114
+ /** One of the canvas's panels: a tab that opens it, one at a time. The canvas draws it; by itself it draws nothing. */
115
+ declare function Panel(_: PanelProps): null;
40
116
  /**
41
- * Live numbers: from the sim, lag and drops per queue, busy workers, rejected requests; from the model, pods running,
42
- * cache answers and retries.
117
+ * ELK in the worker `make` starts, falling back to the main thread: `<Loadmap elk={workerElk(…)}>` for a page whose
118
+ * bundler inlines the worker (`@loadmap/react/elk.worker.js`), or that serves it from another place. Make it once,
119
+ * outside a component: each engine starts its own worker.
43
120
  */
44
- export declare function Meters({ lm }: {
121
+ export declare function workerElk(make: () => Worker): ElkEngine$1;
122
+ /** The colour of a scenario by label; values of the reader's own are drawn in the text colour. */
123
+ export declare function scenarioColor(model: Model, label: string | null): string;
124
+ /** One button per scenario: a reader switches designs without touching the controls. The load stays. */
125
+ export declare function Scenarios({ lm }: {
45
126
  lm: LoadmapController;
46
- }): import("react").JSX.Element;
127
+ }): import("react").JSX.Element | null;
47
128
  /**
48
129
  * The load slider: its label, the load with its date, and a track coloured by what the load does (under the target,
49
130
  * past it, past capacity). Under it, a mark for each preset that sets the load, which a click takes; ← → move a
@@ -60,6 +141,22 @@ export declare function LoadRange({ lm }: {
60
141
  export declare function LoadBar({ lm }: {
61
142
  lm: LoadmapController;
62
143
  }): import("react").JSX.Element;
144
+ /** The model's one-sentence answer for the current values, and which capacity to measure when it is unsure. */
145
+ export declare function Verdict({ lm }: {
146
+ lm: LoadmapController;
147
+ }): import("react").JSX.Element;
148
+ /** Each component's utilization in the order they reach the target, with where they cross it and 100 %. */
149
+ export declare function Limits({ lm, title }: {
150
+ lm: LoadmapController;
151
+ title?: ReactNode;
152
+ }): import("react").JSX.Element;
153
+ /**
154
+ * Live numbers: from the sim, lag and drops per queue, busy workers, rejected requests; from the model, pods running,
155
+ * cache answers and retries.
156
+ */
157
+ export declare function Meters({ lm }: {
158
+ lm: LoadmapController;
159
+ }): import("react").JSX.Element;
63
160
  /**
64
161
  * The load slider (unless `load` is false: the page shows a `LoadBar`), the presets that set no load, and every
65
162
  * parameter, greyed out where it does not apply.
@@ -73,14 +170,8 @@ export declare function Assumptions({ lm, extra }: {
73
170
  lm: LoadmapController;
74
171
  extra?: readonly ReactNode[];
75
172
  }): import("react").JSX.Element;
76
- /** The colour of a scenario by label; values of the reader's own are drawn in the text colour. */
77
- export declare function scenarioColor(model: Model, label: string | null): string;
78
173
  /** The comparison at the shown load: crossings do not depend on it, the verdicts do. */
79
174
  export declare function useComparison(lm: LoadmapController): Comparison;
80
- /** One button per scenario: a reader switches designs without touching the controls. The load stays. */
81
- export declare function Scenarios({ lm }: {
82
- lm: LoadmapController;
83
- }): import("react").JSX.Element | null;
84
175
  /** The scenarios side by side: which buys more headroom, where each first runs out, and per component. */
85
176
  export declare function Compare({ lm, title }: {
86
177
  lm: LoadmapController;
@@ -112,7 +203,7 @@ export declare function Story({ lm }: {
112
203
  * that has its own, set on the root (`.card > .lm`) so they resolve there and reach no nested board; full screen
113
204
  * keeps both.
114
205
  */
115
- export declare const LOADMAP_CSS = "\n.lm { \n --lm-bg: #eef2f5; --lm-surface: #ffffff; --lm-fg: #17212b; --lm-muted: #5d6d7c; --lm-line: #c6d0da;\n --lm-accent: #0b6b8f; --lm-accent-soft: #d6e9f0; --lm-alt: #7a4f9a; --lm-alt-soft: #efe5f6;\n --lm-ok: #2a7f5a; --lm-warn: #b86e00; --lm-drop: #b7392e; --lm-lane: #e3e9ee;\n --lm-lost-fill: #fbefed; --lm-lost-line: #b7392e;\n --lm-tier-base: #f4f7fa; --lm-tier: #e8eef3; --lm-tier-head: #dbe3eb; --lm-tier-fg: #34424f; --lm-tier-line: #c6d0da;\n --lm-s1: #2a78d6; --lm-s2: #eb6834; --lm-s3: #6250d6; --lm-s4: #eda100; color-scheme: light;\n --lm-font: ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif;\n --lm-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n font: 14px/1.45 var(--lm-font); color: var(--lm-fg); background: var(--lm-root-bg, var(--lm-bg));\n display: grid; gap: 14px; padding: var(--lm-pad, 16px); min-width: 0; box-sizing: border-box; }\n@media (prefers-color-scheme: dark) { .lm:not([data-theme=\"light\"]) { \n --lm-bg: #0d141b; --lm-surface: #151e27; --lm-fg: #e4ebf1; --lm-muted: #93a3b3; --lm-line: #2a3744;\n --lm-accent: #5fb7d6; --lm-accent-soft: #163442; --lm-alt: #c39be0; --lm-alt-soft: #2b2236;\n --lm-ok: #5fc08f; --lm-warn: #e2a24a; --lm-drop: #e26a5c; --lm-lane: #1b2631;\n --lm-lost-fill: #2b1c1d; --lm-lost-line: #e26a5c;\n --lm-tier-base: #1b2530; --lm-tier: #24323f; --lm-tier-head: #2c3b4a; --lm-tier-fg: #c3cfda; --lm-tier-line: #33424f;\n --lm-s1: #3987e5; --lm-s2: #d95926; --lm-s3: #9085e9; --lm-s4: #c98500; color-scheme: dark; } }\n.lm[data-theme=\"dark\"] { \n --lm-bg: #0d141b; --lm-surface: #151e27; --lm-fg: #e4ebf1; --lm-muted: #93a3b3; --lm-line: #2a3744;\n --lm-accent: #5fb7d6; --lm-accent-soft: #163442; --lm-alt: #c39be0; --lm-alt-soft: #2b2236;\n --lm-ok: #5fc08f; --lm-warn: #e2a24a; --lm-drop: #e26a5c; --lm-lane: #1b2631;\n --lm-lost-fill: #2b1c1d; --lm-lost-line: #e26a5c;\n --lm-tier-base: #1b2530; --lm-tier: #24323f; --lm-tier-head: #2c3b4a; --lm-tier-fg: #c3cfda; --lm-tier-line: #33424f;\n --lm-s1: #3987e5; --lm-s2: #d95926; --lm-s3: #9085e9; --lm-s4: #c98500; color-scheme: dark; }\n.lm *, .lm *::before, .lm *::after { box-sizing: border-box; }\n.lm h2 { font-size: 1.3rem; font-weight: 600; margin: 0; text-wrap: balance; }\n.lm h3 { font: 600 .74rem var(--lm-font); text-transform: uppercase; letter-spacing: .08em; color: var(--lm-muted); margin: 0; }\n.lm button:focus-visible, .lm input:focus-visible, .lm select:focus-visible { outline: 2px solid var(--lm-accent); outline-offset: 2px; }\n.lm-problems { margin: 0; padding: 10px 12px; font: .8rem/1.5 var(--lm-mono); white-space: pre-wrap; overflow-x: auto; color: var(--lm-fg); background: var(--lm-surface); border: 1px solid var(--lm-line); border-left: 3px solid var(--lm-drop); border-radius: 6px; }\n.lm-note { margin: 0; font-size: .8rem; color: var(--lm-muted); }\n.lm-card { background: var(--lm-surface); border: 1px solid var(--lm-line); border-radius: 8px; padding: 14px 16px; display: grid; gap: 12px; align-content: start; min-width: 0; }\n\n.lm-wrap { display: grid; gap: 8px; min-width: 0; position: relative; }\n.lm-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }\n.lm-btn { font: 500 .8rem var(--lm-font); color: var(--lm-fg); background: var(--lm-surface); border: 1px solid var(--lm-line); border-radius: 6px; padding: 6px 12px; cursor: pointer; white-space: nowrap; }\n.lm-board { position: relative; background: var(--lm-surface); border: 1px solid var(--lm-line); border-radius: 8px; overflow: hidden; margin: 0 auto; width: 100%; }\n.lm-board svg { display: block; width: 100%; height: auto; font-family: var(--lm-font); }\n.lm-board canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }\n/* the story's title over the board while it plays: a lower third, at the top when what is framed is low; a strip\n across the top of a narrow board */\n.lm-title { position: absolute; left: 12px; bottom: 12px; z-index: 1; display: grid; gap: 1px; max-width: min(34rem, calc(100% - 24px)); padding: 7px 12px 8px; border-left: 4px solid var(--lm-accent); border-radius: 0 6px 6px 0; background: color-mix(in srgb, var(--lm-surface) 92%, transparent); box-shadow: 0 4px 16px rgb(0 0 0 / .12); pointer-events: none; overflow-wrap: anywhere; }\n.lm-title[data-top] { top: 12px; bottom: auto; }\n.lm-title b { font-size: .95rem; font-weight: 600; }\n.lm-title span { font: 500 .8rem var(--lm-mono); color: var(--lm-muted); }\n@container (max-width: 520px) {\n .lm-title, .lm-title[data-top] { top: 0; right: 0; bottom: auto; left: 0; max-width: none; padding: 4px 8px; border-radius: 0; box-shadow: none; }\n .lm-title b { font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n .lm-title span { display: none; }\n}\n.lm-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .78rem; color: var(--lm-muted); }\n.lm-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: -1px; margin-right: 5px; }\n.lm-legend i.lm-legend-merge { box-sizing: border-box; border: 1.5px solid var(--lm-muted); }\n\n/* full screen (the browser's, or a fixed overlay): a column that never scrolls. The diagram as wide as the screen on\n top; under it the verdict in a line and the panels, compact, in a dock the screen sizes. The load changes what is\n in them, never their size, so it never moves the board. Focus: the diagram, the story, the verdict and the load */\n.lm-side, .lm-card > .lm-panel { display: contents; }\n.lm-panel { display: grid; gap: 14px; min-width: 0; }\n.lm[data-full] { height: 100vh; height: 100dvh; padding: 16px; background: var(--lm-bg); overflow: hidden; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 10px; position: relative; }\n.lm[data-full=\"fill\"] { height: 100%; padding: 10px; }\n.lm[data-full=\"overlay\"] { position: fixed; inset: 0; z-index: 2147483000; width: auto; max-width: none; max-height: none; margin: 0; border: 0; }\n.lm[data-full] > * { flex: none; }\n/* a page of its own keeps the rest outside full screen, as <Loadmap> does */\n.lm[data-full] > :not(.lm-head, h2, .lm-scenarios, .lm-loadbar, .lm-story, .lm-wrap, .lm-line, .lm-dock, .lm-side) { display: none; }\n.lm-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; min-width: 0; }\n.lm-head h2 { font-size: 1.1rem; }\n.lm-head .lm-loadbar { flex: 1 1 520px; }\n.lm[data-full] .lm-wrap { gap: 6px; }\n/* the board as large as fits (--lm-fit, from Diagram), left under the bar, so the legend starts where the board does */\n.lm[data-full] .lm-board { width: var(--lm-fit, 100%); margin: 0; align-self: start; justify-self: start; }\n.lm-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }\n.lm-modes { display: inline-flex; margin: 0; padding: 0; min-width: 0; border: 1px solid var(--lm-line); border-radius: 6px; overflow: hidden; }\n.lm-modes button { font: 500 .8rem var(--lm-font); color: var(--lm-fg); background: var(--lm-surface); border: 0; padding: 6px 12px; cursor: pointer; }\n.lm-modes button[aria-pressed=\"true\"] { background: var(--lm-fg); color: var(--lm-surface); }\n.lm[data-full] .lm-story { padding: 6px 12px; }\n.lm[data-full] [data-out] { display: none; }\n\n.lm-line { display: flex; align-items: center; gap: 6px 14px; min-width: 0; padding: 6px 12px; border-left: 4px solid var(--lm-ok); background: var(--lm-accent-soft); border-radius: 0 6px 6px 0; }\n.lm-line[data-tier=\"warn\"] { border-color: var(--lm-warn); }\n.lm-line[data-tier=\"over\"] { border-color: var(--lm-drop); }\n.lm-headline { flex: 1 1 auto; min-width: 0; margin: 0; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.lm-num { font: 600 .95em var(--lm-mono); font-variant-numeric: tabular-nums; }\n.lm-link { font: 500 .8rem var(--lm-font); color: var(--lm-accent); background: none; border: 0; padding: 2px 4px; cursor: pointer; white-space: nowrap; }\n\n.lm-dock { display: flex; gap: 10px; min-width: 0; }\n.lm[data-full] > .lm-dock { flex: 1 1 0; min-height: clamp(200px, 26dvh, 340px); }\n.lm-tabs { display: none; margin: 0; padding: 0; border: 0; min-width: 0; }\n.lm-mini { position: relative; flex: 1 1 0; min-width: 0; min-height: 0; display: grid; container-type: inline-size; }\n.lm-mini[data-mini=\"controls\"] { flex-grow: 1.25; }\n.lm-mini[data-mini=\"limits\"] { flex-grow: 1.45; }\n.lm-mini[data-mini=\"live\"] { flex-grow: .8; }\n.lm-mini[data-mini=\"headroom\"] { flex-grow: .9; }\n.lm-mini[data-mini=\"compare\"] { flex-grow: 1.3; }\n.lm-mini > .lm-card { min-height: 0; overflow: hidden; padding: 10px 12px; gap: 6px; align-content: start; }\n.lm-mini [data-clip] { visibility: hidden; }\n.lm-more { position: absolute; top: 6px; right: 6px; font: 500 .8rem var(--lm-font); color: var(--lm-accent); background: var(--lm-surface); border: 0; border-radius: 4px; padding: 2px 6px; cursor: pointer; }\n.lm-more[data-more]:not([data-more=\"\"])::before { content: attr(data-more) \" \"; }\n.lm-mini .lm-meters { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px; }\n.lm-mini .lm-meter { display: flex; align-items: baseline; gap: 8px; padding: 3px 8px; }\n.lm-mini .lm-meter b { flex: none; font-size: .9rem; }\n.lm-mini .lm-meter span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n/* one grid for every row, so the bars line up whatever the names */\n.lm-mini-limits { display: grid; grid-template-columns: minmax(0, max-content) minmax(48px, 1fr) auto auto; gap: 6px 10px; }\n.lm-mini-lim { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; font-size: .8rem; }\n.lm-mini-lim .lm-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.lm-mini-lim .lm-tag { margin-left: 5px; }\n.lm-mini-lim .lm-track { height: 9px; }\n.lm-mini-lim .lm-val { white-space: nowrap; }\n.lm-mini-lim .lm-sub { font: 400 .74rem var(--lm-mono); color: var(--lm-muted); }\n.lm-mini .lm-controls { gap: 6px; column-gap: 16px; }\n.lm-mini .lm-controls small, .lm-mini .lm-controls > h3:not(:first-child) { display: none; }\n.lm-mini .lm-controls label.lm-range { grid-template-columns: minmax(0, 1fr) minmax(90px, 1.2fr); align-items: center; gap: 10px; font-size: .8rem; }\n.lm-mini .lm-select { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: .8rem; }\n.lm-mini .lm-select select { width: auto; padding: 1px 6px; font-size: .78rem; }\n.lm-mini .lm-switch { font-size: .8rem; }\n.lm-mini .lm-switch input { margin-top: 2px; }\n.lm-mini .lm-presets { gap: 4px; }\n.lm-mini .lm-presets button { padding: 2px 8px; font-size: .72rem; }\n@container (min-width: 420px) {\n .lm-mini .lm-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n .lm-mini .lm-controls > :is(h3, .lm-presets) { grid-column: 1 / -1; }\n}\n.lm-mini .lm-compare > :not(h3:first-child, .lm-table-wrap:nth-child(3)) { display: none; }\n.lm-mini .lm-table { font-size: .76rem; }\n.lm-mini .lm-table th, .lm-mini .lm-table td { padding: 3px 8px 3px 0; }\n.lm-mini .lm-table small { display: none; }\n.lm-mini .lm-table thead th { white-space: nowrap; font-size: .6rem; }\n.lm-mini > .lm-card:has(> .lm-spark) { grid-template-rows: auto minmax(0, 1fr) auto; align-content: stretch; }\n.lm-spark { position: relative; min-height: 0; }\n.lm-spark svg { position: absolute; inset: 0; display: block; overflow: hidden; }\n.lm-spark-th { stroke: var(--lm-muted); stroke-dasharray: 4 3; }\n.lm-spark-load { stroke: var(--lm-fg); opacity: .45; }\n.lm-spark-text { margin: 0; font-size: .76rem; color: var(--lm-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n\n/* the drawer: the page's own panel, alone, over the right of the board */\n.lm[data-full] > .lm-drawer:not([data-drawer]) { display: none; }\n.lm[data-full] > .lm-drawer[data-drawer] { display: grid; gap: 14px; align-content: start; position: absolute; top: 16px; right: 16px; bottom: 16px; z-index: 4; width: min(640px, calc(100% - 32px)); overflow: auto; overscroll-behavior: contain; padding: 14px; background: var(--lm-bg); border: 1px solid var(--lm-line); border-radius: 10px; box-shadow: -8px 0 30px rgb(0 0 0 / .2); container-type: inline-size; }\n.lm-side[data-drawer] :is(.lm-panel, .lm-strip, .lm-charts, .lm-card):not([data-drawn]):not(.lm-panel *) { display: none; }\n.lm-side[data-drawer] .lm-strip { grid-template-columns: minmax(0, 1fr); }\n.lm-drawer-bar { display: flex; justify-content: flex-end; }\n\n/* a page of its own: its .lm-side is a box under the board that scrolls on its own, the board as large as leaves it a\n third of the screen */\n.lm[data-full] > .lm-side:not(.lm-drawer) { display: grid; gap: 14px; align-content: start; flex: 1 1 0; min-height: 33dvh; overflow: auto; overscroll-behavior: contain; container-type: inline-size; }\n\n/* focus: the board and what runs on it in the middle of the screen */\n.lm[data-mode=\"focus\"] > .lm-side:not(.lm-drawer) { display: none; }\n.lm[data-mode=\"focus\"] > .lm-wrap { margin-top: auto; }\n.lm[data-mode=\"focus\"] > :is(.lm-story, .lm-line) { order: 1; }\n.lm[data-mode=\"focus\"]::after { content: \"\"; order: 2; margin-top: auto; }\n.lm[data-mode=\"focus\"] > .lm-story { border-left-width: 4px; padding: 10px 14px; }\n.lm[data-mode=\"focus\"] > .lm-story p { font-size: 1.1rem; }\n\n@media (max-width: 760px) {\n .lm[data-full] { padding: 10px; gap: 8px; }\n /* the page has the title, and the legend: here they would leave the diagram no room */\n .lm[data-full] > h2, .lm[data-full] :is(.lm-head h2, .lm-legend, .lm-story legend) { display: none; }\n /* the one exception: here the diagram runs top to bottom, and shrunk to the screen it is too small to read, so it\n pans in a box of its own with the bar on top. The page never scrolls */\n .lm[data-full] .lm-board { width: 100%; }\n .lm[data-full] > .lm-wrap { height: 40dvh; overflow: auto; row-gap: 0; overscroll-behavior: contain; }\n .lm[data-mode=\"focus\"] > .lm-wrap { height: auto; flex: 1 1 0; min-height: 0; margin-top: 0; }\n .lm[data-full] .lm-bar { position: sticky; top: 0; z-index: 1; padding-bottom: 8px; background: var(--lm-bg); }\n .lm[data-full] .lm-line { flex-wrap: wrap; }\n .lm[data-full] > .lm-story { padding: 6px 10px; gap: 6px 10px; }\n .lm[data-full] > .lm-story p { font-size: .84rem; }\n .lm[data-full] .lm-story button { padding: 4px 10px; }\n .lm[data-full] .lm-headline { flex-basis: 100%; }\n .lm-dock { flex-direction: column; min-height: 0; gap: 6px; }\n /* the load bar takes some of the dock's room: the load is no longer in a card */\n .lm[data-full] > .lm-dock { min-height: clamp(170px, 22dvh, 340px); }\n .lm-tabs { display: flex; flex: none; gap: 2px; border-bottom: 1px solid var(--lm-line); overflow: hidden; }\n .lm-tabs button { font: 500 .78rem var(--lm-font); color: var(--lm-muted); background: none; border: 0; border-bottom: 2px solid transparent; padding: 6px 8px; cursor: pointer; white-space: nowrap; }\n .lm-tabs button[aria-pressed=\"true\"] { color: var(--lm-fg); border-color: var(--lm-fg); }\n .lm-mini:not([data-active]) { display: none; }\n .lm[data-full] > .lm-side[data-drawer] { inset: 8px; width: auto; }\n /* the load in thumb reach: the bar under the board and the story, over the verdict */\n .lm[data-full] .lm-head { display: contents; }\n .lm[data-full] .lm-loadbar { order: 2; flex: none; }\n /* two lines, so the board keeps its room: the scenarios and the load's value, then the track; the label names the\n slider unseen */\n .lm[data-full] .lm-load small { display: none; }\n .lm[data-full] .lm-load { display: contents; }\n .lm[data-full] :is(.lm-loadbar legend, .lm-load > label) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }\n .lm[data-full] .lm-load > output { margin-left: auto; }\n .lm[data-full] .lm-load-track { flex: 1 1 100%; }\n .lm[data-full] > :is(.lm-line, .lm-dock) { order: 3; }\n}\n\n.lm-verdict { margin: 0; padding: 10px 14px; border-left: 4px solid var(--lm-ok); background: var(--lm-accent-soft); border-radius: 0 6px 6px 0; }\n.lm-verdict[data-tier=\"warn\"] { border-color: var(--lm-warn); }\n.lm-verdict[data-tier=\"over\"] { border-color: var(--lm-drop); }\n.lm-measure { margin: 6px 0 0; padding: 0 14px; font-size: .86rem; color: var(--lm-muted); }\n\n.lm-strip { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); gap: 14px; align-items: start; }\n@container (max-width: 860px) { .lm-strip { grid-template-columns: minmax(0, 1fr); } }\n.lm { container-type: inline-size; }\n\n.lm-meters { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }\n.lm-meter { padding: 8px 10px; border-radius: 6px; background: var(--lm-bg); min-width: 0; }\n.lm-meter b { display: block; font: 500 1.15rem var(--lm-mono); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.lm-meter span { font-size: .74rem; color: var(--lm-muted); }\n.lm-meter[data-state=\"warn\"] b { color: var(--lm-warn); } .lm-meter[data-state=\"over\"] b { color: var(--lm-drop); }\n\n.lm-limits { display: grid; gap: 10px; }\n.lm-lim, .lm-scale { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr) 10rem; gap: 4px 14px; align-items: center; }\n@container (max-width: 640px) { .lm-lim, .lm-scale { grid-template-columns: minmax(0, 1fr); } .lm-scale > :first-child, .lm-scale > :last-child { display: none; } }\n.lm-lim b { display: block; font-weight: 600; font-size: .88rem; }\n.lm-lim .lm-sub { display: block; font-size: .74rem; color: var(--lm-muted); }\n.lm-tag { font: 600 .64rem var(--lm-font); text-transform: uppercase; letter-spacing: .06em; border-radius: 3px; padding: 1px 5px; margin-left: 6px; vertical-align: 1px; }\n.lm-tag[data-kind=\"first\"] { color: var(--lm-surface); background: var(--lm-drop); }\n.lm-tag[data-kind=\"estimated\"] { color: var(--lm-warn); border: 1px solid currentColor; }\n.lm-tag[data-kind=\"published\"] { color: var(--lm-alt); border: 1px solid currentColor; }\n.lm-tag[data-kind=\"none\"] { color: var(--lm-muted); border: 1px dashed currentColor; }\n.lm-tag[data-kind=\"range\"], .lm-tag[data-kind=\"rank\"] { color: var(--lm-muted); border: 1px solid currentColor; }\n.lm-track { position: relative; height: 16px; background: var(--lm-bg); border-radius: 3px; overflow: hidden; }\n.lm-fill { position: absolute; inset: 0 auto 0 0; background: var(--lm-ok); transition: width .25s ease; }\n.lm-fill[data-state=\"warn\"] { background: var(--lm-warn); } .lm-fill[data-state=\"over\"] { background: var(--lm-drop); }\n.lm-tick { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--lm-fg); opacity: .55; }\n.lm-val { font: 500 .8rem var(--lm-mono); font-variant-numeric: tabular-nums; }\n.lm-val small { display: block; font: 400 .72rem var(--lm-font); color: var(--lm-muted); }\n.lm-scale { font: 400 .7rem var(--lm-mono); color: var(--lm-muted); }\n.lm-scale div { position: relative; height: 12px; }\n.lm-scale div span { position: absolute; transform: translateX(-50%); white-space: nowrap; }\n\n.lm-controls label.lm-range { display: grid; gap: 4px; font-size: .84rem; }\n.lm-controls label.lm-range > span { display: flex; justify-content: space-between; gap: 8px; }\n.lm-controls output { font-family: var(--lm-mono); font-variant-numeric: tabular-nums; }\n.lm-controls input[type=range] { width: 100%; accent-color: var(--lm-accent); }\n.lm-presets { display: flex; flex-wrap: wrap; gap: 6px; }\n.lm-presets button { font: 500 .76rem var(--lm-font); background: var(--lm-accent-soft); color: var(--lm-fg); border: 1px solid transparent; border-radius: 5px; padding: 5px 10px; cursor: pointer; }\n.lm-presets button[aria-pressed=\"true\"] { border-color: var(--lm-accent); }\n.lm-switch { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 8px; align-items: start; font-size: .84rem; cursor: pointer; }\n.lm-switch input { margin: 3px 0 0; accent-color: var(--lm-accent); }\n.lm-switch small, .lm-select small { grid-column: 2; color: var(--lm-muted); font-size: .74rem; line-height: 1.3; }\n.lm-select { display: grid; gap: 4px; font-size: .84rem; }\n.lm-select select { width: 100%; min-width: 0; font: 400 .84rem var(--lm-font); color: var(--lm-fg); background: var(--lm-surface); border: 1px solid var(--lm-line); border-radius: 5px; padding: 5px 8px; }\n.lm-off { opacity: .45; cursor: default; }\n\n.lm-facts { margin: 0; padding-left: 1.1em; font-size: .88rem; columns: 2; column-gap: 28px; }\n@container (max-width: 860px) { .lm-facts { columns: 1; } }\n.lm-facts li { margin-bottom: 8px; break-inside: avoid; }\n.lm-prov { font: 600 .66rem var(--lm-font); text-transform: uppercase; letter-spacing: .06em; }\n.lm-prov[data-kind=\"measured\"] { color: var(--lm-ok); } .lm-prov[data-kind=\"estimated\"] { color: var(--lm-warn); }\n.lm-prov[data-kind=\"configured\"] { color: var(--lm-accent); } .lm-prov[data-kind=\"published\"] { color: var(--lm-alt); }\n\n/* scenario identity colours (s1–s4) are checked for colour-blind separation on both surfaces; text never wears them */\n.lm-scenarios { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }\n.lm-scenarios legend { float: left; font: 600 .74rem var(--lm-font); text-transform: uppercase; letter-spacing: .08em; color: var(--lm-muted); margin-right: 6px; padding: 0; }\n.lm-scenarios button { font: 500 .84rem var(--lm-font); color: var(--lm-fg); background: var(--lm-surface); border: 1px solid var(--lm-line); border-radius: 6px; padding: 6px 12px; cursor: pointer; }\n.lm-scenarios button[aria-pressed=\"true\"] { border-color: var(--lm-fg); box-shadow: inset 0 0 0 1px var(--lm-fg); }\n.lm-scenarios i, .lm-table i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: -1px; margin-right: 6px; }\n.lm-story { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; min-width: 0; padding: 8px 12px; border: 1px solid var(--lm-line); border-left: 3px solid var(--lm-accent); border-radius: 6px; background: var(--lm-surface); }\n.lm-story legend { float: left; font: 600 .74rem var(--lm-font); text-transform: uppercase; letter-spacing: .08em; color: var(--lm-muted); padding: 0; }\n.lm-story p { flex: 1 1 240px; display: grid; margin: 0; font: 400 .9rem/1.4 var(--lm-font); color: var(--lm-fg); }\n.lm-story p > span { grid-area: 1 / 1; }\n.lm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }\n.lm-story p > span:not([data-shown]), .lm-story em:not([data-shown]) { visibility: hidden; }\n.lm-story-progress { display: flex; align-items: center; gap: 4px; }\n.lm-story-progress i { position: relative; width: 28px; height: 4px; border-radius: 2px; background: var(--lm-line); overflow: hidden; }\n.lm-story-progress i[data-state=\"done\"], .lm-story:not([data-playing]) .lm-story-progress i[data-state=\"now\"] { background: var(--lm-accent); }\n.lm-story[data-playing] .lm-story-progress i[data-state=\"now\"]::before { content: \"\"; position: absolute; inset: 0; background: var(--lm-accent); transform-origin: left; animation: lm-step var(--lm-step) linear both; }\n@keyframes lm-step { from { transform: scaleX(0); } to { transform: scaleX(1); } }\n.lm-story b { font-weight: 600; color: var(--lm-muted); margin-right: 4px; white-space: nowrap; }\n.lm-story-nav { display: flex; gap: 6px; }\n.lm-story em { color: var(--lm-muted); }\n.lm-story button { font: 500 .84rem var(--lm-font); color: var(--lm-fg); background: var(--lm-surface); border: 1px solid var(--lm-line); border-radius: 6px; padding: 6px 12px; cursor: pointer; }\n.lm-story button[aria-disabled=\"true\"] { opacity: .45; cursor: default; }\n.lm-own { font-size: .78rem; color: var(--lm-muted); }\n\n/* the scenarios and the load over the board, in view while the page scrolls; on a phone under the board */\n.lm-loadbar { position: sticky; top: var(--lm-sticky-top, 0px); z-index: 3; container-type: inline-size; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; padding: 6px 12px 2px; background: var(--lm-surface); border: 1px solid var(--lm-line); border-radius: 8px; box-shadow: 0 4px 14px -10px rgb(0 0 0 / .4); }\n.lm-loadbar .lm-scenarios { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; padding: 2px; }\n.lm-loadbar .lm-scenarios button { flex: none; white-space: nowrap; }\n.lm-loadbar .lm-load { flex: 1 1 300px; }\n@container (min-width: 720px) {\n .lm-loadbar .lm-load { grid-template: \"label track value\" / minmax(0, max-content) minmax(160px, 1fr) auto; align-items: start; }\n .lm-loadbar .lm-load > label { max-width: 14em; padding-top: 6px; }\n}\n@container (max-width: 520px) {\n .lm:not([data-full]) > .lm-loadbar { order: 1; top: auto; bottom: 0; }\n .lm:not([data-full]) > .lm-side { order: 2; }\n}\n/* the load: its label and value, the track under them, the marks under it */\n.lm-load { display: grid; grid-template: \"label value\" \"track track\" / minmax(0, 1fr) auto; align-items: center; gap: 0 12px; font-size: .84rem; min-width: 0; }\n.lm-load > label { grid-area: label; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.lm-load > output { grid-area: value; text-align: right; font: 600 .95rem/1.2 var(--lm-mono); font-variant-numeric: tabular-nums; }\n.lm-load small { display: block; font: 400 .7rem var(--lm-mono); color: var(--lm-muted); }\n.lm-load-track { grid-area: track; position: relative; min-width: 0; padding-bottom: 22px; }\n.lm-load input { display: block; width: 100%; height: 32px; margin: 0; accent-color: var(--lm-accent); cursor: pointer; }\n.lm-zones, .lm-marks { position: absolute; left: 8px; right: 8px; top: 30px; }\n.lm-zones { height: 4px; border-radius: 2px; }\n.lm-marks button { position: absolute; top: 0; transform: translateX(-50%); min-width: 20px; height: 24px; padding: 7px 2px 0; border: 0; background: none; font: 500 .68rem var(--lm-mono); color: var(--lm-accent); white-space: nowrap; cursor: pointer; }\n.lm-marks button::before { content: \"\"; position: absolute; left: 50%; top: 0; width: 2px; height: 6px; margin-left: -1px; background: currentColor; }\n.lm-marks button:not([data-label]) span { display: none; }\n.lm-marks [data-kind=\"target\"] { color: var(--lm-warn); }\n.lm-marks [data-kind=\"full\"] { color: var(--lm-drop); }\n.lm-marks [aria-pressed=\"true\"] { font-weight: 700; text-decoration: underline; }\n.lm-key { display: inline-block; width: 14px; height: 2px; border-radius: 1px; vertical-align: 3px; margin-right: 6px; }\n\n.lm-compare-text { margin: 0; }\n.lm-table-wrap { overflow-x: auto; }\n.lm-table { border-collapse: collapse; width: 100%; font-size: .84rem; }\n.lm-table th, .lm-table td { text-align: left; padding: 6px 10px 6px 0; border-bottom: 1px solid var(--lm-line); vertical-align: top; }\n.lm-table thead th { font: 600 .7rem var(--lm-font); text-transform: uppercase; letter-spacing: .06em; color: var(--lm-muted); }\n.lm-table tbody th { font-weight: 600; white-space: nowrap; }\n.lm-table td { font-family: var(--lm-mono); font-variant-numeric: tabular-nums; }\n.lm-table td.lm-text { font-family: var(--lm-font); }\n.lm-table td small { display: block; font: 400 .72rem var(--lm-font); color: var(--lm-muted); }\n.lm-table tr[aria-current] th { text-decoration: underline; text-underline-offset: 3px; }\n\n.lm-chart { position: relative; min-width: 0; }\n.lm-chart svg { display: block; overflow: visible; }\n.lm-chart:focus-visible { outline: 2px solid var(--lm-accent); outline-offset: 2px; }\n.lm-axis, .lm-axis text { font: 400 11px var(--lm-mono); fill: var(--lm-muted); }\n.lm-mark { font: 600 11px var(--lm-mono); fill: var(--lm-fg); }\n.lm-tip { position: absolute; z-index: 2; display: grid; gap: 2px; width: max-content; max-width: min(17rem, calc(100% - 8px)); overflow-wrap: anywhere; padding: 8px 10px; font-size: .78rem; background: var(--lm-surface); color: var(--lm-fg); border: 1px solid var(--lm-line); border-radius: 6px; box-shadow: 0 4px 14px rgb(0 0 0 / .14); pointer-events: none; }\n.lm-tip strong { font: 600 .82rem var(--lm-mono); font-variant-numeric: tabular-nums; }\n.lm-tip .lm-sub { color: var(--lm-muted); }\n.lm-nowrap { white-space: nowrap; }\n.lm-node { cursor: pointer; outline: none; }\n.lm-node:focus-visible > :first-child { stroke-width: 3; }\n\n@media (prefers-reduced-motion: reduce) {\n .lm-fill { transition: none; }\n .lm-story[data-playing] .lm-story-progress i[data-state=\"now\"]::before { animation: none; transform: none; }\n}\n";
206
+ export declare const LOADMAP_CSS = "\n.lm { \n --lm-bg: #eef2f5; --lm-surface: #ffffff; --lm-fg: #17212b; --lm-muted: #5d6d7c; --lm-line: #c6d0da;\n --lm-accent: #0b6b8f; --lm-accent-soft: #d6e9f0; --lm-alt: #7a4f9a; --lm-alt-soft: #efe5f6;\n --lm-ok: #2a7f5a; --lm-warn: #b86e00; --lm-drop: #b7392e; --lm-lane: #e3e9ee;\n --lm-lost-fill: #fbefed; --lm-lost-line: #b7392e;\n --lm-tier-base: #f4f7fa; --lm-tier: #e8eef3; --lm-tier-head: #dbe3eb; --lm-tier-fg: #34424f; --lm-tier-line: #c6d0da;\n --lm-s1: #2a78d6; --lm-s2: #eb6834; --lm-s3: #6250d6; --lm-s4: #eda100; color-scheme: light;\n --lm-font: ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif;\n --lm-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n font: 14px/1.45 var(--lm-font); color: var(--lm-fg); background: var(--lm-root-bg, var(--lm-bg));\n display: grid; gap: 14px; padding: var(--lm-pad, 16px); min-width: 0; box-sizing: border-box; }\n@media (prefers-color-scheme: dark) { .lm:not([data-theme=\"light\"]) { \n --lm-bg: #0d141b; --lm-surface: #151e27; --lm-fg: #e4ebf1; --lm-muted: #93a3b3; --lm-line: #2a3744;\n --lm-accent: #5fb7d6; --lm-accent-soft: #163442; --lm-alt: #c39be0; --lm-alt-soft: #2b2236;\n --lm-ok: #5fc08f; --lm-warn: #e2a24a; --lm-drop: #e26a5c; --lm-lane: #1b2631;\n --lm-lost-fill: #2b1c1d; --lm-lost-line: #e26a5c;\n --lm-tier-base: #1b2530; --lm-tier: #24323f; --lm-tier-head: #2c3b4a; --lm-tier-fg: #c3cfda; --lm-tier-line: #33424f;\n --lm-s1: #3987e5; --lm-s2: #d95926; --lm-s3: #9085e9; --lm-s4: #c98500; color-scheme: dark; } }\n.lm[data-theme=\"dark\"] { \n --lm-bg: #0d141b; --lm-surface: #151e27; --lm-fg: #e4ebf1; --lm-muted: #93a3b3; --lm-line: #2a3744;\n --lm-accent: #5fb7d6; --lm-accent-soft: #163442; --lm-alt: #c39be0; --lm-alt-soft: #2b2236;\n --lm-ok: #5fc08f; --lm-warn: #e2a24a; --lm-drop: #e26a5c; --lm-lane: #1b2631;\n --lm-lost-fill: #2b1c1d; --lm-lost-line: #e26a5c;\n --lm-tier-base: #1b2530; --lm-tier: #24323f; --lm-tier-head: #2c3b4a; --lm-tier-fg: #c3cfda; --lm-tier-line: #33424f;\n --lm-s1: #3987e5; --lm-s2: #d95926; --lm-s3: #9085e9; --lm-s4: #c98500; color-scheme: dark; }\n.lm *, .lm *::before, .lm *::after { box-sizing: border-box; }\n.lm h2 { font-size: 1.3rem; font-weight: 600; margin: 0; text-wrap: balance; }\n.lm h3 { font: 600 .74rem var(--lm-font); text-transform: uppercase; letter-spacing: .08em; color: var(--lm-muted); margin: 0; }\n.lm button:focus-visible, .lm input:focus-visible, .lm select:focus-visible { outline: 2px solid var(--lm-accent); outline-offset: 2px; }\n.lm-problems { margin: 0; padding: 10px 12px; font: .8rem/1.5 var(--lm-mono); white-space: pre-wrap; overflow-x: auto; color: var(--lm-fg); background: var(--lm-surface); border: 1px solid var(--lm-line); border-left: 3px solid var(--lm-drop); border-radius: 6px; }\n.lm-note { margin: 0; font-size: .8rem; color: var(--lm-muted); }\n.lm-card { background: var(--lm-surface); border: 1px solid var(--lm-line); border-radius: 8px; padding: 14px 16px; display: grid; gap: 12px; align-content: start; min-width: 0; }\n\n.lm-wrap { display: grid; gap: 8px; min-width: 0; position: relative; }\n.lm-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }\n.lm-btn { font: 500 .8rem var(--lm-font); color: var(--lm-fg); background: var(--lm-surface); border: 1px solid var(--lm-line); border-radius: 6px; padding: 6px 12px; cursor: pointer; white-space: nowrap; }\n.lm-board { position: relative; background: var(--lm-surface); border: 1px solid var(--lm-line); border-radius: 8px; overflow: hidden; margin: 0 auto; width: 100%; }\n.lm-board svg { display: block; width: 100%; height: auto; font-family: var(--lm-font); }\n.lm-board canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }\n/* the story's title over the board while it plays: a lower third, at the top when what is framed is low; a strip\n across the top of a narrow board */\n.lm-title { position: absolute; left: 12px; bottom: 12px; z-index: 1; display: grid; gap: 1px; max-width: min(34rem, calc(100% - 24px)); padding: 7px 12px 8px; border-left: 4px solid var(--lm-accent); border-radius: 0 6px 6px 0; background: color-mix(in srgb, var(--lm-surface) 92%, transparent); box-shadow: 0 4px 16px rgb(0 0 0 / .12); pointer-events: none; overflow-wrap: anywhere; }\n.lm-title[data-top] { top: 12px; bottom: auto; }\n.lm-title b { font-size: .95rem; font-weight: 600; }\n.lm-title span { font: 500 .8rem var(--lm-mono); color: var(--lm-muted); }\n@container (max-width: 520px) {\n .lm-title, .lm-title[data-top] { top: 0; right: 0; bottom: auto; left: 0; max-width: none; padding: 4px 8px; border-radius: 0; box-shadow: none; }\n .lm-title b { font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n .lm-title span { display: none; }\n}\n.lm-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .78rem; color: var(--lm-muted); }\n.lm-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: -1px; margin-right: 5px; }\n.lm-legend i.lm-legend-merge { box-sizing: border-box; border: 1.5px solid var(--lm-muted); }\n\n/* full screen (the browser's, or a fixed overlay): a column that never scrolls. The diagram as wide as the screen on\n top; under it the verdict in a line and the panels, compact, in a dock the screen sizes. The load changes what is\n in them, never their size, so it never moves the board. Focus: the diagram, the story, the verdict and the load */\n.lm-side, .lm-card > .lm-panel { display: contents; }\n.lm-panel { display: grid; gap: 14px; min-width: 0; }\n.lm[data-full] { height: 100vh; height: 100dvh; padding: 16px; background: var(--lm-bg); overflow: hidden; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 10px; position: relative; }\n.lm[data-full=\"fill\"] { height: 100%; padding: 10px; }\n.lm[data-full=\"overlay\"] { position: fixed; inset: 0; z-index: 2147483000; width: auto; max-width: none; max-height: none; margin: 0; border: 0; }\n.lm[data-full] > * { flex: none; }\n/* a page of its own keeps the rest outside full screen, as <Loadmap> does */\n.lm[data-full] > :not(.lm-canvas, .lm-head, h2, .lm-scenarios, .lm-loadbar, .lm-story, .lm-wrap, .lm-side) { display: none; }\n.lm-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; min-width: 0; }\n.lm-head h2 { font-size: 1.1rem; }\n.lm-head .lm-loadbar { flex: 1 1 520px; }\n.lm[data-full] .lm-wrap { gap: 6px; }\n/* the board as large as fits (--lm-fit, from Diagram), left under the bar, so the legend starts where the board does */\n.lm[data-full] .lm-board { width: var(--lm-fit, 100%); margin: 0; align-self: start; justify-self: start; }\n.lm-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }\n.lm-modes { display: inline-flex; margin: 0; padding: 0; min-width: 0; border: 1px solid var(--lm-line); border-radius: 6px; overflow: hidden; }\n.lm-modes button { font: 500 .8rem var(--lm-font); color: var(--lm-fg); background: var(--lm-surface); border: 0; padding: 6px 12px; cursor: pointer; }\n.lm-modes button[aria-pressed=\"true\"] { background: var(--lm-fg); color: var(--lm-surface); }\n.lm[data-full] .lm-story { padding: 6px 12px; }\n.lm[data-full] [data-out] { display: none; }\n\n.lm-headline { flex: 1 1 auto; min-width: 0; margin: 0; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.lm-num { font: 600 .95em var(--lm-mono); font-variant-numeric: tabular-nums; }\n.lm-link { font: 500 .8rem var(--lm-font); color: var(--lm-accent); background: none; border: 0; padding: 2px 4px; cursor: pointer; white-space: nowrap; }\n\n\n\n/* a page of its own: its .lm-side is a box under the board that scrolls on its own, the board as large as leaves it a\n third of the screen */\n.lm[data-full] > .lm-side { display: grid; gap: 14px; align-content: start; flex: 1 1 0; min-height: 33dvh; overflow: auto; overscroll-behavior: contain; container-type: inline-size; }\n\n/* focus: the board and what runs on it in the middle of the screen */\n.lm[data-mode=\"focus\"] > .lm-side { display: none; }\n.lm[data-mode=\"focus\"] > .lm-wrap { margin-top: auto; }\n.lm[data-mode=\"focus\"] > .lm-story { order: 1; }\n.lm[data-mode=\"focus\"]::after { content: \"\"; order: 2; margin-top: auto; }\n.lm[data-mode=\"focus\"] > .lm-story { border-left-width: 4px; padding: 10px 14px; }\n.lm[data-mode=\"focus\"] > .lm-story p { font-size: 1.1rem; }\n\n@media (max-width: 760px) {\n .lm[data-full] { padding: 10px; gap: 8px; }\n /* the page has the title, and the legend: here they would leave the diagram no room */\n .lm[data-full] > h2, .lm[data-full] :is(.lm-head h2, .lm-legend, .lm-story legend) { display: none; }\n /* the one exception: here the diagram runs top to bottom, and shrunk to the screen it is too small to read, so it\n pans in a box of its own with the bar on top. The page never scrolls */\n .lm[data-full] .lm-board { width: 100%; }\n .lm[data-full] > .lm-wrap { height: 40dvh; overflow: auto; row-gap: 0; overscroll-behavior: contain; }\n .lm[data-mode=\"focus\"] > .lm-wrap { height: auto; flex: 1 1 0; min-height: 0; margin-top: 0; }\n .lm[data-full] .lm-bar { position: sticky; top: 0; z-index: 1; padding-bottom: 8px; background: var(--lm-bg); }\n .lm[data-full] > .lm-story { padding: 6px 10px; gap: 6px 10px; }\n .lm[data-full] > .lm-story p { font-size: .84rem; }\n .lm[data-full] .lm-story button { padding: 4px 10px; }\n .lm[data-full] .lm-headline { flex-basis: 100%; }\n /* the load in thumb reach: the bar under the board and the story, over the verdict */\n .lm[data-full] .lm-head { display: contents; }\n .lm[data-full] .lm-loadbar { order: 2; flex: none; }\n /* two lines, so the board keeps its room: the scenarios and the load's value, then the track; the label names the\n slider unseen */\n .lm[data-full] .lm-load small { display: none; }\n .lm[data-full] .lm-load { display: contents; }\n .lm[data-full] :is(.lm-loadbar legend, .lm-load > label) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }\n .lm[data-full] .lm-load > output { margin-left: auto; }\n .lm[data-full] .lm-load-track { flex: 1 1 100%; }\n}\n\n.lm-verdict { margin: 0; padding: 10px 14px; border-left: 4px solid var(--lm-ok); background: var(--lm-accent-soft); border-radius: 0 6px 6px 0; }\n.lm-verdict[data-tier=\"warn\"] { border-color: var(--lm-warn); }\n.lm-verdict[data-tier=\"over\"] { border-color: var(--lm-drop); }\n.lm-measure { margin: 6px 0 0; padding: 0 14px; font-size: .86rem; color: var(--lm-muted); }\n\n.lm-strip { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); gap: 14px; align-items: start; }\n@container (max-width: 860px) { .lm-strip { grid-template-columns: minmax(0, 1fr); } }\n.lm { container-type: inline-size; }\n\n.lm-meters { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }\n.lm-meter { padding: 8px 10px; border-radius: 6px; background: var(--lm-bg); min-width: 0; }\n.lm-meter b { display: block; font: 500 1.15rem var(--lm-mono); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.lm-meter span { font-size: .74rem; color: var(--lm-muted); }\n.lm-meter[data-state=\"warn\"] b { color: var(--lm-warn); } .lm-meter[data-state=\"over\"] b { color: var(--lm-drop); }\n\n.lm-limits { display: grid; gap: 10px; }\n.lm-lim, .lm-scale { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr) 10rem; gap: 4px 14px; align-items: center; }\n@container (max-width: 640px) { .lm-lim, .lm-scale { grid-template-columns: minmax(0, 1fr); } .lm-scale > :first-child, .lm-scale > :last-child { display: none; } }\n.lm-lim b { display: block; font-weight: 600; font-size: .88rem; }\n.lm-lim .lm-sub { display: block; font-size: .74rem; color: var(--lm-muted); }\n.lm-tag { font: 600 .64rem var(--lm-font); text-transform: uppercase; letter-spacing: .06em; border-radius: 3px; padding: 1px 5px; margin-left: 6px; vertical-align: 1px; }\n.lm-tag[data-kind=\"first\"] { color: var(--lm-surface); background: var(--lm-drop); }\n.lm-tag[data-kind=\"estimated\"] { color: var(--lm-warn); border: 1px solid currentColor; }\n.lm-tag[data-kind=\"published\"] { color: var(--lm-alt); border: 1px solid currentColor; }\n.lm-tag[data-kind=\"none\"] { color: var(--lm-muted); border: 1px dashed currentColor; }\n.lm-tag[data-kind=\"range\"], .lm-tag[data-kind=\"rank\"] { color: var(--lm-muted); border: 1px solid currentColor; }\n.lm-track { position: relative; height: 16px; background: var(--lm-bg); border-radius: 3px; overflow: hidden; }\n.lm-fill { position: absolute; inset: 0 auto 0 0; background: var(--lm-ok); transition: width .25s ease; }\n.lm-fill[data-state=\"warn\"] { background: var(--lm-warn); } .lm-fill[data-state=\"over\"] { background: var(--lm-drop); }\n.lm-tick { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--lm-fg); opacity: .55; }\n.lm-val { font: 500 .8rem var(--lm-mono); font-variant-numeric: tabular-nums; }\n.lm-val small { display: block; font: 400 .72rem var(--lm-font); color: var(--lm-muted); }\n.lm-scale { font: 400 .7rem var(--lm-mono); color: var(--lm-muted); }\n.lm-scale div { position: relative; height: 12px; }\n.lm-scale div span { position: absolute; transform: translateX(-50%); white-space: nowrap; }\n\n.lm-controls label.lm-range { display: grid; gap: 4px; font-size: .84rem; }\n.lm-controls label.lm-range > span { display: flex; justify-content: space-between; gap: 8px; }\n.lm-controls output { font-family: var(--lm-mono); font-variant-numeric: tabular-nums; }\n.lm-controls input[type=range] { width: 100%; accent-color: var(--lm-accent); }\n.lm-presets { display: flex; flex-wrap: wrap; gap: 6px; }\n.lm-presets button { font: 500 .76rem var(--lm-font); background: var(--lm-accent-soft); color: var(--lm-fg); border: 1px solid transparent; border-radius: 5px; padding: 5px 10px; cursor: pointer; }\n.lm-presets button[aria-pressed=\"true\"] { border-color: var(--lm-accent); }\n.lm-switch { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 8px; align-items: start; font-size: .84rem; cursor: pointer; }\n.lm-switch input { margin: 3px 0 0; accent-color: var(--lm-accent); }\n.lm-switch small, .lm-select small { grid-column: 2; color: var(--lm-muted); font-size: .74rem; line-height: 1.3; }\n.lm-select { display: grid; gap: 4px; font-size: .84rem; }\n.lm-select select { width: 100%; min-width: 0; font: 400 .84rem var(--lm-font); color: var(--lm-fg); background: var(--lm-surface); border: 1px solid var(--lm-line); border-radius: 5px; padding: 5px 8px; }\n.lm-off { opacity: .45; cursor: default; }\n\n.lm-facts { margin: 0; padding-left: 1.1em; font-size: .88rem; columns: 2; column-gap: 28px; }\n@container (max-width: 860px) { .lm-facts { columns: 1; } }\n.lm-facts li { margin-bottom: 8px; break-inside: avoid; }\n.lm-prov { font: 600 .66rem var(--lm-font); text-transform: uppercase; letter-spacing: .06em; }\n.lm-prov[data-kind=\"measured\"] { color: var(--lm-ok); } .lm-prov[data-kind=\"estimated\"] { color: var(--lm-warn); }\n.lm-prov[data-kind=\"configured\"] { color: var(--lm-accent); } .lm-prov[data-kind=\"published\"] { color: var(--lm-alt); }\n\n/* scenario identity colours (s1–s4) are checked for colour-blind separation on both surfaces; text never wears them */\n.lm-scenarios { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }\n.lm-scenarios legend { float: left; font: 600 .74rem var(--lm-font); text-transform: uppercase; letter-spacing: .08em; color: var(--lm-muted); margin-right: 6px; padding: 0; }\n.lm-scenarios button { font: 500 .84rem var(--lm-font); color: var(--lm-fg); background: var(--lm-surface); border: 1px solid var(--lm-line); border-radius: 6px; padding: 6px 12px; cursor: pointer; }\n.lm-scenarios button[aria-pressed=\"true\"] { border-color: var(--lm-fg); box-shadow: inset 0 0 0 1px var(--lm-fg); }\n.lm-scenarios i, .lm-table i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: -1px; margin-right: 6px; }\n.lm-story { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; min-width: 0; padding: 8px 12px; border: 1px solid var(--lm-line); border-left: 3px solid var(--lm-accent); border-radius: 6px; background: var(--lm-surface); }\n.lm-story legend { float: left; font: 600 .74rem var(--lm-font); text-transform: uppercase; letter-spacing: .08em; color: var(--lm-muted); padding: 0; }\n.lm-story p { flex: 1 1 240px; display: grid; margin: 0; font: 400 .9rem/1.4 var(--lm-font); color: var(--lm-fg); }\n.lm-story p > span { grid-area: 1 / 1; }\n.lm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }\n.lm-story p > span:not([data-shown]), .lm-story em:not([data-shown]) { visibility: hidden; }\n.lm-story-progress { display: flex; align-items: center; gap: 4px; }\n.lm-story-progress i { position: relative; width: 28px; height: 4px; border-radius: 2px; background: var(--lm-line); overflow: hidden; }\n.lm-story-progress i[data-state=\"done\"], .lm-story:not([data-playing]) .lm-story-progress i[data-state=\"now\"] { background: var(--lm-accent); }\n.lm-story[data-playing] .lm-story-progress i[data-state=\"now\"]::before { content: \"\"; position: absolute; inset: 0; background: var(--lm-accent); transform-origin: left; animation: lm-step var(--lm-step) linear both; }\n@keyframes lm-step { from { transform: scaleX(0); } to { transform: scaleX(1); } }\n.lm-story b { font-weight: 600; color: var(--lm-muted); margin-right: 4px; white-space: nowrap; }\n.lm-story-nav { display: flex; gap: 6px; }\n.lm-story em { color: var(--lm-muted); }\n.lm-story button { font: 500 .84rem var(--lm-font); color: var(--lm-fg); background: var(--lm-surface); border: 1px solid var(--lm-line); border-radius: 6px; padding: 6px 12px; cursor: pointer; }\n.lm-story button[aria-disabled=\"true\"] { opacity: .45; cursor: default; }\n.lm-own { font-size: .78rem; color: var(--lm-muted); }\n\n/* the scenarios and the load over the board, in view while the page scrolls; on a phone under the board */\n.lm-loadbar { position: sticky; top: var(--lm-sticky-top, 0px); z-index: 3; container-type: inline-size; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; padding: 6px 12px 2px; background: var(--lm-surface); border: 1px solid var(--lm-line); border-radius: 8px; box-shadow: 0 4px 14px -10px rgb(0 0 0 / .4); }\n.lm-loadbar .lm-scenarios { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; padding: 2px; }\n.lm-loadbar .lm-scenarios button { flex: none; white-space: nowrap; }\n.lm-loadbar .lm-load { flex: 1 1 300px; }\n@container (min-width: 720px) {\n .lm-loadbar .lm-load { grid-template: \"label track value\" / minmax(0, max-content) minmax(160px, 1fr) auto; align-items: start; }\n .lm-loadbar .lm-load > label { max-width: 14em; padding-top: 6px; }\n}\n@container (max-width: 520px) {\n .lm:not([data-full]) > .lm-loadbar { order: 1; top: auto; bottom: 0; }\n .lm:not([data-full]) > .lm-side { order: 2; }\n}\n/* the load: its label and value, the track under them, the marks under it */\n.lm-load { display: grid; grid-template: \"label value\" \"track track\" / minmax(0, 1fr) auto; align-items: center; gap: 0 12px; font-size: .84rem; min-width: 0; }\n.lm-load > label { grid-area: label; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.lm-load > output { grid-area: value; text-align: right; font: 600 .95rem/1.2 var(--lm-mono); font-variant-numeric: tabular-nums; }\n.lm-load small { display: block; font: 400 .7rem var(--lm-mono); color: var(--lm-muted); }\n.lm-load-track { grid-area: track; position: relative; min-width: 0; padding-bottom: 22px; }\n.lm-load input { display: block; width: 100%; height: 32px; margin: 0; accent-color: var(--lm-accent); cursor: pointer; }\n.lm-zones, .lm-marks { position: absolute; left: 8px; right: 8px; top: 30px; }\n.lm-zones { height: 4px; border-radius: 2px; }\n.lm-marks button { position: absolute; top: 0; transform: translateX(-50%); min-width: 20px; height: 24px; padding: 7px 2px 0; border: 0; background: none; font: 500 .68rem var(--lm-mono); color: var(--lm-accent); white-space: nowrap; cursor: pointer; }\n.lm-marks button::before { content: \"\"; position: absolute; left: 50%; top: 0; width: 2px; height: 6px; margin-left: -1px; background: currentColor; }\n.lm-marks button:not([data-label]) span { display: none; }\n.lm-marks [data-kind=\"target\"] { color: var(--lm-warn); }\n.lm-marks [data-kind=\"full\"] { color: var(--lm-drop); }\n.lm-marks [aria-pressed=\"true\"] { font-weight: 700; text-decoration: underline; }\n.lm-key { display: inline-block; width: 14px; height: 2px; border-radius: 1px; vertical-align: 3px; margin-right: 6px; }\n\n.lm-compare-text { margin: 0; }\n.lm-table-wrap { overflow-x: auto; }\n.lm-table { border-collapse: collapse; width: 100%; font-size: .84rem; }\n.lm-table th, .lm-table td { text-align: left; padding: 6px 10px 6px 0; border-bottom: 1px solid var(--lm-line); vertical-align: top; }\n.lm-table thead th { font: 600 .7rem var(--lm-font); text-transform: uppercase; letter-spacing: .06em; color: var(--lm-muted); }\n.lm-table tbody th { font-weight: 600; white-space: nowrap; }\n.lm-table td { font-family: var(--lm-mono); font-variant-numeric: tabular-nums; }\n.lm-table td.lm-text { font-family: var(--lm-font); }\n.lm-table td small { display: block; font: 400 .72rem var(--lm-font); color: var(--lm-muted); }\n.lm-table tr[aria-current] th { text-decoration: underline; text-underline-offset: 3px; }\n\n.lm-chart { position: relative; min-width: 0; }\n.lm-chart svg { display: block; overflow: visible; }\n.lm-chart:focus-visible { outline: 2px solid var(--lm-accent); outline-offset: 2px; }\n.lm-axis, .lm-axis text { font: 400 11px var(--lm-mono); fill: var(--lm-muted); }\n.lm-mark { font: 600 11px var(--lm-mono); fill: var(--lm-fg); }\n.lm-tip { position: absolute; z-index: 2; display: grid; gap: 2px; width: max-content; max-width: min(17rem, calc(100% - 8px)); overflow-wrap: anywhere; padding: 8px 10px; font-size: .78rem; background: var(--lm-surface); color: var(--lm-fg); border: 1px solid var(--lm-line); border-radius: 6px; box-shadow: 0 4px 14px rgb(0 0 0 / .14); pointer-events: none; }\n.lm-tip strong { font: 600 .82rem var(--lm-mono); font-variant-numeric: tabular-nums; }\n.lm-tip .lm-sub { color: var(--lm-muted); }\n.lm-nowrap { white-space: nowrap; }\n.lm-node { cursor: pointer; outline: none; }\n.lm-node:focus-visible > :first-child { stroke-width: 3; }\n\n@media (prefers-reduced-motion: reduce) {\n .lm-fill { transition: none; }\n .lm-story[data-playing] .lm-story-progress i[data-state=\"now\"]::before { animation: none; transform: none; }\n}\n\n/* without weight: a page's own .lm-canvas { height } wins, wherever its stylesheet stands */\n:where(.lm-canvas) { height: clamp(420px, 70dvh, 760px); }\n.lm-canvas { position: relative; box-sizing: border-box; overflow: hidden; contain: layout; border: 1px solid var(--lm-line); border-radius: var(--lm-radius, 10px); background: var(--lm-surface); }\n.lm.lm[data-full] > .lm-canvas { display: block; flex: 1 1 0; height: auto; min-height: 0; }\n/* the spacer that centres a page of parts with the least around it would take a gap under the canvas */\n.lm.lm[data-full]:has(> .lm-canvas)::after { content: none; }\n.lm-canvas > .lm-wrap[data-canvas] { position: absolute; inset: 0; }\n.lm-canvas-bar, .lm-canvas-console { position: absolute; left: 0; right: var(--lm-canvas-right, 0px); z-index: 3; box-sizing: border-box; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 12px; background: var(--lm-surface); }\n.lm-canvas-bar { top: 0; border-bottom: 1px solid var(--lm-line); }\n.lm-canvas-console { bottom: 0; border-top: 1px solid var(--lm-line); }\n/* over the bar for a while, across the whole top: as tall as it needs */\n.lm-canvas-panel[hidden] { display: none; }\n/* never more than the diagram can give: a long step scrolls in its strip */\n.lm-canvas-over { position: absolute; z-index: 5; top: 0; left: 0; right: 0; box-sizing: border-box; display: flex; align-items: center; max-height: 45%; overflow: auto; overscroll-behavior: contain; background: var(--lm-surface); border-bottom: 1px solid var(--lm-line); box-shadow: 0 8px 18px -14px rgb(0 0 0 / .45); }\n.lm-canvas-over > .lm-story { flex: 1 1 auto; border: 0; border-radius: 0; background: none; }\n.lm-canvas-over > .lm-canvas-leave { flex: none; margin-right: 12px; }\n/* the bar's own buttons, at its end */\n.lm-canvas-tools { display: flex; flex: none; gap: 6px; margin-left: auto; }\n.lm-canvas-tools .lm-btn { padding: 4px 9px; }\n.lm-canvas-tools .lm-btn[aria-pressed=\"true\"].lm-canvas-chrome { border-color: var(--lm-fg); box-shadow: inset 0 0 0 1px var(--lm-fg); }\n.lm-frame .lm-canvas-bar > .lm-legend + .lm-canvas-tools { margin-left: 0; }\n/* a slot that holds nothing takes no room */\n.lm-canvas-bar:empty, .lm-canvas-console:empty { display: none; }\n.lm-canvas[data-width=\"compact\"] :is(.lm-canvas-bar, .lm-canvas-console) { padding: 6px 8px; }\n.lm-canvas[data-short] .lm-canvas-bar { padding: 4px 8px; }\n/* on a touch screen two fingers zoom a narrow canvas: Fit alone stays, clear of the boxes */\n@media (pointer: coarse) { .lm-canvas[data-width=\"compact\"] .lm-zoom .lm-btn:not(:last-child) { display: none; } }\n/* a page of its own parts has full-screen rules for a phone (the load on two lines, no legend): not the canvas's */\n.lm.lm[data-full] .lm-canvas .lm-load { display: grid; }\n.lm.lm[data-full] .lm-canvas .lm-load small { display: block; }\n.lm.lm[data-full] .lm-canvas .lm-load > label { position: static; width: auto; height: auto; clip-path: none; }\n.lm.lm[data-full] .lm-canvas .lm-load > output { margin-left: 0; }\n.lm.lm[data-full] .lm-canvas .lm-headline { flex-basis: auto; }\n.lm.lm[data-full] .lm-canvas .lm-legend { display: flex; }\n\n/* the panels: their tabs, and the one that is open. Nothing but the open panel scrolls in a canvas */\n.lm-canvas-tabs { position: absolute; z-index: 3; display: flex; box-sizing: border-box; background: var(--lm-surface); }\n.lm-canvas-tabs button { flex: none; font: 500 .8rem var(--lm-font); color: var(--lm-muted); background: none; border: 0; padding: 0 12px; cursor: pointer; white-space: nowrap; }\n.lm-canvas-tabs button:hover { color: var(--lm-fg); }\n.lm-canvas-tabs button[aria-expanded=\"true\"] { color: var(--lm-fg); font-weight: 600; box-shadow: inset 0 -2px 0 var(--lm-fg); }\n.lm-canvas-tabs button:focus-visible, .lm-canvas-menu:focus-visible { outline: 2px solid var(--lm-accent); outline-offset: -2px; }\n.lm-canvas[data-tabs=\"row\"] .lm-canvas-tabs { left: 0; right: 0; bottom: var(--lm-canvas-bottom); height: 36px; border-top: 1px solid var(--lm-line); overflow-x: auto; scrollbar-width: none; }\n.lm-canvas[data-tabs=\"row\"] .lm-canvas-tabs::-webkit-scrollbar { display: none; }\n/* the five share a narrow row */\n.lm-canvas[data-tabs=\"row\"][data-width=\"compact\"] .lm-canvas-tabs button { flex: 1 1 auto; padding: 0 4px; }\n.lm-canvas[data-tabs=\"rail\"] .lm-canvas-tabs { top: 0; right: 0; bottom: 0; width: 44px; flex-direction: column; align-items: stretch; padding-top: 6px; border-left: 1px solid var(--lm-line); overflow: hidden; }\n.lm-canvas[data-tabs=\"rail\"] .lm-canvas-tabs button { padding: 12px 0; display: flex; justify-content: center; }\n.lm-canvas[data-tabs=\"rail\"] .lm-canvas-tabs button span { writing-mode: vertical-rl; }\n.lm-canvas[data-tabs=\"rail\"] .lm-canvas-tabs button[aria-expanded=\"true\"] { box-shadow: inset 2px 0 0 var(--lm-fg); }\n.lm-canvas[data-tabs=\"head\"] .lm-canvas-tabs { top: 0; right: 0; width: var(--lm-canvas-right); height: 40px; border-left: 1px solid var(--lm-line); border-bottom: 1px solid var(--lm-line); overflow-x: auto; scrollbar-width: none; }\n.lm-canvas[data-tabs=\"head\"] .lm-canvas-tabs::-webkit-scrollbar { display: none; }\n.lm-canvas-menu { position: absolute; z-index: 4; top: 5px; right: 8px; width: 116px; font: 500 .8rem var(--lm-font); color: var(--lm-fg); background: var(--lm-surface); border: 1px solid var(--lm-line); border-radius: 6px; padding: 4px 6px; }\n.lm-canvas[data-tabs=\"menu\"] .lm-canvas-bar, .lm-canvas[data-tabs=\"menu\"] .lm-canvas-bar:empty { display: flex; min-height: 40px; padding-right: 132px; }\n.lm-canvas-panel { position: absolute; z-index: 4; box-sizing: border-box; display: grid; grid-template-rows: auto minmax(0, 1fr); background: var(--lm-surface); outline: 0; }\n.lm-canvas-panel[data-place=\"side\"] { top: var(--lm-canvas-top); bottom: var(--lm-canvas-under); right: var(--lm-canvas-right); width: calc(var(--lm-canvas-reach) - var(--lm-canvas-right)); border-left: 1px solid var(--lm-line); box-shadow: -8px 0 18px -14px rgb(0 0 0 / .45); }\n.lm-canvas[data-pinned] .lm-canvas-panel { top: 40px; right: 0; bottom: 0; width: var(--lm-canvas-right); box-shadow: none; }\n.lm-canvas[data-pinned] .lm-canvas-panel-head { display: none; }\n.lm-canvas-panel[data-place=\"sheet\"] { left: 0; right: 0; bottom: var(--lm-canvas-under); height: var(--lm-canvas-reach); border-top: 1px solid var(--lm-line); border-radius: 10px 10px 0 0; box-shadow: 0 -8px 18px -14px rgb(0 0 0 / .45); }\n.lm-canvas-panel-head { display: flex; align-items: center; gap: 6px; padding: 6px 8px 6px 12px; border-bottom: 1px solid var(--lm-line); }\n.lm-canvas-panel-head h3 { flex: 1 1 auto; min-width: 0; margin: 0; font-size: .86rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.lm-canvas-panel-head .lm-btn { padding: 3px 8px; }\n.lm-canvas-panel-body { display: grid; gap: 14px; align-content: start; min-height: 0; padding: 12px; overflow: auto; overscroll-behavior: contain; container-type: inline-size; }\n@media (prefers-reduced-motion: no-preference) {\n .lm-canvas-panel[data-place=\"side\"] { animation: lm-canvas-side .16s ease-out; }\n .lm-canvas[data-pinned] .lm-canvas-panel { animation: none; }\n .lm-canvas-panel[data-place=\"sheet\"] { animation: lm-canvas-sheet .16s ease-out; }\n}\n@keyframes lm-canvas-side { from { transform: translateX(16px); opacity: 0; } }\n@keyframes lm-canvas-sheet { from { transform: translateY(16px); opacity: 0; } }\n\n/* the frame: what <Frame> puts in the two slots. Each is one row of a height nothing the reader does changes */\n.lm-frame .lm-canvas-bar { flex-wrap: nowrap; overflow: hidden; }\n.lm-frame .lm-canvas-bar > h2 { flex: 0 5 auto; min-width: 0; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.lm-frame .lm-canvas-bar > .lm-scenarios { flex: 0 2 auto; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px; }\n.lm-frame .lm-canvas-bar > .lm-scenarios::-webkit-scrollbar { display: none; }\n.lm-frame .lm-canvas-bar > .lm-scenarios > * { flex: none; white-space: nowrap; }\n.lm-frame .lm-canvas-bar > .lm-scenarios button { padding: 4px 10px; }\n/* named for a screen reader, unseen: the buttons say what they are */\n.lm-frame .lm-canvas-bar > .lm-scenarios legend, .lm.lm .lm-frame[data-short] .lm-load > label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }\n/* one row whatever is on: an entry that does not fit wraps under it, out of view, whole */\n.lm-frame .lm-canvas-bar > .lm-legend { flex: 1 1 0; justify-content: flex-end; min-width: 0; height: 1.5em; line-height: 1.5; overflow: hidden; white-space: nowrap; }\n.lm-canvas-pick { flex: 0 1 auto; min-width: 0; max-width: 100%; font: 500 .84rem var(--lm-font); color: var(--lm-fg); background: var(--lm-surface); border: 1px solid var(--lm-line); border-radius: 6px; padding: 5px 8px; }\n.lm-frame .lm-canvas-console { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 6px 12px 8px; }\n.lm-frame .lm-canvas-console > .lm-load { grid-template: \"label track value\" / minmax(0, max-content) minmax(120px, 1fr) auto; align-items: start; }\n.lm-frame .lm-canvas-console > .lm-load > label { max-width: 14em; padding-top: 6px; }\n.lm-frame .lm-canvas-console > .lm-load > output { padding-top: 5px; }\n.lm-canvas-verdict { display: flex; align-items: center; gap: 6px 14px; min-width: 0; padding-left: 8px; border-left: 4px solid var(--lm-ok); }\n.lm-canvas-verdict[data-tier=\"warn\"] { border-color: var(--lm-warn); }\n.lm-canvas-verdict[data-tier=\"over\"] { border-color: var(--lm-drop); }\n.lm-frame[data-width=\"compact\"] .lm-canvas-console { padding: 6px 8px; }\n.lm-frame[data-width=\"compact\"] .lm-canvas-console > .lm-load { grid-template: \"label value\" \"track track\" / minmax(0, 1fr) auto; align-items: center; }\n.lm-frame[data-width=\"compact\"] .lm-canvas-console > .lm-load > :is(label, output) { padding-top: 0; }\n/* room for the date under the load, with one or not */\n.lm-frame[data-width=\"compact\"] .lm-canvas-console > .lm-load > output { min-height: 2.1rem; }\n/* two lines kept whatever the verdict says: the load never changes the console's height */\n.lm-frame[data-width=\"compact\"]:not([data-short]) .lm-headline { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; height: 2.6em; line-height: 1.3; white-space: normal; }\n.lm-frame[data-short] .lm-canvas-console { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 12px; padding: 2px 8px; }\n.lm-frame[data-short] .lm-canvas-console > .lm-load { grid-template: \"track value\" / minmax(0, 1fr) auto; align-items: start; }\n.lm-frame[data-short][data-width=\"compact\"] .lm-canvas-console { grid-template-columns: minmax(0, 1fr); gap: 0; }\n";
116
207
  /** Adds the stylesheet once per document. */
117
208
  export declare function injectStyles(doc?: Document): void;
118
- export { type AnyNodeDef, type ClusterDef, type Cue, type DiagramProps, type Dot, type EdgeDef, type ElkEngine, type Engine, type FlowColor, type FlowView, type FullScreenMode, LOADMAP_PANELS, type Label, Loadmap, type LoadmapController, type LoadmapHandle, type LoadmapOptions, type LoadmapPanel, type LoadmapProps, LoadmapRoot, MEASURES, type NodeDef, type PoolDef, type SubsystemDef, type Theme, type TierDef, type View, type ViewDef, cluster, compact, defineView, directionOf, edge, fitLinear, fmt, fromSnapshot, handleOf, multiple, node, originText, parseSnapshot, pct, pool, secs, summarize, useLoadmap, usePageTheme };
209
+ export { type AnyNodeDef, type CanvasProps, type CanvasSize, type Chrome, type ClusterDef, type Cue, Diagram, type DiagramProps, type Dot, type EdgeDef, type ElkEngine, type Engine, type FlowColor, type FlowView, type FullScreenMode, LOADMAP_PANELS, type Label, Loadmap, type LoadmapController, type LoadmapHandle, type LoadmapOptions, type LoadmapPanel, type LoadmapProps, LoadmapRoot, MEASURES, type NodeDef, type PoolDef, type SubsystemDef, type Theme, type TierDef, type View, type ViewDef, cluster, compact, defineView, directionOf, edge, fitLinear, fmt, fromSnapshot, handleOf, multiple, node, originText, panelsOf, parseSnapshot, pct, pool, secs, summarize, useLoadmap, usePageTheme };
package/dist/index.js CHANGED
@@ -1,7 +1,10 @@
1
- import { C as useComparison, D as workerElk, O as Diagram, S as scenarioColor, _ as Verdict, a as usePageTheme, b as HeadroomChart, c as injectStyles, f as Controls, g as Meters, h as LoadRange, i as handleOf, l as Story, m as LoadBar, n as Loadmap, o as useLoadmap, p as Limits, r as LoadmapRoot, s as LOADMAP_CSS, t as LOADMAP_PANELS, u as Assumptions, x as Scenarios, y as Compare } from "./Loadmap-DbAbcbNc.js";
1
+ import { C as Diagram, S as injectStyles, T as CANVAS, _ as workerElk, a as panelsOf, b as useCanvasSize, c as LoadBar, i as handleOf, l as LoadRange, n as Loadmap, o as usePageTheme, p as scenarioColor, r as LoadmapRoot, s as useLoadmap, t as LOADMAP_PANELS, u as Scenarios, v as Canvas, x as LOADMAP_CSS, y as useCanvasPanels } from "./Loadmap-CM8HshXp.js";
2
+ import { a as Verdict, i as Meters, n as Controls, r as Limits, t as Assumptions } from "./panels-CemD3oVS.js";
3
+ import { n as HeadroomChart, r as useComparison, t as Compare } from "./scenarios-D7DDcwS5.js";
4
+ import { t as Story } from "./story-mK-TEB6j.js";
2
5
  import { fitLinear } from "@loadmap/core/calibrate";
3
6
  import { compact, fmt, multiple, pct, secs } from "@loadmap/core/format";
4
7
  import { MEASURES, fromSnapshot, originText, parseSnapshot, summarize } from "@loadmap/core/measure";
5
8
  import { cluster, defineView, directionOf, edge, node, pool } from "@loadmap/layout";
6
9
  export * from "@loadmap/core";
7
- export { Assumptions, Compare, Controls, Diagram, HeadroomChart, LOADMAP_CSS, LOADMAP_PANELS, Limits, LoadBar, LoadRange, Loadmap, LoadmapRoot, MEASURES, Meters, Scenarios, Story, Verdict, cluster, compact, defineView, directionOf, edge, fitLinear, fmt, fromSnapshot, handleOf, injectStyles, multiple, node, originText, parseSnapshot, pct, pool, scenarioColor, secs, summarize, useComparison, useLoadmap, usePageTheme, workerElk };
10
+ export { Assumptions, CANVAS, Canvas, Compare, Controls, Diagram, HeadroomChart, LOADMAP_CSS, LOADMAP_PANELS, Limits, LoadBar, LoadRange, Loadmap, LoadmapRoot, MEASURES, Meters, Scenarios, Story, Verdict, cluster, compact, defineView, directionOf, edge, fitLinear, fmt, fromSnapshot, handleOf, injectStyles, multiple, node, originText, panelsOf, parseSnapshot, pct, pool, scenarioColor, secs, summarize, useCanvasPanels, useCanvasSize, useComparison, useLoadmap, usePageTheme, workerElk };
@@ -0,0 +1,195 @@
1
+ import { g as rankLabels, r as boxComponent } from "./camera-RqbxjjVv.js";
2
+ import { f as plusMinus, p as scenarioColor } from "./Loadmap-CM8HshXp.js";
3
+ import { r as useComparison } from "./scenarios-D7DDcwS5.js";
4
+ import { reach } from "@loadmap/core";
5
+ import { compact, fmt, multiple, multiples, pct } from "@loadmap/core/format";
6
+ import { useEffect, useLayoutEffect, useRef } from "react";
7
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
+ // src/detail.tsx
9
+ /**
10
+ * A box's component in words, over the board: utilization, demand against capacity and where it came from, where it
11
+ * reaches the target and 100 % (with dates, given growth), and its target in each scenario. HTML, so exports leave it out.
12
+ */
13
+ function Detail({ lm, scene, id, board, detailId }) {
14
+ const { model, ev } = lm;
15
+ const n = scene.nodes.find((x) => x.id === id);
16
+ const cid = n && boxComponent(lm.ev, n);
17
+ const comparison = useComparison(lm);
18
+ const rows = model.scenarios.length > 1 ? comparison.rows : [];
19
+ useEffect(() => {
20
+ const el = board?.querySelector(`[data-node="${CSS.escape(id)}"]`);
21
+ el?.setAttribute("aria-describedby", detailId);
22
+ return () => el?.removeAttribute("aria-describedby");
23
+ }, [
24
+ board,
25
+ id,
26
+ detailId
27
+ ]);
28
+ const c = cid ? ev.components[cid] : void 0;
29
+ const tip = useRef(null);
30
+ const box = n && `${n.x} ${n.y} ${n.w} ${n.h}`;
31
+ useLayoutEffect(() => {
32
+ const el = tip.current;
33
+ const wrap = el?.offsetParent;
34
+ if (!el || !n || !board || !(wrap instanceof HTMLElement)) return;
35
+ const place = () => {
36
+ const p = lm.engine.viewer?.placement();
37
+ const k = p ? p.k : board.clientWidth / scene.width;
38
+ const [dx, dy] = p ? [p.dx, p.dy] : [0, 0];
39
+ const w = wrap.getBoundingClientRect();
40
+ const y = (v) => v - w.top - wrap.clientTop + wrap.scrollTop;
41
+ let lo = 0;
42
+ let hi = innerHeight;
43
+ for (let a = wrap; a; a = a.parentElement) {
44
+ if (getComputedStyle(a).overflowY === "visible") continue;
45
+ const r = a.getBoundingClientRect();
46
+ lo = Math.max(lo, r.top);
47
+ hi = Math.min(hi, r.bottom);
48
+ }
49
+ const [top, bottom] = [y(lo) + 4, y(hi) - 4];
50
+ const h = el.offsetHeight;
51
+ const boxTop = board.offsetTop + dy + n.y * k;
52
+ const boxBottom = board.offsetTop + dy + (n.y + n.h) * k;
53
+ const below = boxBottom + 6;
54
+ const above = boxTop - 6 - h;
55
+ const fits = (n.y + n.h / 2 < scene.height / 2 ? [below, above] : [above, below]).find((t) => t >= top && t + h <= bottom);
56
+ const roomier = bottom - boxBottom >= boxTop - top ? below : above;
57
+ el.style.top = `${Math.max(top, Math.min(fits ?? roomier, bottom - h))}px`;
58
+ el.style.left = `${Math.max(0, Math.min(board.offsetLeft + dx + n.x * k, wrap.clientWidth - el.offsetWidth))}px`;
59
+ };
60
+ place();
61
+ const off = lm.engine.viewer ? lm.engine.subscribe(place) : null;
62
+ const ro = new ResizeObserver(place);
63
+ ro.observe(el);
64
+ ro.observe(board);
65
+ document.addEventListener("scroll", place, {
66
+ capture: true,
67
+ passive: true
68
+ });
69
+ addEventListener("resize", place);
70
+ return () => {
71
+ off?.();
72
+ ro.disconnect();
73
+ document.removeEventListener("scroll", place, { capture: true });
74
+ removeEventListener("resize", place);
75
+ };
76
+ }, [
77
+ box,
78
+ board,
79
+ scene
80
+ ]);
81
+ if (!n || !c || !board) return null;
82
+ const at = (r, x) => r ? reach(r, model.searchMax, model.dateAt) : multiple(x, model.searchMax);
83
+ const num = (x) => Math.abs(x) >= 1e3 ? compact(x) : fmt(x);
84
+ const cap = c.capacity;
85
+ const rank = rankLabels(ev, model).get(c.id);
86
+ return /* @__PURE__ */ jsxs("div", {
87
+ id: detailId,
88
+ className: "lm-tip lm-detail",
89
+ role: "tooltip",
90
+ ref: tip,
91
+ children: [
92
+ /* @__PURE__ */ jsxs("b", { children: [c.name, rank && /* @__PURE__ */ jsx("span", {
93
+ className: "lm-tag",
94
+ "data-kind": rank.rank === 1 ? "first" : "rank",
95
+ children: rank.word
96
+ })] }),
97
+ c.missing != null ? /* @__PURE__ */ jsxs("span", { children: [
98
+ "No published benchmark ",
99
+ c.missing,
100
+ "."
101
+ ] }) : c.util == null || !cap ? /* @__PURE__ */ jsx("span", { children: "switched off" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
102
+ /* @__PURE__ */ jsxs("span", { children: [
103
+ /* @__PURE__ */ jsx("strong", { children: pct(c.util) }),
104
+ " · ",
105
+ num(c.demand ?? 0),
106
+ " of ",
107
+ fmt(cap.value),
108
+ " ",
109
+ cap.unit,
110
+ cap.within ? ` ${plusMinus(cap)}` : ""
111
+ ] }),
112
+ c.held && heldText(model, c.held) && /* @__PURE__ */ jsx("span", { children: heldText(model, c.held) }),
113
+ /* @__PURE__ */ jsxs("span", {
114
+ className: "lm-sub",
115
+ children: [
116
+ "capacity",
117
+ " ",
118
+ /* @__PURE__ */ jsx("span", {
119
+ className: "lm-prov",
120
+ "data-kind": cap.provenance,
121
+ children: cap.provenance
122
+ }),
123
+ cap.source ? `, ${cap.source}` : ""
124
+ ]
125
+ }),
126
+ /* @__PURE__ */ jsxs("span", { children: [
127
+ pct(model.thresholds.target),
128
+ " at ",
129
+ at(c.targetRange, c.target)
130
+ ] }),
131
+ /* @__PURE__ */ jsxs("span", { children: [
132
+ pct(model.thresholds.full),
133
+ " at ",
134
+ at(c.fullRange, c.full)
135
+ ] }),
136
+ blocks(lm, n).map((line) => /* @__PURE__ */ jsx("span", { children: line }, line)),
137
+ c.over && /* @__PURE__ */ jsxs("span", {
138
+ className: "lm-sub",
139
+ children: [
140
+ "Past ",
141
+ pct(model.thresholds.full),
142
+ ": ",
143
+ c.over,
144
+ "."
145
+ ]
146
+ })
147
+ ] }),
148
+ rows.length > 0 && /* @__PURE__ */ jsxs("span", {
149
+ className: "lm-sub",
150
+ children: [
151
+ pct(model.thresholds.target),
152
+ " by scenario:",
153
+ " ",
154
+ rows.map((r, i) => {
155
+ const x = r.components.find((y) => y.id === cid);
156
+ return /* @__PURE__ */ jsxs("span", {
157
+ className: "lm-nowrap",
158
+ children: [
159
+ i > 0 && " · ",
160
+ /* @__PURE__ */ jsx("b", {
161
+ className: "lm-key",
162
+ style: { background: scenarioColor(model, r.label) }
163
+ }),
164
+ r.label,
165
+ " ",
166
+ x?.targetRange == null ? "off" : multiples(x.targetRange, model.searchMax, true)
167
+ ]
168
+ }, r.label);
169
+ })
170
+ ]
171
+ })
172
+ ]
173
+ });
174
+ }
175
+ /** How long a unit of each flow holds a slot: "held 20 ms per order". */
176
+ function heldText(model, held) {
177
+ const time = (s) => s < 1 ? `${fmt(s * 1e3)} ms` : s < 120 ? `${fmt(s)} s` : s < 7200 ? `${fmt(s / 60)} min` : `${fmt(s / 3600)} h`;
178
+ const per = Object.entries(held).filter(([, s]) => s > 0).map(([f, s]) => {
179
+ const flow = model.def.flows[f];
180
+ return `${time(s)} per ${flow?.unit ?? `unit of ${flow?.label ?? f}`}`;
181
+ });
182
+ return per.length ? `held ${per.join(", ")}` : "";
183
+ }
184
+ /** What a box's building blocks do at these values: pods running, cache answers, what a stage turns away. */
185
+ function blocks(lm, n) {
186
+ const out = [];
187
+ for (const id of n.stages) {
188
+ const s = lm.ev.stages[id];
189
+ if (s?.kind === "workers" && s.autoscale) out.push(`${s.running} of ${s.pods} pods running, each held near ${pct(s.autoscale.target)}`);
190
+ if (s?.kind === "cache") out.push(`${pct(s.hit)} answered here`);
191
+ if ((s?.kind === "pass" || s?.kind === "limit" || s?.kind === "cache" || s?.kind === "split") && s.shed > 0) out.push(`${pct(s.shed)} of what reaches it turned away`);
192
+ }
193
+ return out;
194
+ }
195
+ export { Detail };