@nivaro/react 0.3.117 → 0.3.119
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +136 -14
- package/dist/index.js +488 -485
- package/dist/shared/components/ActivityEntry.js +130 -125
- package/dist/shared/components/AgentPresenceChip.js +36 -26
- package/dist/shared/components/CellCopyLayer.js +50 -45
- package/dist/shared/components/CollectionBrowserView.js +3757 -3695
- package/dist/shared/components/FilePreviewLightbox.js +96 -58
- package/dist/shared/components/InStep.js +18 -17
- package/dist/shared/components/ItemEditForm.js +4451 -4385
- package/dist/shared/components/JobsTray.js +8 -8
- package/dist/shared/components/LiveNewMatchesPill.js +21 -14
- package/dist/shared/components/LiveOffNote.js +3 -2
- package/dist/shared/components/LiveRowMark.js +53 -23
- package/dist/shared/components/LiveTraceView.js +162 -123
- package/dist/shared/components/MyWorkView.js +320 -299
- package/dist/shared/components/NotificationBell.js +14 -14
- package/dist/shared/components/OverflowRail.js +1 -1
- package/dist/shared/components/PageRenderer.js +120 -116
- package/dist/shared/components/ProfileView.js +203 -202
- package/dist/shared/components/RealtimeStatusBanner.js +31 -29
- package/dist/shared/components/RecordDrilldownSheet.js +7 -7
- package/dist/shared/components/RecordHoverCard.js +102 -84
- package/dist/shared/components/RecordReadView.js +146 -146
- package/dist/shared/components/ScreenRefreshButton.js +34 -32
- package/dist/shared/components/TipLayer.js +65 -58
- package/dist/shared/components/WidgetImageMenu.js +83 -43
- package/dist/shared/components/activity/RecordActivityStream.js +175 -173
- package/dist/shared/components/bulk/BulkSelectionNotices.js +142 -119
- package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +158 -143
- package/dist/shared/components/change-proposals/ProposeChangeButton.js +17 -11
- package/dist/shared/components/change-proposals/ProposeChangeDialog.js +201 -173
- package/dist/shared/components/chat/ChatAnalyticsView.js +27 -27
- package/dist/shared/components/chat/HuddleAnalyticsTab.js +17 -17
- package/dist/shared/components/collections-directory/CollectionsToolbar.js +39 -41
- package/dist/shared/components/collections-directory/page-model.js +72 -67
- package/dist/shared/components/integrations/RecordIntegrationPreview.js +48 -56
- package/dist/shared/components/integrations/SendStatus.js +65 -59
- package/dist/shared/components/integrations/console/ReadyToSendView.js +275 -209
- package/dist/shared/components/integrations/console/SignalCard.js +237 -230
- package/dist/shared/components/item-edit/CatalogPickerField.js +227 -205
- package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +135 -94
- package/dist/shared/components/item-edit/CloneDialog.js +191 -161
- package/dist/shared/components/item-edit/DerivedCauseNote.js +44 -30
- package/dist/shared/components/item-edit/DraftRecoveryBanner.js +153 -134
- package/dist/shared/components/item-edit/FieldComments.js +88 -85
- package/dist/shared/components/item-edit/FieldPointer.js +82 -67
- package/dist/shared/components/item-edit/FieldRow.js +106 -100
- package/dist/shared/components/item-edit/FieldSourceBadge.js +58 -56
- package/dist/shared/components/item-edit/FilePickerField.js +452 -387
- package/dist/shared/components/item-edit/HeaderSummaryChip.js +78 -56
- package/dist/shared/components/item-edit/HeaderTools.js +245 -141
- package/dist/shared/components/item-edit/InlineTableField.js +1242 -1218
- package/dist/shared/components/item-edit/ListNeighborNav.js +47 -50
- package/dist/shared/components/item-edit/LiveTraceSheet.js +15 -10
- package/dist/shared/components/item-edit/MembershipSetField.js +285 -254
- package/dist/shared/components/item-edit/OutboxReviewTray.js +155 -144
- package/dist/shared/components/item-edit/QueueReturnChip.js +15 -36
- package/dist/shared/components/item-edit/RecalcValue.js +57 -32
- package/dist/shared/components/item-edit/RecordHelpChip.js +15 -16
- package/dist/shared/components/item-edit/RecordLiveSync.js +283 -231
- package/dist/shared/components/item-edit/RelationCombobox.js +439 -393
- package/dist/shared/components/item-edit/RemoteChangeUi.js +292 -224
- package/dist/shared/components/item-edit/RemoteUploads.js +26 -20
- package/dist/shared/components/item-edit/RemovedLineNote.js +77 -67
- package/dist/shared/components/item-edit/RichTextEditorImpl.js +184 -179
- package/dist/shared/components/item-edit/ScheduledChangeChip.js +168 -134
- package/dist/shared/components/item-edit/SectionPresence.js +18 -10
- package/dist/shared/components/item-edit/SplitLinesButton.js +163 -139
- package/dist/shared/components/item-edit/UserChip.js +1 -1
- package/dist/shared/components/item-edit/addendum-view.js +6 -0
- package/dist/shared/components/item-edit/file-live.js +69 -54
- package/dist/shared/components/item-edit/layout-switch.js +98 -89
- package/dist/shared/components/item-edit/partner-needs.js +12 -12
- package/dist/shared/components/item-edit/removed-line.js +31 -25
- package/dist/shared/components/layout-editor/pickers/field-picker.js +151 -130
- package/dist/shared/components/list/ListViewers.js +46 -35
- package/dist/shared/components/notifications/NotificationCenterView.js +479 -437
- package/dist/shared/components/panels/AccessDeniedPanel.js +176 -101
- package/dist/shared/components/panels/AlertBanners.js +82 -72
- package/dist/shared/components/panels/BranchLanes.js +22 -22
- package/dist/shared/components/panels/CommentImages.js +123 -102
- package/dist/shared/components/panels/CommentPanel.js +186 -185
- package/dist/shared/components/panels/ExternalRequestsChip.js +111 -119
- package/dist/shared/components/panels/OwnerOpenedLine.js +31 -24
- package/dist/shared/components/panels/PipelinePanel.js +2037 -1885
- package/dist/shared/components/panels/ResubmissionDiff.js +163 -142
- package/dist/shared/components/pipeline/OwnerMatrixSheet.js +400 -288
- package/dist/shared/components/pipeline/PipelineEditorView.js +7 -2
- package/dist/shared/components/profile/AgentNameField.js +107 -81
- package/dist/shared/components/profile/AgentsPanel.js +184 -184
- package/dist/shared/components/profile/PersonAccess.js +599 -495
- package/dist/shared/components/profile/SignInTroubleshooter.js +160 -127
- package/dist/shared/components/profile/SignedInDevices.js +17 -17
- package/dist/shared/components/profile/primitives.js +1 -1
- package/dist/shared/components/queue/OwnerAvatars.js +91 -54
- package/dist/shared/components/queue/QueueTeamStrip.js +56 -46
- package/dist/shared/components/queue/QueueWorklist.js +1002 -983
- package/dist/shared/components/support/AssignRules.js +1733 -0
- package/dist/shared/components/support/PersonPick.js +88 -0
- package/dist/shared/components/support/RequestList.js +790 -0
- package/dist/shared/components/support/ScreenShare.js +158 -152
- package/dist/shared/components/support/SupportRequestDialog.js +50 -48
- package/dist/shared/components/support/SupportView.js +140 -246
- package/dist/shared/components/support/TicketDetailSheet.js +82 -75
- package/dist/shared/components/support/TicketSlowScreens.js +9 -9
- package/dist/shared/components/support/assign-rules-text.js +171 -0
- package/dist/shared/components/support/support-list.js +125 -0
- package/dist/shared/components/ui/SimpleSelect.js +28 -20
- package/dist/shared/components/ui/checkbox.js +6 -6
- package/dist/shared/components/ui/select.js +43 -39
- package/dist/shared/components/ui/sheet.js +9 -9
- package/dist/shared/components/ui/switch.js +12 -11
- package/dist/shared/components/watch-list/WatchDock.js +532 -459
- package/dist/shared/components/watch-list/WatchExtras.js +332 -286
- package/dist/shared/components/watch-list/WatchRows.js +164 -140
- package/dist/shared/lib/activity-sentence.js +103 -91
- package/dist/shared/lib/agent-presence.js +27 -21
- package/dist/shared/lib/approval-progress.js +2 -2
- package/dist/shared/lib/copy-rules.js +31 -24
- package/dist/shared/lib/derived-causes.js +113 -78
- package/dist/shared/lib/grid-cursors.js +26 -26
- package/dist/shared/lib/label-flash.js +27 -0
- package/dist/shared/lib/list-return.js +137 -125
- package/dist/shared/lib/live-deltas.js +40 -34
- package/dist/shared/lib/live-groups.js +56 -52
- package/dist/shared/lib/live-preference.js +64 -59
- package/dist/shared/lib/live-screen.js +223 -192
- package/dist/shared/lib/partner-failure.js +11 -11
- package/dist/shared/lib/rollup-recalc.js +68 -64
- package/dist/shared/lib/screen-refresh.js +74 -68
- package/dist/shared/lib/screen-share.js +108 -104
- package/dist/shared/lib/send-status.js +77 -61
- package/dist/shared/lib/text-diff-window.js +29 -0
- package/dist/shared/lib/watch-list.js +210 -209
- package/dist/shared/lib/widget-image-render.js +72 -49
- package/package.json +1 -1
|
@@ -1,127 +1,127 @@
|
|
|
1
|
-
import { useRef as v, useState as
|
|
2
|
-
import { useLiveBusy as
|
|
3
|
-
const
|
|
4
|
-
function
|
|
5
|
-
const
|
|
6
|
-
for (const
|
|
7
|
-
const r = (
|
|
8
|
-
if (
|
|
9
|
-
const
|
|
1
|
+
import { useRef as v, useState as g, useLayoutEffect as H, useEffect as x, useCallback as O } from "react";
|
|
2
|
+
import { useLiveBusy as j, liveMotionAllowed as V } from "./live-preference.js";
|
|
3
|
+
const _ = (t, n) => t ? typeof t == "function" ? t(n) : t.has(n) : !1;
|
|
4
|
+
function X(t, n, e, c) {
|
|
5
|
+
const o = /* @__PURE__ */ new Map();
|
|
6
|
+
for (const s of n) o.set(e(s), s);
|
|
7
|
+
const r = (s) => !_(c.released, s) && (_(c.held, s) || !_(c.mayLeave, s));
|
|
8
|
+
if (c.frozen) {
|
|
9
|
+
const s = [], f = /* @__PURE__ */ new Set();
|
|
10
10
|
for (const u of t) {
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
|
|
11
|
+
f.add(u.key);
|
|
12
|
+
const p = o.get(u.key);
|
|
13
|
+
p !== void 0 ? s.push({ key: u.key, row: p, state: "live" }) : _(c.released, u.key) || s.push({ key: u.key, row: u.row, state: "departed" });
|
|
14
14
|
}
|
|
15
15
|
for (const u of n) {
|
|
16
|
-
const
|
|
17
|
-
|
|
16
|
+
const p = e(u);
|
|
17
|
+
f.has(p) || s.push({ key: p, row: u, state: "live" });
|
|
18
18
|
}
|
|
19
|
-
return
|
|
19
|
+
return s;
|
|
20
20
|
}
|
|
21
|
-
const i = n.map((
|
|
22
|
-
let
|
|
23
|
-
for (const
|
|
24
|
-
!
|
|
25
|
-
for (const
|
|
26
|
-
const
|
|
27
|
-
if (
|
|
21
|
+
const i = n.map((s) => ({ key: e(s), row: s, state: "live" })), a = [];
|
|
22
|
+
let l = null;
|
|
23
|
+
for (const s of t)
|
|
24
|
+
!o.has(s.key) && r(s.key) && a.push({ row: { key: s.key, row: s.row, state: "departed" }, after: l }), l = s.key;
|
|
25
|
+
for (const s of a) {
|
|
26
|
+
const f = s.after == null ? -1 : i.findIndex((u) => u.key === s.after);
|
|
27
|
+
if (f < 0 && s.after != null) {
|
|
28
28
|
const u = t.slice(
|
|
29
29
|
0,
|
|
30
|
-
t.findIndex((
|
|
30
|
+
t.findIndex((d) => d.key === s.row.key)
|
|
31
31
|
);
|
|
32
|
-
let
|
|
33
|
-
for (let
|
|
34
|
-
|
|
35
|
-
i.splice(
|
|
36
|
-
} else i.splice(
|
|
32
|
+
let p = -1;
|
|
33
|
+
for (let d = u.length - 1; d >= 0 && p < 0; d--)
|
|
34
|
+
p = i.findIndex((k) => k.key === u[d].key);
|
|
35
|
+
i.splice(p + 1, 0, s.row);
|
|
36
|
+
} else i.splice(f + 1, 0, s.row);
|
|
37
37
|
}
|
|
38
38
|
return i;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
const [r, i] =
|
|
44
|
-
() => (t ?? []).map((
|
|
45
|
-
),
|
|
46
|
-
|
|
40
|
+
function fe(t, n, e = {}) {
|
|
41
|
+
const c = e.enabled !== !1, o = v(n);
|
|
42
|
+
o.current = n;
|
|
43
|
+
const [r, i] = g(null), [a, l] = g(!1), [s, f] = g(!1), [u, p] = g(0), d = v(/* @__PURE__ */ new Map()), k = v(0), L = v(/* @__PURE__ */ new Set()), [A, S] = g(0), D = e.held ? [...e.held].sort().join("") : "", [K, w] = g(
|
|
44
|
+
() => (t ?? []).map((y) => ({ key: n(y), row: y, state: "live" }))
|
|
45
|
+
), b = v(e.resetKey);
|
|
46
|
+
x(() => {
|
|
47
47
|
if (!r) return;
|
|
48
|
-
const
|
|
49
|
-
const M =
|
|
50
|
-
(!M || !r.contains(M)) &&
|
|
48
|
+
const y = () => l(!0), m = () => l(!1), E = () => f(!0), I = (z) => {
|
|
49
|
+
const M = z.relatedTarget;
|
|
50
|
+
(!M || !r.contains(M)) && f(!1);
|
|
51
51
|
};
|
|
52
|
-
return r.addEventListener("pointerenter",
|
|
53
|
-
r.removeEventListener("pointerenter",
|
|
52
|
+
return r.addEventListener("pointerenter", y), r.addEventListener("pointerleave", m), r.addEventListener("focusin", E), r.addEventListener("focusout", I), () => {
|
|
53
|
+
r.removeEventListener("pointerenter", y), r.removeEventListener("pointerleave", m), r.removeEventListener("focusin", E), r.removeEventListener("focusout", I);
|
|
54
54
|
};
|
|
55
|
-
}, [r]),
|
|
56
|
-
if (!
|
|
57
|
-
const
|
|
58
|
-
|
|
55
|
+
}, [r]), x(() => {
|
|
56
|
+
if (!c || typeof document > "u") return;
|
|
57
|
+
const y = () => {
|
|
58
|
+
k.current += 1, d.current.size > 0 && p((m) => m + 1);
|
|
59
59
|
};
|
|
60
|
-
return document.addEventListener("pointerdown",
|
|
61
|
-
document.removeEventListener("pointerdown",
|
|
60
|
+
return document.addEventListener("pointerdown", y, !0), document.addEventListener("keydown", y, !0), () => {
|
|
61
|
+
document.removeEventListener("pointerdown", y, !0), document.removeEventListener("keydown", y, !0);
|
|
62
62
|
};
|
|
63
|
-
}, [
|
|
64
|
-
const
|
|
65
|
-
|
|
63
|
+
}, [c]);
|
|
64
|
+
const C = j(c), R = c && (a || s || C);
|
|
65
|
+
H(() => {
|
|
66
66
|
if (t === void 0) return;
|
|
67
|
-
const
|
|
68
|
-
if (
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
-
|
|
67
|
+
const y = b.current !== e.resetKey;
|
|
68
|
+
if (b.current = e.resetKey, !c || y) {
|
|
69
|
+
d.current.clear();
|
|
70
|
+
const m = t.map((E) => ({ key: o.current(E), row: E, state: "live" }));
|
|
71
|
+
w((E) => U(E, m) ? E : m);
|
|
72
72
|
return;
|
|
73
73
|
}
|
|
74
|
-
|
|
75
|
-
const
|
|
76
|
-
frozen:
|
|
77
|
-
held:
|
|
78
|
-
released:
|
|
79
|
-
mayLeave: (h) => (
|
|
80
|
-
}),
|
|
81
|
-
for (const h of
|
|
82
|
-
h.state === "departed" && (M.add(h.key),
|
|
83
|
-
for (const h of [...
|
|
84
|
-
M.has(h) ||
|
|
85
|
-
const
|
|
86
|
-
for (const h of [...
|
|
87
|
-
return
|
|
74
|
+
w((m) => {
|
|
75
|
+
const E = new Set(e.held ?? []), I = X(m, t, o.current, {
|
|
76
|
+
frozen: R,
|
|
77
|
+
held: E,
|
|
78
|
+
released: L.current,
|
|
79
|
+
mayLeave: (h) => (d.current.get(h) ?? Number.POSITIVE_INFINITY) < k.current
|
|
80
|
+
}), z = k.current, M = /* @__PURE__ */ new Set();
|
|
81
|
+
for (const h of I)
|
|
82
|
+
h.state === "departed" && (M.add(h.key), d.current.has(h.key) || d.current.set(h.key, z));
|
|
83
|
+
for (const h of [...d.current.keys()])
|
|
84
|
+
M.has(h) || d.current.delete(h);
|
|
85
|
+
const q = new Set(t.map((h) => o.current(h)));
|
|
86
|
+
for (const h of [...L.current]) q.has(h) && L.current.delete(h);
|
|
87
|
+
return U(m, I) ? m : I;
|
|
88
88
|
});
|
|
89
|
-
}, [t,
|
|
90
|
-
const
|
|
91
|
-
for (const
|
|
92
|
-
S((
|
|
89
|
+
}, [t, c, R, u, A, D, e.resetKey]);
|
|
90
|
+
const T = O((y) => {
|
|
91
|
+
for (const m of y) L.current.add(String(m));
|
|
92
|
+
S((m) => m + 1);
|
|
93
93
|
}, []);
|
|
94
|
-
return { rows:
|
|
94
|
+
return { rows: K, containerRef: i, release: T, frozen: R };
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function U(t, n) {
|
|
97
97
|
if (t.length !== n.length) return !1;
|
|
98
98
|
for (let e = 0; e < t.length; e++)
|
|
99
99
|
if (t[e].key !== n[e].key || t[e].row !== n[e].row || t[e].state !== n[e].state) return !1;
|
|
100
100
|
return !0;
|
|
101
101
|
}
|
|
102
|
-
function
|
|
103
|
-
if (t === null ||
|
|
104
|
-
const
|
|
105
|
-
for (const
|
|
102
|
+
function G(t, n, e, c) {
|
|
103
|
+
if (t === null || c) return { rows: [...n], held: 0 };
|
|
104
|
+
const o = new Set(t), r = /* @__PURE__ */ new Map();
|
|
105
|
+
for (const f of n) r.set(e(f), f);
|
|
106
106
|
let i = 0, a = !0;
|
|
107
|
-
const
|
|
108
|
-
for (const
|
|
109
|
-
const u = e(
|
|
110
|
-
if (
|
|
107
|
+
const l = [];
|
|
108
|
+
for (const f of n) {
|
|
109
|
+
const u = e(f);
|
|
110
|
+
if (o.has(u)) {
|
|
111
111
|
a = !1;
|
|
112
112
|
continue;
|
|
113
113
|
}
|
|
114
|
-
a ? i++ :
|
|
114
|
+
a ? i++ : l.push(f);
|
|
115
115
|
}
|
|
116
116
|
if (a) return { rows: [...n], held: 0 };
|
|
117
|
-
const
|
|
118
|
-
for (const
|
|
119
|
-
const u = r.get(
|
|
120
|
-
u !== void 0 &&
|
|
117
|
+
const s = [];
|
|
118
|
+
for (const f of t) {
|
|
119
|
+
const u = r.get(f);
|
|
120
|
+
u !== void 0 && s.push(u);
|
|
121
121
|
}
|
|
122
|
-
return { rows: [...
|
|
122
|
+
return { rows: [...s, ...l], held: i };
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function J(t) {
|
|
125
125
|
if (typeof window > "u") return null;
|
|
126
126
|
let n = (t == null ? void 0 : t.parentElement) ?? null;
|
|
127
127
|
for (; n; ) {
|
|
@@ -131,92 +131,122 @@ function X(t) {
|
|
|
131
131
|
}
|
|
132
132
|
return document.scrollingElement ?? null;
|
|
133
133
|
}
|
|
134
|
-
const
|
|
135
|
-
function
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
134
|
+
const $ = 24;
|
|
135
|
+
function B(t) {
|
|
136
|
+
if (typeof document > "u") return 0;
|
|
137
|
+
let n = 0;
|
|
138
|
+
for (const e of document.body.querySelectorAll("*")) {
|
|
139
|
+
if (t != null && t.contains(e)) continue;
|
|
140
|
+
const c = getComputedStyle(e).position;
|
|
141
|
+
if (c !== "sticky" && c !== "fixed") continue;
|
|
142
|
+
const o = e.getBoundingClientRect();
|
|
143
|
+
o.top > 200 || o.bottom <= 0 || o.width < window.innerWidth * 0.5 || o.height > window.innerHeight * 0.5 || (n = Math.max(n, o.bottom));
|
|
144
|
+
}
|
|
145
|
+
return n;
|
|
146
|
+
}
|
|
147
|
+
function de(t, n, e = {}) {
|
|
148
|
+
const c = e.enabled !== !1, o = v(n);
|
|
149
|
+
o.current = n;
|
|
150
|
+
const [r, i] = g(null), [a, l] = g(!0), s = v(null), f = v(e.resetKey), [u, p] = g(0), d = v(/* @__PURE__ */ new Set()), k = v(null);
|
|
151
|
+
x(() => {
|
|
140
152
|
if (!r) return;
|
|
141
|
-
const
|
|
142
|
-
if (
|
|
143
|
-
const
|
|
144
|
-
|
|
153
|
+
const w = J(r);
|
|
154
|
+
if (k.current = w, !w) return;
|
|
155
|
+
const b = w === document.scrollingElement || w === document.documentElement, C = b ? window : w;
|
|
156
|
+
let R = b ? B(r) : 0;
|
|
157
|
+
const T = () => {
|
|
158
|
+
if (w.scrollTop <= $) return l(!0);
|
|
159
|
+
const m = b ? R : w.getBoundingClientRect().top;
|
|
160
|
+
l(r.getBoundingClientRect().top >= m - $);
|
|
161
|
+
}, y = () => {
|
|
162
|
+
b && (R = B(r)), T();
|
|
163
|
+
};
|
|
164
|
+
return T(), C.addEventListener("scroll", T, { passive: !0 }), window.addEventListener("resize", y), () => {
|
|
165
|
+
C.removeEventListener("scroll", T), window.removeEventListener("resize", y);
|
|
166
|
+
};
|
|
145
167
|
}, [r]);
|
|
146
|
-
const
|
|
147
|
-
|
|
168
|
+
const L = O(() => p((w) => w + 1), []), A = Q(k, l, L);
|
|
169
|
+
f.current !== e.resetKey && (f.current = e.resetKey, s.current = null);
|
|
148
170
|
let S;
|
|
149
171
|
if (t === void 0) S = { rows: [], held: 0 };
|
|
150
|
-
else if (
|
|
151
|
-
S =
|
|
152
|
-
else return
|
|
153
|
-
const
|
|
172
|
+
else if (c)
|
|
173
|
+
S = G(s.current, t, o.current, a);
|
|
174
|
+
else return s.current = null, d.current = F, { rows: [...t], held: 0, reveal: A, rootRef: i, arrived: F };
|
|
175
|
+
const D = S.rows.map((w) => o.current(w)), K = s.current;
|
|
154
176
|
if (t !== void 0) {
|
|
155
|
-
if (
|
|
156
|
-
const
|
|
157
|
-
|
|
158
|
-
} else
|
|
159
|
-
|
|
177
|
+
if (K) {
|
|
178
|
+
const w = new Set(K), b = D.filter((C) => !w.has(C));
|
|
179
|
+
b.length > 0 && (d.current = new Set(b));
|
|
180
|
+
} else d.current = F;
|
|
181
|
+
s.current = D;
|
|
160
182
|
}
|
|
161
183
|
return {
|
|
162
184
|
rows: S.rows,
|
|
163
185
|
held: S.held,
|
|
164
186
|
reveal: A,
|
|
165
187
|
rootRef: i,
|
|
166
|
-
arrived:
|
|
188
|
+
arrived: d.current
|
|
167
189
|
};
|
|
168
190
|
}
|
|
169
191
|
const F = /* @__PURE__ */ new Set();
|
|
170
|
-
function
|
|
171
|
-
return
|
|
192
|
+
function Q(t, n, e) {
|
|
193
|
+
return O(() => {
|
|
172
194
|
var r;
|
|
173
|
-
const
|
|
174
|
-
let
|
|
195
|
+
const c = t.current;
|
|
196
|
+
let o = !0;
|
|
175
197
|
try {
|
|
176
|
-
|
|
198
|
+
o = !((r = window.matchMedia) != null && r.call(window, "(prefers-reduced-motion: reduce)").matches);
|
|
177
199
|
} catch {
|
|
178
200
|
}
|
|
179
|
-
|
|
201
|
+
c == null || c.scrollTo({ top: 0, behavior: o ? "smooth" : "auto" }), n(!0), e();
|
|
180
202
|
}, [t, n, e]);
|
|
181
203
|
}
|
|
182
|
-
const
|
|
183
|
-
function
|
|
204
|
+
const P = 2e3, Z = 1500;
|
|
205
|
+
function ee() {
|
|
184
206
|
return typeof document < "u" && (document.documentElement.classList.contains("dark") || document.documentElement.getAttribute("data-theme") === "dark") ? { fill: "rgba(245, 158, 11, 0.10)", dot: "#f59e0b" } : { fill: "rgba(0, 206, 255, 0.08)", dot: "#00b8e6" };
|
|
185
207
|
}
|
|
186
|
-
function
|
|
208
|
+
function te() {
|
|
187
209
|
var t;
|
|
188
210
|
return typeof document > "u" ? !1 : document.visibilityState === "hidden" || ((t = document.hasFocus) == null ? void 0 : t.call(document)) === !1;
|
|
189
211
|
}
|
|
190
|
-
function
|
|
212
|
+
function ne(t) {
|
|
213
|
+
if (typeof getComputedStyle != "function") return "#fff";
|
|
214
|
+
for (let n = t; n; n = n.parentElement) {
|
|
215
|
+
const e = getComputedStyle(n).backgroundColor;
|
|
216
|
+
if (e && e !== "transparent" && !/rgba\([^)]*,\s*0\)$/.test(e)) return e;
|
|
217
|
+
}
|
|
218
|
+
return "#fff";
|
|
219
|
+
}
|
|
220
|
+
function re(t, n) {
|
|
191
221
|
if (t.querySelector("[data-live-new-dot]")) return;
|
|
192
222
|
typeof getComputedStyle == "function" && getComputedStyle(t).position === "static" && (t.style.position = "relative");
|
|
193
223
|
const e = document.createElement("span");
|
|
194
|
-
e.setAttribute("data-live-new-dot", ""), e.setAttribute("aria-hidden", "true"), e.style.cssText = `position:absolute;left:3px;top:6px;width:6px;height:6px;border-radius:9999px;background:${n};pointer-events:none;z-index:1`, t.appendChild(e);
|
|
195
|
-
const
|
|
196
|
-
e.remove(),
|
|
224
|
+
e.setAttribute("data-live-new-dot", ""), e.setAttribute("aria-hidden", "true"), e.style.cssText = `position:absolute;left:3px;top:6px;width:6px;height:6px;border-radius:9999px;background:${n};box-shadow:0 0 0 2px ${ne(t)};pointer-events:none;z-index:1`, t.appendChild(e);
|
|
225
|
+
const c = () => {
|
|
226
|
+
e.remove(), o == null || o.disconnect(), document.removeEventListener("visibilitychange", r);
|
|
197
227
|
};
|
|
198
|
-
let
|
|
228
|
+
let o = null;
|
|
199
229
|
const r = () => {
|
|
200
230
|
if (document.visibilityState === "visible") {
|
|
201
|
-
if (typeof IntersectionObserver > "u") return
|
|
202
|
-
|
|
231
|
+
if (typeof IntersectionObserver > "u") return c();
|
|
232
|
+
o == null || o.disconnect(), o = new IntersectionObserver(
|
|
203
233
|
(i) => {
|
|
204
|
-
i.some((a) => a.isIntersecting && a.intersectionRatio >= 0.5) &&
|
|
234
|
+
i.some((a) => a.isIntersecting && a.intersectionRatio >= 0.5) && c();
|
|
205
235
|
},
|
|
206
236
|
{ threshold: [0.5] }
|
|
207
|
-
),
|
|
237
|
+
), o.observe(t);
|
|
208
238
|
}
|
|
209
239
|
};
|
|
210
240
|
document.addEventListener("visibilitychange", r), r();
|
|
211
241
|
}
|
|
212
|
-
function
|
|
242
|
+
function le(t, n) {
|
|
213
243
|
if (!t || typeof window > "u") return;
|
|
214
|
-
const e =
|
|
215
|
-
for (const
|
|
216
|
-
const r = typeof CSS < "u" && CSS.escape ? CSS.escape(
|
|
244
|
+
const e = ee(), c = te();
|
|
245
|
+
for (const o of n) {
|
|
246
|
+
const r = typeof CSS < "u" && CSS.escape ? CSS.escape(o) : o.replace(/"/g, '\\"'), i = t.querySelector(`[data-live-key="${r}"]`);
|
|
217
247
|
if (!i) continue;
|
|
218
|
-
if (
|
|
219
|
-
|
|
248
|
+
if (c) {
|
|
249
|
+
re(i, e.dot);
|
|
220
250
|
continue;
|
|
221
251
|
}
|
|
222
252
|
if (typeof i.animate != "function") continue;
|
|
@@ -227,11 +257,11 @@ function de(t, n) {
|
|
|
227
257
|
],
|
|
228
258
|
{ duration: 160, easing: "cubic-bezier(0.16, 1, 0.3, 1)" }
|
|
229
259
|
);
|
|
230
|
-
const a =
|
|
260
|
+
const a = P + Z;
|
|
231
261
|
i.animate(
|
|
232
262
|
[
|
|
233
263
|
{ backgroundColor: e.fill },
|
|
234
|
-
{ backgroundColor: e.fill, offset:
|
|
264
|
+
{ backgroundColor: e.fill, offset: P / a },
|
|
235
265
|
{ backgroundColor: "rgba(0, 0, 0, 0)" }
|
|
236
266
|
],
|
|
237
267
|
{ duration: a, easing: "linear" }
|
|
@@ -239,95 +269,96 @@ function de(t, n) {
|
|
|
239
269
|
}
|
|
240
270
|
}
|
|
241
271
|
function N() {
|
|
242
|
-
return !
|
|
272
|
+
return !V();
|
|
243
273
|
}
|
|
244
|
-
const
|
|
245
|
-
function
|
|
246
|
-
const
|
|
247
|
-
if (!(!r || r === t || !t.contains(r) ||
|
|
248
|
-
for (const i of
|
|
249
|
-
for (const i of [...
|
|
250
|
-
|
|
274
|
+
const oe = 'input, textarea, select, [contenteditable="true"], [contenteditable=""], [data-live-nofade]', se = 60;
|
|
275
|
+
function ce(t, n, e = typeof document > "u" ? null : document.activeElement) {
|
|
276
|
+
const c = /* @__PURE__ */ new Set(), o = (r) => {
|
|
277
|
+
if (!(!r || r === t || !t.contains(r) || c.size >= se) && !r.closest(oe) && !(e && e !== document.body && (r.contains(e) || e.contains(r)))) {
|
|
278
|
+
for (const i of c) if (i.contains(r)) return;
|
|
279
|
+
for (const i of [...c]) r.contains(i) && c.delete(i);
|
|
280
|
+
c.add(r);
|
|
251
281
|
}
|
|
252
282
|
};
|
|
253
283
|
for (const r of n)
|
|
254
|
-
if (r.type === "characterData")
|
|
284
|
+
if (r.type === "characterData") o(r.target.parentElement);
|
|
255
285
|
else if (r.type === "childList") {
|
|
256
286
|
const i = r.target;
|
|
257
287
|
let a = !1;
|
|
258
|
-
for (const
|
|
259
|
-
|
|
260
|
-
a &&
|
|
288
|
+
for (const l of Array.from(r.addedNodes))
|
|
289
|
+
l.nodeType === 1 ? o(l) : l.nodeType === 3 && (l.textContent ?? "").trim() && (a = !0);
|
|
290
|
+
a && o(i.nodeType === 1 ? i : i.parentElement);
|
|
261
291
|
}
|
|
262
|
-
return [...
|
|
292
|
+
return [...c];
|
|
263
293
|
}
|
|
264
|
-
const
|
|
265
|
-
function
|
|
294
|
+
const W = 600;
|
|
295
|
+
function Y(t) {
|
|
266
296
|
for (const n of t) {
|
|
267
297
|
const e = n;
|
|
268
298
|
!e.isConnected || typeof e.animate != "function" || e.animate([{ opacity: 0.25 }, { opacity: 1 }], { duration: 700, easing: "ease-out" });
|
|
269
299
|
}
|
|
270
300
|
}
|
|
271
|
-
function
|
|
272
|
-
const e = n.enabled !== !1,
|
|
273
|
-
return
|
|
301
|
+
function pe(t, n = {}) {
|
|
302
|
+
const e = n.enabled !== !1, c = n.windowMs ?? 1200, o = v(0), r = v(!0), i = v([]), [a, l] = g(null);
|
|
303
|
+
return H(() => {
|
|
274
304
|
if (r.current) {
|
|
275
305
|
r.current = !1;
|
|
276
306
|
return;
|
|
277
307
|
}
|
|
278
308
|
if (t == null || t === 0 || t === !1) return;
|
|
279
|
-
const
|
|
280
|
-
if (
|
|
309
|
+
const s = Date.now();
|
|
310
|
+
if (o.current = s + c, N()) {
|
|
281
311
|
i.current = [];
|
|
282
312
|
return;
|
|
283
313
|
}
|
|
284
|
-
const
|
|
314
|
+
const f = /* @__PURE__ */ new Set();
|
|
285
315
|
for (const u of i.current)
|
|
286
|
-
if (!(
|
|
287
|
-
for (const
|
|
288
|
-
i.current = [],
|
|
289
|
-
}, [t,
|
|
316
|
+
if (!(s - u.at > W))
|
|
317
|
+
for (const p of u.targets) f.add(p);
|
|
318
|
+
i.current = [], Y([...f]);
|
|
319
|
+
}, [t, c]), x(() => {
|
|
290
320
|
if (!e || !a || typeof MutationObserver > "u") return;
|
|
291
|
-
const
|
|
292
|
-
const u = Date.now(),
|
|
293
|
-
if (
|
|
294
|
-
if (u <=
|
|
295
|
-
N() ||
|
|
321
|
+
const s = new MutationObserver((f) => {
|
|
322
|
+
const u = Date.now(), p = ce(a, f);
|
|
323
|
+
if (p.length === 0) return;
|
|
324
|
+
if (u <= o.current) {
|
|
325
|
+
N() || Y(p);
|
|
296
326
|
return;
|
|
297
327
|
}
|
|
298
|
-
const
|
|
299
|
-
|
|
328
|
+
const d = i.current.filter((k) => u - k.at <= W);
|
|
329
|
+
d.push({ at: u, targets: p }), i.current = d.slice(-20);
|
|
300
330
|
});
|
|
301
|
-
return
|
|
302
|
-
|
|
331
|
+
return s.observe(a, { subtree: !0, childList: !0, characterData: !0 }), () => {
|
|
332
|
+
s.disconnect(), i.current = [];
|
|
303
333
|
};
|
|
304
|
-
}, [a, e]),
|
|
334
|
+
}, [a, e]), l;
|
|
305
335
|
}
|
|
306
|
-
function
|
|
336
|
+
function ie(t, n = Date.now()) {
|
|
307
337
|
if (!t) return null;
|
|
308
338
|
const e = Math.max(0, Math.round((n - t) / 1e3));
|
|
309
339
|
return e < 5 ? "Updated just now" : e < 60 ? `Updated ${e} s ago` : e < 3600 ? `Updated ${Math.round(e / 60)} min ago` : e < 86400 ? `Updated ${Math.round(e / 3600)} h ago` : `Updated ${Math.round(e / 86400)} d ago`;
|
|
310
340
|
}
|
|
311
|
-
function
|
|
312
|
-
const [e,
|
|
313
|
-
return
|
|
341
|
+
function ye(t, n) {
|
|
342
|
+
const [e, c] = g(() => Date.now());
|
|
343
|
+
return x(() => {
|
|
314
344
|
if (!n) return;
|
|
315
|
-
|
|
316
|
-
const
|
|
317
|
-
return () => clearInterval(
|
|
318
|
-
}, [n]),
|
|
345
|
+
c(Date.now());
|
|
346
|
+
const o = setInterval(() => c(Date.now()), 5e3);
|
|
347
|
+
return () => clearInterval(o);
|
|
348
|
+
}, [n]), ie(t, e);
|
|
319
349
|
}
|
|
320
350
|
export {
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
351
|
+
Z as NEW_ROW_FADE_MS,
|
|
352
|
+
P as NEW_ROW_HOLD_MS,
|
|
353
|
+
ce as fadeTargets,
|
|
354
|
+
G as holdTopInserts,
|
|
355
|
+
J as scrollParentOf,
|
|
356
|
+
X as settleRows,
|
|
357
|
+
le as slideIn,
|
|
358
|
+
B as stickyTopOffset,
|
|
359
|
+
ie as updatedAgoLabel,
|
|
360
|
+
pe as useLiveFade,
|
|
361
|
+
fe as useSettledRows,
|
|
362
|
+
de as useTopInserts,
|
|
363
|
+
ye as useUpdatedAgo
|
|
333
364
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { isRawErrorText as u } from "./safe-error.js";
|
|
2
|
-
function
|
|
2
|
+
function x(t, e) {
|
|
3
3
|
const r = (t ?? "").trim(), n = (e ?? "").trim(), s = n && r.toLowerCase().startsWith(`${n.toLowerCase()}:`) ? r.slice(n.length + 1).trim() : r;
|
|
4
4
|
return s ? s.charAt(0).toUpperCase() + s.slice(1) : "";
|
|
5
5
|
}
|
|
6
|
-
const d = /\bHTTP \d{3}: /,
|
|
6
|
+
const d = /\bHTTP \d{3}: /, f = [
|
|
7
7
|
"message",
|
|
8
8
|
"error_description",
|
|
9
9
|
"detail",
|
|
@@ -12,7 +12,7 @@ const d = /\bHTTP \d{3}: /, h = [
|
|
|
12
12
|
"reason",
|
|
13
13
|
"description",
|
|
14
14
|
"msg"
|
|
15
|
-
], m = new RegExp(`"(?:${
|
|
15
|
+
], m = new RegExp(`"(?:${f.join("|")})"\\s*:\\s*"((?:[^"\\\\]|\\\\.)*)`);
|
|
16
16
|
function a(t) {
|
|
17
17
|
try {
|
|
18
18
|
return JSON.parse(`"${t.replace(/\\$/, "")}"`);
|
|
@@ -20,12 +20,12 @@ function a(t) {
|
|
|
20
20
|
return t;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function h(t, e = 0) {
|
|
24
24
|
if (typeof t == "string") return t;
|
|
25
25
|
if (!t || typeof t != "object" || Array.isArray(t) || e > 1) return null;
|
|
26
26
|
const r = t;
|
|
27
|
-
for (const n of
|
|
28
|
-
const s =
|
|
27
|
+
for (const n of f) {
|
|
28
|
+
const s = h(r[n], e + 1);
|
|
29
29
|
if (s != null && s.trim()) return s;
|
|
30
30
|
}
|
|
31
31
|
return null;
|
|
@@ -36,10 +36,10 @@ function p(t) {
|
|
|
36
36
|
const r = t.slice(e.index + e[0].length).trim();
|
|
37
37
|
let n = null, s = !1;
|
|
38
38
|
try {
|
|
39
|
-
n =
|
|
39
|
+
n = h(JSON.parse(r));
|
|
40
40
|
} catch {
|
|
41
41
|
const i = m.exec(r);
|
|
42
|
-
i ? (n = a(i[1]), s = r[i.index + i[0].length] !== '"') : r.startsWith('"')
|
|
42
|
+
i ? (n = a(i[1]), s = r[i.index + i[0].length] !== '"') : r.startsWith('"') ? (n = a(r.slice(1).replace(/"$/, "")), s = r.length < 2 || !r.endsWith('"')) : /^[A-Za-z][^{}[\]<>]*$/.test(r) && (n = r);
|
|
43
43
|
}
|
|
44
44
|
const o = (n ?? "").replace(/\s+/g, " ").trim(), c = s || o.length > 300 ? `${o.slice(0, 299).trimEnd()}…` : o;
|
|
45
45
|
if (o.length < 3 || /<[a-z!/]/i.test(o) || u(o)) return null;
|
|
@@ -66,9 +66,9 @@ function N(t) {
|
|
|
66
66
|
const s = n.length > 300 ? `${n.slice(0, 299).trimEnd()}…` : n, o = r[1];
|
|
67
67
|
return `${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()}: ${s}`;
|
|
68
68
|
}
|
|
69
|
-
const
|
|
69
|
+
const $ = /(?:^|: )submission failed\s+[—–-]\s/i;
|
|
70
70
|
function S(t) {
|
|
71
|
-
const e =
|
|
71
|
+
const e = $.exec(t);
|
|
72
72
|
if (!e) return null;
|
|
73
73
|
const r = t.slice(e.index + (e[0].startsWith(": ") ? 2 : 0));
|
|
74
74
|
return N(r.charAt(0).toUpperCase() + r.slice(1));
|
|
@@ -79,5 +79,5 @@ export {
|
|
|
79
79
|
A as partnerOutcome,
|
|
80
80
|
N as partnerSaid,
|
|
81
81
|
p as partnerWords,
|
|
82
|
-
|
|
82
|
+
x as withoutMoveLabel
|
|
83
83
|
};
|