@pixelmatters/markup 1.3.0 → 1.3.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.
- package/README.md +6 -6
- package/dist/widget.js +373 -362
- package/package.json +1 -1
package/dist/widget.js
CHANGED
|
@@ -45,7 +45,7 @@ function w(e, t) {
|
|
|
45
45
|
function T(e) {
|
|
46
46
|
if (e.__P && e.__d) {
|
|
47
47
|
var n = e.__v, r = n.__e, i = [], a = [], o = v({}, n);
|
|
48
|
-
o.__v = n.__v + 1, t.vnode && t.vnode(o),
|
|
48
|
+
o.__v = n.__v + 1, t.vnode && t.vnode(o), N(e.__P, o, n, e.__n, e.__P.namespaceURI, 32 & n.__u ? [r] : null, i, r ?? w(n), !!(32 & n.__u), a), o.__v = n.__v, o.__.__k[o.__i] = o, re(i, o, a), n.__e = n.__ = null, o.__e != r && E(o);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
function E(e) {
|
|
@@ -63,21 +63,21 @@ function O() {
|
|
|
63
63
|
r.length = O.__r = 0;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function ee(e, t, n, r, i, a, o, s, c, l, u) {
|
|
67
67
|
var d, f, p, g, _, v, y, b = r && r.__k || h, x = t.length;
|
|
68
|
-
for (c =
|
|
68
|
+
for (c = k(n, t, b, c, x), d = 0; d < x; d++) (p = n.__k[d]) != null && (f = p.__i != -1 && b[p.__i] || m, p.__i = d, v = N(e, p, f, i, a, o, s, c, l, u), g = p.__e, p.ref && f.ref != p.ref && (f.ref && oe(f.ref, null, p), u.push(p.ref, p.__c || g, p)), _ == null && g != null && (_ = g), (y = !!(4 & p.__u)) || f.__k === p.__k ? (c = A(p, c, e, y), y && f.__e && (f.__e = null)) : typeof p.type == "function" && v !== void 0 ? c = v : g && (c = g.nextSibling), p.__u &= -7);
|
|
69
69
|
return n.__e = _, c;
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function k(e, t, n, r, i) {
|
|
72
72
|
var a, o, s, c, l, u = n.length, d = u, f = 0;
|
|
73
|
-
for (e.__k = Array(i), a = 0; a < i; a++) (o = t[a]) != null && typeof o != "boolean" && typeof o != "function" ? (typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? o = e.__k[a] = x(null, o, null, null, null) : _(o) ? o = e.__k[a] = x(S, { children: o }, null, null, null) : o.constructor === void 0 && o.__b > 0 ? o = e.__k[a] = x(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : e.__k[a] = o, c = a + f, o.__ = e, o.__b = e.__b + 1, s = null, (l = o.__i =
|
|
74
|
-
if (d) for (a = 0; a < u; a++) (s = n[a]) != null && !(2 & s.__u) && (s.__e == r && (r = w(s)),
|
|
73
|
+
for (e.__k = Array(i), a = 0; a < i; a++) (o = t[a]) != null && typeof o != "boolean" && typeof o != "function" ? (typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? o = e.__k[a] = x(null, o, null, null, null) : _(o) ? o = e.__k[a] = x(S, { children: o }, null, null, null) : o.constructor === void 0 && o.__b > 0 ? o = e.__k[a] = x(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : e.__k[a] = o, c = a + f, o.__ = e, o.__b = e.__b + 1, s = null, (l = o.__i = te(o, n, c, d)) != -1 && (d--, (s = n[l]) && (s.__u |= 2)), s == null || s.__v == null ? (l == -1 && (i > u ? f-- : i < u && f++), typeof o.type != "function" && (o.__u |= 4)) : l != c && (l == c - 1 ? f-- : l == c + 1 ? f++ : (l > c ? f-- : f++, o.__u |= 4))) : e.__k[a] = null;
|
|
74
|
+
if (d) for (a = 0; a < u; a++) (s = n[a]) != null && !(2 & s.__u) && (s.__e == r && (r = w(s)), se(s, s));
|
|
75
75
|
return r;
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function A(e, t, n, r) {
|
|
78
78
|
var i, a;
|
|
79
79
|
if (typeof e.type == "function") {
|
|
80
|
-
for (i = e.__k, a = 0; i && a < i.length; a++) i[a] && (i[a].__ = e, t =
|
|
80
|
+
for (i = e.__k, a = 0; i && a < i.length; a++) i[a] && (i[a].__ = e, t = A(i[a], t, n, r));
|
|
81
81
|
return t;
|
|
82
82
|
}
|
|
83
83
|
e.__e != t && (r && (t && e.type && !t.parentNode && (t = w(e)), n.insertBefore(e.__e, t || null)), t = e.__e);
|
|
@@ -86,7 +86,7 @@ function j(e, t, n, r) {
|
|
|
86
86
|
while (t != null && t.nodeType == 8);
|
|
87
87
|
return t;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function te(e, t, n, r) {
|
|
90
90
|
var i, a, o, s = e.key, c = e.type, l = t[n], u = l != null && (2 & l.__u) == 0;
|
|
91
91
|
if (l === null && s == null || u && s == l.key && c == l.type) return n;
|
|
92
92
|
if (r > +!!u) {
|
|
@@ -94,15 +94,15 @@ function M(e, t, n, r) {
|
|
|
94
94
|
}
|
|
95
95
|
return -1;
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function j(e, t, n) {
|
|
98
98
|
t[0] == "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" || g.test(t) ? n : n + "px";
|
|
99
99
|
}
|
|
100
|
-
function
|
|
100
|
+
function ne(e, t, n, r, i) {
|
|
101
101
|
var a, o;
|
|
102
102
|
n: if (t == "style") if (typeof n == "string") e.style.cssText = n;
|
|
103
103
|
else {
|
|
104
|
-
if (typeof r == "string" && (e.style.cssText = r = ""), r) for (t in r) n && t in n ||
|
|
105
|
-
if (n) for (t in n) r && n[t] == r[t] ||
|
|
104
|
+
if (typeof r == "string" && (e.style.cssText = r = ""), r) for (t in r) n && t in n || j(e.style, t, "");
|
|
105
|
+
if (n) for (t in n) r && n[t] == r[t] || j(e.style, t, n[t]);
|
|
106
106
|
}
|
|
107
107
|
else if (t[0] == "o" && t[1] == "n") a = t != (t = t.replace(u, "$1")), o = t.toLowerCase(), t = o in e || t == "onFocusOut" || t == "onFocusIn" ? o.slice(2) : t.slice(2), e.l ||= {}, e.l[t + a] = n, n ? r ? n[l] = r[l] : (n[l] = d, e.addEventListener(t, a ? p : f, a)) : e.removeEventListener(t, a ? p : f, a);
|
|
108
108
|
else {
|
|
@@ -114,7 +114,7 @@ function ee(e, t, n, r, i) {
|
|
|
114
114
|
typeof n == "function" || (n == null || !1 === n && t[4] != "-" ? e.removeAttribute(t) : e.setAttribute(t, t == "popover" && n == 1 ? "" : n));
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function M(e) {
|
|
118
118
|
return function(n) {
|
|
119
119
|
if (this.l) {
|
|
120
120
|
var r = this.l[n.type + e];
|
|
@@ -124,14 +124,14 @@ function P(e) {
|
|
|
124
124
|
}
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
|
-
function
|
|
128
|
-
var d, f, p, m, g, b, x, w, T, E, D, O,
|
|
127
|
+
function N(e, n, r, i, a, o, s, c, l, u) {
|
|
128
|
+
var d, f, p, m, g, b, x, w, T, E, D, O, k, A, te, j = n.type;
|
|
129
129
|
if (n.constructor !== void 0) return null;
|
|
130
130
|
128 & r.__u && (l = !!(32 & r.__u), o = [c = n.__e = r.__e]), (d = t.__b) && d(n);
|
|
131
|
-
n: if (typeof
|
|
132
|
-
if (w = n.props, T =
|
|
131
|
+
n: if (typeof j == "function") try {
|
|
132
|
+
if (w = n.props, T = j.prototype && j.prototype.render, E = (d = j.contextType) && i[d.__c], D = d ? E ? E.props.value : d.__ : i, r.__c ? x = (f = n.__c = r.__c).__ = f.__E : (T ? n.__c = f = new j(w, D) : (n.__c = f = new C(w, D), f.constructor = j, f.render = ce), E && E.sub(f), f.state ||= {}, f.__n = i, p = f.__d = !0, f.__h = [], f._sb = []), T && f.__s == null && (f.__s = f.state), T && j.getDerivedStateFromProps != null && (f.__s == f.state && (f.__s = v({}, f.__s)), v(f.__s, j.getDerivedStateFromProps(w, f.__s))), m = f.props, g = f.state, f.__v = n, p) T && j.getDerivedStateFromProps == null && f.componentWillMount != null && f.componentWillMount(), T && f.componentDidMount != null && f.__h.push(f.componentDidMount);
|
|
133
133
|
else {
|
|
134
|
-
if (T &&
|
|
134
|
+
if (T && j.getDerivedStateFromProps == null && w !== m && f.componentWillReceiveProps != null && f.componentWillReceiveProps(w, D), n.__v == r.__v || !f.__e && f.shouldComponentUpdate != null && !1 === f.shouldComponentUpdate(w, f.__s, D)) {
|
|
135
135
|
n.__v != r.__v && (f.props = w, f.state = f.__s, f.__d = !1), n.__e = r.__e, n.__k = r.__k, n.__k.some(function(e) {
|
|
136
136
|
e && (e.__ = n);
|
|
137
137
|
}), h.push.apply(f.__h, f._sb), f._sb = [], f.__h.length && s.push(f);
|
|
@@ -141,30 +141,30 @@ function F(e, n, r, i, a, o, s, c, l, u) {
|
|
|
141
141
|
f.componentDidUpdate(m, g, b);
|
|
142
142
|
});
|
|
143
143
|
}
|
|
144
|
-
if (f.context = D, f.props = w, f.__P = e, f.__e = !1, O = t.__r,
|
|
144
|
+
if (f.context = D, f.props = w, f.__P = e, f.__e = !1, O = t.__r, k = 0, T) f.state = f.__s, f.__d = !1, O && O(n), d = f.render(f.props, f.state, f.context), h.push.apply(f.__h, f._sb), f._sb = [];
|
|
145
145
|
else do
|
|
146
146
|
f.__d = !1, O && O(n), d = f.render(f.props, f.state, f.context), f.state = f.__s;
|
|
147
|
-
while (f.__d && ++
|
|
148
|
-
f.state = f.__s, f.getChildContext != null && (i = v(v({}, i), f.getChildContext())), T && !p && f.getSnapshotBeforeUpdate != null && (b = f.getSnapshotBeforeUpdate(m, g)),
|
|
147
|
+
while (f.__d && ++k < 25);
|
|
148
|
+
f.state = f.__s, f.getChildContext != null && (i = v(v({}, i), f.getChildContext())), T && !p && f.getSnapshotBeforeUpdate != null && (b = f.getSnapshotBeforeUpdate(m, g)), A = d != null && d.type === S && d.key == null ? ie(d.props.children) : d, c = ee(e, _(A) ? A : [A], n, r, i, a, o, s, c, l, u), f.base = n.__e, n.__u &= -161, f.__h.length && s.push(f), x && (f.__E = f.__ = null);
|
|
149
149
|
} catch (e) {
|
|
150
150
|
if (n.__v = null, l || o != null) if (e.then) {
|
|
151
151
|
for (n.__u |= l ? 160 : 128; c && c.nodeType == 8 && c.nextSibling;) c = c.nextSibling;
|
|
152
152
|
o[o.indexOf(c)] = null, n.__e = c;
|
|
153
153
|
} else {
|
|
154
|
-
for (
|
|
155
|
-
|
|
154
|
+
for (te = o.length; te--;) y(o[te]);
|
|
155
|
+
P(n);
|
|
156
156
|
}
|
|
157
|
-
else n.__e = r.__e, n.__k = r.__k, e.then ||
|
|
157
|
+
else n.__e = r.__e, n.__k = r.__k, e.then || P(n);
|
|
158
158
|
t.__e(e, n, r);
|
|
159
159
|
}
|
|
160
|
-
else o == null && n.__v == r.__v ? (n.__k = r.__k, n.__e = r.__e) : c = n.__e =
|
|
160
|
+
else o == null && n.__v == r.__v ? (n.__k = r.__k, n.__e = r.__e) : c = n.__e = ae(r.__e, n, r, i, a, o, s, l, u);
|
|
161
161
|
return (d = t.diffed) && d(n), 128 & n.__u ? void 0 : c;
|
|
162
162
|
}
|
|
163
|
-
function
|
|
164
|
-
e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(
|
|
163
|
+
function P(e) {
|
|
164
|
+
e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(P));
|
|
165
165
|
}
|
|
166
|
-
function
|
|
167
|
-
for (var i = 0; i < r.length; i++)
|
|
166
|
+
function re(e, n, r) {
|
|
167
|
+
for (var i = 0; i < r.length; i++) oe(r[i], r[++i], r[++i]);
|
|
168
168
|
t.__c && t.__c(n, e), e.some(function(n) {
|
|
169
169
|
try {
|
|
170
170
|
e = n.__h, n.__h = [], e.some(function(e) {
|
|
@@ -175,10 +175,10 @@ function ne(e, n, r) {
|
|
|
175
175
|
}
|
|
176
176
|
});
|
|
177
177
|
}
|
|
178
|
-
function
|
|
179
|
-
return typeof e != "object" || !e || e.__b > 0 ? e : _(e) ? e.map(
|
|
178
|
+
function ie(e) {
|
|
179
|
+
return typeof e != "object" || !e || e.__b > 0 ? e : _(e) ? e.map(ie) : v({}, e);
|
|
180
180
|
}
|
|
181
|
-
function
|
|
181
|
+
function ae(n, r, i, a, o, s, c, l, u) {
|
|
182
182
|
var d, f, p, h, g, v, b, x = i.props || m, S = r.props, C = r.type;
|
|
183
183
|
if (C == "svg" ? o = "http://www.w3.org/2000/svg" : C == "math" ? o = "http://www.w3.org/1998/Math/MathML" : o ||= "http://www.w3.org/1999/xhtml", s != null) {
|
|
184
184
|
for (d = 0; d < s.length; d++) if ((g = s[d]) && "setAttribute" in g == !!C && (C ? g.localName == C : g.nodeType == 3)) {
|
|
@@ -193,15 +193,15 @@ function ie(n, r, i, a, o, s, c, l, u) {
|
|
|
193
193
|
if (C == null) x === S || l && n.data == S || (n.data = S);
|
|
194
194
|
else {
|
|
195
195
|
if (s &&= e.call(n.childNodes), !l && s != null) for (x = {}, d = 0; d < n.attributes.length; d++) x[(g = n.attributes[d]).name] = g.value;
|
|
196
|
-
for (d in x) g = x[d], d == "dangerouslySetInnerHTML" ? p = g : d == "children" || d in S || d == "value" && "defaultValue" in S || d == "checked" && "defaultChecked" in S ||
|
|
197
|
-
for (d in S) g = S[d], d == "children" ? h = g : d == "dangerouslySetInnerHTML" ? f = g : d == "value" ? v = g : d == "checked" ? b = g : l && typeof g != "function" || x[d] === g ||
|
|
196
|
+
for (d in x) g = x[d], d == "dangerouslySetInnerHTML" ? p = g : d == "children" || d in S || d == "value" && "defaultValue" in S || d == "checked" && "defaultChecked" in S || ne(n, d, null, g, o);
|
|
197
|
+
for (d in S) g = S[d], d == "children" ? h = g : d == "dangerouslySetInnerHTML" ? f = g : d == "value" ? v = g : d == "checked" ? b = g : l && typeof g != "function" || x[d] === g || ne(n, d, g, x[d], o);
|
|
198
198
|
if (f) l || p && (f.__html == p.__html || f.__html == n.innerHTML) || (n.innerHTML = f.__html), r.__k = [];
|
|
199
|
-
else if (p && (n.innerHTML = ""),
|
|
200
|
-
l || (d = "value", C == "progress" && v == null ? n.removeAttribute("value") : v != null && (v !== n[d] || C == "progress" && !v || C == "option" && v != x[d]) &&
|
|
199
|
+
else if (p && (n.innerHTML = ""), ee(r.type == "template" ? n.content : n, _(h) ? h : [h], r, i, a, C == "foreignObject" ? "http://www.w3.org/1999/xhtml" : o, s, c, s ? s[0] : i.__k && w(i, 0), l, u), s != null) for (d = s.length; d--;) y(s[d]);
|
|
200
|
+
l || (d = "value", C == "progress" && v == null ? n.removeAttribute("value") : v != null && (v !== n[d] || C == "progress" && !v || C == "option" && v != x[d]) && ne(n, d, v, x[d], o), d = "checked", b != null && b != n[d] && ne(n, d, b, x[d], o));
|
|
201
201
|
}
|
|
202
202
|
return n;
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function oe(e, n, r) {
|
|
205
205
|
try {
|
|
206
206
|
if (typeof e == "function") {
|
|
207
207
|
var i = typeof e.__u == "function";
|
|
@@ -211,9 +211,9 @@ function ae(e, n, r) {
|
|
|
211
211
|
t.__e(e, r);
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function se(e, n, r) {
|
|
215
215
|
var i, a;
|
|
216
|
-
if (t.unmount && t.unmount(e), (i = e.ref) && (i.current && i.current != e.__e ||
|
|
216
|
+
if (t.unmount && t.unmount(e), (i = e.ref) && (i.current && i.current != e.__e || oe(i, null, n)), (i = e.__c) != null) {
|
|
217
217
|
if (i.componentWillUnmount) try {
|
|
218
218
|
i.componentWillUnmount();
|
|
219
219
|
} catch (e) {
|
|
@@ -221,15 +221,15 @@ function oe(e, n, r) {
|
|
|
221
221
|
}
|
|
222
222
|
i.base = i.__P = null;
|
|
223
223
|
}
|
|
224
|
-
if (i = e.__k) for (a = 0; a < i.length; a++) i[a] &&
|
|
224
|
+
if (i = e.__k) for (a = 0; a < i.length; a++) i[a] && se(i[a], n, r || typeof e.type != "function");
|
|
225
225
|
r || y(e.__e), e.__c = e.__ = e.__e = void 0;
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function ce(e, t, n) {
|
|
228
228
|
return this.constructor(e, n);
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function le(n, r, i) {
|
|
231
231
|
var a, o, s, c;
|
|
232
|
-
r == document && (r = document.documentElement), t.__ && t.__(n, r), o = (a = typeof i == "function") ? null : i && i.__k || r.__k, s = [], c = [],
|
|
232
|
+
r == document && (r = document.documentElement), t.__ && t.__(n, r), o = (a = typeof i == "function") ? null : i && i.__k || r.__k, s = [], c = [], N(r, n = (!a && i || r).__k = b(S, null, [n]), o || m, m, r.namespaceURI, !a && i ? [i] : o ? null : r.firstChild ? e.call(r.childNodes) : null, s, !a && i ? i : o ? o.__e : r.firstChild, a, c), re(s, n, c);
|
|
233
233
|
}
|
|
234
234
|
e = h.slice, t = { __e: function(e, t, n, r) {
|
|
235
235
|
for (var i, a, o; t = t.__;) if ((i = t.__c) && !i.__) try {
|
|
@@ -245,10 +245,10 @@ e = h.slice, t = { __e: function(e, t, n, r) {
|
|
|
245
245
|
this.__v && (this.__e = !0, e && this.__h.push(e), D(this));
|
|
246
246
|
}, C.prototype.render = S, r = [], a = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, o = function(e, t) {
|
|
247
247
|
return e.__v.__b - t.__v.__b;
|
|
248
|
-
}, O.__r = 0, s = Math.random().toString(8), c = "__d" + s, l = "__a" + s, u = /(PointerCapture)$|Capture$/i, d = 0, f =
|
|
248
|
+
}, O.__r = 0, s = Math.random().toString(8), c = "__d" + s, l = "__a" + s, u = /(PointerCapture)$|Capture$/i, d = 0, f = M(!1), p = M(!0);
|
|
249
249
|
//#endregion
|
|
250
250
|
//#region src/styles.css?inline
|
|
251
|
-
var le = ":host{--markup-paper:#fdfcfa;--markup-ink:#1a1614;--markup-muted:#6b6661;--markup-border:#1a16141a;--markup-border-strong:#1a16142e;--markup-brand:#e35d2a;--markup-brand-hover:#c84d20;--markup-team:#2a4ac8;--markup-shadow:0 1px 2px #1a16140f, 0 8px 28px #1a16141f;--markup-overlay-tint:#1a16140a;--markup-danger:#dc2626;--markup-radius:6px;--markup-radius-sm:4px;--markup-font:\"Geist Variable\", \"Geist\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif;--markup-font-mono:\"Geist Mono Variable\", \"Geist Mono\", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;all:initial;font-family:var(--markup-font);color:var(--markup-ink);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:14px;line-height:1.5}:host([data-theme=dark]){--markup-paper:#1a1614;--markup-ink:#fdfcfa;--markup-muted:#a8a39e;--markup-border:#fdfcfa1f;--markup-border-strong:#fdfcfa38;--markup-team:#7b99f0;--markup-shadow:0 1px 2px #00000059, 0 12px 40px #00000073;--markup-overlay-tint:#fdfcfa0d;--markup-danger:#f87171}@media (prefers-color-scheme:dark){:host(:not([data-theme=light])){--markup-paper:#1a1614;--markup-ink:#fdfcfa;--markup-muted:#a8a39e;--markup-border:#fdfcfa1f;--markup-border-strong:#fdfcfa38;--markup-team:#7b99f0;--markup-shadow:0 1px 2px #00000059, 0 12px 40px #00000073;--markup-overlay-tint:#fdfcfa0d;--markup-danger:#f87171}}.markup-shadow-root{font-family:var(--markup-font)}.markup-shadow-root *,.markup-shadow-root :before,.markup-shadow-root :after{box-sizing:border-box}:where(.markup-shadow-root button,.markup-shadow-root input,.markup-shadow-root textarea){font:inherit;color:inherit}.markup-eyebrow{font-family:var(--markup-font-mono);letter-spacing:.12em;text-transform:uppercase;color:var(--markup-muted);font-size:10px;font-weight:500}.markup-fab{z-index:10;background:var(--markup-ink);color:var(--markup-paper);cursor:pointer;touch-action:none;letter-spacing:-.01em;pointer-events:auto;box-shadow:0 0 0 1px color-mix(in srgb, var(--markup-brand) 35%, transparent), var(--markup-shadow);border:none;border-radius:999px;align-items:center;gap:8px;padding:9px 14px;font-size:13px;font-weight:500;transition:background .15s,box-shadow .15s,transform .15s;display:inline-flex;position:fixed;bottom:24px}.markup-fab:hover{background:var(--markup-brand);box-shadow:0 0 0 1px color-mix(in srgb, var(--markup-brand) 0%, transparent), var(--markup-shadow)}.markup-fab:active{transform:translateY(1px)}.markup-fab.is-active{background:var(--markup-brand);box-shadow:var(--markup-shadow)}.markup-fab.is-active:hover{background:var(--markup-brand-hover)}.markup-fab .markup-fab-icon{color:var(--markup-brand);transition:color .15s}.markup-fab:hover .markup-fab-icon,.markup-fab.is-active .markup-fab-icon{color:var(--markup-paper)}.markup-fab-right{right:24px}.markup-fab-left{left:24px}.markup-fab.is-floating{inset:0 auto auto 0}.markup-fab.is-dragging{cursor:grabbing;transition:none}.markup-fab-icon{align-items:center;display:inline-flex}.markup-fab-label{font-family:var(--markup-font)}.markup-hud-hidden-toast{z-index:10;background:var(--markup-ink);color:var(--markup-paper);letter-spacing:-.01em;box-shadow:var(--markup-shadow);pointer-events:none;border-radius:999px;align-items:center;gap:6px;padding:8px 14px;font-size:12px;font-weight:500;animation:.22s ease-out markup-hud-hidden-in,.32s ease-in 4.6s forwards markup-hud-hidden-out;display:inline-flex;position:fixed;bottom:24px}.markup-hud-hidden-toast-right{right:24px}.markup-hud-hidden-toast-left{left:24px}.markup-kbd{background:color-mix(in srgb, var(--markup-paper) 14%, transparent);min-width:18px;height:18px;color:var(--markup-paper);font-family:var(--markup-font);border-radius:4px;justify-content:center;align-items:center;padding:0 5px;font-size:10px;font-weight:600;line-height:1;display:inline-flex}@keyframes markup-hud-hidden-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes markup-hud-hidden-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(4px)}}.markup-pins-layer{pointer-events:none;position:fixed;inset:0}.markup-pin{background:var(--markup-ink);width:28px;height:28px;color:var(--markup-brand);cursor:pointer;pointer-events:auto;box-shadow:0 0 0 2px var(--markup-paper), 0 0 0 3px color-mix(in srgb, var(--markup-brand) 35%, transparent), var(--markup-shadow);border:none;border-radius:50% 50% 50% 4px;justify-content:center;align-items:center;margin-top:-28px;padding:0;transition:transform .15s,background .15s,color .15s;display:inline-flex;position:absolute}.markup-pin:hover,.markup-pin.is-active{background:var(--markup-brand);color:var(--markup-paper)}.markup-pin.is-anchor{anchor-name:--markup-active-anchor}.markup-pin-ghost{background:var(--markup-brand);color:var(--markup-paper);cursor:default;pointer-events:none;animation:1.2s ease-in-out infinite markup-ghost-pulse}.markup-pin-dot{background:currentColor;border-radius:50%;width:6px;height:6px;display:inline-block}.markup-pin-count{background:var(--markup-brand);min-width:16px;height:16px;color:var(--markup-paper);font-family:var(--markup-font-mono);text-align:center;box-shadow:0 0 0 2px var(--markup-paper);border-radius:999px;padding:0 4px;font-size:9px;font-weight:600;line-height:16px;position:absolute;top:-4px;left:50%;transform:translate(-50%,-50%)}@keyframes markup-ghost-pulse{0%,to{box-shadow:0 0 0 2px var(--markup-paper), 0 0 0 0 #e35d2a66}50%{box-shadow:0 0 0 2px var(--markup-paper), 0 0 0 10px #e35d2a00}}.markup-placement-overlay{background:var(--markup-overlay-tint);cursor:crosshair;pointer-events:auto;z-index:1;animation:.18s ease-out markup-overlay-in;position:fixed;inset:0}.markup-placement-cursor-help{background:var(--markup-ink);color:var(--markup-paper);letter-spacing:-.01em;box-shadow:var(--markup-shadow);pointer-events:none;border-radius:999px;padding:10px 16px;font-size:12px;font-weight:500;animation:.22s ease-out 60ms backwards markup-help-in;position:fixed;top:24px;left:50%;transform:translate(-50%)}@keyframes markup-overlay-in{0%{opacity:0}to{opacity:1}}@keyframes markup-help-in{0%{opacity:0;transform:translate(-50%,-8px)}to{opacity:1;transform:translate(-50%)}}.markup-popover{width:320px;max-width:calc(100vw - 24px);height:auto;max-height:calc(100dvh - 24px);inset:auto;left:var(--markup-pop-x,0);top:var(--markup-pop-y,0);background:var(--markup-paper);color:var(--markup-ink);border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius);box-shadow:var(--markup-shadow);pointer-events:auto;flex-direction:column;gap:0;margin:0;padding:0;animation:.16s ease-out markup-popover-in;display:flex;position:fixed;overflow:hidden}@supports (anchor-name:--x){.markup-popover{position-anchor:--markup-active-anchor;left:calc(anchor(right) + 8px);top:calc(anchor(top) - 9px);position-try-fallbacks:flip-block, flip-inline, flip-block flip-inline;position-try-order:most-block-size}.markup-popover.is-floating{left:var(--markup-pop-x,0);top:var(--markup-pop-y,0);position-try-fallbacks:none}}@keyframes markup-popover-in{0%{opacity:0;transform:translateY(-4px)scale(.98)}to{opacity:1;transform:translateY(0)scale(1)}}.markup-popover-header{border-bottom:1px solid var(--markup-border);cursor:grab;-webkit-user-select:none;user-select:none;touch-action:none;justify-content:space-between;align-items:center;padding:10px 12px;display:flex}.markup-popover.is-dragging .markup-popover-header{cursor:grabbing}.markup-popover-header-actions{align-items:center;gap:4px;display:flex}.markup-thread-menu{display:flex;position:relative}.markup-thread-menu-list{z-index:10;background:var(--markup-paper);border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius);min-width:160px;box-shadow:var(--markup-shadow);padding:4px;animation:.12s ease-out markup-menu-in;position:absolute;top:calc(100% + 6px);right:0}.markup-thread-menu-item{border-radius:var(--markup-radius-sm);width:100%;color:var(--markup-ink);text-align:left;cursor:pointer;background:0 0;border:none;padding:7px 10px;font-size:13px;transition:background .1s,color .1s;display:block}.markup-thread-menu-item:hover{background:var(--markup-border)}.markup-thread-menu-item.is-danger{color:var(--markup-danger,#dc2626)}.markup-thread-menu-item.is-danger:hover{background:color-mix(in srgb, var(--markup-danger,#dc2626) 10%, transparent)}.markup-thread-menu-item:disabled{opacity:.5;cursor:default}@keyframes markup-menu-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.markup-popover-body{padding:12px}.markup-popover-byline{color:var(--markup-muted);align-items:center;gap:4px;margin:0 0 8px;font-size:12px;display:flex}.markup-popover-name{color:var(--markup-ink);font-weight:500}.markup-icon-btn{border-radius:var(--markup-radius-sm);width:24px;height:24px;color:var(--markup-muted);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:0;transition:background .12s,color .12s;display:inline-flex}.markup-icon-btn:hover,.markup-icon-btn.is-open{background:var(--markup-border);color:var(--markup-ink)}.markup-comments{border-bottom:1px solid var(--markup-border);background:linear-gradient(var(--markup-paper), transparent) top / 100% 20px no-repeat local, linear-gradient(transparent, var(--markup-paper)) bottom / 100% 20px no-repeat local, radial-gradient(farthest-side at 50% 0%, #1a16141a, transparent) top / 100% 10px no-repeat scroll, radial-gradient(farthest-side at 50% 100%, #1a16141a, transparent) bottom / 100% 10px no-repeat scroll;flex-direction:column;gap:12px;max-height:280px;margin:0;padding:8px 12px 4px;list-style:none;display:flex;overflow-y:auto}.markup-comment{flex-direction:column;gap:4px;display:flex}.markup-comment-meta{align-items:center;gap:6px;font-size:11px;display:flex}.markup-comment-author{color:var(--markup-ink);font-weight:600}.markup-comment.is-team .markup-comment-author{color:var(--markup-team)}.markup-comment-badge{background:color-mix(in srgb, var(--markup-team) 12%, transparent);height:14px;color:var(--markup-team);font-family:var(--markup-font-mono);letter-spacing:.12em;text-transform:uppercase;border-radius:999px;align-items:center;padding:0 5px;font-size:9px;font-weight:500;line-height:1;display:inline-flex}.markup-comment-time{color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.04em;font-size:10px}.markup-comment-body{white-space:pre-wrap;word-break:break-word;margin:0;font-size:13px;line-height:1.5}.markup-comment-edited{color:var(--markup-muted);font-size:11px}.markup-thread-actions{align-items:center;gap:4px;display:flex}.markup-comment-meta .markup-reaction-picker-wrap,.markup-thread-actions{margin-left:auto}.markup-comment-meta .markup-reaction-add{width:22px;height:22px;margin-top:-4px;margin-bottom:-4px}.markup-reaction-picker-wrap>.markup-icon-btn,.markup-comment-menu>.markup-icon-btn{margin-top:-4px;margin-bottom:-4px}.markup-comment-menu.is-up .markup-thread-menu-list{animation-name:markup-menu-in-up;top:auto;bottom:calc(100% + 6px)}@keyframes markup-menu-in-up{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.markup-comment{position:relative}.markup-reactions{flex-wrap:wrap;align-items:center;gap:4px;margin-top:2px;display:flex}.markup-reaction-chip{border:1px solid var(--markup-border);height:22px;color:var(--markup-ink);font:inherit;cursor:pointer;background:0 0;border-radius:999px;align-items:center;gap:4px;padding:0 7px 0 6px;font-size:11px;line-height:1;transition:background .12s,border-color .12s;display:inline-flex}.markup-reaction-chip:hover:not(:disabled){background:color-mix(in srgb, var(--markup-ink) 5%, transparent)}.markup-reaction-chip.is-mine{border-color:color-mix(in srgb, var(--markup-brand) 45%, transparent);background:color-mix(in srgb, var(--markup-brand) 10%, transparent)}.markup-reaction-chip.is-mine:hover:not(:disabled){background:color-mix(in srgb, var(--markup-brand) 16%, transparent)}.markup-reaction-chip:disabled{cursor:default;opacity:.6}.markup-reaction-emoji{font-size:13px;line-height:1}.markup-reaction-count{font-family:var(--markup-font-mono);letter-spacing:.04em;color:var(--markup-muted);font-size:10px}.markup-reaction-chip.is-mine .markup-reaction-count{color:var(--markup-brand)}.markup-reaction-picker-wrap{opacity:0;flex:none;transition:opacity .12s;display:inline-flex;position:relative}.markup-comment:hover .markup-reaction-picker-wrap,.markup-comment:focus-within .markup-reaction-picker-wrap,.markup-reaction-picker-wrap.is-open{opacity:1}.markup-reaction-add{border:1px dashed var(--markup-border-strong);width:22px;height:22px;color:var(--markup-muted);font:inherit;cursor:pointer;background:0 0;border-radius:999px;justify-content:center;align-items:center;font-size:13px;line-height:1;transition:background .12s,color .12s,border-color .12s;display:inline-flex}.markup-reaction-add:hover,.markup-reaction-add.is-open{background:color-mix(in srgb, var(--markup-ink) 5%, transparent);color:var(--markup-ink);border-style:solid}.markup-reaction-picker{z-index:1;border:1px solid var(--markup-border-strong);background:var(--markup-paper);border-radius:8px;gap:2px;padding:4px;animation:.12s markup-menu-in;display:flex;position:absolute;top:calc(100% + 6px);right:0;box-shadow:0 1px 2px #1a16140f,0 8px 28px #1a16141a}.markup-reaction-picker-wrap.is-up .markup-reaction-picker{animation-name:markup-menu-in-up;top:auto;bottom:calc(100% + 6px)}.markup-reaction-picker-item{cursor:pointer;background:0 0;border:0;border-radius:6px;justify-content:center;align-items:center;width:28px;height:28px;font-size:16px;line-height:1;transition:background .12s;display:inline-flex}.markup-reaction-picker-item:hover{background:color-mix(in srgb, var(--markup-ink) 8%, transparent)}.markup-reaction-picker-item.is-mine{background:color-mix(in srgb, var(--markup-brand) 14%, transparent)}.markup-comment-edit-form{flex-direction:column;gap:6px;display:flex}.markup-comment-edit-form .markup-textarea{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);background:var(--markup-paper);width:100%;color:var(--markup-ink);resize:vertical;font:inherit;outline:none;padding:8px 10px;font-size:13px;line-height:1.5}.markup-comment-edit-form .markup-textarea:focus-visible{border-color:var(--markup-brand);box-shadow:0 0 0 3px #e35d2a2e}.markup-comment-edit-actions{justify-content:flex-end;gap:6px;display:flex}.markup-composer{flex-direction:column;display:flex;position:relative}.markup-composer-input{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);background:var(--markup-paper);width:100%;min-height:36px;max-height:96px;color:var(--markup-ink);resize:none;font-family:var(--markup-font);outline:none;padding:8px 10px;font-size:13px;line-height:1.5;transition:border-color .12s,box-shadow .12s,border-bottom-left-radius .15s,border-bottom-right-radius .15s}.markup-composer-input:focus-visible{border-color:var(--markup-brand);box-shadow:0 0 0 3px #e35d2a2e}.markup-composer-input:disabled{opacity:.6}.markup-composer-input::placeholder{color:var(--markup-muted)}.markup-composer.is-filled .markup-composer-input{border-bottom-right-radius:0;border-bottom-left-radius:0}.markup-composer-footer-wrap{grid-template-rows:0fr;transition:grid-template-rows .15s;display:grid}.markup-composer.is-filled .markup-composer-footer-wrap{grid-template-rows:1fr}.markup-composer-footer{border:1px solid var(--markup-border-strong);border-radius:0 0 var(--markup-radius-sm) var(--markup-radius-sm);opacity:0;border-top:none;justify-content:space-between;align-items:center;gap:8px;padding:2px 2px 2px 10px;transition:opacity .1s;display:flex;overflow:hidden}.markup-composer.is-filled .markup-composer-footer{opacity:1;transition-delay:60ms}.markup-composer-hint{font-family:var(--markup-font-mono);letter-spacing:.06em;color:var(--markup-muted);font-size:10px}.markup-composer-error{color:var(--markup-brand)}.markup-composer-actions{align-items:center;gap:6px;display:flex}.markup-composer-actions-empty{transition:opacity .12s;position:absolute;top:3px;right:3px}.markup-composer.is-filled .markup-composer-actions-empty{opacity:0;pointer-events:none}.markup-author-prompt{flex-direction:column;gap:10px;padding:12px;display:flex}.markup-input{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);background:var(--markup-paper);width:100%;height:36px;color:var(--markup-ink);outline:none;padding:0 10px;font-size:14px;transition:border-color .12s,box-shadow .12s}.markup-input:focus-visible{border-color:var(--markup-brand);box-shadow:0 0 0 3px #e35d2a2e}.markup-btn{border-radius:var(--markup-radius-sm);height:30px;color:var(--markup-ink);cursor:pointer;letter-spacing:-.01em;white-space:nowrap;background:0 0;border:1px solid #0000;justify-content:center;align-items:center;gap:6px;padding:0 8px;font-size:12px;font-weight:500;transition:background .12s,border-color .12s,color .12s,opacity .12s;display:inline-flex}.markup-btn:disabled{opacity:.5;cursor:not-allowed}.markup-btn-primary{background:var(--markup-ink);color:var(--markup-paper)}.markup-btn-primary:hover:not(:disabled){background:var(--markup-brand)}.markup-btn-ghost{color:var(--markup-muted)}.markup-btn-ghost:hover:not(:disabled){background:var(--markup-border);color:var(--markup-ink)}.markup-screenshot-row{border-top:1px solid var(--markup-border);margin-top:8px;padding-top:8px}.markup-screenshot-status{color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.06em;align-items:center;gap:5px;font-size:10px;display:flex}.markup-screenshot-toggle{cursor:pointer;color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.06em;align-items:center;gap:5px;font-size:10px;transition:color .12s;display:flex}.markup-screenshot-toggle:hover{color:var(--markup-ink)}.markup-screenshot-checkbox{width:12px;height:12px;accent-color:var(--markup-brand);cursor:pointer;margin:0}.markup-screenshot-thumb{border:1px solid var(--markup-border-strong);object-fit:cover;border-radius:3px;flex-shrink:0;width:auto;height:25px;margin:-5px 0 -5px auto;display:block}.markup-comment-screenshot{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);cursor:pointer;background:0 0;margin-top:8px;padding:0;transition:border-color .12s,opacity .12s;display:block;overflow:hidden}.markup-comment-screenshot:hover{border-color:var(--markup-brand);opacity:.9}.markup-comment-screenshot img{object-fit:cover;object-position:top;width:100%;height:auto;max-height:120px;display:block}.markup-lightbox{background:#1a1614e0;border:none;width:100%;max-width:100%;height:100%;max-height:100%;margin:0;padding:24px;position:fixed;inset:0}.markup-lightbox[open]{justify-content:center;align-items:center;display:flex}.markup-lightbox::backdrop{display:none}.markup-lightbox-img{border-radius:var(--markup-radius);object-fit:contain;max-width:100%;max-height:100%;box-shadow:var(--markup-shadow);animation:.16s ease-out markup-lightbox-in}.markup-lightbox-close{color:#fdfcfa;background:#1a161499;position:absolute;top:16px;right:16px}.markup-lightbox-close:hover{color:#fdfcfa;background:#1a1614d9}@keyframes markup-lightbox-in{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}@media (prefers-reduced-motion:reduce){.markup-fab,.markup-pin,.markup-icon-btn,.markup-btn,.markup-popover,.markup-pin-ghost,.markup-placement-overlay,.markup-placement-cursor-help,.markup-lightbox-img{transition:none;animation:none}}", ue, I, de, fe, pe = 0, me = [], L = t, he = L.__b, ge = L.__r, _e = L.diffed, ve = L.__c, ye = L.unmount, be = L.__;
|
|
251
|
+
var ue = ":host{--markup-paper:#fdfcfa;--markup-ink:#1a1614;--markup-muted:#6b6661;--markup-border:#1a16141a;--markup-border-strong:#1a16142e;--markup-brand:#e35d2a;--markup-brand-hover:#c84d20;--markup-team:#2a4ac8;--markup-shadow:0 1px 2px #1a16140f, 0 8px 28px #1a16141f;--markup-overlay-tint:#1a16140a;--markup-danger:#dc2626;--markup-radius:6px;--markup-radius-sm:4px;--markup-font:\"Geist Variable\", \"Geist\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif;--markup-font-mono:\"Geist Mono Variable\", \"Geist Mono\", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;all:initial;font-family:var(--markup-font);color:var(--markup-ink);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:14px;line-height:1.5}:host([data-theme=dark]){--markup-paper:#1a1614;--markup-ink:#fdfcfa;--markup-muted:#a8a39e;--markup-border:#fdfcfa1f;--markup-border-strong:#fdfcfa38;--markup-team:#7b99f0;--markup-shadow:0 1px 2px #00000059, 0 12px 40px #00000073;--markup-overlay-tint:#fdfcfa0d;--markup-danger:#f87171}@media (prefers-color-scheme:dark){:host(:not([data-theme=light])){--markup-paper:#1a1614;--markup-ink:#fdfcfa;--markup-muted:#a8a39e;--markup-border:#fdfcfa1f;--markup-border-strong:#fdfcfa38;--markup-team:#7b99f0;--markup-shadow:0 1px 2px #00000059, 0 12px 40px #00000073;--markup-overlay-tint:#fdfcfa0d;--markup-danger:#f87171}}.markup-shadow-root{font-family:var(--markup-font)}.markup-shadow-root *,.markup-shadow-root :before,.markup-shadow-root :after{box-sizing:border-box}:where(.markup-shadow-root button,.markup-shadow-root input,.markup-shadow-root textarea){font:inherit;color:inherit}.markup-eyebrow{font-family:var(--markup-font-mono);letter-spacing:.12em;text-transform:uppercase;color:var(--markup-muted);font-size:10px;font-weight:500}.markup-fab{z-index:10;background:var(--markup-ink);color:var(--markup-paper);cursor:pointer;touch-action:none;letter-spacing:-.01em;pointer-events:auto;box-shadow:0 0 0 1px color-mix(in srgb, var(--markup-brand) 35%, transparent), var(--markup-shadow);border:none;border-radius:999px;align-items:center;gap:8px;padding:9px 14px;font-size:13px;font-weight:500;transition:background .15s,box-shadow .15s,transform .15s;display:inline-flex;position:fixed;bottom:24px}.markup-fab:hover{background:var(--markup-brand);box-shadow:0 0 0 1px color-mix(in srgb, var(--markup-brand) 0%, transparent), var(--markup-shadow)}.markup-fab:active{transform:translateY(1px)}.markup-fab.is-active{background:var(--markup-brand);box-shadow:var(--markup-shadow)}.markup-fab.is-active:hover{background:var(--markup-brand-hover)}.markup-fab .markup-fab-icon{color:var(--markup-brand);transition:color .15s}.markup-fab:hover .markup-fab-icon,.markup-fab.is-active .markup-fab-icon{color:var(--markup-paper)}.markup-fab-right{right:24px}.markup-fab-left{left:24px}.markup-fab.is-floating{inset:0 auto auto 0}.markup-fab.is-dragging{cursor:grabbing;transition:none}.markup-fab-icon{align-items:center;display:inline-flex}.markup-fab-label{font-family:var(--markup-font)}.markup-hud-hidden-toast{z-index:10;background:var(--markup-ink);color:var(--markup-paper);letter-spacing:-.01em;box-shadow:var(--markup-shadow);pointer-events:none;border-radius:999px;align-items:center;gap:6px;padding:8px 14px;font-size:12px;font-weight:500;animation:.22s ease-out markup-hud-hidden-in,.32s ease-in 4.6s forwards markup-hud-hidden-out;display:inline-flex;position:fixed;bottom:24px}.markup-hud-hidden-toast-right{right:24px}.markup-hud-hidden-toast-left{left:24px}.markup-kbd{background:color-mix(in srgb, var(--markup-paper) 14%, transparent);min-width:18px;height:18px;color:var(--markup-paper);font-family:var(--markup-font);border-radius:4px;justify-content:center;align-items:center;padding:0 5px;font-size:10px;font-weight:600;line-height:1;display:inline-flex}@keyframes markup-hud-hidden-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes markup-hud-hidden-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(4px)}}.markup-pins-layer{pointer-events:none;position:fixed;inset:0}.markup-pin{background:var(--markup-ink);width:28px;height:28px;color:var(--markup-brand);cursor:pointer;pointer-events:auto;box-shadow:0 0 0 2px var(--markup-paper), 0 0 0 3px color-mix(in srgb, var(--markup-brand) 35%, transparent), var(--markup-shadow);border:none;border-radius:50% 50% 50% 4px;justify-content:center;align-items:center;margin-top:-28px;padding:0;transition:transform .15s,background .15s,color .15s;display:inline-flex;position:absolute}.markup-pin:hover,.markup-pin.is-active{background:var(--markup-brand);color:var(--markup-paper)}.markup-pin.is-anchor{anchor-name:--markup-active-anchor}.markup-pin-ghost{background:var(--markup-brand);color:var(--markup-paper);cursor:default;pointer-events:none;animation:1.2s ease-in-out infinite markup-ghost-pulse}.markup-pin-dot{background:currentColor;border-radius:50%;width:6px;height:6px;display:inline-block}.markup-pin-count{background:var(--markup-brand);min-width:16px;height:16px;color:var(--markup-paper);font-family:var(--markup-font-mono);text-align:center;box-shadow:0 0 0 2px var(--markup-paper);border-radius:999px;padding:0 4px;font-size:9px;font-weight:600;line-height:16px;position:absolute;top:-4px;left:50%;transform:translate(-50%,-50%)}@keyframes markup-ghost-pulse{0%,to{box-shadow:0 0 0 2px var(--markup-paper), 0 0 0 0 #e35d2a66}50%{box-shadow:0 0 0 2px var(--markup-paper), 0 0 0 10px #e35d2a00}}.markup-placement-overlay{background:var(--markup-overlay-tint);cursor:crosshair;pointer-events:auto;z-index:1;animation:.18s ease-out markup-overlay-in;position:fixed;inset:0}.markup-placement-cursor-help{background:var(--markup-ink);color:var(--markup-paper);letter-spacing:-.01em;box-shadow:var(--markup-shadow);pointer-events:none;border-radius:999px;padding:10px 16px;font-size:12px;font-weight:500;animation:.22s ease-out 60ms backwards markup-help-in;position:fixed;top:24px;left:50%;transform:translate(-50%)}@keyframes markup-overlay-in{0%{opacity:0}to{opacity:1}}@keyframes markup-help-in{0%{opacity:0;transform:translate(-50%,-8px)}to{opacity:1;transform:translate(-50%)}}.markup-popover{width:320px;max-width:calc(100vw - 24px);height:auto;max-height:calc(100dvh - 24px);inset:auto;left:var(--markup-pop-x,0);top:var(--markup-pop-y,0);background:var(--markup-paper);color:var(--markup-ink);border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius);box-shadow:var(--markup-shadow);pointer-events:auto;flex-direction:column;gap:0;margin:0;padding:0;animation:.16s ease-out markup-popover-in;display:flex;position:fixed;overflow:hidden}@supports (anchor-name:--x){.markup-popover{position-anchor:--markup-active-anchor;left:calc(anchor(right) + 8px);top:calc(anchor(top) - 9px);position-try-fallbacks:flip-block, flip-inline, flip-block flip-inline;position-try-order:most-block-size}.markup-popover.is-floating{left:var(--markup-pop-x,0);top:var(--markup-pop-y,0);position-try-fallbacks:none}}@keyframes markup-popover-in{0%{opacity:0;transform:translateY(-4px)scale(.98)}to{opacity:1;transform:translateY(0)scale(1)}}.markup-popover-header{border-bottom:1px solid var(--markup-border);cursor:grab;-webkit-user-select:none;user-select:none;touch-action:none;justify-content:space-between;align-items:center;padding:10px 12px;display:flex}.markup-popover.is-dragging .markup-popover-header{cursor:grabbing}.markup-popover-header-actions{align-items:center;gap:4px;display:flex}.markup-thread-menu{display:flex;position:relative}.markup-thread-menu-list{z-index:10;background:var(--markup-paper);border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius);min-width:160px;box-shadow:var(--markup-shadow);padding:4px;animation:.12s ease-out markup-menu-in;position:absolute;top:calc(100% + 6px);right:0}.markup-thread-menu-item{border-radius:var(--markup-radius-sm);width:100%;color:var(--markup-ink);text-align:left;cursor:pointer;background:0 0;border:none;padding:7px 10px;font-size:13px;transition:background .1s,color .1s;display:block}.markup-thread-menu-item:hover{background:var(--markup-border)}.markup-thread-menu-item.is-danger{color:var(--markup-danger,#dc2626)}.markup-thread-menu-item.is-danger:hover{background:color-mix(in srgb, var(--markup-danger,#dc2626) 10%, transparent)}.markup-thread-menu-item:disabled{opacity:.5;cursor:default}@keyframes markup-menu-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.markup-popover-body{padding:12px}.markup-popover-byline{color:var(--markup-muted);align-items:center;gap:4px;margin:0 0 8px;font-size:12px;display:flex}.markup-popover-name{color:var(--markup-ink);font-weight:500}.markup-icon-btn{border-radius:var(--markup-radius-sm);width:24px;height:24px;color:var(--markup-muted);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:0;transition:background .12s,color .12s;display:inline-flex}.markup-icon-btn:hover,.markup-icon-btn.is-open{background:var(--markup-border);color:var(--markup-ink)}.markup-comments{border-bottom:1px solid var(--markup-border);background:linear-gradient(var(--markup-paper), transparent) top / 100% 20px no-repeat local, linear-gradient(transparent, var(--markup-paper)) bottom / 100% 20px no-repeat local, radial-gradient(farthest-side at 50% 0%, #1a16141a, transparent) top / 100% 10px no-repeat scroll, radial-gradient(farthest-side at 50% 100%, #1a16141a, transparent) bottom / 100% 10px no-repeat scroll;flex-direction:column;gap:12px;max-height:280px;margin:0;padding:8px 12px 4px;list-style:none;display:flex;overflow-y:auto}.markup-comment{flex-direction:column;gap:4px;display:flex}.markup-comment-meta{align-items:center;gap:6px;font-size:11px;display:flex}.markup-comment-author{color:var(--markup-ink);font-weight:600}.markup-comment.is-team .markup-comment-author{color:var(--markup-team)}.markup-comment-badge{background:color-mix(in srgb, var(--markup-team) 12%, transparent);height:14px;color:var(--markup-team);font-family:var(--markup-font-mono);letter-spacing:.12em;text-transform:uppercase;border-radius:999px;align-items:center;padding:0 5px;font-size:9px;font-weight:500;line-height:1;display:inline-flex}.markup-comment-time{color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.04em;font-size:10px}.markup-comment-body{white-space:pre-wrap;word-break:break-word;margin:0;font-size:13px;line-height:1.5}.markup-comment-edited{color:var(--markup-muted);font-size:11px}.markup-thread-actions{align-items:center;gap:4px;display:flex}.markup-comment-meta .markup-reaction-picker-wrap,.markup-thread-actions{margin-left:auto}.markup-comment-meta .markup-reaction-add{width:22px;height:22px;margin-top:-4px;margin-bottom:-4px}.markup-reaction-picker-wrap>.markup-icon-btn,.markup-comment-menu>.markup-icon-btn{margin-top:-4px;margin-bottom:-4px}.markup-comment-menu.is-up .markup-thread-menu-list{animation-name:markup-menu-in-up;top:auto;bottom:calc(100% + 6px)}@keyframes markup-menu-in-up{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.markup-comment{position:relative}.markup-reactions{flex-wrap:wrap;align-items:center;gap:4px;margin-top:2px;display:flex}.markup-reaction-chip{border:1px solid var(--markup-border);height:22px;color:var(--markup-ink);font:inherit;cursor:pointer;background:0 0;border-radius:999px;align-items:center;gap:4px;padding:0 7px 0 6px;font-size:11px;line-height:1;transition:background .12s,border-color .12s;display:inline-flex}.markup-reaction-chip:hover:not(:disabled){background:color-mix(in srgb, var(--markup-ink) 5%, transparent)}.markup-reaction-chip.is-mine{border-color:color-mix(in srgb, var(--markup-brand) 45%, transparent);background:color-mix(in srgb, var(--markup-brand) 10%, transparent)}.markup-reaction-chip.is-mine:hover:not(:disabled){background:color-mix(in srgb, var(--markup-brand) 16%, transparent)}.markup-reaction-chip:disabled{cursor:default;opacity:.6}.markup-reaction-emoji{font-size:13px;line-height:1}.markup-reaction-count{font-family:var(--markup-font-mono);letter-spacing:.04em;color:var(--markup-muted);font-size:10px}.markup-reaction-chip.is-mine .markup-reaction-count{color:var(--markup-brand)}.markup-reaction-picker-wrap{opacity:0;flex:none;transition:opacity .12s;display:inline-flex;position:relative}.markup-comment:hover .markup-reaction-picker-wrap,.markup-comment:focus-within .markup-reaction-picker-wrap,.markup-reaction-picker-wrap.is-open{opacity:1}.markup-reaction-add{border:1px dashed var(--markup-border-strong);width:22px;height:22px;color:var(--markup-muted);font:inherit;cursor:pointer;background:0 0;border-radius:999px;justify-content:center;align-items:center;font-size:13px;line-height:1;transition:background .12s,color .12s,border-color .12s;display:inline-flex}.markup-reaction-add:hover,.markup-reaction-add.is-open{background:color-mix(in srgb, var(--markup-ink) 5%, transparent);color:var(--markup-ink);border-style:solid}.markup-reaction-picker{z-index:1;border:1px solid var(--markup-border-strong);background:var(--markup-paper);border-radius:8px;gap:2px;padding:4px;animation:.12s markup-menu-in;display:flex;position:absolute;top:calc(100% + 6px);right:0;box-shadow:0 1px 2px #1a16140f,0 8px 28px #1a16141a}.markup-reaction-picker-wrap.is-up .markup-reaction-picker{animation-name:markup-menu-in-up;top:auto;bottom:calc(100% + 6px)}.markup-reaction-picker-item{cursor:pointer;background:0 0;border:0;border-radius:6px;justify-content:center;align-items:center;width:28px;height:28px;font-size:16px;line-height:1;transition:background .12s;display:inline-flex}.markup-reaction-picker-item:hover{background:color-mix(in srgb, var(--markup-ink) 8%, transparent)}.markup-reaction-picker-item.is-mine{background:color-mix(in srgb, var(--markup-brand) 14%, transparent)}.markup-comment-edit-form{flex-direction:column;gap:6px;display:flex}.markup-comment-edit-form .markup-textarea{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);background:var(--markup-paper);width:100%;color:var(--markup-ink);resize:vertical;font:inherit;outline:none;padding:8px 10px;font-size:13px;line-height:1.5}.markup-comment-edit-form .markup-textarea:focus-visible{border-color:var(--markup-brand);box-shadow:0 0 0 3px #e35d2a2e}.markup-comment-edit-actions{justify-content:flex-end;gap:6px;display:flex}.markup-composer{flex-direction:column;display:flex;position:relative}.markup-composer-input{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);background:var(--markup-paper);width:100%;min-height:36px;max-height:96px;color:var(--markup-ink);resize:none;font-family:var(--markup-font);outline:none;padding:8px 10px;font-size:13px;line-height:1.5;transition:border-color .12s,box-shadow .12s,border-bottom-left-radius .15s,border-bottom-right-radius .15s}.markup-composer-input:focus-visible{border-color:var(--markup-brand);box-shadow:0 0 0 3px #e35d2a2e}.markup-composer-input:disabled{opacity:.6}.markup-composer-input::placeholder{color:var(--markup-muted)}.markup-composer.is-filled .markup-composer-input{border-bottom-right-radius:0;border-bottom-left-radius:0}.markup-composer-footer-wrap{grid-template-rows:0fr;transition:grid-template-rows .15s;display:grid}.markup-composer.is-filled .markup-composer-footer-wrap{grid-template-rows:1fr}.markup-composer-footer{border:1px solid var(--markup-border-strong);border-radius:0 0 var(--markup-radius-sm) var(--markup-radius-sm);opacity:0;border-top:none;justify-content:space-between;align-items:center;gap:8px;padding:2px 2px 2px 10px;transition:opacity .1s;display:flex;overflow:hidden}.markup-composer.is-filled .markup-composer-footer{opacity:1;transition-delay:60ms}.markup-composer-hint{font-family:var(--markup-font-mono);letter-spacing:.06em;color:var(--markup-muted);font-size:10px}.markup-composer-error{color:var(--markup-brand)}.markup-composer-actions{align-items:center;gap:6px;display:flex}.markup-composer-actions-empty{transition:opacity .12s;position:absolute;top:3px;right:3px}.markup-composer.is-filled .markup-composer-actions-empty{opacity:0;pointer-events:none}.markup-author-prompt{flex-direction:column;gap:10px;padding:12px;display:flex}.markup-author-status{color:var(--markup-muted);margin:0;font-size:12px}.markup-input{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);background:var(--markup-paper);width:100%;height:36px;color:var(--markup-ink);outline:none;padding:0 10px;font-size:14px;transition:border-color .12s,box-shadow .12s}.markup-input:focus-visible{border-color:var(--markup-brand);box-shadow:0 0 0 3px #e35d2a2e}.markup-btn{border-radius:var(--markup-radius-sm);height:30px;color:var(--markup-ink);cursor:pointer;letter-spacing:-.01em;white-space:nowrap;background:0 0;border:1px solid #0000;justify-content:center;align-items:center;gap:6px;padding:0 8px;font-size:12px;font-weight:500;transition:background .12s,border-color .12s,color .12s,opacity .12s;display:inline-flex}.markup-btn:disabled{opacity:.5;cursor:not-allowed}.markup-btn-primary{background:var(--markup-ink);color:var(--markup-paper)}.markup-btn-primary:hover:not(:disabled){background:var(--markup-brand)}.markup-btn-ghost{color:var(--markup-muted)}.markup-btn-ghost:hover:not(:disabled){background:var(--markup-border);color:var(--markup-ink)}.markup-screenshot-row{border-top:1px solid var(--markup-border);margin-top:8px;padding-top:8px}.markup-screenshot-status{color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.06em;align-items:center;gap:5px;font-size:10px;display:flex}.markup-screenshot-toggle{cursor:pointer;color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.06em;align-items:center;gap:5px;font-size:10px;transition:color .12s;display:flex}.markup-screenshot-toggle:hover{color:var(--markup-ink)}.markup-screenshot-checkbox{width:12px;height:12px;accent-color:var(--markup-brand);cursor:pointer;margin:0}.markup-screenshot-thumb{border:1px solid var(--markup-border-strong);object-fit:cover;border-radius:3px;flex-shrink:0;width:auto;height:25px;margin:-5px 0 -5px auto;display:block}.markup-comment-screenshot{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);cursor:pointer;background:0 0;margin-top:8px;padding:0;transition:border-color .12s,opacity .12s;display:block;overflow:hidden}.markup-comment-screenshot:hover{border-color:var(--markup-brand);opacity:.9}.markup-comment-screenshot img{object-fit:cover;object-position:top;width:100%;height:auto;max-height:120px;display:block}.markup-lightbox{background:#1a1614e0;border:none;width:100%;max-width:100%;height:100%;max-height:100%;margin:0;padding:24px;position:fixed;inset:0}.markup-lightbox[open]{justify-content:center;align-items:center;display:flex}.markup-lightbox::backdrop{display:none}.markup-lightbox-img{border-radius:var(--markup-radius);object-fit:contain;max-width:100%;max-height:100%;box-shadow:var(--markup-shadow);animation:.16s ease-out markup-lightbox-in}.markup-lightbox-close{color:#fdfcfa;background:#1a161499;position:absolute;top:16px;right:16px}.markup-lightbox-close:hover{color:#fdfcfa;background:#1a1614d9}@keyframes markup-lightbox-in{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}@media (prefers-reduced-motion:reduce){.markup-fab,.markup-pin,.markup-icon-btn,.markup-btn,.markup-popover,.markup-pin-ghost,.markup-placement-overlay,.markup-placement-cursor-help,.markup-lightbox-img{transition:none;animation:none}}", F, I, de, fe, pe = 0, me = [], L = t, he = L.__b, ge = L.__r, _e = L.diffed, ve = L.__c, ye = L.unmount, be = L.__;
|
|
252
252
|
function xe(e, t) {
|
|
253
253
|
L.__h && L.__h(I, e, pe || t), pe = 0;
|
|
254
254
|
var n = I.__H ||= {
|
|
@@ -261,7 +261,7 @@ function R(e) {
|
|
|
261
261
|
return pe = 1, Se(Ae, e);
|
|
262
262
|
}
|
|
263
263
|
function Se(e, t, n) {
|
|
264
|
-
var r = xe(
|
|
264
|
+
var r = xe(F++, 2);
|
|
265
265
|
if (r.t = e, !r.__c && (r.__ = [n ? n(t) : Ae(void 0, t), function(e) {
|
|
266
266
|
var t = r.__N ? r.__N[0] : r.__[0], n = r.t(t, e);
|
|
267
267
|
t !== n && (r.__N = [n, r.__[1]], r.__c.setState({}));
|
|
@@ -295,7 +295,7 @@ function Se(e, t, n) {
|
|
|
295
295
|
return r.__N || r.__;
|
|
296
296
|
}
|
|
297
297
|
function z(e, t) {
|
|
298
|
-
var n = xe(
|
|
298
|
+
var n = xe(F++, 3);
|
|
299
299
|
!L.__s && ke(n.__H, t) && (n.__ = e, n.u = t, I.__H.__h.push(n));
|
|
300
300
|
}
|
|
301
301
|
function B(e) {
|
|
@@ -304,7 +304,7 @@ function B(e) {
|
|
|
304
304
|
}, []);
|
|
305
305
|
}
|
|
306
306
|
function Ce(e, t) {
|
|
307
|
-
var n = xe(
|
|
307
|
+
var n = xe(F++, 7);
|
|
308
308
|
return ke(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;
|
|
309
309
|
}
|
|
310
310
|
function V(e, t) {
|
|
@@ -327,11 +327,11 @@ L.__b = function(e) {
|
|
|
327
327
|
}, L.__ = function(e, t) {
|
|
328
328
|
e && t.__k && t.__k.__m && (e.__m = t.__k.__m), be && be(e, t);
|
|
329
329
|
}, L.__r = function(e) {
|
|
330
|
-
ge && ge(e),
|
|
330
|
+
ge && ge(e), F = 0;
|
|
331
331
|
var t = (I = e.__c).__H;
|
|
332
332
|
t && (de === I ? (t.__h = [], I.__h = [], t.__.some(function(e) {
|
|
333
333
|
e.__N && (e.__ = e.__N), e.u = e.__N = void 0;
|
|
334
|
-
})) : (t.__h.some(De), t.__h.some(Oe), t.__h = [],
|
|
334
|
+
})) : (t.__h.some(De), t.__h.some(Oe), t.__h = [], F = 0)), de = I;
|
|
335
335
|
}, L.diffed = function(e) {
|
|
336
336
|
_e && _e(e);
|
|
337
337
|
var t = e.__c;
|
|
@@ -3586,24 +3586,25 @@ function pa(e, t) {
|
|
|
3586
3586
|
}
|
|
3587
3587
|
//#endregion
|
|
3588
3588
|
//#region src/runtime/ui/author-prompt.tsx
|
|
3589
|
-
function ma({ pending: e,
|
|
3590
|
-
let [
|
|
3589
|
+
function ma({ pending: e, connecting: t = !1, onSubmit: n, onCancel: r, onSignIn: i }) {
|
|
3590
|
+
let [a, o] = R(""), [s, c] = R(""), l = B(null);
|
|
3591
3591
|
z(() => {
|
|
3592
|
-
|
|
3592
|
+
l.current?.focus();
|
|
3593
3593
|
}, []);
|
|
3594
|
-
function
|
|
3595
|
-
|
|
3596
|
-
let
|
|
3597
|
-
!
|
|
3594
|
+
function u(r) {
|
|
3595
|
+
r?.preventDefault();
|
|
3596
|
+
let i = a.trim();
|
|
3597
|
+
!i || e || t || n(i, s.trim() || void 0);
|
|
3598
3598
|
}
|
|
3599
|
+
let d = e || t;
|
|
3599
3600
|
return /* @__PURE__ */ $("form", {
|
|
3600
3601
|
class: "markup-author-prompt",
|
|
3601
|
-
onSubmit:
|
|
3602
|
+
onSubmit: u,
|
|
3602
3603
|
children: [
|
|
3603
|
-
|
|
3604
|
+
i ? /* @__PURE__ */ $(S, { children: [/* @__PURE__ */ $("button", {
|
|
3604
3605
|
type: "button",
|
|
3605
3606
|
class: "markup-btn markup-btn-primary",
|
|
3606
|
-
onClick:
|
|
3607
|
+
onClick: i,
|
|
3607
3608
|
disabled: e,
|
|
3608
3609
|
children: "Sign in with Markup"
|
|
3609
3610
|
}), /* @__PURE__ */ $("p", {
|
|
@@ -3614,16 +3615,16 @@ function ma({ pending: e, onSubmit: t, onCancel: n, onSignIn: r }) {
|
|
|
3614
3615
|
children: "who's leaving feedback?"
|
|
3615
3616
|
}),
|
|
3616
3617
|
/* @__PURE__ */ $("input", {
|
|
3617
|
-
ref:
|
|
3618
|
+
ref: l,
|
|
3618
3619
|
class: "markup-input",
|
|
3619
3620
|
type: "text",
|
|
3620
3621
|
name: "name",
|
|
3621
3622
|
placeholder: "Your name",
|
|
3622
|
-
value:
|
|
3623
|
+
value: a,
|
|
3623
3624
|
maxLength: 80,
|
|
3624
3625
|
autoComplete: "name",
|
|
3625
|
-
onInput: (e) =>
|
|
3626
|
-
disabled:
|
|
3626
|
+
onInput: (e) => o(e.currentTarget.value),
|
|
3627
|
+
disabled: d,
|
|
3627
3628
|
"data-1p-ignore": !0
|
|
3628
3629
|
}),
|
|
3629
3630
|
/* @__PURE__ */ $("input", {
|
|
@@ -3631,25 +3632,31 @@ function ma({ pending: e, onSubmit: t, onCancel: n, onSignIn: r }) {
|
|
|
3631
3632
|
type: "email",
|
|
3632
3633
|
name: "email",
|
|
3633
3634
|
placeholder: "Email (optional)",
|
|
3634
|
-
value:
|
|
3635
|
+
value: s,
|
|
3635
3636
|
maxLength: 254,
|
|
3636
3637
|
autoComplete: "email",
|
|
3637
|
-
onInput: (e) =>
|
|
3638
|
-
disabled:
|
|
3638
|
+
onInput: (e) => c(e.currentTarget.value),
|
|
3639
|
+
disabled: d,
|
|
3639
3640
|
"data-1p-ignore": !0
|
|
3640
3641
|
}),
|
|
3642
|
+
t ? /* @__PURE__ */ $("p", {
|
|
3643
|
+
class: "markup-author-status",
|
|
3644
|
+
role: "status",
|
|
3645
|
+
"aria-live": "polite",
|
|
3646
|
+
children: "Connecting…"
|
|
3647
|
+
}) : null,
|
|
3641
3648
|
/* @__PURE__ */ $("div", {
|
|
3642
3649
|
class: "markup-composer-actions",
|
|
3643
3650
|
children: [/* @__PURE__ */ $("button", {
|
|
3644
3651
|
type: "button",
|
|
3645
3652
|
class: "markup-btn markup-btn-ghost",
|
|
3646
|
-
onClick:
|
|
3653
|
+
onClick: r,
|
|
3647
3654
|
disabled: e,
|
|
3648
3655
|
children: "Cancel"
|
|
3649
3656
|
}), /* @__PURE__ */ $("button", {
|
|
3650
3657
|
type: "submit",
|
|
3651
3658
|
class: "markup-btn markup-btn-primary",
|
|
3652
|
-
disabled: !
|
|
3659
|
+
disabled: !a.trim() || d,
|
|
3653
3660
|
children: "Continue"
|
|
3654
3661
|
})]
|
|
3655
3662
|
})
|
|
@@ -3735,29 +3742,29 @@ function ga({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "
|
|
|
3735
3742
|
}
|
|
3736
3743
|
//#endregion
|
|
3737
3744
|
//#region src/runtime/ui/new-thread-popover.tsx
|
|
3738
|
-
function _a({ pageX: e, pageY: t, authorName: n, isVerified: r,
|
|
3739
|
-
let
|
|
3740
|
-
pa(
|
|
3741
|
-
let [
|
|
3745
|
+
function _a({ pageX: e, pageY: t, authorName: n, isVerified: r, identityResolving: i, pending: a, error: o, screenshot: s, screenshotCapturing: c, onAuthor: l, onSignIn: u, onSubmit: d, onClose: f }) {
|
|
3746
|
+
let p = B(null);
|
|
3747
|
+
pa(p, !0);
|
|
3748
|
+
let [m, h] = R(!1), [g, _] = R(null), [v, y] = R(null), [b, x] = R(!1);
|
|
3742
3749
|
z(() => {
|
|
3743
|
-
if (!
|
|
3744
|
-
let e = URL.createObjectURL(
|
|
3745
|
-
return
|
|
3746
|
-
}, [
|
|
3747
|
-
let e =
|
|
3750
|
+
if (!s) return;
|
|
3751
|
+
let e = URL.createObjectURL(s);
|
|
3752
|
+
return _(e), () => URL.revokeObjectURL(e);
|
|
3753
|
+
}, [s]), z(() => {
|
|
3754
|
+
let e = p.current;
|
|
3748
3755
|
if (!e) return;
|
|
3749
3756
|
if (typeof e.showPopover == "function" && !e.matches(":popover-open")) try {
|
|
3750
3757
|
e.showPopover();
|
|
3751
3758
|
} catch {}
|
|
3752
3759
|
function t(e) {
|
|
3753
|
-
e.newState === "closed" &&
|
|
3760
|
+
e.newState === "closed" && f();
|
|
3754
3761
|
}
|
|
3755
3762
|
return e.addEventListener("toggle", t), () => e.removeEventListener("toggle", t);
|
|
3756
|
-
}, [
|
|
3757
|
-
let
|
|
3758
|
-
function
|
|
3763
|
+
}, [f]);
|
|
3764
|
+
let S = va(e - window.scrollX + 16, 12, window.innerWidth - 320 - 12), C = va(t - window.scrollY - 16, 12, window.innerHeight - 220), w = s != null, T = c || w;
|
|
3765
|
+
function E(e) {
|
|
3759
3766
|
if (e.button !== 0 || e.target?.closest("button, a, input, textarea, select")) return;
|
|
3760
|
-
let t =
|
|
3767
|
+
let t = p.current;
|
|
3761
3768
|
if (!t) return;
|
|
3762
3769
|
let n = t.getBoundingClientRect(), r = e.clientX, i = e.clientY, a = n.left, o = n.top, s = n.width, c = n.height, l = e.currentTarget, u = !1;
|
|
3763
3770
|
try {
|
|
@@ -3767,35 +3774,35 @@ function _a({ pageX: e, pageY: t, authorName: n, isVerified: r, pending: i, erro
|
|
|
3767
3774
|
let t = e.clientX - r, n = e.clientY - i;
|
|
3768
3775
|
if (!u) {
|
|
3769
3776
|
if (Math.abs(t) + Math.abs(n) < 4) return;
|
|
3770
|
-
u = !0,
|
|
3777
|
+
u = !0, x(!0);
|
|
3771
3778
|
}
|
|
3772
3779
|
let l = Math.max(8, window.innerWidth - s - 8), d = Math.max(8, window.innerHeight - c - 8);
|
|
3773
|
-
|
|
3780
|
+
y({
|
|
3774
3781
|
left: va(a + t, 8, l),
|
|
3775
3782
|
top: va(o + n, 8, d)
|
|
3776
3783
|
});
|
|
3777
3784
|
}
|
|
3778
|
-
function
|
|
3785
|
+
function f(e) {
|
|
3779
3786
|
try {
|
|
3780
3787
|
l.releasePointerCapture(e.pointerId);
|
|
3781
3788
|
} catch {}
|
|
3782
|
-
l.removeEventListener("pointermove", d), l.removeEventListener("pointerup",
|
|
3789
|
+
l.removeEventListener("pointermove", d), l.removeEventListener("pointerup", f), l.removeEventListener("pointercancel", f), x(!1);
|
|
3783
3790
|
}
|
|
3784
|
-
l.addEventListener("pointermove", d), l.addEventListener("pointerup",
|
|
3791
|
+
l.addEventListener("pointermove", d), l.addEventListener("pointerup", f), l.addEventListener("pointercancel", f);
|
|
3785
3792
|
}
|
|
3786
3793
|
return /* @__PURE__ */ $("div", {
|
|
3787
|
-
ref:
|
|
3788
|
-
class: Q("markup-popover",
|
|
3794
|
+
ref: p,
|
|
3795
|
+
class: Q("markup-popover", v && "is-floating", b && "is-dragging"),
|
|
3789
3796
|
popover: "auto",
|
|
3790
3797
|
style: {
|
|
3791
|
-
"--markup-pop-x": `${
|
|
3792
|
-
"--markup-pop-y": `${
|
|
3798
|
+
"--markup-pop-x": `${v?.left ?? S}px`,
|
|
3799
|
+
"--markup-pop-y": `${v?.top ?? C}px`
|
|
3793
3800
|
},
|
|
3794
3801
|
role: "dialog",
|
|
3795
3802
|
"aria-label": "New markup",
|
|
3796
3803
|
children: [/* @__PURE__ */ $("header", {
|
|
3797
3804
|
class: "markup-popover-header",
|
|
3798
|
-
onPointerDown:
|
|
3805
|
+
onPointerDown: E,
|
|
3799
3806
|
children: [/* @__PURE__ */ $("span", {
|
|
3800
3807
|
class: "markup-eyebrow",
|
|
3801
3808
|
children: "new · markup"
|
|
@@ -3803,14 +3810,15 @@ function _a({ pageX: e, pageY: t, authorName: n, isVerified: r, pending: i, erro
|
|
|
3803
3810
|
type: "button",
|
|
3804
3811
|
class: "markup-icon-btn",
|
|
3805
3812
|
"aria-label": "Discard pin",
|
|
3806
|
-
onClick:
|
|
3813
|
+
onClick: f,
|
|
3807
3814
|
children: /* @__PURE__ */ $(ia, { size: 16 })
|
|
3808
3815
|
})]
|
|
3809
3816
|
}), n == null ? /* @__PURE__ */ $(ma, {
|
|
3810
|
-
pending:
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3817
|
+
pending: a,
|
|
3818
|
+
connecting: i,
|
|
3819
|
+
onSubmit: l,
|
|
3820
|
+
onCancel: f,
|
|
3821
|
+
onSignIn: u
|
|
3814
3822
|
}) : /* @__PURE__ */ $("div", {
|
|
3815
3823
|
class: "markup-popover-body",
|
|
3816
3824
|
children: [
|
|
@@ -3832,13 +3840,13 @@ function _a({ pageX: e, pageY: t, authorName: n, isVerified: r, pending: i, erro
|
|
|
3832
3840
|
label: "Feedback",
|
|
3833
3841
|
placeholder: "What's wrong, missing, or worth noting?",
|
|
3834
3842
|
submitLabel: "Post markup",
|
|
3835
|
-
pending:
|
|
3836
|
-
error:
|
|
3837
|
-
onSubmit: (e) =>
|
|
3843
|
+
pending: a,
|
|
3844
|
+
error: o,
|
|
3845
|
+
onSubmit: (e) => d(e, m && w)
|
|
3838
3846
|
}),
|
|
3839
|
-
|
|
3847
|
+
T ? /* @__PURE__ */ $("div", {
|
|
3840
3848
|
class: "markup-screenshot-row",
|
|
3841
|
-
children:
|
|
3849
|
+
children: c ? /* @__PURE__ */ $("span", {
|
|
3842
3850
|
class: "markup-screenshot-status",
|
|
3843
3851
|
children: [
|
|
3844
3852
|
/* @__PURE__ */ $("input", {
|
|
@@ -3855,14 +3863,14 @@ function _a({ pageX: e, pageY: t, authorName: n, isVerified: r, pending: i, erro
|
|
|
3855
3863
|
/* @__PURE__ */ $("input", {
|
|
3856
3864
|
type: "checkbox",
|
|
3857
3865
|
class: "markup-screenshot-checkbox",
|
|
3858
|
-
checked:
|
|
3859
|
-
onChange: (e) =>
|
|
3866
|
+
checked: m,
|
|
3867
|
+
onChange: (e) => h(e.currentTarget.checked)
|
|
3860
3868
|
}),
|
|
3861
3869
|
/* @__PURE__ */ $(sa, { size: 12 }),
|
|
3862
3870
|
/* @__PURE__ */ $("span", { children: "Attach screenshot" }),
|
|
3863
|
-
|
|
3871
|
+
g && m ? /* @__PURE__ */ $("img", {
|
|
3864
3872
|
class: "markup-screenshot-thumb",
|
|
3865
|
-
src:
|
|
3873
|
+
src: g,
|
|
3866
3874
|
alt: "Screenshot preview"
|
|
3867
3875
|
}) : null
|
|
3868
3876
|
]
|
|
@@ -3950,69 +3958,69 @@ var Sa = [
|
|
|
3950
3958
|
"😄",
|
|
3951
3959
|
"❓"
|
|
3952
3960
|
];
|
|
3953
|
-
function Ca({ thread: e, authorName: t, currentClientId: n, isVerified: r,
|
|
3954
|
-
let
|
|
3955
|
-
pa(
|
|
3956
|
-
let
|
|
3957
|
-
function
|
|
3958
|
-
|
|
3961
|
+
function Ca({ thread: e, authorName: t, currentClientId: n, isVerified: r, identityResolving: i, canDelete: a, pending: o, error: s, onAuthor: c, onSignIn: l, onClose: u, onReply: d, onEditComment: f, onDeleteComment: p, onToggleReaction: m, onResolve: h, onDelete: g }) {
|
|
3962
|
+
let _ = B(null), v = B(null), y = B(null), b = B(null), x = B(null), [S, C] = R(!1), [w, T] = R(!1), [E, D] = R(null), [O, ee] = R(""), [k, A] = R(null), [te, j] = R("down"), [ne, M] = R(null), [N, P] = R(null), [re, ie] = R("down"), ae = B(null), [oe, se] = R(null), [ce, le] = R(!1);
|
|
3963
|
+
pa(_, !0);
|
|
3964
|
+
let ue = e.resolvedAt != null, F = Ce(() => e.comments.filter((e) => !e.deleted), [e.comments]);
|
|
3965
|
+
function I(e, t) {
|
|
3966
|
+
D(e), ee(t);
|
|
3959
3967
|
}
|
|
3960
|
-
function
|
|
3961
|
-
|
|
3968
|
+
function de() {
|
|
3969
|
+
D(null), ee("");
|
|
3962
3970
|
}
|
|
3963
3971
|
z(() => {
|
|
3964
|
-
if (!
|
|
3965
|
-
let t = e.comments.find((e) => e._id ===
|
|
3966
|
-
(!t || t.deleted) &&
|
|
3967
|
-
}, [e.comments,
|
|
3968
|
-
let
|
|
3972
|
+
if (!E) return;
|
|
3973
|
+
let t = e.comments.find((e) => e._id === E);
|
|
3974
|
+
(!t || t.deleted) && de();
|
|
3975
|
+
}, [e.comments, E]);
|
|
3976
|
+
let fe = B(!0);
|
|
3969
3977
|
z(() => {
|
|
3970
|
-
let e =
|
|
3978
|
+
let e = b.current;
|
|
3971
3979
|
if (e) {
|
|
3972
|
-
if (
|
|
3973
|
-
|
|
3980
|
+
if (fe.current) {
|
|
3981
|
+
fe.current = !1, e.scrollTop = e.scrollHeight;
|
|
3974
3982
|
return;
|
|
3975
3983
|
}
|
|
3976
3984
|
e.scrollHeight - e.scrollTop - e.clientHeight < 80 && (e.scrollTop = e.scrollHeight);
|
|
3977
3985
|
}
|
|
3978
|
-
}, [
|
|
3979
|
-
if (!
|
|
3980
|
-
|
|
3986
|
+
}, [F.length]), z(() => {
|
|
3987
|
+
if (!S) {
|
|
3988
|
+
T(!1);
|
|
3981
3989
|
return;
|
|
3982
3990
|
}
|
|
3983
3991
|
function e(e) {
|
|
3984
|
-
|
|
3992
|
+
v.current && !e.composedPath().includes(v.current) && C(!1);
|
|
3985
3993
|
}
|
|
3986
3994
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
3987
|
-
}, [
|
|
3995
|
+
}, [S]), z(() => {
|
|
3988
3996
|
if (!k) {
|
|
3989
|
-
|
|
3997
|
+
M(null);
|
|
3990
3998
|
return;
|
|
3991
3999
|
}
|
|
3992
4000
|
function e(e) {
|
|
3993
|
-
|
|
4001
|
+
y.current && !e.composedPath().includes(y.current) && A(null);
|
|
3994
4002
|
}
|
|
3995
4003
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
3996
4004
|
}, [k]), z(() => {
|
|
3997
|
-
if (!
|
|
4005
|
+
if (!N) return;
|
|
3998
4006
|
function e(e) {
|
|
3999
|
-
|
|
4007
|
+
ae.current && !e.composedPath().includes(ae.current) && P(null);
|
|
4000
4008
|
}
|
|
4001
4009
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
4002
|
-
}, [
|
|
4003
|
-
let e =
|
|
4010
|
+
}, [N]), z(() => {
|
|
4011
|
+
let e = _.current;
|
|
4004
4012
|
if (!e) return;
|
|
4005
4013
|
if (typeof e.showPopover == "function" && !e.matches(":popover-open")) try {
|
|
4006
4014
|
e.showPopover();
|
|
4007
4015
|
} catch {}
|
|
4008
4016
|
function t(e) {
|
|
4009
|
-
e.newState === "closed" &&
|
|
4017
|
+
e.newState === "closed" && u();
|
|
4010
4018
|
}
|
|
4011
4019
|
return e.addEventListener("toggle", t), () => e.removeEventListener("toggle", t);
|
|
4012
|
-
}, [
|
|
4013
|
-
function
|
|
4020
|
+
}, [u]);
|
|
4021
|
+
function pe(e) {
|
|
4014
4022
|
if (e.button !== 0 || e.target?.closest("button, a, input, textarea, select")) return;
|
|
4015
|
-
let t =
|
|
4023
|
+
let t = _.current;
|
|
4016
4024
|
if (!t) return;
|
|
4017
4025
|
let n = t.getBoundingClientRect(), r = e.clientX, i = e.clientY, a = n.left, o = n.top, s = n.width, c = n.height, l = e.currentTarget, u = !1;
|
|
4018
4026
|
try {
|
|
@@ -4022,10 +4030,10 @@ function Ca({ thread: e, authorName: t, currentClientId: n, isVerified: r, canDe
|
|
|
4022
4030
|
let t = e.clientX - r, n = e.clientY - i;
|
|
4023
4031
|
if (!u) {
|
|
4024
4032
|
if (Math.abs(t) + Math.abs(n) < 4) return;
|
|
4025
|
-
u = !0,
|
|
4033
|
+
u = !0, le(!0);
|
|
4026
4034
|
}
|
|
4027
4035
|
let l = Math.max(8, window.innerWidth - s - 8), d = Math.max(8, window.innerHeight - c - 8);
|
|
4028
|
-
|
|
4036
|
+
se({
|
|
4029
4037
|
left: Da(a + t, 8, l),
|
|
4030
4038
|
top: Da(o + n, 8, d)
|
|
4031
4039
|
});
|
|
@@ -4034,11 +4042,11 @@ function Ca({ thread: e, authorName: t, currentClientId: n, isVerified: r, canDe
|
|
|
4034
4042
|
try {
|
|
4035
4043
|
l.releasePointerCapture(e.pointerId);
|
|
4036
4044
|
} catch {}
|
|
4037
|
-
l.removeEventListener("pointermove", d), l.removeEventListener("pointerup", f), l.removeEventListener("pointercancel", f),
|
|
4045
|
+
l.removeEventListener("pointermove", d), l.removeEventListener("pointerup", f), l.removeEventListener("pointercancel", f), le(!1);
|
|
4038
4046
|
}
|
|
4039
4047
|
l.addEventListener("pointermove", d), l.addEventListener("pointerup", f), l.addEventListener("pointercancel", f);
|
|
4040
4048
|
}
|
|
4041
|
-
let
|
|
4049
|
+
let me = Ce(() => {
|
|
4042
4050
|
let t = Tr({
|
|
4043
4051
|
anchorX: e.anchorX,
|
|
4044
4052
|
anchorY: e.anchorY,
|
|
@@ -4054,58 +4062,58 @@ function Ca({ thread: e, authorName: t, currentClientId: n, isVerified: r, canDe
|
|
|
4054
4062
|
e.anchorSelector
|
|
4055
4063
|
]);
|
|
4056
4064
|
return /* @__PURE__ */ $("div", {
|
|
4057
|
-
ref:
|
|
4065
|
+
ref: _,
|
|
4058
4066
|
id: "markup-thread-popover",
|
|
4059
|
-
class: Q("markup-popover",
|
|
4067
|
+
class: Q("markup-popover", oe && "is-floating", ce && "is-dragging"),
|
|
4060
4068
|
popover: "auto",
|
|
4061
4069
|
style: {
|
|
4062
|
-
"--markup-pop-x": `${
|
|
4063
|
-
"--markup-pop-y": `${
|
|
4070
|
+
"--markup-pop-x": `${oe?.left ?? me.left}px`,
|
|
4071
|
+
"--markup-pop-y": `${oe?.top ?? me.top}px`
|
|
4064
4072
|
},
|
|
4065
4073
|
role: "dialog",
|
|
4066
4074
|
"aria-label": "Markup thread",
|
|
4067
4075
|
children: [
|
|
4068
4076
|
/* @__PURE__ */ $("header", {
|
|
4069
4077
|
class: "markup-popover-header",
|
|
4070
|
-
onPointerDown:
|
|
4078
|
+
onPointerDown: pe,
|
|
4071
4079
|
children: [/* @__PURE__ */ $("span", {
|
|
4072
4080
|
class: "markup-eyebrow",
|
|
4073
4081
|
children: [
|
|
4074
4082
|
"thread · ",
|
|
4075
|
-
|
|
4083
|
+
F.length,
|
|
4076
4084
|
" ",
|
|
4077
|
-
|
|
4085
|
+
F.length === 1 ? "comment" : "comments"
|
|
4078
4086
|
]
|
|
4079
4087
|
}), /* @__PURE__ */ $("div", {
|
|
4080
4088
|
class: "markup-popover-header-actions",
|
|
4081
4089
|
children: [
|
|
4082
4090
|
/* @__PURE__ */ $("div", {
|
|
4083
4091
|
class: "markup-thread-menu",
|
|
4084
|
-
ref:
|
|
4092
|
+
ref: v,
|
|
4085
4093
|
children: [/* @__PURE__ */ $("button", {
|
|
4086
4094
|
type: "button",
|
|
4087
|
-
class: Q("markup-icon-btn",
|
|
4095
|
+
class: Q("markup-icon-btn", S && "is-open"),
|
|
4088
4096
|
title: "More options",
|
|
4089
|
-
onClick: () =>
|
|
4097
|
+
onClick: () => C((e) => !e),
|
|
4090
4098
|
children: /* @__PURE__ */ $(aa, { size: 16 })
|
|
4091
|
-
}),
|
|
4099
|
+
}), S ? /* @__PURE__ */ $("div", {
|
|
4092
4100
|
class: "markup-thread-menu-list",
|
|
4093
4101
|
children: [/* @__PURE__ */ $("button", {
|
|
4094
4102
|
type: "button",
|
|
4095
4103
|
class: "markup-thread-menu-item",
|
|
4096
4104
|
onClick: () => {
|
|
4097
4105
|
let t = new URL(e.url);
|
|
4098
|
-
t.hash = `markup-thread=${e._id}`, navigator.clipboard.writeText(t.toString()).catch(() => {}),
|
|
4106
|
+
t.hash = `markup-thread=${e._id}`, navigator.clipboard.writeText(t.toString()).catch(() => {}), C(!1);
|
|
4099
4107
|
},
|
|
4100
4108
|
children: "Copy link"
|
|
4101
|
-
}),
|
|
4109
|
+
}), a ? /* @__PURE__ */ $("button", {
|
|
4102
4110
|
type: "button",
|
|
4103
|
-
class: Q("markup-thread-menu-item",
|
|
4104
|
-
disabled:
|
|
4111
|
+
class: Q("markup-thread-menu-item", w && "is-danger"),
|
|
4112
|
+
disabled: o,
|
|
4105
4113
|
onClick: () => {
|
|
4106
|
-
|
|
4114
|
+
w ? (C(!1), g()) : T(!0);
|
|
4107
4115
|
},
|
|
4108
|
-
children:
|
|
4116
|
+
children: w ? "Confirm delete" : "Delete thread…"
|
|
4109
4117
|
}) : null]
|
|
4110
4118
|
}) : null]
|
|
4111
4119
|
}),
|
|
@@ -4113,25 +4121,25 @@ function Ca({ thread: e, authorName: t, currentClientId: n, isVerified: r, canDe
|
|
|
4113
4121
|
type: "button",
|
|
4114
4122
|
class: "markup-icon-btn",
|
|
4115
4123
|
title: "Mark as resolved",
|
|
4116
|
-
disabled:
|
|
4117
|
-
onClick:
|
|
4124
|
+
disabled: o,
|
|
4125
|
+
onClick: h,
|
|
4118
4126
|
children: /* @__PURE__ */ $(oa, { size: 16 })
|
|
4119
4127
|
}) : null,
|
|
4120
4128
|
/* @__PURE__ */ $("button", {
|
|
4121
4129
|
type: "button",
|
|
4122
4130
|
class: "markup-icon-btn",
|
|
4123
4131
|
title: "Close thread",
|
|
4124
|
-
onClick:
|
|
4132
|
+
onClick: u,
|
|
4125
4133
|
children: /* @__PURE__ */ $(ia, { size: 16 })
|
|
4126
4134
|
})
|
|
4127
4135
|
]
|
|
4128
4136
|
})]
|
|
4129
4137
|
}),
|
|
4130
4138
|
/* @__PURE__ */ $("ol", {
|
|
4131
|
-
ref:
|
|
4139
|
+
ref: b,
|
|
4132
4140
|
class: "markup-comments",
|
|
4133
|
-
children:
|
|
4134
|
-
let i = !t.fromDashboard && n != null && t.authorClientId === n,
|
|
4141
|
+
children: F.map((t, r) => {
|
|
4142
|
+
let i = !t.fromDashboard && n != null && t.authorClientId === n, a = r === 0, s = i && !ue && !t.deleted, c = i && !ue && !t.deleted && !a, l = E === t._id, u = (s || c) && !l && !t.deleted, d = k === t._id, h = ne === t._id;
|
|
4135
4143
|
return /* @__PURE__ */ $("li", {
|
|
4136
4144
|
class: Q("markup-comment", t.fromDashboard && "is-team"),
|
|
4137
4145
|
children: [
|
|
@@ -4154,56 +4162,56 @@ function Ca({ thread: e, authorName: t, currentClientId: n, isVerified: r, canDe
|
|
|
4154
4162
|
}),
|
|
4155
4163
|
/* @__PURE__ */ $("div", {
|
|
4156
4164
|
class: "markup-thread-actions",
|
|
4157
|
-
children: [!
|
|
4165
|
+
children: [!ue && !l ? /* @__PURE__ */ $(wa, {
|
|
4158
4166
|
comment: t,
|
|
4159
|
-
pickerOpen:
|
|
4160
|
-
pickerDirection:
|
|
4167
|
+
pickerOpen: N === t._id,
|
|
4168
|
+
pickerDirection: re,
|
|
4161
4169
|
pickerRef: (e) => {
|
|
4162
|
-
|
|
4170
|
+
N === t._id && (ae.current = e);
|
|
4163
4171
|
},
|
|
4164
4172
|
onPickerClick: (e) => {
|
|
4165
|
-
if (
|
|
4166
|
-
|
|
4173
|
+
if (N === t._id) {
|
|
4174
|
+
P(null);
|
|
4167
4175
|
return;
|
|
4168
4176
|
}
|
|
4169
|
-
let n = e.currentTarget.getBoundingClientRect(), r =
|
|
4170
|
-
|
|
4177
|
+
let n = e.currentTarget.getBoundingClientRect(), r = b.current?.getBoundingClientRect();
|
|
4178
|
+
ie((r ? r.bottom - n.bottom : Infinity) < 44 ? "up" : "down"), P(t._id);
|
|
4171
4179
|
},
|
|
4172
4180
|
onPickerSelect: (e) => {
|
|
4173
|
-
|
|
4181
|
+
P(null), m(t._id, e);
|
|
4174
4182
|
}
|
|
4175
4183
|
}) : null, u ? /* @__PURE__ */ $("div", {
|
|
4176
|
-
class: Q("markup-thread-menu markup-comment-menu",
|
|
4184
|
+
class: Q("markup-thread-menu markup-comment-menu", d && "is-open", d && te === "up" && "is-up"),
|
|
4177
4185
|
ref: (e) => {
|
|
4178
|
-
|
|
4186
|
+
d && (y.current = e);
|
|
4179
4187
|
},
|
|
4180
4188
|
children: [/* @__PURE__ */ $("button", {
|
|
4181
4189
|
type: "button",
|
|
4182
|
-
class: Q("markup-icon-btn",
|
|
4190
|
+
class: Q("markup-icon-btn", d && "is-open"),
|
|
4183
4191
|
title: "More options",
|
|
4184
4192
|
onClick: (e) => {
|
|
4185
4193
|
if (k === t._id) {
|
|
4186
4194
|
A(null);
|
|
4187
4195
|
return;
|
|
4188
4196
|
}
|
|
4189
|
-
let n = e.currentTarget.getBoundingClientRect(), r =
|
|
4190
|
-
|
|
4197
|
+
let n = e.currentTarget.getBoundingClientRect(), r = b.current?.getBoundingClientRect(), i = (+!!s + +!!c) * 32 + 8 + 6;
|
|
4198
|
+
j((r ? r.bottom - n.bottom : Infinity) < i ? "up" : "down"), A(t._id);
|
|
4191
4199
|
},
|
|
4192
4200
|
children: /* @__PURE__ */ $(aa, { size: 16 })
|
|
4193
|
-
}),
|
|
4201
|
+
}), d ? /* @__PURE__ */ $("div", {
|
|
4194
4202
|
class: "markup-thread-menu-list",
|
|
4195
4203
|
children: [s ? /* @__PURE__ */ $("button", {
|
|
4196
4204
|
type: "button",
|
|
4197
4205
|
class: "markup-thread-menu-item",
|
|
4198
4206
|
onClick: () => {
|
|
4199
|
-
A(null),
|
|
4207
|
+
A(null), I(t._id, t.body);
|
|
4200
4208
|
},
|
|
4201
4209
|
children: "Edit"
|
|
4202
4210
|
}) : null, c ? /* @__PURE__ */ $("button", {
|
|
4203
4211
|
type: "button",
|
|
4204
4212
|
class: Q("markup-thread-menu-item", h && "is-danger"),
|
|
4205
4213
|
onClick: () => {
|
|
4206
|
-
h ? (A(null),
|
|
4214
|
+
h ? (A(null), p(t._id)) : M(t._id);
|
|
4207
4215
|
},
|
|
4208
4216
|
children: h ? "Confirm delete" : "Delete…"
|
|
4209
4217
|
}) : null]
|
|
@@ -4216,34 +4224,34 @@ function Ca({ thread: e, authorName: t, currentClientId: n, isVerified: r, canDe
|
|
|
4216
4224
|
class: "markup-comment-edit-form",
|
|
4217
4225
|
onSubmit: async (e) => {
|
|
4218
4226
|
e.preventDefault();
|
|
4219
|
-
let n =
|
|
4227
|
+
let n = O.trim();
|
|
4220
4228
|
if (!n || n === t.body) {
|
|
4221
|
-
|
|
4229
|
+
de();
|
|
4222
4230
|
return;
|
|
4223
4231
|
}
|
|
4224
4232
|
try {
|
|
4225
|
-
await
|
|
4233
|
+
await f(t._id, n), de();
|
|
4226
4234
|
} catch {}
|
|
4227
4235
|
},
|
|
4228
4236
|
children: [/* @__PURE__ */ $("textarea", {
|
|
4229
4237
|
class: "markup-textarea",
|
|
4230
|
-
value:
|
|
4231
|
-
onInput: (e) =>
|
|
4238
|
+
value: O,
|
|
4239
|
+
onInput: (e) => ee(e.currentTarget.value),
|
|
4232
4240
|
rows: 3,
|
|
4233
4241
|
autoFocus: !0,
|
|
4234
|
-
disabled:
|
|
4242
|
+
disabled: o
|
|
4235
4243
|
}), /* @__PURE__ */ $("div", {
|
|
4236
4244
|
class: "markup-comment-edit-actions",
|
|
4237
4245
|
children: [/* @__PURE__ */ $("button", {
|
|
4238
4246
|
type: "button",
|
|
4239
4247
|
class: "markup-btn markup-btn-ghost",
|
|
4240
|
-
onClick:
|
|
4241
|
-
disabled:
|
|
4248
|
+
onClick: de,
|
|
4249
|
+
disabled: o,
|
|
4242
4250
|
children: "Cancel"
|
|
4243
4251
|
}), /* @__PURE__ */ $("button", {
|
|
4244
4252
|
type: "submit",
|
|
4245
4253
|
class: "markup-btn markup-btn-primary",
|
|
4246
|
-
disabled:
|
|
4254
|
+
disabled: o || O.trim().length === 0,
|
|
4247
4255
|
children: "Save"
|
|
4248
4256
|
})]
|
|
4249
4257
|
})]
|
|
@@ -4258,13 +4266,13 @@ function Ca({ thread: e, authorName: t, currentClientId: n, isVerified: r, canDe
|
|
|
4258
4266
|
}),
|
|
4259
4267
|
!l && t.reactions.length > 0 ? /* @__PURE__ */ $(Ta, {
|
|
4260
4268
|
comment: t,
|
|
4261
|
-
isResolved:
|
|
4262
|
-
onToggle: (e) =>
|
|
4269
|
+
isResolved: ue,
|
|
4270
|
+
onToggle: (e) => m(t._id, e)
|
|
4263
4271
|
}) : null,
|
|
4264
4272
|
r === 0 && e.screenshotUrl ? /* @__PURE__ */ $("button", {
|
|
4265
4273
|
type: "button",
|
|
4266
4274
|
class: "markup-comment-screenshot",
|
|
4267
|
-
onClick: () =>
|
|
4275
|
+
onClick: () => x.current?.showModal(),
|
|
4268
4276
|
children: /* @__PURE__ */ $("img", {
|
|
4269
4277
|
src: e.screenshotUrl,
|
|
4270
4278
|
alt: "Screenshot"
|
|
@@ -4275,15 +4283,15 @@ function Ca({ thread: e, authorName: t, currentClientId: n, isVerified: r, canDe
|
|
|
4275
4283
|
})
|
|
4276
4284
|
}),
|
|
4277
4285
|
e.screenshotUrl ? /* @__PURE__ */ $("dialog", {
|
|
4278
|
-
ref:
|
|
4286
|
+
ref: x,
|
|
4279
4287
|
class: "markup-lightbox",
|
|
4280
|
-
onClick: () =>
|
|
4288
|
+
onClick: () => x.current?.close(),
|
|
4281
4289
|
children: [/* @__PURE__ */ $("button", {
|
|
4282
4290
|
type: "button",
|
|
4283
4291
|
class: "markup-lightbox-close markup-icon-btn",
|
|
4284
4292
|
"aria-label": "Close screenshot",
|
|
4285
4293
|
onClick: (e) => {
|
|
4286
|
-
e.stopPropagation(),
|
|
4294
|
+
e.stopPropagation(), x.current?.close();
|
|
4287
4295
|
},
|
|
4288
4296
|
children: /* @__PURE__ */ $(ia, { size: 16 })
|
|
4289
4297
|
}), /* @__PURE__ */ $("img", {
|
|
@@ -4294,10 +4302,11 @@ function Ca({ thread: e, authorName: t, currentClientId: n, isVerified: r, canDe
|
|
|
4294
4302
|
})]
|
|
4295
4303
|
}) : null,
|
|
4296
4304
|
t == null ? /* @__PURE__ */ $(ma, {
|
|
4297
|
-
pending:
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4305
|
+
pending: o,
|
|
4306
|
+
connecting: i,
|
|
4307
|
+
onSubmit: c,
|
|
4308
|
+
onCancel: u,
|
|
4309
|
+
onSignIn: l
|
|
4301
4310
|
}) : /* @__PURE__ */ $("div", {
|
|
4302
4311
|
class: "markup-popover-body",
|
|
4303
4312
|
children: [/* @__PURE__ */ $("p", {
|
|
@@ -4318,9 +4327,9 @@ function Ca({ thread: e, authorName: t, currentClientId: n, isVerified: r, canDe
|
|
|
4318
4327
|
placeholder: "Write a reply…",
|
|
4319
4328
|
submitLabel: "Reply",
|
|
4320
4329
|
initialFocus: !1,
|
|
4321
|
-
pending:
|
|
4322
|
-
error:
|
|
4323
|
-
onSubmit:
|
|
4330
|
+
pending: o,
|
|
4331
|
+
error: s,
|
|
4332
|
+
onSubmit: d
|
|
4324
4333
|
})]
|
|
4325
4334
|
})
|
|
4326
4335
|
]
|
|
@@ -4423,7 +4432,7 @@ function Aa(e) {
|
|
|
4423
4432
|
function ja({ apiUrl: e, apiKey: t, position: n = "bottom-right" }) {
|
|
4424
4433
|
let [r, i] = R(() => window.location.pathname), [a, o] = R([]), [s, c] = R(null), [l, u] = R(n), d = B(null);
|
|
4425
4434
|
d.current = s;
|
|
4426
|
-
let f = Ce(() => Or({
|
|
4435
|
+
let [f, p] = R(0), m = Ce(() => Or({
|
|
4427
4436
|
apiUrl: e,
|
|
4428
4437
|
apiKey: t,
|
|
4429
4438
|
getToken: () => {
|
|
@@ -4439,16 +4448,15 @@ function ja({ apiUrl: e, apiKey: t, position: n = "bottom-right" }) {
|
|
|
4439
4448
|
},
|
|
4440
4449
|
onUnauthorized: () => {
|
|
4441
4450
|
let e = d.current;
|
|
4442
|
-
if (!e) return;
|
|
4451
|
+
if (!e || !e.token) return;
|
|
4443
4452
|
let t = {
|
|
4444
4453
|
clientId: e.clientId,
|
|
4445
4454
|
name: e.name,
|
|
4446
|
-
email: e.email
|
|
4447
|
-
anonToken: e.anonToken
|
|
4455
|
+
email: e.email
|
|
4448
4456
|
};
|
|
4449
|
-
d.current = t, c(t), Mr(t);
|
|
4457
|
+
d.current = t, c(t), Mr(t), p((e) => e + 1);
|
|
4450
4458
|
}
|
|
4451
|
-
}), [e, t]), [
|
|
4459
|
+
}), [e, t]), [h, g] = R({ kind: "idle" }), [_, v] = R(!1), [y, b] = R(null), [x, S] = R(!1), [C, w] = R(!1), [, T] = R(0), E = B(null), D = s?.name ?? null, O = s?.isVerified ?? !1, ee = s == null;
|
|
4452
4460
|
z(() => {
|
|
4453
4461
|
let e = jr();
|
|
4454
4462
|
if (e?.anonToken || e?.isVerified) {
|
|
@@ -4457,12 +4465,13 @@ function ja({ apiUrl: e, apiKey: t, position: n = "bottom-right" }) {
|
|
|
4457
4465
|
}
|
|
4458
4466
|
let t = !1, n = null, r = 1e3;
|
|
4459
4467
|
function i() {
|
|
4460
|
-
|
|
4468
|
+
m.mintAnonIdentity().then(({ clientId: n, token: r }) => {
|
|
4461
4469
|
if (t) return;
|
|
4462
4470
|
let i = {
|
|
4463
|
-
...e ?? {},
|
|
4464
4471
|
clientId: n,
|
|
4465
|
-
anonToken: r
|
|
4472
|
+
anonToken: r,
|
|
4473
|
+
name: e?.name,
|
|
4474
|
+
email: e?.email
|
|
4466
4475
|
};
|
|
4467
4476
|
Mr(i), c(i);
|
|
4468
4477
|
}).catch(() => {
|
|
@@ -4472,15 +4481,15 @@ function ja({ apiUrl: e, apiKey: t, position: n = "bottom-right" }) {
|
|
|
4472
4481
|
return i(), () => {
|
|
4473
4482
|
t = !0, n && clearTimeout(n);
|
|
4474
4483
|
};
|
|
4475
|
-
}, [f]);
|
|
4476
|
-
let [
|
|
4484
|
+
}, [m, f]);
|
|
4485
|
+
let [k, A] = R(null);
|
|
4477
4486
|
z(() => {
|
|
4478
4487
|
let e = !1, t = null;
|
|
4479
4488
|
async function n() {
|
|
4480
4489
|
try {
|
|
4481
|
-
let r = await
|
|
4490
|
+
let r = await m.getSubscriptionToken();
|
|
4482
4491
|
if (e) return;
|
|
4483
|
-
|
|
4492
|
+
A(r.token);
|
|
4484
4493
|
let i = Math.max(6e4, r.expiresAt - Date.now() - 30 * 6e4);
|
|
4485
4494
|
t = setTimeout(n, i);
|
|
4486
4495
|
} catch {
|
|
@@ -4491,37 +4500,37 @@ function ja({ apiUrl: e, apiKey: t, position: n = "bottom-right" }) {
|
|
|
4491
4500
|
return n(), () => {
|
|
4492
4501
|
e = !0, t && clearTimeout(t);
|
|
4493
4502
|
};
|
|
4494
|
-
}, [
|
|
4495
|
-
let
|
|
4503
|
+
}, [m]);
|
|
4504
|
+
let te = B(null);
|
|
4496
4505
|
z(() => {
|
|
4497
4506
|
let t = new rr(e.replace(/\.convex\.site(\/.*)?$/, ".convex.cloud"));
|
|
4498
|
-
return
|
|
4499
|
-
t.close(),
|
|
4507
|
+
return te.current = t, () => {
|
|
4508
|
+
t.close(), te.current = null;
|
|
4500
4509
|
};
|
|
4501
4510
|
}, [e]);
|
|
4502
|
-
let
|
|
4511
|
+
let j = B(!1);
|
|
4503
4512
|
z(() => {
|
|
4504
|
-
let e =
|
|
4505
|
-
if (!(!e || !
|
|
4506
|
-
subscriptionToken:
|
|
4513
|
+
let e = te.current;
|
|
4514
|
+
if (!(!e || !k)) return j.current = !1, b(null), e.onUpdate(qt("widget/queries:subscribeThreadsForRoute"), {
|
|
4515
|
+
subscriptionToken: k,
|
|
4507
4516
|
route: r,
|
|
4508
4517
|
viewerClientId: s?.clientId ?? void 0
|
|
4509
4518
|
}, (e) => {
|
|
4510
4519
|
e !== void 0 && o(e);
|
|
4511
4520
|
});
|
|
4512
4521
|
}, [
|
|
4513
|
-
|
|
4522
|
+
k,
|
|
4514
4523
|
r,
|
|
4515
4524
|
s?.clientId
|
|
4516
4525
|
]), z(() => {
|
|
4517
|
-
if (
|
|
4526
|
+
if (j.current) return;
|
|
4518
4527
|
let e = window.location.hash.match(/^#markup-thread=(.+)$/);
|
|
4519
4528
|
if (!e) {
|
|
4520
|
-
|
|
4529
|
+
j.current = !0;
|
|
4521
4530
|
return;
|
|
4522
4531
|
}
|
|
4523
4532
|
let t = decodeURIComponent(e[1] ?? "");
|
|
4524
|
-
a.find((e) => e._id === t) && (
|
|
4533
|
+
a.find((e) => e._id === t) && (j.current = !0, g({
|
|
4525
4534
|
kind: "thread",
|
|
4526
4535
|
threadId: t
|
|
4527
4536
|
}), history.replaceState(null, "", window.location.pathname + window.location.search));
|
|
@@ -4540,20 +4549,20 @@ function ja({ apiUrl: e, apiKey: t, position: n = "bottom-right" }) {
|
|
|
4540
4549
|
};
|
|
4541
4550
|
}, []), z(() => {
|
|
4542
4551
|
function e(e) {
|
|
4543
|
-
e.key === "." && (e.metaKey || e.ctrlKey) && (e.altKey || e.shiftKey || (e.preventDefault(),
|
|
4552
|
+
e.key === "." && (e.metaKey || e.ctrlKey) && (e.altKey || e.shiftKey || (e.preventDefault(), S((e) => !e)));
|
|
4544
4553
|
}
|
|
4545
4554
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
4546
4555
|
}, []), z(() => {
|
|
4547
|
-
if (!
|
|
4548
|
-
if (!
|
|
4549
|
-
|
|
4556
|
+
if (!C) return;
|
|
4557
|
+
if (!x) {
|
|
4558
|
+
w(!1);
|
|
4550
4559
|
return;
|
|
4551
4560
|
}
|
|
4552
|
-
let e = window.setTimeout(() =>
|
|
4561
|
+
let e = window.setTimeout(() => w(!1), 5e3);
|
|
4553
4562
|
return () => window.clearTimeout(e);
|
|
4554
|
-
}, [
|
|
4563
|
+
}, [C, x]), z(() => {
|
|
4555
4564
|
function e() {
|
|
4556
|
-
|
|
4565
|
+
T((e) => e + 1);
|
|
4557
4566
|
}
|
|
4558
4567
|
window.addEventListener("scroll", e, { passive: !0 }), window.addEventListener("resize", e);
|
|
4559
4568
|
let t = new ResizeObserver(e);
|
|
@@ -4561,29 +4570,29 @@ function ja({ apiUrl: e, apiKey: t, position: n = "bottom-right" }) {
|
|
|
4561
4570
|
window.removeEventListener("scroll", e), window.removeEventListener("resize", e), t.disconnect();
|
|
4562
4571
|
};
|
|
4563
4572
|
}, []);
|
|
4564
|
-
let
|
|
4565
|
-
|
|
4573
|
+
let ne = V(() => {
|
|
4574
|
+
b(null), g({ kind: "placing" });
|
|
4566
4575
|
}, []), M = V(() => {
|
|
4567
|
-
|
|
4576
|
+
g({ kind: "idle" }), b(null);
|
|
4568
4577
|
}, []), N = V((e, t, n) => {
|
|
4569
|
-
|
|
4578
|
+
g({
|
|
4570
4579
|
kind: "composing-new",
|
|
4571
4580
|
coords: e,
|
|
4572
4581
|
pageX: t + window.scrollX,
|
|
4573
4582
|
pageY: n + window.scrollY,
|
|
4574
4583
|
screenshot: null,
|
|
4575
4584
|
screenshotCapturing: !0
|
|
4576
|
-
}), $i(
|
|
4585
|
+
}), $i(E.current != null && E.current.getRootNode() instanceof ShadowRoot ? E.current.getRootNode().host : null, {
|
|
4577
4586
|
x: t,
|
|
4578
4587
|
y: n
|
|
4579
4588
|
}).then((e) => {
|
|
4580
|
-
|
|
4589
|
+
g((t) => t.kind === "composing-new" ? {
|
|
4581
4590
|
...t,
|
|
4582
4591
|
screenshot: e,
|
|
4583
4592
|
screenshotCapturing: !1
|
|
4584
4593
|
} : t);
|
|
4585
4594
|
});
|
|
4586
|
-
}, []),
|
|
4595
|
+
}, []), P = V((e, t) => {
|
|
4587
4596
|
if (!s) return;
|
|
4588
4597
|
let n = {
|
|
4589
4598
|
...s,
|
|
@@ -4591,165 +4600,165 @@ function ja({ apiUrl: e, apiKey: t, position: n = "bottom-right" }) {
|
|
|
4591
4600
|
email: t
|
|
4592
4601
|
};
|
|
4593
4602
|
Mr(n), c(n);
|
|
4594
|
-
}, [s]),
|
|
4595
|
-
|
|
4603
|
+
}, [s]), re = V(async () => {
|
|
4604
|
+
b(null);
|
|
4596
4605
|
try {
|
|
4597
4606
|
let n = Aa(await Nr(e, t));
|
|
4598
4607
|
Mr(n), c(n);
|
|
4599
4608
|
} catch (e) {
|
|
4600
|
-
|
|
4609
|
+
b(e instanceof Error ? e.message : "Sign-in failed");
|
|
4601
4610
|
}
|
|
4602
|
-
}, [e, t]),
|
|
4603
|
-
if (!(
|
|
4604
|
-
|
|
4611
|
+
}, [e, t]), ie = V(async (e, t) => {
|
|
4612
|
+
if (!(h.kind !== "composing-new" || !s?.name)) {
|
|
4613
|
+
v(!0), b(null);
|
|
4605
4614
|
try {
|
|
4606
4615
|
let n;
|
|
4607
|
-
if (t &&
|
|
4608
|
-
let { uploadUrl: e } = await
|
|
4616
|
+
if (t && h.screenshot) {
|
|
4617
|
+
let { uploadUrl: e } = await m.getScreenshotUploadUrl(), t = await fetch(e, {
|
|
4609
4618
|
method: "POST",
|
|
4610
|
-
headers: { "Content-Type":
|
|
4611
|
-
body:
|
|
4619
|
+
headers: { "Content-Type": h.screenshot.type || "image/png" },
|
|
4620
|
+
body: h.screenshot
|
|
4612
4621
|
});
|
|
4613
4622
|
if (t.ok) {
|
|
4614
4623
|
let { storageId: e } = await t.json();
|
|
4615
4624
|
n = e;
|
|
4616
4625
|
}
|
|
4617
4626
|
}
|
|
4618
|
-
let i = await
|
|
4627
|
+
let i = await m.createThread({
|
|
4619
4628
|
url: window.location.href,
|
|
4620
4629
|
route: r,
|
|
4621
|
-
anchorSelector:
|
|
4622
|
-
anchorX:
|
|
4623
|
-
anchorY:
|
|
4624
|
-
anchorOffsetX:
|
|
4625
|
-
anchorOffsetY:
|
|
4626
|
-
viewportW:
|
|
4627
|
-
viewportY:
|
|
4630
|
+
anchorSelector: h.coords.anchorSelector,
|
|
4631
|
+
anchorX: h.coords.anchorX,
|
|
4632
|
+
anchorY: h.coords.anchorY,
|
|
4633
|
+
anchorOffsetX: h.coords.anchorOffsetX,
|
|
4634
|
+
anchorOffsetY: h.coords.anchorOffsetY,
|
|
4635
|
+
viewportW: h.coords.viewportW,
|
|
4636
|
+
viewportY: h.coords.viewportY,
|
|
4628
4637
|
userAgent: navigator.userAgent,
|
|
4629
4638
|
authorName: s.name,
|
|
4630
4639
|
authorEmail: s.email,
|
|
4631
4640
|
body: e,
|
|
4632
4641
|
screenshotStorageId: n
|
|
4633
4642
|
});
|
|
4634
|
-
o((e) => [...e, i.thread]),
|
|
4643
|
+
o((e) => [...e, i.thread]), g({
|
|
4635
4644
|
kind: "thread",
|
|
4636
4645
|
threadId: i.thread._id
|
|
4637
4646
|
});
|
|
4638
4647
|
} catch (e) {
|
|
4639
|
-
|
|
4648
|
+
b(e instanceof Error ? e.message : "Failed to post");
|
|
4640
4649
|
} finally {
|
|
4641
|
-
|
|
4650
|
+
v(!1);
|
|
4642
4651
|
}
|
|
4643
4652
|
}
|
|
4644
4653
|
}, [
|
|
4645
|
-
|
|
4654
|
+
m,
|
|
4646
4655
|
s,
|
|
4647
|
-
|
|
4656
|
+
h,
|
|
4648
4657
|
r
|
|
4649
|
-
]),
|
|
4650
|
-
if (
|
|
4651
|
-
let e =
|
|
4652
|
-
|
|
4658
|
+
]), ae = V(async () => {
|
|
4659
|
+
if (h.kind !== "thread") return;
|
|
4660
|
+
let e = h.threadId;
|
|
4661
|
+
v(!0), b(null);
|
|
4653
4662
|
try {
|
|
4654
|
-
await
|
|
4663
|
+
await m.deleteThread(e), o((t) => t.filter((t) => t._id !== e)), g({ kind: "idle" });
|
|
4655
4664
|
} catch (e) {
|
|
4656
|
-
|
|
4665
|
+
b(e instanceof Error ? e.message : "Failed to delete");
|
|
4657
4666
|
} finally {
|
|
4658
|
-
|
|
4667
|
+
v(!1);
|
|
4659
4668
|
}
|
|
4660
|
-
}, [
|
|
4661
|
-
if (
|
|
4662
|
-
let e =
|
|
4663
|
-
|
|
4669
|
+
}, [m, h]), oe = V(async () => {
|
|
4670
|
+
if (h.kind !== "thread") return;
|
|
4671
|
+
let e = h.threadId;
|
|
4672
|
+
v(!0), b(null);
|
|
4664
4673
|
try {
|
|
4665
|
-
await
|
|
4674
|
+
await m.resolveThread(e, s?.clientId), o((t) => t.filter((t) => t._id !== e)), g({ kind: "idle" });
|
|
4666
4675
|
} catch (e) {
|
|
4667
|
-
|
|
4676
|
+
b(e instanceof Error ? e.message : "Failed to resolve");
|
|
4668
4677
|
} finally {
|
|
4669
|
-
|
|
4678
|
+
v(!1);
|
|
4670
4679
|
}
|
|
4671
4680
|
}, [
|
|
4672
|
-
|
|
4673
|
-
|
|
4681
|
+
m,
|
|
4682
|
+
h,
|
|
4674
4683
|
s?.clientId
|
|
4675
|
-
]),
|
|
4676
|
-
if (
|
|
4677
|
-
let t =
|
|
4678
|
-
|
|
4684
|
+
]), se = V(async (e) => {
|
|
4685
|
+
if (h.kind !== "thread" || !s?.name) return;
|
|
4686
|
+
let t = h.threadId;
|
|
4687
|
+
v(!0), b(null);
|
|
4679
4688
|
try {
|
|
4680
|
-
let n = await
|
|
4689
|
+
let n = await m.addComment(t, {
|
|
4681
4690
|
body: e,
|
|
4682
4691
|
authorName: s.name,
|
|
4683
4692
|
authorEmail: s.email
|
|
4684
4693
|
});
|
|
4685
4694
|
o((e) => e.map((e) => e._id === t ? n.thread : e));
|
|
4686
4695
|
} catch (e) {
|
|
4687
|
-
|
|
4696
|
+
b(e instanceof Error ? e.message : "Failed to reply");
|
|
4688
4697
|
} finally {
|
|
4689
|
-
|
|
4698
|
+
v(!1);
|
|
4690
4699
|
}
|
|
4691
4700
|
}, [
|
|
4692
|
-
|
|
4701
|
+
m,
|
|
4693
4702
|
s,
|
|
4694
|
-
|
|
4695
|
-
]),
|
|
4696
|
-
if (
|
|
4697
|
-
let n =
|
|
4698
|
-
|
|
4703
|
+
h
|
|
4704
|
+
]), ce = V(async (e, t) => {
|
|
4705
|
+
if (h.kind !== "thread" || !s) return;
|
|
4706
|
+
let n = h.threadId;
|
|
4707
|
+
v(!0), b(null);
|
|
4699
4708
|
try {
|
|
4700
|
-
let r = await
|
|
4709
|
+
let r = await m.editComment(n, e, { body: t });
|
|
4701
4710
|
o((e) => e.map((e) => e._id === n ? r.thread : e));
|
|
4702
4711
|
} catch (e) {
|
|
4703
|
-
throw
|
|
4712
|
+
throw b(e instanceof Error ? e.message : "Failed to edit"), e;
|
|
4704
4713
|
} finally {
|
|
4705
|
-
|
|
4714
|
+
v(!1);
|
|
4706
4715
|
}
|
|
4707
4716
|
}, [
|
|
4708
|
-
|
|
4717
|
+
m,
|
|
4709
4718
|
s,
|
|
4710
|
-
|
|
4711
|
-
]),
|
|
4712
|
-
if (
|
|
4713
|
-
let t =
|
|
4714
|
-
|
|
4719
|
+
h
|
|
4720
|
+
]), le = V(async (e) => {
|
|
4721
|
+
if (h.kind !== "thread" || !s) return;
|
|
4722
|
+
let t = h.threadId;
|
|
4723
|
+
v(!0), b(null);
|
|
4715
4724
|
try {
|
|
4716
|
-
let n = await
|
|
4725
|
+
let n = await m.deleteComment(t, e);
|
|
4717
4726
|
o((e) => e.map((e) => e._id === t ? n.thread : e));
|
|
4718
4727
|
} catch (e) {
|
|
4719
|
-
|
|
4728
|
+
b(e instanceof Error ? e.message : "Failed to delete");
|
|
4720
4729
|
} finally {
|
|
4721
|
-
|
|
4730
|
+
v(!1);
|
|
4722
4731
|
}
|
|
4723
4732
|
}, [
|
|
4724
|
-
|
|
4733
|
+
m,
|
|
4725
4734
|
s,
|
|
4726
|
-
|
|
4727
|
-
]),
|
|
4728
|
-
if (
|
|
4729
|
-
let n =
|
|
4730
|
-
|
|
4735
|
+
h
|
|
4736
|
+
]), ue = V(async (e, t) => {
|
|
4737
|
+
if (h.kind !== "thread" || !s) return;
|
|
4738
|
+
let n = h.threadId;
|
|
4739
|
+
b(null);
|
|
4731
4740
|
try {
|
|
4732
|
-
let r = await
|
|
4741
|
+
let r = await m.toggleReaction(e, {
|
|
4733
4742
|
emoji: t,
|
|
4734
4743
|
authorName: s.name
|
|
4735
4744
|
});
|
|
4736
4745
|
o((e) => e.map((e) => e._id === n ? r.thread : e));
|
|
4737
4746
|
} catch (e) {
|
|
4738
|
-
|
|
4747
|
+
b(e instanceof Error ? e.message : "Failed to react");
|
|
4739
4748
|
}
|
|
4740
4749
|
}, [
|
|
4741
|
-
|
|
4750
|
+
m,
|
|
4742
4751
|
s,
|
|
4743
|
-
|
|
4744
|
-
]),
|
|
4752
|
+
h
|
|
4753
|
+
]), F = h.kind === "thread" ? a.find((e) => e._id === h.threadId) ?? null : null, I = O || s?.clientId != null && s.clientId === F?.authorClientId;
|
|
4745
4754
|
return /* @__PURE__ */ $("div", {
|
|
4746
4755
|
class: "markup-root",
|
|
4747
|
-
ref:
|
|
4756
|
+
ref: E,
|
|
4748
4757
|
children: [
|
|
4749
|
-
|
|
4758
|
+
h.kind === "placing" ? null : /* @__PURE__ */ $("div", {
|
|
4750
4759
|
class: "markup-pins-layer",
|
|
4751
|
-
children: [
|
|
4752
|
-
let t =
|
|
4760
|
+
children: [x ? null : a.map((e) => {
|
|
4761
|
+
let t = h.kind === "thread" && h.threadId === e._id, n = Tr({
|
|
4753
4762
|
anchorX: e.anchorX,
|
|
4754
4763
|
anchorY: e.anchorY,
|
|
4755
4764
|
anchorSelector: e.anchorSelector,
|
|
@@ -4761,62 +4770,64 @@ function ja({ apiUrl: e, apiKey: t, position: n = "bottom-right" }) {
|
|
|
4761
4770
|
pageY: n.pageY,
|
|
4762
4771
|
count: r,
|
|
4763
4772
|
active: t,
|
|
4764
|
-
onClick: () =>
|
|
4773
|
+
onClick: () => g({
|
|
4765
4774
|
kind: "thread",
|
|
4766
4775
|
threadId: e._id
|
|
4767
4776
|
})
|
|
4768
4777
|
}, e._id);
|
|
4769
|
-
}),
|
|
4770
|
-
pageX:
|
|
4771
|
-
pageY:
|
|
4778
|
+
}), h.kind === "composing-new" ? /* @__PURE__ */ $(ba, {
|
|
4779
|
+
pageX: h.pageX,
|
|
4780
|
+
pageY: h.pageY
|
|
4772
4781
|
}) : null]
|
|
4773
4782
|
}),
|
|
4774
|
-
|
|
4783
|
+
h.kind === "placing" ? /* @__PURE__ */ $(xa, {
|
|
4775
4784
|
onPlace: N,
|
|
4776
4785
|
onCancel: M
|
|
4777
4786
|
}) : null,
|
|
4778
|
-
|
|
4779
|
-
thread:
|
|
4780
|
-
authorName:
|
|
4787
|
+
h.kind === "thread" && F && !x ? /* @__PURE__ */ $(Ca, {
|
|
4788
|
+
thread: F,
|
|
4789
|
+
authorName: D,
|
|
4781
4790
|
currentClientId: s?.clientId ?? null,
|
|
4782
|
-
isVerified:
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4791
|
+
isVerified: O,
|
|
4792
|
+
identityResolving: ee,
|
|
4793
|
+
canDelete: I,
|
|
4794
|
+
pending: _,
|
|
4795
|
+
error: y,
|
|
4796
|
+
onAuthor: P,
|
|
4797
|
+
onSignIn: re,
|
|
4788
4798
|
onClose: M,
|
|
4789
|
-
onReply:
|
|
4790
|
-
onEditComment:
|
|
4791
|
-
onDeleteComment:
|
|
4792
|
-
onToggleReaction:
|
|
4793
|
-
onDelete:
|
|
4794
|
-
onResolve:
|
|
4799
|
+
onReply: se,
|
|
4800
|
+
onEditComment: ce,
|
|
4801
|
+
onDeleteComment: le,
|
|
4802
|
+
onToggleReaction: ue,
|
|
4803
|
+
onDelete: ae,
|
|
4804
|
+
onResolve: oe
|
|
4795
4805
|
}) : null,
|
|
4796
|
-
|
|
4797
|
-
pageX:
|
|
4798
|
-
pageY:
|
|
4799
|
-
authorName:
|
|
4800
|
-
isVerified:
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4806
|
+
h.kind === "composing-new" ? /* @__PURE__ */ $(_a, {
|
|
4807
|
+
pageX: h.pageX,
|
|
4808
|
+
pageY: h.pageY,
|
|
4809
|
+
authorName: D,
|
|
4810
|
+
isVerified: O,
|
|
4811
|
+
identityResolving: ee,
|
|
4812
|
+
pending: _,
|
|
4813
|
+
error: y,
|
|
4814
|
+
screenshot: h.screenshot,
|
|
4815
|
+
screenshotCapturing: h.screenshotCapturing,
|
|
4816
|
+
onAuthor: P,
|
|
4817
|
+
onSignIn: re,
|
|
4818
|
+
onSubmit: ie,
|
|
4808
4819
|
onClose: M
|
|
4809
4820
|
}) : null,
|
|
4810
|
-
!
|
|
4811
|
-
active:
|
|
4812
|
-
onToggle: () =>
|
|
4821
|
+
!x || h.kind === "placing" || h.kind === "composing-new" ? /* @__PURE__ */ $(ua, {
|
|
4822
|
+
active: h.kind === "placing",
|
|
4823
|
+
onToggle: () => h.kind === "placing" ? M() : ne(),
|
|
4813
4824
|
onHide: () => {
|
|
4814
|
-
|
|
4825
|
+
S(!0), w(!0);
|
|
4815
4826
|
},
|
|
4816
4827
|
position: l,
|
|
4817
4828
|
onPositionChange: u
|
|
4818
4829
|
}) : null,
|
|
4819
|
-
|
|
4830
|
+
x && C ? /* @__PURE__ */ $(Ma, { position: l }) : null
|
|
4820
4831
|
]
|
|
4821
4832
|
});
|
|
4822
4833
|
}
|
|
@@ -4847,11 +4858,11 @@ function Na(e, t) {
|
|
|
4847
4858
|
let n = t.theme ?? "auto";
|
|
4848
4859
|
n !== "auto" && (e.dataset.theme = n);
|
|
4849
4860
|
let r = e.attachShadow({ mode: "open" }), i = document.createElement("style");
|
|
4850
|
-
i.textContent =
|
|
4861
|
+
i.textContent = ue, r.appendChild(i);
|
|
4851
4862
|
let a = document.createElement("div");
|
|
4852
4863
|
a.className = "markup-shadow-root", r.appendChild(a);
|
|
4853
4864
|
let { theme: o, ...s } = t;
|
|
4854
|
-
return
|
|
4865
|
+
return le(/* @__PURE__ */ $(ja, { ...s }), a), () => le(null, a);
|
|
4855
4866
|
}
|
|
4856
4867
|
//#endregion
|
|
4857
4868
|
//#region src/widget.ts
|