@bcc-code/vue-bcc-chat-ui 7.0.11 → 7.0.12

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.
@@ -1,7 +1,7 @@
1
1
  var Si = Object.defineProperty;
2
2
  var Ii = (e, t, u) => t in e ? Si(e, t, { enumerable: !0, configurable: !0, writable: !0, value: u }) : e[t] = u;
3
3
  var oa = (e, t, u) => Ii(e, typeof t != "symbol" ? t + "" : t, u);
4
- import { ref as U, computed as N, toValue as Fi, shallowRef as ka, isRef as Ri, watch as Qe, provide as Ju, inject as en, onUnmounted as ao, onMounted as ro, nextTick as gu, openBlock as k, createElementBlock as F, createElementVNode as T, onBeforeUnmount as oo, defineComponent as xe, createBlock as te, unref as b, withCtx as je, Fragment as Ve, renderList as pt, resolveDynamicComponent as at, toDisplayString as j, normalizeClass as ke, createVNode as oe, normalizeStyle as Un, withModifiers as Vu, createCommentVNode as ue, withDirectives as In, vModelText as Fn, renderSlot as Xt, createTextVNode as io, Teleport as qi, useAttrs as Oi, mergeProps as Li, createSlots as Pi, normalizeProps as $i, guardReactiveProps as Bi } from "vue";
4
+ import { ref as U, computed as N, toValue as Fi, shallowRef as ka, isRef as Ri, watch as Qe, provide as Ju, inject as en, onUnmounted as ao, onMounted as ro, nextTick as Xt, openBlock as k, createElementBlock as F, createElementVNode as T, onBeforeUnmount as oo, defineComponent as xe, createBlock as te, unref as b, withCtx as je, Fragment as Ve, renderList as pt, resolveDynamicComponent as at, toDisplayString as j, normalizeClass as ke, createVNode as oe, normalizeStyle as Un, withModifiers as Vu, createCommentVNode as ue, withDirectives as In, vModelText as Fn, renderSlot as Jt, createTextVNode as io, Teleport as qi, useAttrs as Oi, mergeProps as Li, createSlots as Pi, normalizeProps as $i, guardReactiveProps as Bi } from "vue";
5
5
  import { BccPopover as Ni, BccButton as rt, BccDialog as Oa, BccInputText as pr, BccTag as vt, BccAvatar as La, BccProgressSpinner as so, BccMessage as Ui } from "@bcc-code/component-library-vue";
6
6
  import { CometChat as Z } from "@cometchat/chat-sdk-javascript";
