@eka-care/medassist-widget 0.1.120 → 0.1.121
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 +597 -592
- 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;
|
|
@@ -6,7 +6,7 @@ function ut(e, t) {
|
|
|
6
6
|
function To(e) {
|
|
7
7
|
e && e.parentNode && e.parentNode.removeChild(e);
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function qe(e, t, n) {
|
|
10
10
|
var r, o, s, l = {};
|
|
11
11
|
for (s in t) s == "key" ? r = t[s] : s == "ref" ? o = t[s] : l[s] = t[s];
|
|
12
12
|
if (arguments.length > 2 && (l.children = arguments.length > 3 ? Kn.call(arguments, 2) : n), typeof e == "function" && e.defaultProps != null) for (s in e.defaultProps) l[s] === void 0 && (l[s] = e.defaultProps[s]);
|
|
@@ -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
|
};
|
|
@@ -223,7 +223,7 @@ function nc(e, t, n) {
|
|
|
223
223
|
}
|
|
224
224
|
function jn(e, t, n) {
|
|
225
225
|
var r, o, s, l;
|
|
226
|
-
t == document && (t = document.documentElement), q.__ && q.__(e, t), o = (r = typeof n == "function") ? null : n && n.__k || t.__k, s = [], l = [], No(t, e = (!r && n || t).__k =
|
|
226
|
+
t == document && (t = document.documentElement), q.__ && q.__(e, t), o = (r = typeof n == "function") ? null : n && n.__k || t.__k, s = [], l = [], No(t, e = (!r && n || t).__k = qe(pe, null, [e]), o || yr, yr, t.namespaceURI, !r && n ? [n] : o ? null : t.firstChild ? Kn.call(t.childNodes) : null, s, !r && n ? n : o ? o.__e : t.firstChild, r, l), ca(s, e, l);
|
|
227
227
|
}
|
|
228
228
|
function ha(e, t) {
|
|
229
229
|
jn(e, t, ha);
|
|
@@ -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 = {});
|
|
@@ -500,7 +500,7 @@ function Fo(e, t) {
|
|
|
500
500
|
return s != o.ref && s && (typeof s == "function" ? s(null) : s.current = null), t ? !t(this.props, o) || s != o.ref : mo(this.props, o);
|
|
501
501
|
}
|
|
502
502
|
function r(o) {
|
|
503
|
-
return this.shouldComponentUpdate = n,
|
|
503
|
+
return this.shouldComponentUpdate = n, qe(e, o);
|
|
504
504
|
}
|
|
505
505
|
return r.displayName = "Memo(" + (e.displayName || e.name) + ")", r.__f = r.prototype.isReactComponent = !0, r.type = e, r;
|
|
506
506
|
}
|
|
@@ -521,7 +521,7 @@ function J(e) {
|
|
|
521
521
|
}
|
|
522
522
|
var vs = function(e, t) {
|
|
523
523
|
return e == null ? null : bt(bt(e).map(t));
|
|
524
|
-
},
|
|
524
|
+
}, Je = { map: vs, forEach: vs, count: function(e) {
|
|
525
525
|
return e ? bt(e).length : 0;
|
|
526
526
|
}, only: function(e) {
|
|
527
527
|
var t = bt(e);
|
|
@@ -554,7 +554,7 @@ function Ea(e) {
|
|
|
554
554
|
var t = e.__ && e.__.__c;
|
|
555
555
|
return t && t.__a && t.__a(e);
|
|
556
556
|
}
|
|
557
|
-
function
|
|
557
|
+
function Ke(e) {
|
|
558
558
|
var t, n, r, o = null;
|
|
559
559
|
function s(l) {
|
|
560
560
|
if (t || (t = e()).then(function(i) {
|
|
@@ -563,7 +563,7 @@ function qe(e) {
|
|
|
563
563
|
n = i, r = !0;
|
|
564
564
|
}), n) throw n;
|
|
565
565
|
if (!r) throw t;
|
|
566
|
-
return o ?
|
|
566
|
+
return o ? qe(o, l) : null;
|
|
567
567
|
}
|
|
568
568
|
return s.displayName = "Lazy", s.__f = !0, s;
|
|
569
569
|
}
|
|
@@ -603,8 +603,8 @@ q.unmount = function(e) {
|
|
|
603
603
|
}
|
|
604
604
|
this.__b = null;
|
|
605
605
|
}
|
|
606
|
-
var o = t.__a &&
|
|
607
|
-
return o && (o.__u &= -33), [
|
|
606
|
+
var o = t.__a && qe(pe, null, e.fallback);
|
|
607
|
+
return o && (o.__u &= -33), [qe(pe, null, t.__a ? null : e.children), o];
|
|
608
608
|
};
|
|
609
609
|
var Cs = function(e, t, n) {
|
|
610
610
|
if (++n[1] === n[0] && e.l.delete(t), e.props.revealOrder && (e.props.revealOrder[0] !== "t" || !e.l.size)) for (n = e.i; n; ) {
|
|
@@ -632,10 +632,10 @@ function uc(e) {
|
|
|
632
632
|
this.childNodes.splice(this.childNodes.indexOf(o) >>> 1, 1), t.h.removeChild(o);
|
|
633
633
|
} };
|
|
634
634
|
}
|
|
635
|
-
jn(
|
|
635
|
+
jn(qe(dc, { context: t.context }, e.__v), t.v);
|
|
636
636
|
}
|
|
637
637
|
function ya(e, t) {
|
|
638
|
-
var n =
|
|
638
|
+
var n = qe(uc, { __v: e, h: t });
|
|
639
639
|
return n.containerInfo = t, n;
|
|
640
640
|
}
|
|
641
641
|
(en.prototype = new rt()).__a = function(e) {
|
|
@@ -717,19 +717,19 @@ var va = { ReactCurrentDispatcher: { current: { readContext: function(e) {
|
|
|
717
717
|
return Vo.__n[e.__c].props.value;
|
|
718
718
|
}, useCallback: le, useContext: Ct, useDebugValue: ko, useDeferredValue: Po, useEffect: z, useId: Ao, useImperativeHandle: Ro, useInsertionEffect: Do, useLayoutEffect: wt, useMemo: fe, useReducer: ln, useRef: W, useState: F, useSyncExternalStore: Io, useTransition: Lo } } }, Ec = "18.3.1";
|
|
719
719
|
function wa(e) {
|
|
720
|
-
return
|
|
720
|
+
return qe.bind(null, e);
|
|
721
721
|
}
|
|
722
|
-
function
|
|
722
|
+
function Qe(e) {
|
|
723
723
|
return !!e && e.$$typeof === ba;
|
|
724
724
|
}
|
|
725
725
|
function Ca(e) {
|
|
726
|
-
return
|
|
726
|
+
return Qe(e) && e.type === pe;
|
|
727
727
|
}
|
|
728
728
|
function Ta(e) {
|
|
729
729
|
return !!e && typeof e.displayName == "string" && e.displayName.indexOf("Memo(") == 0;
|
|
730
730
|
}
|
|
731
731
|
function At(e) {
|
|
732
|
-
return
|
|
732
|
+
return Qe(e) ? rc.apply(null, arguments) : e;
|
|
733
733
|
}
|
|
734
734
|
function zo(e) {
|
|
735
735
|
return !!e.__k && (jn(null, e), !0);
|
|
@@ -746,8 +746,8 @@ var xa = function(e, t) {
|
|
|
746
746
|
};
|
|
747
747
|
var r = e(t);
|
|
748
748
|
return q.debounceRendering = n, r;
|
|
749
|
-
}, ka =
|
|
750
|
-
const Aa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, Children:
|
|
749
|
+
}, ka = Qe, zn = { useState: F, useId: Ao, useReducer: ln, useEffect: z, useLayoutEffect: wt, useInsertionEffect: Do, useTransition: Lo, useDeferredValue: Po, useSyncExternalStore: Io, startTransition: Mo, useRef: W, useImperativeHandle: Ro, useMemo: fe, useCallback: le, useContext: Ct, useDebugValue: ko, version: "18.3.1", Children: Je, render: Uo, hydrate: Sa, unmountComponentAtNode: zo, createPortal: ya, createElement: qe, createContext: St, createFactory: wa, cloneElement: At, createRef: sa, Fragment: pe, isValidElement: Qe, isElement: ka, isFragment: Ca, isMemo: Ta, findDOMNode: Na, Component: rt, PureComponent: vr, memo: Fo, forwardRef: J, flushSync: Ra, unstable_batchedUpdates: xa, StrictMode: pe, Suspense: Le, SuspenseList: en, lazy: Ke, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: va };
|
|
750
|
+
const Aa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, Children: Je, Component: rt, Fragment: pe, PureComponent: vr, StrictMode: pe, Suspense: Le, SuspenseList: en, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: va, cloneElement: At, createContext: St, createElement: qe, createFactory: wa, createPortal: ya, createRef: sa, default: zn, findDOMNode: Na, flushSync: Ra, forwardRef: J, hydrate: Sa, isElement: ka, isFragment: Ca, isMemo: Ta, isValidElement: Qe, lazy: Ke, memo: Fo, render: Uo, startTransition: Mo, unmountComponentAtNode: zo, unstable_batchedUpdates: xa, useCallback: le, useContext: Ct, useDebugValue: ko, useDeferredValue: Po, useEffect: z, useErrorBoundary: sc, useId: Ao, useImperativeHandle: Ro, useInsertionEffect: Do, useLayoutEffect: wt, useMemo: fe, useReducer: ln, useRef: W, useState: F, useSyncExternalStore: Io, useTransition: Lo, version: Ec }, Symbol.toStringTag, { value: "Module" }));
|
|
751
751
|
function yc(e) {
|
|
752
752
|
return {
|
|
753
753
|
// eslint-disable-next-line
|
|
@@ -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,15 +782,15 @@ 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) {
|
|
789
789
|
const t = /* @__PURE__ */ Sc(e), n = J((r, o) => {
|
|
790
|
-
const { children: s, ...l } = r, i =
|
|
790
|
+
const { children: s, ...l } = r, i = Je.toArray(s), c = i.find(wc);
|
|
791
791
|
if (c) {
|
|
792
|
-
const d = c.props.children, f = i.map((u) => u === c ?
|
|
793
|
-
return /* @__PURE__ */ a(t, { ...l, ref: o, children:
|
|
792
|
+
const d = c.props.children, f = i.map((u) => u === c ? Je.count(d) > 1 ? Je.only(null) : Qe(d) ? d.props.children : null : u);
|
|
793
|
+
return /* @__PURE__ */ a(t, { ...l, ref: o, children: Qe(d) ? At(d, void 0, f) : null });
|
|
794
794
|
}
|
|
795
795
|
return /* @__PURE__ */ a(t, { ...l, ref: o, children: s });
|
|
796
796
|
});
|
|
@@ -800,17 +800,17 @@ function bc(e) {
|
|
|
800
800
|
function Sc(e) {
|
|
801
801
|
const t = J((n, r) => {
|
|
802
802
|
const { children: o, ...s } = n;
|
|
803
|
-
if (
|
|
803
|
+
if (Qe(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
|
-
return
|
|
807
|
+
return Je.count(o) > 1 ? Je.only(null) : null;
|
|
808
808
|
});
|
|
809
809
|
return t.displayName = `${e}.SlotClone`, t;
|
|
810
810
|
}
|
|
811
811
|
var vc = Symbol("radix.slottable");
|
|
812
812
|
function wc(e) {
|
|
813
|
-
return
|
|
813
|
+
return Qe(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === vc;
|
|
814
814
|
}
|
|
815
815
|
function Cc(e, t) {
|
|
816
816
|
const n = { ...t };
|
|
@@ -857,7 +857,7 @@ function xc(e, t) {
|
|
|
857
857
|
return ln((n, r) => t[n][r] ?? n, e);
|
|
858
858
|
}
|
|
859
859
|
var Jn = (e) => {
|
|
860
|
-
const { present: t, children: n } = e, r = Rc(t), o = typeof n == "function" ? n({ present: r.isPresent }) :
|
|
860
|
+
const { present: t, children: n } = e, r = Rc(t), o = typeof n == "function" ? n({ present: r.isPresent }) : Je.only(n), s = qt(r.ref, kc(o));
|
|
861
861
|
return typeof n == "function" || r.isPresent ? At(o, { ref: s }) : null;
|
|
862
862
|
};
|
|
863
863
|
Jn.displayName = "Presence";
|
|
@@ -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;
|
|
@@ -1677,7 +1677,7 @@ function Wo() {
|
|
|
1677
1677
|
return En.BaseConnection = n, En;
|
|
1678
1678
|
}
|
|
1679
1679
|
var zr = {}, Ps;
|
|
1680
|
-
function
|
|
1680
|
+
function et() {
|
|
1681
1681
|
return Ps || (Ps = 1, (function(e) {
|
|
1682
1682
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.ValidationError = e.ConfigurationError = e.StoreError = e.MessageError = e.SessionError = e.FileError = e.AuthenticationError = e.RecordingError = e.ConnectionError = e.InternalServerError = e.RateLimitError = e.MethodNotAllowedError = e.NotFoundError = e.PermissionDeniedError = e.UnauthorizedError = e.BadRequestError = e.APIConnectionTimeoutError = e.APIUserAbortError = e.APIError = e.SynapseError = e.SynapseErrorCode = void 0, e.normalizeError = w, e.SynapseErrorCode = {
|
|
1683
1683
|
API: "API_ERROR",
|
|
@@ -1893,7 +1893,7 @@ var Ls;
|
|
|
1893
1893
|
function ja() {
|
|
1894
1894
|
if (Ls) return _n;
|
|
1895
1895
|
Ls = 1, Object.defineProperty(_n, "__esModule", { value: !0 }), _n.WebSocketConnection = void 0;
|
|
1896
|
-
const e = /* @__PURE__ */ Wo(), t = /* @__PURE__ */ Qn(), n = /* @__PURE__ */
|
|
1896
|
+
const e = /* @__PURE__ */ Wo(), t = /* @__PURE__ */ Qn(), n = /* @__PURE__ */ et();
|
|
1897
1897
|
class r extends e.BaseConnection {
|
|
1898
1898
|
conversationId;
|
|
1899
1899
|
socket = null;
|
|
@@ -2011,7 +2011,7 @@ var bn = {}, Ds;
|
|
|
2011
2011
|
function Ya() {
|
|
2012
2012
|
if (Ds) return bn;
|
|
2013
2013
|
Ds = 1, Object.defineProperty(bn, "__esModule", { value: !0 }), bn.SSEConnection = void 0;
|
|
2014
|
-
const e = /* @__PURE__ */ Wo(), t = /* @__PURE__ */ Qn(), n = /* @__PURE__ */
|
|
2014
|
+
const e = /* @__PURE__ */ Wo(), t = /* @__PURE__ */ Qn(), n = /* @__PURE__ */ et();
|
|
2015
2015
|
class r extends e.BaseConnection {
|
|
2016
2016
|
conversationId;
|
|
2017
2017
|
config;
|
|
@@ -2180,7 +2180,7 @@ var Fs;
|
|
|
2180
2180
|
function Ga() {
|
|
2181
2181
|
return Fs || (Fs = 1, (function(e) {
|
|
2182
2182
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.ConnectionFactory = e.ConnectionType = void 0;
|
|
2183
|
-
const t = /* @__PURE__ */ ja(), n = /* @__PURE__ */ Ya(), r = /* @__PURE__ */
|
|
2183
|
+
const t = /* @__PURE__ */ ja(), n = /* @__PURE__ */ Ya(), r = /* @__PURE__ */ et();
|
|
2184
2184
|
e.ConnectionType = {
|
|
2185
2185
|
SOCKET: "socket",
|
|
2186
2186
|
HTTP_STREAM: "http_stream"
|
|
@@ -2226,7 +2226,7 @@ var vn = {}, wn = {}, Vs;
|
|
|
2226
2226
|
function qo() {
|
|
2227
2227
|
if (Vs) return wn;
|
|
2228
2228
|
Vs = 1, Object.defineProperty(wn, "__esModule", { value: !0 }), wn.HttpClient = void 0;
|
|
2229
|
-
const e = /* @__PURE__ */
|
|
2229
|
+
const e = /* @__PURE__ */ et();
|
|
2230
2230
|
let t = class {
|
|
2231
2231
|
baseUrl;
|
|
2232
2232
|
headers;
|
|
@@ -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,13 +2513,13 @@ 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() {
|
|
2520
2520
|
if (Ys) return Rn;
|
|
2521
2521
|
Ys = 1, Object.defineProperty(Rn, "__esModule", { value: !0 }), Rn.TokenManager = void 0;
|
|
2522
|
-
const e = /* @__PURE__ */
|
|
2522
|
+
const e = /* @__PURE__ */ et(), t = /* @__PURE__ */ Ka();
|
|
2523
2523
|
let n = class {
|
|
2524
2524
|
auth;
|
|
2525
2525
|
httpClient;
|
|
@@ -2683,7 +2683,7 @@ var Ws;
|
|
|
2683
2683
|
function Za() {
|
|
2684
2684
|
if (Ws) return vn;
|
|
2685
2685
|
Ws = 1, Object.defineProperty(vn, "__esModule", { value: !0 }), vn.ResourceManager = void 0;
|
|
2686
|
-
const e = /* @__PURE__ */ qo(), t = /* @__PURE__ */ qa(), n = /* @__PURE__ */
|
|
2686
|
+
const e = /* @__PURE__ */ qo(), t = /* @__PURE__ */ qa(), n = /* @__PURE__ */ et(), r = /* @__PURE__ */ Kc(), o = /* @__PURE__ */ Ko(), s = /* @__PURE__ */ Zc(), l = /* @__PURE__ */ Xc();
|
|
2687
2687
|
class i {
|
|
2688
2688
|
resourceConfig;
|
|
2689
2689
|
httpClient;
|
|
@@ -2912,11 +2912,11 @@ 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;
|
|
2919
|
-
const t = /* @__PURE__ */
|
|
2919
|
+
const t = /* @__PURE__ */ et();
|
|
2920
2920
|
e.MAX_FILE_SIZE = 3 * 1024 * 1024;
|
|
2921
2921
|
class n {
|
|
2922
2922
|
pendingFiles = [];
|
|
@@ -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() {
|
|
@@ -3102,7 +3102,7 @@ var On = {}, Xs;
|
|
|
3102
3102
|
function Qc() {
|
|
3103
3103
|
if (Xs) return On;
|
|
3104
3104
|
Xs = 1, Object.defineProperty(On, "__esModule", { value: !0 }), On.AudioManager = void 0;
|
|
3105
|
-
const e = /* @__PURE__ */
|
|
3105
|
+
const e = /* @__PURE__ */ et();
|
|
3106
3106
|
class t {
|
|
3107
3107
|
mediaRecorder = null;
|
|
3108
3108
|
mediaStream = null;
|
|
@@ -3317,7 +3317,7 @@ var Js;
|
|
|
3317
3317
|
function Xa() {
|
|
3318
3318
|
if (Js) return An;
|
|
3319
3319
|
Js = 1, Object.defineProperty(An, "__esModule", { value: !0 }), An.MessageManager = void 0;
|
|
3320
|
-
const e = /* @__PURE__ */ Zo(), t = /* @__PURE__ */ Jc(), n = /* @__PURE__ */ Tr(), r = /* @__PURE__ */ Qc(), o = /* @__PURE__ */
|
|
3320
|
+
const e = /* @__PURE__ */ Zo(), t = /* @__PURE__ */ Jc(), n = /* @__PURE__ */ Tr(), r = /* @__PURE__ */ Qc(), o = /* @__PURE__ */ et();
|
|
3321
3321
|
let s = class {
|
|
3322
3322
|
connection = null;
|
|
3323
3323
|
callbacks = null;
|
|
@@ -3828,7 +3828,7 @@ var ri;
|
|
|
3828
3828
|
function nd() {
|
|
3829
3829
|
if (ri) return In;
|
|
3830
3830
|
ri = 1, Object.defineProperty(In, "__esModule", { value: !0 }), In.VoiceAgent = void 0;
|
|
3831
|
-
const e = /* @__PURE__ */ Go(), t = /* @__PURE__ */ td(), n = /* @__PURE__ */
|
|
3831
|
+
const e = /* @__PURE__ */ Go(), t = /* @__PURE__ */ td(), n = /* @__PURE__ */ et(), r = /* @__PURE__ */ Qa(), o = 3e3, s = 8, l = 3600 * 1e3, i = 600;
|
|
3832
3832
|
function c(f, u) {
|
|
3833
3833
|
return new Promise((p) => {
|
|
3834
3834
|
if (f.iceGatheringState === "complete") {
|
|
@@ -4015,7 +4015,7 @@ var oi;
|
|
|
4015
4015
|
function rd() {
|
|
4016
4016
|
if (oi) return gn;
|
|
4017
4017
|
oi = 1, Object.defineProperty(gn, "__esModule", { value: !0 }), gn.SynapseSDK = void 0;
|
|
4018
|
-
const e = /* @__PURE__ */ Ga(), t = /* @__PURE__ */ Qn(), n = /* @__PURE__ */ Wa(), r = /* @__PURE__ */ Za(), o = /* @__PURE__ */ Xa(), s = /* @__PURE__ */ Tr(), l = /* @__PURE__ */ Go(), i = /* @__PURE__ */
|
|
4018
|
+
const e = /* @__PURE__ */ Ga(), t = /* @__PURE__ */ Qn(), n = /* @__PURE__ */ Wa(), r = /* @__PURE__ */ Za(), o = /* @__PURE__ */ Xa(), s = /* @__PURE__ */ Tr(), l = /* @__PURE__ */ Go(), i = /* @__PURE__ */ et(), c = /* @__PURE__ */ Ja(), d = /* @__PURE__ */ ed(), f = /* @__PURE__ */ Zo(), u = /* @__PURE__ */ nd();
|
|
4019
4019
|
class p {
|
|
4020
4020
|
connection = null;
|
|
4021
4021
|
messageManager;
|
|
@@ -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", {
|
|
@@ -4812,34 +4819,34 @@ function ad() {
|
|
|
4812
4819
|
};
|
|
4813
4820
|
return Ln.ToolCall = t, Ln;
|
|
4814
4821
|
}
|
|
4815
|
-
var
|
|
4822
|
+
var He = {}, ci;
|
|
4816
4823
|
function ld() {
|
|
4817
|
-
if (ci) return
|
|
4818
|
-
ci = 1, Object.defineProperty(
|
|
4824
|
+
if (ci) return He;
|
|
4825
|
+
ci = 1, Object.defineProperty(He, "__esModule", { value: !0 }), He.SYNAPSE_EICITATION_STATUS = He.SYNAPSE_CTA_ACTIONS = He.SYNAPSE_TOOL_FORMATS = He.SYNAPSE_TOOL_CALLBACK_NAME = He.SYNAPSE_COMPONENTS = He.SYNAPSE_TOOL_NAME = void 0;
|
|
4819
4826
|
var e;
|
|
4820
4827
|
(function(l) {
|
|
4821
4828
|
l.MOBILE_VERIFICATION = "mobile_verification", l.AVAILABILITY_DATES = "availability_dates", l.AVAILABILITY_SLOTS = "availability_slots", l.DOCTOR_AVAILABILITY = "doctor_availability", l.DOCTOR_DETAILS = "doctor_details", l.GET_LOCATION = "get_location";
|
|
4822
|
-
})(e || (
|
|
4829
|
+
})(e || (He.SYNAPSE_TOOL_NAME = e = {}));
|
|
4823
4830
|
var t;
|
|
4824
4831
|
(function(l) {
|
|
4825
4832
|
l.MOBILE = "mobile_number", l.OTP = "otp", l.EMAIL = "email_address", l.PILL = "pills", l.MULTI = "multi", l.DOCTOR_CARD = "doctor_card", l.CARD = "card", l.MEDIA_CARD = "media_card";
|
|
4826
|
-
})(t || (
|
|
4833
|
+
})(t || (He.SYNAPSE_COMPONENTS = t = {}));
|
|
4827
4834
|
var n;
|
|
4828
4835
|
(function(l) {
|
|
4829
4836
|
l.DOCTOR_AVAILABILITY = "get_doctor_availability", l.AVAILABILITY_DATES = "get_available_dates", l.AVAILABILITY_SLOTS = "get_available_slots", l.MOBILE_VERIFICATION = "verify_mobile_number", l.DOCTOR_DETAILS = "get_doctor_details";
|
|
4830
|
-
})(n || (
|
|
4837
|
+
})(n || (He.SYNAPSE_TOOL_CALLBACK_NAME = n = {}));
|
|
4831
4838
|
var r;
|
|
4832
4839
|
(function(l) {
|
|
4833
4840
|
l.DEFAULT = "default", l.CUSTOM = "custom";
|
|
4834
|
-
})(r || (
|
|
4841
|
+
})(r || (He.SYNAPSE_TOOL_FORMATS = r = {}));
|
|
4835
4842
|
var o;
|
|
4836
4843
|
(function(l) {
|
|
4837
4844
|
l.TOOL_CALL = "tool_call", l.PROMPT = "prompt";
|
|
4838
|
-
})(o || (
|
|
4845
|
+
})(o || (He.SYNAPSE_CTA_ACTIONS = o = {}));
|
|
4839
4846
|
var s;
|
|
4840
4847
|
return (function(l) {
|
|
4841
4848
|
l.PROGRESS = "progress", l.SUCCESS = "success", l.FAILURE = "failure";
|
|
4842
|
-
})(s || (
|
|
4849
|
+
})(s || (He.SYNAPSE_EICITATION_STATUS = s = {})), He;
|
|
4843
4850
|
}
|
|
4844
4851
|
var Wr = {}, di;
|
|
4845
4852
|
function cd() {
|
|
@@ -4849,7 +4856,7 @@ var Dn = {}, ui;
|
|
|
4849
4856
|
function dd() {
|
|
4850
4857
|
if (ui) return Dn;
|
|
4851
4858
|
ui = 1, Object.defineProperty(Dn, "__esModule", { value: !0 }), Dn.ErrorUtils = void 0;
|
|
4852
|
-
const e = /* @__PURE__ */
|
|
4859
|
+
const e = /* @__PURE__ */ et();
|
|
4853
4860
|
class t {
|
|
4854
4861
|
/**
|
|
4855
4862
|
* Check if an error is a specific API error type
|
|
@@ -5021,7 +5028,7 @@ function md() {
|
|
|
5021
5028
|
Object.defineProperty(e, "HttpClient", { enumerable: !0, get: function() {
|
|
5022
5029
|
return m.HttpClient;
|
|
5023
5030
|
} });
|
|
5024
|
-
var g = /* @__PURE__ */
|
|
5031
|
+
var g = /* @__PURE__ */ et();
|
|
5025
5032
|
Object.defineProperty(e, "SynapseError", { enumerable: !0, get: function() {
|
|
5026
5033
|
return g.SynapseError;
|
|
5027
5034
|
} }), Object.defineProperty(e, "APIError", { enumerable: !0, get: function() {
|
|
@@ -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()],
|
|
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()], M = () => [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
|
-
}],
|
|
5399
|
+
}], G = () => [Kr, Un, Bt], Z = () => [
|
|
5393
5400
|
// Deprecated since Tailwind CSS v4.0.0
|
|
5394
5401
|
"",
|
|
5395
5402
|
"none",
|
|
@@ -5397,14 +5404,14 @@ const pd = (e, t) => {
|
|
|
5397
5404
|
d,
|
|
5398
5405
|
V,
|
|
5399
5406
|
U
|
|
5400
|
-
], X = () => ["", te, Un,
|
|
5407
|
+
], X = () => ["", te, Un, Bt], Te = () => ["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], Be = () => [
|
|
5401
5408
|
// Deprecated since Tailwind CSS v4.0.0
|
|
5402
5409
|
"",
|
|
5403
5410
|
"none",
|
|
5404
5411
|
m,
|
|
5405
5412
|
V,
|
|
5406
5413
|
U
|
|
5407
|
-
],
|
|
5414
|
+
], Ye = () => ["none", te, V, U], D = () => ["none", te, V, U], ye = () => [te, V, U], he = () => [Jt, "full", ...T()];
|
|
5408
5415
|
return {
|
|
5409
5416
|
cacheSize: 500,
|
|
5410
5417
|
theme: {
|
|
@@ -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
|
|
@@ -6219,14 +6226,14 @@ const pd = (e, t) => {
|
|
|
6219
6226
|
* @see https://v3.tailwindcss.com/docs/placeholder-color
|
|
6220
6227
|
*/
|
|
6221
6228
|
"placeholder-color": [{
|
|
6222
|
-
placeholder:
|
|
6229
|
+
placeholder: M()
|
|
6223
6230
|
}],
|
|
6224
6231
|
/**
|
|
6225
6232
|
* Text Color
|
|
6226
6233
|
* @see https://tailwindcss.com/docs/text-color
|
|
6227
6234
|
*/
|
|
6228
6235
|
"text-color": [{
|
|
6229
|
-
text:
|
|
6236
|
+
text: M()
|
|
6230
6237
|
}],
|
|
6231
6238
|
/**
|
|
6232
6239
|
* Text Decoration
|
|
@@ -6238,21 +6245,21 @@ const pd = (e, t) => {
|
|
|
6238
6245
|
* @see https://tailwindcss.com/docs/text-decoration-style
|
|
6239
6246
|
*/
|
|
6240
6247
|
"text-decoration-style": [{
|
|
6241
|
-
decoration: [...
|
|
6248
|
+
decoration: [...Te(), "wavy"]
|
|
6242
6249
|
}],
|
|
6243
6250
|
/**
|
|
6244
6251
|
* Text Decoration Thickness
|
|
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
|
|
6252
6259
|
* @see https://tailwindcss.com/docs/text-decoration-color
|
|
6253
6260
|
*/
|
|
6254
6261
|
"text-decoration-color": [{
|
|
6255
|
-
decoration:
|
|
6262
|
+
decoration: M()
|
|
6256
6263
|
}],
|
|
6257
6264
|
/**
|
|
6258
6265
|
* Text Underline Offset
|
|
@@ -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
|
|
@@ -6390,49 +6397,49 @@ const pd = (e, t) => {
|
|
|
6390
6397
|
* @see https://tailwindcss.com/docs/background-color
|
|
6391
6398
|
*/
|
|
6392
6399
|
"bg-color": [{
|
|
6393
|
-
bg:
|
|
6400
|
+
bg: M()
|
|
6394
6401
|
}],
|
|
6395
6402
|
/**
|
|
6396
6403
|
* Gradient Color Stops From Position
|
|
6397
6404
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
6398
6405
|
*/
|
|
6399
6406
|
"gradient-from-pos": [{
|
|
6400
|
-
from:
|
|
6407
|
+
from: G()
|
|
6401
6408
|
}],
|
|
6402
6409
|
/**
|
|
6403
6410
|
* Gradient Color Stops Via Position
|
|
6404
6411
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
6405
6412
|
*/
|
|
6406
6413
|
"gradient-via-pos": [{
|
|
6407
|
-
via:
|
|
6414
|
+
via: G()
|
|
6408
6415
|
}],
|
|
6409
6416
|
/**
|
|
6410
6417
|
* Gradient Color Stops To Position
|
|
6411
6418
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
6412
6419
|
*/
|
|
6413
6420
|
"gradient-to-pos": [{
|
|
6414
|
-
to:
|
|
6421
|
+
to: G()
|
|
6415
6422
|
}],
|
|
6416
6423
|
/**
|
|
6417
6424
|
* Gradient Color Stops From
|
|
6418
6425
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
6419
6426
|
*/
|
|
6420
6427
|
"gradient-from": [{
|
|
6421
|
-
from:
|
|
6428
|
+
from: M()
|
|
6422
6429
|
}],
|
|
6423
6430
|
/**
|
|
6424
6431
|
* Gradient Color Stops Via
|
|
6425
6432
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
6426
6433
|
*/
|
|
6427
6434
|
"gradient-via": [{
|
|
6428
|
-
via:
|
|
6435
|
+
via: M()
|
|
6429
6436
|
}],
|
|
6430
6437
|
/**
|
|
6431
6438
|
* Gradient Color Stops To
|
|
6432
6439
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
6433
6440
|
*/
|
|
6434
6441
|
"gradient-to": [{
|
|
6435
|
-
to:
|
|
6442
|
+
to: M()
|
|
6436
6443
|
}],
|
|
6437
6444
|
// ---------------
|
|
6438
6445
|
// --- Borders ---
|
|
@@ -6634,91 +6641,91 @@ const pd = (e, t) => {
|
|
|
6634
6641
|
* @see https://tailwindcss.com/docs/border-style
|
|
6635
6642
|
*/
|
|
6636
6643
|
"border-style": [{
|
|
6637
|
-
border: [...
|
|
6644
|
+
border: [...Te(), "hidden", "none"]
|
|
6638
6645
|
}],
|
|
6639
6646
|
/**
|
|
6640
6647
|
* Divide Style
|
|
6641
6648
|
* @see https://tailwindcss.com/docs/border-style#setting-the-divider-style
|
|
6642
6649
|
*/
|
|
6643
6650
|
"divide-style": [{
|
|
6644
|
-
divide: [...
|
|
6651
|
+
divide: [...Te(), "hidden", "none"]
|
|
6645
6652
|
}],
|
|
6646
6653
|
/**
|
|
6647
6654
|
* Border Color
|
|
6648
6655
|
* @see https://tailwindcss.com/docs/border-color
|
|
6649
6656
|
*/
|
|
6650
6657
|
"border-color": [{
|
|
6651
|
-
border:
|
|
6658
|
+
border: M()
|
|
6652
6659
|
}],
|
|
6653
6660
|
/**
|
|
6654
6661
|
* Border Color X
|
|
6655
6662
|
* @see https://tailwindcss.com/docs/border-color
|
|
6656
6663
|
*/
|
|
6657
6664
|
"border-color-x": [{
|
|
6658
|
-
"border-x":
|
|
6665
|
+
"border-x": M()
|
|
6659
6666
|
}],
|
|
6660
6667
|
/**
|
|
6661
6668
|
* Border Color Y
|
|
6662
6669
|
* @see https://tailwindcss.com/docs/border-color
|
|
6663
6670
|
*/
|
|
6664
6671
|
"border-color-y": [{
|
|
6665
|
-
"border-y":
|
|
6672
|
+
"border-y": M()
|
|
6666
6673
|
}],
|
|
6667
6674
|
/**
|
|
6668
6675
|
* Border Color S
|
|
6669
6676
|
* @see https://tailwindcss.com/docs/border-color
|
|
6670
6677
|
*/
|
|
6671
6678
|
"border-color-s": [{
|
|
6672
|
-
"border-s":
|
|
6679
|
+
"border-s": M()
|
|
6673
6680
|
}],
|
|
6674
6681
|
/**
|
|
6675
6682
|
* Border Color E
|
|
6676
6683
|
* @see https://tailwindcss.com/docs/border-color
|
|
6677
6684
|
*/
|
|
6678
6685
|
"border-color-e": [{
|
|
6679
|
-
"border-e":
|
|
6686
|
+
"border-e": M()
|
|
6680
6687
|
}],
|
|
6681
6688
|
/**
|
|
6682
6689
|
* Border Color Top
|
|
6683
6690
|
* @see https://tailwindcss.com/docs/border-color
|
|
6684
6691
|
*/
|
|
6685
6692
|
"border-color-t": [{
|
|
6686
|
-
"border-t":
|
|
6693
|
+
"border-t": M()
|
|
6687
6694
|
}],
|
|
6688
6695
|
/**
|
|
6689
6696
|
* Border Color Right
|
|
6690
6697
|
* @see https://tailwindcss.com/docs/border-color
|
|
6691
6698
|
*/
|
|
6692
6699
|
"border-color-r": [{
|
|
6693
|
-
"border-r":
|
|
6700
|
+
"border-r": M()
|
|
6694
6701
|
}],
|
|
6695
6702
|
/**
|
|
6696
6703
|
* Border Color Bottom
|
|
6697
6704
|
* @see https://tailwindcss.com/docs/border-color
|
|
6698
6705
|
*/
|
|
6699
6706
|
"border-color-b": [{
|
|
6700
|
-
"border-b":
|
|
6707
|
+
"border-b": M()
|
|
6701
6708
|
}],
|
|
6702
6709
|
/**
|
|
6703
6710
|
* Border Color Left
|
|
6704
6711
|
* @see https://tailwindcss.com/docs/border-color
|
|
6705
6712
|
*/
|
|
6706
6713
|
"border-color-l": [{
|
|
6707
|
-
"border-l":
|
|
6714
|
+
"border-l": M()
|
|
6708
6715
|
}],
|
|
6709
6716
|
/**
|
|
6710
6717
|
* Divide Color
|
|
6711
6718
|
* @see https://tailwindcss.com/docs/divide-color
|
|
6712
6719
|
*/
|
|
6713
6720
|
"divide-color": [{
|
|
6714
|
-
divide:
|
|
6721
|
+
divide: M()
|
|
6715
6722
|
}],
|
|
6716
6723
|
/**
|
|
6717
6724
|
* Outline Style
|
|
6718
6725
|
* @see https://tailwindcss.com/docs/outline-style
|
|
6719
6726
|
*/
|
|
6720
6727
|
"outline-style": [{
|
|
6721
|
-
outline: [...
|
|
6728
|
+
outline: [...Te(), "none", "hidden"]
|
|
6722
6729
|
}],
|
|
6723
6730
|
/**
|
|
6724
6731
|
* Outline Offset
|
|
@@ -6732,14 +6739,14 @@ 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
|
|
6739
6746
|
* @see https://tailwindcss.com/docs/outline-color
|
|
6740
6747
|
*/
|
|
6741
6748
|
"outline-color": [{
|
|
6742
|
-
outline:
|
|
6749
|
+
outline: M()
|
|
6743
6750
|
}],
|
|
6744
6751
|
// ---------------
|
|
6745
6752
|
// --- Effects ---
|
|
@@ -6763,7 +6770,7 @@ const pd = (e, t) => {
|
|
|
6763
6770
|
* @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color
|
|
6764
6771
|
*/
|
|
6765
6772
|
"shadow-color": [{
|
|
6766
|
-
shadow:
|
|
6773
|
+
shadow: M()
|
|
6767
6774
|
}],
|
|
6768
6775
|
/**
|
|
6769
6776
|
* Inset Box Shadow
|
|
@@ -6777,7 +6784,7 @@ const pd = (e, t) => {
|
|
|
6777
6784
|
* @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color
|
|
6778
6785
|
*/
|
|
6779
6786
|
"inset-shadow-color": [{
|
|
6780
|
-
"inset-shadow":
|
|
6787
|
+
"inset-shadow": M()
|
|
6781
6788
|
}],
|
|
6782
6789
|
/**
|
|
6783
6790
|
* Ring Width
|
|
@@ -6798,7 +6805,7 @@ const pd = (e, t) => {
|
|
|
6798
6805
|
* @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color
|
|
6799
6806
|
*/
|
|
6800
6807
|
"ring-color": [{
|
|
6801
|
-
ring:
|
|
6808
|
+
ring: M()
|
|
6802
6809
|
}],
|
|
6803
6810
|
/**
|
|
6804
6811
|
* Ring Offset Width
|
|
@@ -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
|
|
@@ -6816,7 +6823,7 @@ const pd = (e, t) => {
|
|
|
6816
6823
|
* @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
|
|
6817
6824
|
*/
|
|
6818
6825
|
"ring-offset-color": [{
|
|
6819
|
-
"ring-offset":
|
|
6826
|
+
"ring-offset": M()
|
|
6820
6827
|
}],
|
|
6821
6828
|
/**
|
|
6822
6829
|
* Inset Ring Width
|
|
@@ -6830,7 +6837,7 @@ const pd = (e, t) => {
|
|
|
6830
6837
|
* @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color
|
|
6831
6838
|
*/
|
|
6832
6839
|
"inset-ring-color": [{
|
|
6833
|
-
"inset-ring":
|
|
6840
|
+
"inset-ring": M()
|
|
6834
6841
|
}],
|
|
6835
6842
|
/**
|
|
6836
6843
|
* Text Shadow
|
|
@@ -6844,7 +6851,7 @@ const pd = (e, t) => {
|
|
|
6844
6851
|
* @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color
|
|
6845
6852
|
*/
|
|
6846
6853
|
"text-shadow-color": [{
|
|
6847
|
-
"text-shadow":
|
|
6854
|
+
"text-shadow": M()
|
|
6848
6855
|
}],
|
|
6849
6856
|
/**
|
|
6850
6857
|
* Opacity
|
|
@@ -6895,10 +6902,10 @@ const pd = (e, t) => {
|
|
|
6895
6902
|
"mask-linear-to": ce()
|
|
6896
6903
|
}],
|
|
6897
6904
|
"mask-image-linear-from-color": [{
|
|
6898
|
-
"mask-linear-from":
|
|
6905
|
+
"mask-linear-from": M()
|
|
6899
6906
|
}],
|
|
6900
6907
|
"mask-image-linear-to-color": [{
|
|
6901
|
-
"mask-linear-to":
|
|
6908
|
+
"mask-linear-to": M()
|
|
6902
6909
|
}],
|
|
6903
6910
|
"mask-image-t-from-pos": [{
|
|
6904
6911
|
"mask-t-from": ce()
|
|
@@ -6907,10 +6914,10 @@ const pd = (e, t) => {
|
|
|
6907
6914
|
"mask-t-to": ce()
|
|
6908
6915
|
}],
|
|
6909
6916
|
"mask-image-t-from-color": [{
|
|
6910
|
-
"mask-t-from":
|
|
6917
|
+
"mask-t-from": M()
|
|
6911
6918
|
}],
|
|
6912
6919
|
"mask-image-t-to-color": [{
|
|
6913
|
-
"mask-t-to":
|
|
6920
|
+
"mask-t-to": M()
|
|
6914
6921
|
}],
|
|
6915
6922
|
"mask-image-r-from-pos": [{
|
|
6916
6923
|
"mask-r-from": ce()
|
|
@@ -6919,10 +6926,10 @@ const pd = (e, t) => {
|
|
|
6919
6926
|
"mask-r-to": ce()
|
|
6920
6927
|
}],
|
|
6921
6928
|
"mask-image-r-from-color": [{
|
|
6922
|
-
"mask-r-from":
|
|
6929
|
+
"mask-r-from": M()
|
|
6923
6930
|
}],
|
|
6924
6931
|
"mask-image-r-to-color": [{
|
|
6925
|
-
"mask-r-to":
|
|
6932
|
+
"mask-r-to": M()
|
|
6926
6933
|
}],
|
|
6927
6934
|
"mask-image-b-from-pos": [{
|
|
6928
6935
|
"mask-b-from": ce()
|
|
@@ -6931,10 +6938,10 @@ const pd = (e, t) => {
|
|
|
6931
6938
|
"mask-b-to": ce()
|
|
6932
6939
|
}],
|
|
6933
6940
|
"mask-image-b-from-color": [{
|
|
6934
|
-
"mask-b-from":
|
|
6941
|
+
"mask-b-from": M()
|
|
6935
6942
|
}],
|
|
6936
6943
|
"mask-image-b-to-color": [{
|
|
6937
|
-
"mask-b-to":
|
|
6944
|
+
"mask-b-to": M()
|
|
6938
6945
|
}],
|
|
6939
6946
|
"mask-image-l-from-pos": [{
|
|
6940
6947
|
"mask-l-from": ce()
|
|
@@ -6943,10 +6950,10 @@ const pd = (e, t) => {
|
|
|
6943
6950
|
"mask-l-to": ce()
|
|
6944
6951
|
}],
|
|
6945
6952
|
"mask-image-l-from-color": [{
|
|
6946
|
-
"mask-l-from":
|
|
6953
|
+
"mask-l-from": M()
|
|
6947
6954
|
}],
|
|
6948
6955
|
"mask-image-l-to-color": [{
|
|
6949
|
-
"mask-l-to":
|
|
6956
|
+
"mask-l-to": M()
|
|
6950
6957
|
}],
|
|
6951
6958
|
"mask-image-x-from-pos": [{
|
|
6952
6959
|
"mask-x-from": ce()
|
|
@@ -6955,10 +6962,10 @@ const pd = (e, t) => {
|
|
|
6955
6962
|
"mask-x-to": ce()
|
|
6956
6963
|
}],
|
|
6957
6964
|
"mask-image-x-from-color": [{
|
|
6958
|
-
"mask-x-from":
|
|
6965
|
+
"mask-x-from": M()
|
|
6959
6966
|
}],
|
|
6960
6967
|
"mask-image-x-to-color": [{
|
|
6961
|
-
"mask-x-to":
|
|
6968
|
+
"mask-x-to": M()
|
|
6962
6969
|
}],
|
|
6963
6970
|
"mask-image-y-from-pos": [{
|
|
6964
6971
|
"mask-y-from": ce()
|
|
@@ -6967,10 +6974,10 @@ const pd = (e, t) => {
|
|
|
6967
6974
|
"mask-y-to": ce()
|
|
6968
6975
|
}],
|
|
6969
6976
|
"mask-image-y-from-color": [{
|
|
6970
|
-
"mask-y-from":
|
|
6977
|
+
"mask-y-from": M()
|
|
6971
6978
|
}],
|
|
6972
6979
|
"mask-image-y-to-color": [{
|
|
6973
|
-
"mask-y-to":
|
|
6980
|
+
"mask-y-to": M()
|
|
6974
6981
|
}],
|
|
6975
6982
|
"mask-image-radial": [{
|
|
6976
6983
|
"mask-radial": [V, U]
|
|
@@ -6982,10 +6989,10 @@ const pd = (e, t) => {
|
|
|
6982
6989
|
"mask-radial-to": ce()
|
|
6983
6990
|
}],
|
|
6984
6991
|
"mask-image-radial-from-color": [{
|
|
6985
|
-
"mask-radial-from":
|
|
6992
|
+
"mask-radial-from": M()
|
|
6986
6993
|
}],
|
|
6987
6994
|
"mask-image-radial-to-color": [{
|
|
6988
|
-
"mask-radial-to":
|
|
6995
|
+
"mask-radial-to": M()
|
|
6989
6996
|
}],
|
|
6990
6997
|
"mask-image-radial-shape": [{
|
|
6991
6998
|
"mask-radial": ["circle", "ellipse"]
|
|
@@ -7009,10 +7016,10 @@ const pd = (e, t) => {
|
|
|
7009
7016
|
"mask-conic-to": ce()
|
|
7010
7017
|
}],
|
|
7011
7018
|
"mask-image-conic-from-color": [{
|
|
7012
|
-
"mask-conic-from":
|
|
7019
|
+
"mask-conic-from": M()
|
|
7013
7020
|
}],
|
|
7014
7021
|
"mask-image-conic-to-color": [{
|
|
7015
|
-
"mask-conic-to":
|
|
7022
|
+
"mask-conic-to": M()
|
|
7016
7023
|
}],
|
|
7017
7024
|
/**
|
|
7018
7025
|
* Mask Mode
|
|
@@ -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
|
|
@@ -7084,7 +7091,7 @@ const pd = (e, t) => {
|
|
|
7084
7091
|
* @see https://tailwindcss.com/docs/blur
|
|
7085
7092
|
*/
|
|
7086
7093
|
blur: [{
|
|
7087
|
-
blur:
|
|
7094
|
+
blur: Be()
|
|
7088
7095
|
}],
|
|
7089
7096
|
/**
|
|
7090
7097
|
* Brightness
|
|
@@ -7119,7 +7126,7 @@ const pd = (e, t) => {
|
|
|
7119
7126
|
* @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color
|
|
7120
7127
|
*/
|
|
7121
7128
|
"drop-shadow-color": [{
|
|
7122
|
-
"drop-shadow":
|
|
7129
|
+
"drop-shadow": M()
|
|
7123
7130
|
}],
|
|
7124
7131
|
/**
|
|
7125
7132
|
* Grayscale
|
|
@@ -7174,7 +7181,7 @@ const pd = (e, t) => {
|
|
|
7174
7181
|
* @see https://tailwindcss.com/docs/backdrop-blur
|
|
7175
7182
|
*/
|
|
7176
7183
|
"backdrop-blur": [{
|
|
7177
|
-
"backdrop-blur":
|
|
7184
|
+
"backdrop-blur": Be()
|
|
7178
7185
|
}],
|
|
7179
7186
|
/**
|
|
7180
7187
|
* Backdrop Brightness
|
|
@@ -7351,28 +7358,28 @@ const pd = (e, t) => {
|
|
|
7351
7358
|
* @see https://tailwindcss.com/docs/rotate
|
|
7352
7359
|
*/
|
|
7353
7360
|
rotate: [{
|
|
7354
|
-
rotate:
|
|
7361
|
+
rotate: Ye()
|
|
7355
7362
|
}],
|
|
7356
7363
|
/**
|
|
7357
7364
|
* Rotate X
|
|
7358
7365
|
* @see https://tailwindcss.com/docs/rotate
|
|
7359
7366
|
*/
|
|
7360
7367
|
"rotate-x": [{
|
|
7361
|
-
"rotate-x":
|
|
7368
|
+
"rotate-x": Ye()
|
|
7362
7369
|
}],
|
|
7363
7370
|
/**
|
|
7364
7371
|
* Rotate Y
|
|
7365
7372
|
* @see https://tailwindcss.com/docs/rotate
|
|
7366
7373
|
*/
|
|
7367
7374
|
"rotate-y": [{
|
|
7368
|
-
"rotate-y":
|
|
7375
|
+
"rotate-y": Ye()
|
|
7369
7376
|
}],
|
|
7370
7377
|
/**
|
|
7371
7378
|
* Rotate Z
|
|
7372
7379
|
* @see https://tailwindcss.com/docs/rotate
|
|
7373
7380
|
*/
|
|
7374
7381
|
"rotate-z": [{
|
|
7375
|
-
"rotate-z":
|
|
7382
|
+
"rotate-z": Ye()
|
|
7376
7383
|
}],
|
|
7377
7384
|
/**
|
|
7378
7385
|
* Scale
|
|
@@ -7490,7 +7497,7 @@ const pd = (e, t) => {
|
|
|
7490
7497
|
* @see https://tailwindcss.com/docs/accent-color
|
|
7491
7498
|
*/
|
|
7492
7499
|
accent: [{
|
|
7493
|
-
accent:
|
|
7500
|
+
accent: M()
|
|
7494
7501
|
}],
|
|
7495
7502
|
/**
|
|
7496
7503
|
* Appearance
|
|
@@ -7504,7 +7511,7 @@ const pd = (e, t) => {
|
|
|
7504
7511
|
* @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
|
|
7505
7512
|
*/
|
|
7506
7513
|
"caret-color": [{
|
|
7507
|
-
caret:
|
|
7514
|
+
caret: M()
|
|
7508
7515
|
}],
|
|
7509
7516
|
/**
|
|
7510
7517
|
* Color Scheme
|
|
@@ -7750,21 +7757,21 @@ const pd = (e, t) => {
|
|
|
7750
7757
|
* @see https://tailwindcss.com/docs/fill
|
|
7751
7758
|
*/
|
|
7752
7759
|
fill: [{
|
|
7753
|
-
fill: ["none", ...
|
|
7760
|
+
fill: ["none", ...M()]
|
|
7754
7761
|
}],
|
|
7755
7762
|
/**
|
|
7756
7763
|
* Stroke Width
|
|
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
|
|
7764
7771
|
* @see https://tailwindcss.com/docs/stroke
|
|
7765
7772
|
*/
|
|
7766
7773
|
stroke: [{
|
|
7767
|
-
stroke: ["none", ...
|
|
7774
|
+
stroke: ["none", ...M()]
|
|
7768
7775
|
}],
|
|
7769
7776
|
// ---------------------
|
|
7770
7777
|
// --- Accessibility ---
|
|
@@ -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;
|
|
@@ -7897,10 +7904,10 @@ function _l(e) {
|
|
|
7897
7904
|
const t = /* @__PURE__ */ lu(e), n = J((r, o) => {
|
|
7898
7905
|
let { children: s, ...l } = r;
|
|
7899
7906
|
gl(s) && typeof xr == "function" && (s = xr(s._payload));
|
|
7900
|
-
const i =
|
|
7907
|
+
const i = Je.toArray(s), c = i.find(du);
|
|
7901
7908
|
if (c) {
|
|
7902
|
-
const d = c.props.children, f = i.map((u) => u === c ?
|
|
7903
|
-
return /* @__PURE__ */ a(t, { ...l, ref: o, children:
|
|
7909
|
+
const d = c.props.children, f = i.map((u) => u === c ? Je.count(d) > 1 ? Je.only(null) : Qe(d) ? d.props.children : null : u);
|
|
7910
|
+
return /* @__PURE__ */ a(t, { ...l, ref: o, children: Qe(d) ? At(d, void 0, f) : null });
|
|
7904
7911
|
}
|
|
7905
7912
|
return /* @__PURE__ */ a(t, { ...l, ref: o, children: s });
|
|
7906
7913
|
});
|
|
@@ -7911,17 +7918,17 @@ var au = /* @__PURE__ */ _l("Slot");
|
|
|
7911
7918
|
function lu(e) {
|
|
7912
7919
|
const t = J((n, r) => {
|
|
7913
7920
|
let { children: o, ...s } = n;
|
|
7914
|
-
if (gl(o) && typeof xr == "function" && (o = xr(o._payload)),
|
|
7921
|
+
if (gl(o) && typeof xr == "function" && (o = xr(o._payload)), Qe(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
|
-
return
|
|
7925
|
+
return Je.count(o) > 1 ? Je.only(null) : null;
|
|
7919
7926
|
});
|
|
7920
7927
|
return t.displayName = `${e}.SlotClone`, t;
|
|
7921
7928
|
}
|
|
7922
7929
|
var cu = Symbol("radix.slottable");
|
|
7923
7930
|
function du(e) {
|
|
7924
|
-
return
|
|
7931
|
+
return Qe(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === cu;
|
|
7925
7932
|
}
|
|
7926
7933
|
function uu(e, t) {
|
|
7927
7934
|
const n = { ...t };
|
|
@@ -8034,7 +8041,7 @@ const yu = J(
|
|
|
8034
8041
|
children: s,
|
|
8035
8042
|
iconNode: l,
|
|
8036
8043
|
...i
|
|
8037
|
-
}, c) =>
|
|
8044
|
+
}, c) => qe(
|
|
8038
8045
|
"svg",
|
|
8039
8046
|
{
|
|
8040
8047
|
ref: c,
|
|
@@ -8048,14 +8055,14 @@ const yu = J(
|
|
|
8048
8055
|
...i
|
|
8049
8056
|
},
|
|
8050
8057
|
[
|
|
8051
|
-
...l.map(([d, f]) =>
|
|
8058
|
+
...l.map(([d, f]) => qe(d, f)),
|
|
8052
8059
|
...Array.isArray(s) ? s : [s]
|
|
8053
8060
|
]
|
|
8054
8061
|
)
|
|
8055
8062
|
);
|
|
8056
8063
|
const De = (e, t) => {
|
|
8057
8064
|
const n = J(
|
|
8058
|
-
({ className: r, ...o }, s) =>
|
|
8065
|
+
({ className: r, ...o }, s) => qe(yu, {
|
|
8059
8066
|
ref: s,
|
|
8060
8067
|
iconNode: t,
|
|
8061
8068
|
className: El(
|
|
@@ -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" }],
|
|
@@ -8332,7 +8339,7 @@ const _o = (e) => (t) => {
|
|
|
8332
8339
|
USER: "user",
|
|
8333
8340
|
ASSISTANT: "assistant"
|
|
8334
8341
|
};
|
|
8335
|
-
var Ee = /* @__PURE__ */ ((e) => (e.IDLE = "idle", e.LISTENING = "listening", e.ERROR = "error", e.PROCESSING = "processing", e.TRANSCRIBING = "transcribing", e))(Ee || {}),
|
|
8342
|
+
var Ee = /* @__PURE__ */ ((e) => (e.IDLE = "idle", e.LISTENING = "listening", e.ERROR = "error", e.PROCESSING = "processing", e.TRANSCRIBING = "transcribing", e))(Ee || {}), Ce = /* @__PURE__ */ ((e) => (e.CONNECTED = "connected", e.NOT_CONNECTED = "not_connected", e.CONNECTING = "connecting", e))(Ce || {});
|
|
8336
8343
|
let yt = "";
|
|
8337
8344
|
const Wn = (e) => `med-assist-store-${e}`, Qu = (e) => {
|
|
8338
8345
|
yt = Wn(e);
|
|
@@ -8347,7 +8354,7 @@ const Wn = (e) => `med-assist-store-${e}`, Qu = (e) => {
|
|
|
8347
8354
|
showRetryButton: !1,
|
|
8348
8355
|
chats: {},
|
|
8349
8356
|
inlineText: null,
|
|
8350
|
-
connectionStatus:
|
|
8357
|
+
connectionStatus: Ce.CONNECTING,
|
|
8351
8358
|
streamingTimeoutId: null,
|
|
8352
8359
|
responseTimeoutId: null,
|
|
8353
8360
|
lastStreamingActivity: null,
|
|
@@ -8366,7 +8373,7 @@ const Wn = (e) => `med-assist-store-${e}`, Qu = (e) => {
|
|
|
8366
8373
|
userId: "",
|
|
8367
8374
|
level: "",
|
|
8368
8375
|
context: null
|
|
8369
|
-
},
|
|
8376
|
+
}, Y = Zu()(
|
|
8370
8377
|
Ju(
|
|
8371
8378
|
(e, t) => ({
|
|
8372
8379
|
sessionId: "",
|
|
@@ -8392,7 +8399,7 @@ const Wn = (e) => `med-assist-store-${e}`, Qu = (e) => {
|
|
|
8392
8399
|
setUserId: (n) => e({ userId: n }),
|
|
8393
8400
|
context: null,
|
|
8394
8401
|
setContext: (n) => e({ context: n }),
|
|
8395
|
-
connectionStatus:
|
|
8402
|
+
connectionStatus: Ce.CONNECTING,
|
|
8396
8403
|
setConnectionStatus: (n) => e({ connectionStatus: n }),
|
|
8397
8404
|
isStreaming: !1,
|
|
8398
8405
|
setIsStreaming: (n) => e({ isStreaming: n }),
|
|
@@ -8541,7 +8548,7 @@ const Wn = (e) => `med-assist-store-${e}`, Qu = (e) => {
|
|
|
8541
8548
|
}
|
|
8542
8549
|
} catch {
|
|
8543
8550
|
}
|
|
8544
|
-
|
|
8551
|
+
Y.setState(Sl), n && Y.setState(n);
|
|
8545
8552
|
}, Qo = St(null), th = ({ children: e }) => {
|
|
8546
8553
|
const [t, n] = F(null);
|
|
8547
8554
|
return /* @__PURE__ */ a(Qo.Provider, { value: { synapse: t, setSynapse: n }, children: e });
|
|
@@ -8556,7 +8563,7 @@ const Wn = (e) => `med-assist-store-${e}`, Qu = (e) => {
|
|
|
8556
8563
|
throw new Error("useSynapseSetter must be used within a SynapseProvider");
|
|
8557
8564
|
return e.setSynapse;
|
|
8558
8565
|
}, oh = () => {
|
|
8559
|
-
const [e, t] = F(P.VOICE_AGENT_STATE.IDLE), [n, r] = F(!1), o = nh(), { setError: s } =
|
|
8566
|
+
const [e, t] = F(P.VOICE_AGENT_STATE.IDLE), [n, r] = F(!1), o = nh(), { setError: s } = Y();
|
|
8560
8567
|
z(() => {
|
|
8561
8568
|
if (!o) return;
|
|
8562
8569
|
const f = o.voice, u = (y) => {
|
|
@@ -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 je({ 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(je, { 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(je, { className: "h-5 w-32 rounded-md" }),
|
|
8921
|
+
/* @__PURE__ */ a(je, { 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(je, { className: "h-8 w-8 rounded-full" }),
|
|
8926
|
+
/* @__PURE__ */ a(je, { 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(je, { 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(je, { 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(je, { className: "h-9 w-9 rounded-full" }),
|
|
8949
|
+
/* @__PURE__ */ a(je, { 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(je, { className: "h-16 w-3/4 rounded-2xl" }),
|
|
8961
|
+
/* @__PURE__ */ a(je, { className: "h-10 w-1/2 rounded-2xl ml-auto" }),
|
|
8962
|
+
/* @__PURE__ */ a(je, { 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(je, { 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(je, { className: L("h-5 rounded-md", t[r % t.length]) }),
|
|
8990
|
+
/* @__PURE__ */ a(je, { 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);
|
|
@@ -9245,7 +9252,7 @@ function jh({
|
|
|
9245
9252
|
onOpenSessionDrawer: f,
|
|
9246
9253
|
historyEnabled: u = !1
|
|
9247
9254
|
}) {
|
|
9248
|
-
const p = Fl(), m = $h() && !p, g =
|
|
9255
|
+
const p = Fl(), m = $h() && !p, g = Y((A) => A.displayMode) === "full", S = Y((A) => A.initialDisplayMode) === "full", E = (g ? !1 : c) ? "text-primary-foreground hover:text-white hover:bg-black-100" : "text-foreground", _ = Y((A) => A.connectionStatus), N = Y((A) => A.level) === "user", [w, C] = F(!1), v = W(null), T = fe(() => i === "connected" || i === "connecting" || i === "listening" || i === "speaking" || i === "thinking", [i]), b = le(() => {
|
|
9249
9256
|
w || (C(!0), v.current && clearTimeout(v.current), v.current = setTimeout(() => {
|
|
9250
9257
|
v.current = null, C(!1);
|
|
9251
9258
|
}, 6e3), l());
|
|
@@ -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
|
|
10336
|
-
|
|
10341
|
+
), ue = (H) => {
|
|
10342
|
+
const G = Array.from(H.target.files || []);
|
|
10343
|
+
G.length > 0 && r(G);
|
|
10337
10344
|
}, oe = () => {
|
|
10338
10345
|
d || (C.current && (C.current.value = ""), C.current?.click());
|
|
10339
|
-
},
|
|
10340
|
-
|
|
10341
|
-
},
|
|
10342
|
-
|
|
10343
|
-
const
|
|
10344
|
-
|
|
10345
|
-
}, ie = (
|
|
10346
|
-
H
|
|
10346
|
+
}, M = (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 G = H.scrollHeight, Z = w ? 20 : 28, X = 120, Te = Math.max(Z, Math.min(G, X));
|
|
10351
|
+
H.style.height = Te + "px", G > 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,
|
|
@@ -10435,7 +10442,7 @@ function sf({
|
|
|
10435
10442
|
fontWeight: 400,
|
|
10436
10443
|
padding: 0
|
|
10437
10444
|
},
|
|
10438
|
-
onKeyPress:
|
|
10445
|
+
onKeyPress: M,
|
|
10439
10446
|
title: "Enter your message",
|
|
10440
10447
|
"aria-label": "Enter your message",
|
|
10441
10448
|
className: L(
|
|
@@ -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,
|
|
@@ -10600,7 +10607,7 @@ function sf({
|
|
|
10600
10607
|
fontSize: "16px",
|
|
10601
10608
|
lineHeight: "1.4"
|
|
10602
10609
|
},
|
|
10603
|
-
onKeyPress:
|
|
10610
|
+
onKeyPress: M,
|
|
10604
10611
|
title: "Enter your message",
|
|
10605
10612
|
"aria-label": "Enter your message",
|
|
10606
10613
|
className: L(
|
|
@@ -10745,7 +10752,7 @@ function af({ message: e, onDismiss: t }) {
|
|
|
10745
10752
|
] });
|
|
10746
10753
|
}
|
|
10747
10754
|
function lf() {
|
|
10748
|
-
const e =
|
|
10755
|
+
const e = Y((r) => r.toastMessage), t = Y((r) => r.setToastMessage), n = le(() => {
|
|
10749
10756
|
t(null);
|
|
10750
10757
|
}, [t]);
|
|
10751
10758
|
return z(() => {
|
|
@@ -10787,7 +10794,7 @@ function cf({ isOpen: e, onClose: t, botName: n }) {
|
|
|
10787
10794
|
)
|
|
10788
10795
|
] }) });
|
|
10789
10796
|
}
|
|
10790
|
-
const df =
|
|
10797
|
+
const df = Ke(() => import("./medassist-widget-mood-angry-BQqxy8gg.js").then((e) => ({ default: e.MoodAngry }))), uf = Ke(() => import("./medassist-widget-mood-bad-BBDRkdRc.js").then((e) => ({ default: e.MoodBad }))), hf = Ke(() => import("./medassist-widget-mood-neutral-CbcKAQbC.js").then((e) => ({ default: e.MoodNeutral }))), ff = Ke(() => import("./medassist-widget-mood-poor-t4w5iE4B.js").then((e) => ({ default: e.MoodPoor }))), mf = Ke(() => import("./medassist-widget-mood-happy-oLG7NUhq.js").then((e) => ({ default: e.MoodHappy }))), pf = [
|
|
10791
10798
|
{ label: "Took longer than expected", value: "took_longer" },
|
|
10792
10799
|
{ label: "Asking too many questions", value: "too_many_questions" },
|
|
10793
10800
|
{ label: "Irrelevant response", value: "irrelevant_response" },
|
|
@@ -10946,13 +10953,13 @@ 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 =
|
|
10956
|
+
const [b, k] = F(!1), [O, A] = F(!1), [$, re] = F(!1), K = W(null), ue = Y((D) => D.level), oe = S, M = 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
|
-
const
|
|
10962
|
+
const G = fe(() => _h(v), [v]), { setIsMobile: Z } = Y((D) => D), X = !!N, Te = async (D) => {
|
|
10956
10963
|
if (!(!m?.onSend || O)) {
|
|
10957
10964
|
A(!0);
|
|
10958
10965
|
try {
|
|
@@ -10964,9 +10971,9 @@ function Vl({
|
|
|
10964
10971
|
};
|
|
10965
10972
|
z(() => {
|
|
10966
10973
|
if (!K.current) return;
|
|
10967
|
-
const D = oe === "full" ? { ...
|
|
10968
|
-
Ri(K.current, D), oe === "full" && !
|
|
10969
|
-
}, [
|
|
10974
|
+
const D = oe === "full" ? { ...G, headerTinted: !1 } : G;
|
|
10975
|
+
Ri(K.current, D), oe === "full" && !G.backgroundImage ? (K.current.style.setProperty("--background", "0 0% 100%"), K.current.style.setProperty("--widget-bg-overlay", "transparent")) : (K.current.style.removeProperty("--background"), K.current.style.removeProperty("--widget-bg-overlay"), Ri(K.current, G));
|
|
10976
|
+
}, [G, oe]), z(() => {
|
|
10970
10977
|
const D = () => {
|
|
10971
10978
|
const ye = window?.innerWidth ?? 0, he = navigator?.userAgent?.toLowerCase() ?? "", me = ye < 768 || /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(
|
|
10972
10979
|
he
|
|
@@ -10977,14 +10984,14 @@ 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,
|
|
10981
|
-
const
|
|
10987
|
+
let ye = null, he = null, me = null, Ze = window.visualViewport?.offsetTop ?? 0, $e = 0;
|
|
10988
|
+
const xe = 2, Fe = 80;
|
|
10982
10989
|
if (window.visualViewport) {
|
|
10983
10990
|
const ke = () => {
|
|
10984
10991
|
if (D && window.visualViewport) {
|
|
10985
|
-
const
|
|
10992
|
+
const Ge = window.visualViewport.height, tt = window.visualViewport.offsetTop;
|
|
10986
10993
|
ye = requestAnimationFrame(() => {
|
|
10987
|
-
D.style.transition = "none", D.style.top = `${tt}px`, D.style.left = "0", D.style.right = "0", D.style.bottom = "auto", D.style.width = "100vw", D.style.height = `${
|
|
10994
|
+
D.style.transition = "none", D.style.top = `${tt}px`, D.style.left = "0", D.style.right = "0", D.style.bottom = "auto", D.style.width = "100vw", D.style.height = `${Ge}px`, D.style.maxHeight = `${Ge}px`, D.style.minHeight = `${Ge}px`, he && clearTimeout(he), he = setTimeout(() => {
|
|
10988
10995
|
D.style.transition = "";
|
|
10989
10996
|
}, 100);
|
|
10990
10997
|
});
|
|
@@ -10993,9 +11000,9 @@ function Vl({
|
|
|
10993
11000
|
ke();
|
|
10994
11001
|
}, Ae = () => {
|
|
10995
11002
|
if (!D || !window.visualViewport) return;
|
|
10996
|
-
const
|
|
10997
|
-
Math.abs(
|
|
10998
|
-
D.style.transition = "none", D.style.top = `${
|
|
11003
|
+
const Ge = window.visualViewport.offsetTop, tt = Date.now();
|
|
11004
|
+
Math.abs(Ge - Ze) < xe || tt - $e < Fe || ($e = tt, Ze = Ge, ye = requestAnimationFrame(() => {
|
|
11005
|
+
D.style.transition = "none", D.style.top = `${Ge}px`, me && clearTimeout(me), me = setTimeout(() => {
|
|
10999
11006
|
D.style.transition = "";
|
|
11000
11007
|
}, 150);
|
|
11001
11008
|
}));
|
|
@@ -11015,20 +11022,20 @@ function Vl({
|
|
|
11015
11022
|
}
|
|
11016
11023
|
}, [e, b]), z(() => {
|
|
11017
11024
|
if (e) {
|
|
11018
|
-
const D = K.current, ye = window.scrollY, he = document.body.style.cssText, me = document.documentElement.style.overflow,
|
|
11019
|
-
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",
|
|
11020
|
-
let
|
|
11021
|
-
const
|
|
11022
|
-
|
|
11025
|
+
const D = K.current, ye = window.scrollY, he = document.body.style.cssText, me = document.documentElement.style.overflow, Ze = window.innerWidth - document.documentElement.clientWidth;
|
|
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", Ze > 0 && !b && (document.body.style.paddingRight = `${Ze}px`);
|
|
11027
|
+
let $e = 0;
|
|
11028
|
+
const xe = (ke) => {
|
|
11029
|
+
$e = ke.touches[0].clientY;
|
|
11023
11030
|
}, Fe = (ke) => {
|
|
11024
11031
|
if (ke.touches.length !== 1) return;
|
|
11025
|
-
const ft =
|
|
11026
|
-
|
|
11032
|
+
const ft = $e - ke.touches[0].clientY;
|
|
11033
|
+
$e = ke.touches[0].clientY;
|
|
11027
11034
|
let Ae = ke.target;
|
|
11028
11035
|
for (; Ae && Ae !== D; ) {
|
|
11029
|
-
const { overflowY:
|
|
11030
|
-
if ((
|
|
11031
|
-
const { scrollTop: tt, scrollHeight:
|
|
11036
|
+
const { overflowY: Ge } = window.getComputedStyle(Ae);
|
|
11037
|
+
if ((Ge === "auto" || Ge === "scroll") && Ae.scrollHeight > Ae.clientHeight) {
|
|
11038
|
+
const { scrollTop: tt, scrollHeight: Xe, clientHeight: Ot } = Ae, st = tt <= 0 && ft < 0, It = tt + Ot >= Xe - 1 && ft > 0;
|
|
11032
11039
|
if (!st && !It) return;
|
|
11033
11040
|
break;
|
|
11034
11041
|
}
|
|
@@ -11036,45 +11043,45 @@ function Vl({
|
|
|
11036
11043
|
}
|
|
11037
11044
|
ke.preventDefault();
|
|
11038
11045
|
};
|
|
11039
|
-
return D && (D.addEventListener("touchstart",
|
|
11040
|
-
D && (D.removeEventListener("touchstart",
|
|
11046
|
+
return D && (D.addEventListener("touchstart", xe, { passive: !0 }), D.addEventListener("touchmove", Fe, { passive: !1 })), () => {
|
|
11047
|
+
D && (D.removeEventListener("touchstart", xe), D.removeEventListener("touchmove", Fe)), document.body.style.cssText = he, document.documentElement.style.overflow = me, window.scrollTo(0, ye);
|
|
11041
11048
|
};
|
|
11042
11049
|
}
|
|
11043
11050
|
}, [e, b]);
|
|
11044
11051
|
const { position: _e, elementRef: ce } = hh({
|
|
11045
|
-
enabled: e && !b && !
|
|
11052
|
+
enabled: e && !b && !M
|
|
11046
11053
|
});
|
|
11047
11054
|
z(() => {
|
|
11048
11055
|
K.current && (ce.current = K.current);
|
|
11049
11056
|
}, [ce]);
|
|
11050
|
-
const
|
|
11057
|
+
const Be = L(
|
|
11051
11058
|
// Base isolation styles - prevents host website interference
|
|
11052
11059
|
"synapse-chat-widget-container",
|
|
11053
11060
|
"fixed m-0 p-0",
|
|
11054
11061
|
"box-border",
|
|
11055
11062
|
// Only apply transition for desktop widget, disable for mobile/fullscreen to prevent flickering
|
|
11056
|
-
!b && !
|
|
11063
|
+
!b && !M ? "transition-all duration-300" : "",
|
|
11057
11064
|
// Positioning
|
|
11058
|
-
b ? "w-screen h-[100svh]" :
|
|
11065
|
+
b ? "w-screen h-[100svh]" : M ? "w-screen h-screen" : "w-96 h-[600px]",
|
|
11059
11066
|
// Z-index - highest possible
|
|
11060
11067
|
"z-[2147483647]",
|
|
11061
11068
|
// Visibility
|
|
11062
11069
|
e ? "opacity-100 pointer-events-auto" : "opacity-0 pointer-events-none scale-95"
|
|
11063
|
-
),
|
|
11070
|
+
), Ye = L(
|
|
11064
11071
|
"w-full h-full relative",
|
|
11065
11072
|
"bg-background",
|
|
11066
11073
|
"shadow-2xl",
|
|
11067
11074
|
"flex",
|
|
11068
11075
|
"overflow-hidden",
|
|
11069
|
-
|
|
11070
|
-
b ? "rounded-none border-0 flex-col" :
|
|
11076
|
+
G.backgroundImage ? "theme-with-background" : "",
|
|
11077
|
+
b ? "rounded-none border-0 flex-col" : M ? "rounded-none border-0 flex-row" : "rounded-3xl flex-col"
|
|
11071
11078
|
);
|
|
11072
11079
|
return /* @__PURE__ */ a(
|
|
11073
11080
|
"div",
|
|
11074
11081
|
{
|
|
11075
11082
|
ref: K,
|
|
11076
11083
|
"data-mode": oe,
|
|
11077
|
-
className:
|
|
11084
|
+
className: Be,
|
|
11078
11085
|
style: {
|
|
11079
11086
|
// Reset only essential properties that might interfere
|
|
11080
11087
|
margin: 0,
|
|
@@ -11092,7 +11099,7 @@ function Vl({
|
|
|
11092
11099
|
// Fullscreen desktop: fill viewport edge-to-edge — only when open.
|
|
11093
11100
|
// When closed, skipping these styles + display:none below ensures the
|
|
11094
11101
|
// (invisible) shell doesn't sit over the launcher button.
|
|
11095
|
-
...
|
|
11102
|
+
...M && e && {
|
|
11096
11103
|
top: 0,
|
|
11097
11104
|
left: 0,
|
|
11098
11105
|
right: 0,
|
|
@@ -11103,9 +11110,9 @@ function Vl({
|
|
|
11103
11110
|
// Hard-hide the shell when closed in fullscreen so its 100vw/100vh
|
|
11104
11111
|
// pointer-events-none layer (still positioned at top:0/left:0 even
|
|
11105
11112
|
// with opacity-0) cannot occlude the launcher button.
|
|
11106
|
-
...
|
|
11113
|
+
...M && !e && { display: "none" },
|
|
11107
11114
|
// Draggable position for desktop widget (not mobile, not fullscreen)
|
|
11108
|
-
...!b && !
|
|
11115
|
+
...!b && !M && {
|
|
11109
11116
|
left: `${_e.x}px`,
|
|
11110
11117
|
top: `${_e.y}px`,
|
|
11111
11118
|
bottom: "auto",
|
|
@@ -11121,7 +11128,7 @@ function Vl({
|
|
|
11121
11128
|
width: "100vw",
|
|
11122
11129
|
maxHeight: "100svh",
|
|
11123
11130
|
height: "100svh",
|
|
11124
|
-
backgroundColor:
|
|
11131
|
+
backgroundColor: G.backgroundImage ? "transparent" : "hsl(var(--background))"
|
|
11125
11132
|
}
|
|
11126
11133
|
// Ensure proper font rendering
|
|
11127
11134
|
// WebkitFontSmoothing: "antialiased",
|
|
@@ -11169,8 +11176,8 @@ function Vl({
|
|
|
11169
11176
|
/* @__PURE__ */ a(
|
|
11170
11177
|
sn,
|
|
11171
11178
|
{
|
|
11172
|
-
className:
|
|
11173
|
-
"data-text-color":
|
|
11179
|
+
className: Ye,
|
|
11180
|
+
"data-text-color": G.textColor,
|
|
11174
11181
|
style: b ? void 0 : { border: "1.5px solid hsl(var(--primary) / 0.5)" },
|
|
11175
11182
|
children: [
|
|
11176
11183
|
/* @__PURE__ */ a(
|
|
@@ -11193,19 +11200,19 @@ function Vl({
|
|
|
11193
11200
|
children: ie
|
|
11194
11201
|
}
|
|
11195
11202
|
),
|
|
11196
|
-
!
|
|
11203
|
+
!G.backgroundImage && /* @__PURE__ */ a(
|
|
11197
11204
|
"div",
|
|
11198
11205
|
{
|
|
11199
11206
|
className: "absolute inset-0 pointer-events-none",
|
|
11200
11207
|
style: { backgroundColor: "var(--widget-bg-overlay)" }
|
|
11201
11208
|
}
|
|
11202
11209
|
),
|
|
11203
|
-
|
|
11210
|
+
G.backgroundImage && /* @__PURE__ */ a(
|
|
11204
11211
|
"div",
|
|
11205
11212
|
{
|
|
11206
11213
|
className: "absolute inset-0 -z-10",
|
|
11207
11214
|
style: {
|
|
11208
|
-
backgroundImage: `url(${
|
|
11215
|
+
backgroundImage: `url(${G.backgroundImage})`,
|
|
11209
11216
|
backgroundSize: "cover",
|
|
11210
11217
|
backgroundPosition: "center",
|
|
11211
11218
|
backgroundRepeat: "no-repeat",
|
|
@@ -11215,12 +11222,12 @@ function Vl({
|
|
|
11215
11222
|
}
|
|
11216
11223
|
}
|
|
11217
11224
|
),
|
|
11218
|
-
|
|
11225
|
+
G.backgroundImage && /* @__PURE__ */ a(
|
|
11219
11226
|
"div",
|
|
11220
11227
|
{
|
|
11221
11228
|
className: "absolute inset-0 -z-10",
|
|
11222
11229
|
style: {
|
|
11223
|
-
backgroundColor:
|
|
11230
|
+
backgroundColor: G.textColor === "white" ? "rgba(0, 0, 0, 0.4)" : "rgba(255, 255, 255, 0.4)"
|
|
11224
11231
|
}
|
|
11225
11232
|
}
|
|
11226
11233
|
),
|
|
@@ -11243,18 +11250,18 @@ function Vl({
|
|
|
11243
11250
|
onDontShowAgain: T.onDontShowAgain
|
|
11244
11251
|
}
|
|
11245
11252
|
),
|
|
11246
|
-
|
|
11247
|
-
ue === "user" && !
|
|
11253
|
+
M && i,
|
|
11254
|
+
ue === "user" && !M && c,
|
|
11248
11255
|
/* @__PURE__ */ a("div", { className: "flex-1 flex flex-col min-w-0 min-h-0 h-full", children: [
|
|
11249
11256
|
/* @__PURE__ */ a("div", { className: "flex-shrink-0 sticky top-0 z-50 synapse-chat-widget-header", style: {
|
|
11250
11257
|
// Same trick as the footer — solid bg layer + translucent overlay,
|
|
11251
11258
|
// so chat content scrolling under the sticky header is hidden.
|
|
11252
|
-
...
|
|
11259
|
+
...M ? { background: "transparent" } : {
|
|
11253
11260
|
backgroundColor: "hsl(var(--background))",
|
|
11254
11261
|
backgroundImage: "linear-gradient(var(--header-bg), var(--header-bg))"
|
|
11255
11262
|
},
|
|
11256
11263
|
borderBottom: "0.5px solid var(--header-stroke)",
|
|
11257
|
-
...!b && !
|
|
11264
|
+
...!b && !M && {
|
|
11258
11265
|
cursor: e ? "grab" : "default"
|
|
11259
11266
|
}
|
|
11260
11267
|
}, children: /* @__PURE__ */ a(Le, { fallback: /* @__PURE__ */ a(wh, {}), children: /* @__PURE__ */ a(
|
|
@@ -11268,19 +11275,19 @@ function Vl({
|
|
|
11268
11275
|
iconUrl: r,
|
|
11269
11276
|
startNewConversation: o,
|
|
11270
11277
|
voiceAgentState: C,
|
|
11271
|
-
headerTinted:
|
|
11278
|
+
headerTinted: M ? !1 : G.headerTinted,
|
|
11272
11279
|
onToggleDisplayMode: h,
|
|
11273
|
-
onOpenSessionDrawer:
|
|
11280
|
+
onOpenSessionDrawer: M ? void 0 : E,
|
|
11274
11281
|
historyEnabled: _
|
|
11275
11282
|
}
|
|
11276
11283
|
) }) }),
|
|
11277
11284
|
(() => {
|
|
11278
|
-
const D =
|
|
11285
|
+
const D = M && !!d, ye = m && C === P.VOICE_AGENT_STATE.IDLE ? /* @__PURE__ */ a(Le, { fallback: /* @__PURE__ */ a(Ch, {}), children: /* @__PURE__ */ a(
|
|
11279
11286
|
sf,
|
|
11280
11287
|
{
|
|
11281
11288
|
value: m.value,
|
|
11282
11289
|
onChange: m.onChange,
|
|
11283
|
-
onSend: X ?
|
|
11290
|
+
onSend: X ? Te : m.onSend,
|
|
11284
11291
|
onFileChange: m.onFileChange,
|
|
11285
11292
|
onRemoveFile: m.onRemoveFile,
|
|
11286
11293
|
onRecording: m.onRecording,
|
|
@@ -11291,7 +11298,7 @@ function Vl({
|
|
|
11291
11298
|
isMobile: b,
|
|
11292
11299
|
placeholder: m.placeholder,
|
|
11293
11300
|
recordingStatus: m.recordingStatus,
|
|
11294
|
-
theme:
|
|
11301
|
+
theme: G,
|
|
11295
11302
|
onStartNewChat: o,
|
|
11296
11303
|
showStartNewChatButton: s,
|
|
11297
11304
|
isVoiceAgentActive: m.isVoiceAgentActive,
|
|
@@ -11299,7 +11306,7 @@ function Vl({
|
|
|
11299
11306
|
allowed: m.allowed,
|
|
11300
11307
|
isAuthComponent: N,
|
|
11301
11308
|
activeElicitationState: w,
|
|
11302
|
-
isFullScreen:
|
|
11309
|
+
isFullScreen: M && !D
|
|
11303
11310
|
}
|
|
11304
11311
|
) }) : null, he = {
|
|
11305
11312
|
fontFamily: "Inter, system-ui, -apple-system, sans-serif",
|
|
@@ -11311,7 +11318,7 @@ function Vl({
|
|
|
11311
11318
|
"Session ID: ",
|
|
11312
11319
|
y
|
|
11313
11320
|
] }) }),
|
|
11314
|
-
|
|
11321
|
+
M ? (
|
|
11315
11322
|
// Fullscreen desktop always shows the full explicit disclaimer
|
|
11316
11323
|
// text (Figma reply-box footer) instead of the "Powered by"
|
|
11317
11324
|
// watermark — there's room for it and no floating-widget chrome.
|
|
@@ -11362,13 +11369,13 @@ function Vl({
|
|
|
11362
11369
|
]
|
|
11363
11370
|
}
|
|
11364
11371
|
)
|
|
11365
|
-
] }),
|
|
11372
|
+
] }), Ze = d && M ? d({
|
|
11366
11373
|
composer: D ? ye : null,
|
|
11367
11374
|
composerFooter: D ? me : null
|
|
11368
11375
|
}) : null;
|
|
11369
11376
|
return /* @__PURE__ */ a(pe, { children: [
|
|
11370
11377
|
/* @__PURE__ */ a("div", { className: "flex-1 min-h-0 overflow-hidden flex flex-col relative", children: [
|
|
11371
|
-
|
|
11378
|
+
Ze ?? l,
|
|
11372
11379
|
/* @__PURE__ */ a(lf, {})
|
|
11373
11380
|
] }),
|
|
11374
11381
|
m && !D && /* @__PURE__ */ a(
|
|
@@ -11392,7 +11399,7 @@ function Vl({
|
|
|
11392
11399
|
// : "0.5px solid var(--footer-stroke)",
|
|
11393
11400
|
},
|
|
11394
11401
|
children: [
|
|
11395
|
-
/* @__PURE__ */ a("div", { className: L(
|
|
11402
|
+
/* @__PURE__ */ a("div", { className: L(M && "max-w-2xl mx-auto w-full"), children: ye }),
|
|
11396
11403
|
me
|
|
11397
11404
|
]
|
|
11398
11405
|
}
|
|
@@ -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
|
}
|
|
@@ -11890,53 +11897,53 @@ const $t = (e) => {
|
|
|
11890
11897
|
force: s
|
|
11891
11898
|
// onInlineText,
|
|
11892
11899
|
}) => {
|
|
11893
|
-
const [l, i] = F([]), c = W([]), [d, f] = F(!1), [u, p] = F(!1), y = W(/* @__PURE__ */ new Map()), m = W(0), [g, S] = F(!1), [h, E] = F([]), _ = W(null), N = rh(), w = W(null), { isOnline: C } = zl(), v = W(!1), T =
|
|
11900
|
+
const [l, i] = F([]), c = W([]), [d, f] = F(!1), [u, p] = F(!1), y = W(/* @__PURE__ */ new Map()), m = W(0), [g, S] = F(!1), [h, E] = F([]), _ = W(null), N = rh(), w = W(null), { isOnline: C } = zl(), v = W(!1), T = Y((R) => R.agentId), b = Y((R) => R.sessionId), k = Y((R) => R.isStreaming), O = Y((R) => R.isWaitingForResponse), A = Y((R) => R.initialMessage), $ = Y((R) => R.userId), re = Y((R) => R.fileUploadPerSession), {
|
|
11894
11901
|
setSessionId: K,
|
|
11895
11902
|
setRefreshToken: ue,
|
|
11896
11903
|
setSessToken: oe,
|
|
11897
|
-
setLevel:
|
|
11898
|
-
setError:
|
|
11904
|
+
setLevel: M,
|
|
11905
|
+
setError: B,
|
|
11899
11906
|
setConnectionStatus: ie,
|
|
11900
|
-
setShowRetryButton:
|
|
11901
|
-
setStartNewConnection:
|
|
11907
|
+
setShowRetryButton: H,
|
|
11908
|
+
setStartNewConnection: G,
|
|
11902
11909
|
setIsStreaming: Z,
|
|
11903
11910
|
setIsWaitingForResponse: X,
|
|
11904
|
-
setProgressMessage:
|
|
11911
|
+
setProgressMessage: Te,
|
|
11905
11912
|
setRecordingStatus: _e,
|
|
11906
11913
|
clearSession: ce,
|
|
11907
|
-
clearUser:
|
|
11908
|
-
addMessageToSession:
|
|
11914
|
+
clearUser: Be,
|
|
11915
|
+
addMessageToSession: Ye,
|
|
11909
11916
|
getMessagesForSession: D,
|
|
11910
11917
|
setMessagesForSession: ye,
|
|
11911
11918
|
updateMessageInSession: he,
|
|
11912
11919
|
setUserId: me,
|
|
11913
|
-
setFileUploadPerSession:
|
|
11914
|
-
setToastMessage:
|
|
11915
|
-
upsertElicitationState:
|
|
11920
|
+
setFileUploadPerSession: Ze,
|
|
11921
|
+
setToastMessage: $e,
|
|
11922
|
+
upsertElicitationState: xe,
|
|
11916
11923
|
setElicitationState: Fe,
|
|
11917
11924
|
setInitialMessage: ke,
|
|
11918
11925
|
setSessionInitialMessage: ft
|
|
11919
|
-
} =
|
|
11926
|
+
} = Y.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
|
-
}), ie(
|
|
11932
|
+
}), ie(Ce.NOT_CONNECTED);
|
|
11926
11933
|
else if (!g)
|
|
11927
|
-
ie(
|
|
11928
|
-
else if (
|
|
11929
|
-
ie(
|
|
11934
|
+
ie(Ce.CONNECTING);
|
|
11935
|
+
else if (Xe())
|
|
11936
|
+
ie(Ce.CONNECTED), st();
|
|
11930
11937
|
else {
|
|
11931
|
-
const { showRetryButton: R, startNewConnection: x, error:
|
|
11932
|
-
(R || x ||
|
|
11938
|
+
const { showRetryButton: R, startNewConnection: x, error: I } = Y.getState();
|
|
11939
|
+
(R || x || I) && !Xe() && st();
|
|
11933
11940
|
}
|
|
11934
11941
|
}, [C, g]), z(() => {
|
|
11935
11942
|
b && (i((R) => {
|
|
11936
|
-
const x = new Set(R.map((
|
|
11943
|
+
const x = new Set(R.map((I) => I.id));
|
|
11937
11944
|
return [
|
|
11938
11945
|
...R,
|
|
11939
|
-
...(D(b) || []).filter((
|
|
11946
|
+
...(D(b) || []).filter((I) => !x.has(I.id))
|
|
11940
11947
|
];
|
|
11941
11948
|
}), E([]));
|
|
11942
11949
|
}, [b]), z(() => {
|
|
@@ -11946,17 +11953,17 @@ const $t = (e) => {
|
|
|
11946
11953
|
agentId: T,
|
|
11947
11954
|
...o && { authToken: o },
|
|
11948
11955
|
// Persisted refresh token lets the init exchange resume the same identity after a reload.
|
|
11949
|
-
...
|
|
11950
|
-
refreshToken:
|
|
11956
|
+
...Y.getState().refreshToken && {
|
|
11957
|
+
refreshToken: Y.getState().refreshToken
|
|
11951
11958
|
},
|
|
11952
|
-
...
|
|
11953
|
-
sessToken:
|
|
11959
|
+
...Y.getState().sessToken && {
|
|
11960
|
+
sessToken: Y.getState().sessToken
|
|
11954
11961
|
},
|
|
11955
11962
|
// Persisted level: with a seeded pair the SDK skips the exchange, so
|
|
11956
11963
|
// this is its only way to know whether it acts for a user or a guest —
|
|
11957
11964
|
// which is what its guest-vs-authenticated recovery branches on.
|
|
11958
|
-
...
|
|
11959
|
-
level:
|
|
11965
|
+
...Y.getState().level && {
|
|
11966
|
+
level: Y.getState().level
|
|
11960
11967
|
},
|
|
11961
11968
|
...s && { force: s },
|
|
11962
11969
|
environment: e,
|
|
@@ -11965,7 +11972,7 @@ const $t = (e) => {
|
|
|
11965
11972
|
callbacks: {
|
|
11966
11973
|
onError: (x) => {
|
|
11967
11974
|
if (typeof navigator < "u" && !navigator.onLine) {
|
|
11968
|
-
ie(
|
|
11975
|
+
ie(Ce.NOT_CONNECTED), B({
|
|
11969
11976
|
title: "No internet connection",
|
|
11970
11977
|
description: "Will reconnect automatically when internet is restored."
|
|
11971
11978
|
});
|
|
@@ -11973,64 +11980,62 @@ const $t = (e) => {
|
|
|
11973
11980
|
}
|
|
11974
11981
|
if (x.reason)
|
|
11975
11982
|
switch (x.reason) {
|
|
11976
|
-
case P.SYNAPSE_RECOVERY_REASON.SESSION_FORBIDDEN:
|
|
11977
|
-
|
|
11978
|
-
return;
|
|
11979
|
-
case P.SYNAPSE_RECOVERY_REASON.AUTH_EXPIRED:
|
|
11980
|
-
window.postMessage(
|
|
11983
|
+
case P.SYNAPSE_RECOVERY_REASON.SESSION_FORBIDDEN: {
|
|
11984
|
+
Y.getState().level !== "user" ? (Be(), _.current?.clearTokens(), Pt()) : (Be(), window.postMessage(
|
|
11981
11985
|
{ type: "AUTH_EXPIRED", message: "Authentication expired" },
|
|
11982
11986
|
"*"
|
|
11983
|
-
), ie(
|
|
11987
|
+
), ie(Ce.NOT_CONNECTED), B({
|
|
11984
11988
|
title: "Session expired",
|
|
11985
11989
|
description: "Your session has expired. Please reload the page to continue."
|
|
11986
|
-
});
|
|
11990
|
+
}));
|
|
11987
11991
|
return;
|
|
11992
|
+
}
|
|
11988
11993
|
case P.SYNAPSE_RECOVERY_REASON.SESSION_NOT_FOUND:
|
|
11989
|
-
|
|
11994
|
+
B(null), ie(Ce.NOT_CONNECTED), G(!0);
|
|
11990
11995
|
return;
|
|
11991
11996
|
case P.SYNAPSE_RECOVERY_REASON.RETRY_LATER:
|
|
11992
|
-
ie(
|
|
11997
|
+
ie(Ce.CONNECTING);
|
|
11993
11998
|
return;
|
|
11994
11999
|
}
|
|
11995
12000
|
switch (x.code) {
|
|
11996
12001
|
case P.SynapseErrorCode.API:
|
|
11997
12002
|
case P.SynapseErrorCode.SESSION: {
|
|
11998
|
-
const
|
|
11999
|
-
Q && be ? (
|
|
12003
|
+
const I = x, j = I.context?.stage === "tokenRefresh" || I.status === 401, se = I.status === 404 || I?.context?.staus === 404, Q = I.status === 403, be = Y.getState().level !== "user";
|
|
12004
|
+
Q && be ? (Be(), _.current?.clearTokens(), Pt()) : j || Q && !be ? (Be(), window.postMessage(
|
|
12000
12005
|
{ type: "AUTH_EXPIRED", message: "Authentication expired" },
|
|
12001
12006
|
"*"
|
|
12002
|
-
), ie(
|
|
12007
|
+
), ie(Ce.NOT_CONNECTED), B({
|
|
12003
12008
|
title: "Session expired",
|
|
12004
12009
|
description: "Your session has expired. Please reload the page to continue."
|
|
12005
|
-
})) : se ?
|
|
12010
|
+
})) : se ? G(!0) : (ie(Ce.NOT_CONNECTED), B({
|
|
12006
12011
|
title: "Something went wrong!",
|
|
12007
12012
|
description: $t(x)
|
|
12008
|
-
}),
|
|
12013
|
+
}), H(!0));
|
|
12009
12014
|
break;
|
|
12010
12015
|
}
|
|
12011
12016
|
case P.SynapseErrorCode.RECORDING:
|
|
12012
|
-
|
|
12017
|
+
B({
|
|
12013
12018
|
title: "Recording failed",
|
|
12014
12019
|
description: $t(x)
|
|
12015
12020
|
});
|
|
12016
12021
|
break;
|
|
12017
12022
|
case P.SynapseErrorCode.CONNECTION:
|
|
12018
|
-
|
|
12023
|
+
Xe() || (ie(Ce.NOT_CONNECTED), m.current < 2 ? (m.current = m.current + 1, Ae(b)) : (H(!0), B({
|
|
12019
12024
|
title: "Trying to connect...",
|
|
12020
12025
|
description: $t(x)
|
|
12021
12026
|
})));
|
|
12022
12027
|
break;
|
|
12023
12028
|
default:
|
|
12024
|
-
|
|
12029
|
+
B({
|
|
12025
12030
|
title: "Something went wrong",
|
|
12026
12031
|
description: $t(x)
|
|
12027
|
-
}),
|
|
12032
|
+
}), H(!0);
|
|
12028
12033
|
break;
|
|
12029
12034
|
}
|
|
12030
12035
|
},
|
|
12031
12036
|
onTokenExchange: (x) => {
|
|
12032
|
-
const
|
|
12033
|
-
(!!x?.user_id && !!
|
|
12037
|
+
const I = Y.getState().userId;
|
|
12038
|
+
(!!x?.user_id && !!I && x.user_id !== I || x?.userid_change_detected) && ce(), x?.refresh_token && ue(x.refresh_token), x?.sess_token && oe(x.sess_token), x?.level && M(x.level), x?.user_id && me(x.user_id);
|
|
12034
12039
|
}
|
|
12035
12040
|
},
|
|
12036
12041
|
...n && { serverUrl: n },
|
|
@@ -12043,16 +12048,16 @@ const $t = (e) => {
|
|
|
12043
12048
|
c.current = l;
|
|
12044
12049
|
}, [l]), z(() => {
|
|
12045
12050
|
const R = c.current[c.current.length - 1];
|
|
12046
|
-
!R?.role || !b || (R?.role === ze.USER && !R.isStored ?
|
|
12047
|
-
const
|
|
12048
|
-
return
|
|
12051
|
+
!R?.role || !b || (R?.role === ze.USER && !R.isStored ? Ye(b, { ...R, isStored: !0 }) : !k && !R.isStored && (i((x) => {
|
|
12052
|
+
const I = [...x];
|
|
12053
|
+
return I[I.length - 1] = {
|
|
12049
12054
|
...R,
|
|
12050
12055
|
isStored: !0
|
|
12051
|
-
},
|
|
12052
|
-
}),
|
|
12056
|
+
}, I;
|
|
12057
|
+
}), Ye(b, { ...R, isStored: !0 })));
|
|
12053
12058
|
}, [l, k]), z(() => () => {
|
|
12054
12059
|
const R = c.current[c.current.length - 1];
|
|
12055
|
-
R && !R?.isStored && b &&
|
|
12060
|
+
R && !R?.isStored && b && Ye(b, { ...R, isStored: !0 });
|
|
12056
12061
|
}, []), z(() => (w.current && (clearTimeout(w.current), w.current = null), O && !k ? w.current = setTimeout(() => {
|
|
12057
12062
|
X(!1), w.current = null;
|
|
12058
12063
|
}, 3e4) : k && w.current && (clearTimeout(w.current), w.current = null), () => {
|
|
@@ -12060,43 +12065,43 @@ const $t = (e) => {
|
|
|
12060
12065
|
}), [O, k, X]);
|
|
12061
12066
|
const Ae = async (R, x = !1) => {
|
|
12062
12067
|
try {
|
|
12063
|
-
const
|
|
12068
|
+
const I = await _.current?.startSession(
|
|
12064
12069
|
R ? { session_id: R } : void 0
|
|
12065
12070
|
);
|
|
12066
|
-
if (
|
|
12067
|
-
ke(
|
|
12068
|
-
const j =
|
|
12069
|
-
j && ft(j,
|
|
12070
|
-
}
|
|
12071
|
-
|
|
12072
|
-
} catch (
|
|
12073
|
-
if (
|
|
12074
|
-
const j =
|
|
12075
|
-
se ||
|
|
12071
|
+
if (I?.session_id && K(I.session_id), I?.user_id && me(I.user_id), I?.initial_message) {
|
|
12072
|
+
ke(I.initial_message);
|
|
12073
|
+
const j = I.session_id || R;
|
|
12074
|
+
j && ft(j, I.initial_message);
|
|
12075
|
+
}
|
|
12076
|
+
I?.error?.msg && $e(I.error.msg);
|
|
12077
|
+
} catch (I) {
|
|
12078
|
+
if (I?.reason) return;
|
|
12079
|
+
const j = I, se = j.context?.stage === "tokenRefresh" || j.status === 401, Q = j.status === 404 || j.context?.status == 404, Re = j.status === 403, be = Y.getState().level !== "user";
|
|
12080
|
+
se || Re && !be ? (Be(), window.postMessage(
|
|
12076
12081
|
{ type: "AUTH_EXPIRED", message: "Authentication expired" },
|
|
12077
12082
|
"*"
|
|
12078
|
-
), ie(
|
|
12083
|
+
), ie(Ce.NOT_CONNECTED), B({
|
|
12079
12084
|
title: "Session expired",
|
|
12080
12085
|
description: "Your session has expired. Please reload the page to continue."
|
|
12081
|
-
})) : Q ? (
|
|
12086
|
+
})) : Q ? (B(null), ie(Ce.NOT_CONNECTED), G(!0)) : Re && be && !x ? (Be(), _.current?.clearTokens(), st(), await Ae(void 0, !0)) : (B({
|
|
12082
12087
|
title: "Connection Lost!",
|
|
12083
|
-
description: $t(
|
|
12084
|
-
}),
|
|
12088
|
+
description: $t(I)
|
|
12089
|
+
}), H(!0));
|
|
12085
12090
|
}
|
|
12086
|
-
},
|
|
12087
|
-
const x =
|
|
12091
|
+
}, Ge = async (R) => {
|
|
12092
|
+
const x = Y.getState().chats[R];
|
|
12088
12093
|
if (x?.length)
|
|
12089
12094
|
return i(x), x;
|
|
12090
|
-
const
|
|
12091
|
-
if (
|
|
12095
|
+
const I = y.current.get(R);
|
|
12096
|
+
if (I) return I;
|
|
12092
12097
|
const j = (async () => {
|
|
12093
12098
|
try {
|
|
12094
12099
|
const se = await _.current?.getSessionMessages(R);
|
|
12095
12100
|
if (!se?.length) return [];
|
|
12096
|
-
const { messages: Q, elicitations:
|
|
12097
|
-
return Object.keys(
|
|
12098
|
-
...
|
|
12099
|
-
...
|
|
12101
|
+
const { messages: Q, elicitations: Re } = Df(se);
|
|
12102
|
+
return Object.keys(Re).length && Fe({
|
|
12103
|
+
...Y.getState().elicitationState,
|
|
12104
|
+
...Re
|
|
12100
12105
|
}), ye(R, Q), i(Q), Q;
|
|
12101
12106
|
} catch {
|
|
12102
12107
|
return [];
|
|
@@ -12113,48 +12118,48 @@ const $t = (e) => {
|
|
|
12113
12118
|
}, tt = async ({ forceNewSession: R = !1, sessionId: x } = {}) => {
|
|
12114
12119
|
try {
|
|
12115
12120
|
if (!_.current) {
|
|
12116
|
-
|
|
12121
|
+
B({
|
|
12117
12122
|
title: "SDK not initialized",
|
|
12118
12123
|
description: "Please ensure agentId is configured"
|
|
12119
12124
|
}), f(!1);
|
|
12120
12125
|
return;
|
|
12121
12126
|
}
|
|
12122
12127
|
if (f(!0), R) {
|
|
12123
|
-
ie(
|
|
12128
|
+
ie(Ce.CONNECTING), i([]), await ce(), await _?.current?.endSession(), st(), await Ae(), It();
|
|
12124
12129
|
return;
|
|
12125
12130
|
}
|
|
12126
|
-
const
|
|
12127
|
-
j !==
|
|
12131
|
+
const I = Y.getState()?.sessionId, j = x || I || void 0;
|
|
12132
|
+
j !== I && (Ot(), i([]), j && await Ge(j)), await Ae(j), It();
|
|
12128
12133
|
} catch {
|
|
12129
12134
|
} finally {
|
|
12130
12135
|
f(!1);
|
|
12131
12136
|
}
|
|
12132
|
-
},
|
|
12137
|
+
}, Xe = () => _.current?.isConnected() ?? !1, Ot = () => {
|
|
12133
12138
|
_.current?.endSession();
|
|
12134
12139
|
}, st = () => {
|
|
12135
|
-
m.current = 0,
|
|
12140
|
+
m.current = 0, H(!1), G(!1), B(null);
|
|
12136
12141
|
}, It = () => {
|
|
12137
12142
|
_.current?.on(P.SYNAPSE_REALTIME_EVENTS.MESSAGE_CHUNK, (R) => {
|
|
12138
12143
|
const x = R;
|
|
12139
12144
|
if (x.data?.text && x.messageId) {
|
|
12140
|
-
k || (X(!1), Z(!0)),
|
|
12141
|
-
const
|
|
12145
|
+
k || (X(!1), Z(!0)), Xe() && ie(Ce.CONNECTED), st();
|
|
12146
|
+
const I = x.data.text, j = x.messageId, se = v.current;
|
|
12142
12147
|
v.current = !1, i((Q) => {
|
|
12143
|
-
const
|
|
12144
|
-
if (
|
|
12145
|
-
const be = [...Q], Ue = se &&
|
|
12148
|
+
const Re = Q[Q.length - 1];
|
|
12149
|
+
if (Re && Re.id === j && Re.role === ze.ASSISTANT) {
|
|
12150
|
+
const be = [...Q], Ue = se && Re.content.length > 0 && !/\s$/.test(Re.content) && !/^\s/.test(I) ? `
|
|
12146
12151
|
|
|
12147
12152
|
` : "";
|
|
12148
12153
|
return be[be.length - 1] = {
|
|
12149
|
-
...
|
|
12150
|
-
content:
|
|
12154
|
+
...Re,
|
|
12155
|
+
content: Re.content + Ue + I
|
|
12151
12156
|
}, be;
|
|
12152
12157
|
} else
|
|
12153
12158
|
return [
|
|
12154
12159
|
...Q,
|
|
12155
12160
|
{
|
|
12156
12161
|
id: j,
|
|
12157
|
-
content:
|
|
12162
|
+
content: I,
|
|
12158
12163
|
role: ze.ASSISTANT,
|
|
12159
12164
|
timestamp: jt(Date.now()),
|
|
12160
12165
|
isStored: !1
|
|
@@ -12163,9 +12168,9 @@ const $t = (e) => {
|
|
|
12163
12168
|
});
|
|
12164
12169
|
}
|
|
12165
12170
|
}), _.current?.on(P.SYNAPSE_REALTIME_EVENTS.END_OF_STREAM, () => {
|
|
12166
|
-
v.current = !1, Z(!1),
|
|
12171
|
+
v.current = !1, Z(!1), Te(null), X(!1);
|
|
12167
12172
|
}), _.current?.on(P.SYNAPSE_REALTIME_EVENTS.CONNECTED, () => {
|
|
12168
|
-
st(), ie(
|
|
12173
|
+
st(), ie(Ce.CONNECTED);
|
|
12169
12174
|
}), _.current?.on(
|
|
12170
12175
|
P.SYNAPSE_REALTIME_EVENTS.TOOL_CALL,
|
|
12171
12176
|
(R) => {
|
|
@@ -12174,19 +12179,19 @@ const $t = (e) => {
|
|
|
12174
12179
|
if (!x?.messageId || !x?.data || !x?.data?.details?.component || !x?.data?.tool_id)
|
|
12175
12180
|
return;
|
|
12176
12181
|
O && X(!1);
|
|
12177
|
-
const { messageId:
|
|
12182
|
+
const { messageId: I, data: j } = x, se = j.tool_id, Q = `${I}::${se}`, be = Y.getState().elicitationState[Q], Ue = j.details?.component, We = x?.data?.details?._meta?.tool_result, Zt = j.details?.input, Ie = Of(be?.input, Zt, Ue);
|
|
12178
12183
|
let it = x.data.details?._meta?.disp_toast_msg;
|
|
12179
12184
|
const mt = j?.details?._meta?.schema?.required || [];
|
|
12180
12185
|
switch (j?.details?.status) {
|
|
12181
12186
|
case P.SYNAPSE_EICITATION_STATUS.PROGRESS: {
|
|
12182
12187
|
const Me = x?.data?.details?.input || {}, Ve = mt.reduce((lt, gt) => (Me[gt] !== void 0 && (lt[gt] = Me[gt]), lt), {}), ne = { ...be?.server_input || {}, ...Ve }, nt = mt.filter((lt) => !ne[lt]), Tt = x.data.details?._meta?.mcp_meta_fields || [];
|
|
12183
|
-
|
|
12188
|
+
xe(Q, {
|
|
12184
12189
|
tool_id: se,
|
|
12185
12190
|
active: !0,
|
|
12186
12191
|
disabled: !1,
|
|
12187
12192
|
input: Ie,
|
|
12188
12193
|
server_input: ne,
|
|
12189
|
-
messageId:
|
|
12194
|
+
messageId: I,
|
|
12190
12195
|
required: mt,
|
|
12191
12196
|
component: Ue,
|
|
12192
12197
|
pattern: x.data.details?._meta?.schema?.properties?.[x.data.details?.component]?.pattern,
|
|
@@ -12195,7 +12200,7 @@ const $t = (e) => {
|
|
|
12195
12200
|
type: x.data.details?._meta?.schema?.properties?.[x.data.details?.component]?.type,
|
|
12196
12201
|
disp_toast_msg: x.data.details?._meta?.disp_toast_msg,
|
|
12197
12202
|
description: x.data.details?._meta?.schema?.properties?.[x.data.details?.component]?.description,
|
|
12198
|
-
tool_result:
|
|
12203
|
+
tool_result: We,
|
|
12199
12204
|
orientation: x.data.details?._meta?.orientation,
|
|
12200
12205
|
...Tt.length && { mcp_meta_fields: Tt },
|
|
12201
12206
|
...nt ? { toolSelectionNames: nt } : {},
|
|
@@ -12204,7 +12209,7 @@ const $t = (e) => {
|
|
|
12204
12209
|
break;
|
|
12205
12210
|
}
|
|
12206
12211
|
case P.SYNAPSE_EICITATION_STATUS.SUCCESS: {
|
|
12207
|
-
|
|
12212
|
+
xe(Q, {
|
|
12208
12213
|
...be || {},
|
|
12209
12214
|
tool_id: se,
|
|
12210
12215
|
// disabled: !isActiveComponent(component),
|
|
@@ -12212,46 +12217,46 @@ const $t = (e) => {
|
|
|
12212
12217
|
//Oce BE changes for messsage id is done, we will change this
|
|
12213
12218
|
active: ru(Ue),
|
|
12214
12219
|
//to continue tool calls
|
|
12215
|
-
messageId:
|
|
12220
|
+
messageId: I,
|
|
12216
12221
|
component: Ue,
|
|
12217
12222
|
input: Ie,
|
|
12218
|
-
tool_result:
|
|
12223
|
+
tool_result: We,
|
|
12219
12224
|
send_to_llm: !0
|
|
12220
12225
|
//to send the tool results immediately after success
|
|
12221
12226
|
});
|
|
12222
12227
|
break;
|
|
12223
12228
|
}
|
|
12224
12229
|
case P.SYNAPSE_EICITATION_STATUS.FAILURE: {
|
|
12225
|
-
|
|
12230
|
+
xe(Q, {
|
|
12226
12231
|
...be || {},
|
|
12227
12232
|
tool_id: se,
|
|
12228
12233
|
active: !1,
|
|
12229
|
-
messageId:
|
|
12234
|
+
messageId: I,
|
|
12230
12235
|
response_value: { label: j?.details?._meta?.disp_message || "Tool call failed" },
|
|
12231
|
-
tool_result:
|
|
12236
|
+
tool_result: We,
|
|
12232
12237
|
disabled: !0
|
|
12233
12238
|
});
|
|
12234
12239
|
break;
|
|
12235
12240
|
}
|
|
12236
12241
|
default:
|
|
12237
|
-
|
|
12242
|
+
xe(Q, {
|
|
12238
12243
|
tool_id: se,
|
|
12239
12244
|
disabled: !1,
|
|
12240
12245
|
active: !1,
|
|
12241
|
-
messageId:
|
|
12242
|
-
tool_result:
|
|
12246
|
+
messageId: I,
|
|
12247
|
+
tool_result: We,
|
|
12243
12248
|
input: Ie,
|
|
12244
12249
|
// send_to_llm: true,
|
|
12245
12250
|
component: Ue
|
|
12246
12251
|
});
|
|
12247
12252
|
}
|
|
12248
|
-
it &&
|
|
12253
|
+
it && $e(it);
|
|
12249
12254
|
const pt = x?.data?.details?._meta?.user_hint;
|
|
12250
12255
|
i((Me) => {
|
|
12251
|
-
let ne = Me[Me.length - 1]?.id ===
|
|
12256
|
+
let ne = Me[Me.length - 1]?.id === I ? Me.length - 1 : Me.findIndex?.((nt) => nt.id === I);
|
|
12252
12257
|
if (ne == -1) {
|
|
12253
12258
|
const nt = {
|
|
12254
|
-
id:
|
|
12259
|
+
id: I,
|
|
12255
12260
|
content: x.data?.details?.input?.text || "",
|
|
12256
12261
|
role: ze.ASSISTANT,
|
|
12257
12262
|
tool_keys: [Q],
|
|
@@ -12268,44 +12273,44 @@ const $t = (e) => {
|
|
|
12268
12273
|
tool_keys: [.../* @__PURE__ */ new Set([...Me[ne].tool_keys || [], Q])],
|
|
12269
12274
|
...pt ? { userHint: pt } : {}
|
|
12270
12275
|
};
|
|
12271
|
-
Me[ne] = nt, he(b,
|
|
12276
|
+
Me[ne] = nt, he(b, I, nt);
|
|
12272
12277
|
}
|
|
12273
12278
|
return [...Me];
|
|
12274
12279
|
});
|
|
12275
|
-
const Lt = x?.data?.details?._meta?.disp_message, hn =
|
|
12276
|
-
if ((!hn[Q]?.active || hn[Q]?.send_to_llm) && (Lt || Object.keys(
|
|
12280
|
+
const Lt = x?.data?.details?._meta?.disp_message, hn = Y.getState().elicitationState;
|
|
12281
|
+
if ((!hn[Q]?.active || hn[Q]?.send_to_llm) && (Lt || Object.keys(We || {}).length))
|
|
12277
12282
|
try {
|
|
12278
|
-
Mt({ message: Lt || "", tool_result:
|
|
12283
|
+
Mt({ message: Lt || "", tool_result: We, toolCalled: !0, tool_key: Q });
|
|
12279
12284
|
} catch {
|
|
12280
12285
|
}
|
|
12281
12286
|
}
|
|
12282
12287
|
), _.current?.on(P.SYNAPSE_REALTIME_EVENTS.DISCONNECTED, (R) => {
|
|
12283
12288
|
if (R?.reason === P.DisconnectionReason.CLIENT_CLOSED) return;
|
|
12284
12289
|
const x = typeof navigator < "u" && !navigator.onLine;
|
|
12285
|
-
if (ie(
|
|
12286
|
-
|
|
12290
|
+
if (ie(Ce.NOT_CONNECTED), x) {
|
|
12291
|
+
B({
|
|
12287
12292
|
title: "No internet connection",
|
|
12288
12293
|
description: "Will reconnect automatically when internet is restored."
|
|
12289
|
-
}),
|
|
12294
|
+
}), H(!1);
|
|
12290
12295
|
return;
|
|
12291
12296
|
}
|
|
12292
|
-
m.current < 2 ? (m.current = m.current + 1,
|
|
12297
|
+
m.current < 2 ? (m.current = m.current + 1, H(!0), B({
|
|
12293
12298
|
title: "Something went wrong!",
|
|
12294
12299
|
description: "Please try again."
|
|
12295
|
-
})) : (
|
|
12300
|
+
})) : (B({
|
|
12296
12301
|
title: "Something went wrong!",
|
|
12297
12302
|
description: "Please start a new Chat."
|
|
12298
|
-
}),
|
|
12303
|
+
}), G(!0));
|
|
12299
12304
|
}), _.current?.on(P.SYNAPSE_REALTIME_EVENTS.ERROR, (R) => {
|
|
12300
12305
|
switch (R?.data?.code) {
|
|
12301
12306
|
case P.SYNAPSE_REALTIME_ERROR_CODES.SESSION_INACTIVE:
|
|
12302
|
-
|
|
12307
|
+
G(!0), _e(Ee.IDLE);
|
|
12303
12308
|
return;
|
|
12304
12309
|
case P.SYNAPSE_REALTIME_ERROR_CODES.SESSION_TOKEN_MISMATCH:
|
|
12305
|
-
|
|
12310
|
+
B({
|
|
12306
12311
|
title: "Session not found",
|
|
12307
12312
|
description: "Please start a new chat from onError callback"
|
|
12308
|
-
}),
|
|
12313
|
+
}), G(!0), _e(Ee.IDLE);
|
|
12309
12314
|
return;
|
|
12310
12315
|
case P.SYNAPSE_REALTIME_ERROR_CODES.SESSION_NOT_OWNED:
|
|
12311
12316
|
Pt();
|
|
@@ -12319,68 +12324,68 @@ const $t = (e) => {
|
|
|
12319
12324
|
m.current++, un();
|
|
12320
12325
|
return;
|
|
12321
12326
|
}
|
|
12322
|
-
|
|
12327
|
+
B({
|
|
12323
12328
|
title: "Error parsing request",
|
|
12324
12329
|
description: "please try again"
|
|
12325
|
-
}),
|
|
12330
|
+
}), H(!0), _e(Ee.IDLE);
|
|
12326
12331
|
return;
|
|
12327
12332
|
case P.SYNAPSE_REALTIME_ERROR_CODES.TIMEOUT:
|
|
12328
|
-
|
|
12333
|
+
B({
|
|
12329
12334
|
title: "Request timed out",
|
|
12330
12335
|
description: "please try again"
|
|
12331
|
-
}),
|
|
12336
|
+
}), H(!0), _e(Ee.IDLE);
|
|
12332
12337
|
return;
|
|
12333
12338
|
case P.SYNAPSE_REALTIME_ERROR_CODES.PROMPT_FETCH_ERROR:
|
|
12334
|
-
|
|
12339
|
+
B({
|
|
12335
12340
|
title: "Something went wrong",
|
|
12336
12341
|
description: "please try again"
|
|
12337
|
-
}),
|
|
12342
|
+
}), H(!0), _e(Ee.IDLE);
|
|
12338
12343
|
return;
|
|
12339
12344
|
case P.SYNAPSE_REALTIME_ERROR_CODES.INVALID_FILE_REQUEST:
|
|
12340
|
-
|
|
12345
|
+
B({
|
|
12341
12346
|
title: "Something went wrong",
|
|
12342
12347
|
description: "please try again"
|
|
12343
|
-
}),
|
|
12348
|
+
}), H(!0), _e(Ee.IDLE);
|
|
12344
12349
|
return;
|
|
12345
12350
|
case P.SYNAPSE_REALTIME_ERROR_CODES.SERVER_ERROR:
|
|
12346
|
-
|
|
12351
|
+
B({
|
|
12347
12352
|
title: "Something went wrong",
|
|
12348
12353
|
description: "please try again"
|
|
12349
|
-
}),
|
|
12354
|
+
}), H(!0), _e(Ee.IDLE);
|
|
12350
12355
|
return;
|
|
12351
12356
|
default:
|
|
12352
|
-
|
|
12357
|
+
B({
|
|
12353
12358
|
title: "Something went wrong",
|
|
12354
12359
|
description: "please try again"
|
|
12355
|
-
}),
|
|
12360
|
+
}), H(!0), _e(Ee.IDLE);
|
|
12356
12361
|
return;
|
|
12357
12362
|
}
|
|
12358
12363
|
}), _.current?.on(P.SYNAPSE_REALTIME_EVENTS.AUDIO_TRANSCRIPT, async (R) => {
|
|
12359
12364
|
const x = R;
|
|
12360
|
-
x?.data?.text && (i((
|
|
12365
|
+
x?.data?.text && (i((I) => [...I, {
|
|
12361
12366
|
id: Date.now().toString(),
|
|
12362
12367
|
content: x.data.text || "",
|
|
12363
12368
|
role: ze.USER,
|
|
12364
12369
|
timestamp: jt(Date.now()),
|
|
12365
12370
|
isStored: !0
|
|
12366
|
-
}]), _e(Ee.IDLE)), Z(!1), X(!1),
|
|
12371
|
+
}]), _e(Ee.IDLE)), Z(!1), X(!1), Te(null);
|
|
12367
12372
|
}), _.current?.on(P.SYNAPSE_REALTIME_EVENTS.PROGRESS_MESSAGE, (R) => {
|
|
12368
12373
|
v.current = !0;
|
|
12369
12374
|
const x = R;
|
|
12370
|
-
x.data?.text && (X(!1),
|
|
12375
|
+
x.data?.text && (X(!1), Te(x.data.text));
|
|
12371
12376
|
}), _.current?.on(P.SYNAPSE_REALTIME_EVENTS.TOOL_START, (R) => {
|
|
12372
12377
|
v.current = !0;
|
|
12373
12378
|
const x = R;
|
|
12374
12379
|
if (x.data?.name && x.messageId) {
|
|
12375
|
-
const
|
|
12380
|
+
const I = x.messageId;
|
|
12376
12381
|
i((j) => {
|
|
12377
12382
|
const se = j[j.length - 1];
|
|
12378
|
-
if (se && se.id ===
|
|
12383
|
+
if (se && se.id === I && se.role === ze.ASSISTANT) {
|
|
12379
12384
|
const Q = [...j];
|
|
12380
12385
|
return Q[Q.length - 1] = {
|
|
12381
12386
|
...se,
|
|
12382
12387
|
toolCallStatus: `Calling tool: ${x.data.name}...`
|
|
12383
|
-
}, b && he(b,
|
|
12388
|
+
}, b && he(b, I, {
|
|
12384
12389
|
toolCallStatus: `Calling tool: ${x.data.name}...`
|
|
12385
12390
|
}), Q;
|
|
12386
12391
|
}
|
|
@@ -12391,15 +12396,15 @@ const $t = (e) => {
|
|
|
12391
12396
|
v.current = !0;
|
|
12392
12397
|
const x = R;
|
|
12393
12398
|
if (x.data?.name && x.messageId) {
|
|
12394
|
-
const
|
|
12399
|
+
const I = x.messageId;
|
|
12395
12400
|
i((j) => {
|
|
12396
12401
|
const se = j[j.length - 1];
|
|
12397
|
-
if (se && se.id ===
|
|
12402
|
+
if (se && se.id === I && se.role === ze.ASSISTANT) {
|
|
12398
12403
|
const Q = [...j];
|
|
12399
12404
|
return Q[Q.length - 1] = {
|
|
12400
12405
|
...se,
|
|
12401
12406
|
toolCallStatus: "Tool call completed."
|
|
12402
|
-
}, b && he(b,
|
|
12407
|
+
}, b && he(b, I, {
|
|
12403
12408
|
toolCallStatus: "Tool call completed."
|
|
12404
12409
|
}), Q;
|
|
12405
12410
|
}
|
|
@@ -12410,25 +12415,25 @@ const $t = (e) => {
|
|
|
12410
12415
|
}, Mt = async ({
|
|
12411
12416
|
message: R,
|
|
12412
12417
|
files: x,
|
|
12413
|
-
audio:
|
|
12418
|
+
audio: I,
|
|
12414
12419
|
toolCalled: j,
|
|
12415
12420
|
selectedComponent: se,
|
|
12416
12421
|
resend: Q,
|
|
12417
|
-
tool_declined:
|
|
12422
|
+
tool_declined: Re,
|
|
12418
12423
|
tool_result: be,
|
|
12419
12424
|
tool_key: Ue
|
|
12420
12425
|
}) => {
|
|
12421
|
-
const
|
|
12422
|
-
if (!(!j && (!x || x.length === 0) && !R?.trim() && !
|
|
12426
|
+
const We = Y.getState().elicitationState, Zt = Object.values(We).some((Ie) => Ie.active);
|
|
12427
|
+
if (!(!j && (!x || x.length === 0) && !R?.trim() && !I?.audio && !se && !Zt && !be && !Object.keys(be || {}).length)) {
|
|
12423
12428
|
if (x && x.length > 3) {
|
|
12424
|
-
|
|
12429
|
+
B({
|
|
12425
12430
|
title: "Maximum 3 files are allowed to be sent at a time",
|
|
12426
12431
|
description: "Please try again"
|
|
12427
12432
|
});
|
|
12428
12433
|
return;
|
|
12429
12434
|
}
|
|
12430
12435
|
if (x && x.length > 0 && x.reduce((Ie, it) => Ie + it.size, 0) > 10 * 1024 * 1024) {
|
|
12431
|
-
|
|
12436
|
+
B({
|
|
12432
12437
|
title: "Total file size limit of 10MB exceeded",
|
|
12433
12438
|
description: "Please reduce the size of the files or try again with less files"
|
|
12434
12439
|
});
|
|
@@ -12436,35 +12441,35 @@ const $t = (e) => {
|
|
|
12436
12441
|
}
|
|
12437
12442
|
if (x && x.length > 0 && x.length + re > Xr) {
|
|
12438
12443
|
const Ie = Xr - re;
|
|
12439
|
-
|
|
12444
|
+
B({
|
|
12440
12445
|
title: `You can only upload up to ${Xr} files per session`,
|
|
12441
12446
|
description: `${Ie <= 0 ? "Maximum file upload limit reached" : `You have ${Ie} file${Ie === 1 ? "" : "s"} upload${Ie === 1 ? "" : "s"} left`}`
|
|
12442
12447
|
});
|
|
12443
12448
|
return;
|
|
12444
|
-
} else x && x.length &&
|
|
12445
|
-
|
|
12449
|
+
} else x && x.length && Ze(re + x.length);
|
|
12450
|
+
B(null), H(!1), Xe() && ie(Ce.CONNECTED);
|
|
12446
12451
|
try {
|
|
12447
12452
|
const Ie = l.length == 2 && h.length == 2 ? h : null;
|
|
12448
12453
|
let it = null, mt = null;
|
|
12449
|
-
const pt = l.length - 1, Lt = pt >= 0 ? l[pt] : null, Me =
|
|
12454
|
+
const pt = l.length - 1, Lt = pt >= 0 ? l[pt] : null, Me = Y.getState().elicitationState, Ve = Ue || null, ne = Ve ? Me[Ve] : void 0, Tt = ne?.component === P.SYNAPSE_COMPONENTS.DOCTOR_CARD || ne?.component === P.SYNAPSE_COMPONENTS.CARD ? !!ne && !be && !!ne.active : !!ne?.active, lt = !!(x || []).length || !!I?.audio || !!Re || !Tt || !j, gt = se ? se.label : void 0, Xt = ne?.component === P.SYNAPSE_COMPONENTS.PILL && typeof gt == "string" ? gt : null;
|
|
12450
12455
|
if (!lt && Tt && Ve && ne?.messageId) {
|
|
12451
|
-
const ee = ne.toolSelectionNames?.length ? ne.toolSelectionNames : ne.required?.filter((
|
|
12456
|
+
const ee = ne.toolSelectionNames?.length ? ne.toolSelectionNames : ne.required?.filter((we) => !ne.server_input?.[we]) ?? [], Ne = ee.reduce((we, Se) => {
|
|
12452
12457
|
if (se) {
|
|
12453
12458
|
const pn = se[Se];
|
|
12454
|
-
pn !== void 0 && (
|
|
12455
|
-
} else ee.length === 1 && (
|
|
12456
|
-
return
|
|
12457
|
-
}, {}), ct = ne.mcp_meta_fields?.reduce((
|
|
12459
|
+
pn !== void 0 && (we[Se] = pn);
|
|
12460
|
+
} else ee.length === 1 && (we[Se] = R);
|
|
12461
|
+
return we;
|
|
12462
|
+
}, {}), ct = ne.mcp_meta_fields?.reduce((we, Se) => (ee.includes(Se) ? we[Se] = Ne[Se] : ne.server_input?.[Se] && (we[Se] = ne.server_input[Se]), Q && !we.is_resend && (we.is_resend = Q), we), {}), fn = Object.keys(ne.server_input || {})?.reduce((we, Se) => {
|
|
12458
12463
|
const pn = !Object.keys(ct || {})?.includes(Se), cs = !!ne.server_input?.[Se];
|
|
12459
|
-
return (Q ? pn && cs : pn && ne.required?.includes(Se) && cs) && (
|
|
12460
|
-
}, {}), Lr = Q ? {} : (ne.required || ee).reduce((
|
|
12464
|
+
return (Q ? pn && cs : pn && ne.required?.includes(Se) && cs) && (we[Se] = ne.server_input?.[Se]), we;
|
|
12465
|
+
}, {}), Lr = Q ? {} : (ne.required || ee).reduce((we, Se) => (Object.keys(ct || {}).includes(Se) || (Ne[Se] !== void 0 ? we[Se] = Ne[Se] : se && se[Se] !== void 0 && (we[Se] = se[Se])), we), {}), mn = {
|
|
12461
12466
|
...fn || {},
|
|
12462
12467
|
//existing inputs
|
|
12463
12468
|
...Lr,
|
|
12464
12469
|
...Object.keys(ct || {}).length && { mcp_meta_fields: ct }
|
|
12465
12470
|
};
|
|
12466
12471
|
if (!Object.keys(mn).length) return;
|
|
12467
|
-
await
|
|
12472
|
+
await xe(Ve, {
|
|
12468
12473
|
...ne,
|
|
12469
12474
|
server_input: {
|
|
12470
12475
|
...ne.server_input || {},
|
|
@@ -12473,16 +12478,16 @@ const $t = (e) => {
|
|
|
12473
12478
|
});
|
|
12474
12479
|
try {
|
|
12475
12480
|
await rr(ne.tool_id, ne.messageId, mn), it = !0;
|
|
12476
|
-
} catch (
|
|
12477
|
-
await _.current?.sendMessage({ tool_result: { ...ne.tool_result, error: `Tool call failed: ${$t(
|
|
12481
|
+
} catch (we) {
|
|
12482
|
+
await _.current?.sendMessage({ tool_result: { ...ne.tool_result, error: `Tool call failed: ${$t(we)}` } }), mt = "Tool call failed", xe(Ve, {
|
|
12478
12483
|
...ne,
|
|
12479
12484
|
active: !1,
|
|
12480
12485
|
disabled: !0,
|
|
12481
|
-
response_value: { label: `Tool call failed: ${$t(
|
|
12486
|
+
response_value: { label: `Tool call failed: ${$t(we)}` }
|
|
12482
12487
|
});
|
|
12483
12488
|
}
|
|
12484
12489
|
} else {
|
|
12485
|
-
const ee = Lt?.id,
|
|
12490
|
+
const ee = Lt?.id, Ne = ee ? Object.entries(We).filter(([fn, Lr]) => {
|
|
12486
12491
|
const [mn] = fn.split("::");
|
|
12487
12492
|
return mn === ee && Lr.active;
|
|
12488
12493
|
}) : [], ct = be ?? ne?.tool_result;
|
|
@@ -12490,18 +12495,18 @@ const $t = (e) => {
|
|
|
12490
12495
|
// Always a string — a tool_result forward with no user text sends "".
|
|
12491
12496
|
message: R ?? "",
|
|
12492
12497
|
files: x,
|
|
12493
|
-
audio:
|
|
12498
|
+
audio: I,
|
|
12494
12499
|
...Ie && { initial_prompts: Ie },
|
|
12495
|
-
...
|
|
12500
|
+
...Re || Ne.length > 0 ? {
|
|
12496
12501
|
tool_declined: !0,
|
|
12497
12502
|
tool_id: ne?.tool_id || ""
|
|
12498
12503
|
} : {},
|
|
12499
12504
|
...ct && { tool_result: ct }
|
|
12500
12505
|
});
|
|
12501
12506
|
}
|
|
12502
|
-
(R || x && x.length > 0 ||
|
|
12507
|
+
(R || x && x.length > 0 || I?.audio || Xt || mt) && (i((ee) => {
|
|
12503
12508
|
if (it) return ee;
|
|
12504
|
-
const
|
|
12509
|
+
const Ne = ee.length === 0 && A?.text ? [{
|
|
12505
12510
|
id: "initial-bot-message",
|
|
12506
12511
|
content: A.text,
|
|
12507
12512
|
role: ze.ASSISTANT,
|
|
@@ -12510,27 +12515,27 @@ const $t = (e) => {
|
|
|
12510
12515
|
}] : [];
|
|
12511
12516
|
return [
|
|
12512
12517
|
...ee,
|
|
12513
|
-
...
|
|
12518
|
+
...Ne,
|
|
12514
12519
|
{
|
|
12515
12520
|
id: Date.now().toString(),
|
|
12516
12521
|
content: Xt || mt || R || "",
|
|
12517
12522
|
files: x || [],
|
|
12518
|
-
audio:
|
|
12523
|
+
audio: I,
|
|
12519
12524
|
role: ze.USER,
|
|
12520
12525
|
timestamp: jt(Date.now()),
|
|
12521
12526
|
isStored: !1
|
|
12522
12527
|
}
|
|
12523
12528
|
];
|
|
12524
12529
|
}), it || X(!0), it = null);
|
|
12525
|
-
const Pr =
|
|
12530
|
+
const Pr = Y.getState().elicitationState, ae = /* @__PURE__ */ new Set();
|
|
12526
12531
|
Ve && ae.add(Ve), Lt?.tool_keys?.forEach((ee) => ae.add(ee)), ae.forEach((ee) => {
|
|
12527
|
-
const
|
|
12528
|
-
|
|
12529
|
-
...
|
|
12532
|
+
const Ne = Pr[ee];
|
|
12533
|
+
Ne && xe(ee, {
|
|
12534
|
+
...Ne,
|
|
12530
12535
|
...lt && { active: !1, disabled: !0 },
|
|
12531
12536
|
...ee === Ve ? {
|
|
12532
12537
|
response_value: {
|
|
12533
|
-
...
|
|
12538
|
+
...Ne?.response_value || {},
|
|
12534
12539
|
label: Xt || R || ""
|
|
12535
12540
|
}
|
|
12536
12541
|
} : {}
|
|
@@ -12544,10 +12549,10 @@ const $t = (e) => {
|
|
|
12544
12549
|
"image/jpeg",
|
|
12545
12550
|
"image/jpg",
|
|
12546
12551
|
"image/png"
|
|
12547
|
-
].includes(R.type) ? (
|
|
12552
|
+
].includes(R.type) ? (B({
|
|
12548
12553
|
title: `File type not supported: ${R.name}`,
|
|
12549
12554
|
description: "Only PDF, images (JPG, JPEG, PNG) are allowed."
|
|
12550
|
-
}), !1) : R.size > 3 * 1024 * 1024 ? (
|
|
12555
|
+
}), !1) : R.size > 3 * 1024 * 1024 ? (B({
|
|
12551
12556
|
title: "File size limit of 3MB exceeded",
|
|
12552
12557
|
description: "Please reduce the size of the file or try again with a smaller file"
|
|
12553
12558
|
}), !1) : !0, Ir = async () => {
|
|
@@ -12565,14 +12570,14 @@ const $t = (e) => {
|
|
|
12565
12570
|
}
|
|
12566
12571
|
}, Mr = () => {
|
|
12567
12572
|
_.current?.endRecording();
|
|
12568
|
-
}, rr = async (R, x,
|
|
12573
|
+
}, rr = async (R, x, I) => {
|
|
12569
12574
|
try {
|
|
12570
|
-
if (!
|
|
12575
|
+
if (!Xe())
|
|
12571
12576
|
throw new Error("Not connected to the server");
|
|
12572
12577
|
await _.current?.callTool(
|
|
12573
12578
|
R,
|
|
12574
12579
|
x,
|
|
12575
|
-
|
|
12580
|
+
I
|
|
12576
12581
|
);
|
|
12577
12582
|
} catch (j) {
|
|
12578
12583
|
throw j;
|
|
@@ -12580,8 +12585,8 @@ const $t = (e) => {
|
|
|
12580
12585
|
}, Pt = async () => {
|
|
12581
12586
|
st(), await ce(), await tt({ forceNewSession: !0 });
|
|
12582
12587
|
}, un = async () => {
|
|
12583
|
-
if (
|
|
12584
|
-
ie(
|
|
12588
|
+
if (Xe()) {
|
|
12589
|
+
ie(Ce.CONNECTED);
|
|
12585
12590
|
const R = c.current[c.current.length - 1];
|
|
12586
12591
|
if (R && R.role === ze.USER)
|
|
12587
12592
|
try {
|
|
@@ -12593,16 +12598,16 @@ const $t = (e) => {
|
|
|
12593
12598
|
});
|
|
12594
12599
|
} catch {
|
|
12595
12600
|
}
|
|
12596
|
-
} else if (ie(
|
|
12601
|
+
} else if (ie(Ce.NOT_CONNECTED), m.current < 2) {
|
|
12597
12602
|
m.current++;
|
|
12598
|
-
const { sessionId: R } =
|
|
12603
|
+
const { sessionId: R } = Y.getState();
|
|
12599
12604
|
await Ae(R);
|
|
12600
|
-
} else m.current === 2 ? (m.current++,
|
|
12605
|
+
} else m.current === 2 ? (m.current++, H(!0), B({
|
|
12601
12606
|
title: "Trying to connect..."
|
|
12602
|
-
})) : (
|
|
12607
|
+
})) : (B({
|
|
12603
12608
|
title: "Something went wrong!",
|
|
12604
12609
|
description: "Please start a new chat."
|
|
12605
|
-
}),
|
|
12610
|
+
}), G(!0));
|
|
12606
12611
|
};
|
|
12607
12612
|
return {
|
|
12608
12613
|
sendMessage: Mt,
|
|
@@ -12630,14 +12635,14 @@ const $t = (e) => {
|
|
|
12630
12635
|
if (!A?.suggestions?.length || !R)
|
|
12631
12636
|
return;
|
|
12632
12637
|
const x = A.suggestions.find(
|
|
12633
|
-
(
|
|
12638
|
+
(I) => I.value === R
|
|
12634
12639
|
);
|
|
12635
12640
|
if (!x || !x.response) {
|
|
12636
12641
|
await Mt({ message: R });
|
|
12637
12642
|
return;
|
|
12638
12643
|
}
|
|
12639
|
-
i((
|
|
12640
|
-
...
|
|
12644
|
+
i((I) => [
|
|
12645
|
+
...I,
|
|
12641
12646
|
{
|
|
12642
12647
|
id: Date.now().toString(),
|
|
12643
12648
|
content: R,
|
|
@@ -12646,8 +12651,8 @@ const $t = (e) => {
|
|
|
12646
12651
|
isStored: !1
|
|
12647
12652
|
}
|
|
12648
12653
|
]), X(!0), await ou(1e3), X(!1), i(
|
|
12649
|
-
(
|
|
12650
|
-
...
|
|
12654
|
+
(I) => [
|
|
12655
|
+
...I,
|
|
12651
12656
|
{
|
|
12652
12657
|
id: Date.now().toString(),
|
|
12653
12658
|
content: x.response || "Please try again",
|
|
@@ -12658,22 +12663,22 @@ const $t = (e) => {
|
|
|
12658
12663
|
]
|
|
12659
12664
|
), E([{ role: "user", text: R }, { role: "assistant", text: x.response }]);
|
|
12660
12665
|
},
|
|
12661
|
-
sendMessageFeedback: async (R, x,
|
|
12662
|
-
if (
|
|
12666
|
+
sendMessageFeedback: async (R, x, I) => {
|
|
12667
|
+
if (Xe())
|
|
12663
12668
|
try {
|
|
12664
|
-
await _.current?.sendMessageFeedback(x, R,
|
|
12669
|
+
await _.current?.sendMessageFeedback(x, R, I);
|
|
12665
12670
|
} catch {
|
|
12666
12671
|
}
|
|
12667
12672
|
},
|
|
12668
12673
|
sendSessionFeedback: async (R, x) => {
|
|
12669
|
-
if (!(!
|
|
12674
|
+
if (!(!Xe() || !R?.length && !x))
|
|
12670
12675
|
try {
|
|
12671
12676
|
await _.current?.sendSessionFeedback(R, x);
|
|
12672
12677
|
} catch {
|
|
12673
12678
|
}
|
|
12674
12679
|
},
|
|
12675
12680
|
clearElicitationState: async (R, x) => {
|
|
12676
|
-
const
|
|
12681
|
+
const I = Y.getState().elicitationState, j = R ? I[R] : void 0;
|
|
12677
12682
|
try {
|
|
12678
12683
|
await Mt({
|
|
12679
12684
|
message: x || "User aborted elicitation",
|
|
@@ -12683,12 +12688,12 @@ const $t = (e) => {
|
|
|
12683
12688
|
});
|
|
12684
12689
|
} catch {
|
|
12685
12690
|
} finally {
|
|
12686
|
-
R && j &&
|
|
12691
|
+
R && j && xe(R, { ...j, active: !1, disabled: !0 });
|
|
12687
12692
|
}
|
|
12688
12693
|
}
|
|
12689
12694
|
};
|
|
12690
12695
|
}, Uf = 32, Vf = 100, zf = 320;
|
|
12691
|
-
function
|
|
12696
|
+
function Bf() {
|
|
12692
12697
|
return typeof window > "u" || !window.matchMedia ? !1 : window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
12693
12698
|
}
|
|
12694
12699
|
function $f({
|
|
@@ -12700,7 +12705,7 @@ function $f({
|
|
|
12700
12705
|
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
12706
|
"[data-radix-scroll-area-viewport]"
|
|
12702
12707
|
) || null, []), y = le(
|
|
12703
|
-
(S) =>
|
|
12708
|
+
(S) => Bf() ? "auto" : S,
|
|
12704
12709
|
[]
|
|
12705
12710
|
), m = le(
|
|
12706
12711
|
(S) => {
|
|
@@ -12771,7 +12776,7 @@ function $f({
|
|
|
12771
12776
|
};
|
|
12772
12777
|
}
|
|
12773
12778
|
const So = "eka-medassist-agent-config";
|
|
12774
|
-
function
|
|
12779
|
+
function Hf(e) {
|
|
12775
12780
|
try {
|
|
12776
12781
|
const t = localStorage.getItem(So);
|
|
12777
12782
|
return (t ? JSON.parse(t) : {})[e]?.feedback_hidden === !0;
|
|
@@ -12796,7 +12801,7 @@ function Yf({ isOpen: e, agentId: t, config: n }) {
|
|
|
12796
12801
|
toggleMute: c
|
|
12797
12802
|
} = oh(), d = () => {
|
|
12798
12803
|
r === P.VOICE_AGENT_STATE.IDLE && s();
|
|
12799
|
-
}, f = r !== P.VOICE_AGENT_STATE.IDLE, [u, p] = F(""), [y, m] = F(!1), g =
|
|
12804
|
+
}, f = r !== P.VOICE_AGENT_STATE.IDLE, [u, p] = F(""), [y, m] = F(!1), g = Y((ae) => ae.setDisplayMode), [S, h] = F(
|
|
12800
12805
|
n.displayMode === "full" ? "full" : "widget"
|
|
12801
12806
|
), E = () => h((ae) => ae === "full" ? "widget" : "full"), N = Fl() ? "mobile" : S, [w, C] = F([]), v = W(!1), [T, b] = F(!1), [k, O] = F(!1), A = W(null), {
|
|
12802
12807
|
setAgentId: $,
|
|
@@ -12804,30 +12809,30 @@ function Yf({ isOpen: e, agentId: t, config: n }) {
|
|
|
12804
12809
|
showRetryButton: K,
|
|
12805
12810
|
clearError: ue,
|
|
12806
12811
|
error: oe,
|
|
12807
|
-
connectionStatus:
|
|
12808
|
-
recordingStatus:
|
|
12812
|
+
connectionStatus: M,
|
|
12813
|
+
recordingStatus: B,
|
|
12809
12814
|
isWaitingForResponse: ie,
|
|
12810
|
-
isStreaming:
|
|
12811
|
-
setError:
|
|
12815
|
+
isStreaming: H,
|
|
12816
|
+
setError: G,
|
|
12812
12817
|
sessionId: Z,
|
|
12813
12818
|
setContext: X,
|
|
12814
|
-
initialMessage:
|
|
12819
|
+
initialMessage: Te,
|
|
12815
12820
|
setInitialMessage: _e,
|
|
12816
12821
|
sessionInitialMessages: ce,
|
|
12817
|
-
setInitialDisplayMode:
|
|
12818
|
-
clearSession:
|
|
12819
|
-
} =
|
|
12822
|
+
setInitialDisplayMode: Be,
|
|
12823
|
+
clearSession: Ye
|
|
12824
|
+
} = Y(), D = Y((ae) => ae.elicitationState), ye = Y((ae) => ae.level), he = n?.theme?.feature === !0, {
|
|
12820
12825
|
incomingMessages: me,
|
|
12821
|
-
loading:
|
|
12822
|
-
isLoadingSessionMessages:
|
|
12823
|
-
sendMessage:
|
|
12826
|
+
loading: Ze,
|
|
12827
|
+
isLoadingSessionMessages: $e,
|
|
12828
|
+
sendMessage: xe,
|
|
12824
12829
|
startSession: Fe,
|
|
12825
12830
|
isReady: ke,
|
|
12826
12831
|
startRecording: ft,
|
|
12827
12832
|
stopRecording: Ae,
|
|
12828
|
-
handleRetry:
|
|
12833
|
+
handleRetry: Ge,
|
|
12829
12834
|
isValidFile: tt,
|
|
12830
|
-
sendMessageFeedback:
|
|
12835
|
+
sendMessageFeedback: Xe,
|
|
12831
12836
|
clearElicitationState: Ot,
|
|
12832
12837
|
sendSessionFeedback: st,
|
|
12833
12838
|
getPastSessions: It
|
|
@@ -12859,13 +12864,13 @@ function Yf({ isOpen: e, agentId: t, config: n }) {
|
|
|
12859
12864
|
z(() => {
|
|
12860
12865
|
!he || N !== "full" || ye !== "user" || Kt();
|
|
12861
12866
|
}, [he, N, ye, Z, Kt]), z(() => {
|
|
12862
|
-
t && (A.current !== t && (Qu(t), eh(t), $(t), n.force &&
|
|
12867
|
+
t && (A.current !== t && (Qu(t), eh(t), $(t), n.force && Ye(), (n.displayMode === "full" || n.displayMode === "widget") && (g(n.displayMode), Be(n.displayMode)), n?.context && Object.keys(n?.context || {}).length && X(n.context), (n?.initialMessage?.text || n?.initialMessage?.suggestions?.length) && _e(n.initialMessage), A.current = t), e && ke && !v.current && (v.current = !0, Fe({ forceNewSession: !1 })));
|
|
12863
12868
|
}, [e, ke, t]), z(() => () => {
|
|
12864
12869
|
l();
|
|
12865
12870
|
}, []);
|
|
12866
12871
|
const x = () => {
|
|
12867
|
-
n.feedback && !
|
|
12868
|
-
},
|
|
12872
|
+
n.feedback && !Hf(t) ? O(!0) : n.onClose();
|
|
12873
|
+
}, I = async (ae, ee) => {
|
|
12869
12874
|
await st(ae, ee), O(!1), n.onClose();
|
|
12870
12875
|
}, j = () => {
|
|
12871
12876
|
O(!1), n.onClose();
|
|
@@ -12873,41 +12878,41 @@ function Yf({ isOpen: e, agentId: t, config: n }) {
|
|
|
12873
12878
|
jf(t), O(!1), n.onClose();
|
|
12874
12879
|
}, Q = () => {
|
|
12875
12880
|
O(!1);
|
|
12876
|
-
},
|
|
12881
|
+
}, Re = me.length > 0, be = me.length === 1, Ue = fe(() => {
|
|
12877
12882
|
const ae = me[me.length - 1], ee = ae?.tool_keys?.[ae.tool_keys.length - 1];
|
|
12878
12883
|
if (!ee) return null;
|
|
12879
|
-
const
|
|
12880
|
-
return
|
|
12881
|
-
}, [me, D]),
|
|
12884
|
+
const Ne = D[ee];
|
|
12885
|
+
return Ne?.active ? { ...Ne, tool_key: ee } : null;
|
|
12886
|
+
}, [me, D]), We = fe(() => (Z ? ce[Z] : void 0) ?? Te ?? n?.initialMessage ?? null, [Z, ce, Te, n?.initialMessage]), Zt = fe(() => !!We?.text || !!We?.suggestions?.length, [We]), Ie = fe(() => Zt && me?.length === 0 && !$e, [me, Zt, $e]), it = fe(() => Ue ? Ue.component === P.SYNAPSE_COMPONENTS.MOBILE || Ue.component === P.SYNAPSE_COMPONENTS.OTP || Ue.component === P.SYNAPSE_COMPONENTS.EMAIL : !1, [Ue]), {
|
|
12882
12887
|
scrollAreaRef: mt,
|
|
12883
12888
|
messagesEndRef: pt,
|
|
12884
12889
|
showScrollButton: Lt,
|
|
12885
12890
|
scrollToBottom: hn
|
|
12886
12891
|
} = $f({
|
|
12887
12892
|
messageCount: me.length,
|
|
12888
|
-
isStreaming:
|
|
12893
|
+
isStreaming: H,
|
|
12889
12894
|
isFirstMessage: be,
|
|
12890
12895
|
resolvedMode: N
|
|
12891
|
-
}), Me =
|
|
12896
|
+
}), Me = M === 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
12897
|
if (Ve)
|
|
12893
12898
|
return;
|
|
12894
12899
|
const ee = ae?.message ?? u;
|
|
12895
|
-
(ee.trim() || y || T || ae?.resend) && (w.length > 0 ? (await
|
|
12900
|
+
(ee.trim() || y || T || ae?.resend) && (w.length > 0 ? (await xe({
|
|
12896
12901
|
files: w,
|
|
12897
12902
|
message: ee.trim()
|
|
12898
|
-
}), C([]), b(!1)) : ee.trim() ? await
|
|
12903
|
+
}), C([]), b(!1)) : ee.trim() ? await xe({ ...ae, message: ee.trim() }) : ae?.resend && await xe(ae), p(""), m(!1), b(!1));
|
|
12899
12904
|
}, lt = (ae) => {
|
|
12900
12905
|
if (ae && ae.length > 0) {
|
|
12901
|
-
const ee = ae.filter((
|
|
12906
|
+
const ee = ae.filter((Ne) => !!tt(Ne));
|
|
12902
12907
|
if (ee?.length + w.length > 3) {
|
|
12903
|
-
|
|
12908
|
+
G({
|
|
12904
12909
|
title: "You can only upload up to 3 files at a time",
|
|
12905
12910
|
description: "Please remove some files and try again."
|
|
12906
12911
|
});
|
|
12907
12912
|
return;
|
|
12908
12913
|
}
|
|
12909
|
-
if (ee?.length > 0 && ee.reduce((
|
|
12910
|
-
|
|
12914
|
+
if (ee?.length > 0 && ee.reduce((Ne, ct) => Ne + ct.size, 0) > 10 * 1024 * 1024) {
|
|
12915
|
+
G({
|
|
12911
12916
|
title: `Total file size limit of ${dh} MB exceeded`,
|
|
12912
12917
|
description: "Please reduce the size of the files or try again with less files"
|
|
12913
12918
|
});
|
|
@@ -12921,8 +12926,8 @@ function Yf({ isOpen: e, agentId: t, config: n }) {
|
|
|
12921
12926
|
C((ee) => (b((ee?.length ?? 0) + (ae?.length ?? 0) > 0), [...ee, ...ae]));
|
|
12922
12927
|
}, gt = (ae) => {
|
|
12923
12928
|
C((ee) => {
|
|
12924
|
-
const
|
|
12925
|
-
return b(
|
|
12929
|
+
const Ne = ee.filter((ct, fn) => fn !== ae);
|
|
12930
|
+
return b(Ne.length > 0), Ne;
|
|
12926
12931
|
});
|
|
12927
12932
|
}, Xt = async () => {
|
|
12928
12933
|
if (y)
|
|
@@ -12946,7 +12951,7 @@ function Yf({ isOpen: e, agentId: t, config: n }) {
|
|
|
12946
12951
|
attachmentFiles: w,
|
|
12947
12952
|
isDisabled: Ve,
|
|
12948
12953
|
placeholder: nt,
|
|
12949
|
-
recordingStatus:
|
|
12954
|
+
recordingStatus: B,
|
|
12950
12955
|
allowed: n.allowed,
|
|
12951
12956
|
isVoiceAgentActive: f,
|
|
12952
12957
|
handleVoiceMode: d
|
|
@@ -12977,27 +12982,27 @@ function Yf({ isOpen: e, agentId: t, config: n }) {
|
|
|
12977
12982
|
showRetryButton: K,
|
|
12978
12983
|
clearError: ue,
|
|
12979
12984
|
error: oe,
|
|
12980
|
-
connectionStatus:
|
|
12981
|
-
isStreaming:
|
|
12985
|
+
connectionStatus: M,
|
|
12986
|
+
isStreaming: H,
|
|
12982
12987
|
sessionId: Z,
|
|
12983
12988
|
activeElicitation: Ue,
|
|
12984
12989
|
// Derived
|
|
12985
|
-
inConversation:
|
|
12990
|
+
inConversation: Re,
|
|
12986
12991
|
isFirstMessage: be,
|
|
12987
12992
|
isEmptyChat: Ie,
|
|
12988
12993
|
isAuthComponent: it,
|
|
12989
12994
|
isConnected: Me,
|
|
12990
12995
|
isComposerDisabled: Ve,
|
|
12991
|
-
loading:
|
|
12992
|
-
isLoadingSessionMessages:
|
|
12993
|
-
initialMessage:
|
|
12996
|
+
loading: Ze,
|
|
12997
|
+
isLoadingSessionMessages: $e,
|
|
12998
|
+
initialMessage: We,
|
|
12994
12999
|
// Chat hook values
|
|
12995
13000
|
incomingMessages: me,
|
|
12996
|
-
sendMessage:
|
|
13001
|
+
sendMessage: xe,
|
|
12997
13002
|
startSession: Fe,
|
|
12998
|
-
sendMessageFeedback:
|
|
13003
|
+
sendMessageFeedback: Xe,
|
|
12999
13004
|
clearElicitationState: Ot,
|
|
13000
|
-
handleRetry:
|
|
13005
|
+
handleRetry: Ge,
|
|
13001
13006
|
// Handlers
|
|
13002
13007
|
handleSendMessage: Tt,
|
|
13003
13008
|
handleFileChange: lt,
|
|
@@ -13007,7 +13012,7 @@ function Yf({ isOpen: e, agentId: t, config: n }) {
|
|
|
13007
13012
|
handleClose: x,
|
|
13008
13013
|
// Feedback modal
|
|
13009
13014
|
showFeedbackModal: k,
|
|
13010
|
-
handleSessionFeedbackSubmit:
|
|
13015
|
+
handleSessionFeedbackSubmit: I,
|
|
13011
13016
|
handleSessionFeedbackSkip: j,
|
|
13012
13017
|
handleDontShowAgain: se,
|
|
13013
13018
|
handleCloseModal: Q,
|
|
@@ -13045,17 +13050,17 @@ function Yt() {
|
|
|
13045
13050
|
return e;
|
|
13046
13051
|
}, Yt.apply(this, arguments);
|
|
13047
13052
|
}
|
|
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/,
|
|
13053
|
+
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
13054
|
function $l(e) {
|
|
13050
13055
|
return "( *)(" + (e === 1 ? rs : os) + ") +";
|
|
13051
13056
|
}
|
|
13052
|
-
const
|
|
13057
|
+
const Hl = $l(1), jl = $l(2);
|
|
13053
13058
|
function Yl(e) {
|
|
13054
|
-
return RegExp("^" + (e === 1 ?
|
|
13059
|
+
return RegExp("^" + (e === 1 ? Hl : jl));
|
|
13055
13060
|
}
|
|
13056
13061
|
const Dm = Yl(1), Fm = Yl(2);
|
|
13057
13062
|
function Gl(e) {
|
|
13058
|
-
return RegExp("^" + (e === 1 ?
|
|
13063
|
+
return RegExp("^" + (e === 1 ? Hl : jl) + "[^\\n]*(?:\\n(?!\\1" + (e === 1 ? rs : os) + " )[^\\n]*)*(\\n|$)", "gm");
|
|
13059
13064
|
}
|
|
13060
13065
|
const Um = Gl(1), Vm = Gl(2);
|
|
13061
13066
|
function Wl(e) {
|
|
@@ -13079,9 +13084,9 @@ function qi(e, t) {
|
|
|
13079
13084
|
u = E;
|
|
13080
13085
|
const _ = c.inline, N = c.list;
|
|
13081
13086
|
let w;
|
|
13082
|
-
c.list = !0, E ? (c.inline = !1, w =
|
|
13087
|
+
c.list = !0, E ? (c.inline = !1, w = Hn(S) + `
|
|
13083
13088
|
|
|
13084
|
-
`) : (c.inline = !0, w =
|
|
13089
|
+
`) : (c.inline = !0, w = Hn(S));
|
|
13085
13090
|
const C = i(w, c);
|
|
13086
13091
|
return c.inline = _, c.list = N, C;
|
|
13087
13092
|
}), ordered: n, start: d };
|
|
@@ -13089,11 +13094,11 @@ function qi(e, t) {
|
|
|
13089
13094
|
return e("li", { key: f }, i(d, c));
|
|
13090
13095
|
})) };
|
|
13091
13096
|
}
|
|
13092
|
-
const zm = RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),
|
|
13097
|
+
const zm = RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`), Bm = /^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;
|
|
13093
13098
|
function Ki(e) {
|
|
13094
13099
|
return typeof e == "string";
|
|
13095
13100
|
}
|
|
13096
|
-
function
|
|
13101
|
+
function Hn(e) {
|
|
13097
13102
|
let t = e.length;
|
|
13098
13103
|
for (; t > 0 && e[t - 1] <= " "; ) t--;
|
|
13099
13104
|
return e.slice(0, t);
|
|
@@ -13111,7 +13116,7 @@ function $m(e, t, n) {
|
|
|
13111
13116
|
function Vn(e) {
|
|
13112
13117
|
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
13118
|
}
|
|
13114
|
-
function
|
|
13119
|
+
function Hm(e) {
|
|
13115
13120
|
return Cm.test(e) ? "right" : vm.test(e) ? "center" : wm.test(e) ? "left" : null;
|
|
13116
13121
|
}
|
|
13117
13122
|
function Zi(e, t, n, r) {
|
|
@@ -13129,7 +13134,7 @@ function Zi(e, t, n, r) {
|
|
|
13129
13134
|
}
|
|
13130
13135
|
function jm(e, t, n) {
|
|
13131
13136
|
n.inline = !0;
|
|
13132
|
-
const r = e[2] ? e[2].replace(Sm, "").split("|").map(
|
|
13137
|
+
const r = e[2] ? e[2].replace(Sm, "").split("|").map(Hm) : [], o = e[3] ? (function(l, i, c) {
|
|
13133
13138
|
return l.trim().split(`
|
|
13134
13139
|
`).map(function(d) {
|
|
13135
13140
|
return Zi(d, i, c, !0);
|
|
@@ -13143,7 +13148,7 @@ function Xi(e, t) {
|
|
|
13143
13148
|
function an(e) {
|
|
13144
13149
|
return e.inline = 1, e;
|
|
13145
13150
|
}
|
|
13146
|
-
function
|
|
13151
|
+
function Ht(e) {
|
|
13147
13152
|
return an(function(t, n) {
|
|
13148
13153
|
return n.inline ? e.exec(t) : null;
|
|
13149
13154
|
});
|
|
@@ -13212,7 +13217,7 @@ function ao(e, t, n) {
|
|
|
13212
13217
|
}
|
|
13213
13218
|
function Zm(e = "", t = {}) {
|
|
13214
13219
|
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 ||
|
|
13220
|
+
const n = t.slugify || Vn, r = t.sanitizer || Gm, o = t.createElement || qe, s = [zi, Bi, $i, t.enforceAtxHeadings ? ji : Hi, Yi, Wi, ql, Kl], l = [...s, pm, no, Gi, ro];
|
|
13216
13221
|
function i(h, E) {
|
|
13217
13222
|
for (let _ = 0; _ < h.length; _++) if (h[_].test(E)) return !0;
|
|
13218
13223
|
return !1;
|
|
@@ -13228,7 +13233,7 @@ function Zm(e = "", t = {}) {
|
|
|
13228
13233
|
h = h.replace(am, "");
|
|
13229
13234
|
let E = !1;
|
|
13230
13235
|
t.forceInline ? E = !0 : t.forceBlock || (E = ym.test(h) === !1);
|
|
13231
|
-
const _ = g(m(E ? h :
|
|
13236
|
+
const _ = g(m(E ? h : Hn(h).replace(Mm, "") + `
|
|
13232
13237
|
|
|
13233
13238
|
`, { inline: E }));
|
|
13234
13239
|
for (; Ki(_[_.length - 1]) && !_[_.length - 1].trim(); ) _.pop();
|
|
@@ -13260,34 +13265,34 @@ function Zm(e = "", t = {}) {
|
|
|
13260
13265
|
const k = N[b] = (function(O, A, $, re) {
|
|
13261
13266
|
return A === "style" ? (function(K) {
|
|
13262
13267
|
const ue = [];
|
|
13263
|
-
let oe = "",
|
|
13268
|
+
let oe = "", M = !1, B = !1, ie = "";
|
|
13264
13269
|
if (!K) return ue;
|
|
13265
|
-
for (let
|
|
13266
|
-
const Z = K[
|
|
13267
|
-
if (Z !== '"' && Z !== "'" ||
|
|
13270
|
+
for (let G = 0; G < K.length; G++) {
|
|
13271
|
+
const Z = K[G];
|
|
13272
|
+
if (Z !== '"' && Z !== "'" || M || (B ? Z === ie && (B = !1, ie = "") : (B = !0, ie = Z)), Z === "(" && oe.endsWith("url") ? M = !0 : Z === ")" && M && (M = !1), Z !== ";" || B || M) oe += Z;
|
|
13268
13273
|
else {
|
|
13269
13274
|
const X = oe.trim();
|
|
13270
13275
|
if (X) {
|
|
13271
|
-
const
|
|
13272
|
-
if (
|
|
13273
|
-
const _e = X.slice(0,
|
|
13276
|
+
const Te = X.indexOf(":");
|
|
13277
|
+
if (Te > 0) {
|
|
13278
|
+
const _e = X.slice(0, Te).trim(), ce = X.slice(Te + 1).trim();
|
|
13274
13279
|
ue.push([_e, ce]);
|
|
13275
13280
|
}
|
|
13276
13281
|
}
|
|
13277
13282
|
oe = "";
|
|
13278
13283
|
}
|
|
13279
13284
|
}
|
|
13280
|
-
const
|
|
13281
|
-
if (
|
|
13282
|
-
const
|
|
13283
|
-
if (
|
|
13284
|
-
const Z =
|
|
13285
|
+
const H = oe.trim();
|
|
13286
|
+
if (H) {
|
|
13287
|
+
const G = H.indexOf(":");
|
|
13288
|
+
if (G > 0) {
|
|
13289
|
+
const Z = H.slice(0, G).trim(), X = H.slice(G + 1).trim();
|
|
13285
13290
|
ue.push([Z, X]);
|
|
13286
13291
|
}
|
|
13287
13292
|
}
|
|
13288
13293
|
return ue;
|
|
13289
13294
|
})($).reduce(function(K, [ue, oe]) {
|
|
13290
|
-
return K[ue.replace(/(-[a-z])/g, (
|
|
13295
|
+
return K[ue.replace(/(-[a-z])/g, (M) => M[1].toUpperCase())] = re(oe, O, ue), K;
|
|
13291
13296
|
}, {}) : qf.indexOf(A) !== -1 ? re(dt($), O, A) : ($.match(um) && ($ = dt($.slice(1, $.length - 1))), $ === "true" || $ !== "false" && $);
|
|
13292
13297
|
})(h, v, T, r);
|
|
13293
13298
|
typeof k == "string" && (no.test(k) || ro.test(k)) && (N[b] = d(k.trim()));
|
|
@@ -13301,7 +13306,7 @@ function Zm(e = "", t = {}) {
|
|
|
13301
13306
|
}, l(h, E, _) {
|
|
13302
13307
|
const N = { key: _.key };
|
|
13303
13308
|
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(
|
|
13309
|
+
} }, 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
13310
|
const E = h.indexOf(`
|
|
13306
13311
|
`);
|
|
13307
13312
|
return E > 0 && E < h.length - 1 && (h[E + 1] === "=" || h[E + 1] === "-");
|
|
@@ -13316,10 +13321,10 @@ function Zm(e = "", t = {}) {
|
|
|
13316
13321
|
}, 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
13322
|
const E = h[1].trim();
|
|
13318
13323
|
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(
|
|
13324
|
+
}, 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
13325
|
let E = h[1], _ = !1;
|
|
13321
13326
|
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:
|
|
13327
|
+
} }, 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
13328
|
`], o: Et(nm), i: 3, u: so, l: () => `
|
|
13324
13329
|
` }, 21: { o: an(function(h, E) {
|
|
13325
13330
|
if (E.inline || E.simple || E.inHTML && h.indexOf(`
|
|
@@ -13334,9 +13339,9 @@ function Zm(e = "", t = {}) {
|
|
|
13334
13339
|
if (i(s, v) || (_ += v, C === -1 || !v.trim())) break;
|
|
13335
13340
|
N = C + 1;
|
|
13336
13341
|
}
|
|
13337
|
-
const w =
|
|
13342
|
+
const w = Hn(_);
|
|
13338
13343
|
return w === "" ? null : [_, , w];
|
|
13339
|
-
}), i: 3, u: oo, l: (h, E, _) => c("p", { key: _.key }, E(h.children, _)) }, 22: { t: ["["], o:
|
|
13344
|
+
}), 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
13345
|
const N = h;
|
|
13341
13346
|
return c("table", { key: _.key }, c("thead", null, c("tr", null, N.header.map(function(w, C) {
|
|
13342
13347
|
return c("th", { key: C, style: Xi(N, C) }, E(w, _));
|
|
@@ -13420,17 +13425,17 @@ const Xm = (e) => {
|
|
|
13420
13425
|
function vo({ children: e }) {
|
|
13421
13426
|
return /* @__PURE__ */ a(Xm, { options: Jm, children: e });
|
|
13422
13427
|
}
|
|
13423
|
-
const Qm =
|
|
13428
|
+
const Qm = Ke(
|
|
13424
13429
|
() => Promise.resolve().then(() => ap).then((e) => ({ default: e.Pills }))
|
|
13425
|
-
), ep =
|
|
13430
|
+
), ep = Ke(
|
|
13426
13431
|
() => import("./medassist-widget-MultiSelect-BnExX-Ty.js").then((e) => ({ default: e.MultiSelectGroup }))
|
|
13427
|
-
), tp =
|
|
13432
|
+
), tp = Ke(
|
|
13428
13433
|
() => import("./medassist-widget-FocusCarousel-C8sm1Tm0.js").then((e) => ({ default: e.FocusCarousel }))
|
|
13429
|
-
), np =
|
|
13434
|
+
), np = Ke(
|
|
13430
13435
|
() => import("./medassist-widget-DoctorCard-Cn_E83qL.js").then((e) => ({ default: e.DoctorCard }))
|
|
13431
|
-
), rp =
|
|
13436
|
+
), rp = Ke(
|
|
13432
13437
|
() => import("./medassist-widget-CardList-Dx2bzaVC.js").then((e) => ({ default: e.CardList }))
|
|
13433
|
-
), op =
|
|
13438
|
+
), op = Ke(
|
|
13434
13439
|
() => import("./medassist-widget-MediaCard-yhz2Z0ZQ.js").then((e) => ({ default: e.MediaCard }))
|
|
13435
13440
|
);
|
|
13436
13441
|
function Pe({ className: e }) {
|
|
@@ -13714,7 +13719,7 @@ function ip({
|
|
|
13714
13719
|
isAuthComponent: m,
|
|
13715
13720
|
isFullScreen: g
|
|
13716
13721
|
}) {
|
|
13717
|
-
const S = t === "user", [h, E] = F(P.USER_FEEDBACK.NONE), _ =
|
|
13722
|
+
const S = t === "user", [h, E] = F(P.USER_FEEDBACK.NONE), _ = Y((C) => C.isStreaming), N = (C) => {
|
|
13718
13723
|
E(C), u(C);
|
|
13719
13724
|
}, w = !!(n?.trim() || r && r.length > 0 || d || s || i);
|
|
13720
13725
|
return /* @__PURE__ */ a(pe, { children: [
|
|
@@ -14028,7 +14033,7 @@ function cp({
|
|
|
14028
14033
|
initialMessage: l,
|
|
14029
14034
|
disabled: i
|
|
14030
14035
|
}) {
|
|
14031
|
-
const c =
|
|
14036
|
+
const c = Y((u) => u.isWaitingForResponse), d = Y((u) => u.elicitationState), f = Y((u) => u.progressMessage);
|
|
14032
14037
|
return e.length === 0 && !f ? /* @__PURE__ */ a(
|
|
14033
14038
|
lp,
|
|
14034
14039
|
{
|
|
@@ -14170,7 +14175,7 @@ function Ji({
|
|
|
14170
14175
|
}
|
|
14171
14176
|
);
|
|
14172
14177
|
}
|
|
14173
|
-
const up =
|
|
14178
|
+
const up = Ke(() => import("./medassist-widget-VoiceAgentScreen-BK0p37RC.js"));
|
|
14174
14179
|
function hp({
|
|
14175
14180
|
isOpen: e,
|
|
14176
14181
|
agentId: t,
|
|
@@ -14208,28 +14213,28 @@ function hp({
|
|
|
14208
14213
|
isMuted: K,
|
|
14209
14214
|
isVoiceAgentActive: ue,
|
|
14210
14215
|
disconnectVoiceAgent: oe,
|
|
14211
|
-
resetVoiceAgent:
|
|
14212
|
-
toggleMute:
|
|
14216
|
+
resetVoiceAgent: M,
|
|
14217
|
+
toggleMute: B,
|
|
14213
14218
|
handleClose: ie,
|
|
14214
|
-
isHistoryEnabled:
|
|
14215
|
-
isSessionDrawerOpen:
|
|
14219
|
+
isHistoryEnabled: H,
|
|
14220
|
+
isSessionDrawerOpen: G,
|
|
14216
14221
|
pastSessions: Z,
|
|
14217
14222
|
isLoadingPastSessions: X,
|
|
14218
|
-
openSessionDrawer:
|
|
14223
|
+
openSessionDrawer: Te,
|
|
14219
14224
|
closeSessionDrawer: _e,
|
|
14220
14225
|
userLevel: ce,
|
|
14221
|
-
isSidebarCollapsed:
|
|
14222
|
-
toggleSidebar:
|
|
14226
|
+
isSidebarCollapsed: Be,
|
|
14227
|
+
toggleSidebar: Ye,
|
|
14223
14228
|
showFeedbackModal: D,
|
|
14224
14229
|
handleSessionFeedbackSubmit: ye,
|
|
14225
14230
|
handleSessionFeedbackSkip: he,
|
|
14226
14231
|
handleDontShowAgain: me,
|
|
14227
|
-
handleCloseModal:
|
|
14232
|
+
handleCloseModal: Ze
|
|
14228
14233
|
} = Yf({ isOpen: e, agentId: t, config: n });
|
|
14229
14234
|
z(() => {
|
|
14230
14235
|
w.length || O("auto");
|
|
14231
14236
|
}, [w.length, O]);
|
|
14232
|
-
const
|
|
14237
|
+
const $e = fe(
|
|
14233
14238
|
() => (/* @__PURE__ */ new Date()).toLocaleString("en-US", {
|
|
14234
14239
|
weekday: "long",
|
|
14235
14240
|
hour: "2-digit",
|
|
@@ -14237,19 +14242,19 @@ function hp({
|
|
|
14237
14242
|
hour12: !0
|
|
14238
14243
|
}),
|
|
14239
14244
|
[]
|
|
14240
|
-
),
|
|
14245
|
+
), xe = H && o === "full" && ce === "user" ? /* @__PURE__ */ a(
|
|
14241
14246
|
Sf,
|
|
14242
14247
|
{
|
|
14243
14248
|
sessions: Z,
|
|
14244
14249
|
activeSessionId: p,
|
|
14245
14250
|
onSelectSession: (Fe) => v({ sessionId: Fe }),
|
|
14246
14251
|
onNewChat: () => v({ forceNewSession: !0 }),
|
|
14247
|
-
isCollapsed:
|
|
14248
|
-
onToggle:
|
|
14252
|
+
isCollapsed: Be,
|
|
14253
|
+
onToggle: Ye,
|
|
14249
14254
|
isLoading: X
|
|
14250
14255
|
}
|
|
14251
14256
|
) : void 0;
|
|
14252
|
-
return /* @__PURE__ */ a(
|
|
14257
|
+
return /* @__PURE__ */ a(Bh, { enabled: !!n.resize, children: /* @__PURE__ */ a(
|
|
14253
14258
|
Vl,
|
|
14254
14259
|
{
|
|
14255
14260
|
isOpen: e,
|
|
@@ -14259,7 +14264,7 @@ function hp({
|
|
|
14259
14264
|
config: n.feedback,
|
|
14260
14265
|
onSubmit: ye,
|
|
14261
14266
|
onSkip: he,
|
|
14262
|
-
onClose:
|
|
14267
|
+
onClose: Ze,
|
|
14263
14268
|
onDontShowAgain: me
|
|
14264
14269
|
} : void 0,
|
|
14265
14270
|
showCloseButton: n.showCloseButton,
|
|
@@ -14278,12 +14283,12 @@ function hp({
|
|
|
14278
14283
|
activeElicitation: y,
|
|
14279
14284
|
voiceAgentState: re,
|
|
14280
14285
|
chatComposer: A,
|
|
14281
|
-
onOpenSessionDrawer:
|
|
14282
|
-
historyEnabled:
|
|
14283
|
-
sessionDrawer:
|
|
14286
|
+
onOpenSessionDrawer: H ? Te : void 0,
|
|
14287
|
+
historyEnabled: H,
|
|
14288
|
+
sessionDrawer: H ? /* @__PURE__ */ a(
|
|
14284
14289
|
Cf,
|
|
14285
14290
|
{
|
|
14286
|
-
isOpen:
|
|
14291
|
+
isOpen: G,
|
|
14287
14292
|
onClose: _e,
|
|
14288
14293
|
sessions: Z,
|
|
14289
14294
|
activeSessionId: p,
|
|
@@ -14293,7 +14298,7 @@ function hp({
|
|
|
14293
14298
|
onNewChat: () => v({ forceNewSession: !0 })
|
|
14294
14299
|
}
|
|
14295
14300
|
) : void 0,
|
|
14296
|
-
sidebar:
|
|
14301
|
+
sidebar: xe,
|
|
14297
14302
|
fullScreenEmptyState: E ? (Fe) => /* @__PURE__ */ a(
|
|
14298
14303
|
xf,
|
|
14299
14304
|
{
|
|
@@ -14323,8 +14328,8 @@ function hp({
|
|
|
14323
14328
|
state: re,
|
|
14324
14329
|
isMuted: K,
|
|
14325
14330
|
onEndCall: oe,
|
|
14326
|
-
onClose:
|
|
14327
|
-
onToggleMute:
|
|
14331
|
+
onClose: M,
|
|
14332
|
+
onToggleMute: B,
|
|
14328
14333
|
agentName: n.title,
|
|
14329
14334
|
iconUrl: n.iconUrl,
|
|
14330
14335
|
textColor: n.theme?.textColor
|
|
@@ -14350,7 +14355,7 @@ function hp({
|
|
|
14350
14355
|
children: [
|
|
14351
14356
|
_ ? /* @__PURE__ */ a(Nh, {}) : /* @__PURE__ */ a(pe, { children: [
|
|
14352
14357
|
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:
|
|
14358
|
+
!h && /* @__PURE__ */ a("div", { className: "text-xs text-[var(--color-muted-foreground)] text-center", children: $e }),
|
|
14354
14359
|
/* @__PURE__ */ a(Le, { fallback: /* @__PURE__ */ a(Th, {}), children: /* @__PURE__ */ a(
|
|
14355
14360
|
cp,
|
|
14356
14361
|
{
|