@commentkit/comment-kit 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +109 -13
  3. package/SECURITY.md +2 -2
  4. package/dist/node/cli/doctor.js +84 -20
  5. package/dist/node/cli/init.js +349 -35
  6. package/dist/node/cli/main.js +35 -17
  7. package/dist/node/cli/mcp.js +187 -6
  8. package/dist/node/shared/dashboard-places.js +33 -0
  9. package/dist/npm/chunks/{AgentSend-DxRJIYiz.js → AgentSend-DOy3jhyF.js} +16 -16
  10. package/dist/npm/chunks/{Checklist-CnlfeSbc.js → Checklist-CW_SwMpS.js} +70 -70
  11. package/dist/npm/chunks/{Composer-B1bBVszY.js → Composer-Bveq5QrK.js} +276 -274
  12. package/dist/npm/chunks/{Guest-vvNPz8h-.js → Guest-7hcN765o.js} +58 -55
  13. package/dist/npm/chunks/{MarkupEditor-VCOXh9d2.js → MarkupEditor-6bJGpWGO.js} +46 -39
  14. package/dist/npm/chunks/Panel-ChPUB68C.js +1211 -0
  15. package/dist/npm/chunks/{Settings-BGoZS2iV.js → Settings-CB5eEKnf.js} +77 -77
  16. package/dist/npm/chunks/{Shortcuts-B2OMvczr.js → Shortcuts-eAyjJ89P.js} +4 -4
  17. package/dist/npm/chunks/{StyleEditor-CJ_d8Huf.js → StyleEditor-CZTdAA5c.js} +10 -10
  18. package/dist/npm/chunks/{StylePanel-yQzHHlY7.js → StylePanel-B4pHQUL9.js} +61 -61
  19. package/dist/npm/chunks/{TaskFields-fmy6_HtK.js → TaskFields-C8BX0Sgg.js} +55 -55
  20. package/dist/npm/chunks/ThreadCard-B1EsX3PR.js +1160 -0
  21. package/dist/npm/chunks/Viewer-DY6zb90M.js +114 -0
  22. package/dist/npm/chunks/{agent-C1OQzBAm.js → agent-MTQHr9ei.js} +1 -1
  23. package/dist/npm/chunks/{ar-CAJ3XT8e.js → ar-L5cQ-NPe.js} +2 -0
  24. package/dist/npm/chunks/{card-bits-CAnzrqx3.js → card-bits-CTdrkYn8.js} +16 -16
  25. package/dist/npm/chunks/{client-kNAo2TTG.js → client-7eVxvg5j.js} +7 -7
  26. package/dist/npm/chunks/{confetti-CkBdSu19.js → confetti-BIs5s14P.js} +1 -1
  27. package/dist/npm/chunks/{context-B8UAzve0.js → context-Cf6khm7A.js} +1 -1
  28. package/dist/npm/chunks/{de-Dl18G48t.js → de-D0C-v6tP.js} +2 -0
  29. package/dist/npm/chunks/{dialog-GO04oC3D.js → dialog-DvdIkCW0.js} +1 -1
  30. package/dist/npm/chunks/{dpop-U48QIQd7.js → dpop-0A76OPa9.js} +1 -1
  31. package/dist/npm/chunks/{es-Dxk79lS9.js → es-Bw4Dj9tN.js} +2 -0
  32. package/dist/npm/chunks/{extension-CKFpPWmi.js → extension-DFVOvciD.js} +1 -1
  33. package/dist/npm/chunks/{extension-E81hWyiT.js → extension-SmoH5AA4.js} +2 -2
  34. package/dist/npm/chunks/{files-DyD5BZgp.js → files-4lV9YQIX.js} +2 -2
  35. package/dist/npm/chunks/{fr-8BebGKYD.js → fr-TkuQaIAa.js} +2 -0
  36. package/dist/npm/chunks/{hi-BIN6Yy_p.js → hi-DXSH2U8d.js} +2 -0
  37. package/dist/npm/chunks/{i18n-DOBt8e9U.js → i18n-aVSu9TcJ.js} +56 -47
  38. package/dist/npm/chunks/{identify-CN-3xzqL.js → identify-BGYh2dVo.js} +4 -4
  39. package/dist/npm/chunks/{it-Cr6EwpPQ.js → it-CiWA_bch.js} +2 -0
  40. package/dist/npm/chunks/{ja-Iy3s5aur.js → ja-C-QmR3yz.js} +2 -0
  41. package/dist/npm/chunks/{late-words-B2bmZceJ.js → late-words-80_VWt8S.js} +3 -1
  42. package/dist/npm/chunks/{live-CelVeZfP.js → live-BExWHzQ7.js} +1 -1
  43. package/dist/npm/chunks/{nl-B84WHqqe.js → nl-CEmZRqjX.js} +2 -0
  44. package/dist/npm/chunks/{page-key-DepmJzC1.js → page-key-HSY3Lze5.js} +1 -1
  45. package/dist/npm/chunks/{pick-yTyqtxN0.js → pick-B3sR7jtS.js} +1 -1
  46. package/dist/npm/chunks/{pkce-ChKGSW_4.js → pkce-CfZhiNBi.js} +1 -1
  47. package/dist/npm/chunks/{pt-BR-DOkdlfoe.js → pt-BR-b-a8sxO8.js} +2 -0
  48. package/dist/npm/chunks/{report-CrIqQZDI.js → report-DaVuoRYS.js} +1 -1
  49. package/dist/npm/chunks/show-BoN8AC-F.js +97 -0
  50. package/dist/npm/chunks/{signin-Dd1rb2BP.js → signin-BOWr_WCo.js} +3 -3
  51. package/dist/npm/chunks/{source-pXVve2Cx.js → source-mk3rGBBQ.js} +1 -1
  52. package/dist/npm/chunks/{src-BTMy4Gyc.js → src-C8rZFyL_.js} +77 -70
  53. package/dist/npm/chunks/start-CV4j78_q.js +1894 -0
  54. package/dist/npm/chunks/{states-sfTbjZz8.js → states-b9Bv3Ci7.js} +1 -1
  55. package/dist/npm/chunks/{upload-MgPYqPyE.js → upload-B2mkgMeJ.js} +1 -1
  56. package/dist/npm/chunks/uploads-8AxyRq7g.js +1147 -0
  57. package/dist/npm/chunks/{wrap-Bl0gbnFa.js → wrap-DW6EFbVQ.js} +1 -1
  58. package/dist/npm/chunks/{zh-CN-Z5fQCb7G.js → zh-CN-JTscW8u8.js} +2 -0
  59. package/dist/npm/element.js +1 -1
  60. package/dist/npm/headless.js +2 -2
  61. package/dist/npm/index.js +2 -2
  62. package/dist/npm/react.js +1 -1
  63. package/dist/npm/svelte.js +1 -1
  64. package/dist/npm/types/core/types.d.ts +2 -2
  65. package/dist/npm/vue.js +1 -1
  66. package/package.json +3 -1
  67. package/dist/npm/chunks/Panel-F37vIL1K.js +0 -1206
  68. package/dist/npm/chunks/ThreadCard-D51slKST.js +0 -1113
  69. package/dist/npm/chunks/Viewer-BOBadqmC.js +0 -111
  70. package/dist/npm/chunks/show-BgVC8gWY.js +0 -97
  71. package/dist/npm/chunks/start-DtVlpt7p.js +0 -1878
  72. package/dist/npm/chunks/uploads-D49mywwz.js +0 -1146
