@ynput/ayon-frontend-shared 0.6.5 → 0.6.7
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/DetailsPanel.es.js +3 -3
- package/dist/NewEntity.es.js +15 -15
- package/dist/ProjectTreeTable.es.js +430 -433
- package/dist/Slicer.es.js +11 -11
- package/dist/Views.es.js +213 -206
- package/dist/chunks/CodeEditor.es.js +30 -0
- package/dist/chunks/ColumnDropIndicator.styled.es.js +24 -24
- package/dist/chunks/ColumnHeaderMenuUI.es.js +2 -2
- package/dist/chunks/DeleteEntitiesContextInstance.es.js +103 -103
- package/dist/chunks/EntityPath.es.js +2 -2
- package/dist/chunks/EntityTooltip.es.js +1 -1
- package/dist/chunks/Feed.es.js +958 -931
- package/dist/chunks/JsonViewer.es.js +1 -1
- package/dist/chunks/Menu.es.js +169 -167
- package/dist/chunks/MenuItem.es.js +109 -74
- package/dist/chunks/MetaWidget.es.js +1537 -1516
- package/dist/chunks/PlayableIcon.es.js +127 -127
- package/dist/chunks/ReviewablesSelector.es.js +199 -196
- package/dist/chunks/SimpleForm.es.js +78 -75
- package/dist/chunks/SimpleTable.es.js +110 -110
- package/dist/chunks/Slicer.es.js +22 -22
- package/dist/chunks/TableSettingsFallback.es.js +1 -1
- package/dist/chunks/ThumbnailSimple.es.js +2 -2
- package/dist/chunks/VideoPlayer.es.js +1 -1
- package/dist/chunks/Watchers.es.js +19 -19
- package/dist/chunks/afterStartup.es.js +13 -0
- package/dist/chunks/getUris.es.js +926 -964
- package/dist/chunks/queryFilterToClientFilter.es.js +90 -81
- package/dist/chunks/searchTerms.es.js +1 -0
- package/dist/chunks/useHierarchySelection.es.js +2 -2
- package/dist/chunks/useLoadModule.es.js +24 -23
- package/dist/components.es.js +202 -200
- package/dist/context.es.js +521 -492
- package/dist/hooks.es.js +190 -166
- package/dist/types/ContextMenu.d.ts +1 -0
- package/dist/types/Feed.d.ts +1 -1
- package/dist/types/ProjectTreeTable.d.ts +4 -5
- package/dist/types/Slicer.d.ts +1 -1
- package/dist/types/Views.d.ts +13 -2
- package/dist/types/api.d.ts +203 -1175
- package/dist/types/components.d.ts +14 -3
- package/dist/types/context.d.ts +3 -2
- package/dist/types/hooks.d.ts +25 -1
- package/dist/types/util.d.ts +11 -1
- package/dist/util.es.js +44 -41
- package/package.json +2 -2
package/dist/chunks/Feed.es.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx as c, jsxs as x, Fragment as Ae } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { v4 as
|
|
4
|
-
import te, { clsx as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
2
|
+
import Yt, { useMemo as N, useState as L, useEffect as Y, lazy as uo, Suspense as po, useCallback as We, useRef as fe, forwardRef as mt, useId as mo, Fragment as go } from "react";
|
|
3
|
+
import { v4 as hn } from "uuid";
|
|
4
|
+
import te, { clsx as fn } from "clsx";
|
|
5
|
+
import yn from "react-markdown";
|
|
6
|
+
import vn from "remark-emoji";
|
|
7
|
+
import bn from "remark-gfm";
|
|
8
|
+
import ho from "remark-directive";
|
|
9
|
+
import fo from "remark-directive-rehype";
|
|
10
10
|
import { toast as ke } from "react-toastify";
|
|
11
|
-
import { $createListItemNode as
|
|
12
|
-
import { $getRoot as
|
|
13
|
-
import { Button as at, Dialog as
|
|
14
|
-
import { p as
|
|
11
|
+
import { $createListItemNode as yo, $createListNode as vo } from "@lexical/list";
|
|
12
|
+
import { $getRoot as bo } from "lexical";
|
|
13
|
+
import { Button as at, Dialog as wo, getFileSizeString as xo, Icon as re, theme as wn, getTextColor as It, Dropdown as ko, SaveButton as Ao, UserImage as xn, SEARCH_FILTER_ID as kn, buildFilterId as Jt, getFilterFromId as Fo, SearchFilter as Co } from "@ynput/ayon-react-components";
|
|
14
|
+
import { p as To, Y as Do, q as No, P as So, o as An, L as Io, l as Eo, V as Mo, r as Xt, s as _o, u as Po, E as $o, M as Ro, T as Lo, v as Oo, F as jo, w as Vo, x as zo, y as Uo, z as Bo, G as Go, S as Ho, H as qo, I as Wo, J as Et, n as Fn, K as Qo, A as Yo, O as Jo, Q as Xo, R as Ko, W as Zo, X as ea, Z as ta, _ as Kt, $ as na, a0 as oa, a1 as aa, a2 as ra, a3 as ia, a4 as sa, b as ca, j as la } from "./PlayableIcon.es.js";
|
|
15
15
|
import "@lexical/markdown";
|
|
16
16
|
import "@lexical/react/LexicalBlockWithAlignableContents";
|
|
17
17
|
import "@lexical/react/LexicalDecoratorBlockNode";
|
|
@@ -19,57 +19,57 @@ import "@lexical/code";
|
|
|
19
19
|
import "@lexical/rich-text";
|
|
20
20
|
import "@lexical/selection";
|
|
21
21
|
import "@lexical/utils";
|
|
22
|
-
import F, { css as
|
|
23
|
-
import
|
|
24
|
-
import { E as
|
|
25
|
-
import { a as
|
|
26
|
-
import { aQ as
|
|
27
|
-
import { bg as
|
|
22
|
+
import F, { css as Mt } from "styled-components";
|
|
23
|
+
import { C as da } from "./CodeEditor.es.js";
|
|
24
|
+
import { E as Tt } from "./EmptyPlaceholder.es.js";
|
|
25
|
+
import { a as ua, M as pa } from "./Menu.es.js";
|
|
26
|
+
import { aQ as ma, bi as Zt } from "./searchTerms.es.js";
|
|
27
|
+
import { bg as ga, bj as ha, aF as fa, df as ya, aS as va, aM as ba, a$ as wa, N as xa, bB as ka, bi as Aa, bt as Fa, bn as Ca, bh as Ta, bX as Da } from "./getUris.es.js";
|
|
28
28
|
import "primereact/confirmdialog";
|
|
29
|
-
import { union as
|
|
30
|
-
import { b as
|
|
29
|
+
import { union as Na, isEqual as Sa } from "lodash";
|
|
30
|
+
import { b as Ia, F as Ea, u as $e, a as Cn, T as Ma, C as _a } from "./ThumbnailSimple.es.js";
|
|
31
31
|
import "@module-federation/enhanced/runtime";
|
|
32
|
-
import {
|
|
32
|
+
import { o as ze, x as Pa, _ as _t, u as $a } from "./DeleteEntitiesContextInstance.es.js";
|
|
33
33
|
import "semver";
|
|
34
34
|
import "./ContextMenuContextInstance.es.js";
|
|
35
35
|
import "react-dom";
|
|
36
36
|
import "react-redux";
|
|
37
37
|
import { p as he } from "./parseFilename.es.js";
|
|
38
|
-
import
|
|
39
|
-
import { b as
|
|
38
|
+
import Pt from "axios";
|
|
39
|
+
import { b as en } from "./colorUtils.es.js";
|
|
40
40
|
import "./EntityTooltip.es.js";
|
|
41
|
-
import { isValid as rt, isToday as
|
|
41
|
+
import { isValid as rt, isToday as Ra, isSameYear as La, isSameDay as Oa, isSameWeek as ja, isSameMinute as Va, format as tn, formatISO as za, differenceInMinutes as Ua, differenceInSeconds as Ba, compareAsc as Ga } from "date-fns";
|
|
42
42
|
import "./MenuItem.es.js";
|
|
43
|
-
import { InView as
|
|
44
|
-
import { t as
|
|
45
|
-
import { u as
|
|
43
|
+
import { InView as Ha } from "react-intersection-observer";
|
|
44
|
+
import { t as qa, c as Wa } from "./queryFilterToClientFilter.es.js";
|
|
45
|
+
import { u as Qa } from "./useDateRangeFilter.es.js";
|
|
46
46
|
import "match-sorter";
|
|
47
|
-
import { c as
|
|
48
|
-
import { c as
|
|
49
|
-
import { g as
|
|
50
|
-
const
|
|
47
|
+
import { c as Ya } from "./confirmDelete.es.js";
|
|
48
|
+
import { c as Tn } from "./copyToClipboard.es.js";
|
|
49
|
+
import { g as nn } from "./realtimeUpdatesUtils.es.js";
|
|
50
|
+
const Ja = (e) => e.replace(/\r\n?/g, `
|
|
51
51
|
`).replace(/^\s*(```|~~~).*$/gm, "").replace(/!?\[([^\]]*)\]\((?:\\.|[^)\\])*\)/g, "$1").replace(/<(https?:[^>]+)>/g, "$1").replace(/<\/?[a-z][^>]*>/gi, "").replace(/[<>]/g, "").replace(/ /g, " ").replace(/^\s*#{1,6}\s+/gm, "").replace(/^\s*>\s?/gm, "").replace(/^\s*(?:[-*+]|\d+[.)])\s+(?:\[[ xX]\]\s+)?/gm, "").replace(/`([^`]*)`/g, "$1").replace(/(\*\*|__)(.+?)\1/g, "$2").replace(/~~(.+?)~~/g, "$1").replace(/(^|[^\w*\\])\*(?!\s)([^*]+?)\*(?!\w)/g, "$1$2").replace(/(^|[^\w\\])_(?!\s)([^_]+?)_(?!\w)/g, "$1$2").replace(/\\\n/g, `
|
|
52
|
-
`).replace(/\\([\\`*_{}[\]()#+\-.!~>|])/g, "$1").replace(/\s+/g, " ").trim(),
|
|
52
|
+
`).replace(/\\([\\`*_{}[\]()#+\-.!~>|])/g, "$1").replace(/\s+/g, " ").trim(), Xa = (e) => {
|
|
53
53
|
const t = (e.node?.children ?? []).filter(
|
|
54
|
-
(
|
|
54
|
+
(i) => !(i.type === "text" && !i.value?.trim())
|
|
55
55
|
);
|
|
56
56
|
if (t.length !== 1) return null;
|
|
57
57
|
const [o] = t;
|
|
58
58
|
if (o.type !== "element" || o.tagName !== "a") return null;
|
|
59
|
-
const n = o.properties?.href, a = o.children?.map((
|
|
59
|
+
const n = o.properties?.href, a = o.children?.map((i) => i.value ?? "").join("");
|
|
60
60
|
if (!n || a?.trim() !== n) return null;
|
|
61
|
-
const r =
|
|
62
|
-
return r ? /* @__PURE__ */ c(
|
|
63
|
-
},
|
|
61
|
+
const r = To(n);
|
|
62
|
+
return r ? /* @__PURE__ */ c(Do, { video: r }) : null;
|
|
63
|
+
}, Ka = (e, { onOpen: t } = {}) => {
|
|
64
64
|
const o = (e.node?.children ?? []).filter(
|
|
65
|
-
(
|
|
65
|
+
(s) => !(s.type === "text" && !s.value?.trim())
|
|
66
66
|
);
|
|
67
67
|
if (o.length !== 1) return null;
|
|
68
68
|
const [n] = o;
|
|
69
69
|
if (n.type !== "element" || n.tagName !== "img") return null;
|
|
70
|
-
const { src: a, alt: r, title:
|
|
71
|
-
return a ? /* @__PURE__ */ c(
|
|
72
|
-
},
|
|
70
|
+
const { src: a, alt: r, title: i } = n.properties ?? {};
|
|
71
|
+
return a ? /* @__PURE__ */ c(No, { src: a, alt: r, mime: i, onOpen: t ? () => t(a) : void 0 }) : null;
|
|
72
|
+
}, Za = ({
|
|
73
73
|
entities: e,
|
|
74
74
|
filter: t,
|
|
75
75
|
backendFilter: o,
|
|
@@ -77,11 +77,11 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
77
77
|
projectName: a,
|
|
78
78
|
entityType: r
|
|
79
79
|
}) => {
|
|
80
|
-
const
|
|
80
|
+
const s = N(
|
|
81
81
|
() => e.map((A) => ({ id: A.id, projectName: A.projectName, entityType: r })),
|
|
82
82
|
[e]
|
|
83
83
|
).map((A) => A.id), l = !e.length || !t || !n || !a, u = {
|
|
84
|
-
entityIds:
|
|
84
|
+
entityIds: s,
|
|
85
85
|
projectName: a,
|
|
86
86
|
referenceTypes: ["origin", "mention", "relation"],
|
|
87
87
|
activityTypes: n,
|
|
@@ -89,52 +89,52 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
89
89
|
filter: t
|
|
90
90
|
};
|
|
91
91
|
let {
|
|
92
|
-
data:
|
|
93
|
-
isLoading:
|
|
92
|
+
data: m,
|
|
93
|
+
isLoading: p,
|
|
94
94
|
isFetchingNextPage: g,
|
|
95
95
|
currentData: f,
|
|
96
96
|
fetchNextPage: h,
|
|
97
97
|
hasNextPage: b
|
|
98
|
-
} =
|
|
99
|
-
const D = N(() =>
|
|
98
|
+
} = ga(u, { skip: l });
|
|
99
|
+
const D = N(() => m?.pages ? m.pages.flatMap((A) => A.activities || []) : [], [m?.pages]), $ = N(() => f?.pages ? f.pages.flatMap((A) => A.activities || []) : [], [f?.pages]), v = async () => {
|
|
100
100
|
if (!b) {
|
|
101
101
|
console.log("No more activities to load");
|
|
102
102
|
return;
|
|
103
103
|
}
|
|
104
104
|
return console.log("loading next page..."), await h();
|
|
105
105
|
}, y = N(() => {
|
|
106
|
-
if (!
|
|
107
|
-
const A =
|
|
108
|
-
|
|
106
|
+
if (!p) return !1;
|
|
107
|
+
const A = Na(
|
|
108
|
+
$?.flatMap((C) => C.entityId ? C.entityId : [])
|
|
109
109
|
);
|
|
110
|
-
return !
|
|
111
|
-
}, [
|
|
112
|
-
return l && (
|
|
110
|
+
return !Sa(A, s);
|
|
111
|
+
}, [$, s, p]);
|
|
112
|
+
return l && (p = !0), {
|
|
113
113
|
activitiesData: D,
|
|
114
|
-
isLoadingActivities:
|
|
114
|
+
isLoadingActivities: p,
|
|
115
115
|
isLoadingNew: y,
|
|
116
116
|
isLoadingNextPage: g,
|
|
117
117
|
hasNextPage: b,
|
|
118
118
|
loadNextPage: v
|
|
119
119
|
};
|
|
120
|
-
}, nt = "__new__",
|
|
121
|
-
const { isGuest: o } = ze(), { data: n = [] } =
|
|
120
|
+
}, nt = "__new__", xc = ({ children: e, ...t }) => {
|
|
121
|
+
const { isGuest: o } = ze(), { data: n = [] } = ha({ projects: [t.projectName] }), { data: a = [] } = ma.useGetTeamsQuery(
|
|
122
122
|
{ projectName: t.projectName, showMembers: !0 },
|
|
123
123
|
{ skip: !t.projectName }
|
|
124
124
|
), r = N(
|
|
125
125
|
() => a.filter((O) => O.members?.some((ne) => ne.name === t.userName)).map((O) => O.name),
|
|
126
126
|
[a, t.userName]
|
|
127
|
-
), [
|
|
127
|
+
), [i, s] = L({
|
|
128
128
|
operator: "and",
|
|
129
129
|
conditions: []
|
|
130
|
-
}), [l, u] = L(""),
|
|
130
|
+
}), [l, u] = L(""), m = t.feedFilter ?? i, p = t.setFeedFilter ?? s, [g, f] = L(null), [h, b] = L(null), [D, { isLoading: $ }] = fa(), [v, { isLoading: y }] = ya(), [A, { isLoading: C }] = va(), S = $ || y || C, M = async (O) => await D(O).unwrap(), I = async (O) => await v(O).unwrap(), E = async (O) => await A(O).unwrap(), [P] = ba(), [H] = wa(), Q = async (O) => await P(O).unwrap(), X = async (O) => await H(O).unwrap(), q = xa(m), R = N(() => Ia(m), [m]), ue = Za({
|
|
131
131
|
entities: t.entities,
|
|
132
|
-
filter:
|
|
133
|
-
backendFilter:
|
|
132
|
+
filter: m,
|
|
133
|
+
backendFilter: R,
|
|
134
134
|
activityTypes: q,
|
|
135
135
|
projectName: t.projectName,
|
|
136
136
|
entityType: t.entityType
|
|
137
|
-
}), { data: J = {} } =
|
|
137
|
+
}), { data: J = {} } = ka(
|
|
138
138
|
{
|
|
139
139
|
suggestRequest: {
|
|
140
140
|
entityType: t.entityType,
|
|
@@ -143,9 +143,9 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
143
143
|
projectName: t.projectName
|
|
144
144
|
},
|
|
145
145
|
{ skip: !g }
|
|
146
|
-
), { data: W = [] } =
|
|
146
|
+
), { data: W = [] } = Aa({
|
|
147
147
|
projectName: t.projectName
|
|
148
|
-
}), { data: ve } =
|
|
148
|
+
}), { data: ve } = Fa(
|
|
149
149
|
{
|
|
150
150
|
projectName: t.projectName,
|
|
151
151
|
entityIds: t.entities.map((O) => O.id)
|
|
@@ -153,7 +153,7 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
153
153
|
{ skip: !t.projectName || !t.entities.length }
|
|
154
154
|
);
|
|
155
155
|
return /* @__PURE__ */ c(
|
|
156
|
-
|
|
156
|
+
Ea.Provider,
|
|
157
157
|
{
|
|
158
158
|
value: {
|
|
159
159
|
...t,
|
|
@@ -166,9 +166,9 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
166
166
|
userTeamNames: r,
|
|
167
167
|
refTooltip: h,
|
|
168
168
|
activityTypes: q,
|
|
169
|
-
feedFilter:
|
|
170
|
-
setFeedFilter:
|
|
171
|
-
backendFilter:
|
|
169
|
+
feedFilter: m,
|
|
170
|
+
setFeedFilter: p,
|
|
171
|
+
backendFilter: R,
|
|
172
172
|
searchText: l,
|
|
173
173
|
setSearchText: u,
|
|
174
174
|
isGuest: o,
|
|
@@ -185,7 +185,7 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
185
185
|
children: e
|
|
186
186
|
}
|
|
187
187
|
);
|
|
188
|
-
},
|
|
188
|
+
}, er = F.div`
|
|
189
189
|
display: grid;
|
|
190
190
|
grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
|
|
191
191
|
gap: var(--base-gap-large);
|
|
@@ -201,7 +201,7 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
201
201
|
301px + var(--padding-s) + var(--padding-s) + var(--base-gap-large)+ var(--base-gap-large)
|
|
202
202
|
);
|
|
203
203
|
overflow: auto;
|
|
204
|
-
`,
|
|
204
|
+
`, tr = F.div`
|
|
205
205
|
position: relative;
|
|
206
206
|
display: flex;
|
|
207
207
|
flex-direction: column;
|
|
@@ -247,7 +247,7 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
247
247
|
.download-icon {
|
|
248
248
|
color: var(--md-sys-color-outline);
|
|
249
249
|
}
|
|
250
|
-
`,
|
|
250
|
+
`, nr = F.footer`
|
|
251
251
|
background-color: var(--md-sys-color-surface-container-low);
|
|
252
252
|
display: flex;
|
|
253
253
|
align-items: center;
|
|
@@ -347,7 +347,7 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
347
347
|
}
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
|
-
`,
|
|
350
|
+
`, or = F.div`
|
|
351
351
|
position: relative;
|
|
352
352
|
display: flex;
|
|
353
353
|
justify-content: center;
|
|
@@ -384,7 +384,7 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
384
384
|
&:hover .image-wrapper::after {
|
|
385
385
|
opacity: 0.8;
|
|
386
386
|
}
|
|
387
|
-
`,
|
|
387
|
+
`, on = F.div`
|
|
388
388
|
position: absolute;
|
|
389
389
|
inset: 0;
|
|
390
390
|
display: flex;
|
|
@@ -423,7 +423,7 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
423
423
|
&.posterError {
|
|
424
424
|
background-color: transparent;
|
|
425
425
|
}
|
|
426
|
-
`,
|
|
426
|
+
`, ar = F.div`
|
|
427
427
|
display: none;
|
|
428
428
|
position: absolute;
|
|
429
429
|
left: 0;
|
|
@@ -432,7 +432,7 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
432
432
|
height: calc(100% - 20px);
|
|
433
433
|
width: 100%;
|
|
434
434
|
gap: 0;
|
|
435
|
-
`,
|
|
435
|
+
`, an = F(at)`
|
|
436
436
|
height: 100%;
|
|
437
437
|
width: 100%;
|
|
438
438
|
border: none;
|
|
@@ -443,7 +443,7 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
443
443
|
background: none;
|
|
444
444
|
opacity: 1;
|
|
445
445
|
}
|
|
446
|
-
`,
|
|
446
|
+
`, rr = F(So)`
|
|
447
447
|
--icon-size: 32px;
|
|
448
448
|
top: calc(50% - 10px);
|
|
449
449
|
left: 50%;
|
|
@@ -455,7 +455,7 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
455
455
|
.icon {
|
|
456
456
|
font-size: var(--icon-size);
|
|
457
457
|
}
|
|
458
|
-
`,
|
|
458
|
+
`, kc = F(wo)`
|
|
459
459
|
min-height: 90vh;
|
|
460
460
|
max-height: 90vh;
|
|
461
461
|
min-width: min(90vw, 100%);
|
|
@@ -540,7 +540,7 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
540
540
|
&:focus-visible {
|
|
541
541
|
outline: none;
|
|
542
542
|
}
|
|
543
|
-
`,
|
|
543
|
+
`, ir = F.img`
|
|
544
544
|
height: 100%;
|
|
545
545
|
width: 100%;
|
|
546
546
|
|
|
@@ -550,7 +550,7 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
550
550
|
max-width: 90vw;
|
|
551
551
|
min-width: 300px;
|
|
552
552
|
background-color: var(--md-sys-color-surface-container-lowest);
|
|
553
|
-
`,
|
|
553
|
+
`, Ac = F.div`
|
|
554
554
|
&.scrollable {
|
|
555
555
|
position: absolute;
|
|
556
556
|
inset: 56px;
|
|
@@ -562,7 +562,7 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
562
562
|
inset: 56px 0 0 0;
|
|
563
563
|
display: flex;
|
|
564
564
|
}
|
|
565
|
-
`,
|
|
565
|
+
`, rn = F.div`
|
|
566
566
|
position: relative;
|
|
567
567
|
display: flex;
|
|
568
568
|
flex: 1;
|
|
@@ -579,74 +579,74 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
579
579
|
flex: 1;
|
|
580
580
|
min-width: 0;
|
|
581
581
|
}
|
|
582
|
-
`, it = (e, t) => `/api/projects/${t}/files/${e}`,
|
|
582
|
+
`, it = (e, t) => `/api/projects/${t}/files/${e}`, sr = ({
|
|
583
583
|
file: e,
|
|
584
584
|
fullPreviews: t = ["png", "jpg", "jpeg", "gif", "svg", "webp"]
|
|
585
585
|
}) => {
|
|
586
586
|
const { id: o, projectName: n, mime: a } = e;
|
|
587
587
|
let r = it(o, n);
|
|
588
|
-
return t.some((
|
|
589
|
-
},
|
|
588
|
+
return t.some((s) => a.includes(s)) || (r += "/thumbnail"), /* @__PURE__ */ c(ir, { src: r, autoFocus: !0 });
|
|
589
|
+
}, cr = F(da)`
|
|
590
590
|
border-radius: var(--border-radius-m);
|
|
591
591
|
height: 100%;
|
|
592
592
|
overflow: auto !important;
|
|
593
|
-
`,
|
|
593
|
+
`, lr = ({ file: e }) => {
|
|
594
594
|
let t = it(e.id, e.projectName);
|
|
595
595
|
const [o, n] = L(""), [a, r] = L(null);
|
|
596
596
|
return Y(() => {
|
|
597
597
|
(async () => {
|
|
598
598
|
try {
|
|
599
|
-
const
|
|
600
|
-
if (!
|
|
601
|
-
throw new Error(`HTTP error! status: ${
|
|
602
|
-
const l = await
|
|
599
|
+
const s = await fetch(t);
|
|
600
|
+
if (!s.ok)
|
|
601
|
+
throw new Error(`HTTP error! status: ${s.status}`);
|
|
602
|
+
const l = await s.text();
|
|
603
603
|
n(l);
|
|
604
|
-
} catch (
|
|
605
|
-
r(
|
|
604
|
+
} catch (s) {
|
|
605
|
+
r(s.message);
|
|
606
606
|
}
|
|
607
607
|
})();
|
|
608
608
|
}, [e.projectName, e.id, t]), a ? /* @__PURE__ */ x("div", { children: [
|
|
609
609
|
"Error: ",
|
|
610
610
|
a
|
|
611
|
-
] }) : e.mime?.includes("markdown") ? /* @__PURE__ */ c(
|
|
612
|
-
},
|
|
611
|
+
] }) : e.mime?.includes("markdown") ? /* @__PURE__ */ c(yn, { remarkPlugins: [bn, vn], children: o }) : /* @__PURE__ */ c(cr, { value: o, language: e.extension, readOnly: !0 });
|
|
612
|
+
}, Dn = () => import("./VideoPlayer.es.js"), dr = uo(Dn), ur = ({ duration: e, width: t, height: o }) => Number.isFinite(e) && e > 0 && t > 0 && o > 0, pr = 1e4, mr = (e) => e ? `code ${e.code}${e.message ? `: ${e.message}` : ""}` : "no MediaError", gr = (e, t) => {
|
|
613
613
|
const [o, n] = L({ status: "loading" });
|
|
614
614
|
return Y(() => {
|
|
615
615
|
n({ status: "loading" });
|
|
616
|
-
let a = !1, r = null,
|
|
617
|
-
const
|
|
616
|
+
let a = !1, r = null, i;
|
|
617
|
+
const s = () => {
|
|
618
618
|
r && (r.removeEventListener("loadedmetadata", l), r.removeEventListener("error", u), r.removeAttribute("src"), r.load(), r = null);
|
|
619
619
|
};
|
|
620
620
|
function l() {
|
|
621
621
|
if (a || !r) return;
|
|
622
|
-
clearTimeout(
|
|
622
|
+
clearTimeout(i);
|
|
623
623
|
const g = {
|
|
624
624
|
duration: r.duration,
|
|
625
625
|
width: r.videoWidth,
|
|
626
626
|
height: r.videoHeight
|
|
627
627
|
};
|
|
628
|
-
if (
|
|
629
|
-
|
|
628
|
+
if (ur(g)) {
|
|
629
|
+
s(), n({ status: "ready", metadata: g });
|
|
630
630
|
return;
|
|
631
631
|
}
|
|
632
|
-
|
|
632
|
+
m(`unusable metadata ${JSON.stringify(g)}`);
|
|
633
633
|
}
|
|
634
634
|
function u() {
|
|
635
|
-
a || (clearTimeout(
|
|
635
|
+
a || (clearTimeout(i), m(mr(r?.error ?? null)));
|
|
636
636
|
}
|
|
637
|
-
const
|
|
637
|
+
const m = (g) => {
|
|
638
638
|
const f = r?.preload === "metadata";
|
|
639
|
-
if (
|
|
640
|
-
console.warn(`[VideoMime] metadata probe failed (${g}), retrying with full preload`),
|
|
639
|
+
if (s(), f) {
|
|
640
|
+
console.warn(`[VideoMime] metadata probe failed (${g}), retrying with full preload`), p("auto");
|
|
641
641
|
return;
|
|
642
642
|
}
|
|
643
643
|
console.warn(`[VideoMime] video cannot be played: ${g}`, e), n({ status: "error" });
|
|
644
644
|
};
|
|
645
|
-
function
|
|
646
|
-
r = document.createElement("video"), r.preload = g, r.muted = !0, r.playsInline = !0,
|
|
645
|
+
function p(g) {
|
|
646
|
+
r = document.createElement("video"), r.preload = g, r.muted = !0, r.playsInline = !0, i = setTimeout(() => !a && m("timed out"), pr), r.addEventListener("loadedmetadata", l), r.addEventListener("error", u), r.src = e;
|
|
647
647
|
}
|
|
648
|
-
return
|
|
649
|
-
a = !0, clearTimeout(
|
|
648
|
+
return p("metadata"), () => {
|
|
649
|
+
a = !0, clearTimeout(i), s();
|
|
650
650
|
};
|
|
651
651
|
}, [e]), o.status !== "ready" ? o : {
|
|
652
652
|
status: "ready",
|
|
@@ -659,44 +659,44 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
659
659
|
codec: t?.codec
|
|
660
660
|
}
|
|
661
661
|
};
|
|
662
|
-
},
|
|
663
|
-
const { id: t, projectName: o, name: n, mediaInfo: a } = e, r = it(t, o),
|
|
662
|
+
}, hr = ({ file: e }) => {
|
|
663
|
+
const { id: t, projectName: o, name: n, mediaInfo: a } = e, r = it(t, o), i = gr(r, a);
|
|
664
664
|
if (Y(() => {
|
|
665
|
-
|
|
666
|
-
}, []),
|
|
667
|
-
return /* @__PURE__ */ c(
|
|
665
|
+
Dn();
|
|
666
|
+
}, []), i.status === "error")
|
|
667
|
+
return /* @__PURE__ */ c(rn, { children: /* @__PURE__ */ c(Tt, { icon: "videocam_off", message: "This video cannot be played in the browser", children: /* @__PURE__ */ x("a", { href: r, target: "_blank", rel: "noopener noreferrer", children: [
|
|
668
668
|
"Download ",
|
|
669
669
|
n
|
|
670
670
|
] }) }) });
|
|
671
|
-
const
|
|
672
|
-
return
|
|
673
|
-
|
|
671
|
+
const s = /* @__PURE__ */ c(rn, { children: /* @__PURE__ */ c(Tt, { icon: "hourglass_empty", message: "Loading video..." }) });
|
|
672
|
+
return i.status === "loading" ? s : /* @__PURE__ */ c(po, { fallback: s, children: /* @__PURE__ */ c(
|
|
673
|
+
dr,
|
|
674
674
|
{
|
|
675
675
|
id: t,
|
|
676
676
|
name: n,
|
|
677
677
|
url: r,
|
|
678
678
|
projectName: o,
|
|
679
|
-
duration:
|
|
680
|
-
width:
|
|
681
|
-
height:
|
|
682
|
-
fps:
|
|
683
|
-
codec:
|
|
679
|
+
duration: i.metadata.duration,
|
|
680
|
+
width: i.metadata.width,
|
|
681
|
+
height: i.metadata.height,
|
|
682
|
+
fps: i.metadata.fps,
|
|
683
|
+
codec: i.metadata.codec
|
|
684
684
|
}
|
|
685
685
|
) });
|
|
686
|
-
},
|
|
686
|
+
}, fr = {
|
|
687
687
|
image: {
|
|
688
|
-
component:
|
|
688
|
+
component: sr,
|
|
689
689
|
mimeTypes: ["image/"],
|
|
690
690
|
fullPreviews: ["png", "jpg", "jpeg", "gif", "svg", "webp"],
|
|
691
691
|
id: "image"
|
|
692
692
|
},
|
|
693
693
|
video: {
|
|
694
|
-
component:
|
|
694
|
+
component: hr,
|
|
695
695
|
mimeTypes: ["video/"],
|
|
696
696
|
id: "video"
|
|
697
697
|
},
|
|
698
698
|
text: {
|
|
699
|
-
component:
|
|
699
|
+
component: lr,
|
|
700
700
|
mimeTypes: ["text/", "application/json", "scss", "jsx"],
|
|
701
701
|
id: "text"
|
|
702
702
|
},
|
|
@@ -706,9 +706,9 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
706
706
|
id: "pdf",
|
|
707
707
|
callback: (e) => window.open(it(e.id, e.projectName), "_blank")
|
|
708
708
|
}
|
|
709
|
-
}, gt = (e = "", t = "") => Object.values(
|
|
709
|
+
}, gt = (e = "", t = "") => Object.values(fr).some(
|
|
710
710
|
({ mimeTypes: o = [] }) => o.some((n) => (e || t)?.includes(n))
|
|
711
|
-
),
|
|
711
|
+
), yr = {
|
|
712
712
|
// special cases
|
|
713
713
|
description: ["doc"],
|
|
714
714
|
folder_zip: ["zip"],
|
|
@@ -750,44 +750,44 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
750
750
|
filter_none: ["sequence"],
|
|
751
751
|
font_download: ["font"],
|
|
752
752
|
deployed_code: ["model", ".obj", ".abc", ".stl", ".fbx", ".gltf", ".glb", ".usd"]
|
|
753
|
-
},
|
|
754
|
-
for (const [t, o] of Object.entries(
|
|
753
|
+
}, vr = (e) => {
|
|
754
|
+
for (const [t, o] of Object.entries(yr))
|
|
755
755
|
if (o.some((n) => e.includes(n)))
|
|
756
756
|
return t;
|
|
757
757
|
return "draft";
|
|
758
|
-
},
|
|
758
|
+
}, br = ({
|
|
759
759
|
name: e,
|
|
760
760
|
mime: t,
|
|
761
761
|
src: o,
|
|
762
762
|
unsavedAnnotation: n,
|
|
763
763
|
savedAnnotation: a,
|
|
764
764
|
size: r,
|
|
765
|
-
progress:
|
|
766
|
-
onRemove:
|
|
765
|
+
progress: i,
|
|
766
|
+
onRemove: s,
|
|
767
767
|
isCompact: l,
|
|
768
768
|
isDownloadable: u = !1,
|
|
769
|
-
onExpand:
|
|
770
|
-
disableExpand:
|
|
769
|
+
onExpand: m,
|
|
770
|
+
disableExpand: p,
|
|
771
771
|
onJumpTo: g,
|
|
772
772
|
className: f,
|
|
773
773
|
...h
|
|
774
774
|
}) => {
|
|
775
|
-
const b =
|
|
776
|
-
/* @__PURE__ */ c("span", { className: "size", children:
|
|
775
|
+
const b = i && i < 100, [D, $] = L(!1), [v, y] = L(!1), { feedAnnotationsEnabled: A } = ze(), { entities: C } = $e(), S = e.split("."), M = S.pop() || "", I = S.join("."), E = gt(t || "." + M), P = t?.includes("image/") || !!n, Q = !!t?.includes("video/") && !n && o ? `${o}/thumbnail` : void 0, X = /* @__PURE__ */ x(Ae, { children: [
|
|
776
|
+
/* @__PURE__ */ c("span", { className: "size", children: xo(r) }),
|
|
777
777
|
/* @__PURE__ */ c(re, { icon: "download", className: "download-icon" })
|
|
778
778
|
] }), q = N(
|
|
779
779
|
() => n ?? a,
|
|
780
780
|
[n, a]
|
|
781
|
-
),
|
|
781
|
+
), R = N(() => C.at(0), [C]), ue = N(() => {
|
|
782
782
|
if (!q?.range)
|
|
783
783
|
return [1, 1];
|
|
784
|
-
if (
|
|
784
|
+
if (!R?.attrib)
|
|
785
785
|
return q?.range ?? [1, 1];
|
|
786
|
-
const { frameStart: J } =
|
|
786
|
+
const { frameStart: J } = R?.attrib;
|
|
787
787
|
return isNaN(J) ? q?.range ?? [1, 1] : [J - 1 + q.range[0], J - 1 + q.range[1]];
|
|
788
788
|
}, [q]);
|
|
789
789
|
return /* @__PURE__ */ x(
|
|
790
|
-
|
|
790
|
+
tr,
|
|
791
791
|
{
|
|
792
792
|
className: te(f, {
|
|
793
793
|
compact: l,
|
|
@@ -798,16 +798,16 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
798
798
|
...h,
|
|
799
799
|
children: [
|
|
800
800
|
/* @__PURE__ */ x(
|
|
801
|
-
|
|
801
|
+
or,
|
|
802
802
|
{
|
|
803
803
|
className: te("content-wrapper", {
|
|
804
804
|
isPreviewable: E,
|
|
805
805
|
isUnsavedAnnotation: !!n
|
|
806
806
|
}),
|
|
807
807
|
children: [
|
|
808
|
-
/* @__PURE__ */ c(re, { icon:
|
|
808
|
+
/* @__PURE__ */ c(re, { icon: vr(t || "." + M), className: "type-icon" }),
|
|
809
809
|
P && o && /* @__PURE__ */ c(
|
|
810
|
-
|
|
810
|
+
on,
|
|
811
811
|
{
|
|
812
812
|
className: te({
|
|
813
813
|
"image-wrapper": !0,
|
|
@@ -817,7 +817,7 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
817
817
|
"img",
|
|
818
818
|
{
|
|
819
819
|
src: o,
|
|
820
|
-
onError: () =>
|
|
820
|
+
onError: () => $(!0),
|
|
821
821
|
style: {
|
|
822
822
|
display: D ? "none" : "block"
|
|
823
823
|
}
|
|
@@ -826,7 +826,7 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
826
826
|
}
|
|
827
827
|
),
|
|
828
828
|
Q && /* @__PURE__ */ x(
|
|
829
|
-
|
|
829
|
+
on,
|
|
830
830
|
{
|
|
831
831
|
className: te({
|
|
832
832
|
"image-wrapper": !0,
|
|
@@ -835,22 +835,22 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
835
835
|
}),
|
|
836
836
|
children: [
|
|
837
837
|
!v && /* @__PURE__ */ c("img", { src: Q, onError: () => y(!0) }),
|
|
838
|
-
/* @__PURE__ */ c(
|
|
838
|
+
/* @__PURE__ */ c(rr, {})
|
|
839
839
|
]
|
|
840
840
|
}
|
|
841
841
|
),
|
|
842
|
-
/* @__PURE__ */ x(
|
|
843
|
-
E && !
|
|
844
|
-
|
|
842
|
+
/* @__PURE__ */ x(ar, { className: "expand-buttons", children: [
|
|
843
|
+
E && !p && /* @__PURE__ */ c(
|
|
844
|
+
an,
|
|
845
845
|
{
|
|
846
846
|
"data-tooltip": "Open preview",
|
|
847
847
|
icon: "open_in_full",
|
|
848
848
|
variant: "nav",
|
|
849
|
-
onClick:
|
|
849
|
+
onClick: m
|
|
850
850
|
}
|
|
851
851
|
),
|
|
852
852
|
(n || A && a) && /* @__PURE__ */ c(
|
|
853
|
-
|
|
853
|
+
an,
|
|
854
854
|
{
|
|
855
855
|
"data-tooltip": "Jump to annotation",
|
|
856
856
|
icon: "play_circle",
|
|
@@ -863,15 +863,15 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
863
863
|
}
|
|
864
864
|
),
|
|
865
865
|
/* @__PURE__ */ x(
|
|
866
|
-
|
|
866
|
+
nr,
|
|
867
867
|
{
|
|
868
868
|
className: te({
|
|
869
869
|
inProgress: b,
|
|
870
|
-
isPreviewable: E && !
|
|
870
|
+
isPreviewable: E && !p,
|
|
871
871
|
isDownloadable: u
|
|
872
872
|
}),
|
|
873
873
|
children: [
|
|
874
|
-
/* @__PURE__ */ c("span", { className: "progress", style: { right: `${100 -
|
|
874
|
+
/* @__PURE__ */ c("span", { className: "progress", style: { right: `${100 - i}%` } }),
|
|
875
875
|
/* @__PURE__ */ c("div", { className: "name-wrapper", children: q ? /* @__PURE__ */ x("span", { className: "name", children: [
|
|
876
876
|
/* @__PURE__ */ c(re, { icon: "draw" }),
|
|
877
877
|
ue[0],
|
|
@@ -883,37 +883,37 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
883
883
|
M
|
|
884
884
|
] })
|
|
885
885
|
] }) }),
|
|
886
|
-
u && (
|
|
886
|
+
u && (s ? /* @__PURE__ */ c("div", { className: "download", children: X }) : /* @__PURE__ */ c("a", { href: o, target: "_blank", rel: "noopener noreferrer", className: "download", children: X }))
|
|
887
887
|
]
|
|
888
888
|
}
|
|
889
889
|
),
|
|
890
|
-
|
|
890
|
+
s && /* @__PURE__ */ c(at, { className: "remove", onClick: s, icon: "close" })
|
|
891
891
|
]
|
|
892
892
|
}
|
|
893
893
|
);
|
|
894
|
-
},
|
|
894
|
+
}, Nn = ({
|
|
895
895
|
files: e = [],
|
|
896
896
|
activityId: t,
|
|
897
897
|
isCompact: o,
|
|
898
898
|
isEditing: n,
|
|
899
899
|
onRemove: a,
|
|
900
900
|
projectName: r,
|
|
901
|
-
isDownloadable:
|
|
902
|
-
onExpand:
|
|
901
|
+
isDownloadable: i,
|
|
902
|
+
onExpand: s,
|
|
903
903
|
onAnnotationClick: l,
|
|
904
904
|
pt: u,
|
|
905
|
-
...
|
|
905
|
+
...m
|
|
906
906
|
}) => {
|
|
907
907
|
if (!e.length) return null;
|
|
908
|
-
const
|
|
908
|
+
const p = We(
|
|
909
909
|
(g) => {
|
|
910
910
|
const f = e.filter((b) => gt(b.mime, b.ext)), h = f.findIndex((b) => b.id === e[g].id);
|
|
911
|
-
|
|
911
|
+
s?.({ files: f, index: h, activityId: t || "" });
|
|
912
912
|
},
|
|
913
|
-
[
|
|
913
|
+
[s]
|
|
914
914
|
);
|
|
915
|
-
return /* @__PURE__ */ c(
|
|
916
|
-
|
|
915
|
+
return /* @__PURE__ */ c(er, { className: te({ compact: o }), ...m, children: e.map((g, f) => /* @__PURE__ */ c(
|
|
916
|
+
br,
|
|
917
917
|
{
|
|
918
918
|
id: g.id || g.name,
|
|
919
919
|
name: g.name,
|
|
@@ -925,89 +925,89 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
925
925
|
progress: g.progress,
|
|
926
926
|
onRemove: a ? () => a(g.id, g.name, !!g.unsavedAnnotation) : void 0,
|
|
927
927
|
isCompact: o,
|
|
928
|
-
isDownloadable:
|
|
929
|
-
onExpand: () =>
|
|
928
|
+
isDownloadable: i,
|
|
929
|
+
onExpand: () => p(f),
|
|
930
930
|
onJumpTo: () => l?.(g),
|
|
931
931
|
disableExpand: n,
|
|
932
932
|
...u?.file
|
|
933
933
|
},
|
|
934
934
|
g.id || g.name
|
|
935
935
|
)) });
|
|
936
|
-
},
|
|
936
|
+
}, wr = (e) => {
|
|
937
937
|
const t = /!\[.*?\]\((.*?)\)/g, o = e.match(t);
|
|
938
938
|
let n = e;
|
|
939
939
|
return o && o.forEach((a) => {
|
|
940
940
|
if (!a.includes("http")) return;
|
|
941
|
-
const r = a.match(/\(([^)]+)\)/)[1],
|
|
942
|
-
n = e.replace(r,
|
|
941
|
+
const r = a.match(/\(([^)]+)\)/)[1], i = r.split("?")[0];
|
|
942
|
+
n = e.replace(r, i);
|
|
943
943
|
}), n;
|
|
944
|
-
},
|
|
944
|
+
}, xr = new AbortController(), kr = Pt.CancelToken, Ar = kr.source(), Qe = (e, t, o) => new Promise((n, a) => {
|
|
945
945
|
new FormData().append("image", e);
|
|
946
|
-
const
|
|
947
|
-
signal:
|
|
948
|
-
cancelToken:
|
|
949
|
-
onUploadProgress: (
|
|
946
|
+
const i = {
|
|
947
|
+
signal: xr.signal,
|
|
948
|
+
cancelToken: Ar.token,
|
|
949
|
+
onUploadProgress: (s) => o && o(s, e),
|
|
950
950
|
headers: {
|
|
951
951
|
"Content-Type": e.type,
|
|
952
952
|
"x-file-name": he(e.name)
|
|
953
953
|
}
|
|
954
954
|
};
|
|
955
|
-
|
|
956
|
-
n({ file: e, data:
|
|
957
|
-
}).catch((
|
|
958
|
-
console.error(
|
|
955
|
+
Pt.post(`/api/projects/${t}/files`, e, i).then((s) => {
|
|
956
|
+
n({ file: e, data: s.data });
|
|
957
|
+
}).catch((s) => {
|
|
958
|
+
console.error(s), a({ message: "Upload failed: " + s.response.data.detail });
|
|
959
959
|
});
|
|
960
|
-
}),
|
|
960
|
+
}), Fr = (e, t, o, n, a) => {
|
|
961
961
|
e.preventDefault(), e.stopPropagation();
|
|
962
962
|
let r = e.dataTransfer.files;
|
|
963
963
|
if (r?.length) {
|
|
964
964
|
if (r.length === 0) return;
|
|
965
|
-
for (const
|
|
966
|
-
Qe(
|
|
967
|
-
(
|
|
968
|
-
(
|
|
969
|
-
a && a(
|
|
965
|
+
for (const i of r)
|
|
966
|
+
Qe(i, t, o).then(
|
|
967
|
+
(s) => n(s),
|
|
968
|
+
(s) => {
|
|
969
|
+
a && a(i), ke.error(s.message), console.warn(s);
|
|
970
970
|
}
|
|
971
971
|
);
|
|
972
972
|
}
|
|
973
|
-
},
|
|
973
|
+
}, Cr = (e, t, o) => (t || console.warn("filterEntityAnnotations: entityId is empty"), Object.values(e).forEach((n) => {
|
|
974
974
|
n.versionId || console.warn("filterEntityAnnotations: annotation.versionId is empty", n);
|
|
975
975
|
}), Object.values(e).filter(
|
|
976
976
|
(n) => n.versionId === t && !o.some((a) => a.name === he(n.name))
|
|
977
977
|
).map((n) => ({
|
|
978
978
|
...n,
|
|
979
979
|
unsavedAnnotation: n
|
|
980
|
-
}))),
|
|
981
|
-
const { editingId: o, setEditingId: n, annotations: a, removeAnnotation: r } =
|
|
980
|
+
}))), Tr = ({ entityId: e, filesUploading: t }) => {
|
|
981
|
+
const { editingId: o, setEditingId: n, annotations: a, removeAnnotation: r } = $e(), { onGoToFrame: i } = ze(), s = Cr(a || [], e, t);
|
|
982
982
|
return Y(() => {
|
|
983
|
-
|
|
984
|
-
}, [
|
|
985
|
-
annotations:
|
|
983
|
+
s.length > 0 && !o && n(nt);
|
|
984
|
+
}, [s]), {
|
|
985
|
+
annotations: s,
|
|
986
986
|
goToAnnotation: (u) => {
|
|
987
|
-
const
|
|
988
|
-
|
|
987
|
+
const m = u.range[0];
|
|
988
|
+
i?.(m);
|
|
989
989
|
},
|
|
990
990
|
removeAnnotation: r
|
|
991
991
|
};
|
|
992
|
-
},
|
|
992
|
+
}, Sn = (e) => N(() => {
|
|
993
993
|
if (!e)
|
|
994
994
|
return { primary: void 0, secondary: void 0 };
|
|
995
|
-
const t = getComputedStyle(document.documentElement), o = t.getPropertyValue("--md-sys-color-surface-container").trim(), n = t.getPropertyValue("--md-sys-color-surface-container-high").trim(), a = o || e, r = n || e,
|
|
995
|
+
const t = getComputedStyle(document.documentElement), o = t.getPropertyValue("--md-sys-color-surface-container").trim(), n = t.getPropertyValue("--md-sys-color-surface-container-high").trim(), a = o || e, r = n || e, i = en(e, a, 0.1) || e, s = en(e, r, 0.2) || e;
|
|
996
996
|
return {
|
|
997
|
-
primary:
|
|
998
|
-
secondary:
|
|
997
|
+
primary: i,
|
|
998
|
+
secondary: s
|
|
999
999
|
};
|
|
1000
|
-
}, [e]),
|
|
1001
|
-
const { exportAnnotationComposite: r } =
|
|
1000
|
+
}, [e]), Dr = ({ projectName: e, onSuccess: t, onProgress: o, onStart: n, onError: a }) => {
|
|
1001
|
+
const { exportAnnotationComposite: r } = $e(), i = async (l) => {
|
|
1002
1002
|
const u = await r?.(l.id);
|
|
1003
1003
|
if (!u)
|
|
1004
1004
|
throw new Error(`Exporting composite image for annotation ${l.id} failed`);
|
|
1005
|
-
const
|
|
1005
|
+
const m = new File([u], l.name, {
|
|
1006
1006
|
type: "image/png"
|
|
1007
|
-
}),
|
|
1007
|
+
}), p = await fetch(l.annotationData).then(($) => $.blob()), g = new File([p], `annotation-${l.name}`, {
|
|
1008
1008
|
type: "image/png"
|
|
1009
1009
|
}), f = await Promise.all([
|
|
1010
|
-
Qe(
|
|
1010
|
+
Qe(m, e, o),
|
|
1011
1011
|
Qe(g, e, () => {
|
|
1012
1012
|
})
|
|
1013
1013
|
]), [h, b] = f, D = [t(h), t(b, !0)];
|
|
@@ -1018,15 +1018,15 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
1018
1018
|
const u = l.map(async (f) => {
|
|
1019
1019
|
n?.(f);
|
|
1020
1020
|
try {
|
|
1021
|
-
return await
|
|
1021
|
+
return await i(f);
|
|
1022
1022
|
} catch (h) {
|
|
1023
1023
|
throw a?.(f), h;
|
|
1024
1024
|
}
|
|
1025
|
-
}),
|
|
1026
|
-
return
|
|
1025
|
+
}), m = await Promise.allSettled(u), p = [], g = [];
|
|
1026
|
+
return m.forEach((f) => {
|
|
1027
1027
|
if (f.status === "fulfilled") {
|
|
1028
1028
|
const { uploads: h, annotation: b, files: D } = f.value;
|
|
1029
|
-
|
|
1029
|
+
p.push(...D), g.push({
|
|
1030
1030
|
range: b.range,
|
|
1031
1031
|
id: b.id,
|
|
1032
1032
|
composite: h[0].data.id,
|
|
@@ -1034,56 +1034,56 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
1034
1034
|
});
|
|
1035
1035
|
} else
|
|
1036
1036
|
ke.error("Upload failed: " + f.reason.message);
|
|
1037
|
-
}), { files:
|
|
1037
|
+
}), { files: p, metadata: g };
|
|
1038
1038
|
} catch (u) {
|
|
1039
1039
|
return ke.error("Upload failed: " + u.message), { files: [], metadata: [] };
|
|
1040
1040
|
}
|
|
1041
1041
|
};
|
|
1042
|
-
},
|
|
1042
|
+
}, In = "ayon-comment-draft/", En = 720 * 60 * 60 * 1e3, Nr = (e) => !e.text.trim() && !e.files.length && !e.uploadedAnnotations.length, Mn = (e) => {
|
|
1043
1043
|
try {
|
|
1044
1044
|
const t = localStorage.getItem(e);
|
|
1045
1045
|
return t ? JSON.parse(t) : null;
|
|
1046
1046
|
} catch {
|
|
1047
1047
|
return null;
|
|
1048
1048
|
}
|
|
1049
|
-
},
|
|
1049
|
+
}, Sr = (e, t) => {
|
|
1050
1050
|
try {
|
|
1051
|
-
|
|
1051
|
+
Nr(t) ? localStorage.removeItem(e) : localStorage.setItem(e, JSON.stringify({ ...t, savedAt: Date.now() }));
|
|
1052
1052
|
} catch (o) {
|
|
1053
1053
|
console.warn("Could not save comment draft", o);
|
|
1054
1054
|
}
|
|
1055
|
-
},
|
|
1055
|
+
}, Ir = () => {
|
|
1056
1056
|
try {
|
|
1057
1057
|
const e = Date.now();
|
|
1058
1058
|
for (const t of Object.keys(localStorage)) {
|
|
1059
|
-
if (!t.startsWith(
|
|
1060
|
-
const o =
|
|
1061
|
-
(!o || e - o.savedAt >
|
|
1059
|
+
if (!t.startsWith(In)) continue;
|
|
1060
|
+
const o = Mn(t);
|
|
1061
|
+
(!o || e - o.savedAt > En) && localStorage.removeItem(t);
|
|
1062
1062
|
}
|
|
1063
1063
|
} catch {
|
|
1064
1064
|
}
|
|
1065
|
-
},
|
|
1065
|
+
}, Er = (e, t, o) => e && t && o.length ? `${In}${e}/${t}/${[...o].sort().join(",")}` : null, Mr = ({ draftKey: e, draft: t, paused: o, restore: n }) => {
|
|
1066
1066
|
const a = fe(null), r = fe(!1);
|
|
1067
1067
|
Y(() => {
|
|
1068
1068
|
if (!e || o) return;
|
|
1069
|
-
const
|
|
1070
|
-
if (a.current = e,
|
|
1071
|
-
|
|
1072
|
-
const
|
|
1073
|
-
|
|
1074
|
-
text:
|
|
1075
|
-
files:
|
|
1076
|
-
uploadedAnnotations:
|
|
1077
|
-
category:
|
|
1078
|
-
})) :
|
|
1069
|
+
const i = a.current;
|
|
1070
|
+
if (a.current = e, i === e) return;
|
|
1071
|
+
i || Ir();
|
|
1072
|
+
const s = Mn(e);
|
|
1073
|
+
s && Date.now() - s.savedAt <= En ? (r.current = !0, n({
|
|
1074
|
+
text: s.text ?? "",
|
|
1075
|
+
files: s.files ?? [],
|
|
1076
|
+
uploadedAnnotations: s.uploadedAnnotations ?? [],
|
|
1077
|
+
category: s.category ?? null
|
|
1078
|
+
})) : i && (r.current = !0, n({ text: "", files: [], uploadedAnnotations: [], category: t.category }));
|
|
1079
1079
|
}, [e, o]), Y(() => {
|
|
1080
1080
|
if (r.current) {
|
|
1081
1081
|
r.current = !1;
|
|
1082
1082
|
return;
|
|
1083
1083
|
}
|
|
1084
|
-
!e || o ||
|
|
1084
|
+
!e || o || Sr(e, t);
|
|
1085
1085
|
}, [e, o, t.text, t.files, t.uploadedAnnotations, t.category]);
|
|
1086
|
-
},
|
|
1086
|
+
}, _r = "Category", Pr = F.div`
|
|
1087
1087
|
display: flex;
|
|
1088
1088
|
padding: 2px 4px;
|
|
1089
1089
|
justify-content: center;
|
|
@@ -1109,7 +1109,7 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
1109
1109
|
|
|
1110
1110
|
&.compact {
|
|
1111
1111
|
padding: 1px 2px;
|
|
1112
|
-
${
|
|
1112
|
+
${wn.labelMedium}
|
|
1113
1113
|
}
|
|
1114
1114
|
|
|
1115
1115
|
&.editing {
|
|
@@ -1132,13 +1132,13 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
1132
1132
|
color: var(--md-sys-color-tertiary);
|
|
1133
1133
|
}
|
|
1134
1134
|
}
|
|
1135
|
-
`, ot =
|
|
1136
|
-
({ value: e, color: t, isCompact: o, isEditing: n, isPower: a, isDisabled: r, style:
|
|
1137
|
-
|
|
1135
|
+
`, ot = mt(
|
|
1136
|
+
({ value: e, color: t, isCompact: o, isEditing: n, isPower: a, isDisabled: r, style: i, className: s, ...l }, u) => /* @__PURE__ */ c(
|
|
1137
|
+
Pr,
|
|
1138
1138
|
{
|
|
1139
1139
|
...l,
|
|
1140
1140
|
ref: u,
|
|
1141
|
-
className: te(
|
|
1141
|
+
className: te(s, {
|
|
1142
1142
|
none: !e,
|
|
1143
1143
|
compact: o,
|
|
1144
1144
|
editing: n,
|
|
@@ -1146,17 +1146,17 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
1146
1146
|
disabled: r
|
|
1147
1147
|
}),
|
|
1148
1148
|
style: {
|
|
1149
|
-
...
|
|
1149
|
+
...i,
|
|
1150
1150
|
...t && {
|
|
1151
1151
|
backgroundColor: t,
|
|
1152
1152
|
borderColor: t,
|
|
1153
|
-
color:
|
|
1153
|
+
color: It(t)
|
|
1154
1154
|
}
|
|
1155
1155
|
},
|
|
1156
|
-
children: e ||
|
|
1156
|
+
children: e || _r
|
|
1157
1157
|
}
|
|
1158
1158
|
)
|
|
1159
|
-
),
|
|
1159
|
+
), $r = F.span`
|
|
1160
1160
|
display: flex;
|
|
1161
1161
|
justify-content: flex-start;
|
|
1162
1162
|
align-items: center;
|
|
@@ -1165,17 +1165,17 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
1165
1165
|
white-space: nowrap;
|
|
1166
1166
|
|
|
1167
1167
|
[icon='crop_square'] {
|
|
1168
|
-
font-variation-settings: 'FILL' 1
|
|
1168
|
+
font-variation-settings: 'FILL' 1;
|
|
1169
1169
|
font-size: 16px;
|
|
1170
1170
|
}
|
|
1171
1171
|
|
|
1172
1172
|
&.selected {
|
|
1173
1173
|
[icon='crop_square'] {
|
|
1174
|
-
font-variation-settings: 'FILL' 0
|
|
1174
|
+
font-variation-settings: 'FILL' 0;
|
|
1175
1175
|
color: var(--md-sys-color-on-surface) !important;
|
|
1176
1176
|
}
|
|
1177
1177
|
}
|
|
1178
|
-
`,
|
|
1178
|
+
`, Rr = mt(
|
|
1179
1179
|
({
|
|
1180
1180
|
label: e,
|
|
1181
1181
|
color: t,
|
|
@@ -1183,23 +1183,23 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
1183
1183
|
isSelected: n,
|
|
1184
1184
|
startContent: a,
|
|
1185
1185
|
endContent: r,
|
|
1186
|
-
isClear:
|
|
1187
|
-
style:
|
|
1186
|
+
isClear: i,
|
|
1187
|
+
style: s,
|
|
1188
1188
|
className: l,
|
|
1189
1189
|
...u
|
|
1190
|
-
},
|
|
1191
|
-
|
|
1190
|
+
}, m) => /* @__PURE__ */ x(
|
|
1191
|
+
$r,
|
|
1192
1192
|
{
|
|
1193
1193
|
...u,
|
|
1194
1194
|
className: te(l, { selected: n }),
|
|
1195
|
-
style: { backgroundColor: n && t ? t : "", color:
|
|
1196
|
-
ref:
|
|
1195
|
+
style: { backgroundColor: n && t ? t : "", color: It(n && t ? t : ""), ...s },
|
|
1196
|
+
ref: m,
|
|
1197
1197
|
children: [
|
|
1198
1198
|
a,
|
|
1199
1199
|
/* @__PURE__ */ c(
|
|
1200
1200
|
re,
|
|
1201
1201
|
{
|
|
1202
|
-
icon: o || (
|
|
1202
|
+
icon: o || (i ? "clear" : "crop_square"),
|
|
1203
1203
|
style: { color: t || "" }
|
|
1204
1204
|
}
|
|
1205
1205
|
),
|
|
@@ -1208,7 +1208,7 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
1208
1208
|
]
|
|
1209
1209
|
}
|
|
1210
1210
|
)
|
|
1211
|
-
),
|
|
1211
|
+
), Lr = "1.3.0", Or = F(ko)`
|
|
1212
1212
|
button {
|
|
1213
1213
|
/* remove all styles and just use a wrapper */
|
|
1214
1214
|
background-color: unset !important;
|
|
@@ -1219,19 +1219,19 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
1219
1219
|
width: unset !important;
|
|
1220
1220
|
color: var(--md-sys-color-on-surface) !important;
|
|
1221
1221
|
}
|
|
1222
|
-
`,
|
|
1222
|
+
`, jr = ({
|
|
1223
1223
|
value: e,
|
|
1224
1224
|
categories: t,
|
|
1225
1225
|
readonly: o,
|
|
1226
1226
|
isHidden: n,
|
|
1227
1227
|
isCompact: a,
|
|
1228
1228
|
hasPowerpack: r,
|
|
1229
|
-
onPowerFeature:
|
|
1230
|
-
onChange:
|
|
1229
|
+
onPowerFeature: i,
|
|
1230
|
+
onChange: s,
|
|
1231
1231
|
...l
|
|
1232
1232
|
}) => {
|
|
1233
1233
|
if (n) return null;
|
|
1234
|
-
const u = t.find((g) => g.name === e), { color:
|
|
1234
|
+
const u = t.find((g) => g.name === e), { color: m } = u || {};
|
|
1235
1235
|
if (!r)
|
|
1236
1236
|
return /* @__PURE__ */ c(
|
|
1237
1237
|
ot,
|
|
@@ -1240,26 +1240,26 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
1240
1240
|
isPower: !0,
|
|
1241
1241
|
isDisabled: !0,
|
|
1242
1242
|
style: l.style,
|
|
1243
|
-
onClick: () =>
|
|
1243
|
+
onClick: () => i?.("commentCategories"),
|
|
1244
1244
|
"data-tooltip": "Comment categories is a Powerpack feature"
|
|
1245
1245
|
}
|
|
1246
1246
|
);
|
|
1247
1247
|
if (o)
|
|
1248
|
-
return /* @__PURE__ */ c(ot, { value: e, color:
|
|
1248
|
+
return /* @__PURE__ */ c(ot, { value: e, color: m, isCompact: a, style: l.style });
|
|
1249
1249
|
if (!t.length)
|
|
1250
1250
|
return /* @__PURE__ */ c(
|
|
1251
1251
|
ot,
|
|
1252
1252
|
{
|
|
1253
1253
|
value: e,
|
|
1254
|
-
color:
|
|
1254
|
+
color: m,
|
|
1255
1255
|
isCompact: a,
|
|
1256
1256
|
style: l.style,
|
|
1257
1257
|
onClick: () => ke.warning(
|
|
1258
|
-
`No categories found. Ensure they are set in the Powerpack settings and the version is at least ${
|
|
1258
|
+
`No categories found. Ensure they are set in the Powerpack settings and the version is at least ${Lr}.`
|
|
1259
1259
|
)
|
|
1260
1260
|
}
|
|
1261
1261
|
);
|
|
1262
|
-
const
|
|
1262
|
+
const p = [
|
|
1263
1263
|
...e ? [{ label: "No category", value: null, color: "inherit", icon: "clear" }] : [],
|
|
1264
1264
|
...t.map((g) => ({
|
|
1265
1265
|
label: g.name,
|
|
@@ -1269,14 +1269,14 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
1269
1269
|
}))
|
|
1270
1270
|
];
|
|
1271
1271
|
return /* @__PURE__ */ c(
|
|
1272
|
-
|
|
1272
|
+
Or,
|
|
1273
1273
|
{
|
|
1274
|
-
options:
|
|
1274
|
+
options: p,
|
|
1275
1275
|
value: e ? [e] : [],
|
|
1276
|
-
onChange: (g) =>
|
|
1277
|
-
valueTemplate: () => /* @__PURE__ */ c(ot, { value: e, color:
|
|
1276
|
+
onChange: (g) => s(g[0]),
|
|
1277
|
+
valueTemplate: () => /* @__PURE__ */ c(ot, { value: e, color: m, isCompact: a, isEditing: !0 }),
|
|
1278
1278
|
itemTemplate: (g, f, h, b) => /* @__PURE__ */ c(
|
|
1279
|
-
|
|
1279
|
+
Rr,
|
|
1280
1280
|
{
|
|
1281
1281
|
label: g.label,
|
|
1282
1282
|
color: g.color,
|
|
@@ -1288,7 +1288,7 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
1288
1288
|
...l
|
|
1289
1289
|
}
|
|
1290
1290
|
);
|
|
1291
|
-
},
|
|
1291
|
+
}, Vr = (e, { isGuest: t, isAdmin: o }) => !!(t || !e.length && !o), _n = 1e4, zr = F.span`
|
|
1292
1292
|
margin-left: auto;
|
|
1293
1293
|
color: var(--md-sys-color-outline);
|
|
1294
1294
|
user-select: none;
|
|
@@ -1301,41 +1301,41 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
1301
1301
|
min-width: 0;
|
|
1302
1302
|
max-width: fit-content;
|
|
1303
1303
|
|
|
1304
|
-
${
|
|
1304
|
+
${wn.bodySmall}
|
|
1305
1305
|
`, st = ({ date: e, isExact: t, exactTooltip: o = !1, ...n }) => {
|
|
1306
|
-
const [a, r] = L(!0), [
|
|
1306
|
+
const [a, r] = L(!0), [i, s] = L(/* @__PURE__ */ new Date());
|
|
1307
1307
|
if (!e) return null;
|
|
1308
1308
|
const l = new Date(e);
|
|
1309
1309
|
if (!rt(l)) return null;
|
|
1310
1310
|
Y(() => {
|
|
1311
1311
|
const A = setInterval(
|
|
1312
|
-
() =>
|
|
1313
|
-
|
|
1312
|
+
() => s(/* @__PURE__ */ new Date()),
|
|
1313
|
+
_n
|
|
1314
1314
|
);
|
|
1315
1315
|
return () => clearInterval(A);
|
|
1316
1316
|
}, []);
|
|
1317
|
-
const u =
|
|
1318
|
-
let v = a && !t ? D :
|
|
1319
|
-
|
|
1317
|
+
const u = Ra(l), m = La(l, i), p = Oa(l, new Date(i.setDate(i.getDate() - 1))), g = ja(l, i), f = Va(l, i), h = p ? "" : m ? g ? "E" : "MMM d" : "MMM d yyyy", b = "h:mm a", D = N(() => An(l), [l]), $ = N(() => u ? tn(l, `${h}, ${b}`) : tn(l, `EEEE, dd MMM yyyy ${b}`), [l, u]);
|
|
1318
|
+
let v = a && !t ? D : $;
|
|
1319
|
+
p && a && !t && (v = `Yesterday${v}`), f && (v = "Just now");
|
|
1320
1320
|
const y = () => {
|
|
1321
1321
|
r(!a);
|
|
1322
1322
|
};
|
|
1323
1323
|
return /* @__PURE__ */ c(
|
|
1324
|
-
|
|
1324
|
+
zr,
|
|
1325
1325
|
{
|
|
1326
1326
|
className: te("date"),
|
|
1327
1327
|
...n,
|
|
1328
1328
|
onClick: y,
|
|
1329
1329
|
onMouseOver: () => !o && r(!1),
|
|
1330
1330
|
onMouseOut: () => !o && r(!0),
|
|
1331
|
-
"data-tooltip": o ?
|
|
1331
|
+
"data-tooltip": o ? $ : null,
|
|
1332
1332
|
"data-tooltip-delay": 0,
|
|
1333
1333
|
children: v
|
|
1334
1334
|
}
|
|
1335
1335
|
);
|
|
1336
1336
|
};
|
|
1337
1337
|
var Ce = /* @__PURE__ */ ((e) => (e.APPROVE = "approve", e.REQUEST_CHANGES = "request_changes", e))(Ce || {});
|
|
1338
|
-
const
|
|
1338
|
+
const Pn = (e) => {
|
|
1339
1339
|
switch (e) {
|
|
1340
1340
|
case Ce.REQUEST_CHANGES:
|
|
1341
1341
|
return "requested changes";
|
|
@@ -1343,7 +1343,7 @@ const _n = (e) => {
|
|
|
1343
1343
|
default:
|
|
1344
1344
|
return "approved this";
|
|
1345
1345
|
}
|
|
1346
|
-
},
|
|
1346
|
+
}, Ur = (e, t) => {
|
|
1347
1347
|
switch (e) {
|
|
1348
1348
|
case Ce.REQUEST_CHANGES:
|
|
1349
1349
|
return "Requested changes on " + t;
|
|
@@ -1351,7 +1351,7 @@ const _n = (e) => {
|
|
|
1351
1351
|
default:
|
|
1352
1352
|
return "Approved " + t;
|
|
1353
1353
|
}
|
|
1354
|
-
},
|
|
1354
|
+
}, $n = (e) => {
|
|
1355
1355
|
switch (e) {
|
|
1356
1356
|
case Ce.REQUEST_CHANGES:
|
|
1357
1357
|
return "refresh";
|
|
@@ -1359,33 +1359,33 @@ const _n = (e) => {
|
|
|
1359
1359
|
default:
|
|
1360
1360
|
return "task_alt";
|
|
1361
1361
|
}
|
|
1362
|
-
},
|
|
1362
|
+
}, Br = ({ lastOwnVersionReview: e }) => {
|
|
1363
1363
|
const [t, o] = L(/* @__PURE__ */ new Date());
|
|
1364
1364
|
Y(() => {
|
|
1365
|
-
const r = setInterval(() => o(/* @__PURE__ */ new Date()),
|
|
1365
|
+
const r = setInterval(() => o(/* @__PURE__ */ new Date()), _n);
|
|
1366
1366
|
return () => clearInterval(r);
|
|
1367
1367
|
}, []);
|
|
1368
|
-
const n = N(() => e?.activityData?.feedback, [e]), a = N(() => e?.createdAt ?
|
|
1369
|
-
return /* @__PURE__ */ x(
|
|
1370
|
-
/* @__PURE__ */ c(re, { icon:
|
|
1368
|
+
const n = N(() => e?.activityData?.feedback, [e]), a = N(() => e?.createdAt ? An(new Date(e?.createdAt)).toLowerCase() : "", [e?.createdAt, t]);
|
|
1369
|
+
return /* @__PURE__ */ x(Io, { className: fn(n), children: [
|
|
1370
|
+
/* @__PURE__ */ c(re, { icon: $n(n) }),
|
|
1371
1371
|
"You last ",
|
|
1372
|
-
|
|
1372
|
+
Pn(n),
|
|
1373
1373
|
" ",
|
|
1374
1374
|
a,
|
|
1375
1375
|
" ",
|
|
1376
1376
|
a === "just now" ? "" : "ago"
|
|
1377
1377
|
] });
|
|
1378
|
-
},
|
|
1378
|
+
}, sn = (e) => {
|
|
1379
1379
|
const t = /^(\d+)(?:\s*-\s*(\d+))?$/.exec(e.trim());
|
|
1380
1380
|
if (!t) return null;
|
|
1381
1381
|
const o = Number(t[1]), n = t[2] ? Number(t[2]) : o;
|
|
1382
1382
|
return Number.isSafeInteger(o) && o > 0 && Number.isSafeInteger(n) && n >= o ? { startFrame: o, endFrame: n } : null;
|
|
1383
|
-
},
|
|
1384
|
-
const { data: r } = await
|
|
1383
|
+
}, cn = async (e, t, o, n, a) => {
|
|
1384
|
+
const { data: r } = await Pt.get(`/api/projects/${e}/files/${t}`, {
|
|
1385
1385
|
responseType: "blob"
|
|
1386
|
-
}),
|
|
1387
|
-
return Qe(
|
|
1388
|
-
},
|
|
1386
|
+
}), i = new File([r], o, { type: n || r.type });
|
|
1387
|
+
return Qe(i, e, a);
|
|
1388
|
+
}, ln = (e, t) => `/api/projects/${e}/files/${t}`, dn = (e, t) => !!e && Et(t).has(e), Gr = [
|
|
1389
1389
|
{ trigger: "@", icon: "person", tooltip: "Mention user" },
|
|
1390
1390
|
{ trigger: "@@", icon: "layers", tooltip: "Mention version" },
|
|
1391
1391
|
{ trigger: "@@@", icon: "check_circle", tooltip: "Mention task" }
|
|
@@ -1396,18 +1396,18 @@ const _n = (e) => {
|
|
|
1396
1396
|
data: n = {},
|
|
1397
1397
|
activityId: a,
|
|
1398
1398
|
versionReview: r,
|
|
1399
|
-
lastOwnVersionReview:
|
|
1400
|
-
onSubmit:
|
|
1399
|
+
lastOwnVersionReview: i,
|
|
1400
|
+
onSubmit: s,
|
|
1401
1401
|
onReview: l,
|
|
1402
1402
|
duplicate: u,
|
|
1403
|
-
onDuplicateHandled:
|
|
1404
|
-
isEditing:
|
|
1403
|
+
onDuplicateHandled: m,
|
|
1404
|
+
isEditing: p,
|
|
1405
1405
|
disabled: g,
|
|
1406
1406
|
isLoading: f,
|
|
1407
1407
|
isOpen: h,
|
|
1408
1408
|
onOpen: b,
|
|
1409
1409
|
onClose: D,
|
|
1410
|
-
saveDraft:
|
|
1410
|
+
saveDraft: $ = !0
|
|
1411
1411
|
}) => {
|
|
1412
1412
|
const {
|
|
1413
1413
|
projectName: v,
|
|
@@ -1419,55 +1419,55 @@ const _n = (e) => {
|
|
|
1419
1419
|
isGuest: I,
|
|
1420
1420
|
userName: E,
|
|
1421
1421
|
editingId: P
|
|
1422
|
-
} =
|
|
1422
|
+
} = $e(), { hasLicense: H, onPowerFeature: Q, user: X, openSlideOut: q, commentFrameLink: R } = ze(), ue = X?.data?.isAdmin, J = Pa(), [, W] = Cn(), [ve, O] = L(e || ""), [ne, K] = L(
|
|
1423
1423
|
() => t.map(
|
|
1424
|
-
(d) =>
|
|
1424
|
+
(d) => dn(d.id, e || "") ? { ...d, isInline: !0 } : d
|
|
1425
1425
|
)
|
|
1426
|
-
), [Ye, Te] = L(0), De = fe(/* @__PURE__ */ new Map()), [
|
|
1426
|
+
), [Ye, Te] = L(0), De = fe(/* @__PURE__ */ new Map()), [pe, me] = L([]), [Ie, Z] = L(!1), [Ne, Re] = L(!1), [Ee, Fe] = L([]), [Je, Le] = L([]), { annotations: ye, removeAnnotation: Ue, goToAnnotation: Be } = Tr({
|
|
1427
1427
|
entityId: y[0]?.id,
|
|
1428
|
-
filesUploading:
|
|
1429
|
-
}), oe = y.length === 1 && y[0].entityType === "version" ? y[0] : void 0, Xe =
|
|
1430
|
-
() =>
|
|
1428
|
+
filesUploading: pe
|
|
1429
|
+
}), oe = y.length === 1 && y[0].entityType === "version" ? y[0] : void 0, Xe = R?.draft && R.draft.entityId === oe?.id ? R.draft : null, [Me, Ge] = L(
|
|
1430
|
+
() => p && Number.isSafeInteger(n?.startFrame) && n.startFrame > 0 ? {
|
|
1431
1431
|
startFrame: n.startFrame,
|
|
1432
1432
|
endFrame: Number.isSafeInteger(n.endFrame) && n.endFrame >= n.startFrame ? n.endFrame : n.startFrame
|
|
1433
1433
|
} : null
|
|
1434
|
-
), _e = (d) => Ge(d && { ...d, entityId: oe?.id }), Oe =
|
|
1434
|
+
), _e = (d) => Ge(d && { ...d, entityId: oe?.id }), Oe = p || Me?.entityId === oe?.id ? Me : null, [be, Pe] = L(!1), w = p ? Oe : Oe ?? Xe, _ = p ? !!oe || !!Oe : !!R && !!oe, j = R?.formatFrame ?? String, U = w ? w.endFrame > w.startFrame ? `${j(w.startFrame)}-${j(w.endFrame)}` : j(w.startFrame) : void 0, [ie, T] = L(U ?? ""), le = fe(!1), we = fe(null), xe = (d) => {
|
|
1435
1435
|
if (!oe) return;
|
|
1436
1436
|
const k = d ? { ...d, entityId: oe.id } : null;
|
|
1437
|
-
if (!
|
|
1438
|
-
|
|
1437
|
+
if (!p) {
|
|
1438
|
+
R?.setDraft(k);
|
|
1439
1439
|
return;
|
|
1440
1440
|
}
|
|
1441
|
-
a &&
|
|
1441
|
+
a && R?.setEditPreview({
|
|
1442
1442
|
activityId: a,
|
|
1443
1443
|
link: k
|
|
1444
1444
|
});
|
|
1445
1445
|
}, je = (d) => {
|
|
1446
1446
|
T(d);
|
|
1447
|
-
const k =
|
|
1447
|
+
const k = sn(d);
|
|
1448
1448
|
k && xe(k);
|
|
1449
1449
|
};
|
|
1450
1450
|
Y(() => {
|
|
1451
1451
|
be || T(U ?? "");
|
|
1452
1452
|
}, [U, be]), Y(
|
|
1453
1453
|
() => () => {
|
|
1454
|
-
|
|
1454
|
+
p && R?.setEditPreview(null);
|
|
1455
1455
|
},
|
|
1456
|
-
[
|
|
1456
|
+
[p, R?.setEditPreview]
|
|
1457
1457
|
);
|
|
1458
1458
|
const ct = () => {
|
|
1459
1459
|
if (le.current) {
|
|
1460
1460
|
le.current = !1, T(U ?? ""), xe(we.current), Pe(!1);
|
|
1461
1461
|
return;
|
|
1462
1462
|
}
|
|
1463
|
-
const d =
|
|
1463
|
+
const d = sn(ie);
|
|
1464
1464
|
d ? (_e(d), xe(d)) : (T(U ?? ""), xe(we.current)), Pe(!1);
|
|
1465
1465
|
}, He = () => {
|
|
1466
|
-
_e(null),
|
|
1466
|
+
_e(null), p ? xe(null) : R?.unlink();
|
|
1467
1467
|
}, qe = () => {
|
|
1468
|
-
!
|
|
1468
|
+
!p && R && oe ? R.link(oe.id) : (T(""), Pe(!0));
|
|
1469
1469
|
}, ht = () => w ? He() : qe(), lt = N(() => {
|
|
1470
|
-
if (!_ || !
|
|
1470
|
+
if (!_ || !p && !R || !oe) return;
|
|
1471
1471
|
const d = ["frame", "time", "timecode", "link", "range"];
|
|
1472
1472
|
return [
|
|
1473
1473
|
w ? {
|
|
@@ -1479,15 +1479,15 @@ const _n = (e) => {
|
|
|
1479
1479
|
run: He
|
|
1480
1480
|
} : {
|
|
1481
1481
|
id: "frame-link",
|
|
1482
|
-
label:
|
|
1482
|
+
label: p ? "Add frame link" : "Link to current frame",
|
|
1483
1483
|
icon: "timer",
|
|
1484
1484
|
keywords: d,
|
|
1485
1485
|
run: qe
|
|
1486
1486
|
}
|
|
1487
1487
|
];
|
|
1488
|
-
}, [_,
|
|
1489
|
-
|
|
1490
|
-
draftKey:
|
|
1488
|
+
}, [_, p, R, oe?.id, !!w, U]), [Se, dt] = L(o);
|
|
1489
|
+
Mr({
|
|
1490
|
+
draftKey: $ && !p ? Er(
|
|
1491
1491
|
v,
|
|
1492
1492
|
E,
|
|
1493
1493
|
y.map((d) => d.id)
|
|
@@ -1498,42 +1498,42 @@ const _n = (e) => {
|
|
|
1498
1498
|
O(d.text), K(d.files), Fe(d.uploadedAnnotations), dt(d.category), (d.text.trim() || d.files.length || d.uploadedAnnotations.length) && !h && !P && b?.();
|
|
1499
1499
|
}
|
|
1500
1500
|
});
|
|
1501
|
-
const
|
|
1501
|
+
const $t = M.filter((d) => d.accessLevel >= 20), Rt = M.find((d) => d.name === Se), Lt = Sn(Rt?.color), Ke = fe(null), Ot = fe(null), ft = !!ve.trim(), jt = !!C?.conditions?.some(
|
|
1502
1502
|
(d) => "key" in d && d.key === "checklists" && d.value === !0
|
|
1503
1503
|
);
|
|
1504
1504
|
Y(() => {
|
|
1505
|
-
if (!h ||
|
|
1505
|
+
if (!h || p || !jt) return;
|
|
1506
1506
|
const d = Ke.current;
|
|
1507
1507
|
!d || !d.isEmpty() || d.getEditor().update(() => {
|
|
1508
|
-
const k =
|
|
1509
|
-
|
|
1508
|
+
const k = yo(!1);
|
|
1509
|
+
bo().clear().append(vo("check").append(k)), k.select();
|
|
1510
1510
|
});
|
|
1511
|
-
}, [h,
|
|
1512
|
-
const
|
|
1511
|
+
}, [h, p, jt]);
|
|
1512
|
+
const Vt = y[0]?.entityType, zt = J?.productTypes, Wn = N(
|
|
1513
1513
|
() => I ? void 0 : {
|
|
1514
|
-
...
|
|
1514
|
+
...Eo({
|
|
1515
1515
|
suggestions: S,
|
|
1516
|
-
project: { productTypes:
|
|
1516
|
+
project: { productTypes: zt },
|
|
1517
1517
|
taskTypes: A?.taskTypes,
|
|
1518
|
-
entityType:
|
|
1518
|
+
entityType: Vt
|
|
1519
1519
|
}),
|
|
1520
1520
|
// keep the picker short
|
|
1521
1521
|
limit: 5
|
|
1522
1522
|
},
|
|
1523
|
-
[I, S,
|
|
1524
|
-
),
|
|
1523
|
+
[I, S, zt, A?.taskTypes, Vt]
|
|
1524
|
+
), Qn = ({ type: d, id: k }) => {
|
|
1525
1525
|
d === "user" || d === "team" || q({ entityId: k, entityType: d, projectName: v });
|
|
1526
|
-
},
|
|
1526
|
+
}, Yn = ({ type: d, id: k, label: z }, V) => {
|
|
1527
1527
|
const { x: B, y: se, width: ce } = V.getBoundingClientRect();
|
|
1528
1528
|
W({ id: k, name: k, type: d, label: z, pos: { left: B + ce / 2, top: se } });
|
|
1529
|
-
}, [
|
|
1529
|
+
}, [Jn, yt] = L(!1);
|
|
1530
1530
|
Y(() => {
|
|
1531
1531
|
h || yt(!1);
|
|
1532
1532
|
}, [h]);
|
|
1533
|
-
const
|
|
1533
|
+
const Xn = () => {
|
|
1534
1534
|
h || g || (yt(!0), b && b());
|
|
1535
|
-
},
|
|
1536
|
-
|
|
1535
|
+
}, Ut = () => {
|
|
1536
|
+
p && R?.setEditPreview(null), (!ft || p) && O(""), D && D();
|
|
1537
1537
|
}, Ze = ({ file: d, data: k }, z = !1) => {
|
|
1538
1538
|
const V = he(d.name), B = {
|
|
1539
1539
|
id: k.id,
|
|
@@ -1543,16 +1543,16 @@ const _n = (e) => {
|
|
|
1543
1543
|
order: ne.length,
|
|
1544
1544
|
isAnnotationLayer: z
|
|
1545
1545
|
};
|
|
1546
|
-
return K((se) => [...se, B]),
|
|
1546
|
+
return K((se) => [...se, B]), me(
|
|
1547
1547
|
(se) => se.filter((ce) => he(ce.name) !== V)
|
|
1548
1548
|
), B;
|
|
1549
|
-
},
|
|
1550
|
-
z ? Ue?.(d) : (K((V) => V.filter((B) => B.id !== d)),
|
|
1549
|
+
}, Kn = (d, k, z) => {
|
|
1550
|
+
z ? Ue?.(d) : (K((V) => V.filter((B) => B.id !== d)), me((V) => V.filter((B) => he(B.name) !== he(k))));
|
|
1551
1551
|
}, et = (d, k) => {
|
|
1552
1552
|
const z = Math.round(d.loaded * 100 / d.total);
|
|
1553
1553
|
if (z !== 100) {
|
|
1554
1554
|
const V = he(k.name);
|
|
1555
|
-
|
|
1555
|
+
me((B) => {
|
|
1556
1556
|
const se = B.find((G) => he(G.name) === V), ce = B.filter((G) => he(G.name) !== V), Ve = {
|
|
1557
1557
|
name: V,
|
|
1558
1558
|
progress: z,
|
|
@@ -1563,8 +1563,8 @@ const _n = (e) => {
|
|
|
1563
1563
|
});
|
|
1564
1564
|
}
|
|
1565
1565
|
}, ut = (d) => {
|
|
1566
|
-
|
|
1567
|
-
},
|
|
1566
|
+
me((k) => k.filter((z) => z.name !== he(d)));
|
|
1567
|
+
}, Bt = (d) => {
|
|
1568
1568
|
for (const k of d) {
|
|
1569
1569
|
const z = Qe(k, v, et);
|
|
1570
1570
|
De.current.set(k, z), z.then(
|
|
@@ -1574,14 +1574,14 @@ const _n = (e) => {
|
|
|
1574
1574
|
}
|
|
1575
1575
|
);
|
|
1576
1576
|
}
|
|
1577
|
-
},
|
|
1577
|
+
}, Zn = async (d) => {
|
|
1578
1578
|
Te((k) => k + 1);
|
|
1579
1579
|
try {
|
|
1580
1580
|
const k = De.current.get(d);
|
|
1581
1581
|
if (k) {
|
|
1582
1582
|
const { data: B } = await k;
|
|
1583
1583
|
return K((se) => se.map((ce) => ce.id === B.id ? { ...ce, isInline: !0 } : ce)), {
|
|
1584
|
-
src:
|
|
1584
|
+
src: ln(v, B.id),
|
|
1585
1585
|
name: he(d.name),
|
|
1586
1586
|
mime: d.type
|
|
1587
1587
|
};
|
|
@@ -1590,27 +1590,27 @@ const _n = (e) => {
|
|
|
1590
1590
|
return K((B) => [
|
|
1591
1591
|
...B,
|
|
1592
1592
|
{ id: z.id, name: V, mime: d.type, size: d.size, order: B.length, isInline: !0 }
|
|
1593
|
-
]), { src:
|
|
1593
|
+
]), { src: ln(v, z.id), name: V, mime: d.type };
|
|
1594
1594
|
} catch (k) {
|
|
1595
1595
|
throw De.current.has(d) || ke.error(k?.message || "Upload failed"), k;
|
|
1596
1596
|
} finally {
|
|
1597
1597
|
Te((k) => k - 1);
|
|
1598
1598
|
}
|
|
1599
|
-
},
|
|
1600
|
-
Z(!1), !d.defaultPrevented &&
|
|
1599
|
+
}, eo = (d) => {
|
|
1600
|
+
Z(!1), !d.defaultPrevented && Fr(
|
|
1601
1601
|
d,
|
|
1602
1602
|
v,
|
|
1603
1603
|
et,
|
|
1604
1604
|
Ze,
|
|
1605
1605
|
(k) => ut(k.name)
|
|
1606
1606
|
);
|
|
1607
|
-
},
|
|
1607
|
+
}, to = (d) => {
|
|
1608
1608
|
d.preventDefault(), d.stopPropagation(), Z(!0);
|
|
1609
|
-
},
|
|
1610
|
-
const k =
|
|
1611
|
-
k && k.entityId === oe?.id && (_e({ startFrame: k.startFrame, endFrame: k.endFrame }),
|
|
1612
|
-
const z =
|
|
1613
|
-
const de = d.origin ?? (d.entityId && d.entityType ? { id: d.entityId, type: d.entityType } : void 0), ae = `[Source](${
|
|
1609
|
+
}, Gt = fe(null), no = async ({ activity: d }) => {
|
|
1610
|
+
const k = _t(d);
|
|
1611
|
+
k && k.entityId === oe?.id && (_e({ startFrame: k.startFrame, endFrame: k.endFrame }), R?.setDraft(k));
|
|
1612
|
+
const z = Fn(d.body || ""), V = d.files || [], B = Et(z), se = y.length === 1 && y[0].id === (d.origin?.id ?? d.entityId), ce = (G) => {
|
|
1613
|
+
const de = d.origin ?? (d.entityId && d.entityType ? { id: d.entityId, type: d.entityType } : void 0), ae = `[Source](${Qo(d.activityId, de)})`, ee = [G.trim(), ae].filter(Boolean).join(`
|
|
1614
1614
|
|
|
1615
1615
|
`);
|
|
1616
1616
|
O((ge) => ge.trim() ? `${ge.trim()}
|
|
@@ -1619,7 +1619,7 @@ ${ee}` : ee), Ke.current?.focus();
|
|
|
1619
1619
|
}, Ve = async (G) => {
|
|
1620
1620
|
const de = B.has(G.id);
|
|
1621
1621
|
try {
|
|
1622
|
-
const ae = await
|
|
1622
|
+
const ae = await cn(
|
|
1623
1623
|
v,
|
|
1624
1624
|
G.id,
|
|
1625
1625
|
G.name,
|
|
@@ -1627,15 +1627,15 @@ ${ee}` : ee), Ke.current?.focus();
|
|
|
1627
1627
|
de ? void 0 : et
|
|
1628
1628
|
);
|
|
1629
1629
|
if (de) {
|
|
1630
|
-
const { file: ge, data: tt } = ae,
|
|
1631
|
-
K((
|
|
1632
|
-
...
|
|
1633
|
-
{ id: tt.id, name:
|
|
1630
|
+
const { file: ge, data: tt } = ae, pt = he(ge.name);
|
|
1631
|
+
K((Qt) => [
|
|
1632
|
+
...Qt,
|
|
1633
|
+
{ id: tt.id, name: pt, mime: ge.type, size: ge.size, order: Qt.length, isInline: de }
|
|
1634
1634
|
]);
|
|
1635
1635
|
} else Ze(ae);
|
|
1636
1636
|
const ee = G.annotation;
|
|
1637
1637
|
if (ee && se) {
|
|
1638
|
-
const ge = await
|
|
1638
|
+
const ge = await cn(
|
|
1639
1639
|
v,
|
|
1640
1640
|
ee.transparent,
|
|
1641
1641
|
`annotation-${G.name}`,
|
|
@@ -1645,7 +1645,7 @@ ${ee}` : ee), Ke.current?.focus();
|
|
|
1645
1645
|
...tt,
|
|
1646
1646
|
{
|
|
1647
1647
|
...ee,
|
|
1648
|
-
id: `${ee.id}-${
|
|
1648
|
+
id: `${ee.id}-${hn()}`,
|
|
1649
1649
|
composite: ae.data.id,
|
|
1650
1650
|
transparent: ge.data.id
|
|
1651
1651
|
}
|
|
@@ -1668,7 +1668,7 @@ ${ee}` : ee), Ke.current?.focus();
|
|
|
1668
1668
|
ce(
|
|
1669
1669
|
z.replace(
|
|
1670
1670
|
/(\/api\/projects\/[^/]+\/files\/)([\w-]+)/g,
|
|
1671
|
-
(ge, tt,
|
|
1671
|
+
(ge, tt, pt) => ee.has(pt) ? tt + ee.get(pt) : ge
|
|
1672
1672
|
)
|
|
1673
1673
|
);
|
|
1674
1674
|
} else ce(z);
|
|
@@ -1678,26 +1678,26 @@ ${ee}` : ee), Ke.current?.focus();
|
|
|
1678
1678
|
}
|
|
1679
1679
|
};
|
|
1680
1680
|
Y(() => {
|
|
1681
|
-
!u ||
|
|
1681
|
+
!u || Gt.current === u.key || (Gt.current = u.key, yt(!0), m?.(), no(u));
|
|
1682
1682
|
}, [u?.key]);
|
|
1683
|
-
const
|
|
1683
|
+
const oo = Dr({
|
|
1684
1684
|
projectName: v,
|
|
1685
1685
|
onSuccess: Ze,
|
|
1686
1686
|
onProgress: et,
|
|
1687
1687
|
// seed progress so the card switches to uploading before the export finishes
|
|
1688
1688
|
onStart: (d) => et({ loaded: 1, total: 100 }, { name: d.name, type: "image/png" }),
|
|
1689
1689
|
onError: (d) => ut(d.name)
|
|
1690
|
-
}),
|
|
1690
|
+
}), ao = pe.length > 0 || Ye > 0, vt = Ne || ao, bt = async () => {
|
|
1691
1691
|
if (!vt)
|
|
1692
1692
|
try {
|
|
1693
|
-
|
|
1693
|
+
Re(!0);
|
|
1694
1694
|
let d = [], k = Ee, z = [];
|
|
1695
1695
|
if (ye.length) {
|
|
1696
1696
|
Le(ye.map((ee) => ee.id));
|
|
1697
|
-
const { files: de, metadata: ae } = await
|
|
1697
|
+
const { files: de, metadata: ae } = await oo(ye);
|
|
1698
1698
|
d = de, k = [...k, ...ae], z = ae.map((ee) => ee.id), Le(z);
|
|
1699
1699
|
}
|
|
1700
|
-
const { annotations: V = [] } = n || {}, B = k.length ? [...V, ...k] : void 0, se =
|
|
1700
|
+
const { annotations: V = [] } = n || {}, B = k.length ? [...V, ...k] : void 0, se = wr(Ke.current?.getMarkdown() ?? ve), ce = ne.filter((de) => !de.isInline || dn(de.id, se)), Ve = [...ce, ...d], G = {
|
|
1701
1701
|
...n,
|
|
1702
1702
|
annotations: B,
|
|
1703
1703
|
// could be undefined
|
|
@@ -1707,11 +1707,11 @@ ${ee}` : ee), Ke.current?.focus();
|
|
|
1707
1707
|
startFrame: w?.startFrame ?? void 0,
|
|
1708
1708
|
endFrame: w?.endFrame ?? void 0
|
|
1709
1709
|
};
|
|
1710
|
-
if ((se || Ve.length) &&
|
|
1710
|
+
if ((se || Ve.length) && s) {
|
|
1711
1711
|
const de = ve;
|
|
1712
1712
|
O(""), K([]);
|
|
1713
1713
|
try {
|
|
1714
|
-
await
|
|
1714
|
+
await s(se, Ve, G), z.forEach((ae) => Ue?.(ae)), p && R?.setEditPreview(null), Fe([]), !p && w && R?.unlink(), p || _e(null);
|
|
1715
1715
|
} catch {
|
|
1716
1716
|
O(de), K(ce), Fe(Ee);
|
|
1717
1717
|
return;
|
|
@@ -1720,52 +1720,52 @@ ${ee}` : ee), Ke.current?.focus();
|
|
|
1720
1720
|
} catch (d) {
|
|
1721
1721
|
console.error(d), ke.error("Something went wrong");
|
|
1722
1722
|
} finally {
|
|
1723
|
-
Le([]),
|
|
1723
|
+
Le([]), Re(!1);
|
|
1724
1724
|
}
|
|
1725
|
-
},
|
|
1725
|
+
}, Ht = [
|
|
1726
1726
|
...ye.filter((d) => !Je.includes(d.id)),
|
|
1727
1727
|
...(ne || []).filter((d) => !d.isAnnotationLayer && !d.isInline),
|
|
1728
|
-
...
|
|
1729
|
-
].sort((d, k) => d.order - k.order),
|
|
1728
|
+
...pe
|
|
1729
|
+
].sort((d, k) => d.order - k.order), ro = Ht.length > 3, qt = (d) => g ? I ? "You do not have permission to comment." : "Commenting is disabled across multiple projects." : I || !d ? "Leave a comment" : "Comment, or type / to add mentions, checklists, code and more...", Wt = async (d) => {
|
|
1730
1730
|
if (l)
|
|
1731
1731
|
try {
|
|
1732
1732
|
(ft || ne.length > 0 || ye.length > 0) && await bt(), l(d);
|
|
1733
1733
|
} catch (k) {
|
|
1734
1734
|
console.error(k), ke.error("Something went wrong while submitting the review");
|
|
1735
1735
|
}
|
|
1736
|
-
},
|
|
1736
|
+
}, io = r && l && !g && /* @__PURE__ */ x(Mo, { className: te("version-review-buttons", { guest: I }), children: [
|
|
1737
1737
|
/* @__PURE__ */ c(
|
|
1738
|
-
|
|
1738
|
+
Xt,
|
|
1739
1739
|
{
|
|
1740
1740
|
icon: "check",
|
|
1741
1741
|
variant: "tertiary",
|
|
1742
1742
|
"data-tooltip": "Approve",
|
|
1743
|
-
onClick: () =>
|
|
1743
|
+
onClick: () => Wt(Ce.APPROVE),
|
|
1744
1744
|
children: /* @__PURE__ */ c("span", { className: "label", children: "Approve" })
|
|
1745
1745
|
}
|
|
1746
1746
|
),
|
|
1747
1747
|
/* @__PURE__ */ c(
|
|
1748
|
-
|
|
1748
|
+
Xt,
|
|
1749
1749
|
{
|
|
1750
1750
|
icon: "refresh",
|
|
1751
1751
|
variant: "danger",
|
|
1752
1752
|
"data-tooltip": "Request changes",
|
|
1753
|
-
onClick: () =>
|
|
1753
|
+
onClick: () => Wt(Ce.REQUEST_CHANGES),
|
|
1754
1754
|
children: /* @__PURE__ */ c("span", { className: "label", children: "Request changes" })
|
|
1755
1755
|
}
|
|
1756
1756
|
)
|
|
1757
1757
|
] }), wt = !I && /* @__PURE__ */ c(
|
|
1758
|
-
|
|
1758
|
+
jr,
|
|
1759
1759
|
{
|
|
1760
1760
|
value: Se,
|
|
1761
|
-
categories:
|
|
1761
|
+
categories: $t,
|
|
1762
1762
|
onChange: (d) => dt(d),
|
|
1763
|
-
isCompact:
|
|
1763
|
+
isCompact: p,
|
|
1764
1764
|
hasPowerpack: H,
|
|
1765
1765
|
onPowerFeature: Q,
|
|
1766
|
-
isHidden:
|
|
1766
|
+
isHidden: Vr($t, { isGuest: I, isAdmin: ue })
|
|
1767
1767
|
}
|
|
1768
|
-
),
|
|
1768
|
+
), so = /* @__PURE__ */ x(Ae, { children: [
|
|
1769
1769
|
/* @__PURE__ */ c(
|
|
1770
1770
|
at,
|
|
1771
1771
|
{
|
|
@@ -1774,57 +1774,57 @@ ${ee}` : ee), Ke.current?.focus();
|
|
|
1774
1774
|
className: "md-toolbar-button",
|
|
1775
1775
|
"data-tooltip": "Attach files",
|
|
1776
1776
|
onMouseDown: (d) => d.preventDefault(),
|
|
1777
|
-
onClick: () =>
|
|
1777
|
+
onClick: () => Ot.current?.click()
|
|
1778
1778
|
}
|
|
1779
1779
|
),
|
|
1780
1780
|
/* @__PURE__ */ c(
|
|
1781
1781
|
"input",
|
|
1782
1782
|
{
|
|
1783
|
-
ref:
|
|
1783
|
+
ref: Ot,
|
|
1784
1784
|
type: "file",
|
|
1785
1785
|
multiple: !0,
|
|
1786
1786
|
hidden: !0,
|
|
1787
1787
|
onChange: (d) => {
|
|
1788
|
-
|
|
1788
|
+
Bt(Array.from(d.target.files || [])), d.target.value = "";
|
|
1789
1789
|
}
|
|
1790
1790
|
}
|
|
1791
1791
|
)
|
|
1792
|
-
] }),
|
|
1792
|
+
] }), co = p || Jn, lo = `calc(${Math.max((be ? ie || "Frame or range" : U || "").length, 1) + 2}ch + 16px)`;
|
|
1793
1793
|
return /* @__PURE__ */ c(Ae, { children: /* @__PURE__ */ x(
|
|
1794
|
-
|
|
1794
|
+
_o,
|
|
1795
1795
|
{
|
|
1796
|
-
className: te("comment-container", "md-mention-anchor", { isOpen: h, isEditing:
|
|
1797
|
-
onDragOver:
|
|
1796
|
+
className: te("comment-container", "md-mention-anchor", { isOpen: h, isEditing: p }),
|
|
1797
|
+
onDragOver: to,
|
|
1798
1798
|
onDragLeave: () => Z(!1),
|
|
1799
|
-
onDrop:
|
|
1799
|
+
onDrop: eo,
|
|
1800
1800
|
onClick: () => Z(!1),
|
|
1801
1801
|
onKeyDown: (d) => d.stopPropagation(),
|
|
1802
1802
|
children: [
|
|
1803
|
-
r &&
|
|
1803
|
+
r && i && /* @__PURE__ */ c(Br, { lastOwnVersionReview: i }),
|
|
1804
1804
|
/* @__PURE__ */ x(
|
|
1805
|
-
|
|
1805
|
+
Po,
|
|
1806
1806
|
{
|
|
1807
1807
|
className: te("block-shortcuts", {
|
|
1808
1808
|
isOpen: h,
|
|
1809
1809
|
isClosed: !h || g,
|
|
1810
|
-
isEditing:
|
|
1810
|
+
isEditing: p,
|
|
1811
1811
|
isDropping: Ie,
|
|
1812
1812
|
disabled: g,
|
|
1813
1813
|
isLoading: f,
|
|
1814
1814
|
isSubmitting: Ne,
|
|
1815
1815
|
category: !!Se && !I
|
|
1816
1816
|
}),
|
|
1817
|
-
onClick:
|
|
1817
|
+
onClick: Xn,
|
|
1818
1818
|
$categoryPrimary: Rt?.color,
|
|
1819
|
-
$categoryTertiary:
|
|
1820
|
-
$categorySecondary:
|
|
1819
|
+
$categoryTertiary: Lt.primary,
|
|
1820
|
+
$categorySecondary: Lt.secondary,
|
|
1821
1821
|
children: [
|
|
1822
1822
|
h && /* @__PURE__ */ c(
|
|
1823
|
-
|
|
1823
|
+
Nn,
|
|
1824
1824
|
{
|
|
1825
|
-
files:
|
|
1826
|
-
isCompact:
|
|
1827
|
-
onRemove:
|
|
1825
|
+
files: Ht,
|
|
1826
|
+
isCompact: ro || p,
|
|
1827
|
+
onRemove: Kn,
|
|
1828
1828
|
projectName: v,
|
|
1829
1829
|
onAnnotationClick: Be,
|
|
1830
1830
|
style: {
|
|
@@ -1835,48 +1835,48 @@ ${ee}` : ee), Ke.current?.focus();
|
|
|
1835
1835
|
pt: {
|
|
1836
1836
|
file: {
|
|
1837
1837
|
style: {
|
|
1838
|
-
height:
|
|
1838
|
+
height: p ? 70 : void 0
|
|
1839
1839
|
}
|
|
1840
1840
|
}
|
|
1841
1841
|
}
|
|
1842
1842
|
}
|
|
1843
1843
|
),
|
|
1844
1844
|
h && !g ? /* @__PURE__ */ x(Ae, { children: [
|
|
1845
|
-
|
|
1845
|
+
p && wt && /* @__PURE__ */ c($o, { children: wt }),
|
|
1846
1846
|
/* @__PURE__ */ c(
|
|
1847
|
-
|
|
1847
|
+
Ro,
|
|
1848
1848
|
{
|
|
1849
1849
|
ref: Ke,
|
|
1850
1850
|
className: "comment-editor",
|
|
1851
1851
|
value: ve,
|
|
1852
1852
|
onChange: O,
|
|
1853
|
-
placeholder:
|
|
1854
|
-
mentions:
|
|
1855
|
-
mentionPlacement:
|
|
1856
|
-
onMentionClick:
|
|
1857
|
-
onMentionHover:
|
|
1853
|
+
placeholder: qt(!0),
|
|
1854
|
+
mentions: Wn,
|
|
1855
|
+
mentionPlacement: p ? "inline" : "top",
|
|
1856
|
+
onMentionClick: Qn,
|
|
1857
|
+
onMentionHover: Yn,
|
|
1858
1858
|
onSubmit: bt,
|
|
1859
|
-
onEscape:
|
|
1860
|
-
onFiles:
|
|
1861
|
-
onUploadMedia:
|
|
1859
|
+
onEscape: Ut,
|
|
1860
|
+
onFiles: Bt,
|
|
1861
|
+
onUploadMedia: Zn,
|
|
1862
1862
|
commands: lt,
|
|
1863
|
-
toolbar: !
|
|
1864
|
-
floatingToolbar:
|
|
1863
|
+
toolbar: !p,
|
|
1864
|
+
floatingToolbar: p,
|
|
1865
1865
|
toolbarStart: wt,
|
|
1866
1866
|
toolbarEnd: /* @__PURE__ */ x(Ae, { children: [
|
|
1867
|
-
/* @__PURE__ */ c(
|
|
1868
|
-
|
|
1867
|
+
/* @__PURE__ */ c(Lo, {}),
|
|
1868
|
+
so
|
|
1869
1869
|
] }),
|
|
1870
1870
|
bordered: !1,
|
|
1871
|
-
autoFocus:
|
|
1872
|
-
minHeight:
|
|
1871
|
+
autoFocus: co,
|
|
1872
|
+
minHeight: p ? 40 : 88,
|
|
1873
1873
|
maxHeight: 259
|
|
1874
1874
|
}
|
|
1875
1875
|
)
|
|
1876
|
-
] }) : /* @__PURE__ */ c(
|
|
1877
|
-
/* @__PURE__ */ x(
|
|
1878
|
-
(!I || _) && /* @__PURE__ */ x(
|
|
1879
|
-
!I &&
|
|
1876
|
+
] }) : /* @__PURE__ */ c(Oo, { children: qt() }),
|
|
1877
|
+
/* @__PURE__ */ x(jo, { children: [
|
|
1878
|
+
(!I || _) && /* @__PURE__ */ x(Vo, { children: [
|
|
1879
|
+
!I && Gr.map(({ trigger: d, icon: k, tooltip: z }) => /* @__PURE__ */ c(
|
|
1880
1880
|
at,
|
|
1881
1881
|
{
|
|
1882
1882
|
icon: k,
|
|
@@ -1889,23 +1889,23 @@ ${ee}` : ee), Ke.current?.focus();
|
|
|
1889
1889
|
d
|
|
1890
1890
|
)),
|
|
1891
1891
|
_ && /* @__PURE__ */ x(
|
|
1892
|
-
|
|
1892
|
+
zo,
|
|
1893
1893
|
{
|
|
1894
1894
|
className: te("frame-link", { selected: !!w || be }),
|
|
1895
1895
|
children: [
|
|
1896
1896
|
/* @__PURE__ */ c(
|
|
1897
|
-
|
|
1897
|
+
Uo,
|
|
1898
1898
|
{
|
|
1899
1899
|
icon: "timer",
|
|
1900
1900
|
variant: "text",
|
|
1901
1901
|
onClick: ht,
|
|
1902
1902
|
"aria-label": w ? "Remove frame link" : "Add frame link",
|
|
1903
|
-
"data-tooltip": w ? "Remove frame link" :
|
|
1903
|
+
"data-tooltip": w ? "Remove frame link" : p ? "Add frame link" : "Link to current frame",
|
|
1904
1904
|
"data-testid": "comment-frame-link"
|
|
1905
1905
|
}
|
|
1906
1906
|
),
|
|
1907
1907
|
(w || be) && (be ? /* @__PURE__ */ c(
|
|
1908
|
-
|
|
1908
|
+
Bo,
|
|
1909
1909
|
{
|
|
1910
1910
|
autoFocus: !0,
|
|
1911
1911
|
"aria-label": "Linked frame or range",
|
|
@@ -1916,14 +1916,14 @@ ${ee}` : ee), Ke.current?.focus();
|
|
|
1916
1916
|
},
|
|
1917
1917
|
onChange: (d) => je(d.target.value),
|
|
1918
1918
|
onBlur: ct,
|
|
1919
|
-
style: { width:
|
|
1919
|
+
style: { width: lo },
|
|
1920
1920
|
onKeyDown: (d) => {
|
|
1921
1921
|
d.key === "Enter" && (d.preventDefault(), d.currentTarget.blur()), d.key === "Escape" && (le.current = !0, d.currentTarget.blur());
|
|
1922
1922
|
},
|
|
1923
1923
|
"data-testid": "comment-frame-link-input"
|
|
1924
1924
|
}
|
|
1925
1925
|
) : /* @__PURE__ */ c(
|
|
1926
|
-
|
|
1926
|
+
Go,
|
|
1927
1927
|
{
|
|
1928
1928
|
variant: "text",
|
|
1929
1929
|
"aria-label": `Edit linked frame ${U ?? ""}`,
|
|
@@ -1936,12 +1936,12 @@ ${ee}` : ee), Ke.current?.focus();
|
|
|
1936
1936
|
}
|
|
1937
1937
|
)
|
|
1938
1938
|
] }),
|
|
1939
|
-
/* @__PURE__ */ x(
|
|
1940
|
-
|
|
1939
|
+
/* @__PURE__ */ x(Ho, { children: [
|
|
1940
|
+
p && /* @__PURE__ */ c(at, { variant: "text", onClick: Ut, children: "Cancel" }),
|
|
1941
1941
|
/* @__PURE__ */ c(
|
|
1942
|
-
|
|
1942
|
+
Ao,
|
|
1943
1943
|
{
|
|
1944
|
-
label:
|
|
1944
|
+
label: p ? "Save" : "Comment",
|
|
1945
1945
|
className: "comment",
|
|
1946
1946
|
active: ft || !!ne.length,
|
|
1947
1947
|
onClick: bt,
|
|
@@ -1951,21 +1951,21 @@ ${ee}` : ee), Ke.current?.focus();
|
|
|
1951
1951
|
)
|
|
1952
1952
|
] })
|
|
1953
1953
|
] }),
|
|
1954
|
-
/* @__PURE__ */ c(
|
|
1954
|
+
/* @__PURE__ */ c(qo, { className: te({ show: Ie && h }), children: /* @__PURE__ */ c(re, { icon: "cloud_upload" }) })
|
|
1955
1955
|
]
|
|
1956
1956
|
}
|
|
1957
1957
|
),
|
|
1958
|
-
/* @__PURE__ */ c(
|
|
1959
|
-
|
|
1958
|
+
/* @__PURE__ */ c(Wo, {}),
|
|
1959
|
+
io
|
|
1960
1960
|
]
|
|
1961
1961
|
}
|
|
1962
1962
|
) });
|
|
1963
|
-
},
|
|
1963
|
+
}, Hr = (e, t, o) => e && Mt`
|
|
1964
1964
|
--reaction-border-color: ${e};
|
|
1965
1965
|
--reaction-active-bg: ${t};
|
|
1966
1966
|
--reaction-hover-bg: ${t};
|
|
1967
1967
|
--reaction-active-border: ${e};
|
|
1968
|
-
`,
|
|
1968
|
+
`, qr = F.div`
|
|
1969
1969
|
/* VARS */
|
|
1970
1970
|
--reaction-border-color: var(--md-sys-color-outline-variant);
|
|
1971
1971
|
--reaction-hover-bg: var(--md-sys-color-surface-container-high-hover);
|
|
@@ -1978,7 +1978,7 @@ ${ee}` : ee), Ke.current?.focus();
|
|
|
1978
1978
|
--reaction-compact-active-hover-bg: var(--md-sys-color-primary-container-hover);
|
|
1979
1979
|
|
|
1980
1980
|
/* CATEGORY */
|
|
1981
|
-
${({ $categoryPrimary: e, $categorySecondary: t, $categoryTertiary: o }) =>
|
|
1981
|
+
${({ $categoryPrimary: e, $categorySecondary: t, $categoryTertiary: o }) => Hr(e, t)}
|
|
1982
1982
|
|
|
1983
1983
|
display: flex;
|
|
1984
1984
|
justify-content: center;
|
|
@@ -2029,23 +2029,23 @@ ${ee}` : ee), Ke.current?.focus();
|
|
|
2029
2029
|
position: relative;
|
|
2030
2030
|
height: 19px;
|
|
2031
2031
|
}
|
|
2032
|
-
`,
|
|
2032
|
+
`, Wr = F.div`
|
|
2033
2033
|
outline: 'solid 1px red';
|
|
2034
2034
|
display: flex;
|
|
2035
2035
|
gap: 8px;
|
|
2036
|
-
`,
|
|
2036
|
+
`, Qr = F.div`
|
|
2037
2037
|
position: fixed;
|
|
2038
2038
|
top: 0;
|
|
2039
2039
|
bottom: 0;
|
|
2040
2040
|
left: 0;
|
|
2041
2041
|
right: 0;
|
|
2042
2042
|
z-index: 55;
|
|
2043
|
-
`,
|
|
2043
|
+
`, Yr = F.div`
|
|
2044
2044
|
/* VARS */
|
|
2045
2045
|
--panel-bg: var(--md-sys-color-surface-container-high);
|
|
2046
2046
|
|
|
2047
2047
|
/* CATEGORY */
|
|
2048
|
-
${({ $categoryPrimary: e, $categorySecondary: t }) => t &&
|
|
2048
|
+
${({ $categoryPrimary: e, $categorySecondary: t }) => t && Mt`
|
|
2049
2049
|
--panel-bg: ${t};
|
|
2050
2050
|
`}
|
|
2051
2051
|
|
|
@@ -2061,14 +2061,14 @@ ${ee}` : ee), Ke.current?.focus();
|
|
|
2061
2061
|
padding: 4px;
|
|
2062
2062
|
border-radius: 4px;
|
|
2063
2063
|
box-shadow: 0px 0px 6px 2px rgba(0, 0, 0, 0.15);
|
|
2064
|
-
`,
|
|
2064
|
+
`, Jr = F.div`
|
|
2065
2065
|
/* VARS */
|
|
2066
2066
|
--opener-bg: var(--md-sys-color-surface-container-high);
|
|
2067
2067
|
--opener-hover-bg: var(--md-sys-color-surface-container-high-hover);
|
|
2068
2068
|
--opener-color: var(--md-sys-color-outline);
|
|
2069
2069
|
|
|
2070
2070
|
/* CATEGORY */
|
|
2071
|
-
${({ $categoryPrimary: e, $categorySecondary: t }) => t &&
|
|
2071
|
+
${({ $categoryPrimary: e, $categorySecondary: t }) => t && Mt`
|
|
2072
2072
|
--opener-bg: ${t};
|
|
2073
2073
|
--opener-hover-bg: ${t};
|
|
2074
2074
|
--opener-color: ${e};
|
|
@@ -2091,31 +2091,31 @@ ${ee}` : ee), Ke.current?.focus();
|
|
|
2091
2091
|
filter: ${({ $categoryPrimary: e }) => e ? "brightness(1.2)" : "none"};
|
|
2092
2092
|
}
|
|
2093
2093
|
}
|
|
2094
|
-
`,
|
|
2094
|
+
`, Xr = F.div`
|
|
2095
2095
|
display: flex;
|
|
2096
2096
|
gap: 8px;
|
|
2097
2097
|
position: relative;
|
|
2098
|
-
`,
|
|
2098
|
+
`, Kr = [
|
|
2099
2099
|
{ key: "thumb_up", value: "👍" },
|
|
2100
2100
|
{ key: "thumb_down", value: "👎" },
|
|
2101
2101
|
{ key: "heart_plus", value: "❤" },
|
|
2102
2102
|
{ key: "celebration", value: "🎉" },
|
|
2103
2103
|
{ key: "notes", value: "📝" }
|
|
2104
|
-
],
|
|
2104
|
+
], Zr = {
|
|
2105
2105
|
thumb_up: "👍",
|
|
2106
2106
|
thumb_down: "👎",
|
|
2107
2107
|
heart_plus: "❤️",
|
|
2108
2108
|
celebration: "🎉",
|
|
2109
2109
|
notes: "📝"
|
|
2110
|
-
},
|
|
2110
|
+
}, Dt = [
|
|
2111
2111
|
"thumb_up",
|
|
2112
2112
|
"thumb_down",
|
|
2113
2113
|
"heart_plus",
|
|
2114
2114
|
"celebration",
|
|
2115
2115
|
"notes"
|
|
2116
|
-
],
|
|
2117
|
-
(o, n) =>
|
|
2118
|
-
),
|
|
2116
|
+
], ei = (e) => [...e].sort(
|
|
2117
|
+
(o, n) => Dt.indexOf(o.type) - Dt.indexOf(n.type)
|
|
2118
|
+
), Ln = ({
|
|
2119
2119
|
reaction: e,
|
|
2120
2120
|
variant: t = "standard",
|
|
2121
2121
|
onClick: o,
|
|
@@ -2123,30 +2123,30 @@ ${ee}` : ee), Ke.current?.focus();
|
|
|
2123
2123
|
categorySecondary: a,
|
|
2124
2124
|
categoryTertiary: r
|
|
2125
2125
|
}) => {
|
|
2126
|
-
const
|
|
2126
|
+
const i = e.users?.join(", ") || void 0;
|
|
2127
2127
|
return /* @__PURE__ */ x(
|
|
2128
|
-
|
|
2128
|
+
qr,
|
|
2129
2129
|
{
|
|
2130
2130
|
className: te(t, { active: e.isActive }),
|
|
2131
2131
|
onClick: o,
|
|
2132
|
-
"data-tooltip":
|
|
2132
|
+
"data-tooltip": i,
|
|
2133
2133
|
$categoryPrimary: n,
|
|
2134
2134
|
$categorySecondary: a,
|
|
2135
2135
|
$categoryTertiary: r,
|
|
2136
2136
|
children: [
|
|
2137
|
-
/* @__PURE__ */ c("span", { className: "emoji", children:
|
|
2137
|
+
/* @__PURE__ */ c("span", { className: "emoji", children: Zr[e.type] }),
|
|
2138
2138
|
e.users && /* @__PURE__ */ c("span", { children: e.users.length })
|
|
2139
2139
|
]
|
|
2140
2140
|
}
|
|
2141
2141
|
);
|
|
2142
|
-
},
|
|
2142
|
+
}, ti = ({
|
|
2143
2143
|
reactions: e,
|
|
2144
2144
|
changeHandler: t,
|
|
2145
2145
|
categoryPrimary: o,
|
|
2146
2146
|
categorySecondary: n,
|
|
2147
2147
|
categoryTertiary: a
|
|
2148
|
-
}) => /* @__PURE__ */ c(
|
|
2149
|
-
|
|
2148
|
+
}) => /* @__PURE__ */ c(Wr, { children: e.map((r) => /* @__PURE__ */ c(
|
|
2149
|
+
Ln,
|
|
2150
2150
|
{
|
|
2151
2151
|
reaction: r,
|
|
2152
2152
|
isActive: r.isActive,
|
|
@@ -2158,16 +2158,16 @@ ${ee}` : ee), Ke.current?.focus();
|
|
|
2158
2158
|
categoryTertiary: a
|
|
2159
2159
|
},
|
|
2160
2160
|
r.type
|
|
2161
|
-
)) }),
|
|
2161
|
+
)) }), ni = ({
|
|
2162
2162
|
reactions: e,
|
|
2163
2163
|
changeHandler: t,
|
|
2164
2164
|
categoryPrimary: o,
|
|
2165
2165
|
categorySecondary: n,
|
|
2166
2166
|
categoryTertiary: a
|
|
2167
2167
|
}) => {
|
|
2168
|
-
const [r,
|
|
2168
|
+
const [r, i] = L(!1), s = e.filter((l) => l.isActive).map((l) => l.type);
|
|
2169
2169
|
return /* @__PURE__ */ x(
|
|
2170
|
-
|
|
2170
|
+
Jr,
|
|
2171
2171
|
{
|
|
2172
2172
|
$categoryPrimary: o,
|
|
2173
2173
|
$categorySecondary: n,
|
|
@@ -2178,29 +2178,29 @@ ${ee}` : ee), Ke.current?.focus();
|
|
|
2178
2178
|
{
|
|
2179
2179
|
icon: "add_reaction",
|
|
2180
2180
|
className: "add-reaction",
|
|
2181
|
-
onClick: () =>
|
|
2181
|
+
onClick: () => i(!r)
|
|
2182
2182
|
}
|
|
2183
2183
|
),
|
|
2184
2184
|
r && /* @__PURE__ */ x(Ae, { children: [
|
|
2185
|
-
/* @__PURE__ */ c(
|
|
2185
|
+
/* @__PURE__ */ c(Qr, { onClick: () => i(!1) }),
|
|
2186
2186
|
/* @__PURE__ */ c(
|
|
2187
|
-
|
|
2187
|
+
Yr,
|
|
2188
2188
|
{
|
|
2189
2189
|
$categoryPrimary: o,
|
|
2190
2190
|
$categorySecondary: n,
|
|
2191
2191
|
$categoryTertiary: a,
|
|
2192
|
-
children:
|
|
2192
|
+
children: Kr.map((l) => {
|
|
2193
2193
|
const u = {
|
|
2194
2194
|
type: l.key,
|
|
2195
|
-
isActive:
|
|
2195
|
+
isActive: s.includes(l.key)
|
|
2196
2196
|
};
|
|
2197
2197
|
return /* @__PURE__ */ c(
|
|
2198
|
-
|
|
2198
|
+
Ln,
|
|
2199
2199
|
{
|
|
2200
2200
|
reaction: u,
|
|
2201
2201
|
variant: "compact",
|
|
2202
2202
|
onClick: () => {
|
|
2203
|
-
t({ ...u, isActive: !u.isActive }),
|
|
2203
|
+
t({ ...u, isActive: !u.isActive }), i(!1);
|
|
2204
2204
|
},
|
|
2205
2205
|
categoryPrimary: o,
|
|
2206
2206
|
categorySecondary: n,
|
|
@@ -2215,105 +2215,126 @@ ${ee}` : ee), Ke.current?.focus();
|
|
|
2215
2215
|
]
|
|
2216
2216
|
}
|
|
2217
2217
|
);
|
|
2218
|
-
},
|
|
2218
|
+
}, oi = ({
|
|
2219
2219
|
reactions: e,
|
|
2220
2220
|
changeHandler: t,
|
|
2221
2221
|
readOnly: o,
|
|
2222
2222
|
category: n,
|
|
2223
2223
|
categoryPrimary: a,
|
|
2224
2224
|
categorySecondary: r,
|
|
2225
|
-
categoryTertiary:
|
|
2225
|
+
categoryTertiary: i
|
|
2226
2226
|
}) => {
|
|
2227
|
-
const
|
|
2228
|
-
return /* @__PURE__ */ x(
|
|
2227
|
+
const s = n ? { categoryPrimary: a, categorySecondary: r, categoryTertiary: i } : {};
|
|
2228
|
+
return /* @__PURE__ */ x(Xr, { children: [
|
|
2229
2229
|
!o && /* @__PURE__ */ c(
|
|
2230
|
-
|
|
2230
|
+
ni,
|
|
2231
2231
|
{
|
|
2232
2232
|
reactions: e,
|
|
2233
2233
|
changeHandler: t,
|
|
2234
|
-
...
|
|
2234
|
+
...s
|
|
2235
2235
|
}
|
|
2236
2236
|
),
|
|
2237
|
-
/* @__PURE__ */ c(
|
|
2237
|
+
/* @__PURE__ */ c(ti, { reactions: e, changeHandler: t, ...s })
|
|
2238
2238
|
] });
|
|
2239
|
-
},
|
|
2239
|
+
}, ai = (e = "") => (e.match(/\((.*?)\)/g) || []).flatMap((o) => {
|
|
2240
2240
|
if (o.includes("http")) return [];
|
|
2241
2241
|
const n = o.match(/\(([^)]+)\)/), a = n ? n[1].split(":") : [];
|
|
2242
2242
|
return { type: a[0], id: a[1] };
|
|
2243
|
-
}),
|
|
2243
|
+
}), ri = (e) => e.replace(/@(?=@|\[)/g, ""), ii = {
|
|
2244
2244
|
"&": "&",
|
|
2245
2245
|
"<": "<",
|
|
2246
2246
|
">": ">",
|
|
2247
2247
|
'"': """
|
|
2248
|
-
}, xt = (e) => e.replace(/[&<>"]/g, (t) =>
|
|
2248
|
+
}, xt = (e) => e.replace(/[&<>"]/g, (t) => ii[t]), si = (e) => e.replaceAll(" ", "%20"), ci = (e, t) => {
|
|
2249
2249
|
const o = t.cloneContents();
|
|
2250
2250
|
if (!o.querySelector("[data-mention-value]")) return null;
|
|
2251
2251
|
let n = "", a = "";
|
|
2252
|
-
const r = (
|
|
2253
|
-
if (
|
|
2254
|
-
const u =
|
|
2252
|
+
const r = (i) => {
|
|
2253
|
+
if (i.nodeType === Node.TEXT_NODE) {
|
|
2254
|
+
const u = i.data;
|
|
2255
2255
|
n += u, a += xt(u);
|
|
2256
2256
|
return;
|
|
2257
2257
|
}
|
|
2258
|
-
if (
|
|
2259
|
-
|
|
2258
|
+
if (i.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
|
|
2259
|
+
i.childNodes.forEach(r);
|
|
2260
2260
|
return;
|
|
2261
2261
|
}
|
|
2262
|
-
if (
|
|
2263
|
-
const
|
|
2262
|
+
if (i.nodeType !== Node.ELEMENT_NODE) return;
|
|
2263
|
+
const s = i, l = s.getAttribute("data-mention-value");
|
|
2264
2264
|
if (l) {
|
|
2265
|
-
const u =
|
|
2265
|
+
const u = s.getAttribute("data-mention-label") || (s.textContent || "").trim();
|
|
2266
2266
|
if (u) {
|
|
2267
|
-
const
|
|
2268
|
-
n += `[${u}](${
|
|
2267
|
+
const m = si(l);
|
|
2268
|
+
n += `[${u}](${m})`, a += `<a href="@${xt(m)}">@${xt(u)}</a>`;
|
|
2269
2269
|
}
|
|
2270
2270
|
return;
|
|
2271
2271
|
}
|
|
2272
|
-
if (
|
|
2272
|
+
if (s.tagName === "BR") {
|
|
2273
2273
|
n += `
|
|
2274
2274
|
`, a += "<br>";
|
|
2275
2275
|
return;
|
|
2276
2276
|
}
|
|
2277
|
-
if (
|
|
2277
|
+
if (s.tagName === "P" || s.tagName === "DIV") {
|
|
2278
2278
|
n && !n.endsWith(`
|
|
2279
2279
|
`) && (n += `
|
|
2280
|
-
`),
|
|
2280
|
+
`), i.childNodes.forEach(r);
|
|
2281
2281
|
return;
|
|
2282
2282
|
}
|
|
2283
|
-
|
|
2283
|
+
i.childNodes.forEach(r);
|
|
2284
2284
|
};
|
|
2285
2285
|
return r(o), n ? { text: n, html: a } : null;
|
|
2286
|
-
},
|
|
2287
|
-
const t =
|
|
2288
|
-
if (!
|
|
2286
|
+
}, li = ({ children: e }) => {
|
|
2287
|
+
const t = Yt.Children.map(e, (n) => {
|
|
2288
|
+
if (!Yt.isValidElement(n)) return n;
|
|
2289
2289
|
const a = n.props.children;
|
|
2290
2290
|
return typeof a != "string" ? n : {
|
|
2291
2291
|
...n,
|
|
2292
2292
|
props: {
|
|
2293
2293
|
...n.props,
|
|
2294
|
-
children:
|
|
2294
|
+
children: ri(a)
|
|
2295
2295
|
}
|
|
2296
2296
|
};
|
|
2297
2297
|
}), o = We((n) => {
|
|
2298
2298
|
const a = window.getSelection();
|
|
2299
2299
|
if (!a || a.rangeCount === 0 || a.isCollapsed) return;
|
|
2300
|
-
const r = a.getRangeAt(0),
|
|
2301
|
-
if (!
|
|
2302
|
-
const
|
|
2303
|
-
|
|
2300
|
+
const r = a.getRangeAt(0), i = n.currentTarget;
|
|
2301
|
+
if (!i.contains(r.startContainer) || !i.contains(r.endContainer)) return;
|
|
2302
|
+
const s = ci(i, r);
|
|
2303
|
+
s && (n.preventDefault(), n.clipboardData.setData("text/plain", s.text), n.clipboardData.setData("text/html", s.html));
|
|
2304
2304
|
}, []);
|
|
2305
2305
|
return /* @__PURE__ */ c("div", { className: "comment-text", onCopy: o, children: t });
|
|
2306
|
-
},
|
|
2306
|
+
}, di = ["tip", "status"], ui = ["textDirective", "leafDirective", "containerDirective"], On = (e) => ({ type: "text", value: e }), kt = (e) => ({ type: "paragraph", children: [On(e)] }), pi = (e, t) => {
|
|
2307
|
+
const o = e.position?.start.offset, n = e.position?.end.offset;
|
|
2308
|
+
return o === void 0 || n === void 0 ? null : t.slice(o, n);
|
|
2309
|
+
}, mi = (e, t) => {
|
|
2310
|
+
const o = pi(e, t);
|
|
2311
|
+
if (o === null) return null;
|
|
2312
|
+
if (e.type === "textDirective") return [On(o)];
|
|
2313
|
+
if (e.type === "leafDirective") return [kt(o)];
|
|
2314
|
+
const [n, ...a] = o.split(`
|
|
2315
|
+
`), r = a.length ? a[a.length - 1].match(/:{3,}\s*$/) : null;
|
|
2316
|
+
return [kt(n), ...e.children || [], ...r ? [kt(r[0])] : []];
|
|
2317
|
+
}, jn = (e, t, o) => {
|
|
2318
|
+
if (!e.children) return;
|
|
2319
|
+
const n = [];
|
|
2320
|
+
for (const a of e.children) {
|
|
2321
|
+
const i = ui.includes(a.type) && !o.includes(a.name || "") ? mi(a, t) : null;
|
|
2322
|
+
n.push(...i || [a]);
|
|
2323
|
+
}
|
|
2324
|
+
e.children = n, n.forEach((a) => jn(a, t, o));
|
|
2325
|
+
}, gi = (e = di) => (t, o) => {
|
|
2326
|
+
jn(t, String(o.value ?? ""), e);
|
|
2327
|
+
}, hi = (e = [], t) => {
|
|
2307
2328
|
let o = {};
|
|
2308
2329
|
return e.forEach((n) => {
|
|
2309
2330
|
const a = n.reaction;
|
|
2310
|
-
|
|
2311
|
-
}),
|
|
2312
|
-
},
|
|
2331
|
+
Dt.includes(a) && (o[a] === void 0 && (o[a] = { type: a, isActive: !1, users: [] }), t == n.userName && (o[a].isActive = !0), o[a].users?.push(n.fullName || n.userName));
|
|
2332
|
+
}), ei(Object.values(o));
|
|
2333
|
+
}, fi = F.div`
|
|
2313
2334
|
display: flex;
|
|
2314
2335
|
align-items: center;
|
|
2315
2336
|
gap: var(--base-gap-small);
|
|
2316
|
-
`,
|
|
2337
|
+
`, yi = F.span`
|
|
2317
2338
|
border-radius: var(--border-radius-m);
|
|
2318
2339
|
padding: 2px 6px;
|
|
2319
2340
|
margin: 0 2px;
|
|
@@ -2328,21 +2349,21 @@ ${ee}` : ee), Ke.current?.focus();
|
|
|
2328
2349
|
|
|
2329
2350
|
.icon {
|
|
2330
2351
|
font-size: 16px;
|
|
2331
|
-
font-variation-settings: 'FILL' 1
|
|
2352
|
+
font-variation-settings: 'FILL' 1;
|
|
2332
2353
|
}
|
|
2333
|
-
`,
|
|
2334
|
-
const n =
|
|
2335
|
-
return /* @__PURE__ */ x(
|
|
2354
|
+
`, vi = ({ name: e, statuses: t, children: o }) => {
|
|
2355
|
+
const n = bi(e, t);
|
|
2356
|
+
return /* @__PURE__ */ x(fi, { children: [
|
|
2336
2357
|
o,
|
|
2337
|
-
/* @__PURE__ */ x(
|
|
2358
|
+
/* @__PURE__ */ x(yi, { $color: It(n.color), style: { backgroundColor: n.color }, children: [
|
|
2338
2359
|
n.icon && /* @__PURE__ */ c(re, { icon: n.icon }),
|
|
2339
2360
|
e
|
|
2340
2361
|
] })
|
|
2341
2362
|
] });
|
|
2342
|
-
},
|
|
2363
|
+
}, bi = (e, t) => {
|
|
2343
2364
|
const o = { name: e, color: "var(--md-sys-color-primary)", icon: void 0 };
|
|
2344
2365
|
return t.find((n) => n.name === e) || o;
|
|
2345
|
-
},
|
|
2366
|
+
}, wi = F.header`
|
|
2346
2367
|
display: flex;
|
|
2347
2368
|
align-items: flex-end;
|
|
2348
2369
|
gap: var(--base-gap-small);
|
|
@@ -2354,7 +2375,7 @@ ${ee}` : ee), Ke.current?.focus();
|
|
|
2354
2375
|
margin-left: 4px;
|
|
2355
2376
|
font-weight: 800;
|
|
2356
2377
|
}
|
|
2357
|
-
`,
|
|
2378
|
+
`, xi = F.div`
|
|
2358
2379
|
display: flex;
|
|
2359
2380
|
gap: var(--base-gap-small);
|
|
2360
2381
|
align-items: center;
|
|
@@ -2376,14 +2397,14 @@ F.li`
|
|
|
2376
2397
|
background-color: var(--md-sys-color-surface-container-hover);
|
|
2377
2398
|
}
|
|
2378
2399
|
`;
|
|
2379
|
-
const
|
|
2400
|
+
const At = F.span`
|
|
2380
2401
|
color: var(--md-sys-color-outline);
|
|
2381
2402
|
white-space: nowrap;
|
|
2382
2403
|
|
|
2383
2404
|
strong {
|
|
2384
2405
|
font-weight: 800;
|
|
2385
2406
|
}
|
|
2386
|
-
`,
|
|
2407
|
+
`, ki = F.li`
|
|
2387
2408
|
list-style: none;
|
|
2388
2409
|
margin: var(--padding-s) var(--padding-m);
|
|
2389
2410
|
padding: var(--padding-s) var(--padding-m) var(--padding-s) 0;
|
|
@@ -2410,7 +2431,7 @@ const kt = F.span`
|
|
|
2410
2431
|
&.request_changes .date, {
|
|
2411
2432
|
color: var(--md-sys-color-error);
|
|
2412
2433
|
}
|
|
2413
|
-
`,
|
|
2434
|
+
`, Ai = F.div`
|
|
2414
2435
|
display: flex;
|
|
2415
2436
|
flex-wrap: nowrap;
|
|
2416
2437
|
align-items: center;
|
|
@@ -2421,7 +2442,7 @@ const kt = F.span`
|
|
|
2421
2442
|
width: 100%;
|
|
2422
2443
|
|
|
2423
2444
|
.icon {
|
|
2424
|
-
font-variation-settings: 'FILL' 1
|
|
2445
|
+
font-variation-settings: 'FILL' 1;
|
|
2425
2446
|
font-size: 16px;
|
|
2426
2447
|
}
|
|
2427
2448
|
|
|
@@ -2429,7 +2450,7 @@ const kt = F.span`
|
|
|
2429
2450
|
color: var(--md-sys-color-outline);
|
|
2430
2451
|
opacity: 0.5;
|
|
2431
2452
|
}
|
|
2432
|
-
`,
|
|
2453
|
+
`, Fi = F.span`
|
|
2433
2454
|
white-space: nowrap;
|
|
2434
2455
|
font-size: 12px;
|
|
2435
2456
|
text-overflow: ellipsis;
|
|
@@ -2440,16 +2461,16 @@ const kt = F.span`
|
|
|
2440
2461
|
font-size: 12px;
|
|
2441
2462
|
font-weight: 800;
|
|
2442
2463
|
}
|
|
2443
|
-
`,
|
|
2444
|
-
function
|
|
2445
|
-
const { categories: t } =
|
|
2464
|
+
`, Ci = "#c5c5c5";
|
|
2465
|
+
function Vn(e) {
|
|
2466
|
+
const { categories: t } = $e(), { categoryData: o, categoryNotFound: n } = N(() => {
|
|
2446
2467
|
let a = !1;
|
|
2447
2468
|
if (e) {
|
|
2448
|
-
const r = t.find((
|
|
2469
|
+
const r = t.find((i) => i.name === e);
|
|
2449
2470
|
return r || (a = !0), {
|
|
2450
2471
|
categoryData: r || {
|
|
2451
2472
|
name: e,
|
|
2452
|
-
color:
|
|
2473
|
+
color: Ci
|
|
2453
2474
|
},
|
|
2454
2475
|
categoryNotFound: a
|
|
2455
2476
|
};
|
|
@@ -2461,21 +2482,21 @@ function Ln(e) {
|
|
|
2461
2482
|
}, [e, t]);
|
|
2462
2483
|
return { categoryData: o, categoryNotFound: n };
|
|
2463
2484
|
}
|
|
2464
|
-
const
|
|
2465
|
-
const { authorName: o, authorFullName: n, createdAt: a, activityData: r } = t || {},
|
|
2485
|
+
const Ti = "anonymous.guest", Di = "Anonymous User", Ni = "unknown.user", zn = (e) => !e || !e.name ? Ni : e.name === Ti && !e.label ? Di : e.label ? e.label : e.name, Nt = "anonymous.guest", Si = ({ isGuest: e, activity: t }) => {
|
|
2486
|
+
const { authorName: o, authorFullName: n, createdAt: a, activityData: r } = t || {}, i = N(
|
|
2466
2487
|
() => [
|
|
2467
|
-
|
|
2468
|
-
|
|
2488
|
+
zn({ name: o, label: n }),
|
|
2489
|
+
Pn(r?.feedback ?? Ce.APPROVE)
|
|
2469
2490
|
].join(" "),
|
|
2470
2491
|
[n, o, r?.feedback, a]
|
|
2471
|
-
), { categoryData:
|
|
2472
|
-
if (!o?.startsWith(
|
|
2492
|
+
), { categoryData: s, categoryNotFound: l } = Vn(r?.category), u = N(() => {
|
|
2493
|
+
if (!o?.startsWith(Nt))
|
|
2473
2494
|
return `/api/users/${o}/avatar`;
|
|
2474
2495
|
}, [o]);
|
|
2475
2496
|
if (r?.feedback)
|
|
2476
|
-
return /* @__PURE__ */ c(
|
|
2497
|
+
return /* @__PURE__ */ c(ki, { className: fn(r.feedback), children: /* @__PURE__ */ x(Ai, { children: [
|
|
2477
2498
|
o && /* @__PURE__ */ c(
|
|
2478
|
-
|
|
2499
|
+
xn,
|
|
2479
2500
|
{
|
|
2480
2501
|
name: o,
|
|
2481
2502
|
fullName: n,
|
|
@@ -2483,98 +2504,98 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
2483
2504
|
size: 22
|
|
2484
2505
|
}
|
|
2485
2506
|
),
|
|
2486
|
-
/* @__PURE__ */ c(re, { icon:
|
|
2487
|
-
|
|
2507
|
+
/* @__PURE__ */ c(re, { icon: $n(r.feedback) }),
|
|
2508
|
+
s && !e && /* @__PURE__ */ c(
|
|
2488
2509
|
ot,
|
|
2489
2510
|
{
|
|
2490
|
-
value:
|
|
2491
|
-
color:
|
|
2511
|
+
value: s.name,
|
|
2512
|
+
color: s.color,
|
|
2492
2513
|
isCompact: !0,
|
|
2493
2514
|
"data-tooltip": l ? "Category not found. It may have been deleted." : void 0,
|
|
2494
2515
|
"data-tooltip-delay": 0
|
|
2495
2516
|
}
|
|
2496
2517
|
),
|
|
2497
|
-
/* @__PURE__ */ c(
|
|
2518
|
+
/* @__PURE__ */ c(Fi, { children: i }),
|
|
2498
2519
|
/* @__PURE__ */ c(st, { date: a, exactTooltip: !0 })
|
|
2499
2520
|
] }) });
|
|
2500
|
-
},
|
|
2521
|
+
}, Un = ({
|
|
2501
2522
|
name: e,
|
|
2502
2523
|
fullName: t,
|
|
2503
2524
|
date: o,
|
|
2504
2525
|
isRef: n,
|
|
2505
2526
|
activity: a = {},
|
|
2506
2527
|
children: r,
|
|
2507
|
-
projectName:
|
|
2508
|
-
entityType:
|
|
2528
|
+
projectName: i,
|
|
2529
|
+
entityType: s,
|
|
2509
2530
|
onReferenceClick: l,
|
|
2510
2531
|
onReferenceTooltip: u
|
|
2511
2532
|
}) => {
|
|
2512
|
-
const { referenceType:
|
|
2513
|
-
if (!e?.startsWith(
|
|
2533
|
+
const { referenceType: m, origin: p, activityType: g, versions: f, activityId: h } = a, b = m === "mention", D = g === "version.publish", v = f && f?.length > 1 ? "published versions" : "published a version", y = b ? "mentioned" : "commented", A = b ? ` ${s} on` : "on", C = e?.startsWith("guest.") || e?.startsWith(Nt), S = (a.author?.deleted || !a.author?.active) && !C, M = N(() => {
|
|
2534
|
+
if (!e?.startsWith(Nt))
|
|
2514
2535
|
return `/api/users/${e}/avatar`;
|
|
2515
2536
|
}, [e]);
|
|
2516
|
-
return /* @__PURE__ */ x(
|
|
2517
|
-
/* @__PURE__ */ x(
|
|
2518
|
-
e && !S && /* @__PURE__ */ c(
|
|
2537
|
+
return /* @__PURE__ */ x(wi, { children: [
|
|
2538
|
+
/* @__PURE__ */ x(xi, { children: [
|
|
2539
|
+
e && !S && /* @__PURE__ */ c(xn, { name: e, fullName: t, src: M, size: 22 }),
|
|
2519
2540
|
S && /* @__PURE__ */ c(re, { icon: "account_circle" }),
|
|
2520
2541
|
/* @__PURE__ */ c("h5", { children: t || a.activityData?.author || "Unknown" }),
|
|
2521
2542
|
n && /* @__PURE__ */ x(Ae, { children: [
|
|
2522
|
-
/* @__PURE__ */ c(
|
|
2523
|
-
/* @__PURE__ */ c(
|
|
2524
|
-
|
|
2525
|
-
|
|
2543
|
+
/* @__PURE__ */ c(At, { children: /* @__PURE__ */ c("strong", { children: y }) }),
|
|
2544
|
+
/* @__PURE__ */ c(At, { style: { overflow: "hidden", textOverflow: "ellipsis" }, children: A }),
|
|
2545
|
+
p && /* @__PURE__ */ c(
|
|
2546
|
+
Yo,
|
|
2526
2547
|
{
|
|
2527
|
-
id:
|
|
2528
|
-
type:
|
|
2548
|
+
id: p.id,
|
|
2549
|
+
type: p.type,
|
|
2529
2550
|
variant: "text",
|
|
2530
2551
|
onClick: () => l?.({
|
|
2531
|
-
entityId:
|
|
2532
|
-
entityType:
|
|
2533
|
-
projectName:
|
|
2552
|
+
entityId: p.id,
|
|
2553
|
+
entityType: p.type,
|
|
2554
|
+
projectName: i,
|
|
2534
2555
|
activityId: h
|
|
2535
2556
|
}),
|
|
2536
2557
|
onMouseEnter: (I, E) => u?.({
|
|
2537
|
-
type:
|
|
2538
|
-
id:
|
|
2539
|
-
label:
|
|
2540
|
-
name:
|
|
2558
|
+
type: p.type,
|
|
2559
|
+
id: p.id,
|
|
2560
|
+
label: p.label,
|
|
2561
|
+
name: p.id,
|
|
2541
2562
|
pos: E
|
|
2542
2563
|
}),
|
|
2543
|
-
children:
|
|
2564
|
+
children: p.label || p.name
|
|
2544
2565
|
}
|
|
2545
2566
|
)
|
|
2546
2567
|
] }),
|
|
2547
|
-
D && /* @__PURE__ */ c(
|
|
2568
|
+
D && /* @__PURE__ */ c(At, { children: v }),
|
|
2548
2569
|
r
|
|
2549
2570
|
] }),
|
|
2550
2571
|
/* @__PURE__ */ c(st, { date: o })
|
|
2551
2572
|
] });
|
|
2552
|
-
},
|
|
2553
|
-
|
|
2573
|
+
}, Ii = ({ flags: e }) => e.length ? /* @__PURE__ */ c(Jo, { children: e.map(({ id: t, label: o, icon: n, tooltip: a, onClick: r, disabled: i, testId: s }) => /* @__PURE__ */ x(
|
|
2574
|
+
Xo,
|
|
2554
2575
|
{
|
|
2555
2576
|
as: r ? "button" : "span",
|
|
2556
2577
|
type: r ? "button" : void 0,
|
|
2557
2578
|
onClick: r,
|
|
2558
|
-
disabled: r ?
|
|
2579
|
+
disabled: r ? i : void 0,
|
|
2559
2580
|
"data-tooltip": a,
|
|
2560
2581
|
"data-tooltip-delay": 0,
|
|
2561
|
-
"data-testid":
|
|
2582
|
+
"data-testid": s,
|
|
2562
2583
|
children: [
|
|
2563
2584
|
n && /* @__PURE__ */ c(re, { icon: n }),
|
|
2564
2585
|
o
|
|
2565
2586
|
]
|
|
2566
2587
|
},
|
|
2567
2588
|
t
|
|
2568
|
-
)) }) : null,
|
|
2589
|
+
)) }) : null, Ei = ({
|
|
2569
2590
|
category: e,
|
|
2570
2591
|
categoryNotFound: t,
|
|
2571
2592
|
frameLink: o,
|
|
2572
2593
|
formatFrame: n,
|
|
2573
2594
|
onFrameLinkClick: a,
|
|
2574
2595
|
canNavigateToFrame: r,
|
|
2575
|
-
isGuest:
|
|
2596
|
+
isGuest: i
|
|
2576
2597
|
}) => [
|
|
2577
|
-
...!
|
|
2598
|
+
...!i && e ? [
|
|
2578
2599
|
{
|
|
2579
2600
|
id: "category",
|
|
2580
2601
|
label: e.name,
|
|
@@ -2592,18 +2613,18 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
2592
2613
|
testId: "comment-frame-link-chip"
|
|
2593
2614
|
}
|
|
2594
2615
|
] : []
|
|
2595
|
-
],
|
|
2616
|
+
], Mi = ({
|
|
2596
2617
|
onDelete: e,
|
|
2597
2618
|
onEdit: t,
|
|
2598
2619
|
onCopyText: o,
|
|
2599
2620
|
onDuplicate: n,
|
|
2600
2621
|
onSelect: a,
|
|
2601
2622
|
activityId: r,
|
|
2602
|
-
projectName:
|
|
2603
|
-
entity:
|
|
2623
|
+
projectName: i,
|
|
2624
|
+
entity: s
|
|
2604
2625
|
}) => {
|
|
2605
|
-
const l = [], u = (
|
|
2606
|
-
a?.(),
|
|
2626
|
+
const l = [], u = (m) => () => {
|
|
2627
|
+
a?.(), m();
|
|
2607
2628
|
};
|
|
2608
2629
|
return t && l.push({
|
|
2609
2630
|
id: "edit",
|
|
@@ -2624,27 +2645,27 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
2624
2645
|
id: "copy-link",
|
|
2625
2646
|
label: "Copy link",
|
|
2626
2647
|
icon: "link",
|
|
2627
|
-
onClick: u(() =>
|
|
2648
|
+
onClick: u(() => Tn(Ko(i, r, s)))
|
|
2628
2649
|
}), e && l.push({
|
|
2629
2650
|
id: "delete",
|
|
2630
2651
|
label: "Delete",
|
|
2631
2652
|
icon: "delete",
|
|
2632
2653
|
onClick: u(e),
|
|
2633
2654
|
danger: !0
|
|
2634
|
-
}), /* @__PURE__ */ c(
|
|
2635
|
-
},
|
|
2655
|
+
}), /* @__PURE__ */ c(ua, { menu: l });
|
|
2656
|
+
}, _i = ({
|
|
2636
2657
|
activity: e = {},
|
|
2637
2658
|
onCheckChange: t,
|
|
2638
2659
|
onDelete: o,
|
|
2639
2660
|
onUpdate: n,
|
|
2640
2661
|
onDuplicate: a,
|
|
2641
2662
|
projectInfo: r,
|
|
2642
|
-
editProps:
|
|
2643
|
-
projectName:
|
|
2663
|
+
editProps: i,
|
|
2664
|
+
projectName: s,
|
|
2644
2665
|
entityType: l,
|
|
2645
2666
|
onReferenceClick: u,
|
|
2646
|
-
onFileExpand:
|
|
2647
|
-
showOrigin:
|
|
2667
|
+
onFileExpand: m,
|
|
2668
|
+
showOrigin: p,
|
|
2648
2669
|
isHighlighted: g,
|
|
2649
2670
|
readOnly: f,
|
|
2650
2671
|
statuses: h = []
|
|
@@ -2652,17 +2673,17 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
2652
2673
|
const {
|
|
2653
2674
|
userName: b,
|
|
2654
2675
|
createReaction: D,
|
|
2655
|
-
deleteReaction:
|
|
2676
|
+
deleteReaction: $,
|
|
2656
2677
|
editingId: v,
|
|
2657
2678
|
setEditingId: y,
|
|
2658
2679
|
isGuest: A,
|
|
2659
2680
|
userTeamNames: C
|
|
2660
|
-
} =
|
|
2681
|
+
} = $e(), S = fe(null), { toggleMenuOpen: M, menuOpen: I } = $a(), { categoryData: E, categoryNotFound: P } = Vn(e?.activityData?.category), H = Sn(E?.color);
|
|
2661
2682
|
let {
|
|
2662
2683
|
body: Q,
|
|
2663
2684
|
authorName: X,
|
|
2664
2685
|
authorFullName: q,
|
|
2665
|
-
createdAt:
|
|
2686
|
+
createdAt: R,
|
|
2666
2687
|
referenceType: ue,
|
|
2667
2688
|
entityId: J,
|
|
2668
2689
|
activityId: W,
|
|
@@ -2671,40 +2692,40 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
2671
2692
|
files: ne = [],
|
|
2672
2693
|
origin: K
|
|
2673
2694
|
} = e;
|
|
2674
|
-
X || (X = ve?.name || ""), q =
|
|
2675
|
-
const Ye =
|
|
2695
|
+
X || (X = ve?.name || ""), q = zn({ name: X, label: q });
|
|
2696
|
+
const Ye = mo(), Te = `activity-comment-menu-${W}-${Ye}`, De = I === Te, { onGoToFrame: pe, setHighlightedActivities: me, user: Ie, commentFrameLink: Z } = ze(), Ne = !!Ie?.data?.isAdmin, Re = O || Ne, Ee = O || Ne, Fe = () => {
|
|
2676
2697
|
y(W);
|
|
2677
2698
|
}, Je = () => {
|
|
2678
2699
|
y(null);
|
|
2679
2700
|
}, Le = async (T, le, we) => {
|
|
2680
2701
|
await n?.(T, le, void 0, we), y(null);
|
|
2681
2702
|
}, ye = v === W, Ue = ({ activityId: T, url: le }) => {
|
|
2682
|
-
document.getElementById(T) ?
|
|
2683
|
-
}, Be = ue !== "origin" ||
|
|
2684
|
-
const T =
|
|
2703
|
+
document.getElementById(T) ? me([T]) : window.open(le, "_blank", "noreferrer");
|
|
2704
|
+
}, Be = ue !== "origin" || p, oe = async () => {
|
|
2705
|
+
const T = ai(Q);
|
|
2685
2706
|
Be && K && T.push({ id: K.id, type: K.type }), o && await o(W, J, T);
|
|
2686
2707
|
}, Xe = () => {
|
|
2687
|
-
|
|
2708
|
+
Ya({
|
|
2688
2709
|
title: "Delete comment",
|
|
2689
2710
|
message: "Are you sure you want to delete this comment?",
|
|
2690
2711
|
accept: async () => {
|
|
2691
2712
|
await oe();
|
|
2692
2713
|
}
|
|
2693
2714
|
});
|
|
2694
|
-
}, [, Me] =
|
|
2695
|
-
() =>
|
|
2715
|
+
}, [, Me] = Cn(), Ge = N(
|
|
2716
|
+
() => hi(e.reactions, b),
|
|
2696
2717
|
[[...e.reactions || []]]
|
|
2697
2718
|
), _e = (T) => {
|
|
2698
2719
|
T.isActive ? D({
|
|
2699
|
-
projectName:
|
|
2720
|
+
projectName: s,
|
|
2700
2721
|
// @ts-ignore exposed endpoint doesn't need the username, we still need to pass it for the optimistic update
|
|
2701
2722
|
userName: b,
|
|
2702
2723
|
activityId: W,
|
|
2703
2724
|
createReactionModel: {
|
|
2704
2725
|
reaction: T.type
|
|
2705
2726
|
}
|
|
2706
|
-
}) :
|
|
2707
|
-
projectName:
|
|
2727
|
+
}) : $({
|
|
2728
|
+
projectName: s,
|
|
2708
2729
|
// @ts-ignore exposed endpoint doesn't need the username, we still need to pass it for the optimistic update
|
|
2709
2730
|
userName: b,
|
|
2710
2731
|
activityId: W,
|
|
@@ -2712,21 +2733,21 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
2712
2733
|
});
|
|
2713
2734
|
}, Oe = We(
|
|
2714
2735
|
(T) => {
|
|
2715
|
-
T.annotation && (
|
|
2736
|
+
T.annotation && (pe?.(T.annotation.range[0]), me([W]));
|
|
2716
2737
|
},
|
|
2717
|
-
[
|
|
2718
|
-
), be = N(() =>
|
|
2738
|
+
[pe]
|
|
2739
|
+
), be = N(() => Et(Q), [Q]), Pe = N(
|
|
2719
2740
|
() => (ne || []).filter((T) => !be.has(T.id)),
|
|
2720
2741
|
[ne, be]
|
|
2721
2742
|
), w = (T) => {
|
|
2722
|
-
const le =
|
|
2723
|
-
xe !== -1 &&
|
|
2724
|
-
}, _ = N(() =>
|
|
2725
|
-
j && (Z ? Z.goTo(j) :
|
|
2743
|
+
const le = sa(T), we = (ne || []).filter((je) => gt(je.mime, je.ext)), xe = we.findIndex((je) => je.id === le);
|
|
2744
|
+
xe !== -1 && m?.({ files: we, index: xe, activityId: W });
|
|
2745
|
+
}, _ = N(() => Fn(Q || ""), [Q]), j = N(() => _t(e), [e]), U = Z?.formatFrame ?? String, ie = () => {
|
|
2746
|
+
j && (Z ? Z.goTo(j) : pe?.(j.startFrame), me([W]));
|
|
2726
2747
|
};
|
|
2727
2748
|
return /* @__PURE__ */ x(Ae, { children: [
|
|
2728
2749
|
/* @__PURE__ */ x(
|
|
2729
|
-
|
|
2750
|
+
Zo,
|
|
2730
2751
|
{
|
|
2731
2752
|
className: te("comment", {
|
|
2732
2753
|
isOwner: O,
|
|
@@ -2741,25 +2762,25 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
2741
2762
|
$categorySecondary: H.secondary,
|
|
2742
2763
|
children: [
|
|
2743
2764
|
/* @__PURE__ */ c(
|
|
2744
|
-
|
|
2765
|
+
Un,
|
|
2745
2766
|
{
|
|
2746
2767
|
name: X,
|
|
2747
2768
|
fullName: q,
|
|
2748
|
-
date:
|
|
2769
|
+
date: R,
|
|
2749
2770
|
isRef: Be,
|
|
2750
2771
|
activity: e,
|
|
2751
|
-
projectName:
|
|
2772
|
+
projectName: s,
|
|
2752
2773
|
entityType: l,
|
|
2753
2774
|
onReferenceClick: u,
|
|
2754
2775
|
onReferenceTooltip: Me,
|
|
2755
2776
|
children: void 0
|
|
2756
2777
|
}
|
|
2757
2778
|
),
|
|
2758
|
-
/* @__PURE__ */ x(
|
|
2759
|
-
!f && /* @__PURE__ */ x(
|
|
2760
|
-
Ee && /* @__PURE__ */ c(
|
|
2779
|
+
/* @__PURE__ */ x(ea, { className: te("comment-body", { isEditing: ye }), children: [
|
|
2780
|
+
!f && /* @__PURE__ */ x(ta, { className: "tools", children: [
|
|
2781
|
+
Ee && /* @__PURE__ */ c(Kt, { icon: "edit_square", onClick: Fe, variant: "text" }),
|
|
2761
2782
|
/* @__PURE__ */ c(
|
|
2762
|
-
|
|
2783
|
+
Kt,
|
|
2763
2784
|
{
|
|
2764
2785
|
icon: "more_horiz",
|
|
2765
2786
|
ref: S,
|
|
@@ -2783,39 +2804,45 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
2783
2804
|
onClose: Je,
|
|
2784
2805
|
onSubmit: Le,
|
|
2785
2806
|
isOpen: !0,
|
|
2786
|
-
...
|
|
2807
|
+
...i
|
|
2787
2808
|
}
|
|
2788
2809
|
) : /* @__PURE__ */ x(Ae, { children: [
|
|
2789
2810
|
/* @__PURE__ */ c(
|
|
2790
|
-
|
|
2811
|
+
Ii,
|
|
2791
2812
|
{
|
|
2792
|
-
flags:
|
|
2813
|
+
flags: Ei({
|
|
2793
2814
|
category: E,
|
|
2794
2815
|
categoryNotFound: P,
|
|
2795
2816
|
frameLink: j,
|
|
2796
2817
|
formatFrame: U,
|
|
2797
2818
|
onFrameLinkClick: ie,
|
|
2798
|
-
canNavigateToFrame: !!Z || !!
|
|
2819
|
+
canNavigateToFrame: !!Z || !!pe,
|
|
2799
2820
|
isGuest: A
|
|
2800
2821
|
})
|
|
2801
2822
|
}
|
|
2802
2823
|
),
|
|
2803
|
-
/* @__PURE__ */ c(
|
|
2804
|
-
|
|
2824
|
+
/* @__PURE__ */ c(li, { children: /* @__PURE__ */ c(
|
|
2825
|
+
yn,
|
|
2805
2826
|
{
|
|
2806
|
-
remarkPlugins: [
|
|
2827
|
+
remarkPlugins: [
|
|
2828
|
+
bn,
|
|
2829
|
+
vn,
|
|
2830
|
+
ho,
|
|
2831
|
+
gi,
|
|
2832
|
+
fo
|
|
2833
|
+
],
|
|
2807
2834
|
urlTransform: (T) => T,
|
|
2808
2835
|
components: {
|
|
2809
2836
|
// a links
|
|
2810
2837
|
// @ts-ignore
|
|
2811
2838
|
a: (T) => (
|
|
2812
2839
|
// @ts-ignore
|
|
2813
|
-
|
|
2840
|
+
ia(T, {
|
|
2814
2841
|
entityId: K?.id ?? J,
|
|
2815
2842
|
entityType: K?.type ?? l,
|
|
2816
2843
|
userName: b,
|
|
2817
2844
|
userTeamNames: C,
|
|
2818
|
-
projectName:
|
|
2845
|
+
projectName: s,
|
|
2819
2846
|
onReferenceClick: u,
|
|
2820
2847
|
onReferenceTooltip: Me,
|
|
2821
2848
|
activityId: W,
|
|
@@ -2826,43 +2853,43 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
2826
2853
|
),
|
|
2827
2854
|
// checkbox inputs
|
|
2828
2855
|
// @ts-ignore
|
|
2829
|
-
input: (T) =>
|
|
2856
|
+
input: (T) => ra(T, { activity: e, onCheckChange: t }),
|
|
2830
2857
|
// code syntax highlighting
|
|
2831
2858
|
// eslint-disable-next-line
|
|
2832
2859
|
// @ts-ignore
|
|
2833
|
-
code: (T) =>
|
|
2860
|
+
code: (T) => aa(T),
|
|
2834
2861
|
// @ts-ignore
|
|
2835
|
-
blockquote: (T) =>
|
|
2862
|
+
blockquote: (T) => oa(T),
|
|
2836
2863
|
// @ts-ignore
|
|
2837
|
-
tip: (T) => /* @__PURE__ */ x(
|
|
2864
|
+
tip: (T) => /* @__PURE__ */ x(na, { children: [
|
|
2838
2865
|
/* @__PURE__ */ c(re, { icon: "info" }),
|
|
2839
2866
|
T.children
|
|
2840
2867
|
] }),
|
|
2841
2868
|
// a video url on its own line is an embedded video
|
|
2842
2869
|
// @ts-ignore
|
|
2843
|
-
p: (T) =>
|
|
2870
|
+
p: (T) => Ka(T, { onOpen: w }) ?? Xa(T) ?? /* @__PURE__ */ c("p", { children: T.children }),
|
|
2844
2871
|
// @ts-ignore
|
|
2845
|
-
status: (T) => /* @__PURE__ */ c(
|
|
2872
|
+
status: (T) => /* @__PURE__ */ c(vi, { name: T.id, statuses: h, children: T.children })
|
|
2846
2873
|
},
|
|
2847
2874
|
children: _
|
|
2848
2875
|
}
|
|
2849
2876
|
) }),
|
|
2850
2877
|
/* @__PURE__ */ c(
|
|
2851
|
-
|
|
2878
|
+
Nn,
|
|
2852
2879
|
{
|
|
2853
2880
|
files: Pe,
|
|
2854
2881
|
isCompact: Pe.length > 6,
|
|
2855
2882
|
activityId: W,
|
|
2856
|
-
projectName:
|
|
2883
|
+
projectName: s,
|
|
2857
2884
|
isDownloadable: !0,
|
|
2858
|
-
onExpand:
|
|
2885
|
+
onExpand: m,
|
|
2859
2886
|
onAnnotationClick: Oe,
|
|
2860
2887
|
onRemove: void 0
|
|
2861
2888
|
}
|
|
2862
2889
|
)
|
|
2863
2890
|
] }),
|
|
2864
2891
|
!ye && /* @__PURE__ */ c("div", { style: { marginTop: "16px" }, children: Ge && /* @__PURE__ */ c(
|
|
2865
|
-
|
|
2892
|
+
oi,
|
|
2866
2893
|
{
|
|
2867
2894
|
reactions: Ge,
|
|
2868
2895
|
changeHandler: _e,
|
|
@@ -2878,7 +2905,7 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
2878
2905
|
}
|
|
2879
2906
|
),
|
|
2880
2907
|
/* @__PURE__ */ c(
|
|
2881
|
-
|
|
2908
|
+
pa,
|
|
2882
2909
|
{
|
|
2883
2910
|
target: S.current,
|
|
2884
2911
|
id: Te,
|
|
@@ -2887,22 +2914,22 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
2887
2914
|
T?.stopPropagation(), M(!1);
|
|
2888
2915
|
},
|
|
2889
2916
|
children: /* @__PURE__ */ c(
|
|
2890
|
-
|
|
2917
|
+
Mi,
|
|
2891
2918
|
{
|
|
2892
|
-
onDelete:
|
|
2919
|
+
onDelete: Re && o ? Xe : void 0,
|
|
2893
2920
|
onEdit: Ee ? Fe : void 0,
|
|
2894
|
-
onCopyText: _ ? () =>
|
|
2921
|
+
onCopyText: _ ? () => Tn(_) : void 0,
|
|
2895
2922
|
onDuplicate: a ? () => a(e) : void 0,
|
|
2896
2923
|
activityId: W,
|
|
2897
2924
|
onSelect: () => M(!1),
|
|
2898
|
-
projectName:
|
|
2925
|
+
projectName: s,
|
|
2899
2926
|
entity: K ?? (J ? { id: J, type: l } : void 0)
|
|
2900
2927
|
}
|
|
2901
2928
|
)
|
|
2902
2929
|
}
|
|
2903
2930
|
)
|
|
2904
2931
|
] });
|
|
2905
|
-
},
|
|
2932
|
+
}, Pi = F.li`
|
|
2906
2933
|
list-style: none;
|
|
2907
2934
|
margin: 0;
|
|
2908
2935
|
padding: 0;
|
|
@@ -2912,7 +2939,7 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
2912
2939
|
padding: 4px 8px;
|
|
2913
2940
|
border-radius: var(--border-radius-m);
|
|
2914
2941
|
user-select: none;
|
|
2915
|
-
`,
|
|
2942
|
+
`, $i = F.div`
|
|
2916
2943
|
display: flex;
|
|
2917
2944
|
flex-wrap: wrap;
|
|
2918
2945
|
align-items: center;
|
|
@@ -2920,14 +2947,14 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
2920
2947
|
gap: var(--base-gap-small);
|
|
2921
2948
|
padding: 0px 4px;
|
|
2922
2949
|
.icon {
|
|
2923
|
-
font-variation-settings: 'FILL' 1
|
|
2950
|
+
font-variation-settings: 'FILL' 1;
|
|
2924
2951
|
font-size: 16px;
|
|
2925
2952
|
}
|
|
2926
2953
|
[icon='trending_flat'] {
|
|
2927
2954
|
color: var(--md-sys-color-outline);
|
|
2928
2955
|
opacity: 0.5;
|
|
2929
2956
|
}
|
|
2930
|
-
`,
|
|
2957
|
+
`, Ft = F.span`
|
|
2931
2958
|
color: var(--md-sys-color-outline);
|
|
2932
2959
|
white-space: nowrap;
|
|
2933
2960
|
font-size: 12px;
|
|
@@ -2935,19 +2962,19 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
2935
2962
|
font-size: 12px;
|
|
2936
2963
|
font-weight: 800;
|
|
2937
2964
|
}
|
|
2938
|
-
`,
|
|
2965
|
+
`, Ri = (e, t) => {
|
|
2939
2966
|
let o = [], n = {};
|
|
2940
2967
|
return e.activityData.origin.type == "folder" && !n.folder && (n.folder = !0, o.push(e.activityData.origin.name)), e.activityData.origin.type == "task" && !n.task && (n.task = !0, o.push(e.activityData.origin.name)), (t == "version" || e.activityData.origin.type == "version") && (n.product || (n.product = !0, o.push(e.activityData.parents?.find((a) => a.type == "product")?.name)), n.version || (n.version = !0, o.push(e.activityData.origin.name))), o;
|
|
2941
|
-
},
|
|
2968
|
+
}, Li = F.div`
|
|
2942
2969
|
display: inline-flex;
|
|
2943
2970
|
align-items: center;
|
|
2944
2971
|
gap: var(--base-gap-small);
|
|
2945
2972
|
min-width: 0;
|
|
2946
2973
|
.icon {
|
|
2947
|
-
font-variation-settings: 'FILL' 1
|
|
2974
|
+
font-variation-settings: 'FILL' 1;
|
|
2948
2975
|
font-size: 16px;
|
|
2949
2976
|
}
|
|
2950
|
-
`,
|
|
2977
|
+
`, Oi = F.span`
|
|
2951
2978
|
color: var(--md-sys-color-outline);
|
|
2952
2979
|
font-size: 12px;
|
|
2953
2980
|
max-width: 300px;
|
|
@@ -2957,37 +2984,37 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
2957
2984
|
span {
|
|
2958
2985
|
font-size: inherit;
|
|
2959
2986
|
}
|
|
2960
|
-
`,
|
|
2961
|
-
({ icon: e, color: t, name: o, items: n, ...a }, r) => /* @__PURE__ */ x(
|
|
2987
|
+
`, St = mt(
|
|
2988
|
+
({ icon: e, color: t, name: o, items: n, ...a }, r) => /* @__PURE__ */ x(Li, { ...a, ref: r, children: [
|
|
2962
2989
|
e && /* @__PURE__ */ c(re, { icon: e, style: { color: t } }),
|
|
2963
|
-
/* @__PURE__ */ c(
|
|
2964
|
-
/* @__PURE__ */ c("span", { style: { color:
|
|
2965
|
-
|
|
2966
|
-
] },
|
|
2990
|
+
/* @__PURE__ */ c(Oi, { title: o, children: n ? n.map((i, s) => /* @__PURE__ */ x(go, { children: [
|
|
2991
|
+
/* @__PURE__ */ c("span", { style: { color: i.color }, children: i.label }),
|
|
2992
|
+
s < n.length - 1 && ", "
|
|
2993
|
+
] }, s)) : o })
|
|
2967
2994
|
] })
|
|
2968
|
-
),
|
|
2995
|
+
), ji = (e) => {
|
|
2969
2996
|
const t = typeof e.icon == "string" ? e.icon : e.icon?.name, o = e.color ?? (typeof e.icon == "object" ? e.icon?.color : void 0);
|
|
2970
2997
|
return { name: e.label, icon: t, color: o };
|
|
2971
|
-
},
|
|
2998
|
+
}, Vi = (e, t) => {
|
|
2972
2999
|
const o = t?.data.enum?.find((n) => n.value === e)?.label;
|
|
2973
3000
|
if (o) return o;
|
|
2974
3001
|
if (t?.data.type === "datetime") {
|
|
2975
3002
|
const n = new Date(String(e));
|
|
2976
|
-
if (!isNaN(n.getTime())) return
|
|
3003
|
+
if (!isNaN(n.getTime())) return ca(n, "dd-MM-yyyy");
|
|
2977
3004
|
}
|
|
2978
3005
|
return String(e);
|
|
2979
|
-
},
|
|
3006
|
+
}, zi = (e, t) => e === "description" || t?.data.widget === "markdown", Ui = (e, t, o) => {
|
|
2980
3007
|
if (e == null || e === "" || Array.isArray(e) && !e.length) return { name: "none" };
|
|
2981
|
-
if (typeof e == "string" &&
|
|
2982
|
-
return { name:
|
|
3008
|
+
if (typeof e == "string" && zi(o, t))
|
|
3009
|
+
return { name: Ja(e) || "none" };
|
|
2983
3010
|
if (t?.data.type === "boolean") return { name: e ? "Checked" : "Unchecked" };
|
|
2984
3011
|
const a = Array.isArray(e) ? e : [e];
|
|
2985
3012
|
if (a.length === 1) {
|
|
2986
|
-
const r = t?.data.enum?.find((
|
|
2987
|
-
if (r) return
|
|
3013
|
+
const r = t?.data.enum?.find((i) => i.value === a[0]);
|
|
3014
|
+
if (r) return ji(r);
|
|
2988
3015
|
}
|
|
2989
|
-
return { name: a.map((r) =>
|
|
2990
|
-
},
|
|
3016
|
+
return { name: a.map((r) => Vi(r, t)).join(", ") };
|
|
3017
|
+
}, Bi = ({
|
|
2991
3018
|
entityType: e,
|
|
2992
3019
|
projectInfo: t,
|
|
2993
3020
|
activity: o = {}
|
|
@@ -2996,11 +3023,11 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
2996
3023
|
activityType: n,
|
|
2997
3024
|
authorName: a,
|
|
2998
3025
|
authorFullName: r,
|
|
2999
|
-
createdAt:
|
|
3000
|
-
oldStatus:
|
|
3026
|
+
createdAt: i,
|
|
3027
|
+
oldStatus: s,
|
|
3001
3028
|
newStatus: l,
|
|
3002
3029
|
activityData: u = {}
|
|
3003
|
-
} = o, { key:
|
|
3030
|
+
} = o, { key: m, oldValue: p, newValue: g } = u, f = Ri(o, e), h = n === "attrib.change", b = n === "tags.change", D = n === "subtype.change", { data: $ = [] } = Ca(void 0, { skip: !h }), v = N(() => $.find((P) => P.name === m), [$, m]), y = h ? v?.data.title || m : b ? "Tags" : D ? "Type" : void 0, A = (P) => ({
|
|
3004
3031
|
name: P?.name || "",
|
|
3005
3032
|
icon: P?.icon,
|
|
3006
3033
|
color: P?.color
|
|
@@ -3012,23 +3039,23 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
3012
3039
|
color: t?.tags?.find((q) => q.name === X)?.color
|
|
3013
3040
|
}));
|
|
3014
3041
|
return { name: H.join(", "), items: Q };
|
|
3015
|
-
}, S = n === "status.change", M = (P, H) => S ? A(H) : b ? C(P) :
|
|
3016
|
-
return /* @__PURE__ */ x(
|
|
3017
|
-
/* @__PURE__ */ x(
|
|
3018
|
-
/* @__PURE__ */ c(
|
|
3019
|
-
/* @__PURE__ */ x(
|
|
3042
|
+
}, S = n === "status.change", M = (P, H) => S ? A(H) : b ? C(P) : Ui(P, v, m), I = M(p, s), E = M(g, l);
|
|
3043
|
+
return /* @__PURE__ */ x(Pi, { children: [
|
|
3044
|
+
/* @__PURE__ */ x($i, { children: [
|
|
3045
|
+
/* @__PURE__ */ c(Ft, { children: r || a }),
|
|
3046
|
+
/* @__PURE__ */ x(Ft, { children: [
|
|
3020
3047
|
"- ",
|
|
3021
3048
|
f.join(" / "),
|
|
3022
3049
|
" -"
|
|
3023
3050
|
] }),
|
|
3024
|
-
y && /* @__PURE__ */ c(
|
|
3025
|
-
/* @__PURE__ */ c(
|
|
3051
|
+
y && /* @__PURE__ */ c(Ft, { children: /* @__PURE__ */ c("strong", { children: y }) }),
|
|
3052
|
+
/* @__PURE__ */ c(St, { ...I }),
|
|
3026
3053
|
/* @__PURE__ */ c(re, { icon: "trending_flat" }),
|
|
3027
|
-
/* @__PURE__ */ c(
|
|
3054
|
+
/* @__PURE__ */ c(St, { ...E })
|
|
3028
3055
|
] }),
|
|
3029
|
-
/* @__PURE__ */ c(st, { date:
|
|
3056
|
+
/* @__PURE__ */ c(st, { date: i })
|
|
3030
3057
|
] });
|
|
3031
|
-
},
|
|
3058
|
+
}, Gi = F.li`
|
|
3032
3059
|
/* reset default */
|
|
3033
3060
|
list-style: none;
|
|
3034
3061
|
margin: 0;
|
|
@@ -3041,7 +3068,7 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
3041
3068
|
padding: 4px 8px;
|
|
3042
3069
|
border-radius: var(--border-radius-m);
|
|
3043
3070
|
user-select: none;
|
|
3044
|
-
`,
|
|
3071
|
+
`, Hi = F.div`
|
|
3045
3072
|
display: flex;
|
|
3046
3073
|
flex-wrap: nowrap;
|
|
3047
3074
|
align-items: start;
|
|
@@ -3049,18 +3076,18 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
3049
3076
|
gap: var(--base-gap-small);
|
|
3050
3077
|
padding: 0px 4px;
|
|
3051
3078
|
overflow: hidden;
|
|
3052
|
-
`,
|
|
3079
|
+
`, qi = F.span`
|
|
3053
3080
|
color: var(--md-sys-color-outline);
|
|
3054
3081
|
white-space: wrap;
|
|
3055
3082
|
font-size: 12px;
|
|
3056
|
-
`,
|
|
3057
|
-
const { authorFullName: o, createdAt: n, activityData: a, authorName: r } = e || {}, { assignee:
|
|
3058
|
-
let
|
|
3059
|
-
return
|
|
3060
|
-
/* @__PURE__ */ c(
|
|
3083
|
+
`, un = ({ activity: e, isAdding: t }) => {
|
|
3084
|
+
const { authorFullName: o, createdAt: n, activityData: a, authorName: r } = e || {}, { assignee: i } = a || {};
|
|
3085
|
+
let s = o || r;
|
|
3086
|
+
return s += t ? " added " : " removed ", s += "assignee: " + i, /* @__PURE__ */ c(Gi, { children: /* @__PURE__ */ x(Hi, { children: [
|
|
3087
|
+
/* @__PURE__ */ c(qi, { children: s }),
|
|
3061
3088
|
/* @__PURE__ */ c(st, { date: n })
|
|
3062
3089
|
] }) });
|
|
3063
|
-
},
|
|
3090
|
+
}, Wi = F.li`
|
|
3064
3091
|
/* reset default */
|
|
3065
3092
|
list-style: none;
|
|
3066
3093
|
margin: 0;
|
|
@@ -3072,7 +3099,7 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
3072
3099
|
|
|
3073
3100
|
width: 100%;
|
|
3074
3101
|
padding: 8px;
|
|
3075
|
-
`,
|
|
3102
|
+
`, Qi = F.div`
|
|
3076
3103
|
border-radius: var(--border-radius-m);
|
|
3077
3104
|
padding: var(--padding-m);
|
|
3078
3105
|
|
|
@@ -3088,7 +3115,7 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
3088
3115
|
display: inline;
|
|
3089
3116
|
}
|
|
3090
3117
|
}
|
|
3091
|
-
`,
|
|
3118
|
+
`, Yi = F.div`
|
|
3092
3119
|
display: flex;
|
|
3093
3120
|
flex-direction: row;
|
|
3094
3121
|
justify-content: space-between;
|
|
@@ -3102,7 +3129,7 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
3102
3129
|
min-width: 0;
|
|
3103
3130
|
overflow: hidden;
|
|
3104
3131
|
}
|
|
3105
|
-
`,
|
|
3132
|
+
`, pn = F.div`
|
|
3106
3133
|
display: flex;
|
|
3107
3134
|
align-items: center;
|
|
3108
3135
|
justify-content: space-between;
|
|
@@ -3126,7 +3153,7 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
3126
3153
|
display: none;
|
|
3127
3154
|
flex: 1;
|
|
3128
3155
|
}
|
|
3129
|
-
`,
|
|
3156
|
+
`, Ji = F(Ma)`
|
|
3130
3157
|
width: 74px;
|
|
3131
3158
|
min-width: 74px;
|
|
3132
3159
|
height: unset;
|
|
@@ -3140,23 +3167,23 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
3140
3167
|
img {
|
|
3141
3168
|
object-fit: cover;
|
|
3142
3169
|
}
|
|
3143
|
-
`,
|
|
3170
|
+
`, Xi = F.span`
|
|
3144
3171
|
overflow: hidden;
|
|
3145
3172
|
text-overflow: ellipsis;
|
|
3146
3173
|
white-space: nowrap;
|
|
3147
3174
|
display: block;
|
|
3148
3175
|
min-width: 0;
|
|
3149
|
-
`,
|
|
3176
|
+
`, Ki = F.div`
|
|
3150
3177
|
margin-top: var(--base-gap-small);
|
|
3151
3178
|
color: var(--md-sys-color-outline);
|
|
3152
3179
|
word-break: break-word;
|
|
3153
|
-
`,
|
|
3180
|
+
`, Zi = F.li`
|
|
3154
3181
|
/* reset default */
|
|
3155
3182
|
list-style: none;
|
|
3156
3183
|
margin: 0;
|
|
3157
3184
|
padding: 0;
|
|
3158
3185
|
padding: 0px 8px;
|
|
3159
|
-
`,
|
|
3186
|
+
`, Bn = F.div`
|
|
3160
3187
|
width: 100%;
|
|
3161
3188
|
display: flex;
|
|
3162
3189
|
align-items: center;
|
|
@@ -3179,7 +3206,7 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
3179
3206
|
&:hover {
|
|
3180
3207
|
background-color: var(--md-sys-color-surface-container-hover);
|
|
3181
3208
|
}
|
|
3182
|
-
`,
|
|
3209
|
+
`, es = ({
|
|
3183
3210
|
activity: e,
|
|
3184
3211
|
projectName: t,
|
|
3185
3212
|
entityType: o,
|
|
@@ -3187,15 +3214,15 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
3187
3214
|
filter: a,
|
|
3188
3215
|
statuses: r = []
|
|
3189
3216
|
}) => {
|
|
3190
|
-
const { onOpenViewer:
|
|
3191
|
-
let { authorName:
|
|
3192
|
-
const
|
|
3193
|
-
return /* @__PURE__ */ x(
|
|
3217
|
+
const { onOpenViewer: i } = ze();
|
|
3218
|
+
let { authorName: s, authorFullName: l, createdAt: u, versions: m = [] } = e;
|
|
3219
|
+
const p = a === "versions" || a && typeof a == "object" && a.conditions?.some((v) => v.key === "versions" && v.value === !0), [g, f] = L(p), h = 2, [b, D] = L(!1), $ = (v, y) => i?.({ versionIds: [v], productId: y, projectName: t });
|
|
3220
|
+
return /* @__PURE__ */ x(Wi, { children: [
|
|
3194
3221
|
/* @__PURE__ */ c(
|
|
3195
|
-
|
|
3222
|
+
Un,
|
|
3196
3223
|
{
|
|
3197
|
-
name:
|
|
3198
|
-
fullName: l ||
|
|
3224
|
+
name: s,
|
|
3225
|
+
fullName: l || s,
|
|
3199
3226
|
date: u,
|
|
3200
3227
|
activity: e,
|
|
3201
3228
|
projectName: t,
|
|
@@ -3203,20 +3230,20 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
3203
3230
|
onReferenceClick: n
|
|
3204
3231
|
}
|
|
3205
3232
|
),
|
|
3206
|
-
|
|
3233
|
+
m.flatMap((v, y) => {
|
|
3207
3234
|
const { name: A, id: C, productId: S, productName: M, thumbnailHash: I, comment: E } = v, P = r.find((H) => H.name === v.status);
|
|
3208
|
-
return (y < h || g) && /* @__PURE__ */ x(
|
|
3209
|
-
/* @__PURE__ */ x(
|
|
3235
|
+
return (y < h || g) && /* @__PURE__ */ x(Qi, { onClick: () => $(C, S), children: [
|
|
3236
|
+
/* @__PURE__ */ x(Yi, { children: [
|
|
3210
3237
|
/* @__PURE__ */ x("div", { children: [
|
|
3211
|
-
/* @__PURE__ */ x(
|
|
3238
|
+
/* @__PURE__ */ x(pn, { children: [
|
|
3212
3239
|
/* @__PURE__ */ c("span", { children: M }),
|
|
3213
3240
|
/* @__PURE__ */ c(st, { date: u, isExact: !0 })
|
|
3214
3241
|
] }),
|
|
3215
|
-
/* @__PURE__ */ x(
|
|
3216
|
-
/* @__PURE__ */ c(
|
|
3242
|
+
/* @__PURE__ */ x(pn, { children: [
|
|
3243
|
+
/* @__PURE__ */ c(Xi, { className: "version", children: A }),
|
|
3217
3244
|
" -",
|
|
3218
3245
|
/* @__PURE__ */ c(
|
|
3219
|
-
|
|
3246
|
+
St,
|
|
3220
3247
|
{
|
|
3221
3248
|
icon: P?.icon,
|
|
3222
3249
|
color: P?.color,
|
|
@@ -3226,7 +3253,7 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
3226
3253
|
] })
|
|
3227
3254
|
] }),
|
|
3228
3255
|
/* @__PURE__ */ c(
|
|
3229
|
-
|
|
3256
|
+
Ji,
|
|
3230
3257
|
{
|
|
3231
3258
|
projectName: t,
|
|
3232
3259
|
entityId: C,
|
|
@@ -3238,25 +3265,25 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
3238
3265
|
}
|
|
3239
3266
|
)
|
|
3240
3267
|
] }),
|
|
3241
|
-
E && /* @__PURE__ */ c(
|
|
3268
|
+
E && /* @__PURE__ */ c(Ki, { children: E })
|
|
3242
3269
|
] }, C);
|
|
3243
3270
|
}),
|
|
3244
|
-
!
|
|
3271
|
+
!p && m.length > h && /* @__PURE__ */ x(Bn, { onClick: () => f(!g), children: [
|
|
3245
3272
|
/* @__PURE__ */ c(re, { icon: "more" }),
|
|
3246
|
-
/* @__PURE__ */ c("span", { children: g ? "Show less" : `Show ${
|
|
3273
|
+
/* @__PURE__ */ c("span", { children: g ? "Show less" : `Show ${m.length - h} more versions` })
|
|
3247
3274
|
] })
|
|
3248
3275
|
] });
|
|
3249
|
-
},
|
|
3276
|
+
}, ts = ({ activities: e, editProps: t, ...o }) => {
|
|
3250
3277
|
const [n, a] = L(!1);
|
|
3251
3278
|
return /* @__PURE__ */ x(Ae, { children: [
|
|
3252
|
-
/* @__PURE__ */ c(
|
|
3279
|
+
/* @__PURE__ */ c(Zi, { children: /* @__PURE__ */ x(Bn, { onClick: () => a(!n), children: [
|
|
3253
3280
|
/* @__PURE__ */ c(re, { icon: n ? "expand_less" : "chevron_right" }),
|
|
3254
3281
|
n ? "Show less" : "Show more"
|
|
3255
3282
|
] }) }),
|
|
3256
3283
|
n && e.map((r) => (
|
|
3257
3284
|
// @ts-expect-error
|
|
3258
3285
|
/* @__PURE__ */ c(
|
|
3259
|
-
|
|
3286
|
+
Gn,
|
|
3260
3287
|
{
|
|
3261
3288
|
editProps: t,
|
|
3262
3289
|
activity: r,
|
|
@@ -3267,33 +3294,33 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
3267
3294
|
)
|
|
3268
3295
|
))
|
|
3269
3296
|
] });
|
|
3270
|
-
},
|
|
3297
|
+
}, Gn = ({
|
|
3271
3298
|
activity: e,
|
|
3272
3299
|
fromGroup: t,
|
|
3273
3300
|
projectInfo: o,
|
|
3274
3301
|
createdAts: n,
|
|
3275
3302
|
editProps: a,
|
|
3276
3303
|
filter: r,
|
|
3277
|
-
readOnly:
|
|
3278
|
-
statuses:
|
|
3304
|
+
readOnly: i,
|
|
3305
|
+
statuses: s,
|
|
3279
3306
|
isSlideOut: l,
|
|
3280
3307
|
isGuest: u,
|
|
3281
|
-
...
|
|
3308
|
+
...m
|
|
3282
3309
|
}) => {
|
|
3283
3310
|
switch (e.activityType) {
|
|
3284
3311
|
case "comment":
|
|
3285
3312
|
return (
|
|
3286
3313
|
// @ts-expect-error
|
|
3287
3314
|
/* @__PURE__ */ c(
|
|
3288
|
-
|
|
3315
|
+
_i,
|
|
3289
3316
|
{
|
|
3290
3317
|
activity: e,
|
|
3291
3318
|
projectInfo: o,
|
|
3292
3319
|
editProps: a,
|
|
3293
|
-
readOnly:
|
|
3294
|
-
statuses:
|
|
3320
|
+
readOnly: i,
|
|
3321
|
+
statuses: s,
|
|
3295
3322
|
isSlideOut: l,
|
|
3296
|
-
...
|
|
3323
|
+
...m
|
|
3297
3324
|
}
|
|
3298
3325
|
)
|
|
3299
3326
|
);
|
|
@@ -3301,29 +3328,29 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
3301
3328
|
case "attrib.change":
|
|
3302
3329
|
case "tags.change":
|
|
3303
3330
|
case "subtype.change":
|
|
3304
|
-
return /* @__PURE__ */ c(
|
|
3331
|
+
return /* @__PURE__ */ c(Bi, { activity: e, projectInfo: o, ...m });
|
|
3305
3332
|
case "assignee.add":
|
|
3306
|
-
return /* @__PURE__ */ c(
|
|
3333
|
+
return /* @__PURE__ */ c(un, { activity: e, ...m, isAdding: !0 });
|
|
3307
3334
|
case "assignee.remove":
|
|
3308
|
-
return /* @__PURE__ */ c(
|
|
3335
|
+
return /* @__PURE__ */ c(un, { activity: e, ...m });
|
|
3309
3336
|
case "version.publish":
|
|
3310
|
-
return /* @__PURE__ */ c(
|
|
3337
|
+
return /* @__PURE__ */ c(es, { activity: e, projectInfo: o, filter: r, statuses: s, ...m });
|
|
3311
3338
|
case "version.review":
|
|
3312
|
-
return /* @__PURE__ */ c(
|
|
3339
|
+
return /* @__PURE__ */ c(Si, { activity: e, isGuest: u, ...m });
|
|
3313
3340
|
case "group":
|
|
3314
3341
|
return !t && /* @__PURE__ */ c(
|
|
3315
|
-
|
|
3342
|
+
ts,
|
|
3316
3343
|
{
|
|
3317
3344
|
editProps: a,
|
|
3318
3345
|
activities: e.items || [],
|
|
3319
3346
|
projectInfo: o,
|
|
3320
|
-
...
|
|
3347
|
+
...m
|
|
3321
3348
|
}
|
|
3322
3349
|
);
|
|
3323
3350
|
default:
|
|
3324
3351
|
return null;
|
|
3325
3352
|
}
|
|
3326
|
-
},
|
|
3353
|
+
}, ns = F.section`
|
|
3327
3354
|
padding-bottom: 4px;
|
|
3328
3355
|
overflow: hidden;
|
|
3329
3356
|
position: relative;
|
|
@@ -3371,7 +3398,7 @@ F.div`
|
|
|
3371
3398
|
color: inherit;
|
|
3372
3399
|
}
|
|
3373
3400
|
`;
|
|
3374
|
-
const
|
|
3401
|
+
const os = F.ul`
|
|
3375
3402
|
gap: var(--base-gap-large);
|
|
3376
3403
|
overflow-y: auto;
|
|
3377
3404
|
padding: 24px 0;
|
|
@@ -3392,11 +3419,11 @@ const Yi = F.ul`
|
|
|
3392
3419
|
& > *:last-child {
|
|
3393
3420
|
margin-top: 32px;
|
|
3394
3421
|
}
|
|
3395
|
-
`,
|
|
3422
|
+
`, as = F.span`
|
|
3396
3423
|
padding: 16px 8px;
|
|
3397
3424
|
color: var(--md-sys-color-outline);
|
|
3398
3425
|
font-size: 11px;
|
|
3399
|
-
`,
|
|
3426
|
+
`, rs = F.div`
|
|
3400
3427
|
height: 50px;
|
|
3401
3428
|
border-radius: 8px;
|
|
3402
3429
|
overflow: hidden;
|
|
@@ -3404,7 +3431,7 @@ const Yi = F.ul`
|
|
|
3404
3431
|
opacity: 0.5;
|
|
3405
3432
|
|
|
3406
3433
|
position: relative;
|
|
3407
|
-
`,
|
|
3434
|
+
`, is = ({
|
|
3408
3435
|
projectName: e,
|
|
3409
3436
|
entityType: t,
|
|
3410
3437
|
entities: o = [],
|
|
@@ -3413,13 +3440,13 @@ const Yi = F.ul`
|
|
|
3413
3440
|
}) => {
|
|
3414
3441
|
const {
|
|
3415
3442
|
createEntityActivity: r,
|
|
3416
|
-
updateActivity:
|
|
3417
|
-
deleteActivity:
|
|
3443
|
+
updateActivity: i,
|
|
3444
|
+
deleteActivity: s,
|
|
3418
3445
|
isUpdatingActivity: l,
|
|
3419
3446
|
userName: u,
|
|
3420
|
-
userFullName:
|
|
3421
|
-
activityTypes:
|
|
3422
|
-
} =
|
|
3447
|
+
userFullName: m,
|
|
3448
|
+
activityTypes: p
|
|
3449
|
+
} = $e(), g = o.map((v) => v.id), f = ({
|
|
3423
3450
|
entityId: v,
|
|
3424
3451
|
newId: y,
|
|
3425
3452
|
subTitle: A,
|
|
@@ -3433,8 +3460,8 @@ const Yi = F.ul`
|
|
|
3433
3460
|
entityId: v,
|
|
3434
3461
|
referenceType: "origin",
|
|
3435
3462
|
authorName: u,
|
|
3436
|
-
authorFullName:
|
|
3437
|
-
createdAt:
|
|
3463
|
+
authorFullName: m,
|
|
3464
|
+
createdAt: za(/* @__PURE__ */ new Date()),
|
|
3438
3465
|
files: S,
|
|
3439
3466
|
reactions: [],
|
|
3440
3467
|
activityData: M,
|
|
@@ -3451,7 +3478,7 @@ const Yi = F.ul`
|
|
|
3451
3478
|
return {
|
|
3452
3479
|
submitComment: async (v, y = [], A = {}) => {
|
|
3453
3480
|
const C = o.map(({ id: I, subTitle: E }) => {
|
|
3454
|
-
const P =
|
|
3481
|
+
const P = nn(), H = y.map((J) => J.id), Q = a ? { ...A, entityList: a } : A, X = {
|
|
3455
3482
|
body: v,
|
|
3456
3483
|
activityType: "comment",
|
|
3457
3484
|
id: P,
|
|
@@ -3461,19 +3488,19 @@ const Yi = F.ul`
|
|
|
3461
3488
|
({ id: J }) => !A.annotations?.some(
|
|
3462
3489
|
(W) => W.transparent === J
|
|
3463
3490
|
)
|
|
3464
|
-
),
|
|
3491
|
+
), R = f({ entityId: I, newId: P, subTitle: E, value: v, files: q, data: A });
|
|
3465
3492
|
return r({
|
|
3466
3493
|
projectName: e,
|
|
3467
3494
|
entityType: t,
|
|
3468
3495
|
entityId: I,
|
|
3469
3496
|
data: X,
|
|
3470
|
-
patch:
|
|
3497
|
+
patch: R,
|
|
3471
3498
|
filter: n,
|
|
3472
|
-
...{ entityIds: g, activityTypes:
|
|
3499
|
+
...{ entityIds: g, activityTypes: p }
|
|
3473
3500
|
});
|
|
3474
3501
|
}), M = (await Promise.all(C)).filter((I) => I.error);
|
|
3475
3502
|
if (M.length > 0) {
|
|
3476
|
-
const I =
|
|
3503
|
+
const I = Zt(M[0].error) || "Failed to create comment";
|
|
3477
3504
|
throw ke.error(I), new Error(I);
|
|
3478
3505
|
}
|
|
3479
3506
|
},
|
|
@@ -3487,9 +3514,9 @@ const Yi = F.ul`
|
|
|
3487
3514
|
...M,
|
|
3488
3515
|
files: A,
|
|
3489
3516
|
activityData: C
|
|
3490
|
-
}, E = { entityType: t, entityIds: g, activityTypes:
|
|
3517
|
+
}, E = { entityType: t, entityIds: g, activityTypes: p };
|
|
3491
3518
|
try {
|
|
3492
|
-
await
|
|
3519
|
+
await i({
|
|
3493
3520
|
projectName: e,
|
|
3494
3521
|
data: M,
|
|
3495
3522
|
activityId: v.activityId,
|
|
@@ -3499,14 +3526,14 @@ const Yi = F.ul`
|
|
|
3499
3526
|
...E
|
|
3500
3527
|
});
|
|
3501
3528
|
} catch (P) {
|
|
3502
|
-
throw ke.error(
|
|
3529
|
+
throw ke.error(Zt(P)), P;
|
|
3503
3530
|
}
|
|
3504
3531
|
},
|
|
3505
3532
|
deleteComment: async (v, y, A = []) => {
|
|
3506
|
-
const C = { entityType: t, entityIds: g, activityTypes:
|
|
3533
|
+
const C = { entityType: t, entityIds: g, activityTypes: p };
|
|
3507
3534
|
if (v)
|
|
3508
3535
|
try {
|
|
3509
|
-
await
|
|
3536
|
+
await s({
|
|
3510
3537
|
projectName: e,
|
|
3511
3538
|
activityId: v,
|
|
3512
3539
|
entityId: y,
|
|
@@ -3520,8 +3547,8 @@ const Yi = F.ul`
|
|
|
3520
3547
|
},
|
|
3521
3548
|
submitReview: async (v) => {
|
|
3522
3549
|
const y = o.map(({ id: A, subTitle: C }) => {
|
|
3523
|
-
const S =
|
|
3524
|
-
body:
|
|
3550
|
+
const S = nn(), M = { feedback: v, entityList: a }, I = {
|
|
3551
|
+
body: Ur(v, t),
|
|
3525
3552
|
activityType: "version.review",
|
|
3526
3553
|
id: S,
|
|
3527
3554
|
data: M
|
|
@@ -3539,27 +3566,27 @@ const Yi = F.ul`
|
|
|
3539
3566
|
},
|
|
3540
3567
|
isSaving: l
|
|
3541
3568
|
};
|
|
3542
|
-
},
|
|
3569
|
+
}, Ct = (e = {}) => {
|
|
3543
3570
|
const {
|
|
3544
3571
|
updatedAt: t,
|
|
3545
3572
|
createdAt: o,
|
|
3546
3573
|
origin: n = {},
|
|
3547
|
-
activityData: { context: { productName: a, productType: r, productId:
|
|
3548
|
-
version:
|
|
3574
|
+
activityData: { context: { productName: a, productType: r, productId: i } = {} } = {},
|
|
3575
|
+
version: s
|
|
3549
3576
|
} = e, { name: l, id: u } = n;
|
|
3550
3577
|
return {
|
|
3551
3578
|
name: l,
|
|
3552
3579
|
id: u,
|
|
3553
|
-
productId:
|
|
3580
|
+
productId: i,
|
|
3554
3581
|
productName: a,
|
|
3555
3582
|
productType: r,
|
|
3556
3583
|
updatedAt: t,
|
|
3557
3584
|
createdAt: o,
|
|
3558
|
-
comment:
|
|
3559
|
-
status:
|
|
3560
|
-
thumbnailHash:
|
|
3585
|
+
comment: s?.attrib?.comment || null,
|
|
3586
|
+
status: s?.status,
|
|
3587
|
+
thumbnailHash: s?.thumbnailHash
|
|
3561
3588
|
};
|
|
3562
|
-
},
|
|
3589
|
+
}, ss = 5, cs = (e = []) => {
|
|
3563
3590
|
const t = [];
|
|
3564
3591
|
let o = null;
|
|
3565
3592
|
for (const n of e) {
|
|
@@ -3568,28 +3595,28 @@ const Yi = F.ul`
|
|
|
3568
3595
|
continue;
|
|
3569
3596
|
}
|
|
3570
3597
|
if (!o) {
|
|
3571
|
-
o = { ...n }, o.versions = [
|
|
3598
|
+
o = { ...n }, o.versions = [Ct(n)];
|
|
3572
3599
|
continue;
|
|
3573
3600
|
}
|
|
3574
|
-
const a = o.authorName === n.authorName, r = o.origin.id === n.origin.id,
|
|
3601
|
+
const a = o.authorName === n.authorName, r = o.origin.id === n.origin.id, s = Ua(
|
|
3575
3602
|
new Date(o.createdAt),
|
|
3576
3603
|
new Date(n.createdAt)
|
|
3577
|
-
) <=
|
|
3578
|
-
if (a &&
|
|
3579
|
-
o.versions.push(
|
|
3604
|
+
) <= ss;
|
|
3605
|
+
if (a && s && r) {
|
|
3606
|
+
o.versions.push(Ct(n));
|
|
3580
3607
|
continue;
|
|
3581
3608
|
} else {
|
|
3582
|
-
t.push(o), o = { ...n }, o.versions = [
|
|
3609
|
+
t.push(o), o = { ...n }, o.versions = [Ct(n)];
|
|
3583
3610
|
continue;
|
|
3584
3611
|
}
|
|
3585
3612
|
}
|
|
3586
3613
|
return o && t.push(o), t;
|
|
3587
|
-
},
|
|
3614
|
+
}, ls = (e, t) => {
|
|
3588
3615
|
let o = {};
|
|
3589
|
-
t.reduce((
|
|
3616
|
+
t.reduce((s, l) => (s[l.name] = l, s), o);
|
|
3590
3617
|
const n = [];
|
|
3591
3618
|
let a = [];
|
|
3592
|
-
const r = (
|
|
3619
|
+
const r = (s) => {
|
|
3593
3620
|
const l = (f) => ["assignee.add", "assignee.remove"].includes(f[0].activityType) ? [
|
|
3594
3621
|
{
|
|
3595
3622
|
...f[0],
|
|
@@ -3607,13 +3634,13 @@ const Yi = F.ul`
|
|
|
3607
3634
|
}
|
|
3608
3635
|
}
|
|
3609
3636
|
] : f;
|
|
3610
|
-
let u = [],
|
|
3611
|
-
return
|
|
3612
|
-
|
|
3613
|
-
}),
|
|
3614
|
-
},
|
|
3637
|
+
let u = [], m = [], p = null, g = null;
|
|
3638
|
+
return s.forEach((f) => {
|
|
3639
|
+
p === null || p === f.activityType && g == f.authorName ? m.push(f) : (u.push(...l(m)), m = [f]), p = f.activityType, g = f.authorName;
|
|
3640
|
+
}), m.length != 0 && u.push(...l(m)), u;
|
|
3641
|
+
}, i = (s, l) => {
|
|
3615
3642
|
if (a.length > 2) {
|
|
3616
|
-
if (
|
|
3643
|
+
if (s) {
|
|
3617
3644
|
const u = a[0].activityData.assignee;
|
|
3618
3645
|
n.push({
|
|
3619
3646
|
...a[0],
|
|
@@ -3625,127 +3652,127 @@ const Yi = F.ul`
|
|
|
3625
3652
|
}
|
|
3626
3653
|
n.push({
|
|
3627
3654
|
activityType: "group",
|
|
3628
|
-
items: r(
|
|
3655
|
+
items: r(s ? a.slice(1) : a),
|
|
3629
3656
|
activityId: "group-" + l
|
|
3630
3657
|
});
|
|
3631
3658
|
} else a.length > 0 && a.forEach((u) => n.push(u));
|
|
3632
3659
|
a = [];
|
|
3633
3660
|
};
|
|
3634
|
-
for (const
|
|
3635
|
-
if (
|
|
3636
|
-
a.push(
|
|
3661
|
+
for (const s of e)
|
|
3662
|
+
if (ds.includes(s.activityType))
|
|
3663
|
+
a.push(s);
|
|
3637
3664
|
else {
|
|
3638
3665
|
const l = n.length === 0;
|
|
3639
|
-
|
|
3666
|
+
i(l, n.length), n.push(s);
|
|
3640
3667
|
}
|
|
3641
|
-
return a.length > 0 &&
|
|
3668
|
+
return a.length > 0 && i(!1, n.length), n;
|
|
3642
3669
|
}, mn = (e, t, o = "oldValue") => {
|
|
3643
3670
|
const n = [];
|
|
3644
3671
|
let a = null, r = null;
|
|
3645
|
-
for (const
|
|
3646
|
-
if (
|
|
3672
|
+
for (const i of e)
|
|
3673
|
+
if (i.activityType === t) {
|
|
3647
3674
|
if (!a) {
|
|
3648
|
-
a = { ...
|
|
3675
|
+
a = { ...i }, r = new Date(i.createdAt);
|
|
3649
3676
|
continue;
|
|
3650
3677
|
}
|
|
3651
|
-
const
|
|
3652
|
-
|
|
3678
|
+
const s = a.authorName === i.authorName, l = a.origin.id === i.entityId, u = a.activityData?.key === i.activityData?.key, m = new Date(i.createdAt), g = r !== null && rt(r) && rt(m) && Math.abs(Ba(r, m)) <= 20;
|
|
3679
|
+
s && g && l && u ? (i[o] !== void 0 && (a[o] = i[o]), a.activityData = {
|
|
3653
3680
|
...a.activityData,
|
|
3654
|
-
oldValue:
|
|
3655
|
-
}, a.hasPreviousPage =
|
|
3681
|
+
oldValue: i.activityData.oldValue
|
|
3682
|
+
}, a.hasPreviousPage = i.hasPreviousPage, a.cursor = i.cursor, r = m) : (a.activityData.oldValue !== a.activityData.newValue && n.push(a), a = { ...i }, r = m);
|
|
3656
3683
|
} else
|
|
3657
|
-
a && (a.activityData.oldValue !== a.activityData.newValue && n.push(a), a = null, r = null), n.push(
|
|
3658
|
-
return a && a.activityData.oldValue !== a.activityData.newValue && !n.some((
|
|
3659
|
-
},
|
|
3684
|
+
a && (a.activityData.oldValue !== a.activityData.newValue && n.push(a), a = null, r = null), n.push(i);
|
|
3685
|
+
return a && a.activityData.oldValue !== a.activityData.newValue && !n.some((i) => i.activityId === a.activityId) && n.push(a), n;
|
|
3686
|
+
}, ds = [
|
|
3660
3687
|
"status.change",
|
|
3661
3688
|
"assignee.add",
|
|
3662
3689
|
"assignee.remove",
|
|
3663
3690
|
"attrib.change",
|
|
3664
3691
|
"tags.change",
|
|
3665
3692
|
"subtype.change"
|
|
3666
|
-
],
|
|
3693
|
+
], us = (e = [], t = {}) => e.map((o) => {
|
|
3667
3694
|
const n = { ...o, origin: { ...o.origin } };
|
|
3668
3695
|
if (n.activityType === "status.change") {
|
|
3669
3696
|
if (!t) return n;
|
|
3670
|
-
const a = n.activityData?.oldValue, r = n.activityData?.newValue,
|
|
3671
|
-
n.oldStatus = { ...
|
|
3697
|
+
const a = n.activityData?.oldValue, r = n.activityData?.newValue, i = t.statuses?.find((l) => l.name === a), s = t.statuses?.find((l) => l.name === r);
|
|
3698
|
+
n.oldStatus = { ...i, name: a }, n.newStatus = { ...s, name: r };
|
|
3672
3699
|
}
|
|
3673
3700
|
return n;
|
|
3674
|
-
}),
|
|
3675
|
-
const
|
|
3676
|
-
() =>
|
|
3701
|
+
}), ps = (e = [], t = [], o) => t.includes(o) ? e.filter((n) => n.referenceType !== "relation") : e, ms = (e = [], t = [], o = {}, n, a, r) => {
|
|
3702
|
+
const i = N(
|
|
3703
|
+
() => us(e, o),
|
|
3677
3704
|
[e, o]
|
|
3678
|
-
),
|
|
3679
|
-
() =>
|
|
3680
|
-
[
|
|
3681
|
-
), u = N(() => [...l].sort((D,
|
|
3682
|
-
const v = new Date(D.createdAt), y = new Date(
|
|
3705
|
+
), s = N(() => i.map((b) => ({ ...b, isOwner: a === b.authorName })), [i, a]), l = N(
|
|
3706
|
+
() => ps(s, ["version"], n),
|
|
3707
|
+
[s, n]
|
|
3708
|
+
), u = N(() => [...l].sort((D, $) => {
|
|
3709
|
+
const v = new Date(D.createdAt), y = new Date($.createdAt), A = rt(v), C = rt(y);
|
|
3683
3710
|
if (!A && !C)
|
|
3684
3711
|
return 0;
|
|
3685
3712
|
if (A) {
|
|
3686
3713
|
if (!C)
|
|
3687
3714
|
return -1;
|
|
3688
3715
|
} else return 1;
|
|
3689
|
-
return
|
|
3690
|
-
}), [l]),
|
|
3716
|
+
return Ga(y, v);
|
|
3717
|
+
}), [l]), m = N(
|
|
3691
3718
|
() => mn(u, "status.change", "oldStatus"),
|
|
3692
3719
|
[u]
|
|
3693
|
-
),
|
|
3694
|
-
() => mn(
|
|
3695
|
-
[
|
|
3720
|
+
), p = N(
|
|
3721
|
+
() => mn(m, "attrib.change"),
|
|
3722
|
+
[m]
|
|
3696
3723
|
), g = N(() => r?.conditions?.some(
|
|
3697
3724
|
(D) => "key" in D && D.key === "updates" && D.value === !0
|
|
3698
|
-
) ?
|
|
3699
|
-
() =>
|
|
3725
|
+
) ? p : ls(p, t), [p, t, r]), f = N(
|
|
3726
|
+
() => cs(g),
|
|
3700
3727
|
[g]
|
|
3701
3728
|
);
|
|
3702
3729
|
return N(() => [...new Map(
|
|
3703
3730
|
f.filter((D) => D && D.activityId).map((D) => [D.activityId, D])
|
|
3704
3731
|
).values()], [f]);
|
|
3705
|
-
},
|
|
3732
|
+
}, gn = (e, t) => JSON.stringify({ entities: e.map((o) => o.id), filter: t }), gs = ({
|
|
3706
3733
|
entities: e = [],
|
|
3707
3734
|
feedRef: t,
|
|
3708
3735
|
filter: o,
|
|
3709
3736
|
disabled: n,
|
|
3710
3737
|
isLoading: a
|
|
3711
3738
|
}) => {
|
|
3712
|
-
const r = fe({}),
|
|
3713
|
-
const l =
|
|
3739
|
+
const r = fe({}), i = (s) => {
|
|
3740
|
+
const l = s.current.querySelectorAll(".scroll-to"), u = Array.from(l).map((p) => p.closest("li.comment"));
|
|
3714
3741
|
return (u[u.length - 1]?.offsetTop || 0) - 8 || 0;
|
|
3715
3742
|
};
|
|
3716
3743
|
Y(() => {
|
|
3717
|
-
const
|
|
3718
|
-
!t.current || n || a || (t.current.scrollTop = r.current[
|
|
3744
|
+
const s = gn(e, o);
|
|
3745
|
+
!t.current || n || a || (t.current.scrollTop = r.current[s] || i(t));
|
|
3719
3746
|
}, [e, o, t.current, a]), Y(() => {
|
|
3720
|
-
let
|
|
3747
|
+
let s = null;
|
|
3721
3748
|
if (!t.current || n) return;
|
|
3722
3749
|
const l = (u) => {
|
|
3723
|
-
if (
|
|
3750
|
+
if (s)
|
|
3724
3751
|
return;
|
|
3725
|
-
|
|
3726
|
-
|
|
3752
|
+
s = setTimeout(() => {
|
|
3753
|
+
s = null;
|
|
3727
3754
|
}, 300);
|
|
3728
|
-
const { scrollTop:
|
|
3729
|
-
r.current[
|
|
3755
|
+
const { scrollTop: m } = u.target, p = gn(e, o);
|
|
3756
|
+
r.current[p] = m;
|
|
3730
3757
|
};
|
|
3731
3758
|
return t.current?.addEventListener("scroll", l), () => {
|
|
3732
3759
|
t.current?.removeEventListener("scroll", l);
|
|
3733
3760
|
};
|
|
3734
3761
|
}, [t.current, o, e, n]);
|
|
3735
|
-
},
|
|
3762
|
+
}, hs = ({ feedRef: e, isInputOpen: t, height: o }) => {
|
|
3736
3763
|
Y(() => {
|
|
3737
3764
|
if (!e.current) return;
|
|
3738
3765
|
const n = o;
|
|
3739
3766
|
e.current.scrollTop === 0 || (t ? e.current.scrollBy(0, n) : e.current.scrollBy(0, -n));
|
|
3740
3767
|
}, [t, e, o]);
|
|
3741
|
-
},
|
|
3742
|
-
|
|
3768
|
+
}, fs = (e = 50, t = 200) => Math.floor(Math.random() * (t - e + 1) + e), ys = (e) => new Array(e).fill(0).map((t, o) => /* @__PURE__ */ c(
|
|
3769
|
+
rs,
|
|
3743
3770
|
{
|
|
3744
3771
|
className: "loading",
|
|
3745
|
-
style: { minHeight:
|
|
3772
|
+
style: { minHeight: fs(50, 150) }
|
|
3746
3773
|
},
|
|
3747
3774
|
o
|
|
3748
|
-
)),
|
|
3775
|
+
)), vs = ({
|
|
3749
3776
|
feedRef: e,
|
|
3750
3777
|
highlighted: t = [],
|
|
3751
3778
|
isLoading: o,
|
|
@@ -3753,56 +3780,56 @@ const Yi = F.ul`
|
|
|
3753
3780
|
hasNextPage: a,
|
|
3754
3781
|
activities: r
|
|
3755
3782
|
}) => {
|
|
3756
|
-
const
|
|
3783
|
+
const i = fe([]), s = async (u, m = 0) => {
|
|
3757
3784
|
if (!n) return null;
|
|
3758
|
-
const
|
|
3759
|
-
if (
|
|
3760
|
-
if (
|
|
3785
|
+
const p = u.querySelector("li.isHighlighted");
|
|
3786
|
+
if (p) return p;
|
|
3787
|
+
if (m++, m > 10) return null;
|
|
3761
3788
|
const g = await n();
|
|
3762
|
-
return !g || !g.hasNextPage ? null : (await new Promise((h) => requestAnimationFrame(() => h())),
|
|
3789
|
+
return !g || !g.hasNextPage ? null : (await new Promise((h) => requestAnimationFrame(() => h())), s(u, m));
|
|
3763
3790
|
}, l = async (u) => {
|
|
3764
|
-
const
|
|
3765
|
-
if (!
|
|
3791
|
+
const m = await s(u);
|
|
3792
|
+
if (!m) {
|
|
3766
3793
|
console.error("No highlighted element found");
|
|
3767
3794
|
return;
|
|
3768
3795
|
}
|
|
3769
|
-
const
|
|
3770
|
-
console.log("FOUND: scrolling to highlighted..."), u.scrollTo({ top: D }),
|
|
3796
|
+
const p = m.offsetTop, g = m.offsetHeight, f = u.offsetHeight || 0, h = 64, D = g + h > f ? p - 16 : p + g - f + h;
|
|
3797
|
+
console.log("FOUND: scrolling to highlighted..."), u.scrollTo({ top: D }), i.current = t;
|
|
3771
3798
|
};
|
|
3772
3799
|
Y(() => {
|
|
3773
|
-
!t.length || !e.current || o || !n || t.every((u) =>
|
|
3774
|
-
}, [e, t, r, o, n,
|
|
3775
|
-
},
|
|
3800
|
+
!t.length || !e.current || o || !n || t.every((u) => i.current?.includes(u)) || (console.log("trying to scroll to highlighted..."), l(e.current));
|
|
3801
|
+
}, [e, t, r, o, n, i, a]);
|
|
3802
|
+
}, bs = (e) => e.map((t) => {
|
|
3776
3803
|
if (t.activityType !== "comment" || !t.activityData?.annotations) return t;
|
|
3777
3804
|
const o = t.files.map((a) => {
|
|
3778
3805
|
const r = t.activityData.annotations.find(
|
|
3779
|
-
(
|
|
3806
|
+
(i) => i?.composite === a.id || i?.transparent === a.id
|
|
3780
3807
|
);
|
|
3781
3808
|
return r ? r.transparent === a.id ? null : { ...a, annotation: r } : a;
|
|
3782
3809
|
}).filter(Boolean);
|
|
3783
3810
|
return { ...t, files: o };
|
|
3784
|
-
}),
|
|
3811
|
+
}), Hn = [
|
|
3785
3812
|
"comments",
|
|
3786
3813
|
"versions",
|
|
3787
3814
|
"updates",
|
|
3788
3815
|
"checklists",
|
|
3789
3816
|
"has_attachments",
|
|
3790
3817
|
"in_review_session"
|
|
3791
|
-
],
|
|
3818
|
+
], ws = (e) => !!e && "key" in e, xs = (e, t) => {
|
|
3792
3819
|
const o = [], n = [], a = (r) => {
|
|
3793
3820
|
if (!r) return;
|
|
3794
|
-
if (
|
|
3795
|
-
const
|
|
3796
|
-
if (
|
|
3797
|
-
const
|
|
3798
|
-
|
|
3821
|
+
if (ws(r)) {
|
|
3822
|
+
const s = r.key;
|
|
3823
|
+
if (s === "body") {
|
|
3824
|
+
const m = String(r.value ?? "");
|
|
3825
|
+
m && n.push({ id: m, label: m });
|
|
3799
3826
|
return;
|
|
3800
3827
|
}
|
|
3801
|
-
const l = t.find((
|
|
3828
|
+
const l = t.find((m) => m.id === s);
|
|
3802
3829
|
if (!l) return;
|
|
3803
|
-
if (
|
|
3830
|
+
if (Hn.includes(s)) {
|
|
3804
3831
|
r.value === !0 && o.push({
|
|
3805
|
-
id:
|
|
3832
|
+
id: Jt(s),
|
|
3806
3833
|
label: l.label,
|
|
3807
3834
|
icon: l.icon,
|
|
3808
3835
|
type: "boolean",
|
|
@@ -3815,45 +3842,45 @@ const Yi = F.ul`
|
|
|
3815
3842
|
}
|
|
3816
3843
|
const u = Array.isArray(r.value) ? r.value : [r.value];
|
|
3817
3844
|
o.push({
|
|
3818
|
-
id:
|
|
3845
|
+
id: Jt(s),
|
|
3819
3846
|
label: l.label,
|
|
3820
3847
|
type: l.type,
|
|
3821
3848
|
icon: l.icon,
|
|
3822
3849
|
singleSelect: l.singleSelect,
|
|
3823
3850
|
operator: "OR",
|
|
3824
|
-
values: u.map((
|
|
3825
|
-
const
|
|
3826
|
-
return
|
|
3851
|
+
values: u.map((m) => {
|
|
3852
|
+
const p = l.values?.find((g) => g.id === String(m));
|
|
3853
|
+
return p ? { ...p } : { id: String(m), label: String(m) };
|
|
3827
3854
|
})
|
|
3828
3855
|
});
|
|
3829
3856
|
return;
|
|
3830
3857
|
}
|
|
3831
|
-
const
|
|
3832
|
-
if (
|
|
3833
|
-
o.push(
|
|
3858
|
+
const i = qa(r, t);
|
|
3859
|
+
if (i) {
|
|
3860
|
+
o.push(i);
|
|
3834
3861
|
return;
|
|
3835
3862
|
}
|
|
3836
3863
|
r.conditions?.forEach(a);
|
|
3837
3864
|
};
|
|
3838
|
-
return e?.conditions?.forEach(a), n.length && o.push({ id:
|
|
3839
|
-
},
|
|
3865
|
+
return e?.conditions?.forEach(a), n.length && o.push({ id: kn, label: "", values: n }), o;
|
|
3866
|
+
}, ks = (e) => {
|
|
3840
3867
|
const t = [], o = [];
|
|
3841
3868
|
return e.forEach((n) => {
|
|
3842
|
-
const a =
|
|
3869
|
+
const a = Fo(n.id), r = (n.values || []).map((i) => i.id);
|
|
3843
3870
|
if (r.length)
|
|
3844
|
-
if (a ===
|
|
3871
|
+
if (a === kn)
|
|
3845
3872
|
r.forEach(
|
|
3846
|
-
(
|
|
3873
|
+
(i) => o.push({ key: "body", operator: "like", value: String(i) })
|
|
3847
3874
|
);
|
|
3848
|
-
else if (
|
|
3875
|
+
else if (Hn.includes(a))
|
|
3849
3876
|
r.includes("true") && t.push({ key: a, operator: "eq", value: !0 });
|
|
3850
3877
|
else if (n.type === "datetime") {
|
|
3851
|
-
const
|
|
3852
|
-
|
|
3878
|
+
const i = Wa(a, n);
|
|
3879
|
+
i && t.push(i);
|
|
3853
3880
|
} else
|
|
3854
3881
|
t.push({ key: a, operator: "in", value: r.map(String) });
|
|
3855
3882
|
}), o.length === 1 ? t.push(o[0]) : o.length > 1 && t.push({ operator: "or", conditions: o }), { operator: "and", conditions: t };
|
|
3856
|
-
},
|
|
3883
|
+
}, As = F.div`
|
|
3857
3884
|
padding: 4px 8px;
|
|
3858
3885
|
padding-bottom: 0;
|
|
3859
3886
|
filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.25));
|
|
@@ -3868,7 +3895,7 @@ const Yi = F.ul`
|
|
|
3868
3895
|
opacity: 0.5;
|
|
3869
3896
|
pointer-events: none;
|
|
3870
3897
|
}
|
|
3871
|
-
`,
|
|
3898
|
+
`, qn = mt(
|
|
3872
3899
|
({
|
|
3873
3900
|
feedFilter: e,
|
|
3874
3901
|
setFeedFilter: t,
|
|
@@ -3876,8 +3903,8 @@ const Yi = F.ul`
|
|
|
3876
3903
|
categories: n,
|
|
3877
3904
|
supportsReviewSession: a,
|
|
3878
3905
|
isLoading: r,
|
|
3879
|
-
checklistCount:
|
|
3880
|
-
onSearchTextChange:
|
|
3906
|
+
checklistCount: i,
|
|
3907
|
+
onSearchTextChange: s
|
|
3881
3908
|
}) => {
|
|
3882
3909
|
const l = N(() => {
|
|
3883
3910
|
const y = (C, S, M) => ({
|
|
@@ -3930,22 +3957,22 @@ const Yi = F.ul`
|
|
|
3930
3957
|
label: "Posted date",
|
|
3931
3958
|
icon: "calendar_today",
|
|
3932
3959
|
type: "datetime",
|
|
3933
|
-
values:
|
|
3960
|
+
values: la()
|
|
3934
3961
|
}
|
|
3935
3962
|
];
|
|
3936
3963
|
}, [o, n, a]);
|
|
3937
3964
|
let u = "";
|
|
3938
|
-
|
|
3939
|
-
const
|
|
3965
|
+
i?.total && i.total > 0 && (u = `${i.checked}/${i.total}`);
|
|
3966
|
+
const m = N(
|
|
3940
3967
|
() => ["comments", { id: "checklists", label: u, tooltip: "Checklists" }],
|
|
3941
3968
|
[u]
|
|
3942
|
-
),
|
|
3943
|
-
() =>
|
|
3969
|
+
), p = N(
|
|
3970
|
+
() => xs(e, l),
|
|
3944
3971
|
[e, l]
|
|
3945
|
-
), [g, f] = L(
|
|
3972
|
+
), [g, f] = L(p), h = Qa(), b = fe(null);
|
|
3946
3973
|
Y(() => {
|
|
3947
|
-
f(
|
|
3948
|
-
}, [JSON.stringify(
|
|
3974
|
+
f(p);
|
|
3975
|
+
}, [JSON.stringify(p)]), Y(() => {
|
|
3949
3976
|
const y = (A) => {
|
|
3950
3977
|
const C = b.current?.getContainerElement();
|
|
3951
3978
|
C && !C.contains(A.target) && b.current?.close();
|
|
@@ -3955,11 +3982,11 @@ const Yi = F.ul`
|
|
|
3955
3982
|
};
|
|
3956
3983
|
}, [b]);
|
|
3957
3984
|
const D = (y) => {
|
|
3958
|
-
t(
|
|
3985
|
+
t(ks(y)), s?.("");
|
|
3959
3986
|
};
|
|
3960
|
-
return /* @__PURE__ */ x(
|
|
3987
|
+
return /* @__PURE__ */ x(As, { className: r ? "loading" : void 0, children: [
|
|
3961
3988
|
/* @__PURE__ */ c(
|
|
3962
|
-
|
|
3989
|
+
Co,
|
|
3963
3990
|
{
|
|
3964
3991
|
ref: b,
|
|
3965
3992
|
compact: !0,
|
|
@@ -3973,9 +4000,9 @@ const Yi = F.ul`
|
|
|
3973
4000
|
enableMultipleSameFilters: !1,
|
|
3974
4001
|
enableAutosuggestion: !1,
|
|
3975
4002
|
onSearchChange: (y, A) => {
|
|
3976
|
-
A ||
|
|
4003
|
+
A || s?.(y);
|
|
3977
4004
|
},
|
|
3978
|
-
quickActions:
|
|
4005
|
+
quickActions: m,
|
|
3979
4006
|
placeholder: "Search and filter feed...",
|
|
3980
4007
|
pt: {
|
|
3981
4008
|
searchBar: {
|
|
@@ -3992,7 +4019,7 @@ const Yi = F.ul`
|
|
|
3992
4019
|
}
|
|
3993
4020
|
),
|
|
3994
4021
|
/* @__PURE__ */ c(
|
|
3995
|
-
|
|
4022
|
+
_a,
|
|
3996
4023
|
{
|
|
3997
4024
|
isOpen: !!h.customRangeFilterId,
|
|
3998
4025
|
header: l.find((y) => y.id === h.customRangeFilterId?.split("__")[0])?.label ?? "Custom range",
|
|
@@ -4007,8 +4034,8 @@ const Yi = F.ul`
|
|
|
4007
4034
|
] });
|
|
4008
4035
|
}
|
|
4009
4036
|
);
|
|
4010
|
-
|
|
4011
|
-
function
|
|
4037
|
+
qn.displayName = "FeedSearchFilter";
|
|
4038
|
+
function Fs({
|
|
4012
4039
|
projectName: e,
|
|
4013
4040
|
enabled: t,
|
|
4014
4041
|
entityIds: o,
|
|
@@ -4016,10 +4043,10 @@ function fs({
|
|
|
4016
4043
|
loadingActivities: a,
|
|
4017
4044
|
userName: r
|
|
4018
4045
|
}) {
|
|
4019
|
-
const
|
|
4020
|
-
() => n.find((
|
|
4046
|
+
const i = N(
|
|
4047
|
+
() => n.find((m) => m.activityType === "version.review" && m.authorName === r),
|
|
4021
4048
|
[n, r]
|
|
4022
|
-
),
|
|
4049
|
+
), s = !!(o.length === 0 || !t || a || i), { data: l } = Ta(
|
|
4023
4050
|
{
|
|
4024
4051
|
projectName: e,
|
|
4025
4052
|
entityIds: o,
|
|
@@ -4027,31 +4054,31 @@ function fs({
|
|
|
4027
4054
|
last: 1,
|
|
4028
4055
|
authors: [r]
|
|
4029
4056
|
},
|
|
4030
|
-
{ skip:
|
|
4057
|
+
{ skip: s }
|
|
4031
4058
|
);
|
|
4032
|
-
return N(() =>
|
|
4059
|
+
return N(() => i ?? l?.activities.at(-1), [i, l]);
|
|
4033
4060
|
}
|
|
4034
|
-
const
|
|
4061
|
+
const Fc = 30, Cc = ({
|
|
4035
4062
|
disabled: e,
|
|
4036
4063
|
readOnly: t,
|
|
4037
4064
|
statuses: o = [],
|
|
4038
4065
|
entityListId: n,
|
|
4039
4066
|
isSlideOut: a,
|
|
4040
4067
|
versionReview: r = !1,
|
|
4041
|
-
saveCommentDrafts:
|
|
4068
|
+
saveCommentDrafts: i = !0
|
|
4042
4069
|
}) => {
|
|
4043
4070
|
const {
|
|
4044
|
-
projectName:
|
|
4071
|
+
projectName: s,
|
|
4045
4072
|
entities: l,
|
|
4046
4073
|
entityType: u,
|
|
4047
|
-
editingId:
|
|
4048
|
-
projectInfo:
|
|
4074
|
+
editingId: m,
|
|
4075
|
+
projectInfo: p,
|
|
4049
4076
|
setEditingId: g,
|
|
4050
4077
|
userName: f,
|
|
4051
4078
|
activitiesData: h,
|
|
4052
4079
|
isLoadingNew: b,
|
|
4053
4080
|
isLoadingNextPage: D,
|
|
4054
|
-
loadNextPage:
|
|
4081
|
+
loadNextPage: $,
|
|
4055
4082
|
hasNextPage: v,
|
|
4056
4083
|
users: y,
|
|
4057
4084
|
categories: A,
|
|
@@ -4061,12 +4088,12 @@ const fc = 30, yc = ({
|
|
|
4061
4088
|
isGuest: I,
|
|
4062
4089
|
searchText: E,
|
|
4063
4090
|
setSearchText: P
|
|
4064
|
-
} =
|
|
4091
|
+
} = $e(), {
|
|
4065
4092
|
openSlideOut: H,
|
|
4066
4093
|
highlightedActivities: Q,
|
|
4067
4094
|
setHighlightedActivities: X,
|
|
4068
4095
|
onOpenImage: q,
|
|
4069
|
-
setFeedAnnotations:
|
|
4096
|
+
setFeedAnnotations: R,
|
|
4070
4097
|
setFeedFrameLinks: ue,
|
|
4071
4098
|
user: J
|
|
4072
4099
|
} = ze(), W = S.conditions?.some(
|
|
@@ -4075,63 +4102,63 @@ const fc = 30, yc = ({
|
|
|
4075
4102
|
(w) => "key" in w && ["comments", "checklists", "versions", "updates"].includes(w.key) && w.value === !0
|
|
4076
4103
|
), O = S.conditions?.some(
|
|
4077
4104
|
(w) => "key" in w && (w.key === "comments" || w.key === "checklists") && w.value === !0
|
|
4078
|
-
), ne = u === "version" || u === "folder", { data: K, isLoading: Ye } =
|
|
4079
|
-
() =>
|
|
4105
|
+
), ne = u === "version" || u === "folder", { data: K, isLoading: Ye } = Da({ projectName: s }, { skip: !s }), De = !J.data?.isManager && !J.data?.isAdmin && !Ye && K?.activities?.enabled && !K?.activities?.activities?.includes("comment") || ve && !O, pe = N(
|
|
4106
|
+
() => bs(h),
|
|
4080
4107
|
[h]
|
|
4081
4108
|
);
|
|
4082
4109
|
Y(() => {
|
|
4083
|
-
|
|
4084
|
-
const w =
|
|
4110
|
+
pe.length || R([]);
|
|
4111
|
+
const w = pe.map(
|
|
4085
4112
|
(_) => _.activityData?.annotations?.map((j) => ({
|
|
4086
4113
|
...j,
|
|
4087
4114
|
activityId: _.activityId
|
|
4088
4115
|
}))
|
|
4089
4116
|
).filter(Boolean).flat();
|
|
4090
|
-
|
|
4091
|
-
}, [
|
|
4117
|
+
R(w);
|
|
4118
|
+
}, [pe]), Y(() => {
|
|
4092
4119
|
const w = h.map((_) => {
|
|
4093
|
-
const j =
|
|
4120
|
+
const j = _t(_);
|
|
4094
4121
|
return j && { ...j, activityId: _.activityId };
|
|
4095
4122
|
}).filter((_) => !!_);
|
|
4096
4123
|
ue(w);
|
|
4097
4124
|
}, [h]);
|
|
4098
|
-
const
|
|
4125
|
+
const me = ms(
|
|
4099
4126
|
// @ts-ignore
|
|
4100
|
-
|
|
4127
|
+
pe,
|
|
4101
4128
|
y,
|
|
4102
|
-
|
|
4129
|
+
p,
|
|
4103
4130
|
u,
|
|
4104
4131
|
f,
|
|
4105
4132
|
S
|
|
4106
4133
|
), Ie = N(() => {
|
|
4107
|
-
if (!E) return
|
|
4134
|
+
if (!E) return me;
|
|
4108
4135
|
const w = E.toLowerCase();
|
|
4109
|
-
return
|
|
4136
|
+
return me.filter(
|
|
4110
4137
|
(_) => _.body?.toLowerCase().includes(w)
|
|
4111
4138
|
);
|
|
4112
|
-
}, [
|
|
4113
|
-
|
|
4139
|
+
}, [me, E]), Z = fe(null);
|
|
4140
|
+
hs({ feedRef: Z, isInputOpen: m === nt, height: 93 }), gs({
|
|
4114
4141
|
entities: l,
|
|
4115
4142
|
feedRef: Z,
|
|
4116
4143
|
filter: S,
|
|
4117
4144
|
disabled: !!Q.length,
|
|
4118
4145
|
isLoading: b
|
|
4119
|
-
}),
|
|
4146
|
+
}), vs({
|
|
4120
4147
|
feedRef: Z,
|
|
4121
4148
|
highlighted: Q,
|
|
4122
4149
|
isLoading: b || D,
|
|
4123
|
-
loadNextPage:
|
|
4124
|
-
hasNextPage:
|
|
4150
|
+
loadNextPage: $,
|
|
4151
|
+
hasNextPage: !!$,
|
|
4125
4152
|
activities: h
|
|
4126
4153
|
});
|
|
4127
4154
|
const {
|
|
4128
4155
|
submitComment: Ne,
|
|
4129
|
-
updateComment:
|
|
4156
|
+
updateComment: Re,
|
|
4130
4157
|
deleteComment: Ee,
|
|
4131
4158
|
submitReview: Fe,
|
|
4132
4159
|
isSaving: Je
|
|
4133
|
-
} =
|
|
4134
|
-
projectName:
|
|
4160
|
+
} = is({
|
|
4161
|
+
projectName: s,
|
|
4135
4162
|
entityType: u,
|
|
4136
4163
|
entities: l,
|
|
4137
4164
|
filter: S,
|
|
@@ -4163,36 +4190,36 @@ const fc = 30, yc = ({
|
|
|
4163
4190
|
const qe = ct[xe];
|
|
4164
4191
|
if (qe === void 0) return;
|
|
4165
4192
|
const ht = qe + ie.length, lt = le.slice(0, qe) + T + le.slice(ht);
|
|
4166
|
-
lt &&
|
|
4193
|
+
lt && Re(_, lt, _.files);
|
|
4167
4194
|
}, Be = (w) => {
|
|
4168
4195
|
const { entityId: _, entityType: j, activityId: U } = w;
|
|
4169
4196
|
if (!j || !["version", "task", "folder"].includes(j))
|
|
4170
4197
|
return console.log("Entity type not supported yet");
|
|
4171
|
-
if (!_ || !j || !
|
|
4172
|
-
H({ entityId: _, entityType: j, projectName:
|
|
4198
|
+
if (!_ || !j || !s) return console.log("No entity id or type found");
|
|
4199
|
+
H({ entityId: _, entityType: j, projectName: s }), X([U]);
|
|
4173
4200
|
}, oe = ({ index: w, activityId: _ }) => {
|
|
4174
4201
|
const j = Object.values(Ie).reverse().filter((U) => U.activityType == "comment").map((U) => ({
|
|
4175
4202
|
id: U.activityId,
|
|
4176
4203
|
files: U.files.filter((ie) => gt(ie.mime, ie.ext))
|
|
4177
4204
|
})).filter((U) => U.files.length > 0);
|
|
4178
|
-
q?.({ files: j, activityId: _, index: w, projectName:
|
|
4205
|
+
q?.({ files: j, activityId: _, index: w, projectName: s });
|
|
4179
4206
|
}, [Xe, Me] = L(null), Ge = !De && !t && !e, _e = We(
|
|
4180
4207
|
(w) => {
|
|
4181
|
-
Me({ key:
|
|
4208
|
+
Me({ key: hn(), activity: w }), g(nt);
|
|
4182
4209
|
},
|
|
4183
4210
|
[g]
|
|
4184
|
-
), Oe = N(() =>
|
|
4185
|
-
projectName:
|
|
4211
|
+
), Oe = N(() => ys(10), []), be = Fs({
|
|
4212
|
+
projectName: s,
|
|
4186
4213
|
enabled: r,
|
|
4187
4214
|
entityIds: l.map((w) => w.id),
|
|
4188
|
-
activities:
|
|
4215
|
+
activities: me,
|
|
4189
4216
|
loadingActivities: b,
|
|
4190
4217
|
userName: f
|
|
4191
4218
|
});
|
|
4192
|
-
return /* @__PURE__ */ c(Ae, { children: /* @__PURE__ */ x(
|
|
4219
|
+
return /* @__PURE__ */ c(Ae, { children: /* @__PURE__ */ x(ns, { className: "feed", children: [
|
|
4193
4220
|
void 0,
|
|
4194
4221
|
/* @__PURE__ */ c(
|
|
4195
|
-
|
|
4222
|
+
qn,
|
|
4196
4223
|
{
|
|
4197
4224
|
feedFilter: S,
|
|
4198
4225
|
setFeedFilter: M,
|
|
@@ -4204,17 +4231,17 @@ const fc = 30, yc = ({
|
|
|
4204
4231
|
checklistCount: C
|
|
4205
4232
|
}
|
|
4206
4233
|
),
|
|
4207
|
-
/* @__PURE__ */ x(
|
|
4234
|
+
/* @__PURE__ */ x(os, { ref: Z, className: te({ loading: b }, "no-shimmer"), children: [
|
|
4208
4235
|
b ? Oe : Ie.map((w) => /* @__PURE__ */ c(
|
|
4209
|
-
|
|
4236
|
+
Gn,
|
|
4210
4237
|
{
|
|
4211
4238
|
activity: w,
|
|
4212
4239
|
onCheckChange: Ue,
|
|
4213
4240
|
onDelete: Ee,
|
|
4214
|
-
onUpdate: async (_, j, U, ie) => await
|
|
4241
|
+
onUpdate: async (_, j, U, ie) => await Re(w, _, j, ie),
|
|
4215
4242
|
onDuplicate: Ge ? _e : void 0,
|
|
4216
|
-
projectInfo:
|
|
4217
|
-
projectName:
|
|
4243
|
+
projectInfo: p,
|
|
4244
|
+
projectName: s,
|
|
4218
4245
|
entityType: u,
|
|
4219
4246
|
onReferenceClick: Be,
|
|
4220
4247
|
createdAts: l.map((_) => _.createdAt),
|
|
@@ -4222,7 +4249,7 @@ const fc = 30, yc = ({
|
|
|
4222
4249
|
showOrigin: l.length > 1,
|
|
4223
4250
|
filter: S,
|
|
4224
4251
|
editProps: {
|
|
4225
|
-
projectName:
|
|
4252
|
+
projectName: s,
|
|
4226
4253
|
entities: l,
|
|
4227
4254
|
entityType: u
|
|
4228
4255
|
},
|
|
@@ -4234,14 +4261,14 @@ const fc = 30, yc = ({
|
|
|
4234
4261
|
},
|
|
4235
4262
|
w.activityId
|
|
4236
4263
|
)),
|
|
4237
|
-
Ie.length === 0 && W && !O && !b && /* @__PURE__ */ c(
|
|
4238
|
-
v &&
|
|
4239
|
-
|
|
4264
|
+
Ie.length === 0 && W && !O && !b && /* @__PURE__ */ c(Tt, { message: "No versions published yet", icon: "layers" }),
|
|
4265
|
+
v && $ && /* @__PURE__ */ c(
|
|
4266
|
+
Ha,
|
|
4240
4267
|
{
|
|
4241
4268
|
root: Z.current,
|
|
4242
|
-
onChange: (w) => w &&
|
|
4269
|
+
onChange: (w) => w && $(),
|
|
4243
4270
|
rootMargin: "400px 0px 0px 0px",
|
|
4244
|
-
children: /* @__PURE__ */ c(
|
|
4271
|
+
children: /* @__PURE__ */ c(as, { style: { height: 0 }, onClick: () => $(), children: D ? "Loading more..." : "Click to load more" })
|
|
4245
4272
|
}
|
|
4246
4273
|
)
|
|
4247
4274
|
] }),
|
|
@@ -4250,7 +4277,7 @@ const fc = 30, yc = ({
|
|
|
4250
4277
|
{
|
|
4251
4278
|
initValue: null,
|
|
4252
4279
|
onSubmit: Le,
|
|
4253
|
-
isOpen:
|
|
4280
|
+
isOpen: m === nt,
|
|
4254
4281
|
onClose: () => g(null),
|
|
4255
4282
|
onOpen: () => g(nt),
|
|
4256
4283
|
disabled: e,
|
|
@@ -4260,23 +4287,23 @@ const fc = 30, yc = ({
|
|
|
4260
4287
|
onReview: ye,
|
|
4261
4288
|
duplicate: Xe,
|
|
4262
4289
|
onDuplicateHandled: () => Me(null),
|
|
4263
|
-
saveDraft:
|
|
4290
|
+
saveDraft: i
|
|
4264
4291
|
}
|
|
4265
4292
|
)
|
|
4266
4293
|
] }) });
|
|
4267
4294
|
};
|
|
4268
4295
|
export {
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4296
|
+
jr as A,
|
|
4297
|
+
Rr as C,
|
|
4298
|
+
kc as D,
|
|
4272
4299
|
nt as F,
|
|
4273
|
-
|
|
4274
|
-
|
|
4300
|
+
rn as P,
|
|
4301
|
+
Ac as S,
|
|
4275
4302
|
ot as a,
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4303
|
+
Cc as b,
|
|
4304
|
+
xc as c,
|
|
4305
|
+
Fc as d,
|
|
4306
|
+
fr as e,
|
|
4280
4307
|
gt as f,
|
|
4281
|
-
|
|
4308
|
+
Vr as i
|
|
4282
4309
|
};
|