durable-actors-observer 0.7.0 → 0.7.2

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.js CHANGED
@@ -1,81 +1,81 @@
1
1
  import * as e from "react";
2
2
  import { useEffect as t, useId as n, useMemo as r, useRef as i, useState as a } from "react";
3
- import { Activity as o, ArrowRight as s, Box as c, Cable as l, Calendar as u, ChevronDown as d, ChevronDownIcon as f, ChevronLeftIcon as p, ChevronRightIcon as m, CircleHelp as h, Download as g, Hash as _, LayoutGrid as v, Pause as y, Play as b, RefreshCw as ee, Search as x, SearchIcon as S, SunMoon as C, Unplug as w, X as T } from "lucide-react";
4
- import { Command as E } from "cmdk";
5
- import { clsx as D } from "clsx";
6
- import { extendTailwindMerge as O } from "tailwind-merge";
7
- import { Fragment as k, jsx as A, jsxs as j } from "react/jsx-runtime";
8
- import { Slot as M } from "@radix-ui/react-slot";
9
- import { cva as N } from "class-variance-authority";
10
- import { DayPicker as P, getDefaultClassNames as F } from "react-day-picker";
11
- import * as I from "@radix-ui/react-popover";
3
+ import { Activity as o, ArrowRight as s, Box as c, Cable as l, Calendar as u, ChartNoAxesGantt as d, ChevronDown as f, ChevronDownIcon as p, ChevronLeftIcon as m, ChevronRightIcon as h, CircleHelp as g, Download as _, Hash as v, LayoutGrid as y, List as ee, Pause as b, Play as x, RefreshCw as te, Search as S, SearchIcon as C, SunMoon as w, Unplug as T, X as E } from "lucide-react";
4
+ import { Command as D } from "cmdk";
5
+ import { clsx as O } from "clsx";
6
+ import { extendTailwindMerge as k } from "tailwind-merge";
7
+ import { Fragment as A, jsx as j, jsxs as M } from "react/jsx-runtime";
8
+ import { Slot as N } from "@radix-ui/react-slot";
9
+ import { cva as P } from "class-variance-authority";
10
+ import { DayPicker as F, getDefaultClassNames as I } from "react-day-picker";
11
+ import * as ne from "@radix-ui/react-popover";
12
12
  import * as L from "@radix-ui/react-dialog";
13
- import { JsonView as te } from "react-json-view-lite";
14
- import { create as ne } from "jsondiffpatch";
15
- import { format as re } from "jsondiffpatch/formatters/html";
16
- import { createParser as ie } from "eventsource-parser";
13
+ import { JsonView as re } from "react-json-view-lite";
14
+ import { create as ie } from "jsondiffpatch";
15
+ import { format as ae } from "jsondiffpatch/formatters/html";
16
+ import { createParser as oe } from "eventsource-parser";
17
17
  //#region src/lib/utils.ts
18
- var ae = O({ prefix: "la" });
18
+ var se = k({ prefix: "la" });
19
19
  function R(...e) {
20
- return ae(D(e));
20
+ return se(O(e));
21
21
  }
22
22
  //#endregion
23
23
  //#region src/components/ui/command.tsx
