durable-actors-observer 0.4.4 → 0.4.6

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