@eka-care/medassist-widget 0.1.120-dev.0 → 0.1.121-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/medassist-widget.js +208 -201
- package/package.json +2 -2
package/dist/medassist-widget.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Kn, q, ea, Rt, ds, ta, na, Dr, pr,
|
|
1
|
+
var Kn, q, ea, Rt, ds, ta, na, Dr, pr, Bn, ra, Co, lo, co, oa, yr = {}, br = [], Xl = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, Zn = Array.isArray;
|
|
2
2
|
function ut(e, t) {
|
|
3
3
|
for (var n in t) e[n] = t[n];
|
|
4
4
|
return e;
|
|
@@ -97,7 +97,7 @@ function or(e, t, n, r, o) {
|
|
|
97
97
|
if (typeof r == "string" && (e.style.cssText = r = ""), r) for (t in r) n && t in n || us(e.style, t, "");
|
|
98
98
|
if (n) for (t in n) r && n[t] == r[t] || us(e.style, t, n[t]);
|
|
99
99
|
}
|
|
100
|
-
else if (t[0] == "o" && t[1] == "n") s = t != (t = t.replace(ra, "$1")), l = t.toLowerCase(), t = l in e || t == "onFocusOut" || t == "onFocusIn" ? l.slice(2) : t.slice(2), e.l || (e.l = {}), e.l[t + s] = n, n ? r ? n[
|
|
100
|
+
else if (t[0] == "o" && t[1] == "n") s = t != (t = t.replace(ra, "$1")), l = t.toLowerCase(), t = l in e || t == "onFocusOut" || t == "onFocusIn" ? l.slice(2) : t.slice(2), e.l || (e.l = {}), e.l[t + s] = n, n ? r ? n[Bn] = r[Bn] : (n[Bn] = Co, e.addEventListener(t, s ? co : lo, s)) : e.removeEventListener(t, s ? co : lo, s);
|
|
101
101
|
else {
|
|
102
102
|
if (o == "http://www.w3.org/2000/svg") t = t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
|
|
103
103
|
else if (t != "width" && t != "height" && t != "href" && t != "list" && t != "form" && t != "tabIndex" && t != "download" && t != "rowSpan" && t != "colSpan" && t != "role" && t != "popover" && t in e) try {
|
|
@@ -113,7 +113,7 @@ function hs(e) {
|
|
|
113
113
|
if (this.l) {
|
|
114
114
|
var n = this.l[t.type + e];
|
|
115
115
|
if (t[pr] == null) t[pr] = Co++;
|
|
116
|
-
else if (t[pr] < n[
|
|
116
|
+
else if (t[pr] < n[Bn]) return;
|
|
117
117
|
return n(q.event ? q.event(t) : t);
|
|
118
118
|
}
|
|
119
119
|
};
|
|
@@ -270,7 +270,7 @@ Kn = br.slice, q = { __e: function(e, t, n, r) {
|
|
|
270
270
|
this.__v && (this.__e = !0, e && this.__h.push(e), uo(this));
|
|
271
271
|
}, rt.prototype.render = pe, Rt = [], ta = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, na = function(e, t) {
|
|
272
272
|
return e.__v.__b - t.__v.__b;
|
|
273
|
-
}, Sr.__r = 0, Dr = Math.random().toString(8), pr = "__d" + Dr,
|
|
273
|
+
}, Sr.__r = 0, Dr = Math.random().toString(8), pr = "__d" + Dr, Bn = "__a" + Dr, ra = /(PointerCapture)$|Capture$/i, Co = 0, lo = hs(!1), co = hs(!0), oa = 0;
|
|
274
274
|
var oc = 0;
|
|
275
275
|
function a(e, t, n, r, o, s) {
|
|
276
276
|
t || (t = {});
|
|
@@ -765,7 +765,7 @@ function ks(e, t) {
|
|
|
765
765
|
return e(t);
|
|
766
766
|
e != null && (e.current = t);
|
|
767
767
|
}
|
|
768
|
-
function
|
|
768
|
+
function Bo(...e) {
|
|
769
769
|
return (t) => {
|
|
770
770
|
let n = !1;
|
|
771
771
|
const r = e.map((o) => {
|
|
@@ -782,7 +782,7 @@ function Ho(...e) {
|
|
|
782
782
|
};
|
|
783
783
|
}
|
|
784
784
|
function qt(...e) {
|
|
785
|
-
return le(
|
|
785
|
+
return le(Bo(...e), e);
|
|
786
786
|
}
|
|
787
787
|
// @__NO_SIDE_EFFECTS__
|
|
788
788
|
function bc(e) {
|
|
@@ -802,7 +802,7 @@ function Sc(e) {
|
|
|
802
802
|
const { children: o, ...s } = n;
|
|
803
803
|
if (Je(o)) {
|
|
804
804
|
const l = Tc(o), i = Cc(s, o.props);
|
|
805
|
-
return o.type !== pe && (i.ref = r ?
|
|
805
|
+
return o.type !== pe && (i.ref = r ? Bo(r, l) : l), At(o, i);
|
|
806
806
|
}
|
|
807
807
|
return Xe.count(o) > 1 ? Xe.only(null) : null;
|
|
808
808
|
});
|
|
@@ -1081,7 +1081,7 @@ var Ma = "ScrollAreaViewport", Pa = J(
|
|
|
1081
1081
|
}
|
|
1082
1082
|
);
|
|
1083
1083
|
Pa.displayName = Ma;
|
|
1084
|
-
var ht = "ScrollAreaScrollbar",
|
|
1084
|
+
var ht = "ScrollAreaScrollbar", Ho = J(
|
|
1085
1085
|
(e, t) => {
|
|
1086
1086
|
const { forceMount: n, ...r } = e, o = ot(ht, e.__scopeScrollArea), { onScrollbarXEnabledChange: s, onScrollbarYEnabledChange: l } = o, i = e.orientation === "horizontal";
|
|
1087
1087
|
return z(() => (i ? s(!0) : l(!0), () => {
|
|
@@ -1089,7 +1089,7 @@ var ht = "ScrollAreaScrollbar", Bo = J(
|
|
|
1089
1089
|
}), [i, s, l]), o.type === "hover" ? /* @__PURE__ */ a(Fc, { ...r, ref: t, forceMount: n }) : o.type === "scroll" ? /* @__PURE__ */ a(Uc, { ...r, ref: t, forceMount: n }) : o.type === "auto" ? /* @__PURE__ */ a(La, { ...r, ref: t, forceMount: n }) : o.type === "always" ? /* @__PURE__ */ a(jo, { ...r, ref: t }) : null;
|
|
1090
1090
|
}
|
|
1091
1091
|
);
|
|
1092
|
-
|
|
1092
|
+
Ho.displayName = ht;
|
|
1093
1093
|
var Fc = J((e, t) => {
|
|
1094
1094
|
const { forceMount: n, ...r } = e, o = ot(ht, e.__scopeScrollArea), [s, l] = F(!1);
|
|
1095
1095
|
return z(() => {
|
|
@@ -1305,7 +1305,7 @@ var Fc = J((e, t) => {
|
|
|
1305
1305
|
}
|
|
1306
1306
|
}
|
|
1307
1307
|
);
|
|
1308
|
-
}), [
|
|
1308
|
+
}), [Bc, Da] = Oa(ht), Fa = J((e, t) => {
|
|
1309
1309
|
const {
|
|
1310
1310
|
__scopeScrollArea: n,
|
|
1311
1311
|
sizes: r,
|
|
@@ -1332,7 +1332,7 @@ var Fc = J((e, t) => {
|
|
|
1332
1332
|
};
|
|
1333
1333
|
return document.addEventListener("wheel", b, { passive: !1 }), () => document.removeEventListener("wheel", b, { passive: !1 });
|
|
1334
1334
|
}, [_, m, N, w]), z(C, [r, C]), on(m, v), on(y.content, v), /* @__PURE__ */ a(
|
|
1335
|
-
|
|
1335
|
+
Bc,
|
|
1336
1336
|
{
|
|
1337
1337
|
scope: n,
|
|
1338
1338
|
scrollbar: m,
|
|
@@ -1407,11 +1407,11 @@ Ua.displayName = wr;
|
|
|
1407
1407
|
var Yo = "ScrollAreaCorner", Va = J(
|
|
1408
1408
|
(e, t) => {
|
|
1409
1409
|
const n = ot(Yo, e.__scopeScrollArea), r = !!(n.scrollbarX && n.scrollbarY);
|
|
1410
|
-
return n.type !== "scroll" && r ? /* @__PURE__ */ a(
|
|
1410
|
+
return n.type !== "scroll" && r ? /* @__PURE__ */ a(Hc, { ...e, ref: t }) : null;
|
|
1411
1411
|
}
|
|
1412
1412
|
);
|
|
1413
1413
|
Va.displayName = Yo;
|
|
1414
|
-
var
|
|
1414
|
+
var Hc = J((e, t) => {
|
|
1415
1415
|
const { __scopeScrollArea: n, ...r } = e, o = ot(Yo, n), [s, l] = F(0), [i, c] = F(0), d = !!(s && i);
|
|
1416
1416
|
return on(o.scrollbarX, () => {
|
|
1417
1417
|
const f = o.scrollbarX?.offsetHeight || 0;
|
|
@@ -1449,13 +1449,13 @@ function Rr(e) {
|
|
|
1449
1449
|
}
|
|
1450
1450
|
function jc(e, t, n, r = "ltr") {
|
|
1451
1451
|
const o = Rr(n), s = o / 2, l = t || s, i = o - l, c = n.scrollbar.paddingStart + l, d = n.scrollbar.size - n.scrollbar.paddingEnd - i, f = n.content - n.viewport, u = r === "ltr" ? [0, f] : [f * -1, 0];
|
|
1452
|
-
return
|
|
1452
|
+
return Ba([c, d], u)(e);
|
|
1453
1453
|
}
|
|
1454
1454
|
function As(e, t, n = "ltr") {
|
|
1455
1455
|
const r = Rr(t), o = t.scrollbar.paddingStart + t.scrollbar.paddingEnd, s = t.scrollbar.size - o, l = t.content - t.viewport, i = s - r, c = n === "ltr" ? [0, l] : [l * -1, 0], d = Pc(e, c);
|
|
1456
|
-
return
|
|
1456
|
+
return Ba([0, l], [0, i])(d);
|
|
1457
1457
|
}
|
|
1458
|
-
function
|
|
1458
|
+
function Ba(e, t) {
|
|
1459
1459
|
return (n) => {
|
|
1460
1460
|
if (e[0] === e[1] || t[0] === t[1]) return t[0];
|
|
1461
1461
|
const r = (t[1] - t[0]) / (e[1] - e[0]);
|
|
@@ -1493,7 +1493,7 @@ function on(e, t) {
|
|
|
1493
1493
|
}
|
|
1494
1494
|
}, [e, n]);
|
|
1495
1495
|
}
|
|
1496
|
-
var
|
|
1496
|
+
var Ha = Ia, Gc = Pa, Wc = Va;
|
|
1497
1497
|
function qc(e) {
|
|
1498
1498
|
if (Object.prototype.hasOwnProperty.call(e, "__esModule")) return e;
|
|
1499
1499
|
var t = e.default;
|
|
@@ -2388,10 +2388,10 @@ function er() {
|
|
|
2388
2388
|
};
|
|
2389
2389
|
return Tn.BaseResource = e, Tn;
|
|
2390
2390
|
}
|
|
2391
|
-
var
|
|
2391
|
+
var Bs;
|
|
2392
2392
|
function qa() {
|
|
2393
|
-
if (
|
|
2394
|
-
|
|
2393
|
+
if (Bs) return Cn;
|
|
2394
|
+
Bs = 1, Object.defineProperty(Cn, "__esModule", { value: !0 }), Cn.Session = void 0;
|
|
2395
2395
|
const e = /* @__PURE__ */ er();
|
|
2396
2396
|
let t = class extends e.BaseResource {
|
|
2397
2397
|
//Ts implicitly calls super() here
|
|
@@ -2441,10 +2441,10 @@ function Kc() {
|
|
|
2441
2441
|
};
|
|
2442
2442
|
return Nn.Config = t, Nn;
|
|
2443
2443
|
}
|
|
2444
|
-
var xn = {},
|
|
2444
|
+
var xn = {}, Hs;
|
|
2445
2445
|
function Ko() {
|
|
2446
|
-
if (
|
|
2447
|
-
|
|
2446
|
+
if (Hs) return xn;
|
|
2447
|
+
Hs = 1, Object.defineProperty(xn, "__esModule", { value: !0 }), xn.Auth = void 0;
|
|
2448
2448
|
const e = /* @__PURE__ */ er();
|
|
2449
2449
|
let t = class extends e.BaseResource {
|
|
2450
2450
|
basePath = "/med-assist/auth/token-exchange";
|
|
@@ -2482,7 +2482,7 @@ function Ko() {
|
|
|
2482
2482
|
};
|
|
2483
2483
|
return xn.Auth = t, xn;
|
|
2484
2484
|
}
|
|
2485
|
-
var Rn = {},
|
|
2485
|
+
var Rn = {}, Br = {}, js;
|
|
2486
2486
|
function Ka() {
|
|
2487
2487
|
return js || (js = 1, (function(e) {
|
|
2488
2488
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.buildPrefetchKey = void 0, e.prefetchTokenExchange = l, e.consumePrefetchedExchange = i;
|
|
@@ -2513,7 +2513,7 @@ function Ka() {
|
|
|
2513
2513
|
const d = o.get(c);
|
|
2514
2514
|
return d && o.delete(c), d;
|
|
2515
2515
|
}
|
|
2516
|
-
})(
|
|
2516
|
+
})(Br)), Br;
|
|
2517
2517
|
}
|
|
2518
2518
|
var Ys;
|
|
2519
2519
|
function Zc() {
|
|
@@ -2912,7 +2912,7 @@ function Zo() {
|
|
|
2912
2912
|
}
|
|
2913
2913
|
})($r)), $r;
|
|
2914
2914
|
}
|
|
2915
|
-
var
|
|
2915
|
+
var Hr = {}, Ks;
|
|
2916
2916
|
function Jc() {
|
|
2917
2917
|
return Ks || (Ks = 1, (function(e) {
|
|
2918
2918
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.Filemanager = e.MAX_FILE_SIZE = void 0;
|
|
@@ -3052,7 +3052,7 @@ function Jc() {
|
|
|
3052
3052
|
}
|
|
3053
3053
|
}
|
|
3054
3054
|
e.Filemanager = n;
|
|
3055
|
-
})(
|
|
3055
|
+
})(Hr)), Hr;
|
|
3056
3056
|
}
|
|
3057
3057
|
var at = {}, Zs;
|
|
3058
3058
|
function Tr() {
|
|
@@ -4609,22 +4609,17 @@ function rd() {
|
|
|
4609
4609
|
* re-authenticate them, so that is terminal.
|
|
4610
4610
|
*/
|
|
4611
4611
|
async recoverExpiredCredentials() {
|
|
4612
|
-
const m = this.isAuthenticatedUser;
|
|
4613
4612
|
try {
|
|
4614
4613
|
this.closeConnection(), await this.resourceManager.refreshTokens(), await this.reconnectCurrentSession();
|
|
4615
|
-
} catch (
|
|
4616
|
-
const
|
|
4617
|
-
if (
|
|
4618
|
-
this.emitError(this.toSessionError(
|
|
4614
|
+
} catch (m) {
|
|
4615
|
+
const g = this.statusOf(m);
|
|
4616
|
+
if (g !== 403 && g !== 401) {
|
|
4617
|
+
this.emitError(this.toSessionError(m, "Failed to refresh authentication", {
|
|
4619
4618
|
stage: "tokenRefresh"
|
|
4620
4619
|
}));
|
|
4621
4620
|
return;
|
|
4622
4621
|
}
|
|
4623
|
-
|
|
4624
|
-
this.emitRecoveryError(c.SYNAPSE_RECOVERY_REASON.AUTH_EXPIRED, "Authentication expired", g);
|
|
4625
|
-
return;
|
|
4626
|
-
}
|
|
4627
|
-
this.clearUser(), this.emitRecoveryError(c.SYNAPSE_RECOVERY_REASON.SESSION_FORBIDDEN, "Guest credentials were rejected", g);
|
|
4622
|
+
this.clearUser(), this.emitRecoveryError(c.SYNAPSE_RECOVERY_REASON.SESSION_FORBIDDEN, "Guest credentials were rejected", m);
|
|
4628
4623
|
}
|
|
4629
4624
|
}
|
|
4630
4625
|
/**
|
|
@@ -4650,7 +4645,13 @@ function rd() {
|
|
|
4650
4645
|
} catch (g) {
|
|
4651
4646
|
const S = this.statusOf(g);
|
|
4652
4647
|
if (S === 401 || S === 403) {
|
|
4653
|
-
this.
|
|
4648
|
+
this.clearUser(), this.emitRecoveryError(
|
|
4649
|
+
c.SYNAPSE_RECOVERY_REASON.SESSION_FORBIDDEN,
|
|
4650
|
+
// Not "guest": this branch is authenticated-only (see the early
|
|
4651
|
+
// return above), so the guest wording would be misleading in logs.
|
|
4652
|
+
"Session credentials were rejected",
|
|
4653
|
+
g
|
|
4654
|
+
);
|
|
4654
4655
|
return;
|
|
4655
4656
|
}
|
|
4656
4657
|
try {
|
|
@@ -4658,7 +4659,13 @@ function rd() {
|
|
|
4658
4659
|
} catch (h) {
|
|
4659
4660
|
const E = this.statusOf(h);
|
|
4660
4661
|
if (E === 401 || E === 403) {
|
|
4661
|
-
this.
|
|
4662
|
+
this.clearUser(), this.emitRecoveryError(
|
|
4663
|
+
c.SYNAPSE_RECOVERY_REASON.SESSION_FORBIDDEN,
|
|
4664
|
+
"Session credentials were rejected",
|
|
4665
|
+
// createError, not error — this branch failed on createNewSession;
|
|
4666
|
+
// `error` is the earlier reinit failure we had already moved past.
|
|
4667
|
+
h
|
|
4668
|
+
);
|
|
4662
4669
|
return;
|
|
4663
4670
|
}
|
|
4664
4671
|
this.emitError(this.toSessionError(h, "Failed to start a new session", {
|
|
@@ -5351,12 +5358,12 @@ const pd = (e, t) => {
|
|
|
5351
5358
|
}, Dd = [], Oe = (e) => {
|
|
5352
5359
|
const t = (n) => n[e] || Dd;
|
|
5353
5360
|
return t.isThemeGetter = !0, t;
|
|
5354
|
-
}, il = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, al = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Fd = /^\d+\/\d+$/, Ud = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Vd = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, zd = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,
|
|
5361
|
+
}, il = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, al = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Fd = /^\d+\/\d+$/, Ud = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Vd = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, zd = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Bd = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, $d = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, Jt = (e) => Fd.test(e), te = (e) => !!e && !Number.isNaN(Number(e)), Nt = (e) => !!e && Number.isInteger(Number(e)), Kr = (e) => e.endsWith("%") && te(e.slice(0, -1)), _t = (e) => Ud.test(e), Hd = () => !0, jd = (e) => (
|
|
5355
5362
|
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
5356
5363
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
5357
5364
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
5358
5365
|
Vd.test(e) && !zd.test(e)
|
|
5359
|
-
), ll = () => !1, Yd = (e) =>
|
|
5366
|
+
), ll = () => !1, Yd = (e) => Bd.test(e), Gd = (e) => $d.test(e), Wd = (e) => !U(e) && !V(e), qd = (e) => cn(e, ul, ll), U = (e) => il.test(e), Bt = (e) => cn(e, hl, jd), Zr = (e) => cn(e, Qd, te), yi = (e) => cn(e, cl, ll), Kd = (e) => cn(e, dl, Gd), ir = (e) => cn(e, fl, Yd), V = (e) => al.test(e), Un = (e) => dn(e, hl), Zd = (e) => dn(e, eu), bi = (e) => dn(e, cl), Xd = (e) => dn(e, ul), Jd = (e) => dn(e, dl), ar = (e) => dn(e, fl, !0), cn = (e, t, n) => {
|
|
5360
5367
|
const r = il.exec(e);
|
|
5361
5368
|
return r ? r[1] ? t(r[1]) : n(r[2]) : !1;
|
|
5362
5369
|
}, dn = (e, t, n = !1) => {
|
|
@@ -5383,13 +5390,13 @@ const pd = (e, t) => {
|
|
|
5383
5390
|
"left-bottom"
|
|
5384
5391
|
], w = () => [...N(), V, U], C = () => ["auto", "hidden", "clip", "visible", "scroll"], v = () => ["auto", "contain", "none"], T = () => [V, U, c], b = () => [Jt, "full", "auto", ...T()], k = () => [Nt, "none", "subgrid", V, U], O = () => ["auto", {
|
|
5385
5392
|
span: ["full", Nt, V, U]
|
|
5386
|
-
}, Nt, V, U], A = () => [Nt, "auto", V, U], $ = () => ["auto", "min", "max", "fr", V, U], re = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], K = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], ue = () => ["auto", ...T()], oe = () => [Jt, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...T()], I = () => [e, V, U],
|
|
5393
|
+
}, Nt, V, U], A = () => [Nt, "auto", V, U], $ = () => ["auto", "min", "max", "fr", V, U], re = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], K = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], ue = () => ["auto", ...T()], oe = () => [Jt, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...T()], I = () => [e, V, U], B = () => [...N(), bi, yi, {
|
|
5387
5394
|
position: [V, U]
|
|
5388
5395
|
}], ie = () => ["no-repeat", {
|
|
5389
5396
|
repeat: ["", "x", "y", "space", "round"]
|
|
5390
|
-
}],
|
|
5397
|
+
}], H = () => ["auto", "cover", "contain", Xd, qd, {
|
|
5391
5398
|
size: [V, U]
|
|
5392
|
-
}], Y = () => [Kr, Un,
|
|
5399
|
+
}], Y = () => [Kr, Un, Bt], Z = () => [
|
|
5393
5400
|
// Deprecated since Tailwind CSS v4.0.0
|
|
5394
5401
|
"",
|
|
5395
5402
|
"none",
|
|
@@ -5397,7 +5404,7 @@ const pd = (e, t) => {
|
|
|
5397
5404
|
d,
|
|
5398
5405
|
V,
|
|
5399
5406
|
U
|
|
5400
|
-
], X = () => ["", te, Un,
|
|
5407
|
+
], X = () => ["", te, Un, Bt], Ne = () => ["solid", "dashed", "dotted", "double"], _e = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], ce = () => [te, Kr, bi, yi], et = () => [
|
|
5401
5408
|
// Deprecated since Tailwind CSS v4.0.0
|
|
5402
5409
|
"",
|
|
5403
5410
|
"none",
|
|
@@ -5412,7 +5419,7 @@ const pd = (e, t) => {
|
|
|
5412
5419
|
aspect: ["video"],
|
|
5413
5420
|
blur: [_t],
|
|
5414
5421
|
breakpoint: [_t],
|
|
5415
|
-
color: [
|
|
5422
|
+
color: [Hd],
|
|
5416
5423
|
container: [_t],
|
|
5417
5424
|
"drop-shadow": [_t],
|
|
5418
5425
|
ease: ["in", "out", "in-out"],
|
|
@@ -6097,7 +6104,7 @@ const pd = (e, t) => {
|
|
|
6097
6104
|
* @see https://tailwindcss.com/docs/font-size
|
|
6098
6105
|
*/
|
|
6099
6106
|
"font-size": [{
|
|
6100
|
-
text: ["base", n, Un,
|
|
6107
|
+
text: ["base", n, Un, Bt]
|
|
6101
6108
|
}],
|
|
6102
6109
|
/**
|
|
6103
6110
|
* Font Smoothing
|
|
@@ -6245,7 +6252,7 @@ const pd = (e, t) => {
|
|
|
6245
6252
|
* @see https://tailwindcss.com/docs/text-decoration-thickness
|
|
6246
6253
|
*/
|
|
6247
6254
|
"text-decoration-thickness": [{
|
|
6248
|
-
decoration: [te, "from-font", "auto", V,
|
|
6255
|
+
decoration: [te, "from-font", "auto", V, Bt]
|
|
6249
6256
|
}],
|
|
6250
6257
|
/**
|
|
6251
6258
|
* Text Decoration Color
|
|
@@ -6356,7 +6363,7 @@ const pd = (e, t) => {
|
|
|
6356
6363
|
* @see https://tailwindcss.com/docs/background-position
|
|
6357
6364
|
*/
|
|
6358
6365
|
"bg-position": [{
|
|
6359
|
-
bg:
|
|
6366
|
+
bg: B()
|
|
6360
6367
|
}],
|
|
6361
6368
|
/**
|
|
6362
6369
|
* Background Repeat
|
|
@@ -6370,7 +6377,7 @@ const pd = (e, t) => {
|
|
|
6370
6377
|
* @see https://tailwindcss.com/docs/background-size
|
|
6371
6378
|
*/
|
|
6372
6379
|
"bg-size": [{
|
|
6373
|
-
bg:
|
|
6380
|
+
bg: H()
|
|
6374
6381
|
}],
|
|
6375
6382
|
/**
|
|
6376
6383
|
* Background Image
|
|
@@ -6732,7 +6739,7 @@ const pd = (e, t) => {
|
|
|
6732
6739
|
* @see https://tailwindcss.com/docs/outline-width
|
|
6733
6740
|
*/
|
|
6734
6741
|
"outline-w": [{
|
|
6735
|
-
outline: ["", te, Un,
|
|
6742
|
+
outline: ["", te, Un, Bt]
|
|
6736
6743
|
}],
|
|
6737
6744
|
/**
|
|
6738
6745
|
* Outline Color
|
|
@@ -6807,7 +6814,7 @@ const pd = (e, t) => {
|
|
|
6807
6814
|
* @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
|
|
6808
6815
|
*/
|
|
6809
6816
|
"ring-offset-w": [{
|
|
6810
|
-
"ring-offset": [te,
|
|
6817
|
+
"ring-offset": [te, Bt]
|
|
6811
6818
|
}],
|
|
6812
6819
|
/**
|
|
6813
6820
|
* Ring Offset Color
|
|
@@ -7033,7 +7040,7 @@ const pd = (e, t) => {
|
|
|
7033
7040
|
* @see https://tailwindcss.com/docs/mask-position
|
|
7034
7041
|
*/
|
|
7035
7042
|
"mask-position": [{
|
|
7036
|
-
mask:
|
|
7043
|
+
mask: B()
|
|
7037
7044
|
}],
|
|
7038
7045
|
/**
|
|
7039
7046
|
* Mask Repeat
|
|
@@ -7047,7 +7054,7 @@ const pd = (e, t) => {
|
|
|
7047
7054
|
* @see https://tailwindcss.com/docs/mask-size
|
|
7048
7055
|
*/
|
|
7049
7056
|
"mask-size": [{
|
|
7050
|
-
mask:
|
|
7057
|
+
mask: H()
|
|
7051
7058
|
}],
|
|
7052
7059
|
/**
|
|
7053
7060
|
* Mask Type
|
|
@@ -7757,7 +7764,7 @@ const pd = (e, t) => {
|
|
|
7757
7764
|
* @see https://tailwindcss.com/docs/stroke-width
|
|
7758
7765
|
*/
|
|
7759
7766
|
"stroke-w": [{
|
|
7760
|
-
stroke: [te, Un,
|
|
7767
|
+
stroke: [te, Un, Bt, Zr]
|
|
7761
7768
|
}],
|
|
7762
7769
|
/**
|
|
7763
7770
|
* Stroke
|
|
@@ -7856,7 +7863,7 @@ const ru = (e) => {
|
|
|
7856
7863
|
return !1;
|
|
7857
7864
|
}
|
|
7858
7865
|
}, ou = (e) => new Promise((t) => setTimeout(t, e)), ml = J(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ a(
|
|
7859
|
-
|
|
7866
|
+
Ha,
|
|
7860
7867
|
{
|
|
7861
7868
|
ref: r,
|
|
7862
7869
|
className: L("relative overflow-hidden", e),
|
|
@@ -7868,9 +7875,9 @@ const ru = (e) => {
|
|
|
7868
7875
|
]
|
|
7869
7876
|
}
|
|
7870
7877
|
));
|
|
7871
|
-
ml.displayName =
|
|
7878
|
+
ml.displayName = Ha.displayName;
|
|
7872
7879
|
const pl = J(({ className: e, orientation: t = "vertical", ...n }, r) => /* @__PURE__ */ a(
|
|
7873
|
-
|
|
7880
|
+
Ho,
|
|
7874
7881
|
{
|
|
7875
7882
|
ref: r,
|
|
7876
7883
|
orientation: t,
|
|
@@ -7884,7 +7891,7 @@ const pl = J(({ className: e, orientation: t = "vertical", ...n }, r) => /* @__P
|
|
|
7884
7891
|
children: /* @__PURE__ */ a(Ua, { className: "relative flex-1 rounded-full bg-border" })
|
|
7885
7892
|
}
|
|
7886
7893
|
));
|
|
7887
|
-
pl.displayName =
|
|
7894
|
+
pl.displayName = Ho.displayName;
|
|
7888
7895
|
var su = Symbol.for("react.lazy"), xr = Aa[" use ".trim().toString()];
|
|
7889
7896
|
function iu(e) {
|
|
7890
7897
|
return typeof e == "object" && e !== null && "then" in e;
|
|
@@ -7913,7 +7920,7 @@ function lu(e) {
|
|
|
7913
7920
|
let { children: o, ...s } = n;
|
|
7914
7921
|
if (gl(o) && typeof xr == "function" && (o = xr(o._payload)), Je(o)) {
|
|
7915
7922
|
const l = hu(o), i = uu(s, o.props);
|
|
7916
|
-
return o.type !== pe && (i.ref = r ?
|
|
7923
|
+
return o.type !== pe && (i.ref = r ? Bo(r, l) : l), At(o, i);
|
|
7917
7924
|
}
|
|
7918
7925
|
return Xe.count(o) > 1 ? Xe.only(null) : null;
|
|
7919
7926
|
});
|
|
@@ -8156,7 +8163,7 @@ const zu = [
|
|
|
8156
8163
|
}
|
|
8157
8164
|
]
|
|
8158
8165
|
], cr = De("thumbs-down", zu);
|
|
8159
|
-
const
|
|
8166
|
+
const Bu = [
|
|
8160
8167
|
[
|
|
8161
8168
|
"path",
|
|
8162
8169
|
{
|
|
@@ -8166,11 +8173,11 @@ const Hu = [
|
|
|
8166
8173
|
],
|
|
8167
8174
|
["path", { d: "M12 9v4", key: "juzpu7" }],
|
|
8168
8175
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
8169
|
-
], $u = De("triangle-alert",
|
|
8170
|
-
const
|
|
8176
|
+
], $u = De("triangle-alert", Bu);
|
|
8177
|
+
const Hu = [
|
|
8171
8178
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
8172
8179
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
8173
|
-
], Gn = De("x",
|
|
8180
|
+
], Gn = De("x", Hu);
|
|
8174
8181
|
const ju = [
|
|
8175
8182
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
|
|
8176
8183
|
["line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65", key: "13gj7c" }],
|
|
@@ -8885,7 +8892,7 @@ function Ri(e, t) {
|
|
|
8885
8892
|
i(`--popover-${y}`, `var(--${p}-${y})`);
|
|
8886
8893
|
i("--secondary", s ? "0 0% 15%" : "0 0% 96.1%"), i("--surface-secondary", s ? "0 0% 15%" : "0 0% 96.1%"), i("--secondary-foreground", s ? "0 0% 98%" : "0 0% 9%"), i("--muted", s ? "0 0% 15%" : "0 0% 96.1%"), i("--accent", c), i("--accent-foreground", Qr(c)), o ? i("--surface", s ? "0 0% 0% / 0.6" : "0 0% 100% / 0.6") : i("--surface", s ? "0 0% 10%" : "0 0% 94.1%"), i("--surface-tertiary", s ? "0 0% 12%" : "0 0% 98%"), i("--border-subtle", s ? "0 0% 20%" : "0 0% 89.8%"), i("--border-medium", s ? "0 0% 30%" : "0 0% 80%"), i("--text-primary", s ? "0 0% 100%" : "0 0% 3.9%"), i("--text-secondary", s ? "0 0% 70%" : "0 0% 45.1%"), i("--text-tertiary", s ? "0 0% 60%" : "0 0% 63.9%"), i("--text-muted", s ? "0 0% 70%" : "0 0% 45.1%"), i("--border", s ? "0 0% 20%" : "0 0% 89.8%"), i("--input", s ? "0 0% 20%" : "0 0% 89.8%"), o ? (i("--theme-background-image", `url(${t.backgroundImage})`), i("--theme-background-blur", ph), i("--theme-background-overlay", mh), u instanceof HTMLElement && u.classList.add("theme-with-background")) : (i("--theme-background-image", "none"), i("--theme-background-blur", "0px"), i("--theme-background-overlay", "rgba(0, 0, 0, 0)"), u instanceof HTMLElement && u.classList.remove("theme-with-background"));
|
|
8887
8894
|
}
|
|
8888
|
-
function
|
|
8895
|
+
function He({ className: e, style: t }) {
|
|
8889
8896
|
return /* @__PURE__ */ a(
|
|
8890
8897
|
"div",
|
|
8891
8898
|
{
|
|
@@ -8908,15 +8915,15 @@ function wh() {
|
|
|
8908
8915
|
/* @__PURE__ */ a(tr, {}),
|
|
8909
8916
|
/* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
|
|
8910
8917
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-3", children: [
|
|
8911
|
-
/* @__PURE__ */ a(
|
|
8918
|
+
/* @__PURE__ */ a(He, { className: "w-12 h-12 rounded-full flex-shrink-0" }),
|
|
8912
8919
|
/* @__PURE__ */ a("div", { className: "flex flex-col gap-1.5", children: [
|
|
8913
|
-
/* @__PURE__ */ a(
|
|
8914
|
-
/* @__PURE__ */ a(
|
|
8920
|
+
/* @__PURE__ */ a(He, { className: "h-5 w-32 rounded-md" }),
|
|
8921
|
+
/* @__PURE__ */ a(He, { className: "h-3 w-20 rounded-md" })
|
|
8915
8922
|
] })
|
|
8916
8923
|
] }),
|
|
8917
8924
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
|
|
8918
|
-
/* @__PURE__ */ a(
|
|
8919
|
-
/* @__PURE__ */ a(
|
|
8925
|
+
/* @__PURE__ */ a(He, { className: "h-8 w-8 rounded-full" }),
|
|
8926
|
+
/* @__PURE__ */ a(He, { className: "h-8 w-8 rounded-full" })
|
|
8920
8927
|
] })
|
|
8921
8928
|
] })
|
|
8922
8929
|
] });
|
|
@@ -8934,12 +8941,12 @@ function Ch() {
|
|
|
8934
8941
|
padding: "4px 8px"
|
|
8935
8942
|
},
|
|
8936
8943
|
children: [
|
|
8937
|
-
/* @__PURE__ */ a("div", { className: "px-2 pt-2 pb-1", children: /* @__PURE__ */ a(
|
|
8944
|
+
/* @__PURE__ */ a("div", { className: "px-2 pt-2 pb-1", children: /* @__PURE__ */ a(He, { className: "h-5 w-3/5 rounded-md" }) }),
|
|
8938
8945
|
/* @__PURE__ */ a("div", { className: "flex items-center justify-between px-1 py-1", children: [
|
|
8939
|
-
/* @__PURE__ */ a(
|
|
8946
|
+
/* @__PURE__ */ a(He, { className: "h-9 w-9 rounded-full" }),
|
|
8940
8947
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
|
|
8941
|
-
/* @__PURE__ */ a(
|
|
8942
|
-
/* @__PURE__ */ a(
|
|
8948
|
+
/* @__PURE__ */ a(He, { className: "h-9 w-9 rounded-full" }),
|
|
8949
|
+
/* @__PURE__ */ a(He, { className: "h-10 w-10 rounded-full" })
|
|
8943
8950
|
] })
|
|
8944
8951
|
] })
|
|
8945
8952
|
]
|
|
@@ -8950,9 +8957,9 @@ function Ch() {
|
|
|
8950
8957
|
function Th() {
|
|
8951
8958
|
return /* @__PURE__ */ a("div", { className: "space-y-3 py-2", children: [
|
|
8952
8959
|
/* @__PURE__ */ a(tr, {}),
|
|
8953
|
-
/* @__PURE__ */ a(
|
|
8954
|
-
/* @__PURE__ */ a(
|
|
8955
|
-
/* @__PURE__ */ a(
|
|
8960
|
+
/* @__PURE__ */ a(He, { className: "h-16 w-3/4 rounded-2xl" }),
|
|
8961
|
+
/* @__PURE__ */ a(He, { className: "h-10 w-1/2 rounded-2xl ml-auto" }),
|
|
8962
|
+
/* @__PURE__ */ a(He, { className: "h-16 w-2/3 rounded-2xl" })
|
|
8956
8963
|
] });
|
|
8957
8964
|
}
|
|
8958
8965
|
function Nh() {
|
|
@@ -8968,7 +8975,7 @@ function Nh() {
|
|
|
8968
8975
|
"div",
|
|
8969
8976
|
{
|
|
8970
8977
|
className: L("flex", t.role === "user" ? "justify-end" : "justify-start"),
|
|
8971
|
-
children: /* @__PURE__ */ a(
|
|
8978
|
+
children: /* @__PURE__ */ a(He, { className: L("rounded-lg", t.size) })
|
|
8972
8979
|
},
|
|
8973
8980
|
n
|
|
8974
8981
|
))
|
|
@@ -8979,8 +8986,8 @@ function xh({ rows: e = 5 }) {
|
|
|
8979
8986
|
return /* @__PURE__ */ a("div", { "aria-hidden": "true", children: [
|
|
8980
8987
|
/* @__PURE__ */ a(tr, {}),
|
|
8981
8988
|
Array.from({ length: e }, (n, r) => /* @__PURE__ */ a("div", { className: "flex flex-col gap-1 w-full px-4 py-3", children: [
|
|
8982
|
-
/* @__PURE__ */ a(
|
|
8983
|
-
/* @__PURE__ */ a(
|
|
8989
|
+
/* @__PURE__ */ a(He, { className: L("h-5 rounded-md", t[r % t.length]) }),
|
|
8990
|
+
/* @__PURE__ */ a(He, { className: "h-3.5 w-16 rounded-md" })
|
|
8984
8991
|
] }, r))
|
|
8985
8992
|
] });
|
|
8986
8993
|
}
|
|
@@ -9211,20 +9218,20 @@ const Ml = J(({ className: e, ...t }, n) => /* @__PURE__ */ a(
|
|
|
9211
9218
|
));
|
|
9212
9219
|
Ml.displayName = Ol.displayName;
|
|
9213
9220
|
const Pl = St(!1);
|
|
9214
|
-
function
|
|
9221
|
+
function Bh({ enabled: e, children: t }) {
|
|
9215
9222
|
return /* @__PURE__ */ a(Pl.Provider, { value: e, children: t });
|
|
9216
9223
|
}
|
|
9217
9224
|
function $h() {
|
|
9218
9225
|
return Ct(Pl);
|
|
9219
9226
|
}
|
|
9220
9227
|
const Ll = "(max-width: 768px), (pointer: coarse)", Dl = /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i;
|
|
9221
|
-
function
|
|
9228
|
+
function Hh() {
|
|
9222
9229
|
if (typeof window > "u") return !1;
|
|
9223
9230
|
const e = window.matchMedia?.(Ll)?.matches ?? !1, t = Dl.test(navigator?.userAgent ?? "");
|
|
9224
9231
|
return e || t;
|
|
9225
9232
|
}
|
|
9226
9233
|
function Fl() {
|
|
9227
|
-
const [e, t] = F(
|
|
9234
|
+
const [e, t] = F(Hh);
|
|
9228
9235
|
return z(() => {
|
|
9229
9236
|
if (typeof window > "u" || !window.matchMedia) return;
|
|
9230
9237
|
const n = window.matchMedia(Ll), r = Dl.test(navigator?.userAgent ?? ""), o = () => t(n.matches || r);
|
|
@@ -10331,22 +10338,22 @@ function sf({
|
|
|
10331
10338
|
const C = W(null), v = W(null), T = e.trim().length > 0 || i, b = m === void 0 || m.includes(P.SYNAPSE_CONVERSATION.AUDIO), k = m === void 0 || m.includes(P.SYNAPSE_CONVERSATION.VOICE), O = T || !b, A = T, $ = m === void 0 || m.includes(P.SYNAPSE_CONVERSATION.FILE), re = (d || p !== Ee.IDLE) && !l, K = L(
|
|
10332
10339
|
"rounded-full transition-all duration-200 ",
|
|
10333
10340
|
l ? "bg-gradient-to-r from-rose-400 via-primary to-indigo-500 text-white ring-2 ring-white/60 animate-pulse shadow-[0_0_20px_rgba(139,92,246,0.45)]" : re ? "text-primary/50 cursor-not-allowed shadow-none" : "text-foreground hover:bg-primary hover:text-primary-foreground"
|
|
10334
|
-
), ue = (
|
|
10335
|
-
const Y = Array.from(
|
|
10341
|
+
), ue = (H) => {
|
|
10342
|
+
const Y = Array.from(H.target.files || []);
|
|
10336
10343
|
Y.length > 0 && r(Y);
|
|
10337
10344
|
}, oe = () => {
|
|
10338
10345
|
d || (C.current && (C.current.value = ""), C.current?.click());
|
|
10339
|
-
}, I = (
|
|
10340
|
-
|
|
10341
|
-
},
|
|
10342
|
-
|
|
10343
|
-
const Y =
|
|
10344
|
-
|
|
10345
|
-
}, ie = (
|
|
10346
|
-
H
|
|
10346
|
+
}, I = (H) => {
|
|
10347
|
+
H.key === "Enter" && !H.shiftKey && A && !d && (H.preventDefault(), n());
|
|
10348
|
+
}, B = (H) => {
|
|
10349
|
+
H.style.height = "auto", H.style.overflow = "hidden";
|
|
10350
|
+
const Y = H.scrollHeight, Z = w ? 20 : 28, X = 120, Ne = Math.max(Z, Math.min(Y, X));
|
|
10351
|
+
H.style.height = Ne + "px", Y > X ? H.style.overflow = "auto" : H.style.overflow = "hidden";
|
|
10352
|
+
}, ie = (H) => {
|
|
10353
|
+
B(H.currentTarget);
|
|
10347
10354
|
};
|
|
10348
10355
|
return z(() => {
|
|
10349
|
-
v.current &&
|
|
10356
|
+
v.current && B(v.current);
|
|
10350
10357
|
}, [e]), z(() => {
|
|
10351
10358
|
!d && !u && v.current?.focus();
|
|
10352
10359
|
}, [d]), g && S ? /* @__PURE__ */ a("div", { className: "px-4 py-2 flex justify-unset", children: /* @__PURE__ */ a(
|
|
@@ -10420,7 +10427,7 @@ function sf({
|
|
|
10420
10427
|
onInput: ie,
|
|
10421
10428
|
placeholder: f,
|
|
10422
10429
|
value: e,
|
|
10423
|
-
onChange: (
|
|
10430
|
+
onChange: (H) => t(H.target.value),
|
|
10424
10431
|
rows: 1,
|
|
10425
10432
|
maxLength: 1e3,
|
|
10426
10433
|
autoFocus: !u,
|
|
@@ -10588,7 +10595,7 @@ function sf({
|
|
|
10588
10595
|
onInput: ie,
|
|
10589
10596
|
placeholder: f,
|
|
10590
10597
|
value: e,
|
|
10591
|
-
onChange: (
|
|
10598
|
+
onChange: (H) => t(H.target.value),
|
|
10592
10599
|
rows: 1,
|
|
10593
10600
|
maxLength: 1e3,
|
|
10594
10601
|
autoFocus: !u,
|
|
@@ -10946,11 +10953,11 @@ function Vl({
|
|
|
10946
10953
|
theme: v,
|
|
10947
10954
|
feedbackModal: T
|
|
10948
10955
|
}) {
|
|
10949
|
-
const [b, k] = F(!1), [O, A] = F(!1), [$, re] = F(!1), K = W(null), ue = G((D) => D.level), oe = S, I = oe === "full",
|
|
10956
|
+
const [b, k] = F(!1), [O, A] = F(!1), [$, re] = F(!1), K = W(null), ue = G((D) => D.level), oe = S, I = oe === "full", B = W(null), [ie, H] = F("");
|
|
10950
10957
|
z(() => {
|
|
10951
|
-
|
|
10958
|
+
B.current !== null && B.current !== oe && H(
|
|
10952
10959
|
oe === "full" ? "Switched to fullscreen mode" : oe === "widget" ? "Switched to widget mode" : "Switched to mobile layout"
|
|
10953
|
-
),
|
|
10960
|
+
), B.current = oe;
|
|
10954
10961
|
}, [oe]);
|
|
10955
10962
|
const Y = fe(() => _h(v), [v]), { setIsMobile: Z } = G((D) => D), X = !!N, Ne = async (D) => {
|
|
10956
10963
|
if (!(!m?.onSend || O)) {
|
|
@@ -10977,7 +10984,7 @@ function Vl({
|
|
|
10977
10984
|
}, []), wt(() => {
|
|
10978
10985
|
if (!e || !b || !K.current) return;
|
|
10979
10986
|
const D = K.current;
|
|
10980
|
-
let ye = null, he = null, me = null, Ke = window.visualViewport?.offsetTop ?? 0,
|
|
10987
|
+
let ye = null, he = null, me = null, Ke = window.visualViewport?.offsetTop ?? 0, Be = 0;
|
|
10981
10988
|
const Re = 2, Fe = 80;
|
|
10982
10989
|
if (window.visualViewport) {
|
|
10983
10990
|
const ke = () => {
|
|
@@ -10994,7 +11001,7 @@ function Vl({
|
|
|
10994
11001
|
}, Ae = () => {
|
|
10995
11002
|
if (!D || !window.visualViewport) return;
|
|
10996
11003
|
const Ye = window.visualViewport.offsetTop, tt = Date.now();
|
|
10997
|
-
Math.abs(Ye - Ke) < Re || tt -
|
|
11004
|
+
Math.abs(Ye - Ke) < Re || tt - Be < Fe || (Be = tt, Ke = Ye, ye = requestAnimationFrame(() => {
|
|
10998
11005
|
D.style.transition = "none", D.style.top = `${Ye}px`, me && clearTimeout(me), me = setTimeout(() => {
|
|
10999
11006
|
D.style.transition = "";
|
|
11000
11007
|
}, 150);
|
|
@@ -11017,13 +11024,13 @@ function Vl({
|
|
|
11017
11024
|
if (e) {
|
|
11018
11025
|
const D = K.current, ye = window.scrollY, he = document.body.style.cssText, me = document.documentElement.style.overflow, Ke = window.innerWidth - document.documentElement.clientWidth;
|
|
11019
11026
|
document.body.style.position = "fixed", document.body.style.top = `-${ye}px`, document.body.style.left = "0", document.body.style.right = "0", document.body.style.width = "100%", document.body.style.overflow = "hidden", document.documentElement.style.overflow = "hidden", Ke > 0 && !b && (document.body.style.paddingRight = `${Ke}px`);
|
|
11020
|
-
let
|
|
11027
|
+
let Be = 0;
|
|
11021
11028
|
const Re = (ke) => {
|
|
11022
|
-
|
|
11029
|
+
Be = ke.touches[0].clientY;
|
|
11023
11030
|
}, Fe = (ke) => {
|
|
11024
11031
|
if (ke.touches.length !== 1) return;
|
|
11025
|
-
const ft =
|
|
11026
|
-
|
|
11032
|
+
const ft = Be - ke.touches[0].clientY;
|
|
11033
|
+
Be = ke.touches[0].clientY;
|
|
11027
11034
|
let Ae = ke.target;
|
|
11028
11035
|
for (; Ae && Ae !== D; ) {
|
|
11029
11036
|
const { overflowY: Ye } = window.getComputedStyle(Ae);
|
|
@@ -11768,7 +11775,7 @@ function zl() {
|
|
|
11768
11775
|
};
|
|
11769
11776
|
}, []), { isOnline: e };
|
|
11770
11777
|
}
|
|
11771
|
-
const
|
|
11778
|
+
const Bl = (e) => Object.fromEntries(
|
|
11772
11779
|
Object.entries(e).filter(([, t]) => t !== void 0)
|
|
11773
11780
|
), Mp = (e) => e ? e.split(" ").map((t) => t[0]).slice(0, 2).join("").toUpperCase() : "DR", Pp = (e) => {
|
|
11774
11781
|
const t = new Date(e), n = t.toLocaleDateString(void 0, { weekday: "short" }), r = t.toLocaleDateString(void 0, { day: "2-digit" }), o = t.toLocaleDateString(void 0, { month: "short" });
|
|
@@ -11799,7 +11806,7 @@ const Hl = (e) => Object.fromEntries(
|
|
|
11799
11806
|
const d = l[c];
|
|
11800
11807
|
l[c] = {
|
|
11801
11808
|
...d,
|
|
11802
|
-
...
|
|
11809
|
+
...Bl(i),
|
|
11803
11810
|
slots: i.slots ?? d.slots
|
|
11804
11811
|
};
|
|
11805
11812
|
}
|
|
@@ -11817,7 +11824,7 @@ const Hl = (e) => Object.fromEntries(
|
|
|
11817
11824
|
const l = r[s], i = l.start_date || o.start_date || l.preferred_date || o.preferred_date, c = l.end_date || o.end_date;
|
|
11818
11825
|
r[s] = {
|
|
11819
11826
|
...l,
|
|
11820
|
-
...
|
|
11827
|
+
...Bl(o),
|
|
11821
11828
|
availability: kf({ prev: l.availability ?? [], next: o.availability ?? [], startDate: i, endDate: c, format: n })
|
|
11822
11829
|
};
|
|
11823
11830
|
}
|
|
@@ -11895,9 +11902,9 @@ const $t = (e) => {
|
|
|
11895
11902
|
setRefreshToken: ue,
|
|
11896
11903
|
setSessToken: oe,
|
|
11897
11904
|
setLevel: I,
|
|
11898
|
-
setError:
|
|
11905
|
+
setError: B,
|
|
11899
11906
|
setConnectionStatus: ie,
|
|
11900
|
-
setShowRetryButton:
|
|
11907
|
+
setShowRetryButton: H,
|
|
11901
11908
|
setStartNewConnection: Y,
|
|
11902
11909
|
setIsStreaming: Z,
|
|
11903
11910
|
setIsWaitingForResponse: X,
|
|
@@ -11911,7 +11918,7 @@ const $t = (e) => {
|
|
|
11911
11918
|
updateMessageInSession: he,
|
|
11912
11919
|
setUserId: me,
|
|
11913
11920
|
setFileUploadPerSession: Ke,
|
|
11914
|
-
setToastMessage:
|
|
11921
|
+
setToastMessage: Be,
|
|
11915
11922
|
upsertElicitationState: Re,
|
|
11916
11923
|
setElicitationState: Fe,
|
|
11917
11924
|
setInitialMessage: ke,
|
|
@@ -11919,7 +11926,7 @@ const $t = (e) => {
|
|
|
11919
11926
|
} = G.getState();
|
|
11920
11927
|
z(() => {
|
|
11921
11928
|
if (!C)
|
|
11922
|
-
|
|
11929
|
+
B({
|
|
11923
11930
|
title: "No internet connection",
|
|
11924
11931
|
description: "Please check your internet connection."
|
|
11925
11932
|
}), ie(Te.NOT_CONNECTED);
|
|
@@ -11965,7 +11972,7 @@ const $t = (e) => {
|
|
|
11965
11972
|
callbacks: {
|
|
11966
11973
|
onError: (x) => {
|
|
11967
11974
|
if (typeof navigator < "u" && !navigator.onLine) {
|
|
11968
|
-
ie(Te.NOT_CONNECTED),
|
|
11975
|
+
ie(Te.NOT_CONNECTED), B({
|
|
11969
11976
|
title: "No internet connection",
|
|
11970
11977
|
description: "Will reconnect automatically when internet is restored."
|
|
11971
11978
|
});
|
|
@@ -11980,13 +11987,13 @@ const $t = (e) => {
|
|
|
11980
11987
|
window.postMessage(
|
|
11981
11988
|
{ type: "AUTH_EXPIRED", message: "Authentication expired" },
|
|
11982
11989
|
"*"
|
|
11983
|
-
), ie(Te.NOT_CONNECTED),
|
|
11990
|
+
), ie(Te.NOT_CONNECTED), B({
|
|
11984
11991
|
title: "Session expired",
|
|
11985
11992
|
description: "Your session has expired. Please reload the page to continue."
|
|
11986
11993
|
});
|
|
11987
11994
|
return;
|
|
11988
11995
|
case P.SYNAPSE_RECOVERY_REASON.SESSION_NOT_FOUND:
|
|
11989
|
-
|
|
11996
|
+
B(null), ie(Te.NOT_CONNECTED), Y(!0);
|
|
11990
11997
|
return;
|
|
11991
11998
|
case P.SYNAPSE_RECOVERY_REASON.RETRY_LATER:
|
|
11992
11999
|
ie(Te.CONNECTING);
|
|
@@ -11999,32 +12006,32 @@ const $t = (e) => {
|
|
|
11999
12006
|
Q && be ? (et(), _.current?.clearTokens(), Pt()) : j || Q && !be ? (window.postMessage(
|
|
12000
12007
|
{ type: "AUTH_EXPIRED", message: "Authentication expired" },
|
|
12001
12008
|
"*"
|
|
12002
|
-
), ie(Te.NOT_CONNECTED),
|
|
12009
|
+
), ie(Te.NOT_CONNECTED), B({
|
|
12003
12010
|
title: "Session expired",
|
|
12004
12011
|
description: "Your session has expired. Please reload the page to continue."
|
|
12005
|
-
})) : se ? Y(!0) : (ie(Te.NOT_CONNECTED),
|
|
12012
|
+
})) : se ? Y(!0) : (ie(Te.NOT_CONNECTED), B({
|
|
12006
12013
|
title: "Something went wrong!",
|
|
12007
12014
|
description: $t(x)
|
|
12008
|
-
}),
|
|
12015
|
+
}), H(!0));
|
|
12009
12016
|
break;
|
|
12010
12017
|
}
|
|
12011
12018
|
case P.SynapseErrorCode.RECORDING:
|
|
12012
|
-
|
|
12019
|
+
B({
|
|
12013
12020
|
title: "Recording failed",
|
|
12014
12021
|
description: $t(x)
|
|
12015
12022
|
});
|
|
12016
12023
|
break;
|
|
12017
12024
|
case P.SynapseErrorCode.CONNECTION:
|
|
12018
|
-
Ze() || (ie(Te.NOT_CONNECTED), m.current < 2 ? (m.current = m.current + 1, Ae(b)) : (
|
|
12025
|
+
Ze() || (ie(Te.NOT_CONNECTED), m.current < 2 ? (m.current = m.current + 1, Ae(b)) : (H(!0), B({
|
|
12019
12026
|
title: "Trying to connect...",
|
|
12020
12027
|
description: $t(x)
|
|
12021
12028
|
})));
|
|
12022
12029
|
break;
|
|
12023
12030
|
default:
|
|
12024
|
-
|
|
12031
|
+
B({
|
|
12025
12032
|
title: "Something went wrong",
|
|
12026
12033
|
description: $t(x)
|
|
12027
|
-
}),
|
|
12034
|
+
}), H(!0);
|
|
12028
12035
|
break;
|
|
12029
12036
|
}
|
|
12030
12037
|
},
|
|
@@ -12068,20 +12075,20 @@ const $t = (e) => {
|
|
|
12068
12075
|
const j = M.session_id || R;
|
|
12069
12076
|
j && ft(j, M.initial_message);
|
|
12070
12077
|
}
|
|
12071
|
-
M?.error?.msg &&
|
|
12078
|
+
M?.error?.msg && Be(M.error.msg);
|
|
12072
12079
|
} catch (M) {
|
|
12073
12080
|
if (M?.reason) return;
|
|
12074
12081
|
const j = M, se = j.context?.stage === "tokenRefresh" || j.status === 401, Q = j.status === 404 || j.context?.status == 404, we = j.status === 403, be = G.getState().level === "guest";
|
|
12075
12082
|
se || we && !be ? (window.postMessage(
|
|
12076
12083
|
{ type: "AUTH_EXPIRED", message: "Authentication expired" },
|
|
12077
12084
|
"*"
|
|
12078
|
-
), ie(Te.NOT_CONNECTED),
|
|
12085
|
+
), ie(Te.NOT_CONNECTED), B({
|
|
12079
12086
|
title: "Session expired",
|
|
12080
12087
|
description: "Your session has expired. Please reload the page to continue."
|
|
12081
|
-
})) : Q ? (
|
|
12088
|
+
})) : Q ? (B(null), ie(Te.NOT_CONNECTED), Y(!0)) : we && be && !x ? (et(), _.current?.clearTokens(), ce(), st(), await Ae(void 0, !0)) : (B({
|
|
12082
12089
|
title: "Connection Lost!",
|
|
12083
12090
|
description: $t(M)
|
|
12084
|
-
}),
|
|
12091
|
+
}), H(!0));
|
|
12085
12092
|
}
|
|
12086
12093
|
}, Ye = async (R) => {
|
|
12087
12094
|
const x = G.getState().chats[R];
|
|
@@ -12113,7 +12120,7 @@ const $t = (e) => {
|
|
|
12113
12120
|
}, tt = async ({ forceNewSession: R = !1, sessionId: x } = {}) => {
|
|
12114
12121
|
try {
|
|
12115
12122
|
if (!_.current) {
|
|
12116
|
-
|
|
12123
|
+
B({
|
|
12117
12124
|
title: "SDK not initialized",
|
|
12118
12125
|
description: "Please ensure agentId is configured"
|
|
12119
12126
|
}), f(!1);
|
|
@@ -12132,7 +12139,7 @@ const $t = (e) => {
|
|
|
12132
12139
|
}, Ze = () => _.current?.isConnected() ?? !1, Ot = () => {
|
|
12133
12140
|
_.current?.endSession();
|
|
12134
12141
|
}, st = () => {
|
|
12135
|
-
m.current = 0,
|
|
12142
|
+
m.current = 0, H(!1), Y(!1), B(null);
|
|
12136
12143
|
}, It = () => {
|
|
12137
12144
|
_.current?.on(P.SYNAPSE_REALTIME_EVENTS.MESSAGE_CHUNK, (R) => {
|
|
12138
12145
|
const x = R;
|
|
@@ -12245,7 +12252,7 @@ const $t = (e) => {
|
|
|
12245
12252
|
component: Ue
|
|
12246
12253
|
});
|
|
12247
12254
|
}
|
|
12248
|
-
it &&
|
|
12255
|
+
it && Be(it);
|
|
12249
12256
|
const pt = x?.data?.details?._meta?.user_hint;
|
|
12250
12257
|
i((Me) => {
|
|
12251
12258
|
let ne = Me[Me.length - 1]?.id === M ? Me.length - 1 : Me.findIndex?.((nt) => nt.id === M);
|
|
@@ -12283,16 +12290,16 @@ const $t = (e) => {
|
|
|
12283
12290
|
if (R?.reason === P.DisconnectionReason.CLIENT_CLOSED) return;
|
|
12284
12291
|
const x = typeof navigator < "u" && !navigator.onLine;
|
|
12285
12292
|
if (ie(Te.NOT_CONNECTED), x) {
|
|
12286
|
-
|
|
12293
|
+
B({
|
|
12287
12294
|
title: "No internet connection",
|
|
12288
12295
|
description: "Will reconnect automatically when internet is restored."
|
|
12289
|
-
}),
|
|
12296
|
+
}), H(!1);
|
|
12290
12297
|
return;
|
|
12291
12298
|
}
|
|
12292
|
-
m.current < 2 ? (m.current = m.current + 1,
|
|
12299
|
+
m.current < 2 ? (m.current = m.current + 1, H(!0), B({
|
|
12293
12300
|
title: "Something went wrong!",
|
|
12294
12301
|
description: "Please try again."
|
|
12295
|
-
})) : (
|
|
12302
|
+
})) : (B({
|
|
12296
12303
|
title: "Something went wrong!",
|
|
12297
12304
|
description: "Please start a new Chat."
|
|
12298
12305
|
}), Y(!0));
|
|
@@ -12302,7 +12309,7 @@ const $t = (e) => {
|
|
|
12302
12309
|
Y(!0), _e(Ee.IDLE);
|
|
12303
12310
|
return;
|
|
12304
12311
|
case P.SYNAPSE_REALTIME_ERROR_CODES.SESSION_TOKEN_MISMATCH:
|
|
12305
|
-
|
|
12312
|
+
B({
|
|
12306
12313
|
title: "Session not found",
|
|
12307
12314
|
description: "Please start a new chat from onError callback"
|
|
12308
12315
|
}), Y(!0), _e(Ee.IDLE);
|
|
@@ -12319,40 +12326,40 @@ const $t = (e) => {
|
|
|
12319
12326
|
m.current++, un();
|
|
12320
12327
|
return;
|
|
12321
12328
|
}
|
|
12322
|
-
|
|
12329
|
+
B({
|
|
12323
12330
|
title: "Error parsing request",
|
|
12324
12331
|
description: "please try again"
|
|
12325
|
-
}),
|
|
12332
|
+
}), H(!0), _e(Ee.IDLE);
|
|
12326
12333
|
return;
|
|
12327
12334
|
case P.SYNAPSE_REALTIME_ERROR_CODES.TIMEOUT:
|
|
12328
|
-
|
|
12335
|
+
B({
|
|
12329
12336
|
title: "Request timed out",
|
|
12330
12337
|
description: "please try again"
|
|
12331
|
-
}),
|
|
12338
|
+
}), H(!0), _e(Ee.IDLE);
|
|
12332
12339
|
return;
|
|
12333
12340
|
case P.SYNAPSE_REALTIME_ERROR_CODES.PROMPT_FETCH_ERROR:
|
|
12334
|
-
|
|
12341
|
+
B({
|
|
12335
12342
|
title: "Something went wrong",
|
|
12336
12343
|
description: "please try again"
|
|
12337
|
-
}),
|
|
12344
|
+
}), H(!0), _e(Ee.IDLE);
|
|
12338
12345
|
return;
|
|
12339
12346
|
case P.SYNAPSE_REALTIME_ERROR_CODES.INVALID_FILE_REQUEST:
|
|
12340
|
-
|
|
12347
|
+
B({
|
|
12341
12348
|
title: "Something went wrong",
|
|
12342
12349
|
description: "please try again"
|
|
12343
|
-
}),
|
|
12350
|
+
}), H(!0), _e(Ee.IDLE);
|
|
12344
12351
|
return;
|
|
12345
12352
|
case P.SYNAPSE_REALTIME_ERROR_CODES.SERVER_ERROR:
|
|
12346
|
-
|
|
12353
|
+
B({
|
|
12347
12354
|
title: "Something went wrong",
|
|
12348
12355
|
description: "please try again"
|
|
12349
|
-
}),
|
|
12356
|
+
}), H(!0), _e(Ee.IDLE);
|
|
12350
12357
|
return;
|
|
12351
12358
|
default:
|
|
12352
|
-
|
|
12359
|
+
B({
|
|
12353
12360
|
title: "Something went wrong",
|
|
12354
12361
|
description: "please try again"
|
|
12355
|
-
}),
|
|
12362
|
+
}), H(!0), _e(Ee.IDLE);
|
|
12356
12363
|
return;
|
|
12357
12364
|
}
|
|
12358
12365
|
}), _.current?.on(P.SYNAPSE_REALTIME_EVENTS.AUDIO_TRANSCRIPT, async (R) => {
|
|
@@ -12421,14 +12428,14 @@ const $t = (e) => {
|
|
|
12421
12428
|
const Ge = G.getState().elicitationState, Zt = Object.values(Ge).some((Ie) => Ie.active);
|
|
12422
12429
|
if (!(!j && (!x || x.length === 0) && !R?.trim() && !M?.audio && !se && !Zt && !be && !Object.keys(be || {}).length)) {
|
|
12423
12430
|
if (x && x.length > 3) {
|
|
12424
|
-
|
|
12431
|
+
B({
|
|
12425
12432
|
title: "Maximum 3 files are allowed to be sent at a time",
|
|
12426
12433
|
description: "Please try again"
|
|
12427
12434
|
});
|
|
12428
12435
|
return;
|
|
12429
12436
|
}
|
|
12430
12437
|
if (x && x.length > 0 && x.reduce((Ie, it) => Ie + it.size, 0) > 10 * 1024 * 1024) {
|
|
12431
|
-
|
|
12438
|
+
B({
|
|
12432
12439
|
title: "Total file size limit of 10MB exceeded",
|
|
12433
12440
|
description: "Please reduce the size of the files or try again with less files"
|
|
12434
12441
|
});
|
|
@@ -12436,13 +12443,13 @@ const $t = (e) => {
|
|
|
12436
12443
|
}
|
|
12437
12444
|
if (x && x.length > 0 && x.length + re > Xr) {
|
|
12438
12445
|
const Ie = Xr - re;
|
|
12439
|
-
|
|
12446
|
+
B({
|
|
12440
12447
|
title: `You can only upload up to ${Xr} files per session`,
|
|
12441
12448
|
description: `${Ie <= 0 ? "Maximum file upload limit reached" : `You have ${Ie} file${Ie === 1 ? "" : "s"} upload${Ie === 1 ? "" : "s"} left`}`
|
|
12442
12449
|
});
|
|
12443
12450
|
return;
|
|
12444
12451
|
} else x && x.length && Ke(re + x.length);
|
|
12445
|
-
|
|
12452
|
+
B(null), H(!1), Ze() && ie(Te.CONNECTED);
|
|
12446
12453
|
try {
|
|
12447
12454
|
const Ie = l.length == 2 && h.length == 2 ? h : null;
|
|
12448
12455
|
let it = null, mt = null;
|
|
@@ -12544,10 +12551,10 @@ const $t = (e) => {
|
|
|
12544
12551
|
"image/jpeg",
|
|
12545
12552
|
"image/jpg",
|
|
12546
12553
|
"image/png"
|
|
12547
|
-
].includes(R.type) ? (
|
|
12554
|
+
].includes(R.type) ? (B({
|
|
12548
12555
|
title: `File type not supported: ${R.name}`,
|
|
12549
12556
|
description: "Only PDF, images (JPG, JPEG, PNG) are allowed."
|
|
12550
|
-
}), !1) : R.size > 3 * 1024 * 1024 ? (
|
|
12557
|
+
}), !1) : R.size > 3 * 1024 * 1024 ? (B({
|
|
12551
12558
|
title: "File size limit of 3MB exceeded",
|
|
12552
12559
|
description: "Please reduce the size of the file or try again with a smaller file"
|
|
12553
12560
|
}), !1) : !0, Ir = async () => {
|
|
@@ -12597,9 +12604,9 @@ const $t = (e) => {
|
|
|
12597
12604
|
m.current++;
|
|
12598
12605
|
const { sessionId: R } = G.getState();
|
|
12599
12606
|
await Ae(R);
|
|
12600
|
-
} else m.current === 2 ? (m.current++,
|
|
12607
|
+
} else m.current === 2 ? (m.current++, H(!0), B({
|
|
12601
12608
|
title: "Trying to connect..."
|
|
12602
|
-
})) : (
|
|
12609
|
+
})) : (B({
|
|
12603
12610
|
title: "Something went wrong!",
|
|
12604
12611
|
description: "Please start a new chat."
|
|
12605
12612
|
}), Y(!0));
|
|
@@ -12688,7 +12695,7 @@ const $t = (e) => {
|
|
|
12688
12695
|
}
|
|
12689
12696
|
};
|
|
12690
12697
|
}, Uf = 32, Vf = 100, zf = 320;
|
|
12691
|
-
function
|
|
12698
|
+
function Bf() {
|
|
12692
12699
|
return typeof window > "u" || !window.matchMedia ? !1 : window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
12693
12700
|
}
|
|
12694
12701
|
function $f({
|
|
@@ -12700,7 +12707,7 @@ function $f({
|
|
|
12700
12707
|
const o = W(null), s = W(null), [l, i] = F(!1), c = W(null), d = W(!1), f = W("auto"), u = W(!0), p = le(() => o.current?.querySelector(
|
|
12701
12708
|
"[data-radix-scroll-area-viewport]"
|
|
12702
12709
|
) || null, []), y = le(
|
|
12703
|
-
(S) =>
|
|
12710
|
+
(S) => Bf() ? "auto" : S,
|
|
12704
12711
|
[]
|
|
12705
12712
|
), m = le(
|
|
12706
12713
|
(S) => {
|
|
@@ -12771,7 +12778,7 @@ function $f({
|
|
|
12771
12778
|
};
|
|
12772
12779
|
}
|
|
12773
12780
|
const So = "eka-medassist-agent-config";
|
|
12774
|
-
function
|
|
12781
|
+
function Hf(e) {
|
|
12775
12782
|
try {
|
|
12776
12783
|
const t = localStorage.getItem(So);
|
|
12777
12784
|
return (t ? JSON.parse(t) : {})[e]?.feedback_hidden === !0;
|
|
@@ -12805,9 +12812,9 @@ function Yf({ isOpen: e, agentId: t, config: n }) {
|
|
|
12805
12812
|
clearError: ue,
|
|
12806
12813
|
error: oe,
|
|
12807
12814
|
connectionStatus: I,
|
|
12808
|
-
recordingStatus:
|
|
12815
|
+
recordingStatus: B,
|
|
12809
12816
|
isWaitingForResponse: ie,
|
|
12810
|
-
isStreaming:
|
|
12817
|
+
isStreaming: H,
|
|
12811
12818
|
setError: Y,
|
|
12812
12819
|
sessionId: Z,
|
|
12813
12820
|
setContext: X,
|
|
@@ -12819,7 +12826,7 @@ function Yf({ isOpen: e, agentId: t, config: n }) {
|
|
|
12819
12826
|
} = G(), D = G((ae) => ae.elicitationState), ye = G((ae) => ae.level), he = n?.theme?.feature === !0, {
|
|
12820
12827
|
incomingMessages: me,
|
|
12821
12828
|
loading: Ke,
|
|
12822
|
-
isLoadingSessionMessages:
|
|
12829
|
+
isLoadingSessionMessages: Be,
|
|
12823
12830
|
sendMessage: Re,
|
|
12824
12831
|
startSession: Fe,
|
|
12825
12832
|
isReady: ke,
|
|
@@ -12864,7 +12871,7 @@ function Yf({ isOpen: e, agentId: t, config: n }) {
|
|
|
12864
12871
|
l();
|
|
12865
12872
|
}, []);
|
|
12866
12873
|
const x = () => {
|
|
12867
|
-
n.feedback && !
|
|
12874
|
+
n.feedback && !Hf(t) ? O(!0) : n.onClose();
|
|
12868
12875
|
}, M = async (ae, ee) => {
|
|
12869
12876
|
await st(ae, ee), O(!1), n.onClose();
|
|
12870
12877
|
}, j = () => {
|
|
@@ -12878,17 +12885,17 @@ function Yf({ isOpen: e, agentId: t, config: n }) {
|
|
|
12878
12885
|
if (!ee) return null;
|
|
12879
12886
|
const xe = D[ee];
|
|
12880
12887
|
return xe?.active ? { ...xe, tool_key: ee } : null;
|
|
12881
|
-
}, [me, D]), Ge = fe(() => (Z ? ce[Z] : void 0) ?? Ne ?? n?.initialMessage ?? null, [Z, ce, Ne, n?.initialMessage]), Zt = fe(() => !!Ge?.text || !!Ge?.suggestions?.length, [Ge]), Ie = fe(() => Zt && me?.length === 0 && !
|
|
12888
|
+
}, [me, D]), Ge = fe(() => (Z ? ce[Z] : void 0) ?? Ne ?? n?.initialMessage ?? null, [Z, ce, Ne, n?.initialMessage]), Zt = fe(() => !!Ge?.text || !!Ge?.suggestions?.length, [Ge]), Ie = fe(() => Zt && me?.length === 0 && !Be, [me, Zt, Be]), it = fe(() => Ue ? Ue.component === P.SYNAPSE_COMPONENTS.MOBILE || Ue.component === P.SYNAPSE_COMPONENTS.OTP || Ue.component === P.SYNAPSE_COMPONENTS.EMAIL : !1, [Ue]), {
|
|
12882
12889
|
scrollAreaRef: mt,
|
|
12883
12890
|
messagesEndRef: pt,
|
|
12884
12891
|
showScrollButton: Lt,
|
|
12885
12892
|
scrollToBottom: hn
|
|
12886
12893
|
} = $f({
|
|
12887
12894
|
messageCount: me.length,
|
|
12888
|
-
isStreaming:
|
|
12895
|
+
isStreaming: H,
|
|
12889
12896
|
isFirstMessage: be,
|
|
12890
12897
|
resolvedMode: N
|
|
12891
|
-
}), Me = I === P.ConnectionStatus.CONNECTED, Ve = ie ||
|
|
12898
|
+
}), Me = I === P.ConnectionStatus.CONNECTED, Ve = ie || H, ne = fe(() => B === Ee.IDLE ? null : B === Ee.LISTENING ? "Listening..." : B === Ee.PROCESSING ? "Processing..." : B === Ee.TRANSCRIBING ? "Transcribing..." : null, [B]), nt = ne && B !== Ee.IDLE ? ne : ie || H ? "Please wait for the response..." : "Type a reply…", Tt = async (ae) => {
|
|
12892
12899
|
if (Ve)
|
|
12893
12900
|
return;
|
|
12894
12901
|
const ee = ae?.message ?? u;
|
|
@@ -12946,7 +12953,7 @@ function Yf({ isOpen: e, agentId: t, config: n }) {
|
|
|
12946
12953
|
attachmentFiles: w,
|
|
12947
12954
|
isDisabled: Ve,
|
|
12948
12955
|
placeholder: nt,
|
|
12949
|
-
recordingStatus:
|
|
12956
|
+
recordingStatus: B,
|
|
12950
12957
|
allowed: n.allowed,
|
|
12951
12958
|
isVoiceAgentActive: f,
|
|
12952
12959
|
handleVoiceMode: d
|
|
@@ -12978,7 +12985,7 @@ function Yf({ isOpen: e, agentId: t, config: n }) {
|
|
|
12978
12985
|
clearError: ue,
|
|
12979
12986
|
error: oe,
|
|
12980
12987
|
connectionStatus: I,
|
|
12981
|
-
isStreaming:
|
|
12988
|
+
isStreaming: H,
|
|
12982
12989
|
sessionId: Z,
|
|
12983
12990
|
activeElicitation: Ue,
|
|
12984
12991
|
// Derived
|
|
@@ -12989,7 +12996,7 @@ function Yf({ isOpen: e, agentId: t, config: n }) {
|
|
|
12989
12996
|
isConnected: Me,
|
|
12990
12997
|
isComposerDisabled: Ve,
|
|
12991
12998
|
loading: Ke,
|
|
12992
|
-
isLoadingSessionMessages:
|
|
12999
|
+
isLoadingSessionMessages: Be,
|
|
12993
13000
|
initialMessage: Ge,
|
|
12994
13001
|
// Chat hook values
|
|
12995
13002
|
incomingMessages: me,
|
|
@@ -13045,17 +13052,17 @@ function Yt() {
|
|
|
13045
13052
|
return e;
|
|
13046
13053
|
}, Yt.apply(this, arguments);
|
|
13047
13054
|
}
|
|
13048
|
-
const Gf = ["children", "options"], Ui = ["allowFullScreen", "allowTransparency", "autoComplete", "autoFocus", "autoPlay", "cellPadding", "cellSpacing", "charSet", "classId", "colSpan", "contentEditable", "contextMenu", "crossOrigin", "encType", "formAction", "formEncType", "formMethod", "formNoValidate", "formTarget", "frameBorder", "hrefLang", "inputMode", "keyParams", "keyType", "marginHeight", "marginWidth", "maxLength", "mediaGroup", "minLength", "noValidate", "radioGroup", "readOnly", "rowSpan", "spellCheck", "srcDoc", "srcLang", "srcSet", "tabIndex", "useMap"].reduce((e, t) => (e[t.toLowerCase()] = t, e), { class: "className", for: "htmlFor" }), Vi = { amp: "&", apos: "'", gt: ">", lt: "<", nbsp: " ", quot: "“" }, Wf = ["style", "script", "pre"], qf = ["src", "href", "data", "formAction", "srcDoc", "action"], Kf = /([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi, Zf = /\n{2,}$/, zi = /^(\s*>[\s\S]*?)(?=\n\n|$)/, Xf = /^ *> ?/gm, Jf = /^(?:\[!([^\]]*)\]\n)?([\s\S]*)/, Qf = /^ {2,}\n/, em = /^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,
|
|
13055
|
+
const Gf = ["children", "options"], Ui = ["allowFullScreen", "allowTransparency", "autoComplete", "autoFocus", "autoPlay", "cellPadding", "cellSpacing", "charSet", "classId", "colSpan", "contentEditable", "contextMenu", "crossOrigin", "encType", "formAction", "formEncType", "formMethod", "formNoValidate", "formTarget", "frameBorder", "hrefLang", "inputMode", "keyParams", "keyType", "marginHeight", "marginWidth", "maxLength", "mediaGroup", "minLength", "noValidate", "radioGroup", "readOnly", "rowSpan", "spellCheck", "srcDoc", "srcLang", "srcSet", "tabIndex", "useMap"].reduce((e, t) => (e[t.toLowerCase()] = t, e), { class: "className", for: "htmlFor" }), Vi = { amp: "&", apos: "'", gt: ">", lt: "<", nbsp: " ", quot: "“" }, Wf = ["style", "script", "pre"], qf = ["src", "href", "data", "formAction", "srcDoc", "action"], Kf = /([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi, Zf = /\n{2,}$/, zi = /^(\s*>[\s\S]*?)(?=\n\n|$)/, Xf = /^ *> ?/gm, Jf = /^(?:\[!([^\]]*)\]\n)?([\s\S]*)/, Qf = /^ {2,}\n/, em = /^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/, Bi = /^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/, $i = /^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/, tm = /^(`+)((?:\\`|(?!\1)`|[^`])+)\1/, nm = /^(?:\n *)*\n/, rm = /\r\n?/g, om = /^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/, sm = /^\[\^([^\]]+)]/, im = /\f/g, am = /^---[ \t]*\n(.|\n)*\n---[ \t]*\n/, lm = /^\s*?\[(x|\s)\]/, Hi = /^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, ji = /^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Yi = /^([^\n]+)\n *(=|-)\2{2,} *\n/, no = /^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i, cm = /&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi, Gi = /^<!--[\s\S]*?(?:-->)/, dm = /^(data|aria|x)-[a-z_][a-z\d_.-]*$/, ro = /^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i, um = /^\{.*\}$/, hm = /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, fm = /^<([^ >]+[:@\/][^ >]+)>/, mm = /-([a-z])?/gi, Wi = /^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/, pm = /^[^\n]+(?: \n|\n{2,})/, gm = /^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/, _m = /^!\[([^\]]*)\] ?\[([^\]]*)\]/, Em = /^\[([^\]]*)\] ?\[([^\]]*)\]/, ym = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/, bm = /\t/g, Sm = /(^ *\||\| *$)/g, vm = /^ *:-+: *$/, wm = /^ *:-+ *$/, Cm = /^ *-+: *$/, Ar = (e) => `(?=[\\s\\S]+?\\1${e ? "\\1" : ""})`, Or = "((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)", Tm = RegExp(`^([*_])\\1${Ar(1)}${Or}\\1\\1(?!\\1)`), Nm = RegExp(`^([*_])${Ar(0)}${Or}\\1(?!\\1)`), xm = RegExp(`^(==)${Ar(0)}${Or}\\1`), Rm = RegExp(`^(~~)${Ar(0)}${Or}\\1`), km = /^(:[a-zA-Z0-9-_]+:)/, Am = /^\\([^0-9A-Za-z\s])/, Om = /\\([^0-9A-Za-z\s])/g, Im = /^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/, Mm = /^\n+/, Pm = /^([ \t]*)/, Lm = /(?:^|\n)( *)$/, rs = "(?:\\d+\\.)", os = "(?:[*+-])";
|
|
13049
13056
|
function $l(e) {
|
|
13050
13057
|
return "( *)(" + (e === 1 ? rs : os) + ") +";
|
|
13051
13058
|
}
|
|
13052
|
-
const
|
|
13059
|
+
const Hl = $l(1), jl = $l(2);
|
|
13053
13060
|
function Yl(e) {
|
|
13054
|
-
return RegExp("^" + (e === 1 ?
|
|
13061
|
+
return RegExp("^" + (e === 1 ? Hl : jl));
|
|
13055
13062
|
}
|
|
13056
13063
|
const Dm = Yl(1), Fm = Yl(2);
|
|
13057
13064
|
function Gl(e) {
|
|
13058
|
-
return RegExp("^" + (e === 1 ?
|
|
13065
|
+
return RegExp("^" + (e === 1 ? Hl : jl) + "[^\\n]*(?:\\n(?!\\1" + (e === 1 ? rs : os) + " )[^\\n]*)*(\\n|$)", "gm");
|
|
13059
13066
|
}
|
|
13060
13067
|
const Um = Gl(1), Vm = Gl(2);
|
|
13061
13068
|
function Wl(e) {
|
|
@@ -13079,9 +13086,9 @@ function qi(e, t) {
|
|
|
13079
13086
|
u = E;
|
|
13080
13087
|
const _ = c.inline, N = c.list;
|
|
13081
13088
|
let w;
|
|
13082
|
-
c.list = !0, E ? (c.inline = !1, w =
|
|
13089
|
+
c.list = !0, E ? (c.inline = !1, w = Hn(S) + `
|
|
13083
13090
|
|
|
13084
|
-
`) : (c.inline = !0, w =
|
|
13091
|
+
`) : (c.inline = !0, w = Hn(S));
|
|
13085
13092
|
const C = i(w, c);
|
|
13086
13093
|
return c.inline = _, c.list = N, C;
|
|
13087
13094
|
}), ordered: n, start: d };
|
|
@@ -13089,11 +13096,11 @@ function qi(e, t) {
|
|
|
13089
13096
|
return e("li", { key: f }, i(d, c));
|
|
13090
13097
|
})) };
|
|
13091
13098
|
}
|
|
13092
|
-
const zm = RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),
|
|
13099
|
+
const zm = RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`), Bm = /^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;
|
|
13093
13100
|
function Ki(e) {
|
|
13094
13101
|
return typeof e == "string";
|
|
13095
13102
|
}
|
|
13096
|
-
function
|
|
13103
|
+
function Hn(e) {
|
|
13097
13104
|
let t = e.length;
|
|
13098
13105
|
for (; t > 0 && e[t - 1] <= " "; ) t--;
|
|
13099
13106
|
return e.slice(0, t);
|
|
@@ -13111,7 +13118,7 @@ function $m(e, t, n) {
|
|
|
13111
13118
|
function Vn(e) {
|
|
13112
13119
|
return e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g, "a").replace(/[çÇ]/g, "c").replace(/[ðÐ]/g, "d").replace(/[ÈÉÊËéèêë]/g, "e").replace(/[ÏïÎîÍíÌì]/g, "i").replace(/[Ññ]/g, "n").replace(/[øØœŒÕõÔôÓóÒò]/g, "o").replace(/[ÜüÛûÚúÙù]/g, "u").replace(/[ŸÿÝý]/g, "y").replace(/[^a-z0-9- ]/gi, "").replace(/ /gi, "-").toLowerCase();
|
|
13113
13120
|
}
|
|
13114
|
-
function
|
|
13121
|
+
function Hm(e) {
|
|
13115
13122
|
return Cm.test(e) ? "right" : vm.test(e) ? "center" : wm.test(e) ? "left" : null;
|
|
13116
13123
|
}
|
|
13117
13124
|
function Zi(e, t, n, r) {
|
|
@@ -13129,7 +13136,7 @@ function Zi(e, t, n, r) {
|
|
|
13129
13136
|
}
|
|
13130
13137
|
function jm(e, t, n) {
|
|
13131
13138
|
n.inline = !0;
|
|
13132
|
-
const r = e[2] ? e[2].replace(Sm, "").split("|").map(
|
|
13139
|
+
const r = e[2] ? e[2].replace(Sm, "").split("|").map(Hm) : [], o = e[3] ? (function(l, i, c) {
|
|
13133
13140
|
return l.trim().split(`
|
|
13134
13141
|
`).map(function(d) {
|
|
13135
13142
|
return Zi(d, i, c, !0);
|
|
@@ -13143,7 +13150,7 @@ function Xi(e, t) {
|
|
|
13143
13150
|
function an(e) {
|
|
13144
13151
|
return e.inline = 1, e;
|
|
13145
13152
|
}
|
|
13146
|
-
function
|
|
13153
|
+
function Ht(e) {
|
|
13147
13154
|
return an(function(t, n) {
|
|
13148
13155
|
return n.inline ? e.exec(t) : null;
|
|
13149
13156
|
});
|
|
@@ -13212,7 +13219,7 @@ function ao(e, t, n) {
|
|
|
13212
13219
|
}
|
|
13213
13220
|
function Zm(e = "", t = {}) {
|
|
13214
13221
|
t.overrides = t.overrides || {}, t.namedCodesToUnicode = t.namedCodesToUnicode ? Yt({}, Vi, t.namedCodesToUnicode) : Vi;
|
|
13215
|
-
const n = t.slugify || Vn, r = t.sanitizer || Gm, o = t.createElement || We, s = [zi,
|
|
13222
|
+
const n = t.slugify || Vn, r = t.sanitizer || Gm, o = t.createElement || We, s = [zi, Bi, $i, t.enforceAtxHeadings ? ji : Hi, Yi, Wi, ql, Kl], l = [...s, pm, no, Gi, ro];
|
|
13216
13223
|
function i(h, E) {
|
|
13217
13224
|
for (let _ = 0; _ < h.length; _++) if (h[_].test(E)) return !0;
|
|
13218
13225
|
return !1;
|
|
@@ -13228,7 +13235,7 @@ function Zm(e = "", t = {}) {
|
|
|
13228
13235
|
h = h.replace(am, "");
|
|
13229
13236
|
let E = !1;
|
|
13230
13237
|
t.forceInline ? E = !0 : t.forceBlock || (E = ym.test(h) === !1);
|
|
13231
|
-
const _ = g(m(E ? h :
|
|
13238
|
+
const _ = g(m(E ? h : Hn(h).replace(Mm, "") + `
|
|
13232
13239
|
|
|
13233
13240
|
`, { inline: E }));
|
|
13234
13241
|
for (; Ki(_[_.length - 1]) && !_[_.length - 1].trim(); ) _.pop();
|
|
@@ -13260,11 +13267,11 @@ function Zm(e = "", t = {}) {
|
|
|
13260
13267
|
const k = N[b] = (function(O, A, $, re) {
|
|
13261
13268
|
return A === "style" ? (function(K) {
|
|
13262
13269
|
const ue = [];
|
|
13263
|
-
let oe = "", I = !1,
|
|
13270
|
+
let oe = "", I = !1, B = !1, ie = "";
|
|
13264
13271
|
if (!K) return ue;
|
|
13265
13272
|
for (let Y = 0; Y < K.length; Y++) {
|
|
13266
13273
|
const Z = K[Y];
|
|
13267
|
-
if (Z !== '"' && Z !== "'" || I || (
|
|
13274
|
+
if (Z !== '"' && Z !== "'" || I || (B ? Z === ie && (B = !1, ie = "") : (B = !0, ie = Z)), Z === "(" && oe.endsWith("url") ? I = !0 : Z === ")" && I && (I = !1), Z !== ";" || B || I) oe += Z;
|
|
13268
13275
|
else {
|
|
13269
13276
|
const X = oe.trim();
|
|
13270
13277
|
if (X) {
|
|
@@ -13277,11 +13284,11 @@ function Zm(e = "", t = {}) {
|
|
|
13277
13284
|
oe = "";
|
|
13278
13285
|
}
|
|
13279
13286
|
}
|
|
13280
|
-
const
|
|
13281
|
-
if (
|
|
13282
|
-
const Y =
|
|
13287
|
+
const H = oe.trim();
|
|
13288
|
+
if (H) {
|
|
13289
|
+
const Y = H.indexOf(":");
|
|
13283
13290
|
if (Y > 0) {
|
|
13284
|
-
const Z =
|
|
13291
|
+
const Z = H.slice(0, Y).trim(), X = H.slice(Y + 1).trim();
|
|
13285
13292
|
ue.push([Z, X]);
|
|
13286
13293
|
}
|
|
13287
13294
|
}
|
|
@@ -13301,7 +13308,7 @@ function Zm(e = "", t = {}) {
|
|
|
13301
13308
|
}, l(h, E, _) {
|
|
13302
13309
|
const N = { key: _.key };
|
|
13303
13310
|
return h.alert && (N.className = "markdown-alert-" + n(h.alert.toLowerCase(), Vn), h.children.unshift({ attrs: {}, children: [{ type: "27", text: h.alert }], noInnerParse: !0, type: "11", tag: "header" })), c("blockquote", N, E(h.children, _));
|
|
13304
|
-
} }, 1: { t: [" "], o: fr(Qf), i: 1, u: so, l: (h, E, _) => c("br", { key: _.key }) }, 2: { t: ["--", "__", "**", "- ", "* ", "_ "], o: Et(em), i: 1, u: so, l: (h, E, _) => c("hr", { key: _.key }) }, 3: { t: [" "], o: Et($i), i: 0, u: (h) => ({ lang: void 0, text: dt(
|
|
13311
|
+
} }, 1: { t: [" "], o: fr(Qf), i: 1, u: so, l: (h, E, _) => c("br", { key: _.key }) }, 2: { t: ["--", "__", "**", "- ", "* ", "_ "], o: Et(em), i: 1, u: so, l: (h, E, _) => c("hr", { key: _.key }) }, 3: { t: [" "], o: Et($i), i: 0, u: (h) => ({ lang: void 0, text: dt(Hn(h[0].replace(/^ {4}/gm, ""))) }), l: (h, E, _) => c("pre", { key: _.key }, c("code", Yt({}, h.attrs, { className: h.lang ? "lang-" + h.lang : "" }), h.text)) }, 4: { t: ["```", "~~~"], o: Et(Bi), i: 0, u: (h) => ({ attrs: f("code", h[3] || ""), lang: h[2] || void 0, text: h[4], type: "3" }) }, 5: { t: ["`"], o: xt(tm), i: 3, u: (h) => ({ text: dt(h[2]) }), l: (h, E, _) => c("code", { key: _.key }, h.text) }, 6: { t: ["[^"], o: Et(om), i: 0, u: (h) => (u.push({ footnote: h[2], identifier: h[1] }), {}), l: io }, 7: { t: ["[^"], o: Ht(sm), i: 1, u: (h) => ({ target: "#" + n(h[1], Vn), text: h[1] }), l: (h, E, _) => c("a", { key: _.key, href: r(h.target, "a", "href") }, c("sup", { key: _.key }, h.text)) }, 8: { t: ["[ ]", "[x]"], o: Ht(lm), i: 1, u: (h) => ({ completed: h[1].toLowerCase() === "x" }), l: (h, E, _) => c("input", { checked: h.completed, key: _.key, readOnly: !0, type: "checkbox" }) }, 9: { t: ["#"], o: Et(t.enforceAtxHeadings ? ji : Hi), i: 1, u: (h, E, _) => ({ children: Er(E, h[2], _), id: n(h[2], Vn), level: h[1].length }), l: (h, E, _) => c("h" + h.level, { id: h.id, key: _.key }, E(h.children, _)) }, 10: { t: (h) => {
|
|
13305
13312
|
const E = h.indexOf(`
|
|
13306
13313
|
`);
|
|
13307
13314
|
return E > 0 && E < h.length - 1 && (h[E + 1] === "=" || h[E + 1] === "-");
|
|
@@ -13316,10 +13323,10 @@ function Zm(e = "", t = {}) {
|
|
|
13316
13323
|
}, l: (h, E, _) => c(h.tag, Yt({ key: _.key }, h.attrs), h.text || (h.children ? E(h.children, _) : "")) }, 13: { t: ["<"], o: fr(ro), i: 1, u(h) {
|
|
13317
13324
|
const E = h[1].trim();
|
|
13318
13325
|
return { attrs: f(E, h[2] || ""), tag: E };
|
|
13319
|
-
}, l: (h, E, _) => c(h.tag, Yt({}, h.attrs, { key: _.key })) }, 12: { t: ["<!--"], o: fr(Gi), i: 1, u: () => ({}), l: io }, 14: { t: ["!["], o: xt(
|
|
13326
|
+
}, l: (h, E, _) => c(h.tag, Yt({}, h.attrs, { key: _.key })) }, 12: { t: ["<!--"], o: fr(Gi), i: 1, u: () => ({}), l: io }, 14: { t: ["!["], o: xt(Bm), i: 1, u: (h) => ({ alt: dt(h[1]), target: dt(h[2]), title: dt(h[3]) }), l: (h, E, _) => c("img", { key: _.key, alt: h.alt || void 0, title: h.title || void 0, src: r(h.target, "img", "src") }) }, 15: { t: ["["], o: Ht(zm), i: 3, u: (h, E, _) => ({ children: Wm(E, h[1], _), target: dt(h[2]), title: dt(h[3]) }), l: (h, E, _) => c("a", { key: _.key, href: r(h.target, "a", "href"), title: h.title }, E(h.children, _)) }, 16: { t: ["<"], o: Ht(fm), i: 0, u(h) {
|
|
13320
13327
|
let E = h[1], _ = !1;
|
|
13321
13328
|
return E.indexOf("@") !== -1 && E.indexOf("//") === -1 && (_ = !0, E = E.replace("mailto:", "")), { children: [{ text: E, type: "27" }], target: _ ? "mailto:" + E : E, type: "15" };
|
|
13322
|
-
} }, 17: { t: (h, E) => !E.inAnchor && !t.disableAutoLink && (_r(h, "http://") || _r(h, "https://")), o:
|
|
13329
|
+
} }, 17: { t: (h, E) => !E.inAnchor && !t.disableAutoLink && (_r(h, "http://") || _r(h, "https://")), o: Ht(hm), i: 0, u: (h) => ({ children: [{ text: h[1], type: "27" }], target: h[1], title: void 0, type: "15" }) }, 20: qi(c, 1), 33: qi(c, 2), 19: { t: [`
|
|
13323
13330
|
`], o: Et(nm), i: 3, u: so, l: () => `
|
|
13324
13331
|
` }, 21: { o: an(function(h, E) {
|
|
13325
13332
|
if (E.inline || E.simple || E.inHTML && h.indexOf(`
|
|
@@ -13334,9 +13341,9 @@ function Zm(e = "", t = {}) {
|
|
|
13334
13341
|
if (i(s, v) || (_ += v, C === -1 || !v.trim())) break;
|
|
13335
13342
|
N = C + 1;
|
|
13336
13343
|
}
|
|
13337
|
-
const w =
|
|
13344
|
+
const w = Hn(_);
|
|
13338
13345
|
return w === "" ? null : [_, , w];
|
|
13339
|
-
}), i: 3, u: oo, l: (h, E, _) => c("p", { key: _.key }, E(h.children, _)) }, 22: { t: ["["], o:
|
|
13346
|
+
}), i: 3, u: oo, l: (h, E, _) => c("p", { key: _.key }, E(h.children, _)) }, 22: { t: ["["], o: Ht(gm), i: 0, u: (h) => (p[h[1]] = { target: h[2], title: h[4] }, {}), l: io }, 23: { t: ["!["], o: xt(_m), i: 0, u: (h) => ({ alt: h[1] ? dt(h[1]) : void 0, ref: h[2] }), l: (h, E, _) => p[h.ref] ? c("img", { key: _.key, alt: h.alt, src: r(p[h.ref].target, "img", "src"), title: p[h.ref].title }) : null }, 24: { t: (h) => h[0] === "[" && h.indexOf("](") === -1, o: Ht(Em), i: 0, u: (h, E, _) => ({ children: E(h[1], _), fallbackChildren: h[0], ref: h[2] }), l: (h, E, _) => p[h.ref] ? c("a", { key: _.key, href: r(p[h.ref].target, "a", "href"), title: p[h.ref].title }, E(h.children, _)) : c("span", { key: _.key }, h.fallbackChildren) }, 25: { t: ["|"], o: Et(Wi), i: 1, u: jm, l(h, E, _) {
|
|
13340
13347
|
const N = h;
|
|
13341
13348
|
return c("table", { key: _.key }, c("thead", null, c("tr", null, N.header.map(function(w, C) {
|
|
13342
13349
|
return c("th", { key: C, style: Xi(N, C) }, E(w, _));
|
|
@@ -14209,9 +14216,9 @@ function hp({
|
|
|
14209
14216
|
isVoiceAgentActive: ue,
|
|
14210
14217
|
disconnectVoiceAgent: oe,
|
|
14211
14218
|
resetVoiceAgent: I,
|
|
14212
|
-
toggleMute:
|
|
14219
|
+
toggleMute: B,
|
|
14213
14220
|
handleClose: ie,
|
|
14214
|
-
isHistoryEnabled:
|
|
14221
|
+
isHistoryEnabled: H,
|
|
14215
14222
|
isSessionDrawerOpen: Y,
|
|
14216
14223
|
pastSessions: Z,
|
|
14217
14224
|
isLoadingPastSessions: X,
|
|
@@ -14229,7 +14236,7 @@ function hp({
|
|
|
14229
14236
|
z(() => {
|
|
14230
14237
|
w.length || O("auto");
|
|
14231
14238
|
}, [w.length, O]);
|
|
14232
|
-
const
|
|
14239
|
+
const Be = fe(
|
|
14233
14240
|
() => (/* @__PURE__ */ new Date()).toLocaleString("en-US", {
|
|
14234
14241
|
weekday: "long",
|
|
14235
14242
|
hour: "2-digit",
|
|
@@ -14237,7 +14244,7 @@ function hp({
|
|
|
14237
14244
|
hour12: !0
|
|
14238
14245
|
}),
|
|
14239
14246
|
[]
|
|
14240
|
-
), Re =
|
|
14247
|
+
), Re = H && o === "full" && ce === "user" ? /* @__PURE__ */ a(
|
|
14241
14248
|
Sf,
|
|
14242
14249
|
{
|
|
14243
14250
|
sessions: Z,
|
|
@@ -14249,7 +14256,7 @@ function hp({
|
|
|
14249
14256
|
isLoading: X
|
|
14250
14257
|
}
|
|
14251
14258
|
) : void 0;
|
|
14252
|
-
return /* @__PURE__ */ a(
|
|
14259
|
+
return /* @__PURE__ */ a(Bh, { enabled: !!n.resize, children: /* @__PURE__ */ a(
|
|
14253
14260
|
Vl,
|
|
14254
14261
|
{
|
|
14255
14262
|
isOpen: e,
|
|
@@ -14278,9 +14285,9 @@ function hp({
|
|
|
14278
14285
|
activeElicitation: y,
|
|
14279
14286
|
voiceAgentState: re,
|
|
14280
14287
|
chatComposer: A,
|
|
14281
|
-
onOpenSessionDrawer:
|
|
14282
|
-
historyEnabled:
|
|
14283
|
-
sessionDrawer:
|
|
14288
|
+
onOpenSessionDrawer: H ? Ne : void 0,
|
|
14289
|
+
historyEnabled: H,
|
|
14290
|
+
sessionDrawer: H ? /* @__PURE__ */ a(
|
|
14284
14291
|
Cf,
|
|
14285
14292
|
{
|
|
14286
14293
|
isOpen: Y,
|
|
@@ -14324,7 +14331,7 @@ function hp({
|
|
|
14324
14331
|
isMuted: K,
|
|
14325
14332
|
onEndCall: oe,
|
|
14326
14333
|
onClose: I,
|
|
14327
|
-
onToggleMute:
|
|
14334
|
+
onToggleMute: B,
|
|
14328
14335
|
agentName: n.title,
|
|
14329
14336
|
iconUrl: n.iconUrl,
|
|
14330
14337
|
textColor: n.theme?.textColor
|
|
@@ -14350,7 +14357,7 @@ function hp({
|
|
|
14350
14357
|
children: [
|
|
14351
14358
|
_ ? /* @__PURE__ */ a(Nh, {}) : /* @__PURE__ */ a(pe, { children: [
|
|
14352
14359
|
h && /* @__PURE__ */ a("div", { className: "text-xs text-[var(--color-muted-foreground)] text-center mb-2", children: "Just now" }),
|
|
14353
|
-
!h && /* @__PURE__ */ a("div", { className: "text-xs text-[var(--color-muted-foreground)] text-center", children:
|
|
14360
|
+
!h && /* @__PURE__ */ a("div", { className: "text-xs text-[var(--color-muted-foreground)] text-center", children: Be }),
|
|
14354
14361
|
/* @__PURE__ */ a(Le, { fallback: /* @__PURE__ */ a(Th, {}), children: /* @__PURE__ */ a(
|
|
14355
14362
|
cp,
|
|
14356
14363
|
{
|