@pixelmatters/markup 1.20.0 → 1.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -14
- package/dist/widget.js +885 -853
- package/dist/widget.js.map +1 -1
- package/package.json +1 -1
- package/skills/install-markup-widget/SKILL.md +4 -4
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), te(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 k(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 = A(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 = te(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 = j(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 A(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 = M(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 j(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 = j(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 A(e, t, n, r) {
|
|
|
86
86
|
while (t != null && t.nodeType == 8);
|
|
87
87
|
return t;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function M(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);
|
|
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 j(e, t, n, r) {
|
|
|
94
94
|
}
|
|
95
95
|
return -1;
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function N(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 P(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 || N(e.style, t, "");
|
|
105
|
+
if (n) for (t in n) r && n[t] == r[t] || N(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 N(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 ee(e) {
|
|
118
118
|
return function(n) {
|
|
119
119
|
if (this.l) {
|
|
120
120
|
var r = this.l[n.type + e];
|
|
@@ -124,16 +124,16 @@ function te(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 te(e, n, r, i, a, o, s, c, l, u) {
|
|
128
|
+
var d, f, p, m, g, b, x, w, T, E, D, O, A, j, M, N, P = 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
|
|
131
|
+
n: if (typeof P == "function") {
|
|
132
132
|
f = s.length;
|
|
133
133
|
try {
|
|
134
|
-
if (T = n.props, E =
|
|
134
|
+
if (T = n.props, E = P.prototype && P.prototype.render, D = (d = P.contextType) && i[d.__c], O = d ? D ? D.props.value : d.__ : i, r.__c ? w = (p = n.__c = r.__c).__ = p.__E : (E ? n.__c = p = new P(T, O) : (n.__c = p = new C(T, O), p.constructor = P, p.render = ce), D && D.sub(p), p.state || (p.state = {}), p.__n = i, m = p.__d = !0, p.__h = [], p._sb = []), E && p.__s == null && (p.__s = p.state), E && P.getDerivedStateFromProps != null && (p.__s == p.state && (p.__s = v({}, p.__s)), v(p.__s, P.getDerivedStateFromProps(T, p.__s))), g = p.props, b = p.state, p.__v = n, m) E && P.getDerivedStateFromProps == null && p.componentWillMount != null && p.componentWillMount(), E && p.componentDidMount != null && p.__h.push(p.componentDidMount);
|
|
135
135
|
else {
|
|
136
|
-
if (E &&
|
|
136
|
+
if (E && P.getDerivedStateFromProps == null && T !== g && p.componentWillReceiveProps != null && p.componentWillReceiveProps(T, O), n.__v == r.__v || !p.__e && p.shouldComponentUpdate != null && !1 === p.shouldComponentUpdate(T, p.__s, O)) {
|
|
137
137
|
n.__v != r.__v && (p.props = T, p.state = p.__s, p.__d = !1), n.__e = r.__e, n.__k = r.__k, n.__k.some(function(e) {
|
|
138
138
|
e && (e.__ = n);
|
|
139
139
|
}), h.push.apply(p.__h, p._sb), p._sb = [], p.__h.length && s.push(p);
|
|
@@ -143,28 +143,28 @@ function ne(e, n, r, i, a, o, s, c, l, u) {
|
|
|
143
143
|
p.componentDidUpdate(g, b, x);
|
|
144
144
|
});
|
|
145
145
|
}
|
|
146
|
-
if (p.context = O, p.props = T, p.__P = e, p.__e = !1,
|
|
146
|
+
if (p.context = O, p.props = T, p.__P = e, p.__e = !1, A = t.__r, j = 0, E) p.state = p.__s, p.__d = !1, A && A(n), d = p.render(p.props, p.state, p.context), h.push.apply(p.__h, p._sb), p._sb = [];
|
|
147
147
|
else do
|
|
148
|
-
p.__d = !1,
|
|
149
|
-
while (p.__d && ++
|
|
150
|
-
p.state = p.__s, p.getChildContext != null && (i = v(v({}, i), p.getChildContext())), E && !m && p.getSnapshotBeforeUpdate != null && (x = p.getSnapshotBeforeUpdate(g, b)),
|
|
148
|
+
p.__d = !1, A && A(n), d = p.render(p.props, p.state, p.context), p.state = p.__s;
|
|
149
|
+
while (p.__d && ++j < 25);
|
|
150
|
+
p.state = p.__s, p.getChildContext != null && (i = v(v({}, i), p.getChildContext())), E && !m && p.getSnapshotBeforeUpdate != null && (x = p.getSnapshotBeforeUpdate(g, b)), M = d != null && d.type === S && d.key == null ? ie(d.props.children) : d, c = k(e, _(M) ? M : [M], n, r, i, a, o, s, c, l, u), p.base = n.__e, n.__u &= -161, p.__h.length && s.push(p), w && (p.__E = p.__ = null);
|
|
151
151
|
} catch (e) {
|
|
152
152
|
if (s.length = f, n.__v = null, l || o != null) {
|
|
153
153
|
if (e.then) {
|
|
154
154
|
for (n.__u |= l ? 160 : 128; c && c.nodeType == 8 && c.nextSibling;) c = c.nextSibling;
|
|
155
155
|
o != null && (o[o.indexOf(c)] = null), n.__e = c;
|
|
156
|
-
} else if (o != null) for (
|
|
156
|
+
} else if (o != null) for (N = o.length; N--;) y(o[N]);
|
|
157
157
|
} else n.__e = r.__e;
|
|
158
|
-
n.__k ??= r.__k || [], e.then ||
|
|
158
|
+
n.__k ??= r.__k || [], e.then || ne(n), 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 ne(e) {
|
|
164
|
+
e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(ne));
|
|
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 ie(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) : e.constructor === void 0 ? v({}, e) : null;
|
|
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 oe(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 = C == "textarea" && S.defaultValue != null ? null : 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 || P(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 || P(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 && C != "textarea" || (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 = ""), k(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 && C != "textarea" || (d = "value", C == "progress" && v == null ? n.removeAttribute("value") : v != null && (v !== n[d] || C == "progress" && !v || C == "option" && v != x[d]) && P(n, d, v, x[d], o), d = "checked", b != null && b != n[d] && P(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 se(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 ce(e, n, r) {
|
|
|
221
221
|
}
|
|
222
222
|
i.base = i.__P = i.__n = 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 = [], te(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), n.props.children = null;
|
|
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,49 +245,49 @@ 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 = ee(!1), p = ee(!0);
|
|
249
249
|
//#endregion
|
|
250
250
|
//#region src/styles.css?inline
|
|
251
|
-
var de = ":host{--markup-paper:#fdfcfa;--markup-surface:#fff;--markup-surface-2:oklch(98.5% .002 250);--markup-surface-3:oklch(95% .003 250);--markup-hover:oklch(95% .003 250);--markup-ink:#1a1614;--markup-ink-soft:oklch(32% .005 250);--markup-muted:#6b6661;--markup-border:#1a16141a;--markup-border-strong:#1a16142e;--markup-brand:#e35d2a;--markup-brand-hover:#c84d20;--markup-accent-soft:oklch(95% .04 60);--markup-accent-ink:oklch(45% .14 38);--markup-accent-glow:color-mix(in srgb, var(--markup-brand) 28%, transparent);--markup-team:#2a4ac8;--markup-shadow:0 1px 2px #1a16140f, 0 8px 28px #1a16141f;--markup-shadow-toolbar:0 1px 1px #0000000a, 0 4px 10px -2px #0f14281a, 0 18px 36px -12px #0f14282e;--markup-shadow-pop:0 1px 1px #0000000a, 0 8px 24px -6px #0f14281f, 0 28px 60px -18px #0f142838;--markup-overlay-tint:#1a16140a;--markup-danger:#dc2626;--markup-success:oklch(62% .16 150);--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-surface:oklch(16% .005 250);--markup-surface-2:oklch(20% .005 250);--markup-surface-3:oklch(24% .005 250);--markup-hover:oklch(24% .005 250);--markup-ink:#fdfcfa;--markup-ink-soft:oklch(80% .005 250);--markup-muted:#a8a39e;--markup-border:#fdfcfa1f;--markup-border-strong:#fdfcfa38;--markup-team:#7b99f0;--markup-accent-soft:color-mix(in srgb, var(--markup-brand) 22%, transparent);--markup-accent-ink:oklch(86% .13 55);--markup-shadow:0 1px 2px #00000059, 0 12px 40px #00000073;--markup-shadow-toolbar:0 1px 0 #ffffff0a inset, 0 1px 2px #0006, 0 12px 30px -10px #0000008c, 0 28px 60px -20px #00000080;--markup-shadow-pop:0 1px 0 #ffffff0a inset, 0 8px 24px -6px #00000073, 0 28px 60px -18px #0000008c;--markup-overlay-tint:#fdfcfa0d;--markup-danger:#f87171}@media (prefers-color-scheme:dark){:host(:not([data-theme])){--markup-paper:#1a1614;--markup-surface:oklch(16% .005 250);--markup-surface-2:oklch(20% .005 250);--markup-surface-3:oklch(24% .005 250);--markup-hover:oklch(24% .005 250);--markup-ink:#fdfcfa;--markup-ink-soft:oklch(80% .005 250);--markup-muted:#a8a39e;--markup-border:#fdfcfa1f;--markup-border-strong:#fdfcfa38;--markup-team:#7b99f0;--markup-accent-soft:color-mix(in srgb, var(--markup-brand) 22%, transparent);--markup-accent-ink:oklch(86% .13 55);--markup-shadow:0 1px 2px #00000059, 0 12px 40px #00000073;--markup-shadow-toolbar:0 1px 0 #ffffff0a inset, 0 1px 2px #0006, 0 12px 30px -10px #0000008c, 0 28px 60px -20px #00000080;--markup-shadow-pop:0 1px 0 #ffffff0a inset, 0 8px 24px -6px #00000073, 0 28px 60px -18px #0000008c;--markup-overlay-tint:#fdfcfa0d;--markup-danger:#f87171}}.markup-sr-only{clip:rect(0, 0, 0, 0);border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.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-toolbar{z-index:10;background:var(--markup-surface);border:1px solid var(--markup-border);pointer-events:none;height:44px;box-shadow:var(--markup-shadow-toolbar);border-radius:9999px;align-items:center;gap:2px;padding:4px;transition:box-shadow .15s,left .22s cubic-bezier(.2,.7,.2,1),transform .22s cubic-bezier(.2,.7,.2,1);display:inline-flex;position:fixed;bottom:22px;left:100%;transform:translate(calc(-100% - 22px))}.markup-toolbar>*{pointer-events:auto}.markup-tb-btn{width:36px;height:36px;color:var(--markup-ink-soft);cursor:pointer;touch-action:none;font-family:var(--markup-font);background:0 0;border:1px solid #0000;border-radius:9999px;justify-content:center;align-items:center;gap:6px;padding:0;font-size:13px;font-weight:500;transition:background .12s,color .12s,transform .12s cubic-bezier(.2,.7,.2,1);display:inline-flex;position:relative}.markup-tb-btn:hover{background:var(--markup-hover);color:var(--markup-ink)}.markup-tb-btn:active{transform:scale(.97)}.markup-tb-btn:focus-visible{box-shadow:0 0 0 2px var(--markup-surface), 0 0 0 4px var(--markup-accent-glow);outline:none}.markup-tb-btn[data-on=true]{background:var(--markup-ink);color:var(--markup-paper)}@media (prefers-color-scheme:dark){:host(:not([data-theme])) .markup-tb-btn[data-on=true]{background:var(--markup-surface-3);color:var(--markup-ink)}}:host([data-theme=dark]) .markup-tb-btn[data-on=true]{background:var(--markup-surface-3);color:var(--markup-ink)}.markup-tb-btn[data-armed=true]{background:var(--markup-brand);color:#fff}.markup-tb-btn[data-armed=true]:hover{background:var(--markup-brand-hover);color:#fff}.markup-tb-btn[disabled]{color:color-mix(in srgb, var(--markup-muted) 60%, transparent);cursor:default}.markup-tb-btn[disabled]:hover{color:color-mix(in srgb, var(--markup-muted) 60%, transparent);background:0 0}.markup-tb-btn[data-kind=identity]{gap:6px;width:auto;padding:0 4px}.markup-tb-avatar{background:var(--markup-surface-3);width:28px;height:28px;font-family:var(--markup-font-mono);color:var(--markup-ink);border:1px solid var(--markup-border);border-radius:9999px;flex-shrink:0;justify-content:center;align-items:center;font-size:10.5px;font-weight:600;display:inline-flex;overflow:hidden}.markup-tb-avatar.is-anon{color:var(--markup-muted);background:var(--markup-surface-2)}.markup-tb-sep{background:var(--markup-border);flex-shrink:0;width:1px;height:20px;margin:0 4px}.markup-tb-badge{background:var(--markup-brand);color:#fff;min-width:16px;height:16px;font-family:var(--markup-font-mono);box-shadow:0 0 0 2px var(--markup-surface);pointer-events:none;border-radius:9999px;justify-content:center;align-items:center;padding:0 4px;font-size:9.5px;font-weight:600;line-height:1;transition:transform .15s cubic-bezier(.2,.7,.2,1),opacity .15s cubic-bezier(.2,.7,.2,1);display:inline-flex;position:absolute;top:0;right:0}.markup-tb-badge[data-unread=false]{opacity:0;transform:scale(.5)}.markup-toolbar-left{left:0;transform:translate(22px)}.markup-toolbar-center{left:50%;transform:translate(-50%)}.markup-toolbar-right{left:100%;transform:translate(calc(-100% - 22px))}.markup-pop{background:var(--markup-surface);border:1px solid var(--markup-border);box-shadow:var(--markup-shadow-pop);color:var(--markup-ink);z-index:11;border-radius:12px;font-size:13px;animation:.14s cubic-bezier(.2,.7,.2,1) markup-pop-in;position:absolute;bottom:calc(100% + 8px);overflow:hidden}.markup-pop[data-pop=overflow]{width:260px;padding:6px}.markup-pop[data-pop=identity]{width:240px;padding:6px}.markup-pop[data-pop=inbox]{width:380px;padding:0}.markup-pop.is-anchor-right{right:0}.markup-pop.is-anchor-left{left:0}.markup-pop.is-anchor-center{left:50%;transform:translate(-50%)}@keyframes markup-pop-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.markup-pop.is-anchor-center{animation-name:markup-pop-in-center}@keyframes markup-pop-in-center{0%{opacity:0;transform:translate(-50%,6px)}to{opacity:1;transform:translate(-50%)}}.markup-pop-group-label{font-family:var(--markup-font-mono);letter-spacing:.06em;color:var(--markup-muted);text-transform:lowercase;padding:8px 10px 4px;font-size:10px}.markup-segmented-row{border-radius:6px;align-items:center;gap:10px;padding:7px 8px;display:flex}.markup-segmented-row .lbl{min-width:0;color:var(--markup-ink);flex:1;font-size:13px}.markup-segmented{background:var(--markup-surface-3);border-radius:7px;gap:2px;padding:2px;display:inline-flex}.markup-segmented button{font:inherit;width:28px;height:24px;color:var(--markup-muted);cursor:pointer;background:0 0;border:none;border-radius:5px;justify-content:center;align-items:center;padding:0;transition:background .1s,color .1s;display:inline-flex}.markup-segmented button:hover{color:var(--markup-ink)}.markup-segmented button.is-on{background:var(--markup-surface);color:var(--markup-ink);box-shadow:0 1px 2px #0000000d}.markup-menu-row{cursor:pointer;width:100%;color:inherit;text-align:left;background:0 0;border:none;border-radius:6px;align-items:center;gap:10px;padding:7px 8px;font-family:inherit;font-size:13px;display:flex}.markup-menu-row:hover{background:var(--markup-hover)}.markup-menu-row:disabled{opacity:.5;cursor:default}.markup-menu-row:disabled:hover{background:0 0}.markup-menu-row .ic{width:16px;height:16px;color:var(--markup-muted);flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.markup-menu-row .lbl{flex-direction:column;flex:1;min-width:0;display:flex}.markup-menu-row .lbl .sub{color:var(--markup-muted);margin-top:1px;font-size:11px}.markup-menu-row .right{font-family:var(--markup-font-mono);color:var(--markup-muted);margin-left:auto;font-size:10.5px}.markup-menu-row.is-danger,.markup-menu-row.is-danger .ic{color:var(--markup-danger)}.markup-menu-row.is-danger:hover{background:color-mix(in srgb, var(--markup-danger) 10%, transparent)}.markup-menu-row .switch{background:var(--markup-border-strong);border-radius:9999px;flex-shrink:0;width:26px;height:16px;transition:background .12s;position:relative}.markup-menu-row .switch:after{content:\"\";background:var(--markup-surface);border-radius:9999px;width:12px;height:12px;transition:left .12s;position:absolute;top:2px;left:2px;box-shadow:0 1px 2px #00000026}.markup-menu-row[data-on=true] .switch{background:var(--markup-brand)}.markup-menu-row[data-on=true] .switch:after{left:12px}.markup-menu-divider{background:var(--markup-border);height:1px;margin:4px 0}.markup-brand-line{font-family:var(--markup-font-mono);color:var(--markup-muted);border-top:1px solid var(--markup-border);align-items:center;gap:8px;margin-top:6px;padding:8px 10px;font-size:10.5px;text-decoration:none;display:flex}.markup-brand-line:hover{color:var(--markup-ink)}.markup-brand-line svg{color:var(--markup-brand)}.markup-brand-line .ver{margin-left:auto}.markup-id-who{border-bottom:1px solid var(--markup-border);flex-direction:column;gap:2px;margin-bottom:4px;padding:10px 8px 12px;display:flex}.markup-id-who .nm{color:var(--markup-ink);font-size:13.5px;font-weight:600}.markup-id-who .em{font-family:var(--markup-font-mono);color:var(--markup-muted);white-space:nowrap;text-overflow:ellipsis;font-size:11px;overflow:hidden}.markup-id-anon{text-align:left;flex-direction:column;gap:10px;padding:14px 10px;display:flex}.markup-id-anon .h{letter-spacing:-.005em;color:var(--markup-ink);font-size:14px;font-weight:600}.markup-id-anon .sub{color:var(--markup-muted);font-size:12.5px;line-height:18px}.markup-id-anon button:not(.markup-menu-row){background:var(--markup-ink);width:100%;color:var(--markup-paper);height:32px;font:inherit;cursor:pointer;border:none;border-radius:7px;justify-content:center;align-items:center;gap:6px;font-size:13px;font-weight:500;display:inline-flex}.markup-id-anon button:disabled{opacity:.7;cursor:default}.markup-id-anon button:not(.markup-menu-row):hover:not(:disabled){background:color-mix(in srgb, var(--markup-ink) 88%, var(--markup-surface))}.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-hud-hidden-toast-center{width:max-content;margin-inline:auto;left:0;right:0}.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}.markup-kbd.is-inline{background:color-mix(in srgb, var(--markup-ink) 8%, transparent);min-width:14px;height:14px;color:var(--markup-muted);border-radius:3px;padding:0 3px;font-size:9.5px}@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{border:2px solid var(--markup-paper);background:var(--markup-brand);color:#fff;width:28px;height:28px;font-family:var(--markup-font-mono);cursor:pointer;pointer-events:auto;box-shadow:0 4px 14px -4px #00000059, 0 0 0 1px color-mix(in srgb, var(--markup-brand) 50%, transparent);border-radius:999px 999px 999px 4px;justify-content:center;align-items:center;margin:0;padding:0;font-size:11.5px;font-weight:600;line-height:1;transition:background .15s,color .15s,opacity .15s,top .2s,left .2s;display:inline-flex;position:absolute;transform:translate(-50%,-100%)}.markup-pin:hover{background:color-mix(in oklab, var(--markup-brand) 92%, black)}:host([data-theme=dark]) .markup-pin:hover{background:color-mix(in oklab, var(--markup-brand) 88%, var(--markup-paper))}@media (prefers-color-scheme:dark){:host(:not([data-theme])) .markup-pin:hover{background:color-mix(in oklab, var(--markup-brand) 88%, var(--markup-paper))}}.markup-pin.is-active{background:var(--markup-brand);color:#fff;border-color:var(--markup-paper)}.markup-pin.is-anchor{anchor-name:--markup-active-anchor}.markup-pin.is-unresolved{opacity:.6}.markup-pin-ghost{background:var(--markup-brand);color:#fff;cursor:default;pointer-events:none;animation:1.2s ease-in-out infinite markup-ghost-pulse}.markup-pin-num{pointer-events:none;justify-content:center;align-items:center;display:inline-flex}.markup-pin-count{background:var(--markup-ink);min-width:16px;height:16px;color:var(--markup-paper);font-family:var(--markup-font-mono);text-align:center;border:2px solid var(--markup-paper);pointer-events:none;border-radius:999px;padding:0 4px;font-size:9.5px;font-weight:600;line-height:12px;position:absolute;top:-6px;right:-8px}@keyframes markup-ghost-pulse{0%,to{box-shadow:0 4px 14px -4px #00000059,0 0 #e35d2a66}50%{box-shadow:0 4px 14px -4px #00000059,0 0 0 10px #e35d2a00}}.markup-placement-overlay{background:var(--markup-overlay-tint);pointer-events:none;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:360px;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}}.markup-popover.is-hud-hidden{display: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-popover-title{min-width:0;font-family:var(--markup-font-mono);letter-spacing:.02em;color:var(--markup-muted);white-space:nowrap;text-overflow:ellipsis;flex:auto;font-size:11px;line-height:1;overflow:hidden}.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{border-top:1px solid var(--markup-border);background:var(--markup-paper);flex-direction:column;gap:6px;padding:10px 12px 8px;display:flex}.markup-popover-header+.markup-popover-body{border-top:none}.markup-popover-byline{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.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,transform .12s cubic-bezier(.2,.7,.2,1);display:inline-flex}.markup-icon-btn:hover,.markup-icon-btn.is-open{background:var(--markup-border);color:var(--markup-ink)}.markup-icon-btn:active{transform:scale(.97)}.markup-comments{flex-direction:column;max-height:420px;margin:0;padding:0;list-style:none;display:flex;overflow-y:auto}.markup-comment{border-bottom:1px solid var(--markup-border);grid-template-columns:26px 1fr;align-items:start;gap:0 10px;padding:12px;display:grid}.markup-comment:last-child{border-bottom:none}.markup-comment>:not(.markup-comment-avatar){grid-column:2}.markup-comment.is-new{animation:.2s cubic-bezier(.2,.7,.2,1) markup-comment-in}@keyframes markup-comment-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.markup-comment-avatar{background:var(--markup-border);width:26px;height:26px;color:var(--markup-ink);font-family:var(--markup-font-mono);letter-spacing:.02em;text-transform:uppercase;-webkit-user-select:none;user-select:none;border-radius:999px;grid-area:1/1/span 4;justify-content:center;align-items:center;margin-top:-3px;font-size:10.5px;font-weight:600;display:inline-flex;overflow:hidden}.markup-avatar-initials{text-box-trim:trim-both;text-box-edge:cap alphabetic;line-height:1}.markup-avatar-img{object-fit:cover;width:100%;height:100%;display:block}.markup-comment-avatar[data-tone=\"1\"]{color:oklch(25% .07 230);background:oklch(85% .07 200)}.markup-comment-avatar[data-tone=\"2\"]{color:oklch(30% .1 150);background:oklch(88% .07 130)}.markup-comment-avatar[data-tone=\"3\"]{color:oklch(35% .1 40);background:oklch(90% .05 50)}.markup-comment-avatar[data-tone=\"4\"]{color:oklch(30% .1 320);background:oklch(87% .07 320)}.markup-comment-avatar[data-tone=\"5\"]{color:oklch(32% .09 70);background:oklch(88% .06 80)}.markup-comment-meta{align-items:center;gap:8px;min-width:0;margin-bottom:4px;font-size:13px;display:flex}.markup-comment-author{color:var(--markup-ink);white-space:nowrap;text-overflow:ellipsis;min-width:0;font-size:13px;font-weight:600;overflow:hidden}.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-badge.is-agent{background:color-mix(in srgb, var(--markup-brand) 14%, transparent);color:var(--markup-brand);letter-spacing:normal;justify-content:center;width:14px;padding:0}.markup-comment-time{color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.04em;white-space:nowrap;flex-shrink:0;font-size:10.5px}.markup-comment-body{color:var(--markup-ink);white-space:pre-wrap;word-break:break-word;margin:0;font-size:13.5px;line-height:19px}.markup-comment-edited{color:var(--markup-muted);font-family:var(--markup-font-mono);margin-left:2px;font-size:10.5px}.markup-comment-edited:before{content:\" · \"}.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)}.markup-comment-menu.is-side .markup-thread-menu-list{animation-name:markup-menu-in-side;top:-4px;right:calc(100% + 2px)}@keyframes markup-menu-in-side{0%{opacity:0;transform:translate(4px)}to{opacity:1;transform:translate(0)}}@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:6px;display:flex}.markup-reaction-chip{border:1px solid var(--markup-border);background:var(--markup-surface-3);color:var(--markup-ink);font:inherit;cursor:pointer;border-radius:999px;align-items:center;gap:4px;padding:2px 7px;font-size:11.5px;line-height:1.2;transition:background .12s,border-color .12s;display:inline-flex}.markup-reaction-chip:hover:not(:disabled){background:var(--markup-hover)}.markup-reaction-chip.is-mine{background:var(--markup-accent-soft);border-color:color-mix(in srgb, var(--markup-brand) 50%, transparent);color:var(--markup-accent-ink)}.markup-reaction-chip.is-mine:hover:not(:disabled){background:color-mix(in srgb, var(--markup-brand) 18%, 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:10.5px}.markup-reaction-chip.is-mine .markup-reaction-count{color:var(--markup-accent-ink)}.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{width:22px;height:22px;color:var(--markup-muted);font:inherit;cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;font-size:13px;line-height:1;transition:background .12s,color .12s;display:inline-flex}.markup-reaction-add:hover,.markup-reaction-add.is-open{background:var(--markup-hover);color:var(--markup-ink)}.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-wrap.is-side .markup-reaction-picker{animation-name:markup-menu-in-side;top:-4px;right:calc(100% + 2px)}.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-actions{justify-content:flex-end;gap:6px;display:flex}.markup-composer{flex-direction:column;display:flex;position:relative}.markup-composer-input{width:100%;min-height:38px;max-height:120px;color:var(--markup-ink);font-family:var(--markup-font);background:0 0;border:none;border-radius:0;padding:2px 0;font-size:13.5px;line-height:19px;transition:none;overflow-y:auto}.markup-composer-input:focus-visible{box-shadow:none;outline:none}.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{opacity:0;background:0 0;border:none;border-radius:0;justify-content:space-between;align-items:center;gap:8px;padding:0;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:.04em;color:var(--markup-muted);align-items:center;gap:3px;font-size:10.5px;display:inline-flex}.markup-composer-hint-label{margin-left:2px}.markup-composer-error{color:var(--markup-brand)}.markup-composer-actions{align-items:center;gap:6px;display:flex}.markup-composer .markup-btn-primary{background:var(--markup-ink);height:26px;color:var(--markup-paper);border-radius:6px;padding:0 10px}.markup-composer .markup-btn-primary:hover:not(:disabled){background:color-mix(in srgb, var(--markup-ink) 88%, var(--markup-paper))}.markup-composer-actions-empty{transition:opacity .12s;position:absolute;bottom:0;right:0}.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,transform .12s cubic-bezier(.2,.7,.2,1);display:inline-flex}.markup-btn:disabled{opacity:.5;cursor:not-allowed}.markup-btn:active:not(:disabled){transform:scale(.97)}.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-btn-danger{color:var(--markup-danger)}.markup-btn-danger:hover:not(:disabled){background:color-mix(in srgb, var(--markup-danger) 10%, transparent)}.markup-discard-confirm{background:color-mix(in srgb, var(--markup-paper) 92%, transparent);-webkit-backdrop-filter:blur(6px);flex-direction:column;justify-content:center;gap:4px;padding:16px;animation:.12s ease-out markup-menu-in;display:flex;position:absolute;inset:0}.markup-discard-confirm-title{color:var(--markup-ink);margin:0;font-size:13px;font-weight:600}.markup-discard-confirm-desc{color:var(--markup-muted);margin:0;font-size:12px}.markup-discard-confirm-actions{gap:6px;margin-top:10px;display:flex}.markup-screenshot-row{border:1px dashed var(--markup-border-strong);color:var(--markup-muted);border-radius:6px;flex-direction:column;gap:8px;margin-top:0;padding:6px 8px;font-size:11.5px;display:flex}.markup-screenshot-row.is-attached{border-style:solid;border-color:var(--markup-border);padding:8px}.markup-screenshot-row-head{justify-content:space-between;align-items:center;gap:8px;min-height:16px;display:flex}.markup-screenshot-status{color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.04em;align-items:center;gap:5px;font-size:11px;display:flex}.markup-screenshot-row.is-failed{opacity:.85;border-style:dotted}.markup-screenshot-toggle{cursor:pointer;color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.04em;align-items:center;gap:5px;font-size:11px;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-link{border:1px solid var(--markup-border-strong);cursor:zoom-in;background:0 0;border-radius:3px;margin:-4px auto -4px -4px;padding:0;transition:border-color .12s;display:block;overflow:hidden}.markup-screenshot-thumb-link:hover,.markup-screenshot-thumb-link:focus-visible{border-color:var(--markup-brand)}.markup-screenshot-thumb{object-fit:cover;object-position:top;width:auto;height:22px;display:block}.markup-screenshot-redacted-chip{background:color-mix(in srgb, var(--markup-success,oklch(62% .16 150)) 16%, transparent);color:var(--markup-success,oklch(62% .16 150));font-family:var(--markup-font-mono);white-space:nowrap;cursor:pointer;border:none;border-radius:999px;align-items:center;gap:3px;padding:1px 7px;font-size:10px;display:inline-flex}.markup-screenshot-redacted-chip:hover{filter:brightness(1.05)}.markup-screenshot-redacted-arrow{font-style:normal}.markup-screenshot-redacted-list{flex-direction:column;gap:2px;display:flex}.markup-screenshot-redacted-selector{font-family:var(--markup-font-mono);color:var(--markup-muted);font-size:9px;display:block}.markup-screenshot-help{font-family:var(--markup-font-mono);color:var(--markup-muted);margin:0;font-size:10px;line-height:1.5}.markup-screenshot-help-link{color:var(--markup-ink);text-underline-offset:2px;text-decoration:underline}.markup-screenshot-help-link:hover{color:var(--markup-brand)}.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-toolbar,.markup-tb-btn,.markup-tb-badge,.markup-comment,.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}}.markup-mention-chip{background:var(--markup-accent-soft);color:var(--markup-accent-ink);border-radius:3px;padding:0 2px;font-weight:500;display:inline-block}.markup-mention-input{white-space:pre-wrap;overflow-wrap:anywhere;cursor:text;outline:none;position:relative}.markup-mention-input[aria-disabled=true]{opacity:.6;cursor:default}.markup-mention-input[data-empty]:before{content:attr(data-placeholder);color:var(--markup-muted);pointer-events:none;position:absolute;inset:0 auto auto 0}.markup-mention-input .markup-mention-chip{white-space:nowrap;padding:0 3px}.markup-comment-edit-input{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);background:var(--markup-paper);width:100%;min-height:58px;max-height:200px;color:var(--markup-ink);font:inherit;padding:8px 10px;font-size:13px;line-height:1.5;overflow-y:auto}.markup-comment-edit-input:focus-visible{border-color:var(--markup-brand);box-shadow:0 0 0 3px #e35d2a2e}.markup-comment-edit-input[data-empty]:before{inset:8px auto auto 10px}.markup-mention-picker{z-index:10;background:var(--markup-paper);border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);max-height:180px;box-shadow:var(--markup-shadow);margin:0 0 4px;padding:4px;list-style:none;position:absolute;bottom:100%;left:0;right:0;overflow-y:auto}.markup-mention-picker-item{border-radius:var(--markup-radius-sm);cursor:pointer;color:var(--markup-ink);justify-content:space-between;align-items:center;gap:8px;padding:6px 8px;font-size:13px;display:flex}.markup-mention-picker-item.is-active{background:color-mix(in srgb, var(--markup-brand) 12%, transparent)}.markup-mention-picker-name{font-weight:500}.markup-mention-picker-trigger{color:var(--markup-muted);font-family:var(--markup-font-mono);font-size:10px}.markup-notifications-panel{max-height:min(60vh,420px);color:var(--markup-ink);flex-direction:column;display:flex}.markup-notifications-panel-header{border-bottom:1px solid var(--markup-border);align-items:center;gap:8px;padding:8px 10px;display:flex}.markup-notifications-panel-header .markup-eyebrow{flex:1}.markup-notifications-panel-actions{align-items:center;gap:8px;display:flex}.markup-notifications-panel-mark-all{color:var(--markup-muted);cursor:pointer;background:0 0;border:none;padding:0;font-size:11px}.markup-notifications-panel-mark-all:hover{color:var(--markup-ink)}.markup-notifications-panel-body{flex:1;overflow-y:auto}.markup-notifications-panel-empty,.markup-notifications-panel-error{text-align:center;color:var(--markup-muted);padding:24px 12px;font-size:12px}.markup-notifications-panel-empty-title{color:var(--markup-ink);margin:0 0 4px;font-weight:500}.markup-notifications-panel-empty-sub{color:var(--markup-muted);margin:0;line-height:1.4}.markup-notifications-panel-error{color:var(--markup-danger,#b91c1c)}.markup-notifications-panel-list{margin:0;padding:4px;list-style:none}.markup-notifications-panel-row{border-radius:var(--markup-radius-sm);text-align:start;cursor:pointer;width:100%;font:inherit;color:inherit;background:0 0;border:none;flex-direction:column;gap:4px;padding:8px 10px;display:flex}.markup-notifications-panel-row:hover{background:color-mix(in srgb, var(--markup-brand) 8%, transparent)}.markup-notifications-panel-row.is-unread{background:color-mix(in srgb, var(--markup-brand) 5%, transparent)}.markup-notifications-panel-meta{align-items:center;gap:6px;font-size:11px;display:flex}.markup-notifications-panel-dot{background:var(--markup-brand);border-radius:999px;flex-shrink:0;width:6px;height:6px}.markup-notifications-panel-actor{font-weight:600}.markup-notifications-panel-sep{color:var(--markup-muted)}.markup-notifications-panel-time{color:var(--markup-muted);font-family:var(--markup-font-mono);font-size:10px}.markup-notifications-panel-thread{color:var(--markup-muted);margin:0;font-size:12px}.markup-notifications-panel-thread-title{color:var(--markup-ink)}.markup-notifications-panel-excerpt{color:color-mix(in srgb, var(--markup-ink) 80%, transparent);-webkit-line-clamp:2;-webkit-box-orient:vertical;margin:0;font-size:12px;font-style:italic;display:-webkit-box;overflow:hidden}.markup-panel-pop{z-index:11;pointer-events:auto;width:380px;max-width:calc(100vw - 24px);position:fixed;bottom:76px}.markup-panel-pop[data-panel=privacy]{width:340px}.markup-panel-pop[data-panel=shortcuts]{width:320px}.markup-panel-pop-right{right:22px}.markup-panel-pop-left{left:22px}.markup-panel-pop-center{left:50%;transform:translate(-50%)}.markup-panel-pop .markup-pop{width:100%;animation:.14s cubic-bezier(.2,.7,.2,1) markup-pop-in;position:static}.markup-panel-pop .markup-notifications-panel{max-height:min(60vh,480px)}.markup-panel-pop .markup-notifications-panel-header{padding:12px 14px}.markup-panel-pop .markup-notifications-panel-header .markup-icon-btn{display:none}.markup-pop[data-pop=privacy],.markup-pop[data-pop=shortcuts]{padding:0}.markup-panel{max-height:min(70vh,520px);color:var(--markup-ink);flex-direction:column;display:flex}.markup-panel-header{border-bottom:1px solid var(--markup-border);align-items:center;gap:8px;padding:12px 14px;display:flex}.markup-panel-header .markup-eyebrow{flex:1}.markup-panel-body{flex:1;padding:4px 14px 14px;overflow-y:auto}.markup-panel-section{border-bottom:1px solid var(--markup-border);padding:10px 0}.markup-panel-section:last-child{border-bottom:none;padding-bottom:2px}.markup-panel-section-title{font-family:var(--markup-font-mono);letter-spacing:.06em;text-transform:lowercase;color:var(--markup-muted);margin:0 0 6px;font-size:10px;font-weight:400}.markup-panel-text{color:var(--markup-ink-soft);margin:0;font-size:12.5px;line-height:1.5}.markup-panel-text strong{color:var(--markup-ink);font-weight:600}.markup-panel-mono{font-family:var(--markup-font-mono);color:var(--markup-ink);word-break:break-all;font-size:11.5px}.markup-panel-list{color:var(--markup-ink-soft);margin:0;padding-left:16px;font-size:12.5px;line-height:1.5}.markup-panel-list li{margin-bottom:3px}.markup-panel-list li::marker{color:var(--markup-muted)}.markup-panel-note{color:var(--markup-muted);margin:8px 0 0;font-size:11.5px;line-height:1.45}.markup-panel-error{color:var(--markup-danger);margin:8px 0 0;font-size:11.5px;line-height:1.45}.markup-panel-action{border:1px solid var(--markup-border-strong);width:100%;height:30px;color:var(--markup-ink);font:inherit;cursor:pointer;background:0 0;border-radius:7px;margin-top:10px;padding:0 10px;font-size:12.5px;transition:background .12s,border-color .12s,color .12s}.markup-panel-action:hover:not(:disabled){background:var(--markup-hover)}.markup-panel-action:disabled{opacity:.6;cursor:default}.markup-panel-action.is-danger{border-color:color-mix(in srgb, var(--markup-danger) 45%, transparent);color:var(--markup-danger)}.markup-panel-action.is-danger:hover:not(:disabled){background:color-mix(in srgb, var(--markup-danger) 10%, transparent)}.markup-shortcut-list{margin:0;padding:0;list-style:none}.markup-shortcut-row{align-items:center;gap:10px;min-height:24px;padding:2px 0;display:flex}.markup-shortcut-label{min-width:0;color:var(--markup-ink-soft);flex:1;font-size:12.5px;line-height:1.4}.markup-shortcut-keys{flex-shrink:0;align-items:center;gap:4px;display:inline-flex}.markup-shortcut-chord{align-items:center;gap:3px;display:inline-flex}.markup-shortcut-or{color:var(--markup-muted);margin-right:1px;font-size:10px}", fe = 1e4, P = 20, pe = 60, me = null, he = [], F = null, ge = !1, _e = ve();
|
|
252
|
-
function
|
|
251
|
+
var ue = ":host{--markup-paper:#fdfcfa;--markup-surface:#fff;--markup-surface-2:oklch(98.5% .002 250);--markup-surface-3:oklch(95% .003 250);--markup-hover:oklch(95% .003 250);--markup-ink:#1a1614;--markup-ink-soft:oklch(32% .005 250);--markup-muted:#6b6661;--markup-border:#1a16141a;--markup-border-strong:#1a16142e;--markup-brand:#e35d2a;--markup-brand-hover:#c84d20;--markup-accent-soft:oklch(95% .04 60);--markup-accent-ink:oklch(45% .14 38);--markup-accent-glow:color-mix(in srgb, var(--markup-brand) 28%, transparent);--markup-team:#2a4ac8;--markup-shadow:0 1px 2px #1a16140f, 0 8px 28px #1a16141f;--markup-shadow-toolbar:0 1px 1px #0000000a, 0 4px 10px -2px #0f14281a, 0 18px 36px -12px #0f14282e;--markup-shadow-pop:0 1px 1px #0000000a, 0 8px 24px -6px #0f14281f, 0 28px 60px -18px #0f142838;--markup-overlay-tint:#1a16140a;--markup-danger:#dc2626;--markup-success:oklch(62% .16 150);--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-surface:oklch(16% .005 250);--markup-surface-2:oklch(20% .005 250);--markup-surface-3:oklch(24% .005 250);--markup-hover:oklch(24% .005 250);--markup-ink:#fdfcfa;--markup-ink-soft:oklch(80% .005 250);--markup-muted:#a8a39e;--markup-border:#fdfcfa1f;--markup-border-strong:#fdfcfa38;--markup-team:#7b99f0;--markup-accent-soft:color-mix(in srgb, var(--markup-brand) 22%, transparent);--markup-accent-ink:oklch(86% .13 55);--markup-shadow:0 1px 2px #00000059, 0 12px 40px #00000073;--markup-shadow-toolbar:0 1px 0 #ffffff0a inset, 0 1px 2px #0006, 0 12px 30px -10px #0000008c, 0 28px 60px -20px #00000080;--markup-shadow-pop:0 1px 0 #ffffff0a inset, 0 8px 24px -6px #00000073, 0 28px 60px -18px #0000008c;--markup-overlay-tint:#fdfcfa0d;--markup-danger:#f87171}@media (prefers-color-scheme:dark){:host(:not([data-theme])){--markup-paper:#1a1614;--markup-surface:oklch(16% .005 250);--markup-surface-2:oklch(20% .005 250);--markup-surface-3:oklch(24% .005 250);--markup-hover:oklch(24% .005 250);--markup-ink:#fdfcfa;--markup-ink-soft:oklch(80% .005 250);--markup-muted:#a8a39e;--markup-border:#fdfcfa1f;--markup-border-strong:#fdfcfa38;--markup-team:#7b99f0;--markup-accent-soft:color-mix(in srgb, var(--markup-brand) 22%, transparent);--markup-accent-ink:oklch(86% .13 55);--markup-shadow:0 1px 2px #00000059, 0 12px 40px #00000073;--markup-shadow-toolbar:0 1px 0 #ffffff0a inset, 0 1px 2px #0006, 0 12px 30px -10px #0000008c, 0 28px 60px -20px #00000080;--markup-shadow-pop:0 1px 0 #ffffff0a inset, 0 8px 24px -6px #00000073, 0 28px 60px -18px #0000008c;--markup-overlay-tint:#fdfcfa0d;--markup-danger:#f87171}}.markup-sr-only{clip:rect(0, 0, 0, 0);border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.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-toolbar{z-index:10;background:var(--markup-surface);border:1px solid var(--markup-border);pointer-events:none;height:44px;box-shadow:var(--markup-shadow-toolbar);border-radius:9999px;align-items:center;gap:2px;padding:4px;transition:box-shadow .15s,left .22s cubic-bezier(.2,.7,.2,1),transform .22s cubic-bezier(.2,.7,.2,1);display:inline-flex;position:fixed;bottom:22px;left:100%;transform:translate(calc(-100% - 22px))}.markup-toolbar>*{pointer-events:auto}.markup-tb-btn{width:36px;height:36px;color:var(--markup-ink-soft);cursor:pointer;touch-action:none;font-family:var(--markup-font);background:0 0;border:1px solid #0000;border-radius:9999px;justify-content:center;align-items:center;gap:6px;padding:0;font-size:13px;font-weight:500;transition:background .12s,color .12s,transform .12s cubic-bezier(.2,.7,.2,1);display:inline-flex;position:relative}.markup-tb-btn:hover{background:var(--markup-hover);color:var(--markup-ink)}.markup-tb-btn:active{transform:scale(.97)}.markup-tb-btn:focus-visible{box-shadow:0 0 0 2px var(--markup-surface), 0 0 0 4px var(--markup-accent-glow);outline:none}.markup-tb-btn[data-on=true]{background:var(--markup-ink);color:var(--markup-paper)}@media (prefers-color-scheme:dark){:host(:not([data-theme])) .markup-tb-btn[data-on=true]{background:var(--markup-surface-3);color:var(--markup-ink)}}:host([data-theme=dark]) .markup-tb-btn[data-on=true]{background:var(--markup-surface-3);color:var(--markup-ink)}.markup-tb-btn[data-armed=true]{background:var(--markup-brand);color:#fff}.markup-tb-btn[data-armed=true]:hover{background:var(--markup-brand-hover);color:#fff}.markup-tb-btn[disabled]{color:color-mix(in srgb, var(--markup-muted) 60%, transparent);cursor:default}.markup-tb-btn[disabled]:hover{color:color-mix(in srgb, var(--markup-muted) 60%, transparent);background:0 0}.markup-tb-btn[data-kind=identity]{gap:6px;width:auto;padding:0 4px}.markup-tb-avatar{background:var(--markup-surface-3);width:28px;height:28px;font-family:var(--markup-font-mono);color:var(--markup-ink);border:1px solid var(--markup-border);border-radius:9999px;flex-shrink:0;justify-content:center;align-items:center;font-size:10.5px;font-weight:600;display:inline-flex;overflow:hidden}.markup-tb-avatar.is-anon{color:var(--markup-muted);background:var(--markup-surface-2)}.markup-tb-sep{background:var(--markup-border);flex-shrink:0;width:1px;height:20px;margin:0 4px}.markup-tb-badge{background:var(--markup-brand);color:#fff;min-width:16px;height:16px;font-family:var(--markup-font-mono);box-shadow:0 0 0 2px var(--markup-surface);pointer-events:none;border-radius:9999px;justify-content:center;align-items:center;padding:0 4px;font-size:9.5px;font-weight:600;line-height:1;transition:transform .15s cubic-bezier(.2,.7,.2,1),opacity .15s cubic-bezier(.2,.7,.2,1);display:inline-flex;position:absolute;top:0;right:0}.markup-tb-badge[data-unread=false]{opacity:0;transform:scale(.5)}.markup-toolbar-left{left:0;transform:translate(22px)}.markup-toolbar-center{left:50%;transform:translate(-50%)}.markup-toolbar-right{left:100%;transform:translate(calc(-100% - 22px))}.markup-pop{background:var(--markup-surface);border:1px solid var(--markup-border);box-shadow:var(--markup-shadow-pop);color:var(--markup-ink);z-index:11;border-radius:12px;font-size:13px;animation:.14s cubic-bezier(.2,.7,.2,1) markup-pop-in;position:absolute;bottom:calc(100% + 8px);overflow:hidden}.markup-pop[data-pop=overflow]{width:260px;padding:6px}.markup-pop[data-pop=identity]{width:240px;padding:6px}.markup-pop[data-pop=inbox]{width:380px;padding:0}.markup-pop.is-anchor-right{right:0}.markup-pop.is-anchor-left{left:0}.markup-pop.is-anchor-center{left:50%;transform:translate(-50%)}@keyframes markup-pop-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.markup-pop.is-anchor-center{animation-name:markup-pop-in-center}@keyframes markup-pop-in-center{0%{opacity:0;transform:translate(-50%,6px)}to{opacity:1;transform:translate(-50%)}}.markup-pop-group-label{font-family:var(--markup-font-mono);letter-spacing:.06em;color:var(--markup-muted);text-transform:lowercase;padding:8px 10px 4px;font-size:10px}.markup-segmented-row{border-radius:6px;align-items:center;gap:10px;padding:7px 8px;display:flex}.markup-segmented-row .lbl{min-width:0;color:var(--markup-ink);flex:1;font-size:13px}.markup-segmented{background:var(--markup-surface-3);border-radius:7px;gap:2px;padding:2px;display:inline-flex}.markup-segmented button{font:inherit;width:28px;height:24px;color:var(--markup-muted);cursor:pointer;background:0 0;border:none;border-radius:5px;justify-content:center;align-items:center;padding:0;transition:background .1s,color .1s;display:inline-flex}.markup-segmented button:hover{color:var(--markup-ink)}.markup-segmented button.is-on{background:var(--markup-surface);color:var(--markup-ink);box-shadow:0 1px 2px #0000000d}.markup-menu-row{cursor:pointer;width:100%;color:inherit;text-align:left;background:0 0;border:none;border-radius:6px;align-items:center;gap:10px;padding:7px 8px;font-family:inherit;font-size:13px;display:flex}.markup-menu-row:hover{background:var(--markup-hover)}.markup-menu-row:disabled{opacity:.5;cursor:default}.markup-menu-row:disabled:hover{background:0 0}.markup-menu-row .ic{width:16px;height:16px;color:var(--markup-muted);flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.markup-menu-row .lbl{flex-direction:column;flex:1;min-width:0;display:flex}.markup-menu-row .lbl .sub{color:var(--markup-muted);margin-top:1px;font-size:11px}.markup-menu-row .right{font-family:var(--markup-font-mono);color:var(--markup-muted);margin-left:auto;font-size:10.5px}.markup-menu-row.is-danger,.markup-menu-row.is-danger .ic{color:var(--markup-danger)}.markup-menu-row.is-danger:hover{background:color-mix(in srgb, var(--markup-danger) 10%, transparent)}.markup-menu-row .switch{background:var(--markup-border-strong);border-radius:9999px;flex-shrink:0;width:26px;height:16px;transition:background .12s;position:relative}.markup-menu-row .switch:after{content:\"\";background:var(--markup-surface);border-radius:9999px;width:12px;height:12px;transition:left .12s;position:absolute;top:2px;left:2px;box-shadow:0 1px 2px #00000026}.markup-menu-row[data-on=true] .switch{background:var(--markup-brand)}.markup-menu-row[data-on=true] .switch:after{left:12px}.markup-menu-divider{background:var(--markup-border);height:1px;margin:4px 0}.markup-brand-line{font-family:var(--markup-font-mono);color:var(--markup-muted);border-top:1px solid var(--markup-border);align-items:center;gap:8px;margin-top:6px;padding:8px 10px;font-size:10.5px;text-decoration:none;display:flex}.markup-brand-line:hover{color:var(--markup-ink)}.markup-brand-line svg{color:var(--markup-brand)}.markup-brand-line .ver{margin-left:auto}.markup-id-who{border-bottom:1px solid var(--markup-border);flex-direction:column;gap:2px;margin-bottom:4px;padding:10px 8px 12px;display:flex}.markup-id-who .nm{color:var(--markup-ink);font-size:13.5px;font-weight:600}.markup-id-who .em{font-family:var(--markup-font-mono);color:var(--markup-muted);white-space:nowrap;text-overflow:ellipsis;font-size:11px;overflow:hidden}.markup-id-anon{text-align:left;flex-direction:column;gap:10px;padding:14px 10px;display:flex}.markup-id-anon .h{letter-spacing:-.005em;color:var(--markup-ink);font-size:14px;font-weight:600}.markup-id-anon .sub{color:var(--markup-muted);font-size:12.5px;line-height:18px}.markup-id-anon button:not(.markup-menu-row){background:var(--markup-ink);width:100%;color:var(--markup-paper);height:32px;font:inherit;cursor:pointer;border:none;border-radius:7px;justify-content:center;align-items:center;gap:6px;font-size:13px;font-weight:500;display:inline-flex}.markup-id-anon button:disabled{opacity:.7;cursor:default}.markup-id-anon button:not(.markup-menu-row):hover:not(:disabled){background:color-mix(in srgb, var(--markup-ink) 88%, var(--markup-surface))}.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-hud-hidden-toast-center{width:max-content;margin-inline:auto;left:0;right:0}.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}.markup-kbd.is-inline{background:color-mix(in srgb, var(--markup-ink) 8%, transparent);min-width:14px;height:14px;color:var(--markup-muted);border-radius:3px;padding:0 3px;font-size:9.5px}@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{border:2px solid var(--markup-paper);background:var(--markup-brand);color:#fff;width:28px;height:28px;font-family:var(--markup-font-mono);cursor:pointer;pointer-events:auto;box-shadow:0 4px 14px -4px #00000059, 0 0 0 1px color-mix(in srgb, var(--markup-brand) 50%, transparent);border-radius:999px 999px 999px 4px;justify-content:center;align-items:center;margin:0;padding:0;font-size:11.5px;font-weight:600;line-height:1;transition:background .15s,color .15s,opacity .15s,top .2s,left .2s;display:inline-flex;position:absolute;transform:translate(-50%,-100%)}.markup-pin:hover{background:color-mix(in oklab, var(--markup-brand) 92%, black)}:host([data-theme=dark]) .markup-pin:hover{background:color-mix(in oklab, var(--markup-brand) 88%, var(--markup-paper))}@media (prefers-color-scheme:dark){:host(:not([data-theme])) .markup-pin:hover{background:color-mix(in oklab, var(--markup-brand) 88%, var(--markup-paper))}}.markup-pin.is-active{background:var(--markup-brand);color:#fff;border-color:var(--markup-paper)}.markup-pin.is-anchor{anchor-name:--markup-active-anchor}.markup-pin.is-unresolved{opacity:.6}.markup-pin.is-closed,.markup-pin.is-closed.is-active{background:var(--markup-paper);color:var(--markup-muted);border-color:var(--markup-muted);box-shadow:0 4px 14px -4px #00000040}.markup-pin.is-closed:hover{background:var(--markup-paper);color:var(--markup-ink)}.markup-pin-ghost{background:var(--markup-brand);color:#fff;cursor:default;pointer-events:none;animation:1.2s ease-in-out infinite markup-ghost-pulse}.markup-pin-num{pointer-events:none;justify-content:center;align-items:center;display:inline-flex}.markup-pin-count{background:var(--markup-ink);min-width:16px;height:16px;color:var(--markup-paper);font-family:var(--markup-font-mono);text-align:center;border:2px solid var(--markup-paper);pointer-events:none;border-radius:999px;padding:0 4px;font-size:9.5px;font-weight:600;line-height:12px;position:absolute;top:-6px;right:-8px}@keyframes markup-ghost-pulse{0%,to{box-shadow:0 4px 14px -4px #00000059,0 0 #e35d2a66}50%{box-shadow:0 4px 14px -4px #00000059,0 0 0 10px #e35d2a00}}.markup-placement-overlay{background:var(--markup-overlay-tint);pointer-events:none;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:360px;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}}.markup-popover.is-hud-hidden{display: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-popover-title{min-width:0;font-family:var(--markup-font-mono);letter-spacing:.02em;color:var(--markup-muted);white-space:nowrap;text-overflow:ellipsis;flex:auto;font-size:11px;line-height:1;overflow:hidden}.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{border-top:1px solid var(--markup-border);background:var(--markup-paper);flex-direction:column;gap:6px;padding:10px 12px 8px;display:flex}.markup-popover-header+.markup-popover-body{border-top:none}.markup-popover-byline{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.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,transform .12s cubic-bezier(.2,.7,.2,1);display:inline-flex}.markup-icon-btn:hover,.markup-icon-btn.is-open{background:var(--markup-border);color:var(--markup-ink)}.markup-icon-btn:active{transform:scale(.97)}.markup-comments{flex-direction:column;max-height:420px;margin:0;padding:0;list-style:none;display:flex;overflow-y:auto}.markup-comment{border-bottom:1px solid var(--markup-border);grid-template-columns:26px 1fr;align-items:start;gap:0 10px;padding:12px;display:grid}.markup-comment:last-child{border-bottom:none}.markup-comment>:not(.markup-comment-avatar){grid-column:2}.markup-comment.is-new{animation:.2s cubic-bezier(.2,.7,.2,1) markup-comment-in}@keyframes markup-comment-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.markup-comment-avatar{background:var(--markup-border);width:26px;height:26px;color:var(--markup-ink);font-family:var(--markup-font-mono);letter-spacing:.02em;text-transform:uppercase;-webkit-user-select:none;user-select:none;border-radius:999px;grid-area:1/1/span 4;justify-content:center;align-items:center;margin-top:-3px;font-size:10.5px;font-weight:600;display:inline-flex;overflow:hidden}.markup-avatar-initials{text-box-trim:trim-both;text-box-edge:cap alphabetic;line-height:1}.markup-avatar-img{object-fit:cover;width:100%;height:100%;display:block}.markup-comment-avatar[data-tone=\"1\"]{color:oklch(25% .07 230);background:oklch(85% .07 200)}.markup-comment-avatar[data-tone=\"2\"]{color:oklch(30% .1 150);background:oklch(88% .07 130)}.markup-comment-avatar[data-tone=\"3\"]{color:oklch(35% .1 40);background:oklch(90% .05 50)}.markup-comment-avatar[data-tone=\"4\"]{color:oklch(30% .1 320);background:oklch(87% .07 320)}.markup-comment-avatar[data-tone=\"5\"]{color:oklch(32% .09 70);background:oklch(88% .06 80)}.markup-comment-meta{align-items:center;gap:8px;min-width:0;margin-bottom:4px;font-size:13px;display:flex}.markup-comment-author{color:var(--markup-ink);white-space:nowrap;text-overflow:ellipsis;min-width:0;font-size:13px;font-weight:600;overflow:hidden}.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-badge.is-agent{background:color-mix(in srgb, var(--markup-brand) 14%, transparent);color:var(--markup-brand);letter-spacing:normal;justify-content:center;width:14px;padding:0}.markup-comment-time{color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.04em;white-space:nowrap;flex-shrink:0;font-size:10.5px}.markup-comment-body{color:var(--markup-ink);white-space:pre-wrap;word-break:break-word;margin:0;font-size:13.5px;line-height:19px}.markup-comment-edited{color:var(--markup-muted);font-family:var(--markup-font-mono);margin-left:2px;font-size:10.5px}.markup-comment-edited:before{content:\" · \"}.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)}.markup-comment-menu.is-side .markup-thread-menu-list{animation-name:markup-menu-in-side;top:-4px;right:calc(100% + 2px)}@keyframes markup-menu-in-side{0%{opacity:0;transform:translate(4px)}to{opacity:1;transform:translate(0)}}@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:6px;display:flex}.markup-reaction-chip{border:1px solid var(--markup-border);background:var(--markup-surface-3);color:var(--markup-ink);font:inherit;cursor:pointer;border-radius:999px;align-items:center;gap:4px;padding:2px 7px;font-size:11.5px;line-height:1.2;transition:background .12s,border-color .12s;display:inline-flex}.markup-reaction-chip:hover:not(:disabled){background:var(--markup-hover)}.markup-reaction-chip.is-mine{background:var(--markup-accent-soft);border-color:color-mix(in srgb, var(--markup-brand) 50%, transparent);color:var(--markup-accent-ink)}.markup-reaction-chip.is-mine:hover:not(:disabled){background:color-mix(in srgb, var(--markup-brand) 18%, 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:10.5px}.markup-reaction-chip.is-mine .markup-reaction-count{color:var(--markup-accent-ink)}.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{width:22px;height:22px;color:var(--markup-muted);font:inherit;cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;font-size:13px;line-height:1;transition:background .12s,color .12s;display:inline-flex}.markup-reaction-add:hover,.markup-reaction-add.is-open{background:var(--markup-hover);color:var(--markup-ink)}.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-wrap.is-side .markup-reaction-picker{animation-name:markup-menu-in-side;top:-4px;right:calc(100% + 2px)}.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-actions{justify-content:flex-end;gap:6px;display:flex}.markup-composer{flex-direction:column;display:flex;position:relative}.markup-composer-input{width:100%;min-height:38px;max-height:120px;color:var(--markup-ink);font-family:var(--markup-font);background:0 0;border:none;border-radius:0;padding:2px 0;font-size:13.5px;line-height:19px;transition:none;overflow-y:auto}.markup-composer-input:focus-visible{box-shadow:none;outline:none}.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{opacity:0;background:0 0;border:none;border-radius:0;justify-content:space-between;align-items:center;gap:8px;padding:0;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:.04em;color:var(--markup-muted);align-items:center;gap:3px;font-size:10.5px;display:inline-flex}.markup-composer-hint-label{margin-left:2px}.markup-composer-error{color:var(--markup-brand)}.markup-composer-actions{align-items:center;gap:6px;display:flex}.markup-composer .markup-btn-primary{background:var(--markup-ink);height:26px;color:var(--markup-paper);border-radius:6px;padding:0 10px}.markup-composer .markup-btn-primary:hover:not(:disabled){background:color-mix(in srgb, var(--markup-ink) 88%, var(--markup-paper))}.markup-composer-actions-empty{transition:opacity .12s;position:absolute;bottom:0;right:0}.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,transform .12s cubic-bezier(.2,.7,.2,1);display:inline-flex}.markup-btn:disabled{opacity:.5;cursor:not-allowed}.markup-btn:active:not(:disabled){transform:scale(.97)}.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-btn-danger{color:var(--markup-danger)}.markup-btn-danger:hover:not(:disabled){background:color-mix(in srgb, var(--markup-danger) 10%, transparent)}.markup-discard-confirm{background:color-mix(in srgb, var(--markup-paper) 92%, transparent);-webkit-backdrop-filter:blur(6px);flex-direction:column;justify-content:center;gap:4px;padding:16px;animation:.12s ease-out markup-menu-in;display:flex;position:absolute;inset:0}.markup-discard-confirm-title{color:var(--markup-ink);margin:0;font-size:13px;font-weight:600}.markup-discard-confirm-desc{color:var(--markup-muted);margin:0;font-size:12px}.markup-discard-confirm-actions{gap:6px;margin-top:10px;display:flex}.markup-screenshot-row{border:1px dashed var(--markup-border-strong);color:var(--markup-muted);border-radius:6px;flex-direction:column;gap:8px;margin-top:0;padding:6px 8px;font-size:11.5px;display:flex}.markup-screenshot-row.is-attached{border-style:solid;border-color:var(--markup-border);padding:8px}.markup-screenshot-row-head{justify-content:space-between;align-items:center;gap:8px;min-height:16px;display:flex}.markup-screenshot-status{color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.04em;align-items:center;gap:5px;font-size:11px;display:flex}.markup-screenshot-row.is-failed{opacity:.85;border-style:dotted}.markup-screenshot-toggle{cursor:pointer;color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.04em;align-items:center;gap:5px;font-size:11px;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-link{border:1px solid var(--markup-border-strong);cursor:zoom-in;background:0 0;border-radius:3px;margin:-4px auto -4px -4px;padding:0;transition:border-color .12s;display:block;overflow:hidden}.markup-screenshot-thumb-link:hover,.markup-screenshot-thumb-link:focus-visible{border-color:var(--markup-brand)}.markup-screenshot-thumb{object-fit:cover;object-position:top;width:auto;height:22px;display:block}.markup-screenshot-redacted-chip{background:color-mix(in srgb, var(--markup-success,oklch(62% .16 150)) 16%, transparent);color:var(--markup-success,oklch(62% .16 150));font-family:var(--markup-font-mono);white-space:nowrap;cursor:pointer;border:none;border-radius:999px;align-items:center;gap:3px;padding:1px 7px;font-size:10px;display:inline-flex}.markup-screenshot-redacted-chip:hover{filter:brightness(1.05)}.markup-screenshot-redacted-arrow{font-style:normal}.markup-screenshot-redacted-list{flex-direction:column;gap:2px;display:flex}.markup-screenshot-redacted-selector{font-family:var(--markup-font-mono);color:var(--markup-muted);font-size:9px;display:block}.markup-screenshot-help{font-family:var(--markup-font-mono);color:var(--markup-muted);margin:0;font-size:10px;line-height:1.5}.markup-screenshot-help-link{color:var(--markup-ink);text-underline-offset:2px;text-decoration:underline}.markup-screenshot-help-link:hover{color:var(--markup-brand)}.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-toolbar,.markup-tb-btn,.markup-tb-badge,.markup-comment,.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}}.markup-mention-chip{background:var(--markup-accent-soft);color:var(--markup-accent-ink);border-radius:3px;padding:0 2px;font-weight:500;display:inline-block}.markup-mention-input{white-space:pre-wrap;overflow-wrap:anywhere;cursor:text;outline:none;position:relative}.markup-mention-input[aria-disabled=true]{opacity:.6;cursor:default}.markup-mention-input[data-empty]:before{content:attr(data-placeholder);color:var(--markup-muted);pointer-events:none;position:absolute;inset:0 auto auto 0}.markup-mention-input .markup-mention-chip{white-space:nowrap;padding:0 3px}.markup-comment-edit-input{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);background:var(--markup-paper);width:100%;min-height:58px;max-height:200px;color:var(--markup-ink);font:inherit;padding:8px 10px;font-size:13px;line-height:1.5;overflow-y:auto}.markup-comment-edit-input:focus-visible{border-color:var(--markup-brand);box-shadow:0 0 0 3px #e35d2a2e}.markup-comment-edit-input[data-empty]:before{inset:8px auto auto 10px}.markup-mention-picker{z-index:10;background:var(--markup-paper);border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);max-height:180px;box-shadow:var(--markup-shadow);margin:0 0 4px;padding:4px;list-style:none;position:absolute;bottom:100%;left:0;right:0;overflow-y:auto}.markup-mention-picker-item{border-radius:var(--markup-radius-sm);cursor:pointer;color:var(--markup-ink);justify-content:space-between;align-items:center;gap:8px;padding:6px 8px;font-size:13px;display:flex}.markup-mention-picker-item.is-active{background:color-mix(in srgb, var(--markup-brand) 12%, transparent)}.markup-mention-picker-name{font-weight:500}.markup-mention-picker-trigger{color:var(--markup-muted);font-family:var(--markup-font-mono);font-size:10px}.markup-notifications-panel{max-height:min(60vh,420px);color:var(--markup-ink);flex-direction:column;display:flex}.markup-notifications-panel-header{border-bottom:1px solid var(--markup-border);align-items:center;gap:8px;padding:8px 10px;display:flex}.markup-notifications-panel-header .markup-eyebrow{flex:1}.markup-notifications-panel-actions{align-items:center;gap:8px;display:flex}.markup-notifications-panel-mark-all{color:var(--markup-muted);cursor:pointer;background:0 0;border:none;padding:0;font-size:11px}.markup-notifications-panel-mark-all:hover{color:var(--markup-ink)}.markup-notifications-panel-body{flex:1;overflow-y:auto}.markup-notifications-panel-empty,.markup-notifications-panel-error{text-align:center;color:var(--markup-muted);padding:24px 12px;font-size:12px}.markup-notifications-panel-empty-title{color:var(--markup-ink);margin:0 0 4px;font-weight:500}.markup-notifications-panel-empty-sub{color:var(--markup-muted);margin:0;line-height:1.4}.markup-notifications-panel-error{color:var(--markup-danger,#b91c1c)}.markup-notifications-panel-list{margin:0;padding:4px;list-style:none}.markup-notifications-panel-row{border-radius:var(--markup-radius-sm);text-align:start;cursor:pointer;width:100%;font:inherit;color:inherit;background:0 0;border:none;flex-direction:column;gap:4px;padding:8px 10px;display:flex}.markup-notifications-panel-row:hover{background:color-mix(in srgb, var(--markup-brand) 8%, transparent)}.markup-notifications-panel-row.is-unread{background:color-mix(in srgb, var(--markup-brand) 5%, transparent)}.markup-notifications-panel-meta{align-items:center;gap:6px;font-size:11px;display:flex}.markup-notifications-panel-dot{background:var(--markup-brand);border-radius:999px;flex-shrink:0;width:6px;height:6px}.markup-notifications-panel-actor{font-weight:600}.markup-notifications-panel-sep{color:var(--markup-muted)}.markup-notifications-panel-time{color:var(--markup-muted);font-family:var(--markup-font-mono);font-size:10px}.markup-notifications-panel-thread{color:var(--markup-muted);margin:0;font-size:12px}.markup-notifications-panel-thread-title{color:var(--markup-ink)}.markup-notifications-panel-excerpt{color:color-mix(in srgb, var(--markup-ink) 80%, transparent);-webkit-line-clamp:2;-webkit-box-orient:vertical;margin:0;font-size:12px;font-style:italic;display:-webkit-box;overflow:hidden}.markup-panel-pop{z-index:11;pointer-events:auto;width:380px;max-width:calc(100vw - 24px);position:fixed;bottom:76px}.markup-panel-pop[data-panel=privacy]{width:340px}.markup-panel-pop[data-panel=shortcuts]{width:320px}.markup-panel-pop-right{right:22px}.markup-panel-pop-left{left:22px}.markup-panel-pop-center{left:50%;transform:translate(-50%)}.markup-panel-pop .markup-pop{width:100%;animation:.14s cubic-bezier(.2,.7,.2,1) markup-pop-in;position:static}.markup-panel-pop .markup-notifications-panel{max-height:min(60vh,480px)}.markup-panel-pop .markup-notifications-panel-header{padding:12px 14px}.markup-panel-pop .markup-notifications-panel-header .markup-icon-btn{display:none}.markup-pop[data-pop=privacy],.markup-pop[data-pop=shortcuts]{padding:0}.markup-panel{max-height:min(70vh,520px);color:var(--markup-ink);flex-direction:column;display:flex}.markup-panel-header{border-bottom:1px solid var(--markup-border);align-items:center;gap:8px;padding:12px 14px;display:flex}.markup-panel-header .markup-eyebrow{flex:1}.markup-panel-body{flex:1;padding:4px 14px 14px;overflow-y:auto}.markup-panel-section{border-bottom:1px solid var(--markup-border);padding:10px 0}.markup-panel-section:last-child{border-bottom:none;padding-bottom:2px}.markup-panel-section-title{font-family:var(--markup-font-mono);letter-spacing:.06em;text-transform:lowercase;color:var(--markup-muted);margin:0 0 6px;font-size:10px;font-weight:400}.markup-panel-text{color:var(--markup-ink-soft);margin:0;font-size:12.5px;line-height:1.5}.markup-panel-text strong{color:var(--markup-ink);font-weight:600}.markup-panel-mono{font-family:var(--markup-font-mono);color:var(--markup-ink);word-break:break-all;font-size:11.5px}.markup-panel-list{color:var(--markup-ink-soft);margin:0;padding-left:16px;font-size:12.5px;line-height:1.5}.markup-panel-list li{margin-bottom:3px}.markup-panel-list li::marker{color:var(--markup-muted)}.markup-panel-note{color:var(--markup-muted);margin:8px 0 0;font-size:11.5px;line-height:1.45}.markup-panel-error{color:var(--markup-danger);margin:8px 0 0;font-size:11.5px;line-height:1.45}.markup-panel-action{border:1px solid var(--markup-border-strong);width:100%;height:30px;color:var(--markup-ink);font:inherit;cursor:pointer;background:0 0;border-radius:7px;margin-top:10px;padding:0 10px;font-size:12.5px;transition:background .12s,border-color .12s,color .12s}.markup-panel-action:hover:not(:disabled){background:var(--markup-hover)}.markup-panel-action:disabled{opacity:.6;cursor:default}.markup-panel-action.is-danger{border-color:color-mix(in srgb, var(--markup-danger) 45%, transparent);color:var(--markup-danger)}.markup-panel-action.is-danger:hover:not(:disabled){background:color-mix(in srgb, var(--markup-danger) 10%, transparent)}.markup-shortcut-list{margin:0;padding:0;list-style:none}.markup-shortcut-row{align-items:center;gap:10px;min-height:24px;padding:2px 0;display:flex}.markup-shortcut-label{min-width:0;color:var(--markup-ink-soft);flex:1;font-size:12.5px;line-height:1.4}.markup-shortcut-keys{flex-shrink:0;align-items:center;gap:4px;display:inline-flex}.markup-shortcut-chord{align-items:center;gap:3px;display:inline-flex}.markup-shortcut-or{color:var(--markup-muted);margin-right:1px;font-size:10px}", de = 1e4, fe = 20, pe = 60, F = null, I = [], me = null, he = !1, ge = _e();
|
|
252
|
+
function _e() {
|
|
253
253
|
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `s-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`;
|
|
254
254
|
}
|
|
255
|
-
function
|
|
256
|
-
if (
|
|
257
|
-
|
|
255
|
+
function ve(e) {
|
|
256
|
+
if (F = e, !e) {
|
|
257
|
+
I = [], me &&= (clearTimeout(me), null);
|
|
258
258
|
return;
|
|
259
259
|
}
|
|
260
|
-
|
|
260
|
+
xe();
|
|
261
261
|
}
|
|
262
|
-
function
|
|
263
|
-
if (
|
|
264
|
-
if (
|
|
262
|
+
function ye(e, t) {
|
|
263
|
+
if (F && !(I.length >= pe)) {
|
|
264
|
+
if (I.push({
|
|
265
265
|
name: e,
|
|
266
266
|
properties: t,
|
|
267
267
|
timestamp: Date.now()
|
|
268
|
-
}),
|
|
269
|
-
|
|
268
|
+
}), I.length >= fe) {
|
|
269
|
+
be();
|
|
270
270
|
return;
|
|
271
271
|
}
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
},
|
|
272
|
+
me ||= setTimeout(() => {
|
|
273
|
+
me = null, be();
|
|
274
|
+
}, de);
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
|
-
async function
|
|
278
|
-
if (!
|
|
279
|
-
let e =
|
|
280
|
-
|
|
277
|
+
async function be() {
|
|
278
|
+
if (!F || I.length === 0) return;
|
|
279
|
+
let e = I.splice(0, fe);
|
|
280
|
+
me &&= (clearTimeout(me), null);
|
|
281
281
|
try {
|
|
282
|
-
await fetch(`${
|
|
282
|
+
await fetch(`${F.apiUrl.replace(/\/+$/, "")}/widget/events`, {
|
|
283
283
|
method: "POST",
|
|
284
284
|
headers: {
|
|
285
285
|
"content-type": "application/json",
|
|
286
|
-
"x-markup-api-key":
|
|
286
|
+
"x-markup-api-key": F.apiKey
|
|
287
287
|
},
|
|
288
288
|
body: JSON.stringify({
|
|
289
|
-
sessionId:
|
|
290
|
-
widgetVersion:
|
|
289
|
+
sessionId: ge,
|
|
290
|
+
widgetVersion: F.widgetVersion,
|
|
291
291
|
events: e.map((e) => ({
|
|
292
292
|
name: e.name,
|
|
293
293
|
properties: e.properties,
|
|
@@ -297,21 +297,21 @@ async function xe() {
|
|
|
297
297
|
keepalive: !0
|
|
298
298
|
});
|
|
299
299
|
} catch {}
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
},
|
|
303
|
-
}
|
|
304
|
-
function
|
|
305
|
-
if (
|
|
306
|
-
|
|
307
|
-
let e = () => void
|
|
300
|
+
F && I.length > 0 && !me && (me = setTimeout(() => {
|
|
301
|
+
me = null, be();
|
|
302
|
+
}, de));
|
|
303
|
+
}
|
|
304
|
+
function xe() {
|
|
305
|
+
if (he || typeof window > "u") return;
|
|
306
|
+
he = !0;
|
|
307
|
+
let e = () => void be();
|
|
308
308
|
window.addEventListener("pagehide", e), document.addEventListener("visibilitychange", () => {
|
|
309
309
|
document.visibilityState === "hidden" && e();
|
|
310
310
|
});
|
|
311
311
|
}
|
|
312
312
|
//#endregion
|
|
313
313
|
//#region src/runtime/error-boundary.tsx
|
|
314
|
-
var
|
|
314
|
+
var Se = class extends C {
|
|
315
315
|
state = { hasError: !1 };
|
|
316
316
|
static getDerivedStateFromError() {
|
|
317
317
|
return { hasError: !0 };
|
|
@@ -324,12 +324,12 @@ var Ce = class extends C {
|
|
|
324
324
|
render() {
|
|
325
325
|
return this.state.hasError ? null : this.props.children;
|
|
326
326
|
}
|
|
327
|
-
},
|
|
328
|
-
function
|
|
327
|
+
}, Ce = 1e3;
|
|
328
|
+
function we(e) {
|
|
329
329
|
let t = !1, n = 0;
|
|
330
330
|
return (r) => {
|
|
331
331
|
let i = Date.now();
|
|
332
|
-
t || i - n <
|
|
332
|
+
t || i - n < Ce || (t = !0, n = i, fetch(`${e.apiUrl.replace(/\/+$/, "")}/widget/error`, {
|
|
333
333
|
method: "POST",
|
|
334
334
|
headers: {
|
|
335
335
|
"content-type": "application/json",
|
|
@@ -345,97 +345,97 @@ function Te(e) {
|
|
|
345
345
|
}));
|
|
346
346
|
};
|
|
347
347
|
}
|
|
348
|
-
function
|
|
348
|
+
function Te() {
|
|
349
349
|
return typeof window < "u" ? window.location.href : void 0;
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function Ee() {
|
|
352
352
|
return typeof navigator < "u" ? navigator.userAgent : void 0;
|
|
353
353
|
}
|
|
354
|
-
var
|
|
355
|
-
function
|
|
356
|
-
let r =
|
|
357
|
-
r || (r =
|
|
354
|
+
var De = /* @__PURE__ */ new WeakMap();
|
|
355
|
+
function Oe(e, t, n) {
|
|
356
|
+
let r = De.get(e);
|
|
357
|
+
r || (r = we(e), De.set(e, r));
|
|
358
358
|
let i = t instanceof Error ? t : Error(String(t));
|
|
359
359
|
r({
|
|
360
360
|
message: i.message,
|
|
361
361
|
name: i.name,
|
|
362
362
|
stack: i.stack,
|
|
363
|
-
url:
|
|
364
|
-
userAgent:
|
|
363
|
+
url: Te(),
|
|
364
|
+
userAgent: Ee(),
|
|
365
365
|
context: n?.context
|
|
366
366
|
});
|
|
367
367
|
}
|
|
368
|
-
var
|
|
369
|
-
function
|
|
370
|
-
|
|
368
|
+
var ke = null;
|
|
369
|
+
function Ae(e) {
|
|
370
|
+
ke = e;
|
|
371
371
|
}
|
|
372
|
-
function
|
|
373
|
-
|
|
372
|
+
function L(e, t) {
|
|
373
|
+
ke && Oe(ke, e, t);
|
|
374
374
|
}
|
|
375
375
|
//#endregion
|
|
376
376
|
//#region src/runtime/theme-store.ts
|
|
377
|
-
var
|
|
378
|
-
function
|
|
377
|
+
var je = "markup:widget:theme", Me = null, R = Fe() ?? "auto", Ne = Fe() != null, Pe = /* @__PURE__ */ new Set();
|
|
378
|
+
function Fe() {
|
|
379
379
|
try {
|
|
380
|
-
let e = localStorage.getItem(
|
|
380
|
+
let e = localStorage.getItem(je);
|
|
381
381
|
if (e === "light" || e === "dark" || e === "auto") return e;
|
|
382
382
|
} catch {}
|
|
383
383
|
return null;
|
|
384
384
|
}
|
|
385
|
-
function
|
|
386
|
-
|
|
385
|
+
function Ie() {
|
|
386
|
+
Me && (R === "auto" ? delete Me.dataset.theme : Me.dataset.theme = R);
|
|
387
387
|
}
|
|
388
|
-
function
|
|
389
|
-
|
|
388
|
+
function Le(e, t) {
|
|
389
|
+
Me = e, !Ne && t && (R = t), Ie();
|
|
390
390
|
}
|
|
391
|
-
function
|
|
392
|
-
return
|
|
391
|
+
function Re() {
|
|
392
|
+
return R;
|
|
393
393
|
}
|
|
394
|
-
function
|
|
395
|
-
return
|
|
394
|
+
function ze() {
|
|
395
|
+
return R === "dark" ? "dark" : R === "light" ? "light" : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
396
396
|
}
|
|
397
|
-
function
|
|
398
|
-
if (e !==
|
|
399
|
-
|
|
397
|
+
function Be(e) {
|
|
398
|
+
if (e !== R) {
|
|
399
|
+
R = e, Ne = !0;
|
|
400
400
|
try {
|
|
401
|
-
localStorage.setItem(
|
|
401
|
+
localStorage.setItem(je, e);
|
|
402
402
|
} catch {}
|
|
403
|
-
|
|
404
|
-
for (let e of
|
|
403
|
+
Ie();
|
|
404
|
+
for (let e of Pe) e(R);
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
|
-
function
|
|
408
|
-
return
|
|
409
|
-
|
|
407
|
+
function Ve(e) {
|
|
408
|
+
return Pe.add(e), () => {
|
|
409
|
+
Pe.delete(e);
|
|
410
410
|
};
|
|
411
411
|
}
|
|
412
|
-
function
|
|
412
|
+
function He() {
|
|
413
413
|
if (typeof window > "u" || !window.matchMedia) return () => {};
|
|
414
414
|
let e = window.matchMedia("(prefers-color-scheme: dark)"), t = () => {
|
|
415
|
-
if (
|
|
415
|
+
if (R === "auto") for (let e of Pe) e(R);
|
|
416
416
|
};
|
|
417
417
|
return e.addEventListener?.("change", t), () => e.removeEventListener?.("change", t);
|
|
418
418
|
}
|
|
419
419
|
//#endregion
|
|
420
420
|
//#region ../../node_modules/.pnpm/preact@10.29.7/node_modules/preact/hooks/dist/hooks.module.js
|
|
421
|
-
var
|
|
422
|
-
function
|
|
423
|
-
|
|
424
|
-
var n =
|
|
421
|
+
var Ue, z, We, Ge, Ke = 0, qe = [], B = t, Je = B.__b, Ye = B.__r, Xe = B.diffed, Ze = B.__c, Qe = B.unmount, $e = B.__;
|
|
422
|
+
function et(e, t) {
|
|
423
|
+
B.__h && B.__h(z, e, Ke || t), Ke = 0;
|
|
424
|
+
var n = z.__H || (z.__H = {
|
|
425
425
|
__: [],
|
|
426
426
|
__h: []
|
|
427
427
|
});
|
|
428
428
|
return e >= n.__.length && n.__.push({}), n.__[e];
|
|
429
429
|
}
|
|
430
|
-
function
|
|
431
|
-
return
|
|
430
|
+
function V(e) {
|
|
431
|
+
return Ke = 1, tt(ut, e);
|
|
432
432
|
}
|
|
433
|
-
function
|
|
434
|
-
var r =
|
|
435
|
-
if (r.t = e, !r.__c && (r.__ = [n ? n(t) :
|
|
433
|
+
function tt(e, t, n) {
|
|
434
|
+
var r = et(Ue++, 2);
|
|
435
|
+
if (r.t = e, !r.__c && (r.__ = [n ? n(t) : ut(void 0, t), function(e) {
|
|
436
436
|
var t = r.__N ? r.__N[0] : r.__[0], n = r.t(t, e);
|
|
437
437
|
t !== n && (r.__N = [n, r.__[1]], r.__c.setState({}));
|
|
438
|
-
}], r.__c =
|
|
438
|
+
}], r.__c = z, !z.__f)) {
|
|
439
439
|
var i = function(e, t, n) {
|
|
440
440
|
if (!r.__c.__H) return !0;
|
|
441
441
|
var i = !1, o = r.__c.props !== e;
|
|
@@ -451,115 +451,115 @@ function nt(e, t, n) {
|
|
|
451
451
|
}
|
|
452
452
|
return !i || o;
|
|
453
453
|
};
|
|
454
|
-
|
|
455
|
-
var a =
|
|
456
|
-
|
|
454
|
+
z.__f = !0;
|
|
455
|
+
var a = z.shouldComponentUpdate, o = z.componentWillUpdate;
|
|
456
|
+
z.componentWillUpdate = function(e, t, n) {
|
|
457
457
|
if (this.__e) {
|
|
458
458
|
var r = a;
|
|
459
459
|
a = void 0, i(e, t, n), a = r;
|
|
460
460
|
}
|
|
461
461
|
o && o.call(this, e, t, n);
|
|
462
|
-
},
|
|
462
|
+
}, z.shouldComponentUpdate = i;
|
|
463
463
|
}
|
|
464
464
|
return r.__N || r.__;
|
|
465
465
|
}
|
|
466
|
-
function
|
|
467
|
-
var n =
|
|
468
|
-
!
|
|
466
|
+
function H(e, t) {
|
|
467
|
+
var n = et(Ue++, 3);
|
|
468
|
+
!B.__s && lt(n.__H, t) && (n.__ = e, n.u = t, z.__H.__h.push(n));
|
|
469
469
|
}
|
|
470
|
-
function
|
|
471
|
-
var n =
|
|
472
|
-
!
|
|
470
|
+
function nt(e, t) {
|
|
471
|
+
var n = et(Ue++, 4);
|
|
472
|
+
!B.__s && lt(n.__H, t) && (n.__ = e, n.u = t, z.__h.push(n));
|
|
473
473
|
}
|
|
474
|
-
function
|
|
475
|
-
return
|
|
474
|
+
function U(e) {
|
|
475
|
+
return Ke = 5, rt(function() {
|
|
476
476
|
return { current: e };
|
|
477
477
|
}, []);
|
|
478
478
|
}
|
|
479
|
-
function
|
|
480
|
-
var n =
|
|
481
|
-
return
|
|
479
|
+
function rt(e, t) {
|
|
480
|
+
var n = et(Ue++, 7);
|
|
481
|
+
return lt(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;
|
|
482
482
|
}
|
|
483
|
-
function
|
|
484
|
-
return
|
|
483
|
+
function W(e, t) {
|
|
484
|
+
return Ke = 8, rt(function() {
|
|
485
485
|
return e;
|
|
486
486
|
}, t);
|
|
487
487
|
}
|
|
488
|
-
function
|
|
489
|
-
for (var e; e =
|
|
488
|
+
function it() {
|
|
489
|
+
for (var e; e = qe.shift();) {
|
|
490
490
|
var t = e.__H;
|
|
491
491
|
if (e.__P && t) try {
|
|
492
|
-
t.__h.some(
|
|
492
|
+
t.__h.some(st), t.__h.some(ct), t.__h = [];
|
|
493
493
|
} catch (n) {
|
|
494
|
-
t.__h = [],
|
|
494
|
+
t.__h = [], B.__e(n, e.__v);
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
497
|
}
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
},
|
|
501
|
-
e && t.__k && t.__k.__m && (e.__m = t.__k.__m),
|
|
502
|
-
},
|
|
503
|
-
|
|
504
|
-
var t = (
|
|
505
|
-
t && (
|
|
498
|
+
B.__b = function(e) {
|
|
499
|
+
z = null, Je && Je(e);
|
|
500
|
+
}, B.__ = function(e, t) {
|
|
501
|
+
e && t.__k && t.__k.__m && (e.__m = t.__k.__m), $e && $e(e, t);
|
|
502
|
+
}, B.__r = function(e) {
|
|
503
|
+
Ye && Ye(e), Ue = 0;
|
|
504
|
+
var t = (z = e.__c).__H;
|
|
505
|
+
t && (We === z ? (t.__h = [], z.__h = [], t.__.some(function(e) {
|
|
506
506
|
e.__N && (e.__ = e.__N), e.u = e.__N = void 0;
|
|
507
|
-
})) : (t.__h.some(
|
|
508
|
-
},
|
|
509
|
-
|
|
507
|
+
})) : (t.__h.some(st), t.__h.some(ct), t.__h = [], Ue = 0)), We = z;
|
|
508
|
+
}, B.diffed = function(e) {
|
|
509
|
+
Xe && Xe(e);
|
|
510
510
|
var t = e.__c;
|
|
511
|
-
t && t.__H && (t.__H.__h.length && (
|
|
511
|
+
t && t.__H && (t.__H.__h.length && (qe.push(t) !== 1 && Ge === B.requestAnimationFrame || ((Ge = B.requestAnimationFrame) || ot)(it)), t.__H.__.some(function(e) {
|
|
512
512
|
e.u &&= (e.__H = e.u, void 0);
|
|
513
|
-
})),
|
|
514
|
-
},
|
|
513
|
+
})), We = z = null;
|
|
514
|
+
}, B.__c = function(e, t) {
|
|
515
515
|
t.some(function(e) {
|
|
516
516
|
try {
|
|
517
|
-
e.__h.some(
|
|
518
|
-
return !e.__ ||
|
|
517
|
+
e.__h.some(st), e.__h = e.__h.filter(function(e) {
|
|
518
|
+
return !e.__ || ct(e);
|
|
519
519
|
});
|
|
520
520
|
} catch (n) {
|
|
521
521
|
t.some(function(e) {
|
|
522
522
|
e.__h &&= [];
|
|
523
|
-
}), t = [],
|
|
523
|
+
}), t = [], B.__e(n, e.__v);
|
|
524
524
|
}
|
|
525
|
-
}),
|
|
526
|
-
},
|
|
527
|
-
|
|
525
|
+
}), Ze && Ze(e, t);
|
|
526
|
+
}, B.unmount = function(e) {
|
|
527
|
+
Qe && Qe(e);
|
|
528
528
|
var t, n = e.__c;
|
|
529
529
|
n && n.__H && (n.__H.__.some(function(e) {
|
|
530
530
|
try {
|
|
531
|
-
|
|
531
|
+
st(e);
|
|
532
532
|
} catch (e) {
|
|
533
533
|
t = e;
|
|
534
534
|
}
|
|
535
|
-
}), n.__H = void 0, t &&
|
|
535
|
+
}), n.__H = void 0, t && B.__e(t, n.__v));
|
|
536
536
|
};
|
|
537
|
-
var
|
|
538
|
-
function
|
|
537
|
+
var at = typeof requestAnimationFrame == "function";
|
|
538
|
+
function ot(e) {
|
|
539
539
|
var t, n = function() {
|
|
540
|
-
clearTimeout(r),
|
|
540
|
+
clearTimeout(r), at && cancelAnimationFrame(t), setTimeout(e);
|
|
541
541
|
}, r = setTimeout(n, 35);
|
|
542
|
-
|
|
542
|
+
at && (t = requestAnimationFrame(n));
|
|
543
543
|
}
|
|
544
|
-
function
|
|
545
|
-
var t =
|
|
546
|
-
typeof n == "function" && (e.__c = void 0, n()),
|
|
544
|
+
function st(e) {
|
|
545
|
+
var t = z, n = e.__c;
|
|
546
|
+
typeof n == "function" && (e.__c = void 0, n()), z = t;
|
|
547
547
|
}
|
|
548
|
-
function
|
|
549
|
-
var t =
|
|
550
|
-
e.__c = e.__(),
|
|
548
|
+
function ct(e) {
|
|
549
|
+
var t = z;
|
|
550
|
+
e.__c = e.__(), z = t;
|
|
551
551
|
}
|
|
552
|
-
function
|
|
552
|
+
function lt(e, t) {
|
|
553
553
|
return !e || e.length !== t.length || t.some(function(t, n) {
|
|
554
554
|
return t !== e[n];
|
|
555
555
|
});
|
|
556
556
|
}
|
|
557
|
-
function
|
|
557
|
+
function ut(e, t) {
|
|
558
558
|
return typeof t == "function" ? t(e) : t;
|
|
559
559
|
}
|
|
560
|
-
for (var
|
|
561
|
-
|
|
562
|
-
function
|
|
560
|
+
for (var dt = "1.38.0", ft = [], G = [], pt = Uint8Array, mt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", ht = 0, gt = mt.length; ht < gt; ++ht) ft[ht] = mt[ht], G[mt.charCodeAt(ht)] = ht;
|
|
561
|
+
G[45] = 62, G[95] = 63;
|
|
562
|
+
function _t(e) {
|
|
563
563
|
var t = e.length;
|
|
564
564
|
if (t % 4 > 0) throw Error("Invalid string. Length must be a multiple of 4");
|
|
565
565
|
var n = e.indexOf("=");
|
|
@@ -567,33 +567,33 @@ function vt(e) {
|
|
|
567
567
|
var r = n === t ? 0 : 4 - n % 4;
|
|
568
568
|
return [n, r];
|
|
569
569
|
}
|
|
570
|
-
function
|
|
570
|
+
function vt(e, t, n) {
|
|
571
571
|
return (t + n) * 3 / 4 - n;
|
|
572
572
|
}
|
|
573
|
-
function
|
|
574
|
-
var t, n =
|
|
575
|
-
for (c = 0; c < s; c += 4) t =
|
|
576
|
-
return i === 2 && (t =
|
|
573
|
+
function yt(e) {
|
|
574
|
+
var t, n = _t(e), r = n[0], i = n[1], a = new pt(vt(e, r, i)), o = 0, s = i > 0 ? r - 4 : r, c;
|
|
575
|
+
for (c = 0; c < s; c += 4) t = G[e.charCodeAt(c)] << 18 | G[e.charCodeAt(c + 1)] << 12 | G[e.charCodeAt(c + 2)] << 6 | G[e.charCodeAt(c + 3)], a[o++] = t >> 16 & 255, a[o++] = t >> 8 & 255, a[o++] = t & 255;
|
|
576
|
+
return i === 2 && (t = G[e.charCodeAt(c)] << 2 | G[e.charCodeAt(c + 1)] >> 4, a[o++] = t & 255), i === 1 && (t = G[e.charCodeAt(c)] << 10 | G[e.charCodeAt(c + 1)] << 4 | G[e.charCodeAt(c + 2)] >> 2, a[o++] = t >> 8 & 255, a[o++] = t & 255), a;
|
|
577
577
|
}
|
|
578
|
-
function
|
|
579
|
-
return
|
|
578
|
+
function bt(e) {
|
|
579
|
+
return ft[e >> 18 & 63] + ft[e >> 12 & 63] + ft[e >> 6 & 63] + ft[e & 63];
|
|
580
580
|
}
|
|
581
|
-
function
|
|
582
|
-
for (var r, i = [], a = t; a < n; a += 3) r = (e[a] << 16 & 16711680) + (e[a + 1] << 8 & 65280) + (e[a + 2] & 255), i.push(
|
|
581
|
+
function xt(e, t, n) {
|
|
582
|
+
for (var r, i = [], a = t; a < n; a += 3) r = (e[a] << 16 & 16711680) + (e[a + 1] << 8 & 65280) + (e[a + 2] & 255), i.push(bt(r));
|
|
583
583
|
return i.join("");
|
|
584
584
|
}
|
|
585
|
-
function
|
|
586
|
-
for (var t, n = e.length, r = n % 3, i = [], a = 16383, o = 0, s = n - r; o < s; o += a) i.push(
|
|
587
|
-
return r === 1 ? (t = e[n - 1], i.push(
|
|
585
|
+
function St(e) {
|
|
586
|
+
for (var t, n = e.length, r = n % 3, i = [], a = 16383, o = 0, s = n - r; o < s; o += a) i.push(xt(e, o, o + a > s ? s : o + a));
|
|
587
|
+
return r === 1 ? (t = e[n - 1], i.push(ft[t >> 2] + ft[t << 4 & 63] + "==")) : r === 2 && (t = (e[n - 2] << 8) + e[n - 1], i.push(ft[t >> 10] + ft[t >> 4 & 63] + ft[t << 2 & 63] + "=")), i.join("");
|
|
588
588
|
}
|
|
589
589
|
//#endregion
|
|
590
590
|
//#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.8/node_modules/convex/dist/esm/common/index.js
|
|
591
|
-
function
|
|
591
|
+
function Ct(e) {
|
|
592
592
|
if (e === void 0) return {};
|
|
593
|
-
if (!
|
|
593
|
+
if (!Tt(e)) throw Error(`The arguments to a Convex function must be an object. Received: ${e}`);
|
|
594
594
|
return e;
|
|
595
595
|
}
|
|
596
|
-
function
|
|
596
|
+
function wt(e) {
|
|
597
597
|
if (e === void 0) throw Error("Client created with undefined deployment address. If you used an environment variable, check that it's set.");
|
|
598
598
|
if (typeof e != "string") throw Error(`Invalid deployment address: found ${e}".`);
|
|
599
599
|
if (!(e.startsWith("http:") || e.startsWith("https:"))) throw Error(`Invalid deployment address: Must start with "https://" or "http://". Found "${e}".`);
|
|
@@ -604,146 +604,146 @@ function Tt(e) {
|
|
|
604
604
|
}
|
|
605
605
|
if (e.endsWith(".convex.site")) throw Error(`Invalid deployment address: "${e}" ends with .convex.site, which is used for HTTP Actions. Convex deployment URLs typically end with .convex.cloud? If you believe this URL is correct, use the \`skipConvexDeploymentUrlCheck\` option to bypass this.`);
|
|
606
606
|
}
|
|
607
|
-
function
|
|
607
|
+
function Tt(e) {
|
|
608
608
|
let t = typeof e == "object", n = Object.getPrototypeOf(e), r = n === null || n === Object.prototype || n?.constructor?.name === "Object";
|
|
609
609
|
return t && r;
|
|
610
610
|
}
|
|
611
611
|
//#endregion
|
|
612
612
|
//#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.8/node_modules/convex/dist/esm/values/value.js
|
|
613
|
-
var
|
|
614
|
-
function
|
|
613
|
+
var Et = !0, Dt = BigInt("-9223372036854775808"), Ot = BigInt("9223372036854775807"), kt = BigInt("0"), At = BigInt("8"), jt = BigInt("256");
|
|
614
|
+
function Mt(e) {
|
|
615
615
|
return Number.isNaN(e) || !Number.isFinite(e) || Object.is(e, -0);
|
|
616
616
|
}
|
|
617
|
-
function
|
|
618
|
-
e <
|
|
617
|
+
function Nt(e) {
|
|
618
|
+
e < kt && (e -= Dt + Dt);
|
|
619
619
|
let t = e.toString(16);
|
|
620
620
|
t.length % 2 == 1 && (t = "0" + t);
|
|
621
621
|
let n = new Uint8Array(/* @__PURE__ */ new ArrayBuffer(8)), r = 0;
|
|
622
|
-
for (let i of t.match(/.{2}/g).reverse()) n.set([parseInt(i, 16)], r++), e >>=
|
|
623
|
-
return
|
|
622
|
+
for (let i of t.match(/.{2}/g).reverse()) n.set([parseInt(i, 16)], r++), e >>= At;
|
|
623
|
+
return St(n);
|
|
624
624
|
}
|
|
625
|
-
function
|
|
626
|
-
let t =
|
|
625
|
+
function Pt(e) {
|
|
626
|
+
let t = yt(e);
|
|
627
627
|
if (t.byteLength !== 8) throw Error(`Received ${t.byteLength} bytes, expected 8 for $integer`);
|
|
628
|
-
let n =
|
|
629
|
-
for (let e of t) n += BigInt(e) *
|
|
630
|
-
return n >
|
|
628
|
+
let n = kt, r = kt;
|
|
629
|
+
for (let e of t) n += BigInt(e) * jt ** r, r++;
|
|
630
|
+
return n > Ot && (n += Dt + Dt), n;
|
|
631
631
|
}
|
|
632
|
-
function
|
|
633
|
-
if (e <
|
|
632
|
+
function Ft(e) {
|
|
633
|
+
if (e < Dt || Ot < e) throw Error(`BigInt ${e} does not fit into a 64-bit signed integer.`);
|
|
634
634
|
let t = /* @__PURE__ */ new ArrayBuffer(8);
|
|
635
|
-
return new DataView(t).setBigInt64(0, e, !0),
|
|
635
|
+
return new DataView(t).setBigInt64(0, e, !0), St(new Uint8Array(t));
|
|
636
636
|
}
|
|
637
|
-
function
|
|
638
|
-
let t =
|
|
637
|
+
function It(e) {
|
|
638
|
+
let t = yt(e);
|
|
639
639
|
if (t.byteLength !== 8) throw Error(`Received ${t.byteLength} bytes, expected 8 for $integer`);
|
|
640
640
|
return new DataView(t.buffer).getBigInt64(0, !0);
|
|
641
641
|
}
|
|
642
|
-
var
|
|
643
|
-
function
|
|
644
|
-
if (e.length >
|
|
642
|
+
var Lt = DataView.prototype.setBigInt64 ? Ft : Nt, Rt = DataView.prototype.getBigInt64 ? It : Pt, zt = 1024;
|
|
643
|
+
function Bt(e) {
|
|
644
|
+
if (e.length > zt) throw Error(`Field name ${e} exceeds maximum field name length ${zt}.`);
|
|
645
645
|
if (e.startsWith("$")) throw Error(`Field name ${e} starts with a '$', which is reserved.`);
|
|
646
646
|
for (let t = 0; t < e.length; t += 1) {
|
|
647
647
|
let n = e.charCodeAt(t);
|
|
648
648
|
if (n < 32 || n >= 127) throw Error(`Field name ${e} has invalid character '${e[t]}': Field names can only contain non-control ASCII characters`);
|
|
649
649
|
}
|
|
650
650
|
}
|
|
651
|
-
function
|
|
651
|
+
function Vt(e) {
|
|
652
652
|
if (e === null || typeof e == "boolean" || typeof e == "number" || typeof e == "string") return e;
|
|
653
|
-
if (Array.isArray(e)) return e.map((e) =>
|
|
653
|
+
if (Array.isArray(e)) return e.map((e) => Vt(e));
|
|
654
654
|
if (typeof e != "object") throw Error(`Unexpected type of ${e}`);
|
|
655
655
|
let t = Object.entries(e);
|
|
656
656
|
if (t.length === 1) {
|
|
657
657
|
let n = t[0][0];
|
|
658
658
|
if (n === "$bytes") {
|
|
659
659
|
if (typeof e.$bytes != "string") throw Error(`Malformed $bytes field on ${e}`);
|
|
660
|
-
return
|
|
660
|
+
return yt(e.$bytes).buffer;
|
|
661
661
|
}
|
|
662
662
|
if (n === "$integer") {
|
|
663
663
|
if (typeof e.$integer != "string") throw Error(`Malformed $integer field on ${e}`);
|
|
664
|
-
return
|
|
664
|
+
return Rt(e.$integer);
|
|
665
665
|
}
|
|
666
666
|
if (n === "$float") {
|
|
667
667
|
if (typeof e.$float != "string") throw Error(`Malformed $float field on ${e}`);
|
|
668
|
-
let t =
|
|
668
|
+
let t = yt(e.$float);
|
|
669
669
|
if (t.byteLength !== 8) throw Error(`Received ${t.byteLength} bytes, expected 8 for $float`);
|
|
670
|
-
let n = new DataView(t.buffer).getFloat64(0,
|
|
671
|
-
if (!
|
|
670
|
+
let n = new DataView(t.buffer).getFloat64(0, Et);
|
|
671
|
+
if (!Mt(n)) throw Error(`Float ${n} should be encoded as a number`);
|
|
672
672
|
return n;
|
|
673
673
|
}
|
|
674
674
|
if (n === "$set") throw Error("Received a Set which is no longer supported as a Convex type.");
|
|
675
675
|
if (n === "$map") throw Error("Received a Map which is no longer supported as a Convex type.");
|
|
676
676
|
}
|
|
677
677
|
let n = {};
|
|
678
|
-
for (let [t, r] of Object.entries(e))
|
|
678
|
+
for (let [t, r] of Object.entries(e)) Bt(t), n[t] = Vt(r);
|
|
679
679
|
return n;
|
|
680
680
|
}
|
|
681
|
-
var
|
|
682
|
-
function
|
|
681
|
+
var Ht = 16384;
|
|
682
|
+
function Ut(e) {
|
|
683
683
|
let t = JSON.stringify(e, (e, t) => t === void 0 ? "undefined" : typeof t == "bigint" ? `${t.toString()}n` : t);
|
|
684
|
-
if (t.length >
|
|
684
|
+
if (t.length > Ht) {
|
|
685
685
|
let e = 16370, n = t.codePointAt(e - 1);
|
|
686
686
|
return n !== void 0 && n > 65535 && --e, t.substring(0, e) + "[...truncated]";
|
|
687
687
|
}
|
|
688
688
|
return t;
|
|
689
689
|
}
|
|
690
|
-
function
|
|
690
|
+
function Wt(e, t, n, r) {
|
|
691
691
|
if (e === void 0) {
|
|
692
|
-
let e = n && ` (present at path ${n} in original object ${
|
|
692
|
+
let e = n && ` (present at path ${n} in original object ${Ut(t)})`;
|
|
693
693
|
throw Error(`undefined is not a valid Convex value${e}. To learn about Convex's supported types, see https://docs.convex.dev/using/types.`);
|
|
694
694
|
}
|
|
695
695
|
if (e === null) return e;
|
|
696
696
|
if (typeof e == "bigint") {
|
|
697
|
-
if (e <
|
|
698
|
-
return { $integer:
|
|
697
|
+
if (e < Dt || Ot < e) throw Error(`BigInt ${e} does not fit into a 64-bit signed integer.`);
|
|
698
|
+
return { $integer: Lt(e) };
|
|
699
699
|
}
|
|
700
|
-
if (typeof e == "number") if (
|
|
700
|
+
if (typeof e == "number") if (Mt(e)) {
|
|
701
701
|
let t = /* @__PURE__ */ new ArrayBuffer(8);
|
|
702
|
-
return new DataView(t).setFloat64(0, e,
|
|
702
|
+
return new DataView(t).setFloat64(0, e, Et), { $float: St(new Uint8Array(t)) };
|
|
703
703
|
} else return e;
|
|
704
704
|
if (typeof e == "boolean" || typeof e == "string") return e;
|
|
705
|
-
if (e instanceof ArrayBuffer) return { $bytes:
|
|
706
|
-
if (Array.isArray(e)) return e.map((e, r) =>
|
|
707
|
-
if (e instanceof Set) throw Error(
|
|
708
|
-
if (e instanceof Map) throw Error(
|
|
709
|
-
if (!
|
|
705
|
+
if (e instanceof ArrayBuffer) return { $bytes: St(new Uint8Array(e)) };
|
|
706
|
+
if (Array.isArray(e)) return e.map((e, r) => Wt(e, t, n + `[${r}]`, !1));
|
|
707
|
+
if (e instanceof Set) throw Error(Gt(n, "Set", [...e], t));
|
|
708
|
+
if (e instanceof Map) throw Error(Gt(n, "Map", [...e], t));
|
|
709
|
+
if (!Tt(e)) {
|
|
710
710
|
let r = e?.constructor?.name, i = r ? `${r} ` : "";
|
|
711
|
-
throw Error(
|
|
711
|
+
throw Error(Gt(n, i, e, t));
|
|
712
712
|
}
|
|
713
713
|
let i = {}, a = Object.entries(e);
|
|
714
714
|
a.sort(([e, t], [n, r]) => e === n ? 0 : e < n ? -1 : 1);
|
|
715
|
-
for (let [e, o] of a) o === void 0 ? r && (
|
|
715
|
+
for (let [e, o] of a) o === void 0 ? r && (Bt(e), i[e] = Kt(o, t, n + `.${e}`)) : (Bt(e), i[e] = Wt(o, t, n + `.${e}`, !1));
|
|
716
716
|
return i;
|
|
717
717
|
}
|
|
718
|
-
function
|
|
719
|
-
return e ? `${t}${
|
|
718
|
+
function Gt(e, t, n, r) {
|
|
719
|
+
return e ? `${t}${Ut(n)} is not a supported Convex type (present at path ${e} in original object ${Ut(r)}). To learn about Convex's supported types, see https://docs.convex.dev/using/types.` : `${t}${Ut(n)} is not a supported Convex type.`;
|
|
720
720
|
}
|
|
721
|
-
function
|
|
721
|
+
function Kt(e, t, n) {
|
|
722
722
|
if (e === void 0) return { $undefined: null };
|
|
723
|
-
if (t === void 0) throw Error(`Programming error. Current value is ${
|
|
724
|
-
return
|
|
723
|
+
if (t === void 0) throw Error(`Programming error. Current value is ${Ut(e)} but original value is undefined`);
|
|
724
|
+
return Wt(e, t, n, !1);
|
|
725
725
|
}
|
|
726
|
-
function
|
|
727
|
-
return
|
|
726
|
+
function qt(e) {
|
|
727
|
+
return Wt(e, e, "", !1);
|
|
728
728
|
}
|
|
729
729
|
//#endregion
|
|
730
730
|
//#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.8/node_modules/convex/dist/esm/values/errors.js
|
|
731
|
-
var
|
|
731
|
+
var Jt = Object.defineProperty, Yt = (e, t, n) => t in e ? Jt(e, t, {
|
|
732
732
|
enumerable: !0,
|
|
733
733
|
configurable: !0,
|
|
734
734
|
writable: !0,
|
|
735
735
|
value: n
|
|
736
|
-
}) : e[t] = n,
|
|
736
|
+
}) : e[t] = n, Xt = (e, t, n) => Yt(e, typeof t == "symbol" ? t : t + "", n), Zt, Qt, $t = Symbol.for("ConvexError"), en = class extends (Qt = Error, Zt = $t, Qt) {
|
|
737
737
|
constructor(e) {
|
|
738
|
-
super(typeof e == "string" ? e :
|
|
738
|
+
super(typeof e == "string" ? e : Ut(e)), Xt(this, "name", "ConvexError"), Xt(this, "data"), Xt(this, Zt, !0), this.data = e;
|
|
739
739
|
}
|
|
740
|
-
},
|
|
740
|
+
}, tn = Object.defineProperty, nn = (e, t, n) => t in e ? tn(e, t, {
|
|
741
741
|
enumerable: !0,
|
|
742
742
|
configurable: !0,
|
|
743
743
|
writable: !0,
|
|
744
744
|
value: n
|
|
745
|
-
}) : e[t] = n,
|
|
746
|
-
function
|
|
745
|
+
}) : e[t] = n, rn = (e, t, n) => nn(e, typeof t == "symbol" ? t : t + "", n), an = "color:rgb(0, 145, 255)";
|
|
746
|
+
function on(e) {
|
|
747
747
|
switch (e) {
|
|
748
748
|
case "query": return "Q";
|
|
749
749
|
case "mutation": return "M";
|
|
@@ -751,9 +751,9 @@ function sn(e) {
|
|
|
751
751
|
case "any": return "?";
|
|
752
752
|
}
|
|
753
753
|
}
|
|
754
|
-
var
|
|
754
|
+
var sn = class {
|
|
755
755
|
constructor(e) {
|
|
756
|
-
|
|
756
|
+
rn(this, "_onLogLineFuncs"), rn(this, "_verbose"), this._onLogLineFuncs = {}, this._verbose = e.verbose;
|
|
757
757
|
}
|
|
758
758
|
addLogLineListener(e) {
|
|
759
759
|
let t = Math.random().toString(36).substring(2, 15);
|
|
@@ -775,8 +775,8 @@ var cn = class {
|
|
|
775
775
|
for (let t of Object.values(this._onLogLineFuncs)) t("error", ...e);
|
|
776
776
|
}
|
|
777
777
|
};
|
|
778
|
-
function
|
|
779
|
-
let t = new
|
|
778
|
+
function cn(e) {
|
|
779
|
+
let t = new sn(e);
|
|
780
780
|
return t.addLogLineListener((e, ...t) => {
|
|
781
781
|
switch (e) {
|
|
782
782
|
case "debug":
|
|
@@ -795,11 +795,11 @@ function ln(e) {
|
|
|
795
795
|
}
|
|
796
796
|
}), t;
|
|
797
797
|
}
|
|
798
|
-
function
|
|
799
|
-
return new
|
|
798
|
+
function ln(e) {
|
|
799
|
+
return new sn(e);
|
|
800
800
|
}
|
|
801
|
-
function
|
|
802
|
-
let a =
|
|
801
|
+
function un(e, t, n, r, i) {
|
|
802
|
+
let a = on(n);
|
|
803
803
|
if (typeof i == "object" && (i = `ConvexError ${JSON.stringify(i.errorData, null, 2)}`), t === "info") {
|
|
804
804
|
let t = i.match(/^\[.*?\] /);
|
|
805
805
|
if (t === null) {
|
|
@@ -807,57 +807,57 @@ function dn(e, t, n, r, i) {
|
|
|
807
807
|
return;
|
|
808
808
|
}
|
|
809
809
|
let n = i.slice(1, t[0].length - 2), o = i.slice(t[0].length);
|
|
810
|
-
e.log(`%c[CONVEX ${a}(${r})] [${n}]`,
|
|
810
|
+
e.log(`%c[CONVEX ${a}(${r})] [${n}]`, an, o);
|
|
811
811
|
} else e.error(`[CONVEX ${a}(${r})] ${i}`);
|
|
812
812
|
}
|
|
813
|
-
function
|
|
813
|
+
function dn(e, t) {
|
|
814
814
|
let n = `[CONVEX FATAL ERROR] ${t}`;
|
|
815
815
|
return e.error(n), Error(n);
|
|
816
816
|
}
|
|
817
|
-
function
|
|
818
|
-
return `[CONVEX ${
|
|
817
|
+
function fn(e, t, n) {
|
|
818
|
+
return `[CONVEX ${on(e)}(${t})] ${n.errorMessage}
|
|
819
819
|
Called by client`;
|
|
820
820
|
}
|
|
821
|
-
function
|
|
821
|
+
function pn(e, t) {
|
|
822
822
|
return t.data = e.errorData, t;
|
|
823
823
|
}
|
|
824
824
|
//#endregion
|
|
825
825
|
//#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.8/node_modules/convex/dist/esm/browser/sync/udf_path_utils.js
|
|
826
|
-
function
|
|
826
|
+
function mn(e) {
|
|
827
827
|
let t = e.split(":"), n, r;
|
|
828
828
|
return t.length === 1 ? (n = t[0], r = "default") : (n = t.slice(0, t.length - 1).join(":"), r = t[t.length - 1]), n.endsWith(".js") && (n = n.slice(0, -3)), `${n}:${r}`;
|
|
829
829
|
}
|
|
830
|
-
function
|
|
830
|
+
function hn(e, t) {
|
|
831
831
|
return JSON.stringify({
|
|
832
|
-
udfPath:
|
|
833
|
-
args:
|
|
832
|
+
udfPath: mn(e),
|
|
833
|
+
args: qt(t)
|
|
834
834
|
});
|
|
835
835
|
}
|
|
836
|
-
function
|
|
836
|
+
function gn(e, t, n) {
|
|
837
837
|
let { initialNumItems: r, id: i } = n;
|
|
838
838
|
return JSON.stringify({
|
|
839
839
|
type: "paginated",
|
|
840
|
-
udfPath:
|
|
841
|
-
args:
|
|
842
|
-
options:
|
|
840
|
+
udfPath: mn(e),
|
|
841
|
+
args: qt(t),
|
|
842
|
+
options: qt({
|
|
843
843
|
initialNumItems: r,
|
|
844
844
|
id: i
|
|
845
845
|
})
|
|
846
846
|
});
|
|
847
847
|
}
|
|
848
|
-
function
|
|
848
|
+
function _n(e) {
|
|
849
849
|
return JSON.parse(e).type === "paginated";
|
|
850
850
|
}
|
|
851
851
|
//#endregion
|
|
852
852
|
//#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.8/node_modules/convex/dist/esm/browser/sync/local_state.js
|
|
853
|
-
var
|
|
853
|
+
var vn = Object.defineProperty, yn = (e, t, n) => t in e ? vn(e, t, {
|
|
854
854
|
enumerable: !0,
|
|
855
855
|
configurable: !0,
|
|
856
856
|
writable: !0,
|
|
857
857
|
value: n
|
|
858
|
-
}) : e[t] = n,
|
|
858
|
+
}) : e[t] = n, bn = (e, t, n) => yn(e, typeof t == "symbol" ? t : t + "", n), xn = class {
|
|
859
859
|
constructor() {
|
|
860
|
-
|
|
860
|
+
bn(this, "nextQueryId"), bn(this, "querySetVersion"), bn(this, "querySet"), bn(this, "queryIdToToken"), bn(this, "identityVersion"), bn(this, "auth"), bn(this, "outstandingQueriesOlderThanRestart"), bn(this, "outstandingAuthOlderThanRestart"), bn(this, "paused"), bn(this, "pendingQuerySetModifications"), this.nextQueryId = 0, this.querySetVersion = 0, this.identityVersion = 0, this.querySet = /* @__PURE__ */ new Map(), this.queryIdToToken = /* @__PURE__ */ new Map(), this.outstandingQueriesOlderThanRestart = /* @__PURE__ */ new Set(), this.outstandingAuthOlderThanRestart = !1, this.paused = !1, this.pendingQuerySetModifications = /* @__PURE__ */ new Map();
|
|
861
861
|
}
|
|
862
862
|
hasSyncedPastLastReconnect() {
|
|
863
863
|
return this.outstandingQueriesOlderThanRestart.size === 0 && !this.outstandingAuthOlderThanRestart;
|
|
@@ -866,7 +866,7 @@ var yn = Object.defineProperty, bn = (e, t, n) => t in e ? yn(e, t, {
|
|
|
866
866
|
this.outstandingAuthOlderThanRestart = !1;
|
|
867
867
|
}
|
|
868
868
|
subscribe(e, t, n, r) {
|
|
869
|
-
let i =
|
|
869
|
+
let i = mn(e), a = hn(i, t), o = this.querySet.get(a);
|
|
870
870
|
if (o !== void 0) return o.numSubscribers += 1, {
|
|
871
871
|
queryToken: a,
|
|
872
872
|
modification: null,
|
|
@@ -886,7 +886,7 @@ var yn = Object.defineProperty, bn = (e, t, n) => t in e ? yn(e, t, {
|
|
|
886
886
|
type: "Add",
|
|
887
887
|
queryId: e,
|
|
888
888
|
udfPath: i,
|
|
889
|
-
args: [
|
|
889
|
+
args: [qt(t)],
|
|
890
890
|
journal: n,
|
|
891
891
|
componentPath: r
|
|
892
892
|
};
|
|
@@ -921,7 +921,7 @@ var yn = Object.defineProperty, bn = (e, t, n) => t in e ? yn(e, t, {
|
|
|
921
921
|
}
|
|
922
922
|
}
|
|
923
923
|
queryId(e, t) {
|
|
924
|
-
let n =
|
|
924
|
+
let n = hn(mn(e), t), r = this.querySet.get(n);
|
|
925
925
|
return r === void 0 ? null : r.id;
|
|
926
926
|
}
|
|
927
927
|
isCurrentOrNewerAuthVersion(e) {
|
|
@@ -993,7 +993,7 @@ var yn = Object.defineProperty, bn = (e, t, n) => t in e ? yn(e, t, {
|
|
|
993
993
|
type: "Add",
|
|
994
994
|
queryId: t.id,
|
|
995
995
|
udfPath: t.canonicalizedUdfPath,
|
|
996
|
-
args: [
|
|
996
|
+
args: [qt(t.args)],
|
|
997
997
|
journal: t.journal,
|
|
998
998
|
componentPath: t.componentPath
|
|
999
999
|
};
|
|
@@ -1051,14 +1051,14 @@ var yn = Object.defineProperty, bn = (e, t, n) => t in e ? yn(e, t, {
|
|
|
1051
1051
|
};
|
|
1052
1052
|
}
|
|
1053
1053
|
}
|
|
1054
|
-
},
|
|
1054
|
+
}, Sn = Object.defineProperty, Cn = (e, t, n) => t in e ? Sn(e, t, {
|
|
1055
1055
|
enumerable: !0,
|
|
1056
1056
|
configurable: !0,
|
|
1057
1057
|
writable: !0,
|
|
1058
1058
|
value: n
|
|
1059
|
-
}) : e[t] = n,
|
|
1059
|
+
}) : e[t] = n, wn = (e, t, n) => Cn(e, typeof t == "symbol" ? t : t + "", n), Tn = class {
|
|
1060
1060
|
constructor(e, t) {
|
|
1061
|
-
this.logger = e, this.markConnectionStateDirty = t,
|
|
1061
|
+
this.logger = e, this.markConnectionStateDirty = t, wn(this, "inflightRequests"), wn(this, "requestsOlderThanRestart"), wn(this, "inflightMutationsCount", 0), wn(this, "inflightActionsCount", 0), this.inflightRequests = /* @__PURE__ */ new Map(), this.requestsOlderThanRestart = /* @__PURE__ */ new Set();
|
|
1062
1062
|
}
|
|
1063
1063
|
request(e, t) {
|
|
1064
1064
|
let n = new Promise((n) => {
|
|
@@ -1078,19 +1078,19 @@ var yn = Object.defineProperty, bn = (e, t, n) => t in e ? yn(e, t, {
|
|
|
1078
1078
|
let t = this.inflightRequests.get(e.requestId);
|
|
1079
1079
|
if (t === void 0 || t.status.status === "Completed") return null;
|
|
1080
1080
|
let n = t.message.type === "Mutation" ? "mutation" : "action", r = t.message.udfPath;
|
|
1081
|
-
for (let t of e.logLines)
|
|
1081
|
+
for (let t of e.logLines) un(this.logger, "info", n, r, t);
|
|
1082
1082
|
let i = t.status, a, o;
|
|
1083
1083
|
if (e.success) a = {
|
|
1084
1084
|
success: !0,
|
|
1085
1085
|
logLines: e.logLines,
|
|
1086
|
-
value:
|
|
1086
|
+
value: Vt(e.result)
|
|
1087
1087
|
}, o = () => i.onResult(a);
|
|
1088
1088
|
else {
|
|
1089
1089
|
let t = e.result, { errorData: s } = e;
|
|
1090
|
-
|
|
1090
|
+
un(this.logger, "error", n, r, t), a = {
|
|
1091
1091
|
success: !1,
|
|
1092
1092
|
errorMessage: t,
|
|
1093
|
-
errorData: s === void 0 ? void 0 :
|
|
1093
|
+
errorData: s === void 0 ? void 0 : Vt(s),
|
|
1094
1094
|
logLines: e.logLines
|
|
1095
1095
|
}, o = () => i.onResult(a);
|
|
1096
1096
|
}
|
|
@@ -1162,19 +1162,19 @@ var yn = Object.defineProperty, bn = (e, t, n) => t in e ? yn(e, t, {
|
|
|
1162
1162
|
inflightActions() {
|
|
1163
1163
|
return this.inflightActionsCount;
|
|
1164
1164
|
}
|
|
1165
|
-
},
|
|
1166
|
-
function
|
|
1167
|
-
return e[
|
|
1165
|
+
}, En = Symbol.for("functionName"), Dn = Symbol.for("toReferencePath");
|
|
1166
|
+
function On(e) {
|
|
1167
|
+
return e[Dn] ?? null;
|
|
1168
1168
|
}
|
|
1169
|
-
function
|
|
1169
|
+
function kn(e) {
|
|
1170
1170
|
return e.startsWith("function://");
|
|
1171
1171
|
}
|
|
1172
|
-
function
|
|
1172
|
+
function An(e) {
|
|
1173
1173
|
let t;
|
|
1174
|
-
if (typeof e == "string") t =
|
|
1175
|
-
else if (e[
|
|
1174
|
+
if (typeof e == "string") t = kn(e) ? { functionHandle: e } : { name: e };
|
|
1175
|
+
else if (e[En]) t = { name: e[En] };
|
|
1176
1176
|
else {
|
|
1177
|
-
let n =
|
|
1177
|
+
let n = On(e);
|
|
1178
1178
|
if (!n) throw Error(`${e} is not a functionReference`);
|
|
1179
1179
|
t = { reference: n };
|
|
1180
1180
|
}
|
|
@@ -1182,21 +1182,21 @@ function jn(e) {
|
|
|
1182
1182
|
}
|
|
1183
1183
|
//#endregion
|
|
1184
1184
|
//#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.8/node_modules/convex/dist/esm/server/api.js
|
|
1185
|
-
function
|
|
1186
|
-
let t =
|
|
1185
|
+
function jn(e) {
|
|
1186
|
+
let t = An(e);
|
|
1187
1187
|
if (t.name === void 0) throw t.functionHandle === void 0 ? t.reference === void 0 ? Error(`Expected function reference like "api.file.func" or "internal.file.func", but received ${JSON.stringify(t)}`) : Error(`Expected function reference in the current component like "api.file.func" or "internal.file.func", but received reference ${t.reference}`) : Error(`Expected function reference like "api.file.func" or "internal.file.func", but received function handle ${t.functionHandle}`);
|
|
1188
1188
|
if (typeof e == "string") return e;
|
|
1189
|
-
let n = e[
|
|
1189
|
+
let n = e[En];
|
|
1190
1190
|
if (!n) throw Error(`${e} is not a functionReference`);
|
|
1191
1191
|
return n;
|
|
1192
1192
|
}
|
|
1193
|
-
function
|
|
1194
|
-
return { [
|
|
1193
|
+
function Mn(e) {
|
|
1194
|
+
return { [En]: e };
|
|
1195
1195
|
}
|
|
1196
|
-
function
|
|
1196
|
+
function Nn(e = []) {
|
|
1197
1197
|
return new Proxy({}, { get(t, n) {
|
|
1198
|
-
if (typeof n == "string") return
|
|
1199
|
-
if (n ===
|
|
1198
|
+
if (typeof n == "string") return Nn([...e, n]);
|
|
1199
|
+
if (n === En) {
|
|
1200
1200
|
if (e.length < 2) {
|
|
1201
1201
|
let t = ["api", ...e].join(".");
|
|
1202
1202
|
throw Error(`API path is expected to be of the form \`api.moduleName.functionName\`. Found: \`${t}\``);
|
|
@@ -1207,32 +1207,32 @@ function Pn(e = []) {
|
|
|
1207
1207
|
if (n === Symbol.toStringTag) return "FunctionReference";
|
|
1208
1208
|
} });
|
|
1209
1209
|
}
|
|
1210
|
-
|
|
1210
|
+
Nn();
|
|
1211
1211
|
//#endregion
|
|
1212
1212
|
//#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.8/node_modules/convex/dist/esm/browser/sync/optimistic_updates_impl.js
|
|
1213
|
-
var
|
|
1213
|
+
var Pn = Object.defineProperty, Fn = (e, t, n) => t in e ? Pn(e, t, {
|
|
1214
1214
|
enumerable: !0,
|
|
1215
1215
|
configurable: !0,
|
|
1216
1216
|
writable: !0,
|
|
1217
1217
|
value: n
|
|
1218
|
-
}) : e[t] = n,
|
|
1218
|
+
}) : e[t] = n, In = (e, t, n) => Fn(e, typeof t == "symbol" ? t : t + "", n), Ln = class e {
|
|
1219
1219
|
constructor(e) {
|
|
1220
|
-
|
|
1220
|
+
In(this, "queryResults"), In(this, "modifiedQueries"), this.queryResults = e, this.modifiedQueries = [];
|
|
1221
1221
|
}
|
|
1222
1222
|
getQuery(t, ...n) {
|
|
1223
|
-
let r =
|
|
1223
|
+
let r = Ct(n[0]), i = jn(t), a = this.queryResults.get(hn(i, r));
|
|
1224
1224
|
if (a !== void 0) return e.queryValue(a.result);
|
|
1225
1225
|
}
|
|
1226
1226
|
getAllQueries(t) {
|
|
1227
|
-
let n = [], r =
|
|
1228
|
-
for (let t of this.queryResults.values()) t.udfPath ===
|
|
1227
|
+
let n = [], r = jn(t);
|
|
1228
|
+
for (let t of this.queryResults.values()) t.udfPath === mn(r) && n.push({
|
|
1229
1229
|
args: t.args,
|
|
1230
1230
|
value: e.queryValue(t.result)
|
|
1231
1231
|
});
|
|
1232
1232
|
return n;
|
|
1233
1233
|
}
|
|
1234
1234
|
setQuery(e, t, n) {
|
|
1235
|
-
let r =
|
|
1235
|
+
let r = Ct(t), i = jn(e), a = hn(i, r), o;
|
|
1236
1236
|
o = n === void 0 ? void 0 : {
|
|
1237
1237
|
success: !0,
|
|
1238
1238
|
value: n,
|
|
@@ -1248,15 +1248,15 @@ var Fn = Object.defineProperty, In = (e, t, n) => t in e ? Fn(e, t, {
|
|
|
1248
1248
|
static queryValue(e) {
|
|
1249
1249
|
if (e !== void 0 && e.success) return e.value;
|
|
1250
1250
|
}
|
|
1251
|
-
},
|
|
1251
|
+
}, Rn = class {
|
|
1252
1252
|
constructor() {
|
|
1253
|
-
|
|
1253
|
+
In(this, "queryResults"), In(this, "optimisticUpdates"), this.queryResults = /* @__PURE__ */ new Map(), this.optimisticUpdates = [];
|
|
1254
1254
|
}
|
|
1255
1255
|
ingestQueryResultsFromServer(e, t) {
|
|
1256
1256
|
this.optimisticUpdates = this.optimisticUpdates.filter((e) => !t.has(e.mutationId));
|
|
1257
1257
|
let n = this.queryResults;
|
|
1258
1258
|
this.queryResults = new Map(e);
|
|
1259
|
-
let r = new
|
|
1259
|
+
let r = new Ln(this.queryResults);
|
|
1260
1260
|
for (let e of this.optimisticUpdates) e.update(r);
|
|
1261
1261
|
let i = [];
|
|
1262
1262
|
for (let [e, t] of this.queryResults) {
|
|
@@ -1270,7 +1270,7 @@ var Fn = Object.defineProperty, In = (e, t, n) => t in e ? Fn(e, t, {
|
|
|
1270
1270
|
update: e,
|
|
1271
1271
|
mutationId: t
|
|
1272
1272
|
});
|
|
1273
|
-
let n = new
|
|
1273
|
+
let n = new Ln(this.queryResults);
|
|
1274
1274
|
return e(n), n.modifiedQueries;
|
|
1275
1275
|
}
|
|
1276
1276
|
rawQueryResult(e) {
|
|
@@ -1283,7 +1283,7 @@ var Fn = Object.defineProperty, In = (e, t, n) => t in e ? Fn(e, t, {
|
|
|
1283
1283
|
let n = t.result;
|
|
1284
1284
|
if (n !== void 0) {
|
|
1285
1285
|
if (n.success) return n.value;
|
|
1286
|
-
throw n.errorData === void 0 ? Error(
|
|
1286
|
+
throw n.errorData === void 0 ? Error(fn("query", t.udfPath, n)) : pn(n, new en(fn("query", t.udfPath, n)));
|
|
1287
1287
|
}
|
|
1288
1288
|
}
|
|
1289
1289
|
hasQueryResult(e) {
|
|
@@ -1292,14 +1292,14 @@ var Fn = Object.defineProperty, In = (e, t, n) => t in e ? Fn(e, t, {
|
|
|
1292
1292
|
queryLogs(e) {
|
|
1293
1293
|
return this.queryResults.get(e)?.result?.logLines;
|
|
1294
1294
|
}
|
|
1295
|
-
},
|
|
1295
|
+
}, zn = Object.defineProperty, Bn = (e, t, n) => t in e ? zn(e, t, {
|
|
1296
1296
|
enumerable: !0,
|
|
1297
1297
|
configurable: !0,
|
|
1298
1298
|
writable: !0,
|
|
1299
1299
|
value: n
|
|
1300
|
-
}) : e[t] = n,
|
|
1300
|
+
}) : e[t] = n, Vn = (e, t, n) => Bn(e, typeof t == "symbol" ? t : t + "", n), Hn = class e {
|
|
1301
1301
|
constructor(e, t) {
|
|
1302
|
-
|
|
1302
|
+
Vn(this, "low"), Vn(this, "high"), Vn(this, "__isUnsignedLong__"), this.low = e | 0, this.high = t | 0, this.__isUnsignedLong__ = !0;
|
|
1303
1303
|
}
|
|
1304
1304
|
static isLong(e) {
|
|
1305
1305
|
return (e && e.__isUnsignedLong__) === !0;
|
|
@@ -1321,10 +1321,10 @@ var Fn = Object.defineProperty, In = (e, t, n) => t in e ? Fn(e, t, {
|
|
|
1321
1321
|
];
|
|
1322
1322
|
}
|
|
1323
1323
|
static fromNumber(t) {
|
|
1324
|
-
return isNaN(t) || t < 0 ?
|
|
1324
|
+
return isNaN(t) || t < 0 ? Un : t >= Kn ? qn : new e(t % Gn | 0, t / Gn | 0);
|
|
1325
1325
|
}
|
|
1326
1326
|
toString() {
|
|
1327
|
-
return (BigInt(this.high) * BigInt(
|
|
1327
|
+
return (BigInt(this.high) * BigInt(Gn) + BigInt(this.low)).toString();
|
|
1328
1328
|
}
|
|
1329
1329
|
equals(t) {
|
|
1330
1330
|
return e.isLong(t) || (t = e.fromValue(t)), this.high >>> 31 == 1 && t.high >>> 31 == 1 ? !1 : this.high === t.high && this.low === t.low;
|
|
@@ -1341,16 +1341,16 @@ var Fn = Object.defineProperty, In = (e, t, n) => t in e ? Fn(e, t, {
|
|
|
1341
1341
|
static fromValue(t) {
|
|
1342
1342
|
return typeof t == "number" ? e.fromNumber(t) : new e(t.low, t.high);
|
|
1343
1343
|
}
|
|
1344
|
-
},
|
|
1344
|
+
}, Un = new Hn(0, 0), Wn = 65536, Gn = Wn * Wn, Kn = Gn * Gn, qn = new Hn(-1, -1), Jn = Object.defineProperty, Yn = (e, t, n) => t in e ? Jn(e, t, {
|
|
1345
1345
|
enumerable: !0,
|
|
1346
1346
|
configurable: !0,
|
|
1347
1347
|
writable: !0,
|
|
1348
1348
|
value: n
|
|
1349
|
-
}) : e[t] = n,
|
|
1349
|
+
}) : e[t] = n, Xn = (e, t, n) => Yn(e, typeof t == "symbol" ? t : t + "", n), Zn = class {
|
|
1350
1350
|
constructor(e, t) {
|
|
1351
|
-
|
|
1351
|
+
Xn(this, "version"), Xn(this, "remoteQuerySet"), Xn(this, "queryPath"), Xn(this, "logger"), this.version = {
|
|
1352
1352
|
querySet: 0,
|
|
1353
|
-
ts:
|
|
1353
|
+
ts: Hn.fromNumber(0),
|
|
1354
1354
|
identity: 0
|
|
1355
1355
|
}, this.remoteQuerySet = /* @__PURE__ */ new Map(), this.queryPath = e, this.logger = t;
|
|
1356
1356
|
}
|
|
@@ -1360,8 +1360,8 @@ var Fn = Object.defineProperty, In = (e, t, n) => t in e ? Fn(e, t, {
|
|
|
1360
1360
|
for (let t of e.modifications) switch (t.type) {
|
|
1361
1361
|
case "QueryUpdated": {
|
|
1362
1362
|
let e = this.queryPath(t.queryId);
|
|
1363
|
-
if (e) for (let n of t.logLines)
|
|
1364
|
-
let n =
|
|
1363
|
+
if (e) for (let n of t.logLines) un(this.logger, "info", "query", e, n);
|
|
1364
|
+
let n = Vt(t.value ?? null);
|
|
1365
1365
|
this.remoteQuerySet.set(t.queryId, {
|
|
1366
1366
|
success: !0,
|
|
1367
1367
|
value: n,
|
|
@@ -1371,12 +1371,12 @@ var Fn = Object.defineProperty, In = (e, t, n) => t in e ? Fn(e, t, {
|
|
|
1371
1371
|
}
|
|
1372
1372
|
case "QueryFailed": {
|
|
1373
1373
|
let e = this.queryPath(t.queryId);
|
|
1374
|
-
if (e) for (let n of t.logLines)
|
|
1374
|
+
if (e) for (let n of t.logLines) un(this.logger, "info", "query", e, n);
|
|
1375
1375
|
let { errorData: n } = t;
|
|
1376
1376
|
this.remoteQuerySet.set(t.queryId, {
|
|
1377
1377
|
success: !1,
|
|
1378
1378
|
errorMessage: t.errorMessage,
|
|
1379
|
-
errorData: n === void 0 ? void 0 :
|
|
1379
|
+
errorData: n === void 0 ? void 0 : Vt(n),
|
|
1380
1380
|
logLines: t.logLines
|
|
1381
1381
|
});
|
|
1382
1382
|
break;
|
|
@@ -1397,14 +1397,14 @@ var Fn = Object.defineProperty, In = (e, t, n) => t in e ? Fn(e, t, {
|
|
|
1397
1397
|
};
|
|
1398
1398
|
//#endregion
|
|
1399
1399
|
//#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.8/node_modules/convex/dist/esm/browser/sync/protocol.js
|
|
1400
|
+
function Qn(e) {
|
|
1401
|
+
let t = yt(e);
|
|
1402
|
+
return Hn.fromBytesLE(Array.from(t));
|
|
1403
|
+
}
|
|
1400
1404
|
function $n(e) {
|
|
1401
|
-
|
|
1402
|
-
return Un.fromBytesLE(Array.from(t));
|
|
1405
|
+
return St(new Uint8Array(e.toBytesLE()));
|
|
1403
1406
|
}
|
|
1404
1407
|
function er(e) {
|
|
1405
|
-
return Ct(new Uint8Array(e.toBytesLE()));
|
|
1406
|
-
}
|
|
1407
|
-
function tr(e) {
|
|
1408
1408
|
switch (e.type) {
|
|
1409
1409
|
case "FatalError":
|
|
1410
1410
|
case "AuthError":
|
|
@@ -1413,22 +1413,22 @@ function tr(e) {
|
|
|
1413
1413
|
case "Ping": return { ...e };
|
|
1414
1414
|
case "MutationResponse": return e.success ? {
|
|
1415
1415
|
...e,
|
|
1416
|
-
ts:
|
|
1416
|
+
ts: Qn(e.ts)
|
|
1417
1417
|
} : { ...e };
|
|
1418
1418
|
case "Transition": return {
|
|
1419
1419
|
...e,
|
|
1420
1420
|
startVersion: {
|
|
1421
1421
|
...e.startVersion,
|
|
1422
|
-
ts:
|
|
1422
|
+
ts: Qn(e.startVersion.ts)
|
|
1423
1423
|
},
|
|
1424
1424
|
endVersion: {
|
|
1425
1425
|
...e.endVersion,
|
|
1426
|
-
ts:
|
|
1426
|
+
ts: Qn(e.endVersion.ts)
|
|
1427
1427
|
}
|
|
1428
1428
|
};
|
|
1429
1429
|
}
|
|
1430
1430
|
}
|
|
1431
|
-
function
|
|
1431
|
+
function tr(e) {
|
|
1432
1432
|
switch (e.type) {
|
|
1433
1433
|
case "Authenticate":
|
|
1434
1434
|
case "ModifyQuerySet":
|
|
@@ -1440,25 +1440,25 @@ function nr(e) {
|
|
|
1440
1440
|
maxObservedTimestamp: void 0
|
|
1441
1441
|
} : {
|
|
1442
1442
|
...e,
|
|
1443
|
-
maxObservedTimestamp:
|
|
1443
|
+
maxObservedTimestamp: $n(e.maxObservedTimestamp)
|
|
1444
1444
|
};
|
|
1445
1445
|
}
|
|
1446
1446
|
}
|
|
1447
1447
|
//#endregion
|
|
1448
1448
|
//#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.8/node_modules/convex/dist/esm/browser/sync/web_socket_manager.js
|
|
1449
|
-
var
|
|
1449
|
+
var nr = Object.defineProperty, rr = (e, t, n) => t in e ? nr(e, t, {
|
|
1450
1450
|
enumerable: !0,
|
|
1451
1451
|
configurable: !0,
|
|
1452
1452
|
writable: !0,
|
|
1453
1453
|
value: n
|
|
1454
|
-
}) : e[t] = n,
|
|
1455
|
-
function
|
|
1456
|
-
return
|
|
1454
|
+
}) : e[t] = n, K = (e, t, n) => rr(e, typeof t == "symbol" ? t : t + "", n), ir = 1e3, ar = 1001, or = 1005, sr = 4040, cr;
|
|
1455
|
+
function lr() {
|
|
1456
|
+
return cr === void 0 && (cr = Date.now()), typeof performance > "u" || !performance.now ? Date.now() : Math.round(cr + performance.now());
|
|
1457
1457
|
}
|
|
1458
|
-
function
|
|
1459
|
-
return `t=${Math.round((
|
|
1458
|
+
function ur() {
|
|
1459
|
+
return `t=${Math.round((lr() - cr) / 100) / 10}s`;
|
|
1460
1460
|
}
|
|
1461
|
-
var
|
|
1461
|
+
var dr = {
|
|
1462
1462
|
InternalServerError: { timeout: 1e3 },
|
|
1463
1463
|
SubscriptionsWorkerFullError: { timeout: 3e3 },
|
|
1464
1464
|
TooManyConcurrentRequests: { timeout: 3e3 },
|
|
@@ -1474,14 +1474,14 @@ var fr = {
|
|
|
1474
1474
|
SearchIndexTooLarge: { timeout: 3e3 },
|
|
1475
1475
|
TooManyWritesInTimePeriod: { timeout: 3e3 }
|
|
1476
1476
|
};
|
|
1477
|
-
function
|
|
1477
|
+
function fr(e) {
|
|
1478
1478
|
if (e === void 0) return "Unknown";
|
|
1479
|
-
for (let t of Object.keys(
|
|
1479
|
+
for (let t of Object.keys(dr)) if (e.startsWith(t)) return t;
|
|
1480
1480
|
return "Unknown";
|
|
1481
1481
|
}
|
|
1482
|
-
var
|
|
1482
|
+
var pr = class {
|
|
1483
1483
|
constructor(e, t, n, r, i, a) {
|
|
1484
|
-
this.markConnectionStateDirty = i, this.debug = a,
|
|
1484
|
+
this.markConnectionStateDirty = i, this.debug = a, K(this, "socket"), K(this, "connectionCount"), K(this, "_hasEverConnected", !1), K(this, "lastCloseReason"), K(this, "transitionChunkBuffer", null), K(this, "defaultInitialBackoff"), K(this, "maxBackoff"), K(this, "retries"), K(this, "serverInactivityThreshold"), K(this, "reconnectDueToServerInactivityTimeout"), K(this, "scheduledReconnect", null), K(this, "networkOnlineHandler", null), K(this, "pendingNetworkRecoveryInfo", null), K(this, "uri"), K(this, "onOpen"), K(this, "onResume"), K(this, "onMessage"), K(this, "webSocketConstructor"), K(this, "logger"), K(this, "onServerDisconnectError"), this.webSocketConstructor = n, this.socket = { state: "disconnected" }, this.connectionCount = 0, this.lastCloseReason = "InitialConnect", this.defaultInitialBackoff = 1e3, this.maxBackoff = 16e3, this.retries = 0, this.serverInactivityThreshold = 6e4, this.reconnectDueToServerInactivityTimeout = null, this.uri = e, this.onOpen = t.onOpen, this.onResume = t.onResume, this.onMessage = t.onMessage, this.onServerDisconnectError = t.onServerDisconnectError, this.logger = r, this.setupNetworkListener(), this.connect();
|
|
1485
1485
|
}
|
|
1486
1486
|
setSocketState(e) {
|
|
1487
1487
|
this.socket = e, this._logVerbose(`socket state changed: ${this.socket.state}, paused: ${"paused" in this.socket ? this.socket.paused : void 0}`), this.markConnectionStateDirty();
|
|
@@ -1507,7 +1507,7 @@ var mr = class {
|
|
|
1507
1507
|
if (this.transitionChunkBuffer.chunks.push(e.chunk), this.transitionChunkBuffer.chunks.length === e.totalParts) {
|
|
1508
1508
|
let e = this.transitionChunkBuffer.chunks.join("");
|
|
1509
1509
|
this.transitionChunkBuffer = null;
|
|
1510
|
-
let t =
|
|
1510
|
+
let t = er(JSON.parse(e));
|
|
1511
1511
|
if (t.type !== "Transition") throw Error(`Expected Transition, got ${t.type} after assembling chunks`);
|
|
1512
1512
|
return t;
|
|
1513
1513
|
}
|
|
@@ -1530,8 +1530,8 @@ var mr = class {
|
|
|
1530
1530
|
}), this.resetServerInactivityTimeout(), this.socket.paused === "no" && (this._hasEverConnected = !0, this.onOpen({
|
|
1531
1531
|
connectionCount: this.connectionCount,
|
|
1532
1532
|
lastCloseReason: this.lastCloseReason,
|
|
1533
|
-
clientTs:
|
|
1534
|
-
})), this.lastCloseReason !== "InitialConnect" && (this.lastCloseReason ? this.logger.log("WebSocket reconnected at",
|
|
1533
|
+
clientTs: lr()
|
|
1534
|
+
})), this.lastCloseReason !== "InitialConnect" && (this.lastCloseReason ? this.logger.log("WebSocket reconnected at", ur(), "after disconnect due to", this.lastCloseReason) : this.logger.log("WebSocket reconnected at", ur())), this.connectionCount += 1, this.lastCloseReason = null, this.pendingNetworkRecoveryInfo !== null) {
|
|
1535
1535
|
let { timeSavedMs: e } = this.pendingNetworkRecoveryInfo;
|
|
1536
1536
|
this.pendingNetworkRecoveryInfo = null, this.sendMessage({
|
|
1537
1537
|
type: "Event",
|
|
@@ -1545,7 +1545,7 @@ var mr = class {
|
|
|
1545
1545
|
t && this.logger.log(`WebSocket error message: ${t}`);
|
|
1546
1546
|
}, e.onmessage = (e) => {
|
|
1547
1547
|
this.resetServerInactivityTimeout();
|
|
1548
|
-
let t = e.data.length, n =
|
|
1548
|
+
let t = e.data.length, n = er(JSON.parse(e.data));
|
|
1549
1549
|
if (this._logVerbose(`received ws message with type ${n.type}`), n.type !== "Ping") {
|
|
1550
1550
|
if (n.type === "TransitionChunk") {
|
|
1551
1551
|
let e = this.assembleTransition(n);
|
|
@@ -1558,11 +1558,11 @@ var mr = class {
|
|
|
1558
1558
|
}), this.onMessage(n).hasSyncedPastLastReconnect && (this.retries = 0, this.markConnectionStateDirty());
|
|
1559
1559
|
}
|
|
1560
1560
|
}, e.onclose = (e) => {
|
|
1561
|
-
if (this._logVerbose("begin ws.onclose"), this.transitionChunkBuffer = null, this.lastCloseReason === null && (this.lastCloseReason = e.reason || `closed with code ${e.code}`), e.code !==
|
|
1561
|
+
if (this._logVerbose("begin ws.onclose"), this.transitionChunkBuffer = null, this.lastCloseReason === null && (this.lastCloseReason = e.reason || `closed with code ${e.code}`), e.code !== ir && e.code !== ar && e.code !== or && e.code !== sr) {
|
|
1562
1562
|
let t = `WebSocket closed with code ${e.code}`;
|
|
1563
1563
|
e.reason && (t += `: ${e.reason}`), this.logger.log(t), this.onServerDisconnectError && e.reason && this.onServerDisconnectError(t);
|
|
1564
1564
|
}
|
|
1565
|
-
let t =
|
|
1565
|
+
let t = fr(e.reason);
|
|
1566
1566
|
this.scheduleReconnect(t);
|
|
1567
1567
|
};
|
|
1568
1568
|
}
|
|
@@ -1575,7 +1575,7 @@ var mr = class {
|
|
|
1575
1575
|
...e.type === "Authenticate" && e.tokenType === "User" ? { value: `...${e.value.slice(-7)}` } : {}
|
|
1576
1576
|
};
|
|
1577
1577
|
if (this.socket.state === "ready" && this.socket.paused === "no") {
|
|
1578
|
-
let n =
|
|
1578
|
+
let n = tr(e), r = JSON.stringify(n), i = !1;
|
|
1579
1579
|
try {
|
|
1580
1580
|
this.socket.ws.send(r), i = !0;
|
|
1581
1581
|
} catch (e) {
|
|
@@ -1594,7 +1594,7 @@ var mr = class {
|
|
|
1594
1594
|
this.scheduledReconnect &&= (clearTimeout(this.scheduledReconnect.timeout), null), this.socket = { state: "disconnected" };
|
|
1595
1595
|
let t = this.nextBackoff(e);
|
|
1596
1596
|
this.markConnectionStateDirty(), this.logger.log(`Attempting reconnect in ${Math.round(t)}ms`);
|
|
1597
|
-
let n =
|
|
1597
|
+
let n = lr(), r = setTimeout(() => {
|
|
1598
1598
|
this.scheduledReconnect?.timeout === r && (this.scheduledReconnect = null, this.connect());
|
|
1599
1599
|
}, t);
|
|
1600
1600
|
this.scheduledReconnect = {
|
|
@@ -1712,7 +1712,7 @@ var mr = class {
|
|
|
1712
1712
|
}
|
|
1713
1713
|
let e = null;
|
|
1714
1714
|
if (this.scheduledReconnect) {
|
|
1715
|
-
let t =
|
|
1715
|
+
let t = lr() - this.scheduledReconnect.scheduledAt;
|
|
1716
1716
|
e = Math.max(0, this.scheduledReconnect.backoffMs - t), this._logVerbose(`would have waited ${Math.round(e)}ms more (backoff was ${Math.round(this.scheduledReconnect.backoffMs)}ms, elapsed ${Math.round(t)}ms)`), clearTimeout(this.scheduledReconnect.timeout), this.scheduledReconnect = null, this._logVerbose("canceled scheduled reconnect");
|
|
1717
1717
|
}
|
|
1718
1718
|
this.logger.log("Network recovery detected, reconnecting immediately"), this.pendingNetworkRecoveryInfo = e === null ? null : { timeSavedMs: e }, this.connect();
|
|
@@ -1732,7 +1732,7 @@ var mr = class {
|
|
|
1732
1732
|
}, this._hasEverConnected = !0, this.onOpen({
|
|
1733
1733
|
connectionCount: this.connectionCount,
|
|
1734
1734
|
lastCloseReason: this.lastCloseReason,
|
|
1735
|
-
clientTs:
|
|
1735
|
+
clientTs: lr()
|
|
1736
1736
|
})) : this.socket.paused === "yes" && (this.socket = {
|
|
1737
1737
|
...this.socket,
|
|
1738
1738
|
paused: "no"
|
|
@@ -1757,14 +1757,14 @@ var mr = class {
|
|
|
1757
1757
|
this.logger.logVerbose(e);
|
|
1758
1758
|
}
|
|
1759
1759
|
nextBackoff(e) {
|
|
1760
|
-
let t = (e === "client" ? 100 : e === "Unknown" ? this.defaultInitialBackoff :
|
|
1760
|
+
let t = (e === "client" ? 100 : e === "Unknown" ? this.defaultInitialBackoff : dr[e].timeout) * 2 ** this.retries;
|
|
1761
1761
|
this.retries += 1;
|
|
1762
1762
|
let n = Math.min(t, this.maxBackoff);
|
|
1763
1763
|
return n + n * (Math.random() - .5);
|
|
1764
1764
|
}
|
|
1765
1765
|
reportLargeTransition({ transition: e, messageLength: t }) {
|
|
1766
1766
|
if (e.clientClockSkew === void 0 || e.serverTs === void 0) return;
|
|
1767
|
-
let n =
|
|
1767
|
+
let n = lr() - e.clientClockSkew - e.serverTs / 1e6, r = `${Math.round(n)}ms`, i = `${Math.round(t / 1e4) / 100}MB`, a = t / (n / 1e3), o = `${Math.round(a / 1e4) / 100}MB per second`;
|
|
1768
1768
|
this._logVerbose(`received ${i} transition in ${r} at ${o}`), t > 2e7 ? this.logger.log(`received query results totaling more that 20MB (${i}) which will take a long time to download on slower connections`) : n > 2e4 && this.logger.log(`received query results totaling ${i} which took more than 20s to arrive (${r})`), this.debug && this.sendMessage({
|
|
1769
1769
|
type: "Event",
|
|
1770
1770
|
eventType: "ClientReceivedTransition",
|
|
@@ -1777,10 +1777,10 @@ var mr = class {
|
|
|
1777
1777
|
};
|
|
1778
1778
|
//#endregion
|
|
1779
1779
|
//#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.8/node_modules/convex/dist/esm/browser/sync/session.js
|
|
1780
|
-
function
|
|
1781
|
-
return
|
|
1780
|
+
function mr() {
|
|
1781
|
+
return hr();
|
|
1782
1782
|
}
|
|
1783
|
-
function
|
|
1783
|
+
function hr() {
|
|
1784
1784
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (e) => {
|
|
1785
1785
|
let t = Math.random() * 16 | 0;
|
|
1786
1786
|
return (e === "x" ? t : t & 3 | 8).toString(16);
|
|
@@ -1788,15 +1788,15 @@ function gr() {
|
|
|
1788
1788
|
}
|
|
1789
1789
|
//#endregion
|
|
1790
1790
|
//#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.8/node_modules/convex/dist/esm/vendor/jwt-decode/index.js
|
|
1791
|
-
var
|
|
1792
|
-
|
|
1793
|
-
function
|
|
1791
|
+
var gr = class extends Error {};
|
|
1792
|
+
gr.prototype.name = "InvalidTokenError";
|
|
1793
|
+
function _r(e) {
|
|
1794
1794
|
return decodeURIComponent(atob(e).replace(/(.)/g, (e, t) => {
|
|
1795
1795
|
let n = t.charCodeAt(0).toString(16).toUpperCase();
|
|
1796
1796
|
return n.length < 2 && (n = "0" + n), "%" + n;
|
|
1797
1797
|
}));
|
|
1798
1798
|
}
|
|
1799
|
-
function
|
|
1799
|
+
function vr(e) {
|
|
1800
1800
|
let t = e.replace(/-/g, "+").replace(/_/g, "/");
|
|
1801
1801
|
switch (t.length % 4) {
|
|
1802
1802
|
case 0: break;
|
|
@@ -1809,38 +1809,38 @@ function yr(e) {
|
|
|
1809
1809
|
default: throw Error("base64 string is not of the correct length");
|
|
1810
1810
|
}
|
|
1811
1811
|
try {
|
|
1812
|
-
return
|
|
1812
|
+
return _r(t);
|
|
1813
1813
|
} catch {
|
|
1814
1814
|
return atob(t);
|
|
1815
1815
|
}
|
|
1816
1816
|
}
|
|
1817
|
-
function
|
|
1818
|
-
if (typeof e != "string") throw new
|
|
1817
|
+
function yr(e, t) {
|
|
1818
|
+
if (typeof e != "string") throw new gr("Invalid token specified: must be a string");
|
|
1819
1819
|
t ||= {};
|
|
1820
1820
|
let n = t.header === !0 ? 0 : 1, r = e.split(".")[n];
|
|
1821
|
-
if (typeof r != "string") throw new
|
|
1821
|
+
if (typeof r != "string") throw new gr(`Invalid token specified: missing part #${n + 1}`);
|
|
1822
1822
|
let i;
|
|
1823
1823
|
try {
|
|
1824
|
-
i =
|
|
1824
|
+
i = vr(r);
|
|
1825
1825
|
} catch (e) {
|
|
1826
|
-
throw new
|
|
1826
|
+
throw new gr(`Invalid token specified: invalid base64 for part #${n + 1} (${e.message})`);
|
|
1827
1827
|
}
|
|
1828
1828
|
try {
|
|
1829
1829
|
return JSON.parse(i);
|
|
1830
1830
|
} catch (e) {
|
|
1831
|
-
throw new
|
|
1831
|
+
throw new gr(`Invalid token specified: invalid json for part #${n + 1} (${e.message})`);
|
|
1832
1832
|
}
|
|
1833
1833
|
}
|
|
1834
1834
|
//#endregion
|
|
1835
1835
|
//#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.8/node_modules/convex/dist/esm/browser/sync/authentication_manager.js
|
|
1836
|
-
var
|
|
1836
|
+
var br = Object.defineProperty, xr = (e, t, n) => t in e ? br(e, t, {
|
|
1837
1837
|
enumerable: !0,
|
|
1838
1838
|
configurable: !0,
|
|
1839
1839
|
writable: !0,
|
|
1840
1840
|
value: n
|
|
1841
|
-
}) : e[t] = n,
|
|
1841
|
+
}) : e[t] = n, Sr = (e, t, n) => xr(e, typeof t == "symbol" ? t : t + "", n), Cr = 1728e6, wr = 2, Tr = class {
|
|
1842
1842
|
constructor(e, t, n) {
|
|
1843
|
-
|
|
1843
|
+
Sr(this, "authState", { state: "noAuth" }), Sr(this, "configVersion", 0), Sr(this, "syncState"), Sr(this, "authenticate"), Sr(this, "stopSocket"), Sr(this, "tryRestartSocket"), Sr(this, "pauseSocket"), Sr(this, "resumeSocket"), Sr(this, "clearAuth"), Sr(this, "logger"), Sr(this, "refreshTokenLeewaySeconds"), Sr(this, "tokenConfirmationAttempts", 0), this.syncState = e, this.authenticate = t.authenticate, this.stopSocket = t.stopSocket, this.tryRestartSocket = t.tryRestartSocket, this.pauseSocket = t.pauseSocket, this.resumeSocket = t.resumeSocket, this.clearAuth = t.clearAuth, this.logger = n.logger, this.refreshTokenLeewaySeconds = n.refreshTokenLeewaySeconds;
|
|
1844
1844
|
}
|
|
1845
1845
|
async setConfig(e, t) {
|
|
1846
1846
|
this.resetAuthState(), this._logVerbose("pausing WS for auth token fetch"), this.pauseSocket();
|
|
@@ -1970,7 +1970,7 @@ var xr = Object.defineProperty, Sr = (e, t, n) => t in e ? xr(e, t, {
|
|
|
1970
1970
|
}
|
|
1971
1971
|
decodeToken(e) {
|
|
1972
1972
|
try {
|
|
1973
|
-
return
|
|
1973
|
+
return yr(e);
|
|
1974
1974
|
} catch (e) {
|
|
1975
1975
|
return this._logVerbose(`Error decoding token: ${e instanceof Error ? e.message : "Unknown error"}`), null;
|
|
1976
1976
|
}
|
|
@@ -2023,18 +2023,18 @@ var Ar = Object.defineProperty, jr = (e, t, n) => t in e ? Ar(e, t, {
|
|
|
2023
2023
|
}), q(this, "mark", (e) => {
|
|
2024
2024
|
this.debug && Dr(e, this.sessionId);
|
|
2025
2025
|
}), typeof e == "object") throw Error("Passing a ClientConfig object is no longer supported. Pass the URL of the Convex deployment as a string directly.");
|
|
2026
|
-
n?.skipConvexDeploymentUrlCheck !== !0 &&
|
|
2026
|
+
n?.skipConvexDeploymentUrlCheck !== !0 && wt(e), n = { ...n };
|
|
2027
2027
|
let r = n.authRefreshTokenLeewaySeconds ?? 10, i = n.webSocketConstructor;
|
|
2028
2028
|
if (!i && typeof WebSocket > "u") throw Error("No WebSocket global variable defined! To use Convex in an environment without WebSocket try the HTTP client: https://docs.convex.dev/api/classes/browser.ConvexHttpClient");
|
|
2029
|
-
i ||= WebSocket, this.debug = n.reportDebugInfoToConvex ?? !1, this.address = e, this.logger = n.logger === !1 ?
|
|
2029
|
+
i ||= WebSocket, this.debug = n.reportDebugInfoToConvex ?? !1, this.address = e, this.logger = n.logger === !1 ? ln({ verbose: n.verbose ?? !1 }) : n.logger !== !0 && n.logger ? n.logger : cn({ verbose: n.verbose ?? !1 });
|
|
2030
2030
|
let a = e.search("://");
|
|
2031
2031
|
if (a === -1) throw Error("Provided address was not an absolute URL.");
|
|
2032
2032
|
let o = e.substring(a + 3), s = e.substring(0, a), c;
|
|
2033
2033
|
if (s === "http") c = "ws";
|
|
2034
2034
|
else if (s === "https") c = "wss";
|
|
2035
2035
|
else throw Error(`Unknown parent protocol ${s}`);
|
|
2036
|
-
let l = `${c}://${o}/api/${
|
|
2037
|
-
this.state = new
|
|
2036
|
+
let l = `${c}://${o}/api/${dt}/sync`;
|
|
2037
|
+
this.state = new xn(), this.remoteQuerySet = new Zn((e) => this.state.queryPath(e), this.logger), this.requestManager = new Tn(this.logger, this.markConnectionStateDirty);
|
|
2038
2038
|
let u = () => {
|
|
2039
2039
|
this.webSocketManager.pause(), this.state.pause();
|
|
2040
2040
|
};
|
|
@@ -2053,9 +2053,9 @@ var Ar = Object.defineProperty, jr = (e, t, n) => t in e ? Ar(e, t, {
|
|
|
2053
2053
|
}, {
|
|
2054
2054
|
logger: this.logger,
|
|
2055
2055
|
refreshTokenLeewaySeconds: r
|
|
2056
|
-
}), this.optimisticQueryResults = new
|
|
2056
|
+
}), this.optimisticQueryResults = new Rn(), this.addOnTransitionHandler((e) => {
|
|
2057
2057
|
t(e.queries.map((e) => e.token));
|
|
2058
|
-
}), this._nextRequestId = 0, this._sessionId =
|
|
2058
|
+
}), this._nextRequestId = 0, this._sessionId = mr();
|
|
2059
2059
|
let { unsavedChangesWarning: d } = n;
|
|
2060
2060
|
if (typeof window > "u" || window.addEventListener === void 0) {
|
|
2061
2061
|
if (d === !0) throw Error("unsavedChangesWarning requested, but window.addEventListener not found! Remove {unsavedChangesWarning: true} from Convex client options.");
|
|
@@ -2066,14 +2066,14 @@ var Ar = Object.defineProperty, jr = (e, t, n) => t in e ? Ar(e, t, {
|
|
|
2066
2066
|
return (e || window.event).returnValue = t, t;
|
|
2067
2067
|
}
|
|
2068
2068
|
});
|
|
2069
|
-
this.webSocketManager = new
|
|
2069
|
+
this.webSocketManager = new pr(l, {
|
|
2070
2070
|
onOpen: (e) => {
|
|
2071
2071
|
this.mark("convexWebSocketOpen"), this.webSocketManager.sendMessage({
|
|
2072
2072
|
...e,
|
|
2073
2073
|
type: "Connect",
|
|
2074
2074
|
sessionId: this._sessionId,
|
|
2075
2075
|
maxObservedTimestamp: this.maxObservedTimestamp
|
|
2076
|
-
}), this.remoteQuerySet = new
|
|
2076
|
+
}), this.remoteQuerySet = new Zn((e) => this.state.queryPath(e), this.logger);
|
|
2077
2077
|
let [t, n] = this.state.restart();
|
|
2078
2078
|
n && this.webSocketManager.sendMessage(n), this.webSocketManager.sendMessage(t);
|
|
2079
2079
|
for (let e of this.requestManager.restart()) this.webSocketManager.sendMessage(e);
|
|
@@ -2104,7 +2104,7 @@ var Ar = Object.defineProperty, jr = (e, t, n) => t in e ? Ar(e, t, {
|
|
|
2104
2104
|
this.authenticationManager.onAuthError(e);
|
|
2105
2105
|
break;
|
|
2106
2106
|
case "FatalError": {
|
|
2107
|
-
let t =
|
|
2107
|
+
let t = dn(this.logger, e.error);
|
|
2108
2108
|
throw this.webSocketManager.terminate(), t;
|
|
2109
2109
|
}
|
|
2110
2110
|
}
|
|
@@ -2161,7 +2161,7 @@ var Ar = Object.defineProperty, jr = (e, t, n) => t in e ? Ar(e, t, {
|
|
|
2161
2161
|
getCurrentAuthClaims() {
|
|
2162
2162
|
let e = this.state.getAuth(), t = {};
|
|
2163
2163
|
if (e && e.tokenType === "User") try {
|
|
2164
|
-
t = e ?
|
|
2164
|
+
t = e ? yr(e.value) : {};
|
|
2165
2165
|
} catch {
|
|
2166
2166
|
t = {};
|
|
2167
2167
|
}
|
|
@@ -2186,7 +2186,7 @@ var Ar = Object.defineProperty, jr = (e, t, n) => t in e ? Ar(e, t, {
|
|
|
2186
2186
|
this.webSocketManager.sendMessage(e);
|
|
2187
2187
|
}
|
|
2188
2188
|
subscribe(e, t, n) {
|
|
2189
|
-
let r =
|
|
2189
|
+
let r = Ct(t), { modification: i, queryToken: a, unsubscribe: o } = this.state.subscribe(e, r, n?.journal, n?.componentPath);
|
|
2190
2190
|
return i !== null && this.webSocketManager.sendMessage(i), {
|
|
2191
2191
|
queryToken: a,
|
|
2192
2192
|
unsubscribe: () => {
|
|
@@ -2196,7 +2196,7 @@ var Ar = Object.defineProperty, jr = (e, t, n) => t in e ? Ar(e, t, {
|
|
|
2196
2196
|
};
|
|
2197
2197
|
}
|
|
2198
2198
|
localQueryResult(e, t) {
|
|
2199
|
-
let n =
|
|
2199
|
+
let n = hn(e, Ct(t));
|
|
2200
2200
|
return this.optimisticQueryResults.queryResult(n);
|
|
2201
2201
|
}
|
|
2202
2202
|
localQueryResultByToken(e) {
|
|
@@ -2206,11 +2206,11 @@ var Ar = Object.defineProperty, jr = (e, t, n) => t in e ? Ar(e, t, {
|
|
|
2206
2206
|
return this.optimisticQueryResults.hasQueryResult(e);
|
|
2207
2207
|
}
|
|
2208
2208
|
localQueryLogs(e, t) {
|
|
2209
|
-
let n =
|
|
2209
|
+
let n = hn(e, Ct(t));
|
|
2210
2210
|
return this.optimisticQueryResults.queryLogs(n);
|
|
2211
2211
|
}
|
|
2212
2212
|
queryJournal(e, t) {
|
|
2213
|
-
let n =
|
|
2213
|
+
let n = hn(e, Ct(t));
|
|
2214
2214
|
return this.state.queryJournal(n);
|
|
2215
2215
|
}
|
|
2216
2216
|
connectionState() {
|
|
@@ -2234,7 +2234,7 @@ var Ar = Object.defineProperty, jr = (e, t, n) => t in e ? Ar(e, t, {
|
|
|
2234
2234
|
}
|
|
2235
2235
|
async mutation(e, t, n) {
|
|
2236
2236
|
let r = await this.mutationInternal(e, t, n);
|
|
2237
|
-
if (!r.success) throw r.errorData === void 0 ? Error(
|
|
2237
|
+
if (!r.success) throw r.errorData === void 0 ? Error(fn("mutation", e, r)) : pn(r, new en(fn("mutation", e, r)));
|
|
2238
2238
|
return r.value;
|
|
2239
2239
|
}
|
|
2240
2240
|
async mutationInternal(e, t, n, r) {
|
|
@@ -2242,7 +2242,7 @@ var Ar = Object.defineProperty, jr = (e, t, n) => t in e ? Ar(e, t, {
|
|
|
2242
2242
|
return i;
|
|
2243
2243
|
}
|
|
2244
2244
|
enqueueMutation(e, t, n, r) {
|
|
2245
|
-
let i =
|
|
2245
|
+
let i = Ct(t);
|
|
2246
2246
|
this.tryReportLongDisconnect();
|
|
2247
2247
|
let a = this.nextRequestId;
|
|
2248
2248
|
if (this._nextRequestId++, n !== void 0) {
|
|
@@ -2276,7 +2276,7 @@ var Ar = Object.defineProperty, jr = (e, t, n) => t in e ? Ar(e, t, {
|
|
|
2276
2276
|
requestId: a,
|
|
2277
2277
|
udfPath: e,
|
|
2278
2278
|
componentPath: r,
|
|
2279
|
-
args: [
|
|
2279
|
+
args: [qt(i)]
|
|
2280
2280
|
}, s = this.webSocketManager.sendMessage(o);
|
|
2281
2281
|
return {
|
|
2282
2282
|
requestId: a,
|
|
@@ -2285,18 +2285,18 @@ var Ar = Object.defineProperty, jr = (e, t, n) => t in e ? Ar(e, t, {
|
|
|
2285
2285
|
}
|
|
2286
2286
|
async action(e, t) {
|
|
2287
2287
|
let n = await this.actionInternal(e, t);
|
|
2288
|
-
if (!n.success) throw n.errorData === void 0 ? Error(
|
|
2288
|
+
if (!n.success) throw n.errorData === void 0 ? Error(fn("action", e, n)) : pn(n, new en(fn("action", e, n)));
|
|
2289
2289
|
return n.value;
|
|
2290
2290
|
}
|
|
2291
2291
|
async actionInternal(e, t, n) {
|
|
2292
|
-
let r =
|
|
2292
|
+
let r = Ct(t), i = this.nextRequestId;
|
|
2293
2293
|
this._nextRequestId++, this.tryReportLongDisconnect();
|
|
2294
2294
|
let a = {
|
|
2295
2295
|
type: "Action",
|
|
2296
2296
|
requestId: i,
|
|
2297
2297
|
udfPath: e,
|
|
2298
2298
|
componentPath: n,
|
|
2299
|
-
args: [
|
|
2299
|
+
args: [qt(r)]
|
|
2300
2300
|
}, o = this.webSocketManager.sendMessage(a);
|
|
2301
2301
|
return this.requestManager.request(a, o);
|
|
2302
2302
|
}
|
|
@@ -2331,7 +2331,7 @@ var Ar = Object.defineProperty, jr = (e, t, n) => t in e ? Ar(e, t, {
|
|
|
2331
2331
|
method: "POST",
|
|
2332
2332
|
headers: {
|
|
2333
2333
|
"Content-Type": "application/json",
|
|
2334
|
-
"Convex-Client": `npm-${
|
|
2334
|
+
"Convex-Client": `npm-${dt}`
|
|
2335
2335
|
},
|
|
2336
2336
|
body: JSON.stringify({ event: "LongWebsocketDisconnect" })
|
|
2337
2337
|
}).then((e) => {
|
|
@@ -2356,10 +2356,10 @@ var Pr = Object.defineProperty, Fr = (e, t, n) => t in e ? Pr(e, t, {
|
|
|
2356
2356
|
value: n
|
|
2357
2357
|
}) : e[t] = n, Ir = (e, t, n) => Fr(e, typeof t == "symbol" ? t : t + "", n), Lr = class {
|
|
2358
2358
|
constructor(e, t) {
|
|
2359
|
-
this.client = e, this.onTransition = t, Ir(this, "paginatedQuerySet", /* @__PURE__ */ new Map()), Ir(this, "lastTransitionTs"), this.lastTransitionTs =
|
|
2359
|
+
this.client = e, this.onTransition = t, Ir(this, "paginatedQuerySet", /* @__PURE__ */ new Map()), Ir(this, "lastTransitionTs"), this.lastTransitionTs = Hn.fromNumber(0), this.client.addOnTransitionHandler((e) => this.onBaseTransition(e));
|
|
2360
2360
|
}
|
|
2361
2361
|
subscribe(e, t, n) {
|
|
2362
|
-
let r =
|
|
2362
|
+
let r = mn(e), i = gn(r, t, n), a = () => this.removePaginatedQuerySubscriber(i), o = this.paginatedQuerySet.get(i);
|
|
2363
2363
|
return o ? (o.numSubscribers += 1, {
|
|
2364
2364
|
paginatedQueryToken: i,
|
|
2365
2365
|
unsubscribe: a
|
|
@@ -2381,7 +2381,7 @@ var Pr = Object.defineProperty, Fr = (e, t, n) => t in e ? Pr(e, t, {
|
|
|
2381
2381
|
});
|
|
2382
2382
|
}
|
|
2383
2383
|
localQueryResult(e, t, n) {
|
|
2384
|
-
let r =
|
|
2384
|
+
let r = gn(mn(e), t, n);
|
|
2385
2385
|
return this.localQueryResultByToken(r);
|
|
2386
2386
|
}
|
|
2387
2387
|
localQueryResultByToken(e) {
|
|
@@ -2539,7 +2539,7 @@ var Pr = Object.defineProperty, Fr = (e, t, n) => t in e ? Pr(e, t, {
|
|
|
2539
2539
|
value: n
|
|
2540
2540
|
}) : e[t] = n, Br = (e, t, n) => zr(e, typeof t == "symbol" ? t : t + "", n), Vr, Hr = class {
|
|
2541
2541
|
constructor(e, t = {}) {
|
|
2542
|
-
Br(this, "listeners"), Br(this, "_client"), Br(this, "_paginatedClient"), Br(this, "callNewListenersWithCurrentValuesTimer"), Br(this, "_closed"), Br(this, "_disabled"), t.skipConvexDeploymentUrlCheck !== !0 &&
|
|
2542
|
+
Br(this, "listeners"), Br(this, "_client"), Br(this, "_paginatedClient"), Br(this, "callNewListenersWithCurrentValuesTimer"), Br(this, "_closed"), Br(this, "_disabled"), t.skipConvexDeploymentUrlCheck !== !0 && wt(e);
|
|
2543
2543
|
let { disabled: n, ...r } = t;
|
|
2544
2544
|
this._closed = !1, this._disabled = !!n, Vr && !("webSocketConstructor" in r) && typeof WebSocket > "u" && (r.webSocketConstructor = Vr), typeof window > "u" && !("unsavedChangesWarning" in r) && (r.unsavedChangesWarning = !1), this.disabled || (this._client = new Mr(e, () => {}, r), this._paginatedClient = new Lr(this._client, (e) => this._transition(e))), this.listeners = /* @__PURE__ */ new Set();
|
|
2545
2545
|
}
|
|
@@ -2559,7 +2559,7 @@ var Pr = Object.defineProperty, Fr = (e, t, n) => t in e ? Pr(e, t, {
|
|
|
2559
2559
|
}
|
|
2560
2560
|
onUpdate(e, t, n, r) {
|
|
2561
2561
|
if (this.disabled) return this.createDisabledUnsubscribe();
|
|
2562
|
-
let { queryToken: i, unsubscribe: a } = this.client.subscribe(
|
|
2562
|
+
let { queryToken: i, unsubscribe: a } = this.client.subscribe(jn(e), t), o = {
|
|
2563
2563
|
queryToken: i,
|
|
2564
2564
|
callback: n,
|
|
2565
2565
|
onError: r,
|
|
@@ -2584,7 +2584,7 @@ var Pr = Object.defineProperty, Fr = (e, t, n) => t in e ? Pr(e, t, {
|
|
|
2584
2584
|
let a = {
|
|
2585
2585
|
initialNumItems: n.initialNumItems,
|
|
2586
2586
|
id: -1
|
|
2587
|
-
}, { paginatedQueryToken: o, unsubscribe: s } = this.paginatedClient.subscribe(
|
|
2587
|
+
}, { paginatedQueryToken: o, unsubscribe: s } = this.paginatedClient.subscribe(jn(e), t, a), c = {
|
|
2588
2588
|
queryToken: o,
|
|
2589
2589
|
callback: r,
|
|
2590
2590
|
onError: i,
|
|
@@ -2599,7 +2599,7 @@ var Pr = Object.defineProperty, Fr = (e, t, n) => t in e ? Pr(e, t, {
|
|
|
2599
2599
|
unsubscribe: () => {
|
|
2600
2600
|
this.closed || (this.listeners.delete(c), s());
|
|
2601
2601
|
},
|
|
2602
|
-
getCurrentValue: () => this.paginatedClient.localQueryResult(
|
|
2602
|
+
getCurrentValue: () => this.paginatedClient.localQueryResult(jn(e), t, a),
|
|
2603
2603
|
getQueryLogs: () => []
|
|
2604
2604
|
}, u = l.unsubscribe;
|
|
2605
2605
|
return Object.assign(u, l), u;
|
|
@@ -2637,7 +2637,7 @@ var Pr = Object.defineProperty, Fr = (e, t, n) => t in e ? Pr(e, t, {
|
|
|
2637
2637
|
_transition({ queries: e, paginatedQueries: t }, n = !1) {
|
|
2638
2638
|
let r = [...e.map((e) => e.token), ...t.map((e) => e.token)];
|
|
2639
2639
|
for (let e of this.listeners) {
|
|
2640
|
-
let { callback: t, queryToken: i, onError: a, hasEverRun: o } = e, s =
|
|
2640
|
+
let { callback: t, queryToken: i, onError: a, hasEverRun: o } = e, s = _n(i), c = s ? !!this.paginatedClient.localQueryResultByToken(i) : this.client.hasLocalQueryResultByToken(i);
|
|
2641
2641
|
if (r.includes(i) || n && !o && c) {
|
|
2642
2642
|
e.hasEverRun = !0;
|
|
2643
2643
|
let n;
|
|
@@ -2654,15 +2654,15 @@ var Pr = Object.defineProperty, Fr = (e, t, n) => t in e ? Pr(e, t, {
|
|
|
2654
2654
|
}
|
|
2655
2655
|
async mutation(e, t, n) {
|
|
2656
2656
|
if (this.disabled) throw Error("ConvexClient is disabled");
|
|
2657
|
-
return await this.client.mutation(
|
|
2657
|
+
return await this.client.mutation(jn(e), t, n);
|
|
2658
2658
|
}
|
|
2659
2659
|
async action(e, t) {
|
|
2660
2660
|
if (this.disabled) throw Error("ConvexClient is disabled");
|
|
2661
|
-
return await this.client.action(
|
|
2661
|
+
return await this.client.action(jn(e), t);
|
|
2662
2662
|
}
|
|
2663
2663
|
async query(e, t) {
|
|
2664
2664
|
if (this.disabled) throw Error("ConvexClient is disabled");
|
|
2665
|
-
let n = this.client.localQueryResult(
|
|
2665
|
+
let n = this.client.localQueryResult(jn(e), t);
|
|
2666
2666
|
return n === void 0 ? new Promise((n, r) => {
|
|
2667
2667
|
let { unsubscribe: i } = this.onUpdate(e, t, (e) => {
|
|
2668
2668
|
i(), n(e);
|
|
@@ -2685,10 +2685,10 @@ function Ur(e) {
|
|
|
2685
2685
|
return e;
|
|
2686
2686
|
}
|
|
2687
2687
|
function Wr(e, t) {
|
|
2688
|
-
let n =
|
|
2688
|
+
let n = U(e);
|
|
2689
2689
|
n.current = e;
|
|
2690
|
-
let [r, i] =
|
|
2691
|
-
return [r,
|
|
2690
|
+
let [r, i] = V(() => typeof t == "function" ? t() : t);
|
|
2691
|
+
return [r, W((e) => {
|
|
2692
2692
|
i((t) => {
|
|
2693
2693
|
let r = n.current[t.kind]?.[e.type];
|
|
2694
2694
|
return r ? r(t, e) : t;
|
|
@@ -2767,9 +2767,9 @@ var Xr = Ur({
|
|
|
2767
2767
|
}
|
|
2768
2768
|
});
|
|
2769
2769
|
function Zr() {
|
|
2770
|
-
let [e, t] = Wr(Xr, { kind: "idle" }), n = e, r =
|
|
2770
|
+
let [e, t] = Wr(Xr, { kind: "idle" }), n = e, r = U(n);
|
|
2771
2771
|
r.current = n;
|
|
2772
|
-
let i =
|
|
2772
|
+
let i = W(async (e, n) => {
|
|
2773
2773
|
if (r.current.kind !== "pending") {
|
|
2774
2774
|
t({ type: "start" });
|
|
2775
2775
|
try {
|
|
@@ -2787,7 +2787,7 @@ function Zr() {
|
|
|
2787
2787
|
return;
|
|
2788
2788
|
}
|
|
2789
2789
|
}
|
|
2790
|
-
}, [t]), a =
|
|
2790
|
+
}, [t]), a = W(() => t({ type: "reset" }), [t]);
|
|
2791
2791
|
return {
|
|
2792
2792
|
state: n,
|
|
2793
2793
|
isIdle: n.kind === "idle",
|
|
@@ -3144,7 +3144,7 @@ function ki(e) {
|
|
|
3144
3144
|
});
|
|
3145
3145
|
},
|
|
3146
3146
|
listThreads(e, t) {
|
|
3147
|
-
return n(`/widget/threads
|
|
3147
|
+
return n(`/widget/threads?${`route=${encodeURIComponent(e)}${t?.includeResolved ? "&includeResolved=1" : ""}`}`, { method: "GET" }, {
|
|
3148
3148
|
timeoutMs: Di,
|
|
3149
3149
|
category: "read",
|
|
3150
3150
|
operation: "list-threads",
|
|
@@ -3310,7 +3310,7 @@ async function Mi(e, t) {
|
|
|
3310
3310
|
return i;
|
|
3311
3311
|
} catch (e) {
|
|
3312
3312
|
let t = e?.name;
|
|
3313
|
-
return t !== "TypeError" && t !== "TimeoutError" &&
|
|
3313
|
+
return t !== "TypeError" && t !== "TimeoutError" && L(e, { context: "cookie-probe" }), !1;
|
|
3314
3314
|
}
|
|
3315
3315
|
}
|
|
3316
3316
|
//#endregion
|
|
@@ -3321,7 +3321,7 @@ function Fi(e) {
|
|
|
3321
3321
|
try {
|
|
3322
3322
|
e();
|
|
3323
3323
|
} catch (e) {
|
|
3324
|
-
|
|
3324
|
+
L(e, { context: "history-observer-listener" });
|
|
3325
3325
|
}
|
|
3326
3326
|
});
|
|
3327
3327
|
}
|
|
@@ -3533,7 +3533,7 @@ async function ta(e) {
|
|
|
3533
3533
|
s = await o();
|
|
3534
3534
|
} catch (e) {
|
|
3535
3535
|
let t = e?.name;
|
|
3536
|
-
return t !== "TypeError" && t !== "TimeoutError" &&
|
|
3536
|
+
return t !== "TypeError" && t !== "TimeoutError" && L(e, { context: "popup-exchange" }), Promise.reject(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to start popup exchange"));
|
|
3537
3537
|
}
|
|
3538
3538
|
let c = Math.max(0, window.screenX + (window.outerWidth - 420) / 2), l = Math.max(0, window.screenY + (window.outerHeight - 560) / 2), u = window.open(s, "markup-auth", `width=420,height=560,left=${c},top=${l}`);
|
|
3539
3539
|
if (!u) return Promise.reject(/* @__PURE__ */ Error("Popup blocked. Allow popups for this site to sign in"));
|
|
@@ -3554,7 +3554,7 @@ async function ta(e) {
|
|
|
3554
3554
|
r = !0, o().then((e) => {
|
|
3555
3555
|
u.closed || (u.location.href = e);
|
|
3556
3556
|
}).catch((e) => {
|
|
3557
|
-
a(),
|
|
3557
|
+
a(), L(e, { context: "popup-exchange-remint" }), t(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to restart sign-in"));
|
|
3558
3558
|
}).finally(() => {
|
|
3559
3559
|
r = !1;
|
|
3560
3560
|
});
|
|
@@ -3603,7 +3603,7 @@ async function ta(e) {
|
|
|
3603
3603
|
});
|
|
3604
3604
|
if (!e.ok) {
|
|
3605
3605
|
let t = /* @__PURE__ */ Error(`Failed to install widget cookies (${e.status})`);
|
|
3606
|
-
throw
|
|
3606
|
+
throw L(t, { context: "install-cookies" }), t;
|
|
3607
3607
|
}
|
|
3608
3608
|
return {
|
|
3609
3609
|
...d,
|
|
@@ -4102,7 +4102,7 @@ function Do(e) {
|
|
|
4102
4102
|
if (e.redactSelector) try {
|
|
4103
4103
|
for (let t of document.querySelectorAll(e.redactSelector)) Eo(t) || r(t);
|
|
4104
4104
|
} catch (e) {
|
|
4105
|
-
|
|
4105
|
+
L(e, { context: "screenshot-redact-selector" });
|
|
4106
4106
|
}
|
|
4107
4107
|
if (e.strictScrub) for (let e of document.querySelectorAll("input,select,textarea")) Eo(e) || r(e);
|
|
4108
4108
|
return n;
|
|
@@ -4152,7 +4152,7 @@ async function Ao(e, t, n) {
|
|
|
4152
4152
|
redactedSelectors: s
|
|
4153
4153
|
} : null;
|
|
4154
4154
|
} catch (e) {
|
|
4155
|
-
return
|
|
4155
|
+
return L(e, { context: "screenshot-capture" }), null;
|
|
4156
4156
|
}
|
|
4157
4157
|
}
|
|
4158
4158
|
function jo(e, t) {
|
|
@@ -4175,7 +4175,7 @@ async function No(e) {
|
|
|
4175
4175
|
t = t == null ? a.size : Math.min(t, a.size);
|
|
4176
4176
|
}
|
|
4177
4177
|
}
|
|
4178
|
-
return
|
|
4178
|
+
return L(/* @__PURE__ */ Error(t == null ? "Screenshot encode produced no blob at any quality/scale" : `Screenshot still ${t} bytes at the end of the encode ladder (cap ${xo})`), { context: "screenshot-encode" }), null;
|
|
4179
4179
|
}
|
|
4180
4180
|
function Po(e, t, n, r) {
|
|
4181
4181
|
let i = r, a = 28 * i, o = a / 2, s = t * i, c = n * i;
|
|
@@ -4209,7 +4209,7 @@ var Fo = Ur({
|
|
|
4209
4209
|
}), Io = 18e5, Lo = 6e4, Ro = 6e4;
|
|
4210
4210
|
function zo(e) {
|
|
4211
4211
|
let [t, n] = Wr(Fo, { kind: "idle" });
|
|
4212
|
-
return
|
|
4212
|
+
return H(() => {
|
|
4213
4213
|
let t = !1, r = null;
|
|
4214
4214
|
async function i() {
|
|
4215
4215
|
try {
|
|
@@ -4224,7 +4224,7 @@ function zo(e) {
|
|
|
4224
4224
|
r = setTimeout(i, o);
|
|
4225
4225
|
} catch (e) {
|
|
4226
4226
|
if (t) return;
|
|
4227
|
-
e?.name !== "TypeError" &&
|
|
4227
|
+
e?.name !== "TypeError" && L(e, { context: "subscription-token-refresh" }), r = setTimeout(i, Ro);
|
|
4228
4228
|
}
|
|
4229
4229
|
}
|
|
4230
4230
|
return i(), () => {
|
|
@@ -4265,7 +4265,7 @@ async function Bo(e) {
|
|
|
4265
4265
|
};
|
|
4266
4266
|
} catch (e) {
|
|
4267
4267
|
let t = e?.name;
|
|
4268
|
-
return t !== "AbortError" && t !== "TypeError" && t !== "TimeoutError" &&
|
|
4268
|
+
return t !== "AbortError" && t !== "TypeError" && t !== "TimeoutError" && L(e, { context: "refresh-token" }), null;
|
|
4269
4269
|
}
|
|
4270
4270
|
}
|
|
4271
4271
|
//#endregion
|
|
@@ -4273,7 +4273,7 @@ async function Bo(e) {
|
|
|
4273
4273
|
var Vo = 6e4, Ho = 500;
|
|
4274
4274
|
function Uo(e, t, n, r, i) {
|
|
4275
4275
|
let a = e.kind === "verified", o = a ? e.identity.storage : void 0, s = a ? e.identity.refreshToken : void 0, c = a ? e.identity.refreshTokenExpiresAt : void 0, l = a ? e.identity.tokenExpiresAt : void 0;
|
|
4276
|
-
|
|
4276
|
+
H(() => {
|
|
4277
4277
|
if (!a || c == null || l == null || o === "localStorage" && s == null || o !== "cookies" && o !== "localStorage") return;
|
|
4278
4278
|
let u = Date.now();
|
|
4279
4279
|
if (c <= u) {
|
|
@@ -4597,8 +4597,8 @@ function ms({ size: e = 16 }) {
|
|
|
4597
4597
|
//#endregion
|
|
4598
4598
|
//#region src/runtime/ui/identity-menu.tsx
|
|
4599
4599
|
function hs({ identity: e, position: t, isSigningIn: n, isSigningOut: r, dashboardUrl: i, onSignIn: a, onSignOut: o, onForgetMe: s }) {
|
|
4600
|
-
let [c, l] =
|
|
4601
|
-
|
|
4600
|
+
let [c, l] = V(!1), [u, d] = V(!1), [f, p] = V(!1), m = U(null);
|
|
4601
|
+
H(() => {
|
|
4602
4602
|
if (!c) return;
|
|
4603
4603
|
function e(e) {
|
|
4604
4604
|
let t = m.current;
|
|
@@ -4610,10 +4610,10 @@ function hs({ identity: e, position: t, isSigningIn: n, isSigningOut: r, dashboa
|
|
|
4610
4610
|
return document.addEventListener("click", e, !0), document.addEventListener("keydown", t), () => {
|
|
4611
4611
|
document.removeEventListener("click", e, !0), document.removeEventListener("keydown", t);
|
|
4612
4612
|
};
|
|
4613
|
-
}, [c]),
|
|
4613
|
+
}, [c]), H(() => {
|
|
4614
4614
|
c || (d(!1), p(!1));
|
|
4615
4615
|
}, [c]);
|
|
4616
|
-
let h = Yi(e), g = gs(h), _ = e.kind === "verified", v = e.kind === "verified" ? e.identity.image : void 0, [y, b] =
|
|
4616
|
+
let h = Yi(e), g = gs(h), _ = e.kind === "verified", v = e.kind === "verified" ? e.identity.image : void 0, [y, b] = V(null), x = _ && v != null && y !== v, C = _ ? e.identity.email : null, w = t === "bottom-left" ? "is-anchor-left" : t === "bottom-center" ? "is-anchor-center" : "is-anchor-right";
|
|
4617
4617
|
return /* @__PURE__ */ Q("div", {
|
|
4618
4618
|
ref: m,
|
|
4619
4619
|
style: {
|
|
@@ -4739,11 +4739,11 @@ function gs(e) {
|
|
|
4739
4739
|
//#endregion
|
|
4740
4740
|
//#region src/runtime/use-drag.ts
|
|
4741
4741
|
function _s(e) {
|
|
4742
|
-
let t =
|
|
4742
|
+
let t = U(e);
|
|
4743
4743
|
t.current = e;
|
|
4744
|
-
let [n, r] =
|
|
4744
|
+
let [n, r] = V(!1);
|
|
4745
4745
|
return {
|
|
4746
|
-
onPointerDown:
|
|
4746
|
+
onPointerDown: W((e) => {
|
|
4747
4747
|
let n = t.current;
|
|
4748
4748
|
if (n.preventDefault && e.preventDefault(), n.stopPropagation && e.stopPropagation(), e.button !== 0 || n.shouldStart && !n.shouldStart(e)) return;
|
|
4749
4749
|
let i = e.currentTarget;
|
|
@@ -4796,7 +4796,7 @@ var ys = [
|
|
|
4796
4796
|
"[tabindex]:not([tabindex=\"-1\"])"
|
|
4797
4797
|
].join(",");
|
|
4798
4798
|
function bs(e, t) {
|
|
4799
|
-
|
|
4799
|
+
H(() => {
|
|
4800
4800
|
if (!t) return;
|
|
4801
4801
|
let n = e.current;
|
|
4802
4802
|
if (!n) return;
|
|
@@ -4813,8 +4813,8 @@ function bs(e, t) {
|
|
|
4813
4813
|
//#endregion
|
|
4814
4814
|
//#region src/runtime/use-object-url.ts
|
|
4815
4815
|
function xs(e) {
|
|
4816
|
-
let [t, n] =
|
|
4817
|
-
return
|
|
4816
|
+
let [t, n] = V(null);
|
|
4817
|
+
return H(() => {
|
|
4818
4818
|
if (!e) {
|
|
4819
4819
|
n(null);
|
|
4820
4820
|
return;
|
|
@@ -4826,8 +4826,8 @@ function xs(e) {
|
|
|
4826
4826
|
//#endregion
|
|
4827
4827
|
//#region src/runtime/ui/author-prompt.tsx
|
|
4828
4828
|
function Ss({ isPending: e, isConnecting: t = !1, isSigningIn: n = !1, onSubmit: r, onCancel: i, onSignIn: a }) {
|
|
4829
|
-
let [o, s] =
|
|
4830
|
-
|
|
4829
|
+
let [o, s] = V(""), [c, l] = V(""), u = U(null);
|
|
4830
|
+
H(() => {
|
|
4831
4831
|
u.current?.focus();
|
|
4832
4832
|
}, []);
|
|
4833
4833
|
function d(n) {
|
|
@@ -5113,22 +5113,22 @@ function Hs() {
|
|
|
5113
5113
|
//#endregion
|
|
5114
5114
|
//#region src/runtime/ui/mentions.tsx
|
|
5115
5115
|
function Us({ body: e, mentions: t, trailing: n }) {
|
|
5116
|
-
let r =
|
|
5116
|
+
let r = rt(() => new Set(t), [t]);
|
|
5117
5117
|
return /* @__PURE__ */ Q("p", {
|
|
5118
5118
|
class: "markup-comment-body",
|
|
5119
|
-
children: [
|
|
5119
|
+
children: [rt(() => Kr(e), [e]).map((e, t) => e.type === "mention" && r.has(e.userId) ? /* @__PURE__ */ Q("span", {
|
|
5120
5120
|
class: "markup-mention-chip",
|
|
5121
5121
|
children: ["@", e.name]
|
|
5122
5122
|
}, t) : /* @__PURE__ */ Q("span", { children: e.type === "mention" ? `@${e.name}` : e.value }, t)), n]
|
|
5123
5123
|
});
|
|
5124
5124
|
}
|
|
5125
5125
|
function Ws(e) {
|
|
5126
|
-
let { members: t, trigger: n, onSelect: r, onClose: i } = e, [a, o] =
|
|
5126
|
+
let { members: t, trigger: n, onSelect: r, onClose: i } = e, [a, o] = V(0), s = rt(() => {
|
|
5127
5127
|
if (!n) return [];
|
|
5128
5128
|
let e = n.query.toLowerCase();
|
|
5129
5129
|
return t.filter((t) => t.name.toLowerCase().includes(e)).slice(0, 6);
|
|
5130
5130
|
}, [n, t]);
|
|
5131
|
-
|
|
5131
|
+
H(() => {
|
|
5132
5132
|
o((e) => e >= s.length ? 0 : e);
|
|
5133
5133
|
}, [s]);
|
|
5134
5134
|
function c(e) {
|
|
@@ -5177,12 +5177,12 @@ function Gs({ items: e, highlight: t, setHighlight: n, onSelect: r }) {
|
|
|
5177
5177
|
//#endregion
|
|
5178
5178
|
//#region src/runtime/ui/mention-input.tsx
|
|
5179
5179
|
function Ks({ value: e, onChange: t, onKeyDown: n, members: r, label: i, placeholder: a, disabled: o = !1, autoFocus: s = !1, class: c, handle: l }) {
|
|
5180
|
-
let u =
|
|
5180
|
+
let u = U(null), d = U(null), [f, p] = V(null), m = U(t);
|
|
5181
5181
|
m.current = t;
|
|
5182
|
-
let h =
|
|
5182
|
+
let h = U(r);
|
|
5183
5183
|
h.current = r;
|
|
5184
|
-
let g =
|
|
5185
|
-
|
|
5184
|
+
let g = U(e);
|
|
5185
|
+
nt(() => {
|
|
5186
5186
|
let e = u.current;
|
|
5187
5187
|
if (!e) return;
|
|
5188
5188
|
let t = Bs(e, {
|
|
@@ -5195,13 +5195,13 @@ function Ks({ value: e, onChange: t, onKeyDown: n, members: r, label: i, placeho
|
|
|
5195
5195
|
return d.current = t, () => {
|
|
5196
5196
|
t.destroy(), d.current = null;
|
|
5197
5197
|
};
|
|
5198
|
-
}, []),
|
|
5198
|
+
}, []), nt(() => {
|
|
5199
5199
|
if (l) return l.current = { focus: () => d.current?.focus() }, () => {
|
|
5200
5200
|
l.current = null;
|
|
5201
5201
|
};
|
|
5202
|
-
}, [l]),
|
|
5202
|
+
}, [l]), nt(() => {
|
|
5203
5203
|
s && d.current?.focus();
|
|
5204
|
-
}, [s]),
|
|
5204
|
+
}, [s]), nt(() => {
|
|
5205
5205
|
let t = d.current;
|
|
5206
5206
|
t && t.getValue() !== e && t.setValue(e);
|
|
5207
5207
|
}, [e]);
|
|
@@ -5238,8 +5238,8 @@ function Ks({ value: e, onChange: t, onKeyDown: n, members: r, label: i, placeho
|
|
|
5238
5238
|
//#region src/runtime/ui/composer.tsx
|
|
5239
5239
|
var qs = 4e3;
|
|
5240
5240
|
function Js({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "Post", initialFocus: r = !0, isPending: i, error: a, onSubmit: o, onDirtyChange: s, members: c }) {
|
|
5241
|
-
let [l, u] =
|
|
5242
|
-
|
|
5241
|
+
let [l, u] = V(""), d = U(null), f = U(!1);
|
|
5242
|
+
H(() => {
|
|
5243
5243
|
f.current && !i && !a && (u(""), s?.(!1), d.current?.focus()), f.current = i;
|
|
5244
5244
|
}, [
|
|
5245
5245
|
i,
|
|
@@ -5329,25 +5329,25 @@ function Js({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "
|
|
|
5329
5329
|
//#region src/runtime/ui/new-thread-popover.tsx
|
|
5330
5330
|
var Ys = "https://markup.pixelmatters.dev/docs/install#9-screenshots-privacy";
|
|
5331
5331
|
function Xs({ pageX: e, pageY: t, authorName: n, isVerified: r, isIdentityResolving: i, isSigningIn: a, isPending: o, error: s, screenshot: c, isScreenshotCapturing: l, screenshotFailed: u, screenshotRedactedCount: d, screenshotRedactedSelectors: f, members: p = [], onAuthor: m, onSignIn: h, onSubmit: g, onClose: _ }) {
|
|
5332
|
-
let v =
|
|
5332
|
+
let v = U(null);
|
|
5333
5333
|
bs(v, !0);
|
|
5334
|
-
let y =
|
|
5334
|
+
let y = U(!1), b = U(!1), [x, C] = V(!1), w = W((e) => {
|
|
5335
5335
|
b.current = e, C(e);
|
|
5336
|
-
}, []), T =
|
|
5336
|
+
}, []), T = W(() => {
|
|
5337
5337
|
b.current || (y.current ? w(!0) : _());
|
|
5338
|
-
}, [_, w]), E =
|
|
5338
|
+
}, [_, w]), E = W(() => {
|
|
5339
5339
|
w(!1), v.current?.querySelector(".markup-mention-input")?.focus();
|
|
5340
|
-
}, [w]), [D, O] =
|
|
5340
|
+
}, [w]), [D, O] = V(!1), [k, A] = V(!1), j = xs(c), M = U(null), [N, P] = V(null), { onPointerDown: ee, isDragging: te } = _s({
|
|
5341
5341
|
targetRef: v,
|
|
5342
5342
|
shouldStart: (e) => !e.target?.closest("button, a, input, textarea, select"),
|
|
5343
|
-
onMove:
|
|
5343
|
+
onMove: P
|
|
5344
5344
|
});
|
|
5345
|
-
|
|
5345
|
+
H(() => {
|
|
5346
5346
|
let e = v.current;
|
|
5347
5347
|
if (e && typeof e.showPopover == "function" && !e.matches(":popover-open")) try {
|
|
5348
5348
|
e.showPopover();
|
|
5349
5349
|
} catch {}
|
|
5350
|
-
}, []),
|
|
5350
|
+
}, []), H(() => {
|
|
5351
5351
|
let e = v.current;
|
|
5352
5352
|
if (!e) return;
|
|
5353
5353
|
function t(t) {
|
|
@@ -5360,32 +5360,32 @@ function Xs({ pageX: e, pageY: t, authorName: n, isVerified: r, isIdentityResolv
|
|
|
5360
5360
|
}
|
|
5361
5361
|
}
|
|
5362
5362
|
function n(e) {
|
|
5363
|
-
e.key !== "Escape" || e.defaultPrevented ||
|
|
5363
|
+
e.key !== "Escape" || e.defaultPrevented || M.current?.open || (e.preventDefault(), b.current ? E() : T());
|
|
5364
5364
|
}
|
|
5365
5365
|
return document.addEventListener("click", t, !0), document.addEventListener("keydown", n), () => {
|
|
5366
5366
|
document.removeEventListener("click", t, !0), document.removeEventListener("keydown", n);
|
|
5367
5367
|
};
|
|
5368
|
-
}, [T, E]),
|
|
5368
|
+
}, [T, E]), H(() => {
|
|
5369
5369
|
x && v.current?.querySelector(".markup-discard-confirm-keep")?.focus();
|
|
5370
5370
|
}, [x]);
|
|
5371
|
-
let
|
|
5371
|
+
let ne = Zs(e - window.scrollX + 16, 12, window.innerWidth - 320 - 12), re = Zs(t - window.scrollY - 16, 12, window.innerHeight - 220), ie = typeof window < "u" ? window.location.href : "", ae = c != null, oe = l || ae || u, se = D && ae;
|
|
5372
5372
|
return /* @__PURE__ */ Q("div", {
|
|
5373
5373
|
ref: v,
|
|
5374
|
-
class: Z("markup-popover",
|
|
5374
|
+
class: Z("markup-popover", N && "is-floating", te && "is-dragging"),
|
|
5375
5375
|
popover: "manual",
|
|
5376
5376
|
style: {
|
|
5377
|
-
"--markup-pop-x": `${
|
|
5378
|
-
"--markup-pop-y": `${
|
|
5377
|
+
"--markup-pop-x": `${N?.left ?? ne}px`,
|
|
5378
|
+
"--markup-pop-y": `${N?.top ?? re}px`
|
|
5379
5379
|
},
|
|
5380
5380
|
role: "dialog",
|
|
5381
5381
|
"aria-label": "New markup",
|
|
5382
5382
|
children: [
|
|
5383
5383
|
/* @__PURE__ */ Q("header", {
|
|
5384
5384
|
class: "markup-popover-header",
|
|
5385
|
-
onPointerDown:
|
|
5385
|
+
onPointerDown: ee,
|
|
5386
5386
|
children: [/* @__PURE__ */ Q("span", {
|
|
5387
5387
|
class: "markup-popover-title",
|
|
5388
|
-
title:
|
|
5388
|
+
title: ie,
|
|
5389
5389
|
children: "New comment"
|
|
5390
5390
|
}), /* @__PURE__ */ Q("button", {
|
|
5391
5391
|
type: "button",
|
|
@@ -5425,14 +5425,14 @@ function Xs({ pageX: e, pageY: t, authorName: n, isVerified: r, isIdentityResolv
|
|
|
5425
5425
|
submitLabel: "Post markup",
|
|
5426
5426
|
isPending: o,
|
|
5427
5427
|
error: s,
|
|
5428
|
-
onSubmit: (e) => g(e, D &&
|
|
5428
|
+
onSubmit: (e) => g(e, D && ae),
|
|
5429
5429
|
onDirtyChange: (e) => {
|
|
5430
5430
|
y.current = e;
|
|
5431
5431
|
},
|
|
5432
5432
|
members: p
|
|
5433
5433
|
}),
|
|
5434
|
-
|
|
5435
|
-
class: Z("markup-screenshot-row", u && "is-failed",
|
|
5434
|
+
oe ? /* @__PURE__ */ Q("div", {
|
|
5435
|
+
class: Z("markup-screenshot-row", u && "is-failed", se && "is-attached"),
|
|
5436
5436
|
children: [/* @__PURE__ */ Q("div", {
|
|
5437
5437
|
class: "markup-screenshot-row-head",
|
|
5438
5438
|
children: [
|
|
@@ -5464,31 +5464,31 @@ function Xs({ pageX: e, pageY: t, authorName: n, isVerified: r, isIdentityResolv
|
|
|
5464
5464
|
/* @__PURE__ */ Q("span", { children: "Attach screenshot" })
|
|
5465
5465
|
]
|
|
5466
5466
|
}),
|
|
5467
|
-
|
|
5467
|
+
se && j ? /* @__PURE__ */ Q("a", {
|
|
5468
5468
|
class: "markup-screenshot-thumb-link",
|
|
5469
|
-
href:
|
|
5469
|
+
href: j,
|
|
5470
5470
|
target: "_blank",
|
|
5471
5471
|
rel: "noopener",
|
|
5472
5472
|
title: "Preview screenshot",
|
|
5473
5473
|
"aria-label": "Preview screenshot",
|
|
5474
5474
|
onClick: (e) => {
|
|
5475
|
-
e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || e.button !== 0 || (e.preventDefault(),
|
|
5475
|
+
e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || e.button !== 0 || (e.preventDefault(), M.current?.showModal());
|
|
5476
5476
|
},
|
|
5477
5477
|
children: /* @__PURE__ */ Q("img", {
|
|
5478
5478
|
class: "markup-screenshot-thumb",
|
|
5479
|
-
src:
|
|
5479
|
+
src: j,
|
|
5480
5480
|
alt: ""
|
|
5481
5481
|
})
|
|
5482
5482
|
}) : null,
|
|
5483
|
-
|
|
5483
|
+
se && d > 0 ? /* @__PURE__ */ Q("button", {
|
|
5484
5484
|
type: "button",
|
|
5485
5485
|
class: "markup-screenshot-redacted-chip",
|
|
5486
|
-
"aria-expanded":
|
|
5487
|
-
onClick: () =>
|
|
5486
|
+
"aria-expanded": k,
|
|
5487
|
+
onClick: () => A((e) => !e),
|
|
5488
5488
|
children: [
|
|
5489
5489
|
/* @__PURE__ */ Q("em", {
|
|
5490
5490
|
class: "markup-screenshot-redacted-arrow",
|
|
5491
|
-
children:
|
|
5491
|
+
children: k ? "▾" : "▸"
|
|
5492
5492
|
}),
|
|
5493
5493
|
d,
|
|
5494
5494
|
" ",
|
|
@@ -5498,7 +5498,7 @@ function Xs({ pageX: e, pageY: t, authorName: n, isVerified: r, isIdentityResolv
|
|
|
5498
5498
|
]
|
|
5499
5499
|
}) : null
|
|
5500
5500
|
]
|
|
5501
|
-
}),
|
|
5501
|
+
}), se ? /* @__PURE__ */ Q(S, { children: [k && d > 0 ? /* @__PURE__ */ Q("div", {
|
|
5502
5502
|
class: "markup-screenshot-redacted-list",
|
|
5503
5503
|
children: f.map((e) => /* @__PURE__ */ Q("code", {
|
|
5504
5504
|
class: "markup-screenshot-redacted-selector",
|
|
@@ -5521,21 +5521,21 @@ function Xs({ pageX: e, pageY: t, authorName: n, isVerified: r, isIdentityResolv
|
|
|
5521
5521
|
}) : null
|
|
5522
5522
|
]
|
|
5523
5523
|
}),
|
|
5524
|
-
|
|
5525
|
-
ref:
|
|
5524
|
+
se && j ? /* @__PURE__ */ Q("dialog", {
|
|
5525
|
+
ref: M,
|
|
5526
5526
|
class: "markup-lightbox",
|
|
5527
|
-
onClick: () =>
|
|
5527
|
+
onClick: () => M.current?.close(),
|
|
5528
5528
|
children: [/* @__PURE__ */ Q("button", {
|
|
5529
5529
|
type: "button",
|
|
5530
5530
|
class: "markup-lightbox-close markup-icon-btn",
|
|
5531
5531
|
"aria-label": "Close screenshot",
|
|
5532
5532
|
onClick: (e) => {
|
|
5533
|
-
e.stopPropagation(),
|
|
5533
|
+
e.stopPropagation(), M.current?.close();
|
|
5534
5534
|
},
|
|
5535
5535
|
children: /* @__PURE__ */ Q(qo, { size: 16 })
|
|
5536
5536
|
}), /* @__PURE__ */ Q("img", {
|
|
5537
5537
|
class: "markup-lightbox-img",
|
|
5538
|
-
src:
|
|
5538
|
+
src: j,
|
|
5539
5539
|
alt: "Screenshot preview",
|
|
5540
5540
|
onClick: (e) => e.stopPropagation()
|
|
5541
5541
|
})]
|
|
@@ -5702,33 +5702,33 @@ function $s(e) {
|
|
|
5702
5702
|
//#endregion
|
|
5703
5703
|
//#region src/runtime/use-theme.ts
|
|
5704
5704
|
function ec() {
|
|
5705
|
-
let [, e] =
|
|
5706
|
-
return
|
|
5707
|
-
mode:
|
|
5708
|
-
resolved:
|
|
5709
|
-
set:
|
|
5705
|
+
let [, e] = V(0);
|
|
5706
|
+
return H(() => Ve(() => e((e) => e + 1)), []), {
|
|
5707
|
+
mode: Re(),
|
|
5708
|
+
resolved: ze(),
|
|
5709
|
+
set: Be
|
|
5710
5710
|
};
|
|
5711
5711
|
}
|
|
5712
5712
|
//#endregion
|
|
5713
5713
|
//#region src/runtime/ui/overflow-menu.tsx
|
|
5714
|
-
function tc({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked: r = !1, onToggleAutoCapture: i,
|
|
5715
|
-
let [
|
|
5716
|
-
|
|
5717
|
-
if (!
|
|
5714
|
+
function tc({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked: r = !1, onToggleAutoCapture: i, showResolved: a, onToggleShowResolved: o, onOpenPrivacy: s, onOpenShortcuts: c, onHideForSession: l, version: u, dashboardUrl: d }) {
|
|
5715
|
+
let [f, p] = V(!1), m = U(null), h = ec();
|
|
5716
|
+
H(() => {
|
|
5717
|
+
if (!f) return;
|
|
5718
5718
|
function e(e) {
|
|
5719
|
-
let t =
|
|
5720
|
-
t && (e.composedPath().includes(t) ||
|
|
5719
|
+
let t = m.current;
|
|
5720
|
+
t && (e.composedPath().includes(t) || p(!1));
|
|
5721
5721
|
}
|
|
5722
5722
|
function t(e) {
|
|
5723
|
-
e.key === "Escape" &&
|
|
5723
|
+
e.key === "Escape" && p(!1);
|
|
5724
5724
|
}
|
|
5725
5725
|
return document.addEventListener("click", e, !0), document.addEventListener("keydown", t), () => {
|
|
5726
5726
|
document.removeEventListener("click", e, !0), document.removeEventListener("keydown", t);
|
|
5727
5727
|
};
|
|
5728
|
-
}, [
|
|
5729
|
-
let
|
|
5728
|
+
}, [f]);
|
|
5729
|
+
let g = e === "bottom-left" ? "is-anchor-left" : e === "bottom-center" ? "is-anchor-center" : "is-anchor-right", { mod: _ } = Wo();
|
|
5730
5730
|
return /* @__PURE__ */ Q("div", {
|
|
5731
|
-
ref:
|
|
5731
|
+
ref: m,
|
|
5732
5732
|
style: {
|
|
5733
5733
|
position: "relative",
|
|
5734
5734
|
display: "inline-flex"
|
|
@@ -5737,17 +5737,17 @@ function tc({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
|
|
|
5737
5737
|
type: "button",
|
|
5738
5738
|
class: "markup-tb-btn",
|
|
5739
5739
|
"data-kind": "overflow",
|
|
5740
|
-
"data-on":
|
|
5740
|
+
"data-on": f ? "true" : void 0,
|
|
5741
5741
|
"aria-haspopup": "menu",
|
|
5742
|
-
"aria-expanded":
|
|
5742
|
+
"aria-expanded": f,
|
|
5743
5743
|
"aria-label": "More options",
|
|
5744
5744
|
title: "More",
|
|
5745
5745
|
onClick: (e) => {
|
|
5746
|
-
e.preventDefault(), e.stopPropagation(),
|
|
5746
|
+
e.preventDefault(), e.stopPropagation(), p((e) => !e);
|
|
5747
5747
|
},
|
|
5748
5748
|
children: /* @__PURE__ */ Q(is, { size: 16 })
|
|
5749
|
-
}),
|
|
5750
|
-
class: Z("markup-pop",
|
|
5749
|
+
}), f ? /* @__PURE__ */ Q("div", {
|
|
5750
|
+
class: Z("markup-pop", g),
|
|
5751
5751
|
"data-pop": "overflow",
|
|
5752
5752
|
role: "menu",
|
|
5753
5753
|
children: [
|
|
@@ -5764,31 +5764,31 @@ function tc({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
|
|
|
5764
5764
|
/* @__PURE__ */ Q("button", {
|
|
5765
5765
|
type: "button",
|
|
5766
5766
|
role: "radio",
|
|
5767
|
-
"aria-checked":
|
|
5767
|
+
"aria-checked": h.mode === "light",
|
|
5768
5768
|
"aria-label": "Light",
|
|
5769
5769
|
title: "Light",
|
|
5770
|
-
class: Z(
|
|
5771
|
-
onClick: () =>
|
|
5770
|
+
class: Z(h.mode === "light" && "is-on"),
|
|
5771
|
+
onClick: () => h.set("light"),
|
|
5772
5772
|
children: /* @__PURE__ */ Q(as, { size: 14 })
|
|
5773
5773
|
}),
|
|
5774
5774
|
/* @__PURE__ */ Q("button", {
|
|
5775
5775
|
type: "button",
|
|
5776
5776
|
role: "radio",
|
|
5777
|
-
"aria-checked":
|
|
5777
|
+
"aria-checked": h.mode === "dark",
|
|
5778
5778
|
"aria-label": "Dark",
|
|
5779
5779
|
title: "Dark",
|
|
5780
|
-
class: Z(
|
|
5781
|
-
onClick: () =>
|
|
5780
|
+
class: Z(h.mode === "dark" && "is-on"),
|
|
5781
|
+
onClick: () => h.set("dark"),
|
|
5782
5782
|
children: /* @__PURE__ */ Q(os, { size: 14 })
|
|
5783
5783
|
}),
|
|
5784
5784
|
/* @__PURE__ */ Q("button", {
|
|
5785
5785
|
type: "button",
|
|
5786
5786
|
role: "radio",
|
|
5787
|
-
"aria-checked":
|
|
5788
|
-
"aria-label": `Auto (currently ${
|
|
5789
|
-
title: `Auto, currently ${
|
|
5790
|
-
class: Z(
|
|
5791
|
-
onClick: () =>
|
|
5787
|
+
"aria-checked": h.mode === "auto",
|
|
5788
|
+
"aria-label": `Auto (currently ${h.resolved})`,
|
|
5789
|
+
title: `Auto, currently ${h.resolved}`,
|
|
5790
|
+
class: Z(h.mode === "auto" && "is-on"),
|
|
5791
|
+
onClick: () => h.set("auto"),
|
|
5792
5792
|
children: /* @__PURE__ */ Q(ss, { size: 14 })
|
|
5793
5793
|
})
|
|
5794
5794
|
]
|
|
@@ -5869,12 +5869,39 @@ function tc({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
|
|
|
5869
5869
|
})
|
|
5870
5870
|
]
|
|
5871
5871
|
}),
|
|
5872
|
+
/* @__PURE__ */ Q("button", {
|
|
5873
|
+
type: "button",
|
|
5874
|
+
role: "menuitemcheckbox",
|
|
5875
|
+
"aria-checked": a,
|
|
5876
|
+
class: "markup-menu-row",
|
|
5877
|
+
"data-on": a ? "true" : void 0,
|
|
5878
|
+
onClick: (e) => {
|
|
5879
|
+
e.preventDefault(), e.stopPropagation(), o();
|
|
5880
|
+
},
|
|
5881
|
+
children: [
|
|
5882
|
+
/* @__PURE__ */ Q("span", {
|
|
5883
|
+
class: "ic",
|
|
5884
|
+
children: /* @__PURE__ */ Q(Xo, { size: 16 })
|
|
5885
|
+
}),
|
|
5886
|
+
/* @__PURE__ */ Q("span", {
|
|
5887
|
+
class: "lbl",
|
|
5888
|
+
children: [/* @__PURE__ */ Q("span", { children: "Show resolved threads" }), /* @__PURE__ */ Q("span", {
|
|
5889
|
+
class: "sub",
|
|
5890
|
+
children: "Read-only, most recent first"
|
|
5891
|
+
})]
|
|
5892
|
+
}),
|
|
5893
|
+
/* @__PURE__ */ Q("span", {
|
|
5894
|
+
class: "switch",
|
|
5895
|
+
"aria-hidden": "true"
|
|
5896
|
+
})
|
|
5897
|
+
]
|
|
5898
|
+
}),
|
|
5872
5899
|
/* @__PURE__ */ Q("button", {
|
|
5873
5900
|
type: "button",
|
|
5874
5901
|
role: "menuitem",
|
|
5875
5902
|
class: "markup-menu-row",
|
|
5876
5903
|
onClick: () => {
|
|
5877
|
-
|
|
5904
|
+
p(!1), s();
|
|
5878
5905
|
},
|
|
5879
5906
|
children: [/* @__PURE__ */ Q("span", {
|
|
5880
5907
|
class: "ic",
|
|
@@ -5889,7 +5916,7 @@ function tc({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
|
|
|
5889
5916
|
role: "menuitem",
|
|
5890
5917
|
class: "markup-menu-row",
|
|
5891
5918
|
onClick: () => {
|
|
5892
|
-
|
|
5919
|
+
p(!1), c();
|
|
5893
5920
|
},
|
|
5894
5921
|
children: [/* @__PURE__ */ Q("span", {
|
|
5895
5922
|
class: "ic",
|
|
@@ -5905,7 +5932,7 @@ function tc({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
|
|
|
5905
5932
|
role: "menuitem",
|
|
5906
5933
|
class: "markup-menu-row",
|
|
5907
5934
|
onClick: () => {
|
|
5908
|
-
|
|
5935
|
+
p(!1), l();
|
|
5909
5936
|
},
|
|
5910
5937
|
children: [
|
|
5911
5938
|
/* @__PURE__ */ Q("span", {
|
|
@@ -5918,13 +5945,13 @@ function tc({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
|
|
|
5918
5945
|
}),
|
|
5919
5946
|
/* @__PURE__ */ Q("span", {
|
|
5920
5947
|
class: "right",
|
|
5921
|
-
children: [
|
|
5948
|
+
children: [_, " ."]
|
|
5922
5949
|
})
|
|
5923
5950
|
]
|
|
5924
5951
|
}),
|
|
5925
5952
|
/* @__PURE__ */ Q("a", {
|
|
5926
5953
|
class: "markup-brand-line",
|
|
5927
|
-
href:
|
|
5954
|
+
href: d ?? "https://markup.dev",
|
|
5928
5955
|
target: "_blank",
|
|
5929
5956
|
rel: "noopener noreferrer",
|
|
5930
5957
|
children: [
|
|
@@ -5932,7 +5959,7 @@ function tc({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
|
|
|
5932
5959
|
/* @__PURE__ */ Q("span", { children: "Powered by Markup" }),
|
|
5933
5960
|
/* @__PURE__ */ Q("span", {
|
|
5934
5961
|
class: "ver",
|
|
5935
|
-
children: ["v",
|
|
5962
|
+
children: ["v", u]
|
|
5936
5963
|
})
|
|
5937
5964
|
]
|
|
5938
5965
|
})
|
|
@@ -6006,8 +6033,8 @@ function ic() {
|
|
|
6006
6033
|
//#endregion
|
|
6007
6034
|
//#region src/runtime/ui/panel-popover.tsx
|
|
6008
6035
|
function ac({ kind: e, label: t, position: n, ignoreToolbarKind: r, onClose: i, children: a }) {
|
|
6009
|
-
let o =
|
|
6010
|
-
return
|
|
6036
|
+
let o = U(null);
|
|
6037
|
+
return H(() => {
|
|
6011
6038
|
function e(e) {
|
|
6012
6039
|
let t = o.current;
|
|
6013
6040
|
if (!t) return;
|
|
@@ -6035,23 +6062,23 @@ function ac({ kind: e, label: t, position: n, ignoreToolbarKind: r, onClose: i,
|
|
|
6035
6062
|
}
|
|
6036
6063
|
//#endregion
|
|
6037
6064
|
//#region src/runtime/ui/pin.tsx
|
|
6038
|
-
function oc({ pageX: e, pageY: t, count: n, isActive: r, isUnresolved: i,
|
|
6039
|
-
let
|
|
6065
|
+
function oc({ pageX: e, pageY: t, count: n, isActive: r, isUnresolved: i, isClosed: a = !1, onClick: o }) {
|
|
6066
|
+
let s = t - window.scrollY, c = e - window.scrollX;
|
|
6040
6067
|
return /* @__PURE__ */ Q("button", {
|
|
6041
6068
|
type: "button",
|
|
6042
|
-
class: Z("markup-pin", r && "is-active is-anchor", i && "is-unresolved"),
|
|
6069
|
+
class: Z("markup-pin", r && "is-active is-anchor", i && "is-unresolved", a && "is-closed"),
|
|
6043
6070
|
style: {
|
|
6044
|
-
top: `${
|
|
6045
|
-
left: `${
|
|
6071
|
+
top: `${s}px`,
|
|
6072
|
+
left: `${c}px`
|
|
6046
6073
|
},
|
|
6047
6074
|
popovertarget: "markup-thread-popover",
|
|
6048
6075
|
popovertargetaction: "show",
|
|
6049
|
-
onClick:
|
|
6050
|
-
"aria-label": `Open feedback thread (${n} comment${n === 1 ? "" : "s"})`,
|
|
6051
|
-
title: `Open feedback thread (${n} comment${n === 1 ? "" : "s"})`,
|
|
6076
|
+
onClick: o,
|
|
6077
|
+
"aria-label": `Open ${a ? "resolved " : ""}feedback thread (${n} comment${n === 1 ? "" : "s"})`,
|
|
6078
|
+
title: `Open ${a ? "resolved " : ""}feedback thread (${n} comment${n === 1 ? "" : "s"})`,
|
|
6052
6079
|
children: /* @__PURE__ */ Q("span", {
|
|
6053
6080
|
class: "markup-pin-num",
|
|
6054
|
-
children: n
|
|
6081
|
+
children: a ? /* @__PURE__ */ Q(Xo, { size: 14 }) : n
|
|
6055
6082
|
})
|
|
6056
6083
|
});
|
|
6057
6084
|
}
|
|
@@ -6073,8 +6100,8 @@ function sc({ pageX: e, pageY: t }) {
|
|
|
6073
6100
|
//#endregion
|
|
6074
6101
|
//#region src/runtime/ui/placement-overlay.tsx
|
|
6075
6102
|
function cc({ onPlace: e, onCancel: t }) {
|
|
6076
|
-
let n =
|
|
6077
|
-
return
|
|
6103
|
+
let n = U(null);
|
|
6104
|
+
return nt(() => {
|
|
6078
6105
|
let r = n.current?.getRootNode() ?? null, i = (e) => r !== null && e.composedPath().includes(r);
|
|
6079
6106
|
function a(e) {
|
|
6080
6107
|
e.key === "Escape" && t();
|
|
@@ -6127,7 +6154,7 @@ function lc() {
|
|
|
6127
6154
|
//#endregion
|
|
6128
6155
|
//#region src/runtime/ui/privacy-panel.tsx
|
|
6129
6156
|
function uc({ identity: e, apiUrl: t, autoCapture: n, autoCaptureLocked: r, isForgettingMe: i, forgetMeError: a, onForgetMe: o, onClose: s }) {
|
|
6130
|
-
let [c, l] =
|
|
6157
|
+
let [c, l] = V(!1), u = Yi(e), d = e.kind === "verified", f = d ? e.identity.email : void 0, p = e.kind === "anon";
|
|
6131
6158
|
return /* @__PURE__ */ Q("div", {
|
|
6132
6159
|
class: "markup-panel",
|
|
6133
6160
|
children: [/* @__PURE__ */ Q("header", {
|
|
@@ -6430,21 +6457,21 @@ var pc = [
|
|
|
6430
6457
|
}
|
|
6431
6458
|
});
|
|
6432
6459
|
function hc({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIdentityResolving: i, isSigningIn: a, canDelete: o, isPending: s, error: c, isHidden: l = !1, members: u = [], onAuthor: d, onSignIn: f, onClose: p, onReply: m, onEditComment: h, onDeleteComment: g, onToggleReaction: _, onResolve: v, onDelete: y }) {
|
|
6433
|
-
let b =
|
|
6460
|
+
let b = U(null), x = U(null), S = U(null), C = U(null), [w, T] = Wr(mc, { kind: "none" }), [E, D] = V(null), { onPointerDown: O, isDragging: k } = _s({
|
|
6434
6461
|
targetRef: b,
|
|
6435
6462
|
shouldStart: (e) => !e.target?.closest("button, a, input, textarea, select"),
|
|
6436
6463
|
onMove: D
|
|
6437
6464
|
});
|
|
6438
6465
|
bs(b, !0);
|
|
6439
|
-
let
|
|
6440
|
-
|
|
6466
|
+
let A = e.resolvedAt != null, j = rt(() => e.comments.filter((e) => !e.deleted), [e.comments]);
|
|
6467
|
+
H(() => {
|
|
6441
6468
|
if (w.kind === "none" || w.kind === "editing") return;
|
|
6442
6469
|
function e(e) {
|
|
6443
6470
|
let t = C.current;
|
|
6444
6471
|
t && !e.composedPath().includes(t) && T({ type: "dismiss" });
|
|
6445
6472
|
}
|
|
6446
6473
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
6447
|
-
}, [w.kind, T]),
|
|
6474
|
+
}, [w.kind, T]), H(() => {
|
|
6448
6475
|
if (w.kind !== "editing") return;
|
|
6449
6476
|
let t = e.comments.find((e) => e._id === w.commentId);
|
|
6450
6477
|
(!t || t.deleted) && T({ type: "dismiss" });
|
|
@@ -6453,21 +6480,21 @@ function hc({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
|
|
|
6453
6480
|
w,
|
|
6454
6481
|
T
|
|
6455
6482
|
]);
|
|
6456
|
-
let
|
|
6457
|
-
|
|
6458
|
-
|
|
6459
|
-
}, [
|
|
6460
|
-
let
|
|
6461
|
-
|
|
6483
|
+
let M = U(null);
|
|
6484
|
+
H(() => {
|
|
6485
|
+
M.current ??= j.at(-1)?.createdAt ?? 0;
|
|
6486
|
+
}, [j]);
|
|
6487
|
+
let N = U(!0);
|
|
6488
|
+
H(() => {
|
|
6462
6489
|
let e = x.current;
|
|
6463
6490
|
if (e) {
|
|
6464
|
-
if (
|
|
6465
|
-
|
|
6491
|
+
if (N.current) {
|
|
6492
|
+
N.current = !1, e.scrollTop = e.scrollHeight;
|
|
6466
6493
|
return;
|
|
6467
6494
|
}
|
|
6468
6495
|
e.scrollHeight - e.scrollTop - e.clientHeight < 80 && (e.scrollTop = e.scrollHeight);
|
|
6469
6496
|
}
|
|
6470
|
-
}, [
|
|
6497
|
+
}, [j.length]), H(() => {
|
|
6471
6498
|
let e = b.current;
|
|
6472
6499
|
if (!e) return;
|
|
6473
6500
|
if (typeof e.showPopover == "function" && !e.matches(":popover-open")) try {
|
|
@@ -6478,7 +6505,7 @@ function hc({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
|
|
|
6478
6505
|
}
|
|
6479
6506
|
return e.addEventListener("toggle", t), () => e.removeEventListener("toggle", t);
|
|
6480
6507
|
}, [p]);
|
|
6481
|
-
let
|
|
6508
|
+
let P = rt(() => {
|
|
6482
6509
|
let t = yi({
|
|
6483
6510
|
anchorX: e.anchorX,
|
|
6484
6511
|
anchorY: e.anchorY,
|
|
@@ -6496,11 +6523,11 @@ function hc({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
|
|
|
6496
6523
|
return /* @__PURE__ */ Q("div", {
|
|
6497
6524
|
ref: b,
|
|
6498
6525
|
id: "markup-thread-popover",
|
|
6499
|
-
class: Z("markup-popover", E && "is-floating",
|
|
6526
|
+
class: Z("markup-popover", E && "is-floating", k && "is-dragging", l && "is-hud-hidden"),
|
|
6500
6527
|
popover: "auto",
|
|
6501
6528
|
style: {
|
|
6502
|
-
"--markup-pop-x": `${E?.left ??
|
|
6503
|
-
"--markup-pop-y": `${E?.top ??
|
|
6529
|
+
"--markup-pop-x": `${E?.left ?? P.left}px`,
|
|
6530
|
+
"--markup-pop-y": `${E?.top ?? P.top}px`
|
|
6504
6531
|
},
|
|
6505
6532
|
role: "dialog",
|
|
6506
6533
|
"aria-label": "Markup thread",
|
|
@@ -6512,7 +6539,7 @@ function hc({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
|
|
|
6512
6539
|
children: [/* @__PURE__ */ Q("span", {
|
|
6513
6540
|
class: "markup-popover-title",
|
|
6514
6541
|
title: e.url,
|
|
6515
|
-
children:
|
|
6542
|
+
children: j.length === 1 ? "1 comment" : `${j.length} comments`
|
|
6516
6543
|
}), /* @__PURE__ */ Q("div", {
|
|
6517
6544
|
class: "markup-popover-header-actions",
|
|
6518
6545
|
children: [
|
|
@@ -6569,10 +6596,10 @@ function hc({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
|
|
|
6569
6596
|
/* @__PURE__ */ Q("ol", {
|
|
6570
6597
|
ref: x,
|
|
6571
6598
|
class: "markup-comments",
|
|
6572
|
-
children:
|
|
6573
|
-
let i = !t.fromDashboard && n != null && t.authorClientId === n, a = r === 0, o = i && !
|
|
6599
|
+
children: j.map((t, r) => {
|
|
6600
|
+
let i = !t.fromDashboard && n != null && t.authorClientId === n, a = r === 0, o = i && !A && !t.deleted, c = i && !A && !t.deleted && !a, l = w.kind === "editing" && w.commentId === t._id, d = (o || c) && !l && !t.deleted, f = w.kind === "comment-menu" && w.commentId === t._id, p = f && w.confirmDelete, m = w.kind === "reaction-picker" && w.commentId === t._id, v = m ? w.direction : "down", y = f ? w.direction : "down";
|
|
6574
6601
|
return /* @__PURE__ */ Q("li", {
|
|
6575
|
-
class: Z("markup-comment",
|
|
6602
|
+
class: Z("markup-comment", M.current != null && t.createdAt > M.current && "is-new"),
|
|
6576
6603
|
children: [
|
|
6577
6604
|
/* @__PURE__ */ Q(bc, {
|
|
6578
6605
|
name: t.authorName,
|
|
@@ -6607,11 +6634,11 @@ function hc({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
|
|
|
6607
6634
|
}),
|
|
6608
6635
|
/* @__PURE__ */ Q("div", {
|
|
6609
6636
|
class: "markup-thread-actions",
|
|
6610
|
-
children: [!
|
|
6637
|
+
children: [!A && !l ? /* @__PURE__ */ Q(gc, {
|
|
6611
6638
|
comment: t,
|
|
6612
6639
|
pickerOpen: m,
|
|
6613
6640
|
pickerDirection: v,
|
|
6614
|
-
pickerSide:
|
|
6641
|
+
pickerSide: j.length === 1,
|
|
6615
6642
|
pickerRef: (e) => {
|
|
6616
6643
|
m && (C.current = e);
|
|
6617
6644
|
},
|
|
@@ -6624,7 +6651,7 @@ function hc({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
|
|
|
6624
6651
|
});
|
|
6625
6652
|
return;
|
|
6626
6653
|
}
|
|
6627
|
-
if (
|
|
6654
|
+
if (j.length === 1) {
|
|
6628
6655
|
T({
|
|
6629
6656
|
type: "toggle-reaction-picker",
|
|
6630
6657
|
commentId: t._id,
|
|
@@ -6643,7 +6670,7 @@ function hc({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
|
|
|
6643
6670
|
T({ type: "dismiss" }), _(t._id, e);
|
|
6644
6671
|
}
|
|
6645
6672
|
}) : null, d ? /* @__PURE__ */ Q("div", {
|
|
6646
|
-
class: Z("markup-thread-menu markup-comment-menu", f && "is-open", f && y === "up" && "is-up",
|
|
6673
|
+
class: Z("markup-thread-menu markup-comment-menu", f && "is-open", f && y === "up" && "is-up", j.length === 1 && "is-side"),
|
|
6647
6674
|
ref: (e) => {
|
|
6648
6675
|
f && (C.current = e);
|
|
6649
6676
|
},
|
|
@@ -6660,7 +6687,7 @@ function hc({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
|
|
|
6660
6687
|
});
|
|
6661
6688
|
return;
|
|
6662
6689
|
}
|
|
6663
|
-
if (
|
|
6690
|
+
if (j.length === 1) {
|
|
6664
6691
|
T({
|
|
6665
6692
|
type: "toggle-comment-menu",
|
|
6666
6693
|
commentId: t._id,
|
|
@@ -6756,7 +6783,7 @@ function hc({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
|
|
|
6756
6783
|
}) : null,
|
|
6757
6784
|
!l && t.reactions.length > 0 ? /* @__PURE__ */ Q(_c, {
|
|
6758
6785
|
comment: t,
|
|
6759
|
-
isResolved:
|
|
6786
|
+
isResolved: A,
|
|
6760
6787
|
onToggle: (e) => _(t._id, e)
|
|
6761
6788
|
}) : null
|
|
6762
6789
|
]
|
|
@@ -6875,7 +6902,7 @@ function yc(e, t, n) {
|
|
|
6875
6902
|
return Math.max(t, Math.min(n, e));
|
|
6876
6903
|
}
|
|
6877
6904
|
function bc({ name: e, image: t, tone: n }) {
|
|
6878
|
-
let [r, i] =
|
|
6905
|
+
let [r, i] = V(null);
|
|
6879
6906
|
return /* @__PURE__ */ Q("span", {
|
|
6880
6907
|
class: "markup-comment-avatar",
|
|
6881
6908
|
"data-tone": n,
|
|
@@ -6936,7 +6963,7 @@ function wc(e) {
|
|
|
6936
6963
|
//#endregion
|
|
6937
6964
|
//#region src/runtime/ui/toolbar.tsx
|
|
6938
6965
|
function Tc({ isActive: e, onToggle: t, onHide: n, position: r = "bottom-right", unreadCount: i = 0, showInbox: a = !1, onOpenInbox: o, inboxOpen: s = !1, pinsVisible: c = !0, onTogglePins: l, identityButton: u, overflowButton: d }) {
|
|
6939
|
-
let f =
|
|
6966
|
+
let f = U(0);
|
|
6940
6967
|
i > 0 && (f.current = i);
|
|
6941
6968
|
let p = r === "bottom-left" ? "markup-toolbar-left" : r === "bottom-center" ? "markup-toolbar-center" : "markup-toolbar-right";
|
|
6942
6969
|
function m(e) {
|
|
@@ -7114,8 +7141,8 @@ var jc = Ur({
|
|
|
7114
7141
|
}
|
|
7115
7142
|
});
|
|
7116
7143
|
function Mc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r, dashboardUrl: i }) {
|
|
7117
|
-
let [a, o] =
|
|
7118
|
-
|
|
7144
|
+
let [a, o] = V(Oc), [s, c] = V([]), [l, u] = V(!1), d = rt(() => Ki(), []), [f, p] = Wr(jc, d.state), [m, h] = V(null);
|
|
7145
|
+
H(() => {
|
|
7119
7146
|
let n = !1;
|
|
7120
7147
|
return Mi(e, t).then((e) => {
|
|
7121
7148
|
n || h(e);
|
|
@@ -7123,27 +7150,27 @@ function Mc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
7123
7150
|
n = !0;
|
|
7124
7151
|
};
|
|
7125
7152
|
}, [e, t]);
|
|
7126
|
-
let [g, _] =
|
|
7127
|
-
|
|
7153
|
+
let [g, _] = V(n), [v, y] = V(!0), [b, x] = V(!0), [S, C] = V(!1), [w, T] = V(null), E = W(() => T(null), []), D = U(f);
|
|
7154
|
+
D.current = f, Uo(f, e, t, (e) => p({
|
|
7128
7155
|
type: "signed-in",
|
|
7129
7156
|
identity: e
|
|
7130
7157
|
}), () => p({ type: "unauthorized" }));
|
|
7131
|
-
let
|
|
7158
|
+
let O = rt(() => ki({
|
|
7132
7159
|
apiUrl: e,
|
|
7133
7160
|
apiKey: t,
|
|
7134
7161
|
getToken: () => {
|
|
7135
|
-
let e =
|
|
7162
|
+
let e = D.current;
|
|
7136
7163
|
return e.kind !== "verified" || e.identity.token == null ? null : {
|
|
7137
7164
|
token: e.identity.token,
|
|
7138
7165
|
expiresAt: e.identity.tokenExpiresAt
|
|
7139
7166
|
};
|
|
7140
7167
|
},
|
|
7141
7168
|
getStorageMode: () => {
|
|
7142
|
-
let e =
|
|
7169
|
+
let e = D.current;
|
|
7143
7170
|
return e.kind === "verified" ? e.identity.storage : null;
|
|
7144
7171
|
},
|
|
7145
7172
|
getAnonToken: () => {
|
|
7146
|
-
let e =
|
|
7173
|
+
let e = D.current;
|
|
7147
7174
|
return e.kind === "anon" ? e.identity.anonToken : null;
|
|
7148
7175
|
},
|
|
7149
7176
|
onUnauthorized: () => {
|
|
@@ -7153,29 +7180,29 @@ function Mc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
7153
7180
|
e,
|
|
7154
7181
|
t,
|
|
7155
7182
|
p
|
|
7156
|
-
]), [
|
|
7157
|
-
|
|
7183
|
+
]), [k, A] = V({ kind: "idle" }), [j, M] = V([]);
|
|
7184
|
+
H(() => {
|
|
7158
7185
|
let e = !1;
|
|
7159
|
-
return
|
|
7160
|
-
e ||
|
|
7186
|
+
return O.listMembers().then((t) => {
|
|
7187
|
+
e || M(t.members);
|
|
7161
7188
|
}).catch(() => {}), () => {
|
|
7162
7189
|
e = !0;
|
|
7163
7190
|
};
|
|
7164
|
-
}, [
|
|
7165
|
-
let [
|
|
7166
|
-
|
|
7167
|
-
|
|
7191
|
+
}, [O]);
|
|
7192
|
+
let [N, P] = V(0), [ee, te] = V([]), [ne, re] = V(!1), [ie, ae] = V(void 0), [oe, se] = V(!1), ce = W(() => {
|
|
7193
|
+
re(!0), ae(void 0), O.listNotifications().then((e) => {
|
|
7194
|
+
te(e.notifications);
|
|
7168
7195
|
}).catch((e) => {
|
|
7169
|
-
|
|
7196
|
+
ae(e instanceof Error ? e.message : "Failed to load.");
|
|
7170
7197
|
}).finally(() => {
|
|
7171
|
-
|
|
7198
|
+
re(!1);
|
|
7172
7199
|
});
|
|
7173
|
-
}, [
|
|
7174
|
-
|
|
7200
|
+
}, [O]), le = Zr(), ue = Zr(), de = Zr(), fe = Zr(), pe = Zr(), { run: F, reset: I } = le, { run: me } = ue, { run: he, reset: ge } = de, { run: _e } = fe, { run: ve } = pe, be = pe.isPending, xe = le.isPending, Se = le.error ?? ue.error ?? de.error, [Ce, we] = Wr(kc, { kind: "visible" }), Te = Ce.kind !== "visible", [Ee, De] = V(0), Oe = U(null), ke = Yi(f), Ae = f.kind === "verified", L = f.kind === "unresolved" || f.kind === "recovering", je = Ji(f);
|
|
7201
|
+
H(() => {
|
|
7175
7202
|
if (f.kind !== "unresolved" && f.kind !== "recovering") return;
|
|
7176
7203
|
let e = f.kind === "recovering" ? f.preserved : d.preserved, t = !1, n = null, r = 1e3;
|
|
7177
7204
|
function i() {
|
|
7178
|
-
|
|
7205
|
+
O.mintAnonIdentity().then(({ clientId: n, token: r }) => {
|
|
7179
7206
|
if (t) return;
|
|
7180
7207
|
let i = {
|
|
7181
7208
|
clientId: n,
|
|
@@ -7195,73 +7222,75 @@ function Mc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
7195
7222
|
t = !0, n && clearTimeout(n);
|
|
7196
7223
|
};
|
|
7197
7224
|
}, [
|
|
7198
|
-
|
|
7225
|
+
O,
|
|
7199
7226
|
f,
|
|
7200
7227
|
p,
|
|
7201
7228
|
d
|
|
7202
7229
|
]);
|
|
7203
|
-
let
|
|
7204
|
-
|
|
7230
|
+
let Me = zo(O), [R, Ne] = V(null);
|
|
7231
|
+
H(() => {
|
|
7205
7232
|
let t = new Hr(e.replace(/\.convex\.site(\/.*)?$/, ".convex.cloud"));
|
|
7206
7233
|
return Ne(t), () => {
|
|
7207
7234
|
t.close(), Ne((e) => e === t ? null : e);
|
|
7208
7235
|
};
|
|
7209
7236
|
}, [e]);
|
|
7210
|
-
let
|
|
7211
|
-
|
|
7212
|
-
if (!(!
|
|
7213
|
-
subscriptionToken:
|
|
7237
|
+
let Pe = U(!1);
|
|
7238
|
+
H(() => {
|
|
7239
|
+
if (!(!R || !Me)) return I(), ge(), R.onUpdate(Mn("widget/queries:subscribeThreadsForRoute"), {
|
|
7240
|
+
subscriptionToken: Me,
|
|
7214
7241
|
route: a,
|
|
7215
|
-
viewerClientId: je
|
|
7242
|
+
viewerClientId: je,
|
|
7243
|
+
includeResolved: S
|
|
7216
7244
|
}, (e) => {
|
|
7217
7245
|
e !== void 0 && (c(e), u(!0));
|
|
7218
7246
|
});
|
|
7219
7247
|
}, [
|
|
7248
|
+
R,
|
|
7220
7249
|
Me,
|
|
7221
|
-
I,
|
|
7222
7250
|
a,
|
|
7223
7251
|
je,
|
|
7224
|
-
|
|
7225
|
-
|
|
7226
|
-
|
|
7252
|
+
S,
|
|
7253
|
+
I,
|
|
7254
|
+
ge
|
|
7255
|
+
]), H(() => {
|
|
7227
7256
|
if (f.kind !== "verified") {
|
|
7228
|
-
|
|
7257
|
+
P(0);
|
|
7229
7258
|
return;
|
|
7230
7259
|
}
|
|
7231
|
-
if (!(!
|
|
7232
|
-
e !== void 0 &&
|
|
7260
|
+
if (!(!R || !Me)) return R.onUpdate(Mn("widget/queries:subscribeUnreadCountForProject"), { subscriptionToken: Me }, (e) => {
|
|
7261
|
+
e !== void 0 && P(e.count);
|
|
7233
7262
|
});
|
|
7234
7263
|
}, [
|
|
7264
|
+
R,
|
|
7235
7265
|
Me,
|
|
7236
|
-
I,
|
|
7237
7266
|
f.kind
|
|
7238
|
-
]),
|
|
7239
|
-
if (
|
|
7267
|
+
]), H(() => {
|
|
7268
|
+
if (Pe.current || !l) return;
|
|
7240
7269
|
let e = window.location.hash.match(/^#markup-thread=(.+)$/);
|
|
7241
7270
|
if (e) {
|
|
7242
7271
|
let t = decodeURIComponent(e[1] ?? "");
|
|
7243
|
-
s.find((e) => e._id === t) &&
|
|
7272
|
+
s.find((e) => e._id === t) && A({
|
|
7244
7273
|
kind: "thread",
|
|
7245
7274
|
threadId: t
|
|
7246
7275
|
}), history.replaceState(null, "", window.location.pathname + window.location.search);
|
|
7247
7276
|
}
|
|
7248
|
-
|
|
7249
|
-
}, [s, l]),
|
|
7277
|
+
Pe.current = !0;
|
|
7278
|
+
}, [s, l]), H(() => zi(() => o(Oc())), []), H(() => {
|
|
7250
7279
|
function e(e) {
|
|
7251
|
-
e.key === "." && (e.metaKey || e.ctrlKey) && (e.altKey || e.shiftKey || (e.preventDefault(),
|
|
7280
|
+
e.key === "." && (e.metaKey || e.ctrlKey) && (e.altKey || e.shiftKey || (e.preventDefault(), we({ type: "toggle" })));
|
|
7252
7281
|
}
|
|
7253
7282
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
7254
|
-
}, [
|
|
7255
|
-
|
|
7256
|
-
}, [
|
|
7257
|
-
if (
|
|
7258
|
-
let e = window.setTimeout(() =>
|
|
7283
|
+
}, [we]), H(() => {
|
|
7284
|
+
Te && T(null);
|
|
7285
|
+
}, [Te]), H(() => {
|
|
7286
|
+
if (Ce.kind !== "hidden-with-toast") return;
|
|
7287
|
+
let e = window.setTimeout(() => we({ type: "dismiss-toast" }), 5e3);
|
|
7259
7288
|
return () => window.clearTimeout(e);
|
|
7260
|
-
}, [
|
|
7289
|
+
}, [Ce.kind, we]), H(() => {
|
|
7261
7290
|
let e = null;
|
|
7262
7291
|
function t() {
|
|
7263
7292
|
e ??= requestAnimationFrame(() => {
|
|
7264
|
-
e = null,
|
|
7293
|
+
e = null, De((e) => e + 1);
|
|
7265
7294
|
});
|
|
7266
7295
|
}
|
|
7267
7296
|
window.addEventListener("scroll", t, { passive: !0 }), window.addEventListener("resize", t);
|
|
@@ -7270,25 +7299,25 @@ function Mc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
7270
7299
|
window.removeEventListener("scroll", t), window.removeEventListener("resize", t), n.disconnect(), e != null && cancelAnimationFrame(e);
|
|
7271
7300
|
};
|
|
7272
7301
|
}, []);
|
|
7273
|
-
let
|
|
7274
|
-
|
|
7275
|
-
}, [
|
|
7276
|
-
|
|
7302
|
+
let Fe = W(() => {
|
|
7303
|
+
I(), ge(), ye("comment_started"), A({ kind: "placing" });
|
|
7304
|
+
}, [I, ge]);
|
|
7305
|
+
H(() => {
|
|
7277
7306
|
function e(e) {
|
|
7278
|
-
e.key === "c" && (e.metaKey || e.ctrlKey || e.altKey || e.shiftKey ||
|
|
7307
|
+
e.key === "c" && (e.metaKey || e.ctrlKey || e.altKey || e.shiftKey || k.kind === "idle" && (Te || Dc() || (e.preventDefault(), Fe())));
|
|
7279
7308
|
}
|
|
7280
7309
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
7281
7310
|
}, [
|
|
7282
|
-
|
|
7283
|
-
|
|
7284
|
-
|
|
7311
|
+
k.kind,
|
|
7312
|
+
Te,
|
|
7313
|
+
Fe
|
|
7285
7314
|
]);
|
|
7286
|
-
let
|
|
7287
|
-
|
|
7288
|
-
}, [
|
|
7289
|
-
let i = t + window.scrollX, a = n + window.scrollY, o = ++
|
|
7315
|
+
let Ie = W(() => {
|
|
7316
|
+
A({ kind: "idle" }), I(), ge();
|
|
7317
|
+
}, [I, ge]), Le = U(0), Re = W((e, t, n) => {
|
|
7318
|
+
let i = t + window.scrollX, a = n + window.scrollY, o = ++Le.current;
|
|
7290
7319
|
if (r?.enabled === !1 || !b) {
|
|
7291
|
-
|
|
7320
|
+
A({
|
|
7292
7321
|
kind: "composing-new",
|
|
7293
7322
|
coords: e,
|
|
7294
7323
|
pageX: i,
|
|
@@ -7302,7 +7331,7 @@ function Mc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
7302
7331
|
});
|
|
7303
7332
|
return;
|
|
7304
7333
|
}
|
|
7305
|
-
|
|
7334
|
+
A({
|
|
7306
7335
|
kind: "composing-new",
|
|
7307
7336
|
coords: e,
|
|
7308
7337
|
pageX: i,
|
|
@@ -7314,7 +7343,7 @@ function Mc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
7314
7343
|
screenshotRedactedSelectors: [],
|
|
7315
7344
|
captureToken: o
|
|
7316
7345
|
});
|
|
7317
|
-
let s =
|
|
7346
|
+
let s = Oe.current != null && Oe.current.getRootNode() instanceof ShadowRoot ? Oe.current.getRootNode().host : null, c = {
|
|
7318
7347
|
strictScrub: r?.strictScrub,
|
|
7319
7348
|
redactSelector: r?.redactSelector
|
|
7320
7349
|
};
|
|
@@ -7322,23 +7351,23 @@ function Mc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
7322
7351
|
x: t,
|
|
7323
7352
|
y: n
|
|
7324
7353
|
}, c).then((e) => {
|
|
7325
|
-
|
|
7354
|
+
A((t) => t.kind !== "composing-new" || t.captureToken !== o ? t : {
|
|
7326
7355
|
...t,
|
|
7327
7356
|
screenshot: e?.blob ?? null,
|
|
7328
7357
|
isScreenshotCapturing: !1,
|
|
7329
7358
|
screenshotFailed: e == null,
|
|
7330
7359
|
screenshotRedactedCount: e?.redactedCount ?? 0,
|
|
7331
7360
|
screenshotRedactedSelectors: e?.redactedSelectors ?? []
|
|
7332
|
-
}),
|
|
7361
|
+
}), ye("screenshot_captured", { ok: e != null });
|
|
7333
7362
|
});
|
|
7334
|
-
}, [r, b]),
|
|
7363
|
+
}, [r, b]), ze = W((e, t) => {
|
|
7335
7364
|
p({
|
|
7336
7365
|
type: "author-set",
|
|
7337
7366
|
name: e,
|
|
7338
7367
|
email: t
|
|
7339
7368
|
});
|
|
7340
|
-
}, [p]),
|
|
7341
|
-
|
|
7369
|
+
}, [p]), Be = ue.isPending, Ve = W(async () => {
|
|
7370
|
+
ye("sign_in_started"), await me(async () => {
|
|
7342
7371
|
let n = Ec(await ta({
|
|
7343
7372
|
apiUrl: e,
|
|
7344
7373
|
apiKey: t,
|
|
@@ -7348,7 +7377,7 @@ function Mc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
7348
7377
|
p({
|
|
7349
7378
|
type: "signed-in",
|
|
7350
7379
|
identity: n
|
|
7351
|
-
}),
|
|
7380
|
+
}), ye("sign_in_completed");
|
|
7352
7381
|
});
|
|
7353
7382
|
}, [
|
|
7354
7383
|
e,
|
|
@@ -7356,18 +7385,18 @@ function Mc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
7356
7385
|
m,
|
|
7357
7386
|
me,
|
|
7358
7387
|
p
|
|
7359
|
-
]),
|
|
7360
|
-
if (
|
|
7388
|
+
]), He = W(async (e, t) => {
|
|
7389
|
+
if (k.kind !== "composing-new") return;
|
|
7361
7390
|
let n = Xi(f);
|
|
7362
|
-
n && await
|
|
7391
|
+
n && await F(async () => {
|
|
7363
7392
|
let r;
|
|
7364
|
-
if (t &&
|
|
7365
|
-
let { uploadUrl: e } = await
|
|
7393
|
+
if (t && k.screenshot) {
|
|
7394
|
+
let { uploadUrl: e } = await O.getScreenshotUploadUrl(), t;
|
|
7366
7395
|
try {
|
|
7367
7396
|
t = await fetch(e, {
|
|
7368
7397
|
method: "POST",
|
|
7369
|
-
headers: { "Content-Type":
|
|
7370
|
-
body:
|
|
7398
|
+
headers: { "Content-Type": k.screenshot.type || "image/png" },
|
|
7399
|
+
body: k.screenshot,
|
|
7371
7400
|
signal: AbortSignal.timeout(6e4)
|
|
7372
7401
|
});
|
|
7373
7402
|
} catch (e) {
|
|
@@ -7377,16 +7406,16 @@ function Mc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
7377
7406
|
let { storageId: n } = await t.json();
|
|
7378
7407
|
r = n;
|
|
7379
7408
|
}
|
|
7380
|
-
let i = qr(e), o = await
|
|
7409
|
+
let i = qr(e), o = await O.createThread({
|
|
7381
7410
|
url: window.location.href,
|
|
7382
7411
|
route: a,
|
|
7383
|
-
anchorSelector:
|
|
7384
|
-
anchorX:
|
|
7385
|
-
anchorY:
|
|
7386
|
-
anchorOffsetX:
|
|
7387
|
-
anchorOffsetY:
|
|
7388
|
-
viewportW:
|
|
7389
|
-
viewportY:
|
|
7412
|
+
anchorSelector: k.coords.anchorSelector,
|
|
7413
|
+
anchorX: k.coords.anchorX,
|
|
7414
|
+
anchorY: k.coords.anchorY,
|
|
7415
|
+
anchorOffsetX: k.coords.anchorOffsetX,
|
|
7416
|
+
anchorOffsetY: k.coords.anchorOffsetY,
|
|
7417
|
+
viewportW: k.coords.viewportW,
|
|
7418
|
+
viewportY: k.coords.viewportY,
|
|
7390
7419
|
userAgent: navigator.userAgent,
|
|
7391
7420
|
authorName: n.name,
|
|
7392
7421
|
authorEmail: n.email,
|
|
@@ -7394,46 +7423,46 @@ function Mc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
7394
7423
|
mentions: i.length > 0 ? i : void 0,
|
|
7395
7424
|
screenshotStorageId: r
|
|
7396
7425
|
});
|
|
7397
|
-
c((e) => [...e, o.thread]),
|
|
7426
|
+
c((e) => [...e, o.thread]), ye("comment_submitted", {
|
|
7398
7427
|
hasScreenshot: r != null,
|
|
7399
7428
|
hasMentions: i.length > 0
|
|
7400
|
-
}),
|
|
7429
|
+
}), A({
|
|
7401
7430
|
kind: "thread",
|
|
7402
7431
|
threadId: o.thread._id
|
|
7403
7432
|
});
|
|
7404
7433
|
});
|
|
7405
7434
|
}, [
|
|
7406
|
-
|
|
7435
|
+
O,
|
|
7407
7436
|
f,
|
|
7408
|
-
|
|
7437
|
+
k,
|
|
7409
7438
|
a,
|
|
7410
|
-
|
|
7411
|
-
]),
|
|
7412
|
-
if (
|
|
7413
|
-
let e =
|
|
7414
|
-
await
|
|
7415
|
-
await
|
|
7439
|
+
F
|
|
7440
|
+
]), Ue = W(async () => {
|
|
7441
|
+
if (k.kind !== "thread") return;
|
|
7442
|
+
let e = k.threadId;
|
|
7443
|
+
await F(async () => {
|
|
7444
|
+
await O.deleteThread(e), c((t) => t.filter((t) => t._id !== e)), A({ kind: "idle" });
|
|
7416
7445
|
});
|
|
7417
7446
|
}, [
|
|
7418
|
-
|
|
7419
|
-
|
|
7420
|
-
|
|
7421
|
-
]),
|
|
7422
|
-
if (
|
|
7423
|
-
let e =
|
|
7424
|
-
await
|
|
7425
|
-
await
|
|
7447
|
+
O,
|
|
7448
|
+
k,
|
|
7449
|
+
F
|
|
7450
|
+
]), z = W(async () => {
|
|
7451
|
+
if (k.kind !== "thread") return;
|
|
7452
|
+
let e = k.threadId;
|
|
7453
|
+
await F(async () => {
|
|
7454
|
+
await O.resolveThread(e, je), c((t) => t.filter((t) => t._id !== e)), ye("thread_resolved"), A({ kind: "idle" });
|
|
7426
7455
|
});
|
|
7427
7456
|
}, [
|
|
7428
|
-
|
|
7429
|
-
|
|
7457
|
+
O,
|
|
7458
|
+
k,
|
|
7430
7459
|
je,
|
|
7431
|
-
|
|
7432
|
-
]), We =
|
|
7433
|
-
if (e.readAt ?? (
|
|
7460
|
+
F
|
|
7461
|
+
]), We = W((e) => {
|
|
7462
|
+
if (e.readAt ?? (P((e) => Math.max(0, e - 1)), te((t) => t.map((t) => t._id === e._id ? {
|
|
7434
7463
|
...t,
|
|
7435
7464
|
readAt: Date.now()
|
|
7436
|
-
} : t)),
|
|
7465
|
+
} : t)), O.markNotificationRead(e._id).catch(() => {})), s.some((t) => t._id === e.threadId)) A({
|
|
7437
7466
|
kind: "thread",
|
|
7438
7467
|
threadId: e.threadId
|
|
7439
7468
|
});
|
|
@@ -7441,105 +7470,105 @@ function Mc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
7441
7470
|
let t = Vi(e.threadUrl, window.location.href);
|
|
7442
7471
|
t && (t.hash = `markup-thread=${e.threadId}`, window.location.href = t.toString());
|
|
7443
7472
|
}
|
|
7444
|
-
}, [
|
|
7445
|
-
|
|
7473
|
+
}, [O, s]), Ge = W(() => {
|
|
7474
|
+
se(!0), P(0), te((e) => e.map((e) => e.readAt == null ? {
|
|
7446
7475
|
...e,
|
|
7447
7476
|
readAt: Date.now()
|
|
7448
|
-
} : e)),
|
|
7449
|
-
}, [
|
|
7450
|
-
if (
|
|
7477
|
+
} : e)), O.markAllNotificationsRead().catch(() => {}).finally(() => se(!1));
|
|
7478
|
+
}, [O]), Ke = W(async (e) => {
|
|
7479
|
+
if (k.kind !== "thread") return;
|
|
7451
7480
|
let t = Xi(f);
|
|
7452
7481
|
if (!t) return;
|
|
7453
|
-
let n =
|
|
7454
|
-
await
|
|
7455
|
-
let r = qr(e), i = await
|
|
7482
|
+
let n = k.threadId;
|
|
7483
|
+
await F(async () => {
|
|
7484
|
+
let r = qr(e), i = await O.addComment(n, {
|
|
7456
7485
|
body: e,
|
|
7457
7486
|
authorName: t.name,
|
|
7458
7487
|
authorEmail: t.email,
|
|
7459
7488
|
mentions: r.length > 0 ? r : void 0
|
|
7460
7489
|
});
|
|
7461
|
-
c((e) => e.map((e) => e._id === n ? i.thread : e)),
|
|
7490
|
+
c((e) => e.map((e) => e._id === n ? i.thread : e)), ye("reply_submitted", { hasMentions: r.length > 0 });
|
|
7462
7491
|
});
|
|
7463
7492
|
}, [
|
|
7464
|
-
|
|
7493
|
+
O,
|
|
7465
7494
|
f,
|
|
7466
|
-
|
|
7467
|
-
|
|
7468
|
-
]),
|
|
7469
|
-
if (
|
|
7470
|
-
let n =
|
|
7471
|
-
await
|
|
7472
|
-
let r = qr(t), i = await
|
|
7495
|
+
k,
|
|
7496
|
+
F
|
|
7497
|
+
]), qe = W(async (e, t) => {
|
|
7498
|
+
if (k.kind !== "thread" || f.kind !== "anon" && f.kind !== "verified") return;
|
|
7499
|
+
let n = k.threadId;
|
|
7500
|
+
await F(async () => {
|
|
7501
|
+
let r = qr(t), i = await O.editComment(n, e, {
|
|
7473
7502
|
body: t,
|
|
7474
7503
|
mentions: r.length > 0 ? r : void 0
|
|
7475
7504
|
});
|
|
7476
7505
|
c((e) => e.map((e) => e._id === n ? i.thread : e));
|
|
7477
7506
|
}, { rethrow: !0 });
|
|
7478
7507
|
}, [
|
|
7479
|
-
|
|
7508
|
+
O,
|
|
7480
7509
|
f,
|
|
7481
|
-
|
|
7482
|
-
|
|
7483
|
-
]),
|
|
7484
|
-
if (
|
|
7485
|
-
let t =
|
|
7486
|
-
await
|
|
7487
|
-
let n = await
|
|
7510
|
+
k,
|
|
7511
|
+
F
|
|
7512
|
+
]), B = W(async (e) => {
|
|
7513
|
+
if (k.kind !== "thread" || f.kind !== "anon" && f.kind !== "verified") return;
|
|
7514
|
+
let t = k.threadId;
|
|
7515
|
+
await F(async () => {
|
|
7516
|
+
let n = await O.deleteComment(t, e);
|
|
7488
7517
|
c((e) => e.map((e) => e._id === t ? n.thread : e));
|
|
7489
7518
|
});
|
|
7490
7519
|
}, [
|
|
7491
|
-
|
|
7520
|
+
O,
|
|
7492
7521
|
f,
|
|
7493
|
-
|
|
7494
|
-
|
|
7495
|
-
]), Je =
|
|
7496
|
-
if (
|
|
7522
|
+
k,
|
|
7523
|
+
F
|
|
7524
|
+
]), Je = W(async (e, t) => {
|
|
7525
|
+
if (k.kind !== "thread") return;
|
|
7497
7526
|
let n = Xi(f);
|
|
7498
7527
|
if (!n) return;
|
|
7499
|
-
let r =
|
|
7528
|
+
let r = k.threadId;
|
|
7500
7529
|
await he(async () => {
|
|
7501
|
-
let i = await
|
|
7530
|
+
let i = await O.toggleReaction(e, {
|
|
7502
7531
|
emoji: t,
|
|
7503
7532
|
authorName: n.name
|
|
7504
7533
|
});
|
|
7505
|
-
c((e) => e.map((e) => e._id === r ? i.thread : e)),
|
|
7534
|
+
c((e) => e.map((e) => e._id === r ? i.thread : e)), ye("reaction_added");
|
|
7506
7535
|
});
|
|
7507
7536
|
}, [
|
|
7508
|
-
|
|
7537
|
+
O,
|
|
7509
7538
|
f,
|
|
7510
|
-
|
|
7539
|
+
k,
|
|
7511
7540
|
he
|
|
7512
|
-
]), [
|
|
7513
|
-
await
|
|
7514
|
-
await
|
|
7541
|
+
]), [Ye, Xe] = V(!1), Ze = W(async () => {
|
|
7542
|
+
await _e(async () => {
|
|
7543
|
+
await O.forgetMe(), A({ kind: "idle" }), E(), p({ type: "forget-me" }), Xe(!0);
|
|
7515
7544
|
});
|
|
7516
7545
|
}, [
|
|
7546
|
+
O,
|
|
7517
7547
|
E,
|
|
7518
|
-
|
|
7519
|
-
ge,
|
|
7548
|
+
_e,
|
|
7520
7549
|
p
|
|
7521
7550
|
]);
|
|
7522
|
-
|
|
7523
|
-
if (!
|
|
7524
|
-
let e = window.setTimeout(() =>
|
|
7551
|
+
H(() => {
|
|
7552
|
+
if (!Ye) return;
|
|
7553
|
+
let e = window.setTimeout(() => Xe(!1), 5e3);
|
|
7525
7554
|
return () => window.clearTimeout(e);
|
|
7526
|
-
}, [
|
|
7527
|
-
let [
|
|
7528
|
-
await
|
|
7529
|
-
await
|
|
7555
|
+
}, [Ye]);
|
|
7556
|
+
let [Qe, $e] = V(!1), et = W(async () => {
|
|
7557
|
+
await ve(async () => {
|
|
7558
|
+
await O.signOut(), A({ kind: "idle" }), p({ type: "signed-out" }), $e(!0);
|
|
7530
7559
|
});
|
|
7531
7560
|
}, [
|
|
7532
|
-
|
|
7533
|
-
|
|
7561
|
+
O,
|
|
7562
|
+
ve,
|
|
7534
7563
|
p
|
|
7535
7564
|
]);
|
|
7536
|
-
|
|
7537
|
-
if (!
|
|
7538
|
-
let e = window.setTimeout(() =>
|
|
7565
|
+
H(() => {
|
|
7566
|
+
if (!Qe) return;
|
|
7567
|
+
let e = window.setTimeout(() => $e(!1), 5e3);
|
|
7539
7568
|
return () => window.clearTimeout(e);
|
|
7540
|
-
}, [
|
|
7541
|
-
let
|
|
7542
|
-
let e =
|
|
7569
|
+
}, [Qe]);
|
|
7570
|
+
let tt = k.kind === "thread" ? s.find((e) => e._id === k.threadId) ?? null : null, nt = Ae || je != null && je === tt?.authorClientId, it = U(/* @__PURE__ */ new Map()), at = rt(() => {
|
|
7571
|
+
let e = it.current, t = s.map((t) => {
|
|
7543
7572
|
let { point: n, memory: r } = bi({
|
|
7544
7573
|
anchorX: t.anchorX,
|
|
7545
7574
|
anchorY: t.anchorY,
|
|
@@ -7554,27 +7583,27 @@ function Mc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
7554
7583
|
});
|
|
7555
7584
|
for (let t of e.keys()) s.some((e) => e._id === t) || e.delete(t);
|
|
7556
7585
|
return t;
|
|
7557
|
-
}, [s,
|
|
7586
|
+
}, [s, Ee]), ot = U({
|
|
7558
7587
|
retryable: !1,
|
|
7559
7588
|
elements: []
|
|
7560
7589
|
});
|
|
7561
|
-
|
|
7562
|
-
|
|
7563
|
-
retryable:
|
|
7564
|
-
elements:
|
|
7590
|
+
H(() => {
|
|
7591
|
+
ot.current = {
|
|
7592
|
+
retryable: at.some((e) => !e.point.resolved && e.thread.anchorSelector != null),
|
|
7593
|
+
elements: at.flatMap((e) => e.point.element ? [e.point.element] : [])
|
|
7565
7594
|
};
|
|
7566
|
-
}, [
|
|
7567
|
-
let
|
|
7568
|
-
return
|
|
7569
|
-
if (!
|
|
7595
|
+
}, [at]);
|
|
7596
|
+
let st = s.some((e) => e.anchorSelector != null);
|
|
7597
|
+
return H(() => {
|
|
7598
|
+
if (!st) return;
|
|
7570
7599
|
let e = null;
|
|
7571
7600
|
function t() {
|
|
7572
7601
|
e ??= requestAnimationFrame(() => {
|
|
7573
|
-
e = null,
|
|
7602
|
+
e = null, De((e) => e + 1);
|
|
7574
7603
|
});
|
|
7575
7604
|
}
|
|
7576
7605
|
let n = new MutationObserver(() => {
|
|
7577
|
-
let { retryable: e, elements: n } =
|
|
7606
|
+
let { retryable: e, elements: n } = ot.current;
|
|
7578
7607
|
!e && n.every((e) => e.isConnected) || t();
|
|
7579
7608
|
});
|
|
7580
7609
|
return n.observe(document.body, {
|
|
@@ -7583,107 +7612,108 @@ function Mc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
7583
7612
|
}), () => {
|
|
7584
7613
|
n.disconnect(), e != null && cancelAnimationFrame(e);
|
|
7585
7614
|
};
|
|
7586
|
-
}, [
|
|
7587
|
-
|
|
7615
|
+
}, [st]), H(() => {
|
|
7616
|
+
k.kind === "thread" && tt == null && Ie();
|
|
7588
7617
|
}, [
|
|
7589
|
-
|
|
7590
|
-
|
|
7591
|
-
|
|
7618
|
+
k,
|
|
7619
|
+
tt,
|
|
7620
|
+
Ie
|
|
7592
7621
|
]), /* @__PURE__ */ Q("div", {
|
|
7593
7622
|
class: "markup-root",
|
|
7594
|
-
ref:
|
|
7623
|
+
ref: Oe,
|
|
7595
7624
|
children: [
|
|
7596
|
-
|
|
7625
|
+
k.kind === "placing" ? null : /* @__PURE__ */ Q("div", {
|
|
7597
7626
|
class: "markup-pins-layer",
|
|
7598
|
-
children: [!
|
|
7599
|
-
let n =
|
|
7627
|
+
children: [!Te && v ? at.map(({ thread: e, point: t }) => {
|
|
7628
|
+
let n = k.kind === "thread" && k.threadId === e._id, r = e.comments.reduce((e, t) => e + +!t.deleted, 0);
|
|
7600
7629
|
return /* @__PURE__ */ Q(oc, {
|
|
7601
7630
|
pageX: t.pageX,
|
|
7602
7631
|
pageY: t.pageY,
|
|
7603
7632
|
count: r,
|
|
7604
7633
|
isActive: n,
|
|
7605
7634
|
isUnresolved: !t.resolved,
|
|
7635
|
+
isClosed: e.resolvedAt != null,
|
|
7606
7636
|
onClick: () => {
|
|
7607
|
-
|
|
7637
|
+
ye("thread_opened", { commentCount: r }), A({
|
|
7608
7638
|
kind: "thread",
|
|
7609
7639
|
threadId: e._id
|
|
7610
7640
|
});
|
|
7611
7641
|
}
|
|
7612
7642
|
}, e._id);
|
|
7613
|
-
}) : null,
|
|
7614
|
-
pageX:
|
|
7615
|
-
pageY:
|
|
7643
|
+
}) : null, k.kind === "composing-new" ? /* @__PURE__ */ Q(sc, {
|
|
7644
|
+
pageX: k.pageX,
|
|
7645
|
+
pageY: k.pageY
|
|
7616
7646
|
}) : null]
|
|
7617
7647
|
}),
|
|
7618
|
-
|
|
7619
|
-
onPlace:
|
|
7620
|
-
onCancel:
|
|
7648
|
+
k.kind === "placing" ? /* @__PURE__ */ Q(cc, {
|
|
7649
|
+
onPlace: Re,
|
|
7650
|
+
onCancel: Ie
|
|
7621
7651
|
}) : null,
|
|
7622
|
-
|
|
7623
|
-
thread:
|
|
7624
|
-
authorName:
|
|
7652
|
+
k.kind === "thread" && tt ? /* @__PURE__ */ Q(hc, {
|
|
7653
|
+
thread: tt,
|
|
7654
|
+
authorName: ke,
|
|
7625
7655
|
currentClientId: je ?? null,
|
|
7626
|
-
isVerified:
|
|
7627
|
-
isIdentityResolving:
|
|
7628
|
-
isSigningIn:
|
|
7629
|
-
canDelete:
|
|
7630
|
-
isPending:
|
|
7631
|
-
error:
|
|
7632
|
-
isHidden:
|
|
7633
|
-
members:
|
|
7634
|
-
onAuthor:
|
|
7635
|
-
onSignIn:
|
|
7636
|
-
onClose:
|
|
7637
|
-
onReply:
|
|
7638
|
-
onEditComment:
|
|
7639
|
-
onDeleteComment:
|
|
7656
|
+
isVerified: Ae,
|
|
7657
|
+
isIdentityResolving: L,
|
|
7658
|
+
isSigningIn: Be,
|
|
7659
|
+
canDelete: nt,
|
|
7660
|
+
isPending: xe,
|
|
7661
|
+
error: Se,
|
|
7662
|
+
isHidden: Te,
|
|
7663
|
+
members: j,
|
|
7664
|
+
onAuthor: ze,
|
|
7665
|
+
onSignIn: Ve,
|
|
7666
|
+
onClose: Ie,
|
|
7667
|
+
onReply: Ke,
|
|
7668
|
+
onEditComment: qe,
|
|
7669
|
+
onDeleteComment: B,
|
|
7640
7670
|
onToggleReaction: Je,
|
|
7641
|
-
onDelete:
|
|
7642
|
-
onResolve:
|
|
7643
|
-
},
|
|
7644
|
-
|
|
7645
|
-
pageX:
|
|
7646
|
-
pageY:
|
|
7647
|
-
authorName:
|
|
7648
|
-
isVerified:
|
|
7649
|
-
isIdentityResolving:
|
|
7650
|
-
isSigningIn:
|
|
7651
|
-
isPending:
|
|
7652
|
-
error:
|
|
7653
|
-
screenshot:
|
|
7654
|
-
isScreenshotCapturing:
|
|
7655
|
-
screenshotFailed:
|
|
7656
|
-
screenshotRedactedCount:
|
|
7657
|
-
screenshotRedactedSelectors:
|
|
7658
|
-
members:
|
|
7659
|
-
onAuthor:
|
|
7660
|
-
onSignIn:
|
|
7661
|
-
onSubmit:
|
|
7662
|
-
onClose:
|
|
7671
|
+
onDelete: Ue,
|
|
7672
|
+
onResolve: z
|
|
7673
|
+
}, tt._id) : null,
|
|
7674
|
+
k.kind === "composing-new" ? /* @__PURE__ */ Q(Xs, {
|
|
7675
|
+
pageX: k.pageX,
|
|
7676
|
+
pageY: k.pageY,
|
|
7677
|
+
authorName: ke,
|
|
7678
|
+
isVerified: Ae,
|
|
7679
|
+
isIdentityResolving: L,
|
|
7680
|
+
isSigningIn: Be,
|
|
7681
|
+
isPending: xe,
|
|
7682
|
+
error: Se,
|
|
7683
|
+
screenshot: k.screenshot,
|
|
7684
|
+
isScreenshotCapturing: k.isScreenshotCapturing,
|
|
7685
|
+
screenshotFailed: k.screenshotFailed,
|
|
7686
|
+
screenshotRedactedCount: k.screenshotRedactedCount,
|
|
7687
|
+
screenshotRedactedSelectors: k.screenshotRedactedSelectors,
|
|
7688
|
+
members: j,
|
|
7689
|
+
onAuthor: ze,
|
|
7690
|
+
onSignIn: Ve,
|
|
7691
|
+
onSubmit: He,
|
|
7692
|
+
onClose: Ie
|
|
7663
7693
|
}) : null,
|
|
7664
|
-
!
|
|
7665
|
-
isActive:
|
|
7666
|
-
onToggle: () =>
|
|
7667
|
-
onHide: () =>
|
|
7694
|
+
!Te || k.kind === "placing" || k.kind === "composing-new" ? /* @__PURE__ */ Q(Tc, {
|
|
7695
|
+
isActive: k.kind === "placing",
|
|
7696
|
+
onToggle: () => k.kind === "placing" ? Ie() : Fe(),
|
|
7697
|
+
onHide: () => we({ type: "hide-with-toast" }),
|
|
7668
7698
|
position: g,
|
|
7669
|
-
showInbox:
|
|
7670
|
-
unreadCount:
|
|
7671
|
-
inboxOpen:
|
|
7699
|
+
showInbox: Ae,
|
|
7700
|
+
unreadCount: Ae ? N : 0,
|
|
7701
|
+
inboxOpen: w === "inbox",
|
|
7672
7702
|
onOpenInbox: () => {
|
|
7673
|
-
let e =
|
|
7674
|
-
|
|
7703
|
+
let e = w === "inbox" ? null : "inbox";
|
|
7704
|
+
T(e), e && (ye("notifications_opened", { unreadCount: N }), ce());
|
|
7675
7705
|
},
|
|
7676
7706
|
pinsVisible: v,
|
|
7677
7707
|
onTogglePins: () => y((e) => !e),
|
|
7678
7708
|
identityButton: /* @__PURE__ */ Q(hs, {
|
|
7679
7709
|
identity: f,
|
|
7680
7710
|
position: g,
|
|
7681
|
-
isSigningIn:
|
|
7682
|
-
isSigningOut:
|
|
7711
|
+
isSigningIn: Be,
|
|
7712
|
+
isSigningOut: be,
|
|
7683
7713
|
dashboardUrl: i,
|
|
7684
|
-
onSignIn:
|
|
7685
|
-
onSignOut:
|
|
7686
|
-
onForgetMe:
|
|
7714
|
+
onSignIn: Ve,
|
|
7715
|
+
onSignOut: et,
|
|
7716
|
+
onForgetMe: Ze
|
|
7687
7717
|
}),
|
|
7688
7718
|
overflowButton: /* @__PURE__ */ Q(tc, {
|
|
7689
7719
|
position: g,
|
|
@@ -7691,57 +7721,59 @@ function Mc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
7691
7721
|
autoCapture: b && r?.enabled !== !1,
|
|
7692
7722
|
autoCaptureLocked: r?.enabled === !1,
|
|
7693
7723
|
onToggleAutoCapture: () => x((e) => !e),
|
|
7694
|
-
|
|
7695
|
-
|
|
7696
|
-
|
|
7697
|
-
|
|
7724
|
+
showResolved: S,
|
|
7725
|
+
onToggleShowResolved: () => C((e) => !e),
|
|
7726
|
+
onOpenPrivacy: () => T("privacy"),
|
|
7727
|
+
onOpenShortcuts: () => T("shortcuts"),
|
|
7728
|
+
onHideForSession: () => we({ type: "hide-with-toast" }),
|
|
7729
|
+
version: "1.21.0",
|
|
7698
7730
|
dashboardUrl: i
|
|
7699
7731
|
})
|
|
7700
7732
|
}) : null,
|
|
7701
|
-
|
|
7733
|
+
w === "inbox" && Ae ? /* @__PURE__ */ Q(ac, {
|
|
7702
7734
|
kind: "inbox",
|
|
7703
7735
|
label: "Inbox",
|
|
7704
7736
|
position: g,
|
|
7705
7737
|
ignoreToolbarKind: "inbox",
|
|
7706
|
-
onClose:
|
|
7738
|
+
onClose: E,
|
|
7707
7739
|
children: /* @__PURE__ */ Q(Qs, {
|
|
7708
|
-
items:
|
|
7709
|
-
isLoading:
|
|
7710
|
-
error:
|
|
7711
|
-
isMarkingAll:
|
|
7712
|
-
onBack:
|
|
7740
|
+
items: ee,
|
|
7741
|
+
isLoading: ne,
|
|
7742
|
+
error: ie,
|
|
7743
|
+
isMarkingAll: oe,
|
|
7744
|
+
onBack: E,
|
|
7713
7745
|
onItemClick: (e) => {
|
|
7714
|
-
|
|
7746
|
+
E(), We(e);
|
|
7715
7747
|
},
|
|
7716
|
-
onMarkAllRead:
|
|
7748
|
+
onMarkAllRead: Ge
|
|
7717
7749
|
})
|
|
7718
7750
|
}) : null,
|
|
7719
|
-
|
|
7751
|
+
w === "privacy" ? /* @__PURE__ */ Q(ac, {
|
|
7720
7752
|
kind: "privacy",
|
|
7721
7753
|
label: "Privacy and data",
|
|
7722
7754
|
position: g,
|
|
7723
|
-
onClose:
|
|
7755
|
+
onClose: E,
|
|
7724
7756
|
children: /* @__PURE__ */ Q(uc, {
|
|
7725
7757
|
identity: f,
|
|
7726
7758
|
apiUrl: e,
|
|
7727
7759
|
autoCapture: b && r?.enabled !== !1,
|
|
7728
7760
|
autoCaptureLocked: r?.enabled === !1,
|
|
7729
|
-
isForgettingMe:
|
|
7730
|
-
forgetMeError:
|
|
7731
|
-
onForgetMe:
|
|
7732
|
-
onClose:
|
|
7761
|
+
isForgettingMe: fe.isPending,
|
|
7762
|
+
forgetMeError: fe.error,
|
|
7763
|
+
onForgetMe: Ze,
|
|
7764
|
+
onClose: E
|
|
7733
7765
|
})
|
|
7734
7766
|
}) : null,
|
|
7735
|
-
|
|
7767
|
+
w === "shortcuts" ? /* @__PURE__ */ Q(ac, {
|
|
7736
7768
|
kind: "shortcuts",
|
|
7737
7769
|
label: "Keyboard shortcuts",
|
|
7738
7770
|
position: g,
|
|
7739
|
-
onClose:
|
|
7740
|
-
children: /* @__PURE__ */ Q(fc, { onClose:
|
|
7771
|
+
onClose: E,
|
|
7772
|
+
children: /* @__PURE__ */ Q(fc, { onClose: E })
|
|
7741
7773
|
}) : null,
|
|
7742
|
-
|
|
7743
|
-
|
|
7744
|
-
|
|
7774
|
+
Ce.kind === "hidden-with-toast" ? /* @__PURE__ */ Q(Nc, { position: g }) : null,
|
|
7775
|
+
Ye ? /* @__PURE__ */ Q(Pc, { position: g }) : null,
|
|
7776
|
+
Qe ? /* @__PURE__ */ Q(Fc, { position: g }) : null
|
|
7745
7777
|
]
|
|
7746
7778
|
});
|
|
7747
7779
|
}
|
|
@@ -7784,25 +7816,25 @@ function Fc({ position: e }) {
|
|
|
7784
7816
|
//#endregion
|
|
7785
7817
|
//#region src/runtime/mount.tsx
|
|
7786
7818
|
function Ic(e, t) {
|
|
7787
|
-
e.style.position = "fixed", e.style.inset = "0", e.style.zIndex = "2147483647", e.style.pointerEvents = "none",
|
|
7788
|
-
let n =
|
|
7789
|
-
i.textContent =
|
|
7819
|
+
e.style.position = "fixed", e.style.inset = "0", e.style.zIndex = "2147483647", e.style.pointerEvents = "none", Le(e, t.theme ?? "auto");
|
|
7820
|
+
let n = He(), r = e.attachShadow({ mode: "open" }), i = document.createElement("style");
|
|
7821
|
+
i.textContent = ue, r.appendChild(i);
|
|
7790
7822
|
let a = document.createElement("div");
|
|
7791
|
-
a.className = "markup-shadow-root", r.appendChild(a),
|
|
7823
|
+
a.className = "markup-shadow-root", r.appendChild(a), Ae({
|
|
7792
7824
|
apiUrl: t.apiUrl,
|
|
7793
7825
|
apiKey: t.apiKey,
|
|
7794
|
-
widgetVersion: "1.
|
|
7795
|
-
}),
|
|
7826
|
+
widgetVersion: "1.21.0"
|
|
7827
|
+
}), ve(t.analytics === !1 ? null : {
|
|
7796
7828
|
apiUrl: t.apiUrl,
|
|
7797
7829
|
apiKey: t.apiKey,
|
|
7798
|
-
widgetVersion: "1.
|
|
7799
|
-
}),
|
|
7830
|
+
widgetVersion: "1.21.0"
|
|
7831
|
+
}), ye("widget_loaded");
|
|
7800
7832
|
let { theme: o, analytics: s, ...c } = t;
|
|
7801
|
-
return
|
|
7802
|
-
onError: (e) =>
|
|
7833
|
+
return le(/* @__PURE__ */ Q(Se, {
|
|
7834
|
+
onError: (e) => L(e, { context: "render" }),
|
|
7803
7835
|
children: /* @__PURE__ */ Q(Mc, { ...c })
|
|
7804
7836
|
}), a), () => {
|
|
7805
|
-
n(),
|
|
7837
|
+
n(), Ae(null), ve(null), le(null, a);
|
|
7806
7838
|
};
|
|
7807
7839
|
}
|
|
7808
7840
|
//#endregion
|