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