@mypatientspace/chatbot-widget 1.0.43 → 1.0.44

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.
@@ -44,7 +44,7 @@ var Lh;
44
44
  function f0() {
45
45
  return Lh || (Lh = 1, hr.exports = r0()), hr.exports;
46
46
  }
47
- var K = f0(), gr = { exports: {} }, fi = {}, mr = { exports: {} }, yr = {};
47
+ var k = f0(), gr = { exports: {} }, fi = {}, mr = { exports: {} }, yr = {};
48
48
  var Qh;
49
49
  function s0() {
50
50
  return Qh || (Qh = 1, (function(u) {
@@ -3034,20 +3034,20 @@ Error generating stack: ` + a.message + `
3034
3034
  }
3035
3035
  return null;
3036
3036
  }
3037
- function k(b, m, T, B) {
3038
- for (var tt = null, bt = null, I = m, ft = m = 0, yt = null; I !== null && ft < T.length; ft++) {
3037
+ function K(b, m, T, B) {
3038
+ for (var tt = null, vt = null, I = m, ft = m = 0, yt = null; I !== null && ft < T.length; ft++) {
3039
3039
  I.index > ft ? (yt = I, I = null) : yt = I.sibling;
3040
- var vt = A(
3040
+ var St = A(
3041
3041
  b,
3042
3042
  I,
3043
3043
  T[ft],
3044
3044
  B
3045
3045
  );
3046
- if (vt === null) {
3046
+ if (St === null) {
3047
3047
  I === null && (I = yt);
3048
3048
  break;
3049
3049
  }
3050
- t && I && vt.alternate === null && e(b, I), m = i(vt, m, ft), bt === null ? tt = vt : bt.sibling = vt, bt = vt, I = yt;
3050
+ t && I && St.alternate === null && e(b, I), m = i(St, m, ft), vt === null ? tt = St : vt.sibling = St, vt = St, I = yt;
3051
3051
  }
3052
3052
  if (ft === T.length)
3053
3053
  return l(b, I), pt && fl(b, ft), tt;
@@ -3057,7 +3057,7 @@ Error generating stack: ` + a.message + `
3057
3057
  I,
3058
3058
  m,
3059
3059
  ft
3060
- ), bt === null ? tt = I : bt.sibling = I, bt = I);
3060
+ ), vt === null ? tt = I : vt.sibling = I, vt = I);
3061
3061
  return pt && fl(b, ft), tt;
3062
3062
  }
3063
3063
  for (I = a(I); ft < T.length; ft++)
@@ -3073,31 +3073,31 @@ Error generating stack: ` + a.message + `
3073
3073
  yt,
3074
3074
  m,
3075
3075
  ft
3076
- ), bt === null ? tt = yt : bt.sibling = yt, bt = yt);
3076
+ ), vt === null ? tt = yt : vt.sibling = yt, vt = yt);
3077
3077
  return t && I.forEach(function(Jl) {
3078
3078
  return e(b, Jl);
3079
3079
  }), pt && fl(b, ft), tt;
3080
3080
  }
3081
3081
  function at(b, m, T, B) {
3082
3082
  if (T == null) throw Error(r(151));
3083
- for (var tt = null, bt = null, I = m, ft = m = 0, yt = null, vt = T.next(); I !== null && !vt.done; ft++, vt = T.next()) {
3083
+ for (var tt = null, vt = null, I = m, ft = m = 0, yt = null, St = T.next(); I !== null && !St.done; ft++, St = T.next()) {
3084
3084
  I.index > ft ? (yt = I, I = null) : yt = I.sibling;
3085
- var Jl = A(b, I, vt.value, B);
3085
+ var Jl = A(b, I, St.value, B);
3086
3086
  if (Jl === null) {
3087
3087
  I === null && (I = yt);
3088
3088
  break;
3089
3089
  }
3090
- t && I && Jl.alternate === null && e(b, I), m = i(Jl, m, ft), bt === null ? tt = Jl : bt.sibling = Jl, bt = Jl, I = yt;
3090
+ t && I && Jl.alternate === null && e(b, I), m = i(Jl, m, ft), vt === null ? tt = Jl : vt.sibling = Jl, vt = Jl, I = yt;
3091
3091
  }
3092
- if (vt.done)
3092
+ if (St.done)
3093
3093
  return l(b, I), pt && fl(b, ft), tt;
3094
3094
  if (I === null) {
3095
- for (; !vt.done; ft++, vt = T.next())
3096
- vt = N(b, vt.value, B), vt !== null && (m = i(vt, m, ft), bt === null ? tt = vt : bt.sibling = vt, bt = vt);
3095
+ for (; !St.done; ft++, St = T.next())
3096
+ St = N(b, St.value, B), St !== null && (m = i(St, m, ft), vt === null ? tt = St : vt.sibling = St, vt = St);
3097
3097
  return pt && fl(b, ft), tt;
3098
3098
  }
3099
- for (I = a(I); !vt.done; ft++, vt = T.next())
3100
- vt = M(I, b, ft, vt.value, B), vt !== null && (t && vt.alternate !== null && I.delete(vt.key === null ? ft : vt.key), m = i(vt, m, ft), bt === null ? tt = vt : bt.sibling = vt, bt = vt);
3099
+ for (I = a(I); !St.done; ft++, St = T.next())
3100
+ St = M(I, b, ft, St.value, B), St !== null && (t && St.alternate !== null && I.delete(St.key === null ? ft : St.key), m = i(St, m, ft), vt === null ? tt = St : vt.sibling = St, vt = St);
3101
3101
  return t && I.forEach(function(u0) {
3102
3102
  return e(b, u0);
3103
3103
  }), pt && fl(b, ft), tt;
@@ -3176,7 +3176,7 @@ Error generating stack: ` + a.message + `
3176
3176
  );
3177
3177
  }
3178
3178
  if (xt(T))
3179
- return k(
3179
+ return K(
3180
3180
  b,
3181
3181
  m,
3182
3182
  T,
@@ -3221,8 +3221,8 @@ Error generating stack: ` + a.message + `
3221
3221
  return Ga = null, tt;
3222
3222
  } catch (I) {
3223
3223
  if (I === Ya || I === Xi) throw I;
3224
- var bt = ze(29, I, null, b.mode);
3225
- return bt.lanes = B, bt.return = b, bt;
3224
+ var vt = ze(29, I, null, b.mode);
3225
+ return vt.lanes = B, vt.return = b, vt;
3226
3226
  }
3227
3227
  };
3228
3228
  }
@@ -3324,21 +3324,21 @@ Error generating stack: ` + a.message + `
3324
3324
  next: null
3325
3325
  });
