@nivaro/react 0.3.137 → 0.3.139

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 (50) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +95 -4
  4. package/dist/index.js +748 -743
  5. package/dist/shared/components/CollectionBrowserView.js +392 -389
  6. package/dist/shared/components/DelegateCoverLine.js +80 -87
  7. package/dist/shared/components/ItemEditForm.js +589 -588
  8. package/dist/shared/components/MyWorkView.js +284 -286
  9. package/dist/shared/components/NotificationBell.js +251 -205
  10. package/dist/shared/components/ai/AiAnalyticsView.js +878 -417
  11. package/dist/shared/components/ai/AiPlanCard.js +164 -122
  12. package/dist/shared/components/ai/AiPlanUndo.js +291 -0
  13. package/dist/shared/components/ai/call-log/CallDrawer.js +357 -0
  14. package/dist/shared/components/ai/call-log/RawJson.js +126 -0
  15. package/dist/shared/components/ai/call-log/ThreadView.js +223 -0
  16. package/dist/shared/components/ai/call-log/TranscriptView.js +227 -0
  17. package/dist/shared/components/ai/call-log/controls.js +364 -0
  18. package/dist/shared/components/ai/call-log/format.js +46 -0
  19. package/dist/shared/components/ai/call-log/url.js +105 -0
  20. package/dist/shared/components/chat/chat-core.js +422 -346
  21. package/dist/shared/components/integrations/IntegrationObligationsView.js +98 -98
  22. package/dist/shared/components/integrations/RecordIntegrationPreview.js +102 -93
  23. package/dist/shared/components/integrations/console/api.js +11 -1
  24. package/dist/shared/components/item-edit/HeaderRollupExplainer.js +5 -1
  25. package/dist/shared/components/item-edit/RecordLiveSync.js +241 -229
  26. package/dist/shared/components/item-edit/RecordRecapChanges.js +166 -0
  27. package/dist/shared/components/item-edit/RecordRecapStrip.js +254 -84
  28. package/dist/shared/components/item-edit/live-related.js +34 -18
  29. package/dist/shared/components/panels/RevisionsPanel.js +735 -683
  30. package/dist/shared/components/queue/QueueWorklist.js +323 -316
  31. package/dist/shared/components/support/SupportRequestDialog.js +198 -181
  32. package/dist/shared/components/trackers/use-tracker-link.js +74 -65
  33. package/dist/shared/lib/activity-sentence.js +167 -151
  34. package/dist/shared/lib/config-update-refresh.js +34 -0
  35. package/dist/shared/lib/config-watch.js +17 -17
  36. package/dist/shared/lib/gap-refresh.js +49 -0
  37. package/dist/shared/lib/integration-dots.js +8 -8
  38. package/dist/shared/lib/live-ops.js +26 -23
  39. package/dist/shared/lib/live-pickers.js +1 -1
  40. package/dist/shared/lib/live-queries.js +223 -195
  41. package/dist/shared/lib/live.js +56 -51
  42. package/dist/shared/lib/obligation-banner.js +11 -10
  43. package/dist/shared/lib/obligation-filters.js +22 -18
  44. package/dist/shared/lib/obligation-reason-text.js +18 -8
  45. package/dist/shared/lib/presence-hooks.js +133 -132
  46. package/dist/shared/lib/reconnect-resync.js +90 -0
  47. package/dist/shared/lib/record-room-holds.js +43 -0
  48. package/dist/shared/lib/socket-realtime.js +116 -105
  49. package/dist/shared/lib/user-sync.js +1 -6
  50. package/package.json +1 -1
@@ -15,136 +15,137 @@ import { csvNumber as cu, csvDateTime as uu, readExportExtras as pu, VIRTUAL_HEA
15
15
  import { warmPageLookups as hu } from "../lib/cbv-page-warm.js";
16
16
  import { post as qe, get as X, patch as _r, del as Lr } from "../lib/commands.js";
17
17
  import { compareValueText as bu } from "../lib/compare-value.js";
18
- import { parseDateFilter as Or, dateFilterBounds as gu, describeDateFilter as xu, DATE_FILTER_OPS as vu, formatDateFilter as yu } from "../lib/date-filter.js";
19
- import { rowDeleteOffered as ku } from "../lib/delete-offer.js";
20
- import { errorSentence as wu } from "../lib/error-message.js";
18
+ import { useConfigUpdateRefresh as gu } from "../lib/config-update-refresh.js";
19
+ import { parseDateFilter as Or, dateFilterBounds as xu, describeDateFilter as vu, DATE_FILTER_OPS as yu, formatDateFilter as ku } from "../lib/date-filter.js";
20
+ import { rowDeleteOffered as wu } from "../lib/delete-offer.js";
21
+ import { errorSentence as _u } from "../lib/error-message.js";
21
22
  import { errorToastOptions as Rr, toastError as Hs } from "../lib/error-toast.js";
22
- import { startLocalExport as _u, ExportCancelledError as Nu, isStartedExportRun as Su, followExportRun as Cu, downloadUrl as $u, throwIfCancelled as qu } from "../lib/export-runs.js";
23
- import { extractExpressionTokens as Tu, evaluateNumeric as gi } from "../lib/expression.js";
24
- import { clauseFromCondition as Gs, clauseFromControlValue as Lu, filterSentence as Ru } from "../lib/filter-sentence.js";
25
- import { releaseLiveOwner as Fu, deliverLive as Eu } from "../lib/focus-mode.js";
26
- import { formatValue as Nr, formatMultiValue as xi, countFromResolved as Ou } from "../lib/format-value.js";
27
- import { IN_STEP_COLUMN as Bn, inStepText as Pu, IN_STEP_SORT as Aa } from "../lib/in-step.js";
28
- import { dotsForRecord as Du } from "../lib/integration-dots.js";
29
- import { useKeepRowCheckboxFocus as Au } from "../lib/keep-row-focus.js";
30
- import { createCursorBook as Mu, pageRequest as Iu, noteNextCursor as Ku, isCursorRefusal as ju, stopCursors as Bu } from "../lib/keyset-pager.js";
31
- import { normalizeInlineEdit as Uu, inlineM2oTarget as Qu, inlineChoices as Wu, inlineEditFor as zu, nextInlineKey as Vu } from "../lib/list-inline-edit.js";
32
- import { sanitizeCbvLinkState as Hu, readListLinkFromLocation as Gu, encodeListLink as Yu, replaceListLinkParam as Ju } from "../lib/list-link.js";
33
- import { rememberedListPage as Xu, pageWhileSettling as vi, rememberListPage as Zu, restoreWindowOutcome as ep, historyKey as tp, arrivedByListReturn as np, ensureHistoryKey as ap } from "../lib/list-page-memory.js";
34
- import { peekListAway as rp, planListReturn as yi, takeListAway as sp, standbyListAway as lp, changedRowIds as op, readListReturn as ip, markReturnRow as dp, rowInView as cp, noteListOpen as up } from "../lib/list-return.js";
35
- import { useLiveEvent as pp, expandCoalesced as mp, LIVE_ASPECTS as Un } from "../lib/live.js";
23
+ import { startLocalExport as Nu, ExportCancelledError as Su, isStartedExportRun as Cu, followExportRun as $u, downloadUrl as qu, throwIfCancelled as Tu } from "../lib/export-runs.js";
24
+ import { extractExpressionTokens as Lu, evaluateNumeric as gi } from "../lib/expression.js";
25
+ import { clauseFromCondition as Gs, clauseFromControlValue as Ru, filterSentence as Fu } from "../lib/filter-sentence.js";
26
+ import { releaseLiveOwner as Eu, deliverLive as Ou } from "../lib/focus-mode.js";
27
+ import { formatValue as Nr, formatMultiValue as xi, countFromResolved as Pu } from "../lib/format-value.js";
28
+ import { IN_STEP_COLUMN as Bn, inStepText as Du, IN_STEP_SORT as Aa } from "../lib/in-step.js";
29
+ import { dotsForRecord as Au } from "../lib/integration-dots.js";
30
+ import { useKeepRowCheckboxFocus as Mu } from "../lib/keep-row-focus.js";
31
+ import { createCursorBook as Iu, pageRequest as Ku, noteNextCursor as ju, isCursorRefusal as Bu, stopCursors as Uu } from "../lib/keyset-pager.js";
32
+ import { normalizeInlineEdit as Qu, inlineM2oTarget as Wu, inlineChoices as zu, inlineEditFor as Vu, nextInlineKey as Hu } from "../lib/list-inline-edit.js";
33
+ import { sanitizeCbvLinkState as Gu, readListLinkFromLocation as Yu, encodeListLink as Ju, replaceListLinkParam as Xu } from "../lib/list-link.js";
34
+ import { rememberedListPage as Zu, pageWhileSettling as vi, rememberListPage as ep, restoreWindowOutcome as tp, historyKey as np, arrivedByListReturn as ap, ensureHistoryKey as rp } from "../lib/list-page-memory.js";
35
+ import { peekListAway as sp, planListReturn as yi, takeListAway as lp, standbyListAway as op, changedRowIds as ip, readListReturn as dp, markReturnRow as cp, rowInView as up, noteListOpen as pp } from "../lib/list-return.js";
36
+ import { useLiveEvent as mp, expandCoalesced as fp, LIVE_ASPECTS as Un } from "../lib/live.js";
36
37
  import { createCoalescer as Ys } from "../lib/live-counts.js";
37
- import { useSteadyGroups as fp, useRowGlide as hp, movingRowTitle as bp } from "../lib/live-groups.js";
38
- import { useLiveLinkLabels as gp } from "../lib/live-link-labels.js";
39
- import { useRowChanges as xp, flashRows as vp, useRowLocks as ki, lockLabel as yp, viewerMatches as wi, conditionFields as _i, mayAffectMatch as kp, writerOf as wp } from "../lib/live-list.js";
40
- import { useLiveBurst as _p, useLivePause as Np, useSteadyRows as Sp, useKeptEntries as Js, GONE_ROW_CLASS as Cp, GONE_ROW_TITLE as $p, resumeAsRefetch as qp, burstWriter as Tp, totalsMayMove as Lp } from "../lib/live-list-flow.js";
41
- import { loadErrorStatus as Rp, listLoadErrorText as Fp } from "../lib/load-error.js";
42
- import { useShownRecords as Ep } from "../lib/missed-updates.js";
43
- import { listTrailDetail as Op, setTrailDetail as Pp } from "../lib/nav-trail.js";
44
- import { OPEN_IN_TABS_CAP as Dp, openInTabs as Ap, openInTabsMessage as Ni } from "../lib/open-in-tabs.js";
45
- import { isOwnWrite as Mp } from "../lib/own-writes.js";
46
- import { useIdleNextPage as Ip, intentProps as Kp, prefetchRecord as jp } from "../lib/prefetch.js";
47
- import { useRowPresence as Bp, rowPresenceKey as Xs } from "../lib/presence-hooks.js";
48
- import { queryKeys as Up } from "../lib/query-keys.js";
49
- import { cascadeFilter as Qp, fetchCascadeRelations as Wp } from "../lib/quick-filter-cascade.js";
50
- import { useOptionalRealtime as zp } from "../lib/realtime.js";
51
- import { rowMenuRef as ol, recordRefLabel as Vp, friendlyIdOf as Zs, copyWhenReady as Hp, shareableRecordId as Gp, friendlyIdFieldOf as Yp } from "../lib/record-ref.js";
52
- import { rowHighlightDotClass as Jp, rowHighlightClass as Xp } from "../lib/row-highlight.js";
53
- import { ROW_SURFACE_SELECTED as Zp, ROW_SURFACE as Si, ROW_SURFACE_HOVER as Ci, PINNED_CELL_SURFACE as em } from "../lib/row-surface.js";
38
+ import { useSteadyGroups as hp, useRowGlide as bp, movingRowTitle as gp } from "../lib/live-groups.js";
39
+ import { useLiveLinkLabels as xp } from "../lib/live-link-labels.js";
40
+ import { useRowChanges as vp, flashRows as yp, useRowLocks as ki, lockLabel as kp, viewerMatches as wi, conditionFields as _i, mayAffectMatch as wp, writerOf as _p } from "../lib/live-list.js";
41
+ import { useLiveBurst as Np, useLivePause as Sp, useSteadyRows as Cp, useKeptEntries as Js, GONE_ROW_CLASS as $p, GONE_ROW_TITLE as qp, resumeAsRefetch as Tp, burstWriter as Lp, totalsMayMove as Rp } from "../lib/live-list-flow.js";
42
+ import { loadErrorStatus as Fp, listLoadErrorText as Ep } from "../lib/load-error.js";
43
+ import { useShownRecords as Op } from "../lib/missed-updates.js";
44
+ import { listTrailDetail as Pp, setTrailDetail as Dp } from "../lib/nav-trail.js";
45
+ import { OPEN_IN_TABS_CAP as Ap, openInTabs as Mp, openInTabsMessage as Ni } from "../lib/open-in-tabs.js";
46
+ import { isOwnWrite as Ip } from "../lib/own-writes.js";
47
+ import { useIdleNextPage as Kp, intentProps as jp, prefetchRecord as Bp } from "../lib/prefetch.js";
48
+ import { useRowPresence as Up, rowPresenceKey as Xs } from "../lib/presence-hooks.js";
49
+ import { queryKeys as Qp } from "../lib/query-keys.js";
50
+ import { cascadeFilter as Wp, fetchCascadeRelations as zp } from "../lib/quick-filter-cascade.js";
51
+ import { useOptionalRealtime as Vp } from "../lib/realtime.js";
52
+ import { rowMenuRef as ol, recordRefLabel as Hp, friendlyIdOf as Zs, copyWhenReady as Gp, shareableRecordId as Yp, friendlyIdFieldOf as Jp } from "../lib/record-ref.js";
53
+ import { rowHighlightDotClass as Xp, rowHighlightClass as Zp } from "../lib/row-highlight.js";
54
+ import { ROW_SURFACE_SELECTED as em, ROW_SURFACE as Si, ROW_SURFACE_HOVER as Ci, PINNED_CELL_SURFACE as tm } from "../lib/row-surface.js";
54
55
  import { userErrorMessage as Ia } from "../lib/safe-error.js";
55
- import { logSearch as tm, logSearchOpen as nm } from "../lib/search-log.js";
56
- import { selKey as am, useSelectionPicks as rm, useSelectionLiveMarks as sm, useSelectionChanges as lm, useSelectedRowMemory as om, selectionSums as im } from "../lib/selection-watch.js";
57
- import { listViewInput as dm } from "../lib/send-view.js";
58
- import { shapeForField as cm } from "../lib/skeleton-shapes.js";
59
- import { knownTotalFrom as um } from "../lib/slow-reason.js";
60
- import { nextSortValue as pm } from "../lib/sort-cycle.js";
61
- import { approvalBadgeStates as mm, normalizeSummaryModeRules as fm } from "../lib/summary-mode.js";
62
- import { isFileCollection as hm } from "../lib/system-collections.js";
63
- import { useTableDensity as bm } from "../lib/table-density.js";
64
- import { fitPins as gm } from "../lib/table-pins.js";
65
- import { templateRelationPaths as xm } from "../lib/template-paths.js";
66
- import { useBelowMd as vm } from "../lib/use-below-md.js";
67
- import { useMyScopes as ym, matchScopeDimension as $i, effectiveScopeSeedIds as km, translateScopeValues as wm } from "../lib/use-my-scopes.js";
68
- import { useNewItemLayouts as _m } from "../lib/use-new-item-layouts.js";
69
- import { loadUserCard as Nm, userCardQuery as Sm } from "../lib/user-cards.js";
70
- import { cn as mn, humanHours as Cm, formatDateTime as $m } from "../lib/utils.js";
56
+ import { logSearch as nm, logSearchOpen as am } from "../lib/search-log.js";
57
+ import { selKey as rm, useSelectionPicks as sm, useSelectionLiveMarks as lm, useSelectionChanges as om, useSelectedRowMemory as im, selectionSums as dm } from "../lib/selection-watch.js";
58
+ import { listViewInput as cm } from "../lib/send-view.js";
59
+ import { shapeForField as um } from "../lib/skeleton-shapes.js";
60
+ import { knownTotalFrom as pm } from "../lib/slow-reason.js";
61
+ import { nextSortValue as mm } from "../lib/sort-cycle.js";
62
+ import { approvalBadgeStates as fm, normalizeSummaryModeRules as hm } from "../lib/summary-mode.js";
63
+ import { isFileCollection as bm } from "../lib/system-collections.js";
64
+ import { useTableDensity as gm } from "../lib/table-density.js";
65
+ import { fitPins as xm } from "../lib/table-pins.js";
66
+ import { templateRelationPaths as vm } from "../lib/template-paths.js";
67
+ import { useBelowMd as ym } from "../lib/use-below-md.js";
68
+ import { useMyScopes as km, matchScopeDimension as $i, effectiveScopeSeedIds as wm, translateScopeValues as _m } from "../lib/use-my-scopes.js";
69
+ import { useNewItemLayouts as Nm } from "../lib/use-new-item-layouts.js";
70
+ import { loadUserCard as Sm, userCardQuery as Cm } from "../lib/user-cards.js";
71
+ import { cn as mn, humanHours as $m, formatDateTime as qm } from "../lib/utils.js";
71
72
  import { useWatchActions as nd } from "../lib/watch-list.js";
72
- import { usePublishAskContext as qm, useAskRecordDrag as Tm } from "./ai/ask-context.js";
73
- import { useBuiltinGate as ad, useAvailableBulkActions as Lm, bulkActionEnabled as Rm, mergeBulkActions as Fm, guardMatches as Em, BulkActionButtons as Om } from "./bulk/BulkActionButtons.js";
74
- import { BulkCompareButton as Pm } from "./bulk/BulkCompareButton.js";
75
- import { BulkFieldUpdate as Dm } from "./bulk/BulkFieldUpdate.js";
76
- import { BulkRowMark as Am } from "./bulk/BulkRowMark.js";
77
- import { BulkSelectionNotices as Mm, SelectionFigures as Im } from "./bulk/BulkSelectionNotices.js";
78
- import { bulkUpdateOutcome as Km } from "./bulk/bulk-update-preview.js";
79
- import { MessageStakeholdersForm as jm } from "./bulk/MessageStakeholders.js";
80
- import { useRowPushActions as Bm, runRowPush as Um } from "./bulk/RowPushActions.js";
81
- import { CellCopyLayer as Qm } from "./CellCopyLayer.js";
82
- import { CollectionImportBanner as Wm } from "./CollectionImportBanner.js";
83
- import { CopyAsButton as zm } from "./CopyAsButton.js";
84
- import { isApprovalChangedFilter as Sn, APPROVAL_CHANGED_LABEL as qi, approvalChangedEntry as Vm } from "./cbv/approval-changed.js";
85
- import { useTreeConfig as Hm, CollectionTree as Gm } from "./cbv/CollectionTree.js";
86
- import { ColumnHeaderMenu as Ym } from "./cbv/ColumnHeaderMenu.js";
87
- import { viewChangedConditions as Ti, isChangedFilter as Qn, changedPhrase as Jm, ChangedByOthersChip as Xm, viewChangedTip as Li, changedCondition as Zm } from "./cbv/changed-by-others.js";
88
- import { loadTotalOverrides as Ri, shownTotals as e0, totalsBatchParams as t0, readTotal as n0, combineTerms as a0, formatTotal as Fi, totalTip as r0, totalsEligibleKey as s0, totalsSupport as l0, isTotalFn as o0, rememberTotalOverrides as i0, setOverride as d0, overridesAfterSave as c0 } from "./cbv/column-totals.js";
89
- import { EXPORT_MAX_ROWS as Ei, readExportRows as u0, stableSort as p0, m2oLabelPaths as m0, resolveAllPaths as f0, userLabel as h0, m2oLabel as b0, localYmd as g0 } from "./cbv/export-rows.js";
90
- import { FormulaColumnAdder as x0 } from "./cbv/FormulaColumnAdder.js";
91
- import { FoundElsewhere as v0 } from "./cbv/FoundElsewhere.js";
92
- import { useHierarchyScope as y0, HierarchyScopePicker as k0 } from "./cbv/HierarchyScope.js";
93
- import { tabStopRowKey as w0, rowFocusTarget as _0 } from "./cbv/row-focus.js";
94
- import { splitRiskFilter as Oi, riskFilterEntry as N0 } from "./cbv/saved-view-risk.js";
95
- import { isFilterRefusal as el, unknownFieldsOf as Pi, dropUnknownField as S0 } from "./cbv/unknown-fields.js";
96
- import { ViewDefaultMenu as C0 } from "./cbv/ViewDefaultMenu.js";
97
- import { CbvFileLabel as $0 } from "./cbv-file-label.js";
98
- import { exactCountParams as q0, lastPageFromCount as T0 } from "./cbv-pager.js";
99
- import { relationFilterRequests as L0, mergeFilterOptions as R0 } from "./cbv-relation-filter.js";
100
- import { useRecordRoomTypes as F0, canOpenChatRoom as E0, discussRecord as O0 } from "./chat/chat-core.js";
101
- import { FilterControl as P0 } from "./DataTable.js";
102
- import { FocusModeToggle as D0 } from "./FocusModeToggle.js";
103
- import { FULFILMENT_FILTER_OPTIONS as Di, FulfilmentPill as A0, fulfilmentFigures as M0 } from "./FulfilmentPill.js";
104
- import { HScrollProxy as I0 } from "./HScrollProxy.js";
105
- import { InStepCell as K0 } from "./InStep.js";
106
- import { useDocumentAutofillConfig as j0, startDocumentExtraction as B0 } from "./import/DocumentAutofillButton.js";
107
- import { INTEGRATIONS_FILTER_OPTIONS as Ai, IntegrationDots as U0 } from "./integrations/IntegrationDots.js";
73
+ import { usePublishAskContext as Tm, useAskRecordDrag as Lm } from "./ai/ask-context.js";
74
+ import { useBuiltinGate as ad, useAvailableBulkActions as Rm, bulkActionEnabled as Fm, mergeBulkActions as Em, guardMatches as Om, BulkActionButtons as Pm } from "./bulk/BulkActionButtons.js";
75
+ import { BulkCompareButton as Dm } from "./bulk/BulkCompareButton.js";
76
+ import { BulkFieldUpdate as Am } from "./bulk/BulkFieldUpdate.js";
77
+ import { BulkRowMark as Mm } from "./bulk/BulkRowMark.js";
78
+ import { BulkSelectionNotices as Im, SelectionFigures as Km } from "./bulk/BulkSelectionNotices.js";
79
+ import { bulkUpdateOutcome as jm } from "./bulk/bulk-update-preview.js";
80
+ import { MessageStakeholdersForm as Bm } from "./bulk/MessageStakeholders.js";
81
+ import { useRowPushActions as Um, runRowPush as Qm } from "./bulk/RowPushActions.js";
82
+ import { CellCopyLayer as Wm } from "./CellCopyLayer.js";
83
+ import { CollectionImportBanner as zm } from "./CollectionImportBanner.js";
84
+ import { CopyAsButton as Vm } from "./CopyAsButton.js";
85
+ import { isApprovalChangedFilter as Sn, APPROVAL_CHANGED_LABEL as qi, approvalChangedEntry as Hm } from "./cbv/approval-changed.js";
86
+ import { useTreeConfig as Gm, CollectionTree as Ym } from "./cbv/CollectionTree.js";
87
+ import { ColumnHeaderMenu as Jm } from "./cbv/ColumnHeaderMenu.js";
88
+ import { viewChangedConditions as Ti, isChangedFilter as Qn, changedPhrase as Xm, ChangedByOthersChip as Zm, viewChangedTip as Li, changedCondition as e0 } from "./cbv/changed-by-others.js";
89
+ import { loadTotalOverrides as Ri, shownTotals as t0, totalsBatchParams as n0, readTotal as a0, combineTerms as r0, formatTotal as Fi, totalTip as s0, totalsEligibleKey as l0, totalsSupport as o0, isTotalFn as i0, rememberTotalOverrides as d0, setOverride as c0, overridesAfterSave as u0 } from "./cbv/column-totals.js";
90
+ import { EXPORT_MAX_ROWS as Ei, readExportRows as p0, stableSort as m0, m2oLabelPaths as f0, resolveAllPaths as h0, userLabel as b0, m2oLabel as g0, localYmd as x0 } from "./cbv/export-rows.js";
91
+ import { FormulaColumnAdder as v0 } from "./cbv/FormulaColumnAdder.js";
92
+ import { FoundElsewhere as y0 } from "./cbv/FoundElsewhere.js";
93
+ import { useHierarchyScope as k0, HierarchyScopePicker as w0 } from "./cbv/HierarchyScope.js";
94
+ import { tabStopRowKey as _0, rowFocusTarget as N0 } from "./cbv/row-focus.js";
95
+ import { splitRiskFilter as Oi, riskFilterEntry as S0 } from "./cbv/saved-view-risk.js";
96
+ import { isFilterRefusal as el, unknownFieldsOf as Pi, dropUnknownField as C0 } from "./cbv/unknown-fields.js";
97
+ import { ViewDefaultMenu as $0 } from "./cbv/ViewDefaultMenu.js";
98
+ import { CbvFileLabel as q0 } from "./cbv-file-label.js";
99
+ import { exactCountParams as T0, lastPageFromCount as L0 } from "./cbv-pager.js";
100
+ import { relationFilterRequests as R0, mergeFilterOptions as F0 } from "./cbv-relation-filter.js";
101
+ import { useRecordRoomTypes as E0, canOpenChatRoom as O0, discussRecord as P0 } from "./chat/chat-core.js";
102
+ import { FilterControl as D0 } from "./DataTable.js";
103
+ import { FocusModeToggle as A0 } from "./FocusModeToggle.js";
104
+ import { FULFILMENT_FILTER_OPTIONS as Di, FulfilmentPill as M0, fulfilmentFigures as I0 } from "./FulfilmentPill.js";
105
+ import { HScrollProxy as K0 } from "./HScrollProxy.js";
106
+ import { InStepCell as j0 } from "./InStep.js";
107
+ import { useDocumentAutofillConfig as B0, startDocumentExtraction as U0 } from "./import/DocumentAutofillButton.js";
108
+ import { INTEGRATIONS_FILTER_OPTIONS as Ai, IntegrationDots as Q0 } from "./integrations/IntegrationDots.js";
108
109
  import { SendStatusMarks as Mi } from "./integrations/SendStatus.js";
109
- import { useQuickPickerSteps as Q0, QuickPickerDialog as W0 } from "./item-edit/QuickPickerDialog.js";
110
- import { usePickerExclusion as z0 } from "./item-edit/RecordGrantTools.js";
110
+ import { useQuickPickerSteps as W0, QuickPickerDialog as z0 } from "./item-edit/QuickPickerDialog.js";
111
+ import { usePickerExclusion as V0 } from "./item-edit/RecordGrantTools.js";
111
112
  import { invalidateRecordQueries as Ii } from "./item-edit/RecordLiveSync.js";
112
- import { relatedMissing as V0 } from "./item-edit/related-missing.js";
113
+ import { relatedMissing as H0 } from "./item-edit/related-missing.js";
113
114
  import { UserRosterCluster as Ki, UserChip as ji } from "./item-edit/UserChip.js";
114
115
  import { LiveCount as Bi } from "./LiveCount.js";
115
- import { LivePauseButton as H0, LiveBurstPill as G0 } from "./LiveListControls.js";
116
- import { LiveRowMark as Y0, MovingRowChip as J0 } from "./LiveRowMark.js";
117
- import { CopyListLinkButton as X0 } from "./list/CopyListLinkButton.js";
118
- import { useInlineEdit as Z0, InlineEditCell as ef } from "./list/InlineEdit.js";
119
- import { ListViewers as tf } from "./list/ListViewers.js";
120
- import { PhonePager as nf } from "./list/PhonePager.js";
121
- import { MapView as af } from "./MapView.js";
122
- import { MergeRecordsDialog as rf } from "./merge/MergeRecordsDialog.js";
123
- import { useMergeAllowed as sf } from "./merge/MergeWithFlow.js";
124
- import { OverflowRail as lf } from "./OverflowRail.js";
125
- import { usePickerExcludedRows as of, PICKER_EXCLUDED_ROW_CLASS as df, PICKER_EXCLUDED_TITLE as cf } from "./PickerExcludedRows.js";
116
+ import { LivePauseButton as G0, LiveBurstPill as Y0 } from "./LiveListControls.js";
117
+ import { LiveRowMark as J0, MovingRowChip as X0 } from "./LiveRowMark.js";
118
+ import { CopyListLinkButton as Z0 } from "./list/CopyListLinkButton.js";
119
+ import { useInlineEdit as ef, InlineEditCell as tf } from "./list/InlineEdit.js";
120
+ import { ListViewers as nf } from "./list/ListViewers.js";
121
+ import { PhonePager as af } from "./list/PhonePager.js";
122
+ import { MapView as rf } from "./MapView.js";
123
+ import { MergeRecordsDialog as sf } from "./merge/MergeRecordsDialog.js";
124
+ import { useMergeAllowed as lf } from "./merge/MergeWithFlow.js";
125
+ import { OverflowRail as of } from "./OverflowRail.js";
126
+ import { usePickerExcludedRows as df, PICKER_EXCLUDED_ROW_CLASS as cf, PICKER_EXCLUDED_TITLE as uf } from "./PickerExcludedRows.js";
126
127
  import { ConfirmButton as il } from "./profile/primitives.js";
127
128
  import { pruneQuickSelection as tl } from "./quick-filters/config.js";
128
- import { QuickFilterBarEditor as uf, QuickFilterEditButton as Ui } from "./quick-filters/QuickFilterBarEditor.js";
129
- import { useQuickFilterEditing as pf } from "./quick-filters/useQuickFilterEditing.js";
130
- import { RealtimeStaleMark as mf } from "./RealtimeStatusBanner.js";
131
- import { RecordDrilldownSheet as ff } from "./RecordDrilldownSheet.js";
132
- import { RecordHoverCard as hf } from "./RecordHoverCard.js";
133
- import { RelativeTime as bf } from "./RelativeTime.js";
134
- import { RowHighlightLegend as gf } from "./RowHighlightLegend.js";
135
- import { RowPresence as xf } from "./RowPresence.js";
136
- import { TableSkeletonRows as vf } from "./Skeletons.js";
137
- import { SlowNoticeView as yf } from "./SlowNotice.js";
138
- import { SendViewButton as kf } from "./send-view/SendViewButton.js";
139
- import { TipLayer as wf } from "./TipLayer.js";
129
+ import { QuickFilterBarEditor as pf, QuickFilterEditButton as Ui } from "./quick-filters/QuickFilterBarEditor.js";
130
+ import { useQuickFilterEditing as mf } from "./quick-filters/useQuickFilterEditing.js";
131
+ import { RealtimeStaleMark as ff } from "./RealtimeStatusBanner.js";
132
+ import { RecordDrilldownSheet as hf } from "./RecordDrilldownSheet.js";
133
+ import { RecordHoverCard as bf } from "./RecordHoverCard.js";
134
+ import { RelativeTime as gf } from "./RelativeTime.js";
135
+ import { RowHighlightLegend as xf } from "./RowHighlightLegend.js";
136
+ import { RowPresence as vf } from "./RowPresence.js";
137
+ import { TableSkeletonRows as yf } from "./Skeletons.js";
138
+ import { SlowNoticeView as kf } from "./SlowNotice.js";
139
+ import { SendViewButton as wf } from "./send-view/SendViewButton.js";
140
+ import { TipLayer as _f } from "./TipLayer.js";
140
141
  import { UnseenDot as Qi } from "./UnseenDot.js";
141
142
  import { Popover as Sr, PopoverTrigger as Cr, PopoverContent as $r } from "./ui/popover.js";
142
143
  import { SimpleSelectXs as fa, SimpleSelect as Wi } from "./ui/SimpleSelect.js";
143
- import { Skeleton as _f } from "./ui/skeleton.js";
144
- import { useAccessRegained as Nf, AccessGrantedNote as Sf } from "./panels/AccessGrantedNote.js";
145
- import { ListAccessDenied as Cf } from "./panels/AccessDeniedPanel.js";
146
- import { RevisionsPanel as $f } from "./panels/RevisionsPanel.js";
147
- import { itemActionChoiceStep as qf, ItemActionChoiceList as Tf } from "./panels/ItemActionChoices.js";
144
+ import { Skeleton as Nf } from "./ui/skeleton.js";
145
+ import { useAccessRegained as Sf, AccessGrantedNote as Cf } from "./panels/AccessGrantedNote.js";
146
+ import { ListAccessDenied as $f } from "./panels/AccessDeniedPanel.js";
147
+ import { RevisionsPanel as qf } from "./panels/RevisionsPanel.js";
148
+ import { itemActionChoiceStep as Tf, ItemActionChoiceList as Lf } from "./panels/ItemActionChoices.js";
148
149
  function ha(n, i, h) {
149
150
  const d = n.find((w) => w.one_collection === i && w.one_field === h);
150
151
  if (d != null && d.many_collection)
@@ -200,7 +201,7 @@ function Tr(n, i) {
200
201
  }
201
202
  return null;
202
203
  }
203
- const Lf = [
204
+ const Rf = [
204
205
  { label: "None", cfg: null },
205
206
  { label: "Currency", cfg: { type: "number", decimals: 2, thousands: !0, prefix: "$" } },
206
207
  { label: "Number", cfg: { type: "number", thousands: !0 } },
@@ -236,7 +237,7 @@ function cl(n, i, h) {
236
237
  !d.junction_field && !!d.one_collection
237
238
  );
238
239
  }
239
- function Rf(n) {
240
+ function Ff(n) {
240
241
  const i = new Date(String(n));
241
242
  if (Number.isNaN(i.getTime())) return String(n);
242
243
  const h = Date.now() - i.getTime(), d = Math.floor(h / 6e4);
@@ -286,17 +287,17 @@ function ld(n, i, h, d = []) {
286
287
  }, 0);
287
288
  })), q.promise.then((F) => F.get(h) ?? null);
