@nivaro/react 0.3.38 → 0.3.40

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.
@@ -1,72 +1,73 @@
1
1
  import { jsxs as d, Fragment as _e, jsx as r } from "react/jsx-runtime";
2
- import { useSensors as Fl, useSensor as Tl, PointerSensor as Rl, DndContext as Al, closestCenter as Ol } from "@dnd-kit/core";
3
- import { SortableContext as El, verticalListSortingStrategy as Ll, arrayMove as Dl, useSortable as Pl } from "@dnd-kit/sortable";
4
- import { CSS as Kl } from "@dnd-kit/utilities";
5
- import { useQueryClient as Ml, useQuery as H, useMutation as we, useQueries as ze } from "@tanstack/react-query";
6
- import { AlertTriangle as Bl, FileDiff as Ql, RefreshCw as jl, Rows3 as oa, Flame as Ul, Sparkles as Il, BarChart3 as Vl, SlidersHorizontal as Gl, ListChecks as Wl, Rows4 as Hl, Rows2 as Jl, Play as Yl, Plus as Jt, ChevronDown as sa, Star as zl, Pin as Xl, Loader2 as Zl, Check as eo, Save as to, Bell as no, Inbox as ro, GripVertical as ao } from "lucide-react";
7
- import { useState as y, useRef as Q, useEffect as j, useMemo as G } from "react";
8
- import { createPortal as ia } from "react-dom";
9
- import { toast as A } from "sonner";
10
- import { useNivaroClient as ha, useItemEditAuth as ca, useItemNavigation as lo, useNavigation as oo, useOverlayState as so } from "../../context.js";
11
- import { useDebounced as io } from "../../hooks/useDebounced.js";
12
- import { useElapsedLoading as co } from "../../hooks/useElapsedLoading.js";
13
- import { useBulkProgressFeed as uo } from "../../lib/bulk-progress.js";
14
- import { get as E, post as re, patch as da, del as An, put as mo } from "../../lib/commands.js";
15
- import { evaluateExpression as bo } from "../../lib/expression.js";
16
- import { deliverLive as po, releaseLiveOwner as ho } from "../../lib/focus-mode.js";
17
- import { formatMultiValue as Xe, formatValue as fo } from "../../lib/format-value.js";
18
- import { createCursorBook as go, pageRequest as xo, noteNextCursor as yo } from "../../lib/keyset-pager.js";
19
- import { expandCoalesced as ko, LIVE_ASPECTS as kt } from "../../lib/live.js";
20
- import { useRowChanges as vo, useRowLocksByCollection as wo, lockLabel as _o } from "../../lib/live-list.js";
21
- import { OPEN_IN_TABS_CAP as No, openInTabs as So, openInTabsMessage as ua } from "../../lib/open-in-tabs.js";
22
- import { isOwnWrite as Co } from "../../lib/own-writes.js";
23
- import { useRowPresence as $o, rowPresenceKey as qo } from "../../lib/presence-hooks.js";
24
- import { buildGroups as Fo } from "../../lib/queue-grouping.js";
25
- import { useOptionalRealtime as To } from "../../lib/realtime.js";
26
- import { rowHighlightTextClass as Ro, rowHighlightClass as Ao } from "../../lib/row-highlight.js";
27
- import { userErrorMessage as vt } from "../../lib/safe-error.js";
28
- import { useMyScopes as Oo, matchScopeDimension as Eo, effectiveScopeSeedIds as Lo } from "../../lib/use-my-scopes.js";
29
- import { useNewItemLayouts as Do } from "../../lib/use-new-item-layouts.js";
30
- import { formatNumber as ae, cn as $, titleCase as On, humanHours as Po, formatRelative as Ko, formatDateTime as Mo, formatDate as Bo } from "../../lib/utils.js";
31
- import { usePublishAskContext as Qo, useAskRecordDrag as jo } from "../ai/ask-context.js";
32
- import { useBuiltinGate as Uo, BulkActionButtons as Io } from "../bulk/BulkActionButtons.js";
33
- import { BulkRowMark as Vo } from "../bulk/BulkRowMark.js";
34
- import { RowActionsMenu as Go } from "../CollectionBrowserView.js";
35
- import { DataTable as Wo } from "../DataTable.js";
36
- import { EmptyState as Ho } from "../EmptyState.js";
37
- import { FocusModeToggle as Jo } from "../FocusModeToggle.js";
38
- import { FulfilmentPill as Yo, FULFILMENT_FILTER_OPTIONS as zo } from "../FulfilmentPill.js";
39
- import { ImportFromFileButton as Xo } from "../import/ImportFromFileButton.js";
40
- import { IntegrationDots as Zo, INTEGRATIONS_FILTER_OPTIONS as es } from "../integrations/IntegrationDots.js";
41
- import { IntegrationsFilterPill as ts } from "../integrations/IntegrationsFilterPill.js";
42
- import { readQueueReturn as ns, writeQueueReturn as ma } from "../item-edit/QueueReturnChip.js";
43
- import { ListLoadError as rs } from "../ListLoadError.js";
44
- import { LiveRowMark as as } from "../LiveRowMark.js";
45
- import { RealtimeStaleMark as ls } from "../RealtimeStatusBanner.js";
46
- import { RecordDrilldownSheet as os } from "../RecordDrilldownSheet.js";
47
- import { RowHighlightLegend as ss } from "../RowHighlightLegend.js";
48
- import { RowPresence as is } from "../RowPresence.js";
49
- import { TickerNumber as En } from "../TickerNumber.js";
50
- import { UnseenDot as cs } from "../UnseenDot.js";
51
- import { Badge as ds } from "../ui/badge.js";
2
+ import { useSensors as Al, useSensor as Ol, PointerSensor as Ll, DndContext as Dl, closestCenter as Pl } from "@dnd-kit/core";
3
+ import { SortableContext as Kl, verticalListSortingStrategy as Ml, arrayMove as Bl, useSortable as Ql } from "@dnd-kit/sortable";
4
+ import { CSS as jl } from "@dnd-kit/utilities";
5
+ import { useQueryClient as Ul, useQuery as H, useMutation as we, useQueries as Xe } from "@tanstack/react-query";
6
+ import { AlertTriangle as Il, FileDiff as Vl, RefreshCw as Gl, Rows3 as sa, Flame as Wl, Sparkles as Hl, BarChart3 as Jl, SlidersHorizontal as Yl, ListChecks as Xl, Rows4 as zl, Rows2 as Zl, Play as eo, Plus as Jt, ChevronDown as ia, Star as to, Pin as no, Loader2 as ro, Check as ao, Save as lo, Bell as oo, Inbox as so, GripVertical as io } from "lucide-react";
7
+ import { useState as y, useRef as Q, useEffect as j, useMemo as U } from "react";
8
+ import { createPortal as ca } from "react-dom";
9
+ import { toast as E } from "sonner";
10
+ import { useNivaroClient as fa, useItemEditAuth as da, useItemNavigation as co, useNavigation as uo, useOverlayState as mo } from "../../context.js";
11
+ import { useDebounced as bo } from "../../hooks/useDebounced.js";
12
+ import { useElapsedLoading as po } from "../../hooks/useElapsedLoading.js";
13
+ import { useBulkProgressFeed as ho } from "../../lib/bulk-progress.js";
14
+ import { get as O, post as re, patch as ua, del as En, put as fo } from "../../lib/commands.js";
15
+ import { evaluateExpression as go } from "../../lib/expression.js";
16
+ import { deliverLive as xo, releaseLiveOwner as yo } from "../../lib/focus-mode.js";
17
+ import { formatMultiValue as ze, formatValue as ko } from "../../lib/format-value.js";
18
+ import { createCursorBook as vo, pageRequest as wo, noteNextCursor as _o } from "../../lib/keyset-pager.js";
19
+ import { expandCoalesced as No, LIVE_ASPECTS as vt } from "../../lib/live.js";
20
+ import { useRowChanges as So, useRowLocksByCollection as Co, lockLabel as $o } from "../../lib/live-list.js";
21
+ import { OPEN_IN_TABS_CAP as qo, openInTabs as Fo, openInTabsMessage as ma } from "../../lib/open-in-tabs.js";
22
+ import { isOwnWrite as Ro } from "../../lib/own-writes.js";
23
+ import { useRowPresence as To, rowPresenceKey as Eo } from "../../lib/presence-hooks.js";
24
+ import { buildGroups as Ao } from "../../lib/queue-grouping.js";
25
+ import { useOptionalRealtime as Oo } from "../../lib/realtime.js";
26
+ import { rowHighlightTextClass as Lo, rowHighlightClass as Do } from "../../lib/row-highlight.js";
27
+ import { userErrorMessage as wt } from "../../lib/safe-error.js";
28
+ import { useMyScopes as Po, matchScopeDimension as Ko, effectiveScopeSeedIds as Mo } from "../../lib/use-my-scopes.js";
29
+ import { useNewItemLayouts as Bo } from "../../lib/use-new-item-layouts.js";
30
+ import { formatNumber as ae, cn as $, titleCase as An, humanHours as Qo, formatRelative as jo, formatDateTime as Uo, formatDate as Io } from "../../lib/utils.js";
31
+ import { usePublishAskContext as Vo, useAskRecordDrag as Go } from "../ai/ask-context.js";
32
+ import { useBuiltinGate as Wo, BulkActionButtons as Ho } from "../bulk/BulkActionButtons.js";
33
+ import { BulkRowMark as Jo } from "../bulk/BulkRowMark.js";
34
+ import { RowActionsMenu as Yo } from "../CollectionBrowserView.js";
35
+ import { DataTable as Xo } from "../DataTable.js";
36
+ import { EmptyState as zo } from "../EmptyState.js";
37
+ import { FocusModeToggle as Zo } from "../FocusModeToggle.js";
38
+ import { FulfilmentPill as es, FULFILMENT_FILTER_OPTIONS as ts } from "../FulfilmentPill.js";
39
+ import { ImportFromFileButton as ns } from "../import/ImportFromFileButton.js";
40
+ import { IntegrationDots as rs, INTEGRATIONS_FILTER_OPTIONS as as } from "../integrations/IntegrationDots.js";
41
+ import { IntegrationsFilterPill as ls } from "../integrations/IntegrationsFilterPill.js";
42
+ import { readQueueReturn as os, writeQueueReturn as ba } from "../item-edit/QueueReturnChip.js";
43
+ import { ListLoadError as ss } from "../ListLoadError.js";
44
+ import { LiveRowMark as is } from "../LiveRowMark.js";
45
+ import { usePickerExcludedRows as cs, PICKER_EXCLUDED_ROW_CLASS as ds, PICKER_EXCLUDED_TITLE as us } from "../PickerExcludedRows.js";
46
+ import { RealtimeStaleMark as ms } from "../RealtimeStatusBanner.js";
47
+ import { RecordDrilldownSheet as bs } from "../RecordDrilldownSheet.js";
48
+ import { RowHighlightLegend as ps } from "../RowHighlightLegend.js";
49
+ import { RowPresence as hs } from "../RowPresence.js";
50
+ import { TickerNumber as On } from "../TickerNumber.js";
51
+ import { UnseenDot as fs } from "../UnseenDot.js";
52
+ import { Badge as gs } from "../ui/badge.js";
52
53
  import { Checkbox as Ln } from "../ui/checkbox.js";
53
- import { Command as ba, CommandInput as us, CommandList as pa, CommandEmpty as ms, CommandItem as wt } from "../ui/command.js";
54
- import { Label as bs } from "../ui/label.js";
54
+ import { Command as pa, CommandInput as xs, CommandList as ha, CommandEmpty as ys, CommandItem as _t } from "../ui/command.js";
55
+ import { Label as ks } from "../ui/label.js";
55
56
  import { Popover as Ze, PopoverTrigger as et, PopoverContent as tt } from "../ui/popover.js";
