@bcc-code/vue-bcc-chat-ui 7.0.29 → 7.0.31
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.
- package/dist/index.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/vue-bcc-chat-ui.js +839 -842
- package/dist/vue-bcc-chat-ui.js.map +1 -1
- package/package.json +1 -1
package/dist/vue-bcc-chat-ui.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Ri = Object.defineProperty;
|
|
2
2
|
var qi = (e, t, u) => t in e ? Ri(e, t, { enumerable: !0, configurable: !0, writable: !0, value: u }) : e[t] = u;
|
|
3
3
|
var ca = (e, t, u) => qi(e, typeof t != "symbol" ? t + "" : t, u);
|
|
4
|
-
import { ref as z, computed as U, toValue as Oi, shallowRef as Li, isRef as Pi, watch as Xe, provide as tn, inject as un, onUnmounted as Ba, onMounted as
|
|
4
|
+
import { ref as z, computed as U, toValue as Oi, shallowRef as Li, isRef as Pi, watch as Xe, provide as tn, inject as un, onUnmounted as Ba, onMounted as Zn, nextTick as Xt, openBlock as k, createElementBlock as F, createElementVNode as T, onBeforeUnmount as nn, defineComponent as ye, withDirectives as Yu, Fragment as He, renderList as ht, createBlock as ae, resolveDynamicComponent as nt, toDisplayString as j, unref as _, vShow as $i, normalizeClass as Ce, createVNode as ie, normalizeStyle as gu, withModifiers as Wu, createCommentVNode as ne, withCtx as Ve, vModelText as qn, renderSlot as Jt, createTextVNode as fo, Teleport as Bi, useTemplateRef as On, createSlots as Ni, normalizeProps as Ui, guardReactiveProps as zi } from "vue";
|
|
5
5
|
import { BccButton as at, BccDialog as Na, BccInputText as xr, BccTag as Dt, BccAvatar as Ua, BccProgressSpinner as ho, BccMessage as Hi } from "@bcc-code/component-library-vue";
|
|
6
6
|
import { CometChat as V } from "@cometchat/chat-sdk-javascript";
|
|
7
7
|
const ji = {
|
|
@@ -27,15 +27,15 @@ function $e() {
|
|
|
27
27
|
}
|
|
28
28
|
const po = ":loginAccessToken", Ha = ":token";
|
|
29
29
|
let zu;
|
|
30
|
-
function
|
|
30
|
+
function an(e) {
|
|
31
31
|
return `${$e().appId}${e}`;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
return zu !== void 0 || (zu = localStorage.getItem(
|
|
33
|
+
function Gu() {
|
|
34
|
+
return zu !== void 0 || (zu = localStorage.getItem(an(po))), zu;
|
|
35
35
|
}
|
|
36
36
|
function Da(e) {
|
|
37
37
|
zu = e;
|
|
38
|
-
const t =
|
|
38
|
+
const t = an(po);
|
|
39
39
|
if (e) {
|
|
40
40
|
localStorage.setItem(t, e);
|
|
41
41
|
return;
|
|
@@ -43,17 +43,17 @@ function Da(e) {
|
|
|
43
43
|
localStorage.removeItem(t);
|
|
44
44
|
}
|
|
45
45
|
function ja() {
|
|
46
|
-
const e =
|
|
46
|
+
const e = an(Ha), t = localStorage.getItem(e);
|
|
47
47
|
return t ? JSON.parse(t) : null;
|
|
48
48
|
}
|
|
49
49
|
function Zi() {
|
|
50
50
|
return ja();
|
|
51
51
|
}
|
|
52
52
|
function Vi(e) {
|
|
53
|
-
localStorage.setItem(
|
|
53
|
+
localStorage.setItem(an(Ha), JSON.stringify(e));
|
|
54
54
|
}
|
|
55
55
|
function go() {
|
|
56
|
-
localStorage.removeItem(
|
|
56
|
+
localStorage.removeItem(an(Ha));
|
|
57
57
|
}
|
|
58
58
|
function eu(e) {
|
|
59
59
|
const t = mo(e);
|
|
@@ -63,14 +63,14 @@ function eu(e) {
|
|
|
63
63
|
if (u) {
|
|
64
64
|
try {
|
|
65
65
|
const n = new URL(u);
|
|
66
|
-
if (
|
|
66
|
+
if (Gi(n))
|
|
67
67
|
return `${$e().chatApiBaseUrl}/file-proxy?uri=${encodeURIComponent(u)}`;
|
|
68
68
|
} catch {
|
|
69
69
|
}
|
|
70
70
|
return u;
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function Wi(e) {
|
|
74
74
|
return eu(e) ?? e;
|
|
75
75
|
}
|
|
76
76
|
function mo(e) {
|
|
@@ -89,30 +89,30 @@ function mo(e) {
|
|
|
89
89
|
if (n)
|
|
90
90
|
return mo(n);
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function Gi(e) {
|
|
93
93
|
const { appId: t, region: u } = $e(), n = `data-${u}.cometchat.io`, a = `/${t}/`;
|
|
94
94
|
return e.hostname.toLowerCase() === n.toLowerCase() && e.pathname.startsWith(a);
|
|
95
95
|
}
|
|
96
96
|
const bo = ":chatCacheScope", vo = ":chatCacheOwner";
|
|
97
97
|
let Hu, ju;
|
|
98
|
-
function
|
|
98
|
+
function Ln(e) {
|
|
99
99
|
return `${$e().appId}${e}`;
|
|
100
100
|
}
|
|
101
101
|
function Yi() {
|
|
102
102
|
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `${Date.now()}-${Math.random().toString(36).slice(2)}`;
|
|
103
103
|
}
|
|
104
104
|
function Za() {
|
|
105
|
-
return Hu !== void 0 || (Hu = localStorage.getItem(
|
|
105
|
+
return Hu !== void 0 || (Hu = localStorage.getItem(Ln(bo))), Hu;
|
|
106
106
|
}
|
|
107
107
|
function Ki() {
|
|
108
|
-
return ju !== void 0 || (ju = localStorage.getItem(
|
|
108
|
+
return ju !== void 0 || (ju = localStorage.getItem(Ln(vo))), ju;
|
|
109
109
|
}
|
|
110
110
|
function yr(e) {
|
|
111
111
|
const t = Za(), u = Ki();
|
|
112
112
|
if (t && u === e)
|
|
113
113
|
return t;
|
|
114
114
|
const n = Yi();
|
|
115
|
-
return Hu = n, ju = e, localStorage.setItem(
|
|
115
|
+
return Hu = n, ju = e, localStorage.setItem(Ln(bo), n), localStorage.setItem(Ln(vo), e), n;
|
|
116
116
|
}
|
|
117
117
|
const Qi = {
|
|
118
118
|
addOption: "Add option",
|
|
@@ -351,7 +351,7 @@ const Qi = {
|
|
|
351
351
|
}, _r = {
|
|
352
352
|
en: Qi,
|
|
353
353
|
nb: Xi
|
|
354
|
-
},
|
|
354
|
+
}, rn = z("en");
|
|
355
355
|
function xo(e) {
|
|
356
356
|
return e === "nb" || e === "no" ? "nb" : "en";
|
|
357
357
|
}
|
|
@@ -361,15 +361,15 @@ function Ji(e) {
|
|
|
361
361
|
function Va() {
|
|
362
362
|
return "h23";
|
|
363
363
|
}
|
|
364
|
-
function
|
|
365
|
-
|
|
364
|
+
function Wa(e) {
|
|
365
|
+
rn.value = e;
|
|
366
366
|
}
|
|
367
367
|
function Be(e, t, u) {
|
|
368
|
-
const n = xo(u ??
|
|
368
|
+
const n = xo(u ?? rn.value), a = _r[n][e] ?? _r.en[e];
|
|
369
369
|
return typeof a == "function" ? a(t ?? {}) : a;
|
|
370
370
|
}
|
|
371
371
|
function Oe(e) {
|
|
372
|
-
const t = U(() => Oi(e) ??
|
|
372
|
+
const t = U(() => Oi(e) ?? rn.value);
|
|
373
373
|
return {
|
|
374
374
|
locale: U(() => Ji(t.value)),
|
|
375
375
|
t: (n, a) => Be(n, a, t.value)
|
|
@@ -407,7 +407,7 @@ Ia || (Ia = function(t) {
|
|
|
407
407
|
n[a - 1] = arguments[a];
|
|
408
408
|
return new t(...n);
|
|
409
409
|
});
|
|
410
|
-
const $u = qe(Array.prototype.forEach), ns = qe(Array.prototype.lastIndexOf), Tr = qe(Array.prototype.pop), Bu = qe(Array.prototype.push), as = qe(Array.prototype.splice), Qe = Array.isArray, Zu = qe(String.prototype.toLowerCase), da = qe(String.prototype.toString), kr = qe(String.prototype.match), lu = qe(String.prototype.replace), Mr = qe(String.prototype.indexOf), rs = qe(String.prototype.trim), os = qe(Number.prototype.toString), is = qe(Boolean.prototype.toString), wr = typeof BigInt > "u" ? null : qe(BigInt.prototype.toString), Ar = typeof Symbol > "u" ? null : qe(Symbol.prototype.toString), Se = qe(Object.prototype.hasOwnProperty), Nu = qe(Object.prototype.toString), Ze = qe(RegExp.prototype.test),
|
|
410
|
+
const $u = qe(Array.prototype.forEach), ns = qe(Array.prototype.lastIndexOf), Tr = qe(Array.prototype.pop), Bu = qe(Array.prototype.push), as = qe(Array.prototype.splice), Qe = Array.isArray, Zu = qe(String.prototype.toLowerCase), da = qe(String.prototype.toString), kr = qe(String.prototype.match), lu = qe(String.prototype.replace), Mr = qe(String.prototype.indexOf), rs = qe(String.prototype.trim), os = qe(Number.prototype.toString), is = qe(Boolean.prototype.toString), wr = typeof BigInt > "u" ? null : qe(BigInt.prototype.toString), Ar = typeof Symbol > "u" ? null : qe(Symbol.prototype.toString), Se = qe(Object.prototype.hasOwnProperty), Nu = qe(Object.prototype.toString), Ze = qe(RegExp.prototype.test), Cn = ss(TypeError);
|
|
411
411
|
function qe(e) {
|
|
412
412
|
return function(t) {
|
|
413
413
|
t instanceof RegExp && (t.lastIndex = 0);
|
|
@@ -501,7 +501,7 @@ function ds(e) {
|
|
|
501
501
|
return !1;
|
|
502
502
|
}
|
|
503
503
|
}
|
|
504
|
-
const Er = Je(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), fa = Je(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), ha = Je(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), fs = Je(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), pa = Je(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), hs = Je(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Dr = Je(["#text"]), Sr = Je(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]), ga = Je(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Ir = Je(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]),
|
|
504
|
+
const Er = Je(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), fa = Je(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), ha = Je(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), fs = Je(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), pa = Je(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), hs = Je(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Dr = Je(["#text"]), Sr = Je(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]), ga = Je(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Ir = Je(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), Tn = Je(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), ps = pt(/\{\{[\w\W]*|[\w\W]*\}\}/gm), gs = pt(/<%[\w\W]*|[\w\W]*%>/gm), ms = pt(/\$\{[\w\W]*/gm), bs = pt(/^data-[\-\w.\u00B7-\uFFFF]+$/), vs = pt(/^aria-[\-\w]+$/), _o = pt(
|
|
505
505
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
506
506
|
// eslint-disable-line no-useless-escape
|
|
507
507
|
), xs = pt(/^(?:\w+script|data):/i), ys = pt(
|
|
@@ -579,8 +579,8 @@ function To() {
|
|
|
579
579
|
NamedNodeMap: d = e.NamedNodeMap || e.MozNamedAttrMap,
|
|
580
580
|
HTMLFormElement: f,
|
|
581
581
|
DOMParser: m,
|
|
582
|
-
trustedTypes:
|
|
583
|
-
} = e, h = s.prototype, w = fu(h, "cloneNode"),
|
|
582
|
+
trustedTypes: g
|
|
583
|
+
} = e, h = s.prototype, w = fu(h, "cloneNode"), p = fu(h, "remove"), M = fu(h, "nextSibling"), y = fu(h, "childNodes"), A = fu(h, "parentNode");
|
|
584
584
|
if (typeof o == "function") {
|
|
585
585
|
const ee = u.createElement("template");
|
|
586
586
|
ee.content && ee.content.ownerDocument && (u = ee.content.ownerDocument);
|
|
@@ -594,7 +594,7 @@ function To() {
|
|
|
594
594
|
} = u, {
|
|
595
595
|
importNode: Y
|
|
596
596
|
} = n;
|
|
597
|
-
let
|
|
597
|
+
let L = Rr();
|
|
598
598
|
t.isSupported = typeof yo == "function" && typeof A == "function" && D && D.createHTMLDocument !== void 0;
|
|
599
599
|
const {
|
|
600
600
|
MUSTACHE_EXPR: K,
|
|
@@ -611,7 +611,7 @@ function To() {
|
|
|
611
611
|
} = Fr, de = null;
|
|
612
612
|
const ot = le({}, [...Er, ...fa, ...ha, ...pa, ...Dr]);
|
|
613
613
|
let _e = null;
|
|
614
|
-
const
|
|
614
|
+
const G = le({}, [...Sr, ...ga, ...Ir, ...Tn]);
|
|
615
615
|
let J = Object.seal(du(null, {
|
|
616
616
|
tagNameCheck: {
|
|
617
617
|
writable: !0,
|
|
@@ -631,7 +631,7 @@ function To() {
|
|
|
631
631
|
enumerable: !0,
|
|
632
632
|
value: !1
|
|
633
633
|
}
|
|
634
|
-
})), q = null,
|
|
634
|
+
})), q = null, We = null;
|
|
635
635
|
const ve = Object.seal(du(null, {
|
|
636
636
|
tagCheck: {
|
|
637
637
|
writable: !0,
|
|
@@ -646,14 +646,14 @@ function To() {
|
|
|
646
646
|
value: null
|
|
647
647
|
}
|
|
648
648
|
}));
|
|
649
|
-
let je = !0, Ne = !0, it = !1, St = !0, xe = !1, ce = !0, be = !1, _u = !1, Cu = !1, It = !1, uu = !1, bt = !1, Tu = !0,
|
|
649
|
+
let je = !0, Ne = !0, it = !1, St = !0, xe = !1, ce = !0, be = !1, _u = !1, Cu = !1, It = !1, uu = !1, bt = !1, Tu = !0, Wt = !1;
|
|
650
650
|
const nu = "user-content-";
|
|
651
651
|
let Ft = !0, Rt = !1, kt = {}, et = null;
|
|
652
652
|
const ku = 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"]);
|
|
653
|
-
let
|
|
654
|
-
const
|
|
653
|
+
let dn = null;
|
|
654
|
+
const Gt = le({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
655
655
|
let qt = null;
|
|
656
|
-
const
|
|
656
|
+
const fn = 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", ct = "http://www.w3.org/1999/xhtml";
|
|
657
657
|
let Ot = ct, Mu = !1, wu = null;
|
|
658
658
|
const na = le({}, [au, ru, ct], da);
|
|
659
659
|
let Au = le({}, ["mi", "mo", "mn", "ms", "mtext"]), Eu = le({}, ["annotation-xml"]);
|
|
@@ -661,32 +661,32 @@ function To() {
|
|
|
661
661
|
let Yt = null;
|
|
662
662
|
const ra = ["application/xhtml+xml", "text/html"], Du = "text/html";
|
|
663
663
|
let Ie = null, Lt = null;
|
|
664
|
-
const ou = u.createElement("form"),
|
|
664
|
+
const ou = u.createElement("form"), hn = function(v) {
|
|
665
665
|
return v instanceof RegExp || v instanceof Function;
|
|
666
666
|
}, Su = function() {
|
|
667
667
|
let v = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
668
668
|
if (Lt && Lt === v)
|
|
669
669
|
return;
|
|
670
670
|
(!v || typeof v != "object") && (v = {}), v = ut(v), Yt = // eslint-disable-next-line unicorn/prefer-includes
|
|
671
|
-
ra.indexOf(v.PARSER_MEDIA_TYPE) === -1 ? Du : v.PARSER_MEDIA_TYPE, Ie = Yt === "application/xhtml+xml" ? da : Zu, de = Se(v, "ALLOWED_TAGS") && Qe(v.ALLOWED_TAGS) ? le({}, v.ALLOWED_TAGS, Ie) : ot, _e = Se(v, "ALLOWED_ATTR") && Qe(v.ALLOWED_ATTR) ? le({}, v.ALLOWED_ATTR, Ie) :
|
|
672
|
-
const
|
|
673
|
-
if (J = du(null), Se(
|
|
671
|
+
ra.indexOf(v.PARSER_MEDIA_TYPE) === -1 ? Du : v.PARSER_MEDIA_TYPE, Ie = Yt === "application/xhtml+xml" ? da : Zu, de = Se(v, "ALLOWED_TAGS") && Qe(v.ALLOWED_TAGS) ? le({}, v.ALLOWED_TAGS, Ie) : ot, _e = Se(v, "ALLOWED_ATTR") && Qe(v.ALLOWED_ATTR) ? le({}, v.ALLOWED_ATTR, Ie) : G, wu = Se(v, "ALLOWED_NAMESPACES") && Qe(v.ALLOWED_NAMESPACES) ? le({}, v.ALLOWED_NAMESPACES, da) : na, qt = Se(v, "ADD_URI_SAFE_ATTR") && Qe(v.ADD_URI_SAFE_ATTR) ? le(ut(fn), v.ADD_URI_SAFE_ATTR, Ie) : fn, dn = Se(v, "ADD_DATA_URI_TAGS") && Qe(v.ADD_DATA_URI_TAGS) ? le(ut(Gt), v.ADD_DATA_URI_TAGS, Ie) : Gt, et = Se(v, "FORBID_CONTENTS") && Qe(v.FORBID_CONTENTS) ? le({}, v.FORBID_CONTENTS, Ie) : ku, q = Se(v, "FORBID_TAGS") && Qe(v.FORBID_TAGS) ? le({}, v.FORBID_TAGS, Ie) : ut({}), We = Se(v, "FORBID_ATTR") && Qe(v.FORBID_ATTR) ? le({}, v.FORBID_ATTR, Ie) : ut({}), kt = Se(v, "USE_PROFILES") ? v.USE_PROFILES && typeof v.USE_PROFILES == "object" ? ut(v.USE_PROFILES) : v.USE_PROFILES : !1, je = v.ALLOW_ARIA_ATTR !== !1, Ne = v.ALLOW_DATA_ATTR !== !1, it = v.ALLOW_UNKNOWN_PROTOCOLS || !1, St = v.ALLOW_SELF_CLOSE_IN_ATTR !== !1, xe = v.SAFE_FOR_TEMPLATES || !1, ce = v.SAFE_FOR_XML !== !1, be = v.WHOLE_DOCUMENT || !1, It = v.RETURN_DOM || !1, uu = v.RETURN_DOM_FRAGMENT || !1, bt = v.RETURN_TRUSTED_TYPE || !1, Cu = v.FORCE_BODY || !1, Tu = v.SANITIZE_DOM !== !1, Wt = v.SANITIZE_NAMED_PROPS || !1, Ft = v.KEEP_CONTENT !== !1, Rt = v.IN_PLACE || !1, De = ds(v.ALLOWED_URI_REGEXP) ? v.ALLOWED_URI_REGEXP : _o, Ot = typeof v.NAMESPACE == "string" ? v.NAMESPACE : ct, Au = Se(v, "MATHML_TEXT_INTEGRATION_POINTS") && v.MATHML_TEXT_INTEGRATION_POINTS && typeof v.MATHML_TEXT_INTEGRATION_POINTS == "object" ? ut(v.MATHML_TEXT_INTEGRATION_POINTS) : le({}, ["mi", "mo", "mn", "ms", "mtext"]), Eu = Se(v, "HTML_INTEGRATION_POINTS") && v.HTML_INTEGRATION_POINTS && typeof v.HTML_INTEGRATION_POINTS == "object" ? ut(v.HTML_INTEGRATION_POINTS) : le({}, ["annotation-xml"]);
|
|
672
|
+
const P = Se(v, "CUSTOM_ELEMENT_HANDLING") && v.CUSTOM_ELEMENT_HANDLING && typeof v.CUSTOM_ELEMENT_HANDLING == "object" ? ut(v.CUSTOM_ELEMENT_HANDLING) : du(null);
|
|
673
|
+
if (J = du(null), Se(P, "tagNameCheck") && hn(P.tagNameCheck) && (J.tagNameCheck = P.tagNameCheck), Se(P, "attributeNameCheck") && hn(P.attributeNameCheck) && (J.attributeNameCheck = P.attributeNameCheck), Se(P, "allowCustomizedBuiltInElements") && typeof P.allowCustomizedBuiltInElements == "boolean" && (J.allowCustomizedBuiltInElements = P.allowCustomizedBuiltInElements), xe && (Ne = !1), uu && (It = !0), kt && (de = le({}, Dr), _e = du(null), kt.html === !0 && (le(de, Er), le(_e, Sr)), kt.svg === !0 && (le(de, fa), le(_e, ga), le(_e, Tn)), kt.svgFilters === !0 && (le(de, ha), le(_e, ga), le(_e, Tn)), kt.mathMl === !0 && (le(de, pa), le(_e, Ir), le(_e, Tn))), ve.tagCheck = null, ve.attributeCheck = null, Se(v, "ADD_TAGS") && (typeof v.ADD_TAGS == "function" ? ve.tagCheck = v.ADD_TAGS : Qe(v.ADD_TAGS) && (de === ot && (de = ut(de)), le(de, v.ADD_TAGS, Ie))), Se(v, "ADD_ATTR") && (typeof v.ADD_ATTR == "function" ? ve.attributeCheck = v.ADD_ATTR : Qe(v.ADD_ATTR) && (_e === G && (_e = ut(_e)), le(_e, v.ADD_ATTR, Ie))), Se(v, "ADD_URI_SAFE_ATTR") && Qe(v.ADD_URI_SAFE_ATTR) && le(qt, v.ADD_URI_SAFE_ATTR, Ie), Se(v, "FORBID_CONTENTS") && Qe(v.FORBID_CONTENTS) && (et === ku && (et = ut(et)), le(et, v.FORBID_CONTENTS, Ie)), Se(v, "ADD_FORBID_CONTENTS") && Qe(v.ADD_FORBID_CONTENTS) && (et === ku && (et = ut(et)), le(et, v.ADD_FORBID_CONTENTS, Ie)), Ft && (de["#text"] = !0), be && le(de, ["html", "head", "body"]), de.table && (le(de, ["tbody"]), delete q.tbody), v.TRUSTED_TYPES_POLICY) {
|
|
674
674
|
if (typeof v.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
675
|
-
throw
|
|
675
|
+
throw Cn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
676
676
|
if (typeof v.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
677
|
-
throw
|
|
677
|
+
throw Cn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
678
678
|
C = v.TRUSTED_TYPES_POLICY, S = C.createHTML("");
|
|
679
679
|
} else
|
|
680
|
-
C === void 0 && (C = Ts(
|
|
680
|
+
C === void 0 && (C = Ts(g, a)), C !== null && typeof S == "string" && (S = C.createHTML(""));
|
|
681
681
|
Je && Je(v), Lt = v;
|
|
682
|
-
}, Iu = le({}, [...fa, ...ha, ...fs]), Kt = le({}, [...pa, ...hs]),
|
|
683
|
-
let
|
|
684
|
-
(!
|
|
682
|
+
}, Iu = le({}, [...fa, ...ha, ...fs]), Kt = le({}, [...pa, ...hs]), pn = function(v) {
|
|
683
|
+
let P = A(v);
|
|
684
|
+
(!P || !P.tagName) && (P = {
|
|
685
685
|
namespaceURI: Ot,
|
|
686
686
|
tagName: "template"
|
|
687
687
|
});
|
|
688
|
-
const
|
|
689
|
-
return wu[v.namespaceURI] ? v.namespaceURI === ru ?
|
|
688
|
+
const W = Zu(v.tagName), he = Zu(P.tagName);
|
|
689
|
+
return wu[v.namespaceURI] ? v.namespaceURI === ru ? P.namespaceURI === ct ? W === "svg" : P.namespaceURI === au ? W === "svg" && (he === "annotation-xml" || Au[he]) : !!Iu[W] : v.namespaceURI === au ? P.namespaceURI === ct ? W === "math" : P.namespaceURI === ru ? W === "math" && Eu[he] : !!Kt[W] : v.namespaceURI === ct ? P.namespaceURI === ru && !Eu[he] || P.namespaceURI === au && !Au[he] ? !1 : !Kt[W] && (aa[W] || !Iu[W]) : !!(Yt === "application/xhtml+xml" && wu[v.namespaceURI]) : !1;
|
|
690
690
|
}, tt = function(v) {
|
|
691
691
|
Bu(t.removed, {
|
|
692
692
|
element: v
|
|
@@ -694,56 +694,56 @@ function To() {
|
|
|
694
694
|
try {
|
|
695
695
|
A(v).removeChild(v);
|
|
696
696
|
} catch {
|
|
697
|
-
|
|
697
|
+
p(v);
|
|
698
698
|
}
|
|
699
|
-
}, vt = function(v,
|
|
699
|
+
}, vt = function(v, P) {
|
|
700
700
|
try {
|
|
701
701
|
Bu(t.removed, {
|
|
702
|
-
attribute:
|
|
703
|
-
from:
|
|
702
|
+
attribute: P.getAttributeNode(v),
|
|
703
|
+
from: P
|
|
704
704
|
});
|
|
705
705
|
} catch {
|
|
706
706
|
Bu(t.removed, {
|
|
707
707
|
attribute: null,
|
|
708
|
-
from:
|
|
708
|
+
from: P
|
|
709
709
|
});
|
|
710
710
|
}
|
|
711
|
-
if (
|
|
711
|
+
if (P.removeAttribute(v), v === "is")
|
|
712
712
|
if (It || uu)
|
|
713
713
|
try {
|
|
714
|
-
tt(
|
|
714
|
+
tt(P);
|
|
715
715
|
} catch {
|
|
716
716
|
}
|
|
717
717
|
else
|
|
718
718
|
try {
|
|
719
|
-
|
|
719
|
+
P.setAttribute(v, "");
|
|
720
720
|
} catch {
|
|
721
721
|
}
|
|
722
722
|
}, Fu = function(v) {
|
|
723
|
-
let
|
|
723
|
+
let P = null, W = null;
|
|
724
724
|
if (Cu)
|
|
725
725
|
v = "<remove></remove>" + v;
|
|
726
726
|
else {
|
|
727
727
|
const Ae = kr(v, /^[\r\n\t ]+/);
|
|
728
|
-
|
|
728
|
+
W = Ae && Ae[0];
|
|
729
729
|
}
|
|
730
730
|
Yt === "application/xhtml+xml" && Ot === ct && (v = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + v + "</body></html>");
|
|
731
731
|
const he = C ? C.createHTML(v) : v;
|
|
732
732
|
if (Ot === ct)
|
|
733
733
|
try {
|
|
734
|
-
|
|
734
|
+
P = new m().parseFromString(he, Yt);
|
|
735
735
|
} catch {
|
|
736
736
|
}
|
|
737
|
-
if (!
|
|
738
|
-
|
|
737
|
+
if (!P || !P.documentElement) {
|
|
738
|
+
P = D.createDocument(Ot, "template", null);
|
|
739
739
|
try {
|
|
740
|
-
|
|
740
|
+
P.documentElement.innerHTML = Mu ? S : he;
|
|
741
741
|
} catch {
|
|
742
742
|
}
|
|
743
743
|
}
|
|
744
|
-
const Le =
|
|
745
|
-
return v &&
|
|
746
|
-
},
|
|
744
|
+
const Le = P.body || P.documentElement;
|
|
745
|
+
return v && W && Le.insertBefore(u.createTextNode(W), Le.childNodes[0] || null), Ot === ct ? Z.call(P, be ? "html" : "body")[0] : be ? P.documentElement : Le;
|
|
746
|
+
}, gn = function(v) {
|
|
747
747
|
return I.call(
|
|
748
748
|
v.ownerDocument || v,
|
|
749
749
|
v,
|
|
@@ -756,61 +756,61 @@ function To() {
|
|
|
756
756
|
}, qu = function(v) {
|
|
757
757
|
return typeof i == "function" && v instanceof i;
|
|
758
758
|
};
|
|
759
|
-
function st(ee, v,
|
|
760
|
-
$u(ee, (
|
|
761
|
-
|
|
759
|
+
function st(ee, v, P) {
|
|
760
|
+
$u(ee, (W) => {
|
|
761
|
+
W.call(t, v, P, Lt);
|
|
762
762
|
});
|
|
763
763
|
}
|
|
764
|
-
const
|
|
765
|
-
let
|
|
766
|
-
if (st(
|
|
764
|
+
const mn = function(v) {
|
|
765
|
+
let P = null;
|
|
766
|
+
if (st(L.beforeSanitizeElements, v, null), Ru(v))
|
|
767
767
|
return tt(v), !0;
|
|
768
|
-
const
|
|
769
|
-
if (st(
|
|
770
|
-
tagName:
|
|
768
|
+
const W = Ie(v.nodeName);
|
|
769
|
+
if (st(L.uponSanitizeElement, v, {
|
|
770
|
+
tagName: W,
|
|
771
771
|
allowedTags: de
|
|
772
|
-
}), ce && v.hasChildNodes() && !qu(v.firstElementChild) && Ze(/<[/\w!]/g, v.innerHTML) && Ze(/<[/\w!]/g, v.textContent) || ce && v.namespaceURI === ct &&
|
|
772
|
+
}), ce && v.hasChildNodes() && !qu(v.firstElementChild) && Ze(/<[/\w!]/g, v.innerHTML) && Ze(/<[/\w!]/g, v.textContent) || ce && v.namespaceURI === ct && W === "style" && qu(v.firstElementChild) || v.nodeType === Uu.progressingInstruction || ce && v.nodeType === Uu.comment && Ze(/<[/\w]/g, v.data))
|
|
773
773
|
return tt(v), !0;
|
|
774
|
-
if (q[
|
|
775
|
-
if (!q[
|
|
774
|
+
if (q[W] || !(ve.tagCheck instanceof Function && ve.tagCheck(W)) && !de[W]) {
|
|
775
|
+
if (!q[W] && Ou(W) && (J.tagNameCheck instanceof RegExp && Ze(J.tagNameCheck, W) || J.tagNameCheck instanceof Function && J.tagNameCheck(W)))
|
|
776
776
|
return !1;
|
|
777
|
-
if (Ft && !et[
|
|
777
|
+
if (Ft && !et[W]) {
|
|
778
778
|
const he = A(v) || v.parentNode, Le = y(v) || v.childNodes;
|
|
779
779
|
if (Le && he) {
|
|
780
780
|
const Ae = Le.length;
|
|
781
|
-
for (let
|
|
782
|
-
const Ye = w(Le[
|
|
781
|
+
for (let Ge = Ae - 1; Ge >= 0; --Ge) {
|
|
782
|
+
const Ye = w(Le[Ge], !0);
|
|
783
783
|
he.insertBefore(Ye, M(v));
|
|
784
784
|
}
|
|
785
785
|
}
|
|
786
786
|
}
|
|
787
787
|
return tt(v), !0;
|
|
788
788
|
}
|
|
789
|
-
return v instanceof s && !
|
|
790
|
-
|
|
791
|
-
}), v.textContent !==
|
|
789
|
+
return v instanceof s && !pn(v) || (W === "noscript" || W === "noembed" || W === "noframes") && Ze(/<\/no(script|embed|frames)/i, v.innerHTML) ? (tt(v), !0) : (xe && v.nodeType === Uu.text && (P = v.textContent, $u([K, O, N], (he) => {
|
|
790
|
+
P = lu(P, he, " ");
|
|
791
|
+
}), v.textContent !== P && (Bu(t.removed, {
|
|
792
792
|
element: v.cloneNode()
|
|
793
|
-
}), v.textContent =
|
|
794
|
-
},
|
|
795
|
-
if (
|
|
793
|
+
}), v.textContent = P)), st(L.afterSanitizeElements, v, null), !1);
|
|
794
|
+
}, bn = function(v, P, W) {
|
|
795
|
+
if (We[P] || Tu && (P === "id" || P === "name") && (W in u || W in ou))
|
|
796
796
|
return !1;
|
|
797
|
-
const he = _e[
|
|
798
|
-
if (!(Ne && !
|
|
799
|
-
if (!(je && Ze(te,
|
|
800
|
-
if (!he ||
|
|
797
|
+
const he = _e[P] || ve.attributeCheck instanceof Function && ve.attributeCheck(P, v);
|
|
798
|
+
if (!(Ne && !We[P] && Ze(Q, P))) {
|
|
799
|
+
if (!(je && Ze(te, P))) {
|
|
800
|
+
if (!he || We[P]) {
|
|
801
801
|
if (
|
|
802
802
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
803
803
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
804
804
|
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
805
|
-
!(Ou(v) && (J.tagNameCheck instanceof RegExp && Ze(J.tagNameCheck, v) || J.tagNameCheck instanceof Function && J.tagNameCheck(v)) && (J.attributeNameCheck instanceof RegExp && Ze(J.attributeNameCheck,
|
|
805
|
+
!(Ou(v) && (J.tagNameCheck instanceof RegExp && Ze(J.tagNameCheck, v) || J.tagNameCheck instanceof Function && J.tagNameCheck(v)) && (J.attributeNameCheck instanceof RegExp && Ze(J.attributeNameCheck, P) || J.attributeNameCheck instanceof Function && J.attributeNameCheck(P, v)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
806
806
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
807
|
-
|
|
807
|
+
P === "is" && J.allowCustomizedBuiltInElements && (J.tagNameCheck instanceof RegExp && Ze(J.tagNameCheck, W) || J.tagNameCheck instanceof Function && J.tagNameCheck(W)))
|
|
808
808
|
) return !1;
|
|
809
|
-
} else if (!qt[
|
|
810
|
-
if (!Ze(De, lu(
|
|
811
|
-
if (!((
|
|
812
|
-
if (!(it && !Ze(se, lu(
|
|
813
|
-
if (
|
|
809
|
+
} else if (!qt[P]) {
|
|
810
|
+
if (!Ze(De, lu(W, pe, ""))) {
|
|
811
|
+
if (!((P === "src" || P === "xlink:href" || P === "href") && v !== "script" && Mr(W, "data:") === 0 && dn[v])) {
|
|
812
|
+
if (!(it && !Ze(se, lu(W, pe, "")))) {
|
|
813
|
+
if (W)
|
|
814
814
|
return !1;
|
|
815
815
|
}
|
|
816
816
|
}
|
|
@@ -821,29 +821,29 @@ function To() {
|
|
|
821
821
|
return !0;
|
|
822
822
|
}, Pt = le({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), Ou = function(v) {
|
|
823
823
|
return !Pt[Zu(v)] && Ze(Me, v);
|
|
824
|
-
},
|
|
825
|
-
st(
|
|
824
|
+
}, vn = function(v) {
|
|
825
|
+
st(L.beforeSanitizeAttributes, v, null);
|
|
826
826
|
const {
|
|
827
|
-
attributes:
|
|
827
|
+
attributes: P
|
|
828
828
|
} = v;
|
|
829
|
-
if (!
|
|
829
|
+
if (!P || Ru(v))
|
|
830
830
|
return;
|
|
831
|
-
const
|
|
831
|
+
const W = {
|
|
832
832
|
attrName: "",
|
|
833
833
|
attrValue: "",
|
|
834
834
|
keepAttr: !0,
|
|
835
835
|
allowedAttributes: _e,
|
|
836
836
|
forceKeepAttr: void 0
|
|
837
837
|
};
|
|
838
|
-
let he =
|
|
838
|
+
let he = P.length;
|
|
839
839
|
for (; he--; ) {
|
|
840
|
-
const Le =
|
|
840
|
+
const Le = P[he], {
|
|
841
841
|
name: Ae,
|
|
842
|
-
namespaceURI:
|
|
842
|
+
namespaceURI: Ge,
|
|
843
843
|
value: Ye
|
|
844
844
|
} = Le, Pe = Ie(Ae), wt = Ye;
|
|
845
845
|
let Fe = Ae === "value" ? wt : rs(wt);
|
|
846
|
-
if (
|
|
846
|
+
if (W.attrName = Pe, W.attrValue = Fe, W.keepAttr = !0, W.forceKeepAttr = void 0, st(L.uponSanitizeAttribute, v, W), Fe = W.attrValue, Wt && (Pe === "id" || Pe === "name") && Mr(Fe, nu) !== 0 && (vt(Ae, v), Fe = nu + Fe), ce && Ze(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, Fe)) {
|
|
847
847
|
vt(Ae, v);
|
|
848
848
|
continue;
|
|
849
849
|
}
|
|
@@ -851,9 +851,9 @@ function To() {
|
|
|
851
851
|
vt(Ae, v);
|
|
852
852
|
continue;
|
|
853
853
|
}
|
|
854
|
-
if (
|
|
854
|
+
if (W.forceKeepAttr)
|
|
855
855
|
continue;
|
|
856
|
-
if (!
|
|
856
|
+
if (!W.keepAttr) {
|
|
857
857
|
vt(Ae, v);
|
|
858
858
|
continue;
|
|
859
859
|
}
|
|
@@ -861,16 +861,16 @@ function To() {
|
|
|
861
861
|
vt(Ae, v);
|
|
862
862
|
continue;
|
|
863
863
|
}
|
|
864
|
-
xe && $u([K, O, N], (
|
|
865
|
-
Fe = lu(Fe,
|
|
864
|
+
xe && $u([K, O, N], (yn) => {
|
|
865
|
+
Fe = lu(Fe, yn, " ");
|
|
866
866
|
});
|
|
867
|
-
const
|
|
868
|
-
if (!
|
|
867
|
+
const xn = Ie(v.nodeName);
|
|
868
|
+
if (!bn(xn, Pe, Fe)) {
|
|
869
869
|
vt(Ae, v);
|
|
870
870
|
continue;
|
|
871
871
|
}
|
|
872
|
-
if (C && typeof
|
|
873
|
-
switch (
|
|
872
|
+
if (C && typeof g == "object" && typeof g.getAttributeType == "function" && !Ge)
|
|
873
|
+
switch (g.getAttributeType(xn, Pe)) {
|
|
874
874
|
case "TrustedHTML": {
|
|
875
875
|
Fe = C.createHTML(Fe);
|
|
876
876
|
break;
|
|
@@ -882,23 +882,23 @@ function To() {
|
|
|
882
882
|
}
|
|
883
883
|
if (Fe !== wt)
|
|
884
884
|
try {
|
|
885
|
-
|
|
885
|
+
Ge ? v.setAttributeNS(Ge, Ae, Fe) : v.setAttribute(Ae, Fe), Ru(v) ? tt(v) : Tr(t.removed);
|
|
886
886
|
} catch {
|
|
887
887
|
vt(Ae, v);
|
|
888
888
|
}
|
|
889
889
|
}
|
|
890
|
-
st(
|
|
890
|
+
st(L.afterSanitizeAttributes, v, null);
|
|
891
891
|
}, Mt = function(v) {
|
|
892
|
-
let
|
|
893
|
-
const
|
|
894
|
-
for (st(
|
|
895
|
-
st(
|
|
896
|
-
st(
|
|
892
|
+
let P = null;
|
|
893
|
+
const W = gn(v);
|
|
894
|
+
for (st(L.beforeSanitizeShadowDOM, v, null); P = W.nextNode(); )
|
|
895
|
+
st(L.uponSanitizeShadowNode, P, null), mn(P), vn(P), P.content instanceof r && Mt(P.content);
|
|
896
|
+
st(L.afterSanitizeShadowDOM, v, null);
|
|
897
897
|
};
|
|
898
898
|
return t.sanitize = function(ee) {
|
|
899
|
-
let v = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {},
|
|
899
|
+
let v = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, P = null, W = null, he = null, Le = null;
|
|
900
900
|
if (Mu = !ee, Mu && (ee = "<!-->"), typeof ee != "string" && !qu(ee) && (ee = cs(ee), typeof ee != "string"))
|
|
901
|
-
throw
|
|
901
|
+
throw Cn("dirty is not a string, aborting");
|
|
902
902
|
if (!t.isSupported)
|
|
903
903
|
return ee;
|
|
904
904
|
if (_u || Su(v), t.removed = [], typeof ee == "string" && (Rt = !1), Rt) {
|
|
@@ -906,64 +906,64 @@ function To() {
|
|
|
906
906
|
if (typeof Ye == "string") {
|
|
907
907
|
const Pe = Ie(Ye);
|
|
908
908
|
if (!de[Pe] || q[Pe])
|
|
909
|
-
throw
|
|
909
|
+
throw Cn("root node is forbidden and cannot be sanitized in-place");
|
|
910
910
|
}
|
|
911
911
|
} else if (ee instanceof i)
|
|
912
|
-
|
|
912
|
+
P = Fu("<!---->"), W = P.ownerDocument.importNode(ee, !0), W.nodeType === Uu.element && W.nodeName === "BODY" || W.nodeName === "HTML" ? P = W : P.appendChild(W);
|
|
913
913
|
else {
|
|
914
914
|
if (!It && !xe && !be && // eslint-disable-next-line unicorn/prefer-includes
|
|
915
915
|
ee.indexOf("<") === -1)
|
|
916
916
|
return C && bt ? C.createHTML(ee) : ee;
|
|
917
|
-
if (
|
|
917
|
+
if (P = Fu(ee), !P)
|
|
918
918
|
return It ? null : bt ? S : "";
|
|
919
919
|
}
|
|
920
|
-
|
|
921
|
-
const Ae =
|
|
920
|
+
P && Cu && tt(P.firstChild);
|
|
921
|
+
const Ae = gn(Rt ? ee : P);
|
|
922
922
|
for (; he = Ae.nextNode(); )
|
|
923
|
-
|
|
923
|
+
mn(he), vn(he), he.content instanceof r && Mt(he.content);
|
|
924
924
|
if (Rt)
|
|
925
925
|
return ee;
|
|
926
926
|
if (It) {
|
|
927
927
|
if (xe) {
|
|
928
|
-
|
|
929
|
-
let Ye =
|
|
928
|
+
P.normalize();
|
|
929
|
+
let Ye = P.innerHTML;
|
|
930
930
|
$u([K, O, N], (Pe) => {
|
|
931
931
|
Ye = lu(Ye, Pe, " ");
|
|
932
|
-
}),
|
|
932
|
+
}), P.innerHTML = Ye;
|
|
933
933
|
}
|
|
934
934
|
if (uu)
|
|
935
|
-
for (Le = B.call(
|
|
936
|
-
Le.appendChild(
|
|
935
|
+
for (Le = B.call(P.ownerDocument); P.firstChild; )
|
|
936
|
+
Le.appendChild(P.firstChild);
|
|
937
937
|
else
|
|
938
|
-
Le =
|
|
938
|
+
Le = P;
|
|
939
939
|
return (_e.shadowroot || _e.shadowrootmode) && (Le = Y.call(n, Le, !0)), Le;
|
|
940
940
|
}
|
|
941
|
-
let
|
|
942
|
-
return be && de["!doctype"] &&
|
|
943
|
-
` +
|
|
944
|
-
|
|
945
|
-
}), C && bt ? C.createHTML(
|
|
941
|
+
let Ge = be ? P.outerHTML : P.innerHTML;
|
|
942
|
+
return be && de["!doctype"] && P.ownerDocument && P.ownerDocument.doctype && P.ownerDocument.doctype.name && Ze(Co, P.ownerDocument.doctype.name) && (Ge = "<!DOCTYPE " + P.ownerDocument.doctype.name + `>
|
|
943
|
+
` + Ge), xe && $u([K, O, N], (Ye) => {
|
|
944
|
+
Ge = lu(Ge, Ye, " ");
|
|
945
|
+
}), C && bt ? C.createHTML(Ge) : Ge;
|
|
946
946
|
}, t.setConfig = function() {
|
|
947
947
|
let ee = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
948
948
|
Su(ee), _u = !0;
|
|
949
949
|
}, t.clearConfig = function() {
|
|
950
950
|
Lt = null, _u = !1;
|
|
951
|
-
}, t.isValidAttribute = function(ee, v,
|
|
951
|
+
}, t.isValidAttribute = function(ee, v, P) {
|
|
952
952
|
Lt || Su({});
|
|
953
|
-
const
|
|
954
|
-
return
|
|
953
|
+
const W = Ie(ee), he = Ie(v);
|
|
954
|
+
return bn(W, he, P);
|
|
955
955
|
}, t.addHook = function(ee, v) {
|
|
956
|
-
typeof v == "function" && Bu(
|
|
956
|
+
typeof v == "function" && Bu(L[ee], v);
|
|
957
957
|
}, t.removeHook = function(ee, v) {
|
|
958
958
|
if (v !== void 0) {
|
|
959
|
-
const
|
|
960
|
-
return
|
|
959
|
+
const P = ns(L[ee], v);
|
|
960
|
+
return P === -1 ? void 0 : as(L[ee], P, 1)[0];
|
|
961
961
|
}
|
|
962
|
-
return Tr(
|
|
962
|
+
return Tr(L[ee]);
|
|
963
963
|
}, t.removeHooks = function(ee) {
|
|
964
|
-
|
|
964
|
+
L[ee] = [];
|
|
965
965
|
}, t.removeAllHooks = function() {
|
|
966
|
-
|
|
966
|
+
L = Rr();
|
|
967
967
|
}, t;
|
|
968
968
|
}
|
|
969
969
|
var ko = To();
|
|
@@ -1039,8 +1039,8 @@ function Ms(e) {
|
|
|
1039
1039
|
t[e.charCodeAt(u)] = e[u];
|
|
1040
1040
|
return t;
|
|
1041
1041
|
}
|
|
1042
|
-
function
|
|
1043
|
-
typeof t != "string" && (u = t, t =
|
|
1042
|
+
function on(e, t, u) {
|
|
1043
|
+
typeof t != "string" && (u = t, t = on.defaultChars), typeof u > "u" && (u = !0);
|
|
1044
1044
|
const n = Ms(t);
|
|
1045
1045
|
let a = "";
|
|
1046
1046
|
for (let r = 0, o = e.length; r < o; r++) {
|
|
@@ -1068,13 +1068,13 @@ function rn(e, t, u) {
|
|
|
1068
1068
|
}
|
|
1069
1069
|
return a;
|
|
1070
1070
|
}
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
function
|
|
1071
|
+
on.defaultChars = ";/?:@&=+$,-_.!~*'()#";
|
|
1072
|
+
on.componentChars = "-_.!~*'()";
|
|
1073
|
+
function Ga(e) {
|
|
1074
1074
|
let t = "";
|
|
1075
1075
|
return t += e.protocol || "", t += e.slashes ? "//" : "", t += e.auth ? e.auth + "@" : "", e.hostname && e.hostname.indexOf(":") !== -1 ? t += "[" + e.hostname + "]" : t += e.hostname || "", t += e.port ? ":" + e.port : "", t += e.pathname || "", t += e.search || "", t += e.hash || "", t;
|
|
1076
1076
|
}
|
|
1077
|
-
function
|
|
1077
|
+
function Pn() {
|
|
1078
1078
|
this.protocol = null, this.slashes = null, this.auth = null, this.port = null, this.hostname = null, this.hash = null, this.search = null, this.pathname = null;
|
|
1079
1079
|
}
|
|
1080
1080
|
const ws = /^([a-z0-9.+-]+:)/i, As = /:[0-9]*$/, Es = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, Ds = ["<", ">", '"', "`", " ", "\r", `
|
|
@@ -1094,11 +1094,11 @@ const ws = /^([a-z0-9.+-]+:)/i, As = /:[0-9]*$/, Es = /^(\/\/?(?!\/)[^\?\s]*)(\?
|
|
|
1094
1094
|
"file:": !0
|
|
1095
1095
|
};
|
|
1096
1096
|
function Ya(e, t) {
|
|
1097
|
-
if (e && e instanceof
|
|
1098
|
-
const u = new
|
|
1097
|
+
if (e && e instanceof Pn) return e;
|
|
1098
|
+
const u = new Pn();
|
|
1099
1099
|
return u.parse(e, t), u;
|
|
1100
1100
|
}
|
|
1101
|
-
|
|
1101
|
+
Pn.prototype.parse = function(e, t) {
|
|
1102
1102
|
let u, n, a, r = e;
|
|
1103
1103
|
if (r = r.trim(), !t && e.split("#").length === 1) {
|
|
1104
1104
|
const l = Es.exec(r);
|
|
@@ -1117,10 +1117,10 @@ Ln.prototype.parse = function(e, t) {
|
|
|
1117
1117
|
l === -1 && (l = r.length), r[l - 1] === ":" && l--;
|
|
1118
1118
|
const m = r.slice(0, l);
|
|
1119
1119
|
r = r.slice(l), this.parseHost(m), this.hostname = this.hostname || "";
|
|
1120
|
-
const
|
|
1121
|
-
if (!
|
|
1120
|
+
const g = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
|
|
1121
|
+
if (!g) {
|
|
1122
1122
|
const h = this.hostname.split(/\./);
|
|
1123
|
-
for (let w = 0,
|
|
1123
|
+
for (let w = 0, p = h.length; w < p; w++) {
|
|
1124
1124
|
const M = h[w];
|
|
1125
1125
|
if (M && !M.match($r)) {
|
|
1126
1126
|
let y = "";
|
|
@@ -1134,22 +1134,22 @@ Ln.prototype.parse = function(e, t) {
|
|
|
1134
1134
|
}
|
|
1135
1135
|
}
|
|
1136
1136
|
}
|
|
1137
|
-
this.hostname.length > Fs && (this.hostname = ""),
|
|
1137
|
+
this.hostname.length > Fs && (this.hostname = ""), g && (this.hostname = this.hostname.substr(1, this.hostname.length - 2));
|
|
1138
1138
|
}
|
|
1139
1139
|
const i = r.indexOf("#");
|
|
1140
1140
|
i !== -1 && (this.hash = r.substr(i), r = r.slice(0, i));
|
|
1141
1141
|
const s = r.indexOf("?");
|
|
1142
1142
|
return s !== -1 && (this.search = r.substr(s), r = r.slice(0, s)), r && (this.pathname = r), Nr[u] && this.hostname && !this.pathname && (this.pathname = ""), this;
|
|
1143
1143
|
};
|
|
1144
|
-
|
|
1144
|
+
Pn.prototype.parseHost = function(e) {
|
|
1145
1145
|
let t = As.exec(e);
|
|
1146
1146
|
t && (t = t[0], t !== ":" && (this.port = t.substr(1)), e = e.substr(0, e.length - t.length)), e && (this.hostname = e);
|
|
1147
1147
|
};
|
|
1148
1148
|
const qs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1149
1149
|
__proto__: null,
|
|
1150
1150
|
decode: mu,
|
|
1151
|
-
encode:
|
|
1152
|
-
format:
|
|
1151
|
+
encode: on,
|
|
1152
|
+
format: Ga,
|
|
1153
1153
|
parse: Ya
|
|
1154
1154
|
}, Symbol.toStringTag, { value: "Module" })), Mo = /[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, wo = /[\0-\x1F\x7F-\x9F]/, Os = /[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/, Ka = /[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/, Ao = /[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/, Eo = /[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/, Ls = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1155
1155
|
__proto__: null,
|
|
@@ -1365,7 +1365,7 @@ class Vs {
|
|
|
1365
1365
|
let a = n[this.treeIndex], r = (a & jt.VALUE_LENGTH) >> 14;
|
|
1366
1366
|
for (; u < t.length; u++, this.excess++) {
|
|
1367
1367
|
const o = t.charCodeAt(u);
|
|
1368
|
-
if (this.treeIndex =
|
|
1368
|
+
if (this.treeIndex = Ws(n, a, this.treeIndex + Math.max(1, r), o), this.treeIndex < 0)
|
|
1369
1369
|
return this.result === 0 || // If we are parsing an attribute
|
|
1370
1370
|
this.decodeMode === Ht.Attribute && // We shouldn't have consumed any characters after the entity,
|
|
1371
1371
|
(r === 0 || // And there should be no invalid characters.
|
|
@@ -1446,7 +1446,7 @@ function Do(e) {
|
|
|
1446
1446
|
return t = "", s;
|
|
1447
1447
|
};
|
|
1448
1448
|
}
|
|
1449
|
-
function
|
|
1449
|
+
function Ws(e, t, u, n) {
|
|
1450
1450
|
const a = (t & jt.BRANCH_LENGTH) >> 7, r = t & jt.JUMP_TABLE;
|
|
1451
1451
|
if (a === 0)
|
|
1452
1452
|
return r !== 0 && n === r ? u : -1;
|
|
@@ -1466,10 +1466,10 @@ function Gs(e, t, u, n) {
|
|
|
1466
1466
|
}
|
|
1467
1467
|
return -1;
|
|
1468
1468
|
}
|
|
1469
|
-
const
|
|
1469
|
+
const Gs = Do(Ps);
|
|
1470
1470
|
Do($s);
|
|
1471
1471
|
function So(e, t = Ht.Legacy) {
|
|
1472
|
-
return
|
|
1472
|
+
return Gs(e, t);
|
|
1473
1473
|
}
|
|
1474
1474
|
function Ys(e) {
|
|
1475
1475
|
return Object.prototype.toString.call(e);
|
|
@@ -1498,7 +1498,7 @@ function Io(e, t, u) {
|
|
|
1498
1498
|
function Xa(e) {
|
|
1499
1499
|
return !(e >= 55296 && e <= 57343 || e >= 64976 && e <= 65007 || (e & 65535) === 65535 || (e & 65535) === 65534 || e >= 0 && e <= 8 || e === 11 || e >= 14 && e <= 31 || e >= 127 && e <= 159 || e > 1114111);
|
|
1500
1500
|
}
|
|
1501
|
-
function
|
|
1501
|
+
function $n(e) {
|
|
1502
1502
|
if (e > 65535) {
|
|
1503
1503
|
e -= 65536;
|
|
1504
1504
|
const t = 55296 + (e >> 10), u = 56320 + (e & 1023);
|
|
@@ -1510,7 +1510,7 @@ const Fo = /\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g, Xs = /&([a-z#][a-z0-9]{
|
|
|
1510
1510
|
function tl(e, t) {
|
|
1511
1511
|
if (t.charCodeAt(0) === 35 && el.test(t)) {
|
|
1512
1512
|
const n = t[1].toLowerCase() === "x" ? parseInt(t.slice(2), 16) : parseInt(t.slice(1), 10);
|
|
1513
|
-
return Xa(n) ?
|
|
1513
|
+
return Xa(n) ? $n(n) : e;
|
|
1514
1514
|
}
|
|
1515
1515
|
const u = So(e);
|
|
1516
1516
|
return u !== e ? u : e;
|
|
@@ -1608,7 +1608,7 @@ function Xu(e) {
|
|
|
1608
1608
|
return !1;
|
|
1609
1609
|
}
|
|
1610
1610
|
}
|
|
1611
|
-
function
|
|
1611
|
+
function Wn(e) {
|
|
1612
1612
|
return e = e.trim().replace(/\s+/g, " "), "ẞ".toLowerCase() === "Ṿ" && (e = e.replace(/ẞ/g, "ß")), e.toLowerCase().toUpperCase();
|
|
1613
1613
|
}
|
|
1614
1614
|
const ll = { mdurl: qs, ucmicro: Ls }, cl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -1617,7 +1617,7 @@ const ll = { mdurl: qs, ucmicro: Ls }, cl = /* @__PURE__ */ Object.freeze(/* @__
|
|
|
1617
1617
|
assign: Vn,
|
|
1618
1618
|
escapeHtml: Vt,
|
|
1619
1619
|
escapeRE: sl,
|
|
1620
|
-
fromCodePoint:
|
|
1620
|
+
fromCodePoint: $n,
|
|
1621
1621
|
has: Qs,
|
|
1622
1622
|
isMdAsciiPunct: Xu,
|
|
1623
1623
|
isPunctChar: Qu,
|
|
@@ -1626,7 +1626,7 @@ const ll = { mdurl: qs, ucmicro: Ls }, cl = /* @__PURE__ */ Object.freeze(/* @__
|
|
|
1626
1626
|
isValidEntityCode: Xa,
|
|
1627
1627
|
isWhiteSpace: Ku,
|
|
1628
1628
|
lib: ll,
|
|
1629
|
-
normalizeReference:
|
|
1629
|
+
normalizeReference: Wn,
|
|
1630
1630
|
unescapeAll: bu,
|
|
1631
1631
|
unescapeMd: ul
|
|
1632
1632
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -2016,13 +2016,13 @@ function Cl(e) {
|
|
|
2016
2016
|
const d = [];
|
|
2017
2017
|
let f = i.level, m = 0;
|
|
2018
2018
|
l.length > 0 && l[0].index === 0 && o > 0 && a[o - 1].type === "text_special" && (l = l.slice(1));
|
|
2019
|
-
for (let
|
|
2020
|
-
const h = l[
|
|
2019
|
+
for (let g = 0; g < l.length; g++) {
|
|
2020
|
+
const h = l[g].url, w = e.md.normalizeLink(h);
|
|
2021
2021
|
if (!e.md.validateLink(w))
|
|
2022
2022
|
continue;
|
|
2023
|
-
let
|
|
2024
|
-
l[
|
|
2025
|
-
const M = l[
|
|
2023
|
+
let p = l[g].text;
|
|
2024
|
+
l[g].schema ? l[g].schema === "mailto:" && !/^mailto:/i.test(p) ? p = e.md.normalizeLinkText("mailto:" + p).replace(/^mailto:/, "") : p = e.md.normalizeLinkText(p) : p = e.md.normalizeLinkText("http://" + p).replace(/^http:\/\//, "");
|
|
2025
|
+
const M = l[g].index;
|
|
2026
2026
|
if (M > m) {
|
|
2027
2027
|
const S = new e.Token("text", "", 0);
|
|
2028
2028
|
S.content = s.slice(m, M), S.level = f, d.push(S);
|
|
@@ -2030,13 +2030,13 @@ function Cl(e) {
|
|
|
2030
2030
|
const y = new e.Token("link_open", "a", 1);
|
|
2031
2031
|
y.attrs = [["href", w]], y.level = f++, y.markup = "linkify", y.info = "auto", d.push(y);
|
|
2032
2032
|
const A = new e.Token("text", "", 0);
|
|
2033
|
-
A.content =
|
|
2033
|
+
A.content = p, A.level = f, d.push(A);
|
|
2034
2034
|
const C = new e.Token("link_close", "a", -1);
|
|
2035
|
-
C.level = --f, C.markup = "linkify", C.info = "auto", d.push(C), m = l[
|
|
2035
|
+
C.level = --f, C.markup = "linkify", C.info = "auto", d.push(C), m = l[g].lastIndex;
|
|
2036
2036
|
}
|
|
2037
2037
|
if (m < s.length) {
|
|
2038
|
-
const
|
|
2039
|
-
|
|
2038
|
+
const g = new e.Token("text", "", 0);
|
|
2039
|
+
g.content = s.slice(m), g.level = f, d.push(g);
|
|
2040
2040
|
}
|
|
2041
2041
|
t[u].children = a = Io(a, o, d);
|
|
2042
2042
|
}
|
|
@@ -2072,7 +2072,7 @@ function Dl(e) {
|
|
|
2072
2072
|
e.tokens[t].type === "inline" && (Tl.test(e.tokens[t].content) && Al(e.tokens[t].children), qo.test(e.tokens[t].content) && El(e.tokens[t].children));
|
|
2073
2073
|
}
|
|
2074
2074
|
const Sl = /['"]/, Ur = /['"]/g, zr = "’";
|
|
2075
|
-
function
|
|
2075
|
+
function kn(e, t, u) {
|
|
2076
2076
|
return e.slice(0, t) + u + e.slice(t + 1);
|
|
2077
2077
|
}
|
|
2078
2078
|
function Il(e, t) {
|
|
@@ -2093,7 +2093,7 @@ function Il(e, t) {
|
|
|
2093
2093
|
break;
|
|
2094
2094
|
let f = !0, m = !0;
|
|
2095
2095
|
s = d.index + 1;
|
|
2096
|
-
const
|
|
2096
|
+
const g = d[0] === "'";
|
|
2097
2097
|
let h = 32;
|
|
2098
2098
|
if (d.index - 1 >= 0)
|
|
2099
2099
|
h = i.charCodeAt(d.index - 1);
|
|
@@ -2112,9 +2112,9 @@ function Il(e, t) {
|
|
|
2112
2112
|
w = e[u].content.charCodeAt(0);
|
|
2113
2113
|
break;
|
|
2114
2114
|
}
|
|
2115
|
-
const
|
|
2116
|
-
if (A ? f = !1 : M && (y ||
|
|
2117
|
-
|
|
2115
|
+
const p = Xu(h) || Qu(String.fromCharCode(h)), M = Xu(w) || Qu(String.fromCharCode(w)), y = Ku(h), A = Ku(w);
|
|
2116
|
+
if (A ? f = !1 : M && (y || p || (f = !1)), y ? m = !1 : p && (A || M || (m = !1)), w === 34 && d[0] === '"' && h >= 48 && h <= 57 && (m = f = !1), f && m && (f = p, m = M), !f && !m) {
|
|
2117
|
+
g && (r.content = kn(r.content, d.index, zr));
|
|
2118
2118
|
continue;
|
|
2119
2119
|
}
|
|
2120
2120
|
if (m)
|
|
@@ -2122,10 +2122,10 @@ function Il(e, t) {
|
|
|
2122
2122
|
let C = n[u];
|
|
2123
2123
|
if (n[u].level < o)
|
|
2124
2124
|
break;
|
|
2125
|
-
if (C.single ===
|
|
2125
|
+
if (C.single === g && n[u].level === o) {
|
|
2126
2126
|
C = n[u];
|
|
2127
2127
|
let S, D;
|
|
2128
|
-
|
|
2128
|
+
g ? (S = t.md.options.quotes[2], D = t.md.options.quotes[3]) : (S = t.md.options.quotes[0], D = t.md.options.quotes[1]), r.content = kn(r.content, d.index, D), e[C.token].content = kn(
|
|
2129
2129
|
e[C.token].content,
|
|
2130
2130
|
C.pos,
|
|
2131
2131
|
S
|
|
@@ -2136,9 +2136,9 @@ function Il(e, t) {
|
|
|
2136
2136
|
f ? n.push({
|
|
2137
2137
|
token: a,
|
|
2138
2138
|
pos: d.index,
|
|
2139
|
-
single:
|
|
2139
|
+
single: g,
|
|
2140
2140
|
level: o
|
|
2141
|
-
}) : m &&
|
|
2141
|
+
}) : m && g && (r.content = kn(r.content, d.index, zr));
|
|
2142
2142
|
}
|
|
2143
2143
|
}
|
|
2144
2144
|
}
|
|
@@ -2317,10 +2317,10 @@ function Ol(e, t, u, n) {
|
|
|
2317
2317
|
return !0;
|
|
2318
2318
|
const m = e.parentType;
|
|
2319
2319
|
e.parentType = "table";
|
|
2320
|
-
const
|
|
2320
|
+
const g = e.md.block.ruler.getRules("blockquote"), h = e.push("table_open", "table", 1), w = [t, 0];
|
|
2321
2321
|
h.map = w;
|
|
2322
|
-
const
|
|
2323
|
-
|
|
2322
|
+
const p = e.push("thead_open", "thead", 1);
|
|
2323
|
+
p.map = [t, t + 1];
|
|
2324
2324
|
const M = e.push("tr_open", "tr", 1);
|
|
2325
2325
|
M.map = [t, t + 1];
|
|
2326
2326
|
for (let C = 0; C < l.length; C++) {
|
|
@@ -2333,8 +2333,8 @@ function Ol(e, t, u, n) {
|
|
|
2333
2333
|
let y, A = 0;
|
|
2334
2334
|
for (a = t + 2; a < u && !(e.sCount[a] < e.blkIndent); a++) {
|
|
2335
2335
|
let C = !1;
|
|
2336
|
-
for (let D = 0, I =
|
|
2337
|
-
if (
|
|
2336
|
+
for (let D = 0, I = g.length; D < I; D++)
|
|
2337
|
+
if (g[D](e, a, u, !0)) {
|
|
2338
2338
|
C = !0;
|
|
2339
2339
|
break;
|
|
2340
2340
|
}
|
|
@@ -2400,8 +2400,8 @@ function Pl(e, t, u, n) {
|
|
|
2400
2400
|
break;
|
|
2401
2401
|
}
|
|
2402
2402
|
s = e.sCount[t], e.line = f + (m ? 1 : 0);
|
|
2403
|
-
const
|
|
2404
|
-
return
|
|
2403
|
+
const g = e.push("fence", "code", 0);
|
|
2404
|
+
return g.info = d, g.content = e.getLines(t + 1, f, s, !0), g.markup = l, g.map = [t, e.line], !0;
|
|
2405
2405
|
}
|
|
2406
2406
|
function $l(e, t, u, n) {
|
|
2407
2407
|
let a = e.bMarks[t] + e.tShift[t], r = e.eMarks[t];
|
|
@@ -2412,7 +2412,7 @@ function $l(e, t, u, n) {
|
|
|
2412
2412
|
return !0;
|
|
2413
2413
|
const i = [], s = [], l = [], d = [], f = e.md.block.ruler.getRules("blockquote"), m = e.parentType;
|
|
2414
2414
|
e.parentType = "blockquote";
|
|
2415
|
-
let
|
|
2415
|
+
let g = !1, h;
|
|
2416
2416
|
for (h = t; h < u; h++) {
|
|
2417
2417
|
const A = e.sCount[h] < e.blkIndent;
|
|
2418
2418
|
if (a = e.bMarks[h] + e.tShift[h], r = e.eMarks[h], a >= r)
|
|
@@ -2429,10 +2429,10 @@ function $l(e, t, u, n) {
|
|
|
2429
2429
|
break;
|
|
2430
2430
|
a++;
|
|
2431
2431
|
}
|
|
2432
|
-
|
|
2432
|
+
g = a >= r, s.push(e.bsCount[h]), e.bsCount[h] = e.sCount[h] + 1 + (D ? 1 : 0), l.push(e.sCount[h]), e.sCount[h] = B - S, d.push(e.tShift[h]), e.tShift[h] = a - e.bMarks[h];
|
|
2433
2433
|
continue;
|
|
2434
2434
|
}
|
|
2435
|
-
if (
|
|
2435
|
+
if (g)
|
|
2436
2436
|
break;
|
|
2437
2437
|
let C = !1;
|
|
2438
2438
|
for (let S = 0, D = f.length; S < D; S++)
|
|
@@ -2448,10 +2448,10 @@ function $l(e, t, u, n) {
|
|
|
2448
2448
|
}
|
|
2449
2449
|
const w = e.blkIndent;
|
|
2450
2450
|
e.blkIndent = 0;
|
|
2451
|
-
const
|
|
2452
|
-
|
|
2451
|
+
const p = e.push("blockquote_open", "blockquote", 1);
|
|
2452
|
+
p.markup = ">";
|
|
2453
2453
|
const M = [t, 0];
|
|
2454
|
-
|
|
2454
|
+
p.map = M, e.md.block.tokenize(e, t, h);
|
|
2455
2455
|
const y = e.push("blockquote_close", "blockquote", -1);
|
|
2456
2456
|
y.markup = ">", e.lineMax = o, e.parentType = m, M[1] = e.line;
|
|
2457
2457
|
for (let A = 0; A < d.length; A++)
|
|
@@ -2527,26 +2527,26 @@ function Ul(e, t, u, n) {
|
|
|
2527
2527
|
return !1;
|
|
2528
2528
|
let d = !1;
|
|
2529
2529
|
n && e.parentType === "paragraph" && e.sCount[s] >= e.blkIndent && (d = !0);
|
|
2530
|
-
let f, m,
|
|
2531
|
-
if ((
|
|
2532
|
-
if (f = !0, o = e.bMarks[s] + e.tShift[s], m = Number(e.src.slice(o,
|
|
2533
|
-
} else if ((
|
|
2530
|
+
let f, m, g;
|
|
2531
|
+
if ((g = Zr(e, s)) >= 0) {
|
|
2532
|
+
if (f = !0, o = e.bMarks[s] + e.tShift[s], m = Number(e.src.slice(o, g - 1)), d && m !== 1) return !1;
|
|
2533
|
+
} else if ((g = jr(e, s)) >= 0)
|
|
2534
2534
|
f = !1;
|
|
2535
2535
|
else
|
|
2536
2536
|
return !1;
|
|
2537
|
-
if (d && e.skipSpaces(
|
|
2537
|
+
if (d && e.skipSpaces(g) >= e.eMarks[s])
|
|
2538
2538
|
return !1;
|
|
2539
2539
|
if (n)
|
|
2540
2540
|
return !0;
|
|
2541
|
-
const h = e.src.charCodeAt(
|
|
2541
|
+
const h = e.src.charCodeAt(g - 1), w = e.tokens.length;
|
|
2542
2542
|
f ? (i = e.push("ordered_list_open", "ol", 1), m !== 1 && (i.attrs = [["start", m]])) : i = e.push("bullet_list_open", "ul", 1);
|
|
2543
|
-
const
|
|
2544
|
-
i.map =
|
|
2543
|
+
const p = [s, 0];
|
|
2544
|
+
i.map = p, i.markup = String.fromCharCode(h);
|
|
2545
2545
|
let M = !1;
|
|
2546
2546
|
const y = e.md.block.ruler.getRules("list"), A = e.parentType;
|
|
2547
2547
|
for (e.parentType = "list"; s < u; ) {
|
|
2548
|
-
r =
|
|
2549
|
-
const C = e.sCount[s] +
|
|
2548
|
+
r = g, a = e.eMarks[s];
|
|
2549
|
+
const C = e.sCount[s] + g - (e.bMarks[s] + e.tShift[s]);
|
|
2550
2550
|
let S = C;
|
|
2551
2551
|
for (; r < a; ) {
|
|
2552
2552
|
const Q = e.src.charCodeAt(r);
|
|
@@ -2564,9 +2564,9 @@ function Ul(e, t, u, n) {
|
|
|
2564
2564
|
const B = C + I;
|
|
2565
2565
|
i = e.push("list_item_open", "li", 1), i.markup = String.fromCharCode(h);
|
|
2566
2566
|
const Z = [s, 0];
|
|
2567
|
-
i.map = Z, f && (i.info = e.src.slice(o,
|
|
2568
|
-
const Y = e.tight,
|
|
2569
|
-
if (e.listIndent = e.blkIndent, e.blkIndent = B, e.tight = !0, e.tShift[s] = D - e.bMarks[s], e.sCount[s] = S, D >= a && e.isEmpty(s + 1) ? e.line = Math.min(e.line + 2, u) : e.md.block.tokenize(e, s, u, !0), (!e.tight || M) && (l = !1), M = e.line - s > 1 && e.isEmpty(e.line - 1), e.blkIndent = e.listIndent, e.listIndent = O, e.tShift[s] =
|
|
2567
|
+
i.map = Z, f && (i.info = e.src.slice(o, g - 1));
|
|
2568
|
+
const Y = e.tight, L = e.tShift[s], K = e.sCount[s], O = e.listIndent;
|
|
2569
|
+
if (e.listIndent = e.blkIndent, e.blkIndent = B, e.tight = !0, e.tShift[s] = D - e.bMarks[s], e.sCount[s] = S, D >= a && e.isEmpty(s + 1) ? e.line = Math.min(e.line + 2, u) : e.md.block.tokenize(e, s, u, !0), (!e.tight || M) && (l = !1), M = e.line - s > 1 && e.isEmpty(e.line - 1), e.blkIndent = e.listIndent, e.listIndent = O, e.tShift[s] = L, e.sCount[s] = K, e.tight = Y, i = e.push("list_item_close", "li", -1), i.markup = String.fromCharCode(h), s = e.line, Z[1] = s, s >= u || e.sCount[s] < e.blkIndent || e.sCount[s] - e.blkIndent >= 4)
|
|
2570
2570
|
break;
|
|
2571
2571
|
let N = !1;
|
|
2572
2572
|
for (let Q = 0, te = y.length; Q < te; Q++)
|
|
@@ -2577,15 +2577,15 @@ function Ul(e, t, u, n) {
|
|
|
2577
2577
|
if (N)
|
|
2578
2578
|
break;
|
|
2579
2579
|
if (f) {
|
|
2580
|
-
if (
|
|
2580
|
+
if (g = Zr(e, s), g < 0)
|
|
2581
2581
|
break;
|
|
2582
2582
|
o = e.bMarks[s] + e.tShift[s];
|
|
2583
|
-
} else if (
|
|
2583
|
+
} else if (g = jr(e, s), g < 0)
|
|
2584
2584
|
break;
|
|
2585
|
-
if (h !== e.src.charCodeAt(
|
|
2585
|
+
if (h !== e.src.charCodeAt(g - 1))
|
|
2586
2586
|
break;
|
|
2587
2587
|
}
|
|
2588
|
-
return f ? i = e.push("ordered_list_close", "ol", -1) : i = e.push("bullet_list_close", "ul", -1), i.markup = String.fromCharCode(h),
|
|
2588
|
+
return f ? i = e.push("ordered_list_close", "ol", -1) : i = e.push("bullet_list_close", "ul", -1), i.markup = String.fromCharCode(h), p[1] = s, e.line = s, e.parentType = A, l && Nl(e, w), !0;
|
|
2589
2589
|
}
|
|
2590
2590
|
function zl(e, t, u, n) {
|
|
2591
2591
|
let a = e.bMarks[t] + e.tShift[t], r = e.eMarks[t], o = t + 1;
|
|
@@ -2600,7 +2600,7 @@ function zl(e, t, u, n) {
|
|
|
2600
2600
|
const I = e.md.block.ruler.getRules("reference"), B = e.parentType;
|
|
2601
2601
|
e.parentType = "reference";
|
|
2602
2602
|
let Z = !1;
|
|
2603
|
-
for (let Y = 0,
|
|
2603
|
+
for (let Y = 0, L = I.length; Y < L; Y++)
|
|
2604
2604
|
if (I[Y](e, y, A, !0)) {
|
|
2605
2605
|
Z = !0;
|
|
2606
2606
|
break;
|
|
@@ -2645,7 +2645,7 @@ function zl(e, t, u, n) {
|
|
|
2645
2645
|
if (!e.md.validateLink(f))
|
|
2646
2646
|
return !1;
|
|
2647
2647
|
a = d.pos;
|
|
2648
|
-
const m = a,
|
|
2648
|
+
const m = a, g = o, h = a;
|
|
2649
2649
|
for (; a < r; a++) {
|
|
2650
2650
|
const y = s.charCodeAt(a);
|
|
2651
2651
|
if (y === 10) {
|
|
@@ -2659,15 +2659,15 @@ function zl(e, t, u, n) {
|
|
|
2659
2659
|
if (y === null) break;
|
|
2660
2660
|
s += y, a = r, r = s.length, o++, w = e.md.helpers.parseLinkTitle(s, a, r, w);
|
|
2661
2661
|
}
|
|
2662
|
-
let
|
|
2663
|
-
for (a < r && h !== a && w.ok ? (
|
|
2662
|
+
let p;
|
|
2663
|
+
for (a < r && h !== a && w.ok ? (p = w.str, a = w.pos) : (p = "", a = m, o = g); a < r; ) {
|
|
2664
2664
|
const y = s.charCodeAt(a);
|
|
2665
2665
|
if (!ke(y))
|
|
2666
2666
|
break;
|
|
2667
2667
|
a++;
|
|
2668
2668
|
}
|
|
2669
|
-
if (a < r && s.charCodeAt(a) !== 10 &&
|
|
2670
|
-
for (
|
|
2669
|
+
if (a < r && s.charCodeAt(a) !== 10 && p)
|
|
2670
|
+
for (p = "", a = m, o = g; a < r; ) {
|
|
2671
2671
|
const y = s.charCodeAt(a);
|
|
2672
2672
|
if (!ke(y))
|
|
2673
2673
|
break;
|
|
@@ -2675,8 +2675,8 @@ function zl(e, t, u, n) {
|
|
|
2675
2675
|
}
|
|
2676
2676
|
if (a < r && s.charCodeAt(a) !== 10)
|
|
2677
2677
|
return !1;
|
|
2678
|
-
const M =
|
|
2679
|
-
return M ? (n || (typeof e.env.references > "u" && (e.env.references = {}), typeof e.env.references[M] > "u" && (e.env.references[M] = { title:
|
|
2678
|
+
const M = Wn(s.slice(1, l));
|
|
2679
|
+
return M ? (n || (typeof e.env.references > "u" && (e.env.references = {}), typeof e.env.references[M] > "u" && (e.env.references[M] = { title: p, href: f }), e.line = o), !0) : !1;
|
|
2680
2680
|
}
|
|
2681
2681
|
const Hl = [
|
|
2682
2682
|
"address",
|
|
@@ -2741,7 +2741,7 @@ const Hl = [
|
|
|
2741
2741
|
"tr",
|
|
2742
2742
|
"track",
|
|
2743
2743
|
"ul"
|
|
2744
|
-
], jl = "[a-zA-Z_:][a-zA-Z0-9:._-]*", Zl = "[^\"'=<>`\\x00-\\x20]+", Vl = "'[^']*'",
|
|
2744
|
+
], jl = "[a-zA-Z_:][a-zA-Z0-9:._-]*", Zl = "[^\"'=<>`\\x00-\\x20]+", Vl = "'[^']*'", Wl = '"[^"]*"', Gl = "(?:" + Zl + "|" + Vl + "|" + Wl + ")", Yl = "(?:\\s+" + jl + "(?:\\s*=\\s*" + Gl + ")?)", Oo = "<[A-Za-z][A-Za-z0-9\\-]*" + Yl + "*\\s*\\/?>", Lo = "<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>", Kl = "<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->", Ql = "<[?][\\s\\S]*?[?]>", Xl = "<![A-Za-z][^>]*>", Jl = "<!\\[CDATA\\[[\\s\\S]*?\\]\\]>", ec = new RegExp("^(?:" + Oo + "|" + Lo + "|" + Kl + "|" + Ql + "|" + Xl + "|" + Jl + ")"), tc = new RegExp("^(?:" + Oo + "|" + Lo + ")"), cu = [
|
|
2745
2745
|
[/^<(script|pre|style|textarea)(?=(\s|>|$))/i, /<\/(script|pre|style|textarea)>/i, !0],
|
|
2746
2746
|
[/^<!--/, /-->/, !0],
|
|
2747
2747
|
[/^<\?/, /\?>/, !0],
|
|
@@ -2808,9 +2808,9 @@ function ac(e, t, u) {
|
|
|
2808
2808
|
if (e.sCount[i] - e.blkIndent > 3)
|
|
2809
2809
|
continue;
|
|
2810
2810
|
if (e.sCount[i] >= e.blkIndent) {
|
|
2811
|
-
let
|
|
2811
|
+
let g = e.bMarks[i] + e.tShift[i];
|
|
2812
2812
|
const h = e.eMarks[i];
|
|
2813
|
-
if (
|
|
2813
|
+
if (g < h && (o = e.src.charCodeAt(g), (o === 45 || o === 61) && (g = e.skipChars(g, o), g = e.skipSpaces(g), g >= h))) {
|
|
2814
2814
|
r = o === 61 ? 1 : 2;
|
|
2815
2815
|
break;
|
|
2816
2816
|
}
|
|
@@ -2818,8 +2818,8 @@ function ac(e, t, u) {
|
|
|
2818
2818
|
if (e.sCount[i] < 0)
|
|
2819
2819
|
continue;
|
|
2820
2820
|
let m = !1;
|
|
2821
|
-
for (let
|
|
2822
|
-
if (n[
|
|
2821
|
+
for (let g = 0, h = n.length; g < h; g++)
|
|
2822
|
+
if (n[g](e, i, u, !0)) {
|
|
2823
2823
|
m = !0;
|
|
2824
2824
|
break;
|
|
2825
2825
|
}
|
|
@@ -2859,7 +2859,7 @@ function rc(e, t, u) {
|
|
|
2859
2859
|
const s = e.push("inline", "", 0);
|
|
2860
2860
|
return s.content = o, s.map = [t, e.line], s.children = [], e.push("paragraph_close", "p", -1), e.parentType = a, !0;
|
|
2861
2861
|
}
|
|
2862
|
-
const
|
|
2862
|
+
const Mn = [
|
|
2863
2863
|
// First 2 params - rule name & source. Secondary array - list of rules,
|
|
2864
2864
|
// which can be terminated by this one.
|
|
2865
2865
|
["table", Ol, ["paragraph", "reference"]],
|
|
@@ -2874,12 +2874,12 @@ const kn = [
|
|
|
2874
2874
|
["lheading", ac],
|
|
2875
2875
|
["paragraph", rc]
|
|
2876
2876
|
];
|
|
2877
|
-
function
|
|
2877
|
+
function Gn() {
|
|
2878
2878
|
this.ruler = new rt();
|
|
2879
|
-
for (let e = 0; e <
|
|
2880
|
-
this.ruler.push(
|
|
2879
|
+
for (let e = 0; e < Mn.length; e++)
|
|
2880
|
+
this.ruler.push(Mn[e][0], Mn[e][1], { alt: (Mn[e][2] || []).slice() });
|
|
2881
2881
|
}
|
|
2882
|
-
|
|
2882
|
+
Gn.prototype.tokenize = function(e, t, u) {
|
|
2883
2883
|
const n = this.ruler.getRules(""), a = n.length, r = e.md.options.maxNesting;
|
|
2884
2884
|
let o = t, i = !1;
|
|
2885
2885
|
for (; o < u && (e.line = o = e.skipEmptyLines(o), !(o >= u || e.sCount[o] < e.blkIndent)); ) {
|
|
@@ -2899,35 +2899,35 @@ Wn.prototype.tokenize = function(e, t, u) {
|
|
|
2899
2899
|
e.tight = !i, e.isEmpty(e.line - 1) && (i = !0), o = e.line, o < u && e.isEmpty(o) && (i = !0, o++, e.line = o);
|
|
2900
2900
|
}
|
|
2901
2901
|
};
|
|
2902
|
-
|
|
2902
|
+
Gn.prototype.parse = function(e, t, u, n) {
|
|
2903
2903
|
if (!e)
|
|
2904
2904
|
return;
|
|
2905
2905
|
const a = new this.State(e, t, u, n);
|
|
2906
2906
|
this.tokenize(a, a.line, a.lineMax);
|
|
2907
2907
|
};
|
|
2908
|
-
|
|
2909
|
-
function
|
|
2908
|
+
Gn.prototype.State = Tt;
|
|
2909
|
+
function sn(e, t, u, n) {
|
|
2910
2910
|
this.src = e, this.env = u, this.md = t, this.tokens = n, this.tokens_meta = Array(n.length), this.pos = 0, this.posMax = this.src.length, this.level = 0, this.pending = "", this.pendingLevel = 0, this.cache = {}, this.delimiters = [], this._prev_delimiters = [], this.backticks = {}, this.backticksScanned = !1, this.linkLevel = 0;
|
|
2911
2911
|
}
|
|
2912
|
-
|
|
2912
|
+
sn.prototype.pushPending = function() {
|
|
2913
2913
|
const e = new mt("text", "", 0);
|
|
2914
2914
|
return e.content = this.pending, e.level = this.pendingLevel, this.tokens.push(e), this.pending = "", e;
|
|
2915
2915
|
};
|
|
2916
|
-
|
|
2916
|
+
sn.prototype.push = function(e, t, u) {
|
|
2917
2917
|
this.pending && this.pushPending();
|
|
2918
2918
|
const n = new mt(e, t, u);
|
|
2919
2919
|
let a = null;
|
|
2920
2920
|
return u < 0 && (this.level--, this.delimiters = this._prev_delimiters.pop()), n.level = this.level, u > 0 && (this.level++, this._prev_delimiters.push(this.delimiters), this.delimiters = [], a = { delimiters: this.delimiters }), this.pendingLevel = this.level, this.tokens.push(n), this.tokens_meta.push(a), n;
|
|
2921
2921
|
};
|
|
2922
|
-
|
|
2922
|
+
sn.prototype.scanDelims = function(e, t) {
|
|
2923
2923
|
const u = this.posMax, n = this.src.charCodeAt(e), a = e > 0 ? this.src.charCodeAt(e - 1) : 32;
|
|
2924
2924
|
let r = e;
|
|
2925
2925
|
for (; r < u && this.src.charCodeAt(r) === n; )
|
|
2926
2926
|
r++;
|
|
2927
|
-
const o = r - e, i = r < u ? this.src.charCodeAt(r) : 32, s = Xu(a) || Qu(String.fromCharCode(a)), l = Xu(i) || Qu(String.fromCharCode(i)), d = Ku(a), f = Ku(i), m = !f && (!l || d || s),
|
|
2928
|
-
return { can_open: m && (t || !
|
|
2927
|
+
const o = r - e, i = r < u ? this.src.charCodeAt(r) : 32, s = Xu(a) || Qu(String.fromCharCode(a)), l = Xu(i) || Qu(String.fromCharCode(i)), d = Ku(a), f = Ku(i), m = !f && (!l || d || s), g = !d && (!s || f || l);
|
|
2928
|
+
return { can_open: m && (t || !g || s), can_close: g && (t || !m || l), length: o };
|
|
2929
2929
|
};
|
|
2930
|
-
|
|
2930
|
+
sn.prototype.Token = mt;
|
|
2931
2931
|
function oc(e) {
|
|
2932
2932
|
switch (e) {
|
|
2933
2933
|
case 10:
|
|
@@ -3148,7 +3148,7 @@ function gc(e, t) {
|
|
|
3148
3148
|
}
|
|
3149
3149
|
return e.pos += a.length, !0;
|
|
3150
3150
|
}
|
|
3151
|
-
function
|
|
3151
|
+
function Wr(e, t) {
|
|
3152
3152
|
const u = t.length;
|
|
3153
3153
|
for (let n = u - 1; n >= 0; n--) {
|
|
3154
3154
|
const a = t[n];
|
|
@@ -3164,9 +3164,9 @@ function Gr(e, t) {
|
|
|
3164
3164
|
}
|
|
3165
3165
|
function mc(e) {
|
|
3166
3166
|
const t = e.tokens_meta, u = e.tokens_meta.length;
|
|
3167
|
-
|
|
3167
|
+
Wr(e, e.delimiters);
|
|
3168
3168
|
for (let n = 0; n < u; n++)
|
|
3169
|
-
t[n] && t[n].delimiters &&
|
|
3169
|
+
t[n] && t[n].delimiters && Wr(e, t[n].delimiters);
|
|
3170
3170
|
}
|
|
3171
3171
|
const $o = {
|
|
3172
3172
|
tokenize: gc,
|
|
@@ -3176,10 +3176,10 @@ function bc(e, t) {
|
|
|
3176
3176
|
let u, n, a, r, o = "", i = "", s = e.pos, l = !0;
|
|
3177
3177
|
if (e.src.charCodeAt(e.pos) !== 91)
|
|
3178
3178
|
return !1;
|
|
3179
|
-
const d = e.pos, f = e.posMax, m = e.pos + 1,
|
|
3180
|
-
if (
|
|
3179
|
+
const d = e.pos, f = e.posMax, m = e.pos + 1, g = e.md.helpers.parseLinkLabel(e, e.pos, !0);
|
|
3180
|
+
if (g < 0)
|
|
3181
3181
|
return !1;
|
|
3182
|
-
let h =
|
|
3182
|
+
let h = g + 1;
|
|
3183
3183
|
if (h < f && e.src.charCodeAt(h) === 40) {
|
|
3184
3184
|
for (l = !1, h++; h < f && (u = e.src.charCodeAt(h), !(!ke(u) && u !== 10)); h++)
|
|
3185
3185
|
;
|
|
@@ -3197,14 +3197,14 @@ function bc(e, t) {
|
|
|
3197
3197
|
if (l) {
|
|
3198
3198
|
if (typeof e.env.references > "u")
|
|
3199
3199
|
return !1;
|
|
3200
|
-
if (h < f && e.src.charCodeAt(h) === 91 ? (s = h + 1, h = e.md.helpers.parseLinkLabel(e, h), h >= 0 ? n = e.src.slice(s, h++) : h =
|
|
3200
|
+
if (h < f && e.src.charCodeAt(h) === 91 ? (s = h + 1, h = e.md.helpers.parseLinkLabel(e, h), h >= 0 ? n = e.src.slice(s, h++) : h = g + 1) : h = g + 1, n || (n = e.src.slice(m, g)), r = e.env.references[Wn(n)], !r)
|
|
3201
3201
|
return e.pos = d, !1;
|
|
3202
3202
|
o = r.href, i = r.title;
|
|
3203
3203
|
}
|
|
3204
3204
|
if (!t) {
|
|
3205
|
-
e.pos = m, e.posMax =
|
|
3206
|
-
const w = e.push("link_open", "a", 1),
|
|
3207
|
-
w.attrs =
|
|
3205
|
+
e.pos = m, e.posMax = g;
|
|
3206
|
+
const w = e.push("link_open", "a", 1), p = [["href", o]];
|
|
3207
|
+
w.attrs = p, i && p.push(["title", i]), e.linkLevel++, e.md.inline.tokenize(e), e.linkLevel--, e.push("link_close", "a", -1);
|
|
3208
3208
|
}
|
|
3209
3209
|
return e.pos = h, e.posMax = f, !0;
|
|
3210
3210
|
}
|
|
@@ -3213,7 +3213,7 @@ function vc(e, t) {
|
|
|
3213
3213
|
const f = e.pos, m = e.posMax;
|
|
3214
3214
|
if (e.src.charCodeAt(e.pos) !== 33 || e.src.charCodeAt(e.pos + 1) !== 91)
|
|
3215
3215
|
return !1;
|
|
3216
|
-
const
|
|
3216
|
+
const g = e.pos + 2, h = e.md.helpers.parseLinkLabel(e, e.pos + 1, !1);
|
|
3217
3217
|
if (h < 0)
|
|
3218
3218
|
return !1;
|
|
3219
3219
|
if (r = h + 1, r < m && e.src.charCodeAt(r) === 40) {
|
|
@@ -3234,12 +3234,12 @@ function vc(e, t) {
|
|
|
3234
3234
|
} else {
|
|
3235
3235
|
if (typeof e.env.references > "u")
|
|
3236
3236
|
return !1;
|
|
3237
|
-
if (r < m && e.src.charCodeAt(r) === 91 ? (l = r + 1, r = e.md.helpers.parseLinkLabel(e, r), r >= 0 ? a = e.src.slice(l, r++) : r = h + 1) : r = h + 1, a || (a = e.src.slice(
|
|
3237
|
+
if (r < m && e.src.charCodeAt(r) === 91 ? (l = r + 1, r = e.md.helpers.parseLinkLabel(e, r), r >= 0 ? a = e.src.slice(l, r++) : r = h + 1) : r = h + 1, a || (a = e.src.slice(g, h)), o = e.env.references[Wn(a)], !o)
|
|
3238
3238
|
return e.pos = f, !1;
|
|
3239
3239
|
d = o.href, s = o.title;
|
|
3240
3240
|
}
|
|
3241
3241
|
if (!t) {
|
|
3242
|
-
n = e.src.slice(
|
|
3242
|
+
n = e.src.slice(g, h);
|
|
3243
3243
|
const w = [];
|
|
3244
3244
|
e.md.inline.parse(
|
|
3245
3245
|
n,
|
|
@@ -3247,8 +3247,8 @@ function vc(e, t) {
|
|
|
3247
3247
|
e.env,
|
|
3248
3248
|
w
|
|
3249
3249
|
);
|
|
3250
|
-
const
|
|
3251
|
-
|
|
3250
|
+
const p = e.push("image", "img", 0), M = [["src", d], ["alt", ""]];
|
|
3251
|
+
p.attrs = M, p.children = w, p.content = n, s && M.push(["title", s]);
|
|
3252
3252
|
}
|
|
3253
3253
|
return e.pos = r, e.posMax = m, !0;
|
|
3254
3254
|
}
|
|
@@ -3332,7 +3332,7 @@ function Ec(e, t) {
|
|
|
3332
3332
|
if (r) {
|
|
3333
3333
|
if (!t) {
|
|
3334
3334
|
const o = r[1][0].toLowerCase() === "x" ? parseInt(r[1].slice(1), 16) : parseInt(r[1], 10), i = e.push("text_special", "", 0);
|
|
3335
|
-
i.content = Xa(o) ?
|
|
3335
|
+
i.content = Xa(o) ? $n(o) : $n(65533), i.markup = r[0], i.info = "entity";
|
|
3336
3336
|
}
|
|
3337
3337
|
return e.pos += r[0].length, !0;
|
|
3338
3338
|
}
|
|
@@ -3351,7 +3351,7 @@ function Ec(e, t) {
|
|
|
3351
3351
|
}
|
|
3352
3352
|
return !1;
|
|
3353
3353
|
}
|
|
3354
|
-
function
|
|
3354
|
+
function Gr(e) {
|
|
3355
3355
|
const t = {}, u = e.length;
|
|
3356
3356
|
if (!u) return;
|
|
3357
3357
|
let n = 0, a = -2;
|
|
@@ -3367,8 +3367,8 @@ function Wr(e) {
|
|
|
3367
3367
|
if (f.marker === i.marker && f.open && f.end < 0) {
|
|
3368
3368
|
let m = !1;
|
|
3369
3369
|
if ((f.close || i.open) && (f.length + i.length) % 3 === 0 && (f.length % 3 !== 0 || i.length % 3 !== 0) && (m = !0), !m) {
|
|
3370
|
-
const
|
|
3371
|
-
r[o] = o - l +
|
|
3370
|
+
const g = l > 0 && !e[l - 1].open ? r[l - 1] + 1 : 0;
|
|
3371
|
+
r[o] = o - l + g, r[l] = g, i.open = !1, f.end = o, f.close = !1, d = -1, a = -2;
|
|
3372
3372
|
break;
|
|
3373
3373
|
}
|
|
3374
3374
|
}
|
|
@@ -3378,9 +3378,9 @@ function Wr(e) {
|
|
|
3378
3378
|
}
|
|
3379
3379
|
function Dc(e) {
|
|
3380
3380
|
const t = e.tokens_meta, u = e.tokens_meta.length;
|
|
3381
|
-
|
|
3381
|
+
Gr(e.delimiters);
|
|
3382
3382
|
for (let n = 0; n < u; n++)
|
|
3383
|
-
t[n] && t[n].delimiters &&
|
|
3383
|
+
t[n] && t[n].delimiters && Gr(t[n].delimiters);
|
|
3384
3384
|
}
|
|
3385
3385
|
function Sc(e) {
|
|
3386
3386
|
let t, u, n = 0;
|
|
@@ -3410,7 +3410,7 @@ const xa = [
|
|
|
3410
3410
|
// rule below merges unused segments back with the rest of the text
|
|
3411
3411
|
["fragments_join", Sc]
|
|
3412
3412
|
];
|
|
3413
|
-
function
|
|
3413
|
+
function ln() {
|
|
3414
3414
|
this.ruler = new rt();
|
|
3415
3415
|
for (let e = 0; e < xa.length; e++)
|
|
3416
3416
|
this.ruler.push(xa[e][0], xa[e][1]);
|
|
@@ -3418,7 +3418,7 @@ function sn() {
|
|
|
3418
3418
|
for (let e = 0; e < ya.length; e++)
|
|
3419
3419
|
this.ruler2.push(ya[e][0], ya[e][1]);
|
|
3420
3420
|
}
|
|
3421
|
-
|
|
3421
|
+
ln.prototype.skipToken = function(e) {
|
|
3422
3422
|
const t = e.pos, u = this.ruler.getRules(""), n = u.length, a = e.md.options.maxNesting, r = e.cache;
|
|
3423
3423
|
if (typeof r[t] < "u") {
|
|
3424
3424
|
e.pos = r[t];
|
|
@@ -3436,7 +3436,7 @@ sn.prototype.skipToken = function(e) {
|
|
|
3436
3436
|
e.pos = e.posMax;
|
|
3437
3437
|
o || e.pos++, r[t] = e.pos;
|
|
3438
3438
|
};
|
|
3439
|
-
|
|
3439
|
+
ln.prototype.tokenize = function(e) {
|
|
3440
3440
|
const t = this.ruler.getRules(""), u = t.length, n = e.posMax, a = e.md.options.maxNesting;
|
|
3441
3441
|
for (; e.pos < n; ) {
|
|
3442
3442
|
const r = e.pos;
|
|
@@ -3458,14 +3458,14 @@ sn.prototype.tokenize = function(e) {
|
|
|
3458
3458
|
}
|
|
3459
3459
|
e.pending && e.pushPending();
|
|
3460
3460
|
};
|
|
3461
|
-
|
|
3461
|
+
ln.prototype.parse = function(e, t, u, n) {
|
|
3462
3462
|
const a = new this.State(e, t, u, n);
|
|
3463
3463
|
this.tokenize(a);
|
|
3464
3464
|
const r = this.ruler2.getRules(""), o = r.length;
|
|
3465
3465
|
for (let i = 0; i < o; i++)
|
|
3466
3466
|
r[i](a);
|
|
3467
3467
|
};
|
|
3468
|
-
|
|
3468
|
+
ln.prototype.State = sn;
|
|
3469
3469
|
function Ic(e) {
|
|
3470
3470
|
const t = {};
|
|
3471
3471
|
e = e || {}, t.src_Any = Mo.source, t.src_Cc = wo.source, t.src_Z = Eo.source, t.src_P = Ka.source, t.src_ZPCc = [t.src_Z, t.src_P, t.src_Cc].join("|"), t.src_ZCc = [t.src_Z, t.src_Cc].join("|");
|
|
@@ -3560,7 +3560,7 @@ function Kr() {
|
|
|
3560
3560
|
t.normalize(e);
|
|
3561
3561
|
};
|
|
3562
3562
|
}
|
|
3563
|
-
function
|
|
3563
|
+
function Bn(e) {
|
|
3564
3564
|
const t = e.re = Ic(e.__opts__), u = e.__tlds__.slice();
|
|
3565
3565
|
e.onCompile(), e.__tlds_replaced__ || u.push($c), u.push(t.src_xn), t.src_tlds = u.join("|");
|
|
3566
3566
|
function n(i) {
|
|
@@ -3608,10 +3608,10 @@ function qa(e, t) {
|
|
|
3608
3608
|
function lt(e, t) {
|
|
3609
3609
|
if (!(this instanceof lt))
|
|
3610
3610
|
return new lt(e, t);
|
|
3611
|
-
t || Lc(e) && (t = e, e = {}), this.__opts__ = Ra({}, Bo, t), this.__index__ = -1, this.__last_index__ = -1, this.__schema__ = "", this.__text_cache__ = "", this.__schemas__ = Ra({}, Pc, e), this.__compiled__ = {}, this.__tlds__ = Bc, this.__tlds_replaced__ = !1, this.re = {},
|
|
3611
|
+
t || Lc(e) && (t = e, e = {}), this.__opts__ = Ra({}, Bo, t), this.__index__ = -1, this.__last_index__ = -1, this.__schema__ = "", this.__text_cache__ = "", this.__schemas__ = Ra({}, Pc, e), this.__compiled__ = {}, this.__tlds__ = Bc, this.__tlds_replaced__ = !1, this.re = {}, Bn(this);
|
|
3612
3612
|
}
|
|
3613
3613
|
lt.prototype.add = function(t, u) {
|
|
3614
|
-
return this.__schemas__[t] = u,
|
|
3614
|
+
return this.__schemas__[t] = u, Bn(this), this;
|
|
3615
3615
|
};
|
|
3616
3616
|
lt.prototype.set = function(t) {
|
|
3617
3617
|
return this.__opts__ = Ra(this.__opts__, t), this;
|
|
@@ -3654,20 +3654,20 @@ lt.prototype.matchAtStart = function(t) {
|
|
|
3654
3654
|
lt.prototype.tlds = function(t, u) {
|
|
3655
3655
|
return t = Array.isArray(t) ? t : [t], u ? (this.__tlds__ = this.__tlds__.concat(t).sort().filter(function(n, a, r) {
|
|
3656
3656
|
return n !== r[a - 1];
|
|
3657
|
-
}).reverse(),
|
|
3657
|
+
}).reverse(), Bn(this), this) : (this.__tlds__ = t.slice(), this.__tlds_replaced__ = !0, Bn(this), this);
|
|
3658
3658
|
};
|
|
3659
3659
|
lt.prototype.normalize = function(t) {
|
|
3660
3660
|
t.schema || (t.url = "http://" + t.url), t.schema === "mailto:" && !/^mailto:/i.test(t.url) && (t.url = "mailto:" + t.url);
|
|
3661
3661
|
};
|
|
3662
3662
|
lt.prototype.onCompile = function() {
|
|
3663
3663
|
};
|
|
3664
|
-
const pu = 2147483647, yt = 36, tr = 1, Ju = 26, Hc = 38, jc = 700, No = 72, Uo = 128, zo = "-", Zc = /^xn--/, Vc = /[^\0-\x7F]/,
|
|
3664
|
+
const pu = 2147483647, yt = 36, tr = 1, Ju = 26, Hc = 38, jc = 700, No = 72, Uo = 128, zo = "-", Zc = /^xn--/, Vc = /[^\0-\x7F]/, Wc = /[\x2E\u3002\uFF0E\uFF61]/g, Gc = {
|
|
3665
3665
|
overflow: "Overflow: input needs wider integers to process",
|
|
3666
3666
|
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
3667
3667
|
"invalid-input": "Invalid input"
|
|
3668
3668
|
}, _a = yt - tr, _t = Math.floor, Ca = String.fromCharCode;
|
|
3669
3669
|
function Nt(e) {
|
|
3670
|
-
throw new RangeError(
|
|
3670
|
+
throw new RangeError(Gc[e]);
|
|
3671
3671
|
}
|
|
3672
3672
|
function Yc(e, t) {
|
|
3673
3673
|
const u = [];
|
|
@@ -3679,7 +3679,7 @@ function Yc(e, t) {
|
|
|
3679
3679
|
function Ho(e, t) {
|
|
3680
3680
|
const u = e.split("@");
|
|
3681
3681
|
let n = "";
|
|
3682
|
-
u.length > 1 && (n = u[0] + "@", e = u[1]), e = e.replace(
|
|
3682
|
+
u.length > 1 && (n = u[0] + "@", e = u[1]), e = e.replace(Wc, ".");
|
|
3683
3683
|
const a = e.split("."), r = Yc(a, t).join(".");
|
|
3684
3684
|
return n + r;
|
|
3685
3685
|
}
|
|
@@ -3718,17 +3718,17 @@ const Kc = (e) => String.fromCodePoint(...e), Qc = function(e) {
|
|
|
3718
3718
|
i >= u && Nt("invalid-input");
|
|
3719
3719
|
const m = Qc(e.charCodeAt(i++));
|
|
3720
3720
|
m >= yt && Nt("invalid-input"), m > _t((pu - n) / d) && Nt("overflow"), n += m * d;
|
|
3721
|
-
const
|
|
3722
|
-
if (m <
|
|
3721
|
+
const g = f <= r ? tr : f >= r + Ju ? Ju : f - r;
|
|
3722
|
+
if (m < g)
|
|
3723
3723
|
break;
|
|
3724
|
-
const h = yt -
|
|
3724
|
+
const h = yt - g;
|
|
3725
3725
|
d > _t(pu / h) && Nt("overflow"), d *= h;
|
|
3726
3726
|
}
|
|
3727
3727
|
const l = t.length + 1;
|
|
3728
3728
|
r = Zo(n - s, l, s == 0), _t(n / l) > pu - a && Nt("overflow"), a += _t(n / l), n %= l, t.splice(n++, 0, a);
|
|
3729
3729
|
}
|
|
3730
3730
|
return String.fromCodePoint(...t);
|
|
3731
|
-
},
|
|
3731
|
+
}, Wo = function(e) {
|
|
3732
3732
|
const t = [];
|
|
3733
3733
|
e = jo(e);
|
|
3734
3734
|
const u = e.length;
|
|
@@ -3747,12 +3747,12 @@ const Kc = (e) => String.fromCodePoint(...e), Qc = function(e) {
|
|
|
3747
3747
|
if (d < n && ++a > pu && Nt("overflow"), d === n) {
|
|
3748
3748
|
let f = a;
|
|
3749
3749
|
for (let m = yt; ; m += yt) {
|
|
3750
|
-
const
|
|
3751
|
-
if (f <
|
|
3750
|
+
const g = m <= r ? tr : m >= r + Ju ? Ju : m - r;
|
|
3751
|
+
if (f < g)
|
|
3752
3752
|
break;
|
|
3753
|
-
const h = f -
|
|
3753
|
+
const h = f - g, w = yt - g;
|
|
3754
3754
|
t.push(
|
|
3755
|
-
Ca(Qr(
|
|
3755
|
+
Ca(Qr(g + h % w, 0))
|
|
3756
3756
|
), f = _t(h / w);
|
|
3757
3757
|
}
|
|
3758
3758
|
t.push(Ca(Qr(f, 0))), r = Zo(a, l, i === o), a = 0, ++i;
|
|
@@ -3766,9 +3766,9 @@ const Kc = (e) => String.fromCodePoint(...e), Qc = function(e) {
|
|
|
3766
3766
|
});
|
|
3767
3767
|
}, Jc = function(e) {
|
|
3768
3768
|
return Ho(e, function(t) {
|
|
3769
|
-
return Vc.test(t) ? "xn--" +
|
|
3769
|
+
return Vc.test(t) ? "xn--" + Wo(t) : t;
|
|
3770
3770
|
});
|
|
3771
|
-
},
|
|
3771
|
+
}, Go = {
|
|
3772
3772
|
/**
|
|
3773
3773
|
* A string representing the current Punycode.js version number.
|
|
3774
3774
|
* @memberOf punycode
|
|
@@ -3787,7 +3787,7 @@ const Kc = (e) => String.fromCodePoint(...e), Qc = function(e) {
|
|
|
3787
3787
|
encode: Kc
|
|
3788
3788
|
},
|
|
3789
3789
|
decode: Vo,
|
|
3790
|
-
encode:
|
|
3790
|
+
encode: Wo,
|
|
3791
3791
|
toASCII: Jc,
|
|
3792
3792
|
toUnicode: Xc
|
|
3793
3793
|
}, e0 = {
|
|
@@ -3969,24 +3969,24 @@ function i0(e) {
|
|
|
3969
3969
|
const t = Ya(e, !0);
|
|
3970
3970
|
if (t.hostname && (!t.protocol || Yo.indexOf(t.protocol) >= 0))
|
|
3971
3971
|
try {
|
|
3972
|
-
t.hostname =
|
|
3972
|
+
t.hostname = Go.toASCII(t.hostname);
|
|
3973
3973
|
} catch {
|
|
3974
3974
|
}
|
|
3975
|
-
return
|
|
3975
|
+
return on(Ga(t));
|
|
3976
3976
|
}
|
|
3977
3977
|
function s0(e) {
|
|
3978
3978
|
const t = Ya(e, !0);
|
|
3979
3979
|
if (t.hostname && (!t.protocol || Yo.indexOf(t.protocol) >= 0))
|
|
3980
3980
|
try {
|
|
3981
|
-
t.hostname =
|
|
3981
|
+
t.hostname = Go.toUnicode(t.hostname);
|
|
3982
3982
|
} catch {
|
|
3983
3983
|
}
|
|
3984
|
-
return mu(
|
|
3984
|
+
return mu(Ga(t), mu.defaultChars + "%");
|
|
3985
3985
|
}
|
|
3986
3986
|
function gt(e, t) {
|
|
3987
3987
|
if (!(this instanceof gt))
|
|
3988
3988
|
return new gt(e, t);
|
|
3989
|
-
t || Qa(e) || (t = e || {}, e = "default"), this.inline = new
|
|
3989
|
+
t || Qa(e) || (t = e || {}, e = "default"), this.inline = new ln(), this.block = new Gn(), this.core = new Ja(), this.renderer = new vu(), this.linkify = new lt(), this.validateLink = o0, this.normalizeLink = i0, this.normalizeLinkText = s0, this.utils = cl, this.helpers = Vn({}, pl), this.options = {}, this.configure(e), t && this.set(t);
|
|
3990
3990
|
}
|
|
3991
3991
|
gt.prototype.set = function(e) {
|
|
3992
3992
|
return Vn(this.options, e), this;
|
|
@@ -4159,8 +4159,8 @@ function T0(e, t) {
|
|
|
4159
4159
|
const f = s.slice(d.length), m = Jo(d);
|
|
4160
4160
|
if (!m)
|
|
4161
4161
|
continue;
|
|
4162
|
-
const
|
|
4163
|
-
a.append(t.slice(u,
|
|
4162
|
+
const g = l + i.length;
|
|
4163
|
+
a.append(t.slice(u, g));
|
|
4164
4164
|
const h = e.createElement("a");
|
|
4165
4165
|
h.href = m, h.target = "_blank", h.rel = "noreferrer", h.textContent = d, a.append(h), f && a.append(f), u = l + o.length, n = !0;
|
|
4166
4166
|
}
|
|
@@ -4221,7 +4221,7 @@ function M0(e) {
|
|
|
4221
4221
|
);
|
|
4222
4222
|
}
|
|
4223
4223
|
function w0(e, t = !1, u = !0) {
|
|
4224
|
-
var n, a, r, o, i, s, l, d, f, m,
|
|
4224
|
+
var n, a, r, o, i, s, l, d, f, m, g, h, w, p, M, y, A, C;
|
|
4225
4225
|
if (!e)
|
|
4226
4226
|
return "";
|
|
4227
4227
|
if (((n = e.getDeletedAt) == null ? void 0 : n.call(e)) != null)
|
|
@@ -4233,7 +4233,7 @@ function w0(e, t = !1, u = !0) {
|
|
|
4233
4233
|
return I === "image" ? `${t ? "🖼️ " : ""}${D || "Photo"}` : I === "video" ? `${t ? "🎥 " : ""}${D || S || "Video"}` : I === "audio" ? `${t ? "🎤 " : ""}${S || "Audio message"}` : I === "file" ? `${t ? "📄 " : ""}${D || S || "File"}` : `${t ? "🖼️ " : ""}${D || S || "Media message"}`;
|
|
4234
4234
|
}
|
|
4235
4235
|
if (e instanceof V.Action) {
|
|
4236
|
-
const D = (((h = (
|
|
4236
|
+
const D = (((h = (g = (m = e.getActionFor) == null ? void 0 : m.call(e)) == null ? void 0 : g.getMetadata) == null ? void 0 : h.call(g)) ?? ((M = (p = (w = e.getReceiver) == null ? void 0 : w.call(e)) == null ? void 0 : p.getMetadata) == null ? void 0 : M.call(p)) ?? {}).systemDisplayName, I = (y = e.getActionBy) == null ? void 0 : y.call(e), B = ((A = I == null ? void 0 : I.getName) == null ? void 0 : A.call(I)) ?? "", Z = ((C = e.getMessage) == null ? void 0 : C.call(e)) ?? "";
|
|
4237
4237
|
return typeof D == "string" && D.trim() && B ? Z.replace(B, D.trim()) : Z;
|
|
4238
4238
|
}
|
|
4239
4239
|
return "Custom message";
|
|
@@ -4524,26 +4524,26 @@ function Ma(e) {
|
|
|
4524
4524
|
e.oncomplete = () => t(), e.onerror = () => u(e.error), e.onabort = () => u(e.error);
|
|
4525
4525
|
});
|
|
4526
4526
|
}
|
|
4527
|
-
let Jr = null,
|
|
4527
|
+
let Jr = null, wn = null;
|
|
4528
4528
|
function R0({ environment: e }) {
|
|
4529
4529
|
za(e);
|
|
4530
|
-
const t = z(!1), u = z(!1), n = z(!1), a = z(!1), r = z(!1), o = z(!1), i = z(!1), s = z(!1), l = z(!1), d = z(!1), f = z(!1), m = z(!1),
|
|
4531
|
-
let te = !1, se = !1, pe = null, Me = null, De = null, de = null, ot = 0, _e = 0,
|
|
4532
|
-
const
|
|
4530
|
+
const t = z(!1), u = z(!1), n = z(!1), a = z(!1), r = z(!1), o = z(!1), i = z(!1), s = z(!1), l = z(!1), d = z(!1), f = z(!1), m = z(!1), g = z(typeof navigator < "u" ? !navigator.onLine : !1), h = z(!1), w = z(null), p = z(null), M = z([]), y = z([]), A = z([]), C = z([]), S = z(!1), D = z(!1), I = z(null), B = z(null), Z = z(null), Y = z(null), L = z([]), K = U(() => L.value.length), O = U(() => M.value.find((c) => c.id === I.value) ?? null), N = `bcc-ui-connection-${crypto.randomUUID()}`, Q = `bcc-ui-message-${crypto.randomUUID()}`;
|
|
4531
|
+
let te = !1, se = !1, pe = null, Me = null, De = null, de = null, ot = 0, _e = 0, G = !1, J = !1, q = null;
|
|
4532
|
+
const We = /* @__PURE__ */ new Map(), ve = /* @__PURE__ */ new Set();
|
|
4533
4533
|
let je = null, Ne = null, it = 0;
|
|
4534
4534
|
async function St() {
|
|
4535
|
-
await q0(e), !t.value && (Cu(), qu(), t.value = !0, await Ru(),
|
|
4535
|
+
await q0(e), !t.value && (Cu(), qu(), t.value = !0, await Ru(), p.value && (yr(p.value.uid), be(), kt(), !g.value && !J && Ft()));
|
|
4536
4536
|
}
|
|
4537
4537
|
async function xe(c) {
|
|
4538
4538
|
w.value = null, u.value = !0;
|
|
4539
4539
|
try {
|
|
4540
4540
|
await St();
|
|
4541
|
-
const b =
|
|
4541
|
+
const b = Gu();
|
|
4542
4542
|
await V.getLoggedinUser() && b !== c && await V.logout(), Da(c);
|
|
4543
4543
|
const E = await eo(c), R = await V.login(E);
|
|
4544
|
-
|
|
4544
|
+
p.value = Sn(R), yr(p.value.uid), h.value = !0, g.value = typeof navigator < "u" ? !navigator.onLine : !1, be(), kt(), J || await Ft(), await Gt(), la();
|
|
4545
4545
|
} catch (b) {
|
|
4546
|
-
throw
|
|
4546
|
+
throw P(), w.value = Re(b, "Unable to sign in to chat."), b;
|
|
4547
4547
|
} finally {
|
|
4548
4548
|
u.value = !1;
|
|
4549
4549
|
}
|
|
@@ -4553,17 +4553,17 @@ function R0({ environment: e }) {
|
|
|
4553
4553
|
try {
|
|
4554
4554
|
Da(null), go(), await V.getLoggedinUser() && await V.logout();
|
|
4555
4555
|
} finally {
|
|
4556
|
-
|
|
4556
|
+
P();
|
|
4557
4557
|
}
|
|
4558
4558
|
}
|
|
4559
4559
|
function be() {
|
|
4560
4560
|
const c = Za();
|
|
4561
4561
|
if (!c) {
|
|
4562
|
-
q = null,
|
|
4562
|
+
q = null, L.value = [];
|
|
4563
4563
|
return;
|
|
4564
4564
|
}
|
|
4565
4565
|
const b = `bcc-chat:${$e().appId}:${c}`;
|
|
4566
|
-
_u(b), q = new ar(b),
|
|
4566
|
+
_u(b), q = new ar(b), L.value = q.getQueue();
|
|
4567
4567
|
}
|
|
4568
4568
|
function _u(c) {
|
|
4569
4569
|
if (typeof window > "u")
|
|
@@ -4579,10 +4579,10 @@ function R0({ environment: e }) {
|
|
|
4579
4579
|
se || typeof window > "u" || (window.addEventListener("online", It), window.addEventListener("offline", uu), se = !0);
|
|
4580
4580
|
}
|
|
4581
4581
|
function It() {
|
|
4582
|
-
|
|
4582
|
+
g.value = !1, G = !0, J || nu(!0);
|
|
4583
4583
|
}
|
|
4584
4584
|
function uu() {
|
|
4585
|
-
|
|
4585
|
+
g.value = !0, m.value = !1, bt();
|
|
4586
4586
|
}
|
|
4587
4587
|
function bt() {
|
|
4588
4588
|
pe !== null && (clearTimeout(pe), pe = null);
|
|
@@ -4590,11 +4590,11 @@ function R0({ environment: e }) {
|
|
|
4590
4590
|
function Tu() {
|
|
4591
4591
|
ot = Date.now() + 1500;
|
|
4592
4592
|
}
|
|
4593
|
-
function
|
|
4593
|
+
function Wt() {
|
|
4594
4594
|
return Date.now() < ot;
|
|
4595
4595
|
}
|
|
4596
4596
|
function nu(c = !1) {
|
|
4597
|
-
if (pe !== null || Me ||
|
|
4597
|
+
if (pe !== null || Me || g.value || !h.value || J)
|
|
4598
4598
|
return;
|
|
4599
4599
|
const b = c ? 0 : Math.min(3e4, 1e3 * 2 ** Math.min(_e, 4));
|
|
4600
4600
|
pe = setTimeout(() => {
|
|
@@ -4602,21 +4602,21 @@ function R0({ environment: e }) {
|
|
|
4602
4602
|
}, b);
|
|
4603
4603
|
}
|
|
4604
4604
|
async function Ft() {
|
|
4605
|
-
if (!(
|
|
4605
|
+
if (!(g.value || !h.value || J))
|
|
4606
4606
|
return Me || (Me = (async () => {
|
|
4607
4607
|
bt();
|
|
4608
4608
|
try {
|
|
4609
4609
|
let c = await V.getLoggedinUser();
|
|
4610
4610
|
if (!c) {
|
|
4611
|
-
const x =
|
|
4611
|
+
const x = Gu();
|
|
4612
4612
|
if (!x)
|
|
4613
4613
|
return;
|
|
4614
4614
|
const E = await eo(x);
|
|
4615
4615
|
c = await V.login(E);
|
|
4616
4616
|
}
|
|
4617
|
-
|
|
4617
|
+
p.value = Sn(c), h.value = !0, be();
|
|
4618
4618
|
const b = V.connect;
|
|
4619
|
-
typeof b == "function" && (await b.call(V), m.value = !0), _e = 0,
|
|
4619
|
+
typeof b == "function" && (await b.call(V), m.value = !0), _e = 0, G && await Rt();
|
|
4620
4620
|
} catch (c) {
|
|
4621
4621
|
m.value = !1, _e += 1, Lu(c) || (w.value = Re(c, "Unable to reconnect to chat.")), nu();
|
|
4622
4622
|
} finally {
|
|
@@ -4625,10 +4625,10 @@ function R0({ environment: e }) {
|
|
|
4625
4625
|
})(), Me);
|
|
4626
4626
|
}
|
|
4627
4627
|
async function Rt() {
|
|
4628
|
-
return De ||
|
|
4629
|
-
|
|
4628
|
+
return De || g.value || !h.value || J || (De = (async () => {
|
|
4629
|
+
G = !1, w.value = null;
|
|
4630
4630
|
try {
|
|
4631
|
-
await
|
|
4631
|
+
await Gt(), la();
|
|
4632
4632
|
} finally {
|
|
4633
4633
|
De = null;
|
|
4634
4634
|
}
|
|
@@ -4641,21 +4641,21 @@ function R0({ environment: e }) {
|
|
|
4641
4641
|
c.length !== 0 && (M.value = $t(c), !I.value && M.value.length > 0 && (I.value = M.value[0].id, et(I.value)));
|
|
4642
4642
|
}
|
|
4643
4643
|
function et(c) {
|
|
4644
|
-
if (!q)
|
|
4644
|
+
if (!q || !c)
|
|
4645
4645
|
return y.value = [], !1;
|
|
4646
4646
|
const b = q.getMessages(c).sort(zt);
|
|
4647
4647
|
return y.value = b, b.length > 0;
|
|
4648
4648
|
}
|
|
4649
4649
|
async function ku() {
|
|
4650
|
-
J = !1,
|
|
4650
|
+
J = !1, G = !0, await Ft();
|
|
4651
4651
|
}
|
|
4652
|
-
async function
|
|
4653
|
-
J = !0,
|
|
4652
|
+
async function dn() {
|
|
4653
|
+
J = !0, G = !1, bt();
|
|
4654
4654
|
const c = V.disconnect;
|
|
4655
4655
|
typeof c == "function" && await c.call(V), m.value = !1;
|
|
4656
4656
|
}
|
|
4657
|
-
async function
|
|
4658
|
-
if (await St(), n.value = !0, w.value = null,
|
|
4657
|
+
async function Gt() {
|
|
4658
|
+
if (await St(), n.value = !0, w.value = null, g.value && q) {
|
|
4659
4659
|
const c = q.getConversations();
|
|
4660
4660
|
M.value = $t(c), !I.value && M.value.length > 0 ? await qt(M.value[0].id) : O.value && await Kt(), n.value = !1;
|
|
4661
4661
|
return;
|
|
@@ -4667,7 +4667,7 @@ function R0({ environment: e }) {
|
|
|
4667
4667
|
x = await c.fetchNext(), b.push(
|
|
4668
4668
|
...x.map((R) => {
|
|
4669
4669
|
var $;
|
|
4670
|
-
return O0(R, ($ =
|
|
4670
|
+
return O0(R, ($ = p.value) == null ? void 0 : $.uid);
|
|
4671
4671
|
})
|
|
4672
4672
|
);
|
|
4673
4673
|
while (x.length === 50);
|
|
@@ -4676,7 +4676,7 @@ function R0({ environment: e }) {
|
|
|
4676
4676
|
const $ = E.get(R.id);
|
|
4677
4677
|
$ && (R.subtitle === "No messages yet" && $.subtitle && $.subtitle !== "No messages yet" && (R.subtitle = $.subtitle), !R.lastMessageAt && $.lastMessageAt && (R.lastMessageAt = $.lastMessageAt));
|
|
4678
4678
|
}
|
|
4679
|
-
M.value = $t(await
|
|
4679
|
+
M.value = $t(await mn(b)), q == null || q.setConversations(M.value), !I.value && M.value.length > 0 ? await qt(M.value[0].id) : O.value && await Kt();
|
|
4680
4680
|
} catch (c) {
|
|
4681
4681
|
const b = (q == null ? void 0 : q.getConversations()) ?? [];
|
|
4682
4682
|
if (b.length > 0) {
|
|
@@ -4691,7 +4691,7 @@ function R0({ environment: e }) {
|
|
|
4691
4691
|
async function qt(c) {
|
|
4692
4692
|
I.value = c, B.value = null, A.value = [], Ne = null, D.value = !1, Z.value = null, Y.value = null, et(c), await Kt();
|
|
4693
4693
|
}
|
|
4694
|
-
function
|
|
4694
|
+
function fn(c) {
|
|
4695
4695
|
c && (Y.value = null), Z.value = c;
|
|
4696
4696
|
}
|
|
4697
4697
|
function au(c) {
|
|
@@ -4720,11 +4720,11 @@ function R0({ environment: e }) {
|
|
|
4720
4720
|
const R = (ue = B.value) == null ? void 0 : ue.id, $ = crypto.randomUUID(), H = wa(oa(Z.value, b), $);
|
|
4721
4721
|
l.value = !0, w.value = null;
|
|
4722
4722
|
try {
|
|
4723
|
-
if (
|
|
4723
|
+
if (g.value) {
|
|
4724
4724
|
gr(x, E, H, R, $), Z.value = null;
|
|
4725
4725
|
return;
|
|
4726
4726
|
}
|
|
4727
|
-
|
|
4727
|
+
_n(
|
|
4728
4728
|
iu({
|
|
4729
4729
|
conversation: x,
|
|
4730
4730
|
kind: "text",
|
|
@@ -4738,7 +4738,7 @@ function R0({ environment: e }) {
|
|
|
4738
4738
|
const Te = new V.TextMessage(x.targetId, E, Vu(x));
|
|
4739
4739
|
(oe = Te.setMuid) == null || oe.call(Te, $), Object.keys(H).length > 0 && ((X = Te.setMetadata) == null || X.call(Te, H)), R && ((fe = Te.setParentMessageId) == null || fe.call(Te, Number(R)));
|
|
4740
4740
|
const dt = await V.sendMessage(Te);
|
|
4741
|
-
he(Ke(dt, (ge =
|
|
4741
|
+
he(Ke(dt, (ge = p.value) == null ? void 0 : ge.uid)), Pt(dt), await Mt(dt), Z.value = null;
|
|
4742
4742
|
} catch (Te) {
|
|
4743
4743
|
if (Lu(Te)) {
|
|
4744
4744
|
su("queued", $), gr(x, E, H, (re = B.value) == null ? void 0 : re.id, $), Z.value = null;
|
|
@@ -4752,7 +4752,7 @@ function R0({ environment: e }) {
|
|
|
4752
4752
|
async function Mu(c, b) {
|
|
4753
4753
|
var R, $, H, ue, oe, X, fe, ge, re, Te, dt, Ee, At, Pu;
|
|
4754
4754
|
const x = O.value;
|
|
4755
|
-
if (!x ||
|
|
4755
|
+
if (!x || g.value)
|
|
4756
4756
|
return;
|
|
4757
4757
|
const E = Qt(b);
|
|
4758
4758
|
if (Zt(E)) {
|
|
@@ -4766,7 +4766,7 @@ function R0({ environment: e }) {
|
|
|
4766
4766
|
Vu(x)
|
|
4767
4767
|
), (Ee = ft.setCaption) == null || Ee.call(ft, E)), (At = ft.setId) == null || At.call(ft, Number(c.id));
|
|
4768
4768
|
const vr = await V.editMessage(ft);
|
|
4769
|
-
he(Ke(vr, (Pu =
|
|
4769
|
+
he(Ke(vr, (Pu = p.value) == null ? void 0 : Pu.uid)), Pt(vr), Y.value = null;
|
|
4770
4770
|
} catch (ft) {
|
|
4771
4771
|
throw w.value = Re(ft, "Unable to edit the message."), ft;
|
|
4772
4772
|
} finally {
|
|
@@ -4784,11 +4784,11 @@ function R0({ environment: e }) {
|
|
|
4784
4784
|
const E = (ue = B.value) == null ? void 0 : ue.id, R = crypto.randomUUID(), $ = wa(oa(Z.value, b), R), H = La(c.file);
|
|
4785
4785
|
l.value = !0, w.value = null;
|
|
4786
4786
|
try {
|
|
4787
|
-
if (
|
|
4787
|
+
if (g.value) {
|
|
4788
4788
|
await br(x, c, $, E, R), Z.value = null;
|
|
4789
4789
|
return;
|
|
4790
4790
|
}
|
|
4791
|
-
|
|
4791
|
+
_n(
|
|
4792
4792
|
iu({
|
|
4793
4793
|
conversation: x,
|
|
4794
4794
|
kind: H,
|
|
@@ -4797,7 +4797,7 @@ function R0({ environment: e }) {
|
|
|
4797
4797
|
{
|
|
4798
4798
|
kind: H,
|
|
4799
4799
|
name: c.file.name,
|
|
4800
|
-
mimeType:
|
|
4800
|
+
mimeType: Fn(c.file) || void 0,
|
|
4801
4801
|
size: c.file.size
|
|
4802
4802
|
}
|
|
4803
4803
|
],
|
|
@@ -4815,7 +4815,7 @@ function R0({ environment: e }) {
|
|
|
4815
4815
|
);
|
|
4816
4816
|
(X = Ee.setMuid) == null || X.call(Ee, R), Object.keys($).length > 0 && ((fe = Ee.setMetadata) == null || fe.call(Ee, $)), E && ((ge = Ee.setParentMessageId) == null || ge.call(Ee, Number(E))), (re = c.caption) != null && re.trim() && ((Te = Ee.setCaption) == null || Te.call(Ee, c.caption.trim()));
|
|
4817
4817
|
const At = await V.sendMediaMessage(Ee);
|
|
4818
|
-
he(Ke(At, (dt =
|
|
4818
|
+
he(Ke(At, (dt = p.value) == null ? void 0 : dt.uid)), Pt(At), await Mt(At), Z.value = null;
|
|
4819
4819
|
} catch (Ee) {
|
|
4820
4820
|
if (Lu(Ee)) {
|
|
4821
4821
|
su("queued", R), await br(x, c, $, E, R), Z.value = null;
|
|
@@ -4839,7 +4839,7 @@ function R0({ environment: e }) {
|
|
|
4839
4839
|
const $ = (oe = B.value) == null ? void 0 : oe.id, H = crypto.randomUUID(), ue = wa(oa(Z.value, b), H);
|
|
4840
4840
|
l.value = !0, w.value = null;
|
|
4841
4841
|
try {
|
|
4842
|
-
if (
|
|
4842
|
+
if (g.value) {
|
|
4843
4843
|
mr(
|
|
4844
4844
|
x,
|
|
4845
4845
|
{
|
|
@@ -4852,7 +4852,7 @@ function R0({ environment: e }) {
|
|
|
4852
4852
|
), Z.value = null;
|
|
4853
4853
|
return;
|
|
4854
4854
|
}
|
|
4855
|
-
|
|
4855
|
+
_n(
|
|
4856
4856
|
iu({
|
|
4857
4857
|
conversation: x,
|
|
4858
4858
|
kind: "poll",
|
|
@@ -4880,7 +4880,7 @@ function R0({ environment: e }) {
|
|
|
4880
4880
|
"v2/create",
|
|
4881
4881
|
ge
|
|
4882
4882
|
), Te = (re == null ? void 0 : re.message) ?? (re == null ? void 0 : re.custom_message) ?? ((X = re == null ? void 0 : re.data) == null ? void 0 : X.message) ?? null;
|
|
4883
|
-
Te ? (sa(H), he(Ke(Te, (fe =
|
|
4883
|
+
Te ? (sa(H), he(Ke(Te, (fe = p.value) == null ? void 0 : fe.uid)), Pt(Te), await Mt(Te)) : (sa(H), await W()), Z.value = null;
|
|
4884
4884
|
} catch (ge) {
|
|
4885
4885
|
if (Lu(ge)) {
|
|
4886
4886
|
su("queued", H), mr(
|
|
@@ -4902,8 +4902,8 @@ function R0({ environment: e }) {
|
|
|
4902
4902
|
}
|
|
4903
4903
|
async function Au(c, b) {
|
|
4904
4904
|
var H, ue;
|
|
4905
|
-
const x = ((H = c.poll) == null ? void 0 : H.id) ?? c.id, E = (ue =
|
|
4906
|
-
if (!x || !b ||
|
|
4905
|
+
const x = ((H = c.poll) == null ? void 0 : H.id) ?? c.id, E = (ue = p.value) == null ? void 0 : ue.uid;
|
|
4906
|
+
if (!x || !b || g.value)
|
|
4907
4907
|
return;
|
|
4908
4908
|
const R = Ae(c.id, c.parentMessageId) ?? c;
|
|
4909
4909
|
if (!(!R.poll || R.poll.options.some(
|
|
@@ -4945,10 +4945,10 @@ function R0({ environment: e }) {
|
|
|
4945
4945
|
var R;
|
|
4946
4946
|
w.value = null;
|
|
4947
4947
|
const x = Ae(c.id, c.parentMessageId) ?? c, E = x.reactions.find(($) => $.emoji === b && $.reactedByMe);
|
|
4948
|
-
he(
|
|
4948
|
+
he(Ge(x, b));
|
|
4949
4949
|
try {
|
|
4950
4950
|
const $ = E ? await V.removeReaction(Number(c.id), b) : await V.addReaction(Number(c.id), b);
|
|
4951
|
-
he(Ke($, (R =
|
|
4951
|
+
he(Ke($, (R = p.value) == null ? void 0 : R.uid));
|
|
4952
4952
|
} catch ($) {
|
|
4953
4953
|
throw he(x), w.value = Re($, "Unable to update the reaction."), $;
|
|
4954
4954
|
}
|
|
@@ -4959,9 +4959,9 @@ function R0({ environment: e }) {
|
|
|
4959
4959
|
wt(c);
|
|
4960
4960
|
return;
|
|
4961
4961
|
}
|
|
4962
|
-
if (!
|
|
4962
|
+
if (!g.value)
|
|
4963
4963
|
try {
|
|
4964
|
-
const x = await V.deleteMessage(String(c.id)), E = Ke(x, (b =
|
|
4964
|
+
const x = await V.deleteMessage(String(c.id)), E = Ke(x, (b = p.value) == null ? void 0 : b.uid);
|
|
4965
4965
|
wt(E), Fe(E);
|
|
4966
4966
|
} catch (x) {
|
|
4967
4967
|
throw w.value = Re(x, "Unable to delete the message."), x;
|
|
@@ -4996,7 +4996,7 @@ function R0({ environment: e }) {
|
|
|
4996
4996
|
}
|
|
4997
4997
|
async function Du(c) {
|
|
4998
4998
|
var R, $;
|
|
4999
|
-
const b = c ?? ((R = O.value) == null ? void 0 : R.targetId), x = ($ =
|
|
4999
|
+
const b = c ?? ((R = O.value) == null ? void 0 : R.targetId), x = ($ = p.value) == null ? void 0 : $.uid, E = ++it;
|
|
5000
5000
|
if (!b || !x) {
|
|
5001
5001
|
E === it && (C.value = []);
|
|
5002
5002
|
return;
|
|
@@ -5008,7 +5008,7 @@ function R0({ environment: e }) {
|
|
|
5008
5008
|
do
|
|
5009
5009
|
oe = await H.fetchPrevious(), ue.push(...oe.map((fe) => {
|
|
5010
5010
|
var ge;
|
|
5011
|
-
return Ke(fe, (ge =
|
|
5011
|
+
return Ke(fe, (ge = p.value) == null ? void 0 : ge.uid);
|
|
5012
5012
|
}));
|
|
5013
5013
|
while (oe.length === 50);
|
|
5014
5014
|
const X = ue.filter((fe) => {
|
|
@@ -5069,7 +5069,7 @@ function R0({ environment: e }) {
|
|
|
5069
5069
|
}
|
|
5070
5070
|
}
|
|
5071
5071
|
const ou = 50;
|
|
5072
|
-
function
|
|
5072
|
+
function hn(c) {
|
|
5073
5073
|
const b = new V.MessagesRequestBuilder().setLimit(ou).hideReplies(!0).hideDeletedMessages(!0);
|
|
5074
5074
|
return c.type === "group" ? b.setGUID(c.targetId) : b.setUID(c.targetId), b.build();
|
|
5075
5075
|
}
|
|
@@ -5082,19 +5082,19 @@ function R0({ environment: e }) {
|
|
|
5082
5082
|
return y.value = [], S.value = !1, !1;
|
|
5083
5083
|
if ((c != null && c.reset || (je == null ? void 0 : je.conversationId) !== b.id) && (je = {
|
|
5084
5084
|
conversationId: b.id,
|
|
5085
|
-
request:
|
|
5085
|
+
request: hn(b)
|
|
5086
5086
|
}, S.value = !0), !je)
|
|
5087
5087
|
return !1;
|
|
5088
5088
|
const x = await je.request.fetchPrevious(), E = x.map(($) => {
|
|
5089
5089
|
var H;
|
|
5090
|
-
return Ke($, (H =
|
|
5090
|
+
return Ke($, (H = p.value) == null ? void 0 : H.uid);
|
|
5091
5091
|
}).filter(Et).sort(zt);
|
|
5092
|
-
y.value = c != null && c.reset ?
|
|
5092
|
+
y.value = c != null && c.reset ? An(
|
|
5093
5093
|
y.value.filter(
|
|
5094
5094
|
($) => $.conversationId === b.id && to($)
|
|
5095
5095
|
),
|
|
5096
5096
|
E
|
|
5097
|
-
) :
|
|
5097
|
+
) : An(y.value, E), S.value = x.length === ou, q == null || q.setMessages(b.id, y.value);
|
|
5098
5098
|
const R = x[x.length - 1];
|
|
5099
5099
|
return R && (await ee(R), await Mt(R)), x.length > 0;
|
|
5100
5100
|
}
|
|
@@ -5105,7 +5105,7 @@ function R0({ environment: e }) {
|
|
|
5105
5105
|
return;
|
|
5106
5106
|
}
|
|
5107
5107
|
const b = et(c.id);
|
|
5108
|
-
if (a.value = !0,
|
|
5108
|
+
if (a.value = !0, g.value && q) {
|
|
5109
5109
|
S.value = !1, je = null, a.value = !1;
|
|
5110
5110
|
return;
|
|
5111
5111
|
}
|
|
@@ -5125,7 +5125,7 @@ function R0({ environment: e }) {
|
|
|
5125
5125
|
a.value = !1;
|
|
5126
5126
|
}
|
|
5127
5127
|
}
|
|
5128
|
-
async function
|
|
5128
|
+
async function pn(c) {
|
|
5129
5129
|
var $;
|
|
5130
5130
|
const b = ($ = B.value) == null ? void 0 : $.id;
|
|
5131
5131
|
if (!b)
|
|
@@ -5137,24 +5137,24 @@ function R0({ environment: e }) {
|
|
|
5137
5137
|
return !1;
|
|
5138
5138
|
const x = await Ne.request.fetchPrevious(), E = x.map((H) => {
|
|
5139
5139
|
var ue;
|
|
5140
|
-
return Ke(H, (ue =
|
|
5140
|
+
return Ke(H, (ue = p.value) == null ? void 0 : ue.uid);
|
|
5141
5141
|
}).filter(Et).sort(zt);
|
|
5142
|
-
A.value = c != null && c.reset ?
|
|
5142
|
+
A.value = c != null && c.reset ? An(
|
|
5143
5143
|
A.value.filter(
|
|
5144
5144
|
(H) => H.parentMessageId === b && to(H)
|
|
5145
5145
|
),
|
|
5146
5146
|
E
|
|
5147
|
-
) :
|
|
5147
|
+
) : An(A.value, E), D.value = x.length === ou, q == null || q.setThreadMessages(b, A.value);
|
|
5148
5148
|
const R = x[x.length - 1];
|
|
5149
5149
|
return R && (await ee(R), await Mt(R)), x.length > 0;
|
|
5150
5150
|
}
|
|
5151
5151
|
async function tt(c) {
|
|
5152
|
-
if (r.value = !0,
|
|
5152
|
+
if (r.value = !0, g.value && q) {
|
|
5153
5153
|
A.value = q.getThreadMessages(c).sort(zt), D.value = !1, Ne = null, r.value = !1;
|
|
5154
5154
|
return;
|
|
5155
5155
|
}
|
|
5156
5156
|
try {
|
|
5157
|
-
await
|
|
5157
|
+
await pn({ reset: !0 });
|
|
5158
5158
|
} catch (b) {
|
|
5159
5159
|
const x = (q == null ? void 0 : q.getThreadMessages(c)) ?? [];
|
|
5160
5160
|
if (x.length > 0) {
|
|
@@ -5183,14 +5183,14 @@ function R0({ environment: e }) {
|
|
|
5183
5183
|
return !1;
|
|
5184
5184
|
i.value = !0, w.value = null;
|
|
5185
5185
|
try {
|
|
5186
|
-
return await
|
|
5186
|
+
return await pn();
|
|
5187
5187
|
} catch (c) {
|
|
5188
5188
|
throw w.value = Re(c, "Unable to load thread."), c;
|
|
5189
5189
|
} finally {
|
|
5190
5190
|
i.value = !1;
|
|
5191
5191
|
}
|
|
5192
5192
|
}
|
|
5193
|
-
async function
|
|
5193
|
+
async function gn(c) {
|
|
5194
5194
|
const b = c.trim();
|
|
5195
5195
|
if (!b)
|
|
5196
5196
|
return !1;
|
|
@@ -5221,21 +5221,21 @@ function R0({ environment: e }) {
|
|
|
5221
5221
|
}
|
|
5222
5222
|
async function Ru() {
|
|
5223
5223
|
const c = await V.getLoggedinUser();
|
|
5224
|
-
|
|
5224
|
+
p.value = c ? Sn(c) : null, h.value = !!c;
|
|
5225
5225
|
}
|
|
5226
5226
|
function qu() {
|
|
5227
5227
|
te || (V.addConnectionListener(
|
|
5228
5228
|
N,
|
|
5229
5229
|
new V.ConnectionListener({
|
|
5230
5230
|
onConnected: () => {
|
|
5231
|
-
if (m.value = !0, _e = 0, bt(),
|
|
5231
|
+
if (m.value = !0, _e = 0, bt(), G) {
|
|
5232
5232
|
Rt();
|
|
5233
5233
|
return;
|
|
5234
5234
|
}
|
|
5235
5235
|
la();
|
|
5236
5236
|
},
|
|
5237
5237
|
onDisconnected: () => {
|
|
5238
|
-
m.value = !1, !
|
|
5238
|
+
m.value = !1, !g.value && h.value && !J && (G = !0, nu(!0));
|
|
5239
5239
|
}
|
|
5240
5240
|
})
|
|
5241
5241
|
), V.addMessageListener(
|
|
@@ -5251,51 +5251,51 @@ function R0({ environment: e }) {
|
|
|
5251
5251
|
st(c);
|
|
5252
5252
|
},
|
|
5253
5253
|
onMessagesDelivered: () => {
|
|
5254
|
-
|
|
5254
|
+
Wt() || W({ includeThread: !1 });
|
|
5255
5255
|
},
|
|
5256
5256
|
onMessagesRead: () => {
|
|
5257
|
-
|
|
5257
|
+
Wt() || W({ includeThread: !1 });
|
|
5258
5258
|
},
|
|
5259
5259
|
onMessageEdited: (c) => {
|
|
5260
5260
|
var x;
|
|
5261
|
-
const b = Ke(c, (x =
|
|
5261
|
+
const b = Ke(c, (x = p.value) == null ? void 0 : x.uid);
|
|
5262
5262
|
Et(b) && (Ou(b), Pt(c));
|
|
5263
5263
|
},
|
|
5264
5264
|
onMessageDeleted: (c) => {
|
|
5265
5265
|
var x;
|
|
5266
|
-
const b = Ke(c, (x =
|
|
5266
|
+
const b = Ke(c, (x = p.value) == null ? void 0 : x.uid);
|
|
5267
5267
|
b.parentMessageId ? wt(b) : (wt(b), Fe(b)), Pe();
|
|
5268
5268
|
},
|
|
5269
5269
|
onMessageReactionAdded: () => {
|
|
5270
|
-
|
|
5270
|
+
W();
|
|
5271
5271
|
},
|
|
5272
5272
|
onMessageReactionRemoved: () => {
|
|
5273
|
-
|
|
5273
|
+
W();
|
|
5274
5274
|
},
|
|
5275
5275
|
onMessagesDeliveredToAll: () => {
|
|
5276
|
-
|
|
5276
|
+
Wt() || W({ includeThread: !1 });
|
|
5277
5277
|
},
|
|
5278
5278
|
onMessagesReadByAll: () => {
|
|
5279
|
-
|
|
5279
|
+
Wt() || W({ includeThread: !1 });
|
|
5280
5280
|
}
|
|
5281
5281
|
})
|
|
5282
5282
|
), te = !0);
|
|
5283
5283
|
}
|
|
5284
5284
|
async function st(c) {
|
|
5285
5285
|
var x;
|
|
5286
|
-
const b = Ke(c, (x =
|
|
5286
|
+
const b = Ke(c, (x = p.value) == null ? void 0 : x.uid);
|
|
5287
5287
|
if (Et(b)) {
|
|
5288
5288
|
if (Pt(c), await ee(c), b.parentMessageId) {
|
|
5289
|
-
|
|
5289
|
+
vn(b), Ye(b.parentMessageId), Pe();
|
|
5290
5290
|
return;
|
|
5291
5291
|
}
|
|
5292
5292
|
b.conversationId === I.value && (Ou(b), Pe(), await Mt(c));
|
|
5293
5293
|
}
|
|
5294
5294
|
}
|
|
5295
|
-
async function
|
|
5295
|
+
async function mn(c) {
|
|
5296
5296
|
return await Promise.all(
|
|
5297
5297
|
c.map(async (x) => {
|
|
5298
|
-
const E = await
|
|
5298
|
+
const E = await bn(x.targetId);
|
|
5299
5299
|
return {
|
|
5300
5300
|
...x,
|
|
5301
5301
|
muteSettings: E ? new Date(E) : null
|
|
@@ -5303,18 +5303,18 @@ function R0({ environment: e }) {
|
|
|
5303
5303
|
})
|
|
5304
5304
|
);
|
|
5305
5305
|
}
|
|
5306
|
-
async function
|
|
5306
|
+
async function bn(c) {
|
|
5307
5307
|
var E;
|
|
5308
5308
|
const b = q == null ? void 0 : q.getParticipantSettings(c), x = b != null && b.lastUpdated ? Date.now() - b.lastUpdated > 24 * 60 * 60 * 1e3 : !0;
|
|
5309
|
-
if (b && (
|
|
5309
|
+
if (b && (g.value || !x))
|
|
5310
5310
|
return b.mutedUntil;
|
|
5311
|
-
if (
|
|
5311
|
+
if (g.value || !h.value)
|
|
5312
5312
|
return (b == null ? void 0 : b.mutedUntil) ?? null;
|
|
5313
5313
|
try {
|
|
5314
5314
|
const R = await V.getLoggedinUser(), $ = (E = R == null ? void 0 : R.getUid) == null ? void 0 : E.call(R);
|
|
5315
5315
|
if (!$ || c === $)
|
|
5316
5316
|
return (b == null ? void 0 : b.mutedUntil) ?? null;
|
|
5317
|
-
const H =
|
|
5317
|
+
const H = Gu();
|
|
5318
5318
|
if (!H)
|
|
5319
5319
|
return (b == null ? void 0 : b.mutedUntil) ?? null;
|
|
5320
5320
|
const ue = await fetch(`${$e().chatApiBaseUrl}/chats/${c}/settings/${$}`, {
|
|
@@ -5338,12 +5338,12 @@ function R0({ environment: e }) {
|
|
|
5338
5338
|
}
|
|
5339
5339
|
function Pt(c) {
|
|
5340
5340
|
var $, H;
|
|
5341
|
-
const b = Ke(c, ($ =
|
|
5341
|
+
const b = Ke(c, ($ = p.value) == null ? void 0 : $.uid);
|
|
5342
5342
|
if (!Et(b) || b.isDeleted)
|
|
5343
5343
|
return;
|
|
5344
5344
|
const x = c.getConversationId(), E = M.value.find((ue) => ue.id === x);
|
|
5345
5345
|
if (!E) {
|
|
5346
|
-
|
|
5346
|
+
Gt();
|
|
5347
5347
|
return;
|
|
5348
5348
|
}
|
|
5349
5349
|
const R = {
|
|
@@ -5359,34 +5359,34 @@ function R0({ environment: e }) {
|
|
|
5359
5359
|
function Ou(c) {
|
|
5360
5360
|
y.value = Bt(y.value, c), I.value && (q == null || q.setMessages(I.value, y.value));
|
|
5361
5361
|
}
|
|
5362
|
-
function
|
|
5362
|
+
function vn(c) {
|
|
5363
5363
|
var b;
|
|
5364
5364
|
c.parentMessageId === ((b = B.value) == null ? void 0 : b.id) && (A.value = Bt(A.value, c), c.parentMessageId && (q == null || q.setThreadMessages(c.parentMessageId, A.value)));
|
|
5365
5365
|
}
|
|
5366
5366
|
async function Mt(c) {
|
|
5367
5367
|
var x, E, R, $, H;
|
|
5368
|
-
if (
|
|
5368
|
+
if (g.value)
|
|
5369
5369
|
return;
|
|
5370
5370
|
const b = (R = (E = (x = c.getSender) == null ? void 0 : x.call(c)) == null ? void 0 : E.getUid) == null ? void 0 : R.call(E);
|
|
5371
|
-
!b || b === (($ =
|
|
5371
|
+
!b || b === (($ = p.value) == null ? void 0 : $.uid) || (H = c.getReadByMeAt) != null && H.call(c) || (Tu(), await V.markAsRead(c));
|
|
5372
5372
|
}
|
|
5373
5373
|
async function ee(c) {
|
|
5374
5374
|
var x, E, R, $, H;
|
|
5375
|
-
if (
|
|
5375
|
+
if (g.value)
|
|
5376
5376
|
return;
|
|
5377
5377
|
const b = (R = (E = (x = c.getSender) == null ? void 0 : x.call(c)) == null ? void 0 : E.getUid) == null ? void 0 : R.call(E);
|
|
5378
|
-
!b || b === (($ =
|
|
5378
|
+
!b || b === (($ = p.value) == null ? void 0 : $.uid) || (H = c.getDeliveredToMeAt) != null && H.call(c) || (Tu(), await V.markAsDelivered(c));
|
|
5379
5379
|
}
|
|
5380
5380
|
async function v(c) {
|
|
5381
|
-
if (
|
|
5381
|
+
if (g.value)
|
|
5382
5382
|
return [];
|
|
5383
5383
|
const b = await V.getMessageReceipts(String(c.id));
|
|
5384
5384
|
return L0(b);
|
|
5385
5385
|
}
|
|
5386
|
-
function
|
|
5387
|
-
u.value = !1, n.value = !1, a.value = !1, r.value = !1, o.value = !1, i.value = !1, s.value = !1, l.value = !1, d.value = !1, f.value = !1, m.value = !1, bt(), _e = 0,
|
|
5386
|
+
function P() {
|
|
5387
|
+
u.value = !1, n.value = !1, a.value = !1, r.value = !1, o.value = !1, i.value = !1, s.value = !1, l.value = !1, d.value = !1, f.value = !1, m.value = !1, bt(), _e = 0, G = !1, J = !1, h.value = !1, p.value = null, M.value = [], y.value = [], A.value = [], C.value = [], B.value = null, Z.value = null, Y.value = null, L.value = [], I.value = null, S.value = !1, D.value = !1, je = null, Ne = null, ve.clear();
|
|
5388
5388
|
}
|
|
5389
|
-
async function
|
|
5389
|
+
async function W(c) {
|
|
5390
5390
|
if (de)
|
|
5391
5391
|
return de;
|
|
5392
5392
|
const b = (c == null ? void 0 : c.includeThread) ?? !0;
|
|
@@ -5414,7 +5414,7 @@ function R0({ environment: e }) {
|
|
|
5414
5414
|
var x;
|
|
5415
5415
|
return b ? A.value.find((E) => E.id === c) ?? null : ((x = B.value) == null ? void 0 : x.id) === c ? B.value : y.value.find((E) => E.id === c) ?? null;
|
|
5416
5416
|
}
|
|
5417
|
-
function
|
|
5417
|
+
function Ge(c, b) {
|
|
5418
5418
|
const x = c.reactions.find((E) => E.emoji === b);
|
|
5419
5419
|
return x ? x.reactedByMe && x.count === 1 ? {
|
|
5420
5420
|
...c,
|
|
@@ -5447,12 +5447,12 @@ function R0({ environment: e }) {
|
|
|
5447
5447
|
}
|
|
5448
5448
|
function wt(c) {
|
|
5449
5449
|
if (c.parentMessageId ? (A.value = A.value.filter((b) => b.id !== c.id), q == null || q.setThreadMessages(c.parentMessageId, A.value)) : (y.value = y.value.filter((b) => b.id !== c.id), I.value && (q == null || q.setMessages(I.value, y.value))), c.muid) {
|
|
5450
|
-
|
|
5450
|
+
L.value = L.value.filter((x) => x.muid !== c.muid);
|
|
5451
5451
|
const b = (q == null ? void 0 : q.getQueue().filter((x) => x.muid === c.muid)) ?? [];
|
|
5452
5452
|
for (const x of b)
|
|
5453
|
-
q == null || q.dequeue(x.id),
|
|
5453
|
+
q == null || q.dequeue(x.id), We.delete(x.id), x.kind === "attachment" && (q == null || q.deleteQueuedAttachment(x.id));
|
|
5454
5454
|
}
|
|
5455
|
-
c.parentMessageId ||
|
|
5455
|
+
c.parentMessageId || xn(c.conversationId);
|
|
5456
5456
|
}
|
|
5457
5457
|
function Fe(c) {
|
|
5458
5458
|
var ue, oe;
|
|
@@ -5477,7 +5477,7 @@ function R0({ environment: e }) {
|
|
|
5477
5477
|
M.value = $t(
|
|
5478
5478
|
M.value.map((X) => X.id !== b ? X : H ? {
|
|
5479
5479
|
...X,
|
|
5480
|
-
subtitle:
|
|
5480
|
+
subtitle: In(H),
|
|
5481
5481
|
lastMessageAt: H.sentAt
|
|
5482
5482
|
} : $ ? {
|
|
5483
5483
|
...X,
|
|
@@ -5486,21 +5486,21 @@ function R0({ environment: e }) {
|
|
|
5486
5486
|
} : X)
|
|
5487
5487
|
), q == null || q.setConversations(M.value);
|
|
5488
5488
|
}
|
|
5489
|
-
function
|
|
5489
|
+
function xn(c, b) {
|
|
5490
5490
|
const E = y.value.length > 0 ? y.value[y.value.length - 1] : null;
|
|
5491
5491
|
M.value = $t(
|
|
5492
5492
|
M.value.map((R) => R.id !== c ? R : {
|
|
5493
5493
|
...R,
|
|
5494
|
-
subtitle: E ?
|
|
5494
|
+
subtitle: E ? In(E) : "No messages yet",
|
|
5495
5495
|
lastMessageAt: E == null ? void 0 : E.sentAt
|
|
5496
5496
|
})
|
|
5497
5497
|
), q == null || q.setConversations(M.value);
|
|
5498
5498
|
}
|
|
5499
|
-
function
|
|
5499
|
+
function yn(c) {
|
|
5500
5500
|
M.value = $t(
|
|
5501
5501
|
M.value.map((b) => b.id !== c.conversationId ? b : {
|
|
5502
5502
|
...b,
|
|
5503
|
-
subtitle:
|
|
5503
|
+
subtitle: In(c),
|
|
5504
5504
|
lastMessageAt: c.sentAt,
|
|
5505
5505
|
unreadCount: 0
|
|
5506
5506
|
})
|
|
@@ -5513,9 +5513,9 @@ function R0({ environment: e }) {
|
|
|
5513
5513
|
id: `local-${c.muid}`,
|
|
5514
5514
|
muid: c.muid,
|
|
5515
5515
|
conversationId: c.conversation.id,
|
|
5516
|
-
senderId: ((E =
|
|
5517
|
-
senderName: V0(
|
|
5518
|
-
senderAvatar: (R =
|
|
5516
|
+
senderId: ((E = p.value) == null ? void 0 : E.uid) ?? "me",
|
|
5517
|
+
senderName: V0(p.value, c.metadata),
|
|
5518
|
+
senderAvatar: (R = p.value) == null ? void 0 : R.avatar,
|
|
5519
5519
|
text: c.text,
|
|
5520
5520
|
kind: c.kind,
|
|
5521
5521
|
sentAt: b,
|
|
@@ -5621,7 +5621,7 @@ function R0({ environment: e }) {
|
|
|
5621
5621
|
}
|
|
5622
5622
|
function Ii(c, b, x) {
|
|
5623
5623
|
const R = Date.now(), $ = (X) => X.trim().toLowerCase(), H = (X) => X.map((fe) => $(fe)).filter(Boolean).join("\0"), ue = $(b.question), oe = H(b.options);
|
|
5624
|
-
return
|
|
5624
|
+
return L.value.some((X) => {
|
|
5625
5625
|
if (X.kind !== "poll" || !X.poll || X.conversationId !== c.id || X.targetId !== c.targetId || X.parentMessageId !== x)
|
|
5626
5626
|
return !1;
|
|
5627
5627
|
const fe = new Date(X.createdAt).getTime();
|
|
@@ -5638,7 +5638,7 @@ function R0({ environment: e }) {
|
|
|
5638
5638
|
{
|
|
5639
5639
|
kind: $,
|
|
5640
5640
|
name: b.file.name,
|
|
5641
|
-
mimeType:
|
|
5641
|
+
mimeType: Fn(b.file) || void 0,
|
|
5642
5642
|
size: b.file.size
|
|
5643
5643
|
}
|
|
5644
5644
|
],
|
|
@@ -5656,7 +5656,7 @@ function R0({ environment: e }) {
|
|
|
5656
5656
|
attachment: {
|
|
5657
5657
|
kind: $,
|
|
5658
5658
|
name: b.file.name,
|
|
5659
|
-
type:
|
|
5659
|
+
type: Fn(b.file),
|
|
5660
5660
|
size: b.file.size,
|
|
5661
5661
|
caption: ((X = b.caption) == null ? void 0 : X.trim()) || void 0
|
|
5662
5662
|
},
|
|
@@ -5664,7 +5664,7 @@ function R0({ environment: e }) {
|
|
|
5664
5664
|
parentMessageId: E,
|
|
5665
5665
|
createdAt: H.sentAt.toISOString()
|
|
5666
5666
|
};
|
|
5667
|
-
|
|
5667
|
+
We.set(ue.id, b.file);
|
|
5668
5668
|
try {
|
|
5669
5669
|
await (q == null ? void 0 : q.storeQueuedAttachment(ue.id, b.file));
|
|
5670
5670
|
} catch {
|
|
@@ -5672,15 +5672,15 @@ function R0({ environment: e }) {
|
|
|
5672
5672
|
ia(H, ue);
|
|
5673
5673
|
}
|
|
5674
5674
|
function ia(c, b) {
|
|
5675
|
-
|
|
5675
|
+
L.value = [...L.value, b], q == null || q.enqueue(b), _n(c);
|
|
5676
5676
|
}
|
|
5677
|
-
function
|
|
5677
|
+
function _n(c) {
|
|
5678
5678
|
var b;
|
|
5679
|
-
c.parentMessageId ? (((b = B.value) == null ? void 0 : b.id) === c.parentMessageId && (A.value = Bt(A.value, c)), Ye(c.parentMessageId)) : y.value = Bt(y.value, c),
|
|
5679
|
+
c.parentMessageId ? (((b = B.value) == null ? void 0 : b.id) === c.parentMessageId && (A.value = Bt(A.value, c)), Ye(c.parentMessageId)) : y.value = Bt(y.value, c), yn(c), Pe();
|
|
5680
5680
|
}
|
|
5681
5681
|
function su(c, b) {
|
|
5682
5682
|
const x = (E) => E.map((R) => {
|
|
5683
|
-
const $ =
|
|
5683
|
+
const $ = Nn(R);
|
|
5684
5684
|
return R.muid !== b && $ !== b ? R : {
|
|
5685
5685
|
...R,
|
|
5686
5686
|
deliveryState: c
|
|
@@ -5694,7 +5694,7 @@ function R0({ environment: e }) {
|
|
|
5694
5694
|
const b = [...y.value, ...A.value].filter((x) => {
|
|
5695
5695
|
if (!x.id.startsWith("local-"))
|
|
5696
5696
|
return !1;
|
|
5697
|
-
const E =
|
|
5697
|
+
const E = Nn(x);
|
|
5698
5698
|
return x.muid === c || E === c;
|
|
5699
5699
|
});
|
|
5700
5700
|
for (const x of b)
|
|
@@ -5702,16 +5702,16 @@ function R0({ environment: e }) {
|
|
|
5702
5702
|
}
|
|
5703
5703
|
async function la() {
|
|
5704
5704
|
var c;
|
|
5705
|
-
if (!(f.value ||
|
|
5705
|
+
if (!(f.value || L.value.length === 0 || !h.value || g.value)) {
|
|
5706
5706
|
f.value = !0;
|
|
5707
5707
|
try {
|
|
5708
|
-
const b = [...
|
|
5708
|
+
const b = [...L.value].filter((x) => !ve.has(x.id)).sort((x, E) => x.createdAt.localeCompare(E.createdAt));
|
|
5709
5709
|
for (const x of b)
|
|
5710
5710
|
if (!ve.has(x.id)) {
|
|
5711
5711
|
ve.add(x.id);
|
|
5712
5712
|
try {
|
|
5713
5713
|
const E = await Fi(x);
|
|
5714
|
-
|
|
5714
|
+
L.value = L.value.filter((R) => R.id !== x.id), q == null || q.dequeue(x.id), We.delete(x.id), x.kind === "attachment" && await (q == null ? void 0 : q.deleteQueuedAttachment(x.id)), sa(x.muid), E ? he(Ke(E, (c = p.value) == null ? void 0 : c.uid)) : await W();
|
|
5715
5715
|
} finally {
|
|
5716
5716
|
ve.delete(x.id);
|
|
5717
5717
|
}
|
|
@@ -5743,7 +5743,7 @@ function R0({ environment: e }) {
|
|
|
5743
5743
|
return (re == null ? void 0 : re.message) ?? (re == null ? void 0 : re.custom_message) ?? ((E = re == null ? void 0 : re.data) == null ? void 0 : E.message) ?? null;
|
|
5744
5744
|
}
|
|
5745
5745
|
if (c.kind === "attachment" && c.attachment) {
|
|
5746
|
-
const ge =
|
|
5746
|
+
const ge = We.get(c.id) ?? await (q == null ? void 0 : q.getQueuedAttachment(c.id)) ?? null;
|
|
5747
5747
|
if (!ge)
|
|
5748
5748
|
throw new Error(`Queued attachment ${c.attachment.name} is no longer available for upload.`);
|
|
5749
5749
|
const re = new V.MediaMessage(c.targetId, ge, c.attachment.kind, b);
|
|
@@ -5765,10 +5765,10 @@ function R0({ environment: e }) {
|
|
|
5765
5765
|
schedulingMessage: d,
|
|
5766
5766
|
syncingQueue: f,
|
|
5767
5767
|
connected: m,
|
|
5768
|
-
offlineMode:
|
|
5768
|
+
offlineMode: g,
|
|
5769
5769
|
loggedIn: h,
|
|
5770
5770
|
error: w,
|
|
5771
|
-
currentUser:
|
|
5771
|
+
currentUser: p,
|
|
5772
5772
|
conversations: M,
|
|
5773
5773
|
messages: y,
|
|
5774
5774
|
threadMessages: A,
|
|
@@ -5783,10 +5783,10 @@ function R0({ environment: e }) {
|
|
|
5783
5783
|
editingMessage: Y,
|
|
5784
5784
|
init: St,
|
|
5785
5785
|
connectRealtime: ku,
|
|
5786
|
-
disconnectRealtime:
|
|
5786
|
+
disconnectRealtime: dn,
|
|
5787
5787
|
login: xe,
|
|
5788
5788
|
logout: ce,
|
|
5789
|
-
fetchConversations:
|
|
5789
|
+
fetchConversations: Gt,
|
|
5790
5790
|
selectConversation: qt,
|
|
5791
5791
|
sendTextMessage: Ot,
|
|
5792
5792
|
sendAttachmentMessage: wu,
|
|
@@ -5794,10 +5794,10 @@ function R0({ environment: e }) {
|
|
|
5794
5794
|
fetchScheduledMessages: Du,
|
|
5795
5795
|
loadOlderMessages: vt,
|
|
5796
5796
|
loadOlderThreadMessages: Fu,
|
|
5797
|
-
ensureMessageLoaded:
|
|
5797
|
+
ensureMessageLoaded: gn,
|
|
5798
5798
|
scheduleMessage: Ie,
|
|
5799
5799
|
rescheduleMessage: Lt,
|
|
5800
|
-
setReplyToMessage:
|
|
5800
|
+
setReplyToMessage: fn,
|
|
5801
5801
|
setEditingMessage: au,
|
|
5802
5802
|
openThread: ru,
|
|
5803
5803
|
closeThread: ct,
|
|
@@ -5809,10 +5809,10 @@ function R0({ environment: e }) {
|
|
|
5809
5809
|
};
|
|
5810
5810
|
}
|
|
5811
5811
|
async function q0(e) {
|
|
5812
|
-
return za(e), Jr === e &&
|
|
5812
|
+
return za(e), Jr === e && wn || (wn = (async () => {
|
|
5813
5813
|
const t = $e(), u = new V.AppSettingsBuilder().subscribePresenceForAllUsers().setRegion(t.region).autoEstablishSocketConnection(!0).setStorageMode(V.StorageMode.SESSION).build();
|
|
5814
5814
|
await V.init(t.appId, u), Jr = e;
|
|
5815
|
-
})()),
|
|
5815
|
+
})()), wn;
|
|
5816
5816
|
}
|
|
5817
5817
|
async function eo(e) {
|
|
5818
5818
|
const t = JSON.parse(atob(e.split(".")[1]));
|
|
@@ -5836,12 +5836,12 @@ async function eo(e) {
|
|
|
5836
5836
|
}), a.token;
|
|
5837
5837
|
}
|
|
5838
5838
|
function O0(e, t) {
|
|
5839
|
-
var
|
|
5840
|
-
const u = e.getConversationWith(), n = e.getConversationType() === V.RECEIVER_TYPE.GROUP ? "group" : "user", a = n === "group" ? u.getGuid() :
|
|
5841
|
-
if (
|
|
5839
|
+
var f;
|
|
5840
|
+
const u = e.getConversationWith(), n = e.getConversationType() === V.RECEIVER_TYPE.GROUP ? "group" : "user", a = n === "user" ? u : null, r = n === "group" ? u : null, o = n === "group" ? r.getGuid() : a.getUid(), i = e.getLastMessage(), s = t ? `group_${t}` : null;
|
|
5841
|
+
if (s && e.getConversationId() === s)
|
|
5842
5842
|
return {
|
|
5843
5843
|
id: e.getConversationId(),
|
|
5844
|
-
targetId:
|
|
5844
|
+
targetId: o,
|
|
5845
5845
|
type: n,
|
|
5846
5846
|
title: Be("scheduledMessages"),
|
|
5847
5847
|
subtitle: Be("hiddenHelperConversation"),
|
|
@@ -5849,34 +5849,34 @@ function O0(e, t) {
|
|
|
5849
5849
|
tags: [],
|
|
5850
5850
|
source: e
|
|
5851
5851
|
};
|
|
5852
|
-
const
|
|
5852
|
+
const l = i ? Ke(i, t) : null, d = e.getUnreadMessageCount();
|
|
5853
5853
|
return {
|
|
5854
5854
|
id: e.getConversationId(),
|
|
5855
|
-
targetId:
|
|
5855
|
+
targetId: o,
|
|
5856
5856
|
type: n,
|
|
5857
|
-
title:
|
|
5858
|
-
subtitle:
|
|
5859
|
-
avatar: eu(
|
|
5860
|
-
unreadCount: Number.isFinite(
|
|
5861
|
-
lastMessageAt:
|
|
5862
|
-
tags: (
|
|
5863
|
-
memberCount:
|
|
5857
|
+
title: u.getName() ?? o,
|
|
5858
|
+
subtitle: l && Et(l) && !l.isDeleted ? In(l) : "No messages yet",
|
|
5859
|
+
avatar: a ? eu(a.getAvatar()) : void 0,
|
|
5860
|
+
unreadCount: Number.isFinite(d) ? d : 0,
|
|
5861
|
+
lastMessageAt: i && !(l != null && l.isDeleted) ? new Date((((f = i.getSentAt) == null ? void 0 : f.call(i)) ?? 0) * 1e3) : void 0,
|
|
5862
|
+
tags: (e.getTags() ?? []).map((m) => String(m)),
|
|
5863
|
+
memberCount: r ? (
|
|
5864
5864
|
// Chats always include one technical system/app member; hide it from UI count with '-1'
|
|
5865
|
-
Math.max((
|
|
5865
|
+
Math.max((r.getMembersCount() ?? 1) - 1, 0)
|
|
5866
5866
|
) : void 0,
|
|
5867
5867
|
source: e
|
|
5868
5868
|
};
|
|
5869
5869
|
}
|
|
5870
5870
|
function Ke(e, t) {
|
|
5871
|
-
var f, m,
|
|
5872
|
-
const u = (f = e.getSender) == null ? void 0 : f.call(e), n = ((m = u == null ? void 0 : u.getUid) == null ? void 0 : m.call(u)) ?? "system", a = !!((
|
|
5871
|
+
var f, m, g, h, w, p, M, y, A, C, S, D, I;
|
|
5872
|
+
const u = (f = e.getSender) == null ? void 0 : f.call(e), n = ((m = u == null ? void 0 : u.getUid) == null ? void 0 : m.call(u)) ?? "system", a = !!((g = e.getDeletedAt) != null && g.call(e)), r = Kn(e), o = td(e), i = a ? [] : ir(e, r), s = a ? void 0 : Qn(e), l = sr(e), d = ((h = e.getQuotedMessage) == null ? void 0 : h.call(e)) ?? ((w = e.getReplyMessage) == null ? void 0 : w.call(e)) ?? ((p = e.getParentMessage) == null ? void 0 : p.call(e));
|
|
5873
5873
|
return {
|
|
5874
5874
|
id: String(((M = e.getId) == null ? void 0 : M.call(e)) ?? `${((y = e.getMuid) == null ? void 0 : y.call(e)) ?? crypto.randomUUID()}`),
|
|
5875
5875
|
muid: (A = e.getMuid) != null && A.call(e) ? String(e.getMuid()) : void 0,
|
|
5876
5876
|
conversationId: e.getConversationId(),
|
|
5877
5877
|
senderId: n,
|
|
5878
|
-
senderName:
|
|
5879
|
-
senderAvatar:
|
|
5878
|
+
senderName: W0(u, l),
|
|
5879
|
+
senderAvatar: G0(e, u),
|
|
5880
5880
|
text: N0(e, t),
|
|
5881
5881
|
kind: r,
|
|
5882
5882
|
sentAt: new Date((((C = e.getSentAt) == null ? void 0 : C.call(e)) ?? 0) * 1e3),
|
|
@@ -5914,11 +5914,11 @@ function P0(e) {
|
|
|
5914
5914
|
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;
|
|
5915
5915
|
return r ? {
|
|
5916
5916
|
kind: r,
|
|
5917
|
-
user:
|
|
5917
|
+
user: Sn(t),
|
|
5918
5918
|
timestamp: n ?? a
|
|
5919
5919
|
} : null;
|
|
5920
5920
|
}
|
|
5921
|
-
function
|
|
5921
|
+
function Sn(e) {
|
|
5922
5922
|
var t, u, n;
|
|
5923
5923
|
return {
|
|
5924
5924
|
uid: e.getUid(),
|
|
@@ -5941,7 +5941,7 @@ function hu(e) {
|
|
|
5941
5941
|
return new Date(e * 1e3);
|
|
5942
5942
|
}
|
|
5943
5943
|
function B0(e, t) {
|
|
5944
|
-
var r, o, i, s, l, d, f, m,
|
|
5944
|
+
var r, o, i, s, l, d, f, m, g, h;
|
|
5945
5945
|
if ((r = e.getDeletedAt) != null && r.call(e))
|
|
5946
5946
|
return "Message removed";
|
|
5947
5947
|
const u = (o = e.getType) == null ? void 0 : o.call(e), n = (i = e.getCategory) == null ? void 0 : i.call(e), a = Qn(e);
|
|
@@ -5958,7 +5958,7 @@ function B0(e, t) {
|
|
|
5958
5958
|
const w = ir(e, Kn(e))[0];
|
|
5959
5959
|
return ((f = (d = (l = e.getCaption) == null ? void 0 : l.call(e)) == null ? void 0 : d.trim) == null ? void 0 : f.call(d)) || nr(w ? [w] : [], "Sent an attachment");
|
|
5960
5960
|
}
|
|
5961
|
-
return ((h = (
|
|
5961
|
+
return ((h = (g = (m = e.getSender) == null ? void 0 : m.call(e)) == null ? void 0 : g.getUid) == null ? void 0 : h.call(g)) === t ? Be("youSentAMessage") : Be("unsupportedMessageType");
|
|
5962
5962
|
}
|
|
5963
5963
|
function N0(e, t) {
|
|
5964
5964
|
var r, o, i, s, l, d, f, m;
|
|
@@ -5970,14 +5970,14 @@ function N0(e, t) {
|
|
|
5970
5970
|
if (a)
|
|
5971
5971
|
return `Poll: ${a.question}`;
|
|
5972
5972
|
if (u === V.MESSAGE_TYPE.TEXT || typeof e.getText == "function") {
|
|
5973
|
-
const
|
|
5974
|
-
if (Zt(
|
|
5975
|
-
return
|
|
5973
|
+
const g = Qt((s = e.getText) == null ? void 0 : s.call(e));
|
|
5974
|
+
if (Zt(g))
|
|
5975
|
+
return g;
|
|
5976
5976
|
}
|
|
5977
5977
|
if (String(n).toLowerCase() === "message" && or(u)) {
|
|
5978
|
-
const
|
|
5979
|
-
if (Zt(
|
|
5980
|
-
return
|
|
5978
|
+
const g = Qt((l = e.getCaption) == null ? void 0 : l.call(e));
|
|
5979
|
+
if (Zt(g))
|
|
5980
|
+
return g;
|
|
5981
5981
|
const h = ir(e, Kn(e))[0];
|
|
5982
5982
|
return nr(h ? [h] : [], "Sent an attachment");
|
|
5983
5983
|
}
|
|
@@ -5996,10 +5996,10 @@ function zt(e, t) {
|
|
|
5996
5996
|
function Bt(e, t) {
|
|
5997
5997
|
if (!Et(t))
|
|
5998
5998
|
return e.filter(Et).sort(zt);
|
|
5999
|
-
const u =
|
|
5999
|
+
const u = Nn(t), n = e.findIndex((r) => r.id === t.id || !!(r.muid && t.muid && r.muid === t.muid) || !!(u && Nn(r) === u)), a = [...e];
|
|
6000
6000
|
return n >= 0 ? a[n] = t : a.push(t), a.sort(zt);
|
|
6001
6001
|
}
|
|
6002
|
-
function
|
|
6002
|
+
function An(e, t) {
|
|
6003
6003
|
return t.reduce(
|
|
6004
6004
|
(u, n) => Bt(u, n),
|
|
6005
6005
|
e.filter(Et)
|
|
@@ -6011,7 +6011,7 @@ function to(e) {
|
|
|
6011
6011
|
function Et(e) {
|
|
6012
6012
|
return e.kind !== "unsupported" && (e.kind !== "action" || Zt(e.text));
|
|
6013
6013
|
}
|
|
6014
|
-
function
|
|
6014
|
+
function Nn(e) {
|
|
6015
6015
|
const t = e.metadata, u = t == null ? void 0 : t.clientMuid;
|
|
6016
6016
|
return typeof u == "string" && u.trim() ? u.trim() : e.muid;
|
|
6017
6017
|
}
|
|
@@ -6021,7 +6021,7 @@ function wa(e, t) {
|
|
|
6021
6021
|
clientMuid: t
|
|
6022
6022
|
};
|
|
6023
6023
|
}
|
|
6024
|
-
function
|
|
6024
|
+
function In(e) {
|
|
6025
6025
|
return ei(e);
|
|
6026
6026
|
}
|
|
6027
6027
|
function Re(e, t) {
|
|
@@ -6031,7 +6031,7 @@ function Vu(e) {
|
|
|
6031
6031
|
return e.type === "group" ? V.RECEIVER_TYPE.GROUP : V.RECEIVER_TYPE.USER;
|
|
6032
6032
|
}
|
|
6033
6033
|
function rr() {
|
|
6034
|
-
const e =
|
|
6034
|
+
const e = Gu();
|
|
6035
6035
|
if (!e)
|
|
6036
6036
|
throw new Error("Missing access token.");
|
|
6037
6037
|
return e;
|
|
@@ -6087,7 +6087,7 @@ async function z0(e, t, u) {
|
|
|
6087
6087
|
throw new Error(`Scheduling failed with status ${s.status}.`);
|
|
6088
6088
|
}
|
|
6089
6089
|
function La(e) {
|
|
6090
|
-
const t =
|
|
6090
|
+
const t = Fn(e);
|
|
6091
6091
|
return t.startsWith("image/") ? "image" : t.startsWith("video/") ? "video" : t.startsWith("audio/") ? "audio" : "file";
|
|
6092
6092
|
}
|
|
6093
6093
|
function H0(e) {
|
|
@@ -6132,12 +6132,12 @@ function V0(e, t) {
|
|
|
6132
6132
|
const u = t.senderDisplayName;
|
|
6133
6133
|
return typeof u == "string" && u.trim() ? u.trim() : (e == null ? void 0 : e.name) ?? "You";
|
|
6134
6134
|
}
|
|
6135
|
-
function
|
|
6135
|
+
function W0(e, t) {
|
|
6136
6136
|
var n;
|
|
6137
6137
|
const u = t == null ? void 0 : t.senderDisplayName;
|
|
6138
6138
|
return typeof u == "string" && u.trim() ? u.trim() : ((n = e == null ? void 0 : e.getName) == null ? void 0 : n.call(e)) ?? "System";
|
|
6139
6139
|
}
|
|
6140
|
-
function
|
|
6140
|
+
function G0(e, t) {
|
|
6141
6141
|
const u = eu(ti(t));
|
|
6142
6142
|
return u || (Y0(e, "sender") ?? void 0);
|
|
6143
6143
|
}
|
|
@@ -6156,7 +6156,7 @@ function ti(e) {
|
|
|
6156
6156
|
const n = (r = t.getIcon) == null ? void 0 : r.call(t);
|
|
6157
6157
|
return n || (t.avatar ?? t.icon ?? t.url ?? t.src ?? t.uri ?? (t.metadata && typeof t.metadata == "object" ? t.metadata.avatar : void 0));
|
|
6158
6158
|
}
|
|
6159
|
-
function
|
|
6159
|
+
function Fn(e) {
|
|
6160
6160
|
const t = e.type.trim().toLowerCase();
|
|
6161
6161
|
return t || Q0(e.name);
|
|
6162
6162
|
}
|
|
@@ -6238,7 +6238,7 @@ function ni(e) {
|
|
|
6238
6238
|
return String(t).startsWith("image/") ? "image" : String(t).startsWith("video/") ? "video" : String(t).startsWith("audio/") ? "audio" : "file";
|
|
6239
6239
|
}
|
|
6240
6240
|
function ir(e, t) {
|
|
6241
|
-
var o, i, s, l, d, f, m,
|
|
6241
|
+
var o, i, s, l, d, f, m, g, h, w;
|
|
6242
6242
|
const u = (o = e.getAttachment) == null ? void 0 : o.call(e), n = ((l = (s = (i = e.getData) == null ? void 0 : i.call(e)) == null ? void 0 : s.attachments) == null ? void 0 : l[0]) ?? null;
|
|
6243
6243
|
if (!u && !n)
|
|
6244
6244
|
return [];
|
|
@@ -6248,7 +6248,7 @@ function ir(e, t) {
|
|
|
6248
6248
|
kind: a,
|
|
6249
6249
|
name: ((d = u == null ? void 0 : u.getName) == null ? void 0 : d.call(u)) ?? (n == null ? void 0 : n.name) ?? (n == null ? void 0 : n.fileName) ?? "Attachment",
|
|
6250
6250
|
url: ((f = u == null ? void 0 : u.getUrl) == null ? void 0 : f.call(u)) ?? ((m = u == null ? void 0 : u.getFileUrl) == null ? void 0 : m.call(u)) ?? (n == null ? void 0 : n.url) ?? (n == null ? void 0 : n.fileUrl) ?? void 0,
|
|
6251
|
-
mimeType: ((
|
|
6251
|
+
mimeType: ((g = u == null ? void 0 : u.getMimeType) == null ? void 0 : g.call(u)) ?? (n == null ? void 0 : n.mimeType) ?? void 0,
|
|
6252
6252
|
extension: ((h = u == null ? void 0 : u.getExtension) == null ? void 0 : h.call(u)) ?? (n == null ? void 0 : n.extension) ?? void 0,
|
|
6253
6253
|
size: ((w = u == null ? void 0 : u.getSize) == null ? void 0 : w.call(u)) ?? (n == null ? void 0 : n.size) ?? void 0,
|
|
6254
6254
|
width: r == null ? void 0 : r.width,
|
|
@@ -6257,7 +6257,7 @@ function ir(e, t) {
|
|
|
6257
6257
|
];
|
|
6258
6258
|
}
|
|
6259
6259
|
function X0(e, t, u) {
|
|
6260
|
-
var r, o, i, s, l, d, f, m,
|
|
6260
|
+
var r, o, i, s, l, d, f, m, g, h;
|
|
6261
6261
|
const n = Pa({
|
|
6262
6262
|
width: ((r = t == null ? void 0 : t.getWidth) == null ? void 0 : r.call(t)) ?? ((o = t == null ? void 0 : t.getImageWidth) == null ? void 0 : o.call(t)) ?? ((i = t == null ? void 0 : t.getVideoWidth) == null ? void 0 : i.call(t)) ?? (t == null ? void 0 : t.width),
|
|
6263
6263
|
height: ((s = t == null ? void 0 : t.getHeight) == null ? void 0 : s.call(t)) ?? ((l = t == null ? void 0 : t.getImageHeight) == null ? void 0 : l.call(t)) ?? ((d = t == null ? void 0 : t.getVideoHeight) == null ? void 0 : d.call(t)) ?? (t == null ? void 0 : t.height)
|
|
@@ -6269,13 +6269,13 @@ function X0(e, t, u) {
|
|
|
6269
6269
|
u == null ? void 0 : u.metadata,
|
|
6270
6270
|
u == null ? void 0 : u.data,
|
|
6271
6271
|
(f = e.getData) == null ? void 0 : f.call(e),
|
|
6272
|
-
(
|
|
6272
|
+
(g = (m = e.getData) == null ? void 0 : m.call(e)) == null ? void 0 : g.metadata,
|
|
6273
6273
|
(h = e.getMetadata) == null ? void 0 : h.call(e)
|
|
6274
6274
|
];
|
|
6275
6275
|
for (const w of a) {
|
|
6276
|
-
const
|
|
6277
|
-
if (
|
|
6278
|
-
return
|
|
6276
|
+
const p = J0(w);
|
|
6277
|
+
if (p)
|
|
6278
|
+
return p;
|
|
6279
6279
|
}
|
|
6280
6280
|
}
|
|
6281
6281
|
function J0(e) {
|
|
@@ -6294,9 +6294,7 @@ function J0(e) {
|
|
|
6294
6294
|
function Pa(e) {
|
|
6295
6295
|
if (!e || typeof e != "object")
|
|
6296
6296
|
return;
|
|
6297
|
-
const t = uo(
|
|
6298
|
-
e.width ?? e.w ?? e.imageWidth ?? e.videoWidth ?? e.naturalWidth
|
|
6299
|
-
), u = uo(
|
|
6297
|
+
const t = uo(e.width ?? e.w ?? e.imageWidth ?? e.videoWidth ?? e.naturalWidth), u = uo(
|
|
6300
6298
|
e.height ?? e.h ?? e.imageHeight ?? e.videoHeight ?? e.naturalHeight
|
|
6301
6299
|
);
|
|
6302
6300
|
if (!(!t || !u))
|
|
@@ -6316,17 +6314,17 @@ function Qn(e) {
|
|
|
6316
6314
|
if (t !== "poll" && !n)
|
|
6317
6315
|
return;
|
|
6318
6316
|
if (n) {
|
|
6319
|
-
const m = String(n.question ?? "").trim(),
|
|
6320
|
-
(
|
|
6317
|
+
const m = String(n.question ?? "").trim(), g = n.options && typeof n.options == "object" ? n.options : {}, h = (d = n.results) != null && d.options && typeof n.results.options == "object" ? n.results.options : {}, w = Array.from(/* @__PURE__ */ new Set([...Object.keys(g), ...Object.keys(h)])).sort(
|
|
6318
|
+
(p, M) => Number(p) - Number(M)
|
|
6321
6319
|
);
|
|
6322
6320
|
return !m || w.length === 0 ? void 0 : {
|
|
6323
6321
|
id: n.id ? String(n.id) : void 0,
|
|
6324
6322
|
question: m,
|
|
6325
|
-
options: w.map((
|
|
6326
|
-
const y = h[
|
|
6323
|
+
options: w.map((p, M) => {
|
|
6324
|
+
const y = h[p] ?? {}, A = y.voters && typeof y.voters == "object" ? Object.keys(y.voters) : [];
|
|
6327
6325
|
return {
|
|
6328
|
-
id: String(
|
|
6329
|
-
text: String(y.text ?? p
|
|
6326
|
+
id: String(p || M + 1),
|
|
6327
|
+
text: String(y.text ?? g[p] ?? `Option ${M + 1}`),
|
|
6330
6328
|
voteCount: Number(y.count ?? 0),
|
|
6331
6329
|
voters: A
|
|
6332
6330
|
};
|
|
@@ -6342,9 +6340,9 @@ function Qn(e) {
|
|
|
6342
6340
|
return {
|
|
6343
6341
|
id: u.id ? String(u.id) : void 0,
|
|
6344
6342
|
question: a,
|
|
6345
|
-
options: r.map((m,
|
|
6346
|
-
id: String(m.id ?? `option-${
|
|
6347
|
-
text: String(m.text ?? m.label ?? `Option ${
|
|
6343
|
+
options: r.map((m, g) => ({
|
|
6344
|
+
id: String(m.id ?? `option-${g + 1}`),
|
|
6345
|
+
text: String(m.text ?? m.label ?? `Option ${g + 1}`),
|
|
6348
6346
|
voteCount: Number(m.voteCount ?? 0),
|
|
6349
6347
|
voters: Array.isArray(m.voters) ? m.voters.map((h) => String(h)) : []
|
|
6350
6348
|
})),
|
|
@@ -6441,14 +6439,13 @@ function sr(e) {
|
|
|
6441
6439
|
if (t && typeof t == "object")
|
|
6442
6440
|
return t;
|
|
6443
6441
|
}
|
|
6444
|
-
z([]);
|
|
6445
6442
|
function od(e, t) {
|
|
6446
|
-
var o, i, s, l, d, f, m,
|
|
6443
|
+
var o, i, s, l, d, f, m, g, h, w, p, M, y, A, C, S, D, I, B, Z;
|
|
6447
6444
|
const u = ((i = (o = t == null ? void 0 : t.value) == null ? void 0 : o.getMetadata) == null ? void 0 : i.call(o)) ?? {};
|
|
6448
6445
|
if (!((s = e == null ? void 0 : e.getSender) != null && s.call(e)) || u.isChannel)
|
|
6449
6446
|
return "";
|
|
6450
|
-
const n = (
|
|
6451
|
-
let a = ((
|
|
6447
|
+
const n = (g = (m = (f = (d = (l = e == null ? void 0 : e.getData) == null ? void 0 : l.call(e)) == null ? void 0 : d.entities) == null ? void 0 : f.receiver) == null ? void 0 : m.entity) == null ? void 0 : g.scope;
|
|
6448
|
+
let a = ((p = (w = (h = e == null ? void 0 : e.getReceiver) == null ? void 0 : h.call(e)) == null ? void 0 : w.getMetadata) == null ? void 0 : p.call(w)) ?? {};
|
|
6452
6449
|
e instanceof V.Action && (a = ((A = (y = (M = e == null ? void 0 : e.getActionFor) == null ? void 0 : M.call(e)) == null ? void 0 : y.getMetadata) == null ? void 0 : A.call(y)) ?? {});
|
|
6453
6450
|
const r = a.systemDisplayName;
|
|
6454
6451
|
return (D = (S = (C = e == null ? void 0 : e.getData) == null ? void 0 : C.call(e)) == null ? void 0 : S.metadata) != null && D.senderDisplayName && (n == "moderator" || n === void 0) ? e.getData().metadata.senderDisplayName : r && (e instanceof V.Action || n == "admin") ? r : (Z = (B = (I = e == null ? void 0 : e.getSender) == null ? void 0 : I.call(e)) == null ? void 0 : B.getName) == null ? void 0 : Z.call(B);
|
|
@@ -6574,7 +6571,7 @@ async function Xn(e) {
|
|
|
6574
6571
|
return t;
|
|
6575
6572
|
}
|
|
6576
6573
|
async function Jn(e, t) {
|
|
6577
|
-
const u =
|
|
6574
|
+
const u = Gu();
|
|
6578
6575
|
if (!u)
|
|
6579
6576
|
throw new Error("Missing access token.");
|
|
6580
6577
|
const n = await fetch(e, {
|
|
@@ -6621,13 +6618,11 @@ function pd(e) {
|
|
|
6621
6618
|
lr.value.palette.setMode(e);
|
|
6622
6619
|
}
|
|
6623
6620
|
var en = /* @__PURE__ */ ((e) => (e.DEBUG = "Debug", e.INFO = "Info", e.WARN = "Warn", e.ERROR = "Error", e))(en || {});
|
|
6624
|
-
const cr = z(!1),
|
|
6625
|
-
|
|
6626
|
-
|
|
6627
|
-
let En;
|
|
6628
|
-
function Un(e, t, u) {
|
|
6621
|
+
const cr = z(!1), En = z(null), di = z("light"), fi = z(void 0), hi = z(void 0), Rn = z(void 0), Un = /* @__PURE__ */ new Set();
|
|
6622
|
+
let Dn;
|
|
6623
|
+
function zn(e, t, u) {
|
|
6629
6624
|
var n;
|
|
6630
|
-
(n =
|
|
6625
|
+
(n = Rn.value) == null || n.call(Rn, {
|
|
6631
6626
|
logUid: crypto.randomUUID(),
|
|
6632
6627
|
message: t,
|
|
6633
6628
|
severity: e,
|
|
@@ -6639,12 +6634,12 @@ function pi(e) {
|
|
|
6639
6634
|
di.value = e, pd(e), !(typeof document > "u") && document.documentElement.classList.toggle("dark", e === "dark");
|
|
6640
6635
|
}
|
|
6641
6636
|
function ea(e) {
|
|
6642
|
-
if (me.value && !e && !
|
|
6637
|
+
if (me.value && !e && !En.value)
|
|
6643
6638
|
return me.value;
|
|
6644
|
-
const t = e ??
|
|
6639
|
+
const t = e ?? En.value;
|
|
6645
6640
|
if (!t)
|
|
6646
6641
|
throw new Error("Environment has not been set yet. Call app.use(chat, { environment: ... }) first.");
|
|
6647
|
-
return (!me.value ||
|
|
6642
|
+
return (!me.value || En.value !== t) && (En.value = t, za(t), me.value = R0({ environment: t })), me.value;
|
|
6648
6643
|
}
|
|
6649
6644
|
function gd(e) {
|
|
6650
6645
|
var u, n, a, r, o, i, s;
|
|
@@ -6688,36 +6683,36 @@ const gi = U(() => {
|
|
|
6688
6683
|
}));
|
|
6689
6684
|
});
|
|
6690
6685
|
async function bd(e, t) {
|
|
6691
|
-
|
|
6686
|
+
Rn.value = t.loggerCallback, Wa(t.language ?? "en"), pi(t.themeMode);
|
|
6692
6687
|
const u = e.config.globalProperties.$primevue;
|
|
6693
6688
|
u && (u.config.ripple = !0, u.config.inputVariant = "filled"), e.component("BccChat", co), e.component("BccChatMessageList", co), e.provide("theme", { theme: lr });
|
|
6694
6689
|
const n = ea(t.environment);
|
|
6695
|
-
|
|
6690
|
+
zn(en.INFO, "Initializing chat", {
|
|
6696
6691
|
environment: t.environment,
|
|
6697
|
-
language:
|
|
6692
|
+
language: rn.value,
|
|
6698
6693
|
themeMode: t.themeMode
|
|
6699
|
-
}), await n.init(), cr.value = !0,
|
|
6694
|
+
}), await n.init(), cr.value = !0, Dn == null || Dn(), Pi(t.accessToken) ? Dn = Xe(
|
|
6700
6695
|
t.accessToken,
|
|
6701
6696
|
async (a) => {
|
|
6702
|
-
a ? await
|
|
6697
|
+
a ? await Hn(a) : await ta();
|
|
6703
6698
|
},
|
|
6704
6699
|
{ immediate: !0 }
|
|
6705
|
-
) : t.accessToken && await
|
|
6700
|
+
) : t.accessToken && await Hn(t.accessToken), zn(en.INFO, "Chat initialized", {
|
|
6706
6701
|
environment: $e().appId
|
|
6707
6702
|
});
|
|
6708
6703
|
}
|
|
6709
|
-
async function
|
|
6704
|
+
async function Hn(e) {
|
|
6710
6705
|
if (!e)
|
|
6711
6706
|
return ta();
|
|
6712
6707
|
const t = ea();
|
|
6713
|
-
|
|
6708
|
+
zn(en.INFO, "Signing in to chat"), await t.login(e);
|
|
6714
6709
|
}
|
|
6715
6710
|
async function ta() {
|
|
6716
|
-
me.value && (
|
|
6711
|
+
me.value && (zn(en.INFO, "Signing out from chat"), await me.value.logout());
|
|
6717
6712
|
}
|
|
6718
6713
|
async function vd(e) {
|
|
6719
6714
|
const t = e ?? "default";
|
|
6720
|
-
|
|
6715
|
+
Un.add(t);
|
|
6721
6716
|
const u = ea();
|
|
6722
6717
|
await u.init(), await u.connectRealtime(), await bi();
|
|
6723
6718
|
}
|
|
@@ -6725,22 +6720,22 @@ async function xd(e) {
|
|
|
6725
6720
|
if (!me.value)
|
|
6726
6721
|
return;
|
|
6727
6722
|
const t = e ?? "default";
|
|
6728
|
-
|
|
6723
|
+
Un.delete(t), !(Un.size > 0) && (await me.value.disconnectRealtime(), me.value.closeThread());
|
|
6729
6724
|
}
|
|
6730
6725
|
async function yd() {
|
|
6731
|
-
|
|
6726
|
+
Un.clear(), me.value && (await me.value.disconnectRealtime(), me.value.closeThread());
|
|
6732
6727
|
}
|
|
6733
6728
|
function _d(e) {
|
|
6734
6729
|
fi.value = e;
|
|
6735
6730
|
}
|
|
6736
6731
|
function Cd(e) {
|
|
6737
|
-
|
|
6732
|
+
Wa(e);
|
|
6738
6733
|
}
|
|
6739
6734
|
function Td(e) {
|
|
6740
6735
|
pi(e);
|
|
6741
6736
|
}
|
|
6742
6737
|
function kd(e) {
|
|
6743
|
-
return e ?
|
|
6738
|
+
return e ? Hn(e) : ta();
|
|
6744
6739
|
}
|
|
6745
6740
|
function Md(e) {
|
|
6746
6741
|
ea(e);
|
|
@@ -6803,7 +6798,7 @@ const xt = {
|
|
|
6803
6798
|
disconnect: xd,
|
|
6804
6799
|
disconnectAll: yd,
|
|
6805
6800
|
setAccessToken: kd,
|
|
6806
|
-
login:
|
|
6801
|
+
login: Hn,
|
|
6807
6802
|
logout: ta,
|
|
6808
6803
|
setCurrentEnvironment: Md,
|
|
6809
6804
|
getCurrentEnvironment: $e,
|
|
@@ -6820,7 +6815,7 @@ const xt = {
|
|
|
6820
6815
|
},
|
|
6821
6816
|
getSenderDisplayName: od,
|
|
6822
6817
|
getMessageTextPreview: w0,
|
|
6823
|
-
proxyImage:
|
|
6818
|
+
proxyImage: Wi,
|
|
6824
6819
|
getMutedUntil: Sd,
|
|
6825
6820
|
muteChat: Dd,
|
|
6826
6821
|
getMyChatSettings: ri,
|
|
@@ -6837,7 +6832,7 @@ const xt = {
|
|
|
6837
6832
|
onlineStatus: Aa.onlineStatus,
|
|
6838
6833
|
theme: lr,
|
|
6839
6834
|
themeMode: di,
|
|
6840
|
-
language:
|
|
6835
|
+
language: rn
|
|
6841
6836
|
};
|
|
6842
6837
|
function fr(e) {
|
|
6843
6838
|
var t, u;
|
|
@@ -6848,7 +6843,7 @@ function tu(e) {
|
|
|
6848
6843
|
const t = (n = (u = fr(e)) == null ? void 0 : u.getMetadata) == null ? void 0 : n.call(u);
|
|
6849
6844
|
return !!(t != null && t.isChannel);
|
|
6850
6845
|
}
|
|
6851
|
-
function
|
|
6846
|
+
function cn(e) {
|
|
6852
6847
|
var t, u;
|
|
6853
6848
|
return ((u = (t = fr(e)) == null ? void 0 : t.getHasJoined) == null ? void 0 : u.call(t)) ?? !1;
|
|
6854
6849
|
}
|
|
@@ -6858,22 +6853,22 @@ function hr(e) {
|
|
|
6858
6853
|
return typeof t == "string" ? t : void 0;
|
|
6859
6854
|
}
|
|
6860
6855
|
function Fd(e) {
|
|
6861
|
-
return tu(e) && (!
|
|
6856
|
+
return tu(e) && (!cn(e) || hr(e) === "participant");
|
|
6862
6857
|
}
|
|
6863
6858
|
function Rd(e) {
|
|
6864
|
-
return tu(e) ?
|
|
6859
|
+
return tu(e) ? cn(e) : !0;
|
|
6865
6860
|
}
|
|
6866
6861
|
function qd(e) {
|
|
6867
|
-
return tu(e) ?
|
|
6862
|
+
return tu(e) ? cn(e) : !0;
|
|
6868
6863
|
}
|
|
6869
6864
|
function Od(e) {
|
|
6870
|
-
return tu(e) ?
|
|
6865
|
+
return tu(e) ? cn(e) && hr(e) !== "participant" : !0;
|
|
6871
6866
|
}
|
|
6872
6867
|
function Ld(e) {
|
|
6873
6868
|
return !tu(e);
|
|
6874
6869
|
}
|
|
6875
6870
|
function Pd(e) {
|
|
6876
|
-
return (e == null ? void 0 : e.type) === "user" ? !0 : tu(e) ? !1 :
|
|
6871
|
+
return (e == null ? void 0 : e.type) === "user" ? !0 : tu(e) ? !1 : cn(e);
|
|
6877
6872
|
}
|
|
6878
6873
|
function $d(e, t) {
|
|
6879
6874
|
const u = t == null ? void 0 : t.trim();
|
|
@@ -6918,37 +6913,37 @@ function xi() {
|
|
|
6918
6913
|
function Ud(e) {
|
|
6919
6914
|
const { chatClient: t, selectedConversation: u, usesPublicContract: n, loadingChat: a } = e, r = U(() => {
|
|
6920
6915
|
var M;
|
|
6921
|
-
const
|
|
6922
|
-
return e.getHideDeletedMessages() ?
|
|
6916
|
+
const p = e.getPropMessages() ?? ((M = t.value) == null ? void 0 : M.messages.value) ?? [];
|
|
6917
|
+
return e.getHideDeletedMessages() ? p.filter((y) => !y.isDeleted) : p;
|
|
6923
6918
|
}), o = U(() => {
|
|
6924
|
-
const
|
|
6925
|
-
return
|
|
6919
|
+
const p = e.getPropLoadingMessages();
|
|
6920
|
+
return p !== void 0 ? p : !!(t.value && (n.value && a.value || t.value.loadingMessages.value));
|
|
6926
6921
|
}), i = U(() => {
|
|
6927
|
-
var
|
|
6928
|
-
return ((
|
|
6922
|
+
var p;
|
|
6923
|
+
return ((p = t.value) == null ? void 0 : p.hasOlderMessages.value) ?? !1;
|
|
6929
6924
|
}), s = U(() => {
|
|
6930
|
-
var
|
|
6931
|
-
return ((
|
|
6925
|
+
var p;
|
|
6926
|
+
return ((p = t.value) == null ? void 0 : p.loadingOlderMessages.value) ?? !1;
|
|
6932
6927
|
}), l = U(() => {
|
|
6933
6928
|
var M;
|
|
6934
|
-
const
|
|
6935
|
-
return e.getHideDeletedMessages() ?
|
|
6929
|
+
const p = e.getPropThreadMessages() ?? ((M = t.value) == null ? void 0 : M.threadMessages.value) ?? [];
|
|
6930
|
+
return e.getHideDeletedMessages() ? p.filter((y) => !y.isDeleted) : p;
|
|
6936
6931
|
}), d = U(() => {
|
|
6937
6932
|
var M;
|
|
6938
|
-
const
|
|
6939
|
-
return
|
|
6933
|
+
const p = e.getPropLoadingThreadMessages();
|
|
6934
|
+
return p !== void 0 ? p : ((M = t.value) == null ? void 0 : M.loadingThreadMessages.value) ?? !1;
|
|
6940
6935
|
}), f = U(() => {
|
|
6941
|
-
var
|
|
6942
|
-
return ((
|
|
6936
|
+
var p;
|
|
6937
|
+
return ((p = t.value) == null ? void 0 : p.activeThreadParentMessage.value) ?? null;
|
|
6943
6938
|
}), m = U(() => {
|
|
6944
|
-
var
|
|
6945
|
-
return ((
|
|
6946
|
-
}),
|
|
6947
|
-
var
|
|
6948
|
-
return ((
|
|
6939
|
+
var p;
|
|
6940
|
+
return ((p = t.value) == null ? void 0 : p.hasOlderThreadMessages.value) ?? !1;
|
|
6941
|
+
}), g = U(() => {
|
|
6942
|
+
var p;
|
|
6943
|
+
return ((p = t.value) == null ? void 0 : p.loadingOlderThreadMessages.value) ?? !1;
|
|
6949
6944
|
}), h = U(() => {
|
|
6950
|
-
const
|
|
6951
|
-
return
|
|
6945
|
+
const p = e.getPropShowDefaultEmptyState();
|
|
6946
|
+
return p !== void 0 ? p : !n.value;
|
|
6952
6947
|
}), w = U(
|
|
6953
6948
|
() => !!u.value && !o.value && r.value.length === 0
|
|
6954
6949
|
);
|
|
@@ -6961,7 +6956,7 @@ function Ud(e) {
|
|
|
6961
6956
|
loadingThreadMessages: d,
|
|
6962
6957
|
activeThreadParentMessage: f,
|
|
6963
6958
|
hasOlderThreadMessages: m,
|
|
6964
|
-
loadingOlderThreadMessages:
|
|
6959
|
+
loadingOlderThreadMessages: g,
|
|
6965
6960
|
showDefaultEmptyState: h,
|
|
6966
6961
|
isChatEmpty: w
|
|
6967
6962
|
};
|
|
@@ -6995,14 +6990,14 @@ function Hd(e) {
|
|
|
6995
6990
|
return B ? String(D.id) === String(B.id) || String(D.parentMessageId ?? "") === String(B.id) : !1;
|
|
6996
6991
|
}
|
|
6997
6992
|
function m(D) {
|
|
6998
|
-
var I, B, Z, Y,
|
|
6993
|
+
var I, B, Z, Y, L, K;
|
|
6999
6994
|
if (["image", "video", "audio", "file"].includes(D.kind)) {
|
|
7000
6995
|
const O = (Y = (Z = (B = (I = D.source) == null ? void 0 : I.getCaption) == null ? void 0 : B.call(I)) == null ? void 0 : Z.trim) == null ? void 0 : Y.call(Z);
|
|
7001
6996
|
return O || (D.source ? "" : D.text);
|
|
7002
6997
|
}
|
|
7003
|
-
return ((K = (
|
|
6998
|
+
return ((K = (L = D.source) == null ? void 0 : L.getText) == null ? void 0 : K.call(L)) || D.text;
|
|
7004
6999
|
}
|
|
7005
|
-
function
|
|
7000
|
+
function g(D) {
|
|
7006
7001
|
t.value = m(D);
|
|
7007
7002
|
}
|
|
7008
7003
|
function h(D) {
|
|
@@ -7014,7 +7009,7 @@ function Hd(e) {
|
|
|
7014
7009
|
const I = t.value;
|
|
7015
7010
|
i(), await D.sendTextMessage(I, e.getSendOptions());
|
|
7016
7011
|
}
|
|
7017
|
-
async function
|
|
7012
|
+
async function p(D) {
|
|
7018
7013
|
const I = e.getClient();
|
|
7019
7014
|
I && (i(), await I.sendAttachmentMessage(D, e.getSendOptions()));
|
|
7020
7015
|
}
|
|
@@ -7051,10 +7046,10 @@ function Hd(e) {
|
|
|
7051
7046
|
focusThreadComposer: d,
|
|
7052
7047
|
shouldFocusThreadComposer: f,
|
|
7053
7048
|
getEditableMessageText: m,
|
|
7054
|
-
loadMainDraft:
|
|
7049
|
+
loadMainDraft: g,
|
|
7055
7050
|
loadThreadDraft: h,
|
|
7056
7051
|
sendMessage: w,
|
|
7057
|
-
sendAttachment:
|
|
7052
|
+
sendAttachment: p,
|
|
7058
7053
|
sendPoll: M,
|
|
7059
7054
|
scheduleMessage: y,
|
|
7060
7055
|
sendThreadMessage: A,
|
|
@@ -7128,7 +7123,7 @@ function Vd() {
|
|
|
7128
7123
|
throw new Error("useComposerContext() requires an ancestor <BccChat> component.");
|
|
7129
7124
|
return e;
|
|
7130
7125
|
}
|
|
7131
|
-
function
|
|
7126
|
+
function Wd(e) {
|
|
7132
7127
|
const t = z(null), u = z([]), n = z(!1), a = z(null);
|
|
7133
7128
|
async function r(i) {
|
|
7134
7129
|
const s = e.getClient();
|
|
@@ -7155,8 +7150,8 @@ function Gd(e) {
|
|
|
7155
7150
|
closeMessageInfo: o
|
|
7156
7151
|
};
|
|
7157
7152
|
}
|
|
7158
|
-
function
|
|
7159
|
-
const { chatClient: t, selectedConversation: u } = e, n =
|
|
7153
|
+
function Gd(e) {
|
|
7154
|
+
const { chatClient: t, selectedConversation: u } = e, n = Wd({
|
|
7160
7155
|
getClient: () => t.value,
|
|
7161
7156
|
fetchErrorFallback: e.fetchErrorFallback
|
|
7162
7157
|
}), a = z(e.getInitialScheduledMessagesOpen()), r = U(() => {
|
|
@@ -7343,21 +7338,21 @@ function tf(e) {
|
|
|
7343
7338
|
}
|
|
7344
7339
|
}
|
|
7345
7340
|
function a(r, o, i, s) {
|
|
7346
|
-
var m,
|
|
7341
|
+
var m, g, h;
|
|
7347
7342
|
const l = e.getConversationTargetId(), d = (m = r == null ? void 0 : r.getGuid) == null ? void 0 : m.call(r);
|
|
7348
7343
|
if (!l || !d || d !== l || e.isChannel())
|
|
7349
7344
|
return;
|
|
7350
7345
|
const f = {
|
|
7351
7346
|
uid: o.getUid(),
|
|
7352
7347
|
displayName: o.getName(),
|
|
7353
|
-
avatar: eu((
|
|
7348
|
+
avatar: eu((g = o.getAvatar) == null ? void 0 : g.call(o)) ?? "",
|
|
7354
7349
|
role: s ?? ((h = o.getScope) == null ? void 0 : h.call(o)) ?? V.GROUP_MEMBER_SCOPE.PARTICIPANT
|
|
7355
7350
|
};
|
|
7356
7351
|
i === "add" ? t.value.some((w) => w.uid === f.uid) || (t.value = [...t.value, f]) : i === "remove" ? t.value = t.value.filter((w) => w.uid !== f.uid) : t.value = t.value.map(
|
|
7357
7352
|
(w) => w.uid === f.uid ? { ...w, ...f } : w
|
|
7358
7353
|
), e.onMembersChanged(t.value);
|
|
7359
7354
|
}
|
|
7360
|
-
return
|
|
7355
|
+
return Zn(() => {
|
|
7361
7356
|
V.addGroupListener(
|
|
7362
7357
|
u,
|
|
7363
7358
|
new V.GroupListener({
|
|
@@ -7390,17 +7385,16 @@ function tf(e) {
|
|
|
7390
7385
|
}
|
|
7391
7386
|
function uf(e) {
|
|
7392
7387
|
async function t(n, a) {
|
|
7393
|
-
var
|
|
7388
|
+
var g;
|
|
7394
7389
|
const r = n ?? xt.scrollToMessageId.value;
|
|
7395
7390
|
if (!r) return;
|
|
7396
|
-
console.log(`Attempting to scroll to message ${r}, try #${a}`);
|
|
7397
7391
|
const o = e.getClient();
|
|
7398
7392
|
if (o && !await o.ensureMessageLoaded(r)) {
|
|
7399
7393
|
xt.scrollToMessageId.value === r && (xt.scrollToMessageId.value = void 0);
|
|
7400
7394
|
return;
|
|
7401
7395
|
}
|
|
7402
7396
|
await Xt();
|
|
7403
|
-
const i = (
|
|
7397
|
+
const i = (g = e.chatRootRef.value) == null ? void 0 : g.querySelector(`[data-message-id="${r}"]`);
|
|
7404
7398
|
if (!i)
|
|
7405
7399
|
return a < 5 ? (await new Promise((h) => setTimeout(h, 50)), t(r, a + 1)) : void 0;
|
|
7406
7400
|
const s = i.closest(".message-list__scroll") ?? e.chatRootRef.value;
|
|
@@ -7408,8 +7402,8 @@ function uf(e) {
|
|
|
7408
7402
|
return;
|
|
7409
7403
|
const l = s.getBoundingClientRect(), d = i.getBoundingClientRect(), f = d.top - l.top + s.scrollTop, m = Math.max(0, f - s.clientHeight / 2 + d.height / 2);
|
|
7410
7404
|
if (m === 0 && a < 5)
|
|
7411
|
-
return
|
|
7412
|
-
|
|
7405
|
+
return await new Promise((h) => setTimeout(h, 50)), t(r, a + 1);
|
|
7406
|
+
s.scrollTo({
|
|
7413
7407
|
top: m,
|
|
7414
7408
|
behavior: "smooth"
|
|
7415
7409
|
}), xt.scrollToMessageId.value === r && (xt.scrollToMessageId.value = void 0);
|
|
@@ -7458,7 +7452,7 @@ function Ai(e, t) {
|
|
|
7458
7452
|
T("path", { d: "M680-200h-80q-17 0-28.5-11.5T560-240q0-17 11.5-28.5T600-280h80v-80q0-17 11.5-28.5T720-400q17 0 28.5 11.5T760-360v80h80q17 0 28.5 11.5T880-240q0 17-11.5 28.5T840-200h-80v80q0 17-11.5 28.5T720-80q-17 0-28.5-11.5T680-120v-80Zm-480 40q-33 0-56.5-23.5T120-240v-480q0-33 23.5-56.5T200-800h40v-40q0-17 11.5-28.5T280-880q17 0 28.5 11.5T320-840v40h240v-40q0-17 11.5-28.5T600-880q17 0 28.5 11.5T640-840v40h40q33 0 56.5 23.5T760-720v244q-20-3-40-3t-40 3v-84H200v320h280q0 20 3 40t11 40H200Zm0-480h480v-80H200v80Zm0 0v-80 80Z" })
|
|
7459
7453
|
]);
|
|
7460
7454
|
}
|
|
7461
|
-
function
|
|
7455
|
+
function jn(e, t) {
|
|
7462
7456
|
return k(), F("svg", {
|
|
7463
7457
|
"aria-hidden": "true",
|
|
7464
7458
|
viewBox: "0 -960 960 960",
|
|
@@ -7751,7 +7745,7 @@ function Ef(e) {
|
|
|
7751
7745
|
function m(C) {
|
|
7752
7746
|
l(), document.execCommand("styleWithCSS", !1, "false"), document.execCommand(C, !1), s(), d();
|
|
7753
7747
|
}
|
|
7754
|
-
function
|
|
7748
|
+
function g() {
|
|
7755
7749
|
s();
|
|
7756
7750
|
}
|
|
7757
7751
|
function h(C) {
|
|
@@ -7789,7 +7783,7 @@ function Ef(e) {
|
|
|
7789
7783
|
}
|
|
7790
7784
|
D && (document.execCommand("insertText", !1, D), s());
|
|
7791
7785
|
}
|
|
7792
|
-
function
|
|
7786
|
+
function p(C) {
|
|
7793
7787
|
if (!f()) {
|
|
7794
7788
|
d();
|
|
7795
7789
|
return;
|
|
@@ -7807,14 +7801,14 @@ function Ef(e) {
|
|
|
7807
7801
|
function A() {
|
|
7808
7802
|
a.value += 1, d(), i.value = "", e.updateModelValue("");
|
|
7809
7803
|
}
|
|
7810
|
-
return
|
|
7804
|
+
return Zn(() => {
|
|
7811
7805
|
document.addEventListener("pointerdown", M), document.addEventListener("selectionchange", y), Xt(() => {
|
|
7812
7806
|
if (u.value) {
|
|
7813
7807
|
const C = Ut(e.getModelValue());
|
|
7814
7808
|
u.value.innerHTML = C, C ? delete u.value.dataset.empty : u.value.dataset.empty = "true", i.value = C;
|
|
7815
7809
|
}
|
|
7816
7810
|
});
|
|
7817
|
-
}),
|
|
7811
|
+
}), nn(() => {
|
|
7818
7812
|
document.removeEventListener("pointerdown", M), document.removeEventListener("selectionchange", y);
|
|
7819
7813
|
}), {
|
|
7820
7814
|
applyFormat: m,
|
|
@@ -7824,8 +7818,8 @@ function Ef(e) {
|
|
|
7824
7818
|
focusEditor: l,
|
|
7825
7819
|
formatMenuPosition: o,
|
|
7826
7820
|
formatMenuRef: n,
|
|
7827
|
-
handleContextMenu:
|
|
7828
|
-
handleInput:
|
|
7821
|
+
handleContextMenu: p,
|
|
7822
|
+
handleInput: g,
|
|
7829
7823
|
handleKeydown: h,
|
|
7830
7824
|
handlePaste: w,
|
|
7831
7825
|
hideFormatMenu: d,
|
|
@@ -7843,31 +7837,31 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
|
|
|
7843
7837
|
{ kind: "audio", label: "attachAudio", icon: yf, testId: "composer-attach-audio" },
|
|
7844
7838
|
{ kind: "file", label: "attachFile", icon: nf, testId: "composer-attach-file" }
|
|
7845
7839
|
];
|
|
7846
|
-
function s(
|
|
7840
|
+
function s(g) {
|
|
7847
7841
|
a.value = !a.value;
|
|
7848
7842
|
}
|
|
7849
7843
|
function l() {
|
|
7850
7844
|
a.value = !1;
|
|
7851
7845
|
}
|
|
7852
|
-
function d(
|
|
7853
|
-
l(), n("pickFile",
|
|
7846
|
+
function d(g) {
|
|
7847
|
+
l(), n("pickFile", g);
|
|
7854
7848
|
}
|
|
7855
7849
|
function f() {
|
|
7856
7850
|
l(), n("openPoll");
|
|
7857
7851
|
}
|
|
7858
|
-
function m(
|
|
7859
|
-
var
|
|
7852
|
+
function m(g) {
|
|
7853
|
+
var p;
|
|
7860
7854
|
if (!a.value) return;
|
|
7861
|
-
const h =
|
|
7862
|
-
if (!(h instanceof Node) || (
|
|
7855
|
+
const h = g.target;
|
|
7856
|
+
if (!(h instanceof Node) || (p = r.value) != null && p.contains(h)) return;
|
|
7863
7857
|
const w = h instanceof Element ? h : h.parentElement;
|
|
7864
7858
|
w != null && w.closest('[data-testid="composer-actions-button"]') || l();
|
|
7865
7859
|
}
|
|
7866
|
-
return
|
|
7860
|
+
return Zn(() => {
|
|
7867
7861
|
document.addEventListener("pointerdown", m, !0);
|
|
7868
|
-
}),
|
|
7862
|
+
}), nn(() => {
|
|
7869
7863
|
document.removeEventListener("pointerdown", m, !0);
|
|
7870
|
-
}), t({ toggle: s, hide: l }), (
|
|
7864
|
+
}), t({ toggle: s, hide: l }), (g, h) => Yu((k(), F("div", {
|
|
7871
7865
|
ref_key: "menuRef",
|
|
7872
7866
|
ref: r,
|
|
7873
7867
|
class: "composer-actions-menu",
|
|
@@ -7878,7 +7872,7 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
|
|
|
7878
7872
|
type: "button",
|
|
7879
7873
|
class: "composer-actions-menu__item",
|
|
7880
7874
|
"data-testid": w.testId,
|
|
7881
|
-
onClick: (
|
|
7875
|
+
onClick: (p) => d(w.kind)
|
|
7882
7876
|
}, [
|
|
7883
7877
|
T("span", Sf, [
|
|
7884
7878
|
(k(), ae(nt(w.icon), { class: "size-5" }))
|
|
@@ -7949,7 +7943,7 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
|
|
|
7949
7943
|
T("button", {
|
|
7950
7944
|
type: "button",
|
|
7951
7945
|
class: "format-menu__item",
|
|
7952
|
-
onMousedown: r[0] || (r[0] =
|
|
7946
|
+
onMousedown: r[0] || (r[0] = Wu(() => {
|
|
7953
7947
|
}, ["prevent"])),
|
|
7954
7948
|
onClick: r[1] || (r[1] = (o) => u("format", "bold"))
|
|
7955
7949
|
}, [
|
|
@@ -7959,7 +7953,7 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
|
|
|
7959
7953
|
T("button", {
|
|
7960
7954
|
type: "button",
|
|
7961
7955
|
class: "format-menu__item",
|
|
7962
|
-
onMousedown: r[2] || (r[2] =
|
|
7956
|
+
onMousedown: r[2] || (r[2] = Wu(() => {
|
|
7963
7957
|
}, ["prevent"])),
|
|
7964
7958
|
onClick: r[3] || (r[3] = (o) => u("format", "italic"))
|
|
7965
7959
|
}, [
|
|
@@ -7969,7 +7963,7 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
|
|
|
7969
7963
|
T("button", {
|
|
7970
7964
|
type: "button",
|
|
7971
7965
|
class: "format-menu__item",
|
|
7972
|
-
onMousedown: r[4] || (r[4] =
|
|
7966
|
+
onMousedown: r[4] || (r[4] = Wu(() => {
|
|
7973
7967
|
}, ["prevent"])),
|
|
7974
7968
|
onClick: r[5] || (r[5] = (o) => u("format", "underline"))
|
|
7975
7969
|
}, [
|
|
@@ -7978,7 +7972,7 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
|
|
|
7978
7972
|
], 32)
|
|
7979
7973
|
], 4)) : ne("", !0);
|
|
7980
7974
|
}
|
|
7981
|
-
}), Nf = /* @__PURE__ */ we(Bf, [["__scopeId", "data-v-c9a1b3d8"]]), Uf = { class: "poll-dialog-body" }, zf = { class: "poll-dialog-field" }, Hf = { class: "poll-dialog-label" }, jf = { class: "poll-dialog-input-shell" }, Zf = { class: "poll-dialog-field" }, Vf = { class: "poll-dialog-label" },
|
|
7975
|
+
}), Nf = /* @__PURE__ */ we(Bf, [["__scopeId", "data-v-c9a1b3d8"]]), Uf = { class: "poll-dialog-body" }, zf = { class: "poll-dialog-field" }, Hf = { class: "poll-dialog-label" }, jf = { class: "poll-dialog-input-shell" }, Zf = { class: "poll-dialog-field" }, Vf = { class: "poll-dialog-label" }, Wf = { class: "poll-dialog-input-shell" }, Gf = { class: "poll-dialog-actions" }, Yf = /* @__PURE__ */ ye({
|
|
7982
7976
|
__name: "ComposerPollDialog",
|
|
7983
7977
|
props: {
|
|
7984
7978
|
visible: { type: Boolean },
|
|
@@ -7987,14 +7981,14 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
|
|
|
7987
7981
|
emits: ["update:visible", "send"],
|
|
7988
7982
|
setup(e, { expose: t, emit: u }) {
|
|
7989
7983
|
const n = e, a = u, { t: r } = Oe(), o = z(""), i = z(["", ""]), s = U(() => {
|
|
7990
|
-
const h = o.value.trim(), w = i.value.map((
|
|
7984
|
+
const h = o.value.trim(), w = i.value.map((p) => p.trim()).filter(Boolean);
|
|
7991
7985
|
return !!h && w.length >= 2;
|
|
7992
7986
|
});
|
|
7993
7987
|
function l() {
|
|
7994
7988
|
i.value = [...i.value, ""];
|
|
7995
7989
|
}
|
|
7996
7990
|
function d(h) {
|
|
7997
|
-
i.value.length <= 2 || (i.value = i.value.filter((w,
|
|
7991
|
+
i.value.length <= 2 || (i.value = i.value.filter((w, p) => p !== h));
|
|
7998
7992
|
}
|
|
7999
7993
|
function f() {
|
|
8000
7994
|
o.value = "", i.value = ["", ""];
|
|
@@ -8005,7 +7999,7 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
|
|
|
8005
7999
|
options: i.value.map((h) => h.trim()).filter(Boolean)
|
|
8006
8000
|
}), a("update:visible", !1), f());
|
|
8007
8001
|
}
|
|
8008
|
-
function
|
|
8002
|
+
function g() {
|
|
8009
8003
|
a("update:visible", !1), f();
|
|
8010
8004
|
}
|
|
8011
8005
|
return t({ reset: f }), (h, w) => (k(), ae(_(Na), {
|
|
@@ -8014,7 +8008,7 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
|
|
|
8014
8008
|
header: _(r)("createPollTitle"),
|
|
8015
8009
|
class: "w-[min(92vw,32rem)]",
|
|
8016
8010
|
draggable: !1,
|
|
8017
|
-
"onUpdate:visible":
|
|
8011
|
+
"onUpdate:visible": g
|
|
8018
8012
|
}, {
|
|
8019
8013
|
default: Ve(() => [
|
|
8020
8014
|
T("div", Uf, [
|
|
@@ -8023,7 +8017,7 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
|
|
|
8023
8017
|
T("div", jf, [
|
|
8024
8018
|
ie(_(xr), {
|
|
8025
8019
|
modelValue: o.value,
|
|
8026
|
-
"onUpdate:modelValue": w[0] || (w[0] = (
|
|
8020
|
+
"onUpdate:modelValue": w[0] || (w[0] = (p) => o.value = p),
|
|
8027
8021
|
class: "poll-dialog-input w-full",
|
|
8028
8022
|
placeholder: _(r)("pollQuestionPlaceholder")
|
|
8029
8023
|
}, null, 8, ["modelValue", "placeholder"])
|
|
@@ -8031,13 +8025,13 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
|
|
|
8031
8025
|
]),
|
|
8032
8026
|
T("div", Zf, [
|
|
8033
8027
|
T("label", Vf, j(_(r)("options")), 1),
|
|
8034
|
-
(k(!0), F(He, null, ht(i.value, (
|
|
8028
|
+
(k(!0), F(He, null, ht(i.value, (p, M) => (k(), F("div", {
|
|
8035
8029
|
key: M,
|
|
8036
8030
|
class: "poll-dialog-option-row"
|
|
8037
8031
|
}, [
|
|
8038
|
-
T("div",
|
|
8032
|
+
T("div", Wf, [
|
|
8039
8033
|
ie(_(xr), {
|
|
8040
|
-
"model-value":
|
|
8034
|
+
"model-value": p,
|
|
8041
8035
|
class: "poll-dialog-input w-full",
|
|
8042
8036
|
placeholder: _(r)("option", { index: M + 1 }),
|
|
8043
8037
|
"onUpdate:modelValue": (y) => i.value[M] = String(y)
|
|
@@ -8059,11 +8053,11 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
|
|
|
8059
8053
|
onClick: l
|
|
8060
8054
|
}, null, 8, ["label", "icon"])
|
|
8061
8055
|
]),
|
|
8062
|
-
T("div",
|
|
8056
|
+
T("div", Gf, [
|
|
8063
8057
|
ie(_(at), {
|
|
8064
8058
|
label: _(r)("cancel"),
|
|
8065
8059
|
text: "",
|
|
8066
|
-
onClick:
|
|
8060
|
+
onClick: g
|
|
8067
8061
|
}, null, 8, ["label"]),
|
|
8068
8062
|
ie(_(at), {
|
|
8069
8063
|
label: _(r)("sendPoll"),
|
|
@@ -8100,7 +8094,7 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
|
|
|
8100
8094
|
return `${y}:${A}`;
|
|
8101
8095
|
}
|
|
8102
8096
|
const f = U(() => /^([01]\d|2[0-3]):([0-5]\d)$/.test(i.value)), m = U(() => !!o.value && f.value && n.canSchedule);
|
|
8103
|
-
function
|
|
8097
|
+
function g() {
|
|
8104
8098
|
const [M, y, A] = o.value.split("-").map(Number), [C, S] = i.value.split(":").map(Number);
|
|
8105
8099
|
return new Date(M, y - 1, A, C, S, 0, 0).toISOString();
|
|
8106
8100
|
}
|
|
@@ -8108,9 +8102,9 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
|
|
|
8108
8102
|
o.value = l(), i.value = d();
|
|
8109
8103
|
}
|
|
8110
8104
|
function w() {
|
|
8111
|
-
m.value && (a("schedule", { scheduleDate:
|
|
8105
|
+
m.value && (a("schedule", { scheduleDate: g() }), a("update:visible", !1), h());
|
|
8112
8106
|
}
|
|
8113
|
-
function
|
|
8107
|
+
function p() {
|
|
8114
8108
|
a("update:visible", !1), h();
|
|
8115
8109
|
}
|
|
8116
8110
|
return t({ reset: h }), (M, y) => (k(), ae(_(Na), {
|
|
@@ -8119,7 +8113,7 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
|
|
|
8119
8113
|
header: _(r)("scheduleMessage"),
|
|
8120
8114
|
class: "w-[min(92vw,28rem)]",
|
|
8121
8115
|
draggable: !1,
|
|
8122
|
-
"onUpdate:visible":
|
|
8116
|
+
"onUpdate:visible": p
|
|
8123
8117
|
}, {
|
|
8124
8118
|
default: Ve(() => [
|
|
8125
8119
|
T("div", Qf, [
|
|
@@ -8131,7 +8125,7 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
|
|
|
8131
8125
|
type: "date",
|
|
8132
8126
|
class: "schedule-dialog-date-input"
|
|
8133
8127
|
}, null, 512), [
|
|
8134
|
-
[
|
|
8128
|
+
[qn, o.value]
|
|
8135
8129
|
]),
|
|
8136
8130
|
Yu(T("input", {
|
|
8137
8131
|
"onUpdate:modelValue": y[1] || (y[1] = (A) => i.value = A),
|
|
@@ -8142,7 +8136,7 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
|
|
|
8142
8136
|
pattern: "^([01]\\d|2[0-3]):([0-5]\\d)$",
|
|
8143
8137
|
"aria-label": "Time (24-hour)"
|
|
8144
8138
|
}, null, 512), [
|
|
8145
|
-
[
|
|
8139
|
+
[qn, i.value]
|
|
8146
8140
|
])
|
|
8147
8141
|
])
|
|
8148
8142
|
]),
|
|
@@ -8151,7 +8145,7 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
|
|
|
8151
8145
|
ie(_(at), {
|
|
8152
8146
|
label: _(r)("cancel"),
|
|
8153
8147
|
text: "",
|
|
8154
|
-
onClick:
|
|
8148
|
+
onClick: p
|
|
8155
8149
|
}, null, 8, ["label"]),
|
|
8156
8150
|
ie(_(at), {
|
|
8157
8151
|
label: _(r)("schedule"),
|
|
@@ -8204,11 +8198,11 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
|
|
|
8204
8198
|
video: "video/*",
|
|
8205
8199
|
audio: "audio/*",
|
|
8206
8200
|
file: "*/*"
|
|
8207
|
-
}, a = e, r = u, o = z(null), i = z(null), s = z(null), l = z("file"), d = z(!1), f = z(!1), m = z(!1), { t:
|
|
8201
|
+
}, a = e, r = u, o = z(null), i = z(null), s = z(null), l = z("file"), d = z(!1), f = z(!1), m = z(!1), { t: g } = Oe();
|
|
8208
8202
|
let h = null;
|
|
8209
8203
|
const {
|
|
8210
8204
|
applyFormat: w,
|
|
8211
|
-
composerEditorRef:
|
|
8205
|
+
composerEditorRef: p,
|
|
8212
8206
|
composerShellRef: M,
|
|
8213
8207
|
editorKey: y,
|
|
8214
8208
|
formatMenuPosition: A,
|
|
@@ -8219,7 +8213,7 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
|
|
|
8219
8213
|
handlePaste: B,
|
|
8220
8214
|
hideFormatMenu: Z,
|
|
8221
8215
|
resetEditor: Y,
|
|
8222
|
-
showFormatMenu:
|
|
8216
|
+
showFormatMenu: L
|
|
8223
8217
|
} = Ef({
|
|
8224
8218
|
getModelValue: () => a.modelValue,
|
|
8225
8219
|
updateModelValue: (xe) => r("update:modelValue", xe),
|
|
@@ -8231,17 +8225,17 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
|
|
|
8231
8225
|
}), N = U(() => {
|
|
8232
8226
|
switch (O.value) {
|
|
8233
8227
|
case "image":
|
|
8234
|
-
return
|
|
8228
|
+
return g("image");
|
|
8235
8229
|
case "video":
|
|
8236
|
-
return
|
|
8230
|
+
return g("video");
|
|
8237
8231
|
case "audio":
|
|
8238
|
-
return
|
|
8232
|
+
return g("audio");
|
|
8239
8233
|
case "file":
|
|
8240
|
-
return
|
|
8234
|
+
return g("file");
|
|
8241
8235
|
default:
|
|
8242
|
-
return
|
|
8236
|
+
return g("attachment");
|
|
8243
8237
|
}
|
|
8244
|
-
}), Q = U(() => !a.editingMessage && !a.replyToMessage ? "" : a.compact ? "pt-1" : "pt-1.5"), te = U(() => Zt(a.modelValue) || !!s.value), se = U(() => te.value && O.value !== "file"), pe = U(() => s.value ?
|
|
8238
|
+
}), Q = U(() => !a.editingMessage && !a.replyToMessage ? "" : a.compact ? "pt-1" : "pt-1.5"), te = U(() => Zt(a.modelValue) || !!s.value), se = U(() => te.value && O.value !== "file"), pe = U(() => s.value ? g("attachmentSummary", { name: s.value.name }) : xu(a.modelValue) || g("currentDraftWillBeScheduled"));
|
|
8245
8239
|
Xe(
|
|
8246
8240
|
() => a.resetSignal,
|
|
8247
8241
|
() => {
|
|
@@ -8271,7 +8265,7 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
|
|
|
8271
8265
|
function _e() {
|
|
8272
8266
|
s.value = null, o.value && (o.value.value = "");
|
|
8273
8267
|
}
|
|
8274
|
-
function
|
|
8268
|
+
function G(xe) {
|
|
8275
8269
|
var ce;
|
|
8276
8270
|
(ce = i.value) == null || ce.toggle(xe);
|
|
8277
8271
|
}
|
|
@@ -8290,7 +8284,7 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
|
|
|
8290
8284
|
function q(xe) {
|
|
8291
8285
|
r("sendPoll", xe);
|
|
8292
8286
|
}
|
|
8293
|
-
function
|
|
8287
|
+
function We(xe) {
|
|
8294
8288
|
r("scheduleMessage", {
|
|
8295
8289
|
...xe,
|
|
8296
8290
|
text: s.value ? void 0 : Qt(a.modelValue),
|
|
@@ -8378,9 +8372,9 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
|
|
|
8378
8372
|
severity: "secondary",
|
|
8379
8373
|
class: Ce(["composer-utility-button shrink-0 self-end", a.compact ? "h-9 w-9" : "h-10 w-10 max-md:h-9 max-md:w-9"]),
|
|
8380
8374
|
disabled: e.disabled || !!e.editingMessage,
|
|
8381
|
-
"aria-label": _(
|
|
8375
|
+
"aria-label": _(g)("addToMessage"),
|
|
8382
8376
|
"data-testid": "composer-actions-button",
|
|
8383
|
-
onClick:
|
|
8377
|
+
onClick: G
|
|
8384
8378
|
}, {
|
|
8385
8379
|
default: Ve(() => [
|
|
8386
8380
|
T("span", c1, [
|
|
@@ -8392,11 +8386,11 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
|
|
|
8392
8386
|
(k(), F("div", {
|
|
8393
8387
|
key: _(y),
|
|
8394
8388
|
ref_key: "composerEditorRef",
|
|
8395
|
-
ref:
|
|
8389
|
+
ref: p,
|
|
8396
8390
|
contenteditable: "true",
|
|
8397
8391
|
role: "textbox",
|
|
8398
8392
|
"aria-multiline": "true",
|
|
8399
|
-
"data-placeholder": _(
|
|
8393
|
+
"data-placeholder": _(g)("writeMessage"),
|
|
8400
8394
|
class: Ce(["composer-editor", e.disabled ? "pointer-events-none opacity-60" : ""]),
|
|
8401
8395
|
onFocus: ce[3] || (ce[3] = //@ts-ignore
|
|
8402
8396
|
(...be) => _(Z) && _(Z)(...be)),
|
|
@@ -8412,7 +8406,7 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
|
|
|
8412
8406
|
s.value || e.editingMessage || e.contextLabel || e.offlineMode ? (k(), F("div", f1, [
|
|
8413
8407
|
e.editingMessage ? (k(), ae(_(Dt), {
|
|
8414
8408
|
key: 0,
|
|
8415
|
-
text: _(
|
|
8409
|
+
text: _(g)("editing"),
|
|
8416
8410
|
context: "info",
|
|
8417
8411
|
rounded: "",
|
|
8418
8412
|
size: "sm",
|
|
@@ -8426,7 +8420,7 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
|
|
|
8426
8420
|
size: "sm",
|
|
8427
8421
|
class: "composer-meta-tag"
|
|
8428
8422
|
}, null, 8, ["text"])) : ne("", !0),
|
|
8429
|
-
e.offlineMode ? (k(), F("p", h1, j(e.pendingQueueCount ? _(
|
|
8423
|
+
e.offlineMode ? (k(), F("p", h1, j(e.pendingQueueCount ? _(g)("offlineQueued", { count: e.pendingQueueCount }) : _(g)("offline")), 1)) : ne("", !0)
|
|
8430
8424
|
])) : ne("", !0),
|
|
8431
8425
|
e.showScheduledButton ? (k(), ae(_(at), {
|
|
8432
8426
|
key: 1,
|
|
@@ -8434,7 +8428,7 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
|
|
|
8434
8428
|
outlined: "",
|
|
8435
8429
|
class: Ce(["composer-schedule-button shrink-0 self-end", a.compact ? "h-9 w-9" : "h-10 w-10 max-md:h-9 max-md:w-9"]),
|
|
8436
8430
|
disabled: e.disabled,
|
|
8437
|
-
"aria-label": _(
|
|
8431
|
+
"aria-label": _(g)("scheduledMessages"),
|
|
8438
8432
|
onClick: ve
|
|
8439
8433
|
}, {
|
|
8440
8434
|
default: Ve(() => [
|
|
@@ -8450,20 +8444,20 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
|
|
|
8450
8444
|
text: "",
|
|
8451
8445
|
class: Ce(["composer-send-button shrink-0 self-end", a.compact ? "h-9 w-9" : "h-10 w-10 max-md:h-9 max-md:w-9"]),
|
|
8452
8446
|
disabled: e.disabled || !te.value,
|
|
8453
|
-
"aria-label": e.editingMessage ? _(
|
|
8447
|
+
"aria-label": e.editingMessage ? _(g)("saveMessage") : s.value ? _(g)("sendAttachment") : _(g)("sendMessage"),
|
|
8454
8448
|
onMousedown: Ne,
|
|
8455
8449
|
onMouseup: it,
|
|
8456
8450
|
onMouseleave: it,
|
|
8457
8451
|
onTouchstart: Ne,
|
|
8458
8452
|
onTouchend: it,
|
|
8459
8453
|
onTouchcancel: it,
|
|
8460
|
-
onContextmenu: ce[8] || (ce[8] =
|
|
8454
|
+
onContextmenu: ce[8] || (ce[8] = Wu(() => {
|
|
8461
8455
|
}, ["prevent"])),
|
|
8462
8456
|
onClick: St
|
|
8463
8457
|
}, {
|
|
8464
8458
|
default: Ve(() => [
|
|
8465
8459
|
T("span", g1, [
|
|
8466
|
-
e.editingMessage ? (k(), ae(nt(_(
|
|
8460
|
+
e.editingMessage ? (k(), ae(nt(_(jn)), {
|
|
8467
8461
|
key: 0,
|
|
8468
8462
|
class: "size-7"
|
|
8469
8463
|
})) : (k(), ae(nt(_(Di)), {
|
|
@@ -8476,7 +8470,7 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
|
|
|
8476
8470
|
}, 8, ["class", "disabled", "aria-label"])
|
|
8477
8471
|
], 2),
|
|
8478
8472
|
ie(Nf, {
|
|
8479
|
-
visible: _(
|
|
8473
|
+
visible: _(L),
|
|
8480
8474
|
position: _(A),
|
|
8481
8475
|
onFormat: ce[9] || (ce[9] = (be) => _(w)(be))
|
|
8482
8476
|
}, null, 8, ["visible", "position"]),
|
|
@@ -8492,7 +8486,7 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
|
|
|
8492
8486
|
disabled: e.disabled,
|
|
8493
8487
|
"can-schedule": se.value,
|
|
8494
8488
|
"content-preview": pe.value,
|
|
8495
|
-
onSchedule:
|
|
8489
|
+
onSchedule: We
|
|
8496
8490
|
}, null, 8, ["visible", "disabled", "can-schedule", "content-preview"])
|
|
8497
8491
|
], 2));
|
|
8498
8492
|
}
|
|
@@ -8514,10 +8508,10 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
|
|
|
8514
8508
|
() => l.value ? o.threadComposerResetSignal.value : o.composerResetSignal.value
|
|
8515
8509
|
), m = U(
|
|
8516
8510
|
() => l.value ? !!r.activeThreadParentMessage.value : !!a.conversation.value
|
|
8517
|
-
),
|
|
8511
|
+
), g = U(() => l.value), h = U(() => {
|
|
8518
8512
|
const Y = l.value ? r.loadingThreadMessages.value : r.loadingMessages.value;
|
|
8519
8513
|
return o.isSendingMessage.value || Y || o.isSchedulingMessage.value;
|
|
8520
|
-
}), w = U(() => l.value ? m.value && a.canOpenThread.value : m.value && !a.isReadOnly.value),
|
|
8514
|
+
}), w = U(() => l.value ? m.value && a.canOpenThread.value : m.value && !a.isReadOnly.value), p = U(() => l.value ? m.value && !a.canOpenThread.value : m.value && a.isReadOnly.value);
|
|
8521
8515
|
function M() {
|
|
8522
8516
|
s.emit("composer:send", { target: u.target });
|
|
8523
8517
|
}
|
|
@@ -8548,20 +8542,20 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
|
|
|
8548
8542
|
var Y;
|
|
8549
8543
|
await ((Y = B.value) == null ? void 0 : Y.focusEditor());
|
|
8550
8544
|
}
|
|
8551
|
-
return t({ focusEditor: Z }), (Y,
|
|
8545
|
+
return t({ focusEditor: Z }), (Y, L) => w.value ? (k(), ae(v1, {
|
|
8552
8546
|
key: 0,
|
|
8553
8547
|
ref_key: "composerRef",
|
|
8554
8548
|
ref: B,
|
|
8555
8549
|
"model-value": d.value,
|
|
8556
8550
|
disabled: h.value,
|
|
8557
8551
|
"reset-signal": f.value,
|
|
8558
|
-
compact:
|
|
8552
|
+
compact: g.value,
|
|
8559
8553
|
"show-scheduled-button": _(i).hasScheduledMessages.value,
|
|
8560
8554
|
"reply-to-message": _(o).messageBeingRepliedTo.value,
|
|
8561
8555
|
"editing-message": _(o).messageBeingEdited.value,
|
|
8562
8556
|
"offline-mode": _(o).offlineMode.value,
|
|
8563
8557
|
"pending-queue-count": _(o).pendingQueueCount.value,
|
|
8564
|
-
"onUpdate:modelValue":
|
|
8558
|
+
"onUpdate:modelValue": L[0] || (L[0] = (K) => d.value = K),
|
|
8565
8559
|
onSendText: M,
|
|
8566
8560
|
onSendAttachment: y,
|
|
8567
8561
|
onSendPoll: A,
|
|
@@ -8569,7 +8563,7 @@ const Df = ["data-testid", "onClick"], Sf = { class: "composer-actions-menu__ico
|
|
|
8569
8563
|
onOpenScheduled: S,
|
|
8570
8564
|
onCancelReply: D,
|
|
8571
8565
|
onCancelEdit: I
|
|
8572
|
-
}, null, 8, ["model-value", "disabled", "reset-signal", "compact", "show-scheduled-button", "reply-to-message", "editing-message", "offline-mode", "pending-queue-count"])) :
|
|
8566
|
+
}, null, 8, ["model-value", "disabled", "reset-signal", "compact", "show-scheduled-button", "reply-to-message", "editing-message", "offline-mode", "pending-queue-count"])) : p.value ? (k(), F("div", x1, j(l.value ? _(n)("repliesDisabledInChannels") : _(n)("readOnlyChannel")), 1)) : ne("", !0);
|
|
8573
8567
|
}
|
|
8574
8568
|
}), io = /* @__PURE__ */ we(y1, [["__scopeId", "data-v-d8b21bdf"]]), _1 = 1800;
|
|
8575
8569
|
function C1(e) {
|
|
@@ -8607,7 +8601,7 @@ function C1(e) {
|
|
|
8607
8601
|
const se = { [te.type]: te }, pe = d(O);
|
|
8608
8602
|
return pe && (se["text/plain"] = new Blob([pe], { type: "text/plain" })), await navigator.clipboard.write([new ClipboardItem(se)]), !0;
|
|
8609
8603
|
}
|
|
8610
|
-
function
|
|
8604
|
+
function g(O) {
|
|
8611
8605
|
const N = Number.isFinite(O.clientX) ? O.clientX : 0, Q = Number.isFinite(O.clientY) ? O.clientY : 0;
|
|
8612
8606
|
if (N > 0 || Q > 0)
|
|
8613
8607
|
return { x: N, y: Q };
|
|
@@ -8626,13 +8620,13 @@ function C1(e) {
|
|
|
8626
8620
|
if (!e.canUseMessageActions() || Q === "contextmenu" && !a || Q === "tap" && a)
|
|
8627
8621
|
return;
|
|
8628
8622
|
N.preventDefault(), N.stopPropagation(), (se = e.onMenuOpen) == null || se.call(e), u.value = O;
|
|
8629
|
-
const te =
|
|
8623
|
+
const te = g(N);
|
|
8630
8624
|
await Xt(), (pe = t.value) == null || pe.show(N, { x: te.x + 2, y: te.y + 2 });
|
|
8631
8625
|
}
|
|
8632
8626
|
function w(O, N) {
|
|
8633
8627
|
h(O, N, "contextmenu");
|
|
8634
8628
|
}
|
|
8635
|
-
function
|
|
8629
|
+
function p(O, N) {
|
|
8636
8630
|
if (u.value) {
|
|
8637
8631
|
N.preventDefault(), N.stopPropagation(), M();
|
|
8638
8632
|
return;
|
|
@@ -8687,7 +8681,7 @@ function C1(e) {
|
|
|
8687
8681
|
function Y(O) {
|
|
8688
8682
|
e.emit.info(O), M();
|
|
8689
8683
|
}
|
|
8690
|
-
function
|
|
8684
|
+
function L(O) {
|
|
8691
8685
|
e.emit.delete(O), M();
|
|
8692
8686
|
}
|
|
8693
8687
|
function K(O) {
|
|
@@ -8709,7 +8703,7 @@ function C1(e) {
|
|
|
8709
8703
|
{
|
|
8710
8704
|
key: "copy",
|
|
8711
8705
|
label: n.value === O.id ? e.t("copied") : e.t("copyText"),
|
|
8712
|
-
icon: n.value === O.id ?
|
|
8706
|
+
icon: n.value === O.id ? jn : of,
|
|
8713
8707
|
visible: !0,
|
|
8714
8708
|
action: () => S(O)
|
|
8715
8709
|
},
|
|
@@ -8732,7 +8726,7 @@ function C1(e) {
|
|
|
8732
8726
|
label: e.t("delete"),
|
|
8733
8727
|
icon: sf,
|
|
8734
8728
|
visible: l(O),
|
|
8735
|
-
action: () =>
|
|
8729
|
+
action: () => L(O)
|
|
8736
8730
|
},
|
|
8737
8731
|
{
|
|
8738
8732
|
key: "translate",
|
|
@@ -8749,7 +8743,7 @@ function C1(e) {
|
|
|
8749
8743
|
copiedMessageId: n,
|
|
8750
8744
|
supportsDesktopContextMenu: a,
|
|
8751
8745
|
handleMessageContextMenu: w,
|
|
8752
|
-
handleMessageTap:
|
|
8746
|
+
handleMessageTap: p,
|
|
8753
8747
|
closeActionMenu: M,
|
|
8754
8748
|
resetActionMenuState: y,
|
|
8755
8749
|
reactToMessage: A,
|
|
@@ -8767,83 +8761,83 @@ function E1(e) {
|
|
|
8767
8761
|
function l() {
|
|
8768
8762
|
s(), r == null || r.disconnect(), r = null, i = null;
|
|
8769
8763
|
}
|
|
8770
|
-
function d(
|
|
8764
|
+
function d(p) {
|
|
8771
8765
|
u && (s(), o = requestAnimationFrame(() => {
|
|
8772
|
-
o = null, !(!u || t.value !==
|
|
8766
|
+
o = null, !(!u || t.value !== p) && (p.scrollTop = p.scrollHeight, n = p.scrollTop);
|
|
8773
8767
|
}));
|
|
8774
8768
|
}
|
|
8775
8769
|
function f() {
|
|
8776
|
-
const
|
|
8777
|
-
|
|
8778
|
-
d(
|
|
8779
|
-
}), r.observe(
|
|
8770
|
+
const p = t.value;
|
|
8771
|
+
p && (i === p && r || (l(), r = new ResizeObserver(() => {
|
|
8772
|
+
d(p);
|
|
8773
|
+
}), r.observe(p), i = p));
|
|
8780
8774
|
}
|
|
8781
8775
|
function m() {
|
|
8782
8776
|
a && (a.resizeObserver.disconnect(), clearTimeout(a.timeoutId), a = null);
|
|
8783
8777
|
}
|
|
8784
|
-
function p
|
|
8778
|
+
function g(p, M, y) {
|
|
8785
8779
|
m();
|
|
8786
8780
|
const A = () => {
|
|
8787
|
-
if (!a || a.el !==
|
|
8781
|
+
if (!a || a.el !== p)
|
|
8788
8782
|
return;
|
|
8789
|
-
const S =
|
|
8783
|
+
const S = p.scrollHeight, D = S - a.lastScrollHeight;
|
|
8790
8784
|
if (D !== 0) {
|
|
8791
8785
|
const I = a.expectedScrollTop + D;
|
|
8792
|
-
|
|
8786
|
+
p.scrollTop = I, a.expectedScrollTop = I, n = I;
|
|
8793
8787
|
}
|
|
8794
8788
|
a.lastScrollHeight = S;
|
|
8795
8789
|
}, C = new ResizeObserver(() => {
|
|
8796
8790
|
A();
|
|
8797
8791
|
});
|
|
8798
8792
|
a = {
|
|
8799
|
-
el:
|
|
8793
|
+
el: p,
|
|
8800
8794
|
lastScrollHeight: y,
|
|
8801
8795
|
expectedScrollTop: M,
|
|
8802
8796
|
resizeObserver: C,
|
|
8803
8797
|
timeoutId: setTimeout(() => {
|
|
8804
8798
|
m();
|
|
8805
8799
|
}, w1)
|
|
8806
|
-
}, A(), C.observe(
|
|
8800
|
+
}, A(), C.observe(p);
|
|
8807
8801
|
}
|
|
8808
8802
|
function h() {
|
|
8809
|
-
const
|
|
8810
|
-
|
|
8803
|
+
const p = t.value;
|
|
8804
|
+
p && (p.scrollTop = p.scrollHeight, n = p.scrollTop);
|
|
8811
8805
|
}
|
|
8812
8806
|
function w() {
|
|
8813
|
-
const
|
|
8814
|
-
if (!
|
|
8815
|
-
const M =
|
|
8816
|
-
(a == null ? void 0 : a.el) ===
|
|
8817
|
-
const y = M < n, A = Math.max(0,
|
|
8818
|
-
y && A > T1 ? u = !1 : A <= k1 && (u = !0), n = M,
|
|
8807
|
+
const p = t.value;
|
|
8808
|
+
if (!p) return;
|
|
8809
|
+
const M = p.scrollTop;
|
|
8810
|
+
(a == null ? void 0 : a.el) === p && Math.abs(M - a.expectedScrollTop) > A1 && m();
|
|
8811
|
+
const y = M < n, A = Math.max(0, p.scrollHeight - M - p.clientHeight);
|
|
8812
|
+
y && A > T1 ? u = !1 : A <= k1 && (u = !0), n = M, p.scrollTop <= M1 && !e.isLoading() && !e.isLoadingOlder() && e.canLoadOlder() && e.onLoadOlder();
|
|
8819
8813
|
}
|
|
8820
8814
|
return Xe(
|
|
8821
8815
|
() => {
|
|
8822
8816
|
var M, y, A, C;
|
|
8823
|
-
const
|
|
8817
|
+
const p = e.getMessages();
|
|
8824
8818
|
return {
|
|
8825
8819
|
conversationId: ((M = e.getConversation()) == null ? void 0 : M.id) ?? null,
|
|
8826
8820
|
parentMessageId: ((y = e.getParentMessage()) == null ? void 0 : y.id) ?? null,
|
|
8827
8821
|
loading: e.isLoading(),
|
|
8828
|
-
messageCount:
|
|
8829
|
-
firstMessageId: ((A =
|
|
8830
|
-
lastMessageId: ((C =
|
|
8822
|
+
messageCount: p.length,
|
|
8823
|
+
firstMessageId: ((A = p[0]) == null ? void 0 : A.id) ?? null,
|
|
8824
|
+
lastMessageId: ((C = p[p.length - 1]) == null ? void 0 : C.id) ?? null
|
|
8831
8825
|
};
|
|
8832
8826
|
},
|
|
8833
|
-
async (
|
|
8834
|
-
const y = !M ||
|
|
8835
|
-
if (y && m(), f(), !y && !!M && !u &&
|
|
8827
|
+
async (p, M) => {
|
|
8828
|
+
const y = !M || p.conversationId !== M.conversationId || p.parentMessageId !== M.parentMessageId;
|
|
8829
|
+
if (y && m(), f(), !y && !!M && !u && p.messageCount > M.messageCount && p.firstMessageId !== M.firstMessageId && p.lastMessageId === M.lastMessageId) {
|
|
8836
8830
|
const C = t.value;
|
|
8837
8831
|
if (!C)
|
|
8838
8832
|
return;
|
|
8839
8833
|
const S = C.scrollTop, D = C.scrollHeight;
|
|
8840
|
-
await Xt(),
|
|
8834
|
+
await Xt(), g(C, S, D);
|
|
8841
8835
|
return;
|
|
8842
8836
|
}
|
|
8843
|
-
y && (u = !0), !
|
|
8837
|
+
y && (u = !0), !p.loading && u && (await Xt(), h());
|
|
8844
8838
|
},
|
|
8845
8839
|
{ immediate: !0 }
|
|
8846
|
-
),
|
|
8840
|
+
), nn(() => {
|
|
8847
8841
|
m(), l();
|
|
8848
8842
|
}), {
|
|
8849
8843
|
handleThreadScroll: w
|
|
@@ -8852,27 +8846,27 @@ function E1(e) {
|
|
|
8852
8846
|
const D1 = 1, S1 = 4;
|
|
8853
8847
|
function I1(e) {
|
|
8854
8848
|
const t = z(1), u = z(0), n = z(0), a = z(!1), r = /* @__PURE__ */ new Map();
|
|
8855
|
-
let o = null, i = 0, s = 0, l = 0, d = 0, f = 0, m = 1,
|
|
8849
|
+
let o = null, i = 0, s = 0, l = 0, d = 0, f = 0, m = 1, g = 0, h = 0;
|
|
8856
8850
|
function w(N, Q, te) {
|
|
8857
8851
|
return Math.min(Math.max(N, Q), te);
|
|
8858
8852
|
}
|
|
8859
|
-
function
|
|
8853
|
+
function p(N) {
|
|
8860
8854
|
return w(N, D1, S1);
|
|
8861
8855
|
}
|
|
8862
8856
|
function M(N, Q, te = t.value) {
|
|
8863
|
-
var J, q,
|
|
8864
|
-
const se = ((J = e.viewportRef.value) == null ? void 0 : J.clientWidth) ?? 0, pe = ((q = e.viewportRef.value) == null ? void 0 : q.clientHeight) ?? 0, Me = ((
|
|
8857
|
+
var J, q, We, ve;
|
|
8858
|
+
const se = ((J = e.viewportRef.value) == null ? void 0 : J.clientWidth) ?? 0, pe = ((q = e.viewportRef.value) == null ? void 0 : q.clientHeight) ?? 0, Me = ((We = e.imageRef.value) == null ? void 0 : We.clientWidth) ?? se, De = ((ve = e.imageRef.value) == null ? void 0 : ve.clientHeight) ?? pe, de = Me * te, ot = De * te, _e = Math.max(0, (de - se) / 2), G = Math.max(0, (ot - pe) / 2);
|
|
8865
8859
|
return {
|
|
8866
8860
|
x: w(N, -_e, _e),
|
|
8867
|
-
y: w(Q, -
|
|
8861
|
+
y: w(Q, -G, G)
|
|
8868
8862
|
};
|
|
8869
8863
|
}
|
|
8870
8864
|
function y(N, Q = u.value, te = n.value) {
|
|
8871
|
-
const se =
|
|
8865
|
+
const se = p(N), pe = M(Q, te, se);
|
|
8872
8866
|
t.value = se, u.value = pe.x, n.value = pe.y, se === 1 && (u.value = 0, n.value = 0);
|
|
8873
8867
|
}
|
|
8874
8868
|
function A() {
|
|
8875
|
-
t.value = 1, u.value = 0, n.value = 0, a.value = !1, r.clear(), o = null, f = 0, m = 1,
|
|
8869
|
+
t.value = 1, u.value = 0, n.value = 0, a.value = !1, r.clear(), o = null, f = 0, m = 1, g = 0, h = 0;
|
|
8876
8870
|
}
|
|
8877
8871
|
function C(N) {
|
|
8878
8872
|
var te;
|
|
@@ -8898,7 +8892,7 @@ function I1(e) {
|
|
|
8898
8892
|
const Q = C(N);
|
|
8899
8893
|
if (r.set(N.pointerId, Q), (se = (te = N.currentTarget) == null ? void 0 : te.setPointerCapture) == null || se.call(te, N.pointerId), r.size === 1 && (o = N.pointerId, i = Q.x, s = Q.y, l = u.value, d = n.value), r.size === 2) {
|
|
8900
8894
|
const [pe, Me] = Array.from(r.values()), De = D(pe, Me);
|
|
8901
|
-
o = null, f = S(pe, Me) || 1, m = t.value,
|
|
8895
|
+
o = null, f = S(pe, Me) || 1, m = t.value, g = De.x, h = De.y, l = u.value, d = n.value;
|
|
8902
8896
|
}
|
|
8903
8897
|
}
|
|
8904
8898
|
function B(N) {
|
|
@@ -8906,7 +8900,7 @@ function I1(e) {
|
|
|
8906
8900
|
return;
|
|
8907
8901
|
const Q = C(N);
|
|
8908
8902
|
if (r.set(N.pointerId, Q), r.size === 2) {
|
|
8909
|
-
const [te, se] = Array.from(r.values()), pe = D(te, se), Me = S(te, se), De = m * (Me / (f || 1)), de = l + (pe.x -
|
|
8903
|
+
const [te, se] = Array.from(r.values()), pe = D(te, se), Me = S(te, se), De = m * (Me / (f || 1)), de = l + (pe.x - g), ot = d + (pe.y - h);
|
|
8910
8904
|
y(De, de, ot), a.value = t.value > 1, N.preventDefault();
|
|
8911
8905
|
return;
|
|
8912
8906
|
}
|
|
@@ -8921,7 +8915,7 @@ function I1(e) {
|
|
|
8921
8915
|
function Y(N) {
|
|
8922
8916
|
Z(N.pointerId);
|
|
8923
8917
|
}
|
|
8924
|
-
function
|
|
8918
|
+
function L(N) {
|
|
8925
8919
|
Z(N.pointerId);
|
|
8926
8920
|
}
|
|
8927
8921
|
function K(N) {
|
|
@@ -8943,7 +8937,7 @@ function I1(e) {
|
|
|
8943
8937
|
handlePointerDown: I,
|
|
8944
8938
|
handlePointerMove: B,
|
|
8945
8939
|
handlePointerUp: Y,
|
|
8946
|
-
handlePointerCancel:
|
|
8940
|
+
handlePointerCancel: L,
|
|
8947
8941
|
handleWheel: K,
|
|
8948
8942
|
handleDoubleClick: O
|
|
8949
8943
|
};
|
|
@@ -9006,7 +9000,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
9006
9000
|
}, z1 = ["src", "type"], H1 = {
|
|
9007
9001
|
key: 0,
|
|
9008
9002
|
class: "media-viewer-footer flex min-w-0 items-center justify-between gap-3 px-4 py-3 max-md:px-3.5 max-md:py-3"
|
|
9009
|
-
}, j1 = { class: "min-w-0 flex-1" }, Z1 = { class: "heading-sm text-default truncate" }, V1 = { class: "body-sm text-subtle" },
|
|
9003
|
+
}, j1 = { class: "min-w-0 flex-1" }, Z1 = { class: "heading-sm text-default truncate" }, V1 = { class: "body-sm text-subtle" }, W1 = /* @__PURE__ */ ye({
|
|
9010
9004
|
__name: "MediaViewerDialog",
|
|
9011
9005
|
props: {
|
|
9012
9006
|
attachment: {}
|
|
@@ -9028,10 +9022,10 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
9028
9022
|
}), { t: d } = Oe(), {
|
|
9029
9023
|
scale: f,
|
|
9030
9024
|
translateX: m,
|
|
9031
|
-
translateY:
|
|
9025
|
+
translateY: g,
|
|
9032
9026
|
isDragging: h,
|
|
9033
9027
|
resetTransform: w,
|
|
9034
|
-
handlePointerDown:
|
|
9028
|
+
handlePointerDown: p,
|
|
9035
9029
|
handlePointerMove: M,
|
|
9036
9030
|
handlePointerUp: y,
|
|
9037
9031
|
handlePointerCancel: A,
|
|
@@ -9065,9 +9059,9 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
9065
9059
|
onClose: D
|
|
9066
9060
|
}, {
|
|
9067
9061
|
actions: Ve(() => {
|
|
9068
|
-
var
|
|
9062
|
+
var L;
|
|
9069
9063
|
return [
|
|
9070
|
-
(
|
|
9064
|
+
(L = e.attachment) != null && L.url ? (k(), F("a", {
|
|
9071
9065
|
key: 0,
|
|
9072
9066
|
href: e.attachment.url,
|
|
9073
9067
|
target: "_blank",
|
|
@@ -9091,17 +9085,17 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
9091
9085
|
])) : ne("", !0)
|
|
9092
9086
|
]),
|
|
9093
9087
|
default: Ve(() => {
|
|
9094
|
-
var
|
|
9088
|
+
var L;
|
|
9095
9089
|
return [
|
|
9096
9090
|
T("div", O1, [
|
|
9097
|
-
(
|
|
9091
|
+
(L = e.attachment) != null && L.url ? (k(), F(He, { key: 0 }, [
|
|
9098
9092
|
i.value ? (k(), F("div", {
|
|
9099
9093
|
key: 0,
|
|
9100
9094
|
ref_key: "viewportRef",
|
|
9101
9095
|
ref: a,
|
|
9102
9096
|
class: "media-viewer-stage media-viewer-stage-image flex h-full w-full touch-none items-center justify-center overflow-hidden",
|
|
9103
9097
|
onPointerdown: B[0] || (B[0] = //@ts-ignore
|
|
9104
|
-
(...K) => _(
|
|
9098
|
+
(...K) => _(p) && _(p)(...K)),
|
|
9105
9099
|
onPointermove: B[1] || (B[1] = //@ts-ignore
|
|
9106
9100
|
(...K) => _(M) && _(M)(...K)),
|
|
9107
9101
|
onPointerup: B[2] || (B[2] = //@ts-ignore
|
|
@@ -9123,7 +9117,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
9123
9117
|
draggable: "false",
|
|
9124
9118
|
class: Ce(["media-viewer-image max-h-full max-w-full object-contain will-change-transform select-none", _(f) > 1 ? _(h) ? "cursor-grabbing" : "cursor-grab" : "cursor-zoom-in"]),
|
|
9125
9119
|
style: gu({
|
|
9126
|
-
transform: `translate3d(${_(m)}px, ${_(
|
|
9120
|
+
transform: `translate3d(${_(m)}px, ${_(g)}px, 0) scale(${_(f)})`,
|
|
9127
9121
|
transformOrigin: "center center"
|
|
9128
9122
|
})
|
|
9129
9123
|
}, null, 14, L1)
|
|
@@ -9150,7 +9144,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
9150
9144
|
}, 8, ["open", "title", "subtitle", "close-label", "close-aria-label"]);
|
|
9151
9145
|
};
|
|
9152
9146
|
}
|
|
9153
|
-
}),
|
|
9147
|
+
}), G1 = /* @__PURE__ */ we(W1, [["__scopeId", "data-v-0e82cfd0"]]), Y1 = { class: "date-separator" }, K1 = { class: "date-separator__label" }, Q1 = /* @__PURE__ */ ye({
|
|
9154
9148
|
__name: "MessageDateSeparator",
|
|
9155
9149
|
props: {
|
|
9156
9150
|
date: {}
|
|
@@ -9225,21 +9219,21 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
9225
9219
|
}
|
|
9226
9220
|
n.value = !0;
|
|
9227
9221
|
try {
|
|
9228
|
-
const
|
|
9222
|
+
const g = await fetch(d, {
|
|
9229
9223
|
headers: {
|
|
9230
9224
|
Accept: "text/html,application/xhtml+xml"
|
|
9231
9225
|
}
|
|
9232
|
-
}), h =
|
|
9233
|
-
if (!
|
|
9226
|
+
}), h = g.headers.get("content-type") ?? "";
|
|
9227
|
+
if (!g.ok || !h.includes("text/html"))
|
|
9234
9228
|
return;
|
|
9235
|
-
const w = await
|
|
9236
|
-
title: i(
|
|
9237
|
-
description: i(
|
|
9229
|
+
const w = await g.text(), p = new DOMParser().parseFromString(w, "text/html"), M = {
|
|
9230
|
+
title: i(p, 'meta[property="og:title"]') || i(p, 'meta[name="twitter:title"]') || ((m = (f = p.querySelector("title")) == null ? void 0 : f.textContent) == null ? void 0 : m.trim()) || r.value,
|
|
9231
|
+
description: i(p, 'meta[property="og:description"]') || i(p, 'meta[name="description"]') || i(p, 'meta[name="twitter:description"]') || o.value,
|
|
9238
9232
|
imageUrl: s(
|
|
9239
9233
|
d,
|
|
9240
|
-
i(
|
|
9234
|
+
i(p, 'meta[property="og:image"]') || i(p, 'meta[name="twitter:image"]')
|
|
9241
9235
|
),
|
|
9242
|
-
siteName: i(
|
|
9236
|
+
siteName: i(p, 'meta[property="og:site_name"]') || r.value
|
|
9243
9237
|
};
|
|
9244
9238
|
u.value = M;
|
|
9245
9239
|
} catch {
|
|
@@ -9252,8 +9246,8 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
9252
9246
|
{ immediate: !0 }
|
|
9253
9247
|
);
|
|
9254
9248
|
function i(d, f) {
|
|
9255
|
-
var m,
|
|
9256
|
-
return (
|
|
9249
|
+
var m, g;
|
|
9250
|
+
return (g = (m = d.querySelector(f)) == null ? void 0 : m.getAttribute("content")) == null ? void 0 : g.trim();
|
|
9257
9251
|
}
|
|
9258
9252
|
function s(d, f) {
|
|
9259
9253
|
if (f)
|
|
@@ -9267,7 +9261,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
9267
9261
|
return /\.(avif|gif|jpe?g|png|svg|webp)(\?.*)?$/i.test(d);
|
|
9268
9262
|
}
|
|
9269
9263
|
return (d, f) => {
|
|
9270
|
-
var m,
|
|
9264
|
+
var m, g, h, w;
|
|
9271
9265
|
return k(), F("a", {
|
|
9272
9266
|
href: e.url,
|
|
9273
9267
|
target: "_blank",
|
|
@@ -9282,7 +9276,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
9282
9276
|
}, null, 8, a2)
|
|
9283
9277
|
])) : ne("", !0),
|
|
9284
9278
|
T("div", r2, [
|
|
9285
|
-
T("p", o2, j(((
|
|
9279
|
+
T("p", o2, j(((g = u.value) == null ? void 0 : g.siteName) || r.value), 1),
|
|
9286
9280
|
T("p", i2, j(((h = u.value) == null ? void 0 : h.title) || r.value), 1),
|
|
9287
9281
|
T("p", s2, j(((w = u.value) == null ? void 0 : w.description) || o.value), 1),
|
|
9288
9282
|
n.value && !u.value ? (k(), F("p", l2, j(_(a)("loadingPreview")), 1)) : ne("", !0)
|
|
@@ -9342,18 +9336,18 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
9342
9336
|
return ((f = d.extension) == null ? void 0 : f.trim().toLowerCase()) || ((m = d.name.split(".").pop()) == null ? void 0 : m.trim().toLowerCase()) || "";
|
|
9343
9337
|
}
|
|
9344
9338
|
function o(d) {
|
|
9345
|
-
var
|
|
9346
|
-
const f = r(d), m = ((
|
|
9339
|
+
var g;
|
|
9340
|
+
const f = r(d), m = ((g = d.mimeType) == null ? void 0 : g.toLowerCase()) || "";
|
|
9347
9341
|
return m === "application/pdf" || f === "pdf" ? Tf : ["doc", "docx", "odt", "rtf"].includes(f) ? ao : ["xls", "xlsx", "csv", "ods"].includes(f) ? kf : ["ppt", "pptx", "odp"].includes(f) ? gf : ["txt", "md", "json", "xml", "yml", "yaml", "js", "ts", "html", "css"].includes(f) || m.startsWith("text/") ? m.startsWith("text/") ? Mf : rf : ["zip", "rar", "7z", "tar", "gz"].includes(f) ? mf : ao;
|
|
9348
9342
|
}
|
|
9349
9343
|
function i(d) {
|
|
9350
|
-
var
|
|
9344
|
+
var g, h;
|
|
9351
9345
|
const f = xu(d.text).trim();
|
|
9352
9346
|
if (!f)
|
|
9353
9347
|
return !1;
|
|
9354
9348
|
if (d.attachments.length !== 1)
|
|
9355
9349
|
return !0;
|
|
9356
|
-
const m = (h = (
|
|
9350
|
+
const m = (h = (g = d.attachments[0]) == null ? void 0 : g.name) == null ? void 0 : h.trim();
|
|
9357
9351
|
return m ? f.localeCompare(m, void 0, { sensitivity: "accent" }) !== 0 : !0;
|
|
9358
9352
|
}
|
|
9359
9353
|
function s(d) {
|
|
@@ -9374,7 +9368,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
9374
9368
|
type: "button",
|
|
9375
9369
|
class: "attachment-image-button attachment-media-bleed media-surface attachment-media-frame group relative block text-left",
|
|
9376
9370
|
style: gu(l(m)),
|
|
9377
|
-
onClick: (
|
|
9371
|
+
onClick: (g) => u("openMedia", m)
|
|
9378
9372
|
}, [
|
|
9379
9373
|
T("img", {
|
|
9380
9374
|
src: m.url,
|
|
@@ -9396,7 +9390,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
9396
9390
|
type: "button",
|
|
9397
9391
|
class: "border-inverse text-inverse absolute top-3 right-3 inline-flex h-9 w-9 items-center justify-center rounded-full border bg-(--color-background-inverse-subtle-default) backdrop-blur transition hover:bg-(--color-background-inverse-subtle-hovered)",
|
|
9398
9392
|
"aria-label": _(n)("openVideoViewer"),
|
|
9399
|
-
onClick: (
|
|
9393
|
+
onClick: (g) => u("openMedia", m)
|
|
9400
9394
|
}, [
|
|
9401
9395
|
(k(), ae(nt(_(_f)), {
|
|
9402
9396
|
class: "size-5",
|
|
@@ -9407,7 +9401,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
9407
9401
|
key: 2,
|
|
9408
9402
|
type: "button",
|
|
9409
9403
|
class: Ce(["flex w-full items-center justify-between gap-3 rounded-2xl px-3 py-2.5 text-left text-sm transition hover:opacity-90", e.message.isOwn ? "message-surface-own" : "message-surface-other"]),
|
|
9410
|
-
onClick: (
|
|
9404
|
+
onClick: (g) => u("openMedia", m)
|
|
9411
9405
|
}, [
|
|
9412
9406
|
T("span", _2, [
|
|
9413
9407
|
f[0] || (f[0] = T("span", { class: "bg-elevation-surface-hovered text-default inline-flex h-8 w-8 items-center justify-center rounded-full" }, " ♪ ", -1)),
|
|
@@ -9478,7 +9472,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
9478
9472
|
return {
|
|
9479
9473
|
state: "delivered",
|
|
9480
9474
|
label: n("delivered"),
|
|
9481
|
-
icon:
|
|
9475
|
+
icon: jn
|
|
9482
9476
|
};
|
|
9483
9477
|
case "queued":
|
|
9484
9478
|
return {
|
|
@@ -9502,7 +9496,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
9502
9496
|
return {
|
|
9503
9497
|
state: "sent",
|
|
9504
9498
|
label: n("sent"),
|
|
9505
|
-
icon:
|
|
9499
|
+
icon: jn
|
|
9506
9500
|
};
|
|
9507
9501
|
}
|
|
9508
9502
|
});
|
|
@@ -9583,7 +9577,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
9583
9577
|
], 2)) : ne("", !0);
|
|
9584
9578
|
};
|
|
9585
9579
|
}
|
|
9586
|
-
}), j2 = /* @__PURE__ */ we(H2, [["__scopeId", "data-v-c17c8bfd"]]), Z2 = { class: "message-reactions flex min-w-0 flex-1 flex-wrap items-center gap-1.5" }, V2 = ["aria-label", "title"],
|
|
9580
|
+
}), j2 = /* @__PURE__ */ we(H2, [["__scopeId", "data-v-c17c8bfd"]]), Z2 = { class: "message-reactions flex min-w-0 flex-1 flex-wrap items-center gap-1.5" }, V2 = ["aria-label", "title"], W2 = { class: "message-reactions__thread-count" }, G2 = /* @__PURE__ */ ye({
|
|
9587
9581
|
__name: "MessageItemReactions",
|
|
9588
9582
|
props: {
|
|
9589
9583
|
message: {},
|
|
@@ -9606,13 +9600,13 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
9606
9600
|
class: "message-reactions__thread-button text-subtle hover:text-default inline-flex items-center gap-1 rounded-full px-1 py-0 font-medium transition",
|
|
9607
9601
|
"aria-label": r.value,
|
|
9608
9602
|
title: r.value,
|
|
9609
|
-
onClick: s[1] || (s[1] =
|
|
9603
|
+
onClick: s[1] || (s[1] = Wu((l) => n("openThread"), ["stop"]))
|
|
9610
9604
|
}, [
|
|
9611
9605
|
(k(), ae(nt(_(Ei)), {
|
|
9612
9606
|
class: "size-4",
|
|
9613
9607
|
"aria-hidden": "true"
|
|
9614
9608
|
})),
|
|
9615
|
-
T("span",
|
|
9609
|
+
T("span", W2, j(e.message.replyCount), 1)
|
|
9616
9610
|
], 8, V2)) : ne("", !0)
|
|
9617
9611
|
]));
|
|
9618
9612
|
}
|
|
@@ -9742,7 +9736,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
9742
9736
|
d && n("openReferencedMessage", d);
|
|
9743
9737
|
}
|
|
9744
9738
|
return (d, f) => {
|
|
9745
|
-
var m,
|
|
9739
|
+
var m, g;
|
|
9746
9740
|
return k(), F("div", {
|
|
9747
9741
|
id: `chat-message-${e.message.id}`,
|
|
9748
9742
|
"data-message-id": e.message.id,
|
|
@@ -9782,7 +9776,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
9782
9776
|
"current-user-id": e.currentUserId,
|
|
9783
9777
|
"pending-option-key": e.pendingOptionKey,
|
|
9784
9778
|
onVote: f[0] || (f[0] = (h) => n("votePoll", h))
|
|
9785
|
-
}, null, 8, ["message", "current-user-id", "pending-option-key"])) : (
|
|
9779
|
+
}, null, 8, ["message", "current-user-id", "pending-option-key"])) : (g = e.message.attachments) != null && g.length ? (k(), ae(q2, {
|
|
9786
9780
|
key: 2,
|
|
9787
9781
|
message: e.message,
|
|
9788
9782
|
onOpenMedia: f[1] || (f[1] = (h) => n("openMedia", h))
|
|
@@ -9792,7 +9786,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
9792
9786
|
onAnchorclick: f[2] || (f[2] = (h, w) => d.$emit("anchorclick", h, w))
|
|
9793
9787
|
}, null, 8, ["message"])),
|
|
9794
9788
|
T("div", hh, [
|
|
9795
|
-
ie(
|
|
9789
|
+
ie(G2, {
|
|
9796
9790
|
message: e.message,
|
|
9797
9791
|
"can-react": e.canReact,
|
|
9798
9792
|
"can-open-thread": e.canOpenThread,
|
|
@@ -9908,49 +9902,49 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
9908
9902
|
setup(e, { expose: t, emit: u }) {
|
|
9909
9903
|
const n = u, a = z(null), r = z(!1), o = z({ left: 0, top: 0 });
|
|
9910
9904
|
let i = null, s = null;
|
|
9911
|
-
function l(
|
|
9912
|
-
const M =
|
|
9905
|
+
function l(p) {
|
|
9906
|
+
const M = p.currentTarget ?? p.target;
|
|
9913
9907
|
return M instanceof HTMLElement ? M : null;
|
|
9914
9908
|
}
|
|
9915
9909
|
async function d() {
|
|
9916
9910
|
if (typeof window > "u" || !a.value)
|
|
9917
9911
|
return;
|
|
9918
|
-
const
|
|
9912
|
+
const p = window.visualViewport, M = (p == null ? void 0 : p.offsetLeft) ?? 0, y = (p == null ? void 0 : p.offsetTop) ?? 0, A = (p == null ? void 0 : p.width) ?? window.innerWidth, C = (p == null ? void 0 : p.height) ?? window.innerHeight, S = a.value.getBoundingClientRect(), D = 12, I = 10, B = M + D, Z = M + A - S.width - D, Y = y + D, L = y + C - S.height - D, K = Math.max(B, Z);
|
|
9919
9913
|
let O = B, N = Y;
|
|
9920
9914
|
if (s) {
|
|
9921
9915
|
const Q = s.y + I + S.height <= y + C - D;
|
|
9922
|
-
O = Math.min(Math.max(s.x - S.width / 2, B), K), N = Q ? Math.min(s.y + I,
|
|
9916
|
+
O = Math.min(Math.max(s.x - S.width / 2, B), K), N = Q ? Math.min(s.y + I, L) : Math.max(s.y - S.height - I, Y);
|
|
9923
9917
|
} else if (i) {
|
|
9924
9918
|
const Q = i.getBoundingClientRect(), te = Q.left + Q.width / 2, se = Q.top + Math.min(Q.height / 2, 32), pe = se + I + S.height <= y + C - D;
|
|
9925
|
-
O = Math.min(Math.max(te - S.width / 2, B), K), N = pe ? Math.min(se + I,
|
|
9919
|
+
O = Math.min(Math.max(te - S.width / 2, B), K), N = pe ? Math.min(se + I, L) : Math.max(se - S.height - I, Y);
|
|
9926
9920
|
}
|
|
9927
9921
|
o.value = { left: O, top: N };
|
|
9928
9922
|
}
|
|
9929
|
-
async function f(
|
|
9930
|
-
i = l(
|
|
9923
|
+
async function f(p, M) {
|
|
9924
|
+
i = l(p), s = M ?? null, !(!i && !s) && (r.value = !0, await Xt(), await d());
|
|
9931
9925
|
}
|
|
9932
9926
|
function m() {
|
|
9933
9927
|
r.value && (r.value = !1, i = null, s = null, n("hide"));
|
|
9934
9928
|
}
|
|
9935
|
-
function p
|
|
9929
|
+
function g(p) {
|
|
9936
9930
|
var y;
|
|
9937
9931
|
if (!r.value)
|
|
9938
9932
|
return;
|
|
9939
|
-
const M =
|
|
9933
|
+
const M = p.target;
|
|
9940
9934
|
(y = a.value) != null && y.contains(M) || i != null && i.contains(M) || m();
|
|
9941
9935
|
}
|
|
9942
|
-
function h(
|
|
9943
|
-
|
|
9936
|
+
function h(p) {
|
|
9937
|
+
p.key === "Escape" && m();
|
|
9944
9938
|
}
|
|
9945
9939
|
function w() {
|
|
9946
9940
|
m();
|
|
9947
9941
|
}
|
|
9948
|
-
return typeof window < "u" && (document.addEventListener("pointerdown",
|
|
9949
|
-
typeof window > "u" || (document.removeEventListener("pointerdown",
|
|
9942
|
+
return typeof window < "u" && (document.addEventListener("pointerdown", g, !0), document.addEventListener("keydown", h), window.addEventListener("resize", w), window.addEventListener("scroll", w, !0)), nn(() => {
|
|
9943
|
+
typeof window > "u" || (document.removeEventListener("pointerdown", g, !0), document.removeEventListener("keydown", h), window.removeEventListener("resize", w), window.removeEventListener("scroll", w, !0));
|
|
9950
9944
|
}), t({
|
|
9951
9945
|
show: f,
|
|
9952
9946
|
hide: m
|
|
9953
|
-
}), (
|
|
9947
|
+
}), (p, M) => (k(), ae(Bi, { to: "body" }, [
|
|
9954
9948
|
r.value && e.message ? (k(), F("div", {
|
|
9955
9949
|
key: 0,
|
|
9956
9950
|
ref_key: "panelRef",
|
|
@@ -10033,7 +10027,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
10033
10027
|
}, jh = { class: "body-sm text-subtlest truncate font-semibold uppercase" }, Zh = { class: "body-md text-default mt-1 line-clamp-2" }, Vh = {
|
|
10034
10028
|
key: 1,
|
|
10035
10029
|
class: "surface-default text-subtle rounded-2xl p-5 text-center"
|
|
10036
|
-
},
|
|
10030
|
+
}, Wh = /* @__PURE__ */ ye({
|
|
10037
10031
|
__name: "MessageList",
|
|
10038
10032
|
props: {
|
|
10039
10033
|
target: {},
|
|
@@ -10047,29 +10041,29 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
10047
10041
|
() => o.value ? a.loadingThreadMessages.value : a.loadingMessages.value
|
|
10048
10042
|
), l = U(() => o.value ? a.activeThreadParentMessage.value : null), d = U(() => o.value ? !1 : n.canOpenThread.value), f = U(() => t.showHeader ?? !o.value), m = U(
|
|
10049
10043
|
() => o.value ? a.hasOlderThreadMessages.value : a.hasOlderMessages.value
|
|
10050
|
-
),
|
|
10044
|
+
), g = U(
|
|
10051
10045
|
() => o.value ? a.loadingOlderThreadMessages.value : a.loadingOlderMessages.value
|
|
10052
10046
|
), h = U(() => o.value ? !0 : a.showDefaultEmptyState.value), w = U(() => {
|
|
10053
|
-
const
|
|
10054
|
-
return
|
|
10055
|
-
}),
|
|
10056
|
-
const
|
|
10057
|
-
return
|
|
10047
|
+
const G = n.conversation.value;
|
|
10048
|
+
return G ? l.value ? u("thread") : G.title : "";
|
|
10049
|
+
}), p = U(() => {
|
|
10050
|
+
const G = n.conversation.value;
|
|
10051
|
+
return G ? l.value ? l.value.senderName : G.memberCount ? u("members", { count: G.memberCount }) : u("groupChat") : "";
|
|
10058
10052
|
}), M = U(() => {
|
|
10059
|
-
var
|
|
10060
|
-
return ((
|
|
10061
|
-
}), y = z(null), A = z(null), C = U(() => !!l.value), S = U(() => C.value && !f.value), D = U(() => Pd(n.conversation.value)), I =
|
|
10053
|
+
var G;
|
|
10054
|
+
return ((G = n.conversation.value) == null ? void 0 : G.memberCount) ?? 0;
|
|
10055
|
+
}), y = z(null), A = z(null), C = U(() => !!l.value), S = U(() => C.value && !f.value), D = U(() => Pd(n.conversation.value)), I = On("threadRef"), { handleThreadScroll: B } = E1({
|
|
10062
10056
|
getConversation: () => n.conversation.value,
|
|
10063
10057
|
getParentMessage: () => l.value,
|
|
10064
10058
|
getMessages: () => i.value,
|
|
10065
10059
|
isLoading: () => s.value,
|
|
10066
|
-
isLoadingOlder: () =>
|
|
10060
|
+
isLoadingOlder: () => g.value,
|
|
10067
10061
|
canLoadOlder: () => m.value,
|
|
10068
10062
|
onLoadOlder: () => r.emit("list:loadOlder", { target: t.target }),
|
|
10069
10063
|
threadRef: I
|
|
10070
|
-
}), Z =
|
|
10064
|
+
}), Z = On("actionMenuRef"), {
|
|
10071
10065
|
activeActionMessage: Y,
|
|
10072
|
-
handleMessageContextMenu:
|
|
10066
|
+
handleMessageContextMenu: L,
|
|
10073
10067
|
handleMessageTap: K,
|
|
10074
10068
|
resetActionMenuState: O,
|
|
10075
10069
|
reactToMessage: N,
|
|
@@ -10084,59 +10078,59 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
10084
10078
|
actionMenuRef: Z,
|
|
10085
10079
|
t: u,
|
|
10086
10080
|
emit: {
|
|
10087
|
-
reply: (
|
|
10088
|
-
edit: (
|
|
10089
|
-
info: (
|
|
10090
|
-
openThread: (
|
|
10091
|
-
delete: (
|
|
10092
|
-
translate: (
|
|
10093
|
-
toggleReaction: (
|
|
10081
|
+
reply: (G) => r.emit("message:reply", G),
|
|
10082
|
+
edit: (G) => r.emit("message:edit", G),
|
|
10083
|
+
info: (G) => r.emit("message:info", G),
|
|
10084
|
+
openThread: (G) => r.emit("message:openThread", G),
|
|
10085
|
+
delete: (G) => r.emit("message:delete", G),
|
|
10086
|
+
translate: (G) => r.emit("message:translate", G),
|
|
10087
|
+
toggleReaction: (G, J) => r.emit("message:toggleReaction", { message: G, emoji: J })
|
|
10094
10088
|
},
|
|
10095
10089
|
onMenuOpen: () => r.emit("ui:closeComposerActions")
|
|
10096
10090
|
});
|
|
10097
|
-
function se(
|
|
10098
|
-
return !!
|
|
10091
|
+
function se(G) {
|
|
10092
|
+
return !!G.url && ["image", "video", "audio"].includes(G.kind);
|
|
10099
10093
|
}
|
|
10100
|
-
function pe(
|
|
10101
|
-
se(
|
|
10094
|
+
function pe(G) {
|
|
10095
|
+
se(G) && (y.value = G);
|
|
10102
10096
|
}
|
|
10103
10097
|
function Me() {
|
|
10104
10098
|
y.value = null;
|
|
10105
10099
|
}
|
|
10106
|
-
async function De(
|
|
10107
|
-
A.value = `${
|
|
10100
|
+
async function De(G, J) {
|
|
10101
|
+
A.value = `${G.id}:${J}`;
|
|
10108
10102
|
try {
|
|
10109
|
-
r.emit("message:votePoll", { message:
|
|
10103
|
+
r.emit("message:votePoll", { message: G, optionId: J });
|
|
10110
10104
|
} finally {
|
|
10111
10105
|
window.setTimeout(() => {
|
|
10112
|
-
A.value === `${
|
|
10106
|
+
A.value === `${G.id}:${J}` && (A.value = null);
|
|
10113
10107
|
}, 300);
|
|
10114
10108
|
}
|
|
10115
10109
|
}
|
|
10116
|
-
function de(
|
|
10117
|
-
d.value && r.emit("message:openThread",
|
|
10110
|
+
function de(G) {
|
|
10111
|
+
d.value && r.emit("message:openThread", G);
|
|
10118
10112
|
}
|
|
10119
|
-
function ot(
|
|
10120
|
-
return
|
|
10113
|
+
function ot(G, J) {
|
|
10114
|
+
return G.getFullYear() !== J.getFullYear() || G.getMonth() !== J.getMonth() || G.getDate() !== J.getDate();
|
|
10121
10115
|
}
|
|
10122
|
-
function _e(
|
|
10116
|
+
function _e(G) {
|
|
10123
10117
|
const J = i.value;
|
|
10124
|
-
return
|
|
10118
|
+
return G === 0 ? !0 : ot(J[G].sentAt, J[G - 1].sentAt);
|
|
10125
10119
|
}
|
|
10126
|
-
return (
|
|
10120
|
+
return (G, J) => (k(), F(He, null, [
|
|
10127
10121
|
T("section", {
|
|
10128
10122
|
class: Ce(["message-list-root flex flex-col h-full", [
|
|
10129
|
-
|
|
10123
|
+
G.$attrs.class,
|
|
10130
10124
|
S.value ? "message-list--embedded-thread" : C.value ? "message-list--thread" : "message-list--main"
|
|
10131
10125
|
]])
|
|
10132
10126
|
}, [
|
|
10133
|
-
f.value ? Jt(
|
|
10127
|
+
f.value ? Jt(G.$slots, "header", {
|
|
10134
10128
|
key: 0,
|
|
10135
10129
|
conversation: _(n).conversation.value,
|
|
10136
10130
|
parentMessage: l.value,
|
|
10137
10131
|
target: t.target,
|
|
10138
10132
|
title: w.value,
|
|
10139
|
-
subtitle:
|
|
10133
|
+
subtitle: p.value,
|
|
10140
10134
|
memberCount: M.value
|
|
10141
10135
|
}, () => [
|
|
10142
10136
|
ie(Nh, {
|
|
@@ -10163,10 +10157,10 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
10163
10157
|
T("p", jh, j(l.value.senderName), 1),
|
|
10164
10158
|
T("p", Zh, j(_(yu)(l.value)), 1)
|
|
10165
10159
|
])) : ne("", !0),
|
|
10166
|
-
(k(!0), F(He, null, ht(i.value, (q,
|
|
10160
|
+
(k(!0), F(He, null, ht(i.value, (q, We) => (k(), F(He, {
|
|
10167
10161
|
key: q.id
|
|
10168
10162
|
}, [
|
|
10169
|
-
_e(
|
|
10163
|
+
_e(We) ? (k(), ae(X1, {
|
|
10170
10164
|
key: 0,
|
|
10171
10165
|
date: q.sentAt
|
|
10172
10166
|
}, null, 8, ["date"])) : ne("", !0),
|
|
@@ -10179,14 +10173,14 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
10179
10173
|
"pending-option-key": A.value,
|
|
10180
10174
|
"action-message-class": t.actionMessageClass,
|
|
10181
10175
|
"action-message-row-class": t.actionMessageRowClass,
|
|
10182
|
-
onContextmenu: (ve) => _(
|
|
10176
|
+
onContextmenu: (ve) => _(L)(q, ve),
|
|
10183
10177
|
onTap: (ve) => _(K)(q, ve),
|
|
10184
10178
|
onOpenMedia: pe,
|
|
10185
10179
|
onVotePoll: (ve) => De(q, ve),
|
|
10186
10180
|
onToggleReaction: (ve) => _(Q)(q, ve),
|
|
10187
10181
|
onOpenThread: (ve) => de(q),
|
|
10188
10182
|
onOpenReferencedMessage: J[0] || (J[0] = (ve) => _(r).emit("message:openReference", ve)),
|
|
10189
|
-
onAnchorclick: J[1] || (J[1] = (ve, je) =>
|
|
10183
|
+
onAnchorclick: J[1] || (J[1] = (ve, je) => G.$emit("anchorclick", ve, je))
|
|
10190
10184
|
}, null, 8, ["message", "current-user-id", "can-react", "can-open-thread", "can-show-sender-avatar", "pending-option-key", "action-message-class", "action-message-row-class", "onContextmenu", "onTap", "onVotePoll", "onToggleReaction", "onOpenThread"])
|
|
10191
10185
|
], 64))), 128)),
|
|
10192
10186
|
i.value.length === 0 && h.value && !s.value ? (k(), F("div", Vh, j(_(u)("noMessagesYetInThisGroup")), 1)) : ne("", !0)
|
|
@@ -10198,11 +10192,11 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
10198
10192
|
C.value ? S.value ? "bg-transparent p-0" : "message-list__composer--thread" : "bg-transparent p-0"
|
|
10199
10193
|
])
|
|
10200
10194
|
}, [
|
|
10201
|
-
Jt(
|
|
10195
|
+
Jt(G.$slots, "composer", {}, void 0, !0)
|
|
10202
10196
|
], 2)
|
|
10203
10197
|
], 2)) : (k(), F("div", Uh, j(_(u)("selectConversationToStart")), 1))
|
|
10204
10198
|
], 2),
|
|
10205
|
-
ie(
|
|
10199
|
+
ie(G1, {
|
|
10206
10200
|
attachment: y.value,
|
|
10207
10201
|
onClose: Me
|
|
10208
10202
|
}, null, 8, ["attachment"]),
|
|
@@ -10217,7 +10211,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
10217
10211
|
}, null, 8, ["message", "can-react", "action-items", "onHide"])
|
|
10218
10212
|
], 64));
|
|
10219
10213
|
}
|
|
10220
|
-
}), so = /* @__PURE__ */ we(
|
|
10214
|
+
}), so = /* @__PURE__ */ we(Wh, [["__scopeId", "data-v-a6ab813e"]]), Gh = { class: "receipt-section" }, Yh = { class: "receipt-section__header" }, Kh = { class: "text-heading-sm text-default" }, Qh = { class: "body-sm text-subtlest" }, Xh = {
|
|
10221
10215
|
key: 0,
|
|
10222
10216
|
class: "space-y-2"
|
|
10223
10217
|
}, Jh = { class: "flex min-w-0 items-center gap-3" }, ep = { class: "min-w-0" }, tp = { class: "heading-sm text-default truncate" }, up = { class: "body-sm text-subtle truncate" }, np = { class: "body-sm text-subtle shrink-0" }, ap = {
|
|
@@ -10232,7 +10226,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
10232
10226
|
formatDateTime: { type: Function }
|
|
10233
10227
|
},
|
|
10234
10228
|
setup(e) {
|
|
10235
|
-
return (t, u) => (k(), F("section",
|
|
10229
|
+
return (t, u) => (k(), F("section", Gh, [
|
|
10236
10230
|
T("div", Yh, [
|
|
10237
10231
|
T("p", Kh, j(e.title), 1),
|
|
10238
10232
|
T("span", Qh, j(e.receipts.length), 1)
|
|
@@ -10298,7 +10292,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
10298
10292
|
title: _(r)("messageInfo"),
|
|
10299
10293
|
subtitle: _(r)("deliveryAndReadDetails"),
|
|
10300
10294
|
"close-label": _(r)("close"),
|
|
10301
|
-
onClose: m[0] || (m[0] = (
|
|
10295
|
+
onClose: m[0] || (m[0] = (g) => n("close"))
|
|
10302
10296
|
}, {
|
|
10303
10297
|
default: Ve(() => [
|
|
10304
10298
|
e.message ? (k(), F("div", op, [
|
|
@@ -10408,7 +10402,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
10408
10402
|
const A = y ?? new Date(Date.now() + 36e5), C = A.getFullYear(), S = String(A.getMonth() + 1).padStart(2, "0"), D = String(A.getDate()).padStart(2, "0");
|
|
10409
10403
|
return `${C}-${S}-${D}`;
|
|
10410
10404
|
}
|
|
10411
|
-
function
|
|
10405
|
+
function g(y) {
|
|
10412
10406
|
const A = y ?? new Date(Date.now() + 36e5), C = String(A.getHours()).padStart(2, "0"), S = String(A.getMinutes()).padStart(2, "0");
|
|
10413
10407
|
return `${C}:${S}`;
|
|
10414
10408
|
}
|
|
@@ -10417,14 +10411,14 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
10417
10411
|
}
|
|
10418
10412
|
function w(y) {
|
|
10419
10413
|
var A, C;
|
|
10420
|
-
a.value = y.id, r.value = m((A = y.scheduled) == null ? void 0 : A.scheduleDate), o.value =
|
|
10414
|
+
a.value = y.id, r.value = m((A = y.scheduled) == null ? void 0 : A.scheduleDate), o.value = g((C = y.scheduled) == null ? void 0 : C.scheduleDate);
|
|
10421
10415
|
}
|
|
10422
|
-
function
|
|
10416
|
+
function p() {
|
|
10423
10417
|
a.value = null, r.value = "", o.value = "";
|
|
10424
10418
|
}
|
|
10425
10419
|
function M(y) {
|
|
10426
|
-
var Z, Y,
|
|
10427
|
-
if (!((Z = y.scheduled) != null && Z.messageId) || !((Y = y.scheduled) != null && Y.muid) || !((
|
|
10420
|
+
var Z, Y, L;
|
|
10421
|
+
if (!((Z = y.scheduled) != null && Z.messageId) || !((Y = y.scheduled) != null && Y.muid) || !((L = y.scheduled) != null && L.originalChatUid) || !r.value || !d.value)
|
|
10428
10422
|
return;
|
|
10429
10423
|
const [A, C, S] = r.value.split("-").map(Number), [D, I] = o.value.split(":").map(Number), B = new Date(A, C - 1, S, D, I, 0, 0);
|
|
10430
10424
|
n("reschedule", {
|
|
@@ -10432,7 +10426,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
10432
10426
|
muid: y.scheduled.muid,
|
|
10433
10427
|
originalChatUid: y.scheduled.originalChatUid,
|
|
10434
10428
|
scheduleDate: B.toISOString()
|
|
10435
|
-
}),
|
|
10429
|
+
}), p();
|
|
10436
10430
|
}
|
|
10437
10431
|
return (y, A) => (k(), ae(ua, {
|
|
10438
10432
|
open: e.open,
|
|
@@ -10497,7 +10491,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
10497
10491
|
type: "date",
|
|
10498
10492
|
class: "surface-input body-md w-full rounded-xl px-3 py-2 ring-0 outline-none"
|
|
10499
10493
|
}, null, 512), [
|
|
10500
|
-
[
|
|
10494
|
+
[qn, r.value]
|
|
10501
10495
|
]),
|
|
10502
10496
|
Yu(T("input", {
|
|
10503
10497
|
"onUpdate:modelValue": A[1] || (A[1] = (Z) => o.value = Z),
|
|
@@ -10508,7 +10502,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
10508
10502
|
"aria-label": "Time (24-hour)",
|
|
10509
10503
|
class: "surface-input body-md w-full rounded-xl px-3 py-2 ring-0 outline-none"
|
|
10510
10504
|
}, null, 512), [
|
|
10511
|
-
[
|
|
10505
|
+
[qn, o.value]
|
|
10512
10506
|
])
|
|
10513
10507
|
]),
|
|
10514
10508
|
T("div", Bp, [
|
|
@@ -10522,7 +10516,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
10522
10516
|
label: _(s)("cancel"),
|
|
10523
10517
|
size: "small",
|
|
10524
10518
|
text: "",
|
|
10525
|
-
onClick:
|
|
10519
|
+
onClick: p
|
|
10526
10520
|
}, null, 8, ["label"])
|
|
10527
10521
|
])
|
|
10528
10522
|
])) : ne("", !0)
|
|
@@ -10537,7 +10531,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
10537
10531
|
}), Up = /* @__PURE__ */ we(Np, [["__scopeId", "data-v-20875b64"]]), zp = {
|
|
10538
10532
|
key: 0,
|
|
10539
10533
|
class: "chat-status-overlay"
|
|
10540
|
-
}, Hp = { class: "chat-status-overlay__card" }, jp = { key: 0 }, Zp = { key: 1 }, Vp = { key: 2 },
|
|
10534
|
+
}, Hp = { class: "chat-status-overlay__card" }, jp = { key: 0 }, Zp = { key: 1 }, Vp = { key: 2 }, Wp = { key: 3 }, Gp = /* @__PURE__ */ ye({
|
|
10541
10535
|
__name: "ChatStatusOverlay",
|
|
10542
10536
|
props: {
|
|
10543
10537
|
visible: { type: Boolean },
|
|
@@ -10552,13 +10546,13 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
10552
10546
|
setup(e) {
|
|
10553
10547
|
return (t, u) => e.visible ? (k(), F("div", zp, [
|
|
10554
10548
|
T("div", Hp, [
|
|
10555
|
-
e.offlineMode ? (k(), F("span", jp, j(e.messages.waitingForNetwork), 1)) : e.connected ? e.loading ? (k(), F("span", Vp, j(e.messages.loading), 1)) : e.notFound ? (k(), F("span",
|
|
10549
|
+
e.offlineMode ? (k(), F("span", jp, j(e.messages.waitingForNetwork), 1)) : e.connected ? e.loading ? (k(), F("span", Vp, j(e.messages.loading), 1)) : e.notFound ? (k(), F("span", Wp, j(e.messages.notFound), 1)) : e.isEmpty && e.showEmptySlot ? Jt(t.$slots, "no-messages", { key: 4 }, () => [
|
|
10556
10550
|
T("span", null, j(e.messages.noMessages), 1)
|
|
10557
10551
|
], !0) : ne("", !0) : (k(), F("span", Zp, j(e.messages.connecting), 1))
|
|
10558
10552
|
])
|
|
10559
10553
|
])) : ne("", !0);
|
|
10560
10554
|
}
|
|
10561
|
-
}), Yp = /* @__PURE__ */ we(
|
|
10555
|
+
}), Yp = /* @__PURE__ */ we(Gp, [["__scopeId", "data-v-20316f96"]]), Kp = /* @__PURE__ */ ye({
|
|
10562
10556
|
__name: "BccChat",
|
|
10563
10557
|
props: {
|
|
10564
10558
|
client: { default: null },
|
|
@@ -10587,8 +10581,8 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
10587
10581
|
setup(e, { expose: t, emit: u }) {
|
|
10588
10582
|
const n = e, a = u, { t: r } = Oe(() => n.language), o = z(null), i = z(!1), s = z(!1), l = U(() => n.client ?? me.value ?? null), d = U(() => !!n.chatUid), f = U(() => {
|
|
10589
10583
|
if (n.conversation !== void 0) return n.conversation;
|
|
10590
|
-
const
|
|
10591
|
-
return
|
|
10584
|
+
const L = l.value;
|
|
10585
|
+
return L ? n.chatUid ? L.conversations.value.find((K) => K.targetId === n.chatUid || K.id === n.chatUid) ?? null : L.activeConversation.value : null;
|
|
10592
10586
|
}), m = Bd({
|
|
10593
10587
|
chatClient: l,
|
|
10594
10588
|
selectedConversation: f,
|
|
@@ -10597,7 +10591,7 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
10597
10591
|
getSenderDisplayName: () => n.senderDisplayName
|
|
10598
10592
|
});
|
|
10599
10593
|
Nd(m);
|
|
10600
|
-
const
|
|
10594
|
+
const g = Ud({
|
|
10601
10595
|
chatClient: l,
|
|
10602
10596
|
selectedConversation: f,
|
|
10603
10597
|
usesPublicContract: d,
|
|
@@ -10609,18 +10603,18 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
10609
10603
|
getPropShowDefaultEmptyState: () => n.showDefaultEmptyState,
|
|
10610
10604
|
getHideDeletedMessages: () => n.hideDeletedMessages
|
|
10611
10605
|
});
|
|
10612
|
-
zd(
|
|
10613
|
-
const h = U(() =>
|
|
10606
|
+
zd(g);
|
|
10607
|
+
const h = U(() => g.messages.value.length > 0), w = U(() => n.showHeader ?? n.showMessageHeader), p = Gd({
|
|
10614
10608
|
chatClient: l,
|
|
10615
10609
|
selectedConversation: f,
|
|
10616
10610
|
getInitialScheduledMessagesOpen: () => !!n.initialScheduledMessagesOpen,
|
|
10617
10611
|
fetchErrorFallback: r("loadMessageReceiptsError")
|
|
10618
10612
|
});
|
|
10619
|
-
Yd(
|
|
10620
|
-
const M =
|
|
10613
|
+
Yd(p);
|
|
10614
|
+
const M = On("mainComposerRef"), y = On("threadComposerRef"), A = jd({
|
|
10621
10615
|
chatClient: l,
|
|
10622
10616
|
sendOptions: m.sendOptions,
|
|
10623
|
-
afterSchedule: () =>
|
|
10617
|
+
afterSchedule: () => p.openScheduledMessages(),
|
|
10624
10618
|
mainComposerRef: M,
|
|
10625
10619
|
threadComposerRef: y
|
|
10626
10620
|
});
|
|
@@ -10629,69 +10623,69 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
10629
10623
|
Jd(C), Qd({
|
|
10630
10624
|
conversation: m,
|
|
10631
10625
|
composer: A,
|
|
10632
|
-
dialogs:
|
|
10626
|
+
dialogs: p,
|
|
10633
10627
|
bus: C
|
|
10634
10628
|
});
|
|
10635
10629
|
const { fetchGroupMembers: S } = tf({
|
|
10636
10630
|
getConversationTargetId: () => {
|
|
10637
|
-
var
|
|
10638
|
-
return (
|
|
10631
|
+
var L;
|
|
10632
|
+
return (L = f.value) == null ? void 0 : L.targetId;
|
|
10639
10633
|
},
|
|
10640
10634
|
isChannel: () => m.isChannel.value,
|
|
10641
|
-
onMembersChanged: (
|
|
10635
|
+
onMembersChanged: (L) => a("chatMembersFetched", L)
|
|
10642
10636
|
}), { scrollToRequestedMessage: D } = uf({
|
|
10643
10637
|
chatRootRef: o,
|
|
10644
10638
|
getClient: () => l.value
|
|
10645
10639
|
});
|
|
10646
10640
|
Xe(
|
|
10647
10641
|
() => {
|
|
10648
|
-
var
|
|
10649
|
-
return ((
|
|
10642
|
+
var L;
|
|
10643
|
+
return ((L = f.value) == null ? void 0 : L.targetId) ?? null;
|
|
10650
10644
|
},
|
|
10651
10645
|
() => {
|
|
10652
|
-
|
|
10646
|
+
p.refreshScheduledMessages();
|
|
10653
10647
|
},
|
|
10654
10648
|
{ immediate: !0 }
|
|
10655
10649
|
), Xe(
|
|
10656
10650
|
() => {
|
|
10657
|
-
var
|
|
10658
|
-
return (
|
|
10651
|
+
var L;
|
|
10652
|
+
return (L = f.value) == null ? void 0 : L.id;
|
|
10659
10653
|
},
|
|
10660
10654
|
() => {
|
|
10661
|
-
A.resetMainComposer(), A.resetThreadComposer(),
|
|
10655
|
+
A.resetMainComposer(), A.resetThreadComposer(), p.showScheduledMessages.value = !1, p.closeMessageInfo();
|
|
10662
10656
|
}
|
|
10663
10657
|
), Xe(
|
|
10664
10658
|
() => n.chatMessageGetter,
|
|
10665
|
-
(
|
|
10666
|
-
xt.setGetChatMessagesCallback(
|
|
10659
|
+
(L) => {
|
|
10660
|
+
xt.setGetChatMessagesCallback(L);
|
|
10667
10661
|
},
|
|
10668
10662
|
{ immediate: !0 }
|
|
10669
10663
|
), Xe(
|
|
10670
10664
|
() => n.language,
|
|
10671
|
-
(
|
|
10672
|
-
|
|
10665
|
+
(L) => {
|
|
10666
|
+
L && Wa(L);
|
|
10673
10667
|
},
|
|
10674
10668
|
{ immediate: !0 }
|
|
10675
|
-
), Xe(
|
|
10676
|
-
|
|
10669
|
+
), Xe(g.isChatEmpty, (L) => {
|
|
10670
|
+
L && a("chatEmpty");
|
|
10677
10671
|
}), Xe(
|
|
10678
10672
|
[
|
|
10679
10673
|
() => n.chatUid,
|
|
10680
10674
|
() => n.client ? n.client.initialized.value : xt.initialized.value,
|
|
10681
10675
|
() => n.client ? n.client.loggedIn.value : xt.loggedIn.value,
|
|
10682
10676
|
() => {
|
|
10683
|
-
var
|
|
10684
|
-
return ((
|
|
10677
|
+
var L;
|
|
10678
|
+
return ((L = l.value) == null ? void 0 : L.conversations.value.length) ?? 0;
|
|
10685
10679
|
}
|
|
10686
10680
|
],
|
|
10687
|
-
async ([
|
|
10688
|
-
!d.value || !
|
|
10681
|
+
async ([L, K, O]) => {
|
|
10682
|
+
!d.value || !L || !K || !O || !l.value || await I();
|
|
10689
10683
|
},
|
|
10690
10684
|
{ immediate: !0 }
|
|
10691
10685
|
), Xe(
|
|
10692
10686
|
[
|
|
10693
|
-
() =>
|
|
10694
|
-
() =>
|
|
10687
|
+
() => g.messages.value.length,
|
|
10688
|
+
() => g.threadMessages.value.length,
|
|
10695
10689
|
() => xt.scrollToMessageId.value
|
|
10696
10690
|
],
|
|
10697
10691
|
async () => {
|
|
@@ -10699,37 +10693,40 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
10699
10693
|
}
|
|
10700
10694
|
);
|
|
10701
10695
|
async function I() {
|
|
10702
|
-
const
|
|
10703
|
-
if (
|
|
10696
|
+
const L = l.value;
|
|
10697
|
+
if (L) {
|
|
10704
10698
|
s.value = !0, i.value = !1;
|
|
10705
10699
|
try {
|
|
10706
|
-
|
|
10707
|
-
const K =
|
|
10700
|
+
L.conversations.value.length === 0 && await L.fetchConversations();
|
|
10701
|
+
const K = L.conversations.value.find((O) => O.targetId === n.chatUid || O.id === n.chatUid) ?? null;
|
|
10708
10702
|
if (!K) {
|
|
10709
10703
|
i.value = !0, a("chatMembersFetched", []);
|
|
10710
10704
|
return;
|
|
10711
10705
|
}
|
|
10712
|
-
|
|
10706
|
+
L.activeConversationId.value !== K.id && await L.selectConversation(K.id), await S(K.targetId);
|
|
10713
10707
|
} finally {
|
|
10714
10708
|
s.value = !1;
|
|
10715
10709
|
}
|
|
10716
10710
|
}
|
|
10717
10711
|
}
|
|
10718
|
-
function B(
|
|
10719
|
-
a("linkClicked",
|
|
10712
|
+
function B(L, K) {
|
|
10713
|
+
a("linkClicked", L, K);
|
|
10720
10714
|
}
|
|
10721
10715
|
const Z = z(!1);
|
|
10722
|
-
|
|
10716
|
+
Zn(() => {
|
|
10723
10717
|
setTimeout(() => {
|
|
10724
10718
|
Z.value = !0;
|
|
10725
10719
|
}, 200);
|
|
10720
|
+
}), nn(() => {
|
|
10721
|
+
const L = l.value;
|
|
10722
|
+
L && L.activeConversation.value === f.value && L.selectConversation(null);
|
|
10726
10723
|
});
|
|
10727
|
-
async function Y(
|
|
10728
|
-
return await new Promise((K) => setTimeout(K, 100)), Z.value ? D(
|
|
10724
|
+
async function Y(L) {
|
|
10725
|
+
return await new Promise((K) => setTimeout(K, 100)), Z.value ? D(L) : (await new Promise((K) => setTimeout(K, 110)), Y(L));
|
|
10729
10726
|
}
|
|
10730
10727
|
return t({
|
|
10731
10728
|
scrollToMessage: Y
|
|
10732
|
-
}), (
|
|
10729
|
+
}), (L, K) => {
|
|
10733
10730
|
var O, N, Q, te, se, pe, Me, De;
|
|
10734
10731
|
return k(), F("div", {
|
|
10735
10732
|
ref_key: "chatRootRef",
|
|
@@ -10765,17 +10762,17 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
10765
10762
|
]),
|
|
10766
10763
|
_: 2
|
|
10767
10764
|
}, [
|
|
10768
|
-
|
|
10765
|
+
L.$slots["message-header"] ? {
|
|
10769
10766
|
name: "header",
|
|
10770
10767
|
fn: Ve((de) => [
|
|
10771
|
-
Jt(
|
|
10768
|
+
Jt(L.$slots, "message-header", Ui(zi(de)), void 0, !0)
|
|
10772
10769
|
]),
|
|
10773
10770
|
key: "0"
|
|
10774
10771
|
} : void 0
|
|
10775
10772
|
]), 1032, ["show-header", "class", "action-message-class", "action-message-row-class"]),
|
|
10776
10773
|
ie(ua, {
|
|
10777
|
-
open: !!_(
|
|
10778
|
-
title: _(r)("threadWithCount", { count: ((N = _(
|
|
10774
|
+
open: !!_(g).activeThreadParentMessage.value,
|
|
10775
|
+
title: _(r)("threadWithCount", { count: ((N = _(g).activeThreadParentMessage.value) == null ? void 0 : N.replyCount) ?? 0 }),
|
|
10779
10776
|
subtitle: ((Q = f.value) == null ? void 0 : Q.title) ?? "",
|
|
10780
10777
|
"close-label": _(r)("close"),
|
|
10781
10778
|
"close-aria-label": _(r)("closeThread"),
|
|
@@ -10801,29 +10798,29 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
10801
10798
|
_: 1
|
|
10802
10799
|
}, 8, ["open", "title", "subtitle", "close-label", "close-aria-label"]),
|
|
10803
10800
|
ie(Up, {
|
|
10804
|
-
open: _(
|
|
10805
|
-
loading: _(
|
|
10806
|
-
messages: _(
|
|
10801
|
+
open: _(p).showScheduledMessages.value,
|
|
10802
|
+
loading: _(p).loadingScheduledMessages.value,
|
|
10803
|
+
messages: _(p).scheduledMessages.value,
|
|
10807
10804
|
"conversation-title": (te = f.value) == null ? void 0 : te.title,
|
|
10808
|
-
onClose: K[1] || (K[1] = (de) => _(
|
|
10805
|
+
onClose: K[1] || (K[1] = (de) => _(p).showScheduledMessages.value = !1),
|
|
10809
10806
|
onReschedule: K[2] || (K[2] = (de) => _(C).emit("ui:reschedule", de))
|
|
10810
10807
|
}, null, 8, ["open", "loading", "messages", "conversation-title"]),
|
|
10811
10808
|
ie(Mp, {
|
|
10812
|
-
open: !!_(
|
|
10813
|
-
message: _(
|
|
10814
|
-
receipts: _(
|
|
10815
|
-
loading: _(
|
|
10816
|
-
error: _(
|
|
10817
|
-
onClose: K[3] || (K[3] = (de) => _(
|
|
10809
|
+
open: !!_(p).infoMessage.value,
|
|
10810
|
+
message: _(p).infoMessage.value,
|
|
10811
|
+
receipts: _(p).infoMessageReceipts.value,
|
|
10812
|
+
loading: _(p).loadingMessageReceipts.value,
|
|
10813
|
+
error: _(p).messageReceiptsError.value,
|
|
10814
|
+
onClose: K[3] || (K[3] = (de) => _(p).closeMessageInfo())
|
|
10818
10815
|
}, null, 8, ["open", "message", "receipts", "loading", "error"])
|
|
10819
10816
|
], 64)) : ne("", !0),
|
|
10820
10817
|
ie(Yp, {
|
|
10821
|
-
visible: d.value && (((se = l.value) == null ? void 0 : se.offlineMode.value) || !((pe = l.value) != null && pe.connected.value) || s.value && !h.value || i.value || e.displayNoMessagesText && _(
|
|
10818
|
+
visible: d.value && (((se = l.value) == null ? void 0 : se.offlineMode.value) || !((pe = l.value) != null && pe.connected.value) || s.value && !h.value || i.value || e.displayNoMessagesText && _(g).isChatEmpty.value),
|
|
10822
10819
|
"offline-mode": !!((Me = l.value) != null && Me.offlineMode.value && !f.value),
|
|
10823
10820
|
connected: !!((De = l.value) != null && De.connected.value || f.value),
|
|
10824
10821
|
loading: s.value,
|
|
10825
10822
|
"not-found": i.value,
|
|
10826
|
-
"is-empty": _(
|
|
10823
|
+
"is-empty": _(g).isChatEmpty.value,
|
|
10827
10824
|
"show-empty-slot": e.displayNoMessagesText,
|
|
10828
10825
|
messages: {
|
|
10829
10826
|
waitingForNetwork: _(r)("waitingForNetwork"),
|
|
@@ -10834,14 +10831,14 @@ const F1 = { class: "fullscreen-dialog__content" }, R1 = {
|
|
|
10834
10831
|
}
|
|
10835
10832
|
}, {
|
|
10836
10833
|
"no-messages": Ve(() => [
|
|
10837
|
-
Jt(
|
|
10834
|
+
Jt(L.$slots, "no-messages", {}, void 0, !0)
|
|
10838
10835
|
]),
|
|
10839
10836
|
_: 3
|
|
10840
10837
|
}, 8, ["visible", "offline-mode", "connected", "loading", "not-found", "is-empty", "show-empty-slot", "messages"])
|
|
10841
10838
|
], 512);
|
|
10842
10839
|
};
|
|
10843
10840
|
}
|
|
10844
|
-
}), co = /* @__PURE__ */ we(Kp, [["__scopeId", "data-v-
|
|
10841
|
+
}), co = /* @__PURE__ */ we(Kp, [["__scopeId", "data-v-1f1a9b2b"]]);
|
|
10845
10842
|
export {
|
|
10846
10843
|
co as BccChat,
|
|
10847
10844
|
co as BccChatMessageList,
|