7
7
  const zi = {
@@ -60,7 +60,7 @@ function ji(e) {
60
60
  function co() {
61
61
  localStorage.removeItem(tn($a));
62
62
  }
63
- function Jt(e) {
63
+ function eu(e) {
64
64
  const t = fo(e);
65
65
  if (!t)
66
66
  return;
@@ -76,7 +76,7 @@ function Jt(e) {
76
76
  }
77
77
  }
78
78
  function Zi(e) {
79
- return Jt(e) ?? e;
79
+ return eu(e) ?? e;
80
80
  }
81
81
  function fo(e) {
82
82
  if (typeof e == "string")
@@ -403,7 +403,7 @@ const {
403
403
  let {
404
404
  freeze: et,
405
405
  seal: mt,
406
- create: cu
406
+ create: du
407
407
  } = Object, {
408
408
  apply: Aa,
409
409
  construct: Da
@@ -424,7 +424,7 @@ Da || (Da = function(t) {
424
424
  n[a - 1] = arguments[a];
425
425
  return new t(...n);
426
426
  });
427
- const Pu = qe(Array.prototype.forEach), ts = qe(Array.prototype.lastIndexOf), vr = qe(Array.prototype.pop), $u = qe(Array.prototype.push), us = qe(Array.prototype.splice), Je = Array.isArray, ju = qe(String.prototype.toLowerCase), ia = qe(String.prototype.toString), xr = qe(String.prototype.match), su = qe(String.prototype.replace), yr = qe(String.prototype.indexOf), ns = qe(String.prototype.trim), as = qe(Number.prototype.toString), rs = qe(Boolean.prototype.toString), _r = typeof BigInt > "u" ? null : qe(BigInt.prototype.toString), Cr = typeof Symbol > "u" ? null : qe(Symbol.prototype.toString), Se = qe(Object.prototype.hasOwnProperty), Bu = qe(Object.prototype.toString), Ge = qe(RegExp.prototype.test), xn = os(TypeError);
427
+ const Pu = qe(Array.prototype.forEach), ts = qe(Array.prototype.lastIndexOf), vr = qe(Array.prototype.pop), $u = qe(Array.prototype.push), us = qe(Array.prototype.splice), Je = Array.isArray, ju = qe(String.prototype.toLowerCase), ia = qe(String.prototype.toString), xr = qe(String.prototype.match), lu = qe(String.prototype.replace), yr = qe(String.prototype.indexOf), ns = qe(String.prototype.trim), as = qe(Number.prototype.toString), rs = qe(Boolean.prototype.toString), _r = typeof BigInt > "u" ? null : qe(BigInt.prototype.toString), Cr = typeof Symbol > "u" ? null : qe(Symbol.prototype.toString), Se = qe(Object.prototype.hasOwnProperty), Bu = qe(Object.prototype.toString), Ge = qe(RegExp.prototype.test), xn = os(TypeError);
428
428
  function qe(e) {
429
429
  return function(t) {
430
430
  t instanceof RegExp && (t.lastIndex = 0);
@@ -461,7 +461,7 @@ function is(e) {
461
461
  return e;
462
462
  }
463
463
  function nt(e) {
464
- const t = cu(null);
464
+ const t = du(null);
465
465
  for (const [u, n] of go(e))
466
466
  Se(e, u) && (Je(n) ? t[u] = is(n) : n && typeof n == "object" && n.constructor === Object ? t[u] = nt(n) : t[u] = n);
467
467
  return t;
@@ -484,7 +484,7 @@ function ss(e) {
484
484
  case "object": {
485
485
  if (e === null)
486
486
  return Bu(e);
487
- const t = e, u = du(t, "toString");
487
+ const t = e, u = fu(t, "toString");
488
488
  if (typeof u == "function") {
489
489
  const n = u(t);
490
490
  return typeof n == "string" ? n : Bu(n);
@@ -495,7 +495,7 @@ function ss(e) {
495
495
  return Bu(e);
496
496
  }
497
497
  }
498
- function du(e, t) {
498
+ function fu(e, t) {
499
499
  for (; e !== null; ) {
500
500
  const n = es(e, t);
501
501
  if (n) {
@@ -597,7 +597,7 @@ function xo() {
597
597
  HTMLFormElement: f,
598
598
  DOMParser: x,
599
599
  trustedTypes: g
600
- } = e, m = s.prototype, w = du(m, "cloneNode"), _ = du(m, "remove"), D = du(m, "nextSibling"), y = du(m, "childNodes"), E = du(m, "parentNode");
600
+ } = e, m = s.prototype, w = fu(m, "cloneNode"), _ = fu(m, "remove"), D = fu(m, "nextSibling"), y = fu(m, "childNodes"), E = fu(m, "parentNode");
601
601
  if (typeof i == "function") {
602
602
  const X = u.createElement("template");
603
603
  X.content && X.content.ownerDocument && (u = X.content.ownerDocument);
@@ -629,7 +629,7 @@ function xo() {
629
629
  const it = le({}, [...Tr, ...sa, ...la, ...ca, ...kr]);
630
630
  let _e = null;
631
631
  const Pe = le({}, [...Mr, ...da, ...wr, ...yn]);
632
- let ce = Object.seal(cu(null, {
632
+ let ce = Object.seal(du(null, {
633
633
  tagNameCheck: {
634
634
  writable: !0,
635
635
  configurable: !1,
@@ -649,7 +649,7 @@ function xo() {
649
649
  value: !1
650
650
  }
651
651
  })), P = null, We = null;
652
- const G = Object.seal(cu(null, {
652
+ const G = Object.seal(du(null, {
653
653
  tagCheck: {
654
654
  writable: !0,
655
655
  configurable: !1,
@@ -663,31 +663,31 @@ function xo() {
663
663
  value: null
664
664
  }
665
665
  }));
666
- let fe = !0, be = !0, ct = !1, he = !0, se = !1, Ce = !0, bt = !1, yu = !1, _u = !1, It = !1, tu = !1, yt = !1, Cu = !0, Gt = !1;
667
- const uu = "user-content-";
666
+ let fe = !0, be = !0, ct = !1, he = !0, se = !1, Ce = !0, bt = !1, yu = !1, _u = !1, It = !1, uu = !1, yt = !1, Cu = !0, Gt = !1;
667
+ const nu = "user-content-";
668
668
  let Ft = !0, Rt = !1, wt = {}, tt = null;
669
669
  const Tu = le({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
670
670
  let sn = null;
671
671
  const Wt = le({}, ["audio", "video", "img", "source", "image", "track"]);
672
672
  let qt = null;
673
- const ln = le({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), nu = "http://www.w3.org/1998/Math/MathML", au = "http://www.w3.org/2000/svg", dt = "http://www.w3.org/1999/xhtml";
673
+ const ln = le({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), au = "http://www.w3.org/1998/Math/MathML", ru = "http://www.w3.org/2000/svg", dt = "http://www.w3.org/1999/xhtml";
674
674
  let Ot = dt, ku = !1, Mu = null;
675
- const Jn = le({}, [nu, au, dt], ia);
675
+ const Jn = le({}, [au, ru, dt], ia);
676
676
  let wu = le({}, ["mi", "mo", "mn", "ms", "mtext"]), Au = le({}, ["annotation-xml"]);
677
677
  const ea = le({}, ["title", "style", "font", "a", "script"]);
678
678
  let Yt = null;
679
679
  const ta = ["application/xhtml+xml", "text/html"], Du = "text/html";
680
680
  let Ie = null, Lt = null;
681
- const ru = u.createElement("form"), cn = function(p) {
681
+ const ou = u.createElement("form"), cn = function(p) {
682
682
  return p instanceof RegExp || p instanceof Function;
683
683
  }, Eu = function() {
684
684
  let p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
685
685
  if (Lt && Lt === p)
686
686
  return;
687
687
  (!p || typeof p != "object") && (p = {}), p = nt(p), Yt = // eslint-disable-next-line unicorn/prefer-includes
688
- ta.indexOf(p.PARSER_MEDIA_TYPE) === -1 ? Du : p.PARSER_MEDIA_TYPE, Ie = Yt === "application/xhtml+xml" ? ia : ju, ve = Se(p, "ALLOWED_TAGS") && Je(p.ALLOWED_TAGS) ? le({}, p.ALLOWED_TAGS, Ie) : it, _e = Se(p, "ALLOWED_ATTR") && Je(p.ALLOWED_ATTR) ? le({}, p.ALLOWED_ATTR, Ie) : Pe, Mu = Se(p, "ALLOWED_NAMESPACES") && Je(p.ALLOWED_NAMESPACES) ? le({}, p.ALLOWED_NAMESPACES, ia) : Jn, qt = Se(p, "ADD_URI_SAFE_ATTR") && Je(p.ADD_URI_SAFE_ATTR) ? le(nt(ln), p.ADD_URI_SAFE_ATTR, Ie) : ln, sn = Se(p, "ADD_DATA_URI_TAGS") && Je(p.ADD_DATA_URI_TAGS) ? le(nt(Wt), p.ADD_DATA_URI_TAGS, Ie) : Wt, tt = Se(p, "FORBID_CONTENTS") && Je(p.FORBID_CONTENTS) ? le({}, p.FORBID_CONTENTS, Ie) : Tu, P = Se(p, "FORBID_TAGS") && Je(p.FORBID_TAGS) ? le({}, p.FORBID_TAGS, Ie) : nt({}), We = Se(p, "FORBID_ATTR") && Je(p.FORBID_ATTR) ? le({}, p.FORBID_ATTR, Ie) : nt({}), wt = Se(p, "USE_PROFILES") ? p.USE_PROFILES && typeof p.USE_PROFILES == "object" ? nt(p.USE_PROFILES) : p.USE_PROFILES : !1, fe = p.ALLOW_ARIA_ATTR !== !1, be = p.ALLOW_DATA_ATTR !== !1, ct = p.ALLOW_UNKNOWN_PROTOCOLS || !1, he = p.ALLOW_SELF_CLOSE_IN_ATTR !== !1, se = p.SAFE_FOR_TEMPLATES || !1, Ce = p.SAFE_FOR_XML !== !1, bt = p.WHOLE_DOCUMENT || !1, It = p.RETURN_DOM || !1, tu = p.RETURN_DOM_FRAGMENT || !1, yt = p.RETURN_TRUSTED_TYPE || !1, _u = p.FORCE_BODY || !1, Cu = p.SANITIZE_DOM !== !1, Gt = p.SANITIZE_NAMED_PROPS || !1, Ft = p.KEEP_CONTENT !== !1, Rt = p.IN_PLACE || !1, Le = ls(p.ALLOWED_URI_REGEXP) ? p.ALLOWED_URI_REGEXP : bo, Ot = typeof p.NAMESPACE == "string" ? p.NAMESPACE : dt, wu = Se(p, "MATHML_TEXT_INTEGRATION_POINTS") && p.MATHML_TEXT_INTEGRATION_POINTS && typeof p.MATHML_TEXT_INTEGRATION_POINTS == "object" ? nt(p.MATHML_TEXT_INTEGRATION_POINTS) : le({}, ["mi", "mo", "mn", "ms", "mtext"]), Au = Se(p, "HTML_INTEGRATION_POINTS") && p.HTML_INTEGRATION_POINTS && typeof p.HTML_INTEGRATION_POINTS == "object" ? nt(p.HTML_INTEGRATION_POINTS) : le({}, ["annotation-xml"]);
689
- const L = Se(p, "CUSTOM_ELEMENT_HANDLING") && p.CUSTOM_ELEMENT_HANDLING && typeof p.CUSTOM_ELEMENT_HANDLING == "object" ? nt(p.CUSTOM_ELEMENT_HANDLING) : cu(null);
690
- if (ce = cu(null), Se(L, "tagNameCheck") && cn(L.tagNameCheck) && (ce.tagNameCheck = L.tagNameCheck), Se(L, "attributeNameCheck") && cn(L.attributeNameCheck) && (ce.attributeNameCheck = L.attributeNameCheck), Se(L, "allowCustomizedBuiltInElements") && typeof L.allowCustomizedBuiltInElements == "boolean" && (ce.allowCustomizedBuiltInElements = L.allowCustomizedBuiltInElements), se && (be = !1), tu && (It = !0), wt && (ve = le({}, kr), _e = cu(null), wt.html === !0 && (le(ve, Tr), le(_e, Mr)), wt.svg === !0 && (le(ve, sa), le(_e, da), le(_e, yn)), wt.svgFilters === !0 && (le(ve, la), le(_e, da), le(_e, yn)), wt.mathMl === !0 && (le(ve, ca), le(_e, wr), le(_e, yn))), G.tagCheck = null, G.attributeCheck = null, Se(p, "ADD_TAGS") && (typeof p.ADD_TAGS == "function" ? G.tagCheck = p.ADD_TAGS : Je(p.ADD_TAGS) && (ve === it && (ve = nt(ve)), le(ve, p.ADD_TAGS, Ie))), Se(p, "ADD_ATTR") && (typeof p.ADD_ATTR == "function" ? G.attributeCheck = p.ADD_ATTR : Je(p.ADD_ATTR) && (_e === Pe && (_e = nt(_e)), le(_e, p.ADD_ATTR, Ie))), Se(p, "ADD_URI_SAFE_ATTR") && Je(p.ADD_URI_SAFE_ATTR) && le(qt, p.ADD_URI_SAFE_ATTR, Ie), Se(p, "FORBID_CONTENTS") && Je(p.FORBID_CONTENTS) && (tt === Tu && (tt = nt(tt)), le(tt, p.FORBID_CONTENTS, Ie)), Se(p, "ADD_FORBID_CONTENTS") && Je(p.ADD_FORBID_CONTENTS) && (tt === Tu && (tt = nt(tt)), le(tt, p.ADD_FORBID_CONTENTS, Ie)), Ft && (ve["#text"] = !0), bt && le(ve, ["html", "head", "body"]), ve.table && (le(ve, ["tbody"]), delete P.tbody), p.TRUSTED_TYPES_POLICY) {
688
+ ta.indexOf(p.PARSER_MEDIA_TYPE) === -1 ? Du : p.PARSER_MEDIA_TYPE, Ie = Yt === "application/xhtml+xml" ? ia : ju, ve = Se(p, "ALLOWED_TAGS") && Je(p.ALLOWED_TAGS) ? le({}, p.ALLOWED_TAGS, Ie) : it, _e = Se(p, "ALLOWED_ATTR") && Je(p.ALLOWED_ATTR) ? le({}, p.ALLOWED_ATTR, Ie) : Pe, Mu = Se(p, "ALLOWED_NAMESPACES") && Je(p.ALLOWED_NAMESPACES) ? le({}, p.ALLOWED_NAMESPACES, ia) : Jn, qt = Se(p, "ADD_URI_SAFE_ATTR") && Je(p.ADD_URI_SAFE_ATTR) ? le(nt(ln), p.ADD_URI_SAFE_ATTR, Ie) : ln, sn = Se(p, "ADD_DATA_URI_TAGS") && Je(p.ADD_DATA_URI_TAGS) ? le(nt(Wt), p.ADD_DATA_URI_TAGS, Ie) : Wt, tt = Se(p, "FORBID_CONTENTS") && Je(p.FORBID_CONTENTS) ? le({}, p.FORBID_CONTENTS, Ie) : Tu, P = Se(p, "FORBID_TAGS") && Je(p.FORBID_TAGS) ? le({}, p.FORBID_TAGS, Ie) : nt({}), We = Se(p, "FORBID_ATTR") && Je(p.FORBID_ATTR) ? le({}, p.FORBID_ATTR, Ie) : nt({}), wt = Se(p, "USE_PROFILES") ? p.USE_PROFILES && typeof p.USE_PROFILES == "object" ? nt(p.USE_PROFILES) : p.USE_PROFILES : !1, fe = p.ALLOW_ARIA_ATTR !== !1, be = p.ALLOW_DATA_ATTR !== !1, ct = p.ALLOW_UNKNOWN_PROTOCOLS || !1, he = p.ALLOW_SELF_CLOSE_IN_ATTR !== !1, se = p.SAFE_FOR_TEMPLATES || !1, Ce = p.SAFE_FOR_XML !== !1, bt = p.WHOLE_DOCUMENT || !1, It = p.RETURN_DOM || !1, uu = p.RETURN_DOM_FRAGMENT || !1, yt = p.RETURN_TRUSTED_TYPE || !1, _u = p.FORCE_BODY || !1, Cu = p.SANITIZE_DOM !== !1, Gt = p.SANITIZE_NAMED_PROPS || !1, Ft = p.KEEP_CONTENT !== !1, Rt = p.IN_PLACE || !1, Le = ls(p.ALLOWED_URI_REGEXP) ? p.ALLOWED_URI_REGEXP : bo, Ot = typeof p.NAMESPACE == "string" ? p.NAMESPACE : dt, wu = Se(p, "MATHML_TEXT_INTEGRATION_POINTS") && p.MATHML_TEXT_INTEGRATION_POINTS && typeof p.MATHML_TEXT_INTEGRATION_POINTS == "object" ? nt(p.MATHML_TEXT_INTEGRATION_POINTS) : le({}, ["mi", "mo", "mn", "ms", "mtext"]), Au = Se(p, "HTML_INTEGRATION_POINTS") && p.HTML_INTEGRATION_POINTS && typeof p.HTML_INTEGRATION_POINTS == "object" ? nt(p.HTML_INTEGRATION_POINTS) : le({}, ["annotation-xml"]);
689
+ const L = Se(p, "CUSTOM_ELEMENT_HANDLING") && p.CUSTOM_ELEMENT_HANDLING && typeof p.CUSTOM_ELEMENT_HANDLING == "object" ? nt(p.CUSTOM_ELEMENT_HANDLING) : du(null);
690
+ if (ce = du(null), Se(L, "tagNameCheck") && cn(L.tagNameCheck) && (ce.tagNameCheck = L.tagNameCheck), Se(L, "attributeNameCheck") && cn(L.attributeNameCheck) && (ce.attributeNameCheck = L.attributeNameCheck), Se(L, "allowCustomizedBuiltInElements") && typeof L.allowCustomizedBuiltInElements == "boolean" && (ce.allowCustomizedBuiltInElements = L.allowCustomizedBuiltInElements), se && (be = !1), uu && (It = !0), wt && (ve = le({}, kr), _e = du(null), wt.html === !0 && (le(ve, Tr), le(_e, Mr)), wt.svg === !0 && (le(ve, sa), le(_e, da), le(_e, yn)), wt.svgFilters === !0 && (le(ve, la), le(_e, da), le(_e, yn)), wt.mathMl === !0 && (le(ve, ca), le(_e, wr), le(_e, yn))), G.tagCheck = null, G.attributeCheck = null, Se(p, "ADD_TAGS") && (typeof p.ADD_TAGS == "function" ? G.tagCheck = p.ADD_TAGS : Je(p.ADD_TAGS) && (ve === it && (ve = nt(ve)), le(ve, p.ADD_TAGS, Ie))), Se(p, "ADD_ATTR") && (typeof p.ADD_ATTR == "function" ? G.attributeCheck = p.ADD_ATTR : Je(p.ADD_ATTR) && (_e === Pe && (_e = nt(_e)), le(_e, p.ADD_ATTR, Ie))), Se(p, "ADD_URI_SAFE_ATTR") && Je(p.ADD_URI_SAFE_ATTR) && le(qt, p.ADD_URI_SAFE_ATTR, Ie), Se(p, "FORBID_CONTENTS") && Je(p.FORBID_CONTENTS) && (tt === Tu && (tt = nt(tt)), le(tt, p.FORBID_CONTENTS, Ie)), Se(p, "ADD_FORBID_CONTENTS") && Je(p.ADD_FORBID_CONTENTS) && (tt === Tu && (tt = nt(tt)), le(tt, p.ADD_FORBID_CONTENTS, Ie)), Ft && (ve["#text"] = !0), bt && le(ve, ["html", "head", "body"]), ve.table && (le(ve, ["tbody"]), delete P.tbody), p.TRUSTED_TYPES_POLICY) {
691
691
  if (typeof p.TRUSTED_TYPES_POLICY.createHTML != "function")
692
692
  throw xn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
693
693
  if (typeof p.TRUSTED_TYPES_POLICY.createScriptURL != "function")
@@ -703,7 +703,7 @@ function xo() {
703
703
  tagName: "template"
704
704
  });
705
705
  const V = ju(p.tagName), pe = ju(L.tagName);
706
- return Mu[p.namespaceURI] ? p.namespaceURI === au ? L.namespaceURI === dt ? V === "svg" : L.namespaceURI === nu ? V === "svg" && (pe === "annotation-xml" || wu[pe]) : !!Su[V] : p.namespaceURI === nu ? L.namespaceURI === dt ? V === "math" : L.namespaceURI === au ? V === "math" && Au[pe] : !!Kt[V] : p.namespaceURI === dt ? L.namespaceURI === au && !Au[pe] || L.namespaceURI === nu && !wu[pe] ? !1 : !Kt[V] && (ea[V] || !Su[V]) : !!(Yt === "application/xhtml+xml" && Mu[p.namespaceURI]) : !1;
706
+ return Mu[p.namespaceURI] ? p.namespaceURI === ru ? L.namespaceURI === dt ? V === "svg" : L.namespaceURI === au ? V === "svg" && (pe === "annotation-xml" || wu[pe]) : !!Su[V] : p.namespaceURI === au ? L.namespaceURI === dt ? V === "math" : L.namespaceURI === ru ? V === "math" && Au[pe] : !!Kt[V] : p.namespaceURI === dt ? L.namespaceURI === ru && !Au[pe] || L.namespaceURI === au && !wu[pe] ? !1 : !Kt[V] && (ea[V] || !Su[V]) : !!(Yt === "application/xhtml+xml" && Mu[p.namespaceURI]) : !1;
707
707
  }, ut = function(p) {
708
708
  $u(t.removed, {
709
709
  element: p
@@ -726,7 +726,7 @@ function xo() {
726
726
  });
727
727
  }
728
728
  if (L.removeAttribute(p), p === "is")
729
- if (It || tu)
729
+ if (It || uu)
730
730
  try {
731
731
  ut(L);
732
732
  } catch {
@@ -804,12 +804,12 @@ function xo() {
804
804
  return ut(p), !0;
805
805
  }
806
806
  return p instanceof s && !dn(p) || (V === "noscript" || V === "noembed" || V === "noframes") && Ge(/<\/no(script|embed|frames)/i, p.innerHTML) ? (ut(p), !0) : (se && p.nodeType === Nu.text && (L = p.textContent, Pu([ie, O, B], (pe) => {
807
- L = su(L, pe, " ");
807
+ L = lu(L, pe, " ");
808
808
  }), p.textContent !== L && ($u(t.removed, {
809
809
  element: p.cloneNode()
810
810
  }), p.textContent = L)), st(W.afterSanitizeElements, p, null), !1);
811
811
  }, pn = function(p, L, V) {
812
- if (We[L] || Cu && (L === "id" || L === "name") && (V in u || V in ru))
812
+ if (We[L] || Cu && (L === "id" || L === "name") && (V in u || V in ou))
813
813
  return !1;
814
814
  if (!(be && !We[L] && Ge(Y, L))) {
815
815
  if (!(fe && Ge(J, L))) {
@@ -824,9 +824,9 @@ function xo() {
824
824
  L === "is" && ce.allowCustomizedBuiltInElements && (ce.tagNameCheck instanceof RegExp && Ge(ce.tagNameCheck, V) || ce.tagNameCheck instanceof Function && ce.tagNameCheck(V)))
825
825
  ) return !1;
826
826
  } else if (!qt[L]) {
827
- if (!Ge(Le, su(V, ye, ""))) {
827
+ if (!Ge(Le, lu(V, ye, ""))) {
828
828
  if (!((L === "src" || L === "xlink:href" || L === "href") && p !== "script" && yr(V, "data:") === 0 && sn[p])) {
829
- if (!(ct && !Ge(ne, su(V, ye, "")))) {
829
+ if (!(ct && !Ge(ne, lu(V, ye, "")))) {
830
830
  if (V)
831
831
  return !1;
832
832
  }
@@ -861,7 +861,7 @@ function xo() {
861
861
  value: Ke
862
862
  } = $e, Be = Ie(Ae), Dt = Ke;
863
863
  let Fe = Ae === "value" ? Dt : ns(Dt);
864
- if (V.attrName = Be, V.attrValue = Fe, V.keepAttr = !0, V.forceKeepAttr = void 0, st(W.uponSanitizeAttribute, p, V), Fe = V.attrValue, Gt && (Be === "id" || Be === "name") && yr(Fe, uu) !== 0 && (_t(Ae, p), Fe = uu + Fe), Ce && Ge(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, Fe)) {
864
+ if (V.attrName = Be, V.attrValue = Fe, V.keepAttr = !0, V.forceKeepAttr = void 0, st(W.uponSanitizeAttribute, p, V), Fe = V.attrValue, Gt && (Be === "id" || Be === "name") && yr(Fe, nu) !== 0 && (_t(Ae, p), Fe = nu + Fe), Ce && Ge(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, Fe)) {
865
865
  _t(Ae, p);
866
866
  continue;
867
867
  }
@@ -880,7 +880,7 @@ function xo() {
880
880
  continue;
881
881
  }
882
882
  se && Pu([ie, O, B], (bn) => {
883
- Fe = su(Fe, bn, " ");
883
+ Fe = lu(Fe, bn, " ");
884
884
  });
885
885
  const gn = Ie(p.nodeName);
886
886
  if (!pn(gn, Be, Fe)) {
@@ -946,10 +946,10 @@ function xo() {
946
946
  L.normalize();
947
947
  let Ke = L.innerHTML;
948
948
  Pu([ie, O, B], (Be) => {
949
- Ke = su(Ke, Be, " ");
949
+ Ke = lu(Ke, Be, " ");
950
950
  }), L.innerHTML = Ke;
951
951
  }
952
- if (tu)
952
+ if (uu)
953
953
  for ($e = q.call(L.ownerDocument); L.firstChild; )
954
954
  $e.appendChild(L.firstChild);
955
955
  else
@@ -959,7 +959,7 @@ function xo() {
959
959
  let Ye = bt ? L.outerHTML : L.innerHTML;
960
960
  return bt && ve["!doctype"] && L.ownerDocument && L.ownerDocument.doctype && L.ownerDocument.doctype.name && Ge(vo, L.ownerDocument.doctype.name) && (Ye = "<!DOCTYPE " + L.ownerDocument.doctype.name + `>
961
961
  ` + Ye), se && Pu([ie, O, B], (Ke) => {
962
- Ye = su(Ye, Ke, " ");
962
+ Ye = lu(Ye, Ke, " ");
963
963
  }), C && yt ? C.createHTML(Ye) : Ye;
964
964
  }, t.setConfig = function() {
965
965
  let X = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
@@ -1001,8 +1001,8 @@ function Cs(e) {
1001
1001
  }
1002
1002
  return t;
1003
1003
  }
1004
- function pu(e, t) {
1005
- typeof t != "string" && (t = pu.defaultChars);
1004
+ function mu(e, t) {
1005
+ typeof t != "string" && (t = mu.defaultChars);
1006
1006
  const u = Cs(t);
1007
1007
  return e.replace(/(%[a-f0-9]{2})+/gi, function(n) {
1008
1008
  let a = "";
@@ -1041,8 +1041,8 @@ function pu(e, t) {
1041
1041
  return a;
1042
1042
  });
1043
1043
  }
1044
- pu.defaultChars = ";/?:@&=+$,#";
1045
- pu.componentChars = "";
1044
+ mu.defaultChars = ";/?:@&=+$,#";
1045
+ mu.componentChars = "";
1046
1046
  const Sr = {};
1047
1047
  function Ts(e) {
1048
1048
  let t = Sr[e];
@@ -1165,7 +1165,7 @@ qn.prototype.parseHost = function(e) {
1165
1165
  };
1166
1166
  const Fs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1167
1167
  __proto__: null,
1168
- decode: pu,
1168
+ decode: mu,
1169
1169
  encode: nn,
1170
1170
  format: Ha,
1171
1171
  parse: ja
@@ -1536,7 +1536,7 @@ function Js(e, t) {
1536
1536
  function el(e) {
1537
1537
  return e.indexOf("\\") < 0 ? e : e.replace(Do, "$1");
1538
1538
  }
1539
- function mu(e) {
1539
+ function gu(e) {
1540
1540
  return e.indexOf("\\") < 0 && e.indexOf("&") < 0 ? e : e.replace(Qs, function(t, u, n) {
1541
1541
  return u || Js(t, n);
1542
1542
  });
@@ -1645,7 +1645,7 @@ const il = { mdurl: Fs, ucmicro: qs }, sl = /* @__PURE__ */ Object.freeze(/* @__
1645
1645
  isWhiteSpace: Wu,
1646
1646
  lib: il,
1647
1647
  normalizeReference: Hn,
1648
- unescapeAll: mu,
1648
+ unescapeAll: gu,
1649
1649
  unescapeMd: el
1650
1650
  }, Symbol.toStringTag, { value: "Module" }));
1651
1651
  function ll(e, t, u) {
@@ -1678,7 +1678,7 @@ function cl(e, t, u) {
1678
1678
  if (n = e.charCodeAt(a), n === 10 || n === 60)
1679
1679
  return r;
1680
1680
  if (n === 62)
1681
- return r.pos = a + 1, r.str = mu(e.slice(t + 1, a)), r.ok = !0, r;
1681
+ return r.pos = a + 1, r.str = gu(e.slice(t + 1, a)), r.ok = !0, r;
1682
1682
  if (n === 92 && a + 1 < u) {
1683
1683
  a += 2;
1684
1684
  continue;
@@ -1704,7 +1704,7 @@ function cl(e, t, u) {
1704
1704
  }
1705
1705
  a++;
1706
1706
  }
1707
- return t === a || i !== 0 || (r.str = mu(e.slice(t, a)), r.pos = a, r.ok = !0), r;
1707
+ return t === a || i !== 0 || (r.str = gu(e.slice(t, a)), r.pos = a, r.ok = !0), r;
1708
1708
  }
1709
1709
  function dl(e, t, u, n) {
1710
1710
  let a, r = t;
@@ -1732,12 +1732,12 @@ function dl(e, t, u, n) {
1732
1732
  }
1733
1733
  for (; r < u; ) {
1734
1734
  if (a = e.charCodeAt(r), a === i.marker)
1735
- return i.pos = r + 1, i.str += mu(e.slice(t, r)), i.ok = !0, i;
1735
+ return i.pos = r + 1, i.str += gu(e.slice(t, r)), i.ok = !0, i;
1736
1736
  if (a === 40 && i.marker === 41)
1737
1737
  return i;
1738
1738
  a === 92 && r + 1 < u && r++, r++;
1739
1739
  }
1740
- return i.can_continue = !0, i.str += mu(e.slice(t, r)), i;
1740
+ return i.can_continue = !0, i.str += gu(e.slice(t, r)), i;
1741
1741
  }
1742
1742
  const fl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1743
1743
  __proto__: null,
@@ -1755,7 +1755,7 @@ kt.code_block = function(e, t, u, n, a) {
1755
1755
  `;
1756
1756
  };
1757
1757
  kt.fence = function(e, t, u, n, a) {
1758
- const r = e[t], i = r.info ? mu(r.info).trim() : "";
1758
+ const r = e[t], i = r.info ? gu(r.info).trim() : "";
1759
1759
  let o = "", s = "";
1760
1760
  if (i) {
1761
1761
  const d = i.split(/(\s+)/g);
@@ -2759,7 +2759,7 @@ const Ul = [
2759
2759
  "tr",
2760
2760
  "track",
2761
2761
  "ul"
2762
- ], zl = "[a-zA-Z_:][a-zA-Z0-9:._-]*", Hl = "[^\"'=<>`\\x00-\\x20]+", jl = "'[^']*'", Zl = '"[^"]*"', Vl = "(?:" + Hl + "|" + jl + "|" + Zl + ")", Gl = "(?:\\s+" + zl + "(?:\\s*=\\s*" + Vl + ")?)", Io = "<[A-Za-z][A-Za-z0-9\\-]*" + Gl + "*\\s*\\/?>", Fo = "<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>", Wl = "<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->", Yl = "<[?][\\s\\S]*?[?]>", Kl = "<![A-Za-z][^>]*>", Ql = "<!\\[CDATA\\[[\\s\\S]*?\\]\\]>", Xl = new RegExp("^(?:" + Io + "|" + Fo + "|" + Wl + "|" + Yl + "|" + Kl + "|" + Ql + ")"), Jl = new RegExp("^(?:" + Io + "|" + Fo + ")"), lu = [
2762
+ ], zl = "[a-zA-Z_:][a-zA-Z0-9:._-]*", Hl = "[^\"'=<>`\\x00-\\x20]+", jl = "'[^']*'", Zl = '"[^"]*"', Vl = "(?:" + Hl + "|" + jl + "|" + Zl + ")", Gl = "(?:\\s+" + zl + "(?:\\s*=\\s*" + Vl + ")?)", Io = "<[A-Za-z][A-Za-z0-9\\-]*" + Gl + "*\\s*\\/?>", Fo = "<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>", Wl = "<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->", Yl = "<[?][\\s\\S]*?[?]>", Kl = "<![A-Za-z][^>]*>", Ql = "<!\\[CDATA\\[[\\s\\S]*?\\]\\]>", Xl = new RegExp("^(?:" + Io + "|" + Fo + "|" + Wl + "|" + Yl + "|" + Kl + "|" + Ql + ")"), Jl = new RegExp("^(?:" + Io + "|" + Fo + ")"), cu = [
2763
2763
  [/^<(script|pre|style|textarea)(?=(\s|>|$))/i, /<\/(script|pre|style|textarea)>/i, !0],
2764
2764
  [/^<!--/, /-->/, !0],
2765
2765
  [/^<\?/, /\?>/, !0],
@@ -2773,16 +2773,16 @@ function ec(e, t, u, n) {
2773
2773
  if (e.sCount[t] - e.blkIndent >= 4 || !e.md.options.html || e.src.charCodeAt(a) !== 60)
2774
2774
  return !1;
2775
2775
  let i = e.src.slice(a, r), o = 0;
2776
- for (; o < lu.length && !lu[o][0].test(i); o++)
2776
+ for (; o < cu.length && !cu[o][0].test(i); o++)
2777
2777
  ;
2778
- if (o === lu.length)
2778
+ if (o === cu.length)
2779
2779
  return !1;
2780
2780
  if (n)
2781
- return lu[o][2];
2781
+ return cu[o][2];
2782
2782
  let s = t + 1;
2783
- if (!lu[o][1].test(i)) {
2783
+ if (!cu[o][1].test(i)) {
2784
2784
  for (; s < u && !(e.sCount[s] < e.blkIndent); s++)
2785
- if (a = e.bMarks[s] + e.tShift[s], r = e.eMarks[s], i = e.src.slice(a, r), lu[o][1].test(i)) {
2785
+ if (a = e.bMarks[s] + e.tShift[s], r = e.eMarks[s], i = e.src.slice(a, r), cu[o][1].test(i)) {
2786
2786
  i.length !== 0 && s++;
2787
2787
  break;
2788
2788
  }
@@ -3679,7 +3679,7 @@ lt.prototype.normalize = function(t) {
3679
3679
  };
3680
3680
  lt.prototype.onCompile = function() {
3681
3681
  };
3682
- const hu = 2147483647, Ct = 36, Ka = 1, Qu = 26, Uc = 38, zc = 700, Lo = 72, Po = 128, $o = "-", Hc = /^xn--/, jc = /[^\0-\x7F]/, Zc = /[\x2E\u3002\uFF0E\uFF61]/g, Vc = {
3682
+ const pu = 2147483647, Ct = 36, Ka = 1, Qu = 26, Uc = 38, zc = 700, Lo = 72, Po = 128, $o = "-", Hc = /^xn--/, jc = /[^\0-\x7F]/, Zc = /[\x2E\u3002\uFF0E\uFF61]/g, Vc = {
3683
3683
  overflow: "Overflow: input needs wider integers to process",
3684
3684
  "not-basic": "Illegal input >= 0x80 (not a basic code point)",
3685
3685
  "invalid-input": "Invalid input"
@@ -3735,15 +3735,15 @@ const Wc = (e) => String.fromCodePoint(...e), Yc = function(e) {
3735
3735
  for (let d = 1, f = Ct; ; f += Ct) {
3736
3736
  o >= u && Nt("invalid-input");
3737
3737
  const x = Yc(e.charCodeAt(o++));
3738
- x >= Ct && Nt("invalid-input"), x > Tt((hu - n) / d) && Nt("overflow"), n += x * d;
3738
+ x >= Ct && Nt("invalid-input"), x > Tt((pu - n) / d) && Nt("overflow"), n += x * d;
3739
3739
  const g = f <= r ? Ka : f >= r + Qu ? Qu : f - r;
3740
3740
  if (x < g)
3741
3741
  break;
3742
3742
  const m = Ct - g;
3743
- d > Tt(hu / m) && Nt("overflow"), d *= m;
3743
+ d > Tt(pu / m) && Nt("overflow"), d *= m;
3744
3744
  }
3745
3745
  const l = t.length + 1;
3746
- r = Uo(n - s, l, s == 0), Tt(n / l) > hu - a && Nt("overflow"), a += Tt(n / l), n %= l, t.splice(n++, 0, a);
3746
+ r = Uo(n - s, l, s == 0), Tt(n / l) > pu - a && Nt("overflow"), a += Tt(n / l), n %= l, t.splice(n++, 0, a);
3747
3747
  }
3748
3748
  return String.fromCodePoint(...t);
3749
3749
  }, Ho = function(e) {
@@ -3756,13 +3756,13 @@ const Wc = (e) => String.fromCodePoint(...e), Yc = function(e) {
3756
3756
  const i = t.length;
3757
3757
  let o = i;
3758
3758
  for (i && t.push($o); o < u; ) {
3759
- let s = hu;
3759
+ let s = pu;
3760
3760
  for (const d of e)
3761
3761
  d >= n && d < s && (s = d);
3762
3762
  const l = o + 1;
3763
- s - n > Tt((hu - a) / l) && Nt("overflow"), a += (s - n) * l, n = s;
3763
+ s - n > Tt((pu - a) / l) && Nt("overflow"), a += (s - n) * l, n = s;
3764
3764
  for (const d of e)
3765
- if (d < n && ++a > hu && Nt("overflow"), d === n) {
3765
+ if (d < n && ++a > pu && Nt("overflow"), d === n) {
3766
3766
  let f = a;
3767
3767
  for (let x = Ct; ; x += Ct) {
3768
3768
  const g = x <= r ? Ka : x >= r + Qu ? Qu : x - r;
@@ -3999,7 +3999,7 @@ function o0(e) {
3999
3999
  t.hostname = jo.toUnicode(t.hostname);
4000
4000
  } catch {
4001
4001
  }
4002
- return pu(Ha(t), pu.defaultChars + "%");
4002
+ return mu(Ha(t), mu.defaultChars + "%");
4003
4003
  }
4004
4004
  function gt(e, t) {
4005
4005
  if (!(this instanceof gt))
@@ -4626,12 +4626,12 @@ function I0({
4626
4626
  v.forEach((A) => window.localStorage.removeItem(A));
4627
4627
  }
4628
4628
  function _u() {
4629
- ne || typeof window > "u" || (window.addEventListener("online", It), window.addEventListener("offline", tu), ne = !0);
4629
+ ne || typeof window > "u" || (window.addEventListener("online", It), window.addEventListener("offline", uu), ne = !0);
4630
4630
  }
4631
4631
  function It() {
4632
- g.value = !1, Pe = !0, ce || uu(!0);
4632
+ g.value = !1, Pe = !0, ce || nu(!0);
4633
4633
  }
4634
- function tu() {
4634
+ function uu() {
4635
4635
  g.value = !0, x.value = !1, yt();
4636
4636
  }
4637
4637
  function yt() {
@@ -4643,7 +4643,7 @@ function I0({
4643
4643
  function Gt() {
4644
4644
  return Date.now() < it;
4645
4645
  }
4646
- function uu(c = !1) {
4646
+ function nu(c = !1) {
4647
4647
  if (ye !== null || Ee || g.value || !m.value || ce)
4648
4648
  return;
4649
4649
  const h = c ? 0 : Math.min(3e4, 1e3 * 2 ** Math.min(_e, 4));
@@ -4671,7 +4671,7 @@ function I0({
4671
4671
  x.value = !1, _e += 1, Ou(c) || (w.value = Re(
4672
4672
  c,
4673
4673
  "Unable to reconnect to chat."
4674
- )), uu();
4674
+ )), nu();
4675
4675
  } finally {
4676
4676
  Ee = null;
4677
4677
  }
@@ -4756,10 +4756,10 @@ function I0({
4756
4756
  function ln(c) {
4757
4757
  c && (Q.value = null), z.value = c;
4758
4758
  }
4759
- function nu(c) {
4759
+ function au(c) {
4760
4760
  c && (z.value = null), Q.value = c;
4761
4761
  }
4762
- async function au(c) {
4762
+ async function ru(c) {
4763
4763
  q.value = c, be = null, S.value = !1, z.value = null, Q.value = null, await ut(c.id);
4764
4764
  }
4765
4765
  function dt() {
@@ -4796,7 +4796,7 @@ function I0({
4796
4796
  return;
4797
4797
  }
4798
4798
  vn(
4799
- ou({
4799
+ iu({
4800
4800
  conversation: v,
4801
4801
  kind: "text",
4802
4802
  text: A,
@@ -4816,7 +4816,7 @@ function I0({
4816
4816
  pe(Xe(ft, (me = _.value) == null ? void 0 : me.uid)), Pt(ft), await At(ft), z.value = null;
4817
4817
  } catch (Te) {
4818
4818
  if (Ou(Te)) {
4819
- iu("queued", $), cr(
4819
+ su("queued", $), cr(
4820
4820
  v,
4821
4821
  A,
4822
4822
  H,
@@ -4825,7 +4825,7 @@ function I0({
4825
4825
  ), z.value = null;
4826
4826
  return;
4827
4827
  }
4828
- throw iu("failed", $), w.value = Re(Te, "Unable to send the message."), Te;
4828
+ throw su("failed", $), w.value = Re(Te, "Unable to send the message."), Te;
4829
4829
  } finally {
4830
4830
  l.value = !1;
4831
4831
  }
@@ -4883,7 +4883,7 @@ function I0({
4883
4883
  return;
4884
4884
  }
4885
4885
  vn(
4886
- ou({
4886
+ iu({
4887
4887
  conversation: v,
4888
4888
  kind: H,
4889
4889
  text: ((re = c.caption) == null ? void 0 : re.trim()) ?? "",
@@ -4912,7 +4912,7 @@ function I0({
4912
4912
  pe(Xe(Et, (ft = _.value) == null ? void 0 : ft.uid)), Pt(Et), await At(Et), z.value = null;
4913
4913
  } catch (De) {
4914
4914
  if (Ou(De)) {
4915
- iu("queued", R), await fr(
4915
+ su("queued", R), await fr(
4916
4916
  v,
4917
4917
  c,
4918
4918
  $,
@@ -4921,7 +4921,7 @@ function I0({
4921
4921
  ), z.value = null;
4922
4922
  return;
4923
4923
  }
4924
- throw iu("failed", R), w.value = Re(
4924
+ throw su("failed", R), w.value = Re(
4925
4925
  De,
4926
4926
  "Unable to send the attachment."
4927
4927
  ), De;
@@ -4959,7 +4959,7 @@ function I0({
4959
4959
  return;
4960
4960
  }
4961
4961
  vn(
4962
- ou({
4962
+ iu({
4963
4963
  conversation: v,
4964
4964
  kind: "poll",
4965
4965
  text: `Poll: ${A}`,
@@ -4991,7 +4991,7 @@ function I0({
4991
4991
  ), Pt(Te), await At(Te)) : (aa(H), await V()), z.value = null;
4992
4992
  } catch (me) {
4993
4993
  if (Ou(me)) {
4994
- iu("queued", H), dr(
4994
+ su("queued", H), dr(
4995
4995
  v,
4996
4996
  {
4997
4997
  question: A,
@@ -5003,7 +5003,7 @@ function I0({
5003
5003
  ), z.value = null;
5004
5004
  return;
5005
5005
  }
5006
- throw iu("failed", H), w.value = Re(me, "Unable to send the poll."), me;
5006
+ throw su("failed", H), w.value = Re(me, "Unable to send the poll."), me;
5007
5007
  } finally {
5008
5008
  l.value = !1;
5009
5009
  }
@@ -5213,13 +5213,13 @@ function I0({
5213
5213
  d.value = !1;
5214
5214
  }
5215
5215
  }
5216
- const ru = 50;
5216
+ const ou = 50;
5217
5217
  function cn(c) {
5218
- const h = new Z.MessagesRequestBuilder().setLimit(ru).hideReplies(!0).hideDeletedMessages(!0);
5218
+ const h = new Z.MessagesRequestBuilder().setLimit(ou).hideReplies(!0).hideDeletedMessages(!0);
5219
5219
  return c.type === "group" ? h.setGUID(c.targetId) : h.setUID(c.targetId), h.build();
5220
5220
  }
5221
5221
  function Eu(c) {
5222
- return new Z.MessagesRequestBuilder().setLimit(ru).setParentMessageId(Number(c)).hideDeletedMessages(!0).build();
5222
+ return new Z.MessagesRequestBuilder().setLimit(ou).setParentMessageId(Number(c)).hideDeletedMessages(!0).build();
5223
5223
  }
5224
5224
  async function Su(c) {
5225
5225
  const h = O.value;
@@ -5239,7 +5239,7 @@ function I0({
5239
5239
  ($) => $.conversationId === h.id && Kr($)
5240
5240
  ),
5241
5241
  A
5242
- ) : kn(y.value, A), I.value = v.length === ru, P == null || P.setMessages(h.id, y.value);
5242
+ ) : kn(y.value, A), I.value = v.length === ou, P == null || P.setMessages(h.id, y.value);
5243
5243
  const R = v[v.length - 1];
5244
5244
  return R && (await X(R), await At(R)), v.length > 0;
5245
5245
  }
@@ -5289,7 +5289,7 @@ function I0({
5289
5289
  (H) => H.parentMessageId === h && Kr(H)
5290
5290
  ),
5291
5291
  A
5292
- ) : kn(E.value, A), S.value = v.length === ru, P == null || P.setThreadMessages(h, E.value);
5292
+ ) : kn(E.value, A), S.value = v.length === ou, P == null || P.setThreadMessages(h, E.value);
5293
5293
  const R = v[v.length - 1];
5294
5294
  return R && (await X(R), await At(R)), v.length > 0;
5295
5295
  }
@@ -5382,7 +5382,7 @@ function I0({
5382
5382
  ra();
5383
5383
  },
5384
5384
  onDisconnected: () => {
5385
- x.value = !1, !g.value && m.value && !ce && (Pe = !0, uu(!0));
5385
+ x.value = !1, !g.value && m.value && !ce && (Pe = !0, nu(!0));
5386
5386
  }
5387
5387
  })
5388
5388
  ), Z.addMessageListener(
@@ -5688,7 +5688,7 @@ function I0({
5688
5688
  })
5689
5689
  ), P == null || P.setConversations(D.value);
5690
5690
  }
5691
- function ou(c) {
5691
+ function iu(c) {
5692
5692
  var A, R;
5693
5693
  const h = /* @__PURE__ */ new Date(), v = Ai(c.metadata);
5694
5694
  return {
@@ -5753,7 +5753,7 @@ function I0({
5753
5753
  return h.includes("network") || h.includes("failed to fetch") || h.includes("socket") || h.includes("offline");
5754
5754
  }
5755
5755
  function cr(c, h, v, A, R) {
5756
- const $ = ou({
5756
+ const $ = iu({
5757
5757
  conversation: c,
5758
5758
  kind: "text",
5759
5759
  text: h,
@@ -5778,7 +5778,7 @@ function I0({
5778
5778
  function dr(c, h, v, A, R) {
5779
5779
  if (Di(c, h, A))
5780
5780
  return;
5781
- const $ = ou({
5781
+ const $ = iu({
5782
5782
  conversation: c,
5783
5783
  kind: "poll",
5784
5784
  text: `Poll: ${h.question}`,
@@ -5812,7 +5812,7 @@ function I0({
5812
5812
  }
5813
5813
  async function fr(c, h, v, A, R) {
5814
5814
  var re, K;
5815
- const $ = Ra(h.file), H = ou({
5815
+ const $ = Ra(h.file), H = iu({
5816
5816
  conversation: c,
5817
5817
  kind: $,
5818
5818
  text: ((re = h.caption) == null ? void 0 : re.trim()) ?? "",
@@ -5863,7 +5863,7 @@ function I0({
5863
5863
  c
5864
5864
  )), Ke(c.parentMessageId)) : y.value = Bt(y.value, c), bn(c), Be();
5865
5865
  }
5866
- function iu(c, h) {
5866
+ function su(c, h) {
5867
5867
  const v = (A) => A.map((R) => {
5868
5868
  const $ = Pn(R);
5869
5869
  return R.muid !== h && $ !== h ? R : {
@@ -6003,8 +6003,8 @@ function I0({
6003
6003
  scheduleMessage: Ie,
6004
6004
  rescheduleMessage: Lt,
6005
6005
  setReplyToMessage: ln,
6006
- setEditingMessage: nu,
6007
- openThread: au,
6006
+ setEditingMessage: au,
6007
+ openThread: ru,
6008
6008
  closeThread: dt,
6009
6009
  fetchMessageReceipts: p,
6010
6010
  deleteMessage: Yt,
@@ -6064,7 +6064,7 @@ function R0(e, t) {
6064
6064
  type: n,
6065
6065
  title: ((s = u.getName) == null ? void 0 : s.call(u)) ?? a,
6066
6066
  subtitle: o && St(o) && !o.isDeleted ? Dn(o) : "No messages yet",
6067
- avatar: Jt((l = u.getAvatar) == null ? void 0 : l.call(u)),
6067
+ avatar: eu((l = u.getAvatar) == null ? void 0 : l.call(u)),
6068
6068
  unreadCount: Number.isFinite((d = e.getUnreadMessageCount) == null ? void 0 : d.call(e)) ? e.getUnreadMessageCount() : 0,
6069
6069
  lastMessageAt: r && !(o != null && o.isDeleted) ? new Date((((f = r.getSentAt) == null ? void 0 : f.call(r)) ?? 0) * 1e3) : void 0,
6070
6070
  tags: ((x = e.getTags) == null ? void 0 : x.call(e)) ?? [],
@@ -6118,7 +6118,7 @@ function O0(e) {
6118
6118
  const t = (i = e == null ? void 0 : e.getSender) == null ? void 0 : i.call(e);
6119
6119
  if (!((o = t == null ? void 0 : t.getUid) == null ? void 0 : o.call(t)))
6120
6120
  return null;
6121
- const n = fu((s = e.getReadAt) == null ? void 0 : s.call(e)), a = fu((l = e.getDeliveredAt) == null ? void 0 : l.call(e)), r = n ? "read" : a ? "delivered" : null;
6121
+ const n = hu((s = e.getReadAt) == null ? void 0 : s.call(e)), a = hu((l = e.getDeliveredAt) == null ? void 0 : l.call(e)), r = n ? "read" : a ? "delivered" : null;
6122
6122
  return r ? {
6123
6123
  kind: r,
6124
6124
  user: An(t),
@@ -6130,20 +6130,20 @@ function An(e) {
6130
6130
  return {
6131
6131
  uid: e.getUid(),
6132
6132
  name: ((t = e.getName) == null ? void 0 : t.call(e)) ?? e.getUid(),
6133
- avatar: Jt((u = e.getAvatar) == null ? void 0 : u.call(e)),
6133
+ avatar: eu((u = e.getAvatar) == null ? void 0 : u.call(e)),
6134
6134
  status: ((n = e.getStatus) == null ? void 0 : n.call(e)) ?? void 0
6135
6135
  };
6136
6136
  }
6137
6137
  function L0(e) {
6138
6138
  var t, u, n, a;
6139
6139
  return {
6140
- deliveredAt: fu((t = e.getDeliveredAt) == null ? void 0 : t.call(e)),
6141
- deliveredToMeAt: fu((u = e.getDeliveredToMeAt) == null ? void 0 : u.call(e)),
6142
- readAt: fu((n = e.getReadAt) == null ? void 0 : n.call(e)),
6143
- readByMeAt: fu((a = e.getReadByMeAt) == null ? void 0 : a.call(e))
6140
+ deliveredAt: hu((t = e.getDeliveredAt) == null ? void 0 : t.call(e)),
6141
+ deliveredToMeAt: hu((u = e.getDeliveredToMeAt) == null ? void 0 : u.call(e)),
6142
+ readAt: hu((n = e.getReadAt) == null ? void 0 : n.call(e)),
6143
+ readByMeAt: hu((a = e.getReadByMeAt) == null ? void 0 : a.call(e))
6144
6144
  };
6145
6145
  }
6146
- function fu(e) {
6146
+ function hu(e) {
6147
6147
  if (!(!e || Number.isNaN(e)))
6148
6148
  return new Date(e * 1e3);
6149
6149
  }
@@ -6363,13 +6363,13 @@ function Z0(e, t) {
6363
6363
  return typeof u == "string" && u.trim() ? u.trim() : ((n = e == null ? void 0 : e.getName) == null ? void 0 : n.call(e)) ?? "System";
6364
6364
  }
6365
6365
  function V0(e, t) {
6366
- const u = Jt(Qo(t));
6366
+ const u = eu(Qo(t));
6367
6367
  return u || (G0(e, "sender") ?? void 0);
6368
6368
  }
6369
6369
  function G0(e, t) {
6370
6370
  var n, a, r;
6371
6371
  const u = (r = (a = (n = ei(e)) == null ? void 0 : n.entities) == null ? void 0 : a[t]) == null ? void 0 : r.entity;
6372
- return Jt(Qo(u));
6372
+ return eu(Qo(u));
6373
6373
  }
6374
6374
  function Qo(e) {
6375
6375
  var a, r;
@@ -7034,7 +7034,7 @@ function ir(e) {
7034
7034
  var t, u;
7035
7035
  return (u = (t = e == null ? void 0 : e.source) == null ? void 0 : t.getConversationWith) == null ? void 0 : u.call(t);
7036
7036
  }
7037
- function eu(e) {
7037
+ function tu(e) {
7038
7038
  var u, n;
7039
7039
  const t = (n = (u = ir(e)) == null ? void 0 : u.getMetadata) == null ? void 0 : n.call(u);
7040
7040
  return !!(t != null && t.isChannel);
@@ -7049,22 +7049,22 @@ function sr(e) {
7049
7049
  return typeof t == "string" ? t : void 0;
7050
7050
  }
7051
7051
  function Ed(e) {
7052
- return eu(e) && (!on(e) || sr(e) === "participant");
7052
+ return tu(e) && (!on(e) || sr(e) === "participant");
7053
7053
  }
7054
7054
  function Sd(e) {
7055
- return eu(e) ? on(e) : !0;
7055
+ return tu(e) ? on(e) : !0;
7056
7056
  }
7057
7057
  function Id(e) {
7058
- return eu(e) ? on(e) : !0;
7058
+ return tu(e) ? on(e) : !0;
7059
7059
  }
7060
7060
  function Fd(e) {
7061
- return eu(e) ? on(e) && sr(e) !== "participant" : !0;
7061
+ return tu(e) ? on(e) && sr(e) !== "participant" : !0;
7062
7062
  }
7063
7063
  function Rd(e) {
7064
- return !eu(e);
7064
+ return !tu(e);
7065
7065
  }
7066
7066
  function qd(e) {
7067
- return (e == null ? void 0 : e.type) === "user" ? !0 : eu(e) ? !1 : on(e);
7067
+ return (e == null ? void 0 : e.type) === "user" ? !0 : tu(e) ? !1 : on(e);
7068
7068
  }
7069
7069
  function Od(e, t) {
7070
7070
  const u = t == null ? void 0 : t.trim();
@@ -7091,7 +7091,7 @@ function Ld(e) {
7091
7091
  const f = e.getPropIsReadOnly();
7092
7092
  return f !== void 0 ? f : Ed(u.value);
7093
7093
  }), l = N(
7094
- () => eu(u.value)
7094
+ () => tu(u.value)
7095
7095
  ), d = N(
7096
7096
  () => e.getPropSendOptions() ?? Od(
7097
7097
  u.value,
@@ -7583,7 +7583,7 @@ function Qd(e) {
7583
7583
  return {
7584
7584
  uid: s.getUid(),
7585
7585
  displayName: s.getName(),
7586
- avatar: Jt((l = s.getAvatar) == null ? void 0 : l.call(s)) ?? "",
7586
+ avatar: eu((l = s.getAvatar) == null ? void 0 : l.call(s)) ?? "",
7587
7587
  role: s.getScope()
7588
7588
  };
7589
7589
  }), e.onMembersChanged(t.value);
@@ -7599,7 +7599,7 @@ function Qd(e) {
7599
7599
  const f = {
7600
7600
  uid: i.getUid(),
7601
7601
  displayName: i.getName(),
7602
- avatar: Jt((g = i.getAvatar) == null ? void 0 : g.call(i)) ?? "",
7602
+ avatar: eu((g = i.getAvatar) == null ? void 0 : g.call(i)) ?? "",
7603
7603
  role: s ?? ((m = i.getScope) == null ? void 0 : m.call(i)) ?? Z.GROUP_MEMBER_SCOPE.PARTICIPANT
7604
7604
  };
7605
7605
  o === "add" ? t.value.some((w) => w.uid === f.uid) || (t.value = [...t.value, f]) : o === "remove" ? t.value = t.value.filter((w) => w.uid !== f.uid) : t.value = t.value.map(
@@ -7648,7 +7648,7 @@ function Xd(e) {
7648
7648
  He.scrollToMessageId.value === n && (He.scrollToMessageId.value = void 0), He.loadMessageId.value === n && (He.loadMessageId.value = void 0);
7649
7649
  return;
7650
7650
  }
7651
- await gu();
7651
+ await Xt();
7652
7652
  const r = (i = e.chatRootRef.value) == null ? void 0 : i.querySelector(
7653
7653
  `[data-message-id="${n}"]`
7654
7654
  );
@@ -8038,7 +8038,7 @@ function kf(e) {
8038
8038
  a.value += 1, d(), o.value = "", e.updateModelValue("");
8039
8039
  }
8040
8040
  return ro(() => {
8041
- document.addEventListener("pointerdown", D), document.addEventListener("selectionchange", y), gu(() => {
8041
+ document.addEventListener("pointerdown", D), document.addEventListener("selectionchange", y), Xt(() => {
8042
8042
  if (u.value) {
8043
8043
  const C = Ut(
8044
8044
  e.getModelValue()
@@ -8475,7 +8475,7 @@ const Mf = {
8475
8475
  }
8476
8476
  );
8477
8477
  async function Ee() {
8478
- await gu(), C();
8478
+ await Xt(), C();
8479
8479
  }
8480
8480
  t({ focusEditor: Ee });
8481
8481
  function Le(he = "file") {
@@ -8853,7 +8853,7 @@ function y1(e) {
8853
8853
  return;
8854
8854
  B.preventDefault(), B.stopPropagation(), u.value = O;
8855
8855
  const J = g(B);
8856
- await gu(), (ne = t.value) == null || ne.show(B, { x: J.x + 2, y: J.y + 2 });
8856
+ await Xt(), (ne = t.value) == null || ne.show(B, { x: J.x + 2, y: J.y + 2 });
8857
8857
  }
8858
8858
  function w(O, B) {
8859
8859
  m(O, B, "contextmenu");
@@ -8997,17 +8997,30 @@ function T1(e) {
8997
8997
  }
8998
8998
  return Qe(
8999
8999
  () => {
9000
- var r, i, o;
9000
+ var i, o, s, l;
9001
+ const r = e.getMessages();
9001
9002
  return {
9002
- conversationId: ((r = e.getConversation()) == null ? void 0 : r.id) ?? null,
9003
- parentMessageId: ((i = e.getParentMessage()) == null ? void 0 : i.id) ?? null,
9003
+ conversationId: ((i = e.getConversation()) == null ? void 0 : i.id) ?? null,
9004
+ parentMessageId: ((o = e.getParentMessage()) == null ? void 0 : o.id) ?? null,
9004
9005
  loading: e.isLoading(),
9005
- messageCount: e.getMessages().length,
9006
- lastMessageId: ((o = e.getMessages()[e.getMessages().length - 1]) == null ? void 0 : o.id) ?? null
9006
+ messageCount: r.length,
9007
+ firstMessageId: ((s = r[0]) == null ? void 0 : s.id) ?? null,
9008
+ lastMessageId: ((l = r[r.length - 1]) == null ? void 0 : l.id) ?? null
9007
9009
  };
9008
9010
  },
9009
9011
  async (r, i) => {
9010
- (!i || r.conversationId !== i.conversationId || r.parentMessageId !== i.parentMessageId) && (u = !0), !r.loading && u && (await gu(), n());
9012
+ const o = !i || r.conversationId !== i.conversationId || r.parentMessageId !== i.parentMessageId;
9013
+ if (!o && !!i && !u && r.messageCount > i.messageCount && r.firstMessageId !== i.firstMessageId && r.lastMessageId === i.lastMessageId) {
9014
+ const l = t.value;
9015
+ if (!l)
9016
+ return;
9017
+ const d = l.scrollTop, f = l.scrollHeight;
9018
+ await Xt();
9019
+ const x = l.scrollHeight - f;
9020
+ x > 0 && (l.scrollTop = d + x);
9021
+ return;
9022
+ }
9023
+ o && (u = !0), !r.loading && u && (await Xt(), n());
9011
9024
  },
9012
9025
  { immediate: !0 }
9013
9026
  ), {
@@ -9046,10 +9059,10 @@ const k1 = { class: "fullscreen-dialog__content" }, M1 = {
9046
9059
  }, {
9047
9060
  default: je(() => [
9048
9061
  T("div", k1, [
9049
- Xt(a.$slots, "default")
9062
+ Jt(a.$slots, "default")
9050
9063
  ]),
9051
9064
  a.$slots.footer ? (k(), F("div", M1, [
9052
- Xt(a.$slots, "footer")
9065
+ Jt(a.$slots, "footer")
9053
9066
  ])) : ue("", !0)
9054
9067
  ]),
9055
9068
  _: 3
@@ -10068,7 +10081,7 @@ const E1 = ["href"], S1 = { class: "media-viewer-shell flex min-h-0 flex-1 items
10068
10081
  i.value = { left: O, top: B };
10069
10082
  }
10070
10083
  async function f(_, D) {
10071
- o = l(_), s = D ?? null, !(!o && !s) && (r.value = !0, await gu(), await d());
10084
+ o = l(_), s = D ?? null, !(!o && !s) && (r.value = !0, await Xt(), await d());
10072
10085
  }
10073
10086
  function x() {
10074
10087
  r.value && (r.value = !1, o = null, s = null, n("hide"));
@@ -10287,7 +10300,7 @@ const E1 = ["href"], S1 = { class: "media-viewer-shell flex min-h-0 flex-1 items
10287
10300
  ]],
10288
10301
  style: Q.value
10289
10302
  }), [
10290
- x.value ? Xt(G.$slots, "header", {
10303
+ x.value ? Jt(G.$slots, "header", {
10291
10304
  key: 0,
10292
10305
  conversation: b(a).conversation.value,
10293
10306
  parentMessage: d.value,
@@ -10346,7 +10359,7 @@ const E1 = ["href"], S1 = { class: "media-viewer-shell flex min-h-0 flex-1 items
10346
10359
  T("footer", {
10347
10360
  class: ke(["message-list__composer", I.value ? S.value ? "bg-transparent p-0" : "message-list__composer--thread" : "bg-transparent p-0"])
10348
10361
  }, [
10349
- Xt(G.$slots, "composer", {}, void 0, !0)
10362
+ Jt(G.$slots, "composer", {}, void 0, !0)
10350
10363
  ], 2)
10351
10364
  ], 2)) : (k(), F("div", $2, j(b(n)("selectConversationToStart")), 1))
10352
10365
  ], 16),
@@ -10700,7 +10713,7 @@ const E1 = ["href"], S1 = { class: "media-viewer-shell flex min-h-0 flex-1 items
10700
10713
  setup(e) {
10701
10714
  return (t, u) => e.visible ? (k(), F("div", Bp, [
10702
10715
  T("div", Np, [
10703
- e.offlineMode ? (k(), F("span", Up, j(e.messages.waitingForNetwork), 1)) : e.connected ? e.loading ? (k(), F("span", Hp, j(e.messages.loading), 1)) : e.notFound ? (k(), F("span", jp, j(e.messages.notFound), 1)) : e.isEmpty && e.showEmptySlot ? Xt(t.$slots, "no-messages", { key: 4 }, () => [
10716
+ e.offlineMode ? (k(), F("span", Up, j(e.messages.waitingForNetwork), 1)) : e.connected ? e.loading ? (k(), F("span", Hp, j(e.messages.loading), 1)) : e.notFound ? (k(), F("span", jp, j(e.messages.notFound), 1)) : e.isEmpty && e.showEmptySlot ? Jt(t.$slots, "no-messages", { key: 4 }, () => [
10704
10717
  T("span", null, j(e.messages.noMessages), 1)
10705
10718
  ], !0) : ue("", !0) : (k(), F("span", zp, j(e.messages.connecting), 1))
10706
10719
  ])
@@ -10912,7 +10925,7 @@ const E1 = ["href"], S1 = { class: "media-viewer-shell flex min-h-0 flex-1 items
10912
10925
  M.$slots["message-header"] ? {
10913
10926
  name: "header",
10914
10927
  fn: je((ne) => [
10915
- Xt(M.$slots, "message-header", $i(Bi(ne)), void 0, !0)
10928
+ Jt(M.$slots, "message-header", $i(Bi(ne)), void 0, !0)
10916
10929
  ]),
10917
10930
  key: "0"
10918
10931
  } : void 0
@@ -10976,7 +10989,7 @@ const E1 = ["href"], S1 = { class: "media-viewer-shell flex min-h-0 flex-1 items
10976
10989
  }
10977
10990
  }, {
10978
10991
  "no-messages": je(() => [
10979
- Xt(M.$slots, "no-messages", {}, void 0, !0)
10992
+ Jt(M.$slots, "no-messages", {}, void 0, !0)
10980
10993
  ]),
10981
10994
  _: 3
10982
10995
  }, 8, ["visible", "offline-mode", "connected", "loading", "not-found", "is-empty", "show-empty-slot", "messages"])