@commentkit/comment-kit 1.5.1 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/npm/THIRD_PARTY_NOTICES.txt +2 -2
- package/dist/npm/chunks/{AgentSend-DjFZSC0S.js → AgentSend-2JPDseOo.js} +4 -5
- package/dist/npm/chunks/{Checklist-BEz4IZdT.js → Checklist-BpDXQebo.js} +77 -79
- package/dist/npm/chunks/Composer-CAyj-c8e.js +677 -0
- package/dist/npm/chunks/Guest-ZdFmTcXI.js +187 -0
- package/dist/npm/chunks/{MarkupEditor-CPH4yKx4.js → MarkupEditor-BFplZwFy.js} +3 -5
- package/dist/npm/chunks/{Panel-DSoUAlbQ.js → Panel-BhZ4XRDR.js} +300 -302
- package/dist/npm/chunks/{Settings-C_qV4n7J.js → Settings-SPG9EHUZ.js} +70 -72
- package/dist/npm/chunks/{Shortcuts-ChnaribX.js → Shortcuts-C28HVDw6.js} +3 -5
- package/dist/npm/chunks/{StyleEditor-DqZd6C5o.js → StyleEditor-ByZMtq10.js} +4 -5
- package/dist/npm/chunks/{StylePanel-DMC3riYK.js → StylePanel-Iwhce2tE.js} +62 -64
- package/dist/npm/chunks/{TaskFields-BfjjllMx.js → TaskFields-BsP_fVJg.js} +7 -6
- package/dist/npm/chunks/{ThreadCard-DmKAelSL.js → ThreadCard-BzVZdDCb.js} +407 -403
- package/dist/npm/chunks/{Viewer-mw69qSI5.js → Viewer-CqtGrdD8.js} +29 -31
- package/dist/npm/chunks/{agent-CqDO3JMA.js → agent-BDMQtOzH.js} +14 -15
- package/dist/npm/chunks/{anchor-OCQnjp_6.js → anchor-BsradQhn.js} +1 -2
- package/dist/npm/chunks/{ar-BQ9K9Oqf.js → ar-8tPch6W4.js} +5 -2
- package/dist/npm/chunks/{card-bits-C7bIk5KX.js → card-bits-Bna-g3Py.js} +24 -26
- package/dist/npm/chunks/{client-dZeNdizE.js → client-EFTWxHbJ.js} +76 -61
- package/dist/npm/chunks/{colors-CAjY4jxf.js → colors-CWAn_swA.js} +1 -2
- package/dist/npm/chunks/{confetti-DKeKR7-6.js → confetti-DTKpwF3O.js} +1 -2
- package/dist/npm/chunks/{de-CcPi8xdC.js → de-C63897uD.js} +5 -2
- package/dist/npm/chunks/{drafts-CpQdHhcK.js → drafts-akdBsOd0.js} +1 -2
- package/dist/npm/chunks/{es-DXgkjDCG.js → es-CI2bSpvB.js} +5 -2
- package/dist/npm/chunks/{extension-BFkXOmX5.js → extension-BST6LH1q.js} +2 -3
- package/dist/npm/chunks/{extension-Gvei3opb.js → extension-D-V3utTm.js} +3 -4
- package/dist/npm/chunks/{fr-IjJaUbWh.js → fr-rsVe-Lqk.js} +5 -2
- package/dist/npm/chunks/{hi-BhKQK2MU.js → hi-cvwbSaWP.js} +5 -2
- package/dist/npm/chunks/{html2canvas-pro.esm-lgs6tb4C.js → html2canvas-pro.esm-B7b8p5Wr.js} +608 -528
- package/dist/npm/chunks/{i18n-DAJGndZ2.js → i18n-C4v0M-6z.js} +254 -257
- package/dist/npm/chunks/{it-DKiSCkiD.js → it-C8tnV0BF.js} +5 -2
- package/dist/npm/chunks/{ja-BI1WagDg.js → ja-BWxDfC2f.js} +5 -2
- package/dist/npm/chunks/{live-MvvBdoGd.js → live-BCpJVBeN.js} +2 -3
- package/dist/npm/chunks/{lock-C82sC17d.js → lock-B1JLlOhz.js} +0 -1
- package/dist/npm/chunks/{nl-CJw3VUQ5.js → nl-DNQ6eCht.js} +5 -2
- package/dist/npm/chunks/{pick-dDDLxCDI.js → pick-CLyOdjnD.js} +3 -4
- package/dist/npm/chunks/{pt-BR-CjBolC5g.js → pt-BR-CkG7vpU2.js} +5 -2
- package/dist/npm/chunks/{realtime-D22tI_AS.js → realtime-DIo-Wth4.js} +2 -3
- package/dist/npm/chunks/{report-DoDVi1qT.js → report-BBrT3r89.js} +1 -2
- package/dist/npm/chunks/{rolldown-runtime-Y_bBpyJl.js → rolldown-runtime-QGRDbDUS.js} +1 -2
- package/dist/npm/chunks/{source-BQS2_xfB.js → source-CS7C6wJA.js} +2 -3
- package/dist/npm/chunks/{src-C_oUnL0i.js → src-C4FsVoUp.js} +22 -24
- package/dist/npm/chunks/{start-C5-rebEU.js → start-i9M-r3aH.js} +374 -357
- package/dist/npm/chunks/{upload-CzPAjktW.js → upload-DSv7EyBD.js} +2 -3
- package/dist/npm/chunks/uploads-I01kdqQF.js +1103 -0
- package/dist/npm/chunks/{zh-CN-BrZGx2S0.js → zh-CN-BKuZOLBE.js} +5 -2
- package/dist/npm/element.js +2 -3
- package/dist/npm/headless.js +2 -2
- package/dist/npm/index.js +2 -2
- package/dist/npm/react.js +2 -3
- package/dist/npm/svelte.js +2 -3
- package/dist/npm/types/core/auth.d.ts +14 -0
- package/dist/npm/vue.js +2 -3
- package/package.json +8 -8
- package/dist/npm/chunks/Composer-D1wbmdjF.js +0 -681
- package/dist/npm/chunks/Guest-CtyRy8Kz.js +0 -170
- package/dist/npm/chunks/uploads-tpLjiJdH.js +0 -541
|
@@ -1,291 +1,290 @@
|
|
|
1
|
-
import { p as e } from "./client-
|
|
2
|
-
import { a as t } from "./anchor-
|
|
3
|
-
import {
|
|
4
|
-
import { r as
|
|
5
|
-
import { i as
|
|
6
|
-
import { i as
|
|
7
|
-
import { a as
|
|
8
|
-
import { r as
|
|
9
|
-
import { TaskFields as
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
function
|
|
13
|
-
let
|
|
14
|
-
return
|
|
15
|
-
if (!
|
|
16
|
-
let e =
|
|
17
|
-
return e.apply(
|
|
1
|
+
import { p as e } from "./client-EFTWxHbJ.js";
|
|
2
|
+
import { a as t } from "./anchor-BsradQhn.js";
|
|
3
|
+
import { _ as n, a as r, d as i, f as a, h as o, i as ee, l as s, m as c, r as l, s as u, u as d } from "./i18n-C4v0M-6z.js";
|
|
4
|
+
import { r as f } from "./agent-BDMQtOzH.js";
|
|
5
|
+
import { i as p, n as te, o as ne, r as m, s as h, t as re } from "./card-bits-Bna-g3Py.js";
|
|
6
|
+
import { i as ie, n as g, r as ae, t as oe } from "./drafts-akdBsOd0.js";
|
|
7
|
+
import { a as _, c as v, i as y, l as se, n as ce, t as le, u as ue } from "./uploads-I01kdqQF.js";
|
|
8
|
+
import { r as de, t as fe } from "./Checklist-BpDXQebo.js";
|
|
9
|
+
import { TaskFields as pe } from "./TaskFields-BsP_fVJg.js";
|
|
10
|
+
import { C as b, S as me, a as he, b as ge, c as _e, f as x, g as ve, h as ye, i as be, l as xe, n as S, r as Se, u as Ce, w as we, x as Te, y as Ee } from "./start-i9M-r3aH.js";
|
|
11
|
+
// src/ui/StyleChanges.tsx
|
|
12
|
+
function De({ thread: e, element: t, editable: n, client: r, onChange: ee, onError: l = () => void 0 }) {
|
|
13
|
+
let f = o(() => _(e.style_changes), [e.style_changes]), [p, te] = c(!1), [ne, m] = c(!1), [h, re] = c(null), ie = a(null), g = t instanceof HTMLElement || t instanceof SVGElement ? t : null;
|
|
14
|
+
return i(() => {
|
|
15
|
+
if (!p || !g) return;
|
|
16
|
+
let e = ie.current = new y(g);
|
|
17
|
+
return e.apply(f), () => e.revert();
|
|
18
18
|
}, [
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
p,
|
|
20
|
+
g,
|
|
21
|
+
f
|
|
22
22
|
]), d(() => {
|
|
23
|
-
|
|
24
|
-
}, [e.id]),
|
|
25
|
-
client:
|
|
23
|
+
te(!1), m(!1);
|
|
24
|
+
}, [e.id]), ne && g && r && h ? /* @__PURE__ */ s(h, {
|
|
25
|
+
client: r,
|
|
26
26
|
thread: e,
|
|
27
|
-
element:
|
|
28
|
-
onSaved: (e) =>
|
|
29
|
-
onClose: () =>
|
|
30
|
-
onError:
|
|
31
|
-
}) :
|
|
27
|
+
element: g,
|
|
28
|
+
onSaved: (e) => ee?.(e),
|
|
29
|
+
onClose: () => m(!1),
|
|
30
|
+
onError: l
|
|
31
|
+
}) : f.length ? /* @__PURE__ */ s("section", {
|
|
32
32
|
class: "ck-style-card",
|
|
33
33
|
"aria-label": u("styleSuggested"),
|
|
34
|
-
children: [/* @__PURE__ */
|
|
34
|
+
children: [/* @__PURE__ */ s("div", {
|
|
35
35
|
class: "ck-style-card-head",
|
|
36
|
-
children: [/* @__PURE__ */
|
|
36
|
+
children: [/* @__PURE__ */ s("span", { children: u("styleSuggested") }), g ? /* @__PURE__ */ s("span", { children: [n && r ? /* @__PURE__ */ s("button", {
|
|
37
37
|
class: "ck-ghost ck-ghost-sm",
|
|
38
38
|
"aria-label": u("styleEdit"),
|
|
39
|
-
disabled:
|
|
39
|
+
disabled: ne,
|
|
40
40
|
onClick: () => {
|
|
41
|
-
|
|
41
|
+
ie.current?.revert(), te(!1), m(!0), h || import("./StyleEditor-ByZMtq10.js").then((e) => re(() => e.StyleEditor), l);
|
|
42
42
|
},
|
|
43
43
|
children: u("edit")
|
|
44
|
-
}) : null, /* @__PURE__ */
|
|
44
|
+
}) : null, /* @__PURE__ */ s("button", {
|
|
45
45
|
class: "ck-chip",
|
|
46
|
-
"aria-pressed":
|
|
47
|
-
onClick: () =>
|
|
46
|
+
"aria-pressed": p,
|
|
47
|
+
onClick: () => te(!p),
|
|
48
48
|
children: u("stylePreview")
|
|
49
49
|
})] }) : null]
|
|
50
|
-
}), /* @__PURE__ */
|
|
50
|
+
}), /* @__PURE__ */ s("ul", { children: f.map((e) => /* @__PURE__ */ s("li", { children: /* @__PURE__ */ s("code", { children: v(e) }) })) })]
|
|
51
51
|
}) : null;
|
|
52
52
|
}
|
|
53
|
-
|
|
54
|
-
//#region src/ui/ThreadCard.tsx
|
|
55
|
-
C(".ck-msg{gap:10px;padding:6px 0;display:flex}.ck-msg+.ck-msg{border-top:1px solid var(--ck-hairline);padding-top:10px}.ck-msg-main{flex:1;min-width:0}.ck-msg-meta{color:var(--ck-text-muted);align-items:baseline;gap:6px;font-size:12px;display:flex}.ck-msg-body{white-space:pre-wrap;overflow-wrap:anywhere;margin-top:2px;line-height:1.5}.ck-msg-body a{color:color-mix(in srgb, var(--ck-accent) 80%, var(--ck-text));text-underline-offset:2px}.ck-msg-body code{font-family:var(--ck-mono);background:var(--ck-bg-muted);box-shadow:0 0 0 1px var(--ck-hairline);border-radius:5px;padding:1px 5px;font-size:12px}.ck-reactions{flex-wrap:wrap;gap:4px;margin-top:6px;display:flex}.ck-reaction{border:1px solid var(--ck-border);background:var(--ck-bg);font-variant-numeric:tabular-nums;border-radius:999px;height:24px;padding:0 8px;font-size:12px;transition:background-color .12s,border-color .12s}.ck-reaction[aria-pressed=true]{border-color:color-mix(in srgb, var(--ck-accent) 60%, var(--ck-border));background:var(--ck-accent-soft)}.ck-review-ask{border-radius:var(--ck-radius-md);background:color-mix(in srgb, var(--ck-review) 14%, var(--ck-bg));box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--ck-review) 30%, transparent);margin-bottom:10px;padding:12px}.ck-build{overflow-wrap:anywhere}.ck-msg-skeleton{gap:10px;display:flex}.ck-msg-skeleton>div{flex:1}.ck-skeleton-avatar{border-radius:50%;flex:none;width:28px;height:28px;margin:0;display:block}@media (pointer:coarse){.ck-reaction{min-width:36px;min-height:36px}}@media (hover:hover){.ck-reaction:hover{background:var(--ck-bg-muted)}}.ck-msg-body,.ck-review-ask{text-wrap:pretty}.ck-quoting{border-radius:var(--ck-radius-sm);background:var(--ck-bg-muted);border-inline-start:3px solid var(--ck-accent);color:var(--ck-text-muted);align-items:center;gap:8px;margin-bottom:6px;padding:6px 6px 6px 10px;font-size:12.5px;display:flex}.ck-quoting>span{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.ck-quoting strong{color:var(--ck-text);font-weight:650}.ck-msg-meta{flex-wrap:wrap}.ck-msg-meta time{cursor:default}.ck-msg-actions{opacity:0;gap:2px;margin-inline-start:auto;transition:opacity .12s;display:inline-flex}.ck-msg:hover .ck-msg-actions,.ck-msg:focus-within .ck-msg-actions{opacity:1}.ck-msg-body s{color:var(--ck-text-muted)}.ck-quote-msg{border-top:0;border-bottom:0;text-align:start;text-overflow:ellipsis;white-space:nowrap;border-inline-end:0;width:100%;margin:4px 0 6px;overflow:hidden}.ck-quote-msg strong{color:var(--ck-text);font-weight:650}.ck-reaction-add{opacity:.55}.ck-no-replies{margin:8px 0 0;font-size:12.5px}.ck-jump{box-shadow:var(--ck-shadow-sm);animation:ck-pop .14s var(--ck-ease);z-index:1;position:absolute;top:-38px;left:50%;transform:translate(-50%)}.ck-details{margin:0 0 8px;font-size:12.5px}.ck-details-toggle{color:var(--ck-text-muted);background:0 0;border:0;border-radius:6px;align-items:center;gap:6px;padding:2px 0;font-size:12.5px;font-weight:600;display:inline-flex}.ck-details-toggle:after{content:\"\";border-inline-end:1.5px solid;width:5px;height:5px;transition:transform .15s var(--ck-ease);border-bottom:1.5px solid;transform:rotate(45deg)translateY(-2px)}.ck-details-toggle[aria-expanded=true]:after{transform:rotate(225deg)translate(-1px,-1px)}.ck-details dl{border-radius:var(--ck-radius-sm);background:var(--ck-bg-muted);gap:4px;margin:6px 0 0;padding:8px 10px;display:grid}.ck-details dl>div{grid-template-columns:72px 1fr;gap:8px;display:grid}.ck-details dt{color:var(--ck-text-muted)}.ck-details dd{overflow-wrap:anywhere;font-variant-numeric:tabular-nums;min-width:0;margin:0}.ck-details a{color:inherit;text-underline-offset:2px}@media (hover:hover){.ck-quote-msg:hover{color:var(--ck-text)}}@media (hover:none){.ck-msg-actions{opacity:1}}button.ck-shot{cursor:zoom-in;text-align:start;background:0 0;border:0;width:100%;padding:0;display:block}.ck-grid{border-radius:var(--ck-radius-md);grid-template-columns:repeat(2,1fr);gap:4px;margin-top:8px;display:grid;overflow:hidden}.ck-grid[data-count=\"3\"] .ck-grid-item:first-child{grid-row:span 2}.ck-grid-item{aspect-ratio:4/3;background:var(--ck-bg-muted);cursor:zoom-in;border:0;padding:0;position:relative;overflow:hidden}.ck-grid[data-count=\"3\"] .ck-grid-item:first-child{aspect-ratio:auto}.ck-grid-item img{object-fit:cover;outline:1px solid var(--ck-img-outline);outline-offset:-1px;width:100%;height:100%;transition:scale .2s var(--ck-ease);display:block}.ck-grid-more{color:#fff;font-variant-numeric:tabular-nums;background:#1213168c;place-items:center;font-size:18px;font-weight:700;display:grid;position:absolute;top:0;bottom:0;left:0;right:0}@media (hover:hover){.ck-grid-item:hover img,button.ck-shot:hover img{scale:1.02}}.ck-picker-wrap{display:inline-flex;position:relative}.ck-reaction-more{width:30px;color:var(--ck-text-muted);place-items:center;padding:0;display:inline-grid}.ck-picker{z-index:4;bottom:calc(100% + 6px);background:var(--ck-bg);box-shadow:var(--ck-shadow);animation:ck-pop .14s var(--ck-ease);border:1px solid #0000;border-radius:12px;grid-template-columns:repeat(8,32px);gap:2px;padding:6px;display:grid;position:absolute}.ck-picker:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:0}.ck-picker:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:0}.ck-picker:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:0}.ck-picker:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:0}.ck-picker button{background:0 0;border:0;border-radius:8px;place-items:center;width:32px;height:32px;padding:0;font-size:18px;transition:background-color .12s,scale .15s ease-out;display:grid}.ck-picker button[aria-pressed=true]{background:var(--ck-accent-soft)}.ck-picker button:active{scale:.92}.ck-picker .ck-emoji{width:20px;height:20px}@media (hover:hover){.ck-picker button:hover{background:var(--ck-bg-hover)}.ck-reaction-more:hover{color:var(--ck-text)}}@media (max-width:520px){.ck-picker{grid-template-columns:repeat(6,36px)}.ck-picker button{width:36px;height:36px}}.ck-extra{gap:8px;margin:0 0 10px;display:grid}.ck-description{border-radius:var(--ck-radius-sm);background:var(--ck-bg-muted);margin:0 0 8px;padding:8px 10px;font-size:13px}.ck-description summary{cursor:pointer;color:var(--ck-text-muted);font-size:12.5px;font-weight:600}.ck-description p{white-space:pre-wrap;overflow-wrap:anywhere;max-height:240px;margin:6px 0 0;overflow:auto}.ck-extra-add{gap:8px;display:flex}.ck-extra-add .ck-ghost{padding:2px 6px}.ck-checklist{border-radius:var(--ck-radius-sm);background:var(--ck-bg-muted);padding:8px 10px}.ck-checklist-head{font-variant-numeric:tabular-nums;align-items:center;gap:10px;font-size:12px;display:flex}.ck-checklist-bar{background:var(--ck-border);border-radius:2px;flex:1;height:4px;overflow:hidden}.ck-checklist-bar>span{background:var(--ck-success);height:100%;transition:width .2s var(--ck-ease);display:block}.ck-checklist ul{gap:2px;margin:6px 0 0;padding:0;list-style:none;display:grid}.ck-checklist li{align-items:center;gap:4px;display:flex}.ck-checklist li .ck-check{flex:1;min-width:0;margin:0;font-size:13px}.ck-checklist li[data-done] bdi{color:var(--ck-text-muted);text-decoration:line-through}.ck-checklist li .ck-ghost{opacity:0;flex:none;place-items:center;width:24px;height:24px;min-height:0;padding:0;transition:opacity .12s;display:grid}.ck-checklist li:hover .ck-ghost,.ck-checklist li:focus-within .ck-ghost{opacity:1}@media (hover:none){.ck-checklist li .ck-ghost{opacity:1}}.ck-checklist-add .ck-input{height:30px;font-size:13px}.ck-previews{gap:6px;margin-top:6px;display:grid}.ck-preview{border-inline-start:3px solid var(--ck-border);border-radius:var(--ck-radius-sm);background:var(--ck-bg-muted);color:var(--ck-text);gap:1px;padding:8px 10px;font-size:12.5px;text-decoration:none;transition:background-color .12s;display:grid}.ck-preview strong{text-overflow:ellipsis;white-space:nowrap;font-weight:650;overflow:hidden}.ck-preview-site{color:var(--ck-text-muted);font-size:11.5px}.ck-preview-text{color:var(--ck-text-muted);-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}@media (hover:hover){.ck-preview:hover{background:var(--ck-bg-hover)}}.ck-card-embedded{width:auto;height:100%;max-height:none;box-shadow:none;animation:ck-slide-in .22s var(--ck-ease);border:0;border-radius:0;flex-direction:column;display:flex;position:static;top:auto;bottom:auto;left:auto;right:auto}.ck-card-embedded .ck-card-body{flex:1;min-height:0}.ck-back svg{scale:-1 1}.ck-root[dir=rtl] .ck-back svg{scale:1}.ck-step svg{rotate:-90deg}.ck-step[data-dir=next] svg{rotate:90deg}.ck-card-pos{font-variant-numeric:tabular-nums;white-space:nowrap;font-size:12px}@keyframes ck-slide-in{0%{opacity:0;translate:24px}}.ck-root[dir=rtl] .ck-card-embedded{animation-name:ck-slide-in-rtl}@keyframes ck-slide-in-rtl{0%{opacity:0;translate:-24px}}.ck-msg[data-reply] .ck-msg-body{background:var(--ck-bg-muted);border-radius:4px 12px 12px;max-width:100%;padding:6px 10px;display:inline-block}.ck-msg[data-reply][data-mine]{flex-direction:row-reverse}.ck-msg[data-reply][data-mine] .ck-msg-main{flex-direction:column;align-items:flex-end;display:flex}.ck-msg[data-reply][data-mine] .ck-msg-meta{flex-direction:row-reverse}.ck-msg[data-reply][data-mine] .ck-msg-actions{margin-inline-start:0;margin-inline-end:auto}.ck-msg[data-reply][data-mine] .ck-msg-body{background:var(--ck-accent-soft);border-radius:12px 4px 12px 12px}.ck-msg[data-reply][data-mine] .ck-reactions{justify-content:flex-end}.ck-msg+.ck-msg[data-reply]{border-top:0;padding-top:6px}.ck-msg[data-new]{animation:ck-reply-in .24s var(--ck-ease)}@keyframes ck-reply-in{0%{opacity:0;translate:0 8px}}.ck-mention-card{z-index:5;background:var(--ck-bg);box-shadow:var(--ck-shadow);pointer-events:none;animation:ck-pop .12s var(--ck-ease);border:1px solid #0000;border-radius:10px;align-items:center;gap:8px;padding:6px 10px 6px 6px;font-size:13px;display:flex;position:fixed}.ck-mention-card .ck-avatar{width:22px;height:22px;font-size:9px}.ck-thread-skeleton{gap:14px;display:grid}.ck-skeleton-meta{width:40%;height:10px}.ck-thread-skeleton .ck-msg-skeleton:nth-child(3){opacity:.7}.ck-thread-skeleton .ck-msg-skeleton:nth-child(4){opacity:.45}");
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}, P = se(r, (t) => C(new e(0, "file_rejected", t))), [Be, Ve] = s(null), [He, Ue] = s(null), We = (e, t) => {
|
|
53
|
+
// src/ui/ThreadCard.tsx
|
|
54
|
+
S(".ck-msg{gap:10px;padding:6px 0;display:flex}.ck-msg+.ck-msg{border-top:1px solid var(--ck-hairline);padding-top:10px}.ck-msg-main{flex:1;min-width:0}.ck-msg-meta{color:var(--ck-text-muted);align-items:baseline;gap:6px;font-size:12px;display:flex}.ck-msg-body{white-space:pre-wrap;overflow-wrap:anywhere;margin-top:2px;line-height:1.5}.ck-msg-body a{color:color-mix(in srgb, var(--ck-accent) 80%, var(--ck-text));text-underline-offset:2px}.ck-msg-body code{font-family:var(--ck-mono);background:var(--ck-bg-muted);box-shadow:0 0 0 1px var(--ck-hairline);border-radius:5px;padding:1px 5px;font-size:12px}.ck-reactions{flex-wrap:wrap;gap:4px;margin-top:6px;display:flex}.ck-reaction{border:1px solid var(--ck-border);background:var(--ck-bg);font-variant-numeric:tabular-nums;border-radius:999px;height:24px;padding:0 8px;font-size:12px;transition:background-color .12s,border-color .12s}.ck-reaction[aria-pressed=true]{border-color:color-mix(in srgb, var(--ck-accent) 60%, var(--ck-border));background:var(--ck-accent-soft)}.ck-review-ask{border-radius:var(--ck-radius-md);background:color-mix(in srgb, var(--ck-review) 14%, var(--ck-bg));box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--ck-review) 30%, transparent);margin-bottom:10px;padding:12px}.ck-build{overflow-wrap:anywhere}.ck-msg-skeleton{gap:10px;display:flex}.ck-msg-skeleton>div{flex:1}.ck-skeleton-avatar{border-radius:50%;flex:none;width:28px;height:28px;margin:0;display:block}@media (pointer:coarse){.ck-reaction{min-width:36px;min-height:36px}}@media (hover:hover){.ck-reaction:hover{background:var(--ck-bg-muted)}}.ck-msg-body,.ck-review-ask{text-wrap:pretty}.ck-quoting{border-radius:var(--ck-radius-sm);background:var(--ck-bg-muted);border-inline-start:3px solid var(--ck-accent);color:var(--ck-text-muted);align-items:center;gap:8px;margin-bottom:6px;padding:6px 6px 6px 10px;font-size:12.5px;display:flex}.ck-quoting>span{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.ck-quoting strong{color:var(--ck-text);font-weight:650}.ck-msg-meta{flex-wrap:wrap}.ck-msg-meta time{cursor:default}.ck-msg-actions{opacity:0;gap:2px;margin-inline-start:auto;transition:opacity .12s;display:inline-flex}.ck-msg:hover .ck-msg-actions,.ck-msg:focus-within .ck-msg-actions{opacity:1}.ck-msg-body s{color:var(--ck-text-muted)}.ck-quote-msg{border-top:0;border-bottom:0;text-align:start;text-overflow:ellipsis;white-space:nowrap;border-inline-end:0;width:100%;margin:4px 0 6px;overflow:hidden}.ck-quote-msg strong{color:var(--ck-text);font-weight:650}.ck-reaction-add{opacity:.55}.ck-no-replies{margin:8px 0 0;font-size:12.5px}.ck-jump{box-shadow:var(--ck-shadow-sm);animation:ck-pop .14s var(--ck-ease);z-index:1;position:absolute;top:-38px;left:50%;transform:translate(-50%)}.ck-details{margin:0 0 8px;font-size:12.5px}.ck-details-toggle{color:var(--ck-text-muted);background:0 0;border:0;border-radius:6px;align-items:center;gap:6px;padding:2px 0;font-size:12.5px;font-weight:600;display:inline-flex}.ck-details-toggle:after{content:\"\";border-inline-end:1.5px solid;width:5px;height:5px;transition:transform .15s var(--ck-ease);border-bottom:1.5px solid;transform:rotate(45deg)translateY(-2px)}.ck-details-toggle[aria-expanded=true]:after{transform:rotate(225deg)translate(-1px,-1px)}.ck-details dl{border-radius:var(--ck-radius-sm);background:var(--ck-bg-muted);gap:4px;margin:6px 0 0;padding:8px 10px;display:grid}.ck-details dl>div{grid-template-columns:72px 1fr;gap:8px;display:grid}.ck-details dt{color:var(--ck-text-muted)}.ck-details dd{overflow-wrap:anywhere;font-variant-numeric:tabular-nums;min-width:0;margin:0}.ck-details a{color:inherit;text-underline-offset:2px}@media (hover:hover){.ck-quote-msg:hover{color:var(--ck-text)}}@media (hover:none){.ck-msg-actions{opacity:1}}button.ck-shot{cursor:zoom-in;text-align:start;background:0 0;border:0;width:100%;padding:0;display:block}.ck-grid{border-radius:var(--ck-radius-md);grid-template-columns:repeat(2,1fr);gap:4px;margin-top:8px;display:grid;overflow:hidden}.ck-grid[data-count=\"3\"] .ck-grid-item:first-child{grid-row:span 2}.ck-grid-item{aspect-ratio:4/3;background:var(--ck-bg-muted);cursor:zoom-in;border:0;padding:0;position:relative;overflow:hidden}.ck-grid[data-count=\"3\"] .ck-grid-item:first-child{aspect-ratio:auto}.ck-grid-item img{object-fit:cover;outline:1px solid var(--ck-img-outline);outline-offset:-1px;width:100%;height:100%;transition:scale .2s var(--ck-ease);display:block}.ck-grid-more{color:#fff;font-variant-numeric:tabular-nums;background:#1213168c;place-items:center;font-size:18px;font-weight:700;display:grid;position:absolute;top:0;bottom:0;left:0;right:0}@media (hover:hover){.ck-grid-item:hover img,button.ck-shot:hover img{scale:1.02}}.ck-picker-wrap{display:inline-flex;position:relative}.ck-reaction-more{width:30px;color:var(--ck-text-muted);place-items:center;padding:0;display:inline-grid}.ck-picker{z-index:4;bottom:calc(100% + 6px);background:var(--ck-bg);box-shadow:var(--ck-shadow);animation:ck-pop .14s var(--ck-ease);border:1px solid #0000;border-radius:12px;grid-template-columns:repeat(8,32px);gap:2px;padding:6px;display:grid;position:absolute}.ck-picker:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:0}.ck-picker:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:0}.ck-picker:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:0}.ck-picker:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:0}.ck-picker button{background:0 0;border:0;border-radius:8px;place-items:center;width:32px;height:32px;padding:0;font-size:18px;transition:background-color .12s,scale .15s ease-out;display:grid}.ck-picker button[aria-pressed=true]{background:var(--ck-accent-soft)}.ck-picker button:active{scale:.92}.ck-picker .ck-emoji{width:20px;height:20px}@media (hover:hover){.ck-picker button:hover{background:var(--ck-bg-hover)}.ck-reaction-more:hover{color:var(--ck-text)}}@media (max-width:520px){.ck-picker{grid-template-columns:repeat(6,36px)}.ck-picker button{width:36px;height:36px}}.ck-extra{gap:8px;margin:0 0 10px;display:grid}.ck-description{border-radius:var(--ck-radius-sm);background:var(--ck-bg-muted);margin:0 0 8px;padding:8px 10px;font-size:13px}.ck-description summary{cursor:pointer;color:var(--ck-text-muted);font-size:12.5px;font-weight:600}.ck-description p{white-space:pre-wrap;overflow-wrap:anywhere;max-height:240px;margin:6px 0 0;overflow:auto}.ck-extra-add{gap:8px;display:flex}.ck-extra-add .ck-ghost{padding:2px 6px}.ck-checklist{border-radius:var(--ck-radius-sm);background:var(--ck-bg-muted);padding:8px 10px}.ck-checklist-head{font-variant-numeric:tabular-nums;align-items:center;gap:10px;font-size:12px;display:flex}.ck-checklist-bar{background:var(--ck-border);border-radius:2px;flex:1;height:4px;overflow:hidden}.ck-checklist-bar>span{background:var(--ck-success);height:100%;transition:width .2s var(--ck-ease);display:block}.ck-checklist ul{gap:2px;margin:6px 0 0;padding:0;list-style:none;display:grid}.ck-checklist li{align-items:center;gap:4px;display:flex}.ck-checklist li .ck-check{flex:1;min-width:0;margin:0;font-size:13px}.ck-checklist li[data-done] bdi{color:var(--ck-text-muted);text-decoration:line-through}.ck-checklist li .ck-ghost{opacity:0;flex:none;place-items:center;width:24px;height:24px;min-height:0;padding:0;transition:opacity .12s;display:grid}.ck-checklist li:hover .ck-ghost,.ck-checklist li:focus-within .ck-ghost{opacity:1}@media (hover:none){.ck-checklist li .ck-ghost{opacity:1}}.ck-checklist-add .ck-input{height:30px;font-size:13px}.ck-previews{gap:6px;margin-top:6px;display:grid}.ck-preview{border-inline-start:3px solid var(--ck-border);border-radius:var(--ck-radius-sm);background:var(--ck-bg-muted);color:var(--ck-text);gap:1px;padding:8px 10px;font-size:12.5px;text-decoration:none;transition:background-color .12s;display:grid}.ck-preview strong{text-overflow:ellipsis;white-space:nowrap;font-weight:650;overflow:hidden}.ck-preview-site{color:var(--ck-text-muted);font-size:11.5px}.ck-preview-text{color:var(--ck-text-muted);-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}@media (hover:hover){.ck-preview:hover{background:var(--ck-bg-hover)}}.ck-card-embedded{width:auto;height:100%;max-height:none;box-shadow:none;animation:ck-slide-in .22s var(--ck-ease);border:0;border-radius:0;flex-direction:column;display:flex;position:static;top:auto;bottom:auto;left:auto;right:auto}.ck-card-embedded .ck-card-body{flex:1;min-height:0}.ck-back svg{scale:-1 1}.ck-root[dir=rtl] .ck-back svg{scale:1}.ck-step svg{rotate:-90deg}.ck-step[data-dir=next] svg{rotate:90deg}.ck-card-pos{font-variant-numeric:tabular-nums;white-space:nowrap;font-size:12px}@keyframes ck-slide-in{0%{opacity:0;translate:24px}}.ck-root[dir=rtl] .ck-card-embedded{animation-name:ck-slide-in-rtl}@keyframes ck-slide-in-rtl{0%{opacity:0;translate:-24px}}.ck-msg[data-reply] .ck-msg-body{background:var(--ck-bg-muted);border-radius:4px 12px 12px;max-width:100%;padding:6px 10px;display:inline-block}.ck-msg[data-reply][data-mine]{flex-direction:row-reverse}.ck-msg[data-reply][data-mine] .ck-msg-main{flex-direction:column;align-items:flex-end;display:flex}.ck-msg[data-reply][data-mine] .ck-msg-meta{flex-direction:row-reverse}.ck-msg[data-reply][data-mine] .ck-msg-actions{margin-inline-start:0;margin-inline-end:auto}.ck-msg[data-reply][data-mine] .ck-msg-body{background:var(--ck-accent-soft);border-radius:12px 4px 12px 12px}.ck-msg[data-reply][data-mine] .ck-reactions{justify-content:flex-end}.ck-msg+.ck-msg[data-reply]{border-top:0;padding-top:6px}.ck-msg[data-new]{animation:ck-reply-in .24s var(--ck-ease)}@keyframes ck-reply-in{0%{opacity:0;translate:0 8px}}.ck-mention-card{z-index:5;background:var(--ck-bg);box-shadow:var(--ck-shadow);pointer-events:none;animation:ck-pop .12s var(--ck-ease);border:1px solid #0000;border-radius:10px;align-items:center;gap:8px;padding:6px 10px 6px 6px;font-size:13px;display:flex;position:fixed}.ck-mention-card .ck-avatar{width:22px;height:22px;font-size:9px}.ck-thread-skeleton{gap:14px;display:grid}.ck-skeleton-meta{width:40%;height:10px}.ck-thread-skeleton .ck-msg-skeleton:nth-child(3){opacity:.7}.ck-thread-skeleton .ck-msg-skeleton:nth-child(4){opacity:.45}");
|
|
55
|
+
var Oe = h.slice(0, 6), ke = /* @__PURE__ */ new Map();
|
|
56
|
+
function C({ client: i, threadId: _, version: v = 0, onClose: y, onError: S, notify: C, embedded: w }) {
|
|
57
|
+
let T = he(i.state, (e) => e.session), Pe = he(i.state, (e) => e.config?.read_only ?? !1), Fe = be(), Ie = a(null), E = he(i.state, (e) => e.threads.find((e) => e.id === _) ?? null), [D, O] = c(E), [k, A] = c([]), [j, Le] = c(null), M = g(i.options.project, "reply", _), [N, Re] = c(() => ae(M)), ze = (e) => {
|
|
58
|
+
e !== N && (I.current = null), Re(e), ie(M, e);
|
|
59
|
+
}, P = ce(i, (t) => S(new e(0, "file_rejected", t))), [Be, Ve] = c(null), [He, Ue] = c(null), We = (e, t) => {
|
|
61
60
|
Ve({
|
|
62
61
|
images: e,
|
|
63
62
|
start: t
|
|
64
|
-
}), He || import("./Viewer-
|
|
65
|
-
}, Ge =
|
|
63
|
+
}), He || import("./Viewer-CqtGrdD8.js").then((e) => Ue(() => e.Viewer), S);
|
|
64
|
+
}, Ge = a(null), [Ke, qe] = c([]), [F, Je] = c(!1), [Ye, Xe] = c(!1), I = a(null), [Ze, Qe] = c(!1), [L, R] = c(null), [z, B] = c(null), [$e, V] = c(!1), [et, tt] = c(!1), [H, nt] = c(null);
|
|
66
65
|
d(() => {
|
|
67
|
-
if (!
|
|
66
|
+
if (!H) return;
|
|
68
67
|
let e = (e) => {
|
|
69
|
-
e.composedPath().some((e) => e instanceof HTMLElement && e.classList.contains("ck-picker-wrap")) ||
|
|
68
|
+
e.composedPath().some((e) => e instanceof HTMLElement && e.classList.contains("ck-picker-wrap")) || nt(null);
|
|
70
69
|
};
|
|
71
70
|
return addEventListener("pointerdown", e, !0), () => removeEventListener("pointerdown", e, !0);
|
|
72
|
-
}, [
|
|
73
|
-
let [
|
|
74
|
-
top:
|
|
75
|
-
behavior: e && !
|
|
71
|
+
}, [H]);
|
|
72
|
+
let [U, rt] = c([]), it = o(() => U.map((e) => e.name), [U]), [W, G] = c(null), at = a(/* @__PURE__ */ new Set()), [ot, st] = c(!1), [ct, lt] = c(!0), ut = a(null), dt = (e = !1) => ut.current?.scrollTo({
|
|
73
|
+
top: ut.current.scrollHeight,
|
|
74
|
+
behavior: e && !je() ? "smooth" : "auto"
|
|
76
75
|
});
|
|
77
76
|
d(() => {
|
|
78
|
-
|
|
79
|
-
}, [
|
|
80
|
-
let ft = () =>
|
|
77
|
+
$e || dt();
|
|
78
|
+
}, [k.length]);
|
|
79
|
+
let ft = () => !$e && dt();
|
|
81
80
|
d(() => {
|
|
82
|
-
|
|
83
|
-
}, [
|
|
84
|
-
let K =
|
|
85
|
-
K.current =
|
|
86
|
-
let q =
|
|
81
|
+
T && ue(i).then(rt);
|
|
82
|
+
}, [T?.person.id]);
|
|
83
|
+
let K = a(_);
|
|
84
|
+
K.current = _;
|
|
85
|
+
let q = a(null), pt = (e) => {
|
|
87
86
|
q.current?.(), q.current = null;
|
|
88
87
|
let t = () => {
|
|
89
|
-
K.current === e &&
|
|
88
|
+
K.current === e && i.state.get().unread > 0 && i.markRead({ threadId: e }).catch(() => void 0);
|
|
90
89
|
};
|
|
91
|
-
if (
|
|
92
|
-
let n =
|
|
93
|
-
|
|
90
|
+
if (i.inboxLoaded || i.state.get().unread > 0) return t();
|
|
91
|
+
let n = i.state.subscribe(() => {
|
|
92
|
+
i.inboxLoaded && (n(), q.current = null, t());
|
|
94
93
|
});
|
|
95
94
|
q.current = n;
|
|
96
95
|
};
|
|
97
96
|
d(() => () => q.current?.(), []);
|
|
98
97
|
let J = async (t = !1) => {
|
|
99
|
-
let n =
|
|
98
|
+
let n = _;
|
|
100
99
|
try {
|
|
101
|
-
let [e,
|
|
100
|
+
let [e, r] = await Promise.all([i.getThread(n), i.allMessages(n, { refresh: t })]);
|
|
102
101
|
if (K.current !== n) return;
|
|
103
|
-
|
|
102
|
+
O(e), at.current.size || r.forEach((e) => at.current.add(e.id)), A(r), !ke.has(n) && typeof e.watching == "boolean" && lt(e.watching), pt(n);
|
|
104
103
|
} catch (t) {
|
|
105
104
|
if (K.current !== n) return;
|
|
106
105
|
let r = t instanceof e && (t.status === 404 || t.status === 403);
|
|
107
|
-
if (
|
|
108
|
-
|
|
106
|
+
if (E && !r) {
|
|
107
|
+
S(t);
|
|
109
108
|
return;
|
|
110
109
|
}
|
|
111
|
-
if (
|
|
112
|
-
|
|
110
|
+
if (E) {
|
|
111
|
+
S(new e(404, "thread_not_found", u("threadNotFound"))), y();
|
|
113
112
|
return;
|
|
114
113
|
}
|
|
115
|
-
|
|
114
|
+
Le({
|
|
116
115
|
gone: r,
|
|
117
|
-
text: r ? u("threadNotFound") :
|
|
116
|
+
text: r ? u("threadNotFound") : _e(t)
|
|
118
117
|
});
|
|
119
118
|
}
|
|
120
119
|
};
|
|
121
120
|
d(() => {
|
|
122
|
-
|
|
123
|
-
}, [
|
|
124
|
-
|
|
125
|
-
}, [
|
|
126
|
-
let mt =
|
|
121
|
+
O(E), A([]), Re(ae(M)), P.clear(), B(null), V(!1), G(null), at.current = /* @__PURE__ */ new Set(), st(!1), Xe(!1), I.current = null, lt(ke.get(_) ?? E?.watching ?? !0), J();
|
|
122
|
+
}, [_]), d(() => {
|
|
123
|
+
E && D && E.updated_at !== D.updated_at && J(!0);
|
|
124
|
+
}, [E?.updated_at]);
|
|
125
|
+
let mt = a(v);
|
|
127
126
|
d(() => {
|
|
128
|
-
|
|
129
|
-
}, [
|
|
130
|
-
let Y =
|
|
127
|
+
v !== mt.current && (mt.current = v, J(!0));
|
|
128
|
+
}, [v]);
|
|
129
|
+
let Y = o(() => D ? t(D.anchor) : null, [D]);
|
|
131
130
|
if (d(() => {
|
|
132
|
-
!
|
|
131
|
+
!w && Y?.element && Y.state !== "detached" && Y.element.scrollIntoView({
|
|
133
132
|
block: "center",
|
|
134
|
-
behavior:
|
|
133
|
+
behavior: je() ? "auto" : "smooth"
|
|
135
134
|
});
|
|
136
135
|
}, [Y?.element]), d(() => {
|
|
137
|
-
|
|
138
|
-
}, [
|
|
136
|
+
D && Ie.current?.focus({ preventScroll: !0 });
|
|
137
|
+
}, [D?.id]), d(() => {
|
|
139
138
|
let e = (e) => {
|
|
140
|
-
if (
|
|
139
|
+
if (w && (e.key === "j" || e.key === "k") && !e.metaKey && !e.ctrlKey && !e.altKey && i.options.shortcuts !== !1 && !e.composedPath().some((e) => e instanceof HTMLElement && (e.isContentEditable || [
|
|
141
140
|
"INPUT",
|
|
142
141
|
"TEXTAREA",
|
|
143
142
|
"SELECT"
|
|
144
143
|
].includes(e.tagName)))) {
|
|
145
|
-
let t = e.key === "j" ?
|
|
144
|
+
let t = e.key === "j" ? w.onNext : w.onPrev;
|
|
146
145
|
t && (e.preventDefault(), t());
|
|
147
|
-
} else e.key !== "e" && e.key !== "E" || e.metaKey || e.ctrlKey || e.altKey || !
|
|
146
|
+
} else e.key !== "e" && e.key !== "E" || e.metaKey || e.ctrlKey || e.altKey || !D || i.options.shortcuts === !1 || e.composedPath().some((e) => e instanceof HTMLElement && (e.isContentEditable || [
|
|
148
147
|
"INPUT",
|
|
149
148
|
"TEXTAREA",
|
|
150
149
|
"SELECT"
|
|
151
|
-
].includes(e.tagName))) ||
|
|
150
|
+
].includes(e.tagName))) || T?.capabilities.comment && !Pe && D.status !== "resolved" && (e.preventDefault(), Q("resolved"));
|
|
152
151
|
};
|
|
153
152
|
return addEventListener("keydown", e), () => removeEventListener("keydown", e);
|
|
154
|
-
}), !
|
|
155
|
-
class:
|
|
156
|
-
style:
|
|
153
|
+
}), !D) return /* @__PURE__ */ s("div", {
|
|
154
|
+
class: w ? "ck-card ck-card-embedded" : "ck-card",
|
|
155
|
+
style: w ? void 0 : m({
|
|
157
156
|
x: innerWidth - 400,
|
|
158
157
|
y: 80
|
|
159
158
|
}),
|
|
160
|
-
role:
|
|
159
|
+
role: w ? "region" : "dialog",
|
|
161
160
|
"aria-label": u("loadingThread"),
|
|
162
|
-
"aria-busy": !
|
|
161
|
+
"aria-busy": !j,
|
|
163
162
|
"data-commentkit-ui": !0,
|
|
164
|
-
children: [/* @__PURE__ */
|
|
163
|
+
children: [/* @__PURE__ */ s("div", {
|
|
165
164
|
class: "ck-card-head",
|
|
166
165
|
children: [
|
|
167
|
-
|
|
166
|
+
w ? /* @__PURE__ */ s("button", {
|
|
168
167
|
class: "ck-ghost ck-back",
|
|
169
168
|
"aria-label": u("backToList"),
|
|
170
|
-
onClick:
|
|
171
|
-
children: /* @__PURE__ */
|
|
169
|
+
onClick: w.onBack,
|
|
170
|
+
children: /* @__PURE__ */ s(x, {
|
|
172
171
|
name: "chevron",
|
|
173
172
|
size: 16
|
|
174
173
|
})
|
|
175
174
|
}) : null,
|
|
176
|
-
/* @__PURE__ */
|
|
175
|
+
/* @__PURE__ */ s("span", {
|
|
177
176
|
class: "ck-card-title",
|
|
178
|
-
children:
|
|
177
|
+
children: j ? "" : u("loadingThread")
|
|
179
178
|
}),
|
|
180
|
-
/* @__PURE__ */
|
|
179
|
+
/* @__PURE__ */ s("button", {
|
|
181
180
|
class: "ck-ghost",
|
|
182
181
|
"aria-label": u("close"),
|
|
183
|
-
onClick:
|
|
184
|
-
children: /* @__PURE__ */
|
|
182
|
+
onClick: w ? w.onBack : y,
|
|
183
|
+
children: /* @__PURE__ */ s(x, { name: "close" })
|
|
185
184
|
})
|
|
186
185
|
]
|
|
187
|
-
}),
|
|
186
|
+
}), j ? /* @__PURE__ */ s("div", {
|
|
188
187
|
class: "ck-card-body ck-empty",
|
|
189
188
|
role: "alert",
|
|
190
189
|
children: [
|
|
191
|
-
/* @__PURE__ */
|
|
192
|
-
/* @__PURE__ */
|
|
193
|
-
/* @__PURE__ */
|
|
190
|
+
/* @__PURE__ */ s(de, { name: j.gone ? "gone" : "error" }),
|
|
191
|
+
/* @__PURE__ */ s("span", { children: j.text }),
|
|
192
|
+
/* @__PURE__ */ s("button", {
|
|
194
193
|
class: "ck-btn",
|
|
195
|
-
onClick:
|
|
196
|
-
|
|
194
|
+
onClick: j.gone ? y : () => {
|
|
195
|
+
Le(null), J();
|
|
197
196
|
},
|
|
198
|
-
children: u(
|
|
197
|
+
children: u(j.gone ? "close" : "retry")
|
|
199
198
|
})
|
|
200
199
|
]
|
|
201
|
-
}) : /* @__PURE__ */
|
|
200
|
+
}) : /* @__PURE__ */ s("div", {
|
|
202
201
|
class: "ck-card-body ck-thread-skeleton",
|
|
203
|
-
children: [/* @__PURE__ */
|
|
202
|
+
children: [/* @__PURE__ */ s("div", { class: "ck-skeleton ck-skeleton-meta" }), [
|
|
204
203
|
0,
|
|
205
204
|
1,
|
|
206
205
|
2
|
|
207
|
-
].map(() => /* @__PURE__ */
|
|
206
|
+
].map(() => /* @__PURE__ */ s("div", {
|
|
208
207
|
class: "ck-msg-skeleton",
|
|
209
|
-
children: [/* @__PURE__ */
|
|
210
|
-
/* @__PURE__ */
|
|
211
|
-
/* @__PURE__ */
|
|
212
|
-
/* @__PURE__ */
|
|
208
|
+
children: [/* @__PURE__ */ s("span", { class: "ck-skeleton ck-skeleton-avatar" }), /* @__PURE__ */ s("div", { children: [
|
|
209
|
+
/* @__PURE__ */ s("div", { class: "ck-skeleton" }),
|
|
210
|
+
/* @__PURE__ */ s("div", { class: "ck-skeleton" }),
|
|
211
|
+
/* @__PURE__ */ s("div", { class: "ck-skeleton" })
|
|
213
212
|
] })]
|
|
214
213
|
}))]
|
|
215
214
|
})]
|
|
216
215
|
});
|
|
217
|
-
let X =
|
|
216
|
+
let X = T?.capabilities, Z = !!X?.comment && !Pe, ht = i.options.tools?.attachments !== !1, gt = T && D.author.id === T.person.id && D.author.type === (T.person.type === "guest" ? "guest" : "user"), _t = Y ? {
|
|
218
217
|
x: Y.point.x - scrollX,
|
|
219
218
|
y: Y.point.y - scrollY
|
|
220
219
|
} : {
|
|
221
220
|
x: innerWidth - 400,
|
|
222
221
|
y: 80
|
|
223
|
-
}, vt =
|
|
222
|
+
}, vt = m({
|
|
224
223
|
x: Math.min(Math.max(_t.x, 0), innerWidth),
|
|
225
224
|
y: Math.min(Math.max(_t.y, 0), innerHeight - 40)
|
|
226
|
-
}), yt =
|
|
227
|
-
if (!(t instanceof e && t.status === 412)) return
|
|
228
|
-
R(null),
|
|
225
|
+
}), yt = T?.role === "guest" ? u("feedbackRef", { ref: D.reference }) : D.reference, bt = (t) => {
|
|
226
|
+
if (!(t instanceof e && t.status === 412)) return S(t);
|
|
227
|
+
R(null), C({
|
|
229
228
|
text: u("editConflict"),
|
|
230
229
|
tone: "info"
|
|
231
230
|
}), J();
|
|
232
231
|
}, Q = async (e) => {
|
|
233
|
-
let t =
|
|
232
|
+
let t = D;
|
|
234
233
|
try {
|
|
235
|
-
|
|
236
|
-
text: u("resolvedToast", { ref:
|
|
234
|
+
O(await i.updateThread(D.id, { status: e })), e === "resolved" && import("./confetti-DTKpwF3O.js").then((e) => e.celebrate(ut.current)).catch(() => void 0), e === "resolved" ? C({
|
|
235
|
+
text: u("resolvedToast", { ref: D.reference }),
|
|
237
236
|
tone: "success",
|
|
238
237
|
action: {
|
|
239
238
|
label: u("undo"),
|
|
240
|
-
run: () => void
|
|
239
|
+
run: () => void p(i, t, C, S).then((e) => e && K.current === e.id && O(e))
|
|
241
240
|
}
|
|
242
|
-
}) : e === "open" && (t.status === "resolved" || t.status === "closed") &&
|
|
243
|
-
text: u("reopenedToast", { ref:
|
|
241
|
+
}) : e === "open" && (t.status === "resolved" || t.status === "closed") && C({
|
|
242
|
+
text: u("reopenedToast", { ref: D.reference }),
|
|
244
243
|
tone: "info"
|
|
245
244
|
});
|
|
246
245
|
} catch (e) {
|
|
247
246
|
bt(e);
|
|
248
247
|
}
|
|
249
|
-
}, xt = () =>
|
|
250
|
-
let t = e?.watching ?? !
|
|
251
|
-
|
|
252
|
-
},
|
|
248
|
+
}, xt = () => i.watch(D.id, !ct).then((e) => {
|
|
249
|
+
let t = e?.watching ?? !ct;
|
|
250
|
+
ke.set(D.id, t), lt(t), C({ text: u(t ? "followed" : "muted", { ref: D.reference }) });
|
|
251
|
+
}, S), St = () => {
|
|
253
252
|
if (!L || F) return;
|
|
254
253
|
Je(!0);
|
|
255
|
-
let e =
|
|
256
|
-
|
|
257
|
-
|
|
254
|
+
let e = Te(L.body, U.map((e) => e.name)), t = U.filter((t) => /^\d+$/.test(t.id ?? "") && e.has(t.name)).map((e) => Number(e.id));
|
|
255
|
+
i.editMessage(L.id, L.body, ...t.length ? [{ mentionIds: t }] : []).then((e) => {
|
|
256
|
+
A((t) => t.map((t) => t.id === e.id ? e : t)), R(null), C({
|
|
258
257
|
text: u("editedToast"),
|
|
259
258
|
tone: "success"
|
|
260
|
-
}), e.id ===
|
|
259
|
+
}), e.id === k[0]?.id && i.refreshThread(D.id);
|
|
261
260
|
}, bt).finally(() => Je(!1));
|
|
262
261
|
}, Ct = async () => {
|
|
263
262
|
if (N.trim() && !F) {
|
|
264
263
|
Je(!0), Xe(!1);
|
|
265
264
|
try {
|
|
266
265
|
let e = await P.ready(), t = e.ids;
|
|
267
|
-
e.missing &&
|
|
266
|
+
e.missing && C({
|
|
268
267
|
text: u("sentWithoutFiles"),
|
|
269
268
|
tone: "info"
|
|
270
269
|
});
|
|
271
|
-
let n = await
|
|
270
|
+
let n = await i.reply(D.id, N.trim(), {
|
|
272
271
|
replyTo: z?.id ?? null,
|
|
273
272
|
mentionIds: Ke,
|
|
274
273
|
attachmentIds: t,
|
|
275
274
|
idempotencyKey: I.current ?? (I.current = crypto.randomUUID())
|
|
276
275
|
});
|
|
277
|
-
I.current = null,
|
|
278
|
-
...
|
|
276
|
+
I.current = null, A((e) => e.some((e) => e.id === n.id) ? e : [...e, n]), B(null), V(!1), Re(""), P.clear(), oe(M), (D.status === "resolved" || D.status === "closed") && O({
|
|
277
|
+
...D,
|
|
279
278
|
status: "open"
|
|
280
279
|
});
|
|
281
280
|
} catch (e) {
|
|
282
|
-
Xe(
|
|
281
|
+
Xe(te(e) ?? !0);
|
|
283
282
|
} finally {
|
|
284
283
|
Je(!1);
|
|
285
284
|
}
|
|
286
285
|
}
|
|
287
286
|
}, wt = async (e, t) => {
|
|
288
|
-
let n = e.reactions?.find((e) => e.emoji === t)?.mine ?? !1,
|
|
287
|
+
let n = e.reactions?.find((e) => e.emoji === t)?.mine ?? !1, r = (e) => {
|
|
289
288
|
let r = (e.reactions ?? []).map((e) => e.emoji === t ? {
|
|
290
289
|
...e,
|
|
291
290
|
count: e.count + (n ? -1 : 1),
|
|
@@ -300,191 +299,191 @@ function w({ client: r, threadId: v, version: y = 0, onClose: b, onError: C, not
|
|
|
300
299
|
reactions: r
|
|
301
300
|
};
|
|
302
301
|
};
|
|
303
|
-
|
|
302
|
+
A(k.map((t) => t.id === e.id ? r(t) : t));
|
|
304
303
|
try {
|
|
305
|
-
await
|
|
304
|
+
await i.react(e.id, t, !n);
|
|
306
305
|
} catch (e) {
|
|
307
|
-
|
|
306
|
+
S(e), J();
|
|
308
307
|
}
|
|
309
308
|
}, Tt = (e) => P.add(e), Et = (e) => {
|
|
310
|
-
let t =
|
|
311
|
-
|
|
309
|
+
let t = k.findIndex((t) => t.id === e.id);
|
|
310
|
+
A((t) => t.filter((t) => t.id !== e.id)), C({
|
|
312
311
|
text: u("replyDeleted"),
|
|
313
312
|
action: {
|
|
314
313
|
label: u("undo"),
|
|
315
|
-
run: () => K.current ===
|
|
314
|
+
run: () => K.current === D.id && A((n) => n.some((t) => t.id === e.id) ? n : [
|
|
316
315
|
...n.slice(0, t),
|
|
317
316
|
e,
|
|
318
317
|
...n.slice(t)
|
|
319
318
|
])
|
|
320
319
|
},
|
|
321
|
-
expires:
|
|
322
|
-
onExpire: () => void
|
|
323
|
-
|
|
320
|
+
expires: Ae,
|
|
321
|
+
onExpire: () => void i.deleteMessage(e.id).then(() => i.refreshThread(D.id), (e) => {
|
|
322
|
+
S(e), K.current === D.id && J();
|
|
324
323
|
})
|
|
325
324
|
});
|
|
326
325
|
}, Dt = () => {
|
|
327
|
-
let e =
|
|
328
|
-
|
|
329
|
-
text: u("threadDeleted", { ref:
|
|
326
|
+
let e = i.state.get().threads;
|
|
327
|
+
i.state.set((e) => ({ threads: e.threads.filter((e) => e.id !== D.id) })), y(), C({
|
|
328
|
+
text: u("threadDeleted", { ref: D.reference }),
|
|
330
329
|
action: {
|
|
331
330
|
label: u("undo"),
|
|
332
|
-
run: () =>
|
|
331
|
+
run: () => i.state.set((t) => ({ threads: t.threads.some((e) => e.id === D.id) ? t.threads : e.filter((e) => e.id === D.id).concat(t.threads) }))
|
|
333
332
|
},
|
|
334
|
-
expires:
|
|
335
|
-
onExpire: () => void
|
|
336
|
-
|
|
333
|
+
expires: Ae,
|
|
334
|
+
onExpire: () => void i.deleteThread(D.id).catch((e) => {
|
|
335
|
+
S(e), i.refreshThread(D.id);
|
|
337
336
|
})
|
|
338
337
|
});
|
|
339
338
|
}, Ot = async (e, t) => {
|
|
340
339
|
try {
|
|
341
|
-
await navigator.clipboard.writeText(e),
|
|
340
|
+
await navigator.clipboard.writeText(e), C({ text: t });
|
|
342
341
|
} catch {
|
|
343
|
-
|
|
342
|
+
S(Error(u("errorGeneric")));
|
|
344
343
|
}
|
|
345
344
|
}, kt = (() => {
|
|
346
|
-
let e =
|
|
345
|
+
let e = b(D.page.url);
|
|
347
346
|
if (!e) return "";
|
|
348
347
|
let t = new URL(e);
|
|
349
|
-
return t.searchParams.set("ck_thread",
|
|
350
|
-
})(), At =
|
|
351
|
-
[u("detailCreated"), /* @__PURE__ */
|
|
352
|
-
dateTime:
|
|
353
|
-
children: l(
|
|
348
|
+
return t.searchParams.set("ck_thread", D.id), t.toString();
|
|
349
|
+
})(), At = b(D.capture?.screenshot?.thumbnail_url, "image"), jt = b(D.capture?.screenshot?.url), Mt = D.status === "resolved" || D.status === "closed", Nt = b(D.page.url), $ = D.capture?.device, Pt = D.capture?.viewport, Ft = [
|
|
350
|
+
[u("detailCreated"), /* @__PURE__ */ s("time", {
|
|
351
|
+
dateTime: D.created_at,
|
|
352
|
+
children: l(D.created_at)
|
|
354
353
|
})],
|
|
355
|
-
...
|
|
356
|
-
dateTime:
|
|
357
|
-
children: l(
|
|
354
|
+
...D.resolved_at && D.status === "resolved" ? [[u("detailResolved"), /* @__PURE__ */ s("time", {
|
|
355
|
+
dateTime: D.resolved_at,
|
|
356
|
+
children: l(D.resolved_at)
|
|
358
357
|
})]] : [],
|
|
359
|
-
...Nt ? [[u("detailPage"), /* @__PURE__ */
|
|
358
|
+
...Nt ? [[u("detailPage"), /* @__PURE__ */ s("a", {
|
|
360
359
|
href: Nt,
|
|
361
360
|
target: "_blank",
|
|
362
361
|
rel: "noopener noreferrer",
|
|
363
|
-
children: /* @__PURE__ */
|
|
362
|
+
children: /* @__PURE__ */ s("bdi", { children: D.page.title || D.page.path })
|
|
364
363
|
})]] : [],
|
|
365
|
-
...$?.browser || $?.os ? [[u("detailBrowser"), /* @__PURE__ */
|
|
366
|
-
...Pt?.width ? [[u("detailWindow"), /* @__PURE__ */
|
|
364
|
+
...$?.browser || $?.os ? [[u("detailBrowser"), /* @__PURE__ */ s("bdi", { children: [$.browser && `${$.browser}${$.browser_version ? ` ${$.browser_version.split(".")[0]}` : ""}`, $.os && `${$.os}${$.os_version ? ` ${$.os_version}` : ""}`].filter(Boolean).join(" · ") })]] : [],
|
|
365
|
+
...Pt?.width ? [[u("detailWindow"), /* @__PURE__ */ s("bdi", {
|
|
367
366
|
dir: "ltr",
|
|
368
367
|
children: `${Pt.width} × ${Pt.height}`
|
|
369
368
|
})]] : []
|
|
370
369
|
];
|
|
371
|
-
return /* @__PURE__ */
|
|
372
|
-
class:
|
|
373
|
-
style:
|
|
374
|
-
role:
|
|
370
|
+
return /* @__PURE__ */ s("div", {
|
|
371
|
+
class: w ? "ck-card ck-card-embedded" : "ck-card",
|
|
372
|
+
style: w ? void 0 : vt,
|
|
373
|
+
role: w ? "region" : "dialog",
|
|
375
374
|
"aria-label": yt,
|
|
376
375
|
"data-commentkit-ui": !0,
|
|
377
|
-
onKeyDown:
|
|
376
|
+
onKeyDown: w ? (e) => e.key === "Escape" && !e.defaultPrevented && (e.stopPropagation(), w.onBack()) : void 0,
|
|
378
377
|
children: [
|
|
379
|
-
/* @__PURE__ */
|
|
378
|
+
/* @__PURE__ */ s("div", {
|
|
380
379
|
class: "ck-card-head",
|
|
381
380
|
style: { position: "relative" },
|
|
382
381
|
children: [
|
|
383
|
-
|
|
382
|
+
w ? /* @__PURE__ */ s("button", {
|
|
384
383
|
class: "ck-ghost ck-back",
|
|
385
384
|
"aria-label": u("backToList"),
|
|
386
385
|
title: u("backToList"),
|
|
387
|
-
onClick:
|
|
388
|
-
children: /* @__PURE__ */
|
|
386
|
+
onClick: w.onBack,
|
|
387
|
+
children: /* @__PURE__ */ s(x, {
|
|
389
388
|
name: "chevron",
|
|
390
389
|
size: 16
|
|
391
390
|
})
|
|
392
391
|
}) : null,
|
|
393
|
-
/* @__PURE__ */
|
|
392
|
+
/* @__PURE__ */ s("span", {
|
|
394
393
|
class: "ck-card-title",
|
|
395
|
-
ref:
|
|
394
|
+
ref: Ie,
|
|
396
395
|
tabIndex: -1,
|
|
397
396
|
children: yt
|
|
398
397
|
}),
|
|
399
|
-
/* @__PURE__ */
|
|
400
|
-
|
|
398
|
+
/* @__PURE__ */ s(ve, { status: D.status }),
|
|
399
|
+
w?.position ? /* @__PURE__ */ s("span", {
|
|
401
400
|
class: "ck-muted ck-card-pos",
|
|
402
401
|
children: u("countOf", {
|
|
403
|
-
n:
|
|
404
|
-
total:
|
|
402
|
+
n: w.position.n,
|
|
403
|
+
total: w.position.total
|
|
405
404
|
})
|
|
406
405
|
}) : null,
|
|
407
|
-
|
|
406
|
+
w?.onPrev ? /* @__PURE__ */ s("button", {
|
|
408
407
|
class: "ck-ghost ck-step",
|
|
409
408
|
"aria-label": u("previousThread"),
|
|
410
409
|
title: `${u("previousThread")} (K)`,
|
|
411
410
|
"aria-keyshortcuts": "K",
|
|
412
|
-
onClick:
|
|
413
|
-
children: /* @__PURE__ */
|
|
411
|
+
onClick: w.onPrev,
|
|
412
|
+
children: /* @__PURE__ */ s(x, {
|
|
414
413
|
name: "chevron",
|
|
415
414
|
size: 15
|
|
416
415
|
})
|
|
417
416
|
}) : null,
|
|
418
|
-
|
|
417
|
+
w?.onNext ? /* @__PURE__ */ s("button", {
|
|
419
418
|
class: "ck-ghost ck-step",
|
|
420
419
|
"data-dir": "next",
|
|
421
420
|
"aria-label": u("nextThread"),
|
|
422
421
|
title: `${u("nextThread")} (J)`,
|
|
423
422
|
"aria-keyshortcuts": "J",
|
|
424
|
-
onClick:
|
|
425
|
-
children: /* @__PURE__ */
|
|
423
|
+
onClick: w.onNext,
|
|
424
|
+
children: /* @__PURE__ */ s(x, {
|
|
426
425
|
name: "chevron",
|
|
427
426
|
size: 15
|
|
428
427
|
})
|
|
429
428
|
}) : null,
|
|
430
|
-
/* @__PURE__ */
|
|
429
|
+
/* @__PURE__ */ s("button", {
|
|
431
430
|
class: "ck-ghost",
|
|
432
431
|
"aria-label": u("more"),
|
|
433
432
|
"aria-haspopup": "menu",
|
|
434
433
|
"aria-expanded": Ze,
|
|
435
434
|
onClick: () => Qe(!Ze),
|
|
436
|
-
children: /* @__PURE__ */
|
|
435
|
+
children: /* @__PURE__ */ s(x, { name: "more" })
|
|
437
436
|
}),
|
|
438
|
-
|
|
437
|
+
w ? null : /* @__PURE__ */ s("button", {
|
|
439
438
|
class: "ck-ghost",
|
|
440
439
|
"aria-label": u("close"),
|
|
441
|
-
onClick:
|
|
442
|
-
children: /* @__PURE__ */
|
|
440
|
+
onClick: y,
|
|
441
|
+
children: /* @__PURE__ */ s(x, { name: "close" })
|
|
443
442
|
}),
|
|
444
|
-
Ze ? /* @__PURE__ */
|
|
443
|
+
Ze ? /* @__PURE__ */ s("div", {
|
|
445
444
|
class: "ck-menu",
|
|
446
445
|
role: "menu",
|
|
447
446
|
onClick: () => Qe(!1),
|
|
448
|
-
onKeyDown: (e) => e.key === "Escape" ? (e.stopPropagation(), Qe(!1)) :
|
|
447
|
+
onKeyDown: (e) => e.key === "Escape" ? (e.stopPropagation(), Qe(!1)) : Se(e, "[role=menuitem]", !0),
|
|
449
448
|
children: [
|
|
450
|
-
|
|
449
|
+
w ? /* @__PURE__ */ s("button", {
|
|
451
450
|
role: "menuitem",
|
|
452
|
-
onClick: () =>
|
|
451
|
+
onClick: () => w.onShow(D),
|
|
453
452
|
children: u("showOnPage")
|
|
454
453
|
}) : null,
|
|
455
|
-
kt ? /* @__PURE__ */
|
|
454
|
+
kt ? /* @__PURE__ */ s("button", {
|
|
456
455
|
role: "menuitem",
|
|
457
456
|
onClick: () => void Ot(kt, u("copied")),
|
|
458
457
|
children: u("copyLink")
|
|
459
458
|
}) : null,
|
|
460
|
-
X?.export_for_agents ? /* @__PURE__ */
|
|
459
|
+
X?.export_for_agents ? /* @__PURE__ */ s("button", {
|
|
461
460
|
role: "menuitem",
|
|
462
|
-
onClick: () => void Ot(
|
|
461
|
+
onClick: () => void Ot(f(D, k), u("copiedForAgent")),
|
|
463
462
|
children: u("copyForAgent")
|
|
464
463
|
}) : null,
|
|
465
|
-
X?.set_any_status && Z ? /* @__PURE__ */
|
|
466
|
-
/* @__PURE__ */
|
|
464
|
+
X?.set_any_status && Z ? /* @__PURE__ */ s(n, { children: [
|
|
465
|
+
/* @__PURE__ */ s("button", {
|
|
467
466
|
role: "menuitem",
|
|
468
467
|
onClick: () => void Q("in_progress"),
|
|
469
468
|
children: u("markInProgress")
|
|
470
469
|
}),
|
|
471
|
-
/* @__PURE__ */
|
|
470
|
+
/* @__PURE__ */ s("button", {
|
|
472
471
|
role: "menuitem",
|
|
473
472
|
onClick: () => void Q("in_review"),
|
|
474
473
|
children: u("markInReview")
|
|
475
474
|
}),
|
|
476
|
-
/* @__PURE__ */
|
|
475
|
+
/* @__PURE__ */ s("button", {
|
|
477
476
|
role: "menuitem",
|
|
478
477
|
onClick: () => void Q("closed"),
|
|
479
478
|
children: u("closeThread")
|
|
480
479
|
})
|
|
481
480
|
] }) : null,
|
|
482
|
-
/* @__PURE__ */
|
|
481
|
+
/* @__PURE__ */ s("button", {
|
|
483
482
|
role: "menuitem",
|
|
484
483
|
onClick: () => void xt(),
|
|
485
|
-
children: u(
|
|
484
|
+
children: u(ct ? "mute" : "unmute")
|
|
486
485
|
}),
|
|
487
|
-
Z && (X?.manage || gt &&
|
|
486
|
+
Z && (X?.manage || gt && D.message_count <= 1) ? /* @__PURE__ */ s("button", {
|
|
488
487
|
role: "menuitem",
|
|
489
488
|
class: "ck-danger",
|
|
490
489
|
onClick: Dt,
|
|
@@ -494,166 +493,166 @@ function w({ client: r, threadId: v, version: y = 0, onClose: b, onError: C, not
|
|
|
494
493
|
}) : null
|
|
495
494
|
]
|
|
496
495
|
}),
|
|
497
|
-
/* @__PURE__ */
|
|
498
|
-
client:
|
|
499
|
-
thread:
|
|
496
|
+
/* @__PURE__ */ s(pe, {
|
|
497
|
+
client: i,
|
|
498
|
+
thread: D,
|
|
500
499
|
editable: !!X?.triage && Z,
|
|
501
|
-
onChange: (e) => K.current === e.id &&
|
|
500
|
+
onChange: (e) => K.current === e.id && O(e),
|
|
502
501
|
onError: bt
|
|
503
502
|
}),
|
|
504
|
-
/* @__PURE__ */
|
|
503
|
+
/* @__PURE__ */ s("div", {
|
|
505
504
|
class: "ck-card-body",
|
|
506
|
-
ref:
|
|
505
|
+
ref: ut,
|
|
507
506
|
onScroll: (e) => {
|
|
508
507
|
let t = e.currentTarget;
|
|
509
|
-
|
|
508
|
+
V(t.scrollHeight - t.scrollTop - t.clientHeight > 120), G(null);
|
|
510
509
|
},
|
|
511
510
|
onMouseOver: (e) => {
|
|
512
511
|
let t = e.target.closest?.(".ck-mention");
|
|
513
|
-
if (!t) return
|
|
514
|
-
let n = t.textContent?.replace(/^@/, "") ?? "", r =
|
|
512
|
+
if (!t) return G(null);
|
|
513
|
+
let n = t.textContent?.replace(/^@/, "") ?? "", r = U.find((e) => e.name === n) ?? U.find((e) => n.startsWith(e.name));
|
|
515
514
|
if (!r) return;
|
|
516
515
|
let i = t.getBoundingClientRect();
|
|
517
|
-
|
|
516
|
+
G({
|
|
518
517
|
person: r,
|
|
519
518
|
x: i.left,
|
|
520
519
|
y: i.bottom + 6
|
|
521
520
|
});
|
|
522
521
|
},
|
|
523
|
-
onMouseLeave: () =>
|
|
522
|
+
onMouseLeave: () => G(null),
|
|
524
523
|
children: [
|
|
525
|
-
Y?.state === "detached" ? /* @__PURE__ */
|
|
524
|
+
Y?.state === "detached" ? /* @__PURE__ */ s("div", {
|
|
526
525
|
class: "ck-note",
|
|
527
526
|
"data-tone": "warning",
|
|
528
527
|
children: u("detached")
|
|
529
528
|
}) : null,
|
|
530
|
-
Y?.state === "moved" ? /* @__PURE__ */
|
|
529
|
+
Y?.state === "moved" ? /* @__PURE__ */ s("p", {
|
|
531
530
|
class: "ck-muted",
|
|
532
531
|
children: u("moved")
|
|
533
532
|
}) : null,
|
|
534
|
-
|
|
533
|
+
me(D) ? /* @__PURE__ */ s("p", {
|
|
535
534
|
class: "ck-muted",
|
|
536
|
-
title: `${
|
|
537
|
-
children: u(`screen_${we(
|
|
535
|
+
title: `${D.breakpoint}px`,
|
|
536
|
+
children: u(`screen_${we(D.breakpoint)}`)
|
|
538
537
|
}) : null,
|
|
539
|
-
|
|
538
|
+
D.page.branch && i.options.branch ? /* @__PURE__ */ s("p", {
|
|
540
539
|
class: "ck-muted ck-build",
|
|
541
540
|
children: u("leftOnBranch", {
|
|
542
|
-
branch:
|
|
543
|
-
commit:
|
|
541
|
+
branch: D.page.branch,
|
|
542
|
+
commit: D.page.commit_sha ? ` @ ${D.page.commit_sha.slice(0, 7)}` : ""
|
|
544
543
|
})
|
|
545
544
|
}) : null,
|
|
546
|
-
|
|
545
|
+
D.anchor.quote ? /* @__PURE__ */ s("blockquote", {
|
|
547
546
|
class: "ck-quote",
|
|
548
547
|
"aria-label": u("quotedText"),
|
|
549
|
-
children: /* @__PURE__ */
|
|
548
|
+
children: /* @__PURE__ */ s("bdi", { children: D.anchor.quote })
|
|
550
549
|
}) : null,
|
|
551
|
-
|
|
550
|
+
D.description?.trim() ? /* @__PURE__ */ s("details", {
|
|
552
551
|
class: "ck-description",
|
|
553
|
-
open:
|
|
554
|
-
children: [/* @__PURE__ */
|
|
552
|
+
open: D.description.length <= 280,
|
|
553
|
+
children: [/* @__PURE__ */ s("summary", { children: u("description") }), /* @__PURE__ */ s("p", { children: /* @__PURE__ */ s("bdi", { children: D.description }) })]
|
|
555
554
|
}) : null,
|
|
556
|
-
/* @__PURE__ */
|
|
557
|
-
client:
|
|
558
|
-
thread:
|
|
555
|
+
/* @__PURE__ */ s(fe, {
|
|
556
|
+
client: i,
|
|
557
|
+
thread: D,
|
|
559
558
|
editable: Z && (!!X?.triage || !!gt),
|
|
560
|
-
onChange: (e) => K.current === e.id &&
|
|
561
|
-
onError:
|
|
559
|
+
onChange: (e) => K.current === e.id && O(e),
|
|
560
|
+
onError: S
|
|
562
561
|
}),
|
|
563
|
-
|
|
564
|
-
thread:
|
|
562
|
+
D.style_changes?.length ? /* @__PURE__ */ s(De, {
|
|
563
|
+
thread: D,
|
|
565
564
|
element: Y?.state === "detached" ? null : Y?.element ?? null,
|
|
566
565
|
editable: Z && (!!X?.triage || !!gt),
|
|
567
|
-
client:
|
|
568
|
-
onChange: (e) => K.current === e.id &&
|
|
566
|
+
client: i,
|
|
567
|
+
onChange: (e) => K.current === e.id && O(e),
|
|
569
568
|
onError: bt
|
|
570
569
|
}) : null,
|
|
571
|
-
/* @__PURE__ */
|
|
570
|
+
/* @__PURE__ */ s("div", {
|
|
572
571
|
class: "ck-details",
|
|
573
|
-
children: [/* @__PURE__ */
|
|
572
|
+
children: [/* @__PURE__ */ s("button", {
|
|
574
573
|
class: "ck-details-toggle",
|
|
575
|
-
"aria-expanded":
|
|
574
|
+
"aria-expanded": et,
|
|
576
575
|
"aria-controls": "ck-details",
|
|
577
|
-
onClick: () =>
|
|
576
|
+
onClick: () => tt(!et),
|
|
578
577
|
children: u("details")
|
|
579
|
-
}),
|
|
578
|
+
}), et ? /* @__PURE__ */ s("dl", {
|
|
580
579
|
id: "ck-details",
|
|
581
|
-
children: Ft.map(([e, t]) => /* @__PURE__ */
|
|
580
|
+
children: Ft.map(([e, t]) => /* @__PURE__ */ s("div", { children: [/* @__PURE__ */ s("dt", { children: e }), /* @__PURE__ */ s("dd", { children: t })] }))
|
|
582
581
|
}) : null]
|
|
583
582
|
}),
|
|
584
|
-
|
|
583
|
+
D.status === "in_review" && !X?.set_any_status && Z ? /* @__PURE__ */ s("div", {
|
|
585
584
|
class: "ck-review-ask",
|
|
586
|
-
children: [/* @__PURE__ */
|
|
585
|
+
children: [/* @__PURE__ */ s("div", { children: u("reviewAsk") }), /* @__PURE__ */ s("div", {
|
|
587
586
|
class: "ck-actions",
|
|
588
|
-
children: [/* @__PURE__ */
|
|
587
|
+
children: [/* @__PURE__ */ s("button", {
|
|
589
588
|
class: "ck-btn ck-primary",
|
|
590
589
|
onClick: () => void Q("resolved"),
|
|
591
590
|
children: [
|
|
592
|
-
/* @__PURE__ */
|
|
591
|
+
/* @__PURE__ */ s(x, {
|
|
593
592
|
name: "check",
|
|
594
593
|
size: 14
|
|
595
594
|
}),
|
|
596
595
|
" ",
|
|
597
596
|
u("looksGood")
|
|
598
597
|
]
|
|
599
|
-
}), /* @__PURE__ */
|
|
598
|
+
}), /* @__PURE__ */ s("button", {
|
|
600
599
|
class: "ck-btn",
|
|
601
|
-
onClick: () =>
|
|
600
|
+
onClick: () => st(!0),
|
|
602
601
|
children: u("notYet")
|
|
603
602
|
})]
|
|
604
603
|
})]
|
|
605
604
|
}) : null,
|
|
606
|
-
|
|
607
|
-
let
|
|
608
|
-
return /* @__PURE__ */
|
|
605
|
+
k.map((e, t) => {
|
|
606
|
+
let a = Ee(e.author, T), o = t === 0;
|
|
607
|
+
return /* @__PURE__ */ s("div", {
|
|
609
608
|
class: "ck-msg",
|
|
610
609
|
id: `ck-msg-${e.id}`,
|
|
611
|
-
"data-mine":
|
|
612
|
-
"data-reply": !
|
|
613
|
-
"data-new": !
|
|
614
|
-
children: [/* @__PURE__ */
|
|
610
|
+
"data-mine": a || void 0,
|
|
611
|
+
"data-reply": !o || void 0,
|
|
612
|
+
"data-new": !at.current.has(e.id) || void 0,
|
|
613
|
+
children: [/* @__PURE__ */ s(xe, { person: e.author }), /* @__PURE__ */ s("div", {
|
|
615
614
|
class: "ck-msg-main",
|
|
616
615
|
children: [
|
|
617
|
-
/* @__PURE__ */
|
|
616
|
+
/* @__PURE__ */ s("div", {
|
|
618
617
|
class: "ck-msg-meta",
|
|
619
618
|
children: [
|
|
620
|
-
/* @__PURE__ */
|
|
619
|
+
/* @__PURE__ */ s("bdi", {
|
|
621
620
|
class: "ck-msg-name",
|
|
622
621
|
children: e.author.name
|
|
623
622
|
}),
|
|
624
|
-
/* @__PURE__ */
|
|
623
|
+
/* @__PURE__ */ s("time", {
|
|
625
624
|
dateTime: e.created_at,
|
|
626
625
|
title: l(e.created_at),
|
|
627
|
-
children:
|
|
626
|
+
children: r(e.created_at)
|
|
628
627
|
}),
|
|
629
|
-
e.edited_at ? /* @__PURE__ */
|
|
628
|
+
e.edited_at ? /* @__PURE__ */ s("span", {
|
|
630
629
|
title: l(e.edited_at),
|
|
631
630
|
children: ["· ", u("edited")]
|
|
632
631
|
}) : null,
|
|
633
|
-
L?.id === e.id ? null : /* @__PURE__ */
|
|
632
|
+
L?.id === e.id ? null : /* @__PURE__ */ s("span", {
|
|
634
633
|
class: "ck-msg-actions",
|
|
635
634
|
children: [
|
|
636
|
-
Z ? /* @__PURE__ */
|
|
635
|
+
Z ? /* @__PURE__ */ s("button", {
|
|
637
636
|
class: "ck-ghost ck-ghost-sm",
|
|
638
637
|
"aria-label": u("replyTo", { name: e.author.name }),
|
|
639
638
|
title: u("quoteReply"),
|
|
640
|
-
onClick: () =>
|
|
641
|
-
children: /* @__PURE__ */
|
|
639
|
+
onClick: () => B(e),
|
|
640
|
+
children: /* @__PURE__ */ s(x, {
|
|
642
641
|
name: "reply",
|
|
643
642
|
size: 14
|
|
644
643
|
})
|
|
645
644
|
}) : null,
|
|
646
|
-
/* @__PURE__ */
|
|
645
|
+
/* @__PURE__ */ s("button", {
|
|
647
646
|
class: "ck-ghost ck-ghost-sm",
|
|
648
647
|
"aria-label": u("copyText"),
|
|
649
648
|
title: u("copyText"),
|
|
650
649
|
onClick: () => void Ot(e.body, u("copiedText")),
|
|
651
|
-
children: /* @__PURE__ */
|
|
650
|
+
children: /* @__PURE__ */ s(x, {
|
|
652
651
|
name: "copy",
|
|
653
652
|
size: 14
|
|
654
653
|
})
|
|
655
654
|
}),
|
|
656
|
-
Z &&
|
|
655
|
+
Z && a ? /* @__PURE__ */ s("button", {
|
|
657
656
|
class: "ck-ghost ck-ghost-sm",
|
|
658
657
|
onClick: () => R({
|
|
659
658
|
id: e.id,
|
|
@@ -661,7 +660,7 @@ function w({ client: r, threadId: v, version: y = 0, onClose: b, onError: C, not
|
|
|
661
660
|
}),
|
|
662
661
|
children: u("edit")
|
|
663
662
|
}) : null,
|
|
664
|
-
Z && (
|
|
663
|
+
Z && (a || X?.manage) && !o ? /* @__PURE__ */ s("button", {
|
|
665
664
|
class: "ck-ghost ck-ghost-sm ck-danger",
|
|
666
665
|
onClick: () => Et(e),
|
|
667
666
|
children: u("delete")
|
|
@@ -670,169 +669,175 @@ function w({ client: r, threadId: v, version: y = 0, onClose: b, onError: C, not
|
|
|
670
669
|
})
|
|
671
670
|
]
|
|
672
671
|
}),
|
|
673
|
-
e.reply_to ? /* @__PURE__ */
|
|
672
|
+
e.reply_to ? /* @__PURE__ */ s("button", {
|
|
674
673
|
class: "ck-quote ck-quote-msg",
|
|
675
674
|
onClick: () => document.querySelector("[data-commentkit-host]")?.shadowRoot?.getElementById(`ck-msg-${e.reply_to.id}`)?.scrollIntoView({
|
|
676
675
|
block: "center",
|
|
677
|
-
behavior:
|
|
676
|
+
behavior: je() ? "auto" : "smooth"
|
|
678
677
|
}),
|
|
679
678
|
children: [
|
|
680
|
-
/* @__PURE__ */
|
|
679
|
+
/* @__PURE__ */ s("strong", { children: /* @__PURE__ */ s("bdi", { children: e.reply_to.author.name }) }),
|
|
681
680
|
" ",
|
|
682
|
-
/* @__PURE__ */
|
|
681
|
+
/* @__PURE__ */ s("bdi", { children: e.reply_to.excerpt })
|
|
683
682
|
]
|
|
684
683
|
}) : null,
|
|
685
|
-
L?.id === e.id ? /* @__PURE__ */
|
|
686
|
-
class: "ck-textarea",
|
|
687
|
-
"aria-label": u("edit"),
|
|
688
|
-
value: L.body,
|
|
689
|
-
disabled: F,
|
|
690
|
-
onInput: (t) => R({
|
|
691
|
-
id: e.id,
|
|
692
|
-
body: t.target.value
|
|
693
|
-
}),
|
|
684
|
+
L?.id === e.id ? /* @__PURE__ */ s("div", { children: [/* @__PURE__ */ s("div", {
|
|
694
685
|
onKeyDown: (e) => {
|
|
695
|
-
e.
|
|
696
|
-
}
|
|
697
|
-
|
|
686
|
+
e.key === "Escape" && (e.stopPropagation(), R(null));
|
|
687
|
+
},
|
|
688
|
+
children: /* @__PURE__ */ s(se, {
|
|
689
|
+
client: i,
|
|
690
|
+
value: L.body,
|
|
691
|
+
onChange: (t) => R({
|
|
692
|
+
id: e.id,
|
|
693
|
+
body: t
|
|
694
|
+
}),
|
|
695
|
+
onMentions: () => void 0,
|
|
696
|
+
onSubmit: St,
|
|
697
|
+
placeholder: u("edit"),
|
|
698
|
+
autofocus: !0,
|
|
699
|
+
disabled: F,
|
|
700
|
+
canMention: !0
|
|
701
|
+
})
|
|
702
|
+
}), /* @__PURE__ */ s("div", {
|
|
698
703
|
class: "ck-actions",
|
|
699
|
-
children: [/* @__PURE__ */
|
|
704
|
+
children: [/* @__PURE__ */ s("button", {
|
|
700
705
|
class: "ck-btn",
|
|
701
706
|
onClick: () => R(null),
|
|
702
707
|
children: u("cancel")
|
|
703
|
-
}), /* @__PURE__ */
|
|
708
|
+
}), /* @__PURE__ */ s("button", {
|
|
704
709
|
class: "ck-btn ck-primary",
|
|
705
710
|
disabled: F || !L.body.trim(),
|
|
706
711
|
onClick: St,
|
|
707
712
|
children: u(F ? "saving" : "save")
|
|
708
713
|
})]
|
|
709
|
-
})] }) : /* @__PURE__ */
|
|
714
|
+
})] }) : /* @__PURE__ */ s("div", {
|
|
710
715
|
class: "ck-msg-body",
|
|
711
716
|
dir: "auto",
|
|
712
|
-
children: /* @__PURE__ */
|
|
717
|
+
children: /* @__PURE__ */ s(ye, {
|
|
713
718
|
text: e.body,
|
|
714
|
-
people:
|
|
719
|
+
people: it
|
|
715
720
|
})
|
|
716
721
|
}),
|
|
717
|
-
L?.id === e.id ? null : /* @__PURE__ */
|
|
718
|
-
client:
|
|
722
|
+
L?.id === e.id ? null : /* @__PURE__ */ s(Ne, {
|
|
723
|
+
client: i,
|
|
719
724
|
text: e.body
|
|
720
725
|
}),
|
|
721
726
|
(() => {
|
|
722
|
-
let t = (e.attachments ?? []).filter((e) => e.kind !== "screenshot"),
|
|
727
|
+
let t = (e.attachments ?? []).filter((e) => e.kind !== "screenshot"), r = [...o && At ? [{
|
|
723
728
|
src: jt ?? At,
|
|
724
729
|
name: u("screenshot"),
|
|
725
730
|
href: jt
|
|
726
|
-
}] : [], ...t.filter(
|
|
727
|
-
src:
|
|
731
|
+
}] : [], ...t.filter(Me).map((e) => ({
|
|
732
|
+
src: b(e.url, "image") ?? b(e.thumbnail_url, "image"),
|
|
728
733
|
name: e.name,
|
|
729
|
-
href:
|
|
730
|
-
}))],
|
|
731
|
-
return /* @__PURE__ */
|
|
734
|
+
href: b(e.url)
|
|
735
|
+
}))], i = [...o && At ? [At] : [], ...t.filter(Me).map((e) => b(e.thumbnail_url, "image") ?? b(e.url, "image"))], a = t.filter((e) => !Me(e));
|
|
736
|
+
return /* @__PURE__ */ s(n, { children: [i.length === 1 ? /* @__PURE__ */ s("button", {
|
|
732
737
|
class: "ck-shot",
|
|
733
|
-
"aria-label": u("openImage", { name:
|
|
734
|
-
onClick: () => We(
|
|
735
|
-
children: /* @__PURE__ */
|
|
736
|
-
src:
|
|
737
|
-
alt:
|
|
738
|
+
"aria-label": u("openImage", { name: r[0].name }),
|
|
739
|
+
onClick: () => We(r, 0),
|
|
740
|
+
children: /* @__PURE__ */ s("img", {
|
|
741
|
+
src: i[0],
|
|
742
|
+
alt: r[0].name,
|
|
738
743
|
loading: "lazy",
|
|
739
744
|
onLoad: ft
|
|
740
745
|
})
|
|
741
|
-
}) :
|
|
746
|
+
}) : i.length ? /* @__PURE__ */ s("div", {
|
|
742
747
|
class: "ck-grid",
|
|
743
|
-
"data-count": Math.min(
|
|
744
|
-
children:
|
|
748
|
+
"data-count": Math.min(i.length, 4),
|
|
749
|
+
children: i.slice(0, 4).map((e, t) => /* @__PURE__ */ s("button", {
|
|
745
750
|
class: "ck-grid-item",
|
|
746
|
-
"aria-label": u("openImage", { name:
|
|
747
|
-
onClick: () => We(
|
|
748
|
-
children: [/* @__PURE__ */
|
|
751
|
+
"aria-label": u("openImage", { name: r[t].name }),
|
|
752
|
+
onClick: () => We(r, t),
|
|
753
|
+
children: [/* @__PURE__ */ s("img", {
|
|
749
754
|
src: e,
|
|
750
|
-
alt:
|
|
755
|
+
alt: r[t].name,
|
|
751
756
|
loading: "lazy",
|
|
752
757
|
onLoad: ft
|
|
753
|
-
}), t === 3 &&
|
|
758
|
+
}), t === 3 && i.length > 4 ? /* @__PURE__ */ s("span", {
|
|
754
759
|
class: "ck-grid-more",
|
|
755
760
|
"aria-hidden": "true",
|
|
756
|
-
children: ["+",
|
|
761
|
+
children: ["+", i.length - 4]
|
|
757
762
|
}) : null]
|
|
758
763
|
}))
|
|
759
|
-
}) : null,
|
|
764
|
+
}) : null, a.length ? /* @__PURE__ */ s("div", {
|
|
760
765
|
class: "ck-files",
|
|
761
|
-
children:
|
|
762
|
-
let t =
|
|
763
|
-
return t ? /* @__PURE__ */
|
|
766
|
+
children: a.map((e) => {
|
|
767
|
+
let t = b(e.url);
|
|
768
|
+
return t ? /* @__PURE__ */ s("a", {
|
|
764
769
|
class: "ck-file",
|
|
765
770
|
href: t,
|
|
766
771
|
target: "_blank",
|
|
767
772
|
rel: "noopener noreferrer",
|
|
768
|
-
children: /* @__PURE__ */
|
|
769
|
-
}) : /* @__PURE__ */
|
|
773
|
+
children: /* @__PURE__ */ s("bdi", { children: e.name })
|
|
774
|
+
}) : /* @__PURE__ */ s("span", {
|
|
770
775
|
class: "ck-file",
|
|
771
|
-
children: /* @__PURE__ */
|
|
776
|
+
children: /* @__PURE__ */ s("bdi", { children: e.name })
|
|
772
777
|
});
|
|
773
778
|
})
|
|
774
779
|
}) : null] });
|
|
775
780
|
})(),
|
|
776
|
-
/* @__PURE__ */
|
|
781
|
+
/* @__PURE__ */ s("div", {
|
|
777
782
|
class: "ck-reactions",
|
|
778
783
|
children: [
|
|
779
784
|
(e.reactions ?? []).map((t) => {
|
|
780
|
-
let n = `${
|
|
781
|
-
return /* @__PURE__ */
|
|
785
|
+
let n = `${ee("reactionLabel", t.count, { emoji: t.emoji })}${t.mine ? `, ${u("youReacted")}` : ""}`;
|
|
786
|
+
return /* @__PURE__ */ s("button", {
|
|
782
787
|
class: "ck-reaction",
|
|
783
788
|
"aria-pressed": t.mine,
|
|
784
789
|
"aria-label": n,
|
|
785
790
|
title: n,
|
|
786
791
|
onClick: () => void wt(e, t.emoji),
|
|
787
792
|
children: [
|
|
788
|
-
/* @__PURE__ */
|
|
793
|
+
/* @__PURE__ */ s(Ce, { char: t.emoji }),
|
|
789
794
|
" ",
|
|
790
795
|
t.count
|
|
791
796
|
]
|
|
792
797
|
});
|
|
793
798
|
}),
|
|
794
|
-
Z &&
|
|
799
|
+
Z && Oe.filter((t) => !(e.reactions ?? []).some((e) => e.emoji === t)).slice(0, 3).map((t) => /* @__PURE__ */ s("button", {
|
|
795
800
|
class: "ck-reaction ck-reaction-add",
|
|
796
801
|
"aria-label": u("reactWith", { emoji: t }),
|
|
797
802
|
title: u("reactWith", { emoji: t }),
|
|
798
803
|
onClick: () => void wt(e, t),
|
|
799
|
-
children: /* @__PURE__ */
|
|
804
|
+
children: /* @__PURE__ */ s(Ce, { char: t })
|
|
800
805
|
})),
|
|
801
|
-
Z ? /* @__PURE__ */
|
|
806
|
+
Z ? /* @__PURE__ */ s("span", {
|
|
802
807
|
class: "ck-picker-wrap",
|
|
803
|
-
children: [/* @__PURE__ */
|
|
808
|
+
children: [/* @__PURE__ */ s("button", {
|
|
804
809
|
class: "ck-reaction ck-reaction-more",
|
|
805
810
|
"aria-label": u("moreReactions"),
|
|
806
811
|
title: u("moreReactions"),
|
|
807
|
-
"aria-expanded":
|
|
812
|
+
"aria-expanded": H === e.id,
|
|
808
813
|
"aria-haspopup": "true",
|
|
809
|
-
onClick: () =>
|
|
810
|
-
children: /* @__PURE__ */
|
|
814
|
+
onClick: () => nt(H === e.id ? null : e.id),
|
|
815
|
+
children: /* @__PURE__ */ s(x, {
|
|
811
816
|
name: "smile",
|
|
812
817
|
size: 14
|
|
813
818
|
})
|
|
814
|
-
}),
|
|
819
|
+
}), H === e.id ? /* @__PURE__ */ s("div", {
|
|
815
820
|
class: "ck-picker",
|
|
816
821
|
role: "group",
|
|
817
822
|
"aria-label": u("moreReactions"),
|
|
818
|
-
ref:
|
|
823
|
+
ref: ge,
|
|
819
824
|
onKeyDown: (e) => {
|
|
820
|
-
e.key === "Escape" ? (e.stopPropagation(),
|
|
825
|
+
e.key === "Escape" ? (e.stopPropagation(), nt(null)) : Se(e, "button", !1);
|
|
821
826
|
},
|
|
822
|
-
children:
|
|
827
|
+
children: h.map((t) => {
|
|
823
828
|
let n = (e.reactions ?? []).some((e) => e.emoji === t && e.mine);
|
|
824
|
-
return /* @__PURE__ */
|
|
829
|
+
return /* @__PURE__ */ s("button", {
|
|
825
830
|
"aria-pressed": n,
|
|
826
831
|
"aria-label": u("reactWith", { emoji: t }),
|
|
827
|
-
onClick: () => (
|
|
828
|
-
children: /* @__PURE__ */
|
|
832
|
+
onClick: () => (nt(null), void wt(e, t)),
|
|
833
|
+
children: /* @__PURE__ */ s(Ce, { char: t })
|
|
829
834
|
});
|
|
830
835
|
})
|
|
831
836
|
}) : null]
|
|
832
837
|
}) : null
|
|
833
838
|
]
|
|
834
839
|
}),
|
|
835
|
-
|
|
840
|
+
o && k.length === 1 ? /* @__PURE__ */ s("p", {
|
|
836
841
|
class: "ck-muted ck-no-replies",
|
|
837
842
|
children: u("noReplies")
|
|
838
843
|
}) : null
|
|
@@ -842,36 +847,36 @@ function w({ client: r, threadId: v, version: y = 0, onClose: b, onError: C, not
|
|
|
842
847
|
})
|
|
843
848
|
]
|
|
844
849
|
}),
|
|
845
|
-
/* @__PURE__ */
|
|
850
|
+
/* @__PURE__ */ s("div", {
|
|
846
851
|
class: "ck-card-foot",
|
|
847
852
|
style: {
|
|
848
853
|
flexDirection: "column",
|
|
849
854
|
alignItems: "stretch",
|
|
850
855
|
position: "relative"
|
|
851
856
|
},
|
|
852
|
-
...Z && ht ?
|
|
853
|
-
children: [
|
|
857
|
+
...Z && ht ? ne(Tt) : {},
|
|
858
|
+
children: [$e ? /* @__PURE__ */ s("button", {
|
|
854
859
|
class: "ck-chip ck-jump",
|
|
855
|
-
onClick: () => (
|
|
856
|
-
children: [/* @__PURE__ */
|
|
860
|
+
onClick: () => (V(!1), dt(!0)),
|
|
861
|
+
children: [/* @__PURE__ */ s(x, {
|
|
857
862
|
name: "down",
|
|
858
863
|
size: 14
|
|
859
864
|
}), u("jumpToLatest")]
|
|
860
|
-
}) : null, Z ? /* @__PURE__ */
|
|
861
|
-
|
|
865
|
+
}) : null, Z ? /* @__PURE__ */ s(n, { children: [
|
|
866
|
+
Fe ? null : /* @__PURE__ */ s("div", {
|
|
862
867
|
class: "ck-note",
|
|
863
868
|
"data-tone": "warning",
|
|
864
869
|
role: "status",
|
|
865
870
|
children: u("offline")
|
|
866
871
|
}),
|
|
867
|
-
Ye &&
|
|
872
|
+
Ye && Fe ? /* @__PURE__ */ s("div", {
|
|
868
873
|
class: "ck-note",
|
|
869
874
|
"data-tone": "warning",
|
|
870
875
|
role: "alert",
|
|
871
|
-
children: Ye === !0 ? /* @__PURE__ */
|
|
876
|
+
children: Ye === !0 ? /* @__PURE__ */ s(n, { children: [
|
|
872
877
|
u("replyFailed"),
|
|
873
878
|
" ",
|
|
874
|
-
/* @__PURE__ */
|
|
879
|
+
/* @__PURE__ */ s("button", {
|
|
875
880
|
class: "ck-btn",
|
|
876
881
|
disabled: F,
|
|
877
882
|
onClick: () => void Ct(),
|
|
@@ -879,34 +884,34 @@ function w({ client: r, threadId: v, version: y = 0, onClose: b, onError: C, not
|
|
|
879
884
|
})
|
|
880
885
|
] }) : Ye
|
|
881
886
|
}) : null,
|
|
882
|
-
/* @__PURE__ */
|
|
883
|
-
client:
|
|
887
|
+
/* @__PURE__ */ s(se, {
|
|
888
|
+
client: i,
|
|
884
889
|
value: N,
|
|
885
890
|
onChange: ze,
|
|
886
891
|
onMentions: qe,
|
|
887
892
|
onSubmit: () => void Ct(),
|
|
888
|
-
placeholder: u(
|
|
889
|
-
autofocus:
|
|
893
|
+
placeholder: u(ot ? "notYetPlaceholder" : Mt ? "replyToReopen" : "replyPlaceholder"),
|
|
894
|
+
autofocus: ot || !!z,
|
|
890
895
|
disabled: F,
|
|
891
896
|
canMention: !0,
|
|
892
|
-
above: z ? /* @__PURE__ */
|
|
897
|
+
above: z ? /* @__PURE__ */ s("div", {
|
|
893
898
|
class: "ck-quoting",
|
|
894
899
|
role: "status",
|
|
895
900
|
children: [
|
|
896
|
-
/* @__PURE__ */
|
|
901
|
+
/* @__PURE__ */ s(x, {
|
|
897
902
|
name: "reply",
|
|
898
903
|
size: 14
|
|
899
904
|
}),
|
|
900
|
-
/* @__PURE__ */
|
|
901
|
-
/* @__PURE__ */
|
|
905
|
+
/* @__PURE__ */ s("span", { children: [
|
|
906
|
+
/* @__PURE__ */ s("strong", { children: /* @__PURE__ */ s("bdi", { children: z.author.name }) }),
|
|
902
907
|
" ",
|
|
903
|
-
/* @__PURE__ */
|
|
908
|
+
/* @__PURE__ */ s("bdi", { children: z.body.slice(0, 140) })
|
|
904
909
|
] }),
|
|
905
|
-
/* @__PURE__ */
|
|
910
|
+
/* @__PURE__ */ s("button", {
|
|
906
911
|
class: "ck-ghost ck-ghost-sm",
|
|
907
912
|
"aria-label": u("quoteCancel"),
|
|
908
|
-
onClick: () =>
|
|
909
|
-
children: /* @__PURE__ */
|
|
913
|
+
onClick: () => B(null),
|
|
914
|
+
children: /* @__PURE__ */ s(x, {
|
|
910
915
|
name: "close",
|
|
911
916
|
size: 14
|
|
912
917
|
})
|
|
@@ -914,7 +919,7 @@ function w({ client: r, threadId: v, version: y = 0, onClose: b, onError: C, not
|
|
|
914
919
|
]
|
|
915
920
|
}) : null
|
|
916
921
|
}),
|
|
917
|
-
/* @__PURE__ */
|
|
922
|
+
/* @__PURE__ */ s(le, {
|
|
918
923
|
items: P.items,
|
|
919
924
|
onRemove: P.remove,
|
|
920
925
|
onRetry: P.retry,
|
|
@@ -923,25 +928,25 @@ function w({ client: r, threadId: v, version: y = 0, onClose: b, onError: C, not
|
|
|
923
928
|
name: e.file.name
|
|
924
929
|
})), e)
|
|
925
930
|
}),
|
|
926
|
-
/* @__PURE__ */
|
|
931
|
+
/* @__PURE__ */ s("div", {
|
|
927
932
|
class: "ck-actions",
|
|
928
933
|
style: { marginTop: 0 },
|
|
929
934
|
children: [
|
|
930
|
-
ht ? /* @__PURE__ */
|
|
935
|
+
ht ? /* @__PURE__ */ s(re, {
|
|
931
936
|
input: Ge,
|
|
932
937
|
onFiles: Tt
|
|
933
938
|
}) : null,
|
|
934
|
-
Mt ? /* @__PURE__ */
|
|
939
|
+
Mt ? /* @__PURE__ */ s("button", {
|
|
935
940
|
class: "ck-btn",
|
|
936
941
|
onClick: () => void Q("open"),
|
|
937
942
|
children: u("reopen")
|
|
938
|
-
}) : /* @__PURE__ */
|
|
943
|
+
}) : /* @__PURE__ */ s("button", {
|
|
939
944
|
class: "ck-btn",
|
|
940
945
|
title: u("resolveHint"),
|
|
941
|
-
"aria-keyshortcuts":
|
|
946
|
+
"aria-keyshortcuts": i.options.shortcuts === !1 ? void 0 : "E",
|
|
942
947
|
onClick: () => void Q("resolved"),
|
|
943
948
|
children: [
|
|
944
|
-
/* @__PURE__ */
|
|
949
|
+
/* @__PURE__ */ s(x, {
|
|
945
950
|
name: "check",
|
|
946
951
|
size: 14
|
|
947
952
|
}),
|
|
@@ -949,78 +954,77 @@ function w({ client: r, threadId: v, version: y = 0, onClose: b, onError: C, not
|
|
|
949
954
|
u("resolve")
|
|
950
955
|
]
|
|
951
956
|
}),
|
|
952
|
-
/* @__PURE__ */
|
|
953
|
-
/* @__PURE__ */
|
|
957
|
+
/* @__PURE__ */ s("span", { class: "ck-spacer" }),
|
|
958
|
+
/* @__PURE__ */ s("button", {
|
|
954
959
|
class: "ck-btn ck-primary",
|
|
955
|
-
disabled: F || !N.trim() || !
|
|
960
|
+
disabled: F || !N.trim() || !Fe,
|
|
956
961
|
onClick: () => void Ct(),
|
|
957
962
|
children: u(F ? "sending" : "reply")
|
|
958
963
|
})
|
|
959
964
|
]
|
|
960
965
|
})
|
|
961
|
-
] }) : /* @__PURE__ */
|
|
966
|
+
] }) : /* @__PURE__ */ s("div", {
|
|
962
967
|
class: "ck-note",
|
|
963
968
|
role: "status",
|
|
964
|
-
children: u(
|
|
969
|
+
children: u(Pe ? "readOnlyReply" : "noReplyAccess")
|
|
965
970
|
})]
|
|
966
971
|
}),
|
|
967
|
-
Be && He ? /* @__PURE__ */
|
|
972
|
+
Be && He ? /* @__PURE__ */ s(He, {
|
|
968
973
|
images: Be.images,
|
|
969
974
|
start: Be.start,
|
|
970
975
|
onClose: () => Ve(null)
|
|
971
976
|
}) : null,
|
|
972
|
-
|
|
977
|
+
W ? /* @__PURE__ */ s("div", {
|
|
973
978
|
class: "ck-mention-card",
|
|
974
979
|
style: {
|
|
975
|
-
left: `${Math.min(
|
|
976
|
-
top: `${
|
|
980
|
+
left: `${Math.min(W.x, innerWidth - 220)}px`,
|
|
981
|
+
top: `${W.y}px`
|
|
977
982
|
},
|
|
978
983
|
"aria-hidden": "true",
|
|
979
|
-
children: [/* @__PURE__ */
|
|
984
|
+
children: [/* @__PURE__ */ s(xe, { person: W.person }), /* @__PURE__ */ s("bdi", {
|
|
980
985
|
class: "ck-msg-name",
|
|
981
|
-
children:
|
|
986
|
+
children: W.person.name
|
|
982
987
|
})]
|
|
983
988
|
}) : null
|
|
984
989
|
]
|
|
985
990
|
});
|
|
986
991
|
}
|
|
987
|
-
var
|
|
988
|
-
function
|
|
992
|
+
var Ae = 6e3;
|
|
993
|
+
function je() {
|
|
989
994
|
return matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
990
995
|
}
|
|
991
|
-
function
|
|
992
|
-
return e.mime.startsWith("image/") && !!(
|
|
996
|
+
function Me(e) {
|
|
997
|
+
return e.mime.startsWith("image/") && !!(b(e.url, "image") || b(e.thumbnail_url, "image"));
|
|
993
998
|
}
|
|
994
|
-
function
|
|
995
|
-
let n =
|
|
999
|
+
function Ne({ client: e, text: t }) {
|
|
1000
|
+
let n = o(() => [...new Set([...t.matchAll(/https?:\/\/[^\s<>"')\u200b-\u200f\u202a-\u202e\u2060-\u2069\ufeff]+/g)].map((e) => b(e[0])).filter((e) => !!e))].slice(0, 2), [t]), [r, i] = c([]);
|
|
996
1001
|
return d(() => {
|
|
997
1002
|
let t = !0;
|
|
998
1003
|
return i([]), n.length && Promise.all(n.map((t) => e.linkPreview(t))).then((e) => t && i(e.filter((e) => !!e))), () => {
|
|
999
1004
|
t = !1;
|
|
1000
1005
|
};
|
|
1001
|
-
}, [n.join(" ")]), r.length ? /* @__PURE__ */
|
|
1006
|
+
}, [n.join(" ")]), r.length ? /* @__PURE__ */ s("div", {
|
|
1002
1007
|
class: "ck-previews",
|
|
1003
1008
|
children: r.map((e) => {
|
|
1004
|
-
let t =
|
|
1005
|
-
return t ? /* @__PURE__ */
|
|
1009
|
+
let t = b(e.url);
|
|
1010
|
+
return t ? /* @__PURE__ */ s("a", {
|
|
1006
1011
|
class: "ck-preview",
|
|
1007
1012
|
href: t,
|
|
1008
1013
|
target: "_blank",
|
|
1009
1014
|
rel: "noopener noreferrer nofollow ugc",
|
|
1010
1015
|
children: [
|
|
1011
|
-
/* @__PURE__ */
|
|
1016
|
+
/* @__PURE__ */ s("span", {
|
|
1012
1017
|
class: "ck-preview-site",
|
|
1013
|
-
children: /* @__PURE__ */
|
|
1018
|
+
children: /* @__PURE__ */ s("bdi", { children: e.site })
|
|
1014
1019
|
}),
|
|
1015
|
-
/* @__PURE__ */
|
|
1016
|
-
e.description ? /* @__PURE__ */
|
|
1020
|
+
/* @__PURE__ */ s("strong", { children: /* @__PURE__ */ s("bdi", { children: e.title }) }),
|
|
1021
|
+
e.description ? /* @__PURE__ */ s("span", {
|
|
1017
1022
|
class: "ck-preview-text",
|
|
1018
|
-
children: /* @__PURE__ */
|
|
1023
|
+
children: /* @__PURE__ */ s("bdi", { children: e.description })
|
|
1019
1024
|
}) : null
|
|
1020
1025
|
]
|
|
1021
1026
|
}) : null;
|
|
1022
1027
|
})
|
|
1023
1028
|
}) : null;
|
|
1024
1029
|
}
|
|
1025
|
-
|
|
1026
|
-
export { w as ThreadCard };
|
|
1030
|
+
export { C as ThreadCard };
|