@burdenoff/microfe-healthybowl 2026.705.2 → 2026.706.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.
@@ -14,31 +14,31 @@ import f from "../../../date-fns/isSameMonth.js";
14
14
  import p from "../../../date-fns/isToday.js";
15
15
  import m from "../../../date-fns/parseISO.js";
16
16
  import { cva as h } from "../../../class-variance-authority/dist/index.js";
17
- import { createContext as g, useCallback as _, useContext as v, useEffect as y, useMemo as b, useState as x } from "react";
18
- import { CalendarDays as S, CalendarRange as C, ChevronDown as w, ChevronLeft as T, ChevronRight as E, ChevronUp as D, Circle as O, CircleCheckBig as k, CircleDashed as A, CircleDot as j, CircleDotDashed as M, CircleX as N, Flag as P, LayoutGrid as F, Link2 as I, List as L, Plus as R, Search as z, Trash2 as B, User as V } from "lucide-react";
19
- import { jsx as H, jsxs as U } from "react/jsx-runtime";
20
- import { Card as W, CardContent as ee } from "@burdenoff/fe-libs/ui";
21
- import { gql as G } from "@apollo/client";
22
- import { useApolloClient as te, useMutation as K, useQuery as q } from "@apollo/client/react";
17
+ import { createContext as g, useCallback as _, useContext as v, useEffect as y, useMemo as b, useRef as x, useState as S } from "react";
18
+ import { CalendarDays as C, CalendarRange as w, ChevronDown as T, ChevronLeft as E, ChevronRight as D, ChevronUp as O, Circle as k, CircleCheckBig as A, CircleDashed as j, CircleDot as M, CircleDotDashed as N, CircleX as P, Flag as F, LayoutGrid as I, Link2 as L, List as R, Plus as z, Search as B, Trash2 as V, User as H } from "lucide-react";
19
+ import { jsx as U, jsxs as W } from "react/jsx-runtime";
20
+ import { Card as ee, CardContent as G } from "@burdenoff/fe-libs/ui";
21
+ import { gql as K } from "@apollo/client";
22
+ import { useApolloClient as te, useMutation as ne, useQuery as q } from "@apollo/client/react";
23
23
  import "@apollo/client/core";
24
24
  import "@apollo/client/link/context";
25
25
  import "@apollo/client/link/error";
26
26
  //#region node_modules/@burdenoff/planmagnet-fe-sdk/dist/index.js
27
- var ne = {
27
+ var re = {
28
28
  apiGatewayUrl: "",
29
29
  workspaceId: ""
30
30
  };
31
31
  new Proxy({}, { get(e, t) {
32
- return ne[t];
32
+ return re[t];
33
33
  } });
34
- function re() {
35
- return { ...ne };
34
+ function ie() {
35
+ return { ...re };
36
36
  }
37
- var ie = g(null);
38
- function ae() {
39
- return v(ie);
37
+ var ae = g(null);
38
+ function oe() {
39
+ return v(ae);
40
40
  }
41
- var oe = G`
41
+ var se = K`
42
42
  fragment WorkItemSummaryFields on WorkItem {
43
43
  id
44
44
  key
@@ -52,7 +52,7 @@ var oe = G`
52
52
  dueDate
53
53
  labels
54
54
  }
55
- `, se = G`
55
+ `, ce = K`
56
56
  fragment WorkItemFields on WorkItem {
57
57
  id
58
58
  workspaceId
@@ -81,7 +81,7 @@ var oe = G`
81
81
  updatedBy
82
82
  deletedAt
83
83
  }
84
- `, ce = G`
84
+ `, le = K`
85
85
  fragment ProjectSummaryFields on Project {
86
86
  id
87
87
  name
@@ -93,7 +93,7 @@ var oe = G`
93
93
  endDate
94
94
  tags
95
95
  }
96
- `, le = G`
96
+ `, ue = K`
97
97
  query ListWorkItems(
98
98
  $workspaceId: ID!
99
99
  $filter: PlanmagnetWorkItemFilter
@@ -117,16 +117,16 @@ var oe = G`
117
117
  totalCount
118
118
  }
119
119
  }
120
- ${oe}
121
- `, ue = G`
120
+ ${se}
121
+ `, de = K`
122
122
  query GetWorkItem($id: ID!) {
123
123
  planmagnetWorkItem(id: $id) {
124
124
  ...WorkItemFields
125
125
  }
126
126
  }
127
- ${se}
127
+ ${ce}
128
128
  `;
129
- G`
129
+ K`
130
130
  query GetProjects(
131
131
  $workspaceId: ID!
132
132
  $filter: PlanmagnetProjectFilter
@@ -150,32 +150,32 @@ G`
150
150
  totalCount
151
151
  }
152
152
  }
153
- ${ce}
153
+ ${le}
154
154
  `;
155
- var de = G`
155
+ var fe = K`
156
156
  mutation CreateWorkItem($input: PlanmagnetCreateWorkItemInput!) {
157
157
  planmagnetCreateWorkItem(input: $input) {
158
158
  ...WorkItemFields
159
159
  }
160
160
  }
161
- ${se}
162
- `, fe = G`
161
+ ${ce}
162
+ `, pe = K`
163
163
  mutation UpdateWorkItem($id: ID!, $input: PlanmagnetUpdateWorkItemInput!) {
164
164
  planmagnetUpdateWorkItem(id: $id, input: $input) {
165
165
  ...WorkItemFields
166
166
  }
167
167
  }
168
- ${se}
168
+ ${ce}
169
169
  `;
170
- G`
170
+ K`
171
171
  mutation MoveWorkItem($id: ID!, $input: PlanmagnetMoveWorkItemInput!) {
172
172
  planmagnetMoveWorkItem(id: $id, input: $input) {
173
173
  ...WorkItemFields
174
174
  }
175
175
  }
176
- ${se}
176
+ ${ce}
177
177
  `;
178
- var pe = G`
178
+ var me = K`
179
179
  fragment WorkItemLinkFields on WorkItemLink {
180
180
  id
181
181
  workspaceId
@@ -192,7 +192,7 @@ var pe = G`
192
192
  createdAt
193
193
  updatedAt
194
194
  }
195
- `, me = G`
195
+ `, he = K`
196
196
  query ListWorkItemLinks(
197
197
  $workspaceId: ID!
198
198
  $filter: PlanmagnetWorkItemLinkFilter
@@ -216,21 +216,21 @@ var pe = G`
216
216
  totalCount
217
217
  }
218
218
  }
219
- ${pe}
219
+ ${me}
220
220
  `;
221
- G`
221
+ K`
222
222
  mutation CreateWorkItemLink($input: PlanmagnetCreateWorkItemLinkInput!) {
223
223
  planmagnetLinkWorkItem(input: $input) {
224
224
  ...WorkItemLinkFields
225
225
  }
226
226
  }
227
- ${pe}
228
- `, G`
227
+ ${me}
228
+ `, K`
229
229
  mutation UnlinkWorkItem($id: ID!) {
230
230
  planmagnetUnlinkWorkItem(id: $id)
231
231
  }
232
232
  `;
233
- var he = G`
233
+ var ge = K`
234
234
  query ListMilestones(
235
235
  $workspaceId: ID!
236
236
  $filter: PlanmagnetMilestoneFilter
@@ -254,7 +254,7 @@ var he = G`
254
254
  totalCount
255
255
  }
256
256
  }
257
- ${G`
257
+ ${K`
258
258
  fragment MilestoneFields on Milestone {
259
259
  id
260
260
  projectId
@@ -268,11 +268,11 @@ var he = G`
268
268
  updatedAt
269
269
  }
270
270
  `}
271
- `, ge = G`
271
+ `, _e = K`
272
272
  mutation DeleteWorkItem($id: ID!) {
273
273
  planmagnetDeleteWorkItem(id: $id)
274
274
  }
275
- `, _e = G`
275
+ `, ve = K`
276
276
  fragment EntityCommentFields on EntityComment {
277
277
  id
278
278
  authorId
@@ -284,8 +284,14 @@ var he = G`
284
284
  edited
285
285
  editedAt
286
286
  status
287
+ parentCommentId
288
+ threadRootId
289
+ threadLevel
290
+ mentions {
291
+ mentionedUserId
292
+ }
287
293
  }
288
- `, ve = G`
294
+ `, ye = K`
289
295
  query GetEntityComments($input: GetCommentsInput!) {
290
296
  getEntityComments(input: $input) {
291
297
  items {
@@ -294,15 +300,15 @@ var he = G`
294
300
  total
295
301
  }
296
302
  }
297
- ${_e}
298
- `, ye = G`
303
+ ${ve}
304
+ `, be = K`
299
305
  mutation CreateEntityComment($input: CreateEntityCommentInput!) {
300
306
  createEntityComment(input: $input) {
301
307
  ...EntityCommentFields
302
308
  }
303
309
  }
304
- ${_e}
305
- `, be = G`
310
+ ${ve}
311
+ `, xe = K`
306
312
  mutation DeleteEntityComment($input: DeleteCommentInput!) {
307
313
  deleteEntityComment(input: $input)
308
314
  }