3326
3326
  t: {
3327
- var k = t, at = f;
3327
+ var K = t, at = f;
3328
3328
  A = e;
3329
3329
  var Rt = l;
3330
3330
  switch (at.tag) {
3331
3331
  case 1:
3332
- if (k = at.payload, typeof k == "function") {
3333
- N = k.call(Rt, N, A);
3332
+ if (K = at.payload, typeof K == "function") {
3333
+ N = K.call(Rt, N, A);
3334
3334
  break t;
3335
3335
  }
3336
- N = k;
3336
+ N = K;
3337
3337
  break t;
3338
3338
  case 3:
3339
- k.flags = k.flags & -65537 | 128;
3339
+ K.flags = K.flags & -65537 | 128;
3340
3340
  case 0:
3341
- if (k = at.payload, A = typeof k == "function" ? k.call(Rt, N, A) : k, A == null) break t;
3341
+ if (K = at.payload, A = typeof K == "function" ? K.call(Rt, N, A) : K, A == null) break t;
3342
3342
  N = O({}, N, A);
3343
3343
  break t;
3344
3344
  case 2:
@@ -6062,12 +6062,12 @@ Error generating stack: ` + a.message + `
6062
6062
  if ((t & 1024) !== 0 && i !== null) {
6063
6063
  t = void 0, l = e, n = i.memoizedProps, i = i.memoizedState, a = l.stateNode;
6064
6064
  try {
6065
- var k = ga(
6065
+ var K = ga(
6066
6066
  l.type,
6067
6067
  n
6068
6068
  );
6069
6069
  t = a.getSnapshotBeforeUpdate(
6070
- k,
6070
+ K,
6071
6071
  i
6072
6072
  ), a.__reactInternalSnapshotBeforeUpdate = t;
6073
6073
  } catch (at) {
@@ -6495,8 +6495,8 @@ Error generating stack: ` + a.message + `
6495
6495
  n = t.stateNode;
6496
6496
  try {
6497
6497
  Aa(n, "");
6498
- } catch (k) {
6499
- _t(t, t.return, k);
6498
+ } catch (K) {
6499
+ _t(t, t.return, K);
6500
6500
  }
6501
6501
  }
6502
6502
  a & 4 && t.stateNode != null && (n = t.memoizedProps, Eo(
@@ -6512,8 +6512,8 @@ Error generating stack: ` + a.message + `
6512
6512
  a = t.memoizedProps, l = t.stateNode;
6513
6513
  try {
6514
6514
  l.nodeValue = a;
6515
- } catch (k) {
6516
- _t(t, t.return, k);
6515
+ } catch (K) {
6516
+ _t(t, t.return, K);
6517
6517
  }
6518
6518
  }
6519
6519
  break;
@@ -6521,8 +6521,8 @@ Error generating stack: ` + a.message + `
6521
6521
  if (zu = null, n = Qe, Qe = Tu(e.containerInfo), me(e, t), Qe = n, ye(t), a & 4 && l !== null && l.memoizedState.isDehydrated)
6522
6522
  try {
6523
6523
  ln(e.containerInfo);
6524
- } catch (k) {
6525
- _t(t, t.return, k);
6524
+ } catch (K) {
6525
+ _t(t, t.return, K);
6526
6526
  }
6527
6527
  Oo && (Oo = !1, Md(t));
6528
6528
  break;
@@ -6556,8 +6556,8 @@ Error generating stack: ` + a.message + `
6556
6556
  var N = h.memoizedProps.style, A = N != null && N.hasOwnProperty("display") ? N.display : null;
6557
6557
  f.style.display = A == null || typeof A == "boolean" ? "" : ("" + A).trim();
6558
6558
  }
6559
- } catch (k) {
6560
- _t(h, h.return, k);
6559
+ } catch (K) {
6560
+ _t(h, h.return, K);
6561
6561
  }
6562
6562
  }
6563
6563
  } else if (e.tag === 6) {
@@ -6565,8 +6565,8 @@ Error generating stack: ` + a.message + `
6565
6565
  h = e;
6566
6566
  try {
6567
6567
  h.stateNode.nodeValue = n ? "" : h.memoizedProps;
6568
- } catch (k) {
6569
- _t(h, h.return, k);
6568
+ } catch (K) {
6569
+ _t(h, h.return, K);
6570
6570
  }
6571
6571
  }
6572
6572
  } else if (e.tag === 18) {
@@ -6575,8 +6575,8 @@ Error generating stack: ` + a.message + `
6575
6575
  try {
6576
6576
  var M = h.stateNode;
6577
6577
  n ? yh(M, !0) : yh(h.stateNode, !1);
6578
- } catch (k) {
6579
- _t(h, h.return, k);
6578
+ } catch (K) {
6579
+ _t(h, h.return, K);
6580
6580
  }
6581
6581
  }
6582
6582
  } else if ((e.tag !== 22 && e.tag !== 23 || e.memoizedState === null || e === t) && e.child !== null) {
@@ -7329,12 +7329,12 @@ Error generating stack: ` + a.message + `
7329
7329
  i,
7330
7330
  N
7331
7331
  );
