@nivaro/react 0.3.52 → 0.3.54

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 (41) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +47 -3
  4. package/dist/shared/components/ItemEditForm.js +4196 -4163
  5. package/dist/shared/components/NotificationBell.js +163 -150
  6. package/dist/shared/components/PageRenderer.js +645 -593
  7. package/dist/shared/components/ProfileView.js +36 -34
  8. package/dist/shared/components/QueryStatStrip.js +96 -89
  9. package/dist/shared/components/QueryTable.js +214 -215
  10. package/dist/shared/components/ReportView.js +548 -529
  11. package/dist/shared/components/alerts/AlertManagerView.js +346 -320
  12. package/dist/shared/components/item-edit/CatalogPickerField.js +1300 -1219
  13. package/dist/shared/components/item-edit/DraftRecoveryBanner.js +52 -54
  14. package/dist/shared/components/item-edit/FieldAffordances.js +145 -136
  15. package/dist/shared/components/item-edit/FieldRenderer.js +366 -326
  16. package/dist/shared/components/item-edit/InlineTableField.js +3047 -2932
  17. package/dist/shared/components/item-edit/NestedRelationEditor.js +149 -143
  18. package/dist/shared/components/item-edit/PersonalDefaultControl.js +12 -11
  19. package/dist/shared/components/item-edit/PlanGrid.js +718 -705
  20. package/dist/shared/components/item-edit/RelationCombobox.js +23 -20
  21. package/dist/shared/components/item-edit/SummaryPanel.js +415 -361
  22. package/dist/shared/components/item-edit/line-qty.js +115 -53
  23. package/dist/shared/components/item-edit/save-outcome.js +48 -0
  24. package/dist/shared/components/item-edit/save-refusal.js +18 -18
  25. package/dist/shared/components/item-edit/stale-banner.js +13 -0
  26. package/dist/shared/components/item-edit/usePersonalDefaults.js +225 -220
  27. package/dist/shared/components/panels/CommentPanel.js +204 -197
  28. package/dist/shared/components/panels/ItemLockBanner.js +318 -291
  29. package/dist/shared/components/panels/PipelinePanel.js +1388 -1218
  30. package/dist/shared/components/panels/RecordIntegrityBanner.js +201 -172
  31. package/dist/shared/components/panels/RevisionsPanel.js +101 -106
  32. package/dist/shared/components/panels/TransitionRequirementsDialog.js +564 -534
  33. package/dist/shared/components/panels/requirement-side-effects.js +46 -29
  34. package/dist/shared/components/queue/QueueItemSheet.js +219 -146
  35. package/dist/shared/components/queue/QueueWorklist.js +738 -730
  36. package/dist/shared/components/widgets/ReviewListWidget.js +236 -201
  37. package/dist/shared/lib/activity-sentence.js +236 -227
  38. package/dist/shared/lib/draft-store.js +35 -29
  39. package/dist/shared/lib/page-widget-access.js +11 -0
  40. package/dist/shared/lib/record-ref.js +43 -34
  41. package/package.json +1 -1
@@ -1,83 +1,84 @@
1
1
  import { jsxs as d, Fragment as Ce, jsx as a } from "react/jsx-runtime";
2
- import { useSensors as zl, useSensor as Xl, PointerSensor as Zl, DndContext as eo, closestCenter as to } from "@dnd-kit/core";
3
- import { SortableContext as no, verticalListSortingStrategy as ro, arrayMove as ao, useSortable as lo } from "@dnd-kit/sortable";
4
- import { CSS as oo } from "@dnd-kit/utilities";
5
- import { useQueryClient as so, useQuery as W, useMutation as Se, useQueries as Be } from "@tanstack/react-query";
6
- import { AlertTriangle as io, FileDiff as co, RefreshCw as uo, Rows3 as xa, Flame as mo, Sparkles as po, BarChart3 as bo, SlidersHorizontal as ho, ListChecks as fo, Rows4 as go, Rows2 as xo, Play as yo, Plus as zt, ChevronDown as ya, Star as ko, Pin as vo, Loader2 as wo, Check as _o, Save as No, Bell as So, Inbox as Co, GripVertical as $o } from "lucide-react";
2
+ import { useSensors as no, useSensor as ro, PointerSensor as ao, DndContext as lo, closestCenter as oo } from "@dnd-kit/core";
3
+ import { SortableContext as so, verticalListSortingStrategy as io, arrayMove as co, useSortable as uo } from "@dnd-kit/sortable";
4
+ import { CSS as mo } from "@dnd-kit/utilities";
5
+ import { useQueryClient as po, useQuery as W, useMutation as Se, useQueries as Be } from "@tanstack/react-query";
6
+ import { AlertTriangle as bo, FileDiff as ho, RefreshCw as fo, Rows3 as wa, Flame as go, Sparkles as xo, BarChart3 as yo, SlidersHorizontal as ko, ListChecks as vo, Rows4 as wo, Rows2 as _o, Play as No, Plus as Zt, ChevronDown as _a, Star as So, Pin as Co, Loader2 as $o, Check as qo, Save as Fo, Bell as To, Inbox as Ro, GripVertical as Eo } from "lucide-react";
7
7
  import { useState as w, useRef as U, useEffect as M, useMemo as V } from "react";
8
- import { createPortal as ka } from "react-dom";
8
+ import { createPortal as Na } from "react-dom";
9
9
  import { toast as D } from "sonner";
10
- import { useNivaroClient as $a, useItemEditAuth as va, useItemNavigation as qo, useNavigation as Fo, useOverlayState as To } from "../../context.js";
11
- import { useDebounced as Ro } from "../../hooks/useDebounced.js";
12
- import { useElapsedLoading as Eo } from "../../hooks/useElapsedLoading.js";
13
- import { useSlowReason as Ao } from "../../hooks/useSlowReason.js";
14
- import { useBulkProgressFeed as Lo } from "../../lib/bulk-progress.js";
15
- import { get as A, post as se, patch as wa, del as Mn, put as Oo } from "../../lib/commands.js";
16
- import { evaluateExpression as Do } from "../../lib/expression.js";
17
- import { clauseFromControlValue as Ko, filterSentence as Po } from "../../lib/filter-sentence.js";
18
- import { deliverLive as Mo, releaseLiveOwner as Qo } from "../../lib/focus-mode.js";
19
- import { formatMultiValue as tt, formatValue as Bo } from "../../lib/format-value.js";
20
- import { createCursorBook as jo, pageRequest as Uo, noteNextCursor as Io } from "../../lib/keyset-pager.js";
21
- import { normalizeInlineEdit as Vo, inlineM2oTarget as Go, inlineChoices as Wo, inlineEditFor as Ho, nextInlineKey as Yo } from "../../lib/list-inline-edit.js";
22
- import { sanitizeQueueLinkState as Jo, readListLinkFromLocation as zo, dropListLinkParam as Xo } from "../../lib/list-link.js";
23
- import { expandCoalesced as Zo, LIVE_ASPECTS as Ct } from "../../lib/live.js";
24
- import { useRowChanges as es, useRowLocksByCollection as ts, lockLabel as ns } from "../../lib/live-list.js";
25
- import { OPEN_IN_TABS_CAP as rs, openInTabs as as, openInTabsMessage as _a } from "../../lib/open-in-tabs.js";
26
- import { isOwnWrite as ls } from "../../lib/own-writes.js";
27
- import { usePrefetchIntent as os } from "../../lib/prefetch.js";
28
- import { useRowPresence as ss, rowPresenceKey as is } from "../../lib/presence-hooks.js";
29
- import { buildGroups as cs } from "../../lib/queue-grouping.js";
30
- import { cascadeFilter as ds, fetchCascadeRelations as us } from "../../lib/quick-filter-cascade.js";
31
- import { useOptionalRealtime as ms } from "../../lib/realtime.js";
32
- import { rowHighlightTextClass as ps, rowHighlightClass as bs } from "../../lib/row-highlight.js";
33
- import { userErrorMessage as $t } from "../../lib/safe-error.js";
34
- import { useMyScopes as hs, matchScopeDimension as fs, effectiveScopeSeedIds as gs } from "../../lib/use-my-scopes.js";
35
- import { useNewItemLayouts as xs } from "../../lib/use-new-item-layouts.js";
36
- import { formatNumber as ie, cn as R, titleCase as Qn, humanHours as ys, formatRelative as ks, formatDateTime as vs, formatDate as ws } from "../../lib/utils.js";
37
- import { usePublishAskContext as _s, useAskRecordDrag as Ns } from "../ai/ask-context.js";
38
- import { useBuiltinGate as Ss, BulkActionButtons as Cs } from "../bulk/BulkActionButtons.js";
39
- import { BulkRowMark as $s } from "../bulk/BulkRowMark.js";
40
- import { RowActionsMenu as qs, roleMayUpdate as Fs } from "../CollectionBrowserView.js";
41
- import { DataTable as Ts } from "../DataTable.js";
42
- import { EmptyState as Rs } from "../EmptyState.js";
43
- import { FocusModeToggle as Es } from "../FocusModeToggle.js";
44
- import { FulfilmentPill as As, FULFILMENT_FILTER_OPTIONS as Ls } from "../FulfilmentPill.js";
45
- import { ImportFromFileButton as Os } from "../import/ImportFromFileButton.js";
46
- import { IntegrationDots as Ds, INTEGRATIONS_FILTER_OPTIONS as Ks } from "../integrations/IntegrationDots.js";
47
- import { IntegrationsFilterPill as Ps } from "../integrations/IntegrationsFilterPill.js";
48
- import { readQueueReturn as Ms, writeQueueReturn as Na } from "../item-edit/QueueReturnChip.js";
49
- import { ListLoadError as Qs } from "../ListLoadError.js";
50
- import { LiveRowMark as Bs } from "../LiveRowMark.js";
51
- import { CopyListLinkButton as js } from "../list/CopyListLinkButton.js";
52
- import { useInlineEdit as Us, InlineEditCell as Is } from "../list/InlineEdit.js";
53
- import { usePickerExcludedRows as Vs, PICKER_EXCLUDED_ROW_CLASS as Gs, PICKER_EXCLUDED_TITLE as Ws } from "../PickerExcludedRows.js";
54
- import { RealtimeStaleMark as Hs } from "../RealtimeStatusBanner.js";
55
- import { RecordDrilldownSheet as Ys } from "../RecordDrilldownSheet.js";
56
- import { RowHighlightLegend as Js } from "../RowHighlightLegend.js";
57
- import { RowPresence as zs } from "../RowPresence.js";
58
- import { TickerNumber as Bn } from "../TickerNumber.js";
59
- import { UnseenDot as Xs } from "../UnseenDot.js";
60
- import { Badge as Zs } from "../ui/badge.js";
61
- import { Checkbox as jn } from "../ui/checkbox.js";
62
- import { Command as Sa, CommandInput as ei, CommandList as Ca, CommandEmpty as ti, CommandItem as qt } from "../ui/command.js";
63
- import { Label as ni } from "../ui/label.js";
10
+ import { useNivaroClient as Ea, useItemEditAuth as Sa, useItemNavigation as Ao, useNavigation as Lo, useOverlayState as Oo } from "../../context.js";
11
+ import { useDebounced as Do } from "../../hooks/useDebounced.js";
12
+ import { useElapsedLoading as Ko } from "../../hooks/useElapsedLoading.js";
13
+ import { useSlowReason as Po } from "../../hooks/useSlowReason.js";
14
+ import { useBulkProgressFeed as Mo } from "../../lib/bulk-progress.js";
15
+ import { get as A, post as se, patch as Ca, del as jn, put as Qo } from "../../lib/commands.js";
16
+ import { evaluateExpression as Bo } from "../../lib/expression.js";
17
+ import { clauseFromControlValue as jo, filterSentence as Uo } from "../../lib/filter-sentence.js";
18
+ import { deliverLive as Io, releaseLiveOwner as Vo } from "../../lib/focus-mode.js";
19
+ import { formatMultiValue as tt, formatValue as Go } from "../../lib/format-value.js";
20
+ import { createCursorBook as Wo, pageRequest as Ho, noteNextCursor as Yo } from "../../lib/keyset-pager.js";
21
+ import { normalizeInlineEdit as Jo, inlineM2oTarget as zo, inlineChoices as Xo, inlineEditFor as Zo, nextInlineKey as es } from "../../lib/list-inline-edit.js";
22
+ import { sanitizeQueueLinkState as ts, readListLinkFromLocation as ns, dropListLinkParam as rs } from "../../lib/list-link.js";
23
+ import { expandCoalesced as as, LIVE_ASPECTS as $t } from "../../lib/live.js";
24
+ import { useRowChanges as ls, useRowLocksByCollection as os, lockLabel as ss } from "../../lib/live-list.js";
25
+ import { OPEN_IN_TABS_CAP as is, openInTabs as cs, openInTabsMessage as $a } from "../../lib/open-in-tabs.js";
26
+ import { isOwnWrite as ds } from "../../lib/own-writes.js";
27
+ import { usePrefetchIntent as us } from "../../lib/prefetch.js";
28
+ import { useRowPresence as ms, rowPresenceKey as ps } from "../../lib/presence-hooks.js";
29
+ import { buildGroups as bs } from "../../lib/queue-grouping.js";
30
+ import { cascadeFilter as hs, fetchCascadeRelations as fs } from "../../lib/quick-filter-cascade.js";
31
+ import { useOptionalRealtime as gs } from "../../lib/realtime.js";
32
+ import { copyIdText as qa } from "../../lib/record-ref.js";
33
+ import { rowHighlightTextClass as xs, rowHighlightClass as ys } from "../../lib/row-highlight.js";
34
+ import { userErrorMessage as qt } from "../../lib/safe-error.js";
35
+ import { useMyScopes as ks, matchScopeDimension as vs, effectiveScopeSeedIds as ws } from "../../lib/use-my-scopes.js";
36
+ import { useNewItemLayouts as _s } from "../../lib/use-new-item-layouts.js";
37
+ import { formatNumber as ie, cn as R, titleCase as Un, humanHours as Ns, formatRelative as Ss, formatDateTime as Cs, formatDate as $s } from "../../lib/utils.js";
38
+ import { usePublishAskContext as qs, useAskRecordDrag as Fs } from "../ai/ask-context.js";
39
+ import { useBuiltinGate as Ts, BulkActionButtons as Rs } from "../bulk/BulkActionButtons.js";
40
+ import { BulkRowMark as Es } from "../bulk/BulkRowMark.js";
41
+ import { RowActionsMenu as As, roleMayUpdate as Ls } from "../CollectionBrowserView.js";
42
+ import { DataTable as Os } from "../DataTable.js";
43
+ import { EmptyState as Ds } from "../EmptyState.js";
44
+ import { FocusModeToggle as Ks } from "../FocusModeToggle.js";
45
+ import { FulfilmentPill as Ps, FULFILMENT_FILTER_OPTIONS as Ms } from "../FulfilmentPill.js";
46
+ import { ImportFromFileButton as Qs } from "../import/ImportFromFileButton.js";
47
+ import { IntegrationDots as Bs, INTEGRATIONS_FILTER_OPTIONS as js } from "../integrations/IntegrationDots.js";
48
+ import { IntegrationsFilterPill as Us } from "../integrations/IntegrationsFilterPill.js";
49
+ import { readQueueReturn as Is, writeQueueReturn as Fa } from "../item-edit/QueueReturnChip.js";
50
+ import { ListLoadError as Vs } from "../ListLoadError.js";
51
+ import { LiveRowMark as Gs } from "../LiveRowMark.js";
52
+ import { CopyListLinkButton as Ws } from "../list/CopyListLinkButton.js";
53
+ import { useInlineEdit as Hs, InlineEditCell as Ys } from "../list/InlineEdit.js";
54
+ import { usePickerExcludedRows as Js, PICKER_EXCLUDED_ROW_CLASS as zs, PICKER_EXCLUDED_TITLE as Xs } from "../PickerExcludedRows.js";
55
+ import { RealtimeStaleMark as Zs } from "../RealtimeStatusBanner.js";
56
+ import { RecordDrilldownSheet as ei } from "../RecordDrilldownSheet.js";
57
+ import { RowHighlightLegend as ti } from "../RowHighlightLegend.js";
58
+ import { RowPresence as ni } from "../RowPresence.js";
59
+ import { TickerNumber as In } from "../TickerNumber.js";
60
+ import { UnseenDot as ri } from "../UnseenDot.js";
61
+ import { Badge as ai } from "../ui/badge.js";
62
+ import { Checkbox as Vn } from "../ui/checkbox.js";
63
+ import { Command as Ta, CommandInput as li, CommandList as Ra, CommandEmpty as oi, CommandItem as Ft } from "../ui/command.js";
64
+ import { Label as si } from "../ui/label.js";
64
65
  import { Popover as nt, PopoverTrigger as rt, PopoverContent as at } from "../ui/popover.js";