@@ -310,32 +316,32 @@ var he = G`
310
316
  function J(...n) {
311
317
  return t(e(n));
312
318
  }
313
- var xe = /* @__PURE__ */ new Set(["DONE", "CANCELLED"]);
314
- function Se(e) {
319
+ var Se = /* @__PURE__ */ new Set(["DONE", "CANCELLED"]);
320
+ function Ce(e) {
315
321
  if (!e) return null;
316
322
  let t = m(e);
317
323
  return o(t) ? t : null;
318
324
  }
319
- function Ce(e) {
325
+ function we(e) {
320
326
  if (!e) return;
321
327
  let t = /^\d{4}-\d{2}-\d{2}$/.test(e) ? `${e}T00:00:00.000Z` : e, n = new Date(t);
322
328
  return Number.isNaN(n.getTime()) ? void 0 : n.toISOString();
323
329
  }
324
- function we(e) {
325
- let t = Se(e);
330
+ function Te(e) {
331
+ let t = Ce(e);
326
332
  if (!t) return null;
327
333
  let n = /* @__PURE__ */ new Date();
328
334
  return d(t, t.getFullYear() === n.getFullYear() ? "MMM d" : "MMM d yyyy");
329
335
  }
330
- function Te(e) {
331
- let t = Se(e);
336
+ function Ee(e) {
337
+ let t = Ce(e);
332
338
  return t ? d(t, "MMM d, yyyy") : null;
333
339
  }
334
- function Ee(e, t) {
335
- let n = Se(e);
336
- return !n || t && xe.has(t) ? !1 : i(n).getTime() < i(/* @__PURE__ */ new Date()).getTime();
340
+ function De(e, t) {
341
+ let n = Ce(e);
342
+ return !n || t && Se.has(t) ? !1 : i(n).getTime() < i(/* @__PURE__ */ new Date()).getTime();
337
343
  }
338
- var De = h("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium capitalize transition-colors", {
344
+ var Oe = h("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium capitalize transition-colors", {
339
345
  variants: { variant: {
340
346
  default: "bg-primary/10 text-primary",
341
347
  muted: "bg-muted text-muted-foreground",
@@ -345,29 +351,29 @@ var De = h("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-m
345
351
  } },
346
352
  defaultVariants: { variant: "default" }
347
353
  });
348
- function Oe({ className: e, variant: t, ...n }) {
349
- return /* @__PURE__ */ H("span", {
350
- className: J(De({ variant: t }), e),
354
+ function ke({ className: e, variant: t, ...n }) {
355
+ return /* @__PURE__ */ U("span", {
356
+ className: J(Oe({ variant: t }), e),
351
357
  ...n
352
358
  });
353
359
  }
354
- var ke = [
360
+ var Ae = [
355
361
  "bg-primary/15 text-primary",
356
362
  "bg-secondary text-secondary-foreground",
357
363
  "bg-accent text-accent-foreground",
358
364
  "bg-muted text-muted-foreground",
359
365
  "bg-destructive/15 text-destructive"
360
- ], Ae = {
366
+ ], je = {
361
367
  sm: "h-5 w-5 text-[9px]",
362
368
  md: "h-6 w-6 text-[10px]",
363
369
  lg: "h-8 w-8 text-xs"
364
370
  };
365
- function je(e) {
371
+ function Me(e) {
366
372
  let t = 0;
367
373
  for (let n = 0; n < e.length; n++) t = t * 31 + e.charCodeAt(n) >>> 0;
368
- return t % ke.length;
374
+ return t % Ae.length;
369
375
  }
370
- function Me(e, t) {
376
+ function Ne(e, t) {
371
377
  let n = (e ?? "").trim();
372
378
  if (n) {
373
379
  let e = n.split(/\s+/);
@@ -375,25 +381,25 @@ function Me(e, t) {
375
381
  }
376
382
  return (t ?? "").replace(/[^a-zA-Z0-9]/g, "").slice(0, 2).toUpperCase() || "?";
377
383
  }
378
- function Ne({ id: e, name: t, size: n = "md", className: r }) {
379
- if (!e && !t) return /* @__PURE__ */ H("span", {
380
- className: J("inline-flex items-center justify-center rounded-full border border-dashed border-border text-muted-foreground", Ae[n], r),
384
+ function Pe({ id: e, name: t, size: n = "md", className: r }) {
385
+ if (!e && !t) return /* @__PURE__ */ U("span", {
386
+ className: J("inline-flex items-center justify-center rounded-full border border-dashed border-border text-muted-foreground", je[n], r),
381
387
  title: "Unassigned",
382
388
  "aria-label": "Unassigned",
383
- children: /* @__PURE__ */ H(V, {
389
+ children: /* @__PURE__ */ U(H, {
384
390
  className: "h-1/2 w-1/2",
385
391
  "aria-hidden": "true"
386
392
  })
387
393
  });
388
- let i = ke[je(t || e || "")];
389
- return /* @__PURE__ */ H("span", {
390
- className: J("inline-flex items-center justify-center rounded-full font-medium", Ae[n], i, r),
394
+ let i = Ae[Me(t || e || "")];
395
+ return /* @__PURE__ */ U("span", {
396
+ className: J("inline-flex items-center justify-center rounded-full font-medium", je[n], i, r),
391
397
  title: t ?? e ?? void 0,
392
398
  "aria-label": t ?? e ?? void 0,
393
- children: Me(t, e)
399
+ children: Ne(t, e)
394
400
  });
395
401
  }
396
- var Pe = [
402
+ var Fe = [
397
403
  {
398
404
  status: "BACKLOG",
399
405
  label: "Backlog"
@@ -422,19 +428,19 @@ var Pe = [
422
428
  status: "CANCELLED",
423
429
  label: "Cancelled"
424
430
  }
425
- ], Fe = [
431
+ ], Ie = [
426
432
  "NONE",
427
433
  "LOW",
428
434
  "MEDIUM",
429
435
  "HIGH",
430
436
  "CRITICAL"
431
- ], Ie = [
437
+ ], Le = [
432
438
  "TASK",
433
439
  "STORY",
434
440
  "BUG",
435
441
  "EPIC",
436
442
  "SUB_TASK"
437
- ], Le = [
443
+ ], Re = [
438
444
  "BACKLOG",
439
445
  "TODO",
440
446
  "IN_PROGRESS",
@@ -443,29 +449,29 @@ var Pe = [
443
449
  "DONE",
444
450
  "CANCELLED"
445
451
  ];
446
- function Re(e) {
452
+ function ze(e) {
447
453
  return e.toLowerCase().replace(/_/g, " ");
448
454
  }
449
- function ze({ link: e, renderIcon: t, className: n }) {
450
- let r = e.displayNameSnapshot || Re(e.entityType), i = t?.(e.entityType) ?? /* @__PURE__ */ H(I, {
455
+ function Be({ link: e, renderIcon: t, className: n }) {
456
+ let r = e.displayNameSnapshot || ze(e.entityType), i = t?.(e.entityType) ?? /* @__PURE__ */ U(L, {
451
457
  className: "h-3 w-3 shrink-0",
452
458
  "aria-hidden": "true"
453
- }), a = /* @__PURE__ */ U("span", {
459
+ }), a = /* @__PURE__ */ W("span", {
454
460
  className: J("inline-flex max-w-full items-center gap-1 rounded-full border border-primary/20 bg-primary/5 px-1.5 py-0.5 text-[10px] font-medium text-primary", n),
455
- title: `${Re(e.relationType)} \xB7 ${Re(e.entityType)}`,
456
- children: [i, /* @__PURE__ */ H("span", {
461
+ title: `${ze(e.relationType)} \xB7 ${ze(e.entityType)}`,
462
+ children: [i, /* @__PURE__ */ U("span", {
457
463
  className: "truncate",
458
464
  children: r
459
465
  })]
460
466
  });
461
- return e.deepLinkSnapshot ? /* @__PURE__ */ H("a", {
467
+ return e.deepLinkSnapshot ? /* @__PURE__ */ U("a", {
462
468
  href: e.deepLinkSnapshot,
463
469
  onClick: (e) => e.stopPropagation(),
464
470
  className: "inline-flex max-w-full no-underline hover:brightness-95",
465
471
  children: a
466
472
  }) : a;
467
473
  }
468
- var Be = {
474
+ var Ve = {
469
475
  board: "Board",
470
476
  list: "List",
471
477
  timeline: "Timeline",
@@ -530,6 +536,9 @@ var Be = {
530
536
  editedTag: "(edited)",
531
537
  failedToComment: "Failed to post comment",
532
538
  failedToDeleteComment: "Failed to delete comment",
539
+ reply: "Reply",
540
+ replyPlaceholder: "Write a reply…",
541
+ repliesCount: "{n} replies",
533
542
  create: "Create task",
534
543
  creating: "Creating…",
535
544
  cancel: "Cancel",
@@ -572,73 +581,73 @@ var Be = {
572
581
  EPIC: "Epic",
573
582
  SUB_TASK: "Sub Task"
574
583
  }
575
- }, Ve = g(Be), He = Ve.Provider;
584
+ }, He = g(Ve), Ue = He.Provider;
576
585
  function Y() {
577
- return v(Ve);
586
+ return v(He);
578
587
  }
579
- function Ue(e) {
588
+ function We(e) {
580
589
  return e ? {
581
- ...Be,
590
+ ...Ve,
582
591
  ...e,
583
592
  status: {
584
- ...Be.status,
593
+ ...Ve.status,
585
594
  ...e.status
586
595
  },
587
596
  priority: {
588
- ...Be.priority,
597
+ ...Ve.priority,
589
598
  ...e.priority
590
599
  },
591
600
  type: {
592
- ...Be.type,
601
+ ...Ve.type,
593
602
  ...e.type
594
603
  }
595
- } : Be;
604
+ } : Ve;
596
605
  }
597
- var We = {
606
+ var Ge = {
598
607
  BACKLOG: {
599
- icon: A,
608
+ icon: j,
600
609
  tone: "text-muted-foreground/60"
601
610
  },
602
611
  TODO: {
603
- icon: O,
612
+ icon: k,
604
613
  tone: "text-muted-foreground"
605
614
  },
606
615
  IN_PROGRESS: {
607
- icon: j,
616
+ icon: M,
608
617
  tone: "text-primary"
609
618
  },
610
619
  IN_REVIEW: {
611
- icon: M,
620
+ icon: N,
612
621
  tone: "text-accent-foreground"
613
622
  },
614
623
  TESTING: {
615
- icon: M,
624
+ icon: N,
616
625
  tone: "text-secondary-foreground"
617
626
  },
618
627
  DONE: {
619
- icon: k,
628
+ icon: A,
620
629
  tone: "text-primary"
621
630
  },
622
631
  CANCELLED: {
623
- icon: N,
632
+ icon: P,
624
633
  tone: "text-destructive/70"
625
634
  }
626
635
  };
627
- function Ge({ status: e, className: t }) {
628
- let n = We[e] ?? We.TODO, r = n.icon;
629
- return /* @__PURE__ */ H(r, {
636
+ function Ke({ status: e, className: t }) {
637
+ let n = Ge[e] ?? Ge.TODO, r = n.icon;
638
+ return /* @__PURE__ */ U(r, {
630
639
  className: J("h-3.5 w-3.5 shrink-0", n.tone, t),
631
640
  "aria-hidden": "true"
632
641
  });
633
642
  }
634
- function Ke({ status: e, className: t }) {
643
+ function qe({ status: e, className: t }) {
635
644
  let n = Y();
636
- return /* @__PURE__ */ U("span", {
645
+ return /* @__PURE__ */ W("span", {
637
646
  className: J("inline-flex items-center gap-1.5 rounded-md border border-border bg-muted/40 px-2 py-0.5 text-xs font-medium capitalize text-foreground", t),
638
- children: [/* @__PURE__ */ H(Ge, { status: e }), n.status[e]]
647
+ children: [/* @__PURE__ */ U(Ke, { status: e }), n.status[e]]
639
648
  });
640
649
  }
641
- var qe = {
650
+ var Je = {
642
651
  NONE: {
643
652
  level: 0,
644
653
  tone: "text-muted-foreground/50"
@@ -659,42 +668,42 @@ var qe = {
659
668
  level: 3,
660
669
  tone: "text-destructive"
661
670
  }
662
- }, Je = [
671
+ }, Ye = [
663
672
  "h-1.5",
664
673
  "h-2.5",
665
674
  "h-3.5"
666
675
  ];
667
- function Ye({ priority: e, showLabel: t = !1, className: n }) {
668
- let r = Y(), i = qe[e] ?? qe.NONE;
669
- return /* @__PURE__ */ U("span", {
676
+ function Xe({ priority: e, showLabel: t = !1, className: n }) {
677
+ let r = Y(), i = Je[e] ?? Je.NONE;
678
+ return /* @__PURE__ */ W("span", {
670
679
  className: J("inline-flex items-center gap-1.5", i.tone, n),
671
680
  title: `${r.priorityLabel}: ${r.priority[e]}`,
672
- children: [/* @__PURE__ */ H("span", {
681
+ children: [/* @__PURE__ */ U("span", {
673
682
  className: "flex items-end gap-0.5",
674
683
  "aria-hidden": "true",
675
- children: Je.map((e, t) => /* @__PURE__ */ H("span", { className: J("w-1 rounded-[1px]", e, t < i.level ? "bg-current" : "bg-current/25") }, e))
676
- }), t && /* @__PURE__ */ H("span", {
684
+ children: Ye.map((e, t) => /* @__PURE__ */ U("span", { className: J("w-1 rounded-[1px]", e, t < i.level ? "bg-current" : "bg-current/25") }, e))
685
+ }), t && /* @__PURE__ */ U("span", {
677
686
  className: "text-xs font-medium capitalize",
678
687
  children: r.priority[e]
679
688
  })]
680
689
  });
681
690
  }
682
- var Xe = {
691
+ var Ze = {
683
692
  TASK: "secondary",
684
693
  STORY: "default",
685
694
  BUG: "destructive",
686
695
  EPIC: "accent",
687
696
  SUB_TASK: "muted"
688
697
  };
689
- function Ze({ type: e, className: t }) {
698
+ function Qe({ type: e, className: t }) {
690
699
  let n = Y();
691
- return /* @__PURE__ */ H(Oe, {
692
- variant: Xe[e],
700
+ return /* @__PURE__ */ U(ke, {
701
+ variant: Ze[e],
693
702
  className: t,
694
703
  children: n.type[e]
695
704
  });
696
705
  }
697
- function Qe({ open: e, onClose: t, children: n, ariaLabel: r, className: i, variant: a }) {
706
+ function $e({ open: e, onClose: t, children: n, ariaLabel: r, className: i, variant: a }) {
698
707
  if (y(() => {
699
708
  if (!e) return;
700
709
  let n = (e) => {
@@ -703,16 +712,16 @@ function Qe({ open: e, onClose: t, children: n, ariaLabel: r, className: i, vari
703
712
  return document.addEventListener("keydown", n), () => document.removeEventListener("keydown", n);
704
713
  }, [e, t]), !e) return null;
705
714
  let o = a === "modal";
706
- return /* @__PURE__ */ H("div", {
715
+ return /* @__PURE__ */ U("div", {
707
716
  className: J("fixed inset-0 z-50 flex bg-foreground/40", o ? "items-center justify-center p-4" : "justify-end"),
708
717
  onClick: t,
709
- children: /* @__PURE__ */ U("div", {
718
+ children: /* @__PURE__ */ W("div", {
710
719
  role: "dialog",
711
720
  "aria-modal": "true",
712
721
  "aria-label": r,
713
722
  className: J("relative overflow-y-auto bg-background text-foreground shadow-lg", o ? "max-h-[90vh] w-full max-w-2xl rounded-lg" : "h-full w-full max-w-lg", i),
714
723
  onClick: (e) => e.stopPropagation(),
715
- children: [/* @__PURE__ */ H("button", {
724
+ children: [/* @__PURE__ */ U("button", {
716
725
  type: "button",
717
726
  "aria-label": "Close",
718
727
  onClick: t,
@@ -722,22 +731,22 @@ function Qe({ open: e, onClose: t, children: n, ariaLabel: r, className: i, vari
722
731
  })
723
732
  });
724
733
  }
725
- function $e(e) {
726
- return /* @__PURE__ */ H(Qe, {
734
+ function et(e) {
735
+ return /* @__PURE__ */ U($e, {
727
736
  variant: "modal",
728
737
  ...e
729
738
  });
730
739
  }
731
- function et(e) {
732
- return /* @__PURE__ */ H(Qe, {
740
+ function tt(e) {
741
+ return /* @__PURE__ */ U($e, {
733
742
  variant: "drawer",
734
743
  ...e
735
744
  });
736
745
  }
737
- var tt = /* @__PURE__ */ new Set();
738
- function nt({ task: e, hidden: t = tt, onClick: n, draggable: r, onDragStart: i, onDragEnd: a, dragging: o, resolveAssignee: s, links: c, renderLinkIcon: l, className: u }) {
739
- let d = Y(), f = Ee(e.dueDate, e.status), p = we(e.dueDate), m = e.assigneeId ? s?.(e.assigneeId) : null, h = !t.has("key") || !t.has("type"), g = !t.has("links") && (c?.length ?? 0) > 0, _ = !t.has("labels") && (e.labels?.length ?? 0) > 0, v = !t.has("priority"), y = !t.has("storyPoints") && e.storyPoints != null, b = v || y, x = !t.has("assignee"), C = !t.has("dueDate") && !!p, w = x || C, T = !!n;
740
- return /* @__PURE__ */ U("div", {
746
+ var nt = /* @__PURE__ */ new Set();
747
+ function rt({ task: e, hidden: t = nt, onClick: n, draggable: r, onDragStart: i, onDragEnd: a, dragging: o, resolveAssignee: s, links: c, renderLinkIcon: l, className: u }) {
748
+ let d = Y(), f = De(e.dueDate, e.status), p = Te(e.dueDate), m = e.assigneeId ? s?.(e.assigneeId) : null, h = !t.has("key") || !t.has("type"), g = !t.has("links") && (c?.length ?? 0) > 0, _ = !t.has("labels") && (e.labels?.length ?? 0) > 0, v = !t.has("priority"), y = !t.has("storyPoints") && e.storyPoints != null, b = v || y, x = !t.has("assignee"), S = !t.has("dueDate") && !!p, w = x || S, T = !!n;
749
+ return /* @__PURE__ */ W("div", {
741
750
  role: T ? "button" : void 0,
742
751
  tabIndex: T ? 0 : void 0,
743
752
  draggable: r,
@@ -749,64 +758,64 @@ function nt({ task: e, hidden: t = tt, onClick: n, draggable: r, onDragStart: i,
749
758
  } : void 0,
750
759
  className: J("group rounded-lg border border-border bg-card p-2.5 shadow-sm transition", "focus:outline-none focus-visible:ring-2 focus-visible:ring-ring", T && "cursor-pointer hover:border-primary/50 hover:shadow-md", r && "active:cursor-grabbing", o && "opacity-50 ring-2 ring-primary/40", u),
751
760
  children: [
752
- h && /* @__PURE__ */ U("div", {
761
+ h && /* @__PURE__ */ W("div", {
753
762
  className: "mb-1 flex items-center justify-between gap-2",
754
- children: [t.has("key") ? /* @__PURE__ */ H("span", {}) : /* @__PURE__ */ H("span", {
763
+ children: [t.has("key") ? /* @__PURE__ */ U("span", {}) : /* @__PURE__ */ U("span", {
755
764
  className: "font-mono text-[10px] uppercase tracking-wide text-muted-foreground",
756
765
  children: e.key
757
- }), !t.has("type") && /* @__PURE__ */ H(Ze, { type: e.type })]
766
+ }), !t.has("type") && /* @__PURE__ */ U(Qe, { type: e.type })]
758
767
  }),
759
- /* @__PURE__ */ H("p", {
768
+ /* @__PURE__ */ U("p", {
760
769
  className: "line-clamp-2 text-sm font-medium leading-snug text-foreground",
761
770
  children: e.title
762
771
  }),
763
- g && /* @__PURE__ */ U("div", {
772
+ g && /* @__PURE__ */ W("div", {
764
773
  className: "mt-1.5 flex flex-wrap gap-1",
765
- children: [c.slice(0, 3).map((e) => /* @__PURE__ */ H(ze, {
774
+ children: [c.slice(0, 3).map((e) => /* @__PURE__ */ U(Be, {
766
775
  link: e,
767
776
  renderIcon: l
768
- }, e.id)), c.length > 3 && /* @__PURE__ */ U("span", {
777
+ }, e.id)), c.length > 3 && /* @__PURE__ */ W("span", {
769
778
  className: "text-[10px] text-muted-foreground",
770
779
  children: ["+", c.length - 3]
771
780
  })]
772
781
  }),
773
- _ && /* @__PURE__ */ U("div", {
782
+ _ && /* @__PURE__ */ W("div", {
774
783
  className: "mt-1.5 flex flex-wrap gap-1",
775
- children: [e.labels.slice(0, 3).map((e) => /* @__PURE__ */ H("span", {
784
+ children: [e.labels.slice(0, 3).map((e) => /* @__PURE__ */ U("span", {
776
785
  className: "rounded bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground",
777
786
  children: e
778
- }, e)), e.labels.length > 3 && /* @__PURE__ */ U("span", {
787
+ }, e)), e.labels.length > 3 && /* @__PURE__ */ W("span", {
779
788
  className: "text-[10px] text-muted-foreground",
780
789
  children: ["+", e.labels.length - 3]
781
790
  })]
782
791
  }),
783
- b && /* @__PURE__ */ U("div", {
792
+ b && /* @__PURE__ */ W("div", {
784
793
  className: "mt-2 flex items-center justify-between",
785
- children: [v ? /* @__PURE__ */ H(Ye, {
794
+ children: [v ? /* @__PURE__ */ U(Xe, {
786
795
  priority: e.priority,
787
796
  showLabel: !0
788
- }) : /* @__PURE__ */ H("span", {}), y && /* @__PURE__ */ H("span", {
797
+ }) : /* @__PURE__ */ U("span", {}), y && /* @__PURE__ */ U("span", {
789
798
  className: "flex h-5 min-w-5 items-center justify-center rounded-full bg-primary/10 px-1 text-[10px] font-semibold text-primary",
790
799
  title: `${e.storyPoints} ${d.storyPointsLabel}`,
791
800
  children: e.storyPoints
792
801
  })]
793
802
  }),
794
- w && /* @__PURE__ */ U("div", {
803
+ w && /* @__PURE__ */ W("div", {
795
804
  className: "mt-2 flex items-center justify-between gap-2",
796
- children: [x ? /* @__PURE__ */ U("span", {
805
+ children: [x ? /* @__PURE__ */ W("span", {
797
806
  className: "flex min-w-0 items-center gap-1.5",
798
- children: [/* @__PURE__ */ H(Ne, {
807
+ children: [/* @__PURE__ */ U(Pe, {
799
808
  id: e.assigneeId,
800
809
  name: m?.name,
801
810
  size: "sm"
802
- }), m?.name && /* @__PURE__ */ H("span", {
811
+ }), m?.name && /* @__PURE__ */ U("span", {
803
812
  className: "truncate text-[11px] text-muted-foreground",
804
813
  children: m.name
805
814
  })]
806
- }) : /* @__PURE__ */ H("span", {}), C && /* @__PURE__ */ U("span", {
815
+ }) : /* @__PURE__ */ U("span", {}), S && /* @__PURE__ */ W("span", {
807
816
  className: J("flex shrink-0 items-center gap-1 text-[11px]", f ? "font-medium text-destructive" : "text-muted-foreground"),
808
817
  title: f ? d.overdueLabel : d.dueDateLabel,
809
- children: [/* @__PURE__ */ H(S, {
818
+ children: [/* @__PURE__ */ U(C, {
810
819
  className: "h-3 w-3",
811
820
  "aria-hidden": "true"
812
821
  }), p]
@@ -815,8 +824,8 @@ function nt({ task: e, hidden: t = tt, onClick: n, draggable: r, onDragStart: i,
815
824
  ]
816
825
  });
817
826
  }
818
- function rt(e, t, n = 500) {
819
- let { data: r, loading: i } = q(me, {
827
+ function it(e, t, n = 500) {
828
+ let { data: r, loading: i } = q(he, {
820
829
  variables: {
821
830
  workspaceId: e,
822
831
  ...t ? { filter: { sourceProduct: t } } : {},
@@ -836,8 +845,8 @@ function rt(e, t, n = 500) {
836
845
  loading: i
837
846
  };
838
847
  }
839
- function it({ projectId: e, columns: t = Pe, readonly: n, confirmMove: r = !0, hideHeader: i, priority: a = "ALL", type: o = "ALL", search: s = "", assigneeId: c, hiddenFields: l, resolveAssignee: u, linkSourceProduct: d, renderLinkIcon: f, onTaskClick: p, className: m, workspaceId: h }) {
840
- let g = ae(), v = h ?? g?.workspaceId, y = te(), S = Y(), C = b(() => new Set(l ?? []), [l]), { linksByItem: w } = rt(v, d), [T, E] = x(null), [D, O] = x(null), [k, A] = x(null), [j, M] = x(null), [N] = K(fe), { data: P, loading: F, error: I } = q(le, {
848
+ function at({ projectId: e, columns: t = Fe, readonly: n, confirmMove: r = !0, hideHeader: i, priority: a = "ALL", type: o = "ALL", search: s = "", assigneeId: c, hiddenFields: l, resolveAssignee: u, linkSourceProduct: d, renderLinkIcon: f, onTaskClick: p, className: m, workspaceId: h }) {
849
+ let g = oe(), v = h ?? g?.workspaceId, y = te(), x = Y(), C = b(() => new Set(l ?? []), [l]), { linksByItem: w } = it(v, d), [T, E] = S(null), [D, O] = S(null), [k, A] = S(null), [j, M] = S(null), [N] = ne(pe), { data: P, loading: F, error: I } = q(ue, {
841
850
  variables: {
842
851
  workspaceId: v,
843
852
  ...e ? { filter: { projectId: e } } : {},
@@ -861,25 +870,25 @@ function it({ projectId: e, columns: t = Pe, readonly: n, confirmMove: r = !0, h
861
870
  y.cache.modify({
862
871
  id: r,
863
872
  fields: { status: () => n }
864
- }), A(S.moveFailed);
873
+ }), A(x.moveFailed);
865
874
  }));
866
875
  }, [
867
876
  y,
868
877
  N,
869
- S
878
+ x
870
879
  ]);
871
- if (!v) return /* @__PURE__ */ H("div", {
880
+ if (!v) return /* @__PURE__ */ U("div", {
872
881
  className: J("p-6 text-sm text-destructive", m),
873
882
  children: "TaskBoard: no workspaceId provided (prop or PlanMagnetProvider)."
874
883
  });
875
- if (F && !P) return /* @__PURE__ */ H("div", {
884
+ if (F && !P) return /* @__PURE__ */ U("div", {
876
885
  className: J("flex items-center justify-center p-12", m),
877
- children: /* @__PURE__ */ H("div", { className: "h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent" })
886
+ children: /* @__PURE__ */ U("div", { className: "h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent" })
878
887
  });
879
- if (I && !P) return /* @__PURE__ */ U("div", {
888
+ if (I && !P) return /* @__PURE__ */ W("div", {
880
889
  className: J("p-6 text-sm text-destructive", m),
881
890
  children: [
882
- S.errorLoading,
891
+ x.errorLoading,
883
892
  ": ",
884
893
  I.message
885
894
  ]
@@ -888,7 +897,7 @@ function it({ projectId: e, columns: t = Pe, readonly: n, confirmMove: r = !0, h
888
897
  e.title,
889
898
  e.key,
890
899
  ...e.labels ?? []
891
- ].join(" ").toLowerCase().includes(z))), V = !n, W = (e) => (t) => {
900
+ ].join(" ").toLowerCase().includes(z))), V = !n, H = (e) => (t) => {
892
901
  !V || !T || (t.preventDefault(), D !== e && O(e));
893
902
  }, ee = (e) => (t) => {
894
903
  if (!V) return;
@@ -899,51 +908,51 @@ function it({ projectId: e, columns: t = Pe, readonly: n, confirmMove: r = !0, h
899
908
  toStatus: e
900
909
  }) : L(n, e));
901
910
  };
902
- return /* @__PURE__ */ U("div", {
911
+ return /* @__PURE__ */ W("div", {
903
912
  className: J("space-y-3", m),
904
913
  children: [
905
- !i && /* @__PURE__ */ U("div", {
914
+ !i && /* @__PURE__ */ W("div", {
906
915
  className: "flex items-baseline justify-between",
907
- children: [/* @__PURE__ */ H("h2", {
916
+ children: [/* @__PURE__ */ U("h2", {
908
917
  className: "text-lg font-semibold text-foreground",
909
- children: S.board
910
- }), /* @__PURE__ */ U("span", {
918
+ children: x.board
919
+ }), /* @__PURE__ */ W("span", {
911
920
  className: "text-sm text-muted-foreground",
912
921
  children: [
913
922
  B.length,
914
923
  " ",
915
- B.length === 1 ? S.tasksSingular : S.tasksPlural
924
+ B.length === 1 ? x.tasksSingular : x.tasksPlural
916
925
  ]
917
926
  })]
918
927
  }),
919
- k && /* @__PURE__ */ H("div", {
928
+ k && /* @__PURE__ */ U("div", {
920
929
  className: "rounded-md border border-destructive/40 bg-destructive/10 px-3 py-1.5 text-xs text-destructive",
921
930
  children: k
922
931
  }),
923
- /* @__PURE__ */ H("div", {
932
+ /* @__PURE__ */ U("div", {
924
933
  className: "flex gap-3 overflow-x-auto pb-2",
925
934
  children: t.map((e) => {
926
935
  let t = B.filter((t) => t.status === e.status), n = D === e.status;
927
- return /* @__PURE__ */ U("div", {
928
- onDragOver: W(e.status),
936
+ return /* @__PURE__ */ W("div", {
937
+ onDragOver: H(e.status),
929
938
  onDragLeave: () => D === e.status && O(null),
930
939
  onDrop: ee(e.status),
931
940
  className: J("flex w-72 shrink-0 flex-col rounded-lg border transition-colors", n ? "border-primary/50 bg-primary/5" : "border-transparent bg-muted/40"),
932
- children: [/* @__PURE__ */ U("div", {
941
+ children: [/* @__PURE__ */ W("div", {
933
942
  className: "flex items-center justify-between gap-2 px-3 py-2",
934
- children: [/* @__PURE__ */ U("span", {
943
+ children: [/* @__PURE__ */ W("span", {
935
944
  className: "flex items-center gap-2 text-sm font-medium text-foreground",
936
- children: [/* @__PURE__ */ H(Ge, { status: e.status }), S.status[e.status]]
937
- }), /* @__PURE__ */ H("span", {
945
+ children: [/* @__PURE__ */ U(Ke, { status: e.status }), x.status[e.status]]
946
+ }), /* @__PURE__ */ U("span", {
938
947
  className: "rounded-full bg-muted px-1.5 text-xs font-medium text-muted-foreground",
939
948
  children: t.length
940
949
  })]
941
- }), /* @__PURE__ */ H("div", {
950
+ }), /* @__PURE__ */ U("div", {
942
951
  className: "flex flex-col gap-2 px-2 pb-2",
943
- children: t.length === 0 ? /* @__PURE__ */ H("div", {
952
+ children: t.length === 0 ? /* @__PURE__ */ U("div", {
944
953
  className: "rounded-md border border-dashed border-border/70 px-3 py-6 text-center text-xs text-muted-foreground",
945
- children: n ? S.dropHere : S.noTasks
946
- }) : t.map((e) => /* @__PURE__ */ H(nt, {
954
+ children: n ? x.dropHere : x.noTasks
955
+ }) : t.map((e) => /* @__PURE__ */ U(rt, {
947
956
  task: e,
948
957
  hidden: C,
949
958
  onClick: p,
@@ -963,36 +972,36 @@ function it({ projectId: e, columns: t = Pe, readonly: n, confirmMove: r = !0, h
963
972
  }, e.status);
964
973
  })
965
974
  }),
966
- /* @__PURE__ */ H($e, {
975
+ /* @__PURE__ */ U(et, {
967
976
  open: j != null,
968
977
  onClose: () => M(null),
969
- ariaLabel: S.moveConfirmTitle,
978
+ ariaLabel: x.moveConfirmTitle,
970
979
  className: "max-w-sm",
971
- children: j && /* @__PURE__ */ U("div", {
980
+ children: j && /* @__PURE__ */ W("div", {
972
981
  className: "space-y-4 p-6",
973
982
  children: [
974
- /* @__PURE__ */ H("h3", {
983
+ /* @__PURE__ */ U("h3", {
975
984
  className: "text-base font-semibold text-foreground",
976
- children: S.moveConfirmTitle
985
+ children: x.moveConfirmTitle
977
986
  }),
978
- /* @__PURE__ */ H("p", {
987
+ /* @__PURE__ */ U("p", {
979
988
  className: "text-sm text-muted-foreground",
980
- children: S.moveConfirmPrompt.replace("{task}", j.task.title).replace("{status}", S.status[j.toStatus])
989
+ children: x.moveConfirmPrompt.replace("{task}", j.task.title).replace("{status}", x.status[j.toStatus])
981
990
  }),
982
- /* @__PURE__ */ U("div", {
991
+ /* @__PURE__ */ W("div", {
983
992
  className: "flex items-center justify-end gap-2",
984
- children: [/* @__PURE__ */ H("button", {
993
+ children: [/* @__PURE__ */ U("button", {
985
994
  type: "button",
986
995
  onClick: () => M(null),
987
996
  className: "rounded-md bg-muted px-4 py-2 text-sm font-medium text-muted-foreground hover:bg-muted/70",
988
- children: S.cancel
989
- }), /* @__PURE__ */ H("button", {
997
+ children: x.cancel
998
+ }), /* @__PURE__ */ U("button", {
990
999
  type: "button",
991
1000
  onClick: () => {
992
1001
  L(j.task, j.toStatus), M(null);
993
1002
  },
994
1003
  className: "rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:brightness-110",
995
- children: S.moveConfirm
1004
+ children: x.moveConfirm
996
1005
  })]
997
1006
  })
998
1007
  ]
@@ -1001,27 +1010,27 @@ function it({ projectId: e, columns: t = Pe, readonly: n, confirmMove: r = !0, h
1001
1010
  ]
1002
1011
  });
1003
1012
  }
1004
- var at = "TASK", ot = "BACKLOG", st = "NONE", X = "w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring", Z = "text-sm font-medium text-foreground";
1005
- function ct({ projectId: e, assigneeOptions: t, hiddenFields: n, defaultValues: r, hideHeader: i, submitLabel: a, onCreated: o, onError: s, onCancel: c, className: l, workspaceId: u }) {
1006
- let d = ae(), f = u ?? d?.workspaceId, p = e ?? r?.projectId, m = Y(), h = b(() => new Set(n ?? []), [n]), [g, _] = x(r?.title ?? ""), [v, y] = x(r?.description ?? ""), [S, C] = x(r?.type ?? at), [w, T] = x(r?.status ?? ot), [E, D] = x(r?.priority ?? st), [O, k] = x(r?.assigneeId ?? ""), [A, j] = x(r?.dueDate ?? ""), [M, N] = x((r?.labels ?? []).join(", ")), [P, F] = x(r?.storyPoints == null ? "" : String(r.storyPoints)), [I, { loading: L, error: R }] = K(de), z = !!(f && p && g.trim()), B = async (e) => {
1013
+ var ot = "TASK", st = "BACKLOG", ct = "NONE", X = "w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring", Z = "text-sm font-medium text-foreground";
1014
+ function lt({ projectId: e, assigneeOptions: t, hiddenFields: n, defaultValues: r, hideHeader: i, submitLabel: a, onCreated: o, onError: s, onCancel: c, className: l, workspaceId: u }) {
1015
+ let d = oe(), f = u ?? d?.workspaceId, p = e ?? r?.projectId, m = Y(), h = b(() => new Set(n ?? []), [n]), [g, _] = S(r?.title ?? ""), [v, y] = S(r?.description ?? ""), [x, C] = S(r?.type ?? ot), [w, T] = S(r?.status ?? st), [E, D] = S(r?.priority ?? ct), [O, k] = S(r?.assigneeId ?? ""), [A, j] = S(r?.dueDate ?? ""), [M, N] = S((r?.labels ?? []).join(", ")), [P, F] = S(r?.storyPoints == null ? "" : String(r.storyPoints)), [I, { loading: L, error: R }] = ne(fe), z = !!(f && p && g.trim()), B = async (e) => {
1007
1016
  if (e.preventDefault(), !z || !p) return;
1008
1017
  let t = M.split(",").map((e) => e.trim()).filter(Boolean), n = P.trim() ? Number(P) : void 0, i = {
1009
1018
  projectId: p,
1010
1019
  title: g.trim(),
1011
- type: S,
1020
+ type: x,
1012
1021
  ...r?.parentId ? { parentId: r.parentId } : {},
1013
1022
  ...h.has("status") ? {} : { status: w },
1014
1023
  ...h.has("priority") ? {} : { priority: E },
1015
1024
  ...h.has("description") || !v.trim() ? {} : { description: v.trim() },
1016
1025
  ...h.has("assignee") || !O.trim() ? {} : { assigneeId: O.trim() },
1017
- ...h.has("dueDate") || !A.trim() ? {} : { dueDate: Ce(A) },
1026
+ ...h.has("dueDate") || !A.trim() ? {} : { dueDate: we(A) },
1018
1027
  ...h.has("labels") || t.length === 0 ? {} : { labels: t },
1019
1028
  ...h.has("storyPoints") || n == null || Number.isNaN(n) ? {} : { storyPoints: n }
1020
1029
  };
1021
1030
  try {
1022
1031
  let e = (await I({ variables: { input: i } })).data?.planmagnetCreateWorkItem;
1023
1032
  if (e) {
1024
- let t = re();
1033
+ let t = ie();
1025
1034
  try {
1026
1035
  await t.onTaskSaved?.({
1027
1036
  id: e.id,
@@ -1038,34 +1047,34 @@ function ct({ projectId: e, assigneeOptions: t, hiddenFields: n, defaultValues:
1038
1047
  }
1039
1048
  };
1040
1049
  function V() {
1041
- _(""), y(""), C(at), T(ot), D(st), k(""), j(""), N(""), F("");
1050
+ _(""), y(""), C(ot), T(st), D(ct), k(""), j(""), N(""), F("");
1042
1051
  }
1043
- return f ? /* @__PURE__ */ H(W, {
1052
+ return f ? /* @__PURE__ */ U(ee, {
1044
1053
  className: J("shadow-sm", l),
1045
- children: /* @__PURE__ */ H(ee, {
1054
+ children: /* @__PURE__ */ U(G, {
1046
1055
  className: "p-6",
1047
- children: /* @__PURE__ */ U("form", {
1056
+ children: /* @__PURE__ */ W("form", {
1048
1057
  onSubmit: B,
1049
1058
  className: "space-y-4",
1050
1059
  children: [
1051
- !i && /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("h2", {
1060
+ !i && /* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("h2", {
1052
1061
  className: "text-xl font-semibold text-foreground",
1053
1062
  children: m.newTaskHeading
1054
- }), /* @__PURE__ */ H("p", {
1063
+ }), /* @__PURE__ */ U("p", {
1055
1064
  className: "text-sm text-muted-foreground",
1056
1065
  children: m.newTaskSubtitle
1057
1066
  })] }),
1058
- !p && /* @__PURE__ */ H("p", {
1067
+ !p && /* @__PURE__ */ U("p", {
1059
1068
  className: "rounded-md bg-destructive/10 p-2 text-xs text-destructive",
1060
1069
  children: m.projectRequired
1061
1070
  }),
1062
- /* @__PURE__ */ U("div", {
1071
+ /* @__PURE__ */ W("div", {
1063
1072
  className: "space-y-1",
1064
- children: [/* @__PURE__ */ H("label", {
1073
+ children: [/* @__PURE__ */ U("label", {
1065
1074
  htmlFor: "pm-title",
1066
1075
  className: Z,
1067
1076
  children: m.title
1068
- }), /* @__PURE__ */ H("input", {
1077
+ }), /* @__PURE__ */ U("input", {
1069
1078
  id: "pm-title",
1070
1079
  className: X,
1071
1080
  value: g,
@@ -1074,13 +1083,13 @@ function ct({ projectId: e, assigneeOptions: t, hiddenFields: n, defaultValues:
1074
1083
  required: !0
1075
1084
  })]
1076
1085
  }),
1077
- !h.has("description") && /* @__PURE__ */ U("div", {
1086
+ !h.has("description") && /* @__PURE__ */ W("div", {
1078
1087
  className: "space-y-1",
1079
- children: [/* @__PURE__ */ H("label", {
1088
+ children: [/* @__PURE__ */ U("label", {
1080
1089
  htmlFor: "pm-description",
1081
1090
  className: Z,
1082
1091
  children: m.description
1083
- }), /* @__PURE__ */ H("textarea", {
1092
+ }), /* @__PURE__ */ U("textarea", {
1084
1093
  id: "pm-description",
1085
1094
  className: J(X, "min-h-[80px]"),
1086
1095
  value: v,
@@ -1088,79 +1097,79 @@ function ct({ projectId: e, assigneeOptions: t, hiddenFields: n, defaultValues:
1088
1097
  placeholder: m.descriptionPlaceholder
1089
1098
  })]
1090
1099
  }),
1091
- /* @__PURE__ */ U("div", {
1100
+ /* @__PURE__ */ W("div", {
1092
1101
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
1093
1102
  children: [
1094
- !h.has("type") && /* @__PURE__ */ U("div", {
1103
+ !h.has("type") && /* @__PURE__ */ W("div", {
1095
1104
  className: "space-y-1",
1096
- children: [/* @__PURE__ */ H("label", {
1105
+ children: [/* @__PURE__ */ U("label", {
1097
1106
  htmlFor: "pm-type",
1098
1107
  className: Z,
1099
1108
  children: m.typeLabel
1100
- }), /* @__PURE__ */ H("select", {
1109
+ }), /* @__PURE__ */ U("select", {
1101
1110
  id: "pm-type",
1102
1111
  className: J(X, "capitalize"),
1103
- value: S,
1112
+ value: x,
1104
1113
  onChange: (e) => C(e.target.value),
1105
- children: Ie.map((e) => /* @__PURE__ */ H("option", {
1114
+ children: Le.map((e) => /* @__PURE__ */ U("option", {
1106
1115
  value: e,
1107
1116
  children: m.type[e]
1108
1117
  }, e))
1109
1118
  })]
1110
1119
  }),
1111
- !h.has("status") && /* @__PURE__ */ U("div", {
1120
+ !h.has("status") && /* @__PURE__ */ W("div", {
1112
1121
  className: "space-y-1",
1113
- children: [/* @__PURE__ */ H("label", {
1122
+ children: [/* @__PURE__ */ U("label", {
1114
1123
  htmlFor: "pm-status",
1115
1124
  className: Z,
1116
1125
  children: m.statusLabel
1117
- }), /* @__PURE__ */ H("select", {
1126
+ }), /* @__PURE__ */ U("select", {
1118
1127
  id: "pm-status",
1119
1128
  className: J(X, "capitalize"),
1120
1129
  value: w,
1121
1130
  onChange: (e) => T(e.target.value),
1122
- children: Le.map((e) => /* @__PURE__ */ H("option", {
1131
+ children: Re.map((e) => /* @__PURE__ */ U("option", {
1123
1132
  value: e,
1124
1133
  children: m.status[e]
1125
1134
  }, e))
1126
1135
  })]
1127
1136
  }),
1128
- !h.has("priority") && /* @__PURE__ */ U("div", {
1137
+ !h.has("priority") && /* @__PURE__ */ W("div", {
1129
1138
  className: "space-y-1",
1130
- children: [/* @__PURE__ */ H("label", {
1139
+ children: [/* @__PURE__ */ U("label", {
1131
1140
  htmlFor: "pm-priority",
1132
1141
  className: Z,
1133
1142
  children: m.priorityLabel
1134
- }), /* @__PURE__ */ H("select", {
1143
+ }), /* @__PURE__ */ U("select", {
1135
1144
  id: "pm-priority",
1136
1145
  className: J(X, "capitalize"),
1137
1146
  value: E,
1138
1147
  onChange: (e) => D(e.target.value),
1139
- children: Fe.map((e) => /* @__PURE__ */ H("option", {
1148
+ children: Ie.map((e) => /* @__PURE__ */ U("option", {
1140
1149
  value: e,
1141
1150
  children: m.priority[e]
1142
1151
  }, e))
1143
1152
  })]
1144
1153
  }),
1145
- !h.has("assignee") && /* @__PURE__ */ U("div", {
1154
+ !h.has("assignee") && /* @__PURE__ */ W("div", {
1146
1155
  className: "space-y-1",
1147
- children: [/* @__PURE__ */ H("label", {
1156
+ children: [/* @__PURE__ */ U("label", {
1148
1157
  htmlFor: "pm-assignee",
1149
1158
  className: Z,
1150
1159
  children: m.assigneeLabel
1151
- }), t && t.length > 0 ? /* @__PURE__ */ U("select", {
1160
+ }), t && t.length > 0 ? /* @__PURE__ */ W("select", {
1152
1161
  id: "pm-assignee",
1153
1162
  className: X,
1154
1163
  value: O,
1155
1164
  onChange: (e) => k(e.target.value),
1156
- children: [/* @__PURE__ */ H("option", {
1165
+ children: [/* @__PURE__ */ U("option", {
1157
1166
  value: "",
1158
1167
  children: m.unassigned
1159
- }), t.map((e) => /* @__PURE__ */ H("option", {
1168
+ }), t.map((e) => /* @__PURE__ */ U("option", {
1160
1169
  value: e.id,
1161
1170
  children: e.name
1162
1171
  }, e.id))]
1163
- }) : /* @__PURE__ */ H("input", {
1172
+ }) : /* @__PURE__ */ U("input", {
1164
1173
  id: "pm-assignee",
1165
1174
  className: X,
1166
1175
  value: O,
@@ -1168,13 +1177,13 @@ function ct({ projectId: e, assigneeOptions: t, hiddenFields: n, defaultValues:
1168
1177
  placeholder: m.assigneePlaceholder
1169
1178
  })]
1170
1179
  }),
1171
- !h.has("dueDate") && /* @__PURE__ */ U("div", {
1180
+ !h.has("dueDate") && /* @__PURE__ */ W("div", {
1172
1181
  className: "space-y-1",
1173
- children: [/* @__PURE__ */ H("label", {
1182
+ children: [/* @__PURE__ */ U("label", {
1174
1183
  htmlFor: "pm-due",
1175
1184
  className: Z,
1176
1185
  children: m.dueDateLabel
1177
- }), /* @__PURE__ */ H("input", {
1186
+ }), /* @__PURE__ */ U("input", {
1178
1187
  id: "pm-due",
1179
1188
  type: "date",
1180
1189
  className: X,
@@ -1182,13 +1191,13 @@ function ct({ projectId: e, assigneeOptions: t, hiddenFields: n, defaultValues:
1182
1191
  onChange: (e) => j(e.target.value)
1183
1192
  })]
1184
1193
  }),
1185
- !h.has("storyPoints") && /* @__PURE__ */ U("div", {
1194
+ !h.has("storyPoints") && /* @__PURE__ */ W("div", {
1186
1195
  className: "space-y-1",
1187
- children: [/* @__PURE__ */ H("label", {
1196
+ children: [/* @__PURE__ */ U("label", {
1188
1197
  htmlFor: "pm-points",
1189
1198
  className: Z,
1190
1199
  children: m.storyPointsLabel
1191
- }), /* @__PURE__ */ H("input", {
1200
+ }), /* @__PURE__ */ U("input", {
1192
1201
  id: "pm-points",
1193
1202
  type: "number",
1194
1203
  min: 0,
@@ -1200,13 +1209,13 @@ function ct({ projectId: e, assigneeOptions: t, hiddenFields: n, defaultValues:
1200
1209
  })
1201
1210
  ]
1202
1211
  }),
1203
- !h.has("labels") && /* @__PURE__ */ U("div", {
1212
+ !h.has("labels") && /* @__PURE__ */ W("div", {
1204
1213
  className: "space-y-1",
1205
- children: [/* @__PURE__ */ H("label", {
1214
+ children: [/* @__PURE__ */ U("label", {
1206
1215
  htmlFor: "pm-labels",
1207
1216
  className: Z,
1208
1217
  children: m.labelsLabel
1209
- }), /* @__PURE__ */ H("input", {
1218
+ }), /* @__PURE__ */ U("input", {
1210
1219
  id: "pm-labels",
1211
1220
  className: X,
1212
1221
  value: M,
@@ -1214,7 +1223,7 @@ function ct({ projectId: e, assigneeOptions: t, hiddenFields: n, defaultValues:
1214
1223
  placeholder: m.labelsPlaceholder
1215
1224
  })]
1216
1225
  }),
1217
- R && /* @__PURE__ */ U("p", {
1226
+ R && /* @__PURE__ */ W("p", {
1218
1227
  className: "text-sm text-destructive",
1219
1228
  children: [
1220
1229
  m.failedToCreate,
@@ -1222,14 +1231,14 @@ function ct({ projectId: e, assigneeOptions: t, hiddenFields: n, defaultValues:
1222
1231
  R.message
1223
1232
  ]
1224
1233
  }),
1225
- /* @__PURE__ */ U("div", {
1234
+ /* @__PURE__ */ W("div", {
1226
1235
  className: "flex items-center justify-end gap-2",
1227
- children: [c && /* @__PURE__ */ H("button", {
1236
+ children: [c && /* @__PURE__ */ U("button", {
1228
1237
  type: "button",
1229
1238
  onClick: c,
1230
1239
  className: "rounded-md bg-muted px-4 py-2 text-sm font-medium text-muted-foreground hover:bg-muted/70",
1231
1240
  children: m.cancel
1232
- }), /* @__PURE__ */ H("button", {
1241
+ }), /* @__PURE__ */ U("button", {
1233
1242
  type: "submit",
1234
1243
  disabled: !z || L,
1235
1244
  className: J("rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground", (!z || L) && "cursor-not-allowed opacity-50"),
@@ -1239,25 +1248,25 @@ function ct({ projectId: e, assigneeOptions: t, hiddenFields: n, defaultValues:
1239
1248
  ]
1240
1249
  })
1241
1250
  })
1242
- }) : /* @__PURE__ */ H("div", {
1251
+ }) : /* @__PURE__ */ U("div", {
1243
1252
  className: J("p-6 text-sm text-destructive", l),
1244
1253
  children: "CreateTask: no workspaceId provided (prop or PlanMagnetProvider)."
1245
1254
  });
1246
1255
  }
1247
- var lt = [
1256
+ var ut = [
1248
1257
  "title",
1249
1258
  "status",
1250
1259
  "priority",
1251
1260
  "assignee",
1252
1261
  "dueDate",
1253
1262
  "storyPoints"
1254
- ], ut = {
1263
+ ], dt = {
1255
1264
  CRITICAL: 0,
1256
1265
  HIGH: 1,
1257
1266
  MEDIUM: 2,
1258
1267
  LOW: 3,
1259
1268
  NONE: 4
1260
- }, dt = {
1269
+ }, ft = {
1261
1270
  BACKLOG: 0,
1262
1271
  TODO: 1,
1263
1272
  IN_PROGRESS: 2,
@@ -1266,7 +1275,7 @@ var lt = [
1266
1275
  DONE: 5,
1267
1276
  CANCELLED: 6
1268
1277
  };
1269
- function ft(e, t) {
1278
+ function pt(e, t) {
1270
1279
  switch (e) {
1271
1280
  case "key": return t.colKey;
1272
1281
  case "title": return t.colTask;
@@ -1281,7 +1290,7 @@ function ft(e, t) {
1281
1290
  default: return e;
1282
1291
  }
1283
1292
  }
1284
- var pt = {
1293
+ var mt = {
1285
1294
  title: "title",
1286
1295
  type: "type",
1287
1296
  status: "status",
@@ -1289,8 +1298,8 @@ var pt = {
1289
1298
  dueDate: "dueDate",
1290
1299
  storyPoints: "storyPoints"
1291
1300
  };
1292
- function mt({ projectId: e, status: t, type: n, priority: r, assigneeId: i, search: a, columns: o = lt, sortBy: s, sortDir: c = "asc", hideHeader: l, onSelect: u, resolveAssignee: d, linkSourceProduct: f, renderLinkIcon: p, limit: m = 200, className: h, workspaceId: g }) {
1293
- let _ = ae(), v = g ?? _?.workspaceId, { linksByItem: y } = rt(v, f), S = Y(), [C, T] = x({
1301
+ function ht({ projectId: e, status: t, type: n, priority: r, assigneeId: i, search: a, columns: o = ut, sortBy: s, sortDir: c = "asc", hideHeader: l, onSelect: u, resolveAssignee: d, linkSourceProduct: f, renderLinkIcon: p, limit: m = 200, className: h, workspaceId: g }) {
1302
+ let _ = oe(), v = g ?? _?.workspaceId, { linksByItem: y } = it(v, f), x = Y(), [C, w] = S({
1294
1303
  by: s ?? null,
1295
1304
  dir: c
1296
1305
  }), E = b(() => {
@@ -1303,7 +1312,7 @@ function mt({ projectId: e, status: t, type: n, priority: r, assigneeId: i, sear
1303
1312
  r,
1304
1313
  i,
1305
1314
  a
1306
- ]), { data: O, loading: k, error: A } = q(le, {
1315
+ ]), { data: D, loading: k, error: A } = q(ue, {
1307
1316
  variables: {
1308
1317
  workspaceId: v,
1309
1318
  ...Object.keys(E).length ? { filter: E } : {},
@@ -1311,13 +1320,13 @@ function mt({ projectId: e, status: t, type: n, priority: r, assigneeId: i, sear
1311
1320
  },
1312
1321
  skip: !v
1313
1322
  }), j = b(() => {
1314
- let e = O?.planmagnetWorkItems?.items ?? [];
1323
+ let e = D?.planmagnetWorkItems?.items ?? [];
1315
1324
  if (!C.by) return e;
1316
1325
  let t = C.dir === "desc" ? -1 : 1, n = C.by;
1317
- return [...e].sort((e, r) => t * gt(e, r, n));
1318
- }, [O, C]), M = (e) => {
1319
- let t = pt[e];
1320
- t && T((e) => e.by === t ? {
1326
+ return [...e].sort((e, r) => t * _t(e, r, n));
1327
+ }, [D, C]), M = (e) => {
1328
+ let t = mt[e];
1329
+ t && w((e) => e.by === t ? {
1321
1330
  by: t,
1322
1331
  dir: e.dir === "asc" ? "desc" : "asc"
1323
1332
  } : {
@@ -1325,148 +1334,148 @@ function mt({ projectId: e, status: t, type: n, priority: r, assigneeId: i, sear
1325
1334
  dir: "asc"
1326
1335
  });
1327
1336
  };
1328
- return v ? k && !O ? /* @__PURE__ */ H("div", {
1337
+ return v ? k && !D ? /* @__PURE__ */ U("div", {
1329
1338
  className: J("flex items-center justify-center p-12", h),
1330
- children: /* @__PURE__ */ H("div", { className: "h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent" })
1331
- }) : A && !O ? /* @__PURE__ */ U("div", {
1339
+ children: /* @__PURE__ */ U("div", { className: "h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent" })
1340
+ }) : A && !D ? /* @__PURE__ */ W("div", {
1332
1341
  className: J("p-6 text-sm text-destructive", h),
1333
1342
  children: [
1334
- S.errorLoading,
1343
+ x.errorLoading,
1335
1344
  ": ",
1336
1345
  A.message
1337
1346
  ]
1338
- }) : /* @__PURE__ */ U("div", {
1347
+ }) : /* @__PURE__ */ W("div", {
1339
1348
  className: J("space-y-3", h),
1340
- children: [!l && /* @__PURE__ */ U("div", {
1349
+ children: [!l && /* @__PURE__ */ W("div", {
1341
1350
  className: "flex items-baseline justify-between",
1342
- children: [/* @__PURE__ */ H("h2", {
1351
+ children: [/* @__PURE__ */ U("h2", {
1343
1352
  className: "text-lg font-semibold text-foreground",
1344
- children: S.list
1345
- }), /* @__PURE__ */ U("span", {
1353
+ children: x.list
1354
+ }), /* @__PURE__ */ W("span", {
1346
1355
  className: "text-sm text-muted-foreground",
1347
1356
  children: [
1348
1357
  j.length,
1349
1358
  " ",
1350
- j.length === 1 ? S.tasksSingular : S.tasksPlural
1359
+ j.length === 1 ? x.tasksSingular : x.tasksPlural
1351
1360
  ]
1352
1361
  })]
1353
- }), /* @__PURE__ */ H("div", {
1362
+ }), /* @__PURE__ */ U("div", {
1354
1363
  className: "overflow-x-auto rounded-lg border border-border",
1355
- children: /* @__PURE__ */ U("table", {
1364
+ children: /* @__PURE__ */ W("table", {
1356
1365
  className: "w-full border-collapse text-sm",
1357
- children: [/* @__PURE__ */ H("thead", { children: /* @__PURE__ */ H("tr", {
1366
+ children: [/* @__PURE__ */ U("thead", { children: /* @__PURE__ */ U("tr", {
1358
1367
  className: "border-b border-border bg-muted/50 text-left",
1359
1368
  children: o.map((e) => {
1360
- let t = !!pt[e], n = C.by === pt[e];
1361
- return /* @__PURE__ */ H("th", {
1369
+ let t = !!mt[e], n = C.by === mt[e];
1370
+ return /* @__PURE__ */ U("th", {
1362
1371
  onClick: t ? () => M(e) : void 0,
1363
1372
  className: J("px-3 py-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground", t && "cursor-pointer select-none hover:text-foreground"),
1364
- children: /* @__PURE__ */ U("span", {
1373
+ children: /* @__PURE__ */ W("span", {
1365
1374
  className: "inline-flex items-center gap-1",
1366
- children: [ft(e, S), n && (C.dir === "asc" ? /* @__PURE__ */ H(D, {
1375
+ children: [pt(e, x), n && (C.dir === "asc" ? /* @__PURE__ */ U(O, {
1367
1376
  className: "h-3 w-3",
1368
1377
  "aria-hidden": "true"
1369
- }) : /* @__PURE__ */ H(w, {
1378
+ }) : /* @__PURE__ */ U(T, {
1370
1379
  className: "h-3 w-3",
1371
1380
  "aria-hidden": "true"
1372
1381
  }))]
1373
1382
  })
1374
1383
  }, e);
1375
1384
  })
1376
- }) }), /* @__PURE__ */ U("tbody", { children: [j.length === 0 && /* @__PURE__ */ H("tr", { children: /* @__PURE__ */ H("td", {
1385
+ }) }), /* @__PURE__ */ W("tbody", { children: [j.length === 0 && /* @__PURE__ */ U("tr", { children: /* @__PURE__ */ U("td", {
1377
1386
  colSpan: o.length,
1378
1387
  className: "px-3 py-8 text-center text-muted-foreground",
1379
- children: S.noTasksFound
1380
- }) }), j.map((e) => /* @__PURE__ */ H("tr", {
1388
+ children: x.noTasksFound
1389
+ }) }), j.map((e) => /* @__PURE__ */ U("tr", {
1381
1390
  onClick: u ? () => u(e.id) : void 0,
1382
1391
  className: J("border-b border-border last:border-0", u && "cursor-pointer hover:bg-muted/40"),
1383
- children: o.map((t) => /* @__PURE__ */ H("td", {
1392
+ children: o.map((t) => /* @__PURE__ */ U("td", {
1384
1393
  className: "px-3 py-2 align-middle text-foreground",
1385
- children: ht(t, e, {
1394
+ children: gt(t, e, {
1386
1395
  resolveAssignee: d,
1387
1396
  links: y.get(e.id),
1388
1397
  renderLinkIcon: p,
1389
- unassigned: S.unassigned
1398
+ unassigned: x.unassigned
1390
1399
  })
1391
1400
  }, t))
1392
1401
  }, e.id))] })]
1393
1402
  })
1394
1403
  })]
1395
- }) : /* @__PURE__ */ H("div", {
1404
+ }) : /* @__PURE__ */ U("div", {
1396
1405
  className: J("p-6 text-sm text-destructive", h),
1397
1406
  children: "TaskList: no workspaceId provided (prop or PlanMagnetProvider)."
1398
1407
  });
1399
1408
  }
1400
- function ht(e, t, n) {
1409
+ function gt(e, t, n) {
1401
1410
  let { resolveAssignee: r, links: i, renderLinkIcon: a, unassigned: o } = n;
1402
1411
  switch (e) {
1403
- case "key": return /* @__PURE__ */ H("span", {
1412
+ case "key": return /* @__PURE__ */ U("span", {
1404
1413
  className: "font-mono text-xs text-muted-foreground",
1405
1414
  children: t.key
1406
1415
  });
1407
- case "title": return /* @__PURE__ */ U("div", {
1416
+ case "title": return /* @__PURE__ */ W("div", {
1408
1417
  className: "flex flex-col",
1409
- children: [/* @__PURE__ */ H("span", {
1418
+ children: [/* @__PURE__ */ U("span", {
1410
1419
  className: "font-medium text-foreground",
1411
1420
  children: t.title
1412
- }), /* @__PURE__ */ H("span", {
1421
+ }), /* @__PURE__ */ U("span", {
1413
1422
  className: "font-mono text-[10px] uppercase text-muted-foreground",
1414
1423
  children: t.key
1415
1424
  })]
1416
1425
  });
1417
- case "type": return /* @__PURE__ */ H(Ze, { type: t.type });
1418
- case "status": return /* @__PURE__ */ H(Ke, { status: t.status });
1419
- case "priority": return /* @__PURE__ */ H(Ye, {
1426
+ case "type": return /* @__PURE__ */ U(Qe, { type: t.type });
1427
+ case "status": return /* @__PURE__ */ U(qe, { status: t.status });
1428
+ case "priority": return /* @__PURE__ */ U(Xe, {
1420
1429
  priority: t.priority,
1421
1430
  showLabel: !0
1422
1431
  });
1423
1432
  case "assignee": {
1424
1433
  let e = t.assigneeId ? r?.(t.assigneeId) : null;
1425
- return /* @__PURE__ */ U("span", {
1434
+ return /* @__PURE__ */ W("span", {
1426
1435
  className: "flex items-center gap-1.5",
1427
- children: [/* @__PURE__ */ H(Ne, {
1436
+ children: [/* @__PURE__ */ U(Pe, {
1428
1437
  id: t.assigneeId,
1429
1438
  name: e?.name,
1430
1439
  size: "sm"
1431
- }), /* @__PURE__ */ H("span", {
1440
+ }), /* @__PURE__ */ U("span", {
1432
1441
  className: "text-xs text-muted-foreground",
1433
1442
  children: e?.name ?? (t.assigneeId ? "" : o)
1434
1443
  })]
1435
1444
  });
1436
1445
  }
1437
1446
  case "dueDate": {
1438
- let e = we(t.dueDate);
1439
- return e ? /* @__PURE__ */ H("span", {
1440
- className: J("text-xs", Ee(t.dueDate, t.status) ? "font-medium text-destructive" : "text-muted-foreground"),
1447
+ let e = Te(t.dueDate);
1448
+ return e ? /* @__PURE__ */ U("span", {
1449
+ className: J("text-xs", De(t.dueDate, t.status) ? "font-medium text-destructive" : "text-muted-foreground"),
1441
1450
  children: e
1442
- }) : /* @__PURE__ */ H("span", {
1451
+ }) : /* @__PURE__ */ U("span", {
1443
1452
  className: "text-muted-foreground",
1444
1453
  children: "—"
1445
1454
  });
1446
1455
  }
1447
- case "storyPoints": return t.storyPoints == null ? /* @__PURE__ */ H("span", {
1456
+ case "storyPoints": return t.storyPoints == null ? /* @__PURE__ */ U("span", {
1448
1457
  className: "text-muted-foreground",
1449
1458
  children: "—"
1450
- }) : /* @__PURE__ */ H("span", {
1459
+ }) : /* @__PURE__ */ U("span", {
1451
1460
  className: "flex h-5 min-w-5 items-center justify-center rounded-full bg-primary/10 px-1 text-[10px] font-semibold text-primary",
1452
1461
  children: t.storyPoints
1453
1462
  });
1454
- case "linkedRecord": return !i || i.length === 0 ? /* @__PURE__ */ H("span", {
1463
+ case "linkedRecord": return !i || i.length === 0 ? /* @__PURE__ */ U("span", {
1455
1464
  className: "text-muted-foreground",
1456
1465
  children: "—"
1457
- }) : /* @__PURE__ */ U("div", {
1466
+ }) : /* @__PURE__ */ W("div", {
1458
1467
  className: "flex flex-wrap gap-1",
1459
- children: [i.slice(0, 2).map((e) => /* @__PURE__ */ H(ze, {
1468
+ children: [i.slice(0, 2).map((e) => /* @__PURE__ */ U(Be, {
1460
1469
  link: e,
1461
1470
  renderIcon: a
1462
- }, e.id)), i.length > 2 && /* @__PURE__ */ U("span", {
1471
+ }, e.id)), i.length > 2 && /* @__PURE__ */ W("span", {
1463
1472
  className: "text-[10px] text-muted-foreground",
1464
1473
  children: ["+", i.length - 2]
1465
1474
  })]
1466
1475
  });
1467
- case "labels": return /* @__PURE__ */ H("div", {
1476
+ case "labels": return /* @__PURE__ */ U("div", {
1468
1477
  className: "flex flex-wrap gap-1",
1469
- children: (t.labels ?? []).slice(0, 3).map((e) => /* @__PURE__ */ H("span", {
1478
+ children: (t.labels ?? []).slice(0, 3).map((e) => /* @__PURE__ */ U("span", {
1470
1479
  className: "rounded bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground",
1471
1480
  children: e
1472
1481
  }, e))
@@ -1474,10 +1483,10 @@ function ht(e, t, n) {
1474
1483
  default: return null;
1475
1484
  }
1476
1485
  }
1477
- function gt(e, t, n) {
1486
+ function _t(e, t, n) {
1478
1487
  switch (n) {
1479
- case "priority": return ut[e.priority] - ut[t.priority];
1480
- case "status": return dt[e.status] - dt[t.status];
1488
+ case "priority": return dt[e.priority] - dt[t.priority];
1489
+ case "status": return ft[e.status] - ft[t.status];
1481
1490
  case "title": return e.title.localeCompare(t.title);
1482
1491
  case "type": return e.type.localeCompare(t.type);
1483
1492
  case "dueDate": return (e.dueDate ?? "").localeCompare(t.dueDate ?? "");
@@ -1485,8 +1494,8 @@ function gt(e, t, n) {
1485
1494
  default: return 0;
1486
1495
  }
1487
1496
  }
1488
- function _t(e, t = {}) {
1489
- let { projectId: n, enabled: r = !0, limit: i = 100 } = t, { data: a, loading: o } = q(he, {
1497
+ function vt(e, t = {}) {
1498
+ let { projectId: n, enabled: r = !0, limit: i = 100 } = t, { data: a, loading: o } = q(ge, {
1490
1499
  variables: {
1491
1500
  workspaceId: e,
1492
1501
  ...n ? { filter: { projectId: n } } : {},
@@ -1500,7 +1509,7 @@ function _t(e, t = {}) {
1500
1509
  byDay: b(() => {
1501
1510
  let e = /* @__PURE__ */ new Map();
1502
1511
  for (let t of s) {
1503
- let n = Se(t.dueDate);
1512
+ let n = Ce(t.dueDate);
1504
1513
  if (!n) continue;
1505
1514
  let r = `${n.getFullYear()}-${String(n.getMonth() + 1).padStart(2, "0")}-${String(n.getDate()).padStart(2, "0")}`, i = e.get(r);
1506
1515
  i ? i.push(t) : e.set(r, [t]);
@@ -1510,15 +1519,15 @@ function _t(e, t = {}) {
1510
1519
  loading: o
1511
1520
  };
1512
1521
  }
1513
- var vt = { weekStartsOn: 1 };
1514
- function yt(e) {
1522
+ var yt = { weekStartsOn: 1 };
1523
+ function bt(e) {
1515
1524
  return d(e, "yyyy-MM-dd");
1516
1525
  }
1517
- function bt({ projectId: e, priority: t = "ALL", type: i = "ALL", search: o = "", assigneeId: m, defaultMode: h = "week", onSelect: g, resolveAssignee: _, showMilestones: v = !0, className: y, workspaceId: S }) {
1518
- let C = ae(), w = S ?? C?.workspaceId, D = Y(), { milestones: O, byDay: k } = _t(w, {
1526
+ function xt({ projectId: e, priority: t = "ALL", type: i = "ALL", search: o = "", assigneeId: m, defaultMode: h = "week", onSelect: g, resolveAssignee: _, showMilestones: v = !0, className: y, workspaceId: x }) {
1527
+ let C = oe(), w = x ?? C?.workspaceId, T = Y(), { milestones: O, byDay: k } = vt(w, {
1519
1528
  projectId: e,
1520
1529
  enabled: v
1521
- }), [A, j] = x(h), [M, N] = x(0), { data: F, loading: I, error: L } = q(le, {
1530
+ }), [A, j] = S(h), [M, N] = S(0), { data: P, loading: I, error: L } = q(ue, {
1522
1531
  variables: {
1523
1532
  workspaceId: w,
1524
1533
  ...e ? { filter: { projectId: e } } : {},
@@ -1526,22 +1535,22 @@ function bt({ projectId: e, priority: t = "ALL", type: i = "ALL", search: o = ""
1526
1535
  },
1527
1536
  skip: !w
1528
1537
  }), R = b(() => {
1529
- let e = F?.planmagnetWorkItems?.items ?? [], n = o.trim().toLowerCase();
1538
+ let e = P?.planmagnetWorkItems?.items ?? [], n = o.trim().toLowerCase();
1530
1539
  return e.filter((e) => !(t !== "ALL" && e.priority !== t || i !== "ALL" && e.type !== i || m && e.assigneeId !== m || n && ![
1531
1540
  e.title,
1532
1541
  e.key,
1533
1542
  ...e.labels ?? []
1534
1543
  ].join(" ").toLowerCase().includes(n)));
1535
1544
  }, [
1536
- F,
1545
+ P,
1537
1546
  t,
1538
1547
  i,
1539
1548
  o,
1540
1549
  m
1541
- ]), { anchor: z, rangeStart: B, rangeEnd: V, days: W } = b(() => {
1550
+ ]), { anchor: z, rangeStart: B, rangeEnd: V, days: H } = b(() => {
1542
1551
  let e = /* @__PURE__ */ new Date();
1543
1552
  if (A === "week") {
1544
- let t = a(e, M), n = r(t, vt), i = u(t, vt);
1553
+ let t = a(e, M), n = r(t, yt), i = u(t, yt);
1545
1554
  return {
1546
1555
  anchor: t,
1547
1556
  rangeStart: n,
@@ -1552,7 +1561,7 @@ function bt({ projectId: e, priority: t = "ALL", type: i = "ALL", search: o = ""
1552
1561
  })
1553
1562
  };
1554
1563
  }
1555
- let t = n(e, M), i = r(l(t), vt), o = u(s(t), vt);
1564
+ let t = n(e, M), i = r(l(t), yt), o = u(s(t), yt);
1556
1565
  return {
1557
1566
  anchor: t,
1558
1567
  rangeStart: i,
@@ -1562,19 +1571,19 @@ function bt({ projectId: e, priority: t = "ALL", type: i = "ALL", search: o = ""
1562
1571
  end: o
1563
1572
  })
1564
1573
  };
1565
- }, [A, M]), { byDay: ee, overdue: G, undated: te } = b(() => {
1574
+ }, [A, M]), { byDay: ee, overdue: G, undated: K } = b(() => {
1566
1575
  let e = /* @__PURE__ */ new Map(), t = [], n = [];
1567
1576
  for (let r of R) {
1568
- let i = Se(r.dueDate);
1577
+ let i = Ce(r.dueDate);
1569
1578
  if (!i) {
1570
1579
  n.push(r);
1571
1580
  continue;
1572
1581
  }
1573
- if (Ee(r.dueDate, r.status)) {
1582
+ if (De(r.dueDate, r.status)) {
1574
1583
  t.push(r);
1575
1584
  continue;
1576
1585
  }
1577
- let a = yt(i), o = e.get(a);
1586
+ let a = bt(i), o = e.get(a);
1578
1587
  o ? o.push(r) : e.set(a, [r]);
1579
1588
  }
1580
1589
  return {
@@ -1583,76 +1592,76 @@ function bt({ projectId: e, priority: t = "ALL", type: i = "ALL", search: o = ""
1583
1592
  undated: n
1584
1593
  };
1585
1594
  }, [R]);
1586
- if (!w) return /* @__PURE__ */ H("div", {
1595
+ if (!w) return /* @__PURE__ */ U("div", {
1587
1596
  className: J("p-6 text-sm text-destructive", y),
1588
1597
  children: "Timeline: no workspaceId provided (prop or PlanMagnetProvider)."
1589
1598
  });
1590
- if (I && !F) return /* @__PURE__ */ H("div", {
1599
+ if (I && !P) return /* @__PURE__ */ U("div", {
1591
1600
  className: J("flex items-center justify-center p-12", y),
1592
- children: /* @__PURE__ */ H("div", { className: "h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent" })
1601
+ children: /* @__PURE__ */ U("div", { className: "h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent" })
1593
1602
  });
1594
- if (L && !F) return /* @__PURE__ */ U("div", {
1603
+ if (L && !P) return /* @__PURE__ */ W("div", {
1595
1604
  className: J("p-6 text-sm text-destructive", y),
1596
1605
  children: [
1597
- D.errorLoading,
1606
+ T.errorLoading,
1598
1607
  ": ",
1599
1608
  L.message
1600
1609
  ]
1601
1610
  });
1602
- let K = A === "week" ? `${d(B, "MMM d")} \u2013 ${d(V, "MMM d")}` : d(z, "MMMM yyyy");
1603
- return /* @__PURE__ */ U("div", {
1611
+ let te = A === "week" ? `${d(B, "MMM d")} \u2013 ${d(V, "MMM d")}` : d(z, "MMMM yyyy");
1612
+ return /* @__PURE__ */ W("div", {
1604
1613
  className: J("space-y-3", y),
1605
1614
  children: [
1606
- /* @__PURE__ */ U("div", {
1615
+ /* @__PURE__ */ W("div", {
1607
1616
  className: "flex flex-wrap items-center justify-between gap-2",
1608
- children: [/* @__PURE__ */ U("div", {
1617
+ children: [/* @__PURE__ */ W("div", {
1609
1618
  className: "flex items-center gap-1",
1610
1619
  children: [
1611
- /* @__PURE__ */ H("button", {
1620
+ /* @__PURE__ */ U("button", {
1612
1621
  type: "button",
1613
1622
  onClick: () => N((e) => e - 1),
1614
1623
  "aria-label": "Previous",
1615
1624
  className: "flex h-8 w-8 items-center justify-center rounded-md border border-border text-muted-foreground hover:bg-muted/50",
1616
- children: /* @__PURE__ */ H(T, { className: "h-4 w-4" })
1625
+ children: /* @__PURE__ */ U(E, { className: "h-4 w-4" })
1617
1626
  }),
1618
- /* @__PURE__ */ H("button", {
1627
+ /* @__PURE__ */ U("button", {
1619
1628
  type: "button",
1620
1629
  onClick: () => N(0),
1621
1630
  className: "h-8 rounded-md border border-border px-3 text-xs font-medium text-foreground hover:bg-muted/50",
1622
- children: D.today
1631
+ children: T.today
1623
1632
  }),
1624
- /* @__PURE__ */ H("button", {
1633
+ /* @__PURE__ */ U("button", {
1625
1634
  type: "button",
1626
1635
  onClick: () => N((e) => e + 1),
1627
1636
  "aria-label": "Next",
1628
1637
  className: "flex h-8 w-8 items-center justify-center rounded-md border border-border text-muted-foreground hover:bg-muted/50",
1629
- children: /* @__PURE__ */ H(E, { className: "h-4 w-4" })
1638
+ children: /* @__PURE__ */ U(D, { className: "h-4 w-4" })
1630
1639
  }),
1631
- /* @__PURE__ */ H("span", {
1640
+ /* @__PURE__ */ U("span", {
1632
1641
  className: "ml-2 text-sm font-medium text-foreground",
1633
- children: K
1642
+ children: te
1634
1643
  })
1635
1644
  ]
1636
- }), /* @__PURE__ */ H("div", {
1645
+ }), /* @__PURE__ */ U("div", {
1637
1646
  className: "inline-flex rounded-md border border-border p-0.5",
1638
- children: ["week", "month"].map((e) => /* @__PURE__ */ H("button", {
1647
+ children: ["week", "month"].map((e) => /* @__PURE__ */ U("button", {
1639
1648
  type: "button",
1640
1649
  onClick: () => {
1641
1650
  j(e), N(0);
1642
1651
  },
1643
1652
  className: J("rounded px-3 py-1 text-xs font-medium capitalize transition-colors", A === e ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:text-foreground"),
1644
- children: e === "week" ? D.week : D.month
1653
+ children: e === "week" ? T.week : T.month
1645
1654
  }, e))
1646
1655
  })]
1647
1656
  }),
1648
- G.length > 0 && /* @__PURE__ */ U("div", {
1657
+ G.length > 0 && /* @__PURE__ */ W("div", {
1649
1658
  className: "rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2",
1650
- children: [/* @__PURE__ */ H("p", {
1659
+ children: [/* @__PURE__ */ U("p", {
1651
1660
  className: "mb-1 text-xs font-semibold text-destructive",
1652
- children: D.overdue.replace("{n}", String(G.length))
1653
- }), /* @__PURE__ */ H("div", {
1661
+ children: T.overdue.replace("{n}", String(G.length))
1662
+ }), /* @__PURE__ */ U("div", {
1654
1663
  className: "flex flex-wrap gap-1.5",
1655
- children: G.map((e) => /* @__PURE__ */ H(St, {
1664
+ children: G.map((e) => /* @__PURE__ */ U(Ct, {
1656
1665
  task: e,
1657
1666
  onSelect: g,
1658
1667
  resolveAssignee: _,
@@ -1660,48 +1669,48 @@ function bt({ projectId: e, priority: t = "ALL", type: i = "ALL", search: o = ""
1660
1669
  }, e.id))
1661
1670
  })]
1662
1671
  }),
1663
- O.length > 0 && /* @__PURE__ */ U("div", {
1672
+ O.length > 0 && /* @__PURE__ */ W("div", {
1664
1673
  className: "rounded-md border border-primary/30 bg-primary/5 px-3 py-2",
1665
- children: [/* @__PURE__ */ U("p", {
1674
+ children: [/* @__PURE__ */ W("p", {
1666
1675
  className: "mb-1 flex items-center gap-1 text-xs font-semibold text-primary",
1667
- children: [/* @__PURE__ */ H(P, {
1676
+ children: [/* @__PURE__ */ U(F, {
1668
1677
  className: "h-3.5 w-3.5",
1669
1678
  "aria-hidden": "true"
1670
- }), D.milestones]
1671
- }), /* @__PURE__ */ H("div", {
1679
+ }), T.milestones]
1680
+ }), /* @__PURE__ */ U("div", {
1672
1681
  className: "flex flex-wrap gap-1.5",
1673
- children: O.map((e) => /* @__PURE__ */ H(xt, { milestone: e }, e.id))
1682
+ children: O.map((e) => /* @__PURE__ */ U(St, { milestone: e }, e.id))
1674
1683
  })]
1675
1684
  }),
1676
- A === "week" ? /* @__PURE__ */ H("div", {
1685
+ A === "week" ? /* @__PURE__ */ U("div", {
1677
1686
  className: "grid grid-cols-7 gap-2",
1678
- children: W.map((e) => {
1679
- let t = ee.get(yt(e)) ?? [], n = k.get(yt(e)) ?? [], r = p(e);
1680
- return /* @__PURE__ */ U("div", {
1687
+ children: H.map((e) => {
1688
+ let t = ee.get(bt(e)) ?? [], n = k.get(bt(e)) ?? [], r = p(e);
1689
+ return /* @__PURE__ */ W("div", {
1681
1690
  className: J("flex min-h-32 flex-col rounded-lg border p-2", r ? "border-primary/50 bg-primary/5" : "border-border bg-muted/20"),
1682
- children: [/* @__PURE__ */ U("div", {
1691
+ children: [/* @__PURE__ */ W("div", {
1683
1692
  className: "mb-2 flex items-baseline justify-between",
1684
- children: [/* @__PURE__ */ H("span", {
1693
+ children: [/* @__PURE__ */ U("span", {
1685
1694
  className: J("text-xs font-semibold uppercase", r ? "text-primary" : "text-muted-foreground"),
1686
1695
  children: d(e, "EEE")
1687
- }), /* @__PURE__ */ H("span", {
1696
+ }), /* @__PURE__ */ U("span", {
1688
1697
  className: J("text-sm font-semibold", r ? "text-primary" : "text-foreground"),
1689
1698
  children: d(e, "d")
1690
1699
  })]
1691
- }), /* @__PURE__ */ U("div", {
1700
+ }), /* @__PURE__ */ W("div", {
1692
1701
  className: "flex flex-col gap-1.5",
1693
- children: [n.map((e) => /* @__PURE__ */ H(xt, {
1702
+ children: [n.map((e) => /* @__PURE__ */ U(St, {
1694
1703
  milestone: e,
1695
1704
  compact: !0
1696
- }, e.id)), t.map((e) => /* @__PURE__ */ H(St, {
1705
+ }, e.id)), t.map((e) => /* @__PURE__ */ U(Ct, {
1697
1706
  task: e,
1698
1707
  onSelect: g,
1699
1708
  resolveAssignee: _
1700
1709
  }, e.id))]
1701
1710
  })]
1702
- }, yt(e));
1711
+ }, bt(e));
1703
1712
  })
1704
- }) : /* @__PURE__ */ U("div", {
1713
+ }) : /* @__PURE__ */ W("div", {
1705
1714
  className: "grid grid-cols-7 gap-1",
1706
1715
  children: [[
1707
1716
  "Mon",
@@ -1711,45 +1720,45 @@ function bt({ projectId: e, priority: t = "ALL", type: i = "ALL", search: o = ""
1711
1720
  "Fri",
1712
1721
  "Sat",
1713
1722
  "Sun"
1714
- ].map((e) => /* @__PURE__ */ H("div", {
1723
+ ].map((e) => /* @__PURE__ */ U("div", {
1715
1724
  className: "px-1 pb-1 text-center text-[10px] font-semibold uppercase text-muted-foreground",
1716
1725
  children: e
1717
- }, e)), W.map((e) => {
1718
- let t = ee.get(yt(e)) ?? [], n = p(e), r = f(e, z);
1719
- return /* @__PURE__ */ U("div", {
1726
+ }, e)), H.map((e) => {
1727
+ let t = ee.get(bt(e)) ?? [], n = p(e), r = f(e, z);
1728
+ return /* @__PURE__ */ W("div", {
1720
1729
  className: J("flex min-h-20 flex-col gap-1 rounded-md border p-1", n ? "border-primary/50 bg-primary/5" : "border-border/60 bg-muted/10", !r && "opacity-40"),
1721
1730
  children: [
1722
- /* @__PURE__ */ H("span", {
1731
+ /* @__PURE__ */ U("span", {
1723
1732
  className: J("text-[10px] font-semibold", n ? "text-primary" : "text-muted-foreground"),
1724
1733
  children: d(e, "d")
1725
1734
  }),
1726
- t.slice(0, 3).map((e) => /* @__PURE__ */ H(St, {
1735
+ t.slice(0, 3).map((e) => /* @__PURE__ */ U(Ct, {
1727
1736
  task: e,
1728
1737
  onSelect: g,
1729
1738
  resolveAssignee: _,
1730
1739
  compact: !0
1731
1740
  }, e.id)),
1732
- t.length > 3 && /* @__PURE__ */ U("span", {
1741
+ t.length > 3 && /* @__PURE__ */ W("span", {
1733
1742
  className: "text-[10px] text-muted-foreground",
1734
1743
  children: [
1735
1744
  "+",
1736
1745
  t.length - 3,
1737
1746
  " ",
1738
- D.more
1747
+ T.more
1739
1748
  ]
1740
1749
  })
1741
1750
  ]
1742
- }, yt(e));
1751
+ }, bt(e));
1743
1752
  })]
1744
1753
  }),
1745
- te.length > 0 && /* @__PURE__ */ U("div", {
1754
+ K.length > 0 && /* @__PURE__ */ W("div", {
1746
1755
  className: "rounded-md border border-border bg-muted/20 px-3 py-2",
1747
- children: [/* @__PURE__ */ H("p", {
1756
+ children: [/* @__PURE__ */ U("p", {
1748
1757
  className: "mb-1 text-xs font-semibold text-muted-foreground",
1749
- children: D.noDueDate.replace("{n}", String(te.length))
1750
- }), /* @__PURE__ */ H("div", {
1758
+ children: T.noDueDate.replace("{n}", String(K.length))
1759
+ }), /* @__PURE__ */ U("div", {
1751
1760
  className: "flex flex-wrap gap-1.5",
1752
- children: te.map((e) => /* @__PURE__ */ H(St, {
1761
+ children: K.map((e) => /* @__PURE__ */ U(Ct, {
1753
1762
  task: e,
1754
1763
  onSelect: g,
1755
1764
  resolveAssignee: _
@@ -1759,42 +1768,42 @@ function bt({ projectId: e, priority: t = "ALL", type: i = "ALL", search: o = ""
1759
1768
  ]
1760
1769
  });
1761
1770
  }
1762
- function xt({ milestone: e, compact: t }) {
1763
- let n = we(e.dueDate);
1764
- return /* @__PURE__ */ U("span", {
1771
+ function St({ milestone: e, compact: t }) {
1772
+ let n = Te(e.dueDate);
1773
+ return /* @__PURE__ */ W("span", {
1765
1774
  className: J("inline-flex max-w-full items-center gap-1 rounded-md border border-primary/40 bg-primary/10 px-1.5 py-1 text-[11px] font-medium text-primary", t && "w-full"),
1766
1775
  title: e.name + (n ? ` \xB7 ${n}` : ""),
1767
1776
  children: [
1768
- /* @__PURE__ */ H(P, {
1777
+ /* @__PURE__ */ U(F, {
1769
1778
  className: "h-3 w-3 shrink-0",
1770
1779
  "aria-hidden": "true"
1771
1780
  }),
1772
- /* @__PURE__ */ H("span", {
1781
+ /* @__PURE__ */ U("span", {
1773
1782
  className: "truncate",
1774
1783
  children: e.name
1775
1784
  }),
1776
- !t && n && /* @__PURE__ */ U("span", {
1785
+ !t && n && /* @__PURE__ */ W("span", {
1777
1786
  className: "shrink-0 text-primary/70",
1778
1787
  children: ["· ", n]
1779
1788
  })
1780
1789
  ]
1781
1790
  });
1782
1791
  }
1783
- function St({ task: e, onSelect: t, resolveAssignee: n, tone: r, compact: i }) {
1792
+ function Ct({ task: e, onSelect: t, resolveAssignee: n, tone: r, compact: i }) {
1784
1793
  let a = e.assigneeId ? n?.(e.assigneeId) : null, o = !!t;
1785
- return /* @__PURE__ */ U("button", {
1794
+ return /* @__PURE__ */ W("button", {
1786
1795
  type: "button",
1787
1796
  disabled: !o,
1788
1797
  onClick: o ? () => t?.(e.id) : void 0,
1789
1798
  title: e.title,
1790
1799
  className: J("flex w-full items-center gap-1.5 rounded-md border px-1.5 py-1 text-left transition-colors", r === "destructive" ? "border-destructive/40 bg-card hover:bg-destructive/5" : "border-border bg-card hover:border-primary/50", o ? "cursor-pointer" : "cursor-default"),
1791
1800
  children: [
1792
- /* @__PURE__ */ H(Ye, { priority: e.priority }),
1793
- /* @__PURE__ */ H("span", {
1801
+ /* @__PURE__ */ U(Xe, { priority: e.priority }),
1802
+ /* @__PURE__ */ U("span", {
1794
1803
  className: "min-w-0 flex-1 truncate text-[11px] font-medium text-foreground",
1795
1804
  children: e.title
1796
1805
  }),
1797
- !i && /* @__PURE__ */ H(Ne, {
1806
+ !i && /* @__PURE__ */ U(Pe, {
1798
1807
  id: e.assigneeId,
1799
1808
  name: a?.name,
1800
1809
  size: "sm"
@@ -1802,12 +1811,12 @@ function St({ task: e, onSelect: t, resolveAssignee: n, tone: r, compact: i }) {
1802
1811
  ]
1803
1812
  });
1804
1813
  }
1805
- var Ct = {
1806
- board: F,
1807
- list: L,
1808
- timeline: C
1809
- }, wt = "h-8 rounded-md border border-border bg-background px-2 text-xs font-medium text-foreground capitalize transition-colors hover:bg-muted/50 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring";
1810
- function Tt({ view: e, onViewChange: t, views: n = [
1814
+ var wt = {
1815
+ board: I,
1816
+ list: R,
1817
+ timeline: w
1818
+ }, Tt = "h-8 rounded-md border border-border bg-background px-2 text-xs font-medium text-foreground capitalize transition-colors hover:bg-muted/50 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring";
1819
+ function Et({ view: e, onViewChange: t, views: n = [
1811
1820
  "board",
1812
1821
  "list",
1813
1822
  "timeline"
@@ -1817,39 +1826,39 @@ function Tt({ view: e, onViewChange: t, views: n = [
1817
1826
  list: m.list,
1818
1827
  timeline: m.timeline
1819
1828
  };
1820
- return /* @__PURE__ */ U("div", {
1829
+ return /* @__PURE__ */ W("div", {
1821
1830
  className: J("flex flex-wrap items-center justify-between gap-3 border-b border-border pb-2", p),
1822
- children: [/* @__PURE__ */ H("div", {
1831
+ children: [/* @__PURE__ */ U("div", {
1823
1832
  className: "flex items-center gap-1",
1824
1833
  role: "tablist",
1825
1834
  "aria-label": "Task views",
1826
1835
  children: n.map((n) => {
1827
- let r = Ct[n], i = n === e;
1828
- return /* @__PURE__ */ U("button", {
1836
+ let r = wt[n], i = n === e;
1837
+ return /* @__PURE__ */ W("button", {
1829
1838
  type: "button",
1830
1839
  role: "tab",
1831
1840
  "aria-selected": i,
1832
1841
  onClick: () => t(n),
1833
1842
  className: J("relative flex items-center gap-1.5 rounded-t-md px-2.5 py-1.5 text-sm font-medium transition-colors", i ? "text-foreground" : "text-muted-foreground hover:text-foreground"),
1834
1843
  children: [
1835
- /* @__PURE__ */ H(r, {
1844
+ /* @__PURE__ */ U(r, {
1836
1845
  className: "h-4 w-4",
1837
1846
  "aria-hidden": "true"
1838
1847
  }),
1839
1848
  h[n],
1840
- i && /* @__PURE__ */ H("span", { className: "absolute inset-x-1 -bottom-[9px] h-0.5 rounded-full bg-primary" })
1849
+ i && /* @__PURE__ */ U("span", { className: "absolute inset-x-1 -bottom-[9px] h-0.5 rounded-full bg-primary" })
1841
1850
  ]
1842
1851
  }, n);
1843
1852
  })
1844
- }), /* @__PURE__ */ U("div", {
1853
+ }), /* @__PURE__ */ W("div", {
1845
1854
  className: "flex flex-wrap items-center gap-2",
1846
1855
  children: [
1847
- /* @__PURE__ */ U("div", {
1856
+ /* @__PURE__ */ W("div", {
1848
1857
  className: "relative",
1849
- children: [/* @__PURE__ */ H(z, {
1858
+ children: [/* @__PURE__ */ U(B, {
1850
1859
  className: "pointer-events-none absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground",
1851
1860
  "aria-hidden": "true"
1852
- }), /* @__PURE__ */ H("input", {
1861
+ }), /* @__PURE__ */ U("input", {
1853
1862
  type: "search",
1854
1863
  value: r,
1855
1864
  onChange: (e) => i(e.target.value),
@@ -1858,47 +1867,47 @@ function Tt({ view: e, onViewChange: t, views: n = [
1858
1867
  className: "h-8 w-40 rounded-md border border-border bg-background pl-7 pr-2 text-xs text-foreground placeholder:text-muted-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring"
1859
1868
  })]
1860
1869
  }),
1861
- f && /* @__PURE__ */ U("button", {
1870
+ f && /* @__PURE__ */ W("button", {
1862
1871
  type: "button",
1863
1872
  onClick: () => f(!d),
1864
1873
  "aria-pressed": d,
1865
1874
  className: J("flex h-8 items-center gap-1.5 rounded-md border px-2.5 text-xs font-medium transition-colors", d ? "border-primary bg-primary/10 text-primary" : "border-border bg-background text-muted-foreground hover:bg-muted/50 hover:text-foreground"),
1866
- children: [/* @__PURE__ */ H(V, {
1875
+ children: [/* @__PURE__ */ U(H, {
1867
1876
  className: "h-3.5 w-3.5",
1868
1877
  "aria-hidden": "true"
1869
1878
  }), m.myTasks]
1870
1879
  }),
1871
- /* @__PURE__ */ U("select", {
1880
+ /* @__PURE__ */ W("select", {
1872
1881
  value: a,
1873
1882
  onChange: (e) => o(e.target.value),
1874
1883
  "aria-label": m.priorityLabel,
1875
- className: wt,
1876
- children: [/* @__PURE__ */ H("option", {
1884
+ className: Tt,
1885
+ children: [/* @__PURE__ */ U("option", {
1877
1886
  value: "ALL",
1878
1887
  children: m.allPriorities
1879
- }), Fe.map((e) => /* @__PURE__ */ H("option", {
1888
+ }), Ie.map((e) => /* @__PURE__ */ U("option", {
1880
1889
  value: e,
1881
1890
  children: m.priority[e]
1882
1891
  }, e))]
1883
1892
  }),
1884
- /* @__PURE__ */ U("select", {
1893
+ /* @__PURE__ */ W("select", {
1885
1894
  value: s,
1886
1895
  onChange: (e) => c(e.target.value),
1887
1896
  "aria-label": m.typeLabel,
1888
- className: wt,
1889
- children: [/* @__PURE__ */ H("option", {
1897
+ className: Tt,
1898
+ children: [/* @__PURE__ */ U("option", {
1890
1899
  value: "ALL",
1891
1900
  children: m.allTypes
1892
- }), Ie.map((e) => /* @__PURE__ */ H("option", {
1901
+ }), Le.map((e) => /* @__PURE__ */ U("option", {
1893
1902
  value: e,
1894
1903
  children: m.type[e]
1895
1904
  }, e))]
1896
1905
  }),
1897
- u && l && /* @__PURE__ */ U("button", {
1906
+ u && l && /* @__PURE__ */ W("button", {
1898
1907
  type: "button",
1899
1908
  onClick: l,
1900
1909
  className: "flex h-8 items-center gap-1.5 rounded-md bg-primary px-3 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",
1901
- children: [/* @__PURE__ */ H(R, {
1910
+ children: [/* @__PURE__ */ U(z, {
1902
1911
  className: "h-4 w-4",
1903
1912
  "aria-hidden": "true"
1904
1913
  }), m.newTask]
@@ -1907,167 +1916,271 @@ function Tt({ view: e, onViewChange: t, views: n = [
1907
1916
  })]
1908
1917
  });
1909
1918
  }
1910
- var Et = "text-xs font-medium uppercase tracking-wide text-muted-foreground", Dt = "w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring";
1911
- function Ot({ entityType: e, entityId: t, currentActorId: n, resolveAssignee: r, readonly: i, className: a }) {
1912
- let o = Y(), [s, c] = x(""), [l, u] = x(null), { data: d, loading: f, refetch: p } = q(ve, {
1919
+ var Dt = "w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring";
1920
+ function Ot({ placeholder: e, submitLabel: t, pendingLabel: n, members: r, autoFocus: i, onSubmit: a }) {
1921
+ let [o, s] = S(""), [c, l] = S(!1), [u, d] = S([]), [f, p] = S(null), m = x(null), h = b(() => {
1922
+ if (f == null || !r || r.length === 0) return [];
1923
+ let e = f.toLowerCase();
1924
+ return r.filter((t) => t.name.toLowerCase().includes(e)).slice(0, 6);
1925
+ }, [f, r]), g = (e) => {
1926
+ let t = m.current?.selectionStart ?? e.length, n = /(?:^|\s)@([\p{L}\p{N} ._-]*)$/u.exec(e.slice(0, t));
1927
+ p(n ? n[1] : null);
1928
+ }, _ = (e) => {
1929
+ s(e), g(e);
1930
+ }, v = (e) => {
1931
+ let t = m.current, n = t?.selectionStart ?? o.length, r = o.slice(0, n), i = o.slice(n);
1932
+ s(r.replace(/@([\p{L}\p{N} ._-]*)$/u, `@${e.name} `) + i), p(null), d((t) => t.some((t) => t.id === e.id) ? t : [...t, e]), requestAnimationFrame(() => t?.focus());
1933
+ };
1934
+ return /* @__PURE__ */ W("form", {
1935
+ onSubmit: async (e) => {
1936
+ e.preventDefault();
1937
+ let t = o.trim();
1938
+ if (!t || c) return;
1939
+ let n = u.filter((e) => t.includes(`@${e.name}`)).map((e) => e.id);
1940
+ l(!0);
1941
+ try {
1942
+ await a({
1943
+ text: t,
1944
+ mentionUserIds: n
1945
+ }), s(""), d([]), p(null);
1946
+ } finally {
1947
+ l(!1);
1948
+ }
1949
+ },
1950
+ className: "relative space-y-2",
1951
+ children: [
1952
+ /* @__PURE__ */ U("textarea", {
1953
+ ref: m,
1954
+ className: J(Dt, "min-h-[60px]"),
1955
+ rows: 2,
1956
+ value: o,
1957
+ autoFocus: i,
1958
+ onChange: (e) => _(e.target.value),
1959
+ onKeyUp: (e) => g(e.target.value),
1960
+ onClick: (e) => g(e.target.value),
1961
+ placeholder: e,
1962
+ "aria-label": e
1963
+ }),
1964
+ h.length > 0 && /* @__PURE__ */ U("ul", {
1965
+ className: "absolute left-0 top-full z-20 mt-1 max-h-48 w-56 overflow-auto rounded-md border border-border bg-popover p-1 shadow-md",
1966
+ children: h.map((e) => /* @__PURE__ */ U("li", { children: /* @__PURE__ */ W("button", {
1967
+ type: "button",
1968
+ onMouseDown: (t) => {
1969
+ t.preventDefault(), v(e);
1970
+ },
1971
+ className: "flex w-full items-center rounded px-2 py-1 text-left text-sm text-foreground hover:bg-muted",
1972
+ children: ["@", e.name]
1973
+ }) }, e.id))
1974
+ }),
1975
+ /* @__PURE__ */ U("div", {
1976
+ className: "flex justify-end",
1977
+ children: /* @__PURE__ */ U("button", {
1978
+ type: "submit",
1979
+ disabled: c || !o.trim(),
1980
+ className: J("rounded-md bg-primary px-3 py-1.5 text-sm font-medium text-primary-foreground", (c || !o.trim()) && "cursor-not-allowed opacity-50"),
1981
+ children: c ? n : t
1982
+ })
1983
+ })
1984
+ ]
1985
+ });
1986
+ }
1987
+ var kt = "text-xs font-medium uppercase tracking-wide text-muted-foreground", At = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1988
+ function jt({ entityType: e, entityId: t, currentActorId: n, resolveAssignee: r, members: i, readonly: a, className: o }) {
1989
+ let s = Y(), [c, l] = S(null), [u, d] = S(null), { data: f, loading: p, refetch: m } = q(ye, {
1913
1990
  variables: { input: {
1914
1991
  entityType: e,
1915
1992
  entityId: t,
1916
- take: 100,
1993
+ take: 200,
1917
1994
  sortBy: "createdAt",
1918
1995
  sortOrder: "asc"
1919
1996
  } },
1920
1997
  skip: !t,
1921
1998
  errorPolicy: "all"
1922
- }), m = d?.getEntityComments?.items ?? [], [h, { loading: g }] = K(ye), [_] = K(be), v = (e) => e === n ? o.you : r?.(e)?.name ?? void 0, y = async (n) => {
1923
- n.preventDefault();
1924
- let r = s.trim();
1925
- if (r) {
1926
- u(null);
1927
- try {
1928
- await h({ variables: { input: {
1929
- entityType: e,
1930
- entityId: t,
1931
- content: { text: r },
1932
- contentType: "TEXT"
1933
- } } }), c(""), await p();
1934
- } catch {
1935
- u(o.failedToComment);
1936
- }
1999
+ }), h = f?.getEntityComments?.items ?? [], { topLevel: g, repliesByRoot: _ } = b(() => {
2000
+ let e = [], t = /* @__PURE__ */ new Map();
2001
+ for (let n of h) if (!n.parentCommentId) e.push(n);
2002
+ else {
2003
+ let e = n.threadRootId ?? n.parentCommentId, r = t.get(e);
2004
+ r ? r.push(n) : t.set(e, [n]);
2005
+ }
2006
+ return {
2007
+ topLevel: e,
2008
+ repliesByRoot: t
2009
+ };
2010
+ }, [h]), [v] = ne(be), [y] = ne(xe), x = (e) => e === n ? s.you : r?.(e)?.name ?? void 0, C = async ({ text: n, mentionUserIds: r }, i) => {
2011
+ l(null);
2012
+ try {
2013
+ await v({ variables: { input: {
2014
+ entityType: e,
2015
+ entityId: t,
2016
+ content: { text: n },
2017
+ contentType: "TEXT",
2018
+ ...i ? { parentCommentId: i } : {},
2019
+ ...r.length ? { mentionUserIds: r } : {}
2020
+ } } }), await m(), d(null);
2021
+ } catch (e) {
2022
+ throw l(s.failedToComment), e;
1937
2023
  }
1938
- }, b = async (e) => {
1939
- u(null);
2024
+ }, w = async (e) => {
2025
+ l(null);
1940
2026
  try {
1941
- await _({ variables: { input: {
2027
+ await y({ variables: { input: {
1942
2028
  id: e,
1943
2029
  soft: !0
1944
- } } }), await p();
2030
+ } } }), await m();
1945
2031
  } catch {
1946
- u(o.failedToDeleteComment);
2032
+ l(s.failedToDeleteComment);
1947
2033
  }
1948
- };
1949
- return /* @__PURE__ */ U("div", {
1950
- className: J("space-y-3", a),
2034
+ }, T = (e) => {
2035
+ let t = e.content?.text ?? "", n = (e.mentions ?? []).map((e) => r?.(e.mentionedUserId)?.name).filter((e) => !!e);
2036
+ if (n.length === 0) return t;
2037
+ let i = new Set(n.map((e) => `@${e}`)), a = RegExp(`(@(?:${n.map(At).join("|")}))`, "g");
2038
+ return t.split(a).map((e, t) => i.has(e) ? /* @__PURE__ */ U("span", {
2039
+ className: "rounded bg-primary/10 px-0.5 font-medium text-primary",
2040
+ children: e
2041
+ }, t) : /* @__PURE__ */ U("span", { children: e }, t));
2042
+ }, E = (e, t) => /* @__PURE__ */ W("div", {
2043
+ className: "flex gap-2",
2044
+ children: [/* @__PURE__ */ U(Pe, {
2045
+ id: e.authorId,
2046
+ name: x(e.authorId),
2047
+ size: "sm"
2048
+ }), /* @__PURE__ */ W("div", {
2049
+ className: "min-w-0 flex-1",
2050
+ children: [
2051
+ /* @__PURE__ */ W("div", {
2052
+ className: "flex items-center gap-2",
2053
+ children: [
2054
+ /* @__PURE__ */ U("span", {
2055
+ className: "text-sm font-medium text-foreground",
2056
+ children: x(e.authorId) ?? e.authorId.slice(0, 8)
2057
+ }),
2058
+ /* @__PURE__ */ U("span", {
2059
+ className: "text-xs text-muted-foreground",
2060
+ children: Ee(e.createdAt)
2061
+ }),
2062
+ e.edited && /* @__PURE__ */ U("span", {
2063
+ className: "text-xs text-muted-foreground",
2064
+ children: s.editedTag
2065
+ }),
2066
+ !a && e.authorId === n && /* @__PURE__ */ U("button", {
2067
+ type: "button",
2068
+ onClick: () => w(e.id),
2069
+ "aria-label": s.del,
2070
+ title: s.del,
2071
+ className: "ml-auto rounded p-1 text-muted-foreground hover:text-destructive",
2072
+ children: /* @__PURE__ */ U(V, { className: "h-3.5 w-3.5" })
2073
+ })
2074
+ ]
2075
+ }),
2076
+ /* @__PURE__ */ U("p", {
2077
+ className: "whitespace-pre-wrap break-words text-sm text-foreground",
2078
+ children: T(e)
2079
+ }),
2080
+ !t && !a && /* @__PURE__ */ U("button", {
2081
+ type: "button",
2082
+ onClick: () => d((t) => t === e.id ? null : e.id),
2083
+ className: "mt-1 text-xs font-medium text-muted-foreground hover:text-foreground",
2084
+ children: s.reply
2085
+ })
2086
+ ]
2087
+ })]
2088
+ });
2089
+ return /* @__PURE__ */ W("div", {
2090
+ className: J("space-y-4", o),
1951
2091
  children: [
1952
- /* @__PURE__ */ U("div", {
1953
- className: Et,
1954
- children: [o.commentsLabel, m.length > 0 ? ` (${m.length})` : ""]
2092
+ /* @__PURE__ */ W("div", {
2093
+ className: kt,
2094
+ children: [s.commentsLabel, h.length > 0 ? ` (${h.length})` : ""]
1955
2095
  }),
1956
- /* @__PURE__ */ H("ul", {
1957
- className: "space-y-3",
1958
- children: m.length === 0 && !f ? /* @__PURE__ */ H("li", {
2096
+ /* @__PURE__ */ U("ul", {
2097
+ className: "space-y-4",
2098
+ children: g.length === 0 && !p ? /* @__PURE__ */ U("li", {
1959
2099
  className: "text-sm text-muted-foreground",
1960
- children: o.noComments
1961
- }) : m.map((e) => /* @__PURE__ */ U("li", {
1962
- className: "flex gap-2",
1963
- children: [/* @__PURE__ */ H(Ne, {
1964
- id: e.authorId,
1965
- name: v(e.authorId),
1966
- size: "sm"
1967
- }), /* @__PURE__ */ U("div", {
1968
- className: "min-w-0 flex-1",
1969
- children: [/* @__PURE__ */ U("div", {
1970
- className: "flex items-center gap-2",
1971
- children: [
1972
- /* @__PURE__ */ H("span", {
1973
- className: "text-sm font-medium text-foreground",
1974
- children: v(e.authorId) ?? e.authorId.slice(0, 8)
1975
- }),
1976
- /* @__PURE__ */ H("span", {
1977
- className: "text-xs text-muted-foreground",
1978
- children: Te(e.createdAt)
1979
- }),
1980
- e.edited && /* @__PURE__ */ H("span", {
1981
- className: "text-xs text-muted-foreground",
1982
- children: o.editedTag
1983
- }),
1984
- !i && e.authorId === n && /* @__PURE__ */ H("button", {
1985
- type: "button",
1986
- onClick: () => b(e.id),
1987
- "aria-label": o.del,
1988
- title: o.del,
1989
- className: "ml-auto rounded p-1 text-muted-foreground hover:text-destructive",
1990
- children: /* @__PURE__ */ H(B, { className: "h-3.5 w-3.5" })
2100
+ children: s.noComments
2101
+ }) : g.map((e) => {
2102
+ let t = _.get(e.id) ?? [];
2103
+ return /* @__PURE__ */ W("li", {
2104
+ className: "space-y-2",
2105
+ children: [
2106
+ E(e, !1),
2107
+ t.length > 0 && /* @__PURE__ */ U("ul", {
2108
+ className: "ml-8 space-y-2 border-l border-border pl-3",
2109
+ children: t.map((e) => /* @__PURE__ */ U("li", { children: E(e, !0) }, e.id))
2110
+ }),
2111
+ !a && u === e.id && /* @__PURE__ */ U("div", {
2112
+ className: "ml-8",
2113
+ children: /* @__PURE__ */ U(Ot, {
2114
+ placeholder: s.replyPlaceholder,
2115
+ submitLabel: s.reply,
2116
+ pendingLabel: s.posting,
2117
+ members: i,
2118
+ autoFocus: !0,
2119
+ onSubmit: (t) => C(t, e.id)
1991
2120
  })
1992
- ]
1993
- }), /* @__PURE__ */ H("p", {
1994
- className: "whitespace-pre-wrap break-words text-sm text-foreground",
1995
- children: e.content?.text
1996
- })]
1997
- })]
1998
- }, e.id))
2121
+ })
2122
+ ]
2123
+ }, e.id);
2124
+ })
1999
2125
  }),
2000
- l && /* @__PURE__ */ H("p", {
2126
+ c && /* @__PURE__ */ U("p", {
2001
2127
  className: "text-sm text-destructive",
2002
- children: l
2128
+ children: c
2003
2129
  }),
2004
- !i && /* @__PURE__ */ U("form", {
2005
- onSubmit: y,
2006
- className: "space-y-2",
2007
- children: [/* @__PURE__ */ H("textarea", {
2008
- className: J(Dt, "min-h-[60px]"),
2009
- rows: 2,
2010
- value: s,
2011
- onChange: (e) => c(e.target.value),
2012
- placeholder: o.commentPlaceholder,
2013
- "aria-label": o.commentsLabel
2014
- }), /* @__PURE__ */ H("div", {
2015
- className: "flex justify-end",
2016
- children: /* @__PURE__ */ H("button", {
2017
- type: "submit",
2018
- disabled: g || !s.trim(),
2019
- className: J("rounded-md bg-primary px-3 py-1.5 text-sm font-medium text-primary-foreground", (g || !s.trim()) && "cursor-not-allowed opacity-50"),
2020
- children: g ? o.posting : o.postComment
2021
- })
2022
- })]
2130
+ !a && /* @__PURE__ */ U(Ot, {
2131
+ placeholder: s.commentPlaceholder,
2132
+ submitLabel: s.postComment,
2133
+ pendingLabel: s.posting,
2134
+ members: i,
2135
+ onSubmit: (e) => C(e)
2023
2136
  })
2024
2137
  ]
2025
2138
  });
2026
2139
  }
2027
- var Q = "w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring", $ = "text-xs font-medium uppercase tracking-wide text-muted-foreground", kt = {
2140
+ var Q = "w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring", $ = "text-xs font-medium uppercase tracking-wide text-muted-foreground", Mt = {
2028
2141
  NONE: "muted",
2029
2142
  LOW: "muted",
2030
2143
  MEDIUM: "secondary",
2031
2144
  HIGH: "accent",
2032
2145
  CRITICAL: "destructive"
2033
2146
  };
2034
- function At({ id: e, readonly: t, hiddenFields: n, hideHeader: r, onUpdated: i, onDeleted: a, onError: o, resolveAssignee: s, assigneeOptions: c, linkSourceProduct: l, renderLinkIcon: u, onOpenItem: d, onAddSubtask: f, commentsEntityType: p, currentActorId: m, className: h }) {
2035
- let g = te(), _ = Y(), v = b(() => new Set(n ?? []), [n]), { data: S, loading: C, error: w } = q(ue, {
2147
+ function Nt({ id: e, readonly: t, hiddenFields: n, hideHeader: r, onUpdated: i, onDeleted: a, onError: o, resolveAssignee: s, assigneeOptions: c, linkSourceProduct: l, renderLinkIcon: u, onOpenItem: d, onAddSubtask: f, commentsEntityType: p, currentActorId: m, className: h }) {
2148
+ let g = te(), _ = Y(), v = b(() => new Set(n ?? []), [n]), { data: x, loading: C, error: w } = q(de, {
2036
2149
  variables: { id: e },
2037
2150
  skip: !e
2038
- }), T = S?.planmagnetWorkItem ?? null, { linksByItem: E } = rt(T?.workspaceId, l), D = T ? E.get(T.id) ?? [] : [], { data: O } = q(ue, {
2151
+ }), T = x?.planmagnetWorkItem ?? null, { linksByItem: E } = it(T?.workspaceId, l), D = T ? E.get(T.id) ?? [] : [], { data: O } = q(de, {
2039
2152
  variables: { id: T?.parentId },
2040
2153
  skip: !T?.parentId
2041
- }), k = O?.planmagnetWorkItem ?? null, { data: A } = q(le, {
2154
+ }), k = O?.planmagnetWorkItem ?? null, { data: A } = q(ue, {
2042
2155
  variables: {
2043
2156
  workspaceId: T?.workspaceId,
2044
2157
  filter: { parentId: T?.id },
2045
2158
  pagination: { first: 100 }
2046
2159
  },
2047
2160
  skip: !T?.id || !T?.workspaceId
2048
- }), j = A?.planmagnetWorkItems?.items ?? [], [M, N] = x(!1), [P, F] = x(!1), [I, L] = x(""), [R, z] = x(""), [V, G] = x("TASK"), [ne, ie] = x("BACKLOG"), [ae, oe] = x("NONE"), [se, ce] = x(""), [de, pe] = x(""), [me, he] = x(""), [_e, ve] = x("");
2161
+ }), j = A?.planmagnetWorkItems?.items ?? [], [M, N] = S(!1), [P, F] = S(!1), [I, L] = S(""), [R, z] = S(""), [B, H] = S("TASK"), [K, re] = S("BACKLOG"), [ae, oe] = S("NONE"), [se, ce] = S(""), [le, fe] = S(""), [me, he] = S(""), [ge, ve] = S("");
2049
2162
  y(() => {
2050
- T && (L(T.title), z(T.description ?? ""), G(T.type), ie(T.status), oe(T.priority), ce(T.assigneeId ?? ""), pe(T.dueDate ? String(T.dueDate).slice(0, 10) : ""), he((T.labels ?? []).join(", ")), ve(T.storyPoints == null ? "" : String(T.storyPoints)));
2163
+ T && (L(T.title), z(T.description ?? ""), H(T.type), re(T.status), oe(T.priority), ce(T.assigneeId ?? ""), fe(T.dueDate ? String(T.dueDate).slice(0, 10) : ""), he((T.labels ?? []).join(", ")), ve(T.storyPoints == null ? "" : String(T.storyPoints)));
2051
2164
  }, [T]);
2052
- let [ye, { loading: be, error: xe }] = K(fe), [Se, { loading: we, error: Ee }] = K(ge), De = async () => {
2165
+ let [ye, { loading: be, error: xe }] = ne(pe), [Se, { loading: Ce, error: Te }] = ne(_e), De = async () => {
2053
2166
  if (T) try {
2054
2167
  await Se({ variables: { id: T.id } }), g.cache.evict({ id: g.cache.identify({
2055
2168
  __typename: "WorkItem",
2056
2169
  id: T.id
2057
- }) }), g.cache.gc(), g.refetchQueries({ include: [le] }).catch(() => {}), a?.(T.id);
2170
+ }) }), g.cache.gc(), g.refetchQueries({ include: [ue] }).catch(() => {}), a?.(T.id);
2058
2171
  } catch (e) {
2059
2172
  o?.(e instanceof Error ? e : Error(String(e)));
2060
2173
  }
2061
- }, ke = async (e) => {
2174
+ }, Oe = async (e) => {
2062
2175
  if (e.preventDefault(), !T) return;
2063
- let t = me.split(",").map((e) => e.trim()).filter(Boolean), n = _e.trim() ? Number(_e) : void 0, r = {
2176
+ let t = me.split(",").map((e) => e.trim()).filter(Boolean), n = ge.trim() ? Number(ge) : void 0, r = {
2064
2177
  title: I.trim(),
2065
2178
  ...v.has("description") ? {} : { description: R.trim() },
2066
- ...v.has("type") ? {} : { type: V },
2067
- ...v.has("status") ? {} : { status: ne },
2179
+ ...v.has("type") ? {} : { type: B },
2180
+ ...v.has("status") ? {} : { status: K },
2068
2181
  ...v.has("priority") ? {} : { priority: ae },
2069
2182
  ...v.has("assignee") ? {} : { assigneeId: se.trim() },
2070
- ...v.has("dueDate") ? {} : { dueDate: Ce(de) },
2183
+ ...v.has("dueDate") ? {} : { dueDate: we(le) },
2071
2184
  ...v.has("labels") ? {} : { labels: t },
2072
2185
  ...v.has("storyPoints") || n == null || Number.isNaN(n) ? {} : { storyPoints: n }
2073
2186
  };
@@ -2077,7 +2190,7 @@ function At({ id: e, readonly: t, hiddenFields: n, hideHeader: r, onUpdated: i,
2077
2190
  input: r
2078
2191
  } })).data?.planmagnetUpdateWorkItem;
2079
2192
  if (e) {
2080
- let t = re();
2193
+ let t = ie();
2081
2194
  try {
2082
2195
  await t.onTaskSaved?.({
2083
2196
  id: e.id,
@@ -2093,15 +2206,15 @@ function At({ id: e, readonly: t, hiddenFields: n, hideHeader: r, onUpdated: i,
2093
2206
  o?.(e instanceof Error ? e : Error(String(e)));
2094
2207
  }
2095
2208
  };
2096
- if (!e) return /* @__PURE__ */ H("div", {
2209
+ if (!e) return /* @__PURE__ */ U("div", {
2097
2210
  className: J("p-6 text-sm text-destructive", h),
2098
2211
  children: "TaskDetail: no work-item id provided."
2099
2212
  });
2100
- if (C && !S) return /* @__PURE__ */ H("div", {
2213
+ if (C && !x) return /* @__PURE__ */ U("div", {
2101
2214
  className: J("flex items-center justify-center p-12", h),
2102
- children: /* @__PURE__ */ H("div", { className: "h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent" })
2215
+ children: /* @__PURE__ */ U("div", { className: "h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent" })
2103
2216
  });
2104
- if (w && !S) return /* @__PURE__ */ U("div", {
2217
+ if (w && !x) return /* @__PURE__ */ W("div", {
2105
2218
  className: J("p-6 text-sm text-destructive", h),
2106
2219
  children: [
2107
2220
  _.errorLoading,
@@ -2109,55 +2222,55 @@ function At({ id: e, readonly: t, hiddenFields: n, hideHeader: r, onUpdated: i,
2109
2222
  w.message
2110
2223
  ]
2111
2224
  });
2112
- if (!T) return /* @__PURE__ */ H("div", {
2225
+ if (!T) return /* @__PURE__ */ U("div", {
2113
2226
  className: J("p-6 text-sm text-muted-foreground", h),
2114
2227
  children: _.taskNotFound
2115
2228
  });
2116
2229
  let Ae = !t;
2117
- return /* @__PURE__ */ H(W, {
2230
+ return /* @__PURE__ */ U(ee, {
2118
2231
  className: J("shadow-sm", h),
2119
- children: /* @__PURE__ */ U(ee, {
2232
+ children: /* @__PURE__ */ W(G, {
2120
2233
  className: "space-y-4 p-6",
2121
2234
  children: [
2122
- !r && /* @__PURE__ */ U("div", {
2235
+ !r && /* @__PURE__ */ W("div", {
2123
2236
  className: "flex items-start justify-between gap-4",
2124
- children: [/* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
2237
+ children: [/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("p", {
2125
2238
  className: "text-xs text-muted-foreground",
2126
2239
  children: T.key
2127
- }), /* @__PURE__ */ H("h2", {
2240
+ }), /* @__PURE__ */ U("h2", {
2128
2241
  className: "text-xl font-semibold text-foreground",
2129
2242
  children: T.title
2130
- })] }), Ae && !M && /* @__PURE__ */ U("div", {
2243
+ })] }), Ae && !M && /* @__PURE__ */ W("div", {
2131
2244
  className: "flex shrink-0 items-center gap-2",
2132
- children: [a && (P ? /* @__PURE__ */ U("span", {
2245
+ children: [a && (P ? /* @__PURE__ */ W("span", {
2133
2246
  className: "flex items-center gap-1 text-xs",
2134
2247
  children: [
2135
- /* @__PURE__ */ H("span", {
2248
+ /* @__PURE__ */ U("span", {
2136
2249
  className: "text-muted-foreground",
2137
2250
  children: _.deletePrompt
2138
2251
  }),
2139
- /* @__PURE__ */ H("button", {
2252
+ /* @__PURE__ */ U("button", {
2140
2253
  type: "button",
2141
- disabled: we,
2254
+ disabled: Ce,
2142
2255
  onClick: De,
2143
2256
  className: "rounded bg-destructive px-2 py-1 font-medium text-destructive-foreground disabled:opacity-50",
2144
- children: we ? "…" : _.yes
2257
+ children: Ce ? "…" : _.yes
2145
2258
  }),
2146
- /* @__PURE__ */ H("button", {
2259
+ /* @__PURE__ */ U("button", {
2147
2260
  type: "button",
2148
2261
  onClick: () => F(!1),
2149
2262
  className: "rounded bg-muted px-2 py-1 text-muted-foreground",
2150
2263
  children: _.no
2151
2264
  })
2152
2265
  ]
2153
- }) : /* @__PURE__ */ H("button", {
2266
+ }) : /* @__PURE__ */ U("button", {
2154
2267
  type: "button",
2155
2268
  onClick: () => F(!0),
2156
2269
  title: _.del,
2157
2270
  "aria-label": _.del,
2158
2271
  className: "rounded-md p-1.5 text-destructive hover:bg-destructive/10",
2159
- children: /* @__PURE__ */ H(B, { className: "h-4 w-4" })
2160
- })), /* @__PURE__ */ H("button", {
2272
+ children: /* @__PURE__ */ U(V, { className: "h-4 w-4" })
2273
+ })), /* @__PURE__ */ U("button", {
2161
2274
  type: "button",
2162
2275
  onClick: () => N(!0),
2163
2276
  className: "rounded-md bg-primary px-3 py-1.5 text-sm font-medium text-primary-foreground",
@@ -2165,25 +2278,25 @@ function At({ id: e, readonly: t, hiddenFields: n, hideHeader: r, onUpdated: i,
2165
2278
  })]
2166
2279
  })]
2167
2280
  }),
2168
- Ee && /* @__PURE__ */ U("p", {
2281
+ Te && /* @__PURE__ */ W("p", {
2169
2282
  className: "text-sm text-destructive",
2170
2283
  children: [
2171
2284
  _.failedToDelete,
2172
2285
  ": ",
2173
- Ee.message
2286
+ Te.message
2174
2287
  ]
2175
2288
  }),
2176
- M ? /* @__PURE__ */ U("form", {
2177
- onSubmit: ke,
2289
+ M ? /* @__PURE__ */ W("form", {
2290
+ onSubmit: Oe,
2178
2291
  className: "space-y-4",
2179
2292
  children: [
2180
- /* @__PURE__ */ U("div", {
2293
+ /* @__PURE__ */ W("div", {
2181
2294
  className: "space-y-1",
2182
- children: [/* @__PURE__ */ H("label", {
2295
+ children: [/* @__PURE__ */ U("label", {
2183
2296
  htmlFor: "pm-detail-title",
2184
2297
  className: $,
2185
2298
  children: _.title
2186
- }), /* @__PURE__ */ H("input", {
2299
+ }), /* @__PURE__ */ U("input", {
2187
2300
  id: "pm-detail-title",
2188
2301
  className: Q,
2189
2302
  value: I,
@@ -2191,92 +2304,92 @@ function At({ id: e, readonly: t, hiddenFields: n, hideHeader: r, onUpdated: i,
2191
2304
  required: !0
2192
2305
  })]
2193
2306
  }),
2194
- !v.has("description") && /* @__PURE__ */ U("div", {
2307
+ !v.has("description") && /* @__PURE__ */ W("div", {
2195
2308
  className: "space-y-1",
2196
- children: [/* @__PURE__ */ H("label", {
2309
+ children: [/* @__PURE__ */ U("label", {
2197
2310
  htmlFor: "pm-detail-desc",
2198
2311
  className: $,
2199
2312
  children: _.description
2200
- }), /* @__PURE__ */ H("textarea", {
2313
+ }), /* @__PURE__ */ U("textarea", {
2201
2314
  id: "pm-detail-desc",
2202
2315
  className: J(Q, "min-h-[80px]"),
2203
2316
  value: R,
2204
2317
  onChange: (e) => z(e.target.value)
2205
2318
  })]
2206
2319
  }),
2207
- /* @__PURE__ */ U("div", {
2320
+ /* @__PURE__ */ W("div", {
2208
2321
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
2209
2322
  children: [
2210
- !v.has("type") && /* @__PURE__ */ U("div", {
2323
+ !v.has("type") && /* @__PURE__ */ W("div", {
2211
2324
  className: "space-y-1",
2212
- children: [/* @__PURE__ */ H("label", {
2325
+ children: [/* @__PURE__ */ U("label", {
2213
2326
  htmlFor: "pm-detail-type",
2214
2327
  className: $,
2215
2328
  children: _.typeLabel
2216
- }), /* @__PURE__ */ H("select", {
2329
+ }), /* @__PURE__ */ U("select", {
2217
2330
  id: "pm-detail-type",
2218
2331
  className: J(Q, "capitalize"),
2219
- value: V,
2220
- onChange: (e) => G(e.target.value),
2221
- children: Ie.map((e) => /* @__PURE__ */ H("option", {
2332
+ value: B,
2333
+ onChange: (e) => H(e.target.value),
2334
+ children: Le.map((e) => /* @__PURE__ */ U("option", {
2222
2335
  value: e,
2223
2336
  children: _.type[e]
2224
2337
  }, e))
2225
2338
  })]
2226
2339
  }),
2227
- !v.has("status") && /* @__PURE__ */ U("div", {
2340
+ !v.has("status") && /* @__PURE__ */ W("div", {
2228
2341
  className: "space-y-1",
2229
- children: [/* @__PURE__ */ H("label", {
2342
+ children: [/* @__PURE__ */ U("label", {
2230
2343
  htmlFor: "pm-detail-status",
2231
2344
  className: $,
2232
2345
  children: _.statusLabel
2233
- }), /* @__PURE__ */ H("select", {
2346
+ }), /* @__PURE__ */ U("select", {
2234
2347
  id: "pm-detail-status",
2235
2348
  className: J(Q, "capitalize"),
2236
- value: ne,
2237
- onChange: (e) => ie(e.target.value),
2238
- children: Le.map((e) => /* @__PURE__ */ H("option", {
2349
+ value: K,
2350
+ onChange: (e) => re(e.target.value),
2351
+ children: Re.map((e) => /* @__PURE__ */ U("option", {
2239
2352
  value: e,
2240
2353
  children: _.status[e]
2241
2354
  }, e))
2242
2355
  })]
2243
2356
  }),
2244
- !v.has("priority") && /* @__PURE__ */ U("div", {
2357
+ !v.has("priority") && /* @__PURE__ */ W("div", {
2245
2358
  className: "space-y-1",
2246
- children: [/* @__PURE__ */ H("label", {
2359
+ children: [/* @__PURE__ */ U("label", {
2247
2360
  htmlFor: "pm-detail-priority",
2248
2361
  className: $,
2249
2362
  children: _.priorityLabel
2250
- }), /* @__PURE__ */ H("select", {
2363
+ }), /* @__PURE__ */ U("select", {
2251
2364
  id: "pm-detail-priority",
2252
2365
  className: J(Q, "capitalize"),
2253
2366
  value: ae,
2254
2367
  onChange: (e) => oe(e.target.value),
2255
- children: Fe.map((e) => /* @__PURE__ */ H("option", {
2368
+ children: Ie.map((e) => /* @__PURE__ */ U("option", {
2256
2369
  value: e,
2257
2370
  children: _.priority[e]
2258
2371
  }, e))
2259
2372
  })]
2260
2373
  }),
2261
- !v.has("assignee") && /* @__PURE__ */ U("div", {
2374
+ !v.has("assignee") && /* @__PURE__ */ W("div", {
2262
2375
  className: "space-y-1",
2263
- children: [/* @__PURE__ */ H("label", {
2376
+ children: [/* @__PURE__ */ U("label", {
2264
2377
  htmlFor: "pm-detail-assignee",
2265
2378
  className: $,
2266
2379
  children: _.assigneeLabel
2267
- }), c && c.length > 0 ? /* @__PURE__ */ U("select", {
2380
+ }), c && c.length > 0 ? /* @__PURE__ */ W("select", {
2268
2381
  id: "pm-detail-assignee",
2269
2382
  className: Q,
2270
2383
  value: se,
2271
2384
  onChange: (e) => ce(e.target.value),
2272
- children: [/* @__PURE__ */ H("option", {
2385
+ children: [/* @__PURE__ */ U("option", {
2273
2386
  value: "",
2274
2387
  children: _.unassigned
2275
- }), c.map((e) => /* @__PURE__ */ H("option", {
2388
+ }), c.map((e) => /* @__PURE__ */ U("option", {
2276
2389
  value: e.id,
2277
2390
  children: e.name
2278
2391
  }, e.id))]
2279
- }) : /* @__PURE__ */ H("input", {
2392
+ }) : /* @__PURE__ */ U("input", {
2280
2393
  id: "pm-detail-assignee",
2281
2394
  className: Q,
2282
2395
  value: se,
@@ -2284,44 +2397,44 @@ function At({ id: e, readonly: t, hiddenFields: n, hideHeader: r, onUpdated: i,
2284
2397
  placeholder: _.assigneePlaceholder
2285
2398
  })]
2286
2399
  }),
2287
- !v.has("dueDate") && /* @__PURE__ */ U("div", {
2400
+ !v.has("dueDate") && /* @__PURE__ */ W("div", {
2288
2401
  className: "space-y-1",
2289
- children: [/* @__PURE__ */ H("label", {
2402
+ children: [/* @__PURE__ */ U("label", {
2290
2403
  htmlFor: "pm-detail-due",
2291
2404
  className: $,
2292
2405
  children: _.dueDateLabel
2293
- }), /* @__PURE__ */ H("input", {
2406
+ }), /* @__PURE__ */ U("input", {
2294
2407
  id: "pm-detail-due",
2295
2408
  type: "date",
2296
2409
  className: Q,
2297
- value: de,
2298
- onChange: (e) => pe(e.target.value)
2410
+ value: le,
2411
+ onChange: (e) => fe(e.target.value)
2299
2412
  })]
2300
2413
  }),
2301
- !v.has("storyPoints") && /* @__PURE__ */ U("div", {
2414
+ !v.has("storyPoints") && /* @__PURE__ */ W("div", {
2302
2415
  className: "space-y-1",
2303
- children: [/* @__PURE__ */ H("label", {
2416
+ children: [/* @__PURE__ */ U("label", {
2304
2417
  htmlFor: "pm-detail-points",
2305
2418
  className: $,
2306
2419
  children: _.storyPointsLabel
2307
- }), /* @__PURE__ */ H("input", {
2420
+ }), /* @__PURE__ */ U("input", {
2308
2421
  id: "pm-detail-points",
2309
2422
  type: "number",
2310
2423
  min: 0,
2311
2424
  className: Q,
2312
- value: _e,
2425
+ value: ge,
2313
2426
  onChange: (e) => ve(e.target.value)
2314
2427
  })]
2315
2428
  })
2316
2429
  ]
2317
2430
  }),
2318
- !v.has("labels") && /* @__PURE__ */ U("div", {
2431
+ !v.has("labels") && /* @__PURE__ */ W("div", {
2319
2432
  className: "space-y-1",
2320
- children: [/* @__PURE__ */ H("label", {
2433
+ children: [/* @__PURE__ */ U("label", {
2321
2434
  htmlFor: "pm-detail-labels",
2322
2435
  className: $,
2323
2436
  children: _.labelsLabel
2324
- }), /* @__PURE__ */ H("input", {
2437
+ }), /* @__PURE__ */ U("input", {
2325
2438
  id: "pm-detail-labels",
2326
2439
  className: Q,
2327
2440
  value: me,
@@ -2329,7 +2442,7 @@ function At({ id: e, readonly: t, hiddenFields: n, hideHeader: r, onUpdated: i,
2329
2442
  placeholder: _.labelsPlaceholder
2330
2443
  })]
2331
2444
  }),
2332
- xe && /* @__PURE__ */ U("p", {
2445
+ xe && /* @__PURE__ */ W("p", {
2333
2446
  className: "text-sm text-destructive",
2334
2447
  children: [
2335
2448
  _.failedToSave,
@@ -2337,14 +2450,14 @@ function At({ id: e, readonly: t, hiddenFields: n, hideHeader: r, onUpdated: i,
2337
2450
  xe.message
2338
2451
  ]
2339
2452
  }),
2340
- /* @__PURE__ */ U("div", {
2453
+ /* @__PURE__ */ W("div", {
2341
2454
  className: "flex items-center justify-end gap-2",
2342
- children: [/* @__PURE__ */ H("button", {
2455
+ children: [/* @__PURE__ */ U("button", {
2343
2456
  type: "button",
2344
2457
  onClick: () => N(!1),
2345
2458
  className: "rounded-md bg-muted px-4 py-2 text-sm font-medium text-muted-foreground hover:bg-muted/70",
2346
2459
  children: _.cancel
2347
- }), /* @__PURE__ */ H("button", {
2460
+ }), /* @__PURE__ */ U("button", {
2348
2461
  type: "submit",
2349
2462
  disabled: be || !I.trim(),
2350
2463
  className: J("rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground", (be || !I.trim()) && "cursor-not-allowed opacity-50"),
@@ -2352,120 +2465,120 @@ function At({ id: e, readonly: t, hiddenFields: n, hideHeader: r, onUpdated: i,
2352
2465
  })]
2353
2466
  })
2354
2467
  ]
2355
- }) : /* @__PURE__ */ U("div", {
2468
+ }) : /* @__PURE__ */ W("div", {
2356
2469
  className: "space-y-6",
2357
- children: [/* @__PURE__ */ U("dl", {
2470
+ children: [/* @__PURE__ */ W("dl", {
2358
2471
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
2359
2472
  children: [
2360
- !v.has("type") && /* @__PURE__ */ H(jt, {
2473
+ !v.has("type") && /* @__PURE__ */ U(Pt, {
2361
2474
  label: _.typeLabel,
2362
- children: /* @__PURE__ */ H(Oe, {
2475
+ children: /* @__PURE__ */ U(ke, {
2363
2476
  variant: "secondary",
2364
2477
  children: _.type[T.type]
2365
2478
  })
2366
2479
  }),
2367
- !v.has("status") && /* @__PURE__ */ H(jt, {
2480
+ !v.has("status") && /* @__PURE__ */ U(Pt, {
2368
2481
  label: _.statusLabel,
2369
- children: /* @__PURE__ */ H("span", {
2482
+ children: /* @__PURE__ */ U("span", {
2370
2483
  className: "capitalize text-foreground",
2371
2484
  children: _.status[T.status]
2372
2485
  })
2373
2486
  }),
2374
- !v.has("priority") && /* @__PURE__ */ H(jt, {
2487
+ !v.has("priority") && /* @__PURE__ */ U(Pt, {
2375
2488
  label: _.priorityLabel,
2376
- children: /* @__PURE__ */ H(Oe, {
2377
- variant: kt[T.priority],
2489
+ children: /* @__PURE__ */ U(ke, {
2490
+ variant: Mt[T.priority],
2378
2491
  children: _.priority[T.priority]
2379
2492
  })
2380
2493
  }),
2381
- !v.has("assignee") && /* @__PURE__ */ H(jt, {
2494
+ !v.has("assignee") && /* @__PURE__ */ U(Pt, {
2382
2495
  label: _.assigneeLabel,
2383
- children: T.assigneeId ? /* @__PURE__ */ U("span", {
2496
+ children: T.assigneeId ? /* @__PURE__ */ W("span", {
2384
2497
  className: "flex items-center gap-1.5",
2385
- children: [/* @__PURE__ */ H(Ne, {
2498
+ children: [/* @__PURE__ */ U(Pe, {
2386
2499
  id: T.assigneeId,
2387
2500
  name: s?.(T.assigneeId)?.name,
2388
2501
  size: "sm"
2389
- }), /* @__PURE__ */ H("span", {
2502
+ }), /* @__PURE__ */ U("span", {
2390
2503
  className: "text-foreground",
2391
2504
  children: s?.(T.assigneeId)?.name ?? _.assigned
2392
2505
  })]
2393
- }) : /* @__PURE__ */ H("span", {
2506
+ }) : /* @__PURE__ */ U("span", {
2394
2507
  className: "text-muted-foreground",
2395
2508
  children: _.unassigned
2396
2509
  })
2397
2510
  }),
2398
- !v.has("dueDate") && /* @__PURE__ */ H(jt, {
2511
+ !v.has("dueDate") && /* @__PURE__ */ U(Pt, {
2399
2512
  label: _.dueDateLabel,
2400
- children: /* @__PURE__ */ H("span", {
2513
+ children: /* @__PURE__ */ U("span", {
2401
2514
  className: "text-foreground",
2402
- children: Te(T.dueDate) ?? "—"
2515
+ children: Ee(T.dueDate) ?? "—"
2403
2516
  })
2404
2517
  }),
2405
- !v.has("storyPoints") && /* @__PURE__ */ H(jt, {
2518
+ !v.has("storyPoints") && /* @__PURE__ */ U(Pt, {
2406
2519
  label: _.storyPointsLabel,
2407
- children: /* @__PURE__ */ H("span", {
2520
+ children: /* @__PURE__ */ U("span", {
2408
2521
  className: "text-foreground",
2409
2522
  children: T.storyPoints ?? 0
2410
2523
  })
2411
2524
  }),
2412
- !v.has("description") && /* @__PURE__ */ U("div", {
2525
+ !v.has("description") && /* @__PURE__ */ W("div", {
2413
2526
  className: "sm:col-span-2",
2414
- children: [/* @__PURE__ */ H("dt", {
2527
+ children: [/* @__PURE__ */ U("dt", {
2415
2528
  className: $,
2416
2529
  children: _.description
2417
- }), /* @__PURE__ */ H("dd", {
2530
+ }), /* @__PURE__ */ U("dd", {
2418
2531
  className: "mt-1 whitespace-pre-wrap text-sm text-foreground",
2419
2532
  children: T.description || "—"
2420
2533
  })]
2421
2534
  }),
2422
- !v.has("labels") && /* @__PURE__ */ U("div", {
2535
+ !v.has("labels") && /* @__PURE__ */ W("div", {
2423
2536
  className: "sm:col-span-2",
2424
- children: [/* @__PURE__ */ H("dt", {
2537
+ children: [/* @__PURE__ */ U("dt", {
2425
2538
  className: $,
2426
2539
  children: _.labelsLabel
2427
- }), /* @__PURE__ */ H("dd", {
2540
+ }), /* @__PURE__ */ U("dd", {
2428
2541
  className: "mt-1 flex flex-wrap gap-1",
2429
- children: (T.labels ?? []).length === 0 ? /* @__PURE__ */ H("span", {
2542
+ children: (T.labels ?? []).length === 0 ? /* @__PURE__ */ U("span", {
2430
2543
  className: "text-sm text-muted-foreground",
2431
2544
  children: "—"
2432
- }) : T.labels.map((e) => /* @__PURE__ */ H("span", {
2545
+ }) : T.labels.map((e) => /* @__PURE__ */ U("span", {
2433
2546
  className: "rounded bg-muted px-1.5 py-0.5 text-xs text-muted-foreground",
2434
2547
  children: e
2435
2548
  }, e))
2436
2549
  })]
2437
2550
  }),
2438
- D.length > 0 && /* @__PURE__ */ U("div", {
2551
+ D.length > 0 && /* @__PURE__ */ W("div", {
2439
2552
  className: "sm:col-span-2",
2440
- children: [/* @__PURE__ */ H("dt", {
2553
+ children: [/* @__PURE__ */ U("dt", {
2441
2554
  className: $,
2442
2555
  children: _.linkedRecordsLabel
2443
- }), /* @__PURE__ */ H("dd", {
2556
+ }), /* @__PURE__ */ U("dd", {
2444
2557
  className: "mt-1 flex flex-wrap gap-1.5",
2445
- children: D.map((e) => /* @__PURE__ */ H(ze, {
2558
+ children: D.map((e) => /* @__PURE__ */ U(Be, {
2446
2559
  link: e,
2447
2560
  renderIcon: u
2448
2561
  }, e.id))
2449
2562
  })]
2450
2563
  }),
2451
- k && /* @__PURE__ */ U("div", {
2564
+ k && /* @__PURE__ */ W("div", {
2452
2565
  className: "sm:col-span-2",
2453
- children: [/* @__PURE__ */ H("dt", {
2566
+ children: [/* @__PURE__ */ U("dt", {
2454
2567
  className: $,
2455
2568
  children: _.parentLabel
2456
- }), /* @__PURE__ */ H("dd", {
2569
+ }), /* @__PURE__ */ U("dd", {
2457
2570
  className: "mt-1",
2458
- children: /* @__PURE__ */ U("button", {
2571
+ children: /* @__PURE__ */ W("button", {
2459
2572
  type: "button",
2460
2573
  onClick: () => d?.(k.id),
2461
2574
  className: "inline-flex max-w-full items-center gap-1.5 rounded-md border border-border bg-muted/40 px-2 py-1 text-sm text-foreground hover:bg-muted",
2462
2575
  children: [
2463
- /* @__PURE__ */ H(Ge, { status: k.status }),
2464
- /* @__PURE__ */ H("span", {
2576
+ /* @__PURE__ */ U(Ke, { status: k.status }),
2577
+ /* @__PURE__ */ U("span", {
2465
2578
  className: "text-xs text-muted-foreground",
2466
2579
  children: k.key
2467
2580
  }),
2468
- /* @__PURE__ */ H("span", {
2581
+ /* @__PURE__ */ U("span", {
2469
2582
  className: "truncate",
2470
2583
  children: k.title
2471
2584
  })
@@ -2473,14 +2586,14 @@ function At({ id: e, readonly: t, hiddenFields: n, hideHeader: r, onUpdated: i,
2473
2586
  })
2474
2587
  })]
2475
2588
  }),
2476
- (j.length > 0 || f && Ae) && /* @__PURE__ */ U("div", {
2589
+ (j.length > 0 || f && Ae) && /* @__PURE__ */ W("div", {
2477
2590
  className: "sm:col-span-2",
2478
- children: [/* @__PURE__ */ U("div", {
2591
+ children: [/* @__PURE__ */ W("div", {
2479
2592
  className: "flex items-center justify-between",
2480
- children: [/* @__PURE__ */ U("dt", {
2593
+ children: [/* @__PURE__ */ W("dt", {
2481
2594
  className: $,
2482
2595
  children: [_.subtasksLabel, j.length > 0 ? ` (${j.length})` : ""]
2483
- }), f && Ae && /* @__PURE__ */ U("button", {
2596
+ }), f && Ae && /* @__PURE__ */ W("button", {
2484
2597
  type: "button",
2485
2598
  onClick: () => f({
2486
2599
  id: T.id,
@@ -2489,22 +2602,22 @@ function At({ id: e, readonly: t, hiddenFields: n, hideHeader: r, onUpdated: i,
2489
2602
  className: "text-xs font-medium text-primary hover:underline",
2490
2603
  children: ["+ ", _.addSubtask]
2491
2604
  })]
2492
- }), /* @__PURE__ */ H("dd", {
2605
+ }), /* @__PURE__ */ U("dd", {
2493
2606
  className: "mt-1 space-y-1",
2494
- children: j.length === 0 ? /* @__PURE__ */ H("span", {
2607
+ children: j.length === 0 ? /* @__PURE__ */ U("span", {
2495
2608
  className: "text-sm text-muted-foreground",
2496
2609
  children: "—"
2497
- }) : j.map((e) => /* @__PURE__ */ U("button", {
2610
+ }) : j.map((e) => /* @__PURE__ */ W("button", {
2498
2611
  type: "button",
2499
2612
  onClick: () => d?.(e.id),
2500
2613
  className: "flex w-full items-center gap-2 rounded-md px-2 py-1 text-left text-sm hover:bg-muted",
2501
2614
  children: [
2502
- /* @__PURE__ */ H(Ge, { status: e.status }),
2503
- /* @__PURE__ */ H("span", {
2615
+ /* @__PURE__ */ U(Ke, { status: e.status }),
2616
+ /* @__PURE__ */ U("span", {
2504
2617
  className: "text-xs text-muted-foreground",
2505
2618
  children: e.key
2506
2619
  }),
2507
- /* @__PURE__ */ H("span", {
2620
+ /* @__PURE__ */ U("span", {
2508
2621
  className: "flex-1 truncate text-foreground",
2509
2622
  children: e.title
2510
2623
  })
@@ -2512,26 +2625,27 @@ function At({ id: e, readonly: t, hiddenFields: n, hideHeader: r, onUpdated: i,
2512
2625
  }, e.id))
2513
2626
  })]
2514
2627
  }),
2515
- (T.createdAt || T.updatedAt) && /* @__PURE__ */ U("div", {
2628
+ (T.createdAt || T.updatedAt) && /* @__PURE__ */ W("div", {
2516
2629
  className: "flex flex-wrap gap-x-6 gap-y-1 border-t border-border pt-3 text-xs text-muted-foreground sm:col-span-2",
2517
- children: [T.createdAt && /* @__PURE__ */ U("span", { children: [
2630
+ children: [T.createdAt && /* @__PURE__ */ W("span", { children: [
2518
2631
  _.createdLabel,
2519
2632
  " ",
2520
- Te(T.createdAt)
2521
- ] }), T.updatedAt && /* @__PURE__ */ U("span", { children: [
2633
+ Ee(T.createdAt)
2634
+ ] }), T.updatedAt && /* @__PURE__ */ W("span", { children: [
2522
2635
  _.updatedLabel,
2523
2636
  " ",
2524
- Te(T.updatedAt)
2637
+ Ee(T.updatedAt)
2525
2638
  ] })]
2526
2639
  })
2527
2640
  ]
2528
- }), p && /* @__PURE__ */ H("div", {
2641
+ }), p && /* @__PURE__ */ U("div", {
2529
2642
  className: "border-t border-border pt-4",
2530
- children: /* @__PURE__ */ H(Ot, {
2643
+ children: /* @__PURE__ */ U(jt, {
2531
2644
  entityType: p,
2532
2645
  entityId: T.id,
2533
2646
  currentActorId: m,
2534
- resolveAssignee: s
2647
+ resolveAssignee: s,
2648
+ members: c
2535
2649
  })
2536
2650
  })]
2537
2651
  })
@@ -2539,29 +2653,29 @@ function At({ id: e, readonly: t, hiddenFields: n, hideHeader: r, onUpdated: i,
2539
2653
  })
2540
2654
  });
2541
2655
  }
2542
- function jt({ label: e, children: t }) {
2543
- return /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("dt", {
2656
+ function Pt({ label: e, children: t }) {
2657
+ return /* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("dt", {
2544
2658
  className: $,
2545
2659
  children: e
2546
- }), /* @__PURE__ */ H("dd", {
2660
+ }), /* @__PURE__ */ U("dd", {
2547
2661
  className: "mt-1 text-sm",
2548
2662
  children: t
2549
2663
  })] });
2550
2664
  }
2551
- function Mt({ workspaceId: e, projectId: t, boardProjectId: n, columns: r, readonly: i, hiddenFields: a, views: o, defaultView: s = "board", confirmMove: c, resolveAssignee: l, linkSourceProduct: u, renderLinkIcon: d, assigneeOptions: f, currentActorId: p, commentsEntityType: m, labels: h, openItemId: g, header: v, onTaskSaved: b, createSurface: S = "modal", detailSurface: C = "drawer", className: w }) {
2552
- let T = ae(), E = e ?? T?.workspaceId, D = te(), O = Ue(h), [k, A] = x(s), [j, M] = x(""), [N, P] = x("ALL"), [F, I] = x("ALL"), [L, R] = x(!1), [z, B] = x(!1), [V, W] = x(null), [ee, G] = x(null);
2665
+ function Ft({ workspaceId: e, projectId: t, boardProjectId: n, columns: r, readonly: i, hiddenFields: a, views: o, defaultView: s = "board", confirmMove: c, resolveAssignee: l, linkSourceProduct: u, renderLinkIcon: d, assigneeOptions: f, currentActorId: p, commentsEntityType: m, labels: h, openItemId: g, header: v, onTaskSaved: b, createSurface: x = "modal", detailSurface: C = "drawer", className: w }) {
2666
+ let T = oe(), E = e ?? T?.workspaceId, D = te(), O = We(h), [k, A] = S(s), [j, M] = S(""), [N, P] = S("ALL"), [F, I] = S("ALL"), [L, R] = S(!1), [z, B] = S(!1), [V, H] = S(null), [ee, G] = S(null);
2553
2667
  y(() => {
2554
- g && W(g);
2668
+ g && H(g);
2555
2669
  }, [g]);
2556
2670
  let K = _(() => {
2557
- D.refetchQueries({ include: [le] }).catch(() => {});
2558
- }, [D]), q = _((e) => {
2671
+ D.refetchQueries({ include: [ue] }).catch(() => {});
2672
+ }, [D]), ne = _((e) => {
2559
2673
  K(), B(!1), G(null), b?.({
2560
2674
  workItem: e,
2561
2675
  operation: "created"
2562
2676
  });
2563
- }, [K, b]), ne = _((e) => {
2564
- W(null), G({
2677
+ }, [K, b]), q = _((e) => {
2678
+ H(null), G({
2565
2679
  parentId: e.id,
2566
2680
  projectId: e.projectId,
2567
2681
  type: "SUB_TASK"
@@ -2570,29 +2684,29 @@ function Mt({ workspaceId: e, projectId: t, boardProjectId: n, columns: r, reado
2570
2684
  G(null), B(!0);
2571
2685
  }, []), ie = _(() => {
2572
2686
  B(!1), G(null);
2573
- }, []), oe = _((e) => {
2687
+ }, []), ae = _((e) => {
2574
2688
  K(), b?.({
2575
2689
  workItem: e,
2576
2690
  operation: "updated"
2577
2691
  });
2578
2692
  }, [K, b]), se = _(() => {
2579
- W(null);
2693
+ H(null);
2580
2694
  }, []), ce = _((e) => {
2581
- W(e.id);
2582
- }, []), ue = _((e) => W(e), []);
2583
- if (!E) return /* @__PURE__ */ H("div", {
2695
+ H(e.id);
2696
+ }, []), le = _((e) => H(e), []);
2697
+ if (!E) return /* @__PURE__ */ U("div", {
2584
2698
  className: J("p-6 text-sm text-destructive", w),
2585
2699
  children: "TasksPage: no workspaceId provided (prop or PlanMagnetProvider)."
2586
2700
  });
2587
- let de = !i && !!t, fe = z && S === "inline", pe = V != null && C === "inline", me = /* @__PURE__ */ H(ct, {
2701
+ let de = !i && !!t, fe = z && x === "inline", pe = V != null && C === "inline", me = /* @__PURE__ */ U(lt, {
2588
2702
  workspaceId: E,
2589
2703
  projectId: t,
2590
2704
  assigneeOptions: f,
2591
2705
  hiddenFields: a,
2592
2706
  defaultValues: ee ?? void 0,
2593
- onCreated: q,
2707
+ onCreated: ne,
2594
2708
  onCancel: ie
2595
- }), he = V == null ? null : /* @__PURE__ */ H(At, {
2709
+ }), he = V == null ? null : /* @__PURE__ */ U(Nt, {
2596
2710
  id: V,
2597
2711
  readonly: i,
2598
2712
  hiddenFields: a,
@@ -2600,10 +2714,10 @@ function Mt({ workspaceId: e, projectId: t, boardProjectId: n, columns: r, reado
2600
2714
  assigneeOptions: f,
2601
2715
  linkSourceProduct: u,
2602
2716
  renderLinkIcon: d,
2603
- onUpdated: oe,
2717
+ onUpdated: ae,
2604
2718
  onDeleted: se,
2605
- onOpenItem: ue,
2606
- onAddSubtask: ne,
2719
+ onOpenItem: le,
2720
+ onAddSubtask: q,
2607
2721
  commentsEntityType: m,
2608
2722
  currentActorId: p
2609
2723
  }), ge = N === "ALL" ? void 0 : N, _e = F === "ALL" ? void 0 : F, ve = L && p ? p : void 0, ye = u ? [
@@ -2614,19 +2728,19 @@ function Mt({ workspaceId: e, projectId: t, boardProjectId: n, columns: r, reado
2614
2728
  "dueDate",
2615
2729
  "linkedRecord"
2616
2730
  ] : void 0;
2617
- return /* @__PURE__ */ H(He, {
2731
+ return /* @__PURE__ */ U(Ue, {
2618
2732
  value: O,
2619
- children: /* @__PURE__ */ U("div", {
2733
+ children: /* @__PURE__ */ W("div", {
2620
2734
  className: J("space-y-4 p-6", w),
2621
2735
  children: [
2622
- v && /* @__PURE__ */ H("div", {
2736
+ v && /* @__PURE__ */ U("div", {
2623
2737
  className: "min-w-0",
2624
- children: typeof v == "string" ? /* @__PURE__ */ H("h1", {
2738
+ children: typeof v == "string" ? /* @__PURE__ */ U("h1", {
2625
2739
  className: "truncate text-2xl font-semibold text-foreground",
2626
2740
  children: v
2627
2741
  }) : v
2628
2742
  }),
2629
- /* @__PURE__ */ H(Tt, {
2743
+ /* @__PURE__ */ U(Et, {
2630
2744
  view: k,
2631
2745
  onViewChange: A,
2632
2746
  views: o,
@@ -2641,8 +2755,8 @@ function Mt({ workspaceId: e, projectId: t, boardProjectId: n, columns: r, reado
2641
2755
  mine: L,
2642
2756
  onMineChange: p ? R : void 0
2643
2757
  }),
2644
- fe && /* @__PURE__ */ H("div", { children: me }),
2645
- k === "board" && /* @__PURE__ */ H(it, {
2758
+ fe && /* @__PURE__ */ U("div", { children: me }),
2759
+ k === "board" && /* @__PURE__ */ U(at, {
2646
2760
  workspaceId: E,
2647
2761
  projectId: n,
2648
2762
  columns: r,
@@ -2659,7 +2773,7 @@ function Mt({ workspaceId: e, projectId: t, boardProjectId: n, columns: r, reado
2659
2773
  renderLinkIcon: d,
2660
2774
  onTaskClick: ce
2661
2775
  }),
2662
- k === "list" && /* @__PURE__ */ H(mt, {
2776
+ k === "list" && /* @__PURE__ */ U(ht, {
2663
2777
  workspaceId: E,
2664
2778
  projectId: n,
2665
2779
  priority: ge,
@@ -2671,9 +2785,9 @@ function Mt({ workspaceId: e, projectId: t, boardProjectId: n, columns: r, reado
2671
2785
  linkSourceProduct: u,
2672
2786
  renderLinkIcon: d,
2673
2787
  columns: ye ? [...ye] : void 0,
2674
- onSelect: ue
2788
+ onSelect: le
2675
2789
  }),
2676
- k === "timeline" && /* @__PURE__ */ H(bt, {
2790
+ k === "timeline" && /* @__PURE__ */ U(xt, {
2677
2791
  workspaceId: E,
2678
2792
  projectId: n,
2679
2793
  priority: N,
@@ -2681,27 +2795,27 @@ function Mt({ workspaceId: e, projectId: t, boardProjectId: n, columns: r, reado
2681
2795
  search: j,
2682
2796
  assigneeId: ve,
2683
2797
  resolveAssignee: l,
2684
- onSelect: ue
2798
+ onSelect: le
2685
2799
  }),
2686
- pe && /* @__PURE__ */ H("div", {
2800
+ pe && /* @__PURE__ */ U("div", {
2687
2801
  className: "pb-6",
2688
2802
  children: he
2689
2803
  }),
2690
- S === "modal" && /* @__PURE__ */ H($e, {
2804
+ x === "modal" && /* @__PURE__ */ U(et, {
2691
2805
  open: z,
2692
2806
  onClose: ie,
2693
2807
  ariaLabel: "Create task",
2694
2808
  className: "max-w-xl",
2695
- children: /* @__PURE__ */ H("div", {
2809
+ children: /* @__PURE__ */ U("div", {
2696
2810
  className: "p-2 pt-8",
2697
2811
  children: me
2698
2812
  })
2699
2813
  }),
2700
- C === "drawer" && /* @__PURE__ */ H(et, {
2814
+ C === "drawer" && /* @__PURE__ */ U(tt, {
2701
2815
  open: V != null,
2702
- onClose: () => W(null),
2816
+ onClose: () => H(null),
2703
2817
  ariaLabel: "Task detail",
2704
- children: /* @__PURE__ */ H("div", {
2818
+ children: /* @__PURE__ */ U("div", {
2705
2819
  className: "p-2 pt-8",
2706
2820
  children: he
2707
2821
  })
@@ -2711,6 +2825,6 @@ function Mt({ workspaceId: e, projectId: t, boardProjectId: n, columns: r, reado
2711
2825
  });
2712
2826
  }
2713
2827
  //#endregion
2714
- export { ct as CreateTaskCore, Mt as TasksPageCore };
2828
+ export { lt as CreateTaskCore, Ft as TasksPageCore };
2715
2829
 
2716
2830
  //# sourceMappingURL=index.js.map