@evelan/jexity-widget 0.11.9 → 0.12.2
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 +1049 -917
- package/dist/index.mjs.map +1 -1
- package/dist/react.mjs +1068 -936
- package/dist/react.mjs.map +1 -1
- package/dist/types/features/chat/components/EscalationFormScreen.d.ts.map +1 -1
- package/dist/types/features/chat/composer/components/ChatInput.d.ts.map +1 -1
- package/dist/types/features/chat/composer/components/PrivacyNotice.d.ts +3 -0
- package/dist/types/features/chat/composer/components/PrivacyNotice.d.ts.map +1 -0
- package/dist/types/i18n/locales/de.d.ts.map +1 -1
- package/dist/types/i18n/locales/en.d.ts +4 -0
- package/dist/types/i18n/locales/en.d.ts.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/react.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { createContext as
|
|
2
|
-
const
|
|
3
|
-
function
|
|
4
|
-
const { children: e, ...n } = t, [r, i] =
|
|
5
|
-
|
|
1
|
+
import { createContext as xo, useState as bo, useRef as zt, useEffect as vo, createElement as Dn, useContext as yo } from "react";
|
|
2
|
+
const Br = xo(null);
|
|
3
|
+
function ku(t) {
|
|
4
|
+
const { children: e, ...n } = t, [r, i] = bo(!1), o = zt(null), s = zt(null), l = zt(null), a = n.mode === "embedded";
|
|
5
|
+
vo(() => {
|
|
6
6
|
let d = !1;
|
|
7
|
-
return Promise.resolve().then(() =>
|
|
7
|
+
return Promise.resolve().then(() => vu).then(
|
|
8
8
|
(h) => {
|
|
9
9
|
if (d)
|
|
10
10
|
return;
|
|
@@ -31,40 +31,40 @@ function su(t) {
|
|
|
31
31
|
},
|
|
32
32
|
isOpen: r
|
|
33
33
|
};
|
|
34
|
-
return
|
|
35
|
-
|
|
34
|
+
return Dn(
|
|
35
|
+
Br.Provider,
|
|
36
36
|
{ value: u },
|
|
37
|
-
a ?
|
|
37
|
+
a ? Dn("div", {
|
|
38
38
|
ref: l,
|
|
39
39
|
style: { width: "100%", height: "100%" }
|
|
40
40
|
}) : e
|
|
41
41
|
);
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
const t =
|
|
43
|
+
function wu() {
|
|
44
|
+
const t = yo(Br);
|
|
45
45
|
if (!t)
|
|
46
46
|
throw new Error("useJexityChat must be used within a <JexityChatProvider>");
|
|
47
47
|
return t;
|
|
48
48
|
}
|
|
49
|
-
var it, b,
|
|
49
|
+
var it, b, Vr, Hr, he, Bn, Wr, Jr, Kr, vn, Gt, Yt, Zr, Ge = {}, Gr = [], ko = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, ot = Array.isArray;
|
|
50
50
|
function ee(t, e) {
|
|
51
51
|
for (var n in e) t[n] = e[n];
|
|
52
52
|
return t;
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function yn(t) {
|
|
55
55
|
t && t.parentNode && t.parentNode.removeChild(t);
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function D(t, e, n) {
|
|
58
58
|
var r, i, o, s = {};
|
|
59
59
|
for (o in e) o == "key" ? r = e[o] : o == "ref" ? i = e[o] : s[o] = e[o];
|
|
60
60
|
if (arguments.length > 2 && (s.children = arguments.length > 3 ? it.call(arguments, 2) : n), typeof t == "function" && t.defaultProps != null) for (o in t.defaultProps) s[o] === void 0 && (s[o] = t.defaultProps[o]);
|
|
61
61
|
return He(t, s, r, i, null);
|
|
62
62
|
}
|
|
63
63
|
function He(t, e, n, r, i) {
|
|
64
|
-
var o = { type: t, props: e, key: n, ref: r, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: i ?? ++
|
|
64
|
+
var o = { type: t, props: e, key: n, ref: r, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: i ?? ++Vr, __i: -1, __u: 0 };
|
|
65
65
|
return i == null && b.vnode != null && b.vnode(o), o;
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function wo() {
|
|
68
68
|
return { current: null };
|
|
69
69
|
}
|
|
70
70
|
function Q(t) {
|
|
@@ -73,46 +73,46 @@ function Q(t) {
|
|
|
73
73
|
function W(t, e) {
|
|
74
74
|
this.props = t, this.context = e;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
77
|
-
if (e == null) return t.__ ?
|
|
76
|
+
function Ae(t, e) {
|
|
77
|
+
if (e == null) return t.__ ? Ae(t.__, t.__i + 1) : null;
|
|
78
78
|
for (var n; e < t.__k.length; e++) if ((n = t.__k[e]) != null && n.__e != null) return n.__e;
|
|
79
|
-
return typeof t.type == "function" ?
|
|
79
|
+
return typeof t.type == "function" ? Ae(t) : null;
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function Yr(t) {
|
|
82
82
|
var e, n;
|
|
83
83
|
if ((t = t.__) != null && t.__c != null) {
|
|
84
84
|
for (t.__e = t.__c.base = null, e = 0; e < t.__k.length; e++) if ((n = t.__k[e]) != null && n.__e != null) {
|
|
85
85
|
t.__e = t.__c.base = n.__e;
|
|
86
86
|
break;
|
|
87
87
|
}
|
|
88
|
-
return
|
|
88
|
+
return Yr(t);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
(!t.__d && (t.__d = !0) && he.push(t) && !bt.__r++ ||
|
|
91
|
+
function Xt(t) {
|
|
92
|
+
(!t.__d && (t.__d = !0) && he.push(t) && !bt.__r++ || Bn != b.debounceRendering) && ((Bn = b.debounceRendering) || Wr)(bt);
|
|
93
93
|
}
|
|
94
94
|
function bt() {
|
|
95
|
-
for (var t, e, n, r, i, o, s, l = 1; he.length; ) he.length > l && he.sort(
|
|
95
|
+
for (var t, e, n, r, i, o, s, l = 1; he.length; ) he.length > l && he.sort(Jr), 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 = ee({}, r)).__v = r.__v + 1, b.vnode && b.vnode(n), kn(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, ti(o, n, s), r.__e = r.__ = null, n.__e != i && Yr(n)));
|
|
96
96
|
bt.__r = 0;
|
|
97
97
|
}
|
|
98
|
-
function
|
|
99
|
-
var h, p, f, g, m, x, y, v = r && r.__k ||
|
|
100
|
-
for (a =
|
|
98
|
+
function Xr(t, e, n, r, i, o, s, l, a, u, d) {
|
|
99
|
+
var h, p, f, g, m, x, y, v = r && r.__k || Gr, A = e.length;
|
|
100
|
+
for (a = _o(n, e, v, a, A), h = 0; h < A; h++) (f = n.__k[h]) != null && (p = f.__i == -1 ? Ge : v[f.__i] || Ge, f.__i = h, x = kn(t, f, p, i, o, s, l, a, u, d), g = f.__e, f.ref && p.ref != f.ref && (p.ref && wn(p.ref, null, f), d.push(f.ref, f.__c || g, f)), m == null && g != null && (m = g), (y = !!(4 & f.__u)) || p.__k === f.__k ? a = ei(f, a, t, y) : typeof f.type == "function" && x !== void 0 ? a = x : g && (a = g.nextSibling), f.__u &= -7);
|
|
101
101
|
return n.__e = m, a;
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function _o(t, e, n, r, i) {
|
|
104
104
|
var o, s, l, a, u, d = n.length, h = d, p = 0;
|
|
105
|
-
for (t.__k = new Array(i), o = 0; o < i; o++) (s = e[o]) != null && typeof s != "boolean" && typeof s != "function" ? (a = o + p, (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(Q, { 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 =
|
|
106
|
-
if (h) for (o = 0; o < d; o++) (l = n[o]) != null && (2 & l.__u) == 0 && (l.__e == r && (r =
|
|
105
|
+
for (t.__k = new Array(i), o = 0; o < i; o++) (s = e[o]) != null && typeof s != "boolean" && typeof s != "function" ? (a = o + p, (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(Q, { 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 = jo(s, n, a, h)) != -1 && (h--, (l = n[u]) && (l.__u |= 2)), l == null || l.__v == null ? (u == -1 && (i > d ? p-- : i < d && p++), typeof s.type != "function" && (s.__u |= 4)) : u != a && (u == a - 1 ? p-- : u == a + 1 ? p++ : (u > a ? p-- : p++, s.__u |= 4))) : t.__k[o] = null;
|
|
106
|
+
if (h) for (o = 0; o < d; o++) (l = n[o]) != null && (2 & l.__u) == 0 && (l.__e == r && (r = Ae(l)), ri(l, l));
|
|
107
107
|
return r;
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function ei(t, e, n, r) {
|
|
110
110
|
var i, o;
|
|
111
111
|
if (typeof t.type == "function") {
|
|
112
|
-
for (i = t.__k, o = 0; i && o < i.length; o++) i[o] && (i[o].__ = t, e =
|
|
112
|
+
for (i = t.__k, o = 0; i && o < i.length; o++) i[o] && (i[o].__ = t, e = ei(i[o], e, n, r));
|
|
113
113
|
return e;
|
|
114
114
|
}
|
|
115
|
-
t.__e != e && (r && (e && t.type && !e.parentNode && (e =
|
|
115
|
+
t.__e != e && (r && (e && t.type && !e.parentNode && (e = Ae(t)), n.insertBefore(t.__e, e || null)), e = t.__e);
|
|
116
116
|
do
|
|
117
117
|
e = e && e.nextSibling;
|
|
118
118
|
while (e != null && e.nodeType == 8);
|
|
@@ -123,7 +123,7 @@ function te(t, e) {
|
|
|
123
123
|
te(n, e);
|
|
124
124
|
}) : e.push(t)), e;
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function jo(t, e, n, r) {
|
|
127
127
|
var i, o, s, l = t.key, a = t.type, u = e[n], d = u != null && (2 & u.__u) == 0;
|
|
128
128
|
if (u === null && t.key == null || d && l == u.key && a == u.type) return n;
|
|
129
129
|
if (r > (d ? 1 : 0)) {
|
|
@@ -131,17 +131,17 @@ function vo(t, e, n, r) {
|
|
|
131
131
|
}
|
|
132
132
|
return -1;
|
|
133
133
|
}
|
|
134
|
-
function
|
|
135
|
-
e[0] == "-" ? t.setProperty(e, n ?? "") : t[e] = n == null ? "" : typeof n != "number" ||
|
|
134
|
+
function Vn(t, e, n) {
|
|
135
|
+
e[0] == "-" ? t.setProperty(e, n ?? "") : t[e] = n == null ? "" : typeof n != "number" || ko.test(e) ? n : n + "px";
|
|
136
136
|
}
|
|
137
137
|
function ut(t, e, n, r, i) {
|
|
138
138
|
var o, s;
|
|
139
139
|
e: if (e == "style") if (typeof n == "string") t.style.cssText = n;
|
|
140
140
|
else {
|
|
141
|
-
if (typeof r == "string" && (t.style.cssText = r = ""), r) for (e in r) n && e in n ||
|
|
142
|
-
if (n) for (e in n) r && n[e] == r[e] ||
|
|
141
|
+
if (typeof r == "string" && (t.style.cssText = r = ""), r) for (e in r) n && e in n || Vn(t.style, e, "");
|
|
142
|
+
if (n) for (e in n) r && n[e] == r[e] || Vn(t.style, e, n[e]);
|
|
143
143
|
}
|
|
144
|
-
else if (e[0] == "o" && e[1] == "n") o = e != (e = e.replace(
|
|
144
|
+
else if (e[0] == "o" && e[1] == "n") o = e != (e = e.replace(Kr, "$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 = vn, t.addEventListener(e, o ? Yt : Gt, o)) : t.removeEventListener(e, o ? Yt : Gt, o);
|
|
145
145
|
else {
|
|
146
146
|
if (i == "http://www.w3.org/2000/svg") e = e.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
|
|
147
147
|
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 {
|
|
@@ -152,22 +152,22 @@ function ut(t, e, n, r, i) {
|
|
|
152
152
|
typeof n == "function" || (n == null || n === !1 && e[4] != "-" ? t.removeAttribute(e) : t.setAttribute(e, e == "popover" && n == 1 ? "" : n));
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function Hn(t) {
|
|
156
156
|
return function(e) {
|
|
157
157
|
if (this.l) {
|
|
158
158
|
var n = this.l[e.type + t];
|
|
159
|
-
if (e.t == null) e.t =
|
|
159
|
+
if (e.t == null) e.t = vn++;
|
|
160
160
|
else if (e.t < n.u) return;
|
|
161
161
|
return n(b.event ? b.event(e) : e);
|
|
162
162
|
}
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
|
-
function
|
|
166
|
-
var d, h, p, f, g, m, x, y, v,
|
|
165
|
+
function kn(t, e, n, r, i, o, s, l, a, u) {
|
|
166
|
+
var d, h, p, f, g, m, x, y, v, A, K, se, B, Fn, ct, Ne, Ot, Z = e.type;
|
|
167
167
|
if (e.constructor != null) return null;
|
|
168
168
|
128 & n.__u && (a = !!(32 & n.__u), o = [l = e.__e = n.__e]), (d = b.__b) && d(e);
|
|
169
169
|
e: if (typeof Z == "function") try {
|
|
170
|
-
if (y = e.props, v = "prototype" in Z && Z.prototype.render,
|
|
170
|
+
if (y = e.props, v = "prototype" in Z && Z.prototype.render, A = (d = Z.contextType) && r[d.__c], K = d ? A ? A.props.value : d.__ : r, n.__c ? x = (h = e.__c = n.__c).__ = h.__E : (v ? e.__c = h = new Z(y, K) : (e.__c = h = new W(y, K), h.constructor = Z, h.render = Co), A && A.sub(h), h.props = y, h.state || (h.state = {}), h.context = K, h.__n = r, p = h.__d = !0, h.__h = [], h._sb = []), v && h.__s == null && (h.__s = h.state), v && Z.getDerivedStateFromProps != null && (h.__s == h.state && (h.__s = ee({}, h.__s)), ee(h.__s, Z.getDerivedStateFromProps(y, h.__s))), f = h.props, g = h.state, h.__v = e, p) v && Z.getDerivedStateFromProps == null && h.componentWillMount != null && h.componentWillMount(), v && h.componentDidMount != null && h.__h.push(h.componentDidMount);
|
|
171
171
|
else {
|
|
172
172
|
if (v && Z.getDerivedStateFromProps == null && y !== f && h.componentWillReceiveProps != null && h.componentWillReceiveProps(y, K), !h.__e && h.shouldComponentUpdate != null && h.shouldComponentUpdate(y, h.__s, K) === !1 || e.__v == n.__v) {
|
|
173
173
|
for (e.__v != n.__v && (h.props = y, h.state = h.__s, h.__d = !1), e.__e = n.__e, e.__k = n.__k, e.__k.some(function(ke) {
|
|
@@ -180,32 +180,32 @@ function bn(t, e, n, r, i, o, s, l, a, u) {
|
|
|
180
180
|
h.componentDidUpdate(f, g, m);
|
|
181
181
|
});
|
|
182
182
|
}
|
|
183
|
-
if (h.context = K, h.props = y, h.__P = t, h.__e = !1, B = b.__r,
|
|
183
|
+
if (h.context = K, h.props = y, h.__P = t, h.__e = !1, B = b.__r, Fn = 0, v) {
|
|
184
184
|
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]);
|
|
185
185
|
h._sb = [];
|
|
186
186
|
} else do
|
|
187
187
|
h.__d = !1, B && B(e), d = h.render(h.props, h.state, h.context), h.state = h.__s;
|
|
188
|
-
while (h.__d && ++
|
|
189
|
-
h.state = h.__s, h.getChildContext != null && (r = ee(ee({}, r), h.getChildContext())), v && !p && h.getSnapshotBeforeUpdate != null && (m = h.getSnapshotBeforeUpdate(f, g)),
|
|
188
|
+
while (h.__d && ++Fn < 25);
|
|
189
|
+
h.state = h.__s, h.getChildContext != null && (r = ee(ee({}, r), h.getChildContext())), v && !p && h.getSnapshotBeforeUpdate != null && (m = h.getSnapshotBeforeUpdate(f, g)), Ne = d, d != null && d.type === Q && d.key == null && (Ne = ni(d.props.children)), l = Xr(t, ot(Ne) ? Ne : [Ne], 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);
|
|
190
190
|
} catch (ke) {
|
|
191
191
|
if (e.__v = null, a || o != null) if (ke.then) {
|
|
192
192
|
for (e.__u |= a ? 160 : 128; l && l.nodeType == 8 && l.nextSibling; ) l = l.nextSibling;
|
|
193
193
|
o[o.indexOf(l)] = null, e.__e = l;
|
|
194
194
|
} else {
|
|
195
|
-
for (
|
|
196
|
-
|
|
195
|
+
for (Ot = o.length; Ot--; ) yn(o[Ot]);
|
|
196
|
+
en(e);
|
|
197
197
|
}
|
|
198
|
-
else e.__e = n.__e, e.__k = n.__k, ke.then ||
|
|
198
|
+
else e.__e = n.__e, e.__k = n.__k, ke.then || en(e);
|
|
199
199
|
b.__e(ke, e, n);
|
|
200
200
|
}
|
|
201
|
-
else o == null && e.__v == n.__v ? (e.__k = n.__k, e.__e = n.__e) : l = e.__e =
|
|
201
|
+
else o == null && e.__v == n.__v ? (e.__k = n.__k, e.__e = n.__e) : l = e.__e = So(n.__e, e, n, r, i, o, s, a, u);
|
|
202
202
|
return (d = b.diffed) && d(e), 128 & e.__u ? void 0 : l;
|
|
203
203
|
}
|
|
204
|
-
function
|
|
205
|
-
t && t.__c && (t.__c.__e = !0), t && t.__k && t.__k.forEach(
|
|
204
|
+
function en(t) {
|
|
205
|
+
t && t.__c && (t.__c.__e = !0), t && t.__k && t.__k.forEach(en);
|
|
206
206
|
}
|
|
207
|
-
function
|
|
208
|
-
for (var r = 0; r < n.length; r++)
|
|
207
|
+
function ti(t, e, n) {
|
|
208
|
+
for (var r = 0; r < n.length; r++) wn(n[r], n[++r], n[++r]);
|
|
209
209
|
b.__c && b.__c(e, t), t.some(function(i) {
|
|
210
210
|
try {
|
|
211
211
|
t = i.__h, i.__h = [], t.some(function(o) {
|
|
@@ -216,10 +216,10 @@ function Zr(t, e, n) {
|
|
|
216
216
|
}
|
|
217
217
|
});
|
|
218
218
|
}
|
|
219
|
-
function
|
|
220
|
-
return typeof t != "object" || t == null || t.__b && t.__b > 0 ? t : ot(t) ? t.map(
|
|
219
|
+
function ni(t) {
|
|
220
|
+
return typeof t != "object" || t == null || t.__b && t.__b > 0 ? t : ot(t) ? t.map(ni) : ee({}, t);
|
|
221
221
|
}
|
|
222
|
-
function
|
|
222
|
+
function So(t, e, n, r, i, o, s, l, a) {
|
|
223
223
|
var u, d, h, p, f, g, m, x = n.props, y = e.props, v = e.type;
|
|
224
224
|
if (v == "svg" ? i = "http://www.w3.org/2000/svg" : v == "math" ? i = "http://www.w3.org/1998/Math/MathML" : i || (i = "http://www.w3.org/1999/xhtml"), o != null) {
|
|
225
225
|
for (u = 0; u < o.length; u++) if ((f = o[u]) && "setAttribute" in f == !!v && (v ? f.localName == v : f.nodeType == 3)) {
|
|
@@ -243,12 +243,12 @@ function yo(t, e, n, r, i, o, s, l, a) {
|
|
|
243
243
|
}
|
|
244
244
|
for (u in y) f = y[u], u == "children" ? p = f : u == "dangerouslySetInnerHTML" ? d = f : u == "value" ? g = f : u == "checked" ? m = f : l && typeof f != "function" || x[u] === f || ut(t, u, f, x[u], i);
|
|
245
245
|
if (d) l || h && (d.__html == h.__html || d.__html == t.innerHTML) || (t.innerHTML = d.__html), e.__k = [];
|
|
246
|
-
else if (h && (t.innerHTML = ""),
|
|
246
|
+
else if (h && (t.innerHTML = ""), Xr(e.type == "template" ? t.content : t, ot(p) ? p : [p], e, n, r, v == "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]);
|
|
247
247
|
l || (u = "value", v == "progress" && g == null ? t.removeAttribute("value") : g != null && (g !== t[u] || v == "progress" && !g || v == "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));
|
|
248
248
|
}
|
|
249
249
|
return t;
|
|
250
250
|
}
|
|
251
|
-
function
|
|
251
|
+
function wn(t, e, n) {
|
|
252
252
|
try {
|
|
253
253
|
if (typeof t == "function") {
|
|
254
254
|
var r = typeof t.__u == "function";
|
|
@@ -258,9 +258,9 @@ function vn(t, e, n) {
|
|
|
258
258
|
b.__e(i, n);
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
|
-
function
|
|
261
|
+
function ri(t, e, n) {
|
|
262
262
|
var r, i;
|
|
263
|
-
if (b.unmount && b.unmount(t), (r = t.ref) && (r.current && r.current != t.__e ||
|
|
263
|
+
if (b.unmount && b.unmount(t), (r = t.ref) && (r.current && r.current != t.__e || wn(r, null, e)), (r = t.__c) != null) {
|
|
264
264
|
if (r.componentWillUnmount) try {
|
|
265
265
|
r.componentWillUnmount();
|
|
266
266
|
} catch (o) {
|
|
@@ -268,25 +268,25 @@ function Yr(t, e, n) {
|
|
|
268
268
|
}
|
|
269
269
|
r.base = r.__P = null;
|
|
270
270
|
}
|
|
271
|
-
if (r = t.__k) for (i = 0; i < r.length; i++) r[i] &&
|
|
272
|
-
n ||
|
|
271
|
+
if (r = t.__k) for (i = 0; i < r.length; i++) r[i] && ri(r[i], e, n || typeof t.type != "function");
|
|
272
|
+
n || yn(t.__e), t.__c = t.__ = t.__e = void 0;
|
|
273
273
|
}
|
|
274
|
-
function
|
|
274
|
+
function Co(t, e, n) {
|
|
275
275
|
return this.constructor(t, n);
|
|
276
276
|
}
|
|
277
277
|
function ge(t, e, n) {
|
|
278
278
|
var r, i, o, s;
|
|
279
|
-
e == document && (e = document.documentElement), b.__ && b.__(t, e), i = (r = typeof n == "function") ? null : n && n.__k || e.__k, o = [], s = [],
|
|
279
|
+
e == document && (e = document.documentElement), b.__ && b.__(t, e), i = (r = typeof n == "function") ? null : n && n.__k || e.__k, o = [], s = [], kn(e, t = (!r && n || e).__k = D(Q, null, [t]), i || Ge, Ge, 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), ti(o, t, s);
|
|
280
280
|
}
|
|
281
|
-
function
|
|
282
|
-
ge(t, e,
|
|
281
|
+
function ii(t, e) {
|
|
282
|
+
ge(t, e, ii);
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function Ro(t, e, n) {
|
|
285
285
|
var r, i, o, s, l = ee({}, t.props);
|
|
286
286
|
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];
|
|
287
287
|
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);
|
|
288
288
|
}
|
|
289
|
-
function
|
|
289
|
+
function To(t) {
|
|
290
290
|
function e(n) {
|
|
291
291
|
var r, i;
|
|
292
292
|
return this.getChildContext || (r = /* @__PURE__ */ new Set(), (i = {})[e.__c] = this, this.getChildContext = function() {
|
|
@@ -295,7 +295,7 @@ function _o(t) {
|
|
|
295
295
|
r = null;
|
|
296
296
|
}, this.shouldComponentUpdate = function(o) {
|
|
297
297
|
this.props.value != o.value && r.forEach(function(s) {
|
|
298
|
-
s.__e = !0,
|
|
298
|
+
s.__e = !0, Xt(s);
|
|
299
299
|
});
|
|
300
300
|
}, this.sub = function(o) {
|
|
301
301
|
r.add(o);
|
|
@@ -305,48 +305,48 @@ function _o(t) {
|
|
|
305
305
|
};
|
|
306
306
|
}), n.children;
|
|
307
307
|
}
|
|
308
|
-
return e.__c = "__cC" +
|
|
308
|
+
return e.__c = "__cC" + Zr++, e.__ = t, e.Provider = e.__l = (e.Consumer = function(n, r) {
|
|
309
309
|
return n.children(r);
|
|
310
310
|
}).contextType = e, e;
|
|
311
311
|
}
|
|
312
|
-
it =
|
|
312
|
+
it = Gr.slice, b = { __e: function(t, e, n, r) {
|
|
313
313
|
for (var i, o, s; e = e.__; ) if ((i = e.__c) && !i.__) try {
|
|
314
314
|
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;
|
|
315
315
|
} catch (l) {
|
|
316
316
|
t = l;
|
|
317
317
|
}
|
|
318
318
|
throw t;
|
|
319
|
-
} },
|
|
319
|
+
} }, Vr = 0, Hr = function(t) {
|
|
320
320
|
return t != null && t.constructor == null;
|
|
321
321
|
}, W.prototype.setState = function(t, e) {
|
|
322
322
|
var n;
|
|
323
|
-
n = this.__s != null && this.__s != this.state ? this.__s : this.__s = ee({}, this.state), typeof t == "function" && (t = t(ee({}, n), this.props)), t && ee(n, t), t != null && this.__v && (e && this._sb.push(e),
|
|
323
|
+
n = this.__s != null && this.__s != this.state ? this.__s : this.__s = ee({}, this.state), typeof t == "function" && (t = t(ee({}, n), this.props)), t && ee(n, t), t != null && this.__v && (e && this._sb.push(e), Xt(this));
|
|
324
324
|
}, W.prototype.forceUpdate = function(t) {
|
|
325
|
-
this.__v && (this.__e = !0, t && this.__h.push(t),
|
|
326
|
-
}, W.prototype.render = Q, he = [],
|
|
325
|
+
this.__v && (this.__e = !0, t && this.__h.push(t), Xt(this));
|
|
326
|
+
}, W.prototype.render = Q, he = [], Wr = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Jr = function(t, e) {
|
|
327
327
|
return t.__v.__b - e.__v.__b;
|
|
328
|
-
}, bt.__r = 0,
|
|
329
|
-
var
|
|
328
|
+
}, bt.__r = 0, Kr = /(PointerCapture)$|Capture$/i, vn = 0, Gt = Hn(!1), Yt = Hn(!0), Zr = 0;
|
|
329
|
+
var Ao = 0;
|
|
330
330
|
function c(t, e, n, r, i, o) {
|
|
331
331
|
e || (e = {});
|
|
332
332
|
var s, l, a = e;
|
|
333
333
|
if ("ref" in a) for (l in a = {}, e) l == "ref" ? s = e[l] : a[l] = e[l];
|
|
334
|
-
var u = { type: t, props: a, key: n, ref: s, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --
|
|
334
|
+
var u = { type: t, props: a, key: n, ref: s, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --Ao, __i: -1, __u: 0, __source: i, __self: o };
|
|
335
335
|
if (typeof t == "function" && (s = t.defaultProps)) for (l in s) a[l] === void 0 && (a[l] = s[l]);
|
|
336
336
|
return b.vnode && b.vnode(u), u;
|
|
337
337
|
}
|
|
338
|
-
var ce, j,
|
|
338
|
+
var ce, j, Nt, Wn, Ie = 0, oi = [], S = b, Jn = S.__b, Kn = S.__r, Zn = S.diffed, Gn = S.__c, Yn = S.unmount, Xn = S.__;
|
|
339
339
|
function Me(t, e) {
|
|
340
|
-
S.__h && S.__h(j, t,
|
|
340
|
+
S.__h && S.__h(j, t, Ie || e), Ie = 0;
|
|
341
341
|
var n = j.__H || (j.__H = { __: [], __h: [] });
|
|
342
342
|
return t >= n.__.length && n.__.push({}), n.__[t];
|
|
343
343
|
}
|
|
344
344
|
function C(t) {
|
|
345
|
-
return
|
|
345
|
+
return Ie = 1, _n(ci, t);
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function _n(t, e, n) {
|
|
348
348
|
var r = Me(ce++, 2);
|
|
349
|
-
if (r.t = t, !r.__c && (r.__ = [n ? n(e) :
|
|
349
|
+
if (r.t = t, !r.__c && (r.__ = [n ? n(e) : ci(void 0, e), function(l) {
|
|
350
350
|
var a = r.__N ? r.__N[0] : r.__[0], u = r.t(a, l);
|
|
351
351
|
a !== u && (r.__N = [u, r.__[1]], r.__c.setState({}));
|
|
352
352
|
}], r.__c = j, !j.__f)) {
|
|
@@ -378,21 +378,21 @@ function yn(t, e, n) {
|
|
|
378
378
|
}
|
|
379
379
|
return r.__N || r.__;
|
|
380
380
|
}
|
|
381
|
-
function
|
|
381
|
+
function R(t, e) {
|
|
382
382
|
var n = Me(ce++, 3);
|
|
383
|
-
!S.__s &&
|
|
383
|
+
!S.__s && jn(n.__H, e) && (n.__ = t, n.u = e, j.__H.__h.push(n));
|
|
384
384
|
}
|
|
385
385
|
function st(t, e) {
|
|
386
386
|
var n = Me(ce++, 4);
|
|
387
|
-
!S.__s &&
|
|
387
|
+
!S.__s && jn(n.__H, e) && (n.__ = t, n.u = e, j.__h.push(n));
|
|
388
388
|
}
|
|
389
389
|
function ue(t) {
|
|
390
|
-
return
|
|
390
|
+
return Ie = 5, J(function() {
|
|
391
391
|
return { current: t };
|
|
392
392
|
}, []);
|
|
393
393
|
}
|
|
394
|
-
function
|
|
395
|
-
|
|
394
|
+
function si(t, e, n) {
|
|
395
|
+
Ie = 6, st(function() {
|
|
396
396
|
if (typeof t == "function") {
|
|
397
397
|
var r = t(e());
|
|
398
398
|
return function() {
|
|
@@ -406,21 +406,21 @@ function ti(t, e, n) {
|
|
|
406
406
|
}
|
|
407
407
|
function J(t, e) {
|
|
408
408
|
var n = Me(ce++, 7);
|
|
409
|
-
return
|
|
409
|
+
return jn(n.__H, e) && (n.__ = t(), n.__H = e, n.__h = t), n.__;
|
|
410
410
|
}
|
|
411
|
-
function
|
|
412
|
-
return
|
|
411
|
+
function Te(t, e) {
|
|
412
|
+
return Ie = 8, J(function() {
|
|
413
413
|
return t;
|
|
414
414
|
}, e);
|
|
415
415
|
}
|
|
416
|
-
function
|
|
416
|
+
function It(t) {
|
|
417
417
|
var e = j.context[t.__c], n = Me(ce++, 9);
|
|
418
418
|
return n.c = t, e ? (n.__ == null && (n.__ = !0, e.sub(j)), e.props.value) : t.__;
|
|
419
419
|
}
|
|
420
|
-
function
|
|
420
|
+
function ai(t, e) {
|
|
421
421
|
S.useDebugValue && S.useDebugValue(e ? e(t) : t);
|
|
422
422
|
}
|
|
423
|
-
function
|
|
423
|
+
function li() {
|
|
424
424
|
var t = Me(ce++, 11);
|
|
425
425
|
if (!t.__) {
|
|
426
426
|
for (var e = j.__v; e !== null && !e.__m && e.__ !== null; ) e = e.__;
|
|
@@ -429,43 +429,43 @@ function ri() {
|
|
|
429
429
|
}
|
|
430
430
|
return t.__;
|
|
431
431
|
}
|
|
432
|
-
function
|
|
433
|
-
for (var t; t =
|
|
434
|
-
t.__H.__h.forEach(gt), t.__H.__h.forEach(
|
|
432
|
+
function Io() {
|
|
433
|
+
for (var t; t = oi.shift(); ) if (t.__P && t.__H) try {
|
|
434
|
+
t.__H.__h.forEach(gt), t.__H.__h.forEach(tn), t.__H.__h = [];
|
|
435
435
|
} catch (e) {
|
|
436
436
|
t.__H.__h = [], S.__e(e, t.__v);
|
|
437
437
|
}
|
|
438
438
|
}
|
|
439
439
|
S.__b = function(t) {
|
|
440
|
-
j = null,
|
|
440
|
+
j = null, Jn && Jn(t);
|
|
441
441
|
}, S.__ = function(t, e) {
|
|
442
|
-
t && e.__k && e.__k.__m && (t.__m = e.__k.__m),
|
|
442
|
+
t && e.__k && e.__k.__m && (t.__m = e.__k.__m), Xn && Xn(t, e);
|
|
443
443
|
}, S.__r = function(t) {
|
|
444
|
-
|
|
444
|
+
Kn && Kn(t), ce = 0;
|
|
445
445
|
var e = (j = t.__c).__H;
|
|
446
|
-
e && (
|
|
446
|
+
e && (Nt === j ? (e.__h = [], j.__h = [], e.__.forEach(function(n) {
|
|
447
447
|
n.__N && (n.__ = n.__N), n.u = n.__N = void 0;
|
|
448
|
-
})) : (e.__h.forEach(gt), e.__h.forEach(
|
|
448
|
+
})) : (e.__h.forEach(gt), e.__h.forEach(tn), e.__h = [], ce = 0)), Nt = j;
|
|
449
449
|
}, S.diffed = function(t) {
|
|
450
|
-
|
|
450
|
+
Zn && Zn(t);
|
|
451
451
|
var e = t.__c;
|
|
452
|
-
e && e.__H && (e.__H.__h.length && (
|
|
452
|
+
e && e.__H && (e.__H.__h.length && (oi.push(e) !== 1 && Wn === S.requestAnimationFrame || ((Wn = S.requestAnimationFrame) || $o)(Io)), e.__H.__.forEach(function(n) {
|
|
453
453
|
n.u && (n.__H = n.u), n.u = void 0;
|
|
454
|
-
})),
|
|
454
|
+
})), Nt = j = null;
|
|
455
455
|
}, S.__c = function(t, e) {
|
|
456
456
|
e.some(function(n) {
|
|
457
457
|
try {
|
|
458
458
|
n.__h.forEach(gt), n.__h = n.__h.filter(function(r) {
|
|
459
|
-
return !r.__ ||
|
|
459
|
+
return !r.__ || tn(r);
|
|
460
460
|
});
|
|
461
461
|
} catch (r) {
|
|
462
462
|
e.some(function(i) {
|
|
463
463
|
i.__h && (i.__h = []);
|
|
464
464
|
}), e = [], S.__e(r, n.__v);
|
|
465
465
|
}
|
|
466
|
-
}),
|
|
466
|
+
}), Gn && Gn(t, e);
|
|
467
467
|
}, S.unmount = function(t) {
|
|
468
|
-
|
|
468
|
+
Yn && Yn(t);
|
|
469
469
|
var e, n = t.__c;
|
|
470
470
|
n && n.__H && (n.__H.__.forEach(function(r) {
|
|
471
471
|
try {
|
|
@@ -475,49 +475,49 @@ S.__b = function(t) {
|
|
|
475
475
|
}
|
|
476
476
|
}), n.__H = void 0, e && S.__e(e, n.__v));
|
|
477
477
|
};
|
|
478
|
-
var
|
|
479
|
-
function
|
|
478
|
+
var er = typeof requestAnimationFrame == "function";
|
|
479
|
+
function $o(t) {
|
|
480
480
|
var e, n = function() {
|
|
481
|
-
clearTimeout(r),
|
|
481
|
+
clearTimeout(r), er && cancelAnimationFrame(e), setTimeout(t);
|
|
482
482
|
}, r = setTimeout(n, 35);
|
|
483
|
-
|
|
483
|
+
er && (e = requestAnimationFrame(n));
|
|
484
484
|
}
|
|
485
485
|
function gt(t) {
|
|
486
486
|
var e = j, n = t.__c;
|
|
487
487
|
typeof n == "function" && (t.__c = void 0, n()), j = e;
|
|
488
488
|
}
|
|
489
|
-
function
|
|
489
|
+
function tn(t) {
|
|
490
490
|
var e = j;
|
|
491
491
|
t.__c = t.__(), j = e;
|
|
492
492
|
}
|
|
493
|
-
function
|
|
493
|
+
function jn(t, e) {
|
|
494
494
|
return !t || t.length !== e.length || e.some(function(n, r) {
|
|
495
495
|
return n !== t[r];
|
|
496
496
|
});
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function ci(t, e) {
|
|
499
499
|
return typeof e == "function" ? e(t) : e;
|
|
500
500
|
}
|
|
501
|
-
function
|
|
501
|
+
function ui(t, e) {
|
|
502
502
|
for (var n in e) t[n] = e[n];
|
|
503
503
|
return t;
|
|
504
504
|
}
|
|
505
|
-
function
|
|
505
|
+
function nn(t, e) {
|
|
506
506
|
for (var n in t) if (n !== "__source" && !(n in e)) return !0;
|
|
507
507
|
for (var r in e) if (r !== "__source" && t[r] !== e[r]) return !0;
|
|
508
508
|
return !1;
|
|
509
509
|
}
|
|
510
|
-
function
|
|
510
|
+
function hi(t, e) {
|
|
511
511
|
var n = e(), r = C({ t: { __: n, u: e } }), i = r[0].t, o = r[1];
|
|
512
512
|
return st(function() {
|
|
513
|
-
i.__ = n, i.u = e,
|
|
514
|
-
}, [t, n, e]),
|
|
515
|
-
return
|
|
516
|
-
|
|
513
|
+
i.__ = n, i.u = e, Qt(i) && o({ t: i });
|
|
514
|
+
}, [t, n, e]), R(function() {
|
|
515
|
+
return Qt(i) && o({ t: i }), t(function() {
|
|
516
|
+
Qt(i) && o({ t: i });
|
|
517
517
|
});
|
|
518
518
|
}, [t]), n;
|
|
519
519
|
}
|
|
520
|
-
function
|
|
520
|
+
function Qt(t) {
|
|
521
521
|
var e, n, r = t.u, i = t.__;
|
|
522
522
|
try {
|
|
523
523
|
var o = r();
|
|
@@ -526,80 +526,80 @@ function Nt(t) {
|
|
|
526
526
|
return !0;
|
|
527
527
|
}
|
|
528
528
|
}
|
|
529
|
-
function
|
|
529
|
+
function di(t) {
|
|
530
530
|
t();
|
|
531
531
|
}
|
|
532
|
-
function
|
|
532
|
+
function pi(t) {
|
|
533
533
|
return t;
|
|
534
534
|
}
|
|
535
|
-
function
|
|
536
|
-
return [!1,
|
|
535
|
+
function fi() {
|
|
536
|
+
return [!1, di];
|
|
537
537
|
}
|
|
538
|
-
var
|
|
539
|
-
function
|
|
538
|
+
var gi = st;
|
|
539
|
+
function rn(t, e) {
|
|
540
540
|
this.props = t, this.context = e;
|
|
541
541
|
}
|
|
542
|
-
function
|
|
542
|
+
function Eo(t, e) {
|
|
543
543
|
function n(i) {
|
|
544
544
|
var o = this.props.ref, s = o == i.ref;
|
|
545
|
-
return !s && o && (o.call ? o(null) : o.current = null), e ? !e(this.props, i) || !s :
|
|
545
|
+
return !s && o && (o.call ? o(null) : o.current = null), e ? !e(this.props, i) || !s : nn(this.props, i);
|
|
546
546
|
}
|
|
547
547
|
function r(i) {
|
|
548
|
-
return this.shouldComponentUpdate = n,
|
|
548
|
+
return this.shouldComponentUpdate = n, D(t, i);
|
|
549
549
|
}
|
|
550
550
|
return r.displayName = "Memo(" + (t.displayName || t.name) + ")", r.prototype.isReactComponent = !0, r.__f = !0, r.type = t, r;
|
|
551
551
|
}
|
|
552
|
-
(
|
|
553
|
-
return
|
|
552
|
+
(rn.prototype = new W()).isPureReactComponent = !0, rn.prototype.shouldComponentUpdate = function(t, e) {
|
|
553
|
+
return nn(this.props, t) || nn(this.state, e);
|
|
554
554
|
};
|
|
555
|
-
var
|
|
555
|
+
var tr = b.__b;
|
|
556
556
|
b.__b = function(t) {
|
|
557
|
-
t.type && t.type.__f && t.ref && (t.props.ref = t.ref, t.ref = null),
|
|
557
|
+
t.type && t.type.__f && t.ref && (t.props.ref = t.ref, t.ref = null), tr && tr(t);
|
|
558
558
|
};
|
|
559
|
-
var
|
|
560
|
-
function
|
|
559
|
+
var Po = typeof Symbol < "u" && Symbol.for && /* @__PURE__ */ Symbol.for("react.forward_ref") || 3911;
|
|
560
|
+
function qo(t) {
|
|
561
561
|
function e(n) {
|
|
562
|
-
var r =
|
|
562
|
+
var r = ui({}, n);
|
|
563
563
|
return delete r.ref, t(r, n.ref || null);
|
|
564
564
|
}
|
|
565
|
-
return e.$$typeof =
|
|
565
|
+
return e.$$typeof = Po, e.render = t, e.prototype.isReactComponent = e.__f = !0, e.displayName = "ForwardRef(" + (t.displayName || t.name) + ")", e;
|
|
566
566
|
}
|
|
567
|
-
var
|
|
567
|
+
var nr = function(t, e) {
|
|
568
568
|
return t == null ? null : te(te(t).map(e));
|
|
569
|
-
},
|
|
569
|
+
}, Mo = { map: nr, forEach: nr, count: function(t) {
|
|
570
570
|
return t ? te(t).length : 0;
|
|
571
571
|
}, only: function(t) {
|
|
572
572
|
var e = te(t);
|
|
573
573
|
if (e.length !== 1) throw "Children.only";
|
|
574
574
|
return e[0];
|
|
575
|
-
}, toArray: te },
|
|
575
|
+
}, toArray: te }, Lo = b.__e;
|
|
576
576
|
b.__e = function(t, e, n, r) {
|
|
577
577
|
if (t.then) {
|
|
578
578
|
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);
|
|
579
579
|
}
|
|
580
|
-
|
|
580
|
+
Lo(t, e, n, r);
|
|
581
581
|
};
|
|
582
|
-
var
|
|
583
|
-
function
|
|
582
|
+
var rr = b.unmount;
|
|
583
|
+
function mi(t, e, n) {
|
|
584
584
|
return t && (t.__c && t.__c.__H && (t.__c.__H.__.forEach(function(r) {
|
|
585
585
|
typeof r.__c == "function" && r.__c();
|
|
586
|
-
}), t.__c.__H = null), (t =
|
|
587
|
-
return
|
|
586
|
+
}), t.__c.__H = null), (t = ui({}, 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) {
|
|
587
|
+
return mi(r, e, n);
|
|
588
588
|
})), t;
|
|
589
589
|
}
|
|
590
|
-
function
|
|
590
|
+
function xi(t, e, n) {
|
|
591
591
|
return t && n && (t.__v = null, t.__k = t.__k && t.__k.map(function(r) {
|
|
592
|
-
return
|
|
592
|
+
return xi(r, e, n);
|
|
593
593
|
}), t.__c && t.__c.__P === e && (t.__e && n.appendChild(t.__e), t.__c.__e = !0, t.__c.__P = n)), t;
|
|
594
594
|
}
|
|
595
595
|
function mt() {
|
|
596
596
|
this.__u = 0, this.o = null, this.__b = null;
|
|
597
597
|
}
|
|
598
|
-
function
|
|
598
|
+
function bi(t) {
|
|
599
599
|
var e = t.__.__c;
|
|
600
600
|
return e && e.__a && e.__a(t);
|
|
601
601
|
}
|
|
602
|
-
function
|
|
602
|
+
function Oo(t) {
|
|
603
603
|
var e, n, r;
|
|
604
604
|
function i(o) {
|
|
605
605
|
if (e || (e = t()).then(function(s) {
|
|
@@ -608,7 +608,7 @@ function Eo(t) {
|
|
|
608
608
|
r = s;
|
|
609
609
|
}), r) throw r;
|
|
610
610
|
if (!n) throw e;
|
|
611
|
-
return
|
|
611
|
+
return D(n, o);
|
|
612
612
|
}
|
|
613
613
|
return i.displayName = "Lazy", i.__f = !0, i;
|
|
614
614
|
}
|
|
@@ -617,11 +617,11 @@ function De() {
|
|
|
617
617
|
}
|
|
618
618
|
b.unmount = function(t) {
|
|
619
619
|
var e = t.__c;
|
|
620
|
-
e && e.__R && e.__R(), e && 32 & t.__u && (t.type = null),
|
|
620
|
+
e && e.__R && e.__R(), e && 32 & t.__u && (t.type = null), rr && rr(t);
|
|
621
621
|
}, (mt.prototype = new W()).__c = function(t, e) {
|
|
622
622
|
var n = e.__c, r = this;
|
|
623
623
|
r.o == null && (r.o = []), r.o.push(n);
|
|
624
|
-
var i =
|
|
624
|
+
var i = bi(r.__v), o = !1, s = function() {
|
|
625
625
|
o || (o = !0, n.__R = null, i ? i(l) : l());
|
|
626
626
|
};
|
|
627
627
|
n.__R = s;
|
|
@@ -629,7 +629,7 @@ b.unmount = function(t) {
|
|
|
629
629
|
if (!--r.__u) {
|
|
630
630
|
if (r.state.__a) {
|
|
631
631
|
var a = r.state.__a;
|
|
632
|
-
r.__v.__k[0] =
|
|
632
|
+
r.__v.__k[0] = xi(a, a.__c.__P, a.__c.__O);
|
|
633
633
|
}
|
|
634
634
|
var u;
|
|
635
635
|
for (r.setState({ __a: r.__b = null }); u = r.o.pop(); ) u.forceUpdate();
|
|
@@ -642,26 +642,26 @@ b.unmount = function(t) {
|
|
|
642
642
|
if (this.__b) {
|
|
643
643
|
if (this.__v.__k) {
|
|
644
644
|
var n = document.createElement("div"), r = this.__v.__k[0].__c;
|
|
645
|
-
this.__v.__k[0] =
|
|
645
|
+
this.__v.__k[0] = mi(this.__b, n, r.__O = r.__P);
|
|
646
646
|
}
|
|
647
647
|
this.__b = null;
|
|
648
648
|
}
|
|
649
|
-
var i = e.__a &&
|
|
650
|
-
return i && (i.__u &= -33), [
|
|
649
|
+
var i = e.__a && D(Q, null, t.fallback);
|
|
650
|
+
return i && (i.__u &= -33), [D(Q, null, e.__a ? null : t.children), i];
|
|
651
651
|
};
|
|
652
|
-
var
|
|
652
|
+
var ir = function(t, e, n) {
|
|
653
653
|
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; ) {
|
|
654
654
|
for (; n.length > 3; ) n.pop()();
|
|
655
655
|
if (n[1] < n[0]) break;
|
|
656
656
|
t.i = n = n[2];
|
|
657
657
|
}
|
|
658
658
|
};
|
|
659
|
-
function
|
|
659
|
+
function zo(t) {
|
|
660
660
|
return this.getChildContext = function() {
|
|
661
661
|
return t.context;
|
|
662
662
|
}, t.children;
|
|
663
663
|
}
|
|
664
|
-
function
|
|
664
|
+
function No(t) {
|
|
665
665
|
var e = this, n = t.h;
|
|
666
666
|
if (e.componentWillUnmount = function() {
|
|
667
667
|
ge(null, e.v), e.v = null, e.h = null;
|
|
@@ -675,17 +675,17 @@ function Mo(t) {
|
|
|
675
675
|
this.childNodes.splice(this.childNodes.indexOf(i) >>> 1, 1), e.h.removeChild(i);
|
|
676
676
|
} };
|
|
677
677
|
}
|
|
678
|
-
ge(
|
|
678
|
+
ge(D(zo, { context: e.context }, t.__v), e.v);
|
|
679
679
|
}
|
|
680
|
-
function
|
|
681
|
-
var n =
|
|
680
|
+
function Qo(t, e) {
|
|
681
|
+
var n = D(No, { __v: t, h: e });
|
|
682
682
|
return n.containerInfo = e, n;
|
|
683
683
|
}
|
|
684
684
|
(De.prototype = new W()).__a = function(t) {
|
|
685
|
-
var e = this, n =
|
|
685
|
+
var e = this, n = bi(e.__v), r = e.l.get(t);
|
|
686
686
|
return r[0]++, function(i) {
|
|
687
687
|
var o = function() {
|
|
688
|
-
e.props.revealOrder ? (r.push(i),
|
|
688
|
+
e.props.revealOrder ? (r.push(i), ir(e, t, r)) : i();
|
|
689
689
|
};
|
|
690
690
|
n ? n(o) : o();
|
|
691
691
|
};
|
|
@@ -698,17 +698,17 @@ function Po(t, e) {
|
|
|
698
698
|
}, De.prototype.componentDidUpdate = De.prototype.componentDidMount = function() {
|
|
699
699
|
var t = this;
|
|
700
700
|
this.l.forEach(function(e, n) {
|
|
701
|
-
|
|
701
|
+
ir(t, n, e);
|
|
702
702
|
});
|
|
703
703
|
};
|
|
704
|
-
var
|
|
704
|
+
var vi = typeof Symbol < "u" && Symbol.for && /* @__PURE__ */ Symbol.for("react.element") || 60103, Uo = /^(?: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]/, Fo = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, Do = /[A-Z0-9]/g, Bo = typeof document < "u", Vo = function(t) {
|
|
705
705
|
return (typeof Symbol < "u" && typeof /* @__PURE__ */ Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(t);
|
|
706
706
|
};
|
|
707
|
-
function
|
|
707
|
+
function Ho(t, e, n) {
|
|
708
708
|
return e.__k == null && (e.textContent = ""), ge(t, e), typeof n == "function" && n(), t ? t.__c : null;
|
|
709
709
|
}
|
|
710
|
-
function
|
|
711
|
-
return
|
|
710
|
+
function Wo(t, e, n) {
|
|
711
|
+
return ii(t, e), typeof n == "function" && n(), t ? t.__c : null;
|
|
712
712
|
}
|
|
713
713
|
W.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(t) {
|
|
714
714
|
Object.defineProperty(W.prototype, t, { configurable: !0, get: function() {
|
|
@@ -717,82 +717,82 @@ W.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveP
|
|
|
717
717
|
Object.defineProperty(this, t, { configurable: !0, writable: !0, value: e });
|
|
718
718
|
} });
|
|
719
719
|
});
|
|
720
|
-
var
|
|
721
|
-
function
|
|
720
|
+
var or = b.event;
|
|
721
|
+
function Jo() {
|
|
722
722
|
}
|
|
723
|
-
function
|
|
723
|
+
function Ko() {
|
|
724
724
|
return this.cancelBubble;
|
|
725
725
|
}
|
|
726
|
-
function
|
|
726
|
+
function Zo() {
|
|
727
727
|
return this.defaultPrevented;
|
|
728
728
|
}
|
|
729
729
|
b.event = function(t) {
|
|
730
|
-
return
|
|
730
|
+
return or && (t = or(t)), t.persist = Jo, t.isPropagationStopped = Ko, t.isDefaultPrevented = Zo, t.nativeEvent = t;
|
|
731
731
|
};
|
|
732
|
-
var
|
|
732
|
+
var Sn, Go = { enumerable: !1, configurable: !0, get: function() {
|
|
733
733
|
return this.class;
|
|
734
|
-
} },
|
|
734
|
+
} }, sr = b.vnode;
|
|
735
735
|
b.vnode = function(t) {
|
|
736
736
|
typeof t.type == "string" && (function(e) {
|
|
737
737
|
var n = e.props, r = e.type, i = {}, o = r.indexOf("-") === -1;
|
|
738
738
|
for (var s in n) {
|
|
739
739
|
var l = n[s];
|
|
740
|
-
if (!(s === "value" && "defaultValue" in n && l == null ||
|
|
740
|
+
if (!(s === "value" && "defaultValue" in n && l == null || Bo && s === "children" && r === "noscript" || s === "class" || s === "className")) {
|
|
741
741
|
var a = s.toLowerCase();
|
|
742
|
-
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" ||
|
|
742
|
+
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" || Vo(n.type) ? a === "onfocus" ? s = "onfocusin" : a === "onblur" ? s = "onfocusout" : Fo.test(s) && (s = a) : a = s = "oninput" : o && Uo.test(s) ? s = s.replace(Do, "-$&").toLowerCase() : l === null && (l = void 0), a === "oninput" && i[s = a] && (s = "oninputCapture"), i[s] = l;
|
|
743
743
|
}
|
|
744
744
|
}
|
|
745
745
|
r == "select" && i.multiple && Array.isArray(i.value) && (i.value = te(n.children).forEach(function(u) {
|
|
746
746
|
u.props.selected = i.value.indexOf(u.props.value) != -1;
|
|
747
747
|
})), r == "select" && i.defaultValue != null && (i.value = te(n.children).forEach(function(u) {
|
|
748
748
|
u.props.selected = i.multiple ? i.defaultValue.indexOf(u.props.value) != -1 : i.defaultValue == u.props.value;
|
|
749
|
-
})), n.class && !n.className ? (i.class = n.class, Object.defineProperty(i, "className",
|
|
750
|
-
})(t), t.$$typeof =
|
|
749
|
+
})), n.class && !n.className ? (i.class = n.class, Object.defineProperty(i, "className", Go)) : (n.className && !n.class || n.class && n.className) && (i.class = i.className = n.className), e.props = i;
|
|
750
|
+
})(t), t.$$typeof = vi, sr && sr(t);
|
|
751
751
|
};
|
|
752
|
-
var
|
|
752
|
+
var ar = b.__r;
|
|
753
753
|
b.__r = function(t) {
|
|
754
|
-
|
|
754
|
+
ar && ar(t), Sn = t.__c;
|
|
755
755
|
};
|
|
756
|
-
var
|
|
756
|
+
var lr = b.diffed;
|
|
757
757
|
b.diffed = function(t) {
|
|
758
|
-
|
|
758
|
+
lr && lr(t);
|
|
759
759
|
var e = t.props, n = t.__e;
|
|
760
|
-
n != null && t.type === "textarea" && "value" in e && e.value !== n.value && (n.value = e.value == null ? "" : e.value),
|
|
760
|
+
n != null && t.type === "textarea" && "value" in e && e.value !== n.value && (n.value = e.value == null ? "" : e.value), Sn = null;
|
|
761
761
|
};
|
|
762
|
-
var
|
|
763
|
-
return
|
|
764
|
-
}, useCallback:
|
|
765
|
-
function
|
|
766
|
-
return
|
|
762
|
+
var Yo = { ReactCurrentDispatcher: { current: { readContext: function(t) {
|
|
763
|
+
return Sn.__n[t.__c].props.value;
|
|
764
|
+
}, useCallback: Te, useContext: It, useDebugValue: ai, useDeferredValue: pi, useEffect: R, useId: li, useImperativeHandle: si, useInsertionEffect: gi, useLayoutEffect: st, useMemo: J, useReducer: _n, useRef: ue, useState: C, useSyncExternalStore: hi, useTransition: fi } } };
|
|
765
|
+
function Xo(t) {
|
|
766
|
+
return D.bind(null, t);
|
|
767
767
|
}
|
|
768
|
-
function
|
|
769
|
-
return !!t && t.$$typeof ===
|
|
768
|
+
function $t(t) {
|
|
769
|
+
return !!t && t.$$typeof === vi;
|
|
770
770
|
}
|
|
771
|
-
function
|
|
772
|
-
return
|
|
771
|
+
function es(t) {
|
|
772
|
+
return $t(t) && t.type === Q;
|
|
773
773
|
}
|
|
774
|
-
function
|
|
774
|
+
function ts(t) {
|
|
775
775
|
return !!t && !!t.displayName && (typeof t.displayName == "string" || t.displayName instanceof String) && t.displayName.startsWith("Memo(");
|
|
776
776
|
}
|
|
777
|
-
function
|
|
778
|
-
return
|
|
777
|
+
function ns(t) {
|
|
778
|
+
return $t(t) ? Ro.apply(null, arguments) : t;
|
|
779
779
|
}
|
|
780
|
-
function
|
|
780
|
+
function rs(t) {
|
|
781
781
|
return !!t.__k && (ge(null, t), !0);
|
|
782
782
|
}
|
|
783
|
-
function
|
|
783
|
+
function is(t) {
|
|
784
784
|
return t && (t.base || t.nodeType === 1 && t) || null;
|
|
785
785
|
}
|
|
786
|
-
var
|
|
786
|
+
var os = function(t, e) {
|
|
787
787
|
return t(e);
|
|
788
|
-
},
|
|
788
|
+
}, ss = function(t, e) {
|
|
789
789
|
return t(e);
|
|
790
|
-
},
|
|
791
|
-
for (var we = 0,
|
|
792
|
-
X[we] =
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
function
|
|
790
|
+
}, as = Q, ls = $t, Cn = { useState: C, useId: li, useReducer: _n, useEffect: R, useLayoutEffect: st, useInsertionEffect: gi, useTransition: fi, useDeferredValue: pi, useSyncExternalStore: hi, startTransition: di, useRef: ue, useImperativeHandle: si, useMemo: J, useCallback: Te, useContext: It, useDebugValue: ai, version: "18.3.1", Children: Mo, render: Ho, hydrate: Wo, unmountComponentAtNode: rs, createPortal: Qo, createElement: D, createContext: To, createFactory: Xo, cloneElement: ns, createRef: wo, Fragment: Q, isValidElement: $t, isElement: ls, isFragment: es, isMemo: ts, findDOMNode: is, Component: W, PureComponent: rn, memo: Eo, forwardRef: qo, flushSync: ss, unstable_batchedUpdates: os, StrictMode: as, Suspense: mt, SuspenseList: De, lazy: Oo, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Yo }, X = [], F = [], cs = Uint8Array, Ut = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
791
|
+
for (var we = 0, us = Ut.length; we < us; ++we)
|
|
792
|
+
X[we] = Ut[we], F[Ut.charCodeAt(we)] = we;
|
|
793
|
+
F[45] = 62;
|
|
794
|
+
F[95] = 63;
|
|
795
|
+
function hs(t) {
|
|
796
796
|
var e = t.length;
|
|
797
797
|
if (e % 4 > 0)
|
|
798
798
|
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
@@ -801,27 +801,27 @@ function ss(t) {
|
|
|
801
801
|
var r = n === e ? 0 : 4 - n % 4;
|
|
802
802
|
return [n, r];
|
|
803
803
|
}
|
|
804
|
-
function
|
|
804
|
+
function ds(t, e, n) {
|
|
805
805
|
return (e + n) * 3 / 4 - n;
|
|
806
806
|
}
|
|
807
807
|
function Ye(t) {
|
|
808
|
-
var e, n =
|
|
808
|
+
var e, n = hs(t), r = n[0], i = n[1], o = new cs(ds(t, r, i)), s = 0, l = i > 0 ? r - 4 : r, a;
|
|
809
809
|
for (a = 0; a < l; a += 4)
|
|
810
|
-
e =
|
|
811
|
-
return i === 2 && (e =
|
|
810
|
+
e = F[t.charCodeAt(a)] << 18 | F[t.charCodeAt(a + 1)] << 12 | F[t.charCodeAt(a + 2)] << 6 | F[t.charCodeAt(a + 3)], o[s++] = e >> 16 & 255, o[s++] = e >> 8 & 255, o[s++] = e & 255;
|
|
811
|
+
return i === 2 && (e = F[t.charCodeAt(a)] << 2 | F[t.charCodeAt(a + 1)] >> 4, o[s++] = e & 255), i === 1 && (e = F[t.charCodeAt(a)] << 10 | F[t.charCodeAt(a + 1)] << 4 | F[t.charCodeAt(a + 2)] >> 2, o[s++] = e >> 8 & 255, o[s++] = e & 255), o;
|
|
812
812
|
}
|
|
813
|
-
function
|
|
813
|
+
function ps(t) {
|
|
814
814
|
return X[t >> 18 & 63] + X[t >> 12 & 63] + X[t >> 6 & 63] + X[t & 63];
|
|
815
815
|
}
|
|
816
|
-
function
|
|
816
|
+
function fs(t, e, n) {
|
|
817
817
|
for (var r, i = [], o = e; o < n; o += 3)
|
|
818
|
-
r = (t[o] << 16 & 16711680) + (t[o + 1] << 8 & 65280) + (t[o + 2] & 255), i.push(
|
|
818
|
+
r = (t[o] << 16 & 16711680) + (t[o + 1] << 8 & 65280) + (t[o + 2] & 255), i.push(ps(r));
|
|
819
819
|
return i.join("");
|
|
820
820
|
}
|
|
821
821
|
function Xe(t) {
|
|
822
822
|
for (var e, n = t.length, r = n % 3, i = [], o = 16383, s = 0, l = n - r; s < l; s += o)
|
|
823
823
|
i.push(
|
|
824
|
-
|
|
824
|
+
fs(
|
|
825
825
|
t,
|
|
826
826
|
s,
|
|
827
827
|
s + o > l ? l : s + o
|
|
@@ -834,13 +834,13 @@ function Xe(t) {
|
|
|
834
834
|
function ie(t) {
|
|
835
835
|
if (t === void 0)
|
|
836
836
|
return {};
|
|
837
|
-
if (!
|
|
837
|
+
if (!yi(t))
|
|
838
838
|
throw new Error(
|
|
839
839
|
`The arguments to a Convex function must be an object. Received: ${t}`
|
|
840
840
|
);
|
|
841
841
|
return t;
|
|
842
842
|
}
|
|
843
|
-
function
|
|
843
|
+
function gs(t) {
|
|
844
844
|
if (typeof t > "u")
|
|
845
845
|
throw new Error(
|
|
846
846
|
"Client created with undefined deployment address. If you used an environment variable, check that it's set."
|
|
@@ -865,46 +865,46 @@ function us(t) {
|
|
|
865
865
|
`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.`
|
|
866
866
|
);
|
|
867
867
|
}
|
|
868
|
-
function
|
|
868
|
+
function yi(t) {
|
|
869
869
|
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
|
|
870
870
|
// conditions but are still simple objects.
|
|
871
871
|
n?.constructor?.name === "Object";
|
|
872
872
|
return e && r;
|
|
873
873
|
}
|
|
874
|
-
const
|
|
875
|
-
function
|
|
874
|
+
const ki = !0, $e = BigInt("-9223372036854775808"), Rn = BigInt("9223372036854775807"), on = BigInt("0"), ms = BigInt("8"), xs = BigInt("256");
|
|
875
|
+
function wi(t) {
|
|
876
876
|
return Number.isNaN(t) || !Number.isFinite(t) || Object.is(t, -0);
|
|
877
877
|
}
|
|
878
|
-
function
|
|
879
|
-
t <
|
|
878
|
+
function bs(t) {
|
|
879
|
+
t < on && (t -= $e + $e);
|
|
880
880
|
let e = t.toString(16);
|
|
881
881
|
e.length % 2 === 1 && (e = "0" + e);
|
|
882
882
|
const n = new Uint8Array(new ArrayBuffer(8));
|
|
883
883
|
let r = 0;
|
|
884
884
|
for (const i of e.match(/.{2}/g).reverse())
|
|
885
|
-
n.set([parseInt(i, 16)], r++), t >>=
|
|
885
|
+
n.set([parseInt(i, 16)], r++), t >>= ms;
|
|
886
886
|
return Xe(n);
|
|
887
887
|
}
|
|
888
|
-
function
|
|
888
|
+
function vs(t) {
|
|
889
889
|
const e = Ye(t);
|
|
890
890
|
if (e.byteLength !== 8)
|
|
891
891
|
throw new Error(
|
|
892
892
|
`Received ${e.byteLength} bytes, expected 8 for $integer`
|
|
893
893
|
);
|
|
894
|
-
let n =
|
|
894
|
+
let n = on, r = on;
|
|
895
895
|
for (const i of e)
|
|
896
|
-
n += BigInt(i) *
|
|
897
|
-
return n >
|
|
896
|
+
n += BigInt(i) * xs ** r, r++;
|
|
897
|
+
return n > Rn && (n += $e + $e), n;
|
|
898
898
|
}
|
|
899
|
-
function
|
|
900
|
-
if (t <
|
|
899
|
+
function ys(t) {
|
|
900
|
+
if (t < $e || Rn < t)
|
|
901
901
|
throw new Error(
|
|
902
902
|
`BigInt ${t} does not fit into a 64-bit signed integer.`
|
|
903
903
|
);
|
|
904
904
|
const e = new ArrayBuffer(8);
|
|
905
905
|
return new DataView(e).setBigInt64(0, t, !0), Xe(new Uint8Array(e));
|
|
906
906
|
}
|
|
907
|
-
function
|
|
907
|
+
function ks(t) {
|
|
908
908
|
const e = Ye(t);
|
|
909
909
|
if (e.byteLength !== 8)
|
|
910
910
|
throw new Error(
|
|
@@ -912,11 +912,11 @@ function ms(t) {
|
|
|
912
912
|
);
|
|
913
913
|
return new DataView(e.buffer).getBigInt64(0, !0);
|
|
914
914
|
}
|
|
915
|
-
const
|
|
916
|
-
function
|
|
917
|
-
if (t.length >
|
|
915
|
+
const ws = DataView.prototype.setBigInt64 ? ys : bs, _s = DataView.prototype.getBigInt64 ? ks : vs, cr = 1024;
|
|
916
|
+
function _i(t) {
|
|
917
|
+
if (t.length > cr)
|
|
918
918
|
throw new Error(
|
|
919
|
-
`Field name ${t} exceeds maximum field name length ${
|
|
919
|
+
`Field name ${t} exceeds maximum field name length ${cr}.`
|
|
920
920
|
);
|
|
921
921
|
if (t.startsWith("$"))
|
|
922
922
|
throw new Error(`Field name ${t} starts with a '$', which is reserved.`);
|
|
@@ -928,11 +928,11 @@ function bi(t) {
|
|
|
928
928
|
);
|
|
929
929
|
}
|
|
930
930
|
}
|
|
931
|
-
function
|
|
931
|
+
function Ee(t) {
|
|
932
932
|
if (t === null || typeof t == "boolean" || typeof t == "number" || typeof t == "string")
|
|
933
933
|
return t;
|
|
934
934
|
if (Array.isArray(t))
|
|
935
|
-
return t.map((r) =>
|
|
935
|
+
return t.map((r) => Ee(r));
|
|
936
936
|
if (typeof t != "object")
|
|
937
937
|
throw new Error(`Unexpected type of ${t}`);
|
|
938
938
|
const e = Object.entries(t);
|
|
@@ -946,7 +946,7 @@ function $e(t) {
|
|
|
946
946
|
if (r === "$integer") {
|
|
947
947
|
if (typeof t.$integer != "string")
|
|
948
948
|
throw new Error(`Malformed $integer field on ${t}`);
|
|
949
|
-
return
|
|
949
|
+
return _s(t.$integer);
|
|
950
950
|
}
|
|
951
951
|
if (r === "$float") {
|
|
952
952
|
if (typeof t.$float != "string")
|
|
@@ -956,8 +956,8 @@ function $e(t) {
|
|
|
956
956
|
throw new Error(
|
|
957
957
|
`Received ${i.byteLength} bytes, expected 8 for $float`
|
|
958
958
|
);
|
|
959
|
-
const o = new DataView(i.buffer).getFloat64(0,
|
|
960
|
-
if (!
|
|
959
|
+
const o = new DataView(i.buffer).getFloat64(0, ki);
|
|
960
|
+
if (!wi(o))
|
|
961
961
|
throw new Error(`Float ${o} should be encoded as a number`);
|
|
962
962
|
return o;
|
|
963
963
|
}
|
|
@@ -972,21 +972,21 @@ function $e(t) {
|
|
|
972
972
|
}
|
|
973
973
|
const n = {};
|
|
974
974
|
for (const [r, i] of Object.entries(t))
|
|
975
|
-
|
|
975
|
+
_i(r), n[r] = Ee(i);
|
|
976
976
|
return n;
|
|
977
977
|
}
|
|
978
|
-
const
|
|
978
|
+
const ur = 16384;
|
|
979
979
|
function We(t) {
|
|
980
980
|
const e = JSON.stringify(t, (n, r) => r === void 0 ? "undefined" : typeof r == "bigint" ? `${r.toString()}n` : r);
|
|
981
|
-
if (e.length >
|
|
981
|
+
if (e.length > ur) {
|
|
982
982
|
const n = "[...truncated]";
|
|
983
|
-
let r =
|
|
983
|
+
let r = ur - n.length;
|
|
984
984
|
const i = e.codePointAt(r - 1);
|
|
985
985
|
return i !== void 0 && i > 65535 && (r -= 1), e.substring(0, r) + n;
|
|
986
986
|
}
|
|
987
987
|
return e;
|
|
988
988
|
}
|
|
989
|
-
function
|
|
989
|
+
function sn(t, e, n, r) {
|
|
990
990
|
if (t === void 0) {
|
|
991
991
|
const s = n && ` (present at path ${n} in original object ${We(
|
|
992
992
|
e
|
|
@@ -998,16 +998,16 @@ function on(t, e, n, r) {
|
|
|
998
998
|
if (t === null)
|
|
999
999
|
return t;
|
|
1000
1000
|
if (typeof t == "bigint") {
|
|
1001
|
-
if (t <
|
|
1001
|
+
if (t < $e || Rn < t)
|
|
1002
1002
|
throw new Error(
|
|
1003
1003
|
`BigInt ${t} does not fit into a 64-bit signed integer.`
|
|
1004
1004
|
);
|
|
1005
|
-
return { $integer:
|
|
1005
|
+
return { $integer: ws(t) };
|
|
1006
1006
|
}
|
|
1007
1007
|
if (typeof t == "number")
|
|
1008
|
-
if (
|
|
1008
|
+
if (wi(t)) {
|
|
1009
1009
|
const s = new ArrayBuffer(8);
|
|
1010
|
-
return new DataView(s).setFloat64(0, t,
|
|
1010
|
+
return new DataView(s).setFloat64(0, t, ki), { $float: Xe(new Uint8Array(s)) };
|
|
1011
1011
|
} else
|
|
1012
1012
|
return t;
|
|
1013
1013
|
if (typeof t == "boolean" || typeof t == "string")
|
|
@@ -1016,7 +1016,7 @@ function on(t, e, n, r) {
|
|
|
1016
1016
|
return { $bytes: Xe(new Uint8Array(t)) };
|
|
1017
1017
|
if (Array.isArray(t))
|
|
1018
1018
|
return t.map(
|
|
1019
|
-
(s, l) =>
|
|
1019
|
+
(s, l) => sn(s, e, n + `[${l}]`)
|
|
1020
1020
|
);
|
|
1021
1021
|
if (t instanceof Set)
|
|
1022
1022
|
throw new Error(
|
|
@@ -1026,7 +1026,7 @@ function on(t, e, n, r) {
|
|
|
1026
1026
|
throw new Error(
|
|
1027
1027
|
Ft(n, "Map", [...t], e)
|
|
1028
1028
|
);
|
|
1029
|
-
if (!
|
|
1029
|
+
if (!yi(t)) {
|
|
1030
1030
|
const s = t?.constructor?.name, l = s ? `${s} ` : "";
|
|
1031
1031
|
throw new Error(
|
|
1032
1032
|
Ft(n, l, t, e)
|
|
@@ -1035,7 +1035,7 @@ function on(t, e, n, r) {
|
|
|
1035
1035
|
const i = {}, o = Object.entries(t);
|
|
1036
1036
|
o.sort(([s, l], [a, u]) => s === a ? 0 : s < a ? -1 : 1);
|
|
1037
1037
|
for (const [s, l] of o)
|
|
1038
|
-
l !== void 0 && (
|
|
1038
|
+
l !== void 0 && (_i(s), i[s] = sn(l, e, n + `.${s}`));
|
|
1039
1039
|
return i;
|
|
1040
1040
|
}
|
|
1041
1041
|
function Ft(t, e, n, r) {
|
|
@@ -1048,22 +1048,22 @@ function Ft(t, e, n, r) {
|
|
|
1048
1048
|
)} is not a supported Convex type.`;
|
|
1049
1049
|
}
|
|
1050
1050
|
function ne(t) {
|
|
1051
|
-
return
|
|
1051
|
+
return sn(t, t, "");
|
|
1052
1052
|
}
|
|
1053
|
-
var
|
|
1054
|
-
const
|
|
1055
|
-
class vt extends (
|
|
1053
|
+
var js = Object.defineProperty, Ss = (t, e, n) => e in t ? js(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Dt = (t, e, n) => Ss(t, typeof e != "symbol" ? e + "" : e, n), hr, dr;
|
|
1054
|
+
const Cs = /* @__PURE__ */ Symbol.for("ConvexError");
|
|
1055
|
+
class vt extends (dr = Error, hr = Cs, dr) {
|
|
1056
1056
|
constructor(e) {
|
|
1057
|
-
super(typeof e == "string" ? e : We(e)), Dt(this, "name", "ConvexError"), Dt(this, "data"), Dt(this,
|
|
1057
|
+
super(typeof e == "string" ? e : We(e)), Dt(this, "name", "ConvexError"), Dt(this, "data"), Dt(this, hr, !0), this.data = e;
|
|
1058
1058
|
}
|
|
1059
1059
|
}
|
|
1060
|
-
const
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
const
|
|
1064
|
-
var
|
|
1065
|
-
const
|
|
1066
|
-
function
|
|
1060
|
+
const ji = () => Array.from({ length: 4 }, () => 0);
|
|
1061
|
+
ji();
|
|
1062
|
+
ji();
|
|
1063
|
+
const pr = "1.39.1";
|
|
1064
|
+
var Rs = Object.defineProperty, Ts = (t, e, n) => e in t ? Rs(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, fr = (t, e, n) => Ts(t, typeof e != "symbol" ? e + "" : e, n);
|
|
1065
|
+
const As = "color:rgb(0, 145, 255)";
|
|
1066
|
+
function Si(t) {
|
|
1067
1067
|
switch (t) {
|
|
1068
1068
|
case "query":
|
|
1069
1069
|
return "Q";
|
|
@@ -1075,9 +1075,9 @@ function yi(t) {
|
|
|
1075
1075
|
return "?";
|
|
1076
1076
|
}
|
|
1077
1077
|
}
|
|
1078
|
-
class
|
|
1078
|
+
class Ci {
|
|
1079
1079
|
constructor(e) {
|
|
1080
|
-
|
|
1080
|
+
fr(this, "_onLogLineFuncs"), fr(this, "_verbose"), this._onLogLineFuncs = {}, this._verbose = e.verbose;
|
|
1081
1081
|
}
|
|
1082
1082
|
addLogLineListener(e) {
|
|
1083
1083
|
let n = Math.random().toString(36).substring(2, 15);
|
|
@@ -1105,8 +1105,8 @@ class ki {
|
|
|
1105
1105
|
n("error", ...e);
|
|
1106
1106
|
}
|
|
1107
1107
|
}
|
|
1108
|
-
function
|
|
1109
|
-
const e = new
|
|
1108
|
+
function Ri(t) {
|
|
1109
|
+
const e = new Ci(t);
|
|
1110
1110
|
return e.addLogLineListener((n, ...r) => {
|
|
1111
1111
|
switch (n) {
|
|
1112
1112
|
case "debug":
|
|
@@ -1126,11 +1126,11 @@ function wi(t) {
|
|
|
1126
1126
|
}
|
|
1127
1127
|
}), e;
|
|
1128
1128
|
}
|
|
1129
|
-
function
|
|
1130
|
-
return new
|
|
1129
|
+
function Ti(t) {
|
|
1130
|
+
return new Ci(t);
|
|
1131
1131
|
}
|
|
1132
1132
|
function yt(t, e, n, r, i) {
|
|
1133
|
-
const o =
|
|
1133
|
+
const o = Si(n);
|
|
1134
1134
|
if (typeof i == "object" && (i = `ConvexError ${JSON.stringify(i.errorData, null, 2)}`), e === "info") {
|
|
1135
1135
|
const s = i.match(/^\[.*?\] /);
|
|
1136
1136
|
if (s === null) {
|
|
@@ -1140,19 +1140,19 @@ function yt(t, e, n, r, i) {
|
|
|
1140
1140
|
return;
|
|
1141
1141
|
}
|
|
1142
1142
|
const l = i.slice(1, s[0].length - 2), a = i.slice(s[0].length);
|
|
1143
|
-
t.log(`%c[CONVEX ${o}(${r})] [${l}]`,
|
|
1143
|
+
t.log(`%c[CONVEX ${o}(${r})] [${l}]`, As, a);
|
|
1144
1144
|
} else
|
|
1145
1145
|
t.error(`[CONVEX ${o}(${r})] ${i}`);
|
|
1146
1146
|
}
|
|
1147
|
-
function
|
|
1147
|
+
function Is(t, e) {
|
|
1148
1148
|
const n = `[CONVEX FATAL ERROR] ${e}`;
|
|
1149
1149
|
return t.error(n), new Error(n);
|
|
1150
1150
|
}
|
|
1151
1151
|
function Ce(t, e, n) {
|
|
1152
|
-
return `[CONVEX ${
|
|
1152
|
+
return `[CONVEX ${Si(t)}(${e})] ${n.errorMessage}
|
|
1153
1153
|
Called by client`;
|
|
1154
1154
|
}
|
|
1155
|
-
function
|
|
1155
|
+
function an(t, e) {
|
|
1156
1156
|
return e.data = t.errorData, e;
|
|
1157
1157
|
}
|
|
1158
1158
|
function me(t) {
|
|
@@ -1166,7 +1166,7 @@ function pe(t, e) {
|
|
|
1166
1166
|
args: ne(e)
|
|
1167
1167
|
});
|
|
1168
1168
|
}
|
|
1169
|
-
function
|
|
1169
|
+
function gr(t, e, n) {
|
|
1170
1170
|
const { initialNumItems: r, id: i } = n;
|
|
1171
1171
|
return JSON.stringify({
|
|
1172
1172
|
type: "paginated",
|
|
@@ -1175,8 +1175,8 @@ function dr(t, e, n) {
|
|
|
1175
1175
|
options: ne({ initialNumItems: r, id: i })
|
|
1176
1176
|
});
|
|
1177
1177
|
}
|
|
1178
|
-
var
|
|
1179
|
-
class
|
|
1178
|
+
var $s = Object.defineProperty, Es = (t, e, n) => e in t ? $s(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, G = (t, e, n) => Es(t, typeof e != "symbol" ? e + "" : e, n);
|
|
1179
|
+
class Ps {
|
|
1180
1180
|
constructor() {
|
|
1181
1181
|
G(this, "nextQueryId"), G(this, "querySetVersion"), G(this, "querySet"), G(this, "queryIdToToken"), G(this, "identityVersion"), G(this, "auth"), G(this, "outstandingQueriesOlderThanRestart"), G(this, "outstandingAuthOlderThanRestart"), G(this, "paused"), G(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();
|
|
1182
1182
|
}
|
|
@@ -1381,8 +1381,8 @@ class Ts {
|
|
|
1381
1381
|
}
|
|
1382
1382
|
}
|
|
1383
1383
|
}
|
|
1384
|
-
var
|
|
1385
|
-
class
|
|
1384
|
+
var qs = Object.defineProperty, Ms = (t, e, n) => e in t ? qs(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, ht = (t, e, n) => Ms(t, typeof e != "symbol" ? e + "" : e, n);
|
|
1385
|
+
class Ls {
|
|
1386
1386
|
constructor(e, n) {
|
|
1387
1387
|
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();
|
|
1388
1388
|
}
|
|
@@ -1415,14 +1415,14 @@ class $s {
|
|
|
1415
1415
|
s = {
|
|
1416
1416
|
success: !0,
|
|
1417
1417
|
logLines: e.logLines,
|
|
1418
|
-
value:
|
|
1418
|
+
value: Ee(e.result)
|
|
1419
1419
|
}, l = () => o.onResult(s);
|
|
1420
1420
|
else {
|
|
1421
1421
|
const a = e.result, { errorData: u } = e;
|
|
1422
1422
|
yt(this.logger, "error", r, i, a), s = {
|
|
1423
1423
|
success: !1,
|
|
1424
1424
|
errorMessage: a,
|
|
1425
|
-
errorData: u !== void 0 ?
|
|
1425
|
+
errorData: u !== void 0 ? Ee(u) : void 0,
|
|
1426
1426
|
logLines: e.logLines
|
|
1427
1427
|
}, l = () => o.onResult(s);
|
|
1428
1428
|
}
|
|
@@ -1518,21 +1518,21 @@ class $s {
|
|
|
1518
1518
|
return this.inflightActionsCount;
|
|
1519
1519
|
}
|
|
1520
1520
|
}
|
|
1521
|
-
const et = /* @__PURE__ */ Symbol.for("functionName"),
|
|
1522
|
-
function
|
|
1523
|
-
return t[
|
|
1521
|
+
const et = /* @__PURE__ */ Symbol.for("functionName"), Os = /* @__PURE__ */ Symbol.for("toReferencePath");
|
|
1522
|
+
function zs(t) {
|
|
1523
|
+
return t[Os] ?? null;
|
|
1524
1524
|
}
|
|
1525
|
-
function
|
|
1525
|
+
function Ns(t) {
|
|
1526
1526
|
return t.startsWith("function://");
|
|
1527
1527
|
}
|
|
1528
|
-
function
|
|
1528
|
+
function Qs(t) {
|
|
1529
1529
|
let e;
|
|
1530
1530
|
if (typeof t == "string")
|
|
1531
|
-
|
|
1531
|
+
Ns(t) ? e = { functionHandle: t } : e = { name: t };
|
|
1532
1532
|
else if (t[et])
|
|
1533
1533
|
e = { name: t[et] };
|
|
1534
1534
|
else {
|
|
1535
|
-
const n =
|
|
1535
|
+
const n = zs(t);
|
|
1536
1536
|
if (!n)
|
|
1537
1537
|
throw new Error(`${t} is not a functionReference`);
|
|
1538
1538
|
e = { reference: n };
|
|
@@ -1540,7 +1540,7 @@ function Ms(t) {
|
|
|
1540
1540
|
return e;
|
|
1541
1541
|
}
|
|
1542
1542
|
function O(t) {
|
|
1543
|
-
const e =
|
|
1543
|
+
const e = Qs(t);
|
|
1544
1544
|
if (e.name === void 0)
|
|
1545
1545
|
throw e.functionHandle !== void 0 ? new Error(
|
|
1546
1546
|
`Expected function reference like "api.file.func" or "internal.file.func", but received function handle ${e.functionHandle}`
|
|
@@ -1555,15 +1555,15 @@ function O(t) {
|
|
|
1555
1555
|
throw new Error(`${t} is not a functionReference`);
|
|
1556
1556
|
return n;
|
|
1557
1557
|
}
|
|
1558
|
-
function
|
|
1558
|
+
function Ai(t) {
|
|
1559
1559
|
return { [et]: t };
|
|
1560
1560
|
}
|
|
1561
|
-
function
|
|
1561
|
+
function Ii(t = []) {
|
|
1562
1562
|
const e = {
|
|
1563
1563
|
get(n, r) {
|
|
1564
1564
|
if (typeof r == "string") {
|
|
1565
1565
|
const i = [...t, r];
|
|
1566
|
-
return
|
|
1566
|
+
return Ii(i);
|
|
1567
1567
|
} else if (r === et) {
|
|
1568
1568
|
if (t.length < 2) {
|
|
1569
1569
|
const s = ["api", ...t].join(".");
|
|
@@ -1578,8 +1578,8 @@ function Ci(t = []) {
|
|
|
1578
1578
|
};
|
|
1579
1579
|
return new Proxy({}, e);
|
|
1580
1580
|
}
|
|
1581
|
-
|
|
1582
|
-
var
|
|
1581
|
+
Ii();
|
|
1582
|
+
var Us = Object.defineProperty, Fs = (t, e, n) => e in t ? Us(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, kt = (t, e, n) => Fs(t, typeof e != "symbol" ? e + "" : e, n);
|
|
1583
1583
|
class tt {
|
|
1584
1584
|
constructor(e) {
|
|
1585
1585
|
kt(this, "queryResults"), kt(this, "modifiedQueries"), this.queryResults = e, this.modifiedQueries = [];
|
|
@@ -1621,7 +1621,7 @@ class tt {
|
|
|
1621
1621
|
return e.success ? e.value : void 0;
|
|
1622
1622
|
}
|
|
1623
1623
|
}
|
|
1624
|
-
class
|
|
1624
|
+
class Ds {
|
|
1625
1625
|
constructor() {
|
|
1626
1626
|
kt(this, "queryResults"), kt(this, "optimisticUpdates"), this.queryResults = /* @__PURE__ */ new Map(), this.optimisticUpdates = [];
|
|
1627
1627
|
}
|
|
@@ -1669,7 +1669,7 @@ class zs {
|
|
|
1669
1669
|
if (r !== void 0) {
|
|
1670
1670
|
if (r.success)
|
|
1671
1671
|
return r.value;
|
|
1672
|
-
throw r.errorData !== void 0 ?
|
|
1672
|
+
throw r.errorData !== void 0 ? an(
|
|
1673
1673
|
r,
|
|
1674
1674
|
new vt(
|
|
1675
1675
|
Ce("query", n.udfPath, r)
|
|
@@ -1689,10 +1689,10 @@ class zs {
|
|
|
1689
1689
|
return this.queryResults.get(e)?.result?.logLines;
|
|
1690
1690
|
}
|
|
1691
1691
|
}
|
|
1692
|
-
var
|
|
1692
|
+
var Bs = Object.defineProperty, Vs = (t, e, n) => e in t ? Bs(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Bt = (t, e, n) => Vs(t, typeof e != "symbol" ? e + "" : e, n);
|
|
1693
1693
|
class L {
|
|
1694
1694
|
constructor(e, n) {
|
|
1695
|
-
|
|
1695
|
+
Bt(this, "low"), Bt(this, "high"), Bt(this, "__isUnsignedLong__"), this.low = e | 0, this.high = n | 0, this.__isUnsignedLong__ = !0;
|
|
1696
1696
|
}
|
|
1697
1697
|
static isLong(e) {
|
|
1698
1698
|
return (e && e.__isUnsignedLong__) === !0;
|
|
@@ -1719,7 +1719,7 @@ class L {
|
|
|
1719
1719
|
];
|
|
1720
1720
|
}
|
|
1721
1721
|
static fromNumber(e) {
|
|
1722
|
-
return isNaN(e) || e < 0 ?
|
|
1722
|
+
return isNaN(e) || e < 0 ? Hs : e >= Ws ? Js : new L(e % Je | 0, e / Je | 0);
|
|
1723
1723
|
}
|
|
1724
1724
|
toString() {
|
|
1725
1725
|
return (BigInt(this.high) * BigInt(Je) + BigInt(this.low)).toString();
|
|
@@ -1743,9 +1743,9 @@ class L {
|
|
|
1743
1743
|
return typeof e == "number" ? L.fromNumber(e) : new L(e.low, e.high);
|
|
1744
1744
|
}
|
|
1745
1745
|
}
|
|
1746
|
-
const
|
|
1747
|
-
var
|
|
1748
|
-
class
|
|
1746
|
+
const Hs = new L(0, 0), mr = 65536, Je = mr * mr, Ws = Je * Je, Js = new L(-1, -1);
|
|
1747
|
+
var Ks = Object.defineProperty, Zs = (t, e, n) => e in t ? Ks(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, dt = (t, e, n) => Zs(t, typeof e != "symbol" ? e + "" : e, n);
|
|
1748
|
+
class xr {
|
|
1749
1749
|
constructor(e, n) {
|
|
1750
1750
|
dt(this, "version"), dt(this, "remoteQuerySet"), dt(this, "queryPath"), dt(this, "logger"), this.version = { querySet: 0, ts: L.fromNumber(0), identity: 0 }, this.remoteQuerySet = /* @__PURE__ */ new Map(), this.queryPath = e, this.logger = n;
|
|
1751
1751
|
}
|
|
@@ -1762,7 +1762,7 @@ class fr {
|
|
|
1762
1762
|
if (i)
|
|
1763
1763
|
for (const s of r.logLines)
|
|
1764
1764
|
yt(this.logger, "info", "query", i, s);
|
|
1765
|
-
const o =
|
|
1765
|
+
const o = Ee(r.value ?? null);
|
|
1766
1766
|
this.remoteQuerySet.set(r.queryId, {
|
|
1767
1767
|
success: !0,
|
|
1768
1768
|
value: o,
|
|
@@ -1779,7 +1779,7 @@ class fr {
|
|
|
1779
1779
|
this.remoteQuerySet.set(r.queryId, {
|
|
1780
1780
|
success: !1,
|
|
1781
1781
|
errorMessage: r.errorMessage,
|
|
1782
|
-
errorData: o !== void 0 ?
|
|
1782
|
+
errorData: o !== void 0 ? Ee(o) : void 0,
|
|
1783
1783
|
logLines: r.logLines
|
|
1784
1784
|
});
|
|
1785
1785
|
break;
|
|
@@ -1800,15 +1800,15 @@ class fr {
|
|
|
1800
1800
|
return this.version.ts;
|
|
1801
1801
|
}
|
|
1802
1802
|
}
|
|
1803
|
-
function
|
|
1803
|
+
function Vt(t) {
|
|
1804
1804
|
const e = Ye(t);
|
|
1805
1805
|
return L.fromBytesLE(Array.from(e));
|
|
1806
1806
|
}
|
|
1807
|
-
function
|
|
1807
|
+
function Gs(t) {
|
|
1808
1808
|
const e = new Uint8Array(t.toBytesLE());
|
|
1809
1809
|
return Xe(e);
|
|
1810
1810
|
}
|
|
1811
|
-
function
|
|
1811
|
+
function br(t) {
|
|
1812
1812
|
switch (t.type) {
|
|
1813
1813
|
case "FatalError":
|
|
1814
1814
|
case "AuthError":
|
|
@@ -1817,22 +1817,22 @@ function gr(t) {
|
|
|
1817
1817
|
case "Ping":
|
|
1818
1818
|
return { ...t };
|
|
1819
1819
|
case "MutationResponse":
|
|
1820
|
-
return t.success ? { ...t, ts:
|
|
1820
|
+
return t.success ? { ...t, ts: Vt(t.ts) } : { ...t };
|
|
1821
1821
|
case "Transition":
|
|
1822
1822
|
return {
|
|
1823
1823
|
...t,
|
|
1824
1824
|
startVersion: {
|
|
1825
1825
|
...t.startVersion,
|
|
1826
|
-
ts:
|
|
1826
|
+
ts: Vt(t.startVersion.ts)
|
|
1827
1827
|
},
|
|
1828
1828
|
endVersion: {
|
|
1829
1829
|
...t.endVersion,
|
|
1830
|
-
ts:
|
|
1830
|
+
ts: Vt(t.endVersion.ts)
|
|
1831
1831
|
}
|
|
1832
1832
|
};
|
|
1833
1833
|
}
|
|
1834
1834
|
}
|
|
1835
|
-
function
|
|
1835
|
+
function Ys(t) {
|
|
1836
1836
|
switch (t.type) {
|
|
1837
1837
|
case "Authenticate":
|
|
1838
1838
|
case "ModifyQuerySet":
|
|
@@ -1843,20 +1843,20 @@ function Ws(t) {
|
|
|
1843
1843
|
case "Connect":
|
|
1844
1844
|
return t.maxObservedTimestamp !== void 0 ? {
|
|
1845
1845
|
...t,
|
|
1846
|
-
maxObservedTimestamp:
|
|
1846
|
+
maxObservedTimestamp: Gs(t.maxObservedTimestamp)
|
|
1847
1847
|
} : { ...t, maxObservedTimestamp: void 0 };
|
|
1848
1848
|
}
|
|
1849
1849
|
}
|
|
1850
|
-
var
|
|
1851
|
-
const
|
|
1850
|
+
var Xs = Object.defineProperty, ea = (t, e, n) => e in t ? Xs(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, $ = (t, e, n) => ea(t, typeof e != "symbol" ? e + "" : e, n);
|
|
1851
|
+
const ta = 1e3, na = 1001, ra = 1005, ia = 4040;
|
|
1852
1852
|
let xt;
|
|
1853
1853
|
function je() {
|
|
1854
1854
|
return xt === void 0 && (xt = Date.now()), typeof performance > "u" || !performance.now ? Date.now() : Math.round(xt + performance.now());
|
|
1855
1855
|
}
|
|
1856
|
-
function
|
|
1856
|
+
function vr() {
|
|
1857
1857
|
return `t=${Math.round((je() - xt) / 100) / 10}s`;
|
|
1858
1858
|
}
|
|
1859
|
-
const
|
|
1859
|
+
const $i = {
|
|
1860
1860
|
// A known error, e.g. during a restart or push
|
|
1861
1861
|
InternalServerError: { timeout: 1e3 },
|
|
1862
1862
|
// ErrorMetadata::overloaded() messages that we realy should back off
|
|
@@ -1876,18 +1876,18 @@ const Ri = {
|
|
|
1876
1876
|
SearchIndexTooLarge: { timeout: 3e3 },
|
|
1877
1877
|
TooManyWritesInTimePeriod: { timeout: 3e3 }
|
|
1878
1878
|
};
|
|
1879
|
-
function
|
|
1879
|
+
function oa(t) {
|
|
1880
1880
|
if (t === void 0) return "Unknown";
|
|
1881
1881
|
for (const e of Object.keys(
|
|
1882
|
-
|
|
1882
|
+
$i
|
|
1883
1883
|
))
|
|
1884
1884
|
if (t.startsWith(e))
|
|
1885
1885
|
return e;
|
|
1886
1886
|
return "Unknown";
|
|
1887
1887
|
}
|
|
1888
|
-
class
|
|
1888
|
+
class sa {
|
|
1889
1889
|
constructor(e, n, r, i, o, s) {
|
|
1890
|
-
this.markConnectionStateDirty = o, this.debug = s,
|
|
1890
|
+
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();
|
|
1891
1891
|
}
|
|
1892
1892
|
setSocketState(e) {
|
|
1893
1893
|
this.socket = e, this._logVerbose(
|
|
@@ -1918,7 +1918,7 @@ class ta {
|
|
|
1918
1918
|
if (this.transitionChunkBuffer.chunks.push(e.chunk), this.transitionChunkBuffer.chunks.length === e.totalParts) {
|
|
1919
1919
|
const n = this.transitionChunkBuffer.chunks.join("");
|
|
1920
1920
|
this.transitionChunkBuffer = null;
|
|
1921
|
-
const r =
|
|
1921
|
+
const r = br(JSON.parse(n));
|
|
1922
1922
|
if (r.type !== "Transition")
|
|
1923
1923
|
throw new Error(
|
|
1924
1924
|
`Expected Transition, got ${r.type} after assembling chunks`
|
|
@@ -1952,10 +1952,10 @@ class ta {
|
|
|
1952
1952
|
clientTs: je()
|
|
1953
1953
|
})), this.lastCloseReason !== "InitialConnect" && (this.lastCloseReason ? this.logger.log(
|
|
1954
1954
|
"WebSocket reconnected at",
|
|
1955
|
-
|
|
1955
|
+
vr(),
|
|
1956
1956
|
"after disconnect due to",
|
|
1957
1957
|
this.lastCloseReason
|
|
1958
|
-
) : this.logger.log("WebSocket reconnected at",
|
|
1958
|
+
) : this.logger.log("WebSocket reconnected at", vr())), this.connectionCount += 1, this.lastCloseReason = null, this.pendingNetworkRecoveryInfo !== null) {
|
|
1959
1959
|
const { timeSavedMs: n } = this.pendingNetworkRecoveryInfo;
|
|
1960
1960
|
this.pendingNetworkRecoveryInfo = null, this.sendMessage({
|
|
1961
1961
|
type: "Event",
|
|
@@ -1972,7 +1972,7 @@ class ta {
|
|
|
1972
1972
|
}, e.onmessage = (n) => {
|
|
1973
1973
|
this.resetServerInactivityTimeout();
|
|
1974
1974
|
const r = n.data.length;
|
|
1975
|
-
let i =
|
|
1975
|
+
let i = br(JSON.parse(n.data));
|
|
1976
1976
|
if (this._logVerbose(`received ws message with type ${i.type}`), i.type !== "Ping") {
|
|
1977
1977
|
if (i.type === "TransitionChunk") {
|
|
1978
1978
|
const o = this.assembleTransition(i);
|
|
@@ -1990,12 +1990,12 @@ class ta {
|
|
|
1990
1990
|
}), this.onMessage(i).hasSyncedPastLastReconnect && (this.retries = 0, this.markConnectionStateDirty());
|
|
1991
1991
|
}
|
|
1992
1992
|
}, e.onclose = (n) => {
|
|
1993
|
-
if (this._logVerbose("begin ws.onclose"), this.transitionChunkBuffer = null, this.lastCloseReason === null && (this.lastCloseReason = n.reason || `closed with code ${n.code}`), n.code !==
|
|
1994
|
-
n.code !==
|
|
1993
|
+
if (this._logVerbose("begin ws.onclose"), this.transitionChunkBuffer = null, this.lastCloseReason === null && (this.lastCloseReason = n.reason || `closed with code ${n.code}`), n.code !== ta && n.code !== na && // This commonly gets fired on mobile apps when the app is backgrounded
|
|
1994
|
+
n.code !== ra && n.code !== ia) {
|
|
1995
1995
|
let i = `WebSocket closed with code ${n.code}`;
|
|
1996
1996
|
n.reason && (i += `: ${n.reason}`), this.logger.log(i), this.onServerDisconnectError && n.reason && this.onServerDisconnectError(i);
|
|
1997
1997
|
}
|
|
1998
|
-
const r =
|
|
1998
|
+
const r = oa(n.reason);
|
|
1999
1999
|
this.scheduleReconnect(r);
|
|
2000
2000
|
};
|
|
2001
2001
|
}
|
|
@@ -2017,7 +2017,7 @@ class ta {
|
|
|
2017
2017
|
} : {}
|
|
2018
2018
|
};
|
|
2019
2019
|
if (this.socket.state === "ready" && this.socket.paused === "no") {
|
|
2020
|
-
const r =
|
|
2020
|
+
const r = Ys(e), i = JSON.stringify(r);
|
|
2021
2021
|
let o = !1;
|
|
2022
2022
|
try {
|
|
2023
2023
|
this.socket.ws.send(i), o = !0;
|
|
@@ -2247,7 +2247,7 @@ class ta {
|
|
|
2247
2247
|
this.logger.logVerbose(e);
|
|
2248
2248
|
}
|
|
2249
2249
|
nextBackoff(e) {
|
|
2250
|
-
const n = (e === "client" ? 100 : e === "Unknown" ? this.defaultInitialBackoff :
|
|
2250
|
+
const n = (e === "client" ? 100 : e === "Unknown" ? this.defaultInitialBackoff : $i[e].timeout) * Math.pow(2, this.retries);
|
|
2251
2251
|
this.retries += 1;
|
|
2252
2252
|
const r = Math.min(n, this.maxBackoff), i = r * (Math.random() - 0.5);
|
|
2253
2253
|
return r + i;
|
|
@@ -2276,19 +2276,19 @@ class ta {
|
|
|
2276
2276
|
});
|
|
2277
2277
|
}
|
|
2278
2278
|
}
|
|
2279
|
-
function
|
|
2280
|
-
return
|
|
2279
|
+
function aa() {
|
|
2280
|
+
return la();
|
|
2281
2281
|
}
|
|
2282
|
-
function
|
|
2282
|
+
function la() {
|
|
2283
2283
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (t) => {
|
|
2284
2284
|
const e = Math.random() * 16 | 0;
|
|
2285
2285
|
return (t === "x" ? e : e & 3 | 8).toString(16);
|
|
2286
2286
|
});
|
|
2287
2287
|
}
|
|
2288
|
-
class
|
|
2288
|
+
class Be extends Error {
|
|
2289
2289
|
}
|
|
2290
|
-
|
|
2291
|
-
function
|
|
2290
|
+
Be.prototype.name = "InvalidTokenError";
|
|
2291
|
+
function ca(t) {
|
|
2292
2292
|
return decodeURIComponent(
|
|
2293
2293
|
atob(t).replace(/(.)/g, (e, n) => {
|
|
2294
2294
|
let r = n.charCodeAt(0).toString(16).toUpperCase();
|
|
@@ -2296,7 +2296,7 @@ function ia(t) {
|
|
|
2296
2296
|
})
|
|
2297
2297
|
);
|
|
2298
2298
|
}
|
|
2299
|
-
function
|
|
2299
|
+
function ua(t) {
|
|
2300
2300
|
let e = t.replace(/-/g, "+").replace(/_/g, "/");
|
|
2301
2301
|
switch (e.length % 4) {
|
|
2302
2302
|
case 0:
|
|
@@ -2311,41 +2311,41 @@ function oa(t) {
|
|
|
2311
2311
|
throw new Error("base64 string is not of the correct length");
|
|
2312
2312
|
}
|
|
2313
2313
|
try {
|
|
2314
|
-
return
|
|
2314
|
+
return ca(e);
|
|
2315
2315
|
} catch {
|
|
2316
2316
|
return atob(e);
|
|
2317
2317
|
}
|
|
2318
2318
|
}
|
|
2319
|
-
function
|
|
2319
|
+
function Ei(t, e) {
|
|
2320
2320
|
if (typeof t != "string")
|
|
2321
|
-
throw new
|
|
2321
|
+
throw new Be("Invalid token specified: must be a string");
|
|
2322
2322
|
e || (e = {});
|
|
2323
2323
|
const n = e.header === !0 ? 0 : 1, r = t.split(".")[n];
|
|
2324
2324
|
if (typeof r != "string")
|
|
2325
|
-
throw new
|
|
2325
|
+
throw new Be(
|
|
2326
2326
|
`Invalid token specified: missing part #${n + 1}`
|
|
2327
2327
|
);
|
|
2328
2328
|
let i;
|
|
2329
2329
|
try {
|
|
2330
|
-
i =
|
|
2330
|
+
i = ua(r);
|
|
2331
2331
|
} catch (o) {
|
|
2332
|
-
throw new
|
|
2332
|
+
throw new Be(
|
|
2333
2333
|
`Invalid token specified: invalid base64 for part #${n + 1} (${o.message})`
|
|
2334
2334
|
);
|
|
2335
2335
|
}
|
|
2336
2336
|
try {
|
|
2337
2337
|
return JSON.parse(i);
|
|
2338
2338
|
} catch (o) {
|
|
2339
|
-
throw new
|
|
2339
|
+
throw new Be(
|
|
2340
2340
|
`Invalid token specified: invalid json for part #${n + 1} (${o.message})`
|
|
2341
2341
|
);
|
|
2342
2342
|
}
|
|
2343
2343
|
}
|
|
2344
|
-
var
|
|
2345
|
-
const
|
|
2346
|
-
class
|
|
2344
|
+
var ha = Object.defineProperty, da = (t, e, n) => e in t ? ha(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, U = (t, e, n) => da(t, typeof e != "symbol" ? e + "" : e, n);
|
|
2345
|
+
const pa = 480 * 60 * 60 * 1e3, yr = 2;
|
|
2346
|
+
class fa {
|
|
2347
2347
|
constructor(e, n, r) {
|
|
2348
|
-
|
|
2348
|
+
U(this, "authState", { state: "noAuth" }), U(this, "configVersion", 0), U(this, "syncState"), U(this, "authenticate"), U(this, "stopSocket"), U(this, "tryRestartSocket"), U(this, "pauseSocket"), U(this, "resumeSocket"), U(this, "clearAuth"), U(this, "logger"), U(this, "refreshTokenLeewaySeconds"), U(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;
|
|
2349
2349
|
}
|
|
2350
2350
|
async setConfig(e, n) {
|
|
2351
2351
|
this.resetAuthState(), this._logVerbose("pausing WS for auth token fetch"), this.pauseSocket();
|
|
@@ -2394,14 +2394,14 @@ class ca {
|
|
|
2394
2394
|
if (this._logVerbose(`attempting to reauthenticate: ${e.error}`), // No way to fetch another token, kaboom
|
|
2395
2395
|
this.authState.state === "noAuth" || // We failed on a fresh token. After a small number of retries, we give up
|
|
2396
2396
|
// and clear the auth state to avoid infinite retries.
|
|
2397
|
-
this.authState.state === "waitingForServerConfirmationOfFreshToken" && this.tokenConfirmationAttempts >=
|
|
2397
|
+
this.authState.state === "waitingForServerConfirmationOfFreshToken" && this.tokenConfirmationAttempts >= yr) {
|
|
2398
2398
|
this.logger.error(
|
|
2399
2399
|
`Failed to authenticate: "${e.error}", check your server auth config`
|
|
2400
2400
|
), this.syncState.hasAuth() && this.syncState.clearAuth(), this.authState.state !== "noAuth" && this.setAndReportAuthFailed(this.authState.config.onAuthChange);
|
|
2401
2401
|
return;
|
|
2402
2402
|
}
|
|
2403
2403
|
this.authState.state === "waitingForServerConfirmationOfFreshToken" && (this.tokenConfirmationAttempts++, this._logVerbose(
|
|
2404
|
-
`retrying reauthentication, ${
|
|
2404
|
+
`retrying reauthentication, ${yr - this.tokenConfirmationAttempts} attempts remaining`
|
|
2405
2405
|
)), await this.stopSocket();
|
|
2406
2406
|
const n = await this.fetchTokenAndGuardAgainstRace(
|
|
2407
2407
|
this.authState.config.fetchToken,
|
|
@@ -2466,7 +2466,7 @@ class ca {
|
|
|
2466
2466
|
return;
|
|
2467
2467
|
}
|
|
2468
2468
|
let s = Math.min(
|
|
2469
|
-
|
|
2469
|
+
pa,
|
|
2470
2470
|
(o - this.refreshTokenLeewaySeconds) * 1e3
|
|
2471
2471
|
);
|
|
2472
2472
|
s <= 0 && (this.logger.warn(
|
|
@@ -2523,7 +2523,7 @@ class ca {
|
|
|
2523
2523
|
}
|
|
2524
2524
|
decodeToken(e) {
|
|
2525
2525
|
try {
|
|
2526
|
-
return
|
|
2526
|
+
return Ei(e);
|
|
2527
2527
|
} catch (n) {
|
|
2528
2528
|
return this._logVerbose(
|
|
2529
2529
|
`Error decoding token: ${n instanceof Error ? n.message : "Unknown error"}`
|
|
@@ -2534,34 +2534,34 @@ class ca {
|
|
|
2534
2534
|
this.logger.logVerbose(`${e} [v${this.configVersion}]`);
|
|
2535
2535
|
}
|
|
2536
2536
|
}
|
|
2537
|
-
const
|
|
2537
|
+
const ga = [
|
|
2538
2538
|
"convexClientConstructed",
|
|
2539
2539
|
"convexWebSocketOpen",
|
|
2540
2540
|
"convexFirstMessageReceived"
|
|
2541
2541
|
];
|
|
2542
|
-
function
|
|
2542
|
+
function ma(t, e) {
|
|
2543
2543
|
const n = { sessionId: e };
|
|
2544
2544
|
typeof performance > "u" || !performance.mark || performance.mark(t, { detail: n });
|
|
2545
2545
|
}
|
|
2546
|
-
function
|
|
2546
|
+
function xa(t) {
|
|
2547
2547
|
let e = t.name.slice(6);
|
|
2548
2548
|
return e = e.charAt(0).toLowerCase() + e.slice(1), {
|
|
2549
2549
|
name: e,
|
|
2550
2550
|
startTime: t.startTime
|
|
2551
2551
|
};
|
|
2552
2552
|
}
|
|
2553
|
-
function
|
|
2553
|
+
function ba(t) {
|
|
2554
2554
|
if (typeof performance > "u" || !performance.getEntriesByName)
|
|
2555
2555
|
return [];
|
|
2556
2556
|
const e = [];
|
|
2557
|
-
for (const n of
|
|
2557
|
+
for (const n of ga) {
|
|
2558
2558
|
const r = performance.getEntriesByName(n).filter((i) => i.entryType === "mark").filter((i) => i.detail.sessionId === t);
|
|
2559
2559
|
e.push(...r);
|
|
2560
2560
|
}
|
|
2561
|
-
return e.map(
|
|
2561
|
+
return e.map(xa);
|
|
2562
2562
|
}
|
|
2563
|
-
var
|
|
2564
|
-
class
|
|
2563
|
+
var va = Object.defineProperty, ya = (t, e, n) => e in t ? va(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, E = (t, e, n) => ya(t, typeof e != "symbol" ? e + "" : e, n);
|
|
2564
|
+
class ka {
|
|
2565
2565
|
/**
|
|
2566
2566
|
* @param address - The url of your Convex deployment, often provided
|
|
2567
2567
|
* by an environment variable. E.g. `https://small-mouse-123.convex.cloud`.
|
|
@@ -2571,7 +2571,7 @@ class ma {
|
|
|
2571
2571
|
* @param options - See {@link BaseConvexClientOptions} for a full description.
|
|
2572
2572
|
*/
|
|
2573
2573
|
constructor(e, n, r) {
|
|
2574
|
-
if (
|
|
2574
|
+
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", () => {
|
|
2575
2575
|
Promise.resolve().then(() => {
|
|
2576
2576
|
const f = this.connectionState();
|
|
2577
2577
|
if (JSON.stringify(f) !== JSON.stringify(this._lastPublishedConnectionState)) {
|
|
@@ -2580,20 +2580,20 @@ class ma {
|
|
|
2580
2580
|
g(f);
|
|
2581
2581
|
}
|
|
2582
2582
|
});
|
|
2583
|
-
}),
|
|
2584
|
-
this.debug &&
|
|
2583
|
+
}), E(this, "mark", (f) => {
|
|
2584
|
+
this.debug && ma(f, this.sessionId);
|
|
2585
2585
|
}), typeof e == "object")
|
|
2586
2586
|
throw new Error(
|
|
2587
2587
|
"Passing a ClientConfig object is no longer supported. Pass the URL of the Convex deployment as a string directly."
|
|
2588
2588
|
);
|
|
2589
|
-
r?.skipConvexDeploymentUrlCheck !== !0 &&
|
|
2589
|
+
r?.skipConvexDeploymentUrlCheck !== !0 && gs(e), r = { ...r };
|
|
2590
2590
|
const i = r.authRefreshTokenLeewaySeconds ?? 10;
|
|
2591
2591
|
let o = r.webSocketConstructor;
|
|
2592
2592
|
if (!o && typeof WebSocket > "u")
|
|
2593
2593
|
throw new Error(
|
|
2594
2594
|
"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"
|
|
2595
2595
|
);
|
|
2596
|
-
o = o || WebSocket, this.debug = r.reportDebugInfoToConvex ?? !1, this.address = e, this.logger = r.logger === !1 ?
|
|
2596
|
+
o = o || WebSocket, this.debug = r.reportDebugInfoToConvex ?? !1, this.address = e, this.logger = r.logger === !1 ? Ti({ verbose: r.verbose ?? !1 }) : r.logger !== !0 && r.logger ? r.logger : Ri({ verbose: r.verbose ?? !1 });
|
|
2597
2597
|
const s = e.search("://");
|
|
2598
2598
|
if (s === -1)
|
|
2599
2599
|
throw new Error("Provided address was not an absolute URL.");
|
|
@@ -2605,18 +2605,18 @@ class ma {
|
|
|
2605
2605
|
u = "wss";
|
|
2606
2606
|
else
|
|
2607
2607
|
throw new Error(`Unknown parent protocol ${a}`);
|
|
2608
|
-
const d = `${u}://${l}/api/${
|
|
2609
|
-
this.state = new
|
|
2608
|
+
const d = `${u}://${l}/api/${pr}/sync`;
|
|
2609
|
+
this.state = new Ps(), this.remoteQuerySet = new xr(
|
|
2610
2610
|
(f) => this.state.queryPath(f),
|
|
2611
2611
|
this.logger
|
|
2612
|
-
), this.requestManager = new
|
|
2612
|
+
), this.requestManager = new Ls(
|
|
2613
2613
|
this.logger,
|
|
2614
2614
|
this.markConnectionStateDirty
|
|
2615
2615
|
);
|
|
2616
2616
|
const h = () => {
|
|
2617
2617
|
this.webSocketManager.pause(), this.state.pause();
|
|
2618
2618
|
};
|
|
2619
|
-
this.authenticationManager = new
|
|
2619
|
+
this.authenticationManager = new fa(
|
|
2620
2620
|
this.state,
|
|
2621
2621
|
{
|
|
2622
2622
|
authenticate: (f) => {
|
|
@@ -2635,9 +2635,9 @@ class ma {
|
|
|
2635
2635
|
logger: this.logger,
|
|
2636
2636
|
refreshTokenLeewaySeconds: i
|
|
2637
2637
|
}
|
|
2638
|
-
), this.optimisticQueryResults = new
|
|
2638
|
+
), this.optimisticQueryResults = new Ds(), this.addOnTransitionHandler((f) => {
|
|
2639
2639
|
n(f.queries.map((g) => g.token));
|
|
2640
|
-
}), this._nextRequestId = 0, this._sessionId =
|
|
2640
|
+
}), this._nextRequestId = 0, this._sessionId = aa();
|
|
2641
2641
|
const { unsavedChangesWarning: p } = r;
|
|
2642
2642
|
if (typeof window > "u" || typeof window.addEventListener > "u") {
|
|
2643
2643
|
if (p === !0)
|
|
@@ -2651,7 +2651,7 @@ class ma {
|
|
|
2651
2651
|
return (f || window.event).returnValue = g, g;
|
|
2652
2652
|
}
|
|
2653
2653
|
});
|
|
2654
|
-
this.webSocketManager = new
|
|
2654
|
+
this.webSocketManager = new sa(
|
|
2655
2655
|
d,
|
|
2656
2656
|
{
|
|
2657
2657
|
onOpen: (f) => {
|
|
@@ -2660,7 +2660,7 @@ class ma {
|
|
|
2660
2660
|
type: "Connect",
|
|
2661
2661
|
sessionId: this._sessionId,
|
|
2662
2662
|
maxObservedTimestamp: this.maxObservedTimestamp
|
|
2663
|
-
}), this.remoteQuerySet = new
|
|
2663
|
+
}), this.remoteQuerySet = new xr(
|
|
2664
2664
|
(x) => this.state.queryPath(x),
|
|
2665
2665
|
this.logger
|
|
2666
2666
|
);
|
|
@@ -2707,7 +2707,7 @@ class ma {
|
|
|
2707
2707
|
break;
|
|
2708
2708
|
}
|
|
2709
2709
|
case "FatalError": {
|
|
2710
|
-
const g =
|
|
2710
|
+
const g = Is(this.logger, f.error);
|
|
2711
2711
|
throw this.webSocketManager.terminate(), g;
|
|
2712
2712
|
}
|
|
2713
2713
|
}
|
|
@@ -2807,7 +2807,7 @@ class ma {
|
|
|
2807
2807
|
let n = {};
|
|
2808
2808
|
if (e && e.tokenType === "User")
|
|
2809
2809
|
try {
|
|
2810
|
-
n = e ?
|
|
2810
|
+
n = e ? Ei(e.value) : {};
|
|
2811
2811
|
} catch {
|
|
2812
2812
|
n = {};
|
|
2813
2813
|
}
|
|
@@ -2966,7 +2966,7 @@ class ma {
|
|
|
2966
2966
|
async mutation(e, n, r) {
|
|
2967
2967
|
const i = await this.mutationInternal(e, n, r);
|
|
2968
2968
|
if (!i.success)
|
|
2969
|
-
throw i.errorData !== void 0 ?
|
|
2969
|
+
throw i.errorData !== void 0 ? an(
|
|
2970
2970
|
i,
|
|
2971
2971
|
new vt(
|
|
2972
2972
|
Ce("mutation", e, i)
|
|
@@ -3050,7 +3050,7 @@ class ma {
|
|
|
3050
3050
|
async action(e, n) {
|
|
3051
3051
|
const r = await this.actionInternal(e, n);
|
|
3052
3052
|
if (!r.success)
|
|
3053
|
-
throw r.errorData !== void 0 ?
|
|
3053
|
+
throw r.errorData !== void 0 ? an(
|
|
3054
3054
|
r,
|
|
3055
3055
|
new vt(Ce("action", e, r))
|
|
3056
3056
|
) : new Error(Ce("action", e, r));
|
|
@@ -3109,7 +3109,7 @@ class ma {
|
|
|
3109
3109
|
*/
|
|
3110
3110
|
reportMarks() {
|
|
3111
3111
|
if (this.debug) {
|
|
3112
|
-
const e =
|
|
3112
|
+
const e = ba(this.sessionId);
|
|
3113
3113
|
this.webSocketManager.sendMessage({
|
|
3114
3114
|
type: "Event",
|
|
3115
3115
|
eventType: "ClientConnect",
|
|
@@ -3128,7 +3128,7 @@ class ma {
|
|
|
3128
3128
|
method: "POST",
|
|
3129
3129
|
headers: {
|
|
3130
3130
|
"Content-Type": "application/json",
|
|
3131
|
-
"Convex-Client": `npm-${
|
|
3131
|
+
"Convex-Client": `npm-${pr}`
|
|
3132
3132
|
},
|
|
3133
3133
|
body: JSON.stringify({ event: "LongWebsocketDisconnect" })
|
|
3134
3134
|
}).then((r) => {
|
|
@@ -3141,15 +3141,15 @@ class ma {
|
|
|
3141
3141
|
});
|
|
3142
3142
|
}
|
|
3143
3143
|
}
|
|
3144
|
-
function
|
|
3144
|
+
function Ht(t) {
|
|
3145
3145
|
if (typeof t != "object" || t === null || !Array.isArray(t.page) || typeof t.isDone != "boolean" || typeof t.continueCursor != "string")
|
|
3146
3146
|
throw new Error(`Not a valid paginated query result: ${t?.toString()}`);
|
|
3147
3147
|
return t;
|
|
3148
3148
|
}
|
|
3149
|
-
var
|
|
3150
|
-
class
|
|
3149
|
+
var wa = Object.defineProperty, _a = (t, e, n) => e in t ? wa(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, kr = (t, e, n) => _a(t, typeof e != "symbol" ? e + "" : e, n);
|
|
3150
|
+
class ja {
|
|
3151
3151
|
constructor(e, n) {
|
|
3152
|
-
this.client = e, this.onTransition = n,
|
|
3152
|
+
this.client = e, this.onTransition = n, kr(this, "paginatedQuerySet", /* @__PURE__ */ new Map()), kr(this, "lastTransitionTs"), this.lastTransitionTs = L.fromNumber(0), this.client.addOnTransitionHandler(
|
|
3153
3153
|
(r) => this.onBaseTransition(r)
|
|
3154
3154
|
);
|
|
3155
3155
|
}
|
|
@@ -3162,7 +3162,7 @@ class va {
|
|
|
3162
3162
|
* @returns Object with paginatedQueryToken and unsubscribe function
|
|
3163
3163
|
*/
|
|
3164
3164
|
subscribe(e, n, r) {
|
|
3165
|
-
const i = me(e), o =
|
|
3165
|
+
const i = me(e), o = gr(
|
|
3166
3166
|
i,
|
|
3167
3167
|
n,
|
|
3168
3168
|
r
|
|
@@ -3193,7 +3193,7 @@ class va {
|
|
|
3193
3193
|
* Throws an error when one of the pages has errored.
|
|
3194
3194
|
*/
|
|
3195
3195
|
localQueryResult(e, n, r) {
|
|
3196
|
-
const i = me(e), o =
|
|
3196
|
+
const i = me(e), o = gr(
|
|
3197
3197
|
i,
|
|
3198
3198
|
n,
|
|
3199
3199
|
r
|
|
@@ -3221,7 +3221,7 @@ class va {
|
|
|
3221
3221
|
o = !0, s = !1;
|
|
3222
3222
|
continue;
|
|
3223
3223
|
}
|
|
3224
|
-
const d =
|
|
3224
|
+
const d = Ht(u);
|
|
3225
3225
|
i = i.concat(d.page), s = !!d.isDone;
|
|
3226
3226
|
}
|
|
3227
3227
|
let l;
|
|
@@ -3266,7 +3266,7 @@ class va {
|
|
|
3266
3266
|
const r = this.queryTokenForLastPageOfPaginatedQuery(e), i = this.client.localQueryResultByToken(r);
|
|
3267
3267
|
if (!i)
|
|
3268
3268
|
return !1;
|
|
3269
|
-
const o =
|
|
3269
|
+
const o = Ht(i);
|
|
3270
3270
|
if (o.isDone)
|
|
3271
3271
|
return !1;
|
|
3272
3272
|
this.addPageToPaginatedQuery(
|
|
@@ -3324,7 +3324,7 @@ class va {
|
|
|
3324
3324
|
const u = s.get(a).queryToken, d = n(u);
|
|
3325
3325
|
if (!d)
|
|
3326
3326
|
continue;
|
|
3327
|
-
const h =
|
|
3327
|
+
const h = Ht(d);
|
|
3328
3328
|
h.splitCursor && (h.pageStatus === "SplitRecommended" || h.pageStatus === "SplitRequired" || // This client-driven page splitting condition will change in the future.
|
|
3329
3329
|
h.page.length > i.options.initialNumItems * 2) && this.splitPaginatedQueryPage(
|
|
3330
3330
|
i,
|
|
@@ -3422,7 +3422,7 @@ class va {
|
|
|
3422
3422
|
return n;
|
|
3423
3423
|
}
|
|
3424
3424
|
}
|
|
3425
|
-
function
|
|
3425
|
+
function Sa({
|
|
3426
3426
|
// (Synchronously) returns the current value of our subscription.
|
|
3427
3427
|
getCurrentValue: t,
|
|
3428
3428
|
// This function is passed an event handler to attach to the subscription.
|
|
@@ -3439,7 +3439,7 @@ function ya({
|
|
|
3439
3439
|
getCurrentValue: t,
|
|
3440
3440
|
subscribe: e,
|
|
3441
3441
|
value: i
|
|
3442
|
-
})),
|
|
3442
|
+
})), R(() => {
|
|
3443
3443
|
let o = !1;
|
|
3444
3444
|
const s = () => {
|
|
3445
3445
|
o || r((a) => {
|
|
@@ -3454,13 +3454,13 @@ function ya({
|
|
|
3454
3454
|
};
|
|
3455
3455
|
}, [t, e]), i;
|
|
3456
3456
|
}
|
|
3457
|
-
var
|
|
3458
|
-
const
|
|
3459
|
-
if (typeof
|
|
3457
|
+
var Ca = Object.defineProperty, Ra = (t, e, n) => e in t ? Ca(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, re = (t, e, n) => Ra(t, typeof e != "symbol" ? e + "" : e, n);
|
|
3458
|
+
const Ta = 5e3;
|
|
3459
|
+
if (typeof Cn > "u")
|
|
3460
3460
|
throw new Error("Required dependency 'react' not found");
|
|
3461
|
-
function
|
|
3461
|
+
function Pi(t, e, n) {
|
|
3462
3462
|
function r(i) {
|
|
3463
|
-
return
|
|
3463
|
+
return Ea(i), e.mutation(t, i, {
|
|
3464
3464
|
optimisticUpdate: n
|
|
3465
3465
|
});
|
|
3466
3466
|
}
|
|
@@ -3471,10 +3471,10 @@ function Ai(t, e, n) {
|
|
|
3471
3471
|
t
|
|
3472
3472
|
)}`
|
|
3473
3473
|
);
|
|
3474
|
-
return
|
|
3474
|
+
return Pi(t, e, i);
|
|
3475
3475
|
}, r;
|
|
3476
3476
|
}
|
|
3477
|
-
class
|
|
3477
|
+
class Aa {
|
|
3478
3478
|
/**
|
|
3479
3479
|
* @param address - The url of your Convex deployment, often provided
|
|
3480
3480
|
* by an environment variable. E.g. `https://small-mouse-123.convex.cloud`.
|
|
@@ -3491,7 +3491,7 @@ class ja {
|
|
|
3491
3491
|
);
|
|
3492
3492
|
if (!e.includes("://"))
|
|
3493
3493
|
throw new Error("Provided address was not an absolute URL.");
|
|
3494
|
-
this.address = e, this.listeners = /* @__PURE__ */ new Map(), this._logger = n?.logger === !1 ?
|
|
3494
|
+
this.address = e, this.listeners = /* @__PURE__ */ new Map(), this._logger = n?.logger === !1 ? Ti({ verbose: n?.verbose ?? !1 }) : n?.logger !== !0 && n?.logger ? n.logger : Ri({ verbose: n?.verbose ?? !1 }), this.options = { ...n, logger: this._logger };
|
|
3495
3495
|
}
|
|
3496
3496
|
/**
|
|
3497
3497
|
* Return the address for this client, useful for creating a new client.
|
|
@@ -3511,13 +3511,13 @@ class ja {
|
|
|
3511
3511
|
get sync() {
|
|
3512
3512
|
if (this.closed)
|
|
3513
3513
|
throw new Error("ConvexReactClient has already been closed.");
|
|
3514
|
-
return this.cachedSync ? this.cachedSync : (this.cachedSync = new
|
|
3514
|
+
return this.cachedSync ? this.cachedSync : (this.cachedSync = new ka(
|
|
3515
3515
|
this.address,
|
|
3516
3516
|
() => {
|
|
3517
3517
|
},
|
|
3518
3518
|
// Use the PaginatedQueryClient's transition instead.
|
|
3519
3519
|
this.options
|
|
3520
|
-
), this.adminAuth && this.cachedSync.setAdminAuth(this.adminAuth, this.fakeUserIdentity), this.cachedPaginatedQueryClient = new
|
|
3520
|
+
), this.adminAuth && this.cachedSync.setAdminAuth(this.adminAuth, this.fakeUserIdentity), this.cachedPaginatedQueryClient = new ja(
|
|
3521
3521
|
this.cachedSync,
|
|
3522
3522
|
(e) => this.handleTransition(e)
|
|
3523
3523
|
), this.cachedSync);
|
|
@@ -3627,7 +3627,7 @@ class ja {
|
|
|
3627
3627
|
* an optional extendSubscriptionFor for how long to subscribe to the query.
|
|
3628
3628
|
*/
|
|
3629
3629
|
prewarmQuery(e) {
|
|
3630
|
-
const n = e.extendSubscriptionFor ??
|
|
3630
|
+
const n = e.extendSubscriptionFor ?? Ta, r = this.watchQuery(e.query, e.args || {}).onUpdate(() => {
|
|
3631
3631
|
});
|
|
3632
3632
|
setTimeout(r, n);
|
|
3633
3633
|
}
|
|
@@ -3778,52 +3778,52 @@ class ja {
|
|
|
3778
3778
|
}
|
|
3779
3779
|
}
|
|
3780
3780
|
}
|
|
3781
|
-
const
|
|
3781
|
+
const Tn = Cn.createContext(
|
|
3782
3782
|
void 0
|
|
3783
3783
|
// in the future this will be a mocked client for testing
|
|
3784
3784
|
);
|
|
3785
|
-
function
|
|
3786
|
-
return
|
|
3785
|
+
function Ia() {
|
|
3786
|
+
return It(Tn);
|
|
3787
3787
|
}
|
|
3788
|
-
const
|
|
3789
|
-
|
|
3788
|
+
const $a = ({ client: t, children: e }) => Cn.createElement(
|
|
3789
|
+
Tn.Provider,
|
|
3790
3790
|
{ value: t },
|
|
3791
3791
|
e
|
|
3792
3792
|
);
|
|
3793
|
-
function
|
|
3794
|
-
const n = e[0] === "skip", r = e[0] === "skip" ? {} : ie(e[0]), i = typeof t == "string" ?
|
|
3793
|
+
function wr(t, ...e) {
|
|
3794
|
+
const n = e[0] === "skip", r = e[0] === "skip" ? {} : ie(e[0]), i = typeof t == "string" ? Ai(t) : t, o = O(i), s = J(
|
|
3795
3795
|
() => n ? {} : { query: { query: i, args: r } },
|
|
3796
3796
|
// Stringify args so args that are semantically the same don't trigger a
|
|
3797
3797
|
// rerender. Saves developers from adding `useMemo` on every args usage.
|
|
3798
3798
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3799
3799
|
[JSON.stringify(ne(r)), o, n]
|
|
3800
|
-
), l =
|
|
3800
|
+
), l = La(s).query;
|
|
3801
3801
|
if (l instanceof Error)
|
|
3802
3802
|
throw l;
|
|
3803
3803
|
return l;
|
|
3804
3804
|
}
|
|
3805
|
-
function
|
|
3806
|
-
const e = typeof t == "string" ?
|
|
3805
|
+
function Et(t) {
|
|
3806
|
+
const e = typeof t == "string" ? Ai(t) : t, n = It(Tn);
|
|
3807
3807
|
if (n === void 0)
|
|
3808
3808
|
throw new Error(
|
|
3809
3809
|
"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"
|
|
3810
3810
|
);
|
|
3811
3811
|
return J(
|
|
3812
|
-
() =>
|
|
3812
|
+
() => Pi(e, n),
|
|
3813
3813
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3814
3814
|
[n, O(e)]
|
|
3815
3815
|
);
|
|
3816
3816
|
}
|
|
3817
|
-
function
|
|
3817
|
+
function Ea(t) {
|
|
3818
3818
|
if (typeof t == "object" && t !== null && "bubbles" in t && "persist" in t && "isDefaultPrevented" in t)
|
|
3819
3819
|
throw new Error(
|
|
3820
3820
|
"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."
|
|
3821
3821
|
);
|
|
3822
3822
|
}
|
|
3823
|
-
var
|
|
3824
|
-
class
|
|
3823
|
+
var Pa = Object.defineProperty, qa = (t, e, n) => e in t ? Pa(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Wt = (t, e, n) => qa(t, typeof e != "symbol" ? e + "" : e, n);
|
|
3824
|
+
class Ma {
|
|
3825
3825
|
constructor(e) {
|
|
3826
|
-
|
|
3826
|
+
Wt(this, "createWatch"), Wt(this, "queries"), Wt(this, "listeners"), this.createWatch = e, this.queries = {}, this.listeners = /* @__PURE__ */ new Set();
|
|
3827
3827
|
}
|
|
3828
3828
|
setQueries(e) {
|
|
3829
3829
|
for (const n of Object.keys(e)) {
|
|
@@ -3922,8 +3922,8 @@ class Ia {
|
|
|
3922
3922
|
e();
|
|
3923
3923
|
}
|
|
3924
3924
|
}
|
|
3925
|
-
function
|
|
3926
|
-
const e =
|
|
3925
|
+
function La(t) {
|
|
3926
|
+
const e = Ia();
|
|
3927
3927
|
if (e === void 0)
|
|
3928
3928
|
throw new Error(
|
|
3929
3929
|
"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"
|
|
@@ -3932,11 +3932,11 @@ function $a(t) {
|
|
|
3932
3932
|
journal: o,
|
|
3933
3933
|
paginationOptions: s
|
|
3934
3934
|
}) => s ? e.watchPaginatedQuery(r, i, s) : e.watchQuery(r, i, o ? { journal: o } : {}), [e]);
|
|
3935
|
-
return
|
|
3935
|
+
return Oa(t, n);
|
|
3936
3936
|
}
|
|
3937
|
-
function
|
|
3938
|
-
const [n] = C(() => new
|
|
3939
|
-
n.createWatch !== e && n.setCreateWatch(e),
|
|
3937
|
+
function Oa(t, e) {
|
|
3938
|
+
const [n] = C(() => new Ma(e));
|
|
3939
|
+
n.createWatch !== e && n.setCreateWatch(e), R(() => () => n.destroy(), [n]);
|
|
3940
3940
|
const r = J(
|
|
3941
3941
|
() => ({
|
|
3942
3942
|
getCurrentValue: () => n.getLocalResults(t),
|
|
@@ -3944,18 +3944,18 @@ function Ea(t, e) {
|
|
|
3944
3944
|
}),
|
|
3945
3945
|
[n, t]
|
|
3946
3946
|
);
|
|
3947
|
-
return
|
|
3947
|
+
return Sa(r);
|
|
3948
3948
|
}
|
|
3949
|
-
var
|
|
3950
|
-
function
|
|
3949
|
+
var za = /* @__PURE__ */ Symbol.for("preact-signals");
|
|
3950
|
+
function Pt() {
|
|
3951
3951
|
if (ae > 1)
|
|
3952
3952
|
ae--;
|
|
3953
3953
|
else {
|
|
3954
3954
|
for (var t, e = !1; Ke !== void 0; ) {
|
|
3955
3955
|
var n = Ke;
|
|
3956
|
-
for (Ke = void 0,
|
|
3956
|
+
for (Ke = void 0, ln++; n !== void 0; ) {
|
|
3957
3957
|
var r = n.o;
|
|
3958
|
-
if (n.o = void 0, n.f &= -3, !(8 & n.f) &&
|
|
3958
|
+
if (n.o = void 0, n.f &= -3, !(8 & n.f) && Li(n)) try {
|
|
3959
3959
|
n.c();
|
|
3960
3960
|
} catch (i) {
|
|
3961
3961
|
e || (t = i, e = !0);
|
|
@@ -3963,20 +3963,20 @@ function Et() {
|
|
|
3963
3963
|
n = r;
|
|
3964
3964
|
}
|
|
3965
3965
|
}
|
|
3966
|
-
if (
|
|
3966
|
+
if (ln = 0, ae--, e) throw t;
|
|
3967
3967
|
}
|
|
3968
3968
|
}
|
|
3969
|
-
function
|
|
3969
|
+
function Na(t) {
|
|
3970
3970
|
if (ae > 0) return t();
|
|
3971
3971
|
ae++;
|
|
3972
3972
|
try {
|
|
3973
3973
|
return t();
|
|
3974
3974
|
} finally {
|
|
3975
|
-
|
|
3975
|
+
Pt();
|
|
3976
3976
|
}
|
|
3977
3977
|
}
|
|
3978
3978
|
var w = void 0;
|
|
3979
|
-
function
|
|
3979
|
+
function qi(t) {
|
|
3980
3980
|
var e = w;
|
|
3981
3981
|
w = void 0;
|
|
3982
3982
|
try {
|
|
@@ -3985,8 +3985,8 @@ function Ii(t) {
|
|
|
3985
3985
|
w = e;
|
|
3986
3986
|
}
|
|
3987
3987
|
}
|
|
3988
|
-
var Ke = void 0, ae = 0,
|
|
3989
|
-
function
|
|
3988
|
+
var Ke = void 0, ae = 0, ln = 0, wt = 0;
|
|
3989
|
+
function Mi(t) {
|
|
3990
3990
|
if (w !== void 0) {
|
|
3991
3991
|
var e = t.n;
|
|
3992
3992
|
if (e === void 0 || e.t !== w)
|
|
@@ -3995,31 +3995,31 @@ function $i(t) {
|
|
|
3995
3995
|
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;
|
|
3996
3996
|
}
|
|
3997
3997
|
}
|
|
3998
|
-
function
|
|
3998
|
+
function q(t, e) {
|
|
3999
3999
|
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;
|
|
4000
4000
|
}
|
|
4001
|
-
|
|
4002
|
-
|
|
4001
|
+
q.prototype.brand = za;
|
|
4002
|
+
q.prototype.h = function() {
|
|
4003
4003
|
return !0;
|
|
4004
4004
|
};
|
|
4005
|
-
|
|
4005
|
+
q.prototype.S = function(t) {
|
|
4006
4006
|
var e = this, n = this.t;
|
|
4007
|
-
n !== t && t.e === void 0 && (t.x = n, this.t = t, n !== void 0 ? n.e = t :
|
|
4007
|
+
n !== t && t.e === void 0 && (t.x = n, this.t = t, n !== void 0 ? n.e = t : qi(function() {
|
|
4008
4008
|
var r;
|
|
4009
4009
|
(r = e.W) == null || r.call(e);
|
|
4010
4010
|
}));
|
|
4011
4011
|
};
|
|
4012
|
-
|
|
4012
|
+
q.prototype.U = function(t) {
|
|
4013
4013
|
var e = this;
|
|
4014
4014
|
if (this.t !== void 0) {
|
|
4015
4015
|
var n = t.e, r = t.x;
|
|
4016
|
-
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 &&
|
|
4016
|
+
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 && qi(function() {
|
|
4017
4017
|
var i;
|
|
4018
4018
|
(i = e.Z) == null || i.call(e);
|
|
4019
4019
|
}));
|
|
4020
4020
|
}
|
|
4021
4021
|
};
|
|
4022
|
-
|
|
4022
|
+
q.prototype.subscribe = function(t) {
|
|
4023
4023
|
var e = this;
|
|
4024
4024
|
return at(function() {
|
|
4025
4025
|
var n = e.value, r = w;
|
|
@@ -4031,16 +4031,16 @@ M.prototype.subscribe = function(t) {
|
|
|
4031
4031
|
}
|
|
4032
4032
|
}, { name: "sub" });
|
|
4033
4033
|
};
|
|
4034
|
-
|
|
4034
|
+
q.prototype.valueOf = function() {
|
|
4035
4035
|
return this.value;
|
|
4036
4036
|
};
|
|
4037
|
-
|
|
4037
|
+
q.prototype.toString = function() {
|
|
4038
4038
|
return this.value + "";
|
|
4039
4039
|
};
|
|
4040
|
-
|
|
4040
|
+
q.prototype.toJSON = function() {
|
|
4041
4041
|
return this.value;
|
|
4042
4042
|
};
|
|
4043
|
-
|
|
4043
|
+
q.prototype.peek = function() {
|
|
4044
4044
|
var t = w;
|
|
4045
4045
|
w = void 0;
|
|
4046
4046
|
try {
|
|
@@ -4049,28 +4049,28 @@ M.prototype.peek = function() {
|
|
|
4049
4049
|
w = t;
|
|
4050
4050
|
}
|
|
4051
4051
|
};
|
|
4052
|
-
Object.defineProperty(
|
|
4053
|
-
var t =
|
|
4052
|
+
Object.defineProperty(q.prototype, "value", { get: function() {
|
|
4053
|
+
var t = Mi(this);
|
|
4054
4054
|
return t !== void 0 && (t.i = this.i), this.v;
|
|
4055
4055
|
}, set: function(t) {
|
|
4056
4056
|
if (t !== this.v) {
|
|
4057
|
-
if (
|
|
4057
|
+
if (ln > 100) throw new Error("Cycle detected");
|
|
4058
4058
|
this.v = t, this.i++, wt++, ae++;
|
|
4059
4059
|
try {
|
|
4060
4060
|
for (var e = this.t; e !== void 0; e = e.x) e.t.N();
|
|
4061
4061
|
} finally {
|
|
4062
|
-
|
|
4062
|
+
Pt();
|
|
4063
4063
|
}
|
|
4064
4064
|
}
|
|
4065
4065
|
} });
|
|
4066
|
-
function
|
|
4067
|
-
return new
|
|
4066
|
+
function I(t, e) {
|
|
4067
|
+
return new q(t, e);
|
|
4068
4068
|
}
|
|
4069
|
-
function
|
|
4069
|
+
function Li(t) {
|
|
4070
4070
|
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;
|
|
4071
4071
|
return !1;
|
|
4072
4072
|
}
|
|
4073
|
-
function
|
|
4073
|
+
function Oi(t) {
|
|
4074
4074
|
for (var e = t.s; e !== void 0; e = e.n) {
|
|
4075
4075
|
var n = e.S.n;
|
|
4076
4076
|
if (n !== void 0 && (e.r = n), e.S.n = e, e.i = -1, e.n === void 0) {
|
|
@@ -4079,7 +4079,7 @@ function qi(t) {
|
|
|
4079
4079
|
}
|
|
4080
4080
|
}
|
|
4081
4081
|
}
|
|
4082
|
-
function
|
|
4082
|
+
function zi(t) {
|
|
4083
4083
|
for (var e = t.s, n = void 0; e !== void 0; ) {
|
|
4084
4084
|
var r = e.p;
|
|
4085
4085
|
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;
|
|
@@ -4087,33 +4087,33 @@ function Mi(t) {
|
|
|
4087
4087
|
t.s = n;
|
|
4088
4088
|
}
|
|
4089
4089
|
function ve(t, e) {
|
|
4090
|
-
|
|
4090
|
+
q.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;
|
|
4091
4091
|
}
|
|
4092
|
-
ve.prototype = new
|
|
4092
|
+
ve.prototype = new q();
|
|
4093
4093
|
ve.prototype.h = function() {
|
|
4094
4094
|
if (this.f &= -3, 1 & this.f) return !1;
|
|
4095
4095
|
if ((36 & this.f) == 32 || (this.f &= -5, this.g === wt)) return !0;
|
|
4096
|
-
if (this.g = wt, this.f |= 1, this.i > 0 && !
|
|
4096
|
+
if (this.g = wt, this.f |= 1, this.i > 0 && !Li(this))
|
|
4097
4097
|
return this.f &= -2, !0;
|
|
4098
4098
|
var t = w;
|
|
4099
4099
|
try {
|
|
4100
|
-
|
|
4100
|
+
Oi(this), w = this;
|
|
4101
4101
|
var e = this.x();
|
|
4102
4102
|
(16 & this.f || this.v !== e || this.i === 0) && (this.v = e, this.f &= -17, this.i++);
|
|
4103
4103
|
} catch (n) {
|
|
4104
4104
|
this.v = n, this.f |= 16, this.i++;
|
|
4105
4105
|
}
|
|
4106
|
-
return w = t,
|
|
4106
|
+
return w = t, zi(this), this.f &= -2, !0;
|
|
4107
4107
|
};
|
|
4108
4108
|
ve.prototype.S = function(t) {
|
|
4109
4109
|
if (this.t === void 0) {
|
|
4110
4110
|
this.f |= 36;
|
|
4111
4111
|
for (var e = this.s; e !== void 0; e = e.n) e.S.S(e);
|
|
4112
4112
|
}
|
|
4113
|
-
|
|
4113
|
+
q.prototype.S.call(this, t);
|
|
4114
4114
|
};
|
|
4115
4115
|
ve.prototype.U = function(t) {
|
|
4116
|
-
if (this.t !== void 0 && (
|
|
4116
|
+
if (this.t !== void 0 && (q.prototype.U.call(this, t), this.t === void 0)) {
|
|
4117
4117
|
this.f &= -33;
|
|
4118
4118
|
for (var e = this.s; e !== void 0; e = e.n) e.S.U(e);
|
|
4119
4119
|
}
|
|
@@ -4126,14 +4126,14 @@ ve.prototype.N = function() {
|
|
|
4126
4126
|
};
|
|
4127
4127
|
Object.defineProperty(ve.prototype, "value", { get: function() {
|
|
4128
4128
|
if (1 & this.f) throw new Error("Cycle detected");
|
|
4129
|
-
var t =
|
|
4129
|
+
var t = Mi(this);
|
|
4130
4130
|
if (this.h(), t !== void 0 && (t.i = this.i), 16 & this.f) throw this.v;
|
|
4131
4131
|
return this.v;
|
|
4132
4132
|
} });
|
|
4133
|
-
function
|
|
4133
|
+
function cn(t, e) {
|
|
4134
4134
|
return new ve(t, e);
|
|
4135
4135
|
}
|
|
4136
|
-
function
|
|
4136
|
+
function Ni(t) {
|
|
4137
4137
|
var e = t.u;
|
|
4138
4138
|
if (t.u = void 0, typeof e == "function") {
|
|
4139
4139
|
ae++;
|
|
@@ -4142,24 +4142,24 @@ function Pi(t) {
|
|
|
4142
4142
|
try {
|
|
4143
4143
|
e();
|
|
4144
4144
|
} catch (r) {
|
|
4145
|
-
throw t.f &= -2, t.f |= 8,
|
|
4145
|
+
throw t.f &= -2, t.f |= 8, An(t), r;
|
|
4146
4146
|
} finally {
|
|
4147
|
-
w = n,
|
|
4147
|
+
w = n, Pt();
|
|
4148
4148
|
}
|
|
4149
4149
|
}
|
|
4150
4150
|
}
|
|
4151
|
-
function
|
|
4151
|
+
function An(t) {
|
|
4152
4152
|
for (var e = t.s; e !== void 0; e = e.n) e.S.U(e);
|
|
4153
|
-
t.x = void 0, t.s = void 0,
|
|
4153
|
+
t.x = void 0, t.s = void 0, Ni(t);
|
|
4154
4154
|
}
|
|
4155
|
-
function
|
|
4155
|
+
function Qa(t) {
|
|
4156
4156
|
if (w !== this) throw new Error("Out-of-order effect");
|
|
4157
|
-
|
|
4157
|
+
zi(this), w = t, this.f &= -2, 8 & this.f && An(this), Pt();
|
|
4158
4158
|
}
|
|
4159
|
-
function
|
|
4159
|
+
function Le(t, e) {
|
|
4160
4160
|
this.x = t, this.u = void 0, this.s = void 0, this.o = void 0, this.f = 32, this.name = e?.name;
|
|
4161
4161
|
}
|
|
4162
|
-
|
|
4162
|
+
Le.prototype.c = function() {
|
|
4163
4163
|
var t = this.S();
|
|
4164
4164
|
try {
|
|
4165
4165
|
if (8 & this.f || this.x === void 0) return;
|
|
@@ -4169,23 +4169,23 @@ Pe.prototype.c = function() {
|
|
|
4169
4169
|
t();
|
|
4170
4170
|
}
|
|
4171
4171
|
};
|
|
4172
|
-
|
|
4172
|
+
Le.prototype.S = function() {
|
|
4173
4173
|
if (1 & this.f) throw new Error("Cycle detected");
|
|
4174
|
-
this.f |= 1, this.f &= -9,
|
|
4174
|
+
this.f |= 1, this.f &= -9, Ni(this), Oi(this), ae++;
|
|
4175
4175
|
var t = w;
|
|
4176
|
-
return w = this,
|
|
4176
|
+
return w = this, Qa.bind(this, t);
|
|
4177
4177
|
};
|
|
4178
|
-
|
|
4178
|
+
Le.prototype.N = function() {
|
|
4179
4179
|
2 & this.f || (this.f |= 2, this.o = Ke, Ke = this);
|
|
4180
4180
|
};
|
|
4181
|
-
|
|
4182
|
-
this.f |= 8, 1 & this.f ||
|
|
4181
|
+
Le.prototype.d = function() {
|
|
4182
|
+
this.f |= 8, 1 & this.f || An(this);
|
|
4183
4183
|
};
|
|
4184
|
-
|
|
4184
|
+
Le.prototype.dispose = function() {
|
|
4185
4185
|
this.d();
|
|
4186
4186
|
};
|
|
4187
4187
|
function at(t, e) {
|
|
4188
|
-
var n = new
|
|
4188
|
+
var n = new Le(t, e);
|
|
4189
4189
|
try {
|
|
4190
4190
|
n.c();
|
|
4191
4191
|
} catch (i) {
|
|
@@ -4194,11 +4194,11 @@ function at(t, e) {
|
|
|
4194
4194
|
var r = n.d.bind(n);
|
|
4195
4195
|
return r[Symbol.dispose] = r, r;
|
|
4196
4196
|
}
|
|
4197
|
-
var
|
|
4197
|
+
var Qi, pt, Ua = typeof window < "u" && !!window.__PREACT_SIGNALS_DEVTOOLS__, Ui = [];
|
|
4198
4198
|
at(function() {
|
|
4199
|
-
|
|
4199
|
+
Qi = this.N;
|
|
4200
4200
|
})();
|
|
4201
|
-
function
|
|
4201
|
+
function Oe(t, e) {
|
|
4202
4202
|
b[t] = e.bind(null, b[t] || function() {
|
|
4203
4203
|
});
|
|
4204
4204
|
}
|
|
@@ -4209,21 +4209,21 @@ function _t(t) {
|
|
|
4209
4209
|
}
|
|
4210
4210
|
pt = t && t.S();
|
|
4211
4211
|
}
|
|
4212
|
-
function
|
|
4213
|
-
var e = this, n = t.data, r =
|
|
4212
|
+
function Fi(t) {
|
|
4213
|
+
var e = this, n = t.data, r = Re(n);
|
|
4214
4214
|
r.value = n;
|
|
4215
4215
|
var i = J(function() {
|
|
4216
4216
|
for (var l = e, a = e.__v; a = a.__; ) if (a.__c) {
|
|
4217
4217
|
a.__c.__$f |= 4;
|
|
4218
4218
|
break;
|
|
4219
4219
|
}
|
|
4220
|
-
var u =
|
|
4220
|
+
var u = cn(function() {
|
|
4221
4221
|
var f = r.value.value;
|
|
4222
4222
|
return f === 0 ? 0 : f === !0 ? "" : f || "";
|
|
4223
|
-
}), d =
|
|
4224
|
-
return !Array.isArray(u.value) && !
|
|
4223
|
+
}), d = cn(function() {
|
|
4224
|
+
return !Array.isArray(u.value) && !Hr(u.value);
|
|
4225
4225
|
}), h = at(function() {
|
|
4226
|
-
if (this.N =
|
|
4226
|
+
if (this.N = Di, d.value) {
|
|
4227
4227
|
var f = u.value;
|
|
4228
4228
|
l.__v && l.__v.__e && l.__v.__e.nodeType === 3 && (l.__v.__e.data = f);
|
|
4229
4229
|
}
|
|
@@ -4234,21 +4234,21 @@ function zi(t) {
|
|
|
4234
4234
|
}, []), o = i[0], s = i[1];
|
|
4235
4235
|
return o.value ? s.peek() : s.value;
|
|
4236
4236
|
}
|
|
4237
|
-
|
|
4238
|
-
Object.defineProperties(
|
|
4237
|
+
Fi.displayName = "ReactiveTextNode";
|
|
4238
|
+
Object.defineProperties(q.prototype, { constructor: { configurable: !0, value: void 0 }, type: { configurable: !0, value: Fi }, props: { configurable: !0, get: function() {
|
|
4239
4239
|
return { data: this };
|
|
4240
4240
|
} }, __b: { configurable: !0, value: 1 } });
|
|
4241
|
-
|
|
4241
|
+
Oe("__b", function(t, e) {
|
|
4242
4242
|
if (typeof e.type == "string") {
|
|
4243
4243
|
var n, r = e.props;
|
|
4244
4244
|
for (var i in r) if (i !== "children") {
|
|
4245
4245
|
var o = r[i];
|
|
4246
|
-
o instanceof
|
|
4246
|
+
o instanceof q && (n || (e.__np = n = {}), n[i] = o, r[i] = o.peek());
|
|
4247
4247
|
}
|
|
4248
4248
|
}
|
|
4249
4249
|
t(e);
|
|
4250
4250
|
});
|
|
4251
|
-
|
|
4251
|
+
Oe("__r", function(t, e) {
|
|
4252
4252
|
if (t(e), e.type !== Q) {
|
|
4253
4253
|
_t();
|
|
4254
4254
|
var n, r = e.__c;
|
|
@@ -4259,14 +4259,14 @@ Le("__r", function(t, e) {
|
|
|
4259
4259
|
}, { name: o }), s.c = i, s;
|
|
4260
4260
|
})(function() {
|
|
4261
4261
|
var i;
|
|
4262
|
-
|
|
4262
|
+
Ua && ((i = n.y) == null || i.call(n)), r.__$f |= 1, r.setState({});
|
|
4263
4263
|
}, typeof e.type == "function" ? e.type.displayName || e.type.name : ""))), _t(n);
|
|
4264
4264
|
}
|
|
4265
4265
|
});
|
|
4266
|
-
|
|
4266
|
+
Oe("__e", function(t, e, n, r) {
|
|
4267
4267
|
_t(), t(e, n, r);
|
|
4268
4268
|
});
|
|
4269
|
-
|
|
4269
|
+
Oe("diffed", function(t, e) {
|
|
4270
4270
|
_t();
|
|
4271
4271
|
var n;
|
|
4272
4272
|
if (typeof e.type == "string" && (n = e.__e)) {
|
|
@@ -4281,23 +4281,23 @@ Le("diffed", function(t, e) {
|
|
|
4281
4281
|
o = {}, n.U = o;
|
|
4282
4282
|
for (var a in r) {
|
|
4283
4283
|
var u = o[a], d = r[a];
|
|
4284
|
-
u === void 0 ? (u =
|
|
4284
|
+
u === void 0 ? (u = Fa(n, a, d, i), o[a] = u) : u.o(d, i);
|
|
4285
4285
|
}
|
|
4286
4286
|
}
|
|
4287
4287
|
}
|
|
4288
4288
|
t(e);
|
|
4289
4289
|
});
|
|
4290
|
-
function
|
|
4291
|
-
var i = e in t && t.ownerSVGElement === void 0, o =
|
|
4290
|
+
function Fa(t, e, n, r) {
|
|
4291
|
+
var i = e in t && t.ownerSVGElement === void 0, o = I(n);
|
|
4292
4292
|
return { o: function(s, l) {
|
|
4293
4293
|
o.value = s, r = l;
|
|
4294
4294
|
}, d: at(function() {
|
|
4295
|
-
this.N =
|
|
4295
|
+
this.N = Di;
|
|
4296
4296
|
var s = o.value.value;
|
|
4297
4297
|
r[e] !== s && (r[e] = s, i ? t[e] = s : s != null && (s !== !1 || e[4] === "-") ? t.setAttribute(e, s) : t.removeAttribute(e));
|
|
4298
4298
|
}) };
|
|
4299
4299
|
}
|
|
4300
|
-
|
|
4300
|
+
Oe("unmount", function(t, e) {
|
|
4301
4301
|
if (typeof e.type == "string") {
|
|
4302
4302
|
var n = e.__e;
|
|
4303
4303
|
if (n) {
|
|
@@ -4319,7 +4319,7 @@ Le("unmount", function(t, e) {
|
|
|
4319
4319
|
}
|
|
4320
4320
|
t(e);
|
|
4321
4321
|
});
|
|
4322
|
-
|
|
4322
|
+
Oe("__h", function(t, e, n, r) {
|
|
4323
4323
|
(r < 3 || r === 9) && (e.__$f |= 2), t(e, n, r);
|
|
4324
4324
|
});
|
|
4325
4325
|
W.prototype.shouldComponentUpdate = function(t, e) {
|
|
@@ -4334,32 +4334,32 @@ W.prototype.shouldComponentUpdate = function(t, e) {
|
|
|
4334
4334
|
for (var l in this.props) if (!(l in t)) return !0;
|
|
4335
4335
|
return !1;
|
|
4336
4336
|
};
|
|
4337
|
-
function
|
|
4337
|
+
function Re(t, e) {
|
|
4338
4338
|
return J(function() {
|
|
4339
|
-
return
|
|
4339
|
+
return I(t, e);
|
|
4340
4340
|
}, []);
|
|
4341
4341
|
}
|
|
4342
|
-
var
|
|
4342
|
+
var Da = function(t) {
|
|
4343
4343
|
queueMicrotask(function() {
|
|
4344
4344
|
queueMicrotask(t);
|
|
4345
4345
|
});
|
|
4346
4346
|
};
|
|
4347
|
-
function
|
|
4348
|
-
|
|
4349
|
-
for (var t; t =
|
|
4347
|
+
function Ba() {
|
|
4348
|
+
Na(function() {
|
|
4349
|
+
for (var t; t = Ui.shift(); ) Qi.call(t);
|
|
4350
4350
|
});
|
|
4351
4351
|
}
|
|
4352
|
-
function
|
|
4353
|
-
|
|
4352
|
+
function Di() {
|
|
4353
|
+
Ui.push(this) === 1 && (b.requestAnimationFrame || Da)(Ba);
|
|
4354
4354
|
}
|
|
4355
|
-
const
|
|
4356
|
-
function
|
|
4355
|
+
const P = I(!1), jt = I(void 0), le = I(void 0), un = I([]), hn = I([]), Bi = I(null);
|
|
4356
|
+
function Va(t) {
|
|
4357
4357
|
return t.replace(/\.convex\.site\b/, ".convex.cloud");
|
|
4358
4358
|
}
|
|
4359
|
-
function
|
|
4359
|
+
function Vi(t) {
|
|
4360
4360
|
return t.replace(/\.convex\.cloud\b/, ".convex.site");
|
|
4361
4361
|
}
|
|
4362
|
-
function
|
|
4362
|
+
function Ha(t, e) {
|
|
4363
4363
|
const n = t.title ?? e?.title ?? "Assistant";
|
|
4364
4364
|
return {
|
|
4365
4365
|
title: n,
|
|
@@ -4381,23 +4381,23 @@ function Fa(t, e) {
|
|
|
4381
4381
|
windowHeight: t.windowHeight ?? e?.windowHeight
|
|
4382
4382
|
};
|
|
4383
4383
|
}
|
|
4384
|
-
async function
|
|
4384
|
+
async function Wa(t, e, n, r) {
|
|
4385
4385
|
const i = new URL(`${t}/widget/config`);
|
|
4386
4386
|
i.searchParams.set("orgSlug", e), r && i.searchParams.set("projSlug", r);
|
|
4387
4387
|
const o = await fetch(i.toString(), { signal: n });
|
|
4388
4388
|
return o.ok ? o.json() : null;
|
|
4389
4389
|
}
|
|
4390
|
-
function
|
|
4390
|
+
function Ja(t, e, n) {
|
|
4391
4391
|
const [r, i] = C(null);
|
|
4392
|
-
return
|
|
4392
|
+
return R(() => {
|
|
4393
4393
|
i(null);
|
|
4394
|
-
const o = n ?? "https://festive-mouse-978.eu-west-1.convex.cloud", s = o ?
|
|
4394
|
+
const o = n ?? "https://festive-mouse-978.eu-west-1.convex.cloud", s = o ? Vi(o) : void 0;
|
|
4395
4395
|
if (!s || !t)
|
|
4396
4396
|
return;
|
|
4397
4397
|
const l = new AbortController();
|
|
4398
4398
|
async function a(u) {
|
|
4399
4399
|
try {
|
|
4400
|
-
const d = await
|
|
4400
|
+
const d = await Wa(u, t, l.signal, e);
|
|
4401
4401
|
d && i(d);
|
|
4402
4402
|
} catch (d) {
|
|
4403
4403
|
if (d instanceof Error && d.name === "AbortError")
|
|
@@ -4409,7 +4409,7 @@ function Ua(t, e, n) {
|
|
|
4409
4409
|
};
|
|
4410
4410
|
}, [t, e, n]), r;
|
|
4411
4411
|
}
|
|
4412
|
-
async function
|
|
4412
|
+
async function Hi(t, e, n) {
|
|
4413
4413
|
try {
|
|
4414
4414
|
const r = await fetch(`${e}/widget/bootstrap`, {
|
|
4415
4415
|
method: "POST",
|
|
@@ -4418,39 +4418,99 @@ async function Di(t, e, n) {
|
|
|
4418
4418
|
credentials: "omit"
|
|
4419
4419
|
});
|
|
4420
4420
|
if (r.ok) {
|
|
4421
|
-
const i = await r.json();
|
|
4422
|
-
return { ok: !0, token: i.token, excludePaths: i.excludePaths };
|
|
4421
|
+
const i = await r.json(), o = i.allowedUrls ?? (i.allowedUrl ? [i.allowedUrl] : []);
|
|
4422
|
+
return { ok: !0, token: i.token, excludePaths: i.excludePaths, allowedUrls: o };
|
|
4423
4423
|
}
|
|
4424
4424
|
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" };
|
|
4425
4425
|
} catch {
|
|
4426
4426
|
return { ok: !1, error: "network" };
|
|
4427
4427
|
}
|
|
4428
4428
|
}
|
|
4429
|
-
function
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4429
|
+
function Ka(t, e) {
|
|
4430
|
+
return e.some((n) => n === "/" ? t === "/" : t === n || t.startsWith(n + "/"));
|
|
4431
|
+
}
|
|
4432
|
+
function _r(t, e) {
|
|
4433
|
+
try {
|
|
4434
|
+
const n = new URL(t), r = new URL(e);
|
|
4435
|
+
if (n.origin !== r.origin)
|
|
4436
|
+
return !1;
|
|
4437
|
+
const i = r.pathname.replace(/\/$/, "");
|
|
4438
|
+
if (!i)
|
|
4439
|
+
return !0;
|
|
4440
|
+
const o = n.pathname.replace(/\/$/, "");
|
|
4441
|
+
return o === i || o.startsWith(i + "/");
|
|
4442
|
+
} catch {
|
|
4443
|
+
return !1;
|
|
4444
|
+
}
|
|
4445
|
+
}
|
|
4446
|
+
function Za({
|
|
4447
|
+
orgSlug: t,
|
|
4448
|
+
projSlug: e,
|
|
4449
|
+
preToken: n,
|
|
4450
|
+
convexUrl: r,
|
|
4451
|
+
preAllowedUrls: i,
|
|
4452
|
+
preExcludedPaths: o
|
|
4453
|
+
}) {
|
|
4454
|
+
R(() => {
|
|
4455
|
+
const s = r ?? "https://festive-mouse-978.eu-west-1.convex.cloud", l = s ? Vi(s) : void 0;
|
|
4456
|
+
if (!l || !t)
|
|
4433
4457
|
return;
|
|
4434
|
-
|
|
4458
|
+
if (Bi.value = { orgSlug: t, projSlug: e, siteUrl: l }, n) {
|
|
4459
|
+
un.value = i ?? [], hn.value = o ?? [];
|
|
4460
|
+
return;
|
|
4461
|
+
}
|
|
4462
|
+
let a = !1;
|
|
4435
4463
|
return (async () => {
|
|
4436
|
-
const
|
|
4437
|
-
if (!
|
|
4438
|
-
if (
|
|
4439
|
-
le.value =
|
|
4464
|
+
const u = await Hi(t, l, e);
|
|
4465
|
+
if (!a)
|
|
4466
|
+
if (u.ok)
|
|
4467
|
+
le.value = u.token, un.value = u.allowedUrls, hn.value = u.excludePaths;
|
|
4440
4468
|
else {
|
|
4441
|
-
const
|
|
4442
|
-
|
|
4443
|
-
`[JexityChat]
|
|
4444
|
-
) :
|
|
4445
|
-
`[JexityChat] Bootstrap rate-limited for ${
|
|
4446
|
-
) : console.error(`[JexityChat] Bootstrap failed: ${
|
|
4469
|
+
const d = e ? `project '${t}/${e}'` : `org '${t}'`;
|
|
4470
|
+
u.error === "unauthorized" ? console.warn(
|
|
4471
|
+
`[JexityChat] Domain not authorized for ${d}. Check the widget's domain rules.`
|
|
4472
|
+
) : u.error === "not_found" ? console.error(`[JexityChat] No active widget config found for ${d}.`) : u.error === "rate_limited" ? console.error(
|
|
4473
|
+
`[JexityChat] Bootstrap rate-limited for ${d}. Retry after ${u.retryAfterSec ?? 60}s.`
|
|
4474
|
+
) : console.error(`[JexityChat] Bootstrap failed: ${u.error}`);
|
|
4447
4475
|
}
|
|
4448
4476
|
})(), () => {
|
|
4449
|
-
|
|
4477
|
+
a = !0;
|
|
4450
4478
|
};
|
|
4451
4479
|
}, [t, e, n, r]);
|
|
4452
4480
|
}
|
|
4453
|
-
const
|
|
4481
|
+
const St = /* @__PURE__ */ new Set();
|
|
4482
|
+
let jr = !1;
|
|
4483
|
+
function Ga() {
|
|
4484
|
+
if (jr)
|
|
4485
|
+
return;
|
|
4486
|
+
jr = !0;
|
|
4487
|
+
const t = history.pushState.bind(history), e = history.replaceState.bind(history);
|
|
4488
|
+
history.pushState = function(...n) {
|
|
4489
|
+
t(...n), St.forEach((r) => r());
|
|
4490
|
+
}, history.replaceState = function(...n) {
|
|
4491
|
+
e(...n), St.forEach((r) => r());
|
|
4492
|
+
};
|
|
4493
|
+
}
|
|
4494
|
+
function Ya(t) {
|
|
4495
|
+
return St.add(t), window.addEventListener("popstate", t), Ga(), () => {
|
|
4496
|
+
St.delete(t), window.removeEventListener("popstate", t);
|
|
4497
|
+
};
|
|
4498
|
+
}
|
|
4499
|
+
function Xa() {
|
|
4500
|
+
const t = Re(window.location.href);
|
|
4501
|
+
R(() => Ya(() => {
|
|
4502
|
+
t.value = window.location.href;
|
|
4503
|
+
}), []);
|
|
4504
|
+
const e = un.value, n = hn.value, r = new URL(t.value).pathname, i = Ka(r, n);
|
|
4505
|
+
return R(() => {
|
|
4506
|
+
i ? console.warn(
|
|
4507
|
+
`[JexityChat] Widget hidden — current path is in the exclude list: ${r}`
|
|
4508
|
+
) : e.length > 0 && !e.some((o) => _r(t.value, o)) && console.warn(
|
|
4509
|
+
`[JexityChat] Widget hidden — current page does not match path rule. Allowed: ${e.join(", ")}`
|
|
4510
|
+
);
|
|
4511
|
+
}, [t.value, e, n]), i ? !1 : e.length === 0 ? !0 : e.some((o) => _r(t.value, o));
|
|
4512
|
+
}
|
|
4513
|
+
const Wi = {
|
|
4454
4514
|
title: "Assistant",
|
|
4455
4515
|
statusOnline: "Online · Responds in seconds",
|
|
4456
4516
|
inputPlaceholder: "Type a message…",
|
|
@@ -4497,7 +4557,8 @@ const Ui = {
|
|
|
4497
4557
|
escalationSubmit: "Send to team",
|
|
4498
4558
|
escalationSubmitting: "Sending…",
|
|
4499
4559
|
escalationSubmitted: "Request submitted",
|
|
4500
|
-
escalationConsent: "
|
|
4560
|
+
escalationConsent: "By submitting, you agree to our",
|
|
4561
|
+
escalationPrivacyLinkText: "Privacy Policy",
|
|
4501
4562
|
escalationSkip: "Skip, I’ll wait here",
|
|
4502
4563
|
escalationPromptTitle: "Talk to our team",
|
|
4503
4564
|
escalationPromptSubtitle: "We can notify you by email when our team replies.",
|
|
@@ -4533,8 +4594,10 @@ Use it to resume this conversation from any device.`,
|
|
|
4533
4594
|
noticeAgentHandling: "Your conversation is with a human agent who will respond shortly.",
|
|
4534
4595
|
replyTo: "Reply to {name}",
|
|
4535
4596
|
sourcesCountOne: "{count} source",
|
|
4536
|
-
sourcesCountOther: "{count} sources"
|
|
4537
|
-
|
|
4597
|
+
sourcesCountOther: "{count} sources",
|
|
4598
|
+
privacyNoticePre: "By chatting, you agree to our",
|
|
4599
|
+
privacyPolicyLinkText: "Privacy Policy"
|
|
4600
|
+
}, el = {
|
|
4538
4601
|
title: "Assistent",
|
|
4539
4602
|
statusOnline: "Online · Antwortet in Sekunden",
|
|
4540
4603
|
inputPlaceholder: "Nachricht eingeben…",
|
|
@@ -4581,7 +4644,8 @@ Use it to resume this conversation from any device.`,
|
|
|
4581
4644
|
escalationSubmit: "An Team senden",
|
|
4582
4645
|
escalationSubmitting: "Wird gesendet…",
|
|
4583
4646
|
escalationSubmitted: "Anfrage gesendet",
|
|
4584
|
-
escalationConsent: "
|
|
4647
|
+
escalationConsent: "Mit dem Absenden stimmen Sie unserer",
|
|
4648
|
+
escalationPrivacyLinkText: "Datenschutzerklärung",
|
|
4585
4649
|
escalationSkip: "Überspringen, ich warte hier",
|
|
4586
4650
|
escalationPromptTitle: "Sprechen Sie mit unserem Team",
|
|
4587
4651
|
escalationPromptSubtitle: "Wir benachrichtigen Sie per E-Mail, wenn wir antworten.",
|
|
@@ -4617,62 +4681,64 @@ Verwenden Sie sie, um diese Unterhaltung auf jedem Gerät fortzusetzen.`,
|
|
|
4617
4681
|
noticeAgentHandling: "Ihre Unterhaltung wird von einem menschlichen Mitarbeiter betreut, der in Kürze antwortet.",
|
|
4618
4682
|
replyTo: "Antworten an {name}",
|
|
4619
4683
|
sourcesCountOne: "{count} Quelle",
|
|
4620
|
-
sourcesCountOther: "{count} Quellen"
|
|
4621
|
-
|
|
4684
|
+
sourcesCountOther: "{count} Quellen",
|
|
4685
|
+
privacyNoticePre: "Mit dem Chatten stimmst du unserer",
|
|
4686
|
+
privacyPolicyLinkText: "Datenschutzerklärung"
|
|
4687
|
+
}, tl = [
|
|
4622
4688
|
{ value: "de", label: "Deutsch", flag: "🇩🇪" },
|
|
4623
4689
|
{ value: "en", label: "English", flag: "🇬🇧" }
|
|
4624
|
-
],
|
|
4625
|
-
function
|
|
4626
|
-
return
|
|
4690
|
+
], nl = "de", rl = "jex-locale", In = I("de"), il = { en: Wi, de: el };
|
|
4691
|
+
function T() {
|
|
4692
|
+
return il[In.value] ?? Wi;
|
|
4627
4693
|
}
|
|
4628
|
-
function
|
|
4694
|
+
function Jt(t) {
|
|
4629
4695
|
if (!t)
|
|
4630
4696
|
return null;
|
|
4631
4697
|
const e = (t.split("-")[0] ?? "").toLowerCase();
|
|
4632
|
-
return
|
|
4698
|
+
return tl.some((n) => n.value === e) ? e : null;
|
|
4633
4699
|
}
|
|
4634
|
-
function
|
|
4635
|
-
const e =
|
|
4700
|
+
function Ji(t) {
|
|
4701
|
+
const e = Jt(t);
|
|
4636
4702
|
if (e)
|
|
4637
4703
|
return e;
|
|
4638
4704
|
try {
|
|
4639
|
-
const n =
|
|
4705
|
+
const n = Jt(localStorage.getItem(rl));
|
|
4640
4706
|
if (n)
|
|
4641
4707
|
return n;
|
|
4642
4708
|
} catch {
|
|
4643
4709
|
}
|
|
4644
4710
|
if (typeof navigator < "u") {
|
|
4645
|
-
const n =
|
|
4711
|
+
const n = Jt(navigator.language);
|
|
4646
4712
|
if (n)
|
|
4647
4713
|
return n;
|
|
4648
4714
|
}
|
|
4649
|
-
return
|
|
4715
|
+
return nl;
|
|
4650
4716
|
}
|
|
4651
|
-
function
|
|
4652
|
-
|
|
4717
|
+
function ol(t) {
|
|
4718
|
+
R(() => {
|
|
4653
4719
|
function e(n) {
|
|
4654
4720
|
const r = t ?? window.location.origin;
|
|
4655
4721
|
if (n.origin !== r || n.data?.type !== "jexity:config")
|
|
4656
4722
|
return;
|
|
4657
4723
|
const { locale: i } = n.data.payload;
|
|
4658
|
-
i && (
|
|
4724
|
+
i && (In.value = Ji(i));
|
|
4659
4725
|
}
|
|
4660
4726
|
return window.addEventListener("message", e), () => {
|
|
4661
4727
|
window.removeEventListener("message", e);
|
|
4662
4728
|
};
|
|
4663
4729
|
}, [t]);
|
|
4664
4730
|
}
|
|
4665
|
-
const
|
|
4666
|
-
function
|
|
4731
|
+
const Ki = "jex-session-history", Zi = Ki, Gi = 3600 * 1e3, z = I([]), xe = I(null), Yi = cn(() => z.value.length > 0), Ze = I(null);
|
|
4732
|
+
function sl() {
|
|
4667
4733
|
return "JEX-" + Math.random().toString(36).slice(2, 8).toUpperCase();
|
|
4668
4734
|
}
|
|
4669
|
-
function
|
|
4735
|
+
function al(t) {
|
|
4670
4736
|
try {
|
|
4671
|
-
const e = sessionStorage.getItem(
|
|
4737
|
+
const e = sessionStorage.getItem(Zi);
|
|
4672
4738
|
if (!e)
|
|
4673
4739
|
return [];
|
|
4674
4740
|
const n = JSON.parse(e);
|
|
4675
|
-
return n.v !== 1 || !Array.isArray(n.entries) ? [] : n.entries.filter((r) => t - r.lastActivityAt <=
|
|
4741
|
+
return n.v !== 1 || !Array.isArray(n.entries) ? [] : n.entries.filter((r) => t - r.lastActivityAt <= Gi);
|
|
4676
4742
|
} catch {
|
|
4677
4743
|
return [];
|
|
4678
4744
|
}
|
|
@@ -4680,25 +4746,25 @@ function Ya(t) {
|
|
|
4680
4746
|
function qt(t) {
|
|
4681
4747
|
try {
|
|
4682
4748
|
const e = { v: 1, entries: t };
|
|
4683
|
-
sessionStorage.setItem(
|
|
4749
|
+
sessionStorage.setItem(Zi, JSON.stringify(e));
|
|
4684
4750
|
} catch {
|
|
4685
4751
|
}
|
|
4686
4752
|
}
|
|
4687
|
-
function
|
|
4688
|
-
const t = Date.now(), e =
|
|
4689
|
-
z.value = e, qt(e), xe.value = e
|
|
4753
|
+
function ll() {
|
|
4754
|
+
const t = Date.now(), e = al(t);
|
|
4755
|
+
z.value = e, qt(e), xe.value = e[e.length - 1]?.ref ?? null;
|
|
4690
4756
|
}
|
|
4691
|
-
function
|
|
4692
|
-
const t =
|
|
4757
|
+
function Sr() {
|
|
4758
|
+
const t = sl(), e = Date.now(), n = [...z.value, { ref: t, startedAt: e, lastActivityAt: e }];
|
|
4693
4759
|
return z.value = n, xe.value = t, qt(n), t;
|
|
4694
4760
|
}
|
|
4695
|
-
function
|
|
4761
|
+
function Cr(t) {
|
|
4696
4762
|
const e = Date.now(), n = z.value.map(
|
|
4697
4763
|
(r) => r.ref === t ? { ...r, lastActivityAt: e } : r
|
|
4698
4764
|
);
|
|
4699
4765
|
z.value = n, xe.value = t, qt(n);
|
|
4700
4766
|
}
|
|
4701
|
-
function
|
|
4767
|
+
function $n(t) {
|
|
4702
4768
|
if (!t)
|
|
4703
4769
|
return;
|
|
4704
4770
|
const e = Date.now(), n = z.value.map(
|
|
@@ -4706,46 +4772,46 @@ function Tn(t) {
|
|
|
4706
4772
|
);
|
|
4707
4773
|
z.value = n, qt(n);
|
|
4708
4774
|
}
|
|
4709
|
-
const N =
|
|
4710
|
-
function
|
|
4711
|
-
return
|
|
4775
|
+
const N = I(Xi());
|
|
4776
|
+
function Xi() {
|
|
4777
|
+
return Yi.value ? [{ id: "home" }] : [{ id: "chat" }];
|
|
4712
4778
|
}
|
|
4713
|
-
function
|
|
4714
|
-
N.value =
|
|
4779
|
+
function cl() {
|
|
4780
|
+
N.value = Xi();
|
|
4715
4781
|
}
|
|
4716
|
-
const
|
|
4782
|
+
const ul = I("screen");
|
|
4717
4783
|
function fe(t) {
|
|
4718
4784
|
N.value = [...N.value, t];
|
|
4719
4785
|
}
|
|
4720
|
-
function
|
|
4786
|
+
function Ct() {
|
|
4721
4787
|
N.value.length > 1 && (N.value = N.value.slice(0, -1));
|
|
4722
4788
|
}
|
|
4723
|
-
function
|
|
4789
|
+
function dn(t) {
|
|
4724
4790
|
N.value = [...N.value.slice(0, -1), t];
|
|
4725
4791
|
}
|
|
4726
|
-
const
|
|
4727
|
-
function
|
|
4728
|
-
return
|
|
4729
|
-
|
|
4792
|
+
const hl = 6e4, nt = I(!1), pn = I(!1), fn = /* @__PURE__ */ new Set();
|
|
4793
|
+
function dl(t) {
|
|
4794
|
+
return fn.add(t), () => {
|
|
4795
|
+
fn.delete(t);
|
|
4730
4796
|
};
|
|
4731
4797
|
}
|
|
4732
|
-
function
|
|
4798
|
+
function pl() {
|
|
4733
4799
|
const t = xe.value;
|
|
4734
4800
|
return t ? z.value.find((e) => e.ref === t)?.lastActivityAt ?? null : null;
|
|
4735
4801
|
}
|
|
4736
|
-
function
|
|
4737
|
-
const e =
|
|
4802
|
+
function fl(t) {
|
|
4803
|
+
const e = pl();
|
|
4738
4804
|
return e === null ? !1 : Date.now() - e > t;
|
|
4739
4805
|
}
|
|
4740
|
-
function
|
|
4806
|
+
function Rr() {
|
|
4741
4807
|
if (!(nt.value && z.value.length === 0)) {
|
|
4742
4808
|
z.value = [], xe.value = null;
|
|
4743
4809
|
try {
|
|
4744
|
-
sessionStorage.removeItem(
|
|
4810
|
+
sessionStorage.removeItem(Ki);
|
|
4745
4811
|
} catch (t) {
|
|
4746
4812
|
console.warn("[JexityChat] Idle-lock storage clear failed:", t);
|
|
4747
4813
|
}
|
|
4748
|
-
for (const t of
|
|
4814
|
+
for (const t of fn)
|
|
4749
4815
|
try {
|
|
4750
4816
|
t();
|
|
4751
4817
|
} catch (e) {
|
|
@@ -4754,27 +4820,27 @@ function wr() {
|
|
|
4754
4820
|
N.value = [{ id: "home" }], nt.value = !0;
|
|
4755
4821
|
}
|
|
4756
4822
|
}
|
|
4757
|
-
function
|
|
4823
|
+
function Kt() {
|
|
4758
4824
|
nt.value && (nt.value = !1);
|
|
4759
4825
|
}
|
|
4760
|
-
function
|
|
4826
|
+
function gl(t = Gi) {
|
|
4761
4827
|
let e = null;
|
|
4762
4828
|
const n = () => {
|
|
4763
4829
|
if (document.visibilityState === "hidden") {
|
|
4764
4830
|
e = Date.now();
|
|
4765
4831
|
return;
|
|
4766
4832
|
}
|
|
4767
|
-
e !== null && Date.now() - e > t &&
|
|
4833
|
+
e !== null && Date.now() - e > t && Rr(), e = null;
|
|
4768
4834
|
};
|
|
4769
4835
|
document.addEventListener("visibilitychange", n);
|
|
4770
4836
|
const r = setInterval(() => {
|
|
4771
|
-
|
|
4772
|
-
},
|
|
4837
|
+
pn.value || fl(t) && Rr();
|
|
4838
|
+
}, hl);
|
|
4773
4839
|
return () => {
|
|
4774
4840
|
document.removeEventListener("visibilitychange", n), clearInterval(r), e = null;
|
|
4775
4841
|
};
|
|
4776
4842
|
}
|
|
4777
|
-
function
|
|
4843
|
+
function ml(t) {
|
|
4778
4844
|
const e = {}, { primaryColor: n, theme: r } = t;
|
|
4779
4845
|
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) {
|
|
4780
4846
|
const i = r.bg;
|
|
@@ -4790,7 +4856,7 @@ function al(t) {
|
|
|
4790
4856
|
}
|
|
4791
4857
|
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;
|
|
4792
4858
|
}
|
|
4793
|
-
function
|
|
4859
|
+
function En({ size: t = 24 }) {
|
|
4794
4860
|
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: [
|
|
4795
4861
|
/* @__PURE__ */ c("path", { d: "M12 8V4H8" }),
|
|
4796
4862
|
/* @__PURE__ */ c("rect", { width: "16", height: "12", x: "4", y: "8", rx: "2" }),
|
|
@@ -4800,64 +4866,64 @@ function An({ size: t = 24 }) {
|
|
|
4800
4866
|
/* @__PURE__ */ c("path", { d: "M9 13v2" })
|
|
4801
4867
|
] });
|
|
4802
4868
|
}
|
|
4803
|
-
function
|
|
4804
|
-
const t =
|
|
4869
|
+
function xl() {
|
|
4870
|
+
const t = T();
|
|
4805
4871
|
return N.value.length > 1 ? /* @__PURE__ */ c(
|
|
4806
4872
|
"button",
|
|
4807
4873
|
{
|
|
4808
4874
|
class: "jex-header-back",
|
|
4809
|
-
onClick:
|
|
4875
|
+
onClick: Ct,
|
|
4810
4876
|
"aria-label": t.back || "Go back",
|
|
4811
4877
|
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" }) })
|
|
4812
4878
|
}
|
|
4813
|
-
) : /* @__PURE__ */ c(
|
|
4879
|
+
) : /* @__PURE__ */ c(En, { size: 24 });
|
|
4814
4880
|
}
|
|
4815
|
-
function
|
|
4816
|
-
const e =
|
|
4881
|
+
function bl({ title: t }) {
|
|
4882
|
+
const e = T();
|
|
4817
4883
|
return /* @__PURE__ */ c("div", { class: "jex-header-info", children: [
|
|
4818
4884
|
/* @__PURE__ */ c("h3", { children: t }),
|
|
4819
4885
|
/* @__PURE__ */ c("p", { children: e.statusOnline })
|
|
4820
4886
|
] });
|
|
4821
4887
|
}
|
|
4822
|
-
function
|
|
4888
|
+
function eo({ size: t = 28 }) {
|
|
4823
4889
|
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: [
|
|
4824
4890
|
/* @__PURE__ */ c("path", { d: "M18 6 6 18" }),
|
|
4825
4891
|
/* @__PURE__ */ c("path", { d: "m6 6 12 12" })
|
|
4826
4892
|
] });
|
|
4827
4893
|
}
|
|
4828
|
-
function
|
|
4829
|
-
const t =
|
|
4894
|
+
function vl() {
|
|
4895
|
+
const t = T();
|
|
4830
4896
|
return /* @__PURE__ */ c(
|
|
4831
4897
|
"button",
|
|
4832
4898
|
{
|
|
4833
4899
|
class: "jex-header-close",
|
|
4834
4900
|
type: "button",
|
|
4835
4901
|
onClick: () => {
|
|
4836
|
-
|
|
4902
|
+
P.value = !1;
|
|
4837
4903
|
},
|
|
4838
4904
|
"aria-label": t.closeChatAriaLabel,
|
|
4839
4905
|
title: t.closeChatAriaLabel,
|
|
4840
|
-
children: /* @__PURE__ */ c(
|
|
4906
|
+
children: /* @__PURE__ */ c(eo, { size: 18 })
|
|
4841
4907
|
}
|
|
4842
4908
|
);
|
|
4843
4909
|
}
|
|
4844
|
-
function
|
|
4910
|
+
function yl({ action: t, showClose: e = !0 }) {
|
|
4845
4911
|
return !t && !e ? null : /* @__PURE__ */ c("div", { class: "jex-header-right", children: [
|
|
4846
4912
|
t,
|
|
4847
|
-
e && /* @__PURE__ */ c(
|
|
4913
|
+
e && /* @__PURE__ */ c(vl, {})
|
|
4848
4914
|
] });
|
|
4849
4915
|
}
|
|
4850
|
-
function
|
|
4916
|
+
function Tr({ title: t, rightAction: e, showClose: n = !0 }) {
|
|
4851
4917
|
return /* @__PURE__ */ c("header", { class: "jex-chat-header", children: [
|
|
4852
|
-
/* @__PURE__ */ c(
|
|
4853
|
-
/* @__PURE__ */ c(
|
|
4854
|
-
/* @__PURE__ */ c(
|
|
4918
|
+
/* @__PURE__ */ c(xl, {}),
|
|
4919
|
+
/* @__PURE__ */ c(bl, { title: t }),
|
|
4920
|
+
/* @__PURE__ */ c(yl, { action: e, showClose: n })
|
|
4855
4921
|
] });
|
|
4856
4922
|
}
|
|
4857
|
-
function
|
|
4923
|
+
function kl({ size: t = 14 }) {
|
|
4858
4924
|
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" }) });
|
|
4859
4925
|
}
|
|
4860
|
-
function
|
|
4926
|
+
function Ar() {
|
|
4861
4927
|
return /* @__PURE__ */ c("div", { class: "jex-widget-footer", children: /* @__PURE__ */ c(
|
|
4862
4928
|
"a",
|
|
4863
4929
|
{
|
|
@@ -4866,7 +4932,7 @@ function jr() {
|
|
|
4866
4932
|
rel: "noopener noreferrer",
|
|
4867
4933
|
class: "jex-branding",
|
|
4868
4934
|
children: [
|
|
4869
|
-
/* @__PURE__ */ c(
|
|
4935
|
+
/* @__PURE__ */ c(kl, { size: 14 }),
|
|
4870
4936
|
/* @__PURE__ */ c("span", { children: [
|
|
4871
4937
|
"Powered by ",
|
|
4872
4938
|
/* @__PURE__ */ c("strong", { children: "Jexity" })
|
|
@@ -4875,10 +4941,10 @@ function jr() {
|
|
|
4875
4941
|
}
|
|
4876
4942
|
) });
|
|
4877
4943
|
}
|
|
4878
|
-
function
|
|
4944
|
+
function to({ size: t = 28 }) {
|
|
4879
4945
|
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" }) });
|
|
4880
4946
|
}
|
|
4881
|
-
function
|
|
4947
|
+
function wl({ size: t = 24, ...e }) {
|
|
4882
4948
|
return /* @__PURE__ */ c(
|
|
4883
4949
|
"svg",
|
|
4884
4950
|
{
|
|
@@ -4895,53 +4961,53 @@ function pl({ size: t = 24, ...e }) {
|
|
|
4895
4961
|
}
|
|
4896
4962
|
);
|
|
4897
4963
|
}
|
|
4898
|
-
const
|
|
4899
|
-
chat: /* @__PURE__ */ c(
|
|
4900
|
-
bot: /* @__PURE__ */ c(
|
|
4901
|
-
sparkles: /* @__PURE__ */ c(
|
|
4902
|
-
},
|
|
4964
|
+
const _l = {
|
|
4965
|
+
chat: /* @__PURE__ */ c(to, { size: 28 }),
|
|
4966
|
+
bot: /* @__PURE__ */ c(En, { size: 28 }),
|
|
4967
|
+
sparkles: /* @__PURE__ */ c(wl, { size: 28 })
|
|
4968
|
+
}, jl = {
|
|
4903
4969
|
none: "0px",
|
|
4904
4970
|
sm: "0.5rem",
|
|
4905
4971
|
md: "0.75rem",
|
|
4906
4972
|
lg: "1.25rem",
|
|
4907
4973
|
full: "9999px"
|
|
4908
4974
|
};
|
|
4909
|
-
function
|
|
4910
|
-
const r =
|
|
4975
|
+
function Sl({ radius: t = "full", iconOption: e = "chat", label: n }) {
|
|
4976
|
+
const r = T(), i = n ?? r.fabLabel, o = i !== "";
|
|
4911
4977
|
return /* @__PURE__ */ c(
|
|
4912
4978
|
"button",
|
|
4913
4979
|
{
|
|
4914
|
-
class: `jex-floating-button ${!
|
|
4915
|
-
style: { borderRadius:
|
|
4980
|
+
class: `jex-floating-button ${!P.value && o ? "jex-has-label" : ""}`,
|
|
4981
|
+
style: { borderRadius: jl[t] ?? "9999px" },
|
|
4916
4982
|
onClick: () => {
|
|
4917
|
-
|
|
4983
|
+
P.value = !P.value;
|
|
4918
4984
|
},
|
|
4919
|
-
"aria-label":
|
|
4920
|
-
children:
|
|
4921
|
-
|
|
4985
|
+
"aria-label": P.value ? r.closeChatAriaLabel : r.openChatAriaLabel,
|
|
4986
|
+
children: P.value ? /* @__PURE__ */ c(eo, { size: 28 }) : /* @__PURE__ */ c("div", { class: "jex-fab-inner", children: [
|
|
4987
|
+
_l[e],
|
|
4922
4988
|
o && /* @__PURE__ */ c("span", { class: "jex-fab-label", children: i })
|
|
4923
4989
|
] })
|
|
4924
4990
|
}
|
|
4925
4991
|
);
|
|
4926
4992
|
}
|
|
4927
|
-
function
|
|
4928
|
-
const r =
|
|
4993
|
+
function Cl({ title: t, onStartFresh: e, onResetSession: n }) {
|
|
4994
|
+
const r = T(), [i, o] = C("");
|
|
4929
4995
|
function s() {
|
|
4930
|
-
|
|
4996
|
+
Kt(), Ze.value = "fresh", n(), e(), fe({ id: "chat" });
|
|
4931
4997
|
}
|
|
4932
4998
|
function l(u) {
|
|
4933
|
-
|
|
4999
|
+
Kt(), Ze.value = "resume", n(), Cr(u), fe({ id: "chat" });
|
|
4934
5000
|
}
|
|
4935
5001
|
function a(u) {
|
|
4936
5002
|
u.preventDefault();
|
|
4937
5003
|
const d = i.trim().toUpperCase();
|
|
4938
|
-
d && (
|
|
5004
|
+
d && (Kt(), Ze.value = "resume", n(), Cr(d), fe({ id: "chat" }));
|
|
4939
5005
|
}
|
|
4940
5006
|
return /* @__PURE__ */ c("div", { class: "jex-home", children: [
|
|
4941
5007
|
nt.value && /* @__PURE__ */ c("div", { class: "jex-session-prompt", role: "status", children: /* @__PURE__ */ c("div", { class: "jex-session-prompt-text", children: r.sessionLocked }) }),
|
|
4942
5008
|
/* @__PURE__ */ c("div", { class: "jex-home-hero", children: [
|
|
4943
5009
|
/* @__PURE__ */ c("div", { class: "jex-home-avatar", children: [
|
|
4944
|
-
/* @__PURE__ */ c(
|
|
5010
|
+
/* @__PURE__ */ c(to, { size: 24 }),
|
|
4945
5011
|
/* @__PURE__ */ c("span", { class: "jex-home-status-dot" })
|
|
4946
5012
|
] }),
|
|
4947
5013
|
/* @__PURE__ */ c("div", { class: "jex-home-hero-text", children: [
|
|
@@ -4995,8 +5061,8 @@ function xl({ title: t, onStartFresh: e, onResetSession: n }) {
|
|
|
4995
5061
|
] })
|
|
4996
5062
|
] });
|
|
4997
5063
|
}
|
|
4998
|
-
function
|
|
4999
|
-
const e =
|
|
5064
|
+
function Rl({ title: t }) {
|
|
5065
|
+
const e = T();
|
|
5000
5066
|
return /* @__PURE__ */ c("div", { class: "jex-selection", children: [
|
|
5001
5067
|
/* @__PURE__ */ c("h2", { class: "jex-selection-title", children: e.howCanWeHelp }),
|
|
5002
5068
|
/* @__PURE__ */ c("div", { class: "jex-selection-options", children: [
|
|
@@ -5027,14 +5093,14 @@ function bl({ title: t }) {
|
|
|
5027
5093
|
] })
|
|
5028
5094
|
] });
|
|
5029
5095
|
}
|
|
5030
|
-
const
|
|
5096
|
+
const Tl = (...t) => t.filter((e, n, r) => !!e && e.trim() !== "" && r.indexOf(e) === n).join(" ").trim(), Ir = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Al = (t) => t.replace(
|
|
5031
5097
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
5032
5098
|
(e, n, r) => r ? r.toUpperCase() : n.toLowerCase()
|
|
5033
|
-
),
|
|
5034
|
-
const e =
|
|
5099
|
+
), $r = (t) => {
|
|
5100
|
+
const e = Al(t);
|
|
5035
5101
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
5036
5102
|
};
|
|
5037
|
-
var
|
|
5103
|
+
var Il = {
|
|
5038
5104
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5039
5105
|
width: 24,
|
|
5040
5106
|
height: 24,
|
|
@@ -5045,12 +5111,12 @@ var kl = {
|
|
|
5045
5111
|
"stroke-linecap": "round",
|
|
5046
5112
|
"stroke-linejoin": "round"
|
|
5047
5113
|
};
|
|
5048
|
-
const
|
|
5114
|
+
const $l = (t) => {
|
|
5049
5115
|
for (const e in t)
|
|
5050
5116
|
if (e.startsWith("aria-") || e === "role" || e === "title")
|
|
5051
5117
|
return !0;
|
|
5052
5118
|
return !1;
|
|
5053
|
-
},
|
|
5119
|
+
}, El = ({
|
|
5054
5120
|
color: t = "currentColor",
|
|
5055
5121
|
size: e = 24,
|
|
5056
5122
|
strokeWidth: n = 2,
|
|
@@ -5059,88 +5125,88 @@ const wl = (t) => {
|
|
|
5059
5125
|
iconNode: o,
|
|
5060
5126
|
class: s = "",
|
|
5061
5127
|
...l
|
|
5062
|
-
}) =>
|
|
5128
|
+
}) => D(
|
|
5063
5129
|
"svg",
|
|
5064
5130
|
{
|
|
5065
|
-
...
|
|
5131
|
+
...Il,
|
|
5066
5132
|
width: String(e),
|
|
5067
5133
|
height: e,
|
|
5068
5134
|
stroke: t,
|
|
5069
5135
|
"stroke-width": r ? Number(n) * 24 / Number(e) : n,
|
|
5070
5136
|
class: ["lucide", s].join(" "),
|
|
5071
|
-
...!i &&
|
|
5137
|
+
...!i && !$l(l) && { "aria-hidden": "true" },
|
|
5072
5138
|
...l
|
|
5073
5139
|
},
|
|
5074
|
-
[...o.map(([a, u]) =>
|
|
5075
|
-
),
|
|
5076
|
-
const n = ({ class: r = "", className: i = "", children: o, ...s }) =>
|
|
5077
|
-
|
|
5140
|
+
[...o.map(([a, u]) => D(a, u)), ...te(i)]
|
|
5141
|
+
), Pl = (t, e) => {
|
|
5142
|
+
const n = ({ class: r = "", className: i = "", children: o, ...s }) => D(
|
|
5143
|
+
El,
|
|
5078
5144
|
{
|
|
5079
5145
|
...s,
|
|
5080
5146
|
iconNode: e,
|
|
5081
|
-
class:
|
|
5082
|
-
`lucide-${
|
|
5083
|
-
`lucide-${
|
|
5147
|
+
class: Tl(
|
|
5148
|
+
`lucide-${Ir($r(t))}`,
|
|
5149
|
+
`lucide-${Ir(t)}`,
|
|
5084
5150
|
r,
|
|
5085
5151
|
i
|
|
5086
5152
|
)
|
|
5087
5153
|
},
|
|
5088
5154
|
o
|
|
5089
5155
|
);
|
|
5090
|
-
return n.displayName =
|
|
5091
|
-
},
|
|
5156
|
+
return n.displayName = $r(t), n;
|
|
5157
|
+
}, ql = Pl("corner-up-left", [
|
|
5092
5158
|
["path", { d: "M20 20v-7a4 4 0 0 0-4-4H4", key: "1nkjon" }],
|
|
5093
5159
|
["path", { d: "M9 14 4 9l5-5", key: "102s5s" }]
|
|
5094
5160
|
]);
|
|
5095
|
-
function
|
|
5161
|
+
function Pn() {
|
|
5096
5162
|
return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
|
|
5097
5163
|
}
|
|
5098
|
-
var ye =
|
|
5099
|
-
function
|
|
5164
|
+
var ye = Pn();
|
|
5165
|
+
function no(t) {
|
|
5100
5166
|
ye = t;
|
|
5101
5167
|
}
|
|
5102
5168
|
var de = { exec: () => null };
|
|
5103
5169
|
function k(t, e = "") {
|
|
5104
5170
|
let n = typeof t == "string" ? t : t.source, r = { replace: (i, o) => {
|
|
5105
5171
|
let s = typeof o == "string" ? o : o.source;
|
|
5106
|
-
return s = s.replace(
|
|
5172
|
+
return s = s.replace(M.caret, "$1"), n = n.replace(i, s), r;
|
|
5107
5173
|
}, getRegex: () => new RegExp(n, e) };
|
|
5108
5174
|
return r;
|
|
5109
5175
|
}
|
|
5110
|
-
var
|
|
5176
|
+
var Ml = (() => {
|
|
5111
5177
|
try {
|
|
5112
5178
|
return !!new RegExp("(?<=1)(?<!1)");
|
|
5113
5179
|
} catch {
|
|
5114
5180
|
return !1;
|
|
5115
5181
|
}
|
|
5116
|
-
})(),
|
|
5117
|
-
]`).replace("lheading",
|
|
5182
|
+
})(), M = { 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)}}>`) }, Ll = /^(?:[ \t]*(?:\n|$))+/, Ol = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, zl = /^ {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+|$)/, Nl = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, qn = / {0,3}(?:[*+-]|\d{1,9}[.)])/, ro = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, io = k(ro).replace(/bull/g, qn).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(), Ql = k(ro).replace(/bull/g, qn).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]+)*)/, Ul = /^[^\n]+/, Ln = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Fl = k(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Ln).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Dl = k(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, qn).getRegex(), Mt = "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", On = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Bl = k("^ {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", On).replace("tag", Mt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), oo = k(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", Mt).getRegex(), Vl = k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", oo).getRegex(), zn = { blockquote: Vl, code: Ol, def: Fl, fences: zl, heading: Nl, hr: lt, html: Bl, lheading: io, list: Dl, newline: Ll, paragraph: oo, table: de, text: Ul }, Er = k("^ *([^\\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", Mt).getRegex(), Hl = { ...zn, lheading: Ql, table: Er, paragraph: k(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", Mt).getRegex() }, Wl = { ...zn, html: k(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", On).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: k(Mn).replace("hr", lt).replace("heading", ` *#{1,6} *[^
|
|
5183
|
+
]`).replace("lheading", io).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Jl = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Kl = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, so = /^( {2,}|\\)\n(?!\s*$)/, Zl = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, ze = /[\p{P}\p{S}]/u, Lt = /[\s\p{P}\p{S}]/u, Nn = /[^\s\p{P}\p{S}]/u, Gl = k(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Lt).getRegex(), ao = /(?!~)[\p{P}\p{S}]/u, Yl = /(?!~)[\s\p{P}\p{S}]/u, Xl = /(?:[^\s\p{P}\p{S}]|~)/u, ec = k(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Ml ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), lo = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, tc = k(lo, "u").replace(/punct/g, ze).getRegex(), nc = k(lo, "u").replace(/punct/g, ao).getRegex(), co = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", rc = k(co, "gu").replace(/notPunctSpace/g, Nn).replace(/punctSpace/g, Lt).replace(/punct/g, ze).getRegex(), ic = k(co, "gu").replace(/notPunctSpace/g, Xl).replace(/punctSpace/g, Yl).replace(/punct/g, ao).getRegex(), oc = k("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Nn).replace(/punctSpace/g, Lt).replace(/punct/g, ze).getRegex(), sc = k(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, ze).getRegex(), ac = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", lc = k(ac, "gu").replace(/notPunctSpace/g, Nn).replace(/punctSpace/g, Lt).replace(/punct/g, ze).getRegex(), cc = k(/\\(punct)/, "gu").replace(/punct/g, ze).getRegex(), uc = k(/^<(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(), hc = k(On).replace("(?:-->|$)", "-->").getRegex(), dc = k("^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", hc).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Rt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, pc = k(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", Rt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), uo = k(/^!?\[(label)\]\[(ref)\]/).replace("label", Rt).replace("ref", Ln).getRegex(), ho = k(/^!?\[(ref)\](?:\[\])?/).replace("ref", Ln).getRegex(), fc = k("reflink|nolink(?!\\()", "g").replace("reflink", uo).replace("nolink", ho).getRegex(), Pr = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, Qn = { _backpedal: de, anyPunctuation: cc, autolink: uc, blockSkip: ec, br: so, code: Kl, del: de, delLDelim: de, delRDelim: de, emStrongLDelim: tc, emStrongRDelimAst: rc, emStrongRDelimUnd: oc, escape: Jl, link: pc, nolink: ho, punctuation: Gl, reflink: uo, reflinkSearch: fc, tag: dc, text: Zl, url: de }, gc = { ...Qn, link: k(/^!?\[(label)\]\((.*?)\)/).replace("label", Rt).getRegex(), reflink: k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Rt).getRegex() }, gn = { ...Qn, emStrongRDelimAst: ic, emStrongLDelim: nc, delLDelim: sc, delRDelim: lc, url: k(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Pr).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: k(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Pr).getRegex() }, mc = { ...gn, br: k(so).replace("{2,}", "*").getRegex(), text: k(gn.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, ft = { normal: zn, gfm: Hl, pedantic: Wl }, Qe = { normal: Qn, gfm: gn, breaks: mc, pedantic: gc }, xc = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, qr = (t) => xc[t];
|
|
5118
5184
|
function Y(t, e) {
|
|
5119
5185
|
if (e) {
|
|
5120
|
-
if (
|
|
5121
|
-
} else if (
|
|
5186
|
+
if (M.escapeTest.test(t)) return t.replace(M.escapeReplace, qr);
|
|
5187
|
+
} else if (M.escapeTestNoEncode.test(t)) return t.replace(M.escapeReplaceNoEncode, qr);
|
|
5122
5188
|
return t;
|
|
5123
5189
|
}
|
|
5124
|
-
function
|
|
5190
|
+
function Mr(t) {
|
|
5125
5191
|
try {
|
|
5126
|
-
t = encodeURI(t).replace(
|
|
5192
|
+
t = encodeURI(t).replace(M.percentDecode, "%");
|
|
5127
5193
|
} catch {
|
|
5128
5194
|
return null;
|
|
5129
5195
|
}
|
|
5130
5196
|
return t;
|
|
5131
5197
|
}
|
|
5132
|
-
function
|
|
5133
|
-
let n = t.replace(
|
|
5198
|
+
function Lr(t, e) {
|
|
5199
|
+
let n = t.replace(M.findPipe, (o, s, l) => {
|
|
5134
5200
|
let a = !1, u = s;
|
|
5135
5201
|
for (; --u >= 0 && l[u] === "\\"; ) a = !a;
|
|
5136
5202
|
return a ? "|" : " |";
|
|
5137
|
-
}), r = n.split(
|
|
5203
|
+
}), r = n.split(M.splitPipe), i = 0;
|
|
5138
5204
|
if (r[0].trim() || r.shift(), r.length > 0 && !r.at(-1)?.trim() && r.pop(), e) if (r.length > e) r.splice(e);
|
|
5139
5205
|
else for (; r.length < e; ) r.push("");
|
|
5140
|
-
for (; i < r.length; i++) r[i] = r[i].trim().replace(
|
|
5206
|
+
for (; i < r.length; i++) r[i] = r[i].trim().replace(M.slashPipe, "|");
|
|
5141
5207
|
return r;
|
|
5142
5208
|
}
|
|
5143
|
-
function
|
|
5209
|
+
function Ue(t, e, n) {
|
|
5144
5210
|
let r = t.length;
|
|
5145
5211
|
if (r === 0) return "";
|
|
5146
5212
|
let i = 0;
|
|
@@ -5148,7 +5214,7 @@ function Qe(t, e, n) {
|
|
|
5148
5214
|
i++;
|
|
5149
5215
|
return t.slice(0, r - i);
|
|
5150
5216
|
}
|
|
5151
|
-
function
|
|
5217
|
+
function bc(t, e) {
|
|
5152
5218
|
if (t.indexOf(e[1]) === -1) return -1;
|
|
5153
5219
|
let n = 0;
|
|
5154
5220
|
for (let r = 0; r < t.length; r++) if (t[r] === "\\") r++;
|
|
@@ -5156,7 +5222,7 @@ function cc(t, e) {
|
|
|
5156
5222
|
else if (t[r] === e[1] && (n--, n < 0)) return r;
|
|
5157
5223
|
return n > 0 ? -2 : -1;
|
|
5158
5224
|
}
|
|
5159
|
-
function
|
|
5225
|
+
function vc(t, e = 0) {
|
|
5160
5226
|
let n = e, r = "";
|
|
5161
5227
|
for (let i of t) if (i === " ") {
|
|
5162
5228
|
let o = 4 - n % 4;
|
|
@@ -5164,13 +5230,13 @@ function uc(t, e = 0) {
|
|
|
5164
5230
|
} else r += i, n++;
|
|
5165
5231
|
return r;
|
|
5166
5232
|
}
|
|
5167
|
-
function
|
|
5233
|
+
function Or(t, e, n, r, i) {
|
|
5168
5234
|
let o = e.href, s = e.title || null, l = t[1].replace(i.other.outputLinkReplace, "$1");
|
|
5169
5235
|
r.state.inLink = !0;
|
|
5170
5236
|
let a = { type: t[0].charAt(0) === "!" ? "image" : "link", raw: n, href: o, title: s, text: l, tokens: r.inlineTokens(l) };
|
|
5171
5237
|
return r.state.inLink = !1, a;
|
|
5172
5238
|
}
|
|
5173
|
-
function
|
|
5239
|
+
function yc(t, e, n) {
|
|
5174
5240
|
let r = t.match(n.other.indentCodeCompensation);
|
|
5175
5241
|
if (r === null) return e;
|
|
5176
5242
|
let i = r[1];
|
|
@@ -5183,7 +5249,7 @@ function hc(t, e, n) {
|
|
|
5183
5249
|
}).join(`
|
|
5184
5250
|
`);
|
|
5185
5251
|
}
|
|
5186
|
-
var
|
|
5252
|
+
var Tt = class {
|
|
5187
5253
|
options;
|
|
5188
5254
|
rules;
|
|
5189
5255
|
lexer;
|
|
@@ -5198,14 +5264,14 @@ var Rt = class {
|
|
|
5198
5264
|
let e = this.rules.block.code.exec(t);
|
|
5199
5265
|
if (e) {
|
|
5200
5266
|
let n = e[0].replace(this.rules.other.codeRemoveIndent, "");
|
|
5201
|
-
return { type: "code", raw: e[0], codeBlockStyle: "indented", text: this.options.pedantic ? n :
|
|
5267
|
+
return { type: "code", raw: e[0], codeBlockStyle: "indented", text: this.options.pedantic ? n : Ue(n, `
|
|
5202
5268
|
`) };
|
|
5203
5269
|
}
|
|
5204
5270
|
}
|
|
5205
5271
|
fences(t) {
|
|
5206
5272
|
let e = this.rules.block.fences.exec(t);
|
|
5207
5273
|
if (e) {
|
|
5208
|
-
let n = e[0], r =
|
|
5274
|
+
let n = e[0], r = yc(n, e[3] || "", this.rules);
|
|
5209
5275
|
return { type: "code", raw: n, lang: e[2] ? e[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : e[2], text: r };
|
|
5210
5276
|
}
|
|
5211
5277
|
}
|
|
@@ -5214,7 +5280,7 @@ var Rt = class {
|
|
|
5214
5280
|
if (e) {
|
|
5215
5281
|
let n = e[2].trim();
|
|
5216
5282
|
if (this.rules.other.endingHash.test(n)) {
|
|
5217
|
-
let r =
|
|
5283
|
+
let r = Ue(n, "#");
|
|
5218
5284
|
(this.options.pedantic || !r || this.rules.other.endingSpaceChar.test(r)) && (n = r.trim());
|
|
5219
5285
|
}
|
|
5220
5286
|
return { type: "heading", raw: e[0], depth: e[1].length, text: n, tokens: this.lexer.inline(n) };
|
|
@@ -5222,13 +5288,13 @@ var Rt = class {
|
|
|
5222
5288
|
}
|
|
5223
5289
|
hr(t) {
|
|
5224
5290
|
let e = this.rules.block.hr.exec(t);
|
|
5225
|
-
if (e) return { type: "hr", raw:
|
|
5291
|
+
if (e) return { type: "hr", raw: Ue(e[0], `
|
|
5226
5292
|
`) };
|
|
5227
5293
|
}
|
|
5228
5294
|
blockquote(t) {
|
|
5229
5295
|
let e = this.rules.block.blockquote.exec(t);
|
|
5230
5296
|
if (e) {
|
|
5231
|
-
let n =
|
|
5297
|
+
let n = Ue(e[0], `
|
|
5232
5298
|
`).split(`
|
|
5233
5299
|
`), r = "", i = "", o = [];
|
|
5234
5300
|
for (; n.length > 0; ) {
|
|
@@ -5275,16 +5341,16 @@ ${d}` : d;
|
|
|
5275
5341
|
let a = !1, u = "", d = "";
|
|
5276
5342
|
if (!(e = o.exec(t)) || this.rules.block.hr.test(t)) break;
|
|
5277
5343
|
u = e[0], t = t.substring(u.length);
|
|
5278
|
-
let h =
|
|
5344
|
+
let h = vc(e[2].split(`
|
|
5279
5345
|
`, 1)[0], e[1].length), p = t.split(`
|
|
5280
5346
|
`, 1)[0], f = !h.trim(), g = 0;
|
|
5281
5347
|
if (this.options.pedantic ? (g = 2, d = h.trimStart()) : f ? 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), f && this.rules.other.blankLine.test(p) && (u += p + `
|
|
5282
5348
|
`, t = t.substring(p.length + 1), a = !0), !a) {
|
|
5283
|
-
let m = this.rules.other.nextBulletRegex(g), x = this.rules.other.hrRegex(g), y = this.rules.other.fencesBeginRegex(g), v = this.rules.other.headingBeginRegex(g),
|
|
5349
|
+
let m = this.rules.other.nextBulletRegex(g), x = this.rules.other.hrRegex(g), y = this.rules.other.fencesBeginRegex(g), v = this.rules.other.headingBeginRegex(g), A = this.rules.other.htmlBeginRegex(g), K = this.rules.other.blockquoteBeginRegex(g);
|
|
5284
5350
|
for (; t; ) {
|
|
5285
5351
|
let se = t.split(`
|
|
5286
5352
|
`, 1)[0], B;
|
|
5287
|
-
if (p = se, this.options.pedantic ? (p = p.replace(this.rules.other.listReplaceNesting, " "), B = p) : B = p.replace(this.rules.other.tabCharGlobal, " "), y.test(p) || v.test(p) ||
|
|
5353
|
+
if (p = se, this.options.pedantic ? (p = p.replace(this.rules.other.listReplaceNesting, " "), B = p) : B = p.replace(this.rules.other.tabCharGlobal, " "), y.test(p) || v.test(p) || A.test(p) || K.test(p) || m.test(p) || x.test(p)) break;
|
|
5288
5354
|
if (B.search(this.rules.other.nonSpaceChar) >= g || !p.trim()) d += `
|
|
5289
5355
|
` + B.slice(g);
|
|
5290
5356
|
else {
|
|
@@ -5343,12 +5409,12 @@ ${d}` : d;
|
|
|
5343
5409
|
table(t) {
|
|
5344
5410
|
let e = this.rules.block.table.exec(t);
|
|
5345
5411
|
if (!e || !this.rules.other.tableDelimiter.test(e[2])) return;
|
|
5346
|
-
let n =
|
|
5412
|
+
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(`
|
|
5347
5413
|
`) : [], o = { type: "table", raw: e[0], header: [], align: [], rows: [] };
|
|
5348
5414
|
if (n.length === r.length) {
|
|
5349
5415
|
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);
|
|
5350
5416
|
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] });
|
|
5351
|
-
for (let s of i) o.rows.push(
|
|
5417
|
+
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] })));
|
|
5352
5418
|
return o;
|
|
5353
5419
|
}
|
|
5354
5420
|
}
|
|
@@ -5385,10 +5451,10 @@ ${d}` : d;
|
|
|
5385
5451
|
let n = e[2].trim();
|
|
5386
5452
|
if (!this.options.pedantic && this.rules.other.startAngleBracket.test(n)) {
|
|
5387
5453
|
if (!this.rules.other.endAngleBracket.test(n)) return;
|
|
5388
|
-
let o =
|
|
5454
|
+
let o = Ue(n.slice(0, -1), "\\");
|
|
5389
5455
|
if ((n.length - o.length) % 2 === 0) return;
|
|
5390
5456
|
} else {
|
|
5391
|
-
let o =
|
|
5457
|
+
let o = bc(e[2], "()");
|
|
5392
5458
|
if (o === -2) return;
|
|
5393
5459
|
if (o > -1) {
|
|
5394
5460
|
let s = (e[0].indexOf("!") === 0 ? 5 : 4) + e[1].length + o;
|
|
@@ -5400,7 +5466,7 @@ ${d}` : d;
|
|
|
5400
5466
|
let o = this.rules.other.pedanticHrefTitle.exec(r);
|
|
5401
5467
|
o && (r = o[1], i = o[3]);
|
|
5402
5468
|
} else i = e[3] ? e[3].slice(1, -1) : "";
|
|
5403
|
-
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)),
|
|
5469
|
+
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)), Or(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);
|
|
5404
5470
|
}
|
|
5405
5471
|
}
|
|
5406
5472
|
reflink(t, e) {
|
|
@@ -5411,7 +5477,7 @@ ${d}` : d;
|
|
|
5411
5477
|
let o = n[0].charAt(0);
|
|
5412
5478
|
return { type: "text", raw: o, text: o };
|
|
5413
5479
|
}
|
|
5414
|
-
return
|
|
5480
|
+
return Or(n, i, n[0], this.lexer, this.rules);
|
|
5415
5481
|
}
|
|
5416
5482
|
}
|
|
5417
5483
|
emStrong(t, e, n = "") {
|
|
@@ -5496,28 +5562,28 @@ ${d}` : d;
|
|
|
5496
5562
|
return { type: "text", raw: e[0], text: e[0], escaped: n };
|
|
5497
5563
|
}
|
|
5498
5564
|
}
|
|
5499
|
-
}, V = class
|
|
5565
|
+
}, V = class mn {
|
|
5500
5566
|
tokens;
|
|
5501
5567
|
options;
|
|
5502
5568
|
state;
|
|
5503
5569
|
inlineQueue;
|
|
5504
5570
|
tokenizer;
|
|
5505
5571
|
constructor(e) {
|
|
5506
|
-
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || ye, this.options.tokenizer = this.options.tokenizer || new
|
|
5507
|
-
let n = { other:
|
|
5508
|
-
this.options.pedantic ? (n.block = ft.pedantic, n.inline =
|
|
5572
|
+
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || ye, this.options.tokenizer = this.options.tokenizer || new Tt(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
|
|
5573
|
+
let n = { other: M, block: ft.normal, inline: Qe.normal };
|
|
5574
|
+
this.options.pedantic ? (n.block = ft.pedantic, n.inline = Qe.pedantic) : this.options.gfm && (n.block = ft.gfm, this.options.breaks ? n.inline = Qe.breaks : n.inline = Qe.gfm), this.tokenizer.rules = n;
|
|
5509
5575
|
}
|
|
5510
5576
|
static get rules() {
|
|
5511
|
-
return { block: ft, inline:
|
|
5577
|
+
return { block: ft, inline: Qe };
|
|
5512
5578
|
}
|
|
5513
5579
|
static lex(e, n) {
|
|
5514
|
-
return new
|
|
5580
|
+
return new mn(n).lex(e);
|
|
5515
5581
|
}
|
|
5516
5582
|
static lexInline(e, n) {
|
|
5517
|
-
return new
|
|
5583
|
+
return new mn(n).inlineTokens(e);
|
|
5518
5584
|
}
|
|
5519
5585
|
lex(e) {
|
|
5520
|
-
e = e.replace(
|
|
5586
|
+
e = e.replace(M.carriageReturn, `
|
|
5521
5587
|
`), this.blockTokens(e, this.tokens);
|
|
5522
5588
|
for (let n = 0; n < this.inlineQueue.length; n++) {
|
|
5523
5589
|
let r = this.inlineQueue[n];
|
|
@@ -5526,7 +5592,7 @@ ${d}` : d;
|
|
|
5526
5592
|
return this.inlineQueue = [], this.tokens;
|
|
5527
5593
|
}
|
|
5528
5594
|
blockTokens(e, n = [], r = !1) {
|
|
5529
|
-
for (this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(
|
|
5595
|
+
for (this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(M.tabCharGlobal, " ").replace(M.spaceLine, "")); e; ) {
|
|
5530
5596
|
let i;
|
|
5531
5597
|
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;
|
|
5532
5598
|
if (i = this.tokenizer.space(e)) {
|
|
@@ -5704,7 +5770,7 @@ ${d}` : d;
|
|
|
5704
5770
|
}
|
|
5705
5771
|
return n;
|
|
5706
5772
|
}
|
|
5707
|
-
},
|
|
5773
|
+
}, At = class {
|
|
5708
5774
|
options;
|
|
5709
5775
|
parser;
|
|
5710
5776
|
constructor(t) {
|
|
@@ -5714,7 +5780,7 @@ ${d}` : d;
|
|
|
5714
5780
|
return "";
|
|
5715
5781
|
}
|
|
5716
5782
|
code({ text: t, lang: e, escaped: n }) {
|
|
5717
|
-
let r = (e || "").match(
|
|
5783
|
+
let r = (e || "").match(M.notSpaceStart)?.[0], i = t.replace(M.endingNewline, "") + `
|
|
5718
5784
|
`;
|
|
5719
5785
|
return r ? '<pre><code class="language-' + Y(r) + '">' + (n ? i : Y(i, !0)) + `</code></pre>
|
|
5720
5786
|
` : "<pre><code>" + (n ? i : Y(i, !0)) + `</code></pre>
|
|
@@ -5804,7 +5870,7 @@ ${t}</tr>
|
|
|
5804
5870
|
return `<del>${this.parser.parseInline(t)}</del>`;
|
|
5805
5871
|
}
|
|
5806
5872
|
link({ href: t, title: e, tokens: n }) {
|
|
5807
|
-
let r = this.parser.parseInline(n), i =
|
|
5873
|
+
let r = this.parser.parseInline(n), i = Mr(t);
|
|
5808
5874
|
if (i === null) return r;
|
|
5809
5875
|
t = i;
|
|
5810
5876
|
let o = '<a href="' + t + '"';
|
|
@@ -5812,7 +5878,7 @@ ${t}</tr>
|
|
|
5812
5878
|
}
|
|
5813
5879
|
image({ href: t, title: e, text: n, tokens: r }) {
|
|
5814
5880
|
r && (n = this.parser.parseInline(r, this.parser.textRenderer));
|
|
5815
|
-
let i =
|
|
5881
|
+
let i = Mr(t);
|
|
5816
5882
|
if (i === null) return Y(n);
|
|
5817
5883
|
t = i;
|
|
5818
5884
|
let o = `<img src="${t}" alt="${Y(n)}"`;
|
|
@@ -5821,7 +5887,7 @@ ${t}</tr>
|
|
|
5821
5887
|
text(t) {
|
|
5822
5888
|
return "tokens" in t && t.tokens ? this.parser.parseInline(t.tokens) : "escaped" in t && t.escaped ? t.text : Y(t.text);
|
|
5823
5889
|
}
|
|
5824
|
-
},
|
|
5890
|
+
}, Un = class {
|
|
5825
5891
|
strong({ text: t }) {
|
|
5826
5892
|
return t;
|
|
5827
5893
|
}
|
|
@@ -5852,18 +5918,18 @@ ${t}</tr>
|
|
|
5852
5918
|
checkbox({ raw: t }) {
|
|
5853
5919
|
return t;
|
|
5854
5920
|
}
|
|
5855
|
-
}, H = class
|
|
5921
|
+
}, H = class xn {
|
|
5856
5922
|
options;
|
|
5857
5923
|
renderer;
|
|
5858
5924
|
textRenderer;
|
|
5859
5925
|
constructor(e) {
|
|
5860
|
-
this.options = e || ye, this.options.renderer = this.options.renderer || new
|
|
5926
|
+
this.options = e || ye, 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 Un();
|
|
5861
5927
|
}
|
|
5862
5928
|
static parse(e, n) {
|
|
5863
|
-
return new
|
|
5929
|
+
return new xn(n).parse(e);
|
|
5864
5930
|
}
|
|
5865
5931
|
static parseInline(e, n) {
|
|
5866
|
-
return new
|
|
5932
|
+
return new xn(n).parseInline(e);
|
|
5867
5933
|
}
|
|
5868
5934
|
parse(e) {
|
|
5869
5935
|
this.renderer.parser = this;
|
|
@@ -6029,16 +6095,16 @@ ${t}</tr>
|
|
|
6029
6095
|
provideParser() {
|
|
6030
6096
|
return this.block ? H.parse : H.parseInline;
|
|
6031
6097
|
}
|
|
6032
|
-
},
|
|
6033
|
-
defaults =
|
|
6098
|
+
}, kc = class {
|
|
6099
|
+
defaults = Pn();
|
|
6034
6100
|
options = this.setOptions;
|
|
6035
6101
|
parse = this.parseMarkdown(!0);
|
|
6036
6102
|
parseInline = this.parseMarkdown(!1);
|
|
6037
6103
|
Parser = H;
|
|
6038
|
-
Renderer =
|
|
6039
|
-
TextRenderer =
|
|
6104
|
+
Renderer = At;
|
|
6105
|
+
TextRenderer = Un;
|
|
6040
6106
|
Lexer = V;
|
|
6041
|
-
Tokenizer =
|
|
6107
|
+
Tokenizer = Tt;
|
|
6042
6108
|
Hooks = Ve;
|
|
6043
6109
|
constructor(...t) {
|
|
6044
6110
|
this.use(...t);
|
|
@@ -6087,7 +6153,7 @@ ${t}</tr>
|
|
|
6087
6153
|
}
|
|
6088
6154
|
"childTokens" in i && i.childTokens && (e.childTokens[i.name] = i.childTokens);
|
|
6089
6155
|
}), r.extensions = e), n.renderer) {
|
|
6090
|
-
let i = this.defaults.renderer || new
|
|
6156
|
+
let i = this.defaults.renderer || new At(this.defaults);
|
|
6091
6157
|
for (let o in n.renderer) {
|
|
6092
6158
|
if (!(o in i)) throw new Error(`renderer '${o}' does not exist`);
|
|
6093
6159
|
if (["options", "parser"].includes(o)) continue;
|
|
@@ -6100,7 +6166,7 @@ ${t}</tr>
|
|
|
6100
6166
|
r.renderer = i;
|
|
6101
6167
|
}
|
|
6102
6168
|
if (n.tokenizer) {
|
|
6103
|
-
let i = this.defaults.tokenizer || new
|
|
6169
|
+
let i = this.defaults.tokenizer || new Tt(this.defaults);
|
|
6104
6170
|
for (let o in n.tokenizer) {
|
|
6105
6171
|
if (!(o in i)) throw new Error(`tokenizer '${o}' does not exist`);
|
|
6106
6172
|
if (["options", "rules", "lexer"].includes(o)) continue;
|
|
@@ -6189,17 +6255,17 @@ Please report this to https://github.com/markedjs/marked.`, t) {
|
|
|
6189
6255
|
throw n;
|
|
6190
6256
|
};
|
|
6191
6257
|
}
|
|
6192
|
-
}, be = new
|
|
6258
|
+
}, be = new kc();
|
|
6193
6259
|
function _(t, e) {
|
|
6194
6260
|
return be.parse(t, e);
|
|
6195
6261
|
}
|
|
6196
6262
|
_.options = _.setOptions = function(t) {
|
|
6197
|
-
return be.setOptions(t), _.defaults = be.defaults,
|
|
6263
|
+
return be.setOptions(t), _.defaults = be.defaults, no(_.defaults), _;
|
|
6198
6264
|
};
|
|
6199
|
-
_.getDefaults =
|
|
6265
|
+
_.getDefaults = Pn;
|
|
6200
6266
|
_.defaults = ye;
|
|
6201
6267
|
_.use = function(...t) {
|
|
6202
|
-
return be.use(...t), _.defaults = be.defaults,
|
|
6268
|
+
return be.use(...t), _.defaults = be.defaults, no(_.defaults), _;
|
|
6203
6269
|
};
|
|
6204
6270
|
_.walkTokens = function(t, e) {
|
|
6205
6271
|
return be.walkTokens(t, e);
|
|
@@ -6207,11 +6273,11 @@ _.walkTokens = function(t, e) {
|
|
|
6207
6273
|
_.parseInline = be.parseInline;
|
|
6208
6274
|
_.Parser = H;
|
|
6209
6275
|
_.parser = H.parse;
|
|
6210
|
-
_.Renderer =
|
|
6211
|
-
_.TextRenderer =
|
|
6276
|
+
_.Renderer = At;
|
|
6277
|
+
_.TextRenderer = Un;
|
|
6212
6278
|
_.Lexer = V;
|
|
6213
6279
|
_.lexer = V.lex;
|
|
6214
|
-
_.Tokenizer =
|
|
6280
|
+
_.Tokenizer = Tt;
|
|
6215
6281
|
_.Hooks = Ve;
|
|
6216
6282
|
_.parse = _;
|
|
6217
6283
|
_.options;
|
|
@@ -6225,7 +6291,7 @@ _.setOptions({
|
|
|
6225
6291
|
breaks: !0,
|
|
6226
6292
|
gfm: !0
|
|
6227
6293
|
});
|
|
6228
|
-
function
|
|
6294
|
+
function wc({ text: t }) {
|
|
6229
6295
|
const e = J(() => {
|
|
6230
6296
|
if (!t)
|
|
6231
6297
|
return "";
|
|
@@ -6234,51 +6300,78 @@ function pc({ text: t }) {
|
|
|
6234
6300
|
}, [t]);
|
|
6235
6301
|
return /* @__PURE__ */ c("div", { class: "jex-md", dangerouslySetInnerHTML: { __html: e } });
|
|
6236
6302
|
}
|
|
6237
|
-
const
|
|
6238
|
-
function
|
|
6303
|
+
const Pe = I("");
|
|
6304
|
+
function _c(t) {
|
|
6239
6305
|
if (!t)
|
|
6240
6306
|
return;
|
|
6241
6307
|
const e = t.trim().split(/\s+/)[0];
|
|
6242
6308
|
if (!e)
|
|
6243
6309
|
return;
|
|
6244
|
-
const n = `@${e} `, r =
|
|
6245
|
-
r.includes(n) || r.includes(`@${e}`) || (
|
|
6310
|
+
const n = `@${e} `, r = Pe.value;
|
|
6311
|
+
r.includes(n) || r.includes(`@${e}`) || (Pe.value = r.trimStart() ? `${n}${r.trimStart()}` : n);
|
|
6246
6312
|
}
|
|
6247
|
-
const rt =
|
|
6248
|
-
function
|
|
6313
|
+
const rt = I(null), zr = I(Date.now()), oe = I([]), jc = 4, Sc = 8 * 1024 * 1024;
|
|
6314
|
+
function Cc() {
|
|
6249
6315
|
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `att-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 11)}`;
|
|
6250
6316
|
}
|
|
6251
|
-
function
|
|
6252
|
-
const e = Array.from(t).filter((i) => i.type.startsWith("image/") && i.size <=
|
|
6317
|
+
function Rc(t) {
|
|
6318
|
+
const e = Array.from(t).filter((i) => i.type.startsWith("image/") && i.size <= Sc);
|
|
6253
6319
|
if (e.length === 0)
|
|
6254
6320
|
return;
|
|
6255
|
-
const n =
|
|
6321
|
+
const n = jc - oe.value.length;
|
|
6256
6322
|
if (n <= 0)
|
|
6257
6323
|
return;
|
|
6258
6324
|
const r = e.slice(0, n).map((i) => ({
|
|
6259
6325
|
// Falls back to a non-crypto id when host page is HTTP — see genAttachmentId.
|
|
6260
|
-
id:
|
|
6326
|
+
id: Cc(),
|
|
6261
6327
|
file: i,
|
|
6262
6328
|
previewUrl: URL.createObjectURL(i)
|
|
6263
6329
|
}));
|
|
6264
6330
|
oe.value = [...oe.value, ...r];
|
|
6265
6331
|
}
|
|
6266
|
-
function
|
|
6332
|
+
function Tc(t) {
|
|
6267
6333
|
const e = oe.value.find((n) => n.id === t);
|
|
6268
6334
|
e && URL.revokeObjectURL(e.previewUrl), oe.value = oe.value.filter((n) => n.id !== t);
|
|
6269
6335
|
}
|
|
6270
|
-
function
|
|
6336
|
+
function Ac() {
|
|
6271
6337
|
for (const t of oe.value)
|
|
6272
6338
|
URL.revokeObjectURL(t.previewUrl);
|
|
6273
6339
|
oe.value = [];
|
|
6274
6340
|
}
|
|
6275
|
-
|
|
6341
|
+
BigInt("-9223372036854775808");
|
|
6342
|
+
BigInt("9223372036854775807");
|
|
6343
|
+
BigInt("0");
|
|
6344
|
+
BigInt("8");
|
|
6345
|
+
BigInt("256");
|
|
6346
|
+
const Ic = /* @__PURE__ */ Symbol.for("functionName"), $c = /* @__PURE__ */ Symbol.for("toReferencePath");
|
|
6347
|
+
function po(t = []) {
|
|
6348
|
+
const e = {
|
|
6349
|
+
get(n, r) {
|
|
6350
|
+
if (typeof r == "string") {
|
|
6351
|
+
const i = [...t, r];
|
|
6352
|
+
return po(i);
|
|
6353
|
+
} else if (r === Ic) {
|
|
6354
|
+
if (t.length < 2) {
|
|
6355
|
+
const s = ["api", ...t].join(".");
|
|
6356
|
+
throw new Error(
|
|
6357
|
+
`API path is expected to be of the form \`api.moduleName.functionName\`. Found: \`${s}\``
|
|
6358
|
+
);
|
|
6359
|
+
}
|
|
6360
|
+
const i = t.slice(0, -1).join("/"), o = t[t.length - 1];
|
|
6361
|
+
return o === "default" ? i : i + ":" + o;
|
|
6362
|
+
} else return r === Symbol.toStringTag ? "FunctionReference" : void 0;
|
|
6363
|
+
}
|
|
6364
|
+
};
|
|
6365
|
+
return new Proxy({}, e);
|
|
6366
|
+
}
|
|
6367
|
+
const Ec = po();
|
|
6368
|
+
function fo(t, e) {
|
|
6276
6369
|
const n = {
|
|
6277
6370
|
get(r, i) {
|
|
6278
6371
|
if (typeof i == "string") {
|
|
6279
6372
|
const o = [...e, i];
|
|
6280
|
-
return
|
|
6281
|
-
} else if (i ===
|
|
6373
|
+
return fo(t, o);
|
|
6374
|
+
} else if (i === $c) {
|
|
6282
6375
|
if (e.length < 1) {
|
|
6283
6376
|
const o = [t, ...e].join(".");
|
|
6284
6377
|
throw new Error(
|
|
@@ -6292,34 +6385,34 @@ function lo(t, e) {
|
|
|
6292
6385
|
};
|
|
6293
6386
|
return new Proxy({}, n);
|
|
6294
6387
|
}
|
|
6295
|
-
const
|
|
6296
|
-
|
|
6297
|
-
function
|
|
6298
|
-
const r =
|
|
6388
|
+
const Pc = () => fo("components", []), qe = Ec;
|
|
6389
|
+
Pc();
|
|
6390
|
+
function qc({ sessionId: t, visitorId: e, ensureSession: n }) {
|
|
6391
|
+
const r = Et(qe.functions.chat.public.conversations.send);
|
|
6299
6392
|
return async function(i) {
|
|
6300
6393
|
const o = t && e ? { sessionId: t, visitorId: e } : await n();
|
|
6301
6394
|
if (o) {
|
|
6302
|
-
|
|
6395
|
+
Pe.value = "", Ac();
|
|
6303
6396
|
try {
|
|
6304
6397
|
const s = await r({
|
|
6305
6398
|
sessionId: o.sessionId,
|
|
6306
6399
|
visitorId: o.visitorId,
|
|
6307
6400
|
content: i
|
|
6308
6401
|
});
|
|
6309
|
-
s.ok ?
|
|
6402
|
+
s.ok ? $n(o.visitorId) : s.reason === "rate_limited" && (rt.value = Date.now() + s.retryAfterMs);
|
|
6310
6403
|
} catch (s) {
|
|
6311
6404
|
console.error("[jexity] Failed to send message:", s);
|
|
6312
6405
|
}
|
|
6313
6406
|
}
|
|
6314
6407
|
};
|
|
6315
6408
|
}
|
|
6316
|
-
function
|
|
6317
|
-
const t = rt.value, e =
|
|
6318
|
-
|
|
6409
|
+
function Mc() {
|
|
6410
|
+
const t = rt.value, e = zr.value;
|
|
6411
|
+
R(() => {
|
|
6319
6412
|
if (t === null)
|
|
6320
6413
|
return;
|
|
6321
6414
|
const i = setInterval(() => {
|
|
6322
|
-
|
|
6415
|
+
zr.value = Date.now();
|
|
6323
6416
|
}, 1e3), o = setTimeout(() => {
|
|
6324
6417
|
rt.value = null;
|
|
6325
6418
|
}, Math.max(0, t - Date.now()));
|
|
@@ -6330,35 +6423,35 @@ function _c() {
|
|
|
6330
6423
|
const n = t !== null, r = n ? Math.max(0, Math.ceil((t - e) / 1e3)) : 0;
|
|
6331
6424
|
return { isActive: n, remainingSeconds: r };
|
|
6332
6425
|
}
|
|
6333
|
-
function
|
|
6334
|
-
const t =
|
|
6426
|
+
function Lc() {
|
|
6427
|
+
const t = T(), { isActive: e, remainingSeconds: n } = Mc();
|
|
6335
6428
|
return e ? /* @__PURE__ */ c("div", { class: "jex-rate-limit-notice", role: "status", "aria-live": "polite", children: t.errorRateLimited.replace("{seconds}", String(n)) }) : null;
|
|
6336
6429
|
}
|
|
6337
|
-
const Se =
|
|
6338
|
-
function
|
|
6339
|
-
const t =
|
|
6430
|
+
const Se = I(null);
|
|
6431
|
+
function Oc() {
|
|
6432
|
+
const t = T(), e = Se.value;
|
|
6340
6433
|
if (e === null)
|
|
6341
6434
|
return null;
|
|
6342
6435
|
const n = e === "no-token" ? t.errorSessionNoToken : e === "unauthorized" ? t.errorSessionUnauthorized : e === "network" ? t.errorNetwork : t.somethingWentWrong;
|
|
6343
6436
|
return /* @__PURE__ */ c("div", { class: "jex-session-error-notice", role: "alert", "aria-live": "assertive", children: n });
|
|
6344
6437
|
}
|
|
6345
|
-
function
|
|
6438
|
+
function zc({ size: t = 18 }) {
|
|
6346
6439
|
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: [
|
|
6347
6440
|
/* @__PURE__ */ c("path", { d: "M22 2 11 13" }),
|
|
6348
6441
|
/* @__PURE__ */ c("path", { d: "M22 2 15 22 11 13 2 9l20-7z" })
|
|
6349
6442
|
] });
|
|
6350
6443
|
}
|
|
6351
|
-
const
|
|
6352
|
-
function
|
|
6444
|
+
const Nr = 132;
|
|
6445
|
+
function Nc({ onSend: t }) {
|
|
6353
6446
|
const e = ue(null), n = ue(null);
|
|
6354
|
-
|
|
6447
|
+
R(() => {
|
|
6355
6448
|
const l = e.current;
|
|
6356
6449
|
if (!l)
|
|
6357
6450
|
return;
|
|
6358
6451
|
l.style.height = "0";
|
|
6359
|
-
const a = Math.min(l.scrollHeight,
|
|
6360
|
-
l.style.height = `${a}px`, l.style.overflowY = l.scrollHeight >
|
|
6361
|
-
}, [
|
|
6452
|
+
const a = Math.min(l.scrollHeight, Nr);
|
|
6453
|
+
l.style.height = `${a}px`, l.style.overflowY = l.scrollHeight > Nr ? "auto" : "hidden";
|
|
6454
|
+
}, [Pe.value]);
|
|
6362
6455
|
function r(l) {
|
|
6363
6456
|
l.key === "Enter" && !l.shiftKey && (l.preventDefault(), t());
|
|
6364
6457
|
}
|
|
@@ -6367,7 +6460,7 @@ function Rc({ onSend: t }) {
|
|
|
6367
6460
|
}
|
|
6368
6461
|
function o(l) {
|
|
6369
6462
|
const a = l.currentTarget;
|
|
6370
|
-
a.files && a.files.length > 0 &&
|
|
6463
|
+
a.files && a.files.length > 0 && Rc(a.files), a.value = "";
|
|
6371
6464
|
}
|
|
6372
6465
|
function s(l) {
|
|
6373
6466
|
const a = l.target;
|
|
@@ -6375,8 +6468,8 @@ function Rc({ onSend: t }) {
|
|
|
6375
6468
|
}
|
|
6376
6469
|
return { textareaRef: e, fileInputRef: n, onKeyDown: r, onAttachClick: i, onFilesPicked: o, onCardClick: s };
|
|
6377
6470
|
}
|
|
6378
|
-
function
|
|
6379
|
-
const i =
|
|
6471
|
+
function Qc({ isStreaming: t, disabled: e, inputDisabled: n, onSend: r }) {
|
|
6472
|
+
const i = T(), o = Pe, s = oe, { textareaRef: l, fileInputRef: a, onKeyDown: u, onAttachClick: d, onFilesPicked: h, onCardClick: p } = Nc({ onSend: r }), f = o.value.trim().length > 0, g = s.value.length > 0, m = (f || g) && !e;
|
|
6380
6473
|
return /* @__PURE__ */ c("div", { class: "jex-composer-card", onClick: p, children: [
|
|
6381
6474
|
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: [
|
|
6382
6475
|
/* @__PURE__ */ c("img", { src: x.previewUrl, alt: x.file.name, class: "jex-attachment-thumb" }),
|
|
@@ -6387,7 +6480,7 @@ function Tc({ isStreaming: t, disabled: e, inputDisabled: n, onSend: r }) {
|
|
|
6387
6480
|
class: "jex-attachment-remove",
|
|
6388
6481
|
"aria-label": i.removeAttachmentAriaLabel,
|
|
6389
6482
|
onClick: () => {
|
|
6390
|
-
|
|
6483
|
+
Tc(x.id);
|
|
6391
6484
|
},
|
|
6392
6485
|
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: [
|
|
6393
6486
|
/* @__PURE__ */ c("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
@@ -6448,14 +6541,33 @@ function Tc({ isStreaming: t, disabled: e, inputDisabled: n, onSend: r }) {
|
|
|
6448
6541
|
onClick: r,
|
|
6449
6542
|
"aria-label": i.sendAriaLabel,
|
|
6450
6543
|
disabled: e || !f && !g,
|
|
6451
|
-
children: /* @__PURE__ */ c(
|
|
6544
|
+
children: /* @__PURE__ */ c(zc, { size: 16 })
|
|
6452
6545
|
}
|
|
6453
6546
|
)
|
|
6454
6547
|
] })
|
|
6455
6548
|
] });
|
|
6456
6549
|
}
|
|
6457
|
-
|
|
6458
|
-
|
|
6550
|
+
const Uc = "https://jexitychat.de/privacy";
|
|
6551
|
+
function Fc() {
|
|
6552
|
+
const t = T();
|
|
6553
|
+
return /* @__PURE__ */ c("p", { class: "jex-privacy-notice", children: [
|
|
6554
|
+
t.privacyNoticePre,
|
|
6555
|
+
" ",
|
|
6556
|
+
/* @__PURE__ */ c(
|
|
6557
|
+
"a",
|
|
6558
|
+
{
|
|
6559
|
+
href: Uc,
|
|
6560
|
+
target: "_blank",
|
|
6561
|
+
rel: "noopener noreferrer",
|
|
6562
|
+
class: "jex-privacy-notice-link",
|
|
6563
|
+
children: t.privacyPolicyLinkText
|
|
6564
|
+
}
|
|
6565
|
+
),
|
|
6566
|
+
"."
|
|
6567
|
+
] });
|
|
6568
|
+
}
|
|
6569
|
+
function Dc({ sessionId: t, visitorId: e, isLoading: n, isStreaming: r, sessionStatus: i, ensureSession: o, onStartFresh: s }) {
|
|
6570
|
+
const l = T(), a = Pe, u = qc({ sessionId: t, visitorId: e, ensureSession: o }), d = rt.value !== null && rt.value > Date.now(), h = n || r || d;
|
|
6459
6571
|
if (i === "resolved")
|
|
6460
6572
|
return /* @__PURE__ */ c("div", { class: "jex-chat-input-resolved", children: [
|
|
6461
6573
|
/* @__PURE__ */ c("div", { class: "jex-resolved-notice", children: l.sessionResolved }),
|
|
@@ -6476,33 +6588,34 @@ function Ac({ sessionId: t, visitorId: e, isLoading: n, isStreaming: r, sessionS
|
|
|
6476
6588
|
!f || h || await u(f);
|
|
6477
6589
|
}
|
|
6478
6590
|
return /* @__PURE__ */ c("div", { class: "jex-chat-input", children: [
|
|
6479
|
-
/* @__PURE__ */ c(
|
|
6480
|
-
/* @__PURE__ */ c(
|
|
6591
|
+
/* @__PURE__ */ c(Lc, {}),
|
|
6592
|
+
/* @__PURE__ */ c(Oc, {}),
|
|
6481
6593
|
/* @__PURE__ */ c(
|
|
6482
|
-
|
|
6594
|
+
Qc,
|
|
6483
6595
|
{
|
|
6484
6596
|
isStreaming: r,
|
|
6485
6597
|
disabled: h,
|
|
6486
6598
|
inputDisabled: n || r,
|
|
6487
6599
|
onSend: p
|
|
6488
6600
|
}
|
|
6489
|
-
)
|
|
6601
|
+
),
|
|
6602
|
+
/* @__PURE__ */ c(Fc, {})
|
|
6490
6603
|
] });
|
|
6491
6604
|
}
|
|
6492
|
-
function
|
|
6605
|
+
function Bc(t) {
|
|
6493
6606
|
const e = t.trim().split(/\s+/).filter(Boolean);
|
|
6494
6607
|
return e.length === 0 ? "?" : e.map((n) => n[0]).join("").slice(0, 2).toUpperCase();
|
|
6495
6608
|
}
|
|
6496
6609
|
function _e({ text: t, streaming: e, error: n, authorId: r, authorName: i, authorImage: o, botAvatarUrl: s }) {
|
|
6497
|
-
const l =
|
|
6610
|
+
const l = T(), a = !!r, [u, d] = C(!1), h = Te(() => d(!0), []), p = l.replyTo.replace("{name}", i ?? ""), f = [
|
|
6498
6611
|
"jex-message bot",
|
|
6499
6612
|
n ? "jex-message-error" : ""
|
|
6500
6613
|
].filter(Boolean).join(" ");
|
|
6501
6614
|
return /* @__PURE__ */ c("div", { class: "jex-message-row bot", children: [
|
|
6502
|
-
/* @__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:
|
|
6615
|
+
/* @__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: Bc(i ?? "") }) : s && !u ? /* @__PURE__ */ c("img", { src: s, alt: "", class: "jex-avatar-img", onError: h }) : /* @__PURE__ */ c(En, { size: 14 }) }),
|
|
6503
6616
|
/* @__PURE__ */ c("div", { class: "jex-message-content", children: [
|
|
6504
6617
|
/* @__PURE__ */ c("div", { class: f, children: [
|
|
6505
|
-
/* @__PURE__ */ c(
|
|
6618
|
+
/* @__PURE__ */ c(wc, { text: t }),
|
|
6506
6619
|
e && /* @__PURE__ */ c("span", { class: "jex-streaming-cursor" })
|
|
6507
6620
|
] }),
|
|
6508
6621
|
a && i && /* @__PURE__ */ c("div", { class: "jex-message-author-row", children: [
|
|
@@ -6515,23 +6628,23 @@ function _e({ text: t, streaming: e, error: n, authorId: r, authorName: i, autho
|
|
|
6515
6628
|
"aria-label": p,
|
|
6516
6629
|
title: p,
|
|
6517
6630
|
onClick: () => {
|
|
6518
|
-
|
|
6631
|
+
_c(i);
|
|
6519
6632
|
},
|
|
6520
|
-
children: /* @__PURE__ */ c(
|
|
6633
|
+
children: /* @__PURE__ */ c(ql, { size: 12 })
|
|
6521
6634
|
}
|
|
6522
6635
|
)
|
|
6523
6636
|
] })
|
|
6524
6637
|
] })
|
|
6525
6638
|
] });
|
|
6526
6639
|
}
|
|
6527
|
-
function
|
|
6640
|
+
function Vc({ text: t }) {
|
|
6528
6641
|
return /* @__PURE__ */ c("div", { class: "jex-message user", children: t });
|
|
6529
6642
|
}
|
|
6530
|
-
function
|
|
6531
|
-
return
|
|
6643
|
+
function go() {
|
|
6644
|
+
return Et(qe.functions.chat.public.helpdesk.submitEscalation);
|
|
6532
6645
|
}
|
|
6533
|
-
function
|
|
6534
|
-
const r =
|
|
6646
|
+
function Hc({ message: t, sessionId: e, visitorId: n }) {
|
|
6647
|
+
const r = T();
|
|
6535
6648
|
return t.formData ? /* @__PURE__ */ c("div", { class: "jex-inline-form-submitted", children: [
|
|
6536
6649
|
/* @__PURE__ */ c("span", { class: "jex-inline-form-check", children: "✓" }),
|
|
6537
6650
|
/* @__PURE__ */ c("div", { children: [
|
|
@@ -6543,7 +6656,7 @@ function Ec({ message: t, sessionId: e, visitorId: n }) {
|
|
|
6543
6656
|
] })
|
|
6544
6657
|
] })
|
|
6545
6658
|
] }) : /* @__PURE__ */ c("div", { class: "jex-message-row bot", children: /* @__PURE__ */ c(
|
|
6546
|
-
|
|
6659
|
+
Wc,
|
|
6547
6660
|
{
|
|
6548
6661
|
messageId: t._id,
|
|
6549
6662
|
sessionId: e,
|
|
@@ -6551,8 +6664,8 @@ function Ec({ message: t, sessionId: e, visitorId: n }) {
|
|
|
6551
6664
|
}
|
|
6552
6665
|
) });
|
|
6553
6666
|
}
|
|
6554
|
-
function
|
|
6555
|
-
const r =
|
|
6667
|
+
function Wc({ messageId: t, sessionId: e, visitorId: n }) {
|
|
6668
|
+
const r = T(), [i, o] = C(""), [s, l] = C(""), [a, u] = C(!1), d = go();
|
|
6556
6669
|
async function h(p) {
|
|
6557
6670
|
if (p.preventDefault(), !a) {
|
|
6558
6671
|
u(!0);
|
|
@@ -6604,17 +6717,22 @@ function qc({ messageId: t, sessionId: e, visitorId: n }) {
|
|
|
6604
6717
|
),
|
|
6605
6718
|
/* @__PURE__ */ c("button", { class: "jex-form-submit", type: "submit", disabled: a, children: a ? r.escalationSubmitting : r.escalationSubmit })
|
|
6606
6719
|
] }),
|
|
6607
|
-
/* @__PURE__ */ c("div", { class: "jex-inline-form-consent", children:
|
|
6720
|
+
/* @__PURE__ */ c("div", { class: "jex-inline-form-consent", children: [
|
|
6721
|
+
r.escalationConsent,
|
|
6722
|
+
" ",
|
|
6723
|
+
/* @__PURE__ */ c("a", { href: "https://jexitychat.de/privacy", target: "_blank", rel: "noopener noreferrer", class: "jex-privacy-notice-link", children: r.escalationPrivacyLinkText }),
|
|
6724
|
+
"."
|
|
6725
|
+
] })
|
|
6608
6726
|
] });
|
|
6609
6727
|
}
|
|
6610
|
-
const
|
|
6728
|
+
const Jc = {
|
|
6611
6729
|
crawl: "🌐",
|
|
6612
6730
|
file: "📄",
|
|
6613
6731
|
snippet: "💡",
|
|
6614
6732
|
qa: "❓"
|
|
6615
6733
|
};
|
|
6616
|
-
function
|
|
6617
|
-
const e =
|
|
6734
|
+
function Kc({ sources: t }) {
|
|
6735
|
+
const e = T(), [n, r] = C(!1);
|
|
6618
6736
|
return t.length === 0 ? null : /* @__PURE__ */ c("div", { class: "jex-sources-row", children: [
|
|
6619
6737
|
/* @__PURE__ */ c(
|
|
6620
6738
|
"button",
|
|
@@ -6636,10 +6754,10 @@ function Pc({ sources: t }) {
|
|
|
6636
6754
|
}
|
|
6637
6755
|
),
|
|
6638
6756
|
n ? /* @__PURE__ */ c("div", { class: "jex-sources-pills", children: t.map((i, o) => {
|
|
6639
|
-
const s = i.sourceType === "crawl", l =
|
|
6757
|
+
const s = i.sourceType === "crawl", l = Zc(i), a = s && i.url ? `${i.title}
|
|
6640
6758
|
${i.url}` : i.title, u = /* @__PURE__ */ c(Q, { children: [
|
|
6641
6759
|
typeof i.id == "number" ? /* @__PURE__ */ c("span", { class: "jex-source-id", children: i.id }) : null,
|
|
6642
|
-
/* @__PURE__ */ c("span", { class: "jex-source-type", children:
|
|
6760
|
+
/* @__PURE__ */ c("span", { class: "jex-source-type", children: Jc[i.sourceType] }),
|
|
6643
6761
|
/* @__PURE__ */ c("span", { class: "jex-source-label", children: l }),
|
|
6644
6762
|
/* @__PURE__ */ c("span", { class: "jex-source-score", children: [
|
|
6645
6763
|
"· ",
|
|
@@ -6661,7 +6779,7 @@ ${i.url}` : i.title, u = /* @__PURE__ */ c(Q, { children: [
|
|
|
6661
6779
|
}) }) : null
|
|
6662
6780
|
] });
|
|
6663
6781
|
}
|
|
6664
|
-
function
|
|
6782
|
+
function Zc(t) {
|
|
6665
6783
|
if (t.sourceType === "crawl" && t.url)
|
|
6666
6784
|
try {
|
|
6667
6785
|
const e = new URL(t.url);
|
|
@@ -6670,25 +6788,25 @@ function Lc(t) {
|
|
|
6670
6788
|
}
|
|
6671
6789
|
return t.title;
|
|
6672
6790
|
}
|
|
6673
|
-
function
|
|
6791
|
+
function Gc() {
|
|
6674
6792
|
return /* @__PURE__ */ c("div", { class: "jex-typing", children: [
|
|
6675
6793
|
/* @__PURE__ */ c("span", {}),
|
|
6676
6794
|
/* @__PURE__ */ c("span", {}),
|
|
6677
6795
|
/* @__PURE__ */ c("span", {})
|
|
6678
6796
|
] });
|
|
6679
6797
|
}
|
|
6680
|
-
const
|
|
6681
|
-
function
|
|
6682
|
-
return t.replace(
|
|
6798
|
+
const Yc = /\s?\[\d+\]/g;
|
|
6799
|
+
function Qr(t) {
|
|
6800
|
+
return t.replace(Yc, "");
|
|
6683
6801
|
}
|
|
6684
|
-
function
|
|
6685
|
-
const l =
|
|
6686
|
-
return
|
|
6802
|
+
function Xc({ conversations: t, greeting: e, sessionNotFound: n, resumeFailed: r, onStartFresh: i, sessionId: o, visitorId: s }) {
|
|
6803
|
+
const l = T(), a = ue(null), [u, d] = C(null), h = ue(null);
|
|
6804
|
+
return R(() => {
|
|
6687
6805
|
if (!s || !t || t.length === 0)
|
|
6688
6806
|
return;
|
|
6689
6807
|
const p = t[t.length - 1];
|
|
6690
|
-
p.role === "assistant" && p.status !== "streaming" && p._id !== h.current && (h.current = p._id,
|
|
6691
|
-
}, [t, s]),
|
|
6808
|
+
p.role === "assistant" && p.status !== "streaming" && p._id !== h.current && (h.current = p._id, $n(s));
|
|
6809
|
+
}, [t, s]), R(() => {
|
|
6692
6810
|
a.current?.scrollIntoView({ behavior: "smooth" });
|
|
6693
6811
|
}, [t?.length, t?.at(-1)?.content]), /* @__PURE__ */ c("div", { class: "jex-chat-messages", children: [
|
|
6694
6812
|
/* @__PURE__ */ c(_e, { text: e }),
|
|
@@ -6712,7 +6830,7 @@ function Nc({ conversations: t, greeting: e, sessionNotFound: n, resumeFailed: r
|
|
|
6712
6830
|
return /* @__PURE__ */ c(_e, { text: g }, p._id);
|
|
6713
6831
|
}
|
|
6714
6832
|
if (p.contentType === "escalation-form" && o && s)
|
|
6715
|
-
return
|
|
6833
|
+
return ul.value === "screen" && !p.formData ? u === p._id ? null : /* @__PURE__ */ c("div", { class: "jex-inline-form jex-inline-form-card", children: [
|
|
6716
6834
|
/* @__PURE__ */ c("div", { class: "jex-inline-form-title", children: l.escalationPromptTitle }),
|
|
6717
6835
|
/* @__PURE__ */ c("div", { class: "jex-inline-form-subtitle", children: l.escalationPromptSubtitle }),
|
|
6718
6836
|
/* @__PURE__ */ c(
|
|
@@ -6737,19 +6855,19 @@ function Nc({ conversations: t, greeting: e, sessionNotFound: n, resumeFailed: r
|
|
|
6737
6855
|
children: l.escalationSkip
|
|
6738
6856
|
}
|
|
6739
6857
|
)
|
|
6740
|
-
] }, p._id) : /* @__PURE__ */ c(
|
|
6858
|
+
] }, p._id) : /* @__PURE__ */ c(Hc, { message: p, sessionId: o, visitorId: s }, p._id);
|
|
6741
6859
|
if (p.contentType === "escalation-confirm") {
|
|
6742
6860
|
const g = p.noticeKind === "escalation-confirmed" ? l.noticeEscalationConfirmed.replace("{name}", p.noticeData?.visitorName ?? "").replace("{email}", p.noticeData?.visitorEmail ?? "").replace("{ref}", p.noticeData?.visitorId ?? "") : p.content;
|
|
6743
6861
|
return /* @__PURE__ */ c(_e, { text: g }, p._id);
|
|
6744
6862
|
}
|
|
6745
6863
|
if (p.role === "user")
|
|
6746
|
-
return /* @__PURE__ */ c(
|
|
6864
|
+
return /* @__PURE__ */ c(Vc, { text: p.content }, p._id);
|
|
6747
6865
|
const f = {
|
|
6748
6866
|
authorId: p.authorId,
|
|
6749
6867
|
authorName: p.authorName,
|
|
6750
6868
|
authorImage: p.authorImage
|
|
6751
6869
|
};
|
|
6752
|
-
return p.status === "streaming" && p.content === "" ? /* @__PURE__ */ c(
|
|
6870
|
+
return p.status === "streaming" && p.content === "" ? /* @__PURE__ */ c(Gc, {}, p._id) : p.status === "streaming" ? /* @__PURE__ */ c(_e, { text: Qr(p.content), streaming: !0, ...f }, p._id) : p.status === "error" ? /* @__PURE__ */ c(
|
|
6753
6871
|
_e,
|
|
6754
6872
|
{
|
|
6755
6873
|
text: p.errorMessage ?? `${l.somethingWentWrong}. ${l.tryAgain}.`,
|
|
@@ -6758,16 +6876,16 @@ function Nc({ conversations: t, greeting: e, sessionNotFound: n, resumeFailed: r
|
|
|
6758
6876
|
},
|
|
6759
6877
|
p._id
|
|
6760
6878
|
) : /* @__PURE__ */ c("div", { children: [
|
|
6761
|
-
/* @__PURE__ */ c(_e, { text:
|
|
6762
|
-
p.sources && p.sources.length > 0 ? /* @__PURE__ */ c(
|
|
6879
|
+
/* @__PURE__ */ c(_e, { text: Qr(p.content), ...f }),
|
|
6880
|
+
p.sources && p.sources.length > 0 ? /* @__PURE__ */ c(Kc, { sources: p.sources }) : null
|
|
6763
6881
|
] }, p._id);
|
|
6764
6882
|
}),
|
|
6765
6883
|
/* @__PURE__ */ c("div", { ref: a })
|
|
6766
6884
|
] });
|
|
6767
6885
|
}
|
|
6768
|
-
function
|
|
6886
|
+
function bn({ message: t }) {
|
|
6769
6887
|
const [e, n] = C(!1);
|
|
6770
|
-
return
|
|
6888
|
+
return R(() => {
|
|
6771
6889
|
const r = setTimeout(() => {
|
|
6772
6890
|
n(!0);
|
|
6773
6891
|
}, 80);
|
|
@@ -6779,11 +6897,11 @@ function gn({ message: t }) {
|
|
|
6779
6897
|
t && /* @__PURE__ */ c("p", { class: "jex-loading-message", children: t })
|
|
6780
6898
|
] }) : null;
|
|
6781
6899
|
}
|
|
6782
|
-
function
|
|
6783
|
-
const n =
|
|
6900
|
+
function eu({ sessionId: t, visitorId: e }) {
|
|
6901
|
+
const n = wr(
|
|
6784
6902
|
qe.functions.chat.public.conversations.listBySession,
|
|
6785
6903
|
t && e ? { sessionId: t, visitorId: e } : "skip"
|
|
6786
|
-
), r =
|
|
6904
|
+
), r = wr(
|
|
6787
6905
|
qe.functions.chat.public.sessions.getSessionStatus,
|
|
6788
6906
|
t && e ? { sessionId: t, visitorId: e } : "skip"
|
|
6789
6907
|
), i = t !== null && n === void 0, o = n?.some((s) => s.status === "streaming") ?? !1;
|
|
@@ -6794,22 +6912,22 @@ function Qc({ sessionId: t, visitorId: e }) {
|
|
|
6794
6912
|
isStreaming: o
|
|
6795
6913
|
};
|
|
6796
6914
|
}
|
|
6797
|
-
function
|
|
6798
|
-
const h =
|
|
6915
|
+
function tu({ greeting: t, orgSlug: e, projSlug: n, sessionId: r, visitorId: i, isLoading: o, sessionNotFound: s, resumeFailed: l, isOrgDeleted: a, ensureSession: u, startFresh: d }) {
|
|
6916
|
+
const h = T(), { conversations: p, sessionStatus: f, isLoading: g, isStreaming: m } = eu({ sessionId: r, visitorId: i }), x = ue(
|
|
6799
6917
|
(() => {
|
|
6800
|
-
const
|
|
6801
|
-
return
|
|
6918
|
+
const A = Ze.peek();
|
|
6919
|
+
return A !== null ? A : Yi.peek() ? "resume" : "fresh";
|
|
6802
6920
|
})()
|
|
6803
6921
|
).current;
|
|
6804
|
-
return
|
|
6922
|
+
return R(() => {
|
|
6805
6923
|
Ze.value = null;
|
|
6806
|
-
}, []),
|
|
6924
|
+
}, []), R(() => {
|
|
6807
6925
|
u();
|
|
6808
|
-
}, [u]),
|
|
6809
|
-
i &&
|
|
6810
|
-
}, [i]), a ? /* @__PURE__ */ c("div", { class: "jex-chat-messages", children: /* @__PURE__ */ c("div", { class: "jex-session-notice", children: h.chatNoLongerAvailable }) }) : x === "fresh" && !r ? /* @__PURE__ */ c(
|
|
6926
|
+
}, [u]), R(() => {
|
|
6927
|
+
i && $n(i);
|
|
6928
|
+
}, [i]), a ? /* @__PURE__ */ c("div", { class: "jex-chat-messages", children: /* @__PURE__ */ c("div", { class: "jex-session-notice", children: h.chatNoLongerAvailable }) }) : x === "fresh" && !r ? /* @__PURE__ */ c(bn, { message: h.startingConversation }) : x === "resume" && (!r || g) ? /* @__PURE__ */ c(bn, { message: h.resumeConversation }) : /* @__PURE__ */ c(Q, { children: [
|
|
6811
6929
|
/* @__PURE__ */ c(
|
|
6812
|
-
|
|
6930
|
+
Xc,
|
|
6813
6931
|
{
|
|
6814
6932
|
conversations: p,
|
|
6815
6933
|
greeting: t,
|
|
@@ -6821,7 +6939,7 @@ function Fc({ greeting: t, orgSlug: e, projSlug: n, sessionId: r, visitorId: i,
|
|
|
6821
6939
|
}
|
|
6822
6940
|
),
|
|
6823
6941
|
/* @__PURE__ */ c(
|
|
6824
|
-
|
|
6942
|
+
Dc,
|
|
6825
6943
|
{
|
|
6826
6944
|
sessionId: r,
|
|
6827
6945
|
visitorId: i,
|
|
@@ -6834,8 +6952,8 @@ function Fc({ greeting: t, orgSlug: e, projSlug: n, sessionId: r, visitorId: i,
|
|
|
6834
6952
|
)
|
|
6835
6953
|
] });
|
|
6836
6954
|
}
|
|
6837
|
-
function
|
|
6838
|
-
const r =
|
|
6955
|
+
function nu({ formMessageId: t, sessionId: e, visitorId: n }) {
|
|
6956
|
+
const r = T(), [i, o] = C(""), [s, l] = C(""), a = go(), [u, d] = C(!1), [h, p] = C(null);
|
|
6839
6957
|
async function f(g) {
|
|
6840
6958
|
g.preventDefault(), d(!0), p(null);
|
|
6841
6959
|
try {
|
|
@@ -6845,7 +6963,7 @@ function Dc({ formMessageId: t, sessionId: e, visitorId: n }) {
|
|
|
6845
6963
|
formMessageId: t,
|
|
6846
6964
|
visitorName: i.trim(),
|
|
6847
6965
|
visitorEmail: s.trim()
|
|
6848
|
-
}),
|
|
6966
|
+
}), Ct();
|
|
6849
6967
|
} catch (m) {
|
|
6850
6968
|
console.error("[EscalationFormScreen] Submit failed:", m), p(r.escalationSubmitFailed);
|
|
6851
6969
|
} finally {
|
|
@@ -6887,17 +7005,22 @@ function Dc({ formMessageId: t, sessionId: e, visitorId: n }) {
|
|
|
6887
7005
|
),
|
|
6888
7006
|
/* @__PURE__ */ c("button", { class: "jex-form-submit", type: "submit", disabled: u, children: r.escalationSubmit })
|
|
6889
7007
|
] }),
|
|
6890
|
-
/* @__PURE__ */ c("div", { class: "jex-inline-form-consent", style: { textAlign: "center", margin: "16px 0 8px 0" }, children:
|
|
7008
|
+
/* @__PURE__ */ c("div", { class: "jex-inline-form-consent", style: { textAlign: "center", margin: "16px 0 8px 0" }, children: [
|
|
7009
|
+
r.escalationConsent,
|
|
7010
|
+
" ",
|
|
7011
|
+
/* @__PURE__ */ c("a", { href: "https://jexitychat.de/privacy", target: "_blank", rel: "noopener noreferrer", class: "jex-privacy-notice-link", children: r.escalationPrivacyLinkText }),
|
|
7012
|
+
"."
|
|
7013
|
+
] }),
|
|
6891
7014
|
/* @__PURE__ */ c("button", { class: "jex-escalation-skip", type: "button", onClick: () => {
|
|
6892
|
-
|
|
7015
|
+
Ct();
|
|
6893
7016
|
}, children: r.escalationSkip })
|
|
6894
7017
|
] });
|
|
6895
7018
|
}
|
|
6896
|
-
function
|
|
6897
|
-
return
|
|
7019
|
+
function ru() {
|
|
7020
|
+
return Et(qe.functions.chat.public.helpdesk.createEscalationRequest);
|
|
6898
7021
|
}
|
|
6899
|
-
function
|
|
6900
|
-
const n =
|
|
7022
|
+
function Ur({ sessionId: t, visitorId: e }) {
|
|
7023
|
+
const n = T(), [r, i] = C(!1), [o, s] = C(null), l = ru();
|
|
6901
7024
|
async function a() {
|
|
6902
7025
|
if (!t || !e)
|
|
6903
7026
|
return;
|
|
@@ -6940,23 +7063,23 @@ function Lr({ sessionId: t, visitorId: e }) {
|
|
|
6940
7063
|
o && /* @__PURE__ */ c("div", { class: "jex-handoff-error", role: "alert", children: o })
|
|
6941
7064
|
] });
|
|
6942
7065
|
}
|
|
6943
|
-
async function
|
|
6944
|
-
const t =
|
|
7066
|
+
async function iu() {
|
|
7067
|
+
const t = Bi.value;
|
|
6945
7068
|
if (!t)
|
|
6946
7069
|
return console.warn("[JexityChat] Bootstrap refresh skipped — inputs missing"), { ok: !1, reason: "no-inputs" };
|
|
6947
|
-
const e = await
|
|
7070
|
+
const e = await Hi(t.orgSlug, t.siteUrl, t.projSlug);
|
|
6948
7071
|
if (!e.ok)
|
|
6949
7072
|
return console.warn("[JexityChat] Bootstrap refresh failed:", e.error), { ok: !1, reason: e.error };
|
|
6950
7073
|
const n = e.token;
|
|
6951
7074
|
return le.value = n, { ok: !0, token: n };
|
|
6952
7075
|
}
|
|
6953
|
-
function
|
|
6954
|
-
return
|
|
7076
|
+
function Fr(t) {
|
|
7077
|
+
return mo(t) ? "unauthorized" : t instanceof Error && /network|fetch|failed to fetch/i.test(t.message) ? "network" : "unknown";
|
|
6955
7078
|
}
|
|
6956
|
-
function
|
|
7079
|
+
function mo(t) {
|
|
6957
7080
|
return t instanceof vt ? t.data?.code === "UNAUTHORIZED_ORIGIN" : !1;
|
|
6958
7081
|
}
|
|
6959
|
-
function
|
|
7082
|
+
function ou(t = 1e4) {
|
|
6960
7083
|
return le.value ? Promise.resolve(le.value) : new Promise((e) => {
|
|
6961
7084
|
let n = !1;
|
|
6962
7085
|
const r = (s) => {
|
|
@@ -6968,9 +7091,9 @@ function Vc(t = 1e4) {
|
|
|
6968
7091
|
});
|
|
6969
7092
|
});
|
|
6970
7093
|
}
|
|
6971
|
-
function
|
|
6972
|
-
const n = ue(null), r =
|
|
6973
|
-
const g = await
|
|
7094
|
+
function su(t, e) {
|
|
7095
|
+
const n = ue(null), r = Re(!1), i = Re(!1), o = Re(!1), s = Re(null), l = Et(qe.functions.chat.public.sessions.createOrResume), a = async (f) => {
|
|
7096
|
+
const g = await ou();
|
|
6974
7097
|
if (!g)
|
|
6975
7098
|
return console.warn("[JexityChat] No bootstrap token after 10s — session creation blocked."), Se.value = "no-token", null;
|
|
6976
7099
|
const m = (v) => ({
|
|
@@ -6980,52 +7103,52 @@ function Hc(t, e) {
|
|
|
6980
7103
|
bootstrapToken: v,
|
|
6981
7104
|
...jt.value ? { source: jt.value } : {}
|
|
6982
7105
|
});
|
|
6983
|
-
|
|
7106
|
+
pn.value = !0;
|
|
6984
7107
|
let x;
|
|
6985
7108
|
try {
|
|
6986
7109
|
try {
|
|
6987
7110
|
x = await l(m(g));
|
|
6988
7111
|
} catch (v) {
|
|
6989
|
-
if (!
|
|
7112
|
+
if (!mo(v))
|
|
6990
7113
|
throw v;
|
|
6991
|
-
const
|
|
6992
|
-
if (!
|
|
6993
|
-
return Se.value =
|
|
6994
|
-
x = await l(m(
|
|
7114
|
+
const A = await iu();
|
|
7115
|
+
if (!A.ok)
|
|
7116
|
+
return Se.value = A.reason === "rate_limited" ? "network" : "unauthorized", null;
|
|
7117
|
+
x = await l(m(A.token));
|
|
6995
7118
|
}
|
|
6996
7119
|
} finally {
|
|
6997
|
-
|
|
7120
|
+
pn.value = !1;
|
|
6998
7121
|
}
|
|
6999
7122
|
Se.value = null, s.value = x.status;
|
|
7000
7123
|
const y = { sessionId: x.sessionId, visitorId: f };
|
|
7001
7124
|
return n.current = y, { session: y, result: x };
|
|
7002
|
-
}, u =
|
|
7125
|
+
}, u = Te(async () => {
|
|
7003
7126
|
if (n.current)
|
|
7004
7127
|
return n.current;
|
|
7005
7128
|
if (o.value)
|
|
7006
7129
|
return null;
|
|
7007
7130
|
r.value = !0;
|
|
7008
|
-
const f = xe.value !== null, g = xe.value ??
|
|
7131
|
+
const f = xe.value !== null, g = xe.value ?? Sr();
|
|
7009
7132
|
try {
|
|
7010
7133
|
const m = await a(g);
|
|
7011
7134
|
return m ? (f && m.result.isNew && (i.value = !0, o.value = !0), m.session) : null;
|
|
7012
7135
|
} catch (m) {
|
|
7013
|
-
return console.error("[JexityChat] Failed to create session:", m), Se.value =
|
|
7136
|
+
return console.error("[JexityChat] Failed to create session:", m), Se.value = Fr(m), null;
|
|
7014
7137
|
} finally {
|
|
7015
7138
|
r.value = !1;
|
|
7016
7139
|
}
|
|
7017
|
-
}, [t, e, l, r, i, o]), d =
|
|
7140
|
+
}, [t, e, l, r, i, o]), d = Te(() => {
|
|
7018
7141
|
n.current = null, i.value = !1, o.value = !1;
|
|
7019
7142
|
}, [i, o]);
|
|
7020
|
-
|
|
7021
|
-
const h =
|
|
7143
|
+
R(() => dl(d), [d]);
|
|
7144
|
+
const h = Te(async () => {
|
|
7022
7145
|
n.current = null, o.value = !1, i.value = !1;
|
|
7023
|
-
const f =
|
|
7146
|
+
const f = Sr();
|
|
7024
7147
|
r.value = !0;
|
|
7025
7148
|
try {
|
|
7026
7149
|
return (await a(f))?.session ?? null;
|
|
7027
7150
|
} catch (g) {
|
|
7028
|
-
return console.error("[JexityChat] Failed to create fresh session:", g), Se.value =
|
|
7151
|
+
return console.error("[JexityChat] Failed to create fresh session:", g), Se.value = Fr(g), null;
|
|
7029
7152
|
} finally {
|
|
7030
7153
|
r.value = !1;
|
|
7031
7154
|
}
|
|
@@ -7043,14 +7166,14 @@ function Hc(t, e) {
|
|
|
7043
7166
|
resetSession: d
|
|
7044
7167
|
};
|
|
7045
7168
|
}
|
|
7046
|
-
function
|
|
7047
|
-
const t =
|
|
7169
|
+
function au() {
|
|
7170
|
+
const t = T(), [e, n] = C(""), [r, i] = C(""), [o, s] = C("");
|
|
7048
7171
|
async function l(a) {
|
|
7049
|
-
a.preventDefault(),
|
|
7172
|
+
a.preventDefault(), dn({ id: "loading", message: t.submittingTicket }), await new Promise((d) => {
|
|
7050
7173
|
setTimeout(d, 1200);
|
|
7051
7174
|
});
|
|
7052
7175
|
const u = "JEX-" + Math.random().toString(36).slice(2, 8).toUpperCase();
|
|
7053
|
-
|
|
7176
|
+
dn({ id: "confirmation", ref: u });
|
|
7054
7177
|
}
|
|
7055
7178
|
return /* @__PURE__ */ c("div", { class: "jex-form-screen", children: [
|
|
7056
7179
|
/* @__PURE__ */ c("h2", { class: "jex-form-title", children: t.submitTicket }),
|
|
@@ -7099,8 +7222,8 @@ function Wc() {
|
|
|
7099
7222
|
] })
|
|
7100
7223
|
] });
|
|
7101
7224
|
}
|
|
7102
|
-
function
|
|
7103
|
-
const e =
|
|
7225
|
+
function lu({ ticketRef: t }) {
|
|
7226
|
+
const e = T();
|
|
7104
7227
|
return /* @__PURE__ */ c("div", { class: "jex-confirmation", children: [
|
|
7105
7228
|
/* @__PURE__ */ c("div", { class: "jex-confirmation-icon", "aria-hidden": "true", children: "✓" }),
|
|
7106
7229
|
/* @__PURE__ */ c("h2", { class: "jex-confirmation-title", children: e.ticketSubmitted }),
|
|
@@ -7112,15 +7235,15 @@ function Jc({ ticketRef: t }) {
|
|
|
7112
7235
|
{
|
|
7113
7236
|
class: "jex-confirmation-done",
|
|
7114
7237
|
onClick: () => {
|
|
7115
|
-
|
|
7238
|
+
P.value = !1;
|
|
7116
7239
|
},
|
|
7117
7240
|
children: e.done
|
|
7118
7241
|
}
|
|
7119
7242
|
)
|
|
7120
7243
|
] });
|
|
7121
7244
|
}
|
|
7122
|
-
function
|
|
7123
|
-
const r =
|
|
7245
|
+
function cu({ message: t, onRetry: e, onBack: n }) {
|
|
7246
|
+
const r = T();
|
|
7124
7247
|
return /* @__PURE__ */ c("div", { class: "jex-overlay jex-error", children: [
|
|
7125
7248
|
/* @__PURE__ */ c("p", { class: "jex-error-message", children: t }),
|
|
7126
7249
|
/* @__PURE__ */ c("div", { class: "jex-error-actions", children: [
|
|
@@ -7129,25 +7252,25 @@ function Kc({ message: t, onRetry: e, onBack: n }) {
|
|
|
7129
7252
|
] })
|
|
7130
7253
|
] });
|
|
7131
7254
|
}
|
|
7132
|
-
function
|
|
7255
|
+
function Dr({ 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: p }) {
|
|
7133
7256
|
const f = N.value, g = f[f.length - 1], m = [...f].reverse().find(
|
|
7134
7257
|
(x) => x.id === "confirmation"
|
|
7135
7258
|
);
|
|
7136
7259
|
return /* @__PURE__ */ c("div", { class: "jex-screen-container", children: [
|
|
7137
|
-
g.id === "home" && /* @__PURE__ */ c(
|
|
7138
|
-
g.id === "selection" && /* @__PURE__ */ c(
|
|
7139
|
-
g.id === "form" && /* @__PURE__ */ c(
|
|
7260
|
+
g.id === "home" && /* @__PURE__ */ c(Cl, { greeting: t, title: e, onStartFresh: h, onResetSession: p }),
|
|
7261
|
+
g.id === "selection" && /* @__PURE__ */ c(Rl, { title: e }),
|
|
7262
|
+
g.id === "form" && /* @__PURE__ */ c(au, {}),
|
|
7140
7263
|
g.id === "escalation-form" && /* @__PURE__ */ c(
|
|
7141
|
-
|
|
7264
|
+
nu,
|
|
7142
7265
|
{
|
|
7143
7266
|
formMessageId: g.formMessageId,
|
|
7144
7267
|
sessionId: g.sessionId,
|
|
7145
7268
|
visitorId: g.visitorId
|
|
7146
7269
|
}
|
|
7147
7270
|
),
|
|
7148
|
-
g.id === "confirmation" && m && /* @__PURE__ */ c(
|
|
7271
|
+
g.id === "confirmation" && m && /* @__PURE__ */ c(lu, { ticketRef: m.ref }),
|
|
7149
7272
|
g.id === "chat" && /* @__PURE__ */ c(
|
|
7150
|
-
|
|
7273
|
+
tu,
|
|
7151
7274
|
{
|
|
7152
7275
|
greeting: t,
|
|
7153
7276
|
orgSlug: n,
|
|
@@ -7162,43 +7285,52 @@ function zr({ greeting: t, title: e, orgSlug: n, projSlug: r, sessionId: i, visi
|
|
|
7162
7285
|
startFresh: h
|
|
7163
7286
|
}
|
|
7164
7287
|
),
|
|
7165
|
-
g.id === "loading" && /* @__PURE__ */ c(
|
|
7288
|
+
g.id === "loading" && /* @__PURE__ */ c(bn, { message: g.message }),
|
|
7166
7289
|
g.id === "error" && /* @__PURE__ */ c(
|
|
7167
|
-
|
|
7290
|
+
cu,
|
|
7168
7291
|
{
|
|
7169
7292
|
message: g.message,
|
|
7170
|
-
onRetry: () =>
|
|
7171
|
-
onBack:
|
|
7293
|
+
onRetry: () => dn({ id: "loading" }),
|
|
7294
|
+
onBack: Ct
|
|
7172
7295
|
}
|
|
7173
7296
|
)
|
|
7174
7297
|
] });
|
|
7175
7298
|
}
|
|
7176
|
-
function
|
|
7177
|
-
|
|
7178
|
-
|
|
7179
|
-
|
|
7180
|
-
|
|
7299
|
+
function uu({ options: t }) {
|
|
7300
|
+
return Za({
|
|
7301
|
+
orgSlug: t.orgSlug,
|
|
7302
|
+
projSlug: t.projSlug,
|
|
7303
|
+
preToken: t.bootstrapToken,
|
|
7304
|
+
convexUrl: t.convexUrl,
|
|
7305
|
+
preAllowedUrls: t.allowedUrls ?? [],
|
|
7306
|
+
preExcludedPaths: t.excludePaths
|
|
7307
|
+
}), Xa() ? /* @__PURE__ */ c(hu, { options: t }) : null;
|
|
7308
|
+
}
|
|
7309
|
+
function hu({ options: t }) {
|
|
7310
|
+
const e = Ja(t.orgSlug, t.projSlug, t.convexUrl);
|
|
7311
|
+
ol(t.parentOrigin), R(() => {
|
|
7312
|
+
ll(), cl();
|
|
7181
7313
|
}, []);
|
|
7182
|
-
const { sessionId: n, visitorId: r, isLoading: i, sessionNotFound: o, resumeFailed: s, isOrgDeleted: l, ensureSession: a, startFresh: u, resetSession: d } =
|
|
7183
|
-
|
|
7184
|
-
|
|
7185
|
-
}, [h.locale]),
|
|
7186
|
-
if (!
|
|
7314
|
+
const { sessionId: n, visitorId: r, isLoading: i, sessionNotFound: o, resumeFailed: s, isOrgDeleted: l, ensureSession: a, startFresh: u, resetSession: d } = su(t.orgSlug, t.projSlug), h = Ha(t, e);
|
|
7315
|
+
R(() => {
|
|
7316
|
+
In.value = Ji(h.locale);
|
|
7317
|
+
}, [h.locale]), R(() => {
|
|
7318
|
+
if (!P.value || h.mode === "embedded" || !window.matchMedia("(max-width: 480px), (pointer: coarse) and (max-width: 768px)").matches)
|
|
7187
7319
|
return;
|
|
7188
|
-
const
|
|
7320
|
+
const A = document.documentElement.style.overflow;
|
|
7189
7321
|
return document.documentElement.style.overflow = "hidden", () => {
|
|
7190
|
-
document.documentElement.style.overflow =
|
|
7322
|
+
document.documentElement.style.overflow = A;
|
|
7191
7323
|
};
|
|
7192
|
-
}, [
|
|
7324
|
+
}, [P.value, h.mode]), R(() => {
|
|
7193
7325
|
if (h.mode !== "embedded")
|
|
7194
7326
|
try {
|
|
7195
|
-
return
|
|
7196
|
-
} catch (
|
|
7197
|
-
console.warn("[JexityChat] Idle-lock watcher failed to start:",
|
|
7327
|
+
return gl();
|
|
7328
|
+
} catch (A) {
|
|
7329
|
+
console.warn("[JexityChat] Idle-lock watcher failed to start:", A);
|
|
7198
7330
|
return;
|
|
7199
7331
|
}
|
|
7200
7332
|
}, [h.mode]);
|
|
7201
|
-
const p = h.position === "bottom-left", f = h.colorScheme === "dark" || h.colorScheme === "light" ? h.colorScheme : "", g =
|
|
7333
|
+
const p = h.position === "bottom-left", f = h.colorScheme === "dark" || h.colorScheme === "light" ? h.colorScheme : "", g = ml({
|
|
7202
7334
|
...t,
|
|
7203
7335
|
primaryColor: h.primaryColor,
|
|
7204
7336
|
accentColor: h.accentColor,
|
|
@@ -7215,15 +7347,15 @@ function Zc({ options: t }) {
|
|
|
7215
7347
|
style: v,
|
|
7216
7348
|
children: m ? /* @__PURE__ */ c("div", { class: "jex-embedded", children: [
|
|
7217
7349
|
/* @__PURE__ */ c(
|
|
7218
|
-
|
|
7350
|
+
Tr,
|
|
7219
7351
|
{
|
|
7220
7352
|
title: h.title,
|
|
7221
|
-
rightAction: y ? /* @__PURE__ */ c(
|
|
7353
|
+
rightAction: y ? /* @__PURE__ */ c(Ur, { sessionId: n, visitorId: r }) : null,
|
|
7222
7354
|
showClose: !m
|
|
7223
7355
|
}
|
|
7224
7356
|
),
|
|
7225
7357
|
/* @__PURE__ */ c(
|
|
7226
|
-
|
|
7358
|
+
Dr,
|
|
7227
7359
|
{
|
|
7228
7360
|
greeting: h.greeting,
|
|
7229
7361
|
title: h.title,
|
|
@@ -7240,18 +7372,18 @@ function Zc({ options: t }) {
|
|
|
7240
7372
|
resetSession: d
|
|
7241
7373
|
}
|
|
7242
7374
|
),
|
|
7243
|
-
!h.hideBranding && /* @__PURE__ */ c(
|
|
7375
|
+
!h.hideBranding && /* @__PURE__ */ c(Ar, {})
|
|
7244
7376
|
] }) : /* @__PURE__ */ c("div", { class: `jex-container${p ? " jex-pos-left" : ""}`, children: [
|
|
7245
|
-
|
|
7377
|
+
P.value && /* @__PURE__ */ c("div", { class: "jex-chat-window", children: [
|
|
7246
7378
|
/* @__PURE__ */ c(
|
|
7247
|
-
|
|
7379
|
+
Tr,
|
|
7248
7380
|
{
|
|
7249
7381
|
title: h.title,
|
|
7250
|
-
rightAction: y ? /* @__PURE__ */ c(
|
|
7382
|
+
rightAction: y ? /* @__PURE__ */ c(Ur, { sessionId: n, visitorId: r }) : null
|
|
7251
7383
|
}
|
|
7252
7384
|
),
|
|
7253
7385
|
/* @__PURE__ */ c(
|
|
7254
|
-
|
|
7386
|
+
Dr,
|
|
7255
7387
|
{
|
|
7256
7388
|
greeting: h.greeting,
|
|
7257
7389
|
title: h.title,
|
|
@@ -7268,10 +7400,10 @@ function Zc({ options: t }) {
|
|
|
7268
7400
|
resetSession: d
|
|
7269
7401
|
}
|
|
7270
7402
|
),
|
|
7271
|
-
!h.hideBranding && /* @__PURE__ */ c(
|
|
7403
|
+
!h.hideBranding && /* @__PURE__ */ c(Ar, {})
|
|
7272
7404
|
] }),
|
|
7273
7405
|
/* @__PURE__ */ c(
|
|
7274
|
-
|
|
7406
|
+
Sl,
|
|
7275
7407
|
{
|
|
7276
7408
|
iconOption: h.triggerIcon,
|
|
7277
7409
|
radius: h.triggerRadius,
|
|
@@ -7282,34 +7414,34 @@ function Zc({ options: t }) {
|
|
|
7282
7414
|
}
|
|
7283
7415
|
);
|
|
7284
7416
|
}
|
|
7285
|
-
const Gc = '.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}';
|
|
7286
|
-
function
|
|
7417
|
+
const du = '.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-privacy-notice{margin:0;text-align:center;font-size:10px;line-height:1.5;color:var(--jex-text-muted)}.jex-privacy-notice-link{color:var(--jex-primary);text-decoration:underline;text-underline-offset:2px;text-decoration-color:color-mix(in srgb,var(--jex-primary) 50%,transparent);transition:text-decoration-color .15s}.jex-privacy-notice-link:hover{text-decoration-color:var(--jex-primary)}.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}';
|
|
7418
|
+
function pu(t) {
|
|
7287
7419
|
const e = document.createElement("style");
|
|
7288
|
-
e.textContent =
|
|
7420
|
+
e.textContent = du, t.appendChild(e);
|
|
7289
7421
|
}
|
|
7290
|
-
const
|
|
7291
|
-
let
|
|
7292
|
-
function
|
|
7293
|
-
const e = t ??
|
|
7422
|
+
const fu = "https://festive-mouse-978.eu-west-1.convex.cloud";
|
|
7423
|
+
let Zt = null;
|
|
7424
|
+
function gu(t) {
|
|
7425
|
+
const e = t ?? fu;
|
|
7294
7426
|
if (!e)
|
|
7295
7427
|
throw new Error("[jexity] No Convex URL — set VITE_CONVEX_URL at build time or data-convex-url on the script tag");
|
|
7296
|
-
return
|
|
7428
|
+
return Zt || (Zt = new Aa(Va(e))), Zt;
|
|
7297
7429
|
}
|
|
7298
|
-
function
|
|
7430
|
+
function mu(t, e) {
|
|
7299
7431
|
const n = t.shadowRoot ?? t.attachShadow({ mode: "open" });
|
|
7300
7432
|
for (; n.firstChild; )
|
|
7301
7433
|
n.removeChild(n.firstChild);
|
|
7302
|
-
|
|
7434
|
+
pu(n), jt.value = e.source, le.value = e.bootstrapToken, N.value = [{ id: "home" }], e.mode === "embedded" && (t.classList.add("jex-mode-embedded"), P.value = !0);
|
|
7303
7435
|
const r = document.createElement("div");
|
|
7304
7436
|
return e.mode === "embedded" && (r.style.cssText = "width:100%;height:100%"), n.appendChild(r), ge(
|
|
7305
|
-
/* @__PURE__ */ c(
|
|
7437
|
+
/* @__PURE__ */ c($a, { client: gu(e.convexUrl), children: /* @__PURE__ */ c(uu, { options: e }) }),
|
|
7306
7438
|
r
|
|
7307
7439
|
), function() {
|
|
7308
|
-
ge(null, r),
|
|
7440
|
+
ge(null, r), P.value = !1, jt.value = void 0, le.value = void 0, N.value = [{ id: "home" }];
|
|
7309
7441
|
};
|
|
7310
7442
|
}
|
|
7311
|
-
function
|
|
7312
|
-
const r =
|
|
7443
|
+
function xu(t, e, n) {
|
|
7444
|
+
const r = mu(t, e), i = /* @__PURE__ */ new Set(), o = P.subscribe((s) => {
|
|
7313
7445
|
for (const l of i)
|
|
7314
7446
|
l(s);
|
|
7315
7447
|
});
|
|
@@ -7318,16 +7450,16 @@ function nu(t, e, n) {
|
|
|
7318
7450
|
o(), i.clear(), r(), n && n();
|
|
7319
7451
|
},
|
|
7320
7452
|
open() {
|
|
7321
|
-
|
|
7453
|
+
P.value = !0;
|
|
7322
7454
|
},
|
|
7323
7455
|
close() {
|
|
7324
|
-
|
|
7456
|
+
P.value = !1;
|
|
7325
7457
|
},
|
|
7326
7458
|
toggle() {
|
|
7327
|
-
|
|
7459
|
+
P.value = !P.value;
|
|
7328
7460
|
},
|
|
7329
7461
|
get isOpen() {
|
|
7330
|
-
return
|
|
7462
|
+
return P.value;
|
|
7331
7463
|
},
|
|
7332
7464
|
subscribe(s) {
|
|
7333
7465
|
return i.add(s), () => {
|
|
@@ -7337,21 +7469,21 @@ function nu(t, e, n) {
|
|
|
7337
7469
|
};
|
|
7338
7470
|
}
|
|
7339
7471
|
let Fe = null;
|
|
7340
|
-
function
|
|
7472
|
+
function bu(t) {
|
|
7341
7473
|
Fe && Fe.shutdown();
|
|
7342
7474
|
let e;
|
|
7343
7475
|
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));
|
|
7344
|
-
const n =
|
|
7476
|
+
const n = xu(e, t, () => {
|
|
7345
7477
|
t.container || e.remove(), Fe === n && (Fe = null);
|
|
7346
7478
|
});
|
|
7347
7479
|
return Fe = n, n;
|
|
7348
7480
|
}
|
|
7349
|
-
const
|
|
7481
|
+
const vu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
7350
7482
|
__proto__: null,
|
|
7351
|
-
JexityChat:
|
|
7483
|
+
JexityChat: bu
|
|
7352
7484
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
7353
7485
|
export {
|
|
7354
|
-
|
|
7355
|
-
|
|
7486
|
+
ku as JexityChatProvider,
|
|
7487
|
+
wu as useJexityChat
|
|
7356
7488
|
};
|
|
7357
7489
|
//# sourceMappingURL=react.mjs.map
|