@nivaro/react 0.3.8 → 0.3.10

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.
Files changed (60) hide show
  1. package/dist/components/fields/FileField.js +20 -19
  2. package/dist/full.css +1 -1
  3. package/dist/hooks/replayUploadQueue.js +107 -93
  4. package/dist/hooks/useNivaroForm.js +129 -126
  5. package/dist/hooks/useSessionRecorder.js +103 -101
  6. package/dist/index.d.ts +115 -2
  7. package/dist/index.js +466 -447
  8. package/dist/shared/components/CollectionBrowserView.js +1058 -1059
  9. package/dist/shared/components/ConformanceView.js +36 -35
  10. package/dist/shared/components/DataTable.js +230 -223
  11. package/dist/shared/components/ForceReloadBanner.js +58 -34
  12. package/dist/shared/components/ItemEditForm.js +3687 -3580
  13. package/dist/shared/components/JsonMapEditor.js +18 -17
  14. package/dist/shared/components/MatrixEditor.js +8 -7
  15. package/dist/shared/components/MyWorkView.js +32 -31
  16. package/dist/shared/components/PageRenderer.js +146 -145
  17. package/dist/shared/components/QueryTable.js +49 -49
  18. package/dist/shared/components/RecordGridEditor.js +76 -75
  19. package/dist/shared/components/ai/AiMemorySuggestions.js +15 -14
  20. package/dist/shared/components/ai/AskPanel.js +55 -54
  21. package/dist/shared/components/bulk/BulkActionButtons.js +30 -29
  22. package/dist/shared/components/bulk/PushBulkButtons.js +57 -56
  23. package/dist/shared/components/chat/ChatPanel.js +288 -287
  24. package/dist/shared/components/chat/SlashCommands.js +30 -29
  25. package/dist/shared/components/chat/chat-outbox.js +76 -75
  26. package/dist/shared/components/help-videos/recorder/useLeaveWarning.js +6 -5
  27. package/dist/shared/components/integrations/console/SignalCard.js +124 -123
  28. package/dist/shared/components/integrations/console/SnoozeMenu.js +24 -23
  29. package/dist/shared/components/item-edit/CloneDialog.js +85 -78
  30. package/dist/shared/components/item-edit/InlineTableField.js +301 -300
  31. package/dist/shared/components/item-edit/MembershipSetField.js +24 -23
  32. package/dist/shared/components/item-edit/QuickCreateButton.js +8 -7
  33. package/dist/shared/components/item-edit/RecordLiveSync.js +101 -100
  34. package/dist/shared/components/item-edit/staged-links.js +86 -0
  35. package/dist/shared/components/layout-editor/LayoutEditor.js +275 -274
  36. package/dist/shared/components/layout-editor/editors/cascade-rule-row.js +18 -17
  37. package/dist/shared/components/layout-editor/inspector/HelpTab.js +37 -36
  38. package/dist/shared/components/layout-editor/matrix/FieldStateMatrix.js +50 -49
  39. package/dist/shared/components/panels/CommentPanel.js +237 -236
  40. package/dist/shared/components/profile/AiMemoryCard.js +15 -14
  41. package/dist/shared/components/profile/PersonAdminTools.js +70 -67
  42. package/dist/shared/components/profile/usePersonPresence.js +42 -37
  43. package/dist/shared/components/queue/QueueItemSheet.js +36 -35
  44. package/dist/shared/components/queue/QueueWorklist.js +597 -598
  45. package/dist/shared/lib/client-version.js +63 -0
  46. package/dist/shared/lib/force-reload.js +36 -0
  47. package/dist/shared/lib/load-error.js +11 -10
  48. package/dist/shared/lib/presence-live.js +73 -0
  49. package/dist/shared/lib/presence-state.js +39 -31
  50. package/dist/shared/lib/record-outbox.js +76 -75
  51. package/dist/shared/lib/request-gate.js +120 -102
  52. package/dist/shared/lib/rum.js +45 -36
  53. package/dist/shared/lib/safe-error.js +39 -0
  54. package/dist/shared/lib/server-clock.js +11 -7
  55. package/dist/shared/lib/signed-out.js +114 -0
  56. package/dist/shared/lib/socket-realtime.js +19 -17
  57. package/dist/shared/lib/unsaved-work.js +62 -0
  58. package/dist/shared/lib/use-online-users.js +11 -10
  59. package/dist/shared/lib/worker-socket.js +89 -79
  60. package/package.json +1 -1
@@ -1,69 +1,70 @@
1
1
  import { jsxs as d, Fragment as ke, jsx as r } from "react/jsx-runtime";
2
- import { useSensors as dl, useSensor as ul, PointerSensor as ml, DndContext as bl, closestCenter as pl } from "@dnd-kit/core";
3
- import { SortableContext as hl, verticalListSortingStrategy as fl, arrayMove as gl, useSortable as xl } from "@dnd-kit/sortable";
4
- import { CSS as yl } from "@dnd-kit/utilities";
5
- import { useQueryClient as kl, useQuery as H, useMutation as ye, useQueries as Ve } from "@tanstack/react-query";
6
- import { AlertTriangle as vl, FileDiff as wl, RefreshCw as _l, Rows3 as Vr, Flame as Nl, Sparkles as Sl, BarChart3 as Cl, SlidersHorizontal as $l, Rows4 as ql, Rows2 as Fl, Play as Rl, Plus as jt, ChevronDown as Gr, Star as Tl, Pin as Al, Loader2 as El, Check as Ol, Save as Ll, Bell as Dl, Inbox as Pl, GripVertical as Kl } from "lucide-react";
2
+ import { useSensors as ul, useSensor as ml, PointerSensor as bl, DndContext as pl, closestCenter as hl } from "@dnd-kit/core";
3
+ import { SortableContext as fl, verticalListSortingStrategy as gl, arrayMove as xl, useSortable as yl } from "@dnd-kit/sortable";
4
+ import { CSS as kl } from "@dnd-kit/utilities";
5
+ import { useQueryClient as vl, useQuery as H, useMutation as ye, useQueries as Ve } from "@tanstack/react-query";
6
+ import { AlertTriangle as wl, FileDiff as _l, RefreshCw as Nl, Rows3 as Gr, Flame as Sl, Sparkles as Cl, BarChart3 as $l, SlidersHorizontal as ql, Rows4 as Fl, Rows2 as Rl, Play as Tl, Plus as Ut, ChevronDown as Wr, Star as Al, Pin as Ol, Loader2 as El, Check as Ll, Save as Dl, Bell as Pl, Inbox as Kl, GripVertical as Ml } from "lucide-react";
7
7
  import { useState as k, useRef as B, useEffect as j, useMemo as G } from "react";
8
- import { createPortal as Wr } from "react-dom";
8
+ import { createPortal as Hr } from "react-dom";
9
9
  import { toast as T } from "sonner";
10
- import { useNivaroClient as ea, useItemEditAuth as Hr, useItemNavigation as Ml, useNavigation as Ql, useOverlayState as Bl } from "../../context.js";
11
- import { useDebounced as jl } from "../../hooks/useDebounced.js";
12
- import { useElapsedLoading as Ul } from "../../hooks/useElapsedLoading.js";
13
- import { useBulkProgressFeed as Il } from "../../lib/bulk-progress.js";
14
- import { get as E, post as ne, patch as Jr, del as $n, put as Vl } from "../../lib/commands.js";
15
- import { evaluateExpression as Gl } from "../../lib/expression.js";
16
- import { deliverLive as Wl, releaseLiveOwner as Hl } from "../../lib/focus-mode.js";
17
- import { formatMultiValue as Ge, formatValue as Jl } from "../../lib/format-value.js";
18
- import { createCursorBook as Yl, pageRequest as zl, noteNextCursor as Xl } from "../../lib/keyset-pager.js";
19
- import { expandCoalesced as Zl, LIVE_ASPECTS as ft } from "../../lib/live.js";
20
- import { useRowChanges as eo, useRowLocksByCollection as to, lockLabel as no } from "../../lib/live-list.js";
21
- import { OPEN_IN_TABS_CAP as ro, openInTabs as ao, openInTabsMessage as Yr } from "../../lib/open-in-tabs.js";
22
- import { isOwnWrite as lo } from "../../lib/own-writes.js";
23
- import { useRowPresence as oo, rowPresenceKey as so } from "../../lib/presence-hooks.js";
24
- import { buildGroups as io } from "../../lib/queue-grouping.js";
25
- import { useOptionalRealtime as co } from "../../lib/realtime.js";
26
- import { rowHighlightTextClass as uo, rowHighlightClass as mo } from "../../lib/row-highlight.js";
27
- import { useMyScopes as bo, matchScopeDimension as po, effectiveScopeSeedIds as ho } from "../../lib/use-my-scopes.js";
28
- import { useNewItemLayouts as fo } from "../../lib/use-new-item-layouts.js";
29
- import { formatNumber as re, cn as C, titleCase as qn, humanHours as go, formatRelative as xo, formatDateTime as yo, formatDate as ko } from "../../lib/utils.js";
30
- import { usePublishAskContext as vo, useAskRecordDrag as wo } from "../ai/ask-context.js";
31
- import { useBuiltinGate as _o, BulkActionButtons as No } from "../bulk/BulkActionButtons.js";
32
- import { BulkRowMark as So } from "../bulk/BulkRowMark.js";
33
- import { RowActionsMenu as Co } from "../CollectionBrowserView.js";
34
- import { DataTable as $o } from "../DataTable.js";
35
- import { EmptyState as qo } from "../EmptyState.js";
36
- import { FocusModeToggle as Fo } from "../FocusModeToggle.js";
37
- import { FulfilmentPill as Ro, FULFILMENT_FILTER_OPTIONS as To } from "../FulfilmentPill.js";
38
- import { ImportFromFileButton as Ao } from "../import/ImportFromFileButton.js";
39
- import { IntegrationDots as Eo, INTEGRATIONS_FILTER_OPTIONS as Oo } from "../integrations/IntegrationDots.js";
40
- import { IntegrationsFilterPill as Lo } from "../integrations/IntegrationsFilterPill.js";
41
- import { readQueueReturn as Do, writeQueueReturn as zr } from "../item-edit/QueueReturnChip.js";
42
- import { LiveRowMark as Po } from "../LiveRowMark.js";
43
- import { RealtimeStaleMark as Ko } from "../RealtimeStatusBanner.js";
44
- import { RecordDrilldownSheet as Mo } from "../RecordDrilldownSheet.js";
45
- import { RowHighlightLegend as Qo } from "../RowHighlightLegend.js";
46
- import { RowPresence as Bo } from "../RowPresence.js";
47
- import { TickerNumber as Fn } from "../TickerNumber.js";
48
- import { UnseenDot as jo } from "../UnseenDot.js";
49
- import { Badge as Uo } from "../ui/badge.js";
50
- import { Checkbox as Rn } from "../ui/checkbox.js";
51
- import { Command as Xr, CommandInput as Io, CommandList as Zr, CommandEmpty as Vo, CommandItem as gt } from "../ui/command.js";
52
- import { Label as Go } from "../ui/label.js";
10
+ import { useNivaroClient as ta, useItemEditAuth as Jr, useItemNavigation as Ql, useNavigation as Bl, useOverlayState as jl } from "../../context.js";
11
+ import { useDebounced as Ul } from "../../hooks/useDebounced.js";
12
+ import { useElapsedLoading as Il } from "../../hooks/useElapsedLoading.js";
13
+ import { useBulkProgressFeed as Vl } from "../../lib/bulk-progress.js";
14
+ import { get as O, post as ne, patch as Yr, del as qn, put as Gl } from "../../lib/commands.js";
15
+ import { evaluateExpression as Wl } from "../../lib/expression.js";
16
+ import { deliverLive as Hl, releaseLiveOwner as Jl } from "../../lib/focus-mode.js";
17
+ import { formatMultiValue as Ge, formatValue as Yl } from "../../lib/format-value.js";
18
+ import { createCursorBook as zl, pageRequest as Xl, noteNextCursor as Zl } from "../../lib/keyset-pager.js";
19
+ import { expandCoalesced as eo, LIVE_ASPECTS as ft } from "../../lib/live.js";
20
+ import { useRowChanges as to, useRowLocksByCollection as no, lockLabel as ro } from "../../lib/live-list.js";
21
+ import { OPEN_IN_TABS_CAP as ao, openInTabs as lo, openInTabsMessage as zr } from "../../lib/open-in-tabs.js";
22
+ import { isOwnWrite as oo } from "../../lib/own-writes.js";
23
+ import { useRowPresence as so, rowPresenceKey as io } from "../../lib/presence-hooks.js";
24
+ import { buildGroups as co } from "../../lib/queue-grouping.js";
25
+ import { useOptionalRealtime as uo } from "../../lib/realtime.js";
26
+ import { rowHighlightTextClass as mo, rowHighlightClass as bo } from "../../lib/row-highlight.js";
27
+ import { userErrorMessage as gt } from "../../lib/safe-error.js";
28
+ import { useMyScopes as po, matchScopeDimension as ho, effectiveScopeSeedIds as fo } from "../../lib/use-my-scopes.js";
29
+ import { useNewItemLayouts as go } from "../../lib/use-new-item-layouts.js";
30
+ import { formatNumber as re, cn as C, titleCase as Fn, humanHours as xo, formatRelative as yo, formatDateTime as ko, formatDate as vo } from "../../lib/utils.js";
31
+ import { usePublishAskContext as wo, useAskRecordDrag as _o } from "../ai/ask-context.js";
32
+ import { useBuiltinGate as No, BulkActionButtons as So } from "../bulk/BulkActionButtons.js";
33
+ import { BulkRowMark as Co } from "../bulk/BulkRowMark.js";
34
+ import { RowActionsMenu as $o } from "../CollectionBrowserView.js";
35
+ import { DataTable as qo } from "../DataTable.js";
36
+ import { EmptyState as Fo } from "../EmptyState.js";
37
+ import { FocusModeToggle as Ro } from "../FocusModeToggle.js";
38
+ import { FulfilmentPill as To, FULFILMENT_FILTER_OPTIONS as Ao } from "../FulfilmentPill.js";
39
+ import { ImportFromFileButton as Oo } from "../import/ImportFromFileButton.js";
40
+ import { IntegrationDots as Eo, INTEGRATIONS_FILTER_OPTIONS as Lo } from "../integrations/IntegrationDots.js";
41
+ import { IntegrationsFilterPill as Do } from "../integrations/IntegrationsFilterPill.js";
42
+ import { readQueueReturn as Po, writeQueueReturn as Xr } from "../item-edit/QueueReturnChip.js";
43
+ import { LiveRowMark as Ko } from "../LiveRowMark.js";
44
+ import { RealtimeStaleMark as Mo } from "../RealtimeStatusBanner.js";
45
+ import { RecordDrilldownSheet as Qo } from "../RecordDrilldownSheet.js";
46
+ import { RowHighlightLegend as Bo } from "../RowHighlightLegend.js";
47
+ import { RowPresence as jo } from "../RowPresence.js";
48
+ import { TickerNumber as Rn } from "../TickerNumber.js";
49
+ import { UnseenDot as Uo } from "../UnseenDot.js";
50
+ import { Badge as Io } from "../ui/badge.js";
51
+ import { Checkbox as Tn } from "../ui/checkbox.js";
52
+ import { Command as Zr, CommandInput as Vo, CommandList as ea, CommandEmpty as Go, CommandItem as xt } from "../ui/command.js";
53
+ import { Label as Wo } from "../ui/label.js";
53
54
  import { Popover as We, PopoverTrigger as He, PopoverContent as Je } from "../ui/popover.js";
