@cimulate/copilot-widget 1.24.1 → 1.24.3

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.
@@ -5363,23 +5363,23 @@ Et.getAdapter = r_.getAdapter;
5363
5363
  Et.HttpStatusCode = Bh;
5364
5364
  Et.default = Et;
5365
5365
  const {
5366
- Axios: r7,
5367
- AxiosError: i7,
5368
- CanceledError: s7,
5369
- isCancel: o7,
5370
- CancelToken: a7,
5371
- VERSION: u7,
5372
- all: l7,
5373
- Cancel: c7,
5374
- isAxiosError: d7,
5375
- spread: f7,
5376
- toFormData: h7,
5377
- AxiosHeaders: p7,
5378
- HttpStatusCode: m7,
5379
- formToJSON: g7,
5380
- getAdapter: E7,
5381
- mergeConfig: y7,
5382
- create: T7
5366
+ Axios: s7,
5367
+ AxiosError: o7,
5368
+ CanceledError: a7,
5369
+ isCancel: u7,
5370
+ CancelToken: l7,
5371
+ VERSION: c7,
5372
+ all: d7,
5373
+ Cancel: f7,
5374
+ isAxiosError: h7,
5375
+ spread: p7,
5376
+ toFormData: m7,
5377
+ AxiosHeaders: g7,
5378
+ HttpStatusCode: E7,
5379
+ formToJSON: y7,
5380
+ getAdapter: T7,
5381
+ mergeConfig: _7,
5382
+ create: b7
5383
5383
  } = Et;