@@ -1,24 +1,24 @@
1
- import { i as e } from "./src-BTMy4Gyc.js";
2
- import { b as t, o as n, v as r } from "./client-kNAo2TTG.js";
1
+ import { a as e } from "./src-C8rZFyL_.js";
2
+ import { b as t, o as n, v as r } from "./client-7eVxvg5j.js";
3
3
  import { a as i, c as a, o, s } from "./privacy-BWUGlHw5.js";
4
4
  import { s as c } from "./anchor-BsQNVkHj.js";
5
- import { _ as l, c as u, d as ee, f as d, g as f, p, u as m, y as te } from "./i18n-DOBt8e9U.js";
6
- import { r as ne } from "./files-DyD5BZgp.js";
7
- import { n as re, r as ie, t as ae } from "./card-bits-CAnzrqx3.js";
8
- import { i as h } from "./drafts-B0ctr1g9.js";
9
- import { a as oe, c as se, d as ce, f as le, h as ue, i as de, l as fe, m as pe, n as me, o as he, p as g, t as ge } from "./uploads-D49mywwz.js";
10
- import { t as _ } from "./states-sfTbjZz8.js";
11
- import { C as v, F as _e, M as ve, O as ye, _ as be, b as xe, c as Se, g as y, k as Ce, l as we, s as b, u as Te, y as x } from "./start-DtVlpt7p.js";
5
+ import { _ as l, b as u, c as d, d as ee, f, m as p, u as m, v as h } from "./i18n-aVSu9TcJ.js";
6
+ import { r as te } from "./files-4lV9YQIX.js";
7
+ import { n as ne, r as re, t as ie } from "./card-bits-CTdrkYn8.js";
8
+ import { i as g } from "./drafts-B0ctr1g9.js";
9
+ import { a as ae, c as oe, d as se, f as ce, h as le, i as ue, l as de, m as fe, n as pe, o as me, p as _, t as he } from "./uploads-8AxyRq7g.js";
10
+ import { t as v } from "./states-b9Bv3Ci7.js";
11
+ import { C as y, F as ge, M as _e, O as ve, _ as ye, b as be, c as xe, g as b, k as Se, l as Ce, s as x, u as we, y as S } from "./start-CV4j78_q.js";
12
12
  // src/capture/context.ts