65
- import { Skeleton as ri } from "../ui/skeleton.js";
66
- import { dedupeChooserKeys as ai } from "./column-chooser.js";
67
- import { stateAspectEffect as li } from "./live-state-aspect.js";
68
- import { OwnerAvatars as oi } from "./OwnerAvatars.js";
69
- import { QueueBulkBar as si } from "./QueueBulkBar.js";
70
- import { QueueItemSheet as ii } from "./QueueItemSheet.js";
71
- import { QueueKanbanBoard as ci } from "./QueueKanbanBoard.js";
72
- import { QueueQuickFilters as di } from "./QueueQuickFilters.js";
73
- import { QueueWorkloadView as ui } from "./QueueWorkloadView.js";
74
- import { useTransitionNote as mi, needsTransitionNote as pi } from "./transition-note.js";
75
- function bi({ summary: l }) {
66
+ import { Skeleton as ii } from "../ui/skeleton.js";
67
+ import { dedupeChooserKeys as ci } from "./column-chooser.js";
68
+ import { stateAspectEffect as di } from "./live-state-aspect.js";
69
+ import { OwnerAvatars as ui } from "./OwnerAvatars.js";
70
+ import { QueueBulkBar as mi } from "./QueueBulkBar.js";
71
+ import { QueueItemSheet as pi } from "./QueueItemSheet.js";
72
+ import { QueueKanbanBoard as bi } from "./QueueKanbanBoard.js";
73
+ import { QueueQuickFilters as hi } from "./QueueQuickFilters.js";
74
+ import { QueueWorkloadView as fi } from "./QueueWorkloadView.js";
75
+ import { useTransitionNote as gi, needsTransitionNote as xi } from "./transition-note.js";
76
+ function yi({ summary: l }) {
76
77
  if (!l || l.count === 0)
77
78
  return /* @__PURE__ */ a("span", { className: "text-slate-300 dark:text-muted-foreground", children: "—" });
78
79
  const y = [l.last_from, l.last_to].filter(Boolean).join(" → "), L = [
79
80
  y ? `Last: ${y}` : null,
80
- l.last_at ? ks(l.last_at) : null,
81
+ l.last_at ? Ss(l.last_at) : null,
81
82
  l.last_reason ? `“${l.last_reason}”` : "no reason given"
82
83
  ].filter(Boolean).join(" · ");
83
84
  return /* @__PURE__ */ d(
@@ -99,13 +100,13 @@ function bi({ summary: l }) {
99
100
  }
100
101
  );
101
102
  }
102
- const hi = 50, Xt = "nivaro_addendums", fi = [
103
+ const ki = 50, en = "nivaro_addendums", vi = [
103
104
  { value: "mine", label: "My Items" },
104
105
  { value: "unowned", label: "No Owners" },
105
106
  { value: "claimed", label: "Claimed by me" },
106
107
  { value: "all", label: "All Items" }
107
108
  ];
108
- function gi({ summary: l }) {
109
+ function wi({ summary: l }) {
109
110
  if (!l || l.total === 0) return /* @__PURE__ */ a("span", { className: "text-slate-300", children: "—" });
110
111
  const y = l.active > 0, L = l.latest_status === "review" ? "in review" : l.latest_status ?? "active", P = l.cost_impact, G = P != null && P !== 0 ? `${P > 0 ? "+" : "−"}$${Math.abs(P).toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : null;
111
112
  return /* @__PURE__ */ d(
@@ -136,13 +137,13 @@ function gi({ summary: l }) {
136
137
  }
137
138
  );
138
139
  }
139
- function xi(l) {
140
- return ys(l);
140
+ function _i(l) {
141
+ return Ns(l);
141
142
  }
142
- function yi({ status: l }) {
143
+ function Ni({ status: l }) {
143
144
  return l ? /* @__PURE__ */ a("span", { className: R("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__ */ a("span", { className: "text-slate-300", children: "—" });
144
145
  }
145
- function ki({ points: l, inline: y = !1 }) {
146
+ function Si({ points: l, inline: y = !1 }) {
146
147
  if (l.length < 2) return null;
147
148
  const L = y ? 40 : 64, P = y ? 14 : 18, G = Math.max(...l), f = Math.min(...l), h = G - f || 1, S = L / (l.length - 1), H = l.map(
148
149
  (xe, g) => `${g === 0 ? "M" : "L"}${(g * S).toFixed(1)},${(P - 2 - (xe - f) / h * (P - 4)).toFixed(1)}`
@@ -158,7 +159,7 @@ function ki({ points: l, inline: y = !1 }) {
158
159
  }
159
160
  );
160
161
  }
161
- function Ft({
162
+ function Tt({
162
163
  label: l,
163
164
  count: y,
164
165
  filteredCount: L,
@@ -180,14 +181,14 @@ function Ft({
180
181
  P && "bg-nvr-cyan/5 ring-1 ring-inset ring-nvr-cyan dark:bg-nvr-cyan/10",
181
182
  !P && !G && y === 0 && "opacity-50"
182
183
  ),
183
- children: G ? /* @__PURE__ */ a(ri, { className: "h-5 w-16 rounded" }) : /* @__PURE__ */ d(Ce, { children: [
184
+ children: G ? /* @__PURE__ */ a(ii, { className: "h-5 w-16 rounded" }) : /* @__PURE__ */ d(Ce, { children: [
184
185
  /* @__PURE__ */ a("span", { className: "flex items-baseline gap-1 text-[15px] font-semibold leading-none tabular-nums text-slate-900 dark:text-foreground", children: L != null ? /* @__PURE__ */ d(Ce, { children: [
185
- /* @__PURE__ */ a("span", { className: "text-nvr-navy dark:text-nvr-cyan", children: /* @__PURE__ */ a(Bn, { value: L, format: ie }) }),
186
+ /* @__PURE__ */ a("span", { className: "text-nvr-navy dark:text-nvr-cyan", children: /* @__PURE__ */ a(In, { value: L, format: ie }) }),
186
187
  /* @__PURE__ */ d("span", { className: "text-[11px] font-medium text-slate-400", children: [
187
188
  "/ ",
188
- /* @__PURE__ */ a(Bn, { value: y, format: ie })
189
+ /* @__PURE__ */ a(In, { value: y, format: ie })
189
190
  ] })
190
- ] }) : /* @__PURE__ */ a(Bn, { value: y, format: ie }) }),
191
+ ] }) : /* @__PURE__ */ a(In, { value: y, format: ie }) }),
191
192
  /* @__PURE__ */ a(
192
193
  "span",
193
194
  {
@@ -211,12 +212,12 @@ function Ft({
211
212
  ]
212
213
  }
213
214
  ),
214
- h && y > 0 && /* @__PURE__ */ a(ki, { points: h, inline: !0 })
215
+ h && y > 0 && /* @__PURE__ */ a(Si, { points: h, inline: !0 })
215
216
  ] })
216
217
  }
217
218
  );
218
219
  }
219
- function vi({
220
+ function Ci({
220
221
  label: l,
221
222
  count: y,
222
223
  filteredCount: L,
@@ -256,16 +257,16 @@ function vi({
256
257
  function lt(l) {
257
258
  return l.split(".").map((y) => y.replace(/_/g, " ").replace(/\b\w/g, (L) => L.toUpperCase())).join(" → ");
258
259
  }
259
- function wi({
260
+ function $i({
260
261
  id: l,
261
262
  label: y,
262
263
  checked: L,
263
264
  onCheckedChange: P
264
265
  }) {
265
- const { attributes: G, listeners: f, setNodeRef: h, transform: S, transition: H, isDragging: xe } = lo({
266
+ const { attributes: G, listeners: f, setNodeRef: h, transform: S, transition: H, isDragging: xe } = uo({
266
267
  id: l
267
268
  }), g = {
268
- transform: oo.Transform.toString(S),
269
+ transform: mo.Transform.toString(S),
269
270
  transition: H,
270
271
  opacity: xe ? 0.4 : 1
271
272
  }, Y = `col-toggle-${l}`;
@@ -276,42 +277,42 @@ function wi({
276
277
  ...G,
277
278
  ...f,
278
279
  className: "cursor-grab text-slate-300 hover:text-slate-500 dark:text-muted-foreground",
279
- children: /* @__PURE__ */ a($o, { className: "h-3.5 w-3.5" })
280
+ children: /* @__PURE__ */ a(Eo, { className: "h-3.5 w-3.5" })
280
281
  }
281
282
  ),
282
- /* @__PURE__ */ a(jn, { id: Y, checked: L, onCheckedChange: P }),
283
- /* @__PURE__ */ a(ni, { htmlFor: Y, className: "cursor-pointer text-[12px] font-normal", children: y })
283
+ /* @__PURE__ */ a(Vn, { id: Y, checked: L, onCheckedChange: P }),
284
+ /* @__PURE__ */ a(si, { htmlFor: Y, className: "cursor-pointer text-[12px] font-normal", children: y })
284
285
  ] });
285
286
  }
286
- function Wc({
287
+ function Zc({
287
288
  queueId: l,
288
289
  realtime: y,
289
290
  renderError: L,
290
291
  hideCreateActions: P = !1,
291
292
  onAsk: G
292
293
  }) {
293
- var ta, na, ra, aa, la, oa, sa, ia, ca, da, ua, ma, pa, ba, ha, fa;
294
- const f = so(), h = $a(), { userId: S } = va(), H = qo(), { navigate: xe } = Fo(), [g, Y] = w("all"), [de, O] = w(1), Un = U(jo()), [Tt, qa] = w(() => {
294
+ var aa, la, oa, sa, ia, ca, da, ua, ma, pa, ba, ha, fa, ga, xa, ya, ka;
295
+ const f = po(), h = Ea(), { userId: S } = Sa(), H = Ao(), { navigate: xe } = Lo(), [g, Y] = w("all"), [de, O] = w(1), Gn = U(Wo()), [Rt, Aa] = w(() => {
295
296
  try {
296
297
  return localStorage.getItem("nvr_table_density") === "comfortable" ? "comfortable" : "compact";
297
298
  } catch {
298
299
  return "compact";
299
300
  }
300
- }), [q, je] = w("table"), [I, Ue] = w(""), [_, Q] = w({}), [Rt, In] = w(() => /* @__PURE__ */ new Set()), [$, ot] = w(null), [ye, Zt] = w(/* @__PURE__ */ new Set()), [st, en] = w(null), [it, tn] = w(null), [nn, Et] = w(0), $e = es(), rn = ms(), an = U({}).current, Vn = U(/* @__PURE__ */ new Set()), [Fa, Ta] = w(0), [Gn, Ra] = w(0), qe = U(!1), At = U([]), Wn = U(null), Hn = U(!1), Yn = U(0), ln = U("table");
301
- ln.current = q;
302
- const on = 25, { data: i, error: Lt } = W({
301
+ }), [q, je] = w("table"), [I, Ue] = w(""), [_, Q] = w({}), [Et, Wn] = w(() => /* @__PURE__ */ new Set()), [$, ot] = w(null), [ye, tn] = w(/* @__PURE__ */ new Set()), [st, nn] = w(null), [it, rn] = w(null), [an, At] = w(0), $e = ls(), ln = gs(), on = U({}).current, Hn = U(/* @__PURE__ */ new Set()), [La, Oa] = w(0), [Yn, Da] = w(0), qe = U(!1), Lt = U([]), Jn = U(null), zn = U(!1), Xn = U(0), sn = U("table");
302
+ sn.current = q;
303
+ const cn = 25, { data: i, error: Ot } = W({
303
304
  queryKey: ["queue-meta", l],
304
305
  queryFn: () => h.request(A(`/queues/${l}`)).then((e) => e.data),
305
306
  enabled: !!l
306
- }), { scopes: ct, ready: Jn } = hs(), zn = U(!1), [Xn, Zn] = w(!1), [Fe, Ea] = w({}), ue = U({});
307
+ }), { scopes: ct, ready: Zn } = ks(), er = U(!1), [tr, nr] = w(!1), [Fe, Ka] = w({}), ue = U({});
307
308
  M(() => {
308
- if (zn.current || !Jn || !i) return;
309
- zn.current = !0;
309
+ if (er.current || !Zn || !i) return;
310
+ er.current = !0;
310
311
  const e = (i.extra_field_meta ?? []).filter(
311
312
  (t) => t.kind === "relation" && t.target_collection && t.display_field
312
313
  );
313
314
  if (e.length === 0 || !ct) {
314
- Zn(!0);
315
+ nr(!0);
315
316
  return;
316
317
  }
317
318
  (async () => {
@@ -330,7 +331,7 @@ function Wc({
330
331
  ];
331
332
  };
332
333
  for (const o of e) {
333
- const s = fs(ct, { collection: o.target_collection });
334
+ const s = vs(ct, { collection: o.target_collection });
334
335
  if (!s) continue;
335
336
  const m = `extra.${o.path}`;
336
337
  try {
@@ -339,7 +340,7 @@ function Wc({
339
340
  const C = await r(o, p);
340
341
  C.length > 0 && (n[m.slice(6)] = C);
341
342
  }
342
- const N = gs(ct, s.name);
343
+ const N = ws(ct, s.name);
343
344
  if (N.length === 0) continue;
344
345
  const k = _[m];
345
346
  if (k && (Array.isArray(k) ? k.length > 0 : k !== ""))
@@ -349,10 +350,10 @@ function Wc({
349
350
  } catch {
350
351
  }
351
352
  }
352
- Object.keys(n).length > 0 && Ea(n), Object.keys(t).length > 0 && (ue.current = t, Q((o) => ({ ...o, ...t }))), Zn(!0);
353
+ Object.keys(n).length > 0 && Ka(n), Object.keys(t).length > 0 && (ue.current = t, Q((o) => ({ ...o, ...t }))), nr(!0);
353
354
  })();
354
- }, [Jn, ct, i]);
355
- const Ie = ((na = (ta = i == null ? void 0 : i.sources) == null ? void 0 : ta.find((e) => e.type === "collection")) == null ? void 0 : na.collection) ?? null, { data: er = [] } = W({
355
+ }, [Zn, ct, i]);
356
+ const Ie = ((la = (aa = i == null ? void 0 : i.sources) == null ? void 0 : aa.find((e) => e.type === "collection")) == null ? void 0 : la.collection) ?? null, { data: rr = [] } = W({
356
357
  queryKey: ["queue-browser-quick-filters", Ie],
357
358
  queryFn: () => h.request(A(`/collections/${Ie}`)).then((e) => {
358
359
  var t, n;
@@ -365,9 +366,9 @@ function Wc({
365
366
  for (const n of (i == null ? void 0 : i.sources) ?? [])
366
367
  n.type !== "collection" || !n.collection || e.has(n.collection) || (e.add(n.collection), t.push(n.collection));
367
368
  return t;
368
- }, [i == null ? void 0 : i.sources]), Ot = xs(
369
+ }, [i == null ? void 0 : i.sources]), Dt = _s(
369
370
  re.length === 1 ? re[0] : null
370
- ), sn = P === !0 || Array.isArray(P) && re.length > 0 && re.every((e) => P.includes(e)), me = (i == null ? void 0 : i.claims_enabled) !== !1, u = i == null ? void 0 : i.display_config, Te = (u == null ? void 0 : u.views) ?? ["table", "kanban", "workload"], Aa = (u == null ? void 0 : u.work_next) !== !1, Dt = (u == null ? void 0 : u.bulk_actions) !== !1, cn = Ss(
371
+ ), dn = P === !0 || Array.isArray(P) && re.length > 0 && re.every((e) => P.includes(e)), me = (i == null ? void 0 : i.claims_enabled) !== !1, u = i == null ? void 0 : i.display_config, Te = (u == null ? void 0 : u.views) ?? ["table", "kanban", "workload"], Pa = (u == null ? void 0 : u.work_next) !== !1, Kt = (u == null ? void 0 : u.bulk_actions) !== !1, un = Ts(
371
372
  [
372
373
  ...new Set(
373
374
  ((i == null ? void 0 : i.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
@@ -377,16 +378,16 @@ function Wc({
377
378
  ), E = (e, t) => {
378
379
  var n, r;
379
380
  return ((r = (n = i == null ? void 0 : i.column_aliases) == null ? void 0 : n[e]) == null ? void 0 : r.trim()) || t;
380
- }, tr = U(!1);
381
+ }, ar = U(!1);
381
382
  M(() => {
382
- !i || tr.current || (tr.current = !0, Ue("-priority"));
383
+ !i || ar.current || (ar.current = !0, Ue("-priority"));
383
384
  }, [i]);
384
- const [J, La] = w(!1);
385
+ const [J, Ma] = w(!1);
385
386
  M(() => {
386
387
  i != null && i.display_config && !Te.includes(q) && je(Te[0]);
387
388
  }, [i, q, Te]), M(() => {
388
389
  if (!(i != null && i.sources)) return;
389
- const e = rn ? (b, C) => rn.subscribeCollections(b, C) : y == null ? void 0 : y.subscribe;
390
+ const e = ln ? (b, C) => ln.subscribeCollections(b, C) : y == null ? void 0 : y.subscribe;
390
391
  if (!e) return;
391
392
  const t = [
392
393
  ...new Set(
@@ -398,27 +399,27 @@ function Wc({
398
399
  let r = null, o = null, s = null;
399
400
  const m = () => {
400
401
  s || (s = setTimeout(() => {
401
- s = null, Ra((b) => b + 1);
402
+ s = null, Da((b) => b + 1);
402
403
  }, 1500));
403
404
  }, p = () => {
404
405
  o || (o = setTimeout(() => {
405
- if (o = null, Yn.current > 0 || Hn.current) {
406
- At.current = [], Et((b) => b + 1);
406
+ if (o = null, Xn.current > 0 || zn.current) {
407
+ Lt.current = [], At((b) => b + 1);
407
408
  return;
408
409
  }
409
410
  qe.current = !0, f.invalidateQueries({ queryKey: ["queue-items", l] }), f.invalidateQueries({ queryKey: ["queue-workload", l] });
410
411
  }, 900));
411
412
  }, N = (b) => {
412
- let C = !1, v = 0, z = !1;
413
- const X = b.flatMap(
414
- (T) => T ? Zo(T) : [T]
413
+ let C = !1, v = 0, X = !1;
414
+ const Z = b.flatMap(
415
+ (T) => T ? as(T) : [T]
415
416
  );
416
- for (const T of X) {
417
- const ne = T == null ? void 0 : T.changed_fields, Jt = (T == null ? void 0 : T.collection) != null ? `${T.collection}:${String(T.item)}` : null, ga = Jt != null && Vn.current.has(Jt);
417
+ for (const T of Z) {
418
+ const ne = T == null ? void 0 : T.changed_fields, Xt = (T == null ? void 0 : T.collection) != null ? `${T.collection}:${String(T.item)}` : null, va = Xt != null && Hn.current.has(Xt);
418
419
  if (T && !T.action && (ne != null && ne.length) && ne.every((Ne) => Ne.startsWith("$"))) {
419
- if (ne.includes(Ct.tasks) && n.add("queue-task-counts"), ne.includes(Ct.integrations) && n.add("queue-integrations-summary"), ne.includes(Ct.addendums) && n.add("queue-collection-addendums"), ne.includes(Ct.lock) && Ta((Ne) => Ne + 1), ne.includes(Ct.state)) {
420
- const Ne = li(ga, ln.current === "kanban");
421
- z = !0, Ne.refresh && (C = !0), v += Ne.pill;
420
+ if (ne.includes($t.tasks) && n.add("queue-task-counts"), ne.includes($t.integrations) && n.add("queue-integrations-summary"), ne.includes($t.addendums) && n.add("queue-collection-addendums"), ne.includes($t.lock) && Oa((Ne) => Ne + 1), ne.includes($t.state)) {
421
+ const Ne = di(va, sn.current === "kanban");
422
+ X = !0, Ne.refresh && (C = !0), v += Ne.pill;
422
423
  }
423
424
  r || (r = setTimeout(() => {
424
425
  r = null;
@@ -427,17 +428,17 @@ function Wc({
427
428
  }, 300));
428
429
  continue;
429
430
  }
430
- z = !0;
431
- const Jl = (T == null ? void 0 : T.collection) != null && ls(T.collection, T.item);
432
- Jt && (ga || (T == null ? void 0 : T.action) === "create" || ln.current === "kanban") ? (C = !0, Jl || At.current.push({ key: Jt, by: null })) : v += 1;
431
+ X = !0;
432
+ const to = (T == null ? void 0 : T.collection) != null && ds(T.collection, T.item);
433
+ Xt && (va || (T == null ? void 0 : T.action) === "create" || sn.current === "kanban") ? (C = !0, to || Lt.current.push({ key: Xt, by: null })) : v += 1;
433
434
  }
434
- v > 0 && Et((T) => T + v), C && p(), z && m();
435
- }, k = e(t, (b) => Mo(an, [b ?? {}], N));
435
+ v > 0 && At((T) => T + v), C && p(), X && m();
436
+ }, k = e(t, (b) => Io(on, [b ?? {}], N));
436
437
  return () => {
437
- k(), Qo(an), r && clearTimeout(r), o && clearTimeout(o), s && clearTimeout(s);
438
+ k(), Vo(on), r && clearTimeout(r), o && clearTimeout(o), s && clearTimeout(s);
438
439
  };
439
- }, [rn, y, i == null ? void 0 : i.sources, f, l, S, an]);
440
- const Re = Ro(_, 350), Oa = JSON.stringify(Re) === JSON.stringify(_), dn = U(!1), Ee = q === "table" && !!$, nr = (() => {
440
+ }, [ln, y, i == null ? void 0 : i.sources, f, l, S, on]);
441
+ const Re = Do(_, 350), Qa = JSON.stringify(Re) === JSON.stringify(_), mn = U(!1), Ee = q === "table" && !!$, lr = (() => {
441
442
  const e = /* @__PURE__ */ new Set();
442
443
  for (const t of (i == null ? void 0 : i.extra_field_meta) ?? [])
443
444
  t.aggregate && t.aggregate !== "count" && e.add(t.path);
@@ -467,17 +468,17 @@ function Wc({
467
468
  function Ve(e, t) {
468
469
  Q((n) => ({ ...n, [e]: n[e] === t ? "" : t })), O(1);
469
470
  }
470
- function Da(e) {
471
+ function Ba(e) {
471
472
  Q((t) => {
472
473
  const n = t.state, r = Array.isArray(n) ? n : n ? [n] : [], o = r.includes(e) ? r.filter((s) => s !== e) : [...r, e];
473
474
  return { ...t, state: o };
474
475
  }), O(1);
475
476
  }
476
- const Ka = Array.isArray(_.state) ? _.state : _.state ? [_.state] : [], Pa = (e) => !e || Array.isArray(e) && e.length === 0;
477
- function Ma() {
477
+ const ja = Array.isArray(_.state) ? _.state : _.state ? [_.state] : [], Ua = (e) => !e || Array.isArray(e) && e.length === 0;
478
+ function Ia() {
478
479
  Q({ ...ue.current }), Y("all"), O(1);
479
480
  }
480
- const [dt, Qa] = w(() => {
481
+ const [dt, Va] = w(() => {
481
482
  try {
482
483
  return localStorage.getItem("nvr_queue_insights_open") === "1";
483
484
  } catch {
@@ -490,13 +491,13 @@ function Wc({
490
491
  } catch {
491
492
  }
492
493
  }, [dt]);
493
- const { data: Ba = [] } = W({
494
+ const { data: Ga = [] } = W({
494
495
  queryKey: ["queue-view-subs", l],
495
496
  queryFn: () => h.request(A("/notification-subscriptions")).then((e) => (e.data ?? []).filter((t) => t.queue_id === l)).catch(() => []),
496
497
  staleTime: 3e4
497
- }), Kt = (e) => Ba.find((t) => t.queue_view_id === e), ja = (e) => {
498
- const t = Kt(e);
499
- (t ? h.request(Mn(`/notification-subscriptions/${t.id}`)) : h.request(
498
+ }), Pt = (e) => Ga.find((t) => t.queue_view_id === e), Wa = (e) => {
499
+ const t = Pt(e);
500
+ (t ? h.request(jn(`/notification-subscriptions/${t.id}`)) : h.request(
500
501
  se("/notification-subscriptions", {
501
502
  queue_id: l,
502
503
  queue_view_id: e,
@@ -506,16 +507,16 @@ function Wc({
506
507
  D.success(
507
508
  t ? "Unsubscribed" : "Subscribed — new arrivals in this view notify you"
508
509
  ), f.invalidateQueries({ queryKey: ["queue-view-subs", l] });
509
- }).catch((r) => D.error($t(r, "Failed")));
510
- }, [rr, un] = w(null), mn = [
510
+ }).catch((r) => D.error(qt(r, "Failed")));
511
+ }, [or, pn] = w(null), bn = [
511
512
  ...new Set(
512
513
  ((i == null ? void 0 : i.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
513
514
  )
514
- ], { data: Ua = {} } = W({
515
- queryKey: ["queue-custom-actions", l, mn.join(",")],
515
+ ], { data: Ha = {} } = W({
516
+ queryKey: ["queue-custom-actions", l, bn.join(",")],
516
517
  queryFn: async () => {
517
518
  const e = {};
518
- for (const t of mn.slice(0, 6))
519
+ for (const t of bn.slice(0, 6))
519
520
  try {
520
521
  const n = await h.request(
521
522
  A("/custom-actions", { collection: t })
@@ -526,20 +527,20 @@ function Wc({
526
527
  }
527
528
  return e;
528
529
  },
529
- enabled: mn.length > 0,
530
+ enabled: bn.length > 0,
530
531
  staleTime: 6e4
531
- }), Ia = (e) => Ua[e] ?? [], Va = (e, t) => {
532
+ }), Ya = (e) => Ha[e] ?? [], Ja = (e, t) => {
532
533
  h.request(se(`/custom-actions/${e.id}/execute`, { item: t.item_id })).then(() => {
533
534
  D.success(`${e.label} ran`), f.invalidateQueries({ queryKey: ["queue-items", l] });
534
535
  }).catch((n) => {
535
536
  const r = n.response;
536
- D.error((r == null ? void 0 : r.error) ?? $t(n, `${e.label} failed`));
537
+ D.error((r == null ? void 0 : r.error) ?? qt(n, `${e.label} failed`));
537
538
  });
538
- }, { data: pn = [] } = W({
539
+ }, { data: hn = [] } = W({
539
540
  queryKey: ["queue-triage-labels", l],
540
541
  queryFn: () => h.request(A(`/queues/${l}/triage-labels`)).then((e) => e.data ?? []).catch(() => []),
541
542
  staleTime: 3e4
542
- }), ar = (e, t) => {
543
+ }), sr = (e, t) => {
543
544
  h.request(
544
545
  se(`/queues/${l}/triage-labels/toggle`, {
545
546
  collection: e.collection,
@@ -548,16 +549,16 @@ function Wc({
548
549
  })
549
550
  ).then(() => {
550
551
  f.invalidateQueries({ queryKey: ["queue-items", l] }), f.invalidateQueries({ queryKey: ["queue-triage-labels", l] });
551
- }).catch((n) => D.error($t(n, "Label failed")));
552
+ }).catch((n) => D.error(qt(n, "Label failed")));
552
553
  }, {
553
554
  data: c,
554
- isLoading: lr,
555
+ isLoading: ir,
555
556
  isFetching: ut,
556
- isPlaceholderData: Ga,
557
+ isPlaceholderData: za,
557
558
  dataUpdatedAt: ce,
558
- isError: or,
559
- error: Wa,
560
- refetch: Ha
559
+ isError: cr,
560
+ error: Xa,
561
+ refetch: Za
561
562
  } = W({
562
563
  queryKey: [
563
564
  "queue-items",
@@ -569,7 +570,7 @@ function Wc({
569
570
  $
570
571
  ],
571
572
  queryFn: async () => {
572
- const e = !Ee && q === "table", t = JSON.stringify([l, g, I, ke, on]), n = e ? Uo(Un.current, t, de, "").after : void 0, r = await h.request(
573
+ const e = !Ee && q === "table", t = JSON.stringify([l, g, I, ke, cn]), n = e ? Ho(Gn.current, t, de, "").after : void 0, r = await h.request(
573
574
  A(`/queues/${l}/items`, {
574
575
  scope: g,
575
576
  // Last State Change is Aging read the other way round: the newest
@@ -580,11 +581,11 @@ function Wc({
580
581
  // Kanban renders the full matching set, grouped client-side.
581
582
  ...Ee ? {
582
583
  group_by: $,
583
- ...nr.length ? { group_sums: nr.join(",") } : {}
584
- } : q === "table" ? { page: de, limit: on, ...n ? { after: n } : {} } : {}
584
+ ...lr.length ? { group_sums: lr.join(",") } : {}
585
+ } : q === "table" ? { page: de, limit: cn, ...n ? { after: n } : {} } : {}
585
586
  })
586
587
  );
587
- return n && Io(Un.current, t, de, r.next_cursor), r;
588
+ return n && Yo(Gn.current, t, de, r.next_cursor), r;
588
589
  },
589
590
  // Wait for display_config AND scope seeding so the first fetch uses the
590
591
  // configured defaults and already carries the viewer's restricted filters.
@@ -593,33 +594,33 @@ function Wc({
593
594
  // first fetch went out WITHOUT the seeded scope and refired ~350ms later
594
595
  // with it (3.3s + 8.7s of work for one page). The first fetch now also
595
596
  // waits for the debounced copy to settle; later typing still debounces.
596
- enabled: !!l && J && Xn && (dn.current || Oa),
597
+ enabled: !!l && J && tr && (mn.current || Qa),
597
598
  // Keep the previous page rendered while a sort/filter/page change refetches —
598
599
  // swapping to skeletons collapsed the table height and jittered the page.
599
600
  placeholderData: (e) => e
600
601
  });
601
- c && !dn.current && (dn.current = !0);
602
+ c && !mn.current && (mn.current = !0);
602
603
  const Ge = Object.entries(ue.current).filter(
603
604
  ([e, t]) => {
604
605
  var n;
605
606
  return !((n = Fe[e.slice(6)]) != null && n.length) && JSON.stringify(ke[e] ?? null) === JSON.stringify(t);
606
607
  }
607
- ).map(([e]) => e), sr = Ge.length > 0 && Object.keys(ke).every((e) => Ge.includes(e)), ir = Object.fromEntries(
608
+ ).map(([e]) => e), dr = Ge.length > 0 && Object.keys(ke).every((e) => Ge.includes(e)), ur = Object.fromEntries(
608
609
  Object.entries(ke).filter(([e]) => !Ge.includes(e))
609
- ), { data: Ya } = W({
610
- queryKey: ["queue-default-hidden", l, g, ir],
611
- enabled: !!l && !!c && !ut && c.total === 0 && ((ra = c.empty) == null ? void 0 : ra.reason) === "filters" && Ge.length > 0 && !sr,
610
+ ), { data: el } = W({
611
+ queryKey: ["queue-default-hidden", l, g, ur],
612
+ enabled: !!l && !!c && !ut && c.total === 0 && ((oa = c.empty) == null ? void 0 : oa.reason) === "filters" && Ge.length > 0 && !dr,
612
613
  staleTime: 3e4,
613
614
  retry: !1,
614
615
  queryFn: () => h.request(
615
616
  A(`/queues/${l}/items`, {
616
617
  scope: g,
617
- filters: JSON.stringify(ir),
618
+ filters: JSON.stringify(ur),
618
619
  page: 1,
619
620
  limit: 1
620
621
  })
621
622
  ).then((e) => Number(e.total ?? 0))
622
- }), pe = sr ? Math.max(0, (((aa = c == null ? void 0 : c.stats) == null ? void 0 : aa.total) ?? 0) - ((c == null ? void 0 : c.total) ?? 0)) : Ya ?? 0, cr = (e) => Ge.map(e).join(" and "), dr = () => {
623
+ }), pe = dr ? Math.max(0, (((sa = c == null ? void 0 : c.stats) == null ? void 0 : sa.total) ?? 0) - ((c == null ? void 0 : c.total) ?? 0)) : el ?? 0, mr = (e) => Ge.map(e).join(" and "), pr = () => {
623
624
  Q((e) => {
624
625
  const t = { ...e };
625
626
  for (const n of Ge) delete t[n];
@@ -640,15 +641,15 @@ function Wc({
640
641
  }, r = t.find((o) => o.queue === l);
641
642
  t.push(n), t.length > 50 && t.shift(), r && r !== n && ce - Number(r.at) < 2e3 && t.filter((o) => o.queue === l).length === 2 && console.warn("[queue] duplicate first fetch", { first: r, second: n });
642
643
  }, [ce]);
643
- const We = lr && !c || !J || !Xn && !c, ur = (ut && !lr || Ga && ut) && !qe.current, Ja = V(
644
+ const We = ir && !c || !J || !tr && !c, br = (ut && !ir || za && ut) && !qe.current, tl = V(
644
645
  () => (Ee ? [] : (c == null ? void 0 : c.data) ?? []).slice(0, 100).map((e) => ({ collection: e.collection, item: e.item_id })),
645
646
  [Ee, c == null ? void 0 : c.data]
646
- ), za = ss(Ja), Pt = mi(), mr = Eo(ut && !qe.current), Xa = Ao({
647
+ ), nl = ms(tl), Mt = gi(), hr = Ko(ut && !qe.current), rl = Po({
647
648
  pending: ut && !qe.current,
648
649
  request: l != null ? { method: "GET", url: `/queues/${l}/items` } : null,
649
650
  noun: "items"
650
- }), Za = os();
651
- async function pr(e, t) {
651
+ }), al = us();
652
+ async function fr(e, t) {
652
653
  var p;
653
654
  const r = (await h.request(A(`/pipelines/instance/${e.collection}/${e.item_id}`))).data;
654
655
  if (!r || r.states.length === 0)
@@ -660,7 +661,7 @@ function Wc({
660
661
  );
661
662
  if (!s) throw new Error("No transition available to move this item here");
662
663
  let m = null;
663
- if (pi(s) && (m = await Pt.ask(((p = s.label) == null ? void 0 : p.trim()) || "Move"), !m))
664
+ if (xi(s) && (m = await Mt.ask(((p = s.label) == null ? void 0 : p.trim()) || "Move"), !m))
664
665
  throw new Error("Not moved — this move needs a note");
665
666
  await h.request(
666
667
  se(`/pipelines/instance/${e.collection}/${e.item_id}/transition`, {
@@ -669,15 +670,15 @@ function Wc({
669
670
  })
670
671
  );
671
672
  }
672
- const el = Se({
673
+ const ll = Se({
673
674
  mutationFn: async ({ item: e, targetState: t }) => {
674
- await pr(e, t);
675
+ await fr(e, t);
675
676
  },
676
677
  onSuccess: () => {
677
678
  f.invalidateQueries({ queryKey: ["queue-items", l, g] });
678
679
  },
679
680
  onError: (e) => {
680
- D.error($t(e, "Failed to move item")), f.invalidateQueries({ queryKey: ["queue-items", l, g] });
681
+ D.error(qt(e, "Failed to move item")), f.invalidateQueries({ queryKey: ["queue-items", l, g] });
681
682
  }
682
683
  }), Ae = Se({
683
684
  mutationFn: (e) => h.request(
@@ -701,14 +702,14 @@ function Wc({
701
702
  queryKey: ["queue-column-prefs", l],
702
703
  queryFn: () => h.request(A(`/queues/${l}/column-prefs`)),
703
704
  enabled: !!l
704
- }), [Mt, Qt] = w(null), [Je, bn] = w(null);
705
+ }), [Qt, Bt] = w(null), [Je, fn] = w(null);
705
706
  M(() => {
706
- Ye && bn(Ye.data.default_view_id);
707
+ Ye && fn(Ye.data.default_view_id);
707
708
  }, [Ye]);
708
- const [tl, br] = w({}), be = Ee ? (c == null ? void 0 : c.groups) ?? null : null, Bt = (be ?? []).filter((e) => !ye.has(e.key)).map((e) => e.key).flatMap(
709
- (e) => Array.from({ length: tl[e] ?? 1 }, (t, n) => ({ key: e, page: n + 1 }))
710
- ), hn = Be({
711
- queries: Bt.map(({ key: e, page: t }) => ({
709
+ const [ol, gr] = w({}), be = Ee ? (c == null ? void 0 : c.groups) ?? null : null, jt = (be ?? []).filter((e) => !ye.has(e.key)).map((e) => e.key).flatMap(
710
+ (e) => Array.from({ length: ol[e] ?? 1 }, (t, n) => ({ key: e, page: n + 1 }))
711
+ ), gn = Be({
712
+ queries: jt.map(({ key: e, page: t }) => ({
712
713
  queryKey: [
713
714
  "queue-items",
714
715
  l,
@@ -728,23 +729,23 @@ function Wc({
728
729
  group_by: $,
729
730
  group_key: e,
730
731
  page: t,
731
- limit: hi
732
+ limit: ki
732
733
  })
733
734
  ).then((n) => ({ key: e, rows: n.data })),
734
735
  enabled: !!c && Ee,
735
736
  placeholderData: (n) => n
736
737
  }))
737
- }), nl = hn.map((e) => e.dataUpdatedAt).join(","), fn = V(() => {
738
+ }), sl = gn.map((e) => e.dataUpdatedAt).join(","), xn = V(() => {
738
739
  const e = /* @__PURE__ */ new Map();
739
- return hn.forEach((t, n) => {
740
+ return gn.forEach((t, n) => {
740
741
  if (!t.data) return;
741
- const r = Bt[n].key;
742
+ const r = jt[n].key;
742
743
  e.set(r, [...e.get(r) ?? [], ...t.data.rows]);
743
744
  }), e;
744
- }, [nl, Bt.map((e) => `${e.key}\0${e.page}`).join("")]), rl = new Set(
745
- hn.flatMap((e, t) => e.isFetching ? [Bt[t].key] : [])
746
- ), F = be ? [...fn.values()].flat() : (c == null ? void 0 : c.data) ?? [];
747
- _s(
745
+ }, [sl, jt.map((e) => `${e.key}\0${e.page}`).join("")]), il = new Set(
746
+ gn.flatMap((e, t) => e.isFetching ? [jt[t].key] : [])
747
+ ), F = be ? [...xn.values()].flat() : (c == null ? void 0 : c.data) ?? [];
748
+ qs(
748
749
  l ? {
749
750
  queue: {
750
751
  id: l,
@@ -755,8 +756,8 @@ function Wc({
755
756
  }
756
757
  } : null
757
758
  );
758
- const al = Ns(), mt = F.some((e) => e.fulfilment !== void 0), pt = F.some((e) => e.send_backs !== void 0), { data: jt, dataUpdatedAt: ll } = W({
759
- queryKey: ["queue-live-stats", l, g, Re, Gn],
759
+ const cl = Fs(), mt = F.some((e) => e.fulfilment !== void 0), pt = F.some((e) => e.send_backs !== void 0), { data: Ut, dataUpdatedAt: dl } = W({
760
+ queryKey: ["queue-live-stats", l, g, Re, Yn],
760
761
  queryFn: () => h.request(
761
762
  A(`/queues/${l}/items`, {
762
763
  scope: g,
@@ -765,23 +766,25 @@ function Wc({
765
766
  limit: 1
766
767
  })
767
768
  ),
768
- enabled: Gn > 0 && !!c,
769
+ enabled: Yn > 0 && !!c,
769
770
  staleTime: Number.POSITIVE_INFINITY,
770
771
  placeholderData: (e) => e,
771
772
  retry: !1
772
- }), gn = !!jt && ll > ce, x = gn ? jt.stats : c == null ? void 0 : c.stats, Z = gn ? jt.filtered_stats ?? null : (c == null ? void 0 : c.filtered_stats) ?? null, hr = gn ? jt.state_counts : c == null ? void 0 : c.state_counts;
773
- Vn.current = new Set(F.map((e) => `${e.collection}:${e.item_id}`));
774
- const bt = ts(
773
+ }), yn = !!Ut && dl > ce, x = yn ? Ut.stats : c == null ? void 0 : c.stats, z = yn ? Ut.filtered_stats ?? null : (c == null ? void 0 : c.filtered_stats) ?? null, xr = yn ? Ut.state_counts : c == null ? void 0 : c.state_counts, kn = (ia = z ?? x) == null ? void 0 : ia.aging, yr = U(void 0);
774
+ !_.aging_hours && kn && (yr.current = kn);
775
+ const bt = _.aging_hours ? yr.current ?? (x == null ? void 0 : x.aging) : kn ?? (x == null ? void 0 : x.aging);
776
+ Hn.current = new Set(F.map((e) => `${e.collection}:${e.item_id}`));
777
+ const ht = os(
775
778
  F.map((e) => ({ collection: e.collection, id: e.item_id })),
776
- Fa
777
- ), fr = U(ce), gr = U(0);
778
- !qe.current && ce !== gr.current && (fr.current = ce), M(() => {
779
+ La
780
+ ), kr = U(ce), vr = U(0);
781
+ !qe.current && ce !== vr.current && (kr.current = ce), M(() => {
779
782
  const e = new Set(F.map((t) => `${t.collection}:${t.item_id}`));
780
783
  if (qe.current) {
781
- qe.current = !1, gr.current = ce;
782
- const t = At.current;
783
- At.current = [];
784
- const n = Wn.current, r = /* @__PURE__ */ new Set();
784
+ qe.current = !1, vr.current = ce;
785
+ const t = Lt.current;
786
+ Lt.current = [];
787
+ const n = Jn.current, r = /* @__PURE__ */ new Set();
785
788
  for (const o of t)
786
789
  !e.has(o.key) || r.has(o.key) || (r.add(o.key), $e.note([o.key], o.by, n && !n.has(o.key) ? "create" : "update"));
787
790
  if (n) {
@@ -789,12 +792,12 @@ function Wc({
789
792
  o.length > 0 && o.length <= 20 && $e.note(o, null, "create");
790
793
  }
791
794
  }
792
- Wn.current = e;
795
+ Jn.current = e;
793
796
  }, [ce]), M(() => {
794
- Et(0);
797
+ At(0);
795
798
  }, [c]);
796
- function ol() {
797
- f.invalidateQueries({ queryKey: ["queue-items", l] }), f.invalidateQueries({ queryKey: ["queue-workload", l] }), Et(0);
799
+ function ul() {
800
+ f.invalidateQueries({ queryKey: ["queue-items", l] }), f.invalidateQueries({ queryKey: ["queue-workload", l] }), At(0);
798
801
  }
799
802
  const { data: he } = W({
800
803
  queryKey: ["queue-trends", l],
@@ -807,7 +810,7 @@ function Wc({
807
810
  enabled: !!l && g === "mine",
808
811
  staleTime: 300 * 1e3
809
812
  });
810
- function ht(e) {
813
+ function ft(e) {
811
814
  const n = (g === "all" ? he == null ? void 0 : he.data : g === "mine" ? fe == null ? void 0 : fe.data : void 0) ?? [];
812
815
  if (n.length === 0) return {};
813
816
  const r = n.map((s) => s[e]), o = n[n.length - 1];
@@ -820,19 +823,19 @@ function Wc({
820
823
  (m) => g === "mine" ? m.owned ?? m.total : m.total
821
824
  ), r = n.slice(1).map((m, p) => m - n[p]), o = r.reduce((m, p) => m + p, 0) / r.length, s = x.total;
822
825
  return Math.abs(o) < 0.05 ? { dir: "flat", pace: o, days: null } : o < 0 ? { dir: "down", pace: o, days: Math.max(1, Math.ceil(s / -o)) } : { dir: "up", pace: o, days: null };
823
- }, [he == null ? void 0 : he.data, fe == null ? void 0 : fe.data, g, x]), ft = V(
826
+ }, [he == null ? void 0 : he.data, fe == null ? void 0 : fe.data, g, x]), gt = V(
824
827
  () => [
825
828
  ...new Set(
826
829
  ((i == null ? void 0 : i.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
827
830
  )
828
831
  ],
829
832
  [i == null ? void 0 : i.sources]
830
- ), { data: sl } = W({
833
+ ), { data: ml } = W({
831
834
  queryKey: ["collections"],
832
835
  queryFn: () => h.request(A("/collections")).then((e) => e.data),
833
836
  staleTime: 300 * 1e3
834
837
  }), ze = Be({
835
- queries: ft.map((e) => ({
838
+ queries: gt.map((e) => ({
836
839
  queryKey: ["queue-collection-addendums", e],
837
840
  queryFn: () => h.request(
838
841
  A(`/collections/${e}`)
@@ -842,39 +845,39 @@ function Wc({
842
845
  }).catch(() => !1),
843
846
  staleTime: 300 * 1e3
844
847
  }))
845
- }).some((e) => e.data === !0), { data: xn = [] } = W({
848
+ }).some((e) => e.data === !0), { data: vn = [] } = W({
846
849
  queryKey: ["queue-integrations-collections"],
847
850
  queryFn: () => h.request(A("/integration-obligations/collections")).then((e) => e.data ?? []).catch(() => []),
848
851
  staleTime: 300 * 1e3
849
- }), ve = ft.some((e) => xn.includes(e)), yn = V(() => {
852
+ }), ve = gt.some((e) => vn.includes(e)), wn = V(() => {
850
853
  var t;
851
854
  const e = {};
852
855
  if (!ve) return e;
853
856
  for (const n of F) {
854
- if (!xn.includes(n.collection)) continue;
857
+ if (!vn.includes(n.collection)) continue;
855
858
  const r = e[t = n.collection] ?? (e[t] = []);
856
859
  r.length < 500 && r.push(n.item_id);
857
860
  }
858
861
  return e;
859
- }, [F, xn, ve]), xr = Object.keys(yn), yr = Be({
860
- queries: xr.map((e) => ({
861
- queryKey: ["queue-integrations-summary", e, yn[e].join(",")],
862
+ }, [F, vn, ve]), wr = Object.keys(wn), _r = Be({
863
+ queries: wr.map((e) => ({
864
+ queryKey: ["queue-integrations-summary", e, wn[e].join(",")],
862
865
  queryFn: () => h.request(
863
866
  se("/integration-obligations/summary", {
864
867
  collection: e,
865
- ids: yn[e]
868
+ ids: wn[e]
866
869
  })
867
870
  ).then((t) => t.data ?? {}).catch(() => ({})),
868
871
  staleTime: 3e4
869
872
  }))
870
- }), il = yr.map((e) => e.dataUpdatedAt).join(","), cl = V(() => {
873
+ }), pl = _r.map((e) => e.dataUpdatedAt).join(","), bl = V(() => {
871
874
  const e = {};
872
- return xr.forEach((t, n) => {
875
+ return wr.forEach((t, n) => {
873
876
  var o;
874
- const r = ((o = yr[n]) == null ? void 0 : o.data) ?? {};
877
+ const r = ((o = _r[n]) == null ? void 0 : o.data) ?? {};
875
878
  for (const [s, m] of Object.entries(r)) e[`${t}:${s}`] = m;
876
879
  }), e;
877
- }, [il]), kn = V(() => {
880
+ }, [pl]), _n = V(() => {
878
881
  var t;
879
882
  const e = {};
880
883
  for (const n of F) {
@@ -884,31 +887,31 @@ function Wc({
884
887
  r.length < 500 && r.push(n.item_id);
885
888
  }
886
889
  return e;
887
- }, [F]), vn = Object.keys(kn), kr = Be({
888
- queries: vn.map((e) => ({
889
- queryKey: ["queue-task-counts", e, kn[e].join(",")],
890
+ }, [F]), Nn = Object.keys(_n), Nr = Be({
891
+ queries: Nn.map((e) => ({
892
+ queryKey: ["queue-task-counts", e, _n[e].join(",")],
890
893
  queryFn: () => h.request(
891
- se("/tasks/counts", { collection: e, ids: kn[e] })
894
+ se("/tasks/counts", { collection: e, ids: _n[e] })
892
895
  ).then((t) => t.data ?? {}).catch(() => ({})),
893
896
  staleTime: 3e4
894
897
  }))
895
- }), dl = kr.map((e) => e.dataUpdatedAt).join(","), ul = V(() => {
898
+ }), hl = Nr.map((e) => e.dataUpdatedAt).join(","), fl = V(() => {
896
899
  const e = {};
897
- return vn.forEach((t, n) => {
900
+ return Nn.forEach((t, n) => {
898
901
  var r;
899
- for (const [o, s] of Object.entries(((r = kr[n]) == null ? void 0 : r.data) ?? {})) e[`${t}:${o}`] = s;
902
+ for (const [o, s] of Object.entries(((r = Nr[n]) == null ? void 0 : r.data) ?? {})) e[`${t}:${o}`] = s;
900
903
  }), e;
901
- }, [dl]), vr = vn.length > 0, wr = Be({
902
- queries: ft.map((e) => ({
904
+ }, [hl]), Sr = Nn.length > 0, Cr = Be({
905
+ queries: gt.map((e) => ({
903
906
  queryKey: ["queue-collection-risk-rules", e],
904
907
  queryFn: () => h.request(
905
908
  A("/at-risk/rules/active", { collection: e })
906
909
  ).then((t) => t.data ?? []).catch(() => []),
907
910
  staleTime: 300 * 1e3
908
911
  }))
909
- }), ml = wr.map((e) => e.dataUpdatedAt).join(","), _r = V(() => {
912
+ }), gl = Cr.map((e) => e.dataUpdatedAt).join(","), $r = V(() => {
910
913
  const e = /* @__PURE__ */ new Map();
911
- for (const t of wr)
914
+ for (const t of Cr)
912
915
  for (const n of t.data ?? []) {
913
916
  const r = e.get(n.name);
914
917
  e.set(n.name, {
@@ -917,65 +920,65 @@ function Wc({
917
920
  });
918
921
  }
919
922
  return [...e.values()];
920
- }, [ml]), Nr = Be({
921
- queries: ft.map((e) => ({
923
+ }, [gl]), qr = Be({
924
+ queries: gt.map((e) => ({
922
925
  queryKey: ["queue-collection-states", e],
923
926
  queryFn: () => h.request(
924
927
  A(`/queues/collection-states/${e}`)
925
928
  ).then((t) => t.data),
926
929
  staleTime: 300 * 1e3
927
930
  }))
928
- }), Sr = (e) => e.replace(/_/g, " ").replace(/\b\w/g, (t) => t.toUpperCase()), we = V(() => {
931
+ }), Fr = (e) => e.replace(/_/g, " ").replace(/\b\w/g, (t) => t.toUpperCase()), we = V(() => {
929
932
  const e = {};
930
- for (const t of Nr)
933
+ for (const t of qr)
931
934
  (t.data ?? []).forEach((n, r) => {
932
935
  e[n.key] = { label: n.label, color: n.color, sort: r };
933
936
  });
934
937
  return e;
935
- }, [Nr.map((e) => e.data)]), Cr = x ? Object.entries(x.by_state).sort(
938
+ }, [qr.map((e) => e.data)]), Tr = x ? Object.entries(x.by_state).sort(
936
939
  (e, t) => {
937
940
  var n, r;
938
941
  return (((n = we[e[0]]) == null ? void 0 : n.sort) ?? Number.MAX_SAFE_INTEGER) - (((r = we[t[0]]) == null ? void 0 : r.sort) ?? Number.MAX_SAFE_INTEGER);
939
942
  }
940
- ) : [], $r = (e) => [...e].sort(
943
+ ) : [], Rr = (e) => [...e].sort(
941
944
  (t, n) => {
942
945
  var r, o;
943
946
  return (((r = we[t]) == null ? void 0 : r.sort) ?? Number.MAX_SAFE_INTEGER) - (((o = we[n]) == null ? void 0 : o.sort) ?? Number.MAX_SAFE_INTEGER);
944
947
  }
945
- ), wn = V(() => {
948
+ ), Sn = V(() => {
946
949
  const e = {};
947
950
  for (const [t, n] of Object.entries(we)) e[t] = n.label;
948
951
  return e;
949
- }, [we]), Le = (e) => e ? e === "none" ? "No State" : wn[e] ?? Sr(e) : "—", gt = (e) => {
950
- if (e === Xt) return "Addendums";
951
- const t = (sl ?? []).find((n) => n.collection === e);
952
- return (t == null ? void 0 : t.display_name) || (t == null ? void 0 : t.plural) || Sr(e);
952
+ }, [we]), Le = (e) => e ? e === "none" ? "No State" : Sn[e] ?? Fr(e) : "—", xt = (e) => {
953
+ if (e === en) return "Addendums";
954
+ const t = (ml ?? []).find((n) => n.collection === e);
955
+ return (t == null ? void 0 : t.display_name) || (t == null ? void 0 : t.plural) || Fr(e);
953
956
  }, le = V(() => $ ? be ? be.map((e) => ({
954
957
  key: e.key,
955
- rows: fn.get(e.key) ?? [],
958
+ rows: xn.get(e.key) ?? [],
956
959
  breached: e.breached,
957
960
  atRisk: e.at_risk,
958
961
  count: e.count,
959
962
  sums: e.sums ?? {}
960
- })) : cs(F, $).map((e) => ({ ...e, count: e.rows.length, sums: {} })) : null, [F, $, be, fn]), _n = U(null);
963
+ })) : bs(F, $).map((e) => ({ ...e, count: e.rows.length, sums: {} })) : null, [F, $, be, xn]), Cn = U(null);
961
964
  M(() => {
962
965
  if (!$ || !le) {
963
- _n.current = null;
966
+ Cn.current = null;
964
967
  return;
965
968
  }
966
- if (Ee && !be || _n.current === $) return;
967
- _n.current = $;
969
+ if (Ee && !be || Cn.current === $) return;
970
+ Cn.current = $;
968
971
  const e = le.reduce((t, n) => t + n.count, 0);
969
- Zt(e > 200 ? new Set(le.map((t) => t.key)) : /* @__PURE__ */ new Set()), br({});
972
+ tn(e > 200 ? new Set(le.map((t) => t.key)) : /* @__PURE__ */ new Set()), gr({});
970
973
  }, [$, be]);
971
- function pl(e) {
972
- Zt((t) => {
974
+ function xl(e) {
975
+ tn((t) => {
973
976
  const n = new Set(t);
974
977
  return n.has(e) ? n.delete(e) : n.add(e), n;
975
978
  });
976
979
  }
977
- const oe = V(() => le ? le.filter((e) => !ye.has(e.key)).flatMap((e) => e.rows) : F, [le, F, ye]), K = (e) => `${e.collection}:${e.item_id}`, [_e, Oe] = w(null), [bl, Nn] = w(!1), [Ut, It] = w(null), Sn = (e) => {
978
- if (e.collection === Xt && e.url) {
980
+ const oe = V(() => le ? le.filter((e) => !ye.has(e.key)).flatMap((e) => e.rows) : F, [le, F, ye]), K = (e) => `${e.collection}:${e.item_id}`, [_e, Oe] = w(null), [yl, $n] = w(!1), [It, Vt] = w(null), qn = (e) => {
981
+ if (e.collection === en && e.url) {
979
982
  const t = e.url.match(/^\/collections\/([^/?]+)\/([^/?]+)(?:\?(.*))?$/);
980
983
  if (t) {
981
984
  const n = {};
@@ -993,35 +996,35 @@ function Wc({
993
996
  itemId: e.item_id,
994
997
  layoutSlug: (u == null ? void 0 : u.item_layout) ?? null
995
998
  };
996
- }, xt = (e) => {
999
+ }, yt = (e) => {
997
1000
  var t;
998
- i && Na({
1001
+ i && Fa({
999
1002
  queue_id: l,
1000
1003
  name: i.name,
1001
1004
  path: `${window.location.pathname}${window.location.search}`,
1002
1005
  at: Date.now(),
1003
- scroll: ((t = Gt.current) == null ? void 0 : t.scrollTop) ?? 0,
1006
+ scroll: ((t = Wt.current) == null ? void 0 : t.scrollTop) ?? 0,
1004
1007
  state: { scope: g, page: de, sort: I, filters: _, group_by: $, view: q }
1005
- }), H.open(Sn(e));
1006
- }, [B, yt] = w(
1008
+ }), H.open(qn(e));
1009
+ }, [B, kt] = w(
1007
1010
  null
1008
1011
  );
1009
1012
  M(() => {
1010
1013
  if (!B) return;
1011
- const e = () => yt(null);
1014
+ const e = () => kt(null);
1012
1015
  return window.addEventListener("mousedown", e), window.addEventListener("scroll", e, !0), () => {
1013
1016
  window.removeEventListener("mousedown", e), window.removeEventListener("scroll", e, !0);
1014
1017
  };
1015
1018
  }, [B]);
1016
- const Vt = (e) => {
1017
- It(K(e));
1019
+ const Gt = (e) => {
1020
+ Vt(K(e));
1018
1021
  const t = (u == null ? void 0 : u.row_click) ?? "preview";
1019
- if (t === "full" || e.collection === Xt) {
1020
- xt(e);
1022
+ if (t === "full" || e.collection === en) {
1023
+ yt(e);
1021
1024
  return;
1022
1025
  }
1023
1026
  if (t === "layout") {
1024
- Ir({
1027
+ Wr({
1025
1028
  collection: e.collection,
1026
1029
  itemId: e.item_id,
1027
1030
  rootLayoutSlug: (u == null ? void 0 : u.item_layout) ?? null,
@@ -1037,18 +1040,18 @@ function Wc({
1037
1040
  const e = F.find((t) => K(t) === K(_e));
1038
1041
  e && e !== _e && Oe(e);
1039
1042
  }, [F]);
1040
- const hl = (e) => !e.claimed_by || e.claimed_by.id === S;
1041
- function qr(e) {
1042
- const t = e ? oe.findIndex((r) => K(r) === K(e)) + 1 : 0, n = oe.slice(t).find(hl);
1043
+ const kl = (e) => !e.claimed_by || e.claimed_by.id === S;
1044
+ function Er(e) {
1045
+ const t = e ? oe.findIndex((r) => K(r) === K(e)) + 1 : 0, n = oe.slice(t).find(kl);
1043
1046
  if (!n) {
1044
- Nn(!1), Oe(null), D.info("Nothing left to work on — queue clear!");
1047
+ $n(!1), Oe(null), D.info("Nothing left to work on — queue clear!");
1045
1048
  return;
1046
1049
  }
1047
- if (It(K(n)), me && !n.claimed_by && Ae.mutate(n), (u == null ? void 0 : u.row_click) === "full") {
1048
- xt(n);
1050
+ if (Vt(K(n)), me && !n.claimed_by && Ae.mutate(n), (u == null ? void 0 : u.row_click) === "full") {
1051
+ yt(n);
1049
1052
  return;
1050
1053
  }
1051
- Nn(!0), Oe(n);
1054
+ $n(!0), Oe(n);
1052
1055
  }
1053
1056
  M(() => {
1054
1057
  if (q !== "table") return;
@@ -1057,67 +1060,68 @@ function Wc({
1057
1060
  const n = t.target;
1058
1061
  if (n && (n.tagName === "INPUT" || n.tagName === "TEXTAREA" || n.tagName === "SELECT" || n.isContentEditable))
1059
1062
  return;
1060
- const r = Ut ? oe.findIndex((s) => K(s) === Ut) : -1;
1063
+ const r = It ? oe.findIndex((s) => K(s) === It) : -1;
1061
1064
  if (t.key === "j" || t.key === "ArrowDown") {
1062
1065
  t.preventDefault();
1063
1066
  const s = oe[Math.min(r + 1, oe.length - 1)];
1064
- s && It(K(s));
1067
+ s && Vt(K(s));
1065
1068
  } else if (t.key === "k" || t.key === "ArrowUp") {
1066
1069
  t.preventDefault();
1067
1070
  const s = oe[Math.max(r - 1, 0)];
1068
- s && It(K(s));
1071
+ s && Vt(K(s));
1069
1072
  } else if (t.key === "Enter" && r >= 0 && !_e)
1070
- t.preventDefault(), Vt(oe[r]);
1073
+ t.preventDefault(), Gt(oe[r]);
1071
1074
  else if (t.key === "c" && r >= 0 && me) {
1072
1075
  t.preventDefault();
1073
1076
  const s = oe[r];
1074
1077
  ((o = s.claimed_by) == null ? void 0 : o.id) === S ? He.mutate(s) : Ae.mutate(s);
1075
- } else t.key === "o" && r >= 0 && (t.preventDefault(), xt(oe[r]));
1078
+ } else t.key === "o" && r >= 0 && (t.preventDefault(), yt(oe[r]));
1076
1079
  }
1077
1080
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
1078
- }, [q, oe, Ut, _e, S, Ae, He, me]);
1081
+ }, [q, oe, It, _e, S, Ae, He, me]);
1079
1082
  const { data: j } = W({
1080
1083
  queryKey: ["queue-views", l],
1081
1084
  queryFn: () => h.request(A(`/queues/${l}/views`)),
1082
1085
  enabled: !!l
1083
- }), [Xe, Ze] = w(null), [fl, Cn] = w(!1), [$n, Fr] = w(""), [Tr, Rr] = w(!1), [kt, Er] = w(!1);
1084
- function vt(e) {
1086
+ }), [Xe, Ze] = w(null), [vl, Fn] = w(!1), [Tn, Ar] = w(""), [Lr, Or] = w(!1), [vt, Dr] = w(!1);
1087
+ function wt(e) {
1085
1088
  const t = e.state ?? {};
1086
- Y(t.scope ?? "all"), Q({ ...ue.current, ...t.filters ?? {} }), Ue(t.sort ?? ""), ot(t.group_by ?? null), Qt(t.columns ?? null), tn(t.pins ?? null), t.view && je(Te.includes(t.view) ? t.view : Te[0]), O(1), Ze(e.id);
1089
+ Y(t.scope ?? "all"), Q({ ...ue.current, ...t.filters ?? {} }), Ue(t.sort ?? ""), ot(t.group_by ?? null), Bt(t.columns ?? null), rn(t.pins ?? null), t.view && je(Te.includes(t.view) ? t.view : Te[0]), O(1), Ze(e.id);
1087
1090
  }
1088
- function gl() {
1091
+ function wl() {
1089
1092
  var t, n;
1090
1093
  const e = j == null ? void 0 : j.data.find((r) => r.is_default);
1091
1094
  if (e) {
1092
- vt(e);
1095
+ wt(e);
1093
1096
  return;
1094
1097
  }
1095
- Y(((t = i == null ? void 0 : i.display_config) == null ? void 0 : t.default_scope) ?? "all"), Q({ ...ue.current }), Ue(""), ot(null), Qt(null), tn(null), (n = i == null ? void 0 : i.display_config) != null && n.default_view && je(i.display_config.default_view), O(1), Ze(null);
1098
+ Y(((t = i == null ? void 0 : i.display_config) == null ? void 0 : t.default_scope) ?? "all"), Q({ ...ue.current }), Ue(""), ot(null), Bt(null), rn(null), (n = i == null ? void 0 : i.display_config) != null && n.default_view && je(i.display_config.default_view), O(1), Ze(null);
1096
1099
  }
1097
1100
  M(() => {
1098
1101
  if (J || !(i != null && i.display_config) || Ye === void 0 || j === void 0) return;
1099
1102
  const e = Ye.data.default_view_id, t = e != null ? j.data.find((r) => r.id === e) : void 0, n = j.data.find((r) => r.is_default);
1100
- t ? vt(t) : n ? vt(n) : (je(i.display_config.default_view), Y(i.display_config.default_scope)), La(!0);
1103
+ t ? wt(t) : n ? wt(n) : (je(i.display_config.default_view), Y(i.display_config.default_scope)), Ma(!0);
1101
1104
  }, [i, Ye, j, J]);
1102
- const Gt = U(null), Wt = U(null);
1105
+ const Wt = U(null), Ht = U(null);
1103
1106
  M(() => {
1104
1107
  if (!J) return;
1105
- const e = Ms();
1108
+ const e = Is();
1106
1109
  if (!(e != null && e.restore) || e.queue_id !== l) return;
1107
- Na({ ...e, restore: !1 });
1110
+ Fa({ ...e, restore: !1 });
1108
1111
  const t = e.state ?? {};
1109
- t.scope && Y(t.scope), t.filters && Q({ ...ue.current, ...t.filters }), t.sort != null && Ue(t.sort), ot(t.group_by ?? null), t.view && je(t.view), t.page && O(t.page), Wt.current = e.scroll ?? 0;
1112
+ t.scope && Y(t.scope), t.filters && Q({ ...ue.current, ...t.filters }), t.sort != null && Ue(t.sort), ot(t.group_by ?? null), t.view && je(t.view), t.page && O(t.page), Ht.current = e.scroll ?? 0;
1110
1113
  }, [J, l]), M(() => {
1114
+ var s;
1111
1115
  if (!J || typeof window > "u") return;
1112
- const e = new URLSearchParams(window.location.search), t = e.get("scope");
1113
- if (t !== "all" && t !== "mine") return;
1114
- e.delete("scope");
1115
- const n = e.toString();
1116
+ const e = new URLSearchParams(window.location.search), t = e.get("scope"), n = ((s = e.get("state")) == null ? void 0 : s.trim()) || null, r = t === "all" || t === "mine";
1117
+ if (!r && !n) return;
1118
+ e.delete("scope"), e.delete("state");
1119
+ const o = e.toString();
1116
1120
  window.history.replaceState(
1117
1121
  window.history.state,
1118
1122
  "",
1119
- `${window.location.pathname}${n ? `?${n}` : ""}${window.location.hash}`
1120
- ), Y(t), O(1);
1123
+ `${window.location.pathname}${o ? `?${o}` : ""}${window.location.hash}`
1124
+ ), r && Y(t), n && Q((m) => ({ ...m, state: [n] })), O(1);
1121
1125
  }, [J]), M(() => {
1122
1126
  if (!J || typeof window > "u") return;
1123
1127
  const e = new URLSearchParams(window.location.search), t = e.get("owner");
@@ -1131,95 +1135,95 @@ function Wc({
1131
1135
  ), Y("all"), Q((r) => ({ ...r, owners: [t] })), Ze(null), O(1);
1132
1136
  }, [J]), M(() => {
1133
1137
  if (!J) return;
1134
- const e = Jo(zo(`queue:${l}`));
1135
- e && (Xo(), vt({
1138
+ const e = ts(ns(`queue:${l}`));
1139
+ e && (rs(), wt({
1136
1140
  id: -1,
1137
1141
  // Saved views type filters loosely as strings; multi-selects ride as arrays there too.
1138
1142
  state: e
1139
1143
  }), Ze(null), e.page && O(e.page));
1140
1144
  }, [J]);
1141
- const xl = () => ({
1145
+ const _l = () => ({
1142
1146
  scope: g,
1143
1147
  filters: _,
1144
1148
  sort: I,
1145
1149
  group_by: $,
1146
1150
  view: q,
1147
- columns: Mt,
1151
+ columns: Qt,
1148
1152
  pins: it,
1149
1153
  ...de > 1 ? { page: de } : {}
1150
1154
  });
1151
1155
  M(() => {
1152
- Wt.current == null || F.length === 0 || !Gt.current || (Gt.current.scrollTop = Wt.current, Wt.current = null);
1156
+ Ht.current == null || F.length === 0 || !Wt.current || (Wt.current.scrollTop = Ht.current, Ht.current = null);
1153
1157
  }, [F]);
1154
- const { isAdmin: De } = va(), yl = F.map((e) => `${e.collection}|${e.item_id}`).join(","), kl = V(
1158
+ const { isAdmin: De } = Sa(), Nl = F.map((e) => `${e.collection}|${e.item_id}`).join(","), Sl = V(
1155
1159
  () => F.map((e) => ({ collection: e.collection, id: e.item_id })),
1156
- [yl]
1157
- ), Ar = Vs(kl, De), vl = (e) => Ut === K(e) ? (
1160
+ [Nl]
1161
+ ), Kr = Js(Sl, De), Cl = (e) => It === K(e) ? (
1158
1162
  // Pinned sticky cells use bg-inherit — the highlight must be
1159
1163
  // OPAQUE (nvr-cyan/5-over-white equivalents) or horizontally
1160
1164
  // scrolled content bleeds through the pinned columns. Same
1161
1165
  // pair DataTable uses for selected rows when pins are active.
1162
1166
  "bg-[#f2fdff] dark:bg-[#20303a]"
1163
- ) : e.at_risk ? bs(e.at_risk_color ?? "red") : void 0, Lr = De || (i == null ? void 0 : i.owner) != null && i.owner === S, wl = Se({
1164
- mutationFn: ({ viewId: e, on: t }) => h.request(wa(`/queues/views/${e}`, { is_default: t })),
1167
+ ) : e.at_risk ? ys(e.at_risk_color ?? "red") : void 0, Yt = De || (i == null ? void 0 : i.owner) != null && i.owner === S, $l = Se({
1168
+ mutationFn: ({ viewId: e, on: t }) => h.request(Ca(`/queues/views/${e}`, { is_default: t })),
1165
1169
  onSuccess: () => {
1166
1170
  f.invalidateQueries({ queryKey: ["queue-views", l] }), D.success("Queue default view updated");
1167
1171
  },
1168
1172
  onError: () => D.error("Could not update the queue default view")
1169
- }), Or = Se({
1173
+ }), Pr = Se({
1170
1174
  mutationFn: () => h.request(
1171
1175
  se(`/queues/${l}/views`, {
1172
- name: $n.trim(),
1173
- is_shared: Tr || kt,
1174
- is_default: kt,
1176
+ name: Tn.trim(),
1177
+ is_shared: Yt && (Lr || vt),
1178
+ is_default: vt,
1175
1179
  state: {
1176
1180
  scope: g,
1177
1181
  filters: _,
1178
1182
  sort: I,
1179
1183
  group_by: $,
1180
1184
  view: q,
1181
- columns: Mt,
1185
+ columns: Qt,
1182
1186
  pins: it
1183
1187
  }
1184
1188
  })
1185
1189
  ),
1186
1190
  onSuccess: (e) => {
1187
- Cn(!1), Fr(""), Rr(!1), Er(!1), Ze(e.data.id), f.invalidateQueries({ queryKey: ["queue-views", l] }), D.success("View saved");
1191
+ Fn(!1), Ar(""), Or(!1), Dr(!1), Ze(e.data.id), f.invalidateQueries({ queryKey: ["queue-views", l] }), D.success("View saved");
1188
1192
  },
1189
1193
  onError: () => D.error("Failed to save view")
1190
- }), [Dr, Kr] = w(null), Ke = Se({
1194
+ }), [Mr, Qr] = w(null), Ke = Se({
1191
1195
  mutationFn: (e) => h.request(
1192
- wa(`/queues/views/${e.id}`, {
1196
+ Ca(`/queues/views/${e.id}`, {
1193
1197
  state: {
1194
1198
  scope: g,
1195
1199
  filters: _,
1196
1200
  sort: I,
1197
1201
  group_by: $,
1198
1202
  view: q,
1199
- columns: Mt,
1203
+ columns: Qt,
1200
1204
  pins: it
1201
1205
  }
1202
1206
  })
1203
1207
  ),
1204
1208
  onSuccess: (e, t) => {
1205
- f.invalidateQueries({ queryKey: ["queue-views", l] }), Kr(t.id), setTimeout(() => Kr((n) => n === t.id ? null : n), 2e3), D.success(`Saved "${t.name}" with the current filters, scope and sort`);
1209
+ f.invalidateQueries({ queryKey: ["queue-views", l] }), Qr(t.id), setTimeout(() => Qr((n) => n === t.id ? null : n), 2e3), D.success(`Saved "${t.name}" with the current filters, scope and sort`);
1206
1210
  },
1207
1211
  onError: () => D.error("Failed to update view")
1208
- }), [qn, Ht] = w(null);
1212
+ }), [Rn, Jt] = w(null);
1209
1213
  M(() => {
1210
- if (qn == null) return;
1211
- const e = setTimeout(() => Ht(null), 5e3);
1214
+ if (Rn == null) return;
1215
+ const e = setTimeout(() => Jt(null), 5e3);
1212
1216
  return () => clearTimeout(e);
1213
- }, [qn]);
1214
- const Pr = Se({
1215
- mutationFn: (e) => h.request(Mn(`/queues/views/${e}`)),
1217
+ }, [Rn]);
1218
+ const Br = Se({
1219
+ mutationFn: (e) => h.request(jn(`/queues/views/${e}`)),
1216
1220
  onSuccess: (e, t) => {
1217
- Ht(null), f.invalidateQueries({ queryKey: ["queue-views", l] }), Ze(null), Je === t && bn(null);
1221
+ Jt(null), f.invalidateQueries({ queryKey: ["queue-views", l] }), Ze(null), Je === t && fn(null);
1218
1222
  },
1219
1223
  onError: () => D.error("Failed to delete view")
1220
- }), _l = Se({
1221
- mutationFn: (e) => h.request(Oo(`/queues/${l}/default-view`, { view_id: e })),
1222
- onMutate: (e) => bn(e),
1224
+ }), ql = Se({
1225
+ mutationFn: (e) => h.request(Qo(`/queues/${l}/default-view`, { view_id: e })),
1226
+ onMutate: (e) => fn(e),
1223
1227
  onSuccess: (e, t) => {
1224
1228
  f.invalidateQueries({ queryKey: ["queue-column-prefs", l] }), D.success(
1225
1229
  t === null ? "Reverted to the general default" : "Set as your default view"
@@ -1228,20 +1232,20 @@ function Wc({
1228
1232
  onError: () => {
1229
1233
  f.invalidateQueries({ queryKey: ["queue-column-prefs", l] }), D.error("Failed to update default view");
1230
1234
  }
1231
- }), [Pe, et] = w([]), [ee, Mr] = w(!1), Nl = () => {
1232
- ee && et([]), Mr(!ee);
1235
+ }), [Pe, et] = w([]), [ee, jr] = w(!1), Fl = () => {
1236
+ ee && et([]), jr(!ee);
1233
1237
  };
1234
1238
  M(() => {
1235
- q !== "table" && ee && (Mr(!1), et([]));
1236
- }, [q, ee]), Lo(), Yn.current = Pe.length;
1237
- const [Qr, Br] = w(!1);
1238
- async function Fn(e, t) {
1239
+ q !== "table" && ee && (jr(!1), et([]));
1240
+ }, [q, ee]), Mo(), Xn.current = Pe.length;
1241
+ const [Ur, Ir] = w(!1);
1242
+ async function En(e, t) {
1239
1243
  const n = F.filter((m) => Pe.includes(K(m)));
1240
- Br(!0), Pt.beginBatch();
1244
+ Ir(!0), Mt.beginBatch();
1241
1245
  const r = await Promise.allSettled(n.map(t));
1242
- Pt.endBatch();
1246
+ Mt.endBatch();
1243
1247
  const o = r.filter((m) => m.status === "fulfilled").length, s = r.length - o;
1244
- Br(!1), et([]), f.invalidateQueries({ queryKey: ["queue-items", l] }), s ? D.warning(`${e}: ${o} succeeded, ${s} failed`) : D.success(`${e}: ${o} succeeded`);
1248
+ Ir(!1), et([]), f.invalidateQueries({ queryKey: ["queue-items", l] }), s ? D.warning(`${e}: ${o} succeeded, ${s} failed`) : D.success(`${e}: ${o} succeeded`);
1245
1249
  }
1246
1250
  const Me = (e) => {
1247
1251
  var t;
@@ -1250,19 +1254,19 @@ function Wc({
1250
1254
  if (r) return r;
1251
1255
  }
1252
1256
  return null;
1253
- }, Sl = (e) => {
1257
+ }, Tl = (e) => {
1254
1258
  if ($ === "state") return e === "No state" ? e : Le(e);
1255
- if ($ === "collection") return gt(e);
1259
+ if ($ === "collection") return xt(e);
1256
1260
  if ($ != null && $.startsWith("extra.") && e !== "—") {
1257
1261
  const t = Me($.slice(6));
1258
1262
  if (t) return tt(e, t);
1259
1263
  }
1260
1264
  return e;
1261
- }, Cl = le == null ? void 0 : le.map((e) => ({
1265
+ }, Rl = le == null ? void 0 : le.map((e) => ({
1262
1266
  key: e.key,
1263
1267
  rows: e.rows,
1264
1268
  header: /* @__PURE__ */ d(Ce, { children: [
1265
- /* @__PURE__ */ a("span", { children: Sl(e.key) }),
1269
+ /* @__PURE__ */ a("span", { children: Tl(e.key) }),
1266
1270
  /* @__PURE__ */ d("span", { className: "font-normal text-slate-400", children: [
1267
1271
  "(",
1268
1272
  ie(e.count),
@@ -1285,14 +1289,14 @@ function Wc({
1285
1289
  t
1286
1290
  );
1287
1291
  }),
1288
- be && !ye.has(e.key) && rl.has(e.key) && /* @__PURE__ */ a("span", { className: "font-normal text-slate-400", children: "loading…" }),
1292
+ be && !ye.has(e.key) && il.has(e.key) && /* @__PURE__ */ a("span", { className: "font-normal text-slate-400", children: "loading…" }),
1289
1293
  be && !ye.has(e.key) && e.rows.length > 0 && e.rows.length < e.count && /* @__PURE__ */ d(
1290
1294
  "button",
1291
1295
  {
1292
1296
  type: "button",
1293
1297
  "data-queue-group-more": e.key,
1294
1298
  onClick: (t) => {
1295
- t.stopPropagation(), br((n) => ({ ...n, [e.key]: (n[e.key] ?? 1) + 1 }));
1299
+ t.stopPropagation(), gr((n) => ({ ...n, [e.key]: (n[e.key] ?? 1) + 1 }));
1296
1300
  },
1297
1301
  className: "rounded px-1.5 py-0.5 text-[11px] font-medium text-nvr-navy hover:bg-nvr-cyan/10 dark:text-nvr-cyan",
1298
1302
  children: [
@@ -1313,13 +1317,13 @@ function Wc({
1313
1317
  " at risk"
1314
1318
  ] })
1315
1319
  ] })
1316
- })), Tn = (((la = c == null ? void 0 : c.available_values.collection) == null ? void 0 : la.length) ?? 0) > 1, jr = F.some((e) => !!e.unseen) || bt.size > 0 || F.some((e) => $e.isNew(K(e))), Ur = [
1317
- ...Tn ? [
1320
+ })), An = (((ca = c == null ? void 0 : c.available_values.collection) == null ? void 0 : ca.length) ?? 0) > 1, Vr = F.some((e) => !!e.unseen) || ht.size > 0 || F.some((e) => $e.isNew(K(e))), Gr = [
1321
+ ...An ? [
1318
1322
  {
1319
1323
  key: "collection",
1320
1324
  header: E("collection", "Collection"),
1321
1325
  sortable: !0,
1322
- render: (e) => /* @__PURE__ */ a(Zs, { variant: "outline", children: gt(e.collection) })
1326
+ render: (e) => /* @__PURE__ */ a(ai, { variant: "outline", children: xt(e.collection) })
1323
1327
  }
1324
1328
  ] : [],
1325
1329
  {
@@ -1327,22 +1331,22 @@ function Wc({
1327
1331
  header: E("label", "Item"),
1328
1332
  sortable: !0,
1329
1333
  // Room in the left padding for the hanging unseen mark (#643).
1330
- className: jr ? "pl-[30px]" : void 0,
1331
- headerClassName: jr ? "pl-[30px]" : void 0,
1334
+ className: Vr ? "pl-[30px]" : void 0,
1335
+ headerClassName: Vr ? "pl-[30px]" : void 0,
1332
1336
  render: (e) => (
1333
1337
  // Underlined because clicking opens the item. The row is clickable as
1334
1338
  // a whole, but nothing on it said so — an underline is the one
1335
1339
  // convention people already read as "this goes somewhere".
1336
1340
  /* @__PURE__ */ d("span", { className: "flex items-center gap-1.5", children: [
1337
- bt.get(K(e)) || $e.isNew(K(e)) ? /* @__PURE__ */ a(
1338
- Bs,
1341
+ ht.get(K(e)) || $e.isNew(K(e)) ? /* @__PURE__ */ a(
1342
+ Gs,
1339
1343
  {
1340
- lock: bt.get(K(e)),
1344
+ lock: ht.get(K(e)),
1341
1345
  isNew: $e.isNew(K(e)),
1342
1346
  dataAttr: "data-queue-live-mark",
1343
1347
  hang: !0
1344
1348
  }
1345
- ) : /* @__PURE__ */ a(Xs, { change: e.unseen, dataAttr: "data-queue-unseen", hang: !0 }),
1349
+ ) : /* @__PURE__ */ a(ri, { change: e.unseen, dataAttr: "data-queue-unseen", hang: !0 }),
1346
1350
  /* @__PURE__ */ a(
1347
1351
  "span",
1348
1352
  {
@@ -1361,9 +1365,9 @@ function Wc({
1361
1365
  t
1362
1366
  )),
1363
1367
  /* @__PURE__ */ a(
1364
- zs,
1368
+ ni,
1365
1369
  {
1366
- viewers: za[is(e.collection, e.item_id)],
1370
+ viewers: nl[ps(e.collection, e.item_id)],
1367
1371
  dataAttr: "data-queue-presence"
1368
1372
  }
1369
1373
  )
@@ -1394,13 +1398,13 @@ function Wc({
1394
1398
  key: "owners",
1395
1399
  header: E("owners", "Owners"),
1396
1400
  sortable: !0,
1397
- render: (e) => /* @__PURE__ */ a(oi, { owners: e.owners })
1401
+ render: (e) => /* @__PURE__ */ a(ui, { owners: e.owners })
1398
1402
  },
1399
1403
  {
1400
1404
  key: "aging_hours",
1401
1405
  header: E("aging_hours", "Aging"),
1402
1406
  sortable: !0,
1403
- render: (e) => xi(e.aging_hours)
1407
+ render: (e) => _i(e.aging_hours)
1404
1408
  },
1405
1409
  {
1406
1410
  // When the record entered its current state — the same moment Aging
@@ -1408,13 +1412,13 @@ function Wc({
1408
1412
  key: "state_entered",
1409
1413
  header: E("state_entered", "Last State Change"),
1410
1414
  sortable: !0,
1411
- render: (e) => e.state_entered_at ? Bo(e.state_entered_at, { type: "datetime", template: "MM/DD/YYYY - h:mmA" }) : /* @__PURE__ */ a("span", { className: "text-slate-300 dark:text-slate-600", children: "—" })
1415
+ render: (e) => e.state_entered_at ? Go(e.state_entered_at, { type: "datetime", template: "MM/DD/YYYY - h:mmA" }) : /* @__PURE__ */ a("span", { className: "text-slate-300 dark:text-slate-600", children: "—" })
1412
1416
  },
1413
1417
  {
1414
1418
  key: "sla_status",
1415
1419
  header: E("sla_status", "SLA"),
1416
1420
  sortable: !0,
1417
- render: (e) => /* @__PURE__ */ a(yi, { status: e.sla_status })
1421
+ render: (e) => /* @__PURE__ */ a(Ni, { status: e.sla_status })
1418
1422
  },
1419
1423
  {
1420
1424
  key: "at_risk",
@@ -1422,7 +1426,7 @@ function Wc({
1422
1426
  sortable: !0,
1423
1427
  render: (e) => {
1424
1428
  var t;
1425
- return e.at_risk ? /* @__PURE__ */ d("span", { className: ps(e.at_risk_color ?? "red"), children: [
1429
+ return e.at_risk ? /* @__PURE__ */ d("span", { className: xs(e.at_risk_color ?? "red"), children: [
1426
1430
  "⚑ ",
1427
1431
  ((t = e.at_risk_rule) == null ? void 0 : t.name) ?? "At risk"
1428
1432
  ] }) : e.predicted_risk ? /* @__PURE__ */ a("span", { className: "text-amber-500", title: e.predicted_note ?? void 0, children: "⚑ Predicted" }) : null;
@@ -1433,7 +1437,7 @@ function Wc({
1433
1437
  key: "addendums",
1434
1438
  header: E("addendums", "Addendums"),
1435
1439
  sortable: !1,
1436
- render: (e) => /* @__PURE__ */ a(gi, { summary: e.addendums })
1440
+ render: (e) => /* @__PURE__ */ a(wi, { summary: e.addendums })
1437
1441
  }
1438
1442
  ] : [],
1439
1443
  ...mt ? [
@@ -1442,7 +1446,7 @@ function Wc({
1442
1446
  header: E("fulfilment", "Shipped"),
1443
1447
  sortable: !0,
1444
1448
  render: (e) => /* @__PURE__ */ a(
1445
- As,
1449
+ Ps,
1446
1450
  {
1447
1451
  collection: e.collection,
1448
1452
  itemId: e.item_id,
@@ -1456,16 +1460,16 @@ function Wc({
1456
1460
  key: "integrations",
1457
1461
  header: E("integrations", "Integrations"),
1458
1462
  sortable: !1,
1459
- render: (e) => /* @__PURE__ */ a(Ds, { rows: cl[`${e.collection}:${e.item_id}`] })
1463
+ render: (e) => /* @__PURE__ */ a(Bs, { rows: bl[`${e.collection}:${e.item_id}`] })
1460
1464
  }
1461
1465
  ] : [],
1462
- ...vr ? [
1466
+ ...Sr ? [
1463
1467
  {
1464
1468
  key: "tasks",
1465
1469
  header: E("tasks", "Tasks"),
1466
1470
  sortable: !1,
1467
1471
  render: (e) => {
1468
- const t = ul[`${e.collection}:${e.item_id}`];
1472
+ const t = fl[`${e.collection}:${e.item_id}`];
1469
1473
  return !t || t.open === 0 ? /* @__PURE__ */ a("span", { className: "text-[11px] text-slate-400", children: "—" }) : /* @__PURE__ */ d(
1470
1474
  "span",
1471
1475
  {
@@ -1485,10 +1489,10 @@ function Wc({
1485
1489
  key: "send_backs",
1486
1490
  header: E("send_backs", "Sent back"),
1487
1491
  sortable: !0,
1488
- render: (e) => /* @__PURE__ */ a(bi, { summary: e.send_backs })
1492
+ render: (e) => /* @__PURE__ */ a(yi, { summary: e.send_backs })
1489
1493
  }
1490
1494
  ] : []
1491
- ], $l = {
1495
+ ], El = {
1492
1496
  key: "claim",
1493
1497
  header: "",
1494
1498
  render: (e) => e.claimed_by ? /* @__PURE__ */ a(
@@ -1512,7 +1516,7 @@ function Wc({
1512
1516
  children: "Claim"
1513
1517
  }
1514
1518
  )
1515
- }, wt = (i == null ? void 0 : i.available_extra_fields) ?? [], _t = To("drill.queue"), ae = _t.value, Ir = (e) => _t.push([e]), ql = (e) => {
1519
+ }, _t = (i == null ? void 0 : i.available_extra_fields) ?? [], Nt = Oo("drill.queue"), ae = Nt.value, Wr = (e) => Nt.push([e]), Al = (e) => {
1516
1520
  var t;
1517
1521
  for (const n of (i == null ? void 0 : i.sources) ?? []) {
1518
1522
  const r = (t = n.drilldown) == null ? void 0 : t[e];
@@ -1524,78 +1528,78 @@ function Wc({
1524
1528
  };
1525
1529
  }
1526
1530
  return { enabled: !0, layout_id: null, width: null };
1527
- }, Fl = V(() => {
1531
+ }, Ll = V(() => {
1528
1532
  const e = {};
1529
1533
  for (const t of (i == null ? void 0 : i.sources) ?? [])
1530
1534
  for (const [n, r] of Object.entries(t.column_formats ?? {}))
1531
1535
  n in e || (e[n] = r);
1532
1536
  return e;
1533
- }, [i == null ? void 0 : i.sources]), Tl = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Rl = /^\d{4}-\d{2}-\d{2}T\d{2}:/;
1534
- function El(e) {
1535
- if (Tl.test(e)) return { text: e.split("@")[0], title: e };
1536
- if (Rl.test(e)) {
1537
+ }, [i == null ? void 0 : i.sources]), Ol = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Dl = /^\d{4}-\d{2}-\d{2}T\d{2}:/;
1538
+ function Kl(e) {
1539
+ if (Ol.test(e)) return { text: e.split("@")[0], title: e };
1540
+ if (Dl.test(e)) {
1537
1541
  const t = new Date(e);
1538
1542
  if (!Number.isNaN(t.getTime()))
1539
1543
  return {
1540
- text: ws(t, { month: "2-digit", day: "2-digit", year: "2-digit" }),
1541
- title: vs(t)
1544
+ text: $s(t, { month: "2-digit", day: "2-digit", year: "2-digit" }),
1545
+ title: Cs(t)
1542
1546
  };
1543
1547
  }
1544
1548
  return { text: e, title: e };
1545
1549
  }
1546
- const Rn = Vo(u == null ? void 0 : u.inline_edit), Vr = Rn.enabled ? [
1550
+ const Ln = Jo(u == null ? void 0 : u.inline_edit), Hr = Ln.enabled ? [
1547
1551
  ...new Set(
1548
1552
  ((i == null ? void 0 : i.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
1549
1553
  )
1550
- ] : [], Al = Be({
1551
- queries: Vr.map((e) => ({
1554
+ ] : [], Pl = Be({
1555
+ queries: Hr.map((e) => ({
1552
1556
  queryKey: ["cbv-collection-meta", e],
1553
1557
  queryFn: () => h.request(A(`/collections/${e}`)).then((t) => t.data),
1554
1558
  staleTime: 10 * 6e4,
1555
1559
  retry: !1
1556
1560
  }))
1557
- }), En = /* @__PURE__ */ new Map();
1558
- Vr.forEach((e, t) => {
1561
+ }), On = /* @__PURE__ */ new Map();
1562
+ Hr.forEach((e, t) => {
1559
1563
  var r;
1560
- const n = (r = Al[t]) == null ? void 0 : r.data;
1561
- n && En.set(e, {
1564
+ const n = (r = Pl[t]) == null ? void 0 : r.data;
1565
+ n && On.set(e, {
1562
1566
  fields: new Map((n.fields ?? []).map((o) => [o.field, o])),
1563
1567
  relations: n.relations ?? []
1564
1568
  });
1565
1569
  });
1566
- const { data: Ll } = W({
1570
+ const { data: Ml } = W({
1567
1571
  queryKey: ["my-permissions"],
1568
1572
  queryFn: () => h.request(A("/security/my/permissions")).then((e) => e.data),
1569
- enabled: Rn.enabled && !De,
1573
+ enabled: Ln.enabled && !De,
1570
1574
  staleTime: 5 * 6e4
1571
- }), Gr = Us(), Wr = (e, t) => {
1575
+ }), Yr = Hs(), Jr = (e, t) => {
1572
1576
  if (t.includes(".")) return null;
1573
- const n = En.get(e.collection);
1577
+ const n = On.get(e.collection);
1574
1578
  if (!n) return null;
1575
- const r = bt.get(K(e));
1576
- return r && !r.is_mine ? null : Ho({
1577
- config: Rn,
1579
+ const r = ht.get(K(e));
1580
+ return r && !r.is_mine ? null : Zo({
1581
+ config: Ln,
1578
1582
  key: t,
1579
1583
  field: n.fields.get(t),
1580
1584
  collection: e.collection,
1581
1585
  relations: n.relations,
1582
- mayUpdate: De || Fs(Ll, e.collection)
1586
+ mayUpdate: De || Ls(Ml, e.collection)
1583
1587
  });
1584
- }, Hr = (e, t, n) => {
1588
+ }, zr = (e, t, n) => {
1585
1589
  var r, o, s;
1586
1590
  return n === "m2o" ? ((o = (r = e.extra_ids) == null ? void 0 : r[t]) == null ? void 0 : o[0]) ?? null : ((s = e.extra) == null ? void 0 : s[t]) ?? null;
1587
- }, Ol = (e, t, n, r, o) => {
1588
- const s = (b) => `${K(e)}|${b}`, m = [...te].filter((b) => b.startsWith("extra.")).map((b) => b.slice(6)).filter((b) => !!Wr(e, b)), p = o === 0 ? null : Yo(m, t, o), N = (b) => b.collection === e.collection && b.item_id === e.item_id, k = (b) => N(b) ? n === "m2o" ? {
1591
+ }, Ql = (e, t, n, r, o) => {
1592
+ const s = (b) => `${K(e)}|${b}`, m = [...te].filter((b) => b.startsWith("extra.")).map((b) => b.slice(6)).filter((b) => !!Jr(e, b)), p = o === 0 ? null : es(m, t, o), N = (b) => b.collection === e.collection && b.item_id === e.item_id, k = (b) => N(b) ? n === "m2o" ? {
1589
1593
  ...b,
1590
1594
  extra_ids: { ...b.extra_ids ?? {}, [t]: r == null ? [] : [String(r)] }
1591
1595
  } : { ...b, extra: { ...b.extra ?? {}, [t]: r } } : b;
1592
- Gr.commit({
1596
+ Yr.commit({
1593
1597
  cellKey: s(t),
1594
1598
  collection: e.collection,
1595
1599
  id: e.item_id,
1596
1600
  field: t,
1597
1601
  kind: n,
1598
- before: Hr(e, t, n),
1602
+ before: zr(e, t, n),
1599
1603
  value: r,
1600
1604
  next: p ? s(p) : null,
1601
1605
  optimistic: () => {
@@ -1610,42 +1614,42 @@ function Wc({
1610
1614
  // Labels, rollups and the row's place in the queue follow the server.
1611
1615
  onSaved: () => void f.invalidateQueries({ queryKey: ["queue-items", l] })
1612
1616
  });
1613
- }, Dl = (e, t, n) => {
1614
- const r = Wr(e, t);
1617
+ }, Bl = (e, t, n) => {
1618
+ const r = Jr(e, t);
1615
1619
  if (!r) return n;
1616
- const o = En.get(e.collection), s = o == null ? void 0 : o.fields.get(t);
1620
+ const o = On.get(e.collection), s = o == null ? void 0 : o.fields.get(t);
1617
1621
  return /* @__PURE__ */ a(
1618
- Is,
1622
+ Ys,
1619
1623
  {
1620
- controller: Gr,
1624
+ controller: Yr,
1621
1625
  cellKey: `${K(e)}|${t}`,
1622
1626
  kind: r,
1623
- value: Hr(e, t, r),
1627
+ value: zr(e, t, r),
1624
1628
  label: E(`extra.${t}`, lt(t)),
1625
- choices: s ? Wo(s) : void 0,
1626
- target: r === "m2o" && o ? Go(o.relations, e.collection, t) : null,
1627
- onCommit: (m, p) => Ol(e, t, r, m, p),
1629
+ choices: s ? Xo(s) : void 0,
1630
+ target: r === "m2o" && o ? zo(o.relations, e.collection, t) : null,
1631
+ onCommit: (m, p) => Ql(e, t, r, m, p),
1628
1632
  children: n
1629
1633
  }
1630
1634
  );
1631
- }, Kl = wt.map((e) => ({
1635
+ }, jl = _t.map((e) => ({
1632
1636
  key: `extra.${e}`,
1633
1637
  header: E(`extra.${e}`, lt(e)),
1634
1638
  sortable: !0,
1635
- render: (t) => Dl(t, e, Pl(t, e))
1639
+ render: (t) => Bl(t, e, Ul(t, e))
1636
1640
  }));
1637
- function Pl(e, t) {
1641
+ function Ul(e, t) {
1638
1642
  var n, r;
1639
1643
  {
1640
1644
  const o = (n = e.extra) == null ? void 0 : n[t];
1641
1645
  if (o == null || o === "") return /* @__PURE__ */ a("span", { className: "text-slate-300", children: "—" });
1642
- const s = Me(t), m = s ? tt(String(o), s) : String(o), { text: p, title: N } = El(m), k = ((i == null ? void 0 : i.extra_field_meta) ?? []).find((v) => v.path === t), b = ((r = e.extra_ids) == null ? void 0 : r[t]) ?? [], C = ql(t);
1646
+ const s = Me(t), m = s ? tt(String(o), s) : String(o), { text: p, title: N } = Kl(m), k = ((i == null ? void 0 : i.extra_field_meta) ?? []).find((v) => v.path === t), b = ((r = e.extra_ids) == null ? void 0 : r[t]) ?? [], C = Al(t);
1643
1647
  return (k == null ? void 0 : k.kind) === "relation" && k.target_collection && b.length > 0 && C.enabled && !k.aggregate ? /* @__PURE__ */ a(
1644
1648
  "button",
1645
1649
  {
1646
1650
  type: "button",
1647
1651
  onClick: (v) => {
1648
- v.stopPropagation(), Ir({
1652
+ v.stopPropagation(), Wr({
1649
1653
  collection: k.target_collection,
1650
1654
  itemId: b[0],
1651
1655
  layoutId: C.layout_id,
@@ -1662,7 +1666,7 @@ function Wc({
1662
1666
  {
1663
1667
  type: "button",
1664
1668
  onClick: (v) => {
1665
- v.stopPropagation(), un({ row: e, path: t, value: m });
1669
+ v.stopPropagation(), pn({ row: e, path: t, value: m });
1666
1670
  },
1667
1671
  title: "Show the rows behind this number",
1668
1672
  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",
@@ -1671,8 +1675,8 @@ function Wc({
1671
1675
  ) : /* @__PURE__ */ a("span", { className: "block max-w-[200px] truncate text-[12px]", title: N, children: p });
1672
1676
  }
1673
1677
  }
1674
- const Yr = [
1675
- ...Tn ? ["collection"] : [],
1678
+ const Xr = [
1679
+ ...An ? ["collection"] : [],
1676
1680
  "state",
1677
1681
  "owners",
1678
1682
  "aging_hours",
@@ -1683,10 +1687,10 @@ function Wc({
1683
1687
  ...mt ? ["fulfilment"] : [],
1684
1688
  ...ve ? ["integrations"] : [],
1685
1689
  ...pt ? ["send_backs"] : [],
1686
- ...vr ? ["tasks"] : [],
1687
- ...wt.map((e) => `extra.${e}`)
1688
- ], Ml = [
1689
- ...Tn ? ["collection"] : [],
1690
+ ...Sr ? ["tasks"] : [],
1691
+ ..._t.map((e) => `extra.${e}`)
1692
+ ], Il = [
1693
+ ...An ? ["collection"] : [],
1690
1694
  "state",
1691
1695
  "owners",
1692
1696
  ...ze ? ["addendums"] : [],
@@ -1696,30 +1700,30 @@ function Wc({
1696
1700
  "aging_hours",
1697
1701
  "sla_status",
1698
1702
  "at_risk",
1699
- ...wt.slice(0, 2).map((e) => `extra.${e}`)
1700
- ], Ql = (u == null ? void 0 : u.default_columns) ?? null, An = Mt ?? Ql, te = new Set(An ?? Ml);
1701
- ze && !Rt.has("addendums") && te.add("addendums"), mt && !Rt.has("fulfilment") && te.add("fulfilment"), ve && !Rt.has("integrations") && te.add("integrations"), pt && !Rt.has("send_backs") && te.add("send_backs");
1702
- const Bl = new Set(De ? [] : (u == null ? void 0 : u.admin_only_columns) ?? []);
1703
- for (const e of Bl) te.delete(e);
1704
- const Nt = [
1705
- ...(An ?? []).filter((e) => Yr.includes(e)),
1706
- ...Yr.filter((e) => !(An ?? []).includes(e))
1707
- ], jl = zl(Xl(Zl, { activationConstraint: { distance: 4 } }));
1708
- function Ul(e) {
1703
+ ..._t.slice(0, 2).map((e) => `extra.${e}`)
1704
+ ], Vl = (u == null ? void 0 : u.default_columns) ?? null, Dn = Qt ?? Vl, te = new Set(Dn ?? Il);
1705
+ ze && !Et.has("addendums") && te.add("addendums"), mt && !Et.has("fulfilment") && te.add("fulfilment"), ve && !Et.has("integrations") && te.add("integrations"), pt && !Et.has("send_backs") && te.add("send_backs");
1706
+ const Gl = new Set(De ? [] : (u == null ? void 0 : u.admin_only_columns) ?? []);
1707
+ for (const e of Gl) te.delete(e);
1708
+ const St = [
1709
+ ...(Dn ?? []).filter((e) => Xr.includes(e)),
1710
+ ...Xr.filter((e) => !(Dn ?? []).includes(e))
1711
+ ], Wl = no(ro(ao, { activationConstraint: { distance: 4 } }));
1712
+ function Hl(e) {
1709
1713
  const { active: t, over: n } = e;
1710
1714
  if (!n || t.id === n.id) return;
1711
- const r = Nt.indexOf(String(t.id)), o = Nt.indexOf(String(n.id));
1712
- r === -1 || o === -1 || Qt(
1713
- ao(Nt, r, o).filter((s) => te.has(s))
1715
+ const r = St.indexOf(String(t.id)), o = St.indexOf(String(n.id));
1716
+ r === -1 || o === -1 || Bt(
1717
+ co(St, r, o).filter((s) => te.has(s))
1714
1718
  );
1715
1719
  }
1716
- const Jr = Ur.find((e) => e.key === "label"), Il = {
1717
- ...Jr,
1720
+ const Zr = Gr.find((e) => e.key === "label"), Yl = {
1721
+ ...Zr,
1718
1722
  render: (e, ...t) => /* @__PURE__ */ d("span", { className: "inline-flex min-w-0 items-center gap-1.5", children: [
1719
- /* @__PURE__ */ a($s, { rowId: e.item_id }),
1720
- Jr.render(e, ...t)
1723
+ /* @__PURE__ */ a(Es, { rowId: e.item_id }),
1724
+ Zr.render(e, ...t)
1721
1725
  ] })
1722
- }, Vl = ((u == null ? void 0 : u.formula_columns) ?? []).map(
1726
+ }, Jl = ((u == null ? void 0 : u.formula_columns) ?? []).map(
1723
1727
  (e) => ({
1724
1728
  key: `formula.${e.key}`,
1725
1729
  header: e.label,
@@ -1727,7 +1731,7 @@ function Wc({
1727
1731
  const n = {
1728
1732
  ...t,
1729
1733
  ...t.extra ? Object.fromEntries(Object.entries(t.extra).map(([s, m]) => [`extra.${s}`, m])) : {}
1730
- }, r = Do(e.formula, (s) => {
1734
+ }, r = Bo(e.formula, (s) => {
1731
1735
  const m = n[s] ?? (t.extra ? t.extra[s] : void 0), p = Number(m);
1732
1736
  return Number.isFinite(p) ? p : m ?? null;
1733
1737
  });
@@ -1736,63 +1740,63 @@ function Wc({
1736
1740
  return Number.isFinite(o) ? /* @__PURE__ */ a("span", { className: "tabular-nums", children: e.format === "currency" ? o.toLocaleString(void 0, { style: "currency", currency: "USD" }) : o.toLocaleString() }) : /* @__PURE__ */ a("span", { children: String(r) });
1737
1741
  }
1738
1742
  })
1739
- ), Ln = [...Ur, ...Kl, ...Vl], zr = ai(
1740
- Nt,
1743
+ ), Kn = [...Gr, ...jl, ...Jl], ea = ci(
1744
+ St,
1741
1745
  (e) => {
1742
1746
  var n;
1743
- const t = (n = Ln.find((r) => r.key === e)) == null ? void 0 : n.header;
1747
+ const t = (n = Kn.find((r) => r.key === e)) == null ? void 0 : n.header;
1744
1748
  return typeof t == "string" ? t : e;
1745
1749
  },
1746
1750
  te
1747
- ), Gl = {
1751
+ ), zl = {
1748
1752
  key: "__actions__",
1749
1753
  header: "",
1750
- render: (e) => e.collection === "tasks" || e.collection === Xt ? null : /* @__PURE__ */ a("span", { onClick: (t) => t.stopPropagation(), children: /* @__PURE__ */ a(
1751
- qs,
1754
+ render: (e) => e.collection === "tasks" || e.collection === en ? null : /* @__PURE__ */ a("span", { onClick: (t) => t.stopPropagation(), children: /* @__PURE__ */ a(
1755
+ As,
1752
1756
  {
1753
1757
  collection: e.collection,
1754
1758
  id: e.item_id,
1755
1759
  hasPipeline: e.state != null,
1756
- onOpen: () => xt(e),
1760
+ onOpen: () => yt(e),
1757
1761
  onPeek: () => Oe(e),
1758
1762
  urlFor: H.urlFor,
1759
1763
  onDeleted: () => {
1760
- h.request(Mn(`/items/${e.collection}/${e.item_id}`)).then(() => {
1764
+ h.request(jn(`/items/${e.collection}/${e.item_id}`)).then(() => {
1761
1765
  D.success("Moved to trash"), f.invalidateQueries({ queryKey: ["queue-items", l] });
1762
- }).catch((t) => D.error($t(t, "Delete failed")));
1766
+ }).catch((t) => D.error(qt(t, "Delete failed")));
1763
1767
  },
1764
1768
  onAfterTransition: () => void f.invalidateQueries({ queryKey: ["queue-items", l] }),
1765
1769
  bulkEnabledKeys: (u == null ? void 0 : u.bulk_action_keys) ?? null,
1766
1770
  disabled: ee
1767
1771
  }
1768
1772
  ) })
1769
- }, Yt = [
1770
- Il,
1771
- ...Nt.filter((e) => te.has(e)).map((e) => Ln.find((t) => t.key === e)).filter((e) => e !== void 0),
1772
- ...me ? [$l] : [],
1773
- Gl
1774
- ], Xr = V(() => {
1773
+ }, zt = [
1774
+ Yl,
1775
+ ...St.filter((e) => te.has(e)).map((e) => Kn.find((t) => t.key === e)).filter((e) => e !== void 0),
1776
+ ...me ? [El] : [],
1777
+ zl
1778
+ ], ta = V(() => {
1775
1779
  var r;
1776
- const e = u == null ? void 0 : u.default_pins, t = it ?? (e && Object.keys(e).length > 0 ? e : { [((r = Yt[0]) == null ? void 0 : r.key) ?? "label"]: "left" }), n = new Set(Yt.map((o) => o.key));
1780
+ const e = u == null ? void 0 : u.default_pins, t = it ?? (e && Object.keys(e).length > 0 ? e : { [((r = zt[0]) == null ? void 0 : r.key) ?? "label"]: "left" }), n = new Set(zt.map((o) => o.key));
1777
1781
  return Object.fromEntries(Object.entries(t).filter(([o]) => n.has(o)));
1778
- }, [it, u == null ? void 0 : u.default_pins, Yt.map((e) => e.key).join("|")]), Zr = [
1782
+ }, [it, u == null ? void 0 : u.default_pins, zt.map((e) => e.key).join("|")]), na = [
1779
1783
  { value: "state", label: "State" },
1780
1784
  { value: "collection", label: "Collection" },
1781
1785
  { value: "sla_status", label: "SLA status" },
1782
1786
  { value: "at_risk", label: "At risk" },
1783
1787
  { value: "owners", label: "Owner" },
1784
1788
  { value: "aging", label: "Aging" },
1785
- ...wt.filter((e) => te.has(`extra.${e}`)).map((e) => ({ value: `extra.${e}`, label: E(`extra.${e}`, lt(e)) }))
1786
- ], ea = (e) => async (t, n) => {
1789
+ ..._t.filter((e) => te.has(`extra.${e}`)).map((e) => ({ value: `extra.${e}`, label: E(`extra.${e}`, lt(e)) }))
1790
+ ], ra = (e) => async (t, n) => {
1787
1791
  if (!e.target_collection || !e.display_field) return [];
1788
1792
  const r = {
1789
1793
  limit: 25,
1790
1794
  sort: e.display_field,
1791
1795
  // Records hidden from pickers (a retired zone) are not offered.
1792
1796
  picker: "1"
1793
- }, o = n != null && n.narrowBy.length ? ds(
1797
+ }, o = n != null && n.narrowBy.length ? hs(
1794
1798
  e.target_collection,
1795
- await us(h, f, e.target_collection),
1799
+ await fs(h, f, e.target_collection),
1796
1800
  n.narrowBy
1797
1801
  ) : null, s = [
1798
1802
  ...t.trim() ? [{ [e.display_field]: { _contains: t.trim() } }] : [],
@@ -1803,20 +1807,20 @@ function Wc({
1803
1807
  A(`/items/${e.target_collection}`, r)
1804
1808
  )).data ?? [], N = Me(e.path), k = Fe[e.path] ? new Set(Fe[e.path]) : null, b = /* @__PURE__ */ new Set(), C = [];
1805
1809
  for (const v of p) {
1806
- const z = v[e.display_field];
1807
- if (z == null || z === "") continue;
1808
- const X = String(z);
1809
- b.has(X) || k && !k.has(X) || (b.add(X), C.push({ label: N ? tt(X, N) : X, value: X }));
1810
+ const X = v[e.display_field];
1811
+ if (X == null || X === "") continue;
1812
+ const Z = String(X);
1813
+ b.has(Z) || k && !k.has(Z) || (b.add(Z), C.push({ label: N ? tt(Z, N) : Z, value: Z }));
1810
1814
  }
1811
1815
  return C;
1812
- }, On = new Map(((i == null ? void 0 : i.extra_field_meta) ?? []).map((e) => [e.path, e])), Qe = [
1816
+ }, Pn = new Map(((i == null ? void 0 : i.extra_field_meta) ?? []).map((e) => [e.path, e])), Qe = [
1813
1817
  {
1814
1818
  key: "collection",
1815
1819
  placeholder: E("collection", "Collection"),
1816
1820
  type: "combobox",
1817
1821
  multi: !0,
1818
1822
  options: ((c == null ? void 0 : c.available_values.collection) ?? []).map((e) => ({
1819
- label: gt(e),
1823
+ label: xt(e),
1820
1824
  value: e
1821
1825
  }))
1822
1826
  },
@@ -1827,7 +1831,7 @@ function Wc({
1827
1831
  multi: !0,
1828
1832
  // Until the rows land, the pipeline's own states (no counts yet) rather
1829
1833
  // than an empty list.
1830
- options: $r(
1834
+ options: Rr(
1831
1835
  c ? c.available_values.state ?? [] : Object.keys(we)
1832
1836
  ).map((e) => {
1833
1837
  var t;
@@ -1836,7 +1840,7 @@ function Wc({
1836
1840
  value: e,
1837
1841
  // How many rows sit in it under the other active filters (the State
1838
1842
  // filter itself left out, or every other state would read 0).
1839
- count: hr ? hr[e] ?? 0 : (t = x == null ? void 0 : x.by_state) == null ? void 0 : t[e]
1843
+ count: xr ? xr[e] ?? 0 : (t = x == null ? void 0 : x.by_state) == null ? void 0 : t[e]
1840
1844
  };
1841
1845
  })
1842
1846
  },
@@ -1859,12 +1863,12 @@ function Wc({
1859
1863
  { label: "No", value: "no" }
1860
1864
  ]
1861
1865
  },
1862
- ..._r.length > 0 ? [
1866
+ ...$r.length > 0 ? [
1863
1867
  {
1864
1868
  key: "at_risk_rule",
1865
1869
  placeholder: "Highlight rule",
1866
1870
  type: "select",
1867
- options: _r
1871
+ options: $r
1868
1872
  }
1869
1873
  ] : [],
1870
1874
  {
@@ -1891,7 +1895,7 @@ function Wc({
1891
1895
  key: "integrations",
1892
1896
  placeholder: E("integrations", "Integrations"),
1893
1897
  type: "select",
1894
- options: Ks.map((e) => ({ label: e.label, value: e.value }))
1898
+ options: js.map((e) => ({ label: e.label, value: e.value }))
1895
1899
  }
1896
1900
  ] : [],
1897
1901
  ...mt ? [
@@ -1899,7 +1903,7 @@ function Wc({
1899
1903
  key: "fulfilment",
1900
1904
  placeholder: "Shipped",
1901
1905
  type: "select",
1902
- options: Ls
1906
+ options: Ms
1903
1907
  }
1904
1908
  ] : [],
1905
1909
  ...pt ? [
@@ -1914,13 +1918,13 @@ function Wc({
1914
1918
  ]
1915
1919
  }
1916
1920
  ] : [],
1917
- ...pn.length > 0 ? [
1921
+ ...hn.length > 0 ? [
1918
1922
  {
1919
1923
  key: "labels",
1920
1924
  placeholder: "Triage label",
1921
1925
  type: "combobox",
1922
1926
  multi: !0,
1923
- options: pn.map((e) => ({ label: e, value: e }))
1927
+ options: hn.map((e) => ({ label: e, value: e }))
1924
1928
  }
1925
1929
  ] : [],
1926
1930
  {
@@ -1942,9 +1946,9 @@ function Wc({
1942
1946
  value: e.id
1943
1947
  }))
1944
1948
  },
1945
- ...wt.map((e) => {
1949
+ ..._t.map((e) => {
1946
1950
  var m, p;
1947
- const t = On.get(e), n = E(`extra.${e}`, lt(e)), r = { key: `extra.${e}`, placeholder: n }, o = Me(e);
1951
+ const t = Pn.get(e), n = E(`extra.${e}`, lt(e)), r = { key: `extra.${e}`, placeholder: n }, o = Me(e);
1948
1952
  if ((o == null ? void 0 : o.type) === "datetime") return { ...r, type: "date" };
1949
1953
  if ((o == null ? void 0 : o.type) === "number") return { ...r, type: "number" };
1950
1954
  if ((o == null ? void 0 : o.type) === "boolean")
@@ -1967,26 +1971,26 @@ function Wc({
1967
1971
  type: "combobox",
1968
1972
  multi: !0,
1969
1973
  restricted: !!((p = Fe[e]) != null && p.length),
1970
- loadOptions: ea(t)
1974
+ loadOptions: ra(t)
1971
1975
  } : { ...r, placeholder: `Search ${n}…`, type: "text" };
1972
1976
  })
1973
- ], Dn = Qe.filter(
1977
+ ], Mn = Qe.filter(
1974
1978
  (e) => te.has(e.key) || e.key === "label" || e.key === "owners"
1975
- ), Kn = (e) => {
1979
+ ), Qn = (e) => {
1976
1980
  var t;
1977
1981
  return (((t = Qe.find((n) => n.key === e)) == null ? void 0 : t.placeholder) ?? e).replace(/^Search\s+/, "").replace(/…$/, "");
1978
- }, Pn = (() => {
1982
+ }, Bn = (() => {
1979
1983
  var n, r;
1980
1984
  const e = [];
1981
1985
  for (const [o, s] of Object.entries(Re)) {
1982
1986
  if (!s || Array.isArray(s) && s.length === 0) continue;
1983
- const m = Qe.find((b) => b.key === o), p = o.startsWith("extra.") ? o.slice(6) : null, N = p ? Me(p) : null, k = Ko({
1984
- field: Kn(o),
1987
+ const m = Qe.find((b) => b.key === o), p = o.startsWith("extra.") ? o.slice(6) : null, N = p ? Me(p) : null, k = jo({
1988
+ field: Qn(o),
1985
1989
  type: (m == null ? void 0 : m.type) ?? "select",
1986
1990
  value: s,
1987
1991
  optionLabel: (b) => {
1988
1992
  var C, v;
1989
- return (v = (C = m == null ? void 0 : m.options) == null ? void 0 : C.find((z) => z.value === b)) == null ? void 0 : v.label;
1993
+ return (v = (C = m == null ? void 0 : m.options) == null ? void 0 : C.find((X) => X.value === b)) == null ? void 0 : v.label;
1990
1994
  },
1991
1995
  currency: (N == null ? void 0 : N.type) === "number" && N.prefix === "$",
1992
1996
  rangeUnit: m == null ? void 0 : m.range_unit
@@ -1994,7 +1998,7 @@ function Wc({
1994
1998
  k && e.push(k);
1995
1999
  }
1996
2000
  const t = c == null ? void 0 : c.total;
1997
- return Po({
2001
+ return Uo({
1998
2002
  noun: "items",
1999
2003
  scope: g === "mine" ? "you own" : g === "unowned" ? "with no owners" : g === "claimed" ? "you claimed" : null,
2000
2004
  viewName: ((r = (n = j == null ? void 0 : j.data) == null ? void 0 : n.find((o) => o.id === Xe)) == null ? void 0 : r.name) ?? null,
@@ -2002,7 +2006,7 @@ function Wc({
2002
2006
  shown: typeof t == "number" ? t : null,
2003
2007
  of: (x == null ? void 0 : x.total) ?? null
2004
2008
  });
2005
- })(), St = new Set(Object.keys(ue.current)), Wl = ((e) => {
2009
+ })(), Ct = new Set(Object.keys(ue.current)), Xl = ((e) => {
2006
2010
  var n;
2007
2011
  if (e.some((r) => r.key === "state")) return e;
2008
2012
  const t = Qe.find((r) => r.key === "state");
@@ -2011,19 +2015,19 @@ function Wc({
2011
2015
  (() => {
2012
2016
  var o;
2013
2017
  const e = (s) => {
2014
- var z, X, T;
2018
+ var X, Z, T;
2015
2019
  if (!s.key.startsWith("extra.")) return null;
2016
2020
  if (s.type === "combobox") return s;
2017
- const m = s.key.slice(6), p = On.get(m), N = St.has(s.key);
2021
+ const m = s.key.slice(6), p = Pn.get(m), N = Ct.has(s.key);
2018
2022
  if ((p == null ? void 0 : p.kind) !== "relation" && !N) return null;
2019
- const k = Me(m), b = (z = c == null ? void 0 : c.available_values.extra) == null ? void 0 : z[m], C = s.placeholder.replace(/^Search (.*)…$/, "$1"), v = (p == null ? void 0 : p.kind) === "relation" && p.target_collection && p.display_field ? { collection: p.target_collection, field: p.display_field } : void 0;
2023
+ const k = Me(m), b = (X = c == null ? void 0 : c.available_values.extra) == null ? void 0 : X[m], C = s.placeholder.replace(/^Search (.*)…$/, "$1"), v = (p == null ? void 0 : p.kind) === "relation" && p.target_collection && p.display_field ? { collection: p.target_collection, field: p.display_field } : void 0;
2020
2024
  return b != null && b.length ? {
2021
2025
  key: s.key,
2022
2026
  placeholder: C,
2023
2027
  type: "combobox",
2024
2028
  multi: !0,
2025
2029
  cascade: v,
2026
- restricted: !!((X = Fe[m]) != null && X.length),
2030
+ restricted: !!((Z = Fe[m]) != null && Z.length),
2027
2031
  options: b.map((ne) => ({
2028
2032
  label: k && k.type !== "number" ? tt(ne, k) : ne,
2029
2033
  value: ne
@@ -2035,40 +2039,40 @@ function Wc({
2035
2039
  multi: !0,
2036
2040
  cascade: v,
2037
2041
  restricted: !!((T = Fe[m]) != null && T.length),
2038
- loadOptions: ea(p)
2042
+ loadOptions: ra(p)
2039
2043
  } : null;
2040
2044
  };
2041
- if (er.length > 0) {
2045
+ if (rr.length > 0) {
2042
2046
  const s = [], m = /* @__PURE__ */ new Set();
2043
- for (const p of er) {
2047
+ for (const p of rr) {
2044
2048
  const N = (p.path ?? []).join(".");
2045
2049
  let k;
2046
2050
  if (p.key === "state" || /(^|_)state$/.test(((o = p.path) == null ? void 0 : o[0]) ?? ""))
2047
2051
  k = Qe.find((b) => b.key === "state");
2048
2052
  else {
2049
2053
  const b = Qe.filter((v) => {
2050
- var X;
2054
+ var Z;
2051
2055
  if (!v.key.startsWith("extra.") || m.has(v.key)) return !1;
2052
- const z = v.key.slice(6);
2053
- return ((X = On.get(z)) == null ? void 0 : X.target_collection) === p.collection;
2056
+ const X = v.key.slice(6);
2057
+ return ((Z = Pn.get(X)) == null ? void 0 : Z.target_collection) === p.collection;
2054
2058
  }), C = b.find((v) => v.key.slice(6).startsWith(`${N}.`)) ?? b[0];
2055
2059
  k = C ? e(C) : null;
2056
2060
  }
2057
2061
  !k || m.has(k.key) || (m.add(k.key), s.push(p.label ? { ...k, placeholder: p.label } : k));
2058
2062
  }
2059
2063
  for (const p of Qe.map(e))
2060
- p && !m.has(p.key) && (St.has(p.key) || p.restricted) && s.push(p);
2064
+ p && !m.has(p.key) && (Ct.has(p.key) || p.restricted) && s.push(p);
2061
2065
  if (s.length > 0) return s;
2062
2066
  }
2063
- const t = Dn.map(e).filter((s) => s !== null), r = [
2064
- ...t.filter((s) => St.has(s.key) || s.restricted),
2065
- ...t.filter((s) => !St.has(s.key) && !s.restricted)
2067
+ const t = Mn.map(e).filter((s) => s !== null), r = [
2068
+ ...t.filter((s) => Ct.has(s.key) || s.restricted),
2069
+ ...t.filter((s) => !Ct.has(s.key) && !s.restricted)
2066
2070
  ].slice(0, 6);
2067
- return r.length > 0 ? r : Dn.filter((s) => s.key === "state" || s.key === "owners");
2071
+ return r.length > 0 ? r : Mn.filter((s) => s.key === "state" || s.key === "owners");
2068
2072
  })()
2069
- ), Hl = (() => {
2073
+ ), Zl = (() => {
2070
2074
  if (!x) return null;
2071
- const e = Z ?? x, t = [
2075
+ const e = z ?? x, t = [
2072
2076
  {
2073
2077
  key: "breached",
2074
2078
  n: e.sla_breached,
@@ -2138,17 +2142,17 @@ function Wc({
2138
2142
  }
2139
2143
  );
2140
2144
  })();
2141
- function Yl(e) {
2145
+ function eo(e) {
2142
2146
  const t = new Set(te);
2143
- t.has(e) ? (t.delete(e), (e === "addendums" || e === "integrations") && In((n) => new Set(n).add(e))) : (t.add(e), (e === "addendums" || e === "integrations") && In((n) => {
2147
+ t.has(e) ? (t.delete(e), (e === "addendums" || e === "integrations") && Wn((n) => new Set(n).add(e))) : (t.add(e), (e === "addendums" || e === "integrations") && Wn((n) => {
2144
2148
  const r = new Set(n);
2145
2149
  return r.delete(e), r;
2146
- })), Qt([...t]);
2150
+ })), Bt([...t]);
2147
2151
  }
2148
- return Lt ? (L == null ? void 0 : L((Lt == null ? void 0 : Lt.status) ?? 500)) ?? null : /* @__PURE__ */ d("div", { className: "flex flex-1 min-h-0 flex-col", children: [
2152
+ return Ot ? (L == null ? void 0 : L((Ot == null ? void 0 : Ot.status) ?? 500)) ?? null : /* @__PURE__ */ d("div", { className: "flex flex-1 min-h-0 flex-col", children: [
2149
2153
  /* @__PURE__ */ d("div", { className: "shrink-0", children: [
2150
2154
  (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: [
2151
- /* @__PURE__ */ a(io, { className: "h-4 w-4 shrink-0" }),
2155
+ /* @__PURE__ */ a(bo, { className: "h-4 w-4 shrink-0" }),
2152
2156
  /* @__PURE__ */ a("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." })
2153
2157
  ] }),
2154
2158
  /* @__PURE__ */ d(
@@ -2157,7 +2161,7 @@ function Wc({
2157
2161
  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",
2158
2162
  "data-queue-toolbar": !0,
2159
2163
  children: [
2160
- J ? /* @__PURE__ */ a("div", { className: "flex overflow-hidden rounded-md border border-slate-200 dark:border-border", children: fi.filter((e) => me || e.value !== "claimed").map(
2164
+ J ? /* @__PURE__ */ a("div", { className: "flex overflow-hidden rounded-md border border-slate-200 dark:border-border", children: vi.filter((e) => me || e.value !== "claimed").map(
2161
2165
  (e, t) => /* @__PURE__ */ a(
2162
2166
  "button",
2163
2167
  {
@@ -2226,13 +2230,13 @@ function Wc({
2226
2230
  }),
2227
2231
  className: `flex h-8 items-center gap-1.5 rounded-full border px-2.5 text-[12px] font-medium transition-colors ${_.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"}`,
2228
2232
  children: [
2229
- /* @__PURE__ */ a(co, { className: "h-3.5 w-3.5" }),
2233
+ /* @__PURE__ */ a(ho, { className: "h-3.5 w-3.5" }),
2230
2234
  "Active addendums"
2231
2235
  ]
2232
2236
  }
2233
2237
  ),
2234
2238
  ve && /* @__PURE__ */ a(
2235
- Ps,
2239
+ Us,
2236
2240
  {
2237
2241
  label: E("integrations", "Integrations"),
2238
2242
  value: _.integrations,
@@ -2242,19 +2246,19 @@ function Wc({
2242
2246
  })
2243
2247
  }
2244
2248
  ),
2245
- /* @__PURE__ */ a(Hs, { className: "h-8" }),
2246
- /* @__PURE__ */ a(Es, {}),
2247
- nn > 0 && /* @__PURE__ */ d(
2249
+ /* @__PURE__ */ a(Zs, { className: "h-8" }),
2250
+ /* @__PURE__ */ a(Ks, {}),
2251
+ an > 0 && /* @__PURE__ */ d(
2248
2252
  "button",
2249
2253
  {
2250
2254
  type: "button",
2251
- onClick: ol,
2255
+ onClick: ul,
2252
2256
  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",
2253
2257
  children: [
2254
- /* @__PURE__ */ a(uo, { className: "h-3 w-3" }),
2255
- nn,
2258
+ /* @__PURE__ */ a(fo, { className: "h-3 w-3" }),
2259
+ an,
2256
2260
  " update",
2257
- nn === 1 ? "" : "s",
2261
+ an === 1 ? "" : "s",
2258
2262
  " · Refresh"
2259
2263
  ]
2260
2264
  }
@@ -2270,18 +2274,18 @@ function Wc({
2270
2274
  $ ? "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"
2271
2275
  ),
2272
2276
  children: [
2273
- /* @__PURE__ */ a(xa, { className: "h-3.5 w-3.5" }),
2274
- $ ? `Group: ${((oa = Zr.find((e) => e.value === $)) == null ? void 0 : oa.label) ?? $}` : "Group"
2277
+ /* @__PURE__ */ a(wa, { className: "h-3.5 w-3.5" }),
2278
+ $ ? `Group: ${((da = na.find((e) => e.value === $)) == null ? void 0 : da.label) ?? $}` : "Group"
2275
2279
  ]
2276
2280
  }
2277
2281
  ) }),
2278
- /* @__PURE__ */ a(at, { className: "w-[200px] p-0", align: "start", children: /* @__PURE__ */ d(Sa, { children: [
2279
- /* @__PURE__ */ a(ei, { placeholder: "Group by…", className: "h-8 text-[12px]" }),
2280
- /* @__PURE__ */ d(Ca, { children: [
2281
- /* @__PURE__ */ a(ti, { children: "No attribute found." }),
2282
- /* @__PURE__ */ a(qt, { value: "__none__", onSelect: () => ot(null), children: "None" }),
2283
- Zr.map((e) => /* @__PURE__ */ a(
2284
- qt,
2282
+ /* @__PURE__ */ a(at, { className: "w-[200px] p-0", align: "start", children: /* @__PURE__ */ d(Ta, { children: [
2283
+ /* @__PURE__ */ a(li, { placeholder: "Group by…", className: "h-8 text-[12px]" }),
2284
+ /* @__PURE__ */ d(Ra, { children: [
2285
+ /* @__PURE__ */ a(oi, { children: "No attribute found." }),
2286
+ /* @__PURE__ */ a(Ft, { value: "__none__", onSelect: () => ot(null), children: "None" }),
2287
+ na.map((e) => /* @__PURE__ */ a(
2288
+ Ft,
2285
2289
  {
2286
2290
  value: e.label,
2287
2291
  onSelect: () => ot(e.value),
@@ -2304,7 +2308,7 @@ function Wc({
2304
2308
  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"
2305
2309
  ),
2306
2310
  children: [
2307
- /* @__PURE__ */ a(mo, { className: "h-3.5 w-3.5" }),
2311
+ /* @__PURE__ */ a(go, { className: "h-3.5 w-3.5" }),
2308
2312
  "Priority"
2309
2313
  ]
2310
2314
  }
@@ -2313,7 +2317,7 @@ function Wc({
2313
2317
  "button",
2314
2318
  {
2315
2319
  type: "button",
2316
- onClick: () => Zt(
2320
+ onClick: () => tn(
2317
2321
  ye.size > 0 ? /* @__PURE__ */ new Set() : new Set(le.map((e) => e.key))
2318
2322
  ),
2319
2323
  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",
@@ -2330,15 +2334,15 @@ function Wc({
2330
2334
  st ? "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"
2331
2335
  ),
2332
2336
  children: [
2333
- /* @__PURE__ */ a(xa, { className: "h-3.5 w-3.5" }),
2337
+ /* @__PURE__ */ a(wa, { className: "h-3.5 w-3.5" }),
2334
2338
  st ? `Lanes: ${st === "collection" ? "Collection" : "Owner"}` : "Lanes"
2335
2339
  ]
2336
2340
  }
2337
2341
  ) }),
2338
- /* @__PURE__ */ a(at, { className: "w-[180px] p-0", align: "start", children: /* @__PURE__ */ a(Sa, { children: /* @__PURE__ */ d(Ca, { children: [
2339
- /* @__PURE__ */ a(qt, { value: "none", onSelect: () => en(null), children: "None" }),
2340
- /* @__PURE__ */ a(qt, { value: "collection", onSelect: () => en("collection"), children: "Collection" }),
2341
- /* @__PURE__ */ a(qt, { value: "owner", onSelect: () => en("owners"), children: "Owner" })
2342
+ /* @__PURE__ */ a(at, { className: "w-[180px] p-0", align: "start", children: /* @__PURE__ */ a(Ta, { children: /* @__PURE__ */ d(Ra, { children: [
2343
+ /* @__PURE__ */ a(Ft, { value: "none", onSelect: () => nn(null), children: "None" }),
2344
+ /* @__PURE__ */ a(Ft, { value: "collection", onSelect: () => nn("collection"), children: "Collection" }),
2345
+ /* @__PURE__ */ a(Ft, { value: "owner", onSelect: () => nn("owners"), children: "Owner" })
2342
2346
  ] }) }) })
2343
2347
  ] }),
2344
2348
  G && i && /* @__PURE__ */ d(
@@ -2350,17 +2354,17 @@ function Wc({
2350
2354
  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",
2351
2355
  "data-queue-ask": !0,
2352
2356
  children: [
2353
- /* @__PURE__ */ a(po, { className: "h-3.5 w-3.5 text-nvr-cyan" }),
2357
+ /* @__PURE__ */ a(xo, { className: "h-3.5 w-3.5 text-nvr-cyan" }),
2354
2358
  "Ask about this queue"
2355
2359
  ]
2356
2360
  }
2357
2361
  ),
2358
- /* @__PURE__ */ a(js, { listKey: `queue:${l}`, getState: xl }),
2362
+ /* @__PURE__ */ a(Ws, { listKey: `queue:${l}`, getState: _l }),
2359
2363
  /* @__PURE__ */ d(
2360
2364
  "button",
2361
2365
  {
2362
2366
  type: "button",
2363
- onClick: () => Qa((e) => !e),
2367
+ onClick: () => Va((e) => !e),
2364
2368
  "aria-expanded": dt,
2365
2369
  title: "Trends, aging, pace and states",
2366
2370
  className: R(
@@ -2369,7 +2373,7 @@ function Wc({
2369
2373
  ),
2370
2374
  "data-queue-insights-toggle": !0,
2371
2375
  children: [
2372
- /* @__PURE__ */ a(bo, { className: "h-3.5 w-3.5" }),
2376
+ /* @__PURE__ */ a(yo, { className: "h-3.5 w-3.5" }),
2373
2377
  "Insights"
2374
2378
  ]
2375
2379
  }
@@ -2381,26 +2385,26 @@ function Wc({
2381
2385
  type: "button",
2382
2386
  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",
2383
2387
  children: [
2384
- /* @__PURE__ */ a(ho, { className: "h-3.5 w-3.5" }),
2388
+ /* @__PURE__ */ a(ko, { className: "h-3.5 w-3.5" }),
2385
2389
  "Columns"
2386
2390
  ]
2387
2391
  }
2388
2392
  ) }),
2389
2393
  /* @__PURE__ */ a(at, { className: "w-[220px] p-2", align: "end", children: /* @__PURE__ */ a(
2390
- eo,
2394
+ lo,
2391
2395
  {
2392
- sensors: jl,
2393
- collisionDetection: to,
2394
- onDragEnd: Ul,
2395
- children: /* @__PURE__ */ a(no, { items: zr, strategy: ro, children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: zr.map((e) => {
2396
- const t = Ln.find((n) => n.key === e);
2396
+ sensors: Wl,
2397
+ collisionDetection: oo,
2398
+ onDragEnd: Hl,
2399
+ children: /* @__PURE__ */ a(so, { items: ea, strategy: io, children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: ea.map((e) => {
2400
+ const t = Kn.find((n) => n.key === e);
2397
2401
  return /* @__PURE__ */ a(
2398
- wi,
2402
+ $i,
2399
2403
  {
2400
2404
  id: e,
2401
2405
  label: typeof (t == null ? void 0 : t.header) == "string" ? t.header : e,
2402
2406
  checked: te.has(e),
2403
- onCheckedChange: () => Yl(e)
2407
+ onCheckedChange: () => eo(e)
2404
2408
  },
2405
2409
  e
2406
2410
  );
@@ -2408,17 +2412,17 @@ function Wc({
2408
2412
  }
2409
2413
  ) })
2410
2414
  ] }),
2411
- q === "table" && Dt && /* @__PURE__ */ d(
2415
+ q === "table" && Kt && /* @__PURE__ */ d(
2412
2416
  "button",
2413
2417
  {
2414
2418
  type: "button",
2415
- onClick: Nl,
2419
+ onClick: Fl,
2416
2420
  "aria-pressed": ee,
2417
2421
  "data-queue-bulk-mode": ee ? "on" : "off",
2418
2422
  "data-tip": ee ? "Leave bulk mode — clears the selection and turns row actions back on" : "Select rows to act on several at once",
2419
2423
  className: `flex h-8 items-center gap-1.5 rounded-md border px-2.5 text-[12px] font-medium shadow-sm ${ee ? "border-nvr-cyan bg-nvr-cyan/10 text-slate-800 dark:text-slate-100" : "border-slate-200 bg-white text-slate-500 hover:bg-slate-50 hover:text-slate-700 dark:border-border dark:bg-card dark:text-slate-400 dark:hover:bg-muted"}`,
2420
2424
  children: [
2421
- /* @__PURE__ */ a(fo, { className: "h-3.5 w-3.5" }),
2425
+ /* @__PURE__ */ a(vo, { className: "h-3.5 w-3.5" }),
2422
2426
  ee ? "Done" : "Bulk select"
2423
2427
  ]
2424
2428
  }
@@ -2428,42 +2432,42 @@ function Wc({
2428
2432
  {
2429
2433
  type: "button",
2430
2434
  onClick: () => {
2431
- const e = Tt === "compact" ? "comfortable" : "compact";
2432
- qa(e);
2435
+ const e = Rt === "compact" ? "comfortable" : "compact";
2436
+ Aa(e);
2433
2437
  try {
2434
2438
  localStorage.setItem("nvr_table_density", e);
2435
2439
  } catch {
2436
2440
  }
2437
2441
  },
2438
2442
  "aria-label": "Row density",
2439
- title: Tt === "compact" ? "Switch to comfortable rows" : "Switch to compact rows",
2443
+ title: Rt === "compact" ? "Switch to comfortable rows" : "Switch to compact rows",
2440
2444
  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",
2441
- children: Tt === "compact" ? /* @__PURE__ */ a(go, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ a(xo, { className: "h-3.5 w-3.5" })
2445
+ children: Rt === "compact" ? /* @__PURE__ */ a(wo, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ a(_o, { className: "h-3.5 w-3.5" })
2442
2446
  }
2443
2447
  ),
2444
- q === "table" && Aa && oe.length > 0 && /* @__PURE__ */ d(
2448
+ q === "table" && Pa && oe.length > 0 && /* @__PURE__ */ d(
2445
2449
  "button",
2446
2450
  {
2447
2451
  type: "button",
2448
- onClick: () => qr(),
2452
+ onClick: () => Er(),
2449
2453
  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",
2450
2454
  children: [
2451
- /* @__PURE__ */ a(yo, { className: "h-3 w-3 fill-current" }),
2455
+ /* @__PURE__ */ a(No, { className: "h-3 w-3 fill-current" }),
2452
2456
  "Work Next"
2453
2457
  ]
2454
2458
  }
2455
2459
  ),
2456
- !sn && re.length === 1 && (Ot ? /* @__PURE__ */ d(nt, { children: [
2460
+ !dn && re.length === 1 && (Dt ? /* @__PURE__ */ d(nt, { children: [
2457
2461
  /* @__PURE__ */ a(rt, { asChild: !0, children: /* @__PURE__ */ d(
2458
2462
  "button",
2459
2463
  {
2460
2464
  type: "button",
2461
2465
  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",
2462
2466
  children: [
2463
- /* @__PURE__ */ a(zt, { className: "h-3.5 w-3.5" }),
2467
+ /* @__PURE__ */ a(Zt, { className: "h-3.5 w-3.5" }),
2464
2468
  "New ",
2465
- Qn(re[0]),
2466
- /* @__PURE__ */ a(ya, { className: "h-3 w-3 opacity-60" })
2469
+ Un(re[0]),
2470
+ /* @__PURE__ */ a(_a, { className: "h-3 w-3 opacity-60" })
2467
2471
  ]
2468
2472
  }
2469
2473
  ) }),
@@ -2480,12 +2484,12 @@ function Wc({
2480
2484
  }),
2481
2485
  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",
2482
2486
  children: [
2483
- ((sa = Ot.active) == null ? void 0 : sa.create_label) ?? ((ia = Ot.active) == null ? void 0 : ia.name) ?? "Default layout",
2487
+ ((ua = Dt.active) == null ? void 0 : ua.create_label) ?? ((ma = Dt.active) == null ? void 0 : ma.name) ?? "Default layout",
2484
2488
  /* @__PURE__ */ a("span", { className: "ml-auto pl-3 text-[10px] text-slate-400 dark:text-slate-500", children: "default" })
2485
2489
  ]
2486
2490
  }
2487
2491
  ),
2488
- Ot.options.map((e) => /* @__PURE__ */ a(
2492
+ Dt.options.map((e) => /* @__PURE__ */ a(
2489
2493
  "button",
2490
2494
  {
2491
2495
  type: "button",
@@ -2513,22 +2517,22 @@ function Wc({
2513
2517
  }),
2514
2518
  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",
2515
2519
  children: [
2516
- /* @__PURE__ */ a(zt, { className: "h-3.5 w-3.5" }),
2520
+ /* @__PURE__ */ a(Zt, { className: "h-3.5 w-3.5" }),
2517
2521
  "New ",
2518
- Qn(re[0])
2522
+ Un(re[0])
2519
2523
  ]
2520
2524
  }
2521
2525
  )),
2522
- !sn && re.length > 1 && /* @__PURE__ */ d(nt, { children: [
2526
+ !dn && re.length > 1 && /* @__PURE__ */ d(nt, { children: [
2523
2527
  /* @__PURE__ */ a(rt, { asChild: !0, children: /* @__PURE__ */ d(
2524
2528
  "button",
2525
2529
  {
2526
2530
  type: "button",
2527
2531
  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",
2528
2532
  children: [
2529
- /* @__PURE__ */ a(zt, { className: "h-3.5 w-3.5" }),
2533
+ /* @__PURE__ */ a(Zt, { className: "h-3.5 w-3.5" }),
2530
2534
  "New",
2531
- /* @__PURE__ */ a(ya, { className: "h-3 w-3 opacity-60" })
2535
+ /* @__PURE__ */ a(_a, { className: "h-3 w-3 opacity-60" })
2532
2536
  ]
2533
2537
  }
2534
2538
  ) }),
@@ -2543,15 +2547,15 @@ function Wc({
2543
2547
  }),
2544
2548
  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",
2545
2549
  children: [
2546
- /* @__PURE__ */ a(zt, { className: "h-3 w-3 opacity-60" }),
2547
- Qn(e)
2550
+ /* @__PURE__ */ a(Zt, { className: "h-3 w-3 opacity-60" }),
2551
+ Un(e)
2548
2552
  ]
2549
2553
  },
2550
2554
  e
2551
2555
  )) })
2552
2556
  ] }),
2553
- !sn && Ie && xe && /* @__PURE__ */ a(
2554
- Os,
2557
+ !dn && Ie && xe && /* @__PURE__ */ a(
2558
+ Qs,
2555
2559
  {
2556
2560
  collection: Ie,
2557
2561
  onParsed: (e, t) => xe(`/collections/${Ie}/new`, {
@@ -2571,80 +2575,80 @@ function Wc({
2571
2575
  children: [
2572
2576
  /* @__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: [
2573
2577
  /* @__PURE__ */ a(
2574
- Ft,
2578
+ Tt,
2575
2579
  {
2576
2580
  label: "Total",
2577
2581
  count: (x == null ? void 0 : x.total) ?? 0,
2578
- filteredCount: Z ? Z.total : null,
2579
- active: Object.values(_).every(Pa) && g === "all",
2582
+ filteredCount: z ? z.total : null,
2583
+ active: Object.values(_).every(Ua) && g === "all",
2580
2584
  isLoading: We,
2581
- ...ht("total"),
2582
- onClick: Ma
2585
+ ...ft("total"),
2586
+ onClick: Ia
2583
2587
  }
2584
2588
  ),
2585
2589
  /* @__PURE__ */ a(
2586
- Ft,
2590
+ Tt,
2587
2591
  {
2588
2592
  label: "Warning",
2589
2593
  count: (x == null ? void 0 : x.sla_warning) ?? 0,
2590
- filteredCount: Z ? Z.sla_warning : null,
2594
+ filteredCount: z ? z.sla_warning : null,
2591
2595
  tone: "amber",
2592
2596
  active: _.sla_status === "warning",
2593
2597
  isLoading: We,
2594
2598
  deltaBadIsUp: !0,
2595
- ...ht("sla_warning"),
2599
+ ...ft("sla_warning"),
2596
2600
  onClick: () => Ve("sla_status", "warning")
2597
2601
  }
2598
2602
  ),
2599
2603
  /* @__PURE__ */ a(
2600
- Ft,
2604
+ Tt,
2601
2605
  {
2602
2606
  label: "Breached",
2603
2607
  count: (x == null ? void 0 : x.sla_breached) ?? 0,
2604
- filteredCount: Z ? Z.sla_breached : null,
2608
+ filteredCount: z ? z.sla_breached : null,
2605
2609
  tone: "red",
2606
2610
  active: _.sla_status === "breached",
2607
2611
  isLoading: We,
2608
2612
  deltaBadIsUp: !0,
2609
- ...ht("sla_breached"),
2613
+ ...ft("sla_breached"),
2610
2614
  onClick: () => Ve("sla_status", "breached")
2611
2615
  }
2612
2616
  ),
2613
2617
  /* @__PURE__ */ a(
2614
- Ft,
2618
+ Tt,
2615
2619
  {
2616
2620
  label: "At Risk",
2617
2621
  count: (x == null ? void 0 : x.at_risk) ?? 0,
2618
- filteredCount: Z ? Z.at_risk : null,
2622
+ filteredCount: z ? z.at_risk : null,
2619
2623
  tone: "red",
2620
2624
  active: _.at_risk === "yes",
2621
2625
  isLoading: We,
2622
2626
  deltaBadIsUp: !0,
2623
- ...ht("at_risk"),
2627
+ ...ft("at_risk"),
2624
2628
  onClick: () => Ve("at_risk", "yes")
2625
2629
  }
2626
2630
  ),
2627
2631
  /* @__PURE__ */ a(
2628
- Ft,
2632
+ Tt,
2629
2633
  {
2630
2634
  label: "Unowned",
2631
2635
  count: (x == null ? void 0 : x.unowned) ?? 0,
2632
- filteredCount: Z ? Z.unowned : null,
2636
+ filteredCount: z ? z.unowned : null,
2633
2637
  active: g === "unowned",
2634
2638
  isLoading: We,
2635
2639
  deltaBadIsUp: !0,
2636
- ...ht("unowned"),
2640
+ ...ft("unowned"),
2637
2641
  onClick: () => {
2638
2642
  Y(g === "unowned" ? "all" : "unowned"), O(1);
2639
2643
  }
2640
2644
  }
2641
2645
  )
2642
2646
  ] }),
2643
- (x == null ? void 0 : x.aging) && x.total > 0 && /* @__PURE__ */ a("div", { className: "flex items-center gap-1 text-[11px]", "data-tip": "Time in current state", children: [
2644
- ["0-1d", "0:24", x.aging.d1],
2645
- ["1-3d", "24:72", x.aging.d3],
2646
- ["3-7d", "72:168", x.aging.d7],
2647
- ["7d+", "168:", x.aging.over]
2647
+ bt && x && x.total > 0 && /* @__PURE__ */ a("div", { className: "flex items-center gap-1 text-[11px]", "data-tip": "Time in current state", children: [
2648
+ ["0-1d", "0:24", bt.d1],
2649
+ ["1-3d", "24:72", bt.d3],
2650
+ ["3-7d", "72:168", bt.d7],
2651
+ ["7d+", "168:", bt.over]
2648
2652
  ].map(([e, t, n]) => /* @__PURE__ */ d(
2649
2653
  "button",
2650
2654
  {
@@ -2689,17 +2693,17 @@ function Wc({
2689
2693
  ] }) : /* @__PURE__ */ a(Ce, { children: "→ Holding steady" })
2690
2694
  }
2691
2695
  ),
2692
- Cr.length > 0 && /* @__PURE__ */ a("div", { className: "flex min-w-0 flex-wrap items-center gap-1.5", children: Cr.map(([e, t]) => {
2696
+ Tr.length > 0 && /* @__PURE__ */ a("div", { className: "flex min-w-0 flex-wrap items-center gap-1.5", children: Tr.map(([e, t]) => {
2693
2697
  var n;
2694
2698
  return /* @__PURE__ */ a(
2695
- vi,
2699
+ Ci,
2696
2700
  {
2697
2701
  label: Le(e),
2698
2702
  count: t,
2699
- filteredCount: Z ? Z.by_state[e] ?? 0 : null,
2703
+ filteredCount: z ? z.by_state[e] ?? 0 : null,
2700
2704
  color: ((n = we[e]) == null ? void 0 : n.color) ?? null,
2701
- active: Ka.includes(e),
2702
- onClick: () => Da(e)
2705
+ active: ja.includes(e),
2706
+ onClick: () => Ba(e)
2703
2707
  },
2704
2708
  e
2705
2709
  );
@@ -2708,18 +2712,18 @@ function Wc({
2708
2712
  }
2709
2713
  ),
2710
2714
  q !== "workload" && /* @__PURE__ */ a(
2711
- di,
2715
+ hi,
2712
2716
  {
2713
- defs: Wl,
2717
+ defs: Xl,
2714
2718
  values: _,
2715
- seededKeys: St,
2719
+ seededKeys: Ct,
2716
2720
  onApply: (e) => {
2717
2721
  Q((t) => ({ ...t, ...e })), O(1);
2718
2722
  },
2719
2723
  onClear: () => {
2720
2724
  Q({ ...ue.current }), O(1);
2721
2725
  },
2722
- right: Hl
2726
+ right: Zl
2723
2727
  }
2724
2728
  ),
2725
2729
  /* @__PURE__ */ d(
@@ -2735,7 +2739,7 @@ function Wc({
2735
2739
  className: "inline-flex h-6 items-center gap-1 rounded-full border border-nvr-cyan/40 bg-nvr-cyan/[0.06] px-2.5 text-[12px] text-slate-700 dark:text-slate-200",
2736
2740
  children: [
2737
2741
  "Your default ",
2738
- cr(Kn),
2742
+ mr(Qn),
2739
2743
  " filter is hiding",
2740
2744
  " ",
2741
2745
  pe.toLocaleString("en-US"),
@@ -2746,7 +2750,7 @@ function Wc({
2746
2750
  "button",
2747
2751
  {
2748
2752
  type: "button",
2749
- onClick: dr,
2753
+ onClick: pr,
2750
2754
  className: "font-medium text-[#0284a8] underline-offset-2 hover:underline dark:text-nvr-cyan",
2751
2755
  children: "Show all"
2752
2756
  }
@@ -2793,7 +2797,7 @@ function Wc({
2793
2797
  "button",
2794
2798
  {
2795
2799
  type: "button",
2796
- onClick: gl,
2800
+ onClick: wl,
2797
2801
  title: "Revert to the queue default (filters, columns and sort cleared)",
2798
2802
  className: R(
2799
2803
  "inline-flex h-6 items-center rounded-full border px-2.5 text-[12px] transition-colors",
@@ -2817,13 +2821,13 @@ function Wc({
2817
2821
  {
2818
2822
  type: "button",
2819
2823
  title: Je === e.id ? "Your default view — click to revert to the general default" : "Set as your default view",
2820
- onClick: () => _l.mutate(Je === e.id ? null : e.id),
2824
+ onClick: () => ql.mutate(Je === e.id ? null : e.id),
2821
2825
  className: R(
2822
2826
  "shrink-0",
2823
2827
  Je === e.id ? "text-amber-400" : "text-slate-300 hover:text-amber-400 dark:text-slate-600"
2824
2828
  ),
2825
2829
  children: /* @__PURE__ */ a(
2826
- ko,
2830
+ So,
2827
2831
  {
2828
2832
  className: R("h-3 w-3", Je === e.id && "fill-current"),
2829
2833
  "aria-label": Je === e.id ? "Default view" : "Set as default"
@@ -2831,22 +2835,22 @@ function Wc({
2831
2835
  )
2832
2836
  }
2833
2837
  ),
2834
- /* @__PURE__ */ d("button", { type: "button", onClick: () => vt(e), children: [
2838
+ /* @__PURE__ */ d("button", { type: "button", onClick: () => wt(e), children: [
2835
2839
  e.name,
2836
2840
  e.is_default ? /* @__PURE__ */ a("span", { className: "ml-1 text-nvr-navy/60 dark:text-nvr-cyan/70", children: "· default" }) : e.is_shared && /* @__PURE__ */ a("span", { className: "ml-1 text-slate-400", children: "· shared" })
2837
2841
  ] }),
2838
- Lr && /* @__PURE__ */ a(
2842
+ Yt && /* @__PURE__ */ a(
2839
2843
  "button",
2840
2844
  {
2841
2845
  type: "button",
2842
- onClick: () => wl.mutate({ viewId: e.id, on: !e.is_default }),
2846
+ onClick: () => $l.mutate({ viewId: e.id, on: !e.is_default }),
2843
2847
  title: e.is_default ? "Queue default — click to unset" : "Set as the default view for everyone on this queue",
2844
2848
  className: R(
2845
2849
  "shrink-0",
2846
2850
  e.is_default ? "text-nvr-cyan" : "invisible text-slate-300 hover:text-nvr-cyan group-hover:visible dark:text-slate-600"
2847
2851
  ),
2848
2852
  "aria-label": e.is_default ? "Unset queue default" : "Set queue default",
2849
- children: /* @__PURE__ */ a(vo, { className: R("h-3 w-3", e.is_default && "fill-current") })
2853
+ children: /* @__PURE__ */ a(Co, { className: R("h-3 w-3", e.is_default && "fill-current") })
2850
2854
  }
2851
2855
  ),
2852
2856
  (e.user === S || De) && Xe === e.id && /* @__PURE__ */ a(
@@ -2858,31 +2862,31 @@ function Wc({
2858
2862
  title: "Update this view with the current filters, scope and sort",
2859
2863
  className: "shrink-0 text-slate-400 hover:text-nvr-navy disabled:opacity-50 dark:hover:text-nvr-cyan",
2860
2864
  "aria-label": `Update view ${e.name}`,
2861
- "data-view-update-state": Ke.isPending ? "saving" : Dr === e.id ? "saved" : "idle",
2862
- children: Ke.isPending && ((t = Ke.variables) == null ? void 0 : t.id) === e.id ? /* @__PURE__ */ a(wo, { className: "h-3 w-3 animate-spin" }) : Dr === e.id ? /* @__PURE__ */ a(
2863
- _o,
2865
+ "data-view-update-state": Ke.isPending ? "saving" : Mr === e.id ? "saved" : "idle",
2866
+ children: Ke.isPending && ((t = Ke.variables) == null ? void 0 : t.id) === e.id ? /* @__PURE__ */ a($o, { className: "h-3 w-3 animate-spin" }) : Mr === e.id ? /* @__PURE__ */ a(
2867
+ qo,
2864
2868
  {
2865
2869
  className: "h-3 w-3 text-emerald-600 dark:text-emerald-400",
2866
2870
  strokeWidth: 3
2867
2871
  }
2868
- ) : /* @__PURE__ */ a(No, { className: "h-3 w-3" })
2872
+ ) : /* @__PURE__ */ a(Fo, { className: "h-3 w-3" })
2869
2873
  }
2870
2874
  ),
2871
2875
  Xe === e.id && /* @__PURE__ */ a(
2872
2876
  "button",
2873
2877
  {
2874
2878
  type: "button",
2875
- onClick: () => ja(e.id),
2876
- title: Kt(e.id) ? "Subscribed to new arrivals in this view — click to unsubscribe" : "Notify me when items enter this view (checked every 5 min)",
2879
+ onClick: () => Wa(e.id),
2880
+ title: Pt(e.id) ? "Subscribed to new arrivals in this view — click to unsubscribe" : "Notify me when items enter this view (checked every 5 min)",
2877
2881
  className: R(
2878
2882
  "shrink-0",
2879
- Kt(e.id) ? "text-nvr-cyan" : "invisible text-slate-300 hover:text-nvr-cyan group-hover:visible dark:text-slate-600"
2883
+ Pt(e.id) ? "text-nvr-cyan" : "invisible text-slate-300 hover:text-nvr-cyan group-hover:visible dark:text-slate-600"
2880
2884
  ),
2881
2885
  "aria-label": `Subscribe to view ${e.name}`,
2882
- children: /* @__PURE__ */ a(So, { className: R("h-3 w-3", Kt(e.id) && "fill-current") })
2886
+ children: /* @__PURE__ */ a(To, { className: R("h-3 w-3", Pt(e.id) && "fill-current") })
2883
2887
  }
2884
2888
  ),
2885
- e.user === S && (qn === e.id ? /* @__PURE__ */ d(
2889
+ e.user === S && (Rn === e.id ? /* @__PURE__ */ d(
2886
2890
  "span",
2887
2891
  {
2888
2892
  className: "flex shrink-0 items-center gap-1",
@@ -2893,8 +2897,8 @@ function Wc({
2893
2897
  "button",
2894
2898
  {
2895
2899
  type: "button",
2896
- onClick: () => Pr.mutate(e.id),
2897
- disabled: Pr.isPending,
2900
+ onClick: () => Br.mutate(e.id),
2901
+ disabled: Br.isPending,
2898
2902
  className: "font-semibold text-red-600 hover:underline disabled:opacity-50 dark:text-red-400",
2899
2903
  "aria-label": `Yes, delete view ${e.name}`,
2900
2904
  children: "Yes"
@@ -2904,7 +2908,7 @@ function Wc({
2904
2908
  "button",
2905
2909
  {
2906
2910
  type: "button",
2907
- onClick: () => Ht(null),
2911
+ onClick: () => Jt(null),
2908
2912
  className: "text-slate-500 hover:underline dark:text-slate-400",
2909
2913
  "aria-label": `Keep view ${e.name}`,
2910
2914
  children: "No"
@@ -2916,7 +2920,7 @@ function Wc({
2916
2920
  "button",
2917
2921
  {
2918
2922
  type: "button",
2919
- onClick: () => Ht(e.id),
2923
+ onClick: () => Jt(e.id),
2920
2924
  className: "invisible text-slate-400 hover:text-red-500 group-hover:visible",
2921
2925
  "aria-label": `Delete view ${e.name}`,
2922
2926
  children: "×"
@@ -2927,7 +2931,7 @@ function Wc({
2927
2931
  e.id
2928
2932
  );
2929
2933
  }),
2930
- /* @__PURE__ */ d(nt, { open: fl, onOpenChange: Cn, children: [
2934
+ /* @__PURE__ */ d(nt, { open: vl, onOpenChange: Fn, children: [
2931
2935
  /* @__PURE__ */ a(rt, { asChild: !0, children: /* @__PURE__ */ a(
2932
2936
  "button",
2933
2937
  {
@@ -2946,7 +2950,7 @@ function Wc({
2946
2950
  type: "button",
2947
2951
  disabled: Ke.isPending,
2948
2952
  onClick: () => {
2949
- Ke.mutate(e), Cn(!1);
2953
+ Ke.mutate(e), Fn(!1);
2950
2954
  },
2951
2955
  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",
2952
2956
  children: [
@@ -2960,29 +2964,29 @@ function Wc({
2960
2964
  /* @__PURE__ */ a(
2961
2965
  "input",
2962
2966
  {
2963
- value: $n,
2964
- onChange: (e) => Fr(e.target.value),
2967
+ value: Tn,
2968
+ onChange: (e) => Ar(e.target.value),
2965
2969
  placeholder: "View name",
2966
2970
  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"
2967
2971
  }
2968
2972
  ),
2969
- /* @__PURE__ */ d("label", { className: "mb-2 flex items-center gap-2 text-[12px] text-slate-600 dark:text-slate-300", children: [
2973
+ Yt && /* @__PURE__ */ d("label", { className: "mb-2 flex items-center gap-2 text-[12px] text-slate-600 dark:text-slate-300", children: [
2970
2974
  /* @__PURE__ */ a(
2971
- jn,
2975
+ Vn,
2972
2976
  {
2973
- checked: Tr || kt,
2974
- disabled: kt,
2975
- onCheckedChange: (e) => Rr(e === !0)
2977
+ checked: Lr || vt,
2978
+ disabled: vt,
2979
+ onCheckedChange: (e) => Or(e === !0)
2976
2980
  }
2977
2981
  ),
2978
2982
  "Share with everyone"
2979
2983
  ] }),
2980
- Lr && /* @__PURE__ */ d("label", { className: "mb-2 flex items-center gap-2 text-[12px] text-slate-600 dark:text-slate-300", children: [
2984
+ Yt && /* @__PURE__ */ d("label", { className: "mb-2 flex items-center gap-2 text-[12px] text-slate-600 dark:text-slate-300", children: [
2981
2985
  /* @__PURE__ */ a(
2982
- jn,
2986
+ Vn,
2983
2987
  {
2984
- checked: kt,
2985
- onCheckedChange: (e) => Er(e === !0)
2988
+ checked: vt,
2989
+ onCheckedChange: (e) => Dr(e === !0)
2986
2990
  }
2987
2991
  ),
2988
2992
  "Set as queue default (everyone starts here)"
@@ -2991,8 +2995,8 @@ function Wc({
2991
2995
  "button",
2992
2996
  {
2993
2997
  type: "button",
2994
- disabled: !$n.trim() || Or.isPending,
2995
- onClick: () => Or.mutate(),
2998
+ disabled: !Tn.trim() || Pr.isPending,
2999
+ onClick: () => Pr.mutate(),
2996
3000
  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",
2997
3001
  children: "Save current view"
2998
3002
  }
@@ -3003,16 +3007,16 @@ function Wc({
3003
3007
  }
3004
3008
  )
3005
3009
  ] }),
3006
- /* @__PURE__ */ d("div", { ref: Gt, className: "flex min-h-0 flex-1 flex-col overflow-y-auto px-4 pb-4 pt-3", children: [
3007
- or && /* @__PURE__ */ a(Qs, { error: Wa, onRetry: () => void Ha(), className: "mb-3" }),
3008
- Pn && /* @__PURE__ */ a(
3010
+ /* @__PURE__ */ d("div", { ref: Wt, className: "flex min-h-0 flex-1 flex-col overflow-y-auto px-4 pb-4 pt-3", children: [
3011
+ cr && /* @__PURE__ */ a(Vs, { error: Xa, onRetry: () => void Za(), className: "mb-3" }),
3012
+ Bn && /* @__PURE__ */ a(
3009
3013
  "p",
3010
3014
  {
3011
3015
  "data-filter-sentence": !0,
3012
- "data-tip": Pn,
3016
+ "data-tip": Bn,
3013
3017
  "aria-live": "polite",
3014
3018
  className: "mb-1.5 shrink-0 truncate px-0.5 text-[11.5px] text-slate-500 dark:text-slate-400",
3015
- children: Pn
3019
+ children: Bn
3016
3020
  }
3017
3021
  ),
3018
3022
  q === "table" ? /* @__PURE__ */ a(Ce, { children: /* @__PURE__ */ a("div", { className: "flex min-h-0 flex-1", children: /* @__PURE__ */ d(
@@ -3021,59 +3025,59 @@ function Wc({
3021
3025
  ref: $e.rootRef,
3022
3026
  className: R(
3023
3027
  "relative min-w-0 flex-1 transition-opacity duration-200",
3024
- ur && "pointer-events-none opacity-60"
3028
+ br && "pointer-events-none opacity-60"
3025
3029
  ),
3026
- "aria-busy": ur || void 0,
3030
+ "aria-busy": br || void 0,
3027
3031
  children: [
3028
- mr != 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: [
3029
- Xa.text ?? "Still working",
3032
+ hr != 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: [
3033
+ rl.text ?? "Still working",
3030
3034
  " — ",
3031
- mr,
3035
+ hr,
3032
3036
  "s"
3033
3037
  ] }),
3034
3038
  /* @__PURE__ */ a(
3035
- Ts,
3039
+ Os,
3036
3040
  {
3037
3041
  fillHeight: !0,
3038
- enterKey: fr.current,
3039
- density: Tt,
3042
+ enterKey: kr.current,
3043
+ density: Rt,
3040
3044
  minBodyHeight: 360,
3041
- columns: Yt,
3045
+ columns: zt,
3042
3046
  rows: F,
3043
3047
  rowKey: (e) => `${e.collection}:${e.item_id}`,
3044
3048
  total: (c == null ? void 0 : c.total) ?? 0,
3045
3049
  page: de,
3046
- limit: on,
3050
+ limit: cn,
3047
3051
  isLoading: We,
3048
3052
  onPageChange: O,
3049
- onRowClick: (e) => Vt(e),
3053
+ onRowClick: (e) => Gt(e),
3050
3054
  rowDragProps: (e) => ({
3051
- ...al({ collection: e.collection, id: e.item_id }),
3052
- ...Za.record(e.collection, e.item_id)
3055
+ ...cl({ collection: e.collection, id: e.item_id }),
3056
+ ...al.record(e.collection, e.item_id)
3053
3057
  }),
3054
3058
  onRowContextMenu: (e, t) => {
3055
- t.preventDefault(), yt({ x: t.clientX, y: t.clientY, row: e });
3059
+ t.preventDefault(), kt({ x: t.clientX, y: t.clientY, row: e });
3056
3060
  },
3057
3061
  rowTitle: (e) => {
3058
- const t = bt.get(K(e));
3059
- return $e.titleFor(K(e)) ?? (t && !t.is_mine ? ns(t) : void 0) ?? (Ar(e.collection, e.item_id) ? Ws : void 0);
3062
+ const t = ht.get(K(e));
3063
+ return $e.titleFor(K(e)) ?? (t && !t.is_mine ? ss(t) : void 0) ?? (Kr(e.collection, e.item_id) ? Xs : void 0);
3060
3064
  },
3061
3065
  rowClassName: (e) => R(
3062
- vl(e),
3063
- Ar(e.collection, e.item_id) && Gs
3066
+ Cl(e),
3067
+ Kr(e.collection, e.item_id) && zs
3064
3068
  ),
3065
- emptyMessage: or ? /* @__PURE__ */ a("span", { className: "sr-only", children: "The list did not load." }) : /* @__PURE__ */ a(
3066
- Rs,
3069
+ emptyMessage: cr ? /* @__PURE__ */ a("span", { className: "sr-only", children: "The list did not load." }) : /* @__PURE__ */ a(
3070
+ Ds,
3067
3071
  {
3068
- icon: Co,
3069
- title: ((ca = c == null ? void 0 : c.empty) == null ? void 0 : ca.reason) === "not_permitted" ? "You cannot read this queue’s records" : ((da = c == null ? void 0 : c.empty) == null ? void 0 : da.reason) === "scope_mine" ? "Nothing waiting on you" : ((ua = c == null ? void 0 : c.empty) == null ? void 0 : ua.reason) === "filters" ? "No records match these filters" : "Nothing in this queue",
3070
- detail: ((ma = c == null ? void 0 : c.empty) == null ? void 0 : ma.reason) === "filters" && pe > 0 ? `Your default ${cr(Kn)} filter is hiding ${pe.toLocaleString("en-US")} item${pe === 1 ? "" : "s"} here.` : ((pa = c == null ? void 0 : c.empty) == null ? void 0 : pa.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." : ((ba = c == null ? void 0 : c.empty) == null ? void 0 : ba.message) ?? "Records land here when they match the queue sources — a state change or new record can appear at any moment.",
3071
- action: ((ha = c == null ? void 0 : c.empty) == null ? void 0 : ha.reason) === "filters" ? /* @__PURE__ */ d("div", { className: "flex items-center justify-center gap-2", children: [
3072
+ icon: Ro,
3073
+ title: ((pa = c == null ? void 0 : c.empty) == null ? void 0 : pa.reason) === "not_permitted" ? "You cannot read this queue’s records" : ((ba = c == null ? void 0 : c.empty) == null ? void 0 : ba.reason) === "scope_mine" ? "Nothing waiting on you" : ((ha = c == null ? void 0 : c.empty) == null ? void 0 : ha.reason) === "filters" ? "No records match these filters" : "Nothing in this queue",
3074
+ detail: ((fa = c == null ? void 0 : c.empty) == null ? void 0 : fa.reason) === "filters" && pe > 0 ? `Your default ${mr(Qn)} filter is hiding ${pe.toLocaleString("en-US")} item${pe === 1 ? "" : "s"} here.` : ((ga = c == null ? void 0 : c.empty) == null ? void 0 : ga.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." : ((xa = c == null ? void 0 : c.empty) == null ? void 0 : xa.message) ?? "Records land here when they match the queue sources — a state change or new record can appear at any moment.",
3075
+ action: ((ya = c == null ? void 0 : c.empty) == null ? void 0 : ya.reason) === "filters" ? /* @__PURE__ */ d("div", { className: "flex items-center justify-center gap-2", children: [
3072
3076
  pe > 0 && /* @__PURE__ */ d(
3073
3077
  "button",
3074
3078
  {
3075
3079
  type: "button",
3076
- onClick: dr,
3080
+ onClick: pr,
3077
3081
  className: "h-7 rounded-md bg-nvr-cyan px-2.5 text-[12px] font-semibold text-white hover:brightness-105",
3078
3082
  "data-queue-empty-defaults": !0,
3079
3083
  children: [
@@ -3117,31 +3121,31 @@ function Wc({
3117
3121
  onSortChange: (e) => {
3118
3122
  Ue(e), O(1);
3119
3123
  },
3120
- filterDefs: Dn,
3124
+ filterDefs: Mn,
3121
3125
  filterValues: _,
3122
3126
  onFilterChange: (e, t) => {
3123
3127
  Q((n) => ({ ...n, [e]: t })), O(1);
3124
3128
  },
3125
- rowGroups: Cl ?? void 0,
3129
+ rowGroups: Rl ?? void 0,
3126
3130
  collapsedGroups: ye,
3127
- onToggleGroup: pl,
3128
- selectedIds: Dt && ee ? Pe : void 0,
3129
- onSelectionChange: Dt && ee ? et : void 0,
3131
+ onToggleGroup: xl,
3132
+ selectedIds: Kt && ee ? Pe : void 0,
3133
+ onSelectionChange: Kt && ee ? et : void 0,
3130
3134
  hideFilterRow: !0,
3131
3135
  nowrapCells: !0,
3132
- columnPins: Xr,
3136
+ columnPins: ta,
3133
3137
  onColumnPinChange: (e, t) => {
3134
- tn((n) => {
3135
- const r = { ...n ?? Xr };
3138
+ rn((n) => {
3139
+ const r = { ...n ?? ta };
3136
3140
  return t ? r[e] = t : delete r[e], r;
3137
3141
  });
3138
3142
  },
3139
3143
  columnFilterRow: !0,
3140
3144
  hScrollProxy: !0,
3141
3145
  footer: /* @__PURE__ */ a(
3142
- Js,
3146
+ ti,
3143
3147
  {
3144
- collections: ft,
3148
+ collections: gt,
3145
3149
  selectedIds: String(_.at_risk_rule ?? "").split(",").map((e) => Number(e)).filter((e) => Number.isFinite(e) && e > 0),
3146
3150
  onToggle: (e) => {
3147
3151
  const t = e.ids.join(",");
@@ -3158,37 +3162,37 @@ function Wc({
3158
3162
  ]
3159
3163
  }
3160
3164
  ) }) }) : q === "kanban" ? /* @__PURE__ */ a(
3161
- ci,
3165
+ bi,
3162
3166
  {
3163
3167
  items: F,
3164
- onCardClick: (e) => Vt(e),
3165
- onDrop: (e, t) => el.mutate({ item: e, targetState: t }),
3168
+ onCardClick: (e) => Gt(e),
3169
+ onDrop: (e, t) => ll.mutate({ item: e, targetState: t }),
3166
3170
  onClaim: (e) => Ae.mutate(e),
3167
3171
  onRelease: (e) => He.mutate(e),
3168
3172
  swimlaneBy: st,
3169
- stateLabels: wn,
3170
- laneLabel: st === "collection" ? gt : void 0,
3173
+ stateLabels: Sn,
3174
+ laneLabel: st === "collection" ? xt : void 0,
3171
3175
  claimsEnabled: me,
3172
3176
  onDraggingChange: (e) => {
3173
- Hn.current = e;
3177
+ zn.current = e;
3174
3178
  }
3175
3179
  }
3176
- ) : /* @__PURE__ */ a(ui, { queueId: l })
3180
+ ) : /* @__PURE__ */ a(fi, { queueId: l })
3177
3181
  ] }),
3178
- Dt && ee && /* @__PURE__ */ d(
3179
- si,
3182
+ Kt && ee && /* @__PURE__ */ d(
3183
+ mi,
3180
3184
  {
3181
3185
  count: Pe.length,
3182
3186
  claimsEnabled: me,
3183
- showClaim: cn("claim"),
3184
- showRelease: cn("release"),
3185
- showTransition: cn("transition"),
3186
- states: $r((c == null ? void 0 : c.available_values.state) ?? []).map((e) => ({
3187
+ showClaim: un("claim"),
3188
+ showRelease: un("release"),
3189
+ showTransition: un("transition"),
3190
+ states: Rr((c == null ? void 0 : c.available_values.state) ?? []).map((e) => ({
3187
3191
  value: e,
3188
3192
  label: Le(e)
3189
3193
  })),
3190
- busy: Qr,
3191
- onClaim: () => Fn(
3194
+ busy: Ur,
3195
+ onClaim: () => En(
3192
3196
  "Claim",
3193
3197
  (e) => h.request(
3194
3198
  se(`/queues/${l}/claim`, {
@@ -3197,7 +3201,7 @@ function Wc({
3197
3201
  })
3198
3202
  )
3199
3203
  ),
3200
- onRelease: () => Fn(
3204
+ onRelease: () => En(
3201
3205
  "Release",
3202
3206
  (e) => h.request(
3203
3207
  se(`/queues/${l}/release`, {
@@ -3206,7 +3210,7 @@ function Wc({
3206
3210
  })
3207
3211
  )
3208
3212
  ),
3209
- onTransition: (e) => Fn("Transition", (t) => pr(t, e)),
3213
+ onTransition: (e) => En("Transition", (t) => fr(t, e)),
3210
3214
  onClear: () => et([]),
3211
3215
  children: [
3212
3216
  Pe.length >= 2 && /* @__PURE__ */ a(
@@ -3214,24 +3218,24 @@ function Wc({
3214
3218
  {
3215
3219
  type: "button",
3216
3220
  onClick: () => {
3217
- const e = as(
3218
- F.filter((t) => Pe.includes(K(t)) && t.collection !== "tasks").map((t) => H.urlFor(Sn(t)))
3221
+ const e = cs(
3222
+ F.filter((t) => Pe.includes(K(t)) && t.collection !== "tasks").map((t) => H.urlFor(qn(t)))
3219
3223
  );
3220
- e.blocked > 0 || e.capped > 0 ? D.warning(_a(e)) : D.success(_a(e));
3224
+ e.blocked > 0 || e.capped > 0 ? D.warning($a(e)) : D.success($a(e));
3221
3225
  },
3222
3226
  "data-bulk-open-tabs": !0,
3223
- title: `Open the selected records in new tabs (up to ${rs})`,
3227
+ title: `Open the selected records in new tabs (up to ${is})`,
3224
3228
  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",
3225
3229
  children: "Open in tabs"
3226
3230
  }
3227
3231
  ),
3228
3232
  /* @__PURE__ */ a(
3229
- Cs,
3233
+ Rs,
3230
3234
  {
3231
3235
  targets: F.filter((e) => Pe.includes(K(e)) && e.collection !== "tasks").map((e) => ({ collection: e.collection, id: e.item_id, label: e.label })),
3232
3236
  enabledKeys: (u == null ? void 0 : u.bulk_action_keys) ?? null,
3233
3237
  tone: "light",
3234
- disabled: Qr,
3238
+ disabled: Ur,
3235
3239
  onDone: (e) => {
3236
3240
  e.failed === 0 && et([]), f.invalidateQueries({ queryKey: ["queue-items", l] });
3237
3241
  }
@@ -3241,7 +3245,7 @@ function Wc({
3241
3245
  }
3242
3246
  ),
3243
3247
  ae != null && ae.length ? /* @__PURE__ */ a(
3244
- Ys,
3248
+ ei,
3245
3249
  {
3246
3250
  collection: ae[0].collection,
3247
3251
  itemId: ae[0].itemId,
@@ -3250,12 +3254,12 @@ function Wc({
3250
3254
  width: ae[0].width,
3251
3255
  title: ae[0].title,
3252
3256
  stack: ae,
3253
- onPush: (e) => _t.push([...ae, e]),
3254
- onPop: () => _t.back(),
3255
- onClose: () => _t.back(ae.length)
3257
+ onPush: (e) => Nt.push([...ae, e]),
3258
+ onPop: () => Nt.back(),
3259
+ onClose: () => Nt.back(ae.length)
3256
3260
  }
3257
3261
  ) : null,
3258
- B && ka(
3262
+ B && Na(
3259
3263
  /* @__PURE__ */ d(
3260
3264
  "div",
3261
3265
  {
@@ -3270,42 +3274,46 @@ function Wc({
3270
3274
  "data-queue-row-menu": !0,
3271
3275
  children: [
3272
3276
  [
3273
- { label: "Open", run: () => Vt(B.row) },
3277
+ { label: "Open", run: () => Gt(B.row) },
3274
3278
  {
3275
3279
  label: "Open full record",
3276
- run: () => xt(B.row)
3280
+ run: () => yt(B.row)
3277
3281
  },
3278
3282
  { label: "Peek", run: () => Oe(B.row) },
3279
3283
  ...me ? [
3280
- ((fa = B.row.claimed_by) == null ? void 0 : fa.id) === S ? { label: "Release claim", run: () => He.mutate(B.row) } : { label: "Claim", run: () => Ae.mutate(B.row) }
3284
+ ((ka = B.row.claimed_by) == null ? void 0 : ka.id) === S ? { label: "Release claim", run: () => He.mutate(B.row) } : { label: "Claim", run: () => Ae.mutate(B.row) }
3281
3285
  ] : [],
3282
- {
3283
- label: "Copy ID",
3284
- run: () => {
3285
- var e;
3286
- return void ((e = navigator.clipboard) == null ? void 0 : e.writeText(B.row.item_id));
3286
+ // The friendly id (PW26-76166), never the row id (army 6 M52);
3287
+ // a record with no number has nothing to copy.
3288
+ ...qa(B.row) ? [
3289
+ {
3290
+ label: "Copy ID",
3291
+ run: () => {
3292
+ var e;
3293
+ return void ((e = navigator.clipboard) == null ? void 0 : e.writeText(qa(B.row) ?? ""));
3294
+ }
3287
3295
  }
3288
- },
3296
+ ] : [],
3289
3297
  {
3290
3298
  label: "Copy link",
3291
3299
  run: () => {
3292
3300
  var e;
3293
3301
  return void ((e = navigator.clipboard) == null ? void 0 : e.writeText(
3294
- `${window.location.origin}${H.urlFor(Sn(B.row))}`
3302
+ `${window.location.origin}${H.urlFor(qn(B.row))}`
3295
3303
  ));
3296
3304
  }
3297
3305
  },
3298
3306
  // Custom actions (#125): the record's registered actions, right here.
3299
- ...Ia(B.row.collection).map((e) => ({
3307
+ ...Ya(B.row.collection).map((e) => ({
3300
3308
  label: e.label,
3301
- run: () => Va(e, B.row)
3309
+ run: () => Ja(e, B.row)
3302
3310
  }))
3303
3311
  ].map((e) => /* @__PURE__ */ a(
3304
3312
  "button",
3305
3313
  {
3306
3314
  type: "button",
3307
3315
  onClick: () => {
3308
- e.run(), yt(null);
3316
+ e.run(), kt(null);
3309
3317
  },
3310
3318
  className: "block w-full truncate 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",
3311
3319
  children: e.label
@@ -3314,14 +3322,14 @@ function Wc({
3314
3322
  )),
3315
3323
  B.row.collection !== "tasks" && /* @__PURE__ */ d("div", { className: "mt-1 border-t border-slate-100 pt-1 dark:border-border/60", children: [
3316
3324
  /* @__PURE__ */ a("p", { className: "px-3 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-slate-400", children: "Triage labels" }),
3317
- pn.slice(0, 8).map((e) => {
3325
+ hn.slice(0, 8).map((e) => {
3318
3326
  const t = (B.row.labels ?? []).includes(e);
3319
3327
  return /* @__PURE__ */ d(
3320
3328
  "button",
3321
3329
  {
3322
3330
  type: "button",
3323
3331
  onClick: () => {
3324
- ar(B.row, e), yt(null);
3332
+ sr(B.row, e), kt(null);
3325
3333
  },
3326
3334
  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",
3327
3335
  children: [
@@ -3345,7 +3353,7 @@ function Wc({
3345
3353
  const n = e.target.elements.namedItem(
3346
3354
  "newlabel"
3347
3355
  ).value.trim();
3348
- n && (ar(B.row, n), yt(null));
3356
+ n && (sr(B.row, n), kt(null));
3349
3357
  },
3350
3358
  className: "px-3 py-1",
3351
3359
  children: /* @__PURE__ */ a(
@@ -3366,50 +3374,50 @@ function Wc({
3366
3374
  ),
3367
3375
  document.body
3368
3376
  ),
3369
- rr && ka(
3377
+ or && Na(
3370
3378
  /* @__PURE__ */ a(
3371
- _i,
3379
+ qi,
3372
3380
  {
3373
3381
  queueId: l,
3374
- drill: rr,
3375
- onClose: () => un(null),
3382
+ drill: or,
3383
+ onClose: () => pn(null),
3376
3384
  onOpenRecord: (e, t) => {
3377
- un(null), H.open({ collection: e, itemId: t, layoutSlug: null });
3385
+ pn(null), H.open({ collection: e, itemId: t, layoutSlug: null });
3378
3386
  }
3379
3387
  }
3380
3388
  ),
3381
3389
  document.body
3382
3390
  ),
3383
3391
  /* @__PURE__ */ a(
3384
- ii,
3392
+ pi,
3385
3393
  {
3386
3394
  item: _e,
3387
- stateLabels: wn,
3388
- collectionLabel: gt,
3395
+ stateLabels: Sn,
3396
+ collectionLabel: xt,
3389
3397
  claimsEnabled: me,
3390
- columnFormats: Fl,
3398
+ columnFormats: Ll,
3391
3399
  width: u == null ? void 0 : u.sheet_width,
3392
3400
  itemLayout: u == null ? void 0 : u.item_layout,
3393
3401
  onOpenChange: (e) => {
3394
- e || (Oe(null), Nn(!1));
3402
+ e || (Oe(null), $n(!1));
3395
3403
  },
3396
3404
  onClaim: (e) => Ae.mutate(e),
3397
3405
  onRelease: (e) => He.mutate(e),
3398
- workNextActive: bl,
3399
- onNext: () => _e && qr(_e),
3406
+ workNextActive: yl,
3407
+ onNext: () => _e && Er(_e),
3400
3408
  refetchItems: () => f.invalidateQueries({ queryKey: ["queue-items", l] })
3401
3409
  }
3402
3410
  ),
3403
- Pt.dialog
3411
+ Mt.dialog
3404
3412
  ] });
3405
3413
  }
3406
- function _i({
3414
+ function qi({
3407
3415
  queueId: l,
3408
3416
  drill: y,
3409
3417
  onClose: L,
3410
3418
  onOpenRecord: P
3411
3419
  }) {
3412
- const G = $a(), { data: f, isLoading: h } = W({
3420
+ const G = Ea(), { data: f, isLoading: h } = W({
3413
3421
  queryKey: ["queue-agg-rows", l, y.row.collection, y.row.item_id, y.path],
3414
3422
  queryFn: () => G.request(
3415
3423
  A(`/queues/${l}/aggregate-rows`, {
@@ -3470,5 +3478,5 @@ function _i({
3470
3478
  );
3471
3479
  }
3472
3480
  export {
3473
- Wc as QueueWorklist
3481
+ Zc as QueueWorklist
3474
3482
  };