54
- import { Skeleton as Wo } from "../ui/skeleton.js";
55
- import { OwnerAvatars as Ho } from "./OwnerAvatars.js";
56
- import { QueueBulkBar as Jo } from "./QueueBulkBar.js";
57
- import { QueueItemSheet as Yo } from "./QueueItemSheet.js";
58
- import { QueueKanbanBoard as zo } from "./QueueKanbanBoard.js";
59
- import { QueueQuickFilters as Xo } from "./QueueQuickFilters.js";
60
- import { QueueWorkloadView as Zo } from "./QueueWorkloadView.js";
61
- function es({ summary: l }) {
55
+ import { Skeleton as Ho } from "../ui/skeleton.js";
56
+ import { OwnerAvatars as Jo } from "./OwnerAvatars.js";
57
+ import { QueueBulkBar as Yo } from "./QueueBulkBar.js";
58
+ import { QueueItemSheet as zo } from "./QueueItemSheet.js";
59
+ import { QueueKanbanBoard as Xo } from "./QueueKanbanBoard.js";
60
+ import { QueueQuickFilters as Zo } from "./QueueQuickFilters.js";
61
+ import { QueueWorkloadView as es } from "./QueueWorkloadView.js";
62
+ function ts({ summary: l }) {
62
63
  if (!l || l.count === 0)
63
64
  return /* @__PURE__ */ r("span", { className: "text-slate-300 dark:text-muted-foreground", children: "—" });
64
65
  const f = [l.last_from, l.last_to].filter(Boolean).join(" → "), $ = [
65
66
  f ? `Last: ${f}` : null,
66
- l.last_at ? xo(l.last_at) : null,
67
+ l.last_at ? yo(l.last_at) : null,
67
68
  l.last_reason ? `“${l.last_reason}”` : "no reason given"
68
69
  ].filter(Boolean).join(" · ");
69
70
  return /* @__PURE__ */ d(
@@ -85,15 +86,15 @@ function es({ summary: l }) {
85
86
  }
86
87
  );
87
88
  }
88
- const ts = 50, Ut = "nivaro_addendums", ns = [
89
+ const ns = 50, It = "nivaro_addendums", rs = [
89
90
  { value: "mine", label: "My Items" },
90
91
  { value: "unowned", label: "No Owners" },
91
92
  { value: "claimed", label: "Claimed by me" },
92
93
  { value: "all", label: "All Items" }
93
94
  ];
94
- function rs({ summary: l }) {
95
+ function as({ summary: l }) {
95
96
  if (!l || l.total === 0) return /* @__PURE__ */ r("span", { className: "text-slate-300", children: "—" });
96
- const f = l.active > 0, $ = l.latest_status === "review" ? "in review" : l.latest_status ?? "active", O = l.cost_impact, U = O != null && O !== 0 ? `${O > 0 ? "+" : "−"}$${Math.abs(O).toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : null;
97
+ const f = l.active > 0, $ = l.latest_status === "review" ? "in review" : l.latest_status ?? "active", E = l.cost_impact, U = E != null && E !== 0 ? `${E > 0 ? "+" : "−"}$${Math.abs(E).toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : null;
97
98
  return /* @__PURE__ */ d(
98
99
  "span",
99
100
  {
@@ -122,33 +123,33 @@ function rs({ summary: l }) {
122
123
  }
123
124
  );
124
125
  }
125
- function as(l) {
126
- return go(l);
126
+ function ls(l) {
127
+ return xo(l);
127
128
  }
128
- function ls({ status: l }) {
129
+ function os({ status: l }) {
129
130
  return l ? /* @__PURE__ */ r("span", { className: C("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: "—" });
130
131
  }
131
- function os({ points: l, inline: f = !1 }) {
132
+ function ss({ points: l, inline: f = !1 }) {
132
133
  if (l.length < 2) return null;
133
- const $ = f ? 40 : 64, O = f ? 14 : 18, U = Math.max(...l), h = Math.min(...l), p = U - h || 1, v = $ / (l.length - 1), W = l.map(
134
- (me, g) => `${g === 0 ? "M" : "L"}${(g * v).toFixed(1)},${(O - 2 - (me - h) / p * (O - 4)).toFixed(1)}`
134
+ const $ = f ? 40 : 64, E = f ? 14 : 18, U = Math.max(...l), h = Math.min(...l), p = U - h || 1, v = $ / (l.length - 1), W = l.map(
135
+ (me, g) => `${g === 0 ? "M" : "L"}${(g * v).toFixed(1)},${(E - 2 - (me - h) / p * (E - 4)).toFixed(1)}`
135
136
  ).join(" ");
136
137
  return /* @__PURE__ */ r(
137
138
  "svg",
138
139
  {
139
140
  width: $,
140
- height: O,
141
+ height: E,
141
142
  className: f ? "opacity-40" : "mt-1.5 opacity-40",
142
143
  "aria-hidden": "true",
143
144
  children: /* @__PURE__ */ r("path", { d: W, fill: "none", stroke: "currentColor", strokeWidth: "1.5" })
144
145
  }
145
146
  );
146
147
  }
147
- function xt({
148
+ function yt({
148
149
  label: l,
149
150
  count: f,
150
151
  filteredCount: $,
151
- active: O,
152
+ active: E,
152
153
  isLoading: U,
153
154
  tone: h,
154
155
  trend: p,
@@ -163,17 +164,17 @@ function xt({
163
164
  onClick: me,
164
165
  className: C(
165
166
  "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",
166
- O && "bg-nvr-cyan/5 ring-1 ring-inset ring-nvr-cyan dark:bg-nvr-cyan/10",
167
- !O && !U && f === 0 && "opacity-50"
167
+ E && "bg-nvr-cyan/5 ring-1 ring-inset ring-nvr-cyan dark:bg-nvr-cyan/10",
168
+ !E && !U && f === 0 && "opacity-50"
168
169
  ),
169
- children: U ? /* @__PURE__ */ r(Wo, { className: "h-5 w-16 rounded" }) : /* @__PURE__ */ d(ke, { children: [
170
+ children: U ? /* @__PURE__ */ r(Ho, { className: "h-5 w-16 rounded" }) : /* @__PURE__ */ d(ke, { children: [
170
171
  /* @__PURE__ */ r("span", { className: "flex items-baseline gap-1 text-[15px] font-semibold leading-none tabular-nums text-slate-900 dark:text-foreground", children: $ != null ? /* @__PURE__ */ d(ke, { children: [
171
- /* @__PURE__ */ r("span", { className: "text-nvr-navy dark:text-nvr-cyan", children: /* @__PURE__ */ r(Fn, { value: $, format: re }) }),
172
+ /* @__PURE__ */ r("span", { className: "text-nvr-navy dark:text-nvr-cyan", children: /* @__PURE__ */ r(Rn, { value: $, format: re }) }),
172
173
  /* @__PURE__ */ d("span", { className: "text-[11px] font-medium text-slate-400", children: [
173
174
  "/ ",
174
- /* @__PURE__ */ r(Fn, { value: f, format: re })
175
+ /* @__PURE__ */ r(Rn, { value: f, format: re })
175
176
  ] })
176
- ] }) : /* @__PURE__ */ r(Fn, { value: f, format: re }) }),
177
+ ] }) : /* @__PURE__ */ r(Rn, { value: f, format: re }) }),
177
178
  /* @__PURE__ */ r(
178
179
  "span",
179
180
  {
@@ -197,16 +198,16 @@ function xt({
197
198
  ]
198
199
  }
199
200
  ),
200
- p && f > 0 && /* @__PURE__ */ r(os, { points: p, inline: !0 })
201
+ p && f > 0 && /* @__PURE__ */ r(ss, { points: p, inline: !0 })
201
202
  ] })
202
203
  }
203
204
  );
204
205
  }
205
- function ss({
206
+ function is({
206
207
  label: l,
207
208
  count: f,
208
209
  filteredCount: $,
209
- color: O,
210
+ color: E,
210
211
  active: U,
211
212
  onClick: h
212
213
  }) {
@@ -224,7 +225,7 @@ function ss({
224
225
  "span",
225
226
  {
226
227
  className: "h-2 w-2 shrink-0 rounded-full",
227
- style: { backgroundColor: O ?? "#94a3b8" }
228
+ style: { backgroundColor: E ?? "#94a3b8" }
228
229
  }
229
230
  ),
230
231
  l,
@@ -239,19 +240,19 @@ function ss({
239
240
  }
240
241
  );
241
242
  }
242
- function yt(l) {
243
+ function kt(l) {
243
244
  return l.split(".").map((f) => f.replace(/_/g, " ").replace(/\b\w/g, ($) => $.toUpperCase())).join(" → ");
244
245
  }
245
- function is({
246
+ function cs({
246
247
  id: l,
247
248
  label: f,
248
249
  checked: $,
249
- onCheckedChange: O
250
+ onCheckedChange: E
250
251
  }) {
251
- const { attributes: U, listeners: h, setNodeRef: p, transform: v, transition: W, isDragging: me } = xl({
252
+ const { attributes: U, listeners: h, setNodeRef: p, transform: v, transition: W, isDragging: me } = yl({
252
253
  id: l
253
254
  }), g = {
254
- transform: yl.Transform.toString(v),
255
+ transform: kl.Transform.toString(v),
255
256
  transition: W,
256
257
  opacity: me ? 0.4 : 1
257
258
  }, J = `col-toggle-${l}`;
@@ -262,48 +263,48 @@ function is({
262
263
  ...U,
263
264
  ...h,
264
265
  className: "cursor-grab text-slate-300 hover:text-slate-500 dark:text-muted-foreground",
265
- children: /* @__PURE__ */ r(Kl, { className: "h-3.5 w-3.5" })
266
+ children: /* @__PURE__ */ r(Ml, { className: "h-3.5 w-3.5" })
266
267
  }
267
268
  ),
268
- /* @__PURE__ */ r(Rn, { id: J, checked: $, onCheckedChange: O }),
269
- /* @__PURE__ */ r(Go, { htmlFor: J, className: "cursor-pointer text-[12px] font-normal", children: f })
269
+ /* @__PURE__ */ r(Tn, { id: J, checked: $, onCheckedChange: E }),
270
+ /* @__PURE__ */ r(Wo, { htmlFor: J, className: "cursor-pointer text-[12px] font-normal", children: f })
270
271
  ] });
271
272
  }
272
- function yi({
273
+ function vi({
273
274
  queueId: l,
274
275
  realtime: f,
275
276
  renderError: $,
276
- hideCreateActions: O = !1,
277
+ hideCreateActions: E = !1,
277
278
  onAsk: U
278
279
  }) {
279
- var Tr, Ar, Er, Or, Lr, Dr, Pr, Kr, Mr, Qr, Br, jr, Ur;
280
- const h = kl(), p = ea(), { userId: v } = Hr(), W = Ml(), { navigate: me } = Ql(), [g, J] = k("all"), [ve, L] = k(1), Tn = B(Yl()), [kt, ta] = k(() => {
280
+ var Ar, Or, Er, Lr, Dr, Pr, Kr, Mr, Qr, Br, jr, Ur, Ir;
281
+ const h = vl(), p = ta(), { userId: v } = Jr(), W = Ql(), { navigate: me } = Bl(), [g, J] = k("all"), [ve, L] = k(1), An = B(zl()), [vt, na] = k(() => {
281
282
  try {
282
283
  return localStorage.getItem("nvr_table_density") === "comfortable" ? "comfortable" : "compact";
283
284
  } catch {
284
285
  return "compact";
285
286
  }
286
- }), [A, Te] = k("table"), [I, Ae] = k(""), [w, M] = k({}), [vt, An] = k(() => /* @__PURE__ */ new Set()), [N, Ye] = k(null), [be, It] = k(/* @__PURE__ */ new Set()), [ze, Vt] = k(null), [wt, Gt] = k(null), [Wt, _t] = k(0), we = eo(), Ht = co(), Jt = B({}).current, En = B(/* @__PURE__ */ new Set()), [na, ra] = k(0), [On, aa] = k(0), Ee = B(!1), Nt = B([]), Ln = B(null), Dn = B(!1), Pn = B(0), Yt = B("table");
287
- Yt.current = A;
288
- const zt = 25, { data: s, error: St } = H({
287
+ }), [A, Te] = k("table"), [I, Ae] = k(""), [w, M] = k({}), [wt, On] = k(() => /* @__PURE__ */ new Set()), [N, Ye] = k(null), [be, Vt] = k(/* @__PURE__ */ new Set()), [ze, Gt] = k(null), [_t, Wt] = k(null), [Ht, Nt] = k(0), we = to(), Jt = uo(), Yt = B({}).current, En = B(/* @__PURE__ */ new Set()), [ra, aa] = k(0), [Ln, la] = k(0), Oe = B(!1), St = B([]), Dn = B(null), Pn = B(!1), Kn = B(0), zt = B("table");
288
+ zt.current = A;
289
+ const Xt = 25, { data: s, error: Ct } = H({
289
290
  queryKey: ["queue-meta", l],
290
- queryFn: () => p.request(E(`/queues/${l}`)).then((e) => e.data),
291
+ queryFn: () => p.request(O(`/queues/${l}`)).then((e) => e.data),
291
292
  enabled: !!l
292
- }), { scopes: Xe, ready: Kn } = bo(), Mn = B(!1), [Qn, Bn] = k(!1), [Oe, la] = k({}), pe = B({});
293
+ }), { scopes: Xe, ready: Mn } = po(), Qn = B(!1), [Bn, jn] = k(!1), [Ee, oa] = k({}), pe = B({});
293
294
  j(() => {
294
- if (Mn.current || !Kn || !s) return;
295
- Mn.current = !0;
295
+ if (Qn.current || !Mn || !s) return;
296
+ Qn.current = !0;
296
297
  const e = (s.extra_field_meta ?? []).filter(
297
298
  (t) => t.kind === "relation" && t.target_collection && t.display_field
298
299
  );
299
300
  if (e.length === 0 || !Xe) {
300
- Bn(!0);
301
+ jn(!0);
301
302
  return;
302
303
  }
303
304
  (async () => {
304
305
  const t = {}, n = {}, a = async (o, i) => {
305
306
  const b = await p.request(
306
- E(`/items/${o.target_collection}`, {
307
+ O(`/items/${o.target_collection}`, {
307
308
  filter: JSON.stringify({ id: { _in: i } }),
308
309
  fields: `id,${o.display_field}`,
309
310
  limit: "200"
@@ -316,7 +317,7 @@ function yi({
316
317
  ];
317
318
  };
318
319
  for (const o of e) {
319
- const i = po(Xe, { collection: o.target_collection });
320
+ const i = ho(Xe, { collection: o.target_collection });
320
321
  if (!i) continue;
321
322
  const b = `extra.${o.path}`;
322
323
  try {
@@ -325,7 +326,7 @@ function yi({
325
326
  const R = await a(o, m);
326
327
  R.length > 0 && (n[b.slice(6)] = R);
327
328
  }
328
- const K = ho(Xe, i.name);
329
+ const K = fo(Xe, i.name);
329
330
  if (K.length === 0) continue;
330
331
  const F = w[b];
331
332
  if (F && (Array.isArray(F) ? F.length > 0 : F !== ""))
@@ -335,12 +336,12 @@ function yi({
335
336
  } catch {
336
337
  }
337
338
  }
338
- Object.keys(n).length > 0 && la(n), Object.keys(t).length > 0 && (pe.current = t, M((o) => ({ ...o, ...t }))), Bn(!0);
339
+ Object.keys(n).length > 0 && oa(n), Object.keys(t).length > 0 && (pe.current = t, M((o) => ({ ...o, ...t }))), jn(!0);
339
340
  })();
340
- }, [Kn, Xe, s]);
341
- const Le = ((Ar = (Tr = s == null ? void 0 : s.sources) == null ? void 0 : Tr.find((e) => e.type === "collection")) == null ? void 0 : Ar.collection) ?? null, { data: jn = [] } = H({
341
+ }, [Mn, Xe, s]);
342
+ const Le = ((Or = (Ar = s == null ? void 0 : s.sources) == null ? void 0 : Ar.find((e) => e.type === "collection")) == null ? void 0 : Or.collection) ?? null, { data: Un = [] } = H({
342
343
  queryKey: ["queue-browser-quick-filters", Le],
343
- queryFn: () => p.request(E(`/collections/${Le}`)).then((e) => {
344
+ queryFn: () => p.request(O(`/collections/${Le}`)).then((e) => {
344
345
  var t, n;
345
346
  return ((n = (t = e.data) == null ? void 0 : t.browser_config) == null ? void 0 : n.quick_filters) ?? [];
346
347
  }).catch(() => []),
@@ -351,9 +352,9 @@ function yi({
351
352
  for (const n of (s == null ? void 0 : s.sources) ?? [])
352
353
  n.type !== "collection" || !n.collection || e.has(n.collection) || (e.add(n.collection), t.push(n.collection));
353
354
  return t;
354
- }, [s == null ? void 0 : s.sources]), Ct = fo(
355
+ }, [s == null ? void 0 : s.sources]), $t = go(
355
356
  z.length === 1 ? z[0] : null
356
- ), Xt = O === !0 || Array.isArray(O) && z.length > 0 && z.every((e) => O.includes(e)), oe = (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"], oa = (u == null ? void 0 : u.work_next) !== !1, Zt = (u == null ? void 0 : u.bulk_actions) !== !1, en = _o(
357
+ ), Zt = E === !0 || Array.isArray(E) && z.length > 0 && z.every((e) => E.includes(e)), oe = (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"], sa = (u == null ? void 0 : u.work_next) !== !1, en = (u == null ? void 0 : u.bulk_actions) !== !1, tn = No(
357
358
  [
358
359
  ...new Set(
359
360
  ((s == null ? void 0 : s.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
@@ -363,16 +364,16 @@ function yi({
363
364
  ), q = (e, t) => {
364
365
  var n, a;
365
366
  return ((a = (n = s == null ? void 0 : s.column_aliases) == null ? void 0 : n[e]) == null ? void 0 : a.trim()) || t;
366
- }, Un = B(!1);
367
+ }, In = B(!1);
367
368
  j(() => {
368
- !s || Un.current || (Un.current = !0, Ae("-priority"));
369
+ !s || In.current || (In.current = !0, Ae("-priority"));
369
370
  }, [s]);
370
- const [ae, sa] = k(!1);
371
+ const [ae, ia] = k(!1);
371
372
  j(() => {
372
373
  s != null && s.display_config && !_e.includes(A) && Te(_e[0]);
373
374
  }, [s, A, _e]), j(() => {
374
375
  if (!(s != null && s.sources)) return;
375
- const e = Ht ? (y, R) => Ht.subscribeCollections(y, R) : f == null ? void 0 : f.subscribe;
376
+ const e = Jt ? (y, R) => Jt.subscribeCollections(y, R) : f == null ? void 0 : f.subscribe;
376
377
  if (!e) return;
377
378
  const t = [
378
379
  ...new Set(
@@ -384,25 +385,25 @@ function yi({
384
385
  let a = null, o = null, i = null;
385
386
  const b = () => {
386
387
  i || (i = setTimeout(() => {
387
- i = null, aa((y) => y + 1);
388
+ i = null, la((y) => y + 1);
388
389
  }, 1500));
389
390
  }, m = () => {
390
391
  o || (o = setTimeout(() => {
391
- if (o = null, Pn.current > 0 || Dn.current) {
392
- Nt.current = [], _t((y) => y + 1);
392
+ if (o = null, Kn.current > 0 || Pn.current) {
393
+ St.current = [], Nt((y) => y + 1);
393
394
  return;
394
395
  }
395
- Ee.current = !0, h.invalidateQueries({ queryKey: ["queue-items", l] }), h.invalidateQueries({ queryKey: ["queue-workload", l] });
396
+ Oe.current = !0, h.invalidateQueries({ queryKey: ["queue-items", l] }), h.invalidateQueries({ queryKey: ["queue-workload", l] });
396
397
  }, 900));
397
398
  }, K = (y) => {
398
399
  let R = !1, Q = 0, xe = !1;
399
400
  const Re = y.flatMap(
400
- (_) => _ ? Zl(_) : [_]
401
+ (_) => _ ? eo(_) : [_]
401
402
  );
402
403
  for (const _ of Re) {
403
- const ue = _ == null ? void 0 : _.changed_fields, Bt = (_ == null ? void 0 : _.collection) != null ? `${_.collection}:${String(_.item)}` : null, Ir = Bt != null && En.current.has(Bt);
404
+ const ue = _ == null ? void 0 : _.changed_fields, jt = (_ == null ? void 0 : _.collection) != null ? `${_.collection}:${String(_.item)}` : null, Vr = jt != null && En.current.has(jt);
404
405
  if (_ && !_.action && (ue != null && ue.length) && ue.every((ht) => ht.startsWith("$"))) {
405
- ue.includes(ft.tasks) && n.add("queue-task-counts"), ue.includes(ft.integrations) && n.add("queue-integrations-summary"), ue.includes(ft.addendums) && n.add("queue-collection-addendums"), ue.includes(ft.lock) && ra((ht) => ht + 1), ue.includes(ft.state) && (xe = !0, (Ir || Yt.current === "kanban") && (R = !0)), a || (a = setTimeout(() => {
406
+ ue.includes(ft.tasks) && n.add("queue-task-counts"), ue.includes(ft.integrations) && n.add("queue-integrations-summary"), ue.includes(ft.addendums) && n.add("queue-collection-addendums"), ue.includes(ft.lock) && aa((ht) => ht + 1), ue.includes(ft.state) && (xe = !0, (Vr || zt.current === "kanban") && (R = !0)), a || (a = setTimeout(() => {
406
407
  a = null;
407
408
  for (const ht of n) h.invalidateQueries({ queryKey: [ht] });
408
409
  n.clear();
@@ -410,16 +411,16 @@ function yi({
410
411
  continue;
411
412
  }
412
413
  xe = !0;
413
- const cl = (_ == null ? void 0 : _.collection) != null && lo(_.collection, _.item);
414
- Bt && (Ir || (_ == null ? void 0 : _.action) === "create" || Yt.current === "kanban") ? (R = !0, cl || Nt.current.push({ key: Bt, by: null })) : Q += 1;
414
+ const dl = (_ == null ? void 0 : _.collection) != null && oo(_.collection, _.item);
415
+ jt && (Vr || (_ == null ? void 0 : _.action) === "create" || zt.current === "kanban") ? (R = !0, dl || St.current.push({ key: jt, by: null })) : Q += 1;
415
416
  }
416
- Q > 0 && _t((_) => _ + Q), R && m(), xe && b();
417
- }, F = e(t, (y) => Wl(Jt, [y ?? {}], K));
417
+ Q > 0 && Nt((_) => _ + Q), R && m(), xe && b();
418
+ }, F = e(t, (y) => Hl(Yt, [y ?? {}], K));
418
419
  return () => {
419
- F(), Hl(Jt), a && clearTimeout(a), o && clearTimeout(o), i && clearTimeout(i);
420
+ F(), Jl(Yt), a && clearTimeout(a), o && clearTimeout(o), i && clearTimeout(i);
420
421
  };
421
- }, [Ht, f, s == null ? void 0 : s.sources, h, l, v, Jt]);
422
- const De = jl(w, 350), ia = JSON.stringify(De) === JSON.stringify(w), tn = B(!1), Ne = A === "table" && !!N, In = (() => {
422
+ }, [Jt, f, s == null ? void 0 : s.sources, h, l, v, Yt]);
423
+ const De = Ul(w, 350), ca = JSON.stringify(De) === JSON.stringify(w), nn = B(!1), Ne = A === "table" && !!N, Vn = (() => {
423
424
  const e = /* @__PURE__ */ new Set();
424
425
  for (const t of (s == null ? void 0 : s.extra_field_meta) ?? [])
425
426
  t.aggregate && t.aggregate !== "count" && e.add(t.path);
@@ -449,17 +450,17 @@ function yi({
449
450
  function Pe(e, t) {
450
451
  M((n) => ({ ...n, [e]: n[e] === t ? "" : t })), L(1);
451
452
  }
452
- function ca(e) {
453
+ function da(e) {
453
454
  M((t) => {
454
455
  const n = t.state, a = Array.isArray(n) ? n : n ? [n] : [], o = a.includes(e) ? a.filter((i) => i !== e) : [...a, e];
455
456
  return { ...t, state: o };
456
457
  }), L(1);
457
458
  }
458
- const da = Array.isArray(w.state) ? w.state : w.state ? [w.state] : [], ua = (e) => !e || Array.isArray(e) && e.length === 0;
459
- function ma() {
459
+ const ua = Array.isArray(w.state) ? w.state : w.state ? [w.state] : [], ma = (e) => !e || Array.isArray(e) && e.length === 0;
460
+ function ba() {
460
461
  M({ ...pe.current }), J("all"), L(1);
461
462
  }
462
- const [et, ba] = k(() => {
463
+ const [et, pa] = k(() => {
463
464
  try {
464
465
  return localStorage.getItem("nvr_queue_insights_open") === "1";
465
466
  } catch {
@@ -472,13 +473,13 @@ function yi({
472
473
  } catch {
473
474
  }
474
475
  }, [et]);
475
- const { data: pa = [] } = H({
476
+ const { data: ha = [] } = H({
476
477
  queryKey: ["queue-view-subs", l],
477
- queryFn: () => p.request(E("/notification-subscriptions")).then((e) => (e.data ?? []).filter((t) => t.queue_id === l)).catch(() => []),
478
+ queryFn: () => p.request(O("/notification-subscriptions")).then((e) => (e.data ?? []).filter((t) => t.queue_id === l)).catch(() => []),
478
479
  staleTime: 3e4
479
- }), $t = (e) => pa.find((t) => t.queue_view_id === e), ha = (e) => {
480
- const t = $t(e);
481
- (t ? p.request($n(`/notification-subscriptions/${t.id}`)) : p.request(
480
+ }), qt = (e) => ha.find((t) => t.queue_view_id === e), fa = (e) => {
481
+ const t = qt(e);
482
+ (t ? p.request(qn(`/notification-subscriptions/${t.id}`)) : p.request(
482
483
  ne("/notification-subscriptions", {
483
484
  queue_id: l,
484
485
  queue_view_id: e,
@@ -488,19 +489,19 @@ function yi({
488
489
  T.success(
489
490
  t ? "Unsubscribed" : "Subscribed — new arrivals in this view notify you"
490
491
  ), h.invalidateQueries({ queryKey: ["queue-view-subs", l] });
491
- }).catch((a) => T.error(a instanceof Error ? a.message : "Failed"));
492
- }, [Vn, nn] = k(null), rn = [
492
+ }).catch((a) => T.error(gt(a, "Failed")));
493
+ }, [Gn, rn] = k(null), an = [
493
494
  ...new Set(
494
495
  ((s == null ? void 0 : s.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
495
496
  )
496
- ], { data: fa = {} } = H({
497
- queryKey: ["queue-custom-actions", l, rn.join(",")],
497
+ ], { data: ga = {} } = H({
498
+ queryKey: ["queue-custom-actions", l, an.join(",")],
498
499
  queryFn: async () => {
499
500
  const e = {};
500
- for (const t of rn.slice(0, 6))
501
+ for (const t of an.slice(0, 6))
501
502
  try {
502
503
  const n = await p.request(
503
- E("/custom-actions", { collection: t })
504
+ O("/custom-actions", { collection: t })
504
505
  );
505
506
  e[t] = n.data ?? [];
506
507
  } catch {
@@ -508,20 +509,20 @@ function yi({
508
509
  }
509
510
  return e;
510
511
  },
511
- enabled: rn.length > 0,
512
+ enabled: an.length > 0,
512
513
  staleTime: 6e4
513
- }), ga = (e) => fa[e] ?? [], xa = (e, t) => {
514
+ }), xa = (e) => ga[e] ?? [], ya = (e, t) => {
514
515
  p.request(ne(`/custom-actions/${e.id}/execute`, { item: t.item_id })).then(() => {
515
516
  T.success(`${e.label} ran`), h.invalidateQueries({ queryKey: ["queue-items", l] });
516
517
  }).catch((n) => {
517
518
  const a = n.response;
518
- T.error((a == null ? void 0 : a.error) ?? (n instanceof Error ? n.message : `${e.label} failed`));
519
+ T.error((a == null ? void 0 : a.error) ?? gt(n, `${e.label} failed`));
519
520
  });
520
- }, { data: an = [] } = H({
521
+ }, { data: ln = [] } = H({
521
522
  queryKey: ["queue-triage-labels", l],
522
- queryFn: () => p.request(E(`/queues/${l}/triage-labels`)).then((e) => e.data ?? []).catch(() => []),
523
+ queryFn: () => p.request(O(`/queues/${l}/triage-labels`)).then((e) => e.data ?? []).catch(() => []),
523
524
  staleTime: 3e4
524
- }), Gn = (e, t) => {
525
+ }), Wn = (e, t) => {
525
526
  p.request(
526
527
  ne(`/queues/${l}/triage-labels/toggle`, {
527
528
  collection: e.collection,
@@ -530,8 +531,8 @@ function yi({
530
531
  })
531
532
  ).then(() => {
532
533
  h.invalidateQueries({ queryKey: ["queue-items", l] }), h.invalidateQueries({ queryKey: ["queue-triage-labels", l] });
533
- }).catch((n) => T.error(n instanceof Error ? n.message : "Label failed"));
534
- }, { data: c, isLoading: Wn, isFetching: ln, isPlaceholderData: ya, dataUpdatedAt: le } = H({
534
+ }).catch((n) => T.error(gt(n, "Label failed")));
535
+ }, { data: c, isLoading: Hn, isFetching: on, isPlaceholderData: ka, dataUpdatedAt: le } = H({
535
536
  queryKey: [
536
537
  "queue-items",
537
538
  l,
@@ -542,8 +543,8 @@ function yi({
542
543
  N
543
544
  ],
544
545
  queryFn: async () => {
545
- const e = !Ne && A === "table", t = JSON.stringify([l, g, I, Ze, zt]), n = e ? zl(Tn.current, t, ve, "").after : void 0, a = await p.request(
546
- E(`/queues/${l}/items`, {
546
+ const e = !Ne && A === "table", t = JSON.stringify([l, g, I, Ze, Xt]), n = e ? Xl(An.current, t, ve, "").after : void 0, a = await p.request(
547
+ O(`/queues/${l}/items`, {
547
548
  scope: g,
548
549
  // Last State Change is Aging read the other way round: the newest
549
550
  // move is the least aged.
@@ -553,11 +554,11 @@ function yi({
553
554
  // Kanban renders the full matching set, grouped client-side.
554
555
  ...Ne ? {
555
556
  group_by: N,
556
- ...In.length ? { group_sums: In.join(",") } : {}
557
- } : A === "table" ? { page: ve, limit: zt, ...n ? { after: n } : {} } : {}
557
+ ...Vn.length ? { group_sums: Vn.join(",") } : {}
558
+ } : A === "table" ? { page: ve, limit: Xt, ...n ? { after: n } : {} } : {}
558
559
  })
559
560
  );
560
- return n && Xl(Tn.current, t, ve, a.next_cursor), a;
561
+ return n && Zl(An.current, t, ve, a.next_cursor), a;
561
562
  },
562
563
  // Wait for display_config AND scope seeding so the first fetch uses the
563
564
  // configured defaults and already carries the viewer's restricted filters.
@@ -566,12 +567,12 @@ function yi({
566
567
  // first fetch went out WITHOUT the seeded scope and refired ~350ms later
567
568
  // with it (3.3s + 8.7s of work for one page). The first fetch now also
568
569
  // waits for the debounced copy to settle; later typing still debounces.
569
- enabled: !!l && ae && Qn && (tn.current || ia),
570
+ enabled: !!l && ae && Bn && (nn.current || ca),
570
571
  // Keep the previous page rendered while a sort/filter/page change refetches —
571
572
  // swapping to skeletons collapsed the table height and jittered the page.
572
573
  placeholderData: (e) => e
573
574
  });
574
- c && !tn.current && (tn.current = !0), j(() => {
575
+ c && !nn.current && (nn.current = !0), j(() => {
575
576
  if (typeof window > "u" || !le) return;
576
577
  const e = window;
577
578
  e.__nvrQueueTrace || (e.__nvrQueueTrace = []);
@@ -585,12 +586,12 @@ function yi({
585
586
  }, a = t.find((o) => o.queue === l);
586
587
  t.push(n), t.length > 50 && t.shift(), a && a !== n && le - Number(a.at) < 2e3 && t.filter((o) => o.queue === l).length === 2 && console.warn("[queue] duplicate first fetch", { first: a, second: n });
587
588
  }, [le]);
588
- const Ke = Wn && !c || !ae || !Qn && !c, Hn = (ln && !Wn || ya && ln) && !Ee.current, ka = G(
589
+ const Ke = Hn && !c || !ae || !Bn && !c, Jn = (on && !Hn || ka && on) && !Oe.current, va = G(
589
590
  () => (Ne ? [] : (c == null ? void 0 : c.data) ?? []).slice(0, 100).map((e) => ({ collection: e.collection, item: e.item_id })),
590
591
  [Ne, c == null ? void 0 : c.data]
591
- ), va = oo(ka), Jn = Ul(ln && !Ee.current);
592
- async function Yn(e, t) {
593
- const a = (await p.request(E(`/pipelines/instance/${e.collection}/${e.item_id}`))).data;
592
+ ), wa = so(va), Yn = Il(on && !Oe.current);
593
+ async function zn(e, t) {
594
+ const a = (await p.request(O(`/pipelines/instance/${e.collection}/${e.item_id}`))).data;
594
595
  if (!a || a.states.length === 0)
595
596
  throw new Error("This item has no workflow instance");
596
597
  const o = a.states.find((b) => b.key === t);
@@ -605,15 +606,15 @@ function yi({
605
606
  })
606
607
  );
607
608
  }
608
- const wa = ye({
609
+ const _a = ye({
609
610
  mutationFn: async ({ item: e, targetState: t }) => {
610
- await Yn(e, t);
611
+ await zn(e, t);
611
612
  },
612
613
  onSuccess: () => {
613
614
  h.invalidateQueries({ queryKey: ["queue-items", l, g] });
614
615
  },
615
616
  onError: (e) => {
616
- T.error(e instanceof Error ? e.message : "Failed to move item"), h.invalidateQueries({ queryKey: ["queue-items", l, g] });
617
+ T.error(gt(e, "Failed to move item")), h.invalidateQueries({ queryKey: ["queue-items", l, g] });
617
618
  }
618
619
  }), Se = ye({
619
620
  mutationFn: (e) => p.request(
@@ -635,16 +636,16 @@ function yi({
635
636
  onError: () => T.error("Failed to release item")
636
637
  }), { data: Qe } = H({
637
638
  queryKey: ["queue-column-prefs", l],
638
- queryFn: () => p.request(E(`/queues/${l}/column-prefs`)),
639
+ queryFn: () => p.request(O(`/queues/${l}/column-prefs`)),
639
640
  enabled: !!l
640
- }), [on, qt] = k(null), [Be, sn] = k(null);
641
+ }), [sn, Ft] = k(null), [Be, cn] = k(null);
641
642
  j(() => {
642
- Qe && sn(Qe.data.default_view_id);
643
+ Qe && cn(Qe.data.default_view_id);
643
644
  }, [Qe]);
644
- const [_a, zn] = k({}), se = Ne ? (c == null ? void 0 : c.groups) ?? null : null, Ft = (se ?? []).filter((e) => !be.has(e.key)).map((e) => e.key).flatMap(
645
- (e) => Array.from({ length: _a[e] ?? 1 }, (t, n) => ({ key: e, page: n + 1 }))
646
- ), cn = Ve({
647
- queries: Ft.map(({ key: e, page: t }) => ({
645
+ const [Na, Xn] = k({}), se = Ne ? (c == null ? void 0 : c.groups) ?? null : null, Rt = (se ?? []).filter((e) => !be.has(e.key)).map((e) => e.key).flatMap(
646
+ (e) => Array.from({ length: Na[e] ?? 1 }, (t, n) => ({ key: e, page: n + 1 }))
647
+ ), dn = Ve({
648
+ queries: Rt.map(({ key: e, page: t }) => ({
648
649
  queryKey: [
649
650
  "queue-items",
650
651
  l,
@@ -657,30 +658,30 @@ function yi({
657
658
  t
658
659
  ],
659
660
  queryFn: () => p.request(
660
- E(`/queues/${l}/items`, {
661
+ O(`/queues/${l}/items`, {
661
662
  scope: g,
662
663
  sort: I === "state_entered" ? "-aging_hours" : I === "-state_entered" ? "aging_hours" : I,
663
664
  filters: JSON.stringify(Ze),
664
665
  group_by: N,
665
666
  group_key: e,
666
667
  page: t,
667
- limit: ts
668
+ limit: ns
668
669
  })
669
670
  ).then((n) => ({ key: e, rows: n.data })),
670
671
  enabled: !!c && Ne,
671
672
  placeholderData: (n) => n
672
673
  }))
673
- }), Na = cn.map((e) => e.dataUpdatedAt).join(","), dn = G(() => {
674
+ }), Sa = dn.map((e) => e.dataUpdatedAt).join(","), un = G(() => {
674
675
  const e = /* @__PURE__ */ new Map();
675
- return cn.forEach((t, n) => {
676
+ return dn.forEach((t, n) => {
676
677
  if (!t.data) return;
677
- const a = Ft[n].key;
678
+ const a = Rt[n].key;
678
679
  e.set(a, [...e.get(a) ?? [], ...t.data.rows]);
679
680
  }), e;
680
- }, [Na, Ft.map((e) => `${e.key}\0${e.page}`).join("")]), Sa = new Set(
681
- cn.flatMap((e, t) => e.isFetching ? [Ft[t].key] : [])
682
- ), S = se ? [...dn.values()].flat() : (c == null ? void 0 : c.data) ?? [];
683
- vo(
681
+ }, [Sa, Rt.map((e) => `${e.key}\0${e.page}`).join("")]), Ca = new Set(
682
+ dn.flatMap((e, t) => e.isFetching ? [Rt[t].key] : [])
683
+ ), S = se ? [...un.values()].flat() : (c == null ? void 0 : c.data) ?? [];
684
+ wo(
684
685
  l ? {
685
686
  queue: {
686
687
  id: l,
@@ -691,33 +692,33 @@ function yi({
691
692
  }
692
693
  } : null
693
694
  );
694
- const Ca = wo(), tt = S.some((e) => e.fulfilment !== void 0), nt = S.some((e) => e.send_backs !== void 0), { data: Rt, dataUpdatedAt: $a } = H({
695
- queryKey: ["queue-live-stats", l, g, De, On],
695
+ const $a = _o(), tt = S.some((e) => e.fulfilment !== void 0), nt = S.some((e) => e.send_backs !== void 0), { data: Tt, dataUpdatedAt: qa } = H({
696
+ queryKey: ["queue-live-stats", l, g, De, Ln],
696
697
  queryFn: () => p.request(
697
- E(`/queues/${l}/items`, {
698
+ O(`/queues/${l}/items`, {
698
699
  scope: g,
699
700
  filters: JSON.stringify(Ze),
700
701
  page: 1,
701
702
  limit: 1
702
703
  })
703
704
  ),
704
- enabled: On > 0 && !!c,
705
+ enabled: Ln > 0 && !!c,
705
706
  staleTime: Number.POSITIVE_INFINITY,
706
707
  placeholderData: (e) => e,
707
708
  retry: !1
708
- }), un = !!Rt && $a > le, x = un ? Rt.stats : c == null ? void 0 : c.stats, Y = un ? Rt.filtered_stats ?? null : (c == null ? void 0 : c.filtered_stats) ?? null, Xn = un ? Rt.state_counts : c == null ? void 0 : c.state_counts;
709
+ }), mn = !!Tt && qa > le, x = mn ? Tt.stats : c == null ? void 0 : c.stats, Y = mn ? Tt.filtered_stats ?? null : (c == null ? void 0 : c.filtered_stats) ?? null, Zn = mn ? Tt.state_counts : c == null ? void 0 : c.state_counts;
709
710
  En.current = new Set(S.map((e) => `${e.collection}:${e.item_id}`));
710
- const Tt = to(
711
+ const At = no(
711
712
  S.map((e) => ({ collection: e.collection, id: e.item_id })),
712
- na
713
- ), Zn = B(le), er = B(0);
714
- !Ee.current && le !== er.current && (Zn.current = le), j(() => {
713
+ ra
714
+ ), er = B(le), tr = B(0);
715
+ !Oe.current && le !== tr.current && (er.current = le), j(() => {
715
716
  const e = new Set(S.map((t) => `${t.collection}:${t.item_id}`));
716
- if (Ee.current) {
717
- Ee.current = !1, er.current = le;
718
- const t = Nt.current;
719
- Nt.current = [];
720
- const n = Ln.current, a = /* @__PURE__ */ new Set();
717
+ if (Oe.current) {
718
+ Oe.current = !1, tr.current = le;
719
+ const t = St.current;
720
+ St.current = [];
721
+ const n = Dn.current, a = /* @__PURE__ */ new Set();
721
722
  for (const o of t)
722
723
  !e.has(o.key) || a.has(o.key) || (a.add(o.key), we.note([o.key], o.by, n && !n.has(o.key) ? "create" : "update"));
723
724
  if (n) {
@@ -725,21 +726,21 @@ function yi({
725
726
  o.length > 0 && o.length <= 20 && we.note(o, null, "create");
726
727
  }
727
728
  }
728
- Ln.current = e;
729
+ Dn.current = e;
729
730
  }, [le]), j(() => {
730
- _t(0);
731
+ Nt(0);
731
732
  }, [c]);
732
- function qa() {
733
- h.invalidateQueries({ queryKey: ["queue-items", l] }), h.invalidateQueries({ queryKey: ["queue-workload", l] }), _t(0);
733
+ function Fa() {
734
+ h.invalidateQueries({ queryKey: ["queue-items", l] }), h.invalidateQueries({ queryKey: ["queue-workload", l] }), Nt(0);
734
735
  }
735
736
  const { data: ie } = H({
736
737
  queryKey: ["queue-trends", l],
737
- queryFn: () => p.request(E(`/queues/${l}/trends`, { days: 14 })),
738
+ queryFn: () => p.request(O(`/queues/${l}/trends`, { days: 14 })),
738
739
  enabled: !!l,
739
740
  staleTime: 300 * 1e3
740
741
  }), { data: ce } = H({
741
742
  queryKey: ["queue-trends", l, "mine"],
742
- queryFn: () => p.request(E(`/queues/${l}/trends`, { days: 14, scope: "mine" })),
743
+ queryFn: () => p.request(O(`/queues/${l}/trends`, { days: 14, scope: "mine" })),
743
744
  enabled: !!l && g === "mine",
744
745
  staleTime: 300 * 1e3
745
746
  });
@@ -763,54 +764,54 @@ function yi({
763
764
  )
764
765
  ],
765
766
  [s == null ? void 0 : s.sources]
766
- ), { data: Fa } = H({
767
+ ), { data: Ra } = H({
767
768
  queryKey: ["collections"],
768
- queryFn: () => p.request(E("/collections")).then((e) => e.data),
769
+ queryFn: () => p.request(O("/collections")).then((e) => e.data),
769
770
  staleTime: 300 * 1e3
770
771
  }), je = Ve({
771
772
  queries: at.map((e) => ({
772
773
  queryKey: ["queue-collection-addendums", e],
773
774
  queryFn: () => p.request(
774
- E(`/collections/${e}`)
775
+ O(`/collections/${e}`)
775
776
  ).then((t) => {
776
777
  var n;
777
778
  return !!((n = t.data) != null && n.addendums_enabled);
778
779
  }).catch(() => !1),
779
780
  staleTime: 300 * 1e3
780
781
  }))
781
- }).some((e) => e.data === !0), { data: mn = [] } = H({
782
+ }).some((e) => e.data === !0), { data: bn = [] } = H({
782
783
  queryKey: ["queue-integrations-collections"],
783
- queryFn: () => p.request(E("/integration-obligations/collections")).then((e) => e.data ?? []).catch(() => []),
784
+ queryFn: () => p.request(O("/integration-obligations/collections")).then((e) => e.data ?? []).catch(() => []),
784
785
  staleTime: 300 * 1e3
785
- }), he = at.some((e) => mn.includes(e)), bn = G(() => {
786
+ }), he = at.some((e) => bn.includes(e)), pn = G(() => {
786
787
  var t;
787
788
  const e = {};
788
789
  if (!he) return e;
789
790
  for (const n of S) {
790
- if (!mn.includes(n.collection)) continue;
791
+ if (!bn.includes(n.collection)) continue;
791
792
  const a = e[t = n.collection] ?? (e[t] = []);
792
793
  a.length < 500 && a.push(n.item_id);
793
794
  }
794
795
  return e;
795
- }, [S, mn, he]), tr = Object.keys(bn), nr = Ve({
796
- queries: tr.map((e) => ({
797
- queryKey: ["queue-integrations-summary", e, bn[e].join(",")],
796
+ }, [S, bn, he]), nr = Object.keys(pn), rr = Ve({
797
+ queries: nr.map((e) => ({
798
+ queryKey: ["queue-integrations-summary", e, pn[e].join(",")],
798
799
  queryFn: () => p.request(
799
800
  ne("/integration-obligations/summary", {
800
801
  collection: e,
801
- ids: bn[e]
802
+ ids: pn[e]
802
803
  })
803
804
  ).then((t) => t.data ?? {}).catch(() => ({})),
804
805
  staleTime: 3e4
805
806
  }))
806
- }), Ra = nr.map((e) => e.dataUpdatedAt).join(","), Ta = G(() => {
807
+ }), Ta = rr.map((e) => e.dataUpdatedAt).join(","), Aa = G(() => {
807
808
  const e = {};
808
- return tr.forEach((t, n) => {
809
+ return nr.forEach((t, n) => {
809
810
  var o;
810
- const a = ((o = nr[n]) == null ? void 0 : o.data) ?? {};
811
+ const a = ((o = rr[n]) == null ? void 0 : o.data) ?? {};
811
812
  for (const [i, b] of Object.entries(a)) e[`${t}:${i}`] = b;
812
813
  }), e;
813
- }, [Ra]), pn = G(() => {
814
+ }, [Ta]), hn = G(() => {
814
815
  var t;
815
816
  const e = {};
816
817
  for (const n of S) {
@@ -820,31 +821,31 @@ function yi({
820
821
  a.length < 500 && a.push(n.item_id);
821
822
  }
822
823
  return e;
823
- }, [S]), hn = Object.keys(pn), rr = Ve({
824
- queries: hn.map((e) => ({
825
- queryKey: ["queue-task-counts", e, pn[e].join(",")],
824
+ }, [S]), fn = Object.keys(hn), ar = Ve({
825
+ queries: fn.map((e) => ({
826
+ queryKey: ["queue-task-counts", e, hn[e].join(",")],
826
827
  queryFn: () => p.request(
827
- ne("/tasks/counts", { collection: e, ids: pn[e] })
828
+ ne("/tasks/counts", { collection: e, ids: hn[e] })
828
829
  ).then((t) => t.data ?? {}).catch(() => ({})),
829
830
  staleTime: 3e4
830
831
  }))
831
- }), Aa = rr.map((e) => e.dataUpdatedAt).join(","), Ea = G(() => {
832
+ }), Oa = ar.map((e) => e.dataUpdatedAt).join(","), Ea = G(() => {
832
833
  const e = {};
833
- return hn.forEach((t, n) => {
834
+ return fn.forEach((t, n) => {
834
835
  var a;
835
- for (const [o, i] of Object.entries(((a = rr[n]) == null ? void 0 : a.data) ?? {})) e[`${t}:${o}`] = i;
836
+ for (const [o, i] of Object.entries(((a = ar[n]) == null ? void 0 : a.data) ?? {})) e[`${t}:${o}`] = i;
836
837
  }), e;
837
- }, [Aa]), ar = hn.length > 0, lr = Ve({
838
+ }, [Oa]), lr = fn.length > 0, or = Ve({
838
839
  queries: at.map((e) => ({
839
840
  queryKey: ["queue-collection-risk-rules", e],
840
841
  queryFn: () => p.request(
841
- E("/at-risk/rules/active", { collection: e })
842
+ O("/at-risk/rules/active", { collection: e })
842
843
  ).then((t) => t.data ?? []).catch(() => []),
843
844
  staleTime: 300 * 1e3
844
845
  }))
845
- }), Oa = lr.map((e) => e.dataUpdatedAt).join(","), or = G(() => {
846
+ }), La = or.map((e) => e.dataUpdatedAt).join(","), sr = G(() => {
846
847
  const e = /* @__PURE__ */ new Map();
847
- for (const t of lr)
848
+ for (const t of or)
848
849
  for (const n of t.data ?? []) {
849
850
  const a = e.get(n.name);
850
851
  e.set(n.name, {
@@ -853,65 +854,65 @@ function yi({
853
854
  });
854
855
  }
855
856
  return [...e.values()];
856
- }, [Oa]), sr = Ve({
857
+ }, [La]), ir = Ve({
857
858
  queries: at.map((e) => ({
858
859
  queryKey: ["queue-collection-states", e],
859
860
  queryFn: () => p.request(
860
- E(`/queues/collection-states/${e}`)
861
+ O(`/queues/collection-states/${e}`)
861
862
  ).then((t) => t.data),
862
863
  staleTime: 300 * 1e3
863
864
  }))
864
- }), ir = (e) => e.replace(/_/g, " ").replace(/\b\w/g, (t) => t.toUpperCase()), fe = G(() => {
865
+ }), cr = (e) => e.replace(/_/g, " ").replace(/\b\w/g, (t) => t.toUpperCase()), fe = G(() => {
865
866
  const e = {};
866
- for (const t of sr)
867
+ for (const t of ir)
867
868
  (t.data ?? []).forEach((n, a) => {
868
869
  e[n.key] = { label: n.label, color: n.color, sort: a };
869
870
  });
870
871
  return e;
871
- }, [sr.map((e) => e.data)]), cr = x ? Object.entries(x.by_state).sort(
872
+ }, [ir.map((e) => e.data)]), dr = x ? Object.entries(x.by_state).sort(
872
873
  (e, t) => {
873
874
  var n, a;
874
875
  return (((n = fe[e[0]]) == null ? void 0 : n.sort) ?? Number.MAX_SAFE_INTEGER) - (((a = fe[t[0]]) == null ? void 0 : a.sort) ?? Number.MAX_SAFE_INTEGER);
875
876
  }
876
- ) : [], dr = (e) => [...e].sort(
877
+ ) : [], ur = (e) => [...e].sort(
877
878
  (t, n) => {
878
879
  var a, o;
879
880
  return (((a = fe[t]) == null ? void 0 : a.sort) ?? Number.MAX_SAFE_INTEGER) - (((o = fe[n]) == null ? void 0 : o.sort) ?? Number.MAX_SAFE_INTEGER);
880
881
  }
881
- ), fn = G(() => {
882
+ ), gn = G(() => {
882
883
  const e = {};
883
884
  for (const [t, n] of Object.entries(fe)) e[t] = n.label;
884
885
  return e;
885
- }, [fe]), Ce = (e) => e ? e === "none" ? "No State" : fn[e] ?? ir(e) : "—", lt = (e) => {
886
- if (e === Ut) return "Addendums";
887
- const t = (Fa ?? []).find((n) => n.collection === e);
888
- return (t == null ? void 0 : t.display_name) || (t == null ? void 0 : t.plural) || ir(e);
886
+ }, [fe]), Ce = (e) => e ? e === "none" ? "No State" : gn[e] ?? cr(e) : "—", lt = (e) => {
887
+ if (e === It) return "Addendums";
888
+ const t = (Ra ?? []).find((n) => n.collection === e);
889
+ return (t == null ? void 0 : t.display_name) || (t == null ? void 0 : t.plural) || cr(e);
889
890
  }, Z = G(() => N ? se ? se.map((e) => ({
890
891
  key: e.key,
891
- rows: dn.get(e.key) ?? [],
892
+ rows: un.get(e.key) ?? [],
892
893
  breached: e.breached,
893
894
  atRisk: e.at_risk,
894
895
  count: e.count,
895
896
  sums: e.sums ?? {}
896
- })) : io(S, N).map((e) => ({ ...e, count: e.rows.length, sums: {} })) : null, [S, N, se, dn]), gn = B(null);
897
+ })) : co(S, N).map((e) => ({ ...e, count: e.rows.length, sums: {} })) : null, [S, N, se, un]), xn = B(null);
897
898
  j(() => {
898
899
  if (!N || !Z) {
899
- gn.current = null;
900
+ xn.current = null;
900
901
  return;
901
902
  }
902
- if (Ne && !se || gn.current === N) return;
903
- gn.current = N;
903
+ if (Ne && !se || xn.current === N) return;
904
+ xn.current = N;
904
905
  const e = Z.reduce((t, n) => t + n.count, 0);
905
- It(e > 200 ? new Set(Z.map((t) => t.key)) : /* @__PURE__ */ new Set()), zn({});
906
+ Vt(e > 200 ? new Set(Z.map((t) => t.key)) : /* @__PURE__ */ new Set()), Xn({});
906
907
  }, [N, se]);
907
- function La(e) {
908
- It((t) => {
908
+ function Da(e) {
909
+ Vt((t) => {
909
910
  const n = new Set(t);
910
911
  return n.has(e) ? n.delete(e) : n.add(e), n;
911
912
  });
912
913
  }
913
- const ee = G(() => Z ? Z.filter((e) => !be.has(e.key)).flatMap((e) => e.rows) : S, [Z, S, be]), D = (e) => `${e.collection}:${e.item_id}`, [ge, $e] = k(null), [Da, xn] = k(!1), [At, Et] = k(null), yn = (e) => {
914
- if (e.collection === Ut && e.url) {
914
+ const ee = G(() => Z ? Z.filter((e) => !be.has(e.key)).flatMap((e) => e.rows) : S, [Z, S, be]), D = (e) => `${e.collection}:${e.item_id}`, [ge, $e] = k(null), [Pa, yn] = k(!1), [Ot, Et] = k(null), kn = (e) => {
915
+ if (e.collection === It && e.url) {
915
916
  const t = e.url.match(/^\/collections\/([^/?]+)\/([^/?]+)(?:\?(.*))?$/);
916
917
  if (t) {
917
918
  const n = {};
@@ -931,14 +932,14 @@ function yi({
931
932
  };
932
933
  }, ot = (e) => {
933
934
  var t;
934
- s && zr({
935
+ s && Xr({
935
936
  queue_id: l,
936
937
  name: s.name,
937
938
  path: `${window.location.pathname}${window.location.search}`,
938
939
  at: Date.now(),
939
- scroll: ((t = Dt.current) == null ? void 0 : t.scrollTop) ?? 0,
940
+ scroll: ((t = Pt.current) == null ? void 0 : t.scrollTop) ?? 0,
940
941
  state: { scope: g, page: ve, sort: I, filters: w, group_by: N, view: A }
941
- }), W.open(yn(e));
942
+ }), W.open(kn(e));
942
943
  }, [P, st] = k(
943
944
  null
944
945
  );
@@ -949,15 +950,15 @@ function yi({
949
950
  window.removeEventListener("mousedown", e), window.removeEventListener("scroll", e, !0);
950
951
  };
951
952
  }, [P]);
952
- const Ot = (e) => {
953
+ const Lt = (e) => {
953
954
  Et(D(e));
954
955
  const t = (u == null ? void 0 : u.row_click) ?? "preview";
955
- if (t === "full" || e.collection === Ut) {
956
+ if (t === "full" || e.collection === It) {
956
957
  ot(e);
957
958
  return;
958
959
  }
959
960
  if (t === "layout") {
960
- Nr({
961
+ Sr({
961
962
  collection: e.collection,
962
963
  itemId: e.item_id,
963
964
  rootLayoutSlug: (u == null ? void 0 : u.item_layout) ?? null,
@@ -973,18 +974,18 @@ function yi({
973
974
  const e = S.find((t) => D(t) === D(ge));
974
975
  e && e !== ge && $e(e);
975
976
  }, [S]);
976
- const Pa = (e) => !e.claimed_by || e.claimed_by.id === v;
977
- function ur(e) {
978
- const t = e ? ee.findIndex((a) => D(a) === D(e)) + 1 : 0, n = ee.slice(t).find(Pa);
977
+ const Ka = (e) => !e.claimed_by || e.claimed_by.id === v;
978
+ function mr(e) {
979
+ const t = e ? ee.findIndex((a) => D(a) === D(e)) + 1 : 0, n = ee.slice(t).find(Ka);
979
980
  if (!n) {
980
- xn(!1), $e(null), T.info("Nothing left to work on — queue clear!");
981
+ yn(!1), $e(null), T.info("Nothing left to work on — queue clear!");
981
982
  return;
982
983
  }
983
984
  if (Et(D(n)), oe && !n.claimed_by && Se.mutate(n), (u == null ? void 0 : u.row_click) === "full") {
984
985
  ot(n);
985
986
  return;
986
987
  }
987
- xn(!0), $e(n);
988
+ yn(!0), $e(n);
988
989
  }
989
990
  j(() => {
990
991
  if (A !== "table") return;
@@ -993,7 +994,7 @@ function yi({
993
994
  const n = t.target;
994
995
  if (n && (n.tagName === "INPUT" || n.tagName === "TEXTAREA" || n.tagName === "SELECT" || n.isContentEditable))
995
996
  return;
996
- const a = At ? ee.findIndex((i) => D(i) === At) : -1;
997
+ const a = Ot ? ee.findIndex((i) => D(i) === Ot) : -1;
997
998
  if (t.key === "j" || t.key === "ArrowDown") {
998
999
  t.preventDefault();
999
1000
  const i = ee[Math.min(a + 1, ee.length - 1)];
@@ -1003,7 +1004,7 @@ function yi({
1003
1004
  const i = ee[Math.max(a - 1, 0)];
1004
1005
  i && Et(D(i));
1005
1006
  } else if (t.key === "Enter" && a >= 0 && !ge)
1006
- t.preventDefault(), Ot(ee[a]);
1007
+ t.preventDefault(), Lt(ee[a]);
1007
1008
  else if (t.key === "c" && a >= 0 && oe) {
1008
1009
  t.preventDefault();
1009
1010
  const i = ee[a];
@@ -1011,38 +1012,38 @@ function yi({
1011
1012
  } else t.key === "o" && a >= 0 && (t.preventDefault(), ot(ee[a]));
1012
1013
  }
1013
1014
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
1014
- }, [A, ee, At, ge, v, Se, Me, oe]);
1015
+ }, [A, ee, Ot, ge, v, Se, Me, oe]);
1015
1016
  const { data: V } = H({
1016
1017
  queryKey: ["queue-views", l],
1017
- queryFn: () => p.request(E(`/queues/${l}/views`)),
1018
+ queryFn: () => p.request(O(`/queues/${l}/views`)),
1018
1019
  enabled: !!l
1019
- }), [it, ct] = k(null), [Ka, kn] = k(!1), [vn, mr] = k(""), [br, pr] = k(!1), [dt, hr] = k(!1);
1020
- function Lt(e) {
1020
+ }), [it, ct] = k(null), [Ma, vn] = k(!1), [wn, br] = k(""), [pr, hr] = k(!1), [dt, fr] = k(!1);
1021
+ function Dt(e) {
1021
1022
  const t = e.state ?? {};
1022
- J(t.scope ?? "all"), M({ ...pe.current, ...t.filters ?? {} }), Ae(t.sort ?? ""), Ye(t.group_by ?? null), qt(t.columns ?? null), Gt(t.pins ?? null), t.view && Te(_e.includes(t.view) ? t.view : _e[0]), L(1), ct(e.id);
1023
+ J(t.scope ?? "all"), M({ ...pe.current, ...t.filters ?? {} }), Ae(t.sort ?? ""), Ye(t.group_by ?? null), Ft(t.columns ?? null), Wt(t.pins ?? null), t.view && Te(_e.includes(t.view) ? t.view : _e[0]), L(1), ct(e.id);
1023
1024
  }
1024
- function Ma() {
1025
+ function Qa() {
1025
1026
  var t, n;
1026
1027
  const e = V == null ? void 0 : V.data.find((a) => a.is_default);
1027
1028
  if (e) {
1028
- Lt(e);
1029
+ Dt(e);
1029
1030
  return;
1030
1031
  }
1031
- J(((t = s == null ? void 0 : s.display_config) == null ? void 0 : t.default_scope) ?? "all"), M({ ...pe.current }), Ae(""), Ye(null), qt(null), Gt(null), (n = s == null ? void 0 : s.display_config) != null && n.default_view && Te(s.display_config.default_view), L(1), ct(null);
1032
+ J(((t = s == null ? void 0 : s.display_config) == null ? void 0 : t.default_scope) ?? "all"), M({ ...pe.current }), Ae(""), Ye(null), Ft(null), Wt(null), (n = s == null ? void 0 : s.display_config) != null && n.default_view && Te(s.display_config.default_view), L(1), ct(null);
1032
1033
  }
1033
1034
  j(() => {
1034
1035
  if (ae || !(s != null && s.display_config) || Qe === void 0 || V === void 0) return;
1035
1036
  const e = Qe.data.default_view_id, t = e != null ? V.data.find((a) => a.id === e) : void 0, n = V.data.find((a) => a.is_default);
1036
- t ? Lt(t) : n ? Lt(n) : (Te(s.display_config.default_view), J(s.display_config.default_scope)), sa(!0);
1037
+ t ? Dt(t) : n ? Dt(n) : (Te(s.display_config.default_view), J(s.display_config.default_scope)), ia(!0);
1037
1038
  }, [s, Qe, V, ae]);
1038
- const Dt = B(null), Pt = B(null);
1039
+ const Pt = B(null), Kt = B(null);
1039
1040
  j(() => {
1040
1041
  if (!ae) return;
1041
- const e = Do();
1042
+ const e = Po();
1042
1043
  if (!(e != null && e.restore) || e.queue_id !== l) return;
1043
- zr({ ...e, restore: !1 });
1044
+ Xr({ ...e, restore: !1 });
1044
1045
  const t = e.state ?? {};
1045
- t.scope && J(t.scope), t.filters && M({ ...pe.current, ...t.filters }), t.sort != null && Ae(t.sort), Ye(t.group_by ?? null), t.view && Te(t.view), t.page && L(t.page), Pt.current = e.scroll ?? 0;
1046
+ t.scope && J(t.scope), t.filters && M({ ...pe.current, ...t.filters }), t.sort != null && Ae(t.sort), Ye(t.group_by ?? null), t.view && Te(t.view), t.page && L(t.page), Kt.current = e.scroll ?? 0;
1046
1047
  }, [ae, l]), j(() => {
1047
1048
  if (!ae || typeof window > "u") return;
1048
1049
  const e = new URLSearchParams(window.location.search), t = e.get("owner");
@@ -1055,19 +1056,19 @@ function yi({
1055
1056
  `${window.location.pathname}${n ? `?${n}` : ""}${window.location.hash}`
1056
1057
  ), J("all"), M((a) => ({ ...a, owners: [t] })), ct(null), L(1);
1057
1058
  }, [ae]), j(() => {
1058
- Pt.current == null || S.length === 0 || !Dt.current || (Dt.current.scrollTop = Pt.current, Pt.current = null);
1059
+ Kt.current == null || S.length === 0 || !Pt.current || (Pt.current.scrollTop = Kt.current, Kt.current = null);
1059
1060
  }, [S]);
1060
- const { isAdmin: Kt } = Hr(), fr = Kt || (s == null ? void 0 : s.owner) != null && s.owner === v, Qa = ye({
1061
- mutationFn: ({ viewId: e, on: t }) => p.request(Jr(`/queues/views/${e}`, { is_default: t })),
1061
+ const { isAdmin: Mt } = Jr(), gr = Mt || (s == null ? void 0 : s.owner) != null && s.owner === v, Ba = ye({
1062
+ mutationFn: ({ viewId: e, on: t }) => p.request(Yr(`/queues/views/${e}`, { is_default: t })),
1062
1063
  onSuccess: () => {
1063
1064
  h.invalidateQueries({ queryKey: ["queue-views", l] }), T.success("Queue default view updated");
1064
1065
  },
1065
1066
  onError: () => T.error("Could not update the queue default view")
1066
- }), gr = ye({
1067
+ }), xr = ye({
1067
1068
  mutationFn: () => p.request(
1068
1069
  ne(`/queues/${l}/views`, {
1069
- name: vn.trim(),
1070
- is_shared: br || dt,
1070
+ name: wn.trim(),
1071
+ is_shared: pr || dt,
1071
1072
  is_default: dt,
1072
1073
  state: {
1073
1074
  scope: g,
@@ -1075,42 +1076,42 @@ function yi({
1075
1076
  sort: I,
1076
1077
  group_by: N,
1077
1078
  view: A,
1078
- columns: on,
1079
- pins: wt
1079
+ columns: sn,
1080
+ pins: _t
1080
1081
  }
1081
1082
  })
1082
1083
  ),
1083
1084
  onSuccess: (e) => {
1084
- kn(!1), mr(""), pr(!1), hr(!1), ct(e.data.id), h.invalidateQueries({ queryKey: ["queue-views", l] }), T.success("View saved");
1085
+ vn(!1), br(""), hr(!1), fr(!1), ct(e.data.id), h.invalidateQueries({ queryKey: ["queue-views", l] }), T.success("View saved");
1085
1086
  },
1086
1087
  onError: () => T.error("Failed to save view")
1087
- }), [xr, yr] = k(null), qe = ye({
1088
+ }), [yr, kr] = k(null), qe = ye({
1088
1089
  mutationFn: (e) => p.request(
1089
- Jr(`/queues/views/${e.id}`, {
1090
+ Yr(`/queues/views/${e.id}`, {
1090
1091
  state: {
1091
1092
  scope: g,
1092
1093
  filters: w,
1093
1094
  sort: I,
1094
1095
  group_by: N,
1095
1096
  view: A,
1096
- columns: on,
1097
- pins: wt
1097
+ columns: sn,
1098
+ pins: _t
1098
1099
  }
1099
1100
  })
1100
1101
  ),
1101
1102
  onSuccess: (e, t) => {
1102
- h.invalidateQueries({ queryKey: ["queue-views", l] }), yr(t.id), setTimeout(() => yr((n) => n === t.id ? null : n), 2e3), T.success(`Saved "${t.name}" with the current filters, scope and sort`);
1103
+ h.invalidateQueries({ queryKey: ["queue-views", l] }), kr(t.id), setTimeout(() => kr((n) => n === t.id ? null : n), 2e3), T.success(`Saved "${t.name}" with the current filters, scope and sort`);
1103
1104
  },
1104
1105
  onError: () => T.error("Failed to update view")
1105
- }), Ba = ye({
1106
- mutationFn: (e) => p.request($n(`/queues/views/${e}`)),
1106
+ }), ja = ye({
1107
+ mutationFn: (e) => p.request(qn(`/queues/views/${e}`)),
1107
1108
  onSuccess: (e, t) => {
1108
- h.invalidateQueries({ queryKey: ["queue-views", l] }), ct(null), Be === t && sn(null);
1109
+ h.invalidateQueries({ queryKey: ["queue-views", l] }), ct(null), Be === t && cn(null);
1109
1110
  },
1110
1111
  onError: () => T.error("Failed to delete view")
1111
- }), ja = ye({
1112
- mutationFn: (e) => p.request(Vl(`/queues/${l}/default-view`, { view_id: e })),
1113
- onMutate: (e) => sn(e),
1112
+ }), Ua = ye({
1113
+ mutationFn: (e) => p.request(Gl(`/queues/${l}/default-view`, { view_id: e })),
1114
+ onMutate: (e) => cn(e),
1114
1115
  onSuccess: (e, t) => {
1115
1116
  h.invalidateQueries({ queryKey: ["queue-column-prefs", l] }), T.success(
1116
1117
  t === null ? "Reverted to the general default" : "Set as your default view"
@@ -1119,14 +1120,14 @@ function yi({
1119
1120
  onError: () => {
1120
1121
  h.invalidateQueries({ queryKey: ["queue-column-prefs", l] }), T.error("Failed to update default view");
1121
1122
  }
1122
- }), [Fe, Mt] = k([]);
1123
- Il(), Pn.current = Fe.length;
1124
- const [kr, vr] = k(!1);
1125
- async function wn(e, t) {
1123
+ }), [Fe, Qt] = k([]);
1124
+ Vl(), Kn.current = Fe.length;
1125
+ const [vr, wr] = k(!1);
1126
+ async function _n(e, t) {
1126
1127
  const n = S.filter((b) => Fe.includes(D(b)));
1127
- vr(!0);
1128
+ wr(!0);
1128
1129
  const a = await Promise.allSettled(n.map(t)), o = a.filter((b) => b.status === "fulfilled").length, i = a.length - o;
1129
- vr(!1), Mt([]), h.invalidateQueries({ queryKey: ["queue-items", l] }), i ? T.warning(`${e}: ${o} succeeded, ${i} failed`) : T.success(`${e}: ${o} succeeded`);
1130
+ wr(!1), Qt([]), h.invalidateQueries({ queryKey: ["queue-items", l] }), i ? T.warning(`${e}: ${o} succeeded, ${i} failed`) : T.success(`${e}: ${o} succeeded`);
1130
1131
  }
1131
1132
  const Ue = (e) => {
1132
1133
  var t;
@@ -1135,7 +1136,7 @@ function yi({
1135
1136
  if (a) return a;
1136
1137
  }
1137
1138
  return null;
1138
- }, Ua = (e) => {
1139
+ }, Ia = (e) => {
1139
1140
  if (N === "state") return e === "No state" ? e : Ce(e);
1140
1141
  if (N === "collection") return lt(e);
1141
1142
  if (N != null && N.startsWith("extra.") && e !== "—") {
@@ -1143,11 +1144,11 @@ function yi({
1143
1144
  if (t) return Ge(e, t);
1144
1145
  }
1145
1146
  return e;
1146
- }, Ia = Z == null ? void 0 : Z.map((e) => ({
1147
+ }, Va = Z == null ? void 0 : Z.map((e) => ({
1147
1148
  key: e.key,
1148
1149
  rows: e.rows,
1149
1150
  header: /* @__PURE__ */ d(ke, { children: [
1150
- /* @__PURE__ */ r("span", { children: Ua(e.key) }),
1151
+ /* @__PURE__ */ r("span", { children: Ia(e.key) }),
1151
1152
  /* @__PURE__ */ d("span", { className: "font-normal text-slate-400", children: [
1152
1153
  "(",
1153
1154
  re(e.count),
@@ -1161,7 +1162,7 @@ function yi({
1161
1162
  className: "font-normal tabular-nums text-slate-500 dark:text-slate-400",
1162
1163
  "data-queue-group-sum": t,
1163
1164
  children: [
1164
- q(`extra.${t}`, yt(t)),
1165
+ q(`extra.${t}`, kt(t)),
1165
1166
  ":",
1166
1167
  " ",
1167
1168
  a ? Ge(String(n), a) : re(n)
@@ -1170,14 +1171,14 @@ function yi({
1170
1171
  t
1171
1172
  );
1172
1173
  }),
1173
- se && !be.has(e.key) && Sa.has(e.key) && /* @__PURE__ */ r("span", { className: "font-normal text-slate-400", children: "loading…" }),
1174
+ se && !be.has(e.key) && Ca.has(e.key) && /* @__PURE__ */ r("span", { className: "font-normal text-slate-400", children: "loading…" }),
1174
1175
  se && !be.has(e.key) && e.rows.length > 0 && e.rows.length < e.count && /* @__PURE__ */ d(
1175
1176
  "button",
1176
1177
  {
1177
1178
  type: "button",
1178
1179
  "data-queue-group-more": e.key,
1179
1180
  onClick: (t) => {
1180
- t.stopPropagation(), zn((n) => ({ ...n, [e.key]: (n[e.key] ?? 1) + 1 }));
1181
+ t.stopPropagation(), Xn((n) => ({ ...n, [e.key]: (n[e.key] ?? 1) + 1 }));
1181
1182
  },
1182
1183
  className: "rounded px-1.5 py-0.5 text-[11px] font-medium text-nvr-navy hover:bg-nvr-cyan/10 dark:text-nvr-cyan",
1183
1184
  children: [
@@ -1198,13 +1199,13 @@ function yi({
1198
1199
  " at risk"
1199
1200
  ] })
1200
1201
  ] })
1201
- })), _n = (((Er = c == null ? void 0 : c.available_values.collection) == null ? void 0 : Er.length) ?? 0) > 1, wr = S.some((e) => !!e.unseen) || Tt.size > 0 || S.some((e) => we.isNew(D(e))), _r = [
1202
- ..._n ? [
1202
+ })), Nn = (((Er = c == null ? void 0 : c.available_values.collection) == null ? void 0 : Er.length) ?? 0) > 1, _r = S.some((e) => !!e.unseen) || At.size > 0 || S.some((e) => we.isNew(D(e))), Nr = [
1203
+ ...Nn ? [
1203
1204
  {
1204
1205
  key: "collection",
1205
1206
  header: q("collection", "Collection"),
1206
1207
  sortable: !0,
1207
- render: (e) => /* @__PURE__ */ r(Uo, { variant: "outline", children: lt(e.collection) })
1208
+ render: (e) => /* @__PURE__ */ r(Io, { variant: "outline", children: lt(e.collection) })
1208
1209
  }
1209
1210
  ] : [],
1210
1211
  {
@@ -1212,22 +1213,22 @@ function yi({
1212
1213
  header: q("label", "Item"),
1213
1214
  sortable: !0,
1214
1215
  // Room in the left padding for the hanging unseen mark (#643).
1215
- className: wr ? "pl-[30px]" : void 0,
1216
- headerClassName: wr ? "pl-[30px]" : void 0,
1216
+ className: _r ? "pl-[30px]" : void 0,
1217
+ headerClassName: _r ? "pl-[30px]" : void 0,
1217
1218
  render: (e) => (
1218
1219
  // Underlined because clicking opens the item. The row is clickable as
1219
1220
  // a whole, but nothing on it said so — an underline is the one
1220
1221
  // convention people already read as "this goes somewhere".
1221
1222
  /* @__PURE__ */ d("span", { className: "flex items-center gap-1.5", children: [
1222
- Tt.get(D(e)) || we.isNew(D(e)) ? /* @__PURE__ */ r(
1223
- Po,
1223
+ At.get(D(e)) || we.isNew(D(e)) ? /* @__PURE__ */ r(
1224
+ Ko,
1224
1225
  {
1225
- lock: Tt.get(D(e)),
1226
+ lock: At.get(D(e)),
1226
1227
  isNew: we.isNew(D(e)),
1227
1228
  dataAttr: "data-queue-live-mark",
1228
1229
  hang: !0
1229
1230
  }
1230
- ) : /* @__PURE__ */ r(jo, { change: e.unseen, dataAttr: "data-queue-unseen", hang: !0 }),
1231
+ ) : /* @__PURE__ */ r(Uo, { change: e.unseen, dataAttr: "data-queue-unseen", hang: !0 }),
1231
1232
  /* @__PURE__ */ r(
1232
1233
  "span",
1233
1234
  {
@@ -1246,9 +1247,9 @@ function yi({
1246
1247
  t
1247
1248
  )),
1248
1249
  /* @__PURE__ */ r(
1249
- Bo,
1250
+ jo,
1250
1251
  {
1251
- viewers: va[so(e.collection, e.item_id)],
1252
+ viewers: wa[io(e.collection, e.item_id)],
1252
1253
  dataAttr: "data-queue-presence"
1253
1254
  }
1254
1255
  )
@@ -1279,13 +1280,13 @@ function yi({
1279
1280
  key: "owners",
1280
1281
  header: q("owners", "Owners"),
1281
1282
  sortable: !0,
1282
- render: (e) => /* @__PURE__ */ r(Ho, { owners: e.owners })
1283
+ render: (e) => /* @__PURE__ */ r(Jo, { owners: e.owners })
1283
1284
  },
1284
1285
  {
1285
1286
  key: "aging_hours",
1286
1287
  header: q("aging_hours", "Aging"),
1287
1288
  sortable: !0,
1288
- render: (e) => as(e.aging_hours)
1289
+ render: (e) => ls(e.aging_hours)
1289
1290
  },
1290
1291
  {
1291
1292
  // When the record entered its current state — the same moment Aging
@@ -1293,13 +1294,13 @@ function yi({
1293
1294
  key: "state_entered",
1294
1295
  header: q("state_entered", "Last State Change"),
1295
1296
  sortable: !0,
1296
- render: (e) => e.state_entered_at ? Jl(e.state_entered_at, { type: "datetime", template: "MM/DD/YYYY - h:mmA" }) : /* @__PURE__ */ r("span", { className: "text-slate-300 dark:text-slate-600", children: "—" })
1297
+ render: (e) => e.state_entered_at ? Yl(e.state_entered_at, { type: "datetime", template: "MM/DD/YYYY - h:mmA" }) : /* @__PURE__ */ r("span", { className: "text-slate-300 dark:text-slate-600", children: "—" })
1297
1298
  },
1298
1299
  {
1299
1300
  key: "sla_status",
1300
1301
  header: q("sla_status", "SLA"),
1301
1302
  sortable: !0,
1302
- render: (e) => /* @__PURE__ */ r(ls, { status: e.sla_status })
1303
+ render: (e) => /* @__PURE__ */ r(os, { status: e.sla_status })
1303
1304
  },
1304
1305
  {
1305
1306
  key: "at_risk",
@@ -1307,7 +1308,7 @@ function yi({
1307
1308
  sortable: !0,
1308
1309
  render: (e) => {
1309
1310
  var t;
1310
- return e.at_risk ? /* @__PURE__ */ d("span", { className: uo(e.at_risk_color ?? "red"), children: [
1311
+ return e.at_risk ? /* @__PURE__ */ d("span", { className: mo(e.at_risk_color ?? "red"), children: [
1311
1312
  "⚑ ",
1312
1313
  ((t = e.at_risk_rule) == null ? void 0 : t.name) ?? "At risk"
1313
1314
  ] }) : e.predicted_risk ? /* @__PURE__ */ r("span", { className: "text-amber-500", title: e.predicted_note ?? void 0, children: "⚑ Predicted" }) : null;
@@ -1318,7 +1319,7 @@ function yi({
1318
1319
  key: "addendums",
1319
1320
  header: q("addendums", "Addendums"),
1320
1321
  sortable: !1,
1321
- render: (e) => /* @__PURE__ */ r(rs, { summary: e.addendums })
1322
+ render: (e) => /* @__PURE__ */ r(as, { summary: e.addendums })
1322
1323
  }
1323
1324
  ] : [],
1324
1325
  ...tt ? [
@@ -1327,7 +1328,7 @@ function yi({
1327
1328
  header: q("fulfilment", "Shipped"),
1328
1329
  sortable: !0,
1329
1330
  render: (e) => /* @__PURE__ */ r(
1330
- Ro,
1331
+ To,
1331
1332
  {
1332
1333
  collection: e.collection,
1333
1334
  itemId: e.item_id,
@@ -1341,10 +1342,10 @@ function yi({
1341
1342
  key: "integrations",
1342
1343
  header: q("integrations", "Integrations"),
1343
1344
  sortable: !1,
1344
- render: (e) => /* @__PURE__ */ r(Eo, { rows: Ta[`${e.collection}:${e.item_id}`] })
1345
+ render: (e) => /* @__PURE__ */ r(Eo, { rows: Aa[`${e.collection}:${e.item_id}`] })
1345
1346
  }
1346
1347
  ] : [],
1347
- ...ar ? [
1348
+ ...lr ? [
1348
1349
  {
1349
1350
  key: "tasks",
1350
1351
  header: q("tasks", "Tasks"),
@@ -1370,10 +1371,10 @@ function yi({
1370
1371
  key: "send_backs",
1371
1372
  header: q("send_backs", "Sent back"),
1372
1373
  sortable: !0,
1373
- render: (e) => /* @__PURE__ */ r(es, { summary: e.send_backs })
1374
+ render: (e) => /* @__PURE__ */ r(ts, { summary: e.send_backs })
1374
1375
  }
1375
1376
  ] : []
1376
- ], Va = {
1377
+ ], Ga = {
1377
1378
  key: "claim",
1378
1379
  header: "",
1379
1380
  render: (e) => e.claimed_by ? /* @__PURE__ */ r(
@@ -1397,7 +1398,7 @@ function yi({
1397
1398
  children: "Claim"
1398
1399
  }
1399
1400
  )
1400
- }, ut = (s == null ? void 0 : s.available_extra_fields) ?? [], mt = Bl("drill.queue"), X = mt.value, Nr = (e) => mt.push([e]), Ga = (e) => {
1401
+ }, ut = (s == null ? void 0 : s.available_extra_fields) ?? [], mt = jl("drill.queue"), X = mt.value, Sr = (e) => mt.push([e]), Wa = (e) => {
1401
1402
  var t;
1402
1403
  for (const n of (s == null ? void 0 : s.sources) ?? []) {
1403
1404
  const a = (t = n.drilldown) == null ? void 0 : t[e];
@@ -1409,40 +1410,40 @@ function yi({
1409
1410
  };
1410
1411
  }
1411
1412
  return { enabled: !0, layout_id: null, width: null };
1412
- }, Wa = G(() => {
1413
+ }, Ha = G(() => {
1413
1414
  const e = {};
1414
1415
  for (const t of (s == null ? void 0 : s.sources) ?? [])
1415
1416
  for (const [n, a] of Object.entries(t.column_formats ?? {}))
1416
1417
  n in e || (e[n] = a);
1417
1418
  return e;
1418
- }, [s == null ? void 0 : s.sources]), Ha = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Ja = /^\d{4}-\d{2}-\d{2}T\d{2}:/;
1419
- function Ya(e) {
1420
- if (Ha.test(e)) return { text: e.split("@")[0], title: e };
1421
- if (Ja.test(e)) {
1419
+ }, [s == null ? void 0 : s.sources]), Ja = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Ya = /^\d{4}-\d{2}-\d{2}T\d{2}:/;
1420
+ function za(e) {
1421
+ if (Ja.test(e)) return { text: e.split("@")[0], title: e };
1422
+ if (Ya.test(e)) {
1422
1423
  const t = new Date(e);
1423
1424
  if (!Number.isNaN(t.getTime()))
1424
1425
  return {
1425
- text: ko(t, { month: "2-digit", day: "2-digit", year: "2-digit" }),
1426
- title: yo(t)
1426
+ text: vo(t, { month: "2-digit", day: "2-digit", year: "2-digit" }),
1427
+ title: ko(t)
1427
1428
  };
1428
1429
  }
1429
1430
  return { text: e, title: e };
1430
1431
  }
1431
- const za = ut.map((e) => ({
1432
+ const Xa = ut.map((e) => ({
1432
1433
  key: `extra.${e}`,
1433
- header: q(`extra.${e}`, yt(e)),
1434
+ header: q(`extra.${e}`, kt(e)),
1434
1435
  sortable: !0,
1435
1436
  render: (t) => {
1436
1437
  var y, R;
1437
1438
  const n = (y = t.extra) == null ? void 0 : y[e];
1438
1439
  if (n == null || n === "") return /* @__PURE__ */ r("span", { className: "text-slate-300", children: "—" });
1439
- const a = Ue(e), o = a ? Ge(String(n), a) : String(n), { text: i, title: b } = Ya(o), m = ((s == null ? void 0 : s.extra_field_meta) ?? []).find((Q) => Q.path === e), K = ((R = t.extra_ids) == null ? void 0 : R[e]) ?? [], F = Ga(e);
1440
+ const a = Ue(e), o = a ? Ge(String(n), a) : String(n), { text: i, title: b } = za(o), m = ((s == null ? void 0 : s.extra_field_meta) ?? []).find((Q) => Q.path === e), K = ((R = t.extra_ids) == null ? void 0 : R[e]) ?? [], F = Wa(e);
1440
1441
  return (m == null ? void 0 : m.kind) === "relation" && m.target_collection && K.length > 0 && F.enabled && !m.aggregate ? /* @__PURE__ */ r(
1441
1442
  "button",
1442
1443
  {
1443
1444
  type: "button",
1444
1445
  onClick: (Q) => {
1445
- Q.stopPropagation(), Nr({
1446
+ Q.stopPropagation(), Sr({
1446
1447
  collection: m.target_collection,
1447
1448
  itemId: K[0],
1448
1449
  layoutId: F.layout_id,
@@ -1459,7 +1460,7 @@ function yi({
1459
1460
  {
1460
1461
  type: "button",
1461
1462
  onClick: (Q) => {
1462
- Q.stopPropagation(), nn({ row: t, path: e, value: o });
1463
+ Q.stopPropagation(), rn({ row: t, path: e, value: o });
1463
1464
  },
1464
1465
  title: "Show the rows behind this number",
1465
1466
  className: "block max-w-[200px] truncate text-left text-[12px] tabular-nums underline decoration-slate-300 decoration-dotted underline-offset-2 hover:text-nvr-navy hover:decoration-nvr-cyan dark:hover:text-nvr-cyan",
@@ -1467,8 +1468,8 @@ function yi({
1467
1468
  }
1468
1469
  ) : /* @__PURE__ */ r("span", { className: "block max-w-[200px] truncate text-[12px]", title: b, children: i });
1469
1470
  }
1470
- })), Sr = [
1471
- ..._n ? ["collection"] : [],
1471
+ })), Cr = [
1472
+ ...Nn ? ["collection"] : [],
1472
1473
  "state",
1473
1474
  "owners",
1474
1475
  "aging_hours",
@@ -1479,10 +1480,10 @@ function yi({
1479
1480
  ...tt ? ["fulfilment"] : [],
1480
1481
  ...he ? ["integrations"] : [],
1481
1482
  ...nt ? ["send_backs"] : [],
1482
- ...ar ? ["tasks"] : [],
1483
+ ...lr ? ["tasks"] : [],
1483
1484
  ...ut.map((e) => `extra.${e}`)
1484
- ], Xa = [
1485
- ..._n ? ["collection"] : [],
1485
+ ], Za = [
1486
+ ...Nn ? ["collection"] : [],
1486
1487
  "state",
1487
1488
  "owners",
1488
1489
  ...je ? ["addendums"] : [],
@@ -1493,29 +1494,29 @@ function yi({
1493
1494
  "sla_status",
1494
1495
  "at_risk",
1495
1496
  ...ut.slice(0, 2).map((e) => `extra.${e}`)
1496
- ], Za = (u == null ? void 0 : u.default_columns) ?? null, Nn = on ?? Za, te = new Set(Nn ?? Xa);
1497
- je && !vt.has("addendums") && te.add("addendums"), tt && !vt.has("fulfilment") && te.add("fulfilment"), he && !vt.has("integrations") && te.add("integrations"), nt && !vt.has("send_backs") && te.add("send_backs");
1498
- const el = new Set(Kt ? [] : (u == null ? void 0 : u.admin_only_columns) ?? []);
1499
- for (const e of el) te.delete(e);
1497
+ ], el = (u == null ? void 0 : u.default_columns) ?? null, Sn = sn ?? el, te = new Set(Sn ?? Za);
1498
+ je && !wt.has("addendums") && te.add("addendums"), tt && !wt.has("fulfilment") && te.add("fulfilment"), he && !wt.has("integrations") && te.add("integrations"), nt && !wt.has("send_backs") && te.add("send_backs");
1499
+ const tl = new Set(Mt ? [] : (u == null ? void 0 : u.admin_only_columns) ?? []);
1500
+ for (const e of tl) te.delete(e);
1500
1501
  const Ie = [
1501
- ...(Nn ?? []).filter((e) => Sr.includes(e)),
1502
- ...Sr.filter((e) => !(Nn ?? []).includes(e))
1503
- ], tl = dl(ul(ml, { activationConstraint: { distance: 4 } }));
1504
- function nl(e) {
1502
+ ...(Sn ?? []).filter((e) => Cr.includes(e)),
1503
+ ...Cr.filter((e) => !(Sn ?? []).includes(e))
1504
+ ], nl = ul(ml(bl, { activationConstraint: { distance: 4 } }));
1505
+ function rl(e) {
1505
1506
  const { active: t, over: n } = e;
1506
1507
  if (!n || t.id === n.id) return;
1507
1508
  const a = Ie.indexOf(String(t.id)), o = Ie.indexOf(String(n.id));
1508
- a === -1 || o === -1 || qt(
1509
- gl(Ie, a, o).filter((i) => te.has(i))
1509
+ a === -1 || o === -1 || Ft(
1510
+ xl(Ie, a, o).filter((i) => te.has(i))
1510
1511
  );
1511
1512
  }
1512
- const Cr = _r.find((e) => e.key === "label"), rl = {
1513
- ...Cr,
1513
+ const $r = Nr.find((e) => e.key === "label"), al = {
1514
+ ...$r,
1514
1515
  render: (e, ...t) => /* @__PURE__ */ d("span", { className: "inline-flex min-w-0 items-center gap-1.5", children: [
1515
- /* @__PURE__ */ r(So, { rowId: e.item_id }),
1516
- Cr.render(e, ...t)
1516
+ /* @__PURE__ */ r(Co, { rowId: e.item_id }),
1517
+ $r.render(e, ...t)
1517
1518
  ] })
1518
- }, al = ((u == null ? void 0 : u.formula_columns) ?? []).map(
1519
+ }, ll = ((u == null ? void 0 : u.formula_columns) ?? []).map(
1519
1520
  (e) => ({
1520
1521
  key: `formula.${e.key}`,
1521
1522
  header: e.label,
@@ -1523,7 +1524,7 @@ function yi({
1523
1524
  const n = {
1524
1525
  ...t,
1525
1526
  ...t.extra ? Object.fromEntries(Object.entries(t.extra).map(([i, b]) => [`extra.${i}`, b])) : {}
1526
- }, a = Gl(e.formula, (i) => {
1527
+ }, a = Wl(e.formula, (i) => {
1527
1528
  const b = n[i] ?? (t.extra ? t.extra[i] : void 0), m = Number(b);
1528
1529
  return Number.isFinite(m) ? m : b ?? null;
1529
1530
  });
@@ -1532,11 +1533,11 @@ function yi({
1532
1533
  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) });
1533
1534
  }
1534
1535
  })
1535
- ), $r = [..._r, ...za, ...al], ll = {
1536
+ ), qr = [...Nr, ...Xa, ...ll], ol = {
1536
1537
  key: "__actions__",
1537
1538
  header: "",
1538
- render: (e) => e.collection === "tasks" || e.collection === Ut ? null : /* @__PURE__ */ r("span", { onClick: (t) => t.stopPropagation(), children: /* @__PURE__ */ r(
1539
- Co,
1539
+ render: (e) => e.collection === "tasks" || e.collection === It ? null : /* @__PURE__ */ r("span", { onClick: (t) => t.stopPropagation(), children: /* @__PURE__ */ r(
1540
+ $o,
1540
1541
  {
1541
1542
  collection: e.collection,
1542
1543
  id: e.item_id,
@@ -1545,34 +1546,32 @@ function yi({
1545
1546
  onPeek: () => $e(e),
1546
1547
  urlFor: W.urlFor,
1547
1548
  onDeleted: () => {
1548
- p.request($n(`/items/${e.collection}/${e.item_id}`)).then(() => {
1549
+ p.request(qn(`/items/${e.collection}/${e.item_id}`)).then(() => {
1549
1550
  T.success("Moved to trash"), h.invalidateQueries({ queryKey: ["queue-items", l] });
1550
- }).catch(
1551
- (t) => T.error(t instanceof Error ? t.message : "Delete failed")
1552
- );
1551
+ }).catch((t) => T.error(gt(t, "Delete failed")));
1553
1552
  },
1554
1553
  onAfterTransition: () => void h.invalidateQueries({ queryKey: ["queue-items", l] }),
1555
1554
  bulkEnabledKeys: (u == null ? void 0 : u.bulk_action_keys) ?? null
1556
1555
  }
1557
1556
  ) })
1558
- }, Qt = [
1559
- rl,
1560
- ...Ie.filter((e) => te.has(e)).map((e) => $r.find((t) => t.key === e)).filter((e) => e !== void 0),
1561
- ...oe ? [Va] : [],
1562
- ll
1563
- ], qr = G(() => {
1557
+ }, Bt = [
1558
+ al,
1559
+ ...Ie.filter((e) => te.has(e)).map((e) => qr.find((t) => t.key === e)).filter((e) => e !== void 0),
1560
+ ...oe ? [Ga] : [],
1561
+ ol
1562
+ ], Fr = G(() => {
1564
1563
  var a;
1565
- const e = u == null ? void 0 : u.default_pins, t = wt ?? (e && Object.keys(e).length > 0 ? e : { [((a = Qt[0]) == null ? void 0 : a.key) ?? "label"]: "left" }), n = new Set(Qt.map((o) => o.key));
1564
+ const e = u == null ? void 0 : u.default_pins, t = _t ?? (e && Object.keys(e).length > 0 ? e : { [((a = Bt[0]) == null ? void 0 : a.key) ?? "label"]: "left" }), n = new Set(Bt.map((o) => o.key));
1566
1565
  return Object.fromEntries(Object.entries(t).filter(([o]) => n.has(o)));
1567
- }, [wt, u == null ? void 0 : u.default_pins, Qt.map((e) => e.key).join("|")]), Fr = [
1566
+ }, [_t, u == null ? void 0 : u.default_pins, Bt.map((e) => e.key).join("|")]), Rr = [
1568
1567
  { value: "state", label: "State" },
1569
1568
  { value: "collection", label: "Collection" },
1570
1569
  { value: "sla_status", label: "SLA status" },
1571
1570
  { value: "at_risk", label: "At risk" },
1572
1571
  { value: "owners", label: "Owner" },
1573
1572
  { value: "aging", label: "Aging" },
1574
- ...ut.filter((e) => te.has(`extra.${e}`)).map((e) => ({ value: `extra.${e}`, label: q(`extra.${e}`, yt(e)) }))
1575
- ], Rr = (e) => async (t) => {
1573
+ ...ut.filter((e) => te.has(`extra.${e}`)).map((e) => ({ value: `extra.${e}`, label: q(`extra.${e}`, kt(e)) }))
1574
+ ], Tr = (e) => async (t) => {
1576
1575
  if (!e.target_collection || !e.display_field) return [];
1577
1576
  const n = {
1578
1577
  limit: 25,
@@ -1580,8 +1579,8 @@ function yi({
1580
1579
  };
1581
1580
  t.trim() && (n.filter = JSON.stringify({ [e.display_field]: { _contains: t.trim() } }));
1582
1581
  const o = (await p.request(
1583
- E(`/items/${e.target_collection}`, n)
1584
- )).data ?? [], i = Ue(e.path), b = Oe[e.path] ? new Set(Oe[e.path]) : null, m = /* @__PURE__ */ new Set(), K = [];
1582
+ O(`/items/${e.target_collection}`, n)
1583
+ )).data ?? [], i = Ue(e.path), b = Ee[e.path] ? new Set(Ee[e.path]) : null, m = /* @__PURE__ */ new Set(), K = [];
1585
1584
  for (const F of o) {
1586
1585
  const y = F[e.display_field];
1587
1586
  if (y == null || y === "") continue;
@@ -1589,7 +1588,7 @@ function yi({
1589
1588
  m.has(R) || b && !b.has(R) || (m.add(R), K.push({ label: i ? Ge(R, i) : R, value: R }));
1590
1589
  }
1591
1590
  return K;
1592
- }, Sn = new Map(((s == null ? void 0 : s.extra_field_meta) ?? []).map((e) => [e.path, e])), bt = [
1591
+ }, Cn = new Map(((s == null ? void 0 : s.extra_field_meta) ?? []).map((e) => [e.path, e])), bt = [
1593
1592
  {
1594
1593
  key: "collection",
1595
1594
  placeholder: q("collection", "Collection"),
@@ -1607,7 +1606,7 @@ function yi({
1607
1606
  multi: !0,
1608
1607
  // Until the rows land, the pipeline's own states (no counts yet) rather
1609
1608
  // than an empty list.
1610
- options: dr(
1609
+ options: ur(
1611
1610
  c ? c.available_values.state ?? [] : Object.keys(fe)
1612
1611
  ).map((e) => {
1613
1612
  var t;
@@ -1616,7 +1615,7 @@ function yi({
1616
1615
  value: e,
1617
1616
  // How many rows sit in it under the other active filters (the State
1618
1617
  // filter itself left out, or every other state would read 0).
1619
- count: Xn ? Xn[e] ?? 0 : (t = x == null ? void 0 : x.by_state) == null ? void 0 : t[e]
1618
+ count: Zn ? Zn[e] ?? 0 : (t = x == null ? void 0 : x.by_state) == null ? void 0 : t[e]
1620
1619
  };
1621
1620
  })
1622
1621
  },
@@ -1639,12 +1638,12 @@ function yi({
1639
1638
  { label: "No", value: "no" }
1640
1639
  ]
1641
1640
  },
1642
- ...or.length > 0 ? [
1641
+ ...sr.length > 0 ? [
1643
1642
  {
1644
1643
  key: "at_risk_rule",
1645
1644
  placeholder: "Highlight rule",
1646
1645
  type: "select",
1647
- options: or
1646
+ options: sr
1648
1647
  }
1649
1648
  ] : [],
1650
1649
  {
@@ -1671,7 +1670,7 @@ function yi({
1671
1670
  key: "integrations",
1672
1671
  placeholder: q("integrations", "Integrations"),
1673
1672
  type: "select",
1674
- options: Oo.map((e) => ({ label: e.label, value: e.value }))
1673
+ options: Lo.map((e) => ({ label: e.label, value: e.value }))
1675
1674
  }
1676
1675
  ] : [],
1677
1676
  ...tt ? [
@@ -1679,7 +1678,7 @@ function yi({
1679
1678
  key: "fulfilment",
1680
1679
  placeholder: "Shipped",
1681
1680
  type: "select",
1682
- options: To
1681
+ options: Ao
1683
1682
  }
1684
1683
  ] : [],
1685
1684
  ...nt ? [
@@ -1694,13 +1693,13 @@ function yi({
1694
1693
  ]
1695
1694
  }
1696
1695
  ] : [],
1697
- ...an.length > 0 ? [
1696
+ ...ln.length > 0 ? [
1698
1697
  {
1699
1698
  key: "labels",
1700
1699
  placeholder: "Triage label",
1701
1700
  type: "combobox",
1702
1701
  multi: !0,
1703
- options: an.map((e) => ({ label: e, value: e }))
1702
+ options: ln.map((e) => ({ label: e, value: e }))
1704
1703
  }
1705
1704
  ] : [],
1706
1705
  {
@@ -1709,7 +1708,7 @@ function yi({
1709
1708
  type: "combobox",
1710
1709
  multi: !0,
1711
1710
  loadOptions: async (e) => ((await p.request(
1712
- E(`/queues/${l}/label-suggest`, e.trim() ? { q: e.trim() } : {})
1711
+ O(`/queues/${l}/label-suggest`, e.trim() ? { q: e.trim() } : {})
1713
1712
  )).data ?? []).map((n) => ({ label: n, value: n }))
1714
1713
  },
1715
1714
  {
@@ -1724,7 +1723,7 @@ function yi({
1724
1723
  },
1725
1724
  ...ut.map((e) => {
1726
1725
  var b, m;
1727
- const t = Sn.get(e), n = q(`extra.${e}`, yt(e)), a = { key: `extra.${e}`, placeholder: n }, o = Ue(e);
1726
+ const t = Cn.get(e), n = q(`extra.${e}`, kt(e)), a = { key: `extra.${e}`, placeholder: n }, o = Ue(e);
1728
1727
  if ((o == null ? void 0 : o.type) === "datetime") return { ...a, type: "date" };
1729
1728
  if ((o == null ? void 0 : o.type) === "number") return { ...a, type: "number" };
1730
1729
  if ((o == null ? void 0 : o.type) === "boolean")
@@ -1746,13 +1745,13 @@ function yi({
1746
1745
  ...a,
1747
1746
  type: "combobox",
1748
1747
  multi: !0,
1749
- restricted: !!((m = Oe[e]) != null && m.length),
1750
- loadOptions: Rr(t)
1748
+ restricted: !!((m = Ee[e]) != null && m.length),
1749
+ loadOptions: Tr(t)
1751
1750
  } : { ...a, placeholder: `Search ${n}…`, type: "text" };
1752
1751
  })
1753
- ], Cn = bt.filter(
1752
+ ], $n = bt.filter(
1754
1753
  (e) => te.has(e.key) || e.key === "label" || e.key === "owners"
1755
- ), pt = new Set(Object.keys(pe.current)), ol = ((e) => {
1754
+ ), pt = new Set(Object.keys(pe.current)), sl = ((e) => {
1756
1755
  var n;
1757
1756
  if (e.some((a) => a.key === "state")) return e;
1758
1757
  const t = bt.find((a) => a.key === "state");
@@ -1764,7 +1763,7 @@ function yi({
1764
1763
  var Q, xe, Re;
1765
1764
  if (!i.key.startsWith("extra.")) return null;
1766
1765
  if (i.type === "combobox") return i;
1767
- const b = i.key.slice(6), m = Sn.get(b), K = pt.has(i.key);
1766
+ const b = i.key.slice(6), m = Cn.get(b), K = pt.has(i.key);
1768
1767
  if ((m == null ? void 0 : m.kind) !== "relation" && !K) return null;
1769
1768
  const F = Ue(b), y = (Q = c == null ? void 0 : c.available_values.extra) == null ? void 0 : Q[b], R = i.placeholder.replace(/^Search (.*)…$/, "$1");
1770
1769
  return y != null && y.length ? {
@@ -1772,7 +1771,7 @@ function yi({
1772
1771
  placeholder: R,
1773
1772
  type: "combobox",
1774
1773
  multi: !0,
1775
- restricted: !!((xe = Oe[b]) != null && xe.length),
1774
+ restricted: !!((xe = Ee[b]) != null && xe.length),
1776
1775
  options: y.map((_) => ({
1777
1776
  label: F && F.type !== "number" ? Ge(_, F) : _,
1778
1777
  value: _
@@ -1782,13 +1781,13 @@ function yi({
1782
1781
  placeholder: R,
1783
1782
  type: "combobox",
1784
1783
  multi: !0,
1785
- restricted: !!((Re = Oe[b]) != null && Re.length),
1786
- loadOptions: Rr(m)
1784
+ restricted: !!((Re = Ee[b]) != null && Re.length),
1785
+ loadOptions: Tr(m)
1787
1786
  } : null;
1788
1787
  };
1789
- if (jn.length > 0) {
1788
+ if (Un.length > 0) {
1790
1789
  const i = [], b = /* @__PURE__ */ new Set();
1791
- for (const m of jn) {
1790
+ for (const m of Un) {
1792
1791
  const K = (m.path ?? []).join(".");
1793
1792
  let F;
1794
1793
  if (m.key === "state" || /(^|_)state$/.test(((o = m.path) == null ? void 0 : o[0]) ?? ""))
@@ -1798,7 +1797,7 @@ function yi({
1798
1797
  var Re;
1799
1798
  if (!Q.key.startsWith("extra.") || b.has(Q.key)) return !1;
1800
1799
  const xe = Q.key.slice(6);
1801
- return ((Re = Sn.get(xe)) == null ? void 0 : Re.target_collection) === m.collection;
1800
+ return ((Re = Cn.get(xe)) == null ? void 0 : Re.target_collection) === m.collection;
1802
1801
  }), R = y.find((Q) => Q.key.slice(6).startsWith(`${K}.`)) ?? y[0];
1803
1802
  F = R ? e(R) : null;
1804
1803
  }
@@ -1808,13 +1807,13 @@ function yi({
1808
1807
  m && !b.has(m.key) && (pt.has(m.key) || m.restricted) && i.push(m);
1809
1808
  if (i.length > 0) return i;
1810
1809
  }
1811
- const t = Cn.map(e).filter((i) => i !== null), a = [
1810
+ const t = $n.map(e).filter((i) => i !== null), a = [
1812
1811
  ...t.filter((i) => pt.has(i.key) || i.restricted),
1813
1812
  ...t.filter((i) => !pt.has(i.key) && !i.restricted)
1814
1813
  ].slice(0, 6);
1815
- return a.length > 0 ? a : Cn.filter((i) => i.key === "state" || i.key === "owners");
1814
+ return a.length > 0 ? a : $n.filter((i) => i.key === "state" || i.key === "owners");
1816
1815
  })()
1817
- ), sl = (() => {
1816
+ ), il = (() => {
1818
1817
  if (!x) return null;
1819
1818
  const e = Y ?? x, t = [
1820
1819
  {
@@ -1886,17 +1885,17 @@ function yi({
1886
1885
  }
1887
1886
  );
1888
1887
  })();
1889
- function il(e) {
1888
+ function cl(e) {
1890
1889
  const t = new Set(te);
1891
- t.has(e) ? (t.delete(e), (e === "addendums" || e === "integrations") && An((n) => new Set(n).add(e))) : (t.add(e), (e === "addendums" || e === "integrations") && An((n) => {
1890
+ t.has(e) ? (t.delete(e), (e === "addendums" || e === "integrations") && On((n) => new Set(n).add(e))) : (t.add(e), (e === "addendums" || e === "integrations") && On((n) => {
1892
1891
  const a = new Set(n);
1893
1892
  return a.delete(e), a;
1894
- })), qt([...t]);
1893
+ })), Ft([...t]);
1895
1894
  }
1896
- return St ? ($ == null ? void 0 : $((St == null ? void 0 : St.status) ?? 500)) ?? null : /* @__PURE__ */ d("div", { className: "flex flex-1 min-h-0 flex-col", children: [
1895
+ return Ct ? ($ == null ? void 0 : $((Ct == null ? void 0 : Ct.status) ?? 500)) ?? null : /* @__PURE__ */ d("div", { className: "flex flex-1 min-h-0 flex-col", children: [
1897
1896
  /* @__PURE__ */ d("div", { className: "shrink-0", children: [
1898
1897
  (c == null ? void 0 : c.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: [
1899
- /* @__PURE__ */ r(vl, { className: "h-4 w-4 shrink-0" }),
1898
+ /* @__PURE__ */ r(wl, { className: "h-4 w-4 shrink-0" }),
1900
1899
  /* @__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." })
1901
1900
  ] }),
1902
1901
  /* @__PURE__ */ d(
@@ -1905,7 +1904,7 @@ function yi({
1905
1904
  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",
1906
1905
  "data-queue-toolbar": !0,
1907
1906
  children: [
1908
- ae ? /* @__PURE__ */ r("div", { className: "flex overflow-hidden rounded-md border border-slate-200 dark:border-border", children: ns.filter((e) => oe || e.value !== "claimed").map(
1907
+ ae ? /* @__PURE__ */ r("div", { className: "flex overflow-hidden rounded-md border border-slate-200 dark:border-border", children: rs.filter((e) => oe || e.value !== "claimed").map(
1909
1908
  (e, t) => /* @__PURE__ */ r(
1910
1909
  "button",
1911
1910
  {
@@ -1974,13 +1973,13 @@ function yi({
1974
1973
  }),
1975
1974
  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"}`,
1976
1975
  children: [
1977
- /* @__PURE__ */ r(wl, { className: "h-3.5 w-3.5" }),
1976
+ /* @__PURE__ */ r(_l, { className: "h-3.5 w-3.5" }),
1978
1977
  "Active addendums"
1979
1978
  ]
1980
1979
  }
1981
1980
  ),
1982
1981
  he && /* @__PURE__ */ r(
1983
- Lo,
1982
+ Do,
1984
1983
  {
1985
1984
  label: q("integrations", "Integrations"),
1986
1985
  value: w.integrations,
@@ -1990,19 +1989,19 @@ function yi({
1990
1989
  })
1991
1990
  }
1992
1991
  ),
1993
- /* @__PURE__ */ r(Ko, { className: "h-8" }),
1994
- /* @__PURE__ */ r(Fo, {}),
1995
- Wt > 0 && /* @__PURE__ */ d(
1992
+ /* @__PURE__ */ r(Mo, { className: "h-8" }),
1993
+ /* @__PURE__ */ r(Ro, {}),
1994
+ Ht > 0 && /* @__PURE__ */ d(
1996
1995
  "button",
1997
1996
  {
1998
1997
  type: "button",
1999
- onClick: qa,
1998
+ onClick: Fa,
2000
1999
  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",
2001
2000
  children: [
2002
- /* @__PURE__ */ r(_l, { className: "h-3 w-3" }),
2003
- Wt,
2001
+ /* @__PURE__ */ r(Nl, { className: "h-3 w-3" }),
2002
+ Ht,
2004
2003
  " update",
2005
- Wt === 1 ? "" : "s",
2004
+ Ht === 1 ? "" : "s",
2006
2005
  " · Refresh"
2007
2006
  ]
2008
2007
  }
@@ -2018,18 +2017,18 @@ function yi({
2018
2017
  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"
2019
2018
  ),
2020
2019
  children: [
2021
- /* @__PURE__ */ r(Vr, { className: "h-3.5 w-3.5" }),
2022
- N ? `Group: ${((Or = Fr.find((e) => e.value === N)) == null ? void 0 : Or.label) ?? N}` : "Group"
2020
+ /* @__PURE__ */ r(Gr, { className: "h-3.5 w-3.5" }),
2021
+ N ? `Group: ${((Lr = Rr.find((e) => e.value === N)) == null ? void 0 : Lr.label) ?? N}` : "Group"
2023
2022
  ]
2024
2023
  }
2025
2024
  ) }),
2026
- /* @__PURE__ */ r(Je, { className: "w-[200px] p-0", align: "start", children: /* @__PURE__ */ d(Xr, { children: [
2027
- /* @__PURE__ */ r(Io, { placeholder: "Group by…", className: "h-8 text-[12px]" }),
2028
- /* @__PURE__ */ d(Zr, { children: [
2029
- /* @__PURE__ */ r(Vo, { children: "No attribute found." }),
2030
- /* @__PURE__ */ r(gt, { value: "__none__", onSelect: () => Ye(null), children: "None" }),
2031
- Fr.map((e) => /* @__PURE__ */ r(
2032
- gt,
2025
+ /* @__PURE__ */ r(Je, { className: "w-[200px] p-0", align: "start", children: /* @__PURE__ */ d(Zr, { children: [
2026
+ /* @__PURE__ */ r(Vo, { placeholder: "Group by…", className: "h-8 text-[12px]" }),
2027
+ /* @__PURE__ */ d(ea, { children: [
2028
+ /* @__PURE__ */ r(Go, { children: "No attribute found." }),
2029
+ /* @__PURE__ */ r(xt, { value: "__none__", onSelect: () => Ye(null), children: "None" }),
2030
+ Rr.map((e) => /* @__PURE__ */ r(
2031
+ xt,
2033
2032
  {
2034
2033
  value: e.label,
2035
2034
  onSelect: () => Ye(e.value),
@@ -2052,7 +2051,7 @@ function yi({
2052
2051
  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"
2053
2052
  ),
2054
2053
  children: [
2055
- /* @__PURE__ */ r(Nl, { className: "h-3.5 w-3.5" }),
2054
+ /* @__PURE__ */ r(Sl, { className: "h-3.5 w-3.5" }),
2056
2055
  "Priority"
2057
2056
  ]
2058
2057
  }
@@ -2061,7 +2060,7 @@ function yi({
2061
2060
  "button",
2062
2061
  {
2063
2062
  type: "button",
2064
- onClick: () => It(
2063
+ onClick: () => Vt(
2065
2064
  be.size > 0 ? /* @__PURE__ */ new Set() : new Set(Z.map((e) => e.key))
2066
2065
  ),
2067
2066
  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",
@@ -2078,15 +2077,15 @@ function yi({
2078
2077
  ze ? "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"
2079
2078
  ),
2080
2079
  children: [
2081
- /* @__PURE__ */ r(Vr, { className: "h-3.5 w-3.5" }),
2080
+ /* @__PURE__ */ r(Gr, { className: "h-3.5 w-3.5" }),
2082
2081
  ze ? `Lanes: ${ze === "collection" ? "Collection" : "Owner"}` : "Lanes"
2083
2082
  ]
2084
2083
  }
2085
2084
  ) }),
2086
- /* @__PURE__ */ r(Je, { className: "w-[180px] p-0", align: "start", children: /* @__PURE__ */ r(Xr, { children: /* @__PURE__ */ d(Zr, { children: [
2087
- /* @__PURE__ */ r(gt, { value: "none", onSelect: () => Vt(null), children: "None" }),
2088
- /* @__PURE__ */ r(gt, { value: "collection", onSelect: () => Vt("collection"), children: "Collection" }),
2089
- /* @__PURE__ */ r(gt, { value: "owner", onSelect: () => Vt("owners"), children: "Owner" })
2085
+ /* @__PURE__ */ r(Je, { className: "w-[180px] p-0", align: "start", children: /* @__PURE__ */ r(Zr, { children: /* @__PURE__ */ d(ea, { children: [
2086
+ /* @__PURE__ */ r(xt, { value: "none", onSelect: () => Gt(null), children: "None" }),
2087
+ /* @__PURE__ */ r(xt, { value: "collection", onSelect: () => Gt("collection"), children: "Collection" }),
2088
+ /* @__PURE__ */ r(xt, { value: "owner", onSelect: () => Gt("owners"), children: "Owner" })
2090
2089
  ] }) }) })
2091
2090
  ] }),
2092
2091
  U && s && /* @__PURE__ */ d(
@@ -2098,7 +2097,7 @@ function yi({
2098
2097
  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",
2099
2098
  "data-queue-ask": !0,
2100
2099
  children: [
2101
- /* @__PURE__ */ r(Sl, { className: "h-3.5 w-3.5 text-nvr-cyan" }),
2100
+ /* @__PURE__ */ r(Cl, { className: "h-3.5 w-3.5 text-nvr-cyan" }),
2102
2101
  "Ask about this queue"
2103
2102
  ]
2104
2103
  }
@@ -2107,7 +2106,7 @@ function yi({
2107
2106
  "button",
2108
2107
  {
2109
2108
  type: "button",
2110
- onClick: () => ba((e) => !e),
2109
+ onClick: () => pa((e) => !e),
2111
2110
  "aria-expanded": et,
2112
2111
  title: "Trends, aging, pace and states",
2113
2112
  className: C(
@@ -2116,7 +2115,7 @@ function yi({
2116
2115
  ),
2117
2116
  "data-queue-insights-toggle": !0,
2118
2117
  children: [
2119
- /* @__PURE__ */ r(Cl, { className: "h-3.5 w-3.5" }),
2118
+ /* @__PURE__ */ r($l, { className: "h-3.5 w-3.5" }),
2120
2119
  "Insights"
2121
2120
  ]
2122
2121
  }
@@ -2128,31 +2127,31 @@ function yi({
2128
2127
  type: "button",
2129
2128
  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",
2130
2129
  children: [
2131
- /* @__PURE__ */ r($l, { className: "h-3.5 w-3.5" }),
2130
+ /* @__PURE__ */ r(ql, { className: "h-3.5 w-3.5" }),
2132
2131
  "Columns"
2133
2132
  ]
2134
2133
  }
2135
2134
  ) }),
2136
2135
  /* @__PURE__ */ r(Je, { className: "w-[220px] p-2", align: "end", children: /* @__PURE__ */ r(
2137
- bl,
2136
+ pl,
2138
2137
  {
2139
- sensors: tl,
2140
- collisionDetection: pl,
2141
- onDragEnd: nl,
2138
+ sensors: nl,
2139
+ collisionDetection: hl,
2140
+ onDragEnd: rl,
2142
2141
  children: /* @__PURE__ */ r(
2143
- hl,
2142
+ fl,
2144
2143
  {
2145
2144
  items: Ie,
2146
- strategy: fl,
2145
+ strategy: gl,
2147
2146
  children: /* @__PURE__ */ r("div", { className: "space-y-1.5", children: Ie.map((e) => {
2148
- const t = $r.find((n) => n.key === e);
2147
+ const t = qr.find((n) => n.key === e);
2149
2148
  return /* @__PURE__ */ r(
2150
- is,
2149
+ cs,
2151
2150
  {
2152
2151
  id: e,
2153
2152
  label: typeof (t == null ? void 0 : t.header) == "string" ? t.header : e,
2154
2153
  checked: te.has(e),
2155
- onCheckedChange: () => il(e)
2154
+ onCheckedChange: () => cl(e)
2156
2155
  },
2157
2156
  e
2158
2157
  );
@@ -2167,42 +2166,42 @@ function yi({
2167
2166
  {
2168
2167
  type: "button",
2169
2168
  onClick: () => {
2170
- const e = kt === "compact" ? "comfortable" : "compact";
2171
- ta(e);
2169
+ const e = vt === "compact" ? "comfortable" : "compact";
2170
+ na(e);
2172
2171
  try {
2173
2172
  localStorage.setItem("nvr_table_density", e);
2174
2173
  } catch {
2175
2174
  }
2176
2175
  },
2177
2176
  "aria-label": "Row density",
2178
- title: kt === "compact" ? "Switch to comfortable rows" : "Switch to compact rows",
2177
+ title: vt === "compact" ? "Switch to comfortable rows" : "Switch to compact rows",
2179
2178
  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",
2180
- children: kt === "compact" ? /* @__PURE__ */ r(ql, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ r(Fl, { className: "h-3.5 w-3.5" })
2179
+ children: vt === "compact" ? /* @__PURE__ */ r(Fl, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ r(Rl, { className: "h-3.5 w-3.5" })
2181
2180
  }
2182
2181
  ),
2183
- A === "table" && oa && ee.length > 0 && /* @__PURE__ */ d(
2182
+ A === "table" && sa && ee.length > 0 && /* @__PURE__ */ d(
2184
2183
  "button",
2185
2184
  {
2186
2185
  type: "button",
2187
- onClick: () => ur(),
2186
+ onClick: () => mr(),
2188
2187
  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",
2189
2188
  children: [
2190
- /* @__PURE__ */ r(Rl, { className: "h-3 w-3 fill-current" }),
2189
+ /* @__PURE__ */ r(Tl, { className: "h-3 w-3 fill-current" }),
2191
2190
  "Work Next"
2192
2191
  ]
2193
2192
  }
2194
2193
  ),
2195
- !Xt && z.length === 1 && (Ct ? /* @__PURE__ */ d(We, { children: [
2194
+ !Zt && z.length === 1 && ($t ? /* @__PURE__ */ d(We, { children: [
2196
2195
  /* @__PURE__ */ r(He, { asChild: !0, children: /* @__PURE__ */ d(
2197
2196
  "button",
2198
2197
  {
2199
2198
  type: "button",
2200
2199
  className: "flex h-8 items-center gap-1.5 rounded-md border border-slate-200 bg-white px-2.5 text-[12px] font-medium text-slate-700 hover:bg-slate-50 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-200 dark:hover:bg-slate-800",
2201
2200
  children: [
2202
- /* @__PURE__ */ r(jt, { className: "h-3.5 w-3.5" }),
2201
+ /* @__PURE__ */ r(Ut, { className: "h-3.5 w-3.5" }),
2203
2202
  "New ",
2204
- qn(z[0]),
2205
- /* @__PURE__ */ r(Gr, { className: "h-3 w-3 opacity-60" })
2203
+ Fn(z[0]),
2204
+ /* @__PURE__ */ r(Wr, { className: "h-3 w-3 opacity-60" })
2206
2205
  ]
2207
2206
  }
2208
2207
  ) }),
@@ -2219,12 +2218,12 @@ function yi({
2219
2218
  }),
2220
2219
  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",
2221
2220
  children: [
2222
- ((Lr = Ct.active) == null ? void 0 : Lr.create_label) ?? ((Dr = Ct.active) == null ? void 0 : Dr.name) ?? "Default layout",
2221
+ ((Dr = $t.active) == null ? void 0 : Dr.create_label) ?? ((Pr = $t.active) == null ? void 0 : Pr.name) ?? "Default layout",
2223
2222
  /* @__PURE__ */ r("span", { className: "ml-auto pl-3 text-[10px] text-slate-400 dark:text-slate-500", children: "default" })
2224
2223
  ]
2225
2224
  }
2226
2225
  ),
2227
- Ct.options.map((e) => /* @__PURE__ */ r(
2226
+ $t.options.map((e) => /* @__PURE__ */ r(
2228
2227
  "button",
2229
2228
  {
2230
2229
  type: "button",
@@ -2252,22 +2251,22 @@ function yi({
2252
2251
  }),
2253
2252
  className: "flex h-8 items-center gap-1.5 rounded-md border border-slate-200 bg-white px-2.5 text-[12px] font-medium text-slate-700 hover:bg-slate-50 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-200 dark:hover:bg-slate-800",
2254
2253
  children: [
2255
- /* @__PURE__ */ r(jt, { className: "h-3.5 w-3.5" }),
2254
+ /* @__PURE__ */ r(Ut, { className: "h-3.5 w-3.5" }),
2256
2255
  "New ",
2257
- qn(z[0])
2256
+ Fn(z[0])
2258
2257
  ]
2259
2258
  }
2260
2259
  )),
2261
- !Xt && z.length > 1 && /* @__PURE__ */ d(We, { children: [
2260
+ !Zt && z.length > 1 && /* @__PURE__ */ d(We, { children: [
2262
2261
  /* @__PURE__ */ r(He, { asChild: !0, children: /* @__PURE__ */ d(
2263
2262
  "button",
2264
2263
  {
2265
2264
  type: "button",
2266
2265
  className: "flex h-8 items-center gap-1.5 rounded-md border border-slate-200 bg-white px-2.5 text-[12px] font-medium text-slate-700 hover:bg-slate-50 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-200 dark:hover:bg-slate-800",
2267
2266
  children: [
2268
- /* @__PURE__ */ r(jt, { className: "h-3.5 w-3.5" }),
2267
+ /* @__PURE__ */ r(Ut, { className: "h-3.5 w-3.5" }),
2269
2268
  "New",
2270
- /* @__PURE__ */ r(Gr, { className: "h-3 w-3 opacity-60" })
2269
+ /* @__PURE__ */ r(Wr, { className: "h-3 w-3 opacity-60" })
2271
2270
  ]
2272
2271
  }
2273
2272
  ) }),
@@ -2282,15 +2281,15 @@ function yi({
2282
2281
  }),
2283
2282
  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",
2284
2283
  children: [
2285
- /* @__PURE__ */ r(jt, { className: "h-3 w-3 opacity-60" }),
2286
- qn(e)
2284
+ /* @__PURE__ */ r(Ut, { className: "h-3 w-3 opacity-60" }),
2285
+ Fn(e)
2287
2286
  ]
2288
2287
  },
2289
2288
  e
2290
2289
  )) })
2291
2290
  ] }),
2292
- !Xt && Le && me && /* @__PURE__ */ r(
2293
- Ao,
2291
+ !Zt && Le && me && /* @__PURE__ */ r(
2292
+ Oo,
2294
2293
  {
2295
2294
  collection: Le,
2296
2295
  onParsed: (e, t) => me(`/collections/${Le}/new`, {
@@ -2310,19 +2309,19 @@ function yi({
2310
2309
  children: [
2311
2310
  /* @__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: [
2312
2311
  /* @__PURE__ */ r(
2313
- xt,
2312
+ yt,
2314
2313
  {
2315
2314
  label: "Total",
2316
2315
  count: (x == null ? void 0 : x.total) ?? 0,
2317
2316
  filteredCount: Y ? Y.total : null,
2318
- active: Object.values(w).every(ua) && g === "all",
2317
+ active: Object.values(w).every(ma) && g === "all",
2319
2318
  isLoading: Ke,
2320
2319
  ...rt("total"),
2321
- onClick: ma
2320
+ onClick: ba
2322
2321
  }
2323
2322
  ),
2324
2323
  /* @__PURE__ */ r(
2325
- xt,
2324
+ yt,
2326
2325
  {
2327
2326
  label: "Warning",
2328
2327
  count: (x == null ? void 0 : x.sla_warning) ?? 0,
@@ -2336,7 +2335,7 @@ function yi({
2336
2335
  }
2337
2336
  ),
2338
2337
  /* @__PURE__ */ r(
2339
- xt,
2338
+ yt,
2340
2339
  {
2341
2340
  label: "Breached",
2342
2341
  count: (x == null ? void 0 : x.sla_breached) ?? 0,
@@ -2350,7 +2349,7 @@ function yi({
2350
2349
  }
2351
2350
  ),
2352
2351
  /* @__PURE__ */ r(
2353
- xt,
2352
+ yt,
2354
2353
  {
2355
2354
  label: "At Risk",
2356
2355
  count: (x == null ? void 0 : x.at_risk) ?? 0,
@@ -2364,7 +2363,7 @@ function yi({
2364
2363
  }
2365
2364
  ),
2366
2365
  /* @__PURE__ */ r(
2367
- xt,
2366
+ yt,
2368
2367
  {
2369
2368
  label: "Unowned",
2370
2369
  count: (x == null ? void 0 : x.unowned) ?? 0,
@@ -2428,17 +2427,17 @@ function yi({
2428
2427
  ] }) : /* @__PURE__ */ r(ke, { children: "→ Holding steady" })
2429
2428
  }
2430
2429
  ),
2431
- cr.length > 0 && /* @__PURE__ */ r("div", { className: "flex min-w-0 flex-wrap items-center gap-1.5", children: cr.map(([e, t]) => {
2430
+ dr.length > 0 && /* @__PURE__ */ r("div", { className: "flex min-w-0 flex-wrap items-center gap-1.5", children: dr.map(([e, t]) => {
2432
2431
  var n;
2433
2432
  return /* @__PURE__ */ r(
2434
- ss,
2433
+ is,
2435
2434
  {
2436
2435
  label: Ce(e),
2437
2436
  count: t,
2438
2437
  filteredCount: Y ? Y.by_state[e] ?? 0 : null,
2439
2438
  color: ((n = fe[e]) == null ? void 0 : n.color) ?? null,
2440
- active: da.includes(e),
2441
- onClick: () => ca(e)
2439
+ active: ua.includes(e),
2440
+ onClick: () => da(e)
2442
2441
  },
2443
2442
  e
2444
2443
  );
@@ -2447,9 +2446,9 @@ function yi({
2447
2446
  }
2448
2447
  ),
2449
2448
  A !== "workload" && /* @__PURE__ */ r(
2450
- Xo,
2449
+ Zo,
2451
2450
  {
2452
- defs: ol,
2451
+ defs: sl,
2453
2452
  values: w,
2454
2453
  seededKeys: pt,
2455
2454
  onApply: (e) => {
@@ -2458,7 +2457,7 @@ function yi({
2458
2457
  onClear: () => {
2459
2458
  M({ ...pe.current }), L(1);
2460
2459
  },
2461
- right: sl
2460
+ right: il
2462
2461
  }
2463
2462
  ),
2464
2463
  /* @__PURE__ */ d(
@@ -2506,7 +2505,7 @@ function yi({
2506
2505
  "button",
2507
2506
  {
2508
2507
  type: "button",
2509
- onClick: Ma,
2508
+ onClick: Qa,
2510
2509
  title: "Revert to the queue default (filters, columns and sort cleared)",
2511
2510
  className: C(
2512
2511
  "inline-flex h-6 items-center rounded-full border px-2.5 text-[12px] transition-colors",
@@ -2530,13 +2529,13 @@ function yi({
2530
2529
  {
2531
2530
  type: "button",
2532
2531
  title: Be === e.id ? "Your default view — click to revert to the general default" : "Set as your default view",
2533
- onClick: () => ja.mutate(Be === e.id ? null : e.id),
2532
+ onClick: () => Ua.mutate(Be === e.id ? null : e.id),
2534
2533
  className: C(
2535
2534
  "shrink-0",
2536
2535
  Be === e.id ? "text-amber-400" : "text-slate-300 hover:text-amber-400 dark:text-slate-600"
2537
2536
  ),
2538
2537
  children: /* @__PURE__ */ r(
2539
- Tl,
2538
+ Al,
2540
2539
  {
2541
2540
  className: C("h-3 w-3", Be === e.id && "fill-current"),
2542
2541
  "aria-label": Be === e.id ? "Default view" : "Set as default"
@@ -2544,25 +2543,25 @@ function yi({
2544
2543
  )
2545
2544
  }
2546
2545
  ),
2547
- /* @__PURE__ */ d("button", { type: "button", onClick: () => Lt(e), children: [
2546
+ /* @__PURE__ */ d("button", { type: "button", onClick: () => Dt(e), children: [
2548
2547
  e.name,
2549
2548
  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" })
2550
2549
  ] }),
2551
- fr && /* @__PURE__ */ r(
2550
+ gr && /* @__PURE__ */ r(
2552
2551
  "button",
2553
2552
  {
2554
2553
  type: "button",
2555
- onClick: () => Qa.mutate({ viewId: e.id, on: !e.is_default }),
2554
+ onClick: () => Ba.mutate({ viewId: e.id, on: !e.is_default }),
2556
2555
  title: e.is_default ? "Queue default — click to unset" : "Set as the default view for everyone on this queue",
2557
2556
  className: C(
2558
2557
  "shrink-0",
2559
2558
  e.is_default ? "text-nvr-cyan" : "invisible text-slate-300 hover:text-nvr-cyan group-hover:visible dark:text-slate-600"
2560
2559
  ),
2561
2560
  "aria-label": e.is_default ? "Unset queue default" : "Set queue default",
2562
- children: /* @__PURE__ */ r(Al, { className: C("h-3 w-3", e.is_default && "fill-current") })
2561
+ children: /* @__PURE__ */ r(Ol, { className: C("h-3 w-3", e.is_default && "fill-current") })
2563
2562
  }
2564
2563
  ),
2565
- (e.user === v || Kt) && it === e.id && /* @__PURE__ */ r(
2564
+ (e.user === v || Mt) && it === e.id && /* @__PURE__ */ r(
2566
2565
  "button",
2567
2566
  {
2568
2567
  type: "button",
@@ -2571,35 +2570,35 @@ function yi({
2571
2570
  title: "Update this view with the current filters, scope and sort",
2572
2571
  className: "shrink-0 text-slate-400 hover:text-nvr-navy disabled:opacity-50 dark:hover:text-nvr-cyan",
2573
2572
  "aria-label": `Update view ${e.name}`,
2574
- "data-view-update-state": qe.isPending ? "saving" : xr === e.id ? "saved" : "idle",
2575
- children: qe.isPending && ((t = qe.variables) == null ? void 0 : t.id) === e.id ? /* @__PURE__ */ r(El, { className: "h-3 w-3 animate-spin" }) : xr === e.id ? /* @__PURE__ */ r(
2576
- Ol,
2573
+ "data-view-update-state": qe.isPending ? "saving" : yr === e.id ? "saved" : "idle",
2574
+ children: qe.isPending && ((t = qe.variables) == null ? void 0 : t.id) === e.id ? /* @__PURE__ */ r(El, { className: "h-3 w-3 animate-spin" }) : yr === e.id ? /* @__PURE__ */ r(
2575
+ Ll,
2577
2576
  {
2578
2577
  className: "h-3 w-3 text-emerald-600 dark:text-emerald-400",
2579
2578
  strokeWidth: 3
2580
2579
  }
2581
- ) : /* @__PURE__ */ r(Ll, { className: "h-3 w-3" })
2580
+ ) : /* @__PURE__ */ r(Dl, { className: "h-3 w-3" })
2582
2581
  }
2583
2582
  ),
2584
2583
  it === e.id && /* @__PURE__ */ r(
2585
2584
  "button",
2586
2585
  {
2587
2586
  type: "button",
2588
- onClick: () => ha(e.id),
2589
- title: $t(e.id) ? "Subscribed to new arrivals in this view — click to unsubscribe" : "Notify me when items enter this view (checked every 5 min)",
2587
+ onClick: () => fa(e.id),
2588
+ title: qt(e.id) ? "Subscribed to new arrivals in this view — click to unsubscribe" : "Notify me when items enter this view (checked every 5 min)",
2590
2589
  className: C(
2591
2590
  "shrink-0",
2592
- $t(e.id) ? "text-nvr-cyan" : "invisible text-slate-300 hover:text-nvr-cyan group-hover:visible dark:text-slate-600"
2591
+ qt(e.id) ? "text-nvr-cyan" : "invisible text-slate-300 hover:text-nvr-cyan group-hover:visible dark:text-slate-600"
2593
2592
  ),
2594
2593
  "aria-label": `Subscribe to view ${e.name}`,
2595
- children: /* @__PURE__ */ r(Dl, { className: C("h-3 w-3", $t(e.id) && "fill-current") })
2594
+ children: /* @__PURE__ */ r(Pl, { className: C("h-3 w-3", qt(e.id) && "fill-current") })
2596
2595
  }
2597
2596
  ),
2598
2597
  e.user === v && /* @__PURE__ */ r(
2599
2598
  "button",
2600
2599
  {
2601
2600
  type: "button",
2602
- onClick: () => Ba.mutate(e.id),
2601
+ onClick: () => ja.mutate(e.id),
2603
2602
  className: "invisible text-slate-400 hover:text-red-500 group-hover:visible",
2604
2603
  "aria-label": `Delete view ${e.name}`,
2605
2604
  children: "×"
@@ -2610,7 +2609,7 @@ function yi({
2610
2609
  e.id
2611
2610
  );
2612
2611
  }),
2613
- /* @__PURE__ */ d(We, { open: Ka, onOpenChange: kn, children: [
2612
+ /* @__PURE__ */ d(We, { open: Ma, onOpenChange: vn, children: [
2614
2613
  /* @__PURE__ */ r(He, { asChild: !0, children: /* @__PURE__ */ r(
2615
2614
  "button",
2616
2615
  {
@@ -2623,13 +2622,13 @@ function yi({
2623
2622
  /* @__PURE__ */ d(Je, { className: "w-[240px] p-3", align: "end", children: [
2624
2623
  (() => {
2625
2624
  const e = V == null ? void 0 : V.data.find((t) => t.id === it);
2626
- return !e || e.user !== v && !Kt ? null : /* @__PURE__ */ d(
2625
+ return !e || e.user !== v && !Mt ? null : /* @__PURE__ */ d(
2627
2626
  "button",
2628
2627
  {
2629
2628
  type: "button",
2630
2629
  disabled: qe.isPending,
2631
2630
  onClick: () => {
2632
- qe.mutate(e), kn(!1);
2631
+ qe.mutate(e), vn(!1);
2633
2632
  },
2634
2633
  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",
2635
2634
  children: [
@@ -2643,29 +2642,29 @@ function yi({
2643
2642
  /* @__PURE__ */ r(
2644
2643
  "input",
2645
2644
  {
2646
- value: vn,
2647
- onChange: (e) => mr(e.target.value),
2645
+ value: wn,
2646
+ onChange: (e) => br(e.target.value),
2648
2647
  placeholder: "View name",
2649
2648
  className: "mb-2 w-full rounded-md border border-slate-200 px-2 py-1.5 text-[12px] focus:border-nvr-cyan focus:outline-none dark:border-border dark:bg-card"
2650
2649
  }
2651
2650
  ),
2652
2651
  /* @__PURE__ */ d("label", { className: "mb-2 flex items-center gap-2 text-[12px] text-slate-600 dark:text-slate-300", children: [
2653
2652
  /* @__PURE__ */ r(
2654
- Rn,
2653
+ Tn,
2655
2654
  {
2656
- checked: br || dt,
2655
+ checked: pr || dt,
2657
2656
  disabled: dt,
2658
- onCheckedChange: (e) => pr(e === !0)
2657
+ onCheckedChange: (e) => hr(e === !0)
2659
2658
  }
2660
2659
  ),
2661
2660
  "Share with everyone"
2662
2661
  ] }),
2663
- fr && /* @__PURE__ */ d("label", { className: "mb-2 flex items-center gap-2 text-[12px] text-slate-600 dark:text-slate-300", children: [
2662
+ gr && /* @__PURE__ */ d("label", { className: "mb-2 flex items-center gap-2 text-[12px] text-slate-600 dark:text-slate-300", children: [
2664
2663
  /* @__PURE__ */ r(
2665
- Rn,
2664
+ Tn,
2666
2665
  {
2667
2666
  checked: dt,
2668
- onCheckedChange: (e) => hr(e === !0)
2667
+ onCheckedChange: (e) => fr(e === !0)
2669
2668
  }
2670
2669
  ),
2671
2670
  "Set as queue default (everyone starts here)"
@@ -2674,8 +2673,8 @@ function yi({
2674
2673
  "button",
2675
2674
  {
2676
2675
  type: "button",
2677
- disabled: !vn.trim() || gr.isPending,
2678
- onClick: () => gr.mutate(),
2676
+ disabled: !wn.trim() || xr.isPending,
2677
+ onClick: () => xr.mutate(),
2679
2678
  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",
2680
2679
  children: "Save current view"
2681
2680
  }
@@ -2686,59 +2685,59 @@ function yi({
2686
2685
  }
2687
2686
  )
2688
2687
  ] }),
2689
- /* @__PURE__ */ r("div", { ref: Dt, className: "flex min-h-0 flex-1 flex-col overflow-y-auto px-4 pb-4 pt-3", children: A === "table" ? /* @__PURE__ */ r(ke, { children: /* @__PURE__ */ r("div", { className: "flex min-h-0 flex-1", children: /* @__PURE__ */ d(
2688
+ /* @__PURE__ */ r("div", { ref: Pt, className: "flex min-h-0 flex-1 flex-col overflow-y-auto px-4 pb-4 pt-3", children: A === "table" ? /* @__PURE__ */ r(ke, { children: /* @__PURE__ */ r("div", { className: "flex min-h-0 flex-1", children: /* @__PURE__ */ d(
2690
2689
  "div",
2691
2690
  {
2692
2691
  ref: we.rootRef,
2693
2692
  className: C(
2694
2693
  "relative min-w-0 flex-1 transition-opacity duration-200",
2695
- Hn && "pointer-events-none opacity-60"
2694
+ Jn && "pointer-events-none opacity-60"
2696
2695
  ),
2697
- "aria-busy": Hn || void 0,
2696
+ "aria-busy": Jn || void 0,
2698
2697
  children: [
2699
- Jn != null && /* @__PURE__ */ d("span", { className: "nvr-slide-up-centered absolute left-1/2 top-6 z-[6] -translate-x-1/2 rounded-full border border-slate-200 bg-white px-3 py-1.5 text-[12px] font-medium text-slate-600 shadow-lg dark:border-border dark:bg-card dark:text-slate-300", children: [
2698
+ Yn != null && /* @__PURE__ */ d("span", { className: "nvr-slide-up-centered absolute left-1/2 top-6 z-[6] -translate-x-1/2 rounded-full border border-slate-200 bg-white px-3 py-1.5 text-[12px] font-medium text-slate-600 shadow-lg dark:border-border dark:bg-card dark:text-slate-300", children: [
2700
2699
  "Still working — ",
2701
- Jn,
2700
+ Yn,
2702
2701
  "s"
2703
2702
  ] }),
2704
2703
  /* @__PURE__ */ r(
2705
- $o,
2704
+ qo,
2706
2705
  {
2707
2706
  fillHeight: !0,
2708
- enterKey: Zn.current,
2709
- density: kt,
2707
+ enterKey: er.current,
2708
+ density: vt,
2710
2709
  minBodyHeight: 360,
2711
- columns: Qt,
2710
+ columns: Bt,
2712
2711
  rows: S,
2713
2712
  rowKey: (e) => `${e.collection}:${e.item_id}`,
2714
2713
  total: (c == null ? void 0 : c.total) ?? 0,
2715
2714
  page: ve,
2716
- limit: zt,
2715
+ limit: Xt,
2717
2716
  isLoading: Ke,
2718
2717
  onPageChange: L,
2719
- onRowClick: (e) => Ot(e),
2720
- rowDragProps: (e) => Ca({ collection: e.collection, id: e.item_id }),
2718
+ onRowClick: (e) => Lt(e),
2719
+ rowDragProps: (e) => $a({ collection: e.collection, id: e.item_id }),
2721
2720
  onRowContextMenu: (e, t) => {
2722
2721
  t.preventDefault(), st({ x: t.clientX, y: t.clientY, row: e });
2723
2722
  },
2724
2723
  rowTitle: (e) => {
2725
- const t = Tt.get(D(e));
2726
- return we.titleFor(D(e)) ?? (t && !t.is_mine ? no(t) : void 0);
2724
+ const t = At.get(D(e));
2725
+ return we.titleFor(D(e)) ?? (t && !t.is_mine ? ro(t) : void 0);
2727
2726
  },
2728
- rowClassName: (e) => At === D(e) ? (
2727
+ rowClassName: (e) => Ot === D(e) ? (
2729
2728
  // Pinned sticky cells use bg-inherit — the highlight must be
2730
2729
  // OPAQUE (nvr-cyan/5-over-white equivalents) or horizontally
2731
2730
  // scrolled content bleeds through the pinned columns. Same
2732
2731
  // pair DataTable uses for selected rows when pins are active.
2733
2732
  "bg-[#f2fdff] dark:bg-[#20303a]"
2734
- ) : e.at_risk ? mo(e.at_risk_color ?? "red") : void 0,
2733
+ ) : e.at_risk ? bo(e.at_risk_color ?? "red") : void 0,
2735
2734
  emptyMessage: /* @__PURE__ */ r(
2736
- qo,
2735
+ Fo,
2737
2736
  {
2738
- icon: Pl,
2739
- title: ((Pr = c == null ? void 0 : c.empty) == null ? void 0 : Pr.reason) === "not_permitted" ? "You cannot read this queue’s records" : ((Kr = c == null ? void 0 : c.empty) == null ? void 0 : Kr.reason) === "scope_mine" ? "Nothing waiting on you" : ((Mr = c == null ? void 0 : c.empty) == null ? void 0 : Mr.reason) === "filters" ? "No records match these filters" : "Nothing in this queue",
2740
- detail: ((Qr = c == null ? void 0 : c.empty) == null ? void 0 : Qr.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." : ((Br = c == null ? void 0 : c.empty) == null ? void 0 : Br.message) ?? "Records land here when they match the queue sources — a state change or new record can appear at any moment.",
2741
- action: ((jr = c == null ? void 0 : c.empty) == null ? void 0 : jr.reason) === "filters" ? /* @__PURE__ */ d("div", { className: "flex items-center justify-center gap-2", children: [
2737
+ icon: Kl,
2738
+ title: ((Kr = c == null ? void 0 : c.empty) == null ? void 0 : Kr.reason) === "not_permitted" ? "You cannot read this queue’s records" : ((Mr = c == null ? void 0 : c.empty) == null ? void 0 : Mr.reason) === "scope_mine" ? "Nothing waiting on you" : ((Qr = c == null ? void 0 : c.empty) == null ? void 0 : Qr.reason) === "filters" ? "No records match these filters" : "Nothing in this queue",
2739
+ detail: ((Br = c == null ? void 0 : c.empty) == null ? void 0 : Br.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." : ((jr = c == null ? void 0 : c.empty) == null ? void 0 : jr.message) ?? "Records land here when they match the queue sources — a state change or new record can appear at any moment.",
2740
+ action: ((Ur = c == null ? void 0 : c.empty) == null ? void 0 : Ur.reason) === "filters" ? /* @__PURE__ */ d("div", { className: "flex items-center justify-center gap-2", children: [
2742
2741
  /* @__PURE__ */ r(
2743
2742
  "button",
2744
2743
  {
@@ -2747,7 +2746,7 @@ function yi({
2747
2746
  var t;
2748
2747
  const e = {};
2749
2748
  for (const [n, a] of Object.entries(pe.current))
2750
- (t = Oe[n.slice(6)]) != null && t.length && (e[n] = a);
2749
+ (t = Ee[n.slice(6)]) != null && t.length && (e[n] = a);
2751
2750
  M(e), L(1);
2752
2751
  },
2753
2752
  className: "h-7 rounded-md border border-slate-200 bg-white px-2.5 text-[12px] font-medium text-slate-700 hover:bg-slate-50 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-200 dark:hover:bg-slate-800",
@@ -2774,29 +2773,29 @@ function yi({
2774
2773
  onSortChange: (e) => {
2775
2774
  Ae(e), L(1);
2776
2775
  },
2777
- filterDefs: Cn,
2776
+ filterDefs: $n,
2778
2777
  filterValues: w,
2779
2778
  onFilterChange: (e, t) => {
2780
2779
  M((n) => ({ ...n, [e]: t })), L(1);
2781
2780
  },
2782
- rowGroups: Ia ?? void 0,
2781
+ rowGroups: Va ?? void 0,
2783
2782
  collapsedGroups: be,
2784
- onToggleGroup: La,
2785
- selectedIds: Zt ? Fe : void 0,
2786
- onSelectionChange: Zt ? Mt : void 0,
2783
+ onToggleGroup: Da,
2784
+ selectedIds: en ? Fe : void 0,
2785
+ onSelectionChange: en ? Qt : void 0,
2787
2786
  hideFilterRow: !0,
2788
2787
  nowrapCells: !0,
2789
- columnPins: qr,
2788
+ columnPins: Fr,
2790
2789
  onColumnPinChange: (e, t) => {
2791
- Gt((n) => {
2792
- const a = { ...n ?? qr };
2790
+ Wt((n) => {
2791
+ const a = { ...n ?? Fr };
2793
2792
  return t ? a[e] = t : delete a[e], a;
2794
2793
  });
2795
2794
  },
2796
2795
  columnFilterRow: !0,
2797
2796
  hScrollProxy: !0,
2798
2797
  footer: /* @__PURE__ */ r(
2799
- Qo,
2798
+ Bo,
2800
2799
  {
2801
2800
  collections: at,
2802
2801
  selectedIds: String(w.at_risk_rule ?? "").split(",").map((e) => Number(e)).filter((e) => Number.isFinite(e) && e > 0),
@@ -2815,36 +2814,36 @@ function yi({
2815
2814
  ]
2816
2815
  }
2817
2816
  ) }) }) : A === "kanban" ? /* @__PURE__ */ r(
2818
- zo,
2817
+ Xo,
2819
2818
  {
2820
2819
  items: S,
2821
- onCardClick: (e) => Ot(e),
2822
- onDrop: (e, t) => wa.mutate({ item: e, targetState: t }),
2820
+ onCardClick: (e) => Lt(e),
2821
+ onDrop: (e, t) => _a.mutate({ item: e, targetState: t }),
2823
2822
  onClaim: (e) => Se.mutate(e),
2824
2823
  onRelease: (e) => Me.mutate(e),
2825
2824
  swimlaneBy: ze,
2826
- stateLabels: fn,
2825
+ stateLabels: gn,
2827
2826
  laneLabel: ze === "collection" ? lt : void 0,
2828
2827
  claimsEnabled: oe,
2829
2828
  onDraggingChange: (e) => {
2830
- Dn.current = e;
2829
+ Pn.current = e;
2831
2830
  }
2832
2831
  }
2833
- ) : /* @__PURE__ */ r(Zo, { queueId: l }) }),
2834
- Zt && /* @__PURE__ */ d(
2835
- Jo,
2832
+ ) : /* @__PURE__ */ r(es, { queueId: l }) }),
2833
+ en && /* @__PURE__ */ d(
2834
+ Yo,
2836
2835
  {
2837
2836
  count: Fe.length,
2838
2837
  claimsEnabled: oe,
2839
- showClaim: en("claim"),
2840
- showRelease: en("release"),
2841
- showTransition: en("transition"),
2842
- states: dr((c == null ? void 0 : c.available_values.state) ?? []).map((e) => ({
2838
+ showClaim: tn("claim"),
2839
+ showRelease: tn("release"),
2840
+ showTransition: tn("transition"),
2841
+ states: ur((c == null ? void 0 : c.available_values.state) ?? []).map((e) => ({
2843
2842
  value: e,
2844
2843
  label: Ce(e)
2845
2844
  })),
2846
- busy: kr,
2847
- onClaim: () => wn(
2845
+ busy: vr,
2846
+ onClaim: () => _n(
2848
2847
  "Claim",
2849
2848
  (e) => p.request(
2850
2849
  ne(`/queues/${l}/claim`, {
@@ -2853,7 +2852,7 @@ function yi({
2853
2852
  })
2854
2853
  )
2855
2854
  ),
2856
- onRelease: () => wn(
2855
+ onRelease: () => _n(
2857
2856
  "Release",
2858
2857
  (e) => p.request(
2859
2858
  ne(`/queues/${l}/release`, {
@@ -2862,34 +2861,34 @@ function yi({
2862
2861
  })
2863
2862
  )
2864
2863
  ),
2865
- onTransition: (e) => wn("Transition", (t) => Yn(t, e)),
2866
- onClear: () => Mt([]),
2864
+ onTransition: (e) => _n("Transition", (t) => zn(t, e)),
2865
+ onClear: () => Qt([]),
2867
2866
  children: [
2868
2867
  Fe.length >= 2 && /* @__PURE__ */ r(
2869
2868
  "button",
2870
2869
  {
2871
2870
  type: "button",
2872
2871
  onClick: () => {
2873
- const e = ao(
2874
- S.filter((t) => Fe.includes(D(t)) && t.collection !== "tasks").map((t) => W.urlFor(yn(t)))
2872
+ const e = lo(
2873
+ S.filter((t) => Fe.includes(D(t)) && t.collection !== "tasks").map((t) => W.urlFor(kn(t)))
2875
2874
  );
2876
- e.blocked > 0 || e.capped > 0 ? T.warning(Yr(e)) : T.success(Yr(e));
2875
+ e.blocked > 0 || e.capped > 0 ? T.warning(zr(e)) : T.success(zr(e));
2877
2876
  },
2878
2877
  "data-bulk-open-tabs": !0,
2879
- title: `Open the selected records in new tabs (up to ${ro})`,
2878
+ title: `Open the selected records in new tabs (up to ${ao})`,
2880
2879
  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",
2881
2880
  children: "Open in tabs"
2882
2881
  }
2883
2882
  ),
2884
2883
  /* @__PURE__ */ r(
2885
- No,
2884
+ So,
2886
2885
  {
2887
2886
  targets: S.filter((e) => Fe.includes(D(e)) && e.collection !== "tasks").map((e) => ({ collection: e.collection, id: e.item_id, label: e.label })),
2888
2887
  enabledKeys: (u == null ? void 0 : u.bulk_action_keys) ?? null,
2889
2888
  tone: "light",
2890
- disabled: kr,
2889
+ disabled: vr,
2891
2890
  onDone: (e) => {
2892
- e.failed === 0 && Mt([]), h.invalidateQueries({ queryKey: ["queue-items", l] });
2891
+ e.failed === 0 && Qt([]), h.invalidateQueries({ queryKey: ["queue-items", l] });
2893
2892
  }
2894
2893
  }
2895
2894
  )
@@ -2897,7 +2896,7 @@ function yi({
2897
2896
  }
2898
2897
  ),
2899
2898
  X != null && X.length ? /* @__PURE__ */ r(
2900
- Mo,
2899
+ Qo,
2901
2900
  {
2902
2901
  collection: X[0].collection,
2903
2902
  itemId: X[0].itemId,
@@ -2911,7 +2910,7 @@ function yi({
2911
2910
  onClose: () => mt.back(X.length)
2912
2911
  }
2913
2912
  ) : null,
2914
- P && Wr(
2913
+ P && Hr(
2915
2914
  /* @__PURE__ */ d(
2916
2915
  "div",
2917
2916
  {
@@ -2926,14 +2925,14 @@ function yi({
2926
2925
  "data-queue-row-menu": !0,
2927
2926
  children: [
2928
2927
  [
2929
- { label: "Open", run: () => Ot(P.row) },
2928
+ { label: "Open", run: () => Lt(P.row) },
2930
2929
  {
2931
2930
  label: "Open full record",
2932
2931
  run: () => ot(P.row)
2933
2932
  },
2934
2933
  { label: "Peek", run: () => $e(P.row) },
2935
2934
  ...oe ? [
2936
- ((Ur = P.row.claimed_by) == null ? void 0 : Ur.id) === v ? { label: "Release claim", run: () => Me.mutate(P.row) } : { label: "Claim", run: () => Se.mutate(P.row) }
2935
+ ((Ir = P.row.claimed_by) == null ? void 0 : Ir.id) === v ? { label: "Release claim", run: () => Me.mutate(P.row) } : { label: "Claim", run: () => Se.mutate(P.row) }
2937
2936
  ] : [],
2938
2937
  {
2939
2938
  label: "Copy ID",
@@ -2947,14 +2946,14 @@ function yi({
2947
2946
  run: () => {
2948
2947
  var e;
2949
2948
  return void ((e = navigator.clipboard) == null ? void 0 : e.writeText(
2950
- `${window.location.origin}${W.urlFor(yn(P.row))}`
2949
+ `${window.location.origin}${W.urlFor(kn(P.row))}`
2951
2950
  ));
2952
2951
  }
2953
2952
  },
2954
2953
  // Custom actions (#125): the record's registered actions, right here.
2955
- ...ga(P.row.collection).map((e) => ({
2954
+ ...xa(P.row.collection).map((e) => ({
2956
2955
  label: e.label,
2957
- run: () => xa(e, P.row)
2956
+ run: () => ya(e, P.row)
2958
2957
  }))
2959
2958
  ].map((e) => /* @__PURE__ */ r(
2960
2959
  "button",
@@ -2970,14 +2969,14 @@ function yi({
2970
2969
  )),
2971
2970
  P.row.collection !== "tasks" && /* @__PURE__ */ d("div", { className: "mt-1 border-t border-slate-100 pt-1 dark:border-border/60", children: [
2972
2971
  /* @__PURE__ */ r("p", { className: "px-3 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-slate-400", children: "Triage labels" }),
2973
- an.slice(0, 8).map((e) => {
2972
+ ln.slice(0, 8).map((e) => {
2974
2973
  const t = (P.row.labels ?? []).includes(e);
2975
2974
  return /* @__PURE__ */ d(
2976
2975
  "button",
2977
2976
  {
2978
2977
  type: "button",
2979
2978
  onClick: () => {
2980
- Gn(P.row, e), st(null);
2979
+ Wn(P.row, e), st(null);
2981
2980
  },
2982
2981
  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",
2983
2982
  children: [
@@ -3001,7 +3000,7 @@ function yi({
3001
3000
  const n = e.target.elements.namedItem(
3002
3001
  "newlabel"
3003
3002
  ).value.trim();
3004
- n && (Gn(P.row, n), st(null));
3003
+ n && (Wn(P.row, n), st(null));
3005
3004
  },
3006
3005
  className: "px-3 py-1",
3007
3006
  children: /* @__PURE__ */ r(
@@ -3022,52 +3021,52 @@ function yi({
3022
3021
  ),
3023
3022
  document.body
3024
3023
  ),
3025
- Vn && Wr(
3024
+ Gn && Hr(
3026
3025
  /* @__PURE__ */ r(
3027
- cs,
3026
+ ds,
3028
3027
  {
3029
3028
  queueId: l,
3030
- drill: Vn,
3031
- onClose: () => nn(null),
3029
+ drill: Gn,
3030
+ onClose: () => rn(null),
3032
3031
  onOpenRecord: (e, t) => {
3033
- nn(null), W.open({ collection: e, itemId: t, layoutSlug: null });
3032
+ rn(null), W.open({ collection: e, itemId: t, layoutSlug: null });
3034
3033
  }
3035
3034
  }
3036
3035
  ),
3037
3036
  document.body
3038
3037
  ),
3039
3038
  /* @__PURE__ */ r(
3040
- Yo,
3039
+ zo,
3041
3040
  {
3042
3041
  item: ge,
3043
- stateLabels: fn,
3042
+ stateLabels: gn,
3044
3043
  collectionLabel: lt,
3045
3044
  claimsEnabled: oe,
3046
- columnFormats: Wa,
3045
+ columnFormats: Ha,
3047
3046
  width: u == null ? void 0 : u.sheet_width,
3048
3047
  itemLayout: u == null ? void 0 : u.item_layout,
3049
3048
  onOpenChange: (e) => {
3050
- e || ($e(null), xn(!1));
3049
+ e || ($e(null), yn(!1));
3051
3050
  },
3052
3051
  onClaim: (e) => Se.mutate(e),
3053
3052
  onRelease: (e) => Me.mutate(e),
3054
- workNextActive: Da,
3055
- onNext: () => ge && ur(ge),
3053
+ workNextActive: Pa,
3054
+ onNext: () => ge && mr(ge),
3056
3055
  refetchItems: () => h.invalidateQueries({ queryKey: ["queue-items", l] })
3057
3056
  }
3058
3057
  )
3059
3058
  ] });
3060
3059
  }
3061
- function cs({
3060
+ function ds({
3062
3061
  queueId: l,
3063
3062
  drill: f,
3064
3063
  onClose: $,
3065
- onOpenRecord: O
3064
+ onOpenRecord: E
3066
3065
  }) {
3067
- const U = ea(), { data: h, isLoading: p } = H({
3066
+ const U = ta(), { data: h, isLoading: p } = H({
3068
3067
  queryKey: ["queue-agg-rows", l, f.row.collection, f.row.item_id, f.path],
3069
3068
  queryFn: () => U.request(
3070
- E(`/queues/${l}/aggregate-rows`, {
3069
+ O(`/queues/${l}/aggregate-rows`, {
3071
3070
  collection: f.row.collection,
3072
3071
  item_id: f.row.item_id,
3073
3072
  path: f.path
@@ -3089,7 +3088,7 @@ function cs({
3089
3088
  /* @__PURE__ */ d("div", { children: [
3090
3089
  /* @__PURE__ */ r("p", { className: "text-[13px] font-semibold", children: f.row.label }),
3091
3090
  /* @__PURE__ */ d("p", { className: "text-[11.5px] text-muted-foreground", children: [
3092
- yt(f.path),
3091
+ kt(f.path),
3093
3092
  " = ",
3094
3093
  /* @__PURE__ */ r("span", { className: "tabular-nums", children: f.value }),
3095
3094
  " ",
@@ -3111,7 +3110,7 @@ function cs({
3111
3110
  "button",
3112
3111
  {
3113
3112
  type: "button",
3114
- onClick: () => h.target && O(h.target, String(v.id)),
3113
+ onClick: () => h.target && E(h.target, String(v.id)),
3115
3114
  className: "min-w-0 truncate text-left text-[12.5px] underline decoration-dotted underline-offset-2 hover:text-nvr-navy dark:hover:text-nvr-cyan",
3116
3115
  children: v.label
3117
3116
  }
@@ -3125,5 +3124,5 @@ function cs({
3125
3124
  );
3126
3125
  }
3127
3126
  export {
3128
- yi as QueueWorklist
3127
+ vi as QueueWorklist
3129
3128
  };