5384
5384
  class $N {
5385
5385
  constructor(t, n, r, s = !1, a, u) {
@@ -30652,7 +30652,7 @@ _o()([
30652
30652
  "portalled",
30653
30653
  "positioning"
30654
30654
  ]);
30655
- const [_7, qc] = cs({
30655
+ const [S7, qc] = cs({
30656
30656
  name: "EnvironmentContext",
30657
30657
  hookName: "useEnvironmentContext",
30658
30658
  providerName: "<EnvironmentProvider />",
@@ -30662,7 +30662,7 @@ const [_7, qc] = cs({
30662
30662
  getDocument: () => document,
30663
30663
  getWindow: () => window
30664
30664
  }
30665
- }), [b7, w0] = cs({
30665
+ }), [x7, w0] = cs({
30666
30666
  name: "LocaleContext",
30667
30667
  hookName: "useLocaleContext",
30668
30668
  providerName: "<LocaleProvider />",
@@ -35562,7 +35562,24 @@ const rB = ({
35562
35562
  ] }),
35563
35563
  /* @__PURE__ */ b.jsx("p", { className: F(t, `${P}-cart-footer`), children: R || "Shipping and taxes calculated at checkout." })
35564
35564
  ] });
35565
- }, EB = ({
35565
+ }, EB = ({ image: e, alt: t, globalClassName: n }) => {
35566
+ const [r, s] = j.useState(e.src), [a, u] = j.useState(!1), l = () => {
35567
+ e.fallbackSrc && r !== e.fallbackSrc && s(e.fallbackSrc);
35568
+ };
35569
+ return /* @__PURE__ */ b.jsx(
35570
+ "img",
35571
+ {
35572
+ className: F(n, `${P}-pdp-gallery__image`, {
35573
+ [`${P}-pdp-gallery__image--loaded`]: a
35574
+ }),
35575
+ src: r,
35576
+ alt: t,
35577
+ loading: "lazy",
35578
+ onLoad: () => u(!0),
35579
+ onError: l
35580
+ }
35581
+ );
35582
+ }, yB = ({
35566
35583
  images: e,
35567
35584
  altText: t,
35568
35585
  globalClassName: n
@@ -35589,16 +35606,15 @@ const rB = ({
35589
35606
  index: a,
35590
35607
  className: F(n, `${P}-pdp-gallery__item`),
35591
35608
  children: /* @__PURE__ */ b.jsx(
35592
- "img",
35609
+ EB,
35593
35610
  {
35594
- className: F(n, `${P}-pdp-gallery__image`),
35595
- src: s,
35611
+ image: s,
35596
35612
  alt: t ? `${t} (${a + 1})` : `Product image ${a + 1}`,
35597
- loading: "lazy"
35613
+ globalClassName: n
35598
35614
  }
35599
35615
  )
35600
35616
  },
35601
- s
35617
+ s.src
35602
35618
  ))
35603
35619
  }
35604
35620
  ),
@@ -35644,11 +35660,14 @@ const rB = ({
35644
35660
  ]
35645
35661
  }
35646
35662
  );
35647
- }, Sa = "color", _p = (e, t) => /^https?:\/\//i.test(t) || !e ? t : `${e}${t}`, TT = (e) => e.replace(/(^|\/)large\//, "$1medium/"), US = (e, t) => !e.vattr || !t ? !1 : e.vattr.some((n) => n.id === Sa && n.vals.includes(t)), yB = (e, t) => {
35663
+ }, Sa = "color", _p = (e, t) => /^https?:\/\//i.test(t) || !e ? t : `${e}${t}`, TB = (e) => e.replace(/(^|\/)large\//, "$1medium/"), US = (e, t) => !e.vattr || !t ? !1 : e.vattr.some((n) => n.id === Sa && n.vals.includes(t)), TT = (e, t) => {
35664
+ const n = TB(t), r = _p(e, n);
35665
+ return n === t ? { src: r } : { src: r, fallbackSrc: _p(e, t) };
35666
+ }, _B = (e, t) => {
35648
35667
  var l, d;
35649
- const n = ((l = e.imgGroups) != null ? l : []).filter((f) => f.viewType === "large"), r = t && n.find((f) => US(f, t)), s = n.find((f) => f.vattr === null), a = r || s || n[0], u = ((d = a == null ? void 0 : a.imgs) != null ? d : []).map((f) => _p(e.baseUrl, TT(f.url)));
35650
- return u.length > 0 ? u : e.imageUrl ? [_p(e.baseUrl, TT(e.imageUrl))] : [];
35651
- }, TB = (e, t) => {
35668
+ const n = ((l = e.imgGroups) != null ? l : []).filter((f) => f.viewType === "large"), r = t && n.find((f) => US(f, t)), s = n.find((f) => f.vattr === null), a = r || s || n[0], u = ((d = a == null ? void 0 : a.imgs) != null ? d : []).map((f) => TT(e.baseUrl, f.url));
35669
+ return u.length > 0 ? u : e.imageUrl ? [TT(e.baseUrl, e.imageUrl)] : [];
35670
+ }, bB = (e, t) => {
35652
35671
  var s, a, u;
35653
35672
  const n = ((s = e.imgGroups) != null ? s : []).find(
35654
35673
  (l) => l.viewType === "swatch" && US(l, t)
@@ -35662,7 +35681,7 @@ const rB = ({
35662
35681
  return u === t || ((d = s.vars) == null ? void 0 : d[u]) === l;
35663
35682
  }
35664
35683
  );
35665
- }), _B = (e, t) => {
35684
+ }), SB = (e, t) => {
35666
35685
  const n = Object.keys(t);
35667
35686
  return n.length === 0 ? !0 : !e || e.length === 0 ? !1 : e.some(
35668
35687
  (r) => r.ord !== !1 && n.every((s) => {
@@ -35670,7 +35689,7 @@ const rB = ({
35670
35689
  return ((a = r.vars) == null ? void 0 : a[s]) === t[s];
35671
35690
  })
35672
35691
  );
35673
- }, bB = (e, t, n, r, s) => {
35692
+ }, xB = (e, t, n, r, s) => {
35674
35693
  if (!e || e.length === 0)
35675
35694
  return oe(U({}, s), { [n]: r });
35676
35695
  const a = e.find(
@@ -35693,7 +35712,7 @@ const rB = ({
35693
35712
  }
35694
35713
  );
35695
35714
  return u ? U({}, u.vars) : oe(U({}, s), { [n]: r });
35696
- }, SB = (e, t) => {
35715
+ }, vB = (e, t) => {
35697
35716
  var s, a, u, l;
35698
35717
  if (!(Array.isArray(e.vattr) && e.vattr.length > 0))
35699
35718
  return (s = e.id) != null ? s : null;
@@ -35706,7 +35725,7 @@ const rB = ({
35706
35725
  })
35707
35726
  );
35708
35727
  return (l = (u = r == null ? void 0 : r.pid) != null ? u : e.id) != null ? l : null;
35709
- }, xB = (e, t) => {
35728
+ }, AB = (e, t) => {
35710
35729
  if (!e.vmat || e.vmat.length === 0 || Object.keys(t).length === 0)
35711
35730
  return e.pr;
35712
35731
  const n = e.vmat.find(
@@ -35716,7 +35735,7 @@ const rB = ({
35716
35735
  })
35717
35736
  );
35718
35737
  return n != null && n.pr ? n.pr : e.pr;
35719
- }, vB = (e) => {
35738
+ }, wB = (e) => {
35720
35739
  var n;
35721
35740
  const t = {};
35722
35741
  for (const r of (n = e.vattr) != null ? n : []) {
@@ -35724,7 +35743,7 @@ const rB = ({
35724
35743
  a && (t[r.id] = a.val);
35725
35744
  }
35726
35745
  return t;
35727
- }, AB = ({
35746
+ }, NB = ({
35728
35747
  product: e,
35729
35748
  globalClassName: t,
35730
35749
  openLinksInNewTab: n,
@@ -35732,18 +35751,18 @@ const rB = ({
35732
35751
  }) => {
35733
35752
  var ce, ae, be, ue, $, Z, x;
35734
35753
  const { addToCart: s, loading: a } = pn(), u = e.data, l = (ce = u.vattr) != null ? ce : [], [d, f] = j.useState(
35735
- () => vB(u)
35736
- ), p = _B(u.vmat, d), m = (be = (ae = u.quantity) == null ? void 0 : ae.minQuantity) != null ? be : 1, T = ($ = (ue = u.quantity) == null ? void 0 : ue.maxQuantity) != null ? $ : Number.POSITIVE_INFINITY, y = (x = (Z = u.quantity) == null ? void 0 : Z.increment) != null ? x : 1, [S, N] = j.useState(m), w = d[Sa], A = j.useMemo(() => yB(u, w), [u, w]), C = j.useMemo(
35737
- () => xB(u, d),
35754
+ () => wB(u)
35755
+ ), p = SB(u.vmat, d), m = (be = (ae = u.quantity) == null ? void 0 : ae.minQuantity) != null ? be : 1, T = ($ = (ue = u.quantity) == null ? void 0 : ue.maxQuantity) != null ? $ : Number.POSITIVE_INFINITY, y = (x = (Z = u.quantity) == null ? void 0 : Z.increment) != null ? x : 1, [S, N] = j.useState(m), w = d[Sa], A = j.useMemo(() => _B(u, w), [u, w]), C = j.useMemo(
35756
+ () => AB(u, d),
35738
35757
  [u, d]
35739
35758
  ), R = l.find((O) => O.id === Sa), z = l.filter((O) => O.id !== Sa), G = (O, q) => () => {
35740
35759
  f((k) => {
35741
35760
  const pe = !ql(u.vmat, O, q, k);
35742
- return O === Sa || pe ? bB(u.vmat, l, O, q, k) : oe(U({}, k), { [O]: q });
35761
+ return O === Sa || pe ? xB(u.vmat, l, O, q, k) : oe(U({}, k), { [O]: q });
35743
35762
  });
35744
35763
  }, D = () => {
35745
35764
  if (a) return;
35746
- const O = SB(u, d);
35765
+ const O = vB(u, d);
35747
35766
  if (!O) return;
35748
35767
  const q = l.map((k) => {
35749
35768
  const pe = k.opts.find((Oe) => Oe.val === d[k.id]);
@@ -35833,7 +35852,7 @@ const rB = ({
35833
35852
  "aria-labelledby": `variant-label-${O.id}`,
35834
35853
  className: F(t, `${P}-msg-pdp__swatches`),
35835
35854
  children: O.opts.map((q) => {
35836
- const k = ql(u.vmat, O.id, q.val, d), pe = d[O.id] === q.val, Oe = TB(u, q.val);
35855
+ const k = ql(u.vmat, O.id, q.val, d), pe = d[O.id] === q.val, Oe = bB(u, q.val);
35837
35856
  return Oe ? /* @__PURE__ */ b.jsxs(
35838
35857
  "label",
35839
35858
  {
@@ -35898,7 +35917,7 @@ const rB = ({
35898
35917
  ] });
35899
35918
  return /* @__PURE__ */ b.jsx("div", { className: F(t, `${P}-msg-pdp`), children: /* @__PURE__ */ b.jsxs("div", { className: F(t, `${P}-msg-pdp__card`), children: [
35900
35919
  /* @__PURE__ */ b.jsx("div", { className: F(t, `${P}-msg-pdp__gallery`), children: /* @__PURE__ */ b.jsx(
35901
- EB,
35920
+ yB,
35902
35921
  {
35903
35922
  images: A,
35904
35923
  altText: u.name,
@@ -35998,10 +36017,10 @@ const rB = ({
35998
36017
  ) })
35999
36018
  ] })
36000
36019
  ] }) });
36001
- }, wB = (e) => {
36020
+ }, CB = (e) => {
36002
36021
  if (e.imageUrl)
36003
36022
  return e.baseUrl ? e.baseUrl + e.imageUrl : e.imageUrl;
36004
- }, NB = ({
36023
+ }, OB = ({
36005
36024
  products: e,
36006
36025
  table: t,
36007
36026
  globalClassName: n,
@@ -36023,7 +36042,7 @@ const rB = ({
36023
36042
  /* @__PURE__ */ b.jsx("div", { className: `${P}-product-comparison__header-spacer` }),
36024
36043
  e.map((p) => {
36025
36044
  var T, y, S, N;
36026
- const m = wB(p);
36045
+ const m = CB(p);
36027
36046
  return /* @__PURE__ */ b.jsxs(
36028
36047
  "div",
36029
36048
  {
@@ -36180,7 +36199,7 @@ const rB = ({
36180
36199
  );
36181
36200
  case "product_tile":
36182
36201
  return /* @__PURE__ */ b.jsx(
36183
- AB,
36202
+ NB,
36184
36203
  {
36185
36204
  product: T.data,
36186
36205
  globalClassName: t,
@@ -36192,7 +36211,7 @@ const rB = ({
36192
36211
  );
36193
36212
  case "product_comparison":
36194
36213
  return /* @__PURE__ */ b.jsx(
36195
- NB,
36214
+ OB,
36196
36215
  {
36197
36216
  products: (se = (J = T.data) == null ? void 0 : J.products) != null ? se : [],
36198
36217
  table: (V = (he = T.data) == null ? void 0 : he.table) != null ? V : [],
@@ -36268,7 +36287,7 @@ const rB = ({
36268
36287
  return null;
36269
36288
  }
36270
36289
  }) });
36271
- }, CB = ({
36290
+ }, kB = ({
36272
36291
  message: e,
36273
36292
  globalClassName: t,
36274
36293
  openLinksInNewTab: n,
@@ -36406,7 +36425,7 @@ const rB = ({
36406
36425
  }
36407
36426
  );
36408
36427
  }
36409
- }, OB = ({
36428
+ }, IB = ({
36410
36429
  message: e,
36411
36430
  onRetry: t,
36412
36431
  globalClassName: n,
@@ -36436,7 +36455,7 @@ const rB = ({
36436
36455
  )
36437
36456
  ]
36438
36457
  }
36439
- ), kB = "You are offline or we couldn't reach the assistant. Check connection and try again.", V0 = ({ isWidgetStandalone: e }) => {
36458
+ ), PB = "You are offline or we couldn't reach the assistant. Check connection and try again.", V0 = ({ isWidgetStandalone: e }) => {
36440
36459
  var se, he;
36441
36460
  const { globalClassName: t, openLinksInNewTab: n, logger: r, autoScroll: s } = nt(), {
36442
36461
  messages: a,
@@ -36452,7 +36471,7 @@ const rB = ({
36452
36471
  } = pn(), N = j.useRef(null), w = a.length > 0, A = u.some(WN), C = w && (d || l) && !A, R = p === "reconnecting" && !C, z = p === "error";
36453
36472
  let G = null;
36454
36473
  z ? G = {
36455
- message: m != null ? m : kB,
36474
+ message: m != null ? m : PB,
36456
36475
  kind: "connection",
36457
36476
  onRetry: S
36458
36477
  } : T && (G = { message: T.message, kind: "send", onRetry: y }), j.useEffect(() => {
@@ -36477,7 +36496,7 @@ const rB = ({
36477
36496
  }
36478
36497
  ),
36479
36498
  a.map((V) => /* @__PURE__ */ b.jsx(
36480
- CB,
36499
+ kB,
36481
36500
  {
36482
36501
  message: V,
36483
36502
  globalClassName: t,
@@ -36487,7 +36506,7 @@ const rB = ({
36487
36506
  V.id
36488
36507
  )),
36489
36508
  G && /* @__PURE__ */ b.jsx(
36490
- OB,
36509
+ IB,
36491
36510
  {
36492
36511
  message: G.message,
36493
36512
  onRetry: G.onRetry,
@@ -36541,7 +36560,7 @@ const rB = ({
36541
36560
  ),
36542
36561
  /* @__PURE__ */ b.jsx("div", { ref: N })
36543
36562
  ] });
36544
- }, IB = () => /* @__PURE__ */ b.jsxs(
36563
+ }, RB = () => /* @__PURE__ */ b.jsxs(
36545
36564
  "svg",
36546
36565
  {
36547
36566
  className: `${P}-progress-step-check`,
@@ -36562,7 +36581,7 @@ const rB = ({
36562
36581
  )
36563
36582
  ]
36564
36583
  }
36565
- ), PB = () => /* @__PURE__ */ b.jsx(
36584
+ ), LB = () => /* @__PURE__ */ b.jsx(
36566
36585
  "svg",
36567
36586
  {
36568
36587
  className: `${P}-progress-step-starburst`,
@@ -36612,7 +36631,7 @@ const rB = ({
36612
36631
  `${P}-progress-step-icon`,
36613
36632
  d ? "done" : "active"
36614
36633
  ),
36615
- children: d ? /* @__PURE__ */ b.jsx(IB, {}) : /* @__PURE__ */ b.jsx(PB, {})
36634
+ children: d ? /* @__PURE__ */ b.jsx(RB, {}) : /* @__PURE__ */ b.jsx(LB, {})
36616
36635
  }
36617
36636
  )
36618
36637
  ]
@@ -36621,7 +36640,7 @@ const rB = ({
36621
36640
  );
36622
36641
  }) })
36623
36642
  ] }) });
36624
- }, RB = () => {
36643
+ }, DB = () => {
36625
36644
  const { globalClassName: e, themeVariables: t, messageAlignment: n, enableDownloadTranscript: r } = nt(), { isAgentTyping: s, sendMessage: a, resetConversation: u, progressSteps: l, downloadTranscript: d } = pn(), f = s;
36626
36645
  return /* @__PURE__ */ b.jsxs(
36627
36646
  "div",
@@ -36672,7 +36691,7 @@ const rB = ({
36672
36691
  }, jS = (e) => {
36673
36692
  var d;
36674
36693
  const { children: t, disabled: n } = e, [r, s] = j.useState((d = e.container) == null ? void 0 : d.current), a = j.useSyncExternalStore(
36675
- DB,
36694
+ FB,
36676
36695
  () => !1,
36677
36696
  () => !0
36678
36697
  ), { getRootNode: u } = qc();
@@ -36682,13 +36701,13 @@ const rB = ({
36682
36701
  return (f = e.container) == null ? void 0 : f.current;
36683
36702
  });
36684
36703
  }, [e.container]), a || n) return /* @__PURE__ */ b.jsx(b.Fragment, { children: t });
36685
- const l = r != null ? r : LB(u);
36704
+ const l = r != null ? r : MB(u);
36686
36705
  return /* @__PURE__ */ b.jsx(b.Fragment, { children: j.Children.map(t, (f) => lo.createPortal(f, l)) });
36687
- }, LB = (e) => {
36706
+ }, MB = (e) => {
36688
36707
  const t = e == null ? void 0 : e(), n = t.getRootNode();
36689
36708
  return os(n) ? n : br(t).body;
36690
- }, DB = () => () => {
36691
- }, MB = () => {
36709
+ }, FB = () => () => {
36710
+ }, BB = () => {
36692
36711
  const { globalClassName: e, themeVariables: t, messageAlignment: n } = nt(), { mode: r, status: s, dialogPosition: a, isDialogFullHeight: u, dialogWidth: l } = bi(), {
36693
36712
  loading: d,
36694
36713
  isAgentTyping: f,
@@ -36767,7 +36786,7 @@ const rB = ({
36767
36786
  ) })
36768
36787
  }
36769
36788
  ) : null;
36770
- }, FB = () => {
36789
+ }, UB = () => {
36771
36790
  const { globalClassName: e, themeVariables: t, messageAlignment: n } = nt(), { mode: r, status: s, isModalFullscreen: a } = bi(), {
36772
36791
  loading: u,
36773
36792
  isAgentTyping: l,
@@ -36854,12 +36873,12 @@ const rB = ({
36854
36873
  ]
36855
36874
  }
36856
36875
  ) }) }) : null;
36857
- }, BB = () => {
36876
+ }, HB = () => {
36858
36877
  const e = bi(), {
36859
36878
  status: { type: t, isMinimized: n }
36860
36879
  } = e || { status: {} };
36861
- return n ? /* @__PURE__ */ b.jsx(lO, {}) : t === "dialog" ? /* @__PURE__ */ b.jsx(MB, {}) : t === "modal" ? /* @__PURE__ */ b.jsx(FB, {}) : /* @__PURE__ */ b.jsx(RB, {});
36862
- }, UB = () => {
36880
+ return n ? /* @__PURE__ */ b.jsx(lO, {}) : t === "dialog" ? /* @__PURE__ */ b.jsx(BB, {}) : t === "modal" ? /* @__PURE__ */ b.jsx(UB, {}) : /* @__PURE__ */ b.jsx(DB, {});
36881
+ }, jB = () => {
36863
36882
  const { setIsOpen: e, setIsInline: t, setElementId: n, setEntryType: r, setParams: s } = CM();
36864
36883
  j.useEffect(() => {
36865
36884
  const a = (u) => {
@@ -36871,7 +36890,7 @@ const rB = ({
36871
36890
  };
36872
36891
  }, [e, t, n, r, s]);
36873
36892
  };
36874
- function HB({
36893
+ function $B({
36875
36894
  isReady: e,
36876
36895
  hasError: t,
36877
36896
  transmit: n
@@ -36895,7 +36914,7 @@ function HB({
36895
36914
  const $S = {
36896
36915
  copilot: "Ask Copilot",
36897
36916
  messaging: "Ask a question"
36898
- }, jB = ({
36917
+ }, zB = ({
36899
36918
  onSubmit: e,
36900
36919
  disabled: t = !1
36901
36920
  }) => {
@@ -36937,7 +36956,7 @@ const $S = {
36937
36956
  ]
36938
36957
  }
36939
36958
  );
36940
- }, $B = () => {
36959
+ }, VB = () => {
36941
36960
  const { globalClassName: e, mode: t } = nt(), { placeholder: n } = U0(), r = n || $S[t];
36942
36961
  return /* @__PURE__ */ b.jsxs("div", { className: F(e, `${P}-prompts-header`), children: [
36943
36962
  /* @__PURE__ */ b.jsx(
@@ -36949,8 +36968,8 @@ const $S = {
36949
36968
  ),
36950
36969
  /* @__PURE__ */ b.jsx("span", { className: F(e, `${P}-prompts-header-text`), children: r })
36951
36970
  ] });
36952
- }, zB = () => {
36953
- const { globalClassName: e, themeVariables: t } = nt(), { isOpen: n, elementId: r, promptsDisplay: s } = U0(), { isConnected: a, sendMessage: u, connectionStatus: l } = pn(), d = s !== "buttons", [f, p] = j.useState(null), m = l === "error", T = l === "connecting", y = HB({
36971
+ }, qB = () => {
36972
+ const { globalClassName: e, themeVariables: t } = nt(), { isOpen: n, elementId: r, promptsDisplay: s } = U0(), { isConnected: a, sendMessage: u, connectionStatus: l } = pn(), d = s !== "buttons", [f, p] = j.useState(null), m = l === "error", T = l === "connecting", y = $B({
36954
36973
  isReady: a,
36955
36974
  hasError: m,
36956
36975
  transmit: u
@@ -36973,8 +36992,8 @@ const $S = {
36973
36992
  className: F(e, `${P}-prompts-extension-container`),
36974
36993
  style: t,
36975
36994
  children: [
36976
- d && /* @__PURE__ */ b.jsx(jB, { onSubmit: S, disabled: m }),
36977
- !d && /* @__PURE__ */ b.jsx($B, {}),
36995
+ d && /* @__PURE__ */ b.jsx(zB, { onSubmit: S, disabled: m }),
36996
+ !d && /* @__PURE__ */ b.jsx(VB, {}),
36978
36997
  !m && T && /* @__PURE__ */ b.jsx("p", { className: F(e, `${P}-prompts-connecting-message`), children: "Connecting to agent..." }),
36979
36998
  m && /* @__PURE__ */ b.jsx("p", { className: F(e, `${P}-prompts-error-message`), children: "Oops, an error occurred with our agent." })
36980
36999
  ]
@@ -36982,22 +37001,22 @@ const $S = {
36982
37001
  ),
36983
37002
  f
36984
37003
  );
36985
- }, VB = () => (UB(), /* @__PURE__ */ b.jsx(zB, {})), qB = (e) => /* @__PURE__ */ b.jsxs(WC, oe(U({}, e), { children: [
36986
- /* @__PURE__ */ b.jsx(BB, {}),
36987
- /* @__PURE__ */ b.jsx(VB, {})
37004
+ }, YB = () => (jB(), /* @__PURE__ */ b.jsx(qB, {})), WB = (e) => /* @__PURE__ */ b.jsxs(WC, oe(U({}, e), { children: [
37005
+ /* @__PURE__ */ b.jsx(HB, {}),
37006
+ /* @__PURE__ */ b.jsx(YB, {})
36988
37007
  ] }));
36989
37008
  var kl = {}, _T;
36990
- function YB() {
37009
+ function GB() {
36991
37010
  if (_T) return kl;
36992
37011
  _T = 1;
36993
37012
  var e = w_();
36994
37013
  return kl.createRoot = e.createRoot, kl.hydrateRoot = e.hydrateRoot, kl;
36995
37014
  }
36996
- var WB = YB();
37015
+ var XB = GB();
36997
37016
  const zS = (e, t, n, r) => {
36998
- WB.createRoot(e).render(
37017
+ XB.createRoot(e).render(
36999
37018
  /* @__PURE__ */ b.jsx(
37000
- qB,
37019
+ WB,
37001
37020
  oe(U({}, t), {
37002
37021
  overridesUrl: n,
37003
37022
  inlineOverrides: r,
@@ -37005,7 +37024,7 @@ const zS = (e, t, n, r) => {
37005
37024
  })
37006
37025
  )
37007
37026
  );
37008
- }, GB = (a) => {
37027
+ }, KB = (a) => {
37009
37028
  var u = a, {
37010
37029
  elementId: e,
37011
37030
  timeout: t = 5e3,
@@ -37034,7 +37053,7 @@ const zS = (e, t, n, r) => {
37034
37053
  `Element with id: ${e} not found within ${t} milliseconds, stopping observation`
37035
37054
  );
37036
37055
  }, t), f;
37037
- }, S7 = (a) => {
37056
+ }, v7 = (a) => {
37038
37057
  var u = a, {
37039
37058
  timeout: e,
37040
37059
  elementId: t,
@@ -37060,12 +37079,12 @@ const zS = (e, t, n, r) => {
37060
37079
  }
37061
37080
  const l = document.getElementById(t);
37062
37081
  if (!l) {
37063
- bt(!0, "warn", "Container element not found for id:", t), bt(!0, "warn", "Beginning observation for element"), GB(U({ elementId: t, timeout: e, overridesUrl: n, inlineOverrides: r }, s));
37082
+ bt(!0, "warn", "Container element not found for id:", t), bt(!0, "warn", "Beginning observation for element"), KB(U({ elementId: t, timeout: e, overridesUrl: n, inlineOverrides: r }, s));
37064
37083
  return;
37065
37084
  }
37066
37085
  zS(l, s, n, r);
37067
37086
  };
37068
- class x7 extends HTMLElement {
37087
+ class A7 extends HTMLElement {
37069
37088
  constructor() {
37070
37089
  super(...arguments);
37071
37090
  He(this, "_props", null);
@@ -37094,7 +37113,7 @@ class x7 extends HTMLElement {
37094
37113
  render() {
37095
37114
  }
37096
37115
  }
37097
- const v7 = {
37116
+ const w7 = {
37098
37117
  components: {
37099
37118
  setEntryType: x_,
37100
37119
  toggleWidgetOpen: Ei,
@@ -37107,15 +37126,15 @@ const v7 = {
37107
37126
  }
37108
37127
  };
37109
37128
  export {
37110
- qB as AgentForceWidget,
37129
+ WB as AgentForceWidget,
37111
37130
  WC as AgentforceWidgetProvider,
37112
37131
  lC as CIMULATE_WIDGET_READY_EVENT,
37113
- MB as MessagingDialog,
37114
- RB as MessagingEmbed,
37115
- FB as MessagingModal,
37132
+ BB as MessagingDialog,
37133
+ DB as MessagingEmbed,
37134
+ UB as MessagingModal,
37116
37135
  mC as MessagingProvider,
37117
- x7 as OverrideElement,
37118
- v7 as eventHandlers,
37119
- S7 as injectMessagingWidget,
37136
+ A7 as OverrideElement,
37137
+ w7 as eventHandlers,
37138
+ v7 as injectMessagingWidget,
37120
37139
  pn as useMessaging
37121
37140
  };