13
- function Ee() {
14
- let e = navigator.userAgent, t = S(e, [
13
+ function Te() {
14
+ let e = navigator.userAgent, t = C(e, [
15
15
  ["Edge", /Edg\/([\d.]+)/],
16
16
  ["Opera", /OPR\/([\d.]+)/],
17
17
  ["Samsung Internet", /SamsungBrowser\/([\d.]+)/],
18
18
  ["Chrome", /Chrome\/([\d.]+)/],
19
19
  ["Firefox", /Firefox\/([\d.]+)/],
20
20
  ["Safari", /Version\/([\d.]+).*Safari/]
21
- ]), n = S(e, [
21
+ ]), n = C(e, [
22
22
  ["iOS", /(?:iPhone|iPad|iPod).*OS ([\d_]+)/],
23
23
  ["Android", /Android ([\d.]+)/],
24
24
  ["Windows", /Windows NT ([\d.]+)/],
@@ -45,7 +45,7 @@ function Ee() {
45
45
  }
46
46
  };
47
47
  }
48
- function S(e, t) {
48
+ function C(e, t) {
49
49
  for (let [n, r] of t) {
50
50
  let t = e.match(r);
51
51
  if (t) return [n, t[1] ?? ""];
@@ -53,40 +53,40 @@ function S(e, t) {
53
53
  return null;
54
54
  }
55
55
  // src/capture/screenshot.ts
56
- var C = 8e6, w = 15e3;
57
- function De() {
56
+ var w = 8e6, T = 15e3;
57
+ function Ee() {
58
58
  e() || import("./html2canvas-pro.esm-B7b8p5Wr.js").catch(() => void 0);
59
59
  }
60
- async function Oe(t = {}) {
60
+ async function De(t = {}) {
61
61
  let n = (t.redact ?? []).filter(s), r = o(t.privacy), i = innerWidth, a = innerHeight, c = null;
62
- e() && (c = await import("./extension-CKFpPWmi.js").then((e) => e.captureTab(n, r)).catch(() => null)), c ?? (c = await T(n, r, i, a));
62
+ e() && (c = await import("./extension-DFVOvciD.js").then((e) => e.captureTab(n, r)).catch(() => null)), c ?? (c = await E(n, r, i, a));
63
63
  let l = c.getContext("2d"), u = c.width / Math.max(1, i);
64
- return l && ke(l, u, t), t.crop && t.region && (c = D(c, u, t.region, i, a)), {
65
- blob: await je(c),
64
+ return l && Oe(l, u, t), t.crop && t.region && (c = O(c, u, t.region, i, a)), {
65
+ blob: await Ae(c),
66
66
  width: c.width,
67
67
  height: c.height
68
68
  };
69
69
  }
70
- async function T(e, t, n, r) {
71
- let [{ default: o }, { captureBackground: s, normalizeCaptureColors: c, settleStylesheets: l }] = await Promise.all([import("./html2canvas-pro.esm-B7b8p5Wr.js"), import("./colors-CWAn_swA.js")]), u = a([], t), ee = (t) => t.tagName === "NOSCRIPT" || i(t, u) || e.some((e) => Me(t, e)), d = Math.min(devicePixelRatio || 1, 2, Math.sqrt(C / Math.max(1, n * r)));
72
- return O(o(document.documentElement, {
70
+ async function E(e, t, n, r) {
71
+ let [{ default: o }, { captureBackground: s, normalizeCaptureColors: c, settleStylesheets: l }] = await Promise.all([import("./html2canvas-pro.esm-B7b8p5Wr.js"), import("./colors-CWAn_swA.js")]), u = a([], t), d = (t) => t.tagName === "NOSCRIPT" || i(t, u) || e.some((e) => je(t, e)), ee = Math.min(devicePixelRatio || 1, 2, Math.sqrt(w / Math.max(1, n * r)));
72
+ return k(o(document.documentElement, {
73
73
  useCORS: !0,
74
74
  logging: !1,
75
75
  backgroundColor: s(getComputedStyle(document.body).backgroundColor),
76
- scale: d,
76
+ scale: ee,
77
77
  x: scrollX,
78
78
  y: scrollY,
79
79
  width: n,
80
80
  height: r,
81
81
  windowWidth: document.documentElement.clientWidth,
82
82
  windowHeight: r,
83
- ignoreElements: ee,
83
+ ignoreElements: d,
84
84
  onclone: async (e) => {
85
85
  await l(e), c(e);
86
86
  }
87
- }), w);
87
+ }), T);
88
88
  }
89
- function ke(e, t, n) {
89
+ function Oe(e, t, n) {
90
90
  e.setTransform(1, 0, 0, 1, 0, 0);
91
91
  let r = n.accent ?? "#ff5733";
92
92
  if (n.region) {
@@ -98,12 +98,12 @@ function ke(e, t, n) {
98
98
  e.save(), e.shadowColor = "rgba(0,0,0,0.25)", e.shadowBlur = 6 * t, e.fillStyle = r, e.beginPath(), e.arc(i, a - o, o, Math.PI, 0), e.lineTo(i, a + o * .4), e.closePath(), e.fill(), e.shadowBlur = 0, e.fillStyle = "#ffffff", e.beginPath(), e.arc(i, a - o, o * .38, 0, Math.PI * 2), e.fill(), e.restore();
99
99
  }
100
100
  }
101
- var E = {
101
+ var D = {
102
102
  w: 320,
103
103
  h: 200
104
104
  };
105
- function Ae(e, t, n) {
106
- let r = Math.min(t, Math.max(E.w, e.w + 64)), i = Math.min(n, Math.max(E.h, e.h + 64));
105
+ function ke(e, t, n) {
106
+ let r = Math.min(t, Math.max(D.w, e.w + 64)), i = Math.min(n, Math.max(D.h, e.h + 64));
107
107
  return {
108
108
  x: Math.min(Math.max(0, e.x + e.w / 2 - r / 2), t - r),
109
109
  y: Math.min(Math.max(0, e.y + e.h / 2 - i / 2), n - i),
@@ -111,11 +111,11 @@ function Ae(e, t, n) {
111
111
  h: i
112
112
  };
113
113
  }
114
- function D(e, t, n, r, i) {
115
- let a = Ae(n, r, i), o = document.createElement("canvas");
114
+ function O(e, t, n, r, i) {
115
+ let a = ke(n, r, i), o = document.createElement("canvas");
116
116
  return o.width = Math.max(1, Math.round(a.w * t)), o.height = Math.max(1, Math.round(a.h * t)), o.getContext("2d")?.drawImage(e, a.x * t, a.y * t, o.width, o.height, 0, 0, o.width, o.height), o;
117
117
  }
118
- function je(e) {
118
+ function Ae(e) {
119
119
  return new Promise((t, n) => {
120
120
  e.toBlob((r) => {
121
121
  if (r && r.type === "image/webp") return t(r);
@@ -123,50 +123,50 @@ function je(e) {
123
123
  }, "image/webp", .86);
124
124
  });
125
125
  }
126
- function O(e, t) {
126
+ function k(e, t) {
127
127
  return new Promise((n, r) => {
128
128
  let i = setTimeout(() => r(/* @__PURE__ */ Error("The screenshot took too long. Your feedback will be sent without it.")), t);
129
129
  e.then((e) => (clearTimeout(i), n(e)), (e) => (clearTimeout(i), r(e)));
130
130
  });
131
131
  }
132
- function Me(e, t) {
132
+ function je(e, t) {
133
133
  try {
134
134
  return e.matches(t) || !!e.closest(t);
135
135
  } catch {
136
136
  return !1;
137
137
  }
138
138
  }
139
- b(_), b(ce);
140
- function Ne({ client: e, draft: i, signedIn: a, onSignIn: o, onCancel: s, onSent: ce, onError: g, share: _ = null, onPending: ve }) {
141
- let b = x(e.state, (e) => e.config), S = x(e.state, (e) => e.session?.person ?? null), C = l(() => Te(e, i.anchor), [i.anchor]), [w, De] = f(() => Ve()), [T, ke] = f(() => pe(C, void 0, Te(e, i.anchor, n()))), [E, Ae] = f([]), [D, je] = f(null), O = e.options.tools ?? {}, Me = b?.features.screenshots !== !1 && O.screenshots !== !1, Ne = O.attachments !== !1, [k, Ue] = f(Me ? "capturing" : "off"), j = x(e.state, (e) => !!e.session?.capabilities.triage), We = j && O.checklist !== !1, [M] = f(() => He(C)), [N, Ge] = f(M?.task ?? {}), [P, Ke] = f(() => !!Ie(M?.task ?? {})), [F, I] = f(M?.checklist ?? null), [L, qe] = f(""), Je = y(j, () => import("./TaskFields-fmy6_HtK.js").then((e) => e.TaskDraft), () => void 0), [R, Ye] = f(M?.markup ?? []), [Xe, z] = f(!1), Ze = y(Xe, () => import("./MarkupEditor-VCOXh9d2.js").then((e) => e.MarkupEditor), (e) => (z(!1), g(e))), B = me(e, (e) => g(new r(0, "file_rejected", e))), V = l(() => {
142
- if (!j || O.style === !1 || i.anchor.type !== "element" && i.anchor.type !== "text") return null;
139
+ x(v), x(se);
140
+ function Me({ client: e, draft: i, signedIn: a, onSignIn: o, onCancel: s, onSent: se, onError: _, share: v = null, onPending: _e }) {
141
+ let x = S(e.state, (e) => e.config), C = S(e.state, (e) => e.session?.person ?? null), w = h(() => we(e, i.anchor), [i.anchor]), [T, Ee] = l(() => Be()), [E, Oe] = l(() => fe(w, void 0, we(e, i.anchor, n()))), [D, ke] = l([]), [O, Ae] = l(null), k = e.options.tools ?? {}, je = x?.features.screenshots !== !1 && k.screenshots !== !1, Me = k.attachments !== !1, [A, He] = l(je ? "capturing" : "off"), M = S(e.state, (e) => !!e.session?.capabilities.triage), Ue = M && k.checklist !== !1, [N] = l(() => Ve(w)), [P, We] = l(N?.task ?? {}), [F, Ge] = l(() => !!Fe(N?.task ?? {})), [I, L] = l(N?.checklist ?? null), [R, Ke] = l(""), qe = b(M, () => import("./TaskFields-C8BX0Sgg.js").then((e) => e.TaskDraft), () => void 0), [z, Je] = l(N?.markup ?? []), [Ye, B] = l(!1), Xe = b(Ye, () => import("./MarkupEditor-6bJGpWGO.js").then((e) => e.MarkupEditor), (e) => (B(!1), _(e))), V = pe(e, (e) => _(new r(0, "file_rejected", e))), H = h(() => {
142
+ if (!M || k.style === !1 || i.anchor.type !== "element" && i.anchor.type !== "text") return null;
143
143
  let e = c(i.anchor).element;
144
144
  return e instanceof HTMLElement || e instanceof SVGElement ? e : null;
145
- }, [i.anchor, j]), [H, Qe] = f(M?.styles ?? []), [U, $e] = f(!1), et = y(U, () => import("./StylePanel-yQzHHlY7.js").then((e) => e.StylePanel), g), W = p(null), G = p(null), tt = () => {
146
- V && (W.current ?? (W.current = he(V)), G.current ?? (G.current = new de(V)), $e(!0));
145
+ }, [i.anchor, M]), [U, Ze] = l(N?.styles ?? []), [W, Qe] = l(!1), $e = b(W, () => import("./StylePanel-B4pHQUL9.js").then((e) => e.StylePanel), _), G = p(null), K = p(null), et = () => {
146
+ H && (G.current ?? (G.current = me(H)), K.current ?? (K.current = new ue(H)), Qe(!0));
147
147
  };
148
- d(() => {
149
- U ? G.current?.apply(H) : G.current?.revert();
150
- }, [U, H]), d(() => () => G.current?.revert(), []);
151
- let [K, nt] = f(null), rt = y(K !== null, () => import("./Viewer-BOBadqmC.js").then((e) => e.Viewer), g), [q, it] = f(!1), [at, ot] = f(!1), st = !!(b?.features.console_capture || b?.features.network_capture), ct = x(e.state, (e) => !e.session || e.session.role === "guest"), [lt, ut] = f(b?.features.capture_consent_default === !0 && !ct), J = be(), [dt, ft] = f(!1), Y = !a && !!_ && !e.auth.pending(), [pt, mt] = f(null), ht = {
148
+ f(() => {
149
+ W ? K.current?.apply(U) : K.current?.revert();
150
+ }, [W, U]), f(() => () => K.current?.revert(), []);
151
+ let [q, tt] = l(null), nt = b(q !== null, () => import("./Viewer-DY6zb90M.js").then((e) => e.Viewer), _), [J, rt] = l(!1), [it, at] = l(!1), ot = !!(x?.features.console_capture || x?.features.network_capture), st = S(e.state, (e) => !e.session || e.session.role === "guest"), [ct, lt] = l(x?.features.capture_consent_default === !0 && !st), Y = ye(), [ut, dt] = l(!1), X = !a && !!v && !e.auth.pending(), [ft, pt] = l(null), mt = {
152
152
  name: p(null),
153
153
  email: p(null)
154
- }, gt = p(null), X = p(null), _t = p(null), Z = p(null), vt = p(null), [yt] = f(() => (e) => {
155
- e && !Z.current && Ce(e), Z.current = e;
156
- }), bt = p(null), xt = (e, t) => {
154
+ }, ht = p(null), Z = p(null), gt = p(null), Q = p(null), _t = p(null), [vt] = l(() => (e) => {
155
+ e && !Q.current && Se(e), Q.current = e;
156
+ }), yt = p(null), bt = (e, t) => {
157
157
  let n = e.closest(".ck-draft-item");
158
158
  ((n?.nextElementSibling ?? n?.previousElementSibling)?.querySelector(".ck-draft-item button, input") ?? t())?.focus();
159
- }, St = p(Promise.resolve(null));
159
+ }, xt = p(Promise.resolve(null));
160
160
  ee(() => {
161
- if (k !== "capturing") return;
161
+ if (A !== "capturing") return;
162
162
  let t = !1, n = 0, r = 0;
163
- return St.current = new Promise((a) => {
163
+ return xt.current = new Promise((a) => {
164
164
  let o = !1, s = () => {
165
165
  if (!o) {
166
166
  if (o = !0, t) return a(null);
167
- Oe({
168
- redact: [...b?.privacy.redact_selectors ?? [], ...e.options.redact ?? []],
169
- privacy: Se(b, e.options.privacy),
167
+ De({
168
+ redact: [...x?.privacy.redact_selectors ?? [], ...e.options.redact ?? []],
169
+ privacy: xe(x, e.options.privacy),
170
170
  pin: i.region ? null : i.point,
171
171
  region: i.region,
172
172
  crop: !!i.region
@@ -174,179 +174,179 @@ function Ne({ client: e, draft: i, signedIn: a, onSignIn: o, onCancel: s, onSent
174
174
  }
175
175
  };
176
176
  n = requestAnimationFrame(() => n = requestAnimationFrame(s)), r = window.setTimeout(s, 300);
177
- }), St.current.then((e) => {
178
- t || (e && je(e), Ue(e ? "ready" : "failed"));
177
+ }), xt.current.then((e) => {
178
+ t || (e && Ae(e), He(e ? "ready" : "failed"));
179
179
  }), () => {
180
180
  t = !0, cancelAnimationFrame(n), clearTimeout(r);
181
181
  };
182
182
  }, []);
183
- let Q = l(() => D && URL.createObjectURL(D.blob), [D]);
184
- d(() => () => void (Q && URL.revokeObjectURL(Q)), [Q]);
185
- let Ct = (e) => {
186
- ke(e), ue(C, e);
183
+ let $ = h(() => O && URL.createObjectURL(O.blob), [O]);
184
+ f(() => () => void ($ && URL.revokeObjectURL($)), [$]);
185
+ let St = (e) => {
186
+ Oe(e), le(w, e);
187
187
  };
188
- d(() => {
189
- X.current = null;
188
+ f(() => {
189
+ Z.current = null;
190
190
  }, [
191
- T,
192
191
  E,
193
192
  D,
194
- k,
195
- R,
196
- B.items,
197
- lt,
198
- N,
199
- F,
200
- H
193
+ O,
194
+ A,
195
+ z,
196
+ V.items,
197
+ ct,
198
+ P,
199
+ I,
200
+ U
201
201
  ]);
202
- let wt = !P && !!Ie(N), Tt = l(() => ie(i.point, i.region ? {
202
+ let Ct = !F && !!Fe(P), wt = h(() => re(i.point, i.region ? {
203
203
  top: i.region.y,
204
204
  bottom: i.region.y + i.region.h
205
- } : void 0), [i.point]), Et = (e) => B.add(e), Dt = async () => {
206
- let n = null, r = null, a = k === "capturing" ? await St.current : k === "ready" ? D : null;
205
+ } : void 0), [i.point]), Tt = (e) => V.add(e), Et = async () => {
206
+ let n = null, r = null, a = A === "capturing" ? await xt.current : A === "ready" ? O : null;
207
207
  if (a) try {
208
208
  let t = a.blob.type, r = `screenshot.${t === "image/webp" ? "webp" : t === "image/jpeg" ? "jpg" : "png"}`;
209
209
  n = (await e.upload(a.blob, r, "screenshot")).id;
210
210
  } catch {
211
211
  r = "screenshot";
212
212
  }
213
- let o = await B.ready(), s = o.ids;
213
+ let o = await V.ready(), s = o.ids;
214
214
  o.missing && (r ?? (r = "files"));
215
215
  let c = {
216
- ...Ee(),
217
- ...st && lt ? _e() : {},
216
+ ...Te(),
217
+ ...ot && ct ? ge() : {},
218
218
  screenshot_id: n,
219
- markup: R.length ? R : void 0
220
- }, l = j ? Ie(N) : void 0, u = [...F ?? [], ...F && L.trim() ? [L.trim()] : []], ee = V ? oe(H) : [];
219
+ markup: z.length ? z : void 0
220
+ }, l = M ? Fe(P) : void 0, u = [...I ?? [], ...I && R.trim() ? [R.trim()] : []], d = H ? ae(U) : [];
221
221
  return {
222
222
  key: t(16),
223
223
  input: {
224
224
  anchor: i.anchor,
225
- body: T.trim(),
225
+ body: E.trim(),
226
226
  capture: c,
227
227
  attachmentIds: s,
228
- mentionIds: E,
228
+ mentionIds: D,
229
229
  task: l,
230
230
  checklist: u,
231
- styleChanges: ee
231
+ styleChanges: d
232
232
  },
233
233
  missing: r
234
234
  };
235
- }, $ = async () => {
236
- if (q || !T.trim() || !J) return;
237
- if (ot(!1), !a && !_ && !dt) {
238
- ft(!0);
235
+ }, Dt = async () => {
236
+ if (J || !E.trim() || !Y) return;
237
+ if (at(!1), !a && !v && !ut) {
238
+ dt(!0);
239
239
  return;
240
240
  }
241
- let t = Y ? w.name.trim() ? /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(w.email.trim()) ? null : "email" : "name" : null;
242
- if (mt(t), t) return ht[t].current?.focus();
243
- it(!0);
241
+ let t = X ? T.name.trim() ? /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(T.email.trim()) ? null : "email" : "name" : null;
242
+ if (pt(t), t) return mt[t].current?.focus();
243
+ rt(!0);
244
244
  try {
245
- let t = !a && !_;
246
- if (Y && _) {
247
- let { startGuest: n } = await import("./Guest-vvNPz8h-.js");
248
- h(Be, JSON.stringify({
249
- name: w.name,
250
- email: w.email
245
+ let t = !a && !v;
246
+ if (X && v) {
247
+ let { startGuest: n } = await import("./Guest-7hcN765o.js");
248
+ g(ze, JSON.stringify({
249
+ name: T.name,
250
+ email: T.email
251
251
  })), t = await n(e, {
252
- share: _,
253
- ...w
252
+ share: v,
253
+ ...T
254
254
  }) === "popup";
255
255
  }
256
256
  if (t) {
257
- if (h(we, JSON.stringify({
257
+ if (g(Ce, JSON.stringify({
258
258
  draft: i,
259
259
  scrollY
260
- })), h(A, JSON.stringify({
261
- id: C,
262
- checklist: F,
263
- task: N,
264
- markup: R,
265
- styles: H
260
+ })), g(j, JSON.stringify({
261
+ id: w,
262
+ checklist: I,
263
+ task: P,
264
+ markup: z,
265
+ styles: U
266
266
  })), !await o()) return;
267
- h(we, null), h(A, null);
267
+ g(Ce, null), g(j, null);
268
268
  }
269
- let n = X.current ?? (X.current = await Dt()), r = await e.createThread({
269
+ let n = Z.current ?? (Z.current = await Et()), r = await e.createThread({
270
270
  ...n.input,
271
271
  idempotencyKey: n.key
272
272
  });
273
- if (X.current = null, r.pending_verification) return ve?.(e.auth.pending()?.email ?? w.email);
274
- le(C), h(Be, null), ce(r, n.missing);
273
+ if (Z.current = null, r.pending_verification) return _e?.(e.auth.pending()?.email ?? T.email);
274
+ ce(w), g(ze, null), se(r, n.missing);
275
275
  } catch (t) {
276
- if (t instanceof r && ["pending_limit", "verification_required"].includes(t.code) && e.auth.pending()) return ve?.(e.auth.pending().email);
277
- let n = re(t);
278
- ot(n ?? !0), n || g(t);
276
+ if (t instanceof r && ["pending_limit", "verification_required"].includes(t.code) && e.auth.pending()) return _e?.(e.auth.pending().email);
277
+ let n = ne(t);
278
+ at(n ?? !0), n || _(t);
279
279
  } finally {
280
- it(!1);
280
+ rt(!1);
281
281
  }
282
282
  };
283
- return /* @__PURE__ */ m(te, { children: [i.region ? /* @__PURE__ */ m("div", {
283
+ return /* @__PURE__ */ m(u, { children: [i.region ? /* @__PURE__ */ m("div", {
284
284
  class: "ck-pending-region",
285
- style: ye(i.region.x, i.region.y, i.region.w, i.region.h),
285
+ style: ve(i.region.x, i.region.y, i.region.w, i.region.h),
286
286
  "aria-hidden": "true",
287
287
  "data-commentkit-ui": !0
288
288
  }) : i.anchor.type === "page" ? null : /* @__PURE__ */ m("div", {
289
289
  class: "ck-pending-pin",
290
- style: ye(i.point.x, i.point.y),
290
+ style: ve(i.point.x, i.point.y),
291
291
  "aria-hidden": "true",
292
292
  "data-commentkit-ui": !0,
293
293
  children: [/* @__PURE__ */ m("svg", {
294
294
  viewBox: "5 3 54 62",
295
- children: /* @__PURE__ */ m("path", { d: Fe })
296
- }), S ? /* @__PURE__ */ m(xe, { person: S }) : null]
295
+ children: /* @__PURE__ */ m("path", { d: Pe })
296
+ }), C ? /* @__PURE__ */ m(be, { person: C }) : null]
297
297
  }), /* @__PURE__ */ m("div", {
298
298
  class: "ck-card ck-composer",
299
- style: Tt,
299
+ style: wt,
300
300
  role: "region",
301
- "aria-label": u("comment"),
301
+ "aria-label": d("comment"),
302
302
  "data-commentkit-ui": !0,
303
303
  onKeyDown: (e) => e.key === "Escape" && s(!0),
304
- ...Ne ? ne(Et) : {},
304
+ ...Me ? te(Tt) : {},
305
305
  children: [
306
306
  /* @__PURE__ */ m("div", {
307
307
  class: "ck-card-body",
308
308
  children: [
309
309
  i.anchor.quote ? /* @__PURE__ */ m("blockquote", {
310
310
  class: "ck-quote",
311
- "aria-label": u("quotedText"),
311
+ "aria-label": d("quotedText"),
312
312
  children: /* @__PURE__ */ m("bdi", { children: i.anchor.quote.slice(0, 200) })
313
313
  }) : null,
314
- J ? null : /* @__PURE__ */ m("div", {
314
+ Y ? null : /* @__PURE__ */ m("div", {
315
315
  class: "ck-note",
316
316
  "data-tone": "warning",
317
317
  role: "status",
318
- children: u("offlineSend")
318
+ children: d("offlineSend")
319
319
  }),
320
- at && J ? /* @__PURE__ */ m("div", {
320
+ it && Y ? /* @__PURE__ */ m("div", {
321
321
  class: "ck-note",
322
322
  "data-tone": "warning",
323
323
  role: "alert",
324
- children: at === !0 ? /* @__PURE__ */ m(te, { children: [
325
- u("sendFailed"),
324
+ children: it === !0 ? /* @__PURE__ */ m(u, { children: [
325
+ d("sendFailed"),
326
326
  " ",
327
327
  /* @__PURE__ */ m("button", {
328
328
  class: "ck-btn",
329
- onClick: () => (_t.current?.focus(), void $()),
330
- children: u("retry")
329
+ onClick: () => (gt.current?.focus(), void Dt()),
330
+ children: d("retry")
331
331
  })
332
- ] }) : `${at} ${u("savedHere")}`
332
+ ] }) : `${it} ${d("savedHere")}`
333
333
  }) : null,
334
- /* @__PURE__ */ m(fe, {
334
+ /* @__PURE__ */ m(de, {
335
335
  client: e,
336
- value: T,
337
- onChange: Ct,
338
- onMentions: Ae,
339
- onSubmit: () => void $(),
340
- placeholder: u("composerPlaceholder"),
336
+ value: E,
337
+ onChange: St,
338
+ onMentions: ke,
339
+ onSubmit: () => void Dt(),
340
+ placeholder: d("composerPlaceholder"),
341
341
  autofocus: !0,
342
- disabled: q,
342
+ disabled: J,
343
343
  canMention: a
344
344
  }),
345
- F === null ? null : /* @__PURE__ */ m("div", {
345
+ I === null ? null : /* @__PURE__ */ m("div", {
346
346
  class: "ck-draft-list",
347
347
  role: "group",
348
- "aria-label": u("checklist"),
349
- children: [F.map((e, t) => /* @__PURE__ */ m("div", {
348
+ "aria-label": d("checklist"),
349
+ children: [I.map((e, t) => /* @__PURE__ */ m("div", {
350
350
  class: "ck-draft-item",
351
351
  children: [
352
352
  /* @__PURE__ */ m("span", {
@@ -356,187 +356,189 @@ function Ne({ client: e, draft: i, signedIn: a, onSignIn: o, onCancel: s, onSent
356
356
  /* @__PURE__ */ m("bdi", { children: e }),
357
357
  /* @__PURE__ */ m("button", {
358
358
  class: "ck-ghost ck-ghost-sm",
359
- "aria-label": u("removeItem", { item: e }),
359
+ "aria-label": d("removeItem", { item: e }),
360
+ title: d("removeItem", { item: e }),
360
361
  onClick: (e) => {
361
- xt(e.currentTarget, () => Z.current ?? vt.current), I(F.filter((e, n) => n !== t));
362
+ bt(e.currentTarget, () => Q.current ?? _t.current), L(I.filter((e, n) => n !== t));
362
363
  },
363
- children: /* @__PURE__ */ m(v, {
364
+ children: /* @__PURE__ */ m(y, {
364
365
  name: "close",
365
366
  size: 12
366
367
  })
367
368
  })
368
369
  ]
369
- })), F.length < 30 ? /* @__PURE__ */ m("input", {
370
+ })), I.length < 30 ? /* @__PURE__ */ m("input", {
370
371
  class: "ck-input",
371
372
  maxLength: 300,
372
- placeholder: u("checklistAdd"),
373
- "aria-label": u("checklistAdd"),
373
+ placeholder: d("checklistAdd"),
374
+ "aria-label": d("checklistAdd"),
374
375
  enterKeyHint: "done",
375
- value: L,
376
- ref: yt,
377
- onInput: (e) => qe(e.target.value),
376
+ value: R,
377
+ ref: vt,
378
+ onInput: (e) => Ke(e.target.value),
378
379
  onKeyDown: (e) => {
379
- e.key !== "Escape" && e.stopPropagation(), e.key === "Enter" && L.trim() && (e.preventDefault(), I([...F, L.trim()]), qe(""));
380
+ e.key !== "Escape" && e.stopPropagation(), e.key === "Enter" && R.trim() && (e.preventDefault(), L([...I, R.trim()]), Ke(""));
380
381
  }
381
382
  }) : null]
382
383
  }),
383
- H.length ? /* @__PURE__ */ m("div", {
384
+ U.length ? /* @__PURE__ */ m("div", {
384
385
  class: "ck-draft-list ck-style-list",
385
386
  role: "group",
386
- "aria-label": u("styleChanges"),
387
- children: H.map((e) => /* @__PURE__ */ m("div", {
387
+ "aria-label": d("styleChanges"),
388
+ children: U.map((e) => /* @__PURE__ */ m("div", {
388
389
  class: "ck-draft-item",
389
- children: [/* @__PURE__ */ m("code", { children: se(e) }), /* @__PURE__ */ m("button", {
390
+ children: [/* @__PURE__ */ m("code", { children: oe(e) }), /* @__PURE__ */ m("button", {
390
391
  class: "ck-ghost ck-ghost-sm",
391
- "aria-label": u("styleRemoveChange", { change: se(e) }),
392
+ "aria-label": d("styleRemoveChange", { change: oe(e) }),
393
+ title: d("styleRemoveChange", { change: oe(e) }),
392
394
  onClick: (t) => {
393
- xt(t.currentTarget, () => bt.current), Qe(H.filter((t) => t.property !== e.property));
395
+ bt(t.currentTarget, () => yt.current), Ze(U.filter((t) => t.property !== e.property));
394
396
  },
395
- children: /* @__PURE__ */ m(v, {
397
+ children: /* @__PURE__ */ m(y, {
396
398
  name: "close",
397
399
  size: 12
398
400
  })
399
401
  })]
400
402
  }))
401
403
  }) : null,
402
- U && et && W.current ? /* @__PURE__ */ m(et, {
403
- base: W.current,
404
- changes: H,
405
- onChange: Qe,
406
- onClose: () => $e(!1)
404
+ W && $e && G.current ? /* @__PURE__ */ m($e, {
405
+ base: G.current,
406
+ changes: U,
407
+ onChange: Ze,
408
+ onClose: () => Qe(!1)
407
409
  }) : null,
408
- j && Je && P ? /* @__PURE__ */ m(Je, {
410
+ M && qe && F ? /* @__PURE__ */ m(qe, {
409
411
  client: e,
410
- value: N,
411
- onChange: Ge
412
+ value: P,
413
+ onChange: We
412
414
  }) : null,
413
- Y || dt && !a ? /* @__PURE__ */ m("div", {
415
+ X || ut && !a ? /* @__PURE__ */ m("div", {
414
416
  class: "ck-note",
415
417
  children: [
416
- /* @__PURE__ */ m("strong", { children: u(Y ? "guestIntro" : "signInToSend") }),
417
- /* @__PURE__ */ m("div", { children: u(_ ? "guestExplain" : "signInExplain") }),
418
- Y ? /* @__PURE__ */ m("div", {
418
+ /* @__PURE__ */ m("strong", { children: d(X ? "guestIntro" : "signInToSend") }),
419
+ /* @__PURE__ */ m("div", { children: d(v ? "guestExplain" : "signInExplain") }),
420
+ X ? /* @__PURE__ */ m("div", {
419
421
  class: "ck-guest",
420
422
  children: [["name", "email"].map((e) => /* @__PURE__ */ m("div", {
421
423
  class: "ck-field",
422
424
  children: [
423
425
  /* @__PURE__ */ m("label", {
424
426
  for: `ck-guest-${e}`,
425
- children: u(e === "name" ? "guestName" : "guestEmail")
427
+ children: d(e === "name" ? "guestName" : "guestEmail")
426
428
  }),
427
429
  /* @__PURE__ */ m("input", {
428
430
  id: `ck-guest-${e}`,
429
- ref: ht[e],
431
+ ref: mt[e],
430
432
  class: "ck-input",
431
433
  type: e === "email" ? "email" : "text",
432
434
  autoComplete: e,
433
435
  maxLength: e === "name" ? 120 : 254,
434
436
  enterKeyHint: "send",
435
437
  autoCapitalize: e === "name" ? "words" : "off",
436
- value: w[e],
437
- "aria-invalid": pt === e,
438
- "aria-describedby": pt === e ? "ck-guest-error" : void 0,
438
+ value: T[e],
439
+ "aria-invalid": ft === e,
440
+ "aria-describedby": ft === e ? "ck-guest-error" : void 0,
439
441
  onInput: (t) => {
440
442
  let n = t.target.value;
441
- De((t) => ({
443
+ Ee((t) => ({
442
444
  ...t,
443
445
  [e]: n
444
446
  }));
445
447
  },
446
448
  onKeyDown: (e) => {
447
- e.key !== "Escape" && e.stopPropagation(), e.key === "Enter" && $();
449
+ e.key !== "Escape" && e.stopPropagation(), e.key === "Enter" && Dt();
448
450
  }
449
451
  }),
450
- pt === e ? /* @__PURE__ */ m("span", {
452
+ ft === e ? /* @__PURE__ */ m("span", {
451
453
  class: "ck-error",
452
454
  id: "ck-guest-error",
453
455
  role: "alert",
454
- children: u(e === "name" ? "guestNameMissing" : "guestEmailInvalid")
456
+ children: d(e === "name" ? "guestNameMissing" : "guestEmailInvalid")
455
457
  }) : null
456
458
  ]
457
459
  })), /* @__PURE__ */ m("p", {
458
460
  class: "ck-muted ck-guest-privacy",
459
461
  children: [
460
- u("guestPrivacy"),
462
+ d("guestPrivacy"),
461
463
  " ",
462
464
  /* @__PURE__ */ m("a", {
463
- href: ze(e.options.endpoint),
465
+ href: Re(e.options.endpoint),
464
466
  target: "_blank",
465
467
  rel: "noopener noreferrer",
466
- children: u("guestPrivacyLink")
468
+ children: d("guestPrivacyLink")
467
469
  }),
468
- Re(b) ? /* @__PURE__ */ m(te, { children: [" · ", /* @__PURE__ */ m("a", {
469
- href: Re(b),
470
+ Le(x) ? /* @__PURE__ */ m(u, { children: [" · ", /* @__PURE__ */ m("a", {
471
+ href: Le(x),
470
472
  target: "_blank",
471
473
  rel: "noopener noreferrer",
472
- children: u("guestPrivacySite", { website: b?.project.name ?? "" })
474
+ children: d("guestPrivacySite", { website: x?.project.name ?? "" })
473
475
  })] }) : null
474
476
  ]
475
477
  })]
476
478
  }) : null
477
479
  ]
478
480
  }) : null,
479
- k === "capturing" ? /* @__PURE__ */ m("div", {
481
+ A === "capturing" ? /* @__PURE__ */ m("div", {
480
482
  class: "ck-shot ck-shot-wait",
481
483
  children: /* @__PURE__ */ m("span", {
482
484
  class: "ck-muted",
483
- children: u("capturing")
485
+ children: d("capturing")
484
486
  })
485
487
  }) : null,
486
- k === "failed" ? /* @__PURE__ */ m("p", {
488
+ A === "failed" ? /* @__PURE__ */ m("p", {
487
489
  class: "ck-muted",
488
- children: u("capturingFailed")
490
+ children: d("capturingFailed")
489
491
  }) : null,
490
- k === "ready" && Q ? /* @__PURE__ */ m("div", {
492
+ A === "ready" && $ ? /* @__PURE__ */ m("div", {
491
493
  class: "ck-shot",
492
494
  children: [/* @__PURE__ */ m("button", {
493
495
  class: "ck-shot-open",
494
- "aria-label": u("openImage", { name: u("screenshot") }),
495
- onClick: () => nt(-1),
496
+ "aria-label": d("openImage", { name: d("screenshot") }),
497
+ onClick: () => tt(-1),
496
498
  children: /* @__PURE__ */ m("img", {
497
- src: Q,
498
- alt: u("screenshotIncluded"),
499
- title: u("screenshotIncluded"),
500
- style: { objectPosition: Le(i) }
499
+ src: $,
500
+ alt: d("screenshotIncluded"),
501
+ title: d("screenshotIncluded"),
502
+ style: { objectPosition: Ie(i) }
501
503
  })
502
504
  }), /* @__PURE__ */ m("div", {
503
505
  class: "ck-shot-tools",
504
- children: [O.markup === !1 ? null : /* @__PURE__ */ m("button", {
506
+ children: [k.markup === !1 ? null : /* @__PURE__ */ m("button", {
505
507
  class: "ck-chip",
506
- onClick: () => z(!0),
507
- children: [/* @__PURE__ */ m(v, {
508
+ onClick: () => B(!0),
509
+ children: [/* @__PURE__ */ m(y, {
508
510
  name: "pen",
509
511
  size: 14
510
- }), u("markup")]
512
+ }), d("markup")]
511
513
  }), /* @__PURE__ */ m("button", {
512
514
  class: "ck-chip",
513
- onClick: () => Ue("off"),
514
- children: u("screenshotRemove")
515
+ onClick: () => He("off"),
516
+ children: d("screenshotRemove")
515
517
  })]
516
518
  })]
517
519
  }) : null,
518
- k === "off" && D ? /* @__PURE__ */ m("button", {
520
+ A === "off" && O ? /* @__PURE__ */ m("button", {
519
521
  class: "ck-chip ck-shot-add",
520
- onClick: () => Ue("ready"),
521
- children: [/* @__PURE__ */ m(v, {
522
+ onClick: () => He("ready"),
523
+ children: [/* @__PURE__ */ m(y, {
522
524
  name: "image",
523
525
  size: 14
524
- }), u("screenshotAdd")]
526
+ }), d("screenshotAdd")]
525
527
  }) : null,
526
- st ? /* @__PURE__ */ m("label", {
528
+ ot ? /* @__PURE__ */ m("label", {
527
529
  class: "ck-check",
528
530
  children: [/* @__PURE__ */ m("input", {
529
531
  type: "checkbox",
530
- checked: lt,
531
- onChange: (e) => ut(e.target.checked)
532
- }), u("includeDiagnostics")]
532
+ checked: ct,
533
+ onChange: (e) => lt(e.target.checked)
534
+ }), d("includeDiagnostics")]
533
535
  }) : null,
534
- st ? /* @__PURE__ */ m(Pe, {}) : null,
535
- /* @__PURE__ */ m(ge, {
536
- items: B.items,
537
- onRemove: B.remove,
538
- onRetry: B.retry,
539
- onOpen: nt
536
+ ot ? /* @__PURE__ */ m(Ne, {}) : null,
537
+ /* @__PURE__ */ m(he, {
538
+ items: V.items,
539
+ onRemove: V.remove,
540
+ onRetry: V.retry,
541
+ onOpen: tt
540
542
  })
541
543
  ]
542
544
  }),
@@ -546,19 +548,19 @@ function Ne({ client: e, draft: i, signedIn: a, onSignIn: o, onCancel: s, onSent
546
548
  /* @__PURE__ */ m("div", {
547
549
  class: "ck-tools",
548
550
  children: [
549
- Ne ? /* @__PURE__ */ m(ae, {
550
- input: gt,
551
- onFiles: Et,
552
- types: b?.limits?.upload_types
551
+ Me ? /* @__PURE__ */ m(ie, {
552
+ input: ht,
553
+ onFiles: Tt,
554
+ types: x?.limits?.upload_types
553
555
  }) : null,
554
- We ? /* @__PURE__ */ m("button", {
555
- ref: vt,
556
+ Ue ? /* @__PURE__ */ m("button", {
557
+ ref: _t,
556
558
  class: "ck-ghost",
557
559
  "data-tool": "checklist",
558
- "aria-label": u("addChecklist"),
559
- title: u("addChecklist"),
560
- "aria-pressed": F === null ? !1 : !F.length || void 0,
561
- onClick: () => F?.length ? Z.current?.focus() : F === null ? I([]) : (qe(""), I(null)),
560
+ "aria-label": d("addChecklist"),
561
+ title: d("addChecklist"),
562
+ "aria-pressed": I === null ? !1 : !I.length || void 0,
563
+ onClick: () => I?.length ? Q.current?.focus() : I === null ? L([]) : (Ke(""), L(null)),
562
564
  children: /* @__PURE__ */ m("svg", {
563
565
  width: "16",
564
566
  height: "16",
@@ -572,15 +574,15 @@ function Ne({ client: e, draft: i, signedIn: a, onSignIn: o, onCancel: s, onSent
572
574
  children: /* @__PURE__ */ m("path", { d: "m3 6 2 2 4-4M3 16l2 2 4-4M13 7h8M13 17h8" })
573
575
  })
574
576
  }) : null,
575
- j && Je ? /* @__PURE__ */ m("button", {
577
+ M && qe ? /* @__PURE__ */ m("button", {
576
578
  class: "ck-ghost",
577
579
  "data-tool": "task",
578
- "aria-label": u("taskDetails"),
579
- title: u("taskDetails"),
580
- "aria-pressed": P,
581
- "data-set": wt ? "" : void 0,
582
- "aria-describedby": wt ? "ck-task-set" : void 0,
583
- onClick: () => Ke(!P),
580
+ "aria-label": d("taskDetails"),
581
+ title: d("taskDetails"),
582
+ "aria-pressed": F,
583
+ "data-set": Ct ? "" : void 0,
584
+ "aria-describedby": Ct ? "ck-task-set" : void 0,
585
+ onClick: () => Ge(!F),
584
586
  children: [/* @__PURE__ */ m("svg", {
585
587
  width: "16",
586
588
  height: "16",
@@ -595,17 +597,17 @@ function Ne({ client: e, draft: i, signedIn: a, onSignIn: o, onCancel: s, onSent
595
597
  }), /* @__PURE__ */ m("span", {
596
598
  id: "ck-task-set",
597
599
  hidden: !0,
598
- children: u("taskDetailsSet")
600
+ children: d("taskDetailsSet")
599
601
  })]
600
602
  }) : null,
601
- V ? /* @__PURE__ */ m("button", {
602
- ref: bt,
603
+ H ? /* @__PURE__ */ m("button", {
604
+ ref: yt,
603
605
  class: "ck-ghost",
604
606
  "data-tool": "style",
605
- "aria-label": u("adjustStyle"),
606
- title: u("adjustStyle"),
607
- "aria-pressed": U,
608
- onClick: () => U ? $e(!1) : tt(),
607
+ "aria-label": d("adjustStyle"),
608
+ title: d("adjustStyle"),
609
+ "aria-pressed": W,
610
+ onClick: () => W ? Qe(!1) : et(),
609
611
  children: /* @__PURE__ */ m("svg", {
610
612
  width: "16",
611
613
  height: "16",
@@ -625,79 +627,79 @@ function Ne({ client: e, draft: i, signedIn: a, onSignIn: o, onCancel: s, onSent
625
627
  /* @__PURE__ */ m("button", {
626
628
  class: "ck-btn",
627
629
  onClick: () => s(),
628
- children: u("cancel")
630
+ children: d("cancel")
629
631
  }),
630
632
  /* @__PURE__ */ m("button", {
631
- ref: _t,
633
+ ref: gt,
632
634
  class: "ck-btn ck-primary",
633
- "aria-disabled": q || !T.trim() || !J || void 0,
634
- onClick: () => void $(),
635
- children: u(q ? "sending" : dt && !a ? "signIn" : "send")
635
+ "aria-disabled": J || !E.trim() || !Y || void 0,
636
+ onClick: () => void Dt(),
637
+ children: d(J ? "sending" : ut && !a ? "signIn" : "send")
636
638
  })
637
639
  ]
638
640
  }),
639
- K !== null && rt ? /* @__PURE__ */ m(rt, {
640
- images: K < 0 && Q ? [{
641
- src: Q,
642
- name: u("screenshot")
643
- }] : B.items.filter((e) => e.preview).map((e) => ({
641
+ q !== null && nt ? /* @__PURE__ */ m(nt, {
642
+ images: q < 0 && $ ? [{
643
+ src: $,
644
+ name: d("screenshot")
645
+ }] : V.items.filter((e) => e.preview).map((e) => ({
644
646
  src: e.preview,
645
647
  name: e.file.name
646
648
  })),
647
- start: Math.max(0, K),
648
- onClose: () => nt(null)
649
+ start: Math.max(0, q),
650
+ onClose: () => tt(null)
649
651
  }) : null,
650
- Xe && Ze && D ? /* @__PURE__ */ m(Ze, {
651
- image: D.blob,
652
- onCancel: () => z(!1),
652
+ Ye && Xe && O ? /* @__PURE__ */ m(Xe, {
653
+ image: O.blob,
654
+ onCancel: () => B(!1),
653
655
  onDone: (e, t) => {
654
- je({
655
- ...D,
656
+ Ae({
657
+ ...O,
656
658
  blob: e
657
- }), Ye(t), z(!1);
659
+ }), Je(t), B(!1);
658
660
  }
659
661
  }) : null
660
662
  ]
661
663
  })] });
662
664
  }
663
- function Pe() {
664
- let [e, t] = f(!1), n = e ? k(_e()) : [];
665
+ function Ne() {
666
+ let [e, t] = l(!1), n = e ? A(ge()) : [];
665
667
  return /* @__PURE__ */ m("details", {
666
668
  class: "ck-diag",
667
669
  onToggle: (e) => t(e.currentTarget.open),
668
- children: [/* @__PURE__ */ m("summary", { children: u("diagnosticsSee") }), e ? n.length ? /* @__PURE__ */ m("ul", { children: n.map((e) => /* @__PURE__ */ m("li", { children: /* @__PURE__ */ m("bdi", { children: e }) })) }) : /* @__PURE__ */ m("p", {
670
+ children: [/* @__PURE__ */ m("summary", { children: d("diagnosticsSee") }), e ? n.length ? /* @__PURE__ */ m("ul", { children: n.map((e) => /* @__PURE__ */ m("li", { children: /* @__PURE__ */ m("bdi", { children: e }) })) }) : /* @__PURE__ */ m("p", {
669
671
  class: "ck-muted",
670
- children: u("diagnosticsEmpty")
672
+ children: d("diagnosticsEmpty")
671
673
  }) : null]
672
674
  });
673
675
  }
674
- function k(e) {
676
+ function A(e) {
675
677
  return [...(e.console ?? []).map((e) => `${e.level}: ${e.message}`), ...(e.network ?? []).map((e) => `${e.method} ${e.url} ${e.status}`)];
676
678
  }
677
- var Fe = "M31.5 4.8C17.3 4.4 7 15.2 7 29c0 13 8.5 21.2 20.9 23 1.6.2 2.1 1.2 2.1 2.5v6.9c0 1.7 1.2 2.1 2.5.9 5.7-4.9 16-13.6 21.1-22.1 3.5-5.8 4.7-11.8 3.2-18.1C54.3 11.5 44.7 4.6 31.5 4.8Z";
678
- function Ie(e) {
679
+ var Pe = "M31.5 4.8C17.3 4.4 7 15.2 7 29c0 13 8.5 21.2 20.9 23 1.6.2 2.1 1.2 2.1 2.5v6.9c0 1.7 1.2 2.1 2.5.9 5.7-4.9 16-13.6 21.1-22.1 3.5-5.8 4.7-11.8 3.2-18.1C54.3 11.5 44.7 4.6 31.5 4.8Z";
680
+ function Fe(e) {
679
681
  let t = {};
680
682
  return e.priority && e.priority !== "none" && (t.priority = e.priority), e.assignee_ids?.length && (t.assignee_ids = e.assignee_ids), e.label_ids?.length && (t.label_ids = e.label_ids), Object.keys(t).length ? t : void 0;
681
683
  }
682
- function Le(e) {
684
+ function Ie(e) {
683
685
  return e.region ? "50% 50%" : `50% ${Math.round(Math.min(100, Math.max(0, e.point.y / Math.max(1, innerHeight) * 100)))}%`;
684
686
  }
685
- var A = "commentkit:pending-extras";
686
- function Re(e) {
687
- let t = ve(e?.privacy?.notice_url);
687
+ var j = "commentkit:pending-extras";
688
+ function Le(e) {
689
+ let t = _e(e?.privacy?.notice_url);
688
690
  return t?.startsWith("https:") ? t : null;
689
691
  }
690
- function ze(e) {
692
+ function Re(e) {
691
693
  try {
692
694
  return `${new URL(e ?? "https://commentkit.dev").origin}/privacy`;
693
695
  } catch {
694
696
  return "https://commentkit.dev/privacy";
695
697
  }
696
698
  }
697
- var Be = "commentkit:guest-details";
698
- function Ve() {
699
+ var ze = "commentkit:guest-details";
700
+ function Be() {
699
701
  try {
700
- let e = JSON.parse(h(Be) ?? "null"), t = (e, t) => typeof e == "string" ? e.slice(0, t) : "";
702
+ let e = JSON.parse(g(ze) ?? "null"), t = (e, t) => typeof e == "string" ? e.slice(0, t) : "";
701
703
  return {
702
704
  name: t(e?.name, 120),
703
705
  email: t(e?.email, 254)
@@ -709,17 +711,17 @@ function Ve() {
709
711
  };
710
712
  }
711
713
  }
712
- function He(e) {
714
+ function Ve(e) {
713
715
  try {
714
- let t = JSON.parse(h(A) ?? "null");
715
- return h(A, null), !t || g(t.id) !== g(e) ? null : {
716
+ let t = JSON.parse(g(j) ?? "null");
717
+ return g(j, null), !t || _(t.id) !== _(e) ? null : {
716
718
  checklist: Array.isArray(t.checklist) ? t.checklist.filter((e) => typeof e == "string").slice(0, 30) : null,
717
719
  task: t.task && typeof t.task == "object" ? t.task : {},
718
720
  markup: Array.isArray(t.markup) ? t.markup.filter((e) => !!e && typeof e == "object" && Array.isArray(e.points)).slice(0, 100) : [],
719
- styles: oe(t.styles)
721
+ styles: ae(t.styles)
720
722
  };
721
723
  } catch {
722
724
  return null;
723
725
  }
724
726
  }
725
- export { Ne as Composer, De as warmCapture };
727
+ export { Me as Composer, A as diagnosticsLines, Re as privacyNotice, Le as siteNotice, Ee as warmCapture };