7332
- var k = (i & 62914560) === i ? fu - Se() : (i & 4194048) === i ? Ud - Se() : 0;
7333
- if (k = Fy(
7332
+ var K = (i & 62914560) === i ? fu - Se() : (i & 4194048) === i ? Ud - Se() : 0;
7333
+ if (K = Fy(
7334
7334
  N,
7335
- k
7336
- ), k !== null) {
7337
- Tl = i, t.cancelPendingCommit = k(
7335
+ K
7336
+ ), K !== null) {
7337
+ Tl = i, t.cancelPendingCommit = K(
7338
7338
  Zd.bind(
7339
7339
  null,
7340
7340
  t,
@@ -7732,7 +7732,7 @@ Error generating stack: ` + a.message + `
7732
7732
  else {
7733
7733
  var N = f.ownerDocument || document, A = N && N.defaultView || window;
7734
7734
  if (A.getSelection) {
7735
- var M = A.getSelection(), k = f.textContent.length, at = Math.min(h.start, k), Rt = h.end === void 0 ? at : Math.min(h.end, k);
7735
+ var M = A.getSelection(), K = f.textContent.length, at = Math.min(h.start, K), Rt = h.end === void 0 ? at : Math.min(h.end, K);
7736
7736
  !M.extend && at > Rt && (c = Rt, Rt = at, at = c);
7737
7737
  var b = Df(
7738
7738
  f,
@@ -8237,7 +8237,7 @@ Error generating stack: ` + a.message + `
8237
8237
  t: {
8238
8238
  var A = Yf.get(t);
8239
8239
  if (A !== void 0) {
8240
- var M = Di, k = t;
8240
+ var M = Di, K = t;
8241
8241
  switch (t) {
8242
8242
  case "keypress":
8243
8243
  if (_i(l) === 0) break t;
@@ -8246,10 +8246,10 @@ Error generating stack: ` + a.message + `
8246
8246
  M = vm;
8247
8247
  break;
8248
8248
  case "focusin":
8249
- k = "focus", M = yc;
8249
+ K = "focus", M = yc;
8250
8250
  break;
8251
8251
  case "focusout":
8252
- k = "blur", M = yc;
8252
+ K = "blur", M = yc;
8253
8253
  break;
8254
8254
  case "beforeblur":
8255
8255
  case "afterblur":
@@ -8328,7 +8328,7 @@ Error generating stack: ` + a.message + `
8328
8328
  }
8329
8329
  0 < at.length && (A = new M(
8330
8330
  A,
8331
- k,
8331
+ K,
8332
8332
  null,
8333
8333
  l,
8334
8334
  D
@@ -8337,10 +8337,10 @@ Error generating stack: ` + a.message + `
8337
8337
  }
8338
8338
  if ((e & 7) === 0) {
8339
8339
  t: {
8340
- if (A = t === "mouseover" || t === "pointerover", M = t === "mouseout" || t === "pointerout", A && l !== rc && (k = l.relatedTarget || l.fromElement) && (Sa(k) || k[va]))
8340
+ if (A = t === "mouseover" || t === "pointerover", M = t === "mouseout" || t === "pointerout", A && l !== rc && (K = l.relatedTarget || l.fromElement) && (Sa(K) || K[va]))
8341
8341
  break t;
8342
- if ((M || A) && (A = D.window === D ? D : (A = D.ownerDocument) ? A.defaultView || A.parentWindow : window, M ? (k = l.relatedTarget || l.toElement, M = C, k = k ? Sa(k) : null, k !== null && (Rt = g(k), at = k.tag, k !== Rt || at !== 5 && at !== 27 && at !== 6) && (k = null)) : (M = null, k = C), M !== k)) {
8343
- if (at = gf, B = "onMouseLeave", b = "onMouseEnter", m = "mouse", (t === "pointerout" || t === "pointerover") && (at = yf, B = "onPointerLeave", b = "onPointerEnter", m = "pointer"), Rt = M == null ? A : xn(M), T = k == null ? A : xn(k), A = new at(
8342
+ if ((M || A) && (A = D.window === D ? D : (A = D.ownerDocument) ? A.defaultView || A.parentWindow : window, M ? (K = l.relatedTarget || l.toElement, M = C, K = K ? Sa(K) : null, K !== null && (Rt = g(K), at = K.tag, K !== Rt || at !== 5 && at !== 27 && at !== 6) && (K = null)) : (M = null, K = C), M !== K)) {
8343
+ if (at = gf, B = "onMouseLeave", b = "onMouseEnter", m = "mouse", (t === "pointerout" || t === "pointerover") && (at = yf, B = "onPointerLeave", b = "onPointerEnter", m = "pointer"), Rt = M == null ? A : xn(M), T = K == null ? A : xn(K), A = new at(
8344
8344
  B,
8345
8345
  m + "leave",
8346
8346
  M,
@@ -8349,12 +8349,12 @@ Error generating stack: ` + a.message + `
8349
8349
  ), A.target = Rt, A.relatedTarget = T, B = null, Sa(D) === C && (at = new at(
8350
8350
  b,
8351
8351
  m + "enter",
8352
- k,
8352
+ K,
8353
8353
  l,
8354
8354
  D
8355
- ), at.target = T, at.relatedTarget = Rt, B = at), Rt = B, M && k)
8355
+ ), at.target = T, at.relatedTarget = Rt, B = at), Rt = B, M && K)
8356
8356
  e: {
8357
- for (at = My, b = M, m = k, T = 0, B = b; B; B = at(B))
8357
+ for (at = My, b = M, m = K, T = 0, B = b; B; B = at(B))
8358
8358
  T++;
8359
8359
  B = 0;
8360
8360
  for (var tt = m; tt; tt = at(tt))
@@ -8379,10 +8379,10 @@ Error generating stack: ` + a.message + `
8379
8379
  M,
8380
8380
  at,
8381
8381
  !1
8382
- ), k !== null && Rt !== null && ch(
8382
+ ), K !== null && Rt !== null && ch(
8383
8383
  N,
8384
8384
  Rt,
8385
- k,
8385
+ K,
8386
8386
  at,
8387
8387
  !0
8388
8388
  );
@@ -8390,20 +8390,20 @@ Error generating stack: ` + a.message + `
8390
8390
  }
8391
8391
  t: {
8392
8392
  if (A = C ? xn(C) : window, M = A.nodeName && A.nodeName.toLowerCase(), M === "select" || M === "input" && A.type === "file")
8393
- var bt = zf;
8393
+ var vt = zf;
8394
8394
  else if (Tf(A))
8395
8395
  if (Af)
8396
- bt = jm;
8396
+ vt = jm;
8397
8397
  else {
8398
- bt = Hm;
8398
+ vt = Hm;
8399
8399
  var I = wm;
8400
8400
  }
8401
8401
  else
8402
- M = A.nodeName, !M || M.toLowerCase() !== "input" || A.type !== "checkbox" && A.type !== "radio" ? C && oc(C.elementType) && (bt = zf) : bt = qm;
8403
- if (bt && (bt = bt(t, C))) {
8402
+ M = A.nodeName, !M || M.toLowerCase() !== "input" || A.type !== "checkbox" && A.type !== "radio" ? C && oc(C.elementType) && (vt = zf) : vt = qm;
8403
+ if (vt && (vt = vt(t, C))) {
8404
8404
  Cf(
8405
8405
  N,
8406
- bt,
8406
+ vt,
8407
8407
  l,
8408
8408
  D
8409
8409
  );
@@ -9156,11 +9156,11 @@ Error generating stack: ` + a.message + `
9156
9156
  uf(t, A, M);
9157
9157
  return;
9158
9158
  case "option":
9159
- for (var k in l)
9160
- A = l[k], l.hasOwnProperty(k) && A != null && !a.hasOwnProperty(k) && (k === "selected" ? t.selected = !1 : Dt(
9159
+ for (var K in l)
9160
+ A = l[K], l.hasOwnProperty(K) && A != null && !a.hasOwnProperty(K) && (K === "selected" ? t.selected = !1 : Dt(
9161
9161
  t,
9162
9162
  e,
9163
- k,
9163
+ K,
9164
9164
  null,
9165
9165
  a,
9166
9166
  A
@@ -11568,10 +11568,10 @@ var wr = function(o) {
11568
11568
  serialized: _,
11569
11569
  isStringTag: typeof d == "string"
11570
11570
  }), /* @__PURE__ */ R.createElement(d, x));
11571
- }), jr = ip, Lu = K.Fragment, Y = function(o, s, r) {
11572
- return yi.call(s, "css") ? K.jsx(jr, qr(o, s), r) : K.jsx(o, s, r);
11571
+ }), jr = ip, Lu = k.Fragment, Y = function(o, s, r) {
11572
+ return yi.call(s, "css") ? k.jsx(jr, qr(o, s), r) : k.jsx(o, s, r);
11573
11573
  }, ct = function(o, s, r) {
11574
- return yi.call(s, "css") ? K.jsxs(jr, qr(o, s), r) : K.jsxs(o, s, r);
11574
+ return yi.call(s, "css") ? k.jsxs(jr, qr(o, s), r) : k.jsxs(o, s, r);
11575
11575
  }, rg = function(o, s) {
11576
11576
  var r = arguments;
11577
11577
  if (s == null || !yi.call(s, "css"))
@@ -11817,7 +11817,7 @@ const et = {
11817
11817
  x
11818
11818
  ]
11819
11819
  );
11820
- return /* @__PURE__ */ K.jsx(Ug.Provider, { value: P, children: u });
11820
+ return /* @__PURE__ */ k.jsx(Ug.Provider, { value: P, children: u });
11821
11821
  };
11822
11822
  const Ng = (...u) => u.filter((o, s, r) => !!o && o.trim() !== "" && r.indexOf(o) === s).join(" ").trim();
11823
11823
  const cp = (u) => u.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
@@ -13725,6 +13725,7 @@ const Qp = R.memo(function() {
13725
13725
  messages: g,
13726
13726
  isOpen: _,
13727
13727
  isTyping: p,
13728
+ isLoading: !q,
13728
13729
  streamingStatus: O,
13729
13730
  config: r,
13730
13731
  theme: H,
@@ -13734,7 +13735,7 @@ const Qp = R.memo(function() {
13734
13735
  close: oe,
13735
13736
  toggle: Ft
13736
13737
  };
13737
- return /* @__PURE__ */ K.jsx(qg.Provider, { value: il, children: o });
13738
+ return /* @__PURE__ */ k.jsx(qg.Provider, { value: il, children: o });
13738
13739
  };
13739
13740
  var tb = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/, eb = /* @__PURE__ */ Ag(
13740
13741
  function(u) {
@@ -13943,16 +13944,16 @@ var tb = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|def
13943
13944
  "svg",
13944
13945
  "text",
13945
13946
  "tspan"
13946
- ], St = ib.bind(null);
13947
+ ], bt = ib.bind(null);
13947
13948
  ub.forEach(function(u) {
13948
- St[u] = St(u);
13949
+ bt[u] = bt(u);
13949
13950
  });
13950
13951
  const mn = () => {
13951
13952
  const u = R.useContext(qg);
13952
13953
  if (!u)
13953
13954
  throw new Error("useChat must be used within a ChatProvider");
13954
13955
  return u;
13955
- }, cb = St.div`
13956
+ }, cb = bt.div`
13956
13957
  display: flex;
13957
13958
  align-items: center;
13958
13959
  justify-content: space-between;
@@ -13960,11 +13961,11 @@ const mn = () => {
13960
13961
  background-color: ${({ theme: u }) => u.colors.secondary};
13961
13962
  color: white;
13962
13963
  border-radius: ${({ theme: u }) => u.borderRadius} ${({ theme: u }) => u.borderRadius} 0 0;
13963
- `, ob = St.div`
13964
+ `, ob = bt.div`
13964
13965
  display: flex;
13965
13966
  align-items: center;
13966
13967
  gap: 12px;
13967
- `, rb = St.div`
13968
+ `, rb = bt.div`
13968
13969
  display: flex;
13969
13970
  align-items: center;
13970
13971
  justify-content: center;
@@ -13972,27 +13973,27 @@ const mn = () => {
13972
13973
  height: 40px;
13973
13974
  border-radius: ${({ hasCustomIcon: u }) => u ? "0" : "50%"};
13974
13975
  background-color: ${({ hasCustomIcon: u }) => u ? "transparent" : "rgba(255, 255, 255, 0.2)"};
13975
- `, fb = St.img`
13976
+ `, fb = bt.img`
13976
13977
  width: 100%;
13977
13978
  height: 100%;
13978
13979
  object-fit: contain;
13979
- `, sb = St.div`
13980
+ `, sb = bt.div`
13980
13981
  display: flex;
13981
13982
  flex-direction: column;
13982
- `, db = St.h2`
13983
+ `, db = bt.h2`
13983
13984
  margin: 0;
13984
13985
  font-size: 16px;
13985
13986
  font-weight: 600;
13986
13987
  font-family: ${({ fontFamily: u }) => u};
13987
13988
  line-height: 1.2;
13988
- `, hb = St.span`
13989
+ `, hb = bt.span`
13989
13990
  margin: 0;
13990
13991
  font-size: 12px;
13991
13992
  font-weight: 400;
13992
13993
  font-family: ${({ fontFamily: u }) => u};
13993
13994
  opacity: 0.9;
13994
13995
  line-height: 1.2;
13995
- `, gb = St.div`
13996
+ `, gb = bt.div`
13996
13997
  display: flex;
13997
13998
  align-items: center;
13998
13999
  gap: 4px;
@@ -14002,7 +14003,7 @@ const mn = () => {
14002
14003
  font-family: ${({ fontFamily: u }) => u};
14003
14004
  opacity: 0.8;
14004
14005
  line-height: 1.2;
14005
- `, mb = St.button`
14006
+ `, mb = bt.button`
14006
14007
  display: flex;
14007
14008
  align-items: center;
14008
14009
  justify-content: center;
@@ -14024,22 +14025,22 @@ const mn = () => {
14024
14025
  }
14025
14026
  `, yb = () => {
14026
14027
  const { close: u, config: o, theme: s, assistant: r } = mn(), d = o.headerTitle || r?.chatUiConfig?.avatarTitle || "Chat", g = o.headerIcon || r?.chatUiConfig?.avatarImage?.iconURL || r?.chatUiConfig?.avatarImage?.thumbnailURL, v = o.headerSubtitle || r?.chatUiConfig?.headerSubtitle, _ = o.brandingText || r?.chatUiConfig?.brandingText;
14027
- return /* @__PURE__ */ K.jsxs(cb, { theme: s, children: [
14028
- /* @__PURE__ */ K.jsxs(ob, { children: [
14029
- g && /* @__PURE__ */ K.jsx(rb, { theme: s, hasCustomIcon: !0, children: /* @__PURE__ */ K.jsx(fb, { src: g, alt: "" }) }),
14030
- /* @__PURE__ */ K.jsxs(sb, { children: [
14031
- /* @__PURE__ */ K.jsx(db, { fontFamily: s.fontFamily, children: d }),
14032
- v && /* @__PURE__ */ K.jsx(hb, { fontFamily: s.fontFamily, children: v }),
14033
- _ && /* @__PURE__ */ K.jsxs(gb, { fontFamily: s.fontFamily, children: [
14028
+ return /* @__PURE__ */ k.jsxs(cb, { theme: s, children: [
14029
+ /* @__PURE__ */ k.jsxs(ob, { children: [
14030
+ g && /* @__PURE__ */ k.jsx(rb, { theme: s, hasCustomIcon: !0, children: /* @__PURE__ */ k.jsx(fb, { src: g, alt: "" }) }),
14031
+ /* @__PURE__ */ k.jsxs(sb, { children: [
14032
+ /* @__PURE__ */ k.jsx(db, { fontFamily: s.fontFamily, children: d }),
14033
+ v && /* @__PURE__ */ k.jsx(hb, { fontFamily: s.fontFamily, children: v }),
14034
+ _ && /* @__PURE__ */ k.jsxs(gb, { fontFamily: s.fontFamily, children: [
14034
14035
  _,
14035
14036
  " v",
14036
- "1.0.43"
14037
+ "1.0.44"
14037
14038
  ] })
14038
14039
  ] })
14039
14040
  ] }),
14040
- o.floatingMode && /* @__PURE__ */ K.jsx(mb, { theme: s, onClick: u, "aria-label": "Minimize chat", children: /* @__PURE__ */ K.jsx(wg, { size: 20 }) })
14041
+ o.floatingMode && /* @__PURE__ */ k.jsx(mb, { theme: s, onClick: u, "aria-label": "Minimize chat", children: /* @__PURE__ */ k.jsx(wg, { size: 20 }) })
14041
14042
  ] });
14042
- }, pb = St.div`
14043
+ }, pb = bt.div`
14043
14044
  display: flex;
14044
14045
  gap: 8px;
14045
14046
  padding: 12px 16px;
@@ -14053,7 +14054,7 @@ const mn = () => {
14053
14054
  &::-webkit-scrollbar {
14054
14055
  display: none;
14055
14056
  }
14056
- `, bb = St.button`
14057
+ `, bb = bt.button`
14057
14058
  display: flex;
14058
14059
  align-items: center;
14059
14060
  gap: 6px;
@@ -14078,22 +14079,29 @@ const mn = () => {
14078
14079
  &:active {
14079
14080
  transform: scale(0.98);
14080
14081
  }
14082
+
14083
+ &:disabled {
14084
+ opacity: 0.5;
14085
+ cursor: not-allowed;
14086
+ transform: none;
14087
+ }
14081
14088
  `, vb = () => {
14082
- const { config: u, theme: o, sendMessage: s, assistant: r } = mn(), d = u.quickActions?.length ? u.quickActions : r?.chatUiConfig?.initialPrompts || [];
14083
- if (d.length === 0)
14089
+ const { config: u, theme: o, sendMessage: s, assistant: r, isTyping: d } = mn(), g = u.quickActions?.length ? u.quickActions : r?.chatUiConfig?.initialPrompts || [];
14090
+ if (g.length === 0)
14084
14091
  return null;
14085
- const g = (v) => {
14086
- u.onQuickAction?.(v), s(v);
14092
+ const v = (_) => {
14093
+ u.onQuickAction?.(_), s(_);
14087
14094
  };
14088
- return /* @__PURE__ */ K.jsx(pb, { theme: o, children: d.map((v, _) => /* @__PURE__ */ K.jsx(
14095
+ return /* @__PURE__ */ k.jsx(pb, { theme: o, children: g.map((_, x) => /* @__PURE__ */ k.jsx(
14089
14096
  bb,
14090
14097
  {
14091
14098
  theme: o,
14092
- onClick: () => g(v),
14093
- "aria-label": v,
14094
- children: v
14099
+ onClick: () => v(_),
14100
+ disabled: d,
14101
+ "aria-label": _,
14102
+ children: _
14095
14103
  },
14096
- _
14104
+ x
14097
14105
  )) });
14098
14106
  }, Sb = gn`
14099
14107
  from {
@@ -14104,7 +14112,7 @@ const mn = () => {
14104
14112
  opacity: 1;
14105
14113
  transform: translateY(0);
14106
14114
  }
14107
- `, xb = St.div`
14115
+ `, xb = bt.div`
14108
14116
  display: flex;
14109
14117
  flex-direction: column;
14110
14118
  align-items: ${({ isUser: u }) => u ? "flex-end" : "flex-start"};
@@ -14114,7 +14122,7 @@ const mn = () => {
14114
14122
  @media (prefers-reduced-motion: reduce) {
14115
14123
  animation: none;
14116
14124
  }
14117
- `, Tb = St.div`
14125
+ `, Tb = bt.div`
14118
14126
  max-width: 80%;
14119
14127
  padding: 12px 16px;
14120
14128
  border-radius: 16px;
@@ -14157,12 +14165,12 @@ const mn = () => {
14157
14165
  font-family: monospace;
14158
14166
  font-size: 13px;
14159
14167
  }
14160
- `, Cb = St.span`
14168
+ `, Cb = bt.span`
14161
14169
  font-size: 11px;
14162
14170
  color: ${({ theme: u }) => u.colors.textLight};
14163
14171
  margin-top: 4px;
14164
14172
  font-family: ${({ theme: u }) => u.fontFamily};
14165
- `, zb = St.span`
14173
+ `, zb = bt.span`
14166
14174
  font-size: 11px;
14167
14175
  margin-left: 6px;
14168
14176
  color: ${({ status: u, theme: o }) => {
@@ -14175,7 +14183,7 @@ const mn = () => {
14175
14183
  return o.colors.textLight;
14176
14184
  }
14177
14185
  }};
14178
- `, Ab = St.button`
14186
+ `, Ab = bt.button`
14179
14187
  display: flex;
14180
14188
  align-items: center;
14181
14189
  justify-content: center;
@@ -14199,8 +14207,8 @@ const mn = () => {
14199
14207
  }, _ = () => {
14200
14208
  d(!1);
14201
14209
  };
14202
- return /* @__PURE__ */ K.jsxs(xb, { isUser: s, children: [
14203
- /* @__PURE__ */ K.jsx(
14210
+ return /* @__PURE__ */ k.jsxs(xb, { isUser: s, children: [
14211
+ /* @__PURE__ */ k.jsx(
14204
14212
  Tb,
14205
14213
  {
14206
14214
  isUser: s,
@@ -14208,8 +14216,8 @@ const mn = () => {
14208
14216
  dangerouslySetInnerHTML: { __html: u.content }
14209
14217
  }
14210
14218
  ),
14211
- u.audioUrl && /* @__PURE__ */ K.jsxs(K.Fragment, { children: [
14212
- /* @__PURE__ */ K.jsx(
14219
+ u.audioUrl && /* @__PURE__ */ k.jsxs(k.Fragment, { children: [
14220
+ /* @__PURE__ */ k.jsx(
14213
14221
  "audio",
14214
14222
  {
14215
14223
  ref: g,
@@ -14218,7 +14226,7 @@ const mn = () => {
14218
14226
  style: { display: "none" }
14219
14227
  }
14220
14228
  ),
14221
- /* @__PURE__ */ K.jsx(
14229
+ /* @__PURE__ */ k.jsx(
14222
14230
  Ab,
14223
14231
  {
14224
14232
  theme: o,
@@ -14226,13 +14234,13 @@ const mn = () => {
14226
14234
  onClick: v,
14227
14235
  "aria-label": r ? "Stop audio" : "Play audio",
14228
14236
  title: r ? "Stop audio" : "Play audio",
14229
- children: r ? /* @__PURE__ */ K.jsx(_p, { size: 16 }) : /* @__PURE__ */ K.jsx(Ep, { size: 16 })
14237
+ children: r ? /* @__PURE__ */ k.jsx(_p, { size: 16 }) : /* @__PURE__ */ k.jsx(Ep, { size: 16 })
14230
14238
  }
14231
14239
  )
14232
14240
  ] }),
14233
- /* @__PURE__ */ K.jsxs(Cb, { theme: o, children: [
14241
+ /* @__PURE__ */ k.jsxs(Cb, { theme: o, children: [
14234
14242
  Eb(u.timestamp),
14235
- s && u.status !== "sent" && /* @__PURE__ */ K.jsx(zb, { status: u.status, theme: o, children: u.status === "sending" ? "Sending..." : "Failed" })
14243
+ s && u.status !== "sent" && /* @__PURE__ */ k.jsx(zb, { status: u.status, theme: o, children: u.status === "sending" ? "Sending..." : "Failed" })
14236
14244
  ] })
14237
14245
  ] });
14238
14246
  }), _b = gn`
@@ -14251,23 +14259,23 @@ const mn = () => {
14251
14259
  30% {
14252
14260
  transform: translateY(-4px);
14253
14261
  }
14254
- `, Db = St.div`
14262
+ `, Db = bt.div`
14255
14263
  display: flex;
14256
14264
  align-items: center;
14257
14265
  gap: 8px;
14258
14266
  padding: 8px 4px;
14259
14267
  animation: ${_b} 0.2s ease-out;
14260
- `, Rb = St.span`
14268
+ `, Rb = bt.span`
14261
14269
  font-size: 13px;
14262
14270
  font-family: ${({ theme: u }) => u.fontFamily};
14263
14271
  color: ${({ theme: u }) => u.colors.textLight};
14264
14272
  font-style: italic;
14265
- `, Bb = St.span`
14273
+ `, Bb = bt.span`
14266
14274
  display: inline-flex;
14267
14275
  align-items: center;
14268
14276
  gap: 3px;
14269
14277
  margin-left: 2px;
14270
- `, zr = St.span`
14278
+ `, zr = bt.span`
14271
14279
  width: 5px;
14272
14280
  height: 5px;
14273
14281
  border-radius: 50%;
@@ -14314,15 +14322,15 @@ const mn = () => {
14314
14322
  }, 25) : v(!1), () => {
14315
14323
  x.current && clearTimeout(x.current);
14316
14324
  };
14317
- }, [r, g]), /* @__PURE__ */ K.jsxs(Db, { children: [
14318
- /* @__PURE__ */ K.jsx(Rb, { theme: u, children: r }),
14319
- /* @__PURE__ */ K.jsxs(Bb, { children: [
14320
- /* @__PURE__ */ K.jsx(zr, { delay: 0, theme: u }),
14321
- /* @__PURE__ */ K.jsx(zr, { delay: 150, theme: u }),
14322
- /* @__PURE__ */ K.jsx(zr, { delay: 300, theme: u })
14325
+ }, [r, g]), /* @__PURE__ */ k.jsxs(Db, { children: [
14326
+ /* @__PURE__ */ k.jsx(Rb, { theme: u, children: r }),
14327
+ /* @__PURE__ */ k.jsxs(Bb, { children: [
14328
+ /* @__PURE__ */ k.jsx(zr, { delay: 0, theme: u }),
14329
+ /* @__PURE__ */ k.jsx(zr, { delay: 150, theme: u }),
14330
+ /* @__PURE__ */ k.jsx(zr, { delay: 300, theme: u })
14323
14331
  ] })
14324
14332
  ] });
14325
- }, wb = St.div`
14333
+ }, wb = bt.div`
14326
14334
  flex: 1;
14327
14335
  overflow-y: auto;
14328
14336
  padding: 16px;
@@ -14347,7 +14355,7 @@ const mn = () => {
14347
14355
  &::-webkit-scrollbar-thumb:hover {
14348
14356
  background-color: rgba(60, 77, 115, 0.3);
14349
14357
  }
14350
- `, Hb = St.div`
14358
+ `, Hb = bt.div`
14351
14359
  display: flex;
14352
14360
  flex: 1;
14353
14361
  align-items: center;
@@ -14356,15 +14364,40 @@ const mn = () => {
14356
14364
  font-size: 14px;
14357
14365
  text-align: center;
14358
14366
  padding: 20px;
14359
- `, qb = () => {
14360
- const { messages: u, isTyping: o, streamingStatus: s, theme: r } = mn(), d = R.useRef(null);
14367
+ `, qb = bt.div`
14368
+ display: flex;
14369
+ flex: 1;
14370
+ flex-direction: column;
14371
+ align-items: center;
14372
+ justify-content: center;
14373
+ gap: 12px;
14374
+ color: ${({ color: u }) => u};
14375
+ font-size: 14px;
14376
+ `, jb = bt.div`
14377
+ width: 32px;
14378
+ height: 32px;
14379
+ border: 3px solid ${({ color: u }) => u}20;
14380
+ border-top-color: ${({ color: u }) => u};
14381
+ border-radius: 50%;
14382
+ animation: spin 0.8s linear infinite;
14383
+
14384
+ @keyframes spin {
14385
+ to {
14386
+ transform: rotate(360deg);
14387
+ }
14388
+ }
14389
+ `, Yb = () => {
14390
+ const { messages: u, isTyping: o, isLoading: s, streamingStatus: r, theme: d } = mn(), g = R.useRef(null);
14361
14391
  return R.useEffect(() => {
14362
- d.current && (d.current.scrollTop = d.current.scrollHeight);
14363
- }, [u, o]), /* @__PURE__ */ K.jsx(wb, { ref: d, fontFamily: r.fontFamily, children: u.length === 0 && !o ? /* @__PURE__ */ K.jsx(Hb, { color: r.colors.textLight, children: "Send a message to start the conversation" }) : /* @__PURE__ */ K.jsxs(K.Fragment, { children: [
14364
- u.map((g) => /* @__PURE__ */ K.jsx(Mb, { message: g, theme: r }, g.id)),
14365
- o && /* @__PURE__ */ K.jsx(Nb, { theme: r, status: s })
14392
+ g.current && (g.current.scrollTop = g.current.scrollHeight);
14393
+ }, [u, o]), /* @__PURE__ */ k.jsx(wb, { ref: g, fontFamily: d.fontFamily, children: s ? /* @__PURE__ */ k.jsxs(qb, { color: d.colors.textLight, children: [
14394
+ /* @__PURE__ */ k.jsx(jb, { color: d.colors.primary }),
14395
+ "Loading..."
14396
+ ] }) : u.length === 0 && !o ? /* @__PURE__ */ k.jsx(Hb, { color: d.colors.textLight, children: "Send a message to start the conversation" }) : /* @__PURE__ */ k.jsxs(k.Fragment, { children: [
14397
+ u.map((v) => /* @__PURE__ */ k.jsx(Mb, { message: v, theme: d }, v.id)),
14398
+ o && /* @__PURE__ */ k.jsx(Nb, { theme: d, status: r })
14366
14399
  ] }) });
14367
- }, jb = (u = {}) => {
14400
+ }, Gb = (u = {}) => {
14368
14401
  const { onTranscript: o, onError: s, language: r = "en-US" } = u, [d, g] = R.useState(!1), [v, _] = R.useState(""), [x, p] = R.useState(!1), z = R.useRef(null);
14369
14402
  R.useEffect(() => {
14370
14403
  const q = window.SpeechRecognition || window.webkitSpeechRecognition;
@@ -14410,14 +14443,14 @@ const mn = () => {
14410
14443
  toggleRecording: V,
14411
14444
  clearTranscript: W
14412
14445
  };
14413
- }, Yb = St.div`
14446
+ }, $b = bt.div`
14414
14447
  display: flex;
14415
14448
  align-items: center;
14416
14449
  gap: 8px;
14417
14450
  padding: 12px 16px;
14418
14451
  border-top: 1px solid ${({ theme: u }) => u.colors.borderLight};
14419
14452
  background-color: ${({ theme: u }) => u.colors.background};
14420
- `, Gb = St.input`
14453
+ `, Xb = bt.input`
14421
14454
  flex: 1;
14422
14455
  padding: 12px 16px;
14423
14456
  border: 1.5px solid ${({ theme: u }) => u.colors.border};
@@ -14442,7 +14475,7 @@ const mn = () => {
14442
14475
  background-color: ${({ theme: u }) => u.colors.surface};
14443
14476
  cursor: not-allowed;
14444
14477
  }
14445
- `, $b = St.button`
14478
+ `, Lb = bt.button`
14446
14479
  display: flex;
14447
14480
  align-items: center;
14448
14481
  justify-content: center;
@@ -14462,7 +14495,7 @@ const mn = () => {
14462
14495
  &:active:not(:disabled) {
14463
14496
  transform: scale(0.95);
14464
14497
  }
14465
- `, Xb = gn`
14498
+ `, Qb = gn`
14466
14499
  0% {
14467
14500
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
14468
14501
  }
@@ -14472,7 +14505,7 @@ const mn = () => {
14472
14505
  100% {
14473
14506
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
14474
14507
  }
14475
- `, Lb = St.button`
14508
+ `, Zb = bt.button`
14476
14509
  display: flex;
14477
14510
  align-items: center;
14478
14511
  justify-content: center;
@@ -14484,7 +14517,7 @@ const mn = () => {
14484
14517
  color: ${({ theme: u, isRecording: o }) => o ? u.colors.white : u.colors.textLight};
14485
14518
  cursor: pointer;
14486
14519
  transition: background-color 0.2s ease, transform 0.1s ease, color 0.2s ease;
14487
- animation: ${({ isRecording: u }) => u ? Xb : "none"} 1.5s infinite;
14520
+ animation: ${({ isRecording: u }) => u ? Qb : "none"} 1.5s infinite;
14488
14521
 
14489
14522
  &:hover {
14490
14523
  background-color: ${({ theme: u, isRecording: o }) => o ? u.colors.recording : u.colors.border};
@@ -14494,8 +14527,8 @@ const mn = () => {
14494
14527
  &:active {
14495
14528
  transform: scale(0.95);
14496
14529
  }
14497
- `, Qb = () => {
14498
- const { sendMessage: u, isTyping: o, config: s, theme: r, assistant: d } = mn(), [g, v] = R.useState(""), _ = s.placeholder || d?.chatUiConfig?.placeholder || "Type a message...", { isRecording: x, isSupported: p, transcript: z, toggleRecording: O, clearTranscript: j } = jb({
14530
+ `, Vb = () => {
14531
+ const { sendMessage: u, isTyping: o, config: s, theme: r, assistant: d } = mn(), [g, v] = R.useState(""), _ = s.placeholder || d?.chatUiConfig?.placeholder || "Type a message...", { isRecording: x, isSupported: p, transcript: z, toggleRecording: O, clearTranscript: j } = Gb({
14499
14532
  onError: ($) => {
14500
14533
  console.error("Voice recording error:", $);
14501
14534
  }
@@ -14513,9 +14546,9 @@ const mn = () => {
14513
14546
  ), q = R.useCallback(() => {
14514
14547
  O();
14515
14548
  }, [O]), J = o || !g.trim();
14516
- return /* @__PURE__ */ K.jsxs(Yb, { theme: r, children: [
14517
- /* @__PURE__ */ K.jsx(
14518
- Gb,
14549
+ return /* @__PURE__ */ k.jsxs($b, { theme: r, children: [
14550
+ /* @__PURE__ */ k.jsx(
14551
+ Xb,
14519
14552
  {
14520
14553
  theme: r,
14521
14554
  type: "text",
@@ -14527,29 +14560,29 @@ const mn = () => {
14527
14560
  "aria-label": "Message input"
14528
14561
  }
14529
14562
  ),
14530
- p && /* @__PURE__ */ K.jsx(
14531
- Lb,
14563
+ p && /* @__PURE__ */ k.jsx(
14564
+ Zb,
14532
14565
  {
14533
14566
  theme: r,
14534
14567
  onClick: q,
14535
14568
  isRecording: x,
14536
14569
  "aria-label": x ? "Stop recording" : "Start voice recording",
14537
14570
  title: x ? "Stop recording" : "Start voice recording",
14538
- children: /* @__PURE__ */ K.jsx(Sp, { size: 18 })
14571
+ children: /* @__PURE__ */ k.jsx(Sp, { size: 18 })
14539
14572
  }
14540
14573
  ),
14541
- /* @__PURE__ */ K.jsx(
14542
- $b,
14574
+ /* @__PURE__ */ k.jsx(
14575
+ Lb,
14543
14576
  {
14544
14577
  theme: r,
14545
14578
  onClick: V,
14546
14579
  disabled: J,
14547
14580
  "aria-label": "Send message",
14548
- children: /* @__PURE__ */ K.jsx(zp, { size: 18 })
14581
+ children: /* @__PURE__ */ k.jsx(zp, { size: 18 })
14549
14582
  }
14550
14583
  )
14551
14584
  ] });
14552
- }, Zb = gn`
14585
+ }, kb = gn`
14553
14586
  from {
14554
14587
  opacity: 0;
14555
14588
  transform: translateY(20px) scale(0.95);
@@ -14558,7 +14591,7 @@ const mn = () => {
14558
14591
  opacity: 1;
14559
14592
  transform: translateY(0) scale(1);
14560
14593
  }
14561
- `, Vb = gn`
14594
+ `, Kb = gn`
14562
14595
  from {
14563
14596
  opacity: 1;
14564
14597
  transform: translateY(0) scale(1);
@@ -14567,7 +14600,7 @@ const mn = () => {
14567
14600
  opacity: 0;
14568
14601
  transform: translateY(20px) scale(0.95);
14569
14602
  }
14570
- `, kb = St.div`
14603
+ `, Jb = bt.div`
14571
14604
  position: ${({ floatingMode: u }) => u ? "fixed" : "relative"};
14572
14605
  ${({ floatingMode: u, position: o }) => u && `
14573
14606
  bottom: 20px;
@@ -14579,7 +14612,7 @@ const mn = () => {
14579
14612
  `}
14580
14613
  z-index: ${({ floatingMode: u }) => u ? "999999" : "auto"};
14581
14614
  font-family: system-ui, -apple-system, sans-serif;
14582
- `, Kb = St.button`
14615
+ `, Wb = bt.button`
14583
14616
  display: ${({ isOpen: u }) => u ? "none" : "flex"};
14584
14617
  align-items: center;
14585
14618
  justify-content: center;
@@ -14603,11 +14636,11 @@ const mn = () => {
14603
14636
  &:active {
14604
14637
  transform: scale(0.95);
14605
14638
  }
14606
- `, Jb = St.img`
14639
+ `, Fb = bt.img`
14607
14640
  width: 100%;
14608
14641
  height: 100%;
14609
14642
  object-fit: contain;
14610
- `, Wb = St.div`
14643
+ `, Ib = bt.div`
14611
14644
  display: ${({ floatingMode: u, isOpen: o, isClosing: s }) => u ? o || s ? "flex" : "none" : "flex"};
14612
14645
  flex-direction: column;
14613
14646
  width: ${({ floatingMode: u }) => u ? "380px" : "100%"};
@@ -14617,7 +14650,7 @@ const mn = () => {
14617
14650
  border-radius: ${({ theme: u, floatingMode: o }) => o ? u.borderRadius : "0"};
14618
14651
  box-shadow: ${({ theme: u, floatingMode: o }) => o ? u.shadow : "none"};
14619
14652
  overflow: hidden;
14620
- animation: ${({ floatingMode: u, isClosing: o }) => u ? o ? L`${Vb} 0.2s ease-out forwards` : L`${Zb} 0.3s ease-out` : "none"};
14653
+ animation: ${({ floatingMode: u, isClosing: o }) => u ? o ? L`${Kb} 0.2s ease-out forwards` : L`${kb} 0.3s ease-out` : "none"};
14621
14654
 
14622
14655
  @media (prefers-reduced-motion: reduce) {
14623
14656
  animation: none;
@@ -14630,7 +14663,7 @@ const mn = () => {
14630
14663
  max-height: 600px;
14631
14664
  `}
14632
14665
  }
14633
- `, Fb = (u) => L`
14666
+ `, Pb = (u) => L`
14634
14667
  .chatbot-widget-container {
14635
14668
  all: initial;
14636
14669
  font-family: ${u.fontFamily};
@@ -14649,19 +14682,19 @@ const mn = () => {
14649
14682
  font-family: inherit;
14650
14683
  }
14651
14684
  }
14652
- `, Ib = () => {
14685
+ `, t1 = () => {
14653
14686
  const { isOpen: u, toggle: o, config: s, theme: r, assistant: d } = mn(), g = s.floatingMode ?? !1, v = s.fabIcon || d?.chatUiConfig?.fabIcon;
14654
- return /* @__PURE__ */ K.jsxs(K.Fragment, { children: [
14655
- /* @__PURE__ */ K.jsx(Bg, { styles: Fb(r) }),
14656
- /* @__PURE__ */ K.jsxs(
14657
- kb,
14687
+ return /* @__PURE__ */ k.jsxs(k.Fragment, { children: [
14688
+ /* @__PURE__ */ k.jsx(Bg, { styles: Pb(r) }),
14689
+ /* @__PURE__ */ k.jsxs(
14690
+ Jb,
14658
14691
  {
14659
14692
  className: "chatbot-widget-container",
14660
14693
  position: s.position || "bottom-right",
14661
14694
  floatingMode: g,
14662
14695
  children: [
14663
- g && /* @__PURE__ */ K.jsx(
14664
- Kb,
14696
+ g && /* @__PURE__ */ k.jsx(
14697
+ Wb,
14665
14698
  {
14666
14699
  theme: r,
14667
14700
  isOpen: u,
@@ -14669,14 +14702,14 @@ const mn = () => {
14669
14702
  onClick: o,
14670
14703
  "aria-label": "Open chat",
14671
14704
  "aria-expanded": u,
14672
- children: v ? /* @__PURE__ */ K.jsx(Jb, { src: v, alt: "Chat" }) : /* @__PURE__ */ K.jsx(bp, { size: 24 })
14705
+ children: v ? /* @__PURE__ */ k.jsx(Fb, { src: v, alt: "Chat" }) : /* @__PURE__ */ k.jsx(bp, { size: 24 })
14673
14706
  }
14674
14707
  ),
14675
- /* @__PURE__ */ K.jsxs(Wb, { theme: r, isOpen: u, isClosing: !1, floatingMode: g, children: [
14676
- /* @__PURE__ */ K.jsx(yb, {}),
14677
- /* @__PURE__ */ K.jsx(vb, {}),
14678
- /* @__PURE__ */ K.jsx(qb, {}),
14679
- /* @__PURE__ */ K.jsx(Qb, {})
14708
+ /* @__PURE__ */ k.jsxs(Ib, { theme: r, isOpen: u, isClosing: !1, floatingMode: g, children: [
14709
+ /* @__PURE__ */ k.jsx(yb, {}),
14710
+ /* @__PURE__ */ k.jsx(vb, {}),
14711
+ /* @__PURE__ */ k.jsx(Yb, {}),
14712
+ /* @__PURE__ */ k.jsx(Vb, {})
14680
14713
  ] })
14681
14714
  ]
14682
14715
  }
@@ -14711,15 +14744,15 @@ const $e = {
14711
14744
  updateConfig: (u) => {
14712
14745
  console.warn("ChatbotWidget: Widget not initialized. Call init() first.");
14713
14746
  }
14714
- }, Pb = ({
14747
+ }, e1 = ({
14715
14748
  config: u,
14716
14749
  onMount: o
14717
14750
  }) => {
14718
14751
  const s = R.useRef(null), r = R.useCallback((d) => {
14719
14752
  s.current = d;
14720
14753
  }, []);
14721
- return /* @__PURE__ */ K.jsx(Pp, { config: u, onConfigUpdate: r, children: /* @__PURE__ */ K.jsx(t1, { onMount: o, updateConfigRef: s }) });
14722
- }, t1 = ({
14754
+ return /* @__PURE__ */ k.jsx(Pp, { config: u, onConfigUpdate: r, children: /* @__PURE__ */ k.jsx(l1, { onMount: o, updateConfigRef: s }) });
14755
+ }, l1 = ({
14723
14756
  onMount: u,
14724
14757
  updateConfigRef: o
14725
14758
  }) => {
@@ -14733,8 +14766,8 @@ const $e = {
14733
14766
  o.current?.(g);
14734
14767
  }
14735
14768
  });
14736
- }, [s, r, d, u, o]), /* @__PURE__ */ K.jsx(Ib, {});
14737
- }, e1 = {
14769
+ }, [s, r, d, u, o]), /* @__PURE__ */ k.jsx(t1, {});
14770
+ }, a1 = {
14738
14771
  init: (u) => {
14739
14772
  if (rn) {
14740
14773
  console.warn("ChatbotWidget: Already initialized. Call destroy() first to reinitialize.");
@@ -14758,8 +14791,8 @@ const $e = {
14758
14791
  } else
14759
14792
  Pe = document.createElement("div"), Pe.id = "chatbot-widget-root", document.body.appendChild(Pe), qu = !1;
14760
14793
  rn = bg.createRoot(Pe), rn.render(
14761
- /* @__PURE__ */ K.jsx(
14762
- Pb,
14794
+ /* @__PURE__ */ k.jsx(
14795
+ e1,
14763
14796
  {
14764
14797
  config: o,
14765
14798
  onMount: (s) => {
@@ -14785,9 +14818,9 @@ const $e = {
14785
14818
  toggle: () => $e.toggle(),
14786
14819
  update: (u) => $e.updateConfig(u)
14787
14820
  };
14788
- window.ChatbotWidget = e1;
14821
+ window.ChatbotWidget = a1;
14789
14822
  let Fl = null, tl = null, fn = null, ju = !1;
14790
- const l1 = {
14823
+ const n1 = {
14791
14824
  init: (u) => {
14792
14825
  if (Fl) {
14793
14826
  console.warn("ChatbotWidgetDemo: Already initialized. Call destroy() first to reinitialize.");
@@ -14802,7 +14835,7 @@ const l1 = {
14802
14835
  tl = o, ju = !0;
14803
14836
  } else
14804
14837
  tl = document.createElement("div"), tl.id = "chatbot-demo-root", document.body.appendChild(tl), ju = !1;
14805
- fn = u, Fl = bg.createRoot(tl), Fl.render(/* @__PURE__ */ K.jsx(sg, { config: u })), console.log("ChatbotWidgetDemo: Initialized successfully.");
14838
+ fn = u, Fl = bg.createRoot(tl), Fl.render(/* @__PURE__ */ k.jsx(sg, { config: u })), console.log("ChatbotWidgetDemo: Initialized successfully.");
14806
14839
  },
14807
14840
  destroy: () => {
14808
14841
  Fl && (Fl.unmount(), Fl = null), window.ChatbotWidget && window.ChatbotWidget.destroy(), tl && !ju && tl.parentNode && tl.parentNode.removeChild(tl), tl = null, ju = !1, fn = null, console.log("ChatbotWidgetDemo: Destroyed successfully.");
@@ -14812,11 +14845,11 @@ const l1 = {
14812
14845
  console.warn("ChatbotWidgetDemo: Not initialized. Call init() first.");
14813
14846
  return;
14814
14847
  }
14815
- fn = { ...fn, ...u }, Fl.render(/* @__PURE__ */ K.jsx(sg, { config: fn }));
14848
+ fn = { ...fn, ...u }, Fl.render(/* @__PURE__ */ k.jsx(sg, { config: fn }));
14816
14849
  },
14817
14850
  getConfig: () => window.ChatbotWidget ? {} : (console.warn("ChatbotWidgetDemo: Widget not available."), {})
14818
14851
  };
14819
- window.ChatbotWidgetDemo = l1;
14852
+ window.ChatbotWidgetDemo = n1;
14820
14853
  export {
14821
- l1 as default
14854
+ n1 as default
14822
14855
  };