@mobilon-dev/chotto 0.2.23 → 0.2.24
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/{CreateDialog-Cl0348F8.js → CreateDialog-CXsadW0M.js} +1 -1
- package/dist/{ModalVideoRecorder-B0qefxSv.js → ModalVideoRecorder-DqBxjq4l.js} +1 -1
- package/dist/{SelectUser2-Oi3ChxkJ.js → SelectUser2-BKuXUkNl.js} +1 -1
- package/dist/chotto.css +1 -1
- package/dist/{index-Bxu9lQys.js → index-hZgIJdY-.js} +240 -233
- package/dist/vuessages.es.js +1 -1
- package/dist/vuessages.umd.js +3 -3
- package/package.json +1 -1
@@ -1,4 +1,4 @@
|
|
1
|
-
import { createElementBlock as u, openBlock as l, createStaticVNode as df, inject as se, computed as
|
1
|
+
import { createElementBlock as u, openBlock as l, createStaticVNode as df, inject as se, computed as P, createCommentVNode as h, createElementVNode as o, createVNode as W, createTextVNode as Ff, toDisplayString as x, renderSlot as ie, unref as N, ref as y, customRef as mn, defineComponent as K, watch as ae, nextTick as he, onMounted as pe, withDirectives as ge, withKeys as yt, vModelText as Mf, normalizeClass as S, createBlock as B, resolveDynamicComponent as Le, Fragment as Z, renderList as oe, Transition as ue, withCtx as J, useTemplateRef as pn, normalizeStyle as ce, Teleport as Ce, onUnmounted as wf, vShow as Oe, useId as Mt, toRef as Pt, vModelRadio as wt, reactive as _n, provide as mf, getCurrentInstance as Jn, toRaw as hn, onBeforeUnmount as Gn, readonly as Xn, resolveComponent as d1, h as Ht, defineAsyncComponent as ea, createApp as fa, withModifiers as Yf } from "vue";
|
2
2
|
const ta = "aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2", na = "ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2", ct = "numeric", rt = "ascii", dt = "alpha", Lf = "asciinumeric", Vf = "alphanumeric", At = "domain", vn = "emoji", aa = "scheme", sa = "slashscheme", et = "whitespace";
|
3
3
|
function ia(e, f) {
|
4
4
|
return e in f || (f[e] = []), f[e];
|
@@ -588,8 +588,8 @@ function Aa({
|
|
588
588
|
X(_, e.numeric, k);
|
589
589
|
const C = Ne(u1), m = Ne();
|
590
590
|
X(C, f, C), X(C, t, m), X(m, f, C), X(m, t, m), V(E, He, C), V(k, He, C);
|
591
|
-
const I = V(r, ff), D = V(c, ff), O = V(D, He),
|
592
|
-
X(r, e.domain, i), V(r, Pe, T), V(r, xe, M), X(c, e.domain, i), V(c, Pe, T), V(c, xe, M), X(I, e.domain, C), V(I, He, C), V(I, Bf, C), X(
|
591
|
+
const I = V(r, ff), D = V(c, ff), O = V(D, He), F = V(O, He);
|
592
|
+
X(r, e.domain, i), V(r, Pe, T), V(r, xe, M), X(c, e.domain, i), V(c, Pe, T), V(c, xe, M), X(I, e.domain, C), V(I, He, C), V(I, Bf, C), X(F, e.domain, C), X(F, f, C), V(F, He, C);
|
593
593
|
const ee = [
|
594
594
|
[Of, zf],
|
595
595
|
// {}
|
@@ -789,7 +789,7 @@ const xn = /* @__PURE__ */ L(va, [["render", ya]]), Ma = {
|
|
789
789
|
},
|
790
790
|
emits: ["returnToChats"],
|
791
791
|
setup(e, { emit: f }) {
|
792
|
-
const t = e, n = f, a = se("chatAppId"), s =
|
792
|
+
const t = e, n = f, a = se("chatAppId"), s = P(() => {
|
793
793
|
if (t.description) return t.description;
|
794
794
|
if (!t.description && t.defaultLastActivityTime) return t.chat["lastActivity.time"];
|
795
795
|
});
|
@@ -1336,7 +1336,7 @@ const u6 = /* @__PURE__ */ L(zs, [["render", Bs]]), $s = {
|
|
1336
1336
|
},
|
1337
1337
|
emits: ["send", "typing"],
|
1338
1338
|
setup(e, { emit: f }) {
|
1339
|
-
const t = f, n = se("chatAppId"), { resetMessage: a, getMessage: s, setMessageText: i, setForceSendMessage: r } = Ve(n), c = y(), d = Ua("", 2e3), A = y(), g = e, p =
|
1339
|
+
const t = f, n = se("chatAppId"), { resetMessage: a, getMessage: s, setMessageText: i, setForceSendMessage: r } = Ve(n), c = y(), d = Ua("", 2e3), A = y(), g = e, p = P(() => !!(g.state == "disabled" || s().text == "" && !s().file || s().isRecording)), w = P(() => Fs), v = P(() => {
|
1340
1340
|
var k;
|
1341
1341
|
if (g.inputButtonColor)
|
1342
1342
|
return g.inputButtonColor;
|
@@ -1367,13 +1367,13 @@ const u6 = /* @__PURE__ */ L(zs, [["render", Bs]]), $s = {
|
|
1367
1367
|
if (!_) return;
|
1368
1368
|
const k = _.scrollTop;
|
1369
1369
|
_.style.height = "auto";
|
1370
|
-
const C = getComputedStyle(_), m = parseFloat(C.fontSize) || 16, I = parseFloat(C.lineHeight) || m * 1.4, D = 40, O = I * 11,
|
1370
|
+
const C = getComputedStyle(_), m = parseFloat(C.fontSize) || 16, I = parseFloat(C.lineHeight) || m * 1.4, D = 40, O = I * 11, F = _.scrollHeight, $ = s().text.split(`
|
1371
1371
|
`).length > 1, z = document.createElement("div");
|
1372
1372
|
z.style.position = "absolute", z.style.visibility = "hidden", z.style.whiteSpace = "nowrap", z.style.font = C.font, z.style.fontSize = C.fontSize, z.style.fontFamily = C.fontFamily, z.style.fontWeight = C.fontWeight, z.style.letterSpacing = C.letterSpacing, z.textContent = s().text, document.body.appendChild(z);
|
1373
1373
|
const G = z.offsetWidth;
|
1374
1374
|
document.body.removeChild(z);
|
1375
1375
|
const te = parseFloat(C.paddingLeft) || 0, fe = parseFloat(C.paddingRight) || 0, le = _.clientWidth - te - fe, Ie = G > le, me = $ || Ie;
|
1376
|
-
s().text.trim() && me ?
|
1376
|
+
s().text.trim() && me ? F <= O ? (_.style.height = F + "px", _.style.overflowY = "hidden") : (_.style.height = O + "px", _.style.overflowY = "auto", _.scrollTop = k) : (_.style.height = D + "px", _.style.overflowY = "hidden");
|
1377
1377
|
});
|
1378
1378
|
},
|
1379
1379
|
{ immediate: !0 }
|
@@ -1735,7 +1735,7 @@ const Ai = ["onClick"], gi = /* @__PURE__ */ K({
|
|
1735
1735
|
},
|
1736
1736
|
emits: ["action"],
|
1737
1737
|
setup(e, { emit: f }) {
|
1738
|
-
const t = e, n = f, a =
|
1738
|
+
const t = e, n = f, a = P(() => [...t.buttons].sort((i, r) => i.order - r.order)), s = (i) => {
|
1739
1739
|
typeof i.action == "function" ? i.action() : i.action != null && n("action", i.action);
|
1740
1740
|
};
|
1741
1741
|
return (i, r) => (l(), u("div", {
|
@@ -1820,17 +1820,17 @@ const Ai = ["onClick"], gi = /* @__PURE__ */ K({
|
|
1820
1820
|
setup(e, { emit: f }) {
|
1821
1821
|
const t = y(), n = y(), a = y(), s = y(!1), i = y(!1), r = y(!1), c = y(!1), d = y(!1), A = y(!1), g = y(!1), p = y("");
|
1822
1822
|
let w = null;
|
1823
|
-
const v = e, b = se("chatAppId"), { setReply: M, getMessage: T, resetReply: E } = Ve(b), _ = f, k =
|
1824
|
-
_("keyboardAction",
|
1825
|
-
}, m = (
|
1826
|
-
_("feedAction",
|
1823
|
+
const v = e, b = se("chatAppId"), { setReply: M, getMessage: T, resetReply: E } = Ve(b), _ = f, k = P(() => !!(i.value && v.objects.length > 0 && v.objects[v.objects.length - 1].keyboard)), C = (Q) => {
|
1824
|
+
_("keyboardAction", Q);
|
1825
|
+
}, m = (Q) => {
|
1826
|
+
_("feedAction", Q);
|
1827
1827
|
};
|
1828
|
-
function I(
|
1829
|
-
const
|
1828
|
+
function I(Q = !0) {
|
1829
|
+
const q = N(n);
|
1830
1830
|
let j = 0;
|
1831
1831
|
a.value && (j = a.value.refKeyboard.clientHeight);
|
1832
|
-
const
|
1833
|
-
|
1832
|
+
const Y = 100, H = q.scrollHeight - q.scrollTop - q.clientHeight;
|
1833
|
+
H < Y + j ? (s.value = !1, i.value = !0) : (s.value = !0, i.value = !1), A.value ? (q.scrollTop < 300 && (d.value = !1, r.value = !1), H < 300 && (c.value = !1, d.value = !0)) : Q && (q.scrollTop < 300 && (r.value = !1), H < 300 && (c.value = !1)), ke(), g.value = !0, w && window.clearTimeout(w), w = window.setTimeout(() => {
|
1834
1834
|
g.value = !1;
|
1835
1835
|
}, 500);
|
1836
1836
|
}
|
@@ -1840,12 +1840,12 @@ const Ai = ["onClick"], gi = /* @__PURE__ */ K({
|
|
1840
1840
|
c.value || _("loadMoreDown"), r.value || _("loadMore");
|
1841
1841
|
}
|
1842
1842
|
);
|
1843
|
-
const D = (
|
1844
|
-
const
|
1845
|
-
(
|
1843
|
+
const D = (Q) => {
|
1844
|
+
const q = N(n);
|
1845
|
+
(Q.offsetX > q.clientWidth || Q.offsetY > q.clientHeight) && (A.value = !0);
|
1846
1846
|
}, O = () => {
|
1847
1847
|
A.value = !1;
|
1848
|
-
},
|
1848
|
+
}, F = di(() => I(), 250), ee = (Q) => ({
|
1849
1849
|
"message.text": T3,
|
1850
1850
|
"message.image": y3,
|
1851
1851
|
"message.file": l3,
|
@@ -1856,11 +1856,13 @@ const Ai = ["onClick"], gi = /* @__PURE__ */ K({
|
|
1856
1856
|
"message.delimiter": CA,
|
1857
1857
|
"system.date": t4,
|
1858
1858
|
"message.typing": gn
|
1859
|
-
})[
|
1859
|
+
})[Q];
|
1860
1860
|
function $() {
|
1861
1861
|
he(function() {
|
1862
|
-
const
|
1863
|
-
|
1862
|
+
const Q = N(n);
|
1863
|
+
Q && (Q.scrollTop = Q.scrollHeight, setTimeout(() => {
|
1864
|
+
Q.scrollTop = Q.scrollHeight;
|
1865
|
+
}, 300));
|
1864
1866
|
});
|
1865
1867
|
}
|
1866
1868
|
function z() {
|
@@ -1873,30 +1875,30 @@ const Ai = ["onClick"], gi = /* @__PURE__ */ K({
|
|
1873
1875
|
},
|
1874
1876
|
{ immediate: !0 }
|
1875
1877
|
);
|
1876
|
-
const G = (
|
1877
|
-
_("messageAction",
|
1878
|
-
}, te = (
|
1879
|
-
_("clickRepliedMessage",
|
1880
|
-
}, fe = (
|
1881
|
-
if (v.enableDoubleClickReply && (
|
1878
|
+
const G = (Q) => {
|
1879
|
+
_("messageAction", Q);
|
1880
|
+
}, te = (Q) => {
|
1881
|
+
_("clickRepliedMessage", Q);
|
1882
|
+
}, fe = (Q, q) => {
|
1883
|
+
if (v.enableDoubleClickReply && (Q == null || Q.preventDefault(), q.type.indexOf("system") == -1 && q.type.indexOf("typing") == -1)) {
|
1882
1884
|
const j = document.getElementById("chat-input-reply-line-" + b);
|
1883
1885
|
j && (j.style.display = "inherit"), M({
|
1884
|
-
messageId:
|
1885
|
-
type:
|
1886
|
-
text:
|
1887
|
-
filename:
|
1888
|
-
url:
|
1889
|
-
header:
|
1890
|
-
callDuration:
|
1886
|
+
messageId: q.messageId,
|
1887
|
+
type: q.type,
|
1888
|
+
text: q.text,
|
1889
|
+
filename: q.filename,
|
1890
|
+
url: q.url,
|
1891
|
+
header: q.header,
|
1892
|
+
callDuration: q.callDuration
|
1891
1893
|
});
|
1892
1894
|
}
|
1893
1895
|
}, le = () => {
|
1894
1896
|
E();
|
1895
|
-
const
|
1896
|
-
|
1897
|
-
}, Ie = (
|
1898
|
-
|
1899
|
-
|
1897
|
+
const Q = document.getElementById("chat-input-reply-line-" + b);
|
1898
|
+
Q && (Q.style.display = "none");
|
1899
|
+
}, Ie = (Q) => {
|
1900
|
+
Q.forEach((q) => {
|
1901
|
+
q.isIntersecting && _("messageVisible", JSON.parse(q.target.id));
|
1900
1902
|
});
|
1901
1903
|
}, me = {
|
1902
1904
|
root: document.getElementById("feed-container-" + b),
|
@@ -1908,70 +1910,75 @@ const Ai = ["onClick"], gi = /* @__PURE__ */ K({
|
|
1908
1910
|
() => {
|
1909
1911
|
he(() => {
|
1910
1912
|
if (r.value = !0, c.value = !0, I(!1), A.value) {
|
1911
|
-
const
|
1912
|
-
d.value && (
|
1913
|
+
const Q = N(n);
|
1914
|
+
d.value && (Q.scrollTop = Q.scrollHeight - 400), d.value || (Q.scrollTop = 400);
|
1915
|
+
}
|
1916
|
+
if (t.value = document.querySelectorAll(".tracking-message"), t.value.forEach((Q) => $e.observe(Q)), v.scrollToBottom) {
|
1917
|
+
const Q = N(n);
|
1918
|
+
Q && (Q.scrollTop = Q.scrollHeight, setTimeout(() => {
|
1919
|
+
Q.scrollTop = Q.scrollHeight;
|
1920
|
+
}, 100));
|
1913
1921
|
}
|
1914
|
-
t.value = document.querySelectorAll(".tracking-message"), t.value.forEach((q) => $e.observe(q));
|
1915
1922
|
});
|
1916
1923
|
},
|
1917
1924
|
{ immediate: !0 }
|
1918
1925
|
), ae(
|
1919
1926
|
() => v.scrollTo,
|
1920
1927
|
() => {
|
1921
|
-
var
|
1928
|
+
var Q;
|
1922
1929
|
if (v.scrollTo) {
|
1923
|
-
const
|
1924
|
-
let j = document.getElementById(
|
1925
|
-
j instanceof HTMLElement &&
|
1926
|
-
var
|
1927
|
-
(
|
1930
|
+
const q = v.scrollTo;
|
1931
|
+
let j = document.getElementById(q), Y = document.getElementById("feed-container-" + b);
|
1932
|
+
j instanceof HTMLElement && Y instanceof HTMLElement && (Y.scrollTop = j.offsetTop + j.clientHeight / 2 - Y.clientHeight / 2), (Q = document.getElementById(q)) == null || Q.children[0].classList.add("focused-message"), setTimeout(() => {
|
1933
|
+
var H;
|
1934
|
+
(H = document.getElementById(q)) == null || H.children[0].classList.remove("focused-message");
|
1928
1935
|
}, 2e3);
|
1929
1936
|
}
|
1930
1937
|
}
|
1931
1938
|
);
|
1932
|
-
const Re =
|
1933
|
-
const
|
1939
|
+
const Re = P(() => !v.objects || v.objects.length === 0 ? [] : v.objects.map((Q, q, j) => {
|
1940
|
+
const Y = q > 0 && j[q - 1].position === Q.position && j[q - 1].header === Q.header, H = q > 0 && !["message.system", "message.typing"].includes(j[q - 1].type);
|
1934
1941
|
return {
|
1935
|
-
...
|
1936
|
-
isFirstInSeries: !
|
1942
|
+
...Q,
|
1943
|
+
isFirstInSeries: !Y || !H
|
1937
1944
|
};
|
1938
1945
|
}));
|
1939
1946
|
function ke() {
|
1940
|
-
const
|
1941
|
-
if (!
|
1942
|
-
const
|
1947
|
+
const Q = N(n);
|
1948
|
+
if (!Q || !t.value) return;
|
1949
|
+
const q = Q.getBoundingClientRect().top;
|
1943
1950
|
let j = null;
|
1944
|
-
for (const
|
1945
|
-
const
|
1946
|
-
if (
|
1947
|
-
j =
|
1951
|
+
for (const Y of t.value) {
|
1952
|
+
const H = Y.getBoundingClientRect();
|
1953
|
+
if (H.top <= q + 1 && H.bottom > q) {
|
1954
|
+
j = Y;
|
1948
1955
|
break;
|
1949
1956
|
}
|
1950
1957
|
}
|
1951
1958
|
if (!j) {
|
1952
|
-
for (const
|
1953
|
-
if (
|
1954
|
-
j =
|
1959
|
+
for (const Y of t.value)
|
1960
|
+
if (Y.getBoundingClientRect().top >= q) {
|
1961
|
+
j = Y;
|
1955
1962
|
break;
|
1956
1963
|
}
|
1957
1964
|
}
|
1958
1965
|
if (j)
|
1959
1966
|
try {
|
1960
|
-
const
|
1961
|
-
if (!
|
1962
|
-
const
|
1963
|
-
p.value =
|
1967
|
+
const Y = JSON.parse(j.id);
|
1968
|
+
if (!Y || !Y.timestamp) return;
|
1969
|
+
const H = new Date(Number(Y.timestamp) * 1e3);
|
1970
|
+
p.value = H.toLocaleDateString();
|
1964
1971
|
} catch {
|
1965
1972
|
}
|
1966
1973
|
}
|
1967
|
-
return (
|
1974
|
+
return (Q, q) => (l(), u(Z, null, [
|
1968
1975
|
e.objects.length > 0 || e.typing ? (l(), u("div", {
|
1969
1976
|
key: 0,
|
1970
1977
|
id: "feed-container-" + N(b),
|
1971
1978
|
ref_key: "refFeed",
|
1972
1979
|
ref: n,
|
1973
1980
|
class: "message-feed",
|
1974
|
-
onScroll:
|
1981
|
+
onScroll: q[0] || (q[0] = (j) => N(F)()),
|
1975
1982
|
onMousedown: D,
|
1976
1983
|
onMouseup: O
|
1977
1984
|
}, [
|
@@ -1985,14 +1992,14 @@ const Ai = ["onClick"], gi = /* @__PURE__ */ K({
|
|
1985
1992
|
]),
|
1986
1993
|
_: 1
|
1987
1994
|
}),
|
1988
|
-
(l(!0), u(Z, null, oe(Re.value, (j,
|
1995
|
+
(l(!0), u(Z, null, oe(Re.value, (j, Y) => (l(), u("div", {
|
1989
1996
|
id: JSON.stringify(j),
|
1990
|
-
key: `${j.messageId ?? "mid"}-${
|
1997
|
+
key: `${j.messageId ?? "mid"}-${Y}`,
|
1991
1998
|
class: "tracking-message",
|
1992
|
-
onDblclick: (
|
1999
|
+
onDblclick: (H) => fe(H, j)
|
1993
2000
|
}, [
|
1994
2001
|
(l(), B(Le(ee(j.type)), {
|
1995
|
-
key: `${j.messageId ?? "mid"}-${
|
2002
|
+
key: `${j.messageId ?? "mid"}-${Y}`,
|
1996
2003
|
class: "message-feed__message",
|
1997
2004
|
message: j,
|
1998
2005
|
"apply-style": e.applyStyle,
|
@@ -2030,7 +2037,7 @@ const Ai = ["onClick"], gi = /* @__PURE__ */ K({
|
|
2030
2037
|
onClick: z
|
2031
2038
|
}, [
|
2032
2039
|
e.buttonParams ? (l(), u("div", yi, x(e.buttonParams.unreadAmount), 1)) : h("", !0),
|
2033
|
-
|
2040
|
+
q[1] || (q[1] = o("span", { class: "pi pi-angle-down message-feed__icon-down" }, null, -1))
|
2034
2041
|
])) : h("", !0)
|
2035
2042
|
]),
|
2036
2043
|
_: 1
|
@@ -2048,7 +2055,7 @@ const Ai = ["onClick"], gi = /* @__PURE__ */ K({
|
|
2048
2055
|
class: "message-feed"
|
2049
2056
|
}, [
|
2050
2057
|
o("div", Mi, [
|
2051
|
-
ie(
|
2058
|
+
ie(Q.$slots, "empty-feed", {}, void 0, !0)
|
2052
2059
|
])
|
2053
2060
|
], 512)),
|
2054
2061
|
N(T)().reply ? (l(), B(Ce, {
|
@@ -2063,7 +2070,7 @@ const Ai = ["onClick"], gi = /* @__PURE__ */ K({
|
|
2063
2070
|
], 8, ["to"])) : h("", !0)
|
2064
2071
|
], 64));
|
2065
2072
|
}
|
2066
|
-
}), d6 = /* @__PURE__ */ L(wi, [["__scopeId", "data-v-
|
2073
|
+
}), d6 = /* @__PURE__ */ L(wi, [["__scopeId", "data-v-cf601027"]]), Ci = {
|
2067
2074
|
key: 0,
|
2068
2075
|
class: "profile__container"
|
2069
2076
|
}, Ii = {
|
@@ -2169,7 +2176,7 @@ const Ai = ["onClick"], gi = /* @__PURE__ */ K({
|
|
2169
2176
|
const w = (M) => {
|
2170
2177
|
const T = Math.floor(M / 60), E = Math.floor(M % 60);
|
2171
2178
|
return `${T.toString().padStart(2, "0")}:${E.toString().padStart(2, "0")}`;
|
2172
|
-
}, v =
|
2179
|
+
}, v = P(() => s.value ? w(d.value) : "0:00"), b = P(() => s.value || i.value ? w(c.value) : "0:00");
|
2173
2180
|
return pe(() => {
|
2174
2181
|
s.value != null && (s.value.addEventListener("loadedmetadata", () => {
|
2175
2182
|
s.value != null && (s.value.duration == 1 / 0 || Number.isNaN(s.value.duration)) && (s.value.currentTime = 1e101, s.value.addEventListener("timeupdate", () => {
|
@@ -2351,7 +2358,7 @@ const no = /* @__PURE__ */ L(eo, [["render", to]]), ao = { key: 0 }, so = { key:
|
|
2351
2358
|
},
|
2352
2359
|
emits: ["fileUploaded"],
|
2353
2360
|
setup(e, { emit: f }) {
|
2354
|
-
const t = e, n = y(""), a = y(), s = y(), i = se("chatAppId"), { setMessageFile: r, resetMessageFile: c, getMessage: d, setRecordingMessage: A } = Ve(i), g =
|
2361
|
+
const t = e, n = y(""), a = y(), s = y(), i = se("chatAppId"), { setMessageFile: r, resetMessageFile: c, getMessage: d, setRecordingMessage: A } = Ve(i), g = P(() => !d().file), p = () => {
|
2355
2362
|
const E = document.getElementById("chat-input-file-line-" + i);
|
2356
2363
|
E && (E.style.display = "none"), c(), s.value = void 0, n.value = "";
|
2357
2364
|
}, w = async () => {
|
@@ -2587,7 +2594,7 @@ const po = /* @__PURE__ */ L(Ao, [["render", mo]]), _o = ["data-theme"], ho = /*
|
|
2587
2594
|
}
|
2588
2595
|
},
|
2589
2596
|
setup(e) {
|
2590
|
-
const f = se("chatAppId"), { getTheme: t } = Ue(f), n = y(), a = y(), s = y(!1), i = e, r =
|
2597
|
+
const f = se("chatAppId"), { getTheme: t } = Ue(f), n = y(), a = y(), s = y(!1), i = e, r = P(() => ({
|
2591
2598
|
tooltip__text: !0,
|
2592
2599
|
[`tooltip--${i.position}`]: !0
|
2593
2600
|
})), c = () => {
|
@@ -2655,9 +2662,9 @@ const po = /* @__PURE__ */ L(Ao, [["render", mo]]), _o = ["data-theme"], ho = /*
|
|
2655
2662
|
},
|
2656
2663
|
emits: ["selectItem"],
|
2657
2664
|
setup(e, { emit: f }) {
|
2658
|
-
const t = e, n = Pt(t, "sidebarItems"), a = Pt(t, "menuActions"), s = f, i =
|
2665
|
+
const t = e, n = Pt(t, "sidebarItems"), a = Pt(t, "menuActions"), s = f, i = P(
|
2659
2666
|
() => n.value.filter((m) => m.isFixedBottom).sort((m, I) => I.notificationCount - m.notificationCount)
|
2660
|
-
), r =
|
2667
|
+
), r = P(
|
2661
2668
|
() => n.value.filter((m) => !m.isFixedBottom).sort((m, I) => I.notificationCount - m.notificationCount)
|
2662
2669
|
), c = (m) => {
|
2663
2670
|
const I = n.value.find((D) => D.itemId === m);
|
@@ -2685,14 +2692,14 @@ const po = /* @__PURE__ */ L(Ao, [["render", mo]]), _o = ["data-theme"], ho = /*
|
|
2685
2692
|
if (!m || !w.value) return;
|
2686
2693
|
const I = m.querySelector(".sidebar__image");
|
2687
2694
|
if (!I) return;
|
2688
|
-
const D = E(I), O = 12,
|
2695
|
+
const D = E(I), O = 12, F = 160;
|
2689
2696
|
T.value = !0, M.value = O, setTimeout(() => {
|
2690
2697
|
b.value = D, requestAnimationFrame(() => {
|
2691
2698
|
M.value = 40, setTimeout(() => {
|
2692
2699
|
T.value = !1;
|
2693
|
-
},
|
2700
|
+
}, F);
|
2694
2701
|
});
|
2695
|
-
},
|
2702
|
+
}, F);
|
2696
2703
|
} catch {
|
2697
2704
|
}
|
2698
2705
|
}, C = () => _();
|
@@ -2723,7 +2730,7 @@ const po = /* @__PURE__ */ L(Ao, [["render", mo]]), _o = ["data-theme"], ho = /*
|
|
2723
2730
|
(l(!0), u(Z, null, oe(i.value, (D, O) => (l(), u("li", {
|
2724
2731
|
key: O,
|
2725
2732
|
class: S(["sidebar__item-fixed", { "sidebar-horizontal__item": e.horizontal }]),
|
2726
|
-
onClick: (
|
2733
|
+
onClick: (F) => d(F, D.itemId)
|
2727
2734
|
}, [
|
2728
2735
|
D.name ? (l(), B(tf, {
|
2729
2736
|
key: 0,
|
@@ -2754,7 +2761,7 @@ const po = /* @__PURE__ */ L(Ao, [["render", mo]]), _o = ["data-theme"], ho = /*
|
|
2754
2761
|
(l(!0), u(Z, null, oe(r.value, (D, O) => (l(), u("li", {
|
2755
2762
|
key: O,
|
2756
2763
|
class: S(["sidebar__item", { "sidebar-horizontal__item": e.horizontal }]),
|
2757
|
-
onClick: (
|
2764
|
+
onClick: (F) => d(F, D.itemId)
|
2758
2765
|
}, [
|
2759
2766
|
D.name ? (l(), B(tf, {
|
2760
2767
|
key: 0,
|
@@ -3024,9 +3031,9 @@ const b6 = (e, f = null) => {
|
|
3024
3031
|
if (Number(_["lastActivity.timestamp"]) > Number(k["lastActivity.timestamp"])) return -1;
|
3025
3032
|
if (Number(_["lastActivity.timestamp"]) < Number(k["lastActivity.timestamp"])) return 1;
|
3026
3033
|
if (Number(_["lastActivity.timestamp"]) == Number(k["lastActivity.timestamp"])) return 0;
|
3027
|
-
}), w =
|
3034
|
+
}), w = P(() => If(t.chat["lastMessage.status"]));
|
3028
3035
|
let v;
|
3029
|
-
const b = y(0), M = [Te("component.ChatItem.typing") + ".", Te("component.ChatItem.typing") + "..", Te("component.ChatItem.typing") + "..."], T =
|
3036
|
+
const b = y(0), M = [Te("component.ChatItem.typing") + ".", Te("component.ChatItem.typing") + "..", Te("component.ChatItem.typing") + "..."], T = P(() => t.chat.typing ? M[b.value] : t.chat.lastMessage);
|
3030
3037
|
ae(
|
3031
3038
|
() => t.chat.typing,
|
3032
3039
|
() => {
|
@@ -3328,10 +3335,10 @@ const Vl = /* @__PURE__ */ L(El, [["render", Sl]]), Ll = { class: "contact-info"
|
|
3328
3335
|
attributeId: a.value,
|
3329
3336
|
channelId: b.channelId
|
3330
3337
|
});
|
3331
|
-
}, c = (b) => (b == null ? void 0 : b.replace(/\D/g, "")) || "", d =
|
3338
|
+
}, c = (b) => (b == null ? void 0 : b.replace(/\D/g, "")) || "", d = P(() => {
|
3332
3339
|
var b;
|
3333
3340
|
return (b = t.contact.attributes) == null ? void 0 : b.find((M) => M.id === a.value);
|
3334
|
-
}), A =
|
3341
|
+
}), A = P(() => {
|
3335
3342
|
if (s.value)
|
3336
3343
|
return s.value;
|
3337
3344
|
if (!d.value) return t.channels[0] || null;
|
@@ -3341,7 +3348,7 @@ const Vl = /* @__PURE__ */ L(El, [["render", Sl]]), Ll = { class: "contact-info"
|
|
3341
3348
|
const E = ((m = T.title) == null ? void 0 : m.toLowerCase()) || "", _ = ((I = T.channelId) == null ? void 0 : I.toLowerCase()) || "", k = E.includes(b), C = ["whatsapp", "waba", "telegram"].some((D) => _.includes(D));
|
3342
3349
|
return k && C;
|
3343
3350
|
}) || t.channels[0] || { title: "default", channelId: "fallback" } : t.channels[0] || null;
|
3344
|
-
}), g =
|
3351
|
+
}), g = P(() => t.channels), p = (b) => b ? b.includes("whatsapp") || b.includes("waba") ? Tl : b.includes("telegram") ? Vl : null : null, w = (b) => !t.currentDialog || !Object.keys(t.currentDialog) ? !1 : t.currentDialog.attributeId === b.id, v = (b) => {
|
3345
3352
|
n("select-attribute-channel", {
|
3346
3353
|
attributeId: b.id,
|
3347
3354
|
channelId: s.value.channelId
|
@@ -3485,7 +3492,7 @@ const Vl = /* @__PURE__ */ L(El, [["render", Sl]]), Ll = { class: "contact-info"
|
|
3485
3492
|
setup(e, { emit: f }) {
|
3486
3493
|
const t = e, n = se("chatAppId"), { setMessageText: a } = Ve(n), s = () => {
|
3487
3494
|
i("closeTemplateWindow"), a(c.value.template);
|
3488
|
-
}, i = f, r = y(null), c = y(null), d = y(""), A = y(), g = y(""), p = y(""), w = y(""), v = y(!1), b =
|
3495
|
+
}, i = f, r = y(null), c = y(null), d = y(""), A = y(), g = y(""), p = y(""), w = y(""), v = y(!1), b = P(() => !!(v.value && (w.value == "grid" && p.value == "none" || p.value == "grid" && g.value == "none"))), M = P(() => !!(v.value && (g.value == "grid" && p.value == "none" || p.value == "grid" && w.value == "none"))), T = () => {
|
3489
3496
|
v.value && (p.value == "grid" ? _() : w.value == "grid" && C());
|
3490
3497
|
}, E = () => {
|
3491
3498
|
v.value && (p.value == "grid" ? k() : g.value == "grid" && C());
|
@@ -3505,7 +3512,7 @@ const Vl = /* @__PURE__ */ L(El, [["render", Sl]]), Ll = { class: "contact-info"
|
|
3505
3512
|
t.templates.forEach((z) => z.isSelected = !1), $.isSelected = !0, c.value = $, k();
|
3506
3513
|
}, D = () => {
|
3507
3514
|
C(), t.templates.forEach(($) => $.isSelected = !1);
|
3508
|
-
}, O =
|
3515
|
+
}, O = P(() => r.value ? t.templates.filter(($) => $.groupId === r.value.groupId) : t.templates), F = P(() => {
|
3509
3516
|
const $ = d.value.trim().toLowerCase();
|
3510
3517
|
return O.value.filter((z) => z.title.toLowerCase().includes($) || z.template.toLowerCase().includes($));
|
3511
3518
|
}), ee = new ResizeObserver(($) => {
|
@@ -3593,8 +3600,8 @@ const Vl = /* @__PURE__ */ L(El, [["render", Sl]]), Ll = { class: "contact-info"
|
|
3593
3600
|
])
|
3594
3601
|
]),
|
3595
3602
|
o("div", A0, [
|
3596
|
-
|
3597
|
-
(l(!0), u(Z, null, oe(
|
3603
|
+
F.value.length !== 0 ? (l(), u("ul", g0, [
|
3604
|
+
(l(!0), u(Z, null, oe(F.value, (G, te) => (l(), u("li", {
|
3598
3605
|
key: te,
|
3599
3606
|
class: S(["template-selector__item-template", { "template-selector__item-selected": G.isSelected }]),
|
3600
3607
|
onClick: (fe) => I(G)
|
@@ -4022,21 +4029,21 @@ const E0 = /* @__PURE__ */ L(N0, [["render", T0]]), j0 = { class: "" }, S0 = {
|
|
4022
4029
|
file: null,
|
4023
4030
|
buttons: null
|
4024
4031
|
};
|
4025
|
-
g.value ? (j.text = ke.value, j.templateId = A.value.templateId, j.values =
|
4032
|
+
g.value ? (j.text = ke.value, j.templateId = A.value.templateId, j.values = Q.value, j.file = g.value) : (j.text = ke.value, j.templateId = A.value.templateId, j.values = Q.value), A.value.buttons && (j.buttons = A.value.buttons), a("sendWabaValues", j), Re();
|
4026
4033
|
}, r = (j) => {
|
4027
4034
|
g.value = j;
|
4028
4035
|
}, c = y(null), d = y(null), A = y(null), g = y(null), p = y(""), w = y(!1), v = () => {
|
4029
4036
|
w.value = !w.value, w.value ? (c.value.scrollTop = 0, c.value.style["overflow-y"] = "hidden") : c.value.style["overflow-y"] = "scroll";
|
4030
4037
|
}, b = (j) => {
|
4031
|
-
Object.keys(_).forEach((
|
4032
|
-
_[
|
4033
|
-
}), g.value = null, t.wabaTemplates.forEach((
|
4038
|
+
Object.keys(_).forEach((Y) => {
|
4039
|
+
_[Y] = "";
|
4040
|
+
}), g.value = null, t.wabaTemplates.forEach((Y) => Y.isSelected = !1), j.isSelected = !0, A.value = j, w.value = !1, te();
|
4034
4041
|
}, M = () => {
|
4035
4042
|
fe(), t.wabaTemplates.forEach((j) => j.isSelected = !1);
|
4036
|
-
}, T =
|
4043
|
+
}, T = P(() => d.value ? t.wabaTemplates.filter((j) => j.groupId === d.value.groupId) : t.wabaTemplates), E = P(() => {
|
4037
4044
|
const j = p.value.trim().toLowerCase();
|
4038
|
-
return T.value.filter((
|
4039
|
-
}), _ = _n({}), k = y(null), C = y(), m = y(""), I = y(""), D = y(""), O = y(!1),
|
4045
|
+
return T.value.filter((Y) => Y.title.toLowerCase().includes(j) || Y.template.toLowerCase().includes(j));
|
4046
|
+
}), _ = _n({}), k = y(null), C = y(), m = y(""), I = y(""), D = y(""), O = y(!1), F = P(() => !!(O.value && (D.value == "grid" && I.value == "none" || I.value == "grid" && m.value == "none"))), ee = P(() => !!(O.value && (m.value == "grid" && I.value == "none" || I.value == "grid" && D.value == "none"))), $ = () => {
|
4040
4047
|
O.value && (I.value == "grid" ? G() : D.value == "grid" && fe());
|
4041
4048
|
}, z = () => {
|
4042
4049
|
O.value && (I.value == "grid" ? te() : m.value == "grid" && fe());
|
@@ -4050,48 +4057,48 @@ const E0 = /* @__PURE__ */ L(N0, [["render", T0]]), j0 = { class: "" }, S0 = {
|
|
4050
4057
|
const j = document.getElementById("waba-template-selector-container-" + n);
|
4051
4058
|
j.style.setProperty("--chotto-waba-template-second-col-display", "grid"), j.style.setProperty("--chotto-waba-template-first-col-display", "none"), j.style.setProperty("--chotto-waba-template-third-col-display", "none"), le();
|
4052
4059
|
}, le = () => {
|
4053
|
-
const j = document.getElementById("waba-template-selector-container-" + n),
|
4054
|
-
m.value =
|
4060
|
+
const j = document.getElementById("waba-template-selector-container-" + n), Y = window.getComputedStyle(j);
|
4061
|
+
m.value = Y.getPropertyValue("--chotto-waba-template-first-col-display"), I.value = Y.getPropertyValue("--chotto-waba-template-second-col-display"), D.value = Y.getPropertyValue("--chotto-waba-template-third-col-display");
|
4055
4062
|
}, Ie = (j) => {
|
4056
4063
|
_[j[1]] = j[0];
|
4057
|
-
}, me =
|
4064
|
+
}, me = P(() => {
|
4058
4065
|
var ye;
|
4059
4066
|
const j = (ye = A.value) == null ? void 0 : ye.template;
|
4060
4067
|
if (!j) return [];
|
4061
|
-
const
|
4068
|
+
const Y = [...j.matchAll(/{{\d+}}/g)], H = [];
|
4062
4069
|
let re = 0;
|
4063
|
-
return
|
4064
|
-
Qe.index > re &&
|
4065
|
-
}), re < j.length &&
|
4066
|
-
}), $e =
|
4067
|
-
var
|
4070
|
+
return Y.forEach((Qe) => {
|
4071
|
+
Qe.index > re && H.push(j.substring(re, Qe.index)), H.push({ index: parseInt(Qe[0].slice(2, -2)) }), re = Qe.index + Qe[0].length;
|
4072
|
+
}), re < j.length && H.push(j.substring(re)), H;
|
4073
|
+
}), $e = P(() => {
|
4074
|
+
var Y, H;
|
4068
4075
|
if (!A.value)
|
4069
4076
|
return !0;
|
4070
|
-
if (!((
|
4077
|
+
if (!((Y = A.value) != null && Y.template.match(/{{\d+}}/gi)))
|
4071
4078
|
return !1;
|
4072
|
-
const j = Object.keys(_).length !== ((
|
4079
|
+
const j = Object.keys(_).length !== ((H = A.value) == null ? void 0 : H.template.match(/{{\d+}}/gi).length);
|
4073
4080
|
return A.value.type === "TEXT" ? j : A.value.type !== "TEXT" ? j || !g.value : !1;
|
4074
4081
|
}), Re = () => {
|
4075
4082
|
Object.keys(_).forEach((j) => {
|
4076
4083
|
_[j] = "";
|
4077
4084
|
}), g.value = null, A.value = null, t.wabaTemplates.forEach((j) => j.isSelected = !1);
|
4078
|
-
}, ke =
|
4085
|
+
}, ke = P(() => {
|
4079
4086
|
console.log(me.value, A.value.buttons);
|
4080
|
-
let j = me.value.map((
|
4081
|
-
return A.value.buttons && (
|
4082
|
-
| [` +
|
4083
|
-
}),
|
4087
|
+
let j = me.value.map((H) => typeof H == "string" ? H : _[H.index]).join(""), Y = "";
|
4088
|
+
return A.value.buttons && (Y = A.value.buttons.map((H) => `
|
4089
|
+
| [` + H.text + "]").join("")), j.concat(Y);
|
4090
|
+
}), Q = P(() => {
|
4084
4091
|
const j = [];
|
4085
|
-
for (const
|
4086
|
-
_[
|
4092
|
+
for (const Y in _)
|
4093
|
+
_[Y] !== "" && _[Y] !== "Заполнить" && j.push(_[Y]);
|
4087
4094
|
return j;
|
4088
|
-
}),
|
4089
|
-
const
|
4090
|
-
|
4095
|
+
}), q = new ResizeObserver((j) => {
|
4096
|
+
const Y = j[0].target.clientWidth;
|
4097
|
+
Y > 700 && (O.value = !1), Y < 700 && (O.value = !0);
|
4091
4098
|
});
|
4092
4099
|
return pe(() => {
|
4093
|
-
le(), N(C) &&
|
4094
|
-
}), (j,
|
4100
|
+
le(), N(C) && q.observe(N(C));
|
4101
|
+
}), (j, Y) => (l(), u("div", G0, [
|
4095
4102
|
o("div", {
|
4096
4103
|
id: "waba-template-selector-container-" + N(n),
|
4097
4104
|
ref_key: "refContainer",
|
@@ -4103,7 +4110,7 @@ const E0 = /* @__PURE__ */ L(N0, [["render", T0]]), j0 = { class: "" }, S0 = {
|
|
4103
4110
|
}, [
|
4104
4111
|
o("div", eu, [
|
4105
4112
|
o("div", fu, [
|
4106
|
-
|
4113
|
+
F.value ? (l(), u("button", tu, [
|
4107
4114
|
o("span", {
|
4108
4115
|
class: "pi pi-arrow-left",
|
4109
4116
|
onClick: $
|
@@ -4126,28 +4133,28 @@ const E0 = /* @__PURE__ */ L(N0, [["render", T0]]), j0 = { class: "" }, S0 = {
|
|
4126
4133
|
o("div", au, [
|
4127
4134
|
o("div", su, [
|
4128
4135
|
o("ul", iu, [
|
4129
|
-
(l(!0), u(Z, null, oe(e.groupTemplates, (
|
4136
|
+
(l(!0), u(Z, null, oe(e.groupTemplates, (H, re) => (l(), u("li", {
|
4130
4137
|
key: re,
|
4131
|
-
class: S(["template-selector__item-group", { "template-selector__item-selected": d.value ===
|
4138
|
+
class: S(["template-selector__item-group", { "template-selector__item-selected": d.value === H }]),
|
4132
4139
|
onClick: M
|
4133
4140
|
}, [
|
4134
4141
|
o("label", ou, [
|
4135
|
-
|
4142
|
+
H.iconUrl ? (l(), u("img", {
|
4136
4143
|
key: 0,
|
4137
4144
|
class: "template-selector__item-group-icon",
|
4138
|
-
src:
|
4139
|
-
alt:
|
4145
|
+
src: H.iconUrl,
|
4146
|
+
alt: H.title
|
4140
4147
|
}, null, 8, lu)) : h("", !0),
|
4141
4148
|
ge(o("input", {
|
4142
4149
|
id: re,
|
4143
|
-
"onUpdate:modelValue":
|
4144
|
-
value:
|
4150
|
+
"onUpdate:modelValue": Y[0] || (Y[0] = (ye) => d.value = ye),
|
4151
|
+
value: H,
|
4145
4152
|
class: "template-selector__input-group",
|
4146
4153
|
type: "radio"
|
4147
4154
|
}, null, 8, uu), [
|
4148
4155
|
[wt, d.value]
|
4149
4156
|
]),
|
4150
|
-
o("span", null, x(
|
4157
|
+
o("span", null, x(H.title), 1)
|
4151
4158
|
])
|
4152
4159
|
], 2))), 128))
|
4153
4160
|
])
|
@@ -4155,7 +4162,7 @@ const E0 = /* @__PURE__ */ L(N0, [["render", T0]]), j0 = { class: "" }, S0 = {
|
|
4155
4162
|
o("div", cu, [
|
4156
4163
|
o("div", ru, [
|
4157
4164
|
ge(o("input", {
|
4158
|
-
"onUpdate:modelValue":
|
4165
|
+
"onUpdate:modelValue": Y[1] || (Y[1] = (H) => p.value = H),
|
4159
4166
|
class: "template-selector__searching-input",
|
4160
4167
|
type: "text",
|
4161
4168
|
placeholder: "Поиск шаблона"
|
@@ -4165,14 +4172,14 @@ const E0 = /* @__PURE__ */ L(N0, [["render", T0]]), j0 = { class: "" }, S0 = {
|
|
4165
4172
|
]),
|
4166
4173
|
o("div", du, [
|
4167
4174
|
E.value.length !== 0 ? (l(), u("ul", Au, [
|
4168
|
-
(l(!0), u(Z, null, oe(E.value, (
|
4175
|
+
(l(!0), u(Z, null, oe(E.value, (H, re) => (l(), u("li", {
|
4169
4176
|
key: re,
|
4170
|
-
class: S(["template-selector__item-template", { "template-selector__item-selected":
|
4171
|
-
onClick: (ye) => b(
|
4177
|
+
class: S(["template-selector__item-template", { "template-selector__item-selected": H.isSelected }]),
|
4178
|
+
onClick: (ye) => b(H)
|
4172
4179
|
}, [
|
4173
4180
|
o("div", mu, [
|
4174
|
-
o("p", pu, x(
|
4175
|
-
o("p", _u, x(
|
4181
|
+
o("p", pu, x(H.title), 1),
|
4182
|
+
o("p", _u, x(H.template), 1)
|
4176
4183
|
])
|
4177
4184
|
], 10, gu))), 128))
|
4178
4185
|
])) : (l(), u("p", hu, " Шаблоны отсутствуют "))
|
@@ -4193,18 +4200,18 @@ const E0 = /* @__PURE__ */ L(N0, [["render", T0]]), j0 = { class: "" }, S0 = {
|
|
4193
4200
|
onFileSelected: r
|
4194
4201
|
}, null, 8, ["type", "template-id"])) : h("", !0),
|
4195
4202
|
o("div", Mu, [
|
4196
|
-
(l(!0), u(Z, null, oe(me.value, (
|
4197
|
-
typeof
|
4203
|
+
(l(!0), u(Z, null, oe(me.value, (H, re) => (l(), u(Z, { key: re }, [
|
4204
|
+
typeof H == "string" ? (l(), u("span", wu, x(H), 1)) : typeof H == "object" ? (l(), B(O0, {
|
4198
4205
|
key: 1,
|
4199
|
-
index:
|
4200
|
-
value: _[
|
4201
|
-
"is-filled": !!_[
|
4202
|
-
onClick: (ye) => k.value =
|
4206
|
+
index: H.index,
|
4207
|
+
value: _[H.index] || "Заполнить",
|
4208
|
+
"is-filled": !!_[H.index],
|
4209
|
+
onClick: (ye) => k.value = H.index,
|
4203
4210
|
onEdit: Ie
|
4204
4211
|
}, null, 8, ["index", "value", "is-filled", "onClick"])) : h("", !0)
|
4205
4212
|
], 64))), 128))
|
4206
4213
|
]),
|
4207
|
-
|
4214
|
+
Y[2] || (Y[2] = o("p", { class: "template-selector__preview-time" }, " 22:22 ", -1)),
|
4208
4215
|
A.value.buttons ? (l(), B(H0, {
|
4209
4216
|
key: 1,
|
4210
4217
|
buttons: A.value.buttons,
|
@@ -16789,8 +16796,8 @@ function on(e) {
|
|
16789
16796
|
}
|
16790
16797
|
if (a === be || (a === ve || a === je) && s === Wf) {
|
16791
16798
|
_ = Se;
|
16792
|
-
var
|
16793
|
-
v -=
|
16799
|
+
var F = g && C.visualViewport ? C.visualViewport.width : m[D];
|
16800
|
+
v -= F - n.width, v *= c ? 1 : -1;
|
16794
16801
|
}
|
16795
16802
|
}
|
16796
16803
|
var ee = Object.assign({
|
@@ -17001,10 +17008,10 @@ function Zf(e, f) {
|
|
17001
17008
|
right: I.right - _.right + b.right
|
17002
17009
|
}, O = e.modifiersData.offset;
|
17003
17010
|
if (A === jf && O) {
|
17004
|
-
var
|
17011
|
+
var F = O[a];
|
17005
17012
|
Object.keys(D).forEach(function(ee) {
|
17006
17013
|
var $ = [Se, je].indexOf(ee) >= 0 ? 1 : -1, z = [ve, je].indexOf(ee) >= 0 ? "y" : "x";
|
17007
|
-
D[ee] +=
|
17014
|
+
D[ee] += F[z] * $;
|
17008
17015
|
});
|
17009
17016
|
}
|
17010
17017
|
return D;
|
@@ -17038,8 +17045,8 @@ function Y2(e) {
|
|
17038
17045
|
function P2(e) {
|
17039
17046
|
var f = e.state, t = e.options, n = e.name;
|
17040
17047
|
if (!f.modifiersData[n]._skip) {
|
17041
|
-
for (var a = t.mainAxis, s = a === void 0 ? !0 : a, i = t.altAxis, r = i === void 0 ? !0 : i, c = t.fallbackPlacements, d = t.padding, A = t.boundary, g = t.rootBoundary, p = t.altBoundary, w = t.flipVariations, v = w === void 0 ? !0 : w, b = t.allowedAutoPlacements, M = f.options.placement, T = qe(M), E = T === M, _ = c || (E || !v ? [g1(M)] : Y2(M)), k = [M].concat(_).reduce(function(
|
17042
|
-
return
|
17048
|
+
for (var a = t.mainAxis, s = a === void 0 ? !0 : a, i = t.altAxis, r = i === void 0 ? !0 : i, c = t.fallbackPlacements, d = t.padding, A = t.boundary, g = t.rootBoundary, p = t.altBoundary, w = t.flipVariations, v = w === void 0 ? !0 : w, b = t.allowedAutoPlacements, M = f.options.placement, T = qe(M), E = T === M, _ = c || (E || !v ? [g1(M)] : Y2(M)), k = [M].concat(_).reduce(function(q, j) {
|
17049
|
+
return q.concat(qe(j) === Lt ? F2(f, {
|
17043
17050
|
placement: j,
|
17044
17051
|
boundary: A,
|
17045
17052
|
rootBoundary: g,
|
@@ -17047,8 +17054,8 @@ function P2(e) {
|
|
17047
17054
|
flipVariations: v,
|
17048
17055
|
allowedAutoPlacements: b
|
17049
17056
|
}) : j);
|
17050
|
-
}, []), C = f.rects.reference, m = f.rects.popper, I = /* @__PURE__ */ new Map(), D = !0, O = k[0],
|
17051
|
-
var ee = k[
|
17057
|
+
}, []), C = f.rects.reference, m = f.rects.popper, I = /* @__PURE__ */ new Map(), D = !0, O = k[0], F = 0; F < k.length; F++) {
|
17058
|
+
var ee = k[F], $ = qe(ee), z = yf(ee) === _f, G = [ve, je].indexOf($) >= 0, te = G ? "width" : "height", fe = Zf(f, {
|
17052
17059
|
placement: ee,
|
17053
17060
|
boundary: A,
|
17054
17061
|
rootBoundary: g,
|
@@ -17057,8 +17064,8 @@ function P2(e) {
|
|
17057
17064
|
}), le = G ? z ? Se : be : z ? je : ve;
|
17058
17065
|
C[te] > m[te] && (le = g1(le));
|
17059
17066
|
var Ie = g1(le), me = [];
|
17060
|
-
if (s && me.push(fe[$] <= 0), r && me.push(fe[le] <= 0, fe[Ie] <= 0), me.every(function(
|
17061
|
-
return
|
17067
|
+
if (s && me.push(fe[$] <= 0), r && me.push(fe[le] <= 0, fe[Ie] <= 0), me.every(function(q) {
|
17068
|
+
return q;
|
17062
17069
|
})) {
|
17063
17070
|
O = ee, D = !1;
|
17064
17071
|
break;
|
@@ -17067,18 +17074,18 @@ function P2(e) {
|
|
17067
17074
|
}
|
17068
17075
|
if (D)
|
17069
17076
|
for (var $e = v ? 3 : 1, Re = function(j) {
|
17070
|
-
var
|
17071
|
-
var re = I.get(
|
17077
|
+
var Y = k.find(function(H) {
|
17078
|
+
var re = I.get(H);
|
17072
17079
|
if (re)
|
17073
17080
|
return re.slice(0, j).every(function(ye) {
|
17074
17081
|
return ye;
|
17075
17082
|
});
|
17076
17083
|
});
|
17077
|
-
if (
|
17078
|
-
return O =
|
17084
|
+
if (Y)
|
17085
|
+
return O = Y, "break";
|
17079
17086
|
}, ke = $e; ke > 0; ke--) {
|
17080
|
-
var
|
17081
|
-
if (
|
17087
|
+
var Q = Re(ke);
|
17088
|
+
if (Q === "break")
|
17082
17089
|
break;
|
17083
17090
|
}
|
17084
17091
|
f.placement !== O && (f.modifiersData[n]._skip = !0, f.placement = O, f.reset = !0);
|
@@ -17184,7 +17191,7 @@ function fc(e) {
|
|
17184
17191
|
altBoundary: A
|
17185
17192
|
}), T = qe(f.placement), E = yf(f.placement), _ = !E, k = zt(T), C = ec(k), m = f.modifiersData.popperOffsets, I = f.rects.reference, D = f.rects.popper, O = typeof b == "function" ? b(Object.assign({}, f.rects, {
|
17186
17193
|
placement: f.placement
|
17187
|
-
})) : b,
|
17194
|
+
})) : b, F = typeof O == "number" ? {
|
17188
17195
|
mainAxis: O,
|
17189
17196
|
altAxis: O
|
17190
17197
|
} : Object.assign({
|
@@ -17196,14 +17203,14 @@ function fc(e) {
|
|
17196
17203
|
};
|
17197
17204
|
if (m) {
|
17198
17205
|
if (s) {
|
17199
|
-
var z, G = k === "y" ? ve : be, te = k === "y" ? je : Se, fe = k === "y" ? "height" : "width", le = m[k], Ie = le + M[G], me = le - M[te], $e = w ? -D[fe] / 2 : 0, Re = E === _f ? I[fe] : D[fe], ke = E === _f ? -D[fe] : -I[fe],
|
17206
|
+
var z, G = k === "y" ? ve : be, te = k === "y" ? je : Se, fe = k === "y" ? "height" : "width", le = m[k], Ie = le + M[G], me = le - M[te], $e = w ? -D[fe] / 2 : 0, Re = E === _f ? I[fe] : D[fe], ke = E === _f ? -D[fe] : -I[fe], Q = f.elements.arrow, q = w && Q ? Ot(Q) : {
|
17200
17207
|
width: 0,
|
17201
17208
|
height: 0
|
17202
|
-
}, j = f.modifiersData["arrow#persistent"] ? f.modifiersData["arrow#persistent"].padding : Rn(),
|
17209
|
+
}, j = f.modifiersData["arrow#persistent"] ? f.modifiersData["arrow#persistent"].padding : Rn(), Y = j[G], H = j[te], re = Rf(0, I[fe], q[fe]), ye = _ ? I[fe] / 2 - $e - re - Y - F.mainAxis : Re - re - Y - F.mainAxis, Qe = _ ? -I[fe] / 2 + $e + re + H + F.mainAxis : ke + re + H + F.mainAxis, Af = f.elements.arrow && Gf(f.elements.arrow), J1 = Af ? k === "y" ? Af.clientTop || 0 : Af.clientLeft || 0 : 0, n1 = (z = ee == null ? void 0 : ee[k]) != null ? z : 0, Nf = le + ye - n1 - J1, G1 = le + Qe - n1, a1 = Rf(w ? Y1(Ie, Nf) : Ie, le, w ? rf(me, G1) : me);
|
17203
17210
|
m[k] = a1, $[k] = a1 - le;
|
17204
17211
|
}
|
17205
17212
|
if (r) {
|
17206
|
-
var s1, sf = k === "x" ? ve : be, i1 = k === "x" ? je : Se, Fe = m[C], of = C === "y" ? "height" : "width", U = Fe + M[sf], R = Fe - M[i1], Ae = [ve, be].indexOf(T) !== -1, Ye = (s1 = ee == null ? void 0 : ee[C]) != null ? s1 : 0, lf = Ae ? U : Fe - I[of] - D[of] - Ye +
|
17213
|
+
var s1, sf = k === "x" ? ve : be, i1 = k === "x" ? je : Se, Fe = m[C], of = C === "y" ? "height" : "width", U = Fe + M[sf], R = Fe - M[i1], Ae = [ve, be].indexOf(T) !== -1, Ye = (s1 = ee == null ? void 0 : ee[C]) != null ? s1 : 0, lf = Ae ? U : Fe - I[of] - D[of] - Ye + F.altAxis, uf = Ae ? Fe + I[of] + D[of] - Ye - F.altAxis : R, ne = w && Ae ? I2(lf, Fe, uf) : Rf(w ? lf : U, Fe, w ? uf : R);
|
17207
17214
|
m[C] = ne, $[C] = ne - Fe;
|
17208
17215
|
}
|
17209
17216
|
f.modifiersData[n] = $;
|
@@ -17342,8 +17349,8 @@ function rc(e) {
|
|
17342
17349
|
A.rects = {
|
17343
17350
|
reference: ic(E, Gf(_), A.options.strategy === "fixed"),
|
17344
17351
|
popper: Ot(_)
|
17345
|
-
}, A.reset = !1, A.placement = A.options.placement, A.orderedModifiers.forEach(function(
|
17346
|
-
return A.modifiersData[
|
17352
|
+
}, A.reset = !1, A.placement = A.options.placement, A.orderedModifiers.forEach(function(F) {
|
17353
|
+
return A.modifiersData[F.name] = Object.assign({}, F.data);
|
17347
17354
|
});
|
17348
17355
|
for (var k = 0; k < A.orderedModifiers.length; k++) {
|
17349
17356
|
if (A.reset === !0) {
|
@@ -17450,12 +17457,12 @@ const mc = K({
|
|
17450
17457
|
select: (e) => !0
|
17451
17458
|
},
|
17452
17459
|
setup() {
|
17453
|
-
const { state: e, updateEmoji: f, updateSelect: t } = se("store"), n = y(null), a =
|
17460
|
+
const { state: e, updateEmoji: f, updateSelect: t } = se("store"), n = y(null), a = P(() => gc(
|
17454
17461
|
e.emojis,
|
17455
17462
|
e.search,
|
17456
17463
|
e.skinTone,
|
17457
17464
|
e.options.disabledGroups
|
17458
|
-
)), s = Jn(), i =
|
17465
|
+
)), s = Jn(), i = P(() => !e.options.hideGroupNames), r = P(() => !e.options.disableStickyGroupNames), c = hn(e.options.groupNames), d = e.orderedGroupKeys;
|
17459
17466
|
e.options.additionalGroups && Object.keys(e.options.additionalGroups).map((v) => {
|
17460
17467
|
e.options.groupNames[v] ? c[v] = e.options.groupNames[v] : c[v] = Wn(v);
|
17461
17468
|
});
|
@@ -17547,9 +17554,9 @@ var Cc = /* @__PURE__ */ Xf(mc, [["render", wc]]), Ic = "data:image/svg+xml;base
|
|
17547
17554
|
const Sc = K({
|
17548
17555
|
name: "Header",
|
17549
17556
|
setup(e) {
|
17550
|
-
const { state: f, updateSearch: t, updateActiveGroup: n } = se("store"), a =
|
17557
|
+
const { state: f, updateSearch: t, updateActiveGroup: n } = se("store"), a = P(() => !f.options.hideSearch), s = P(() => !f.options.hideGroupIcons), i = JSON.parse(JSON.stringify(f.orderedGroupKeys)), r = P(
|
17551
17558
|
() => f.options.staticTexts.placeholder || ""
|
17552
|
-
), c =
|
17559
|
+
), c = P({
|
17553
17560
|
get: () => f.search,
|
17554
17561
|
set: (g) => t(g)
|
17555
17562
|
}), d = [
|
@@ -17635,9 +17642,9 @@ var Fc = /* @__PURE__ */ Xf(Sc, [["render", Qc]]);
|
|
17635
17642
|
const Yc = K({
|
17636
17643
|
name: "Header",
|
17637
17644
|
setup() {
|
17638
|
-
const { state: e, updateSkinTone: f } = se("store"), t = y(!1), n = y(!1), a =
|
17645
|
+
const { state: e, updateSkinTone: f } = se("store"), t = y(!1), n = y(!1), a = P(() => e.skinTone), s = P(
|
17639
17646
|
() => e.options.staticTexts.skinTone || "Skin tone"
|
17640
|
-
), i =
|
17647
|
+
), i = P(() => !e.options.disableSkinTones), r = qn() ? "is-mac" : "", c = P(() => ({
|
17641
17648
|
...e.emoji,
|
17642
17649
|
src: jn + "/" + e.emoji[qf] + ".png"
|
17643
17650
|
}));
|
@@ -17757,7 +17764,7 @@ const Xc = K({
|
|
17757
17764
|
setup(e, { emit: f }) {
|
17758
17765
|
const t = y(), n = y(), a = y(), s = y(!1), i = y(e.text), r = e.type === "input" || e.type === "textarea";
|
17759
17766
|
let c = -1;
|
17760
|
-
const { state: d } = se("store"), A =
|
17767
|
+
const { state: d } = se("store"), A = P(() => d.options.colorTheme);
|
17761
17768
|
function g(M) {
|
17762
17769
|
if (r) {
|
17763
17770
|
const T = d.options.mode;
|
@@ -26780,7 +26787,7 @@ const Nr = { class: "feed-search__container" }, xr = { style: { "line-height": "
|
|
26780
26787
|
},
|
26781
26788
|
emits: ["search", "cancel", "switch"],
|
26782
26789
|
setup(e, { emit: f }) {
|
26783
|
-
const t = se("chatAppId"), { getModel: n } = kr(t), a = f, s = e, i = y(), r = Dr("", 500), c =
|
26790
|
+
const t = se("chatAppId"), { getModel: n } = kr(t), a = f, s = e, i = y(), r = Dr("", 500), c = P(() => s.isFeedLocation ? "40px" : (s.isFeedLocation, "20px"));
|
26784
26791
|
ae(
|
26785
26792
|
() => [n().text, r.value],
|
26786
26793
|
() => {
|
@@ -26840,7 +26847,7 @@ const Nr = { class: "feed-search__container" }, xr = { style: { "line-height": "
|
|
26840
26847
|
}
|
26841
26848
|
},
|
26842
26849
|
setup(e) {
|
26843
|
-
const f = e, t =
|
26850
|
+
const f = e, t = P(() => {
|
26844
26851
|
const n = {
|
26845
26852
|
"message.file": "pi pi-file",
|
26846
26853
|
"message.audio": "pi pi-volume-up",
|
@@ -26905,7 +26912,7 @@ const Nr = { class: "feed-search__container" }, xr = { style: { "line-height": "
|
|
26905
26912
|
},
|
26906
26913
|
emits: ["clickedSearch", "loadMore"],
|
26907
26914
|
setup(e, { emit: f }) {
|
26908
|
-
const t = f, n = e, a = y(), s = y(null), i =
|
26915
|
+
const t = f, n = e, a = y(), s = y(null), i = P(() => n.notFound ? Te("component.FeedFoundObjects.notFound") : n.notFound ? "" : Te("component.FeedFoundObjects.notSearched")), r = (d) => {
|
26909
26916
|
d.messageId && (t("clickedSearch", d.messageId), s.value = d);
|
26910
26917
|
}, c = () => {
|
26911
26918
|
const d = N(a);
|
@@ -26950,9 +26957,9 @@ const Nr = { class: "feed-search__container" }, xr = { style: { "line-height": "
|
|
26950
26957
|
}
|
26951
26958
|
},
|
26952
26959
|
setup(e) {
|
26953
|
-
const f = se("chatAppId"), { getMessage: t, setMessageFile: n, resetMessageFile: a, setRecordingMessage: s } = Ve(f), i = y(), r = y(0), c = y(0), d = y(0), A = y(0), g =
|
26954
|
-
let D = A.value < 10 ? "0" + A.value : A.value, O = d.value < 10 ? "0" + d.value : d.value,
|
26955
|
-
return D + ":" + O + ":" +
|
26960
|
+
const f = se("chatAppId"), { getMessage: t, setMessageFile: n, resetMessageFile: a, setRecordingMessage: s } = Ve(f), i = y(), r = y(0), c = y(0), d = y(0), A = y(0), g = P(() => {
|
26961
|
+
let D = A.value < 10 ? "0" + A.value : A.value, O = d.value < 10 ? "0" + d.value : d.value, F = c.value < 10 ? "0" + c.value : c.value, ee = r.value < 10 ? "00" + r.value : r.value < 100 ? "0" + r.value : r.value;
|
26962
|
+
return D + ":" + O + ":" + F + ":" + ee;
|
26956
26963
|
}), p = y(""), w = y(!1), v = y(), b = y([]), M = y(), T = y(), E = e, _ = async () => {
|
26957
26964
|
if (!t().file && E.state == "active") {
|
26958
26965
|
const D = await navigator.mediaDevices.getUserMedia({ audio: !0, video: !1 });
|
@@ -26967,21 +26974,21 @@ const Nr = { class: "feed-search__container" }, xr = { style: { "line-height": "
|
|
26967
26974
|
}, C = () => {
|
26968
26975
|
v.value && (v.value.stop(), v.value.onstop = async () => {
|
26969
26976
|
const D = new File(b.value, "voicemessage.mp3", { type: "audio/*" }), O = URL.createObjectURL(D);
|
26970
|
-
M.value = O, p.value = "uploading", await q1(E.filebumpUrl, D).then((
|
26971
|
-
if (p.value =
|
26977
|
+
M.value = O, p.value = "uploading", await q1(E.filebumpUrl, D).then((F) => {
|
26978
|
+
if (p.value = F.status, F.status == "success") {
|
26972
26979
|
const ee = document.getElementById("chat-input-file-line-" + f);
|
26973
26980
|
ee && (ee.style.display = "inherit"), n({
|
26974
|
-
url:
|
26975
|
-
name:
|
26976
|
-
size:
|
26977
|
-
type:
|
26978
|
-
}),
|
26979
|
-
previewUrl:
|
26980
|
-
isImage:
|
26981
|
-
isVideo:
|
26982
|
-
isAudio:
|
26983
|
-
fileName:
|
26984
|
-
fileSize:
|
26981
|
+
url: F.url,
|
26982
|
+
name: F.name,
|
26983
|
+
size: F.size,
|
26984
|
+
type: F.type
|
26985
|
+
}), F.preview && (T.value = {
|
26986
|
+
previewUrl: F.preview.previewUrl,
|
26987
|
+
isImage: F.preview.isImage,
|
26988
|
+
isVideo: F.preview.isVideo,
|
26989
|
+
isAudio: F.preview.isAudio,
|
26990
|
+
fileName: F.name,
|
26991
|
+
fileSize: F.preview.fileSize
|
26985
26992
|
});
|
26986
26993
|
}
|
26987
26994
|
});
|
@@ -27133,7 +27140,7 @@ const Gr = ["data-theme"], Xr = {
|
|
27133
27140
|
}, Rt = /* @__PURE__ */ L(td, [["__scopeId", "data-v-4a9f3ae8"]]), T6 = async (e, f, t) => {
|
27134
27141
|
const n = await e1({
|
27135
27142
|
//в component должен быть встроен emit change(key: value)
|
27136
|
-
component: import("./SelectUser2-
|
27143
|
+
component: import("./SelectUser2-BKuXUkNl.js"),
|
27137
27144
|
attrs: {
|
27138
27145
|
title: e,
|
27139
27146
|
users: f
|
@@ -27205,7 +27212,7 @@ const Gr = ["data-theme"], Xr = {
|
|
27205
27212
|
}
|
27206
27213
|
}, Zn = /* @__PURE__ */ L(sd, [["__scopeId", "data-v-fcb0f158"]]), S6 = async (e, f, t, n, a, s) => await e1({
|
27207
27214
|
//в component должен быть встроен emit change(key: value)
|
27208
|
-
component: import("./CreateDialog-
|
27215
|
+
component: import("./CreateDialog-CXsadW0M.js"),
|
27209
27216
|
attrs: {
|
27210
27217
|
title: e,
|
27211
27218
|
name: f,
|
@@ -27219,7 +27226,7 @@ const Gr = ["data-theme"], Xr = {
|
|
27219
27226
|
}
|
27220
27227
|
}), id = async (e) => await e1({
|
27221
27228
|
//в component должен быть встроен emit change(key: value)
|
27222
|
-
component: import("./ModalVideoRecorder-
|
27229
|
+
component: import("./ModalVideoRecorder-DqBxjq4l.js"),
|
27223
27230
|
attrs: {},
|
27224
27231
|
Modal: Zn,
|
27225
27232
|
modalAttrs: {
|
@@ -27431,25 +27438,25 @@ const Gr = ["data-theme"], Xr = {
|
|
27431
27438
|
telegram: vs,
|
27432
27439
|
max: ws,
|
27433
27440
|
sms: Ds
|
27434
|
-
}, k =
|
27441
|
+
}, k = P(
|
27435
27442
|
() => T.map((U) => ({
|
27436
27443
|
type: U,
|
27437
27444
|
component: E[U]
|
27438
27445
|
}))
|
27439
27446
|
), C = y(
|
27440
27447
|
Object.fromEntries(T.map((U) => [U, []]))
|
27441
|
-
), m =
|
27448
|
+
), m = P(
|
27442
27449
|
() => i.value ? Re(i.value) : null
|
27443
|
-
), I =
|
27450
|
+
), I = P(
|
27444
27451
|
() => {
|
27445
27452
|
var U;
|
27446
27453
|
return i.value !== "phone" && m.value && ((U = t.recentAttributeChannels[i.value]) == null ? void 0 : U.channelId);
|
27447
27454
|
}
|
27448
|
-
), D =
|
27455
|
+
), D = P(
|
27449
27456
|
() => i.value ? $e(i.value) : []
|
27450
|
-
), O =
|
27457
|
+
), O = P(
|
27451
27458
|
() => d.value && A.value && D.value.length > 0 && i.value !== "phone" && z(i.value)
|
27452
|
-
),
|
27459
|
+
), F = {
|
27453
27460
|
phone: "Позвонить",
|
27454
27461
|
whatsapp: "Выберите контакт и канал для отправки сообщения",
|
27455
27462
|
telegram: "Выберите контакт и канал для отправки сообщения",
|
@@ -27457,7 +27464,7 @@ const Gr = ["data-theme"], Xr = {
|
|
27457
27464
|
sms: "Выберите контакт и канал для отправки сообщения"
|
27458
27465
|
}, ee = (U) => {
|
27459
27466
|
var R;
|
27460
|
-
return ((R = t.channelTooltips) == null ? void 0 : R[U]) ??
|
27467
|
+
return ((R = t.channelTooltips) == null ? void 0 : R[U]) ?? F[U] ?? "";
|
27461
27468
|
}, $ = (U) => {
|
27462
27469
|
if (!U) return null;
|
27463
27470
|
const [R] = U.split(".");
|
@@ -27491,14 +27498,14 @@ const Gr = ["data-theme"], Xr = {
|
|
27491
27498
|
}, ke = (U) => {
|
27492
27499
|
var R;
|
27493
27500
|
return ((R = p.value) == null ? void 0 : R.id) === U.id;
|
27494
|
-
},
|
27495
|
-
v.value === U && i.value === U ?
|
27496
|
-
},
|
27501
|
+
}, Q = (U) => {
|
27502
|
+
v.value === U && i.value === U ? q() : (i.value = U, c.value = !0, d.value = !1, p.value = null, w.value = !1, sf());
|
27503
|
+
}, q = () => {
|
27497
27504
|
c.value = !1, i.value = null, p.value = null, w.value = !1, d.value = !1;
|
27498
27505
|
}, j = () => {
|
27499
27506
|
var U;
|
27500
27507
|
if (i.value === "phone")
|
27501
|
-
|
27508
|
+
H(m.value);
|
27502
27509
|
else if (z(i.value)) {
|
27503
27510
|
const R = (U = t.recentAttributeChannels[i.value]) == null ? void 0 : U.channelId;
|
27504
27511
|
m.value && R && ye(R);
|
@@ -27506,28 +27513,28 @@ const Gr = ["data-theme"], Xr = {
|
|
27506
27513
|
const R = te(i.value);
|
27507
27514
|
m.value && R && re(m.value, R.channelId);
|
27508
27515
|
}
|
27509
|
-
},
|
27516
|
+
}, Y = (U) => {
|
27510
27517
|
if (i.value === "phone")
|
27511
|
-
|
27518
|
+
H(U);
|
27512
27519
|
else if (!z(i.value)) {
|
27513
27520
|
const R = te(i.value);
|
27514
27521
|
R && re(U, R.channelId);
|
27515
27522
|
}
|
27516
|
-
},
|
27523
|
+
}, H = (U) => {
|
27517
27524
|
U && (n("phone-call", {
|
27518
27525
|
attributeId: U.id,
|
27519
27526
|
phoneNumber: U.data
|
27520
|
-
}),
|
27527
|
+
}), q());
|
27521
27528
|
}, re = (U, R) => {
|
27522
27529
|
n("select-attribute-channel", {
|
27523
27530
|
attributeId: U.id,
|
27524
27531
|
channelId: R
|
27525
|
-
}), v.value = i.value, b.value = t.channels.find((Ae) => Ae.channelId === R), console.log("TEST selectedChannel.value", b.value),
|
27532
|
+
}), v.value = i.value, b.value = t.channels.find((Ae) => Ae.channelId === R), console.log("TEST selectedChannel.value", b.value), q();
|
27526
27533
|
}, ye = (U) => {
|
27527
27534
|
m.value && n("select-attribute-channel", {
|
27528
27535
|
attributeId: m.value.id,
|
27529
27536
|
channelId: U
|
27530
|
-
}), v.value = i.value, b.value = t.channels.find((R) => R.channelId === U), console.log("TEST selectedChannel.value", b.value),
|
27537
|
+
}), v.value = i.value, b.value = t.channels.find((R) => R.channelId === U), console.log("TEST selectedChannel.value", b.value), q();
|
27531
27538
|
}, Qe = (U) => {
|
27532
27539
|
z(i.value) && (Nf(), w.value = !0, d.value = !0, i1(U.currentTarget));
|
27533
27540
|
}, Af = () => {
|
@@ -27546,7 +27553,7 @@ const Gr = ["data-theme"], Xr = {
|
|
27546
27553
|
w.value ? ye(U) : A.value && (n("select-attribute-channel", {
|
27547
27554
|
attributeId: A.value.id,
|
27548
27555
|
channelId: U
|
27549
|
-
}), v.value = i.value, b.value = t.channels.find((R) => R.channelId === U), console.log("TEST selectedChannel.value", b.value)),
|
27556
|
+
}), v.value = i.value, b.value = t.channels.find((R) => R.channelId === U), console.log("TEST selectedChannel.value", b.value)), q();
|
27550
27557
|
}, sf = () => {
|
27551
27558
|
s.value && (g.value = `${s.value.offsetWidth}px`);
|
27552
27559
|
}, i1 = (U) => {
|
@@ -27575,7 +27582,7 @@ const Gr = ["data-theme"], Xr = {
|
|
27575
27582
|
M.value = 0;
|
27576
27583
|
}
|
27577
27584
|
}, Fe = (U) => {
|
27578
|
-
a.value && !a.value.contains(U.target) &&
|
27585
|
+
a.value && !a.value.contains(U.target) && q();
|
27579
27586
|
};
|
27580
27587
|
ae(() => t.contactAttributes, me, { deep: !0 }), ae(() => t.selectedDialog, (U) => {
|
27581
27588
|
of(U);
|
@@ -27612,7 +27619,7 @@ const Gr = ["data-theme"], Xr = {
|
|
27612
27619
|
active: G(ne.type),
|
27613
27620
|
hover: r.value === ne.type && !G(ne.type) || r.value === ne.type && G(ne.type)
|
27614
27621
|
}]),
|
27615
|
-
onClick: (xf) =>
|
27622
|
+
onClick: (xf) => Q(ne.type),
|
27616
27623
|
onMouseenter: (xf) => r.value = ne.type,
|
27617
27624
|
onMouseleave: R[0] || (R[0] = (xf) => r.value = null)
|
27618
27625
|
}, [
|
@@ -27709,7 +27716,7 @@ const Gr = ["data-theme"], Xr = {
|
|
27709
27716
|
}]),
|
27710
27717
|
onMouseenter: (De) => J1(ne, De),
|
27711
27718
|
onMouseleave: n1,
|
27712
|
-
onClick: (De) =>
|
27719
|
+
onClick: (De) => Y(ne)
|
27713
27720
|
}, [
|
27714
27721
|
o("div", wd, [
|
27715
27722
|
o("span", Cd, x(ne.value), 1)
|
@@ -27929,7 +27936,7 @@ const Gr = ["data-theme"], Xr = {
|
|
27929
27936
|
s.value = !0;
|
27930
27937
|
}, p = () => {
|
27931
27938
|
s.value = !1, a.value = !1;
|
27932
|
-
}, w =
|
27939
|
+
}, w = P(() => If(t.message.status));
|
27933
27940
|
function v(b) {
|
27934
27941
|
return b.position === "left" ? "file-message__left" : "file-message__right";
|
27935
27942
|
}
|
@@ -28080,7 +28087,7 @@ const Gr = ["data-theme"], Xr = {
|
|
28080
28087
|
c.value = !0, d.value = !0;
|
28081
28088
|
}, M = () => {
|
28082
28089
|
c.value = !1, r.value = !1;
|
28083
|
-
}, T =
|
28090
|
+
}, T = P(() => a.message.reply && a.message.text ? "0" : a.message.text ? "8px 8px 0 0" : a.message.reply ? "0 0 8px 8px" : "8px"), E = P(() => If(a.message.status));
|
28084
28091
|
function _(C) {
|
28085
28092
|
return C.position === "left" ? "image-message__left" : "image-message__right";
|
28086
28093
|
}
|
@@ -28271,7 +28278,7 @@ const Gr = ["data-theme"], Xr = {
|
|
28271
28278
|
s.value = !0;
|
28272
28279
|
}, A = () => {
|
28273
28280
|
s.value = !1, a.value = !1;
|
28274
|
-
}, g =
|
28281
|
+
}, g = P(() => If(t.message.status)), p = (b) => {
|
28275
28282
|
A(), n("action", { messageId: t.message.messageId, type: "menu", ...b });
|
28276
28283
|
}, w = () => {
|
28277
28284
|
A(), n("action", { messageId: t.message.messageId, type: "views" });
|
@@ -28416,7 +28423,7 @@ const Gr = ["data-theme"], Xr = {
|
|
28416
28423
|
for (let z of s.value)
|
28417
28424
|
z.selected = !1;
|
28418
28425
|
s.value[$].selected = !0, c.value && (c.value.playbackRate = s.value[$].speed);
|
28419
|
-
}, r = f, c = y(), d = y(!1), A = y(0), g = y(0), p = y(!1), w = y(!1), v = y(!1), b =
|
28426
|
+
}, r = f, c = y(), d = y(!1), A = y(0), g = y(0), p = y(!1), w = y(!1), v = y(!1), b = P(() => a.message.text ? ze(a.message.text) : ""), M = ($) => {
|
28420
28427
|
r("reply", $);
|
28421
28428
|
};
|
28422
28429
|
function T($) {
|
@@ -28429,21 +28436,21 @@ const Gr = ["data-theme"], Xr = {
|
|
28429
28436
|
}, k = () => {
|
28430
28437
|
r("action", { messageId: a.message.messageId, type: "views" });
|
28431
28438
|
}, C = () => {
|
28432
|
-
}, m =
|
28439
|
+
}, m = P(() => If(a.message.status));
|
28433
28440
|
function I() {
|
28434
28441
|
c.value && (d.value ? c.value.pause() : c.value.play(), d.value = !d.value);
|
28435
28442
|
}
|
28436
28443
|
const D = ($) => {
|
28437
28444
|
const z = Math.floor($ / 60), G = Math.floor($ % 60);
|
28438
28445
|
return `${z.toString().padStart(2, "0")}:${G.toString().padStart(2, "0")}`;
|
28439
|
-
}, O =
|
28446
|
+
}, O = P(() => c.value ? D(g.value) : "0:00");
|
28440
28447
|
ae(
|
28441
28448
|
() => g.value,
|
28442
28449
|
() => {
|
28443
28450
|
c.value && (c.value.duration != 1 / 0 && !Number.isNaN(c.value.duration) && (c.value.currentTime = g.value), g.value == A.value && (d.value = !1));
|
28444
28451
|
}
|
28445
28452
|
);
|
28446
|
-
const
|
28453
|
+
const F = P(() => c.value ? D(A.value) : "0:00");
|
28447
28454
|
function ee($) {
|
28448
28455
|
return $.position === "left" ? "audio-message__left" : "audio-message__right";
|
28449
28456
|
}
|
@@ -28520,7 +28527,7 @@ const Gr = ["data-theme"], Xr = {
|
|
28520
28527
|
[Mf, g.value]
|
28521
28528
|
]),
|
28522
28529
|
o("div", z3, [
|
28523
|
-
o("p", U3, x(`${O.value} / ${
|
28530
|
+
o("p", U3, x(`${O.value} / ${F.value}`), 1),
|
28524
28531
|
o("div", B3, [
|
28525
28532
|
(l(!0), u(Z, null, oe(s.value, (te, fe) => (l(), u("p", {
|
28526
28533
|
key: te.text,
|
@@ -28697,13 +28704,13 @@ const Gr = ["data-theme"], Xr = {
|
|
28697
28704
|
p.value = !0, w.value = !0;
|
28698
28705
|
}, _ = () => {
|
28699
28706
|
p.value = !1, g.value = !1;
|
28700
|
-
}, k =
|
28707
|
+
}, k = P(() => If(a.message.status)), C = () => {
|
28701
28708
|
d.value && (d.value.currentTime = 0, d.value.play());
|
28702
28709
|
};
|
28703
28710
|
ae([c, d], ([D, O]) => {
|
28704
28711
|
D ? O && (O.pause(), O.currentTime = 0) : O && (O.play(), O.currentTime = 0);
|
28705
28712
|
});
|
28706
|
-
const m =
|
28713
|
+
const m = P(() => a.message.reply && a.message.text ? "0" : a.message.text ? "8px 8px 0 0" : a.message.reply ? "0 0 8px 8px" : "8px"), I = () => A.value = !1;
|
28707
28714
|
return (D, O) => (l(), u(Z, null, [
|
28708
28715
|
o("div", {
|
28709
28716
|
class: S(["video-message", [
|
@@ -28734,9 +28741,9 @@ const Gr = ["data-theme"], Xr = {
|
|
28734
28741
|
}, null, 8, ["class", "message"])) : h("", !0),
|
28735
28742
|
o("div", {
|
28736
28743
|
class: "video-message__preview-button",
|
28737
|
-
onClick: O[0] || (O[0] = (
|
28744
|
+
onClick: O[0] || (O[0] = (F) => A.value = !0),
|
28738
28745
|
onMouseenter: E,
|
28739
|
-
onMouseleave: O[1] || (O[1] = (
|
28746
|
+
onMouseleave: O[1] || (O[1] = (F) => w.value = !w.value)
|
28740
28747
|
}, [
|
28741
28748
|
o("video", {
|
28742
28749
|
ref_key: "previewPlayer",
|
@@ -28792,7 +28799,7 @@ const Gr = ["data-theme"], Xr = {
|
|
28792
28799
|
p.value && e.message.actions ? (l(), u("button", {
|
28793
28800
|
key: 0,
|
28794
28801
|
class: "video-message__menu-button",
|
28795
|
-
onClick: O[2] || (O[2] = (
|
28802
|
+
onClick: O[2] || (O[2] = (F) => g.value = !g.value)
|
28796
28803
|
}, O[6] || (O[6] = [
|
28797
28804
|
o("span", { class: "pi pi-ellipsis-h" }, null, -1)
|
28798
28805
|
]))) : h("", !0)
|