@voxket-ai/voxket-live 1.1.0 β†’ 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ var zg = Object.defineProperty;
2
2
  var Hg = (e, t, n) => t in e ? zg(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var we = (e, t, n) => Hg(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import * as P from "react";
5
- import Ie, { createContext as In, useRef as on, useLayoutEffect as jg, useEffect as Nt, useId as qs, useContext as Ct, useInsertionEffect as Tf, useMemo as Qt, useCallback as Xe, Children as Wg, isValidElement as Gg, useState as ke, Fragment as Nf, createElement as Kg, forwardRef as qg, Component as Yg } from "react";
5
+ import Me, { createContext as In, useRef as on, useLayoutEffect as jg, useEffect as Nt, useId as qs, useContext as Ct, useInsertionEffect as Tf, useMemo as Qt, useCallback as Xe, Children as Wg, isValidElement as Gg, useState as ke, Fragment as Nf, createElement as Kg, forwardRef as qg, Component as Yg } from "react";
6
6
  import { jsx as m, Fragment as Tt, jsxs as N } from "react/jsx-runtime";
7
7
  import { Track as st, setLogLevel as Zg, RoomEvent as Be, ConnectionState as vr, Room as ao } from "livekit-client";
8
8
  import { AudioTrack as Xg, BarVisualizer as Af, VideoTrack as Oo, useTracks as Qg, useRoomContext as Jg, RoomContext as xc, RoomAudioRenderer as vc, StartAudio as wc } from "@livekit/components-react";
@@ -7775,39 +7775,50 @@ function Bw(e) {
7775
7775
  const t = Math.floor(e / 60), n = e % 60;
7776
7776
  return `${t}:${n.toString().padStart(2, "0")}`;
7777
7777
  }
7778
- const Ep = Ie.forwardRef(({
7778
+ const Ep = Me.forwardRef(({
7779
7779
  state: e,
7780
7780
  audioTrack: t,
7781
- className: n
7782
- }, r) => {
7783
- var s, l, c, u, d;
7784
- const i = Ie.useRef(null), [o, a] = Ie.useState(!1);
7785
- return Ie.useEffect(() => {
7786
- i.current && (console.log("πŸ”Š AgentTile: Audio element created:", {
7787
- autoplay: i.current.autoplay,
7788
- muted: i.current.muted,
7789
- volume: i.current.volume,
7790
- readyState: i.current.readyState,
7791
- paused: i.current.paused
7792
- }), a(!0));
7793
- }, [t]), Ie.useEffect(() => {
7794
- const f = i.current;
7795
- if (!f) return;
7796
- const h = () => console.log("▢️ AgentTile: Audio started playing"), g = () => console.log("⏸️ AgentTile: Audio paused"), p = () => console.log("⏹️ AgentTile: Audio ended"), v = (w) => console.error("❌ AgentTile: Audio error:", w), y = () => console.log("⏳ AgentTile: Audio load started"), E = () => console.log("βœ… AgentTile: Audio can play");
7797
- return f.addEventListener("play", h), f.addEventListener("pause", g), f.addEventListener("ended", p), f.addEventListener("error", v), f.addEventListener("loadstart", y), f.addEventListener("canplay", E), () => {
7798
- f.removeEventListener("play", h), f.removeEventListener("pause", g), f.removeEventListener("ended", p), f.removeEventListener("error", v), f.removeEventListener("loadstart", y), f.removeEventListener("canplay", E);
7781
+ className: n,
7782
+ theme: r = "vox"
7783
+ }, i) => {
7784
+ var c, u, d, f, h;
7785
+ const o = Me.useRef(null), [a, s] = Me.useState(!1);
7786
+ Me.useEffect(() => {
7787
+ o.current && (console.log("πŸ”Š AgentTile: Audio element created:", {
7788
+ autoplay: o.current.autoplay,
7789
+ muted: o.current.muted,
7790
+ volume: o.current.volume,
7791
+ readyState: o.current.readyState,
7792
+ paused: o.current.paused
7793
+ }), s(!0));
7794
+ }, [t]), Me.useEffect(() => {
7795
+ const g = o.current;
7796
+ if (!g) return;
7797
+ const p = () => console.log("▢️ AgentTile: Audio started playing"), v = () => console.log("⏸️ AgentTile: Audio paused"), y = () => console.log("⏹️ AgentTile: Audio ended"), E = (S) => console.error("❌ AgentTile: Audio error:", S), w = () => console.log("⏳ AgentTile: Audio load started"), _ = () => console.log("βœ… AgentTile: Audio can play");
7798
+ return g.addEventListener("play", p), g.addEventListener("pause", v), g.addEventListener("ended", y), g.addEventListener("error", E), g.addEventListener("loadstart", w), g.addEventListener("canplay", _), () => {
7799
+ g.removeEventListener("play", p), g.removeEventListener("pause", v), g.removeEventListener("ended", y), g.removeEventListener("error", E), g.removeEventListener("loadstart", w), g.removeEventListener("canplay", _);
7799
7800
  };
7800
- }, [o]), console.log("🎀 AgentTile render:", {
7801
+ }, [a]), console.log("🎀 AgentTile render:", {
7801
7802
  state: e,
7802
7803
  hasAudioTrack: !!t,
7803
7804
  trackSource: t == null ? void 0 : t.source,
7804
- participantId: (s = t == null ? void 0 : t.participant) == null ? void 0 : s.identity,
7805
- publicationMuted: (l = t == null ? void 0 : t.publication) == null ? void 0 : l.isMuted,
7806
- audioElementReady: o,
7807
- trackMediaStreamTrack: (d = (u = (c = t == null ? void 0 : t.publication) == null ? void 0 : c.track) == null ? void 0 : u.mediaStreamTrack) == null ? void 0 : d.readyState
7808
- }), /* @__PURE__ */ N("div", { ref: r, className: je("", n), children: [
7805
+ participantId: (c = t == null ? void 0 : t.participant) == null ? void 0 : c.identity,
7806
+ publicationMuted: (u = t == null ? void 0 : t.publication) == null ? void 0 : u.isMuted,
7807
+ audioElementReady: a,
7808
+ trackMediaStreamTrack: (h = (f = (d = t == null ? void 0 : t.publication) == null ? void 0 : d.track) == null ? void 0 : f.mediaStreamTrack) == null ? void 0 : h.readyState
7809
+ });
7810
+ const l = Me.useMemo(() => r === "light" ? {
7811
+ base: "bg-black/90",
7812
+ highlighted: "bg-black",
7813
+ muted: "bg-black/30"
7814
+ } : {
7815
+ base: "bg-white/90",
7816
+ highlighted: "bg-white",
7817
+ muted: "bg-white/30"
7818
+ }, [r]);
7819
+ return /* @__PURE__ */ N("div", { ref: i, className: je("", n), children: [
7809
7820
  t && /* @__PURE__ */ N(Tt, { children: [
7810
- /* @__PURE__ */ m(Xg, { ref: i, trackRef: t, volume: 1 }),
7821
+ /* @__PURE__ */ m(Xg, { ref: o, trackRef: t, volume: 1 }),
7811
7822
  /* @__PURE__ */ m(
7812
7823
  Af,
7813
7824
  {
@@ -7820,10 +7831,10 @@ const Ep = Ie.forwardRef(({
7820
7831
  "span",
7821
7832
  {
7822
7833
  className: je([
7823
- "bg-white/90 min-h-2 w-2 rounded-full",
7834
+ `${l.base} min-h-2 w-2 rounded-full`,
7824
7835
  "origin-center transition-colors duration-250 ease-linear",
7825
- "data-[lk-highlighted=true]:bg-white",
7826
- "data-[lk-muted=true]:bg-white/30"
7836
+ `data-[lk-highlighted=true]:${l.highlighted}`,
7837
+ `data-[lk-muted=true]:${l.muted}`
7827
7838
  ])
7828
7839
  }
7829
7840
  )
@@ -7831,17 +7842,17 @@ const Ep = Ie.forwardRef(({
7831
7842
  )
7832
7843
  ] }),
7833
7844
  !t && // Fallback: Show default avatar when no audio track is available
7834
- /* @__PURE__ */ m("div", { className: je("flex aspect-video w-40 items-center justify-center"), children: /* @__PURE__ */ m("div", { className: "flex flex-col items-center justify-center", children: /* @__PURE__ */ m("div", { className: "flex gap-1.5", children: Array.from({ length: 5 }).map((f, h) => /* @__PURE__ */ m(
7845
+ /* @__PURE__ */ m("div", { className: je("flex aspect-video w-40 items-center justify-center"), children: /* @__PURE__ */ m("div", { className: "flex flex-col items-center justify-center", children: /* @__PURE__ */ m("div", { className: "flex gap-1.5", children: Array.from({ length: 5 }).map((g, p) => /* @__PURE__ */ m(
7835
7846
  "span",
7836
7847
  {
7837
7848
  className: je([
7838
- "bg-white/70 min-h-2 w-2 rounded-full",
7849
+ `${l.base} min-h-2 w-2 rounded-full`,
7839
7850
  "origin-center transition-colors duration-250 ease-linear",
7840
- e === "speaking" && "animate-pulse bg-white",
7841
- e === "thinking" && "animate-pulse bg-white/50"
7851
+ e === "speaking" && `animate-pulse ${l.highlighted}`,
7852
+ e === "thinking" && `animate-pulse ${l.muted}`
7842
7853
  ])
7843
7854
  },
7844
- h
7855
+ p
7845
7856
  )) }) }) })
7846
7857
  ] });
7847
7858
  });
@@ -7937,13 +7948,13 @@ function Hw(e, t) {
7937
7948
  [e, r, n]
7938
7949
  );
7939
7950
  }
7940
- function jw({ chatOpen: e, client: t }) {
7951
+ function jw({ chatOpen: e, client: t, theme: n = "vox" }) {
7941
7952
  const {
7942
- agent: { isActive: n = !1 } = {},
7943
- session: r,
7944
- state: i = "idle",
7945
- audioTrack: o,
7946
- videoTrack: a
7953
+ agent: { isActive: r = !1 } = {},
7954
+ session: i,
7955
+ state: o = "idle",
7956
+ audioTrack: a,
7957
+ videoTrack: s
7947
7958
  } = t ? Al(t) : {
7948
7959
  agent: { isActive: !1 },
7949
7960
  session: null,
@@ -7953,59 +7964,60 @@ function jw({ chatOpen: e, client: t }) {
7953
7964
  };
7954
7965
  console.log("🎨 MediaTiles render:", {
7955
7966
  chatOpen: e,
7956
- isAgentActive: n,
7957
- hasSession: !!r,
7958
- sessionState: r == null ? void 0 : r.state,
7959
- agentState: i,
7960
- hasAudioTrack: !!o,
7961
- hasVideoTrack: !!a
7967
+ isAgentActive: r,
7968
+ hasSession: !!i,
7969
+ sessionState: i == null ? void 0 : i.state,
7970
+ agentState: o,
7971
+ hasAudioTrack: !!a,
7972
+ hasVideoTrack: !!s
7962
7973
  });
7963
- const [s] = Qg([st.Source.ScreenShare]), l = Hw(st.Source.Camera, t), c = l && !l.publication.isMuted, u = s && !s.publication.isMuted, d = c || u, f = n || r && r.state === "active", h = {
7974
+ const [l] = Qg([st.Source.ScreenShare]), c = Hw(st.Source.Camera, t), u = c && !c.publication.isMuted, d = l && !l.publication.isMuted, f = u || d, h = r || i && i.state === "active", g = {
7964
7975
  ..._n.transition,
7965
7976
  delay: e ? 0 : 0.15
7966
7977
  // delay on close
7967
- }, g = {
7978
+ }, p = {
7968
7979
  ..._n.animate,
7969
7980
  scale: e ? 1 : 3,
7970
- transition: h
7971
- }, p = {
7981
+ transition: g
7982
+ }, v = {
7972
7983
  ..._n.animate,
7973
- transition: h
7974
- }, v = h, y = h, E = a && a.publication && a.participant;
7984
+ transition: g
7985
+ }, y = g, E = g, w = s && s.publication && s.participant;
7975
7986
  return /* @__PURE__ */ m("div", { className: "relative w-full h-full z-10 flex items-center justify-center", children: /* @__PURE__ */ m("div", { className: "relative w-full h-full max-w-2xl px-4 md:px-0", children: /* @__PURE__ */ N("div", { className: je(fr.grid), children: [
7976
- f && /* @__PURE__ */ m(
7987
+ h && /* @__PURE__ */ m(
7977
7988
  "div",
7978
7989
  {
7979
7990
  className: je([
7980
7991
  "grid",
7981
7992
  !e && fr.agentChatClosed,
7982
- e && d && fr.agentChatOpenWithSecondTile,
7983
- e && !d && fr.agentChatOpenWithoutSecondTile
7993
+ e && f && fr.agentChatOpenWithSecondTile,
7994
+ e && !f && fr.agentChatOpenWithoutSecondTile
7984
7995
  ]),
7985
7996
  children: /* @__PURE__ */ N("div", { className: "h-full flex items-center justify-center", children: [
7986
- !E && // audio-only agent or default avatar when no video
7997
+ !w && // audio-only agent or default avatar when no video
7987
7998
  /* @__PURE__ */ m(
7988
7999
  Uw,
7989
8000
  {
7990
8001
  layoutId: "agent",
7991
8002
  ..._n,
7992
- animate: g,
7993
- transition: v,
7994
- state: i,
7995
- audioTrack: o || void 0,
8003
+ animate: p,
8004
+ transition: y,
8005
+ state: o,
8006
+ audioTrack: a || void 0,
8007
+ theme: n,
7996
8008
  className: je(e ? "h-[90px]" : "h-auto w-full")
7997
8009
  },
7998
8010
  "agent"
7999
8011
  ),
8000
- E && a && // avatar agent - only render if we have a valid video track
8012
+ w && s && // avatar agent - only render if we have a valid video track
8001
8013
  /* @__PURE__ */ m(
8002
8014
  zw,
8003
8015
  {
8004
8016
  layoutId: "avatar",
8005
8017
  ..._n,
8006
- animate: p,
8007
- transition: y,
8008
- videoTrack: a,
8018
+ animate: v,
8019
+ transition: E,
8020
+ videoTrack: s,
8009
8021
  className: je(
8010
8022
  e ? "h-[90px] [&>video]:h-[90px] [&>video]:w-auto" : "h-auto w-full"
8011
8023
  )
@@ -8024,13 +8036,13 @@ function jw({ chatOpen: e, client: t }) {
8024
8036
  !e && fr.secondTileChatClosed
8025
8037
  ]),
8026
8038
  children: /* @__PURE__ */ N("div", { className: "w-full px-10 flex items-center shadow-2xl justify-between", children: [
8027
- l && c && /* @__PURE__ */ m(
8039
+ c && u && /* @__PURE__ */ m(
8028
8040
  Vu,
8029
8041
  {
8030
8042
  layout: "position",
8031
8043
  layoutId: "camera",
8032
8044
  ..._n,
8033
- trackRef: l,
8045
+ trackRef: c,
8034
8046
  transition: {
8035
8047
  ..._n.transition,
8036
8048
  delay: e ? 0 : 0.15
@@ -8039,13 +8051,13 @@ function jw({ chatOpen: e, client: t }) {
8039
8051
  },
8040
8052
  "camera"
8041
8053
  ),
8042
- u && /* @__PURE__ */ m(
8054
+ d && /* @__PURE__ */ m(
8043
8055
  Vu,
8044
8056
  {
8045
8057
  layout: "position",
8046
8058
  layoutId: "screen",
8047
8059
  ..._n,
8048
- trackRef: s,
8060
+ trackRef: l,
8049
8061
  transition: {
8050
8062
  ..._n.transition,
8051
8063
  delay: e ? 0 : 0.15
@@ -8067,7 +8079,7 @@ const Ww = {
8067
8079
  cardPinkBlur: "absolute bottom-0 left-1/2 -translate-x-1/2 w-[500px] h-[250px] bg-gradient-to-t from-gray-600/[0.08] via-transparent to-transparent blur-3xl",
8068
8080
  cardPulse1: "hidden",
8069
8081
  cardPulse2: "hidden",
8070
- main: "w-full flex flex-col items-center justify-center max-w-md mx-auto bg-gradient-to-b from-[#0a0a0a] via-[#121212] to-[#0a0a0a] rounded-3xl shadow-2xl p-0 overflow-hidden h-full relative",
8082
+ main: "w-full flex flex-col items-center justify-center max-w-md mx-auto bg-gradient-to-b from-[#0a0a0a] via-[#121212] to-[#0a0a0a] shadow-2xl p-0 overflow-hidden h-full relative",
8071
8083
  text: {
8072
8084
  primary: "text-gray-100 font-semibold",
8073
8085
  secondary: "text-gray-200",
@@ -8085,10 +8097,10 @@ const Ww = {
8085
8097
  ring2: "hidden",
8086
8098
  ring3: "hidden"
8087
8099
  },
8088
- controlBar: "border border-gray-700/50 rounded-3xl py-4 flex flex-col justify-end h-full bg-gray-900/80 backdrop-blur-xl shadow-2xl",
8100
+ controlBar: "border border-gray-800/50 rounded-3xl py-4 flex flex-col justify-end h-full bg-black/90 backdrop-blur-xl shadow-2xl",
8089
8101
  chatInput: {
8090
- container: "bg-gray-900/80 backdrop-blur-xl border-gray-700/50 shadow-xl",
8091
- textarea: "bg-gray-900/60 border border-gray-700/30 rounded-xl text-gray-100 placeholder-gray-400 font-medium px-4 py-3",
8102
+ container: "bg-black/90 backdrop-blur-xl border-gray-800/50 shadow-xl",
8103
+ textarea: "bg-black/80 border border-gray-800/50 rounded-xl text-gray-100 placeholder-gray-500 font-medium px-4 py-3",
8092
8104
  sendButton: "bg-gray-900/90 hover:bg-gray-900 border-2 border-gray-700/50 hover:border-gray-600 disabled:border-gray-800 disabled:opacity-40 text-gray-100 font-bold hover:scale-105 transition-all duration-300 shadow-xl hover:shadow-gray-600/30",
8093
8105
  attachButton: "text-gray-400 hover:text-gray-200 hover:bg-gray-700/30 transition-all duration-300 rounded-xl",
8094
8106
  endButton: "bg-red-600/90 hover:bg-red-600 border-2 border-red-500/40 hover:border-red-500/60 text-white font-bold hover:scale-105 transition-all duration-300 shadow-xl hover:shadow-red-500/40"
@@ -8128,7 +8140,7 @@ const Ww = {
8128
8140
  cardPinkBlur: "absolute bottom-0 left-1/2 -translate-x-1/2 w-[500px] h-[250px] bg-gradient-to-t from-pink-400/[0.08] via-transparent to-transparent blur-3xl",
8129
8141
  cardPulse1: "hidden",
8130
8142
  cardPulse2: "hidden",
8131
- main: "w-full flex flex-col items-center justify-center max-w-md mx-auto bg-gradient-to-b from-[#fafafa] via-[#ffffff] to-[#fafafa] rounded-3xl shadow-2xl p-0 overflow-hidden h-full relative",
8143
+ main: "w-full flex flex-col items-center justify-center max-w-md mx-auto bg-gradient-to-b from-[#fafafa] via-[#ffffff] to-[#fafafa] shadow-2xl p-0 overflow-hidden h-full relative",
8132
8144
  text: {
8133
8145
  primary: "text-gray-900 font-semibold",
8134
8146
  secondary: "text-gray-800",
@@ -8182,14 +8194,14 @@ const Ww = {
8182
8194
  mutedIndicator: "bg-red-600 text-white shadow-xl shadow-red-500/40 font-semibold"
8183
8195
  }
8184
8196
  }, Kw = {
8185
- card: " text-white bg-gradient-to-b from-[#121212] via-[#1a1a1a] to-[#121212] border border-white/[0.12] w-full h-full flex flex-col justify-between overflow-hidden relative shadow-2xl",
8186
- cardTopGradient: "pointer-events-none absolute top-0 left-0 w-full h-40 z-10 bg-gradient-to-b from-[#0a0a0a]/90 via-[#0a0a0a]/40 to-transparent",
8187
- cardRadial: "absolute inset-0 bg-[radial-gradient(circle_at_50%_-20%,_rgba(99,102,241,0.08),transparent_50%)] opacity-100",
8188
- cardPurpleBlur: "absolute top-0 left-1/2 -translate-x-1/2 w-[600px] h-[300px] bg-gradient-to-b from-indigo-500/[0.12] via-purple-500/[0.06] to-transparent blur-3xl",
8189
- cardPinkBlur: "absolute bottom-0 left-1/2 -translate-x-1/2 w-[500px] h-[250px] bg-gradient-to-t from-violet-500/[0.08] via-transparent to-transparent blur-3xl",
8197
+ card: " text-white bg-gradient-to-b from-[#0a0a0a] via-[#0f0f0f] to-[#0a0a0a] border border-white/[0.08] w-full h-full flex flex-col justify-between overflow-hidden relative shadow-2xl",
8198
+ cardTopGradient: "pointer-events-none absolute top-0 left-0 w-full h-40 z-10 bg-gradient-to-b from-black/95 via-black/50 to-transparent",
8199
+ cardRadial: "absolute inset-0 bg-[radial-gradient(circle_at_50%_-20%,_rgba(79,70,229,0.06),transparent_50%)] opacity-100",
8200
+ cardPurpleBlur: "absolute top-0 left-1/2 -translate-x-1/2 w-[600px] h-[300px] bg-gradient-to-b from-indigo-600/[0.08] via-purple-600/[0.04] to-transparent blur-3xl",
8201
+ cardPinkBlur: "absolute bottom-0 left-1/2 -translate-x-1/2 w-[500px] h-[250px] bg-gradient-to-t from-violet-600/[0.05] via-transparent to-transparent blur-3xl",
8190
8202
  cardPulse1: "hidden",
8191
8203
  cardPulse2: "hidden",
8192
- main: "w-full flex flex-col items-center justify-center max-w-md mx-auto bg-gradient-to-b from-[#121212] via-[#1a1a1a] to-[#121212] rounded-3xl shadow-2xl p-0 overflow-hidden h-full relative",
8204
+ main: "w-full flex flex-col items-center justify-center max-w-md mx-auto bg-gradient-to-b from-[#0a0a0a] via-[#0f0f0f] to-[#0a0a0a] p-0 overflow-hidden h-full relative",
8193
8205
  text: {
8194
8206
  primary: "text-white font-semibold",
8195
8207
  secondary: "text-white/95",
@@ -8250,7 +8262,7 @@ const Ww = {
8250
8262
  cardPinkBlur: "absolute bottom-0 left-1/2 -translate-x-1/2 w-[500px] h-[250px] bg-gradient-to-t from-cyan-600/[0.08] via-transparent to-transparent blur-3xl",
8251
8263
  cardPulse1: "hidden",
8252
8264
  cardPulse2: "hidden",
8253
- main: "w-full flex flex-col items-center justify-center max-w-md mx-auto bg-gradient-to-b from-[#0e1218] via-[#161a25] to-[#0e1218] rounded-3xl shadow-2xl p-0 overflow-hidden h-full relative",
8265
+ main: "w-full flex flex-col items-center justify-center max-w-md mx-auto bg-gradient-to-b from-[#0e1218] via-[#161a25] to-[#0e1218] shadow-2xl p-0 overflow-hidden h-full relative",
8254
8266
  text: {
8255
8267
  primary: "text-white font-semibold",
8256
8268
  secondary: "text-white/95",
@@ -8458,7 +8470,7 @@ function Bo({
8458
8470
  onEndCall: A
8459
8471
  }) {
8460
8472
  var z;
8461
- const O = Ut(t), [b, M] = Ie.useState(""), I = Ie.useRef(null), F = () => {
8473
+ const O = Ut(t), [b, M] = Me.useState(""), I = Me.useRef(null), F = () => {
8462
8474
  const x = b.trim();
8463
8475
  x && _ && (_(x), M(""));
8464
8476
  }, D = (x) => {
@@ -8469,7 +8481,7 @@ function Bo({
8469
8481
  }, ie = je(
8470
8482
  "flex items-center gap-3 px-3 py-2 w-full backdrop-blur-xl border-t",
8471
8483
  E ? "justify-between" : "justify-center",
8472
- t === "light" ? "bg-white/95 border-gray-200" : "bg-gray-900/90 border-gray-700"
8484
+ t === "light" ? "bg-white/95 border-gray-200" : "bg-black/90 border-gray-800"
8473
8485
  ), X = (x, $) => {
8474
8486
  var K, k, Y;
8475
8487
  return $ === "end-call" ? je(
@@ -8979,13 +8991,13 @@ Wt.prototype.property = "";
8979
8991
  Wt.prototype.spaceSeparated = !1;
8980
8992
  Wt.prototype.space = void 0;
8981
8993
  let dE = 0;
8982
- const Re = cr(), vt = cr(), Ps = cr(), Z = cr(), it = cr(), Rr = cr(), qt = cr();
8994
+ const Ie = cr(), vt = cr(), Ps = cr(), Z = cr(), it = cr(), Rr = cr(), qt = cr();
8983
8995
  function cr() {
8984
8996
  return 2 ** ++dE;
8985
8997
  }
8986
8998
  const Ds = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8987
8999
  __proto__: null,
8988
- boolean: Re,
9000
+ boolean: Ie,
8989
9001
  booleanish: vt,
8990
9002
  commaOrSpaceSeparated: qt,
8991
9003
  commaSeparated: Rr,
@@ -9114,38 +9126,38 @@ const fE = Wr({
9114
9126
  accessKey: it,
9115
9127
  action: null,
9116
9128
  allow: null,
9117
- allowFullScreen: Re,
9118
- allowPaymentRequest: Re,
9119
- allowUserMedia: Re,
9129
+ allowFullScreen: Ie,
9130
+ allowPaymentRequest: Ie,
9131
+ allowUserMedia: Ie,
9120
9132
  alt: null,
9121
9133
  as: null,
9122
- async: Re,
9134
+ async: Ie,
9123
9135
  autoCapitalize: null,
9124
9136
  autoComplete: it,
9125
- autoFocus: Re,
9126
- autoPlay: Re,
9137
+ autoFocus: Ie,
9138
+ autoPlay: Ie,
9127
9139
  blocking: it,
9128
9140
  capture: null,
9129
9141
  charSet: null,
9130
- checked: Re,
9142
+ checked: Ie,
9131
9143
  cite: null,
9132
9144
  className: it,
9133
9145
  cols: Z,
9134
9146
  colSpan: null,
9135
9147
  content: null,
9136
9148
  contentEditable: vt,
9137
- controls: Re,
9149
+ controls: Ie,
9138
9150
  controlsList: it,
9139
9151
  coords: Z | Rr,
9140
9152
  crossOrigin: null,
9141
9153
  data: null,
9142
9154
  dateTime: null,
9143
9155
  decoding: null,
9144
- default: Re,
9145
- defer: Re,
9156
+ default: Ie,
9157
+ defer: Ie,
9146
9158
  dir: null,
9147
9159
  dirName: null,
9148
- disabled: Re,
9160
+ disabled: Ie,
9149
9161
  download: Ps,
9150
9162
  draggable: vt,
9151
9163
  encType: null,
@@ -9155,7 +9167,7 @@ const fE = Wr({
9155
9167
  formAction: null,
9156
9168
  formEncType: null,
9157
9169
  formMethod: null,
9158
- formNoValidate: Re,
9170
+ formNoValidate: Ie,
9159
9171
  formTarget: null,
9160
9172
  headers: it,
9161
9173
  height: Z,
@@ -9168,15 +9180,15 @@ const fE = Wr({
9168
9180
  id: null,
9169
9181
  imageSizes: null,
9170
9182
  imageSrcSet: null,
9171
- inert: Re,
9183
+ inert: Ie,
9172
9184
  inputMode: null,
9173
9185
  integrity: null,
9174
9186
  is: null,
9175
- isMap: Re,
9187
+ isMap: Ie,
9176
9188
  itemId: null,
9177
9189
  itemProp: it,
9178
9190
  itemRef: it,
9179
- itemScope: Re,
9191
+ itemScope: Ie,
9180
9192
  itemType: it,
9181
9193
  kind: null,
9182
9194
  label: null,
@@ -9184,7 +9196,7 @@ const fE = Wr({
9184
9196
  language: null,
9185
9197
  list: null,
9186
9198
  loading: null,
9187
- loop: Re,
9199
+ loop: Ie,
9188
9200
  low: Z,
9189
9201
  manifest: null,
9190
9202
  max: null,
@@ -9193,12 +9205,12 @@ const fE = Wr({
9193
9205
  method: null,
9194
9206
  min: null,
9195
9207
  minLength: Z,
9196
- multiple: Re,
9197
- muted: Re,
9208
+ multiple: Ie,
9209
+ muted: Ie,
9198
9210
  name: null,
9199
9211
  nonce: null,
9200
- noModule: Re,
9201
- noValidate: Re,
9212
+ noModule: Ie,
9213
+ noValidate: Ie,
9202
9214
  onAbort: null,
9203
9215
  onAfterPrint: null,
9204
9216
  onAuxClick: null,
@@ -9287,31 +9299,31 @@ const fE = Wr({
9287
9299
  onVolumeChange: null,
9288
9300
  onWaiting: null,
9289
9301
  onWheel: null,
9290
- open: Re,
9302
+ open: Ie,
9291
9303
  optimum: Z,
9292
9304
  pattern: null,
9293
9305
  ping: it,
9294
9306
  placeholder: null,
9295
- playsInline: Re,
9307
+ playsInline: Ie,
9296
9308
  popover: null,
9297
9309
  popoverTarget: null,
9298
9310
  popoverTargetAction: null,
9299
9311
  poster: null,
9300
9312
  preload: null,
9301
- readOnly: Re,
9313
+ readOnly: Ie,
9302
9314
  referrerPolicy: null,
9303
9315
  rel: it,
9304
- required: Re,
9305
- reversed: Re,
9316
+ required: Ie,
9317
+ reversed: Ie,
9306
9318
  rows: Z,
9307
9319
  rowSpan: Z,
9308
9320
  sandbox: it,
9309
9321
  scope: null,
9310
- scoped: Re,
9311
- seamless: Re,
9312
- selected: Re,
9313
- shadowRootClonable: Re,
9314
- shadowRootDelegatesFocus: Re,
9322
+ scoped: Ie,
9323
+ seamless: Ie,
9324
+ selected: Ie,
9325
+ shadowRootClonable: Ie,
9326
+ shadowRootDelegatesFocus: Ie,
9315
9327
  shadowRootMode: null,
9316
9328
  shape: null,
9317
9329
  size: Z,
@@ -9331,7 +9343,7 @@ const fE = Wr({
9331
9343
  title: null,
9332
9344
  translate: null,
9333
9345
  type: null,
9334
- typeMustMatch: Re,
9346
+ typeMustMatch: Ie,
9335
9347
  useMap: null,
9336
9348
  value: vt,
9337
9349
  width: Z,
@@ -9377,9 +9389,9 @@ const fE = Wr({
9377
9389
  // `<object>`
9378
9390
  color: null,
9379
9391
  // `<font>` and `<hr>`. Use CSS instead
9380
- compact: Re,
9392
+ compact: Ie,
9381
9393
  // Lists. Use CSS to reduce space between items instead
9382
- declare: Re,
9394
+ declare: Ie,
9383
9395
  // `<object>`
9384
9396
  event: null,
9385
9397
  // `<script>`
@@ -9403,13 +9415,13 @@ const fE = Wr({
9403
9415
  // `<body>`
9404
9416
  marginWidth: Z,
9405
9417
  // `<body>`
9406
- noResize: Re,
9418
+ noResize: Ie,
9407
9419
  // `<frame>`
9408
- noHref: Re,
9420
+ noHref: Ie,
9409
9421
  // `<area>`. Use no href instead of an explicit `nohref`
9410
- noShade: Re,
9422
+ noShade: Ie,
9411
9423
  // `<hr>`. Use background-color and height instead of borders
9412
- noWrap: Re,
9424
+ noWrap: Ie,
9413
9425
  // `<td>` and `<th>`
9414
9426
  object: null,
9415
9427
  // `<applet>`
@@ -9449,8 +9461,8 @@ const fE = Wr({
9449
9461
  allowTransparency: null,
9450
9462
  autoCorrect: null,
9451
9463
  autoSave: null,
9452
- disablePictureInPicture: Re,
9453
- disableRemotePlayback: Re,
9464
+ disablePictureInPicture: Ie,
9465
+ disableRemotePlayback: Ie,
9454
9466
  prefix: null,
9455
9467
  property: null,
9456
9468
  results: Z,
@@ -9685,7 +9697,7 @@ const fE = Wr({
9685
9697
  dur: null,
9686
9698
  divisor: Z,
9687
9699
  dominantBaseline: null,
9688
- download: Re,
9700
+ download: Ie,
9689
9701
  dx: null,
9690
9702
  dy: null,
9691
9703
  edgeMode: null,
@@ -12977,7 +12989,7 @@ function qS(e) {
12977
12989
  listItemValue: f,
12978
12990
  listOrdered: o(le, d),
12979
12991
  listUnordered: o(le),
12980
- paragraph: o(Me),
12992
+ paragraph: o(Re),
12981
12993
  reference: k,
12982
12994
  referenceString: a,
12983
12995
  resourceDestinationString: a,
@@ -13431,7 +13443,7 @@ function qS(e) {
13431
13443
  children: []
13432
13444
  };
13433
13445
  }
13434
- function Me() {
13446
+ function Re() {
13435
13447
  return {
13436
13448
  type: "paragraph",
13437
13449
  children: []
@@ -30964,9 +30976,9 @@ function cA() {
30964
30976
  }
30965
30977
  }
30966
30978
  function At(T, j) {
30967
- return j ? Number(j) : Me(T) ? 0 : 1;
30979
+ return j ? Number(j) : Re(T) ? 0 : 1;
30968
30980
  }
30969
- function Me(T) {
30981
+ function Re(T) {
30970
30982
  return Te.includes(T.toLowerCase());
30971
30983
  }
30972
30984
  const bt = {}, yt = (T) => {
@@ -32150,14 +32162,14 @@ function Jl({
32150
32162
  const Te = [...ge];
32151
32163
  return v.forEach((_e) => {
32152
32164
  var At;
32153
- if (!Te.some((Me) => Me.id === _e.id) && (console.log("ChatView: Adding queued message:", _e.id), Te.push(_e), _e.sender.type === "agent" && (p((Me) => new Set(Me).add(_e.id)), !((At = _e.metadata) != null && At.streaming)))) {
32154
- const Me = _e.content.length * 35 + 1e3;
32165
+ if (!Te.some((Re) => Re.id === _e.id) && (console.log("ChatView: Adding queued message:", _e.id), Te.push(_e), _e.sender.type === "agent" && (p((Re) => new Set(Re).add(_e.id)), !((At = _e.metadata) != null && At.streaming)))) {
32166
+ const Re = _e.content.length * 35 + 1e3;
32155
32167
  setTimeout(() => {
32156
32168
  p((bt) => {
32157
32169
  const yt = new Set(bt);
32158
32170
  return yt.delete(_e.id), yt;
32159
32171
  });
32160
- }, Me);
32172
+ }, Re);
32161
32173
  }
32162
32174
  }), Te;
32163
32175
  }), y([]), setTimeout(() => {
@@ -32183,16 +32195,16 @@ function Jl({
32183
32195
  }
32184
32196
  };
32185
32197
  e && typeof e.addChatMessage == "function" && e.addChatMessage(At);
32186
- const Me = [...Te];
32187
- return Me.splice(le, 0, At), Me;
32198
+ const Re = [...Te];
32199
+ return Re.splice(le, 0, At), Re;
32188
32200
  });
32189
32201
  }
32190
32202
  }, Se = async (ne) => {
32191
32203
  _ && (console.log("ChatView: Dismissing active interaction due to timeout"), e.dismissCurrentInteraction()), S(null), v.length > 0 && (console.log("ChatView: Processing", v.length, "queued messages after timeout"), f((Te) => {
32192
32204
  const _e = [...Te];
32193
32205
  return v.forEach((le) => {
32194
- var Me;
32195
- if (!_e.some((bt) => bt.id === le.id) && (_e.push(le), le.sender.type === "agent" && (p((bt) => new Set(bt).add(le.id)), !((Me = le.metadata) != null && Me.streaming)))) {
32206
+ var Re;
32207
+ if (!_e.some((bt) => bt.id === le.id) && (_e.push(le), le.sender.type === "agent" && (p((bt) => new Set(bt).add(le.id)), !((Re = le.metadata) != null && Re.streaming)))) {
32196
32208
  const bt = le.content.length * 35 + 1e3;
32197
32209
  setTimeout(() => {
32198
32210
  p((yt) => {
@@ -32230,14 +32242,14 @@ function Jl({
32230
32242
  const Te = [...ge];
32231
32243
  return v.forEach((_e) => {
32232
32244
  var At;
32233
- if (!Te.some((Me) => Me.id === _e.id) && (Te.push(_e), _e.sender.type === "agent" && (p((Me) => new Set(Me).add(_e.id)), !((At = _e.metadata) != null && At.streaming)))) {
32234
- const Me = _e.content.length * 35 + 1e3;
32245
+ if (!Te.some((Re) => Re.id === _e.id) && (Te.push(_e), _e.sender.type === "agent" && (p((Re) => new Set(Re).add(_e.id)), !((At = _e.metadata) != null && At.streaming)))) {
32246
+ const Re = _e.content.length * 35 + 1e3;
32235
32247
  setTimeout(() => {
32236
32248
  p((bt) => {
32237
32249
  const yt = new Set(bt);
32238
32250
  return yt.delete(_e.id), yt;
32239
32251
  });
32240
- }, Me);
32252
+ }, Re);
32241
32253
  }
32242
32254
  }), Te;
32243
32255
  }), y([]), setTimeout(() => {
@@ -32543,7 +32555,7 @@ function Jl({
32543
32555
  )
32544
32556
  ] });
32545
32557
  }
32546
- const Ym = Ie.forwardRef(({
32558
+ const Ym = Me.forwardRef(({
32547
32559
  disabled: e,
32548
32560
  sessionStarted: t,
32549
32561
  participantName: n = "User",
@@ -32557,20 +32569,20 @@ const Ym = Ie.forwardRef(({
32557
32569
  const [c, u] = ke(!1), [d, f] = ke(!1), [h, g] = ke(!1), [p, v] = ke(() => {
32558
32570
  var B;
32559
32571
  return ((B = o == null ? void 0 : o.getCurrentInteraction) == null ? void 0 : B.call(o)) || null;
32560
- }), [y, E] = ke(() => t), w = on(null), _ = Ie.useMemo(() => {
32572
+ }), [y, E] = ke(() => t), w = on(null), _ = Me.useMemo(() => {
32561
32573
  var q;
32562
32574
  const B = (q = o == null ? void 0 : o.getCurrentAgentInfo) == null ? void 0 : q.call(o);
32563
32575
  return Rl(B);
32564
- }, [o]), S = Ie.useMemo(
32576
+ }, [o]), S = Me.useMemo(
32565
32577
  () => Il(_),
32566
32578
  [_]
32567
32579
  );
32568
- Ie.useMemo(
32580
+ Me.useMemo(
32569
32581
  () => Fw(_),
32570
32582
  [_]
32571
32583
  );
32572
- const C = Ie.useRef(null), [R, A] = Ie.useState(64);
32573
- Ie.useLayoutEffect(() => {
32584
+ const C = Me.useRef(null), [R, A] = Me.useState(64);
32585
+ Me.useLayoutEffect(() => {
32574
32586
  const B = C.current;
32575
32587
  if (!B) return;
32576
32588
  const q = () => A(B.offsetHeight || 64);
@@ -32580,10 +32592,10 @@ const Ym = Ie.forwardRef(({
32580
32592
  W.disconnect(), window.removeEventListener("resize", q);
32581
32593
  };
32582
32594
  }, []), Yw();
32583
- const { agent: { isActive: O = !1 } = {} } = o ? Al(o) : { agent: { isActive: !1 } }, b = fo(o, "microphone"), M = Ut(i), I = Ie.useMemo(() => o != null && o.getCurrentSession ? !!o.getCurrentSession() : !1, [o]), F = Ie.useMemo(() => o != null && o.getIsAgentConnected && o.getIsAgentConnected() || h, [o, h]), D = O || F;
32584
- Ie.useEffect(() => {
32595
+ const { agent: { isActive: O = !1 } = {} } = o ? Al(o) : { agent: { isActive: !1 } }, b = fo(o, "microphone"), M = Ut(i), I = Me.useMemo(() => o != null && o.getCurrentSession ? !!o.getCurrentSession() : !1, [o]), F = Me.useMemo(() => o != null && o.getIsAgentConnected && o.getIsAgentConnected() || h, [o, h]), D = O || F;
32596
+ Me.useEffect(() => {
32585
32597
  D && y && E(!1);
32586
- }, [D, y]), Ie.useEffect(() => {
32598
+ }, [D, y]), Me.useEffect(() => {
32587
32599
  if (t && !D) {
32588
32600
  const B = setTimeout(() => {
32589
32601
  I && !D && (console.log("⚑ SessionView: Auto-connecting agent after room connection"), g(!0), f(!1));
@@ -32594,13 +32606,13 @@ const Ym = Ie.forwardRef(({
32594
32606
  clearTimeout(B), clearTimeout(q);
32595
32607
  };
32596
32608
  } else D && f(!1);
32597
- }, [t, D, I]), Ie.useEffect(() => {
32609
+ }, [t, D, I]), Me.useEffect(() => {
32598
32610
  if (!o) return;
32599
32611
  const B = () => {
32600
32612
  v(null), u(!1), f(!1);
32601
32613
  };
32602
32614
  return o.on("connection.disconnected", B), () => o.off("connection.disconnected", B);
32603
- }, [o]), Ie.useEffect(() => {
32615
+ }, [o]), Me.useEffect(() => {
32604
32616
  if (!o) return;
32605
32617
  const B = () => {
32606
32618
  console.log("βœ… SessionView: Agent connected event received"), g(!0), f(!1), E(!1);
@@ -32612,26 +32624,26 @@ const Ym = Ie.forwardRef(({
32612
32624
  return o.on("agent.connected", B), o.on("agent.speaking", q), o.on("agent.thinking", W), o.on("participant.joined", ce), o.on("connection.disconnected", Q), () => {
32613
32625
  o.off("agent.connected", B), o.off("agent.speaking", q), o.off("agent.thinking", W), o.off("participant.joined", ce), o.off("connection.disconnected", Q);
32614
32626
  };
32615
- }, [o, t]), Ie.useEffect(() => {
32627
+ }, [o, t]), Me.useEffect(() => {
32616
32628
  if (!o) return;
32617
32629
  const B = () => v(o.getCurrentInteraction()), q = () => v(null);
32618
32630
  return o.on("rpc.interaction.started", B), o.on("rpc.interaction.completed", q), o.on("rpc.interaction.timeout", q), o.on("rpc.interaction.dismissed", q), () => {
32619
32631
  o.off("rpc.interaction.started", B), o.off("rpc.interaction.completed", q), o.off("rpc.interaction.timeout", q), o.off("rpc.interaction.dismissed", q);
32620
32632
  };
32621
- }, [o]), Ie.useEffect(() => {
32633
+ }, [o]), Me.useEffect(() => {
32622
32634
  var q;
32623
32635
  if (!o) return;
32624
32636
  const B = (q = o.getCurrentInteraction) == null ? void 0 : q.call(o);
32625
32637
  v(B || null);
32626
- }, [o]), Ie.useEffect(() => {
32638
+ }, [o]), Me.useEffect(() => {
32627
32639
  var q, W;
32628
32640
  const B = ((W = (q = o == null ? void 0 : o.getCurrentSession) == null ? void 0 : q.call(o)) == null ? void 0 : W.id) || null;
32629
32641
  w.current, w.current = B;
32630
- }, [o]), Ie.useEffect(() => {
32642
+ }, [o]), Me.useEffect(() => {
32631
32643
  p && c && u(!1);
32632
32644
  }, [p, c]);
32633
- const G = Ie.useCallback((B) => {
32634
- }, []), ie = Ie.useCallback(() => {
32645
+ const G = Me.useCallback((B) => {
32646
+ }, []), ie = Me.useCallback(() => {
32635
32647
  var B, q, W;
32636
32648
  try {
32637
32649
  p && (v(null), (B = o == null ? void 0 : o.dismissCurrentInteraction) == null || B.call(o)), u(!1), f(!1), (q = o == null ? void 0 : o.endSession) == null || q.call(o), (W = o == null ? void 0 : o.disconnect) == null || W.call(o), s == null || s();
@@ -32644,7 +32656,7 @@ const Ym = Ie.forwardRef(({
32644
32656
  M.main,
32645
32657
  a === "fullscreen" ? "max-w-none" : "",
32646
32658
  "overflow-hidden h-full"
32647
- ), V = s && (a === "popup" || a === "fullscreen"), z = Ie.useMemo(() => d ? "Agent is taking longer than expected..." : I ? "Room connected. Waiting for agent..." : r, [d, I, r]), x = Ie.useMemo(() => d ? "Please check your connection or try again." : I ? "The agent will join shortly." : "Agent is connecting... This may take a moment.", [d, I]);
32659
+ ), V = s && (a === "popup" || a === "fullscreen"), z = Me.useMemo(() => d ? "Agent is taking longer than expected..." : I ? "Room connected. Waiting for agent..." : r, [d, I, r]), x = Me.useMemo(() => d ? "Please check your connection or try again." : I ? "The agent will join shortly." : "Agent is connecting... This may take a moment.", [d, I]);
32648
32660
  return y ? /* @__PURE__ */ m("main", { ref: l, className: je(X, "relative", e && "pointer-events-none opacity-50"), children: (V || S) && /* @__PURE__ */ N("div", { className: `flex items-center justify-between w-full p-4 border-b ${(($ = M.chatHeader) == null ? void 0 : $.container) || "border-gray-200"}`, children: [
32649
32661
  /* @__PURE__ */ m("div", { children: /* @__PURE__ */ m("h3", { className: `font-semibold ${M.text.primary}`, children: "Voice Session" }) }),
32650
32662
  S && /* @__PURE__ */ m(
@@ -32685,7 +32697,7 @@ const Ym = Ie.forwardRef(({
32685
32697
  {
32686
32698
  className: je(
32687
32699
  "absolute left-0 right-0 top-0 flex flex-col transition-[opacity,translate] duration-300 ease-out z-10",
32688
- i === "light" ? "bg-white" : "bg-gray-900/95 backdrop-blur-sm",
32700
+ i === "light" ? "bg-white" : "bg-black backdrop-blur-sm",
32689
32701
  "translate-y-0 opacity-100 delay-200"
32690
32702
  ),
32691
32703
  style: { bottom: `${R}px` },
@@ -32693,7 +32705,7 @@ const Ym = Ie.forwardRef(({
32693
32705
  }
32694
32706
  ),
32695
32707
  !c && /* @__PURE__ */ N("div", { className: je("flex-1 flex flex-col items-center w-full h-full min-h-0", (p == null ? void 0 : p.presentationMode) === "embedded" ? "justify-end" : "justify-center"), children: [
32696
- /* @__PURE__ */ m(Le.div, { className: "w-full flex justify-center", animate: { y: (p == null ? void 0 : p.presentationMode) === "embedded" ? -8 : 0 }, transition: { duration: 0.3, ease: "easeOut" }, children: /* @__PURE__ */ m(jw, { chatOpen: c, client: o }, `media-tiles-${((te = (Y = o == null ? void 0 : o.getCurrentSession) == null ? void 0 : Y.call(o)) == null ? void 0 : te.id) || "no-session"}`) }),
32708
+ /* @__PURE__ */ m(Le.div, { className: "w-full flex justify-center", animate: { y: (p == null ? void 0 : p.presentationMode) === "embedded" ? -8 : 0 }, transition: { duration: 0.3, ease: "easeOut" }, children: /* @__PURE__ */ m(jw, { chatOpen: c, client: o, theme: i }, `media-tiles-${((te = (Y = o == null ? void 0 : o.getCurrentSession) == null ? void 0 : Y.call(o)) == null ? void 0 : te.id) || "no-session"}`) }),
32697
32709
  /* @__PURE__ */ m(Dr, { mode: "wait", children: p && p.presentationMode === "embedded" && /* @__PURE__ */ m(Le.div, { initial: { opacity: 0, y: 20, height: 0 }, animate: { opacity: 1, y: 0, height: "auto" }, exit: { opacity: 0, y: 20, height: 0 }, transition: { duration: 0.3, ease: "easeOut" }, className: je("w-full relative mt-4 flex justify-center", a === "fullscreen" ? "max-w-4xl" : "max-w-md"), children: /* @__PURE__ */ m("div", { className: "bg-white/10 backdrop-blur-sm rounded-xl border border-white/20 shadow-lg overflow-hidden", children: /* @__PURE__ */ m(wo, { interaction: p, theme: i, onDismiss: () => {
32698
32710
  var B;
32699
32711
  return (B = o == null ? void 0 : o.dismissCurrentInteraction) == null ? void 0 : B.call(o);
@@ -32860,7 +32872,7 @@ function NA({
32860
32872
  }
32861
32873
  )
32862
32874
  ] }) }),
32863
- A && !s && /* @__PURE__ */ m("div", { className: "p-4 min-h-0 h-full", children: /* @__PURE__ */ N("div", { className: "relative w-full h-full rounded-lg overflow-hidden", children: [
32875
+ A && !s && /* @__PURE__ */ m("div", { className: "p-4 min-h-0 h-full", children: /* @__PURE__ */ N("div", { className: "relative w-full h-full overflow-hidden", children: [
32864
32876
  h ? (
32865
32877
  // Show video when agent avatar is enabled
32866
32878
  K ? /* @__PURE__ */ m(
@@ -36691,7 +36703,7 @@ function uI({ prompts: e, theme: t }) {
36691
36703
  a
36692
36704
  )) });
36693
36705
  }
36694
- const hg = Ie.forwardRef(({
36706
+ const hg = Me.forwardRef(({
36695
36707
  disabled: e,
36696
36708
  onStartCall: t,
36697
36709
  onStartChat: n,
@@ -38842,11 +38854,11 @@ class xI {
38842
38854
  const a = this.buildWidgetProps(t);
38843
38855
  try {
38844
38856
  o.root.render(
38845
- Ie.createElement(is, {
38857
+ Me.createElement(is, {
38846
38858
  config: this.config,
38847
38859
  autoConnect: t.autoStart || !1,
38848
38860
  client: this.voxketClient,
38849
- children: Ie.createElement(mo, a)
38861
+ children: Me.createElement(mo, a)
38850
38862
  })
38851
38863
  ), console.log("βœ… UIRenderer: Successfully updated existing widget with new props");
38852
38864
  return;
@@ -38862,11 +38874,11 @@ class xI {
38862
38874
  const o = i.root, a = this.buildWidgetProps(t);
38863
38875
  try {
38864
38876
  o.render(
38865
- Ie.createElement(is, {
38877
+ Me.createElement(is, {
38866
38878
  config: this.config,
38867
38879
  autoConnect: t.autoStart || !1,
38868
38880
  client: this.voxketClient,
38869
- children: Ie.createElement(mo, a)
38881
+ children: Me.createElement(mo, a)
38870
38882
  })
38871
38883
  );
38872
38884
  } catch (s) {
@@ -38896,11 +38908,11 @@ class xI {
38896
38908
  throw new Error("Invalid React root. Make sure React 18+ is properly installed and configured.");
38897
38909
  try {
38898
38910
  o.render(
38899
- Ie.createElement(is, {
38911
+ Me.createElement(is, {
38900
38912
  config: this.config,
38901
38913
  autoConnect: t.autoStart || !1,
38902
38914
  client: this.voxketClient,
38903
- children: Ie.createElement(mo, a)
38915
+ children: Me.createElement(mo, a)
38904
38916
  })
38905
38917
  );
38906
38918
  } catch (s) {
@@ -39830,7 +39842,7 @@ function TI(e) {
39830
39842
  } catch (se) {
39831
39843
  return console.error("❌ Failed to create VoxketClient:", se), z(se), X(!0), null;
39832
39844
  }
39833
- }, [I, o, i, r, Y, B, R]), At = P.useMemo(() => A === "popup" ? ne ? [ne] : ["voice", "chat", "video"] : R, [A, ne, R]), Me = P.useMemo(() => {
39845
+ }, [I, o, i, r, Y, B, R]), At = P.useMemo(() => A === "popup" ? ne ? [ne] : ["voice", "chat", "video"] : R, [A, ne, R]), Re = P.useMemo(() => {
39834
39846
  try {
39835
39847
  if (!le)
39836
39848
  return console.warn("⚠️ No VoxketClient available, creating fallback room"), new ao();
@@ -39846,12 +39858,12 @@ function TI(e) {
39846
39858
  }
39847
39859
  }, [le, x, Q]);
39848
39860
  P.useEffect(() => {
39849
- if (Me) {
39861
+ if (Re) {
39850
39862
  const se = () => {
39851
39863
  console.log("🏠 Widget: Room state changed:", {
39852
- state: Me.state,
39853
- numParticipants: Me.numParticipants,
39854
- isConnected: Me.state === "connected",
39864
+ state: Re.state,
39865
+ numParticipants: Re.numParticipants,
39866
+ isConnected: Re.state === "connected",
39855
39867
  sessionId: W == null ? void 0 : W.id
39856
39868
  });
39857
39869
  }, ot = ($e, T, j) => {
@@ -39863,17 +39875,17 @@ function TI(e) {
39863
39875
  sessionId: W == null ? void 0 : W.id
39864
39876
  });
39865
39877
  };
39866
- return Me.on(Be.Connected, se), Me.on(Be.Disconnected, se), Me.on(Be.TrackSubscribed, ot), () => {
39867
- Me.off(Be.Connected, se), Me.off(Be.Disconnected, se), Me.off(Be.TrackSubscribed, ot);
39878
+ return Re.on(Be.Connected, se), Re.on(Be.Disconnected, se), Re.on(Be.TrackSubscribed, ot), () => {
39879
+ Re.off(Be.Connected, se), Re.off(Be.Disconnected, se), Re.off(Be.TrackSubscribed, ot);
39868
39880
  };
39869
39881
  }
39870
- }, [Me, W == null ? void 0 : W.id]), P.useEffect(() => {
39882
+ }, [Re, W == null ? void 0 : W.id]), P.useEffect(() => {
39871
39883
  !K && Q === "welcome" ? console.log("🎬 Widget: Welcome screen ready") : x && Q !== "welcome" && console.log("🎬 Widget: Session mode active:", Q);
39872
39884
  }, [Q, K, x]), P.useEffect(() => {
39873
39885
  (Q === "voice" || Q === "video" || Q === "chat") && !W && !x && !K && le && !le.connected && (console.log("πŸ”„ Auto-correcting: Found orphaned mode without session, returning to welcome"), xe("welcome"), k(!1));
39874
39886
  }, [Q, W, x, K, le]);
39875
39887
  const { sessionMetrics: bt, sessionLogs: yt, logEvent: ln } = fI({
39876
- room: Me,
39888
+ room: Re,
39877
39889
  onSessionStart: E,
39878
39890
  onSessionEnd: w,
39879
39891
  enableConsoleLogging: _,
@@ -39915,10 +39927,10 @@ function TI(e) {
39915
39927
  }, ot = ($e) => {
39916
39928
  console.log("πŸ“Ή Media devices error:", $e);
39917
39929
  };
39918
- return Me.on(Be.MediaDevicesError, ot), Me.on(Be.Disconnected, se), () => {
39919
- Me.off(Be.Disconnected, se), Me.off(Be.MediaDevicesError, ot);
39930
+ return Re.on(Be.MediaDevicesError, ot), Re.on(Be.Disconnected, se), () => {
39931
+ Re.off(Be.Disconnected, se), Re.off(Be.MediaDevicesError, ot);
39920
39932
  };
39921
- }, [Me, Q, x, W == null ? void 0 : W.id, K]);
39933
+ }, [Re, Q, x, W == null ? void 0 : W.id, K]);
39922
39934
  const ve = async () => {
39923
39935
  try {
39924
39936
  if (!le) {
@@ -40157,7 +40169,7 @@ function TI(e) {
40157
40169
  },
40158
40170
  `loading-${Q}`
40159
40171
  ),
40160
- Q === "voice" && !K && x && le && /* @__PURE__ */ N(xc.Provider, { value: Me, children: [
40172
+ Q === "voice" && !K && x && le && /* @__PURE__ */ N(xc.Provider, { value: Re, children: [
40161
40173
  /* @__PURE__ */ m(vc, {}, `audio-${(W == null ? void 0 : W.id) || "no-session"}`),
40162
40174
  /* @__PURE__ */ m(wc, { label: "Start Audio" }, `start-audio-${(W == null ? void 0 : W.id) || "no-session"}`),
40163
40175
  /* @__PURE__ */ m(
@@ -40201,7 +40213,7 @@ function TI(e) {
40201
40213
  },
40202
40214
  "chat-view"
40203
40215
  ),
40204
- Q === "video" && !K && x && le && /* @__PURE__ */ N(xc.Provider, { value: Me, children: [
40216
+ Q === "video" && !K && x && le && /* @__PURE__ */ N(xc.Provider, { value: Re, children: [
40205
40217
  /* @__PURE__ */ m(vc, {}, `audio-video-${(W == null ? void 0 : W.id) || "no-session"}`),
40206
40218
  /* @__PURE__ */ m(wc, { label: "Start Audio" }, `start-audio-video-${(W == null ? void 0 : W.id) || "no-session"}`),
40207
40219
  /* @__PURE__ */ m(
@@ -40249,7 +40261,7 @@ function mo(e) {
40249
40261
  return /* @__PURE__ */ m(pg, { children: /* @__PURE__ */ m(TI, { ...e }) });
40250
40262
  }
40251
40263
  function yO({ logs: e, onClear: t, onExport: n }) {
40252
- const [r, i] = Ie.useState(!1), [o, a] = Ie.useState(""), s = e.filter(
40264
+ const [r, i] = Me.useState(!1), [o, a] = Me.useState(""), s = e.filter(
40253
40265
  (l) => !o || l.event.toLowerCase().includes(o.toLowerCase())
40254
40266
  );
40255
40267
  return r ? /* @__PURE__ */ m("div", { className: "fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50", children: /* @__PURE__ */ N("div", { className: "bg-white rounded-lg shadow-xl max-w-4xl w-full max-h-[80vh] flex flex-col m-4", children: [
@@ -40777,7 +40789,7 @@ function DI({
40777
40789
  }
40778
40790
  function LI() {
40779
40791
  Kr();
40780
- const [e, t] = Ie.useState(!1);
40792
+ const [e, t] = Me.useState(!1);
40781
40793
  return /* @__PURE__ */ m(
40782
40794
  "button",
40783
40795
  {
@@ -40880,7 +40892,7 @@ function wg({
40880
40892
  ] }) }) });
40881
40893
  }
40882
40894
  function FI() {
40883
- const e = uc(), [t, n] = Ie.useState(""), r = async () => {
40895
+ const e = uc(), [t, n] = Me.useState(""), r = async () => {
40884
40896
  if (!(!t.trim() || !e.canSend))
40885
40897
  try {
40886
40898
  await e.send(t), n("");
@@ -41127,10 +41139,10 @@ function kO({
41127
41139
  cssVariables: r = !0,
41128
41140
  className: i = ""
41129
41141
  }) {
41130
- const [o, a] = Ie.useState(() => {
41142
+ const [o, a] = Me.useState(() => {
41131
41143
  const f = { default: Or, dark: _f, enterprise: Cf, ...t };
41132
41144
  return typeof e == "string" ? f[e] || Or : e;
41133
- }), [s, l] = Ie.useState(() => ({
41145
+ }), [s, l] = Me.useState(() => ({
41134
41146
  default: Or,
41135
41147
  dark: _f,
41136
41148
  enterprise: Cf,