@eka-care/medassist-widget 0.1.110-dev.0 → 0.1.110
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 +118 -117
- package/package.json +1 -1
package/dist/medassist-widget.js
CHANGED
|
@@ -547,7 +547,7 @@ function ji(e, t, n) {
|
|
|
547
547
|
return ji(r, t, n);
|
|
548
548
|
}), e.__c && e.__c.__P === t && (e.__e && n.appendChild(e.__e), e.__c.__e = !0, e.__c.__P = n)), e;
|
|
549
549
|
}
|
|
550
|
-
function
|
|
550
|
+
function Me() {
|
|
551
551
|
this.__u = 0, this.o = null, this.__b = null;
|
|
552
552
|
}
|
|
553
553
|
function Gi(e) {
|
|
@@ -573,7 +573,7 @@ function zt() {
|
|
|
573
573
|
K.unmount = function(e) {
|
|
574
574
|
var t = e.__c;
|
|
575
575
|
t && (t.__z = !0), t && t.__R && t.__R(), t && 32 & e.__u && (e.type = null), ns && ns(e);
|
|
576
|
-
}, (
|
|
576
|
+
}, (Me.prototype = new Ye()).__c = function(e, t) {
|
|
577
577
|
var n = t.__c, r = this;
|
|
578
578
|
r.o == null && (r.o = []), r.o.push(n);
|
|
579
579
|
var o = Gi(r.__v), i = !1, l = function() {
|
|
@@ -593,9 +593,9 @@ K.unmount = function(e) {
|
|
|
593
593
|
}
|
|
594
594
|
};
|
|
595
595
|
r.__u++ || 32 & t.__u || r.setState({ __a: r.__b = r.__v.__k[0] }), e.then(l, l);
|
|
596
|
-
},
|
|
596
|
+
}, Me.prototype.componentWillUnmount = function() {
|
|
597
597
|
this.o = [];
|
|
598
|
-
},
|
|
598
|
+
}, Me.prototype.render = function(e, t) {
|
|
599
599
|
if (this.__b) {
|
|
600
600
|
if (this.__v.__k) {
|
|
601
601
|
var n = document.createElement("div"), r = this.__v.__k[0].__c;
|
|
@@ -746,8 +746,8 @@ var ea = function(e, t) {
|
|
|
746
746
|
};
|
|
747
747
|
var r = e(t);
|
|
748
748
|
return K.debounceRendering = n, r;
|
|
749
|
-
}, na = je, Nn = { useState: F, useId: uo, useReducer: Yt, useEffect: $, useLayoutEffect: ht, useInsertionEffect: _o, useTransition: go, useDeferredValue: po, useSyncExternalStore: fo, startTransition: mo, useRef: Y, useImperativeHandle: lo, useMemo: ue, useCallback: de, useContext: ft, useDebugValue: co, version: "18.3.1", Children: He, render: bo, hydrate: Yi, unmountComponentAtNode: vo, createPortal: Wi, createElement: $e, createContext: dt, createFactory: Zi, cloneElement: vt, createRef: Mi, Fragment: _e, isValidElement: je, isElement: na, isFragment: Xi, isMemo: Ji, findDOMNode: Qi, Component: Ye, PureComponent: rr, memo: Eo, forwardRef: X, flushSync: ta, unstable_batchedUpdates: ea, StrictMode: _e, Suspense:
|
|
750
|
-
const ra = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, Children: He, Component: Ye, Fragment: _e, PureComponent: rr, StrictMode: _e, Suspense:
|
|
749
|
+
}, na = je, Nn = { useState: F, useId: uo, useReducer: Yt, useEffect: $, useLayoutEffect: ht, useInsertionEffect: _o, useTransition: go, useDeferredValue: po, useSyncExternalStore: fo, startTransition: mo, useRef: Y, useImperativeHandle: lo, useMemo: ue, useCallback: de, useContext: ft, useDebugValue: co, version: "18.3.1", Children: He, render: bo, hydrate: Yi, unmountComponentAtNode: vo, createPortal: Wi, createElement: $e, createContext: dt, createFactory: Zi, cloneElement: vt, createRef: Mi, Fragment: _e, isValidElement: je, isElement: na, isFragment: Xi, isMemo: Ji, findDOMNode: Qi, Component: Ye, PureComponent: rr, memo: Eo, forwardRef: X, flushSync: ta, unstable_batchedUpdates: ea, StrictMode: _e, Suspense: Me, SuspenseList: zt, lazy: ze, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Ki };
|
|
750
|
+
const ra = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, Children: He, Component: Ye, Fragment: _e, PureComponent: rr, StrictMode: _e, Suspense: Me, SuspenseList: zt, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Ki, cloneElement: vt, createContext: dt, createElement: $e, createFactory: Zi, createPortal: Wi, createRef: Mi, default: Nn, findDOMNode: Qi, flushSync: ta, forwardRef: X, hydrate: Yi, isElement: na, isFragment: Xi, isMemo: Ji, isValidElement: je, lazy: ze, memo: Eo, render: bo, startTransition: mo, unmountComponentAtNode: vo, unstable_batchedUpdates: ea, useCallback: de, useContext: ft, useDebugValue: co, useDeferredValue: po, useEffect: $, useErrorBoundary: Rl, useId: uo, useImperativeHandle: lo, useInsertionEffect: _o, useLayoutEffect: ht, useMemo: ue, useReducer: Yt, useRef: Y, useState: F, useSyncExternalStore: fo, useTransition: go, version: jl }, Symbol.toStringTag, { value: "Module" }));
|
|
751
751
|
function Gl(e) {
|
|
752
752
|
return {
|
|
753
753
|
// eslint-disable-next-line
|
|
@@ -4760,7 +4760,7 @@ const $c = (e, t) => {
|
|
|
4760
4760
|
E,
|
|
4761
4761
|
V,
|
|
4762
4762
|
U
|
|
4763
|
-
], ce = () => ["none", te, V, U], ye = () => ["none", te, V, U], ve = () => [te, V, U],
|
|
4763
|
+
], ce = () => ["none", te, V, U], ye = () => ["none", te, V, U], ve = () => [te, V, U], Le = () => [Ut, "full", ...w()];
|
|
4764
4764
|
return {
|
|
4765
4765
|
cacheSize: 500,
|
|
4766
4766
|
theme: {
|
|
@@ -6810,28 +6810,28 @@ const $c = (e, t) => {
|
|
|
6810
6810
|
* @see https://tailwindcss.com/docs/translate
|
|
6811
6811
|
*/
|
|
6812
6812
|
translate: [{
|
|
6813
|
-
translate:
|
|
6813
|
+
translate: Le()
|
|
6814
6814
|
}],
|
|
6815
6815
|
/**
|
|
6816
6816
|
* Translate X
|
|
6817
6817
|
* @see https://tailwindcss.com/docs/translate
|
|
6818
6818
|
*/
|
|
6819
6819
|
"translate-x": [{
|
|
6820
|
-
"translate-x":
|
|
6820
|
+
"translate-x": Le()
|
|
6821
6821
|
}],
|
|
6822
6822
|
/**
|
|
6823
6823
|
* Translate Y
|
|
6824
6824
|
* @see https://tailwindcss.com/docs/translate
|
|
6825
6825
|
*/
|
|
6826
6826
|
"translate-y": [{
|
|
6827
|
-
"translate-y":
|
|
6827
|
+
"translate-y": Le()
|
|
6828
6828
|
}],
|
|
6829
6829
|
/**
|
|
6830
6830
|
* Translate Z
|
|
6831
6831
|
* @see https://tailwindcss.com/docs/translate
|
|
6832
6832
|
*/
|
|
6833
6833
|
"translate-z": [{
|
|
6834
|
-
"translate-z":
|
|
6834
|
+
"translate-z": Le()
|
|
6835
6835
|
}],
|
|
6836
6836
|
/**
|
|
6837
6837
|
* Translate None
|
|
@@ -10109,7 +10109,7 @@ function Lh({
|
|
|
10109
10109
|
{
|
|
10110
10110
|
className: `rounded-xl p-1 transition-all ${C ? "border-2 border-primary bg-primary/15" : "border-2 border-transparent"} ${S ? "opacity-50" : ""}`,
|
|
10111
10111
|
style: C ? { filter: "brightness(1.25)" } : void 0,
|
|
10112
|
-
children: /* @__PURE__ */ a(
|
|
10112
|
+
children: /* @__PURE__ */ a(Me, { fallback: /* @__PURE__ */ a("div", { className: "w-10 h-10 rounded-xl bg-surface-secondary" }), children: /* @__PURE__ */ a(g, {}) })
|
|
10113
10113
|
}
|
|
10114
10114
|
),
|
|
10115
10115
|
/* @__PURE__ */ a(
|
|
@@ -10237,7 +10237,7 @@ function dl({
|
|
|
10237
10237
|
if (!e || !S || !k.current) return;
|
|
10238
10238
|
const P = k.current;
|
|
10239
10239
|
let ne = null, Se = null, ce = null, ye = window.visualViewport?.offsetTop ?? 0, ve = 0;
|
|
10240
|
-
const
|
|
10240
|
+
const Le = 2, Oe = 80;
|
|
10241
10241
|
if (window.visualViewport) {
|
|
10242
10242
|
const Te = () => {
|
|
10243
10243
|
if (P && window.visualViewport) {
|
|
@@ -10250,17 +10250,17 @@ function dl({
|
|
|
10250
10250
|
}
|
|
10251
10251
|
}, Ue = () => {
|
|
10252
10252
|
Te();
|
|
10253
|
-
},
|
|
10253
|
+
}, Pe = () => {
|
|
10254
10254
|
if (!P || !window.visualViewport) return;
|
|
10255
10255
|
const xe = window.visualViewport.offsetTop, Xe = Date.now();
|
|
10256
|
-
Math.abs(xe - ye) <
|
|
10256
|
+
Math.abs(xe - ye) < Le || Xe - ve < Oe || (ve = Xe, ye = xe, ne = requestAnimationFrame(() => {
|
|
10257
10257
|
P.style.transition = "none", P.style.top = `${xe}px`, ce && clearTimeout(ce), ce = setTimeout(() => {
|
|
10258
10258
|
P.style.transition = "";
|
|
10259
10259
|
}, 150);
|
|
10260
10260
|
}));
|
|
10261
10261
|
};
|
|
10262
|
-
return window.visualViewport.addEventListener("resize", Ue), window.visualViewport.addEventListener("scroll",
|
|
10263
|
-
ne && cancelAnimationFrame(ne), Se && clearTimeout(Se), ce && clearTimeout(ce), window.visualViewport?.removeEventListener("resize", Ue), window.visualViewport?.removeEventListener("scroll",
|
|
10262
|
+
return window.visualViewport.addEventListener("resize", Ue), window.visualViewport.addEventListener("scroll", Pe), Te(), () => {
|
|
10263
|
+
ne && cancelAnimationFrame(ne), Se && clearTimeout(Se), ce && clearTimeout(ce), window.visualViewport?.removeEventListener("resize", Ue), window.visualViewport?.removeEventListener("scroll", Pe), P && (P.style.width = "", P.style.height = "", P.style.maxHeight = "", P.style.minHeight = "", P.style.transition = "");
|
|
10264
10264
|
};
|
|
10265
10265
|
} else {
|
|
10266
10266
|
const Te = () => {
|
|
@@ -10277,26 +10277,26 @@ function dl({
|
|
|
10277
10277
|
const P = k.current, ne = window.scrollY, Se = document.body.style.cssText, ce = document.documentElement.style.overflow, ye = window.innerWidth - document.documentElement.clientWidth;
|
|
10278
10278
|
document.body.style.position = "fixed", document.body.style.top = `-${ne}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", ye > 0 && !S && (document.body.style.paddingRight = `${ye}px`);
|
|
10279
10279
|
let ve = 0;
|
|
10280
|
-
const
|
|
10280
|
+
const Le = (Te) => {
|
|
10281
10281
|
ve = Te.touches[0].clientY;
|
|
10282
|
-
},
|
|
10282
|
+
}, Oe = (Te) => {
|
|
10283
10283
|
if (Te.touches.length !== 1) return;
|
|
10284
10284
|
const Ue = ve - Te.touches[0].clientY;
|
|
10285
10285
|
ve = Te.touches[0].clientY;
|
|
10286
|
-
let
|
|
10287
|
-
for (;
|
|
10288
|
-
const { overflowY: xe } = window.getComputedStyle(
|
|
10289
|
-
if ((xe === "auto" || xe === "scroll") &&
|
|
10290
|
-
const { scrollTop: Xe, scrollHeight: Xt, clientHeight: Jt } =
|
|
10286
|
+
let Pe = Te.target;
|
|
10287
|
+
for (; Pe && Pe !== P; ) {
|
|
10288
|
+
const { overflowY: xe } = window.getComputedStyle(Pe);
|
|
10289
|
+
if ((xe === "auto" || xe === "scroll") && Pe.scrollHeight > Pe.clientHeight) {
|
|
10290
|
+
const { scrollTop: Xe, scrollHeight: Xt, clientHeight: Jt } = Pe, Lt = Xe <= 0 && Ue < 0, Qt = Xe + Jt >= Xt - 1 && Ue > 0;
|
|
10291
10291
|
if (!Lt && !Qt) return;
|
|
10292
10292
|
break;
|
|
10293
10293
|
}
|
|
10294
|
-
|
|
10294
|
+
Pe = Pe.parentElement;
|
|
10295
10295
|
}
|
|
10296
10296
|
Te.preventDefault();
|
|
10297
10297
|
};
|
|
10298
|
-
return P && (P.addEventListener("touchstart",
|
|
10299
|
-
P && (P.removeEventListener("touchstart",
|
|
10298
|
+
return P && (P.addEventListener("touchstart", Le, { passive: !0 }), P.addEventListener("touchmove", Oe, { passive: !1 })), () => {
|
|
10299
|
+
P && (P.removeEventListener("touchstart", Le), P.removeEventListener("touchmove", Oe)), document.body.style.cssText = Se, document.documentElement.style.overflow = ce, window.scrollTo(0, ne);
|
|
10300
10300
|
};
|
|
10301
10301
|
}
|
|
10302
10302
|
}, [e, S]);
|
|
@@ -10514,7 +10514,7 @@ function dl({
|
|
|
10514
10514
|
...!S && !H && {
|
|
10515
10515
|
cursor: e ? "grab" : "default"
|
|
10516
10516
|
}
|
|
10517
|
-
}, children: /* @__PURE__ */ a(
|
|
10517
|
+
}, children: /* @__PURE__ */ a(Me, { fallback: /* @__PURE__ */ a(Hu, {}), children: /* @__PURE__ */ a(
|
|
10518
10518
|
lh,
|
|
10519
10519
|
{
|
|
10520
10520
|
onClose: t,
|
|
@@ -10530,7 +10530,7 @@ function dl({
|
|
|
10530
10530
|
}
|
|
10531
10531
|
) }) }),
|
|
10532
10532
|
(() => {
|
|
10533
|
-
const P = H && !!s, ne = u && g === O.VOICE_AGENT_STATE.IDLE ? /* @__PURE__ */ a(
|
|
10533
|
+
const P = H && !!s, ne = u && g === O.VOICE_AGENT_STATE.IDLE ? /* @__PURE__ */ a(Me, { fallback: /* @__PURE__ */ a(ju, {}), children: /* @__PURE__ */ a(
|
|
10534
10534
|
wh,
|
|
10535
10535
|
{
|
|
10536
10536
|
value: u.value,
|
|
@@ -10847,7 +10847,7 @@ const hl = (e) => Object.fromEntries(
|
|
|
10847
10847
|
upsertElicitationState: ye
|
|
10848
10848
|
} = oe.getState();
|
|
10849
10849
|
$(() => {
|
|
10850
|
-
_ ? u ?
|
|
10850
|
+
_ ? u ? Oe() && (W(ke.CONNECTED), Ue()) : W(ke.CONNECTING) : W(ke.NOT_CONNECTED);
|
|
10851
10851
|
}, [_, u]), $(() => {
|
|
10852
10852
|
S && (s((I) => [...I, ...Ce(S) || []]), b([]));
|
|
10853
10853
|
}, [S]), $(() => {
|
|
@@ -10880,7 +10880,7 @@ const hl = (e) => Object.fromEntries(
|
|
|
10880
10880
|
});
|
|
10881
10881
|
break;
|
|
10882
10882
|
case O.SynapseErrorCode.CONNECTION:
|
|
10883
|
-
|
|
10883
|
+
Oe() || (W(ke.NOT_CONNECTED), h.current < 2 ? (h.current = h.current + 1, ve(S, T)) : (Z(!0), z({
|
|
10884
10884
|
title: "Trying to connect...",
|
|
10885
10885
|
description: gt(A)
|
|
10886
10886
|
})));
|
|
@@ -10932,13 +10932,13 @@ const hl = (e) => Object.fromEntries(
|
|
|
10932
10932
|
});
|
|
10933
10933
|
q?.session_id && q?.session_token && (D(q.session_id), H(q.session_token)), q?.user_id && ne(q.user_id), q?.error?.msg && ce(q.error.msg);
|
|
10934
10934
|
} catch (q) {
|
|
10935
|
-
const re = q, ae = re.context?.stage === "handleSessionExpiry" || re.context?.stage === "refreshSession" || re.status === 404 || re.context?.status == 404,
|
|
10936
|
-
ae ? (z(null), W(ke.NOT_CONNECTED), R(!0)) :
|
|
10935
|
+
const re = q, ae = re.context?.stage === "handleSessionExpiry" || re.context?.stage === "refreshSession" || re.status === 404 || re.context?.status == 404, De = re.status === 403;
|
|
10936
|
+
ae ? (z(null), W(ke.NOT_CONNECTED), R(!0)) : De && !B ? (ee(), Ue(), await ve(void 0, void 0, !0)) : (z({
|
|
10937
10937
|
title: "Connection Lost!",
|
|
10938
10938
|
description: gt(q)
|
|
10939
10939
|
}), Z(!0));
|
|
10940
10940
|
}
|
|
10941
|
-
},
|
|
10941
|
+
}, Le = async (I = !1) => {
|
|
10942
10942
|
try {
|
|
10943
10943
|
if (!y.current) {
|
|
10944
10944
|
z({
|
|
@@ -10948,35 +10948,35 @@ const hl = (e) => Object.fromEntries(
|
|
|
10948
10948
|
return;
|
|
10949
10949
|
}
|
|
10950
10950
|
if (p(!0), I) {
|
|
10951
|
-
W(ke.CONNECTING), s([]), await ee(), await y?.current?.endSession(), Ue(), await ve(),
|
|
10951
|
+
W(ke.CONNECTING), s([]), await ee(), await y?.current?.endSession(), Ue(), await ve(), Pe();
|
|
10952
10952
|
return;
|
|
10953
10953
|
}
|
|
10954
10954
|
const { sessionId: A, sessionToken: B } = oe.getState();
|
|
10955
|
-
await ve(A, B),
|
|
10955
|
+
await ve(A, B), Pe();
|
|
10956
10956
|
} catch {
|
|
10957
10957
|
} finally {
|
|
10958
10958
|
p(!1);
|
|
10959
10959
|
}
|
|
10960
|
-
},
|
|
10960
|
+
}, Oe = () => y.current?.isConnected() ?? !1, Te = () => {
|
|
10961
10961
|
y.current?.endSession();
|
|
10962
10962
|
}, Ue = () => {
|
|
10963
10963
|
h.current = 0, Z(!1), R(!1), z(null);
|
|
10964
|
-
},
|
|
10964
|
+
}, Pe = () => {
|
|
10965
10965
|
y.current?.on(O.SYNAPSE_REALTIME_EVENTS.MESSAGE_CHUNK, (I) => {
|
|
10966
10966
|
const A = I;
|
|
10967
10967
|
if (A.data?.text && A.messageId) {
|
|
10968
|
-
w || (he(!1), me(!0)),
|
|
10968
|
+
w || (he(!1), me(!0)), Oe() && W(ke.CONNECTED), Ue();
|
|
10969
10969
|
const B = A.data.text, q = A.messageId, re = x.current;
|
|
10970
10970
|
x.current = !1, s((ae) => {
|
|
10971
|
-
const
|
|
10972
|
-
if (
|
|
10973
|
-
const
|
|
10971
|
+
const De = ae[ae.length - 1];
|
|
10972
|
+
if (De && De.id === q && De.role === We.ASSISTANT) {
|
|
10973
|
+
const Ae = [...ae], Je = re && De.content.length > 0 && !/\s$/.test(De.content) && !/^\s/.test(B) ? `
|
|
10974
10974
|
|
|
10975
10975
|
` : "";
|
|
10976
|
-
return
|
|
10977
|
-
...
|
|
10978
|
-
content:
|
|
10979
|
-
},
|
|
10976
|
+
return Ae[Ae.length - 1] = {
|
|
10977
|
+
...De,
|
|
10978
|
+
content: De.content + Je + B
|
|
10979
|
+
}, Ae;
|
|
10980
10980
|
} else
|
|
10981
10981
|
return [
|
|
10982
10982
|
...ae,
|
|
@@ -11002,12 +11002,12 @@ const hl = (e) => Object.fromEntries(
|
|
|
11002
11002
|
if (!A?.messageId || !A?.data || !A?.data?.details?.component || !A?.data?.tool_id)
|
|
11003
11003
|
return;
|
|
11004
11004
|
v && he(!1);
|
|
11005
|
-
const { messageId: B, data: q } = A, re = q.tool_id, ae = `${B}::${re}`,
|
|
11005
|
+
const { messageId: B, data: q } = A, re = q.tool_id, ae = `${B}::${re}`, Ae = oe.getState().elicitationState[ae], Je = q.details?.component, Ve = A?.data?.details?._meta?.tool_result, Dt = q.details?.input, Ne = Bh(Ae?.ui_input, Dt, Je);
|
|
11006
11006
|
let Ge = A.data.details?._meta?.disp_toast_msg;
|
|
11007
11007
|
const nt = q?.details?._meta?.schema?.required || [];
|
|
11008
11008
|
switch (q?.details?.status) {
|
|
11009
11009
|
case O.SYNAPSE_EICITATION_STATUS.PROGRESS: {
|
|
11010
|
-
const j = A?.data?.details?.input || {}, ie = nt.reduce((wt, Ft) => (j[Ft] !== void 0 && (wt[Ft] = j[Ft]), wt), {}), G = { ...
|
|
11010
|
+
const j = A?.data?.details?.input || {}, ie = nt.reduce((wt, Ft) => (j[Ft] !== void 0 && (wt[Ft] = j[Ft]), wt), {}), G = { ...Ae?.server_input || {}, ...ie }, Be = nt.filter((wt) => !G[wt]), St = A.data.details?._meta?.mcp_meta_fields || [];
|
|
11011
11011
|
ye(ae, {
|
|
11012
11012
|
tool_id: re,
|
|
11013
11013
|
active: !0,
|
|
@@ -11026,13 +11026,14 @@ const hl = (e) => Object.fromEntries(
|
|
|
11026
11026
|
tool_result: Ve,
|
|
11027
11027
|
orientation: A.data.details?._meta?.orientation,
|
|
11028
11028
|
...St.length && { mcp_meta_fields: St },
|
|
11029
|
-
...Be ? { toolSelectionNames: Be } : {}
|
|
11029
|
+
...Be ? { toolSelectionNames: Be } : {},
|
|
11030
|
+
...Ae?.hide_show_more !== void 0 ? { hide_show_more: Ae.hide_show_more } : {}
|
|
11030
11031
|
});
|
|
11031
11032
|
break;
|
|
11032
11033
|
}
|
|
11033
11034
|
case O.SYNAPSE_EICITATION_STATUS.SUCCESS: {
|
|
11034
11035
|
ye(ae, {
|
|
11035
|
-
...
|
|
11036
|
+
...Ae || {},
|
|
11036
11037
|
tool_id: re,
|
|
11037
11038
|
// disabled: !isActiveComponent(component),
|
|
11038
11039
|
disabled: !0,
|
|
@@ -11050,7 +11051,7 @@ const hl = (e) => Object.fromEntries(
|
|
|
11050
11051
|
}
|
|
11051
11052
|
case O.SYNAPSE_EICITATION_STATUS.FAILURE: {
|
|
11052
11053
|
ye(ae, {
|
|
11053
|
-
...
|
|
11054
|
+
...Ae || {},
|
|
11054
11055
|
tool_id: re,
|
|
11055
11056
|
active: !1,
|
|
11056
11057
|
messageId: B,
|
|
@@ -11232,12 +11233,12 @@ const hl = (e) => Object.fromEntries(
|
|
|
11232
11233
|
toolCalled: q,
|
|
11233
11234
|
selectedComponent: re,
|
|
11234
11235
|
resend: ae,
|
|
11235
|
-
tool_declined:
|
|
11236
|
-
tool_result:
|
|
11236
|
+
tool_declined: De,
|
|
11237
|
+
tool_result: Ae,
|
|
11237
11238
|
tool_key: Je
|
|
11238
11239
|
}) => {
|
|
11239
11240
|
const Ve = oe.getState().elicitationState, Dt = Object.values(Ve).some((Ne) => Ne.active);
|
|
11240
|
-
if (!(!q && (!A || A.length === 0) && !I?.trim() && !B?.audio && !re && !Dt && !
|
|
11241
|
+
if (!(!q && (!A || A.length === 0) && !I?.trim() && !B?.audio && !re && !Dt && !Ae && !Object.keys(Ae || {}).length)) {
|
|
11241
11242
|
if (A && A.length > 3) {
|
|
11242
11243
|
z({
|
|
11243
11244
|
title: "Maximum 3 files are allowed to be sent at a time",
|
|
@@ -11260,22 +11261,22 @@ const hl = (e) => Object.fromEntries(
|
|
|
11260
11261
|
});
|
|
11261
11262
|
return;
|
|
11262
11263
|
} else A && A.length && Se(k + A.length);
|
|
11263
|
-
z(null), Z(!1),
|
|
11264
|
+
z(null), Z(!1), Oe() && W(ke.CONNECTED);
|
|
11264
11265
|
try {
|
|
11265
11266
|
const Ne = l.length == 2 && E.length == 2 ? E : null;
|
|
11266
11267
|
let Ge = null, nt = null;
|
|
11267
|
-
const rt = l.length - 1, mt = rt >= 0 ? l[rt] : null, j = oe.getState().elicitationState, ie = Je || null, G = ie ? j[ie] : void 0, St = G?.component === O.SYNAPSE_COMPONENTS.DOCTOR_CARD || G?.component === O.SYNAPSE_COMPONENTS.CARD ? !!G && !
|
|
11268
|
+
const rt = l.length - 1, mt = rt >= 0 ? l[rt] : null, j = oe.getState().elicitationState, ie = Je || null, G = ie ? j[ie] : void 0, St = G?.component === O.SYNAPSE_COMPONENTS.DOCTOR_CARD || G?.component === O.SYNAPSE_COMPONENTS.CARD ? !!G && !Ae && !!G.active : !!G?.active, wt = !!(A || []).length || !!B?.audio || !!De || !St || !q, Ft = re ? re.label : void 0, gr = G?.component === O.SYNAPSE_COMPONENTS.PILL && typeof Ft == "string" ? Ft : null;
|
|
11268
11269
|
if (!wt && St && ie && G?.messageId) {
|
|
11269
|
-
const
|
|
11270
|
+
const Ie = G.toolSelectionNames?.length ? G.toolSelectionNames : G.required?.filter((be) => !G.server_input?.[be]) ?? [], Qe = Ie.reduce((be, ge) => {
|
|
11270
11271
|
if (re) {
|
|
11271
11272
|
const nn = re[ge];
|
|
11272
11273
|
nn !== void 0 && (be[ge] = nn);
|
|
11273
|
-
} else
|
|
11274
|
+
} else Ie.length === 1 && (be[ge] = I);
|
|
11274
11275
|
return be;
|
|
11275
|
-
}, {}), Ct = G.mcp_meta_fields?.reduce((be, ge) => (
|
|
11276
|
+
}, {}), Ct = G.mcp_meta_fields?.reduce((be, ge) => (Ie.includes(ge) ? be[ge] = Qe[ge] : G.server_input?.[ge] && (be[ge] = G.server_input[ge]), ae && !be.is_resend && (be.is_resend = ae), be), {}), Er = Object.keys(G.server_input || {})?.reduce((be, ge) => {
|
|
11276
11277
|
const nn = !Object.keys(Ct || {})?.includes(ge), Bo = !!G.server_input?.[ge];
|
|
11277
11278
|
return (ae ? nn && Bo : nn && G.required?.includes(ge) && Bo) && (be[ge] = G.server_input?.[ge]), be;
|
|
11278
|
-
}, {}), br = ae ? {} : (G.required ||
|
|
11279
|
+
}, {}), br = ae ? {} : (G.required || Ie).reduce((be, ge) => (Object.keys(Ct || {}).includes(ge) || (Qe[ge] !== void 0 ? be[ge] = Qe[ge] : re && re[ge] !== void 0 && (be[ge] = re[ge])), be), {}), tn = {
|
|
11279
11280
|
...Er || {},
|
|
11280
11281
|
//existing inputs
|
|
11281
11282
|
...br,
|
|
@@ -11300,26 +11301,26 @@ const hl = (e) => Object.fromEntries(
|
|
|
11300
11301
|
});
|
|
11301
11302
|
}
|
|
11302
11303
|
} else {
|
|
11303
|
-
const
|
|
11304
|
+
const Ie = mt?.id, Qe = Ie ? Object.entries(Ve).filter(([Er, br]) => {
|
|
11304
11305
|
const [tn] = Er.split("::");
|
|
11305
|
-
return tn ===
|
|
11306
|
-
}) : [], Ct =
|
|
11306
|
+
return tn === Ie && br.active;
|
|
11307
|
+
}) : [], Ct = Ae ?? G?.tool_result;
|
|
11307
11308
|
await y.current?.sendMessage({
|
|
11308
11309
|
// Always a string — a tool_result forward with no user text sends "".
|
|
11309
11310
|
message: I ?? "",
|
|
11310
11311
|
files: A,
|
|
11311
11312
|
audio: B,
|
|
11312
11313
|
...Ne && { initial_prompts: Ne },
|
|
11313
|
-
...
|
|
11314
|
+
...De || Qe.length > 0 ? {
|
|
11314
11315
|
tool_declined: !0,
|
|
11315
11316
|
tool_id: G?.tool_id || ""
|
|
11316
11317
|
} : {},
|
|
11317
11318
|
...Ct && { tool_result: Ct }
|
|
11318
11319
|
});
|
|
11319
11320
|
}
|
|
11320
|
-
(I || A && A.length > 0 || B?.audio || gr || nt) && (s((
|
|
11321
|
-
if (Ge) return
|
|
11322
|
-
const Qe =
|
|
11321
|
+
(I || A && A.length > 0 || B?.audio || gr || nt) && (s((Ie) => {
|
|
11322
|
+
if (Ge) return Ie;
|
|
11323
|
+
const Qe = Ie.length === 0 && N?.text ? [{
|
|
11323
11324
|
id: "initial-bot-message",
|
|
11324
11325
|
content: N.text,
|
|
11325
11326
|
role: We.ASSISTANT,
|
|
@@ -11327,7 +11328,7 @@ const hl = (e) => Object.fromEntries(
|
|
|
11327
11328
|
isStored: !1
|
|
11328
11329
|
}] : [];
|
|
11329
11330
|
return [
|
|
11330
|
-
...
|
|
11331
|
+
...Ie,
|
|
11331
11332
|
...Qe,
|
|
11332
11333
|
{
|
|
11333
11334
|
id: Date.now().toString(),
|
|
@@ -11341,12 +11342,12 @@ const hl = (e) => Object.fromEntries(
|
|
|
11341
11342
|
];
|
|
11342
11343
|
}), Ge || he(!0), Ge = null);
|
|
11343
11344
|
const Sl = oe.getState().elicitationState, _r = /* @__PURE__ */ new Set();
|
|
11344
|
-
ie && _r.add(ie), mt?.tool_keys?.forEach((
|
|
11345
|
-
const Qe = Sl[
|
|
11346
|
-
Qe && ye(
|
|
11345
|
+
ie && _r.add(ie), mt?.tool_keys?.forEach((Ie) => _r.add(Ie)), _r.forEach((Ie) => {
|
|
11346
|
+
const Qe = Sl[Ie];
|
|
11347
|
+
Qe && ye(Ie, {
|
|
11347
11348
|
...Qe,
|
|
11348
11349
|
...wt && { active: !1, disabled: !0 },
|
|
11349
|
-
...
|
|
11350
|
+
...Ie === ie ? {
|
|
11350
11351
|
response_value: {
|
|
11351
11352
|
...Qe?.response_value || {},
|
|
11352
11353
|
label: gr || I || ""
|
|
@@ -11385,7 +11386,7 @@ const hl = (e) => Object.fromEntries(
|
|
|
11385
11386
|
y.current?.endRecording();
|
|
11386
11387
|
}, Lt = async (I, A, B) => {
|
|
11387
11388
|
try {
|
|
11388
|
-
if (!
|
|
11389
|
+
if (!Oe())
|
|
11389
11390
|
throw new Error("Not connected to the server");
|
|
11390
11391
|
await y.current?.callTool(
|
|
11391
11392
|
I,
|
|
@@ -11396,9 +11397,9 @@ const hl = (e) => Object.fromEntries(
|
|
|
11396
11397
|
throw q;
|
|
11397
11398
|
}
|
|
11398
11399
|
}, Qt = async () => {
|
|
11399
|
-
Ue(), await ee(), await
|
|
11400
|
+
Ue(), await ee(), await Le(!0);
|
|
11400
11401
|
}, Un = async () => {
|
|
11401
|
-
if (
|
|
11402
|
+
if (Oe()) {
|
|
11402
11403
|
W(ke.CONNECTED);
|
|
11403
11404
|
const I = c.current[c.current.length - 1];
|
|
11404
11405
|
if (I && I.role === We.USER)
|
|
@@ -11424,7 +11425,7 @@ const hl = (e) => Object.fromEntries(
|
|
|
11424
11425
|
};
|
|
11425
11426
|
return {
|
|
11426
11427
|
sendMessage: xe,
|
|
11427
|
-
startSession:
|
|
11428
|
+
startSession: Le,
|
|
11428
11429
|
incomingMessages: l,
|
|
11429
11430
|
loading: d,
|
|
11430
11431
|
endSession: Te,
|
|
@@ -11468,14 +11469,14 @@ const hl = (e) => Object.fromEntries(
|
|
|
11468
11469
|
), b([{ role: "user", text: I }, { role: "assistant", text: A.response }]);
|
|
11469
11470
|
},
|
|
11470
11471
|
sendMessageFeedback: async (I, A, B) => {
|
|
11471
|
-
if (
|
|
11472
|
+
if (Oe())
|
|
11472
11473
|
try {
|
|
11473
11474
|
await y.current?.sendMessageFeedback(A, I, B);
|
|
11474
11475
|
} catch {
|
|
11475
11476
|
}
|
|
11476
11477
|
},
|
|
11477
11478
|
sendSessionFeedback: async (I, A) => {
|
|
11478
|
-
if (!(!
|
|
11479
|
+
if (!(!Oe() || !I?.length && !A))
|
|
11479
11480
|
try {
|
|
11480
11481
|
await y.current?.sendSessionFeedback(I, A);
|
|
11481
11482
|
} catch {
|
|
@@ -11627,11 +11628,11 @@ function Jh({ isOpen: e, agentId: t, config: n }) {
|
|
|
11627
11628
|
incomingMessages: ce,
|
|
11628
11629
|
loading: ye,
|
|
11629
11630
|
sendMessage: ve,
|
|
11630
|
-
startSession:
|
|
11631
|
-
isReady:
|
|
11631
|
+
startSession: Le,
|
|
11632
|
+
isReady: Oe,
|
|
11632
11633
|
startRecording: Te,
|
|
11633
11634
|
stopRecording: Ue,
|
|
11634
|
-
handleRetry:
|
|
11635
|
+
handleRetry: Pe,
|
|
11635
11636
|
isValidFile: xe,
|
|
11636
11637
|
sendMessageFeedback: Xe,
|
|
11637
11638
|
clearElicitationState: Xt,
|
|
@@ -11645,8 +11646,8 @@ function Jh({ isOpen: e, agentId: t, config: n }) {
|
|
|
11645
11646
|
...n?.authToken && { authToken: n.authToken }
|
|
11646
11647
|
});
|
|
11647
11648
|
$(() => {
|
|
11648
|
-
t && (k.current !== t && (bu(t), yu(t), D(t), (n.displayMode === "full" || n.displayMode === "widget") && (b(n.displayMode), ne(n.displayMode)), n?.context && Object.keys(n?.context || {}).length && se(n.context), (n?.initialMessage?.text || n?.initialMessage?.suggestions?.length) && P(n.initialMessage), k.current = t), e &&
|
|
11649
|
-
}, [e,
|
|
11649
|
+
t && (k.current !== t && (bu(t), yu(t), D(t), (n.displayMode === "full" || n.displayMode === "widget") && (b(n.displayMode), ne(n.displayMode)), n?.context && Object.keys(n?.context || {}).length && se(n.context), (n?.initialMessage?.text || n?.initialMessage?.suggestions?.length) && P(n.initialMessage), k.current = t), e && Oe && !T.current && (T.current = !0, Le(!1)));
|
|
11650
|
+
}, [e, Oe, t]), $(() => () => {
|
|
11650
11651
|
l();
|
|
11651
11652
|
}, []);
|
|
11652
11653
|
const Lt = () => {
|
|
@@ -11670,8 +11671,8 @@ function Jh({ isOpen: e, agentId: t, config: n }) {
|
|
|
11670
11671
|
}, [n?.initialMessage]), B = ue(() => A && ce?.length === 0, [ce, A]), q = ue(() => I ? I.component === O.SYNAPSE_COMPONENTS.MOBILE || I.component === O.SYNAPSE_COMPONENTS.OTP || I.component === O.SYNAPSE_COMPONENTS.EMAIL : !1, [I]), {
|
|
11671
11672
|
scrollAreaRef: re,
|
|
11672
11673
|
messagesEndRef: ae,
|
|
11673
|
-
showScrollButton:
|
|
11674
|
-
scrollToBottom:
|
|
11674
|
+
showScrollButton: De,
|
|
11675
|
+
scrollToBottom: Ae
|
|
11675
11676
|
} = Kh({
|
|
11676
11677
|
messageCount: ce.length,
|
|
11677
11678
|
isStreaming: Q,
|
|
@@ -11747,7 +11748,7 @@ function Jh({ isOpen: e, agentId: t, config: n }) {
|
|
|
11747
11748
|
isRecording: f,
|
|
11748
11749
|
hasAttachment: w,
|
|
11749
11750
|
attachmentFiles: C,
|
|
11750
|
-
showScrollButton:
|
|
11751
|
+
showScrollButton: De,
|
|
11751
11752
|
// Display mode
|
|
11752
11753
|
displayMode: y,
|
|
11753
11754
|
// user pref: "widget" | "full" (local toggle)
|
|
@@ -11782,16 +11783,16 @@ function Jh({ isOpen: e, agentId: t, config: n }) {
|
|
|
11782
11783
|
// Chat hook values
|
|
11783
11784
|
incomingMessages: ce,
|
|
11784
11785
|
sendMessage: ve,
|
|
11785
|
-
startSession:
|
|
11786
|
+
startSession: Le,
|
|
11786
11787
|
sendMessageFeedback: Xe,
|
|
11787
11788
|
clearElicitationState: Xt,
|
|
11788
|
-
handleRetry:
|
|
11789
|
+
handleRetry: Pe,
|
|
11789
11790
|
// Handlers
|
|
11790
11791
|
handleSendMessage: Ge,
|
|
11791
11792
|
handleFileChange: nt,
|
|
11792
11793
|
handleRemoveFile: rt,
|
|
11793
11794
|
handleRecording: mt,
|
|
11794
|
-
scrollToBottom:
|
|
11795
|
+
scrollToBottom: Ae,
|
|
11795
11796
|
handleClose: Lt,
|
|
11796
11797
|
// Feedback modal
|
|
11797
11798
|
showFeedbackModal: N,
|
|
@@ -12209,7 +12210,7 @@ const am = ze(
|
|
|
12209
12210
|
), hm = ze(
|
|
12210
12211
|
() => import("./medassist-widget-MediaCard-yhz2Z0ZQ.js").then((e) => ({ default: e.MediaCard }))
|
|
12211
12212
|
);
|
|
12212
|
-
function
|
|
12213
|
+
function Re({ className: e }) {
|
|
12213
12214
|
return /* @__PURE__ */ a(
|
|
12214
12215
|
"div",
|
|
12215
12216
|
{
|
|
@@ -12226,9 +12227,9 @@ function Ie({ className: e }) {
|
|
|
12226
12227
|
function $t({ variant: e }) {
|
|
12227
12228
|
return e === "pill" ? /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2 mt-3", "aria-busy": !0, "aria-label": "Loading options", children: [
|
|
12228
12229
|
/* @__PURE__ */ a(Kn, {}),
|
|
12229
|
-
/* @__PURE__ */ a(
|
|
12230
|
-
/* @__PURE__ */ a(
|
|
12231
|
-
/* @__PURE__ */ a(
|
|
12230
|
+
/* @__PURE__ */ a(Re, { className: "h-8 w-20 rounded-full" }),
|
|
12231
|
+
/* @__PURE__ */ a(Re, { className: "h-8 w-24 rounded-full" }),
|
|
12232
|
+
/* @__PURE__ */ a(Re, { className: "h-8 w-16 rounded-full" })
|
|
12232
12233
|
] }) : e === "media" ? /* @__PURE__ */ a(
|
|
12233
12234
|
"div",
|
|
12234
12235
|
{
|
|
@@ -12237,10 +12238,10 @@ function $t({ variant: e }) {
|
|
|
12237
12238
|
"aria-label": "Loading media",
|
|
12238
12239
|
children: [
|
|
12239
12240
|
/* @__PURE__ */ a(Kn, {}),
|
|
12240
|
-
/* @__PURE__ */ a(
|
|
12241
|
+
/* @__PURE__ */ a(Re, { className: "h-24 w-full rounded-lg" }),
|
|
12241
12242
|
/* @__PURE__ */ a("div", { className: "mt-3 space-y-2", children: [
|
|
12242
|
-
/* @__PURE__ */ a(
|
|
12243
|
-
/* @__PURE__ */ a(
|
|
12243
|
+
/* @__PURE__ */ a(Re, { className: "h-3 w-3/4 rounded" }),
|
|
12244
|
+
/* @__PURE__ */ a(Re, { className: "h-3 w-1/2 rounded" })
|
|
12244
12245
|
] })
|
|
12245
12246
|
]
|
|
12246
12247
|
}
|
|
@@ -12252,13 +12253,13 @@ function $t({ variant: e }) {
|
|
|
12252
12253
|
"aria-label": "Loading input",
|
|
12253
12254
|
children: [
|
|
12254
12255
|
/* @__PURE__ */ a(Kn, {}),
|
|
12255
|
-
/* @__PURE__ */ a(
|
|
12256
|
+
/* @__PURE__ */ a(Re, { className: "h-3 w-32 rounded mb-3" }),
|
|
12256
12257
|
/* @__PURE__ */ a("div", { className: "space-y-2", children: [
|
|
12257
|
-
/* @__PURE__ */ a(
|
|
12258
|
-
/* @__PURE__ */ a(
|
|
12259
|
-
/* @__PURE__ */ a(
|
|
12258
|
+
/* @__PURE__ */ a(Re, { className: "h-9 w-full rounded-lg" }),
|
|
12259
|
+
/* @__PURE__ */ a(Re, { className: "h-9 w-full rounded-lg" }),
|
|
12260
|
+
/* @__PURE__ */ a(Re, { className: "h-9 w-full rounded-lg" })
|
|
12260
12261
|
] }),
|
|
12261
|
-
/* @__PURE__ */ a(
|
|
12262
|
+
/* @__PURE__ */ a(Re, { className: "mt-4 h-9 w-full rounded-lg" })
|
|
12262
12263
|
]
|
|
12263
12264
|
}
|
|
12264
12265
|
) : /* @__PURE__ */ a(
|
|
@@ -12270,17 +12271,17 @@ function $t({ variant: e }) {
|
|
|
12270
12271
|
children: [
|
|
12271
12272
|
/* @__PURE__ */ a(Kn, {}),
|
|
12272
12273
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-3", children: [
|
|
12273
|
-
/* @__PURE__ */ a(
|
|
12274
|
+
/* @__PURE__ */ a(Re, { className: "h-10 w-10 rounded-full" }),
|
|
12274
12275
|
/* @__PURE__ */ a("div", { className: "flex-1 space-y-2", children: [
|
|
12275
|
-
/* @__PURE__ */ a(
|
|
12276
|
-
/* @__PURE__ */ a(
|
|
12276
|
+
/* @__PURE__ */ a(Re, { className: "h-3 w-3/4 rounded" }),
|
|
12277
|
+
/* @__PURE__ */ a(Re, { className: "h-3 w-1/2 rounded" })
|
|
12277
12278
|
] })
|
|
12278
12279
|
] }),
|
|
12279
12280
|
/* @__PURE__ */ a("div", { className: "mt-4 space-y-2", children: [
|
|
12280
|
-
/* @__PURE__ */ a(
|
|
12281
|
-
/* @__PURE__ */ a(
|
|
12281
|
+
/* @__PURE__ */ a(Re, { className: "h-3 w-full rounded" }),
|
|
12282
|
+
/* @__PURE__ */ a(Re, { className: "h-3 w-5/6 rounded" })
|
|
12282
12283
|
] }),
|
|
12283
|
-
/* @__PURE__ */ a(
|
|
12284
|
+
/* @__PURE__ */ a(Re, { className: "mt-4 h-9 w-28 rounded-lg" })
|
|
12284
12285
|
]
|
|
12285
12286
|
}
|
|
12286
12287
|
);
|
|
@@ -12349,7 +12350,7 @@ function fm({
|
|
|
12349
12350
|
if (!f) return null;
|
|
12350
12351
|
const S = f === O.SYNAPSE_COMPONENTS.PILL ? b?.options : void 0, T = f === O.SYNAPSE_COMPONENTS.CARD ? b?.cards : void 0, w = f === O.SYNAPSE_COMPONENTS.MEDIA_CARD ? b?.media_card : void 0;
|
|
12351
12352
|
return /* @__PURE__ */ a("div", { className: "flex justify-end", children: [
|
|
12352
|
-
S && /* @__PURE__ */ a(
|
|
12353
|
+
S && /* @__PURE__ */ a(Me, { fallback: /* @__PURE__ */ a($t, { variant: "pill" }), children: /* @__PURE__ */ a("div", { className: `flex ${S.length > 3 ? "flex-col" : "flex-wrap"} gap-2 mt-3`, children: [
|
|
12353
12354
|
S.slice(0, h).map((v, N) => /* @__PURE__ */ a(
|
|
12354
12355
|
am,
|
|
12355
12356
|
{
|
|
@@ -12381,7 +12382,7 @@ function fm({
|
|
|
12381
12382
|
}
|
|
12382
12383
|
)
|
|
12383
12384
|
] }) }),
|
|
12384
|
-
f === O.SYNAPSE_COMPONENTS.MULTI && b?.options && /* @__PURE__ */ a(
|
|
12385
|
+
f === O.SYNAPSE_COMPONENTS.MULTI && b?.options && /* @__PURE__ */ a(Me, { fallback: /* @__PURE__ */ a($t, { variant: "input" }), children: /* @__PURE__ */ a("div", { className: "mt-3 space-y-3 break-words overflow-wrap-anywhere whitespace-pre-wrap bg-elicitationBg border border-primary/40 rounded-xl p-4", children: [
|
|
12385
12386
|
/* @__PURE__ */ a("h3", { className: "text-xs font-medium text-muted-foreground mb-2", children: "Select multiple options:" }),
|
|
12386
12387
|
/* @__PURE__ */ a(
|
|
12387
12388
|
lm,
|
|
@@ -12407,12 +12408,12 @@ function fm({
|
|
|
12407
12408
|
}
|
|
12408
12409
|
)
|
|
12409
12410
|
] }) }),
|
|
12410
|
-
C && C.length > 0 ? /* @__PURE__ */ a(
|
|
12411
|
+
C && C.length > 0 ? /* @__PURE__ */ a(Me, { fallback: /* @__PURE__ */ a($t, { variant: "card" }), children: /* @__PURE__ */ a(
|
|
12411
12412
|
cm,
|
|
12412
12413
|
{
|
|
12413
12414
|
count: C.length > 1 ? C.length + 1 : C.length,
|
|
12414
12415
|
renderItem: (v, N) => {
|
|
12415
|
-
if (C.length > 1 && v === C.length)
|
|
12416
|
+
if (C.length > 1 && v === C.length && n?.hide_show_more !== !0)
|
|
12416
12417
|
return /* @__PURE__ */ a(
|
|
12417
12418
|
"button",
|
|
12418
12419
|
{
|
|
@@ -12440,7 +12441,7 @@ function fm({
|
|
|
12440
12441
|
}
|
|
12441
12442
|
);
|
|
12442
12443
|
const M = C[v];
|
|
12443
|
-
return /* @__PURE__ */ a(
|
|
12444
|
+
return /* @__PURE__ */ a(Me, { fallback: /* @__PURE__ */ a($t, { variant: "card" }), children: /* @__PURE__ */ a(
|
|
12444
12445
|
dm,
|
|
12445
12446
|
{
|
|
12446
12447
|
doctor: M,
|
|
@@ -12453,7 +12454,7 @@ function fm({
|
|
|
12453
12454
|
}
|
|
12454
12455
|
}
|
|
12455
12456
|
) }) : null,
|
|
12456
|
-
T && /* @__PURE__ */ a(
|
|
12457
|
+
T && /* @__PURE__ */ a(Me, { fallback: /* @__PURE__ */ a($t, { variant: "card" }), children: /* @__PURE__ */ a(
|
|
12457
12458
|
um,
|
|
12458
12459
|
{
|
|
12459
12460
|
cards: T,
|
|
@@ -12469,7 +12470,7 @@ function fm({
|
|
|
12469
12470
|
disabled: E || o
|
|
12470
12471
|
}
|
|
12471
12472
|
) }),
|
|
12472
|
-
w && /* @__PURE__ */ a(
|
|
12473
|
+
w && /* @__PURE__ */ a(Me, { fallback: /* @__PURE__ */ a($t, { variant: "media" }), children: /* @__PURE__ */ a("div", { className: "mt-3", children: /* @__PURE__ */ a(hm, { card: w }) }) })
|
|
12473
12474
|
] });
|
|
12474
12475
|
}
|
|
12475
12476
|
function mm({
|
|
@@ -13058,7 +13059,7 @@ function ym({
|
|
|
13058
13059
|
)
|
|
13059
13060
|
}
|
|
13060
13061
|
) : void 0,
|
|
13061
|
-
children: z ? /* @__PURE__ */ a(
|
|
13062
|
+
children: z ? /* @__PURE__ */ a(Me, { fallback: /* @__PURE__ */ a(xi, {}), children: /* @__PURE__ */ a(
|
|
13062
13063
|
bm,
|
|
13063
13064
|
{
|
|
13064
13065
|
state: D,
|
|
@@ -13070,7 +13071,7 @@ function ym({
|
|
|
13070
13071
|
iconUrl: n.iconUrl,
|
|
13071
13072
|
textColor: n.theme?.textColor
|
|
13072
13073
|
}
|
|
13073
|
-
) }) : /* @__PURE__ */ a(
|
|
13074
|
+
) }) : /* @__PURE__ */ a(Me, { fallback: /* @__PURE__ */ a(xi, {}), children: /* @__PURE__ */ a("div", { className: L("flex-1 flex flex-col min-h-0 overflow-hidden relative synapse-chat-window"), children: [
|
|
13074
13075
|
/* @__PURE__ */ a("div", { className: "relative flex min-h-0 flex-1 flex-col overflow-hidden", children: /* @__PURE__ */ a(
|
|
13075
13076
|
Va,
|
|
13076
13077
|
{
|
|
@@ -13091,7 +13092,7 @@ function ym({
|
|
|
13091
13092
|
children: [
|
|
13092
13093
|
g && /* @__PURE__ */ a("div", { className: "text-xs text-[var(--color-muted-foreground)] text-center mb-2", children: "Just now" }),
|
|
13093
13094
|
!g && /* @__PURE__ */ a("div", { className: "text-xs text-[var(--color-muted-foreground)] text-center", children: Ce }),
|
|
13094
|
-
/* @__PURE__ */ a(
|
|
13095
|
+
/* @__PURE__ */ a(Me, { fallback: /* @__PURE__ */ a(Gu, {}), children: /* @__PURE__ */ a(
|
|
13095
13096
|
_m,
|
|
13096
13097
|
{
|
|
13097
13098
|
messages: x,
|