@parallelworks/tandem-web 0.142.0 → 0.144.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/_virtual/_virtual_i18n/en/common.js +156 -6
  2. package/_virtual/_virtual_i18n/es/common.js +156 -6
  3. package/_virtual/_virtual_i18n/ja/common.js +156 -6
  4. package/_virtual/_virtual_i18n/ko/common.js +156 -6
  5. package/_virtual/_virtual_i18n/zh/common.js +156 -6
  6. package/api/queries.js +85 -74
  7. package/components/AccessGrants.js +6 -6
  8. package/components/ActivityTimeline.js +2 -0
  9. package/components/CodeHostSettings.js +25 -25
  10. package/components/CustomFields.js +349 -0
  11. package/components/DocProperties.js +8 -2
  12. package/components/GitHub.js +22 -22
  13. package/components/IssueBoard.js +48 -43
  14. package/components/IssueEvent.js +2 -0
  15. package/components/IssueFilters.js +210 -122
  16. package/components/IssueImport.js +1 -1
  17. package/components/IssueRow.js +96 -79
  18. package/components/IssueTemplates.js +216 -156
  19. package/components/IssueTypes.js +318 -0
  20. package/components/NewIssueDialog.js +254 -216
  21. package/components/SettingsNav.js +45 -35
  22. package/components/TeamForm.js +49 -35
  23. package/components/TeamRepositories.js +51 -51
  24. package/components/TeamWorkflow.js +8 -8
  25. package/components/Updates.js +8 -8
  26. package/components/icons.js +8 -8
  27. package/lib/boardMove.js +69 -47
  28. package/lib/customFields.js +113 -0
  29. package/lib/issueDisplay.js +27 -12
  30. package/lib/issueList.js +166 -62
  31. package/lib/issueTypes.js +50 -0
  32. package/lib/teamTree.js +24 -0
  33. package/lib/views.js +13 -11
  34. package/package.json +1 -1
  35. package/pages/issues.js +331 -291
  36. package/routeTree.gen.js +186 -174
  37. package/routes/_workspace/agents/index2.js +9 -9
  38. package/routes/_workspace/issues/_identifier2.js +433 -370
  39. package/routes/_workspace/projects/_projectId3.js +213 -201
  40. package/routes/_workspace/settings/audit-log3.js +2 -0
  41. package/routes/_workspace/settings/fields.js +6 -0
  42. package/routes/_workspace/settings/fields2.js +30 -0
  43. package/routes/_workspace/settings/fields3.js +5 -0
  44. package/routes/_workspace/settings/groups2.js +74 -74
  45. package/routes/_workspace/settings/import.js +6 -0
  46. package/routes/_workspace/settings/import2.js +330 -0
  47. package/routes/_workspace/settings/import3.js +4 -0
  48. package/routes/_workspace/settings/labels2.js +33 -33
  49. package/routes/_workspace/settings/members2.js +35 -35
  50. package/routes/_workspace/settings/roles2.js +24 -24
  51. package/routes/_workspace/settings/runners2.js +18 -18
  52. package/routes/_workspace/settings/sessions2.js +9 -9
  53. package/routes/_workspace/settings/slack2.js +8 -8
  54. package/routes/_workspace/settings/sso2.js +50 -50
  55. package/routes/_workspace/settings/tokens2.js +15 -15
  56. package/routes/_workspace/settings/webhooks2.js +42 -42
  57. package/routes/_workspace/teams/_key/settings2.js +138 -76
  58. package/routes/_workspace2.js +320 -318
@@ -3,61 +3,65 @@ import { branchName as n } from "../../../lib/branch.js";
3
3
  import { usePageTitle as r } from "../../../lib/pageTitle.js";
4
4
  import { Link as i, useNavigate as a } from "../../../lib/router.js";
5
5
  import { areasQuery as o, attachmentsQuery as s, commentsQuery as c, cyclesQuery as l, eventsQuery as u, issueDocsQuery as d, issueLinksQuery as f, issueQuery as p, labelsQuery as m, meQuery as h, projectsQuery as g, reactionsQuery as _, statusesQuery as v, teamsQuery as y } from "../../../api/queries.js";
6
- import { AreaIcon as b, BranchIcon as x, CalendarIcon as S, CloseIcon as C, CycleIcon as w, EstimateIcon as T, FileTextIcon as E, InboxIcon as D, PriorityIcon as O, ProjectIcon as k, StatusIcon as ee, TriageIcon as A, usePriorityNames as j } from "../../../components/icons.js";
7
- import { Route as M } from "./_identifier.js";
8
- import { copyItem as N } from "../../../lib/menus.js";
9
- import { docRef as P, useDocMenu as F } from "../../../lib/docs.js";
10
- import { invalidateIssueViews as I, useUpdateIssue as te } from "../../../api/mutations.js";
11
- import { useTime as ne } from "../../../lib/time.js";
12
- import { DueDate as L, ProjectStatusIcon as re, SlaBadge as ie, scalePoints as ae, useEstimateLabel as oe } from "../../../components/Planning.js";
13
- import { connectorActor as se, usePeople as ce } from "../../../lib/people.js";
14
- import { PickManyBox as le, usePickMany as ue } from "../../../lib/pickMany.js";
15
- import { assigneeKey as de, parseAssigneeKey as fe, useAssigneeOptions as pe } from "../../../lib/assignees.js";
16
- import { issueURL as me, useIssueMenu as he } from "../../../lib/issueMenu.js";
17
- import { rememberPage as ge } from "../../../lib/recent.js";
18
- import { issueScope as _e, useCan as ve, useCanTriage as ye } from "../../../lib/roles.js";
19
- import { useConfirm as be } from "../../../lib/confirm.js";
20
- import { useLinkedIssues as xe } from "../../../lib/linkedIssues.js";
21
- import { PersonHoverCard as Se } from "../../../components/PersonHoverCard.js";
22
- import { AttachButton as Ce, IssueAttachments as we, UploadStatus as Te, useAttachmentUpload as Ee } from "../../../components/Attachments.js";
23
- import { actorAvatar as De } from "../../../lib/avatar.js";
24
- import { Editor as R } from "../../../components/Editor.js";
25
- import { useOthersOn as Oe, useReportLocation as ke } from "../../../lib/live.js";
26
- import { useReadIssueNotifications as Ae } from "../../../lib/notifications.js";
27
- import { useShortcuts as je } from "../../../lib/shortcuts.js";
28
- import { AgentPage as Me } from "../../../components/AgentPage.js";
29
- import { AgentWork as Ne } from "../../../components/AgentWork.js";
30
- import { FavoriteStar as Pe } from "../../../components/FavoriteStar.js";
31
- import { caretColor as Fe, useCollabSession as Ie } from "../../../lib/collab.js";
32
- import { CollabEditor as Le } from "../../../components/CollabEditor.js";
33
- import { FieldNote as Re, Viewers as ze } from "../../../components/Presence.js";
34
- import { Timeline as Be } from "../../../components/ActivityTimeline.js";
35
- import { CustomerRequests as Ve } from "../../../components/CustomerRequests.js";
36
- import { IssueLinkChips as He, IssueLinks as Ue, SharedThreadHeader as We } from "../../../components/GitHub.js";
37
- import { IssueCode as Ge } from "../../../components/IssueCode.js";
38
- import { EventLine as Ke } from "../../../components/IssueEvent.js";
39
- import { ParentProperty as qe, SubIssuesAndRelations as Je } from "../../../components/IssueRelations.js";
40
- import { Reactions as Ye } from "../../../components/Reactions.js";
41
- import { TimeInStatus as Xe } from "../../../components/Reports.js";
42
- import { SubscribeButton as Ze } from "../../../components/SubscribeButton.js";
43
- import { Widgets as Qe } from "../../../components/Widgets.js";
44
- import { Avatar as $e, Button as z, Callout as et, Card as tt, Combobox as B, CopyButton as nt, DatePicker as rt, ErrorText as it, IconButton as at, Kbd as ot, RelativeTime as st, Select as V, TitleInput as ct, Tooltip as lt, buttonClasses as ut, menuDivider as dt, toast as ft, useOpenMenu as H } from "@parallelworks/ui";
45
- import { createContext as pt, useCallback as mt, useContext as ht, useEffect as gt, useMemo as _t, useRef as U, useState as W } from "react";
46
- import { useErrorMessage as vt } from "@parallelworks/problem/react";
47
- import { useTranslations as G } from "use-intl";
48
- import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
49
- import { useMutation as Y, useQuery as X, useQueryClient as Z, useSuspenseQuery as Q } from "@tanstack/react-query";
50
- import { ArchiveIcon as yt } from "@parallelworks/ui/icons";
51
- import { MoreButton as bt } from "@parallelworks/ui/list";
6
+ import { useConfirm as b } from "../../../lib/confirm.js";
7
+ import { customFieldsQuery as x, hasValue as S } from "../../../lib/customFields.js";
8
+ import { issueTypesQuery as C, typeShows as w, typesFor as T } from "../../../lib/issueTypes.js";
9
+ import { AreaIcon as E, BranchIcon as D, CalendarIcon as O, CloseIcon as k, CycleIcon as A, EstimateIcon as j, FileTextIcon as M, InboxIcon as N, PriorityIcon as P, ProjectIcon as F, StatusIcon as ee, TriageIcon as I, usePriorityNames as te } from "../../../components/icons.js";
10
+ import { TypeIcon as ne } from "../../../components/IssueTypes.js";
11
+ import { Route as re } from "./_identifier.js";
12
+ import { copyItem as ie } from "../../../lib/menus.js";
13
+ import { docRef as ae, useDocMenu as oe } from "../../../lib/docs.js";
14
+ import { invalidateIssueViews as se, useUpdateIssue as ce } from "../../../api/mutations.js";
15
+ import { useTime as le } from "../../../lib/time.js";
16
+ import { DueDate as ue, ProjectStatusIcon as de, SlaBadge as fe, scalePoints as pe, useEstimateLabel as me } from "../../../components/Planning.js";
17
+ import { connectorActor as he, usePeople as ge } from "../../../lib/people.js";
18
+ import { PickManyBox as _e, usePickMany as ve } from "../../../lib/pickMany.js";
19
+ import { assigneeKey as ye, parseAssigneeKey as be, useAssigneeOptions as xe } from "../../../lib/assignees.js";
20
+ import { issueURL as Se, useIssueMenu as Ce } from "../../../lib/issueMenu.js";
21
+ import { rememberPage as we } from "../../../lib/recent.js";
22
+ import { issueScope as Te, useCan as Ee, useCanTriage as De } from "../../../lib/roles.js";
23
+ import { useLinkedIssues as Oe } from "../../../lib/linkedIssues.js";
24
+ import { PersonHoverCard as ke } from "../../../components/PersonHoverCard.js";
25
+ import { AttachButton as Ae, IssueAttachments as je, UploadStatus as Me, useAttachmentUpload as Ne } from "../../../components/Attachments.js";
26
+ import { IssueFields as Pe } from "../../../components/CustomFields.js";
27
+ import { actorAvatar as Fe } from "../../../lib/avatar.js";
28
+ import { Editor as L } from "../../../components/Editor.js";
29
+ import { useOthersOn as Ie, useReportLocation as Le } from "../../../lib/live.js";
30
+ import { useReadIssueNotifications as Re } from "../../../lib/notifications.js";
31
+ import { useShortcuts as ze } from "../../../lib/shortcuts.js";
32
+ import { AgentPage as Be } from "../../../components/AgentPage.js";
33
+ import { AgentWork as Ve } from "../../../components/AgentWork.js";
34
+ import { FavoriteStar as He } from "../../../components/FavoriteStar.js";
35
+ import { caretColor as Ue, useCollabSession as We } from "../../../lib/collab.js";
36
+ import { CollabEditor as Ge } from "../../../components/CollabEditor.js";
37
+ import { FieldNote as Ke, Viewers as qe } from "../../../components/Presence.js";
38
+ import { Timeline as Je } from "../../../components/ActivityTimeline.js";
39
+ import { CustomerRequests as Ye } from "../../../components/CustomerRequests.js";
40
+ import { IssueLinkChips as Xe, IssueLinks as Ze, SharedThreadHeader as Qe } from "../../../components/GitHub.js";
41
+ import { IssueCode as $e } from "../../../components/IssueCode.js";
42
+ import { EventLine as et } from "../../../components/IssueEvent.js";
43
+ import { ParentProperty as tt, SubIssuesAndRelations as nt } from "../../../components/IssueRelations.js";
44
+ import { Reactions as rt } from "../../../components/Reactions.js";
45
+ import { TimeInStatus as it } from "../../../components/Reports.js";
46
+ import { SubscribeButton as at } from "../../../components/SubscribeButton.js";
47
+ import { Widgets as ot } from "../../../components/Widgets.js";
48
+ import { Avatar as st, Button as R, Callout as ct, Card as lt, Combobox as z, CopyButton as ut, DatePicker as dt, ErrorText as ft, IconButton as pt, Kbd as mt, RelativeTime as ht, Select as B, TitleInput as gt, Tooltip as _t, buttonClasses as vt, menuDivider as yt, toast as bt, useOpenMenu as V } from "@parallelworks/ui";
49
+ import { createContext as xt, useCallback as St, useContext as Ct, useEffect as wt, useMemo as Tt, useRef as H, useState as U } from "react";
50
+ import { useErrorMessage as Et } from "@parallelworks/problem/react";
51
+ import { useFormatter as Dt, useTranslations as W } from "use-intl";
52
+ import { Fragment as G, jsx as K, jsxs as q } from "react/jsx-runtime";
53
+ import { useMutation as J, useQuery as Y, useQueryClient as X, useSuspenseQuery as Z } from "@tanstack/react-query";
54
+ import { ArchiveIcon as Ot } from "@parallelworks/ui/icons";
55
+ import { MoreButton as kt } from "@parallelworks/ui/list";
52
56
  // src/routes/$workspace/issues/$identifier.tsx?tsr-split=component
