@flowengage/react-chatbot 6.0.32 → 6.0.33

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.
@@ -31400,27 +31400,27 @@ function Rk() {
31400
31400
  pr();
31401
31401
  } catch {}
31402
31402
  }, []), c(() => {
31403
- Ee && A !== "voice_mode" && A !== "text_chat" && A !== "call_screen" && (ue?.(!1), ot("text_chat"));
31403
+ Ee && k !== "voice_mode" && k !== "text_chat" && k !== "call_screen" && (ue?.(!1), A("text_chat"));
31404
31404
  }, [Ee]);
31405
31405
  let Oe = t?.widgetSettings || {}, ke = n?.widgetSettings || {}, Ae = {
31406
31406
  ...Oe.branding || {},
31407
31407
  ...ke.branding || {}
31408
- }, Ne = {
31408
+ }, je = {
31409
31409
  ...Oe.theme || {},
31410
31410
  ...ke.theme || {}
31411
- }, Pe = {
31411
+ }, Ne = {
31412
31412
  ...Oe.features || {},
31413
31413
  ...ke.features || {}
31414
- }, Ie = Pe.voice !== !1, Le = Array.isArray(Ne.orbColors) && Ne.orbColors.length > 0 ? Ne.orbColors : null, ze = Ne.buttonColor || Ne.primaryColor || Le?.[0] || "#3B82F6", Be = {
31414
+ }, Pe = Ne.voice !== !1, Ie = Array.isArray(je.orbColors) && je.orbColors.length > 0 ? je.orbColors : null, Le = je.buttonColor || je.primaryColor || Ie?.[0] || "#3B82F6", ze = {
31415
31415
  small: 50,
31416
31416
  medium: 64,
31417
31417
  large: 80
31418
- }, Ve = Be[Ne.orbSize] || Be.small, He = Ne.position || "bottom-right", O = Ae.fallbackAgentName || "Agent", Ue = Tk(Le ?? Ne.chatBgColors), We = Ae.logo || Ae.logoUrl || null, Ge = E || "en", Ke = Oe.recommendations?.[Ge] || [], qe = (ke.recommendations?.[Ge] ?? Ke).filter((e) => String(e?.label ?? "").trim()).map((e, t) => ({
31418
+ }, Be = ze[je.orbSize] || ze.small, Ve = je.position || "bottom-right", He = Ae.fallbackAgentName || "Agent", O = Tk(Ie ?? je.chatBgColors), Ue = Ae.logo || Ae.logoUrl || null, We = E || "en", Ge = Oe.recommendations?.[We] || [], Ke = (ke.recommendations?.[We] ?? Ge).filter((e) => String(e?.label ?? "").trim()).map((e, t) => ({
31419
31419
  id: e.key || `qr-${t}`,
31420
31420
  label: e.label,
31421
31421
  message: e.label,
31422
31422
  text: e.label
31423
- })), Je = Array.isArray(Ae.quickChatOptions) && Ae.quickChatOptions.length > 0 ? Ae.quickChatOptions : qe, Ye = Ae.hideWatermark === !0 ? !1 : Ae.showPoweredBy !== !1, Xe = Ae.chatbotEnabled !== !1 && Ne.chatbotEnabled !== !1, Ze = Oe.greetings?.[E] || ke.greetings?.[E] || Ae.introGreeting || "Hello, I'm here to help you know more about OpenSense Labs.", Qe = {
31423
+ })), qe = Array.isArray(Ae.quickChatOptions) && Ae.quickChatOptions.length > 0 ? Ae.quickChatOptions : Ke, Je = Ae.hideWatermark === !0 ? !1 : Ae.showPoweredBy !== !1, Ye = Ae.chatbotEnabled !== !1 && je.chatbotEnabled !== !1, Xe = Oe.greetings?.[E] || ke.greetings?.[E] || Ae.introGreeting || "Hello, I'm here to help you know more about OpenSense Labs.", Ze = {
31424
31424
  entryPrompt: Ae.entryPrompt || "Do you want to explore in a new way?",
31425
31425
  yesLabel: Ae.yesLabel || "Yes",
31426
31426
  laterLabel: Ae.laterLabel || "Later",
@@ -31428,189 +31428,189 @@ function Rk() {
31428
31428
  voiceLabel: Ae.voiceLabel || "Voice",
31429
31429
  textLabel: Ae.textLabel || "Text",
31430
31430
  chatTitle: Ae.headerName || "Chat with FlowEngage",
31431
- introGreeting: Ze,
31431
+ introGreeting: Xe,
31432
31432
  inputPlaceholder: Ae.inputPlaceholder || "Type your message",
31433
31433
  analysingLabel: Ae.analysingLabel || "analysing..."
31434
- }, $e = ke.elevenLabsAgentId || t?.elevenLabsAgentId || null, et = t?.siteId || n?.siteId || null, tt = t?.apiBaseUrl || "", nt = f(() => l && String(l).trim() || t?.ownerName && String(t.ownerName).trim() || t?.websiteName && String(t.websiteName).trim() || "Agent", [
31434
+ }, Qe = ke.elevenLabsAgentId || t?.elevenLabsAgentId || null, $e = t?.siteId || n?.siteId || null, et = t?.apiBaseUrl || "", tt = f(() => l && String(l).trim() || t?.ownerName && String(t.ownerName).trim() || t?.websiteName && String(t.websiteName).trim() || "Agent", [
31435
31435
  l,
31436
31436
  t?.ownerName,
31437
31437
  t?.websiteName
31438
- ]), rt = u && String(u).trim() || t?.ownerProfileImageUrl && String(t.ownerProfileImageUrl).trim() || null, it = r.some((e) => e.sender === "user"), at = f(() => {
31438
+ ]), nt = u && String(u).trim() || t?.ownerProfileImageUrl && String(t.ownerProfileImageUrl).trim() || null, rt = r.some((e) => e.sender === "user"), it = f(() => {
31439
31439
  let e = r.findIndex((e) => e.sender === "user");
31440
31440
  return e === -1 ? !1 : r.slice(e + 1).some((e) => e.sender === "bot" || e.sender === "ai" || e.sender === "agent");
31441
- }, [r]), k = !!(ke._dashboardLivePreview || Oe._dashboardLivePreview), [A, ot] = m(() => k ? "text_chat" : "entry_prompt"), [st, ct] = m(""), [lt, ut] = m(null), [dt, ft] = m(h || ""), [pt, mt] = m(""), [ht, gt] = m(!1), [j, _t] = m(0), [vt, yt] = m(null), [bt, xt] = m(null), [St, Ct] = m(""), [wt, Tt] = m(!1), [Et, Dt] = m(!1), [Ot, kt] = m(!1), At = p(null), jt = p(!1), Mt = !h && it && at && A !== "voice_mode";
31441
+ }, [r]), at = !!(ke._dashboardLivePreview || Oe._dashboardLivePreview), [k, A] = m(() => at ? "text_chat" : "entry_prompt"), [ot, st] = m(""), [ct, lt] = m(null), [ut, dt] = m(h || ""), [ft, pt] = m(""), [mt, ht] = m(!1), [gt, j] = m(0), [_t, vt] = m(null), [yt, bt] = m(null), [xt, St] = m(""), [Ct, wt] = m(!1), [Tt, Et] = m(!1), [Dt, Ot] = m(!1), kt = p(null), At = p(!1), jt = !h && rt && it && k !== "voice_mode";
31442
31442
  d(() => {
31443
- if (e !== "ready" || jt.current) return;
31444
- if (jt.current = !0, !Ie) {
31445
- ot("minimized_orb");
31443
+ if (e !== "ready" || At.current) return;
31444
+ if (At.current = !0, !Pe) {
31445
+ A("minimized_orb");
31446
31446
  return;
31447
31447
  }
31448
31448
  let t = !1;
31449
31449
  try {
31450
31450
  t = Tr().shouldResumeVoice;
31451
31451
  } catch {}
31452
- let n = Fe(), r = et ? je(et) : null, i = n || !!r?.transcript;
31452
+ let n = Fe();
31453
31453
  if (t) {
31454
- ce?.({ notifyChatInitiated: !0 }), ue?.(!0), ot("voice_mode");
31454
+ ce?.({ notifyChatInitiated: !0 }), ue?.(!0), A("voice_mode");
31455
31455
  return;
31456
31456
  }
31457
31457
  if (Re()) {
31458
- ce?.({ notifyChatInitiated: !1 }), ot("text_chat");
31458
+ ce?.({ notifyChatInitiated: !1 }), A("text_chat");
31459
31459
  return;
31460
31460
  }
31461
- if (i) {
31462
- ce?.({ notifyChatInitiated: !0 }), ue?.(!0), ot("voice_mode");
31461
+ if (n) {
31462
+ ce?.({ notifyChatInitiated: !0 }), ue?.(!0), A("voice_mode");
31463
31463
  return;
31464
31464
  }
31465
- if (et) try {
31466
- Me(et);
31465
+ if ($e) try {
31466
+ Me($e);
31467
31467
  } catch {}
31468
- if (fe(et)) {
31469
- ot("minimized_orb");
31468
+ if (fe($e)) {
31469
+ A("minimized_orb");
31470
31470
  return;
31471
31471
  }
31472
31472
  }, [e, r]);
31473
- let [Nt, Pt] = m(() => typeof window < "u" && window.matchMedia("(max-width: 640px)").matches);
31473
+ let [Mt, Nt] = m(() => typeof window < "u" && window.matchMedia("(max-width: 640px)").matches);
31474
31474
  c(() => {
31475
- let e = window.matchMedia("(max-width: 640px)"), t = (e) => Pt(e.matches);
31475
+ let e = window.matchMedia("(max-width: 640px)"), t = (e) => Nt(e.matches);
31476
31476
  return e.addEventListener("change", t), () => e.removeEventListener("change", t);
31477
31477
  }, []), c(() => {
31478
- ft(h || ""), h && mt("");
31478
+ dt(h || ""), h && pt("");
31479
31479
  }, [h]);
31480
- let Ft = o(() => {
31481
- xt(null), Ct("");
31482
- }, []), It = o((e) => {
31480
+ let Pt = o(() => {
31481
+ bt(null), St("");
31482
+ }, []), Ft = o((e) => {
31483
31483
  let t = qD(e);
31484
31484
  if (t) {
31485
- xt(null), Ct(t);
31485
+ bt(null), St(t);
31486
31486
  return;
31487
31487
  }
31488
- xt(e), Ct("");
31488
+ bt(e), St("");
31489
31489
  }, []);
31490
31490
  c(() => {
31491
31491
  if (!te || ee !== "connected") {
31492
- _t(0);
31492
+ j(0);
31493
31493
  return;
31494
31494
  }
31495
31495
  let e = () => {
31496
31496
  let e = new Date(te).getTime();
31497
- isNaN(e) || _t(Math.max(0, Math.floor((Date.now() - e) / 1e3)));
31497
+ isNaN(e) || j(Math.max(0, Math.floor((Date.now() - e) / 1e3)));
31498
31498
  };
31499
31499
  e();
31500
31500
  let t = window.setInterval(e, 1e3);
31501
31501
  return () => window.clearInterval(t);
31502
31502
  }, [te, ee]);
31503
- let Lt = o(() => {
31504
- ot("call_screen"), Dt(!1);
31505
- }, []), Rt = o(() => {
31506
- ot("text_chat"), Dt(!0);
31503
+ let It = o(() => {
31504
+ A("call_screen"), Et(!1);
31505
+ }, []), Lt = o(() => {
31506
+ A("text_chat"), Et(!0);
31507
31507
  }, []);
31508
31508
  c(() => {
31509
31509
  let e = w?.callId || T || null;
31510
31510
  if (!e) {
31511
- At.current = null;
31511
+ kt.current = null;
31512
31512
  return;
31513
31513
  }
31514
31514
  if (w?.callId || ee === "connecting" || ee === "connected") {
31515
- if (A === "minimized_orb" && Et && T && !w?.callId) {
31516
- At.current = e;
31515
+ if (k === "minimized_orb" && Tt && T && !w?.callId) {
31516
+ kt.current = e;
31517
31517
  return;
31518
31518
  }
31519
- !(!i || A === "minimized_orb" || A === "voice_mode") && At.current === e || (console.log("[FlowEngageWidget] forcing call UI to front", {
31519
+ !(!i || k === "minimized_orb" || k === "voice_mode") && kt.current === e || (console.log("[FlowEngageWidget] forcing call UI to front", {
31520
31520
  forcedKey: e,
31521
31521
  isOpen: i,
31522
- surface: A,
31522
+ surface: k,
31523
31523
  hasIncomingCall: !!w?.callId,
31524
31524
  activeCallId: T,
31525
31525
  callConnectionState: ee
31526
- }), At.current = e, A === "voice_mode" && ue?.(!1), ce?.(), Lt());
31526
+ }), kt.current = e, k === "voice_mode" && ue?.(!1), ce?.(), It());
31527
31527
  }
31528
31528
  }, [
31529
31529
  T,
31530
31530
  ee,
31531
- Lt,
31531
+ It,
31532
31532
  w?.callId,
31533
31533
  i,
31534
31534
  ce,
31535
31535
  ue,
31536
- A
31536
+ k
31537
31537
  ]), c(() => {
31538
- !w && !T && A === "call_screen" && ot("text_chat");
31538
+ !w && !T && k === "call_screen" && A("text_chat");
31539
31539
  }, [
31540
31540
  w,
31541
31541
  T,
31542
- A
31542
+ k
31543
31543
  ]), c(() => {
31544
- !T && Et && Dt(!1);
31545
- }, [T, Et]), c(() => {
31544
+ !T && Tt && Et(!1);
31545
+ }, [T, Tt]), c(() => {
31546
31546
  if (!s || C) {
31547
31547
  Se?.(""), xe?.();
31548
31548
  return;
31549
31549
  }
31550
- if (!st.trim() || bt) {
31550
+ if (!ot.trim() || yt) {
31551
31551
  Se?.("");
31552
31552
  let e = window.setTimeout(() => xe?.(), 100);
31553
31553
  return () => window.clearTimeout(e);
31554
31554
  }
31555
31555
  be?.();
31556
- let e = window.setTimeout(() => Se?.(st), 120), t = window.setTimeout(() => xe?.(), 1200);
31556
+ let e = window.setTimeout(() => Se?.(ot), 120), t = window.setTimeout(() => xe?.(), 1200);
31557
31557
  return () => {
31558
31558
  window.clearTimeout(e), window.clearTimeout(t);
31559
31559
  };
31560
31560
  }, [
31561
- st,
31562
- bt,
31561
+ ot,
31562
+ yt,
31563
31563
  s,
31564
31564
  C,
31565
31565
  be,
31566
31566
  xe,
31567
31567
  Se
31568
31568
  ]);
31569
- let zt = (e) => e ? {
31569
+ let Rt = (e) => e ? {
31570
31570
  replyTo: e.messageId || e.id || null,
31571
31571
  replyToContent: (e.replyToContent || e.message || "").replace(/<[^>]+>/g, "").trim().slice(0, 200),
31572
31572
  replyToSender: e.sender || null
31573
- } : null, Bt = async (e) => {
31573
+ } : null, zt = async (e) => {
31574
31574
  if (e.preventDefault(), C) return;
31575
- if (Mt) {
31576
- let e = dt.trim().toLowerCase();
31575
+ if (jt) {
31576
+ let e = ut.trim().toLowerCase();
31577
31577
  if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)) {
31578
- mt("Please enter a valid email so we can continue helping you.");
31578
+ pt("Please enter a valid email so we can continue helping you.");
31579
31579
  return;
31580
31580
  }
31581
- await le(e), mt(""), gt(!0), setTimeout(() => gt(!1), 3e3);
31581
+ await le(e), pt(""), ht(!0), setTimeout(() => ht(!1), 3e3);
31582
31582
  return;
31583
31583
  }
31584
- let t = zt(lt);
31585
- if (!st.trim() && !bt) return;
31586
- if (bt) {
31584
+ let t = Rt(ct);
31585
+ if (!ot.trim() && !yt) return;
31586
+ if (yt) {
31587
31587
  try {
31588
- Tt(!0), Ct("");
31589
- let e = await se(bt), n = e?.data || e, r = st.trim() || `Shared file: ${YD(bt)}`;
31590
- ct(""), ut(null), Ft(), await D(r, "", t, {
31588
+ wt(!0), St("");
31589
+ let e = await se(yt), n = e?.data || e, r = ot.trim() || `Shared file: ${YD(yt)}`;
31590
+ st(""), lt(null), Pt(), await D(r, "", t, {
31591
31591
  type: "file",
31592
31592
  metadata: {
31593
31593
  fileUrl: n?.fileUrl,
31594
- fileName: n?.fileName || bt.name,
31595
- fileType: n?.fileType || bt.type,
31596
- fileSize: n?.fileSize || bt.size
31594
+ fileName: n?.fileName || yt.name,
31595
+ fileType: n?.fileType || yt.type,
31596
+ fileSize: n?.fileSize || yt.size
31597
31597
  }
31598
31598
  });
31599
31599
  } catch (e) {
31600
- Ct(e?.message || "Failed to upload the selected file.");
31600
+ St(e?.message || "Failed to upload the selected file.");
31601
31601
  } finally {
31602
- Tt(!1);
31602
+ wt(!1);
31603
31603
  }
31604
31604
  return;
31605
31605
  }
31606
- let n = st.trim();
31607
- ct(""), ut(null), await D(n, "", t);
31608
- }, Vt = o(() => {
31606
+ let n = ot.trim();
31607
+ st(""), lt(null), await D(n, "", t);
31608
+ }, Bt = o(() => {
31609
31609
  r.length !== 0 && me?.();
31610
- }, [r.length, me]), Ht = (e) => {
31610
+ }, [r.length, me]), Vt = (e) => {
31611
31611
  let t = Math.floor(e / 60);
31612
31612
  return `${String(t).padStart(2, "0")}:${String(e % 60).padStart(2, "0")}`;
31613
- }, Ut = o(async (e) => {
31613
+ }, Ht = o(async (e) => {
31614
31614
  if (C || b) return;
31615
31615
  let t = e.message || e.label || e.text || "";
31616
31616
  t.trim() && await D(t.trim(), "");
@@ -31618,44 +31618,44 @@ function Rk() {
31618
31618
  C,
31619
31619
  b,
31620
31620
  D
31621
- ]), Wt = Nt && A === "entry_prompt" ? { inset: 0 } : Nt && A === "text_chat" ? {
31621
+ ]), Ut = Mt && k === "entry_prompt" ? { inset: 0 } : Mt && k === "text_chat" ? {
31622
31622
  left: 0,
31623
31623
  right: 0,
31624
31624
  bottom: 0
31625
- } : Nt && A === "call_screen" ? {
31625
+ } : Mt && k === "call_screen" ? {
31626
31626
  left: 0,
31627
31627
  right: 0,
31628
31628
  bottom: 0,
31629
31629
  height: "90dvh",
31630
31630
  overflow: "hidden",
31631
31631
  borderRadius: "16px 16px 0 0"
31632
- } : Nt && A === "connection_modal" ? {
31632
+ } : Mt && k === "connection_modal" ? {
31633
31633
  left: "12px",
31634
31634
  right: "12px",
31635
31635
  bottom: "12px"
31636
- } : A === "call_screen" ? {
31636
+ } : k === "call_screen" ? {
31637
31637
  width: "min(350px, calc(100vw - 40px))",
31638
31638
  height: "min(640px, calc(100vh - 120px))",
31639
31639
  borderRadius: "22px",
31640
31640
  overflow: "hidden",
31641
- ...He === "bottom-left" ? {
31641
+ ...Ve === "bottom-left" ? {
31642
31642
  left: "1.5rem",
31643
31643
  bottom: "1.5rem"
31644
31644
  } : {
31645
31645
  right: "1.5rem",
31646
31646
  bottom: "1.5rem"
31647
31647
  }
31648
- } : He === "bottom-left" ? {
31648
+ } : Ve === "bottom-left" ? {
31649
31649
  left: "1.5rem",
31650
31650
  bottom: "1.5rem"
31651
31651
  } : {
31652
31652
  right: "1.5rem",
31653
31653
  bottom: "1.5rem"
31654
- }, Gt = o(() => {
31655
- A !== "minimized_orb" && (kt(!0), setTimeout(() => {
31656
- ot("minimized_orb"), kt(!1), T && Dt(!0);
31654
+ }, Wt = o(() => {
31655
+ k !== "minimized_orb" && (Ot(!0), setTimeout(() => {
31656
+ A("minimized_orb"), Ot(!1), T && Et(!0);
31657
31657
  }, 280));
31658
- }, [T, A]), Kt = () => ot("connection_modal"), qt = () => {
31658
+ }, [T, k]), Gt = () => A("connection_modal"), Kt = () => {
31659
31659
  try {
31660
31660
  let e = window.AudioContext || window.webkitAudioContext;
31661
31661
  if (e) {
@@ -31663,36 +31663,36 @@ function Rk() {
31663
31663
  t.resume().catch(() => {}), setTimeout(() => t.close().catch(() => {}), 3e3);
31664
31664
  }
31665
31665
  } catch {}
31666
- ce({ notifyChatInitiated: !0 }), ue?.(!0), ot("voice_mode");
31666
+ ce({ notifyChatInitiated: !0 }), ue?.(!0), A("voice_mode");
31667
+ }, qt = () => {
31668
+ ce({ notifyChatInitiated: !0 }), ue?.(!1), A("text_chat");
31667
31669
  }, Jt = () => {
31668
- ce({ notifyChatInitiated: !0 }), ue?.(!1), ot("text_chat");
31669
- }, Yt = () => {
31670
- ue?.(!1), Gt();
31670
+ ue?.(!1), Wt();
31671
31671
  };
31672
- return e !== "ready" || !Xe || Pe.chat === !1 ? null : /* @__PURE__ */ _("div", {
31672
+ return e !== "ready" || !Ye || Ne.chat === !1 ? null : /* @__PURE__ */ _("div", {
31673
31673
  className: "flowengage-widget-root",
31674
31674
  style: {
31675
31675
  position: "fixed",
31676
31676
  zIndex: 999999,
31677
- ...Wt
31677
+ ...Ut
31678
31678
  },
31679
31679
  onWheel: (e) => e.stopPropagation(),
31680
31680
  onTouchMove: (e) => e.stopPropagation(),
31681
31681
  children: [
31682
- A === "entry_prompt" && /* @__PURE__ */ g(Mk, {
31683
- copy: Qe,
31684
- orbColors: Le,
31685
- primaryColor: ze,
31682
+ k === "entry_prompt" && /* @__PURE__ */ g(Mk, {
31683
+ copy: Ze,
31684
+ orbColors: Ie,
31685
+ primaryColor: Le,
31686
31686
  onYes: () => {
31687
- pe(et), qt();
31687
+ pe($e), Kt();
31688
31688
  },
31689
31689
  onLater: () => {
31690
- pe(et), Gt();
31690
+ pe($e), Wt();
31691
31691
  },
31692
- isMobile: Nt,
31693
- isClosing: Ot
31692
+ isMobile: Mt,
31693
+ isClosing: Dt
31694
31694
  }),
31695
- A === "minimized_orb" && /* @__PURE__ */ _(Dm.div, {
31695
+ k === "minimized_orb" && /* @__PURE__ */ _(Dm.div, {
31696
31696
  layoutId: "fe-main-orb",
31697
31697
  initial: {
31698
31698
  scale: .4,
@@ -31711,14 +31711,14 @@ function Rk() {
31711
31711
  transformOrigin: "bottom right",
31712
31712
  display: "inline-flex",
31713
31713
  flexDirection: "column",
31714
- alignItems: He === "bottom-left" ? "flex-start" : "flex-end",
31714
+ alignItems: Ve === "bottom-left" ? "flex-start" : "flex-end",
31715
31715
  gap: "10px"
31716
31716
  },
31717
31717
  children: [T && /* @__PURE__ */ _("button", {
31718
31718
  type: "button",
31719
- onClick: Lt,
31719
+ onClick: It,
31720
31720
  style: {
31721
- maxWidth: Nt ? "220px" : "240px",
31721
+ maxWidth: Mt ? "220px" : "240px",
31722
31722
  padding: "10px 14px",
31723
31723
  borderRadius: "18px",
31724
31724
  border: "1px solid rgba(255,255,255,0.7)",
@@ -31759,109 +31759,109 @@ function Rk() {
31759
31759
  marginTop: "2px",
31760
31760
  whiteSpace: "nowrap"
31761
31761
  },
31762
- children: ee === "connected" ? `${Ht(j)} with ${nt}` : `Tap to return to ${nt}`
31762
+ children: ee === "connected" ? `${Vt(gt)} with ${tt}` : `Tap to return to ${tt}`
31763
31763
  })]
31764
31764
  })]
31765
31765
  }), /* @__PURE__ */ g(jk, {
31766
- size: Ve,
31767
- orbColors: Le,
31768
- onClick: T ? Lt : Ie ? Kt : Jt
31766
+ size: Be,
31767
+ orbColors: Ie,
31768
+ onClick: T ? It : Pe ? Gt : qt
31769
31769
  })]
31770
31770
  }),
31771
- A === "connection_modal" && /* @__PURE__ */ g(Nk, {
31772
- copy: Qe,
31773
- orbColors: Le,
31774
- primaryColor: ze,
31775
- onVoice: qt,
31776
- onText: Jt,
31777
- onClose: Gt,
31778
- isMobile: Nt,
31779
- isClosing: Ot
31771
+ k === "connection_modal" && /* @__PURE__ */ g(Nk, {
31772
+ copy: Ze,
31773
+ orbColors: Ie,
31774
+ primaryColor: Le,
31775
+ onVoice: Kt,
31776
+ onText: qt,
31777
+ onClose: Wt,
31778
+ isMobile: Mt,
31779
+ isClosing: Dt
31780
31780
  }),
31781
- A === "voice_mode" && /* @__PURE__ */ g(Pk, {
31782
- orbColors: Le,
31783
- onEnterChat: Jt,
31784
- onEndChat: Yt,
31785
- agentId: $e,
31786
- siteId: et,
31787
- apiBaseUrl: tt,
31781
+ k === "voice_mode" && /* @__PURE__ */ g(Pk, {
31782
+ orbColors: Ie,
31783
+ onEnterChat: qt,
31784
+ onEndChat: Jt,
31785
+ agentId: Qe,
31786
+ siteId: $e,
31787
+ apiBaseUrl: et,
31788
31788
  chatId: ie,
31789
31789
  historyRef: ae,
31790
31790
  onMessageSync: oe,
31791
31791
  voiceEndCounter: De
31792
31792
  }, "voice"),
31793
- A === "call_screen" && /* @__PURE__ */ g(gO, {
31793
+ k === "call_screen" && /* @__PURE__ */ g(gO, {
31794
31794
  incomingCall: w,
31795
31795
  activeCallId: T,
31796
31796
  callConnectionState: ee,
31797
- callDurationSeconds: j,
31797
+ callDurationSeconds: gt,
31798
31798
  isCallMuted: ne,
31799
- agentName: nt,
31800
- agentHeadshot: rt,
31801
- fallbackAgentName: O,
31799
+ agentName: tt,
31800
+ agentHeadshot: nt,
31801
+ fallbackAgentName: He,
31802
31802
  acceptCall: he,
31803
31803
  rejectCall: ge,
31804
31804
  endWebRTCCall: _e,
31805
31805
  toggleCallMute: ve,
31806
- formatCallDuration: Ht,
31807
- onMinimize: Rt,
31808
- primaryColor: ze,
31809
- orbColors: Le,
31806
+ formatCallDuration: Vt,
31807
+ onMinimize: Lt,
31808
+ primaryColor: Le,
31809
+ orbColors: Ie,
31810
31810
  chatHistory: r
31811
31811
  }),
31812
- A === "text_chat" && /* @__PURE__ */ g(Lk, {
31813
- isClosing: Ot,
31814
- copy: Qe,
31815
- orbColors: Le,
31816
- primaryColor: ze,
31817
- chatBgGradient: Ue,
31818
- logo: We,
31819
- quickChatOptions: Je,
31820
- onQuickChatSelect: Ut,
31821
- isMobile: Nt,
31812
+ k === "text_chat" && /* @__PURE__ */ g(Lk, {
31813
+ isClosing: Dt,
31814
+ copy: Ze,
31815
+ orbColors: Ie,
31816
+ primaryColor: Le,
31817
+ chatBgGradient: O,
31818
+ logo: Ue,
31819
+ quickChatOptions: qe,
31820
+ onQuickChatSelect: Ht,
31821
+ isMobile: Mt,
31822
31822
  chatHistory: r,
31823
31823
  isAiTyping: y,
31824
31824
  isAgentTyping: v,
31825
31825
  activeScreen: a,
31826
- agentName: nt,
31827
- agentHeadshot: rt,
31828
- fallbackAgentName: O,
31829
- input: st,
31830
- setInput: ct,
31831
- onSubmit: Bt,
31826
+ agentName: tt,
31827
+ agentHeadshot: nt,
31828
+ fallbackAgentName: He,
31829
+ input: ot,
31830
+ setInput: st,
31831
+ onSubmit: zt,
31832
31832
  isConversationEnded: C,
31833
31833
  isLoading: b,
31834
31834
  isRateLimited: x,
31835
31835
  rateLimitMessage: S,
31836
- selectedFile: bt,
31837
- onFileSelect: It,
31838
- onRemoveSelectedFile: Ft,
31839
- attachmentError: St,
31840
- isUploadingAttachment: wt,
31841
- requiresEmail: Mt,
31842
- emailInput: dt,
31843
- setEmailInput: ft,
31844
- emailError: pt,
31845
- emailCaptureSuccess: ht,
31846
- replyContext: lt,
31847
- setReplyContext: ut,
31836
+ selectedFile: yt,
31837
+ onFileSelect: Ft,
31838
+ onRemoveSelectedFile: Pt,
31839
+ attachmentError: xt,
31840
+ isUploadingAttachment: Ct,
31841
+ requiresEmail: jt,
31842
+ emailInput: ut,
31843
+ setEmailInput: dt,
31844
+ emailError: ft,
31845
+ emailCaptureSuccess: mt,
31846
+ replyContext: ct,
31847
+ setReplyContext: lt,
31848
31848
  webRTCError: re,
31849
- micError: vt,
31850
- setMicError: yt,
31849
+ micError: _t,
31850
+ setMicError: vt,
31851
31851
  dismissCallError: ye,
31852
31852
  activeCallId: T,
31853
31853
  isCallMuted: ne,
31854
31854
  toggleCallMute: ve,
31855
31855
  endWebRTCCall: _e,
31856
- formatCallDuration: Ht,
31857
- callDurationSeconds: j,
31858
- onCollapse: Gt,
31859
- onStartVoice: qt,
31860
- onNewChat: Vt,
31861
- onMinimize: Rt,
31862
- onExpand: Lt,
31856
+ formatCallDuration: Vt,
31857
+ callDurationSeconds: gt,
31858
+ onCollapse: Wt,
31859
+ onStartVoice: Kt,
31860
+ onNewChat: Bt,
31861
+ onMinimize: Lt,
31862
+ onExpand: It,
31863
31863
  isCallMinimized: !!T,
31864
- showPoweredBy: Ye,
31864
+ showPoweredBy: Je,
31865
31865
  getVisitorChatHistory: Ce,
31866
31866
  resumeChat: we,
31867
31867
  isSessionRestoring: Te
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowengage/react-chatbot",
3
- "version": "6.0.32",
3
+ "version": "6.0.33",
4
4
  "description": "Embeddable AI chat widget for React — powered by FlowEngage. Drop it in with a single siteId.",
5
5
  "keywords": [
6
6
  "chatbot",