288
289
  }
289
- const Ff = {
290
+ const Ef = {
290
291
  draft: "draft",
291
292
  submitted: "submitted",
292
293
  review: "in review",
293
294
  approved: "approved",
294
295
  rejected: "rejected"
295
296
  };
296
- function Ef({ summary: n }) {
297
+ function Of({ summary: n }) {
297
298
  var $;
298
299
  if (!n || n.total === 0) return /* @__PURE__ */ a("span", { className: "text-[12px] text-slate-300", children: "—" });
299
- const i = n.latest, h = n.active > 0, d = !!(i != null && i.workflow_state) && !["approved", "rejected", "reverted"].includes(i.status), w = i ? d ? (($ = i.workflow_state) == null ? void 0 : $.label) ?? "" : Ff[i.status] ?? i.status : "", N = i == null ? void 0 : i.cost_impact, q = N != null && N !== 0 ? `${N > 0 ? "+" : "−"}$${Math.abs(N).toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : null, F = i ? `${i.title ?? "Addendum"} — ${w}${n.total > 1 ? ` (${n.total} total)` : ""}` : void 0;
300
+ const i = n.latest, h = n.active > 0, d = !!(i != null && i.workflow_state) && !["approved", "rejected", "reverted"].includes(i.status), w = i ? d ? (($ = i.workflow_state) == null ? void 0 : $.label) ?? "" : Ef[i.status] ?? i.status : "", N = i == null ? void 0 : i.cost_impact, q = N != null && N !== 0 ? `${N > 0 ? "+" : "−"}$${Math.abs(N).toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : null, F = i ? `${i.title ?? "Addendum"} — ${w}${n.total > 1 ? ` (${n.total} total)` : ""}` : void 0;
300
301
  return /* @__PURE__ */ c(
301
302
  "span",
302
303
  {
@@ -320,9 +321,9 @@ function Ef({ summary: n }) {
320
321
  );
321
322
  }
322
323
  function ul({ relatedCollection: n, id: i }) {
323
- return hm(n) ? /* @__PURE__ */ a($0, { id: i }) : /* @__PURE__ */ a(Of, { relatedCollection: n, id: i });
324
+ return bm(n) ? /* @__PURE__ */ a(q0, { id: i }) : /* @__PURE__ */ a(Pf, { relatedCollection: n, id: i });
324
325
  }
325
- function Of({
326
+ function Pf({
326
327
  relatedCollection: n,
327
328
  id: i
328
329
  }) {
@@ -332,7 +333,7 @@ function Of({
332
333
  staleTime: 10 * 6e4,
333
334
  enabled: !Wt(n),
334
335
  retry: !1
335
- }), F = xm(N == null ? void 0 : N.display_template), $ = Wt(n) || !q, { data: D, isLoading: z } = te({
336
+ }), F = vm(N == null ? void 0 : N.display_template), $ = Wt(n) || !q, { data: D, isLoading: z } = te({
336
337
  queryKey: ["cbv-relation-item", n, String(i), F.join(",")],
337
338
  queryFn: () => d ? h.request(X(`/users/${i}`)).then((E) => E.data) : ld(h, n, String(i), F),
338
339
  enabled: w && $ && (d || !Wt(n)),
@@ -343,7 +344,7 @@ function Of({
343
344
  if (z || !$)
344
345
  return /* @__PURE__ */ a("span", { className: "inline-block h-3.5 w-24 animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" });
345
346
  if (!D) {
346
- const E = V0(null);
347
+ const E = H0(null);
347
348
  return /* @__PURE__ */ a(
348
349
  "span",
349
350
  {
@@ -359,13 +360,13 @@ function Of({
359
360
  ) : Pr((N == null ? void 0 : N.display_template) ?? null, D);
360
361
  return (
361
362
  // To the right of the cell: below it, the card covered the same column on the next rows.
362
- /* @__PURE__ */ a(hf, { collection: n, id: i, disabled: d, side: "right", children: /* @__PURE__ */ a("span", { className: "text-[12px] text-slate-700 dark:text-slate-200", children: U }) })
363
+ /* @__PURE__ */ a(bf, { collection: n, id: i, disabled: d, side: "right", children: /* @__PURE__ */ a("span", { className: "text-[12px] text-slate-700 dark:text-slate-200", children: U }) })
363
364
  );
364
365
  }
365
366
  function od(n, i, h, d, w, N) {
366
367
  const q = i.getQueryData(["cbv-collection-meta", h]);
367
- return Hp(
368
- Gp(n, h, q, d, w).then(
368
+ return Gp(
369
+ Yp(n, h, q, d, w).then(
369
370
  (F) => window.location.origin + N({ collection: h, itemId: F })
370
371
  )
371
372
  ).catch(() => {
@@ -384,17 +385,17 @@ function Fr(n, i) {
384
385
  ])
385
386
  n.invalidateQueries({ queryKey: [h, i] });
386
387
  }
387
- function Pf(n, i) {
388
+ function Df(n, i) {
388
389
  return n ? n.is_admin ? !0 : (n.collections ?? []).some(
389
390
  (h) => (h.collection === i || h.collection === "*") && (h.actions.includes("update") || h.actions.includes("*"))
390
391
  ) : !1;
391
392
  }
392
- function Df(n, i) {
393
+ function Af(n, i) {
393
394
  return n ? n.is_admin ? !0 : (n.collections ?? []).some(
394
395
  (h) => (h.collection === i || h.collection === "*") && (h.actions.includes("delete") || h.actions.includes("*"))
395
396
  ) : !1;
396
397
  }
397
- function Af({
398
+ function Mf({
398
399
  collection: n,
399
400
  id: i,
400
401
  hasPipeline: h,
@@ -425,10 +426,10 @@ function Af({
425
426
  queryFn: () => C.request(X("/security/my/permissions")).then((b) => b.data),
426
427
  enabled: A && !ne,
427
428
  staleTime: 5 * 6e4
428
- }), Ie = z0(n, String(i), {
429
+ }), Ie = V0(n, String(i), {
429
430
  enabled: A && ne,
430
431
  onDone: () => g(!1)
431
- }), [Lt, dt] = k(!1), Rt = F0(A), ln = E0() && !!(Rt != null && Rt.some((b) => b.collection === n));
432
+ }), [Lt, dt] = k(!1), Rt = E0(A), ln = O0() && !!(Rt != null && Rt.some((b) => b.collection === n));
432
433
  se(() => {
433
434
  if (!A) return;
434
435
  const b = (R) => {
@@ -450,14 +451,14 @@ function Af({
450
451
  }), Y = oe(
451
452
  () => ((we == null ? void 0 : we.available_transitions) ?? []).filter((b) => b.in_row_menu !== !1),
452
453
  [we]
453
- ), { data: _e } = Lm(A ? [n] : []), We = ku({
454
+ ), { data: _e } = Rm(A ? [n] : []), We = wu({
454
455
  isAdmin: ne,
455
- roleMayDelete: Df(He, n),
456
- builtinOpen: _e ? (_e[n] ?? []).some((b) => b.source === "builtin" && b.key === "delete") && Rm(z, n, "delete") : void 0,
456
+ roleMayDelete: Af(He, n),
457
+ builtinOpen: _e ? (_e[n] ?? []).some((b) => b.source === "builtin" && b.key === "delete") && Fm(z, n, "delete") : void 0,
457
458
  hasPipeline: h,
458
459
  run: h ? we === void 0 ? void 0 : we : null
459
460
  }), ie = oe(
460
- () => A ? Fm(_e, [n], z).filter(
461
+ () => A ? Em(_e, [n], z).filter(
461
462
  // Transition-kind registry actions (Cancel / Uncancel) are the pipeline
462
463
  // transitions already listed above — never the same move twice.
463
464
  (b) => b.kind !== "builtin" && b.kind !== "transition"
@@ -484,8 +485,8 @@ function Af({
484
485
  return !((R = O.guard) != null && R.length);
485
486
  });
486
487
  const b = { ...v ?? {}, ...D ?? {} };
487
- return ie.filter((O) => Em(O.guard, b) !== !1);
488
- }, [ie, ct, v, D]), { pushActions: me, failedPartners: Ge } = Bm({
488
+ return ie.filter((O) => Om(O.guard, b) !== !1);
489
+ }, [ie, ct, v, D]), { pushActions: me, failedPartners: Ge } = Um({
489
490
  collection: n,
490
491
  id: i,
491
492
  open: A,
@@ -533,7 +534,7 @@ function Af({
533
534
  staleTime: 0
534
535
  }), [bn, gn] = k(null), _ = (Ae == null ? void 0 : Ae.id) ?? null;
535
536
  se(() => gn(null), [_]);
536
- const ee = Ke.data ? qf(Ke.data) : null, he = ee && !ee.ask ? ee.value : bn, ge = !!Ae && (!ee || ee.ask && bn == null);
537
+ const ee = Ke.data ? Tf(Ke.data) : null, he = ee && !ee.ask ? ee.value : bn, ge = !!Ae && (!ee || ee.ask && bn == null);
537
538
  Zc.useLayoutEffect(() => {
538
539
  var lt;
539
540
  if (!A) return;
@@ -588,7 +589,7 @@ function Af({
588
589
  Fe.error((O == null ? void 0 : O.error) ?? Ia(b, "Action failed"), Rr(b));
589
590
  }
590
591
  }), on = Qt({
591
- mutationFn: ({ op: b, note: O, pick: R }) => Um(C, n, i, b, O, R).then((Le) => ({ op: b, outcome: Le })),
592
+ mutationFn: ({ op: b, note: O, pick: R }) => Qm(C, n, i, b, O, R).then((Le) => ({ op: b, outcome: Le })),
592
593
  onSuccess: ({ op: b, outcome: O }) => {
593
594
  g(!1);
594
595
  const R = b.kind === "push" ? b.action.label : "Retry";
@@ -675,7 +676,7 @@ function Af({
675
676
  }
676
677
  ),
677
678
  (Ae == null ? void 0 : Ae.choose) && (Ke.isError ? /* @__PURE__ */ a("p", { className: "mb-1.5 px-1 text-[11.5px] text-red-600 dark:text-red-400", children: "Could not load the options." }) : Ke.isLoading ? /* @__PURE__ */ a("p", { className: "mb-1.5 px-1 text-[11.5px] text-slate-500 dark:text-slate-400", children: "Loading…" }) : ee != null && ee.ask ? /* @__PURE__ */ a("div", { className: "mb-1.5 -mt-3 px-1", children: /* @__PURE__ */ a(
678
- Tf,
679
+ Lf,
679
680
  {
680
681
  choose: Ae.choose,
681
682
  options: Ke.data ?? [],
@@ -766,7 +767,7 @@ function Af({
766
767
  });
767
768
  }),
768
769
  ln && _t("Discuss in chat", () => {
769
- g(!1), O0(C, n, String(i)).then((b) => {
770
+ g(!1), P0(C, n, String(i)).then((b) => {
770
771
  b || Fe.error("This record has no chat room you can open");
771
772
  }).catch(() => Fe.error("Could not open the chat room"));
772
773
  }),
@@ -973,7 +974,7 @@ function Hi({
973
974
  );
974
975
  return /* @__PURE__ */ a("span", { className: "text-[12px] tabular-nums text-slate-400", children: F });
975
976
  }
976
- return /* @__PURE__ */ a("span", { className: "text-[12px] tabular-nums text-slate-400", children: /* @__PURE__ */ a(bf, { value: String(d), format: Rf }) });
977
+ return /* @__PURE__ */ a("span", { className: "text-[12px] tabular-nums text-slate-400", children: /* @__PURE__ */ a(gf, { value: String(d), format: Ff }) });
977
978
  }
978
979
  return typeof d == "string" ? /* @__PURE__ */ a(
979
980
  "span",
@@ -1103,7 +1104,7 @@ function Mr({
1103
1104
  ] })
1104
1105
  ] });
1105
1106
  }
1106
- function Mf({
1107
+ function If({
1107
1108
  target: n,
1108
1109
  label: i,
1109
1110
  selected: h,
@@ -1121,7 +1122,7 @@ function Mf({
1121
1122
  // page-only list; a new name keeps an old cached entry from answering.
1122
1123
  queryKey: ["cbv-filter-options-all", n, C, f ?? "", D, U],
1123
1124
  queryFn: async () => {
1124
- const H = L0({
1125
+ const H = R0({
1125
1126
  search: D,
1126
1127
  preferIds: w,
1127
1128
  labelField: C,
@@ -1134,7 +1135,7 @@ function Mf({
1134
1135
  (He) => N.request(X(`/items/${n}`, He)).then((Ie) => I(Ie.data ?? []))
1135
1136
  )
1136
1137
  );
1137
- return R0(K);
1138
+ return F0(K);
1138
1139
  },
1139
1140
  staleTime: 10 * 6e4,
1140
1141
  enabled: $ && !!E,
@@ -1179,7 +1180,7 @@ function Mf({
1179
1180
  }
1180
1181
  );
1181
1182
  }
1182
- function If({
1183
+ function Kf({
1183
1184
  collection: n,
1184
1185
  field: i,
1185
1186
  selected: h,
@@ -1207,7 +1208,7 @@ function If({
1207
1208
  }
1208
1209
  );
1209
1210
  }
1210
- function Kf({
1211
+ function jf({
1211
1212
  value: n,
1212
1213
  onChange: i
1213
1214
  }) {
@@ -1229,7 +1230,7 @@ function Kf({
1229
1230
  var f;
1230
1231
  if (!n) return "All";
1231
1232
  const C = Or(n);
1232
- return C ? xu(C) : ((f = Dr.find((ne) => ne.value === n)) == null ? void 0 : f.label) ?? n;
1233
+ return C ? vu(C) : ((f = Dr.find((ne) => ne.value === n)) == null ? void 0 : f.label) ?? n;
1233
1234
  })(), [z, U] = k("between");
1234
1235
  se(() => {
1235
1236
  var C;
@@ -1237,7 +1238,7 @@ function Kf({
1237
1238
  }, [h, n]);
1238
1239
  const E = () => {
1239
1240
  const C = w || q;
1240
- C && (i(yu({ op: z, from: C, to: q || w || C })), d(!1));
1241
+ C && (i(ku({ op: z, from: C, to: q || w || C })), d(!1));
1241
1242
  };
1242
1243
  return /* @__PURE__ */ c("div", { ref: $, className: "relative w-full", children: [
1243
1244
  /* @__PURE__ */ c(
@@ -1282,7 +1283,7 @@ function Kf({
1282
1283
  )) }),
1283
1284
  /* @__PURE__ */ c("div", { className: "border-t border-slate-100 p-2 dark:border-slate-800", children: [
1284
1285
  /* @__PURE__ */ a("p", { className: "pb-1 text-[10px] font-semibold uppercase tracking-wide text-slate-400", children: "Date or range" }),
1285
- /* @__PURE__ */ a("div", { className: "grid grid-cols-3 gap-1 pb-1.5", children: vu.map((C) => /* @__PURE__ */ a(
1286
+ /* @__PURE__ */ a("div", { className: "grid grid-cols-3 gap-1 pb-1.5", children: yu.map((C) => /* @__PURE__ */ a(
1286
1287
  "button",
1287
1288
  {
1288
1289
  type: "button",
@@ -1332,7 +1333,7 @@ function Kf({
1332
1333
  ] })
1333
1334
  ] });
1334
1335
  }
1335
- function jf({
1336
+ function Bf({
1336
1337
  def: n,
1337
1338
  selected: i,
1338
1339
  onChange: h,
@@ -1353,9 +1354,9 @@ function jf({
1353
1354
  i.map(String).sort().join(",")
1354
1355
  ],
1355
1356
  queryFn: async () => {
1356
- const L = U !== "[]" ? Qp(
1357
+ const L = U !== "[]" ? Wp(
1357
1358
  n.collection,
1358
- await Wp(q, F, n.collection),
1359
+ await zp(q, F, n.collection),
1359
1360
  N
1360
1361
  ) : null, S = (H, I) => q.request(
1361
1362
  X(`/items/${n.collection}`, {
@@ -1416,7 +1417,7 @@ const id = [
1416
1417
  { value: "30d", label: "30 days" },
1417
1418
  { value: "90d", label: "90 days" },
1418
1419
  { value: "year", label: "This year" }
1419
- ], Bf = {
1420
+ ], Uf = {
1420
1421
  _eq: "_neq",
1421
1422
  _neq: "_eq",
1422
1423
  _in: "_nin",
@@ -1444,7 +1445,7 @@ function rl(n) {
1444
1445
  const i = [];
1445
1446
  for (const d of n) {
1446
1447
  if (Qn(d)) {
1447
- i.push(Zm(d));
1448
+ i.push(e0(d));
1448
1449
  continue;
1449
1450
  }
1450
1451
  const w = d.fieldType === "date" || d.fieldType === "datetime" || d.fieldType === "timestamp";
@@ -1473,7 +1474,7 @@ function rl(n) {
1473
1474
  continue;
1474
1475
  }
1475
1476
  let N = d.op.includes(":") ? d.op.split(":")[0] : d.op, q = d.op.includes(":") ? d.op.split(":")[1] : d.value || null;
1476
- d.fieldType === "boolean" && (q === "true" || q === "false") && (q = q === "true"), d.not && (N = Bf[N] ?? N), i.push({ path: d.path, op: N, value: q });
1477
+ d.fieldType === "boolean" && (q === "true" || q === "false") && (q = q === "true"), d.not && (N = Uf[N] ?? N), i.push({ path: d.path, op: N, value: q });
1477
1478
  }
1478
1479
  return i;
1479
1480
  }
@@ -1501,7 +1502,7 @@ const Gi = [
1501
1502
  { label: "After", value: "_gt" },
1502
1503
  { label: "Is empty", value: "_null" },
1503
1504
  { label: "Is not empty", value: "_nnull" }
1504
- ], Uf = {
1505
+ ], Qf = {
1505
1506
  string: Gi,
1506
1507
  text: Gi,
1507
1508
  integer: sl,
@@ -1522,8 +1523,8 @@ const Gi = [
1522
1523
  { label: "Is not empty", value: "_nnull" }
1523
1524
  ]
1524
1525
  };
1525
- function Qf(n) {
1526
- for (const i of Object.values(Uf)) {
1526
+ function Wf(n) {
1527
+ for (const i of Object.values(Qf)) {
1527
1528
  const h = i.find((d) => d.value === n);
1528
1529
  if (h) return h.label;
1529
1530
  }
@@ -1645,7 +1646,7 @@ function Yi(n, i, h) {
1645
1646
  const d = n.type ?? "string";
1646
1647
  return d === "integer" || d === "decimal" || d === "float" ? "number" : d === "datetime" || d === "timestamp" ? "date" : d;
1647
1648
  }
1648
- function Wf({
1649
+ function zf({
1649
1650
  collection: n,
1650
1651
  path: i,
1651
1652
  pathLabels: h,
@@ -1795,7 +1796,7 @@ function Wf({
1795
1796
  S.key
1796
1797
  )) });
1797
1798
  }
1798
- function zf({
1799
+ function Vf({
1799
1800
  target: n,
1800
1801
  selected: i,
1801
1802
  labels: h,
@@ -1885,9 +1886,9 @@ function ud(n) {
1885
1886
  const w = ((h = Dr.find((N) => N.value === n.value)) == null ? void 0 : h.label) ?? String(n.value);
1886
1887
  return { field: i, op: "in the", value: `${w} (rolling)` };
1887
1888
  }
1888
- return (d = n.path[0]) != null && d.startsWith("$has_") || n.path[0] === "$missing_required" || Sn(n) ? { field: i, op: "", value: "" } : { field: i, op: Qf(n.op).toLowerCase(), value: String(n.value ?? "") };
1889
+ return (d = n.path[0]) != null && d.startsWith("$has_") || n.path[0] === "$missing_required" || Sn(n) ? { field: i, op: "", value: "" } : { field: i, op: Wf(n.op).toLowerCase(), value: String(n.value ?? "") };
1889
1890
  }
1890
- function Vf({
1891
+ function Hf({
1891
1892
  collection: n,
1892
1893
  meta: i,
1893
1894
  search: h,
@@ -2061,7 +2062,7 @@ function Vf({
2061
2062
  v
2062
2063
  )) }),
2063
2064
  /* @__PURE__ */ a(
2064
- Wf,
2065
+ zf,
2065
2066
  {
2066
2067
  collection: z.collection,
2067
2068
  path: z.path,
@@ -2096,7 +2097,7 @@ function Vf({
2096
2097
  ),
2097
2098
  We === "relation" && E.relTarget ? /* @__PURE__ */ c("div", { className: "pt-2", children: [
2098
2099
  /* @__PURE__ */ a(
2099
- zf,
2100
+ Vf,
2100
2101
  {
2101
2102
  target: E.relTarget,
2102
2103
  selected: J,
@@ -2312,7 +2313,7 @@ function Vf({
2312
2313
  ] })
2313
2314
  );
2314
2315
  }
2315
- function Hf({
2316
+ function Gf({
2316
2317
  collection: n,
2317
2318
  meta: i,
2318
2319
  onPick: h
@@ -2366,7 +2367,7 @@ function Hf({
2366
2367
  ] }, q.field);
2367
2368
  }) });
2368
2369
  }
2369
- function Gf({
2370
+ function Yf({
2370
2371
  collection: n,
2371
2372
  selectedIds: i,
2372
2373
  transitions: h,
@@ -2385,7 +2386,7 @@ function Gf({
2385
2386
  Er();
2386
2387
  const C = Zt(), f = Ar(), ne = td(), [L, S] = k(
2387
2388
  "actions"
2388
- ), [A, g] = k(!1), J = Z(!1), H = sf(n, null, i.length >= 2), I = Z(z);
2389
+ ), [A, g] = k(!1), J = Z(!1), H = lf(n, null, i.length >= 2), I = Z(z);
2389
2390
  I.current = z, se(() => {
2390
2391
  var _;
2391
2392
  (_ = I.current) == null || _.call(I, L !== "actions");
@@ -2483,7 +2484,7 @@ function Gf({
2483
2484
  const he = await _(ee);
2484
2485
  Ae(he), E(), U(), S("actions");
2485
2486
  } catch (he) {
2486
- Ae(wu(he, "Bulk action failed"));
2487
+ Ae(_u(he, "Bulk action failed"));
2487
2488
  } finally {
2488
2489
  du(ee), ut(!1);
2489
2490
  }
@@ -2495,7 +2496,7 @@ function Gf({
2495
2496
  by_form: !0
2496
2497
  })
2497
2498
  );
2498
- return Km(ge);
2499
+ return jm(ge);
2499
2500
  });
2500
2501
  return /* @__PURE__ */ c(
2501
2502
  "div",
@@ -2564,24 +2565,24 @@ function Gf({
2564
2565
  {
2565
2566
  type: "button",
2566
2567
  onClick: () => {
2567
- const _ = Ap(
2568
+ const _ = Mp(
2568
2569
  i.map((ee) => ne.urlFor({ collection: n, itemId: String(ee) }))
2569
2570
  );
2570
2571
  _.blocked > 0 || _.capped > 0 ? Fe.warning(Ni(_)) : Fe.success(Ni(_));
2571
2572
  },
2572
2573
  "data-bulk-open-tabs": !0,
2573
- title: `Open the selected records in new tabs (up to ${Dp})`,
2574
+ title: `Open the selected records in new tabs (up to ${Ap})`,
2574
2575
  className: "h-8 rounded-md border border-white/20 dark:border-border px-3 text-[12.5px] font-medium hover:bg-white/10 dark:hover:bg-muted",
2575
2576
  children: "Open in tabs"
2576
2577
  }
2577
2578
  ),
2578
2579
  K("compare") && /* @__PURE__ */ a(
2579
- Pm,
2580
+ Dm,
2580
2581
  {
2581
2582
  targets: i.map((_) => ({ collection: n, id: _ })),
2582
2583
  fields: w,
2583
2584
  relations: N,
2584
- renderValue: (_, ee, he, ge) => nh(n, _, ee, he, ge),
2585
+ renderValue: (_, ee, he, ge) => ah(n, _, ee, he, ge),
2585
2586
  className: "h-8 rounded-md border border-white/20 dark:border-border px-3 text-[12.5px] font-medium hover:bg-white/10 dark:hover:bg-muted"
2586
2587
  }
2587
2588
  ),
@@ -2597,7 +2598,7 @@ function Gf({
2597
2598
  }
2598
2599
  ),
2599
2600
  /* @__PURE__ */ a(
2600
- Om,
2601
+ Pm,
2601
2602
  {
2602
2603
  targets: i.map((_) => ({ collection: n, id: _ })),
2603
2604
  enabledKeys: q,
@@ -2609,7 +2610,7 @@ function Gf({
2609
2610
  }
2610
2611
  ),
2611
2612
  K("update-field") && /* @__PURE__ */ a(
2612
- Dm,
2613
+ Am,
2613
2614
  {
2614
2615
  collection: n,
2615
2616
  selectedIds: i,
@@ -2651,7 +2652,7 @@ function Gf({
2651
2652
  )
2652
2653
  ] }),
2653
2654
  A && /* @__PURE__ */ a(
2654
- rf,
2655
+ sf,
2655
2656
  {
2656
2657
  collection: n,
2657
2658
  ids: i.slice(0, 5),
@@ -2665,7 +2666,7 @@ function Gf({
2665
2666
  }
2666
2667
  ),
2667
2668
  L === "message" && /* @__PURE__ */ a(
2668
- jm,
2669
+ Bm,
2669
2670
  {
2670
2671
  collection: n,
2671
2672
  selectedIds: i,
@@ -2871,7 +2872,7 @@ function Gf({
2871
2872
  }
2872
2873
  );
2873
2874
  }
2874
- const Yf = {
2875
+ const Jf = {
2875
2876
  state: "badge",
2876
2877
  entered: "date",
2877
2878
  aging: "short",
@@ -2884,7 +2885,7 @@ const Yf = {
2884
2885
  addendums: "short",
2885
2886
  in_step: "short"
2886
2887
  }, Ji = "bg-[color:color-mix(in_srgb,hsl(var(--card))_97%,rgb(var(--nvr-cyan-rgb)))] dark:bg-[color:color-mix(in_srgb,hsl(var(--card))_94%,rgb(var(--nvr-cyan-rgb)))]";
2887
- function Jf() {
2888
+ function Xf() {
2888
2889
  const n = "Changed by someone else since you last opened this view";
2889
2890
  return /* @__PURE__ */ a(
2890
2891
  "span",
@@ -2898,8 +2899,8 @@ function Jf() {
2898
2899
  }
2899
2900
  );
2900
2901
  }
2901
- const Xf = 2 * 6e4;
2902
- function Zf(n) {
2902
+ const Zf = 2 * 6e4;
2903
+ function eh(n) {
2903
2904
  if (typeof document > "u" || document.visibilityState === "hidden" || n > 0) return !1;
2904
2905
  const i = document.querySelector("[data-cbv-scroll]");
2905
2906
  if (!i) return !0;
@@ -2911,7 +2912,7 @@ function Xi(n, i, h) {
2911
2912
  const d = i[0];
2912
2913
  return (h ? d !== h : d !== "cbv-resolved" && d !== "cbv-risk") ? !1 : i[1] === n;
2913
2914
  }
2914
- function eh(n) {
2915
+ function th(n) {
2915
2916
  return new Set(
2916
2917
  n.flatMap(
2917
2918
  (i) => ru(
@@ -2920,7 +2921,7 @@ function eh(n) {
2920
2921
  )
2921
2922
  );
2922
2923
  }
2923
- function th(n, i) {
2924
+ function nh(n, i) {
2924
2925
  if (!n || n.length === 0)
2925
2926
  return { resolved: i.resolved.size > 0, risk: i.risk.size > 0 };
2926
2927
  const h = n.filter((d) => !d.startsWith("$"));
@@ -2929,7 +2930,7 @@ function th(n, i) {
2929
2930
  risk: h.some((d) => i.risk.has(d))
2930
2931
  };
2931
2932
  }
2932
- function Ug({
2933
+ function Wg({
2933
2934
  collection: n,
2934
2935
  quickFilters: i = [],
2935
2936
  initialColumns: h,
@@ -2947,39 +2948,39 @@ function Ug({
2947
2948
  }) {
2948
2949
  var Zo, ei, ti, ni, ai, ri, si, li, oi, ii, di, ci;
2949
2950
  const f = Zt(), ne = nd(), L = Ar(), { open: S, urlFor: A } = td(), [g] = k(
2950
- () => Hu(Gu(`cbv:${n}`))
2951
+ () => Gu(Yu(`cbv:${n}`))
2951
2952
  ), [J] = k(
2952
2953
  () => g ? Oi(g.f ?? []) : null
2953
2954
  ), [H] = k(
2954
- () => g ? null : Xu(`cbv:${n}`)
2955
- ), [I, K] = k((g == null ? void 0 : g.p) ?? H ?? 1), [He] = k(() => rp(`cbv:${n}`)), [Ie, Lt] = k(() => yi(He) !== "fresh"), dt = Z(H);
2955
+ () => g ? null : Zu(`cbv:${n}`)
2956
+ ), [I, K] = k((g == null ? void 0 : g.p) ?? H ?? 1), [He] = k(() => sp(`cbv:${n}`)), [Ie, Lt] = k(() => yi(He) !== "fresh"), dt = Z(H);
2956
2957
  se(() => {
2957
2958
  const e = vi(dt.current, I);
2958
2959
  if (e !== I) {
2959
2960
  K(e);
2960
2961
  return;
2961
2962
  }
2962
- Zu(`cbv:${n}`, I);
2963
+ ep(`cbv:${n}`, I);
2963
2964
  }, [n, I]);
2964
- const Rt = Z(Mu()), [ln, we] = k(g ? g.q ?? "" : N), Y = wr(ln.trim(), 350), [_e, We] = k(
2965
+ const Rt = Z(Iu()), [ln, we] = k(g ? g.q ?? "" : N), Y = wr(ln.trim(), 350), [_e, We] = k(
2965
2966
  J ? J.filters : q ?? []
2966
2967
  ), [ie, ct] = k(g ? g.s ?? "" : d ?? ""), [v, ae] = k(h ?? null), [me, Ge] = k({}), [Xe, zt] = k({}), [xt, fn] = k(null), [de, Q] = k({}), [rt, ut] = k({}), [hn, Ae] = k(
2967
2968
  () => Ri(n)
2968
2969
  ), Ke = oe(
2969
- () => e0(rt, hn),
2970
+ () => t0(rt, hn),
2970
2971
  [rt, hn]
2971
2972
  ), bn = (e) => Ae((t) => {
2972
2973
  const r = e(t);
2973
- return i0(n, r), r;
2974
- }), gn = (e, t) => bn((r) => d0(r, e, t)), [_, ee] = k({}), [he, ge] = k({}), [je, Te] = k(null), [on, en] = k(!1), _t = Z(null), [Vt, Ft] = k(
2974
+ return d0(n, r), r;
2975
+ }), gn = (e, t) => bn((r) => c0(r, e, t)), [_, ee] = k({}), [he, ge] = k({}), [je, Te] = k(null), [on, en] = k(!1), _t = Z(null), [Vt, Ft] = k(
2975
2976
  () => (g == null ? void 0 : g.qf) ?? {}
2976
2977
  ), [ft, Ct] = k(
2977
2978
  () => (g == null ? void 0 : g.qf) ?? {}
2978
2979
  ), [Ht, ba] = k(
2979
2980
  g ? g.lc ?? [] : F ?? []
2980
- ), { scopes: Et, ready: ga } = ym(), [st, xa] = k(!1), [Cn, $n] = k(/* @__PURE__ */ new Set()), [Ze, xn] = k(
2981
+ ), { scopes: Et, ready: ga } = km(), [st, xa] = k(!1), [Cn, $n] = k(/* @__PURE__ */ new Set()), [Ze, xn] = k(
2981
2982
  () => (g == null ? void 0 : g.cf) ?? {}
2982
- ), Ot = eu("drill.browser"), ht = Ot.value, [va, Wn] = k(null), [Ba, zn] = k(!1), [vn, b] = bm(), O = () => b(vn === "compact" ? "comfortable" : "compact"), [R, Le] = k(() => {
2983
+ ), Ot = eu("drill.browser"), ht = Ot.value, [va, Wn] = k(null), [Ba, zn] = k(!1), [vn, b] = gm(), O = () => b(vn === "compact" ? "comfortable" : "compact"), [R, Le] = k(() => {
2983
2984
  if (g) return g.g ?? null;
2984
2985
  try {
2985
2986
  return localStorage.getItem(`nvr_cbv_group_${n}`) || null;
@@ -3024,7 +3025,7 @@ function Ug({
3024
3025
  const [tt, wn] = k([]);
3025
3026
  lu();
3026
3027
  const [Pe, Hn] = k(null), [md, Br] = k(!1), [Tn, Ur] = k(""), [Wa, bl] = k(!1), [fd, gl] = k(!1), [hd, ka] = k(!1), za = Z(null);
3027
- Au(za);
3028
+ Mu(za);
3028
3029
  const Qr = !g && (((F == null ? void 0 : F.length) ?? 0) > 0 || ((q == null ? void 0 : q.length) ?? 0) > 0), Va = Z(!!g || Qr), { isAdmin: $t } = Er(), xl = Z(n);
3029
3030
  se(() => {
3030
3031
  xl.current !== n && (xl.current = n, K(1), we(N), We([]), ct(d ?? ""), ae(h ?? null), Ge({}), zt({}), Q({}), ut({}), Ae(Ri(n)), wn([]), Hn(null), Ft({}), Ct({}), xn({}), ba([]), ht != null && ht.length && Ot.back(ht.length), Wn(null), Va.current = !1);
@@ -3034,7 +3035,9 @@ function Ug({
3034
3035
  queryFn: () => f.request(X(`/collections/${n}`)).then((e) => e.data),
3035
3036
  staleTime: 10 * 6e4,
3036
3037
  retry: !1
3037
- }), Pt = oe(() => ((T == null ? void 0 : T.fields) ?? []).filter((e) => !e.hidden), [T]), Me = (T == null ? void 0 : T.browser_config) ?? {}, Be = (Zo = Me.fulfilment) != null && Zo.shipped_field && ((ei = Me.fulfilment) != null && ei.requested_field) ? Me.fulfilment : null, vl = Z(!!g);
3038
+ });
3039
+ gu([n], [["cbv-collection-meta", n]]);
3040
+ const Pt = oe(() => ((T == null ? void 0 : T.fields) ?? []).filter((e) => !e.hidden), [T]), Me = (T == null ? void 0 : T.browser_config) ?? {}, Be = (Zo = Me.fulfilment) != null && Zo.shipped_field && ((ei = Me.fulfilment) != null && ei.requested_field) ? Me.fulfilment : null, vl = Z(!!g);
3038
3041
  se(() => {
3039
3042
  vl.current || !T || (vl.current = !0, !d && !ie && Me.default_sort && ct(Me.default_sort));
3040
3043
  }, [T]);
@@ -3044,12 +3047,12 @@ function Ug({
3044
3047
  se(() => {
3045
3048
  tt.length === 0 && kl(null);
3046
3049
  }, [tt.length]);
3047
- const vd = ad(n ? [n] : [], Me.bulk_actions ?? null), yd = Dt ? vd("update-field") ? ze ? null : "Turn on Select, then tick the rows to change." : "Bulk update is switched off for this list." : "This list has no row selection.", Ha = U && Me.allow_create !== !1, wl = typeof Me.create_label == "string" && Me.create_label.trim().slice(0, 40) || "New item", Ga = _m(Ha && !(T != null && T.singleton) ? n : null), [Wr, wa] = k(!1), [zr, Ya] = k(null), { steps: Vr } = Q0(
3050
+ const vd = ad(n ? [n] : [], Me.bulk_actions ?? null), yd = Dt ? vd("update-field") ? ze ? null : "Turn on Select, then tick the rows to change." : "Bulk update is switched off for this list." : "This list has no row selection.", Ha = U && Me.allow_create !== !1, wl = typeof Me.create_label == "string" && Me.create_label.trim().slice(0, 40) || "New item", Ga = Nm(Ha && !(T != null && T.singleton) ? n : null), [Wr, wa] = k(!1), [zr, Ya] = k(null), { steps: Vr } = W0(
3048
3051
  Ha && !(T != null && T.singleton) ? n : null,
3049
3052
  null
3050
3053
  ), _l = (e) => {
3051
3054
  e ? S({ collection: n, itemId: "new", layoutSlug: e }) : Mn("new");
3052
- }, _a = j0(Ha && !(T != null && T.singleton) ? n : null), kd = tu(), Nl = Z(null), [wd, _d] = k(null), [Sl, Cl] = k(!1), $l = (e) => {
3055
+ }, _a = B0(Ha && !(T != null && T.singleton) ? n : null), kd = tu(), Nl = Z(null), [wd, _d] = k(null), [Sl, Cl] = k(!1), $l = (e) => {
3053
3056
  var t;
3054
3057
  _d(e), (t = Nl.current) == null || t.click();
3055
3058
  }, Nd = async (e) => {
@@ -3057,7 +3060,7 @@ function Ug({
3057
3060
  if (e.target.value = "", !!t.length) {
3058
3061
  Cl(!0);
3059
3062
  try {
3060
- const r = await B0(kd, t, n);
3063
+ const r = await U0(kd, t, n);
3061
3064
  S({ collection: n, itemId: "new", layoutSlug: wd, query: { autofill: r } });
3062
3065
  } catch (r) {
3063
3066
  Hs(r, "The document could not be read", { action: "New from document" });
@@ -3080,15 +3083,15 @@ function Ug({
3080
3083
  for (const r of e) {
3081
3084
  const s = $i(Et, { key: r.key, collection: r.collection });
3082
3085
  if (!s) continue;
3083
- const l = km(Et, s.name);
3086
+ const l = wm(Et, s.name);
3084
3087
  if (l.length === 0) continue;
3085
- const o = await wm(f, s, l, r.value_field).catch(
3088
+ const o = await _m(f, s, l, r.value_field).catch(
3086
3089
  () => []
3087
3090
  );
3088
3091
  o.length > 0 && (t[r.key] = o);
3089
3092
  }
3090
3093
  return t;
3091
- }, Ja = $t && i.length === 0, Gr = Z(null), Gn = pf({
3094
+ }, Ja = $t && i.length === 0, Gr = Z(null), Gn = mf({
3092
3095
  collection: n,
3093
3096
  filters: At,
3094
3097
  onApplied: (e, t) => {
@@ -3144,17 +3147,17 @@ function Ug({
3144
3147
  const Ll = (e) => {
3145
3148
  const t = $i(Et, { key: e.key, collection: e.collection }), r = t ? (Et == null ? void 0 : Et.restricted[t.name]) ?? [] : [];
3146
3149
  return r.length > 0 ? r : void 0;
3147
- }, vt = oe(() => new Map(Pt.map((e) => [e.field, e])), [Pt]), ot = (T == null ? void 0 : T.relations) ?? [], Rl = oe(() => Uu(Me.inline_edit), [Me.inline_edit]), { data: Cd } = te({
3150
+ }, vt = oe(() => new Map(Pt.map((e) => [e.field, e])), [Pt]), ot = (T == null ? void 0 : T.relations) ?? [], Rl = oe(() => Qu(Me.inline_edit), [Me.inline_edit]), { data: Cd } = te({
3148
3151
  queryKey: ["my-permissions"],
3149
3152
  queryFn: () => f.request(X("/security/my/permissions")).then((e) => e.data),
3150
3153
  enabled: Rl.enabled && !$t,
3151
3154
  staleTime: 5 * 6e4
3152
- }), $d = $t || Pf(Cd, n), Fl = oe(
3155
+ }), $d = $t || Df(Cd, n), Fl = oe(
3153
3156
  () => new Map(((T == null ? void 0 : T.fields) ?? []).map((e) => [e.field, e])),
3154
3157
  [T]
3155
- ), El = Z0(), Ol = (e) => (
3158
+ ), El = ef(), Ol = (e) => (
3156
3159
  // Ask-the-table answers are a one-off overlay, not the list's own rows.
3157
- xe ? null : zu({
3160
+ xe ? null : Vu({
3158
3161
  config: Rl,
3159
3162
  key: e,
3160
3163
  field: Fl.get(e),
@@ -3163,7 +3166,7 @@ function Ug({
3163
3166
  mayUpdate: $d
3164
3167
  })
3165
3168
  ), qd = (e, t, r, s, l) => {
3166
- const o = e.id, u = l === 0 ? null : Vu(
3169
+ const o = e.id, u = l === 0 ? null : Hu(
3167
3170
  le.filter((m) => !!Ol(m)),
3168
3171
  t,
3169
3172
  l
@@ -3197,15 +3200,15 @@ function Ug({
3197
3200
  if (!l) return s;
3198
3201
  const o = Fl.get(t);
3199
3202
  return /* @__PURE__ */ a(
3200
- ef,
3203
+ tf,
3201
3204
  {
3202
3205
  controller: El,
3203
3206
  cellKey: `${String(e.id)}|${t}`,
3204
3207
  kind: l,
3205
3208
  value: e[t],
3206
3209
  label: nt(t),
3207
- choices: o ? Wu(o) : void 0,
3208
- target: l === "m2o" ? Qu(ot, n, t) : null,
3210
+ choices: o ? zu(o) : void 0,
3211
+ target: l === "m2o" ? Wu(ot, n, t) : null,
3209
3212
  collection: n,
3210
3213
  itemId: e.id,
3211
3214
  field: t,
@@ -3218,7 +3221,7 @@ function Ug({
3218
3221
  ), [v, Pt, vt, Xe]), [Xa, Za] = k(null), Ln = oe(
3219
3222
  () => Xa ?? (le[0] ? { [le[0]]: "left" } : {}),
3220
3223
  [Xa, le]
3221
- ), Yr = vm(), Yn = oe(
3224
+ ), Yr = ym(), Yn = oe(
3222
3225
  () => Yr ? le[0] ? { [le[0]]: "left" } : {} : Ln,
3223
3226
  [Yr, le, Ln]
3224
3227
  );
@@ -3314,7 +3317,7 @@ function Ug({
3314
3317
  l != null && l.one_collection && (e[t.field] = { kind: "m2m", target: l.one_collection });
3315
3318
  }
3316
3319
  return e;
3317
- }, [_n, Rn]), Zr = wr(Ze, 350), [nn, Fd] = k((g == null ? void 0 : g.a) === !0), [Ul, Ed] = k(null), Na = y0(n, Ul), [qt, Ql] = k(null), { data: Sa } = Hm(n), [Mt, er] = k(() => (J == null ? void 0 : J.riskIds) ?? []), Ne = oe(() => {
3320
+ }, [_n, Rn]), Zr = wr(Ze, 350), [nn, Fd] = k((g == null ? void 0 : g.a) === !0), [Ul, Ed] = k(null), Na = k0(n, Ul), [qt, Ql] = k(null), { data: Sa } = Gm(n), [Mt, er] = k(() => (J == null ? void 0 : J.riskIds) ?? []), Ne = oe(() => {
3318
3321
  var t;
3319
3322
  const e = rl(_e);
3320
3323
  for (const r of At) {
@@ -3353,7 +3356,7 @@ function Ug({
3353
3356
  e.push({ path: [r], op: s.op, value: Number(s.value) });
3354
3357
  else if (s.kind === "bool") e.push({ path: [r], op: "_eq", value: s.value === "true" });
3355
3358
  else if (s.kind === "date" && s.value) {
3356
- const l = Or(s.value), u = (l ? gu(l) : null) ?? dd(s.value);
3359
+ const l = Or(s.value), u = (l ? xu(l) : null) ?? dd(s.value);
3357
3360
  u && (u.from && e.push({ path: [r], op: "_gte", value: u.from }), u.to && e.push({ path: [r], op: "_lte", value: `${u.to}T23:59:59` }));
3358
3361
  }
3359
3362
  }
@@ -3406,7 +3409,7 @@ function Ug({
3406
3409
  X(`/items/${n}`, { ...t, page: u, ...ie ? { sort: ie } : {} })
3407
3410
  );
3408
3411
  if (R) return r(1);
3409
- const s = JSON.stringify([n, Y, ie, et, Ne]), l = Rt.current, o = Iu(l, s, e, ie);
3412
+ const s = JSON.stringify([n, Y, ie, et, Ne]), l = Rt.current, o = Ku(l, s, e, ie);
3410
3413
  if (o.after === void 0 && o.sort === ie) return r(e);
3411
3414
  try {
3412
3415
  const u = await f.request(
@@ -3416,10 +3419,10 @@ function Ug({
3416
3419
  ...o.sort ? { sort: o.sort } : {}
3417
3420
  })
3418
3421
  );
3419
- return o.after !== void 0 && Ku(l, s, e, u.next_cursor), u;
3422
+ return o.after !== void 0 && ju(l, s, e, u.next_cursor), u;
3420
3423
  } catch (u) {
3421
- if (!ju(u)) throw u;
3422
- return Bu(l, s), r(e);
3424
+ if (!Bu(u)) throw u;
3425
+ return Uu(l, s), r(e);
3423
3426
  }
3424
3427
  }, {
3425
3428
  data: fe,
@@ -3441,7 +3444,7 @@ function Ug({
3441
3444
  // #2490 — a collection whose live record events are off polls instead (visible tabs only).
3442
3445
  refetchInterval: Me.live_events === "off" ? 3e4 : !1,
3443
3446
  retry: !1
3444
- }), Pd = Nf(
3447
+ }), Pd = Sf(
3445
3448
  (Ee == null ? void 0 : Ee.status) === 403 && !el(Ee),
3446
3449
  !!fe && !Ee,
3447
3450
  n
@@ -3453,19 +3456,19 @@ function Ug({
3453
3456
  se(() => {
3454
3457
  if (!Xl) return;
3455
3458
  const e = setInterval(() => {
3456
- Zf(Yl.current.length) && Jl.current();
3457
- }, Xf);
3459
+ eh(Yl.current.length) && Jl.current();
3460
+ }, Zf);
3458
3461
  return () => clearInterval(e);
3459
3462
  }, [Xl]);
3460
3463
  const Zl = Z(() => {
3461
3464
  });
3462
- Ip({
3465
+ Kp({
3463
3466
  qc: L,
3464
3467
  enabled: !!n && st && !R && !Y && !bt && !!fe && I * et < (fe.total ?? 0),
3465
3468
  queryKey: Hl(I + 1),
3466
3469
  queryFn: () => Gl(I + 1).then((e) => (Zl.current(e.data ?? []), e))
3467
3470
  }), se(() => {
3468
- const e = ep({
3471
+ const e = tp({
3469
3472
  pending: dt.current,
3470
3473
  gateOpen: st,
3471
3474
  fetching: bt,
@@ -3480,7 +3483,7 @@ function Ug({
3480
3483
  e && (dt.current = null, e.page != null && K(e.page));
3481
3484
  }, [st, fe, bt, dn, I, et, Ee]);
3482
3485
  const ke = xe ? xe.rows : (fe == null ? void 0 : fe.data) ?? [];
3483
- Ep(
3486
+ Op(
3484
3487
  () => !xe && n && !dn && Xn > 0 ? ke.slice(0, 200).filter((e) => e && e.id != null).map((e) => ({
3485
3488
  collection: n,
3486
3489
  id: e.id,
@@ -3489,9 +3492,9 @@ function Ug({
3489
3492
  })) : null
3490
3493
  );
3491
3494
  const $e = xe ? xe.total : (fe == null ? void 0 : fe.total) ?? 0, It = !xe && !!fe && (fe.total_timed_out === !0 || fe.total == null), En = !xe && (fe == null ? void 0 : fe.total_approx) === !0, eo = wr(Ne, 400), to = wr(Y, 400), ea = (e) => {
3492
- if (!s0(e)) return null;
3495
+ if (!l0(e)) return null;
3493
3496
  const t = vt.get(e);
3494
- return t ? l0(t, (r) => vt.get(r)) : null;
3497
+ return t ? o0(t, (r) => vt.get(r)) : null;
3495
3498
  }, no = (e) => e.map(
3496
3499
  (t, r) => `${r === 0 ? t.sign < 0 ? "− " : "" : t.sign < 0 ? " − " : " + "}${nt(t.field)}`
3497
3500
  ).join(""), Dd = (e) => `Sum only: worked out as ${no(e)}.`, Ca = le.filter((e) => {
@@ -3516,14 +3519,14 @@ function Ug({
3516
3519
  queryFn: () => f.request(
3517
3520
  X(
3518
3521
  `/items/${n}/aggregate`,
3519
- t0(Nn, { search: to, conditions: eo })
3522
+ n0(Nn, { search: to, conditions: eo })
3520
3523
  )
3521
3524
  ),
3522
3525
  enabled: !!n && Nn.length > 0 && st && !xe && !R && !!fe && !dn && !Ee,
3523
3526
  staleTime: 3e4,
3524
3527
  retry: !1
3525
3528
  }), Ad = Nn.map(({ key: e, fn: t }) => ({
3526
- data: nr.data ? n0(nr.data, e, t) : void 0,
3529
+ data: nr.data ? a0(nr.data, e, t) : void 0,
3527
3530
  isLoading: nr.isLoading,
3528
3531
  isError: nr.isError
3529
3532
  })), es = {}, ts = (e, t) => Ad[Nn.findIndex((r) => r.key === e && r.fn === t)];
@@ -3532,7 +3535,7 @@ function Ug({
3532
3535
  if ((t == null ? void 0 : t.kind) === "derived") {
3533
3536
  const s = t.terms.map((o) => ts(o.field, "sum")), l = s.map((o) => o == null ? void 0 : o.data);
3534
3537
  es[e] = {
3535
- value: l.some((o) => o === void 0) || l.every((o) => o == null) ? null : a0(t.terms, (o) => {
3538
+ value: l.some((o) => o === void 0) || l.every((o) => o == null) ? null : r0(t.terms, (o) => {
3536
3539
  var u;
3537
3540
  return ((u = ts(o, "sum")) == null ? void 0 : u.data) ?? 0;
3538
3541
  }),
@@ -3558,9 +3561,9 @@ function Ug({
3558
3561
  const e = await f.request(
3559
3562
  X(
3560
3563
  `/items/${n}`,
3561
- q0({ search: Y, conditions: Ne })
3564
+ T0({ search: Y, conditions: Ne })
3562
3565
  )
3563
- ), t = T0(e, et);
3566
+ ), t = L0(e, et);
3564
3567
  if (t == null) {
3565
3568
  Fe("This list is too big to count right now", {
3566
3569
  description: "Use Next to keep going, or narrow the list with a filter."
@@ -3622,7 +3625,7 @@ function Ug({
3622
3625
  const e = `${n}\0${Y}`;
3623
3626
  ((t = ar.current) == null ? void 0 : t.key) !== e && (ar.current = {
3624
3627
  key: e,
3625
- id: tm(f, {
3628
+ id: nm(f, {
3626
3629
  surface: "collection",
3627
3630
  collection: n,
3628
3631
  query: Y,
@@ -3630,7 +3633,7 @@ function Ug({
3630
3633
  duration_ms: Date.now() - lo.current
3631
3634
  })
3632
3635
  });
3633
- }, [f, n, Y, fe, bt, xe]), qm(
3636
+ }, [f, n, Y, fe, bt, xe]), Tm(
3634
3637
  n ? {
3635
3638
  list: {
3636
3639
  collection: n,
@@ -3647,18 +3650,18 @@ function Ug({
3647
3650
  }
3648
3651
  } : null
3649
3652
  );
3650
- const Kd = Tm(), oo = nu(bt), rs = au({
3653
+ const Kd = Lm(), oo = nu(bt), rs = au({
3651
3654
  pending: bt,
3652
3655
  request: n ? { method: "GET", url: `/items/${n}` } : null,
3653
3656
  noun: ((T == null ? void 0 : T.display_name) ?? n ?? "").replace(/_/g, " ").toLowerCase() || null,
3654
3657
  // Only a total this person has already been shown (never a raw table count).
3655
- knownRows: bt ? um(L.getQueriesData({ queryKey: ["cbv-items", n] })) : null
3656
- }), ta = zp(), { userId: On } = Er(), io = (e) => $t || !!On && String(e.user ?? "").toUpperCase() === String(On).toUpperCase(), yt = xp(), ss = Z(/* @__PURE__ */ new Set());
3658
+ knownRows: bt ? pm(L.getQueriesData({ queryKey: ["cbv-items", n] })) : null
3659
+ }), ta = Vp(), { userId: On } = Er(), io = (e) => $t || !!On && String(e.user ?? "").toUpperCase() === String(On).toUpperCase(), yt = vp(), ss = Z(/* @__PURE__ */ new Set());
3657
3660
  ss.current = new Set(ke.map((e) => String(e.id)));
3658
3661
  const jd = oe(() => {
3659
3662
  const e = ke.slice(0, 100).map((s) => String(s.id)), t = new Set(e), r = ze ? tt.map(String).filter((s) => !t.has(s)).slice(0, 100) : [];
3660
3663
  return [...e, ...r].map((s) => ({ collection: n, item: s }));
3661
- }, [ke, n, ze, tt]), ls = Bp(jd), rr = Z([]);
3664
+ }, [ke, n, ze, tt]), ls = Up(jd), rr = Z([]);
3662
3665
  rr.current = [
3663
3666
  "cbv-items",
3664
3667
  n,
@@ -3684,24 +3687,24 @@ function Ug({
3684
3687
  allLoaded: !!R && !xe && $e <= 500
3685
3688
  };
3686
3689
  const is = Z({}).current;
3687
- pp(
3690
+ mp(
3688
3691
  "owners:changed",
3689
3692
  (e) => {
3690
3693
  !n || e != null && e.queues || Array.isArray(e == null ? void 0 : e.collections) && !e.collections.includes(n) || L.invalidateQueries({ queryKey: ["cbv-owners", n] });
3691
3694
  },
3692
3695
  { debounceMs: 600 }
3693
3696
  );
3694
- const [co, Bd] = k(0), [ds, cs] = k(0), na = _p(), sr = Z(na);
3697
+ const [co, Bd] = k(0), [ds, cs] = k(0), na = Np(), sr = Z(na);
3695
3698
  sr.current = na;
3696
3699
  const lr = Z(null), uo = Z(/* @__PURE__ */ new Set());
3697
3700
  uo.current = new Set(Nn.map((e) => e.key));
3698
3701
  const po = Z({
3699
3702
  resolved: /* @__PURE__ */ new Set(),
3700
3703
  risk: /* @__PURE__ */ new Set()
3701
- }), mo = () => void L.invalidateQueries({ queryKey: ["cbv-col-total", n] }), Pn = Np(
3704
+ }), mo = () => void L.invalidateQueries({ queryKey: ["cbv-col-total", n] }), Pn = Sp(
3702
3705
  n ? `cbv:${n}` : null,
3703
3706
  (e) => {
3704
- if (!qp(e) && lr.current) return lr.current(e);
3707
+ if (!Tp(e) && lr.current) return lr.current(e);
3705
3708
  sr.current.clear(), cs(0), Zn(), mo();
3706
3709
  }
3707
3710
  ), us = Pn.gate, ps = () => {
@@ -3752,13 +3755,13 @@ function Ug({
3752
3755
  pe.publish();
3753
3756
  const P = ((p = pe.tracker.current()) == null ? void 0 : p.sample) ?? [];
3754
3757
  P.length > 0 && pe.claimWriterRead() && wi(f, n, P, void 0).then((V) => {
3755
- const re = Tp(V.values()), Ye = !!re && !!On && re.toUpperCase() === On.toUpperCase();
3758
+ const re = Lp(V.values()), Ye = !!re && !!On && re.toUpperCase() === On.toUpperCase();
3756
3759
  !be && re && !Ye && sr.current.setWriter(re);
3757
3760
  }).catch(() => {
3758
3761
  });
3759
3762
  return;
3760
3763
  }
3761
- Lp(
3764
+ Rp(
3762
3765
  ye,
3763
3766
  uo.current,
3764
3767
  _i(os.current.conditions)
@@ -3779,8 +3782,8 @@ function Ug({
3779
3782
  });
3780
3783
  }
3781
3784
  Re && e();
3782
- const y = ss.current, Gt = (P) => P.own === !0 || Mp(n, P.item), mt = (P) => {
3783
- const V = wp(P);
3785
+ const y = ss.current, Gt = (P) => P.own === !0 || Ip(n, P.item), mt = (P) => {
3786
+ const V = _p(P);
3784
3787
  return V && On && V.toUpperCase() === On.toUpperCase() ? "self" : V;
3785
3788
  }, rn = [];
3786
3789
  for (const [P, V] of Ce)
@@ -3823,7 +3826,7 @@ function Ug({
3823
3826
  const pa = _i(Bt.conditions), jn = Bt.page === 1 && !Bt.grouped || Bt.allLoaded, Nt = /* @__PURE__ */ new Map(), Ut = [], sn = [];
3824
3827
  for (const [P, V] of Ce) {
3825
3828
  const re = Yt.get(P);
3826
- y.has(P) ? re ? Nt.set(P, re) : Ut.push(P) : re && ((V.action === "create" || !!Bt.conditions && kp(V, pa)) && jn ? sn.push({ row: re, ev: V }) : e());
3829
+ y.has(P) ? re ? Nt.set(P, re) : Ut.push(P) : re && ((V.action === "create" || !!Bt.conditions && wp(V, pa)) && jn ? sn.push({ row: re, ev: V }) : e());
3827
3830
  }
3828
3831
  if (Nt.size > 0 || Ut.length > 0 || sn.length > 0) {
3829
3832
  const P = new Set(Ut);
@@ -3839,7 +3842,7 @@ function Ug({
3839
3842
  });
3840
3843
  }
3841
3844
  for (const P of Nt.keys()) {
3842
- const V = th((B = Ce.get(P)) == null ? void 0 : B.changed_fields, po.current);
3845
+ const V = nh((B = Ce.get(P)) == null ? void 0 : B.changed_fields, po.current);
3843
3846
  V.resolved && (M.resolved = !0), V.risk && (M.risk = !0);
3844
3847
  }
3845
3848
  (M.resolved || M.risk) && j.poke(), Ut.length > 0 && yt.forget(Ut);
@@ -3852,7 +3855,7 @@ function Ug({
3852
3855
  mt(P) !== "self" && yt.note([re], mt(P), "create");
3853
3856
  }
3854
3857
  }, ve = (ye) => {
3855
- for (const pe of ye.flatMap((Ce) => mp(Ce))) {
3858
+ for (const pe of ye.flatMap((Ce) => fp(Ce))) {
3856
3859
  const Ce = pe.changed_fields;
3857
3860
  if (!pe.action && (Ce != null && Ce.length) && Ce.every((Re) => Re.startsWith("$"))) {
3858
3861
  (String(pe.item) === "*" || ss.current.has(String(pe.item))) && l(Ce);
@@ -3861,18 +3864,18 @@ function Ug({
3861
3864
  u.push(pe);
3862
3865
  }
3863
3866
  u.length > 0 && !m && (m = setTimeout(() => void W(), 300));
3864
- }, ue = (ye) => Eu(is, ye, ve);
3867
+ }, ue = (ye) => Ou(is, ye, ve);
3865
3868
  lr.current = ue;
3866
3869
  const G = ta.subscribeCollections([n], (ye) => us([ye], ue)), wt = (ye) => us(ye, ve);
3867
3870
  return aa.current = wt, () => {
3868
- be = !0, aa.current === wt && (aa.current = null), G(), lr.current = null, Fu(is), t.cancel(), s && clearTimeout(s), m && clearTimeout(m), x.cancel(), j.cancel();
3871
+ be = !0, aa.current === wt && (aa.current = null), G(), lr.current = null, Eu(is), t.cancel(), s && clearTimeout(s), m && clearTimeout(m), x.cancel(), j.cancel();
3869
3872
  };
3870
3873
  }, [ta, n, L, f, On, yt, is, us]);
3871
3874
  const ms = Z(null);
3872
3875
  se(() => {
3873
3876
  if (!n) return;
3874
- const e = sp(`cbv:${n}`);
3875
- return e && !ms.current && (ms.current = e), lp(ta, `cbv:${n}`, [n]);
3877
+ const e = lp(`cbv:${n}`);
3878
+ return e && !ms.current && (ms.current = e), op(ta, `cbv:${n}`, [n]);
3876
3879
  }, [ta, n]);
3877
3880
  const Ud = Z({ phase: "wait" });
3878
3881
  se(() => {
@@ -3880,7 +3883,7 @@ function Ug({
3880
3883
  if (e.phase === "done" || !st || !fe || dn) return;
3881
3884
  if (e.phase === "refetching") {
3882
3885
  if (bt) return;
3883
- e.phase = "done", vp(yt.rootRef.current, op(e.before, fe.data));
3886
+ e.phase = "done", yp(yt.rootRef.current, ip(e.before, fe.data));
3884
3887
  return;
3885
3888
  }
3886
3889
  const t = ms.current, s = !!t && Xn > 0 && Xn <= t.leftAt ? yi(t) : "fresh";
@@ -3897,24 +3900,24 @@ function Ug({
3897
3900
  var l;
3898
3901
  if (fo.current || !st || !fe || dn) return;
3899
3902
  fo.current = !0;
3900
- const e = ip();
3903
+ const e = dp();
3901
3904
  if (!e || e.list !== `cbv:${n}`) return;
3902
- const t = tp();
3903
- if (!(e.entry && t && e.entry === t || np())) return;
3905
+ const t = np();
3906
+ if (!(e.entry && t && e.entry === t || ap())) return;
3904
3907
  const r = String(e.current.id), s = String(((l = e.opened) == null ? void 0 : l.id) ?? r) !== r;
3905
3908
  setTimeout(() => {
3906
3909
  var x;
3907
3910
  const o = yt.rootRef.current;
3908
- if (!dp(o, r) || !s) return;
3911
+ if (!cp(o, r) || !s) return;
3909
3912
  const u = typeof CSS < "u" && CSS.escape ? CSS.escape(r) : r, m = o == null ? void 0 : o.querySelector(`[data-row-key="${u}"]`);
3910
- m && !cp(m) && ((x = m.scrollIntoView) == null || x.call(m, { block: "nearest" }));
3913
+ m && !up(m) && ((x = m.scrollIntoView) == null || x.call(m, { block: "nearest" }));
3911
3914
  }, 260);
3912
3915
  }, [st, fe, dn, n]);
3913
3916
  const Qd = ki(
3914
3917
  n,
3915
3918
  ke.map((e) => String(e.id)),
3916
3919
  co
3917
- ), ho = Sp(ke, (e) => String(e.id), yt.rootRef, {
3920
+ ), ho = Cp(ke, (e) => String(e.id), yt.rootRef, {
3918
3921
  enabled: !R && !xe,
3919
3922
  resetKey: JSON.stringify(rr.current)
3920
3923
  }), { data: La = [] } = te({
@@ -3941,9 +3944,9 @@ function Ug({
3941
3944
  }), De = ke.map((e) => String(e.id)).join(","), Vd = oe(
3942
3945
  () => ke.map((e) => ({ collection: n, id: e.id })),
3943
3946
  [ke, n]
3944
- ), Hd = of(Vd, $t), fs = !!(T != null && T.addendums_enabled), Gd = oe(
3945
- () => !!mm(
3946
- fm(
3947
+ ), Hd = df(Vd, $t), fs = !!(T != null && T.addendums_enabled), Gd = oe(
3948
+ () => !!fm(
3949
+ hm(
3947
3950
  T == null ? void 0 : T.summary_mode_rules
3948
3951
  )
3949
3952
  ),
@@ -4038,7 +4041,7 @@ function Ug({
4038
4041
  () => le.filter((e) => e.includes(".")),
4039
4042
  [le]
4040
4043
  ), yo = oe(
4041
- () => le.filter((e) => e.startsWith("__f:")).flatMap((e) => Tu(Xe[e] ?? "")).filter((e) => e.includes(".")),
4044
+ () => le.filter((e) => e.startsWith("__f:")).flatMap((e) => Lu(Xe[e] ?? "")).filter((e) => e.includes(".")),
4042
4045
  [le, Xe]
4043
4046
  ), ra = oe(
4044
4047
  () => [.../* @__PURE__ */ new Set([...vo, ...Object.values(it), ...yo])].slice(
@@ -4049,7 +4052,7 @@ function Ug({
4049
4052
  ), ko = ke.map((e) => String(e.id)).join(",");
4050
4053
  po.current = {
4051
4054
  resolved: new Set(ra.map((e) => e.split(".")[0])),
4052
- risk: eh(La)
4055
+ risk: th(La)
4053
4056
  };
4054
4057
  const wo = (e) => f.request(
4055
4058
  X(`/items/${n}/resolve-paths`, {
@@ -4068,7 +4071,7 @@ function Ug({
4068
4071
  () => An && { ...An, rows: _o ?? {} },
4069
4072
  [An, _o]
4070
4073
  );
4071
- gp();
4074
+ xp();
4072
4075
  const jt = (e, t) => {
4073
4076
  var l, o, u;
4074
4077
  const r = t.includes(".") ? t : it[t];
@@ -4096,7 +4099,7 @@ function Ug({
4096
4099
  isResolvedCol: un,
4097
4100
  fetchResolved: wo,
4098
4101
  fetchRelation: (t, r) => ld(f, t, r),
4099
- userCardQuery: (t) => Sm(f, t)
4102
+ userCardQuery: (t) => Cm(f, t)
4100
4103
  });
4101
4104
  const sa = (e) => {
4102
4105
  if (e.includes(".")) return { kind: "text", path: e.split(".") };
@@ -4190,7 +4193,7 @@ function Ug({
4190
4193
  u.add(M);
4191
4194
  else x[e] != null && x[e] !== "" && typeof x[e] != "object" && u.add(x[e]);
4192
4195
  return /* @__PURE__ */ a(
4193
- Mf,
4196
+ If,
4194
4197
  {
4195
4198
  target: t.target,
4196
4199
  selected: (r == null ? void 0 : r.kind) === "in" ? r.value : [],
@@ -4201,7 +4204,7 @@ function Ug({
4201
4204
  }
4202
4205
  if (t.kind === "enum")
4203
4206
  return /* @__PURE__ */ a(
4204
- If,
4207
+ Kf,
4205
4208
  {
4206
4209
  collection: n,
4207
4210
  field: e,
@@ -4261,7 +4264,7 @@ function Ug({
4261
4264
  className: "w-full"
4262
4265
  }
4263
4266
  ) : t.kind === "date" ? /* @__PURE__ */ a(
4264
- Kf,
4267
+ jf,
4265
4268
  {
4266
4269
  value: (r == null ? void 0 : r.kind) === "date" ? r.value : "",
4267
4270
  onChange: (u) => at(e, u ? { kind: "date", value: u } : null)
@@ -4282,7 +4285,7 @@ function Ug({
4282
4285
  var l, o, u;
4283
4286
  const s = de[t];
4284
4287
  if ((s == null ? void 0 : s.type) === "count") {
4285
- const m = t.includes(".") ? t : it[t], x = r != null && m ? (u = (o = (l = Oe == null ? void 0 : Oe.rows) == null ? void 0 : l[String(r)]) == null ? void 0 : o[m]) == null ? void 0 : u.ids : void 0, M = Ou(e === "—" ? "" : e, x);
4288
+ const m = t.includes(".") ? t : it[t], x = r != null && m ? (u = (o = (l = Oe == null ? void 0 : Oe.rows) == null ? void 0 : l[String(r)]) == null ? void 0 : o[m]) == null ? void 0 : u.ids : void 0, M = Pu(e === "—" ? "" : e, x);
4286
4289
  return String(M);
4287
4290
  }
4288
4291
  return s && e && e !== "—" ? xi(e, s) : e;
@@ -4404,7 +4407,7 @@ function Ug({
4404
4407
  let be = !1;
4405
4408
  const W = {}, ve = {}, ue = {};
4406
4409
  for (const G of e.columns)
4407
- typeof G != "string" && G.label && (x[G.key] = G.label), typeof G != "string" && G.format && (M[G.key] = G.format), typeof G != "string" && G.pin && (be = !0, G.pin !== "none" && (j[G.key] = G.pin)), typeof G != "string" && ((s = G.tint) != null && s.length) && (W[G.key] = G.tint), typeof G != "string" && G.width && (ve[G.key] = G.width), typeof G != "string" && o0(G.agg) && (ue[G.key] = G.agg);
4410
+ typeof G != "string" && G.label && (x[G.key] = G.label), typeof G != "string" && G.format && (M[G.key] = G.format), typeof G != "string" && G.pin && (be = !0, G.pin !== "none" && (j[G.key] = G.pin)), typeof G != "string" && ((s = G.tint) != null && s.length) && (W[G.key] = G.tint), typeof G != "string" && G.width && (ve[G.key] = G.width), typeof G != "string" && i0(G.agg) && (ue[G.key] = G.agg);
4408
4411
  ut(ue), Ge(x), Q(M), ge(W), ee(ve), Za(be ? j : null);
4409
4412
  } else
4410
4413
  ut({}), Za(null);
@@ -4418,7 +4421,7 @@ function Ug({
4418
4421
  Hn(null), We([]), er([]), ct(d ?? ""), ae(h ?? null), Ge({}), zt({}), Q({}), ut({}), Za(null), K(1);
4419
4422
  }, Ea = () => ({
4420
4423
  // The pressed highlight pills ride along as one `$at_risk` filter entry.
4421
- filters: [..._e, ...[N0(Mt, La)].filter((e) => e !== null)],
4424
+ filters: [..._e, ...[S0(Mt, La)].filter((e) => e !== null)],
4422
4425
  sort: ie,
4423
4426
  columns: [
4424
4427
  ...le.map((e, t) => {
@@ -4484,14 +4487,14 @@ function Ug({
4484
4487
  })
4485
4488
  ).then((s) => {
4486
4489
  const l = s.data;
4487
- if (Su(l)) {
4488
- Cu(l, {
4490
+ if (Cu(l)) {
4491
+ $u(l, {
4489
4492
  read: () => f.request(X(`/export-runs/${l.run_id}`)).then((u) => u.data)
4490
4493
  });
4491
4494
  return;
4492
4495
  }
4493
4496
  const o = new URLSearchParams();
4494
- Y && o.set("search", Y), Ne && o.set("conditions", Ne), ie && o.set("sort", ie), $u(`/api/export-presets/${e}/run?${o.toString()}`);
4497
+ Y && o.set("search", Y), Ne && o.set("conditions", Ne), ie && o.set("sort", ie), qu(`/api/export-presets/${e}/run?${o.toString()}`);
4495
4498
  }).catch(
4496
4499
  (s) => Hs(s, `Could not start the “${t}” export`, {
4497
4500
  retry: () => Cs(e, t, r)
@@ -4540,8 +4543,8 @@ function Ug({
4540
4543
  }, ur = st && Pt.length > 0 && ys && (Va.current || Ve.length === 0), Ts = Z(null);
4541
4544
  se(() => {
4542
4545
  if (!ur || !n) return;
4543
- const e = `cbv:${n}`, t = qs(), r = Yu(e, t);
4544
- Ts.current == null && (Ts.current = g ? "" : r, !g) || Ju(e, r === Ts.current ? null : t);
4546
+ const e = `cbv:${n}`, t = qs(), r = Ju(e, t);
4547
+ Ts.current == null && (Ts.current = g ? "" : r, !g) || Xu(e, r === Ts.current ? null : t);
4545
4548
  }, [
4546
4549
  ur,
4547
4550
  n,
@@ -4571,17 +4574,17 @@ function Ug({
4571
4574
  Pe,
4572
4575
  ht
4573
4576
  ]);
4574
- const Po = Op({
4577
+ const Po = Pp({
4575
4578
  view: ((ni = Ve.find((e) => e.id === Pe)) == null ? void 0 : ni.name) ?? null,
4576
4579
  search: Y,
4577
4580
  filters: _e.length + Mt.length + Object.entries(ft).filter(([e, t]) => t.length > 0 && !Cn.has(e)).length + Object.keys(Ze).length + qn.length + Ht.length + (nn ? 1 : 0),
4578
4581
  page: I
4579
4582
  });
4580
4583
  se(() => {
4581
- ur && Pp(Po);
4584
+ ur && Dp(Po);
4582
4585
  }, [ur, Po]);
4583
4586
  const Ls = () => Object.fromEntries(Ca.map((e) => [e, Ke[e]])), Rs = (e) => {
4584
- ut(e), bn((t) => c0(t, e));
4587
+ ut(e), bn((t) => u0(t, e));
4585
4588
  }, pr = Qt({
4586
4589
  mutationFn: async () => {
4587
4590
  const e = Ls();
@@ -4654,17 +4657,17 @@ function Ug({
4654
4657
  var m;
4655
4658
  const u = (m = o == null ? void 0 : o.data) == null ? void 0 : m.browser_rows;
4656
4659
  return u === null ? Number.POSITIVE_INFINITY : Number(u) > 0 ? Number(u) : Ei;
4657
- }).catch(() => Ei), t = _u(
4660
+ }).catch(() => Ei), t = Nu(
4658
4661
  (T == null ? void 0 : T.display_name) || Qe(n),
4659
4662
  $e > 0 ? Math.min($e, e) : null
4660
- ), r = () => qu(t.signal);
4663
+ ), r = () => Tu(t.signal);
4661
4664
  try {
4662
- const { rows: o, truncated: u } = await u0((p, B) => (r(), f.request(
4665
+ const { rows: o, truncated: u } = await p0((p, B) => (r(), f.request(
4663
4666
  X(`/items/${n}`, {
4664
4667
  limit: B,
4665
4668
  offset: p,
4666
4669
  ...Y ? { search: Y } : {},
4667
- sort: p0(ie),
4670
+ sort: m0(ie),
4668
4671
  ...Ne ? { conditions: Ne } : {}
4669
4672
  })
4670
4673
  ).then((P) => {
@@ -4694,7 +4697,7 @@ function Ug({
4694
4697
  labelField: Ka(P)
4695
4698
  });
4696
4699
  }
4697
- const j = [.../* @__PURE__ */ new Set([...ra, ...x.flatMap(m0)])], be = await f0(
4700
+ const j = [.../* @__PURE__ */ new Set([...ra, ...x.flatMap(f0)])], be = await h0(
4698
4701
  o.map((p) => String(p.id)),
4699
4702
  j,
4700
4703
  (p, B) => (
@@ -4716,7 +4719,7 @@ function Ug({
4716
4719
  ].map(String), ve = /* @__PURE__ */ new Map();
4717
4720
  await Promise.all(
4718
4721
  W.map(
4719
- (p) => Nm(f, p).then((B) => ve.set(p.toUpperCase(), h0(B, p))).catch(() => ve.set(p.toUpperCase(), p))
4722
+ (p) => Sm(f, p).then((B) => ve.set(p.toUpperCase(), b0(B, p))).catch(() => ve.set(p.toUpperCase(), p))
4720
4723
  )
4721
4724
  );
4722
4725
  const ue = new Map(x.map((p) => [p.column, p])), G = new Set(M), wt = (p) => {
@@ -4727,7 +4730,7 @@ function Ug({
4727
4730
  const P = de[B];
4728
4731
  if (B === Bn) {
4729
4732
  const Xt = (Ye = Se == null ? void 0 : Se.instances) == null ? void 0 : Ye[String(p.id)];
4730
- return Xt && !Xt.completed_at ? Pu(Xt.state_label, Xt.entered_at, Date.now()) ?? "" : "";
4733
+ return Xt && !Xt.completed_at ? Du(Xt.state_label, Xt.entered_at, Date.now()) ?? "" : "";
4731
4734
  }
4732
4735
  if (B.startsWith("__f:")) {
4733
4736
  const Xt = Xe[B], ma = Xt ? gi(Xt, (Us) => {
@@ -4742,7 +4745,7 @@ function Ug({
4742
4745
  return P && ma ? xi(ma, P) : ma;
4743
4746
  }
4744
4747
  const V = p[B], re = ue.get(B);
4745
- return re && V != null && V !== "" ? b0(re, be[String(p.id)]) || V : G.has(B) && V != null && V !== "" ? ve.get(String(V).toUpperCase()) ?? V : V != null && V !== "" && ((P == null ? void 0 : P.type) === "number" || la(B)) ? cu(V) : V != null && V !== "" && ((P == null ? void 0 : P.type) === "datetime" || rc(B)) ? uu(V) : B === "id" ? Zs(T, p) ?? V : P && V != null ? Nr(String(V), P) : V;
4748
+ return re && V != null && V !== "" ? g0(re, be[String(p.id)]) || V : G.has(B) && V != null && V !== "" ? ve.get(String(V).toUpperCase()) ?? V : V != null && V !== "" && ((P == null ? void 0 : P.type) === "number" || la(B)) ? cu(V) : V != null && V !== "" && ((P == null ? void 0 : P.type) === "datetime" || rc(B)) ? uu(V) : B === "id" ? Zs(T, p) ?? V : P && V != null ? Nr(String(V), P) : V;
4746
4749
  }, pe = an.filter((p) => p.kind !== "actions"), Ce = new Set(
4747
4750
  pe.filter((p) => p.kind !== "data" && p.kind !== "formula").map((p) => p.kind)
4748
4751
  ), Re = o.map((p) => String(p.id));
@@ -4766,7 +4769,7 @@ function Ug({
4766
4769
  tasks: (p) => f.request(
4767
4770
  qe("/tasks/counts", { collection: n, ids: p })
4768
4771
  ).then((B) => B.data ?? {})
4769
- }), Gt = Yp(T), mt = Gt ? m.includes(Gt) || m.includes("id") ? [] : [{ header: nt(Gt), cell: (p) => p[Gt] }] : m.includes("id") ? [] : [{ header: "ID", cell: (p) => p.id }], rn = (p) => p.kind === "data" || p.kind === "formula" ? nt(p.key) : p.kind === "fulfilment" && (Be != null && Be.label) ? `${Be.label} shipped` : mu[p.kind], Bt = Date.now(), Yt = [
4772
+ }), Gt = Jp(T), mt = Gt ? m.includes(Gt) || m.includes("id") ? [] : [{ header: nt(Gt), cell: (p) => p[Gt] }] : m.includes("id") ? [] : [{ header: "ID", cell: (p) => p.id }], rn = (p) => p.kind === "data" || p.kind === "formula" ? nt(p.key) : p.kind === "fulfilment" && (Be != null && Be.label) ? `${Be.label} shipped` : mu[p.kind], Bt = Date.now(), Yt = [
4770
4773
  [...mt.map((p) => p.header), ...pe.map(rn)].map(wt).join(","),
4771
4774
  ...o.map(
4772
4775
  (p) => [
@@ -4799,19 +4802,19 @@ function Ug({
4799
4802
  `)], { type: "text/csv;charset=utf-8" }), jn = URL.createObjectURL(pa), Nt = document.createElement("a");
4800
4803
  Nt.href = jn;
4801
4804
  const Ut = Me.export_filename, sn = ((l = Ve.find((p) => p.id === Pe)) == null ? void 0 : l.name) ?? "all";
4802
- Nt.download = Ut ? `${Ut.replace(/\{\{\s*collection\s*\}\}/g, n).replace(/\{\{\s*view\s*\}\}/g, sn).replace(/\{\{\s*date\s*\}\}/g, g0()).replace(/[^A-Za-z0-9 ._-]/g, "")}.csv` : `${n}.csv`, Nt.click(), setTimeout(() => URL.revokeObjectURL(jn), 1e4), t.finish(
4805
+ Nt.download = Ut ? `${Ut.replace(/\{\{\s*collection\s*\}\}/g, n).replace(/\{\{\s*view\s*\}\}/g, sn).replace(/\{\{\s*date\s*\}\}/g, x0()).replace(/[^A-Za-z0-9 ._-]/g, "")}.csv` : `${n}.csv`, Nt.click(), setTimeout(() => URL.revokeObjectURL(jn), 1e4), t.finish(
4803
4806
  `${u ? "First " : ""}${o.length.toLocaleString()} ${o.length === 1 ? "row" : "rows"} · ${Nt.download}`
4804
4807
  ), u && Fe.warning(`Exported the first ${o.length.toLocaleString()} rows`, {
4805
4808
  description: `${$e.toLocaleString()} match — narrow the filter to export the rest.`
4806
4809
  });
4807
4810
  } catch (o) {
4808
- o instanceof Nu || t.signal.aborted ? t.cancelled() : t.fail(o);
4811
+ o instanceof Su || t.signal.aborted ? t.cancelled() : t.fail(o);
4809
4812
  } finally {
4810
4813
  bl(!1);
4811
4814
  }
4812
4815
  }, hc = (e) => {
4813
4816
  const t = `record:${n}:${String(e)}`;
4814
- return Kp(t, () => jp(L, f, n, String(e), { group: t }));
4817
+ return jp(t, () => Bp(L, f, n, String(e), { group: t }));
4815
4818
  }, bc = (e) => {
4816
4819
  const t = hc(e);
4817
4820
  return {
@@ -4844,22 +4847,22 @@ function Ug({
4844
4847
  ...((u = r.currentTarget.parentElement) == null ? void 0 : u.querySelectorAll(
4845
4848
  ":scope > [data-row-open]"
4846
4849
  )) ?? []
4847
- ], l = _0(s.length, s.indexOf(r.currentTarget), r.key), o = l === null ? null : s[l];
4850
+ ], l = N0(s.length, s.indexOf(r.currentTarget), r.key), o = l === null ? null : s[l];
4848
4851
  o && (o.focus(), (m = o.scrollIntoView) == null || m.call(o, { block: "nearest" }));
4849
4852
  }
4850
4853
  };
4851
4854
  }, Mn = (e) => {
4852
4855
  var t;
4853
- ((t = ar.current) == null ? void 0 : t.key) === `${n}\0${Y}` && nm(f, ar.current.id, {
4856
+ ((t = ar.current) == null ? void 0 : t.key) === `${n}\0${Y}` && am(f, ar.current.id, {
4854
4857
  type: "record",
4855
4858
  collection: n,
4856
4859
  item: e === "new" ? null : e
4857
- }), e !== "new" && up({
4860
+ }), e !== "new" && pp({
4858
4861
  list: `cbv:${n}`,
4859
4862
  label: (T == null ? void 0 : T.display_name) ?? Qe(n),
4860
4863
  rows: ke.map((r) => ({ collection: n, id: String(r.id) })),
4861
4864
  opened: { collection: n, id: String(e) },
4862
- entry: ap(),
4865
+ entry: rp(),
4863
4866
  // The whole list's count and where this page starts, so the record says "3 of 49",
4864
4867
  // never the page size (rt-nav review). A grouped list holds every row it shows.
4865
4868
  ...It ? {} : { total: $e, totalApprox: En },
@@ -4867,12 +4870,12 @@ function Ug({
4867
4870
  }), $ ? $(e) : S({ collection: n, itemId: String(e) });
4868
4871
  }, fr = (e) => {
4869
4872
  const t = gt(ot, n, e), r = (s) => {
4870
- ct(pm(ie, s, Me.default_sort ?? "")), K(1);
4873
+ ct(mm(ie, s, Me.default_sort ?? "")), K(1);
4871
4874
  };
4872
4875
  if (t != null && t.one_collection && !Wt(t.one_collection)) {
4873
4876
  const s = t.one_collection;
4874
4877
  L.fetchQuery({
4875
- queryKey: Up.collectionMeta(s),
4878
+ queryKey: Qp.collectionMeta(s),
4876
4879
  queryFn: () => f.request(X(`/collections/${s}`)).then((l) => l.data),
4877
4880
  staleTime: 6e4
4878
4881
  }).then((l) => {
@@ -4888,12 +4891,12 @@ function Ug({
4888
4891
  }, Es = ke.length > 0 && ke.every((e) => tt.includes(e.id)), gc = () => wn(
4889
4892
  Es ? tt.filter((e) => !ke.some((t) => t.id === e)) : [.../* @__PURE__ */ new Set([...tt, ...ke.map((e) => e.id)])]
4890
4893
  ), xc = (e) => wn((t) => t.includes(e) ? t.filter((r) => r !== e) : [...t, e]), Oa = oe(
4891
- () => ze && n ? tt.map((e) => am(n, String(e))) : [],
4894
+ () => ze && n ? tt.map((e) => rm(n, String(e))) : [],
4892
4895
  [ze, n, tt]
4893
- ), hr = rm(Oa), Os = sm(n ? [n] : [], hr.picks), [Io, vc] = k(!1), yc = oe(
4896
+ ), hr = sm(Oa), Os = lm(n ? [n] : [], hr.picks), [Io, vc] = k(!1), yc = oe(
4894
4897
  () => Io ? Oa : Oa.filter((e) => Os.marked.has(e)),
4895
4898
  [Io, Oa, Os.marked]
4896
- ), kc = lm(yc, hr.picks).rows.filter((e) => hr.picks.has(e.key)), wc = ki(
4899
+ ), kc = om(yc, hr.picks).rows.filter((e) => hr.picks.has(e.key)), wc = ki(
4897
4900
  ze ? n : null,
4898
4901
  ze ? tt.map(String) : [],
4899
4902
  co
@@ -4905,7 +4908,7 @@ function Ug({
4905
4908
  viewerCount: (r == null ? void 0 : r.count) ?? 0,
4906
4909
  lockName: s && !s.is_mine ? s.locked_by_name ?? "someone" : null
4907
4910
  };
4908
- }).filter((e) => e.viewerCount > 0 || !!e.lockName), Nc = om(
4911
+ }).filter((e) => e.viewerCount > 0 || !!e.lockName), Nc = im(
4909
4912
  ke,
4910
4913
  (e) => String(e.id),
4911
4914
  ze ? tt.map(String) : []
@@ -4920,7 +4923,7 @@ function Ug({
4920
4923
  const r = (o = vt.get(t)) == null ? void 0 : o.type;
4921
4924
  return (r === "decimal" || r === "float") && !gt(ot, n, t);
4922
4925
  }).slice(0, 2);
4923
- })(), Ko = im(
4926
+ })(), Ko = dm(
4924
4927
  Nc,
4925
4928
  Sc,
4926
4929
  (e, t) => t.startsWith("__f:") ? Ml(e, t) : e[t]
@@ -4983,7 +4986,7 @@ function Ug({
4983
4986
  var e;
4984
4987
  return (e = gr.current.ro) == null ? void 0 : e.disconnect();
4985
4988
  }, []), !Yr && Ds > 0) {
4986
- const e = gm(
4989
+ const e = xm(
4987
4990
  Pa.filter((t) => Yn[t.key] === "left").map((t) => t.key),
4988
4991
  // Kept from the end of this list inward: Actions, then State (what a row is waiting
4989
4992
  // on), then data columns; Owners gives way first (often "—" on a whole page).
@@ -5005,9 +5008,9 @@ function Ug({
5005
5008
  ], qc = an.map((e) => {
5006
5009
  if (e.kind === "data") {
5007
5010
  const t = vt.get(e.key.split(".")[0]);
5008
- return { key: e.key, shape: cm(t == null ? void 0 : t.type, t == null ? void 0 : t.interface) };
5011
+ return { key: e.key, shape: um(t == null ? void 0 : t.type, t == null ? void 0 : t.interface) };
5009
5012
  }
5010
- return { key: e.key, shape: Yf[e.kind] ?? "short" };
5013
+ return { key: e.key, shape: Jf[e.kind] ?? "short" };
5011
5014
  }), Vo = [
5012
5015
  ...ca ? [{ key: "__state__", label: "State" }] : [],
5013
5016
  ...le.filter((e) => un(e) || !gt(ot, n, e)).map((e) => ({ key: e, label: nt(e) }))
@@ -5033,7 +5036,7 @@ function Ug({
5033
5036
  const s = e.get(r) ?? [];
5034
5037
  return { key: r, count: s.length, rows: yn.has(r) ? [] : s };
5035
5038
  });
5036
- })(), Ho = `${JSON.stringify(rr.current)}|${R}|${[...yn].join("")}`, Kn = fp(Lc, (e) => String(e.id), yt.rootRef, {
5039
+ })(), Ho = `${JSON.stringify(rr.current)}|${R}|${[...yn].join("")}`, Kn = hp(Lc, (e) => String(e.id), yt.rootRef, {
5037
5040
  enabled: !!R && !xe,
5038
5041
  resetKey: Ho
5039
5042
  }), Da = (e) => ho.isGone(e) || Kn.isGone(e), As = (() => {
@@ -5046,12 +5049,12 @@ function Ug({
5046
5049
  }
5047
5050
  return e;
5048
5051
  })();
5049
- hp(
5052
+ bp(
5050
5053
  yt.rootRef,
5051
5054
  As.map((e) => e.kind === "header" ? `§${e.gkey}` : String(e.row.id)).join(""),
5052
5055
  { enabled: !!R && !xe, resetKey: Ho }
5053
5056
  );
5054
- const [Rc, Fc] = k(null), Ec = w0(As, Rc), Ms = an.filter((e) => tn(e.key) === "left").map((e) => e.key), Go = an.filter((e) => tn(e.key) === "right").map((e) => e.key), Oc = 52, Yo = (e) => {
5057
+ const [Rc, Fc] = k(null), Ec = _0(As, Rc), Ms = an.filter((e) => tn(e.key) === "left").map((e) => e.key), Go = an.filter((e) => tn(e.key) === "right").map((e) => e.key), Oc = 52, Yo = (e) => {
5055
5058
  if (tn(e) === "left") {
5056
5059
  let s = Dt ? In.__checkbox__ ?? Oc : 0;
5057
5060
  for (const l of Ms) {
@@ -5178,7 +5181,7 @@ function Ug({
5178
5181
  continue;
5179
5182
  }
5180
5183
  if (Qn(m)) {
5181
- r.push({ kind: "phrase", text: Jm(m) });
5184
+ r.push({ kind: "phrase", text: Xm(m) });
5182
5185
  continue;
5183
5186
  }
5184
5187
  const M = m.fieldType ?? "", j = Gs({
@@ -5232,7 +5235,7 @@ function Ug({
5232
5235
  text: x.value === "none" ? "with no open tasks" : x.value === "overdue" ? "with overdue tasks" : "with open tasks"
5233
5236
  });
5234
5237
  else if (x.kind === "aging") {
5235
- const W = Lu({ field: M, type: "range", value: x.value, rangeUnit: "h" });
5238
+ const W = Ru({ field: M, type: "range", value: x.value, rangeUnit: "h" });
5236
5239
  W && r.push(W);
5237
5240
  } else if (x.kind === "text" && x.value.trim())
5238
5241
  r.push({ kind: "text", field: M, text: x.value });
@@ -5270,7 +5273,7 @@ function Ug({
5270
5273
  }).filter((x) => !!x);
5271
5274
  m.length > 0 && r.push({ kind: "phrase", text: `flagged ${m.join(" or ")}` });
5272
5275
  }
5273
- return Xo.current = e, Ru({
5276
+ return Xo.current = e, Fu({
5274
5277
  noun: (T == null ? void 0 : T.display_name) || Qe(n),
5275
5278
  viewName: ((u = Ve.find((m) => m.id === Pe)) == null ? void 0 : u.name) ?? null,
5276
5279
  search: Y,
@@ -5288,7 +5291,7 @@ function Ug({
5288
5291
  "data-cbv-denied": !0,
5289
5292
  className: C ?? "flex h-full min-h-0 flex-col bg-slate-50 text-[13px] dark:bg-slate-950",
5290
5293
  children: /* @__PURE__ */ a("div", { className: "flex min-h-0 flex-1 flex-col overflow-y-auto", children: /* @__PURE__ */ a(
5291
- Cf,
5294
+ $f,
5292
5295
  {
5293
5296
  collection: n,
5294
5297
  label: (T == null ? void 0 : T.display_name) || Qe(n)
@@ -5360,9 +5363,9 @@ function Ug({
5360
5363
  [data-cbv] .cbv-overlay { animation: none; opacity: 1; }
5361
5364
  }
5362
5365
  ` }),
5363
- /* @__PURE__ */ a(wf, {}),
5364
- /* @__PURE__ */ a(Qm, {}),
5365
- /* @__PURE__ */ a(Wm, { collection: n, className: "mx-4 mt-3 shrink-0" }),
5366
+ /* @__PURE__ */ a(_f, {}),
5367
+ /* @__PURE__ */ a(Wm, {}),
5368
+ /* @__PURE__ */ a(zm, { collection: n, className: "mx-4 mt-3 shrink-0" }),
5366
5369
  ce && ed(
5367
5370
  /* @__PURE__ */ c(
5368
5371
  "div",
@@ -5512,7 +5515,7 @@ function Ug({
5512
5515
  ),
5513
5516
  /* @__PURE__ */ c("div", { className: "flex shrink-0 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", children: [
5514
5517
  /* @__PURE__ */ a(
5515
- Vf,
5518
+ Hf,
5516
5519
  {
5517
5520
  collection: n,
5518
5521
  meta: T,
@@ -5598,10 +5601,10 @@ function Ug({
5598
5601
  )
5599
5602
  ] }),
5600
5603
  /* @__PURE__ */ a(
5601
- lf,
5604
+ of,
5602
5605
  {
5603
5606
  moreLabel: "More list actions",
5604
- lead: E ? void 0 : /* @__PURE__ */ a(tf, { kind: "list", id: n }),
5607
+ lead: E ? void 0 : /* @__PURE__ */ a(nf, { kind: "list", id: n }),
5605
5608
  items: [
5606
5609
  {
5607
5610
  key: "changed",
@@ -5609,7 +5612,7 @@ function Ug({
5609
5612
  priority: _e.some(Qn) ? 90 : 48,
5610
5613
  active: _e.some(Qn),
5611
5614
  node: /* @__PURE__ */ a(Je, { children: /* @__PURE__ */ a(
5612
- Xm,
5615
+ Zm,
5613
5616
  {
5614
5617
  filter: _e.find(Qn),
5615
5618
  onChange: (e) => {
@@ -5634,7 +5637,7 @@ function Ug({
5634
5637
  "data-approval-changed-filter": !0,
5635
5638
  onClick: () => {
5636
5639
  const t = _e.filter((r) => !Sn(r));
5637
- We(e ? t : [...t, Vm()]), K(1);
5640
+ We(e ? t : [...t, Hm()]), K(1);
5638
5641
  },
5639
5642
  "aria-pressed": !!e,
5640
5643
  "data-tip": e ? "Showing records changed in the app after they were approved. Click to show all." : "Only records changed in the app after they were approved",
@@ -5694,7 +5697,7 @@ function Ug({
5694
5697
  /* @__PURE__ */ a(
5695
5698
  "span",
5696
5699
  {
5697
- className: `h-2 w-2 rounded-full ${Jp(e.highlight_color ?? "red")}`
5700
+ className: `h-2 w-2 rounded-full ${Xp(e.highlight_color ?? "red")}`
5698
5701
  }
5699
5702
  ),
5700
5703
  e.name
@@ -5707,13 +5710,13 @@ function Ug({
5707
5710
  {
5708
5711
  key: "stale",
5709
5712
  priority: 95,
5710
- node: /* @__PURE__ */ a(mf, { className: "h-8" })
5713
+ node: /* @__PURE__ */ a(ff, { className: "h-8" })
5711
5714
  },
5712
5715
  {
5713
5716
  key: "focus",
5714
5717
  priority: 30,
5715
5718
  label: "Focus mode",
5716
- node: /* @__PURE__ */ a(D0, {})
5719
+ node: /* @__PURE__ */ a(A0, {})
5717
5720
  },
5718
5721
  ...ta && n ? [
5719
5722
  {
@@ -5721,7 +5724,7 @@ function Ug({
5721
5724
  priority: Pn.paused ? 90 : 45,
5722
5725
  active: Pn.paused,
5723
5726
  node: /* @__PURE__ */ a(
5724
- H0,
5727
+ G0,
5725
5728
  {
5726
5729
  paused: Pn.paused,
5727
5730
  held: Pn.held,
@@ -5770,16 +5773,16 @@ function Ug({
5770
5773
  key: "copy-link",
5771
5774
  priority: 25,
5772
5775
  label: "Copy link",
5773
- node: /* @__PURE__ */ a(X0, { listKey: `cbv:${n}`, getState: qs })
5776
+ node: /* @__PURE__ */ a(Z0, { listKey: `cbv:${n}`, getState: qs })
5774
5777
  },
5775
5778
  {
5776
5779
  key: "send-view",
5777
5780
  priority: 20,
5778
5781
  label: "Send this view",
5779
5782
  node: /* @__PURE__ */ a(
5780
- kf,
5783
+ wf,
5781
5784
  {
5782
- getView: () => dm(
5785
+ getView: () => cm(
5783
5786
  "list",
5784
5787
  n,
5785
5788
  `cbv:${n}`,
@@ -5799,7 +5802,7 @@ function Ug({
5799
5802
  priority: 15,
5800
5803
  label: "Copy as code",
5801
5804
  node: /* @__PURE__ */ a(
5802
- zm,
5805
+ Vm,
5803
5806
  {
5804
5807
  collection: n,
5805
5808
  list: {
@@ -5820,7 +5823,7 @@ function Ug({
5820
5823
  kind: "filter",
5821
5824
  priority: 75,
5822
5825
  node: /* @__PURE__ */ a(
5823
- k0,
5826
+ w0,
5824
5827
  {
5825
5828
  parent: Na.parent,
5826
5829
  value: Ul,
@@ -6132,7 +6135,7 @@ function Ug({
6132
6135
  }
6133
6136
  ),
6134
6137
  je === e && /* @__PURE__ */ c("div", { className: "mb-1 ml-5 mr-1 rounded-md border border-slate-100 bg-slate-50 p-1.5 dark:border-slate-800 dark:bg-slate-800/60", children: [
6135
- /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-1", children: Lf.map((s) => {
6138
+ /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-1", children: Rf.map((s) => {
6136
6139
  const l = JSON.stringify(de[e] ?? null) === JSON.stringify(s.cfg);
6137
6140
  return /* @__PURE__ */ a(
6138
6141
  "button",
@@ -6297,7 +6300,7 @@ function Ug({
6297
6300
  T && /* @__PURE__ */ c("div", { className: "mt-1 border-t border-slate-100 pt-1.5 dark:border-slate-800", children: [
6298
6301
  /* @__PURE__ */ a("p", { className: "px-1.5 pb-1 text-[10.5px] font-semibold uppercase tracking-wide text-slate-400", children: "+ Related column" }),
6299
6302
  /* @__PURE__ */ a(
6300
- Hf,
6303
+ Gf,
6301
6304
  {
6302
6305
  collection: n,
6303
6306
  meta: T,
@@ -6311,7 +6314,7 @@ function Ug({
6311
6314
  /* @__PURE__ */ c("div", { className: "mt-1 border-t border-slate-100 pt-1.5 dark:border-slate-800", children: [
6312
6315
  /* @__PURE__ */ a("p", { className: "px-1.5 pb-1 text-[10.5px] font-semibold uppercase tracking-wide text-slate-400", children: "+ Formula column" }),
6313
6316
  /* @__PURE__ */ a(
6314
- x0,
6317
+ v0,
6315
6318
  {
6316
6319
  fields: Pt.map((e) => e.field),
6317
6320
  onAdd: (e, t) => {
@@ -6660,7 +6663,7 @@ ${r}`).then(() => {
6660
6663
  )
6661
6664
  ] }),
6662
6665
  zr && /* @__PURE__ */ a(
6663
- W0,
6666
+ z0,
6664
6667
  {
6665
6668
  collection: n,
6666
6669
  layoutSlug: zr.slug,
@@ -6695,10 +6698,10 @@ ${r}`).then(() => {
6695
6698
  }
6696
6699
  )
6697
6700
  ] }),
6698
- Ja && Gn.editing && /* @__PURE__ */ a(uf, { ctl: Gn, collection: n }),
6701
+ Ja && Gn.editing && /* @__PURE__ */ a(pf, { ctl: Gn, collection: n }),
6699
6702
  At.length > 0 && !(Ja && Gn.editing) && /* @__PURE__ */ c("div", { className: "flex shrink-0 flex-wrap items-center gap-1.5 border-b border-slate-100 bg-white px-4 py-1.5 dark:border-slate-800 dark:bg-slate-900", children: [
6700
6703
  At.map((e) => /* @__PURE__ */ a(
6701
- jf,
6704
+ Bf,
6702
6705
  {
6703
6706
  def: e,
6704
6707
  allowedIds: Ll(e),
@@ -6897,7 +6900,7 @@ ${r}`).then(() => {
6897
6900
  ] })
6898
6901
  ] }),
6899
6902
  $t && /* @__PURE__ */ a(
6900
- C0,
6903
+ $0,
6901
6904
  {
6902
6905
  name: e.name,
6903
6906
  isDefault: !!e.is_default,
@@ -6981,9 +6984,9 @@ ${r}`).then(() => {
6981
6984
  }
6982
6985
  )
6983
6986
  ] }),
6984
- Pd && !Ee && /* @__PURE__ */ a(Sf, { collection: n, className: "mx-4 mt-3" }),
6987
+ Pd && !Ee && /* @__PURE__ */ a(Cf, { collection: n, className: "mx-4 mt-3" }),
6985
6988
  Ee != null && /* @__PURE__ */ c("div", { className: "mx-4 mt-3 flex flex-wrap items-center gap-3 rounded-md border border-red-200 bg-red-50 px-4 py-2.5 text-[13px] text-red-700 dark:border-red-900/40 dark:bg-red-900/10 dark:text-red-400", children: [
6986
- /* @__PURE__ */ a("span", { className: "min-w-0 flex-1", children: Rp(Ee) === 503 ? Fp(Ee) : Ia(Ee, "Failed to load records") }),
6989
+ /* @__PURE__ */ a("span", { className: "min-w-0 flex-1", children: Fp(Ee) === 503 ? Ep(Ee) : Ia(Ee, "Failed to load records") }),
6987
6990
  (Ee == null ? void 0 : Ee.status) === 403 && !el(Ee) && /* @__PURE__ */ a(
6988
6991
  "button",
6989
6992
  {
@@ -7001,7 +7004,7 @@ ${r}`).then(() => {
7001
7004
  {
7002
7005
  type: "button",
7003
7006
  onClick: () => {
7004
- const t = S0(e, { filters: _e, sort: ie, colFilters: Ze });
7007
+ const t = C0(e, { filters: _e, sort: ie, colFilters: Ze });
7005
7008
  We(t.filters), ct(t.sort), xn(t.colFilters), K(1);
7006
7009
  },
7007
7010
  title: `Remove the filter or sort on "${e}" — this list cannot filter on it`,
@@ -7026,7 +7029,7 @@ ${r}`).then(() => {
7026
7029
  )
7027
7030
  ] }),
7028
7031
  qt === "tree" && Sa ? /* @__PURE__ */ a("div", { className: "flex min-h-0 flex-1 flex-col p-4 pt-3", children: /* @__PURE__ */ a("div", { className: "flex min-h-0 flex-1 flex-col overflow-hidden rounded-lg border border-slate-200 bg-white dark:border-slate-700 dark:bg-slate-900", children: /* @__PURE__ */ a(
7029
- Gm,
7032
+ Ym,
7030
7033
  {
7031
7034
  collection: n,
7032
7035
  config: Sa,
@@ -7039,7 +7042,7 @@ ${r}`).then(() => {
7039
7042
  }
7040
7043
  ) }) }) : qt && (z != null && z.some((e) => e.key === qt)) ? /* @__PURE__ */ a("div", { className: "flex min-h-0 flex-1 flex-col p-4 pt-3", "data-cbv-extra-view": qt, children: (ci = z.find((e) => e.key === qt)) == null ? void 0 : ci.render() }) : null,
7041
7044
  Fn && Jn ? /* @__PURE__ */ a("div", { className: "flex min-h-0 flex-1 flex-col p-4 pt-3", children: /* @__PURE__ */ a(
7042
- af,
7045
+ rf,
7043
7046
  {
7044
7047
  collection: n,
7045
7048
  latField: Jn.latField,
@@ -7071,13 +7074,13 @@ ${r}`).then(() => {
7071
7074
  ref: yt.rootRef,
7072
7075
  className: "nvr-fade-in relative flex min-h-0 flex-1 flex-col overflow-hidden rounded-lg border border-slate-200 bg-white dark:border-slate-700 dark:bg-slate-900",
7073
7076
  children: [
7074
- na.label && /* @__PURE__ */ a(G0, { label: na.label, onShow: ps, className: "bottom-28" }),
7077
+ na.label && /* @__PURE__ */ a(Y0, { label: na.label, onShow: ps, className: "bottom-28" }),
7075
7078
  bt && !tr && /* @__PURE__ */ a("div", { className: "cbv-progress pointer-events-none absolute inset-x-0 top-0 z-[6] h-[3px] overflow-hidden" }),
7076
7079
  bt && !tr && dn && /* @__PURE__ */ a(Je, { children: /* @__PURE__ */ a("div", { className: "cbv-overlay nvr-fade-in pointer-events-none absolute inset-0 z-[5] flex items-start justify-center bg-white/40 pt-24 dark:bg-slate-950/35", children: /* @__PURE__ */ c("span", { className: "nvr-pop-in flex items-center gap-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-slate-700 dark:bg-slate-900 dark:text-slate-300", children: [
7077
7080
  /* @__PURE__ */ a(kr, { "aria-hidden": !0, className: "h-3.5 w-3.5 animate-spin text-[#00a5cc]" }),
7078
7081
  oo != null ? `${rs.text ?? "Still working"} — ${oo}s` : "Loading…"
7079
7082
  ] }) }) }),
7080
- tr && rs.slow && /* @__PURE__ */ a("div", { className: "pointer-events-none absolute inset-x-0 top-12 z-[6] flex justify-center px-4", children: /* @__PURE__ */ a(yf, { reason: rs, variant: "pill" }) }),
7083
+ tr && rs.slow && /* @__PURE__ */ a("div", { className: "pointer-events-none absolute inset-x-0 top-12 z-[6] flex justify-center px-4", children: /* @__PURE__ */ a(kf, { reason: rs, variant: "pill" }) }),
7081
7084
  /* @__PURE__ */ a(
7082
7085
  "div",
7083
7086
  {
@@ -7215,7 +7218,7 @@ ${r}`).then(() => {
7215
7218
  ),
7216
7219
  Ks(t),
7217
7220
  /* @__PURE__ */ a(
7218
- Ym,
7221
+ Jm,
7219
7222
  {
7220
7223
  label: be,
7221
7224
  selectedCount: ze ? tt.length : 0,
@@ -7299,7 +7302,7 @@ ${r}`).then(() => {
7299
7302
  className: s,
7300
7303
  "data-aging-filter": !0,
7301
7304
  children: /* @__PURE__ */ a(
7302
- P0,
7305
+ D0,
7303
7306
  {
7304
7307
  layout: "cell",
7305
7308
  def: {
@@ -7397,7 +7400,7 @@ ${r}`).then(() => {
7397
7400
  // #3229 — one placeholder per real column, real row height (h-8, or the
7398
7401
  // table's comfortable h-11), real pins/widths: nothing moves on arrival.
7399
7402
  /* @__PURE__ */ a(
7400
- vf,
7403
+ yf,
7401
7404
  {
7402
7405
  columns: qc,
7403
7406
  rows: Math.min(et, 20),
@@ -7471,7 +7474,7 @@ ${r}`).then(() => {
7471
7474
  }
7472
7475
  ),
7473
7476
  /* @__PURE__ */ a(
7474
- v0,
7477
+ y0,
7475
7478
  {
7476
7479
  term: Y,
7477
7480
  collection: n,
@@ -7528,18 +7531,18 @@ ${r}`).then(() => {
7528
7531
  },
7529
7532
  `__group__${e.gkey}`
7530
7533
  );
7531
- const s = e.row, l = s.id, o = tt.includes(l), u = (ye = Se == null ? void 0 : Se.instances) == null ? void 0 : ye[String(l)], m = zd[String(l)], x = gs == null ? void 0 : gs[String(l)], M = Qd.get(String(l)) ?? null, j = Hd(n, l), be = !!(Ss != null && Ss.has(String(l))), W = !o && m ? Xp(m.color) : !o && be ? Ji : void 0, ve = o ? Zp : m ? W ?? Si : be ? `${Ji} ${Ci}` : `${Si} ${Ci}`, ue = em, G = Kn.movingTo(String(l)), wt = G ? ((pe = an.map((Re) => ({ k: Re.key, n: String(s[Re.key] ?? "").length })).sort((Re, y) => y.n - Re.n)[0]) == null ? void 0 : pe.k) ?? ((Ce = an[0]) == null ? void 0 : Ce.key) : null;
7534
+ const s = e.row, l = s.id, o = tt.includes(l), u = (ye = Se == null ? void 0 : Se.instances) == null ? void 0 : ye[String(l)], m = zd[String(l)], x = gs == null ? void 0 : gs[String(l)], M = Qd.get(String(l)) ?? null, j = Hd(n, l), be = !!(Ss != null && Ss.has(String(l))), W = !o && m ? Zp(m.color) : !o && be ? Ji : void 0, ve = o ? em : m ? W ?? Si : be ? `${Ji} ${Ci}` : `${Si} ${Ci}`, ue = tm, G = Kn.movingTo(String(l)), wt = G ? ((pe = an.map((Re) => ({ k: Re.key, n: String(s[Re.key] ?? "").length })).sort((Re, y) => y.n - Re.n)[0]) == null ? void 0 : pe.k) ?? ((Ce = an[0]) == null ? void 0 : Ce.key) : null;
7532
7535
  return /* @__PURE__ */ c(
7533
7536
  "tr",
7534
7537
  {
7535
7538
  ...Kd({ collection: n, id: String(l) }),
7536
7539
  ...bc(l),
7537
7540
  "data-row-key": String(l),
7538
- title: (Da(String(l)) ? $p : void 0) ?? (Kn.movingTo(String(l)) != null ? bp(Kn.movingTo(String(l))) : void 0) ?? yt.titleFor(String(l)) ?? (M && !M.is_mine ? yp(M) : void 0) ?? (m ? `At risk — ${m.rule}` : void 0) ?? (j ? cf : void 0),
7541
+ title: (Da(String(l)) ? qp : void 0) ?? (Kn.movingTo(String(l)) != null ? gp(Kn.movingTo(String(l))) : void 0) ?? yt.titleFor(String(l)) ?? (M && !M.is_mine ? kp(M) : void 0) ?? (m ? `At risk — ${m.rule}` : void 0) ?? (j ? uf : void 0),
7539
7542
  "data-picker-excluded": j ? "" : void 0,
7540
7543
  "data-row-gone": Da(String(l)) ? "" : void 0,
7541
7544
  style: r,
7542
- className: `nvr-row-enter group h-8 cursor-pointer border-b border-slate-100 transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-nvr-cyan dark:border-slate-800 ${ve} ${j ? df : ""} ${Da(String(l)) ? Cp : ""}`,
7545
+ className: `nvr-row-enter group h-8 cursor-pointer border-b border-slate-100 transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-nvr-cyan dark:border-slate-800 ${ve} ${j ? cf : ""} ${Da(String(l)) ? $p : ""}`,
7543
7546
  children: [
7544
7547
  Dt && /* @__PURE__ */ a(
7545
7548
  "td",
@@ -7548,7 +7551,7 @@ ${r}`).then(() => {
7548
7551
  onClick: (Re) => Re.stopPropagation(),
7549
7552
  children: /* @__PURE__ */ c("span", { className: "flex items-center gap-1", children: [
7550
7553
  M || yt.isNew(String(l)) || Da(String(l)) || Kn.movingTo(String(l)) != null ? /* @__PURE__ */ a(
7551
- Y0,
7554
+ J0,
7552
7555
  {
7553
7556
  lock: M,
7554
7557
  isNew: yt.isNew(String(l)),
@@ -7557,20 +7560,20 @@ ${r}`).then(() => {
7557
7560
  dataAttr: "data-cbv-live-mark"
7558
7561
  }
7559
7562
  ) : ls[Xs(n, String(l))] ? /* @__PURE__ */ a(
7560
- xf,
7563
+ vf,
7561
7564
  {
7562
7565
  viewers: ls[Xs(n, String(l))],
7563
7566
  dataAttr: "data-cbv-presence"
7564
7567
  }
7565
- ) : !x && be ? /* @__PURE__ */ a(Jf, {}) : /* @__PURE__ */ a(Qi, { change: x, dataAttr: "data-cbv-unseen" }),
7566
- /* @__PURE__ */ a(Am, { rowId: l }),
7568
+ ) : !x && be ? /* @__PURE__ */ a(Xf, {}) : /* @__PURE__ */ a(Qi, { change: x, dataAttr: "data-cbv-unseen" }),
7569
+ /* @__PURE__ */ a(Mm, { rowId: l }),
7567
7570
  ze && /* @__PURE__ */ a(
7568
7571
  "input",
7569
7572
  {
7570
7573
  type: "checkbox",
7571
7574
  checked: o,
7572
7575
  onChange: () => xc(l),
7573
- "aria-label": `Select ${Vp(T, s, l, n) || "this record"}`
7576
+ "aria-label": `Select ${Hp(T, s, l, n) || "this record"}`
7574
7577
  }
7575
7578
  )
7576
7579
  ] })
@@ -7644,7 +7647,7 @@ ${r}`).then(() => {
7644
7647
  style: { ...vr(y), ...Ue(y) },
7645
7648
  className: `whitespace-nowrap px-3 py-1.5 text-[12px] ${kt(y, "z-[1]", ue)}`,
7646
7649
  children: /* @__PURE__ */ a(
7647
- K0,
7650
+ j0,
7648
7651
  {
7649
7652
  stepLabel: p == null ? void 0 : p.state_label,
7650
7653
  enteredAt: p == null ? void 0 : p.entered_at,
@@ -7676,9 +7679,9 @@ ${r}`).then(() => {
7676
7679
  "td",
7677
7680
  {
7678
7681
  style: Ue(y),
7679
- "data-tip": P != null && (p != null && p.entered_at) ? `In ${p.state_label ?? "this state"} since ${$m(p.entered_at)}` : void 0,
7682
+ "data-tip": P != null && (p != null && p.entered_at) ? `In ${p.state_label ?? "this state"} since ${qm(p.entered_at)}` : void 0,
7680
7683
  className: `whitespace-nowrap px-3 py-1.5 text-[12px] tabular-nums text-slate-600 dark:text-slate-300 ${kt(y, "z-[1]", ue)}`,
7681
- children: P == null ? /* @__PURE__ */ a("span", { className: "text-slate-300 dark:text-slate-600", children: "—" }) : Cm(P)
7684
+ children: P == null ? /* @__PURE__ */ a("span", { className: "text-slate-300 dark:text-slate-600", children: "—" }) : $m(P)
7682
7685
  },
7683
7686
  y
7684
7687
  );
@@ -7707,7 +7710,7 @@ ${r}`).then(() => {
7707
7710
  {
7708
7711
  style: Ue(y),
7709
7712
  className: `whitespace-nowrap px-3 py-1.5 ${kt(y, "z-[1]", ue)}`,
7710
- children: /* @__PURE__ */ a(Ef, { summary: p })
7713
+ children: /* @__PURE__ */ a(Of, { summary: p })
7711
7714
  },
7712
7715
  y
7713
7716
  );
@@ -7720,11 +7723,11 @@ ${r}`).then(() => {
7720
7723
  className: `whitespace-nowrap px-3 py-1.5 ${kt(y, "z-[1]", ue)}`,
7721
7724
  onClick: (p) => p.stopPropagation(),
7722
7725
  children: /* @__PURE__ */ a(
7723
- A0,
7726
+ M0,
7724
7727
  {
7725
7728
  collection: n,
7726
7729
  itemId: String(l),
7727
- figures: M0(
7730
+ figures: I0(
7728
7731
  s[Be.shipped_field],
7729
7732
  s[Be.requested_field]
7730
7733
  ),
@@ -7735,14 +7738,14 @@ ${r}`).then(() => {
7735
7738
  y
7736
7739
  );
7737
7740
  if (Re.kind === "integrations") {
7738
- const p = cn == null ? void 0 : cn[String(l)], B = xs == null ? void 0 : xs[String(l)], P = Du(B ?? []).length > 0 || !Array.isArray(p) || p.length === 0;
7741
+ const p = cn == null ? void 0 : cn[String(l)], B = xs == null ? void 0 : xs[String(l)], P = Au(B ?? []).length > 0 || !Array.isArray(p) || p.length === 0;
7739
7742
  return /* @__PURE__ */ a(
7740
7743
  "td",
7741
7744
  {
7742
7745
  style: Ue(y),
7743
7746
  className: `whitespace-nowrap px-3 py-1.5 ${kt(y, "z-[1]", ue)}`,
7744
7747
  children: /* @__PURE__ */ c("span", { className: "inline-flex items-center gap-2", children: [
7745
- P && /* @__PURE__ */ a(U0, { rows: B }),
7748
+ P && /* @__PURE__ */ a(Q0, { rows: B }),
7746
7749
  /* @__PURE__ */ a(Mi, { facts: p })
7747
7750
  ] })
7748
7751
  },
@@ -7794,7 +7797,7 @@ ${r}`).then(() => {
7794
7797
  className: `w-20 whitespace-nowrap px-2 py-1 text-right ${kt(y, "z-[1]", ue)}`,
7795
7798
  onClick: (p) => p.stopPropagation(),
7796
7799
  children: /* @__PURE__ */ a(
7797
- Af,
7800
+ Mf,
7798
7801
  {
7799
7802
  collection: n,
7800
7803
  id: l,
@@ -7829,7 +7832,7 @@ ${r}`).then(() => {
7829
7832
  className: `whitespace-nowrap px-3 py-1.5 ${la(y) ? "text-right" : ""} ${kt(y, "z-[1]", ue)}${G && y === wt ? " relative" : ""}`,
7830
7833
  children: [
7831
7834
  G && y === wt && /* @__PURE__ */ a(
7832
- J0,
7835
+ X0,
7833
7836
  {
7834
7837
  to: G,
7835
7838
  className: "absolute right-2 top-1/2 z-[2] -translate-y-1/2 shadow-sm"
@@ -7971,7 +7974,7 @@ ${r}`).then(() => {
7971
7974
  className: `whitespace-nowrap px-3 py-1.5 ${l ? "text-right" : ""} ${kt(r, "z-[3]", "bg-slate-50 dark:bg-slate-800")}`,
7972
7975
  style: Ue(r),
7973
7976
  "data-tip": l && s ? l.failed ? `This ${o.toLowerCase()} could not be worked out` : (() => {
7974
- const u = r0(
7977
+ const u = s0(
7975
7978
  s,
7976
7979
  nt(r),
7977
7980
  It ? null : $e
@@ -7980,7 +7983,7 @@ ${r}`).then(() => {
7980
7983
  })() : void 0,
7981
7984
  children: l && s ? /* @__PURE__ */ c("span", { className: "inline-flex items-baseline gap-1.5", children: [
7982
7985
  /* @__PURE__ */ a("span", { className: "text-[10px] font-semibold uppercase tracking-wide text-slate-400 dark:text-slate-500", children: o }),
7983
- l.loading ? /* @__PURE__ */ a(_f, { className: "inline-block h-3 w-12 align-middle" }) : /* @__PURE__ */ a("span", { className: "text-slate-700 dark:text-slate-200", children: l.value == null || l.failed ? "—" : Fi(l.value, s, de[r]) })
7986
+ l.loading ? /* @__PURE__ */ a(Nf, { className: "inline-block h-3 w-12 align-middle" }) : /* @__PURE__ */ a("span", { className: "text-slate-700 dark:text-slate-200", children: l.value == null || l.failed ? "—" : Fi(l.value, s, de[r]) })
7984
7987
  ] }) : t === 0 ? /* @__PURE__ */ a("span", { className: "text-[10.5px] font-semibold uppercase tracking-wide text-slate-400", children: "Σ totals" }) : null
7985
7988
  },
7986
7989
  r
@@ -7992,9 +7995,9 @@ ${r}`).then(() => {
7992
7995
  )
7993
7996
  }
7994
7997
  ),
7995
- /* @__PURE__ */ a(I0, { scrollerRef: za }),
7998
+ /* @__PURE__ */ a(K0, { scrollerRef: za }),
7996
7999
  /* @__PURE__ */ a(
7997
- gf,
8000
+ xf,
7998
8001
  {
7999
8002
  collections: n ? [n] : [],
8000
8003
  selectedIds: Mt,
@@ -8020,7 +8023,7 @@ ${r}`).then(() => {
8020
8023
  style: { paddingRight: "calc(0.5rem + var(--nvr-corner-float, 0px))" },
8021
8024
  children: [
8022
8025
  /* @__PURE__ */ a(
8023
- nf,
8026
+ af,
8024
8027
  {
8025
8028
  className: "w-full",
8026
8029
  range: /* @__PURE__ */ c(Je, { children: [
@@ -8132,7 +8135,7 @@ ${r}`).then(() => {
8132
8135
  }
8133
8136
  ),
8134
8137
  ht != null && ht.length ? /* @__PURE__ */ a(
8135
- ff,
8138
+ hf,
8136
8139
  {
8137
8140
  collection: ht[0].collection,
8138
8141
  itemId: ht[0].itemId,
@@ -8144,7 +8147,7 @@ ${r}`).then(() => {
8144
8147
  }
8145
8148
  ) : null,
8146
8149
  va && /* @__PURE__ */ a(
8147
- $f,
8150
+ qf,
8148
8151
  {
8149
8152
  collection: n,
8150
8153
  item: va,
@@ -8173,7 +8176,7 @@ ${r}`).then(() => {
8173
8176
  )
8174
8177
  ] }),
8175
8178
  Dt && ze && tt.length > 0 && /* @__PURE__ */ a(
8176
- Gf,
8179
+ Yf,
8177
8180
  {
8178
8181
  collection: n,
8179
8182
  selectedIds: tt,
@@ -8185,7 +8188,7 @@ ${r}`).then(() => {
8185
8188
  pointField: xd,
8186
8189
  onFormOpen: vc,
8187
8190
  figures: /* @__PURE__ */ a(
8188
- Im,
8191
+ Km,
8189
8192
  {
8190
8193
  tone: "dark",
8191
8194
  total: tt.length,
@@ -8196,7 +8199,7 @@ ${r}`).then(() => {
8196
8199
  }
8197
8200
  ),
8198
8201
  notices: /* @__PURE__ */ a(
8199
- Mm,
8202
+ Im,
8200
8203
  {
8201
8204
  tone: "dark",
8202
8205
  total: tt.length,
@@ -8220,23 +8223,23 @@ ${r}`).then(() => {
8220
8223
  }
8221
8224
  );
8222
8225
  }
8223
- function nh(n, i, h, d, w) {
8226
+ function ah(n, i, h, d, w) {
8224
8227
  const N = cl(i, n, h);
8225
8228
  return N != null && N.one_collection ? /* @__PURE__ */ a(ul, { relatedCollection: N.one_collection, id: d }) : bu(d, w);
8226
8229
  }
8227
8230
  export {
8228
- Ug as CollectionBrowserView,
8231
+ Wg as CollectionBrowserView,
8229
8232
  Mr as MultiPick,
8230
- Af as RowActionsMenu,
8233
+ Mf as RowActionsMenu,
8231
8234
  Vi as TINT_TEXT,
8232
- th as cbvDerivedTouched,
8233
- Zf as cbvQuietNow,
8234
- eh as cbvRiskInputs,
8235
- nh as compareCell,
8235
+ nh as cbvDerivedTouched,
8236
+ eh as cbvQuietNow,
8237
+ th as cbvRiskInputs,
8238
+ ah as compareCell,
8236
8239
  Fr as invalidateCbvRowQueries,
8237
8240
  Xi as isCbvDerivedQuery,
8238
- Df as roleMayDelete,
8239
- Pf as roleMayUpdate,
8240
- xm as templateRelationPaths,
8241
+ Af as roleMayDelete,
8242
+ Df as roleMayUpdate,
8243
+ vm as templateRelationPaths,
8241
8244
  Tr as tintFor
8242
8245
  };