@commentkit/comment-kit 0.7.2 → 0.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/angular.es.js +2 -2
  3. package/dist/comment-kit.es.js +3 -3
  4. package/dist/demo.es.js +2 -2
  5. package/dist/headless.es.js +2 -2
  6. package/dist/preact.es.js +2 -2
  7. package/dist/qwik.qwik.mjs +2 -2
  8. package/dist/react.es.js +2 -2
  9. package/dist/shared/{annotation-toolbar-CZI1KVdW.js → annotation-toolbar-CpPKy0oq.js} +2 -2
  10. package/dist/shared/{attachment-refresh-mQw-L7hB.js → attachment-refresh-DmVkfPtl.js} +1 -1
  11. package/dist/shared/{capture-colors-CxSLsU5-.js → capture-colors-D0uLr-vZ.js} +12 -2
  12. package/dist/shared/{comment-drawing-canvas-CYFFKgCm.js → comment-drawing-canvas-zIPS1dnW.js} +2 -2
  13. package/dist/shared/{comment-image-lightbox-DmTNxuqX.js → comment-image-lightbox-CdMNf0_y.js} +2 -2
  14. package/dist/shared/{comment-images-content-BX4DQ9Ol.js → comment-images-content-DqeqmQnb.js} +3 -3
  15. package/dist/shared/{comment-kit-core-VuIidMeu.js → comment-kit-core-C-0JJS2i.js} +8 -8
  16. package/dist/shared/{comment-kit-ui-BjJ1ZLiv.js → comment-kit-ui-CBaz7L3u.js} +370 -357
  17. package/dist/shared/{comment-screenshot-annotator-CMOG1md7.js → comment-screenshot-annotator-CuYmKafz.js} +2 -2
  18. package/dist/shared/{comment-screenshot-overlay-iWW-V-Iw.js → comment-screenshot-overlay-Dw81osel.js} +16 -13
  19. package/dist/shared/{dev-export-panel-CrRENbMn.js → dev-export-panel-D08M2LKD.js} +1 -1
  20. package/dist/shared/{dev-grab-Ca4MlS2Y.js → dev-grab-BJLZZ2xU.js} +1 -1
  21. package/dist/shared/{element-selector-g1bTvdEA.js → element-selector-Biyn2cpR.js} +2 -2
  22. package/dist/shared/{mount-ui-Dz5QLq4W.js → mount-ui-DXdL3p9b.js} +4 -4
  23. package/dist/shared/{pusher-ue0D83de.js → pusher-D4M5K6Dk.js} +1 -1
  24. package/dist/shared/{realtime-CieWAnsW.js → realtime-BTqYEy8s.js} +2 -2
  25. package/dist/shared/{shadow-root-Cv1aLuFf.js → shadow-root-C58Ap5Nu.js} +1 -1
  26. package/dist/shared/{token-session-CPQpt3-u.js → token-session-D0Y_HZw0.js} +1 -1
  27. package/dist/shared/{websocket-manager-BnK55c3U.js → websocket-manager-BFKa95TO.js} +2 -2
  28. package/dist/solid.es.js +2 -2
  29. package/dist/svelte.es.js +2 -2
  30. package/dist/vue.es.js +2 -2
  31. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
- import { o as e } from "./websocket-manager-BnK55c3U.js";
1
+ import { o as e } from "./websocket-manager-BFKa95TO.js";
2
2
  import { c as t, u as n } from "./validation-3wbbbuX0.js";
3
- import { c as r, d as i, s as a, u as o } from "./comment-kit-core-VuIidMeu.js";
3
+ import { c as r, d as i, s as a, u as o } from "./comment-kit-core-C-0JJS2i.js";
4
4
  import { a as s, f as c, i as l, m as u, n as d, o as f } from "./dom-Bhf4WFtY.js";
5
5
  import { i as p } from "./text-B4HHZNaa.js";
6
- import { a as m, i as h, o as g, r as _ } from "./mount-ui-Dz5QLq4W.js";
6
+ import { a as m, i as h, o as g, r as _ } from "./mount-ui-DXdL3p9b.js";
7
7
  import { n as v, t as y } from "./dist-De294MVF.js";
8
8
  import { B as b, C as x, D as S, I as C, L as w, O as T, R as E, T as D, V as O, _ as k, a as A, c as j, d as M, f as N, g as P, h as F, i as I, k as L, l as R, m as z, n as B, o as V, r as H, s as U, t as W, u as G, w as K, z as ee } from "./button-By0hGrJK.js";
9
9
  import { $ as te, $t as q, A as ne, At as re, B as ie, C as ae, Ct as J, D as oe, E as se, Et as ce, F as le, Ft as ue, G as de, H as fe, I as pe, It as me, J as he, Jt as ge, K as _e, L as ve, Lt as ye, M as be, Mt as xe, N as Se, O as Ce, Ot as we, P as Te, Pt as Ee, Q as De, Qt as Oe, R as ke, S as Ae, St as je, T as Me, Tt as Ne, V as Pe, W as Fe, Wt as Ie, X as Le, Xt as Re, Y as ze, Yt as Be, Zt as Ve, _ as He, _t as Ue, a as We, an as Ge, b as Ke, bt as qe, c as Je, cn as Ye, ct as Xe, d as Ze, dn as Qe, dt as $e, en as et, et as tt, f as nt, fn as rt, ft as it, g as at, gt as ot, h as st, ht as ct, i as lt, in as ut, j as dt, jt as ft, k as pt, kt as mt, l as ht, ln as gt, m as _t, mt as vt, n as yt, nn as bt, o as xt, on as St, p as Ct, pn as wt, pt as Y, q as Tt, qt as Et, r as Dt, rn as Ot, s as kt, sn as At, st as jt, t as Mt, u as Nt, un as Pt, v as Ft, vt as It, w as Lt, xt as Rt, y as zt, yt as Bt, z as Vt } from "./separator-aphZiRoJ.js";
@@ -3281,7 +3281,7 @@ function zo({ load: e, label: t, children: n, onCancel: r, needed: i = !0, inlin
3281
3281
  ]
3282
3282
  }) : null;
3283
3283
  }