56
- import { Skeleton as ps } from "../ui/skeleton.js";
57
- import { OwnerAvatars as hs } from "./OwnerAvatars.js";
58
- import { QueueBulkBar as fs } from "./QueueBulkBar.js";
59
- import { QueueItemSheet as gs } from "./QueueItemSheet.js";
60
- import { QueueKanbanBoard as xs } from "./QueueKanbanBoard.js";
61
- import { QueueQuickFilters as ys } from "./QueueQuickFilters.js";
62
- import { QueueWorkloadView as ks } from "./QueueWorkloadView.js";
63
- import { useTransitionNote as vs, needsTransitionNote as ws } from "./transition-note.js";
64
- function _s({ summary: l }) {
57
+ import { Skeleton as vs } from "../ui/skeleton.js";
58
+ import { OwnerAvatars as ws } from "./OwnerAvatars.js";
59
+ import { QueueBulkBar as _s } from "./QueueBulkBar.js";
60
+ import { QueueItemSheet as Ns } from "./QueueItemSheet.js";
61
+ import { QueueKanbanBoard as Ss } from "./QueueKanbanBoard.js";
62
+ import { QueueQuickFilters as Cs } from "./QueueQuickFilters.js";
63
+ import { QueueWorkloadView as $s } from "./QueueWorkloadView.js";
64
+ import { useTransitionNote as qs, needsTransitionNote as Fs } from "./transition-note.js";
65
+ function Rs({ summary: l }) {
65
66
  if (!l || l.count === 0)
66
67
  return /* @__PURE__ */ r("span", { className: "text-slate-300 dark:text-muted-foreground", children: "—" });
67
68
  const f = [l.last_from, l.last_to].filter(Boolean).join(" → "), q = [
68
69
  f ? `Last: ${f}` : null,
69
- l.last_at ? Ko(l.last_at) : null,
70
+ l.last_at ? jo(l.last_at) : null,
70
71
  l.last_reason ? `“${l.last_reason}”` : "no reason given"
71
72
  ].filter(Boolean).join(" · ");
72
73
  return /* @__PURE__ */ d(
@@ -88,15 +89,15 @@ function _s({ summary: l }) {
88
89
  }
89
90
  );
90
91
  }
91
- const Ns = 50, Yt = "nivaro_addendums", Ss = [
92
+ const Ts = 50, Yt = "nivaro_addendums", Es = [
92
93
  { value: "mine", label: "My Items" },
93
94
  { value: "unowned", label: "No Owners" },
94
95
  { value: "claimed", label: "Claimed by me" },
95
96
  { value: "all", label: "All Items" }
96
97
  ];
97
- function Cs({ summary: l }) {
98
+ function As({ summary: l }) {
98
99
  if (!l || l.total === 0) return /* @__PURE__ */ r("span", { className: "text-slate-300", children: "—" });
99
- const f = l.active > 0, q = l.latest_status === "review" ? "in review" : l.latest_status ?? "active", D = l.cost_impact, U = D != null && D !== 0 ? `${D > 0 ? "+" : "−"}$${Math.abs(D).toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : null;
100
+ const f = l.active > 0, q = l.latest_status === "review" ? "in review" : l.latest_status ?? "active", D = l.cost_impact, I = D != null && D !== 0 ? `${D > 0 ? "+" : "−"}$${Math.abs(D).toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : null;
100
101
  return /* @__PURE__ */ d(
101
102
  "span",
102
103
  {
@@ -117,23 +118,23 @@ function Cs({ summary: l }) {
117
118
  }
118
119
  ),
119
120
  f ? `${l.active} ${l.active === 1 ? "addendum" : "addendums"} ${q}` : `${l.total} ${q}`,
120
- U && /* @__PURE__ */ d("span", { className: "tabular-nums opacity-80", children: [
121
+ I && /* @__PURE__ */ d("span", { className: "tabular-nums opacity-80", children: [
121
122
  "· ",
122
- U
123
+ I
123
124
  ] })
124
125
  ]
125
126
  }
126
127
  );
127
128
  }
128
- function $s(l) {
129
- return Po(l);
129
+ function Os(l) {
130
+ return Qo(l);
130
131
  }
131
- function qs({ status: l }) {
132
+ function Ls({ status: l }) {
132
133
  return l ? /* @__PURE__ */ r("span", { className: $("rounded px-1.5 py-0.5 text-[11px] font-medium", l === "breached" ? "bg-red-50 text-red-600 dark:bg-red-500/10 dark:text-red-400" : l === "warning" ? "bg-amber-50 text-amber-600 dark:bg-amber-500/10 dark:text-amber-400" : "bg-emerald-50 text-emerald-600 dark:bg-emerald-500/10 dark:text-emerald-400"), children: l }) : /* @__PURE__ */ r("span", { className: "text-slate-300", children: "—" });
133
134
  }
134
- function Fs({ points: l, inline: f = !1 }) {
135
+ function Ds({ points: l, inline: f = !1 }) {
135
136
  if (l.length < 2) return null;
136
- const q = f ? 40 : 64, D = f ? 14 : 18, U = Math.max(...l), h = Math.min(...l), p = U - h || 1, v = q / (l.length - 1), W = l.map(
137
+ const q = f ? 40 : 64, D = f ? 14 : 18, I = Math.max(...l), h = Math.min(...l), p = I - h || 1, v = q / (l.length - 1), W = l.map(
137
138
  (he, g) => `${g === 0 ? "M" : "L"}${(g * v).toFixed(1)},${(D - 2 - (he - h) / p * (D - 4)).toFixed(1)}`
138
139
  ).join(" ");
139
140
  return /* @__PURE__ */ r(
@@ -147,12 +148,12 @@ function Fs({ points: l, inline: f = !1 }) {
147
148
  }
148
149
  );
149
150
  }
150
- function _t({
151
+ function Nt({
151
152
  label: l,
152
153
  count: f,
153
154
  filteredCount: q,
154
155
  active: D,
155
- isLoading: U,
156
+ isLoading: I,
156
157
  tone: h,
157
158
  trend: p,
158
159
  delta: v,
@@ -167,16 +168,16 @@ function _t({
167
168
  className: $(
168
169
  "nvr-section-enter flex items-center gap-1.5 bg-white px-3 py-2 text-left transition-colors hover:bg-slate-50 dark:bg-card dark:hover:bg-card/80",
169
170
  D && "bg-nvr-cyan/5 ring-1 ring-inset ring-nvr-cyan dark:bg-nvr-cyan/10",
170
- !D && !U && f === 0 && "opacity-50"
171
+ !D && !I && f === 0 && "opacity-50"
171
172
  ),
172
- children: U ? /* @__PURE__ */ r(ps, { className: "h-5 w-16 rounded" }) : /* @__PURE__ */ d(_e, { children: [
173
+ children: I ? /* @__PURE__ */ r(vs, { className: "h-5 w-16 rounded" }) : /* @__PURE__ */ d(_e, { children: [
173
174
  /* @__PURE__ */ r("span", { className: "flex items-baseline gap-1 text-[15px] font-semibold leading-none tabular-nums text-slate-900 dark:text-foreground", children: q != null ? /* @__PURE__ */ d(_e, { children: [
174
- /* @__PURE__ */ r("span", { className: "text-nvr-navy dark:text-nvr-cyan", children: /* @__PURE__ */ r(En, { value: q, format: ae }) }),
175
+ /* @__PURE__ */ r("span", { className: "text-nvr-navy dark:text-nvr-cyan", children: /* @__PURE__ */ r(On, { value: q, format: ae }) }),
175
176
  /* @__PURE__ */ d("span", { className: "text-[11px] font-medium text-slate-400", children: [
176
177
  "/ ",
177
- /* @__PURE__ */ r(En, { value: f, format: ae })
178
+ /* @__PURE__ */ r(On, { value: f, format: ae })
178
179
  ] })
179
- ] }) : /* @__PURE__ */ r(En, { value: f, format: ae }) }),
180
+ ] }) : /* @__PURE__ */ r(On, { value: f, format: ae }) }),
180
181
  /* @__PURE__ */ r(
181
182
  "span",
182
183
  {
@@ -200,17 +201,17 @@ function _t({
200
201
  ]
201
202
  }
202
203
  ),
203
- p && f > 0 && /* @__PURE__ */ r(Fs, { points: p, inline: !0 })
204
+ p && f > 0 && /* @__PURE__ */ r(Ds, { points: p, inline: !0 })
204
205
  ] })
205
206
  }
206
207
  );
207
208
  }
208
- function Ts({
209
+ function Ps({
209
210
  label: l,
210
211
  count: f,
211
212
  filteredCount: q,
212
213
  color: D,
213
- active: U,
214
+ active: I,
214
215
  onClick: h
215
216
  }) {
216
217
  return /* @__PURE__ */ d(
@@ -220,7 +221,7 @@ function Ts({
220
221
  onClick: h,
221
222
  className: $(
222
223
  "flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-[12px] font-medium transition-colors",
223
- U ? "border-nvr-cyan bg-nvr-cyan/10 text-nvr-navy dark:text-nvr-cyan" : "border-slate-200 bg-white text-slate-600 hover:border-slate-300 hover:bg-slate-50 dark:border-border dark:bg-card dark:text-slate-300"
224
+ I ? "border-nvr-cyan bg-nvr-cyan/10 text-nvr-navy dark:text-nvr-cyan" : "border-slate-200 bg-white text-slate-600 hover:border-slate-300 hover:bg-slate-50 dark:border-border dark:bg-card dark:text-slate-300"
224
225
  ),
225
226
  children: [
226
227
  /* @__PURE__ */ r(
@@ -242,19 +243,19 @@ function Ts({
242
243
  }
243
244
  );
244
245
  }
245
- function Nt(l) {
246
+ function St(l) {
246
247
  return l.split(".").map((f) => f.replace(/_/g, " ").replace(/\b\w/g, (q) => q.toUpperCase())).join(" → ");
247
248
  }
248
- function Rs({
249
+ function Ks({
249
250
  id: l,
250
251
  label: f,
251
252
  checked: q,
252
253
  onCheckedChange: D
253
254
  }) {
254
- const { attributes: U, listeners: h, setNodeRef: p, transform: v, transition: W, isDragging: he } = Pl({
255
+ const { attributes: I, listeners: h, setNodeRef: p, transform: v, transition: W, isDragging: he } = Ql({
255
256
  id: l
256
257
  }), g = {
257
- transform: Kl.Transform.toString(v),
258
+ transform: jl.Transform.toString(v),
258
259
  transition: W,
259
260
  opacity: he ? 0.4 : 1
260
261
  }, J = `col-toggle-${l}`;
@@ -262,37 +263,37 @@ function Rs({
262
263
  /* @__PURE__ */ r(
263
264
  "span",
264
265
  {
265
- ...U,
266
+ ...I,
266
267
  ...h,
267
268
  className: "cursor-grab text-slate-300 hover:text-slate-500 dark:text-muted-foreground",
268
- children: /* @__PURE__ */ r(ao, { className: "h-3.5 w-3.5" })
269
+ children: /* @__PURE__ */ r(io, { className: "h-3.5 w-3.5" })
269
270
  }
270
271
  ),
271
272
  /* @__PURE__ */ r(Ln, { id: J, checked: q, onCheckedChange: D }),
272
- /* @__PURE__ */ r(bs, { htmlFor: J, className: "cursor-pointer text-[12px] font-normal", children: f })
273
+ /* @__PURE__ */ r(ks, { htmlFor: J, className: "cursor-pointer text-[12px] font-normal", children: f })
273
274
  ] });
274
275
  }
275
- function Vi({
276
+ function Zi({
276
277
  queueId: l,
277
278
  realtime: f,
278
279
  renderError: q,
279
280
  hideCreateActions: D = !1,
280
- onAsk: U
281
+ onAsk: I
281
282
  }) {
282
- var Ur, Ir, Vr, Gr, Wr, Hr, Jr, Yr, zr, Xr, Zr, ea, ta, na, ra, aa;
283
- const h = Ml(), p = ha(), { userId: v } = ca(), W = lo(), { navigate: he } = oo(), [g, J] = y("all"), [Ne, L] = y(1), Dn = Q(go()), [St, fa] = y(() => {
283
+ var Ir, Vr, Gr, Wr, Hr, Jr, Yr, Xr, zr, Zr, ea, ta, na, ra, aa, la;
284
+ const h = Ul(), p = fa(), { userId: v } = da(), W = co(), { navigate: he } = uo(), [g, J] = y("all"), [Ne, L] = y(1), Dn = Q(vo()), [Ct, ga] = y(() => {
284
285
  try {
285
286
  return localStorage.getItem("nvr_table_density") === "comfortable" ? "comfortable" : "compact";
286
287
  } catch {
287
288
  return "compact";
288
289
  }
289
- }), [S, Le] = y("table"), [I, De] = y(""), [w, K] = y({}), [Ct, Pn] = y(() => /* @__PURE__ */ new Set()), [N, nt] = y(null), [fe, zt] = y(/* @__PURE__ */ new Set()), [rt, Xt] = y(null), [$t, Zt] = y(null), [en, qt] = y(0), Se = vo(), tn = To(), nn = Q({}).current, Kn = Q(/* @__PURE__ */ new Set()), [ga, xa] = y(0), [Mn, ya] = y(0), Pe = Q(!1), Ft = Q([]), Bn = Q(null), Qn = Q(!1), jn = Q(0), rn = Q("table");
290
- rn.current = S;
290
+ }), [C, Le] = y("table"), [V, De] = y(""), [w, K] = y({}), [$t, Pn] = y(() => /* @__PURE__ */ new Set()), [N, nt] = y(null), [fe, Xt] = y(/* @__PURE__ */ new Set()), [rt, zt] = y(null), [qt, Zt] = y(null), [en, Ft] = y(0), Se = So(), tn = Oo(), nn = Q({}).current, Kn = Q(/* @__PURE__ */ new Set()), [xa, ya] = y(0), [Mn, ka] = y(0), Pe = Q(!1), Rt = Q([]), Bn = Q(null), Qn = Q(!1), jn = Q(0), rn = Q("table");
291
+ rn.current = C;
291
292
  const an = 25, { data: s, error: Tt } = H({
292
293
  queryKey: ["queue-meta", l],
293
- queryFn: () => p.request(E(`/queues/${l}`)).then((e) => e.data),
294
+ queryFn: () => p.request(O(`/queues/${l}`)).then((e) => e.data),
294
295
  enabled: !!l
295
- }), { scopes: at, ready: Un } = Oo(), In = Q(!1), [Vn, Gn] = y(!1), [Ce, ka] = y({}), se = Q({});
296
+ }), { scopes: at, ready: Un } = Po(), In = Q(!1), [Vn, Gn] = y(!1), [Ce, va] = y({}), se = Q({});
296
297
  j(() => {
297
298
  if (In.current || !Un || !s) return;
298
299
  In.current = !0;
@@ -306,7 +307,7 @@ function Vi({
306
307
  (async () => {
307
308
  const t = {}, n = {}, a = async (o, c) => {
308
309
  const b = await p.request(
309
- E(`/items/${o.target_collection}`, {
310
+ O(`/items/${o.target_collection}`, {
310
311
  filter: JSON.stringify({ id: { _in: c } }),
311
312
  fields: `id,${o.display_field}`,
312
313
  limit: "200"
@@ -319,44 +320,44 @@ function Vi({
319
320
  ];
320
321
  };
321
322
  for (const o of e) {
322
- const c = Eo(at, { collection: o.target_collection });
323
+ const c = Ko(at, { collection: o.target_collection });
323
324
  if (!c) continue;
324
325
  const b = `extra.${o.path}`;
325
326
  try {
326
327
  const m = at.restricted[c.name] ?? [];
327
328
  if (m.length > 0) {
328
- const R = await a(o, m);
329
- R.length > 0 && (n[b.slice(6)] = R);
329
+ const T = await a(o, m);
330
+ T.length > 0 && (n[b.slice(6)] = T);
330
331
  }
331
- const O = Lo(at, c.name);
332
- if (O.length === 0) continue;
333
- const T = w[b];
334
- if (T && (Array.isArray(T) ? T.length > 0 : T !== ""))
332
+ const A = Mo(at, c.name);
333
+ if (A.length === 0) continue;
334
+ const R = w[b];
335
+ if (R && (Array.isArray(R) ? R.length > 0 : R !== ""))
335
336
  continue;
336
- const k = O.length ? await a(o, O) : [];
337
+ const k = A.length ? await a(o, A) : [];
337
338
  k.length > 0 && (t[b] = k);
338
339
  } catch {
339
340
  }
340
341
  }
341
- Object.keys(n).length > 0 && ka(n), Object.keys(t).length > 0 && (se.current = t, K((o) => ({ ...o, ...t }))), Gn(!0);
342
+ Object.keys(n).length > 0 && va(n), Object.keys(t).length > 0 && (se.current = t, K((o) => ({ ...o, ...t }))), Gn(!0);
342
343
  })();
343
344
  }, [Un, at, s]);
344
- const Ke = ((Ir = (Ur = s == null ? void 0 : s.sources) == null ? void 0 : Ur.find((e) => e.type === "collection")) == null ? void 0 : Ir.collection) ?? null, { data: Wn = [] } = H({
345
+ const Ke = ((Vr = (Ir = s == null ? void 0 : s.sources) == null ? void 0 : Ir.find((e) => e.type === "collection")) == null ? void 0 : Vr.collection) ?? null, { data: Wn = [] } = H({
345
346
  queryKey: ["queue-browser-quick-filters", Ke],
346
- queryFn: () => p.request(E(`/collections/${Ke}`)).then((e) => {
347
+ queryFn: () => p.request(O(`/collections/${Ke}`)).then((e) => {
347
348
  var t, n;
348
349
  return ((n = (t = e.data) == null ? void 0 : t.browser_config) == null ? void 0 : n.quick_filters) ?? [];
349
350
  }).catch(() => []),
350
351
  enabled: !!Ke,
351
352
  staleTime: 3e5
352
- }), X = G(() => {
353
+ }), z = U(() => {
353
354
  const e = /* @__PURE__ */ new Set(), t = [];
354
355
  for (const n of (s == null ? void 0 : s.sources) ?? [])
355
356
  n.type !== "collection" || !n.collection || e.has(n.collection) || (e.add(n.collection), t.push(n.collection));
356
357
  return t;
357
- }, [s == null ? void 0 : s.sources]), Rt = Do(
358
- X.length === 1 ? X[0] : null
359
- ), ln = D === !0 || Array.isArray(D) && X.length > 0 && X.every((e) => D.includes(e)), ie = (s == null ? void 0 : s.claims_enabled) !== !1, u = s == null ? void 0 : s.display_config, $e = (u == null ? void 0 : u.views) ?? ["table", "kanban", "workload"], va = (u == null ? void 0 : u.work_next) !== !1, At = (u == null ? void 0 : u.bulk_actions) !== !1, on = Uo(
358
+ }, [s == null ? void 0 : s.sources]), Et = Bo(
359
+ z.length === 1 ? z[0] : null
360
+ ), ln = D === !0 || Array.isArray(D) && z.length > 0 && z.every((e) => D.includes(e)), ie = (s == null ? void 0 : s.claims_enabled) !== !1, u = s == null ? void 0 : s.display_config, $e = (u == null ? void 0 : u.views) ?? ["table", "kanban", "workload"], wa = (u == null ? void 0 : u.work_next) !== !1, At = (u == null ? void 0 : u.bulk_actions) !== !1, on = Wo(
360
361
  [
361
362
  ...new Set(
362
363
  ((s == null ? void 0 : s.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
@@ -370,12 +371,12 @@ function Vi({
370
371
  j(() => {
371
372
  !s || Hn.current || (Hn.current = !0, De("-priority"));
372
373
  }, [s]);
373
- const [le, wa] = y(!1);
374
+ const [le, _a] = y(!1);
374
375
  j(() => {
375
- s != null && s.display_config && !$e.includes(S) && Le($e[0]);
376
- }, [s, S, $e]), j(() => {
376
+ s != null && s.display_config && !$e.includes(C) && Le($e[0]);
377
+ }, [s, C, $e]), j(() => {
377
378
  if (!(s != null && s.sources)) return;
378
- const e = tn ? (k, R) => tn.subscribeCollections(k, R) : f == null ? void 0 : f.subscribe;
379
+ const e = tn ? (k, T) => tn.subscribeCollections(k, T) : f == null ? void 0 : f.subscribe;
379
380
  if (!e) return;
380
381
  const t = [
381
382
  ...new Set(
@@ -387,42 +388,42 @@ function Vi({
387
388
  let a = null, o = null, c = null;
388
389
  const b = () => {
389
390
  c || (c = setTimeout(() => {
390
- c = null, ya((k) => k + 1);
391
+ c = null, ka((k) => k + 1);
391
392
  }, 1500));
392
393
  }, m = () => {
393
394
  o || (o = setTimeout(() => {
394
395
  if (o = null, jn.current > 0 || Qn.current) {
395
- Ft.current = [], qt((k) => k + 1);
396
+ Rt.current = [], Ft((k) => k + 1);
396
397
  return;
397
398
  }
398
399
  Pe.current = !0, h.invalidateQueries({ queryKey: ["queue-items", l] }), h.invalidateQueries({ queryKey: ["queue-workload", l] });
399
400
  }, 900));
400
- }, O = (k) => {
401
- let R = !1, B = 0, ve = !1;
402
- const Ee = k.flatMap(
403
- (_) => _ ? ko(_) : [_]
401
+ }, A = (k) => {
402
+ let T = !1, B = 0, ve = !1;
403
+ const Oe = k.flatMap(
404
+ (_) => _ ? No(_) : [_]
404
405
  );
405
- for (const _ of Ee) {
406
- const pe = _ == null ? void 0 : _.changed_fields, Ht = (_ == null ? void 0 : _.collection) != null ? `${_.collection}:${String(_.item)}` : null, la = Ht != null && Kn.current.has(Ht);
407
- if (_ && !_.action && (pe != null && pe.length) && pe.every((yt) => yt.startsWith("$"))) {
408
- pe.includes(kt.tasks) && n.add("queue-task-counts"), pe.includes(kt.integrations) && n.add("queue-integrations-summary"), pe.includes(kt.addendums) && n.add("queue-collection-addendums"), pe.includes(kt.lock) && xa((yt) => yt + 1), pe.includes(kt.state) && (ve = !0, (la || rn.current === "kanban") && (R = !0)), a || (a = setTimeout(() => {
406
+ for (const _ of Oe) {
407
+ const pe = _ == null ? void 0 : _.changed_fields, Ht = (_ == null ? void 0 : _.collection) != null ? `${_.collection}:${String(_.item)}` : null, oa = Ht != null && Kn.current.has(Ht);
408
+ if (_ && !_.action && (pe != null && pe.length) && pe.every((kt) => kt.startsWith("$"))) {
409
+ pe.includes(vt.tasks) && n.add("queue-task-counts"), pe.includes(vt.integrations) && n.add("queue-integrations-summary"), pe.includes(vt.addendums) && n.add("queue-collection-addendums"), pe.includes(vt.lock) && ya((kt) => kt + 1), pe.includes(vt.state) && (ve = !0, (oa || rn.current === "kanban") && (T = !0)), a || (a = setTimeout(() => {
409
410
  a = null;
410
- for (const yt of n) h.invalidateQueries({ queryKey: [yt] });
411
+ for (const kt of n) h.invalidateQueries({ queryKey: [kt] });
411
412
  n.clear();
412
413
  }, 300));
413
414
  continue;
414
415
  }
415
416
  ve = !0;
416
- const ql = (_ == null ? void 0 : _.collection) != null && Co(_.collection, _.item);
417
- Ht && (la || (_ == null ? void 0 : _.action) === "create" || rn.current === "kanban") ? (R = !0, ql || Ft.current.push({ key: Ht, by: null })) : B += 1;
417
+ const El = (_ == null ? void 0 : _.collection) != null && Ro(_.collection, _.item);
418
+ Ht && (oa || (_ == null ? void 0 : _.action) === "create" || rn.current === "kanban") ? (T = !0, El || Rt.current.push({ key: Ht, by: null })) : B += 1;
418
419
  }
419
- B > 0 && qt((_) => _ + B), R && m(), ve && b();
420
- }, T = e(t, (k) => po(nn, [k ?? {}], O));
420
+ B > 0 && Ft((_) => _ + B), T && m(), ve && b();
421
+ }, R = e(t, (k) => xo(nn, [k ?? {}], A));
421
422
  return () => {
422
- T(), ho(nn), a && clearTimeout(a), o && clearTimeout(o), c && clearTimeout(c);
423
+ R(), yo(nn), a && clearTimeout(a), o && clearTimeout(o), c && clearTimeout(c);
423
424
  };
424
425
  }, [tn, f, s == null ? void 0 : s.sources, h, l, v, nn]);
425
- const Me = io(w, 350), _a = JSON.stringify(Me) === JSON.stringify(w), sn = Q(!1), qe = S === "table" && !!N, Jn = (() => {
426
+ const Me = bo(w, 350), Na = JSON.stringify(Me) === JSON.stringify(w), sn = Q(!1), qe = C === "table" && !!N, Jn = (() => {
426
427
  const e = /* @__PURE__ */ new Set();
427
428
  for (const t of (s == null ? void 0 : s.extra_field_meta) ?? [])
428
429
  t.aggregate && t.aggregate !== "count" && e.add(t.path);
@@ -452,17 +453,17 @@ function Vi({
452
453
  function Be(e, t) {
453
454
  K((n) => ({ ...n, [e]: n[e] === t ? "" : t })), L(1);
454
455
  }
455
- function Na(e) {
456
+ function Sa(e) {
456
457
  K((t) => {
457
458
  const n = t.state, a = Array.isArray(n) ? n : n ? [n] : [], o = a.includes(e) ? a.filter((c) => c !== e) : [...a, e];
458
459
  return { ...t, state: o };
459
460
  }), L(1);
460
461
  }
461
- const Sa = Array.isArray(w.state) ? w.state : w.state ? [w.state] : [], Ca = (e) => !e || Array.isArray(e) && e.length === 0;
462
- function $a() {
462
+ const Ca = Array.isArray(w.state) ? w.state : w.state ? [w.state] : [], $a = (e) => !e || Array.isArray(e) && e.length === 0;
463
+ function qa() {
463
464
  K({ ...se.current }), J("all"), L(1);
464
465
  }
465
- const [lt, qa] = y(() => {
466
+ const [lt, Fa] = y(() => {
466
467
  try {
467
468
  return localStorage.getItem("nvr_queue_insights_open") === "1";
468
469
  } catch {
@@ -475,35 +476,35 @@ function Vi({
475
476
  } catch {
476
477
  }
477
478
  }, [lt]);
478
- const { data: Fa = [] } = H({
479
+ const { data: Ra = [] } = H({
479
480
  queryKey: ["queue-view-subs", l],
480
- queryFn: () => p.request(E("/notification-subscriptions")).then((e) => (e.data ?? []).filter((t) => t.queue_id === l)).catch(() => []),
481
+ queryFn: () => p.request(O("/notification-subscriptions")).then((e) => (e.data ?? []).filter((t) => t.queue_id === l)).catch(() => []),
481
482
  staleTime: 3e4
482
- }), Ot = (e) => Fa.find((t) => t.queue_view_id === e), Ta = (e) => {
483
+ }), Ot = (e) => Ra.find((t) => t.queue_view_id === e), Ta = (e) => {
483
484
  const t = Ot(e);
484
- (t ? p.request(An(`/notification-subscriptions/${t.id}`)) : p.request(
485
+ (t ? p.request(En(`/notification-subscriptions/${t.id}`)) : p.request(
485
486
  re("/notification-subscriptions", {
486
487
  queue_id: l,
487
488
  queue_view_id: e,
488
489
  digest_frequency: "instant"
489
490
  })
490
491
  )).then(() => {
491
- A.success(
492
+ E.success(
492
493
  t ? "Unsubscribed" : "Subscribed — new arrivals in this view notify you"
493
494
  ), h.invalidateQueries({ queryKey: ["queue-view-subs", l] });
494
- }).catch((a) => A.error(vt(a, "Failed")));
495
+ }).catch((a) => E.error(wt(a, "Failed")));
495
496
  }, [Yn, cn] = y(null), dn = [
496
497
  ...new Set(
497
498
  ((s == null ? void 0 : s.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
498
499
  )
499
- ], { data: Ra = {} } = H({
500
+ ], { data: Ea = {} } = H({
500
501
  queryKey: ["queue-custom-actions", l, dn.join(",")],
501
502
  queryFn: async () => {
502
503
  const e = {};
503
504
  for (const t of dn.slice(0, 6))
504
505
  try {
505
506
  const n = await p.request(
506
- E("/custom-actions", { collection: t })
507
+ O("/custom-actions", { collection: t })
507
508
  );
508
509
  e[t] = n.data ?? [];
509
510
  } catch {
@@ -513,18 +514,18 @@ function Vi({
513
514
  },
514
515
  enabled: dn.length > 0,
515
516
  staleTime: 6e4
516
- }), Aa = (e) => Ra[e] ?? [], Oa = (e, t) => {
517
+ }), Aa = (e) => Ea[e] ?? [], Oa = (e, t) => {
517
518
  p.request(re(`/custom-actions/${e.id}/execute`, { item: t.item_id })).then(() => {
518
- A.success(`${e.label} ran`), h.invalidateQueries({ queryKey: ["queue-items", l] });
519
+ E.success(`${e.label} ran`), h.invalidateQueries({ queryKey: ["queue-items", l] });
519
520
  }).catch((n) => {
520
521
  const a = n.response;
521
- A.error((a == null ? void 0 : a.error) ?? vt(n, `${e.label} failed`));
522
+ E.error((a == null ? void 0 : a.error) ?? wt(n, `${e.label} failed`));
522
523
  });
523
524
  }, { data: un = [] } = H({
524
525
  queryKey: ["queue-triage-labels", l],
525
- queryFn: () => p.request(E(`/queues/${l}/triage-labels`)).then((e) => e.data ?? []).catch(() => []),
526
+ queryFn: () => p.request(O(`/queues/${l}/triage-labels`)).then((e) => e.data ?? []).catch(() => []),
526
527
  staleTime: 3e4
527
- }), zn = (e, t) => {
528
+ }), Xn = (e, t) => {
528
529
  p.request(
529
530
  re(`/queues/${l}/triage-labels/toggle`, {
530
531
  collection: e.collection,
@@ -533,43 +534,43 @@ function Vi({
533
534
  })
534
535
  ).then(() => {
535
536
  h.invalidateQueries({ queryKey: ["queue-items", l] }), h.invalidateQueries({ queryKey: ["queue-triage-labels", l] });
536
- }).catch((n) => A.error(vt(n, "Label failed")));
537
+ }).catch((n) => E.error(wt(n, "Label failed")));
537
538
  }, {
538
539
  data: i,
539
- isLoading: Xn,
540
- isFetching: Et,
541
- isPlaceholderData: Ea,
540
+ isLoading: zn,
541
+ isFetching: Lt,
542
+ isPlaceholderData: La,
542
543
  dataUpdatedAt: oe,
543
544
  isError: Zn,
544
- error: La,
545
- refetch: Da
545
+ error: Da,
546
+ refetch: Pa
546
547
  } = H({
547
548
  queryKey: [
548
549
  "queue-items",
549
550
  l,
550
551
  g,
551
- I,
552
+ V,
552
553
  Me,
553
- S === "table" && !N ? Ne : "all",
554
+ C === "table" && !N ? Ne : "all",
554
555
  N
555
556
  ],
556
557
  queryFn: async () => {
557
- const e = !qe && S === "table", t = JSON.stringify([l, g, I, ge, an]), n = e ? xo(Dn.current, t, Ne, "").after : void 0, a = await p.request(
558
- E(`/queues/${l}/items`, {
558
+ const e = !qe && C === "table", t = JSON.stringify([l, g, V, ge, an]), n = e ? wo(Dn.current, t, Ne, "").after : void 0, a = await p.request(
559
+ O(`/queues/${l}/items`, {
559
560
  scope: g,
560
561
  // Last State Change is Aging read the other way round: the newest
561
562
  // move is the least aged.
562
- sort: I === "state_entered" ? "-aging_hours" : I === "-state_entered" ? "aging_hours" : I,
563
+ sort: V === "state_entered" ? "-aging_hours" : V === "-state_entered" ? "aging_hours" : V,
563
564
  filters: JSON.stringify(ge),
564
565
  // Table + group: headers only (rows load per group on expand, #741).
565
566
  // Kanban renders the full matching set, grouped client-side.
566
567
  ...qe ? {
567
568
  group_by: N,
568
569
  ...Jn.length ? { group_sums: Jn.join(",") } : {}
569
- } : S === "table" ? { page: Ne, limit: an, ...n ? { after: n } : {} } : {}
570
+ } : C === "table" ? { page: Ne, limit: an, ...n ? { after: n } : {} } : {}
570
571
  })
571
572
  );
572
- return n && yo(Dn.current, t, Ne, a.next_cursor), a;
573
+ return n && _o(Dn.current, t, Ne, a.next_cursor), a;
573
574
  },
574
575
  // Wait for display_config AND scope seeding so the first fetch uses the
575
576
  // configured defaults and already carries the viewer's restricted filters.
@@ -578,7 +579,7 @@ function Vi({
578
579
  // first fetch went out WITHOUT the seeded scope and refired ~350ms later
579
580
  // with it (3.3s + 8.7s of work for one page). The first fetch now also
580
581
  // waits for the debounced copy to settle; later typing still debounces.
581
- enabled: !!l && le && Vn && (sn.current || _a),
582
+ enabled: !!l && le && Vn && (sn.current || Na),
582
583
  // Keep the previous page rendered while a sort/filter/page change refetches —
583
584
  // swapping to skeletons collapsed the table height and jittered the page.
584
585
  placeholderData: (e) => e
@@ -591,20 +592,20 @@ function Vi({
591
592
  }
592
593
  ).map(([e]) => e), er = Qe.length > 0 && Object.keys(ge).every((e) => Qe.includes(e)), tr = Object.fromEntries(
593
594
  Object.entries(ge).filter(([e]) => !Qe.includes(e))
594
- ), { data: Pa } = H({
595
+ ), { data: Ka } = H({
595
596
  queryKey: ["queue-default-hidden", l, g, tr],
596
- enabled: !!l && !!i && !Et && i.total === 0 && ((Vr = i.empty) == null ? void 0 : Vr.reason) === "filters" && Qe.length > 0 && !er,
597
+ enabled: !!l && !!i && !Lt && i.total === 0 && ((Gr = i.empty) == null ? void 0 : Gr.reason) === "filters" && Qe.length > 0 && !er,
597
598
  staleTime: 3e4,
598
599
  retry: !1,
599
600
  queryFn: () => p.request(
600
- E(`/queues/${l}/items`, {
601
+ O(`/queues/${l}/items`, {
601
602
  scope: g,
602
603
  filters: JSON.stringify(tr),
603
604
  page: 1,
604
605
  limit: 1
605
606
  })
606
607
  ).then((e) => Number(e.total ?? 0))
607
- }), ce = er ? Math.max(0, (((Gr = i == null ? void 0 : i.stats) == null ? void 0 : Gr.total) ?? 0) - ((i == null ? void 0 : i.total) ?? 0)) : Pa ?? 0, nr = (e) => Qe.map(e).join(" and "), rr = () => {
608
+ }), ce = er ? Math.max(0, (((Wr = i == null ? void 0 : i.stats) == null ? void 0 : Wr.total) ?? 0) - ((i == null ? void 0 : i.total) ?? 0)) : Ka ?? 0, nr = (e) => Qe.map(e).join(" and "), rr = () => {
608
609
  K((e) => {
609
610
  const t = { ...e };
610
611
  for (const n of Qe) delete t[n];
@@ -619,29 +620,29 @@ function Vi({
619
620
  queue: l,
620
621
  at: oe,
621
622
  scope: g,
622
- sort: I,
623
+ sort: V,
623
624
  filters: JSON.stringify(Me),
624
625
  page: Ne
625
626
  }, a = t.find((o) => o.queue === l);
626
627
  t.push(n), t.length > 50 && t.shift(), a && a !== n && oe - Number(a.at) < 2e3 && t.filter((o) => o.queue === l).length === 2 && console.warn("[queue] duplicate first fetch", { first: a, second: n });
627
628
  }, [oe]);
628
- const je = Xn && !i || !le || !Vn && !i, ar = (Et && !Xn || Ea && Et) && !Pe.current, Ka = G(
629
+ const je = zn && !i || !le || !Vn && !i, ar = (Lt && !zn || La && Lt) && !Pe.current, Ma = U(
629
630
  () => (qe ? [] : (i == null ? void 0 : i.data) ?? []).slice(0, 100).map((e) => ({ collection: e.collection, item: e.item_id })),
630
631
  [qe, i == null ? void 0 : i.data]
631
- ), Ma = $o(Ka), Lt = vs(), lr = co(Et && !Pe.current);
632
+ ), Ba = To(Ma), Dt = qs(), lr = po(Lt && !Pe.current);
632
633
  async function or(e, t) {
633
634
  var m;
634
- const a = (await p.request(E(`/pipelines/instance/${e.collection}/${e.item_id}`))).data;
635
+ const a = (await p.request(O(`/pipelines/instance/${e.collection}/${e.item_id}`))).data;
635
636
  if (!a || a.states.length === 0)
636
637
  throw new Error("This item has no workflow instance");
637
- const o = a.states.find((O) => O.key === t);
638
+ const o = a.states.find((A) => A.key === t);
638
639
  if (!o) throw new Error("Target state not found");
639
640
  const c = a.available_transitions.find(
640
- (O) => O.to_state === o.id
641
+ (A) => A.to_state === o.id
641
642
  );
642
643
  if (!c) throw new Error("No transition available to move this item here");
643
644
  let b = null;
644
- if (ws(c) && (b = await Lt.ask(((m = c.label) == null ? void 0 : m.trim()) || "Move"), !b))
645
+ if (Fs(c) && (b = await Dt.ask(((m = c.label) == null ? void 0 : m.trim()) || "Move"), !b))
645
646
  throw new Error("Not moved — this move needs a note");
646
647
  await p.request(
647
648
  re(`/pipelines/instance/${e.collection}/${e.item_id}/transition`, {
@@ -650,7 +651,7 @@ function Vi({
650
651
  })
651
652
  );
652
653
  }
653
- const Ba = we({
654
+ const Qa = we({
654
655
  mutationFn: async ({ item: e, targetState: t }) => {
655
656
  await or(e, t);
656
657
  },
@@ -658,7 +659,7 @@ function Vi({
658
659
  h.invalidateQueries({ queryKey: ["queue-items", l, g] });
659
660
  },
660
661
  onError: (e) => {
661
- A.error(vt(e, "Failed to move item")), h.invalidateQueries({ queryKey: ["queue-items", l, g] });
662
+ E.error(wt(e, "Failed to move item")), h.invalidateQueries({ queryKey: ["queue-items", l, g] });
662
663
  }
663
664
  }), Fe = we({
664
665
  mutationFn: (e) => p.request(
@@ -668,7 +669,7 @@ function Vi({
668
669
  })
669
670
  ),
670
671
  onSuccess: () => h.invalidateQueries({ queryKey: ["queue-items", l, g] }),
671
- onError: () => A.error("Failed to claim item")
672
+ onError: () => E.error("Failed to claim item")
672
673
  }), Ue = we({
673
674
  mutationFn: (e) => p.request(
674
675
  re(`/queues/${l}/release`, {
@@ -677,69 +678,69 @@ function Vi({
677
678
  })
678
679
  ),
679
680
  onSuccess: () => h.invalidateQueries({ queryKey: ["queue-items", l, g] }),
680
- onError: () => A.error("Failed to release item")
681
+ onError: () => E.error("Failed to release item")
681
682
  }), { data: Ie } = H({
682
683
  queryKey: ["queue-column-prefs", l],
683
- queryFn: () => p.request(E(`/queues/${l}/column-prefs`)),
684
+ queryFn: () => p.request(O(`/queues/${l}/column-prefs`)),
684
685
  enabled: !!l
685
- }), [mn, Dt] = y(null), [Ve, bn] = y(null);
686
+ }), [mn, Pt] = y(null), [Ve, bn] = y(null);
686
687
  j(() => {
687
688
  Ie && bn(Ie.data.default_view_id);
688
689
  }, [Ie]);
689
- const [Qa, sr] = y({}), de = qe ? (i == null ? void 0 : i.groups) ?? null : null, Pt = (de ?? []).filter((e) => !fe.has(e.key)).map((e) => e.key).flatMap(
690
- (e) => Array.from({ length: Qa[e] ?? 1 }, (t, n) => ({ key: e, page: n + 1 }))
691
- ), pn = ze({
692
- queries: Pt.map(({ key: e, page: t }) => ({
690
+ const [ja, sr] = y({}), de = qe ? (i == null ? void 0 : i.groups) ?? null : null, Kt = (de ?? []).filter((e) => !fe.has(e.key)).map((e) => e.key).flatMap(
691
+ (e) => Array.from({ length: ja[e] ?? 1 }, (t, n) => ({ key: e, page: n + 1 }))
692
+ ), pn = Xe({
693
+ queries: Kt.map(({ key: e, page: t }) => ({
693
694
  queryKey: [
694
695
  "queue-items",
695
696
  l,
696
697
  "group-rows",
697
698
  g,
698
- I,
699
+ V,
699
700
  Me,
700
701
  N,
701
702
  e,
702
703
  t
703
704
  ],
704
705
  queryFn: () => p.request(
705
- E(`/queues/${l}/items`, {
706
+ O(`/queues/${l}/items`, {
706
707
  scope: g,
707
- sort: I === "state_entered" ? "-aging_hours" : I === "-state_entered" ? "aging_hours" : I,
708
+ sort: V === "state_entered" ? "-aging_hours" : V === "-state_entered" ? "aging_hours" : V,
708
709
  filters: JSON.stringify(ge),
709
710
  group_by: N,
710
711
  group_key: e,
711
712
  page: t,
712
- limit: Ns
713
+ limit: Ts
713
714
  })
714
715
  ).then((n) => ({ key: e, rows: n.data })),
715
716
  enabled: !!i && qe,
716
717
  placeholderData: (n) => n
717
718
  }))
718
- }), ja = pn.map((e) => e.dataUpdatedAt).join(","), hn = G(() => {
719
+ }), Ua = pn.map((e) => e.dataUpdatedAt).join(","), hn = U(() => {
719
720
  const e = /* @__PURE__ */ new Map();
720
721
  return pn.forEach((t, n) => {
721
722
  if (!t.data) return;
722
- const a = Pt[n].key;
723
+ const a = Kt[n].key;
723
724
  e.set(a, [...e.get(a) ?? [], ...t.data.rows]);
724
725
  }), e;
725
- }, [ja, Pt.map((e) => `${e.key}\0${e.page}`).join("")]), Ua = new Set(
726
- pn.flatMap((e, t) => e.isFetching ? [Pt[t].key] : [])
727
- ), C = de ? [...hn.values()].flat() : (i == null ? void 0 : i.data) ?? [];
728
- Qo(
726
+ }, [Ua, Kt.map((e) => `${e.key}\0${e.page}`).join("")]), Ia = new Set(
727
+ pn.flatMap((e, t) => e.isFetching ? [Kt[t].key] : [])
728
+ ), S = de ? [...hn.values()].flat() : (i == null ? void 0 : i.data) ?? [];
729
+ Vo(
729
730
  l ? {
730
731
  queue: {
731
732
  id: l,
732
733
  label: s == null ? void 0 : s.name,
733
734
  scope: g,
734
735
  filters: JSON.stringify(ge),
735
- items: C.slice(0, 100).map((e) => ({ collection: e.collection, id: e.item_id }))
736
+ items: S.slice(0, 100).map((e) => ({ collection: e.collection, id: e.item_id }))
736
737
  }
737
738
  } : null
738
739
  );
739
- const Ia = jo(), ot = C.some((e) => e.fulfilment !== void 0), st = C.some((e) => e.send_backs !== void 0), { data: Kt, dataUpdatedAt: Va } = H({
740
+ const Va = Go(), ot = S.some((e) => e.fulfilment !== void 0), st = S.some((e) => e.send_backs !== void 0), { data: Mt, dataUpdatedAt: Ga } = H({
740
741
  queryKey: ["queue-live-stats", l, g, Me, Mn],
741
742
  queryFn: () => p.request(
742
- E(`/queues/${l}/items`, {
743
+ O(`/queues/${l}/items`, {
743
744
  scope: g,
744
745
  filters: JSON.stringify(ge),
745
746
  page: 1,
@@ -750,18 +751,18 @@ function Vi({
750
751
  staleTime: Number.POSITIVE_INFINITY,
751
752
  placeholderData: (e) => e,
752
753
  retry: !1
753
- }), fn = !!Kt && Va > oe, x = fn ? Kt.stats : i == null ? void 0 : i.stats, Y = fn ? Kt.filtered_stats ?? null : (i == null ? void 0 : i.filtered_stats) ?? null, ir = fn ? Kt.state_counts : i == null ? void 0 : i.state_counts;
754
- Kn.current = new Set(C.map((e) => `${e.collection}:${e.item_id}`));
755
- const Mt = wo(
756
- C.map((e) => ({ collection: e.collection, id: e.item_id })),
757
- ga
754
+ }), fn = !!Mt && Ga > oe, x = fn ? Mt.stats : i == null ? void 0 : i.stats, Y = fn ? Mt.filtered_stats ?? null : (i == null ? void 0 : i.filtered_stats) ?? null, ir = fn ? Mt.state_counts : i == null ? void 0 : i.state_counts;
755
+ Kn.current = new Set(S.map((e) => `${e.collection}:${e.item_id}`));
756
+ const Bt = Co(
757
+ S.map((e) => ({ collection: e.collection, id: e.item_id })),
758
+ xa
758
759
  ), cr = Q(oe), dr = Q(0);
759
760
  !Pe.current && oe !== dr.current && (cr.current = oe), j(() => {
760
- const e = new Set(C.map((t) => `${t.collection}:${t.item_id}`));
761
+ const e = new Set(S.map((t) => `${t.collection}:${t.item_id}`));
761
762
  if (Pe.current) {
762
763
  Pe.current = !1, dr.current = oe;
763
- const t = Ft.current;
764
- Ft.current = [];
764
+ const t = Rt.current;
765
+ Rt.current = [];
765
766
  const n = Bn.current, a = /* @__PURE__ */ new Set();
766
767
  for (const o of t)
767
768
  !e.has(o.key) || a.has(o.key) || (a.add(o.key), Se.note([o.key], o.by, n && !n.has(o.key) ? "create" : "update"));
@@ -772,19 +773,19 @@ function Vi({
772
773
  }
773
774
  Bn.current = e;
774
775
  }, [oe]), j(() => {
775
- qt(0);
776
+ Ft(0);
776
777
  }, [i]);
777
- function Ga() {
778
- h.invalidateQueries({ queryKey: ["queue-items", l] }), h.invalidateQueries({ queryKey: ["queue-workload", l] }), qt(0);
778
+ function Wa() {
779
+ h.invalidateQueries({ queryKey: ["queue-items", l] }), h.invalidateQueries({ queryKey: ["queue-workload", l] }), Ft(0);
779
780
  }
780
781
  const { data: ue } = H({
781
782
  queryKey: ["queue-trends", l],
782
- queryFn: () => p.request(E(`/queues/${l}/trends`, { days: 14 })),
783
+ queryFn: () => p.request(O(`/queues/${l}/trends`, { days: 14 })),
783
784
  enabled: !!l,
784
785
  staleTime: 300 * 1e3
785
786
  }), { data: me } = H({
786
787
  queryKey: ["queue-trends", l, "mine"],
787
- queryFn: () => p.request(E(`/queues/${l}/trends`, { days: 14, scope: "mine" })),
788
+ queryFn: () => p.request(O(`/queues/${l}/trends`, { days: 14, scope: "mine" })),
788
789
  enabled: !!l && g === "mine",
789
790
  staleTime: 300 * 1e3
790
791
  });
@@ -794,29 +795,29 @@ function Vi({
794
795
  const a = n.map((c) => c[e]), o = n[n.length - 1];
795
796
  return { trend: a, delta: ((x == null ? void 0 : x[e]) ?? 0) - o[e] };
796
797
  }
797
- const be = G(() => {
798
+ const be = U(() => {
798
799
  const t = (g === "all" ? ue == null ? void 0 : ue.data : g === "mine" ? me == null ? void 0 : me.data : void 0) ?? [];
799
800
  if (t.length < 3 || !x) return null;
800
801
  const n = t.map(
801
802
  (b) => g === "mine" ? b.owned ?? b.total : b.total
802
803
  ), a = n.slice(1).map((b, m) => b - n[m]), o = a.reduce((b, m) => b + m, 0) / a.length, c = x.total;
803
804
  return Math.abs(o) < 0.05 ? { dir: "flat", pace: o, days: null } : o < 0 ? { dir: "down", pace: o, days: Math.max(1, Math.ceil(c / -o)) } : { dir: "up", pace: o, days: null };
804
- }, [ue == null ? void 0 : ue.data, me == null ? void 0 : me.data, g, x]), ct = G(
805
+ }, [ue == null ? void 0 : ue.data, me == null ? void 0 : me.data, g, x]), ct = U(
805
806
  () => [
806
807
  ...new Set(
807
808
  ((s == null ? void 0 : s.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
808
809
  )
809
810
  ],
810
811
  [s == null ? void 0 : s.sources]
811
- ), { data: Wa } = H({
812
+ ), { data: Ha } = H({
812
813
  queryKey: ["collections"],
813
- queryFn: () => p.request(E("/collections")).then((e) => e.data),
814
+ queryFn: () => p.request(O("/collections")).then((e) => e.data),
814
815
  staleTime: 300 * 1e3
815
- }), Ge = ze({
816
+ }), Ge = Xe({
816
817
  queries: ct.map((e) => ({
817
818
  queryKey: ["queue-collection-addendums", e],
818
819
  queryFn: () => p.request(
819
- E(`/collections/${e}`)
820
+ O(`/collections/${e}`)
820
821
  ).then((t) => {
821
822
  var n;
822
823
  return !!((n = t.data) != null && n.addendums_enabled);
@@ -825,19 +826,19 @@ function Vi({
825
826
  }))
826
827
  }).some((e) => e.data === !0), { data: gn = [] } = H({
827
828
  queryKey: ["queue-integrations-collections"],
828
- queryFn: () => p.request(E("/integration-obligations/collections")).then((e) => e.data ?? []).catch(() => []),
829
+ queryFn: () => p.request(O("/integration-obligations/collections")).then((e) => e.data ?? []).catch(() => []),
829
830
  staleTime: 300 * 1e3
830
- }), xe = ct.some((e) => gn.includes(e)), xn = G(() => {
831
+ }), xe = ct.some((e) => gn.includes(e)), xn = U(() => {
831
832
  var t;
832
833
  const e = {};
833
834
  if (!xe) return e;
834
- for (const n of C) {
835
+ for (const n of S) {
835
836
  if (!gn.includes(n.collection)) continue;
836
837
  const a = e[t = n.collection] ?? (e[t] = []);
837
838
  a.length < 500 && a.push(n.item_id);
838
839
  }
839
840
  return e;
840
- }, [C, gn, xe]), ur = Object.keys(xn), mr = ze({
841
+ }, [S, gn, xe]), ur = Object.keys(xn), mr = Xe({
841
842
  queries: ur.map((e) => ({
842
843
  queryKey: ["queue-integrations-summary", e, xn[e].join(",")],
843
844
  queryFn: () => p.request(
@@ -848,24 +849,24 @@ function Vi({
848
849
  ).then((t) => t.data ?? {}).catch(() => ({})),
849
850
  staleTime: 3e4
850
851
  }))
851
- }), Ha = mr.map((e) => e.dataUpdatedAt).join(","), Ja = G(() => {
852
+ }), Ja = mr.map((e) => e.dataUpdatedAt).join(","), Ya = U(() => {
852
853
  const e = {};
853
854
  return ur.forEach((t, n) => {
854
855
  var o;
855
856
  const a = ((o = mr[n]) == null ? void 0 : o.data) ?? {};
856
857
  for (const [c, b] of Object.entries(a)) e[`${t}:${c}`] = b;
857
858
  }), e;
858
- }, [Ha]), yn = G(() => {
859
+ }, [Ja]), yn = U(() => {
859
860
  var t;
860
861
  const e = {};
861
- for (const n of C) {
862
+ for (const n of S) {
862
863
  if (!n.collection || n.collection === "tasks" || n.collection.startsWith("nivaro_"))
863
864
  continue;
864
865
  const a = e[t = n.collection] ?? (e[t] = []);
865
866
  a.length < 500 && a.push(n.item_id);
866
867
  }
867
868
  return e;
868
- }, [C]), kn = Object.keys(yn), br = ze({
869
+ }, [S]), kn = Object.keys(yn), br = Xe({
869
870
  queries: kn.map((e) => ({
870
871
  queryKey: ["queue-task-counts", e, yn[e].join(",")],
871
872
  queryFn: () => p.request(
@@ -873,21 +874,21 @@ function Vi({
873
874
  ).then((t) => t.data ?? {}).catch(() => ({})),
874
875
  staleTime: 3e4
875
876
  }))
876
- }), Ya = br.map((e) => e.dataUpdatedAt).join(","), za = G(() => {
877
+ }), Xa = br.map((e) => e.dataUpdatedAt).join(","), za = U(() => {
877
878
  const e = {};
878
879
  return kn.forEach((t, n) => {
879
880
  var a;
880
881
  for (const [o, c] of Object.entries(((a = br[n]) == null ? void 0 : a.data) ?? {})) e[`${t}:${o}`] = c;
881
882
  }), e;
882
- }, [Ya]), pr = kn.length > 0, hr = ze({
883
+ }, [Xa]), pr = kn.length > 0, hr = Xe({
883
884
  queries: ct.map((e) => ({
884
885
  queryKey: ["queue-collection-risk-rules", e],
885
886
  queryFn: () => p.request(
886
- E("/at-risk/rules/active", { collection: e })
887
+ O("/at-risk/rules/active", { collection: e })
887
888
  ).then((t) => t.data ?? []).catch(() => []),
888
889
  staleTime: 300 * 1e3
889
890
  }))
890
- }), Xa = hr.map((e) => e.dataUpdatedAt).join(","), fr = G(() => {
891
+ }), Za = hr.map((e) => e.dataUpdatedAt).join(","), fr = U(() => {
891
892
  const e = /* @__PURE__ */ new Map();
892
893
  for (const t of hr)
893
894
  for (const n of t.data ?? []) {
@@ -898,15 +899,15 @@ function Vi({
898
899
  });
899
900
  }
900
901
  return [...e.values()];
901
- }, [Xa]), gr = ze({
902
+ }, [Za]), gr = Xe({
902
903
  queries: ct.map((e) => ({
903
904
  queryKey: ["queue-collection-states", e],
904
905
  queryFn: () => p.request(
905
- E(`/queues/collection-states/${e}`)
906
+ O(`/queues/collection-states/${e}`)
906
907
  ).then((t) => t.data),
907
908
  staleTime: 300 * 1e3
908
909
  }))
909
- }), xr = (e) => e.replace(/_/g, " ").replace(/\b\w/g, (t) => t.toUpperCase()), ye = G(() => {
910
+ }), xr = (e) => e.replace(/_/g, " ").replace(/\b\w/g, (t) => t.toUpperCase()), ye = U(() => {
910
911
  const e = {};
911
912
  for (const t of gr)
912
913
  (t.data ?? []).forEach((n, a) => {
@@ -923,22 +924,22 @@ function Vi({
923
924
  var a, o;
924
925
  return (((a = ye[t]) == null ? void 0 : a.sort) ?? Number.MAX_SAFE_INTEGER) - (((o = ye[n]) == null ? void 0 : o.sort) ?? Number.MAX_SAFE_INTEGER);
925
926
  }
926
- ), vn = G(() => {
927
+ ), vn = U(() => {
927
928
  const e = {};
928
929
  for (const [t, n] of Object.entries(ye)) e[t] = n.label;
929
930
  return e;
930
- }, [ye]), Te = (e) => e ? e === "none" ? "No State" : vn[e] ?? xr(e) : "—", dt = (e) => {
931
+ }, [ye]), Re = (e) => e ? e === "none" ? "No State" : vn[e] ?? xr(e) : "—", dt = (e) => {
931
932
  if (e === Yt) return "Addendums";
932
- const t = (Wa ?? []).find((n) => n.collection === e);
933
+ const t = (Ha ?? []).find((n) => n.collection === e);
933
934
  return (t == null ? void 0 : t.display_name) || (t == null ? void 0 : t.plural) || xr(e);
934
- }, ee = G(() => N ? de ? de.map((e) => ({
935
+ }, ee = U(() => N ? de ? de.map((e) => ({
935
936
  key: e.key,
936
937
  rows: hn.get(e.key) ?? [],
937
938
  breached: e.breached,
938
939
  atRisk: e.at_risk,
939
940
  count: e.count,
940
941
  sums: e.sums ?? {}
941
- })) : Fo(C, N).map((e) => ({ ...e, count: e.rows.length, sums: {} })) : null, [C, N, de, hn]), wn = Q(null);
942
+ })) : Ao(S, N).map((e) => ({ ...e, count: e.rows.length, sums: {} })) : null, [S, N, de, hn]), wn = Q(null);
942
943
  j(() => {
943
944
  if (!N || !ee) {
944
945
  wn.current = null;
@@ -947,15 +948,15 @@ function Vi({
947
948
  if (qe && !de || wn.current === N) return;
948
949
  wn.current = N;
949
950
  const e = ee.reduce((t, n) => t + n.count, 0);
950
- zt(e > 200 ? new Set(ee.map((t) => t.key)) : /* @__PURE__ */ new Set()), sr({});
951
+ Xt(e > 200 ? new Set(ee.map((t) => t.key)) : /* @__PURE__ */ new Set()), sr({});
951
952
  }, [N, de]);
952
- function Za(e) {
953
- zt((t) => {
953
+ function el(e) {
954
+ Xt((t) => {
954
955
  const n = new Set(t);
955
956
  return n.has(e) ? n.delete(e) : n.add(e), n;
956
957
  });
957
958
  }
958
- const te = G(() => ee ? ee.filter((e) => !fe.has(e.key)).flatMap((e) => e.rows) : C, [ee, C, fe]), P = (e) => `${e.collection}:${e.item_id}`, [ke, Re] = y(null), [el, _n] = y(!1), [Bt, Qt] = y(null), Nn = (e) => {
959
+ const te = U(() => ee ? ee.filter((e) => !fe.has(e.key)).flatMap((e) => e.rows) : S, [ee, S, fe]), P = (e) => `${e.collection}:${e.item_id}`, [ke, Te] = y(null), [tl, _n] = y(!1), [Qt, jt] = y(null), Nn = (e) => {
959
960
  if (e.collection === Yt && e.url) {
960
961
  const t = e.url.match(/^\/collections\/([^/?]+)\/([^/?]+)(?:\?(.*))?$/);
961
962
  if (t) {
@@ -976,13 +977,13 @@ function Vi({
976
977
  };
977
978
  }, ut = (e) => {
978
979
  var t;
979
- s && ma({
980
+ s && ba({
980
981
  queue_id: l,
981
982
  name: s.name,
982
983
  path: `${window.location.pathname}${window.location.search}`,
983
984
  at: Date.now(),
984
- scroll: ((t = It.current) == null ? void 0 : t.scrollTop) ?? 0,
985
- state: { scope: g, page: Ne, sort: I, filters: w, group_by: N, view: S }
985
+ scroll: ((t = Vt.current) == null ? void 0 : t.scrollTop) ?? 0,
986
+ state: { scope: g, page: Ne, sort: V, filters: w, group_by: N, view: C }
986
987
  }), W.open(Nn(e));
987
988
  }, [M, mt] = y(
988
989
  null
@@ -994,15 +995,15 @@ function Vi({
994
995
  window.removeEventListener("mousedown", e), window.removeEventListener("scroll", e, !0);
995
996
  };
996
997
  }, [M]);
997
- const jt = (e) => {
998
- Qt(P(e));
998
+ const Ut = (e) => {
999
+ jt(P(e));
999
1000
  const t = (u == null ? void 0 : u.row_click) ?? "preview";
1000
1001
  if (t === "full" || e.collection === Yt) {
1001
1002
  ut(e);
1002
1003
  return;
1003
1004
  }
1004
1005
  if (t === "layout") {
1005
- Lr({
1006
+ Dr({
1006
1007
  collection: e.collection,
1007
1008
  itemId: e.item_id,
1008
1009
  rootLayoutSlug: (u == null ? void 0 : u.item_layout) ?? null,
@@ -1011,44 +1012,44 @@ function Vi({
1011
1012
  });
1012
1013
  return;
1013
1014
  }
1014
- Re(e);
1015
+ Te(e);
1015
1016
  };
1016
1017
  j(() => {
1017
1018
  if (!ke) return;
1018
- const e = C.find((t) => P(t) === P(ke));
1019
- e && e !== ke && Re(e);
1020
- }, [C]);
1021
- const tl = (e) => !e.claimed_by || e.claimed_by.id === v;
1019
+ const e = S.find((t) => P(t) === P(ke));
1020
+ e && e !== ke && Te(e);
1021
+ }, [S]);
1022
+ const nl = (e) => !e.claimed_by || e.claimed_by.id === v;
1022
1023
  function vr(e) {
1023
- const t = e ? te.findIndex((a) => P(a) === P(e)) + 1 : 0, n = te.slice(t).find(tl);
1024
+ const t = e ? te.findIndex((a) => P(a) === P(e)) + 1 : 0, n = te.slice(t).find(nl);
1024
1025
  if (!n) {
1025
- _n(!1), Re(null), A.info("Nothing left to work on — queue clear!");
1026
+ _n(!1), Te(null), E.info("Nothing left to work on — queue clear!");
1026
1027
  return;
1027
1028
  }
1028
- if (Qt(P(n)), ie && !n.claimed_by && Fe.mutate(n), (u == null ? void 0 : u.row_click) === "full") {
1029
+ if (jt(P(n)), ie && !n.claimed_by && Fe.mutate(n), (u == null ? void 0 : u.row_click) === "full") {
1029
1030
  ut(n);
1030
1031
  return;
1031
1032
  }
1032
- _n(!0), Re(n);
1033
+ _n(!0), Te(n);
1033
1034
  }
1034
1035
  j(() => {
1035
- if (S !== "table") return;
1036
+ if (C !== "table") return;
1036
1037
  function e(t) {
1037
1038
  var o;
1038
1039
  const n = t.target;
1039
1040
  if (n && (n.tagName === "INPUT" || n.tagName === "TEXTAREA" || n.tagName === "SELECT" || n.isContentEditable))
1040
1041
  return;
1041
- const a = Bt ? te.findIndex((c) => P(c) === Bt) : -1;
1042
+ const a = Qt ? te.findIndex((c) => P(c) === Qt) : -1;
1042
1043
  if (t.key === "j" || t.key === "ArrowDown") {
1043
1044
  t.preventDefault();
1044
1045
  const c = te[Math.min(a + 1, te.length - 1)];
1045
- c && Qt(P(c));
1046
+ c && jt(P(c));
1046
1047
  } else if (t.key === "k" || t.key === "ArrowUp") {
1047
1048
  t.preventDefault();
1048
1049
  const c = te[Math.max(a - 1, 0)];
1049
- c && Qt(P(c));
1050
+ c && jt(P(c));
1050
1051
  } else if (t.key === "Enter" && a >= 0 && !ke)
1051
- t.preventDefault(), jt(te[a]);
1052
+ t.preventDefault(), Ut(te[a]);
1052
1053
  else if (t.key === "c" && a >= 0 && ie) {
1053
1054
  t.preventDefault();
1054
1055
  const c = te[a];
@@ -1056,38 +1057,38 @@ function Vi({
1056
1057
  } else t.key === "o" && a >= 0 && (t.preventDefault(), ut(te[a]));
1057
1058
  }
1058
1059
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
1059
- }, [S, te, Bt, ke, v, Fe, Ue, ie]);
1060
- const { data: V } = H({
1060
+ }, [C, te, Qt, ke, v, Fe, Ue, ie]);
1061
+ const { data: G } = H({
1061
1062
  queryKey: ["queue-views", l],
1062
- queryFn: () => p.request(E(`/queues/${l}/views`)),
1063
+ queryFn: () => p.request(O(`/queues/${l}/views`)),
1063
1064
  enabled: !!l
1064
- }), [bt, pt] = y(null), [nl, Sn] = y(!1), [Cn, wr] = y(""), [_r, Nr] = y(!1), [ht, Sr] = y(!1);
1065
- function Ut(e) {
1065
+ }), [bt, pt] = y(null), [rl, Sn] = y(!1), [Cn, wr] = y(""), [_r, Nr] = y(!1), [ht, Sr] = y(!1);
1066
+ function It(e) {
1066
1067
  const t = e.state ?? {};
1067
- J(t.scope ?? "all"), K({ ...se.current, ...t.filters ?? {} }), De(t.sort ?? ""), nt(t.group_by ?? null), Dt(t.columns ?? null), Zt(t.pins ?? null), t.view && Le($e.includes(t.view) ? t.view : $e[0]), L(1), pt(e.id);
1068
+ J(t.scope ?? "all"), K({ ...se.current, ...t.filters ?? {} }), De(t.sort ?? ""), nt(t.group_by ?? null), Pt(t.columns ?? null), Zt(t.pins ?? null), t.view && Le($e.includes(t.view) ? t.view : $e[0]), L(1), pt(e.id);
1068
1069
  }
1069
- function rl() {
1070
+ function al() {
1070
1071
  var t, n;
1071
- const e = V == null ? void 0 : V.data.find((a) => a.is_default);
1072
+ const e = G == null ? void 0 : G.data.find((a) => a.is_default);
1072
1073
  if (e) {
1073
- Ut(e);
1074
+ It(e);
1074
1075
  return;
1075
1076
  }
1076
- J(((t = s == null ? void 0 : s.display_config) == null ? void 0 : t.default_scope) ?? "all"), K({ ...se.current }), De(""), nt(null), Dt(null), Zt(null), (n = s == null ? void 0 : s.display_config) != null && n.default_view && Le(s.display_config.default_view), L(1), pt(null);
1077
+ J(((t = s == null ? void 0 : s.display_config) == null ? void 0 : t.default_scope) ?? "all"), K({ ...se.current }), De(""), nt(null), Pt(null), Zt(null), (n = s == null ? void 0 : s.display_config) != null && n.default_view && Le(s.display_config.default_view), L(1), pt(null);
1077
1078
  }
1078
1079
  j(() => {
1079
- if (le || !(s != null && s.display_config) || Ie === void 0 || V === void 0) return;
1080
- const e = Ie.data.default_view_id, t = e != null ? V.data.find((a) => a.id === e) : void 0, n = V.data.find((a) => a.is_default);
1081
- t ? Ut(t) : n ? Ut(n) : (Le(s.display_config.default_view), J(s.display_config.default_scope)), wa(!0);
1082
- }, [s, Ie, V, le]);
1083
- const It = Q(null), Vt = Q(null);
1080
+ if (le || !(s != null && s.display_config) || Ie === void 0 || G === void 0) return;
1081
+ const e = Ie.data.default_view_id, t = e != null ? G.data.find((a) => a.id === e) : void 0, n = G.data.find((a) => a.is_default);
1082
+ t ? It(t) : n ? It(n) : (Le(s.display_config.default_view), J(s.display_config.default_scope)), _a(!0);
1083
+ }, [s, Ie, G, le]);
1084
+ const Vt = Q(null), Gt = Q(null);
1084
1085
  j(() => {
1085
1086
  if (!le) return;
1086
- const e = ns();
1087
+ const e = os();
1087
1088
  if (!(e != null && e.restore) || e.queue_id !== l) return;
1088
- ma({ ...e, restore: !1 });
1089
+ ba({ ...e, restore: !1 });
1089
1090
  const t = e.state ?? {};
1090
- t.scope && J(t.scope), t.filters && K({ ...se.current, ...t.filters }), t.sort != null && De(t.sort), nt(t.group_by ?? null), t.view && Le(t.view), t.page && L(t.page), Vt.current = e.scroll ?? 0;
1091
+ t.scope && J(t.scope), t.filters && K({ ...se.current, ...t.filters }), t.sort != null && De(t.sort), nt(t.group_by ?? null), t.view && Le(t.view), t.page && L(t.page), Gt.current = e.scroll ?? 0;
1091
1092
  }, [le, l]), j(() => {
1092
1093
  if (!le || typeof window > "u") return;
1093
1094
  const e = new URLSearchParams(window.location.search), t = e.get("owner");
@@ -1100,15 +1101,24 @@ function Vi({
1100
1101
  `${window.location.pathname}${n ? `?${n}` : ""}${window.location.hash}`
1101
1102
  ), J("all"), K((a) => ({ ...a, owners: [t] })), pt(null), L(1);
1102
1103
  }, [le]), j(() => {
1103
- Vt.current == null || C.length === 0 || !It.current || (It.current.scrollTop = Vt.current, Vt.current = null);
1104
- }, [C]);
1105
- const { isAdmin: Gt } = ca(), Cr = Gt || (s == null ? void 0 : s.owner) != null && s.owner === v, al = we({
1106
- mutationFn: ({ viewId: e, on: t }) => p.request(da(`/queues/views/${e}`, { is_default: t })),
1104
+ Gt.current == null || S.length === 0 || !Vt.current || (Vt.current.scrollTop = Gt.current, Gt.current = null);
1105
+ }, [S]);
1106
+ const { isAdmin: ft } = da(), ll = S.map((e) => `${e.collection}|${e.item_id}`).join(","), ol = U(
1107
+ () => S.map((e) => ({ collection: e.collection, id: e.item_id })),
1108
+ [ll]
1109
+ ), Cr = cs(ol, ft), sl = (e) => Qt === P(e) ? (
1110
+ // Pinned sticky cells use bg-inherit — the highlight must be
1111
+ // OPAQUE (nvr-cyan/5-over-white equivalents) or horizontally
1112
+ // scrolled content bleeds through the pinned columns. Same
1113
+ // pair DataTable uses for selected rows when pins are active.
1114
+ "bg-[#f2fdff] dark:bg-[#20303a]"
1115
+ ) : e.at_risk ? Do(e.at_risk_color ?? "red") : void 0, $r = ft || (s == null ? void 0 : s.owner) != null && s.owner === v, il = we({
1116
+ mutationFn: ({ viewId: e, on: t }) => p.request(ua(`/queues/views/${e}`, { is_default: t })),
1107
1117
  onSuccess: () => {
1108
- h.invalidateQueries({ queryKey: ["queue-views", l] }), A.success("Queue default view updated");
1118
+ h.invalidateQueries({ queryKey: ["queue-views", l] }), E.success("Queue default view updated");
1109
1119
  },
1110
- onError: () => A.error("Could not update the queue default view")
1111
- }), $r = we({
1120
+ onError: () => E.error("Could not update the queue default view")
1121
+ }), qr = we({
1112
1122
  mutationFn: () => p.request(
1113
1123
  re(`/queues/${l}/views`, {
1114
1124
  name: Cn.trim(),
@@ -1117,67 +1127,67 @@ function Vi({
1117
1127
  state: {
1118
1128
  scope: g,
1119
1129
  filters: w,
1120
- sort: I,
1130
+ sort: V,
1121
1131
  group_by: N,
1122
- view: S,
1132
+ view: C,
1123
1133
  columns: mn,
1124
- pins: $t
1134
+ pins: qt
1125
1135
  }
1126
1136
  })
1127
1137
  ),
1128
1138
  onSuccess: (e) => {
1129
- Sn(!1), wr(""), Nr(!1), Sr(!1), pt(e.data.id), h.invalidateQueries({ queryKey: ["queue-views", l] }), A.success("View saved");
1139
+ Sn(!1), wr(""), Nr(!1), Sr(!1), pt(e.data.id), h.invalidateQueries({ queryKey: ["queue-views", l] }), E.success("View saved");
1130
1140
  },
1131
- onError: () => A.error("Failed to save view")
1132
- }), [qr, Fr] = y(null), Ae = we({
1141
+ onError: () => E.error("Failed to save view")
1142
+ }), [Fr, Rr] = y(null), Ee = we({
1133
1143
  mutationFn: (e) => p.request(
1134
- da(`/queues/views/${e.id}`, {
1144
+ ua(`/queues/views/${e.id}`, {
1135
1145
  state: {
1136
1146
  scope: g,
1137
1147
  filters: w,
1138
- sort: I,
1148
+ sort: V,
1139
1149
  group_by: N,
1140
- view: S,
1150
+ view: C,
1141
1151
  columns: mn,
1142
- pins: $t
1152
+ pins: qt
1143
1153
  }
1144
1154
  })
1145
1155
  ),
1146
1156
  onSuccess: (e, t) => {
1147
- h.invalidateQueries({ queryKey: ["queue-views", l] }), Fr(t.id), setTimeout(() => Fr((n) => n === t.id ? null : n), 2e3), A.success(`Saved "${t.name}" with the current filters, scope and sort`);
1157
+ h.invalidateQueries({ queryKey: ["queue-views", l] }), Rr(t.id), setTimeout(() => Rr((n) => n === t.id ? null : n), 2e3), E.success(`Saved "${t.name}" with the current filters, scope and sort`);
1148
1158
  },
1149
- onError: () => A.error("Failed to update view")
1150
- }), ll = we({
1151
- mutationFn: (e) => p.request(An(`/queues/views/${e}`)),
1159
+ onError: () => E.error("Failed to update view")
1160
+ }), cl = we({
1161
+ mutationFn: (e) => p.request(En(`/queues/views/${e}`)),
1152
1162
  onSuccess: (e, t) => {
1153
1163
  h.invalidateQueries({ queryKey: ["queue-views", l] }), pt(null), Ve === t && bn(null);
1154
1164
  },
1155
- onError: () => A.error("Failed to delete view")
1156
- }), ol = we({
1157
- mutationFn: (e) => p.request(mo(`/queues/${l}/default-view`, { view_id: e })),
1165
+ onError: () => E.error("Failed to delete view")
1166
+ }), dl = we({
1167
+ mutationFn: (e) => p.request(fo(`/queues/${l}/default-view`, { view_id: e })),
1158
1168
  onMutate: (e) => bn(e),
1159
1169
  onSuccess: (e, t) => {
1160
- h.invalidateQueries({ queryKey: ["queue-column-prefs", l] }), A.success(
1170
+ h.invalidateQueries({ queryKey: ["queue-column-prefs", l] }), E.success(
1161
1171
  t === null ? "Reverted to the general default" : "Set as your default view"
1162
1172
  );
1163
1173
  },
1164
1174
  onError: () => {
1165
- h.invalidateQueries({ queryKey: ["queue-column-prefs", l] }), A.error("Failed to update default view");
1175
+ h.invalidateQueries({ queryKey: ["queue-column-prefs", l] }), E.error("Failed to update default view");
1166
1176
  }
1167
- }), [Oe, We] = y([]), [z, Tr] = y(!1), sl = () => {
1168
- z && We([]), Tr(!z);
1177
+ }), [Ae, We] = y([]), [X, Tr] = y(!1), ul = () => {
1178
+ X && We([]), Tr(!X);
1169
1179
  };
1170
1180
  j(() => {
1171
- S !== "table" && z && (Tr(!1), We([]));
1172
- }, [S, z]), uo(), jn.current = Oe.length;
1173
- const [Rr, Ar] = y(!1);
1181
+ C !== "table" && X && (Tr(!1), We([]));
1182
+ }, [C, X]), ho(), jn.current = Ae.length;
1183
+ const [Er, Ar] = y(!1);
1174
1184
  async function $n(e, t) {
1175
- const n = C.filter((b) => Oe.includes(P(b)));
1176
- Ar(!0), Lt.beginBatch();
1185
+ const n = S.filter((b) => Ae.includes(P(b)));
1186
+ Ar(!0), Dt.beginBatch();
1177
1187
  const a = await Promise.allSettled(n.map(t));
1178
- Lt.endBatch();
1188
+ Dt.endBatch();
1179
1189
  const o = a.filter((b) => b.status === "fulfilled").length, c = a.length - o;
1180
- Ar(!1), We([]), h.invalidateQueries({ queryKey: ["queue-items", l] }), c ? A.warning(`${e}: ${o} succeeded, ${c} failed`) : A.success(`${e}: ${o} succeeded`);
1190
+ Ar(!1), We([]), h.invalidateQueries({ queryKey: ["queue-items", l] }), c ? E.warning(`${e}: ${o} succeeded, ${c} failed`) : E.success(`${e}: ${o} succeeded`);
1181
1191
  }
1182
1192
  const He = (e) => {
1183
1193
  var t;
@@ -1186,19 +1196,19 @@ function Vi({
1186
1196
  if (a) return a;
1187
1197
  }
1188
1198
  return null;
1189
- }, il = (e) => {
1190
- if (N === "state") return e === "No state" ? e : Te(e);
1199
+ }, ml = (e) => {
1200
+ if (N === "state") return e === "No state" ? e : Re(e);
1191
1201
  if (N === "collection") return dt(e);
1192
1202
  if (N != null && N.startsWith("extra.") && e !== "—") {
1193
1203
  const t = He(N.slice(6));
1194
- if (t) return Xe(e, t);
1204
+ if (t) return ze(e, t);
1195
1205
  }
1196
1206
  return e;
1197
- }, cl = ee == null ? void 0 : ee.map((e) => ({
1207
+ }, bl = ee == null ? void 0 : ee.map((e) => ({
1198
1208
  key: e.key,
1199
1209
  rows: e.rows,
1200
1210
  header: /* @__PURE__ */ d(_e, { children: [
1201
- /* @__PURE__ */ r("span", { children: il(e.key) }),
1211
+ /* @__PURE__ */ r("span", { children: ml(e.key) }),
1202
1212
  /* @__PURE__ */ d("span", { className: "font-normal text-slate-400", children: [
1203
1213
  "(",
1204
1214
  ae(e.count),
@@ -1212,16 +1222,16 @@ function Vi({
1212
1222
  className: "font-normal tabular-nums text-slate-500 dark:text-slate-400",
1213
1223
  "data-queue-group-sum": t,
1214
1224
  children: [
1215
- F(`extra.${t}`, Nt(t)),
1225
+ F(`extra.${t}`, St(t)),
1216
1226
  ":",
1217
1227
  " ",
1218
- a ? Xe(String(n), a) : ae(n)
1228
+ a ? ze(String(n), a) : ae(n)
1219
1229
  ]
1220
1230
  },
1221
1231
  t
1222
1232
  );
1223
1233
  }),
1224
- de && !fe.has(e.key) && Ua.has(e.key) && /* @__PURE__ */ r("span", { className: "font-normal text-slate-400", children: "loading…" }),
1234
+ de && !fe.has(e.key) && Ia.has(e.key) && /* @__PURE__ */ r("span", { className: "font-normal text-slate-400", children: "loading…" }),
1225
1235
  de && !fe.has(e.key) && e.rows.length > 0 && e.rows.length < e.count && /* @__PURE__ */ d(
1226
1236
  "button",
1227
1237
  {
@@ -1249,13 +1259,13 @@ function Vi({
1249
1259
  " at risk"
1250
1260
  ] })
1251
1261
  ] })
1252
- })), qn = (((Wr = i == null ? void 0 : i.available_values.collection) == null ? void 0 : Wr.length) ?? 0) > 1, Or = C.some((e) => !!e.unseen) || Mt.size > 0 || C.some((e) => Se.isNew(P(e))), Er = [
1262
+ })), qn = (((Hr = i == null ? void 0 : i.available_values.collection) == null ? void 0 : Hr.length) ?? 0) > 1, Or = S.some((e) => !!e.unseen) || Bt.size > 0 || S.some((e) => Se.isNew(P(e))), Lr = [
1253
1263
  ...qn ? [
1254
1264
  {
1255
1265
  key: "collection",
1256
1266
  header: F("collection", "Collection"),
1257
1267
  sortable: !0,
1258
- render: (e) => /* @__PURE__ */ r(ds, { variant: "outline", children: dt(e.collection) })
1268
+ render: (e) => /* @__PURE__ */ r(gs, { variant: "outline", children: dt(e.collection) })
1259
1269
  }
1260
1270
  ] : [],
1261
1271
  {
@@ -1270,15 +1280,15 @@ function Vi({
1270
1280
  // a whole, but nothing on it said so — an underline is the one
1271
1281
  // convention people already read as "this goes somewhere".
1272
1282
  /* @__PURE__ */ d("span", { className: "flex items-center gap-1.5", children: [
1273
- Mt.get(P(e)) || Se.isNew(P(e)) ? /* @__PURE__ */ r(
1274
- as,
1283
+ Bt.get(P(e)) || Se.isNew(P(e)) ? /* @__PURE__ */ r(
1284
+ is,
1275
1285
  {
1276
- lock: Mt.get(P(e)),
1286
+ lock: Bt.get(P(e)),
1277
1287
  isNew: Se.isNew(P(e)),
1278
1288
  dataAttr: "data-queue-live-mark",
1279
1289
  hang: !0
1280
1290
  }
1281
- ) : /* @__PURE__ */ r(cs, { change: e.unseen, dataAttr: "data-queue-unseen", hang: !0 }),
1291
+ ) : /* @__PURE__ */ r(fs, { change: e.unseen, dataAttr: "data-queue-unseen", hang: !0 }),
1282
1292
  /* @__PURE__ */ r(
1283
1293
  "span",
1284
1294
  {
@@ -1297,9 +1307,9 @@ function Vi({
1297
1307
  t
1298
1308
  )),
1299
1309
  /* @__PURE__ */ r(
1300
- is,
1310
+ hs,
1301
1311
  {
1302
- viewers: Ma[qo(e.collection, e.item_id)],
1312
+ viewers: Ba[Eo(e.collection, e.item_id)],
1303
1313
  dataAttr: "data-queue-presence"
1304
1314
  }
1305
1315
  )
@@ -1318,9 +1328,9 @@ function Vi({
1318
1328
  backgroundColor: e.state_color ? `${e.state_color}1a` : void 0,
1319
1329
  color: e.state_color ?? void 0
1320
1330
  },
1321
- title: e.via_addendum ? `Addendum "${e.via_addendum.title ?? ""}" — ${Te(e.state)}` : Te(e.state),
1331
+ title: e.via_addendum ? `Addendum "${e.via_addendum.title ?? ""}" — ${Re(e.state)}` : Re(e.state),
1322
1332
  children: [
1323
- Te(e.state),
1333
+ Re(e.state),
1324
1334
  e.via_addendum && /* @__PURE__ */ r("span", { className: "ml-1 rounded-sm bg-amber-500/15 px-1 text-[9px] font-bold uppercase tracking-wide text-amber-700 dark:text-amber-300", children: "Addendum" })
1325
1335
  ]
1326
1336
  }
@@ -1330,13 +1340,13 @@ function Vi({
1330
1340
  key: "owners",
1331
1341
  header: F("owners", "Owners"),
1332
1342
  sortable: !0,
1333
- render: (e) => /* @__PURE__ */ r(hs, { owners: e.owners })
1343
+ render: (e) => /* @__PURE__ */ r(ws, { owners: e.owners })
1334
1344
  },
1335
1345
  {
1336
1346
  key: "aging_hours",
1337
1347
  header: F("aging_hours", "Aging"),
1338
1348
  sortable: !0,
1339
- render: (e) => $s(e.aging_hours)
1349
+ render: (e) => Os(e.aging_hours)
1340
1350
  },
1341
1351
  {
1342
1352
  // When the record entered its current state — the same moment Aging
@@ -1344,13 +1354,13 @@ function Vi({
1344
1354
  key: "state_entered",
1345
1355
  header: F("state_entered", "Last State Change"),
1346
1356
  sortable: !0,
1347
- render: (e) => e.state_entered_at ? fo(e.state_entered_at, { type: "datetime", template: "MM/DD/YYYY - h:mmA" }) : /* @__PURE__ */ r("span", { className: "text-slate-300 dark:text-slate-600", children: "—" })
1357
+ render: (e) => e.state_entered_at ? ko(e.state_entered_at, { type: "datetime", template: "MM/DD/YYYY - h:mmA" }) : /* @__PURE__ */ r("span", { className: "text-slate-300 dark:text-slate-600", children: "—" })
1348
1358
  },
1349
1359
  {
1350
1360
  key: "sla_status",
1351
1361
  header: F("sla_status", "SLA"),
1352
1362
  sortable: !0,
1353
- render: (e) => /* @__PURE__ */ r(qs, { status: e.sla_status })
1363
+ render: (e) => /* @__PURE__ */ r(Ls, { status: e.sla_status })
1354
1364
  },
1355
1365
  {
1356
1366
  key: "at_risk",
@@ -1358,7 +1368,7 @@ function Vi({
1358
1368
  sortable: !0,
1359
1369
  render: (e) => {
1360
1370
  var t;
1361
- return e.at_risk ? /* @__PURE__ */ d("span", { className: Ro(e.at_risk_color ?? "red"), children: [
1371
+ return e.at_risk ? /* @__PURE__ */ d("span", { className: Lo(e.at_risk_color ?? "red"), children: [
1362
1372
  "⚑ ",
1363
1373
  ((t = e.at_risk_rule) == null ? void 0 : t.name) ?? "At risk"
1364
1374
  ] }) : e.predicted_risk ? /* @__PURE__ */ r("span", { className: "text-amber-500", title: e.predicted_note ?? void 0, children: "⚑ Predicted" }) : null;
@@ -1369,7 +1379,7 @@ function Vi({
1369
1379
  key: "addendums",
1370
1380
  header: F("addendums", "Addendums"),
1371
1381
  sortable: !1,
1372
- render: (e) => /* @__PURE__ */ r(Cs, { summary: e.addendums })
1382
+ render: (e) => /* @__PURE__ */ r(As, { summary: e.addendums })
1373
1383
  }
1374
1384
  ] : [],
1375
1385
  ...ot ? [
@@ -1378,7 +1388,7 @@ function Vi({
1378
1388
  header: F("fulfilment", "Shipped"),
1379
1389
  sortable: !0,
1380
1390
  render: (e) => /* @__PURE__ */ r(
1381
- Yo,
1391
+ es,
1382
1392
  {
1383
1393
  collection: e.collection,
1384
1394
  itemId: e.item_id,
@@ -1392,7 +1402,7 @@ function Vi({
1392
1402
  key: "integrations",
1393
1403
  header: F("integrations", "Integrations"),
1394
1404
  sortable: !1,
1395
- render: (e) => /* @__PURE__ */ r(Zo, { rows: Ja[`${e.collection}:${e.item_id}`] })
1405
+ render: (e) => /* @__PURE__ */ r(rs, { rows: Ya[`${e.collection}:${e.item_id}`] })
1396
1406
  }
1397
1407
  ] : [],
1398
1408
  ...pr ? [
@@ -1421,10 +1431,10 @@ function Vi({
1421
1431
  key: "send_backs",
1422
1432
  header: F("send_backs", "Sent back"),
1423
1433
  sortable: !0,
1424
- render: (e) => /* @__PURE__ */ r(_s, { summary: e.send_backs })
1434
+ render: (e) => /* @__PURE__ */ r(Rs, { summary: e.send_backs })
1425
1435
  }
1426
1436
  ] : []
1427
- ], dl = {
1437
+ ], pl = {
1428
1438
  key: "claim",
1429
1439
  header: "",
1430
1440
  render: (e) => e.claimed_by ? /* @__PURE__ */ r(
@@ -1448,7 +1458,7 @@ function Vi({
1448
1458
  children: "Claim"
1449
1459
  }
1450
1460
  )
1451
- }, ft = (s == null ? void 0 : s.available_extra_fields) ?? [], gt = so("drill.queue"), Z = gt.value, Lr = (e) => gt.push([e]), ul = (e) => {
1461
+ }, gt = (s == null ? void 0 : s.available_extra_fields) ?? [], xt = mo("drill.queue"), Z = xt.value, Dr = (e) => xt.push([e]), hl = (e) => {
1452
1462
  var t;
1453
1463
  for (const n of (s == null ? void 0 : s.sources) ?? []) {
1454
1464
  const a = (t = n.drilldown) == null ? void 0 : t[e];
@@ -1460,44 +1470,44 @@ function Vi({
1460
1470
  };
1461
1471
  }
1462
1472
  return { enabled: !0, layout_id: null, width: null };
1463
- }, ml = G(() => {
1473
+ }, fl = U(() => {
1464
1474
  const e = {};
1465
1475
  for (const t of (s == null ? void 0 : s.sources) ?? [])
1466
1476
  for (const [n, a] of Object.entries(t.column_formats ?? {}))
1467
1477
  n in e || (e[n] = a);
1468
1478
  return e;
1469
- }, [s == null ? void 0 : s.sources]), bl = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, pl = /^\d{4}-\d{2}-\d{2}T\d{2}:/;
1470
- function hl(e) {
1471
- if (bl.test(e)) return { text: e.split("@")[0], title: e };
1472
- if (pl.test(e)) {
1479
+ }, [s == null ? void 0 : s.sources]), gl = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, xl = /^\d{4}-\d{2}-\d{2}T\d{2}:/;
1480
+ function yl(e) {
1481
+ if (gl.test(e)) return { text: e.split("@")[0], title: e };
1482
+ if (xl.test(e)) {
1473
1483
  const t = new Date(e);
1474
1484
  if (!Number.isNaN(t.getTime()))
1475
1485
  return {
1476
- text: Bo(t, { month: "2-digit", day: "2-digit", year: "2-digit" }),
1477
- title: Mo(t)
1486
+ text: Io(t, { month: "2-digit", day: "2-digit", year: "2-digit" }),
1487
+ title: Uo(t)
1478
1488
  };
1479
1489
  }
1480
1490
  return { text: e, title: e };
1481
1491
  }
1482
- const fl = ft.map((e) => ({
1492
+ const kl = gt.map((e) => ({
1483
1493
  key: `extra.${e}`,
1484
- header: F(`extra.${e}`, Nt(e)),
1494
+ header: F(`extra.${e}`, St(e)),
1485
1495
  sortable: !0,
1486
1496
  render: (t) => {
1487
- var k, R;
1497
+ var k, T;
1488
1498
  const n = (k = t.extra) == null ? void 0 : k[e];
1489
1499
  if (n == null || n === "") return /* @__PURE__ */ r("span", { className: "text-slate-300", children: "—" });
1490
- const a = He(e), o = a ? Xe(String(n), a) : String(n), { text: c, title: b } = hl(o), m = ((s == null ? void 0 : s.extra_field_meta) ?? []).find((B) => B.path === e), O = ((R = t.extra_ids) == null ? void 0 : R[e]) ?? [], T = ul(e);
1491
- return (m == null ? void 0 : m.kind) === "relation" && m.target_collection && O.length > 0 && T.enabled && !m.aggregate ? /* @__PURE__ */ r(
1500
+ const a = He(e), o = a ? ze(String(n), a) : String(n), { text: c, title: b } = yl(o), m = ((s == null ? void 0 : s.extra_field_meta) ?? []).find((B) => B.path === e), A = ((T = t.extra_ids) == null ? void 0 : T[e]) ?? [], R = hl(e);
1501
+ return (m == null ? void 0 : m.kind) === "relation" && m.target_collection && A.length > 0 && R.enabled && !m.aggregate ? /* @__PURE__ */ r(
1492
1502
  "button",
1493
1503
  {
1494
1504
  type: "button",
1495
1505
  onClick: (B) => {
1496
- B.stopPropagation(), Lr({
1506
+ B.stopPropagation(), Dr({
1497
1507
  collection: m.target_collection,
1498
- itemId: O[0],
1499
- layoutId: T.layout_id,
1500
- width: T.width,
1508
+ itemId: A[0],
1509
+ layoutId: R.layout_id,
1510
+ width: R.width,
1501
1511
  title: o
1502
1512
  });
1503
1513
  },
@@ -1518,7 +1528,7 @@ function Vi({
1518
1528
  }
1519
1529
  ) : /* @__PURE__ */ r("span", { className: "block max-w-[200px] truncate text-[12px]", title: b, children: c });
1520
1530
  }
1521
- })), Dr = [
1531
+ })), Pr = [
1522
1532
  ...qn ? ["collection"] : [],
1523
1533
  "state",
1524
1534
  "owners",
@@ -1531,8 +1541,8 @@ function Vi({
1531
1541
  ...xe ? ["integrations"] : [],
1532
1542
  ...st ? ["send_backs"] : [],
1533
1543
  ...pr ? ["tasks"] : [],
1534
- ...ft.map((e) => `extra.${e}`)
1535
- ], gl = [
1544
+ ...gt.map((e) => `extra.${e}`)
1545
+ ], vl = [
1536
1546
  ...qn ? ["collection"] : [],
1537
1547
  "state",
1538
1548
  "owners",
@@ -1543,30 +1553,30 @@ function Vi({
1543
1553
  "aging_hours",
1544
1554
  "sla_status",
1545
1555
  "at_risk",
1546
- ...ft.slice(0, 2).map((e) => `extra.${e}`)
1547
- ], xl = (u == null ? void 0 : u.default_columns) ?? null, Fn = mn ?? xl, ne = new Set(Fn ?? gl);
1548
- Ge && !Ct.has("addendums") && ne.add("addendums"), ot && !Ct.has("fulfilment") && ne.add("fulfilment"), xe && !Ct.has("integrations") && ne.add("integrations"), st && !Ct.has("send_backs") && ne.add("send_backs");
1549
- const yl = new Set(Gt ? [] : (u == null ? void 0 : u.admin_only_columns) ?? []);
1550
- for (const e of yl) ne.delete(e);
1556
+ ...gt.slice(0, 2).map((e) => `extra.${e}`)
1557
+ ], wl = (u == null ? void 0 : u.default_columns) ?? null, Fn = mn ?? wl, ne = new Set(Fn ?? vl);
1558
+ Ge && !$t.has("addendums") && ne.add("addendums"), ot && !$t.has("fulfilment") && ne.add("fulfilment"), xe && !$t.has("integrations") && ne.add("integrations"), st && !$t.has("send_backs") && ne.add("send_backs");
1559
+ const _l = new Set(ft ? [] : (u == null ? void 0 : u.admin_only_columns) ?? []);
1560
+ for (const e of _l) ne.delete(e);
1551
1561
  const Je = [
1552
- ...(Fn ?? []).filter((e) => Dr.includes(e)),
1553
- ...Dr.filter((e) => !(Fn ?? []).includes(e))
1554
- ], kl = Fl(Tl(Rl, { activationConstraint: { distance: 4 } }));
1555
- function vl(e) {
1562
+ ...(Fn ?? []).filter((e) => Pr.includes(e)),
1563
+ ...Pr.filter((e) => !(Fn ?? []).includes(e))
1564
+ ], Nl = Al(Ol(Ll, { activationConstraint: { distance: 4 } }));
1565
+ function Sl(e) {
1556
1566
  const { active: t, over: n } = e;
1557
1567
  if (!n || t.id === n.id) return;
1558
1568
  const a = Je.indexOf(String(t.id)), o = Je.indexOf(String(n.id));
1559
- a === -1 || o === -1 || Dt(
1560
- Dl(Je, a, o).filter((c) => ne.has(c))
1569
+ a === -1 || o === -1 || Pt(
1570
+ Bl(Je, a, o).filter((c) => ne.has(c))
1561
1571
  );
1562
1572
  }
1563
- const Pr = Er.find((e) => e.key === "label"), wl = {
1564
- ...Pr,
1573
+ const Kr = Lr.find((e) => e.key === "label"), Cl = {
1574
+ ...Kr,
1565
1575
  render: (e, ...t) => /* @__PURE__ */ d("span", { className: "inline-flex min-w-0 items-center gap-1.5", children: [
1566
- /* @__PURE__ */ r(Vo, { rowId: e.item_id }),
1567
- Pr.render(e, ...t)
1576
+ /* @__PURE__ */ r(Jo, { rowId: e.item_id }),
1577
+ Kr.render(e, ...t)
1568
1578
  ] })
1569
- }, _l = ((u == null ? void 0 : u.formula_columns) ?? []).map(
1579
+ }, $l = ((u == null ? void 0 : u.formula_columns) ?? []).map(
1570
1580
  (e) => ({
1571
1581
  key: `formula.${e.key}`,
1572
1582
  header: e.label,
@@ -1574,7 +1584,7 @@ function Vi({
1574
1584
  const n = {
1575
1585
  ...t,
1576
1586
  ...t.extra ? Object.fromEntries(Object.entries(t.extra).map(([c, b]) => [`extra.${c}`, b])) : {}
1577
- }, a = bo(e.formula, (c) => {
1587
+ }, a = go(e.formula, (c) => {
1578
1588
  const b = n[c] ?? (t.extra ? t.extra[c] : void 0), m = Number(b);
1579
1589
  return Number.isFinite(m) ? m : b ?? null;
1580
1590
  });
@@ -1583,46 +1593,46 @@ function Vi({
1583
1593
  return Number.isFinite(o) ? /* @__PURE__ */ r("span", { className: "tabular-nums", children: e.format === "currency" ? o.toLocaleString(void 0, { style: "currency", currency: "USD" }) : o.toLocaleString() }) : /* @__PURE__ */ r("span", { children: String(a) });
1584
1594
  }
1585
1595
  })
1586
- ), Kr = [...Er, ...fl, ..._l], Nl = {
1596
+ ), Mr = [...Lr, ...kl, ...$l], ql = {
1587
1597
  key: "__actions__",
1588
1598
  header: "",
1589
1599
  render: (e) => e.collection === "tasks" || e.collection === Yt ? null : /* @__PURE__ */ r("span", { onClick: (t) => t.stopPropagation(), children: /* @__PURE__ */ r(
1590
- Go,
1600
+ Yo,
1591
1601
  {
1592
1602
  collection: e.collection,
1593
1603
  id: e.item_id,
1594
1604
  hasPipeline: e.state != null,
1595
1605
  onOpen: () => ut(e),
1596
- onPeek: () => Re(e),
1606
+ onPeek: () => Te(e),
1597
1607
  urlFor: W.urlFor,
1598
1608
  onDeleted: () => {
1599
- p.request(An(`/items/${e.collection}/${e.item_id}`)).then(() => {
1600
- A.success("Moved to trash"), h.invalidateQueries({ queryKey: ["queue-items", l] });
1601
- }).catch((t) => A.error(vt(t, "Delete failed")));
1609
+ p.request(En(`/items/${e.collection}/${e.item_id}`)).then(() => {
1610
+ E.success("Moved to trash"), h.invalidateQueries({ queryKey: ["queue-items", l] });
1611
+ }).catch((t) => E.error(wt(t, "Delete failed")));
1602
1612
  },
1603
1613
  onAfterTransition: () => void h.invalidateQueries({ queryKey: ["queue-items", l] }),
1604
1614
  bulkEnabledKeys: (u == null ? void 0 : u.bulk_action_keys) ?? null,
1605
- disabled: z
1615
+ disabled: X
1606
1616
  }
1607
1617
  ) })
1608
1618
  }, Wt = [
1609
- wl,
1610
- ...Je.filter((e) => ne.has(e)).map((e) => Kr.find((t) => t.key === e)).filter((e) => e !== void 0),
1611
- ...ie ? [dl] : [],
1612
- Nl
1613
- ], Mr = G(() => {
1619
+ Cl,
1620
+ ...Je.filter((e) => ne.has(e)).map((e) => Mr.find((t) => t.key === e)).filter((e) => e !== void 0),
1621
+ ...ie ? [pl] : [],
1622
+ ql
1623
+ ], Br = U(() => {
1614
1624
  var a;
1615
- const e = u == null ? void 0 : u.default_pins, t = $t ?? (e && Object.keys(e).length > 0 ? e : { [((a = Wt[0]) == null ? void 0 : a.key) ?? "label"]: "left" }), n = new Set(Wt.map((o) => o.key));
1625
+ const e = u == null ? void 0 : u.default_pins, t = qt ?? (e && Object.keys(e).length > 0 ? e : { [((a = Wt[0]) == null ? void 0 : a.key) ?? "label"]: "left" }), n = new Set(Wt.map((o) => o.key));
1616
1626
  return Object.fromEntries(Object.entries(t).filter(([o]) => n.has(o)));
1617
- }, [$t, u == null ? void 0 : u.default_pins, Wt.map((e) => e.key).join("|")]), Br = [
1627
+ }, [qt, u == null ? void 0 : u.default_pins, Wt.map((e) => e.key).join("|")]), Qr = [
1618
1628
  { value: "state", label: "State" },
1619
1629
  { value: "collection", label: "Collection" },
1620
1630
  { value: "sla_status", label: "SLA status" },
1621
1631
  { value: "at_risk", label: "At risk" },
1622
1632
  { value: "owners", label: "Owner" },
1623
1633
  { value: "aging", label: "Aging" },
1624
- ...ft.filter((e) => ne.has(`extra.${e}`)).map((e) => ({ value: `extra.${e}`, label: F(`extra.${e}`, Nt(e)) }))
1625
- ], Qr = (e) => async (t) => {
1634
+ ...gt.filter((e) => ne.has(`extra.${e}`)).map((e) => ({ value: `extra.${e}`, label: F(`extra.${e}`, St(e)) }))
1635
+ ], jr = (e) => async (t) => {
1626
1636
  if (!e.target_collection || !e.display_field) return [];
1627
1637
  const n = {
1628
1638
  limit: 25,
@@ -1630,16 +1640,16 @@ function Vi({
1630
1640
  };
1631
1641
  t.trim() && (n.filter = JSON.stringify({ [e.display_field]: { _contains: t.trim() } }));
1632
1642
  const o = (await p.request(
1633
- E(`/items/${e.target_collection}`, n)
1634
- )).data ?? [], c = He(e.path), b = Ce[e.path] ? new Set(Ce[e.path]) : null, m = /* @__PURE__ */ new Set(), O = [];
1635
- for (const T of o) {
1636
- const k = T[e.display_field];
1643
+ O(`/items/${e.target_collection}`, n)
1644
+ )).data ?? [], c = He(e.path), b = Ce[e.path] ? new Set(Ce[e.path]) : null, m = /* @__PURE__ */ new Set(), A = [];
1645
+ for (const R of o) {
1646
+ const k = R[e.display_field];
1637
1647
  if (k == null || k === "") continue;
1638
- const R = String(k);
1639
- m.has(R) || b && !b.has(R) || (m.add(R), O.push({ label: c ? Xe(R, c) : R, value: R }));
1648
+ const T = String(k);
1649
+ m.has(T) || b && !b.has(T) || (m.add(T), A.push({ label: c ? ze(T, c) : T, value: T }));
1640
1650
  }
1641
- return O;
1642
- }, Tn = new Map(((s == null ? void 0 : s.extra_field_meta) ?? []).map((e) => [e.path, e])), Ye = [
1651
+ return A;
1652
+ }, Rn = new Map(((s == null ? void 0 : s.extra_field_meta) ?? []).map((e) => [e.path, e])), Ye = [
1643
1653
  {
1644
1654
  key: "collection",
1645
1655
  placeholder: F("collection", "Collection"),
@@ -1662,7 +1672,7 @@ function Vi({
1662
1672
  ).map((e) => {
1663
1673
  var t;
1664
1674
  return {
1665
- label: Te(e),
1675
+ label: Re(e),
1666
1676
  value: e,
1667
1677
  // How many rows sit in it under the other active filters (the State
1668
1678
  // filter itself left out, or every other state would read 0).
@@ -1721,7 +1731,7 @@ function Vi({
1721
1731
  key: "integrations",
1722
1732
  placeholder: F("integrations", "Integrations"),
1723
1733
  type: "select",
1724
- options: es.map((e) => ({ label: e.label, value: e.value }))
1734
+ options: as.map((e) => ({ label: e.label, value: e.value }))
1725
1735
  }
1726
1736
  ] : [],
1727
1737
  ...ot ? [
@@ -1729,7 +1739,7 @@ function Vi({
1729
1739
  key: "fulfilment",
1730
1740
  placeholder: "Shipped",
1731
1741
  type: "select",
1732
- options: zo
1742
+ options: ts
1733
1743
  }
1734
1744
  ] : [],
1735
1745
  ...st ? [
@@ -1759,7 +1769,7 @@ function Vi({
1759
1769
  type: "combobox",
1760
1770
  multi: !0,
1761
1771
  loadOptions: async (e) => ((await p.request(
1762
- E(`/queues/${l}/label-suggest`, e.trim() ? { q: e.trim() } : {})
1772
+ O(`/queues/${l}/label-suggest`, e.trim() ? { q: e.trim() } : {})
1763
1773
  )).data ?? []).map((n) => ({ label: n, value: n }))
1764
1774
  },
1765
1775
  {
@@ -1772,9 +1782,9 @@ function Vi({
1772
1782
  value: e.id
1773
1783
  }))
1774
1784
  },
1775
- ...ft.map((e) => {
1785
+ ...gt.map((e) => {
1776
1786
  var b, m;
1777
- const t = Tn.get(e), n = F(`extra.${e}`, Nt(e)), a = { key: `extra.${e}`, placeholder: n }, o = He(e);
1787
+ const t = Rn.get(e), n = F(`extra.${e}`, St(e)), a = { key: `extra.${e}`, placeholder: n }, o = He(e);
1778
1788
  if ((o == null ? void 0 : o.type) === "datetime") return { ...a, type: "date" };
1779
1789
  if ((o == null ? void 0 : o.type) === "number") return { ...a, type: "number" };
1780
1790
  if ((o == null ? void 0 : o.type) === "boolean")
@@ -1791,21 +1801,21 @@ function Vi({
1791
1801
  ...a,
1792
1802
  type: "combobox",
1793
1803
  multi: !0,
1794
- options: c.map((O) => ({ label: o ? Xe(O, o) : O, value: O }))
1804
+ options: c.map((A) => ({ label: o ? ze(A, o) : A, value: A }))
1795
1805
  } : (t == null ? void 0 : t.kind) === "relation" ? {
1796
1806
  ...a,
1797
1807
  type: "combobox",
1798
1808
  multi: !0,
1799
1809
  restricted: !!((m = Ce[e]) != null && m.length),
1800
- loadOptions: Qr(t)
1810
+ loadOptions: jr(t)
1801
1811
  } : { ...a, placeholder: `Search ${n}…`, type: "text" };
1802
1812
  })
1803
- ], Rn = Ye.filter(
1813
+ ], Tn = Ye.filter(
1804
1814
  (e) => ne.has(e.key) || e.key === "label" || e.key === "owners"
1805
- ), jr = (e) => {
1815
+ ), Ur = (e) => {
1806
1816
  var t;
1807
1817
  return (((t = Ye.find((n) => n.key === e)) == null ? void 0 : t.placeholder) ?? e).replace(/^Search\s+/, "").replace(/…$/, "");
1808
- }, xt = new Set(Object.keys(se.current)), Sl = ((e) => {
1818
+ }, yt = new Set(Object.keys(se.current)), Fl = ((e) => {
1809
1819
  var n;
1810
1820
  if (e.some((a) => a.key === "state")) return e;
1811
1821
  const t = Ye.find((a) => a.key === "state");
@@ -1814,60 +1824,60 @@ function Vi({
1814
1824
  (() => {
1815
1825
  var o;
1816
1826
  const e = (c) => {
1817
- var B, ve, Ee;
1827
+ var B, ve, Oe;
1818
1828
  if (!c.key.startsWith("extra.")) return null;
1819
1829
  if (c.type === "combobox") return c;
1820
- const b = c.key.slice(6), m = Tn.get(b), O = xt.has(c.key);
1821
- if ((m == null ? void 0 : m.kind) !== "relation" && !O) return null;
1822
- const T = He(b), k = (B = i == null ? void 0 : i.available_values.extra) == null ? void 0 : B[b], R = c.placeholder.replace(/^Search (.*)…$/, "$1");
1830
+ const b = c.key.slice(6), m = Rn.get(b), A = yt.has(c.key);
1831
+ if ((m == null ? void 0 : m.kind) !== "relation" && !A) return null;
1832
+ const R = He(b), k = (B = i == null ? void 0 : i.available_values.extra) == null ? void 0 : B[b], T = c.placeholder.replace(/^Search (.*)…$/, "$1");
1823
1833
  return k != null && k.length ? {
1824
1834
  key: c.key,
1825
- placeholder: R,
1835
+ placeholder: T,
1826
1836
  type: "combobox",
1827
1837
  multi: !0,
1828
1838
  restricted: !!((ve = Ce[b]) != null && ve.length),
1829
1839
  options: k.map((_) => ({
1830
- label: T && T.type !== "number" ? Xe(_, T) : _,
1840
+ label: R && R.type !== "number" ? ze(_, R) : _,
1831
1841
  value: _
1832
1842
  }))
1833
1843
  } : (m == null ? void 0 : m.kind) === "relation" ? {
1834
1844
  key: c.key,
1835
- placeholder: R,
1845
+ placeholder: T,
1836
1846
  type: "combobox",
1837
1847
  multi: !0,
1838
- restricted: !!((Ee = Ce[b]) != null && Ee.length),
1839
- loadOptions: Qr(m)
1848
+ restricted: !!((Oe = Ce[b]) != null && Oe.length),
1849
+ loadOptions: jr(m)
1840
1850
  } : null;
1841
1851
  };
1842
1852
  if (Wn.length > 0) {
1843
1853
  const c = [], b = /* @__PURE__ */ new Set();
1844
1854
  for (const m of Wn) {
1845
- const O = (m.path ?? []).join(".");
1846
- let T;
1855
+ const A = (m.path ?? []).join(".");
1856
+ let R;
1847
1857
  if (m.key === "state" || /(^|_)state$/.test(((o = m.path) == null ? void 0 : o[0]) ?? ""))
1848
- T = Ye.find((k) => k.key === "state");
1858
+ R = Ye.find((k) => k.key === "state");
1849
1859
  else {
1850
1860
  const k = Ye.filter((B) => {
1851
- var Ee;
1861
+ var Oe;
1852
1862
  if (!B.key.startsWith("extra.") || b.has(B.key)) return !1;
1853
1863
  const ve = B.key.slice(6);
1854
- return ((Ee = Tn.get(ve)) == null ? void 0 : Ee.target_collection) === m.collection;
1855
- }), R = k.find((B) => B.key.slice(6).startsWith(`${O}.`)) ?? k[0];
1856
- T = R ? e(R) : null;
1864
+ return ((Oe = Rn.get(ve)) == null ? void 0 : Oe.target_collection) === m.collection;
1865
+ }), T = k.find((B) => B.key.slice(6).startsWith(`${A}.`)) ?? k[0];
1866
+ R = T ? e(T) : null;
1857
1867
  }
1858
- !T || b.has(T.key) || (b.add(T.key), c.push(m.label ? { ...T, placeholder: m.label } : T));
1868
+ !R || b.has(R.key) || (b.add(R.key), c.push(m.label ? { ...R, placeholder: m.label } : R));
1859
1869
  }
1860
1870
  for (const m of Ye.map(e))
1861
- m && !b.has(m.key) && (xt.has(m.key) || m.restricted) && c.push(m);
1871
+ m && !b.has(m.key) && (yt.has(m.key) || m.restricted) && c.push(m);
1862
1872
  if (c.length > 0) return c;
1863
1873
  }
1864
- const t = Rn.map(e).filter((c) => c !== null), a = [
1865
- ...t.filter((c) => xt.has(c.key) || c.restricted),
1866
- ...t.filter((c) => !xt.has(c.key) && !c.restricted)
1874
+ const t = Tn.map(e).filter((c) => c !== null), a = [
1875
+ ...t.filter((c) => yt.has(c.key) || c.restricted),
1876
+ ...t.filter((c) => !yt.has(c.key) && !c.restricted)
1867
1877
  ].slice(0, 6);
1868
- return a.length > 0 ? a : Rn.filter((c) => c.key === "state" || c.key === "owners");
1878
+ return a.length > 0 ? a : Tn.filter((c) => c.key === "state" || c.key === "owners");
1869
1879
  })()
1870
- ), Cl = (() => {
1880
+ ), Rl = (() => {
1871
1881
  if (!x) return null;
1872
1882
  const e = Y ?? x, t = [
1873
1883
  {
@@ -1939,17 +1949,17 @@ function Vi({
1939
1949
  }
1940
1950
  );
1941
1951
  })();
1942
- function $l(e) {
1952
+ function Tl(e) {
1943
1953
  const t = new Set(ne);
1944
1954
  t.has(e) ? (t.delete(e), (e === "addendums" || e === "integrations") && Pn((n) => new Set(n).add(e))) : (t.add(e), (e === "addendums" || e === "integrations") && Pn((n) => {
1945
1955
  const a = new Set(n);
1946
1956
  return a.delete(e), a;
1947
- })), Dt([...t]);
1957
+ })), Pt([...t]);
1948
1958
  }
1949
1959
  return Tt ? (q == null ? void 0 : q((Tt == null ? void 0 : Tt.status) ?? 500)) ?? null : /* @__PURE__ */ d("div", { className: "flex flex-1 min-h-0 flex-col", children: [
1950
1960
  /* @__PURE__ */ d("div", { className: "shrink-0", children: [
1951
1961
  (i == null ? void 0 : i.truncated) && /* @__PURE__ */ d("div", { className: "mx-4 mt-3 flex items-center gap-2 rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-[12px] text-amber-800 dark:border-amber-900 dark:bg-amber-950/40 dark:text-amber-300", children: [
1952
- /* @__PURE__ */ r(Bl, { className: "h-4 w-4 shrink-0" }),
1962
+ /* @__PURE__ */ r(Il, { className: "h-4 w-4 shrink-0" }),
1953
1963
  /* @__PURE__ */ r("span", { children: "This view hit the row safety limit — the table below may not include every matching item, but the totals above are exact. Narrow the filters (or clear the priority sort on a large queue) to browse everything." })
1954
1964
  ] }),
1955
1965
  /* @__PURE__ */ d(
@@ -1958,7 +1968,7 @@ function Vi({
1958
1968
  className: "flex flex-wrap items-center gap-2 border-b border-slate-200 bg-white px-4 py-2.5 dark:border-slate-700 dark:bg-slate-900",
1959
1969
  "data-queue-toolbar": !0,
1960
1970
  children: [
1961
- le ? /* @__PURE__ */ r("div", { className: "flex overflow-hidden rounded-md border border-slate-200 dark:border-border", children: Ss.filter((e) => ie || e.value !== "claimed").map(
1971
+ le ? /* @__PURE__ */ r("div", { className: "flex overflow-hidden rounded-md border border-slate-200 dark:border-border", children: Es.filter((e) => ie || e.value !== "claimed").map(
1962
1972
  (e, t) => /* @__PURE__ */ r(
1963
1973
  "button",
1964
1974
  {
@@ -1990,7 +2000,7 @@ function Vi({
1990
2000
  className: $(
1991
2001
  "flex h-8 items-center px-3 text-[12px] font-medium transition-colors",
1992
2002
  t > 0 && "border-l border-slate-200 dark:border-border",
1993
- S === e.value ? "bg-nvr-cyan/10 text-slate-900 dark:text-white" : "bg-white text-slate-500 hover:text-slate-700 dark:bg-slate-900 dark:text-slate-400 dark:hover:text-slate-200"
2003
+ C === e.value ? "bg-nvr-cyan/10 text-slate-900 dark:text-white" : "bg-white text-slate-500 hover:text-slate-700 dark:bg-slate-900 dark:text-slate-400 dark:hover:text-slate-200"
1994
2004
  ),
1995
2005
  children: e.label
1996
2006
  },
@@ -2027,13 +2037,13 @@ function Vi({
2027
2037
  }),
2028
2038
  className: `flex h-8 items-center gap-1.5 rounded-full border px-2.5 text-[12px] font-medium transition-colors ${w.addendums === "active" ? "border-amber-400 bg-amber-50 text-amber-800 dark:border-amber-500/60 dark:bg-amber-500/10 dark:text-amber-300" : "border-slate-200 bg-white text-slate-600 hover:border-slate-300 dark:border-border dark:bg-card dark:text-slate-300"}`,
2029
2039
  children: [
2030
- /* @__PURE__ */ r(Ql, { className: "h-3.5 w-3.5" }),
2040
+ /* @__PURE__ */ r(Vl, { className: "h-3.5 w-3.5" }),
2031
2041
  "Active addendums"
2032
2042
  ]
2033
2043
  }
2034
2044
  ),
2035
2045
  xe && /* @__PURE__ */ r(
2036
- ts,
2046
+ ls,
2037
2047
  {
2038
2048
  label: F("integrations", "Integrations"),
2039
2049
  value: w.integrations,
@@ -2043,16 +2053,16 @@ function Vi({
2043
2053
  })
2044
2054
  }
2045
2055
  ),
2046
- /* @__PURE__ */ r(ls, { className: "h-8" }),
2047
- /* @__PURE__ */ r(Jo, {}),
2056
+ /* @__PURE__ */ r(ms, { className: "h-8" }),
2057
+ /* @__PURE__ */ r(Zo, {}),
2048
2058
  en > 0 && /* @__PURE__ */ d(
2049
2059
  "button",
2050
2060
  {
2051
2061
  type: "button",
2052
- onClick: Ga,
2062
+ onClick: Wa,
2053
2063
  className: "nvr-pop-in flex h-8 items-center gap-1 rounded-full border border-nvr-cyan/40 bg-nvr-cyan/[0.08] px-2.5 text-[12px] font-medium transition-colors text-nvr-navy hover:bg-nvr-cyan/20 dark:text-nvr-cyan",
2054
2064
  children: [
2055
- /* @__PURE__ */ r(jl, { className: "h-3 w-3" }),
2065
+ /* @__PURE__ */ r(Gl, { className: "h-3 w-3" }),
2056
2066
  en,
2057
2067
  " update",
2058
2068
  en === 1 ? "" : "s",
@@ -2061,7 +2071,7 @@ function Vi({
2061
2071
  }
2062
2072
  ),
2063
2073
  /* @__PURE__ */ d("div", { className: "ml-auto flex flex-wrap items-center gap-2", children: [
2064
- S === "table" && /* @__PURE__ */ d(Ze, { children: [
2074
+ C === "table" && /* @__PURE__ */ d(Ze, { children: [
2065
2075
  /* @__PURE__ */ r(et, { asChild: !0, children: /* @__PURE__ */ d(
2066
2076
  "button",
2067
2077
  {
@@ -2071,18 +2081,18 @@ function Vi({
2071
2081
  N ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-slate-900 dark:text-white" : "border-slate-200 text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800"
2072
2082
  ),
2073
2083
  children: [
2074
- /* @__PURE__ */ r(oa, { className: "h-3.5 w-3.5" }),
2075
- N ? `Group: ${((Hr = Br.find((e) => e.value === N)) == null ? void 0 : Hr.label) ?? N}` : "Group"
2084
+ /* @__PURE__ */ r(sa, { className: "h-3.5 w-3.5" }),
2085
+ N ? `Group: ${((Jr = Qr.find((e) => e.value === N)) == null ? void 0 : Jr.label) ?? N}` : "Group"
2076
2086
  ]
2077
2087
  }
2078
2088
  ) }),
2079
- /* @__PURE__ */ r(tt, { className: "w-[200px] p-0", align: "start", children: /* @__PURE__ */ d(ba, { children: [
2080
- /* @__PURE__ */ r(us, { placeholder: "Group by…", className: "h-8 text-[12px]" }),
2081
- /* @__PURE__ */ d(pa, { children: [
2082
- /* @__PURE__ */ r(ms, { children: "No attribute found." }),
2083
- /* @__PURE__ */ r(wt, { value: "__none__", onSelect: () => nt(null), children: "None" }),
2084
- Br.map((e) => /* @__PURE__ */ r(
2085
- wt,
2089
+ /* @__PURE__ */ r(tt, { className: "w-[200px] p-0", align: "start", children: /* @__PURE__ */ d(pa, { children: [
2090
+ /* @__PURE__ */ r(xs, { placeholder: "Group by…", className: "h-8 text-[12px]" }),
2091
+ /* @__PURE__ */ d(ha, { children: [
2092
+ /* @__PURE__ */ r(ys, { children: "No attribute found." }),
2093
+ /* @__PURE__ */ r(_t, { value: "__none__", onSelect: () => nt(null), children: "None" }),
2094
+ Qr.map((e) => /* @__PURE__ */ r(
2095
+ _t,
2086
2096
  {
2087
2097
  value: e.label,
2088
2098
  onSelect: () => nt(e.value),
@@ -2093,35 +2103,35 @@ function Vi({
2093
2103
  ] })
2094
2104
  ] }) })
2095
2105
  ] }),
2096
- S === "table" && /* @__PURE__ */ d(
2106
+ C === "table" && /* @__PURE__ */ d(
2097
2107
  "button",
2098
2108
  {
2099
2109
  type: "button",
2100
2110
  onClick: () => {
2101
- De(I === "-priority" ? "" : "-priority"), L(1);
2111
+ De(V === "-priority" ? "" : "-priority"), L(1);
2102
2112
  },
2103
2113
  className: $(
2104
2114
  "flex h-8 items-center gap-1 rounded-md border px-2.5 text-[12px] font-medium",
2105
- I === "-priority" ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-slate-900 dark:text-white" : "border-slate-200 text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800"
2115
+ V === "-priority" ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-slate-900 dark:text-white" : "border-slate-200 text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800"
2106
2116
  ),
2107
2117
  children: [
2108
- /* @__PURE__ */ r(Ul, { className: "h-3.5 w-3.5" }),
2118
+ /* @__PURE__ */ r(Wl, { className: "h-3.5 w-3.5" }),
2109
2119
  "Priority"
2110
2120
  ]
2111
2121
  }
2112
2122
  ),
2113
- S === "table" && N && ee && /* @__PURE__ */ r(
2123
+ C === "table" && N && ee && /* @__PURE__ */ r(
2114
2124
  "button",
2115
2125
  {
2116
2126
  type: "button",
2117
- onClick: () => zt(
2127
+ onClick: () => Xt(
2118
2128
  fe.size > 0 ? /* @__PURE__ */ new Set() : new Set(ee.map((e) => e.key))
2119
2129
  ),
2120
2130
  className: "flex h-8 items-center rounded-md px-2 text-[12px] text-slate-500 hover:text-slate-700 dark:text-slate-400 dark:hover:text-slate-200",
2121
2131
  children: fe.size > 0 ? "Expand all" : "Collapse all"
2122
2132
  }
2123
2133
  ),
2124
- S === "kanban" && /* @__PURE__ */ d(Ze, { children: [
2134
+ C === "kanban" && /* @__PURE__ */ d(Ze, { children: [
2125
2135
  /* @__PURE__ */ r(et, { asChild: !0, children: /* @__PURE__ */ d(
2126
2136
  "button",
2127
2137
  {
@@ -2131,27 +2141,27 @@ function Vi({
2131
2141
  rt ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-slate-900 dark:text-white" : "border-slate-200 text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800"
2132
2142
  ),
2133
2143
  children: [
2134
- /* @__PURE__ */ r(oa, { className: "h-3.5 w-3.5" }),
2144
+ /* @__PURE__ */ r(sa, { className: "h-3.5 w-3.5" }),
2135
2145
  rt ? `Lanes: ${rt === "collection" ? "Collection" : "Owner"}` : "Lanes"
2136
2146
  ]
2137
2147
  }
2138
2148
  ) }),
2139
- /* @__PURE__ */ r(tt, { className: "w-[180px] p-0", align: "start", children: /* @__PURE__ */ r(ba, { children: /* @__PURE__ */ d(pa, { children: [
2140
- /* @__PURE__ */ r(wt, { value: "none", onSelect: () => Xt(null), children: "None" }),
2141
- /* @__PURE__ */ r(wt, { value: "collection", onSelect: () => Xt("collection"), children: "Collection" }),
2142
- /* @__PURE__ */ r(wt, { value: "owner", onSelect: () => Xt("owners"), children: "Owner" })
2149
+ /* @__PURE__ */ r(tt, { className: "w-[180px] p-0", align: "start", children: /* @__PURE__ */ r(pa, { children: /* @__PURE__ */ d(ha, { children: [
2150
+ /* @__PURE__ */ r(_t, { value: "none", onSelect: () => zt(null), children: "None" }),
2151
+ /* @__PURE__ */ r(_t, { value: "collection", onSelect: () => zt("collection"), children: "Collection" }),
2152
+ /* @__PURE__ */ r(_t, { value: "owner", onSelect: () => zt("owners"), children: "Owner" })
2143
2153
  ] }) }) })
2144
2154
  ] }),
2145
- U && s && /* @__PURE__ */ d(
2155
+ I && s && /* @__PURE__ */ d(
2146
2156
  "button",
2147
2157
  {
2148
2158
  type: "button",
2149
- onClick: () => U({ id: s.id, name: s.name }),
2159
+ onClick: () => I({ id: s.id, name: s.name }),
2150
2160
  "data-tip": "Open Ask AI with a question about this queue",
2151
2161
  className: "flex h-8 items-center gap-1 rounded-md border border-slate-200 px-2.5 text-[12px] font-medium text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800",
2152
2162
  "data-queue-ask": !0,
2153
2163
  children: [
2154
- /* @__PURE__ */ r(Il, { className: "h-3.5 w-3.5 text-nvr-cyan" }),
2164
+ /* @__PURE__ */ r(Hl, { className: "h-3.5 w-3.5 text-nvr-cyan" }),
2155
2165
  "Ask about this queue"
2156
2166
  ]
2157
2167
  }
@@ -2160,7 +2170,7 @@ function Vi({
2160
2170
  "button",
2161
2171
  {
2162
2172
  type: "button",
2163
- onClick: () => qa((e) => !e),
2173
+ onClick: () => Fa((e) => !e),
2164
2174
  "aria-expanded": lt,
2165
2175
  title: "Trends, aging, pace and states",
2166
2176
  className: $(
@@ -2169,43 +2179,43 @@ function Vi({
2169
2179
  ),
2170
2180
  "data-queue-insights-toggle": !0,
2171
2181
  children: [
2172
- /* @__PURE__ */ r(Vl, { className: "h-3.5 w-3.5" }),
2182
+ /* @__PURE__ */ r(Jl, { className: "h-3.5 w-3.5" }),
2173
2183
  "Insights"
2174
2184
  ]
2175
2185
  }
2176
2186
  ),
2177
- S === "table" && /* @__PURE__ */ d(Ze, { children: [
2187
+ C === "table" && /* @__PURE__ */ d(Ze, { children: [
2178
2188
  /* @__PURE__ */ r(et, { asChild: !0, children: /* @__PURE__ */ d(
2179
2189
  "button",
2180
2190
  {
2181
2191
  type: "button",
2182
2192
  className: "flex h-8 items-center gap-1 rounded-md border border-slate-200 px-2.5 text-[12px] font-medium text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800",
2183
2193
  children: [
2184
- /* @__PURE__ */ r(Gl, { className: "h-3.5 w-3.5" }),
2194
+ /* @__PURE__ */ r(Yl, { className: "h-3.5 w-3.5" }),
2185
2195
  "Columns"
2186
2196
  ]
2187
2197
  }
2188
2198
  ) }),
2189
2199
  /* @__PURE__ */ r(tt, { className: "w-[220px] p-2", align: "end", children: /* @__PURE__ */ r(
2190
- Al,
2200
+ Dl,
2191
2201
  {
2192
- sensors: kl,
2193
- collisionDetection: Ol,
2194
- onDragEnd: vl,
2202
+ sensors: Nl,
2203
+ collisionDetection: Pl,
2204
+ onDragEnd: Sl,
2195
2205
  children: /* @__PURE__ */ r(
2196
- El,
2206
+ Kl,
2197
2207
  {
2198
2208
  items: Je,
2199
- strategy: Ll,
2209
+ strategy: Ml,
2200
2210
  children: /* @__PURE__ */ r("div", { className: "space-y-1.5", children: Je.map((e) => {
2201
- const t = Kr.find((n) => n.key === e);
2211
+ const t = Mr.find((n) => n.key === e);
2202
2212
  return /* @__PURE__ */ r(
2203
- Rs,
2213
+ Ks,
2204
2214
  {
2205
2215
  id: e,
2206
2216
  label: typeof (t == null ? void 0 : t.header) == "string" ? t.header : e,
2207
2217
  checked: ne.has(e),
2208
- onCheckedChange: () => $l(e)
2218
+ onCheckedChange: () => Tl(e)
2209
2219
  },
2210
2220
  e
2211
2221
  );
@@ -2215,52 +2225,52 @@ function Vi({
2215
2225
  }
2216
2226
  ) })
2217
2227
  ] }),
2218
- S === "table" && At && /* @__PURE__ */ d(
2228
+ C === "table" && At && /* @__PURE__ */ d(
2219
2229
  "button",
2220
2230
  {
2221
2231
  type: "button",
2222
- onClick: sl,
2223
- "aria-pressed": z,
2224
- "data-queue-bulk-mode": z ? "on" : "off",
2225
- "data-tip": z ? "Leave bulk mode — clears the selection and turns row actions back on" : "Select rows to act on several at once",
2226
- className: `flex h-8 items-center gap-1.5 rounded-md border px-2.5 text-[12px] font-medium shadow-sm ${z ? "border-nvr-cyan bg-nvr-cyan/10 text-slate-800 dark:text-slate-100" : "border-slate-200 bg-white text-slate-500 hover:bg-slate-50 hover:text-slate-700 dark:border-border dark:bg-card dark:text-slate-400 dark:hover:bg-muted"}`,
2232
+ onClick: ul,
2233
+ "aria-pressed": X,
2234
+ "data-queue-bulk-mode": X ? "on" : "off",
2235
+ "data-tip": X ? "Leave bulk mode — clears the selection and turns row actions back on" : "Select rows to act on several at once",
2236
+ className: `flex h-8 items-center gap-1.5 rounded-md border px-2.5 text-[12px] font-medium shadow-sm ${X ? "border-nvr-cyan bg-nvr-cyan/10 text-slate-800 dark:text-slate-100" : "border-slate-200 bg-white text-slate-500 hover:bg-slate-50 hover:text-slate-700 dark:border-border dark:bg-card dark:text-slate-400 dark:hover:bg-muted"}`,
2227
2237
  children: [
2228
- /* @__PURE__ */ r(Wl, { className: "h-3.5 w-3.5" }),
2229
- z ? "Done" : "Bulk select"
2238
+ /* @__PURE__ */ r(Xl, { className: "h-3.5 w-3.5" }),
2239
+ X ? "Done" : "Bulk select"
2230
2240
  ]
2231
2241
  }
2232
2242
  ),
2233
- S === "table" && /* @__PURE__ */ r(
2243
+ C === "table" && /* @__PURE__ */ r(
2234
2244
  "button",
2235
2245
  {
2236
2246
  type: "button",
2237
2247
  onClick: () => {
2238
- const e = St === "compact" ? "comfortable" : "compact";
2239
- fa(e);
2248
+ const e = Ct === "compact" ? "comfortable" : "compact";
2249
+ ga(e);
2240
2250
  try {
2241
2251
  localStorage.setItem("nvr_table_density", e);
2242
2252
  } catch {
2243
2253
  }
2244
2254
  },
2245
2255
  "aria-label": "Row density",
2246
- title: St === "compact" ? "Switch to comfortable rows" : "Switch to compact rows",
2256
+ title: Ct === "compact" ? "Switch to comfortable rows" : "Switch to compact rows",
2247
2257
  className: "flex h-8 w-8 items-center justify-center rounded-md border border-slate-200 bg-white text-slate-500 shadow-sm hover:bg-slate-50 hover:text-slate-700 dark:border-border dark:bg-card dark:text-slate-400 dark:hover:bg-muted",
2248
- children: St === "compact" ? /* @__PURE__ */ r(Hl, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ r(Jl, { className: "h-3.5 w-3.5" })
2258
+ children: Ct === "compact" ? /* @__PURE__ */ r(zl, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ r(Zl, { className: "h-3.5 w-3.5" })
2249
2259
  }
2250
2260
  ),
2251
- S === "table" && va && te.length > 0 && /* @__PURE__ */ d(
2261
+ C === "table" && wa && te.length > 0 && /* @__PURE__ */ d(
2252
2262
  "button",
2253
2263
  {
2254
2264
  type: "button",
2255
2265
  onClick: () => vr(),
2256
2266
  className: "flex h-8 items-center gap-1.5 rounded-md bg-nvr-cyan px-3 text-[12px] font-semibold text-white hover:brightness-110",
2257
2267
  children: [
2258
- /* @__PURE__ */ r(Yl, { className: "h-3 w-3 fill-current" }),
2268
+ /* @__PURE__ */ r(eo, { className: "h-3 w-3 fill-current" }),
2259
2269
  "Work Next"
2260
2270
  ]
2261
2271
  }
2262
2272
  ),
2263
- !ln && X.length === 1 && (Rt ? /* @__PURE__ */ d(Ze, { children: [
2273
+ !ln && z.length === 1 && (Et ? /* @__PURE__ */ d(Ze, { children: [
2264
2274
  /* @__PURE__ */ r(et, { asChild: !0, children: /* @__PURE__ */ d(
2265
2275
  "button",
2266
2276
  {
@@ -2269,8 +2279,8 @@ function Vi({
2269
2279
  children: [
2270
2280
  /* @__PURE__ */ r(Jt, { className: "h-3.5 w-3.5" }),
2271
2281
  "New ",
2272
- On(X[0]),
2273
- /* @__PURE__ */ r(sa, { className: "h-3 w-3 opacity-60" })
2282
+ An(z[0]),
2283
+ /* @__PURE__ */ r(ia, { className: "h-3 w-3 opacity-60" })
2274
2284
  ]
2275
2285
  }
2276
2286
  ) }),
@@ -2280,24 +2290,24 @@ function Vi({
2280
2290
  {
2281
2291
  type: "button",
2282
2292
  onClick: () => W.open({
2283
- collection: X[0],
2293
+ collection: z[0],
2284
2294
  itemId: "new",
2285
2295
  // Same layout the queue opens existing records with.
2286
2296
  layoutSlug: (u == null ? void 0 : u.item_layout) ?? null
2287
2297
  }),
2288
2298
  className: "flex w-full items-center rounded px-2 py-1.5 text-left text-[12px] text-slate-700 hover:bg-slate-100 dark:text-slate-200 dark:hover:bg-muted",
2289
2299
  children: [
2290
- ((Jr = Rt.active) == null ? void 0 : Jr.create_label) ?? ((Yr = Rt.active) == null ? void 0 : Yr.name) ?? "Default layout",
2300
+ ((Yr = Et.active) == null ? void 0 : Yr.create_label) ?? ((Xr = Et.active) == null ? void 0 : Xr.name) ?? "Default layout",
2291
2301
  /* @__PURE__ */ r("span", { className: "ml-auto pl-3 text-[10px] text-slate-400 dark:text-slate-500", children: "default" })
2292
2302
  ]
2293
2303
  }
2294
2304
  ),
2295
- Rt.options.map((e) => /* @__PURE__ */ r(
2305
+ Et.options.map((e) => /* @__PURE__ */ r(
2296
2306
  "button",
2297
2307
  {
2298
2308
  type: "button",
2299
2309
  onClick: () => W.open({
2300
- collection: X[0],
2310
+ collection: z[0],
2301
2311
  itemId: "new",
2302
2312
  layoutSlug: e.slug
2303
2313
  }),
@@ -2312,7 +2322,7 @@ function Vi({
2312
2322
  {
2313
2323
  type: "button",
2314
2324
  onClick: () => W.open({
2315
- collection: X[0],
2325
+ collection: z[0],
2316
2326
  itemId: "new",
2317
2327
  // Open a new record on the same layout the queue opens
2318
2328
  // existing ones with, so creating and reviewing match.
@@ -2322,11 +2332,11 @@ function Vi({
2322
2332
  children: [
2323
2333
  /* @__PURE__ */ r(Jt, { className: "h-3.5 w-3.5" }),
2324
2334
  "New ",
2325
- On(X[0])
2335
+ An(z[0])
2326
2336
  ]
2327
2337
  }
2328
2338
  )),
2329
- !ln && X.length > 1 && /* @__PURE__ */ d(Ze, { children: [
2339
+ !ln && z.length > 1 && /* @__PURE__ */ d(Ze, { children: [
2330
2340
  /* @__PURE__ */ r(et, { asChild: !0, children: /* @__PURE__ */ d(
2331
2341
  "button",
2332
2342
  {
@@ -2335,11 +2345,11 @@ function Vi({
2335
2345
  children: [
2336
2346
  /* @__PURE__ */ r(Jt, { className: "h-3.5 w-3.5" }),
2337
2347
  "New",
2338
- /* @__PURE__ */ r(sa, { className: "h-3 w-3 opacity-60" })
2348
+ /* @__PURE__ */ r(ia, { className: "h-3 w-3 opacity-60" })
2339
2349
  ]
2340
2350
  }
2341
2351
  ) }),
2342
- /* @__PURE__ */ r(tt, { align: "end", className: "w-56 p-1", children: X.map((e) => /* @__PURE__ */ d(
2352
+ /* @__PURE__ */ r(tt, { align: "end", className: "w-56 p-1", children: z.map((e) => /* @__PURE__ */ d(
2343
2353
  "button",
2344
2354
  {
2345
2355
  type: "button",
@@ -2351,14 +2361,14 @@ function Vi({
2351
2361
  className: "flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-[12px] text-slate-700 hover:bg-slate-100 dark:text-slate-200 dark:hover:bg-muted",
2352
2362
  children: [
2353
2363
  /* @__PURE__ */ r(Jt, { className: "h-3 w-3 opacity-60" }),
2354
- On(e)
2364
+ An(e)
2355
2365
  ]
2356
2366
  },
2357
2367
  e
2358
2368
  )) })
2359
2369
  ] }),
2360
2370
  !ln && Ke && he && /* @__PURE__ */ r(
2361
- Xo,
2371
+ ns,
2362
2372
  {
2363
2373
  collection: Ke,
2364
2374
  onParsed: (e, t) => he(`/collections/${Ke}/new`, {
@@ -2378,19 +2388,19 @@ function Vi({
2378
2388
  children: [
2379
2389
  /* @__PURE__ */ d("div", { className: "nvr-stagger-direct flex divide-x divide-slate-200 overflow-hidden rounded-lg border border-slate-200 bg-white dark:divide-border dark:border-border dark:bg-card", children: [
2380
2390
  /* @__PURE__ */ r(
2381
- _t,
2391
+ Nt,
2382
2392
  {
2383
2393
  label: "Total",
2384
2394
  count: (x == null ? void 0 : x.total) ?? 0,
2385
2395
  filteredCount: Y ? Y.total : null,
2386
- active: Object.values(w).every(Ca) && g === "all",
2396
+ active: Object.values(w).every($a) && g === "all",
2387
2397
  isLoading: je,
2388
2398
  ...it("total"),
2389
- onClick: $a
2399
+ onClick: qa
2390
2400
  }
2391
2401
  ),
2392
2402
  /* @__PURE__ */ r(
2393
- _t,
2403
+ Nt,
2394
2404
  {
2395
2405
  label: "Warning",
2396
2406
  count: (x == null ? void 0 : x.sla_warning) ?? 0,
@@ -2404,7 +2414,7 @@ function Vi({
2404
2414
  }
2405
2415
  ),
2406
2416
  /* @__PURE__ */ r(
2407
- _t,
2417
+ Nt,
2408
2418
  {
2409
2419
  label: "Breached",
2410
2420
  count: (x == null ? void 0 : x.sla_breached) ?? 0,
@@ -2418,7 +2428,7 @@ function Vi({
2418
2428
  }
2419
2429
  ),
2420
2430
  /* @__PURE__ */ r(
2421
- _t,
2431
+ Nt,
2422
2432
  {
2423
2433
  label: "At Risk",
2424
2434
  count: (x == null ? void 0 : x.at_risk) ?? 0,
@@ -2432,7 +2442,7 @@ function Vi({
2432
2442
  }
2433
2443
  ),
2434
2444
  /* @__PURE__ */ r(
2435
- _t,
2445
+ Nt,
2436
2446
  {
2437
2447
  label: "Unowned",
2438
2448
  count: (x == null ? void 0 : x.unowned) ?? 0,
@@ -2499,14 +2509,14 @@ function Vi({
2499
2509
  yr.length > 0 && /* @__PURE__ */ r("div", { className: "flex min-w-0 flex-wrap items-center gap-1.5", children: yr.map(([e, t]) => {
2500
2510
  var n;
2501
2511
  return /* @__PURE__ */ r(
2502
- Ts,
2512
+ Ps,
2503
2513
  {
2504
- label: Te(e),
2514
+ label: Re(e),
2505
2515
  count: t,
2506
2516
  filteredCount: Y ? Y.by_state[e] ?? 0 : null,
2507
2517
  color: ((n = ye[e]) == null ? void 0 : n.color) ?? null,
2508
- active: Sa.includes(e),
2509
- onClick: () => Na(e)
2518
+ active: Ca.includes(e),
2519
+ onClick: () => Sa(e)
2510
2520
  },
2511
2521
  e
2512
2522
  );
@@ -2514,19 +2524,19 @@ function Vi({
2514
2524
  ]
2515
2525
  }
2516
2526
  ),
2517
- S !== "workload" && /* @__PURE__ */ r(
2518
- ys,
2527
+ C !== "workload" && /* @__PURE__ */ r(
2528
+ Cs,
2519
2529
  {
2520
- defs: Sl,
2530
+ defs: Fl,
2521
2531
  values: w,
2522
- seededKeys: xt,
2532
+ seededKeys: yt,
2523
2533
  onApply: (e) => {
2524
2534
  K((t) => ({ ...t, ...e })), L(1);
2525
2535
  },
2526
2536
  onClear: () => {
2527
2537
  K({ ...se.current }), L(1);
2528
2538
  },
2529
- right: Cl
2539
+ right: Rl
2530
2540
  }
2531
2541
  ),
2532
2542
  /* @__PURE__ */ d(
@@ -2542,7 +2552,7 @@ function Vi({
2542
2552
  className: "inline-flex h-6 items-center gap-1 rounded-full border border-nvr-cyan/40 bg-nvr-cyan/[0.06] px-2.5 text-[12px] text-slate-700 dark:text-slate-200",
2543
2553
  children: [
2544
2554
  "Your default ",
2545
- nr(jr),
2555
+ nr(Ur),
2546
2556
  " filter is hiding",
2547
2557
  " ",
2548
2558
  ce.toLocaleString("en-US"),
@@ -2596,11 +2606,11 @@ function Vi({
2596
2606
  ]
2597
2607
  }
2598
2608
  ),
2599
- !((V == null ? void 0 : V.data) ?? []).some((e) => e.is_default) && /* @__PURE__ */ r(
2609
+ !((G == null ? void 0 : G.data) ?? []).some((e) => e.is_default) && /* @__PURE__ */ r(
2600
2610
  "button",
2601
2611
  {
2602
2612
  type: "button",
2603
- onClick: rl,
2613
+ onClick: al,
2604
2614
  title: "Revert to the queue default (filters, columns and sort cleared)",
2605
2615
  className: $(
2606
2616
  "inline-flex h-6 items-center rounded-full border px-2.5 text-[12px] transition-colors",
@@ -2609,7 +2619,7 @@ function Vi({
2609
2619
  children: "Default"
2610
2620
  }
2611
2621
  ),
2612
- ((V == null ? void 0 : V.data) ?? []).map((e) => {
2622
+ ((G == null ? void 0 : G.data) ?? []).map((e) => {
2613
2623
  var t;
2614
2624
  return /* @__PURE__ */ d(
2615
2625
  "span",
@@ -2624,13 +2634,13 @@ function Vi({
2624
2634
  {
2625
2635
  type: "button",
2626
2636
  title: Ve === e.id ? "Your default view — click to revert to the general default" : "Set as your default view",
2627
- onClick: () => ol.mutate(Ve === e.id ? null : e.id),
2637
+ onClick: () => dl.mutate(Ve === e.id ? null : e.id),
2628
2638
  className: $(
2629
2639
  "shrink-0",
2630
2640
  Ve === e.id ? "text-amber-400" : "text-slate-300 hover:text-amber-400 dark:text-slate-600"
2631
2641
  ),
2632
2642
  children: /* @__PURE__ */ r(
2633
- zl,
2643
+ to,
2634
2644
  {
2635
2645
  className: $("h-3 w-3", Ve === e.id && "fill-current"),
2636
2646
  "aria-label": Ve === e.id ? "Default view" : "Set as default"
@@ -2638,41 +2648,41 @@ function Vi({
2638
2648
  )
2639
2649
  }
2640
2650
  ),
2641
- /* @__PURE__ */ d("button", { type: "button", onClick: () => Ut(e), children: [
2651
+ /* @__PURE__ */ d("button", { type: "button", onClick: () => It(e), children: [
2642
2652
  e.name,
2643
2653
  e.is_default ? /* @__PURE__ */ r("span", { className: "ml-1 text-nvr-navy/60 dark:text-nvr-cyan/70", children: "· default" }) : e.is_shared && /* @__PURE__ */ r("span", { className: "ml-1 text-slate-400", children: "· shared" })
2644
2654
  ] }),
2645
- Cr && /* @__PURE__ */ r(
2655
+ $r && /* @__PURE__ */ r(
2646
2656
  "button",
2647
2657
  {
2648
2658
  type: "button",
2649
- onClick: () => al.mutate({ viewId: e.id, on: !e.is_default }),
2659
+ onClick: () => il.mutate({ viewId: e.id, on: !e.is_default }),
2650
2660
  title: e.is_default ? "Queue default — click to unset" : "Set as the default view for everyone on this queue",
2651
2661
  className: $(
2652
2662
  "shrink-0",
2653
2663
  e.is_default ? "text-nvr-cyan" : "invisible text-slate-300 hover:text-nvr-cyan group-hover:visible dark:text-slate-600"
2654
2664
  ),
2655
2665
  "aria-label": e.is_default ? "Unset queue default" : "Set queue default",
2656
- children: /* @__PURE__ */ r(Xl, { className: $("h-3 w-3", e.is_default && "fill-current") })
2666
+ children: /* @__PURE__ */ r(no, { className: $("h-3 w-3", e.is_default && "fill-current") })
2657
2667
  }
2658
2668
  ),
2659
- (e.user === v || Gt) && bt === e.id && /* @__PURE__ */ r(
2669
+ (e.user === v || ft) && bt === e.id && /* @__PURE__ */ r(
2660
2670
  "button",
2661
2671
  {
2662
2672
  type: "button",
2663
- onClick: () => Ae.mutate(e),
2664
- disabled: Ae.isPending,
2673
+ onClick: () => Ee.mutate(e),
2674
+ disabled: Ee.isPending,
2665
2675
  title: "Update this view with the current filters, scope and sort",
2666
2676
  className: "shrink-0 text-slate-400 hover:text-nvr-navy disabled:opacity-50 dark:hover:text-nvr-cyan",
2667
2677
  "aria-label": `Update view ${e.name}`,
2668
- "data-view-update-state": Ae.isPending ? "saving" : qr === e.id ? "saved" : "idle",
2669
- children: Ae.isPending && ((t = Ae.variables) == null ? void 0 : t.id) === e.id ? /* @__PURE__ */ r(Zl, { className: "h-3 w-3 animate-spin" }) : qr === e.id ? /* @__PURE__ */ r(
2670
- eo,
2678
+ "data-view-update-state": Ee.isPending ? "saving" : Fr === e.id ? "saved" : "idle",
2679
+ children: Ee.isPending && ((t = Ee.variables) == null ? void 0 : t.id) === e.id ? /* @__PURE__ */ r(ro, { className: "h-3 w-3 animate-spin" }) : Fr === e.id ? /* @__PURE__ */ r(
2680
+ ao,
2671
2681
  {
2672
2682
  className: "h-3 w-3 text-emerald-600 dark:text-emerald-400",
2673
2683
  strokeWidth: 3
2674
2684
  }
2675
- ) : /* @__PURE__ */ r(to, { className: "h-3 w-3" })
2685
+ ) : /* @__PURE__ */ r(lo, { className: "h-3 w-3" })
2676
2686
  }
2677
2687
  ),
2678
2688
  bt === e.id && /* @__PURE__ */ r(
@@ -2686,14 +2696,14 @@ function Vi({
2686
2696
  Ot(e.id) ? "text-nvr-cyan" : "invisible text-slate-300 hover:text-nvr-cyan group-hover:visible dark:text-slate-600"
2687
2697
  ),
2688
2698
  "aria-label": `Subscribe to view ${e.name}`,
2689
- children: /* @__PURE__ */ r(no, { className: $("h-3 w-3", Ot(e.id) && "fill-current") })
2699
+ children: /* @__PURE__ */ r(oo, { className: $("h-3 w-3", Ot(e.id) && "fill-current") })
2690
2700
  }
2691
2701
  ),
2692
2702
  e.user === v && /* @__PURE__ */ r(
2693
2703
  "button",
2694
2704
  {
2695
2705
  type: "button",
2696
- onClick: () => ll.mutate(e.id),
2706
+ onClick: () => cl.mutate(e.id),
2697
2707
  className: "invisible text-slate-400 hover:text-red-500 group-hover:visible",
2698
2708
  "aria-label": `Delete view ${e.name}`,
2699
2709
  children: "×"
@@ -2704,7 +2714,7 @@ function Vi({
2704
2714
  e.id
2705
2715
  );
2706
2716
  }),
2707
- /* @__PURE__ */ d(Ze, { open: nl, onOpenChange: Sn, children: [
2717
+ /* @__PURE__ */ d(Ze, { open: rl, onOpenChange: Sn, children: [
2708
2718
  /* @__PURE__ */ r(et, { asChild: !0, children: /* @__PURE__ */ r(
2709
2719
  "button",
2710
2720
  {
@@ -2716,14 +2726,14 @@ function Vi({
2716
2726
  ) }),
2717
2727
  /* @__PURE__ */ d(tt, { className: "w-[240px] p-3", align: "end", children: [
2718
2728
  (() => {
2719
- const e = V == null ? void 0 : V.data.find((t) => t.id === bt);
2720
- return !e || e.user !== v && !Gt ? null : /* @__PURE__ */ d(
2729
+ const e = G == null ? void 0 : G.data.find((t) => t.id === bt);
2730
+ return !e || e.user !== v && !ft ? null : /* @__PURE__ */ d(
2721
2731
  "button",
2722
2732
  {
2723
2733
  type: "button",
2724
- disabled: Ae.isPending,
2734
+ disabled: Ee.isPending,
2725
2735
  onClick: () => {
2726
- Ae.mutate(e), Sn(!1);
2736
+ Ee.mutate(e), Sn(!1);
2727
2737
  },
2728
2738
  className: "mb-2 w-full rounded-md border border-nvr-cyan/40 bg-nvr-cyan/5 px-2 py-1.5 text-[12px] font-medium text-nvr-navy hover:bg-nvr-cyan/10 disabled:opacity-50 dark:text-nvr-cyan",
2729
2739
  children: [
@@ -2754,7 +2764,7 @@ function Vi({
2754
2764
  ),
2755
2765
  "Share with everyone"
2756
2766
  ] }),
2757
- Cr && /* @__PURE__ */ d("label", { className: "mb-2 flex items-center gap-2 text-[12px] text-slate-600 dark:text-slate-300", children: [
2767
+ $r && /* @__PURE__ */ d("label", { className: "mb-2 flex items-center gap-2 text-[12px] text-slate-600 dark:text-slate-300", children: [
2758
2768
  /* @__PURE__ */ r(
2759
2769
  Ln,
2760
2770
  {
@@ -2768,8 +2778,8 @@ function Vi({
2768
2778
  "button",
2769
2779
  {
2770
2780
  type: "button",
2771
- disabled: !Cn.trim() || $r.isPending,
2772
- onClick: () => $r.mutate(),
2781
+ disabled: !Cn.trim() || qr.isPending,
2782
+ onClick: () => qr.mutate(),
2773
2783
  className: "w-full rounded-md bg-nvr-cyan px-2 py-1.5 text-[12px] font-semibold text-white hover:bg-nvr-cyan/90 disabled:opacity-50",
2774
2784
  children: "Save current view"
2775
2785
  }
@@ -2780,9 +2790,9 @@ function Vi({
2780
2790
  }
2781
2791
  )
2782
2792
  ] }),
2783
- /* @__PURE__ */ d("div", { ref: It, className: "flex min-h-0 flex-1 flex-col overflow-y-auto px-4 pb-4 pt-3", children: [
2784
- Zn && /* @__PURE__ */ r(rs, { error: La, onRetry: () => void Da(), className: "mb-3" }),
2785
- S === "table" ? /* @__PURE__ */ r(_e, { children: /* @__PURE__ */ r("div", { className: "flex min-h-0 flex-1", children: /* @__PURE__ */ d(
2793
+ /* @__PURE__ */ d("div", { ref: Vt, className: "flex min-h-0 flex-1 flex-col overflow-y-auto px-4 pb-4 pt-3", children: [
2794
+ Zn && /* @__PURE__ */ r(ss, { error: Da, onRetry: () => void Pa(), className: "mb-3" }),
2795
+ C === "table" ? /* @__PURE__ */ r(_e, { children: /* @__PURE__ */ r("div", { className: "flex min-h-0 flex-1", children: /* @__PURE__ */ d(
2786
2796
  "div",
2787
2797
  {
2788
2798
  ref: Se.rootRef,
@@ -2798,43 +2808,40 @@ function Vi({
2798
2808
  "s"
2799
2809
  ] }),
2800
2810
  /* @__PURE__ */ r(
2801
- Wo,
2811
+ Xo,
2802
2812
  {
2803
2813
  fillHeight: !0,
2804
2814
  enterKey: cr.current,
2805
- density: St,
2815
+ density: Ct,
2806
2816
  minBodyHeight: 360,
2807
2817
  columns: Wt,
2808
- rows: C,
2818
+ rows: S,
2809
2819
  rowKey: (e) => `${e.collection}:${e.item_id}`,
2810
2820
  total: (i == null ? void 0 : i.total) ?? 0,
2811
2821
  page: Ne,
2812
2822
  limit: an,
2813
2823
  isLoading: je,
2814
2824
  onPageChange: L,
2815
- onRowClick: (e) => jt(e),
2816
- rowDragProps: (e) => Ia({ collection: e.collection, id: e.item_id }),
2825
+ onRowClick: (e) => Ut(e),
2826
+ rowDragProps: (e) => Va({ collection: e.collection, id: e.item_id }),
2817
2827
  onRowContextMenu: (e, t) => {
2818
2828
  t.preventDefault(), mt({ x: t.clientX, y: t.clientY, row: e });
2819
2829
  },
2820
2830
  rowTitle: (e) => {
2821
- const t = Mt.get(P(e));
2822
- return Se.titleFor(P(e)) ?? (t && !t.is_mine ? _o(t) : void 0);
2831
+ const t = Bt.get(P(e));
2832
+ return Se.titleFor(P(e)) ?? (t && !t.is_mine ? $o(t) : void 0) ?? (Cr(e.collection, e.item_id) ? us : void 0);
2823
2833
  },
2824
- rowClassName: (e) => Bt === P(e) ? (
2825
- // Pinned sticky cells use bg-inherit — the highlight must be
2826
- // OPAQUE (nvr-cyan/5-over-white equivalents) or horizontally
2827
- // scrolled content bleeds through the pinned columns. Same
2828
- // pair DataTable uses for selected rows when pins are active.
2829
- "bg-[#f2fdff] dark:bg-[#20303a]"
2830
- ) : e.at_risk ? Ao(e.at_risk_color ?? "red") : void 0,
2834
+ rowClassName: (e) => $(
2835
+ sl(e),
2836
+ Cr(e.collection, e.item_id) && ds
2837
+ ),
2831
2838
  emptyMessage: Zn ? /* @__PURE__ */ r("span", { className: "sr-only", children: "The list did not load." }) : /* @__PURE__ */ r(
2832
- Ho,
2839
+ zo,
2833
2840
  {
2834
- icon: ro,
2835
- title: ((zr = i == null ? void 0 : i.empty) == null ? void 0 : zr.reason) === "not_permitted" ? "You cannot read this queue’s records" : ((Xr = i == null ? void 0 : i.empty) == null ? void 0 : Xr.reason) === "scope_mine" ? "Nothing waiting on you" : ((Zr = i == null ? void 0 : i.empty) == null ? void 0 : Zr.reason) === "filters" ? "No records match these filters" : "Nothing in this queue",
2836
- detail: ((ea = i == null ? void 0 : i.empty) == null ? void 0 : ea.reason) === "filters" && ce > 0 ? `Your default ${nr(jr)} filter is hiding ${ce.toLocaleString("en-US")} item${ce === 1 ? "" : "s"} here.` : ((ta = i == null ? void 0 : i.empty) == null ? void 0 : ta.reason) === "filters" ? g !== "all" ? "Your filters and the current tab leave nothing to show. Widen a filter or look across all items." : "Widen or clear a filter to see more of the queue." : ((na = i == null ? void 0 : i.empty) == null ? void 0 : na.message) ?? "Records land here when they match the queue sources — a state change or new record can appear at any moment.",
2837
- action: ((ra = i == null ? void 0 : i.empty) == null ? void 0 : ra.reason) === "filters" ? /* @__PURE__ */ d("div", { className: "flex items-center justify-center gap-2", children: [
2841
+ icon: so,
2842
+ title: ((zr = i == null ? void 0 : i.empty) == null ? void 0 : zr.reason) === "not_permitted" ? "You cannot read this queue’s records" : ((Zr = i == null ? void 0 : i.empty) == null ? void 0 : Zr.reason) === "scope_mine" ? "Nothing waiting on you" : ((ea = i == null ? void 0 : i.empty) == null ? void 0 : ea.reason) === "filters" ? "No records match these filters" : "Nothing in this queue",
2843
+ detail: ((ta = i == null ? void 0 : i.empty) == null ? void 0 : ta.reason) === "filters" && ce > 0 ? `Your default ${nr(Ur)} filter is hiding ${ce.toLocaleString("en-US")} item${ce === 1 ? "" : "s"} here.` : ((na = i == null ? void 0 : i.empty) == null ? void 0 : na.reason) === "filters" ? g !== "all" ? "Your filters and the current tab leave nothing to show. Widen a filter or look across all items." : "Widen or clear a filter to see more of the queue." : ((ra = i == null ? void 0 : i.empty) == null ? void 0 : ra.message) ?? "Records land here when they match the queue sources — a state change or new record can appear at any moment.",
2844
+ action: ((aa = i == null ? void 0 : i.empty) == null ? void 0 : aa.reason) === "filters" ? /* @__PURE__ */ d("div", { className: "flex items-center justify-center gap-2", children: [
2838
2845
  ce > 0 && /* @__PURE__ */ d(
2839
2846
  "button",
2840
2847
  {
@@ -2879,33 +2886,33 @@ function Vi({
2879
2886
  ] }) : void 0
2880
2887
  }
2881
2888
  ),
2882
- sort: I,
2889
+ sort: V,
2883
2890
  onSortChange: (e) => {
2884
2891
  De(e), L(1);
2885
2892
  },
2886
- filterDefs: Rn,
2893
+ filterDefs: Tn,
2887
2894
  filterValues: w,
2888
2895
  onFilterChange: (e, t) => {
2889
2896
  K((n) => ({ ...n, [e]: t })), L(1);
2890
2897
  },
2891
- rowGroups: cl ?? void 0,
2898
+ rowGroups: bl ?? void 0,
2892
2899
  collapsedGroups: fe,
2893
- onToggleGroup: Za,
2894
- selectedIds: At && z ? Oe : void 0,
2895
- onSelectionChange: At && z ? We : void 0,
2900
+ onToggleGroup: el,
2901
+ selectedIds: At && X ? Ae : void 0,
2902
+ onSelectionChange: At && X ? We : void 0,
2896
2903
  hideFilterRow: !0,
2897
2904
  nowrapCells: !0,
2898
- columnPins: Mr,
2905
+ columnPins: Br,
2899
2906
  onColumnPinChange: (e, t) => {
2900
2907
  Zt((n) => {
2901
- const a = { ...n ?? Mr };
2908
+ const a = { ...n ?? Br };
2902
2909
  return t ? a[e] = t : delete a[e], a;
2903
2910
  });
2904
2911
  },
2905
2912
  columnFilterRow: !0,
2906
2913
  hScrollProxy: !0,
2907
2914
  footer: /* @__PURE__ */ r(
2908
- ss,
2915
+ ps,
2909
2916
  {
2910
2917
  collections: ct,
2911
2918
  selectedIds: String(w.at_risk_rule ?? "").split(",").map((e) => Number(e)).filter((e) => Number.isFinite(e) && e > 0),
@@ -2923,12 +2930,12 @@ function Vi({
2923
2930
  )
2924
2931
  ]
2925
2932
  }
2926
- ) }) }) : S === "kanban" ? /* @__PURE__ */ r(
2927
- xs,
2933
+ ) }) }) : C === "kanban" ? /* @__PURE__ */ r(
2934
+ Ss,
2928
2935
  {
2929
- items: C,
2930
- onCardClick: (e) => jt(e),
2931
- onDrop: (e, t) => Ba.mutate({ item: e, targetState: t }),
2936
+ items: S,
2937
+ onCardClick: (e) => Ut(e),
2938
+ onDrop: (e, t) => Qa.mutate({ item: e, targetState: t }),
2932
2939
  onClaim: (e) => Fe.mutate(e),
2933
2940
  onRelease: (e) => Ue.mutate(e),
2934
2941
  swimlaneBy: rt,
@@ -2939,21 +2946,21 @@ function Vi({
2939
2946
  Qn.current = e;
2940
2947
  }
2941
2948
  }
2942
- ) : /* @__PURE__ */ r(ks, { queueId: l })
2949
+ ) : /* @__PURE__ */ r($s, { queueId: l })
2943
2950
  ] }),
2944
- At && z && /* @__PURE__ */ d(
2945
- fs,
2951
+ At && X && /* @__PURE__ */ d(
2952
+ _s,
2946
2953
  {
2947
- count: Oe.length,
2954
+ count: Ae.length,
2948
2955
  claimsEnabled: ie,
2949
2956
  showClaim: on("claim"),
2950
2957
  showRelease: on("release"),
2951
2958
  showTransition: on("transition"),
2952
2959
  states: kr((i == null ? void 0 : i.available_values.state) ?? []).map((e) => ({
2953
2960
  value: e,
2954
- label: Te(e)
2961
+ label: Re(e)
2955
2962
  })),
2956
- busy: Rr,
2963
+ busy: Er,
2957
2964
  onClaim: () => $n(
2958
2965
  "Claim",
2959
2966
  (e) => p.request(
@@ -2975,29 +2982,29 @@ function Vi({
2975
2982
  onTransition: (e) => $n("Transition", (t) => or(t, e)),
2976
2983
  onClear: () => We([]),
2977
2984
  children: [
2978
- Oe.length >= 2 && /* @__PURE__ */ r(
2985
+ Ae.length >= 2 && /* @__PURE__ */ r(
2979
2986
  "button",
2980
2987
  {
2981
2988
  type: "button",
2982
2989
  onClick: () => {
2983
- const e = So(
2984
- C.filter((t) => Oe.includes(P(t)) && t.collection !== "tasks").map((t) => W.urlFor(Nn(t)))
2990
+ const e = Fo(
2991
+ S.filter((t) => Ae.includes(P(t)) && t.collection !== "tasks").map((t) => W.urlFor(Nn(t)))
2985
2992
  );
2986
- e.blocked > 0 || e.capped > 0 ? A.warning(ua(e)) : A.success(ua(e));
2993
+ e.blocked > 0 || e.capped > 0 ? E.warning(ma(e)) : E.success(ma(e));
2987
2994
  },
2988
2995
  "data-bulk-open-tabs": !0,
2989
- title: `Open the selected records in new tabs (up to ${No})`,
2996
+ title: `Open the selected records in new tabs (up to ${qo})`,
2990
2997
  className: "h-8 rounded-md border border-white/20 px-3 text-[12.5px] font-medium hover:bg-white/10 dark:border-border dark:hover:bg-muted",
2991
2998
  children: "Open in tabs"
2992
2999
  }
2993
3000
  ),
2994
3001
  /* @__PURE__ */ r(
2995
- Io,
3002
+ Ho,
2996
3003
  {
2997
- targets: C.filter((e) => Oe.includes(P(e)) && e.collection !== "tasks").map((e) => ({ collection: e.collection, id: e.item_id, label: e.label })),
3004
+ targets: S.filter((e) => Ae.includes(P(e)) && e.collection !== "tasks").map((e) => ({ collection: e.collection, id: e.item_id, label: e.label })),
2998
3005
  enabledKeys: (u == null ? void 0 : u.bulk_action_keys) ?? null,
2999
3006
  tone: "light",
3000
- disabled: Rr,
3007
+ disabled: Er,
3001
3008
  onDone: (e) => {
3002
3009
  e.failed === 0 && We([]), h.invalidateQueries({ queryKey: ["queue-items", l] });
3003
3010
  }
@@ -3007,7 +3014,7 @@ function Vi({
3007
3014
  }
3008
3015
  ),
3009
3016
  Z != null && Z.length ? /* @__PURE__ */ r(
3010
- os,
3017
+ bs,
3011
3018
  {
3012
3019
  collection: Z[0].collection,
3013
3020
  itemId: Z[0].itemId,
@@ -3016,12 +3023,12 @@ function Vi({
3016
3023
  width: Z[0].width,
3017
3024
  title: Z[0].title,
3018
3025
  stack: Z,
3019
- onPush: (e) => gt.push([...Z, e]),
3020
- onPop: () => gt.back(),
3021
- onClose: () => gt.back(Z.length)
3026
+ onPush: (e) => xt.push([...Z, e]),
3027
+ onPop: () => xt.back(),
3028
+ onClose: () => xt.back(Z.length)
3022
3029
  }
3023
3030
  ) : null,
3024
- M && ia(
3031
+ M && ca(
3025
3032
  /* @__PURE__ */ d(
3026
3033
  "div",
3027
3034
  {
@@ -3036,14 +3043,14 @@ function Vi({
3036
3043
  "data-queue-row-menu": !0,
3037
3044
  children: [
3038
3045
  [
3039
- { label: "Open", run: () => jt(M.row) },
3046
+ { label: "Open", run: () => Ut(M.row) },
3040
3047
  {
3041
3048
  label: "Open full record",
3042
3049
  run: () => ut(M.row)
3043
3050
  },
3044
- { label: "Peek", run: () => Re(M.row) },
3051
+ { label: "Peek", run: () => Te(M.row) },
3045
3052
  ...ie ? [
3046
- ((aa = M.row.claimed_by) == null ? void 0 : aa.id) === v ? { label: "Release claim", run: () => Ue.mutate(M.row) } : { label: "Claim", run: () => Fe.mutate(M.row) }
3053
+ ((la = M.row.claimed_by) == null ? void 0 : la.id) === v ? { label: "Release claim", run: () => Ue.mutate(M.row) } : { label: "Claim", run: () => Fe.mutate(M.row) }
3047
3054
  ] : [],
3048
3055
  {
3049
3056
  label: "Copy ID",
@@ -3087,7 +3094,7 @@ function Vi({
3087
3094
  {
3088
3095
  type: "button",
3089
3096
  onClick: () => {
3090
- zn(M.row, e), mt(null);
3097
+ Xn(M.row, e), mt(null);
3091
3098
  },
3092
3099
  className: "flex w-full items-center gap-2 px-3 py-1.5 text-left text-[12px] text-slate-700 hover:bg-slate-50 dark:text-slate-200 dark:hover:bg-slate-800",
3093
3100
  children: [
@@ -3111,7 +3118,7 @@ function Vi({
3111
3118
  const n = e.target.elements.namedItem(
3112
3119
  "newlabel"
3113
3120
  ).value.trim();
3114
- n && (zn(M.row, n), mt(null));
3121
+ n && (Xn(M.row, n), mt(null));
3115
3122
  },
3116
3123
  className: "px-3 py-1",
3117
3124
  children: /* @__PURE__ */ r(
@@ -3132,9 +3139,9 @@ function Vi({
3132
3139
  ),
3133
3140
  document.body
3134
3141
  ),
3135
- Yn && ia(
3142
+ Yn && ca(
3136
3143
  /* @__PURE__ */ r(
3137
- As,
3144
+ Ms,
3138
3145
  {
3139
3146
  queueId: l,
3140
3147
  drill: Yn,
@@ -3147,38 +3154,38 @@ function Vi({
3147
3154
  document.body
3148
3155
  ),
3149
3156
  /* @__PURE__ */ r(
3150
- gs,
3157
+ Ns,
3151
3158
  {
3152
3159
  item: ke,
3153
3160
  stateLabels: vn,
3154
3161
  collectionLabel: dt,
3155
3162
  claimsEnabled: ie,
3156
- columnFormats: ml,
3163
+ columnFormats: fl,
3157
3164
  width: u == null ? void 0 : u.sheet_width,
3158
3165
  itemLayout: u == null ? void 0 : u.item_layout,
3159
3166
  onOpenChange: (e) => {
3160
- e || (Re(null), _n(!1));
3167
+ e || (Te(null), _n(!1));
3161
3168
  },
3162
3169
  onClaim: (e) => Fe.mutate(e),
3163
3170
  onRelease: (e) => Ue.mutate(e),
3164
- workNextActive: el,
3171
+ workNextActive: tl,
3165
3172
  onNext: () => ke && vr(ke),
3166
3173
  refetchItems: () => h.invalidateQueries({ queryKey: ["queue-items", l] })
3167
3174
  }
3168
3175
  ),
3169
- Lt.dialog
3176
+ Dt.dialog
3170
3177
  ] });
3171
3178
  }
3172
- function As({
3179
+ function Ms({
3173
3180
  queueId: l,
3174
3181
  drill: f,
3175
3182
  onClose: q,
3176
3183
  onOpenRecord: D
3177
3184
  }) {
3178
- const U = ha(), { data: h, isLoading: p } = H({
3185
+ const I = fa(), { data: h, isLoading: p } = H({
3179
3186
  queryKey: ["queue-agg-rows", l, f.row.collection, f.row.item_id, f.path],
3180
- queryFn: () => U.request(
3181
- E(`/queues/${l}/aggregate-rows`, {
3187
+ queryFn: () => I.request(
3188
+ O(`/queues/${l}/aggregate-rows`, {
3182
3189
  collection: f.row.collection,
3183
3190
  item_id: f.row.item_id,
3184
3191
  path: f.path
@@ -3200,7 +3207,7 @@ function As({
3200
3207
  /* @__PURE__ */ d("div", { children: [
3201
3208
  /* @__PURE__ */ r("p", { className: "text-[13px] font-semibold", children: f.row.label }),
3202
3209
  /* @__PURE__ */ d("p", { className: "text-[11.5px] text-muted-foreground", children: [
3203
- Nt(f.path),
3210
+ St(f.path),
3204
3211
  " = ",
3205
3212
  /* @__PURE__ */ r("span", { className: "tabular-nums", children: f.value }),
3206
3213
  " ",
@@ -3236,5 +3243,5 @@ function As({
3236
3243
  );
3237
3244
  }
3238
3245
  export {
3239
- Vi as QueueWorklist
3246
+ Zi as QueueWorklist
3240
3247
  };