@evelan/jexity-widget 0.11.9 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +1047 -951
- package/dist/index.mjs.map +1 -1
- package/dist/react.mjs +1002 -906
- package/dist/react.mjs.map +1 -1
- package/dist/types/lib/history-patch.d.ts +8 -0
- package/dist/types/lib/history-patch.d.ts.map +1 -0
- package/dist/types/lib/widgetBootstrap.d.ts +2 -0
- package/dist/types/lib/widgetBootstrap.d.ts.map +1 -1
- package/dist/types/module/shell/WidgetShell.d.ts +6 -2
- package/dist/types/module/shell/WidgetShell.d.ts.map +1 -1
- package/dist/types/module/shell/hooks/useBootstrap.d.ts +10 -1
- package/dist/types/module/shell/hooks/useBootstrap.d.ts.map +1 -1
- package/dist/types/module/shell/hooks/usePathGuard.d.ts +7 -0
- package/dist/types/module/shell/hooks/usePathGuard.d.ts.map +1 -0
- package/dist/types/module/shell/shell.state.d.ts +12 -0
- package/dist/types/module/shell/shell.state.d.ts.map +1 -1
- package/dist/types/types.d.ts +13 -0
- package/dist/types/types.d.ts.map +1 -1
- package/dist/widget.js +20 -20
- package/dist/widget.js.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var it, b,
|
|
1
|
+
var it, b, Qr, Dr, he, Un, Vr, Hr, Wr, bn, Kt, Zt, Jr, Ze = {}, Gr = [], go = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, ot = Array.isArray;
|
|
2
2
|
function te(t, e) {
|
|
3
3
|
for (var n in e) t[n] = e[n];
|
|
4
4
|
return t;
|
|
5
5
|
}
|
|
6
|
-
function
|
|
6
|
+
function yn(t) {
|
|
7
7
|
t && t.parentNode && t.parentNode.removeChild(t);
|
|
8
8
|
}
|
|
9
9
|
function V(t, e, n) {
|
|
@@ -13,58 +13,58 @@ function V(t, e, n) {
|
|
|
13
13
|
return He(t, s, r, i, null);
|
|
14
14
|
}
|
|
15
15
|
function He(t, e, n, r, i) {
|
|
16
|
-
var o = { type: t, props: e, key: n, ref: r, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: i ?? ++
|
|
16
|
+
var o = { type: t, props: e, key: n, ref: r, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: i ?? ++Qr, __i: -1, __u: 0 };
|
|
17
17
|
return i == null && b.vnode != null && b.vnode(o), o;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function mo() {
|
|
20
20
|
return { current: null };
|
|
21
21
|
}
|
|
22
22
|
function F(t) {
|
|
23
23
|
return t.children;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function G(t, e) {
|
|
26
26
|
this.props = t, this.context = e;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
if (e == null) return t.__ ?
|
|
28
|
+
function Ae(t, e) {
|
|
29
|
+
if (e == null) return t.__ ? Ae(t.__, t.__i + 1) : null;
|
|
30
30
|
for (var n; e < t.__k.length; e++) if ((n = t.__k[e]) != null && n.__e != null) return n.__e;
|
|
31
|
-
return typeof t.type == "function" ?
|
|
31
|
+
return typeof t.type == "function" ? Ae(t) : null;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function Kr(t) {
|
|
34
34
|
var e, n;
|
|
35
35
|
if ((t = t.__) != null && t.__c != null) {
|
|
36
36
|
for (t.__e = t.__c.base = null, e = 0; e < t.__k.length; e++) if ((n = t.__k[e]) != null && n.__e != null) {
|
|
37
37
|
t.__e = t.__c.base = n.__e;
|
|
38
38
|
break;
|
|
39
39
|
}
|
|
40
|
-
return
|
|
40
|
+
return Kr(t);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
(!t.__d && (t.__d = !0) && he.push(t) && !bt.__r++ ||
|
|
43
|
+
function Yt(t) {
|
|
44
|
+
(!t.__d && (t.__d = !0) && he.push(t) && !bt.__r++ || Un != b.debounceRendering) && ((Un = b.debounceRendering) || Vr)(bt);
|
|
45
45
|
}
|
|
46
46
|
function bt() {
|
|
47
|
-
for (var t, e, n, r, i, o, s, l = 1; he.length; ) he.length > l && he.sort(
|
|
47
|
+
for (var t, e, n, r, i, o, s, l = 1; he.length; ) he.length > l && he.sort(Hr), t = he.shift(), l = he.length, t.__d && (n = void 0, r = void 0, i = (r = (e = t).__v).__e, o = [], s = [], e.__P && ((n = te({}, r)).__v = r.__v + 1, b.vnode && b.vnode(n), vn(e.__P, n, r, e.__n, e.__P.namespaceURI, 32 & r.__u ? [i] : null, o, i ?? Ae(r), !!(32 & r.__u), s), n.__v = r.__v, n.__.__k[n.__i] = n, Xr(o, n, s), r.__e = r.__ = null, n.__e != i && Kr(n)));
|
|
48
48
|
bt.__r = 0;
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
var h, f, p, g, m, x, v, y = r && r.__k ||
|
|
52
|
-
for (a =
|
|
50
|
+
function Zr(t, e, n, r, i, o, s, l, a, u, d) {
|
|
51
|
+
var h, f, p, g, m, x, v, y = r && r.__k || Gr, I = e.length;
|
|
52
|
+
for (a = xo(n, e, y, a, I), h = 0; h < I; h++) (p = n.__k[h]) != null && (f = p.__i == -1 ? Ze : y[p.__i] || Ze, p.__i = h, x = vn(t, p, f, i, o, s, l, a, u, d), g = p.__e, p.ref && f.ref != p.ref && (f.ref && _n(f.ref, null, p), d.push(p.ref, p.__c || g, p)), m == null && g != null && (m = g), (v = !!(4 & p.__u)) || f.__k === p.__k ? a = Yr(p, a, t, v) : typeof p.type == "function" && x !== void 0 ? a = x : g && (a = g.nextSibling), p.__u &= -7);
|
|
53
53
|
return n.__e = m, a;
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function xo(t, e, n, r, i) {
|
|
56
56
|
var o, s, l, a, u, d = n.length, h = d, f = 0;
|
|
57
|
-
for (t.__k = new Array(i), o = 0; o < i; o++) (s = e[o]) != null && typeof s != "boolean" && typeof s != "function" ? (a = o + f, (s = t.__k[o] = typeof s == "string" || typeof s == "number" || typeof s == "bigint" || s.constructor == String ? He(null, s, null, null, null) : ot(s) ? He(F, { children: s }, null, null, null) : s.constructor == null && s.__b > 0 ? He(s.type, s.props, s.key, s.ref ? s.ref : null, s.__v) : s).__ = t, s.__b = t.__b + 1, l = null, (u = s.__i =
|
|
58
|
-
if (h) for (o = 0; o < d; o++) (l = n[o]) != null && (2 & l.__u) == 0 && (l.__e == r && (r =
|
|
57
|
+
for (t.__k = new Array(i), o = 0; o < i; o++) (s = e[o]) != null && typeof s != "boolean" && typeof s != "function" ? (a = o + f, (s = t.__k[o] = typeof s == "string" || typeof s == "number" || typeof s == "bigint" || s.constructor == String ? He(null, s, null, null, null) : ot(s) ? He(F, { children: s }, null, null, null) : s.constructor == null && s.__b > 0 ? He(s.type, s.props, s.key, s.ref ? s.ref : null, s.__v) : s).__ = t, s.__b = t.__b + 1, l = null, (u = s.__i = bo(s, n, a, h)) != -1 && (h--, (l = n[u]) && (l.__u |= 2)), l == null || l.__v == null ? (u == -1 && (i > d ? f-- : i < d && f++), typeof s.type != "function" && (s.__u |= 4)) : u != a && (u == a - 1 ? f-- : u == a + 1 ? f++ : (u > a ? f-- : f++, s.__u |= 4))) : t.__k[o] = null;
|
|
58
|
+
if (h) for (o = 0; o < d; o++) (l = n[o]) != null && (2 & l.__u) == 0 && (l.__e == r && (r = Ae(l)), ti(l, l));
|
|
59
59
|
return r;
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function Yr(t, e, n, r) {
|
|
62
62
|
var i, o;
|
|
63
63
|
if (typeof t.type == "function") {
|
|
64
|
-
for (i = t.__k, o = 0; i && o < i.length; o++) i[o] && (i[o].__ = t, e =
|
|
64
|
+
for (i = t.__k, o = 0; i && o < i.length; o++) i[o] && (i[o].__ = t, e = Yr(i[o], e, n, r));
|
|
65
65
|
return e;
|
|
66
66
|
}
|
|
67
|
-
t.__e != e && (r && (e && t.type && !e.parentNode && (e =
|
|
67
|
+
t.__e != e && (r && (e && t.type && !e.parentNode && (e = Ae(t)), n.insertBefore(t.__e, e || null)), e = t.__e);
|
|
68
68
|
do
|
|
69
69
|
e = e && e.nextSibling;
|
|
70
70
|
while (e != null && e.nodeType == 8);
|
|
@@ -75,7 +75,7 @@ function ne(t, e) {
|
|
|
75
75
|
ne(n, e);
|
|
76
76
|
}) : e.push(t)), e;
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function bo(t, e, n, r) {
|
|
79
79
|
var i, o, s, l = t.key, a = t.type, u = e[n], d = u != null && (2 & u.__u) == 0;
|
|
80
80
|
if (u === null && t.key == null || d && l == u.key && a == u.type) return n;
|
|
81
81
|
if (r > (d ? 1 : 0)) {
|
|
@@ -83,17 +83,17 @@ function fo(t, e, n, r) {
|
|
|
83
83
|
}
|
|
84
84
|
return -1;
|
|
85
85
|
}
|
|
86
|
-
function
|
|
87
|
-
e[0] == "-" ? t.setProperty(e, n ?? "") : t[e] = n == null ? "" : typeof n != "number" ||
|
|
86
|
+
function Qn(t, e, n) {
|
|
87
|
+
e[0] == "-" ? t.setProperty(e, n ?? "") : t[e] = n == null ? "" : typeof n != "number" || go.test(e) ? n : n + "px";
|
|
88
88
|
}
|
|
89
89
|
function ut(t, e, n, r, i) {
|
|
90
90
|
var o, s;
|
|
91
91
|
e: if (e == "style") if (typeof n == "string") t.style.cssText = n;
|
|
92
92
|
else {
|
|
93
|
-
if (typeof r == "string" && (t.style.cssText = r = ""), r) for (e in r) n && e in n ||
|
|
94
|
-
if (n) for (e in n) r && n[e] == r[e] ||
|
|
93
|
+
if (typeof r == "string" && (t.style.cssText = r = ""), r) for (e in r) n && e in n || Qn(t.style, e, "");
|
|
94
|
+
if (n) for (e in n) r && n[e] == r[e] || Qn(t.style, e, n[e]);
|
|
95
95
|
}
|
|
96
|
-
else if (e[0] == "o" && e[1] == "n") o = e != (e = e.replace(
|
|
96
|
+
else if (e[0] == "o" && e[1] == "n") o = e != (e = e.replace(Wr, "$1")), s = e.toLowerCase(), e = s in t || e == "onFocusOut" || e == "onFocusIn" ? s.slice(2) : e.slice(2), t.l || (t.l = {}), t.l[e + o] = n, n ? r ? n.u = r.u : (n.u = bn, t.addEventListener(e, o ? Zt : Kt, o)) : t.removeEventListener(e, o ? Zt : Kt, o);
|
|
97
97
|
else {
|
|
98
98
|
if (i == "http://www.w3.org/2000/svg") e = e.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
|
|
99
99
|
else if (e != "width" && e != "height" && e != "href" && e != "list" && e != "form" && e != "tabIndex" && e != "download" && e != "rowSpan" && e != "colSpan" && e != "role" && e != "popover" && e in t) try {
|
|
@@ -104,60 +104,60 @@ function ut(t, e, n, r, i) {
|
|
|
104
104
|
typeof n == "function" || (n == null || n === !1 && e[4] != "-" ? t.removeAttribute(e) : t.setAttribute(e, e == "popover" && n == 1 ? "" : n));
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function Dn(t) {
|
|
108
108
|
return function(e) {
|
|
109
109
|
if (this.l) {
|
|
110
110
|
var n = this.l[e.type + t];
|
|
111
|
-
if (e.t == null) e.t =
|
|
111
|
+
if (e.t == null) e.t = bn++;
|
|
112
112
|
else if (e.t < n.u) return;
|
|
113
113
|
return n(b.event ? b.event(e) : e);
|
|
114
114
|
}
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
|
-
function
|
|
118
|
-
var d, h, f, p, g, m, x, v, y, I,
|
|
117
|
+
function vn(t, e, n, r, i, o, s, l, a, u) {
|
|
118
|
+
var d, h, f, p, g, m, x, v, y, I, U, H, B, Fn, ct, ze, Ot, Z = e.type;
|
|
119
119
|
if (e.constructor != null) return null;
|
|
120
120
|
128 & n.__u && (a = !!(32 & n.__u), o = [l = e.__e = n.__e]), (d = b.__b) && d(e);
|
|
121
121
|
e: if (typeof Z == "function") try {
|
|
122
|
-
if (v = e.props, y = "prototype" in Z && Z.prototype.render, I = (d = Z.contextType) && r[d.__c],
|
|
122
|
+
if (v = e.props, y = "prototype" in Z && Z.prototype.render, I = (d = Z.contextType) && r[d.__c], U = d ? I ? I.props.value : d.__ : r, n.__c ? x = (h = e.__c = n.__c).__ = h.__E : (y ? e.__c = h = new Z(v, U) : (e.__c = h = new G(v, U), h.constructor = Z, h.render = vo), I && I.sub(h), h.props = v, h.state || (h.state = {}), h.context = U, h.__n = r, f = h.__d = !0, h.__h = [], h._sb = []), y && h.__s == null && (h.__s = h.state), y && Z.getDerivedStateFromProps != null && (h.__s == h.state && (h.__s = te({}, h.__s)), te(h.__s, Z.getDerivedStateFromProps(v, h.__s))), p = h.props, g = h.state, h.__v = e, f) y && Z.getDerivedStateFromProps == null && h.componentWillMount != null && h.componentWillMount(), y && h.componentDidMount != null && h.__h.push(h.componentDidMount);
|
|
123
123
|
else {
|
|
124
|
-
if (y && Z.getDerivedStateFromProps == null && v !== p && h.componentWillReceiveProps != null && h.componentWillReceiveProps(v,
|
|
124
|
+
if (y && Z.getDerivedStateFromProps == null && v !== p && h.componentWillReceiveProps != null && h.componentWillReceiveProps(v, U), !h.__e && h.shouldComponentUpdate != null && h.shouldComponentUpdate(v, h.__s, U) === !1 || e.__v == n.__v) {
|
|
125
125
|
for (e.__v != n.__v && (h.props = v, h.state = h.__s, h.__d = !1), e.__e = n.__e, e.__k = n.__k, e.__k.some(function(_e) {
|
|
126
126
|
_e && (_e.__ = e);
|
|
127
127
|
}), H = 0; H < h._sb.length; H++) h.__h.push(h._sb[H]);
|
|
128
128
|
h._sb = [], h.__h.length && s.push(h);
|
|
129
129
|
break e;
|
|
130
130
|
}
|
|
131
|
-
h.componentWillUpdate != null && h.componentWillUpdate(v, h.__s,
|
|
131
|
+
h.componentWillUpdate != null && h.componentWillUpdate(v, h.__s, U), y && h.componentDidUpdate != null && h.__h.push(function() {
|
|
132
132
|
h.componentDidUpdate(p, g, m);
|
|
133
133
|
});
|
|
134
134
|
}
|
|
135
|
-
if (h.context =
|
|
135
|
+
if (h.context = U, h.props = v, h.__P = t, h.__e = !1, B = b.__r, Fn = 0, y) {
|
|
136
136
|
for (h.state = h.__s, h.__d = !1, B && B(e), d = h.render(h.props, h.state, h.context), ct = 0; ct < h._sb.length; ct++) h.__h.push(h._sb[ct]);
|
|
137
137
|
h._sb = [];
|
|
138
138
|
} else do
|
|
139
139
|
h.__d = !1, B && B(e), d = h.render(h.props, h.state, h.context), h.state = h.__s;
|
|
140
|
-
while (h.__d && ++
|
|
141
|
-
h.state = h.__s, h.getChildContext != null && (r = te(te({}, r), h.getChildContext())), y && !f && h.getSnapshotBeforeUpdate != null && (m = h.getSnapshotBeforeUpdate(p, g)),
|
|
140
|
+
while (h.__d && ++Fn < 25);
|
|
141
|
+
h.state = h.__s, h.getChildContext != null && (r = te(te({}, r), h.getChildContext())), y && !f && h.getSnapshotBeforeUpdate != null && (m = h.getSnapshotBeforeUpdate(p, g)), ze = d, d != null && d.type === F && d.key == null && (ze = ei(d.props.children)), l = Zr(t, ot(ze) ? ze : [ze], e, n, r, i, o, s, l, a, u), h.base = e.__e, e.__u &= -161, h.__h.length && s.push(h), x && (h.__E = h.__ = null);
|
|
142
142
|
} catch (_e) {
|
|
143
143
|
if (e.__v = null, a || o != null) if (_e.then) {
|
|
144
144
|
for (e.__u |= a ? 160 : 128; l && l.nodeType == 8 && l.nextSibling; ) l = l.nextSibling;
|
|
145
145
|
o[o.indexOf(l)] = null, e.__e = l;
|
|
146
146
|
} else {
|
|
147
|
-
for (
|
|
148
|
-
|
|
147
|
+
for (Ot = o.length; Ot--; ) yn(o[Ot]);
|
|
148
|
+
Xt(e);
|
|
149
149
|
}
|
|
150
|
-
else e.__e = n.__e, e.__k = n.__k, _e.then ||
|
|
150
|
+
else e.__e = n.__e, e.__k = n.__k, _e.then || Xt(e);
|
|
151
151
|
b.__e(_e, e, n);
|
|
152
152
|
}
|
|
153
|
-
else o == null && e.__v == n.__v ? (e.__k = n.__k, e.__e = n.__e) : l = e.__e =
|
|
153
|
+
else o == null && e.__v == n.__v ? (e.__k = n.__k, e.__e = n.__e) : l = e.__e = yo(n.__e, e, n, r, i, o, s, a, u);
|
|
154
154
|
return (d = b.diffed) && d(e), 128 & e.__u ? void 0 : l;
|
|
155
155
|
}
|
|
156
|
-
function
|
|
157
|
-
t && t.__c && (t.__c.__e = !0), t && t.__k && t.__k.forEach(
|
|
156
|
+
function Xt(t) {
|
|
157
|
+
t && t.__c && (t.__c.__e = !0), t && t.__k && t.__k.forEach(Xt);
|
|
158
158
|
}
|
|
159
|
-
function
|
|
160
|
-
for (var r = 0; r < n.length; r++)
|
|
159
|
+
function Xr(t, e, n) {
|
|
160
|
+
for (var r = 0; r < n.length; r++) _n(n[r], n[++r], n[++r]);
|
|
161
161
|
b.__c && b.__c(e, t), t.some(function(i) {
|
|
162
162
|
try {
|
|
163
163
|
t = i.__h, i.__h = [], t.some(function(o) {
|
|
@@ -168,10 +168,10 @@ function Jr(t, e, n) {
|
|
|
168
168
|
}
|
|
169
169
|
});
|
|
170
170
|
}
|
|
171
|
-
function
|
|
172
|
-
return typeof t != "object" || t == null || t.__b && t.__b > 0 ? t : ot(t) ? t.map(
|
|
171
|
+
function ei(t) {
|
|
172
|
+
return typeof t != "object" || t == null || t.__b && t.__b > 0 ? t : ot(t) ? t.map(ei) : te({}, t);
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function yo(t, e, n, r, i, o, s, l, a) {
|
|
175
175
|
var u, d, h, f, p, g, m, x = n.props, v = e.props, y = e.type;
|
|
176
176
|
if (y == "svg" ? i = "http://www.w3.org/2000/svg" : y == "math" ? i = "http://www.w3.org/1998/Math/MathML" : i || (i = "http://www.w3.org/1999/xhtml"), o != null) {
|
|
177
177
|
for (u = 0; u < o.length; u++) if ((p = o[u]) && "setAttribute" in p == !!y && (y ? p.localName == y : p.nodeType == 3)) {
|
|
@@ -195,12 +195,12 @@ function po(t, e, n, r, i, o, s, l, a) {
|
|
|
195
195
|
}
|
|
196
196
|
for (u in v) p = v[u], u == "children" ? f = p : u == "dangerouslySetInnerHTML" ? d = p : u == "value" ? g = p : u == "checked" ? m = p : l && typeof p != "function" || x[u] === p || ut(t, u, p, x[u], i);
|
|
197
197
|
if (d) l || h && (d.__html == h.__html || d.__html == t.innerHTML) || (t.innerHTML = d.__html), e.__k = [];
|
|
198
|
-
else if (h && (t.innerHTML = ""),
|
|
198
|
+
else if (h && (t.innerHTML = ""), Zr(e.type == "template" ? t.content : t, ot(f) ? f : [f], e, n, r, y == "foreignObject" ? "http://www.w3.org/1999/xhtml" : i, o, s, o ? o[0] : n.__k && Ae(n, 0), l, a), o != null) for (u = o.length; u--; ) yn(o[u]);
|
|
199
199
|
l || (u = "value", y == "progress" && g == null ? t.removeAttribute("value") : g != null && (g !== t[u] || y == "progress" && !g || y == "option" && g != x[u]) && ut(t, u, g, x[u], i), u = "checked", m != null && m != t[u] && ut(t, u, m, x[u], i));
|
|
200
200
|
}
|
|
201
201
|
return t;
|
|
202
202
|
}
|
|
203
|
-
function
|
|
203
|
+
function _n(t, e, n) {
|
|
204
204
|
try {
|
|
205
205
|
if (typeof t == "function") {
|
|
206
206
|
var r = typeof t.__u == "function";
|
|
@@ -210,9 +210,9 @@ function bn(t, e, n) {
|
|
|
210
210
|
b.__e(i, n);
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
|
-
function
|
|
213
|
+
function ti(t, e, n) {
|
|
214
214
|
var r, i;
|
|
215
|
-
if (b.unmount && b.unmount(t), (r = t.ref) && (r.current && r.current != t.__e ||
|
|
215
|
+
if (b.unmount && b.unmount(t), (r = t.ref) && (r.current && r.current != t.__e || _n(r, null, e)), (r = t.__c) != null) {
|
|
216
216
|
if (r.componentWillUnmount) try {
|
|
217
217
|
r.componentWillUnmount();
|
|
218
218
|
} catch (o) {
|
|
@@ -220,25 +220,25 @@ function Gr(t, e, n) {
|
|
|
220
220
|
}
|
|
221
221
|
r.base = r.__P = null;
|
|
222
222
|
}
|
|
223
|
-
if (r = t.__k) for (i = 0; i < r.length; i++) r[i] &&
|
|
224
|
-
n ||
|
|
223
|
+
if (r = t.__k) for (i = 0; i < r.length; i++) r[i] && ti(r[i], e, n || typeof t.type != "function");
|
|
224
|
+
n || yn(t.__e), t.__c = t.__ = t.__e = void 0;
|
|
225
225
|
}
|
|
226
|
-
function
|
|
226
|
+
function vo(t, e, n) {
|
|
227
227
|
return this.constructor(t, n);
|
|
228
228
|
}
|
|
229
229
|
function ge(t, e, n) {
|
|
230
230
|
var r, i, o, s;
|
|
231
|
-
e == document && (e = document.documentElement), b.__ && b.__(t, e), i = (r = typeof n == "function") ? null : n && n.__k || e.__k, o = [], s = [],
|
|
231
|
+
e == document && (e = document.documentElement), b.__ && b.__(t, e), i = (r = typeof n == "function") ? null : n && n.__k || e.__k, o = [], s = [], vn(e, t = (!r && n || e).__k = V(F, null, [t]), i || Ze, Ze, e.namespaceURI, !r && n ? [n] : i ? null : e.firstChild ? it.call(e.childNodes) : null, o, !r && n ? n : i ? i.__e : e.firstChild, r, s), Xr(o, t, s);
|
|
232
232
|
}
|
|
233
|
-
function
|
|
234
|
-
ge(t, e,
|
|
233
|
+
function ni(t, e) {
|
|
234
|
+
ge(t, e, ni);
|
|
235
235
|
}
|
|
236
|
-
function
|
|
236
|
+
function _o(t, e, n) {
|
|
237
237
|
var r, i, o, s, l = te({}, t.props);
|
|
238
238
|
for (o in t.type && t.type.defaultProps && (s = t.type.defaultProps), e) o == "key" ? r = e[o] : o == "ref" ? i = e[o] : l[o] = e[o] === void 0 && s != null ? s[o] : e[o];
|
|
239
239
|
return arguments.length > 2 && (l.children = arguments.length > 3 ? it.call(arguments, 2) : n), He(t.type, l, r || t.key, i || t.ref, null);
|
|
240
240
|
}
|
|
241
|
-
function
|
|
241
|
+
function wo(t) {
|
|
242
242
|
function e(n) {
|
|
243
243
|
var r, i;
|
|
244
244
|
return this.getChildContext || (r = /* @__PURE__ */ new Set(), (i = {})[e.__c] = this, this.getChildContext = function() {
|
|
@@ -247,7 +247,7 @@ function xo(t) {
|
|
|
247
247
|
r = null;
|
|
248
248
|
}, this.shouldComponentUpdate = function(o) {
|
|
249
249
|
this.props.value != o.value && r.forEach(function(s) {
|
|
250
|
-
s.__e = !0,
|
|
250
|
+
s.__e = !0, Yt(s);
|
|
251
251
|
});
|
|
252
252
|
}, this.sub = function(o) {
|
|
253
253
|
r.add(o);
|
|
@@ -257,51 +257,51 @@ function xo(t) {
|
|
|
257
257
|
};
|
|
258
258
|
}), n.children;
|
|
259
259
|
}
|
|
260
|
-
return e.__c = "__cC" +
|
|
260
|
+
return e.__c = "__cC" + Jr++, e.__ = t, e.Provider = e.__l = (e.Consumer = function(n, r) {
|
|
261
261
|
return n.children(r);
|
|
262
262
|
}).contextType = e, e;
|
|
263
263
|
}
|
|
264
|
-
it =
|
|
264
|
+
it = Gr.slice, b = { __e: function(t, e, n, r) {
|
|
265
265
|
for (var i, o, s; e = e.__; ) if ((i = e.__c) && !i.__) try {
|
|
266
266
|
if ((o = i.constructor) && o.getDerivedStateFromError != null && (i.setState(o.getDerivedStateFromError(t)), s = i.__d), i.componentDidCatch != null && (i.componentDidCatch(t, r || {}), s = i.__d), s) return i.__E = i;
|
|
267
267
|
} catch (l) {
|
|
268
268
|
t = l;
|
|
269
269
|
}
|
|
270
270
|
throw t;
|
|
271
|
-
} },
|
|
271
|
+
} }, Qr = 0, Dr = function(t) {
|
|
272
272
|
return t != null && t.constructor == null;
|
|
273
|
-
},
|
|
273
|
+
}, G.prototype.setState = function(t, e) {
|
|
274
274
|
var n;
|
|
275
|
-
n = this.__s != null && this.__s != this.state ? this.__s : this.__s = te({}, this.state), typeof t == "function" && (t = t(te({}, n), this.props)), t && te(n, t), t != null && this.__v && (e && this._sb.push(e),
|
|
276
|
-
},
|
|
277
|
-
this.__v && (this.__e = !0, t && this.__h.push(t),
|
|
278
|
-
},
|
|
275
|
+
n = this.__s != null && this.__s != this.state ? this.__s : this.__s = te({}, this.state), typeof t == "function" && (t = t(te({}, n), this.props)), t && te(n, t), t != null && this.__v && (e && this._sb.push(e), Yt(this));
|
|
276
|
+
}, G.prototype.forceUpdate = function(t) {
|
|
277
|
+
this.__v && (this.__e = !0, t && this.__h.push(t), Yt(this));
|
|
278
|
+
}, G.prototype.render = F, he = [], Vr = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Hr = function(t, e) {
|
|
279
279
|
return t.__v.__b - e.__v.__b;
|
|
280
|
-
}, bt.__r = 0,
|
|
281
|
-
var
|
|
280
|
+
}, bt.__r = 0, Wr = /(PointerCapture)$|Capture$/i, bn = 0, Kt = Dn(!1), Zt = Dn(!0), Jr = 0;
|
|
281
|
+
var ko = 0;
|
|
282
282
|
function c(t, e, n, r, i, o) {
|
|
283
283
|
e || (e = {});
|
|
284
284
|
var s, l, a = e;
|
|
285
285
|
if ("ref" in a) for (l in a = {}, e) l == "ref" ? s = e[l] : a[l] = e[l];
|
|
286
|
-
var u = { type: t, props: a, key: n, ref: s, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --
|
|
286
|
+
var u = { type: t, props: a, key: n, ref: s, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --ko, __i: -1, __u: 0, __source: i, __self: o };
|
|
287
287
|
if (typeof t == "function" && (s = t.defaultProps)) for (l in s) a[l] === void 0 && (a[l] = s[l]);
|
|
288
288
|
return b.vnode && b.vnode(u), u;
|
|
289
289
|
}
|
|
290
|
-
var ce,
|
|
291
|
-
function
|
|
292
|
-
|
|
293
|
-
var n =
|
|
290
|
+
var ce, S, Nt, Vn, $e = 0, ri = [], j = b, Hn = j.__b, Wn = j.__r, Jn = j.diffed, Gn = j.__c, Kn = j.unmount, Zn = j.__;
|
|
291
|
+
function Le(t, e) {
|
|
292
|
+
j.__h && j.__h(S, t, $e || e), $e = 0;
|
|
293
|
+
var n = S.__H || (S.__H = { __: [], __h: [] });
|
|
294
294
|
return t >= n.__.length && n.__.push({}), n.__[t];
|
|
295
295
|
}
|
|
296
296
|
function C(t) {
|
|
297
|
-
return
|
|
297
|
+
return $e = 1, wn(ai, t);
|
|
298
298
|
}
|
|
299
|
-
function
|
|
300
|
-
var r =
|
|
301
|
-
if (r.t = t, !r.__c && (r.__ = [n ? n(e) :
|
|
299
|
+
function wn(t, e, n) {
|
|
300
|
+
var r = Le(ce++, 2);
|
|
301
|
+
if (r.t = t, !r.__c && (r.__ = [n ? n(e) : ai(void 0, e), function(l) {
|
|
302
302
|
var a = r.__N ? r.__N[0] : r.__[0], u = r.t(a, l);
|
|
303
303
|
a !== u && (r.__N = [u, r.__[1]], r.__c.setState({}));
|
|
304
|
-
}], r.__c =
|
|
304
|
+
}], r.__c = S, !S.__f)) {
|
|
305
305
|
var i = function(l, a, u) {
|
|
306
306
|
if (!r.__c.__H) return !0;
|
|
307
307
|
var d = r.__c.__H.__.filter(function(f) {
|
|
@@ -318,33 +318,33 @@ function yn(t, e, n) {
|
|
|
318
318
|
}
|
|
319
319
|
}), o && o.call(this, l, a, u) || h;
|
|
320
320
|
};
|
|
321
|
-
|
|
322
|
-
var o =
|
|
323
|
-
|
|
321
|
+
S.__f = !0;
|
|
322
|
+
var o = S.shouldComponentUpdate, s = S.componentWillUpdate;
|
|
323
|
+
S.componentWillUpdate = function(l, a, u) {
|
|
324
324
|
if (this.__e) {
|
|
325
325
|
var d = o;
|
|
326
326
|
o = void 0, i(l, a, u), o = d;
|
|
327
327
|
}
|
|
328
328
|
s && s.call(this, l, a, u);
|
|
329
|
-
},
|
|
329
|
+
}, S.shouldComponentUpdate = i;
|
|
330
330
|
}
|
|
331
331
|
return r.__N || r.__;
|
|
332
332
|
}
|
|
333
333
|
function T(t, e) {
|
|
334
|
-
var n =
|
|
335
|
-
!
|
|
334
|
+
var n = Le(ce++, 3);
|
|
335
|
+
!j.__s && kn(n.__H, e) && (n.__ = t, n.u = e, S.__H.__h.push(n));
|
|
336
336
|
}
|
|
337
337
|
function st(t, e) {
|
|
338
|
-
var n =
|
|
339
|
-
!
|
|
338
|
+
var n = Le(ce++, 4);
|
|
339
|
+
!j.__s && kn(n.__H, e) && (n.__ = t, n.u = e, S.__h.push(n));
|
|
340
340
|
}
|
|
341
341
|
function ue(t) {
|
|
342
|
-
return
|
|
342
|
+
return $e = 5, K(function() {
|
|
343
343
|
return { current: t };
|
|
344
344
|
}, []);
|
|
345
345
|
}
|
|
346
|
-
function
|
|
347
|
-
|
|
346
|
+
function ii(t, e, n) {
|
|
347
|
+
$e = 6, st(function() {
|
|
348
348
|
if (typeof t == "function") {
|
|
349
349
|
var r = t(e());
|
|
350
350
|
return function() {
|
|
@@ -356,68 +356,68 @@ function Xr(t, e, n) {
|
|
|
356
356
|
};
|
|
357
357
|
}, n == null ? n : n.concat(t));
|
|
358
358
|
}
|
|
359
|
-
function
|
|
360
|
-
var n =
|
|
361
|
-
return
|
|
359
|
+
function K(t, e) {
|
|
360
|
+
var n = Le(ce++, 7);
|
|
361
|
+
return kn(n.__H, e) && (n.__ = t(), n.__H = e, n.__h = t), n.__;
|
|
362
362
|
}
|
|
363
|
-
function
|
|
364
|
-
return
|
|
363
|
+
function Re(t, e) {
|
|
364
|
+
return $e = 8, K(function() {
|
|
365
365
|
return t;
|
|
366
366
|
}, e);
|
|
367
367
|
}
|
|
368
|
-
function
|
|
369
|
-
var e =
|
|
370
|
-
return n.c = t, e ? (n.__ == null && (n.__ = !0, e.sub(
|
|
368
|
+
function $t(t) {
|
|
369
|
+
var e = S.context[t.__c], n = Le(ce++, 9);
|
|
370
|
+
return n.c = t, e ? (n.__ == null && (n.__ = !0, e.sub(S)), e.props.value) : t.__;
|
|
371
371
|
}
|
|
372
|
-
function
|
|
373
|
-
|
|
372
|
+
function oi(t, e) {
|
|
373
|
+
j.useDebugValue && j.useDebugValue(e ? e(t) : t);
|
|
374
374
|
}
|
|
375
|
-
function
|
|
376
|
-
var t =
|
|
375
|
+
function si() {
|
|
376
|
+
var t = Le(ce++, 11);
|
|
377
377
|
if (!t.__) {
|
|
378
|
-
for (var e =
|
|
378
|
+
for (var e = S.__v; e !== null && !e.__m && e.__ !== null; ) e = e.__;
|
|
379
379
|
var n = e.__m || (e.__m = [0, 0]);
|
|
380
380
|
t.__ = "P" + n[0] + "-" + n[1]++;
|
|
381
381
|
}
|
|
382
382
|
return t.__;
|
|
383
383
|
}
|
|
384
|
-
function
|
|
385
|
-
for (var t; t =
|
|
386
|
-
t.__H.__h.forEach(gt), t.__H.__h.forEach(
|
|
384
|
+
function So() {
|
|
385
|
+
for (var t; t = ri.shift(); ) if (t.__P && t.__H) try {
|
|
386
|
+
t.__H.__h.forEach(gt), t.__H.__h.forEach(en), t.__H.__h = [];
|
|
387
387
|
} catch (e) {
|
|
388
|
-
t.__H.__h = [],
|
|
388
|
+
t.__H.__h = [], j.__e(e, t.__v);
|
|
389
389
|
}
|
|
390
390
|
}
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
},
|
|
394
|
-
t && e.__k && e.__k.__m && (t.__m = e.__k.__m),
|
|
395
|
-
},
|
|
396
|
-
|
|
397
|
-
var e = (
|
|
398
|
-
e && (
|
|
391
|
+
j.__b = function(t) {
|
|
392
|
+
S = null, Hn && Hn(t);
|
|
393
|
+
}, j.__ = function(t, e) {
|
|
394
|
+
t && e.__k && e.__k.__m && (t.__m = e.__k.__m), Zn && Zn(t, e);
|
|
395
|
+
}, j.__r = function(t) {
|
|
396
|
+
Wn && Wn(t), ce = 0;
|
|
397
|
+
var e = (S = t.__c).__H;
|
|
398
|
+
e && (Nt === S ? (e.__h = [], S.__h = [], e.__.forEach(function(n) {
|
|
399
399
|
n.__N && (n.__ = n.__N), n.u = n.__N = void 0;
|
|
400
|
-
})) : (e.__h.forEach(gt), e.__h.forEach(
|
|
401
|
-
},
|
|
402
|
-
|
|
400
|
+
})) : (e.__h.forEach(gt), e.__h.forEach(en), e.__h = [], ce = 0)), Nt = S;
|
|
401
|
+
}, j.diffed = function(t) {
|
|
402
|
+
Jn && Jn(t);
|
|
403
403
|
var e = t.__c;
|
|
404
|
-
e && e.__H && (e.__H.__h.length && (
|
|
404
|
+
e && e.__H && (e.__H.__h.length && (ri.push(e) !== 1 && Vn === j.requestAnimationFrame || ((Vn = j.requestAnimationFrame) || jo)(So)), e.__H.__.forEach(function(n) {
|
|
405
405
|
n.u && (n.__H = n.u), n.u = void 0;
|
|
406
|
-
})),
|
|
407
|
-
},
|
|
406
|
+
})), Nt = S = null;
|
|
407
|
+
}, j.__c = function(t, e) {
|
|
408
408
|
e.some(function(n) {
|
|
409
409
|
try {
|
|
410
410
|
n.__h.forEach(gt), n.__h = n.__h.filter(function(r) {
|
|
411
|
-
return !r.__ ||
|
|
411
|
+
return !r.__ || en(r);
|
|
412
412
|
});
|
|
413
413
|
} catch (r) {
|
|
414
414
|
e.some(function(i) {
|
|
415
415
|
i.__h && (i.__h = []);
|
|
416
|
-
}), e = [],
|
|
416
|
+
}), e = [], j.__e(r, n.__v);
|
|
417
417
|
}
|
|
418
|
-
}),
|
|
419
|
-
},
|
|
420
|
-
|
|
418
|
+
}), Gn && Gn(t, e);
|
|
419
|
+
}, j.unmount = function(t) {
|
|
420
|
+
Kn && Kn(t);
|
|
421
421
|
var e, n = t.__c;
|
|
422
422
|
n && n.__H && (n.__H.__.forEach(function(r) {
|
|
423
423
|
try {
|
|
@@ -425,51 +425,51 @@ S.__b = function(t) {
|
|
|
425
425
|
} catch (i) {
|
|
426
426
|
e = i;
|
|
427
427
|
}
|
|
428
|
-
}), n.__H = void 0, e &&
|
|
428
|
+
}), n.__H = void 0, e && j.__e(e, n.__v));
|
|
429
429
|
};
|
|
430
|
-
var
|
|
431
|
-
function
|
|
430
|
+
var Yn = typeof requestAnimationFrame == "function";
|
|
431
|
+
function jo(t) {
|
|
432
432
|
var e, n = function() {
|
|
433
|
-
clearTimeout(r),
|
|
433
|
+
clearTimeout(r), Yn && cancelAnimationFrame(e), setTimeout(t);
|
|
434
434
|
}, r = setTimeout(n, 35);
|
|
435
|
-
|
|
435
|
+
Yn && (e = requestAnimationFrame(n));
|
|
436
436
|
}
|
|
437
437
|
function gt(t) {
|
|
438
|
-
var e =
|
|
439
|
-
typeof n == "function" && (t.__c = void 0, n()),
|
|
438
|
+
var e = S, n = t.__c;
|
|
439
|
+
typeof n == "function" && (t.__c = void 0, n()), S = e;
|
|
440
440
|
}
|
|
441
|
-
function
|
|
442
|
-
var e =
|
|
443
|
-
t.__c = t.__(),
|
|
441
|
+
function en(t) {
|
|
442
|
+
var e = S;
|
|
443
|
+
t.__c = t.__(), S = e;
|
|
444
444
|
}
|
|
445
|
-
function
|
|
445
|
+
function kn(t, e) {
|
|
446
446
|
return !t || t.length !== e.length || e.some(function(n, r) {
|
|
447
447
|
return n !== t[r];
|
|
448
448
|
});
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function ai(t, e) {
|
|
451
451
|
return typeof e == "function" ? e(t) : e;
|
|
452
452
|
}
|
|
453
|
-
function
|
|
453
|
+
function li(t, e) {
|
|
454
454
|
for (var n in e) t[n] = e[n];
|
|
455
455
|
return t;
|
|
456
456
|
}
|
|
457
|
-
function
|
|
457
|
+
function tn(t, e) {
|
|
458
458
|
for (var n in t) if (n !== "__source" && !(n in e)) return !0;
|
|
459
459
|
for (var r in e) if (r !== "__source" && t[r] !== e[r]) return !0;
|
|
460
460
|
return !1;
|
|
461
461
|
}
|
|
462
|
-
function
|
|
462
|
+
function ci(t, e) {
|
|
463
463
|
var n = e(), r = C({ t: { __: n, u: e } }), i = r[0].t, o = r[1];
|
|
464
464
|
return st(function() {
|
|
465
|
-
i.__ = n, i.u = e,
|
|
465
|
+
i.__ = n, i.u = e, zt(i) && o({ t: i });
|
|
466
466
|
}, [t, n, e]), T(function() {
|
|
467
|
-
return
|
|
468
|
-
|
|
467
|
+
return zt(i) && o({ t: i }), t(function() {
|
|
468
|
+
zt(i) && o({ t: i });
|
|
469
469
|
});
|
|
470
470
|
}, [t]), n;
|
|
471
471
|
}
|
|
472
|
-
function
|
|
472
|
+
function zt(t) {
|
|
473
473
|
var e, n, r = t.u, i = t.__;
|
|
474
474
|
try {
|
|
475
475
|
var o = r();
|
|
@@ -478,80 +478,80 @@ function Nt(t) {
|
|
|
478
478
|
return !0;
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
|
-
function
|
|
481
|
+
function ui(t) {
|
|
482
482
|
t();
|
|
483
483
|
}
|
|
484
|
-
function
|
|
484
|
+
function hi(t) {
|
|
485
485
|
return t;
|
|
486
486
|
}
|
|
487
|
-
function
|
|
488
|
-
return [!1,
|
|
487
|
+
function di() {
|
|
488
|
+
return [!1, ui];
|
|
489
489
|
}
|
|
490
|
-
var
|
|
491
|
-
function
|
|
490
|
+
var fi = st;
|
|
491
|
+
function nn(t, e) {
|
|
492
492
|
this.props = t, this.context = e;
|
|
493
493
|
}
|
|
494
|
-
function
|
|
494
|
+
function Co(t, e) {
|
|
495
495
|
function n(i) {
|
|
496
496
|
var o = this.props.ref, s = o == i.ref;
|
|
497
|
-
return !s && o && (o.call ? o(null) : o.current = null), e ? !e(this.props, i) || !s :
|
|
497
|
+
return !s && o && (o.call ? o(null) : o.current = null), e ? !e(this.props, i) || !s : tn(this.props, i);
|
|
498
498
|
}
|
|
499
499
|
function r(i) {
|
|
500
500
|
return this.shouldComponentUpdate = n, V(t, i);
|
|
501
501
|
}
|
|
502
502
|
return r.displayName = "Memo(" + (t.displayName || t.name) + ")", r.prototype.isReactComponent = !0, r.__f = !0, r.type = t, r;
|
|
503
503
|
}
|
|
504
|
-
(
|
|
505
|
-
return
|
|
504
|
+
(nn.prototype = new G()).isPureReactComponent = !0, nn.prototype.shouldComponentUpdate = function(t, e) {
|
|
505
|
+
return tn(this.props, t) || tn(this.state, e);
|
|
506
506
|
};
|
|
507
|
-
var
|
|
507
|
+
var Xn = b.__b;
|
|
508
508
|
b.__b = function(t) {
|
|
509
|
-
t.type && t.type.__f && t.ref && (t.props.ref = t.ref, t.ref = null),
|
|
509
|
+
t.type && t.type.__f && t.ref && (t.props.ref = t.ref, t.ref = null), Xn && Xn(t);
|
|
510
510
|
};
|
|
511
|
-
var
|
|
512
|
-
function
|
|
511
|
+
var To = typeof Symbol < "u" && Symbol.for && /* @__PURE__ */ Symbol.for("react.forward_ref") || 3911;
|
|
512
|
+
function Ro(t) {
|
|
513
513
|
function e(n) {
|
|
514
|
-
var r =
|
|
514
|
+
var r = li({}, n);
|
|
515
515
|
return delete r.ref, t(r, n.ref || null);
|
|
516
516
|
}
|
|
517
|
-
return e.$$typeof =
|
|
517
|
+
return e.$$typeof = To, e.render = t, e.prototype.isReactComponent = e.__f = !0, e.displayName = "ForwardRef(" + (t.displayName || t.name) + ")", e;
|
|
518
518
|
}
|
|
519
|
-
var
|
|
519
|
+
var er = function(t, e) {
|
|
520
520
|
return t == null ? null : ne(ne(t).map(e));
|
|
521
|
-
},
|
|
521
|
+
}, Ao = { map: er, forEach: er, count: function(t) {
|
|
522
522
|
return t ? ne(t).length : 0;
|
|
523
523
|
}, only: function(t) {
|
|
524
524
|
var e = ne(t);
|
|
525
525
|
if (e.length !== 1) throw "Children.only";
|
|
526
526
|
return e[0];
|
|
527
|
-
}, toArray: ne },
|
|
527
|
+
}, toArray: ne }, $o = b.__e;
|
|
528
528
|
b.__e = function(t, e, n, r) {
|
|
529
529
|
if (t.then) {
|
|
530
530
|
for (var i, o = e; o = o.__; ) if ((i = o.__c) && i.__c) return e.__e == null && (e.__e = n.__e, e.__k = n.__k), i.__c(t, e);
|
|
531
531
|
}
|
|
532
|
-
|
|
532
|
+
$o(t, e, n, r);
|
|
533
533
|
};
|
|
534
|
-
var
|
|
535
|
-
function
|
|
534
|
+
var tr = b.unmount;
|
|
535
|
+
function pi(t, e, n) {
|
|
536
536
|
return t && (t.__c && t.__c.__H && (t.__c.__H.__.forEach(function(r) {
|
|
537
537
|
typeof r.__c == "function" && r.__c();
|
|
538
|
-
}), t.__c.__H = null), (t =
|
|
539
|
-
return
|
|
538
|
+
}), t.__c.__H = null), (t = li({}, t)).__c != null && (t.__c.__P === n && (t.__c.__P = e), t.__c.__e = !0, t.__c = null), t.__k = t.__k && t.__k.map(function(r) {
|
|
539
|
+
return pi(r, e, n);
|
|
540
540
|
})), t;
|
|
541
541
|
}
|
|
542
|
-
function
|
|
542
|
+
function gi(t, e, n) {
|
|
543
543
|
return t && n && (t.__v = null, t.__k = t.__k && t.__k.map(function(r) {
|
|
544
|
-
return
|
|
544
|
+
return gi(r, e, n);
|
|
545
545
|
}), t.__c && t.__c.__P === e && (t.__e && n.appendChild(t.__e), t.__c.__e = !0, t.__c.__P = n)), t;
|
|
546
546
|
}
|
|
547
547
|
function mt() {
|
|
548
548
|
this.__u = 0, this.o = null, this.__b = null;
|
|
549
549
|
}
|
|
550
|
-
function
|
|
550
|
+
function mi(t) {
|
|
551
551
|
var e = t.__.__c;
|
|
552
552
|
return e && e.__a && e.__a(t);
|
|
553
553
|
}
|
|
554
|
-
function
|
|
554
|
+
function Eo(t) {
|
|
555
555
|
var e, n, r;
|
|
556
556
|
function i(o) {
|
|
557
557
|
if (e || (e = t()).then(function(s) {
|
|
@@ -569,11 +569,11 @@ function Qe() {
|
|
|
569
569
|
}
|
|
570
570
|
b.unmount = function(t) {
|
|
571
571
|
var e = t.__c;
|
|
572
|
-
e && e.__R && e.__R(), e && 32 & t.__u && (t.type = null),
|
|
573
|
-
}, (mt.prototype = new
|
|
572
|
+
e && e.__R && e.__R(), e && 32 & t.__u && (t.type = null), tr && tr(t);
|
|
573
|
+
}, (mt.prototype = new G()).__c = function(t, e) {
|
|
574
574
|
var n = e.__c, r = this;
|
|
575
575
|
r.o == null && (r.o = []), r.o.push(n);
|
|
576
|
-
var i =
|
|
576
|
+
var i = mi(r.__v), o = !1, s = function() {
|
|
577
577
|
o || (o = !0, n.__R = null, i ? i(l) : l());
|
|
578
578
|
};
|
|
579
579
|
n.__R = s;
|
|
@@ -581,7 +581,7 @@ b.unmount = function(t) {
|
|
|
581
581
|
if (!--r.__u) {
|
|
582
582
|
if (r.state.__a) {
|
|
583
583
|
var a = r.state.__a;
|
|
584
|
-
r.__v.__k[0] =
|
|
584
|
+
r.__v.__k[0] = gi(a, a.__c.__P, a.__c.__O);
|
|
585
585
|
}
|
|
586
586
|
var u;
|
|
587
587
|
for (r.setState({ __a: r.__b = null }); u = r.o.pop(); ) u.forceUpdate();
|
|
@@ -594,26 +594,26 @@ b.unmount = function(t) {
|
|
|
594
594
|
if (this.__b) {
|
|
595
595
|
if (this.__v.__k) {
|
|
596
596
|
var n = document.createElement("div"), r = this.__v.__k[0].__c;
|
|
597
|
-
this.__v.__k[0] =
|
|
597
|
+
this.__v.__k[0] = pi(this.__b, n, r.__O = r.__P);
|
|
598
598
|
}
|
|
599
599
|
this.__b = null;
|
|
600
600
|
}
|
|
601
601
|
var i = e.__a && V(F, null, t.fallback);
|
|
602
602
|
return i && (i.__u &= -33), [V(F, null, e.__a ? null : t.children), i];
|
|
603
603
|
};
|
|
604
|
-
var
|
|
604
|
+
var nr = function(t, e, n) {
|
|
605
605
|
if (++n[1] === n[0] && t.l.delete(e), t.props.revealOrder && (t.props.revealOrder[0] !== "t" || !t.l.size)) for (n = t.i; n; ) {
|
|
606
606
|
for (; n.length > 3; ) n.pop()();
|
|
607
607
|
if (n[1] < n[0]) break;
|
|
608
608
|
t.i = n = n[2];
|
|
609
609
|
}
|
|
610
610
|
};
|
|
611
|
-
function
|
|
611
|
+
function Io(t) {
|
|
612
612
|
return this.getChildContext = function() {
|
|
613
613
|
return t.context;
|
|
614
614
|
}, t.children;
|
|
615
615
|
}
|
|
616
|
-
function
|
|
616
|
+
function Po(t) {
|
|
617
617
|
var e = this, n = t.h;
|
|
618
618
|
if (e.componentWillUnmount = function() {
|
|
619
619
|
ge(null, e.v), e.v = null, e.h = null;
|
|
@@ -627,17 +627,17 @@ function Ro(t) {
|
|
|
627
627
|
this.childNodes.splice(this.childNodes.indexOf(i) >>> 1, 1), e.h.removeChild(i);
|
|
628
628
|
} };
|
|
629
629
|
}
|
|
630
|
-
ge(V(
|
|
630
|
+
ge(V(Io, { context: e.context }, t.__v), e.v);
|
|
631
631
|
}
|
|
632
|
-
function
|
|
633
|
-
var n = V(
|
|
632
|
+
function Mo(t, e) {
|
|
633
|
+
var n = V(Po, { __v: t, h: e });
|
|
634
634
|
return n.containerInfo = e, n;
|
|
635
635
|
}
|
|
636
|
-
(Qe.prototype = new
|
|
637
|
-
var e = this, n =
|
|
636
|
+
(Qe.prototype = new G()).__a = function(t) {
|
|
637
|
+
var e = this, n = mi(e.__v), r = e.l.get(t);
|
|
638
638
|
return r[0]++, function(i) {
|
|
639
639
|
var o = function() {
|
|
640
|
-
e.props.revealOrder ? (r.push(i),
|
|
640
|
+
e.props.revealOrder ? (r.push(i), nr(e, t, r)) : i();
|
|
641
641
|
};
|
|
642
642
|
n ? n(o) : o();
|
|
643
643
|
};
|
|
@@ -650,101 +650,101 @@ function Ao(t, e) {
|
|
|
650
650
|
}, Qe.prototype.componentDidUpdate = Qe.prototype.componentDidMount = function() {
|
|
651
651
|
var t = this;
|
|
652
652
|
this.l.forEach(function(e, n) {
|
|
653
|
-
|
|
653
|
+
nr(t, n, e);
|
|
654
654
|
});
|
|
655
655
|
};
|
|
656
|
-
var
|
|
656
|
+
var xi = typeof Symbol < "u" && Symbol.for && /* @__PURE__ */ Symbol.for("react.element") || 60103, Lo = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, qo = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, Oo = /[A-Z0-9]/g, No = typeof document < "u", zo = function(t) {
|
|
657
657
|
return (typeof Symbol < "u" && typeof /* @__PURE__ */ Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(t);
|
|
658
658
|
};
|
|
659
|
-
function
|
|
659
|
+
function Bo(t, e, n) {
|
|
660
660
|
return e.__k == null && (e.textContent = ""), ge(t, e), typeof n == "function" && n(), t ? t.__c : null;
|
|
661
661
|
}
|
|
662
|
-
function
|
|
663
|
-
return
|
|
662
|
+
function Fo(t, e, n) {
|
|
663
|
+
return ni(t, e), typeof n == "function" && n(), t ? t.__c : null;
|
|
664
664
|
}
|
|
665
|
-
|
|
666
|
-
Object.defineProperty(
|
|
665
|
+
G.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(t) {
|
|
666
|
+
Object.defineProperty(G.prototype, t, { configurable: !0, get: function() {
|
|
667
667
|
return this["UNSAFE_" + t];
|
|
668
668
|
}, set: function(e) {
|
|
669
669
|
Object.defineProperty(this, t, { configurable: !0, writable: !0, value: e });
|
|
670
670
|
} });
|
|
671
671
|
});
|
|
672
|
-
var
|
|
673
|
-
function
|
|
672
|
+
var rr = b.event;
|
|
673
|
+
function Uo() {
|
|
674
674
|
}
|
|
675
|
-
function
|
|
675
|
+
function Qo() {
|
|
676
676
|
return this.cancelBubble;
|
|
677
677
|
}
|
|
678
|
-
function
|
|
678
|
+
function Do() {
|
|
679
679
|
return this.defaultPrevented;
|
|
680
680
|
}
|
|
681
681
|
b.event = function(t) {
|
|
682
|
-
return
|
|
682
|
+
return rr && (t = rr(t)), t.persist = Uo, t.isPropagationStopped = Qo, t.isDefaultPrevented = Do, t.nativeEvent = t;
|
|
683
683
|
};
|
|
684
|
-
var
|
|
684
|
+
var Sn, Vo = { enumerable: !1, configurable: !0, get: function() {
|
|
685
685
|
return this.class;
|
|
686
|
-
} },
|
|
686
|
+
} }, ir = b.vnode;
|
|
687
687
|
b.vnode = function(t) {
|
|
688
688
|
typeof t.type == "string" && (function(e) {
|
|
689
689
|
var n = e.props, r = e.type, i = {}, o = r.indexOf("-") === -1;
|
|
690
690
|
for (var s in n) {
|
|
691
691
|
var l = n[s];
|
|
692
|
-
if (!(s === "value" && "defaultValue" in n && l == null ||
|
|
692
|
+
if (!(s === "value" && "defaultValue" in n && l == null || No && s === "children" && r === "noscript" || s === "class" || s === "className")) {
|
|
693
693
|
var a = s.toLowerCase();
|
|
694
|
-
s === "defaultValue" && "value" in n && n.value == null ? s = "value" : s === "download" && l === !0 ? l = "" : a === "translate" && l === "no" ? l = !1 : a[0] === "o" && a[1] === "n" ? a === "ondoubleclick" ? s = "ondblclick" : a !== "onchange" || r !== "input" && r !== "textarea" ||
|
|
694
|
+
s === "defaultValue" && "value" in n && n.value == null ? s = "value" : s === "download" && l === !0 ? l = "" : a === "translate" && l === "no" ? l = !1 : a[0] === "o" && a[1] === "n" ? a === "ondoubleclick" ? s = "ondblclick" : a !== "onchange" || r !== "input" && r !== "textarea" || zo(n.type) ? a === "onfocus" ? s = "onfocusin" : a === "onblur" ? s = "onfocusout" : qo.test(s) && (s = a) : a = s = "oninput" : o && Lo.test(s) ? s = s.replace(Oo, "-$&").toLowerCase() : l === null && (l = void 0), a === "oninput" && i[s = a] && (s = "oninputCapture"), i[s] = l;
|
|
695
695
|
}
|
|
696
696
|
}
|
|
697
697
|
r == "select" && i.multiple && Array.isArray(i.value) && (i.value = ne(n.children).forEach(function(u) {
|
|
698
698
|
u.props.selected = i.value.indexOf(u.props.value) != -1;
|
|
699
699
|
})), r == "select" && i.defaultValue != null && (i.value = ne(n.children).forEach(function(u) {
|
|
700
700
|
u.props.selected = i.multiple ? i.defaultValue.indexOf(u.props.value) != -1 : i.defaultValue == u.props.value;
|
|
701
|
-
})), n.class && !n.className ? (i.class = n.class, Object.defineProperty(i, "className",
|
|
702
|
-
})(t), t.$$typeof =
|
|
701
|
+
})), n.class && !n.className ? (i.class = n.class, Object.defineProperty(i, "className", Vo)) : (n.className && !n.class || n.class && n.className) && (i.class = i.className = n.className), e.props = i;
|
|
702
|
+
})(t), t.$$typeof = xi, ir && ir(t);
|
|
703
703
|
};
|
|
704
|
-
var
|
|
704
|
+
var or = b.__r;
|
|
705
705
|
b.__r = function(t) {
|
|
706
|
-
|
|
706
|
+
or && or(t), Sn = t.__c;
|
|
707
707
|
};
|
|
708
|
-
var
|
|
708
|
+
var sr = b.diffed;
|
|
709
709
|
b.diffed = function(t) {
|
|
710
|
-
|
|
710
|
+
sr && sr(t);
|
|
711
711
|
var e = t.props, n = t.__e;
|
|
712
|
-
n != null && t.type === "textarea" && "value" in e && e.value !== n.value && (n.value = e.value == null ? "" : e.value),
|
|
712
|
+
n != null && t.type === "textarea" && "value" in e && e.value !== n.value && (n.value = e.value == null ? "" : e.value), Sn = null;
|
|
713
713
|
};
|
|
714
|
-
var
|
|
715
|
-
return
|
|
716
|
-
}, useCallback:
|
|
717
|
-
function
|
|
714
|
+
var Ho = { ReactCurrentDispatcher: { current: { readContext: function(t) {
|
|
715
|
+
return Sn.__n[t.__c].props.value;
|
|
716
|
+
}, useCallback: Re, useContext: $t, useDebugValue: oi, useDeferredValue: hi, useEffect: T, useId: si, useImperativeHandle: ii, useInsertionEffect: fi, useLayoutEffect: st, useMemo: K, useReducer: wn, useRef: ue, useState: C, useSyncExternalStore: ci, useTransition: di } } };
|
|
717
|
+
function Wo(t) {
|
|
718
718
|
return V.bind(null, t);
|
|
719
719
|
}
|
|
720
|
-
function
|
|
721
|
-
return !!t && t.$$typeof ===
|
|
720
|
+
function Et(t) {
|
|
721
|
+
return !!t && t.$$typeof === xi;
|
|
722
722
|
}
|
|
723
|
-
function
|
|
724
|
-
return
|
|
723
|
+
function Jo(t) {
|
|
724
|
+
return Et(t) && t.type === F;
|
|
725
725
|
}
|
|
726
|
-
function
|
|
726
|
+
function Go(t) {
|
|
727
727
|
return !!t && !!t.displayName && (typeof t.displayName == "string" || t.displayName instanceof String) && t.displayName.startsWith("Memo(");
|
|
728
728
|
}
|
|
729
|
-
function
|
|
730
|
-
return
|
|
729
|
+
function Ko(t) {
|
|
730
|
+
return Et(t) ? _o.apply(null, arguments) : t;
|
|
731
731
|
}
|
|
732
|
-
function
|
|
732
|
+
function Zo(t) {
|
|
733
733
|
return !!t.__k && (ge(null, t), !0);
|
|
734
734
|
}
|
|
735
|
-
function
|
|
735
|
+
function Yo(t) {
|
|
736
736
|
return t && (t.base || t.nodeType === 1 && t) || null;
|
|
737
737
|
}
|
|
738
|
-
var
|
|
738
|
+
var Xo = function(t, e) {
|
|
739
739
|
return t(e);
|
|
740
|
-
},
|
|
740
|
+
}, es = function(t, e) {
|
|
741
741
|
return t(e);
|
|
742
|
-
},
|
|
743
|
-
for (var we = 0,
|
|
744
|
-
ee[we] =
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
function
|
|
742
|
+
}, ts = F, ns = Et, jn = { useState: C, useId: si, useReducer: wn, useEffect: T, useLayoutEffect: st, useInsertionEffect: fi, useTransition: di, useDeferredValue: hi, useSyncExternalStore: ci, startTransition: ui, useRef: ue, useImperativeHandle: ii, useMemo: K, useCallback: Re, useContext: $t, useDebugValue: oi, version: "18.3.1", Children: Ao, render: Bo, hydrate: Fo, unmountComponentAtNode: Zo, createPortal: Mo, createElement: V, createContext: wo, createFactory: Wo, cloneElement: Ko, createRef: mo, Fragment: F, isValidElement: Et, isElement: ns, isFragment: Jo, isMemo: Go, findDOMNode: Yo, Component: G, PureComponent: nn, memo: Co, forwardRef: Ro, flushSync: es, unstable_batchedUpdates: Xo, StrictMode: ts, Suspense: mt, SuspenseList: Qe, lazy: Eo, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Ho }, ee = [], D = [], rs = Uint8Array, Bt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
743
|
+
for (var we = 0, is = Bt.length; we < is; ++we)
|
|
744
|
+
ee[we] = Bt[we], D[Bt.charCodeAt(we)] = we;
|
|
745
|
+
D[45] = 62;
|
|
746
|
+
D[95] = 63;
|
|
747
|
+
function os(t) {
|
|
748
748
|
var e = t.length;
|
|
749
749
|
if (e % 4 > 0)
|
|
750
750
|
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
@@ -753,27 +753,27 @@ function es(t) {
|
|
|
753
753
|
var r = n === e ? 0 : 4 - n % 4;
|
|
754
754
|
return [n, r];
|
|
755
755
|
}
|
|
756
|
-
function
|
|
756
|
+
function ss(t, e, n) {
|
|
757
757
|
return (e + n) * 3 / 4 - n;
|
|
758
758
|
}
|
|
759
759
|
function Ye(t) {
|
|
760
|
-
var e, n =
|
|
760
|
+
var e, n = os(t), r = n[0], i = n[1], o = new rs(ss(t, r, i)), s = 0, l = i > 0 ? r - 4 : r, a;
|
|
761
761
|
for (a = 0; a < l; a += 4)
|
|
762
|
-
e =
|
|
763
|
-
return i === 2 && (e =
|
|
762
|
+
e = D[t.charCodeAt(a)] << 18 | D[t.charCodeAt(a + 1)] << 12 | D[t.charCodeAt(a + 2)] << 6 | D[t.charCodeAt(a + 3)], o[s++] = e >> 16 & 255, o[s++] = e >> 8 & 255, o[s++] = e & 255;
|
|
763
|
+
return i === 2 && (e = D[t.charCodeAt(a)] << 2 | D[t.charCodeAt(a + 1)] >> 4, o[s++] = e & 255), i === 1 && (e = D[t.charCodeAt(a)] << 10 | D[t.charCodeAt(a + 1)] << 4 | D[t.charCodeAt(a + 2)] >> 2, o[s++] = e >> 8 & 255, o[s++] = e & 255), o;
|
|
764
764
|
}
|
|
765
|
-
function
|
|
765
|
+
function as(t) {
|
|
766
766
|
return ee[t >> 18 & 63] + ee[t >> 12 & 63] + ee[t >> 6 & 63] + ee[t & 63];
|
|
767
767
|
}
|
|
768
|
-
function
|
|
768
|
+
function ls(t, e, n) {
|
|
769
769
|
for (var r, i = [], o = e; o < n; o += 3)
|
|
770
|
-
r = (t[o] << 16 & 16711680) + (t[o + 1] << 8 & 65280) + (t[o + 2] & 255), i.push(
|
|
770
|
+
r = (t[o] << 16 & 16711680) + (t[o + 1] << 8 & 65280) + (t[o + 2] & 255), i.push(as(r));
|
|
771
771
|
return i.join("");
|
|
772
772
|
}
|
|
773
773
|
function Xe(t) {
|
|
774
774
|
for (var e, n = t.length, r = n % 3, i = [], o = 16383, s = 0, l = n - r; s < l; s += o)
|
|
775
775
|
i.push(
|
|
776
|
-
|
|
776
|
+
ls(
|
|
777
777
|
t,
|
|
778
778
|
s,
|
|
779
779
|
s + o > l ? l : s + o
|
|
@@ -786,13 +786,13 @@ function Xe(t) {
|
|
|
786
786
|
function oe(t) {
|
|
787
787
|
if (t === void 0)
|
|
788
788
|
return {};
|
|
789
|
-
if (!
|
|
789
|
+
if (!bi(t))
|
|
790
790
|
throw new Error(
|
|
791
791
|
`The arguments to a Convex function must be an object. Received: ${t}`
|
|
792
792
|
);
|
|
793
793
|
return t;
|
|
794
794
|
}
|
|
795
|
-
function
|
|
795
|
+
function cs(t) {
|
|
796
796
|
if (typeof t > "u")
|
|
797
797
|
throw new Error(
|
|
798
798
|
"Client created with undefined deployment address. If you used an environment variable, check that it's set."
|
|
@@ -817,46 +817,46 @@ function is(t) {
|
|
|
817
817
|
`Invalid deployment address: "${t}" 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.`
|
|
818
818
|
);
|
|
819
819
|
}
|
|
820
|
-
function
|
|
820
|
+
function bi(t) {
|
|
821
821
|
const e = typeof t == "object", n = Object.getPrototypeOf(t), r = n === null || n === Object.prototype || // Objects generated from other contexts (e.g. across Node.js `vm` modules) will not satisfy the previous
|
|
822
822
|
// conditions but are still simple objects.
|
|
823
823
|
n?.constructor?.name === "Object";
|
|
824
824
|
return e && r;
|
|
825
825
|
}
|
|
826
|
-
const
|
|
827
|
-
function
|
|
826
|
+
const yi = !0, Ee = BigInt("-9223372036854775808"), Cn = BigInt("9223372036854775807"), rn = BigInt("0"), us = BigInt("8"), hs = BigInt("256");
|
|
827
|
+
function vi(t) {
|
|
828
828
|
return Number.isNaN(t) || !Number.isFinite(t) || Object.is(t, -0);
|
|
829
829
|
}
|
|
830
|
-
function
|
|
831
|
-
t <
|
|
830
|
+
function ds(t) {
|
|
831
|
+
t < rn && (t -= Ee + Ee);
|
|
832
832
|
let e = t.toString(16);
|
|
833
833
|
e.length % 2 === 1 && (e = "0" + e);
|
|
834
834
|
const n = new Uint8Array(new ArrayBuffer(8));
|
|
835
835
|
let r = 0;
|
|
836
836
|
for (const i of e.match(/.{2}/g).reverse())
|
|
837
|
-
n.set([parseInt(i, 16)], r++), t >>=
|
|
837
|
+
n.set([parseInt(i, 16)], r++), t >>= us;
|
|
838
838
|
return Xe(n);
|
|
839
839
|
}
|
|
840
|
-
function
|
|
840
|
+
function fs(t) {
|
|
841
841
|
const e = Ye(t);
|
|
842
842
|
if (e.byteLength !== 8)
|
|
843
843
|
throw new Error(
|
|
844
844
|
`Received ${e.byteLength} bytes, expected 8 for $integer`
|
|
845
845
|
);
|
|
846
|
-
let n =
|
|
846
|
+
let n = rn, r = rn;
|
|
847
847
|
for (const i of e)
|
|
848
|
-
n += BigInt(i) *
|
|
849
|
-
return n >
|
|
848
|
+
n += BigInt(i) * hs ** r, r++;
|
|
849
|
+
return n > Cn && (n += Ee + Ee), n;
|
|
850
850
|
}
|
|
851
|
-
function
|
|
852
|
-
if (t <
|
|
851
|
+
function ps(t) {
|
|
852
|
+
if (t < Ee || Cn < t)
|
|
853
853
|
throw new Error(
|
|
854
854
|
`BigInt ${t} does not fit into a 64-bit signed integer.`
|
|
855
855
|
);
|
|
856
856
|
const e = new ArrayBuffer(8);
|
|
857
857
|
return new DataView(e).setBigInt64(0, t, !0), Xe(new Uint8Array(e));
|
|
858
858
|
}
|
|
859
|
-
function
|
|
859
|
+
function gs(t) {
|
|
860
860
|
const e = Ye(t);
|
|
861
861
|
if (e.byteLength !== 8)
|
|
862
862
|
throw new Error(
|
|
@@ -864,11 +864,11 @@ function us(t) {
|
|
|
864
864
|
);
|
|
865
865
|
return new DataView(e.buffer).getBigInt64(0, !0);
|
|
866
866
|
}
|
|
867
|
-
const
|
|
868
|
-
function
|
|
869
|
-
if (t.length >
|
|
867
|
+
const ms = DataView.prototype.setBigInt64 ? ps : ds, xs = DataView.prototype.getBigInt64 ? gs : fs, ar = 1024;
|
|
868
|
+
function _i(t) {
|
|
869
|
+
if (t.length > ar)
|
|
870
870
|
throw new Error(
|
|
871
|
-
`Field name ${t} exceeds maximum field name length ${
|
|
871
|
+
`Field name ${t} exceeds maximum field name length ${ar}.`
|
|
872
872
|
);
|
|
873
873
|
if (t.startsWith("$"))
|
|
874
874
|
throw new Error(`Field name ${t} starts with a '$', which is reserved.`);
|
|
@@ -880,11 +880,11 @@ function mi(t) {
|
|
|
880
880
|
);
|
|
881
881
|
}
|
|
882
882
|
}
|
|
883
|
-
function
|
|
883
|
+
function Ie(t) {
|
|
884
884
|
if (t === null || typeof t == "boolean" || typeof t == "number" || typeof t == "string")
|
|
885
885
|
return t;
|
|
886
886
|
if (Array.isArray(t))
|
|
887
|
-
return t.map((r) =>
|
|
887
|
+
return t.map((r) => Ie(r));
|
|
888
888
|
if (typeof t != "object")
|
|
889
889
|
throw new Error(`Unexpected type of ${t}`);
|
|
890
890
|
const e = Object.entries(t);
|
|
@@ -898,7 +898,7 @@ function Ee(t) {
|
|
|
898
898
|
if (r === "$integer") {
|
|
899
899
|
if (typeof t.$integer != "string")
|
|
900
900
|
throw new Error(`Malformed $integer field on ${t}`);
|
|
901
|
-
return
|
|
901
|
+
return xs(t.$integer);
|
|
902
902
|
}
|
|
903
903
|
if (r === "$float") {
|
|
904
904
|
if (typeof t.$float != "string")
|
|
@@ -908,8 +908,8 @@ function Ee(t) {
|
|
|
908
908
|
throw new Error(
|
|
909
909
|
`Received ${i.byteLength} bytes, expected 8 for $float`
|
|
910
910
|
);
|
|
911
|
-
const s = new DataView(i.buffer).getFloat64(0,
|
|
912
|
-
if (!
|
|
911
|
+
const s = new DataView(i.buffer).getFloat64(0, yi);
|
|
912
|
+
if (!vi(s))
|
|
913
913
|
throw new Error(`Float ${s} should be encoded as a number`);
|
|
914
914
|
return s;
|
|
915
915
|
}
|
|
@@ -924,21 +924,21 @@ function Ee(t) {
|
|
|
924
924
|
}
|
|
925
925
|
const n = {};
|
|
926
926
|
for (const [r, i] of Object.entries(t))
|
|
927
|
-
|
|
927
|
+
_i(r), n[r] = Ie(i);
|
|
928
928
|
return n;
|
|
929
929
|
}
|
|
930
|
-
const
|
|
930
|
+
const lr = 16384;
|
|
931
931
|
function We(t) {
|
|
932
932
|
const e = JSON.stringify(t, (n, r) => r === void 0 ? "undefined" : typeof r == "bigint" ? `${r.toString()}n` : r);
|
|
933
|
-
if (e.length >
|
|
933
|
+
if (e.length > lr) {
|
|
934
934
|
const n = "[...truncated]";
|
|
935
|
-
let r =
|
|
935
|
+
let r = lr - n.length;
|
|
936
936
|
const i = e.codePointAt(r - 1);
|
|
937
937
|
return i !== void 0 && i > 65535 && (r -= 1), e.substring(0, r) + n;
|
|
938
938
|
}
|
|
939
939
|
return e;
|
|
940
940
|
}
|
|
941
|
-
function
|
|
941
|
+
function on(t, e, n, r) {
|
|
942
942
|
if (t === void 0) {
|
|
943
943
|
const s = n && ` (present at path ${n} in original object ${We(
|
|
944
944
|
e
|
|
@@ -950,16 +950,16 @@ function rn(t, e, n, r) {
|
|
|
950
950
|
if (t === null)
|
|
951
951
|
return t;
|
|
952
952
|
if (typeof t == "bigint") {
|
|
953
|
-
if (t <
|
|
953
|
+
if (t < Ee || Cn < t)
|
|
954
954
|
throw new Error(
|
|
955
955
|
`BigInt ${t} does not fit into a 64-bit signed integer.`
|
|
956
956
|
);
|
|
957
|
-
return { $integer:
|
|
957
|
+
return { $integer: ms(t) };
|
|
958
958
|
}
|
|
959
959
|
if (typeof t == "number")
|
|
960
|
-
if (
|
|
960
|
+
if (vi(t)) {
|
|
961
961
|
const s = new ArrayBuffer(8);
|
|
962
|
-
return new DataView(s).setFloat64(0, t,
|
|
962
|
+
return new DataView(s).setFloat64(0, t, yi), { $float: Xe(new Uint8Array(s)) };
|
|
963
963
|
} else
|
|
964
964
|
return t;
|
|
965
965
|
if (typeof t == "boolean" || typeof t == "string")
|
|
@@ -968,29 +968,29 @@ function rn(t, e, n, r) {
|
|
|
968
968
|
return { $bytes: Xe(new Uint8Array(t)) };
|
|
969
969
|
if (Array.isArray(t))
|
|
970
970
|
return t.map(
|
|
971
|
-
(s, l) =>
|
|
971
|
+
(s, l) => on(s, e, n + `[${l}]`)
|
|
972
972
|
);
|
|
973
973
|
if (t instanceof Set)
|
|
974
974
|
throw new Error(
|
|
975
|
-
|
|
975
|
+
Ft(n, "Set", [...t], e)
|
|
976
976
|
);
|
|
977
977
|
if (t instanceof Map)
|
|
978
978
|
throw new Error(
|
|
979
|
-
|
|
979
|
+
Ft(n, "Map", [...t], e)
|
|
980
980
|
);
|
|
981
|
-
if (!
|
|
981
|
+
if (!bi(t)) {
|
|
982
982
|
const s = t?.constructor?.name, l = s ? `${s} ` : "";
|
|
983
983
|
throw new Error(
|
|
984
|
-
|
|
984
|
+
Ft(n, l, t, e)
|
|
985
985
|
);
|
|
986
986
|
}
|
|
987
987
|
const i = {}, o = Object.entries(t);
|
|
988
988
|
o.sort(([s, l], [a, u]) => s === a ? 0 : s < a ? -1 : 1);
|
|
989
989
|
for (const [s, l] of o)
|
|
990
|
-
l !== void 0 && (
|
|
990
|
+
l !== void 0 && (_i(s), i[s] = on(l, e, n + `.${s}`));
|
|
991
991
|
return i;
|
|
992
992
|
}
|
|
993
|
-
function
|
|
993
|
+
function Ft(t, e, n, r) {
|
|
994
994
|
return t ? `${e}${We(
|
|
995
995
|
n
|
|
996
996
|
)} is not a supported Convex type (present at path ${t} in original object ${We(
|
|
@@ -1000,22 +1000,22 @@ function Bt(t, e, n, r) {
|
|
|
1000
1000
|
)} is not a supported Convex type.`;
|
|
1001
1001
|
}
|
|
1002
1002
|
function re(t) {
|
|
1003
|
-
return
|
|
1003
|
+
return on(t, t, "");
|
|
1004
1004
|
}
|
|
1005
|
-
var
|
|
1006
|
-
const
|
|
1007
|
-
class yt extends (
|
|
1005
|
+
var bs = Object.defineProperty, ys = (t, e, n) => e in t ? bs(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Ut = (t, e, n) => ys(t, typeof e != "symbol" ? e + "" : e, n), cr, ur;
|
|
1006
|
+
const vs = /* @__PURE__ */ Symbol.for("ConvexError");
|
|
1007
|
+
class yt extends (ur = Error, cr = vs, ur) {
|
|
1008
1008
|
constructor(e) {
|
|
1009
|
-
super(typeof e == "string" ? e : We(e)),
|
|
1009
|
+
super(typeof e == "string" ? e : We(e)), Ut(this, "name", "ConvexError"), Ut(this, "data"), Ut(this, cr, !0), this.data = e;
|
|
1010
1010
|
}
|
|
1011
1011
|
}
|
|
1012
|
-
const
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
const
|
|
1016
|
-
var
|
|
1017
|
-
const
|
|
1018
|
-
function
|
|
1012
|
+
const wi = () => Array.from({ length: 4 }, () => 0);
|
|
1013
|
+
wi();
|
|
1014
|
+
wi();
|
|
1015
|
+
const hr = "1.39.1";
|
|
1016
|
+
var _s = Object.defineProperty, ws = (t, e, n) => e in t ? _s(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, dr = (t, e, n) => ws(t, typeof e != "symbol" ? e + "" : e, n);
|
|
1017
|
+
const ks = "color:rgb(0, 145, 255)";
|
|
1018
|
+
function ki(t) {
|
|
1019
1019
|
switch (t) {
|
|
1020
1020
|
case "query":
|
|
1021
1021
|
return "Q";
|
|
@@ -1027,9 +1027,9 @@ function bi(t) {
|
|
|
1027
1027
|
return "?";
|
|
1028
1028
|
}
|
|
1029
1029
|
}
|
|
1030
|
-
class
|
|
1030
|
+
class Si {
|
|
1031
1031
|
constructor(e) {
|
|
1032
|
-
|
|
1032
|
+
dr(this, "_onLogLineFuncs"), dr(this, "_verbose"), this._onLogLineFuncs = {}, this._verbose = e.verbose;
|
|
1033
1033
|
}
|
|
1034
1034
|
addLogLineListener(e) {
|
|
1035
1035
|
let n = Math.random().toString(36).substring(2, 15);
|
|
@@ -1057,8 +1057,8 @@ class yi {
|
|
|
1057
1057
|
n("error", ...e);
|
|
1058
1058
|
}
|
|
1059
1059
|
}
|
|
1060
|
-
function
|
|
1061
|
-
const e = new
|
|
1060
|
+
function ji(t) {
|
|
1061
|
+
const e = new Si(t);
|
|
1062
1062
|
return e.addLogLineListener((n, ...r) => {
|
|
1063
1063
|
switch (n) {
|
|
1064
1064
|
case "debug":
|
|
@@ -1078,11 +1078,11 @@ function vi(t) {
|
|
|
1078
1078
|
}
|
|
1079
1079
|
}), e;
|
|
1080
1080
|
}
|
|
1081
|
-
function
|
|
1082
|
-
return new
|
|
1081
|
+
function Ci(t) {
|
|
1082
|
+
return new Si(t);
|
|
1083
1083
|
}
|
|
1084
1084
|
function vt(t, e, n, r, i) {
|
|
1085
|
-
const o =
|
|
1085
|
+
const o = ki(n);
|
|
1086
1086
|
if (typeof i == "object" && (i = `ConvexError ${JSON.stringify(i.errorData, null, 2)}`), e === "info") {
|
|
1087
1087
|
const s = i.match(/^\[.*?\] /);
|
|
1088
1088
|
if (s === null) {
|
|
@@ -1092,19 +1092,19 @@ function vt(t, e, n, r, i) {
|
|
|
1092
1092
|
return;
|
|
1093
1093
|
}
|
|
1094
1094
|
const l = i.slice(1, s[0].length - 2), a = i.slice(s[0].length);
|
|
1095
|
-
t.log(`%c[CONVEX ${o}(${r})] [${l}]`,
|
|
1095
|
+
t.log(`%c[CONVEX ${o}(${r})] [${l}]`, ks, a);
|
|
1096
1096
|
} else
|
|
1097
1097
|
t.error(`[CONVEX ${o}(${r})] ${i}`);
|
|
1098
1098
|
}
|
|
1099
|
-
function
|
|
1099
|
+
function Ss(t, e) {
|
|
1100
1100
|
const n = `[CONVEX FATAL ERROR] ${e}`;
|
|
1101
1101
|
return t.error(n), new Error(n);
|
|
1102
1102
|
}
|
|
1103
1103
|
function Ce(t, e, n) {
|
|
1104
|
-
return `[CONVEX ${
|
|
1104
|
+
return `[CONVEX ${ki(t)}(${e})] ${n.errorMessage}
|
|
1105
1105
|
Called by client`;
|
|
1106
1106
|
}
|
|
1107
|
-
function
|
|
1107
|
+
function sn(t, e) {
|
|
1108
1108
|
return e.data = t.errorData, e;
|
|
1109
1109
|
}
|
|
1110
1110
|
function me(t) {
|
|
@@ -1118,7 +1118,7 @@ function fe(t, e) {
|
|
|
1118
1118
|
args: re(e)
|
|
1119
1119
|
});
|
|
1120
1120
|
}
|
|
1121
|
-
function
|
|
1121
|
+
function fr(t, e, n) {
|
|
1122
1122
|
const { initialNumItems: r, id: i } = n;
|
|
1123
1123
|
return JSON.stringify({
|
|
1124
1124
|
type: "paginated",
|
|
@@ -1127,8 +1127,8 @@ function ur(t, e, n) {
|
|
|
1127
1127
|
options: re({ initialNumItems: r, id: i })
|
|
1128
1128
|
});
|
|
1129
1129
|
}
|
|
1130
|
-
var
|
|
1131
|
-
class
|
|
1130
|
+
var js = Object.defineProperty, Cs = (t, e, n) => e in t ? js(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Y = (t, e, n) => Cs(t, typeof e != "symbol" ? e + "" : e, n);
|
|
1131
|
+
class Ts {
|
|
1132
1132
|
constructor() {
|
|
1133
1133
|
Y(this, "nextQueryId"), Y(this, "querySetVersion"), Y(this, "querySet"), Y(this, "queryIdToToken"), Y(this, "identityVersion"), Y(this, "auth"), Y(this, "outstandingQueriesOlderThanRestart"), Y(this, "outstandingAuthOlderThanRestart"), Y(this, "paused"), Y(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();
|
|
1134
1134
|
}
|
|
@@ -1333,8 +1333,8 @@ class ws {
|
|
|
1333
1333
|
}
|
|
1334
1334
|
}
|
|
1335
1335
|
}
|
|
1336
|
-
var
|
|
1337
|
-
class
|
|
1336
|
+
var Rs = Object.defineProperty, As = (t, e, n) => e in t ? Rs(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, ht = (t, e, n) => As(t, typeof e != "symbol" ? e + "" : e, n);
|
|
1337
|
+
class $s {
|
|
1338
1338
|
constructor(e, n) {
|
|
1339
1339
|
this.logger = e, this.markConnectionStateDirty = n, ht(this, "inflightRequests"), ht(this, "requestsOlderThanRestart"), ht(this, "inflightMutationsCount", 0), ht(this, "inflightActionsCount", 0), this.inflightRequests = /* @__PURE__ */ new Map(), this.requestsOlderThanRestart = /* @__PURE__ */ new Set();
|
|
1340
1340
|
}
|
|
@@ -1367,14 +1367,14 @@ class Ss {
|
|
|
1367
1367
|
s = {
|
|
1368
1368
|
success: !0,
|
|
1369
1369
|
logLines: e.logLines,
|
|
1370
|
-
value:
|
|
1370
|
+
value: Ie(e.result)
|
|
1371
1371
|
}, l = () => o.onResult(s);
|
|
1372
1372
|
else {
|
|
1373
1373
|
const a = e.result, { errorData: u } = e;
|
|
1374
1374
|
vt(this.logger, "error", r, i, a), s = {
|
|
1375
1375
|
success: !1,
|
|
1376
1376
|
errorMessage: a,
|
|
1377
|
-
errorData: u !== void 0 ?
|
|
1377
|
+
errorData: u !== void 0 ? Ie(u) : void 0,
|
|
1378
1378
|
logLines: e.logLines
|
|
1379
1379
|
}, l = () => o.onResult(s);
|
|
1380
1380
|
}
|
|
@@ -1470,21 +1470,21 @@ class Ss {
|
|
|
1470
1470
|
return this.inflightActionsCount;
|
|
1471
1471
|
}
|
|
1472
1472
|
}
|
|
1473
|
-
const et = /* @__PURE__ */ Symbol.for("functionName"),
|
|
1474
|
-
function
|
|
1475
|
-
return t[
|
|
1473
|
+
const et = /* @__PURE__ */ Symbol.for("functionName"), Es = /* @__PURE__ */ Symbol.for("toReferencePath");
|
|
1474
|
+
function Is(t) {
|
|
1475
|
+
return t[Es] ?? null;
|
|
1476
1476
|
}
|
|
1477
|
-
function
|
|
1477
|
+
function Ps(t) {
|
|
1478
1478
|
return t.startsWith("function://");
|
|
1479
1479
|
}
|
|
1480
|
-
function
|
|
1480
|
+
function Ms(t) {
|
|
1481
1481
|
let e;
|
|
1482
1482
|
if (typeof t == "string")
|
|
1483
|
-
|
|
1483
|
+
Ps(t) ? e = { functionHandle: t } : e = { name: t };
|
|
1484
1484
|
else if (t[et])
|
|
1485
1485
|
e = { name: t[et] };
|
|
1486
1486
|
else {
|
|
1487
|
-
const n =
|
|
1487
|
+
const n = Is(t);
|
|
1488
1488
|
if (!n)
|
|
1489
1489
|
throw new Error(`${t} is not a functionReference`);
|
|
1490
1490
|
e = { reference: n };
|
|
@@ -1492,7 +1492,7 @@ function Rs(t) {
|
|
|
1492
1492
|
return e;
|
|
1493
1493
|
}
|
|
1494
1494
|
function O(t) {
|
|
1495
|
-
const e =
|
|
1495
|
+
const e = Ms(t);
|
|
1496
1496
|
if (e.name === void 0)
|
|
1497
1497
|
throw e.functionHandle !== void 0 ? new Error(
|
|
1498
1498
|
`Expected function reference like "api.file.func" or "internal.file.func", but received function handle ${e.functionHandle}`
|
|
@@ -1507,15 +1507,15 @@ function O(t) {
|
|
|
1507
1507
|
throw new Error(`${t} is not a functionReference`);
|
|
1508
1508
|
return n;
|
|
1509
1509
|
}
|
|
1510
|
-
function
|
|
1510
|
+
function Ti(t) {
|
|
1511
1511
|
return { [et]: t };
|
|
1512
1512
|
}
|
|
1513
|
-
function
|
|
1513
|
+
function Ri(t = []) {
|
|
1514
1514
|
const e = {
|
|
1515
1515
|
get(n, r) {
|
|
1516
1516
|
if (typeof r == "string") {
|
|
1517
1517
|
const i = [...t, r];
|
|
1518
|
-
return
|
|
1518
|
+
return Ri(i);
|
|
1519
1519
|
} else if (r === et) {
|
|
1520
1520
|
if (t.length < 2) {
|
|
1521
1521
|
const s = ["api", ...t].join(".");
|
|
@@ -1530,8 +1530,8 @@ function ji(t = []) {
|
|
|
1530
1530
|
};
|
|
1531
1531
|
return new Proxy({}, e);
|
|
1532
1532
|
}
|
|
1533
|
-
|
|
1534
|
-
var
|
|
1533
|
+
Ri();
|
|
1534
|
+
var Ls = Object.defineProperty, qs = (t, e, n) => e in t ? Ls(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, _t = (t, e, n) => qs(t, typeof e != "symbol" ? e + "" : e, n);
|
|
1535
1535
|
class tt {
|
|
1536
1536
|
constructor(e) {
|
|
1537
1537
|
_t(this, "queryResults"), _t(this, "modifiedQueries"), this.queryResults = e, this.modifiedQueries = [];
|
|
@@ -1573,7 +1573,7 @@ class tt {
|
|
|
1573
1573
|
return e.success ? e.value : void 0;
|
|
1574
1574
|
}
|
|
1575
1575
|
}
|
|
1576
|
-
class
|
|
1576
|
+
class Os {
|
|
1577
1577
|
constructor() {
|
|
1578
1578
|
_t(this, "queryResults"), _t(this, "optimisticUpdates"), this.queryResults = /* @__PURE__ */ new Map(), this.optimisticUpdates = [];
|
|
1579
1579
|
}
|
|
@@ -1621,7 +1621,7 @@ class Is {
|
|
|
1621
1621
|
if (r !== void 0) {
|
|
1622
1622
|
if (r.success)
|
|
1623
1623
|
return r.value;
|
|
1624
|
-
throw r.errorData !== void 0 ?
|
|
1624
|
+
throw r.errorData !== void 0 ? sn(
|
|
1625
1625
|
r,
|
|
1626
1626
|
new yt(
|
|
1627
1627
|
Ce("query", n.udfPath, r)
|
|
@@ -1641,8 +1641,8 @@ class Is {
|
|
|
1641
1641
|
return this.queryResults.get(e)?.result?.logLines;
|
|
1642
1642
|
}
|
|
1643
1643
|
}
|
|
1644
|
-
var
|
|
1645
|
-
class
|
|
1644
|
+
var Ns = Object.defineProperty, zs = (t, e, n) => e in t ? Ns(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Qt = (t, e, n) => zs(t, typeof e != "symbol" ? e + "" : e, n);
|
|
1645
|
+
class q {
|
|
1646
1646
|
constructor(e, n) {
|
|
1647
1647
|
Qt(this, "low"), Qt(this, "high"), Qt(this, "__isUnsignedLong__"), this.low = e | 0, this.high = n | 0, this.__isUnsignedLong__ = !0;
|
|
1648
1648
|
}
|
|
@@ -1651,7 +1651,7 @@ class L {
|
|
|
1651
1651
|
}
|
|
1652
1652
|
// prettier-ignore
|
|
1653
1653
|
static fromBytesLE(e) {
|
|
1654
|
-
return new
|
|
1654
|
+
return new q(
|
|
1655
1655
|
e[0] | e[1] << 8 | e[2] << 16 | e[3] << 24,
|
|
1656
1656
|
e[4] | e[5] << 8 | e[6] << 16 | e[7] << 24
|
|
1657
1657
|
);
|
|
@@ -1671,19 +1671,19 @@ class L {
|
|
|
1671
1671
|
];
|
|
1672
1672
|
}
|
|
1673
1673
|
static fromNumber(e) {
|
|
1674
|
-
return isNaN(e) || e < 0 ?
|
|
1674
|
+
return isNaN(e) || e < 0 ? pr : e >= Bs ? Fs : new q(e % Je | 0, e / Je | 0);
|
|
1675
1675
|
}
|
|
1676
1676
|
toString() {
|
|
1677
1677
|
return (BigInt(this.high) * BigInt(Je) + BigInt(this.low)).toString();
|
|
1678
1678
|
}
|
|
1679
1679
|
equals(e) {
|
|
1680
|
-
return
|
|
1680
|
+
return q.isLong(e) || (e = q.fromValue(e)), this.high >>> 31 === 1 && e.high >>> 31 === 1 ? !1 : this.high === e.high && this.low === e.low;
|
|
1681
1681
|
}
|
|
1682
1682
|
notEquals(e) {
|
|
1683
1683
|
return !this.equals(e);
|
|
1684
1684
|
}
|
|
1685
1685
|
comp(e) {
|
|
1686
|
-
return
|
|
1686
|
+
return q.isLong(e) || (e = q.fromValue(e)), this.equals(e) ? 0 : e.high >>> 0 > this.high >>> 0 || e.high === this.high && e.low >>> 0 > this.low >>> 0 ? -1 : 1;
|
|
1687
1687
|
}
|
|
1688
1688
|
lessThanOrEqual(e) {
|
|
1689
1689
|
return this.comp(
|
|
@@ -1692,14 +1692,14 @@ class L {
|
|
|
1692
1692
|
) <= 0;
|
|
1693
1693
|
}
|
|
1694
1694
|
static fromValue(e) {
|
|
1695
|
-
return typeof e == "number" ?
|
|
1695
|
+
return typeof e == "number" ? q.fromNumber(e) : new q(e.low, e.high);
|
|
1696
1696
|
}
|
|
1697
1697
|
}
|
|
1698
|
-
const
|
|
1699
|
-
var
|
|
1700
|
-
class
|
|
1698
|
+
const pr = new q(0, 0), gr = 65536, Je = gr * gr, Bs = Je * Je, Fs = new q(-1, -1);
|
|
1699
|
+
var Us = Object.defineProperty, Qs = (t, e, n) => e in t ? Us(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, dt = (t, e, n) => Qs(t, typeof e != "symbol" ? e + "" : e, n);
|
|
1700
|
+
class mr {
|
|
1701
1701
|
constructor(e, n) {
|
|
1702
|
-
dt(this, "version"), dt(this, "remoteQuerySet"), dt(this, "queryPath"), dt(this, "logger"), this.version = { querySet: 0, ts:
|
|
1702
|
+
dt(this, "version"), dt(this, "remoteQuerySet"), dt(this, "queryPath"), dt(this, "logger"), this.version = { querySet: 0, ts: q.fromNumber(0), identity: 0 }, this.remoteQuerySet = /* @__PURE__ */ new Map(), this.queryPath = e, this.logger = n;
|
|
1703
1703
|
}
|
|
1704
1704
|
transition(e) {
|
|
1705
1705
|
const n = e.startVersion;
|
|
@@ -1714,7 +1714,7 @@ class fr {
|
|
|
1714
1714
|
if (i)
|
|
1715
1715
|
for (const s of r.logLines)
|
|
1716
1716
|
vt(this.logger, "info", "query", i, s);
|
|
1717
|
-
const o =
|
|
1717
|
+
const o = Ie(r.value ?? null);
|
|
1718
1718
|
this.remoteQuerySet.set(r.queryId, {
|
|
1719
1719
|
success: !0,
|
|
1720
1720
|
value: o,
|
|
@@ -1731,7 +1731,7 @@ class fr {
|
|
|
1731
1731
|
this.remoteQuerySet.set(r.queryId, {
|
|
1732
1732
|
success: !1,
|
|
1733
1733
|
errorMessage: r.errorMessage,
|
|
1734
|
-
errorData: o !== void 0 ?
|
|
1734
|
+
errorData: o !== void 0 ? Ie(o) : void 0,
|
|
1735
1735
|
logLines: r.logLines
|
|
1736
1736
|
});
|
|
1737
1737
|
break;
|
|
@@ -1754,13 +1754,13 @@ class fr {
|
|
|
1754
1754
|
}
|
|
1755
1755
|
function Dt(t) {
|
|
1756
1756
|
const e = Ye(t);
|
|
1757
|
-
return
|
|
1757
|
+
return q.fromBytesLE(Array.from(e));
|
|
1758
1758
|
}
|
|
1759
|
-
function
|
|
1759
|
+
function Ds(t) {
|
|
1760
1760
|
const e = new Uint8Array(t.toBytesLE());
|
|
1761
1761
|
return Xe(e);
|
|
1762
1762
|
}
|
|
1763
|
-
function
|
|
1763
|
+
function xr(t) {
|
|
1764
1764
|
switch (t.type) {
|
|
1765
1765
|
case "FatalError":
|
|
1766
1766
|
case "AuthError":
|
|
@@ -1784,7 +1784,7 @@ function pr(t) {
|
|
|
1784
1784
|
};
|
|
1785
1785
|
}
|
|
1786
1786
|
}
|
|
1787
|
-
function
|
|
1787
|
+
function Vs(t) {
|
|
1788
1788
|
switch (t.type) {
|
|
1789
1789
|
case "Authenticate":
|
|
1790
1790
|
case "ModifyQuerySet":
|
|
@@ -1795,20 +1795,20 @@ function Bs(t) {
|
|
|
1795
1795
|
case "Connect":
|
|
1796
1796
|
return t.maxObservedTimestamp !== void 0 ? {
|
|
1797
1797
|
...t,
|
|
1798
|
-
maxObservedTimestamp:
|
|
1798
|
+
maxObservedTimestamp: Ds(t.maxObservedTimestamp)
|
|
1799
1799
|
} : { ...t, maxObservedTimestamp: void 0 };
|
|
1800
1800
|
}
|
|
1801
1801
|
}
|
|
1802
|
-
var
|
|
1803
|
-
const
|
|
1802
|
+
var Hs = Object.defineProperty, Ws = (t, e, n) => e in t ? Hs(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, $ = (t, e, n) => Ws(t, typeof e != "symbol" ? e + "" : e, n);
|
|
1803
|
+
const Js = 1e3, Gs = 1001, Ks = 1005, Zs = 4040;
|
|
1804
1804
|
let xt;
|
|
1805
|
-
function
|
|
1805
|
+
function Se() {
|
|
1806
1806
|
return xt === void 0 && (xt = Date.now()), typeof performance > "u" || !performance.now ? Date.now() : Math.round(xt + performance.now());
|
|
1807
1807
|
}
|
|
1808
|
-
function
|
|
1809
|
-
return `t=${Math.round((
|
|
1808
|
+
function br() {
|
|
1809
|
+
return `t=${Math.round((Se() - xt) / 100) / 10}s`;
|
|
1810
1810
|
}
|
|
1811
|
-
const
|
|
1811
|
+
const Ai = {
|
|
1812
1812
|
// A known error, e.g. during a restart or push
|
|
1813
1813
|
InternalServerError: { timeout: 1e3 },
|
|
1814
1814
|
// ErrorMetadata::overloaded() messages that we realy should back off
|
|
@@ -1828,18 +1828,18 @@ const Si = {
|
|
|
1828
1828
|
SearchIndexTooLarge: { timeout: 3e3 },
|
|
1829
1829
|
TooManyWritesInTimePeriod: { timeout: 3e3 }
|
|
1830
1830
|
};
|
|
1831
|
-
function
|
|
1831
|
+
function Ys(t) {
|
|
1832
1832
|
if (t === void 0) return "Unknown";
|
|
1833
1833
|
for (const e of Object.keys(
|
|
1834
|
-
|
|
1834
|
+
Ai
|
|
1835
1835
|
))
|
|
1836
1836
|
if (t.startsWith(e))
|
|
1837
1837
|
return e;
|
|
1838
1838
|
return "Unknown";
|
|
1839
1839
|
}
|
|
1840
|
-
class
|
|
1840
|
+
class Xs {
|
|
1841
1841
|
constructor(e, n, r, i, o, s) {
|
|
1842
|
-
this.markConnectionStateDirty = o, this.debug = s,
|
|
1842
|
+
this.markConnectionStateDirty = o, this.debug = s, $(this, "socket"), $(this, "connectionCount"), $(this, "_hasEverConnected", !1), $(this, "lastCloseReason"), $(this, "transitionChunkBuffer", null), $(this, "defaultInitialBackoff"), $(this, "maxBackoff"), $(this, "retries"), $(this, "serverInactivityThreshold"), $(this, "reconnectDueToServerInactivityTimeout"), $(this, "scheduledReconnect", null), $(this, "networkOnlineHandler", null), $(this, "pendingNetworkRecoveryInfo", null), $(this, "uri"), $(this, "onOpen"), $(this, "onResume"), $(this, "onMessage"), $(this, "webSocketConstructor"), $(this, "logger"), $(this, "onServerDisconnectError"), this.webSocketConstructor = r, 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 = n.onOpen, this.onResume = n.onResume, this.onMessage = n.onMessage, this.onServerDisconnectError = n.onServerDisconnectError, this.logger = i, this.setupNetworkListener(), this.connect();
|
|
1843
1843
|
}
|
|
1844
1844
|
setSocketState(e) {
|
|
1845
1845
|
this.socket = e, this._logVerbose(
|
|
@@ -1870,7 +1870,7 @@ class Js {
|
|
|
1870
1870
|
if (this.transitionChunkBuffer.chunks.push(e.chunk), this.transitionChunkBuffer.chunks.length === e.totalParts) {
|
|
1871
1871
|
const n = this.transitionChunkBuffer.chunks.join("");
|
|
1872
1872
|
this.transitionChunkBuffer = null;
|
|
1873
|
-
const r =
|
|
1873
|
+
const r = xr(JSON.parse(n));
|
|
1874
1874
|
if (r.type !== "Transition")
|
|
1875
1875
|
throw new Error(
|
|
1876
1876
|
`Expected Transition, got ${r.type} after assembling chunks`
|
|
@@ -1901,13 +1901,13 @@ class Js {
|
|
|
1901
1901
|
}), this.resetServerInactivityTimeout(), this.socket.paused === "no" && (this._hasEverConnected = !0, this.onOpen({
|
|
1902
1902
|
connectionCount: this.connectionCount,
|
|
1903
1903
|
lastCloseReason: this.lastCloseReason,
|
|
1904
|
-
clientTs:
|
|
1904
|
+
clientTs: Se()
|
|
1905
1905
|
})), this.lastCloseReason !== "InitialConnect" && (this.lastCloseReason ? this.logger.log(
|
|
1906
1906
|
"WebSocket reconnected at",
|
|
1907
|
-
|
|
1907
|
+
br(),
|
|
1908
1908
|
"after disconnect due to",
|
|
1909
1909
|
this.lastCloseReason
|
|
1910
|
-
) : this.logger.log("WebSocket reconnected at",
|
|
1910
|
+
) : this.logger.log("WebSocket reconnected at", br())), this.connectionCount += 1, this.lastCloseReason = null, this.pendingNetworkRecoveryInfo !== null) {
|
|
1911
1911
|
const { timeSavedMs: n } = this.pendingNetworkRecoveryInfo;
|
|
1912
1912
|
this.pendingNetworkRecoveryInfo = null, this.sendMessage({
|
|
1913
1913
|
type: "Event",
|
|
@@ -1924,7 +1924,7 @@ class Js {
|
|
|
1924
1924
|
}, e.onmessage = (n) => {
|
|
1925
1925
|
this.resetServerInactivityTimeout();
|
|
1926
1926
|
const r = n.data.length;
|
|
1927
|
-
let i =
|
|
1927
|
+
let i = xr(JSON.parse(n.data));
|
|
1928
1928
|
if (this._logVerbose(`received ws message with type ${i.type}`), i.type === "Ping")
|
|
1929
1929
|
return;
|
|
1930
1930
|
if (i.type === "TransitionChunk") {
|
|
@@ -1942,12 +1942,12 @@ class Js {
|
|
|
1942
1942
|
transition: i
|
|
1943
1943
|
}), this.onMessage(i).hasSyncedPastLastReconnect && (this.retries = 0, this.markConnectionStateDirty());
|
|
1944
1944
|
}, e.onclose = (n) => {
|
|
1945
|
-
if (this._logVerbose("begin ws.onclose"), this.transitionChunkBuffer = null, this.lastCloseReason === null && (this.lastCloseReason = n.reason || `closed with code ${n.code}`), n.code !==
|
|
1946
|
-
n.code !==
|
|
1945
|
+
if (this._logVerbose("begin ws.onclose"), this.transitionChunkBuffer = null, this.lastCloseReason === null && (this.lastCloseReason = n.reason || `closed with code ${n.code}`), n.code !== Js && n.code !== Gs && // This commonly gets fired on mobile apps when the app is backgrounded
|
|
1946
|
+
n.code !== Ks && n.code !== Zs) {
|
|
1947
1947
|
let i = `WebSocket closed with code ${n.code}`;
|
|
1948
1948
|
n.reason && (i += `: ${n.reason}`), this.logger.log(i), this.onServerDisconnectError && n.reason && this.onServerDisconnectError(i);
|
|
1949
1949
|
}
|
|
1950
|
-
const r =
|
|
1950
|
+
const r = Ys(n.reason);
|
|
1951
1951
|
this.scheduleReconnect(r);
|
|
1952
1952
|
};
|
|
1953
1953
|
}
|
|
@@ -1969,7 +1969,7 @@ class Js {
|
|
|
1969
1969
|
} : {}
|
|
1970
1970
|
};
|
|
1971
1971
|
if (this.socket.state === "ready" && this.socket.paused === "no") {
|
|
1972
|
-
const r =
|
|
1972
|
+
const r = Vs(e), i = JSON.stringify(r);
|
|
1973
1973
|
let o = !1;
|
|
1974
1974
|
try {
|
|
1975
1975
|
this.socket.ws.send(i), o = !0;
|
|
@@ -1999,7 +1999,7 @@ class Js {
|
|
|
1999
1999
|
this.scheduledReconnect && (clearTimeout(this.scheduledReconnect.timeout), this.scheduledReconnect = null), this.socket = { state: "disconnected" };
|
|
2000
2000
|
const n = this.nextBackoff(e);
|
|
2001
2001
|
this.markConnectionStateDirty(), this.logger.log(`Attempting reconnect in ${Math.round(n)}ms`);
|
|
2002
|
-
const r =
|
|
2002
|
+
const r = Se(), i = setTimeout(() => {
|
|
2003
2003
|
this.scheduledReconnect?.timeout === i && (this.scheduledReconnect = null, this.connect());
|
|
2004
2004
|
}, n);
|
|
2005
2005
|
this.scheduledReconnect = {
|
|
@@ -2156,7 +2156,7 @@ class Js {
|
|
|
2156
2156
|
}
|
|
2157
2157
|
let e = null;
|
|
2158
2158
|
if (this.scheduledReconnect) {
|
|
2159
|
-
const n =
|
|
2159
|
+
const n = Se() - this.scheduledReconnect.scheduledAt;
|
|
2160
2160
|
e = Math.max(0, this.scheduledReconnect.backoffMs - n), this._logVerbose(
|
|
2161
2161
|
`would have waited ${Math.round(e)}ms more (backoff was ${Math.round(this.scheduledReconnect.backoffMs)}ms, elapsed ${Math.round(n)}ms)`
|
|
2162
2162
|
), clearTimeout(this.scheduledReconnect.timeout), this.scheduledReconnect = null, this._logVerbose("canceled scheduled reconnect");
|
|
@@ -2175,7 +2175,7 @@ class Js {
|
|
|
2175
2175
|
this.socket.paused === "uninitialized" ? (this.socket = { ...this.socket, paused: "no" }, this._hasEverConnected = !0, this.onOpen({
|
|
2176
2176
|
connectionCount: this.connectionCount,
|
|
2177
2177
|
lastCloseReason: this.lastCloseReason,
|
|
2178
|
-
clientTs:
|
|
2178
|
+
clientTs: Se()
|
|
2179
2179
|
})) : this.socket.paused === "yes" && (this.socket = { ...this.socket, paused: "no" }, this.onResume());
|
|
2180
2180
|
return;
|
|
2181
2181
|
case "terminated":
|
|
@@ -2199,7 +2199,7 @@ class Js {
|
|
|
2199
2199
|
this.logger.logVerbose(e);
|
|
2200
2200
|
}
|
|
2201
2201
|
nextBackoff(e) {
|
|
2202
|
-
const r = (e === "client" ? 100 : e === "Unknown" ? this.defaultInitialBackoff :
|
|
2202
|
+
const r = (e === "client" ? 100 : e === "Unknown" ? this.defaultInitialBackoff : Ai[e].timeout) * Math.pow(2, this.retries);
|
|
2203
2203
|
this.retries += 1;
|
|
2204
2204
|
const i = Math.min(r, this.maxBackoff), o = i * (Math.random() - 0.5);
|
|
2205
2205
|
return i + o;
|
|
@@ -2210,7 +2210,7 @@ class Js {
|
|
|
2210
2210
|
}) {
|
|
2211
2211
|
if (e.clientClockSkew === void 0 || e.serverTs === void 0)
|
|
2212
2212
|
return;
|
|
2213
|
-
const r =
|
|
2213
|
+
const r = Se() - // client time now
|
|
2214
2214
|
// clientClockSkew = (server time + upstream latency) - client time
|
|
2215
2215
|
// clientClockSkew is "how many milliseconds behind (slow) is the client clock"
|
|
2216
2216
|
// but the latency of the Connect message inflates this, making it appear further behind
|
|
@@ -2228,10 +2228,10 @@ class Js {
|
|
|
2228
2228
|
});
|
|
2229
2229
|
}
|
|
2230
2230
|
}
|
|
2231
|
-
function
|
|
2232
|
-
return
|
|
2231
|
+
function ea() {
|
|
2232
|
+
return ta();
|
|
2233
2233
|
}
|
|
2234
|
-
function
|
|
2234
|
+
function ta() {
|
|
2235
2235
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (t) => {
|
|
2236
2236
|
const e = Math.random() * 16 | 0;
|
|
2237
2237
|
return (t === "x" ? e : e & 3 | 8).toString(16);
|
|
@@ -2240,7 +2240,7 @@ function Gs() {
|
|
|
2240
2240
|
class De extends Error {
|
|
2241
2241
|
}
|
|
2242
2242
|
De.prototype.name = "InvalidTokenError";
|
|
2243
|
-
function
|
|
2243
|
+
function na(t) {
|
|
2244
2244
|
return decodeURIComponent(
|
|
2245
2245
|
atob(t).replace(/(.)/g, (e, n) => {
|
|
2246
2246
|
let r = n.charCodeAt(0).toString(16).toUpperCase();
|
|
@@ -2248,7 +2248,7 @@ function Zs(t) {
|
|
|
2248
2248
|
})
|
|
2249
2249
|
);
|
|
2250
2250
|
}
|
|
2251
|
-
function
|
|
2251
|
+
function ra(t) {
|
|
2252
2252
|
let e = t.replace(/-/g, "+").replace(/_/g, "/");
|
|
2253
2253
|
switch (e.length % 4) {
|
|
2254
2254
|
case 0:
|
|
@@ -2263,12 +2263,12 @@ function Ys(t) {
|
|
|
2263
2263
|
throw new Error("base64 string is not of the correct length");
|
|
2264
2264
|
}
|
|
2265
2265
|
try {
|
|
2266
|
-
return
|
|
2266
|
+
return na(e);
|
|
2267
2267
|
} catch {
|
|
2268
2268
|
return atob(e);
|
|
2269
2269
|
}
|
|
2270
2270
|
}
|
|
2271
|
-
function
|
|
2271
|
+
function $i(t, e) {
|
|
2272
2272
|
if (typeof t != "string")
|
|
2273
2273
|
throw new De("Invalid token specified: must be a string");
|
|
2274
2274
|
e || (e = {});
|
|
@@ -2279,7 +2279,7 @@ function Ci(t, e) {
|
|
|
2279
2279
|
);
|
|
2280
2280
|
let i;
|
|
2281
2281
|
try {
|
|
2282
|
-
i =
|
|
2282
|
+
i = ra(r);
|
|
2283
2283
|
} catch (o) {
|
|
2284
2284
|
throw new De(
|
|
2285
2285
|
`Invalid token specified: invalid base64 for part #${n + 1} (${o.message})`
|
|
@@ -2293,11 +2293,11 @@ function Ci(t, e) {
|
|
|
2293
2293
|
);
|
|
2294
2294
|
}
|
|
2295
2295
|
}
|
|
2296
|
-
var
|
|
2297
|
-
const
|
|
2298
|
-
class
|
|
2296
|
+
var ia = Object.defineProperty, oa = (t, e, n) => e in t ? ia(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Q = (t, e, n) => oa(t, typeof e != "symbol" ? e + "" : e, n);
|
|
2297
|
+
const sa = 480 * 60 * 60 * 1e3, yr = 2;
|
|
2298
|
+
class aa {
|
|
2299
2299
|
constructor(e, n, r) {
|
|
2300
|
-
|
|
2300
|
+
Q(this, "authState", { state: "noAuth" }), Q(this, "configVersion", 0), Q(this, "syncState"), Q(this, "authenticate"), Q(this, "stopSocket"), Q(this, "tryRestartSocket"), Q(this, "pauseSocket"), Q(this, "resumeSocket"), Q(this, "clearAuth"), Q(this, "logger"), Q(this, "refreshTokenLeewaySeconds"), Q(this, "tokenConfirmationAttempts", 0), this.syncState = e, this.authenticate = n.authenticate, this.stopSocket = n.stopSocket, this.tryRestartSocket = n.tryRestartSocket, this.pauseSocket = n.pauseSocket, this.resumeSocket = n.resumeSocket, this.clearAuth = n.clearAuth, this.logger = r.logger, this.refreshTokenLeewaySeconds = r.refreshTokenLeewaySeconds;
|
|
2301
2301
|
}
|
|
2302
2302
|
async setConfig(e, n) {
|
|
2303
2303
|
this.resetAuthState(), this._logVerbose("pausing WS for auth token fetch"), this.pauseSocket();
|
|
@@ -2346,14 +2346,14 @@ class na {
|
|
|
2346
2346
|
if (this._logVerbose(`attempting to reauthenticate: ${e.error}`), // No way to fetch another token, kaboom
|
|
2347
2347
|
this.authState.state === "noAuth" || // We failed on a fresh token. After a small number of retries, we give up
|
|
2348
2348
|
// and clear the auth state to avoid infinite retries.
|
|
2349
|
-
this.authState.state === "waitingForServerConfirmationOfFreshToken" && this.tokenConfirmationAttempts >=
|
|
2349
|
+
this.authState.state === "waitingForServerConfirmationOfFreshToken" && this.tokenConfirmationAttempts >= yr) {
|
|
2350
2350
|
this.logger.error(
|
|
2351
2351
|
`Failed to authenticate: "${e.error}", check your server auth config`
|
|
2352
2352
|
), this.syncState.hasAuth() && this.syncState.clearAuth(), this.authState.state !== "noAuth" && this.setAndReportAuthFailed(this.authState.config.onAuthChange);
|
|
2353
2353
|
return;
|
|
2354
2354
|
}
|
|
2355
2355
|
this.authState.state === "waitingForServerConfirmationOfFreshToken" && (this.tokenConfirmationAttempts++, this._logVerbose(
|
|
2356
|
-
`retrying reauthentication, ${
|
|
2356
|
+
`retrying reauthentication, ${yr - this.tokenConfirmationAttempts} attempts remaining`
|
|
2357
2357
|
)), await this.stopSocket();
|
|
2358
2358
|
const n = await this.fetchTokenAndGuardAgainstRace(
|
|
2359
2359
|
this.authState.config.fetchToken,
|
|
@@ -2418,7 +2418,7 @@ class na {
|
|
|
2418
2418
|
return;
|
|
2419
2419
|
}
|
|
2420
2420
|
let s = Math.min(
|
|
2421
|
-
|
|
2421
|
+
sa,
|
|
2422
2422
|
(o - this.refreshTokenLeewaySeconds) * 1e3
|
|
2423
2423
|
);
|
|
2424
2424
|
s <= 0 && (this.logger.warn(
|
|
@@ -2475,7 +2475,7 @@ class na {
|
|
|
2475
2475
|
}
|
|
2476
2476
|
decodeToken(e) {
|
|
2477
2477
|
try {
|
|
2478
|
-
return
|
|
2478
|
+
return $i(e);
|
|
2479
2479
|
} catch (n) {
|
|
2480
2480
|
return this._logVerbose(
|
|
2481
2481
|
`Error decoding token: ${n instanceof Error ? n.message : "Unknown error"}`
|
|
@@ -2486,34 +2486,34 @@ class na {
|
|
|
2486
2486
|
this.logger.logVerbose(`${e} [v${this.configVersion}]`);
|
|
2487
2487
|
}
|
|
2488
2488
|
}
|
|
2489
|
-
const
|
|
2489
|
+
const la = [
|
|
2490
2490
|
"convexClientConstructed",
|
|
2491
2491
|
"convexWebSocketOpen",
|
|
2492
2492
|
"convexFirstMessageReceived"
|
|
2493
2493
|
];
|
|
2494
|
-
function
|
|
2494
|
+
function ca(t, e) {
|
|
2495
2495
|
const n = { sessionId: e };
|
|
2496
2496
|
typeof performance > "u" || !performance.mark || performance.mark(t, { detail: n });
|
|
2497
2497
|
}
|
|
2498
|
-
function
|
|
2498
|
+
function ua(t) {
|
|
2499
2499
|
let e = t.name.slice(6);
|
|
2500
2500
|
return e = e.charAt(0).toLowerCase() + e.slice(1), {
|
|
2501
2501
|
name: e,
|
|
2502
2502
|
startTime: t.startTime
|
|
2503
2503
|
};
|
|
2504
2504
|
}
|
|
2505
|
-
function
|
|
2505
|
+
function ha(t) {
|
|
2506
2506
|
if (typeof performance > "u" || !performance.getEntriesByName)
|
|
2507
2507
|
return [];
|
|
2508
2508
|
const e = [];
|
|
2509
|
-
for (const n of
|
|
2509
|
+
for (const n of la) {
|
|
2510
2510
|
const r = performance.getEntriesByName(n).filter((i) => i.entryType === "mark").filter((i) => i.detail.sessionId === t);
|
|
2511
2511
|
e.push(...r);
|
|
2512
2512
|
}
|
|
2513
|
-
return e.map(
|
|
2513
|
+
return e.map(ua);
|
|
2514
2514
|
}
|
|
2515
|
-
var
|
|
2516
|
-
class
|
|
2515
|
+
var da = Object.defineProperty, fa = (t, e, n) => e in t ? da(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, E = (t, e, n) => fa(t, typeof e != "symbol" ? e + "" : e, n);
|
|
2516
|
+
class pa {
|
|
2517
2517
|
/**
|
|
2518
2518
|
* @param address - The url of your Convex deployment, often provided
|
|
2519
2519
|
* by an environment variable. E.g. `https://small-mouse-123.convex.cloud`.
|
|
@@ -2523,7 +2523,7 @@ class ca {
|
|
|
2523
2523
|
* @param options - See {@link BaseConvexClientOptions} for a full description.
|
|
2524
2524
|
*/
|
|
2525
2525
|
constructor(e, n, r) {
|
|
2526
|
-
if (
|
|
2526
|
+
if (E(this, "address"), E(this, "state"), E(this, "requestManager"), E(this, "webSocketManager"), E(this, "authenticationManager"), E(this, "remoteQuerySet"), E(this, "optimisticQueryResults"), E(this, "_transitionHandlerCounter", 0), E(this, "_nextRequestId"), E(this, "_onTransitionFns", /* @__PURE__ */ new Map()), E(this, "_sessionId"), E(this, "firstMessageReceived", !1), E(this, "debug"), E(this, "logger"), E(this, "maxObservedTimestamp"), E(this, "connectionStateSubscribers", /* @__PURE__ */ new Map()), E(this, "nextConnectionStateSubscriberId", 0), E(this, "_lastPublishedConnectionState"), E(this, "markConnectionStateDirty", () => {
|
|
2527
2527
|
Promise.resolve().then(() => {
|
|
2528
2528
|
const p = this.connectionState();
|
|
2529
2529
|
if (JSON.stringify(p) !== JSON.stringify(this._lastPublishedConnectionState)) {
|
|
@@ -2532,20 +2532,20 @@ class ca {
|
|
|
2532
2532
|
g(p);
|
|
2533
2533
|
}
|
|
2534
2534
|
});
|
|
2535
|
-
}),
|
|
2536
|
-
this.debug &&
|
|
2535
|
+
}), E(this, "mark", (p) => {
|
|
2536
|
+
this.debug && ca(p, this.sessionId);
|
|
2537
2537
|
}), typeof e == "object")
|
|
2538
2538
|
throw new Error(
|
|
2539
2539
|
"Passing a ClientConfig object is no longer supported. Pass the URL of the Convex deployment as a string directly."
|
|
2540
2540
|
);
|
|
2541
|
-
r?.skipConvexDeploymentUrlCheck !== !0 &&
|
|
2541
|
+
r?.skipConvexDeploymentUrlCheck !== !0 && cs(e), r = { ...r };
|
|
2542
2542
|
const i = r.authRefreshTokenLeewaySeconds ?? 10;
|
|
2543
2543
|
let o = r.webSocketConstructor;
|
|
2544
2544
|
if (!o && typeof WebSocket > "u")
|
|
2545
2545
|
throw new Error(
|
|
2546
2546
|
"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"
|
|
2547
2547
|
);
|
|
2548
|
-
o = o || WebSocket, this.debug = r.reportDebugInfoToConvex ?? !1, this.address = e, this.logger = r.logger === !1 ?
|
|
2548
|
+
o = o || WebSocket, this.debug = r.reportDebugInfoToConvex ?? !1, this.address = e, this.logger = r.logger === !1 ? Ci({ verbose: r.verbose ?? !1 }) : r.logger !== !0 && r.logger ? r.logger : ji({ verbose: r.verbose ?? !1 });
|
|
2549
2549
|
const s = e.search("://");
|
|
2550
2550
|
if (s === -1)
|
|
2551
2551
|
throw new Error("Provided address was not an absolute URL.");
|
|
@@ -2557,18 +2557,18 @@ class ca {
|
|
|
2557
2557
|
u = "wss";
|
|
2558
2558
|
else
|
|
2559
2559
|
throw new Error(`Unknown parent protocol ${a}`);
|
|
2560
|
-
const d = `${u}://${l}/api/${
|
|
2561
|
-
this.state = new
|
|
2560
|
+
const d = `${u}://${l}/api/${hr}/sync`;
|
|
2561
|
+
this.state = new Ts(), this.remoteQuerySet = new mr(
|
|
2562
2562
|
(p) => this.state.queryPath(p),
|
|
2563
2563
|
this.logger
|
|
2564
|
-
), this.requestManager = new
|
|
2564
|
+
), this.requestManager = new $s(
|
|
2565
2565
|
this.logger,
|
|
2566
2566
|
this.markConnectionStateDirty
|
|
2567
2567
|
);
|
|
2568
2568
|
const h = () => {
|
|
2569
2569
|
this.webSocketManager.pause(), this.state.pause();
|
|
2570
2570
|
};
|
|
2571
|
-
this.authenticationManager = new
|
|
2571
|
+
this.authenticationManager = new aa(
|
|
2572
2572
|
this.state,
|
|
2573
2573
|
{
|
|
2574
2574
|
authenticate: (p) => {
|
|
@@ -2587,9 +2587,9 @@ class ca {
|
|
|
2587
2587
|
logger: this.logger,
|
|
2588
2588
|
refreshTokenLeewaySeconds: i
|
|
2589
2589
|
}
|
|
2590
|
-
), this.optimisticQueryResults = new
|
|
2590
|
+
), this.optimisticQueryResults = new Os(), this.addOnTransitionHandler((p) => {
|
|
2591
2591
|
n(p.queries.map((g) => g.token));
|
|
2592
|
-
}), this._nextRequestId = 0, this._sessionId =
|
|
2592
|
+
}), this._nextRequestId = 0, this._sessionId = ea();
|
|
2593
2593
|
const { unsavedChangesWarning: f } = r;
|
|
2594
2594
|
if (typeof window > "u" || typeof window.addEventListener > "u") {
|
|
2595
2595
|
if (f === !0)
|
|
@@ -2603,7 +2603,7 @@ class ca {
|
|
|
2603
2603
|
return (p || window.event).returnValue = g, g;
|
|
2604
2604
|
}
|
|
2605
2605
|
});
|
|
2606
|
-
this.webSocketManager = new
|
|
2606
|
+
this.webSocketManager = new Xs(
|
|
2607
2607
|
d,
|
|
2608
2608
|
{
|
|
2609
2609
|
onOpen: (p) => {
|
|
@@ -2612,7 +2612,7 @@ class ca {
|
|
|
2612
2612
|
type: "Connect",
|
|
2613
2613
|
sessionId: this._sessionId,
|
|
2614
2614
|
maxObservedTimestamp: this.maxObservedTimestamp
|
|
2615
|
-
}), this.remoteQuerySet = new
|
|
2615
|
+
}), this.remoteQuerySet = new mr(
|
|
2616
2616
|
(x) => this.state.queryPath(x),
|
|
2617
2617
|
this.logger
|
|
2618
2618
|
);
|
|
@@ -2659,7 +2659,7 @@ class ca {
|
|
|
2659
2659
|
break;
|
|
2660
2660
|
}
|
|
2661
2661
|
case "FatalError": {
|
|
2662
|
-
const g =
|
|
2662
|
+
const g = Ss(this.logger, p.error);
|
|
2663
2663
|
throw this.webSocketManager.terminate(), g;
|
|
2664
2664
|
}
|
|
2665
2665
|
}
|
|
@@ -2759,7 +2759,7 @@ class ca {
|
|
|
2759
2759
|
let n = {};
|
|
2760
2760
|
if (e && e.tokenType === "User")
|
|
2761
2761
|
try {
|
|
2762
|
-
n = e ?
|
|
2762
|
+
n = e ? $i(e.value) : {};
|
|
2763
2763
|
} catch {
|
|
2764
2764
|
n = {};
|
|
2765
2765
|
}
|
|
@@ -2918,7 +2918,7 @@ class ca {
|
|
|
2918
2918
|
async mutation(e, n, r) {
|
|
2919
2919
|
const i = await this.mutationInternal(e, n, r);
|
|
2920
2920
|
if (!i.success)
|
|
2921
|
-
throw i.errorData !== void 0 ?
|
|
2921
|
+
throw i.errorData !== void 0 ? sn(
|
|
2922
2922
|
i,
|
|
2923
2923
|
new yt(
|
|
2924
2924
|
Ce("mutation", e, i)
|
|
@@ -3002,7 +3002,7 @@ class ca {
|
|
|
3002
3002
|
async action(e, n) {
|
|
3003
3003
|
const r = await this.actionInternal(e, n);
|
|
3004
3004
|
if (!r.success)
|
|
3005
|
-
throw r.errorData !== void 0 ?
|
|
3005
|
+
throw r.errorData !== void 0 ? sn(
|
|
3006
3006
|
r,
|
|
3007
3007
|
new yt(Ce("action", e, r))
|
|
3008
3008
|
) : new Error(Ce("action", e, r));
|
|
@@ -3061,7 +3061,7 @@ class ca {
|
|
|
3061
3061
|
*/
|
|
3062
3062
|
reportMarks() {
|
|
3063
3063
|
if (this.debug) {
|
|
3064
|
-
const e =
|
|
3064
|
+
const e = ha(this.sessionId);
|
|
3065
3065
|
this.webSocketManager.sendMessage({
|
|
3066
3066
|
type: "Event",
|
|
3067
3067
|
eventType: "ClientConnect",
|
|
@@ -3080,7 +3080,7 @@ class ca {
|
|
|
3080
3080
|
method: "POST",
|
|
3081
3081
|
headers: {
|
|
3082
3082
|
"Content-Type": "application/json",
|
|
3083
|
-
"Convex-Client": `npm-${
|
|
3083
|
+
"Convex-Client": `npm-${hr}`
|
|
3084
3084
|
},
|
|
3085
3085
|
body: JSON.stringify({ event: "LongWebsocketDisconnect" })
|
|
3086
3086
|
}).then((r) => {
|
|
@@ -3093,15 +3093,15 @@ class ca {
|
|
|
3093
3093
|
});
|
|
3094
3094
|
}
|
|
3095
3095
|
}
|
|
3096
|
-
function
|
|
3096
|
+
function Vt(t) {
|
|
3097
3097
|
if (typeof t != "object" || t === null || !Array.isArray(t.page) || typeof t.isDone != "boolean" || typeof t.continueCursor != "string")
|
|
3098
3098
|
throw new Error(`Not a valid paginated query result: ${t?.toString()}`);
|
|
3099
3099
|
return t;
|
|
3100
3100
|
}
|
|
3101
|
-
var
|
|
3102
|
-
class
|
|
3101
|
+
var ga = Object.defineProperty, ma = (t, e, n) => e in t ? ga(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, vr = (t, e, n) => ma(t, typeof e != "symbol" ? e + "" : e, n);
|
|
3102
|
+
class xa {
|
|
3103
3103
|
constructor(e, n) {
|
|
3104
|
-
this.client = e, this.onTransition = n,
|
|
3104
|
+
this.client = e, this.onTransition = n, vr(this, "paginatedQuerySet", /* @__PURE__ */ new Map()), vr(this, "lastTransitionTs"), this.lastTransitionTs = q.fromNumber(0), this.client.addOnTransitionHandler(
|
|
3105
3105
|
(r) => this.onBaseTransition(r)
|
|
3106
3106
|
);
|
|
3107
3107
|
}
|
|
@@ -3114,7 +3114,7 @@ class da {
|
|
|
3114
3114
|
* @returns Object with paginatedQueryToken and unsubscribe function
|
|
3115
3115
|
*/
|
|
3116
3116
|
subscribe(e, n, r) {
|
|
3117
|
-
const i = me(e), o =
|
|
3117
|
+
const i = me(e), o = fr(
|
|
3118
3118
|
i,
|
|
3119
3119
|
n,
|
|
3120
3120
|
r
|
|
@@ -3145,7 +3145,7 @@ class da {
|
|
|
3145
3145
|
* Throws an error when one of the pages has errored.
|
|
3146
3146
|
*/
|
|
3147
3147
|
localQueryResult(e, n, r) {
|
|
3148
|
-
const i = me(e), o =
|
|
3148
|
+
const i = me(e), o = fr(
|
|
3149
3149
|
i,
|
|
3150
3150
|
n,
|
|
3151
3151
|
r
|
|
@@ -3173,7 +3173,7 @@ class da {
|
|
|
3173
3173
|
o = !0, s = !1;
|
|
3174
3174
|
continue;
|
|
3175
3175
|
}
|
|
3176
|
-
const d =
|
|
3176
|
+
const d = Vt(u);
|
|
3177
3177
|
i = i.concat(d.page), s = !!d.isDone;
|
|
3178
3178
|
}
|
|
3179
3179
|
let l;
|
|
@@ -3218,7 +3218,7 @@ class da {
|
|
|
3218
3218
|
const r = this.queryTokenForLastPageOfPaginatedQuery(e), i = this.client.localQueryResultByToken(r);
|
|
3219
3219
|
if (!i)
|
|
3220
3220
|
return !1;
|
|
3221
|
-
const o =
|
|
3221
|
+
const o = Vt(i);
|
|
3222
3222
|
if (o.isDone)
|
|
3223
3223
|
return !1;
|
|
3224
3224
|
this.addPageToPaginatedQuery(
|
|
@@ -3276,7 +3276,7 @@ class da {
|
|
|
3276
3276
|
const u = s.get(a).queryToken, d = n(u);
|
|
3277
3277
|
if (!d)
|
|
3278
3278
|
continue;
|
|
3279
|
-
const h =
|
|
3279
|
+
const h = Vt(d);
|
|
3280
3280
|
h.splitCursor && (h.pageStatus === "SplitRecommended" || h.pageStatus === "SplitRequired" || // This client-driven page splitting condition will change in the future.
|
|
3281
3281
|
h.page.length > i.options.initialNumItems * 2) && this.splitPaginatedQueryPage(
|
|
3282
3282
|
i,
|
|
@@ -3374,7 +3374,7 @@ class da {
|
|
|
3374
3374
|
return n;
|
|
3375
3375
|
}
|
|
3376
3376
|
}
|
|
3377
|
-
function
|
|
3377
|
+
function ba({
|
|
3378
3378
|
// (Synchronously) returns the current value of our subscription.
|
|
3379
3379
|
getCurrentValue: t,
|
|
3380
3380
|
// This function is passed an event handler to attach to the subscription.
|
|
@@ -3406,13 +3406,13 @@ function fa({
|
|
|
3406
3406
|
};
|
|
3407
3407
|
}, [t, e]), i;
|
|
3408
3408
|
}
|
|
3409
|
-
var
|
|
3410
|
-
const
|
|
3411
|
-
if (typeof
|
|
3409
|
+
var ya = Object.defineProperty, va = (t, e, n) => e in t ? ya(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, ie = (t, e, n) => va(t, typeof e != "symbol" ? e + "" : e, n);
|
|
3410
|
+
const _a = 5e3;
|
|
3411
|
+
if (typeof jn > "u")
|
|
3412
3412
|
throw new Error("Required dependency 'react' not found");
|
|
3413
|
-
function
|
|
3413
|
+
function Ei(t, e, n) {
|
|
3414
3414
|
function r(i) {
|
|
3415
|
-
return
|
|
3415
|
+
return ja(i), e.mutation(t, i, {
|
|
3416
3416
|
optimisticUpdate: n
|
|
3417
3417
|
});
|
|
3418
3418
|
}
|
|
@@ -3423,10 +3423,10 @@ function Ti(t, e, n) {
|
|
|
3423
3423
|
t
|
|
3424
3424
|
)}`
|
|
3425
3425
|
);
|
|
3426
|
-
return
|
|
3426
|
+
return Ei(t, e, o);
|
|
3427
3427
|
}, r;
|
|
3428
3428
|
}
|
|
3429
|
-
class
|
|
3429
|
+
class wa {
|
|
3430
3430
|
/**
|
|
3431
3431
|
* @param address - The url of your Convex deployment, often provided
|
|
3432
3432
|
* by an environment variable. E.g. `https://small-mouse-123.convex.cloud`.
|
|
@@ -3443,7 +3443,7 @@ class xa {
|
|
|
3443
3443
|
);
|
|
3444
3444
|
if (!e.includes("://"))
|
|
3445
3445
|
throw new Error("Provided address was not an absolute URL.");
|
|
3446
|
-
this.address = e, this.listeners = /* @__PURE__ */ new Map(), this._logger = n?.logger === !1 ?
|
|
3446
|
+
this.address = e, this.listeners = /* @__PURE__ */ new Map(), this._logger = n?.logger === !1 ? Ci({ verbose: n?.verbose ?? !1 }) : n?.logger !== !0 && n?.logger ? n.logger : ji({ verbose: n?.verbose ?? !1 }), this.options = { ...n, logger: this._logger };
|
|
3447
3447
|
}
|
|
3448
3448
|
/**
|
|
3449
3449
|
* Return the address for this client, useful for creating a new client.
|
|
@@ -3463,13 +3463,13 @@ class xa {
|
|
|
3463
3463
|
get sync() {
|
|
3464
3464
|
if (this.closed)
|
|
3465
3465
|
throw new Error("ConvexReactClient has already been closed.");
|
|
3466
|
-
return this.cachedSync ? this.cachedSync : (this.cachedSync = new
|
|
3466
|
+
return this.cachedSync ? this.cachedSync : (this.cachedSync = new pa(
|
|
3467
3467
|
this.address,
|
|
3468
3468
|
() => {
|
|
3469
3469
|
},
|
|
3470
3470
|
// Use the PaginatedQueryClient's transition instead.
|
|
3471
3471
|
this.options
|
|
3472
|
-
), this.adminAuth && this.cachedSync.setAdminAuth(this.adminAuth, this.fakeUserIdentity), this.cachedPaginatedQueryClient = new
|
|
3472
|
+
), this.adminAuth && this.cachedSync.setAdminAuth(this.adminAuth, this.fakeUserIdentity), this.cachedPaginatedQueryClient = new xa(
|
|
3473
3473
|
this.cachedSync,
|
|
3474
3474
|
(e) => this.handleTransition(e)
|
|
3475
3475
|
), this.cachedSync);
|
|
@@ -3579,7 +3579,7 @@ class xa {
|
|
|
3579
3579
|
* an optional extendSubscriptionFor for how long to subscribe to the query.
|
|
3580
3580
|
*/
|
|
3581
3581
|
prewarmQuery(e) {
|
|
3582
|
-
const n = e.extendSubscriptionFor ??
|
|
3582
|
+
const n = e.extendSubscriptionFor ?? _a, i = this.watchQuery(e.query, e.args || {}).onUpdate(() => {
|
|
3583
3583
|
});
|
|
3584
3584
|
setTimeout(i, n);
|
|
3585
3585
|
}
|
|
@@ -3730,52 +3730,52 @@ class xa {
|
|
|
3730
3730
|
}
|
|
3731
3731
|
}
|
|
3732
3732
|
}
|
|
3733
|
-
const
|
|
3733
|
+
const Tn = jn.createContext(
|
|
3734
3734
|
void 0
|
|
3735
3735
|
// in the future this will be a mocked client for testing
|
|
3736
3736
|
);
|
|
3737
|
-
function
|
|
3738
|
-
return
|
|
3737
|
+
function ka() {
|
|
3738
|
+
return $t(Tn);
|
|
3739
3739
|
}
|
|
3740
|
-
const
|
|
3741
|
-
|
|
3740
|
+
const Sa = ({ client: t, children: e }) => jn.createElement(
|
|
3741
|
+
Tn.Provider,
|
|
3742
3742
|
{ value: t },
|
|
3743
3743
|
e
|
|
3744
3744
|
);
|
|
3745
|
-
function
|
|
3746
|
-
const n = e[0] === "skip", r = e[0] === "skip" ? {} : oe(e[0]), i = typeof t == "string" ?
|
|
3745
|
+
function _r(t, ...e) {
|
|
3746
|
+
const n = e[0] === "skip", r = e[0] === "skip" ? {} : oe(e[0]), i = typeof t == "string" ? Ti(t) : t, o = O(i), s = K(
|
|
3747
3747
|
() => n ? {} : { query: { query: i, args: r } },
|
|
3748
3748
|
// Stringify args so args that are semantically the same don't trigger a
|
|
3749
3749
|
// rerender. Saves developers from adding `useMemo` on every args usage.
|
|
3750
3750
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3751
3751
|
[JSON.stringify(re(r)), o, n]
|
|
3752
|
-
), a =
|
|
3752
|
+
), a = Aa(s).query;
|
|
3753
3753
|
if (a instanceof Error)
|
|
3754
3754
|
throw a;
|
|
3755
3755
|
return a;
|
|
3756
3756
|
}
|
|
3757
|
-
function
|
|
3758
|
-
const e = typeof t == "string" ?
|
|
3757
|
+
function It(t) {
|
|
3758
|
+
const e = typeof t == "string" ? Ti(t) : t, n = $t(Tn);
|
|
3759
3759
|
if (n === void 0)
|
|
3760
3760
|
throw new Error(
|
|
3761
3761
|
"Could not find Convex client! `useMutation` must be used in the React component tree under `ConvexProvider`. Did you forget it? See https://docs.convex.dev/quick-start#set-up-convex-in-your-react-app"
|
|
3762
3762
|
);
|
|
3763
|
-
return
|
|
3764
|
-
() =>
|
|
3763
|
+
return K(
|
|
3764
|
+
() => Ei(e, n),
|
|
3765
3765
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3766
3766
|
[n, O(e)]
|
|
3767
3767
|
);
|
|
3768
3768
|
}
|
|
3769
|
-
function
|
|
3769
|
+
function ja(t) {
|
|
3770
3770
|
if (typeof t == "object" && t !== null && "bubbles" in t && "persist" in t && "isDefaultPrevented" in t)
|
|
3771
3771
|
throw new Error(
|
|
3772
3772
|
"Convex function called with SyntheticEvent object. Did you use a Convex function as an event handler directly? Event handlers like onClick receive an event object as their first argument. These SyntheticEvent objects are not valid Convex values. Try wrapping the function like `const handler = () => myMutation();` and using `handler` in the event handler."
|
|
3773
3773
|
);
|
|
3774
3774
|
}
|
|
3775
|
-
var
|
|
3776
|
-
class
|
|
3775
|
+
var Ca = Object.defineProperty, Ta = (t, e, n) => e in t ? Ca(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Ht = (t, e, n) => Ta(t, typeof e != "symbol" ? e + "" : e, n);
|
|
3776
|
+
class Ra {
|
|
3777
3777
|
constructor(e) {
|
|
3778
|
-
|
|
3778
|
+
Ht(this, "createWatch"), Ht(this, "queries"), Ht(this, "listeners"), this.createWatch = e, this.queries = {}, this.listeners = /* @__PURE__ */ new Set();
|
|
3779
3779
|
}
|
|
3780
3780
|
setQueries(e) {
|
|
3781
3781
|
for (const n of Object.keys(e)) {
|
|
@@ -3874,40 +3874,40 @@ class ka {
|
|
|
3874
3874
|
e();
|
|
3875
3875
|
}
|
|
3876
3876
|
}
|
|
3877
|
-
function
|
|
3878
|
-
const e =
|
|
3877
|
+
function Aa(t) {
|
|
3878
|
+
const e = ka();
|
|
3879
3879
|
if (e === void 0)
|
|
3880
3880
|
throw new Error(
|
|
3881
3881
|
"Could not find Convex client! `useQuery` must be used in the React component tree under `ConvexProvider`. Did you forget it? See https://docs.convex.dev/quick-start#set-up-convex-in-your-react-app"
|
|
3882
3882
|
);
|
|
3883
|
-
const n =
|
|
3883
|
+
const n = K(() => (r, i, {
|
|
3884
3884
|
journal: o,
|
|
3885
3885
|
paginationOptions: s
|
|
3886
3886
|
}) => s ? e.watchPaginatedQuery(r, i, s) : e.watchQuery(r, i, o ? { journal: o } : {}), [e]);
|
|
3887
|
-
return
|
|
3887
|
+
return $a(t, n);
|
|
3888
3888
|
}
|
|
3889
|
-
function
|
|
3890
|
-
const [n] = C(() => new
|
|
3889
|
+
function $a(t, e) {
|
|
3890
|
+
const [n] = C(() => new Ra(e));
|
|
3891
3891
|
n.createWatch !== e && n.setCreateWatch(e), T(() => () => n.destroy(), [n]);
|
|
3892
|
-
const r =
|
|
3892
|
+
const r = K(
|
|
3893
3893
|
() => ({
|
|
3894
3894
|
getCurrentValue: () => n.getLocalResults(t),
|
|
3895
3895
|
subscribe: (i) => (n.setQueries(t), n.subscribe(i))
|
|
3896
3896
|
}),
|
|
3897
3897
|
[n, t]
|
|
3898
3898
|
);
|
|
3899
|
-
return
|
|
3899
|
+
return ba(r);
|
|
3900
3900
|
}
|
|
3901
|
-
var
|
|
3902
|
-
function
|
|
3901
|
+
var Ea = /* @__PURE__ */ Symbol.for("preact-signals");
|
|
3902
|
+
function Pt() {
|
|
3903
3903
|
if (ae > 1)
|
|
3904
3904
|
ae--;
|
|
3905
3905
|
else {
|
|
3906
|
-
for (var t, e = !1;
|
|
3907
|
-
var n =
|
|
3908
|
-
for (
|
|
3906
|
+
for (var t, e = !1; Ge !== void 0; ) {
|
|
3907
|
+
var n = Ge;
|
|
3908
|
+
for (Ge = void 0, an++; n !== void 0; ) {
|
|
3909
3909
|
var r = n.o;
|
|
3910
|
-
if (n.o = void 0, n.f &= -3, !(8 & n.f) &&
|
|
3910
|
+
if (n.o = void 0, n.f &= -3, !(8 & n.f) && Mi(n)) try {
|
|
3911
3911
|
n.c();
|
|
3912
3912
|
} catch (i) {
|
|
3913
3913
|
e || (t = i, e = !0);
|
|
@@ -3915,20 +3915,20 @@ function It() {
|
|
|
3915
3915
|
n = r;
|
|
3916
3916
|
}
|
|
3917
3917
|
}
|
|
3918
|
-
if (
|
|
3918
|
+
if (an = 0, ae--, e) throw t;
|
|
3919
3919
|
}
|
|
3920
3920
|
}
|
|
3921
|
-
function
|
|
3921
|
+
function Ia(t) {
|
|
3922
3922
|
if (ae > 0) return t();
|
|
3923
3923
|
ae++;
|
|
3924
3924
|
try {
|
|
3925
3925
|
return t();
|
|
3926
3926
|
} finally {
|
|
3927
|
-
|
|
3927
|
+
Pt();
|
|
3928
3928
|
}
|
|
3929
3929
|
}
|
|
3930
3930
|
var w = void 0;
|
|
3931
|
-
function
|
|
3931
|
+
function Ii(t) {
|
|
3932
3932
|
var e = w;
|
|
3933
3933
|
w = void 0;
|
|
3934
3934
|
try {
|
|
@@ -3937,8 +3937,8 @@ function Ri(t) {
|
|
|
3937
3937
|
w = e;
|
|
3938
3938
|
}
|
|
3939
3939
|
}
|
|
3940
|
-
var
|
|
3941
|
-
function
|
|
3940
|
+
var Ge = void 0, ae = 0, an = 0, wt = 0;
|
|
3941
|
+
function Pi(t) {
|
|
3942
3942
|
if (w !== void 0) {
|
|
3943
3943
|
var e = t.n;
|
|
3944
3944
|
if (e === void 0 || e.t !== w)
|
|
@@ -3947,31 +3947,31 @@ function Ai(t) {
|
|
|
3947
3947
|
return e.i = 0, e.n !== void 0 && (e.n.p = e.p, e.p !== void 0 && (e.p.n = e.n), e.p = w.s, e.n = void 0, w.s.n = e, w.s = e), e;
|
|
3948
3948
|
}
|
|
3949
3949
|
}
|
|
3950
|
-
function
|
|
3950
|
+
function M(t, e) {
|
|
3951
3951
|
this.v = t, this.i = 0, this.n = void 0, this.t = void 0, this.W = e?.watched, this.Z = e?.unwatched, this.name = e?.name;
|
|
3952
3952
|
}
|
|
3953
|
-
|
|
3954
|
-
|
|
3953
|
+
M.prototype.brand = Ea;
|
|
3954
|
+
M.prototype.h = function() {
|
|
3955
3955
|
return !0;
|
|
3956
3956
|
};
|
|
3957
|
-
|
|
3957
|
+
M.prototype.S = function(t) {
|
|
3958
3958
|
var e = this, n = this.t;
|
|
3959
|
-
n !== t && t.e === void 0 && (t.x = n, this.t = t, n !== void 0 ? n.e = t :
|
|
3959
|
+
n !== t && t.e === void 0 && (t.x = n, this.t = t, n !== void 0 ? n.e = t : Ii(function() {
|
|
3960
3960
|
var r;
|
|
3961
3961
|
(r = e.W) == null || r.call(e);
|
|
3962
3962
|
}));
|
|
3963
3963
|
};
|
|
3964
|
-
|
|
3964
|
+
M.prototype.U = function(t) {
|
|
3965
3965
|
var e = this;
|
|
3966
3966
|
if (this.t !== void 0) {
|
|
3967
3967
|
var n = t.e, r = t.x;
|
|
3968
|
-
n !== void 0 && (n.x = r, t.e = void 0), r !== void 0 && (r.e = n, t.x = void 0), t === this.t && (this.t = r, r === void 0 &&
|
|
3968
|
+
n !== void 0 && (n.x = r, t.e = void 0), r !== void 0 && (r.e = n, t.x = void 0), t === this.t && (this.t = r, r === void 0 && Ii(function() {
|
|
3969
3969
|
var i;
|
|
3970
3970
|
(i = e.Z) == null || i.call(e);
|
|
3971
3971
|
}));
|
|
3972
3972
|
}
|
|
3973
3973
|
};
|
|
3974
|
-
|
|
3974
|
+
M.prototype.subscribe = function(t) {
|
|
3975
3975
|
var e = this;
|
|
3976
3976
|
return at(function() {
|
|
3977
3977
|
var n = e.value, r = w;
|
|
@@ -3983,16 +3983,16 @@ q.prototype.subscribe = function(t) {
|
|
|
3983
3983
|
}
|
|
3984
3984
|
}, { name: "sub" });
|
|
3985
3985
|
};
|
|
3986
|
-
|
|
3986
|
+
M.prototype.valueOf = function() {
|
|
3987
3987
|
return this.value;
|
|
3988
3988
|
};
|
|
3989
|
-
|
|
3989
|
+
M.prototype.toString = function() {
|
|
3990
3990
|
return this.value + "";
|
|
3991
3991
|
};
|
|
3992
|
-
|
|
3992
|
+
M.prototype.toJSON = function() {
|
|
3993
3993
|
return this.value;
|
|
3994
3994
|
};
|
|
3995
|
-
|
|
3995
|
+
M.prototype.peek = function() {
|
|
3996
3996
|
var t = w;
|
|
3997
3997
|
w = void 0;
|
|
3998
3998
|
try {
|
|
@@ -4001,28 +4001,28 @@ q.prototype.peek = function() {
|
|
|
4001
4001
|
w = t;
|
|
4002
4002
|
}
|
|
4003
4003
|
};
|
|
4004
|
-
Object.defineProperty(
|
|
4005
|
-
var t =
|
|
4004
|
+
Object.defineProperty(M.prototype, "value", { get: function() {
|
|
4005
|
+
var t = Pi(this);
|
|
4006
4006
|
return t !== void 0 && (t.i = this.i), this.v;
|
|
4007
4007
|
}, set: function(t) {
|
|
4008
4008
|
if (t !== this.v) {
|
|
4009
|
-
if (
|
|
4009
|
+
if (an > 100) throw new Error("Cycle detected");
|
|
4010
4010
|
this.v = t, this.i++, wt++, ae++;
|
|
4011
4011
|
try {
|
|
4012
4012
|
for (var e = this.t; e !== void 0; e = e.x) e.t.N();
|
|
4013
4013
|
} finally {
|
|
4014
|
-
|
|
4014
|
+
Pt();
|
|
4015
4015
|
}
|
|
4016
4016
|
}
|
|
4017
4017
|
} });
|
|
4018
|
-
function
|
|
4019
|
-
return new
|
|
4018
|
+
function R(t, e) {
|
|
4019
|
+
return new M(t, e);
|
|
4020
4020
|
}
|
|
4021
|
-
function
|
|
4021
|
+
function Mi(t) {
|
|
4022
4022
|
for (var e = t.s; e !== void 0; e = e.n) if (e.S.i !== e.i || !e.S.h() || e.S.i !== e.i) return !0;
|
|
4023
4023
|
return !1;
|
|
4024
4024
|
}
|
|
4025
|
-
function
|
|
4025
|
+
function Li(t) {
|
|
4026
4026
|
for (var e = t.s; e !== void 0; e = e.n) {
|
|
4027
4027
|
var n = e.S.n;
|
|
4028
4028
|
if (n !== void 0 && (e.r = n), e.S.n = e, e.i = -1, e.n === void 0) {
|
|
@@ -4031,7 +4031,7 @@ function Ei(t) {
|
|
|
4031
4031
|
}
|
|
4032
4032
|
}
|
|
4033
4033
|
}
|
|
4034
|
-
function
|
|
4034
|
+
function qi(t) {
|
|
4035
4035
|
for (var e = t.s, n = void 0; e !== void 0; ) {
|
|
4036
4036
|
var r = e.p;
|
|
4037
4037
|
e.i === -1 ? (e.S.U(e), r !== void 0 && (r.n = e.n), e.n !== void 0 && (e.n.p = r)) : n = e, e.S.n = e.r, e.r !== void 0 && (e.r = void 0), e = r;
|
|
@@ -4039,33 +4039,33 @@ function Ii(t) {
|
|
|
4039
4039
|
t.s = n;
|
|
4040
4040
|
}
|
|
4041
4041
|
function ye(t, e) {
|
|
4042
|
-
|
|
4042
|
+
M.call(this, void 0), this.x = t, this.s = void 0, this.g = wt - 1, this.f = 4, this.W = e?.watched, this.Z = e?.unwatched, this.name = e?.name;
|
|
4043
4043
|
}
|
|
4044
|
-
ye.prototype = new
|
|
4044
|
+
ye.prototype = new M();
|
|
4045
4045
|
ye.prototype.h = function() {
|
|
4046
4046
|
if (this.f &= -3, 1 & this.f) return !1;
|
|
4047
4047
|
if ((36 & this.f) == 32 || (this.f &= -5, this.g === wt)) return !0;
|
|
4048
|
-
if (this.g = wt, this.f |= 1, this.i > 0 &&
|
|
4048
|
+
if (this.g = wt, this.f |= 1, this.i > 0 && !Mi(this))
|
|
4049
4049
|
return this.f &= -2, !0;
|
|
4050
4050
|
var t = w;
|
|
4051
4051
|
try {
|
|
4052
|
-
|
|
4052
|
+
Li(this), w = this;
|
|
4053
4053
|
var e = this.x();
|
|
4054
4054
|
(16 & this.f || this.v !== e || this.i === 0) && (this.v = e, this.f &= -17, this.i++);
|
|
4055
4055
|
} catch (n) {
|
|
4056
4056
|
this.v = n, this.f |= 16, this.i++;
|
|
4057
4057
|
}
|
|
4058
|
-
return w = t,
|
|
4058
|
+
return w = t, qi(this), this.f &= -2, !0;
|
|
4059
4059
|
};
|
|
4060
4060
|
ye.prototype.S = function(t) {
|
|
4061
4061
|
if (this.t === void 0) {
|
|
4062
4062
|
this.f |= 36;
|
|
4063
4063
|
for (var e = this.s; e !== void 0; e = e.n) e.S.S(e);
|
|
4064
4064
|
}
|
|
4065
|
-
|
|
4065
|
+
M.prototype.S.call(this, t);
|
|
4066
4066
|
};
|
|
4067
4067
|
ye.prototype.U = function(t) {
|
|
4068
|
-
if (this.t !== void 0 && (
|
|
4068
|
+
if (this.t !== void 0 && (M.prototype.U.call(this, t), this.t === void 0)) {
|
|
4069
4069
|
this.f &= -33;
|
|
4070
4070
|
for (var e = this.s; e !== void 0; e = e.n) e.S.U(e);
|
|
4071
4071
|
}
|
|
@@ -4078,14 +4078,14 @@ ye.prototype.N = function() {
|
|
|
4078
4078
|
};
|
|
4079
4079
|
Object.defineProperty(ye.prototype, "value", { get: function() {
|
|
4080
4080
|
if (1 & this.f) throw new Error("Cycle detected");
|
|
4081
|
-
var t =
|
|
4081
|
+
var t = Pi(this);
|
|
4082
4082
|
if (this.h(), t !== void 0 && (t.i = this.i), 16 & this.f) throw this.v;
|
|
4083
4083
|
return this.v;
|
|
4084
4084
|
} });
|
|
4085
|
-
function
|
|
4085
|
+
function ln(t, e) {
|
|
4086
4086
|
return new ye(t, e);
|
|
4087
4087
|
}
|
|
4088
|
-
function
|
|
4088
|
+
function Oi(t) {
|
|
4089
4089
|
var e = t.u;
|
|
4090
4090
|
if (t.u = void 0, typeof e == "function") {
|
|
4091
4091
|
ae++;
|
|
@@ -4094,24 +4094,24 @@ function Mi(t) {
|
|
|
4094
4094
|
try {
|
|
4095
4095
|
e();
|
|
4096
4096
|
} catch (r) {
|
|
4097
|
-
throw t.f &= -2, t.f |= 8,
|
|
4097
|
+
throw t.f &= -2, t.f |= 8, Rn(t), r;
|
|
4098
4098
|
} finally {
|
|
4099
|
-
w = n,
|
|
4099
|
+
w = n, Pt();
|
|
4100
4100
|
}
|
|
4101
4101
|
}
|
|
4102
4102
|
}
|
|
4103
|
-
function
|
|
4103
|
+
function Rn(t) {
|
|
4104
4104
|
for (var e = t.s; e !== void 0; e = e.n) e.S.U(e);
|
|
4105
|
-
t.x = void 0, t.s = void 0,
|
|
4105
|
+
t.x = void 0, t.s = void 0, Oi(t);
|
|
4106
4106
|
}
|
|
4107
|
-
function
|
|
4107
|
+
function Pa(t) {
|
|
4108
4108
|
if (w !== this) throw new Error("Out-of-order effect");
|
|
4109
|
-
|
|
4109
|
+
qi(this), w = t, this.f &= -2, 8 & this.f && Rn(this), Pt();
|
|
4110
4110
|
}
|
|
4111
|
-
function
|
|
4111
|
+
function qe(t, e) {
|
|
4112
4112
|
this.x = t, this.u = void 0, this.s = void 0, this.o = void 0, this.f = 32, this.name = e?.name;
|
|
4113
4113
|
}
|
|
4114
|
-
|
|
4114
|
+
qe.prototype.c = function() {
|
|
4115
4115
|
var t = this.S();
|
|
4116
4116
|
try {
|
|
4117
4117
|
if (8 & this.f || this.x === void 0) return;
|
|
@@ -4121,23 +4121,23 @@ Pe.prototype.c = function() {
|
|
|
4121
4121
|
t();
|
|
4122
4122
|
}
|
|
4123
4123
|
};
|
|
4124
|
-
|
|
4124
|
+
qe.prototype.S = function() {
|
|
4125
4125
|
if (1 & this.f) throw new Error("Cycle detected");
|
|
4126
|
-
this.f |= 1, this.f &= -9,
|
|
4126
|
+
this.f |= 1, this.f &= -9, Oi(this), Li(this), ae++;
|
|
4127
4127
|
var t = w;
|
|
4128
|
-
return w = this,
|
|
4128
|
+
return w = this, Pa.bind(this, t);
|
|
4129
4129
|
};
|
|
4130
|
-
|
|
4131
|
-
2 & this.f || (this.f |= 2, this.o =
|
|
4130
|
+
qe.prototype.N = function() {
|
|
4131
|
+
2 & this.f || (this.f |= 2, this.o = Ge, Ge = this);
|
|
4132
4132
|
};
|
|
4133
|
-
|
|
4134
|
-
this.f |= 8, 1 & this.f ||
|
|
4133
|
+
qe.prototype.d = function() {
|
|
4134
|
+
this.f |= 8, 1 & this.f || Rn(this);
|
|
4135
4135
|
};
|
|
4136
|
-
|
|
4136
|
+
qe.prototype.dispose = function() {
|
|
4137
4137
|
this.d();
|
|
4138
4138
|
};
|
|
4139
4139
|
function at(t, e) {
|
|
4140
|
-
var n = new
|
|
4140
|
+
var n = new qe(t, e);
|
|
4141
4141
|
try {
|
|
4142
4142
|
n.c();
|
|
4143
4143
|
} catch (i) {
|
|
@@ -4146,11 +4146,11 @@ function at(t, e) {
|
|
|
4146
4146
|
var r = n.d.bind(n);
|
|
4147
4147
|
return r[Symbol.dispose] = r, r;
|
|
4148
4148
|
}
|
|
4149
|
-
var
|
|
4149
|
+
var Ni, ft, Ma = typeof window < "u" && !!window.__PREACT_SIGNALS_DEVTOOLS__, zi = [];
|
|
4150
4150
|
at(function() {
|
|
4151
|
-
|
|
4151
|
+
Ni = this.N;
|
|
4152
4152
|
})();
|
|
4153
|
-
function
|
|
4153
|
+
function Oe(t, e) {
|
|
4154
4154
|
b[t] = e.bind(null, b[t] || function() {
|
|
4155
4155
|
});
|
|
4156
4156
|
}
|
|
@@ -4161,21 +4161,21 @@ function kt(t) {
|
|
|
4161
4161
|
}
|
|
4162
4162
|
ft = t && t.S();
|
|
4163
4163
|
}
|
|
4164
|
-
function
|
|
4165
|
-
var e = this, n = t.data, r =
|
|
4164
|
+
function Bi(t) {
|
|
4165
|
+
var e = this, n = t.data, r = Te(n);
|
|
4166
4166
|
r.value = n;
|
|
4167
|
-
var i =
|
|
4167
|
+
var i = K(function() {
|
|
4168
4168
|
for (var l = e, a = e.__v; a = a.__; ) if (a.__c) {
|
|
4169
4169
|
a.__c.__$f |= 4;
|
|
4170
4170
|
break;
|
|
4171
4171
|
}
|
|
4172
|
-
var u =
|
|
4172
|
+
var u = ln(function() {
|
|
4173
4173
|
var p = r.value.value;
|
|
4174
4174
|
return p === 0 ? 0 : p === !0 ? "" : p || "";
|
|
4175
|
-
}), d =
|
|
4176
|
-
return !Array.isArray(u.value) && !
|
|
4175
|
+
}), d = ln(function() {
|
|
4176
|
+
return !Array.isArray(u.value) && !Dr(u.value);
|
|
4177
4177
|
}), h = at(function() {
|
|
4178
|
-
if (this.N =
|
|
4178
|
+
if (this.N = Fi, d.value) {
|
|
4179
4179
|
var p = u.value;
|
|
4180
4180
|
l.__v && l.__v.__e && l.__v.__e.nodeType === 3 && (l.__v.__e.data = p);
|
|
4181
4181
|
}
|
|
@@ -4186,21 +4186,21 @@ function Li(t) {
|
|
|
4186
4186
|
}, []), o = i[0], s = i[1];
|
|
4187
4187
|
return o.value ? s.peek() : s.value;
|
|
4188
4188
|
}
|
|
4189
|
-
|
|
4190
|
-
Object.defineProperties(
|
|
4189
|
+
Bi.displayName = "ReactiveTextNode";
|
|
4190
|
+
Object.defineProperties(M.prototype, { constructor: { configurable: !0, value: void 0 }, type: { configurable: !0, value: Bi }, props: { configurable: !0, get: function() {
|
|
4191
4191
|
return { data: this };
|
|
4192
4192
|
} }, __b: { configurable: !0, value: 1 } });
|
|
4193
|
-
|
|
4193
|
+
Oe("__b", function(t, e) {
|
|
4194
4194
|
if (typeof e.type == "string") {
|
|
4195
4195
|
var n, r = e.props;
|
|
4196
4196
|
for (var i in r) if (i !== "children") {
|
|
4197
4197
|
var o = r[i];
|
|
4198
|
-
o instanceof
|
|
4198
|
+
o instanceof M && (n || (e.__np = n = {}), n[i] = o, r[i] = o.peek());
|
|
4199
4199
|
}
|
|
4200
4200
|
}
|
|
4201
4201
|
t(e);
|
|
4202
4202
|
});
|
|
4203
|
-
|
|
4203
|
+
Oe("__r", function(t, e) {
|
|
4204
4204
|
if (t(e), e.type !== F) {
|
|
4205
4205
|
kt();
|
|
4206
4206
|
var n, r = e.__c;
|
|
@@ -4211,14 +4211,14 @@ Le("__r", function(t, e) {
|
|
|
4211
4211
|
}, { name: o }), s.c = i, s;
|
|
4212
4212
|
})(function() {
|
|
4213
4213
|
var i;
|
|
4214
|
-
|
|
4214
|
+
Ma && ((i = n.y) == null || i.call(n)), r.__$f |= 1, r.setState({});
|
|
4215
4215
|
}, typeof e.type == "function" ? e.type.displayName || e.type.name : ""))), kt(n);
|
|
4216
4216
|
}
|
|
4217
4217
|
});
|
|
4218
|
-
|
|
4218
|
+
Oe("__e", function(t, e, n, r) {
|
|
4219
4219
|
kt(), t(e, n, r);
|
|
4220
4220
|
});
|
|
4221
|
-
|
|
4221
|
+
Oe("diffed", function(t, e) {
|
|
4222
4222
|
kt();
|
|
4223
4223
|
var n;
|
|
4224
4224
|
if (typeof e.type == "string" && (n = e.__e)) {
|
|
@@ -4233,23 +4233,23 @@ Le("diffed", function(t, e) {
|
|
|
4233
4233
|
o = {}, n.U = o;
|
|
4234
4234
|
for (var a in r) {
|
|
4235
4235
|
var u = o[a], d = r[a];
|
|
4236
|
-
u === void 0 ? (u =
|
|
4236
|
+
u === void 0 ? (u = La(n, a, d, i), o[a] = u) : u.o(d, i);
|
|
4237
4237
|
}
|
|
4238
4238
|
}
|
|
4239
4239
|
}
|
|
4240
4240
|
t(e);
|
|
4241
4241
|
});
|
|
4242
|
-
function
|
|
4243
|
-
var i = e in t && t.ownerSVGElement === void 0, o =
|
|
4242
|
+
function La(t, e, n, r) {
|
|
4243
|
+
var i = e in t && t.ownerSVGElement === void 0, o = R(n);
|
|
4244
4244
|
return { o: function(s, l) {
|
|
4245
4245
|
o.value = s, r = l;
|
|
4246
4246
|
}, d: at(function() {
|
|
4247
|
-
this.N =
|
|
4247
|
+
this.N = Fi;
|
|
4248
4248
|
var s = o.value.value;
|
|
4249
4249
|
r[e] !== s && (r[e] = s, i ? t[e] = s : s != null && (s !== !1 || e[4] === "-") ? t.setAttribute(e, s) : t.removeAttribute(e));
|
|
4250
4250
|
}) };
|
|
4251
4251
|
}
|
|
4252
|
-
|
|
4252
|
+
Oe("unmount", function(t, e) {
|
|
4253
4253
|
if (typeof e.type == "string") {
|
|
4254
4254
|
var n = e.__e;
|
|
4255
4255
|
if (n) {
|
|
@@ -4271,10 +4271,10 @@ Le("unmount", function(t, e) {
|
|
|
4271
4271
|
}
|
|
4272
4272
|
t(e);
|
|
4273
4273
|
});
|
|
4274
|
-
|
|
4274
|
+
Oe("__h", function(t, e, n, r) {
|
|
4275
4275
|
(r < 3 || r === 9) && (e.__$f |= 2), t(e, n, r);
|
|
4276
4276
|
});
|
|
4277
|
-
|
|
4277
|
+
G.prototype.shouldComponentUpdate = function(t, e) {
|
|
4278
4278
|
if (this.__R) return !0;
|
|
4279
4279
|
var n = this.__$u, r = n && n.s !== void 0;
|
|
4280
4280
|
for (var i in e) return !0;
|
|
@@ -4286,32 +4286,32 @@ K.prototype.shouldComponentUpdate = function(t, e) {
|
|
|
4286
4286
|
for (var l in this.props) if (!(l in t)) return !0;
|
|
4287
4287
|
return !1;
|
|
4288
4288
|
};
|
|
4289
|
-
function
|
|
4290
|
-
return
|
|
4291
|
-
return
|
|
4289
|
+
function Te(t, e) {
|
|
4290
|
+
return K(function() {
|
|
4291
|
+
return R(t, e);
|
|
4292
4292
|
}, []);
|
|
4293
4293
|
}
|
|
4294
|
-
var
|
|
4294
|
+
var qa = function(t) {
|
|
4295
4295
|
queueMicrotask(function() {
|
|
4296
4296
|
queueMicrotask(t);
|
|
4297
4297
|
});
|
|
4298
4298
|
};
|
|
4299
|
-
function
|
|
4300
|
-
|
|
4301
|
-
for (var t; t =
|
|
4299
|
+
function Oa() {
|
|
4300
|
+
Ia(function() {
|
|
4301
|
+
for (var t; t = zi.shift(); ) Ni.call(t);
|
|
4302
4302
|
});
|
|
4303
4303
|
}
|
|
4304
|
-
function
|
|
4305
|
-
|
|
4304
|
+
function Fi() {
|
|
4305
|
+
zi.push(this) === 1 && (b.requestAnimationFrame || qa)(Oa);
|
|
4306
4306
|
}
|
|
4307
|
-
const
|
|
4308
|
-
function
|
|
4307
|
+
const P = R(!1), St = R(void 0), le = R(void 0), cn = R([]), un = R([]), Ui = R(null);
|
|
4308
|
+
function Na(t) {
|
|
4309
4309
|
return t.replace(/\.convex\.site\b/, ".convex.cloud");
|
|
4310
4310
|
}
|
|
4311
|
-
function
|
|
4311
|
+
function Qi(t) {
|
|
4312
4312
|
return t.replace(/\.convex\.cloud\b/, ".convex.site");
|
|
4313
4313
|
}
|
|
4314
|
-
function
|
|
4314
|
+
function za(t, e) {
|
|
4315
4315
|
const n = t.title ?? e?.title ?? "Assistant";
|
|
4316
4316
|
return {
|
|
4317
4317
|
title: n,
|
|
@@ -4333,23 +4333,23 @@ function qa(t, e) {
|
|
|
4333
4333
|
windowHeight: t.windowHeight ?? e?.windowHeight
|
|
4334
4334
|
};
|
|
4335
4335
|
}
|
|
4336
|
-
async function
|
|
4336
|
+
async function Ba(t, e, n, r) {
|
|
4337
4337
|
const i = new URL(`${t}/widget/config`);
|
|
4338
4338
|
i.searchParams.set("orgSlug", e), r && i.searchParams.set("projSlug", r);
|
|
4339
4339
|
const o = await fetch(i.toString(), { signal: n });
|
|
4340
4340
|
return o.ok ? o.json() : null;
|
|
4341
4341
|
}
|
|
4342
|
-
function
|
|
4342
|
+
function Fa(t, e, n) {
|
|
4343
4343
|
const [r, i] = C(null);
|
|
4344
4344
|
return T(() => {
|
|
4345
4345
|
i(null);
|
|
4346
|
-
const o = n ?? "https://festive-mouse-978.eu-west-1.convex.cloud", s = o ?
|
|
4346
|
+
const o = n ?? "https://festive-mouse-978.eu-west-1.convex.cloud", s = o ? Qi(o) : void 0;
|
|
4347
4347
|
if (!s || !t)
|
|
4348
4348
|
return;
|
|
4349
4349
|
const l = new AbortController();
|
|
4350
4350
|
async function a(u) {
|
|
4351
4351
|
try {
|
|
4352
|
-
const d = await
|
|
4352
|
+
const d = await Ba(u, t, l.signal, e);
|
|
4353
4353
|
d && i(d);
|
|
4354
4354
|
} catch (d) {
|
|
4355
4355
|
if (d instanceof Error && d.name === "AbortError")
|
|
@@ -4361,7 +4361,7 @@ function La(t, e, n) {
|
|
|
4361
4361
|
};
|
|
4362
4362
|
}, [t, e, n]), r;
|
|
4363
4363
|
}
|
|
4364
|
-
async function
|
|
4364
|
+
async function Di(t, e, n) {
|
|
4365
4365
|
try {
|
|
4366
4366
|
const r = await fetch(`${e}/widget/bootstrap`, {
|
|
4367
4367
|
method: "POST",
|
|
@@ -4370,39 +4370,99 @@ async function Bi(t, e, n) {
|
|
|
4370
4370
|
credentials: "omit"
|
|
4371
4371
|
});
|
|
4372
4372
|
if (r.ok) {
|
|
4373
|
-
const i = await r.json();
|
|
4374
|
-
return { ok: !0, token: i.token, excludePaths: i.excludePaths };
|
|
4373
|
+
const i = await r.json(), o = i.allowedUrls ?? (i.allowedUrl ? [i.allowedUrl] : []);
|
|
4374
|
+
return { ok: !0, token: i.token, excludePaths: i.excludePaths, allowedUrls: o };
|
|
4375
4375
|
}
|
|
4376
4376
|
return r.status === 403 ? { ok: !1, error: "unauthorized" } : r.status === 404 ? { ok: !1, error: "not_found" } : r.status === 429 ? { ok: !1, error: "rate_limited", retryAfterSec: Number(r.headers.get("Retry-After")) || 60 } : { ok: !1, error: "network" };
|
|
4377
4377
|
} catch {
|
|
4378
4378
|
return { ok: !1, error: "network" };
|
|
4379
4379
|
}
|
|
4380
4380
|
}
|
|
4381
|
-
function
|
|
4381
|
+
function Ua(t, e) {
|
|
4382
|
+
return e.some((n) => n === "/" ? t === "/" : t === n || t.startsWith(n + "/"));
|
|
4383
|
+
}
|
|
4384
|
+
function wr(t, e) {
|
|
4385
|
+
try {
|
|
4386
|
+
const n = new URL(t), r = new URL(e);
|
|
4387
|
+
if (n.origin !== r.origin)
|
|
4388
|
+
return !1;
|
|
4389
|
+
const i = r.pathname.replace(/\/$/, "");
|
|
4390
|
+
if (!i)
|
|
4391
|
+
return !0;
|
|
4392
|
+
const o = n.pathname.replace(/\/$/, "");
|
|
4393
|
+
return o === i || o.startsWith(i + "/");
|
|
4394
|
+
} catch {
|
|
4395
|
+
return !1;
|
|
4396
|
+
}
|
|
4397
|
+
}
|
|
4398
|
+
function Qa({
|
|
4399
|
+
orgSlug: t,
|
|
4400
|
+
projSlug: e,
|
|
4401
|
+
preToken: n,
|
|
4402
|
+
convexUrl: r,
|
|
4403
|
+
preAllowedUrls: i,
|
|
4404
|
+
preExcludedPaths: o
|
|
4405
|
+
}) {
|
|
4382
4406
|
T(() => {
|
|
4383
|
-
const
|
|
4384
|
-
if (!
|
|
4407
|
+
const s = r ?? "https://festive-mouse-978.eu-west-1.convex.cloud", l = s ? Qi(s) : void 0;
|
|
4408
|
+
if (!l || !t)
|
|
4409
|
+
return;
|
|
4410
|
+
if (Ui.value = { orgSlug: t, projSlug: e, siteUrl: l }, n) {
|
|
4411
|
+
cn.value = i ?? [], un.value = o ?? [];
|
|
4385
4412
|
return;
|
|
4386
|
-
|
|
4413
|
+
}
|
|
4414
|
+
let a = !1;
|
|
4387
4415
|
return (async () => {
|
|
4388
|
-
const
|
|
4389
|
-
if (!
|
|
4390
|
-
if (
|
|
4391
|
-
le.value =
|
|
4416
|
+
const u = await Di(t, l, e);
|
|
4417
|
+
if (!a)
|
|
4418
|
+
if (u.ok)
|
|
4419
|
+
le.value = u.token, cn.value = u.allowedUrls, un.value = u.excludePaths;
|
|
4392
4420
|
else {
|
|
4393
|
-
const
|
|
4394
|
-
|
|
4395
|
-
`[JexityChat]
|
|
4396
|
-
) :
|
|
4397
|
-
`[JexityChat] Bootstrap rate-limited for ${
|
|
4398
|
-
) : console.error(`[JexityChat] Bootstrap failed: ${
|
|
4421
|
+
const d = e ? `project '${t}/${e}'` : `org '${t}'`;
|
|
4422
|
+
u.error === "unauthorized" ? console.warn(
|
|
4423
|
+
`[JexityChat] Domain not authorized for ${d}. Check the widget's domain rules.`
|
|
4424
|
+
) : u.error === "not_found" ? console.error(`[JexityChat] No active widget config found for ${d}.`) : u.error === "rate_limited" ? console.error(
|
|
4425
|
+
`[JexityChat] Bootstrap rate-limited for ${d}. Retry after ${u.retryAfterSec ?? 60}s.`
|
|
4426
|
+
) : console.error(`[JexityChat] Bootstrap failed: ${u.error}`);
|
|
4399
4427
|
}
|
|
4400
4428
|
})(), () => {
|
|
4401
|
-
|
|
4429
|
+
a = !0;
|
|
4402
4430
|
};
|
|
4403
4431
|
}, [t, e, n, r]);
|
|
4404
4432
|
}
|
|
4405
|
-
const
|
|
4433
|
+
const jt = /* @__PURE__ */ new Set();
|
|
4434
|
+
let kr = !1;
|
|
4435
|
+
function Da() {
|
|
4436
|
+
if (kr)
|
|
4437
|
+
return;
|
|
4438
|
+
kr = !0;
|
|
4439
|
+
const t = history.pushState.bind(history), e = history.replaceState.bind(history);
|
|
4440
|
+
history.pushState = function(...n) {
|
|
4441
|
+
t(...n), jt.forEach((r) => r());
|
|
4442
|
+
}, history.replaceState = function(...n) {
|
|
4443
|
+
e(...n), jt.forEach((r) => r());
|
|
4444
|
+
};
|
|
4445
|
+
}
|
|
4446
|
+
function Va(t) {
|
|
4447
|
+
return jt.add(t), window.addEventListener("popstate", t), Da(), () => {
|
|
4448
|
+
jt.delete(t), window.removeEventListener("popstate", t);
|
|
4449
|
+
};
|
|
4450
|
+
}
|
|
4451
|
+
function Ha() {
|
|
4452
|
+
const t = Te(window.location.href);
|
|
4453
|
+
T(() => Va(() => {
|
|
4454
|
+
t.value = window.location.href;
|
|
4455
|
+
}), []);
|
|
4456
|
+
const e = cn.value, n = un.value, r = new URL(t.value).pathname, i = Ua(r, n);
|
|
4457
|
+
return T(() => {
|
|
4458
|
+
i ? console.warn(
|
|
4459
|
+
`[JexityChat] Widget hidden — current path is in the exclude list: ${r}`
|
|
4460
|
+
) : e.length > 0 && !e.some((o) => wr(t.value, o)) && console.warn(
|
|
4461
|
+
`[JexityChat] Widget hidden — current page does not match path rule. Allowed: ${e.join(", ")}`
|
|
4462
|
+
);
|
|
4463
|
+
}, [t.value, e, n]), i ? !1 : e.length === 0 ? !0 : e.some((o) => wr(t.value, o));
|
|
4464
|
+
}
|
|
4465
|
+
const Vi = {
|
|
4406
4466
|
title: "Assistant",
|
|
4407
4467
|
statusOnline: "Online · Responds in seconds",
|
|
4408
4468
|
inputPlaceholder: "Type a message…",
|
|
@@ -4486,7 +4546,7 @@ Use it to resume this conversation from any device.`,
|
|
|
4486
4546
|
replyTo: "Reply to {name}",
|
|
4487
4547
|
sourcesCountOne: "{count} source",
|
|
4488
4548
|
sourcesCountOther: "{count} sources"
|
|
4489
|
-
},
|
|
4549
|
+
}, Wa = {
|
|
4490
4550
|
title: "Assistent",
|
|
4491
4551
|
statusOnline: "Online · Antwortet in Sekunden",
|
|
4492
4552
|
inputPlaceholder: "Nachricht eingeben…",
|
|
@@ -4570,61 +4630,61 @@ Verwenden Sie sie, um diese Unterhaltung auf jedem Gerät fortzusetzen.`,
|
|
|
4570
4630
|
replyTo: "Antworten an {name}",
|
|
4571
4631
|
sourcesCountOne: "{count} Quelle",
|
|
4572
4632
|
sourcesCountOther: "{count} Quellen"
|
|
4573
|
-
},
|
|
4633
|
+
}, Ja = [
|
|
4574
4634
|
{ value: "de", label: "Deutsch", flag: "🇩🇪" },
|
|
4575
4635
|
{ value: "en", label: "English", flag: "🇬🇧" }
|
|
4576
|
-
],
|
|
4577
|
-
function
|
|
4578
|
-
return
|
|
4636
|
+
], Ga = "de", Ka = "jex-locale", An = R("de"), Za = { en: Vi, de: Wa };
|
|
4637
|
+
function A() {
|
|
4638
|
+
return Za[An.value] ?? Vi;
|
|
4579
4639
|
}
|
|
4580
|
-
function
|
|
4640
|
+
function Wt(t) {
|
|
4581
4641
|
if (!t)
|
|
4582
4642
|
return null;
|
|
4583
4643
|
const e = (t.split("-")[0] ?? "").toLowerCase();
|
|
4584
|
-
return
|
|
4644
|
+
return Ja.some((r) => r.value === e) ? e : null;
|
|
4585
4645
|
}
|
|
4586
|
-
function
|
|
4587
|
-
const e =
|
|
4646
|
+
function Hi(t) {
|
|
4647
|
+
const e = Wt(t);
|
|
4588
4648
|
if (e)
|
|
4589
4649
|
return e;
|
|
4590
4650
|
try {
|
|
4591
|
-
const n =
|
|
4651
|
+
const n = Wt(localStorage.getItem(Ka));
|
|
4592
4652
|
if (n)
|
|
4593
4653
|
return n;
|
|
4594
4654
|
} catch {
|
|
4595
4655
|
}
|
|
4596
4656
|
if (typeof navigator < "u") {
|
|
4597
|
-
const n =
|
|
4657
|
+
const n = Wt(navigator.language);
|
|
4598
4658
|
if (n)
|
|
4599
4659
|
return n;
|
|
4600
4660
|
}
|
|
4601
|
-
return
|
|
4661
|
+
return Ga;
|
|
4602
4662
|
}
|
|
4603
|
-
function
|
|
4663
|
+
function Ya(t) {
|
|
4604
4664
|
T(() => {
|
|
4605
4665
|
function e(n) {
|
|
4606
4666
|
const r = t ?? window.location.origin;
|
|
4607
4667
|
if (n.origin !== r || n.data?.type !== "jexity:config")
|
|
4608
4668
|
return;
|
|
4609
4669
|
const { locale: i } = n.data.payload;
|
|
4610
|
-
i && (
|
|
4670
|
+
i && (An.value = Hi(i));
|
|
4611
4671
|
}
|
|
4612
4672
|
return window.addEventListener("message", e), () => {
|
|
4613
4673
|
window.removeEventListener("message", e);
|
|
4614
4674
|
};
|
|
4615
4675
|
}, [t]);
|
|
4616
4676
|
}
|
|
4617
|
-
const
|
|
4618
|
-
function
|
|
4677
|
+
const Wi = "jex-session-history", Ji = Wi, Gi = 900 * 1e3, N = R([]), xe = R(null), Ki = ln(() => N.value.length > 0), Ke = R(null);
|
|
4678
|
+
function Xa() {
|
|
4619
4679
|
return "JEX-" + Math.random().toString(36).slice(2, 8).toUpperCase();
|
|
4620
4680
|
}
|
|
4621
|
-
function
|
|
4681
|
+
function el(t) {
|
|
4622
4682
|
try {
|
|
4623
|
-
const e = sessionStorage.getItem(
|
|
4683
|
+
const e = sessionStorage.getItem(Ji);
|
|
4624
4684
|
if (!e)
|
|
4625
4685
|
return [];
|
|
4626
4686
|
const n = JSON.parse(e);
|
|
4627
|
-
return n.v !== 1 || !Array.isArray(n.entries) ? [] : n.entries.filter((r) => t - r.lastActivityAt <=
|
|
4687
|
+
return n.v !== 1 || !Array.isArray(n.entries) ? [] : n.entries.filter((r) => t - r.lastActivityAt <= Gi);
|
|
4628
4688
|
} catch {
|
|
4629
4689
|
return [];
|
|
4630
4690
|
}
|
|
@@ -4632,25 +4692,25 @@ function Va(t) {
|
|
|
4632
4692
|
function Mt(t) {
|
|
4633
4693
|
try {
|
|
4634
4694
|
const e = { v: 1, entries: t };
|
|
4635
|
-
sessionStorage.setItem(
|
|
4695
|
+
sessionStorage.setItem(Ji, JSON.stringify(e));
|
|
4636
4696
|
} catch {
|
|
4637
4697
|
}
|
|
4638
4698
|
}
|
|
4639
|
-
function
|
|
4640
|
-
const t = Date.now(), e =
|
|
4699
|
+
function tl() {
|
|
4700
|
+
const t = Date.now(), e = el(t);
|
|
4641
4701
|
N.value = e, Mt(e), xe.value = e.length > 0 ? e[e.length - 1].ref : null;
|
|
4642
4702
|
}
|
|
4643
|
-
function
|
|
4644
|
-
const t =
|
|
4703
|
+
function Sr() {
|
|
4704
|
+
const t = Xa(), e = Date.now(), n = [...N.value, { ref: t, startedAt: e, lastActivityAt: e }];
|
|
4645
4705
|
return N.value = n, xe.value = t, Mt(n), t;
|
|
4646
4706
|
}
|
|
4647
|
-
function
|
|
4707
|
+
function jr(t) {
|
|
4648
4708
|
const e = Date.now(), n = N.value.map(
|
|
4649
4709
|
(r) => r.ref === t ? { ...r, lastActivityAt: e } : r
|
|
4650
4710
|
);
|
|
4651
4711
|
N.value = n, xe.value = t, Mt(n);
|
|
4652
4712
|
}
|
|
4653
|
-
function
|
|
4713
|
+
function $n(t) {
|
|
4654
4714
|
if (!t)
|
|
4655
4715
|
return;
|
|
4656
4716
|
const e = Date.now(), n = N.value.map(
|
|
@@ -4658,46 +4718,46 @@ function Tn(t) {
|
|
|
4658
4718
|
);
|
|
4659
4719
|
N.value = n, Mt(n);
|
|
4660
4720
|
}
|
|
4661
|
-
const z =
|
|
4662
|
-
function
|
|
4663
|
-
return
|
|
4721
|
+
const z = R(Zi());
|
|
4722
|
+
function Zi() {
|
|
4723
|
+
return Ki.value ? [{ id: "home" }] : [{ id: "chat" }];
|
|
4664
4724
|
}
|
|
4665
|
-
function
|
|
4666
|
-
z.value =
|
|
4725
|
+
function nl() {
|
|
4726
|
+
z.value = Zi();
|
|
4667
4727
|
}
|
|
4668
|
-
const
|
|
4728
|
+
const rl = R("screen");
|
|
4669
4729
|
function pe(t) {
|
|
4670
4730
|
z.value = [...z.value, t];
|
|
4671
4731
|
}
|
|
4672
|
-
function
|
|
4732
|
+
function Ct() {
|
|
4673
4733
|
z.value.length > 1 && (z.value = z.value.slice(0, -1));
|
|
4674
4734
|
}
|
|
4675
|
-
function
|
|
4735
|
+
function hn(t) {
|
|
4676
4736
|
z.value = [...z.value.slice(0, -1), t];
|
|
4677
4737
|
}
|
|
4678
|
-
const
|
|
4679
|
-
function
|
|
4680
|
-
return
|
|
4681
|
-
|
|
4738
|
+
const il = 6e4, nt = R(!1), dn = R(!1), fn = /* @__PURE__ */ new Set();
|
|
4739
|
+
function ol(t) {
|
|
4740
|
+
return fn.add(t), () => {
|
|
4741
|
+
fn.delete(t);
|
|
4682
4742
|
};
|
|
4683
4743
|
}
|
|
4684
|
-
function
|
|
4744
|
+
function sl() {
|
|
4685
4745
|
const t = xe.value;
|
|
4686
4746
|
return t ? N.value.find((n) => n.ref === t)?.lastActivityAt ?? null : null;
|
|
4687
4747
|
}
|
|
4688
|
-
function
|
|
4689
|
-
const e =
|
|
4748
|
+
function al(t) {
|
|
4749
|
+
const e = sl();
|
|
4690
4750
|
return e === null ? !1 : Date.now() - e > t;
|
|
4691
4751
|
}
|
|
4692
|
-
function
|
|
4752
|
+
function Cr() {
|
|
4693
4753
|
if (!(nt.value && N.value.length === 0)) {
|
|
4694
4754
|
N.value = [], xe.value = null;
|
|
4695
4755
|
try {
|
|
4696
|
-
sessionStorage.removeItem(
|
|
4756
|
+
sessionStorage.removeItem(Wi);
|
|
4697
4757
|
} catch (t) {
|
|
4698
4758
|
console.warn("[JexityChat] Idle-lock storage clear failed:", t);
|
|
4699
4759
|
}
|
|
4700
|
-
for (const t of
|
|
4760
|
+
for (const t of fn)
|
|
4701
4761
|
try {
|
|
4702
4762
|
t();
|
|
4703
4763
|
} catch (e) {
|
|
@@ -4706,27 +4766,27 @@ function _r() {
|
|
|
4706
4766
|
z.value = [{ id: "home" }], nt.value = !0;
|
|
4707
4767
|
}
|
|
4708
4768
|
}
|
|
4709
|
-
function
|
|
4769
|
+
function Jt() {
|
|
4710
4770
|
nt.value && (nt.value = !1);
|
|
4711
4771
|
}
|
|
4712
|
-
function
|
|
4772
|
+
function ll(t = Gi) {
|
|
4713
4773
|
let e = null;
|
|
4714
4774
|
const n = () => {
|
|
4715
4775
|
if (document.visibilityState === "hidden") {
|
|
4716
4776
|
e = Date.now();
|
|
4717
4777
|
return;
|
|
4718
4778
|
}
|
|
4719
|
-
e !== null && Date.now() - e > t &&
|
|
4779
|
+
e !== null && Date.now() - e > t && Cr(), e = null;
|
|
4720
4780
|
};
|
|
4721
4781
|
document.addEventListener("visibilitychange", n);
|
|
4722
4782
|
const r = setInterval(() => {
|
|
4723
|
-
|
|
4724
|
-
},
|
|
4783
|
+
dn.value || al(t) && Cr();
|
|
4784
|
+
}, il);
|
|
4725
4785
|
return () => {
|
|
4726
4786
|
document.removeEventListener("visibilitychange", n), clearInterval(r), e = null;
|
|
4727
4787
|
};
|
|
4728
4788
|
}
|
|
4729
|
-
function
|
|
4789
|
+
function cl(t) {
|
|
4730
4790
|
const e = {}, { primaryColor: n, theme: r } = t;
|
|
4731
4791
|
if (n && (e["--jex-primary"] = n, e["--jex-bg-trigger"] = n, e["--jex-bg-header"] = n, e["--jex-bg-msg-user"] = n, e["--jex-bg-send-btn"] = n), t.accentColor && (e["--jex-accent"] = t.accentColor), r?.bg) {
|
|
4732
4792
|
const i = r.bg;
|
|
@@ -4742,7 +4802,7 @@ function el(t) {
|
|
|
4742
4802
|
}
|
|
4743
4803
|
return t.fontFamily && (e["--jex-font-family"] = t.fontFamily), t.fontSize && (e["--jex-font-size"] = `${t.fontSize}px`), t.borderRadius && (e["--jex-radius"] = t.borderRadius), t.windowWidth && (e["--jex-window-width"] = `${t.windowWidth}px`), t.windowHeight && (e["--jex-window-height"] = `${t.windowHeight}px`), Object.keys(e).length > 0 ? e : void 0;
|
|
4744
4804
|
}
|
|
4745
|
-
function
|
|
4805
|
+
function En({ size: t = 24 }) {
|
|
4746
4806
|
return /* @__PURE__ */ c("svg", { width: t, height: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", children: [
|
|
4747
4807
|
/* @__PURE__ */ c("path", { d: "M12 8V4H8" }),
|
|
4748
4808
|
/* @__PURE__ */ c("rect", { width: "16", height: "12", x: "4", y: "8", rx: "2" }),
|
|
@@ -4752,64 +4812,64 @@ function Rn({ size: t = 24 }) {
|
|
|
4752
4812
|
/* @__PURE__ */ c("path", { d: "M9 13v2" })
|
|
4753
4813
|
] });
|
|
4754
4814
|
}
|
|
4755
|
-
function
|
|
4756
|
-
const t =
|
|
4815
|
+
function ul() {
|
|
4816
|
+
const t = A();
|
|
4757
4817
|
return z.value.length > 1 ? /* @__PURE__ */ c(
|
|
4758
4818
|
"button",
|
|
4759
4819
|
{
|
|
4760
4820
|
class: "jex-header-back",
|
|
4761
|
-
onClick:
|
|
4821
|
+
onClick: Ct,
|
|
4762
4822
|
"aria-label": t.back || "Go back",
|
|
4763
4823
|
children: /* @__PURE__ */ c("svg", { width: 20, height: 20, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", children: /* @__PURE__ */ c("path", { d: "m15 18-6-6 6-6" }) })
|
|
4764
4824
|
}
|
|
4765
|
-
) : /* @__PURE__ */ c(
|
|
4825
|
+
) : /* @__PURE__ */ c(En, { size: 24 });
|
|
4766
4826
|
}
|
|
4767
|
-
function
|
|
4768
|
-
const e =
|
|
4827
|
+
function hl({ title: t }) {
|
|
4828
|
+
const e = A();
|
|
4769
4829
|
return /* @__PURE__ */ c("div", { class: "jex-header-info", children: [
|
|
4770
4830
|
/* @__PURE__ */ c("h3", { children: t }),
|
|
4771
4831
|
/* @__PURE__ */ c("p", { children: e.statusOnline })
|
|
4772
4832
|
] });
|
|
4773
4833
|
}
|
|
4774
|
-
function
|
|
4834
|
+
function Yi({ size: t = 28 }) {
|
|
4775
4835
|
return /* @__PURE__ */ c("svg", { width: t, height: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", children: [
|
|
4776
4836
|
/* @__PURE__ */ c("path", { d: "M18 6 6 18" }),
|
|
4777
4837
|
/* @__PURE__ */ c("path", { d: "m6 6 12 12" })
|
|
4778
4838
|
] });
|
|
4779
4839
|
}
|
|
4780
|
-
function
|
|
4781
|
-
const t =
|
|
4840
|
+
function dl() {
|
|
4841
|
+
const t = A();
|
|
4782
4842
|
return /* @__PURE__ */ c(
|
|
4783
4843
|
"button",
|
|
4784
4844
|
{
|
|
4785
4845
|
class: "jex-header-close",
|
|
4786
4846
|
type: "button",
|
|
4787
4847
|
onClick: () => {
|
|
4788
|
-
|
|
4848
|
+
P.value = !1;
|
|
4789
4849
|
},
|
|
4790
4850
|
"aria-label": t.closeChatAriaLabel,
|
|
4791
4851
|
title: t.closeChatAriaLabel,
|
|
4792
|
-
children: /* @__PURE__ */ c(
|
|
4852
|
+
children: /* @__PURE__ */ c(Yi, { size: 18 })
|
|
4793
4853
|
}
|
|
4794
4854
|
);
|
|
4795
4855
|
}
|
|
4796
|
-
function
|
|
4856
|
+
function fl({ action: t, showClose: e = !0 }) {
|
|
4797
4857
|
return !t && !e ? null : /* @__PURE__ */ c("div", { class: "jex-header-right", children: [
|
|
4798
4858
|
t,
|
|
4799
|
-
e && /* @__PURE__ */ c(
|
|
4859
|
+
e && /* @__PURE__ */ c(dl, {})
|
|
4800
4860
|
] });
|
|
4801
4861
|
}
|
|
4802
|
-
function
|
|
4862
|
+
function Tr({ title: t, rightAction: e, showClose: n = !0 }) {
|
|
4803
4863
|
return /* @__PURE__ */ c("header", { class: "jex-chat-header", children: [
|
|
4804
|
-
/* @__PURE__ */ c(
|
|
4805
|
-
/* @__PURE__ */ c(
|
|
4806
|
-
/* @__PURE__ */ c(
|
|
4864
|
+
/* @__PURE__ */ c(ul, {}),
|
|
4865
|
+
/* @__PURE__ */ c(hl, { title: t }),
|
|
4866
|
+
/* @__PURE__ */ c(fl, { action: e, showClose: n })
|
|
4807
4867
|
] });
|
|
4808
4868
|
}
|
|
4809
|
-
function
|
|
4869
|
+
function pl({ size: t = 14 }) {
|
|
4810
4870
|
return /* @__PURE__ */ c("svg", { width: t, height: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", children: /* @__PURE__ */ c("path", { d: "M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z" }) });
|
|
4811
4871
|
}
|
|
4812
|
-
function
|
|
4872
|
+
function Rr() {
|
|
4813
4873
|
return /* @__PURE__ */ c("div", { class: "jex-widget-footer", children: /* @__PURE__ */ c(
|
|
4814
4874
|
"a",
|
|
4815
4875
|
{
|
|
@@ -4818,7 +4878,7 @@ function kr() {
|
|
|
4818
4878
|
rel: "noopener noreferrer",
|
|
4819
4879
|
class: "jex-branding",
|
|
4820
4880
|
children: [
|
|
4821
|
-
/* @__PURE__ */ c(
|
|
4881
|
+
/* @__PURE__ */ c(pl, { size: 14 }),
|
|
4822
4882
|
/* @__PURE__ */ c("span", { children: [
|
|
4823
4883
|
"Powered by ",
|
|
4824
4884
|
/* @__PURE__ */ c("strong", { children: "Jexity" })
|
|
@@ -4827,10 +4887,10 @@ function kr() {
|
|
|
4827
4887
|
}
|
|
4828
4888
|
) });
|
|
4829
4889
|
}
|
|
4830
|
-
function
|
|
4890
|
+
function Xi({ size: t = 28 }) {
|
|
4831
4891
|
return /* @__PURE__ */ c("svg", { width: t, height: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", children: /* @__PURE__ */ c("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" }) });
|
|
4832
4892
|
}
|
|
4833
|
-
function
|
|
4893
|
+
function gl({ size: t = 24, ...e }) {
|
|
4834
4894
|
return /* @__PURE__ */ c(
|
|
4835
4895
|
"svg",
|
|
4836
4896
|
{
|
|
@@ -4847,53 +4907,53 @@ function sl({ size: t = 24, ...e }) {
|
|
|
4847
4907
|
}
|
|
4848
4908
|
);
|
|
4849
4909
|
}
|
|
4850
|
-
const
|
|
4851
|
-
chat: /* @__PURE__ */ c(
|
|
4852
|
-
bot: /* @__PURE__ */ c(
|
|
4853
|
-
sparkles: /* @__PURE__ */ c(
|
|
4854
|
-
},
|
|
4910
|
+
const ml = {
|
|
4911
|
+
chat: /* @__PURE__ */ c(Xi, { size: 28 }),
|
|
4912
|
+
bot: /* @__PURE__ */ c(En, { size: 28 }),
|
|
4913
|
+
sparkles: /* @__PURE__ */ c(gl, { size: 28 })
|
|
4914
|
+
}, xl = {
|
|
4855
4915
|
none: "0px",
|
|
4856
4916
|
sm: "0.5rem",
|
|
4857
4917
|
md: "0.75rem",
|
|
4858
4918
|
lg: "1.25rem",
|
|
4859
4919
|
full: "9999px"
|
|
4860
4920
|
};
|
|
4861
|
-
function
|
|
4862
|
-
const r =
|
|
4921
|
+
function bl({ radius: t = "full", iconOption: e = "chat", label: n }) {
|
|
4922
|
+
const r = A(), i = n ?? r.fabLabel, o = i !== "";
|
|
4863
4923
|
return /* @__PURE__ */ c(
|
|
4864
4924
|
"button",
|
|
4865
4925
|
{
|
|
4866
|
-
class: `jex-floating-button ${!
|
|
4867
|
-
style: { borderRadius:
|
|
4926
|
+
class: `jex-floating-button ${!P.value && o ? "jex-has-label" : ""}`,
|
|
4927
|
+
style: { borderRadius: xl[t] ?? "9999px" },
|
|
4868
4928
|
onClick: () => {
|
|
4869
|
-
|
|
4929
|
+
P.value = !P.value;
|
|
4870
4930
|
},
|
|
4871
|
-
"aria-label":
|
|
4872
|
-
children:
|
|
4873
|
-
|
|
4931
|
+
"aria-label": P.value ? r.closeChatAriaLabel : r.openChatAriaLabel,
|
|
4932
|
+
children: P.value ? /* @__PURE__ */ c(Yi, { size: 28 }) : /* @__PURE__ */ c("div", { class: "jex-fab-inner", children: [
|
|
4933
|
+
ml[e],
|
|
4874
4934
|
o && /* @__PURE__ */ c("span", { class: "jex-fab-label", children: i })
|
|
4875
4935
|
] })
|
|
4876
4936
|
}
|
|
4877
4937
|
);
|
|
4878
4938
|
}
|
|
4879
|
-
function
|
|
4880
|
-
const r =
|
|
4939
|
+
function yl({ title: t, onStartFresh: e, onResetSession: n }) {
|
|
4940
|
+
const r = A(), [i, o] = C("");
|
|
4881
4941
|
function s() {
|
|
4882
|
-
|
|
4942
|
+
Jt(), Ke.value = "fresh", n(), e(), pe({ id: "chat" });
|
|
4883
4943
|
}
|
|
4884
4944
|
function l(u) {
|
|
4885
|
-
|
|
4945
|
+
Jt(), Ke.value = "resume", n(), jr(u), pe({ id: "chat" });
|
|
4886
4946
|
}
|
|
4887
4947
|
function a(u) {
|
|
4888
4948
|
u.preventDefault();
|
|
4889
4949
|
const d = i.trim().toUpperCase();
|
|
4890
|
-
d && (
|
|
4950
|
+
d && (Jt(), Ke.value = "resume", n(), jr(d), pe({ id: "chat" }));
|
|
4891
4951
|
}
|
|
4892
4952
|
return /* @__PURE__ */ c("div", { class: "jex-home", children: [
|
|
4893
4953
|
nt.value && /* @__PURE__ */ c("div", { class: "jex-session-prompt", role: "status", children: /* @__PURE__ */ c("div", { class: "jex-session-prompt-text", children: r.sessionLocked }) }),
|
|
4894
4954
|
/* @__PURE__ */ c("div", { class: "jex-home-hero", children: [
|
|
4895
4955
|
/* @__PURE__ */ c("div", { class: "jex-home-avatar", children: [
|
|
4896
|
-
/* @__PURE__ */ c(
|
|
4956
|
+
/* @__PURE__ */ c(Xi, { size: 24 }),
|
|
4897
4957
|
/* @__PURE__ */ c("span", { class: "jex-home-status-dot" })
|
|
4898
4958
|
] }),
|
|
4899
4959
|
/* @__PURE__ */ c("div", { class: "jex-home-hero-text", children: [
|
|
@@ -4947,8 +5007,8 @@ function ul({ title: t, onStartFresh: e, onResetSession: n }) {
|
|
|
4947
5007
|
] })
|
|
4948
5008
|
] });
|
|
4949
5009
|
}
|
|
4950
|
-
function
|
|
4951
|
-
const e =
|
|
5010
|
+
function vl({ title: t }) {
|
|
5011
|
+
const e = A();
|
|
4952
5012
|
return /* @__PURE__ */ c("div", { class: "jex-selection", children: [
|
|
4953
5013
|
/* @__PURE__ */ c("h2", { class: "jex-selection-title", children: e.howCanWeHelp }),
|
|
4954
5014
|
/* @__PURE__ */ c("div", { class: "jex-selection-options", children: [
|
|
@@ -4979,17 +5039,17 @@ function hl({ title: t }) {
|
|
|
4979
5039
|
] })
|
|
4980
5040
|
] });
|
|
4981
5041
|
}
|
|
4982
|
-
const
|
|
4983
|
-
const
|
|
4984
|
-
const
|
|
5042
|
+
const _l = (...t) => t.filter((e, n, r) => !!e && e.trim() !== "" && r.indexOf(e) === n).join(" ").trim();
|
|
5043
|
+
const Ar = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
5044
|
+
const wl = (t) => t.replace(
|
|
4985
5045
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
4986
5046
|
(e, n, r) => r ? r.toUpperCase() : n.toLowerCase()
|
|
4987
5047
|
);
|
|
4988
|
-
const
|
|
4989
|
-
const e =
|
|
5048
|
+
const $r = (t) => {
|
|
5049
|
+
const e = wl(t);
|
|
4990
5050
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
4991
5051
|
};
|
|
4992
|
-
var
|
|
5052
|
+
var kl = {
|
|
4993
5053
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4994
5054
|
width: 24,
|
|
4995
5055
|
height: 24,
|
|
@@ -5000,13 +5060,13 @@ var pl = {
|
|
|
5000
5060
|
"stroke-linecap": "round",
|
|
5001
5061
|
"stroke-linejoin": "round"
|
|
5002
5062
|
};
|
|
5003
|
-
const
|
|
5063
|
+
const Sl = (t) => {
|
|
5004
5064
|
for (const e in t)
|
|
5005
5065
|
if (e.startsWith("aria-") || e === "role" || e === "title")
|
|
5006
5066
|
return !0;
|
|
5007
5067
|
return !1;
|
|
5008
5068
|
};
|
|
5009
|
-
const
|
|
5069
|
+
const jl = ({
|
|
5010
5070
|
color: t = "currentColor",
|
|
5011
5071
|
size: e = 24,
|
|
5012
5072
|
strokeWidth: n = 2,
|
|
@@ -5018,87 +5078,87 @@ const ml = ({
|
|
|
5018
5078
|
}) => V(
|
|
5019
5079
|
"svg",
|
|
5020
5080
|
{
|
|
5021
|
-
...
|
|
5081
|
+
...kl,
|
|
5022
5082
|
width: String(e),
|
|
5023
5083
|
height: e,
|
|
5024
5084
|
stroke: t,
|
|
5025
5085
|
"stroke-width": r ? Number(n) * 24 / Number(e) : n,
|
|
5026
5086
|
class: ["lucide", s].join(" "),
|
|
5027
|
-
...!i && !
|
|
5087
|
+
...!i && !Sl(l) && { "aria-hidden": "true" },
|
|
5028
5088
|
...l
|
|
5029
5089
|
},
|
|
5030
5090
|
[...o.map(([a, u]) => V(a, u)), ...ne(i)]
|
|
5031
5091
|
);
|
|
5032
|
-
const
|
|
5092
|
+
const Cl = (t, e) => {
|
|
5033
5093
|
const n = ({ class: r = "", className: i = "", children: o, ...s }) => V(
|
|
5034
|
-
|
|
5094
|
+
jl,
|
|
5035
5095
|
{
|
|
5036
5096
|
...s,
|
|
5037
5097
|
iconNode: e,
|
|
5038
|
-
class:
|
|
5039
|
-
`lucide-${
|
|
5040
|
-
`lucide-${
|
|
5098
|
+
class: _l(
|
|
5099
|
+
`lucide-${Ar($r(t))}`,
|
|
5100
|
+
`lucide-${Ar(t)}`,
|
|
5041
5101
|
r,
|
|
5042
5102
|
i
|
|
5043
5103
|
)
|
|
5044
5104
|
},
|
|
5045
5105
|
o
|
|
5046
5106
|
);
|
|
5047
|
-
return n.displayName =
|
|
5107
|
+
return n.displayName = $r(t), n;
|
|
5048
5108
|
};
|
|
5049
|
-
const
|
|
5109
|
+
const Tl = Cl("corner-up-left", [
|
|
5050
5110
|
["path", { d: "M20 20v-7a4 4 0 0 0-4-4H4", key: "1nkjon" }],
|
|
5051
5111
|
["path", { d: "M9 14 4 9l5-5", key: "102s5s" }]
|
|
5052
5112
|
]);
|
|
5053
|
-
function
|
|
5113
|
+
function In() {
|
|
5054
5114
|
return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
|
|
5055
5115
|
}
|
|
5056
|
-
var ve =
|
|
5057
|
-
function
|
|
5116
|
+
var ve = In();
|
|
5117
|
+
function eo(t) {
|
|
5058
5118
|
ve = t;
|
|
5059
5119
|
}
|
|
5060
5120
|
var de = { exec: () => null };
|
|
5061
5121
|
function _(t, e = "") {
|
|
5062
5122
|
let n = typeof t == "string" ? t : t.source, r = { replace: (i, o) => {
|
|
5063
5123
|
let s = typeof o == "string" ? o : o.source;
|
|
5064
|
-
return s = s.replace(
|
|
5124
|
+
return s = s.replace(L.caret, "$1"), n = n.replace(i, s), r;
|
|
5065
5125
|
}, getRegex: () => new RegExp(n, e) };
|
|
5066
5126
|
return r;
|
|
5067
5127
|
}
|
|
5068
|
-
var
|
|
5128
|
+
var Rl = (() => {
|
|
5069
5129
|
try {
|
|
5070
5130
|
return !!new RegExp("(?<=1)(?<!1)");
|
|
5071
5131
|
} catch {
|
|
5072
5132
|
return !1;
|
|
5073
5133
|
}
|
|
5074
|
-
})(),
|
|
5075
|
-
]`).replace("lheading",
|
|
5134
|
+
})(), L = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (t) => new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}#`), htmlBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}<(?:[a-z].*>|!--)`, "i"), blockquoteBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}>`) }, Al = /^(?:[ \t]*(?:\n|$))+/, $l = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, El = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, lt = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Il = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Pn = / {0,3}(?:[*+-]|\d{1,9}[.)])/, to = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, no = _(to).replace(/bull/g, Pn).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Pl = _(to).replace(/bull/g, Pn).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), Mn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Ml = /^[^\n]+/, Ln = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Ll = _(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Ln).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), ql = _(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Pn).getRegex(), Lt = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", qn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Ol = _("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", qn).replace("tag", Lt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ro = _(Mn).replace("hr", lt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Lt).getRegex(), Nl = _(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ro).getRegex(), On = { blockquote: Nl, code: $l, def: Ll, fences: El, heading: Il, hr: lt, html: Ol, lheading: no, list: ql, newline: Al, paragraph: ro, table: de, text: Ml }, Er = _("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", lt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Lt).getRegex(), zl = { ...On, lheading: Pl, table: Er, paragraph: _(Mn).replace("hr", lt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Er).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Lt).getRegex() }, Bl = { ...On, html: _(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", qn).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: de, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: _(Mn).replace("hr", lt).replace("heading", ` *#{1,6} *[^
|
|
5135
|
+
]`).replace("lheading", no).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Fl = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ul = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, io = /^( {2,}|\\)\n(?!\s*$)/, Ql = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Ne = /[\p{P}\p{S}]/u, qt = /[\s\p{P}\p{S}]/u, Nn = /[^\s\p{P}\p{S}]/u, Dl = _(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, qt).getRegex(), oo = /(?!~)[\p{P}\p{S}]/u, Vl = /(?!~)[\s\p{P}\p{S}]/u, Hl = /(?:[^\s\p{P}\p{S}]|~)/u, Wl = _(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Rl ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), so = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Jl = _(so, "u").replace(/punct/g, Ne).getRegex(), Gl = _(so, "u").replace(/punct/g, oo).getRegex(), ao = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Kl = _(ao, "gu").replace(/notPunctSpace/g, Nn).replace(/punctSpace/g, qt).replace(/punct/g, Ne).getRegex(), Zl = _(ao, "gu").replace(/notPunctSpace/g, Hl).replace(/punctSpace/g, Vl).replace(/punct/g, oo).getRegex(), Yl = _("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Nn).replace(/punctSpace/g, qt).replace(/punct/g, Ne).getRegex(), Xl = _(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Ne).getRegex(), ec = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", tc = _(ec, "gu").replace(/notPunctSpace/g, Nn).replace(/punctSpace/g, qt).replace(/punct/g, Ne).getRegex(), nc = _(/\\(punct)/, "gu").replace(/punct/g, Ne).getRegex(), rc = _(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), ic = _(qn).replace("(?:-->|$)", "-->").getRegex(), oc = _("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", ic).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Tt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, sc = _(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", Tt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), lo = _(/^!?\[(label)\]\[(ref)\]/).replace("label", Tt).replace("ref", Ln).getRegex(), co = _(/^!?\[(ref)\](?:\[\])?/).replace("ref", Ln).getRegex(), ac = _("reflink|nolink(?!\\()", "g").replace("reflink", lo).replace("nolink", co).getRegex(), Ir = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, zn = { _backpedal: de, anyPunctuation: nc, autolink: rc, blockSkip: Wl, br: io, code: Ul, del: de, delLDelim: de, delRDelim: de, emStrongLDelim: Jl, emStrongRDelimAst: Kl, emStrongRDelimUnd: Yl, escape: Fl, link: sc, nolink: co, punctuation: Dl, reflink: lo, reflinkSearch: ac, tag: oc, text: Ql, url: de }, lc = { ...zn, link: _(/^!?\[(label)\]\((.*?)\)/).replace("label", Tt).getRegex(), reflink: _(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Tt).getRegex() }, pn = { ...zn, emStrongRDelimAst: Zl, emStrongLDelim: Gl, delLDelim: Xl, delRDelim: tc, url: _(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Ir).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: _(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Ir).getRegex() }, cc = { ...pn, br: _(io).replace("{2,}", "*").getRegex(), text: _(pn.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, pt = { normal: On, gfm: zl, pedantic: Bl }, Be = { normal: zn, gfm: pn, breaks: cc, pedantic: lc }, uc = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, Pr = (t) => uc[t];
|
|
5076
5136
|
function X(t, e) {
|
|
5077
5137
|
if (e) {
|
|
5078
|
-
if (
|
|
5079
|
-
} else if (
|
|
5138
|
+
if (L.escapeTest.test(t)) return t.replace(L.escapeReplace, Pr);
|
|
5139
|
+
} else if (L.escapeTestNoEncode.test(t)) return t.replace(L.escapeReplaceNoEncode, Pr);
|
|
5080
5140
|
return t;
|
|
5081
5141
|
}
|
|
5082
|
-
function
|
|
5142
|
+
function Mr(t) {
|
|
5083
5143
|
try {
|
|
5084
|
-
t = encodeURI(t).replace(
|
|
5144
|
+
t = encodeURI(t).replace(L.percentDecode, "%");
|
|
5085
5145
|
} catch {
|
|
5086
5146
|
return null;
|
|
5087
5147
|
}
|
|
5088
5148
|
return t;
|
|
5089
5149
|
}
|
|
5090
|
-
function
|
|
5091
|
-
let n = t.replace(
|
|
5150
|
+
function Lr(t, e) {
|
|
5151
|
+
let n = t.replace(L.findPipe, (o, s, l) => {
|
|
5092
5152
|
let a = !1, u = s;
|
|
5093
5153
|
for (; --u >= 0 && l[u] === "\\"; ) a = !a;
|
|
5094
5154
|
return a ? "|" : " |";
|
|
5095
|
-
}), r = n.split(
|
|
5155
|
+
}), r = n.split(L.splitPipe), i = 0;
|
|
5096
5156
|
if (r[0].trim() || r.shift(), r.length > 0 && !r.at(-1)?.trim() && r.pop(), e) if (r.length > e) r.splice(e);
|
|
5097
5157
|
else for (; r.length < e; ) r.push("");
|
|
5098
|
-
for (; i < r.length; i++) r[i] = r[i].trim().replace(
|
|
5158
|
+
for (; i < r.length; i++) r[i] = r[i].trim().replace(L.slashPipe, "|");
|
|
5099
5159
|
return r;
|
|
5100
5160
|
}
|
|
5101
|
-
function
|
|
5161
|
+
function Fe(t, e, n) {
|
|
5102
5162
|
let r = t.length;
|
|
5103
5163
|
if (r === 0) return "";
|
|
5104
5164
|
let i = 0;
|
|
@@ -5106,7 +5166,7 @@ function Be(t, e, n) {
|
|
|
5106
5166
|
i++;
|
|
5107
5167
|
return t.slice(0, r - i);
|
|
5108
5168
|
}
|
|
5109
|
-
function
|
|
5169
|
+
function hc(t, e) {
|
|
5110
5170
|
if (t.indexOf(e[1]) === -1) return -1;
|
|
5111
5171
|
let n = 0;
|
|
5112
5172
|
for (let r = 0; r < t.length; r++) if (t[r] === "\\") r++;
|
|
@@ -5114,7 +5174,7 @@ function nc(t, e) {
|
|
|
5114
5174
|
else if (t[r] === e[1] && (n--, n < 0)) return r;
|
|
5115
5175
|
return n > 0 ? -2 : -1;
|
|
5116
5176
|
}
|
|
5117
|
-
function
|
|
5177
|
+
function dc(t, e = 0) {
|
|
5118
5178
|
let n = e, r = "";
|
|
5119
5179
|
for (let i of t) if (i === " ") {
|
|
5120
5180
|
let o = 4 - n % 4;
|
|
@@ -5122,13 +5182,13 @@ function rc(t, e = 0) {
|
|
|
5122
5182
|
} else r += i, n++;
|
|
5123
5183
|
return r;
|
|
5124
5184
|
}
|
|
5125
|
-
function
|
|
5185
|
+
function qr(t, e, n, r, i) {
|
|
5126
5186
|
let o = e.href, s = e.title || null, l = t[1].replace(i.other.outputLinkReplace, "$1");
|
|
5127
5187
|
r.state.inLink = !0;
|
|
5128
5188
|
let a = { type: t[0].charAt(0) === "!" ? "image" : "link", raw: n, href: o, title: s, text: l, tokens: r.inlineTokens(l) };
|
|
5129
5189
|
return r.state.inLink = !1, a;
|
|
5130
5190
|
}
|
|
5131
|
-
function
|
|
5191
|
+
function fc(t, e, n) {
|
|
5132
5192
|
let r = t.match(n.other.indentCodeCompensation);
|
|
5133
5193
|
if (r === null) return e;
|
|
5134
5194
|
let i = r[1];
|
|
@@ -5141,7 +5201,7 @@ function ic(t, e, n) {
|
|
|
5141
5201
|
}).join(`
|
|
5142
5202
|
`);
|
|
5143
5203
|
}
|
|
5144
|
-
var
|
|
5204
|
+
var Rt = class {
|
|
5145
5205
|
options;
|
|
5146
5206
|
rules;
|
|
5147
5207
|
lexer;
|
|
@@ -5156,14 +5216,14 @@ var Tt = class {
|
|
|
5156
5216
|
let e = this.rules.block.code.exec(t);
|
|
5157
5217
|
if (e) {
|
|
5158
5218
|
let n = e[0].replace(this.rules.other.codeRemoveIndent, "");
|
|
5159
|
-
return { type: "code", raw: e[0], codeBlockStyle: "indented", text: this.options.pedantic ? n :
|
|
5219
|
+
return { type: "code", raw: e[0], codeBlockStyle: "indented", text: this.options.pedantic ? n : Fe(n, `
|
|
5160
5220
|
`) };
|
|
5161
5221
|
}
|
|
5162
5222
|
}
|
|
5163
5223
|
fences(t) {
|
|
5164
5224
|
let e = this.rules.block.fences.exec(t);
|
|
5165
5225
|
if (e) {
|
|
5166
|
-
let n = e[0], r =
|
|
5226
|
+
let n = e[0], r = fc(n, e[3] || "", this.rules);
|
|
5167
5227
|
return { type: "code", raw: n, lang: e[2] ? e[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : e[2], text: r };
|
|
5168
5228
|
}
|
|
5169
5229
|
}
|
|
@@ -5172,7 +5232,7 @@ var Tt = class {
|
|
|
5172
5232
|
if (e) {
|
|
5173
5233
|
let n = e[2].trim();
|
|
5174
5234
|
if (this.rules.other.endingHash.test(n)) {
|
|
5175
|
-
let r =
|
|
5235
|
+
let r = Fe(n, "#");
|
|
5176
5236
|
(this.options.pedantic || !r || this.rules.other.endingSpaceChar.test(r)) && (n = r.trim());
|
|
5177
5237
|
}
|
|
5178
5238
|
return { type: "heading", raw: e[0], depth: e[1].length, text: n, tokens: this.lexer.inline(n) };
|
|
@@ -5180,13 +5240,13 @@ var Tt = class {
|
|
|
5180
5240
|
}
|
|
5181
5241
|
hr(t) {
|
|
5182
5242
|
let e = this.rules.block.hr.exec(t);
|
|
5183
|
-
if (e) return { type: "hr", raw:
|
|
5243
|
+
if (e) return { type: "hr", raw: Fe(e[0], `
|
|
5184
5244
|
`) };
|
|
5185
5245
|
}
|
|
5186
5246
|
blockquote(t) {
|
|
5187
5247
|
let e = this.rules.block.blockquote.exec(t);
|
|
5188
5248
|
if (e) {
|
|
5189
|
-
let n =
|
|
5249
|
+
let n = Fe(e[0], `
|
|
5190
5250
|
`).split(`
|
|
5191
5251
|
`), r = "", i = "", o = [];
|
|
5192
5252
|
for (; n.length > 0; ) {
|
|
@@ -5233,16 +5293,16 @@ ${d}` : d;
|
|
|
5233
5293
|
let a = !1, u = "", d = "";
|
|
5234
5294
|
if (!(e = o.exec(t)) || this.rules.block.hr.test(t)) break;
|
|
5235
5295
|
u = e[0], t = t.substring(u.length);
|
|
5236
|
-
let h =
|
|
5296
|
+
let h = dc(e[2].split(`
|
|
5237
5297
|
`, 1)[0], e[1].length), f = t.split(`
|
|
5238
5298
|
`, 1)[0], p = !h.trim(), g = 0;
|
|
5239
5299
|
if (this.options.pedantic ? (g = 2, d = h.trimStart()) : p ? g = e[1].length + 1 : (g = h.search(this.rules.other.nonSpaceChar), g = g > 4 ? 1 : g, d = h.slice(g), g += e[1].length), p && this.rules.other.blankLine.test(f) && (u += f + `
|
|
5240
5300
|
`, t = t.substring(f.length + 1), a = !0), !a) {
|
|
5241
|
-
let m = this.rules.other.nextBulletRegex(g), x = this.rules.other.hrRegex(g), v = this.rules.other.fencesBeginRegex(g), y = this.rules.other.headingBeginRegex(g), I = this.rules.other.htmlBeginRegex(g),
|
|
5301
|
+
let m = this.rules.other.nextBulletRegex(g), x = this.rules.other.hrRegex(g), v = this.rules.other.fencesBeginRegex(g), y = this.rules.other.headingBeginRegex(g), I = this.rules.other.htmlBeginRegex(g), U = this.rules.other.blockquoteBeginRegex(g);
|
|
5242
5302
|
for (; t; ) {
|
|
5243
5303
|
let H = t.split(`
|
|
5244
5304
|
`, 1)[0], B;
|
|
5245
|
-
if (f = H, this.options.pedantic ? (f = f.replace(this.rules.other.listReplaceNesting, " "), B = f) : B = f.replace(this.rules.other.tabCharGlobal, " "), v.test(f) || y.test(f) || I.test(f) ||
|
|
5305
|
+
if (f = H, this.options.pedantic ? (f = f.replace(this.rules.other.listReplaceNesting, " "), B = f) : B = f.replace(this.rules.other.tabCharGlobal, " "), v.test(f) || y.test(f) || I.test(f) || U.test(f) || m.test(f) || x.test(f)) break;
|
|
5246
5306
|
if (B.search(this.rules.other.nonSpaceChar) >= g || !f.trim()) d += `
|
|
5247
5307
|
` + B.slice(g);
|
|
5248
5308
|
else {
|
|
@@ -5301,12 +5361,12 @@ ${d}` : d;
|
|
|
5301
5361
|
table(t) {
|
|
5302
5362
|
let e = this.rules.block.table.exec(t);
|
|
5303
5363
|
if (!e || !this.rules.other.tableDelimiter.test(e[2])) return;
|
|
5304
|
-
let n =
|
|
5364
|
+
let n = Lr(e[1]), r = e[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = e[3]?.trim() ? e[3].replace(this.rules.other.tableRowBlankLine, "").split(`
|
|
5305
5365
|
`) : [], o = { type: "table", raw: e[0], header: [], align: [], rows: [] };
|
|
5306
5366
|
if (n.length === r.length) {
|
|
5307
5367
|
for (let s of r) this.rules.other.tableAlignRight.test(s) ? o.align.push("right") : this.rules.other.tableAlignCenter.test(s) ? o.align.push("center") : this.rules.other.tableAlignLeft.test(s) ? o.align.push("left") : o.align.push(null);
|
|
5308
5368
|
for (let s = 0; s < n.length; s++) o.header.push({ text: n[s], tokens: this.lexer.inline(n[s]), header: !0, align: o.align[s] });
|
|
5309
|
-
for (let s of i) o.rows.push(
|
|
5369
|
+
for (let s of i) o.rows.push(Lr(s, o.header.length).map((l, a) => ({ text: l, tokens: this.lexer.inline(l), header: !1, align: o.align[a] })));
|
|
5310
5370
|
return o;
|
|
5311
5371
|
}
|
|
5312
5372
|
}
|
|
@@ -5343,10 +5403,10 @@ ${d}` : d;
|
|
|
5343
5403
|
let n = e[2].trim();
|
|
5344
5404
|
if (!this.options.pedantic && this.rules.other.startAngleBracket.test(n)) {
|
|
5345
5405
|
if (!this.rules.other.endAngleBracket.test(n)) return;
|
|
5346
|
-
let o =
|
|
5406
|
+
let o = Fe(n.slice(0, -1), "\\");
|
|
5347
5407
|
if ((n.length - o.length) % 2 === 0) return;
|
|
5348
5408
|
} else {
|
|
5349
|
-
let o =
|
|
5409
|
+
let o = hc(e[2], "()");
|
|
5350
5410
|
if (o === -2) return;
|
|
5351
5411
|
if (o > -1) {
|
|
5352
5412
|
let s = (e[0].indexOf("!") === 0 ? 5 : 4) + e[1].length + o;
|
|
@@ -5358,7 +5418,7 @@ ${d}` : d;
|
|
|
5358
5418
|
let o = this.rules.other.pedanticHrefTitle.exec(r);
|
|
5359
5419
|
o && (r = o[1], i = o[3]);
|
|
5360
5420
|
} else i = e[3] ? e[3].slice(1, -1) : "";
|
|
5361
|
-
return r = r.trim(), this.rules.other.startAngleBracket.test(r) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r = r.slice(1) : r = r.slice(1, -1)),
|
|
5421
|
+
return r = r.trim(), this.rules.other.startAngleBracket.test(r) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r = r.slice(1) : r = r.slice(1, -1)), qr(e, { href: r && r.replace(this.rules.inline.anyPunctuation, "$1"), title: i && i.replace(this.rules.inline.anyPunctuation, "$1") }, e[0], this.lexer, this.rules);
|
|
5362
5422
|
}
|
|
5363
5423
|
}
|
|
5364
5424
|
reflink(t, e) {
|
|
@@ -5369,7 +5429,7 @@ ${d}` : d;
|
|
|
5369
5429
|
let o = n[0].charAt(0);
|
|
5370
5430
|
return { type: "text", raw: o, text: o };
|
|
5371
5431
|
}
|
|
5372
|
-
return
|
|
5432
|
+
return qr(n, i, n[0], this.lexer, this.rules);
|
|
5373
5433
|
}
|
|
5374
5434
|
}
|
|
5375
5435
|
emStrong(t, e, n = "") {
|
|
@@ -5454,28 +5514,28 @@ ${d}` : d;
|
|
|
5454
5514
|
return { type: "text", raw: e[0], text: e[0], escaped: n };
|
|
5455
5515
|
}
|
|
5456
5516
|
}
|
|
5457
|
-
}, W = class
|
|
5517
|
+
}, W = class gn {
|
|
5458
5518
|
tokens;
|
|
5459
5519
|
options;
|
|
5460
5520
|
state;
|
|
5461
5521
|
inlineQueue;
|
|
5462
5522
|
tokenizer;
|
|
5463
5523
|
constructor(e) {
|
|
5464
|
-
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || ve, this.options.tokenizer = this.options.tokenizer || new
|
|
5465
|
-
let n = { other:
|
|
5466
|
-
this.options.pedantic ? (n.block = pt.pedantic, n.inline =
|
|
5524
|
+
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || ve, this.options.tokenizer = this.options.tokenizer || new Rt(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
|
|
5525
|
+
let n = { other: L, block: pt.normal, inline: Be.normal };
|
|
5526
|
+
this.options.pedantic ? (n.block = pt.pedantic, n.inline = Be.pedantic) : this.options.gfm && (n.block = pt.gfm, this.options.breaks ? n.inline = Be.breaks : n.inline = Be.gfm), this.tokenizer.rules = n;
|
|
5467
5527
|
}
|
|
5468
5528
|
static get rules() {
|
|
5469
|
-
return { block: pt, inline:
|
|
5529
|
+
return { block: pt, inline: Be };
|
|
5470
5530
|
}
|
|
5471
5531
|
static lex(e, n) {
|
|
5472
|
-
return new
|
|
5532
|
+
return new gn(n).lex(e);
|
|
5473
5533
|
}
|
|
5474
5534
|
static lexInline(e, n) {
|
|
5475
|
-
return new
|
|
5535
|
+
return new gn(n).inlineTokens(e);
|
|
5476
5536
|
}
|
|
5477
5537
|
lex(e) {
|
|
5478
|
-
e = e.replace(
|
|
5538
|
+
e = e.replace(L.carriageReturn, `
|
|
5479
5539
|
`), this.blockTokens(e, this.tokens);
|
|
5480
5540
|
for (let n = 0; n < this.inlineQueue.length; n++) {
|
|
5481
5541
|
let r = this.inlineQueue[n];
|
|
@@ -5484,7 +5544,7 @@ ${d}` : d;
|
|
|
5484
5544
|
return this.inlineQueue = [], this.tokens;
|
|
5485
5545
|
}
|
|
5486
5546
|
blockTokens(e, n = [], r = !1) {
|
|
5487
|
-
for (this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(
|
|
5547
|
+
for (this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(L.tabCharGlobal, " ").replace(L.spaceLine, "")); e; ) {
|
|
5488
5548
|
let i;
|
|
5489
5549
|
if (this.options.extensions?.block?.some((s) => (i = s.call({ lexer: this }, e, n)) ? (e = e.substring(i.raw.length), n.push(i), !0) : !1)) continue;
|
|
5490
5550
|
if (i = this.tokenizer.space(e)) {
|
|
@@ -5662,7 +5722,7 @@ ${d}` : d;
|
|
|
5662
5722
|
}
|
|
5663
5723
|
return n;
|
|
5664
5724
|
}
|
|
5665
|
-
},
|
|
5725
|
+
}, At = class {
|
|
5666
5726
|
options;
|
|
5667
5727
|
parser;
|
|
5668
5728
|
constructor(t) {
|
|
@@ -5672,7 +5732,7 @@ ${d}` : d;
|
|
|
5672
5732
|
return "";
|
|
5673
5733
|
}
|
|
5674
5734
|
code({ text: t, lang: e, escaped: n }) {
|
|
5675
|
-
let r = (e || "").match(
|
|
5735
|
+
let r = (e || "").match(L.notSpaceStart)?.[0], i = t.replace(L.endingNewline, "") + `
|
|
5676
5736
|
`;
|
|
5677
5737
|
return r ? '<pre><code class="language-' + X(r) + '">' + (n ? i : X(i, !0)) + `</code></pre>
|
|
5678
5738
|
` : "<pre><code>" + (n ? i : X(i, !0)) + `</code></pre>
|
|
@@ -5762,7 +5822,7 @@ ${t}</tr>
|
|
|
5762
5822
|
return `<del>${this.parser.parseInline(t)}</del>`;
|
|
5763
5823
|
}
|
|
5764
5824
|
link({ href: t, title: e, tokens: n }) {
|
|
5765
|
-
let r = this.parser.parseInline(n), i =
|
|
5825
|
+
let r = this.parser.parseInline(n), i = Mr(t);
|
|
5766
5826
|
if (i === null) return r;
|
|
5767
5827
|
t = i;
|
|
5768
5828
|
let o = '<a href="' + t + '"';
|
|
@@ -5770,7 +5830,7 @@ ${t}</tr>
|
|
|
5770
5830
|
}
|
|
5771
5831
|
image({ href: t, title: e, text: n, tokens: r }) {
|
|
5772
5832
|
r && (n = this.parser.parseInline(r, this.parser.textRenderer));
|
|
5773
|
-
let i =
|
|
5833
|
+
let i = Mr(t);
|
|
5774
5834
|
if (i === null) return X(n);
|
|
5775
5835
|
t = i;
|
|
5776
5836
|
let o = `<img src="${t}" alt="${X(n)}"`;
|
|
@@ -5779,7 +5839,7 @@ ${t}</tr>
|
|
|
5779
5839
|
text(t) {
|
|
5780
5840
|
return "tokens" in t && t.tokens ? this.parser.parseInline(t.tokens) : "escaped" in t && t.escaped ? t.text : X(t.text);
|
|
5781
5841
|
}
|
|
5782
|
-
},
|
|
5842
|
+
}, Bn = class {
|
|
5783
5843
|
strong({ text: t }) {
|
|
5784
5844
|
return t;
|
|
5785
5845
|
}
|
|
@@ -5810,18 +5870,18 @@ ${t}</tr>
|
|
|
5810
5870
|
checkbox({ raw: t }) {
|
|
5811
5871
|
return t;
|
|
5812
5872
|
}
|
|
5813
|
-
}, J = class
|
|
5873
|
+
}, J = class mn {
|
|
5814
5874
|
options;
|
|
5815
5875
|
renderer;
|
|
5816
5876
|
textRenderer;
|
|
5817
5877
|
constructor(e) {
|
|
5818
|
-
this.options = e || ve, this.options.renderer = this.options.renderer || new
|
|
5878
|
+
this.options = e || ve, this.options.renderer = this.options.renderer || new At(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new Bn();
|
|
5819
5879
|
}
|
|
5820
5880
|
static parse(e, n) {
|
|
5821
|
-
return new
|
|
5881
|
+
return new mn(n).parse(e);
|
|
5822
5882
|
}
|
|
5823
5883
|
static parseInline(e, n) {
|
|
5824
|
-
return new
|
|
5884
|
+
return new mn(n).parseInline(e);
|
|
5825
5885
|
}
|
|
5826
5886
|
parse(e) {
|
|
5827
5887
|
this.renderer.parser = this;
|
|
@@ -5987,16 +6047,16 @@ ${t}</tr>
|
|
|
5987
6047
|
provideParser() {
|
|
5988
6048
|
return this.block ? J.parse : J.parseInline;
|
|
5989
6049
|
}
|
|
5990
|
-
},
|
|
5991
|
-
defaults =
|
|
6050
|
+
}, pc = class {
|
|
6051
|
+
defaults = In();
|
|
5992
6052
|
options = this.setOptions;
|
|
5993
6053
|
parse = this.parseMarkdown(!0);
|
|
5994
6054
|
parseInline = this.parseMarkdown(!1);
|
|
5995
6055
|
Parser = J;
|
|
5996
|
-
Renderer =
|
|
5997
|
-
TextRenderer =
|
|
6056
|
+
Renderer = At;
|
|
6057
|
+
TextRenderer = Bn;
|
|
5998
6058
|
Lexer = W;
|
|
5999
|
-
Tokenizer =
|
|
6059
|
+
Tokenizer = Rt;
|
|
6000
6060
|
Hooks = Ve;
|
|
6001
6061
|
constructor(...t) {
|
|
6002
6062
|
this.use(...t);
|
|
@@ -6045,7 +6105,7 @@ ${t}</tr>
|
|
|
6045
6105
|
}
|
|
6046
6106
|
"childTokens" in i && i.childTokens && (e.childTokens[i.name] = i.childTokens);
|
|
6047
6107
|
}), r.extensions = e), n.renderer) {
|
|
6048
|
-
let i = this.defaults.renderer || new
|
|
6108
|
+
let i = this.defaults.renderer || new At(this.defaults);
|
|
6049
6109
|
for (let o in n.renderer) {
|
|
6050
6110
|
if (!(o in i)) throw new Error(`renderer '${o}' does not exist`);
|
|
6051
6111
|
if (["options", "parser"].includes(o)) continue;
|
|
@@ -6058,7 +6118,7 @@ ${t}</tr>
|
|
|
6058
6118
|
r.renderer = i;
|
|
6059
6119
|
}
|
|
6060
6120
|
if (n.tokenizer) {
|
|
6061
|
-
let i = this.defaults.tokenizer || new
|
|
6121
|
+
let i = this.defaults.tokenizer || new Rt(this.defaults);
|
|
6062
6122
|
for (let o in n.tokenizer) {
|
|
6063
6123
|
if (!(o in i)) throw new Error(`tokenizer '${o}' does not exist`);
|
|
6064
6124
|
if (["options", "rules", "lexer"].includes(o)) continue;
|
|
@@ -6147,17 +6207,17 @@ Please report this to https://github.com/markedjs/marked.`, t) {
|
|
|
6147
6207
|
throw n;
|
|
6148
6208
|
};
|
|
6149
6209
|
}
|
|
6150
|
-
}, be = new
|
|
6210
|
+
}, be = new pc();
|
|
6151
6211
|
function k(t, e) {
|
|
6152
6212
|
return be.parse(t, e);
|
|
6153
6213
|
}
|
|
6154
6214
|
k.options = k.setOptions = function(t) {
|
|
6155
|
-
return be.setOptions(t), k.defaults = be.defaults,
|
|
6215
|
+
return be.setOptions(t), k.defaults = be.defaults, eo(k.defaults), k;
|
|
6156
6216
|
};
|
|
6157
|
-
k.getDefaults =
|
|
6217
|
+
k.getDefaults = In;
|
|
6158
6218
|
k.defaults = ve;
|
|
6159
6219
|
k.use = function(...t) {
|
|
6160
|
-
return be.use(...t), k.defaults = be.defaults,
|
|
6220
|
+
return be.use(...t), k.defaults = be.defaults, eo(k.defaults), k;
|
|
6161
6221
|
};
|
|
6162
6222
|
k.walkTokens = function(t, e) {
|
|
6163
6223
|
return be.walkTokens(t, e);
|
|
@@ -6165,11 +6225,11 @@ k.walkTokens = function(t, e) {
|
|
|
6165
6225
|
k.parseInline = be.parseInline;
|
|
6166
6226
|
k.Parser = J;
|
|
6167
6227
|
k.parser = J.parse;
|
|
6168
|
-
k.Renderer =
|
|
6169
|
-
k.TextRenderer =
|
|
6228
|
+
k.Renderer = At;
|
|
6229
|
+
k.TextRenderer = Bn;
|
|
6170
6230
|
k.Lexer = W;
|
|
6171
6231
|
k.lexer = W.lex;
|
|
6172
|
-
k.Tokenizer =
|
|
6232
|
+
k.Tokenizer = Rt;
|
|
6173
6233
|
k.Hooks = Ve;
|
|
6174
6234
|
k.parse = k;
|
|
6175
6235
|
k.options;
|
|
@@ -6183,8 +6243,8 @@ k.setOptions({
|
|
|
6183
6243
|
breaks: !0,
|
|
6184
6244
|
gfm: !0
|
|
6185
6245
|
});
|
|
6186
|
-
function
|
|
6187
|
-
const e =
|
|
6246
|
+
function gc({ text: t }) {
|
|
6247
|
+
const e = K(() => {
|
|
6188
6248
|
if (!t)
|
|
6189
6249
|
return "";
|
|
6190
6250
|
const n = k.parse(t);
|
|
@@ -6192,51 +6252,78 @@ function sc({ text: t }) {
|
|
|
6192
6252
|
}, [t]);
|
|
6193
6253
|
return /* @__PURE__ */ c("div", { class: "jex-md", dangerouslySetInnerHTML: { __html: e } });
|
|
6194
6254
|
}
|
|
6195
|
-
const
|
|
6196
|
-
function
|
|
6255
|
+
const Pe = R("");
|
|
6256
|
+
function mc(t) {
|
|
6197
6257
|
if (!t)
|
|
6198
6258
|
return;
|
|
6199
6259
|
const e = t.trim().split(/\s+/)[0];
|
|
6200
6260
|
if (!e)
|
|
6201
6261
|
return;
|
|
6202
|
-
const n = `@${e} `, r =
|
|
6203
|
-
r.includes(n) || r.includes(`@${e}`) || (
|
|
6262
|
+
const n = `@${e} `, r = Pe.value;
|
|
6263
|
+
r.includes(n) || r.includes(`@${e}`) || (Pe.value = r.trimStart() ? `${n}${r.trimStart()}` : n);
|
|
6204
6264
|
}
|
|
6205
|
-
const rt =
|
|
6206
|
-
function
|
|
6265
|
+
const rt = R(null), Or = R(Date.now()), se = R([]), xc = 4, bc = 8 * 1024 * 1024;
|
|
6266
|
+
function yc() {
|
|
6207
6267
|
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `att-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 11)}`;
|
|
6208
6268
|
}
|
|
6209
|
-
function
|
|
6210
|
-
const e = Array.from(t).filter((i) => i.type.startsWith("image/") && i.size <=
|
|
6269
|
+
function vc(t) {
|
|
6270
|
+
const e = Array.from(t).filter((i) => i.type.startsWith("image/") && i.size <= bc);
|
|
6211
6271
|
if (e.length === 0)
|
|
6212
6272
|
return;
|
|
6213
|
-
const n =
|
|
6273
|
+
const n = xc - se.value.length;
|
|
6214
6274
|
if (n <= 0)
|
|
6215
6275
|
return;
|
|
6216
6276
|
const r = e.slice(0, n).map((i) => ({
|
|
6217
6277
|
// Falls back to a non-crypto id when host page is HTTP — see genAttachmentId.
|
|
6218
|
-
id:
|
|
6278
|
+
id: yc(),
|
|
6219
6279
|
file: i,
|
|
6220
6280
|
previewUrl: URL.createObjectURL(i)
|
|
6221
6281
|
}));
|
|
6222
6282
|
se.value = [...se.value, ...r];
|
|
6223
6283
|
}
|
|
6224
|
-
function
|
|
6284
|
+
function _c(t) {
|
|
6225
6285
|
const e = se.value.find((n) => n.id === t);
|
|
6226
6286
|
e && URL.revokeObjectURL(e.previewUrl), se.value = se.value.filter((n) => n.id !== t);
|
|
6227
6287
|
}
|
|
6228
|
-
function
|
|
6288
|
+
function wc() {
|
|
6229
6289
|
for (const t of se.value)
|
|
6230
6290
|
URL.revokeObjectURL(t.previewUrl);
|
|
6231
6291
|
se.value = [];
|
|
6232
6292
|
}
|
|
6233
|
-
|
|
6293
|
+
BigInt("-9223372036854775808");
|
|
6294
|
+
BigInt("9223372036854775807");
|
|
6295
|
+
BigInt("0");
|
|
6296
|
+
BigInt("8");
|
|
6297
|
+
BigInt("256");
|
|
6298
|
+
const kc = /* @__PURE__ */ Symbol.for("functionName"), Sc = /* @__PURE__ */ Symbol.for("toReferencePath");
|
|
6299
|
+
function uo(t = []) {
|
|
6300
|
+
const e = {
|
|
6301
|
+
get(n, r) {
|
|
6302
|
+
if (typeof r == "string") {
|
|
6303
|
+
const i = [...t, r];
|
|
6304
|
+
return uo(i);
|
|
6305
|
+
} else if (r === kc) {
|
|
6306
|
+
if (t.length < 2) {
|
|
6307
|
+
const s = ["api", ...t].join(".");
|
|
6308
|
+
throw new Error(
|
|
6309
|
+
`API path is expected to be of the form \`api.moduleName.functionName\`. Found: \`${s}\``
|
|
6310
|
+
);
|
|
6311
|
+
}
|
|
6312
|
+
const i = t.slice(0, -1).join("/"), o = t[t.length - 1];
|
|
6313
|
+
return o === "default" ? i : i + ":" + o;
|
|
6314
|
+
} else return r === Symbol.toStringTag ? "FunctionReference" : void 0;
|
|
6315
|
+
}
|
|
6316
|
+
};
|
|
6317
|
+
return new Proxy({}, e);
|
|
6318
|
+
}
|
|
6319
|
+
const jc = uo();
|
|
6320
|
+
function ho(t, e) {
|
|
6234
6321
|
const n = {
|
|
6235
6322
|
get(r, i) {
|
|
6236
6323
|
if (typeof i == "string") {
|
|
6237
6324
|
const o = [...e, i];
|
|
6238
|
-
return
|
|
6239
|
-
} else if (i ===
|
|
6325
|
+
return ho(t, o);
|
|
6326
|
+
} else if (i === Sc) {
|
|
6240
6327
|
if (e.length < 1) {
|
|
6241
6328
|
const o = [t, ...e].join(".");
|
|
6242
6329
|
throw new Error(
|
|
@@ -6250,34 +6337,34 @@ function so(t, e) {
|
|
|
6250
6337
|
};
|
|
6251
6338
|
return new Proxy({}, n);
|
|
6252
6339
|
}
|
|
6253
|
-
const
|
|
6254
|
-
|
|
6255
|
-
function
|
|
6256
|
-
const r =
|
|
6340
|
+
const Cc = () => ho("components", []), Me = jc;
|
|
6341
|
+
Cc();
|
|
6342
|
+
function Tc({ sessionId: t, visitorId: e, ensureSession: n }) {
|
|
6343
|
+
const r = It(Me.functions.chat.public.conversations.send);
|
|
6257
6344
|
return async function(o) {
|
|
6258
6345
|
const s = t && e ? { sessionId: t, visitorId: e } : await n();
|
|
6259
6346
|
if (s) {
|
|
6260
|
-
|
|
6347
|
+
Pe.value = "", wc();
|
|
6261
6348
|
try {
|
|
6262
6349
|
const l = await r({
|
|
6263
6350
|
sessionId: s.sessionId,
|
|
6264
6351
|
visitorId: s.visitorId,
|
|
6265
6352
|
content: o
|
|
6266
6353
|
});
|
|
6267
|
-
l.ok ?
|
|
6354
|
+
l.ok ? $n(s.visitorId) : l.reason === "rate_limited" && (rt.value = Date.now() + l.retryAfterMs);
|
|
6268
6355
|
} catch (l) {
|
|
6269
6356
|
console.error("[jexity] Failed to send message:", l);
|
|
6270
6357
|
}
|
|
6271
6358
|
}
|
|
6272
6359
|
};
|
|
6273
6360
|
}
|
|
6274
|
-
function
|
|
6275
|
-
const t = rt.value, e =
|
|
6361
|
+
function Rc() {
|
|
6362
|
+
const t = rt.value, e = Or.value;
|
|
6276
6363
|
T(() => {
|
|
6277
6364
|
if (t === null)
|
|
6278
6365
|
return;
|
|
6279
6366
|
const i = setInterval(() => {
|
|
6280
|
-
|
|
6367
|
+
Or.value = Date.now();
|
|
6281
6368
|
}, 1e3), o = setTimeout(() => {
|
|
6282
6369
|
rt.value = null;
|
|
6283
6370
|
}, Math.max(0, t - Date.now()));
|
|
@@ -6288,35 +6375,35 @@ function mc() {
|
|
|
6288
6375
|
const n = t !== null, r = n ? Math.max(0, Math.ceil((t - e) / 1e3)) : 0;
|
|
6289
6376
|
return { isActive: n, remainingSeconds: r };
|
|
6290
6377
|
}
|
|
6291
|
-
function
|
|
6292
|
-
const t =
|
|
6378
|
+
function Ac() {
|
|
6379
|
+
const t = A(), { isActive: e, remainingSeconds: n } = Rc();
|
|
6293
6380
|
return e ? /* @__PURE__ */ c("div", { class: "jex-rate-limit-notice", role: "status", "aria-live": "polite", children: t.errorRateLimited.replace("{seconds}", String(n)) }) : null;
|
|
6294
6381
|
}
|
|
6295
|
-
const
|
|
6296
|
-
function
|
|
6297
|
-
const t =
|
|
6382
|
+
const je = R(null);
|
|
6383
|
+
function $c() {
|
|
6384
|
+
const t = A(), e = je.value;
|
|
6298
6385
|
if (e === null)
|
|
6299
6386
|
return null;
|
|
6300
6387
|
const n = e === "no-token" ? t.errorSessionNoToken : e === "unauthorized" ? t.errorSessionUnauthorized : e === "network" ? t.errorNetwork : t.somethingWentWrong;
|
|
6301
6388
|
return /* @__PURE__ */ c("div", { class: "jex-session-error-notice", role: "alert", "aria-live": "assertive", children: n });
|
|
6302
6389
|
}
|
|
6303
|
-
function
|
|
6390
|
+
function Ec({ size: t = 18 }) {
|
|
6304
6391
|
return /* @__PURE__ */ c("svg", { width: t, height: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", children: [
|
|
6305
6392
|
/* @__PURE__ */ c("path", { d: "M22 2 11 13" }),
|
|
6306
6393
|
/* @__PURE__ */ c("path", { d: "M22 2 15 22 11 13 2 9l20-7z" })
|
|
6307
6394
|
] });
|
|
6308
6395
|
}
|
|
6309
|
-
const
|
|
6310
|
-
function
|
|
6396
|
+
const Nr = 132;
|
|
6397
|
+
function Ic({ onSend: t }) {
|
|
6311
6398
|
const e = ue(null), n = ue(null);
|
|
6312
6399
|
T(() => {
|
|
6313
6400
|
const l = e.current;
|
|
6314
6401
|
if (!l)
|
|
6315
6402
|
return;
|
|
6316
6403
|
l.style.height = "0";
|
|
6317
|
-
const a = Math.min(l.scrollHeight,
|
|
6318
|
-
l.style.height = `${a}px`, l.style.overflowY = l.scrollHeight >
|
|
6319
|
-
}, [
|
|
6404
|
+
const a = Math.min(l.scrollHeight, Nr);
|
|
6405
|
+
l.style.height = `${a}px`, l.style.overflowY = l.scrollHeight > Nr ? "auto" : "hidden";
|
|
6406
|
+
}, [Pe.value]);
|
|
6320
6407
|
function r(l) {
|
|
6321
6408
|
l.key === "Enter" && !l.shiftKey && (l.preventDefault(), t());
|
|
6322
6409
|
}
|
|
@@ -6325,7 +6412,7 @@ function vc({ onSend: t }) {
|
|
|
6325
6412
|
}
|
|
6326
6413
|
function o(l) {
|
|
6327
6414
|
const a = l.currentTarget;
|
|
6328
|
-
a.files && a.files.length > 0 &&
|
|
6415
|
+
a.files && a.files.length > 0 && vc(a.files), a.value = "";
|
|
6329
6416
|
}
|
|
6330
6417
|
function s(l) {
|
|
6331
6418
|
const a = l.target;
|
|
@@ -6333,8 +6420,8 @@ function vc({ onSend: t }) {
|
|
|
6333
6420
|
}
|
|
6334
6421
|
return { textareaRef: e, fileInputRef: n, onKeyDown: r, onAttachClick: i, onFilesPicked: o, onCardClick: s };
|
|
6335
6422
|
}
|
|
6336
|
-
function
|
|
6337
|
-
const i =
|
|
6423
|
+
function Pc({ isStreaming: t, disabled: e, inputDisabled: n, onSend: r }) {
|
|
6424
|
+
const i = A(), o = Pe, s = se, { textareaRef: l, fileInputRef: a, onKeyDown: u, onAttachClick: d, onFilesPicked: h, onCardClick: f } = Ic({ onSend: r }), p = o.value.trim().length > 0, g = s.value.length > 0, m = (p || g) && !e;
|
|
6338
6425
|
return /* @__PURE__ */ c("div", { class: "jex-composer-card", onClick: f, children: [
|
|
6339
6426
|
g && /* @__PURE__ */ c("div", { class: "jex-composer-attachments", role: "list", children: s.value.map((x) => /* @__PURE__ */ c("div", { class: "jex-attachment-chip", role: "listitem", children: [
|
|
6340
6427
|
/* @__PURE__ */ c("img", { src: x.previewUrl, alt: x.file.name, class: "jex-attachment-thumb" }),
|
|
@@ -6345,7 +6432,7 @@ function _c({ isStreaming: t, disabled: e, inputDisabled: n, onSend: r }) {
|
|
|
6345
6432
|
class: "jex-attachment-remove",
|
|
6346
6433
|
"aria-label": i.removeAttachmentAriaLabel,
|
|
6347
6434
|
onClick: () => {
|
|
6348
|
-
|
|
6435
|
+
_c(x.id);
|
|
6349
6436
|
},
|
|
6350
6437
|
children: /* @__PURE__ */ c("svg", { width: "10", height: "10", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2.5", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", children: [
|
|
6351
6438
|
/* @__PURE__ */ c("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
@@ -6406,14 +6493,14 @@ function _c({ isStreaming: t, disabled: e, inputDisabled: n, onSend: r }) {
|
|
|
6406
6493
|
onClick: r,
|
|
6407
6494
|
"aria-label": i.sendAriaLabel,
|
|
6408
6495
|
disabled: e || !p && !g,
|
|
6409
|
-
children: /* @__PURE__ */ c(
|
|
6496
|
+
children: /* @__PURE__ */ c(Ec, { size: 16 })
|
|
6410
6497
|
}
|
|
6411
6498
|
)
|
|
6412
6499
|
] })
|
|
6413
6500
|
] });
|
|
6414
6501
|
}
|
|
6415
|
-
function
|
|
6416
|
-
const l =
|
|
6502
|
+
function Mc({ sessionId: t, visitorId: e, isLoading: n, isStreaming: r, sessionStatus: i, ensureSession: o, onStartFresh: s }) {
|
|
6503
|
+
const l = A(), a = Pe, u = Tc({ sessionId: t, visitorId: e, ensureSession: o }), d = rt.value !== null && rt.value > Date.now(), h = n || r || d;
|
|
6417
6504
|
if (i === "resolved")
|
|
6418
6505
|
return /* @__PURE__ */ c("div", { class: "jex-chat-input-resolved", children: [
|
|
6419
6506
|
/* @__PURE__ */ c("div", { class: "jex-resolved-notice", children: l.sessionResolved }),
|
|
@@ -6434,10 +6521,10 @@ function wc({ sessionId: t, visitorId: e, isLoading: n, isStreaming: r, sessionS
|
|
|
6434
6521
|
!p || h || await u(p);
|
|
6435
6522
|
}
|
|
6436
6523
|
return /* @__PURE__ */ c("div", { class: "jex-chat-input", children: [
|
|
6437
|
-
/* @__PURE__ */ c(
|
|
6438
|
-
/* @__PURE__ */ c(
|
|
6524
|
+
/* @__PURE__ */ c(Ac, {}),
|
|
6525
|
+
/* @__PURE__ */ c($c, {}),
|
|
6439
6526
|
/* @__PURE__ */ c(
|
|
6440
|
-
|
|
6527
|
+
Pc,
|
|
6441
6528
|
{
|
|
6442
6529
|
isStreaming: r,
|
|
6443
6530
|
disabled: h,
|
|
@@ -6447,20 +6534,20 @@ function wc({ sessionId: t, visitorId: e, isLoading: n, isStreaming: r, sessionS
|
|
|
6447
6534
|
)
|
|
6448
6535
|
] });
|
|
6449
6536
|
}
|
|
6450
|
-
function
|
|
6537
|
+
function Lc(t) {
|
|
6451
6538
|
const e = t.trim().split(/\s+/).filter(Boolean);
|
|
6452
6539
|
return e.length === 0 ? "?" : e.map((n) => n[0]).join("").slice(0, 2).toUpperCase();
|
|
6453
6540
|
}
|
|
6454
6541
|
function ke({ text: t, streaming: e, error: n, authorId: r, authorName: i, authorImage: o, botAvatarUrl: s }) {
|
|
6455
|
-
const l =
|
|
6542
|
+
const l = A(), a = !!r, [u, d] = C(!1), h = Re(() => d(!0), []), f = l.replyTo.replace("{name}", i ?? ""), p = [
|
|
6456
6543
|
"jex-message bot",
|
|
6457
6544
|
n ? "jex-message-error" : ""
|
|
6458
6545
|
].filter(Boolean).join(" ");
|
|
6459
6546
|
return /* @__PURE__ */ c("div", { class: "jex-message-row bot", children: [
|
|
6460
|
-
/* @__PURE__ */ c("div", { class: `jex-avatar ${a ? "jex-avatar-agent" : "jex-avatar-bot"}`, children: a && o && !u ? /* @__PURE__ */ c("img", { src: o, alt: i ?? "", class: "jex-avatar-img", onError: h }) : a ? /* @__PURE__ */ c("span", { class: "jex-avatar-initials", children:
|
|
6547
|
+
/* @__PURE__ */ c("div", { class: `jex-avatar ${a ? "jex-avatar-agent" : "jex-avatar-bot"}`, children: a && o && !u ? /* @__PURE__ */ c("img", { src: o, alt: i ?? "", class: "jex-avatar-img", onError: h }) : a ? /* @__PURE__ */ c("span", { class: "jex-avatar-initials", children: Lc(i ?? "") }) : s && !u ? /* @__PURE__ */ c("img", { src: s, alt: "", class: "jex-avatar-img", onError: h }) : /* @__PURE__ */ c(En, { size: 14 }) }),
|
|
6461
6548
|
/* @__PURE__ */ c("div", { class: "jex-message-content", children: [
|
|
6462
6549
|
/* @__PURE__ */ c("div", { class: p, children: [
|
|
6463
|
-
/* @__PURE__ */ c(
|
|
6550
|
+
/* @__PURE__ */ c(gc, { text: t }),
|
|
6464
6551
|
e && /* @__PURE__ */ c("span", { class: "jex-streaming-cursor" })
|
|
6465
6552
|
] }),
|
|
6466
6553
|
a && i && /* @__PURE__ */ c("div", { class: "jex-message-author-row", children: [
|
|
@@ -6473,23 +6560,23 @@ function ke({ text: t, streaming: e, error: n, authorId: r, authorName: i, autho
|
|
|
6473
6560
|
"aria-label": f,
|
|
6474
6561
|
title: f,
|
|
6475
6562
|
onClick: () => {
|
|
6476
|
-
|
|
6563
|
+
mc(i);
|
|
6477
6564
|
},
|
|
6478
|
-
children: /* @__PURE__ */ c(
|
|
6565
|
+
children: /* @__PURE__ */ c(Tl, { size: 12 })
|
|
6479
6566
|
}
|
|
6480
6567
|
)
|
|
6481
6568
|
] })
|
|
6482
6569
|
] })
|
|
6483
6570
|
] });
|
|
6484
6571
|
}
|
|
6485
|
-
function
|
|
6572
|
+
function qc({ text: t }) {
|
|
6486
6573
|
return /* @__PURE__ */ c("div", { class: "jex-message user", children: t });
|
|
6487
6574
|
}
|
|
6488
|
-
function
|
|
6489
|
-
return
|
|
6575
|
+
function fo() {
|
|
6576
|
+
return It(Me.functions.chat.public.helpdesk.submitEscalation);
|
|
6490
6577
|
}
|
|
6491
|
-
function
|
|
6492
|
-
const r =
|
|
6578
|
+
function Oc({ message: t, sessionId: e, visitorId: n }) {
|
|
6579
|
+
const r = A();
|
|
6493
6580
|
return t.formData ? /* @__PURE__ */ c("div", { class: "jex-inline-form-submitted", children: [
|
|
6494
6581
|
/* @__PURE__ */ c("span", { class: "jex-inline-form-check", children: "✓" }),
|
|
6495
6582
|
/* @__PURE__ */ c("div", { children: [
|
|
@@ -6501,7 +6588,7 @@ function Sc({ message: t, sessionId: e, visitorId: n }) {
|
|
|
6501
6588
|
] })
|
|
6502
6589
|
] })
|
|
6503
6590
|
] }) : /* @__PURE__ */ c("div", { class: "jex-message-row bot", children: /* @__PURE__ */ c(
|
|
6504
|
-
|
|
6591
|
+
Nc,
|
|
6505
6592
|
{
|
|
6506
6593
|
messageId: t._id,
|
|
6507
6594
|
sessionId: e,
|
|
@@ -6509,8 +6596,8 @@ function Sc({ message: t, sessionId: e, visitorId: n }) {
|
|
|
6509
6596
|
}
|
|
6510
6597
|
) });
|
|
6511
6598
|
}
|
|
6512
|
-
function
|
|
6513
|
-
const r =
|
|
6599
|
+
function Nc({ messageId: t, sessionId: e, visitorId: n }) {
|
|
6600
|
+
const r = A(), [i, o] = C(""), [s, l] = C(""), [a, u] = C(!1), d = fo();
|
|
6514
6601
|
async function h(f) {
|
|
6515
6602
|
if (f.preventDefault(), !a) {
|
|
6516
6603
|
u(!0);
|
|
@@ -6565,14 +6652,14 @@ function Cc({ messageId: t, sessionId: e, visitorId: n }) {
|
|
|
6565
6652
|
/* @__PURE__ */ c("div", { class: "jex-inline-form-consent", children: r.escalationConsent })
|
|
6566
6653
|
] });
|
|
6567
6654
|
}
|
|
6568
|
-
const
|
|
6655
|
+
const zc = {
|
|
6569
6656
|
crawl: "🌐",
|
|
6570
6657
|
file: "📄",
|
|
6571
6658
|
snippet: "💡",
|
|
6572
6659
|
qa: "❓"
|
|
6573
6660
|
};
|
|
6574
|
-
function
|
|
6575
|
-
const e =
|
|
6661
|
+
function Bc({ sources: t }) {
|
|
6662
|
+
const e = A(), [n, r] = C(!1);
|
|
6576
6663
|
return t.length === 0 ? null : /* @__PURE__ */ c("div", { class: "jex-sources-row", children: [
|
|
6577
6664
|
/* @__PURE__ */ c(
|
|
6578
6665
|
"button",
|
|
@@ -6594,10 +6681,10 @@ function Rc({ sources: t }) {
|
|
|
6594
6681
|
}
|
|
6595
6682
|
),
|
|
6596
6683
|
n ? /* @__PURE__ */ c("div", { class: "jex-sources-pills", children: t.map((i, o) => {
|
|
6597
|
-
const s = i.sourceType === "crawl", l =
|
|
6684
|
+
const s = i.sourceType === "crawl", l = Fc(i), a = s && i.url ? `${i.title}
|
|
6598
6685
|
${i.url}` : i.title, u = /* @__PURE__ */ c(F, { children: [
|
|
6599
6686
|
typeof i.id == "number" ? /* @__PURE__ */ c("span", { class: "jex-source-id", children: i.id }) : null,
|
|
6600
|
-
/* @__PURE__ */ c("span", { class: "jex-source-type", children:
|
|
6687
|
+
/* @__PURE__ */ c("span", { class: "jex-source-type", children: zc[i.sourceType] }),
|
|
6601
6688
|
/* @__PURE__ */ c("span", { class: "jex-source-label", children: l }),
|
|
6602
6689
|
/* @__PURE__ */ c("span", { class: "jex-source-score", children: [
|
|
6603
6690
|
"· ",
|
|
@@ -6619,7 +6706,7 @@ ${i.url}` : i.title, u = /* @__PURE__ */ c(F, { children: [
|
|
|
6619
6706
|
}) }) : null
|
|
6620
6707
|
] });
|
|
6621
6708
|
}
|
|
6622
|
-
function
|
|
6709
|
+
function Fc(t) {
|
|
6623
6710
|
if (t.sourceType === "crawl" && t.url)
|
|
6624
6711
|
try {
|
|
6625
6712
|
const e = new URL(t.url);
|
|
@@ -6628,24 +6715,24 @@ function Ac(t) {
|
|
|
6628
6715
|
}
|
|
6629
6716
|
return t.title;
|
|
6630
6717
|
}
|
|
6631
|
-
function
|
|
6718
|
+
function Uc() {
|
|
6632
6719
|
return /* @__PURE__ */ c("div", { class: "jex-typing", children: [
|
|
6633
6720
|
/* @__PURE__ */ c("span", {}),
|
|
6634
6721
|
/* @__PURE__ */ c("span", {}),
|
|
6635
6722
|
/* @__PURE__ */ c("span", {})
|
|
6636
6723
|
] });
|
|
6637
6724
|
}
|
|
6638
|
-
const
|
|
6639
|
-
function
|
|
6640
|
-
return t.replace(
|
|
6725
|
+
const Qc = /\s?\[\d+\]/g;
|
|
6726
|
+
function zr(t) {
|
|
6727
|
+
return t.replace(Qc, "");
|
|
6641
6728
|
}
|
|
6642
|
-
function
|
|
6643
|
-
const l =
|
|
6729
|
+
function Dc({ conversations: t, greeting: e, sessionNotFound: n, resumeFailed: r, onStartFresh: i, sessionId: o, visitorId: s }) {
|
|
6730
|
+
const l = A(), a = ue(null), [u, d] = C(null), h = ue(null);
|
|
6644
6731
|
return T(() => {
|
|
6645
6732
|
if (!s || !t || t.length === 0)
|
|
6646
6733
|
return;
|
|
6647
6734
|
const f = t[t.length - 1];
|
|
6648
|
-
f.role === "assistant" && f.status !== "streaming" && f._id !== h.current && (h.current = f._id,
|
|
6735
|
+
f.role === "assistant" && f.status !== "streaming" && f._id !== h.current && (h.current = f._id, $n(s));
|
|
6649
6736
|
}, [t, s]), T(() => {
|
|
6650
6737
|
a.current?.scrollIntoView({ behavior: "smooth" });
|
|
6651
6738
|
}, [t?.length, t?.at(-1)?.content]), /* @__PURE__ */ c("div", { class: "jex-chat-messages", children: [
|
|
@@ -6670,7 +6757,7 @@ function Ic({ conversations: t, greeting: e, sessionNotFound: n, resumeFailed: r
|
|
|
6670
6757
|
return /* @__PURE__ */ c(ke, { text: g }, f._id);
|
|
6671
6758
|
}
|
|
6672
6759
|
if (f.contentType === "escalation-form" && o && s)
|
|
6673
|
-
return
|
|
6760
|
+
return rl.value === "screen" && !f.formData ? u === f._id ? null : /* @__PURE__ */ c("div", { class: "jex-inline-form jex-inline-form-card", children: [
|
|
6674
6761
|
/* @__PURE__ */ c("div", { class: "jex-inline-form-title", children: l.escalationPromptTitle }),
|
|
6675
6762
|
/* @__PURE__ */ c("div", { class: "jex-inline-form-subtitle", children: l.escalationPromptSubtitle }),
|
|
6676
6763
|
/* @__PURE__ */ c(
|
|
@@ -6695,19 +6782,19 @@ function Ic({ conversations: t, greeting: e, sessionNotFound: n, resumeFailed: r
|
|
|
6695
6782
|
children: l.escalationSkip
|
|
6696
6783
|
}
|
|
6697
6784
|
)
|
|
6698
|
-
] }, f._id) : /* @__PURE__ */ c(
|
|
6785
|
+
] }, f._id) : /* @__PURE__ */ c(Oc, { message: f, sessionId: o, visitorId: s }, f._id);
|
|
6699
6786
|
if (f.contentType === "escalation-confirm") {
|
|
6700
6787
|
const g = f.noticeKind === "escalation-confirmed" ? l.noticeEscalationConfirmed.replace("{name}", f.noticeData?.visitorName ?? "").replace("{email}", f.noticeData?.visitorEmail ?? "").replace("{ref}", f.noticeData?.visitorId ?? "") : f.content;
|
|
6701
6788
|
return /* @__PURE__ */ c(ke, { text: g }, f._id);
|
|
6702
6789
|
}
|
|
6703
6790
|
if (f.role === "user")
|
|
6704
|
-
return /* @__PURE__ */ c(
|
|
6791
|
+
return /* @__PURE__ */ c(qc, { text: f.content }, f._id);
|
|
6705
6792
|
const p = {
|
|
6706
6793
|
authorId: f.authorId,
|
|
6707
6794
|
authorName: f.authorName,
|
|
6708
6795
|
authorImage: f.authorImage
|
|
6709
6796
|
};
|
|
6710
|
-
return f.status === "streaming" && f.content === "" ? /* @__PURE__ */ c(
|
|
6797
|
+
return f.status === "streaming" && f.content === "" ? /* @__PURE__ */ c(Uc, {}, f._id) : f.status === "streaming" ? /* @__PURE__ */ c(ke, { text: zr(f.content), streaming: !0, ...p }, f._id) : f.status === "error" ? /* @__PURE__ */ c(
|
|
6711
6798
|
ke,
|
|
6712
6799
|
{
|
|
6713
6800
|
text: f.errorMessage ?? `${l.somethingWentWrong}. ${l.tryAgain}.`,
|
|
@@ -6716,14 +6803,14 @@ function Ic({ conversations: t, greeting: e, sessionNotFound: n, resumeFailed: r
|
|
|
6716
6803
|
},
|
|
6717
6804
|
f._id
|
|
6718
6805
|
) : /* @__PURE__ */ c("div", { children: [
|
|
6719
|
-
/* @__PURE__ */ c(ke, { text:
|
|
6720
|
-
f.sources && f.sources.length > 0 ? /* @__PURE__ */ c(
|
|
6806
|
+
/* @__PURE__ */ c(ke, { text: zr(f.content), ...p }),
|
|
6807
|
+
f.sources && f.sources.length > 0 ? /* @__PURE__ */ c(Bc, { sources: f.sources }) : null
|
|
6721
6808
|
] }, f._id);
|
|
6722
6809
|
}),
|
|
6723
6810
|
/* @__PURE__ */ c("div", { ref: a })
|
|
6724
6811
|
] });
|
|
6725
6812
|
}
|
|
6726
|
-
function
|
|
6813
|
+
function xn({ message: t }) {
|
|
6727
6814
|
const [e, n] = C(!1);
|
|
6728
6815
|
return T(() => {
|
|
6729
6816
|
const r = setTimeout(() => {
|
|
@@ -6737,11 +6824,11 @@ function pn({ message: t }) {
|
|
|
6737
6824
|
t && /* @__PURE__ */ c("p", { class: "jex-loading-message", children: t })
|
|
6738
6825
|
] }) : null;
|
|
6739
6826
|
}
|
|
6740
|
-
function
|
|
6741
|
-
const n =
|
|
6827
|
+
function Vc({ sessionId: t, visitorId: e }) {
|
|
6828
|
+
const n = _r(
|
|
6742
6829
|
Me.functions.chat.public.conversations.listBySession,
|
|
6743
6830
|
t && e ? { sessionId: t, visitorId: e } : "skip"
|
|
6744
|
-
), r =
|
|
6831
|
+
), r = _r(
|
|
6745
6832
|
Me.functions.chat.public.sessions.getSessionStatus,
|
|
6746
6833
|
t && e ? { sessionId: t, visitorId: e } : "skip"
|
|
6747
6834
|
), i = t !== null && n === void 0, o = n?.some((s) => s.status === "streaming") ?? !1;
|
|
@@ -6752,25 +6839,25 @@ function Mc({ sessionId: t, visitorId: e }) {
|
|
|
6752
6839
|
isStreaming: o
|
|
6753
6840
|
};
|
|
6754
6841
|
}
|
|
6755
|
-
function
|
|
6756
|
-
const h =
|
|
6842
|
+
function Hc({ greeting: t, orgSlug: e, projSlug: n, sessionId: r, visitorId: i, isLoading: o, sessionNotFound: s, resumeFailed: l, isOrgDeleted: a, ensureSession: u, startFresh: d }) {
|
|
6843
|
+
const h = A(), { conversations: f, sessionStatus: p, isLoading: g, isStreaming: m } = Vc({ sessionId: r, visitorId: i }), x = ue(
|
|
6757
6844
|
(() => {
|
|
6758
|
-
const I =
|
|
6759
|
-
return I !== null ? I :
|
|
6845
|
+
const I = Ke.peek();
|
|
6846
|
+
return I !== null ? I : Ki.peek() ? "resume" : "fresh";
|
|
6760
6847
|
})()
|
|
6761
6848
|
).current;
|
|
6762
6849
|
if (T(() => {
|
|
6763
|
-
|
|
6850
|
+
Ke.value = null;
|
|
6764
6851
|
}, []), T(() => {
|
|
6765
6852
|
u();
|
|
6766
6853
|
}, [u]), T(() => {
|
|
6767
|
-
i &&
|
|
6854
|
+
i && $n(i);
|
|
6768
6855
|
}, [i]), a)
|
|
6769
6856
|
return /* @__PURE__ */ c("div", { class: "jex-chat-messages", children: /* @__PURE__ */ c("div", { class: "jex-session-notice", children: h.chatNoLongerAvailable }) });
|
|
6770
6857
|
const v = x === "fresh" && !r, y = x === "resume" && (!r || g);
|
|
6771
|
-
return v ? /* @__PURE__ */ c(
|
|
6858
|
+
return v ? /* @__PURE__ */ c(xn, { message: h.startingConversation }) : y ? /* @__PURE__ */ c(xn, { message: h.resumeConversation }) : /* @__PURE__ */ c(F, { children: [
|
|
6772
6859
|
/* @__PURE__ */ c(
|
|
6773
|
-
|
|
6860
|
+
Dc,
|
|
6774
6861
|
{
|
|
6775
6862
|
conversations: f,
|
|
6776
6863
|
greeting: t,
|
|
@@ -6782,7 +6869,7 @@ function qc({ greeting: t, orgSlug: e, projSlug: n, sessionId: r, visitorId: i,
|
|
|
6782
6869
|
}
|
|
6783
6870
|
),
|
|
6784
6871
|
/* @__PURE__ */ c(
|
|
6785
|
-
|
|
6872
|
+
Mc,
|
|
6786
6873
|
{
|
|
6787
6874
|
sessionId: r,
|
|
6788
6875
|
visitorId: i,
|
|
@@ -6795,8 +6882,8 @@ function qc({ greeting: t, orgSlug: e, projSlug: n, sessionId: r, visitorId: i,
|
|
|
6795
6882
|
)
|
|
6796
6883
|
] });
|
|
6797
6884
|
}
|
|
6798
|
-
function
|
|
6799
|
-
const r =
|
|
6885
|
+
function Wc({ formMessageId: t, sessionId: e, visitorId: n }) {
|
|
6886
|
+
const r = A(), [i, o] = C(""), [s, l] = C(""), a = fo(), [u, d] = C(!1), [h, f] = C(null);
|
|
6800
6887
|
async function p(g) {
|
|
6801
6888
|
g.preventDefault(), d(!0), f(null);
|
|
6802
6889
|
try {
|
|
@@ -6806,7 +6893,7 @@ function Pc({ formMessageId: t, sessionId: e, visitorId: n }) {
|
|
|
6806
6893
|
formMessageId: t,
|
|
6807
6894
|
visitorName: i.trim(),
|
|
6808
6895
|
visitorEmail: s.trim()
|
|
6809
|
-
}),
|
|
6896
|
+
}), Ct();
|
|
6810
6897
|
} catch (m) {
|
|
6811
6898
|
console.error("[EscalationFormScreen] Submit failed:", m), f(r.escalationSubmitFailed);
|
|
6812
6899
|
} finally {
|
|
@@ -6850,15 +6937,15 @@ function Pc({ formMessageId: t, sessionId: e, visitorId: n }) {
|
|
|
6850
6937
|
] }),
|
|
6851
6938
|
/* @__PURE__ */ c("div", { class: "jex-inline-form-consent", style: { textAlign: "center", margin: "16px 0 8px 0" }, children: r.escalationConsent }),
|
|
6852
6939
|
/* @__PURE__ */ c("button", { class: "jex-escalation-skip", type: "button", onClick: () => {
|
|
6853
|
-
|
|
6940
|
+
Ct();
|
|
6854
6941
|
}, children: r.escalationSkip })
|
|
6855
6942
|
] });
|
|
6856
6943
|
}
|
|
6857
|
-
function
|
|
6858
|
-
return
|
|
6944
|
+
function Jc() {
|
|
6945
|
+
return It(Me.functions.chat.public.helpdesk.createEscalationRequest);
|
|
6859
6946
|
}
|
|
6860
|
-
function
|
|
6861
|
-
const n =
|
|
6947
|
+
function Br({ sessionId: t, visitorId: e }) {
|
|
6948
|
+
const n = A(), [r, i] = C(!1), [o, s] = C(null), l = Jc();
|
|
6862
6949
|
async function a() {
|
|
6863
6950
|
if (!t || !e)
|
|
6864
6951
|
return;
|
|
@@ -6901,23 +6988,23 @@ function Pr({ sessionId: t, visitorId: e }) {
|
|
|
6901
6988
|
o && /* @__PURE__ */ c("div", { class: "jex-handoff-error", role: "alert", children: o })
|
|
6902
6989
|
] });
|
|
6903
6990
|
}
|
|
6904
|
-
async function
|
|
6905
|
-
const t =
|
|
6991
|
+
async function Gc() {
|
|
6992
|
+
const t = Ui.value;
|
|
6906
6993
|
if (!t)
|
|
6907
6994
|
return console.warn("[JexityChat] Bootstrap refresh skipped — inputs missing"), { ok: !1, reason: "no-inputs" };
|
|
6908
|
-
const e = await
|
|
6995
|
+
const e = await Di(t.orgSlug, t.siteUrl, t.projSlug);
|
|
6909
6996
|
if (!e.ok)
|
|
6910
6997
|
return console.warn("[JexityChat] Bootstrap refresh failed:", e.error), { ok: !1, reason: e.error };
|
|
6911
6998
|
const n = e.token;
|
|
6912
6999
|
return le.value = n, { ok: !0, token: n };
|
|
6913
7000
|
}
|
|
6914
|
-
function
|
|
6915
|
-
return
|
|
7001
|
+
function Fr(t) {
|
|
7002
|
+
return po(t) ? "unauthorized" : t instanceof Error && /network|fetch|failed to fetch/i.test(t.message) ? "network" : "unknown";
|
|
6916
7003
|
}
|
|
6917
|
-
function
|
|
7004
|
+
function po(t) {
|
|
6918
7005
|
return t instanceof yt ? t.data?.code === "UNAUTHORIZED_ORIGIN" : !1;
|
|
6919
7006
|
}
|
|
6920
|
-
function
|
|
7007
|
+
function Kc(t = 1e4) {
|
|
6921
7008
|
return le.value ? Promise.resolve(le.value) : new Promise((e) => {
|
|
6922
7009
|
let n = !1;
|
|
6923
7010
|
const r = (s) => {
|
|
@@ -6929,64 +7016,64 @@ function Nc(t = 1e4) {
|
|
|
6929
7016
|
});
|
|
6930
7017
|
});
|
|
6931
7018
|
}
|
|
6932
|
-
function
|
|
6933
|
-
const n = ue(null), r =
|
|
6934
|
-
const g = await
|
|
7019
|
+
function Zc(t, e) {
|
|
7020
|
+
const n = ue(null), r = Te(!1), i = Te(!1), o = Te(!1), s = Te(null), l = It(Me.functions.chat.public.sessions.createOrResume), a = async (p) => {
|
|
7021
|
+
const g = await Kc();
|
|
6935
7022
|
if (!g)
|
|
6936
|
-
return console.warn("[JexityChat] No bootstrap token after 10s — session creation blocked."),
|
|
7023
|
+
return console.warn("[JexityChat] No bootstrap token after 10s — session creation blocked."), je.value = "no-token", null;
|
|
6937
7024
|
const m = (y) => ({
|
|
6938
7025
|
orgSlug: t,
|
|
6939
7026
|
...e ? { projSlug: e } : {},
|
|
6940
7027
|
visitorId: p,
|
|
6941
7028
|
bootstrapToken: y,
|
|
6942
|
-
...
|
|
7029
|
+
...St.value ? { source: St.value } : {}
|
|
6943
7030
|
});
|
|
6944
|
-
|
|
7031
|
+
dn.value = !0;
|
|
6945
7032
|
let x;
|
|
6946
7033
|
try {
|
|
6947
7034
|
try {
|
|
6948
7035
|
x = await l(m(g));
|
|
6949
7036
|
} catch (y) {
|
|
6950
|
-
if (!
|
|
7037
|
+
if (!po(y))
|
|
6951
7038
|
throw y;
|
|
6952
|
-
const I = await
|
|
7039
|
+
const I = await Gc();
|
|
6953
7040
|
if (!I.ok)
|
|
6954
|
-
return
|
|
7041
|
+
return je.value = I.reason === "rate_limited" ? "network" : "unauthorized", null;
|
|
6955
7042
|
x = await l(m(I.token));
|
|
6956
7043
|
}
|
|
6957
7044
|
} finally {
|
|
6958
|
-
|
|
7045
|
+
dn.value = !1;
|
|
6959
7046
|
}
|
|
6960
|
-
|
|
7047
|
+
je.value = null, s.value = x.status;
|
|
6961
7048
|
const v = { sessionId: x.sessionId, visitorId: p };
|
|
6962
7049
|
return n.current = v, { session: v, result: x };
|
|
6963
|
-
}, u =
|
|
7050
|
+
}, u = Re(async () => {
|
|
6964
7051
|
if (n.current)
|
|
6965
7052
|
return n.current;
|
|
6966
7053
|
if (o.value)
|
|
6967
7054
|
return null;
|
|
6968
7055
|
r.value = !0;
|
|
6969
|
-
const p = xe.value !== null, g = xe.value ??
|
|
7056
|
+
const p = xe.value !== null, g = xe.value ?? Sr();
|
|
6970
7057
|
try {
|
|
6971
7058
|
const m = await a(g);
|
|
6972
7059
|
return m ? (p && m.result.isNew && (i.value = !0, o.value = !0), m.session) : null;
|
|
6973
7060
|
} catch (m) {
|
|
6974
|
-
return console.error("[JexityChat] Failed to create session:", m),
|
|
7061
|
+
return console.error("[JexityChat] Failed to create session:", m), je.value = Fr(m), null;
|
|
6975
7062
|
} finally {
|
|
6976
7063
|
r.value = !1;
|
|
6977
7064
|
}
|
|
6978
|
-
}, [t, e, l, r, i, o]), d =
|
|
7065
|
+
}, [t, e, l, r, i, o]), d = Re(() => {
|
|
6979
7066
|
n.current = null, i.value = !1, o.value = !1;
|
|
6980
7067
|
}, [i, o]);
|
|
6981
|
-
T(() =>
|
|
6982
|
-
const h =
|
|
7068
|
+
T(() => ol(d), [d]);
|
|
7069
|
+
const h = Re(async () => {
|
|
6983
7070
|
n.current = null, o.value = !1, i.value = !1;
|
|
6984
|
-
const p =
|
|
7071
|
+
const p = Sr();
|
|
6985
7072
|
r.value = !0;
|
|
6986
7073
|
try {
|
|
6987
7074
|
return (await a(p))?.session ?? null;
|
|
6988
7075
|
} catch (g) {
|
|
6989
|
-
return console.error("[JexityChat] Failed to create fresh session:", g),
|
|
7076
|
+
return console.error("[JexityChat] Failed to create fresh session:", g), je.value = Fr(g), null;
|
|
6990
7077
|
} finally {
|
|
6991
7078
|
r.value = !1;
|
|
6992
7079
|
}
|
|
@@ -7004,14 +7091,14 @@ function zc(t, e) {
|
|
|
7004
7091
|
resetSession: d
|
|
7005
7092
|
};
|
|
7006
7093
|
}
|
|
7007
|
-
function
|
|
7008
|
-
const t =
|
|
7094
|
+
function Yc() {
|
|
7095
|
+
const t = A(), [e, n] = C(""), [r, i] = C(""), [o, s] = C("");
|
|
7009
7096
|
async function l(a) {
|
|
7010
|
-
a.preventDefault(),
|
|
7097
|
+
a.preventDefault(), hn({ id: "loading", message: t.submittingTicket }), await new Promise((d) => {
|
|
7011
7098
|
setTimeout(d, 1200);
|
|
7012
7099
|
});
|
|
7013
7100
|
const u = "JEX-" + Math.random().toString(36).slice(2, 8).toUpperCase();
|
|
7014
|
-
|
|
7101
|
+
hn({ id: "confirmation", ref: u });
|
|
7015
7102
|
}
|
|
7016
7103
|
return /* @__PURE__ */ c("div", { class: "jex-form-screen", children: [
|
|
7017
7104
|
/* @__PURE__ */ c("h2", { class: "jex-form-title", children: t.submitTicket }),
|
|
@@ -7060,8 +7147,8 @@ function Bc() {
|
|
|
7060
7147
|
] })
|
|
7061
7148
|
] });
|
|
7062
7149
|
}
|
|
7063
|
-
function
|
|
7064
|
-
const e =
|
|
7150
|
+
function Xc({ ticketRef: t }) {
|
|
7151
|
+
const e = A();
|
|
7065
7152
|
return /* @__PURE__ */ c("div", { class: "jex-confirmation", children: [
|
|
7066
7153
|
/* @__PURE__ */ c("div", { class: "jex-confirmation-icon", "aria-hidden": "true", children: "✓" }),
|
|
7067
7154
|
/* @__PURE__ */ c("h2", { class: "jex-confirmation-title", children: e.ticketSubmitted }),
|
|
@@ -7073,15 +7160,15 @@ function Fc({ ticketRef: t }) {
|
|
|
7073
7160
|
{
|
|
7074
7161
|
class: "jex-confirmation-done",
|
|
7075
7162
|
onClick: () => {
|
|
7076
|
-
|
|
7163
|
+
P.value = !1;
|
|
7077
7164
|
},
|
|
7078
7165
|
children: e.done
|
|
7079
7166
|
}
|
|
7080
7167
|
)
|
|
7081
7168
|
] });
|
|
7082
7169
|
}
|
|
7083
|
-
function
|
|
7084
|
-
const r =
|
|
7170
|
+
function eu({ message: t, onRetry: e, onBack: n }) {
|
|
7171
|
+
const r = A();
|
|
7085
7172
|
return /* @__PURE__ */ c("div", { class: "jex-overlay jex-error", children: [
|
|
7086
7173
|
/* @__PURE__ */ c("p", { class: "jex-error-message", children: t }),
|
|
7087
7174
|
/* @__PURE__ */ c("div", { class: "jex-error-actions", children: [
|
|
@@ -7090,25 +7177,25 @@ function Qc({ message: t, onRetry: e, onBack: n }) {
|
|
|
7090
7177
|
] })
|
|
7091
7178
|
] });
|
|
7092
7179
|
}
|
|
7093
|
-
function
|
|
7180
|
+
function Ur({ greeting: t, title: e, orgSlug: n, projSlug: r, sessionId: i, visitorId: o, isLoading: s, sessionNotFound: l, resumeFailed: a, isOrgDeleted: u, ensureSession: d, startFresh: h, resetSession: f }) {
|
|
7094
7181
|
const p = z.value, g = p[p.length - 1], m = [...p].reverse().find(
|
|
7095
7182
|
(x) => x.id === "confirmation"
|
|
7096
7183
|
);
|
|
7097
7184
|
return /* @__PURE__ */ c("div", { class: "jex-screen-container", children: [
|
|
7098
|
-
g.id === "home" && /* @__PURE__ */ c(
|
|
7099
|
-
g.id === "selection" && /* @__PURE__ */ c(
|
|
7100
|
-
g.id === "form" && /* @__PURE__ */ c(
|
|
7185
|
+
g.id === "home" && /* @__PURE__ */ c(yl, { greeting: t, title: e, onStartFresh: h, onResetSession: f }),
|
|
7186
|
+
g.id === "selection" && /* @__PURE__ */ c(vl, { title: e }),
|
|
7187
|
+
g.id === "form" && /* @__PURE__ */ c(Yc, {}),
|
|
7101
7188
|
g.id === "escalation-form" && /* @__PURE__ */ c(
|
|
7102
|
-
|
|
7189
|
+
Wc,
|
|
7103
7190
|
{
|
|
7104
7191
|
formMessageId: g.formMessageId,
|
|
7105
7192
|
sessionId: g.sessionId,
|
|
7106
7193
|
visitorId: g.visitorId
|
|
7107
7194
|
}
|
|
7108
7195
|
),
|
|
7109
|
-
g.id === "confirmation" && m && /* @__PURE__ */ c(
|
|
7196
|
+
g.id === "confirmation" && m && /* @__PURE__ */ c(Xc, { ticketRef: m.ref }),
|
|
7110
7197
|
g.id === "chat" && /* @__PURE__ */ c(
|
|
7111
|
-
|
|
7198
|
+
Hc,
|
|
7112
7199
|
{
|
|
7113
7200
|
greeting: t,
|
|
7114
7201
|
orgSlug: n,
|
|
@@ -7123,43 +7210,52 @@ function Or({ greeting: t, title: e, orgSlug: n, projSlug: r, sessionId: i, visi
|
|
|
7123
7210
|
startFresh: h
|
|
7124
7211
|
}
|
|
7125
7212
|
),
|
|
7126
|
-
g.id === "loading" && /* @__PURE__ */ c(
|
|
7213
|
+
g.id === "loading" && /* @__PURE__ */ c(xn, { message: g.message }),
|
|
7127
7214
|
g.id === "error" && /* @__PURE__ */ c(
|
|
7128
|
-
|
|
7215
|
+
eu,
|
|
7129
7216
|
{
|
|
7130
7217
|
message: g.message,
|
|
7131
|
-
onRetry: () =>
|
|
7132
|
-
onBack:
|
|
7218
|
+
onRetry: () => hn({ id: "loading" }),
|
|
7219
|
+
onBack: Ct
|
|
7133
7220
|
}
|
|
7134
7221
|
)
|
|
7135
7222
|
] });
|
|
7136
7223
|
}
|
|
7137
|
-
function
|
|
7138
|
-
|
|
7139
|
-
|
|
7140
|
-
|
|
7141
|
-
|
|
7224
|
+
function tu({ options: t }) {
|
|
7225
|
+
return Qa({
|
|
7226
|
+
orgSlug: t.orgSlug,
|
|
7227
|
+
projSlug: t.projSlug,
|
|
7228
|
+
preToken: t.bootstrapToken,
|
|
7229
|
+
convexUrl: t.convexUrl,
|
|
7230
|
+
preAllowedUrls: t.allowedUrls ?? [],
|
|
7231
|
+
preExcludedPaths: t.excludePaths
|
|
7232
|
+
}), Ha() ? /* @__PURE__ */ c(nu, { options: t }) : null;
|
|
7233
|
+
}
|
|
7234
|
+
function nu({ options: t }) {
|
|
7235
|
+
const e = Fa(t.orgSlug, t.projSlug, t.convexUrl);
|
|
7236
|
+
Ya(t.parentOrigin), T(() => {
|
|
7237
|
+
tl(), nl();
|
|
7142
7238
|
}, []);
|
|
7143
|
-
const { sessionId: n, visitorId: r, isLoading: i, sessionNotFound: o, resumeFailed: s, isOrgDeleted: l, ensureSession: a, startFresh: u, resetSession: d } =
|
|
7239
|
+
const { sessionId: n, visitorId: r, isLoading: i, sessionNotFound: o, resumeFailed: s, isOrgDeleted: l, ensureSession: a, startFresh: u, resetSession: d } = Zc(t.orgSlug, t.projSlug), h = za(t, e);
|
|
7144
7240
|
T(() => {
|
|
7145
|
-
|
|
7241
|
+
An.value = Hi(h.locale);
|
|
7146
7242
|
}, [h.locale]), T(() => {
|
|
7147
|
-
if (!
|
|
7243
|
+
if (!P.value || h.mode === "embedded" || !window.matchMedia("(max-width: 480px), (pointer: coarse) and (max-width: 768px)").matches)
|
|
7148
7244
|
return;
|
|
7149
7245
|
const B = document.documentElement.style.overflow;
|
|
7150
7246
|
return document.documentElement.style.overflow = "hidden", () => {
|
|
7151
7247
|
document.documentElement.style.overflow = B;
|
|
7152
7248
|
};
|
|
7153
|
-
}, [
|
|
7249
|
+
}, [P.value, h.mode]), T(() => {
|
|
7154
7250
|
if (h.mode !== "embedded")
|
|
7155
7251
|
try {
|
|
7156
|
-
return
|
|
7252
|
+
return ll();
|
|
7157
7253
|
} catch (H) {
|
|
7158
7254
|
console.warn("[JexityChat] Idle-lock watcher failed to start:", H);
|
|
7159
7255
|
return;
|
|
7160
7256
|
}
|
|
7161
7257
|
}, [h.mode]);
|
|
7162
|
-
const f = h.position === "bottom-left", p = h.colorScheme === "dark" || h.colorScheme === "light" ? h.colorScheme : "", g =
|
|
7258
|
+
const f = h.position === "bottom-left", p = h.colorScheme === "dark" || h.colorScheme === "light" ? h.colorScheme : "", g = cl({
|
|
7163
7259
|
...t,
|
|
7164
7260
|
primaryColor: h.primaryColor,
|
|
7165
7261
|
accentColor: h.accentColor,
|
|
@@ -7168,23 +7264,23 @@ function Dc({ options: t }) {
|
|
|
7168
7264
|
borderRadius: h.borderRadius,
|
|
7169
7265
|
windowWidth: h.windowWidth,
|
|
7170
7266
|
windowHeight: h.windowHeight
|
|
7171
|
-
}), m = h.mode === "embedded", x = z.value, y = x[x.length - 1]?.id === "chat",
|
|
7267
|
+
}), m = h.mode === "embedded", x = z.value, y = x[x.length - 1]?.id === "chat", U = e !== null || m || !!t.parentOrigin ? g : { ...g, visibility: "hidden" };
|
|
7172
7268
|
return /* @__PURE__ */ c(
|
|
7173
7269
|
"div",
|
|
7174
7270
|
{
|
|
7175
7271
|
class: `jex-widget ${p}`.trim(),
|
|
7176
|
-
style:
|
|
7272
|
+
style: U,
|
|
7177
7273
|
children: m ? /* @__PURE__ */ c("div", { class: "jex-embedded", children: [
|
|
7178
7274
|
/* @__PURE__ */ c(
|
|
7179
|
-
|
|
7275
|
+
Tr,
|
|
7180
7276
|
{
|
|
7181
7277
|
title: h.title,
|
|
7182
|
-
rightAction: y ? /* @__PURE__ */ c(
|
|
7278
|
+
rightAction: y ? /* @__PURE__ */ c(Br, { sessionId: n, visitorId: r }) : null,
|
|
7183
7279
|
showClose: !m
|
|
7184
7280
|
}
|
|
7185
7281
|
),
|
|
7186
7282
|
/* @__PURE__ */ c(
|
|
7187
|
-
|
|
7283
|
+
Ur,
|
|
7188
7284
|
{
|
|
7189
7285
|
greeting: h.greeting,
|
|
7190
7286
|
title: h.title,
|
|
@@ -7201,18 +7297,18 @@ function Dc({ options: t }) {
|
|
|
7201
7297
|
resetSession: d
|
|
7202
7298
|
}
|
|
7203
7299
|
),
|
|
7204
|
-
!h.hideBranding && /* @__PURE__ */ c(
|
|
7300
|
+
!h.hideBranding && /* @__PURE__ */ c(Rr, {})
|
|
7205
7301
|
] }) : /* @__PURE__ */ c("div", { class: `jex-container${f ? " jex-pos-left" : ""}`, children: [
|
|
7206
|
-
|
|
7302
|
+
P.value && /* @__PURE__ */ c("div", { class: "jex-chat-window", children: [
|
|
7207
7303
|
/* @__PURE__ */ c(
|
|
7208
|
-
|
|
7304
|
+
Tr,
|
|
7209
7305
|
{
|
|
7210
7306
|
title: h.title,
|
|
7211
|
-
rightAction: y ? /* @__PURE__ */ c(
|
|
7307
|
+
rightAction: y ? /* @__PURE__ */ c(Br, { sessionId: n, visitorId: r }) : null
|
|
7212
7308
|
}
|
|
7213
7309
|
),
|
|
7214
7310
|
/* @__PURE__ */ c(
|
|
7215
|
-
|
|
7311
|
+
Ur,
|
|
7216
7312
|
{
|
|
7217
7313
|
greeting: h.greeting,
|
|
7218
7314
|
title: h.title,
|
|
@@ -7229,10 +7325,10 @@ function Dc({ options: t }) {
|
|
|
7229
7325
|
resetSession: d
|
|
7230
7326
|
}
|
|
7231
7327
|
),
|
|
7232
|
-
!h.hideBranding && /* @__PURE__ */ c(
|
|
7328
|
+
!h.hideBranding && /* @__PURE__ */ c(Rr, {})
|
|
7233
7329
|
] }),
|
|
7234
7330
|
/* @__PURE__ */ c(
|
|
7235
|
-
|
|
7331
|
+
bl,
|
|
7236
7332
|
{
|
|
7237
7333
|
iconOption: h.triggerIcon,
|
|
7238
7334
|
radius: h.triggerRadius,
|
|
@@ -7243,34 +7339,34 @@ function Dc({ options: t }) {
|
|
|
7243
7339
|
}
|
|
7244
7340
|
);
|
|
7245
7341
|
}
|
|
7246
|
-
const Uc = '.jex-widget{--jex-primary: #115A62;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-radius: .75rem;--jex-font-family: "Inter", system-ui, -apple-system, sans-serif;--jex-font-size: 14px;--jex-window-width: 380px;--jex-window-height: 600px;--jex-shadow: 0 16px 48px -12px rgba(13, 127, 138, .25), 0 4px 16px rgba(0, 0, 0, .08);pointer-events:auto;--jex-bg-trigger: var(--jex-primary);--jex-bg-header: var(--jex-primary);--jex-bg-msg-user: var(--jex-primary);--jex-bg-send-btn: var(--jex-primary);--jex-bg-window: rgba(255, 255, 255, .95);--jex-bg-msg-bot: #f1f5f9;--jex-bg-input: rgba(247, 253, 253, .6);--jex-text-header: #ffffff;--jex-text-msg-user: #ffffff;--jex-text-msg-bot: #0f172a;--jex-text-main: #0f172a;--jex-text-muted: #64748b;--jex-bg-avatar-agent: #d1fae5;--jex-text-avatar-agent: #065f46;--jex-border-window: rgba(226, 232, 240, .8);--jex-border-input: rgba(203, 213, 225, .8);--jex-bg-glass: var(--jex-bg-window);--jex-border-glass: var(--jex-border-window);font-family:var(--jex-font-family);-webkit-font-smoothing:antialiased}.dark .jex-widget,.jex-widget.dark{--jex-primary: #1cb0bf;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-bg-window: rgba(10, 15, 26, .95);--jex-bg-msg-bot: #233146;--jex-bg-input: rgba(10, 15, 26, .6);--jex-text-msg-bot: #f8fafc;--jex-text-main: #f8fafc;--jex-text-muted: #94a3b8;--jex-border-window: rgba(30, 41, 59, .8);--jex-border-input: rgba(51, 65, 85, .9);--jex-bg-avatar-agent: #064e3b;--jex-text-avatar-agent: #6ee7b7;--jex-bg-error: #3b1318;--jex-border-error: #5c1d24;--jex-text-error: #fca5a5}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light){--jex-primary: #1cb0bf;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-bg-window: rgba(10, 15, 26, .95);--jex-bg-msg-bot: #233146;--jex-bg-input: rgba(10, 15, 26, .6);--jex-text-msg-bot: #f8fafc;--jex-text-main: #f8fafc;--jex-text-muted: #94a3b8;--jex-border-window: rgba(30, 41, 59, .8);--jex-border-input: rgba(51, 65, 85, .9);--jex-bg-error: #3b1318;--jex-border-error: #5c1d24;--jex-text-error: #fca5a5}}.jex-widget *{box-sizing:border-box;margin:0;padding:0}.jex-container{position:fixed;bottom:24px;right:24px;display:flex;flex-direction:column;align-items:flex-end;gap:16px;z-index:9999}.jex-container.jex-pos-left{right:auto;left:24px;align-items:flex-start}:host(.jex-mode-embedded){display:block;width:100%;height:100%}:host(.jex-mode-embedded) .jex-widget{width:100%;height:100%}.jex-embedded{display:flex;flex-direction:column;width:100%;height:100%;background:var(--jex-bg-window);border:1px solid var(--jex-border-window);overflow:hidden}.jex-embedded .jex-screen-container{flex:1;overflow:hidden;display:flex;flex-direction:column}.jex-floating-button{height:56px;min-width:56px;padding:0;background:var(--jex-bg-trigger);color:var(--jex-text-header);border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:var(--jex-shadow);transition:transform .3s cubic-bezier(.175,.885,.32,1.275),background .2s,width .3s ease,border-radius .3s ease}.jex-floating-button.jex-has-label{min-width:110px;padding:0 20px}.jex-fab-inner{display:flex;align-items:center;gap:12px}.jex-fab-label{font-size:15px;font-weight:600;white-space:nowrap}.jex-floating-button:hover{transform:scale(1.1);background:var(--jex-primary-hover)}.jex-floating-button:active{transform:scale(.95)}.jex-chat-window{width:var(--jex-window-width);height:var(--jex-window-height);max-height:calc(100vh - 120px);background:var(--jex-bg-window);backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);border:1px solid var(--jex-border-window);border-radius:calc(var(--jex-radius) * 2);box-shadow:var(--jex-shadow);display:flex;flex-direction:column;overflow:hidden;animation:jexSlideUp .4s cubic-bezier(.16,1,.3,1);transform-origin:bottom right;touch-action:manipulation}@keyframes jexSlideUp{0%{opacity:0;transform:scale(.8) translateY(20px)}to{opacity:1;transform:scale(1) translateY(0)}}@media(max-width:480px),(pointer:coarse)and (max-width:768px){.jex-chat-window{position:fixed;inset:0;width:100vw;height:100vh;height:100dvh;max-height:none;border:none;border-radius:0;animation:jexSlideUpMobile .3s cubic-bezier(.16,1,.3,1);transform-origin:bottom center}.jex-container:has(.jex-chat-window) .jex-floating-button{display:none}}@keyframes jexSlideUpMobile{0%{opacity:0;transform:translateY(100%)}to{opacity:1;transform:translateY(0)}}.jex-chat-header{padding:20px;background:var(--jex-bg-header);color:var(--jex-text-header);display:flex;align-items:center;gap:12px;flex-shrink:0}.jex-header-info h3{font-size:16px;font-weight:600;color:var(--jex-text-header);margin:0}.jex-header-info p{font-size:12px;opacity:.8;color:var(--jex-text-header);margin:0}.jex-header-right{margin-left:auto;display:flex;align-items:center;gap:4px}.jex-header-handoff{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;background:transparent;border:1px solid color-mix(in srgb,currentColor 50%,transparent);border-radius:999px;padding:0;color:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.jex-header-handoff:hover:not(:disabled){background:color-mix(in srgb,currentColor 12%,transparent);border-color:currentColor}.jex-header-handoff:disabled{opacity:.5;cursor:not-allowed}.jex-header-close{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;background:transparent;border:none;border-radius:999px;padding:0;color:inherit;cursor:pointer;transition:background .15s ease}.jex-header-close:hover{background:color-mix(in srgb,currentColor 14%,transparent)}.jex-handoff-error{position:absolute;top:100%;right:8px;background:#fee;color:#b00;padding:4px 8px;font-size:12px;border-radius:4px}.jex-header-back{background:none;border:none;color:var(--jex-text-header);cursor:pointer;padding:4px;display:flex;align-items:center;opacity:.8;transition:opacity .2s;flex-shrink:0}.jex-header-back:hover{opacity:1}.jex-screen-container{flex:1;overflow:hidden;display:flex;flex-direction:column}.jex-home{flex:1;display:flex;flex-direction:column;padding:24px;gap:20px;overflow-y:auto}.jex-home-hero{display:flex;align-items:center;gap:14px;animation:jexFadeIn .4s ease both}.jex-home-avatar{position:relative;width:48px;height:48px;border-radius:14px;background:var(--jex-primary);color:var(--jex-text-header);display:flex;align-items:center;justify-content:center;flex-shrink:0;box-shadow:0 4px 12px color-mix(in srgb,var(--jex-primary) 30%,transparent)}.jex-home-status-dot{position:absolute;bottom:-2px;right:-2px;width:14px;height:14px;border-radius:50%;background:#22c55e;border:2.5px solid var(--jex-bg-window);animation:jexPulse 2s ease-in-out infinite}@keyframes jexPulse{0%,to{box-shadow:0 0 #22c55e66}50%{box-shadow:0 0 0 6px #22c55e00}}.jex-home-hero-text{display:flex;flex-direction:column;gap:2px;min-width:0}.jex-home-title{font-size:17px;font-weight:700;color:var(--jex-text-main);margin:0;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.jex-home-status{font-size:12px;font-weight:500;color:#22c55e;letter-spacing:.02em}.jex-home-greeting{background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);border-radius:4px 16px 16px;padding:16px 18px;font-size:14px;line-height:1.55;color:var(--jex-text-main);animation:jexFadeIn .4s .1s ease both}.jex-home-greeting p{margin:0}@keyframes jexFadeIn{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.jex-home-actions{display:flex;flex-direction:column;gap:10px;animation:jexFadeIn .4s .2s ease both}.jex-home-start-btn{background:var(--jex-bg-send-btn);color:var(--jex-text-header);border:none;border-radius:12px;padding:14px 20px;font-size:15px;font-weight:600;cursor:pointer;font-family:inherit;transition:background .2s,transform .15s,box-shadow .2s;width:100%;box-shadow:0 2px 8px color-mix(in srgb,var(--jex-primary) 25%,transparent)}.jex-home-start-btn:hover{background:var(--jex-primary-hover);transform:translateY(-1px);box-shadow:0 4px 16px color-mix(in srgb,var(--jex-primary) 35%,transparent)}.jex-home-start-btn:active{transform:translateY(0);box-shadow:0 1px 4px color-mix(in srgb,var(--jex-primary) 20%,transparent)}.jex-home-resume-card{display:flex;flex-direction:column;gap:8px;width:100%;text-align:left;padding:16px 18px;border-radius:14px;border:1.5px solid var(--jex-primary);background:color-mix(in srgb,var(--jex-primary) 6%,var(--jex-bg-window));cursor:pointer;font-family:inherit;transition:background .2s,border-color .2s,transform .15s,box-shadow .2s;box-shadow:0 2px 8px color-mix(in srgb,var(--jex-primary) 12%,transparent)}.jex-home-resume-card:hover{background:color-mix(in srgb,var(--jex-primary) 10%,var(--jex-bg-window));transform:translateY(-1px);box-shadow:0 4px 16px color-mix(in srgb,var(--jex-primary) 20%,transparent)}.jex-home-resume-card:active{transform:translateY(0)}.jex-home-resume-top{display:flex;align-items:center;justify-content:space-between}.jex-home-resume-label{font-size:14px;font-weight:600;color:var(--jex-primary)}.jex-home-resume-arrow{color:var(--jex-primary);opacity:.6;transition:opacity .2s,transform .2s}.jex-home-resume-card:hover .jex-home-resume-arrow{opacity:1;transform:translate(2px)}.jex-home-resume-ref{font-family:ui-monospace,Cascadia Code,Fira Code,monospace;font-size:13px;font-weight:600;letter-spacing:.06em;color:var(--jex-text-muted)}.jex-home-history{display:flex;flex-direction:column;gap:8px}.jex-home-resume-meta{font-size:11px;opacity:.7;margin-top:4px}.jex-home-new-btn{background:transparent;color:var(--jex-text-muted);border:1px solid var(--jex-border-input);border-radius:12px;padding:12px 20px;font-size:14px;font-weight:500;cursor:pointer;font-family:inherit;transition:color .2s,border-color .2s,background .2s;width:100%}.jex-home-new-btn:hover{color:var(--jex-text-main);border-color:var(--jex-text-muted);background:color-mix(in srgb,var(--jex-primary) 3%,transparent)}.jex-session-ref{display:flex;align-items:center;gap:8px;padding:8px 12px;background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);border-radius:8px;font-size:12px}.jex-session-ref-label{color:var(--jex-text-muted);font-weight:500}.jex-session-ref-code{color:var(--jex-primary);font-weight:700;font-family:ui-monospace,Cascadia Code,monospace;letter-spacing:.05em}.jex-chat-messages{flex:1;padding:20px;overflow-y:auto;display:flex;flex-direction:column;gap:12px}.jex-message-row{display:flex;align-items:flex-end;gap:8px;max-width:85%}.jex-message-row.bot{align-self:flex-start}.jex-message-content{flex:1;min-width:0}.jex-avatar{width:24px;height:24px;border-radius:50%;flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:12px;margin-bottom:2px}.jex-avatar-bot{background:var(--jex-bg-msg-bot);color:var(--jex-primary)}.jex-avatar-agent{background:var(--jex-bg-avatar-agent)}.jex-avatar-img{width:100%;height:100%;border-radius:50%;object-fit:cover}.jex-avatar-initials{font-size:9px;font-weight:700;color:var(--jex-text-avatar-agent)}.jex-message-author-row{display:flex;align-items:center;gap:6px;margin-top:2px;padding-left:4px}.jex-message-author{font-size:10px;color:var(--jex-text-muted)}.jex-reply-tag-btn{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:none;border-radius:4px;background:transparent;color:var(--jex-text-muted, #6b7280);cursor:pointer;transition:background .15s,color .15s}.jex-reply-tag-btn:hover{background:#0000000f;color:var(--jex-primary, #115A62)}.jex-reply-tag-btn:focus-visible{outline:2px solid var(--jex-primary, #115A62);outline-offset:1px}.jex-message{padding:12px 16px;border-radius:18px;font-size:14px;line-height:1.4}.jex-message.bot{background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);color:var(--jex-text-msg-bot);border-bottom-left-radius:4px}.jex-message.user{align-self:flex-end;max-width:80%;background:var(--jex-bg-msg-user);color:var(--jex-text-msg-user);border-bottom-right-radius:4px}.jex-typing{align-self:flex-start;display:flex;gap:4px;padding:12px 16px}.jex-typing span{width:8px;height:8px;border-radius:50%;background:var(--jex-text-muted);animation:jexTypingDot 1.2s infinite ease-in-out}.jex-typing span:nth-child(2){animation-delay:.2s}.jex-typing span:nth-child(3){animation-delay:.4s}@keyframes jexTypingDot{0%,80%,to{transform:scale(.8);opacity:.4}40%{transform:scale(1);opacity:1}}.jex-md{word-break:break-word;overflow-wrap:anywhere}.jex-md p{margin:0 0 8px}.jex-md p:last-child{margin-bottom:0}.jex-md strong{font-weight:600}.jex-md em{font-style:italic}.jex-md ul,.jex-md ol{margin:0 0 8px;padding-left:20px}.jex-md ul:last-child,.jex-md ol:last-child{margin-bottom:0}.jex-md ul{list-style-type:disc}.jex-md ol{list-style-type:decimal}.jex-md li{margin-bottom:2px}.jex-md li:last-child{margin-bottom:0}.jex-md a{color:var(--jex-primary);text-decoration:underline;text-underline-offset:2px}.jex-md a:hover{opacity:.8}.jex-md code{background:#00000014;padding:1px 5px;border-radius:4px;font-size:.9em;font-family:ui-monospace,Cascadia Code,Fira Code,monospace}.jex-md pre{background:#0000000f;border-radius:8px;padding:10px 12px;margin:0 0 8px;overflow-x:auto;font-size:.85em}.jex-md pre:last-child{margin-bottom:0}.jex-md pre code{background:none;padding:0;border-radius:0;font-size:inherit}.jex-md h1,.jex-md h2,.jex-md h3,.jex-md h4{font-weight:600;margin:8px 0 4px}.jex-md h1:first-child,.jex-md h2:first-child,.jex-md h3:first-child,.jex-md h4:first-child{margin-top:0}.jex-md h3{font-size:1em}.jex-md h4{font-size:.95em}.jex-md hr{border:none;border-top:1px solid var(--jex-border-window);margin:8px 0}.jex-md blockquote{border-left:3px solid var(--jex-primary);margin:0 0 8px;padding:4px 12px;color:var(--jex-text-muted)}.jex-md blockquote:last-child{margin-bottom:0}.dark .jex-md code,.jex-widget.dark .jex-md code{background:#ffffff1a}.dark .jex-md pre,.jex-widget.dark .jex-md pre{background:#ffffff14}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-md code{background:#ffffff1a}:host:not(.light) .jex-widget:not(.light) .jex-md pre{background:#ffffff14}}.jex-streaming-cursor:after{content:"◊";margin-left:2px;animation:jexBlinkCursor .8s ease-in-out infinite}@keyframes jexBlinkCursor{0%,to{opacity:1}50%{opacity:0}}.jex-session-notice{align-self:center;text-align:center;padding:8px 16px;margin:8px 0;font-size:12px;color:var(--jex-text-muted);background:var(--jex-bg-input, #f1f5f9);border-radius:8px;line-height:1.4}.jex-message-error{background:var(--jex-bg-error, #fef2f2)!important;border-color:var(--jex-border-error, #fecaca)!important;color:var(--jex-text-error, #991b1b)!important}.jex-chat-input{padding:12px 16px;border-top:1px solid var(--jex-border-window);display:flex;flex-direction:column;gap:8px;flex-shrink:0}.jex-composer-card{display:flex;flex-direction:column;gap:6px;padding:10px 12px 8px;background:var(--jex-bg-input);border:1px solid var(--jex-border-input);border-radius:16px;cursor:text;transition:border-color .15s ease,background .15s ease,box-shadow .15s ease}.jex-composer-card:focus-within{border-color:var(--jex-primary);background:var(--jex-bg-window);box-shadow:0 0 0 3px color-mix(in srgb,var(--jex-primary, #115A62) 14%,transparent)}.jex-composer-attachments{display:flex;flex-wrap:wrap;gap:6px;padding:2px 2px 4px}.jex-attachment-chip{position:relative;width:44px;height:44px;border-radius:8px;overflow:hidden;background:var(--jex-bg-msg-bot, #f1f5f9);flex-shrink:0;box-shadow:0 1px 2px #0000000f}.jex-attachment-thumb{width:100%;height:100%;object-fit:cover;display:block;pointer-events:none}.jex-attachment-remove{position:absolute;top:2px;right:2px;width:16px;height:16px;padding:0;border:none;border-radius:50%;background:#0f172ac7;color:#fff;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;opacity:0;transition:opacity .12s ease,transform .12s ease}.jex-attachment-chip:hover .jex-attachment-remove,.jex-attachment-chip:focus-within .jex-attachment-remove{opacity:1}.jex-attachment-remove:hover{transform:scale(1.08)}.jex-composer-textarea{width:100%;min-height:22px;background:transparent;border:none;outline:none;resize:none;padding:2px 4px;color:var(--jex-text-main);font-family:inherit;font-size:16px;line-height:1.45;overflow-y:hidden}.jex-composer-textarea::placeholder{color:var(--jex-text-muted);opacity:.85}.jex-composer-textarea:disabled{cursor:not-allowed;opacity:.7}.jex-composer-actions{display:flex;align-items:center;justify-content:space-between;gap:8px}.jex-composer-actions-left{display:inline-flex;align-items:center;gap:4px}.jex-attach-btn{width:30px;height:30px;padding:0;border:none;border-radius:50%;background:transparent;color:var(--jex-text-muted);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background .12s ease,color .12s ease,transform .12s ease}.jex-attach-btn:hover:not(:disabled){background:color-mix(in srgb,var(--jex-text-muted, #64748b) 12%,transparent);color:var(--jex-text-main)}.jex-attach-btn:active:not(:disabled){transform:scale(.92)}.jex-attach-btn:disabled{opacity:.4;cursor:not-allowed}.jex-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.jex-rate-limit-notice{flex:1 0 100%;order:-1;margin-bottom:8px;padding:8px 12px;border-radius:10px;background:var(--jex-bg-msg-bot, #f1f5f9);color:var(--jex-text-muted, #64748b);font-size:12px;line-height:1.4;text-align:center}.jex-session-error-notice{flex:1 0 100%;order:-1;margin-bottom:8px;padding:8px 12px;border-radius:10px;background:var(--jex-bg-error, #fef2f2);border:1px solid var(--jex-border-error, #fecaca);color:var(--jex-text-error, #991b1b);font-size:12px;line-height:1.4;text-align:center}.jex-chat-input input{flex:1;background:var(--jex-bg-input);border:1px solid var(--jex-border-input);border-radius:12px;padding:10px 14px;color:var(--jex-text-main);outline:none;font-family:inherit;font-size:14px}.jex-chat-input input:focus{border-color:var(--jex-primary)}.jex-send-btn{background:color-mix(in srgb,var(--jex-text-muted, #64748b) 18%,transparent);color:var(--jex-text-muted);border:none;border-radius:999px;width:30px;height:30px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background .15s ease,color .15s ease,opacity .15s ease,transform .15s ease;flex-shrink:0}.jex-send-btn-active{background:var(--jex-bg-send-btn, var(--jex-primary));color:var(--jex-text-header, #fff)}.jex-send-btn-active:hover:not(:disabled){background:var(--jex-primary-hover)}.jex-send-btn:active:not(:disabled){transform:scale(.9)}.jex-send-btn:disabled{opacity:.45;cursor:default}.jex-widget-footer{display:flex;align-items:center;justify-content:center;padding:8px 16px;border-top:1px solid var(--jex-border-glass);background:#00000005;flex-shrink:0}.jex-widget.dark .jex-widget-footer{background:#ffffff05}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-widget-footer{background:#ffffff05}}.jex-branding{display:flex;align-items:center;gap:6px;text-decoration:none;color:var(--jex-text-muted);font-size:11px;font-weight:500;transition:color .2s}.jex-branding:hover{color:var(--jex-text-main)}.jex-branding-icon{color:var(--jex-primary)}.jex-branding span strong{font-weight:700;color:var(--jex-text-main)}.jex-locale-select-wrapper{position:relative;display:flex;align-items:center}.jex-locale-select{appearance:none;-webkit-appearance:none;background:transparent;border:1px solid transparent;padding:4px 20px 4px 6px;border-radius:6px;font-family:inherit;font-size:11px;font-weight:600;color:var(--jex-text-muted);background-color:transparent;cursor:pointer;outline:none;transition:all .2s ease}.jex-locale-select option{background-color:#fff;color:#0f172a}.jex-locale-select:hover,.jex-locale-select:focus-visible{color:var(--jex-text-main);background:#0000000a}.jex-widget.dark .jex-locale-select:hover,.jex-widget.dark .jex-locale-select:focus-visible{background:#ffffff0d}.jex-widget.dark .jex-locale-select option{background-color:#0f172a;color:#f8fafc}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-locale-select:hover,:host:not(.light) .jex-widget:not(.light) .jex-locale-select:focus-visible{background:#ffffff0d}:host:not(.light) .jex-widget:not(.light) .jex-locale-select option{background-color:#0f172a;color:#f8fafc}}.jex-locale-select:focus-visible{border-color:var(--jex-primary)}.jex-locale-chevron{position:absolute;right:4px;pointer-events:none;color:var(--jex-text-muted);transition:color .2s ease}.jex-locale-select-wrapper:hover .jex-locale-chevron{color:var(--jex-text-main)}.jex-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;background:var(--jex-bg-window, #fff);z-index:10;padding:24px;text-align:center}.jex-loading-spinner{width:32px;height:32px;border:3px solid var(--jex-border-input, #e2e8f0);border-top-color:var(--jex-primary, #115A62);border-radius:50%;animation:jex-spin .7s linear infinite}@keyframes jex-spin{to{transform:rotate(360deg)}}.jex-loading-message{font-size:14px;color:var(--jex-text-muted, #64748b)}.jex-error-message{font-size:14px;color:var(--jex-text-main, #334155)}.jex-error-actions{display:flex;gap:8px}.jex-error-retry,.jex-error-back{padding:8px 16px;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;border:none}.jex-error-retry{background:var(--jex-primary, #115A62);color:#fff}.jex-error-back{background:transparent;color:var(--jex-text-muted, #64748b);border:1px solid var(--jex-border-input, #e2e8f0)}.jex-selection{display:flex;flex-direction:column;gap:12px;padding:24px 16px;height:100%}.jex-selection-title{font-size:16px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0 0 8px}.jex-selection-options{display:flex;flex-direction:column;gap:10px}.jex-selection-option{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:16px;border-radius:12px;border:1px solid var(--jex-border-window, #e2e8f0);background:transparent;cursor:pointer;text-align:left;transition:border-color .15s ease,background .15s ease}.jex-selection-option:hover{border-color:var(--jex-primary, #115A62);background:color-mix(in srgb,var(--jex-primary, #115A62) 5%,transparent)}.jex-selection-icon{font-size:20px}.jex-selection-label{font-size:14px;font-weight:600;color:var(--jex-text-main, #0f172a)}.jex-selection-sub{font-size:12px;color:var(--jex-text-muted, #64748b)}.jex-form-screen{display:flex;flex-direction:column;padding:20px 16px;height:100%;overflow-y:auto}.jex-form-title{font-size:16px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0 0 16px}.jex-form{display:flex;flex-direction:column;gap:10px}.jex-form-input,.jex-form-textarea{padding:10px 12px;border-radius:8px;border:1px solid var(--jex-border-input, #e2e8f0);font-size:14px;background:transparent;color:var(--jex-text-main, #0f172a);outline:none}@media(pointer:coarse){.jex-form-input,.jex-form-textarea{font-size:16px}}.jex-form-input:focus,.jex-form-textarea:focus{border-color:var(--jex-primary, #115A62)}.jex-form-textarea{min-height:80px;resize:vertical}.jex-form-submit{padding:10px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:14px;font-weight:600;cursor:pointer;margin-top:4px}.jex-inline-form{display:flex;flex-direction:column;gap:8px;padding:12px;background:var(--jex-bg-msg-bot, #f1f5f9);border:1px solid var(--jex-border-input, #e2e8f0);border-radius:var(--jex-radius, .75rem);width:100%}.jex-inline-form-title{font-weight:600;font-size:15px;color:var(--jex-text-main, #0f172a);margin:0}.jex-inline-form-subtitle{font-size:13px;color:var(--jex-text-muted, #64748b);line-height:1.4;margin:0 0 4px}.jex-inline-form-consent{font-size:11px;color:var(--jex-text-muted, #64748b);line-height:1.3;margin-top:4px;text-align:center}.jex-inline-form .jex-form-submit:disabled{opacity:.7;cursor:not-allowed}.jex-escalation-subtitle{font-size:13px;color:var(--jex-text-muted, #64748b);line-height:1.45;margin:0 0 8px}.jex-escalation-skip{padding:8px 12px;border:none;background:transparent;color:var(--jex-text-muted, #64748b);font-size:13px;cursor:pointer;text-decoration:underline;text-underline-offset:2px;text-align:center}.jex-escalation-skip:hover{color:var(--jex-text-main, #0f172a)}.jex-inline-form-card{position:relative;padding:14px;gap:8px}.jex-inline-form-dismiss{position:absolute;top:10px;right:10px;width:24px;height:24px;border-radius:50%;border:1px solid var(--jex-border-input, #e2e8f0);background:var(--jex-bg-window, #fff);color:var(--jex-text-muted, #64748b);font-size:12px;cursor:pointer;display:flex;align-items:center;justify-content:center;line-height:1}.jex-inline-form-dismiss:hover{background:var(--jex-bg-msg-bot, #f1f5f9);color:var(--jex-text-main, #0f172a)}.jex-inline-form-submitted{display:flex;align-items:center;gap:10px;padding:10px 12px;background:var(--jex-bg-msg-bot, #f1f5f9);border:1px solid var(--jex-border-input, #e2e8f0);border-radius:var(--jex-radius, .75rem);width:100%}.jex-inline-form-check{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:color-mix(in srgb,var(--jex-primary) 15%,transparent);color:var(--jex-primary, #115A62);font-size:14px;font-weight:700;flex-shrink:0}.jex-inline-form-submitted-title{font-weight:600;font-size:var(--jex-font-size, 14px);color:var(--jex-text-main, #0f172a)}.jex-inline-form-submitted-detail{font-size:12px;color:var(--jex-text-muted, #64748b);margin-top:2px}.jex-escalation-confirm{border-left:3px solid var(--jex-primary, #115A62);padding-left:8px}.jex-session-prompt{display:flex;flex-direction:column;align-items:center;gap:8px;padding:12px 16px;margin:8px 0;text-align:center}.jex-session-prompt-text{font-size:13px;color:var(--jex-text-muted, #64748b)}.jex-session-prompt-btn{padding:8px 16px;border-radius:8px;border:1px solid var(--jex-primary, #115A62);background:transparent;color:var(--jex-primary, #115A62);font-size:13px;font-weight:600;cursor:pointer}.jex-session-prompt-btn:hover{background:color-mix(in srgb,var(--jex-primary) 10%,transparent)}.jex-chat-input-resolved{display:flex;flex-direction:column;align-items:center;gap:10px;padding:14px 16px;border-top:1px solid var(--jex-border-input, #e2e8f0);background:var(--jex-bg-msg-bot, #f1f5f9);text-align:center}.jex-resolved-notice{font-size:13px;font-weight:500;color:var(--jex-text-muted, #64748b)}.jex-resolved-new-btn{padding:10px 20px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:13px;font-weight:600;cursor:pointer;width:100%}.jex-resolved-new-btn:hover{opacity:.9}.jex-confirmation{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:32px 24px;height:100%;text-align:center}.jex-confirmation-icon{width:48px;height:48px;border-radius:50%;background:color-mix(in srgb,var(--jex-primary, #115A62) 15%,transparent);color:var(--jex-primary, #115A62);font-size:22px;display:flex;align-items:center;justify-content:center}.jex-confirmation-title{font-size:18px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0}.jex-confirmation-body{font-size:13px;color:var(--jex-text-muted, #64748b);margin:0}.jex-confirmation-ref{font-size:20px;font-weight:700;letter-spacing:.05em;color:var(--jex-primary, #115A62);background:color-mix(in srgb,var(--jex-primary, #115A62) 10%,transparent);padding:10px 20px;border-radius:10px}.jex-confirmation-hint{font-size:12px;color:var(--jex-text-muted, #64748b);margin:0}.jex-confirmation-done{margin-top:8px;padding:10px 28px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:14px;font-weight:600;cursor:pointer}.jex-home-lookup-link{background:none;border:none;font-size:12px;color:var(--jex-text-muted, #64748b);cursor:pointer;text-decoration:underline;padding:0;align-self:center}.jex-home-lookup{display:flex;gap:8px;width:100%;animation:jexFadeIn .4s .1s ease both}.jex-home-lookup-input{flex:1;padding:10px 14px;border-radius:10px;border:1px solid var(--jex-border-input, #e2e8f0);background:var(--jex-bg-input);color:var(--jex-text-main);font-size:14px;font-family:ui-monospace,Cascadia Code,Fira Code,monospace;letter-spacing:.04em;outline:none;transition:border-color .2s}@media(pointer:coarse){.jex-home-lookup-input{font-size:16px}}.jex-home-lookup-input::placeholder{font-family:inherit;letter-spacing:.04em;color:var(--jex-text-muted);opacity:.7}.jex-home-lookup-input:focus{border-color:var(--jex-primary, #115A62)}.jex-home-lookup-submit{padding:10px 16px;border-radius:10px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:13px;font-weight:600;cursor:pointer;font-family:inherit;transition:background .2s,opacity .2s;flex-shrink:0}.jex-home-lookup-submit:hover:not(:disabled){background:var(--jex-primary-hover)}.jex-home-lookup-submit:disabled{opacity:.4;cursor:default}.jex-sources-row{margin-top:6px;margin-left:32px;display:flex;flex-direction:column;gap:6px}.jex-sources-toggle{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;background:transparent;border:none;border-radius:6px;cursor:pointer;font-size:11px;color:var(--jex-text-muted, #6b7280);font-family:inherit;align-self:flex-start;transition:background .15s,color .15s}.jex-sources-toggle:hover{background:#0000000a;color:inherit}.jex-sources-icon{font-size:12px;line-height:1}.jex-sources-chevron{display:inline-block;font-size:10px;transition:transform .15s}.jex-sources-chevron--open{transform:rotate(180deg)}.jex-sources-pills{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.jex-source-pill{display:inline-flex;align-items:center;gap:6px;max-width:240px;padding:2px 8px;border-radius:999px;border:1px solid rgba(0,0,0,.1);background:#0000000a;color:var(--jex-text-muted, #6b7280);font-size:11px;text-decoration:none;cursor:pointer;transition:background .15s,color .15s}.jex-source-pill:hover{background:#00000014;color:inherit}.jex-source-id{display:inline-flex;align-items:center;justify-content:center;min-width:16px;height:16px;padding:0 4px;border-radius:4px;background:var(--jex-primary, #115A62);color:#fff;font-size:10px;font-weight:600;line-height:1;flex-shrink:0;font-variant-numeric:tabular-nums}.jex-source-type{font-size:10px;flex-shrink:0}.jex-source-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}.jex-source-score{opacity:.6;flex-shrink:0;font-variant-numeric:tabular-nums}';
|
|
7247
|
-
function
|
|
7342
|
+
const ru = '.jex-widget{--jex-primary: #115A62;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-radius: .75rem;--jex-font-family: "Inter", system-ui, -apple-system, sans-serif;--jex-font-size: 14px;--jex-window-width: 380px;--jex-window-height: 600px;--jex-shadow: 0 16px 48px -12px rgba(13, 127, 138, .25), 0 4px 16px rgba(0, 0, 0, .08);pointer-events:auto;--jex-bg-trigger: var(--jex-primary);--jex-bg-header: var(--jex-primary);--jex-bg-msg-user: var(--jex-primary);--jex-bg-send-btn: var(--jex-primary);--jex-bg-window: rgba(255, 255, 255, .95);--jex-bg-msg-bot: #f1f5f9;--jex-bg-input: rgba(247, 253, 253, .6);--jex-text-header: #ffffff;--jex-text-msg-user: #ffffff;--jex-text-msg-bot: #0f172a;--jex-text-main: #0f172a;--jex-text-muted: #64748b;--jex-bg-avatar-agent: #d1fae5;--jex-text-avatar-agent: #065f46;--jex-border-window: rgba(226, 232, 240, .8);--jex-border-input: rgba(203, 213, 225, .8);--jex-bg-glass: var(--jex-bg-window);--jex-border-glass: var(--jex-border-window);font-family:var(--jex-font-family);-webkit-font-smoothing:antialiased}.dark .jex-widget,.jex-widget.dark{--jex-primary: #1cb0bf;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-bg-window: rgba(10, 15, 26, .95);--jex-bg-msg-bot: #233146;--jex-bg-input: rgba(10, 15, 26, .6);--jex-text-msg-bot: #f8fafc;--jex-text-main: #f8fafc;--jex-text-muted: #94a3b8;--jex-border-window: rgba(30, 41, 59, .8);--jex-border-input: rgba(51, 65, 85, .9);--jex-bg-avatar-agent: #064e3b;--jex-text-avatar-agent: #6ee7b7;--jex-bg-error: #3b1318;--jex-border-error: #5c1d24;--jex-text-error: #fca5a5}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light){--jex-primary: #1cb0bf;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-bg-window: rgba(10, 15, 26, .95);--jex-bg-msg-bot: #233146;--jex-bg-input: rgba(10, 15, 26, .6);--jex-text-msg-bot: #f8fafc;--jex-text-main: #f8fafc;--jex-text-muted: #94a3b8;--jex-border-window: rgba(30, 41, 59, .8);--jex-border-input: rgba(51, 65, 85, .9);--jex-bg-error: #3b1318;--jex-border-error: #5c1d24;--jex-text-error: #fca5a5}}.jex-widget *{box-sizing:border-box;margin:0;padding:0}.jex-container{position:fixed;bottom:24px;right:24px;display:flex;flex-direction:column;align-items:flex-end;gap:16px;z-index:9999}.jex-container.jex-pos-left{right:auto;left:24px;align-items:flex-start}:host(.jex-mode-embedded){display:block;width:100%;height:100%}:host(.jex-mode-embedded) .jex-widget{width:100%;height:100%}.jex-embedded{display:flex;flex-direction:column;width:100%;height:100%;background:var(--jex-bg-window);border:1px solid var(--jex-border-window);overflow:hidden}.jex-embedded .jex-screen-container{flex:1;overflow:hidden;display:flex;flex-direction:column}.jex-floating-button{height:56px;min-width:56px;padding:0;background:var(--jex-bg-trigger);color:var(--jex-text-header);border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:var(--jex-shadow);transition:transform .3s cubic-bezier(.175,.885,.32,1.275),background .2s,width .3s ease,border-radius .3s ease}.jex-floating-button.jex-has-label{min-width:110px;padding:0 20px}.jex-fab-inner{display:flex;align-items:center;gap:12px}.jex-fab-label{font-size:15px;font-weight:600;white-space:nowrap}.jex-floating-button:hover{transform:scale(1.1);background:var(--jex-primary-hover)}.jex-floating-button:active{transform:scale(.95)}.jex-chat-window{width:var(--jex-window-width);height:var(--jex-window-height);max-height:calc(100vh - 120px);background:var(--jex-bg-window);backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);border:1px solid var(--jex-border-window);border-radius:calc(var(--jex-radius) * 2);box-shadow:var(--jex-shadow);display:flex;flex-direction:column;overflow:hidden;animation:jexSlideUp .4s cubic-bezier(.16,1,.3,1);transform-origin:bottom right;touch-action:manipulation}@keyframes jexSlideUp{0%{opacity:0;transform:scale(.8) translateY(20px)}to{opacity:1;transform:scale(1) translateY(0)}}@media(max-width:480px),(pointer:coarse)and (max-width:768px){.jex-chat-window{position:fixed;inset:0;width:100vw;height:100vh;height:100dvh;max-height:none;border:none;border-radius:0;animation:jexSlideUpMobile .3s cubic-bezier(.16,1,.3,1);transform-origin:bottom center}.jex-container:has(.jex-chat-window) .jex-floating-button{display:none}}@keyframes jexSlideUpMobile{0%{opacity:0;transform:translateY(100%)}to{opacity:1;transform:translateY(0)}}.jex-chat-header{padding:20px;background:var(--jex-bg-header);color:var(--jex-text-header);display:flex;align-items:center;gap:12px;flex-shrink:0}.jex-header-info h3{font-size:16px;font-weight:600;color:var(--jex-text-header);margin:0}.jex-header-info p{font-size:12px;opacity:.8;color:var(--jex-text-header);margin:0}.jex-header-right{margin-left:auto;display:flex;align-items:center;gap:4px}.jex-header-handoff{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;background:transparent;border:1px solid color-mix(in srgb,currentColor 50%,transparent);border-radius:999px;padding:0;color:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.jex-header-handoff:hover:not(:disabled){background:color-mix(in srgb,currentColor 12%,transparent);border-color:currentColor}.jex-header-handoff:disabled{opacity:.5;cursor:not-allowed}.jex-header-close{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;background:transparent;border:none;border-radius:999px;padding:0;color:inherit;cursor:pointer;transition:background .15s ease}.jex-header-close:hover{background:color-mix(in srgb,currentColor 14%,transparent)}.jex-handoff-error{position:absolute;top:100%;right:8px;background:#fee;color:#b00;padding:4px 8px;font-size:12px;border-radius:4px}.jex-header-back{background:none;border:none;color:var(--jex-text-header);cursor:pointer;padding:4px;display:flex;align-items:center;opacity:.8;transition:opacity .2s;flex-shrink:0}.jex-header-back:hover{opacity:1}.jex-screen-container{flex:1;overflow:hidden;display:flex;flex-direction:column}.jex-home{flex:1;display:flex;flex-direction:column;padding:24px;gap:20px;overflow-y:auto}.jex-home-hero{display:flex;align-items:center;gap:14px;animation:jexFadeIn .4s ease both}.jex-home-avatar{position:relative;width:48px;height:48px;border-radius:14px;background:var(--jex-primary);color:var(--jex-text-header);display:flex;align-items:center;justify-content:center;flex-shrink:0;box-shadow:0 4px 12px color-mix(in srgb,var(--jex-primary) 30%,transparent)}.jex-home-status-dot{position:absolute;bottom:-2px;right:-2px;width:14px;height:14px;border-radius:50%;background:#22c55e;border:2.5px solid var(--jex-bg-window);animation:jexPulse 2s ease-in-out infinite}@keyframes jexPulse{0%,to{box-shadow:0 0 #22c55e66}50%{box-shadow:0 0 0 6px #22c55e00}}.jex-home-hero-text{display:flex;flex-direction:column;gap:2px;min-width:0}.jex-home-title{font-size:17px;font-weight:700;color:var(--jex-text-main);margin:0;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.jex-home-status{font-size:12px;font-weight:500;color:#22c55e;letter-spacing:.02em}.jex-home-greeting{background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);border-radius:4px 16px 16px;padding:16px 18px;font-size:14px;line-height:1.55;color:var(--jex-text-main);animation:jexFadeIn .4s .1s ease both}.jex-home-greeting p{margin:0}@keyframes jexFadeIn{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.jex-home-actions{display:flex;flex-direction:column;gap:10px;animation:jexFadeIn .4s .2s ease both}.jex-home-start-btn{background:var(--jex-bg-send-btn);color:var(--jex-text-header);border:none;border-radius:12px;padding:14px 20px;font-size:15px;font-weight:600;cursor:pointer;font-family:inherit;transition:background .2s,transform .15s,box-shadow .2s;width:100%;box-shadow:0 2px 8px color-mix(in srgb,var(--jex-primary) 25%,transparent)}.jex-home-start-btn:hover{background:var(--jex-primary-hover);transform:translateY(-1px);box-shadow:0 4px 16px color-mix(in srgb,var(--jex-primary) 35%,transparent)}.jex-home-start-btn:active{transform:translateY(0);box-shadow:0 1px 4px color-mix(in srgb,var(--jex-primary) 20%,transparent)}.jex-home-resume-card{display:flex;flex-direction:column;gap:8px;width:100%;text-align:left;padding:16px 18px;border-radius:14px;border:1.5px solid var(--jex-primary);background:color-mix(in srgb,var(--jex-primary) 6%,var(--jex-bg-window));cursor:pointer;font-family:inherit;transition:background .2s,border-color .2s,transform .15s,box-shadow .2s;box-shadow:0 2px 8px color-mix(in srgb,var(--jex-primary) 12%,transparent)}.jex-home-resume-card:hover{background:color-mix(in srgb,var(--jex-primary) 10%,var(--jex-bg-window));transform:translateY(-1px);box-shadow:0 4px 16px color-mix(in srgb,var(--jex-primary) 20%,transparent)}.jex-home-resume-card:active{transform:translateY(0)}.jex-home-resume-top{display:flex;align-items:center;justify-content:space-between}.jex-home-resume-label{font-size:14px;font-weight:600;color:var(--jex-primary)}.jex-home-resume-arrow{color:var(--jex-primary);opacity:.6;transition:opacity .2s,transform .2s}.jex-home-resume-card:hover .jex-home-resume-arrow{opacity:1;transform:translate(2px)}.jex-home-resume-ref{font-family:ui-monospace,Cascadia Code,Fira Code,monospace;font-size:13px;font-weight:600;letter-spacing:.06em;color:var(--jex-text-muted)}.jex-home-history{display:flex;flex-direction:column;gap:8px}.jex-home-resume-meta{font-size:11px;opacity:.7;margin-top:4px}.jex-home-new-btn{background:transparent;color:var(--jex-text-muted);border:1px solid var(--jex-border-input);border-radius:12px;padding:12px 20px;font-size:14px;font-weight:500;cursor:pointer;font-family:inherit;transition:color .2s,border-color .2s,background .2s;width:100%}.jex-home-new-btn:hover{color:var(--jex-text-main);border-color:var(--jex-text-muted);background:color-mix(in srgb,var(--jex-primary) 3%,transparent)}.jex-session-ref{display:flex;align-items:center;gap:8px;padding:8px 12px;background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);border-radius:8px;font-size:12px}.jex-session-ref-label{color:var(--jex-text-muted);font-weight:500}.jex-session-ref-code{color:var(--jex-primary);font-weight:700;font-family:ui-monospace,Cascadia Code,monospace;letter-spacing:.05em}.jex-chat-messages{flex:1;padding:20px;overflow-y:auto;display:flex;flex-direction:column;gap:12px}.jex-message-row{display:flex;align-items:flex-end;gap:8px;max-width:85%}.jex-message-row.bot{align-self:flex-start}.jex-message-content{flex:1;min-width:0}.jex-avatar{width:24px;height:24px;border-radius:50%;flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:12px;margin-bottom:2px}.jex-avatar-bot{background:var(--jex-bg-msg-bot);color:var(--jex-primary)}.jex-avatar-agent{background:var(--jex-bg-avatar-agent)}.jex-avatar-img{width:100%;height:100%;border-radius:50%;object-fit:cover}.jex-avatar-initials{font-size:9px;font-weight:700;color:var(--jex-text-avatar-agent)}.jex-message-author-row{display:flex;align-items:center;gap:6px;margin-top:2px;padding-left:4px}.jex-message-author{font-size:10px;color:var(--jex-text-muted)}.jex-reply-tag-btn{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:none;border-radius:4px;background:transparent;color:var(--jex-text-muted, #6b7280);cursor:pointer;transition:background .15s,color .15s}.jex-reply-tag-btn:hover{background:#0000000f;color:var(--jex-primary, #115A62)}.jex-reply-tag-btn:focus-visible{outline:2px solid var(--jex-primary, #115A62);outline-offset:1px}.jex-message{padding:12px 16px;border-radius:18px;font-size:14px;line-height:1.4}.jex-message.bot{background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);color:var(--jex-text-msg-bot);border-bottom-left-radius:4px}.jex-message.user{align-self:flex-end;max-width:80%;background:var(--jex-bg-msg-user);color:var(--jex-text-msg-user);border-bottom-right-radius:4px}.jex-typing{align-self:flex-start;display:flex;gap:4px;padding:12px 16px}.jex-typing span{width:8px;height:8px;border-radius:50%;background:var(--jex-text-muted);animation:jexTypingDot 1.2s infinite ease-in-out}.jex-typing span:nth-child(2){animation-delay:.2s}.jex-typing span:nth-child(3){animation-delay:.4s}@keyframes jexTypingDot{0%,80%,to{transform:scale(.8);opacity:.4}40%{transform:scale(1);opacity:1}}.jex-md{word-break:break-word;overflow-wrap:anywhere}.jex-md p{margin:0 0 8px}.jex-md p:last-child{margin-bottom:0}.jex-md strong{font-weight:600}.jex-md em{font-style:italic}.jex-md ul,.jex-md ol{margin:0 0 8px;padding-left:20px}.jex-md ul:last-child,.jex-md ol:last-child{margin-bottom:0}.jex-md ul{list-style-type:disc}.jex-md ol{list-style-type:decimal}.jex-md li{margin-bottom:2px}.jex-md li:last-child{margin-bottom:0}.jex-md a{color:var(--jex-primary);text-decoration:underline;text-underline-offset:2px}.jex-md a:hover{opacity:.8}.jex-md code{background:#00000014;padding:1px 5px;border-radius:4px;font-size:.9em;font-family:ui-monospace,Cascadia Code,Fira Code,monospace}.jex-md pre{background:#0000000f;border-radius:8px;padding:10px 12px;margin:0 0 8px;overflow-x:auto;font-size:.85em}.jex-md pre:last-child{margin-bottom:0}.jex-md pre code{background:none;padding:0;border-radius:0;font-size:inherit}.jex-md h1,.jex-md h2,.jex-md h3,.jex-md h4{font-weight:600;margin:8px 0 4px}.jex-md h1:first-child,.jex-md h2:first-child,.jex-md h3:first-child,.jex-md h4:first-child{margin-top:0}.jex-md h3{font-size:1em}.jex-md h4{font-size:.95em}.jex-md hr{border:none;border-top:1px solid var(--jex-border-window);margin:8px 0}.jex-md blockquote{border-left:3px solid var(--jex-primary);margin:0 0 8px;padding:4px 12px;color:var(--jex-text-muted)}.jex-md blockquote:last-child{margin-bottom:0}.dark .jex-md code,.jex-widget.dark .jex-md code{background:#ffffff1a}.dark .jex-md pre,.jex-widget.dark .jex-md pre{background:#ffffff14}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-md code{background:#ffffff1a}:host:not(.light) .jex-widget:not(.light) .jex-md pre{background:#ffffff14}}.jex-streaming-cursor:after{content:"◊";margin-left:2px;animation:jexBlinkCursor .8s ease-in-out infinite}@keyframes jexBlinkCursor{0%,to{opacity:1}50%{opacity:0}}.jex-session-notice{align-self:center;text-align:center;padding:8px 16px;margin:8px 0;font-size:12px;color:var(--jex-text-muted);background:var(--jex-bg-input, #f1f5f9);border-radius:8px;line-height:1.4}.jex-message-error{background:var(--jex-bg-error, #fef2f2)!important;border-color:var(--jex-border-error, #fecaca)!important;color:var(--jex-text-error, #991b1b)!important}.jex-chat-input{padding:12px 16px;border-top:1px solid var(--jex-border-window);display:flex;flex-direction:column;gap:8px;flex-shrink:0}.jex-composer-card{display:flex;flex-direction:column;gap:6px;padding:10px 12px 8px;background:var(--jex-bg-input);border:1px solid var(--jex-border-input);border-radius:16px;cursor:text;transition:border-color .15s ease,background .15s ease,box-shadow .15s ease}.jex-composer-card:focus-within{border-color:var(--jex-primary);background:var(--jex-bg-window);box-shadow:0 0 0 3px color-mix(in srgb,var(--jex-primary, #115A62) 14%,transparent)}.jex-composer-attachments{display:flex;flex-wrap:wrap;gap:6px;padding:2px 2px 4px}.jex-attachment-chip{position:relative;width:44px;height:44px;border-radius:8px;overflow:hidden;background:var(--jex-bg-msg-bot, #f1f5f9);flex-shrink:0;box-shadow:0 1px 2px #0000000f}.jex-attachment-thumb{width:100%;height:100%;object-fit:cover;display:block;pointer-events:none}.jex-attachment-remove{position:absolute;top:2px;right:2px;width:16px;height:16px;padding:0;border:none;border-radius:50%;background:#0f172ac7;color:#fff;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;opacity:0;transition:opacity .12s ease,transform .12s ease}.jex-attachment-chip:hover .jex-attachment-remove,.jex-attachment-chip:focus-within .jex-attachment-remove{opacity:1}.jex-attachment-remove:hover{transform:scale(1.08)}.jex-composer-textarea{width:100%;min-height:22px;background:transparent;border:none;outline:none;resize:none;padding:2px 4px;color:var(--jex-text-main);font-family:inherit;font-size:16px;line-height:1.45;overflow-y:hidden}.jex-composer-textarea::placeholder{color:var(--jex-text-muted);opacity:.85}.jex-composer-textarea:disabled{cursor:not-allowed;opacity:.7}.jex-composer-actions{display:flex;align-items:center;justify-content:space-between;gap:8px}.jex-composer-actions-left{display:inline-flex;align-items:center;gap:4px}.jex-attach-btn{width:30px;height:30px;padding:0;border:none;border-radius:50%;background:transparent;color:var(--jex-text-muted);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background .12s ease,color .12s ease,transform .12s ease}.jex-attach-btn:hover:not(:disabled){background:color-mix(in srgb,var(--jex-text-muted, #64748b) 12%,transparent);color:var(--jex-text-main)}.jex-attach-btn:active:not(:disabled){transform:scale(.92)}.jex-attach-btn:disabled{opacity:.4;cursor:not-allowed}.jex-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.jex-rate-limit-notice{flex:1 0 100%;order:-1;margin-bottom:8px;padding:8px 12px;border-radius:10px;background:var(--jex-bg-msg-bot, #f1f5f9);color:var(--jex-text-muted, #64748b);font-size:12px;line-height:1.4;text-align:center}.jex-session-error-notice{flex:1 0 100%;order:-1;margin-bottom:8px;padding:8px 12px;border-radius:10px;background:var(--jex-bg-error, #fef2f2);border:1px solid var(--jex-border-error, #fecaca);color:var(--jex-text-error, #991b1b);font-size:12px;line-height:1.4;text-align:center}.jex-chat-input input{flex:1;background:var(--jex-bg-input);border:1px solid var(--jex-border-input);border-radius:12px;padding:10px 14px;color:var(--jex-text-main);outline:none;font-family:inherit;font-size:14px}.jex-chat-input input:focus{border-color:var(--jex-primary)}.jex-send-btn{background:color-mix(in srgb,var(--jex-text-muted, #64748b) 18%,transparent);color:var(--jex-text-muted);border:none;border-radius:999px;width:30px;height:30px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background .15s ease,color .15s ease,opacity .15s ease,transform .15s ease;flex-shrink:0}.jex-send-btn-active{background:var(--jex-bg-send-btn, var(--jex-primary));color:var(--jex-text-header, #fff)}.jex-send-btn-active:hover:not(:disabled){background:var(--jex-primary-hover)}.jex-send-btn:active:not(:disabled){transform:scale(.9)}.jex-send-btn:disabled{opacity:.45;cursor:default}.jex-widget-footer{display:flex;align-items:center;justify-content:center;padding:8px 16px;border-top:1px solid var(--jex-border-glass);background:#00000005;flex-shrink:0}.jex-widget.dark .jex-widget-footer{background:#ffffff05}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-widget-footer{background:#ffffff05}}.jex-branding{display:flex;align-items:center;gap:6px;text-decoration:none;color:var(--jex-text-muted);font-size:11px;font-weight:500;transition:color .2s}.jex-branding:hover{color:var(--jex-text-main)}.jex-branding-icon{color:var(--jex-primary)}.jex-branding span strong{font-weight:700;color:var(--jex-text-main)}.jex-locale-select-wrapper{position:relative;display:flex;align-items:center}.jex-locale-select{appearance:none;-webkit-appearance:none;background:transparent;border:1px solid transparent;padding:4px 20px 4px 6px;border-radius:6px;font-family:inherit;font-size:11px;font-weight:600;color:var(--jex-text-muted);background-color:transparent;cursor:pointer;outline:none;transition:all .2s ease}.jex-locale-select option{background-color:#fff;color:#0f172a}.jex-locale-select:hover,.jex-locale-select:focus-visible{color:var(--jex-text-main);background:#0000000a}.jex-widget.dark .jex-locale-select:hover,.jex-widget.dark .jex-locale-select:focus-visible{background:#ffffff0d}.jex-widget.dark .jex-locale-select option{background-color:#0f172a;color:#f8fafc}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-locale-select:hover,:host:not(.light) .jex-widget:not(.light) .jex-locale-select:focus-visible{background:#ffffff0d}:host:not(.light) .jex-widget:not(.light) .jex-locale-select option{background-color:#0f172a;color:#f8fafc}}.jex-locale-select:focus-visible{border-color:var(--jex-primary)}.jex-locale-chevron{position:absolute;right:4px;pointer-events:none;color:var(--jex-text-muted);transition:color .2s ease}.jex-locale-select-wrapper:hover .jex-locale-chevron{color:var(--jex-text-main)}.jex-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;background:var(--jex-bg-window, #fff);z-index:10;padding:24px;text-align:center}.jex-loading-spinner{width:32px;height:32px;border:3px solid var(--jex-border-input, #e2e8f0);border-top-color:var(--jex-primary, #115A62);border-radius:50%;animation:jex-spin .7s linear infinite}@keyframes jex-spin{to{transform:rotate(360deg)}}.jex-loading-message{font-size:14px;color:var(--jex-text-muted, #64748b)}.jex-error-message{font-size:14px;color:var(--jex-text-main, #334155)}.jex-error-actions{display:flex;gap:8px}.jex-error-retry,.jex-error-back{padding:8px 16px;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;border:none}.jex-error-retry{background:var(--jex-primary, #115A62);color:#fff}.jex-error-back{background:transparent;color:var(--jex-text-muted, #64748b);border:1px solid var(--jex-border-input, #e2e8f0)}.jex-selection{display:flex;flex-direction:column;gap:12px;padding:24px 16px;height:100%}.jex-selection-title{font-size:16px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0 0 8px}.jex-selection-options{display:flex;flex-direction:column;gap:10px}.jex-selection-option{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:16px;border-radius:12px;border:1px solid var(--jex-border-window, #e2e8f0);background:transparent;cursor:pointer;text-align:left;transition:border-color .15s ease,background .15s ease}.jex-selection-option:hover{border-color:var(--jex-primary, #115A62);background:color-mix(in srgb,var(--jex-primary, #115A62) 5%,transparent)}.jex-selection-icon{font-size:20px}.jex-selection-label{font-size:14px;font-weight:600;color:var(--jex-text-main, #0f172a)}.jex-selection-sub{font-size:12px;color:var(--jex-text-muted, #64748b)}.jex-form-screen{display:flex;flex-direction:column;padding:20px 16px;height:100%;overflow-y:auto}.jex-form-title{font-size:16px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0 0 16px}.jex-form{display:flex;flex-direction:column;gap:10px}.jex-form-input,.jex-form-textarea{padding:10px 12px;border-radius:8px;border:1px solid var(--jex-border-input, #e2e8f0);font-size:14px;background:transparent;color:var(--jex-text-main, #0f172a);outline:none}@media(pointer:coarse){.jex-form-input,.jex-form-textarea{font-size:16px}}.jex-form-input:focus,.jex-form-textarea:focus{border-color:var(--jex-primary, #115A62)}.jex-form-textarea{min-height:80px;resize:vertical}.jex-form-submit{padding:10px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:14px;font-weight:600;cursor:pointer;margin-top:4px}.jex-inline-form{display:flex;flex-direction:column;gap:8px;padding:12px;background:var(--jex-bg-msg-bot, #f1f5f9);border:1px solid var(--jex-border-input, #e2e8f0);border-radius:var(--jex-radius, .75rem);width:100%}.jex-inline-form-title{font-weight:600;font-size:15px;color:var(--jex-text-main, #0f172a);margin:0}.jex-inline-form-subtitle{font-size:13px;color:var(--jex-text-muted, #64748b);line-height:1.4;margin:0 0 4px}.jex-inline-form-consent{font-size:11px;color:var(--jex-text-muted, #64748b);line-height:1.3;margin-top:4px;text-align:center}.jex-inline-form .jex-form-submit:disabled{opacity:.7;cursor:not-allowed}.jex-escalation-subtitle{font-size:13px;color:var(--jex-text-muted, #64748b);line-height:1.45;margin:0 0 8px}.jex-escalation-skip{padding:8px 12px;border:none;background:transparent;color:var(--jex-text-muted, #64748b);font-size:13px;cursor:pointer;text-decoration:underline;text-underline-offset:2px;text-align:center}.jex-escalation-skip:hover{color:var(--jex-text-main, #0f172a)}.jex-inline-form-card{position:relative;padding:14px;gap:8px}.jex-inline-form-dismiss{position:absolute;top:10px;right:10px;width:24px;height:24px;border-radius:50%;border:1px solid var(--jex-border-input, #e2e8f0);background:var(--jex-bg-window, #fff);color:var(--jex-text-muted, #64748b);font-size:12px;cursor:pointer;display:flex;align-items:center;justify-content:center;line-height:1}.jex-inline-form-dismiss:hover{background:var(--jex-bg-msg-bot, #f1f5f9);color:var(--jex-text-main, #0f172a)}.jex-inline-form-submitted{display:flex;align-items:center;gap:10px;padding:10px 12px;background:var(--jex-bg-msg-bot, #f1f5f9);border:1px solid var(--jex-border-input, #e2e8f0);border-radius:var(--jex-radius, .75rem);width:100%}.jex-inline-form-check{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:color-mix(in srgb,var(--jex-primary) 15%,transparent);color:var(--jex-primary, #115A62);font-size:14px;font-weight:700;flex-shrink:0}.jex-inline-form-submitted-title{font-weight:600;font-size:var(--jex-font-size, 14px);color:var(--jex-text-main, #0f172a)}.jex-inline-form-submitted-detail{font-size:12px;color:var(--jex-text-muted, #64748b);margin-top:2px}.jex-escalation-confirm{border-left:3px solid var(--jex-primary, #115A62);padding-left:8px}.jex-session-prompt{display:flex;flex-direction:column;align-items:center;gap:8px;padding:12px 16px;margin:8px 0;text-align:center}.jex-session-prompt-text{font-size:13px;color:var(--jex-text-muted, #64748b)}.jex-session-prompt-btn{padding:8px 16px;border-radius:8px;border:1px solid var(--jex-primary, #115A62);background:transparent;color:var(--jex-primary, #115A62);font-size:13px;font-weight:600;cursor:pointer}.jex-session-prompt-btn:hover{background:color-mix(in srgb,var(--jex-primary) 10%,transparent)}.jex-chat-input-resolved{display:flex;flex-direction:column;align-items:center;gap:10px;padding:14px 16px;border-top:1px solid var(--jex-border-input, #e2e8f0);background:var(--jex-bg-msg-bot, #f1f5f9);text-align:center}.jex-resolved-notice{font-size:13px;font-weight:500;color:var(--jex-text-muted, #64748b)}.jex-resolved-new-btn{padding:10px 20px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:13px;font-weight:600;cursor:pointer;width:100%}.jex-resolved-new-btn:hover{opacity:.9}.jex-confirmation{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:32px 24px;height:100%;text-align:center}.jex-confirmation-icon{width:48px;height:48px;border-radius:50%;background:color-mix(in srgb,var(--jex-primary, #115A62) 15%,transparent);color:var(--jex-primary, #115A62);font-size:22px;display:flex;align-items:center;justify-content:center}.jex-confirmation-title{font-size:18px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0}.jex-confirmation-body{font-size:13px;color:var(--jex-text-muted, #64748b);margin:0}.jex-confirmation-ref{font-size:20px;font-weight:700;letter-spacing:.05em;color:var(--jex-primary, #115A62);background:color-mix(in srgb,var(--jex-primary, #115A62) 10%,transparent);padding:10px 20px;border-radius:10px}.jex-confirmation-hint{font-size:12px;color:var(--jex-text-muted, #64748b);margin:0}.jex-confirmation-done{margin-top:8px;padding:10px 28px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:14px;font-weight:600;cursor:pointer}.jex-home-lookup-link{background:none;border:none;font-size:12px;color:var(--jex-text-muted, #64748b);cursor:pointer;text-decoration:underline;padding:0;align-self:center}.jex-home-lookup{display:flex;gap:8px;width:100%;animation:jexFadeIn .4s .1s ease both}.jex-home-lookup-input{flex:1;padding:10px 14px;border-radius:10px;border:1px solid var(--jex-border-input, #e2e8f0);background:var(--jex-bg-input);color:var(--jex-text-main);font-size:14px;font-family:ui-monospace,Cascadia Code,Fira Code,monospace;letter-spacing:.04em;outline:none;transition:border-color .2s}@media(pointer:coarse){.jex-home-lookup-input{font-size:16px}}.jex-home-lookup-input::placeholder{font-family:inherit;letter-spacing:.04em;color:var(--jex-text-muted);opacity:.7}.jex-home-lookup-input:focus{border-color:var(--jex-primary, #115A62)}.jex-home-lookup-submit{padding:10px 16px;border-radius:10px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:13px;font-weight:600;cursor:pointer;font-family:inherit;transition:background .2s,opacity .2s;flex-shrink:0}.jex-home-lookup-submit:hover:not(:disabled){background:var(--jex-primary-hover)}.jex-home-lookup-submit:disabled{opacity:.4;cursor:default}.jex-sources-row{margin-top:6px;margin-left:32px;display:flex;flex-direction:column;gap:6px}.jex-sources-toggle{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;background:transparent;border:none;border-radius:6px;cursor:pointer;font-size:11px;color:var(--jex-text-muted, #6b7280);font-family:inherit;align-self:flex-start;transition:background .15s,color .15s}.jex-sources-toggle:hover{background:#0000000a;color:inherit}.jex-sources-icon{font-size:12px;line-height:1}.jex-sources-chevron{display:inline-block;font-size:10px;transition:transform .15s}.jex-sources-chevron--open{transform:rotate(180deg)}.jex-sources-pills{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.jex-source-pill{display:inline-flex;align-items:center;gap:6px;max-width:240px;padding:2px 8px;border-radius:999px;border:1px solid rgba(0,0,0,.1);background:#0000000a;color:var(--jex-text-muted, #6b7280);font-size:11px;text-decoration:none;cursor:pointer;transition:background .15s,color .15s}.jex-source-pill:hover{background:#00000014;color:inherit}.jex-source-id{display:inline-flex;align-items:center;justify-content:center;min-width:16px;height:16px;padding:0 4px;border-radius:4px;background:var(--jex-primary, #115A62);color:#fff;font-size:10px;font-weight:600;line-height:1;flex-shrink:0;font-variant-numeric:tabular-nums}.jex-source-type{font-size:10px;flex-shrink:0}.jex-source-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}.jex-source-score{opacity:.6;flex-shrink:0;font-variant-numeric:tabular-nums}';
|
|
7343
|
+
function iu(t) {
|
|
7248
7344
|
const e = document.createElement("style");
|
|
7249
|
-
e.textContent =
|
|
7345
|
+
e.textContent = ru, t.appendChild(e);
|
|
7250
7346
|
}
|
|
7251
|
-
const
|
|
7252
|
-
let
|
|
7253
|
-
function
|
|
7254
|
-
const e = t ??
|
|
7347
|
+
const ou = "https://festive-mouse-978.eu-west-1.convex.cloud";
|
|
7348
|
+
let Gt = null;
|
|
7349
|
+
function su(t) {
|
|
7350
|
+
const e = t ?? ou;
|
|
7255
7351
|
if (!e)
|
|
7256
7352
|
throw new Error("[jexity] No Convex URL — set VITE_CONVEX_URL at build time or data-convex-url on the script tag");
|
|
7257
|
-
return
|
|
7353
|
+
return Gt || (Gt = new wa(Na(e))), Gt;
|
|
7258
7354
|
}
|
|
7259
|
-
function
|
|
7355
|
+
function au(t, e) {
|
|
7260
7356
|
const n = t.shadowRoot ?? t.attachShadow({ mode: "open" });
|
|
7261
7357
|
for (; n.firstChild; )
|
|
7262
7358
|
n.removeChild(n.firstChild);
|
|
7263
|
-
|
|
7359
|
+
iu(n), St.value = e.source, le.value = e.bootstrapToken, z.value = [{ id: "home" }], e.mode === "embedded" && (t.classList.add("jex-mode-embedded"), P.value = !0);
|
|
7264
7360
|
const r = document.createElement("div");
|
|
7265
7361
|
return e.mode === "embedded" && (r.style.cssText = "width:100%;height:100%"), n.appendChild(r), ge(
|
|
7266
|
-
/* @__PURE__ */ c(
|
|
7362
|
+
/* @__PURE__ */ c(Sa, { client: su(e.convexUrl), children: /* @__PURE__ */ c(tu, { options: e }) }),
|
|
7267
7363
|
r
|
|
7268
7364
|
), function() {
|
|
7269
|
-
ge(null, r),
|
|
7365
|
+
ge(null, r), P.value = !1, St.value = void 0, le.value = void 0, z.value = [{ id: "home" }];
|
|
7270
7366
|
};
|
|
7271
7367
|
}
|
|
7272
|
-
function
|
|
7273
|
-
const r =
|
|
7368
|
+
function lu(t, e, n) {
|
|
7369
|
+
const r = au(t, e), i = /* @__PURE__ */ new Set(), o = P.subscribe((l) => {
|
|
7274
7370
|
for (const a of i)
|
|
7275
7371
|
a(l);
|
|
7276
7372
|
});
|
|
@@ -7279,16 +7375,16 @@ function Kc(t, e, n) {
|
|
|
7279
7375
|
o(), i.clear(), r(), n && n();
|
|
7280
7376
|
},
|
|
7281
7377
|
open() {
|
|
7282
|
-
|
|
7378
|
+
P.value = !0;
|
|
7283
7379
|
},
|
|
7284
7380
|
close() {
|
|
7285
|
-
|
|
7381
|
+
P.value = !1;
|
|
7286
7382
|
},
|
|
7287
7383
|
toggle() {
|
|
7288
|
-
|
|
7384
|
+
P.value = !P.value;
|
|
7289
7385
|
},
|
|
7290
7386
|
get isOpen() {
|
|
7291
|
-
return
|
|
7387
|
+
return P.value;
|
|
7292
7388
|
},
|
|
7293
7389
|
subscribe(l) {
|
|
7294
7390
|
return i.add(l), () => {
|
|
@@ -7297,17 +7393,17 @@ function Kc(t, e, n) {
|
|
|
7297
7393
|
}
|
|
7298
7394
|
};
|
|
7299
7395
|
}
|
|
7300
|
-
let
|
|
7301
|
-
function
|
|
7302
|
-
|
|
7396
|
+
let Ue = null;
|
|
7397
|
+
function cu(t) {
|
|
7398
|
+
Ue && Ue.shutdown();
|
|
7303
7399
|
let e;
|
|
7304
7400
|
t.container ? e = typeof t.container == "string" ? document.querySelector(t.container) : t.container : (e = document.createElement("div"), e.id = "jexity-chat-widget", document.body.appendChild(e));
|
|
7305
|
-
const n =
|
|
7306
|
-
t.container || e.remove(),
|
|
7401
|
+
const n = lu(e, t, () => {
|
|
7402
|
+
t.container || e.remove(), Ue === n && (Ue = null);
|
|
7307
7403
|
});
|
|
7308
|
-
return
|
|
7404
|
+
return Ue = n, n;
|
|
7309
7405
|
}
|
|
7310
7406
|
export {
|
|
7311
|
-
|
|
7407
|
+
cu as JexityChat
|
|
7312
7408
|
};
|
|
7313
7409
|
//# sourceMappingURL=index.mjs.map
|