3284
- var Bo = () => import("./comment-images-content-BX4DQ9Ol.js"), Vo = Z.memo(function({ images: e }) {
3284
+ var Bo = () => import("./comment-images-content-DqeqmQnb.js"), Vo = Z.memo(function({ images: e }) {
3285
3285
  return e.length === 0 ? null : /* @__PURE__ */ Q(zo, {
3286
3286
  load: Bo,
3287
3287
  label: "attachments",
@@ -8644,7 +8644,7 @@ function Lf({ mode: e = "reply", defaultValue: t = "", defaultExtras: n, allowMe
8644
8644
  }
8645
8645
  };
8646
8646
  }
8647
- var Rf = 2e3, zf = Z.lazy(() => import("./comment-image-lightbox-DmTNxuqX.js").then((e) => ({ default: e.CommentImageLightbox }))), Bf = Z.memo(function({ mode: e = "reply", defaultValue: t = "", defaultExtras: n, allowMetadata: r = !0, images: i, availableUsers: a, highlightedText: o, quote: s, onClearQuote: c, uploads: l, onCancelUpload: u, onRetryUpload: d, onSubmit: f, onCancel: p, placeholder: m = "Reply...", disabled: h = !1 }) {
8647
+ var Rf = 2e3, zf = Z.lazy(() => import("./comment-image-lightbox-CdMNf0_y.js").then((e) => ({ default: e.CommentImageLightbox }))), Bf = Z.memo(function({ mode: e = "reply", defaultValue: t = "", defaultExtras: n, allowMetadata: r = !0, images: i, availableUsers: a, highlightedText: o, quote: s, onClearQuote: c, uploads: l, onCancelUpload: u, onRetryUpload: d, onSubmit: f, onCancel: p, placeholder: m = "Reply...", disabled: h = !1 }) {
8648
8648
  let g = Z.useRef(null), _ = Lf({
8649
8649
  mode: e,
8650
8650
  defaultValue: t,
@@ -9173,7 +9173,7 @@ var ap = Z.memo(function({ enabled: e, availableUsers: t, onSubmit: n }) {
9173
9173
  children: e.author.name
9174
9174
  })]
9175
9175
  })] });
9176
- }), sp = () => import("./comment-drawing-canvas-CYFFKgCm.js"), cp = () => import("./comment-screenshot-overlay-iWW-V-Iw.js");
9176
+ }), sp = () => import("./comment-drawing-canvas-zIPS1dnW.js"), cp = () => import("./comment-screenshot-overlay-Dw81osel.js");
9177
9177
  function lp(e) {
9178
9178
  try {
9179
9179
  return e.getFeatures();
@@ -9227,7 +9227,7 @@ function dp({ core: e, state: t, remoteCursors: n, onScreenshotSave: r }) {
9227
9227
  label: "screenshot tools",
9228
9228
  onCancel: () => e.setTool(null),
9229
9229
  children: ({ CommentScreenshotOverlay: t }) => /* @__PURE__ */ Q(t, {
9230
- capturePage: s,
9230
+ capturePage: e.getConfig().screenshotProvider ? s : void 0,
9231
9231
  availableUsers: o,
9232
9232
  onCancel: () => {
9233
9233
  e.setTool(null);
@@ -13412,7 +13412,7 @@ function Sv(e) {
13412
13412
  function Cv({ core: e, state: t, view: n, threads: r, activeThread: i, onlineUsers: a, settings: o, onCopyUrl: s, onLocate: c }) {
13413
13413
  let l = () => {
13414
13414
  e.getState().isSidebarVisible && e.toggleSidebar();
13415
- };
13415
+ }, u = e.getWriteAccess(), d = i && u.canWrite && (u.canManageComments || i.parent.author.id === t.currentUser?.id);
13416
13416
  return {
13417
13417
  view: n,
13418
13418
  threads: r,
@@ -13466,9 +13466,9 @@ function Cv({ core: e, state: t, view: n, threads: r, activeThread: i, onlineUse
13466
13466
  commentId: a === "reply" ? i?.id ?? t : t
13467
13467
  }));
13468
13468
  },
13469
- onChecklistToggle: (t, n) => {
13470
- i && wr(e, i.id, t, n);
13471
- },
13469
+ onChecklistToggle: d ? async (t, n) => {
13470
+ Sv(await wr(e, i.id, t, n));
13471
+ } : void 0,
13472
13472
  onReact: async (t, n, r) => {
13473
13473
  r === "reply" ? i && await e.reactToComment(i.id, n, t) : await e.reactToComment(t, n);
13474
13474
  },
@@ -15541,7 +15541,7 @@ function db({ onMarkComplete: e, fullWidth: t }) {
15541
15541
  });
15542
15542
  }
15543
15543
  function fb({ thread: e, description: t, onMarkComplete: n, onChecklistToggle: r, onReact: i }) {
15544
- let a = Z.useId(), o = Z.useId(), s = e.assignees, c = s.length > 0, l = e.checklistTotal, u = e.checklistDone, d = l > 0, f = d ? Math.round(u / l * 100) : 0, p = e.status === "resolved" && !!n, m = e.parent.createdAt || e.parent.timestamp, h = e.parent.updatedAt && e.parent.updatedAt !== e.parent.createdAt ? e.parent.updatedAt : void 0, g = !!(m || h || e.resolvedAt || e.completedAt), _ = e.parent.images, v = e.checklist ?? [], y = e.drawingData, b = e.parent.reactions;
15544
+ let a = Z.useId(), o = Z.useId(), [s, c] = Z.useState(!1), l = e.assignees, u = l.length > 0, d = e.checklistTotal, f = e.checklistDone, p = d > 0, m = p ? Math.round(f / d * 100) : 0, h = e.status === "resolved" && !!n, g = e.parent.createdAt || e.parent.timestamp, _ = e.parent.updatedAt && e.parent.updatedAt !== e.parent.createdAt ? e.parent.updatedAt : void 0, y = !!(g || _ || e.resolvedAt || e.completedAt), b = e.parent.images, x = e.checklist ?? [], S = e.drawingData, C = e.parent.reactions;
15545
15545
  return /* @__PURE__ */ $(lr, { children: [
15546
15546
  t || e.description ? /* @__PURE__ */ $("div", {
15547
15547
  className: "ck-thread-meta-block",
@@ -15556,7 +15556,7 @@ function fb({ thread: e, description: t, onMarkComplete: n, onChecklistToggle: r
15556
15556
  children: t || e.description
15557
15557
  })]
15558
15558
  }) : null,
15559
- c ? /* @__PURE__ */ $("div", {
15559
+ u ? /* @__PURE__ */ $("div", {
15560
15560
  className: "ck-thread-meta-assignees",
15561
15561
  children: [
15562
15562
  /* @__PURE__ */ Q(cb, {}),
@@ -15564,14 +15564,14 @@ function fb({ thread: e, description: t, onMarkComplete: n, onChecklistToggle: r
15564
15564
  className: "ck-thread-meta-label ck-thread-meta-label--shrink",
15565
15565
  children: "Assigned to"
15566
15566
  }),
15567
- /* @__PURE__ */ Q(Xs, { children: s.map((e) => /* @__PURE__ */ Q(ay, { user: e }, e.id)) }),
15567
+ /* @__PURE__ */ Q(Xs, { children: l.map((e) => /* @__PURE__ */ Q(ay, { user: e }, e.id)) }),
15568
15568
  /* @__PURE__ */ Q("span", {
15569
15569
  className: "ck-thread-meta-assignee-names",
15570
- children: s.map((e) => e.name).join(", ")
15570
+ children: l.map((e) => e.name).join(", ")
15571
15571
  })
15572
15572
  ]
15573
15573
  }) : null,
15574
- d ? /* @__PURE__ */ $("div", {
15574
+ p ? /* @__PURE__ */ $("div", {
15575
15575
  className: "ck-thread-meta-block ck-thread-meta-block--checklist",
15576
15576
  children: [
15577
15577
  /* @__PURE__ */ $("div", {
@@ -15583,29 +15583,39 @@ function fb({ thread: e, description: t, onMarkComplete: n, onChecklistToggle: r
15583
15583
  }),
15584
15584
  /* @__PURE__ */ Q(Uy, {
15585
15585
  className: "ck-thread-meta-progress",
15586
- value: f,
15586
+ value: m,
15587
15587
  children: /* @__PURE__ */ $("div", {
15588
15588
  className: "ck-thread-meta-progress-labels",
15589
15589
  children: [/* @__PURE__ */ $(Ky, { children: [
15590
- u,
15590
+ f,
15591
15591
  " of ",
15592
- l,
15592
+ d,
15593
15593
  " done"
15594
15594
  ] }), /* @__PURE__ */ Q(qy, {})]
15595
15595
  })
15596
15596
  }),
15597
15597
  /* @__PURE__ */ Q(Ko, {
15598
15598
  className: "ck-thread-meta-checks",
15599
- children: v.map((e) => /* @__PURE__ */ $(qo, {
15599
+ "aria-busy": s,
15600
+ children: x.map((e) => /* @__PURE__ */ $(qo, {
15600
15601
  orientation: "horizontal",
15601
- "data-disabled": !r || void 0,
15602
+ "data-disabled": !r || s ? !0 : void 0,
15602
15603
  children: [/* @__PURE__ */ Q(Ls, {
15603
15604
  id: `${a}-${e.id}`,
15604
15605
  checked: e.done,
15605
- disabled: !r,
15606
- "aria-disabled": !r,
15607
- onCheckedChange: (t) => {
15608
- r?.(e.id, t === !0);
15606
+ disabled: !r || s,
15607
+ "aria-disabled": !r || s,
15608
+ onCheckedChange: async (t) => {
15609
+ if (r && !s) {
15610
+ c(!0);
15611
+ try {
15612
+ await r(e.id, t === !0);
15613
+ } catch {
15614
+ v.error("Could not update this checklist. Try again.");
15615
+ } finally {
15616
+ c(!1);
15617
+ }
15618
+ }
15609
15619
  }
15610
15620
  }), /* @__PURE__ */ Q(Yo, {
15611
15621
  htmlFor: `${a}-${e.id}`,
@@ -15614,23 +15624,23 @@ function fb({ thread: e, description: t, onMarkComplete: n, onChecklistToggle: r
15614
15624
  })]
15615
15625
  }, e.id))
15616
15626
  }),
15617
- p && n ? /* @__PURE__ */ Q(db, {
15627
+ h && n ? /* @__PURE__ */ Q(db, {
15618
15628
  onMarkComplete: n,
15619
15629
  fullWidth: !1
15620
15630
  }) : null
15621
15631
  ]
15622
15632
  }) : null,
15623
- p && !d && n ? /* @__PURE__ */ Q(db, {
15633
+ h && !p && n ? /* @__PURE__ */ Q(db, {
15624
15634
  onMarkComplete: n,
15625
15635
  fullWidth: !0
15626
15636
  }) : null,
15627
- _.length > 0 ? /* @__PURE__ */ Q(Vo, { images: _ }) : null,
15628
- y && y.paths.length > 0 ? /* @__PURE__ */ $("div", {
15637
+ b.length > 0 ? /* @__PURE__ */ Q(Vo, { images: b }) : null,
15638
+ S && S.paths.length > 0 ? /* @__PURE__ */ $("div", {
15629
15639
  className: "ck-thread-meta-drawing",
15630
15640
  children: [/* @__PURE__ */ $("svg", {
15631
- viewBox: `0 0 ${String(y.viewport.width)} ${String(y.viewport.height)}`,
15641
+ viewBox: `0 0 ${String(S.viewport.width)} ${String(S.viewport.height)}`,
15632
15642
  className: "ck-thread-meta-drawing-svg",
15633
- style: { "--ck-aspect": `${String(y.viewport.width)} / ${String(y.viewport.height)}` },
15643
+ style: { "--ck-aspect": `${String(S.viewport.width)} / ${String(S.viewport.height)}` },
15634
15644
  "aria-label": "Drawing annotation",
15635
15645
  children: [
15636
15646
  /* @__PURE__ */ Q("defs", { children: /* @__PURE__ */ Q("pattern", {
@@ -15650,24 +15660,24 @@ function fb({ thread: e, description: t, onMarkComplete: n, onChecklistToggle: r
15650
15660
  height: "100%",
15651
15661
  fill: `url(#${o})`
15652
15662
  }),
15653
- y.paths.map((e, t) => /* @__PURE__ */ Q(ab, { path: e }, `${e.type}-${String(t)}`))
15663
+ S.paths.map((e, t) => /* @__PURE__ */ Q(ab, { path: e }, `${e.type}-${String(t)}`))
15654
15664
  ]
15655
15665
  }), /* @__PURE__ */ $("div", {
15656
15666
  className: "ck-thread-meta-drawing-caption",
15657
15667
  children: [
15658
15668
  /* @__PURE__ */ $("span", { children: [
15659
- y.paths.length,
15669
+ S.paths.length,
15660
15670
  " ",
15661
- y.paths.length === 1 ? "stroke" : "strokes"
15671
+ S.paths.length === 1 ? "stroke" : "strokes"
15662
15672
  ] }),
15663
15673
  /* @__PURE__ */ Q("span", {
15664
15674
  "aria-hidden": "true",
15665
15675
  children: "·"
15666
15676
  }),
15667
15677
  /* @__PURE__ */ $("span", { children: [
15668
- y.viewport.width,
15678
+ S.viewport.width,
15669
15679
  "×",
15670
- y.viewport.height
15680
+ S.viewport.height
15671
15681
  ] })
15672
15682
  ]
15673
15683
  })]
@@ -15677,27 +15687,27 @@ function fb({ thread: e, description: t, onMarkComplete: n, onChecklistToggle: r
15677
15687
  path: e.pageRef.path,
15678
15688
  url: e.pageRef.url
15679
15689
  }) : null,
15680
- b && b.length > 0 ? /* @__PURE__ */ Q(K_, {
15681
- reactions: b,
15690
+ C && C.length > 0 ? /* @__PURE__ */ Q(K_, {
15691
+ reactions: C,
15682
15692
  onAddReaction: /^temp_(?:reply_)?/.test(e.parent.id) ? void 0 : i,
15683
15693
  onToggleReaction: /^temp_(?:reply_)?/.test(e.parent.id) ? void 0 : i
15684
15694
  }) : null,
15685
- g ? /* @__PURE__ */ $("div", {
15695
+ y ? /* @__PURE__ */ $("div", {
15686
15696
  className: "ck-thread-meta-timestamps",
15687
15697
  children: [
15688
- m ? /* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q("span", {
15698
+ g ? /* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q("span", {
15689
15699
  className: "ck-thread-meta-timestamp-label",
15690
15700
  children: "Created"
15691
15701
  }), /* @__PURE__ */ Q("p", {
15692
15702
  className: "ck-thread-meta-timestamp-value",
15693
- children: bg(m)
15703
+ children: bg(g)
15694
15704
  })] }) : null,
15695
- h ? /* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q("span", {
15705
+ _ ? /* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q("span", {
15696
15706
  className: "ck-thread-meta-timestamp-label",
15697
15707
  children: "Updated"
15698
15708
  }), /* @__PURE__ */ Q("p", {
15699
15709
  className: "ck-thread-meta-timestamp-value",
15700
- children: bg(h)
15710
+ children: bg(_)
15701
15711
  })] }) : null,
15702
15712
  e.resolvedAt ? /* @__PURE__ */ $("div", { children: [/* @__PURE__ */ Q("span", {
15703
15713
  className: "ck-thread-meta-timestamp-label",
@@ -16878,11 +16888,14 @@ function Ix() {
16878
16888
  })]
16879
16889
  });
16880
16890
  }
16881
- function Lx({ thread: e, header: t, currentUserId: n, animateLastReply: r, editingCommentId: i, onStartEdit: a, onReact: o, onQuote: s, onDelete: c }) {
16882
- let l = e.replies;
16891
+ function Lx(e) {
16892
+ return /* @__PURE__ */ Q(Rx, { ...e }, e.thread.id);
16893
+ }
16894
+ function Rx({ thread: e, header: t, currentUserId: n, animateLastReply: r, editingCommentId: i, onStartEdit: a, onReact: o, onQuote: s, onDelete: c }) {
16895
+ let l = e.replies, [u] = Z.useState(l.length === 0 ? "start" : "end");
16883
16896
  return /* @__PURE__ */ Q(xx, {
16884
- autoScroll: !0,
16885
- defaultScrollPosition: "end",
16897
+ autoScroll: l.length > 0,
16898
+ defaultScrollPosition: u,
16886
16899
  children: /* @__PURE__ */ $(Sx, {
16887
16900
  className: "ck-thread-detail-scroll",
16888
16901
  children: [/* @__PURE__ */ Q(Cx, {
@@ -16937,10 +16950,10 @@ function Lx({ thread: e, header: t, currentUserId: n, animateLastReply: r, editi
16937
16950
  })
16938
16951
  }), /* @__PURE__ */ Q(Ex, {})]
16939
16952
  })
16940
- }, e.id);
16953
+ });
16941
16954
  }
16942
- var Rx = Z.memo(function({ thread: e, currentUserId: t, onReply: n, onResolve: r, onReopen: i, onDelete: a, onDeleteReply: o, onSaveEdit: s, onChecklistToggle: c, onCopyUrl: l, onLocate: u, onReact: d, onMarkComplete: f }) {
16943
- let { canWrite: p, canManageComments: m } = pr(), h = Z.useRef(null), g = Z.useRef(new Set(e.replies.map((e) => e.id))), _ = Z.useRef(e.id), y = Z.useRef(null), [b, x] = Z.useState(!1), [S, C] = Z.useState(null), [w, T] = Z.useState(null), E = Kg(e), D = !!s && p && (m || t === e.parent.author.id);
16955
+ var zx = Z.memo(function({ thread: e, currentUserId: t, onReply: n, onResolve: r, onReopen: i, onDelete: a, onDeleteReply: o, onSaveEdit: s, onChecklistToggle: c, onCopyUrl: l, onLocate: u, onReact: d, onMarkComplete: f }) {
16956
+ let { canWrite: p, canManageComments: m } = pr(), h = Z.useRef(null), g = Z.useRef(new Set(e.replies.map((e) => e.id))), _ = Z.useRef(e.id), y = Z.useRef(null), [b, x] = Z.useState(!1), [S, C] = Z.useState(null), [w, T] = Z.useState(null), E = Kg(e), D = p && (m || t === e.parent.author.id), O = !!s && D;
16944
16957
  Z.useEffect(() => {
16945
16958
  C(null), T(null);
16946
16959
  }, [e.id]), Z.useEffect(() => {
@@ -16951,32 +16964,32 @@ var Rx = Z.memo(function({ thread: e, currentUserId: t, onReply: n, onResolve: r
16951
16964
  }, [e.id, e.replies]), Z.useEffect(() => () => {
16952
16965
  y.current && clearTimeout(y.current);
16953
16966
  }, []);
16954
- let O = S?.type === "reply" ? e.replies.find((e) => e.id === S.id) : void 0, k = O?.id;
16967
+ let k = S?.type === "reply" ? e.replies.find((e) => e.id === S.id) : void 0, A = k?.id;
16955
16968
  Z.useEffect(() => {
16956
- k && h.current?.querySelector("textarea")?.focus();
16957
- }, [k]);
16958
- let A = Z.useCallback(async (e, t) => {
16969
+ A && h.current?.querySelector("textarea")?.focus();
16970
+ }, [A]);
16971
+ let j = Z.useCallback(async (e, t) => {
16959
16972
  await n(e, {
16960
16973
  ...t,
16961
16974
  body: e,
16962
16975
  ...w ? { replyTo: w } : {}
16963
16976
  }), T(null);
16964
- }, [n, w]), j = Z.useCallback(async (e, t, n, r) => {
16977
+ }, [n, w]), M = Z.useCallback(async (e, t, n, r) => {
16965
16978
  s && (await s(e, t, n, r), C((t) => t?.id === e && t.type === r ? null : t));
16966
- }, [s]), M = Z.useCallback(() => {
16979
+ }, [s]), N = Z.useCallback(() => {
16967
16980
  e.status === "open" ? r() : i();
16968
16981
  }, [
16969
16982
  i,
16970
16983
  r,
16971
16984
  e.status
16972
- ]), N = Z.useCallback((e, t) => {
16985
+ ]), P = Z.useCallback((e, t) => {
16973
16986
  C({
16974
16987
  id: e,
16975
16988
  type: t
16976
16989
  }), T(null);
16977
- }, []), P = Z.useCallback((e) => {
16990
+ }, []), F = Z.useCallback((e) => {
16978
16991
  C(null), T(e), requestAnimationFrame(() => h.current?.querySelector("textarea")?.focus());
16979
- }, []), F = Z.useCallback(() => {
16992
+ }, []), I = Z.useCallback(() => {
16980
16993
  C(null);
16981
16994
  }, []);
16982
16995
  return /* @__PURE__ */ $("div", {
@@ -16987,9 +17000,9 @@ var Rx = Z.memo(function({ thread: e, currentUserId: t, onReply: n, onResolve: r
16987
17000
  currentUserId: t,
16988
17001
  animateLastReply: b,
16989
17002
  editingCommentId: S?.type === "reply" ? S.id : null,
16990
- onStartEdit: s ? (e) => N(e, "reply") : void 0,
17003
+ onStartEdit: s ? (e) => P(e, "reply") : void 0,
16991
17004
  onReact: d ? (e, t) => d(e, t, "reply") : void 0,
16992
- onQuote: p ? P : void 0,
17005
+ onQuote: p ? F : void 0,
16993
17006
  onDelete: p ? o : void 0,
16994
17007
  header: /* @__PURE__ */ $("div", {
16995
17008
  className: "ck-thread-detail-content",
@@ -17002,7 +17015,7 @@ var Rx = Z.memo(function({ thread: e, currentUserId: t, onReply: n, onResolve: r
17002
17015
  comment: e.parent,
17003
17016
  variant: "full",
17004
17017
  context: "detail",
17005
- isEditing: D && S?.type === "comment" && S.id === e.parent.id,
17018
+ isEditing: O && S?.type === "comment" && S.id === e.parent.id,
17006
17019
  isResolved: E,
17007
17020
  threadStatus: e.status,
17008
17021
  hideImages: !0,
@@ -17017,12 +17030,12 @@ var Rx = Z.memo(function({ thread: e, currentUserId: t, onReply: n, onResolve: r
17017
17030
  assignees: e.assignees,
17018
17031
  priority: e.priority
17019
17032
  },
17020
- onStartEdit: D ? () => N(e.parent.id, "comment") : void 0,
17021
- onCancelEdit: F,
17022
- onSaveEdit: s ? (e, t, n) => j(e, t, n, "comment") : void 0,
17033
+ onStartEdit: O ? () => P(e.parent.id, "comment") : void 0,
17034
+ onCancelEdit: I,
17035
+ onSaveEdit: s ? (e, t, n) => M(e, t, n, "comment") : void 0,
17023
17036
  onCopyUrl: l,
17024
17037
  onDelete: a,
17025
- onResolve: p ? M : void 0,
17038
+ onResolve: p ? N : void 0,
17026
17039
  onLocate: u,
17027
17040
  onReact: d ? (t) => {
17028
17041
  Promise.resolve(d(e.parent.id, t, "comment")).catch(() => v.error("Could not update reaction. Try again."));
@@ -17030,7 +17043,7 @@ var Rx = Z.memo(function({ thread: e, currentUserId: t, onReply: n, onResolve: r
17030
17043
  }),
17031
17044
  /* @__PURE__ */ Q(fb, {
17032
17045
  thread: e,
17033
- onChecklistToggle: c,
17046
+ onChecklistToggle: D ? c : void 0,
17034
17047
  onMarkComplete: f,
17035
17048
  onReact: d ? (t) => d(e.parent.id, t, "comment") : void 0
17036
17049
  })
@@ -17042,19 +17055,19 @@ var Rx = Z.memo(function({ thread: e, currentUserId: t, onReply: n, onResolve: r
17042
17055
  ref: h,
17043
17056
  className: "ck-thread-detail-footer",
17044
17057
  hidden: !p,
17045
- children: [O ? /* @__PURE__ */ Q(Bf, {
17058
+ children: [k ? /* @__PURE__ */ Q(Bf, {
17046
17059
  mode: "edit",
17047
- defaultValue: O.body,
17048
- images: O.images,
17049
- onSubmit: (e, t) => j(O.id, e, t, "reply"),
17060
+ defaultValue: k.body,
17061
+ images: k.images,
17062
+ onSubmit: (e, t) => M(k.id, e, t, "reply"),
17050
17063
  allowMetadata: !1,
17051
- onCancel: F,
17064
+ onCancel: I,
17052
17065
  placeholder: "Edit reply…"
17053
- }, O.id) : null, /* @__PURE__ */ Q("div", {
17054
- hidden: !!O,
17066
+ }, k.id) : null, /* @__PURE__ */ Q("div", {
17067
+ hidden: !!k,
17055
17068
  children: /* @__PURE__ */ Q(Bf, {
17056
17069
  mode: "reply",
17057
- onSubmit: A,
17070
+ onSubmit: j,
17058
17071
  quote: w ?? void 0,
17059
17072
  onClearQuote: () => T(null),
17060
17073
  placeholder: E ? "Reply to reopen…" : "Reply…"
@@ -17063,8 +17076,8 @@ var Rx = Z.memo(function({ thread: e, currentUserId: t, onReply: n, onResolve: r
17063
17076
  })
17064
17077
  ]
17065
17078
  });
17066
- }), zx = "0.7.2";
17067
- function Bx({ thread: e, isDone: t, onCopyUrl: n, onResolve: r, onLocate: i, onReact: a }) {
17079
+ }), Bx = "0.7.4";
17080
+ function Vx({ thread: e, isDone: t, onCopyUrl: n, onResolve: r, onLocate: i, onReact: a }) {
17068
17081
  return /* @__PURE__ */ Q(ri, { children: /* @__PURE__ */ Q(m_, {
17069
17082
  author: e.parent.author,
17070
17083
  timestamp: e.parent.timestamp,
@@ -17091,7 +17104,7 @@ function Bx({ thread: e, isDone: t, onCopyUrl: n, onResolve: r, onLocate: i, onR
17091
17104
  } : void 0
17092
17105
  }) });
17093
17106
  }
17094
- function Vx({ thread: e, isDone: t, pageFilter: n, reactions: r, onReact: i }) {
17107
+ function Hx({ thread: e, isDone: t, pageFilter: n, reactions: r, onReact: i }) {
17095
17108
  let a = e.parent.type === "highlight" ? e.parent.quotedText : void 0, o = n === "all" ? e.pageRef : void 0, s = r ?? e.parent.reactions, c = !!(s && s.length > 0), l = !!i && !t && !/^temp_(?:reply_)?/.test(e.parent.id);
17096
17109
  return /* @__PURE__ */ $(si, {
17097
17110
  className: "ck-thread-list-item-content",
@@ -17118,7 +17131,7 @@ function Vx({ thread: e, isDone: t, pageFilter: n, reactions: r, onReact: i }) {
17118
17131
  ]
17119
17132
  });
17120
17133
  }
17121
- function Hx({ replyCount: e, checklistDone: t, checklistTotal: n, assignees: r, dimmed: i }) {
17134
+ function Ux({ replyCount: e, checklistDone: t, checklistTotal: n, assignees: r, dimmed: i }) {
17122
17135
  return e === 0 && n === 0 && r.length === 0 ? null : /* @__PURE__ */ Q(ci, {
17123
17136
  className: "ck-thread-list-item-footer",
17124
17137
  children: /* @__PURE__ */ Q(X_, {
@@ -17130,7 +17143,7 @@ function Hx({ replyCount: e, checklistDone: t, checklistTotal: n, assignees: r,
17130
17143
  })
17131
17144
  });
17132
17145
  }
17133
- var Ux = Z.memo(function({ thread: e, onSelect: t, selected: n, pageFilter: r = "current", reactions: i, onCopyUrl: a, onResolve: o, onReact: s, onLocate: c }) {
17146
+ var Wx = Z.memo(function({ thread: e, onSelect: t, selected: n, pageFilter: r = "current", reactions: i, onCopyUrl: a, onResolve: o, onReact: s, onLocate: c }) {
17134
17147
  let l = Kg(e), u = Z.useCallback(() => {
17135
17148
  t(e.id);
17136
17149
  }, [t, e.id]), d = Z.useCallback((e) => {
@@ -17144,7 +17157,7 @@ var Ux = Z.memo(function({ thread: e, onSelect: t, selected: n, pageFilter: r =
17144
17157
  role: "button",
17145
17158
  tabIndex: 0,
17146
17159
  children: [
17147
- /* @__PURE__ */ Q(Bx, {
17160
+ /* @__PURE__ */ Q(Vx, {
17148
17161
  thread: e,
17149
17162
  isDone: l,
17150
17163
  onCopyUrl: a,
@@ -17152,14 +17165,14 @@ var Ux = Z.memo(function({ thread: e, onSelect: t, selected: n, pageFilter: r =
17152
17165
  onLocate: c,
17153
17166
  onReact: s
17154
17167
  }),
17155
- /* @__PURE__ */ Q(Vx, {
17168
+ /* @__PURE__ */ Q(Hx, {
17156
17169
  thread: e,
17157
17170
  isDone: l,
17158
17171
  pageFilter: r,
17159
17172
  reactions: i,
17160
17173
  onReact: s
17161
17174
  }),
17162
- /* @__PURE__ */ Q(Hx, {
17175
+ /* @__PURE__ */ Q(Ux, {
17163
17176
  replyCount: e.replies.length,
17164
17177
  checklistDone: e.checklistDone,
17165
17178
  checklistTotal: e.checklistTotal,
@@ -17169,7 +17182,7 @@ var Ux = Z.memo(function({ thread: e, onSelect: t, selected: n, pageFilter: r =
17169
17182
  ]
17170
17183
  });
17171
17184
  });
17172
- function Wx({ children: e }) {
17185
+ function Gx({ children: e }) {
17173
17186
  return /* @__PURE__ */ $("div", {
17174
17187
  className: "ck-thread-list-section",
17175
17188
  children: [
@@ -17183,7 +17196,7 @@ function Wx({ children: e }) {
17183
17196
  ]
17184
17197
  });
17185
17198
  }
17186
- function Gx() {
17199
+ function Kx() {
17187
17200
  return /* @__PURE__ */ Q("svg", {
17188
17201
  viewBox: "0 0 24 24",
17189
17202
  fill: "none",
@@ -17198,7 +17211,7 @@ function Gx() {
17198
17211
  })
17199
17212
  });
17200
17213
  }
17201
- function Kx() {
17214
+ function qx() {
17202
17215
  return /* @__PURE__ */ $("svg", {
17203
17216
  viewBox: "0 0 24 24",
17204
17217
  fill: "none",
@@ -17219,7 +17232,7 @@ function Kx() {
17219
17232
  })]
17220
17233
  });
17221
17234
  }
17222
- var qx = Z.memo(function({ threads: e, onSelectThread: t, onResolve: n, onReact: r, onCopyUrl: i, onLocate: a, onResetFilters: o, noMatches: s = !1, pageFilter: c = "current", isThreadNew: l, selectedIds: u, onScroll: d }) {
17235
+ var Jx = Z.memo(function({ threads: e, onSelectThread: t, onResolve: n, onReact: r, onCopyUrl: i, onLocate: a, onResetFilters: o, noMatches: s = !1, pageFilter: c = "current", isThreadNew: l, selectedIds: u, onScroll: d }) {
17223
17236
  let { unread: f, older: p } = Z.useMemo(() => {
17224
17237
  if (!l) return {
17225
17238
  unread: [],
@@ -17237,7 +17250,7 @@ var qx = Z.memo(function({ threads: e, onSelectThread: t, onResolve: n, onReact:
17237
17250
  children: [/* @__PURE__ */ $(Xv, { children: [
17238
17251
  /* @__PURE__ */ Q(Zv, {
17239
17252
  variant: "icon",
17240
- children: Q(s ? Gx : Kx, {})
17253
+ children: Q(s ? Kx : qx, {})
17241
17254
  }),
17242
17255
  /* @__PURE__ */ Q(Qv, { children: s ? "No matching threads" : "No comments yet" }),
17243
17256
  s ? /* @__PURE__ */ Q($v, { children: "Try adjusting your filters to see more results." }) : null
@@ -17250,7 +17263,7 @@ var qx = Z.memo(function({ threads: e, onSelectThread: t, onResolve: n, onReact:
17250
17263
  });
17251
17264
  let g = (e) => /* @__PURE__ */ Q("li", {
17252
17265
  className: "ck-thread-list-row",
17253
- children: /* @__PURE__ */ Q(Ux, {
17266
+ children: /* @__PURE__ */ Q(Wx, {
17254
17267
  thread: e,
17255
17268
  onSelect: t,
17256
17269
  onResolve: n,
@@ -17269,7 +17282,7 @@ var qx = Z.memo(function({ threads: e, onSelectThread: t, onResolve: n, onReact:
17269
17282
  children: [
17270
17283
  m ? /* @__PURE__ */ $(lr, { children: [/* @__PURE__ */ Q("li", {
17271
17284
  className: "ck-thread-list-row",
17272
- children: /* @__PURE__ */ $(Wx, { children: [
17285
+ children: /* @__PURE__ */ $(Gx, { children: [
17273
17286
  "Unread (",
17274
17287
  f.length,
17275
17288
  ")"
@@ -17277,7 +17290,7 @@ var qx = Z.memo(function({ threads: e, onSelectThread: t, onResolve: n, onReact:
17277
17290
  }), f.map(g)] }) : null,
17278
17291
  h ? /* @__PURE__ */ $(lr, { children: [m ? /* @__PURE__ */ Q("li", {
17279
17292
  className: "ck-thread-list-row ck-thread-list-row--spaced",
17280
- children: /* @__PURE__ */ $(Wx, { children: [
17293
+ children: /* @__PURE__ */ $(Gx, { children: [
17281
17294
  "Older (",
17282
17295
  p.length,
17283
17296
  ")"
@@ -17287,7 +17300,7 @@ var qx = Z.memo(function({ threads: e, onSelectThread: t, onResolve: n, onReact:
17287
17300
  className: "ck-thread-list-footer",
17288
17301
  children: [/* @__PURE__ */ Q(Mt, {}), /* @__PURE__ */ $("div", {
17289
17302
  className: "ck-thread-list-meta",
17290
- children: [/* @__PURE__ */ $("span", { children: ["v", zx] }), /* @__PURE__ */ $("div", {
17303
+ children: [/* @__PURE__ */ $("span", { children: ["v", Bx] }), /* @__PURE__ */ $("div", {
17291
17304
  className: "ck-thread-list-meta-links",
17292
17305
  children: [/* @__PURE__ */ Q(W, {
17293
17306
  variant: "link",
@@ -17321,17 +17334,17 @@ var qx = Z.memo(function({ threads: e, onSelectThread: t, onResolve: n, onReact:
17321
17334
  })
17322
17335
  });
17323
17336
  });
17324
- function Jx(e, t) {
17337
+ function Yx(e, t) {
17325
17338
  return e === "detail" ? t === "forward" ? "ck-nav-forward" : "ck-nav-back" : e === "settings" ? "ck-nav-forward" : t === "back" ? "ck-nav-back" : "ck-fade-in";
17326
17339
  }
17327
- function Yx(e, t) {
17340
+ function Xx(e, t) {
17328
17341
  return e === "detail" ? `detail-${t ?? ""}` : e === "settings" ? "settings" : "list";
17329
17342
  }
17330
- function Xx(e, t) {
17343
+ function Zx(e, t) {
17331
17344
  return t === "list" && e !== "list" ? "back" : "forward";
17332
17345
  }
17333
- function Zx({ loading: e, threads: t, noMatches: n, pageFilter: r, isThreadNew: i, selectedIds: a, onResetFilters: o, onSelectThread: s, onReact: c, onResolveThread: l, onCopyUrl: u, onLocate: d, onScroll: f }) {
17334
- return e ? /* @__PURE__ */ Q(uy, {}) : /* @__PURE__ */ Q(qx, {
17346
+ function Qx({ loading: e, threads: t, noMatches: n, pageFilter: r, isThreadNew: i, selectedIds: a, onResetFilters: o, onSelectThread: s, onReact: c, onResolveThread: l, onCopyUrl: u, onLocate: d, onScroll: f }) {
17347
+ return e ? /* @__PURE__ */ Q(uy, {}) : /* @__PURE__ */ Q(Jx, {
17335
17348
  threads: t,
17336
17349
  onSelectThread: s,
17337
17350
  onReact: c ? (e, t) => c(e, t, "comment") : void 0,
@@ -17346,8 +17359,8 @@ function Zx({ loading: e, threads: t, noMatches: n, pageFilter: r, isThreadNew:
17346
17359
  onScroll: f
17347
17360
  });
17348
17361
  }
17349
- function Qx({ loading: e, currentUserId: t, activeThread: n, onReply: r, onReact: i, onMarkComplete: a, onResolve: o, onReopen: s, onDelete: c, onDeleteReply: l, onSaveEdit: u, onChecklistToggle: d, onCopyUrl: f, onLocate: p }) {
17350
- return e && !n ? /* @__PURE__ */ Q(fy, {}) : n ? /* @__PURE__ */ Q(Rx, {
17362
+ function $x({ loading: e, currentUserId: t, activeThread: n, onReply: r, onReact: i, onMarkComplete: a, onResolve: o, onReopen: s, onDelete: c, onDeleteReply: l, onSaveEdit: u, onChecklistToggle: d, onCopyUrl: f, onLocate: p }) {
17363
+ return e && !n ? /* @__PURE__ */ Q(fy, {}) : n ? /* @__PURE__ */ Q(zx, {
17351
17364
  thread: n,
17352
17365
  currentUserId: t,
17353
17366
  onReply: r,
@@ -17367,7 +17380,7 @@ function Qx({ loading: e, currentUserId: t, activeThread: n, onReply: r, onReact
17367
17380
  } : void 0
17368
17381
  }, n.id) : null;
17369
17382
  }
17370
- function $x(e, t) {
17383
+ function eS(e, t) {
17371
17384
  let n = Z.useRef({
17372
17385
  view: e,
17373
17386
  threadId: t,
@@ -17376,12 +17389,12 @@ function $x(e, t) {
17376
17389
  return (n.current.view !== e || n.current.threadId !== t) && (n.current = {
17377
17390
  view: e,
17378
17391
  threadId: t,
17379
- direction: Xx(n.current.view, e)
17392
+ direction: Zx(n.current.view, e)
17380
17393
  }), n.current.direction;
17381
17394
  }
17382
- var eS = Z.memo(function(e) {
17383
- let t = $x(e.view, e.activeThread?.id), n;
17384
- return n = e.view === "list" ? /* @__PURE__ */ Q(Zx, {
17395
+ var tS = Z.memo(function(e) {
17396
+ let t = eS(e.view, e.activeThread?.id), n;
17397
+ return n = e.view === "list" ? /* @__PURE__ */ Q(Qx, {
17385
17398
  loading: e.loading,
17386
17399
  threads: e.threads,
17387
17400
  noMatches: e.noMatches,
@@ -17395,7 +17408,7 @@ var eS = Z.memo(function(e) {
17395
17408
  onCopyUrl: e.onCopyUrl,
17396
17409
  onLocate: e.onLocate,
17397
17410
  onScroll: e.onScroll
17398
- }) : e.view === "settings" ? e.settings ?? null : /* @__PURE__ */ Q(Qx, {
17411
+ }) : e.view === "settings" ? e.settings ?? null : /* @__PURE__ */ Q($x, {
17399
17412
  currentUserId: e.currentUserId,
17400
17413
  loading: e.loading,
17401
17414
  activeThread: e.activeThread,
@@ -17411,19 +17424,19 @@ var eS = Z.memo(function(e) {
17411
17424
  onCopyUrl: e.onCopyUrl,
17412
17425
  onLocate: e.onLocate
17413
17426
  }), /* @__PURE__ */ Q("div", {
17414
- className: U("ck-panel-view", Jx(e.view, t)),
17427
+ className: U("ck-panel-view", Yx(e.view, t)),
17415
17428
  children: n
17416
- }, Yx(e.view, e.activeThread?.id));
17429
+ }, Xx(e.view, e.activeThread?.id));
17417
17430
  });
17418
- function tS() {
17431
+ function nS() {
17419
17432
  let [e, t] = Z.useState(!1);
17420
17433
  return Z.useEffect(() => {
17421
17434
  let e = window.matchMedia("(max-width: 767px)"), n = () => t(e.matches);
17422
17435
  return n(), e.addEventListener("change", n), () => e.removeEventListener("change", n);
17423
17436
  }, []), e;
17424
17437
  }
17425
- var nS = Z.memo(function({ value: e, onChange: t }) {
17426
- let n = tS(), r = Z.useRef(null);
17438
+ var rS = Z.memo(function({ value: e, onChange: t }) {
17439
+ let n = nS(), r = Z.useRef(null);
17427
17440
  return Z.useEffect(() => {
17428
17441
  n || r.current?.focus();
17429
17442
  }, [n]), /* @__PURE__ */ Q("search", {
@@ -17460,7 +17473,7 @@ var nS = Z.memo(function({ value: e, onChange: t }) {
17460
17473
  }) : null
17461
17474
  ] })
17462
17475
  });
17463
- }), rS = [{
17476
+ }), iS = [{
17464
17477
  name: "Grammarly",
17465
17478
  description: "injects overlays that conflict with text composers",
17466
17479
  detect: () => !!document.querySelector("grammarly-desktop-integration, grammarly-extension, [data-grammarly-shadow-root], grammarly-popups")
@@ -17469,11 +17482,11 @@ var nS = Z.memo(function({ value: e, onChange: t }) {
17469
17482
  description: "overlaps with the floating toolbar",
17470
17483
  detect: () => !!document.querySelector("vercel-live-feedback, [data-vercel-toolbar], #__vercel_live")
17471
17484
  }];
17472
- function iS() {
17485
+ function aS() {
17473
17486
  let [e, t] = Z.useState([]), [n, r] = Z.useState(!1);
17474
17487
  Z.useEffect(() => {
17475
17488
  let e = setTimeout(() => {
17476
- let e = rS.filter((e) => {
17489
+ let e = iS.filter((e) => {
17477
17490
  try {
17478
17491
  return e.detect();
17479
17492
  } catch {
@@ -17498,7 +17511,7 @@ function iS() {
17498
17511
  dismiss: i
17499
17512
  };
17500
17513
  }
17501
- function aS(e = "current") {
17514
+ function oS(e = "current") {
17502
17515
  let [t, n] = Z.useState(e), [r, i] = Z.useState("all"), [a, o] = Z.useState("newest"), [s, c] = Z.useState("all"), [l, u] = Z.useState(""), [d, f] = Z.useState("all"), [p, m] = Z.useState("all");
17503
17516
  return {
17504
17517
  pageFilter: t,
@@ -17517,7 +17530,7 @@ function aS(e = "current") {
17517
17530
  setAssigneeFilter: m
17518
17531
  };
17519
17532
  }
17520
- function oS({ filteredThreads: e, navIndex: t, onSelectThread: n, setPageFilter: r, setStatusFilter: i, setSortOrder: a, setPriorityFilter: o, setUserFilter: s, setAssigneeFilter: c, setSearchQuery: l, setSearchOpen: u }) {
17533
+ function sS({ filteredThreads: e, navIndex: t, onSelectThread: n, setPageFilter: r, setStatusFilter: i, setSortOrder: a, setPriorityFilter: o, setUserFilter: s, setAssigneeFilter: c, setSearchQuery: l, setSearchOpen: u }) {
17521
17534
  return {
17522
17535
  resetFilters: Z.useCallback(() => {
17523
17536
  r("current"), i("all"), a("newest"), o("all"), s("all"), c("all"), l(""), u(!1);
@@ -17549,7 +17562,7 @@ function oS({ filteredThreads: e, navIndex: t, onSelectThread: n, setPageFilter:
17549
17562
  ])
17550
17563
  };
17551
17564
  }
17552
- function sS(e, t) {
17565
+ function cS(e, t) {
17553
17566
  let n = [...e];
17554
17567
  if (t.pageFilter === "current" && t.pagePath && (n = n.filter((e) => !e.pageRef || e.pageRef.path === t.pagePath)), n = t.statusFilter === "all" ? n.filter((e) => Wg(e) !== "complete") : n.filter((e) => Wg(e) === t.statusFilter), t.priorityFilter !== "all" && (n = n.filter((e) => e.priority === t.priorityFilter)), t.userFilter === "mine" && t.currentUserId && (n = n.filter((e) => e.parent.author.id === t.currentUserId)), t.assigneeFilter === "unassigned") n = n.filter((e) => e.assignees.length === 0);
17555
17568
  else if (t.assigneeFilter !== "all") {
@@ -17567,9 +17580,9 @@ function sS(e, t) {
17567
17580
  return t.join("\n").toLowerCase().includes(r);
17568
17581
  })), n = t.sortOrder === "oldest" ? [...n].sort((e, t) => Date.parse(e.parent.createdAt) - Date.parse(t.parent.createdAt)) : t.sortOrder === "priority" ? [...n].sort((e, t) => Ug[e.priority] - Ug[t.priority]) : [...n].sort((e, t) => Date.parse(t.parent.createdAt) - Date.parse(e.parent.createdAt)), n;
17569
17582
  }
17570
- function cS(e, t) {
17583
+ function lS(e, t) {
17571
17584
  let { pagePath: n, pageFilter: r, statusFilter: i, priorityFilter: a, sortOrder: o, userFilter: s, assigneeFilter: c, searchQuery: l, currentUserId: u } = t;
17572
- return Z.useMemo(() => sS(e, {
17585
+ return Z.useMemo(() => cS(e, {
17573
17586
  pagePath: n,
17574
17587
  pageFilter: r,
17575
17588
  statusFilter: i,
@@ -17592,12 +17605,12 @@ function cS(e, t) {
17592
17605
  s
17593
17606
  ]);
17594
17607
  }
17595
- function lS(e) {
17608
+ function uS(e) {
17596
17609
  let t = /* @__PURE__ */ new Map();
17597
17610
  for (let n of e) for (let e of n.assignees) t.has(e.id) || t.set(e.id, e);
17598
17611
  return [...t.values()];
17599
17612
  }
17600
- var uS = Z.memo(function({ view: e, threads: t, activeThread: n, dockSide: r = "right", verticalEdge: i = null, loading: a = !1, closing: o = !1, availableUsers: s, hasMore: c = !1, loadingMore: l = !1, onLoadMore: u, branch: d, branches: f, onBranchChange: p, pagePath: m, projectName: h, pageFilter: g = "current", currentUserId: _, onlineUsers: y, onSelectThread: b, onBack: x, onClose: S, onReply: C, onReact: w, onMarkComplete: T, onResolveThread: E, onResolve: D, onReopen: O, onDelete: k, onDeleteReply: A, onSaveEdit: j, onChecklistToggle: M, onLogout: N, onSignIn: P, onOpenSettings: F, onPrevThread: I, onNextThread: L, onCopyUrl: R, onLocate: z, isThreadNew: B, presentation: V = "dock", settings: H }) {
17613
+ var dS = Z.memo(function({ view: e, threads: t, activeThread: n, dockSide: r = "right", verticalEdge: i = null, loading: a = !1, closing: o = !1, availableUsers: s, hasMore: c = !1, loadingMore: l = !1, onLoadMore: u, branch: d, branches: f, onBranchChange: p, pagePath: m, projectName: h, pageFilter: g = "current", currentUserId: _, onlineUsers: y, onSelectThread: b, onBack: x, onClose: S, onReply: C, onReact: w, onMarkComplete: T, onResolveThread: E, onResolve: D, onReopen: O, onDelete: k, onDeleteReply: A, onSaveEdit: j, onChecklistToggle: M, onLogout: N, onSignIn: P, onOpenSettings: F, onPrevThread: I, onNextThread: L, onCopyUrl: R, onLocate: z, isThreadNew: B, presentation: V = "dock", settings: H }) {
17601
17614
  let { canWrite: G } = pr(), [K, ee] = Z.useState(!1), [te, q] = Z.useState(!1), ne = Z.useRef({
17602
17615
  lastTop: 0,
17603
17616
  accumulated: 0,
@@ -17614,7 +17627,7 @@ var uS = Z.memo(function({ view: e, threads: t, activeThread: n, dockSide: r = "
17614
17627
  if (V === "sheet") return;
17615
17628
  let t = ne.current, n = e.currentTarget.scrollTop, r = n - t.lastTop;
17616
17629
  t.lastTop = n, !(Date.now() < t.cooldown) && (Math.sign(r) !== Math.sign(t.accumulated) && (t.accumulated = 0), t.accumulated += r, (t.accumulated > 3 && n > 20 || t.accumulated < -3 || n === 0) && (q(t.accumulated > 3 && n > 20), t.accumulated = 0, t.cooldown = Date.now() + 400));
17617
- }, [V]), [ie, ae] = Z.useState(() => /* @__PURE__ */ new Set()), { pageFilter: J, setPageFilter: oe, statusFilter: se, setStatusFilter: ce, sortOrder: le, setSortOrder: ue, priorityFilter: de, setPriorityFilter: fe, searchQuery: pe, setSearchQuery: me, userFilter: he, setUserFilter: ge, assigneeFilter: _e, setAssigneeFilter: ve } = aS(g), ye = cS(t, {
17630
+ }, [V]), [ie, ae] = Z.useState(() => /* @__PURE__ */ new Set()), { pageFilter: J, setPageFilter: oe, statusFilter: se, setStatusFilter: ce, sortOrder: le, setSortOrder: ue, priorityFilter: de, setPriorityFilter: fe, searchQuery: pe, setSearchQuery: me, userFilter: he, setUserFilter: ge, assigneeFilter: _e, setAssigneeFilter: ve } = oS(g), ye = lS(t, {
17618
17631
  pagePath: m,
17619
17632
  pageFilter: J,
17620
17633
  statusFilter: se,
@@ -17624,7 +17637,7 @@ var uS = Z.memo(function({ view: e, threads: t, activeThread: n, dockSide: r = "
17624
17637
  assigneeFilter: _e,
17625
17638
  searchQuery: K ? pe : "",
17626
17639
  ..._ ? { currentUserId: _ } : {}
17627
- }), be = n ? ye.findIndex((e) => e.id === n.id) : -1, xe = s ?? lS(t), Se = iS(), Ce = ye.length > 0 && ye.every((e) => ie.has(e.id)), we = oS({
17640
+ }), be = n ? ye.findIndex((e) => e.id === n.id) : -1, xe = s ?? uS(t), Se = aS(), Ce = ye.length > 0 && ye.every((e) => ie.has(e.id)), we = sS({
17628
17641
  filteredThreads: ye,
17629
17642
  navIndex: be,
17630
17643
  onSelectThread: b,
@@ -17685,7 +17698,7 @@ var uS = Z.memo(function({ view: e, threads: t, activeThread: n, dockSide: r = "
17685
17698
  "data-collapsed": te && !K || void 0,
17686
17699
  children: /* @__PURE__ */ $("div", {
17687
17700
  className: "ck-panel-toolbar-inner",
17688
- children: [K ? /* @__PURE__ */ Q(nS, {
17701
+ children: [K ? /* @__PURE__ */ Q(rS, {
17689
17702
  value: pe,
17690
17703
  onChange: me
17691
17704
  }) : null, /* @__PURE__ */ Q(Jv, {
@@ -17720,7 +17733,7 @@ var uS = Z.memo(function({ view: e, threads: t, activeThread: n, dockSide: r = "
17720
17733
  role: "status",
17721
17734
  children: "Search and filters include only loaded comments. Load more to include older threads."
17722
17735
  }) : null,
17723
- /* @__PURE__ */ Q(eS, {
17736
+ /* @__PURE__ */ Q(tS, {
17724
17737
  view: e,
17725
17738
  currentUserId: _,
17726
17739
  onScroll: re,
@@ -17764,7 +17777,7 @@ var uS = Z.memo(function({ view: e, threads: t, activeThread: n, dockSide: r = "
17764
17777
  })
17765
17778
  ]
17766
17779
  });
17767
- }), dS = Z.forwardRef(function({ className: e, ...t }, n) {
17780
+ }), fS = Z.forwardRef(function({ className: e, ...t }, n) {
17768
17781
  return /* @__PURE__ */ Q("div", {
17769
17782
  ref: n,
17770
17783
  role: "list",
@@ -17782,7 +17795,7 @@ Z.forwardRef(function({ className: e, ...t }, n) {
17782
17795
  ...t
17783
17796
  });
17784
17797
  });
17785
- var fS = Z.forwardRef(function({ className: e, variant: t = "default", size: n = "default", render: r, ...i }, a) {
17798
+ var pS = Z.forwardRef(function({ className: e, variant: t = "default", size: n = "default", render: r, ...i }, a) {
17786
17799
  return er({
17787
17800
  defaultTagName: "div",
17788
17801
  props: M({
@@ -17796,7 +17809,7 @@ var fS = Z.forwardRef(function({ className: e, variant: t = "default", size: n =
17796
17809
  size: n
17797
17810
  }
17798
17811
  });
17799
- }), pS = Z.forwardRef(function({ className: e, variant: t = "default", ...n }, r) {
17812
+ }), mS = Z.forwardRef(function({ className: e, variant: t = "default", ...n }, r) {
17800
17813
  return /* @__PURE__ */ Q("div", {
17801
17814
  ref: r,
17802
17815
  "data-slot": "item-media",
@@ -17804,28 +17817,28 @@ var fS = Z.forwardRef(function({ className: e, variant: t = "default", size: n =
17804
17817
  className: U("ck-item-media", e),
17805
17818
  ...n
17806
17819
  });
17807
- }), mS = Z.forwardRef(function({ className: e, ...t }, n) {
17820
+ }), hS = Z.forwardRef(function({ className: e, ...t }, n) {
17808
17821
  return /* @__PURE__ */ Q("div", {
17809
17822
  ref: n,
17810
17823
  "data-slot": "item-content",
17811
17824
  className: U("ck-item-content", e),
17812
17825
  ...t
17813
17826
  });
17814
- }), hS = Z.forwardRef(function({ className: e, ...t }, n) {
17827
+ }), gS = Z.forwardRef(function({ className: e, ...t }, n) {
17815
17828
  return /* @__PURE__ */ Q("div", {
17816
17829
  ref: n,
17817
17830
  "data-slot": "item-title",
17818
17831
  className: U("ck-item-title", e),
17819
17832
  ...t
17820
17833
  });
17821
- }), gS = Z.forwardRef(function({ className: e, ...t }, n) {
17834
+ }), _S = Z.forwardRef(function({ className: e, ...t }, n) {
17822
17835
  return /* @__PURE__ */ Q("p", {
17823
17836
  ref: n,
17824
17837
  "data-slot": "item-description",
17825
17838
  className: U("ck-item-description", e),
17826
17839
  ...t
17827
17840
  });
17828
- }), _S = Z.forwardRef(function({ className: e, ...t }, n) {
17841
+ }), vS = Z.forwardRef(function({ className: e, ...t }, n) {
17829
17842
  return /* @__PURE__ */ Q("div", {
17830
17843
  ref: n,
17831
17844
  "data-slot": "item-actions",
@@ -17848,21 +17861,21 @@ Z.forwardRef(function({ className: e, ...t }, n) {
17848
17861
  ...t
17849
17862
  });
17850
17863
  });
17851
- var vS = /*#__PURE__*/ Z.createContext(void 0);
17852
- process.env.NODE_ENV !== "production" && (vS.displayName = "SelectRootContext");
17853
17864
  var yS = /*#__PURE__*/ Z.createContext(void 0);
17854
- process.env.NODE_ENV !== "production" && (yS.displayName = "SelectFloatingContext");
17855
- function bS() {
17856
- let e = Z.useContext(vS);
17865
+ process.env.NODE_ENV !== "production" && (yS.displayName = "SelectRootContext");
17866
+ var bS = /*#__PURE__*/ Z.createContext(void 0);
17867
+ process.env.NODE_ENV !== "production" && (bS.displayName = "SelectFloatingContext");
17868
+ function xS() {
17869
+ let e = Z.useContext(yS);
17857
17870
  if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? C(60) : "Base UI: SelectRootContext is missing. Select parts must be placed within <Select.Root>.");
17858
17871
  return e;
17859
17872
  }
17860
- function xS() {
17861
- let e = Z.useContext(yS);
17873
+ function SS() {
17874
+ let e = Z.useContext(bS);
17862
17875
  if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? C(61) : "Base UI: SelectFloatingContext is missing. Select parts must be placed within <Select.Root>.");
17863
17876
  return e;
17864
17877
  }
17865
- var SS = {
17878
+ var CS = {
17866
17879
  id: (e) => e.id,
17867
17880
  labelId: (e) => e.labelId,
17868
17881
  modal: (e) => e.modal,
@@ -17904,7 +17917,7 @@ var SS = {
17904
17917
  scrollDownArrowVisible: (e) => e.scrollDownArrowVisible,
17905
17918
  hasScrollArrows: (e) => e.hasScrollArrows
17906
17919
  };
17907
- function CS(e) {
17920
+ function wS(e) {
17908
17921
  let { id: t, value: n, defaultValue: r = null, onValueChange: i, open: a, defaultOpen: o = !1, onOpenChange: s, name: c, form: l, autoComplete: u, disabled: d = !1, readOnly: f = !1, required: p = !1, modal: m = !0, actionsRef: h, inputRef: g, onOpenChangeComplete: _, items: v, multiple: y = !1, itemToStringLabel: x, itemToStringValue: S, isItemEqualToValue: C = Sc, highlightItemOnHover: T = !0, children: D } = e, { clearErrors: k } = Cs(), { setDirty: A, setTouched: j, setFocused: N, validityData: F, setFilled: I, name: L, disabled: R, validation: B, validationMode: V } = _s(), H = ks({ id: t }), U = R || d, W = L ?? c, [G, K] = wa({
17909
17922
  controlled: n,
17910
17923
  default: y ? r ?? E : r,
@@ -17974,7 +17987,7 @@ function CS(e) {
17974
17987
  selectedItemTextRef: he,
17975
17988
  alignItemWithTriggerActiveRef: _e,
17976
17989
  initialValueRef: ve
17977
- }, SS)).current, [Se, Ce] = Z.useState(!1), { mounted: we, transitionStatus: Te, forceUnmount: Ee } = pe({
17990
+ }, CS)).current, [Se, Ce] = Z.useState(!1), { mounted: we, transitionStatus: Te, forceUnmount: Ee } = pe({
17978
17991
  open: te,
17979
17992
  ref: ie,
17980
17993
  preventUnmountOnClose: Se,
@@ -18130,10 +18143,10 @@ function CS(e) {
18130
18143
  S,
18131
18144
  U
18132
18145
  ]);
18133
- return /*#__PURE__*/ $(vS.Provider, {
18146
+ return /*#__PURE__*/ $(yS.Provider, {
18134
18147
  value: xe,
18135
18148
  children: [
18136
- /*#__PURE__*/ Q(yS.Provider, {
18149
+ /*#__PURE__*/ Q(bS.Provider, {
18137
18150
  value: Be,
18138
18151
  children: D
18139
18152
  }),
@@ -18176,20 +18189,20 @@ function CS(e) {
18176
18189
  ]
18177
18190
  });
18178
18191
  }
18179
- var wS = "data-popup-side", TS = 400, ES = {
18192
+ var TS = "data-popup-side", ES = 400, DS = {
18180
18193
  ...me,
18181
18194
  ...ds,
18182
- popupSide: (e) => e ? { [wS]: e } : null,
18195
+ popupSide: (e) => e ? { [TS]: e } : null,
18183
18196
  value: () => null
18184
- }, DS = /*#__PURE__*/ Z.forwardRef(function(e, t) {
18185
- let { render: n, className: r, id: i, disabled: a = !1, nativeButton: o = !0, style: s, ...c } = e, { setTouched: l, validationMode: u, validation: d, state: f, disabled: p } = _s(), { labelId: m } = Ts(), h = bS(), g = h.useState("readOnly"), _ = h.useState("required"), v = h.useState("disabled"), y = p || v || a, b = h.useState("open"), x = h.useState("mounted"), S = h.useState("value"), C = h.useState("triggerProps"), w = h.useState("positionerElement"), T = h.useState("listElement"), E = h.useState("popupSide"), D = h.useState("id"), O = h.useState("labelId"), k = h.useState("hasSelectedValue"), A = x && w ? E : null, j = i ?? D, N = el(m, O);
18197
+ }, OS = /*#__PURE__*/ Z.forwardRef(function(e, t) {
18198
+ let { render: n, className: r, id: i, disabled: a = !1, nativeButton: o = !0, style: s, ...c } = e, { setTouched: l, validationMode: u, validation: d, state: f, disabled: p } = _s(), { labelId: m } = Ts(), h = xS(), g = h.useState("readOnly"), _ = h.useState("required"), v = h.useState("disabled"), y = p || v || a, b = h.useState("open"), x = h.useState("mounted"), S = h.useState("value"), C = h.useState("triggerProps"), w = h.useState("positionerElement"), T = h.useState("listElement"), E = h.useState("popupSide"), D = h.useState("id"), O = h.useState("labelId"), k = h.useState("hasSelectedValue"), A = x && w ? E : null, j = i ?? D, N = el(m, O);
18186
18199
  ks({ id: i });
18187
18200
  let P = ce(w), F = Z.useRef(null), I = vs(y, F), { getButtonProps: L, buttonRef: R } = B({
18188
18201
  disabled: y,
18189
18202
  native: o
18190
18203
  }), z = h.useStateSetter("triggerElement"), V = Kt(), H = Kt(), U = Kt();
18191
18204
  Z.useEffect(() => {
18192
- if (b) return U.start(TS, () => {
18205
+ if (b) return U.start(ES, () => {
18193
18206
  h.context.selectionRef.current.allowUnselectedMouseUp = !0, h.context.selectionRef.current.allowSelectedMouseUp = !0;
18194
18207
  }), () => {
18195
18208
  U.clear();
@@ -18254,13 +18267,13 @@ var wS = "data-popup-side", TS = 400, ES = {
18254
18267
  z
18255
18268
  ],
18256
18269
  state: ee,
18257
- stateAttributesMapping: ES,
18270
+ stateAttributesMapping: DS,
18258
18271
  props: K
18259
18272
  });
18260
18273
  });
18261
- process.env.NODE_ENV !== "production" && (DS.displayName = "SelectTrigger");
18262
- var OS = { value: () => null }, kS = /*#__PURE__*/ Z.forwardRef(function(e, t) {
18263
- let { className: n, render: r, children: i, placeholder: a, style: o, ...s } = e, c = bS(), l = c.useState("value"), u = c.useState("items"), d = c.useState("itemToStringLabel"), f = c.useState("hasSelectedValue"), p = !f && a != null && i == null, m = c.useState("hasNullItemLabel", p), h = {
18274
+ process.env.NODE_ENV !== "production" && (OS.displayName = "SelectTrigger");
18275
+ var kS = { value: () => null }, AS = /*#__PURE__*/ Z.forwardRef(function(e, t) {
18276
+ let { className: n, render: r, children: i, placeholder: a, style: o, ...s } = e, c = xS(), l = c.useState("value"), u = c.useState("items"), d = c.useState("itemToStringLabel"), f = c.useState("hasSelectedValue"), p = !f && a != null && i == null, m = c.useState("hasNullItemLabel", p), h = {
18264
18277
  value: l,
18265
18278
  placeholder: !f
18266
18279
  }, g = null;
@@ -18268,12 +18281,12 @@ var OS = { value: () => null }, kS = /*#__PURE__*/ Z.forwardRef(function(e, t) {
18268
18281
  state: h,
18269
18282
  ref: [t, c.context.valueRef],
18270
18283
  props: [{ children: g }, s],
18271
- stateAttributesMapping: OS
18284
+ stateAttributesMapping: kS
18272
18285
  });
18273
18286
  });
18274
- process.env.NODE_ENV !== "production" && (kS.displayName = "SelectValue");
18275
- var AS = /*#__PURE__*/ Z.forwardRef(function(e, t) {
18276
- let { render: n, className: r, style: i, ...a } = e, o = { open: bS().useState("open") };
18287
+ process.env.NODE_ENV !== "production" && (AS.displayName = "SelectValue");
18288
+ var jS = /*#__PURE__*/ Z.forwardRef(function(e, t) {
18289
+ let { render: n, className: r, style: i, ...a } = e, o = { open: xS().useState("open") };
18277
18290
  return G("span", e, {
18278
18291
  state: o,
18279
18292
  ref: t,
@@ -18284,32 +18297,32 @@ var AS = /*#__PURE__*/ Z.forwardRef(function(e, t) {
18284
18297
  stateAttributesMapping: ye
18285
18298
  });
18286
18299
  });
18287
- process.env.NODE_ENV !== "production" && (AS.displayName = "SelectIcon");
18288
- var jS = /*#__PURE__*/ Z.forwardRef(function(e, t) {
18289
- let n = bS(), r = n.useState("mounted"), i = n.useState("forceMount");
18300
+ process.env.NODE_ENV !== "production" && (jS.displayName = "SelectIcon");
18301
+ var MS = /*#__PURE__*/ Z.forwardRef(function(e, t) {
18302
+ let n = xS(), r = n.useState("mounted"), i = n.useState("forceMount");
18290
18303
  return r || i ? /*#__PURE__*/ Q(Le, {
18291
18304
  ref: t,
18292
18305
  ...e
18293
18306
  }) : null;
18294
18307
  });
18295
- process.env.NODE_ENV !== "production" && (jS.displayName = "SelectPortal");
18296
- var MS = /*#__PURE__*/ Z.createContext(void 0);
18297
- process.env.NODE_ENV !== "production" && (MS.displayName = "SelectPositionerContext");
18298
- function NS() {
18299
- let e = Z.useContext(MS);
18308
+ process.env.NODE_ENV !== "production" && (MS.displayName = "SelectPortal");
18309
+ var NS = /*#__PURE__*/ Z.createContext(void 0);
18310
+ process.env.NODE_ENV !== "production" && (NS.displayName = "SelectPositionerContext");
18311
+ function PS() {
18312
+ let e = Z.useContext(NS);
18300
18313
  if (!e) throw Error(process.env.NODE_ENV === "production" ? C(59) : "Base UI: SelectPositionerContext is missing. SelectPositioner parts must be placed within <Select.Positioner>.");
18301
18314
  return e;
18302
18315
  }
18303
- function PS(e, t) {
18316
+ function FS(e, t) {
18304
18317
  e && Object.assign(e.style, t);
18305
18318
  }
18306
- var FS = {
18319
+ var IS = {
18307
18320
  position: "relative",
18308
18321
  maxHeight: "100%",
18309
18322
  overflowX: "hidden",
18310
18323
  overflowY: "auto"
18311
- }, IS = { position: "fixed" }, LS = /*#__PURE__*/ Z.forwardRef(function(e, t) {
18312
- let { anchor: n, className: r, render: i, positionMethod: a, side: o, align: s, sideOffset: c, alignOffset: l, collisionBoundary: u = "clipping-ancestors", collisionPadding: d, arrowPadding: f, sticky: p, disableAnchorTracking: m, alignItemWithTrigger: h = !0, collisionAvoidance: g = te, style: _, ...v } = e, y = bS(), b = xS(), x = y.useState("open"), S = y.useState("mounted"), C = y.useState("modal"), T = y.useState("value"), E = y.useState("openMethod"), D = y.useState("positionerElement"), O = y.useState("triggerElement"), k = y.useState("isItemEqualToValue"), A = y.useState("transitionStatus"), j = Z.useRef(null), M = Z.useRef(null), [N, P] = Z.useState(h), F = S && N && E !== "touch";
18324
+ }, LS = { position: "fixed" }, RS = /*#__PURE__*/ Z.forwardRef(function(e, t) {
18325
+ let { anchor: n, className: r, render: i, positionMethod: a, side: o, align: s, sideOffset: c, alignOffset: l, collisionBoundary: u = "clipping-ancestors", collisionPadding: d, arrowPadding: f, sticky: p, disableAnchorTracking: m, alignItemWithTrigger: h = !0, collisionAvoidance: g = te, style: _, ...v } = e, y = xS(), b = SS(), x = y.useState("open"), S = y.useState("mounted"), C = y.useState("modal"), T = y.useState("value"), E = y.useState("openMethod"), D = y.useState("positionerElement"), O = y.useState("triggerElement"), k = y.useState("isItemEqualToValue"), A = y.useState("transitionStatus"), j = Z.useRef(null), M = Z.useRef(null), [N, P] = Z.useState(h), F = S && N && E !== "touch";
18313
18326
  !S && N !== h && P(h), Z.useImperativeHandle(y.context.alignItemWithTriggerActiveRef, () => F), Nl((F || C) && x, E === "touch", D, O);
18314
18327
  let I = ht({
18315
18328
  anchor: n,
@@ -18327,7 +18340,7 @@ var FS = {
18327
18340
  disableAnchorTracking: m ?? F,
18328
18341
  collisionAvoidance: g,
18329
18342
  keepMounted: !0
18330
- }), L = F ? "none" : I.side, R = F ? IS : I.positionerStyles, B = {
18343
+ }), L = F ? "none" : I.side, R = F ? LS : I.positionerStyles, B = {
18331
18344
  open: x,
18332
18345
  side: L,
18333
18346
  align: I.align,
@@ -18362,7 +18375,7 @@ var FS = {
18362
18375
  scrollDownArrowVisible: !1
18363
18376
  });
18364
18377
  let e = { height: "" };
18365
- PS(D, e), PS(y.context.popupRef.current, e);
18378
+ FS(D, e), FS(y.context.popupRef.current, e);
18366
18379
  }
18367
18380
  }), G = Z.useMemo(() => ({
18368
18381
  ...I,
@@ -18381,7 +18394,7 @@ var FS = {
18381
18394
  elementsRef: y.context.listRef,
18382
18395
  labelsRef: y.context.labelsRef,
18383
18396
  onMapChange: W,
18384
- children: /*#__PURE__*/ $(MS.Provider, {
18397
+ children: /*#__PURE__*/ $(NS.Provider, {
18385
18398
  value: G,
18386
18399
  children: [S && C && /*#__PURE__*/ Q(Sn, {
18387
18400
  inert: _n(!x),
@@ -18390,19 +18403,19 @@ var FS = {
18390
18403
  })
18391
18404
  });
18392
18405
  });
18393
- process.env.NODE_ENV !== "production" && (LS.displayName = "SelectPositioner");
18394
- var RS = "--transform-origin", zS = {
18406
+ process.env.NODE_ENV !== "production" && (RS.displayName = "SelectPositioner");
18407
+ var zS = "--transform-origin", BS = {
18395
18408
  ...Ee,
18396
18409
  ...Ie
18397
- }, BS = /*#__PURE__*/ Z.forwardRef(function(e, t) {
18398
- let { render: n, className: r, style: i, finalFocus: a, ...o } = e, s = bS(), c = s.useState("multiple"), l = s.useState("readOnly"), u = s.useState("highlightItemOnHover"), d = xS(), { side: f, align: p, alignItemWithTriggerActive: m, isPositioned: h, setControlledAlignItemWithTrigger: g } = NS(), _ = Ja(!0) != null, v = Dn(), { nonce: y, disableStyleElements: b } = im(), x = s.useState("id"), S = s.useState("open"), C = s.useState("openMethod"), T = s.useState("mounted"), E = s.useState("popupProps"), O = s.useState("transitionStatus"), k = s.useState("triggerElement"), A = s.useState("positionerElement"), j = s.useState("listElement"), M = Z.useRef(!1), N = Z.useRef(!1), P = Z.useRef({}), F = Ne(), I = z((e) => {
18410
+ }, VS = /*#__PURE__*/ Z.forwardRef(function(e, t) {
18411
+ let { render: n, className: r, style: i, finalFocus: a, ...o } = e, s = xS(), c = s.useState("multiple"), l = s.useState("readOnly"), u = s.useState("highlightItemOnHover"), d = SS(), { side: f, align: p, alignItemWithTriggerActive: m, isPositioned: h, setControlledAlignItemWithTrigger: g } = PS(), _ = Ja(!0) != null, v = Dn(), { nonce: y, disableStyleElements: b } = im(), x = s.useState("id"), S = s.useState("open"), C = s.useState("openMethod"), T = s.useState("mounted"), E = s.useState("popupProps"), O = s.useState("transitionStatus"), k = s.useState("triggerElement"), A = s.useState("positionerElement"), j = s.useState("listElement"), M = Z.useRef(!1), N = Z.useRef(!1), P = Z.useRef({}), F = Ne(), I = z((e) => {
18399
18412
  if (!A || !s.context.popupRef.current || !N.current) return;
18400
18413
  let t = A.style.top === "0px", n = A.style.bottom === "0px";
18401
18414
  if (M.current || !m || !t && !n) {
18402
18415
  s.context.handleScrollArrowVisibility(e);
18403
18416
  return;
18404
18417
  }
18405
- let r = US(A), i = WS(A.getBoundingClientRect().height, "y", r), a = J(A), o = D(A), c = o.getComputedStyle(A), l = parseFloat(c.marginTop), u = parseFloat(c.marginBottom), d = VS(o.getComputedStyle(s.context.popupRef.current)), f = Math.min(a.documentElement.clientHeight - l - u, d), p = e.scrollTop, h = HS(e), g = null, _ = (e) => {
18418
+ let r = WS(A), i = GS(A.getBoundingClientRect().height, "y", r), a = J(A), o = D(A), c = o.getComputedStyle(A), l = parseFloat(c.marginTop), u = parseFloat(c.marginBottom), d = HS(o.getComputedStyle(s.context.popupRef.current)), f = Math.min(a.documentElement.clientHeight - l - u, d), p = e.scrollTop, h = US(e), g = null, _ = (e) => {
18406
18419
  A.style.height = `${e}px`;
18407
18420
  }, v = t ? h - p : p, y = Math.min(i + v, f);
18408
18421
  if (v <= 1) {
@@ -18413,7 +18426,7 @@ var RS = "--transform-origin", zS = {
18413
18426
  f - y > 1 ? g = t ? Infinity : 0 : n && p < h && (g = p - (v - (i + v - f)));
18414
18427
  let b = Math.ceil(y);
18415
18428
  if (b !== 0 && _(b), g != null) {
18416
- let t = mm(g, 0, HS(e));
18429
+ let t = mm(g, 0, US(e));
18417
18430
  Math.abs(e.scrollTop - t) > 1 && (e.scrollTop = t);
18418
18431
  }
18419
18432
  b >= f - 1 && (M.current = !0), s.context.handleScrollArrowVisibility(e);
@@ -18444,7 +18457,7 @@ var RS = "--transform-origin", zS = {
18444
18457
  marginBottom: A.style.marginBottom
18445
18458
  });
18446
18459
  }, [s, A]), w(() => {
18447
- S || m || (N.current = !1, M.current = !1, PS(A, P.current));
18460
+ S || m || (N.current = !1, M.current = !1, FS(A, P.current));
18448
18461
  }, [
18449
18462
  S,
18450
18463
  m,
@@ -18452,38 +18465,38 @@ var RS = "--transform-origin", zS = {
18452
18465
  ]), w(() => {
18453
18466
  let e = s.context.popupRef.current;
18454
18467
  if (!S || !k || !A || !e || m && !h || s.state.transitionStatus === "ending") return;
18455
- if (N.current = !0, e.style.removeProperty(RS), !m) {
18468
+ if (N.current = !0, e.style.removeProperty(zS), !m) {
18456
18469
  F.request(() => s.context.handleScrollArrowVisibility(j || e));
18457
18470
  return;
18458
18471
  }
18459
- let t = qS(e);
18472
+ let t = JS(e);
18460
18473
  try {
18461
18474
  let t = s.context.selectedItemTextRef.current;
18462
18475
  t?.isConnected || (t = !s.select("hasSelectedValue") && s.context.firstItemTextRef.current?.isConnected ? s.context.firstItemTextRef.current : null);
18463
- let n = s.context.valueRef.current, r = D(A), i = r.getComputedStyle(A), a = r.getComputedStyle(e), o = J(k), c = US(k), l = GS(k.getBoundingClientRect(), c), d = GS(A.getBoundingClientRect(), c), f = l.height, p = j || e, m = p.scrollHeight, h = parseFloat(a.borderBottomWidth), _ = parseFloat(i.marginTop) || 10, y = parseFloat(i.marginBottom) || 10, b = parseFloat(i.minHeight) || 100, x = VS(a), S = o.documentElement.clientHeight - _ - y, C = o.documentElement.clientWidth, w = S - l.bottom + f, T, E = v === "rtl" ? l.right - d.width : l.left, O = 0;
18476
+ let n = s.context.valueRef.current, r = D(A), i = r.getComputedStyle(A), a = r.getComputedStyle(e), o = J(k), c = WS(k), l = KS(k.getBoundingClientRect(), c), d = KS(A.getBoundingClientRect(), c), f = l.height, p = j || e, m = p.scrollHeight, h = parseFloat(a.borderBottomWidth), _ = parseFloat(i.marginTop) || 10, y = parseFloat(i.marginBottom) || 10, b = parseFloat(i.minHeight) || 100, x = HS(a), S = o.documentElement.clientHeight - _ - y, C = o.documentElement.clientWidth, w = S - l.bottom + f, T, E = v === "rtl" ? l.right - d.width : l.left, O = 0;
18464
18477
  if (t && n) {
18465
- let e = GS(n.getBoundingClientRect(), c);
18466
- T = GS(t.getBoundingClientRect(), c), E = d.left + (v === "rtl" ? e.right - T.right : e.left - T.left);
18478
+ let e = KS(n.getBoundingClientRect(), c);
18479
+ T = KS(t.getBoundingClientRect(), c), E = d.left + (v === "rtl" ? e.right - T.right : e.left - T.left);
18467
18480
  let r = e.top - l.top + e.height / 2;
18468
18481
  O = T.top - d.top + T.height / 2 - r;
18469
18482
  }
18470
18483
  let N = w + O + y + h, F = Math.min(S, N), I = S - _ - y, L = N - F, R = C - 5;
18471
18484
  A.style.left = `${mm(E, 5, R - d.width)}px`, A.style.height = `${F}px`, A.style.maxHeight = "none", A.style.marginTop = `${_}px`, A.style.marginBottom = `${y}px`, e.style.height = "100%";
18472
- let z = HS(p), B = L >= z - 1;
18485
+ let z = US(p), B = L >= z - 1;
18473
18486
  B && (F = Math.min(S, d.height) - (L - z));
18474
18487
  let V = l.top < 20 || l.bottom > S - 20 || Math.ceil(F) + 1 < Math.min(m, b), H = (r.visualViewport?.scale ?? 1) !== 1 && Ye;
18475
18488
  if (V || H) {
18476
- PS(A, P.current), g(!1);
18489
+ FS(A, P.current), g(!1);
18477
18490
  return;
18478
18491
  }
18479
18492
  let U = Math.max(b, F);
18480
18493
  if (B) {
18481
18494
  let e = Math.max(0, S - N);
18482
- A.style.top = d.height >= I ? "0" : `${e}px`, A.style.height = `${F}px`, p.scrollTop = HS(p);
18495
+ A.style.top = d.height >= I ? "0" : `${e}px`, A.style.height = `${F}px`, p.scrollTop = US(p);
18483
18496
  } else A.style.bottom = "0", p.scrollTop = L;
18484
18497
  if (T) {
18485
18498
  let t = d.top, n = d.height, r = T.top + T.height / 2, i = mm(n > 0 ? (r - t) / n * 100 : 50, 0, 100);
18486
- e.style.setProperty(RS, `50% ${i}%`);
18499
+ e.style.setProperty(zS, `50% ${i}%`);
18487
18500
  }
18488
18501
  (U === S || F >= x) && (M.current = !0), s.context.handleScrollArrowVisibility(p), u && s.state.selectedIndex === null && s.state.activeIndex === null && s.context.listRef.current[0] != null && s.set("activeIndex", 0);
18489
18502
  } finally {
@@ -18527,12 +18540,12 @@ var RS = "--transform-origin", zS = {
18527
18540
  onScroll(e) {
18528
18541
  j || I(e.currentTarget);
18529
18542
  },
18530
- ...m && { style: j ? { height: "100%" } : FS },
18543
+ ...m && { style: j ? { height: "100%" } : IS },
18531
18544
  className: !j && m ? qp.className : void 0
18532
18545
  }, B = G("div", e, {
18533
18546
  ref: [t, s.context.popupRef],
18534
18547
  state: L,
18535
- stateAttributesMapping: zS,
18548
+ stateAttributesMapping: BS,
18536
18549
  props: [
18537
18550
  E,
18538
18551
  R,
@@ -18550,45 +18563,45 @@ var RS = "--transform-origin", zS = {
18550
18563
  children: B
18551
18564
  })] });
18552
18565
  });
18553
- process.env.NODE_ENV !== "production" && (BS.displayName = "SelectPopup");
18554
- function VS(e) {
18566
+ process.env.NODE_ENV !== "production" && (VS.displayName = "SelectPopup");
18567
+ function HS(e) {
18555
18568
  let t = e.maxHeight;
18556
18569
  return t.endsWith("px") && parseFloat(t) || Infinity;
18557
18570
  }
18558
- function HS(e) {
18571
+ function US(e) {
18559
18572
  return gm(e.scrollHeight, e.clientHeight);
18560
18573
  }
18561
- function US(e) {
18574
+ function WS(e) {
18562
18575
  return Ze.getScale(e);
18563
18576
  }
18564
- function WS(e, t, n) {
18577
+ function GS(e, t, n) {
18565
18578
  return e / n[t];
18566
18579
  }
18567
- function GS(e, t) {
18580
+ function KS(e, t) {
18568
18581
  return Bt({
18569
- x: WS(e.x, "x", t),
18570
- y: WS(e.y, "y", t),
18571
- width: WS(e.width, "x", t),
18572
- height: WS(e.height, "y", t)
18582
+ x: GS(e.x, "x", t),
18583
+ y: GS(e.y, "y", t),
18584
+ width: GS(e.width, "x", t),
18585
+ height: GS(e.height, "y", t)
18573
18586
  });
18574
18587
  }
18575
- var KS = [
18588
+ var qS = [
18576
18589
  ["transform", "none"],
18577
18590
  ["scale", "1"],
18578
18591
  ["translate", "0 0"]
18579
18592
  ];
18580
- function qS(e) {
18593
+ function JS(e) {
18581
18594
  let { style: t } = e, n = {};
18582
- for (let [e, r] of KS) n[e] = t.getPropertyValue(e), t.setProperty(e, r, "important");
18595
+ for (let [e, r] of qS) n[e] = t.getPropertyValue(e), t.setProperty(e, r, "important");
18583
18596
  return () => {
18584
- for (let [e] of KS) {
18597
+ for (let [e] of qS) {
18585
18598
  let r = n[e];
18586
18599
  r ? t.setProperty(e, r) : t.removeProperty(e);
18587
18600
  }
18588
18601
  };
18589
18602
  }
18590
- var JS = /*#__PURE__*/ Z.forwardRef(function(e, t) {
18591
- let { render: n, className: r, style: i, ...a } = e, o = bS(), s = o.useState("multiple"), c = o.useState("readOnly"), { alignItemWithTriggerActive: l } = NS(), u = o.useState("hasScrollArrows"), d = o.useState("openMethod"), f = {
18603
+ var YS = /*#__PURE__*/ Z.forwardRef(function(e, t) {
18604
+ let { render: n, className: r, style: i, ...a } = e, o = xS(), s = o.useState("multiple"), c = o.useState("readOnly"), { alignItemWithTriggerActive: l } = PS(), u = o.useState("hasScrollArrows"), d = o.useState("openMethod"), f = {
18592
18605
  id: `${o.useState("id")}-list`,
18593
18606
  role: "listbox",
18594
18607
  "aria-multiselectable": s || void 0,
@@ -18596,7 +18609,7 @@ var JS = /*#__PURE__*/ Z.forwardRef(function(e, t) {
18596
18609
  onScroll(e) {
18597
18610
  o.context.scrollHandlerRef.current?.(e.currentTarget);
18598
18611
  },
18599
- ...l && { style: FS },
18612
+ ...l && { style: IS },
18600
18613
  className: u && d !== "touch" ? qp.className : void 0
18601
18614
  }, p = o.useStateSetter("listElement");
18602
18615
  return G("div", e, {
@@ -18604,20 +18617,20 @@ var JS = /*#__PURE__*/ Z.forwardRef(function(e, t) {
18604
18617
  props: [f, a]
18605
18618
  });
18606
18619
  });
18607
- process.env.NODE_ENV !== "production" && (JS.displayName = "SelectList");
18608
- var YS = /*#__PURE__*/ Z.createContext(void 0);
18609
- process.env.NODE_ENV !== "production" && (YS.displayName = "SelectItemContext");
18610
- function XS() {
18611
- let e = Z.useContext(YS);
18620
+ process.env.NODE_ENV !== "production" && (YS.displayName = "SelectList");
18621
+ var XS = /*#__PURE__*/ Z.createContext(void 0);
18622
+ process.env.NODE_ENV !== "production" && (XS.displayName = "SelectItemContext");
18623
+ function ZS() {
18624
+ let e = Z.useContext(XS);
18612
18625
  if (!e) throw Error(process.env.NODE_ENV === "production" ? C(57) : "Base UI: SelectItemContext is missing. SelectItem parts must be placed within <Select.Item>.");
18613
18626
  return e;
18614
18627
  }
18615
- var ZS = /*#__PURE__*/ Z.memo(/*#__PURE__*/ Z.forwardRef(function(e, t) {
18628
+ var QS = /*#__PURE__*/ Z.memo(/*#__PURE__*/ Z.forwardRef(function(e, t) {
18616
18629
  let { render: n, className: r, style: i, value: a = null, label: o, disabled: s = !1, nativeButton: c = !1, ...l } = e, u = Z.useRef(null), d = Aa({
18617
18630
  guess: !0,
18618
18631
  label: o,
18619
18632
  textRef: u
18620
- }), f = bS(), { props: p, multiple: m, disabled: h, readOnly: g, isItemEqualToValue: _ } = f.useState("itemRoot"), v = h || s, y = f.useState("isActive", d.index), b = f.useState("open"), x = f.useState("isSelected", a), S = f.useState("isSelectedByFocus", d.index), C = d.index, T = Z.useRef(null);
18633
+ }), f = xS(), { props: p, multiple: m, disabled: h, readOnly: g, isItemEqualToValue: _ } = f.useState("itemRoot"), v = h || s, y = f.useState("isActive", d.index), b = f.useState("open"), x = f.useState("isSelected", a), S = f.useState("isSelectedByFocus", d.index), C = d.index, T = Z.useRef(null);
18621
18634
  w(() => {
18622
18635
  let e = f.context.valuesRef.current;
18623
18636
  return e[C] = a, () => {
@@ -18711,23 +18724,23 @@ var ZS = /*#__PURE__*/ Z.memo(/*#__PURE__*/ Z.forwardRef(function(e, t) {
18711
18724
  u,
18712
18725
  S
18713
18726
  ]);
18714
- return /*#__PURE__*/ Q(YS.Provider, {
18727
+ return /*#__PURE__*/ Q(XS.Provider, {
18715
18728
  value: F,
18716
18729
  children: P
18717
18730
  });
18718
18731
  }));
18719
- process.env.NODE_ENV !== "production" && (ZS.displayName = "SelectItem");
18720
- var QS = /*#__PURE__*/ Z.forwardRef(function(e, t) {
18721
- let { selected: n } = XS();
18732
+ process.env.NODE_ENV !== "production" && (QS.displayName = "SelectItem");
18733
+ var $S = /*#__PURE__*/ Z.forwardRef(function(e, t) {
18734
+ let { selected: n } = ZS();
18722
18735
  return e.keepMounted || n ? /*#__PURE__*/ Q(Jl, {
18723
18736
  ...e,
18724
18737
  selected: n,
18725
18738
  ref: t
18726
18739
  }) : null;
18727
18740
  });
18728
- process.env.NODE_ENV !== "production" && (QS.displayName = "SelectItemIndicator");
18729
- var $S = /*#__PURE__*/ Z.memo(/*#__PURE__*/ Z.forwardRef(function(e, t) {
18730
- let { index: n, textRef: r, selectedByFocus: i } = XS(), a = bS(), { render: o, className: s, style: c, ...l } = e, u = Z.useCallback((e) => {
18741
+ process.env.NODE_ENV !== "production" && ($S.displayName = "SelectItemIndicator");
18742
+ var eC = /*#__PURE__*/ Z.memo(/*#__PURE__*/ Z.forwardRef(function(e, t) {
18743
+ let { index: n, textRef: r, selectedByFocus: i } = ZS(), a = xS(), { render: o, className: s, style: c, ...l } = e, u = Z.useCallback((e) => {
18731
18744
  e && (n === 0 && (a.context.firstItemTextRef.current = e), i && (a.context.selectedItemTextRef.current = e));
18732
18745
  }, [
18733
18746
  a,
@@ -18743,9 +18756,9 @@ var $S = /*#__PURE__*/ Z.memo(/*#__PURE__*/ Z.forwardRef(function(e, t) {
18743
18756
  props: l
18744
18757
  });
18745
18758
  }));
18746
- process.env.NODE_ENV !== "production" && ($S.displayName = "SelectItemText");
18747
- var eC = /*#__PURE__*/ Z.forwardRef(function(e, t) {
18748
- let { render: n, className: r, style: i, direction: a, keepMounted: o, ...s } = e, c = a === "up", l = bS(), { side: u, scrollDownArrowRef: d, scrollUpArrowRef: f } = NS(), p = c ? "scrollUpArrowVisible" : "scrollDownArrowVisible", m = l.useState(p), h = l.useState("openMethod"), g = m && h !== "touch", _ = Kt(), v = c ? f : d, { mounted: y, transitionStatus: b, setMounted: x } = ie(g);
18759
+ process.env.NODE_ENV !== "production" && (eC.displayName = "SelectItemText");
18760
+ var tC = /*#__PURE__*/ Z.forwardRef(function(e, t) {
18761
+ let { render: n, className: r, style: i, direction: a, keepMounted: o, ...s } = e, c = a === "up", l = xS(), { side: u, scrollDownArrowRef: d, scrollUpArrowRef: f } = PS(), p = c ? "scrollUpArrowVisible" : "scrollDownArrowVisible", m = l.useState(p), h = l.useState("openMethod"), g = m && h !== "touch", _ = Kt(), v = c ? f : d, { mounted: y, transitionStatus: b, setMounted: x } = ie(g);
18749
18762
  w(() => (l.context.scrollArrowsMountedCountRef.current += 1, l.set("hasScrollArrows", !0), () => {
18750
18763
  l.context.scrollArrowsMountedCountRef.current = Math.max(0, l.context.scrollArrowsMountedCountRef.current - 1), l.context.scrollArrowsMountedCountRef.current === 0 && l.set("hasScrollArrows", !1);
18751
18764
  }), [l]), ve({
@@ -18779,7 +18792,7 @@ var eC = /*#__PURE__*/ Z.forwardRef(function(e, t) {
18779
18792
  else {
18780
18793
  if (a.length > 0) {
18781
18794
  let t = v.current?.offsetHeight || 0;
18782
- e.scrollTop = tC(a, c, r, e.clientHeight, t, n);
18795
+ e.scrollTop = nC(a, c, r, e.clientHeight, t, n);
18783
18796
  }
18784
18797
  _.start(40, t);
18785
18798
  }
@@ -18794,8 +18807,8 @@ var eC = /*#__PURE__*/ Z.forwardRef(function(e, t) {
18794
18807
  });
18795
18808
  return y || o ? S : null;
18796
18809
  });
18797
- process.env.NODE_ENV !== "production" && (eC.displayName = "SelectScrollArrow");
18798
- function tC(e, t, n, r, i, a) {
18810
+ process.env.NODE_ENV !== "production" && (tC.displayName = "SelectScrollArrow");
18811
+ function nC(e, t, n, r, i, a) {
18799
18812
  if (t) {
18800
18813
  let t = 0, r = n + i - 1;
18801
18814
  for (let n = 0; n < e.length; n += 1) {
@@ -18819,30 +18832,30 @@ function tC(e, t, n, r, i, a) {
18819
18832
  let c = Math.min(e.length - 1, o + 1), l = e[c];
18820
18833
  return c > o && l ? _m(l.offsetTop + l.offsetHeight - r + i, a) : a;
18821
18834
  }
18822
- var nC = /*#__PURE__*/ Z.forwardRef(function(e, t) {
18823
- return /*#__PURE__*/ Q(eC, {
18835
+ var rC = /*#__PURE__*/ Z.forwardRef(function(e, t) {
18836
+ return /*#__PURE__*/ Q(tC, {
18824
18837
  ...e,
18825
18838
  ref: t,
18826
18839
  direction: "down"
18827
18840
  });
18828
18841
  });
18829
- process.env.NODE_ENV !== "production" && (nC.displayName = "SelectScrollDownArrow");
18830
- var rC = /*#__PURE__*/ Z.forwardRef(function(e, t) {
18831
- return /*#__PURE__*/ Q(eC, {
18842
+ process.env.NODE_ENV !== "production" && (rC.displayName = "SelectScrollDownArrow");
18843
+ var iC = /*#__PURE__*/ Z.forwardRef(function(e, t) {
18844
+ return /*#__PURE__*/ Q(tC, {
18832
18845
  ...e,
18833
18846
  ref: t,
18834
18847
  direction: "up"
18835
18848
  });
18836
18849
  });
18837
- process.env.NODE_ENV !== "production" && (rC.displayName = "SelectScrollUpArrow");
18838
- var iC = /*#__PURE__*/ Z.createContext(void 0);
18839
- process.env.NODE_ENV !== "production" && (iC.displayName = "SelectGroupContext");
18840
- function aC() {
18841
- let e = Z.useContext(iC);
18850
+ process.env.NODE_ENV !== "production" && (iC.displayName = "SelectScrollUpArrow");
18851
+ var aC = /*#__PURE__*/ Z.createContext(void 0);
18852
+ process.env.NODE_ENV !== "production" && (aC.displayName = "SelectGroupContext");
18853
+ function oC() {
18854
+ let e = Z.useContext(aC);
18842
18855
  if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? C(56) : "Base UI: SelectGroupContext is missing. SelectGroup parts must be placed within <Select.Group>.");
18843
18856
  return e;
18844
18857
  }
18845
- var oC = /*#__PURE__*/ Z.forwardRef(function(e, t) {
18858
+ var sC = /*#__PURE__*/ Z.forwardRef(function(e, t) {
18846
18859
  let { render: n, className: r, style: i, ...a } = e, [o, s] = Z.useState(), c = Z.useMemo(() => ({
18847
18860
  labelId: o,
18848
18861
  setLabelId: s
@@ -18853,14 +18866,14 @@ var oC = /*#__PURE__*/ Z.forwardRef(function(e, t) {
18853
18866
  "aria-labelledby": o
18854
18867
  }, a]
18855
18868
  });
18856
- return /*#__PURE__*/ Q(iC.Provider, {
18869
+ return /*#__PURE__*/ Q(aC.Provider, {
18857
18870
  value: c,
18858
18871
  children: l
18859
18872
  });
18860
18873
  });
18861
- process.env.NODE_ENV !== "production" && (oC.displayName = "SelectGroup");
18862
- var sC = /*#__PURE__*/ Z.forwardRef(function(e, t) {
18863
- let { render: n, className: r, style: i, id: a, ...o } = e, { setLabelId: s } = aC(), c = on(a);
18874
+ process.env.NODE_ENV !== "production" && (sC.displayName = "SelectGroup");
18875
+ var cC = /*#__PURE__*/ Z.forwardRef(function(e, t) {
18876
+ let { render: n, className: r, style: i, id: a, ...o } = e, { setLabelId: s } = oC(), c = on(a);
18864
18877
  return w(() => (s(c), () => {
18865
18878
  s((e) => e === c ? void 0 : e);
18866
18879
  }), [c, s]), G("div", e, {
@@ -18871,99 +18884,99 @@ var sC = /*#__PURE__*/ Z.forwardRef(function(e, t) {
18871
18884
  }, o]
18872
18885
  });
18873
18886
  });
18874
- process.env.NODE_ENV !== "production" && (sC.displayName = "SelectGroupLabel");
18875
- var cC = iu, lC = CS, uC = Z.forwardRef(function({ className: e, ...t }, n) {
18876
- return /* @__PURE__ */ Q(oC, {
18887
+ process.env.NODE_ENV !== "production" && (cC.displayName = "SelectGroupLabel");
18888
+ var lC = iu, uC = wS, dC = Z.forwardRef(function({ className: e, ...t }, n) {
18889
+ return /* @__PURE__ */ Q(sC, {
18877
18890
  ref: n,
18878
18891
  "data-slot": "select-group",
18879
18892
  className: j("ck-select-group", e),
18880
18893
  ...t
18881
18894
  });
18882
18895
  });
18883
- uC.displayName = "SelectGroup";
18884
- var dC = Z.forwardRef(function({ className: e, ...t }, n) {
18885
- return /* @__PURE__ */ Q(kS, {
18896
+ dC.displayName = "SelectGroup";
18897
+ var fC = Z.forwardRef(function({ className: e, ...t }, n) {
18898
+ return /* @__PURE__ */ Q(AS, {
18886
18899
  ref: n,
18887
18900
  "data-slot": "select-value",
18888
18901
  className: j("ck-select-value", e),
18889
18902
  ...t
18890
18903
  });
18891
18904
  });
18892
- dC.displayName = "SelectValue";
18893
- var fC = Z.forwardRef(function({ className: e, size: t = "default", children: n, ...r }, i) {
18894
- return /* @__PURE__ */ $(DS, {
18905
+ fC.displayName = "SelectValue";
18906
+ var pC = Z.forwardRef(function({ className: e, size: t = "default", children: n, ...r }, i) {
18907
+ return /* @__PURE__ */ $(OS, {
18895
18908
  ref: i,
18896
18909
  "data-slot": "select-trigger",
18897
18910
  "data-size": t,
18898
18911
  className: j("ck-select-trigger", e),
18899
18912
  ...r,
18900
- children: [n, /* @__PURE__ */ Q(AS, { render: /* @__PURE__ */ Q(zn, { className: "ck-select-trigger-icon" }) })]
18913
+ children: [n, /* @__PURE__ */ Q(jS, { render: /* @__PURE__ */ Q(zn, { className: "ck-select-trigger-icon" }) })]
18901
18914
  });
18902
18915
  });
18903
- fC.displayName = "SelectTrigger";
18904
- var pC = Z.forwardRef(function({ className: e, children: t, side: n = "bottom", sideOffset: r = 4, align: i = "center", alignOffset: a = 0, alignItemWithTrigger: o = !0, ...s }, c) {
18916
+ pC.displayName = "SelectTrigger";
18917
+ var mC = Z.forwardRef(function({ className: e, children: t, side: n = "bottom", sideOffset: r = 4, align: i = "center", alignOffset: a = 0, alignItemWithTrigger: o = !0, ...s }, c) {
18905
18918
  let l = On();
18906
- return /* @__PURE__ */ Q(jS, {
18919
+ return /* @__PURE__ */ Q(MS, {
18907
18920
  container: l ?? void 0,
18908
- children: /* @__PURE__ */ Q(LS, {
18921
+ children: /* @__PURE__ */ Q(RS, {
18909
18922
  side: n,
18910
18923
  sideOffset: r,
18911
18924
  align: i,
18912
18925
  alignOffset: a,
18913
18926
  alignItemWithTrigger: o,
18914
18927
  className: "ck-select-positioner",
18915
- children: /* @__PURE__ */ $(BS, {
18928
+ children: /* @__PURE__ */ $(VS, {
18916
18929
  ref: c,
18917
18930
  "data-slot": "select-content",
18918
18931
  "data-align-trigger": o,
18919
18932
  className: j("ck-select-content ck-dark-popup", e),
18920
18933
  ...s,
18921
18934
  children: [
18922
- /* @__PURE__ */ Q(_C, {}),
18923
- /* @__PURE__ */ Q(JS, { children: t }),
18924
- /* @__PURE__ */ Q(vC, {})
18935
+ /* @__PURE__ */ Q(vC, {}),
18936
+ /* @__PURE__ */ Q(YS, { children: t }),
18937
+ /* @__PURE__ */ Q(yC, {})
18925
18938
  ]
18926
18939
  })
18927
18940
  })
18928
18941
  });
18929
18942
  });
18930
- pC.displayName = "SelectContent";
18931
- var mC = Z.forwardRef(function({ className: e, ...t }, n) {
18932
- return /* @__PURE__ */ Q(sC, {
18943
+ mC.displayName = "SelectContent";
18944
+ var hC = Z.forwardRef(function({ className: e, ...t }, n) {
18945
+ return /* @__PURE__ */ Q(cC, {
18933
18946
  ref: n,
18934
18947
  "data-slot": "select-label",
18935
18948
  className: j("ck-select-label", e),
18936
18949
  ...t
18937
18950
  });
18938
18951
  });
18939
- mC.displayName = "SelectLabel";
18940
- var hC = Z.forwardRef(function({ className: e, children: t, ...n }, r) {
18941
- return /* @__PURE__ */ $(ZS, {
18952
+ hC.displayName = "SelectLabel";
18953
+ var gC = Z.forwardRef(function({ className: e, children: t, ...n }, r) {
18954
+ return /* @__PURE__ */ $(QS, {
18942
18955
  ref: r,
18943
18956
  "data-slot": "select-item",
18944
18957
  className: j("ck-select-item", e),
18945
18958
  ...n,
18946
- children: [/* @__PURE__ */ Q($S, {
18959
+ children: [/* @__PURE__ */ Q(eC, {
18947
18960
  className: "ck-select-item-text",
18948
18961
  children: t
18949
- }), /* @__PURE__ */ Q(QS, {
18962
+ }), /* @__PURE__ */ Q($S, {
18950
18963
  render: /* @__PURE__ */ Q("span", { className: "ck-select-item-indicator" }),
18951
18964
  children: /* @__PURE__ */ Q(Pn, {})
18952
18965
  })]
18953
18966
  });
18954
18967
  });
18955
- hC.displayName = "SelectItem";
18956
- var gC = Z.forwardRef(function({ className: e, ...t }, n) {
18957
- return /* @__PURE__ */ Q(cC, {
18968
+ gC.displayName = "SelectItem";
18969
+ var _C = Z.forwardRef(function({ className: e, ...t }, n) {
18970
+ return /* @__PURE__ */ Q(lC, {
18958
18971
  ref: n,
18959
18972
  "data-slot": "select-separator",
18960
18973
  className: j("ck-select-separator", e),
18961
18974
  ...t
18962
18975
  });
18963
18976
  });
18964
- gC.displayName = "SelectSeparator";
18965
- var _C = Z.forwardRef(function({ className: e, ...t }, n) {
18966
- return /* @__PURE__ */ Q(rC, {
18977
+ _C.displayName = "SelectSeparator";
18978
+ var vC = Z.forwardRef(function({ className: e, ...t }, n) {
18979
+ return /* @__PURE__ */ Q(iC, {
18967
18980
  ref: n,
18968
18981
  "data-slot": "select-scroll-up-button",
18969
18982
  className: j("ck-select-scroll-up-button", e),
@@ -18971,9 +18984,9 @@ var _C = Z.forwardRef(function({ className: e, ...t }, n) {
18971
18984
  children: /* @__PURE__ */ Q(Vn, {})
18972
18985
  });
18973
18986
  });
18974
- _C.displayName = "SelectScrollUpButton";
18975
- var vC = Z.forwardRef(function({ className: e, ...t }, n) {
18976
- return /* @__PURE__ */ Q(nC, {
18987
+ vC.displayName = "SelectScrollUpButton";
18988
+ var yC = Z.forwardRef(function({ className: e, ...t }, n) {
18989
+ return /* @__PURE__ */ Q(rC, {
18977
18990
  ref: n,
18978
18991
  "data-slot": "select-scroll-down-button",
18979
18992
  className: j("ck-select-scroll-down-button", e),
@@ -18981,13 +18994,13 @@ var vC = Z.forwardRef(function({ className: e, ...t }, n) {
18981
18994
  children: /* @__PURE__ */ Q(An, {})
18982
18995
  });
18983
18996
  });
18984
- vC.displayName = "SelectScrollDownButton";
18985
- function yC() {
18997
+ yC.displayName = "SelectScrollDownButton";
18998
+ function bC() {
18986
18999
  if (typeof window > "u") return !1;
18987
19000
  let e = window.location.hostname;
18988
19001
  return e === "localhost" || e === "127.0.0.1" || e === "[::1]" || e.endsWith(".localhost");
18989
19002
  }
18990
- var bC = [
19003
+ var xC = [
18991
19004
  {
18992
19005
  value: "light",
18993
19006
  label: "Light",
@@ -19004,7 +19017,7 @@ var bC = [
19004
19017
  icon: ki
19005
19018
  }
19006
19019
  ];
19007
- function xC(e) {
19020
+ function SC(e) {
19008
19021
  let t = [];
19009
19022
  for (let n of e.split(" ")) {
19010
19023
  let e = n[0];
@@ -19012,13 +19025,13 @@ function xC(e) {
19012
19025
  }
19013
19026
  return t.join("").toUpperCase() || "?";
19014
19027
  }
19015
- function SC(e) {
19028
+ function CC(e) {
19016
19029
  return !e || e.limit === null || e.limit <= 0 ? 0 : Math.min(100, Math.round(e.used / e.limit * 100));
19017
19030
  }
19018
- function CC() {
19031
+ function wC() {
19019
19032
  return Z.useSyncExternalStore(g, () => _() ?? "system", () => "system");
19020
19033
  }
19021
- function wC({ user: e, organizationPlan: t }) {
19034
+ function TC({ user: e, organizationPlan: t }) {
19022
19035
  return /* @__PURE__ */ $("div", {
19023
19036
  className: "ck-settings-user",
19024
19037
  children: [
@@ -19027,7 +19040,7 @@ function wC({ user: e, organizationPlan: t }) {
19027
19040
  children: [e.avatar ? /* @__PURE__ */ Q(qs, {
19028
19041
  src: e.avatar,
19029
19042
  alt: e.name ?? ""
19030
- }) : null, /* @__PURE__ */ Q(Js, { children: e.name ? xC(e.name) : "?" })]
19043
+ }) : null, /* @__PURE__ */ Q(Js, { children: e.name ? SC(e.name) : "?" })]
19031
19044
  }),
19032
19045
  /* @__PURE__ */ $("div", {
19033
19046
  className: "ck-settings-user-copy",
@@ -19047,7 +19060,7 @@ function wC({ user: e, organizationPlan: t }) {
19047
19060
  ]
19048
19061
  });
19049
19062
  }
19050
- function TC({ members: e, currentUserId: t, onInvite: n }) {
19063
+ function EC({ members: e, currentUserId: t, onInvite: n }) {
19051
19064
  return /* @__PURE__ */ $("div", {
19052
19065
  className: "ck-settings-team",
19053
19066
  children: [/* @__PURE__ */ $("div", {
@@ -19065,30 +19078,30 @@ function TC({ members: e, currentUserId: t, onInvite: n }) {
19065
19078
  "data-icon": "inline-start"
19066
19079
  }), "Invite"]
19067
19080
  }) : null]
19068
- }), /* @__PURE__ */ Q(dS, {
19081
+ }), /* @__PURE__ */ Q(fS, {
19069
19082
  className: "ck-settings-members",
19070
19083
  "aria-label": "Team members",
19071
- children: e.map((e) => /* @__PURE__ */ $(fS, {
19084
+ children: e.map((e) => /* @__PURE__ */ $(pS, {
19072
19085
  size: "xs",
19073
19086
  className: "ck-settings-member",
19074
19087
  role: "listitem",
19075
19088
  children: [
19076
- /* @__PURE__ */ Q(pS, { children: /* @__PURE__ */ $("span", {
19089
+ /* @__PURE__ */ Q(mS, { children: /* @__PURE__ */ $("span", {
19077
19090
  className: "ck-settings-member-avatar",
19078
19091
  children: [/* @__PURE__ */ $(Ks, {
19079
19092
  size: "sm",
19080
19093
  children: [e.avatarUrl ? /* @__PURE__ */ Q(qs, {
19081
19094
  src: e.avatarUrl,
19082
19095
  alt: e.name
19083
- }) : null, /* @__PURE__ */ Q(Js, { children: xC(e.name) })]
19096
+ }) : null, /* @__PURE__ */ Q(Js, { children: SC(e.name) })]
19084
19097
  }), e.isOnline ? /* @__PURE__ */ Q("span", {
19085
19098
  className: "ck-settings-member-online",
19086
19099
  "aria-label": "Online"
19087
19100
  }) : null]
19088
19101
  }) }),
19089
- /* @__PURE__ */ $(mS, {
19102
+ /* @__PURE__ */ $(hS, {
19090
19103
  className: "ck-settings-member-copy",
19091
- children: [/* @__PURE__ */ $(hS, {
19104
+ children: [/* @__PURE__ */ $(gS, {
19092
19105
  className: "ck-settings-member-name",
19093
19106
  children: [/* @__PURE__ */ Q("span", {
19094
19107
  className: "ck-settings-member-name-text",
@@ -19097,12 +19110,12 @@ function TC({ members: e, currentUserId: t, onInvite: n }) {
19097
19110
  className: "ck-settings-you",
19098
19111
  children: "(you)"
19099
19112
  }) : null]
19100
- }), e.email ? /* @__PURE__ */ Q(gS, {
19113
+ }), e.email ? /* @__PURE__ */ Q(_S, {
19101
19114
  className: "ck-settings-member-email",
19102
19115
  children: e.email
19103
19116
  }) : null]
19104
19117
  }),
19105
- e.role && e.role !== "member" ? /* @__PURE__ */ Q(_S, { children: /* @__PURE__ */ Q(Sg, {
19118
+ e.role && e.role !== "member" ? /* @__PURE__ */ Q(vS, { children: /* @__PURE__ */ Q(Sg, {
19106
19119
  variant: "secondary",
19107
19120
  className: "ck-settings-plan",
19108
19121
  children: e.role
@@ -19112,8 +19125,8 @@ function TC({ members: e, currentUserId: t, onInvite: n }) {
19112
19125
  })]
19113
19126
  });
19114
19127
  }
19115
- var EC = Z.memo(function({ user: e, projectName: t, organizationName: r, organizationPlan: i, usage: a, dashboardUrl: o, onLogout: s, members: c, currentUserId: l, onInvite: u, onRefreshAccess: d, readOnly: f = !1 }) {
19116
- let p = CC(), g = SC(a), _ = !!(e?.name || e?.email), v = o && /^https?:\/\//i.test(o) && n(o) ? o : void 0, [y, b] = Z.useState(!1);
19128
+ var DC = Z.memo(function({ user: e, projectName: t, organizationName: r, organizationPlan: i, usage: a, dashboardUrl: o, onLogout: s, members: c, currentUserId: l, onInvite: u, onRefreshAccess: d, readOnly: f = !1 }) {
19129
+ let p = wC(), g = CC(a), _ = !!(e?.name || e?.email), v = o && /^https?:\/\//i.test(o) && n(o) ? o : void 0, [y, b] = Z.useState(!1);
19117
19130
  async function x() {
19118
19131
  if (d && !y) {
19119
19132
  b(!0);
@@ -19134,12 +19147,12 @@ var EC = Z.memo(function({ user: e, projectName: t, organizationName: r, organiz
19134
19147
  children: [
19135
19148
  /* @__PURE__ */ $("div", {
19136
19149
  className: "ck-settings-brand",
19137
- children: [/* @__PURE__ */ Q(ho, {}), yC() ? /* @__PURE__ */ Q(Sg, {
19150
+ children: [/* @__PURE__ */ Q(ho, {}), bC() ? /* @__PURE__ */ Q(Sg, {
19138
19151
  className: "ck-local-badge",
19139
19152
  children: "Localhost"
19140
19153
  }) : null]
19141
19154
  }),
19142
- _ && e ? /* @__PURE__ */ Q(wC, {
19155
+ _ && e ? /* @__PURE__ */ Q(TC, {
19143
19156
  user: e,
19144
19157
  organizationPlan: i
19145
19158
  }) : null,
@@ -19163,7 +19176,7 @@ var EC = Z.memo(function({ user: e, projectName: t, organizationName: r, organiz
19163
19176
  children: r
19164
19177
  })]
19165
19178
  }) : null,
19166
- c && c.length > 0 ? /* @__PURE__ */ Q(TC, {
19179
+ c && c.length > 0 ? /* @__PURE__ */ Q(EC, {
19167
19180
  members: c,
19168
19181
  currentUserId: l,
19169
19182
  onInvite: u
@@ -19198,15 +19211,15 @@ var EC = Z.memo(function({ user: e, projectName: t, organizationName: r, organiz
19198
19211
  className: "ck-settings-hint",
19199
19212
  children: "Choose your preference"
19200
19213
  })]
19201
- }), /* @__PURE__ */ $(lC, {
19202
- items: [...bC],
19214
+ }), /* @__PURE__ */ $(uC, {
19215
+ items: [...xC],
19203
19216
  value: p,
19204
19217
  onValueChange: S,
19205
- children: [/* @__PURE__ */ Q(fC, {
19218
+ children: [/* @__PURE__ */ Q(pC, {
19206
19219
  className: "ck-settings-theme-trigger",
19207
19220
  "aria-label": "Theme",
19208
- children: /* @__PURE__ */ Q(dC, {})
19209
- }), /* @__PURE__ */ Q(pC, { children: /* @__PURE__ */ Q(uC, { children: bC.map((e) => /* @__PURE__ */ Q(hC, {
19221
+ children: /* @__PURE__ */ Q(fC, {})
19222
+ }), /* @__PURE__ */ Q(mC, { children: /* @__PURE__ */ Q(dC, { children: xC.map((e) => /* @__PURE__ */ Q(gC, {
19210
19223
  value: e.value,
19211
19224
  children: /* @__PURE__ */ $("span", {
19212
19225
  className: "ck-settings-theme-option",
@@ -19258,7 +19271,7 @@ var EC = Z.memo(function({ user: e, projectName: t, organizationName: r, organiz
19258
19271
  })
19259
19272
  });
19260
19273
  });
19261
- function DC(e, t = Date.now()) {
19274
+ function OC(e, t = Date.now()) {
19262
19275
  let n = Date.parse(e);
19263
19276
  if (!Number.isFinite(n)) return "";
19264
19277
  let r = Math.max(0, t - n), i = Math.floor(r / 6e4);
@@ -19273,7 +19286,7 @@ function DC(e, t = Date.now()) {
19273
19286
  year: "numeric"
19274
19287
  });
19275
19288
  }
19276
- function OC(e) {
19289
+ function kC(e) {
19277
19290
  return {
19278
19291
  id: e.id,
19279
19292
  name: e.name,
@@ -19281,7 +19294,7 @@ function OC(e) {
19281
19294
  ...e.avatar ? { avatarUrl: e.avatar } : {}
19282
19295
  };
19283
19296
  }
19284
- function kC(e) {
19297
+ function AC(e) {
19285
19298
  return e ? e.flatMap((e) => e.url ? [{
19286
19299
  id: e.id,
19287
19300
  url: e.url,
@@ -19295,41 +19308,41 @@ function kC(e) {
19295
19308
  ...e.thumbnail ? { thumbnail: e.thumbnail } : {}
19296
19309
  }] : []) : [];
19297
19310
  }
19298
- function AC(e) {
19311
+ function jC(e) {
19299
19312
  return e === "resolved" || e === "complete";
19300
19313
  }
19301
- function jC(e) {
19314
+ function MC(e) {
19302
19315
  return {
19303
19316
  ...e.isEdited ? { isEdited: !0 } : {},
19304
19317
  ...e.reactions && e.reactions.length > 0 ? { reactions: e.reactions } : {},
19305
19318
  ...e.type === "highlight" && e.textSelection?.text ? { quotedText: e.textSelection.text } : {}
19306
19319
  };
19307
19320
  }
19308
- function MC(e, t = Date.now()) {
19321
+ function NC(e, t = Date.now()) {
19309
19322
  return {
19310
19323
  id: e.id,
19311
- author: OC(e.author),
19324
+ author: kC(e.author),
19312
19325
  body: e.content,
19313
- timestamp: DC(e.createdAt, t),
19326
+ timestamp: OC(e.createdAt, t),
19314
19327
  createdAt: e.createdAt,
19315
19328
  updatedAt: e.updatedAt,
19316
- images: kC(e.attachments),
19329
+ images: AC(e.attachments),
19317
19330
  status: e.status,
19318
19331
  priority: e.priority,
19319
- isResolved: AC(e.status),
19332
+ isResolved: jC(e.status),
19320
19333
  type: e.type,
19321
19334
  ...e.deviceInfo ? { deviceInfo: e.deviceInfo } : {},
19322
- ...jC(e)
19335
+ ...MC(e)
19323
19336
  };
19324
19337
  }
19325
- function NC(e, t = Date.now()) {
19338
+ function PC(e, t = Date.now()) {
19326
19339
  return {
19327
19340
  id: e.id,
19328
- author: OC(e.author),
19341
+ author: kC(e.author),
19329
19342
  body: e.content,
19330
- timestamp: DC(e.createdAt, t),
19343
+ timestamp: OC(e.createdAt, t),
19331
19344
  createdAt: e.createdAt,
19332
- images: kC(e.attachments),
19345
+ images: AC(e.attachments),
19333
19346
  status: "open",
19334
19347
  priority: "medium",
19335
19348
  isResolved: !1,
@@ -19339,12 +19352,12 @@ function NC(e, t = Date.now()) {
19339
19352
  ...e.replyTo ? { replyTo: e.replyTo } : {}
19340
19353
  };
19341
19354
  }
19342
- function PC(e, t = Date.now()) {
19355
+ function FC(e, t = Date.now()) {
19343
19356
  let n = e.checklist ?? [];
19344
19357
  return {
19345
19358
  id: e.id,
19346
- parent: MC(e, t),
19347
- replies: e.replies.map((e) => NC(e, t)),
19359
+ parent: NC(e, t),
19360
+ replies: e.replies.map((e) => PC(e, t)),
19348
19361
  pageRef: {
19349
19362
  title: e.page.title,
19350
19363
  path: e.page.path,
@@ -19358,11 +19371,11 @@ function PC(e, t = Date.now()) {
19358
19371
  },
19359
19372
  status: e.status,
19360
19373
  priority: e.priority,
19361
- isResolved: AC(e.status),
19374
+ isResolved: jC(e.status),
19362
19375
  ...e.branch ? { branch: e.branch } : {},
19363
19376
  ...e.resolvedAt ? { resolvedAt: e.resolvedAt } : {},
19364
19377
  ...e.completedAt ? { completedAt: e.completedAt } : {},
19365
- assignees: (e.assignees ?? []).map(OC),
19378
+ assignees: (e.assignees ?? []).map(kC),
19366
19379
  checklistDone: n.filter((e) => e.done).length,
19367
19380
  checklistTotal: n.length,
19368
19381
  ...e.description ? { description: e.description } : {},
@@ -19370,19 +19383,19 @@ function PC(e, t = Date.now()) {
19370
19383
  ...e.drawingData && e.drawingData.paths.length > 0 ? { drawingData: e.drawingData } : {}
19371
19384
  };
19372
19385
  }
19373
- function FC(e) {
19386
+ function IC(e) {
19374
19387
  let t = f().path;
19375
19388
  return e.filter((e) => e.page?.path === t && e.type === "pin");
19376
19389
  }
19377
- function IC(e, t) {
19390
+ function LC(e, t) {
19378
19391
  if (!t) return null;
19379
19392
  let n = e.comments.find((e) => e.id === t);
19380
- return n ? PC(n) : null;
19393
+ return n ? FC(n) : null;
19381
19394
  }
19382
- function LC(e) {
19395
+ function RC(e) {
19383
19396
  if (e.status === "failed") throw Error(e.message || "Something went wrong.");
19384
19397
  }
19385
- function RC(e) {
19398
+ function zC(e) {
19386
19399
  let t = u(e.clientX, e.clientY);
19387
19400
  if (!e.target) return t;
19388
19401
  try {
@@ -19395,8 +19408,8 @@ function RC(e) {
19395
19408
  return t;
19396
19409
  }
19397
19410
  }
19398
- function zC({ core: e, state: t, dockSide: n, verticalEdge: r }) {
19399
- let i = FC(t.comments).map((e) => PC(e)), a = t.comments.map((e) => PC(e));
19411
+ function BC({ core: e, state: t, dockSide: n, verticalEdge: r }) {
19412
+ let i = IC(t.comments).map((e) => FC(e)), a = t.comments.map((e) => FC(e));
19400
19413
  vv({
19401
19414
  threads: i,
19402
19415
  onOpenThread: (t) => {
@@ -19409,7 +19422,7 @@ function zC({ core: e, state: t, dockSide: n, verticalEdge: r }) {
19409
19422
  Mr(e, t);
19410
19423
  }
19411
19424
  });
19412
- let o = xv(a), s = IC(t, t.selectedComment?.id ?? null), c = t.isSidebarVisible && t.panelView !== "dev-export", l = Dp(), { present: u, closing: d } = Fh(c, l), f = t.panelView === "settings" ? "settings" : t.panelView === "detail" && s ? "detail" : "list", p = () => {
19425
+ let o = xv(a), s = LC(t, t.selectedComment?.id ?? null), c = t.isSidebarVisible && t.panelView !== "dev-export", l = Dp(), { present: u, closing: d } = Fh(c, l), f = t.panelView === "settings" ? "settings" : t.panelView === "detail" && s ? "detail" : "list", p = () => {
19413
19426
  e.getState().isSidebarVisible && e.toggleSidebar();
19414
19427
  }, m = t.onlineUsers.map((e) => ({
19415
19428
  id: e.id,
@@ -19420,7 +19433,7 @@ function zC({ core: e, state: t, dockSide: n, verticalEdge: r }) {
19420
19433
  id: t.currentUser.id,
19421
19434
  name: t.currentUser.name,
19422
19435
  ...t.currentUser.avatar ? { avatarUrl: t.currentUser.avatar } : {}
19423
- } : null, _ = /* @__PURE__ */ Q(uS, {
19436
+ } : null, _ = /* @__PURE__ */ Q(dS, {
19424
19437
  ...Cv({
19425
19438
  core: e,
19426
19439
  state: t,
@@ -19428,7 +19441,7 @@ function zC({ core: e, state: t, dockSide: n, verticalEdge: r }) {
19428
19441
  threads: a,
19429
19442
  activeThread: s,
19430
19443
  onlineUsers: m,
19431
- settings: /* @__PURE__ */ Q(EC, {
19444
+ settings: /* @__PURE__ */ Q(DC, {
19432
19445
  user: t.currentUser ? {
19433
19446
  name: t.currentUser.name,
19434
19447
  ...e.isLocalDemo?.() || h ? {} : { email: t.currentUser.email },
@@ -19472,7 +19485,7 @@ function zC({ core: e, state: t, dockSide: n, verticalEdge: r }) {
19472
19485
  onCopyUrl: (e) => void o.copyUrl(e),
19473
19486
  onReact: (t, n) => e.reactToComment(t, n),
19474
19487
  onSaveEdit: async (t, n, r) => {
19475
- LC(await Tr(e, t, n, r, {
19488
+ RC(await Tr(e, t, n, r, {
19476
19489
  type: "comment",
19477
19490
  commentId: t
19478
19491
  }));
@@ -19482,7 +19495,7 @@ function zC({ core: e, state: t, dockSide: n, verticalEdge: r }) {
19482
19495
  },
19483
19496
  onPlace: async (n) => {
19484
19497
  if (!t.currentUser) throw t.isLoginModalVisible || e.toggleLoginModal(), Error("Sign in to save comments.");
19485
- LC(await Cr(e, n.body, RC(n), n));
19498
+ RC(await Cr(e, n.body, zC(n), n));
19486
19499
  },
19487
19500
  onViewThread: (t) => {
19488
19501
  Mr(e, t);
@@ -19494,7 +19507,7 @@ function zC({ core: e, state: t, dockSide: n, verticalEdge: r }) {
19494
19507
  Or(e, t);
19495
19508
  },
19496
19509
  onReply: async (t, n, r) => {
19497
- LC(await Er(e, t, n, r));
19510
+ RC(await Er(e, t, n, r));
19498
19511
  },
19499
19512
  onPositionChange: (t, n, r) => {
19500
19513
  e.updateCommentPosition(t, n, r);
@@ -19505,21 +19518,21 @@ function zC({ core: e, state: t, dockSide: n, verticalEdge: r }) {
19505
19518
  children: _
19506
19519
  }) : _ : null] });
19507
19520
  }
19508
- var BC = /* @__PURE__ */ e({ CommentKitUI: () => QC }), VC = () => import("./element-selector-g1bTvdEA.js"), HC = () => import("./dev-export-panel-CrRENbMn.js"), UC = {
19521
+ var VC = /* @__PURE__ */ e({ CommentKitUI: () => $C }), HC = () => import("./element-selector-Biyn2cpR.js"), UC = () => import("./dev-export-panel-D08M2LKD.js"), WC = {
19509
19522
  comments: !0,
19510
19523
  drawing: !0,
19511
19524
  highlighting: !0,
19512
19525
  screenshots: !0,
19513
19526
  realtime: !0
19514
19527
  };
19515
- function WC(e) {
19528
+ function GC(e) {
19516
19529
  try {
19517
19530
  return e.getFeatures();
19518
19531
  } catch {
19519
- return UC;
19532
+ return WC;
19520
19533
  }
19521
19534
  }
19522
- function GC(e, t) {
19535
+ function KC(e, t) {
19523
19536
  try {
19524
19537
  v.warning(`CommentKit v${e} is outdated`, {
19525
19538
  description: `Update to v${t}: npm update @commentkit/comment-kit`,
@@ -19527,7 +19540,7 @@ function GC(e, t) {
19527
19540
  });
19528
19541
  } catch {}
19529
19542
  }
19530
- function KC(e) {
19543
+ function qC(e) {
19531
19544
  try {
19532
19545
  v.success("Copied comments for agent", {
19533
19546
  description: `${e} comment${e === 1 ? "" : "s"} ready to paste into Claude, Codex, Cursor, or another agent.`,
@@ -19535,7 +19548,7 @@ function KC(e) {
19535
19548
  });
19536
19549
  } catch {}
19537
19550
  }
19538
- function qC() {
19551
+ function JC() {
19539
19552
  try {
19540
19553
  v.error("Could not copy agent context", {
19541
19554
  description: "Clipboard access failed. Try again from a focused browser tab.",
@@ -19543,21 +19556,21 @@ function qC() {
19543
19556
  });
19544
19557
  } catch {}
19545
19558
  }
19546
- function JC(e) {
19559
+ function YC(e) {
19547
19560
  return e.status === "open";
19548
19561
  }
19549
- function YC(e) {
19562
+ function XC(e) {
19550
19563
  let [t, n] = e.split(","), r = /:(.*?);/.exec(t ?? "")?.[1] ?? "image/png", i = atob(n ?? ""), a = new Uint8Array(i.length);
19551
19564
  for (let e = 0; e < i.length; e += 1) a[e] = i.charCodeAt(e);
19552
19565
  return new Blob([a], { type: r });
19553
19566
  }
19554
- function XC(e) {
19567
+ function ZC(e) {
19555
19568
  return new Promise((t, n) => {
19556
19569
  let r = new Image();
19557
19570
  r.onload = () => {
19558
19571
  t({
19559
19572
  dataUrl: e,
19560
- blob: YC(e),
19573
+ blob: XC(e),
19561
19574
  dimensions: {
19562
19575
  width: r.naturalWidth || 1,
19563
19576
  height: r.naturalHeight || 1
@@ -19566,7 +19579,7 @@ function XC(e) {
19566
19579
  }, r.onerror = () => n(/* @__PURE__ */ Error("Invalid screenshot")), r.src = e;
19567
19580
  });
19568
19581
  }
19569
- function ZC(e) {
19582
+ function QC(e) {
19570
19583
  let t;
19571
19584
  try {
19572
19585
  t = e.getConfig().ui;
@@ -19580,15 +19593,15 @@ function ZC(e) {
19580
19593
  default: return "bottom-left";
19581
19594
  }
19582
19595
  }
19583
- var QC = ({ core: e, state: t }) => {
19596
+ var $C = ({ core: e, state: t }) => {
19584
19597
  let [n, r] = cr(!1), a = nr.useMemo(() => {
19585
19598
  try {
19586
19599
  return e.getConfig().ui?.position?.endsWith("left") ? "left" : "right";
19587
19600
  } catch {
19588
19601
  return "right";
19589
19602
  }
19590
- }, [e]), [o, s] = cr(a), [c, l] = cr(null), [u, d] = cr(""), m = WC(e), h = typeof e.getWriteAccess == "function" ? e.getWriteAccess() : i({ features: m }, t), g = nr.useCallback((t) => e.refreshAttachmentUrl(t), [e]), _ = nr.useCallback(() => r(!0), []), y = t.comments.filter(JC).length, b = yC(), x = b && t.panelView === "dev-export" && t.isSidebarVisible, S = nr.useMemo(() => ZC(e), [e]), C = No(e, p(f().url)), w = Dp(), T = t.isSidebarVisible && t.panelView !== "dev-export", E = nr.useCallback(async (t, n, r) => {
19591
- let i = await XC(t);
19603
+ }, [e]), [o, s] = cr(a), [c, l] = cr(null), [u, d] = cr(""), m = GC(e), h = typeof e.getWriteAccess == "function" ? e.getWriteAccess() : i({ features: m }, t), g = nr.useCallback((t) => e.refreshAttachmentUrl(t), [e]), _ = nr.useCallback(() => r(!0), []), y = t.comments.filter(YC).length, b = bC(), x = b && t.panelView === "dev-export" && t.isSidebarVisible, S = nr.useMemo(() => QC(e), [e]), C = No(e, p(f().url)), w = Dp(), T = t.isSidebarVisible && t.panelView !== "dev-export", E = nr.useCallback(async (t, n, r) => {
19604
+ let i = await ZC(t);
19592
19605
  if (!e.getState().isAuthenticated) {
19593
19606
  e.setActiveScreenshot(i), e.setTool(null), v.message("Sign in to save this screenshot");
19594
19607
  return;
@@ -19621,16 +19634,16 @@ var QC = ({ core: e, state: t }) => {
19621
19634
  r();
19622
19635
  } catch {}
19623
19636
  }
19624
- KC(n);
19637
+ qC(n);
19625
19638
  } catch {
19626
- qC();
19639
+ JC();
19627
19640
  }
19628
19641
  }, [e]);
19629
19642
  ar(() => {
19630
19643
  let t;
19631
19644
  try {
19632
19645
  t = e.on("sdk:outdated", ({ current: e, latest: t }) => {
19633
- GC(e, t);
19646
+ KC(e, t);
19634
19647
  });
19635
19648
  } catch {
19636
19649
  return;
@@ -19687,7 +19700,7 @@ var QC = ({ core: e, state: t }) => {
19687
19700
  devExportOpen: x
19688
19701
  }) }),
19689
19702
  /* @__PURE__ */ Q(tr, { children: /* @__PURE__ */ Q(zo, {
19690
- load: VC,
19703
+ load: HC,
19691
19704
  label: "element selection",
19692
19705
  needed: t.activeTool === "select" || t.comments.some((e) => e.status === "open" && !!(e.position?.element || e.position?.xpath)),
19693
19706
  onCancel: t.activeTool === "select" ? () => e.setTool(null) : void 0,
@@ -19697,7 +19710,7 @@ var QC = ({ core: e, state: t }) => {
19697
19710
  active: t.activeTool === "select"
19698
19711
  })
19699
19712
  }) }),
19700
- /* @__PURE__ */ Q(tr, { children: /* @__PURE__ */ Q(zC, {
19713
+ /* @__PURE__ */ Q(tr, { children: /* @__PURE__ */ Q(BC, {
19701
19714
  core: e,
19702
19715
  state: t,
19703
19716
  dockSide: o,
@@ -19726,7 +19739,7 @@ var QC = ({ core: e, state: t }) => {
19726
19739
  "data-commentkit-ui": "",
19727
19740
  "aria-label": "Dev export",
19728
19741
  children: /* @__PURE__ */ Q(zo, {
19729
- load: HC,
19742
+ load: UC,
19730
19743
  label: "developer export",
19731
19744
  onCancel: () => e.toggleSidebar(),
19732
19745
  children: ({ DevExportPanel: n }) => /* @__PURE__ */ Q(n, {
@@ -19783,4 +19796,4 @@ var QC = ({ core: e, state: t }) => {
19783
19796
  })
19784
19797
  });
19785
19798
  };
19786
- export { ds as A, Ca as B, Ls as C, QC as CommentKitUI, ys as D, Cs as E, eo as F, Cr as G, di as H, Pa as I, pr as K, Aa as L, wo as M, Co as N, vs as O, $a as P, wa as R, tc as S, Ts as T, ui as U, Vi as V, ni as W, Bf as _, ib as a, el as b, qg as c, mm as d, im as f, Jf as g, Vp as h, ab as i, zo as j, _s as k, Sg as l, Rp as m, yC as n, Ay as o, Np as p, dr as q, hb as r, ky as s, BC as t, Im as u, Iu as v, ks as w, xc as x, $c as y, Sa as z };
19799
+ export { ds as A, Ca as B, Ls as C, $C as CommentKitUI, ys as D, Cs as E, eo as F, Cr as G, di as H, Pa as I, pr as K, Aa as L, wo as M, Co as N, vs as O, $a as P, wa as R, tc as S, Ts as T, ui as U, Vi as V, ni as W, Bf as _, ib as a, el as b, qg as c, mm as d, im as f, Jf as g, Vp as h, ab as i, zo as j, _s as k, Sg as l, Rp as m, bC as n, Ay as o, Np as p, dr as q, hb as r, ky as s, VC as t, Im as u, Iu as v, ks as w, xc as x, $c as y, Sa as z };