24
- function oe({ className: e, ...t }) {
25
- return /* @__PURE__ */ A(E, {
24
+ function ce({ className: e, ...t }) {
25
+ return /* @__PURE__ */ j(D, {
26
26
  "data-slot": "command",
27
27
  className: R("la:flex la:h-full la:w-full la:flex-col la:overflow-hidden la:rounded-md la:bg-popover la:text-popover-foreground", e),
28
28
  ...t
29
29
  });
30
30
  }
31
- function se({ className: e, ...t }) {
32
- return /* @__PURE__ */ j("div", {
31
+ function le({ className: e, ...t }) {
32
+ return /* @__PURE__ */ M("div", {
33
33
  "data-slot": "command-input-wrapper",
34
34
  className: "la:flex la:h-9 la:items-center la:gap-2 la:border-b la:px-3",
35
- children: [/* @__PURE__ */ A(S, { className: "la:size-4 la:shrink-0 la:opacity-50" }), /* @__PURE__ */ A(E.Input, {
35
+ children: [/* @__PURE__ */ j(C, { className: "la:size-4 la:shrink-0 la:opacity-50" }), /* @__PURE__ */ j(D.Input, {
36
36
  "data-slot": "command-input",
37
37
  className: R("la:flex la:h-10 la:w-full la:rounded-md la:bg-transparent la:py-3 la:text-sm la:outline-hidden la:placeholder:text-muted-foreground la:disabled:cursor-not-allowed la:disabled:opacity-50", e),
38
38
  ...t
39
39
  })]
40
40
  });
41
41
  }
42
- function ce({ className: e, ...t }) {
43
- return /* @__PURE__ */ A(E.List, {
42
+ function ue({ className: e, ...t }) {
43
+ return /* @__PURE__ */ j(D.List, {
44
44
  "data-slot": "command-list",
45
45
  className: R("la:max-h-[300px] la:scroll-py-1 la:overflow-x-hidden la:overflow-y-auto", e),
46
46
  ...t
47
47
  });
48
48
  }
49
- function le({ ...e }) {
50
- return /* @__PURE__ */ A(E.Empty, {
49
+ function de({ ...e }) {
50
+ return /* @__PURE__ */ j(D.Empty, {
51
51
  "data-slot": "command-empty",
52
52
  className: "la:py-6 la:text-center la:text-sm",
53
53
  ...e
54
54
  });
55
55
  }
56
- function ue({ className: e, ...t }) {
57
- return /* @__PURE__ */ A(E.Group, {
56
+ function fe({ className: e, ...t }) {
57
+ return /* @__PURE__ */ j(D.Group, {
58
58
  "data-slot": "command-group",
59
59
  className: R("la:overflow-hidden la:p-1 la:text-foreground la:[&_[cmdk-group-heading]]:px-2 la:[&_[cmdk-group-heading]]:py-1.5 la:[&_[cmdk-group-heading]]:text-xs la:[&_[cmdk-group-heading]]:font-medium la:[&_[cmdk-group-heading]]:text-muted-foreground", e),
60
60
  ...t
61
61
  });
62
62
  }
63
- function de({ className: e, ...t }) {
64
- return /* @__PURE__ */ A(E.Separator, {
63
+ function pe({ className: e, ...t }) {
64
+ return /* @__PURE__ */ j(D.Separator, {
65
65
  "data-slot": "command-separator",
66
66
  className: R("la:-mx-1 la:h-px la:bg-border", e),
67
67
  ...t
68
68
  });
69
69
  }
70
- function fe({ className: e, ...t }) {
71
- return /* @__PURE__ */ A(E.Item, {
70
+ function me({ className: e, ...t }) {
71
+ return /* @__PURE__ */ j(D.Item, {
72
72
  "data-slot": "command-item",
73
73
  className: R("la:relative la:flex la:cursor-default la:items-center la:gap-2 la:rounded-sm la:px-2 la:py-1.5 la:text-sm la:outline-hidden la:select-none la:data-[disabled=true]:pointer-events-none la:data-[disabled=true]:opacity-50 la:data-[selected=true]:bg-accent la:data-[selected=true]:text-accent-foreground la:[&_svg]:pointer-events-none la:[&_svg]:shrink-0 la:[&_svg:not([class*='size-'])]:size-4 la:[&_svg:not([class*='text-'])]:text-muted-foreground", e),
74
74
  ...t
75
75
  });
76
76
  }
77
- function pe({ className: e, ...t }) {
78
- return /* @__PURE__ */ A("span", {
77
+ function he({ className: e, ...t }) {
78
+ return /* @__PURE__ */ j("span", {
79
79
  "data-slot": "command-shortcut",
80
80
  className: R("la:ml-auto la:text-xs la:tracking-widest la:text-muted-foreground", e),
81
81
  ...t
@@ -83,9 +83,9 @@ function pe({ className: e, ...t }) {
83
83
  }
84
84
  //#endregion
85
85
  //#region src/FilterCombobox.tsx
86
- function me({ label: e, placeholder: t, value: n, onChange: r, onSelectSuggestion: i, suggestions: o, limit: s = 8, className: c }) {
87
- let [l, u] = a(!1), d = he(o, n, s, !!i), f = d.reduce((e, t) => e.set(t.group, [...e.get(t.group) ?? [], t]), /* @__PURE__ */ new Map()), p = l && d.length > 0;
88
- return /* @__PURE__ */ j(oe, {
86
+ function ge({ label: e, placeholder: t, value: n, onChange: r, onSelectSuggestion: i, suggestions: o, limit: s = 8, className: c }) {
87
+ let [l, u] = a(!1), d = _e(o, n, s, !!i), f = d.reduce((e, t) => e.set(t.group, [...e.get(t.group) ?? [], t]), /* @__PURE__ */ new Map()), p = l && d.length > 0;
88
+ return /* @__PURE__ */ M(ce, {
89
89
  label: e,
90
90
  shouldFilter: !1,
91
91
  loop: !0,
@@ -93,7 +93,7 @@ function me({ label: e, placeholder: t, value: n, onChange: r, onSelectSuggestio
93
93
  onKeyDown: (e) => {
94
94
  e.key === "Escape" && u(!1), e.key === "ArrowDown" && u(!0);
95
95
  },
96
- children: [/* @__PURE__ */ A(se, {
96
+ children: [/* @__PURE__ */ j(le, {
97
97
  placeholder: t,
98
98
  value: n,
99
99
  onValueChange: (e) => {
@@ -101,21 +101,21 @@ function me({ label: e, placeholder: t, value: n, onChange: r, onSelectSuggestio
101
101
  },
102
102
  onFocus: () => u(!0),
103
103
  onBlur: () => u(!1)
104
- }), p && /* @__PURE__ */ A(ce, {
104
+ }), p && /* @__PURE__ */ j(ue, {
105
105
  label: `${e} suggestions`,
106
106
  className: "la:absolute la:top-full la:right-0 la:left-0 la:z-20 la:mt-1.5 la:rounded-md la:border la:bg-popover la:text-popover-foreground la:shadow-md",
107
107
  onMouseDown: (e) => e.preventDefault(),
108
- children: [...f].map(([e, t]) => /* @__PURE__ */ A(ue, {
108
+ children: [...f].map(([e, t]) => /* @__PURE__ */ j(fe, {
109
109
  heading: e,
110
- children: t.map((t) => /* @__PURE__ */ j(fe, {
110
+ children: t.map((t) => /* @__PURE__ */ M(me, {
111
111
  value: t.id ?? `${e}:${t.value}`,
112
112
  onSelect: () => {
113
113
  i ? i(t) : r(t.value), u(!1);
114
114
  },
115
- children: [/* @__PURE__ */ A("span", {
115
+ children: [/* @__PURE__ */ j("span", {
116
116
  className: "la:truncate la:font-mono la:text-xs",
117
117
  children: t.value
118
- }), t.hint && /* @__PURE__ */ A("span", {
118
+ }), t.hint && /* @__PURE__ */ j("span", {
119
119
  className: "la:ml-auto la:text-xs la:text-muted-foreground",
120
120
  children: t.hint
121
121
  })]
@@ -124,7 +124,7 @@ function me({ label: e, placeholder: t, value: n, onChange: r, onSelectSuggestio
124
124
  })]
125
125
  });
126
126
  }
127
- function he(e, t, n, r = !1) {
127
+ function _e(e, t, n, r = !1) {
128
128
  let i = t.trim().toLocaleLowerCase(), a = i.split(/\s+/u).filter(Boolean), o = /* @__PURE__ */ new Set(), s = [];
129
129
  for (let t of e) {
130
130
  let e = t.id ?? `${t.group}:${t.value}`, n = [t.value, ...t.keywords ?? []].join(" ").toLocaleLowerCase(), c = t.value.toLocaleLowerCase() === i && !t.keywords?.length;
@@ -133,8 +133,161 @@ function he(e, t, n, r = !1) {
133
133
  return s.sort((e, t) => Number(t.value.toLocaleLowerCase().startsWith(i)) - Number(e.value.toLocaleLowerCase().startsWith(i))).slice(0, n);
134
134
  }
135
135
  //#endregion
136
+ //#region src/request-timeline.ts
137
+ function ve(e) {
138
+ let t = [...e].sort((e, t) => e.startedAtMs - t.startedAtMs || e.sequence - t.sequence), n = t[0]?.startedAtMs ?? 0, r = n, i = /* @__PURE__ */ new Map(), a = t.map((e) => {
139
+ let t = JSON.stringify([
140
+ e.projectId,
141
+ e.actorName,
142
+ e.actorId
143
+ ]), a = i.get(t), o = e.startedAtMs + e.durationMs;
144
+ return i.set(t, Math.max(a ?? o, o)), r = Math.max(r, o), {
145
+ record: e,
146
+ offsetMs: e.startedAtMs - n,
147
+ gapMs: a === void 0 ? null : e.startedAtMs - a
148
+ };
149
+ });
150
+ return {
151
+ start: n,
152
+ span: r - n,
153
+ rows: a
154
+ };
155
+ }
156
+ function z(e) {
157
+ return e >= 6e4 ? `${(e / 6e4).toLocaleString(void 0, { maximumFractionDigits: 2 })} min` : e >= 1e3 ? `${(e / 1e3).toLocaleString(void 0, { maximumFractionDigits: 2 })} s` : `${e.toLocaleString(void 0, { maximumFractionDigits: 1 })} ms`;
158
+ }
159
+ function ye(e) {
160
+ return e === null ? "First in view" : e < 0 ? "Overlapping" : e === 0 ? "No gap" : `${z(e)} gap`;
161
+ }
162
+ //#endregion
163
+ //#region src/RequestTimeline.tsx
164
+ var be = [
165
+ 0,
166
+ .25,
167
+ .5,
168
+ .75,
169
+ 1
170
+ ];
171
+ function xe({ records: e, selected: t, onSelect: n }) {
172
+ let { start: r, span: i, rows: a } = ve(e), o = Math.max(1, i);
173
+ return /* @__PURE__ */ M("div", {
174
+ className: "request-waterfall",
175
+ role: "group",
176
+ "aria-label": "Invocation waterfall",
177
+ children: [
178
+ /* @__PURE__ */ j(Se, {
179
+ count: e.length,
180
+ span: i
181
+ }),
182
+ /* @__PURE__ */ M("div", {
183
+ className: "request-waterfall-scroll",
184
+ tabIndex: 0,
185
+ "aria-label": "Invocation timeline, scroll for more calls",
186
+ children: [/* @__PURE__ */ M("div", {
187
+ className: "request-waterfall-axis",
188
+ "aria-hidden": "true",
189
+ children: [
190
+ /* @__PURE__ */ j("span", { children: "Operation / instance" }),
191
+ /* @__PURE__ */ j("div", { children: be.map((e) => /* @__PURE__ */ j("span", {
192
+ style: { left: `${e * 100}%` },
193
+ children: z(o * e)
194
+ }, e)) }),
195
+ /* @__PURE__ */ j("span", { children: "Total / gap" })
196
+ ]
197
+ }), a.map((e) => /* @__PURE__ */ j(Ce, {
198
+ row: e,
199
+ scale: o,
200
+ selected: t === e.record,
201
+ onSelect: n
202
+ }, e.record.eventId ?? e.record.sequence))]
203
+ }),
204
+ /* @__PURE__ */ M("div", {
205
+ className: "request-waterfall-caption",
206
+ children: [/* @__PURE__ */ M("span", { children: ["Relative to ", /* @__PURE__ */ j("time", {
207
+ dateTime: new Date(r).toISOString(),
208
+ children: new Date(r).toLocaleString([], { hour12: !1 })
209
+ })] }), /* @__PURE__ */ j("span", { children: "Gaps use preceding calls on the same instance in this view." })]
210
+ })
211
+ ]
212
+ });
213
+ }
214
+ function Se({ count: e, span: t }) {
215
+ return /* @__PURE__ */ M("div", {
216
+ className: "request-waterfall-heading",
217
+ children: [/* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j("strong", { children: "Invocation waterfall" }), /* @__PURE__ */ M("span", { children: [
218
+ e.toLocaleString(),
219
+ " calls · ",
220
+ z(t),
221
+ " elapsed"
222
+ ] })] }), /* @__PURE__ */ M("ul", {
223
+ className: "request-waterfall-legend",
224
+ "aria-label": "Timing legend",
225
+ children: [
226
+ /* @__PURE__ */ M("li", { children: [/* @__PURE__ */ j("i", { className: "request-waterfall-method" }), "Method"] }),
227
+ /* @__PURE__ */ M("li", { children: [/* @__PURE__ */ j("i", { className: "request-waterfall-websocket" }), "WebSocket"] }),
228
+ /* @__PURE__ */ M("li", { children: [/* @__PURE__ */ j("i", { className: "request-waterfall-queue" }), "Queue wait"] }),
229
+ /* @__PURE__ */ M("li", { children: [/* @__PURE__ */ j("i", { className: "request-waterfall-failed" }), "Failed / rejected"] }),
230
+ /* @__PURE__ */ M("li", { children: [/* @__PURE__ */ j("i", { className: "request-waterfall-interrupted" }), "Interrupted / rerouted"] })
231
+ ]
232
+ })]
233
+ });
234
+ }
235
+ function Ce({ row: { record: e, offsetMs: t, gapMs: n }, scale: r, selected: i, onSelect: a }) {
236
+ return /* @__PURE__ */ M("button", {
237
+ type: "button",
238
+ className: "request-waterfall-row",
239
+ "data-state": i ? "selected" : void 0,
240
+ "aria-label": `Inspect ${e.operation} request on ${e.actorName} / ${e.actorId}, ${e.outcome}, ${z(e.durationMs)}, starts +${z(t)}, ${ye(n)}`,
241
+ "aria-haspopup": "dialog",
242
+ title: `${e.actorName} / ${e.actorId}\n${e.operation} · ${e.outcome}\nStart: ${new Date(e.startedAtMs).toLocaleString()} (+${z(t)})\nTotal: ${z(e.durationMs)}\nQueue wait: ${e.queueWaitMs === null ? "Did not begin processing" : z(e.queueWaitMs)}\n${ye(n)}${n === null ? "" : " relative to preceding calls on this instance"}`,
243
+ onClick: (t) => a(e, t.currentTarget),
244
+ children: [
245
+ /* @__PURE__ */ M("span", {
246
+ className: "request-waterfall-label",
247
+ children: [/* @__PURE__ */ j("strong", { children: e.operation }), /* @__PURE__ */ M("span", { children: [
248
+ e.actorName,
249
+ " / ",
250
+ e.actorId
251
+ ] })]
252
+ }),
253
+ /* @__PURE__ */ M("span", {
254
+ className: "request-waterfall-track",
255
+ "aria-hidden": "true",
256
+ children: [
257
+ be.map((e) => /* @__PURE__ */ j("i", {
258
+ className: "request-waterfall-gridline",
259
+ style: { left: `${e * 100}%` }
260
+ }, e)),
261
+ n !== null && n > 0 && /* @__PURE__ */ j("span", {
262
+ className: "request-waterfall-gap",
263
+ style: {
264
+ left: `${(t - n) / r * 100}%`,
265
+ width: `${n / r * 100}%`
266
+ }
267
+ }),
268
+ /* @__PURE__ */ j("span", {
269
+ className: `request-waterfall-bar request-waterfall-${e.kind} request-waterfall-${e.outcome}`,
270
+ style: {
271
+ left: `${t / r * 100}%`,
272
+ width: `${e.durationMs / r * 100}%`
273
+ },
274
+ children: e.queueWaitMs !== null && e.queueWaitMs > 0 && /* @__PURE__ */ j("span", {
275
+ className: "request-waterfall-queue",
276
+ style: { width: `${e.queueWaitMs / e.durationMs * 100}%` }
277
+ })
278
+ })
279
+ ]
280
+ }),
281
+ /* @__PURE__ */ M("span", {
282
+ className: "request-waterfall-timing",
283
+ children: [/* @__PURE__ */ j("strong", { children: z(e.durationMs) }), /* @__PURE__ */ j("span", { children: ye(n) })]
284
+ })
285
+ ]
286
+ });
287
+ }
288
+ //#endregion
136
289
  //#region src/components/ui/button.tsx
137
- var ge = N("la:inline-flex la:shrink-0 la:items-center la:justify-center la:gap-2 la:whitespace-nowrap la:rounded-md la:text-sm la:font-medium la:outline-none la:transition-[background-color,border-color,color,box-shadow,transform] la:duration-150 la:ease-out la:active:translate-y-px la:disabled:pointer-events-none la:disabled:translate-y-0 la:disabled:opacity-45 la:focus-visible:ring-2 la:focus-visible:ring-ring la:focus-visible:ring-offset-2 la:focus-visible:ring-offset-background la:aria-invalid:border-destructive la:aria-invalid:ring-destructive/25 la:[&_svg]:pointer-events-none la:[&_svg]:shrink-0 la:[&_svg:not([class*='size-'])]:size-4", {
290
+ var we = P("la:inline-flex la:shrink-0 la:items-center la:justify-center la:gap-2 la:whitespace-nowrap la:rounded-md la:text-sm la:font-medium la:outline-none la:transition-[background-color,border-color,color,box-shadow,transform] la:duration-150 la:ease-out la:active:translate-y-px la:disabled:pointer-events-none la:disabled:translate-y-0 la:disabled:opacity-45 la:focus-visible:ring-2 la:focus-visible:ring-ring la:focus-visible:ring-offset-2 la:focus-visible:ring-offset-background la:aria-invalid:border-destructive la:aria-invalid:ring-destructive/25 la:[&_svg]:pointer-events-none la:[&_svg]:shrink-0 la:[&_svg:not([class*='size-'])]:size-4", {
138
291
  variants: {
139
292
  variant: {
140
293
  default: "la:bg-primary la:text-primary-foreground la:shadow-[var(--shadow-control)] la:hover:bg-primary/88",
@@ -158,10 +311,10 @@ var ge = N("la:inline-flex la:shrink-0 la:items-center la:justify-center la:gap-
158
311
  size: "default"
159
312
  }
160
313
  });
161
- function z({ className: e, variant: t, size: n, asChild: r = !1, ...i }) {
162
- return /* @__PURE__ */ A(r ? M : "button", {
314
+ function B({ className: e, variant: t, size: n, asChild: r = !1, ...i }) {
315
+ return /* @__PURE__ */ j(r ? N : "button", {
163
316
  "data-slot": "button",
164
- className: R(ge({
317
+ className: R(we({
165
318
  variant: t,
166
319
  size: n,
167
320
  className: e
@@ -171,9 +324,9 @@ function z({ className: e, variant: t, size: n, asChild: r = !1, ...i }) {
171
324
  }
172
325
  //#endregion
173
326
  //#region src/components/ui/calendar.tsx
174
- function _e({ className: e, classNames: t, showOutsideDays: n = !0, captionLayout: r = "label", buttonVariant: i = "ghost", formatters: a, components: o, ...s }) {
175
- let c = F();
176
- return /* @__PURE__ */ A(P, {
327
+ function Te({ className: e, classNames: t, showOutsideDays: n = !0, captionLayout: r = "label", buttonVariant: i = "ghost", formatters: a, components: o, ...s }) {
328
+ let c = I();
329
+ return /* @__PURE__ */ j(F, {
177
330
  showOutsideDays: n,
178
331
  className: R("la:group/calendar la:bg-background la:p-3 la:[--cell-size:--spacing(8)] la:[[data-slot=card-content]_&]:bg-transparent la:[[data-slot=popover-content]_&]:bg-transparent", e),
179
332
  captionLayout: r,
@@ -186,8 +339,8 @@ function _e({ className: e, classNames: t, showOutsideDays: n = !0, captionLayou
186
339
  months: R("la:relative la:flex la:flex-col la:gap-4 la:md:flex-row", c.months),
187
340
  month: R("la:flex la:w-full la:flex-col la:gap-4", c.month),
188
341
  nav: R("la:absolute la:inset-x-0 la:top-0 la:flex la:w-full la:items-center la:justify-between la:gap-1", c.nav),
189
- button_previous: R(ge({ variant: i }), "la:size-(--cell-size) la:p-0 la:select-none la:aria-disabled:opacity-50", c.button_previous),
190
- button_next: R(ge({ variant: i }), "la:size-(--cell-size) la:p-0 la:select-none la:aria-disabled:opacity-50", c.button_next),
342
+ button_previous: R(we({ variant: i }), "la:size-(--cell-size) la:p-0 la:select-none la:aria-disabled:opacity-50", c.button_previous),
343
+ button_next: R(we({ variant: i }), "la:size-(--cell-size) la:p-0 la:select-none la:aria-disabled:opacity-50", c.button_next),
191
344
  month_caption: R("la:flex la:h-(--cell-size) la:w-full la:items-center la:justify-center la:px-(--cell-size)", c.month_caption),
192
345
  dropdowns: R("la:flex la:h-(--cell-size) la:w-full la:items-center la:justify-center la:gap-1.5 la:text-sm la:font-medium", c.dropdowns),
193
346
  dropdown_root: R("la:relative la:rounded-md la:border la:border-input la:shadow-xs la:has-focus:border-ring la:has-focus:ring-[3px] la:has-focus:ring-ring/50", c.dropdown_root),
@@ -210,20 +363,20 @@ function _e({ className: e, classNames: t, showOutsideDays: n = !0, captionLayou
210
363
  ...t
211
364
  },
212
365
  components: {
213
- Root: ({ className: e, rootRef: t, ...n }) => /* @__PURE__ */ A("div", {
366
+ Root: ({ className: e, rootRef: t, ...n }) => /* @__PURE__ */ j("div", {
214
367
  "data-slot": "calendar",
215
368
  ref: t,
216
369
  className: R(e),
217
370
  ...n
218
371
  }),
219
- Chevron: ({ className: e, orientation: t, ...n }) => A(t === "left" ? p : t === "right" ? m : f, {
372
+ Chevron: ({ className: e, orientation: t, ...n }) => j(t === "left" ? m : t === "right" ? h : p, {
220
373
  className: R("la:size-4", e),
221
374
  ...n
222
375
  }),
223
- DayButton: ve,
224
- WeekNumber: ({ children: e, ...t }) => /* @__PURE__ */ A("td", {
376
+ DayButton: Ee,
377
+ WeekNumber: ({ children: e, ...t }) => /* @__PURE__ */ j("td", {
225
378
  ...t,
226
- children: /* @__PURE__ */ A("div", {
379
+ children: /* @__PURE__ */ j("div", {
227
380
  className: "la:flex la:size-(--cell-size) la:items-center la:justify-center la:text-center",
228
381
  children: e
229
382
  })
@@ -233,11 +386,11 @@ function _e({ className: e, classNames: t, showOutsideDays: n = !0, captionLayou
233
386
  ...s
234
387
  });
235
388
  }
236
- function ve({ className: t, day: n, modifiers: r, ...i }) {
237
- let a = F(), o = e.useRef(null);
389
+ function Ee({ className: t, day: n, modifiers: r, ...i }) {
390
+ let a = I(), o = e.useRef(null);
238
391
  return e.useEffect(() => {
239
392
  r.focused && o.current?.focus();
240
- }, [r.focused]), /* @__PURE__ */ A(z, {
393
+ }, [r.focused]), /* @__PURE__ */ j(B, {
241
394
  ref: o,
242
395
  variant: "ghost",
243
396
  size: "icon",
@@ -252,8 +405,8 @@ function ve({ className: t, day: n, modifiers: r, ...i }) {
252
405
  }
253
406
  //#endregion
254
407
  //#region src/components/ui/input.tsx
255
- function B({ className: e, type: t, ...n }) {
256
- return /* @__PURE__ */ A("input", {
408
+ function V({ className: e, type: t, ...n }) {
409
+ return /* @__PURE__ */ j("input", {
257
410
  type: t,
258
411
  "data-slot": "input",
259
412
  className: R("la:flex la:h-9 la:w-full la:min-w-0 la:rounded-md la:border la:border-input la:bg-card la:px-3 la:py-1 la:text-sm la:text-foreground la:outline-none la:transition-colors la:placeholder:text-muted-foreground la:focus-visible:border-ring la:focus-visible:ring-2 la:focus-visible:ring-ring/20 la:disabled:cursor-not-allowed la:disabled:opacity-50 la:max-md:min-h-11", e),
@@ -262,20 +415,20 @@ function B({ className: e, type: t, ...n }) {
262
415
  }
263
416
  //#endregion
264
417
  //#region src/components/ui/popover.tsx
265
- function ye({ ...e }) {
266
- return /* @__PURE__ */ A(I.Root, {
418
+ function De({ ...e }) {
419
+ return /* @__PURE__ */ j(ne.Root, {
267
420
  "data-slot": "popover",
268
421
  ...e
269
422
  });
270
423
  }
271
- function be({ ...e }) {
272
- return /* @__PURE__ */ A(I.Trigger, {
424
+ function Oe({ ...e }) {
425
+ return /* @__PURE__ */ j(ne.Trigger, {
273
426
  "data-slot": "popover-trigger",
274
427
  ...e
275
428
  });
276
429
  }
277
- function xe({ className: e, align: t = "center", sideOffset: n = 4, ...r }) {
278
- return /* @__PURE__ */ A(I.Portal, { children: /* @__PURE__ */ A(I.Content, {
430
+ function ke({ className: e, align: t = "center", sideOffset: n = 4, ...r }) {
431
+ return /* @__PURE__ */ j(ne.Portal, { children: /* @__PURE__ */ j(ne.Content, {
279
432
  "data-slot": "popover-content",
280
433
  align: t,
281
434
  sideOffset: n,
@@ -283,28 +436,28 @@ function xe({ className: e, align: t = "center", sideOffset: n = 4, ...r }) {
283
436
  ...r
284
437
  }) });
285
438
  }
286
- function Se({ ...e }) {
287
- return /* @__PURE__ */ A(I.Anchor, {
439
+ function Ae({ ...e }) {
440
+ return /* @__PURE__ */ j(ne.Anchor, {
288
441
  "data-slot": "popover-anchor",
289
442
  ...e
290
443
  });
291
444
  }
292
- function Ce({ className: e, ...t }) {
293
- return /* @__PURE__ */ A("div", {
445
+ function je({ className: e, ...t }) {
446
+ return /* @__PURE__ */ j("div", {
294
447
  "data-slot": "popover-header",
295
448
  className: R("la:flex la:flex-col la:gap-1 la:text-sm", e),
296
449
  ...t
297
450
  });
298
451
  }
299
- function we({ className: e, ...t }) {
300
- return /* @__PURE__ */ A("div", {
452
+ function Me({ className: e, ...t }) {
453
+ return /* @__PURE__ */ j("div", {
301
454
  "data-slot": "popover-title",
302
455
  className: R("la:font-medium", e),
303
456
  ...t
304
457
  });
305
458
  }
306
- function Te({ className: e, ...t }) {
307
- return /* @__PURE__ */ A("p", {
459
+ function Ne({ className: e, ...t }) {
460
+ return /* @__PURE__ */ j("p", {
308
461
  "data-slot": "popover-description",
309
462
  className: R("la:text-muted-foreground", e),
310
463
  ...t
@@ -312,7 +465,7 @@ function Te({ className: e, ...t }) {
312
465
  }
313
466
  //#endregion
314
467
  //#region src/time-range.ts
315
- var Ee = [
468
+ var Pe = [
316
469
  {
317
470
  minutes: 5,
318
471
  label: "Last 5 minutes"
@@ -337,11 +490,11 @@ var Ee = [
337
490
  minutes: 10080,
338
491
  label: "Last 7 days"
339
492
  }
340
- ], De = {
493
+ ], Fe = {
341
494
  kind: "relative",
342
495
  minutes: 60
343
496
  };
344
- function Oe(e, t) {
497
+ function Ie(e, t) {
345
498
  switch (e.kind) {
346
499
  case "relative": return { fromMs: Math.floor((t - e.minutes * 6e4) / 6e4) * 6e4 };
347
500
  case "absolute": return {
@@ -351,24 +504,24 @@ function Oe(e, t) {
351
504
  case "all": return {};
352
505
  }
353
506
  }
354
- function ke(e) {
507
+ function Le(e) {
355
508
  switch (e.kind) {
356
- case "relative": return Ee.find((t) => t.minutes === e.minutes)?.label ?? `Last ${e.minutes} minutes`;
357
- case "absolute": return `${je(e.fromMs, e.toMs)} – ${je(e.toMs, e.fromMs)}`;
509
+ case "relative": return Pe.find((t) => t.minutes === e.minutes)?.label ?? `Last ${e.minutes} minutes`;
510
+ case "absolute": return `${ze(e.fromMs, e.toMs)} – ${ze(e.toMs, e.fromMs)}`;
358
511
  case "all": return "All retained";
359
512
  }
360
513
  }
361
- function V(e) {
514
+ function H(e) {
362
515
  switch (e.kind) {
363
- case "relative": return `in the ${ke(e).toLocaleLowerCase()}`;
364
- case "absolute": return `between ${ke(e)}`;
516
+ case "relative": return `in the ${Le(e).toLocaleLowerCase()}`;
517
+ case "absolute": return `between ${Le(e)}`;
365
518
  case "all": return "in retained history";
366
519
  }
367
520
  }
368
- function Ae(e, t) {
521
+ function Re(e, t) {
369
522
  return e.kind === t.kind && (e.kind !== "relative" || e.minutes === t.minutes) && (e.kind !== "absolute" || e.fromMs === t.fromMs && e.toMs === t.toMs);
370
523
  }
371
- function je(e, t) {
524
+ function ze(e, t) {
372
525
  let n = new Date(e), r = n.toDateString() === new Date(t).toDateString(), i = n.toLocaleTimeString([], {
373
526
  hour: "2-digit",
374
527
  minute: "2-digit",
@@ -381,45 +534,45 @@ function je(e, t) {
381
534
  }
382
535
  //#endregion
383
536
  //#region src/TimeRangePicker.tsx
384
- function Me({ value: e, onChange: t, allowAll: n = !0, className: r, align: i = "end" }) {
385
- let [o, s] = a(!1), [c, l] = a(() => Pe(e)), [f, p] = a(!1), m = (e) => {
537
+ function Be({ value: e, onChange: t, allowAll: n = !0, className: r, align: i = "end" }) {
538
+ let [o, s] = a(!1), [c, l] = a(() => He(e)), [d, p] = a(!1), m = (e) => {
386
539
  t(e), s(!1);
387
540
  };
388
- return /* @__PURE__ */ j(ye, {
541
+ return /* @__PURE__ */ M(De, {
389
542
  open: o,
390
543
  onOpenChange: (t) => {
391
- t && (l(Pe(e)), p(!1)), s(t);
544
+ t && (l(He(e)), p(!1)), s(t);
392
545
  },
393
- children: [/* @__PURE__ */ A(be, {
546
+ children: [/* @__PURE__ */ j(Oe, {
394
547
  asChild: !0,
395
- children: /* @__PURE__ */ j(z, {
548
+ children: /* @__PURE__ */ M(B, {
396
549
  type: "button",
397
550
  variant: "outline",
398
551
  className: r,
399
- "aria-label": `Time range: ${ke(e)}`,
552
+ "aria-label": `Time range: ${Le(e)}`,
400
553
  children: [
401
- /* @__PURE__ */ A(u, { "aria-hidden": "true" }),
402
- /* @__PURE__ */ A("span", {
554
+ /* @__PURE__ */ j(u, { "aria-hidden": "true" }),
555
+ /* @__PURE__ */ j("span", {
403
556
  className: "la:truncate la:tabular-nums",
404
- children: ke(e)
557
+ children: Le(e)
405
558
  }),
406
- /* @__PURE__ */ A(d, {
559
+ /* @__PURE__ */ j(f, {
407
560
  "aria-hidden": "true",
408
561
  className: "la:text-muted-foreground"
409
562
  })
410
563
  ]
411
564
  })
412
- }), /* @__PURE__ */ j(xe, {
565
+ }), /* @__PURE__ */ M(ke, {
413
566
  align: i,
414
567
  "aria-label": "Time range",
415
568
  className: "la:flex la:w-auto la:p-0 la:text-sm",
416
- children: [/* @__PURE__ */ j("div", {
569
+ children: [/* @__PURE__ */ M("div", {
417
570
  className: "la:flex la:flex-col la:gap-0.5 la:border-r la:p-2",
418
571
  role: "group",
419
572
  "aria-label": "Preset ranges",
420
- children: [Ee.map((t) => /* @__PURE__ */ A(Ne, {
573
+ children: [Pe.map((t) => /* @__PURE__ */ j(Ve, {
421
574
  label: t.label,
422
- selected: Ae(e, {
575
+ selected: Re(e, {
423
576
  kind: "relative",
424
577
  minutes: t.minutes
425
578
  }),
@@ -427,17 +580,17 @@ function Me({ value: e, onChange: t, allowAll: n = !0, className: r, align: i =
427
580
  kind: "relative",
428
581
  minutes: t.minutes
429
582
  })
430
- }, t.minutes)), n && /* @__PURE__ */ A(Ne, {
583
+ }, t.minutes)), n && /* @__PURE__ */ j(Ve, {
431
584
  label: "All retained",
432
585
  selected: e.kind === "all",
433
586
  onSelect: () => m({ kind: "all" })
434
587
  })]
435
- }), /* @__PURE__ */ j("form", {
588
+ }), /* @__PURE__ */ M("form", {
436
589
  className: "la:flex la:w-[22rem] la:flex-col",
437
590
  "aria-label": "Custom range",
438
591
  onSubmit: (e) => {
439
592
  e.preventDefault();
440
- let t = Fe(c);
593
+ let t = Ue(c);
441
594
  if (!t) {
442
595
  p(!0);
443
596
  return;
@@ -445,7 +598,7 @@ function Me({ value: e, onChange: t, allowAll: n = !0, className: r, align: i =
445
598
  p(!1), m(t);
446
599
  },
447
600
  children: [
448
- /* @__PURE__ */ A(_e, {
601
+ /* @__PURE__ */ j(Te, {
449
602
  mode: "range",
450
603
  numberOfMonths: 1,
451
604
  defaultMonth: c.dates?.to ?? c.dates?.from,
@@ -456,12 +609,12 @@ function Me({ value: e, onChange: t, allowAll: n = !0, className: r, align: i =
456
609
  })),
457
610
  disabled: { after: /* @__PURE__ */ new Date() }
458
611
  }),
459
- /* @__PURE__ */ j("div", {
612
+ /* @__PURE__ */ M("div", {
460
613
  className: "la:flex la:items-end la:gap-2 la:border-t la:px-3 la:py-3",
461
614
  children: [
462
- /* @__PURE__ */ j("label", {
615
+ /* @__PURE__ */ M("label", {
463
616
  className: "la:grid la:gap-1 la:text-xs la:text-muted-foreground",
464
- children: ["From", /* @__PURE__ */ A(B, {
617
+ children: ["From", /* @__PURE__ */ j(V, {
465
618
  type: "time",
466
619
  name: "from",
467
620
  required: !0,
@@ -471,12 +624,12 @@ function Me({ value: e, onChange: t, allowAll: n = !0, className: r, align: i =
471
624
  ...c,
472
625
  fromTime: e.target.value
473
626
  }),
474
- "aria-invalid": f || void 0
627
+ "aria-invalid": d || void 0
475
628
  })]
476
629
  }),
477
- /* @__PURE__ */ j("label", {
630
+ /* @__PURE__ */ M("label", {
478
631
  className: "la:grid la:gap-1 la:text-xs la:text-muted-foreground",
479
- children: ["To", /* @__PURE__ */ A(B, {
632
+ children: ["To", /* @__PURE__ */ j(V, {
480
633
  type: "time",
481
634
  name: "to",
482
635
  required: !0,
@@ -486,10 +639,10 @@ function Me({ value: e, onChange: t, allowAll: n = !0, className: r, align: i =
486
639
  ...c,
487
640
  toTime: e.target.value
488
641
  }),
489
- "aria-invalid": f || void 0
642
+ "aria-invalid": d || void 0
490
643
  })]
491
644
  }),
492
- /* @__PURE__ */ A(z, {
645
+ /* @__PURE__ */ j(B, {
493
646
  type: "submit",
494
647
  variant: "outline",
495
648
  size: "sm",
@@ -499,7 +652,7 @@ function Me({ value: e, onChange: t, allowAll: n = !0, className: r, align: i =
499
652
  })
500
653
  ]
501
654
  }),
502
- f && /* @__PURE__ */ A("p", {
655
+ d && /* @__PURE__ */ j("p", {
503
656
  className: "la:px-3 la:pb-3 la:text-xs la:text-danger",
504
657
  role: "alert",
505
658
  children: "From must be before To."
@@ -509,8 +662,8 @@ function Me({ value: e, onChange: t, allowAll: n = !0, className: r, align: i =
509
662
  })]
510
663
  });
511
664
  }
512
- function Ne({ label: e, selected: t, onSelect: n }) {
513
- return /* @__PURE__ */ A(z, {
665
+ function Ve({ label: e, selected: t, onSelect: n }) {
666
+ return /* @__PURE__ */ j(B, {
514
667
  type: "button",
515
668
  variant: t ? "secondary" : "ghost",
516
669
  size: "sm",
@@ -520,73 +673,73 @@ function Ne({ label: e, selected: t, onSelect: n }) {
520
673
  children: e
521
674
  });
522
675
  }
523
- function Pe(e) {
524
- let t = Date.now(), n = Oe(e, t), r = new Date(n.fromMs ?? t - 36e5), i = new Date(n.toMs ?? t);
676
+ function He(e) {
677
+ let t = Date.now(), n = Ie(e, t), r = new Date(n.fromMs ?? t - 36e5), i = new Date(n.toMs ?? t);
525
678
  return {
526
679
  dates: {
527
- from: Ie(r),
528
- to: Ie(i)
680
+ from: We(r),
681
+ to: We(i)
529
682
  },
530
- fromTime: Le(r),
531
- toTime: Le(i)
683
+ fromTime: Ge(r),
684
+ toTime: Ge(i)
532
685
  };
533
686
  }
534
- function Fe(e) {
687
+ function Ue(e) {
535
688
  let t = e.dates?.from, n = e.dates?.to ?? t;
536
689
  if (!t || !n) return null;
537
- let r = Re(t, e.fromTime), i = Re(n, e.toTime);
690
+ let r = Ke(t, e.fromTime), i = Ke(n, e.toTime);
538
691
  return Number.isFinite(r) && Number.isFinite(i) && r < i ? {
539
692
  kind: "absolute",
540
693
  fromMs: r,
541
694
  toMs: i
542
695
  } : null;
543
696
  }
544
- function Ie(e) {
697
+ function We(e) {
545
698
  return new Date(e.getFullYear(), e.getMonth(), e.getDate());
546
699
  }
547
- function Le(e) {
700
+ function Ge(e) {
548
701
  return `${String(e.getHours()).padStart(2, "0")}:${String(e.getMinutes()).padStart(2, "0")}`;
549
702
  }
550
- function Re(e, t) {
703
+ function Ke(e, t) {
551
704
  let [n, r] = t.split(":").map(Number);
552
705
  return new Date(e.getFullYear(), e.getMonth(), e.getDate(), n ?? 0, r ?? 0).getTime();
553
706
  }
554
707
  //#endregion
555
708
  //#region src/components/ui/badge.tsx
556
- var ze = N("la:inline-flex la:items-center la:justify-center la:gap-1.5 la:rounded-md la:border la:px-2 la:py-0.5 la:text-xs la:font-medium la:whitespace-nowrap", {
709
+ var qe = P("la:inline-flex la:items-center la:justify-center la:gap-1.5 la:rounded-md la:border la:px-2 la:py-0.5 la:text-xs la:font-medium la:whitespace-nowrap", {
557
710
  variants: { variant: {
558
711
  default: "la:border-transparent la:bg-muted la:text-muted-foreground",
559
712
  outline: "la:border-border la:text-muted-foreground"
560
713
  } },
561
714
  defaultVariants: { variant: "default" }
562
715
  });
563
- function H({ className: e, variant: t, ...n }) {
564
- return /* @__PURE__ */ A("span", {
716
+ function U({ className: e, variant: t, ...n }) {
717
+ return /* @__PURE__ */ j("span", {
565
718
  "data-slot": "badge",
566
- className: R(ze({ variant: t }), e),
719
+ className: R(qe({ variant: t }), e),
567
720
  ...n
568
721
  });
569
722
  }
570
723
  //#endregion
571
724
  //#region src/components/ui/native-select.tsx
572
- function Be({ className: e, size: t = "default", ...n }) {
573
- return /* @__PURE__ */ j("div", {
725
+ function Je({ className: e, size: t = "default", ...n }) {
726
+ return /* @__PURE__ */ M("div", {
574
727
  className: "la:group/native-select la:relative la:w-fit la:has-[select:disabled]:opacity-50",
575
728
  "data-slot": "native-select-wrapper",
576
- children: [/* @__PURE__ */ A("select", {
729
+ children: [/* @__PURE__ */ j("select", {
577
730
  "data-slot": "native-select",
578
731
  "data-size": t,
579
732
  className: R("la:h-9 la:w-full la:min-w-0 la:appearance-none la:rounded-md la:border la:border-input la:bg-transparent la:px-3 la:py-2 la:pr-9 la:text-sm la:shadow-xs la:outline-none la:transition-[color,box-shadow] la:selection:bg-primary la:selection:text-primary-foreground la:disabled:pointer-events-none la:disabled:cursor-not-allowed la:data-[size=sm]:h-8 la:data-[size=sm]:py-1 la:focus-visible:border-ring la:focus-visible:ring-[3px] la:focus-visible:ring-ring/50 la:aria-invalid:border-destructive la:aria-invalid:ring-destructive/20 la:dark:bg-input/30 la:dark:hover:bg-input/50 la:dark:aria-invalid:ring-destructive/40", e),
580
733
  ...n
581
- }), /* @__PURE__ */ A(f, {
734
+ }), /* @__PURE__ */ j(p, {
582
735
  className: "la:pointer-events-none la:absolute la:top-1/2 la:right-3.5 la:size-4 la:-translate-y-1/2 la:text-muted-foreground la:opacity-50 la:select-none",
583
736
  "aria-hidden": "true",
584
737
  "data-slot": "native-select-icon"
585
738
  })]
586
739
  });
587
740
  }
588
- function U({ className: e, ...t }) {
589
- return /* @__PURE__ */ A("option", {
741
+ function W({ className: e, ...t }) {
742
+ return /* @__PURE__ */ j("option", {
590
743
  "data-slot": "native-select-option",
591
744
  className: R("la:bg-[Canvas] la:text-[CanvasText]", e),
592
745
  ...t
@@ -594,22 +747,22 @@ function U({ className: e, ...t }) {
594
747
  }
595
748
  //#endregion
596
749
  //#region src/components/ui/sheet.tsx
597
- var Ve = L.Root, He = L.Title, Ue = L.Description;
598
- function We({ className: e, children: t, container: n, ...r }) {
599
- return /* @__PURE__ */ j(L.Portal, {
750
+ var Ye = L.Root, Xe = L.Title, Ze = L.Description;
751
+ function Qe({ className: e, children: t, container: n, ...r }) {
752
+ return /* @__PURE__ */ M(L.Portal, {
600
753
  container: n,
601
- children: [/* @__PURE__ */ A(L.Overlay, { className: "la-sheet-overlay" }), /* @__PURE__ */ j(L.Content, {
754
+ children: [/* @__PURE__ */ j(L.Overlay, { className: "la-sheet-overlay" }), /* @__PURE__ */ M(L.Content, {
602
755
  "data-slot": "sheet-content",
603
756
  className: R("la-observer la-sheet", e),
604
757
  ...r,
605
- children: [t, /* @__PURE__ */ A(L.Close, {
758
+ children: [t, /* @__PURE__ */ j(L.Close, {
606
759
  asChild: !0,
607
- children: /* @__PURE__ */ A(z, {
760
+ children: /* @__PURE__ */ j(B, {
608
761
  className: "la-sheet-close",
609
762
  variant: "ghost",
610
763
  size: "icon",
611
764
  "aria-label": "Close",
612
- children: /* @__PURE__ */ A(T, { "aria-hidden": "true" })
765
+ children: /* @__PURE__ */ j(E, { "aria-hidden": "true" })
613
766
  })
614
767
  })]
615
768
  })]
@@ -617,62 +770,62 @@ function We({ className: e, children: t, container: n, ...r }) {
617
770
  }
618
771
  //#endregion
619
772
  //#region src/components/ui/table.tsx
620
- function W({ className: e, containerProps: t, ...n }) {
621
- return /* @__PURE__ */ A("div", {
773
+ function G({ className: e, containerProps: t, ...n }) {
774
+ return /* @__PURE__ */ j("div", {
622
775
  ...t,
623
776
  "data-slot": "table-container",
624
777
  className: R("la:relative la:w-full la:overflow-x-auto", t?.className),
625
- children: /* @__PURE__ */ A("table", {
778
+ children: /* @__PURE__ */ j("table", {
626
779
  "data-slot": "table",
627
780
  className: R("la:w-full la:caption-bottom la:text-sm la:tabular-nums", e),
628
781
  ...n
629
782
  })
630
783
  });
631
784
  }
632
- function G({ className: e, ...t }) {
633
- return /* @__PURE__ */ A("thead", {
785
+ function K({ className: e, ...t }) {
786
+ return /* @__PURE__ */ j("thead", {
634
787
  "data-slot": "table-header",
635
788
  className: R("la:[&_tr]:border-b", e),
636
789
  ...t
637
790
  });
638
791
  }
639
- function K({ className: e, ...t }) {
640
- return /* @__PURE__ */ A("tbody", {
792
+ function q({ className: e, ...t }) {
793
+ return /* @__PURE__ */ j("tbody", {
641
794
  "data-slot": "table-body",
642
795
  className: R("la:[&_tr:last-child]:border-0", e),
643
796
  ...t
644
797
  });
645
798
  }
646
- function Ge({ className: e, ...t }) {
647
- return /* @__PURE__ */ A("tfoot", {
799
+ function $e({ className: e, ...t }) {
800
+ return /* @__PURE__ */ j("tfoot", {
648
801
  "data-slot": "table-footer",
649
802
  className: R("la:bg-muted/50 la:border-t la:font-medium la:[&>tr]:last:border-b-0", e),
650
803
  ...t
651
804
  });
652
805
  }
653
- function q({ className: e, ...t }) {
654
- return /* @__PURE__ */ A("tr", {
806
+ function J({ className: e, ...t }) {
807
+ return /* @__PURE__ */ j("tr", {
655
808
  "data-slot": "table-row",
656
809
  className: R("la:border-b la:transition-colors la:duration-150 la:hover:bg-muted/60 la:data-[state=selected]:bg-muted", e),
657
810
  ...t
658
811
  });
659
812
  }
660
- function J({ className: e, ...t }) {
661
- return /* @__PURE__ */ A("th", {
813
+ function Y({ className: e, ...t }) {
814
+ return /* @__PURE__ */ j("th", {
662
815
  "data-slot": "table-head",
663
816
  className: R("la:h-10 la:whitespace-nowrap la:px-3 la:text-left la:align-middle la:text-xs la:font-medium la:text-muted-foreground la:[&:has([role=checkbox])]:pr-0 la:[&>[role=checkbox]]:translate-y-[2px]", e),
664
817
  ...t
665
818
  });
666
819
  }
667
- function Y({ className: e, ...t }) {
668
- return /* @__PURE__ */ A("td", {
820
+ function X({ className: e, ...t }) {
821
+ return /* @__PURE__ */ j("td", {
669
822
  "data-slot": "table-cell",
670
823
  className: R("la:whitespace-nowrap la:px-3 la:py-2.5 la:align-middle la:[&:has([role=checkbox])]:pr-0 la:[&>[role=checkbox]]:translate-y-[2px]", e),
671
824
  ...t
672
825
  });
673
826
  }
674
- function Ke({ className: e, ...t }) {
675
- return /* @__PURE__ */ A("caption", {
827
+ function et({ className: e, ...t }) {
828
+ return /* @__PURE__ */ j("caption", {
676
829
  "data-slot": "table-caption",
677
830
  className: R("la:text-muted-foreground la:mt-4 la:text-sm", e),
678
831
  ...t
@@ -680,7 +833,7 @@ function Ke({ className: e, ...t }) {
680
833
  }
681
834
  //#endregion
682
835
  //#region src/observer-hooks.ts
683
- function qe(e) {
836
+ function tt(e) {
684
837
  let [n, r] = a(0), [i, o] = a(), [s, c] = a(!0), [l, u] = a(!1);
685
838
  return t(() => {
686
839
  let t = new AbortController(), n, r = 1e3;
@@ -713,7 +866,7 @@ function qe(e) {
713
866
  retry: () => r((e) => e + 1)
714
867
  };
715
868
  }
716
- function Je(e, n = !0) {
869
+ function nt(e, n = !0) {
717
870
  let [r, i] = a(), [o, s] = a(!1), [c, l] = a(0);
718
871
  return t(() => i(void 0), [e]), t(() => {
719
872
  if (!n) return;
@@ -722,7 +875,7 @@ function Je(e, n = !0) {
722
875
  try {
723
876
  if (!e.watchRequests) throw Error("Request traces unavailable");
724
877
  if (await e.watchRequests((e) => {
725
- r.signal.aborted || (t = e.resumeCursor, i((t) => Ye(t, e)), s(!1), o = 1e3);
878
+ r.signal.aborted || (t = e.resumeCursor, i((t) => rt(t, e)), s(!1), o = 1e3);
726
879
  }, r.signal, t), !r.signal.aborted) throw Error("Request stream disconnected");
727
880
  } catch {
728
881
  r.signal.aborted || s(!0);
@@ -743,7 +896,7 @@ function Je(e, n = !0) {
743
896
  retry: () => l((e) => e + 1)
744
897
  };
745
898
  }
746
- function Ye(e, t) {
899
+ function rt(e, t) {
747
900
  let n = new Map((e?.epoch === t.epoch && !t.reset ? e.records : []).map((e) => [e.eventId ?? e.sequence, e]));
748
901
  for (let e of t.records) n.set(e.eventId ?? e.sequence, e);
749
902
  return {
@@ -752,7 +905,7 @@ function Ye(e, t) {
752
905
  records: [...n.values()].sort((e, t) => t.sequence - e.sequence).slice(0, t.capacity)
753
906
  };
754
907
  }
755
- function Xe(e, n, r, i = 1e4) {
908
+ function it(e, n, r, i = 1e4) {
756
909
  let o = r ? JSON.stringify(n) : void 0, [s, c] = a(0), [l, u] = a(), [d, f] = a(!1), [p, m] = a(!1);
757
910
  t(() => {
758
911
  if (!o) return;
@@ -795,7 +948,7 @@ function Xe(e, n, r, i = 1e4) {
795
948
  }
796
949
  //#endregion
797
950
  //#region src/request-history.ts
798
- function Ze(e, n) {
951
+ function at(e, n) {
799
952
  let [r, o] = a(), [s, c] = a(!1), [l, u] = a(!1), d = i(() => {});
800
953
  return t(() => {
801
954
  if (o(void 0), u(!1), c(!1), !n) return;
@@ -838,176 +991,205 @@ function Ze(e, n) {
838
991
  }
839
992
  //#endregion
840
993
  //#region src/RequestObserver.tsx
841
- function Qe({ client: e, actor: n, timeRange: o, onTimeRangeChange: s, focus: c }) {
842
- let [l, u] = a(), [d, f] = a(De), p = o ?? d, m = s ?? f, h = Ze(e, r(() => l ? {
994
+ function ot({ client: e, actor: n, timeRange: o, onTimeRangeChange: s, focus: c }) {
995
+ let [l, u] = a(), [f, p] = a(Fe), m = o ?? f, h = s ?? p, g = at(e, r(() => l ? {
843
996
  ...l,
844
997
  ...n,
845
- ...l.requestId || l.connectionId ? {} : Oe(p, Date.now())
998
+ ...l.requestId || l.connectionId ? {} : Ie(m, Date.now())
846
999
  } : void 0, [
847
1000
  l,
848
1001
  n?.actorName,
849
1002
  n?.actorId,
850
- p
851
- ])), { page: g, failed: _, retry: v } = Je(e), [x, S] = a(), [C, w] = a(), T = i(null), E = i(null), D = n ? "h3" : "h1", O = l ? h.page : x ?? g, M = g ?? h.page, N = (O?.records ?? []).filter((e) => !n || e.actorName === n.actorName && e.actorId === n.actorId);
1003
+ m
1004
+ ])), { page: _, failed: v, retry: y } = nt(e), [S, C] = a(), [w, T] = a(), [E, D] = a("waterfall"), O = i(null), k = i(null), N = n ? "h3" : "h1", P = l ? g.page : S ?? _, F = _ ?? g.page, I = (P?.records ?? []).filter((e) => !n || e.actorName === n.actorName && e.actorId === n.actorId);
852
1005
  return t(() => {
853
- S(void 0), u(void 0);
1006
+ C(void 0), u(void 0);
854
1007
  }, [
855
1008
  e,
856
1009
  n?.actorName,
857
1010
  n?.actorId
858
1011
  ]), t(() => {
859
1012
  c && u(c);
860
- }, [c]), t(() => w(void 0), [
1013
+ }, [c]), t(() => T(void 0), [
861
1014
  e,
862
- g?.epoch,
1015
+ _?.epoch,
863
1016
  l,
864
1017
  n?.actorName,
865
1018
  n?.actorId
866
- ]), /* @__PURE__ */ j("section", {
867
- ref: T,
1019
+ ]), /* @__PURE__ */ M("section", {
1020
+ ref: O,
868
1021
  className: "la-observer la-requests",
869
1022
  "aria-label": "Request observer",
870
1023
  children: [
871
- (l?.requestId || l?.connectionId) && /* @__PURE__ */ j("p", { children: [
1024
+ (l?.requestId || l?.connectionId) && /* @__PURE__ */ M("p", { children: [
872
1025
  "Showing ",
873
1026
  l.requestId ? `request ${l.requestId}` : `connection ${l?.connectionId}`,
874
1027
  " ",
875
- /* @__PURE__ */ A(z, {
1028
+ /* @__PURE__ */ j(B, {
876
1029
  variant: "link",
877
1030
  onClick: () => u(void 0),
878
1031
  children: "Clear filter"
879
1032
  })
880
1033
  ] }),
881
- /* @__PURE__ */ j("div", {
1034
+ /* @__PURE__ */ M("div", {
882
1035
  className: "la-observer-toolbar",
883
- children: [/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A(D, { children: "Requests" }), /* @__PURE__ */ A("p", { children: n ? "Method calls and WebSocket events for this instance." : "Method calls and WebSocket events, with time spent waiting and processing." })] }), /* @__PURE__ */ j("div", {
1036
+ children: [/* @__PURE__ */ M("div", {
1037
+ className: n ? "la:sr-only" : void 0,
1038
+ children: [/* @__PURE__ */ j(N, { children: "Requests" }), /* @__PURE__ */ j("p", { children: n ? "Method calls and WebSocket events for this instance." : "Method calls and WebSocket events, with time spent waiting and processing." })]
1039
+ }), /* @__PURE__ */ M("div", {
884
1040
  className: "la-request-actions",
885
- children: [e.listRequests && /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A(z, {
886
- variant: l ? "outline" : "secondary",
887
- "aria-pressed": !l,
888
- onClick: () => {
889
- u(void 0), S(void 0);
890
- },
891
- children: "Live"
892
- }), /* @__PURE__ */ A(z, {
893
- variant: l ? "secondary" : "outline",
894
- "aria-pressed": !!l,
895
- onClick: () => {
896
- l || u({});
897
- },
898
- children: "History"
899
- })] }), !l && /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ j(z, {
900
- variant: "outline",
901
- disabled: !O,
902
- onClick: () => S(x ? void 0 : g),
903
- children: [A(x ? b : y, { "aria-hidden": "true" }), x ? "Resume" : "Pause"]
904
- }), _ && /* @__PURE__ */ j(z, {
905
- variant: "outline",
906
- onClick: v,
907
- children: [/* @__PURE__ */ A(ee, { "aria-hidden": "true" }), "Retry"]
908
- })] })]
1041
+ children: [
1042
+ /* @__PURE__ */ M("div", {
1043
+ className: "request-view-toggle",
1044
+ role: "group",
1045
+ "aria-label": "Request view",
1046
+ children: [/* @__PURE__ */ M(B, {
1047
+ variant: E === "waterfall" ? "secondary" : "ghost",
1048
+ "aria-pressed": E === "waterfall",
1049
+ onClick: () => D("waterfall"),
1050
+ children: [/* @__PURE__ */ j(d, { "aria-hidden": "true" }), "Waterfall"]
1051
+ }), /* @__PURE__ */ M(B, {
1052
+ variant: E === "table" ? "secondary" : "ghost",
1053
+ "aria-pressed": E === "table",
1054
+ onClick: () => D("table"),
1055
+ children: [/* @__PURE__ */ j(ee, { "aria-hidden": "true" }), "Table"]
1056
+ })]
1057
+ }),
1058
+ e.listRequests && /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ j(B, {
1059
+ variant: l ? "outline" : "secondary",
1060
+ "aria-pressed": !l,
1061
+ onClick: () => {
1062
+ u(void 0), C(void 0);
1063
+ },
1064
+ children: "Live"
1065
+ }), /* @__PURE__ */ j(B, {
1066
+ variant: l ? "secondary" : "outline",
1067
+ "aria-pressed": !!l,
1068
+ onClick: () => {
1069
+ l || u({});
1070
+ },
1071
+ children: "History"
1072
+ })] }),
1073
+ !l && /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ M(B, {
1074
+ variant: "outline",
1075
+ disabled: !P,
1076
+ onClick: () => C(S ? void 0 : _),
1077
+ children: [j(S ? x : b, { "aria-hidden": "true" }), S ? "Resume" : "Pause"]
1078
+ }), v && /* @__PURE__ */ M(B, {
1079
+ variant: "outline",
1080
+ onClick: y,
1081
+ children: [/* @__PURE__ */ j(te, { "aria-hidden": "true" }), "Retry"]
1082
+ })] })
1083
+ ]
909
1084
  })]
910
1085
  }),
911
- l && /* @__PURE__ */ A($e, {
1086
+ l && /* @__PURE__ */ j(st, {
912
1087
  query: l,
913
- range: p,
914
- onRangeChange: m,
915
- loading: h.loading,
1088
+ range: m,
1089
+ onRangeChange: h,
1090
+ loading: g.loading,
916
1091
  onSearch: u,
917
1092
  scoped: !!n
918
1093
  }),
919
- l && h.failed && /* @__PURE__ */ j("div", {
1094
+ l && g.failed && /* @__PURE__ */ M("div", {
920
1095
  className: "la-observer-error",
921
1096
  role: "alert",
922
1097
  children: [
923
1098
  "Request history unavailable.",
924
1099
  " ",
925
- /* @__PURE__ */ A(z, {
1100
+ /* @__PURE__ */ j(B, {
926
1101
  variant: "outline",
927
- onClick: h.retry,
1102
+ onClick: g.retry,
928
1103
  children: "Retry history"
929
1104
  })
930
1105
  ]
931
1106
  }),
932
- !l && _ && /* @__PURE__ */ j("div", {
1107
+ !l && v && /* @__PURE__ */ M("div", {
933
1108
  className: "la-observer-error",
934
1109
  role: "alert",
935
- children: ["Request stream disconnected. Reconnecting… ", g ? "Showing the last received requests." : "Check your connection and runtime version."]
1110
+ children: ["Request stream disconnected. Reconnecting… ", _ ? "Showing the last received requests." : "Check your connection and runtime version."]
936
1111
  }),
937
- !!M?.dropped && /* @__PURE__ */ j("div", {
1112
+ !!F?.dropped && /* @__PURE__ */ M("div", {
938
1113
  className: "la-observer-error",
939
1114
  role: "alert",
940
- children: [M.dropped.toLocaleString(), " request traces were not delivered. This history is incomplete."]
1115
+ children: [F.dropped.toLocaleString(), " request traces were not delivered. This history is incomplete."]
941
1116
  }),
942
- M?.persistenceFailed && /* @__PURE__ */ A("div", {
1117
+ F?.persistenceFailed && /* @__PURE__ */ j("div", {
943
1118
  className: "la-observer-error",
944
1119
  role: "alert",
945
1120
  children: "Some request events could not be saved. This history may be incomplete."
946
1121
  }),
947
- O?.reset && /* @__PURE__ */ A("div", {
1122
+ P?.reset && /* @__PURE__ */ j("div", {
948
1123
  className: "la-observer-error",
949
1124
  role: "alert",
950
1125
  children: "Some older events are no longer retained. Showing available history."
951
1126
  }),
952
- /* @__PURE__ */ j("div", {
953
- className: "la-observer-table-frame",
954
- children: [/* @__PURE__ */ j(W, {
1127
+ E === "waterfall" && I.length > 0 && /* @__PURE__ */ j(xe, {
1128
+ records: I,
1129
+ selected: w,
1130
+ onSelect: (e, t) => {
1131
+ k.current = t, T(e);
1132
+ }
1133
+ }),
1134
+ /* @__PURE__ */ M("div", {
1135
+ className: E === "table" || !I.length ? "la-observer-table-frame" : void 0,
1136
+ children: [E === "table" && /* @__PURE__ */ M(G, {
955
1137
  "aria-label": l ? "Saved requests" : "Recent requests",
956
1138
  className: "la-request-table",
957
- children: [/* @__PURE__ */ A(G, { children: /* @__PURE__ */ j(q, { children: [
958
- /* @__PURE__ */ A(J, {
1139
+ children: [/* @__PURE__ */ j(K, { children: /* @__PURE__ */ M(J, { children: [
1140
+ /* @__PURE__ */ j(Y, {
959
1141
  scope: "col",
960
1142
  children: "Time"
961
1143
  }),
962
- /* @__PURE__ */ A(J, {
1144
+ /* @__PURE__ */ j(Y, {
963
1145
  scope: "col",
964
1146
  children: "Request"
965
1147
  }),
966
- /* @__PURE__ */ A(J, {
1148
+ /* @__PURE__ */ j(Y, {
967
1149
  scope: "col",
968
1150
  children: "Instance"
969
1151
  }),
970
- /* @__PURE__ */ A(J, {
1152
+ /* @__PURE__ */ j(Y, {
971
1153
  scope: "col",
972
1154
  children: "Transport"
973
1155
  }),
974
- /* @__PURE__ */ A(J, {
1156
+ /* @__PURE__ */ j(Y, {
975
1157
  scope: "col",
976
1158
  children: "Outcome"
977
1159
  }),
978
- /* @__PURE__ */ A(J, {
1160
+ /* @__PURE__ */ j(Y, {
979
1161
  scope: "col",
980
1162
  children: "Total"
981
1163
  }),
982
- /* @__PURE__ */ A(J, {
1164
+ /* @__PURE__ */ j(Y, {
983
1165
  scope: "col",
984
1166
  children: "Queue wait"
985
1167
  }),
986
- /* @__PURE__ */ A(J, {
1168
+ /* @__PURE__ */ j(Y, {
987
1169
  scope: "col",
988
- children: /* @__PURE__ */ A("span", {
1170
+ children: /* @__PURE__ */ j("span", {
989
1171
  className: "la:sr-only",
990
1172
  children: "Details"
991
1173
  })
992
1174
  })
993
- ] }) }), /* @__PURE__ */ A(K, { children: N.map((e) => /* @__PURE__ */ j(q, {
1175
+ ] }) }), /* @__PURE__ */ j(q, { children: I.map((e) => /* @__PURE__ */ M(J, {
994
1176
  className: "la-clickable-row",
995
- "data-state": C === e ? "selected" : void 0,
1177
+ "data-state": w === e ? "selected" : void 0,
996
1178
  onClick: (t) => {
997
- E.current = t.currentTarget.querySelector("button"), w(e);
1179
+ k.current = t.currentTarget.querySelector("button"), T(e);
998
1180
  },
999
1181
  children: [
1000
- /* @__PURE__ */ A(Y, { children: /* @__PURE__ */ A("time", {
1182
+ /* @__PURE__ */ j(X, { children: /* @__PURE__ */ j("time", {
1001
1183
  dateTime: new Date(e.startedAtMs).toISOString(),
1002
1184
  title: new Date(e.startedAtMs).toLocaleString(),
1003
1185
  children: l ? new Date(e.startedAtMs).toLocaleString([], { hour12: !1 }) : new Date(e.startedAtMs).toLocaleTimeString([], { hour12: !1 })
1004
1186
  }) }),
1005
- /* @__PURE__ */ A(Y, { children: /* @__PURE__ */ A("span", {
1187
+ /* @__PURE__ */ j(X, { children: /* @__PURE__ */ j("span", {
1006
1188
  className: "la-request-operation",
1007
1189
  title: e.operation,
1008
1190
  children: e.operation
1009
1191
  }) }),
1010
- /* @__PURE__ */ A(Y, { children: /* @__PURE__ */ j("span", {
1192
+ /* @__PURE__ */ j(X, { children: /* @__PURE__ */ M("span", {
1011
1193
  className: "la-request-actor",
1012
1194
  title: `${e.actorName} / ${e.actorId}`,
1013
1195
  children: [
@@ -1016,18 +1198,18 @@ function Qe({ client: e, actor: n, timeRange: o, onTimeRangeChange: s, focus: c
1016
1198
  e.actorId
1017
1199
  ]
1018
1200
  }) }),
1019
- /* @__PURE__ */ A(Y, { children: e.kind === "method" ? "Method" : "WebSocket" }),
1020
- /* @__PURE__ */ A(Y, { children: /* @__PURE__ */ A(H, {
1201
+ /* @__PURE__ */ j(X, { children: e.kind === "method" ? "Method" : "WebSocket" }),
1202
+ /* @__PURE__ */ j(X, { children: /* @__PURE__ */ j(U, {
1021
1203
  variant: "outline",
1022
1204
  className: `la-request-outcome-${e.outcome}`,
1023
1205
  children: e.outcome[0].toUpperCase() + e.outcome.slice(1)
1024
1206
  }) }),
1025
- /* @__PURE__ */ A(Y, { children: tt(e.durationMs) }),
1026
- /* @__PURE__ */ A(Y, { children: e.queueWaitMs === null ? /* @__PURE__ */ A("span", {
1207
+ /* @__PURE__ */ j(X, { children: z(e.durationMs) }),
1208
+ /* @__PURE__ */ j(X, { children: e.queueWaitMs === null ? /* @__PURE__ */ j("span", {
1027
1209
  title: "Request did not begin processing",
1028
1210
  children: "—"
1029
- }) : tt(e.queueWaitMs) }),
1030
- /* @__PURE__ */ A(Y, { children: /* @__PURE__ */ A(z, {
1211
+ }) : z(e.queueWaitMs) }),
1212
+ /* @__PURE__ */ j(X, { children: /* @__PURE__ */ j(B, {
1031
1213
  variant: "ghost",
1032
1214
  size: "sm",
1033
1215
  "aria-label": `Inspect ${e.operation} request`,
@@ -1035,58 +1217,61 @@ function Qe({ client: e, actor: n, timeRange: o, onTimeRangeChange: s, focus: c
1035
1217
  children: "Details"
1036
1218
  }) })
1037
1219
  ]
1038
- }, e.eventId ?? `${O.epoch}-${e.sequence}`)) })]
1039
- }), !N.length && /* @__PURE__ */ j("div", {
1220
+ }, e.eventId ?? `${P.epoch}-${e.sequence}`)) })]
1221
+ }), !I.length && /* @__PURE__ */ M("div", {
1040
1222
  className: "la-request-empty",
1041
1223
  role: "status",
1042
- children: [/* @__PURE__ */ A("strong", { children: l ? h.loading ? "Loading history…" : h.failed ? "History unavailable" : "No saved requests in this range" : O ? "No requests yet" : _ ? "Requests unavailable" : "Connecting to requests…" }), /* @__PURE__ */ A("p", { children: l ? "Try a wider time range or fewer filters. Local history retains the latest 10,000 events." : "Call an actor method or send a WebSocket message to see its timings." })]
1224
+ children: [/* @__PURE__ */ j("strong", { children: l ? g.loading ? "Loading history…" : g.failed ? "History unavailable" : "No saved requests in this range" : P ? "No requests yet" : v ? "Requests unavailable" : "Connecting to requests…" }), /* @__PURE__ */ j("p", { children: l ? "Try a wider time range or fewer filters. Local history retains the latest 10,000 events." : "Call an actor method or send a WebSocket message to see its timings." })]
1043
1225
  })]
1044
1226
  }),
1045
- l && O?.nextCursor && /* @__PURE__ */ A(z, {
1227
+ l && P?.nextCursor && /* @__PURE__ */ j(B, {
1046
1228
  className: "la-request-load-older",
1047
1229
  variant: "outline",
1048
- disabled: h.loading,
1049
- onClick: h.loadOlder,
1050
- children: h.loading ? "Loading…" : "Load older"
1230
+ disabled: g.loading,
1231
+ onClick: g.loadOlder,
1232
+ children: g.loading ? "Loading…" : "Load older"
1051
1233
  }),
1052
- /* @__PURE__ */ j("div", {
1234
+ /* @__PURE__ */ M("div", {
1053
1235
  className: "la-observer-footnote",
1054
- children: [/* @__PURE__ */ j("span", {
1236
+ children: [/* @__PURE__ */ M("span", {
1055
1237
  className: "la-observer-refresh-status",
1056
- children: [!l && /* @__PURE__ */ A("span", { className: `la-observer-dot ${_ ? "la-observer-dot-unknown" : "la-observer-dot-live"}` }), l ? "Saved history" : x ? "Display paused · collection continues" : _ ? "Reconnecting…" : g ? "Live updates" : "Connecting…"]
1057
- }), /* @__PURE__ */ A("span", { children: l ? `${N.length.toLocaleString()} saved requests shown` : n ? `${N.length} matching requests from the latest ${O?.capacity ?? 500} on this control plane.` : `Latest ${O?.capacity ?? 500} requests on this control plane.` })]
1238
+ children: [!l && /* @__PURE__ */ j("span", { className: `la-observer-dot ${v ? "la-observer-dot-unknown" : "la-observer-dot-live"}` }), l ? "Saved history" : S ? "Display paused · collection continues" : v ? "Reconnecting…" : _ ? "Live updates" : "Connecting…"]
1239
+ }), /* @__PURE__ */ j("span", { children: l ? `${I.length.toLocaleString()} saved requests shown` : n ? `${I.length} matching requests from the latest ${P?.capacity ?? 500} on this control plane.` : `Latest ${P?.capacity ?? 500} requests on this control plane.` })]
1058
1240
  }),
1059
- !l && !!O?.evicted && /* @__PURE__ */ j("p", {
1241
+ !l && !!P?.evicted && /* @__PURE__ */ M("p", {
1060
1242
  className: "la-request-note",
1061
- children: [O.evicted.toLocaleString(), " older records have left this history window."]
1243
+ children: [P.evicted.toLocaleString(), " older records have left this history window."]
1062
1244
  }),
1063
- /* @__PURE__ */ A("p", {
1245
+ /* @__PURE__ */ j("p", {
1064
1246
  className: "la-request-note",
1065
1247
  children: "Total includes queue wait, actor processing, and persistence. Queue wait includes the WebSocket message queue. Timings exclude the caller’s network round trip."
1066
1248
  }),
1067
- /* @__PURE__ */ A(Ve, {
1068
- open: !!C,
1249
+ /* @__PURE__ */ j(Ye, {
1250
+ open: !!w,
1069
1251
  onOpenChange: (e) => {
1070
- e || w(void 0);
1252
+ e || T(void 0);
1071
1253
  },
1072
- children: /* @__PURE__ */ j(We, {
1073
- container: T.current,
1254
+ children: /* @__PURE__ */ M(Qe, {
1255
+ container: O.current,
1074
1256
  onCloseAutoFocus: (e) => {
1075
- e.preventDefault(), E.current?.focus();
1257
+ e.preventDefault(), k.current?.focus();
1076
1258
  },
1077
1259
  children: [
1078
- /* @__PURE__ */ A(He, { children: "Request details" }),
1079
- /* @__PURE__ */ A(Ue, { children: "Full identifiers and timings for this request." }),
1080
- C && /* @__PURE__ */ A(et, { record: C })
1260
+ /* @__PURE__ */ j(Xe, { children: "Request details" }),
1261
+ /* @__PURE__ */ j(Ze, { children: "Full identifiers and timings for this request." }),
1262
+ w && /* @__PURE__ */ j(ct, {
1263
+ record: w,
1264
+ timing: ve(I).rows.find((e) => e.record === w)
1265
+ })
1081
1266
  ]
1082
1267
  })
1083
1268
  })
1084
1269
  ]
1085
1270
  });
1086
1271
  }
1087
- function $e({ query: e, range: t, onRangeChange: r, loading: i, onSearch: a, scoped: o }) {
1272
+ function st({ query: e, range: t, onRangeChange: r, loading: i, onSearch: a, scoped: o }) {
1088
1273
  let s = n(), c = n();
1089
- return /* @__PURE__ */ j("form", {
1274
+ return /* @__PURE__ */ M("form", {
1090
1275
  className: "la-request-history-filters",
1091
1276
  onSubmit: (e) => {
1092
1277
  e.preventDefault();
@@ -1097,20 +1282,20 @@ function $e({ query: e, range: t, onRangeChange: r, loading: i, onSearch: a, sco
1097
1282
  });
1098
1283
  },
1099
1284
  children: [
1100
- /* @__PURE__ */ j("div", {
1285
+ /* @__PURE__ */ M("div", {
1101
1286
  className: "la-request-history-range",
1102
- children: [/* @__PURE__ */ A("span", { children: "Time range" }), /* @__PURE__ */ A(Me, {
1287
+ children: [/* @__PURE__ */ j("span", { children: "Time range" }), /* @__PURE__ */ j(Be, {
1103
1288
  value: t,
1104
1289
  onChange: r,
1105
1290
  align: "start"
1106
1291
  })]
1107
1292
  }),
1108
- !o && /* @__PURE__ */ j("div", {
1293
+ !o && /* @__PURE__ */ M("div", {
1109
1294
  className: "la-request-history-field",
1110
- children: [/* @__PURE__ */ A("label", {
1295
+ children: [/* @__PURE__ */ j("label", {
1111
1296
  htmlFor: s,
1112
1297
  children: "Actor ID"
1113
- }), /* @__PURE__ */ A(B, {
1298
+ }), /* @__PURE__ */ j(V, {
1114
1299
  id: s,
1115
1300
  name: "actorId",
1116
1301
  placeholder: "All actors",
@@ -1118,17 +1303,17 @@ function $e({ query: e, range: t, onRangeChange: r, loading: i, onSearch: a, sco
1118
1303
  defaultValue: e.actorId
1119
1304
  })]
1120
1305
  }),
1121
- /* @__PURE__ */ j("div", {
1306
+ /* @__PURE__ */ M("div", {
1122
1307
  className: "la-request-history-field",
1123
- children: [/* @__PURE__ */ A("label", {
1308
+ children: [/* @__PURE__ */ j("label", {
1124
1309
  htmlFor: c,
1125
1310
  children: "Outcome"
1126
- }), /* @__PURE__ */ j(Be, {
1311
+ }), /* @__PURE__ */ M(Je, {
1127
1312
  id: c,
1128
1313
  className: "la-observer-select",
1129
1314
  name: "outcome",
1130
1315
  defaultValue: e.outcome ?? "",
1131
- children: [/* @__PURE__ */ A(U, {
1316
+ children: [/* @__PURE__ */ j(W, {
1132
1317
  value: "",
1133
1318
  children: "All outcomes"
1134
1319
  }), [
@@ -1137,13 +1322,13 @@ function $e({ query: e, range: t, onRangeChange: r, loading: i, onSearch: a, sco
1137
1322
  "rejected",
1138
1323
  "rerouted",
1139
1324
  "interrupted"
1140
- ].map((e) => /* @__PURE__ */ A(U, {
1325
+ ].map((e) => /* @__PURE__ */ j(W, {
1141
1326
  value: e,
1142
1327
  children: e[0].toUpperCase() + e.slice(1)
1143
1328
  }, e))]
1144
1329
  })]
1145
1330
  }),
1146
- /* @__PURE__ */ A(z, {
1331
+ /* @__PURE__ */ j(B, {
1147
1332
  type: "submit",
1148
1333
  variant: "outline",
1149
1334
  disabled: i,
@@ -1152,8 +1337,8 @@ function $e({ query: e, range: t, onRangeChange: r, loading: i, onSearch: a, sco
1152
1337
  ]
1153
1338
  });
1154
1339
  }
1155
- function et({ record: e }) {
1156
- let t = {
1340
+ function ct({ record: e, timing: t }) {
1341
+ let n = {
1157
1342
  Operation: e.operation,
1158
1343
  "Actor class": e.actorName,
1159
1344
  "Instance ID": e.actorId,
@@ -1161,29 +1346,30 @@ function et({ record: e }) {
1161
1346
  Time: new Date(e.startedAtMs).toLocaleString(),
1162
1347
  Transport: e.kind === "method" ? "Method" : "WebSocket",
1163
1348
  Outcome: e.outcome,
1164
- Total: tt(e.durationMs),
1165
- "Queue wait": e.queueWaitMs === null ? "Did not begin processing" : tt(e.queueWaitMs),
1349
+ Total: z(e.durationMs),
1350
+ "Queue wait": e.queueWaitMs === null ? "Did not begin processing" : z(e.queueWaitMs),
1351
+ ...t ? {
1352
+ "Start offset in view": z(t.offsetMs),
1353
+ "Gap from preceding calls": ye(t.gapMs)
1354
+ } : {},
1166
1355
  Host: e.hostId,
1167
1356
  ...e.connectionId ? { Connection: e.connectionId } : {}
1168
1357
  };
1169
- return /* @__PURE__ */ A("dl", {
1358
+ return /* @__PURE__ */ j("dl", {
1170
1359
  className: "la-request-details",
1171
- children: Object.entries(t).map(([e, t]) => /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("dt", { children: e }), /* @__PURE__ */ A("dd", { children: t })] }, e))
1360
+ children: Object.entries(n).map(([e, t]) => /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j("dt", { children: e }), /* @__PURE__ */ j("dd", { children: t })] }, e))
1172
1361
  });
1173
1362
  }
1174
- function tt(e) {
1175
- return e >= 1e3 ? `${(e / 1e3).toLocaleString(void 0, { maximumFractionDigits: 2 })} s` : `${e.toLocaleString(void 0, { maximumFractionDigits: 1 })} ms`;
1176
- }
1177
1363
  //#endregion
1178
1364
  //#region src/state-diff.ts
1179
- var nt = ne({ arrays: { detectMove: !1 } });
1180
- function rt(e, t) {
1181
- let n = nt.diff(e, t);
1182
- return n ? re(n, e) ?? "" : "";
1365
+ var lt = ie({ arrays: { detectMove: !1 } });
1366
+ function ut(e, t) {
1367
+ let n = lt.diff(e, t);
1368
+ return n ? ae(n, e) ?? "" : "";
1183
1369
  }
1184
1370
  //#endregion
1185
1371
  //#region src/state-inspection.ts
1186
- function it(e, n, r) {
1372
+ function dt(e, n, r) {
1187
1373
  let [o, s] = a(), [c, l] = a(), [u, d] = a(!1), [f, p] = a(!0), [m, h] = a(0), g = i(() => {});
1188
1374
  return t(() => {
1189
1375
  let t = new AbortController(), i = !1, a = !1, o, c;
@@ -1246,22 +1432,22 @@ function it(e, n, r) {
1246
1432
  }
1247
1433
  //#endregion
1248
1434
  //#region src/StateInspector.tsx
1249
- function at(e) {
1250
- let { client: t, actorName: n, actorId: r } = e, i = it(t, n, r), [o, s] = a("state"), [c, l] = a(), [u, d] = a(), [f, p] = a(""), [m, h] = a(0), _ = i.current?.snapshot, v = _?.stateVersion ?? 0, y = c ?? v, b = i.knownVersion > v || v > (i.history?.records[0]?.stateVersion ?? 0);
1251
- return /* @__PURE__ */ j("section", {
1435
+ function ft(e) {
1436
+ let { client: t, actorName: n, actorId: r } = e, i = dt(t, n, r), [o, s] = a("state"), [c, l] = a(), [u, d] = a(), [f, p] = a(""), [m, h] = a(0), g = i.current?.snapshot, v = g?.stateVersion ?? 0, y = c ?? v, ee = i.knownVersion > v || v > (i.history?.records[0]?.stateVersion ?? 0);
1437
+ return /* @__PURE__ */ M("section", {
1252
1438
  className: "la-state",
1253
1439
  "aria-label": "Persisted state",
1254
1440
  children: [
1255
- /* @__PURE__ */ j("div", {
1441
+ /* @__PURE__ */ M("div", {
1256
1442
  className: "la-state-heading",
1257
- children: [/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("h3", { children: "Persisted state" }), /* @__PURE__ */ A("p", { children: "Committed fields and their progression in storage." })] }), /* @__PURE__ */ j("div", {
1443
+ children: [/* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j("h3", { children: "Persisted state" }), /* @__PURE__ */ j("p", { children: "Committed fields and their progression in storage." })] }), /* @__PURE__ */ M("div", {
1258
1444
  className: "la-state-actions",
1259
- children: [_ && /* @__PURE__ */ j(z, {
1445
+ children: [g && /* @__PURE__ */ M(B, {
1260
1446
  variant: "outline",
1261
1447
  size: "sm",
1262
- onClick: () => ut(_.state, `${n}-${r}-v${v}.json`),
1263
- children: [/* @__PURE__ */ A(g, { "aria-hidden": "true" }), "Download JSON"]
1264
- }), /* @__PURE__ */ j(z, {
1448
+ onClick: () => _t(g.state, `${n}-${r}-v${v}.json`),
1449
+ children: [/* @__PURE__ */ j(_, { "aria-hidden": "true" }), "Download JSON"]
1450
+ }), /* @__PURE__ */ M(B, {
1265
1451
  variant: "outline",
1266
1452
  size: "sm",
1267
1453
  disabled: i.loading,
@@ -1269,87 +1455,87 @@ function at(e) {
1269
1455
  i.refresh(), h((e) => e + 1);
1270
1456
  },
1271
1457
  "aria-label": "Refresh state",
1272
- children: [/* @__PURE__ */ A(ee, { "aria-hidden": "true" }), "Refresh"]
1458
+ children: [/* @__PURE__ */ j(te, { "aria-hidden": "true" }), "Refresh"]
1273
1459
  })]
1274
1460
  })]
1275
1461
  }),
1276
- /* @__PURE__ */ j("div", {
1462
+ /* @__PURE__ */ M("div", {
1277
1463
  className: "la-state-tabs",
1278
1464
  "aria-label": "State views",
1279
1465
  children: [
1280
- /* @__PURE__ */ A(z, {
1466
+ /* @__PURE__ */ j(B, {
1281
1467
  variant: o === "state" ? "secondary" : "ghost",
1282
1468
  "aria-pressed": o === "state",
1283
1469
  onClick: () => s("state"),
1284
1470
  children: "State"
1285
1471
  }),
1286
- /* @__PURE__ */ A(z, {
1472
+ /* @__PURE__ */ j(B, {
1287
1473
  variant: o === "changes" ? "secondary" : "ghost",
1288
1474
  "aria-pressed": o === "changes",
1289
1475
  onClick: () => s("changes"),
1290
1476
  children: "Changes"
1291
1477
  }),
1292
- _ && /* @__PURE__ */ j("span", {
1478
+ g && /* @__PURE__ */ M("span", {
1293
1479
  className: "la-state-version",
1294
1480
  children: ["Version ", v]
1295
1481
  })
1296
1482
  ]
1297
1483
  }),
1298
- i.failed && /* @__PURE__ */ j("p", {
1484
+ i.failed && /* @__PURE__ */ M("p", {
1299
1485
  role: "alert",
1300
1486
  children: ["Could not refresh state. Check your connection and use Refresh to retry.", i.current && " Showing the last loaded version."]
1301
1487
  }),
1302
- b && /* @__PURE__ */ A("p", {
1488
+ ee && /* @__PURE__ */ j("p", {
1303
1489
  className: "la-state-notice",
1304
1490
  role: "status",
1305
1491
  children: "A newer commit is syncing to storage. Retrying automatically…"
1306
1492
  }),
1307
- !i.current && !i.failed && /* @__PURE__ */ A("p", {
1493
+ !i.current && !i.failed && /* @__PURE__ */ j("p", {
1308
1494
  role: "status",
1309
1495
  children: "Loading persisted state…"
1310
1496
  }),
1311
- i.current && !_ && /* @__PURE__ */ A("p", {
1497
+ i.current && !g && /* @__PURE__ */ j("p", {
1312
1498
  className: "la-state-empty",
1313
1499
  children: "No persisted state yet. Fields appear after the actor commits its first change."
1314
1500
  }),
1315
- o === "state" && _ && /* @__PURE__ */ j(k, { children: [
1316
- /* @__PURE__ */ A(ct, {
1317
- record: _,
1501
+ o === "state" && g && /* @__PURE__ */ M(A, { children: [
1502
+ /* @__PURE__ */ j(ht, {
1503
+ record: g,
1318
1504
  onInspect: e.onInspectRequest
1319
1505
  }),
1320
- /* @__PURE__ */ A(B, {
1506
+ /* @__PURE__ */ j(V, {
1321
1507
  "aria-label": "Filter persisted fields",
1322
1508
  placeholder: "Filter fields…",
1323
1509
  value: f,
1324
1510
  onChange: (e) => p(e.target.value)
1325
1511
  }),
1326
- /* @__PURE__ */ A(ot, {
1327
- state: _.state,
1512
+ /* @__PURE__ */ j(pt, {
1513
+ state: g.state,
1328
1514
  query: f,
1329
1515
  schema: i.current?.schema ?? null
1330
1516
  })
1331
1517
  ] }),
1332
- o === "changes" && /* @__PURE__ */ j("div", {
1518
+ o === "changes" && /* @__PURE__ */ M("div", {
1333
1519
  className: "la-state-history",
1334
- children: [/* @__PURE__ */ j("aside", {
1520
+ children: [/* @__PURE__ */ M("aside", {
1335
1521
  "aria-label": "State versions",
1336
1522
  children: [
1337
- /* @__PURE__ */ A("h4", { children: "Versions" }),
1338
- !i.history?.records.length && /* @__PURE__ */ A("p", { children: "No recorded history yet." }),
1339
- /* @__PURE__ */ A("ol", { children: i.history?.records.map((e) => /* @__PURE__ */ A("li", { children: /* @__PURE__ */ j("button", {
1523
+ /* @__PURE__ */ j("h4", { children: "Versions" }),
1524
+ !i.history?.records.length && /* @__PURE__ */ j("p", { children: "No recorded history yet." }),
1525
+ /* @__PURE__ */ j("ol", { children: i.history?.records.map((e) => /* @__PURE__ */ j("li", { children: /* @__PURE__ */ M("button", {
1340
1526
  type: "button",
1341
1527
  "aria-label": `Version ${e.stateVersion} · ${e.attribution?.operation ?? "Unknown operation"}`,
1342
1528
  "aria-pressed": y === e.stateVersion,
1343
1529
  onClick: () => {
1344
1530
  l(e.stateVersion), d(void 0);
1345
1531
  },
1346
- children: [/* @__PURE__ */ j("strong", { children: [
1532
+ children: [/* @__PURE__ */ M("strong", { children: [
1347
1533
  "Version ",
1348
1534
  e.stateVersion,
1349
- /* @__PURE__ */ A("span", { children: e.attribution?.operation ?? "Unknown operation" })
1350
- ] }), /* @__PURE__ */ A("small", { children: e.attribution ? new Date(e.attribution.committedAtMs).toLocaleTimeString() : "Time unavailable" })]
1535
+ /* @__PURE__ */ j("span", { children: e.attribution?.operation ?? "Unknown operation" })
1536
+ ] }), /* @__PURE__ */ j("small", { children: e.attribution ? new Date(e.attribution.committedAtMs).toLocaleTimeString() : "Time unavailable" })]
1351
1537
  }) }, e.stateVersion)) }),
1352
- i.history?.nextBefore && /* @__PURE__ */ A(z, {
1538
+ i.history?.nextBefore && /* @__PURE__ */ j(B, {
1353
1539
  variant: "outline",
1354
1540
  size: "sm",
1355
1541
  disabled: i.loading,
@@ -1357,118 +1543,118 @@ function at(e) {
1357
1543
  children: "Load older versions"
1358
1544
  })
1359
1545
  ]
1360
- }), /* @__PURE__ */ j("div", {
1546
+ }), /* @__PURE__ */ M("div", {
1361
1547
  className: "la-state-comparison",
1362
- children: [c !== void 0 && v > c && /* @__PURE__ */ j(z, {
1548
+ children: [c !== void 0 && v > c && /* @__PURE__ */ M(B, {
1363
1549
  variant: "outline",
1364
1550
  size: "sm",
1365
1551
  onClick: () => {
1366
1552
  l(void 0), d(void 0);
1367
1553
  },
1368
1554
  children: ["View latest · version ", v]
1369
- }), !!y && /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ j("div", {
1555
+ }), !!y && /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ M("div", {
1370
1556
  className: "la-state-compare-heading",
1371
- children: [/* @__PURE__ */ j("h4", { children: ["Version ", y] }), /* @__PURE__ */ j(Be, {
1557
+ children: [/* @__PURE__ */ M("h4", { children: ["Version ", y] }), /* @__PURE__ */ M(Je, {
1372
1558
  "aria-label": "Compare with version",
1373
1559
  value: u ?? Math.max(0, y - 1),
1374
1560
  onChange: (e) => d(Number(e.target.value)),
1375
- children: [/* @__PURE__ */ A(U, {
1561
+ children: [/* @__PURE__ */ j(W, {
1376
1562
  value: Math.max(0, y - 1),
1377
1563
  children: y === 1 ? "Before first commit" : `Previous · version ${y - 1}`
1378
- }), i.history?.records.filter((e) => e.stateVersion < y - 1).map((e) => /* @__PURE__ */ j(U, {
1564
+ }), i.history?.records.filter((e) => e.stateVersion < y - 1).map((e) => /* @__PURE__ */ M(W, {
1379
1565
  value: e.stateVersion,
1380
1566
  children: ["Version ", e.stateVersion]
1381
1567
  }, e.stateVersion))]
1382
1568
  })]
1383
- }), /* @__PURE__ */ A(lt, {
1569
+ }), /* @__PURE__ */ j(gt, {
1384
1570
  ...e,
1385
1571
  version: y,
1386
1572
  baseline: u ?? Math.max(0, y - 1)
1387
1573
  }, `${n}/${r}/${y}/${u}/${m}`)] })]
1388
1574
  })]
1389
1575
  }),
1390
- /* @__PURE__ */ A("p", {
1576
+ /* @__PURE__ */ j("p", {
1391
1577
  className: "la-state-footnote",
1392
1578
  children: "Values come from actor storage. Request events signal new versions; history follows completed uploads."
1393
1579
  })
1394
1580
  ]
1395
1581
  });
1396
1582
  }
1397
- function ot({ state: e, query: t, schema: n }) {
1583
+ function pt({ state: e, query: t, schema: n }) {
1398
1584
  let r = Object.entries(e).filter(([e]) => e.toLowerCase().includes(t.toLowerCase()));
1399
- return /* @__PURE__ */ j("div", {
1585
+ return /* @__PURE__ */ M("div", {
1400
1586
  className: "la-observer-table-frame",
1401
- children: [/* @__PURE__ */ j(W, {
1587
+ children: [/* @__PURE__ */ M(G, {
1402
1588
  "aria-label": "Persisted fields",
1403
- children: [/* @__PURE__ */ A(G, { children: /* @__PURE__ */ j(q, { children: [
1404
- /* @__PURE__ */ A(J, { children: "Field" }),
1405
- /* @__PURE__ */ A(J, { children: "Type" }),
1406
- /* @__PURE__ */ A(J, { children: "Value" })
1407
- ] }) }), /* @__PURE__ */ A(K, { children: r.map(([e, t]) => /* @__PURE__ */ j(q, { children: [
1408
- /* @__PURE__ */ A(Y, { children: /* @__PURE__ */ A("code", { children: e }) }),
1409
- /* @__PURE__ */ j(Y, { children: [/* @__PURE__ */ A("span", {
1589
+ children: [/* @__PURE__ */ j(K, { children: /* @__PURE__ */ M(J, { children: [
1590
+ /* @__PURE__ */ j(Y, { children: "Field" }),
1591
+ /* @__PURE__ */ j(Y, { children: "Type" }),
1592
+ /* @__PURE__ */ j(Y, { children: "Value" })
1593
+ ] }) }), /* @__PURE__ */ j(q, { children: r.map(([e, t]) => /* @__PURE__ */ M(J, { children: [
1594
+ /* @__PURE__ */ j(X, { children: /* @__PURE__ */ j("code", { children: e }) }),
1595
+ /* @__PURE__ */ M(X, { children: [/* @__PURE__ */ j("span", {
1410
1596
  className: "la-state-type",
1411
- children: dt(t)
1412
- }), ft(n, e) && /* @__PURE__ */ A("small", {
1597
+ children: vt(t)
1598
+ }), yt(n, e) && /* @__PURE__ */ j("small", {
1413
1599
  className: "la-state-schema",
1414
- children: ft(n, e)
1600
+ children: yt(n, e)
1415
1601
  })] }),
1416
- /* @__PURE__ */ A(Y, { children: /* @__PURE__ */ A(st, { value: t }) })
1602
+ /* @__PURE__ */ j(X, { children: /* @__PURE__ */ j(mt, { value: t }) })
1417
1603
  ] }, e)) })]
1418
- }), !r.length && /* @__PURE__ */ A("p", {
1604
+ }), !r.length && /* @__PURE__ */ j("p", {
1419
1605
  className: "la-state-empty",
1420
1606
  children: t ? "No matching fields." : "The persisted state is an empty object."
1421
1607
  })]
1422
1608
  });
1423
1609
  }
1424
- function st({ value: e }) {
1610
+ function mt({ value: e }) {
1425
1611
  let t = JSON.stringify(e);
1426
- return t.length > 1e5 ? /* @__PURE__ */ j("span", { children: [
1612
+ return t.length > 1e5 ? /* @__PURE__ */ M("span", { children: [
1427
1613
  "Large value (",
1428
1614
  Math.round(t.length / 1024),
1429
1615
  " KB). Use Download JSON to inspect it."
1430
- ] }) : typeof e == "object" && e ? /* @__PURE__ */ A(te, {
1616
+ ] }) : typeof e == "object" && e ? /* @__PURE__ */ j(re, {
1431
1617
  data: e,
1432
1618
  shouldExpandNode: (e) => e < 1,
1433
- style: pt
1434
- }) : /* @__PURE__ */ A("code", {
1435
- className: `la-state-json-${dt(e)}`,
1619
+ style: bt
1620
+ }) : /* @__PURE__ */ j("code", {
1621
+ className: `la-state-json-${vt(e)}`,
1436
1622
  children: t
1437
1623
  });
1438
1624
  }
1439
- function ct({ record: e, onInspect: t }) {
1625
+ function ht({ record: e, onInspect: t }) {
1440
1626
  let n = e.attribution;
1441
- return /* @__PURE__ */ j("div", {
1627
+ return /* @__PURE__ */ M("div", {
1442
1628
  className: "la-state-attribution",
1443
1629
  children: [
1444
- /* @__PURE__ */ j("span", { children: ["Committed by ", /* @__PURE__ */ A("strong", { children: n?.operation ?? "Unknown operation" })] }),
1445
- /* @__PURE__ */ j("span", { children: [
1630
+ /* @__PURE__ */ M("span", { children: ["Committed by ", /* @__PURE__ */ j("strong", { children: n?.operation ?? "Unknown operation" })] }),
1631
+ /* @__PURE__ */ M("span", { children: [
1446
1632
  "Request",
1447
1633
  " ",
1448
- t ? /* @__PURE__ */ A("button", {
1634
+ t ? /* @__PURE__ */ j("button", {
1449
1635
  type: "button",
1450
1636
  onClick: () => t({ requestId: e.requestId }),
1451
1637
  children: e.requestId
1452
- }) : /* @__PURE__ */ A("code", { children: e.requestId })
1638
+ }) : /* @__PURE__ */ j("code", { children: e.requestId })
1453
1639
  ] }),
1454
- n?.connectionId && /* @__PURE__ */ j("span", { children: [
1640
+ n?.connectionId && /* @__PURE__ */ M("span", { children: [
1455
1641
  "Connection",
1456
1642
  " ",
1457
- t ? /* @__PURE__ */ A("button", {
1643
+ t ? /* @__PURE__ */ j("button", {
1458
1644
  type: "button",
1459
1645
  onClick: () => t({ connectionId: n.connectionId }),
1460
1646
  children: n.connectionId
1461
- }) : /* @__PURE__ */ A("code", { children: n.connectionId })
1647
+ }) : /* @__PURE__ */ j("code", { children: n.connectionId })
1462
1648
  ] }),
1463
- n && /* @__PURE__ */ A("time", {
1649
+ n && /* @__PURE__ */ j("time", {
1464
1650
  dateTime: new Date(n.committedAtMs).toISOString(),
1465
1651
  children: new Date(n.committedAtMs).toLocaleString()
1466
1652
  }),
1467
- n?.interleaved && /* @__PURE__ */ A("p", { children: "Overlapping requests may contribute to this snapshot. This identifies the committing request." })
1653
+ n?.interleaved && /* @__PURE__ */ j("p", { children: "Overlapping requests may contribute to this snapshot. This identifies the committing request." })
1468
1654
  ]
1469
1655
  });
1470
1656
  }
1471
- function lt({ client: e, actorName: n, actorId: r, version: i, baseline: o, onInspectRequest: s }) {
1657
+ function gt({ client: e, actorName: n, actorId: r, version: i, baseline: o, onInspectRequest: s }) {
1472
1658
  let [c, l] = a(), [u, d] = a(), [f, p] = a();
1473
1659
  return t(() => {
1474
1660
  let t = new AbortController(), a;
@@ -1501,7 +1687,7 @@ function lt({ client: e, actorName: n, actorId: r, version: i, baseline: o, onIn
1501
1687
  after: u.state
1502
1688
  })) : l({
1503
1689
  after: u,
1504
- html: rt(c.snapshot.state, u.state)
1690
+ html: ut(c.snapshot.state, u.state)
1505
1691
  });
1506
1692
  } catch (e) {
1507
1693
  t.signal.aborted || d(e instanceof Error ? e.message : "Could not load versions.");
@@ -1516,44 +1702,44 @@ function lt({ client: e, actorName: n, actorId: r, version: i, baseline: o, onIn
1516
1702
  r,
1517
1703
  i,
1518
1704
  o
1519
- ]), /* @__PURE__ */ j(k, { children: [
1520
- /* @__PURE__ */ A("p", { children: o ? `Comparing version ${o} → ${i}` : "Changes in the first persisted snapshot" }),
1521
- u && /* @__PURE__ */ A("p", {
1705
+ ]), /* @__PURE__ */ M(A, { children: [
1706
+ /* @__PURE__ */ j("p", { children: o ? `Comparing version ${o} → ${i}` : "Changes in the first persisted snapshot" }),
1707
+ u && /* @__PURE__ */ j("p", {
1522
1708
  role: "alert",
1523
1709
  children: u
1524
1710
  }),
1525
- !u && !c && /* @__PURE__ */ A("p", {
1711
+ !u && !c && /* @__PURE__ */ j("p", {
1526
1712
  role: "status",
1527
1713
  children: "Loading comparison…"
1528
1714
  }),
1529
- f && /* @__PURE__ */ j(z, {
1715
+ f && /* @__PURE__ */ M(B, {
1530
1716
  variant: "ghost",
1531
1717
  size: "sm",
1532
- onClick: () => ut(f.state, `${n}-${r}-v${i}.json`),
1718
+ onClick: () => _t(f.state, `${n}-${r}-v${i}.json`),
1533
1719
  children: ["Download version ", i]
1534
1720
  }),
1535
- c && /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A(ct, {
1721
+ c && /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ j(ht, {
1536
1722
  record: c.after,
1537
1723
  onInspect: s
1538
- }), c.html ? /* @__PURE__ */ A("div", {
1724
+ }), c.html ? /* @__PURE__ */ j("div", {
1539
1725
  className: "la-state-diff",
1540
1726
  "aria-label": "State changes",
1541
1727
  dangerouslySetInnerHTML: { __html: c.html }
1542
- }) : /* @__PURE__ */ A("p", { children: "No persisted fields changed between these versions." })] })
1728
+ }) : /* @__PURE__ */ j("p", { children: "No persisted fields changed between these versions." })] })
1543
1729
  ] });
1544
1730
  }
1545
- function ut(e, t) {
1731
+ function _t(e, t) {
1546
1732
  let n = URL.createObjectURL(new Blob([JSON.stringify(e, null, 2)], { type: "application/json" })), r = document.createElement("a");
1547
1733
  r.href = n, r.download = t, r.click(), setTimeout(() => URL.revokeObjectURL(n), 1e3);
1548
1734
  }
1549
- function dt(e) {
1735
+ function vt(e) {
1550
1736
  return e === null ? "null" : Array.isArray(e) ? "array" : typeof e;
1551
1737
  }
1552
- function ft(e, t) {
1738
+ function yt(e, t) {
1553
1739
  let n = e?.definitions, r = n?.State?.properties?.[t]?.$ref, i = r && n?.[r.split("/").pop().replace(/~1/g, "/").replace(/~0/g, "~")]?.type;
1554
1740
  return i ? `Schema: ${Array.isArray(i) ? i.join(" | ") : i}` : void 0;
1555
1741
  }
1556
- var pt = {
1742
+ var bt = {
1557
1743
  container: "la-state-json",
1558
1744
  basicChildStyle: "la-state-json-child",
1559
1745
  label: "la-state-json-label",
@@ -1572,8 +1758,8 @@ var pt = {
1572
1758
  };
1573
1759
  //#endregion
1574
1760
  //#region src/queue-wait-history.ts
1575
- function mt(e, t, n) {
1576
- let r = Xe(e, {
1761
+ function xt(e, t, n) {
1762
+ let r = it(e, {
1577
1763
  ...t,
1578
1764
  actorName: n
1579
1765
  }, e.listQueueWaits);
@@ -1585,26 +1771,26 @@ function mt(e, t, n) {
1585
1771
  }
1586
1772
  //#endregion
1587
1773
  //#region src/queue-wait.ts
1588
- function ht(e) {
1589
- if (!Array.isArray(e) || !e.every(gt)) throw Error("Invalid queue wait response");
1774
+ function St(e) {
1775
+ if (!Array.isArray(e) || !e.every(Ct)) throw Error("Invalid queue wait response");
1590
1776
  return e;
1591
1777
  }
1592
- function gt(e) {
1778
+ function Ct(e) {
1593
1779
  return !!e && typeof e.actorName == "string" && typeof e.actorId == "string" && Number.isSafeInteger(e.admitted) && e.admitted > 0 && [e.averageMs, e.maxMs].every((e) => typeof e == "number" && Number.isFinite(e) && e >= 0) && e.averageMs <= e.maxMs;
1594
1780
  }
1595
- function _t(e) {
1596
- return bt(e, () => "all").get("all") ?? null;
1781
+ function wt(e) {
1782
+ return Ot(e, () => "all").get("all") ?? null;
1597
1783
  }
1598
- function vt(e) {
1599
- return bt(e, (e) => e.actorName);
1784
+ function Tt(e) {
1785
+ return Ot(e, (e) => e.actorName);
1600
1786
  }
1601
- function yt(e, t) {
1602
- return bt(e.filter((e) => e.actorName === t), (e) => e.actorId);
1787
+ function Et(e, t) {
1788
+ return Ot(e.filter((e) => e.actorName === t), (e) => e.actorId);
1603
1789
  }
1604
- function X(e) {
1790
+ function Dt(e) {
1605
1791
  return e === void 0 ? "—" : e >= 1e3 ? `${(e / 1e3).toLocaleString(void 0, { maximumFractionDigits: 2 })} s` : `${e.toLocaleString(void 0, { maximumFractionDigits: 1 })} ms`;
1606
1792
  }
1607
- function bt(e, t) {
1793
+ function Ot(e, t) {
1608
1794
  let n = /* @__PURE__ */ new Map();
1609
1795
  for (let r of e) {
1610
1796
  let e = n.get(t(r)) ?? {
@@ -1622,140 +1808,149 @@ function bt(e, t) {
1622
1808
  }
1623
1809
  //#endregion
1624
1810
  //#region src/ActorObserver.tsx
1625
- function xt({ client: e, className: r = "", initialActorName: o, navigation: s, timeRange: c, onTimeRangeChange: l }) {
1626
- let { inventory: u, loading: d, failed: f, retry: p } = qe(e), [m, g] = a(De), _ = c ?? m, v = l ?? g, [y, b] = a(o), x = s ? s.actorName : y, S = s ? s.onSelectActor : b, [C, w] = a(), [T, E] = a(""), D = i(null), O = i(o), M = n(), N = u?.actors.find((e) => e.actorName === x), P = mt(e, Oe(_, Date.now()), x), F = P.rows && vt(P.rows), I = P.rows && x !== void 0 ? yt(P.rows, x) : void 0, L = P.supported && P.rows ? _t(P.rows) : void 0;
1811
+ function kt({ client: e, className: r = "", initialActorName: o, navigation: s, timeRange: c, onTimeRangeChange: l }) {
1812
+ let { inventory: u, loading: d, failed: f, retry: p } = tt(e), [m, h] = a(Fe), _ = c ?? m, v = l ?? h, [y, ee] = a(o), b = s ? s.actorName : y, x = s ? s.onSelectActor : ee, [S, C] = a(), [w, T] = a(""), E = i(null), D = JSON.stringify([b, S]), O = i(JSON.stringify([o, void 0])), k = n(), N = u?.actors.find((e) => e.actorName === b), P = N?.instances.find((e) => e.actorId === S), F = xt(e, Ie(_, Date.now()), b), I = F.rows && Tt(F.rows), ne = F.rows && b !== void 0 ? Et(F.rows, b) : void 0, L = F.supported && F.rows ? wt(F.rows) : void 0;
1627
1813
  t(() => {
1628
- b(o), w(void 0), E("");
1814
+ ee(o), C(void 0), T("");
1629
1815
  }, [e, o]), t(() => {
1630
- O.current !== x && C === void 0 && D.current?.focus(), O.current = x;
1631
- }, [x, C]);
1632
- let te = (e) => {
1633
- w(void 0), S(e);
1816
+ O.current !== D && E.current?.focus(), O.current = D;
1817
+ }, [D]);
1818
+ let re = (e) => {
1819
+ C(void 0), x(e);
1634
1820
  };
1635
- return /* @__PURE__ */ j("section", {
1636
- className: `la-observer ${r}`,
1821
+ return /* @__PURE__ */ M("section", {
1822
+ className: `la-observer ${S === void 0 ? "" : "la-observer-instance-page"} ${r}`,
1637
1823
  "aria-label": "Actor observer",
1638
1824
  children: [
1639
- x !== void 0 && /* @__PURE__ */ j("nav", {
1825
+ b !== void 0 && /* @__PURE__ */ M("nav", {
1640
1826
  className: "la-observer-breadcrumb",
1641
1827
  "aria-label": "Breadcrumb",
1642
1828
  children: [
1643
- /* @__PURE__ */ A(z, {
1829
+ /* @__PURE__ */ j(B, {
1644
1830
  variant: "link",
1645
1831
  type: "button",
1646
1832
  "aria-label": "Back to actors",
1647
- onClick: () => te(void 0),
1833
+ onClick: () => re(void 0),
1648
1834
  children: "Actors"
1649
1835
  }),
1650
- /* @__PURE__ */ A("span", {
1836
+ /* @__PURE__ */ j("span", {
1651
1837
  "aria-hidden": "true",
1652
1838
  children: "/"
1653
1839
  }),
1654
- /* @__PURE__ */ A("span", {
1655
- "aria-current": C === void 0 ? "page" : void 0,
1656
- children: x
1840
+ S === void 0 ? /* @__PURE__ */ j("span", {
1841
+ "aria-current": "page",
1842
+ children: b
1843
+ }) : /* @__PURE__ */ j(B, {
1844
+ variant: "link",
1845
+ "aria-label": "Back to instances",
1846
+ onClick: () => C(void 0),
1847
+ children: b
1657
1848
  }),
1658
- C !== void 0 && /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A("span", {
1849
+ S !== void 0 && /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ j("span", {
1659
1850
  "aria-hidden": "true",
1660
1851
  children: "/"
1661
- }), /* @__PURE__ */ A("span", {
1852
+ }), /* @__PURE__ */ j("span", {
1662
1853
  "aria-current": "page",
1663
- children: C
1854
+ children: S
1664
1855
  })] })
1665
1856
  ]
1666
1857
  }),
1667
- /* @__PURE__ */ j("div", {
1858
+ /* @__PURE__ */ M("div", {
1668
1859
  className: "la-observer-toolbar",
1669
- children: [/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("div", {
1860
+ children: [/* @__PURE__ */ M("div", { children: [/* @__PURE__ */ M("div", {
1670
1861
  className: "la-observer-title",
1671
- children: /* @__PURE__ */ A("h1", {
1672
- ref: D,
1862
+ children: [/* @__PURE__ */ j("h1", {
1863
+ ref: E,
1673
1864
  tabIndex: -1,
1674
- children: x ?? "Actors"
1675
- })
1676
- }), /* @__PURE__ */ A("p", { children: x === void 0 ? "Inspect instances, residency, and connections." : "Inspect this actor class’s instances, residency, and connections." })] }), /* @__PURE__ */ j("div", {
1865
+ children: S ?? b ?? "Actors"
1866
+ }), P && /* @__PURE__ */ M(U, {
1867
+ variant: "outline",
1868
+ className: `la-observer-status-${P.status}`,
1869
+ children: [/* @__PURE__ */ j("span", { className: `la-observer-dot la-observer-dot-${P.status}` }), Gt(P.status)]
1870
+ })]
1871
+ }), S === void 0 && /* @__PURE__ */ j("p", { children: b === void 0 ? "Inspect instances, residency, and connections." : "Inspect this actor class’s instances, residency, and connections." })] }), /* @__PURE__ */ M("div", {
1677
1872
  className: "la-observer-actions",
1678
- children: [P.supported && /* @__PURE__ */ A(Me, {
1873
+ children: [F.supported && /* @__PURE__ */ j(Be, {
1679
1874
  value: _,
1680
1875
  onChange: v
1681
- }), /* @__PURE__ */ j(z, {
1876
+ }), /* @__PURE__ */ M(B, {
1682
1877
  variant: "outline",
1683
1878
  type: "button",
1684
1879
  disabled: d,
1685
1880
  onClick: p,
1686
- children: [/* @__PURE__ */ A(ee, {
1881
+ children: [/* @__PURE__ */ j(te, {
1687
1882
  "aria-hidden": "true",
1688
1883
  className: d ? "la-observer-spin" : void 0
1689
1884
  }), d ? "Refreshing…" : f ? "Try again" : "Refresh"]
1690
1885
  })]
1691
1886
  })]
1692
1887
  }),
1693
- f && /* @__PURE__ */ j("div", {
1888
+ f && /* @__PURE__ */ M("div", {
1694
1889
  className: "la-observer-error",
1695
1890
  role: "alert",
1696
- children: [/* @__PURE__ */ A(h, { "aria-hidden": "true" }), /* @__PURE__ */ A("p", { children: u ? "Could not refresh. These counts may be out of date." : "Could not load actors. Check your connection and access, then try again." })]
1891
+ children: [/* @__PURE__ */ j(g, { "aria-hidden": "true" }), /* @__PURE__ */ j("p", { children: u ? "Could not refresh. These counts may be out of date." : "Could not load actors. Check your connection and access, then try again." })]
1697
1892
  }),
1698
- !u && !f && /* @__PURE__ */ A(St, {}),
1699
- u && /* @__PURE__ */ j(k, { children: [x === void 0 ? /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A(Ct, {
1893
+ !u && !f && /* @__PURE__ */ j(At, {}),
1894
+ u && /* @__PURE__ */ M(A, { children: [b === void 0 ? /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ j(jt, {
1700
1895
  inventory: u,
1701
- queueWait: P.supported ? L ?? null : void 0,
1896
+ queueWait: F.supported ? L ?? null : void 0,
1702
1897
  range: _
1703
- }), u.actors.length ? /* @__PURE__ */ A(wt, {
1898
+ }), u.actors.length ? /* @__PURE__ */ j(Mt, {
1704
1899
  inventory: u,
1705
- query: T,
1706
- onQueryChange: E,
1707
- onSelectActor: te,
1900
+ query: w,
1901
+ onQueryChange: T,
1902
+ onSelectActor: re,
1708
1903
  onSelectInstance: (e, t) => {
1709
- w(t), S(e);
1904
+ C(t), x(e);
1710
1905
  },
1711
- waits: P.supported ? F : void 0
1712
- }) : /* @__PURE__ */ A(Pt, {
1906
+ waits: F.supported ? I : void 0
1907
+ }) : /* @__PURE__ */ j(Ut, {
1713
1908
  title: "No actors yet",
1714
1909
  description: "Deploy your actor classes to see them here. Instance counts appear as actors are used."
1715
- })] }) : N ? /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A(Ct, {
1910
+ })] }) : N ? /* @__PURE__ */ M(A, { children: [S === void 0 && /* @__PURE__ */ j(jt, {
1716
1911
  inventory: { actors: [N] },
1717
- actorName: x,
1718
- queueWait: P.supported ? L ?? null : void 0,
1912
+ actorName: b,
1913
+ queueWait: F.supported ? L ?? null : void 0,
1719
1914
  range: _
1720
- }), /* @__PURE__ */ A(Dt, {
1915
+ }), /* @__PURE__ */ j(Ft, {
1721
1916
  client: e,
1722
- id: M,
1723
- actorName: x,
1917
+ id: k,
1918
+ actorName: b,
1724
1919
  instances: N.instances,
1725
- waits: P.supported ? I : void 0,
1920
+ waits: F.supported ? ne : void 0,
1726
1921
  range: _,
1727
- selectedInstanceId: C,
1728
- onSelectInstance: w
1729
- }, x)] }) : /* @__PURE__ */ A(Pt, {
1922
+ selectedInstanceId: S,
1923
+ onSelectInstance: C
1924
+ }, b)] }) : /* @__PURE__ */ j(Ut, {
1730
1925
  title: "Actor class unavailable",
1731
1926
  description: "This actor class is no longer in the latest inventory. Return to Actors to see available classes."
1732
- }), /* @__PURE__ */ j("div", {
1927
+ }), /* @__PURE__ */ M("div", {
1733
1928
  className: "la-observer-footnote",
1734
- children: [/* @__PURE__ */ j("span", {
1929
+ children: [/* @__PURE__ */ M("span", {
1735
1930
  className: "la-observer-refresh-status",
1736
- children: [/* @__PURE__ */ A("span", { className: `la-observer-dot ${f ? "la-observer-dot-unknown" : e.watchActors ? "la-observer-dot-live" : ""}` }), f ? "Reconnecting…" : e.watchActors ? "Live updates" : "Auto-refresh every 5s"]
1737
- }), /* @__PURE__ */ A("span", { children: e.watchActors ? "Changes stream from the control plane." : "Counts follow the latest host heartbeat." })]
1931
+ children: [/* @__PURE__ */ j("span", { className: `la-observer-dot ${f ? "la-observer-dot-unknown" : e.watchActors ? "la-observer-dot-live" : ""}` }), f ? "Reconnecting…" : e.watchActors ? "Live updates" : "Auto-refresh every 5s"]
1932
+ }), /* @__PURE__ */ j("span", { children: e.watchActors ? "Changes stream from the control plane." : "Counts follow the latest host heartbeat." })]
1738
1933
  })] })
1739
1934
  ]
1740
1935
  });
1741
1936
  }
1742
- function St() {
1743
- return /* @__PURE__ */ j("div", {
1937
+ function At() {
1938
+ return /* @__PURE__ */ M("div", {
1744
1939
  className: "la-observer-skeleton",
1745
1940
  role: "status",
1746
1941
  "aria-label": "Loading actors",
1747
1942
  children: [
1748
- /* @__PURE__ */ A("span", {
1943
+ /* @__PURE__ */ j("span", {
1749
1944
  className: "la:sr-only",
1750
1945
  children: "Loading actors…"
1751
1946
  }),
1752
- /* @__PURE__ */ A("div", {}),
1753
- /* @__PURE__ */ A("div", {}),
1754
- /* @__PURE__ */ A("div", {})
1947
+ /* @__PURE__ */ j("div", {}),
1948
+ /* @__PURE__ */ j("div", {}),
1949
+ /* @__PURE__ */ j("div", {})
1755
1950
  ]
1756
1951
  });
1757
1952
  }
1758
- function Ct({ inventory: e, actorName: t, queueWait: n, range: r }) {
1953
+ function jt({ inventory: e, actorName: t, queueWait: n, range: r }) {
1759
1954
  let i = e.actors.reduce((e, t) => ({
1760
1955
  live: e.live + t.live,
1761
1956
  dormant: e.dormant + t.dormant,
@@ -1765,61 +1960,61 @@ function Ct({ inventory: e, actorName: t, queueWait: n, range: r }) {
1765
1960
  dormant: 0,
1766
1961
  unknown: 0
1767
1962
  });
1768
- return /* @__PURE__ */ j("dl", {
1963
+ return /* @__PURE__ */ M("dl", {
1769
1964
  className: "la-observer-summary",
1770
1965
  children: [
1771
- /* @__PURE__ */ j("div", { children: [
1772
- /* @__PURE__ */ A("dt", { children: "Total instances" }),
1773
- /* @__PURE__ */ A("dd", {
1966
+ /* @__PURE__ */ M("div", { children: [
1967
+ /* @__PURE__ */ j("dt", { children: "Total instances" }),
1968
+ /* @__PURE__ */ j("dd", {
1774
1969
  "aria-label": "Total instances",
1775
1970
  children: (i.live + i.dormant + i.unknown).toLocaleString()
1776
1971
  }),
1777
- /* @__PURE__ */ A("p", { children: t === void 0 ? `${e.actors.length} actor ${e.actors.length === 1 ? "type" : "types"}` : "In this actor class" })
1972
+ /* @__PURE__ */ j("p", { children: t === void 0 ? `${e.actors.length} actor ${e.actors.length === 1 ? "type" : "types"}` : "In this actor class" })
1778
1973
  ] }),
1779
- /* @__PURE__ */ j("div", { children: [
1780
- /* @__PURE__ */ j("dt", { children: [/* @__PURE__ */ A("span", { className: "la-observer-dot la-observer-dot-live" }), "Live"] }),
1781
- /* @__PURE__ */ A("dd", {
1974
+ /* @__PURE__ */ M("div", { children: [
1975
+ /* @__PURE__ */ M("dt", { children: [/* @__PURE__ */ j("span", { className: "la-observer-dot la-observer-dot-live" }), "Live"] }),
1976
+ /* @__PURE__ */ j("dd", {
1782
1977
  "aria-label": "Live instances",
1783
1978
  children: i.live.toLocaleString()
1784
1979
  }),
1785
- /* @__PURE__ */ A("p", { children: "Loaded in memory" })
1980
+ /* @__PURE__ */ j("p", { children: "Loaded in memory" })
1786
1981
  ] }),
1787
- /* @__PURE__ */ j("div", { children: [
1788
- /* @__PURE__ */ j("dt", { children: [/* @__PURE__ */ A("span", { className: "la-observer-dot" }), "Dormant"] }),
1789
- /* @__PURE__ */ A("dd", {
1982
+ /* @__PURE__ */ M("div", { children: [
1983
+ /* @__PURE__ */ M("dt", { children: [/* @__PURE__ */ j("span", { className: "la-observer-dot" }), "Dormant"] }),
1984
+ /* @__PURE__ */ j("dd", {
1790
1985
  "aria-label": "Dormant instances",
1791
1986
  children: i.dormant.toLocaleString()
1792
1987
  }),
1793
- /* @__PURE__ */ A("p", { children: "Currently unloaded" })
1988
+ /* @__PURE__ */ j("p", { children: "Currently unloaded" })
1794
1989
  ] }),
1795
- i.unknown > 0 && /* @__PURE__ */ j("div", { children: [
1796
- /* @__PURE__ */ j("dt", { children: [/* @__PURE__ */ A("span", { className: "la-observer-dot la-observer-dot-unknown" }), "Unknown"] }),
1797
- /* @__PURE__ */ A("dd", {
1990
+ i.unknown > 0 && /* @__PURE__ */ M("div", { children: [
1991
+ /* @__PURE__ */ M("dt", { children: [/* @__PURE__ */ j("span", { className: "la-observer-dot la-observer-dot-unknown" }), "Unknown"] }),
1992
+ /* @__PURE__ */ j("dd", {
1798
1993
  "aria-label": "Unknown instances",
1799
1994
  children: i.unknown.toLocaleString()
1800
1995
  }),
1801
- /* @__PURE__ */ A("p", { children: "Awaiting host report" })
1996
+ /* @__PURE__ */ j("p", { children: "Awaiting host report" })
1802
1997
  ] }),
1803
- n !== void 0 && /* @__PURE__ */ j("div", {
1998
+ n !== void 0 && /* @__PURE__ */ M("div", {
1804
1999
  className: "la-observer-queue-wait",
1805
2000
  children: [
1806
- /* @__PURE__ */ A("dt", { children: "Avg queue wait" }),
1807
- /* @__PURE__ */ A("dd", {
2001
+ /* @__PURE__ */ j("dt", { children: "Avg queue wait" }),
2002
+ /* @__PURE__ */ j("dd", {
1808
2003
  "aria-label": "Average queue wait",
1809
- children: X(n?.averageMs)
2004
+ children: Dt(n?.averageMs)
1810
2005
  }),
1811
- /* @__PURE__ */ A("p", { children: n ? `Max ${X(n.maxMs)} · ${n.admitted.toLocaleString()} admitted ${V(r)}` : `No admitted requests ${V(r)}` })
2006
+ /* @__PURE__ */ j("p", { children: n ? `Max ${Dt(n.maxMs)} · ${n.admitted.toLocaleString()} admitted ${H(r)}` : `No admitted requests ${H(r)}` })
1812
2007
  ]
1813
2008
  })
1814
2009
  ]
1815
2010
  });
1816
2011
  }
1817
- function wt({ inventory: e, query: t, onQueryChange: n, onSelectActor: r, onSelectInstance: i, waits: a }) {
1818
- let o = e.actors.some((e) => e.unknown > 0), s = e.actors.filter((e) => Et(e, t)).sort((e, t) => Number(t.live > 0) - Number(e.live > 0)), l = Tt(e);
1819
- return /* @__PURE__ */ j(k, { children: [
1820
- /* @__PURE__ */ j("div", {
2012
+ function Mt({ inventory: e, query: t, onQueryChange: n, onSelectActor: r, onSelectInstance: i, waits: a }) {
2013
+ let o = e.actors.some((e) => e.unknown > 0), s = e.actors.filter((e) => Pt(e, t)).sort((e, t) => Number(t.live > 0) - Number(e.live > 0)), l = Nt(e);
2014
+ return /* @__PURE__ */ M(A, { children: [
2015
+ /* @__PURE__ */ M("div", {
1821
2016
  className: "la-observer-list-toolbar",
1822
- children: [/* @__PURE__ */ j("h2", { children: ["Actor names ", /* @__PURE__ */ A(H, { children: e.actors.length })] }), /* @__PURE__ */ A(me, {
2017
+ children: [/* @__PURE__ */ M("h2", { children: ["Actor names ", /* @__PURE__ */ j(U, { children: e.actors.length })] }), /* @__PURE__ */ j(ge, {
1823
2018
  label: "Search actors and instances",
1824
2019
  placeholder: "Search actor name or instance ID…",
1825
2020
  value: t,
@@ -1833,80 +2028,80 @@ function wt({ inventory: e, query: t, onQueryChange: n, onSelectActor: r, onSele
1833
2028
  className: "la-observer-lookup"
1834
2029
  })]
1835
2030
  }),
1836
- /* @__PURE__ */ A("div", {
2031
+ /* @__PURE__ */ j("div", {
1837
2032
  className: "la-observer-table-frame",
1838
- children: s.length ? /* @__PURE__ */ j(W, {
2033
+ children: s.length ? /* @__PURE__ */ M(G, {
1839
2034
  "aria-label": "Actor instance counts",
1840
2035
  className: "la-observer-table",
1841
- children: [/* @__PURE__ */ A(G, { children: /* @__PURE__ */ j(q, { children: [
1842
- /* @__PURE__ */ A(J, {
2036
+ children: [/* @__PURE__ */ j(K, { children: /* @__PURE__ */ M(J, { children: [
2037
+ /* @__PURE__ */ j(Y, {
1843
2038
  scope: "col",
1844
2039
  children: "Actor"
1845
2040
  }),
1846
- /* @__PURE__ */ A(J, {
2041
+ /* @__PURE__ */ j(Y, {
1847
2042
  scope: "col",
1848
2043
  children: "Live"
1849
2044
  }),
1850
- /* @__PURE__ */ A(J, {
2045
+ /* @__PURE__ */ j(Y, {
1851
2046
  scope: "col",
1852
2047
  children: "Dormant"
1853
2048
  }),
1854
- o && /* @__PURE__ */ A(J, {
2049
+ o && /* @__PURE__ */ j(Y, {
1855
2050
  scope: "col",
1856
2051
  children: "Unknown"
1857
2052
  }),
1858
- /* @__PURE__ */ A(J, {
2053
+ /* @__PURE__ */ j(Y, {
1859
2054
  scope: "col",
1860
2055
  children: "Total"
1861
2056
  }),
1862
- a && /* @__PURE__ */ A(J, {
2057
+ a && /* @__PURE__ */ j(Y, {
1863
2058
  scope: "col",
1864
2059
  className: "la-observer-wait-cell",
1865
2060
  children: "Avg queue wait"
1866
2061
  })
1867
- ] }) }), /* @__PURE__ */ A(K, { children: s.map((e) => /* @__PURE__ */ j(q, {
2062
+ ] }) }), /* @__PURE__ */ j(q, { children: s.map((e) => /* @__PURE__ */ M(J, {
1868
2063
  className: "la-clickable-row",
1869
2064
  onClick: () => r(e.actorName),
1870
2065
  children: [
1871
- /* @__PURE__ */ A(Y, {
2066
+ /* @__PURE__ */ j(X, {
1872
2067
  className: "la-observer-name",
1873
- children: /* @__PURE__ */ j(z, {
2068
+ children: /* @__PURE__ */ M(B, {
1874
2069
  variant: "ghost",
1875
2070
  type: "button",
1876
2071
  className: "la-observer-actor-button la-observer-class-button",
1877
- children: [/* @__PURE__ */ A(c, {
2072
+ children: [/* @__PURE__ */ j(c, {
1878
2073
  className: "la-observer-type-icon",
1879
2074
  "aria-hidden": "true"
1880
- }), /* @__PURE__ */ A("span", { children: e.actorName })]
2075
+ }), /* @__PURE__ */ j("span", { children: e.actorName })]
1881
2076
  })
1882
2077
  }),
1883
- /* @__PURE__ */ A(Y, { children: /* @__PURE__ */ A("span", {
2078
+ /* @__PURE__ */ j(X, { children: /* @__PURE__ */ j("span", {
1884
2079
  className: e.live > 0 ? "la-observer-live" : void 0,
1885
2080
  children: e.live.toLocaleString()
1886
2081
  }) }),
1887
- /* @__PURE__ */ A(Y, { children: e.dormant.toLocaleString() }),
1888
- o && /* @__PURE__ */ A(Y, { children: e.unknown.toLocaleString() }),
1889
- /* @__PURE__ */ A(Y, { children: (e.live + e.dormant + e.unknown).toLocaleString() }),
1890
- a && /* @__PURE__ */ A(Y, {
2082
+ /* @__PURE__ */ j(X, { children: e.dormant.toLocaleString() }),
2083
+ o && /* @__PURE__ */ j(X, { children: e.unknown.toLocaleString() }),
2084
+ /* @__PURE__ */ j(X, { children: (e.live + e.dormant + e.unknown).toLocaleString() }),
2085
+ a && /* @__PURE__ */ j(X, {
1891
2086
  className: "la-observer-wait-cell",
1892
- children: /* @__PURE__ */ A(Ot, { stats: a.get(e.actorName) })
2087
+ children: /* @__PURE__ */ j(Lt, { stats: a.get(e.actorName) })
1893
2088
  })
1894
2089
  ]
1895
2090
  }, e.actorName)) })]
1896
- }) : /* @__PURE__ */ A(Pt, {
2091
+ }) : /* @__PURE__ */ j(Ut, {
1897
2092
  title: "No matching actors",
1898
2093
  description: "Try a different actor name.",
1899
2094
  action: "Clear search",
1900
2095
  onReset: () => n("")
1901
2096
  })
1902
2097
  }),
1903
- o && /* @__PURE__ */ j("p", {
2098
+ o && /* @__PURE__ */ M("p", {
1904
2099
  className: "la-observer-unknown",
1905
- children: [/* @__PURE__ */ A(h, { "aria-hidden": "true" }), "Some hosts have not reported which instances are loaded. Their counts are shown as unknown."]
2100
+ children: [/* @__PURE__ */ j(g, { "aria-hidden": "true" }), "Some hosts have not reported which instances are loaded. Their counts are shown as unknown."]
1906
2101
  })
1907
2102
  ] });
1908
2103
  }
1909
- function Tt(e) {
2104
+ function Nt(e) {
1910
2105
  return e.actors.flatMap((e) => [{
1911
2106
  id: JSON.stringify({ actorName: e.actorName }),
1912
2107
  group: "Actor classes",
@@ -1920,350 +2115,356 @@ function Tt(e) {
1920
2115
  group: "Instances",
1921
2116
  value: t.actorId,
1922
2117
  keywords: [e.actorName],
1923
- hint: `${e.actorName} · ${It(t.status)} · ${t.connections.length.toLocaleString()} ${t.connections.length === 1 ? "connection" : "connections"}`
2118
+ hint: `${e.actorName} · ${Gt(t.status)} · ${t.connections.length.toLocaleString()} ${t.connections.length === 1 ? "connection" : "connections"}`
1924
2119
  }))]);
1925
2120
  }
1926
- function Et(e, t) {
2121
+ function Pt(e, t) {
1927
2122
  let n = t.trim().toLocaleLowerCase().split(/\s+/u).filter(Boolean), r = [e.actorName, ...e.instances.map((e) => e.actorId)].join(" ").toLocaleLowerCase();
1928
2123
  return n.every((e) => r.includes(e));
1929
2124
  }
1930
- function Dt({ client: e, id: n, actorName: r, instances: o, waits: s, range: c, selectedInstanceId: l, onSelectInstance: u }) {
1931
- let [d, f] = a(""), [p, m] = a("all"), h = `${n}-connections`, [g, _] = a();
1932
- t(() => _(void 0), [l]);
1933
- let v = o.filter((e) => Ft(e.actorId, d) && (p === "all" || e.status === p));
1934
- v.sort((e, t) => Number(t.status === "live") - Number(e.status === "live"));
1935
- let y = o.find((e) => e.actorId === l), b = i(null);
1936
- return t(() => {
1937
- b.current?.focus();
1938
- }, [l]), l === void 0 ? /* @__PURE__ */ j("section", {
1939
- id: n,
2125
+ function Ft({ client: e, id: t, actorName: n, instances: r, waits: i, range: o, selectedInstanceId: s, onSelectInstance: c }) {
2126
+ let [l, u] = a(""), [d, f] = a("all"), p = r.filter((e) => Wt(e.actorId, l) && (d === "all" || e.status === d));
2127
+ p.sort((e, t) => Number(t.status === "live") - Number(e.status === "live"));
2128
+ let m = r.find((e) => e.actorId === s);
2129
+ return s === void 0 ? /* @__PURE__ */ M("section", {
2130
+ id: t,
1940
2131
  className: "la-observer-instances",
1941
- "aria-labelledby": `${n}-heading`,
1942
- children: [/* @__PURE__ */ A("div", {
2132
+ "aria-labelledby": `${t}-heading`,
2133
+ children: [/* @__PURE__ */ j("div", {
1943
2134
  className: "la-observer-instances-heading",
1944
- children: /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ j("h2", {
1945
- ref: b,
1946
- tabIndex: -1,
1947
- id: `${n}-heading`,
2135
+ children: /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ M("h2", {
2136
+ id: `${t}-heading`,
1948
2137
  children: [
1949
- r,
2138
+ n,
1950
2139
  " instances ",
1951
- /* @__PURE__ */ A(H, {
2140
+ /* @__PURE__ */ j(U, {
1952
2141
  "aria-hidden": "true",
1953
- children: o.length.toLocaleString()
2142
+ children: r.length.toLocaleString()
1954
2143
  })
1955
2144
  ]
1956
- }), /* @__PURE__ */ A("p", { children: "Select an instance to inspect its persisted state, requests, and WebSocket connections." })] })
1957
- }), o.length ? /* @__PURE__ */ j(k, { children: [
1958
- /* @__PURE__ */ j("div", {
2145
+ }), /* @__PURE__ */ j("p", { children: "Select an instance to inspect its persisted state, requests, and WebSocket connections." })] })
2146
+ }), r.length ? /* @__PURE__ */ M(A, { children: [
2147
+ /* @__PURE__ */ M("div", {
1959
2148
  className: "la-observer-filters",
1960
- children: [/* @__PURE__ */ A(Nt, {
2149
+ children: [/* @__PURE__ */ j(Ht, {
1961
2150
  label: "Search instances",
1962
2151
  placeholder: "Search instance IDs…",
1963
- value: d,
1964
- onChange: f
1965
- }), /* @__PURE__ */ j(Be, {
2152
+ value: l,
2153
+ onChange: u
2154
+ }), /* @__PURE__ */ M(Je, {
1966
2155
  className: "la-observer-select",
1967
2156
  "aria-label": "Instance state",
1968
- value: p,
1969
- onChange: (e) => m(e.target.value),
2157
+ value: d,
2158
+ onChange: (e) => f(e.target.value),
1970
2159
  children: [
1971
- /* @__PURE__ */ A(U, {
2160
+ /* @__PURE__ */ j(W, {
1972
2161
  value: "all",
1973
2162
  children: "All states"
1974
2163
  }),
1975
- /* @__PURE__ */ A(U, {
2164
+ /* @__PURE__ */ j(W, {
1976
2165
  value: "live",
1977
2166
  children: "Live"
1978
2167
  }),
1979
- /* @__PURE__ */ A(U, {
2168
+ /* @__PURE__ */ j(W, {
1980
2169
  value: "dormant",
1981
2170
  children: "Dormant"
1982
2171
  }),
1983
- /* @__PURE__ */ A(U, {
2172
+ /* @__PURE__ */ j(W, {
1984
2173
  value: "unknown",
1985
2174
  children: "Unknown"
1986
2175
  })
1987
2176
  ]
1988
2177
  })]
1989
2178
  }),
1990
- /* @__PURE__ */ A("div", {
2179
+ /* @__PURE__ */ j("div", {
1991
2180
  className: "la-observer-table-frame",
1992
- children: v.length ? /* @__PURE__ */ j(W, {
1993
- "aria-label": `${r} instances`,
2181
+ children: p.length ? /* @__PURE__ */ M(G, {
2182
+ "aria-label": `${n} instances`,
1994
2183
  className: "la-observer-instance-table",
1995
- children: [/* @__PURE__ */ A(G, { children: /* @__PURE__ */ j(q, { children: [
1996
- /* @__PURE__ */ A(J, {
2184
+ children: [/* @__PURE__ */ j(K, { children: /* @__PURE__ */ M(J, { children: [
2185
+ /* @__PURE__ */ j(Y, {
1997
2186
  scope: "col",
1998
2187
  children: "Instance"
1999
2188
  }),
2000
- /* @__PURE__ */ A(J, {
2189
+ /* @__PURE__ */ j(Y, {
2001
2190
  scope: "col",
2002
2191
  children: "State"
2003
2192
  }),
2004
- /* @__PURE__ */ A(J, {
2193
+ /* @__PURE__ */ j(Y, {
2005
2194
  scope: "col",
2006
2195
  children: "Connections"
2007
2196
  }),
2008
- s && /* @__PURE__ */ A(J, {
2197
+ i && /* @__PURE__ */ j(Y, {
2009
2198
  scope: "col",
2010
2199
  className: "la-observer-wait-cell",
2011
2200
  children: "Avg queue wait"
2012
2201
  }),
2013
- /* @__PURE__ */ A(J, {
2202
+ /* @__PURE__ */ j(Y, {
2014
2203
  scope: "col",
2015
2204
  className: "la-observer-waiting-cell",
2016
2205
  children: "Waiting"
2017
2206
  })
2018
- ] }) }), /* @__PURE__ */ A(K, { children: v.map((e) => /* @__PURE__ */ j(q, {
2207
+ ] }) }), /* @__PURE__ */ j(q, { children: p.map((e) => /* @__PURE__ */ M(J, {
2019
2208
  className: "la-clickable-row",
2020
- onClick: () => u(e.actorId),
2209
+ onClick: () => c(e.actorId),
2021
2210
  children: [
2022
- /* @__PURE__ */ A(Y, {
2211
+ /* @__PURE__ */ j(X, {
2023
2212
  className: "la-observer-instance-id",
2024
- children: /* @__PURE__ */ A(z, {
2213
+ children: /* @__PURE__ */ j(B, {
2025
2214
  variant: "ghost",
2026
2215
  type: "button",
2027
2216
  className: "la-observer-actor-button",
2028
- children: /* @__PURE__ */ A("span", { children: e.actorId })
2217
+ children: /* @__PURE__ */ j("span", { children: e.actorId })
2029
2218
  })
2030
2219
  }),
2031
- /* @__PURE__ */ A(Y, { children: /* @__PURE__ */ j(H, {
2220
+ /* @__PURE__ */ j(X, { children: /* @__PURE__ */ M(U, {
2032
2221
  variant: "outline",
2033
2222
  className: `la-observer-status-${e.status}`,
2034
- children: [/* @__PURE__ */ A("span", { className: `la-observer-dot la-observer-dot-${e.status}` }), It(e.status)]
2223
+ children: [/* @__PURE__ */ j("span", { className: `la-observer-dot la-observer-dot-${e.status}` }), Gt(e.status)]
2035
2224
  }) }),
2036
- /* @__PURE__ */ A(Y, { children: e.connections.length.toLocaleString() }),
2037
- s && /* @__PURE__ */ A(Y, {
2225
+ /* @__PURE__ */ j(X, { children: e.connections.length.toLocaleString() }),
2226
+ i && /* @__PURE__ */ j(X, {
2038
2227
  className: "la-observer-wait-cell",
2039
- children: /* @__PURE__ */ A(Ot, { stats: s.get(e.actorId) })
2228
+ children: /* @__PURE__ */ j(Lt, { stats: i.get(e.actorId) })
2040
2229
  }),
2041
- /* @__PURE__ */ A(Y, {
2230
+ /* @__PURE__ */ j(X, {
2042
2231
  className: "la-observer-waiting-cell",
2043
- children: /* @__PURE__ */ A(jt, {
2232
+ children: /* @__PURE__ */ j(Bt, {
2044
2233
  waiting: e.waiting,
2045
2234
  compact: !0
2046
2235
  })
2047
2236
  })
2048
2237
  ]
2049
2238
  }, e.actorId)) })]
2050
- }) : /* @__PURE__ */ A(Pt, {
2239
+ }) : /* @__PURE__ */ j(Ut, {
2051
2240
  title: "No matching instances",
2052
2241
  description: "Try another instance ID or state.",
2053
2242
  action: "Clear filters",
2054
2243
  onReset: () => {
2055
- f(""), m("all");
2244
+ u(""), f("all");
2056
2245
  }
2057
2246
  })
2058
2247
  }),
2059
- /* @__PURE__ */ A("p", {
2248
+ /* @__PURE__ */ j("p", {
2060
2249
  className: "la-observer-connection-note",
2061
2250
  children: "Connections are active WebSocket connections, not unique people."
2062
2251
  })
2063
- ] }) : /* @__PURE__ */ j("p", {
2252
+ ] }) : /* @__PURE__ */ M("p", {
2064
2253
  className: "la-observer-instance-empty",
2065
2254
  role: "status",
2066
2255
  children: [
2067
2256
  "No ",
2068
- r,
2257
+ n,
2069
2258
  " instances have been created yet."
2070
2259
  ]
2071
2260
  })]
2072
- }) : /* @__PURE__ */ j("section", {
2261
+ }) : /* @__PURE__ */ j(It, {
2262
+ client: e,
2263
+ id: t,
2264
+ actorName: n,
2265
+ actorId: s,
2266
+ instance: m,
2267
+ waits: i,
2268
+ range: o
2269
+ }, s);
2270
+ }
2271
+ function It({ client: e, id: t, actorName: n, actorId: r, instance: o, waits: s, range: c }) {
2272
+ let [l, u] = a("requests"), [d, f] = a(), p = i(null), m = !!e.getState && !!e.listStateHistory;
2273
+ return /* @__PURE__ */ M("section", {
2073
2274
  className: "la-observer-instance-detail",
2074
- "aria-label": `${r} / ${l}`,
2275
+ "aria-label": `${n} / ${r}`,
2075
2276
  children: [
2076
- /* @__PURE__ */ A(z, {
2077
- variant: "link",
2078
- "aria-label": "Back to instances",
2079
- onClick: () => u(void 0),
2080
- children: "Back to instances"
2081
- }),
2082
- /* @__PURE__ */ j("div", {
2083
- className: "la-observer-instance-heading",
2084
- children: [/* @__PURE__ */ A("h2", {
2085
- ref: b,
2086
- tabIndex: -1,
2087
- children: l
2088
- }), y && /* @__PURE__ */ A(H, {
2089
- variant: "outline",
2090
- className: `la-observer-status-${y.status}`,
2091
- children: It(y.status)
2092
- })]
2093
- }),
2094
- !y && /* @__PURE__ */ A("p", {
2277
+ !o && /* @__PURE__ */ j("p", {
2095
2278
  role: "status",
2096
2279
  children: "This instance is no longer in the current inventory. Its retained requests are still available below."
2097
2280
  }),
2098
- s && /* @__PURE__ */ A(kt, {
2099
- stats: s.get(l),
2100
- range: c
2281
+ /* @__PURE__ */ M("div", {
2282
+ className: "la-observer-instance-metrics",
2283
+ children: [s && /* @__PURE__ */ j(Rt, {
2284
+ stats: s.get(r),
2285
+ range: c
2286
+ }), o && /* @__PURE__ */ j(zt, { waiting: o.waiting })]
2101
2287
  }),
2102
- y && /* @__PURE__ */ A(At, { waiting: y.waiting }),
2103
- e.getState && e.listStateHistory && /* @__PURE__ */ A(at, {
2104
- client: e,
2105
- actorName: r,
2106
- actorId: l,
2107
- onInspectRequest: (e) => {
2108
- _(e), document.getElementById(`${n}-requests`)?.scrollIntoView({
2109
- block: "start",
2110
- behavior: "smooth"
2111
- });
2112
- }
2113
- }, `state-${l}`),
2114
- /* @__PURE__ */ A("div", { id: `${n}-requests` }),
2115
- e.watchRequests || e.listRequests ? /* @__PURE__ */ A(Qe, {
2116
- client: e,
2117
- actor: {
2118
- actorName: r,
2119
- actorId: l
2120
- },
2121
- timeRange: c,
2122
- focus: g
2123
- }, `requests-${l}`) : /* @__PURE__ */ j("section", { children: [/* @__PURE__ */ A("h3", { children: "Requests" }), /* @__PURE__ */ A("p", { children: "Request timings are unavailable for this connection." })] }),
2124
- y && /* @__PURE__ */ A(Mt, {
2125
- id: h,
2126
- actorId: y.actorId,
2127
- connections: y.connections
2288
+ /* @__PURE__ */ M("div", {
2289
+ className: "la-observer-instance-views",
2290
+ role: "group",
2291
+ "aria-label": "Instance view",
2292
+ children: [
2293
+ /* @__PURE__ */ j(B, {
2294
+ ref: p,
2295
+ variant: "ghost",
2296
+ "aria-pressed": l === "requests",
2297
+ onClick: () => u("requests"),
2298
+ children: "Requests"
2299
+ }),
2300
+ m && /* @__PURE__ */ j(B, {
2301
+ variant: "ghost",
2302
+ "aria-pressed": l === "state",
2303
+ onClick: () => u("state"),
2304
+ children: "State"
2305
+ }),
2306
+ o && /* @__PURE__ */ M(B, {
2307
+ variant: "ghost",
2308
+ "aria-pressed": l === "websockets",
2309
+ onClick: () => u("websockets"),
2310
+ children: ["WebSockets ", /* @__PURE__ */ j(U, { children: o.connections.length })]
2311
+ })
2312
+ ]
2313
+ }),
2314
+ /* @__PURE__ */ j("div", {
2315
+ hidden: l !== "requests",
2316
+ children: e.watchRequests || e.listRequests ? /* @__PURE__ */ j(ot, {
2317
+ client: e,
2318
+ actor: {
2319
+ actorName: n,
2320
+ actorId: r
2321
+ },
2322
+ timeRange: c,
2323
+ focus: d
2324
+ }) : /* @__PURE__ */ M("section", { children: [/* @__PURE__ */ j("h3", { children: "Requests" }), /* @__PURE__ */ j("p", { children: "Request timings are unavailable for this connection." })] })
2325
+ }),
2326
+ /* @__PURE__ */ j("div", {
2327
+ hidden: l !== "state",
2328
+ children: m && /* @__PURE__ */ j(ft, {
2329
+ client: e,
2330
+ actorName: n,
2331
+ actorId: r,
2332
+ onInspectRequest: (e) => {
2333
+ f(e), u("requests"), p.current?.focus();
2334
+ }
2335
+ })
2336
+ }),
2337
+ /* @__PURE__ */ j("div", {
2338
+ hidden: l !== "websockets",
2339
+ children: o && /* @__PURE__ */ j(Vt, {
2340
+ id: `${t}-connections`,
2341
+ actorId: r,
2342
+ connections: o.connections
2343
+ })
2128
2344
  })
2129
2345
  ]
2130
2346
  });
2131
2347
  }
2132
- function Ot({ stats: e }) {
2133
- return e ? /* @__PURE__ */ j("span", {
2348
+ function Lt({ stats: e }) {
2349
+ return e ? /* @__PURE__ */ M("span", {
2134
2350
  className: "la-observer-wait",
2135
- title: `Average of ${e.admitted.toLocaleString()} admitted requests in the selected time range; longest wait ${X(e.maxMs)}`,
2136
- children: [X(e.averageMs), /* @__PURE__ */ j("small", { children: ["max ", X(e.maxMs)] })]
2137
- }) : /* @__PURE__ */ A("span", {
2351
+ title: `Average of ${e.admitted.toLocaleString()} admitted requests in the selected time range; longest wait ${Dt(e.maxMs)}`,
2352
+ children: [Dt(e.averageMs), /* @__PURE__ */ M("small", { children: ["max ", Dt(e.maxMs)] })]
2353
+ }) : /* @__PURE__ */ j("span", {
2138
2354
  title: "No admitted requests in the selected time range",
2139
2355
  children: "—"
2140
2356
  });
2141
2357
  }
2142
- function kt({ stats: e, range: t }) {
2358
+ function Rt({ stats: e, range: t }) {
2143
2359
  return /* @__PURE__ */ j("section", {
2144
2360
  className: "la-observer-queue-wait-detail",
2145
2361
  "aria-label": "Queue wait",
2146
- children: [
2147
- /* @__PURE__ */ A("h3", { children: "Queue wait" }),
2148
- /* @__PURE__ */ A("p", { children: e ? `Time requests spent waiting to enter this actor ${V(t)}.` : `No requests were admitted to this actor ${V(t)}.` }),
2149
- e && /* @__PURE__ */ j("dl", {
2150
- className: "la-observer-summary la-observer-summary-compact",
2151
- children: [
2152
- /* @__PURE__ */ j("div", { children: [
2153
- /* @__PURE__ */ A("dt", { children: "Average" }),
2154
- /* @__PURE__ */ A("dd", {
2155
- "aria-label": "Average queue wait",
2156
- children: X(e.averageMs)
2157
- }),
2158
- /* @__PURE__ */ A("p", { children: "Per admitted request" })
2159
- ] }),
2160
- /* @__PURE__ */ j("div", { children: [
2161
- /* @__PURE__ */ A("dt", { children: "Longest" }),
2162
- /* @__PURE__ */ A("dd", {
2163
- "aria-label": "Longest queue wait",
2164
- children: X(e.maxMs)
2165
- }),
2166
- /* @__PURE__ */ A("p", { children: "Single request" })
2167
- ] }),
2168
- /* @__PURE__ */ j("div", { children: [
2169
- /* @__PURE__ */ A("dt", { children: "Admitted" }),
2170
- /* @__PURE__ */ A("dd", {
2171
- "aria-label": "Admitted requests",
2172
- children: e.admitted.toLocaleString()
2173
- }),
2174
- /* @__PURE__ */ A("p", { children: "Requests that entered the actor" })
2175
- ] })
2176
- ]
2177
- })
2178
- ]
2362
+ title: `Time waiting to enter this actor ${H(t)}`,
2363
+ children: e ? /* @__PURE__ */ M("dl", { children: [
2364
+ /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j("dt", { children: "Avg queue wait" }), /* @__PURE__ */ j("dd", {
2365
+ "aria-label": "Average queue wait",
2366
+ children: Dt(e.averageMs)
2367
+ })] }),
2368
+ /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j("dt", { children: "Max" }), /* @__PURE__ */ j("dd", {
2369
+ "aria-label": "Longest queue wait",
2370
+ children: Dt(e.maxMs)
2371
+ })] }),
2372
+ /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j("dt", { children: "Admitted" }), /* @__PURE__ */ j("dd", {
2373
+ "aria-label": "Admitted requests",
2374
+ children: e.admitted.toLocaleString()
2375
+ })] })
2376
+ ] }) : /* @__PURE__ */ M("p", { children: [
2377
+ "No requests admitted ",
2378
+ H(t),
2379
+ "."
2380
+ ] })
2179
2381
  });
2180
2382
  }
2181
- function At({ waiting: e }) {
2383
+ function zt({ waiting: e }) {
2182
2384
  return /* @__PURE__ */ j("section", {
2183
2385
  className: "la-observer-waiting",
2184
2386
  "aria-label": "Waiting requests",
2185
- children: [
2186
- /* @__PURE__ */ j("h3", { children: ["Waiting requests", e != null && ` (${e.length})`] }),
2187
- /* @__PURE__ */ A("p", { children: e == null ? "This host has not reported its waiting line." : e.length ? "Next to run first. Operations leave this line when they start." : "No requests waiting." }),
2188
- !!e?.length && /* @__PURE__ */ A(jt, { waiting: e })
2189
- ]
2387
+ children: e?.length ? /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ M("span", {
2388
+ className: "la-observer-waiting-label",
2389
+ children: ["Waiting ", /* @__PURE__ */ j("strong", { children: e.length })]
2390
+ }), /* @__PURE__ */ j(Bt, { waiting: e })] }) : /* @__PURE__ */ j("p", { children: e == null ? "Queue reporting unavailable" : "No requests waiting." })
2190
2391
  });
2191
2392
  }
2192
- function jt({ waiting: e, compact: t = !1 }) {
2193
- if (e == null) return /* @__PURE__ */ A("span", {
2393
+ function Bt({ waiting: e, compact: t = !1 }) {
2394
+ if (e == null) return /* @__PURE__ */ j("span", {
2194
2395
  title: "Queue reporting is unavailable",
2195
2396
  children: "Unavailable"
2196
2397
  });
2197
- if (!e.length) return /* @__PURE__ */ A("span", {
2398
+ if (!e.length) return /* @__PURE__ */ j("span", {
2198
2399
  className: "la-observer-queue-empty",
2199
2400
  children: "None"
2200
2401
  });
2201
2402
  let n = t ? e.slice(0, 3) : e;
2202
- return /* @__PURE__ */ j("ol", {
2403
+ return /* @__PURE__ */ M("ol", {
2203
2404
  className: `la-observer-queue${t ? " la-observer-queue-compact" : ""}`,
2204
2405
  "aria-label": `${e.length} waiting requests, next to run first`,
2205
- children: [n.map((e, n) => /* @__PURE__ */ A("li", { children: /* @__PURE__ */ j(H, {
2406
+ children: [n.map((e, n) => /* @__PURE__ */ j("li", { children: /* @__PURE__ */ M(U, {
2206
2407
  variant: "outline",
2207
2408
  className: "la-observer-queue-bubble",
2208
2409
  title: e.operation,
2209
- children: [!t && /* @__PURE__ */ A("span", {
2410
+ children: [!t && /* @__PURE__ */ j("span", {
2210
2411
  className: "la-observer-queue-position",
2211
2412
  children: n + 1
2212
- }), /* @__PURE__ */ A("span", {
2413
+ }), /* @__PURE__ */ j("span", {
2213
2414
  className: "la-observer-queue-operation",
2214
2415
  children: e.operation
2215
2416
  })]
2216
- }) }, e.id)), t && e.length > n.length && /* @__PURE__ */ A("li", { children: /* @__PURE__ */ j(H, {
2417
+ }) }, e.id)), t && e.length > n.length && /* @__PURE__ */ j("li", { children: /* @__PURE__ */ M(U, {
2217
2418
  "aria-label": `${e.length - n.length} more waiting requests`,
2218
2419
  children: ["+", e.length - n.length]
2219
2420
  }) })]
2220
2421
  });
2221
2422
  }
2222
- function Mt({ id: e, actorId: t, connections: n }) {
2223
- return /* @__PURE__ */ j("section", {
2423
+ function Vt({ id: e, actorId: t, connections: n }) {
2424
+ return /* @__PURE__ */ M("section", {
2224
2425
  id: e,
2225
2426
  className: "la-observer-connections",
2226
2427
  "aria-labelledby": `${e}-heading`,
2227
- children: [/* @__PURE__ */ A("div", {
2428
+ children: [/* @__PURE__ */ j("div", {
2228
2429
  className: "la-observer-instances-heading",
2229
- children: /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ j("h3", {
2430
+ children: /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ M("h3", {
2230
2431
  id: `${e}-heading`,
2231
2432
  children: [
2232
2433
  t,
2233
2434
  " WebSockets ",
2234
- /* @__PURE__ */ A(H, {
2435
+ /* @__PURE__ */ j(U, {
2235
2436
  "aria-hidden": "true",
2236
2437
  children: n.length.toLocaleString()
2237
2438
  })
2238
2439
  ]
2239
- }), /* @__PURE__ */ A("p", { children: `${n.length.toLocaleString()} active ${n.length === 1 ? "connection" : "connections"}` })] })
2240
- }), n.length ? /* @__PURE__ */ A("div", {
2440
+ }), /* @__PURE__ */ j("p", { children: `${n.length.toLocaleString()} active ${n.length === 1 ? "connection" : "connections"}` })] })
2441
+ }), n.length ? /* @__PURE__ */ j("div", {
2241
2442
  className: "la-observer-table-frame",
2242
- children: /* @__PURE__ */ j(W, {
2443
+ children: /* @__PURE__ */ M(G, {
2243
2444
  "aria-label": `${t} WebSocket connections`,
2244
2445
  className: "la-observer-connection-table",
2245
- children: [/* @__PURE__ */ A(G, { children: /* @__PURE__ */ j(q, { children: [/* @__PURE__ */ A(J, {
2446
+ children: [/* @__PURE__ */ j(K, { children: /* @__PURE__ */ M(J, { children: [/* @__PURE__ */ j(Y, {
2246
2447
  scope: "col",
2247
2448
  children: "Socket"
2248
- }), /* @__PURE__ */ A(J, {
2449
+ }), /* @__PURE__ */ j(Y, {
2249
2450
  scope: "col",
2250
2451
  children: "Metadata"
2251
- })] }) }), /* @__PURE__ */ A(K, { children: n.map((e) => /* @__PURE__ */ j(q, { children: [/* @__PURE__ */ A(Y, {
2452
+ })] }) }), /* @__PURE__ */ j(q, { children: n.map((e) => /* @__PURE__ */ M(J, { children: [/* @__PURE__ */ j(X, {
2252
2453
  className: "la-observer-socket-id",
2253
2454
  children: e.id
2254
- }), /* @__PURE__ */ A(Y, { children: /* @__PURE__ */ A("pre", { children: JSON.stringify(e.metadata, null, 2) }) })] }, e.id)) })]
2455
+ }), /* @__PURE__ */ j(X, { children: /* @__PURE__ */ j("pre", { children: JSON.stringify(e.metadata, null, 2) }) })] }, e.id)) })]
2255
2456
  })
2256
- }) : /* @__PURE__ */ j("div", {
2457
+ }) : /* @__PURE__ */ M("div", {
2257
2458
  className: "la-observer-no-connections",
2258
2459
  role: "status",
2259
- children: [/* @__PURE__ */ A(w, { "aria-hidden": "true" }), /* @__PURE__ */ A("p", { children: "No active WebSocket connections." })]
2460
+ children: [/* @__PURE__ */ j(T, { "aria-hidden": "true" }), /* @__PURE__ */ j("p", { children: "No active WebSocket connections." })]
2260
2461
  })]
2261
2462
  });
2262
2463
  }
2263
- function Nt({ label: e, placeholder: t, value: n, onChange: r }) {
2264
- return /* @__PURE__ */ j("div", {
2464
+ function Ht({ label: e, placeholder: t, value: n, onChange: r }) {
2465
+ return /* @__PURE__ */ M("div", {
2265
2466
  className: "la-observer-search",
2266
- children: [/* @__PURE__ */ A(x, { "aria-hidden": "true" }), /* @__PURE__ */ A(B, {
2467
+ children: [/* @__PURE__ */ j(S, { "aria-hidden": "true" }), /* @__PURE__ */ j(V, {
2267
2468
  type: "search",
2268
2469
  "aria-label": e,
2269
2470
  placeholder: t,
@@ -2272,14 +2473,14 @@ function Nt({ label: e, placeholder: t, value: n, onChange: r }) {
2272
2473
  })]
2273
2474
  });
2274
2475
  }
2275
- function Pt({ title: e, description: t, action: n, onReset: r }) {
2276
- return /* @__PURE__ */ j("div", {
2476
+ function Ut({ title: e, description: t, action: n, onReset: r }) {
2477
+ return /* @__PURE__ */ M("div", {
2277
2478
  className: "la-observer-empty",
2278
2479
  children: [
2279
- /* @__PURE__ */ A(x, { "aria-hidden": "true" }),
2280
- /* @__PURE__ */ A("h3", { children: e }),
2281
- /* @__PURE__ */ A("p", { children: t }),
2282
- n && /* @__PURE__ */ A(z, {
2480
+ /* @__PURE__ */ j(S, { "aria-hidden": "true" }),
2481
+ /* @__PURE__ */ j("h3", { children: e }),
2482
+ /* @__PURE__ */ j("p", { children: t }),
2483
+ n && /* @__PURE__ */ j(B, {
2283
2484
  type: "button",
2284
2485
  variant: "outline",
2285
2486
  onClick: r,
@@ -2288,26 +2489,26 @@ function Pt({ title: e, description: t, action: n, onReset: r }) {
2288
2489
  ]
2289
2490
  });
2290
2491
  }
2291
- function Ft(e, t) {
2492
+ function Wt(e, t) {
2292
2493
  return e.toLocaleLowerCase().includes(t.trim().toLocaleLowerCase());
2293
2494
  }
2294
- function It(e) {
2495
+ function Gt(e) {
2295
2496
  return e[0].toUpperCase() + e.slice(1);
2296
2497
  }
2297
2498
  //#endregion
2298
2499
  //#region src/overview-data.ts
2299
- function Lt(e) {
2500
+ function Kt(e) {
2300
2501
  let t = e.filter((e) => e.outcome !== "rerouted");
2301
2502
  return {
2302
2503
  count: e.length,
2303
2504
  success: t.length ? 100 * t.filter((e) => e.outcome === "completed").length / t.length : null,
2304
- p95: Vt(t.map((e) => e.durationMs))
2505
+ p95: Xt(t.map((e) => e.durationMs))
2305
2506
  };
2306
2507
  }
2307
- function Rt(e, t, n) {
2508
+ function qt(e, t, n) {
2308
2509
  return e.filter((e) => e.startedAtMs >= (t.fromMs ?? 0) && e.startedAtMs <= (t.toMs ?? n));
2309
2510
  }
2310
- function zt(e) {
2511
+ function Jt(e) {
2311
2512
  return e.actors.reduce((e, t) => ({
2312
2513
  live: e.live + t.live,
2313
2514
  dormant: e.dormant + t.dormant,
@@ -2320,33 +2521,33 @@ function zt(e) {
2320
2521
  connections: 0
2321
2522
  });
2322
2523
  }
2323
- function Bt(e) {
2324
- return Vt(e.filter((e) => e.outcome !== "rerouted" && e.queueWaitMs !== null).map((e) => e.queueWaitMs));
2524
+ function Yt(e) {
2525
+ return Xt(e.filter((e) => e.outcome !== "rerouted" && e.queueWaitMs !== null).map((e) => e.queueWaitMs));
2325
2526
  }
2326
- function Vt(e) {
2527
+ function Xt(e) {
2327
2528
  return e.length ? e.sort((e, t) => e - t)[Math.ceil(e.length * .95) - 1] : null;
2328
2529
  }
2329
2530
  //#endregion
2330
2531
  //#region src/overview-metrics.ts
2331
- function Ht(e) {
2532
+ function Zt(e) {
2332
2533
  let t = e;
2333
- if (!t || !Ut(t.total) || !Array.isArray(t.classes) || !t.classes.every(Ut)) throw Error("Invalid overview metrics response");
2534
+ if (!t || !Qt(t.total) || !Array.isArray(t.classes) || !t.classes.every(Qt)) throw Error("Invalid overview metrics response");
2334
2535
  return t;
2335
2536
  }
2336
- function Ut(e) {
2537
+ function Qt(e) {
2337
2538
  return !!e && typeof e.actorName == "string" && Number.isSafeInteger(e.count) && e.count >= 0 && [
2338
2539
  e.success,
2339
2540
  e.p95,
2340
2541
  e.queueP95
2341
2542
  ].every((e) => e === null || typeof e == "number" && Number.isFinite(e) && e >= 0) && (e.success === null || e.success <= 100);
2342
2543
  }
2343
- function Wt(e) {
2544
+ function $t(e) {
2344
2545
  let t = /* @__PURE__ */ new Map();
2345
2546
  for (let n of e) t.set(n.actorName, [...t.get(n.actorName) ?? [], n]);
2346
2547
  let n = (e, t) => ({
2347
2548
  actorName: e,
2348
- ...Lt(t),
2349
- queueP95: Bt(t)
2549
+ ...Kt(t),
2550
+ queueP95: Yt(t)
2350
2551
  });
2351
2552
  return {
2352
2553
  total: n("", e),
@@ -2355,47 +2556,47 @@ function Wt(e) {
2355
2556
  }
2356
2557
  //#endregion
2357
2558
  //#region src/Overview.tsx
2358
- function Gt({ client: e, onSelectActor: n, timeRange: r, onTimeRangeChange: i }) {
2359
- let o = qe(e), [s, c] = a(De), l = r ?? s, u = i ?? c, [d, f] = a(Date.now);
2559
+ function en({ client: e, onSelectActor: n, timeRange: r, onTimeRangeChange: i }) {
2560
+ let o = tt(e), [s, c] = a(Fe), l = r ?? s, u = i ?? c, [d, f] = a(Date.now);
2360
2561
  t(() => {
2361
2562
  let e = setInterval(() => f(Date.now()), 1e4);
2362
2563
  return () => clearInterval(e);
2363
2564
  }, []);
2364
- let p = Oe(l, d), m = Xe(e, p, e.getMetrics), h = Je(e, !m.supported), g = h.page ? Wt(Rt(h.page.records, p, Math.max(d, Date.now()))) : void 0, _ = m.supported ? m.value : g, v = m.supported ? m.failed : h.failed;
2365
- return /* @__PURE__ */ j("section", {
2565
+ let p = Ie(l, d), m = it(e, p, e.getMetrics), h = nt(e, !m.supported), g = h.page ? $t(qt(h.page.records, p, Math.max(d, Date.now()))) : void 0, _ = m.supported ? m.value : g, v = m.supported ? m.failed : h.failed;
2566
+ return /* @__PURE__ */ M("section", {
2366
2567
  className: "la-observer overview",
2367
2568
  "aria-label": "Runtime overview",
2368
2569
  children: [
2369
- /* @__PURE__ */ j("div", {
2570
+ /* @__PURE__ */ M("div", {
2370
2571
  className: "overview-heading",
2371
- children: [/* @__PURE__ */ A("h1", { children: "Durable Actors" }), /* @__PURE__ */ j("div", {
2572
+ children: [/* @__PURE__ */ j("h1", { children: "Durable Actors" }), /* @__PURE__ */ M("div", {
2372
2573
  className: "overview-controls",
2373
2574
  children: [
2374
- /* @__PURE__ */ A("span", {
2575
+ /* @__PURE__ */ j("span", {
2375
2576
  className: "overview-updated",
2376
- children: o.failed ? "Inventory reconnecting…" : o.updatedAt ? /* @__PURE__ */ j(k, { children: ["Last inventory update ", /* @__PURE__ */ A("time", {
2577
+ children: o.failed ? "Inventory reconnecting…" : o.updatedAt ? /* @__PURE__ */ M(A, { children: ["Last inventory update ", /* @__PURE__ */ j("time", {
2377
2578
  dateTime: new Date(o.updatedAt).toISOString(),
2378
2579
  children: new Date(o.updatedAt).toLocaleTimeString([], { hour12: !1 })
2379
2580
  })] }) : "Connecting…"
2380
2581
  }),
2381
- /* @__PURE__ */ A(Me, {
2582
+ /* @__PURE__ */ j(Be, {
2382
2583
  value: l,
2383
2584
  onChange: u,
2384
2585
  className: "overview-range"
2385
2586
  }),
2386
- /* @__PURE__ */ A(z, {
2587
+ /* @__PURE__ */ j(B, {
2387
2588
  variant: "outline",
2388
2589
  size: "icon",
2389
2590
  "aria-label": "Refresh overview",
2390
2591
  onClick: () => {
2391
2592
  o.retry(), m.retry(), h.retry();
2392
2593
  },
2393
- children: /* @__PURE__ */ A(ee, { "aria-hidden": "true" })
2594
+ children: /* @__PURE__ */ j(te, { "aria-hidden": "true" })
2394
2595
  })
2395
2596
  ]
2396
2597
  })]
2397
2598
  }),
2398
- o.failed && /* @__PURE__ */ j("p", {
2599
+ o.failed && /* @__PURE__ */ M("p", {
2399
2600
  className: "overview-alert",
2400
2601
  role: "alert",
2401
2602
  children: [
@@ -2404,7 +2605,7 @@ function Gt({ client: e, onSelectActor: n, timeRange: r, onTimeRangeChange: i })
2404
2605
  " Retrying automatically."
2405
2606
  ]
2406
2607
  }),
2407
- v && /* @__PURE__ */ j("p", {
2608
+ v && /* @__PURE__ */ M("p", {
2408
2609
  className: "overview-alert",
2409
2610
  role: "alert",
2410
2611
  children: [
@@ -2415,18 +2616,18 @@ function Gt({ client: e, onSelectActor: n, timeRange: r, onTimeRangeChange: i })
2415
2616
  "Retrying automatically."
2416
2617
  ]
2417
2618
  }),
2418
- /* @__PURE__ */ A(Kt, {
2619
+ /* @__PURE__ */ j(tn, {
2419
2620
  inventory: o.inventory,
2420
2621
  metrics: _,
2421
2622
  range: l
2422
2623
  }),
2423
- /* @__PURE__ */ A(qt, {
2624
+ /* @__PURE__ */ j(nn, {
2424
2625
  inventory: o.inventory,
2425
2626
  metrics: _,
2426
2627
  failed: o.failed,
2427
2628
  onSelectActor: n
2428
2629
  }),
2429
- /* @__PURE__ */ A(Zt, {
2630
+ /* @__PURE__ */ j(sn, {
2430
2631
  page: m.supported ? void 0 : h.page,
2431
2632
  range: l,
2432
2633
  saved: m.supported
@@ -2434,133 +2635,133 @@ function Gt({ client: e, onSelectActor: n, timeRange: r, onTimeRangeChange: i })
2434
2635
  ]
2435
2636
  });
2436
2637
  }
2437
- function Kt({ inventory: e, metrics: t, range: n }) {
2438
- let r = e ? zt(e) : void 0, i = r ? r.live + r.dormant + r.unknown : void 0, a = t?.total;
2439
- return /* @__PURE__ */ j("div", {
2638
+ function tn({ inventory: e, metrics: t, range: n }) {
2639
+ let r = e ? Jt(e) : void 0, i = r ? r.live + r.dormant + r.unknown : void 0, a = t?.total;
2640
+ return /* @__PURE__ */ M("div", {
2440
2641
  className: "overview-metrics",
2441
2642
  children: [
2442
- /* @__PURE__ */ j("section", {
2643
+ /* @__PURE__ */ M("section", {
2443
2644
  className: "overview-metric",
2444
2645
  children: [
2445
- /* @__PURE__ */ A("h2", { children: "Actor instances" }),
2446
- /* @__PURE__ */ j("div", {
2646
+ /* @__PURE__ */ j("h2", { children: "Actor instances" }),
2647
+ /* @__PURE__ */ M("div", {
2447
2648
  className: "overview-value",
2448
- children: [/* @__PURE__ */ A("strong", {
2649
+ children: [/* @__PURE__ */ j("strong", {
2449
2650
  "aria-label": "Actor instances",
2450
2651
  children: Z(i)
2451
- }), /* @__PURE__ */ A("span", { children: e ? `${e.actors.length} actor ${e.actors.length === 1 ? "class" : "classes"}` : "Waiting for inventory" })]
2652
+ }), /* @__PURE__ */ j("span", { children: e ? `${e.actors.length} actor ${e.actors.length === 1 ? "class" : "classes"}` : "Waiting for inventory" })]
2452
2653
  }),
2453
- /* @__PURE__ */ A("div", {
2654
+ /* @__PURE__ */ j("div", {
2454
2655
  className: "overview-residency",
2455
2656
  "aria-hidden": "true",
2456
- children: r && Object.entries(r).filter(([e]) => e !== "connections").map(([e, t]) => /* @__PURE__ */ A("span", {
2657
+ children: r && Object.entries(r).filter(([e]) => e !== "connections").map(([e, t]) => /* @__PURE__ */ j("span", {
2457
2658
  className: `residency-${e}`,
2458
2659
  style: { flexGrow: t }
2459
2660
  }, e))
2460
2661
  }),
2461
- /* @__PURE__ */ j("div", {
2662
+ /* @__PURE__ */ M("div", {
2462
2663
  className: "overview-metric-foot",
2463
2664
  children: [
2464
- /* @__PURE__ */ j("span", { children: [/* @__PURE__ */ A("b", { children: Z(r?.live) }), " live"] }),
2465
- /* @__PURE__ */ j("span", { children: [/* @__PURE__ */ A("b", { children: Z(r?.dormant) }), " dormant"] }),
2466
- !!r?.unknown && /* @__PURE__ */ j("span", { children: [/* @__PURE__ */ A("b", { children: Z(r.unknown) }), " unknown"] })
2665
+ /* @__PURE__ */ M("span", { children: [/* @__PURE__ */ j("b", { children: Z(r?.live) }), " live"] }),
2666
+ /* @__PURE__ */ M("span", { children: [/* @__PURE__ */ j("b", { children: Z(r?.dormant) }), " dormant"] }),
2667
+ !!r?.unknown && /* @__PURE__ */ M("span", { children: [/* @__PURE__ */ j("b", { children: Z(r.unknown) }), " unknown"] })
2467
2668
  ]
2468
2669
  })
2469
2670
  ]
2470
2671
  }),
2471
- /* @__PURE__ */ j("section", {
2672
+ /* @__PURE__ */ M("section", {
2472
2673
  className: "overview-metric",
2473
2674
  children: [
2474
- /* @__PURE__ */ A("h2", { children: "Requests" }),
2475
- /* @__PURE__ */ j("div", {
2675
+ /* @__PURE__ */ j("h2", { children: "Requests" }),
2676
+ /* @__PURE__ */ M("div", {
2476
2677
  className: "overview-value",
2477
- children: [/* @__PURE__ */ A("strong", {
2678
+ children: [/* @__PURE__ */ j("strong", {
2478
2679
  "aria-label": "Retained requests",
2479
2680
  children: Z(a?.count)
2480
- }), /* @__PURE__ */ A("span", { children: V(n) })]
2681
+ }), /* @__PURE__ */ j("span", { children: H(n) })]
2481
2682
  }),
2482
- /* @__PURE__ */ j("div", {
2683
+ /* @__PURE__ */ M("div", {
2483
2684
  className: "overview-health",
2484
2685
  children: [
2485
- /* @__PURE__ */ j("span", { children: [/* @__PURE__ */ A(Yt, {
2686
+ /* @__PURE__ */ M("span", { children: [/* @__PURE__ */ j(an, {
2486
2687
  value: a?.success,
2487
2688
  kind: "success"
2488
2689
  }), " success"] }),
2489
- /* @__PURE__ */ j("span", { children: [/* @__PURE__ */ A(Yt, {
2690
+ /* @__PURE__ */ M("span", { children: [/* @__PURE__ */ j(an, {
2490
2691
  value: a?.p95,
2491
2692
  kind: "latency"
2492
2693
  }), " p95 latency"] }),
2493
- /* @__PURE__ */ j("span", { children: [/* @__PURE__ */ A("b", { children: $t(a?.queueP95) }), " p95 queue wait"] })
2694
+ /* @__PURE__ */ M("span", { children: [/* @__PURE__ */ j("b", { children: ln(a?.queueP95) }), " p95 queue wait"] })
2494
2695
  ]
2495
2696
  })
2496
2697
  ]
2497
2698
  }),
2498
- /* @__PURE__ */ j("section", {
2699
+ /* @__PURE__ */ M("section", {
2499
2700
  className: "overview-metric",
2500
2701
  children: [
2501
- /* @__PURE__ */ A("h2", { children: "WebSocket connections" }),
2502
- /* @__PURE__ */ j("div", {
2702
+ /* @__PURE__ */ j("h2", { children: "WebSocket connections" }),
2703
+ /* @__PURE__ */ M("div", {
2503
2704
  className: "overview-value",
2504
- children: [/* @__PURE__ */ A("strong", {
2705
+ children: [/* @__PURE__ */ j("strong", {
2505
2706
  "aria-label": "Open WebSocket connections",
2506
2707
  children: Z(r?.connections)
2507
- }), /* @__PURE__ */ A("span", { children: "open" })]
2708
+ }), /* @__PURE__ */ j("span", { children: "open" })]
2508
2709
  }),
2509
- /* @__PURE__ */ j("div", {
2710
+ /* @__PURE__ */ M("div", {
2510
2711
  className: "overview-health",
2511
- children: [/* @__PURE__ */ A("span", { children: "Current inventory snapshot" }), /* @__PURE__ */ A("span", { children: "Active sockets" })]
2712
+ children: [/* @__PURE__ */ j("span", { children: "Current inventory snapshot" }), /* @__PURE__ */ j("span", { children: "Active sockets" })]
2512
2713
  })
2513
2714
  ]
2514
2715
  })
2515
2716
  ]
2516
2717
  });
2517
2718
  }
2518
- function qt({ inventory: e, metrics: t, failed: n, onSelectActor: r }) {
2719
+ function nn({ inventory: e, metrics: t, failed: n, onSelectActor: r }) {
2519
2720
  let [i, o] = a(""), [s, c] = a("all"), l = e?.actors.filter((e) => e.actorName.toLocaleLowerCase().includes(i.trim().toLocaleLowerCase()) && (s === "all" || e[s] > 0)).sort((e, t) => Number(t.live > 0) - Number(e.live > 0)) ?? [];
2520
- return /* @__PURE__ */ j("section", {
2721
+ return /* @__PURE__ */ M("section", {
2521
2722
  "aria-label": "Actor classes",
2522
- children: [/* @__PURE__ */ j("div", {
2723
+ children: [/* @__PURE__ */ M("div", {
2523
2724
  className: "overview-section-heading",
2524
- children: [/* @__PURE__ */ j("h2", { children: ["Actor classes ", /* @__PURE__ */ A("span", { children: Z(e?.actors.length) })] }), /* @__PURE__ */ A(Xt, {})]
2525
- }), /* @__PURE__ */ j("div", {
2725
+ children: [/* @__PURE__ */ M("h2", { children: ["Actor classes ", /* @__PURE__ */ j("span", { children: Z(e?.actors.length) })] }), /* @__PURE__ */ j(on, {})]
2726
+ }), /* @__PURE__ */ M("div", {
2526
2727
  className: "overview-panel",
2527
2728
  children: [
2528
- /* @__PURE__ */ j("div", {
2729
+ /* @__PURE__ */ M("div", {
2529
2730
  className: "overview-filterbar",
2530
- children: [/* @__PURE__ */ j("div", {
2731
+ children: [/* @__PURE__ */ M("div", {
2531
2732
  className: "overview-search",
2532
- children: [/* @__PURE__ */ A(x, { "aria-hidden": "true" }), /* @__PURE__ */ A(B, {
2733
+ children: [/* @__PURE__ */ j(S, { "aria-hidden": "true" }), /* @__PURE__ */ j(V, {
2533
2734
  "aria-label": "Filter actor classes",
2534
2735
  placeholder: "Filter actor classes…",
2535
2736
  value: i,
2536
2737
  onInput: (e) => o(e.currentTarget.value)
2537
2738
  })]
2538
- }), /* @__PURE__ */ j(Be, {
2739
+ }), /* @__PURE__ */ M(Je, {
2539
2740
  "aria-label": "Filter by residency",
2540
2741
  size: "sm",
2541
2742
  value: s,
2542
2743
  onChange: (e) => c(e.target.value),
2543
2744
  children: [
2544
- /* @__PURE__ */ A(U, {
2745
+ /* @__PURE__ */ j(W, {
2545
2746
  value: "all",
2546
2747
  children: "All states"
2547
2748
  }),
2548
- /* @__PURE__ */ A(U, {
2749
+ /* @__PURE__ */ j(W, {
2549
2750
  value: "live",
2550
2751
  children: "Live instances"
2551
2752
  }),
2552
- /* @__PURE__ */ A(U, {
2753
+ /* @__PURE__ */ j(W, {
2553
2754
  value: "dormant",
2554
2755
  children: "Dormant instances"
2555
2756
  }),
2556
- /* @__PURE__ */ A(U, {
2757
+ /* @__PURE__ */ j(W, {
2557
2758
  value: "unknown",
2558
2759
  children: "Unknown residency"
2559
2760
  })
2560
2761
  ]
2561
2762
  })]
2562
2763
  }),
2563
- /* @__PURE__ */ j(W, {
2764
+ /* @__PURE__ */ M(G, {
2564
2765
  className: "overview-table",
2565
2766
  "aria-label": "Actor class metrics",
2566
2767
  containerProps: {
@@ -2570,69 +2771,69 @@ function qt({ inventory: e, metrics: t, failed: n, onSelectActor: r }) {
2570
2771
  tabIndex: 0
2571
2772
  },
2572
2773
  children: [
2573
- /* @__PURE__ */ j("colgroup", { children: [/* @__PURE__ */ A("col", { className: "overview-class-column" }), /* @__PURE__ */ A("col", { span: 6 })] }),
2574
- /* @__PURE__ */ j(G, { children: [/* @__PURE__ */ j(q, {
2774
+ /* @__PURE__ */ M("colgroup", { children: [/* @__PURE__ */ j("col", { className: "overview-class-column" }), /* @__PURE__ */ j("col", { span: 6 })] }),
2775
+ /* @__PURE__ */ M(K, { children: [/* @__PURE__ */ M(J, {
2575
2776
  className: "overview-groups",
2576
2777
  children: [
2577
- /* @__PURE__ */ A(J, {
2778
+ /* @__PURE__ */ j(Y, {
2578
2779
  scope: "colgroup",
2579
2780
  colSpan: 2,
2580
2781
  children: "Actors"
2581
2782
  }),
2582
- /* @__PURE__ */ A(J, {
2783
+ /* @__PURE__ */ j(Y, {
2583
2784
  scope: "colgroup",
2584
2785
  colSpan: 4,
2585
2786
  children: "Requests"
2586
2787
  }),
2587
- /* @__PURE__ */ A(J, {
2788
+ /* @__PURE__ */ j(Y, {
2588
2789
  scope: "colgroup",
2589
2790
  children: "WebSockets"
2590
2791
  })
2591
2792
  ]
2592
- }), /* @__PURE__ */ j(q, { children: [
2593
- /* @__PURE__ */ A(J, {
2793
+ }), /* @__PURE__ */ M(J, { children: [
2794
+ /* @__PURE__ */ j(Y, {
2594
2795
  scope: "col",
2595
2796
  children: "Class"
2596
2797
  }),
2597
- /* @__PURE__ */ A(J, {
2798
+ /* @__PURE__ */ j(Y, {
2598
2799
  scope: "col",
2599
2800
  children: "Instances"
2600
2801
  }),
2601
- /* @__PURE__ */ A(J, {
2802
+ /* @__PURE__ */ j(Y, {
2602
2803
  scope: "col",
2603
2804
  children: "Total"
2604
2805
  }),
2605
- /* @__PURE__ */ A(J, {
2806
+ /* @__PURE__ */ j(Y, {
2606
2807
  scope: "col",
2607
2808
  children: "Success"
2608
2809
  }),
2609
- /* @__PURE__ */ A(J, {
2810
+ /* @__PURE__ */ j(Y, {
2610
2811
  scope: "col",
2611
2812
  children: "p95 latency"
2612
2813
  }),
2613
- /* @__PURE__ */ A(J, {
2814
+ /* @__PURE__ */ j(Y, {
2614
2815
  scope: "col",
2615
2816
  children: "p95 queue wait"
2616
2817
  }),
2617
- /* @__PURE__ */ A(J, {
2818
+ /* @__PURE__ */ j(Y, {
2618
2819
  scope: "col",
2619
2820
  children: "Connected"
2620
2821
  })
2621
2822
  ] })] }),
2622
- /* @__PURE__ */ A(K, { children: l.map((e) => /* @__PURE__ */ A(Jt, {
2823
+ /* @__PURE__ */ j(q, { children: l.map((e) => /* @__PURE__ */ j(rn, {
2623
2824
  actor: e,
2624
- metrics: t && (t.classes.find((t) => t.actorName === e.actorName) ?? Qt(e.actorName)),
2825
+ metrics: t && (t.classes.find((t) => t.actorName === e.actorName) ?? cn(e.actorName)),
2625
2826
  onSelectActor: r
2626
2827
  }, e.actorName)) })
2627
2828
  ]
2628
2829
  }),
2629
- !l.length && /* @__PURE__ */ j("div", {
2830
+ !l.length && /* @__PURE__ */ M("div", {
2630
2831
  className: "overview-empty",
2631
2832
  role: "status",
2632
2833
  children: [
2633
- /* @__PURE__ */ A("strong", { children: e ? e.actors.length ? "No matching actor classes" : "No actors yet" : n ? "Inventory unavailable" : "Loading actor classes…" }),
2634
- /* @__PURE__ */ A("p", { children: e?.actors.length ? "Try another class name or residency state." : "Actor classes appear after deployment." }),
2635
- !!e?.actors.length && /* @__PURE__ */ A(z, {
2834
+ /* @__PURE__ */ j("strong", { children: e ? e.actors.length ? "No matching actor classes" : "No actors yet" : n ? "Inventory unavailable" : "Loading actor classes…" }),
2835
+ /* @__PURE__ */ j("p", { children: e?.actors.length ? "Try another class name or residency state." : "Actor classes appear after deployment." }),
2836
+ !!e?.actors.length && /* @__PURE__ */ j(B, {
2636
2837
  variant: "outline",
2637
2838
  onClick: () => {
2638
2839
  o(""), c("all");
@@ -2645,88 +2846,88 @@ function qt({ inventory: e, metrics: t, failed: n, onSelectActor: r }) {
2645
2846
  })]
2646
2847
  });
2647
2848
  }
2648
- function Jt({ actor: e, metrics: t, onSelectActor: n }) {
2649
- return /* @__PURE__ */ j(q, {
2849
+ function rn({ actor: e, metrics: t, onSelectActor: n }) {
2850
+ return /* @__PURE__ */ M(J, {
2650
2851
  className: "la-clickable-row",
2651
2852
  onClick: () => n(e.actorName),
2652
2853
  children: [
2653
- /* @__PURE__ */ A(Y, { children: /* @__PURE__ */ A(z, {
2854
+ /* @__PURE__ */ j(X, { children: /* @__PURE__ */ j(B, {
2654
2855
  variant: "ghost",
2655
2856
  type: "button",
2656
2857
  className: "overview-class-link",
2657
2858
  "aria-label": `Inspect ${e.actorName}`,
2658
- children: /* @__PURE__ */ A("span", {
2859
+ children: /* @__PURE__ */ j("span", {
2659
2860
  title: e.actorName,
2660
2861
  children: e.actorName
2661
2862
  })
2662
2863
  }) }),
2663
- /* @__PURE__ */ A(Y, { children: Z(e.live + e.dormant + e.unknown) }),
2664
- /* @__PURE__ */ A(Y, { children: Z(t?.count) }),
2665
- /* @__PURE__ */ A(Y, { children: /* @__PURE__ */ A(Yt, {
2864
+ /* @__PURE__ */ j(X, { children: Z(e.live + e.dormant + e.unknown) }),
2865
+ /* @__PURE__ */ j(X, { children: Z(t?.count) }),
2866
+ /* @__PURE__ */ j(X, { children: /* @__PURE__ */ j(an, {
2666
2867
  value: t?.success,
2667
2868
  kind: "success"
2668
2869
  }) }),
2669
- /* @__PURE__ */ A(Y, { children: /* @__PURE__ */ A(Yt, {
2870
+ /* @__PURE__ */ j(X, { children: /* @__PURE__ */ j(an, {
2670
2871
  value: t?.p95,
2671
2872
  kind: "latency"
2672
2873
  }) }),
2673
- /* @__PURE__ */ A(Y, { children: $t(t?.queueP95) }),
2674
- /* @__PURE__ */ A(Y, { children: Z(e.instances.reduce((e, t) => e + t.connections.length, 0)) })
2874
+ /* @__PURE__ */ j(X, { children: ln(t?.queueP95) }),
2875
+ /* @__PURE__ */ j(X, { children: Z(e.instances.reduce((e, t) => e + t.connections.length, 0)) })
2675
2876
  ]
2676
2877
  });
2677
2878
  }
2678
- function Yt({ value: e, kind: t }) {
2679
- if (e == null) return /* @__PURE__ */ A("span", {
2879
+ function an({ value: e, kind: t }) {
2880
+ if (e == null) return /* @__PURE__ */ j("span", {
2680
2881
  title: "No retained execution attempts",
2681
2882
  children: "—"
2682
2883
  });
2683
2884
  let n = t === "success" ? e < 95 ? "bad" : e < 99 ? "warn" : "good" : e > 100 ? "bad" : "good";
2684
- return /* @__PURE__ */ j("span", {
2885
+ return /* @__PURE__ */ M("span", {
2685
2886
  className: `overview-signal signal-${n}`,
2686
2887
  title: n === "bad" ? "Critical threshold breached" : n === "warn" ? "Warning threshold breached" : "Within threshold",
2687
- children: [n !== "good" && /* @__PURE__ */ A("span", {
2888
+ children: [n !== "good" && /* @__PURE__ */ j("span", {
2688
2889
  "aria-hidden": "true",
2689
2890
  children: n === "warn" ? "!" : "×"
2690
- }), t === "success" ? `${e.toLocaleString(void 0, { maximumFractionDigits: 2 })}%` : $t(e)]
2891
+ }), t === "success" ? `${e.toLocaleString(void 0, { maximumFractionDigits: 2 })}%` : ln(e)]
2691
2892
  });
2692
2893
  }
2693
- function Xt() {
2694
- return /* @__PURE__ */ j("details", {
2894
+ function on() {
2895
+ return /* @__PURE__ */ M("details", {
2695
2896
  className: "overview-thresholds",
2696
- children: [/* @__PURE__ */ j("summary", { children: [/* @__PURE__ */ j("span", {
2897
+ children: [/* @__PURE__ */ M("summary", { children: [/* @__PURE__ */ M("span", {
2697
2898
  className: "threshold-dots",
2698
2899
  "aria-hidden": "true",
2699
2900
  children: [
2700
- /* @__PURE__ */ A("i", {}),
2701
- /* @__PURE__ */ A("i", {}),
2702
- /* @__PURE__ */ A("i", {})
2901
+ /* @__PURE__ */ j("i", {}),
2902
+ /* @__PURE__ */ j("i", {}),
2903
+ /* @__PURE__ */ j("i", {})
2703
2904
  ]
2704
- }), "Thresholds"] }), /* @__PURE__ */ j("div", { children: [
2705
- /* @__PURE__ */ A("strong", { children: "Display thresholds" }),
2706
- /* @__PURE__ */ A("p", { children: "Success: warning below 99%; critical below 95%." }),
2707
- /* @__PURE__ */ A("p", { children: "Latency: critical when p95 exceeds 100 ms." }),
2708
- /* @__PURE__ */ A("p", { children: "Reroutes are excluded from success and latency. Queue wait has no health threshold." })
2905
+ }), "Thresholds"] }), /* @__PURE__ */ M("div", { children: [
2906
+ /* @__PURE__ */ j("strong", { children: "Display thresholds" }),
2907
+ /* @__PURE__ */ j("p", { children: "Success: warning below 99%; critical below 95%." }),
2908
+ /* @__PURE__ */ j("p", { children: "Latency: critical when p95 exceeds 100 ms." }),
2909
+ /* @__PURE__ */ j("p", { children: "Reroutes are excluded from success and latency. Queue wait has no health threshold." })
2709
2910
  ] })]
2710
2911
  });
2711
2912
  }
2712
- function Zt({ page: e, range: t, saved: n }) {
2713
- return /* @__PURE__ */ j("div", {
2913
+ function sn({ page: e, range: t, saved: n }) {
2914
+ return /* @__PURE__ */ M("div", {
2714
2915
  className: "overview-data-scope",
2715
2916
  children: [
2716
- /* @__PURE__ */ A("p", { children: n ? `Request metrics cover every retained request ${V(t)}${t.kind === "relative" ? " (refreshed every 10 seconds)" : ""}. Inventory counts are current snapshots.` : `Request metrics cover the latest ${e?.capacity ?? 500} retained traces within the selected window. Inventory counts are current snapshots.` }),
2717
- !!e?.dropped && /* @__PURE__ */ j("p", {
2917
+ /* @__PURE__ */ j("p", { children: n ? `Request metrics cover every retained request ${H(t)}${t.kind === "relative" ? " (refreshed every 10 seconds)" : ""}. Inventory counts are current snapshots.` : `Request metrics cover the latest ${e?.capacity ?? 500} retained traces within the selected window. Inventory counts are current snapshots.` }),
2918
+ !!e?.dropped && /* @__PURE__ */ M("p", {
2718
2919
  role: "alert",
2719
2920
  children: [Z(e.dropped), " traces were not delivered. Request metrics are incomplete."]
2720
2921
  }),
2721
- e?.persistenceFailed && /* @__PURE__ */ A("p", {
2922
+ e?.persistenceFailed && /* @__PURE__ */ j("p", {
2722
2923
  role: "alert",
2723
2924
  children: "Some request events could not be saved. This history may be incomplete."
2724
2925
  }),
2725
- !!e?.evicted && /* @__PURE__ */ A("p", { children: "Earlier traces have expired; these metrics do not represent the full time window." })
2926
+ !!e?.evicted && /* @__PURE__ */ j("p", { children: "Earlier traces have expired; these metrics do not represent the full time window." })
2726
2927
  ]
2727
2928
  });
2728
2929
  }
2729
- function Qt(e) {
2930
+ function cn(e) {
2730
2931
  return {
2731
2932
  actorName: e,
2732
2933
  count: 0,
@@ -2738,23 +2939,23 @@ function Qt(e) {
2738
2939
  function Z(e) {
2739
2940
  return e === void 0 ? "—" : e.toLocaleString();
2740
2941
  }
2741
- function $t(e) {
2942
+ function ln(e) {
2742
2943
  return e == null ? "—" : `${e.toLocaleString(void 0, { maximumFractionDigits: 1 })} ms`;
2743
2944
  }
2744
2945
  //#endregion
2745
2946
  //#region src/socket-sessions.ts
2746
- function en(e) {
2747
- if (!Array.isArray(e) || !e.every((e) => !!e && typeof e == "object" && ln(e))) throw Error("Invalid WebSocket session response");
2947
+ function un(e) {
2948
+ if (!Array.isArray(e) || !e.every((e) => !!e && typeof e == "object" && vn(e))) throw Error("Invalid WebSocket session response");
2748
2949
  return e;
2749
2950
  }
2750
- function tn(e, t, n) {
2951
+ function dn(e, t, n) {
2751
2952
  return JSON.stringify([
2752
2953
  e,
2753
2954
  t,
2754
2955
  n
2755
2956
  ]);
2756
2957
  }
2757
- function nn(e, t, n = /* @__PURE__ */ new Map()) {
2958
+ function fn(e, t, n = /* @__PURE__ */ new Map()) {
2758
2959
  let r = /* @__PURE__ */ new Map();
2759
2960
  for (let e of t?.actors ?? []) for (let t of e.instances) for (let n of t.connections) r.set(JSON.stringify([
2760
2961
  e.actorName,
@@ -2781,7 +2982,7 @@ function nn(e, t, n = /* @__PURE__ */ new Map()) {
2781
2982
  e.connectionId
2782
2983
  ])));
2783
2984
  for (let e of t?.actors ?? []) for (let t of e.instances) for (let r of t.connections) {
2784
- let o = tn(e.actorName, t.actorId, r.id);
2985
+ let o = dn(e.actorName, t.actorId, r.id);
2785
2986
  if (a.has(o)) continue;
2786
2987
  let s = n.get(o);
2787
2988
  i.unshift({
@@ -2801,7 +3002,7 @@ function nn(e, t, n = /* @__PURE__ */ new Map()) {
2801
3002
  }
2802
3003
  return i;
2803
3004
  }
2804
- function rn(e, t) {
3005
+ function pn(e, t) {
2805
3006
  if (e.openedAtMs === null) return null;
2806
3007
  let n = e.status === "closed" ? e.closedAtMs : e.status === "open" ? Math.max(t, e.openedAtMs) : e.lastSeenMs;
2807
3008
  return {
@@ -2809,19 +3010,19 @@ function rn(e, t) {
2809
3010
  lowerBound: e.status === "lost"
2810
3011
  };
2811
3012
  }
2812
- function an(e, t) {
2813
- let n = e.map((e) => rn(e, t)).filter((e) => e !== null && !e.lowerBound), r = e.reduce((e, t) => e + t.messages, 0);
3013
+ function mn(e, t) {
3014
+ let n = e.map((e) => pn(e, t)).filter((e) => e !== null && !e.lowerBound), r = e.reduce((e, t) => e + t.messages, 0);
2814
3015
  return {
2815
3016
  total: e.length,
2816
3017
  open: e.filter((e) => e.status === "open").length,
2817
3018
  lost: e.filter((e) => e.status === "lost").length,
2818
- median: cn(n.map((e) => e.ms), .5),
2819
- p95: cn(n.map((e) => e.ms), .95),
3019
+ median: _n(n.map((e) => e.ms), .5),
3020
+ p95: _n(n.map((e) => e.ms), .95),
2820
3021
  messages: r,
2821
3022
  messagesPerSession: e.length ? r / e.length : null
2822
3023
  };
2823
3024
  }
2824
- function on(e) {
3025
+ function hn(e) {
2825
3026
  if (e < 1e3) return `${e.toLocaleString(void 0, { maximumFractionDigits: 0 })} ms`;
2826
3027
  if (e < 6e4) return `${(e / 1e3).toLocaleString(void 0, { maximumFractionDigits: 1 })} s`;
2827
3028
  let t = Math.floor(e / 6e4);
@@ -2829,7 +3030,7 @@ function on(e) {
2829
3030
  let n = Math.floor(t / 60);
2830
3031
  return n < 24 ? `${n}h ${t % 60}m` : `${Math.floor(n / 24)}d ${n % 24}h`;
2831
3032
  }
2832
- function sn(e, t = 3) {
3033
+ function gn(e, t = 3) {
2833
3034
  if (e == null) return null;
2834
3035
  if (typeof e != "object") return String(e);
2835
3036
  let n = Array.isArray(e) ? e.map((e, t) => [String(t), e]) : Object.entries(e);
@@ -2837,10 +3038,10 @@ function sn(e, t = 3) {
2837
3038
  let r = n.slice(0, t).map(([e, t]) => `${e}: ${typeof t == "string" ? t : JSON.stringify(t)}`);
2838
3039
  return n.length > t ? `${r.join(" · ")} · +${n.length - t}` : r.join(" · ");
2839
3040
  }
2840
- function cn(e, t) {
3041
+ function _n(e, t) {
2841
3042
  return e.length ? e.sort((e, t) => e - t)[Math.max(0, Math.ceil(e.length * t) - 1)] : null;
2842
3043
  }
2843
- function ln(e) {
3044
+ function vn(e) {
2844
3045
  return typeof e.connectionId == "string" && typeof e.actorName == "string" && typeof e.actorId == "string" && (e.hostId === null || typeof e.hostId == "string") && [
2845
3046
  e.openedAtMs,
2846
3047
  e.closedAtMs,
@@ -2849,7 +3050,7 @@ function ln(e) {
2849
3050
  }
2850
3051
  //#endregion
2851
3052
  //#region src/SocketTimeline.tsx
2852
- var un = 18, dn = 8, fn = 40, Q = 6e4, pn = 60 * Q, mn = 24 * pn, hn = [
3053
+ var yn = 18, bn = 8, xn = 40, Q = 6e4, Sn = 60 * Q, Cn = 24 * Sn, wn = [
2853
3054
  1e3,
2854
3055
  2e3,
2855
3056
  5e3,
@@ -2862,17 +3063,17 @@ var un = 18, dn = 8, fn = 40, Q = 6e4, pn = 60 * Q, mn = 24 * pn, hn = [
2862
3063
  10 * Q,
2863
3064
  15 * Q,
2864
3065
  30 * Q,
2865
- pn,
2866
- 2 * pn,
2867
- 3 * pn,
2868
- 6 * pn,
2869
- 12 * pn,
2870
- mn,
2871
- 2 * mn,
2872
- 7 * mn
3066
+ Sn,
3067
+ 2 * Sn,
3068
+ 3 * Sn,
3069
+ 6 * Sn,
3070
+ 12 * Sn,
3071
+ Cn,
3072
+ 2 * Cn,
3073
+ 7 * Cn
2873
3074
  ];
2874
- function gn({ sessions: e, start: t, end: n, endLabel: r = "now", selected: i, onSelect: o }) {
2875
- let [s, c] = a(), l = yn(e, t, n), u = l.slice(0, fn), d = Math.max(1, n - t), f = Cn(t, n), p = wn(d), m = (e) => `${(Math.min(Math.max(e, t), n) - t) / d * 100}%`, h = (e, t) => {
3075
+ function Tn({ sessions: e, start: t, end: n, endLabel: r = "now", selected: i, onSelect: o }) {
3076
+ let [s, c] = a(), l = On(e, t, n), u = l.slice(0, xn), d = Math.max(1, n - t), f = Mn(t, n), p = Nn(d), m = (e) => `${(Math.min(Math.max(e, t), n) - t) / d * 100}%`, h = (e, t) => {
2876
3077
  let n = t.getBoundingClientRect(), r = t.closest(".socket-timeline").getBoundingClientRect(), i = n.top - r.top < 150;
2877
3078
  c({
2878
3079
  session: e,
@@ -2881,50 +3082,50 @@ function gn({ sessions: e, start: t, end: n, endLabel: r = "now", selected: i, o
2881
3082
  below: i
2882
3083
  });
2883
3084
  };
2884
- return /* @__PURE__ */ j("div", {
3085
+ return /* @__PURE__ */ M("div", {
2885
3086
  className: "socket-timeline",
2886
3087
  role: "group",
2887
3088
  "aria-label": "Connection timeline",
2888
3089
  onMouseLeave: () => c(void 0),
2889
3090
  children: [
2890
- /* @__PURE__ */ j("div", {
3091
+ /* @__PURE__ */ M("div", {
2891
3092
  className: "socket-timeline-axis",
2892
3093
  "aria-hidden": "true",
2893
- children: [/* @__PURE__ */ A("span", {}), /* @__PURE__ */ j("div", { children: [f.map((e) => /* @__PURE__ */ A("span", {
3094
+ children: [/* @__PURE__ */ j("span", {}), /* @__PURE__ */ M("div", { children: [f.map((e) => /* @__PURE__ */ j("span", {
2894
3095
  style: { left: m(e) },
2895
- children: Tn(e, p)
2896
- }, e)), /* @__PURE__ */ A("span", {
3096
+ children: Pn(e, p)
3097
+ }, e)), /* @__PURE__ */ j("span", {
2897
3098
  className: "socket-timeline-now",
2898
3099
  children: r
2899
3100
  })] })]
2900
3101
  }),
2901
- /* @__PURE__ */ j("div", {
3102
+ /* @__PURE__ */ M("div", {
2902
3103
  className: "socket-timeline-body",
2903
3104
  children: [
2904
- /* @__PURE__ */ A("div", {
3105
+ /* @__PURE__ */ j("div", {
2905
3106
  className: "socket-timeline-grid",
2906
3107
  "aria-hidden": "true",
2907
- children: f.map((e) => /* @__PURE__ */ A("i", { style: { left: m(e) } }, e))
3108
+ children: f.map((e) => /* @__PURE__ */ j("i", { style: { left: m(e) } }, e))
2908
3109
  }),
2909
- u.map((e) => /* @__PURE__ */ j("div", {
3110
+ u.map((e) => /* @__PURE__ */ M("div", {
2910
3111
  className: "socket-timeline-row",
2911
- children: [/* @__PURE__ */ j("div", {
3112
+ children: [/* @__PURE__ */ M("div", {
2912
3113
  className: "socket-timeline-label",
2913
3114
  title: `${e.actorName} / ${e.actorId}`,
2914
- children: [/* @__PURE__ */ A("span", { children: e.actorName }), /* @__PURE__ */ A("strong", { children: e.actorId })]
2915
- }), /* @__PURE__ */ A("div", {
3115
+ children: [/* @__PURE__ */ j("span", { children: e.actorName }), /* @__PURE__ */ j("strong", { children: e.actorId })]
3116
+ }), /* @__PURE__ */ j("div", {
2916
3117
  className: "socket-timeline-lanes",
2917
- style: { height: e.rows.length * un + 16 },
2918
- children: e.rows.flatMap((e, t) => e.map((e) => /* @__PURE__ */ A("button", {
3118
+ style: { height: e.rows.length * yn + 16 },
3119
+ children: e.rows.flatMap((e, t) => e.map((e) => /* @__PURE__ */ j("button", {
2919
3120
  type: "button",
2920
3121
  className: `socket-bar socket-bar-${e.session.status}${e.openEnded ? " socket-bar-open-ended" : ""}${e.unknownStart ? " socket-bar-unknown-start" : ""}`,
2921
3122
  "data-state": i === e.session ? "selected" : void 0,
2922
3123
  style: {
2923
3124
  left: m(e.from),
2924
3125
  width: `${(e.to - e.from) / d * 100}%`,
2925
- top: dn + t * un
3126
+ top: bn + t * yn
2926
3127
  },
2927
- "aria-label": kn(e.session, n),
3128
+ "aria-label": Rn(e.session, n),
2928
3129
  onClick: (t) => o(e.session, t.currentTarget),
2929
3130
  onMouseEnter: (t) => h(e.session, t.currentTarget),
2930
3131
  onFocus: (t) => h(e.session, t.currentTarget),
@@ -2932,62 +3133,62 @@ function gn({ sessions: e, start: t, end: n, endLabel: r = "now", selected: i, o
2932
3133
  }, e.session.connectionId)))
2933
3134
  })]
2934
3135
  }, e.key)),
2935
- l.length > fn && /* @__PURE__ */ j("p", {
3136
+ l.length > xn && /* @__PURE__ */ M("p", {
2936
3137
  className: "socket-timeline-more",
2937
3138
  children: [
2938
- (l.length - fn).toLocaleString(),
3139
+ (l.length - xn).toLocaleString(),
2939
3140
  " more ",
2940
- l.length - fn === 1 ? "instance is" : "instances are",
3141
+ l.length - xn === 1 ? "instance is" : "instances are",
2941
3142
  " listed in the table below."
2942
3143
  ]
2943
3144
  })
2944
3145
  ]
2945
3146
  }),
2946
- s && /* @__PURE__ */ j("div", {
3147
+ s && /* @__PURE__ */ M("div", {
2947
3148
  role: "tooltip",
2948
3149
  className: `socket-tooltip${s.below ? " socket-tooltip-below" : ""}`,
2949
3150
  style: {
2950
3151
  left: s.left,
2951
3152
  top: s.top
2952
3153
  },
2953
- children: [/* @__PURE__ */ A(vn, { metadata: s.session.metadata }), /* @__PURE__ */ j("dl", { children: [
2954
- /* @__PURE__ */ A("dt", { children: "Connection" }),
2955
- /* @__PURE__ */ A("dd", { children: On(s.session.connectionId) }),
2956
- /* @__PURE__ */ A("dt", { children: "Instance" }),
2957
- /* @__PURE__ */ j("dd", { children: [
3154
+ children: [/* @__PURE__ */ j(Dn, { metadata: s.session.metadata }), /* @__PURE__ */ M("dl", { children: [
3155
+ /* @__PURE__ */ j("dt", { children: "Connection" }),
3156
+ /* @__PURE__ */ j("dd", { children: Ln(s.session.connectionId) }),
3157
+ /* @__PURE__ */ j("dt", { children: "Instance" }),
3158
+ /* @__PURE__ */ M("dd", { children: [
2958
3159
  s.session.actorName,
2959
3160
  " / ",
2960
3161
  s.session.actorId
2961
3162
  ] }),
2962
- /* @__PURE__ */ A("dt", { children: "Status" }),
2963
- /* @__PURE__ */ A("dd", { children: En(s.session.status) }),
2964
- /* @__PURE__ */ A("dt", { children: "Opened" }),
2965
- /* @__PURE__ */ A("dd", { children: s.session.openedAtMs === null ? "Before retained history" : `${s.session.estimatedStart ? "≈ " : ""}${new Date(s.session.openedAtMs).toLocaleTimeString([], { hour12: !1 })}` }),
2966
- /* @__PURE__ */ A("dt", { children: "Duration" }),
2967
- /* @__PURE__ */ A("dd", { children: Dn(s.session, n) }),
2968
- /* @__PURE__ */ A("dt", { children: "Messages" }),
2969
- /* @__PURE__ */ A("dd", { children: s.session.messages.toLocaleString() })
3163
+ /* @__PURE__ */ j("dt", { children: "Status" }),
3164
+ /* @__PURE__ */ j("dd", { children: Fn(s.session.status) }),
3165
+ /* @__PURE__ */ j("dt", { children: "Opened" }),
3166
+ /* @__PURE__ */ j("dd", { children: s.session.openedAtMs === null ? "Before retained history" : `${s.session.estimatedStart ? "≈ " : ""}${new Date(s.session.openedAtMs).toLocaleTimeString([], { hour12: !1 })}` }),
3167
+ /* @__PURE__ */ j("dt", { children: "Duration" }),
3168
+ /* @__PURE__ */ j("dd", { children: In(s.session, n) }),
3169
+ /* @__PURE__ */ j("dt", { children: "Messages" }),
3170
+ /* @__PURE__ */ j("dd", { children: s.session.messages.toLocaleString() })
2970
3171
  ] })]
2971
3172
  })
2972
3173
  ]
2973
3174
  });
2974
3175
  }
2975
- var _n = 4;
2976
- function vn({ metadata: e }) {
3176
+ var En = 4;
3177
+ function Dn({ metadata: e }) {
2977
3178
  if (e == null) return null;
2978
3179
  let t = typeof e == "object" ? Array.isArray(e) ? e.map((e, t) => [String(t), e]) : Object.entries(e) : [["value", e]];
2979
- return t.length ? /* @__PURE__ */ j("dl", {
3180
+ return t.length ? /* @__PURE__ */ M("dl", {
2980
3181
  className: "socket-tooltip-metadata",
2981
3182
  "aria-label": "Connection metadata",
2982
- children: [t.slice(0, _n).map(([e, t]) => /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("dt", { children: e }), /* @__PURE__ */ A("dd", { children: typeof t == "string" ? t : JSON.stringify(t) })] }, e)), t.length > _n && /* @__PURE__ */ j("p", { children: [
3183
+ children: [t.slice(0, En).map(([e, t]) => /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j("dt", { children: e }), /* @__PURE__ */ j("dd", { children: typeof t == "string" ? t : JSON.stringify(t) })] }, e)), t.length > En && /* @__PURE__ */ M("p", { children: [
2983
3184
  "+",
2984
- t.length - _n,
3185
+ t.length - En,
2985
3186
  " more in details"
2986
3187
  ] })]
2987
3188
  }) : null;
2988
3189
  }
2989
- function yn(e, t, n) {
2990
- let r = /* @__PURE__ */ new Map(), i = e.map((e) => bn(e, t, n)).filter((e) => e.to > t).sort((e, t) => e.from - t.from || e.to - t.to);
3190
+ function On(e, t, n) {
3191
+ let r = /* @__PURE__ */ new Map(), i = e.map((e) => kn(e, t, n)).filter((e) => e.to > t).sort((e, t) => e.from - t.from || e.to - t.to);
2991
3192
  for (let e of i) {
2992
3193
  let i = `${e.session.actorName}${e.session.actorId}`, a = r.get(i) ?? {
2993
3194
  key: i,
@@ -2996,38 +3197,38 @@ function yn(e, t, n) {
2996
3197
  rows: []
2997
3198
  };
2998
3199
  r.set(i, a);
2999
- let o = a.rows.find((r) => r.at(-1).to + xn(t, n) <= e.from);
3200
+ let o = a.rows.find((r) => r.at(-1).to + An(t, n) <= e.from);
3000
3201
  o ? o.push(e) : a.rows.push([e]);
3001
3202
  }
3002
- return [...r.values()].sort((e, t) => Sn(t) - Sn(e));
3203
+ return [...r.values()].sort((e, t) => jn(t) - jn(e));
3003
3204
  }
3004
- function bn(e, t, n) {
3205
+ function kn(e, t, n) {
3005
3206
  let r = e.openedAtMs ?? (e.status === "open" ? t : e.lastSeenMs ?? t), i = e.status === "closed" ? e.closedAtMs : e.status === "open" ? n : e.lastSeenMs ?? r;
3006
3207
  return {
3007
3208
  session: e,
3008
3209
  from: Math.max(t, r),
3009
- to: Math.max(Math.max(t, r) + xn(t, n), Math.min(n, i)),
3210
+ to: Math.max(Math.max(t, r) + An(t, n), Math.min(n, i)),
3010
3211
  openEnded: e.status !== "closed",
3011
3212
  unknownStart: e.openedAtMs === null
3012
3213
  };
3013
3214
  }
3014
- function xn(e, t) {
3215
+ function An(e, t) {
3015
3216
  return Math.max(1, (t - e) / 160);
3016
3217
  }
3017
- function Sn(e) {
3218
+ function jn(e) {
3018
3219
  return Math.max(...e.rows.flat().map((e) => e.to));
3019
3220
  }
3020
- function Cn(e, t) {
3021
- let n = wn(Math.max(1, t - e)), r = [];
3221
+ function Mn(e, t) {
3222
+ let n = Nn(Math.max(1, t - e)), r = [];
3022
3223
  for (let i = Math.floor(e / n) * n + n; i < t - n * .35; i += n) r.push(i);
3023
3224
  return r;
3024
3225
  }
3025
- function wn(e) {
3026
- return hn.find((t) => e / t <= 9) ?? hn.at(-1);
3226
+ function Nn(e) {
3227
+ return wn.find((t) => e / t <= 9) ?? wn.at(-1);
3027
3228
  }
3028
- function Tn(e, t) {
3229
+ function Pn(e, t) {
3029
3230
  let n = new Date(e);
3030
- return t >= mn ? n.toLocaleDateString([], {
3231
+ return t >= Cn ? n.toLocaleDateString([], {
3031
3232
  month: "short",
3032
3233
  day: "numeric"
3033
3234
  }) : t >= Q ? n.toLocaleTimeString([], {
@@ -3036,24 +3237,24 @@ function Tn(e, t) {
3036
3237
  hour12: !1
3037
3238
  }) : n.toLocaleTimeString([], { hour12: !1 });
3038
3239
  }
3039
- function En(e) {
3240
+ function Fn(e) {
3040
3241
  return e === "open" ? "Open" : e === "closed" ? "Closed" : "Lost";
3041
3242
  }
3042
- function Dn(e, t) {
3043
- let n = rn(e, t);
3044
- return n ? `${n.lowerBound ? "≥ " : ""}${on(n.ms)}` : "Unknown";
3243
+ function In(e, t) {
3244
+ let n = pn(e, t);
3245
+ return n ? `${n.lowerBound ? "≥ " : ""}${hn(n.ms)}` : "Unknown";
3045
3246
  }
3046
- function On(e) {
3247
+ function Ln(e) {
3047
3248
  return e.length > 14 ? `${e.slice(0, 8)}…${e.slice(-4)}` : e;
3048
3249
  }
3049
- function kn(e, t) {
3050
- let n = sn(e.metadata);
3051
- return `${En(e.status)} connection ${On(e.connectionId)}${n === null ? "" : ` (${n})`} on ${e.actorName} ${e.actorId}, ${Dn(e, t)}`;
3250
+ function Rn(e, t) {
3251
+ let n = gn(e.metadata);
3252
+ return `${Fn(e.status)} connection ${Ln(e.connectionId)}${n === null ? "" : ` (${n})`} on ${e.actorName} ${e.actorId}, ${In(e, t)}`;
3052
3253
  }
3053
3254
  //#endregion
3054
3255
  //#region src/socket-history.ts
3055
- function An(e, t) {
3056
- let n = Xe(e, t, e.listWebSockets, 5e3);
3256
+ function zn(e, t) {
3257
+ let n = it(e, t, e.listWebSockets, 5e3);
3057
3258
  return {
3058
3259
  ...n,
3059
3260
  rows: n.value,
@@ -3062,52 +3263,52 @@ function An(e, t) {
3062
3263
  }
3063
3264
  //#endregion
3064
3265
  //#region src/WebSocketObserver.tsx
3065
- function jn({ client: e, onSelectActor: n, timeRange: o, onTimeRangeChange: s }) {
3066
- let { inventory: c, failed: l, retry: u } = qe(e), [d, f] = a(De), p = o ?? d, m = s ?? f, [h, g] = a(Date.now), [_, v] = a(""), [y, b] = a("all"), [x, S] = a(), C = i(null), w = i(null);
3266
+ function Bn({ client: e, onSelectActor: n, timeRange: o, onTimeRangeChange: s }) {
3267
+ let { inventory: c, failed: l, retry: u } = tt(e), [d, f] = a(Fe), p = o ?? d, m = s ?? f, [h, g] = a(Date.now), [_, v] = a(""), [y, ee] = a("all"), [b, x] = a(), S = i(null), C = i(null);
3067
3268
  t(() => {
3068
3269
  let e = setInterval(() => g(Date.now()), 5e3);
3069
3270
  return () => clearInterval(e);
3070
3271
  }, []);
3071
- let T = Oe(p, h), E = T.toMs ?? h, D = An(e, T), O = In(c, D.retry), M = r(() => nn(D.rows ?? [], c, O), [
3072
- D.rows,
3272
+ let w = Ie(p, h), T = w.toMs ?? h, E = zn(e, w), D = Gn(c, E.retry), O = r(() => fn(E.rows ?? [], c, D), [
3273
+ E.rows,
3073
3274
  c,
3074
- O
3075
- ]), N = !!c || l, P = _.trim().toLocaleLowerCase(), F = M.filter((e) => (y === "all" || e.status === y) && (!P || `${e.connectionId} ${e.actorName} ${e.actorId} ${e.hostId ?? ""}`.toLocaleLowerCase().includes(P))).sort((e, t) => Number(t.status === "open") - Number(e.status === "open") || (t.openedAtMs ?? t.lastSeenMs ?? Infinity) - (e.openedAtMs ?? e.lastSeenMs ?? Infinity)), I = an(M, h), L = Math.max(0, ...M.filter((e) => e.status !== "open").map((e) => rn(e, h)?.ms ?? 0)) || I.p95, te = Fn(F, T.fromMs, E), ne = r(() => Ln(M, c), [M, c]);
3076
- return t(() => S(void 0), [e, p]), /* @__PURE__ */ j("section", {
3077
- ref: C,
3275
+ D
3276
+ ]), k = !!c || l, N = _.trim().toLocaleLowerCase(), P = O.filter((e) => (y === "all" || e.status === y) && (!N || `${e.connectionId} ${e.actorName} ${e.actorId} ${e.hostId ?? ""}`.toLocaleLowerCase().includes(N))).sort((e, t) => Number(t.status === "open") - Number(e.status === "open") || (t.openedAtMs ?? t.lastSeenMs ?? Infinity) - (e.openedAtMs ?? e.lastSeenMs ?? Infinity)), F = mn(O, h), I = Math.max(0, ...O.filter((e) => e.status !== "open").map((e) => pn(e, h)?.ms ?? 0)) || F.p95, ne = Wn(P, w.fromMs, T), L = r(() => Kn(O, c), [O, c]);
3277
+ return t(() => x(void 0), [e, p]), /* @__PURE__ */ M("section", {
3278
+ ref: S,
3078
3279
  className: "la-observer overview websockets",
3079
3280
  "aria-label": "WebSocket observer",
3080
3281
  children: [
3081
- /* @__PURE__ */ j("div", {
3282
+ /* @__PURE__ */ M("div", {
3082
3283
  className: "overview-heading",
3083
- children: [/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("h1", { children: "WebSockets" }), /* @__PURE__ */ A("p", { children: N ? `${I.open.toLocaleString()} open now${D.supported ? ` · ${I.total.toLocaleString()} ${I.total === 1 ? "session" : "sessions"} ${V(p)}` : ""}` : "Connecting to inventory…" })] }), /* @__PURE__ */ j("div", {
3284
+ children: [/* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j("h1", { children: "WebSockets" }), /* @__PURE__ */ j("p", { children: k ? `${F.open.toLocaleString()} open now${E.supported ? ` · ${F.total.toLocaleString()} ${F.total === 1 ? "session" : "sessions"} ${H(p)}` : ""}` : "Connecting to inventory…" })] }), /* @__PURE__ */ M("div", {
3084
3285
  className: "overview-controls",
3085
3286
  children: [
3086
- /* @__PURE__ */ A("span", {
3287
+ /* @__PURE__ */ j("span", {
3087
3288
  className: "overview-updated",
3088
- children: D.failed ? "History reconnecting…" : D.updatedAt ? /* @__PURE__ */ j(k, { children: ["Updated ", /* @__PURE__ */ A("time", {
3089
- dateTime: new Date(D.updatedAt).toISOString(),
3090
- children: new Date(D.updatedAt).toLocaleTimeString([], { hour12: !1 })
3289
+ children: E.failed ? "History reconnecting…" : E.updatedAt ? /* @__PURE__ */ M(A, { children: ["Updated ", /* @__PURE__ */ j("time", {
3290
+ dateTime: new Date(E.updatedAt).toISOString(),
3291
+ children: new Date(E.updatedAt).toLocaleTimeString([], { hour12: !1 })
3091
3292
  })] }) : null
3092
3293
  }),
3093
- D.supported && /* @__PURE__ */ A(Me, {
3294
+ E.supported && /* @__PURE__ */ j(Be, {
3094
3295
  value: p,
3095
3296
  onChange: m,
3096
3297
  className: "overview-range"
3097
3298
  }),
3098
- /* @__PURE__ */ A(z, {
3299
+ /* @__PURE__ */ j(B, {
3099
3300
  variant: "outline",
3100
3301
  size: "icon",
3101
3302
  "aria-label": "Refresh connections",
3102
3303
  onClick: () => {
3103
- u(), D.retry();
3304
+ u(), E.retry();
3104
3305
  },
3105
- children: /* @__PURE__ */ A(ee, { "aria-hidden": "true" })
3306
+ children: /* @__PURE__ */ j(te, { "aria-hidden": "true" })
3106
3307
  })
3107
3308
  ]
3108
3309
  })]
3109
3310
  }),
3110
- l && /* @__PURE__ */ j("p", {
3311
+ l && /* @__PURE__ */ M("p", {
3111
3312
  role: "alert",
3112
3313
  className: "overview-alert",
3113
3314
  children: [
@@ -3117,90 +3318,90 @@ function jn({ client: e, onSelectActor: n, timeRange: o, onTimeRangeChange: s })
3117
3318
  " Retrying automatically."
3118
3319
  ]
3119
3320
  }),
3120
- D.failed && /* @__PURE__ */ j("p", {
3321
+ E.failed && /* @__PURE__ */ M("p", {
3121
3322
  role: "alert",
3122
3323
  className: "overview-alert",
3123
3324
  children: [
3124
3325
  "Connection history unavailable. ",
3125
- D.rows ? "Showing the last loaded sessions." : "Only currently open connections are shown.",
3326
+ E.rows ? "Showing the last loaded sessions." : "Only currently open connections are shown.",
3126
3327
  " Retrying automatically."
3127
3328
  ]
3128
3329
  }),
3129
- /* @__PURE__ */ A(Mn, {
3130
- summary: I,
3131
- ready: N,
3132
- history: D.supported && !!D.rows,
3330
+ /* @__PURE__ */ j(Vn, {
3331
+ summary: F,
3332
+ ready: k,
3333
+ history: E.supported && !!E.rows,
3133
3334
  range: p
3134
3335
  }),
3135
- /* @__PURE__ */ j("div", {
3336
+ /* @__PURE__ */ M("div", {
3136
3337
  className: "socket-filterbar",
3137
- children: [/* @__PURE__ */ A(me, {
3338
+ children: [/* @__PURE__ */ j(ge, {
3138
3339
  label: "Filter connections",
3139
3340
  placeholder: "Filter by connection, actor, instance, or host…",
3140
3341
  value: _,
3141
3342
  onChange: v,
3142
- suggestions: ne
3143
- }), /* @__PURE__ */ j(Be, {
3343
+ suggestions: L
3344
+ }), /* @__PURE__ */ M(Je, {
3144
3345
  "aria-label": "Filter by status",
3145
3346
  size: "sm",
3146
3347
  value: y,
3147
- onChange: (e) => b(e.target.value),
3348
+ onChange: (e) => ee(e.target.value),
3148
3349
  children: [
3149
- /* @__PURE__ */ A(U, {
3350
+ /* @__PURE__ */ j(W, {
3150
3351
  value: "all",
3151
3352
  children: "All statuses"
3152
3353
  }),
3153
- /* @__PURE__ */ A(U, {
3354
+ /* @__PURE__ */ j(W, {
3154
3355
  value: "open",
3155
3356
  children: "Open"
3156
3357
  }),
3157
- /* @__PURE__ */ A(U, {
3358
+ /* @__PURE__ */ j(W, {
3158
3359
  value: "closed",
3159
3360
  children: "Closed"
3160
3361
  }),
3161
- /* @__PURE__ */ A(U, {
3362
+ /* @__PURE__ */ j(W, {
3162
3363
  value: "lost",
3163
3364
  children: "Lost"
3164
3365
  })
3165
3366
  ]
3166
3367
  })]
3167
3368
  }),
3168
- D.supported && /* @__PURE__ */ j("section", {
3369
+ E.supported && /* @__PURE__ */ M("section", {
3169
3370
  className: "overview-panel socket-timeline-panel",
3170
3371
  "aria-label": "Connection timeline",
3171
- children: [/* @__PURE__ */ j("div", {
3372
+ children: [/* @__PURE__ */ M("div", {
3172
3373
  className: "socket-panel-heading",
3173
- children: [/* @__PURE__ */ j("h2", { children: ["Timeline ", /* @__PURE__ */ A("span", { children: F.length.toLocaleString() })] }), /* @__PURE__ */ j("ul", {
3374
+ children: [/* @__PURE__ */ M("h2", { children: ["Timeline ", /* @__PURE__ */ j("span", { children: P.length.toLocaleString() })] }), /* @__PURE__ */ M("ul", {
3174
3375
  className: "socket-legend",
3175
3376
  "aria-label": "Timeline legend",
3176
3377
  children: [
3177
- /* @__PURE__ */ j("li", { children: [/* @__PURE__ */ A("i", { className: "socket-swatch socket-swatch-open" }), " Open"] }),
3178
- /* @__PURE__ */ j("li", { children: [/* @__PURE__ */ A("i", { className: "socket-swatch socket-swatch-closed" }), " Closed"] }),
3179
- /* @__PURE__ */ j("li", { children: [/* @__PURE__ */ A("i", { className: "socket-swatch socket-swatch-lost" }), " Lost · no disconnect recorded"] })
3378
+ /* @__PURE__ */ M("li", { children: [/* @__PURE__ */ j("i", { className: "socket-swatch socket-swatch-open" }), " Open"] }),
3379
+ /* @__PURE__ */ M("li", { children: [/* @__PURE__ */ j("i", { className: "socket-swatch socket-swatch-closed" }), " Closed"] }),
3380
+ /* @__PURE__ */ M("li", { children: [/* @__PURE__ */ j("i", { className: "socket-swatch socket-swatch-lost" }), " Lost · no disconnect recorded"] })
3180
3381
  ]
3181
3382
  })]
3182
- }), F.length ? /* @__PURE__ */ A(gn, {
3183
- sessions: F,
3184
- start: te,
3185
- end: E,
3186
- endLabel: T.toMs === void 0 ? "now" : new Date(T.toMs).toLocaleTimeString([], {
3383
+ }), P.length ? /* @__PURE__ */ j(Tn, {
3384
+ sessions: P,
3385
+ start: ne,
3386
+ end: T,
3387
+ endLabel: w.toMs === void 0 ? "now" : new Date(w.toMs).toLocaleTimeString([], {
3187
3388
  hour: "2-digit",
3188
3389
  minute: "2-digit",
3189
3390
  hour12: !1
3190
3391
  }),
3191
- selected: x,
3392
+ selected: b,
3192
3393
  onSelect: (e, t) => {
3193
- w.current = t, S(e);
3394
+ C.current = t, x(e);
3194
3395
  }
3195
- }) : /* @__PURE__ */ j("div", {
3396
+ }) : /* @__PURE__ */ M("div", {
3196
3397
  className: "overview-empty socket-timeline-empty",
3197
3398
  role: "status",
3198
- children: [/* @__PURE__ */ A("strong", { children: Rn(N, D, M.length) }), /* @__PURE__ */ A("p", { children: M.length ? "Try another filter or a wider time window." : "Sessions appear here as clients connect to actors." })]
3399
+ children: [/* @__PURE__ */ j("strong", { children: qn(k, E, O.length) }), /* @__PURE__ */ j("p", { children: O.length ? "Try another filter or a wider time window." : "Sessions appear here as clients connect to actors." })]
3199
3400
  })]
3200
3401
  }),
3201
- /* @__PURE__ */ j("div", {
3402
+ /* @__PURE__ */ M("div", {
3202
3403
  className: "overview-panel",
3203
- children: [/* @__PURE__ */ j(W, {
3404
+ children: [/* @__PURE__ */ M(G, {
3204
3405
  className: "overview-table socket-table",
3205
3406
  "aria-label": "WebSocket connections",
3206
3407
  containerProps: {
@@ -3209,87 +3410,87 @@ function jn({ client: e, onSelectActor: n, timeRange: o, onTimeRangeChange: s })
3209
3410
  "aria-label": "WebSocket connections",
3210
3411
  tabIndex: 0
3211
3412
  },
3212
- children: [/* @__PURE__ */ A(G, { children: /* @__PURE__ */ j(q, { children: [
3213
- /* @__PURE__ */ A(J, {
3413
+ children: [/* @__PURE__ */ j(K, { children: /* @__PURE__ */ M(J, { children: [
3414
+ /* @__PURE__ */ j(Y, {
3214
3415
  scope: "col",
3215
3416
  children: "Status"
3216
3417
  }),
3217
- /* @__PURE__ */ A(J, {
3418
+ /* @__PURE__ */ j(Y, {
3218
3419
  scope: "col",
3219
3420
  children: "Connection"
3220
3421
  }),
3221
- /* @__PURE__ */ A(J, {
3422
+ /* @__PURE__ */ j(Y, {
3222
3423
  scope: "col",
3223
3424
  children: "Actor class"
3224
3425
  }),
3225
- /* @__PURE__ */ A(J, {
3426
+ /* @__PURE__ */ j(Y, {
3226
3427
  scope: "col",
3227
3428
  children: "Instance"
3228
3429
  }),
3229
- /* @__PURE__ */ A(J, {
3430
+ /* @__PURE__ */ j(Y, {
3230
3431
  scope: "col",
3231
3432
  children: "Opened"
3232
3433
  }),
3233
- /* @__PURE__ */ A(J, {
3434
+ /* @__PURE__ */ j(Y, {
3234
3435
  scope: "col",
3235
3436
  children: "Duration"
3236
3437
  }),
3237
- /* @__PURE__ */ A(J, {
3438
+ /* @__PURE__ */ j(Y, {
3238
3439
  scope: "col",
3239
3440
  children: "Messages"
3240
3441
  }),
3241
- /* @__PURE__ */ A(J, {
3442
+ /* @__PURE__ */ j(Y, {
3242
3443
  scope: "col",
3243
3444
  children: "Metadata"
3244
3445
  })
3245
- ] }) }), /* @__PURE__ */ A(K, { children: F.map((e) => /* @__PURE__ */ A(Nn, {
3446
+ ] }) }), /* @__PURE__ */ j(q, { children: P.map((e) => /* @__PURE__ */ j(Hn, {
3246
3447
  session: e,
3247
3448
  now: h,
3248
- longest: L,
3249
- selected: x === e,
3449
+ longest: I,
3450
+ selected: b === e,
3250
3451
  onSelect: (t) => {
3251
- w.current = t, S(e);
3452
+ C.current = t, x(e);
3252
3453
  }
3253
3454
  }, JSON.stringify([
3254
3455
  e.actorName,
3255
3456
  e.actorId,
3256
3457
  e.connectionId
3257
3458
  ]))) })]
3258
- }), !F.length && /* @__PURE__ */ j("div", {
3459
+ }), !P.length && /* @__PURE__ */ M("div", {
3259
3460
  className: "overview-empty",
3260
3461
  role: "status",
3261
3462
  children: [
3262
- /* @__PURE__ */ A("strong", { children: Rn(N, D, M.length) }),
3263
- /* @__PURE__ */ A("p", { children: M.length ? "Try another connection, actor, or status." : "Open an actor WebSocket to see its connection and metadata here." }),
3264
- !!M.length && /* @__PURE__ */ A(z, {
3463
+ /* @__PURE__ */ j("strong", { children: qn(k, E, O.length) }),
3464
+ /* @__PURE__ */ j("p", { children: O.length ? "Try another connection, actor, or status." : "Open an actor WebSocket to see its connection and metadata here." }),
3465
+ !!O.length && /* @__PURE__ */ j(B, {
3265
3466
  variant: "outline",
3266
3467
  onClick: () => {
3267
- v(""), b("all");
3468
+ v(""), ee("all");
3268
3469
  },
3269
3470
  children: "Clear filter"
3270
3471
  })
3271
3472
  ]
3272
3473
  })]
3273
3474
  }),
3274
- /* @__PURE__ */ A("div", {
3475
+ /* @__PURE__ */ j("div", {
3275
3476
  className: "overview-data-scope",
3276
- children: /* @__PURE__ */ A("p", { children: D.supported ? `Sessions pair each connection’s onConnect and onDisconnect events from retained request history${D.capped ? "; only the 500 most recent sessions are shown" : ""}. Open connections follow the latest host report. Lost connections have no recorded disconnect and are no longer reported by a host, so their duration is a lower bound.` : "Connections are active WebSockets, not unique people. Counts follow the latest host report." })
3477
+ children: /* @__PURE__ */ j("p", { children: E.supported ? `Sessions pair each connection’s onConnect and onDisconnect events from retained request history${E.capped ? "; only the 500 most recent sessions are shown" : ""}. Open connections follow the latest host report. Lost connections have no recorded disconnect and are no longer reported by a host, so their duration is a lower bound.` : "Connections are active WebSockets, not unique people. Counts follow the latest host report." })
3277
3478
  }),
3278
- /* @__PURE__ */ A(Ve, {
3279
- open: !!x,
3479
+ /* @__PURE__ */ j(Ye, {
3480
+ open: !!b,
3280
3481
  onOpenChange: (e) => {
3281
- e || S(void 0);
3482
+ e || x(void 0);
3282
3483
  },
3283
- children: /* @__PURE__ */ j(We, {
3284
- container: C.current,
3484
+ children: /* @__PURE__ */ M(Qe, {
3485
+ container: S.current,
3285
3486
  onCloseAutoFocus: (e) => {
3286
- e.preventDefault(), w.current?.focus();
3487
+ e.preventDefault(), C.current?.focus();
3287
3488
  },
3288
3489
  children: [
3289
- /* @__PURE__ */ A(He, { children: "Connection details" }),
3290
- /* @__PURE__ */ A(Ue, { children: "Identifiers, timings, and metadata for this WebSocket." }),
3291
- x && /* @__PURE__ */ A(Pn, {
3292
- session: x,
3490
+ /* @__PURE__ */ j(Xe, { children: "Connection details" }),
3491
+ /* @__PURE__ */ j(Ze, { children: "Identifiers, timings, and metadata for this WebSocket." }),
3492
+ b && /* @__PURE__ */ j(Un, {
3493
+ session: b,
3293
3494
  now: h,
3294
3495
  onSelectActor: n
3295
3496
  })
@@ -3299,131 +3500,131 @@ function jn({ client: e, onSelectActor: n, timeRange: o, onTimeRangeChange: s })
3299
3500
  ]
3300
3501
  });
3301
3502
  }
3302
- function Mn({ summary: e, ready: t, history: n, range: r }) {
3303
- return /* @__PURE__ */ j("div", {
3503
+ function Vn({ summary: e, ready: t, history: n, range: r }) {
3504
+ return /* @__PURE__ */ M("div", {
3304
3505
  className: "overview-metrics socket-metrics",
3305
3506
  children: [
3306
- /* @__PURE__ */ j("section", {
3507
+ /* @__PURE__ */ M("section", {
3307
3508
  className: "overview-metric",
3308
3509
  children: [
3309
- /* @__PURE__ */ A("h2", { children: "Open now" }),
3310
- /* @__PURE__ */ j("div", {
3510
+ /* @__PURE__ */ j("h2", { children: "Open now" }),
3511
+ /* @__PURE__ */ M("div", {
3311
3512
  className: "overview-value",
3312
- children: [/* @__PURE__ */ A("strong", {
3513
+ children: [/* @__PURE__ */ j("strong", {
3313
3514
  "aria-label": "Open WebSocket connections",
3314
3515
  children: t ? e.open.toLocaleString() : "—"
3315
- }), /* @__PURE__ */ A("span", { children: "live connections" })]
3516
+ }), /* @__PURE__ */ j("span", { children: "live connections" })]
3316
3517
  }),
3317
- /* @__PURE__ */ A("div", {
3518
+ /* @__PURE__ */ j("div", {
3318
3519
  className: "overview-metric-foot",
3319
- children: /* @__PURE__ */ A("span", { children: "Latest host report" })
3520
+ children: /* @__PURE__ */ j("span", { children: "Latest host report" })
3320
3521
  })
3321
3522
  ]
3322
3523
  }),
3323
- /* @__PURE__ */ j("section", {
3524
+ /* @__PURE__ */ M("section", {
3324
3525
  className: "overview-metric",
3325
3526
  children: [
3326
- /* @__PURE__ */ A("h2", { children: "Sessions" }),
3327
- /* @__PURE__ */ j("div", {
3527
+ /* @__PURE__ */ j("h2", { children: "Sessions" }),
3528
+ /* @__PURE__ */ M("div", {
3328
3529
  className: "overview-value",
3329
- children: [/* @__PURE__ */ A("strong", {
3530
+ children: [/* @__PURE__ */ j("strong", {
3330
3531
  "aria-label": "WebSocket sessions",
3331
3532
  children: n ? e.total.toLocaleString() : "—"
3332
- }), /* @__PURE__ */ A("span", { children: r.kind === "absolute" ? ke(r) : V(r) })]
3533
+ }), /* @__PURE__ */ j("span", { children: r.kind === "absolute" ? Le(r) : H(r) })]
3333
3534
  }),
3334
- /* @__PURE__ */ j("div", {
3535
+ /* @__PURE__ */ M("div", {
3335
3536
  className: "overview-metric-foot",
3336
- children: [/* @__PURE__ */ j("span", { children: [/* @__PURE__ */ A("b", { children: n ? (e.total - e.open - e.lost).toLocaleString() : "—" }), " closed"] }), /* @__PURE__ */ j("span", { children: [/* @__PURE__ */ A("b", { children: n ? e.lost.toLocaleString() : "—" }), " lost"] })]
3537
+ children: [/* @__PURE__ */ M("span", { children: [/* @__PURE__ */ j("b", { children: n ? (e.total - e.open - e.lost).toLocaleString() : "—" }), " closed"] }), /* @__PURE__ */ M("span", { children: [/* @__PURE__ */ j("b", { children: n ? e.lost.toLocaleString() : "—" }), " lost"] })]
3337
3538
  })
3338
3539
  ]
3339
3540
  }),
3340
- /* @__PURE__ */ j("section", {
3541
+ /* @__PURE__ */ M("section", {
3341
3542
  className: "overview-metric",
3342
3543
  children: [
3343
- /* @__PURE__ */ A("h2", { children: "Session duration" }),
3344
- /* @__PURE__ */ j("div", {
3544
+ /* @__PURE__ */ j("h2", { children: "Session duration" }),
3545
+ /* @__PURE__ */ M("div", {
3345
3546
  className: "overview-value",
3346
- children: [/* @__PURE__ */ A("strong", {
3547
+ children: [/* @__PURE__ */ j("strong", {
3347
3548
  "aria-label": "Median session duration",
3348
- children: n && e.median !== null ? on(e.median) : "—"
3349
- }), /* @__PURE__ */ A("span", { children: "median" })]
3549
+ children: n && e.median !== null ? hn(e.median) : "—"
3550
+ }), /* @__PURE__ */ j("span", { children: "median" })]
3350
3551
  }),
3351
- /* @__PURE__ */ j("div", {
3552
+ /* @__PURE__ */ M("div", {
3352
3553
  className: "overview-metric-foot",
3353
- children: [/* @__PURE__ */ j("span", { children: [/* @__PURE__ */ A("b", { children: n && e.p95 !== null ? on(e.p95) : "—" }), " p95"] }), /* @__PURE__ */ A("span", { children: "Open sessions count up to now" })]
3554
+ children: [/* @__PURE__ */ M("span", { children: [/* @__PURE__ */ j("b", { children: n && e.p95 !== null ? hn(e.p95) : "—" }), " p95"] }), /* @__PURE__ */ j("span", { children: "Open sessions count up to now" })]
3354
3555
  })
3355
3556
  ]
3356
3557
  }),
3357
- /* @__PURE__ */ j("section", {
3558
+ /* @__PURE__ */ M("section", {
3358
3559
  className: "overview-metric",
3359
3560
  children: [
3360
- /* @__PURE__ */ A("h2", { children: "Messages" }),
3361
- /* @__PURE__ */ j("div", {
3561
+ /* @__PURE__ */ j("h2", { children: "Messages" }),
3562
+ /* @__PURE__ */ M("div", {
3362
3563
  className: "overview-value",
3363
- children: [/* @__PURE__ */ A("strong", {
3564
+ children: [/* @__PURE__ */ j("strong", {
3364
3565
  "aria-label": "WebSocket messages",
3365
3566
  children: n ? e.messages.toLocaleString() : "—"
3366
- }), /* @__PURE__ */ A("span", { children: "received" })]
3567
+ }), /* @__PURE__ */ j("span", { children: "received" })]
3367
3568
  }),
3368
- /* @__PURE__ */ A("div", {
3569
+ /* @__PURE__ */ j("div", {
3369
3570
  className: "overview-metric-foot",
3370
- children: /* @__PURE__ */ j("span", { children: [/* @__PURE__ */ A("b", { children: n && e.messagesPerSession !== null ? e.messagesPerSession.toLocaleString(void 0, { maximumFractionDigits: 1 }) : "—" }), " per session"] })
3571
+ children: /* @__PURE__ */ M("span", { children: [/* @__PURE__ */ j("b", { children: n && e.messagesPerSession !== null ? e.messagesPerSession.toLocaleString(void 0, { maximumFractionDigits: 1 }) : "—" }), " per session"] })
3371
3572
  })
3372
3573
  ]
3373
3574
  })
3374
3575
  ]
3375
3576
  });
3376
3577
  }
3377
- function Nn({ session: e, now: t, longest: n, selected: r, onSelect: i }) {
3378
- let a = rn(e, t), o = a && n ? Math.min(1, a.ms / n) : 0;
3379
- return /* @__PURE__ */ j(q, {
3578
+ function Hn({ session: e, now: t, longest: n, selected: r, onSelect: i }) {
3579
+ let a = pn(e, t), o = a && n ? Math.min(1, a.ms / n) : 0;
3580
+ return /* @__PURE__ */ M(J, {
3380
3581
  className: "la-clickable-row",
3381
3582
  "data-state": r ? "selected" : void 0,
3382
3583
  onClick: (e) => i(e.currentTarget.querySelector("button") ?? e.currentTarget),
3383
3584
  children: [
3384
- /* @__PURE__ */ A(Y, { children: /* @__PURE__ */ j("span", {
3585
+ /* @__PURE__ */ j(X, { children: /* @__PURE__ */ M("span", {
3385
3586
  className: `socket-status socket-status-${e.status}`,
3386
- children: [/* @__PURE__ */ A("i", {
3587
+ children: [/* @__PURE__ */ j("i", {
3387
3588
  className: `socket-swatch socket-swatch-${e.status}`,
3388
3589
  "aria-hidden": "true"
3389
- }), En(e.status)]
3590
+ }), Fn(e.status)]
3390
3591
  }) }),
3391
- /* @__PURE__ */ A(Y, { children: /* @__PURE__ */ A("button", {
3592
+ /* @__PURE__ */ j(X, { children: /* @__PURE__ */ j("button", {
3392
3593
  type: "button",
3393
3594
  className: "socket-connection",
3394
3595
  title: e.connectionId,
3395
3596
  "aria-label": `Inspect connection ${e.connectionId}`,
3396
- children: On(e.connectionId)
3597
+ children: Ln(e.connectionId)
3397
3598
  }) }),
3398
- /* @__PURE__ */ A(Y, {
3599
+ /* @__PURE__ */ j(X, {
3399
3600
  title: e.actorName,
3400
3601
  children: e.actorName
3401
3602
  }),
3402
- /* @__PURE__ */ A(Y, {
3603
+ /* @__PURE__ */ j(X, {
3403
3604
  title: e.actorId,
3404
3605
  children: e.actorId
3405
3606
  }),
3406
- /* @__PURE__ */ A(Y, { children: e.openedAtMs === null ? /* @__PURE__ */ A("span", {
3607
+ /* @__PURE__ */ j(X, { children: e.openedAtMs === null ? /* @__PURE__ */ j("span", {
3407
3608
  title: "The connect event is not in retained history",
3408
3609
  children: "—"
3409
- }) : /* @__PURE__ */ j("time", {
3610
+ }) : /* @__PURE__ */ M("time", {
3410
3611
  dateTime: new Date(e.openedAtMs).toISOString(),
3411
3612
  title: e.estimatedStart ? "Approximate: first reported by the host; the connect event has not been saved yet" : new Date(e.openedAtMs).toLocaleString(),
3412
3613
  children: [e.estimatedStart ? "≈ " : "", new Date(e.openedAtMs).toLocaleTimeString([], { hour12: !1 })]
3413
3614
  }) }),
3414
- /* @__PURE__ */ A(Y, { children: /* @__PURE__ */ j("span", {
3615
+ /* @__PURE__ */ j(X, { children: /* @__PURE__ */ M("span", {
3415
3616
  className: "socket-duration",
3416
- children: [/* @__PURE__ */ A("span", { children: Dn(e, t) }), /* @__PURE__ */ A("i", {
3617
+ children: [/* @__PURE__ */ j("span", { children: In(e, t) }), /* @__PURE__ */ j("i", {
3417
3618
  className: `socket-duration-bar socket-duration-${e.status}`,
3418
3619
  "aria-hidden": "true",
3419
- children: /* @__PURE__ */ A("b", { style: { width: `${o * 100}%` } })
3620
+ children: /* @__PURE__ */ j("b", { style: { width: `${o * 100}%` } })
3420
3621
  })]
3421
3622
  }) }),
3422
- /* @__PURE__ */ A(Y, { children: e.messages.toLocaleString() }),
3423
- /* @__PURE__ */ A(Y, { children: e.metadata === void 0 ? /* @__PURE__ */ A("span", {
3623
+ /* @__PURE__ */ j(X, { children: e.messages.toLocaleString() }),
3624
+ /* @__PURE__ */ j(X, { children: e.metadata === void 0 ? /* @__PURE__ */ j("span", {
3424
3625
  title: "No metadata was recorded for this connection",
3425
3626
  children: "—"
3426
- }) : /* @__PURE__ */ A("code", {
3627
+ }) : /* @__PURE__ */ j("code", {
3427
3628
  className: "socket-metadata",
3428
3629
  title: JSON.stringify(e.metadata),
3429
3630
  children: JSON.stringify(e.metadata)
@@ -3431,46 +3632,46 @@ function Nn({ session: e, now: t, longest: n, selected: r, onSelect: i }) {
3431
3632
  ]
3432
3633
  });
3433
3634
  }
3434
- function Pn({ session: e, now: t, onSelectActor: n }) {
3635
+ function Un({ session: e, now: t, onSelectActor: n }) {
3435
3636
  let r = {
3436
- Status: e.status === "lost" ? "Lost — no disconnect recorded" : En(e.status),
3637
+ Status: e.status === "lost" ? "Lost — no disconnect recorded" : Fn(e.status),
3437
3638
  Connection: e.connectionId,
3438
3639
  "Actor class": e.actorName,
3439
3640
  "Instance ID": e.actorId,
3440
3641
  Opened: e.openedAtMs === null ? "Before retained history" : `${e.estimatedStart ? "≈ " : ""}${new Date(e.openedAtMs).toLocaleString()}`,
3441
3642
  ...e.closedAtMs === null ? {} : { Closed: new Date(e.closedAtMs).toLocaleString() },
3442
3643
  ...e.status === "lost" && e.lastSeenMs !== null ? { "Last activity": new Date(e.lastSeenMs).toLocaleString() } : {},
3443
- Duration: Dn(e, t),
3644
+ Duration: In(e, t),
3444
3645
  Messages: e.messages.toLocaleString(),
3445
3646
  Failures: e.failures.toLocaleString(),
3446
3647
  Host: e.hostId ?? "Unknown"
3447
3648
  };
3448
- return /* @__PURE__ */ j(k, { children: [
3449
- /* @__PURE__ */ A("dl", {
3649
+ return /* @__PURE__ */ M(A, { children: [
3650
+ /* @__PURE__ */ j("dl", {
3450
3651
  className: "la-request-details",
3451
- children: Object.entries(r).map(([e, t]) => /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("dt", { children: e }), /* @__PURE__ */ A("dd", { children: t })] }, e))
3652
+ children: Object.entries(r).map(([e, t]) => /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j("dt", { children: e }), /* @__PURE__ */ j("dd", { children: t })] }, e))
3452
3653
  }),
3453
- e.metadata !== void 0 && /* @__PURE__ */ j("details", {
3654
+ e.metadata !== void 0 && /* @__PURE__ */ M("details", {
3454
3655
  className: "socket-metadata-details",
3455
3656
  open: !0,
3456
- children: [/* @__PURE__ */ A("summary", { children: "Metadata" }), /* @__PURE__ */ A("pre", { children: JSON.stringify(e.metadata, null, 2) })]
3657
+ children: [/* @__PURE__ */ j("summary", { children: "Metadata" }), /* @__PURE__ */ j("pre", { children: JSON.stringify(e.metadata, null, 2) })]
3457
3658
  }),
3458
- n && /* @__PURE__ */ j(z, {
3659
+ n && /* @__PURE__ */ M(B, {
3459
3660
  variant: "outline",
3460
3661
  onClick: () => n(e.actorName),
3461
3662
  children: ["Open ", e.actorName]
3462
3663
  })
3463
3664
  ] });
3464
3665
  }
3465
- function Fn(e, t, n) {
3666
+ function Wn(e, t, n) {
3466
3667
  let r = Math.min(...e.map((e) => e.openedAtMs ?? e.lastSeenMs ?? n)), i = Number.isFinite(r) ? r - Math.max(5e3, (n - r) * .06) : n - 6e4;
3467
3668
  return Math.max(t ?? -Infinity, Math.min(i, n - 1e4));
3468
3669
  }
3469
- function In(e, n) {
3670
+ function Gn(e, n) {
3470
3671
  let [r, o] = a(/* @__PURE__ */ new Map()), s = i(void 0);
3471
3672
  return t(() => {
3472
3673
  if (!e) return;
3473
- let t = new Set(e.actors.flatMap((e) => e.instances.flatMap((t) => t.connections.map((n) => tn(e.actorName, t.actorId, n.id))))), r = s.current;
3674
+ let t = new Set(e.actors.flatMap((e) => e.instances.flatMap((t) => t.connections.map((n) => dn(e.actorName, t.actorId, n.id))))), r = s.current;
3474
3675
  if (s.current = t, !r) return;
3475
3676
  let i = [...t].filter((e) => !r.has(e)), a = [...r].filter((e) => !t.has(e));
3476
3677
  if (i.length || a.length) {
@@ -3482,7 +3683,7 @@ function In(e, n) {
3482
3683
  }
3483
3684
  }, [e]), r;
3484
3685
  }
3485
- function Ln(e, t) {
3686
+ function Kn(e, t) {
3486
3687
  let n = /* @__PURE__ */ new Map();
3487
3688
  for (let e of t?.actors ?? []) n.set(e.actorName, new Set(e.instances.map((e) => e.actorId)));
3488
3689
  for (let t of e) {
@@ -3499,16 +3700,16 @@ function Ln(e, t) {
3499
3700
  hint: e
3500
3701
  })))];
3501
3702
  }
3502
- function Rn(e, t, n) {
3703
+ function qn(e, t, n) {
3503
3704
  return !e && !t.rows ? t.failed ? "Connections unavailable" : "Loading connections…" : n ? "No matching connections" : t.supported ? "No WebSocket sessions" : "No active WebSockets";
3504
3705
  }
3505
3706
  //#endregion
3506
3707
  //#region src/ConsoleApp.tsx
3507
- var zn = [
3708
+ var Jn = [
3508
3709
  {
3509
3710
  id: "overview",
3510
3711
  label: "Durable Actors",
3511
- icon: v
3712
+ icon: y
3512
3713
  },
3513
3714
  {
3514
3715
  id: "actors",
@@ -3526,72 +3727,72 @@ var zn = [
3526
3727
  icon: l
3527
3728
  }
3528
3729
  ];
3529
- function Bn({ client: e, toggleTheme: t }) {
3530
- let [n, r] = a("overview"), [i, o] = a(), [l, u] = a(De), d = {
3730
+ function Yn({ client: e, toggleTheme: t }) {
3731
+ let [n, r] = a("overview"), [i, o] = a(), [l, u] = a(Fe), d = {
3531
3732
  timeRange: l,
3532
3733
  onTimeRangeChange: u
3533
3734
  };
3534
3735
  function f(e) {
3535
3736
  o(e), r("actors");
3536
3737
  }
3537
- return /* @__PURE__ */ j("div", {
3738
+ return /* @__PURE__ */ M("div", {
3538
3739
  className: "console-shell",
3539
3740
  children: [
3540
- /* @__PURE__ */ A("a", {
3741
+ /* @__PURE__ */ j("a", {
3541
3742
  className: "skip-link",
3542
3743
  href: "#main",
3543
3744
  children: "Skip to content"
3544
3745
  }),
3545
- /* @__PURE__ */ j("aside", {
3746
+ /* @__PURE__ */ M("aside", {
3546
3747
  className: "console-sidebar",
3547
3748
  children: [
3548
- /* @__PURE__ */ j("div", {
3749
+ /* @__PURE__ */ M("div", {
3549
3750
  className: "console-brand",
3550
- children: [/* @__PURE__ */ A(_, { "aria-hidden": "true" }), /* @__PURE__ */ A("strong", { children: "Terse" })]
3751
+ children: [/* @__PURE__ */ j(v, { "aria-hidden": "true" }), /* @__PURE__ */ j("strong", { children: "Terse" })]
3551
3752
  }),
3552
- /* @__PURE__ */ A("nav", {
3753
+ /* @__PURE__ */ j("nav", {
3553
3754
  "aria-label": "Observability",
3554
- children: zn.map((e) => /* @__PURE__ */ j("button", {
3755
+ children: Jn.map((e) => /* @__PURE__ */ M("button", {
3555
3756
  type: "button",
3556
3757
  "aria-current": n === e.id ? "page" : void 0,
3557
3758
  onClick: () => {
3558
3759
  o(void 0), r(e.id);
3559
3760
  },
3560
- children: [/* @__PURE__ */ A(e.icon, { "aria-hidden": "true" }), e.label]
3761
+ children: [/* @__PURE__ */ j(e.icon, { "aria-hidden": "true" }), e.label]
3561
3762
  }, e.id))
3562
3763
  }),
3563
- /* @__PURE__ */ j("div", {
3764
+ /* @__PURE__ */ M("div", {
3564
3765
  className: "console-sidebar-foot",
3565
- children: [/* @__PURE__ */ A(c, { "aria-hidden": "true" }), /* @__PURE__ */ j("span", { children: ["Runtime inspector", /* @__PURE__ */ A("small", { children: "Read-only observability" })] })]
3766
+ children: [/* @__PURE__ */ j(c, { "aria-hidden": "true" }), /* @__PURE__ */ M("span", { children: ["Runtime inspector", /* @__PURE__ */ j("small", { children: "Read-only observability" })] })]
3566
3767
  })
3567
3768
  ]
3568
3769
  }),
3569
- /* @__PURE__ */ j("div", {
3770
+ /* @__PURE__ */ M("div", {
3570
3771
  className: "console-workspace",
3571
- children: [/* @__PURE__ */ j("header", {
3772
+ children: [/* @__PURE__ */ M("header", {
3572
3773
  className: "console-topbar",
3573
- children: [/* @__PURE__ */ A("button", {
3774
+ children: [/* @__PURE__ */ j("button", {
3574
3775
  className: "theme-toggle",
3575
3776
  type: "button",
3576
3777
  onClick: t,
3577
3778
  "aria-label": "Toggle color theme",
3578
- children: /* @__PURE__ */ A(C, { "aria-hidden": "true" })
3579
- }), /* @__PURE__ */ j("a", {
3779
+ children: /* @__PURE__ */ j(w, { "aria-hidden": "true" })
3780
+ }), /* @__PURE__ */ M("a", {
3580
3781
  href: "https://github.com/TerseAI/durable-actors#readme",
3581
3782
  target: "_blank",
3582
3783
  rel: "noopener noreferrer",
3583
- children: ["Docs", /* @__PURE__ */ A(s, { "aria-hidden": "true" })]
3784
+ children: ["Docs", /* @__PURE__ */ j(s, { "aria-hidden": "true" })]
3584
3785
  })]
3585
- }), /* @__PURE__ */ j("main", {
3786
+ }), /* @__PURE__ */ M("main", {
3586
3787
  id: "main",
3587
3788
  tabIndex: -1,
3588
3789
  children: [
3589
- n === "overview" && /* @__PURE__ */ A(Gt, {
3790
+ n === "overview" && /* @__PURE__ */ j(en, {
3590
3791
  client: e,
3591
3792
  onSelectActor: f,
3592
3793
  ...d
3593
3794
  }),
3594
- n === "actors" && /* @__PURE__ */ A(xt, {
3795
+ n === "actors" && /* @__PURE__ */ j(kt, {
3595
3796
  client: e,
3596
3797
  navigation: {
3597
3798
  actorName: i,
@@ -3599,11 +3800,11 @@ function Bn({ client: e, toggleTheme: t }) {
3599
3800
  },
3600
3801
  ...d
3601
3802
  }),
3602
- n === "requests" && /* @__PURE__ */ A(Qe, {
3803
+ n === "requests" && /* @__PURE__ */ j(ot, {
3603
3804
  client: e,
3604
3805
  ...d
3605
3806
  }),
3606
- n === "websockets" && /* @__PURE__ */ A(jn, {
3807
+ n === "websockets" && /* @__PURE__ */ j(Bn, {
3607
3808
  client: e,
3608
3809
  onSelectActor: f,
3609
3810
  ...d
@@ -3616,20 +3817,20 @@ function Bn({ client: e, toggleTheme: t }) {
3616
3817
  }
3617
3818
  //#endregion
3618
3819
  //#region src/state-data.ts
3619
- function Vn(e) {
3620
- if (!$(e) || !(e.snapshot === null || Un(e.snapshot) && $(e.snapshot) && $(e.snapshot.state)) || !(e.schema === null || $(e.schema))) throw Error("Invalid state response");
3820
+ function Xn(e) {
3821
+ if (!$(e) || !(e.snapshot === null || Qn(e.snapshot) && $(e.snapshot) && $(e.snapshot.state)) || !(e.schema === null || $(e.schema))) throw Error("Invalid state response");
3621
3822
  return e;
3622
3823
  }
3623
- function Hn(e) {
3624
- if (!$(e) || !Array.isArray(e.records) || !e.records.every(Un) || !(e.nextBefore === null || Wn(e.nextBefore))) throw Error("Invalid state history");
3824
+ function Zn(e) {
3825
+ if (!$(e) || !Array.isArray(e.records) || !e.records.every(Qn) || !(e.nextBefore === null || $n(e.nextBefore))) throw Error("Invalid state history");
3625
3826
  return e;
3626
3827
  }
3627
- function Un(e) {
3628
- if (!$(e) || !Wn(e.stateVersion) || !Wn(e.ownerEpoch) || typeof e.requestId != "string") return !1;
3828
+ function Qn(e) {
3829
+ if (!$(e) || !$n(e.stateVersion) || !$n(e.ownerEpoch) || typeof e.requestId != "string") return !1;
3629
3830
  let t = e.attribution;
3630
3831
  return t === null || $(t) && typeof t.operation == "string" && (t.connectionId === null || typeof t.connectionId == "string") && typeof t.committedAtMs == "number" && Number.isSafeInteger(t.committedAtMs) && t.committedAtMs >= 0 && typeof t.interleaved == "boolean";
3631
3832
  }
3632
- function Wn(e) {
3833
+ function $n(e) {
3633
3834
  return typeof e == "number" && Number.isSafeInteger(e) && e > 0;
3634
3835
  }
3635
3836
  function $(e) {
@@ -3637,42 +3838,42 @@ function $(e) {
3637
3838
  }
3638
3839
  //#endregion
3639
3840
  //#region src/client.ts
3640
- var Gn = class {
3841
+ var er = class {
3641
3842
  baseUrl;
3642
3843
  request;
3643
3844
  constructor(e = "/api/observe", t = globalThis.fetch.bind(globalThis)) {
3644
3845
  this.baseUrl = e, this.request = t;
3645
3846
  }
3646
3847
  async getState(e, t) {
3647
- return Vn(await this.get(`state${Kn(e)}`, t));
3848
+ return Xn(await this.get(`state${tr(e)}`, t));
3648
3849
  }
3649
3850
  async listStateHistory(e, t) {
3650
- return Hn(await this.get(`state/history${Kn(e)}`, t));
3851
+ return Zn(await this.get(`state/history${tr(e)}`, t));
3651
3852
  }
3652
3853
  async getMetrics(e, t) {
3653
- return Ht(await this.get(`metrics${Kn(e)}`, t));
3854
+ return Zt(await this.get(`metrics${tr(e)}`, t));
3654
3855
  }
3655
3856
  async listQueueWaits(e, t) {
3656
- return ht(await this.get(`queue-waits${Kn(e)}`, t));
3857
+ return St(await this.get(`queue-waits${tr(e)}`, t));
3657
3858
  }
3658
3859
  async listWebSockets(e, t) {
3659
- return en(await this.get(`websockets${Kn(e)}`, t));
3860
+ return un(await this.get(`websockets${tr(e)}`, t));
3660
3861
  }
3661
3862
  async listActors(e) {
3662
3863
  let t = await this.get("actors", e);
3663
- if (!qn(t)) throw Error("Invalid actor inventory response.");
3864
+ if (!nr(t)) throw Error("Invalid actor inventory response.");
3664
3865
  return t;
3665
3866
  }
3666
3867
  async watchActors(e, t) {
3667
- return this.watch("events", "inventory", qn, e, t);
3868
+ return this.watch("events", "inventory", nr, e, t);
3668
3869
  }
3669
3870
  async watchRequests(e, t, n) {
3670
3871
  let r = n ? `?${new URLSearchParams({ after: n })}` : "";
3671
- return this.watch(`requests/events${r}`, "requests", Xn, e, t);
3872
+ return this.watch(`requests/events${r}`, "requests", ar, e, t);
3672
3873
  }
3673
3874
  async listRequests(e, t) {
3674
- let n = await this.get(`requests${Kn(e)}`, t);
3675
- if (!Xn(n)) throw Error("Invalid request history response");
3875
+ let n = await this.get(`requests${tr(e)}`, t);
3876
+ if (!ar(n)) throw Error("Invalid request history response");
3676
3877
  return n;
3677
3878
  }
3678
3879
  async watch(e, t, n, r, i) {
@@ -3683,7 +3884,7 @@ var Gn = class {
3683
3884
  headers: { accept: "text/event-stream" }
3684
3885
  });
3685
3886
  if (!a.ok || !a.headers.get("content-type")?.startsWith("text/event-stream") || !a.body) throw await a.body?.cancel(), Error("Live inventory is unavailable");
3686
- let o = a.body.getReader(), s = new TextDecoder(), c = ie({ onEvent(e) {
3887
+ let o = a.body.getReader(), s = new TextDecoder(), c = oe({ onEvent(e) {
3687
3888
  if (i.aborted) return;
3688
3889
  if (e.event === "error") throw Error("Live inventory is unavailable");
3689
3890
  if (e.event !== t) return;
@@ -3721,29 +3922,29 @@ var Gn = class {
3721
3922
  return n.json();
3722
3923
  }
3723
3924
  };
3724
- function Kn(e) {
3925
+ function tr(e) {
3725
3926
  let t = new URLSearchParams();
3726
3927
  for (let [n, r] of Object.entries(e)) r !== void 0 && t.set(n, String(r));
3727
3928
  return t.size ? `?${t}` : "";
3728
3929
  }
3729
- function qn(e) {
3930
+ function nr(e) {
3730
3931
  return !e || typeof e != "object" || !("actors" in e) || !Array.isArray(e.actors) ? !1 : e.actors.every((e) => e && typeof e.actorName == "string" && [
3731
3932
  e.live,
3732
3933
  e.dormant,
3733
3934
  e.unknown
3734
- ].every((e) => Number.isSafeInteger(e) && e >= 0) && Array.isArray(e.instances) && e.instances.every(Jn));
3935
+ ].every((e) => Number.isSafeInteger(e) && e >= 0) && Array.isArray(e.instances) && e.instances.every(rr));
3735
3936
  }
3736
- function Jn(e) {
3937
+ function rr(e) {
3737
3938
  return !!e && typeof e == "object" && "actorId" in e && typeof e.actorId == "string" && "status" in e && [
3738
3939
  "live",
3739
3940
  "dormant",
3740
3941
  "unknown"
3741
- ].includes(String(e.status)) && "connections" in e && Array.isArray(e.connections) && e.connections.every(Yn) && (!("waiting" in e) || e.waiting == null || Array.isArray(e.waiting) && e.waiting.every((e) => !!e && typeof e == "object" && typeof e.id == "string" && typeof e.operation == "string"));
3942
+ ].includes(String(e.status)) && "connections" in e && Array.isArray(e.connections) && e.connections.every(ir) && (!("waiting" in e) || e.waiting == null || Array.isArray(e.waiting) && e.waiting.every((e) => !!e && typeof e == "object" && typeof e.id == "string" && typeof e.operation == "string"));
3742
3943
  }
3743
- function Yn(e) {
3944
+ function ir(e) {
3744
3945
  return !!e && typeof e == "object" && "id" in e && typeof e.id == "string" && "metadata" in e;
3745
3946
  }
3746
- function Xn(e) {
3947
+ function ar(e) {
3747
3948
  if (!e || typeof e != "object") return !1;
3748
3949
  let t = e;
3749
3950
  return typeof t.epoch == "string" && [
@@ -3751,12 +3952,12 @@ function Xn(e) {
3751
3952
  t.capacity,
3752
3953
  t.evicted,
3753
3954
  t.dropped
3754
- ].every(Zn) && (t.persistenceFailed === void 0 || typeof t.persistenceFailed == "boolean") && (t.nextCursor == null || typeof t.nextCursor == "string") && (t.resumeCursor === void 0 || typeof t.resumeCursor == "string") && (t.reset === void 0 || typeof t.reset == "boolean") && t.capacity > 0 && t.capacity <= 500 && Array.isArray(t.records) && t.records.length <= t.capacity && t.records.every((e) => Qn(e) && e.sequence <= t.cursor);
3955
+ ].every(or) && (t.persistenceFailed === void 0 || typeof t.persistenceFailed == "boolean") && (t.nextCursor == null || typeof t.nextCursor == "string") && (t.resumeCursor === void 0 || typeof t.resumeCursor == "string") && (t.reset === void 0 || typeof t.reset == "boolean") && t.capacity > 0 && t.capacity <= 500 && Array.isArray(t.records) && t.records.length <= t.capacity && t.records.every((e) => sr(e) && e.sequence <= t.cursor);
3755
3956
  }
3756
- function Zn(e) {
3957
+ function or(e) {
3757
3958
  return Number.isSafeInteger(e) && Number(e) >= 0;
3758
3959
  }
3759
- function Qn(e) {
3960
+ function sr(e) {
3760
3961
  if (!e || typeof e != "object") return !1;
3761
3962
  let t = e;
3762
3963
  return typeof t.projectId == "string" && /^[A-Za-z0-9._-]{1,64}$/u.test(t.projectId) && [
@@ -3766,7 +3967,7 @@ function Qn(e) {
3766
3967
  t.actorName,
3767
3968
  t.actorId,
3768
3969
  t.operation
3769
- ].every((e) => typeof e == "string") && (t.eventId === void 0 || typeof t.eventId == "string" && t.eventId.length > 0) && Zn(t.sequence) && Zn(t.startedAtMs) && t.startedAtMs <= 864e13 && ["method", "websocket"].includes(t.kind) && [
3970
+ ].every((e) => typeof e == "string") && (t.eventId === void 0 || typeof t.eventId == "string" && t.eventId.length > 0) && or(t.sequence) && or(t.startedAtMs) && t.startedAtMs <= 864e13 && ["method", "websocket"].includes(t.kind) && [
3770
3971
  "completed",
3771
3972
  "failed",
3772
3973
  "rejected",
@@ -3775,4 +3976,4 @@ function Qn(e) {
3775
3976
  ].includes(t.outcome) && (t.connectionId === null || typeof t.connectionId == "string") && Number.isFinite(t.durationMs) && t.durationMs >= 0 && (t.queueWaitMs === null || Number.isFinite(t.queueWaitMs) && t.queueWaitMs >= 0 && t.queueWaitMs <= t.durationMs);
3776
3977
  }
3777
3978
  //#endregion
3778
- export { xt as ActorObserver, H as Badge, z as Button, _e as Calendar, ve as CalendarDayButton, oe as Command, le as CommandEmpty, ue as CommandGroup, se as CommandInput, fe as CommandItem, ce as CommandList, de as CommandSeparator, pe as CommandShortcut, Bn as ConsoleApp, me as FilterCombobox, Gn as HttpObserverClient, B as Input, Gt as Overview, ye as Popover, Se as PopoverAnchor, xe as PopoverContent, Te as PopoverDescription, Ce as PopoverHeader, we as PopoverTitle, be as PopoverTrigger, Qe as RequestObserver, Ve as Sheet, We as SheetContent, Ue as SheetDescription, He as SheetTitle, gn as SocketTimeline, W as Table, K as TableBody, Ke as TableCaption, Y as TableCell, Ge as TableFooter, J as TableHead, G as TableHeader, q as TableRow, Me as TimeRangePicker, jn as WebSocketObserver, ze as badgeVariants, ge as buttonVariants, De as defaultTimeRange, ke as rangeLabel, Oe as resolveRange };
3979
+ export { kt as ActorObserver, U as Badge, B as Button, Te as Calendar, Ee as CalendarDayButton, ce as Command, de as CommandEmpty, fe as CommandGroup, le as CommandInput, me as CommandItem, ue as CommandList, pe as CommandSeparator, he as CommandShortcut, Yn as ConsoleApp, ge as FilterCombobox, er as HttpObserverClient, V as Input, en as Overview, De as Popover, Ae as PopoverAnchor, ke as PopoverContent, Ne as PopoverDescription, je as PopoverHeader, Me as PopoverTitle, Oe as PopoverTrigger, ot as RequestObserver, xe as RequestTimeline, Ye as Sheet, Qe as SheetContent, Ze as SheetDescription, Xe as SheetTitle, Tn as SocketTimeline, G as Table, q as TableBody, et as TableCaption, X as TableCell, $e as TableFooter, Y as TableHead, K as TableHeader, J as TableRow, Be as TimeRangePicker, Bn as WebSocketObserver, qe as badgeVariants, we as buttonVariants, Fe as defaultTimeRange, Le as rangeLabel, Ie as resolveRange };