@aintela/chat 0.4.7 → 0.4.9

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.
@@ -377,9 +377,9 @@ const L = /* @__PURE__ */ new Set(), v = class v {
377
377
  const h = l + (p.clientX - a);
378
378
  if (h > 30) {
379
379
  t.style.width = h + "px";
380
- const g = Array.from(t.parentNode.children).indexOf(t), f = e.querySelector("tbody");
381
- f && f.querySelectorAll("tr").forEach((y) => {
382
- const b = y.children[g];
380
+ const f = Array.from(t.parentNode.children).indexOf(t), g = e.querySelector("tbody");
381
+ g && g.querySelectorAll("tr").forEach((y) => {
382
+ const b = y.children[f];
383
383
  b && (b.style.width = h + "px");
384
384
  }), this.updateTableWidth(e);
385
385
  }
@@ -515,14 +515,14 @@ const L = /* @__PURE__ */ new Set(), v = class v {
515
515
  if (s === o)
516
516
  return;
517
517
  const c = a[s], u = a[o];
518
- s < o ? i.insertBefore(c, u.nextSibling) : i.insertBefore(c, u), l.forEach((h, g) => {
519
- const f = Array.from(h.children), m = f[s], y = f[o];
518
+ s < o ? i.insertBefore(c, u.nextSibling) : i.insertBefore(c, u), l.forEach((h, f) => {
519
+ const g = Array.from(h.children), m = g[s], y = g[o];
520
520
  s < o ? h.insertBefore(m, y.nextSibling) : h.insertBefore(m, y);
521
521
  });
522
522
  const p = this.originalColumnOrder.get(e);
523
523
  if (p) {
524
- const h = [...p], g = h[s];
525
- h.splice(s, 1), h.splice(o, 0, g), this.originalColumnOrder.set(e, h);
524
+ const h = [...p], f = h[s];
525
+ h.splice(s, 1), h.splice(o, 0, f), this.originalColumnOrder.set(e, h);
526
526
  }
527
527
  this.applyTableStyles(t), this.refreshDragAndDropListeners(t, e);
528
528
  }
@@ -567,22 +567,22 @@ const L = /* @__PURE__ */ new Set(), v = class v {
567
567
  t.parentElement.clientWidth;
568
568
  const r = [];
569
569
  o.forEach((h) => {
570
- let f = h.textContent.replace(/[📊🔍]/g, "").trim().length * this.charWidth + 15;
571
- r.push(f), i += f;
570
+ let g = h.textContent.replace(/[📊🔍]/g, "").trim().length * this.charWidth + 15;
571
+ r.push(g), i += g;
572
572
  });
573
573
  const a = t.querySelectorAll("tr"), l = ((p = t.parentElement) == null ? void 0 : p.getBoundingClientRect().width) ?? i;
574
574
  var c = 0;
575
575
  for (const h of a)
576
- h.querySelectorAll("td").forEach((f, m) => {
577
- const b = f.textContent.length * this.charWidth + 15;
576
+ h.querySelectorAll("td").forEach((g, m) => {
577
+ const b = g.textContent.length * this.charWidth + 15;
578
578
  b > r[m] && m < r.length && (r[m] = b);
579
579
  });
580
- c = r.reduce((h, g) => h += g, 0), o.forEach((h, g) => {
580
+ c = r.reduce((h, f) => h += f, 0), o.forEach((h, f) => {
581
581
  if (c > l) {
582
- const f = r[g] / c;
583
- h.style.width = `${l * f}px`;
582
+ const g = r[f] / c;
583
+ h.style.width = `${l * g}px`;
584
584
  } else
585
- h.style.width = `${r[g]}px`;
585
+ h.style.width = `${r[f]}px`;
586
586
  });
587
587
  let u = 0;
588
588
  return c > l ? u = "100%" : u = `${Math.max(c, s)}px`, u;
@@ -927,16 +927,16 @@ function Y(n, t, e) {
927
927
  return { next: `${s}${a}${o}`, selectionStart: l, selectionEnd: l, reopenTrigger: !1 };
928
928
  }
929
929
  d(Y, "applyTriggerInsertion");
930
- async function Q(n, { onAtQuery: t, onAtPersonQuery: e }, { personConfidence: s = 0, locationConfidence: o = 0, personFirstThreshold: i = 0.5, vertical: r = "air" } = {}) {
931
- const [a, l] = await Promise.all([
932
- t ? t(n, { vertical: r }).catch(() => []) : Promise.resolve([]),
930
+ async function Q(n, { onAtQuery: t, onAtPersonQuery: e }, { personConfidence: s = 0, locationConfidence: o = 0, personFirstThreshold: i = 0.5, vertical: r = "air", hotelConfidence: a = 0 } = {}) {
931
+ const [l, c] = await Promise.all([
932
+ t ? t(n, { vertical: r, hotelConfidence: a }).catch(() => []) : Promise.resolve([]),
933
933
  e ? e(n).catch(() => []) : Promise.resolve([])
934
934
  ]);
935
935
  if (t && e) {
936
- const c = l.map((h) => ({ ...h, group: "person" })), u = a.map((h) => ({ ...h, group: "location" }));
937
- return s >= i && s >= o ? [...c, ...u] : [...u, ...c];
936
+ const u = c.map((f) => ({ ...f, group: "person" })), p = l.map((f) => ({ ...f, group: "location" }));
937
+ return s >= i && s >= o ? [...u, ...p] : [...p, ...u];
938
938
  }
939
- return [...l, ...a];
939
+ return [...c, ...l];
940
940
  }
941
941
  d(Q, "fetchAtMentions");
942
942
  function tt(n, t) {
@@ -967,4 +967,4 @@ export {
967
967
  z as s,
968
968
  U as t
969
969
  };
970
- //# sourceMappingURL=atMentions-DrCm42jN.js.map
970
+ //# sourceMappingURL=atMentions-BlzXxKB9.js.map