53
- function xt() {
54
- let o = G("issue"), s = ne(), c = vt(), l = G("common"), { workspace: u, identifier: d } = M.useParams(), { data: m } = Q(p(u, d)), { data: g } = Q(y(u)), { data: _ } = Q(h), { data: v = [] } = X(f(u, d)), [b, S] = W();
55
- ke({
57
+ function At() {
58
+ let o = W("issue"), s = le(), c = Et(), l = W("common"), { workspace: u, identifier: d } = re.useParams(), { data: m } = Z(p(u, d)), { data: g } = Z(y(u)), { data: _ } = Z(h), { data: v = [] } = Y(f(u, d)), [x, S] = U();
59
+ Le({
56
60
  identifier: m.identifier,
57
- ...b && { field: b }
58
- }), r(`${m.identifier} ${m.title}`), Ae(u, m.identifier);
61
+ ...x && { field: x }
62
+ }), r(`${m.identifier} ${m.title}`), Re(u, m.identifier);
59
63
  let C = a(), w = n(m.identifier, m.title);
60
- gt(() => {
64
+ wt(() => {
61
65
  window.location.pathname.endsWith(`/issues/${w}`) || C({
62
66
  to: "/$workspace/issues/$identifier",
63
67
  params: {
@@ -74,21 +78,21 @@ function xt() {
74
78
  u,
75
79
  m.identifier
76
80
  ]);
77
- let T = ve(u, "delete_issues", _e(m)), E = Z(), { confirm: D, dialog: O } = be(), k = Y({
81
+ let T = Ee(u, "delete_issues", Te(m)), E = X(), { confirm: O, dialog: k } = b(), A = J({
78
82
  mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/restore", { params: { path: {
79
83
  workspace: u,
80
84
  identifier: m.identifier
81
85
  } } })),
82
86
  onSuccess: (e) => {
83
- E.setQueryData(p(u, m.identifier).queryKey, e), I(E, u, m.identifier);
87
+ E.setQueryData(p(u, m.identifier).queryKey, e), se(E, u, m.identifier);
84
88
  }
85
- }), ee = Y({
89
+ }), j = J({
86
90
  mutationFn: async () => t(await e.DELETE("/api/v1/workspaces/{workspace}/issues/{identifier}", { params: { path: {
87
91
  workspace: u,
88
92
  identifier: m.identifier
89
93
  } } })),
90
94
  onSuccess: () => {
91
- ft.success(o("deleted", { identifier: m.identifier })), I(E, u);
95
+ bt.success(o("deleted", { identifier: m.identifier })), se(E, u);
92
96
  let e = g.find((e) => e.id === m.teamId)?.key;
93
97
  C(e ? {
94
98
  to: "/$workspace/teams/$key/issues",
@@ -101,15 +105,15 @@ function xt() {
101
105
  params: { workspace: u }
102
106
  });
103
107
  }
104
- }), A = mt((e) => C({
108
+ }), M = St((e) => C({
105
109
  to: "/$workspace/issues/$identifier",
106
110
  params: {
107
111
  workspace: u,
108
112
  identifier: e
109
113
  }
110
114
  }), [C, u]);
111
- xe(u, m.body, A), gt(() => {
112
- ge(u, {
115
+ Oe(u, m.body, M), wt(() => {
116
+ we(u, {
113
117
  kind: "issue",
114
118
  href: `/${u}/issues/${m.identifier}`,
115
119
  label: `${m.identifier} ${m.title}`
@@ -119,81 +123,81 @@ function xt() {
119
123
  m.identifier,
120
124
  m.title
121
125
  ]);
122
- let j = Oe({ issue: m.identifier }, _?.user.username), N = g.find((e) => e.id === m.teamId), P = te(u, d), [F, L] = W(null), re = H(), ie = he(u);
123
- return je({
124
- s: () => L("status"),
125
- p: () => L("priority"),
126
- a: () => L("assignees"),
127
- l: () => L("labels"),
126
+ let N = Ie({ issue: m.identifier }, _?.user.username), P = g.find((e) => e.id === m.teamId), F = ce(u, d), [ee, I] = U(null), te = V(), ne = Ce(u);
127
+ return ze({
128
+ s: () => I("status"),
129
+ p: () => I("priority"),
130
+ a: () => I("assignees"),
131
+ l: () => I("labels"),
128
132
  Escape: () => C({
129
133
  to: "/$workspace/issues",
130
134
  params: { workspace: u }
131
135
  })
132
- }, F === null), /* @__PURE__ */ J("div", {
136
+ }, ee === null), /* @__PURE__ */ q("div", {
133
137
  className: "flex h-full flex-col",
134
138
  children: [
135
- /* @__PURE__ */ J("header", {
139
+ /* @__PURE__ */ q("header", {
136
140
  className: "flex h-12 shrink-0 items-center gap-2 border-b border-border px-4 text-sm md:px-5",
137
- onContextMenu: (e) => re(e, ie([m])),
141
+ onContextMenu: (e) => te(e, ne([m])),
138
142
  children: [
139
- /* @__PURE__ */ q(i, {
140
- to: N ? "/$workspace/teams/$key/issues" : "/$workspace/issues",
143
+ /* @__PURE__ */ K(i, {
144
+ to: P ? "/$workspace/teams/$key/issues" : "/$workspace/issues",
141
145
  params: {
142
146
  workspace: u,
143
- key: N?.key ?? ""
147
+ key: P?.key ?? ""
144
148
  },
145
149
  className: "text-muted-foreground hover:text-foreground",
146
- children: N?.name ?? o("issues")
150
+ children: P?.name ?? o("issues")
147
151
  }),
148
- /* @__PURE__ */ q("span", {
152
+ /* @__PURE__ */ K("span", {
149
153
  className: "text-muted-foreground",
150
154
  "aria-hidden": "true",
151
155
  children: "/"
152
156
  }),
153
- /* @__PURE__ */ q("span", {
157
+ /* @__PURE__ */ K("span", {
154
158
  className: "shrink-0 font-medium whitespace-nowrap",
155
159
  children: m.identifier
156
160
  }),
157
- /* @__PURE__ */ q(Pe, {
161
+ /* @__PURE__ */ K(He, {
158
162
  workspace: u,
159
163
  kind: "issue",
160
164
  target: m.id
161
165
  }),
162
- /* @__PURE__ */ q(Ze, {
166
+ /* @__PURE__ */ K(at, {
163
167
  workspace: u,
164
168
  identifier: m.identifier
165
169
  }),
166
- /* @__PURE__ */ q(nt, {
170
+ /* @__PURE__ */ K(ut, {
167
171
  text: n(m.identifier, m.title),
168
172
  label: o("copyBranchName"),
169
- icon: /* @__PURE__ */ q(x, {}),
173
+ icon: /* @__PURE__ */ K(D, {}),
170
174
  size: "sm",
171
175
  variant: "ghost",
172
176
  success: o("copiedBranchName", { name: n(m.identifier, m.title) }),
173
177
  failure: o("copyFailed"),
174
178
  className: "max-sm:hidden"
175
179
  }),
176
- /* @__PURE__ */ q(He, { links: v }),
177
- /* @__PURE__ */ J("span", {
180
+ /* @__PURE__ */ K(Xe, { links: v }),
181
+ /* @__PURE__ */ q("span", {
178
182
  className: "ml-auto flex items-center gap-3",
179
183
  children: [
180
- P.isPending && /* @__PURE__ */ q("span", {
184
+ F.isPending && /* @__PURE__ */ K("span", {
181
185
  className: "text-xs text-muted-foreground",
182
186
  children: l("saving")
183
187
  }),
184
- /* @__PURE__ */ q(ze, {
188
+ /* @__PURE__ */ K(qe, {
185
189
  workspace: u,
186
- others: j
190
+ others: N
187
191
  }),
188
- /* @__PURE__ */ q(bt, {
189
- items: () => [...ie([m]), ...T ? [{
192
+ /* @__PURE__ */ K(kt, {
193
+ items: () => [...ne([m]), ...T ? [{
190
194
  label: o("deleteIssue"),
191
195
  destructive: !0,
192
- onClick: () => D({
196
+ onClick: () => O({
193
197
  title: o("deleteTitle", { identifier: m.identifier }),
194
198
  description: o("deleteDescription"),
195
199
  confirmLabel: o("deleteIssue"),
196
- onConfirm: () => ee.mutateAsync()
200
+ onConfirm: () => j.mutateAsync()
197
201
  })
198
202
  }] : []],
199
203
  label: l("moreActionsFor", { name: m.identifier }),
@@ -201,114 +205,114 @@ function xt() {
201
205
  })
202
206
  ]
203
207
  }),
204
- P.isError && /* @__PURE__ */ q(it, {
208
+ F.isError && /* @__PURE__ */ K(ft, {
205
209
  inline: !0,
206
210
  className: "ml-auto text-xs",
207
- children: c(P.error)
211
+ children: c(F.error)
208
212
  })
209
213
  ]
210
214
  }),
211
- O,
212
- /* @__PURE__ */ J("div", {
215
+ k,
216
+ /* @__PURE__ */ q("div", {
213
217
  className: "flex min-h-0 flex-1 flex-col overflow-y-auto md:flex-row md:overflow-hidden",
214
- children: [/* @__PURE__ */ q("div", {
218
+ children: [/* @__PURE__ */ K("div", {
215
219
  className: "min-w-0 md:flex-1 md:overflow-y-auto",
216
- children: /* @__PURE__ */ J("article", {
220
+ children: /* @__PURE__ */ q("article", {
217
221
  className: "w-full px-4 pt-6 pb-24 md:px-8 md:pt-8",
218
222
  children: [
219
- /* @__PURE__ */ J(Lt.Provider, {
223
+ /* @__PURE__ */ q($.Provider, {
220
224
  value: S,
221
225
  children: [
222
- m.triage && /* @__PURE__ */ q(St, {
226
+ m.triage && /* @__PURE__ */ K(jt, {
223
227
  workspace: u,
224
228
  issue: m
225
229
  }),
226
- m.archivedAt && /* @__PURE__ */ q(et, {
230
+ m.archivedAt && /* @__PURE__ */ K(ct, {
227
231
  tone: "muted",
228
- icon: /* @__PURE__ */ q(yt, {}),
232
+ icon: /* @__PURE__ */ K(Ot, {}),
229
233
  className: "mb-5",
230
- children: /* @__PURE__ */ J("span", {
234
+ children: /* @__PURE__ */ q("span", {
231
235
  className: "flex flex-wrap items-center gap-x-3 gap-y-1",
232
- children: [o("archivedNote", { when: s.day(m.archivedAt.slice(0, 10)) }), /* @__PURE__ */ q(z, {
236
+ children: [o("archivedNote", { when: s.day(m.archivedAt.slice(0, 10)) }), /* @__PURE__ */ K(R, {
233
237
  type: "button",
234
238
  size: "sm",
235
- onClick: () => k.mutate(),
236
- loading: k.isPending,
239
+ onClick: () => A.mutate(),
240
+ loading: A.isPending,
237
241
  children: o("restore")
238
242
  })]
239
243
  })
240
244
  }),
241
- /* @__PURE__ */ q(Ct, {
245
+ /* @__PURE__ */ K(Mt, {
242
246
  issue: m,
243
- onSave: (e) => P.mutate({ title: e })
247
+ onSave: (e) => F.mutate({ title: e })
244
248
  }),
245
- /* @__PURE__ */ q(Re, {
249
+ /* @__PURE__ */ K(Ke, {
246
250
  workspace: u,
247
- others: j,
251
+ others: N,
248
252
  field: "title"
249
253
  }),
250
- /* @__PURE__ */ q(wt, {
254
+ /* @__PURE__ */ K(Nt, {
251
255
  workspace: u,
252
256
  issue: m
253
257
  }),
254
- /* @__PURE__ */ q(Re, {
258
+ /* @__PURE__ */ K(Ke, {
255
259
  workspace: u,
256
- others: j,
260
+ others: N,
257
261
  field: "body"
258
262
  }),
259
- /* @__PURE__ */ q(Je, {
263
+ /* @__PURE__ */ K(nt, {
260
264
  workspace: u,
261
265
  issue: m
262
266
  }),
263
- /* @__PURE__ */ q(Ve, {
267
+ /* @__PURE__ */ K(Ye, {
264
268
  workspace: u,
265
269
  identifier: m.identifier,
266
- enabled: !!N?.customerRequestsEnabled
270
+ enabled: !!P?.customerRequestsEnabled
267
271
  }),
268
- /* @__PURE__ */ q(Tt, {
272
+ /* @__PURE__ */ K(Pt, {
269
273
  workspace: u,
270
274
  identifier: d
271
275
  }),
272
- /* @__PURE__ */ q(Ge, {
276
+ /* @__PURE__ */ K($e, {
273
277
  workspace: u,
274
278
  identifier: d,
275
279
  title: m.title
276
280
  }),
277
- /* @__PURE__ */ q(Ne, {
281
+ /* @__PURE__ */ K(Ve, {
278
282
  workspace: u,
279
283
  identifier: d
280
284
  }),
281
- /* @__PURE__ */ q(jt, {
285
+ /* @__PURE__ */ K(Vt, {
282
286
  workspace: u,
283
287
  identifier: d,
284
- others: j
288
+ others: N
285
289
  })
286
290
  ]
287
291
  }),
288
- /* @__PURE__ */ q(At, {
292
+ /* @__PURE__ */ K(Bt, {
289
293
  workspace: u,
290
294
  identifier: d
291
295
  }),
292
- /* @__PURE__ */ q(we, {
296
+ /* @__PURE__ */ K(je, {
293
297
  workspace: u,
294
298
  identifier: d
295
299
  })
296
300
  ]
297
301
  })
298
- }), /* @__PURE__ */ q(Et, {
302
+ }), /* @__PURE__ */ K(Ft, {
299
303
  workspace: u,
300
304
  issue: m,
301
- team: N,
302
- open: F,
303
- setOpen: L,
304
- update: (e) => P.mutate(e)
305
+ team: P,
306
+ open: ee,
307
+ setOpen: I,
308
+ update: (e) => F.mutate(e)
305
309
  })]
306
310
  })
307
311
  ]
308
312
  });
309
313
  }
310
- function St({ workspace: n, issue: r }) {
311
- let i = G("triage"), a = vt(), o = Z(), s = ye(n, r.teamId), c = Y({
314
+ function jt({ workspace: n, issue: r }) {
315
+ let i = W("triage"), a = Et(), o = X(), s = De(n, r.teamId), c = J({
312
316
  mutationFn: async (i) => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/triage", {
313
317
  params: { path: {
314
318
  workspace: n,
@@ -322,27 +326,27 @@ function St({ workspace: n, issue: r }) {
322
326
  "issues"
323
327
  ] })
324
328
  });
325
- return /* @__PURE__ */ J("div", {
329
+ return /* @__PURE__ */ q("div", {
326
330
  className: "mb-5 flex flex-wrap items-center gap-3 rounded-xl border border-border bg-muted/40 px-4 py-3",
327
331
  children: [
328
- /* @__PURE__ */ q(A, { className: "size-4 shrink-0 text-muted-foreground" }),
329
- /* @__PURE__ */ q("p", {
332
+ /* @__PURE__ */ K(I, { className: "size-4 shrink-0 text-muted-foreground" }),
333
+ /* @__PURE__ */ K("p", {
330
334
  className: "min-w-0 flex-1 text-sm",
331
335
  children: i("waiting")
332
336
  }),
333
- c.error && /* @__PURE__ */ q("span", {
337
+ c.error && /* @__PURE__ */ K("span", {
334
338
  className: "text-xs text-danger",
335
339
  children: a(c.error)
336
340
  }),
337
- s && /* @__PURE__ */ J("span", {
341
+ s && /* @__PURE__ */ q("span", {
338
342
  className: "flex gap-2",
339
- children: [/* @__PURE__ */ q(z, {
343
+ children: [/* @__PURE__ */ K(R, {
340
344
  variant: "outline",
341
345
  size: "sm",
342
346
  disabled: c.isPending,
343
347
  onClick: () => c.mutate("decline"),
344
348
  children: i("decline")
345
- }), /* @__PURE__ */ q(z, {
349
+ }), /* @__PURE__ */ K(R, {
346
350
  variant: "primary",
347
351
  size: "sm",
348
352
  loading: c.isPending && c.variables === "accept",
@@ -353,12 +357,12 @@ function St({ workspace: n, issue: r }) {
353
357
  ]
354
358
  });
355
359
  }
356
- function Ct({ issue: e, onSave: t }) {
357
- let n = G("issue"), r = ht(Lt);
358
- return /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q("h1", {
360
+ function Mt({ issue: e, onSave: t }) {
361
+ let n = W("issue"), r = Ct($);
362
+ return /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K("h1", {
359
363
  className: "sr-only",
360
364
  children: e.title
361
- }), /* @__PURE__ */ q(ct, {
365
+ }), /* @__PURE__ */ K(gt, {
362
366
  value: e.title,
363
367
  onCommit: t,
364
368
  onFocus: () => r("title"),
@@ -366,24 +370,24 @@ function Ct({ issue: e, onSave: t }) {
366
370
  "aria-label": n("title")
367
371
  })] });
368
372
  }
369
- function wt({ workspace: e, issue: t }) {
370
- let n = G("issue"), r = G("common"), i = ht(Lt), { data: a } = Q(h), o = U(null), s = _t(() => ({
373
+ function Nt({ workspace: e, issue: t }) {
374
+ let n = W("issue"), r = W("common"), i = Ct($), { data: a } = Z(h), o = H(null), s = Tt(() => ({
371
375
  name: a?.user.name ?? n("someone"),
372
- color: Fe(a?.user.username ?? "")
376
+ color: Ue(a?.user.username ?? "")
373
377
  }), [
374
378
  a?.user.name,
375
379
  a?.user.username,
376
380
  n
377
- ]), { session: c, error: l } = Ie({
381
+ ]), { session: c, error: l } = We({
378
382
  workspace: e,
379
383
  target: { issue: t.identifier },
380
384
  user: s,
381
385
  getMarkdown: o
382
- }), u = U(null), d = Ee(e, t.identifier), { data: f = [] } = X(_(e, t.identifier)), p = ve(e, "comment", _e(t));
383
- return /* @__PURE__ */ J("div", {
386
+ }), u = H(null), d = Ne(e, t.identifier), { data: f = [] } = Y(_(e, t.identifier)), p = Ee(e, "comment", Te(t));
387
+ return /* @__PURE__ */ q("div", {
384
388
  className: "group mt-4 min-h-32",
385
389
  children: [
386
- c ? /* @__PURE__ */ q(Le, {
390
+ c ? /* @__PURE__ */ K(Ge, {
387
391
  session: c,
388
392
  user: s,
389
393
  getMarkdown: o,
@@ -396,23 +400,23 @@ function wt({ workspace: e, issue: t }) {
396
400
  placeholder: n("addDescription"),
397
401
  label: r("description"),
398
402
  className: "min-h-32"
399
- }, `${c.generation}:${c.doc.guid}`) : /* @__PURE__ */ q(R, {
403
+ }, `${c.generation}:${c.doc.guid}`) : /* @__PURE__ */ K(L, {
400
404
  value: t.body,
401
405
  editable: !1,
402
406
  className: "min-h-32"
403
407
  }),
404
- /* @__PURE__ */ q(it, {
408
+ /* @__PURE__ */ K(ft, {
405
409
  className: "mt-1",
406
410
  children: l
407
411
  }),
408
- c && /* @__PURE__ */ J("div", {
412
+ c && /* @__PURE__ */ q("div", {
409
413
  className: "mt-1 flex items-center justify-end gap-2",
410
- children: [/* @__PURE__ */ q(Te, {
414
+ children: [/* @__PURE__ */ K(Me, {
411
415
  pending: d.pending,
412
416
  error: d.error
413
- }), /* @__PURE__ */ q(Ce, { onFiles: (e) => d.upload(u.current, e) })]
417
+ }), /* @__PURE__ */ K(Ae, { onFiles: (e) => d.upload(u.current, e) })]
414
418
  }),
415
- /* @__PURE__ */ q(Ye, {
419
+ /* @__PURE__ */ K(rt, {
416
420
  workspace: e,
417
421
  identifier: t.identifier,
418
422
  reactions: f,
@@ -422,25 +426,25 @@ function wt({ workspace: e, issue: t }) {
422
426
  ]
423
427
  });
424
428
  }
425
- function Tt({ workspace: e, identifier: t }) {
426
- let n = G("issue"), { data: r } = Q(d(e, t)), a = H(), o = F(e);
427
- return r.length === 0 ? null : /* @__PURE__ */ J("section", {
429
+ function Pt({ workspace: e, identifier: t }) {
430
+ let n = W("issue"), { data: r } = Z(d(e, t)), a = V(), o = oe(e);
431
+ return r.length === 0 ? null : /* @__PURE__ */ q("section", {
428
432
  className: "mt-6",
429
433
  "aria-label": n("docs"),
430
- children: [/* @__PURE__ */ q("h2", {
434
+ children: [/* @__PURE__ */ K("h2", {
431
435
  className: "text-xs font-medium text-muted-foreground",
432
436
  children: n("docs")
433
- }), /* @__PURE__ */ q("ul", {
437
+ }), /* @__PURE__ */ K("ul", {
434
438
  className: "mt-1 flex flex-wrap gap-1.5",
435
- children: r.map((t) => /* @__PURE__ */ q("li", { children: /* @__PURE__ */ J(i, {
439
+ children: r.map((t) => /* @__PURE__ */ K("li", { children: /* @__PURE__ */ q(i, {
436
440
  to: "/$workspace/docs/$doc",
437
441
  params: {
438
442
  workspace: e,
439
- doc: P(t)
443
+ doc: ae(t)
440
444
  },
441
445
  onContextMenu: (e) => a(e, o(t)),
442
- className: `${ut({ size: "sm" })} max-w-72`,
443
- children: [/* @__PURE__ */ q(E, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ q("span", {
446
+ className: `${vt({ size: "sm" })} max-w-72`,
447
+ children: [/* @__PURE__ */ K(M, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ K("span", {
444
448
  className: "truncate",
445
449
  children: t.title
446
450
  })]
@@ -448,55 +452,61 @@ function Tt({ workspace: e, identifier: t }) {
448
452
  })]
449
453
  });
450
454
  }
451
- function Et({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c }) {
452
- let l = G("relations"), u = i?.key, d = G("issue.properties"), p = G("common"), h = j(), { data: g = [] } = X({
455
+ function Ft({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c }) {
456
+ let l = W("relations"), u = i?.key, d = W("issue.properties"), p = W("common"), h = te(), { data: g = [] } = Y({
453
457
  ...v(n, u ?? ""),
454
458
  enabled: !!u
455
- }), { data: _ = [] } = X(m(n)), { data: y = [] } = X(f(n, r.identifier)), { nameOf: b, actorName: x, avatarOf: S } = ce(n), C = Z(), w = Y({
459
+ }), { data: _ = [] } = Y(m(n)), { data: y = [] } = Y(f(n, r.identifier)), { nameOf: b, actorName: x, avatarOf: S } = ge(n), C = X(), w = J({
456
460
  mutationFn: async (r) => t(await e.POST("/api/v1/workspaces/{workspace}/labels", {
457
461
  params: { path: { workspace: n } },
458
462
  body: {
459
463
  name: r,
460
- color: Dt[_.length % Dt.length] ?? "#d73a4a"
464
+ color: It[_.length % It.length] ?? "#d73a4a"
461
465
  }
462
466
  })),
463
467
  onSuccess: (e) => {
464
468
  C.invalidateQueries({ queryKey: m(n).queryKey }), c({ addLabels: [e.id] });
465
469
  }
466
- }), T = r.assignees.map(de), E = pe(n, !0), D = (e) => (t) => s(t ? e : null), k = ue(o === "assignees", () => s(null)), A = ue(o === "labels", () => s(null)), M = "flex h-8 w-full items-center gap-2 rounded-md px-2 text-sm hover:bg-muted", N = H(), P = he(n), F = a(), I = (e, t) => {
467
- e.stopPropagation(), N(e, t);
470
+ }), T = r.assignees.map(ye), E = xe(n, !0), D = (e) => (t) => s(t ? e : null), O = ve(o === "assignees", () => s(null)), k = ve(o === "labels", () => s(null)), A = "flex h-8 w-full items-center gap-2 rounded-md px-2 text-sm hover:bg-muted", j = V(), M = Ce(n), N = a(), F = (e, t) => {
471
+ e.stopPropagation(), j(e, t);
468
472
  };
469
- return /* @__PURE__ */ J("aside", {
473
+ return /* @__PURE__ */ q("aside", {
470
474
  className: "order-first grid shrink-0 grid-cols-2 gap-4 border-b border-border px-4 py-4 md:order-none md:block md:w-72 md:space-y-5 md:overflow-y-auto md:border-b-0 md:border-l md:py-6",
471
475
  "aria-label": d("title"),
472
- onContextMenu: (e) => N(e, P([r])),
476
+ onContextMenu: (e) => j(e, M([r])),
473
477
  children: [
474
- /* @__PURE__ */ q($, {
478
+ /* @__PURE__ */ K(Q, {
475
479
  label: p("status"),
476
480
  shortcut: "S",
477
- children: /* @__PURE__ */ q(B, {
481
+ children: /* @__PURE__ */ K(z, {
478
482
  "aria-label": p("status"),
479
483
  open: o === "status",
480
484
  onOpenChange: D("status"),
481
485
  items: g.map((e) => ({
482
486
  value: e.id,
483
487
  label: e.name,
484
- icon: /* @__PURE__ */ q(ee, { category: e.category })
488
+ icon: /* @__PURE__ */ K(ee, { category: e.category })
485
489
  })),
486
490
  value: r.status.id,
487
491
  onValueChange: (e) => e !== null && e !== r.status.id && c({ statusId: e }),
488
492
  placeholder: d("changeStatus"),
489
- trigger: /* @__PURE__ */ J("button", {
493
+ trigger: /* @__PURE__ */ q("button", {
490
494
  type: "button",
491
- className: M,
492
- children: [/* @__PURE__ */ q(ee, { category: r.status.category }), r.status.name]
495
+ className: A,
496
+ children: [/* @__PURE__ */ K(ee, { category: r.status.category }), r.status.name]
493
497
  })
494
498
  })
495
499
  }),
496
- /* @__PURE__ */ q($, {
500
+ /* @__PURE__ */ K(zt, {
501
+ workspace: n,
502
+ issue: r,
503
+ update: c,
504
+ row: A
505
+ }),
506
+ /* @__PURE__ */ K(Q, {
497
507
  label: p("priority"),
498
508
  shortcut: "P",
499
- children: /* @__PURE__ */ q(B, {
509
+ children: /* @__PURE__ */ K(z, {
500
510
  "aria-label": p("priority"),
501
511
  open: o === "priority",
502
512
  onOpenChange: D("priority"),
@@ -509,22 +519,22 @@ function Et({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c })
509
519
  ].map((e) => ({
510
520
  value: String(e),
511
521
  label: h[e] ?? "",
512
- icon: /* @__PURE__ */ q(O, { priority: e })
522
+ icon: /* @__PURE__ */ K(P, { priority: e })
513
523
  })),
514
524
  value: String(r.priority),
515
525
  onValueChange: (e) => e !== null && c({ priority: Number(e) }),
516
526
  placeholder: d("setPriority"),
517
- trigger: /* @__PURE__ */ J("button", {
527
+ trigger: /* @__PURE__ */ q("button", {
518
528
  type: "button",
519
- className: M,
520
- children: [/* @__PURE__ */ q(O, { priority: r.priority }), h[r.priority]]
529
+ className: A,
530
+ children: [/* @__PURE__ */ K(P, { priority: r.priority }), h[r.priority]]
521
531
  })
522
532
  })
523
533
  }),
524
- /* @__PURE__ */ q($, {
534
+ /* @__PURE__ */ K(Q, {
525
535
  label: d("assignees"),
526
536
  shortcut: "A",
527
- children: /* @__PURE__ */ q(B, {
537
+ children: /* @__PURE__ */ K(z, {
528
538
  "aria-label": d("assignees"),
529
539
  multiple: !0,
530
540
  open: o === "assignees",
@@ -534,21 +544,21 @@ function Et({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c })
534
544
  onValueChange: (e) => {
535
545
  let t = e.filter((e) => !T.includes(e)), n = T.filter((t) => !e.includes(t));
536
546
  c({
537
- ...t.length > 0 && { addAssignees: t.map(fe) },
538
- ...n.length > 0 && { removeAssignees: n.map(fe) }
539
- }), k();
547
+ ...t.length > 0 && { addAssignees: t.map(be) },
548
+ ...n.length > 0 && { removeAssignees: n.map(be) }
549
+ }), O();
540
550
  },
541
551
  placeholder: d("assignTo"),
542
- trigger: /* @__PURE__ */ J("button", {
552
+ trigger: /* @__PURE__ */ q("button", {
543
553
  type: "button",
544
- className: `${M} h-auto min-h-8 flex-wrap py-1`,
545
- children: [r.assignees.length === 0 && /* @__PURE__ */ q("span", {
554
+ className: `${A} h-auto min-h-8 flex-wrap py-1`,
555
+ children: [r.assignees.length === 0 && /* @__PURE__ */ K("span", {
546
556
  className: "text-muted-foreground",
547
557
  children: d("unassigned")
548
558
  }), r.assignees.map((e) => {
549
559
  let t = b(e.kind, e.handle);
550
- return /* @__PURE__ */ q("span", {
551
- onContextMenu: (r) => I(r, [{
560
+ return /* @__PURE__ */ K("span", {
561
+ onContextMenu: (r) => F(r, [{
552
562
  label: d("unassign", { name: t }),
553
563
  onClick: () => c({ removeAssignees: [{
554
564
  kind: e.kind,
@@ -556,7 +566,7 @@ function Et({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c })
556
566
  }] })
557
567
  }, {
558
568
  label: d("viewTheirIssues"),
559
- onClick: () => F({
569
+ onClick: () => N({
560
570
  to: "/$workspace/issues",
561
571
  params: { workspace: n },
562
572
  search: {
@@ -566,13 +576,13 @@ function Et({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c })
566
576
  })
567
577
  }]),
568
578
  className: "flex items-center gap-1.5",
569
- children: /* @__PURE__ */ J(Se, {
579
+ children: /* @__PURE__ */ q(ke, {
570
580
  workspace: n,
571
581
  kind: e.kind,
572
582
  handle: e.handle,
573
583
  className: "flex items-center gap-1.5",
574
- children: [/* @__PURE__ */ q($e, {
575
- ...De(e.kind),
584
+ children: [/* @__PURE__ */ K(st, {
585
+ ...Fe(e.kind),
576
586
  name: t,
577
587
  src: S(e.kind, e.handle),
578
588
  size: "xs",
@@ -584,10 +594,10 @@ function Et({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c })
584
594
  })
585
595
  })
586
596
  }),
587
- /* @__PURE__ */ q($, {
597
+ /* @__PURE__ */ K(Q, {
588
598
  label: p("labels"),
589
599
  shortcut: "L",
590
- children: /* @__PURE__ */ q(B, {
600
+ children: /* @__PURE__ */ K(z, {
591
601
  "aria-label": p("labels"),
592
602
  multiple: !0,
593
603
  open: o === "labels",
@@ -595,9 +605,9 @@ function Et({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c })
595
605
  items: _.map((e) => ({
596
606
  value: e.id,
597
607
  label: e.name,
598
- icon: /* @__PURE__ */ J("span", {
608
+ icon: /* @__PURE__ */ q("span", {
599
609
  className: "flex items-center gap-2",
600
- children: [/* @__PURE__ */ q(le, {}), /* @__PURE__ */ q("span", {
610
+ children: [/* @__PURE__ */ K(_e, {}), /* @__PURE__ */ K("span", {
601
611
  className: "size-2.5 rounded-full",
602
612
  style: { background: e.color }
603
613
  })]
@@ -605,7 +615,7 @@ function Et({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c })
605
615
  })),
606
616
  value: r.labels.map((e) => e.id),
607
617
  onValueChange: (e) => {
608
- A();
618
+ k();
609
619
  let t = r.labels.map((e) => e.id), n = e.filter((e) => !t.includes(e)), i = t.filter((t) => !e.includes(t));
610
620
  c({
611
621
  ...n.length > 0 && { addLabels: n },
@@ -614,19 +624,19 @@ function Et({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c })
614
624
  },
615
625
  onCreate: (e) => w.mutate(e),
616
626
  placeholder: d("addLabels"),
617
- trigger: /* @__PURE__ */ J("button", {
627
+ trigger: /* @__PURE__ */ q("button", {
618
628
  type: "button",
619
- className: `${M} h-auto min-h-8 flex-wrap py-1`,
620
- children: [r.labels.length === 0 && /* @__PURE__ */ q("span", {
629
+ className: `${A} h-auto min-h-8 flex-wrap py-1`,
630
+ children: [r.labels.length === 0 && /* @__PURE__ */ K("span", {
621
631
  className: "text-muted-foreground",
622
632
  children: d("noLabels")
623
- }), r.labels.map((e) => /* @__PURE__ */ J("span", {
624
- onContextMenu: (t) => I(t, [{
633
+ }), r.labels.map((e) => /* @__PURE__ */ q("span", {
634
+ onContextMenu: (t) => F(t, [{
625
635
  label: d("removeLabel", { name: e.name }),
626
636
  onClick: () => c({ removeLabels: [e.id] })
627
637
  }, {
628
638
  label: d("viewLabelIssues"),
629
- onClick: () => F({
639
+ onClick: () => N({
630
640
  to: "/$workspace/issues",
631
641
  params: { workspace: n },
632
642
  search: { label: e.name }
@@ -634,10 +644,10 @@ function Et({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c })
634
644
  }]),
635
645
  title: e.name,
636
646
  className: "inline-flex max-w-full min-w-0 items-center gap-1 rounded-full border border-border px-2 py-0.5 text-xs",
637
- children: [/* @__PURE__ */ q("span", {
647
+ children: [/* @__PURE__ */ K("span", {
638
648
  className: "size-2 shrink-0 rounded-full",
639
649
  style: { background: e.color }
640
- }), /* @__PURE__ */ q("span", {
650
+ }), /* @__PURE__ */ K("span", {
641
651
  className: "truncate",
642
652
  children: e.name
643
653
  })]
@@ -645,57 +655,65 @@ function Et({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c })
645
655
  })
646
656
  })
647
657
  }),
648
- /* @__PURE__ */ q($, {
658
+ /* @__PURE__ */ K(Q, {
649
659
  label: l("parent"),
650
- children: /* @__PURE__ */ q(qe, {
660
+ children: /* @__PURE__ */ K(tt, {
651
661
  workspace: n,
652
662
  issue: r,
653
- row: M
663
+ row: A
654
664
  })
655
665
  }),
656
- /* @__PURE__ */ q(kt, {
666
+ /* @__PURE__ */ K(Rt, {
657
667
  workspace: n,
658
668
  issue: r,
659
669
  team: i,
660
670
  update: c,
661
- row: M
671
+ row: A
662
672
  }),
663
- /* @__PURE__ */ q($, {
673
+ /* @__PURE__ */ K(Q, {
664
674
  label: d("created"),
665
- children: /* @__PURE__ */ J("p", {
675
+ children: /* @__PURE__ */ q("p", {
666
676
  className: "flex items-center gap-2 px-2 text-sm",
667
- children: [/* @__PURE__ */ q(Se, {
677
+ children: [/* @__PURE__ */ K(ke, {
668
678
  workspace: n,
669
679
  kind: r.creator.kind,
670
680
  handle: r.creator.handle,
671
- children: /* @__PURE__ */ q($e, {
672
- ...De(r.creator.kind),
681
+ children: /* @__PURE__ */ K(st, {
682
+ ...Fe(r.creator.kind),
673
683
  name: x(r.creator),
674
684
  src: S(r.creator.kind, r.creator.handle),
675
685
  size: "xs",
676
686
  tooltip: r.creator.kind !== "user"
677
687
  })
678
- }), /* @__PURE__ */ q(st, {
688
+ }), /* @__PURE__ */ K(ht, {
679
689
  value: r.createdAt,
680
690
  exact: "medium"
681
691
  })]
682
692
  })
683
693
  }),
684
- /* @__PURE__ */ q($, {
694
+ /* @__PURE__ */ K(Q, {
685
695
  label: d("timeInStatus"),
686
- children: /* @__PURE__ */ q(Xe, {
696
+ children: /* @__PURE__ */ K(it, {
687
697
  workspace: n,
688
698
  identifier: r.identifier
689
699
  })
690
700
  }),
691
- y.length > 0 && /* @__PURE__ */ q($, {
701
+ /* @__PURE__ */ K(Pe, {
702
+ workspace: n,
703
+ issue: r,
704
+ label: (e, t, n) => /* @__PURE__ */ K(Q, {
705
+ label: e,
706
+ children: t
707
+ }, n)
708
+ }),
709
+ y.length > 0 && /* @__PURE__ */ K(Q, {
692
710
  label: d("syncedWith"),
693
- children: /* @__PURE__ */ q(Ue, { links: y })
711
+ children: /* @__PURE__ */ K(Ze, { links: y })
694
712
  })
695
713
  ]
696
714
  });
697
715
  }
698
- var Dt = [
716
+ var It = [
699
717
  "#d73a4a",
700
718
  "#2f8a57",
701
719
  "#8250df",
@@ -704,63 +722,63 @@ var Dt = [
704
722
  "#57606a",
705
723
  "#1a7f37"
706
724
  ];
707
- function Ot({ workspace: e, origin: t, className: n }) {
725
+ function Lt({ workspace: e, origin: t, className: n }) {
708
726
  let r = "size-3.5 shrink-0 text-muted-foreground", a = t.title.replace(/[*_`#>[\]]/g, "").replace(/\s+/g, " ").trim();
709
727
  switch (t.kind) {
710
- case "decision": return /* @__PURE__ */ J(i, {
728
+ case "decision": return /* @__PURE__ */ q(i, {
711
729
  to: "/$workspace/issues/$identifier",
712
730
  params: {
713
731
  workspace: e,
714
732
  identifier: t.key
715
733
  },
716
734
  className: n,
717
- children: [/* @__PURE__ */ q(D, { className: r }), /* @__PURE__ */ q(lt, {
735
+ children: [/* @__PURE__ */ K(N, { className: r }), /* @__PURE__ */ K(_t, {
718
736
  content: a,
719
737
  overflowOnly: !0,
720
- children: /* @__PURE__ */ q("span", {
738
+ children: /* @__PURE__ */ K("span", {
721
739
  className: "truncate",
722
740
  children: a
723
741
  })
724
742
  })]
725
743
  });
726
- case "area": return /* @__PURE__ */ J(i, {
744
+ case "area": return /* @__PURE__ */ q(i, {
727
745
  to: "/$workspace/areas/$area",
728
746
  params: {
729
747
  workspace: e,
730
748
  area: t.key
731
749
  },
732
750
  className: n,
733
- children: [/* @__PURE__ */ q(b, { className: r }), /* @__PURE__ */ q("span", {
751
+ children: [/* @__PURE__ */ K(E, { className: r }), /* @__PURE__ */ K("span", {
734
752
  className: "truncate",
735
753
  children: a
736
754
  })]
737
755
  });
738
- default: return /* @__PURE__ */ J(i, {
756
+ default: return /* @__PURE__ */ q(i, {
739
757
  to: "/$workspace/docs/$doc",
740
758
  params: {
741
759
  workspace: e,
742
760
  doc: t.key
743
761
  },
744
762
  className: n,
745
- children: [/* @__PURE__ */ q(E, { className: r }), /* @__PURE__ */ q("span", {
763
+ children: [/* @__PURE__ */ K(M, { className: r }), /* @__PURE__ */ K("span", {
746
764
  className: "truncate",
747
765
  children: a
748
766
  })]
749
767
  });
750
768
  }
751
769
  }
752
- function kt({ workspace: e, issue: t, team: n, update: r, row: i }) {
753
- let a = G("planning"), s = G("flow"), c = ne(), u = oe(), { data: d = [] } = X(g(e)), f = d.find((e) => e.id === t.project?.id), { data: p = [] } = X({
770
+ function Rt({ workspace: e, issue: t, team: n, update: r, row: i }) {
771
+ let a = W("planning"), s = W("flow"), c = le(), u = me(), { data: d = [] } = Y(g(e)), f = d.find((e) => e.id === t.project?.id), { data: p = [] } = Y({
754
772
  ...l(e, n?.key ?? ""),
755
773
  enabled: !!n?.cyclesEnabled
756
774
  }), m = n?.estimateScale ?? "none", h = t.status.category === "completed" || t.status.category === "canceled", _ = (e) => e.name ? a("cycleNamed", {
757
775
  number: e.number,
758
776
  name: e.name
759
- }) : a("cycle", { number: e.number }), v = p.filter((e) => e.state !== "past" || e.id === t.cycle?.id), { data: y = [] } = X(o(e)), x = y.filter((e) => !e.teamId || e.teamId === t.teamId);
760
- return /* @__PURE__ */ J(K, { children: [
761
- n && n.flow.length > 0 && /* @__PURE__ */ q($, {
777
+ }) : a("cycle", { number: e.number }), v = p.filter((e) => e.state !== "past" || e.id === t.cycle?.id), { data: y = [] } = Y(o(e)), b = y.filter((e) => !e.teamId || e.teamId === t.teamId);
778
+ return /* @__PURE__ */ q(G, { children: [
779
+ n && n.flow.length > 0 && /* @__PURE__ */ K(Q, {
762
780
  label: s("stage"),
763
- children: /* @__PURE__ */ q(V, {
781
+ children: /* @__PURE__ */ K(B, {
764
782
  "aria-label": s("stage"),
765
783
  value: t.stage ?? "",
766
784
  onValueChange: (e) => r({ stage: e ?? "" }),
@@ -771,57 +789,57 @@ function kt({ workspace: e, issue: t, team: n, update: r, row: i }) {
771
789
  value: e.stage,
772
790
  label: s(`stages.${e.stage}`)
773
791
  }))],
774
- trigger: /* @__PURE__ */ J("button", {
792
+ trigger: /* @__PURE__ */ q("button", {
775
793
  type: "button",
776
794
  className: i,
777
- children: [/* @__PURE__ */ q(w, { className: "size-3.5 shrink-0 text-muted-foreground" }), t.stage ? /* @__PURE__ */ q("span", {
795
+ children: [/* @__PURE__ */ K(A, { className: "size-3.5 shrink-0 text-muted-foreground" }), t.stage ? /* @__PURE__ */ K("span", {
778
796
  className: "truncate",
779
797
  children: s(`stages.${t.stage}`)
780
- }) : /* @__PURE__ */ q("span", {
798
+ }) : /* @__PURE__ */ K("span", {
781
799
  className: "text-muted-foreground",
782
800
  children: s("notInFlow")
783
801
  })]
784
802
  })
785
803
  })
786
804
  }),
787
- /* @__PURE__ */ q($, {
805
+ /* @__PURE__ */ K(Q, {
788
806
  label: a("area"),
789
- children: /* @__PURE__ */ q(V, {
807
+ children: /* @__PURE__ */ K(B, {
790
808
  "aria-label": a("area"),
791
809
  value: t.area?.key ?? "",
792
810
  onValueChange: (e) => r({ area: e ?? "" }),
793
811
  items: [{
794
812
  value: "",
795
813
  label: a("noArea")
796
- }, ...x.map((e) => ({
814
+ }, ...b.map((e) => ({
797
815
  value: e.key,
798
816
  label: e.title,
799
817
  ...e.status === "proposed" && { description: a("proposedArea") }
800
818
  }))],
801
- trigger: /* @__PURE__ */ J("button", {
819
+ trigger: /* @__PURE__ */ q("button", {
802
820
  type: "button",
803
821
  className: i,
804
- children: [/* @__PURE__ */ q(b, { className: "size-3.5 shrink-0 text-muted-foreground" }), t.area ? /* @__PURE__ */ q("span", {
822
+ children: [/* @__PURE__ */ K(E, { className: "size-3.5 shrink-0 text-muted-foreground" }), t.area ? /* @__PURE__ */ K("span", {
805
823
  className: "truncate",
806
824
  children: t.area.title
807
- }) : /* @__PURE__ */ q("span", {
825
+ }) : /* @__PURE__ */ K("span", {
808
826
  className: "text-muted-foreground",
809
827
  children: a("noArea")
810
828
  })]
811
829
  })
812
830
  })
813
831
  }),
814
- t.origin && /* @__PURE__ */ q($, {
832
+ t.origin && /* @__PURE__ */ K(Q, {
815
833
  label: a("startedFrom"),
816
- children: /* @__PURE__ */ q(Ot, {
834
+ children: /* @__PURE__ */ K(Lt, {
817
835
  workspace: e,
818
836
  origin: t.origin,
819
837
  className: i
820
838
  })
821
839
  }),
822
- /* @__PURE__ */ q($, {
840
+ /* @__PURE__ */ K(Q, {
823
841
  label: a("project"),
824
- children: /* @__PURE__ */ q(V, {
842
+ children: /* @__PURE__ */ K(B, {
825
843
  "aria-label": a("project"),
826
844
  value: t.project?.id ?? "",
827
845
  onValueChange: (e) => r({ projectId: e ?? "" }),
@@ -831,24 +849,24 @@ function kt({ workspace: e, issue: t, team: n, update: r, row: i }) {
831
849
  }, ...d.map((e) => ({
832
850
  value: e.id,
833
851
  label: e.name,
834
- icon: /* @__PURE__ */ q(re, { status: e.status })
852
+ icon: /* @__PURE__ */ K(de, { status: e.status })
835
853
  }))],
836
- trigger: /* @__PURE__ */ J("button", {
854
+ trigger: /* @__PURE__ */ q("button", {
837
855
  type: "button",
838
856
  className: i,
839
- children: [/* @__PURE__ */ q(k, { className: "size-3.5 shrink-0 text-muted-foreground" }), t.project ? /* @__PURE__ */ q("span", {
857
+ children: [/* @__PURE__ */ K(F, { className: "size-3.5 shrink-0 text-muted-foreground" }), t.project ? /* @__PURE__ */ K("span", {
840
858
  className: "truncate",
841
859
  children: t.project.name
842
- }) : /* @__PURE__ */ q("span", {
860
+ }) : /* @__PURE__ */ K("span", {
843
861
  className: "text-muted-foreground",
844
862
  children: a("noProject")
845
863
  })]
846
864
  })
847
865
  })
848
866
  }),
849
- t.project && /* @__PURE__ */ q($, {
867
+ t.project && /* @__PURE__ */ K(Q, {
850
868
  label: a("milestone"),
851
- children: /* @__PURE__ */ q(V, {
869
+ children: /* @__PURE__ */ K(B, {
852
870
  "aria-label": a("milestone"),
853
871
  value: t.milestone?.id ?? "",
854
872
  onValueChange: (e) => r({ milestoneId: e ?? "" }),
@@ -860,22 +878,22 @@ function kt({ workspace: e, issue: t, team: n, update: r, row: i }) {
860
878
  label: e.name,
861
879
  ...e.targetDate && { description: c.day(e.targetDate) }
862
880
  }))],
863
- trigger: /* @__PURE__ */ q("button", {
881
+ trigger: /* @__PURE__ */ K("button", {
864
882
  type: "button",
865
883
  className: i,
866
- children: t.milestone ? /* @__PURE__ */ q("span", {
884
+ children: t.milestone ? /* @__PURE__ */ K("span", {
867
885
  className: "truncate",
868
886
  children: t.milestone.name
869
- }) : /* @__PURE__ */ q("span", {
887
+ }) : /* @__PURE__ */ K("span", {
870
888
  className: "text-muted-foreground",
871
889
  children: a("noMilestone")
872
890
  })
873
891
  })
874
892
  })
875
893
  }),
876
- n?.cyclesEnabled && /* @__PURE__ */ q($, {
894
+ n?.cyclesEnabled && /* @__PURE__ */ K(Q, {
877
895
  label: a("cycleLabel"),
878
- children: /* @__PURE__ */ q(V, {
896
+ children: /* @__PURE__ */ K(B, {
879
897
  "aria-label": a("cycleLabel"),
880
898
  value: t.cycle?.id ?? "",
881
899
  onValueChange: (e) => r({ cycleId: e ?? "" }),
@@ -890,75 +908,75 @@ function kt({ workspace: e, issue: t, team: n, update: r, row: i }) {
890
908
  dates: c.dayRange(e.startsOn, e.endsOn)
891
909
  })
892
910
  }))],
893
- trigger: /* @__PURE__ */ J("button", {
911
+ trigger: /* @__PURE__ */ q("button", {
894
912
  type: "button",
895
913
  className: i,
896
- children: [/* @__PURE__ */ q(w, { className: "size-3.5 shrink-0 text-muted-foreground" }), t.cycle ? /* @__PURE__ */ q("span", {
914
+ children: [/* @__PURE__ */ K(A, { className: "size-3.5 shrink-0 text-muted-foreground" }), t.cycle ? /* @__PURE__ */ K("span", {
897
915
  className: "truncate",
898
916
  children: _(t.cycle)
899
- }) : /* @__PURE__ */ q("span", {
917
+ }) : /* @__PURE__ */ K("span", {
900
918
  className: "text-muted-foreground",
901
919
  children: a("noCycle")
902
920
  })]
903
921
  })
904
922
  })
905
923
  }),
906
- (m !== "none" || !!t.estimate) && /* @__PURE__ */ q($, {
924
+ (m !== "none" || !!t.estimate) && /* @__PURE__ */ K(Q, {
907
925
  label: a("estimate"),
908
- children: /* @__PURE__ */ q(V, {
926
+ children: /* @__PURE__ */ K(B, {
909
927
  "aria-label": a("estimate"),
910
928
  value: t.estimate ?? 0,
911
929
  onValueChange: (e) => r({ estimate: e ?? 0 }),
912
930
  items: [{
913
931
  value: 0,
914
932
  label: a("noEstimate")
915
- }, ...ae(m).map((e) => ({
933
+ }, ...pe(m).map((e) => ({
916
934
  value: e,
917
935
  label: u(e, m)
918
936
  }))],
919
- trigger: /* @__PURE__ */ J("button", {
937
+ trigger: /* @__PURE__ */ q("button", {
920
938
  type: "button",
921
939
  className: i,
922
- children: [/* @__PURE__ */ q(T, { className: "size-3.5 shrink-0 text-muted-foreground" }), t.estimate ? u(t.estimate, m) : /* @__PURE__ */ q("span", {
940
+ children: [/* @__PURE__ */ K(j, { className: "size-3.5 shrink-0 text-muted-foreground" }), t.estimate ? u(t.estimate, m) : /* @__PURE__ */ K("span", {
923
941
  className: "text-muted-foreground",
924
942
  children: a("noEstimate")
925
943
  })]
926
944
  })
927
945
  })
928
946
  }),
929
- /* @__PURE__ */ q($, {
947
+ /* @__PURE__ */ K(Q, {
930
948
  label: a("dueDate"),
931
- children: /* @__PURE__ */ J("div", {
949
+ children: /* @__PURE__ */ q("div", {
932
950
  className: "flex items-center",
933
- children: [/* @__PURE__ */ q(rt, {
951
+ children: [/* @__PURE__ */ K(dt, {
934
952
  value: t.dueDate ?? "",
935
953
  onValueChange: (e) => r({ dueDate: e }),
936
954
  "aria-label": a("dueDate"),
937
955
  required: !0,
938
- trigger: /* @__PURE__ */ q("button", {
956
+ trigger: /* @__PURE__ */ K("button", {
939
957
  type: "button",
940
958
  className: i,
941
- children: t.dueDate ? /* @__PURE__ */ q(L, {
959
+ children: t.dueDate ? /* @__PURE__ */ K(ue, {
942
960
  date: t.dueDate,
943
961
  closed: h
944
- }) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(S, { className: "size-3.5 shrink-0 text-muted-foreground" }), /* @__PURE__ */ q("span", {
962
+ }) : /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(O, { className: "size-3.5 shrink-0 text-muted-foreground" }), /* @__PURE__ */ K("span", {
945
963
  className: "text-muted-foreground",
946
964
  children: a("noDueDate")
947
965
  })] })
948
966
  })
949
- }), t.dueDate && /* @__PURE__ */ q(at, {
967
+ }), t.dueDate && /* @__PURE__ */ K(pt, {
950
968
  variant: "ghost",
951
- icon: /* @__PURE__ */ q(C, { className: "size-3.5" }),
969
+ icon: /* @__PURE__ */ K(k, { className: "size-3.5" }),
952
970
  label: a("clearDueDate"),
953
971
  onClick: () => r({ dueDate: "" })
954
972
  })]
955
973
  })
956
974
  }),
957
- t.slaDueAt && !h && /* @__PURE__ */ q($, {
975
+ t.slaDueAt && !h && /* @__PURE__ */ K(Q, {
958
976
  label: a("sla.label"),
959
- children: /* @__PURE__ */ q("span", {
977
+ children: /* @__PURE__ */ K("span", {
960
978
  className: "flex h-7 items-center px-2",
961
- children: /* @__PURE__ */ q(ie, {
979
+ children: /* @__PURE__ */ K(fe, {
962
980
  issue: t,
963
981
  team: n
964
982
  })
@@ -966,18 +984,63 @@ function kt({ workspace: e, issue: t, team: n, update: r, row: i }) {
966
984
  })
967
985
  ] });
968
986
  }
969
- function $({ label: e, shortcut: t, children: n }) {
970
- return /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J("p", {
987
+ function zt({ workspace: e, issue: t, update: n, row: r }) {
988
+ let i = W("issueTypes"), a = Dt(), { data: o } = Y(C(e)), { data: s } = Y(x(e)), { confirm: c, dialog: l } = b(), [u, d] = U(!1), f = T(o, t.teamId);
989
+ if (f.length === 0 && !t.type) return null;
990
+ let p = (e) => {
991
+ let r = f.find((t) => t.id === e), o = (s ?? []).filter((e) => S(t.fields[e.id]) && !w(r, e.id));
992
+ if (!r || o.length === 0) return n({ typeId: e });
993
+ c({
994
+ title: i("hiddenTitle"),
995
+ description: i("hidden", {
996
+ type: r.name,
997
+ fields: a.list(o.map((e) => e.name))
998
+ }),
999
+ confirmLabel: i("change"),
1000
+ destructive: !1,
1001
+ onConfirm: async () => n({ typeId: e })
1002
+ });
1003
+ };
1004
+ return /* @__PURE__ */ q(Q, {
1005
+ label: i("type"),
1006
+ children: [/* @__PURE__ */ K(z, {
1007
+ "aria-label": i("type"),
1008
+ open: u,
1009
+ onOpenChange: d,
1010
+ items: [{
1011
+ value: "",
1012
+ label: i("noType")
1013
+ }, ...f.map((e) => ({
1014
+ value: e.id,
1015
+ label: e.name,
1016
+ icon: /* @__PURE__ */ K(ne, { type: e })
1017
+ }))],
1018
+ value: t.type?.id ?? "",
1019
+ onValueChange: (e) => e !== null && e !== (t.type?.id ?? "") && p(e),
1020
+ placeholder: i("type"),
1021
+ trigger: /* @__PURE__ */ K("button", {
1022
+ type: "button",
1023
+ className: r,
1024
+ children: t.type ? /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(ne, { type: t.type }), t.type.name] }) : /* @__PURE__ */ K("span", {
1025
+ className: "text-muted-foreground",
1026
+ children: i("noType")
1027
+ })
1028
+ })
1029
+ }), l]
1030
+ });
1031
+ }
1032
+ function Q({ label: e, shortcut: t, children: n }) {
1033
+ return /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ q("p", {
971
1034
  className: "mb-1 flex items-center justify-between px-2 text-xs text-muted-foreground",
972
- children: [e, t && /* @__PURE__ */ q(ot, {
1035
+ children: [e, t && /* @__PURE__ */ K(mt, {
973
1036
  keys: t,
974
1037
  size: "xs",
975
1038
  className: "hidden md:inline-flex"
976
1039
  })]
977
1040
  }), n] });
978
1041
  }
979
- function At({ workspace: e, identifier: t }) {
980
- let n = G("issue.activity"), { data: r } = Q(u(e, t)), [i, a] = W(!1), o = _t(() => {
1042
+ function Bt({ workspace: e, identifier: t }) {
1043
+ let n = W("issue.activity"), { data: r } = Z(u(e, t)), [i, a] = U(!1), o = Tt(() => {
981
1044
  let e = [];
982
1045
  for (let t of r) {
983
1046
  if (t.type.startsWith("comment.") || t.type.startsWith("issue.reaction_")) continue;
@@ -986,23 +1049,23 @@ function At({ workspace: e, identifier: t }) {
986
1049
  }
987
1050
  return e;
988
1051
  }, [r]), s = i ? 0 : Math.max(0, o.length - 5);
989
- return /* @__PURE__ */ J("section", {
1052
+ return /* @__PURE__ */ q("section", {
990
1053
  className: "mt-10",
991
1054
  "aria-label": n("title"),
992
1055
  children: [
993
- /* @__PURE__ */ q("h2", {
1056
+ /* @__PURE__ */ K("h2", {
994
1057
  className: "text-base font-semibold",
995
1058
  children: n("title")
996
1059
  }),
997
- s > 0 && /* @__PURE__ */ q("button", {
1060
+ s > 0 && /* @__PURE__ */ K("button", {
998
1061
  type: "button",
999
1062
  onClick: () => a(!0),
1000
1063
  className: "mt-3 text-xs text-muted-foreground hover:text-foreground",
1001
1064
  children: n("showEarlier", { count: s })
1002
1065
  }),
1003
- /* @__PURE__ */ q(Be, {
1066
+ /* @__PURE__ */ K(Je, {
1004
1067
  className: "mt-3",
1005
- children: o.slice(s).map((t) => /* @__PURE__ */ q(Ke, {
1068
+ children: o.slice(s).map((t) => /* @__PURE__ */ K(et, {
1006
1069
  workspace: e,
1007
1070
  event: t
1008
1071
  }, t.id))
@@ -1010,57 +1073,57 @@ function At({ workspace: e, identifier: t }) {
1010
1073
  ]
1011
1074
  });
1012
1075
  }
1013
- function jt({ workspace: e, identifier: t, others: n }) {
1014
- let r = G("issue.comments"), { data: i } = Q(c(e, t)), { data: a = [] } = X(f(e, t)), o = _t(() => {
1076
+ function Vt({ workspace: e, identifier: t, others: n }) {
1077
+ let r = W("issue.comments"), { data: i } = Z(c(e, t)), { data: a = [] } = Y(f(e, t)), o = Tt(() => {
1015
1078
  let e = i.filter((e) => !e.parentId);
1016
- return e.sort((e, t) => Number(Mt(t)) - Number(Mt(e))), e.map((e) => ({
1079
+ return e.sort((e, t) => Number(Ht(t)) - Number(Ht(e))), e.map((e) => ({
1017
1080
  root: e,
1018
1081
  replies: i.filter((t) => t.parentId === e.id)
1019
1082
  }));
1020
- }, [i]), [s, l] = W(null), u = i.filter((e) => !e.deletedAt && !Mt(e)).length;
1021
- return /* @__PURE__ */ J("section", {
1083
+ }, [i]), [s, l] = U(null), u = i.filter((e) => !e.deletedAt && !Ht(e)).length;
1084
+ return /* @__PURE__ */ q("section", {
1022
1085
  className: "mt-12 border-t border-border pt-6",
1023
1086
  "aria-label": r("title"),
1024
1087
  children: [
1025
- /* @__PURE__ */ J("h2", {
1088
+ /* @__PURE__ */ q("h2", {
1026
1089
  className: "text-base font-semibold",
1027
1090
  children: [
1028
1091
  r("title"),
1029
1092
  " ",
1030
- u > 0 && /* @__PURE__ */ q("span", {
1093
+ u > 0 && /* @__PURE__ */ K("span", {
1031
1094
  className: "font-normal text-muted-foreground",
1032
1095
  children: u
1033
1096
  })
1034
1097
  ]
1035
1098
  }),
1036
- /* @__PURE__ */ q("div", {
1099
+ /* @__PURE__ */ K("div", {
1037
1100
  className: "mt-4 space-y-3",
1038
1101
  children: o.map(({ root: n, replies: i }) => {
1039
- let o = Mt(n) ? n.sharedWith : void 0, c = o ? se(o).source : void 0;
1040
- return /* @__PURE__ */ J(tt, {
1102
+ let o = Ht(n) ? n.sharedWith : void 0, c = o ? he(o).source : void 0;
1103
+ return /* @__PURE__ */ q(lt, {
1041
1104
  size: "fill",
1042
1105
  padding: "none",
1043
1106
  highlight: !!o,
1044
- render: /* @__PURE__ */ q("article", {
1107
+ render: /* @__PURE__ */ K("article", {
1045
1108
  id: `comment-${n.id}`,
1046
1109
  "aria-label": c && r("sharedThreadLabel", { source: c })
1047
1110
  }),
1048
1111
  children: [
1049
- o && c ? /* @__PURE__ */ q(We, {
1112
+ o && c ? /* @__PURE__ */ K(Qe, {
1050
1113
  source: c,
1051
1114
  link: a.find((e) => e.connector === o)
1052
- }) : /* @__PURE__ */ q(Pt, {
1115
+ }) : /* @__PURE__ */ K(Wt, {
1053
1116
  workspace: e,
1054
1117
  identifier: t,
1055
1118
  comment: n,
1056
1119
  onReply: () => l(n.id)
1057
1120
  }),
1058
- i.length > 0 && /* @__PURE__ */ q("ol", {
1121
+ i.length > 0 && /* @__PURE__ */ K("ol", {
1059
1122
  className: o ? "" : "border-t border-border/70",
1060
- children: i.map((r) => /* @__PURE__ */ q("li", {
1123
+ children: i.map((r) => /* @__PURE__ */ K("li", {
1061
1124
  id: `comment-${r.id}`,
1062
1125
  className: "border-b border-border/50 last:border-b-0",
1063
- children: /* @__PURE__ */ q(Pt, {
1126
+ children: /* @__PURE__ */ K(Wt, {
1064
1127
  workspace: e,
1065
1128
  identifier: t,
1066
1129
  comment: r,
@@ -1068,16 +1131,16 @@ function jt({ workspace: e, identifier: t, others: n }) {
1068
1131
  })
1069
1132
  }, r.id))
1070
1133
  }),
1071
- /* @__PURE__ */ q("div", {
1134
+ /* @__PURE__ */ K("div", {
1072
1135
  className: "border-t border-border/70 px-3 py-2",
1073
- children: s === n.id ? /* @__PURE__ */ q(It, {
1136
+ children: s === n.id ? /* @__PURE__ */ K(Kt, {
1074
1137
  workspace: e,
1075
1138
  identifier: t,
1076
1139
  parentId: n.id,
1077
1140
  publicOn: c,
1078
1141
  autofocus: !0,
1079
1142
  onDone: () => l(null)
1080
- }) : /* @__PURE__ */ q("button", {
1143
+ }) : /* @__PURE__ */ K("button", {
1081
1144
  type: "button",
1082
1145
  onClick: () => l(n.id),
1083
1146
  className: "w-full text-left text-xs text-muted-foreground hover:text-foreground",
@@ -1088,19 +1151,19 @@ function jt({ workspace: e, identifier: t, others: n }) {
1088
1151
  }, n.id);
1089
1152
  })
1090
1153
  }),
1091
- /* @__PURE__ */ q(tt, {
1154
+ /* @__PURE__ */ K(lt, {
1092
1155
  size: "fill",
1093
1156
  padding: "sm",
1094
1157
  focusWithin: !0,
1095
1158
  className: "mt-4",
1096
- children: /* @__PURE__ */ q(It, {
1159
+ children: /* @__PURE__ */ K(Kt, {
1097
1160
  workspace: e,
1098
1161
  identifier: t
1099
1162
  })
1100
1163
  }),
1101
- /* @__PURE__ */ q("div", {
1164
+ /* @__PURE__ */ K("div", {
1102
1165
  className: "mt-2",
1103
- children: /* @__PURE__ */ q(Re, {
1166
+ children: /* @__PURE__ */ K(Ke, {
1104
1167
  workspace: e,
1105
1168
  others: n,
1106
1169
  field: "comment"
@@ -1109,20 +1172,20 @@ function jt({ workspace: e, identifier: t, others: n }) {
1109
1172
  ]
1110
1173
  });
1111
1174
  }
1112
- var Mt = (e) => !!e.sharedWith && !e.parentId;
1113
- function Nt({ comment: e }) {
1114
- let t = G("issue.comments");
1115
- return e.author.kind === "connector" ? /* @__PURE__ */ q("span", {
1175
+ var Ht = (e) => !!e.sharedWith && !e.parentId;
1176
+ function Ut({ comment: e }) {
1177
+ let t = W("issue.comments");
1178
+ return e.author.kind === "connector" ? /* @__PURE__ */ K("span", {
1116
1179
  className: "rounded border border-border px-1.5 py-px text-[10px] text-muted-foreground",
1117
- children: t("via", { source: se(e.author.handle).source })
1180
+ children: t("via", { source: he(e.author.handle).source })
1118
1181
  }) : null;
1119
1182
  }
1120
- function Pt({ workspace: n, identifier: r, comment: i, onReply: a }) {
1121
- let o = G("issue.comments"), s = G("common"), { actorName: c, avatarOf: l } = ce(n), { data: u } = Q(h), { data: d = [] } = X(_(n, r)), f = ve(n, "comment", { team: r.slice(0, r.lastIndexOf("-")) }), p = Z(), m = H(), [g, v] = W(!1), [y, b] = W(i.body), [x, S] = W(!1), C = U(null), w = Ee(n, r), T = i.author.kind === "user" && i.author.handle === u?.user.username, E = { path: {
1183
+ function Wt({ workspace: n, identifier: r, comment: i, onReply: a }) {
1184
+ let o = W("issue.comments"), s = W("common"), { actorName: c, avatarOf: l } = ge(n), { data: u } = Z(h), { data: d = [] } = Y(_(n, r)), f = Ee(n, "comment", { team: r.slice(0, r.lastIndexOf("-")) }), p = X(), m = V(), [g, v] = U(!1), [y, b] = U(i.body), [x, S] = U(!1), C = H(null), w = Ne(n, r), T = i.author.kind === "user" && i.author.handle === u?.user.username, E = { path: {
1122
1185
  workspace: n,
1123
1186
  identifier: r,
1124
1187
  commentId: i.id
1125
- } }, D = () => I(p, n, r), O = Y({
1188
+ } }, D = () => se(p, n, r), O = J({
1126
1189
  mutationFn: async () => t(await e.PATCH("/api/v1/workspaces/{workspace}/issues/{identifier}/comments/{commentId}", {
1127
1190
  params: E,
1128
1191
  body: { body: y }
@@ -1130,23 +1193,23 @@ function Pt({ workspace: n, identifier: r, comment: i, onReply: a }) {
1130
1193
  onSuccess: () => {
1131
1194
  v(!1), D();
1132
1195
  }
1133
- }), k = Y({
1196
+ }), k = J({
1134
1197
  mutationFn: async () => t(await e.DELETE("/api/v1/workspaces/{workspace}/issues/{identifier}/comments/{commentId}", { params: E })),
1135
1198
  onSuccess: D
1136
1199
  });
1137
- if (i.deletedAt) return /* @__PURE__ */ q("p", {
1200
+ if (i.deletedAt) return /* @__PURE__ */ K("p", {
1138
1201
  className: "px-3 py-2.5 text-xs text-muted-foreground italic",
1139
1202
  children: o("deleted")
1140
1203
  });
1141
- let ee = `${me(n, r)}#comment-${i.id}`, A = [
1204
+ let A = `${Se(n, r)}#comment-${i.id}`, j = [
1142
1205
  {
1143
1206
  label: o("reply"),
1144
1207
  onClick: a
1145
1208
  },
1146
- N(s("copyLink"), ee),
1147
- N(o("copyText"), i.body),
1209
+ ie(s("copyLink"), A),
1210
+ ie(o("copyText"), i.body),
1148
1211
  ...T ? [
1149
- dt,
1212
+ yt,
1150
1213
  {
1151
1214
  label: o("edit"),
1152
1215
  onClick: () => {
@@ -1160,51 +1223,51 @@ function Pt({ workspace: n, identifier: r, comment: i, onReply: a }) {
1160
1223
  }
1161
1224
  ] : []
1162
1225
  ];
1163
- return /* @__PURE__ */ J("div", {
1226
+ return /* @__PURE__ */ q("div", {
1164
1227
  className: "group px-3 py-2.5",
1165
- onContextMenu: (e) => !g && m(e, A),
1166
- children: [/* @__PURE__ */ J("div", {
1228
+ onContextMenu: (e) => !g && m(e, j),
1229
+ children: [/* @__PURE__ */ q("div", {
1167
1230
  className: "flex items-center gap-2 text-xs",
1168
1231
  children: [
1169
- /* @__PURE__ */ J(Se, {
1232
+ /* @__PURE__ */ q(ke, {
1170
1233
  workspace: n,
1171
1234
  kind: i.author.kind,
1172
1235
  handle: i.author.handle,
1173
1236
  className: "flex items-center gap-2",
1174
- children: [/* @__PURE__ */ q($e, {
1175
- ...De(i.author.kind),
1237
+ children: [/* @__PURE__ */ K(st, {
1238
+ ...Fe(i.author.kind),
1176
1239
  name: c(i.author),
1177
1240
  src: l(i.author.kind, i.author.handle),
1178
1241
  size: "xs",
1179
1242
  decorative: !0
1180
- }), /* @__PURE__ */ q("span", {
1243
+ }), /* @__PURE__ */ K("span", {
1181
1244
  className: "font-medium",
1182
1245
  children: c(i.author)
1183
1246
  })]
1184
1247
  }),
1185
- /* @__PURE__ */ q(Nt, { comment: i }),
1186
- /* @__PURE__ */ J("span", {
1248
+ /* @__PURE__ */ K(Ut, { comment: i }),
1249
+ /* @__PURE__ */ q("span", {
1187
1250
  className: "text-muted-foreground",
1188
- children: [/* @__PURE__ */ q(st, {
1251
+ children: [/* @__PURE__ */ K(ht, {
1189
1252
  value: i.createdAt,
1190
1253
  exact: "medium"
1191
- }), i.updatedAt !== i.createdAt && /* @__PURE__ */ J(K, { children: [" ", o("edited")] })]
1254
+ }), i.updatedAt !== i.createdAt && /* @__PURE__ */ q(G, { children: [" ", o("edited")] })]
1192
1255
  }),
1193
- !x && !g && /* @__PURE__ */ q(bt, {
1194
- items: A,
1256
+ !x && !g && /* @__PURE__ */ K(kt, {
1257
+ items: j,
1195
1258
  className: "ml-auto"
1196
1259
  }),
1197
- x && /* @__PURE__ */ J("span", {
1260
+ x && /* @__PURE__ */ q("span", {
1198
1261
  className: "ml-auto flex gap-2 text-muted-foreground",
1199
1262
  children: [
1200
- /* @__PURE__ */ q("span", { children: o("confirmDelete") }),
1201
- /* @__PURE__ */ q("button", {
1263
+ /* @__PURE__ */ K("span", { children: o("confirmDelete") }),
1264
+ /* @__PURE__ */ K("button", {
1202
1265
  type: "button",
1203
1266
  className: "text-danger hover:underline",
1204
1267
  onClick: () => k.mutate(),
1205
1268
  children: s("delete")
1206
1269
  }),
1207
- /* @__PURE__ */ q("button", {
1270
+ /* @__PURE__ */ K("button", {
1208
1271
  type: "button",
1209
1272
  className: "hover:underline",
1210
1273
  onClick: () => S(!1),
@@ -1213,10 +1276,10 @@ function Pt({ workspace: n, identifier: r, comment: i, onReply: a }) {
1213
1276
  ]
1214
1277
  })
1215
1278
  ]
1216
- }), /* @__PURE__ */ q("div", {
1279
+ }), /* @__PURE__ */ K("div", {
1217
1280
  className: "mt-1",
1218
- children: g ? /* @__PURE__ */ J(K, { children: [
1219
- /* @__PURE__ */ q(R, {
1281
+ children: g ? /* @__PURE__ */ q(G, { children: [
1282
+ /* @__PURE__ */ K(L, {
1220
1283
  value: y,
1221
1284
  onChange: b,
1222
1285
  onSubmit: () => O.mutate(),
@@ -1227,19 +1290,19 @@ function Pt({ workspace: n, identifier: r, comment: i, onReply: a }) {
1227
1290
  },
1228
1291
  onFiles: (e, t) => w.upload(C.current, e, t)
1229
1292
  }),
1230
- /* @__PURE__ */ q(Te, {
1293
+ /* @__PURE__ */ K(Me, {
1231
1294
  pending: w.pending,
1232
1295
  error: w.error
1233
1296
  }),
1234
- /* @__PURE__ */ J("div", {
1297
+ /* @__PURE__ */ q("div", {
1235
1298
  className: "mt-2 flex justify-end gap-2",
1236
- children: [/* @__PURE__ */ q(z, {
1299
+ children: [/* @__PURE__ */ K(R, {
1237
1300
  type: "button",
1238
1301
  variant: "ghost",
1239
1302
  size: "sm",
1240
1303
  onClick: () => v(!1),
1241
1304
  children: s("cancel")
1242
- }), /* @__PURE__ */ q(z, {
1305
+ }), /* @__PURE__ */ K(R, {
1243
1306
  type: "button",
1244
1307
  variant: "primary",
1245
1308
  size: "sm",
@@ -1248,21 +1311,21 @@ function Pt({ workspace: n, identifier: r, comment: i, onReply: a }) {
1248
1311
  children: s("save")
1249
1312
  })]
1250
1313
  })
1251
- ] }) : /* @__PURE__ */ J(K, { children: [
1252
- /* @__PURE__ */ q(R, {
1314
+ ] }) : /* @__PURE__ */ q(G, { children: [
1315
+ /* @__PURE__ */ K(L, {
1253
1316
  value: i.body,
1254
1317
  editable: !1
1255
1318
  }),
1256
- /* @__PURE__ */ q(Qe, {
1319
+ /* @__PURE__ */ K(ot, {
1257
1320
  workspace: n,
1258
1321
  widgets: i.widgets
1259
1322
  }),
1260
- /* @__PURE__ */ q(Ft, {
1323
+ /* @__PURE__ */ K(Gt, {
1261
1324
  workspace: n,
1262
1325
  identifier: r,
1263
1326
  comment: i
1264
1327
  }),
1265
- /* @__PURE__ */ q(Ye, {
1328
+ /* @__PURE__ */ K(rt, {
1266
1329
  workspace: n,
1267
1330
  identifier: r,
1268
1331
  commentId: i.id,
@@ -1274,19 +1337,19 @@ function Pt({ workspace: n, identifier: r, comment: i, onReply: a }) {
1274
1337
  })]
1275
1338
  });
1276
1339
  }
1277
- function Ft({ workspace: e, identifier: t, comment: n }) {
1278
- let { data: r = [] } = X(s(e, t)), { actorName: i } = ce(e), a = r.filter((e) => e.page && e.commentId === n.id);
1279
- return a.length === 0 ? null : /* @__PURE__ */ q("div", {
1340
+ function Gt({ workspace: e, identifier: t, comment: n }) {
1341
+ let { data: r = [] } = Y(s(e, t)), { actorName: i } = ge(e), a = r.filter((e) => e.page && e.commentId === n.id);
1342
+ return a.length === 0 ? null : /* @__PURE__ */ K("div", {
1280
1343
  className: "mt-2 space-y-2",
1281
- children: a.map((e) => /* @__PURE__ */ q(Me, {
1344
+ children: a.map((e) => /* @__PURE__ */ K(Be, {
1282
1345
  attachmentId: e.id,
1283
1346
  name: e.name,
1284
1347
  agent: i(n.author)
1285
1348
  }, e.id))
1286
1349
  });
1287
1350
  }
1288
- function It({ workspace: n, identifier: r, parentId: i, publicOn: a, autofocus: o = !1, onDone: s }) {
1289
- let c = G("issue.comments"), l = vt(), u = G("common"), d = ht(Lt), f = Z(), [p, m] = W(""), [h, g] = W(0), _ = U(null), v = Ee(n, r), y = Y({
1351
+ function Kt({ workspace: n, identifier: r, parentId: i, publicOn: a, autofocus: o = !1, onDone: s }) {
1352
+ let c = W("issue.comments"), l = Et(), u = W("common"), d = Ct($), f = X(), [p, m] = U(""), [h, g] = U(0), _ = H(null), v = Ne(n, r), y = J({
1290
1353
  mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/comments", {
1291
1354
  params: { path: {
1292
1355
  workspace: n,
@@ -1298,10 +1361,10 @@ function It({ workspace: n, identifier: r, parentId: i, publicOn: a, autofocus:
1298
1361
  }
1299
1362
  })),
1300
1363
  onSuccess: () => {
1301
- m(""), g((e) => e + 1), I(f, n, r), s?.();
1364
+ m(""), g((e) => e + 1), se(f, n, r), s?.();
1302
1365
  }
1303
1366
  }), b = () => p.trim() && !y.isPending && v.pending === 0 && y.mutate();
1304
- return /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(R, {
1367
+ return /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K(L, {
1305
1368
  value: "",
1306
1369
  onChange: m,
1307
1370
  onSubmit: b,
@@ -1315,29 +1378,29 @@ function It({ workspace: n, identifier: r, parentId: i, publicOn: a, autofocus:
1315
1378
  placeholder: a ? c("replyPublic", { source: a }) : c(i ? "replyPlaceholder" : "placeholder"),
1316
1379
  label: a ? c("replyPublicButton", { source: a }) : c(i ? "reply" : "newComment"),
1317
1380
  className: i ? "min-h-8" : "min-h-12"
1318
- }, h), /* @__PURE__ */ J("div", {
1381
+ }, h), /* @__PURE__ */ q("div", {
1319
1382
  className: "mt-1 flex items-center justify-end gap-3",
1320
1383
  children: [
1321
- /* @__PURE__ */ J("span", {
1384
+ /* @__PURE__ */ q("span", {
1322
1385
  className: "mr-auto flex min-w-0 items-center gap-2",
1323
- children: [/* @__PURE__ */ q(Ce, { onFiles: (e) => v.upload(_.current, e) }), /* @__PURE__ */ q(Te, {
1386
+ children: [/* @__PURE__ */ K(Ae, { onFiles: (e) => v.upload(_.current, e) }), /* @__PURE__ */ K(Me, {
1324
1387
  pending: v.pending,
1325
1388
  error: v.error
1326
1389
  })]
1327
1390
  }),
1328
- y.isError && /* @__PURE__ */ q(it, {
1391
+ y.isError && /* @__PURE__ */ K(ft, {
1329
1392
  inline: !0,
1330
1393
  className: "text-xs",
1331
1394
  children: l(y.error)
1332
1395
  }),
1333
- s && /* @__PURE__ */ q(z, {
1396
+ s && /* @__PURE__ */ K(R, {
1334
1397
  type: "button",
1335
1398
  variant: "ghost",
1336
1399
  size: "sm",
1337
1400
  onClick: s,
1338
1401
  children: u("cancel")
1339
1402
  }),
1340
- /* @__PURE__ */ q(z, {
1403
+ /* @__PURE__ */ K(R, {
1341
1404
  type: "button",
1342
1405
  variant: "primary",
1343
1406
  size: "sm",
@@ -1349,5 +1412,5 @@ function It({ workspace: n, identifier: r, parentId: i, publicOn: a, autofocus:
1349
1412
  ]
1350
1413
  })] });
1351
1414
  }
1352
- var Lt = pt(() => {});
1353
- export { xt as component };
1415
+ var $ = xt(() => {});
1416
+ export { At as component };