vue-wiguet-chatweb 0.1.44 → 0.1.45
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/style.css +1 -1
- package/dist/vue-wiguet-chatweb.js +160 -161
- package/dist/vue-wiguet-chatweb.umd.cjs +1 -1
- package/package.json +1 -1
- package/src/components/Chat.vue +0 -1
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.bubble[data-v-586d8c26]{--r: 25px;--t: 30px;padding:calc(2 * var(--r) / 3);-webkit-mask:radial-gradient(var(--t) at var(--_d) 0,#0000 98%,#000 102%) var(--_d) 100% / calc(100% - var(--r)) var(--t) no-repeat,conic-gradient(at var(--r) var(--r),#000 75%,#0000 0) calc(var(--r) / -2) calc(var(--r) / -2) padding-box,radial-gradient(50% 50%,#000 98%,#0000 101%) 0 0 / var(--r) var(--r) space padding-box;mask:radial-gradient(var(--t) at var(--_d) 0,#0000 98%,#000 102%) var(--_d) 100% / calc(100% - var(--r)) var(--t) no-repeat,conic-gradient(at var(--r) var(--r),#000 75%,#0000 0) calc(var(--r) / -2) calc(var(--r) / -2) padding-box,radial-gradient(50% 50%,#000 98%,#0000 101%) 0 0 / var(--r) var(--r) space padding-box;color:#fff;height:100%}.left[data-v-586d8c26]{--_d: 0%;border-left:var(--t) solid #0000;margin-right:0;background-color:#fcd7ae;color:#4d4d4d}.bubble>.content-left[data-v-586d8c26]{margin-right:10px;margin-bottom:1px}.right[data-v-586d8c26]{--_d: 100%;border-right:var(--t) solid #0000;margin-right:0;background-color:#fdeedb;color:#4d4d4d}.bubble>.content-right[data-v-586d8c26]{margin-bottom:1px;margin-right:10px}.message-text[data-v-586d8c26]{margin-bottom:10px;overflow-wrap:break-word}.detail-message[data-v-586d8c26]{font-size:10px;color:gray;display:flex;justify-content:space-between}.chat-message[data-v-586d8c26]{display:flex;flex-direction:column;justify-content:center}.message[data-v-586d8c26]{width:100%;display:flex}.message-left[data-v-586d8c26]{justify-content:start}.message-right[data-v-586d8c26]{justify-content:end}.target[data-v-586d8c26]{padding:.5rem 0;width:100%}.btn-danger[data-v-586d8c26]{background-color:transparent;border:0;border-radius:50%;cursor:pointer;padding:0;width:30px;height:30px;display:flex;align-items:center;justify-content:center}.btn-danger svg[data-v-586d8c26]{width:24px;height:24px}.btn-danger[data-v-586d8c26]:hover{background-color:#ff00003a}.btn-container-widget[data-v-586d8c26]{display:flex;align-items:center;position:absolute;left:-40px;top:50%;transform:translateY(-50%)}.message-container[data-v-586d8c26]{min-width:80%;max-width:80%;position:relative;margin-bottom:.5rem}.messages-container-list[data-v-586d8c26]{width:100%}.icon[data-v-586d8c26]{width:2rem}.btn-icon[data-v-586d8c26]{text-decoration:none;border:none;color:#9ca3af}.btn-icon[data-v-586d8c26]:hover:not(.content-disabled){color:#1f2937}.btn-icon span[data-v-586d8c26]{text-wrap:nowrap}.btn-icon .icon[data-v-586d8c26]{font-size:2rem}.content-disabled[data-v-586d8c26]{-webkit-filter:grayscale(1);filter:grayscale(1);opacity:.5}.spinner_ajPY[data-v-d9a6b2b7]{fill:#fe6d00;transform-origin:center;animation:spinner_AtaB-d9a6b2b7 .75s infinite linear}@keyframes spinner_AtaB-d9a6b2b7{to{transform:rotate(360deg)}}.dialog-overlay[data-v-532e0111]{z-index:10001;position:fixed;top:0;left:0;width:100%;height:100%;background-color:#00000080;display:flex;justify-content:center;align-items:center;opacity:0;animation:fadeIn-532e0111 .3s forwards}.dialog-content[data-v-532e0111]{background-color:#fff;padding:15px;border-radius:8px;text-align:center;animation:slideIn-532e0111 .3s ease-out forwards}@keyframes fadeIn-532e0111{to{opacity:1}}@keyframes slideIn-532e0111{0%{transform:translateY(-50px)}to{transform:translateY(0)}}.dialog-overlay.v-enter-active[data-v-532e0111],.dialog-overlay.v-leave-active[data-v-532e0111]{transition:opacity .3s}.btn-close[data-v-532e0111]{padding:0;background-color:transparent;border:none;display:flex;align-items:center;border-radius:50%}.btn-close[data-v-532e0111]:hover{background-color:#cacaca88}.btn-primary[data-v-
|
|
1
|
+
.bubble[data-v-586d8c26]{--r: 25px;--t: 30px;padding:calc(2 * var(--r) / 3);-webkit-mask:radial-gradient(var(--t) at var(--_d) 0,#0000 98%,#000 102%) var(--_d) 100% / calc(100% - var(--r)) var(--t) no-repeat,conic-gradient(at var(--r) var(--r),#000 75%,#0000 0) calc(var(--r) / -2) calc(var(--r) / -2) padding-box,radial-gradient(50% 50%,#000 98%,#0000 101%) 0 0 / var(--r) var(--r) space padding-box;mask:radial-gradient(var(--t) at var(--_d) 0,#0000 98%,#000 102%) var(--_d) 100% / calc(100% - var(--r)) var(--t) no-repeat,conic-gradient(at var(--r) var(--r),#000 75%,#0000 0) calc(var(--r) / -2) calc(var(--r) / -2) padding-box,radial-gradient(50% 50%,#000 98%,#0000 101%) 0 0 / var(--r) var(--r) space padding-box;color:#fff;height:100%}.left[data-v-586d8c26]{--_d: 0%;border-left:var(--t) solid #0000;margin-right:0;background-color:#fcd7ae;color:#4d4d4d}.bubble>.content-left[data-v-586d8c26]{margin-right:10px;margin-bottom:1px}.right[data-v-586d8c26]{--_d: 100%;border-right:var(--t) solid #0000;margin-right:0;background-color:#fdeedb;color:#4d4d4d}.bubble>.content-right[data-v-586d8c26]{margin-bottom:1px;margin-right:10px}.message-text[data-v-586d8c26]{margin-bottom:10px;overflow-wrap:break-word}.detail-message[data-v-586d8c26]{font-size:10px;color:gray;display:flex;justify-content:space-between}.chat-message[data-v-586d8c26]{display:flex;flex-direction:column;justify-content:center}.message[data-v-586d8c26]{width:100%;display:flex}.message-left[data-v-586d8c26]{justify-content:start}.message-right[data-v-586d8c26]{justify-content:end}.target[data-v-586d8c26]{padding:.5rem 0;width:100%}.btn-danger[data-v-586d8c26]{background-color:transparent;border:0;border-radius:50%;cursor:pointer;padding:0;width:30px;height:30px;display:flex;align-items:center;justify-content:center}.btn-danger svg[data-v-586d8c26]{width:24px;height:24px}.btn-danger[data-v-586d8c26]:hover{background-color:#ff00003a}.btn-container-widget[data-v-586d8c26]{display:flex;align-items:center;position:absolute;left:-40px;top:50%;transform:translateY(-50%)}.message-container[data-v-586d8c26]{min-width:80%;max-width:80%;position:relative;margin-bottom:.5rem}.messages-container-list[data-v-586d8c26]{width:100%}.icon[data-v-586d8c26]{width:2rem}.btn-icon[data-v-586d8c26]{text-decoration:none;border:none;color:#9ca3af}.btn-icon[data-v-586d8c26]:hover:not(.content-disabled){color:#1f2937}.btn-icon span[data-v-586d8c26]{text-wrap:nowrap}.btn-icon .icon[data-v-586d8c26]{font-size:2rem}.content-disabled[data-v-586d8c26]{-webkit-filter:grayscale(1);filter:grayscale(1);opacity:.5}.spinner_ajPY[data-v-d9a6b2b7]{fill:#fe6d00;transform-origin:center;animation:spinner_AtaB-d9a6b2b7 .75s infinite linear}@keyframes spinner_AtaB-d9a6b2b7{to{transform:rotate(360deg)}}.dialog-overlay[data-v-532e0111]{z-index:10001;position:fixed;top:0;left:0;width:100%;height:100%;background-color:#00000080;display:flex;justify-content:center;align-items:center;opacity:0;animation:fadeIn-532e0111 .3s forwards}.dialog-content[data-v-532e0111]{background-color:#fff;padding:15px;border-radius:8px;text-align:center;animation:slideIn-532e0111 .3s ease-out forwards}@keyframes fadeIn-532e0111{to{opacity:1}}@keyframes slideIn-532e0111{0%{transform:translateY(-50px)}to{transform:translateY(0)}}.dialog-overlay.v-enter-active[data-v-532e0111],.dialog-overlay.v-leave-active[data-v-532e0111]{transition:opacity .3s}.btn-close[data-v-532e0111]{padding:0;background-color:transparent;border:none;display:flex;align-items:center;border-radius:50%}.btn-close[data-v-532e0111]:hover{background-color:#cacaca88}.btn-primary[data-v-b1292574]{padding:10px 12px;color:var(--primary-color)}.btn-primary[data-v-b1292574]:hover{background-color:#0000001a}.btn-close[data-v-b1292574]{padding:0;background-color:transparent;border:none;display:flex;align-items:center;border-radius:50%}.btn-close[data-v-b1292574]:hover{background-color:#cacaca88}.messages-container[data-v-b1292574]{position:relative;height:100%}.loader[data-v-b1292574]{position:absolute;top:18px;z-index:5;left:50%;transform:translate(-50%,-50%)}.fit[data-v-b1292574]{width:100%;height:100%;position:relative}.center[data-v-b1292574]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.message-send-block[data-v-b1292574]{display:block;margin:1.5rem;text-align:center}.drop-over[data-v-b1292574]{border:2px dashed #007bff!important}:root{--primary-color: var(--primary-color-500, #513c86)}.header-widget{height:5%;display:flex;justify-content:space-between;align-items:center}.jl2-input-chat{height:20px;width:95%;border:none;resize:none;margin-left:8px;margin-top:8px;margin-bottom:8px;overflow:hidden;max-height:10rem}.jl2-input-chat:focus-visible{outline:none}.jl-inputgroup-chat{width:100%;border:1px solid;border-color:var(--primary-color);background:var(--surface-a);color:var(--surface-500);-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:13px;display:flex;justify-content:space-around;align-items:center}.jl-inputgroup-chat>input{border:none;background:none}.jl-inputgroup-chat>input:hover{outline:none}.form-message{display:flex;justify-content:space-between}.form-message button,.jl-inputgroup-chat>button{border:none!important;background:none}.form-message button,.jl-inputgroup-chat>button:focus{box-shadow:none}.form-message button,.jl-inputgroup-chat>button:active{box-shadow:none}.widget{margin:auto;height:100%;display:flex;width:100%;flex-direction:column;justify-content:space-evenly}.messages-container{height:80%;overflow-y:scroll;border:1px solid lightgray;border-radius:.5rem;scrollbar-color:red transparent;scrollbar-width:thin;scrollbar-color:var(--primary-color) transparent;scrollbar-track-color:transparent;scrollbar-face-color:var(--primary-color);scrollbar-thumb-color:var(--primary-color)}.messages-container::-webkit-scrollbar{width:8px}.messages-container::-webkit-scrollbar-track{background-color:transparent}.messages-container::-webkit-scrollbar-thumb{background-color:var(--primary-color);border-radius:8px}.input-message{border-left:1px solid var(--fge-gray-lines-color);border-right:1px solid var(--fge-gray-lines-color)}.message-send{padding-top:20px;width:90%;margin:auto}#chat-circle{margin:auto;position:fixed;bottom:50px;right:50px;color:#fff;cursor:pointer}.title-chat{font-size:1rem;font-weight:700;color:var(--chat-text-color);margin:0}.chat-box{display:flex;justify-content:center;align-items:center;border:2px solid #d9d9d9;border-radius:25px;padding:5px 15px 30px;background:#fff;position:fixed;right:30px;bottom:50px;width:450px;height:70vh;max-width:85vw;max-height:80vh;box-shadow:0 5px 35px 9px #ccc}.pointer{cursor:pointer}.w-full{width:100%}.widget-component .flex{display:flex;flex-wrap:wrap}.widget-component .flex-col{flex-direction:column}.widget-component .items-center{align-items:center}.widget-component .gap-2{gap:.5rem}.widget-component .mb-2{margin-bottom:8px}.widget-component .mt-2{margin-top:8px}.widget-component .justify-between{justify-content:space-between}.flex-0{flex:0}.flex-1{flex:1}.disabled[data-v-0bfa17ab]{color:currentColor;cursor:not-allowed!important;opacity:.4!important;text-decoration:none}.container-buttons-chat[data-v-0bfa17ab]{position:relative;right:-1.8rem}.button[data-v-0bfa17ab]{position:absolute;width:2.5rem;height:2.5rem;opacity:0;box-shadow:0 1px 3px 1px silver;border-radius:100%;border:1px solid white;background-color:#fff;overflow:hidden;cursor:pointer;transition:transform .5s ease,opacity .3s ease;z-index:-1}.container-buttons-chat.active>a[data-v-0bfa17ab]{z-index:1;opacity:1}.container-buttons-chat.active .whatsapp[data-v-0bfa17ab]{transform:translateY(-150px)}.container-buttons-chat.active .telegram[data-v-0bfa17ab]{transform:translateY(-100px)}.container-buttons-chat.active .webchat[data-v-0bfa17ab]{transform:translateY(-50px)}.widget-container[data-v-0bfa17ab]{position:relative}.new-message-badge[data-v-0bfa17ab]{position:absolute;background-color:red;width:30px;height:30px;display:flex;font-family:Roboto,sans-serif;align-items:center;font-weight:500;justify-content:center;border-radius:50%;right:-2px;top:-4px;z-index:2}.btn-primary[data-v-0bfa17ab]{color:var(--primary-color)}.btn-primary[data-v-0bfa17ab]:hover{opacity:.7}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createElementBlock as R, openBlock as N, createElementVNode as b, unref as Fe, getCurrentScope as vo, onScopeDispose as bo, computed as en, ref as U, watch as ts, getCurrentInstance as To, onMounted as ns, defineComponent as tn, onBeforeMount as
|
|
1
|
+
import { createElementBlock as R, openBlock as N, createElementVNode as b, unref as Fe, getCurrentScope as vo, onScopeDispose as bo, computed as en, ref as U, watch as ts, getCurrentInstance as To, onMounted as ns, defineComponent as tn, onBeforeMount as So, Fragment as mt, renderList as Fn, normalizeClass as Be, createCommentVNode as Ee, createVNode as le, toDisplayString as Ye, createBlock as ss, Teleport as ko, withModifiers as xe, renderSlot as Eo, nextTick as ot, reactive as Oo, onUnmounted as _o, withDirectives as jt, withKeys as Ot, vModelText as bs, normalizeProps as Co, guardReactiveProps as xo, withCtx as No, createStaticVNode as Ao, vShow as Ts } from "vue";
|
|
2
2
|
let _t;
|
|
3
3
|
const Ro = new Uint8Array(16);
|
|
4
4
|
function Io() {
|
|
@@ -12,12 +12,12 @@ for (let t = 0; t < 256; ++t)
|
|
|
12
12
|
function Mo(t, e = 0) {
|
|
13
13
|
return j[t[e + 0]] + j[t[e + 1]] + j[t[e + 2]] + j[t[e + 3]] + "-" + j[t[e + 4]] + j[t[e + 5]] + "-" + j[t[e + 6]] + j[t[e + 7]] + "-" + j[t[e + 8]] + j[t[e + 9]] + "-" + j[t[e + 10]] + j[t[e + 11]] + j[t[e + 12]] + j[t[e + 13]] + j[t[e + 14]] + j[t[e + 15]];
|
|
14
14
|
}
|
|
15
|
-
const Do = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto),
|
|
15
|
+
const Do = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Ss = {
|
|
16
16
|
randomUUID: Do
|
|
17
17
|
};
|
|
18
18
|
function Lo(t, e, n) {
|
|
19
|
-
if (
|
|
20
|
-
return
|
|
19
|
+
if (Ss.randomUUID && !t)
|
|
20
|
+
return Ss.randomUUID();
|
|
21
21
|
t = t || {};
|
|
22
22
|
const s = t.random || (t.rng || Io)();
|
|
23
23
|
return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, Mo(s);
|
|
@@ -59,7 +59,7 @@ function Po(t, e) {
|
|
|
59
59
|
}, null, -1)
|
|
60
60
|
]));
|
|
61
61
|
}
|
|
62
|
-
const
|
|
62
|
+
const ks = /* @__PURE__ */ oe(Uo, [["render", Po]]);
|
|
63
63
|
function _r(t, e) {
|
|
64
64
|
return function() {
|
|
65
65
|
return t.apply(e, arguments);
|
|
@@ -207,10 +207,10 @@ const i2 = (t, e, n, { allOwnKeys: s } = {}) => (wt(e, (r, i) => {
|
|
|
207
207
|
n += e[Math.random() * s | 0];
|
|
208
208
|
return n;
|
|
209
209
|
};
|
|
210
|
-
function
|
|
210
|
+
function S2(t) {
|
|
211
211
|
return !!(t && re(t.append) && t[Symbol.toStringTag] === "FormData" && t[Symbol.iterator]);
|
|
212
212
|
}
|
|
213
|
-
const
|
|
213
|
+
const k2 = (t) => {
|
|
214
214
|
const e = new Array(10), n = (s, r) => {
|
|
215
215
|
if (rn(s)) {
|
|
216
216
|
if (e.indexOf(s) >= 0)
|
|
@@ -287,8 +287,8 @@ const S2 = (t) => {
|
|
|
287
287
|
isContextDefined: Ar,
|
|
288
288
|
ALPHABET: Ir,
|
|
289
289
|
generateString: T2,
|
|
290
|
-
isSpecCompliantForm:
|
|
291
|
-
toJSONObject:
|
|
290
|
+
isSpecCompliantForm: S2,
|
|
291
|
+
toJSONObject: k2,
|
|
292
292
|
isAsyncFn: E2,
|
|
293
293
|
isThenable: O2,
|
|
294
294
|
setImmediate: Mr,
|
|
@@ -369,8 +369,8 @@ function on(t, e, n) {
|
|
|
369
369
|
metaTokens: !0,
|
|
370
370
|
dots: !1,
|
|
371
371
|
indexes: !1
|
|
372
|
-
}, !1, function(
|
|
373
|
-
return !h.isUndefined(w[
|
|
372
|
+
}, !1, function(S, w) {
|
|
373
|
+
return !h.isUndefined(w[S]);
|
|
374
374
|
});
|
|
375
375
|
const s = n.metaTokens, r = n.visitor || c, i = n.dots, o = n.indexes, l = (n.Blob || typeof Blob < "u" && Blob) && h.isSpecCompliantForm(e);
|
|
376
376
|
if (!h.isFunction(r))
|
|
@@ -383,39 +383,39 @@ function on(t, e, n) {
|
|
|
383
383
|
throw new O("Blob is not supported. Use a Buffer instead.");
|
|
384
384
|
return h.isArrayBuffer(d) || h.isTypedArray(d) ? l && typeof Blob == "function" ? new Blob([d]) : Buffer.from(d) : d;
|
|
385
385
|
}
|
|
386
|
-
function c(d,
|
|
386
|
+
function c(d, S, w) {
|
|
387
387
|
let C = d;
|
|
388
388
|
if (d && !w && typeof d == "object") {
|
|
389
|
-
if (h.endsWith(
|
|
390
|
-
|
|
391
|
-
else if (h.isArray(d) && x2(d) || (h.isFileList(d) || h.endsWith(
|
|
392
|
-
return
|
|
389
|
+
if (h.endsWith(S, "{}"))
|
|
390
|
+
S = s ? S : S.slice(0, -2), d = JSON.stringify(d);
|
|
391
|
+
else if (h.isArray(d) && x2(d) || (h.isFileList(d) || h.endsWith(S, "[]")) && (C = h.toArray(d)))
|
|
392
|
+
return S = Fr(S), C.forEach(function(B, ee) {
|
|
393
393
|
!(h.isUndefined(B) || B === null) && e.append(
|
|
394
394
|
// eslint-disable-next-line no-nested-ternary
|
|
395
|
-
o === !0 ? _s([
|
|
395
|
+
o === !0 ? _s([S], ee, i) : o === null ? S : S + "[]",
|
|
396
396
|
u(B)
|
|
397
397
|
);
|
|
398
398
|
}), !1;
|
|
399
399
|
}
|
|
400
|
-
return Vn(d) ? !0 : (e.append(_s(w,
|
|
400
|
+
return Vn(d) ? !0 : (e.append(_s(w, S, i), u(d)), !1);
|
|
401
401
|
}
|
|
402
402
|
const f = [], p = Object.assign(N2, {
|
|
403
403
|
defaultVisitor: c,
|
|
404
404
|
convertValue: u,
|
|
405
405
|
isVisitable: Vn
|
|
406
406
|
});
|
|
407
|
-
function g(d,
|
|
407
|
+
function g(d, S) {
|
|
408
408
|
if (!h.isUndefined(d)) {
|
|
409
409
|
if (f.indexOf(d) !== -1)
|
|
410
|
-
throw Error("Circular reference detected in " +
|
|
410
|
+
throw Error("Circular reference detected in " + S.join("."));
|
|
411
411
|
f.push(d), h.forEach(d, function(C, _) {
|
|
412
412
|
(!(h.isUndefined(C) || C === null) && r.call(
|
|
413
413
|
e,
|
|
414
414
|
C,
|
|
415
415
|
h.isString(_) ? _.trim() : _,
|
|
416
|
-
|
|
416
|
+
S,
|
|
417
417
|
p
|
|
418
|
-
)) === !0 && g(C,
|
|
418
|
+
)) === !0 && g(C, S ? S.concat(_) : [_]);
|
|
419
419
|
}), f.pop();
|
|
420
420
|
}
|
|
421
421
|
}
|
|
@@ -1069,7 +1069,7 @@ const zr = (t) => {
|
|
|
1069
1069
|
let i = r.data;
|
|
1070
1070
|
const o = te.from(r.headers).normalize();
|
|
1071
1071
|
let { responseType: a, onUploadProgress: l, onDownloadProgress: u } = r, c, f, p, g, d;
|
|
1072
|
-
function
|
|
1072
|
+
function S() {
|
|
1073
1073
|
g && g(), d && d(), r.cancelToken && r.cancelToken.unsubscribe(c), r.signal && r.signal.removeEventListener("abort", c);
|
|
1074
1074
|
}
|
|
1075
1075
|
let w = new XMLHttpRequest();
|
|
@@ -1088,9 +1088,9 @@ const zr = (t) => {
|
|
|
1088
1088
|
request: w
|
|
1089
1089
|
};
|
|
1090
1090
|
qr(function(he) {
|
|
1091
|
-
n(he),
|
|
1091
|
+
n(he), S();
|
|
1092
1092
|
}, function(he) {
|
|
1093
|
-
s(he),
|
|
1093
|
+
s(he), S();
|
|
1094
1094
|
}, H), w = null;
|
|
1095
1095
|
}
|
|
1096
1096
|
"onloadend" in w ? w.onloadend = C : w.onreadystatechange = function() {
|
|
@@ -1260,7 +1260,7 @@ const ca = async (t) => {
|
|
|
1260
1260
|
} = zr(t);
|
|
1261
1261
|
u = u ? (u + "").toLowerCase() : "text";
|
|
1262
1262
|
let g = ra([r, i && i.toAbortSignal()], o), d;
|
|
1263
|
-
const
|
|
1263
|
+
const S = g && g.unsubscribe && (() => {
|
|
1264
1264
|
g.unsubscribe();
|
|
1265
1265
|
});
|
|
1266
1266
|
let w;
|
|
@@ -1292,7 +1292,7 @@ const ca = async (t) => {
|
|
|
1292
1292
|
});
|
|
1293
1293
|
let _ = await fetch(d);
|
|
1294
1294
|
const B = $n && (u === "stream" || u === "response");
|
|
1295
|
-
if ($n && (a || B &&
|
|
1295
|
+
if ($n && (a || B && S)) {
|
|
1296
1296
|
const H = {};
|
|
1297
1297
|
["status", "statusText", "headers"].forEach((ne) => {
|
|
1298
1298
|
H[ne] = _[ne];
|
|
@@ -1303,14 +1303,14 @@ const ca = async (t) => {
|
|
|
1303
1303
|
) || [];
|
|
1304
1304
|
_ = new Response(
|
|
1305
1305
|
Ms(_.body, Ds, he, () => {
|
|
1306
|
-
P && P(),
|
|
1306
|
+
P && P(), S && S();
|
|
1307
1307
|
}),
|
|
1308
1308
|
H
|
|
1309
1309
|
);
|
|
1310
1310
|
}
|
|
1311
1311
|
u = u || "text";
|
|
1312
1312
|
let ee = await Jt[h.findKey(Jt, u) || "text"](_, t);
|
|
1313
|
-
return !B &&
|
|
1313
|
+
return !B && S && S(), await new Promise((H, Y) => {
|
|
1314
1314
|
qr(H, Y, {
|
|
1315
1315
|
data: ee,
|
|
1316
1316
|
headers: te.from(_.headers),
|
|
@@ -1321,7 +1321,7 @@ const ca = async (t) => {
|
|
|
1321
1321
|
});
|
|
1322
1322
|
});
|
|
1323
1323
|
} catch (C) {
|
|
1324
|
-
throw
|
|
1324
|
+
throw S && S(), C && C.name === "TypeError" && /fetch/i.test(C.message) ? Object.assign(
|
|
1325
1325
|
new O("Network Error", O.ERR_NETWORK, t, d),
|
|
1326
1326
|
{
|
|
1327
1327
|
cause: C.cause || C
|
|
@@ -1373,22 +1373,22 @@ const Ls = (t) => `- ${t}`, da = (t) => h.isFunction(t) || t === null || t === !
|
|
|
1373
1373
|
},
|
|
1374
1374
|
adapters: Pn
|
|
1375
1375
|
};
|
|
1376
|
-
function
|
|
1376
|
+
function Sn(t) {
|
|
1377
1377
|
if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
|
|
1378
1378
|
throw new et(null, t);
|
|
1379
1379
|
}
|
|
1380
1380
|
function Fs(t) {
|
|
1381
|
-
return
|
|
1381
|
+
return Sn(t), t.headers = te.from(t.headers), t.data = Tn.call(
|
|
1382
1382
|
t,
|
|
1383
1383
|
t.transformRequest
|
|
1384
1384
|
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), jr.getAdapter(t.adapter || vt.adapter)(t).then(function(s) {
|
|
1385
|
-
return
|
|
1385
|
+
return Sn(t), s.data = Tn.call(
|
|
1386
1386
|
t,
|
|
1387
1387
|
t.transformResponse,
|
|
1388
1388
|
s
|
|
1389
1389
|
), s.headers = te.from(s.headers), s;
|
|
1390
1390
|
}, function(s) {
|
|
1391
|
-
return Pr(s) || (
|
|
1391
|
+
return Pr(s) || (Sn(t), s && s.response && (s.response.data = Tn.call(
|
|
1392
1392
|
t,
|
|
1393
1393
|
t.transformResponse,
|
|
1394
1394
|
s.response
|
|
@@ -1504,12 +1504,12 @@ let $e = class {
|
|
|
1504
1504
|
), n.headers = te.concat(o, i);
|
|
1505
1505
|
const a = [];
|
|
1506
1506
|
let l = !0;
|
|
1507
|
-
this.interceptors.request.forEach(function(
|
|
1508
|
-
typeof
|
|
1507
|
+
this.interceptors.request.forEach(function(S) {
|
|
1508
|
+
typeof S.runWhen == "function" && S.runWhen(n) === !1 || (l = l && S.synchronous, a.unshift(S.fulfilled, S.rejected));
|
|
1509
1509
|
});
|
|
1510
1510
|
const u = [];
|
|
1511
|
-
this.interceptors.response.forEach(function(
|
|
1512
|
-
u.push(
|
|
1511
|
+
this.interceptors.response.forEach(function(S) {
|
|
1512
|
+
u.push(S.fulfilled, S.rejected);
|
|
1513
1513
|
});
|
|
1514
1514
|
let c, f = 0, p;
|
|
1515
1515
|
if (!l) {
|
|
@@ -1521,11 +1521,11 @@ let $e = class {
|
|
|
1521
1521
|
p = a.length;
|
|
1522
1522
|
let g = n;
|
|
1523
1523
|
for (f = 0; f < p; ) {
|
|
1524
|
-
const d = a[f++],
|
|
1524
|
+
const d = a[f++], S = a[f++];
|
|
1525
1525
|
try {
|
|
1526
1526
|
g = d(g);
|
|
1527
1527
|
} catch (w) {
|
|
1528
|
-
|
|
1528
|
+
S.call(this, w);
|
|
1529
1529
|
break;
|
|
1530
1530
|
}
|
|
1531
1531
|
}
|
|
@@ -1852,16 +1852,16 @@ function Ta(t) {
|
|
|
1852
1852
|
function Kr(t) {
|
|
1853
1853
|
return typeof t == "function" ? t() : Fe(t);
|
|
1854
1854
|
}
|
|
1855
|
-
const
|
|
1855
|
+
const Sa = typeof window < "u" && typeof document < "u";
|
|
1856
1856
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
1857
|
-
const
|
|
1857
|
+
const ka = (t) => t != null, kn = () => {
|
|
1858
1858
|
};
|
|
1859
1859
|
function En(t) {
|
|
1860
1860
|
var e;
|
|
1861
1861
|
const n = Kr(t);
|
|
1862
1862
|
return (e = n == null ? void 0 : n.$el) != null ? e : n;
|
|
1863
1863
|
}
|
|
1864
|
-
const Ea =
|
|
1864
|
+
const Ea = Sa ? window : void 0;
|
|
1865
1865
|
function Oa() {
|
|
1866
1866
|
const t = U(!1), e = To();
|
|
1867
1867
|
return e && ns(() => {
|
|
@@ -1881,28 +1881,28 @@ function Ca(t, e, n = {}) {
|
|
|
1881
1881
|
immediate: a = !0
|
|
1882
1882
|
} = n, l = _a(() => o && "IntersectionObserver" in o), u = en(() => {
|
|
1883
1883
|
const d = Kr(t);
|
|
1884
|
-
return (Array.isArray(d) ? d : [d]).map(En).filter(
|
|
1884
|
+
return (Array.isArray(d) ? d : [d]).map(En).filter(ka);
|
|
1885
1885
|
});
|
|
1886
|
-
let c =
|
|
1886
|
+
let c = kn;
|
|
1887
1887
|
const f = U(a), p = l.value ? ts(
|
|
1888
1888
|
() => [u.value, En(s), f.value],
|
|
1889
|
-
([d,
|
|
1889
|
+
([d, S]) => {
|
|
1890
1890
|
if (c(), !f.value || !d.length)
|
|
1891
1891
|
return;
|
|
1892
1892
|
const w = new IntersectionObserver(
|
|
1893
1893
|
e,
|
|
1894
1894
|
{
|
|
1895
|
-
root: En(
|
|
1895
|
+
root: En(S),
|
|
1896
1896
|
rootMargin: r,
|
|
1897
1897
|
threshold: i
|
|
1898
1898
|
}
|
|
1899
1899
|
);
|
|
1900
1900
|
d.forEach((C) => C && w.observe(C)), c = () => {
|
|
1901
|
-
w.disconnect(), c =
|
|
1901
|
+
w.disconnect(), c = kn;
|
|
1902
1902
|
};
|
|
1903
1903
|
},
|
|
1904
1904
|
{ immediate: a, flush: "post" }
|
|
1905
|
-
) :
|
|
1905
|
+
) : kn, g = () => {
|
|
1906
1906
|
c(), p(), f.value = !1;
|
|
1907
1907
|
};
|
|
1908
1908
|
return Ta(g), {
|
|
@@ -2434,7 +2434,7 @@ function Wa(t, e, n) {
|
|
|
2434
2434
|
function za(t) {
|
|
2435
2435
|
const e = [];
|
|
2436
2436
|
for (let n = 1; n <= 12; n++) {
|
|
2437
|
-
const s =
|
|
2437
|
+
const s = k.utc(2009, n, 1);
|
|
2438
2438
|
e.push(t(s));
|
|
2439
2439
|
}
|
|
2440
2440
|
return e;
|
|
@@ -2442,7 +2442,7 @@ function za(t) {
|
|
|
2442
2442
|
function Ha(t) {
|
|
2443
2443
|
const e = [];
|
|
2444
2444
|
for (let n = 1; n <= 7; n++) {
|
|
2445
|
-
const s =
|
|
2445
|
+
const s = k.utc(2016, 11, 13 + n);
|
|
2446
2446
|
e.push(t(s));
|
|
2447
2447
|
}
|
|
2448
2448
|
return e;
|
|
@@ -2593,7 +2593,7 @@ class L {
|
|
|
2593
2593
|
() => {
|
|
2594
2594
|
if (!this.meridiemCache) {
|
|
2595
2595
|
const e = { hour: "numeric", hourCycle: "h12" };
|
|
2596
|
-
this.meridiemCache = [
|
|
2596
|
+
this.meridiemCache = [k.utc(2016, 11, 13, 9), k.utc(2016, 11, 13, 19)].map(
|
|
2597
2597
|
(n) => this.extract(n, e, "dayperiod")
|
|
2598
2598
|
);
|
|
2599
2599
|
}
|
|
@@ -2604,7 +2604,7 @@ class L {
|
|
|
2604
2604
|
eras(e) {
|
|
2605
2605
|
return xt(this, e, Di, () => {
|
|
2606
2606
|
const n = { era: e };
|
|
2607
|
-
return this.eraCache[e] || (this.eraCache[e] = [
|
|
2607
|
+
return this.eraCache[e] || (this.eraCache[e] = [k.utc(-40, 1, 1), k.utc(2017, 1, 1)].map(
|
|
2608
2608
|
(s) => this.extract(s, n, "era")
|
|
2609
2609
|
)), this.eraCache[e];
|
|
2610
2610
|
});
|
|
@@ -3020,7 +3020,7 @@ class $ {
|
|
|
3020
3020
|
* @return {void}
|
|
3021
3021
|
*/
|
|
3022
3022
|
static resetCaches() {
|
|
3023
|
-
L.resetCache(), Oe.resetCache(),
|
|
3023
|
+
L.resetCache(), Oe.resetCache(), k.resetCache(), e0();
|
|
3024
3024
|
}
|
|
3025
3025
|
}
|
|
3026
3026
|
class ye {
|
|
@@ -3045,10 +3045,10 @@ function ls(t, e, n) {
|
|
|
3045
3045
|
return r === 0 ? 7 : r;
|
|
3046
3046
|
}
|
|
3047
3047
|
function bi(t, e, n) {
|
|
3048
|
-
return n + (
|
|
3048
|
+
return n + (St(t) ? vi : wi)[e - 1];
|
|
3049
3049
|
}
|
|
3050
3050
|
function Ti(t, e) {
|
|
3051
|
-
const n =
|
|
3051
|
+
const n = St(t) ? vi : wi, s = n.findIndex((i) => i < e), r = e - n[s];
|
|
3052
3052
|
return { month: s + 1, day: r };
|
|
3053
3053
|
}
|
|
3054
3054
|
function us(t, e) {
|
|
@@ -3099,11 +3099,11 @@ function n0(t) {
|
|
|
3099
3099
|
const e = cn(t.year), n = fe(t.ordinal, 1, Je(t.year));
|
|
3100
3100
|
return e ? n ? !1 : ce("ordinal", t.ordinal) : ce("year", t.year);
|
|
3101
3101
|
}
|
|
3102
|
-
function
|
|
3102
|
+
function Si(t) {
|
|
3103
3103
|
const e = cn(t.year), n = fe(t.month, 1, 12), s = fe(t.day, 1, Qt(t.year, t.month));
|
|
3104
3104
|
return e ? n ? s ? !1 : ce("day", t.day) : ce("month", t.month) : ce("year", t.year);
|
|
3105
3105
|
}
|
|
3106
|
-
function
|
|
3106
|
+
function ki(t) {
|
|
3107
3107
|
const { hour: e, minute: n, second: s, millisecond: r } = t, i = fe(e, 0, 23) || e === 24 && n === 0 && s === 0 && r === 0, o = fe(n, 0, 59), a = fe(s, 0, 59), l = fe(r, 0, 999);
|
|
3108
3108
|
return i ? o ? a ? l ? !1 : ce("millisecond", r) : ce("second", s) : ce("minute", n) : ce("hour", e);
|
|
3109
3109
|
}
|
|
@@ -3194,15 +3194,15 @@ function fs(t, e, n = !1) {
|
|
|
3194
3194
|
const s = 10 ** e;
|
|
3195
3195
|
return (n ? Math.trunc : Math.round)(t * s) / s;
|
|
3196
3196
|
}
|
|
3197
|
-
function
|
|
3197
|
+
function St(t) {
|
|
3198
3198
|
return t % 4 === 0 && (t % 100 !== 0 || t % 400 === 0);
|
|
3199
3199
|
}
|
|
3200
3200
|
function Je(t) {
|
|
3201
|
-
return
|
|
3201
|
+
return St(t) ? 366 : 365;
|
|
3202
3202
|
}
|
|
3203
3203
|
function Qt(t, e) {
|
|
3204
3204
|
const n = a0(e - 1, 12) + 1, s = t + (e - n) / 12;
|
|
3205
|
-
return n === 2 ?
|
|
3205
|
+
return n === 2 ? St(s) ? 29 : 28 : [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][n - 1];
|
|
3206
3206
|
}
|
|
3207
3207
|
function fn(t) {
|
|
3208
3208
|
let e = Date.UTC(
|
|
@@ -3665,7 +3665,7 @@ function Fi(...t) {
|
|
|
3665
3665
|
return [s, null, n + r];
|
|
3666
3666
|
};
|
|
3667
3667
|
}
|
|
3668
|
-
const Bi = /(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/, b0 = `(?:${Bi.source}?(?:\\[(${Li.source})\\])?)?`, hs = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/, Vi = RegExp(`${hs.source}${b0}`), ds = RegExp(`(?:T${Vi.source})?`), T0 = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,
|
|
3668
|
+
const Bi = /(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/, b0 = `(?:${Bi.source}?(?:\\[(${Li.source})\\])?)?`, hs = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/, Vi = RegExp(`${hs.source}${b0}`), ds = RegExp(`(?:T${Vi.source})?`), T0 = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/, S0 = /(\d{4})-?W(\d\d)(?:-?(\d))?/, k0 = /(\d{4})-?(\d{3})/, E0 = Fi("weekYear", "weekNumber", "weekDay"), O0 = Fi("year", "ordinal"), _0 = /(\d{4})-(\d\d)-(\d\d)/, Ui = RegExp(
|
|
3669
3669
|
`${hs.source} ?(?:${Bi.source}|(${Li.source}))?`
|
|
3670
3670
|
), C0 = RegExp(`(?: ${Ui.source})?`);
|
|
3671
3671
|
function Ge(t, e, n) {
|
|
@@ -3687,7 +3687,7 @@ function rt(t, e) {
|
|
|
3687
3687
|
milliseconds: cs(t[e + 3])
|
|
3688
3688
|
}, null, e + 4];
|
|
3689
3689
|
}
|
|
3690
|
-
function
|
|
3690
|
+
function kt(t, e) {
|
|
3691
3691
|
const n = !t[e] && !t[e + 1], s = hn(t[e + 1], t[e + 2]), r = n ? null : X.instance(s);
|
|
3692
3692
|
return [{}, r, e + 3];
|
|
3693
3693
|
}
|
|
@@ -3763,24 +3763,24 @@ function U0(t) {
|
|
|
3763
3763
|
const [, e, n, s, r, i, o, a] = t;
|
|
3764
3764
|
return [ms(e, a, n, s, r, i, o), X.utcInstance];
|
|
3765
3765
|
}
|
|
3766
|
-
const $0 = tt(T0, ds), P0 = tt(
|
|
3766
|
+
const $0 = tt(T0, ds), P0 = tt(S0, ds), q0 = tt(k0, ds), W0 = tt(Vi), $i = nt(
|
|
3767
3767
|
x0,
|
|
3768
3768
|
rt,
|
|
3769
|
-
|
|
3769
|
+
kt,
|
|
3770
3770
|
Et
|
|
3771
3771
|
), z0 = nt(
|
|
3772
3772
|
E0,
|
|
3773
3773
|
rt,
|
|
3774
|
-
|
|
3774
|
+
kt,
|
|
3775
3775
|
Et
|
|
3776
3776
|
), H0 = nt(
|
|
3777
3777
|
O0,
|
|
3778
3778
|
rt,
|
|
3779
|
-
|
|
3779
|
+
kt,
|
|
3780
3780
|
Et
|
|
3781
3781
|
), Z0 = nt(
|
|
3782
3782
|
rt,
|
|
3783
|
-
|
|
3783
|
+
kt,
|
|
3784
3784
|
Et
|
|
3785
3785
|
);
|
|
3786
3786
|
function j0(t) {
|
|
@@ -3812,7 +3812,7 @@ function Q0(t) {
|
|
|
3812
3812
|
}
|
|
3813
3813
|
const X0 = tt(_0, C0), el = tt(Ui), tl = nt(
|
|
3814
3814
|
rt,
|
|
3815
|
-
|
|
3815
|
+
kt,
|
|
3816
3816
|
Et
|
|
3817
3817
|
);
|
|
3818
3818
|
function nl(t) {
|
|
@@ -4225,7 +4225,7 @@ class I {
|
|
|
4225
4225
|
format: "extended",
|
|
4226
4226
|
...e,
|
|
4227
4227
|
includeOffset: !1
|
|
4228
|
-
},
|
|
4228
|
+
}, k.fromMillis(n, { zone: "UTC" }).toISOTime(e));
|
|
4229
4229
|
}
|
|
4230
4230
|
/**
|
|
4231
4231
|
* Returns an ISO 8601 representation of this Duration appropriate for use in JSON.
|
|
@@ -4603,13 +4603,13 @@ class V {
|
|
|
4603
4603
|
if (s && r) {
|
|
4604
4604
|
let i, o;
|
|
4605
4605
|
try {
|
|
4606
|
-
i =
|
|
4606
|
+
i = k.fromISO(s, n), o = i.isValid;
|
|
4607
4607
|
} catch {
|
|
4608
4608
|
o = !1;
|
|
4609
4609
|
}
|
|
4610
4610
|
let a, l;
|
|
4611
4611
|
try {
|
|
4612
|
-
a =
|
|
4612
|
+
a = k.fromISO(r, n), l = a.isValid;
|
|
4613
4613
|
} catch {
|
|
4614
4614
|
l = !1;
|
|
4615
4615
|
}
|
|
@@ -4992,7 +4992,7 @@ class Nt {
|
|
|
4992
4992
|
* @return {boolean}
|
|
4993
4993
|
*/
|
|
4994
4994
|
static hasDST(e = $.defaultZone) {
|
|
4995
|
-
const n =
|
|
4995
|
+
const n = k.now().setZone(e).set({ month: 12 });
|
|
4996
4996
|
return !e.isUniversal && n.offset !== n.set({ month: 6 }).offset;
|
|
4997
4997
|
}
|
|
4998
4998
|
/**
|
|
@@ -5215,7 +5215,7 @@ function dl(t) {
|
|
|
5215
5215
|
return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
|
|
5216
5216
|
}
|
|
5217
5217
|
function ml(t, e) {
|
|
5218
|
-
const n = de(e), s = de(e, "{2}"), r = de(e, "{3}"), i = de(e, "{4}"), o = de(e, "{6}"), a = de(e, "{1,2}"), l = de(e, "{1,3}"), u = de(e, "{1,6}"), c = de(e, "{1,9}"), f = de(e, "{2,4}"), p = de(e, "{4,6}"), g = (w) => ({ regex: RegExp(dl(w.val)), deser: ([C]) => C, literal: !0 }),
|
|
5218
|
+
const n = de(e), s = de(e, "{2}"), r = de(e, "{3}"), i = de(e, "{4}"), o = de(e, "{6}"), a = de(e, "{1,2}"), l = de(e, "{1,3}"), u = de(e, "{1,6}"), c = de(e, "{1,9}"), f = de(e, "{2,4}"), p = de(e, "{4,6}"), g = (w) => ({ regex: RegExp(dl(w.val)), deser: ([C]) => C, literal: !0 }), S = ((w) => {
|
|
5219
5219
|
if (t.literal)
|
|
5220
5220
|
return g(w);
|
|
5221
5221
|
switch (w.val) {
|
|
@@ -5323,7 +5323,7 @@ function ml(t, e) {
|
|
|
5323
5323
|
})(t) || {
|
|
5324
5324
|
invalidReason: cl
|
|
5325
5325
|
};
|
|
5326
|
-
return
|
|
5326
|
+
return S.token = t, S;
|
|
5327
5327
|
}
|
|
5328
5328
|
const pl = {
|
|
5329
5329
|
year: {
|
|
@@ -5445,7 +5445,7 @@ function vl(t) {
|
|
|
5445
5445
|
}
|
|
5446
5446
|
let xn = null;
|
|
5447
5447
|
function bl() {
|
|
5448
|
-
return xn || (xn =
|
|
5448
|
+
return xn || (xn = k.fromMillis(1555555555555)), xn;
|
|
5449
5449
|
}
|
|
5450
5450
|
function Tl(t, e) {
|
|
5451
5451
|
if (t.literal)
|
|
@@ -5493,7 +5493,7 @@ class Zi {
|
|
|
5493
5493
|
function ji(t, e, n) {
|
|
5494
5494
|
return new Zi(t, n).explainFromTokens(e);
|
|
5495
5495
|
}
|
|
5496
|
-
function
|
|
5496
|
+
function Sl(t, e, n) {
|
|
5497
5497
|
const { result: s, zone: r, specificOffset: i, invalidReason: o } = ji(t, e, n);
|
|
5498
5498
|
return [s, r, i, o];
|
|
5499
5499
|
}
|
|
@@ -5503,7 +5503,7 @@ function Yi(t, e) {
|
|
|
5503
5503
|
const s = K.create(e, t).dtFormatter(bl()), r = s.formatToParts(), i = s.resolvedOptions();
|
|
5504
5504
|
return r.map((o) => yl(o, t, i));
|
|
5505
5505
|
}
|
|
5506
|
-
const Nn = "Invalid DateTime",
|
|
5506
|
+
const Nn = "Invalid DateTime", kl = 864e13;
|
|
5507
5507
|
function ft(t) {
|
|
5508
5508
|
return new ye("unsupported zone", `the zone "${t.name}" is not supported`);
|
|
5509
5509
|
}
|
|
@@ -5526,7 +5526,7 @@ function Le(t, e) {
|
|
|
5526
5526
|
loc: t.loc,
|
|
5527
5527
|
invalid: t.invalid
|
|
5528
5528
|
};
|
|
5529
|
-
return new
|
|
5529
|
+
return new k({ ...n, ...e, old: n });
|
|
5530
5530
|
}
|
|
5531
5531
|
function Ji(t, e, n) {
|
|
5532
5532
|
let s = t - e * 60 * 1e3;
|
|
@@ -5576,14 +5576,14 @@ function ur(t, e) {
|
|
|
5576
5576
|
function He(t, e, n, s, r, i) {
|
|
5577
5577
|
const { setZone: o, zone: a } = n;
|
|
5578
5578
|
if (t && Object.keys(t).length !== 0 || e) {
|
|
5579
|
-
const l = e || a, u =
|
|
5579
|
+
const l = e || a, u = k.fromObject(t, {
|
|
5580
5580
|
...n,
|
|
5581
5581
|
zone: l,
|
|
5582
5582
|
specificOffset: i
|
|
5583
5583
|
});
|
|
5584
5584
|
return o ? u : u.setZone(a);
|
|
5585
5585
|
} else
|
|
5586
|
-
return
|
|
5586
|
+
return k.invalid(
|
|
5587
5587
|
new ye("unparsable", `the input "${r}" can't be parsed as ${s}`)
|
|
5588
5588
|
);
|
|
5589
5589
|
}
|
|
@@ -5682,7 +5682,7 @@ function Nl(t) {
|
|
|
5682
5682
|
function hr(t, e) {
|
|
5683
5683
|
const n = Ae(e.zone, $.defaultZone);
|
|
5684
5684
|
if (!n.isValid)
|
|
5685
|
-
return
|
|
5685
|
+
return k.invalid(ft(n));
|
|
5686
5686
|
const s = L.fromObject(e);
|
|
5687
5687
|
let r, i;
|
|
5688
5688
|
if (E(t.year))
|
|
@@ -5690,13 +5690,13 @@ function hr(t, e) {
|
|
|
5690
5690
|
else {
|
|
5691
5691
|
for (const l of Ki)
|
|
5692
5692
|
E(t[l]) && (t[l] = Gi[l]);
|
|
5693
|
-
const o =
|
|
5693
|
+
const o = Si(t) || ki(t);
|
|
5694
5694
|
if (o)
|
|
5695
|
-
return
|
|
5695
|
+
return k.invalid(o);
|
|
5696
5696
|
const a = Nl(n);
|
|
5697
5697
|
[r, i] = Ut(t, a, n);
|
|
5698
5698
|
}
|
|
5699
|
-
return new
|
|
5699
|
+
return new k({ ts: r, zone: n, loc: s, o: i });
|
|
5700
5700
|
}
|
|
5701
5701
|
function dr(t, e, n) {
|
|
5702
5702
|
const s = E(n.round) ? !0 : n.round, r = (o, a) => (o = fs(o, s || n.calendary ? 0 : 2, !0), e.loc.clone(n).relFormatter(n).format(o, a)), i = (o) => n.calendary ? e.hasSame(t, o) ? 0 : e.startOf(o).diff(t.startOf(o), o).get(o) : e.diff(t, o).get(o);
|
|
@@ -5714,7 +5714,7 @@ function mr(t) {
|
|
|
5714
5714
|
return t.length > 0 && typeof t[t.length - 1] == "object" ? (e = t[t.length - 1], n = Array.from(t).slice(0, t.length - 1)) : n = Array.from(t), [e, n];
|
|
5715
5715
|
}
|
|
5716
5716
|
let $t, Pt = {};
|
|
5717
|
-
class
|
|
5717
|
+
class k {
|
|
5718
5718
|
/**
|
|
5719
5719
|
* @access private
|
|
5720
5720
|
*/
|
|
@@ -5741,7 +5741,7 @@ class S {
|
|
|
5741
5741
|
* @return {DateTime}
|
|
5742
5742
|
*/
|
|
5743
5743
|
static now() {
|
|
5744
|
-
return new
|
|
5744
|
+
return new k({});
|
|
5745
5745
|
}
|
|
5746
5746
|
/**
|
|
5747
5747
|
* Create a local DateTime
|
|
@@ -5807,13 +5807,13 @@ class S {
|
|
|
5807
5807
|
static fromJSDate(e, n = {}) {
|
|
5808
5808
|
const s = r0(e) ? e.valueOf() : NaN;
|
|
5809
5809
|
if (Number.isNaN(s))
|
|
5810
|
-
return
|
|
5810
|
+
return k.invalid("invalid input");
|
|
5811
5811
|
const r = Ae(n.zone, $.defaultZone);
|
|
5812
|
-
return r.isValid ? new
|
|
5812
|
+
return r.isValid ? new k({
|
|
5813
5813
|
ts: s,
|
|
5814
5814
|
zone: r,
|
|
5815
5815
|
loc: L.fromObject(n)
|
|
5816
|
-
}) :
|
|
5816
|
+
}) : k.invalid(ft(r));
|
|
5817
5817
|
}
|
|
5818
5818
|
/**
|
|
5819
5819
|
* Create a DateTime from a number of milliseconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.
|
|
@@ -5828,7 +5828,7 @@ class S {
|
|
|
5828
5828
|
*/
|
|
5829
5829
|
static fromMillis(e, n = {}) {
|
|
5830
5830
|
if (Re(e))
|
|
5831
|
-
return e < -864e13 || e >
|
|
5831
|
+
return e < -864e13 || e > kl ? k.invalid("Timestamp out of range") : new k({
|
|
5832
5832
|
ts: e,
|
|
5833
5833
|
zone: Ae(n.zone, $.defaultZone),
|
|
5834
5834
|
loc: L.fromObject(n)
|
|
@@ -5850,7 +5850,7 @@ class S {
|
|
|
5850
5850
|
*/
|
|
5851
5851
|
static fromSeconds(e, n = {}) {
|
|
5852
5852
|
if (Re(e))
|
|
5853
|
-
return new
|
|
5853
|
+
return new k({
|
|
5854
5854
|
ts: e * 1e3,
|
|
5855
5855
|
zone: Ae(n.zone, $.defaultZone),
|
|
5856
5856
|
loc: L.fromObject(n)
|
|
@@ -5894,7 +5894,7 @@ class S {
|
|
|
5894
5894
|
e = e || {};
|
|
5895
5895
|
const s = Ae(n.zone, $.defaultZone);
|
|
5896
5896
|
if (!s.isValid)
|
|
5897
|
-
return
|
|
5897
|
+
return k.invalid(ft(s));
|
|
5898
5898
|
const r = L.fromObject(n), i = Xt(e, fr), { minDaysInFirstWeek: o, startOfWeek: a } = Xs(i, r), l = $.now(), u = E(n.specificOffset) ? s.offset(l) : n.specificOffset, c = !E(i.ordinal), f = !E(i.year), p = !E(i.month) || !E(i.day), g = f || p, d = i.weekYear || i.weekNumber;
|
|
5899
5899
|
if ((g || c) && d)
|
|
5900
5900
|
throw new je(
|
|
@@ -5902,27 +5902,27 @@ class S {
|
|
|
5902
5902
|
);
|
|
5903
5903
|
if (p && c)
|
|
5904
5904
|
throw new je("Can't mix ordinal dates with month/day");
|
|
5905
|
-
const
|
|
5905
|
+
const S = d || i.weekday && !g;
|
|
5906
5906
|
let w, C, _ = Rt(l, u);
|
|
5907
|
-
|
|
5907
|
+
S ? (w = _l, C = El, _ = Kt(_, o, a)) : c ? (w = Cl, C = Ol, _ = Cn(_)) : (w = Ki, C = Gi);
|
|
5908
5908
|
let B = !1;
|
|
5909
5909
|
for (const Q of w) {
|
|
5910
5910
|
const ve = i[Q];
|
|
5911
5911
|
E(ve) ? B ? i[Q] = C[Q] : i[Q] = _[Q] : B = !0;
|
|
5912
5912
|
}
|
|
5913
|
-
const ee =
|
|
5913
|
+
const ee = S ? t0(i, o, a) : c ? n0(i) : Si(i), H = ee || ki(i);
|
|
5914
5914
|
if (H)
|
|
5915
|
-
return
|
|
5916
|
-
const Y =
|
|
5915
|
+
return k.invalid(H);
|
|
5916
|
+
const Y = S ? Ks(i, o, a) : c ? Qs(i) : i, [he, P] = Ut(Y, u, s), ne = new k({
|
|
5917
5917
|
ts: he,
|
|
5918
5918
|
zone: s,
|
|
5919
5919
|
o: P,
|
|
5920
5920
|
loc: r
|
|
5921
5921
|
});
|
|
5922
|
-
return i.weekday && g && e.weekday !== ne.weekday ?
|
|
5922
|
+
return i.weekday && g && e.weekday !== ne.weekday ? k.invalid(
|
|
5923
5923
|
"mismatched weekday",
|
|
5924
5924
|
`you can't specify both a weekday of ${i.weekday} and a date of ${ne.toISO()}`
|
|
5925
|
-
) : ne.isValid ? ne :
|
|
5925
|
+
) : ne.isValid ? ne : k.invalid(ne.invalid);
|
|
5926
5926
|
}
|
|
5927
5927
|
/**
|
|
5928
5928
|
* Create a DateTime from an ISO 8601 string
|
|
@@ -6005,14 +6005,14 @@ class S {
|
|
|
6005
6005
|
locale: r,
|
|
6006
6006
|
numberingSystem: i,
|
|
6007
6007
|
defaultToEN: !0
|
|
6008
|
-
}), [a, l, u, c] =
|
|
6009
|
-
return c ?
|
|
6008
|
+
}), [a, l, u, c] = Sl(o, e, n);
|
|
6009
|
+
return c ? k.invalid(c) : He(a, l, s, `format ${n}`, e, u);
|
|
6010
6010
|
}
|
|
6011
6011
|
/**
|
|
6012
6012
|
* @deprecated use fromFormat instead
|
|
6013
6013
|
*/
|
|
6014
6014
|
static fromString(e, n, s = {}) {
|
|
6015
|
-
return
|
|
6015
|
+
return k.fromFormat(e, n, s);
|
|
6016
6016
|
}
|
|
6017
6017
|
/**
|
|
6018
6018
|
* Create a DateTime from a SQL date, time, or datetime
|
|
@@ -6051,7 +6051,7 @@ class S {
|
|
|
6051
6051
|
const s = e instanceof ye ? e : new ye(e, n);
|
|
6052
6052
|
if ($.throwOnInvalid)
|
|
6053
6053
|
throw new xa(s);
|
|
6054
|
-
return new
|
|
6054
|
+
return new k({ invalid: s });
|
|
6055
6055
|
}
|
|
6056
6056
|
/**
|
|
6057
6057
|
* Check if an object is an instance of DateTime. Works across context boundaries
|
|
@@ -6393,7 +6393,7 @@ class S {
|
|
|
6393
6393
|
* @type {boolean}
|
|
6394
6394
|
*/
|
|
6395
6395
|
get isInLeapYear() {
|
|
6396
|
-
return
|
|
6396
|
+
return St(this.year);
|
|
6397
6397
|
}
|
|
6398
6398
|
/**
|
|
6399
6399
|
* Returns the number of days in this DateTime's month
|
|
@@ -6490,7 +6490,7 @@ class S {
|
|
|
6490
6490
|
}
|
|
6491
6491
|
return Le(this, { ts: r, zone: e });
|
|
6492
6492
|
} else
|
|
6493
|
-
return
|
|
6493
|
+
return k.invalid(ft(e));
|
|
6494
6494
|
}
|
|
6495
6495
|
/**
|
|
6496
6496
|
* "Set" the locale, numberingSystem, or outputCalendar. Returns a newly-constructed DateTime.
|
|
@@ -6927,7 +6927,7 @@ class S {
|
|
|
6927
6927
|
* @return {Duration}
|
|
6928
6928
|
*/
|
|
6929
6929
|
diffNow(e = "milliseconds", n = {}) {
|
|
6930
|
-
return this.diff(
|
|
6930
|
+
return this.diff(k.now(), e, n);
|
|
6931
6931
|
}
|
|
6932
6932
|
/**
|
|
6933
6933
|
* Return an Interval spanning between this DateTime and another DateTime
|
|
@@ -6983,7 +6983,7 @@ class S {
|
|
|
6983
6983
|
*/
|
|
6984
6984
|
toRelative(e = {}) {
|
|
6985
6985
|
if (!this.isValid) return null;
|
|
6986
|
-
const n = e.base ||
|
|
6986
|
+
const n = e.base || k.fromObject({}, { zone: this.zone }), s = e.padding ? this < n ? -e.padding : e.padding : 0;
|
|
6987
6987
|
let r = ["years", "months", "days", "hours", "minutes", "seconds"], i = e.unit;
|
|
6988
6988
|
return Array.isArray(e.unit) && (r = e.unit, i = void 0), dr(n, this.plus(s), {
|
|
6989
6989
|
...e,
|
|
@@ -7006,7 +7006,7 @@ class S {
|
|
|
7006
7006
|
* @example DateTime.now().minus({ days: 2 }).toRelativeCalendar() //=> "2 days ago"
|
|
7007
7007
|
*/
|
|
7008
7008
|
toRelativeCalendar(e = {}) {
|
|
7009
|
-
return this.isValid ? dr(e.base ||
|
|
7009
|
+
return this.isValid ? dr(e.base || k.fromObject({}, { zone: this.zone }), this, {
|
|
7010
7010
|
...e,
|
|
7011
7011
|
numeric: "auto",
|
|
7012
7012
|
units: ["years", "months", "days"],
|
|
@@ -7019,7 +7019,7 @@ class S {
|
|
|
7019
7019
|
* @return {DateTime} the min DateTime, or undefined if called with no argument
|
|
7020
7020
|
*/
|
|
7021
7021
|
static min(...e) {
|
|
7022
|
-
if (!e.every(
|
|
7022
|
+
if (!e.every(k.isDateTime))
|
|
7023
7023
|
throw new J("min requires all arguments be DateTimes");
|
|
7024
7024
|
return er(e, (n) => n.valueOf(), Math.min);
|
|
7025
7025
|
}
|
|
@@ -7029,7 +7029,7 @@ class S {
|
|
|
7029
7029
|
* @return {DateTime} the max DateTime, or undefined if called with no argument
|
|
7030
7030
|
*/
|
|
7031
7031
|
static max(...e) {
|
|
7032
|
-
if (!e.every(
|
|
7032
|
+
if (!e.every(k.isDateTime))
|
|
7033
7033
|
throw new J("max requires all arguments be DateTimes");
|
|
7034
7034
|
return er(e, (n) => n.valueOf(), Math.max);
|
|
7035
7035
|
}
|
|
@@ -7053,7 +7053,7 @@ class S {
|
|
|
7053
7053
|
* @deprecated use fromFormatExplain instead
|
|
7054
7054
|
*/
|
|
7055
7055
|
static fromStringExplain(e, n, s = {}) {
|
|
7056
|
-
return
|
|
7056
|
+
return k.fromFormatExplain(e, n, s);
|
|
7057
7057
|
}
|
|
7058
7058
|
/**
|
|
7059
7059
|
* Build a parser for `fmt` using the given locale. This parser can be passed
|
|
@@ -7100,7 +7100,7 @@ class S {
|
|
|
7100
7100
|
`fromFormatParser called with a locale of ${o}, but the format parser was created for ${n.locale}`
|
|
7101
7101
|
);
|
|
7102
7102
|
const { result: a, zone: l, specificOffset: u, invalidReason: c } = n.explainFromTokens(e);
|
|
7103
|
-
return c ?
|
|
7103
|
+
return c ? k.invalid(c) : He(
|
|
7104
7104
|
a,
|
|
7105
7105
|
l,
|
|
7106
7106
|
s,
|
|
@@ -7266,12 +7266,12 @@ class S {
|
|
|
7266
7266
|
}
|
|
7267
7267
|
}
|
|
7268
7268
|
function lt(t) {
|
|
7269
|
-
if (
|
|
7269
|
+
if (k.isDateTime(t))
|
|
7270
7270
|
return t;
|
|
7271
7271
|
if (t && t.valueOf && Re(t.valueOf()))
|
|
7272
|
-
return
|
|
7272
|
+
return k.fromJSDate(t);
|
|
7273
7273
|
if (t && typeof t == "object")
|
|
7274
|
-
return
|
|
7274
|
+
return k.fromObject(t);
|
|
7275
7275
|
throw new J(
|
|
7276
7276
|
`Unknown datetime argument: ${t}, of type ${typeof t}`
|
|
7277
7277
|
);
|
|
@@ -7335,7 +7335,7 @@ const Ml = /* @__PURE__ */ oe(Al, [["render", Il]]), pr = "data:image/svg+xml,%3
|
|
|
7335
7335
|
function a(p, g) {
|
|
7336
7336
|
return !p.response || typeof p.response != "object" ? !0 : g.iconUnicode === p.response.message;
|
|
7337
7337
|
}
|
|
7338
|
-
|
|
7338
|
+
So(() => {
|
|
7339
7339
|
s.canLoadMoreMessages || i();
|
|
7340
7340
|
}), ts(
|
|
7341
7341
|
() => s.canLoadMoreMessages,
|
|
@@ -7358,7 +7358,7 @@ const Ml = /* @__PURE__ */ oe(Al, [["render", Il]]), pr = "data:image/svg+xml,%3
|
|
|
7358
7358
|
};
|
|
7359
7359
|
function u(p) {
|
|
7360
7360
|
const g = Object.values(l);
|
|
7361
|
-
return !g || Array.isArray(g) && g.length === 0 ? p : g.reduce((
|
|
7361
|
+
return !g || Array.isArray(g) && g.length === 0 ? p : g.reduce((S, w) => S.replace(w.regex, (C, _) => /--custom-tag/.test(C) ? C : w.tag.replace(/{val}/g, _)), p).replace(/--custom-tag/g, "");
|
|
7362
7362
|
}
|
|
7363
7363
|
const c = [
|
|
7364
7364
|
{ label: "Excelente", value: 1, icon: gr, iconUnicode: "😊" },
|
|
@@ -7382,7 +7382,7 @@ const Ml = /* @__PURE__ */ oe(Al, [["render", Il]]), pr = "data:image/svg+xml,%3
|
|
|
7382
7382
|
}, null, 512),
|
|
7383
7383
|
b("div", Dl, [
|
|
7384
7384
|
(N(!0), R(mt, null, Fn(s.messages, (d) => {
|
|
7385
|
-
var
|
|
7385
|
+
var S, w, C;
|
|
7386
7386
|
return N(), R("div", {
|
|
7387
7387
|
key: d.id,
|
|
7388
7388
|
class: Be(["message", d.esCliente ? "message-right" : "message-left"])
|
|
@@ -7430,7 +7430,7 @@ const Ml = /* @__PURE__ */ oe(Al, [["render", Il]]), pr = "data:image/svg+xml,%3
|
|
|
7430
7430
|
], 10, Pl)), 64))
|
|
7431
7431
|
])
|
|
7432
7432
|
])) : (N(), R("div", zl, [
|
|
7433
|
-
((
|
|
7433
|
+
((S = d.messageType) == null ? void 0 : S.code) === Fe(ht).IMAGEN ? (N(), R("div", Hl, [
|
|
7434
7434
|
b("a", {
|
|
7435
7435
|
href: "javascript:",
|
|
7436
7436
|
class: "btn-icon",
|
|
@@ -7458,7 +7458,7 @@ const Ml = /* @__PURE__ */ oe(Al, [["render", Il]]), pr = "data:image/svg+xml,%3
|
|
|
7458
7458
|
])),
|
|
7459
7459
|
b("div", Kl, [
|
|
7460
7460
|
(w = d.sender) != null && w.nombreCompleto ? (N(), R("span", Ql, Ye(d.esCliente ? (C = d.sender) == null ? void 0 : C.nombreCompleto : "ECOSISTEMA JL"), 1)) : (N(), R("span", Xl)),
|
|
7461
|
-
b("span", null, Ye(Fe(
|
|
7461
|
+
b("span", null, Ye(Fe(k).fromISO(d.createdAt).toFormat(
|
|
7462
7462
|
"dd-MM-yyyy HH:mm"
|
|
7463
7463
|
)), 1)
|
|
7464
7464
|
])
|
|
@@ -7494,19 +7494,19 @@ function ou(t, e, n) {
|
|
|
7494
7494
|
if (t[s][e] === n) return s;
|
|
7495
7495
|
return -1;
|
|
7496
7496
|
}
|
|
7497
|
-
const
|
|
7498
|
-
|
|
7499
|
-
|
|
7500
|
-
|
|
7501
|
-
|
|
7502
|
-
|
|
7503
|
-
|
|
7504
|
-
|
|
7497
|
+
const Se = /* @__PURE__ */ Object.create(null);
|
|
7498
|
+
Se.open = "0";
|
|
7499
|
+
Se.close = "1";
|
|
7500
|
+
Se.ping = "2";
|
|
7501
|
+
Se.pong = "3";
|
|
7502
|
+
Se.message = "4";
|
|
7503
|
+
Se.upgrade = "5";
|
|
7504
|
+
Se.noop = "6";
|
|
7505
7505
|
const qt = /* @__PURE__ */ Object.create(null);
|
|
7506
|
-
Object.keys(
|
|
7507
|
-
qt[
|
|
7506
|
+
Object.keys(Se).forEach((t) => {
|
|
7507
|
+
qt[Se[t]] = t;
|
|
7508
7508
|
});
|
|
7509
|
-
const Jn = { type: "error", data: "parser error" }, Qi = typeof Blob == "function" || typeof Blob < "u" && Object.prototype.toString.call(Blob) === "[object BlobConstructor]", Xi = typeof ArrayBuffer == "function", eo = (t) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(t) : t && t.buffer instanceof ArrayBuffer, ps = ({ type: t, data: e }, n, s) => Qi && e instanceof Blob ? n ? s(e) : br(e, s) : Xi && (e instanceof ArrayBuffer || eo(e)) ? n ? s(e) : br(new Blob([e]), s) : s(
|
|
7509
|
+
const Jn = { type: "error", data: "parser error" }, Qi = typeof Blob == "function" || typeof Blob < "u" && Object.prototype.toString.call(Blob) === "[object BlobConstructor]", Xi = typeof ArrayBuffer == "function", eo = (t) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(t) : t && t.buffer instanceof ArrayBuffer, ps = ({ type: t, data: e }, n, s) => Qi && e instanceof Blob ? n ? s(e) : br(e, s) : Xi && (e instanceof ArrayBuffer || eo(e)) ? n ? s(e) : br(new Blob([e]), s) : s(Se[t] + (e || "")), br = (t, e) => {
|
|
7510
7510
|
const n = new FileReader();
|
|
7511
7511
|
return n.onload = function() {
|
|
7512
7512
|
const s = n.result.split(",")[1];
|
|
@@ -7526,9 +7526,9 @@ function au(t, e) {
|
|
|
7526
7526
|
Mn || (Mn = new TextEncoder()), e(Mn.encode(n));
|
|
7527
7527
|
});
|
|
7528
7528
|
}
|
|
7529
|
-
const
|
|
7530
|
-
for (let t = 0; t <
|
|
7531
|
-
dt[
|
|
7529
|
+
const Sr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", dt = typeof Uint8Array > "u" ? [] : new Uint8Array(256);
|
|
7530
|
+
for (let t = 0; t < Sr.length; t++)
|
|
7531
|
+
dt[Sr.charCodeAt(t)] = t;
|
|
7532
7532
|
const lu = (t) => {
|
|
7533
7533
|
let e = t.length * 0.75, n = t.length, s, r = 0, i, o, a, l;
|
|
7534
7534
|
t[t.length - 1] === "=" && (e--, t[t.length - 2] === "=" && e--);
|
|
@@ -7729,13 +7729,13 @@ function Tu(t) {
|
|
|
7729
7729
|
function io() {
|
|
7730
7730
|
return Date.now().toString(36).substring(3) + Math.random().toString(36).substring(2, 5);
|
|
7731
7731
|
}
|
|
7732
|
-
function
|
|
7732
|
+
function Su(t) {
|
|
7733
7733
|
let e = "";
|
|
7734
7734
|
for (let n in t)
|
|
7735
7735
|
t.hasOwnProperty(n) && (e.length && (e += "&"), e += encodeURIComponent(n) + "=" + encodeURIComponent(t[n]));
|
|
7736
7736
|
return e;
|
|
7737
7737
|
}
|
|
7738
|
-
function
|
|
7738
|
+
function ku(t) {
|
|
7739
7739
|
let e = {}, n = t.split("&");
|
|
7740
7740
|
for (let s = 0, r = n.length; s < r; s++) {
|
|
7741
7741
|
let i = n[s].split("=");
|
|
@@ -7842,7 +7842,7 @@ class gs extends z {
|
|
|
7842
7842
|
return this.opts.port && (this.opts.secure && +(this.opts.port !== 443) || !this.opts.secure && Number(this.opts.port) !== 80) ? ":" + this.opts.port : "";
|
|
7843
7843
|
}
|
|
7844
7844
|
_query(e) {
|
|
7845
|
-
const n =
|
|
7845
|
+
const n = Su(e);
|
|
7846
7846
|
return n.length ? "?" + n : "";
|
|
7847
7847
|
}
|
|
7848
7848
|
}
|
|
@@ -8089,13 +8089,13 @@ Ke.requestsCount = 0;
|
|
|
8089
8089
|
Ke.requests = {};
|
|
8090
8090
|
if (typeof document < "u") {
|
|
8091
8091
|
if (typeof attachEvent == "function")
|
|
8092
|
-
attachEvent("onunload",
|
|
8092
|
+
attachEvent("onunload", kr);
|
|
8093
8093
|
else if (typeof addEventListener == "function") {
|
|
8094
8094
|
const t = "onpagehide" in ue ? "pagehide" : "unload";
|
|
8095
|
-
addEventListener(t,
|
|
8095
|
+
addEventListener(t, kr, !1);
|
|
8096
8096
|
}
|
|
8097
8097
|
}
|
|
8098
|
-
function
|
|
8098
|
+
function kr() {
|
|
8099
8099
|
for (let t in Ke.requests)
|
|
8100
8100
|
Ke.requests.hasOwnProperty(t) && Ke.requests[t].abort();
|
|
8101
8101
|
}
|
|
@@ -8313,7 +8313,7 @@ class Ie extends z {
|
|
|
8313
8313
|
},
|
|
8314
8314
|
transportOptions: {},
|
|
8315
8315
|
closeOnBeforeunload: !1
|
|
8316
|
-
}, n), this.opts.path = this.opts.path.replace(/\/$/, "") + (this.opts.addTrailingSlash ? "/" : ""), typeof this.opts.query == "string" && (this.opts.query =
|
|
8316
|
+
}, n), this.opts.path = this.opts.path.replace(/\/$/, "") + (this.opts.addTrailingSlash ? "/" : ""), typeof this.opts.query == "string" && (this.opts.query = ku(this.opts.query)), Kn && (this.opts.closeOnBeforeunload && (this._beforeunloadEventListener = () => {
|
|
8317
8317
|
this.transport && (this.transport.removeAllListeners(), this.transport.close());
|
|
8318
8318
|
}, addEventListener("beforeunload", this._beforeunloadEventListener, !1)), this.hostname !== "localhost" && (this._offlineEventListener = () => {
|
|
8319
8319
|
this._onClose("transport close", {
|
|
@@ -9847,7 +9847,7 @@ const rc = /* @__PURE__ */ oe(tc, [["render", sc]]), ic = {
|
|
|
9847
9847
|
if (!o) throw new Error("app is required");
|
|
9848
9848
|
let a = document.getElementById("dialogs");
|
|
9849
9849
|
a || (a = document.createElement("div"), a.id = "dialogs", a.classList.add("widget-component"), o.appendChild(a), r.value = !0);
|
|
9850
|
-
}), (o, a) => r.value ? (N(), ss(
|
|
9850
|
+
}), (o, a) => r.value ? (N(), ss(ko, {
|
|
9851
9851
|
key: 0,
|
|
9852
9852
|
to: "#dialogs"
|
|
9853
9853
|
}, [
|
|
@@ -9891,7 +9891,7 @@ const rc = /* @__PURE__ */ oe(tc, [["render", sc]]), ic = {
|
|
|
9891
9891
|
}, Tc = {
|
|
9892
9892
|
key: 0,
|
|
9893
9893
|
class: "flex flex-col justify-center items-center"
|
|
9894
|
-
},
|
|
9894
|
+
}, Sc = ["src"], kc = { class: "form-message" }, Ec = { class: "jl-inputgroup-chat" }, Oc = {
|
|
9895
9895
|
type: "submit",
|
|
9896
9896
|
class: "pointer btn-primary"
|
|
9897
9897
|
}, _c = { key: 1 }, Cc = ["src"], xc = 14, Nc = /* @__PURE__ */ tn({
|
|
@@ -9950,7 +9950,7 @@ const rc = /* @__PURE__ */ oe(tc, [["render", sc]]), ic = {
|
|
|
9950
9950
|
}
|
|
9951
9951
|
_({ codigoTipoMensaje: m }), be.modelValue = !1;
|
|
9952
9952
|
}
|
|
9953
|
-
function
|
|
9953
|
+
function S(y, m) {
|
|
9954
9954
|
var M, F, Z, se;
|
|
9955
9955
|
if ((y == null ? void 0 : y.length) > 300) {
|
|
9956
9956
|
f("show-toast", {
|
|
@@ -9984,7 +9984,7 @@ const rc = /* @__PURE__ */ oe(tc, [["render", sc]]), ic = {
|
|
|
9984
9984
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
9985
9985
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
9986
9986
|
file: (Z = Me.value) == null ? void 0 : Z[0],
|
|
9987
|
-
urlFile: (se =
|
|
9987
|
+
urlFile: (se = ke.value) == null ? void 0 : se[0],
|
|
9988
9988
|
messageType: T,
|
|
9989
9989
|
sender: {
|
|
9990
9990
|
nombreCompleto: p.user.nombreCompleto,
|
|
@@ -10027,7 +10027,7 @@ const rc = /* @__PURE__ */ oe(tc, [["render", sc]]), ic = {
|
|
|
10027
10027
|
var m;
|
|
10028
10028
|
return ((m = y.messageType) == null ? void 0 : m.code) === ht.PREGUNTA && y.response == null;
|
|
10029
10029
|
})), _ = async (y) => {
|
|
10030
|
-
const m =
|
|
10030
|
+
const m = S(n.value, y == null ? void 0 : y.codigoTipoMensaje);
|
|
10031
10031
|
if (!m) return;
|
|
10032
10032
|
let T = -1;
|
|
10033
10033
|
if (y != null && y.tipoCalificacionId) {
|
|
@@ -10128,8 +10128,7 @@ const rc = /* @__PURE__ */ oe(tc, [["render", sc]]), ic = {
|
|
|
10128
10128
|
usuarioId: `${(F = (M = y == null ? void 0 : y.chat) == null ? void 0 : M.persona) == null ? void 0 : F.msPersonaId}`,
|
|
10129
10129
|
aplicacion: m
|
|
10130
10130
|
},
|
|
10131
|
-
extraHeaders: { Authorization: p.tokenAuth }
|
|
10132
|
-
transports: ["websocket"]
|
|
10131
|
+
extraHeaders: { Authorization: p.tokenAuth }
|
|
10133
10132
|
}), Q.value.removeAllListeners(), Q.value.on("connect", () => {
|
|
10134
10133
|
var Z, se;
|
|
10135
10134
|
console.log("Conectado al servidor de sockets"), (se = Q.value) == null || se.emit("joinRoom", `${(Z = y == null ? void 0 : y.appChat) == null ? void 0 : Z.id}`);
|
|
@@ -10153,7 +10152,7 @@ const rc = /* @__PURE__ */ oe(tc, [["render", sc]]), ic = {
|
|
|
10153
10152
|
const gn = ["image/png", "image/jpeg", "image/jpg", "image/webp"];
|
|
10154
10153
|
function po() {
|
|
10155
10154
|
var T;
|
|
10156
|
-
Me.value = [],
|
|
10155
|
+
Me.value = [], ke.value = [];
|
|
10157
10156
|
const y = Array.from((T = r.value) == null ? void 0 : T.files) ?? [], m = y == null ? void 0 : y[0];
|
|
10158
10157
|
if (Me.value = y, !!m) {
|
|
10159
10158
|
if (!gn.includes(m.type)) {
|
|
@@ -10174,7 +10173,7 @@ const rc = /* @__PURE__ */ oe(tc, [["render", sc]]), ic = {
|
|
|
10174
10173
|
});
|
|
10175
10174
|
return;
|
|
10176
10175
|
}
|
|
10177
|
-
|
|
10176
|
+
ke.value.push(URL.createObjectURL(m)), i.value = 0, be.title = "Vista previa", be.modelValue = !0, ot(() => {
|
|
10178
10177
|
var x;
|
|
10179
10178
|
(x = P.value) == null || x.focus();
|
|
10180
10179
|
});
|
|
@@ -10185,7 +10184,7 @@ const rc = /* @__PURE__ */ oe(tc, [["render", sc]]), ic = {
|
|
|
10185
10184
|
const m = ((x = y.clipboardData) == null ? void 0 : x.files) ?? ((M = window.clipboardData) == null ? void 0 : M.files) ?? [];
|
|
10186
10185
|
if (m.length === 0) return;
|
|
10187
10186
|
const T = m == null ? void 0 : m[0];
|
|
10188
|
-
T && gn.includes(T == null ? void 0 : T.type) && (y.preventDefault(), i.value = 0,
|
|
10187
|
+
T && gn.includes(T == null ? void 0 : T.type) && (y.preventDefault(), i.value = 0, ke.value = [], Me.value = [T], ke.value.push(URL.createObjectURL(T)), be.modelValue = !0, ot(() => {
|
|
10189
10188
|
var F;
|
|
10190
10189
|
(F = P.value) == null || F.focus();
|
|
10191
10190
|
}));
|
|
@@ -10205,17 +10204,17 @@ const rc = /* @__PURE__ */ oe(tc, [["render", sc]]), ic = {
|
|
|
10205
10204
|
});
|
|
10206
10205
|
return;
|
|
10207
10206
|
}
|
|
10208
|
-
Me.value = [x],
|
|
10207
|
+
Me.value = [x], ke.value = [], ke.value.push(URL.createObjectURL(x)), be.modelValue = !0;
|
|
10209
10208
|
}
|
|
10210
10209
|
}), ot(() => {
|
|
10211
10210
|
var T;
|
|
10212
10211
|
(T = P.value) == null || T.focus();
|
|
10213
10212
|
}));
|
|
10214
10213
|
}
|
|
10215
|
-
const Me = U([]),
|
|
10214
|
+
const Me = U([]), ke = U([]), be = Oo({
|
|
10216
10215
|
modelValue: !1,
|
|
10217
10216
|
"onUpdate:modelValue": (y) => {
|
|
10218
|
-
be.modelValue = y, !y && (
|
|
10217
|
+
be.modelValue = y, !y && (ke.value = [], Me.value = []);
|
|
10219
10218
|
},
|
|
10220
10219
|
title: "Preparar imagen"
|
|
10221
10220
|
});
|
|
@@ -10344,7 +10343,7 @@ const rc = /* @__PURE__ */ oe(tc, [["render", sc]]), ic = {
|
|
|
10344
10343
|
le(rc, { style: { width: "20px", height: "20px" } })
|
|
10345
10344
|
]),
|
|
10346
10345
|
b("button", vc, [
|
|
10347
|
-
le(
|
|
10346
|
+
le(ks, { style: { width: "20px", height: "20px" } })
|
|
10348
10347
|
])
|
|
10349
10348
|
])
|
|
10350
10349
|
])
|
|
@@ -10354,12 +10353,12 @@ const rc = /* @__PURE__ */ oe(tc, [["render", sc]]), ic = {
|
|
|
10354
10353
|
le(uc, Co(xo(be)), {
|
|
10355
10354
|
default: No(() => [
|
|
10356
10355
|
i.value === 0 ? (N(), R("div", Tc, [
|
|
10357
|
-
(N(!0), R(mt, null, Fn(
|
|
10356
|
+
(N(!0), R(mt, null, Fn(ke.value, (T, x) => (N(), R("img", {
|
|
10358
10357
|
key: x,
|
|
10359
10358
|
src: T.toString(),
|
|
10360
10359
|
alt: "Image",
|
|
10361
10360
|
width: "400"
|
|
10362
|
-
}, null, 8,
|
|
10361
|
+
}, null, 8, Sc))), 128)),
|
|
10363
10362
|
b("form", {
|
|
10364
10363
|
class: "message-send",
|
|
10365
10364
|
onSubmit: m[17] || (m[17] = xe(
|
|
@@ -10369,7 +10368,7 @@ const rc = /* @__PURE__ */ oe(tc, [["render", sc]]), ic = {
|
|
|
10369
10368
|
["prevent"]
|
|
10370
10369
|
))
|
|
10371
10370
|
}, [
|
|
10372
|
-
b("div",
|
|
10371
|
+
b("div", kc, [
|
|
10373
10372
|
b("div", Ec, [
|
|
10374
10373
|
jt(b("textarea", {
|
|
10375
10374
|
"onUpdate:modelValue": m[13] || (m[13] = (T) => n.value = T),
|
|
@@ -10392,7 +10391,7 @@ const rc = /* @__PURE__ */ oe(tc, [["render", sc]]), ic = {
|
|
|
10392
10391
|
[bs, n.value]
|
|
10393
10392
|
]),
|
|
10394
10393
|
b("button", Oc, [
|
|
10395
|
-
le(
|
|
10394
|
+
le(ks, { style: { width: "20px", height: "20px" } })
|
|
10396
10395
|
])
|
|
10397
10396
|
])
|
|
10398
10397
|
])
|
|
@@ -10410,7 +10409,7 @@ const rc = /* @__PURE__ */ oe(tc, [["render", sc]]), ic = {
|
|
|
10410
10409
|
}, 16)
|
|
10411
10410
|
], 64));
|
|
10412
10411
|
}
|
|
10413
|
-
}), Ac = /* @__PURE__ */ oe(Nc, [["__scopeId", "data-v-
|
|
10412
|
+
}), Ac = /* @__PURE__ */ oe(Nc, [["__scopeId", "data-v-b1292574"]]), Rc = {}, Ic = {
|
|
10414
10413
|
width: "87",
|
|
10415
10414
|
height: "87",
|
|
10416
10415
|
viewBox: "0 0 87 87",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
c15.682-15.568,15.682-40.823,0-56.39s-41.094-15.568-56.776,0l-0.42,0.473l-0.026-0.018l-14.194,14.089L50.466,158.485
|
|
12
12
|
c-23.522,23.356-23.522,61.221,0,84.577s61.659,23.356,85.163,0l99.375-98.675l14.194-14.089l14.194,14.089l-14.194,14.098
|
|
13
13
|
l-99.357,98.675C149.841,257.159,149.823,257.142,149.823,257.142z`})],-1)]))}const fc=X(lc,[["render",uc]]),hc={key:0,class:"dialog-overlay"},dc={class:"header-widget"},mc={class:"title-chat"},pc=X(l.defineComponent({__name:"ODialog",props:{modelValue:{type:Boolean},title:{},"onUpdate:modelValue":{type:Function}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,s=l.ref(!1),i=()=>{r("update:modelValue",!1)};return l.onMounted(()=>{const o=document.getElementById("app");if(!o)throw new Error("app is required");let a=document.getElementById("dialogs");a||(a=document.createElement("div"),a.id="dialogs",a.classList.add("widget-component"),o.appendChild(a),s.value=!0)}),(o,a)=>s.value?(l.openBlock(),l.createBlock(l.Teleport,{key:0,to:"#dialogs"},[n.modelValue?(l.openBlock(),l.createElementBlock("div",hc,[l.createElementVNode("div",{class:"dialog-content",onClick:a[1]||(a[1]=l.withModifiers(()=>{},["stop"]))},[l.createElementVNode("div",dc,[l.createElementVNode("h4",mc,l.toDisplayString(o.title),1),l.createElementVNode("button",{onClick:a[0]||(a[0]=()=>i()),class:"btn-close"},[l.createVNode(rr,{class:"pointer"})])]),l.createElementVNode("div",null,[l.renderSlot(o.$slots,"default",{},void 0,!0)])])])):l.createCommentVNode("",!0)])):l.createCommentVNode("",!0)}}),[["__scopeId","data-v-532e0111"]]),yc={class:"widget"},gc={class:"header-widget flex-0"},wc={class:"title-chat"},Ec={class:"flex-1",style:{position:"relative",height:"0"}},kc={key:0,class:"loader"},bc={key:2,class:"fit"},Tc={class:"w-full flex-0"},Sc={class:"form-message"},vc={class:"jl-inputgroup-chat"},Oc={type:"submit",class:"pointer btn-primary"},_c={key:1,class:"message-send-block"},Nc={key:0,class:"flex flex-col justify-center items-center"},Cc=["src"],xc={class:"form-message"},Ac={class:"jl-inputgroup-chat"},Rc={type:"submit",class:"pointer btn-primary"},Ic={key:1},Mc=["src"],Dc=14,Lc=X(l.defineComponent({__name:"Chat",props:{titlePrincipal:{type:String,default:"Comunicación en linea para consultas"},toggleChat:{type:Function,required:!0},tokenAuth:{type:String,required:!0},user:{type:Object,required:!0},visible:{type:Boolean,required:!0}},emits:["show-toast","show-confirm","new-message","clear-new-messages","not-viewed-total","onQualifying"],setup(t,{emit:e}){const n=l.ref(""),r=l.ref(0),s=l.ref(),i=l.ref(1),o=l.ref(),a=l.ref(),c=l.ref({data:[],canLoadMoreMessages:!1}),u=l.ref(""),f=l.ref(!1),h=e,y=t,w=l.ref(null);l.watch(()=>y.visible,async g=>{if(!g||(h("clear-new-messages"),Y(),r.value>0&&zr(u.value,y.tokenAuth),u.value))return;f.value=!0;const p=await Wr(y.tokenAuth).finally(()=>{f.value=!1});p&&(ge.value=p,u.value=p.appChat.id,r.value=p.appChat.totalNoVistosCliente,Q(),ru(p))});function m(g,p){var b;if(Xn.value){ne();return}if(g.key==="Enter"&&g.shiftKey){const C=((b=g.target)==null?void 0:b.value)||"";g.target.value=C+`
|
|
14
|
-
`,ne();return}_({codigoTipoMensaje:p}),we.modelValue=!1}function T(g,p){var R,D,W,re;if((g==null?void 0:g.length)>300){h("show-toast",{severity:"warn",summary:"Error",detail:"El mensaje no puede superar los 300 caracteres",life:5e3});return}if(!g.trim()&&p!==ht.IMAGEN){h("show-toast",{severity:"warn",summary:"Error",detail:"Por favor ingrese un mensaje",life:5e3});return}const b=p?{code:p}:void 0;return{id:Ji(),chatId:(D=(R=ge.value)==null?void 0:R.chat)==null?void 0:D.id,message:g,visto:!0,multimedia:!1,esCliente:!0,appChatId:u.value,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),file:(W=Le.value)==null?void 0:W[0],urlFile:(re=ke.value)==null?void 0:re[0],messageType:b,sender:{nombreCompleto:y.user.nombreCompleto,ci:y.user.ci,msPersonaId:y.user.msPersonaId},response:void 0}}function k(g,p,b,C){if(p==null)throw new Error("idx is required");if(!b){if(C){const D=c.value.data[p];D.response=void 0}else c.value.data[p].error={error:!0,id:g.id};h("show-toast",{severity:"error",summary:"Error",detail:"Ocurrio un error al enviar el mensaje, intente nuevamente",life:5e3});return}let R={...b,chatId:g==null?void 0:g.chatId};if(C){const D=c.value.data[p];D.response=b,R={...D,chatId:g==null?void 0:g.chatId}}else{const D={...R};D.urlFile=c.value.data[p].urlFile,delete D.thumbnailFile,c.value.data[p]=D}return R}const N=l.computed(()=>!!c.value.data.find(g=>{var p;return((p=g.messageType)==null?void 0:p.code)===ht.PREGUNTA&&g.response==null})),_=async g=>{const p=T(n.value,g==null?void 0:g.codigoTipoMensaje);if(!p)return;let b=-1;if(g!=null&&g.tipoCalificacionId){b=c.value.data.findIndex(D=>D.id===(g==null?void 0:g.mensajeARespondeId));const R=c.value.data[b];R&&(R.response=p)}else b=c.value.data.push(p)-1;const C={message:n.value,appChatId:u.value,...g,codigoTipoMensaje:g==null?void 0:g.codigoTipoMensaje,files:Le.value};n.value="",L(C).then(R=>{var W,re;let D=k(p,b,R,g==null?void 0:g.tipoCalificacionId);D&&((re=G.value)==null||re.emit("sendMessage",{roomId:(W=ge==null?void 0:ge.value)==null?void 0:W.appChat.id,message:D},tr=>{console.log("🚀 ~ socketService.value.emit ~ response:",tr)}))}),n.value="",Y(),U.value&&(U.value.style.height="20px")},L=async g=>{const p={...g,esCliente:!0};return Ca(p,y.tokenAuth)},Q=async()=>{var C,R,D;const g=(C=c.value.data[0])==null?void 0:C.id,p={lastMessagesId:g,appChatId:u.value,limit:10};f.value=!0;const b=await Na({body:p,token:y.tokenAuth});f.value=!1,c.value.data.unshift(...b.data.sort((W,re)=>-re.createdAt.localeCompare(W.createdAt))),c.value.canLoadMoreMessages=b.pagination.total>b.pagination.size,g&&((R=w.value)!=null&&R.scrollHeight)&&me((D=w.value)==null?void 0:D.scrollHeight),g||Y()},q=async g=>{h("show-confirm",async()=>{var b,C,R;if(!((b=g.error)!=null&&b.id))return;const p=await L({message:g.message,appChatId:u.value});if(!p)h("show-toast",{severity:"error",summary:"Error",detail:"Ocurrio un error al enviar el mensaje, intente nuevamente",life:5e3});else{const D=dl(c.value.data,"id",g.error.id),W={...p,error:void 0};c.value.data[D]=W,(R=G.value)==null||R.emit("sendMessage",{roomId:(C=ge==null?void 0:ge.value)==null?void 0:C.appChat.id,message:W})}Y()})},Y=()=>{l.nextTick(()=>{w.value&&(w.value.scrollTop=w.value.scrollHeight)})},me=g=>{l.nextTick(()=>{const p=w.value;p&&(p.scrollTop=p.scrollHeight-g)})},U=l.ref();function ne(){U.value&&(U.value.style.height=U.value.scrollHeight-Dc+"px",U.value.scrollHeight!==U.value.clientHeight&&(U.value.style.height=U.value.scrollHeight+"px"))}const G=l.ref(),ge=l.ref();function ru(g,p=zi.WEBCHAT){var b,C,R,D;if(!g)throw new Error("user chat is required");if(!((C=(b=g==null?void 0:g.chat)==null?void 0:b.persona)!=null&&C.msPersonaId))throw new Error("user chat persona ID is required");G.value=Xt(window.VITE_SOCKET_URI,{query:{usuarioId:`${(D=(R=g==null?void 0:g.chat)==null?void 0:R.persona)==null?void 0:D.msPersonaId}`,aplicacion:p},extraHeaders:{Authorization:y.tokenAuth},transports:["websocket"]}),G.value.removeAllListeners(),G.value.on("connect",()=>{var W,re;console.log("Conectado al servidor de sockets"),(re=G.value)==null||re.emit("joinRoom",`${(W=g==null?void 0:g.appChat)==null?void 0:W.id}`)}),G.value.on("disconnect",()=>{console.log("Desconectado del servidor de sockets")}),G.value.on("receiveMessage",W=>{const re=c.value.data.findIndex(tr=>tr.id===W.message.id);re!==-1?c.value.data[re].response=W.message.response:c.value.data.push(W.message),zr(W.message.appChatId,y.tokenAuth),Y(),!y.visible&&h("new-message")})}const{isMobile:Xn}=ac();function su({message:g,emoji:p}){const b=async()=>{!g.id||!p||(n.value=p.iconUnicode,_({tipoCalificacionId:p.value,mensajeARespondeId:g.id}).then())};h("onQualifying",{message:p.iconUnicode,callback:b})}const er=["image/png","image/jpeg","image/jpg","image/webp"];function iu(){var b;Le.value=[],ke.value=[];const g=Array.from((b=s.value)==null?void 0:b.files)??[],p=g==null?void 0:g[0];if(Le.value=g,!!p){if(!er.includes(p.type)){h("show-toast",{severity:"warn",summary:"Error",detail:"El archivo debe ser una imagen permitida (png, jpeg, jpg, webp)",life:5e3});return}if(p.size>2e6){h("show-toast",{severity:"warn",summary:"Error",detail:"El archivo excede los 2MB",life:5e3});return}ke.value.push(URL.createObjectURL(p)),i.value=0,we.title="Vista previa",we.modelValue=!0,l.nextTick(()=>{var C;(C=U.value)==null||C.focus()})}}const ou=g=>{var C,R;const p=((C=g.clipboardData)==null?void 0:C.files)??((R=window.clipboardData)==null?void 0:R.files)??[];if(p.length===0)return;const b=p==null?void 0:p[0];b&&er.includes(b==null?void 0:b.type)&&(g.preventDefault(),i.value=0,ke.value=[],Le.value=[b],ke.value.push(URL.createObjectURL(b)),we.modelValue=!0,l.nextTick(()=>{var D;(D=U.value)==null||D.focus()}))};function au(g){var p;(p=g.dataTransfer)!=null&&p.items&&(i.value=0,Array.from(g.dataTransfer.items).forEach(b=>{if(b.kind==="file"){const C=b.getAsFile();if(!C)return;if(!er.includes(C.type)){h("show-toast",{severity:"error",summary:"Error",detail:"El archivo debe ser una imagen",life:5e3});return}Le.value=[C],ke.value=[],ke.value.push(URL.createObjectURL(C)),we.modelValue=!0}}),l.nextTick(()=>{var b;(b=U.value)==null||b.focus()}))}const Le=l.ref([]),ke=l.ref([]),we=l.reactive({modelValue:!1,"onUpdate:modelValue":g=>{we.modelValue=g,!g&&(ke.value=[],Le.value=[])},title:"Preparar imagen"});function lu(g){g&&xa(g,y.tokenAuth).then(p=>{o.value=p})}return l.onMounted(async()=>{var p;if(u.value)return;if(!y.tokenAuth)throw new Error("token auth is required");const g=await Wr(y.tokenAuth);g&&h("not-viewed-total",(p=g==null?void 0:g.appChat)==null?void 0:p.totalNoVistosCliente)}),l.onUnmounted(()=>{var g;(g=G.value)==null||g.off()}),(g,p)=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createElementVNode("div",yc,[l.createElementVNode("div",gc,[l.createElementVNode("h4",wc,l.toDisplayString(t.titlePrincipal),1),l.createElementVNode("button",{onClick:p[0]||(p[0]=()=>t.toggleChat()),class:"btn-close"},[l.createVNode(rr,{class:"pointer"})])]),l.createElementVNode("div",Ec,[l.createElementVNode("div",{ref_key:"dropZoneRef",ref:a,onDrop:p[1]||(p[1]=l.withModifiers(b=>{var C,R;au(b),(R=(C=b.target)==null?void 0:C.classList)==null||R.remove("drop-over"),b.target.style.zIndex="-1"},["self","prevent"])),onDragenter:p[2]||(p[2]=l.withModifiers(b=>{var C,R;(R=(C=b.target)==null?void 0:C.classList)==null||R.add("drop-over")},["self"])),onDragleave:p[3]||(p[3]=l.withModifiers(b=>{var C,R;(R=(C=b.target)==null?void 0:C.classList)==null||R.remove("drop-over"),b.target.style.zIndex="-1"},["self"])),onDragover:p[4]||(p[4]=l.withModifiers(()=>{},["prevent"])),style:{position:"absolute",bottom:"0",left:"0",right:"0",top:"0","z-index":"-1"}},null,544),l.createElementVNode("div",{class:"messages-container",ref_key:"messageContainerRef",ref:w,onDragenter:p[7]||(p[7]=l.withModifiers(b=>a.value.style.zIndex="1",["prevent"]))},[f.value?(l.openBlock(),l.createElementBlock("div",kc,[l.createVNode(hl)])):l.createCommentVNode("",!0),c.value.data.length>0?(l.openBlock(),l.createBlock(ll,{key:1,messages:c.value.data,canLoadMoreMessages:c.value.canLoadMoreMessages,onLoadMore:Q,onRetry:q,onOnQualifying:p[5]||(p[5]=b=>su(b)),onSee:p[6]||(p[6]=b=>{i.value=1,o.value=b.thumbnailFile,lu(b.msFileId),we.title="Imagen",we.modelValue=!0})},null,8,["messages","canLoadMoreMessages"])):(l.openBlock(),l.createElementBlock("div",bc,p[18]||(p[18]=[l.createElementVNode("span",{class:"center"},"No tienes mensajes",-1)])))],544)]),l.createElementVNode("div",Tc,[N.value?(l.openBlock(),l.createElementBlock("span",_c," Necesitamos que nos califique la atención para continuar ")):(l.openBlock(),l.createElementBlock("form",{key:0,class:"message-send",onSubmit:p[12]||(p[12]=l.withModifiers(b=>_(),["prevent"]))},[l.createElementVNode("div",Sc,[l.createElementVNode("div",vc,[l.withDirectives(l.createElementVNode("textarea",{"onUpdate:modelValue":p[8]||(p[8]=b=>n.value=b),class:"jl2-input-chat",placeholder:"Escribe tu mensaje",required:"",ref_key:"textAreaRef",ref:U,onInput:p[9]||(p[9]=()=>ne()),onKeydown:p[10]||(p[10]=l.withKeys(b=>{!l.unref(Xn)&&b.preventDefault()},["enter"])),onKeyup:l.withKeys(m,["enter"]),onPaste:ou},null,544),[[l.vModelText,n.value]]),l.createElementVNode("input",{type:"file",ref_key:"fileInputRef",ref:s,onChange:iu,accept:"image/png,image/jpeg,image/jpg,image/webp",style:{display:"none"}},null,544),l.createElementVNode("button",{type:"button",class:"pointer btn-primary",title:"Adjuntar archivo",onClick:p[11]||(p[11]=()=>{var b;s.value.value="",(b=s.value)==null||b.click()})},[l.createVNode(fc,{style:{width:"20px",height:"20px"}})]),l.createElementVNode("button",Oc,[l.createVNode(sr,{style:{width:"20px",height:"20px"}})])])])],32))])]),l.createVNode(pc,l.normalizeProps(l.guardReactiveProps(we)),{default:l.withCtx(()=>[i.value===0?(l.openBlock(),l.createElementBlock("div",Nc,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(ke.value,(b,C)=>(l.openBlock(),l.createElementBlock("img",{key:C,src:b.toString(),alt:"Image",width:"400"},null,8,Cc))),128)),l.createElementVNode("form",{class:"message-send",onSubmit:p[17]||(p[17]=l.withModifiers(b=>{_({codigoTipoMensaje:l.unref(ht).IMAGEN}),we.modelValue=!1},["prevent"]))},[l.createElementVNode("div",xc,[l.createElementVNode("div",Ac,[l.withDirectives(l.createElementVNode("textarea",{"onUpdate:modelValue":p[13]||(p[13]=b=>n.value=b),autofocus:"",class:"jl2-input-chat",placeholder:"Escribe tu mensaje",ref_key:"textAreaRef",ref:U,onInput:p[14]||(p[14]=()=>ne()),onKeydown:p[15]||(p[15]=l.withKeys(b=>{!l.unref(Xn)&&b.preventDefault()},["enter"])),onKeyup:p[16]||(p[16]=l.withKeys(b=>{m(b,l.unref(ht).IMAGEN)},["enter"]))},null,544),[[l.vModelText,n.value]]),l.createElementVNode("button",Rc,[l.createVNode(sr,{style:{width:"20px",height:"20px"}})])])])],32)])):(l.openBlock(),l.createElementBlock("div",Ic,[o.value?(l.openBlock(),l.createElementBlock("img",{key:0,src:o.value,alt:"Image",style:{"max-height":"85vh"}},null,8,Mc)):l.createCommentVNode("",!0)]))]),_:1},16)],64))}}),[["__scopeId","data-v-a9f44e1d"]]),Vc={},Bc={width:"87",height:"87",viewBox:"0 0 87 87",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Fc(t,e){return l.openBlock(),l.createElementBlock("svg",Bc,e[0]||(e[0]=[l.createStaticVNode('<g filter="url(#filter0_d_4007_3488)"><path d="M43.5 77C64.2107 77 81 60.2107 81 39.5C81 18.7893 64.2107 2 43.5 2C22.7893 2 6 18.7893 6 39.5C6 60.2107 22.7893 77 43.5 77Z" fill="white" stroke="currentColor" stroke-width="3" stroke-miterlimit="10"></path><path d="M39.705 38.885C40.6908 38.885 41.49 38.0858 41.49 37.1C41.49 36.1142 40.6908 35.315 39.705 35.315C38.7192 35.315 37.92 36.1142 37.92 37.1C37.92 38.0858 38.7192 38.885 39.705 38.885Z" fill="currentColor"></path><path d="M45.075 38.885C46.0608 38.885 46.86 38.0858 46.86 37.1C46.86 36.1142 46.0608 35.315 45.075 35.315C44.0892 35.315 43.29 36.1142 43.29 37.1C43.29 38.0858 44.0892 38.885 45.075 38.885Z" fill="currentColor"></path><path d="M50.445 38.885C51.4308 38.885 52.23 38.0858 52.23 37.1C52.23 36.1142 51.4308 35.315 50.445 35.315C49.4592 35.315 48.66 36.1142 48.66 37.1C48.66 38.0858 49.4592 38.885 50.445 38.885Z" fill="currentColor"></path><path d="M63.27 58.235L58.755 47.78C61.125 44.765 62.415 40.97 62.415 37.175C62.415 26.435 52.665 18.185 41.925 20.12C39.99 19.325 37.98 18.905 35.835 18.905C26.955 18.905 19.785 26.135 19.785 34.955C19.785 38.54 21 41.975 23.145 44.765L18.99 54.44C18.84 54.8 18.915 55.235 19.2 55.445C19.485 55.73 19.92 55.73 20.205 55.595L30.6 50.15C31.89 50.585 33.255 50.87 34.68 50.945C39.48 54.53 45.57 55.25 50.655 53.45L61.905 59.33C62.265 59.48 62.625 59.48 62.91 59.18C63.345 58.97 63.405 58.61 63.27 58.25V58.235ZM51.24 51.71C51.03 51.56 50.745 51.56 50.52 51.635C48.795 52.28 46.935 52.64 45.15 52.64C36.69 52.64 29.61 45.755 29.61 37.1C29.61 29.72 34.845 23.345 42.075 21.845C51.75 19.91 60.705 27.29 60.705 37.1C60.705 40.685 59.415 44.27 57.12 46.985C56.91 47.27 56.835 47.63 56.97 47.915L60.69 56.585L51.24 51.71Z" fill="currentColor"></path></g><defs><filter id="filter0_d_4007_3488" x="0.5" y="0.5" width="86" height="86" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="4"></feOffset><feGaussianBlur stdDeviation="2"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4007_3488"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4007_3488" result="shape"></feBlend></filter></defs>',2)]))}const Uc=X(Vc,[["render",Fc]]),$c={},Pc={viewBox:"0 0 256 256",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",preserveAspectRatio:"xMidYMid"};function qc(t,e){return l.openBlock(),l.createElementBlock("svg",Pc,e[0]||(e[0]=[l.createElementVNode("g",null,[l.createElementVNode("path",{d:"M128,0 C57.307,0 0,57.307 0,128 L0,128 C0,198.693 57.307,256 128,256 L128,256 C198.693,256 256,198.693 256,128 L256,128 C256,57.307 198.693,0 128,0 L128,0 Z",fill:"#40B3E0"}),l.createElementVNode("path",{d:"M190.2826,73.6308 L167.4206,188.8978 C167.4206,188.8978 164.2236,196.8918 155.4306,193.0548 L102.6726,152.6068 L83.4886,143.3348 L51.1946,132.4628 C51.1946,132.4628 46.2386,130.7048 45.7586,126.8678 C45.2796,123.0308 51.3546,120.9528 51.3546,120.9528 L179.7306,70.5928 C179.7306,70.5928 190.2826,65.9568 190.2826,73.6308",fill:"#FFFFFF"}),l.createElementVNode("path",{d:"M98.6178,187.6035 C98.6178,187.6035 97.0778,187.4595 95.1588,181.3835 C93.2408,175.3085 83.4888,143.3345 83.4888,143.3345 L161.0258,94.0945 C161.0258,94.0945 165.5028,91.3765 165.3428,94.0945 C165.3428,94.0945 166.1418,94.5735 163.7438,96.8115 C161.3458,99.0505 102.8328,151.6475 102.8328,151.6475",fill:"#D2E5F1"}),l.createElementVNode("path",{d:"M122.9015,168.1154 L102.0335,187.1414 C102.0335,187.1414 100.4025,188.3794 98.6175,187.6034 L102.6135,152.2624",fill:"#B5CFE4"})],-1)]))}const Wc=X($c,[["render",qc]]),zc={},Hc={version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 455.731 455.731","xml:space":"preserve"};function Zc(t,e){return l.openBlock(),l.createElementBlock("svg",Hc,e[0]||(e[0]=[l.createElementVNode("g",null,[l.createElementVNode("rect",{x:"0",y:"0",style:{fill:"#1bd741"},width:"455.731",height:"455.731"}),l.createElementVNode("g",null,[l.createElementVNode("path",{style:{fill:"#ffffff"},d:`M68.494,387.41l22.323-79.284c-14.355-24.387-21.913-52.134-21.913-80.638
|
|
14
|
+
`,ne();return}_({codigoTipoMensaje:p}),we.modelValue=!1}function T(g,p){var R,D,W,re;if((g==null?void 0:g.length)>300){h("show-toast",{severity:"warn",summary:"Error",detail:"El mensaje no puede superar los 300 caracteres",life:5e3});return}if(!g.trim()&&p!==ht.IMAGEN){h("show-toast",{severity:"warn",summary:"Error",detail:"Por favor ingrese un mensaje",life:5e3});return}const b=p?{code:p}:void 0;return{id:Ji(),chatId:(D=(R=ge.value)==null?void 0:R.chat)==null?void 0:D.id,message:g,visto:!0,multimedia:!1,esCliente:!0,appChatId:u.value,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),file:(W=Le.value)==null?void 0:W[0],urlFile:(re=ke.value)==null?void 0:re[0],messageType:b,sender:{nombreCompleto:y.user.nombreCompleto,ci:y.user.ci,msPersonaId:y.user.msPersonaId},response:void 0}}function k(g,p,b,C){if(p==null)throw new Error("idx is required");if(!b){if(C){const D=c.value.data[p];D.response=void 0}else c.value.data[p].error={error:!0,id:g.id};h("show-toast",{severity:"error",summary:"Error",detail:"Ocurrio un error al enviar el mensaje, intente nuevamente",life:5e3});return}let R={...b,chatId:g==null?void 0:g.chatId};if(C){const D=c.value.data[p];D.response=b,R={...D,chatId:g==null?void 0:g.chatId}}else{const D={...R};D.urlFile=c.value.data[p].urlFile,delete D.thumbnailFile,c.value.data[p]=D}return R}const N=l.computed(()=>!!c.value.data.find(g=>{var p;return((p=g.messageType)==null?void 0:p.code)===ht.PREGUNTA&&g.response==null})),_=async g=>{const p=T(n.value,g==null?void 0:g.codigoTipoMensaje);if(!p)return;let b=-1;if(g!=null&&g.tipoCalificacionId){b=c.value.data.findIndex(D=>D.id===(g==null?void 0:g.mensajeARespondeId));const R=c.value.data[b];R&&(R.response=p)}else b=c.value.data.push(p)-1;const C={message:n.value,appChatId:u.value,...g,codigoTipoMensaje:g==null?void 0:g.codigoTipoMensaje,files:Le.value};n.value="",L(C).then(R=>{var W,re;let D=k(p,b,R,g==null?void 0:g.tipoCalificacionId);D&&((re=G.value)==null||re.emit("sendMessage",{roomId:(W=ge==null?void 0:ge.value)==null?void 0:W.appChat.id,message:D},tr=>{console.log("🚀 ~ socketService.value.emit ~ response:",tr)}))}),n.value="",Y(),U.value&&(U.value.style.height="20px")},L=async g=>{const p={...g,esCliente:!0};return Ca(p,y.tokenAuth)},Q=async()=>{var C,R,D;const g=(C=c.value.data[0])==null?void 0:C.id,p={lastMessagesId:g,appChatId:u.value,limit:10};f.value=!0;const b=await Na({body:p,token:y.tokenAuth});f.value=!1,c.value.data.unshift(...b.data.sort((W,re)=>-re.createdAt.localeCompare(W.createdAt))),c.value.canLoadMoreMessages=b.pagination.total>b.pagination.size,g&&((R=w.value)!=null&&R.scrollHeight)&&me((D=w.value)==null?void 0:D.scrollHeight),g||Y()},q=async g=>{h("show-confirm",async()=>{var b,C,R;if(!((b=g.error)!=null&&b.id))return;const p=await L({message:g.message,appChatId:u.value});if(!p)h("show-toast",{severity:"error",summary:"Error",detail:"Ocurrio un error al enviar el mensaje, intente nuevamente",life:5e3});else{const D=dl(c.value.data,"id",g.error.id),W={...p,error:void 0};c.value.data[D]=W,(R=G.value)==null||R.emit("sendMessage",{roomId:(C=ge==null?void 0:ge.value)==null?void 0:C.appChat.id,message:W})}Y()})},Y=()=>{l.nextTick(()=>{w.value&&(w.value.scrollTop=w.value.scrollHeight)})},me=g=>{l.nextTick(()=>{const p=w.value;p&&(p.scrollTop=p.scrollHeight-g)})},U=l.ref();function ne(){U.value&&(U.value.style.height=U.value.scrollHeight-Dc+"px",U.value.scrollHeight!==U.value.clientHeight&&(U.value.style.height=U.value.scrollHeight+"px"))}const G=l.ref(),ge=l.ref();function ru(g,p=zi.WEBCHAT){var b,C,R,D;if(!g)throw new Error("user chat is required");if(!((C=(b=g==null?void 0:g.chat)==null?void 0:b.persona)!=null&&C.msPersonaId))throw new Error("user chat persona ID is required");G.value=Xt(window.VITE_SOCKET_URI,{query:{usuarioId:`${(D=(R=g==null?void 0:g.chat)==null?void 0:R.persona)==null?void 0:D.msPersonaId}`,aplicacion:p},extraHeaders:{Authorization:y.tokenAuth}}),G.value.removeAllListeners(),G.value.on("connect",()=>{var W,re;console.log("Conectado al servidor de sockets"),(re=G.value)==null||re.emit("joinRoom",`${(W=g==null?void 0:g.appChat)==null?void 0:W.id}`)}),G.value.on("disconnect",()=>{console.log("Desconectado del servidor de sockets")}),G.value.on("receiveMessage",W=>{const re=c.value.data.findIndex(tr=>tr.id===W.message.id);re!==-1?c.value.data[re].response=W.message.response:c.value.data.push(W.message),zr(W.message.appChatId,y.tokenAuth),Y(),!y.visible&&h("new-message")})}const{isMobile:Xn}=ac();function su({message:g,emoji:p}){const b=async()=>{!g.id||!p||(n.value=p.iconUnicode,_({tipoCalificacionId:p.value,mensajeARespondeId:g.id}).then())};h("onQualifying",{message:p.iconUnicode,callback:b})}const er=["image/png","image/jpeg","image/jpg","image/webp"];function iu(){var b;Le.value=[],ke.value=[];const g=Array.from((b=s.value)==null?void 0:b.files)??[],p=g==null?void 0:g[0];if(Le.value=g,!!p){if(!er.includes(p.type)){h("show-toast",{severity:"warn",summary:"Error",detail:"El archivo debe ser una imagen permitida (png, jpeg, jpg, webp)",life:5e3});return}if(p.size>2e6){h("show-toast",{severity:"warn",summary:"Error",detail:"El archivo excede los 2MB",life:5e3});return}ke.value.push(URL.createObjectURL(p)),i.value=0,we.title="Vista previa",we.modelValue=!0,l.nextTick(()=>{var C;(C=U.value)==null||C.focus()})}}const ou=g=>{var C,R;const p=((C=g.clipboardData)==null?void 0:C.files)??((R=window.clipboardData)==null?void 0:R.files)??[];if(p.length===0)return;const b=p==null?void 0:p[0];b&&er.includes(b==null?void 0:b.type)&&(g.preventDefault(),i.value=0,ke.value=[],Le.value=[b],ke.value.push(URL.createObjectURL(b)),we.modelValue=!0,l.nextTick(()=>{var D;(D=U.value)==null||D.focus()}))};function au(g){var p;(p=g.dataTransfer)!=null&&p.items&&(i.value=0,Array.from(g.dataTransfer.items).forEach(b=>{if(b.kind==="file"){const C=b.getAsFile();if(!C)return;if(!er.includes(C.type)){h("show-toast",{severity:"error",summary:"Error",detail:"El archivo debe ser una imagen",life:5e3});return}Le.value=[C],ke.value=[],ke.value.push(URL.createObjectURL(C)),we.modelValue=!0}}),l.nextTick(()=>{var b;(b=U.value)==null||b.focus()}))}const Le=l.ref([]),ke=l.ref([]),we=l.reactive({modelValue:!1,"onUpdate:modelValue":g=>{we.modelValue=g,!g&&(ke.value=[],Le.value=[])},title:"Preparar imagen"});function lu(g){g&&xa(g,y.tokenAuth).then(p=>{o.value=p})}return l.onMounted(async()=>{var p;if(u.value)return;if(!y.tokenAuth)throw new Error("token auth is required");const g=await Wr(y.tokenAuth);g&&h("not-viewed-total",(p=g==null?void 0:g.appChat)==null?void 0:p.totalNoVistosCliente)}),l.onUnmounted(()=>{var g;(g=G.value)==null||g.off()}),(g,p)=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createElementVNode("div",yc,[l.createElementVNode("div",gc,[l.createElementVNode("h4",wc,l.toDisplayString(t.titlePrincipal),1),l.createElementVNode("button",{onClick:p[0]||(p[0]=()=>t.toggleChat()),class:"btn-close"},[l.createVNode(rr,{class:"pointer"})])]),l.createElementVNode("div",Ec,[l.createElementVNode("div",{ref_key:"dropZoneRef",ref:a,onDrop:p[1]||(p[1]=l.withModifiers(b=>{var C,R;au(b),(R=(C=b.target)==null?void 0:C.classList)==null||R.remove("drop-over"),b.target.style.zIndex="-1"},["self","prevent"])),onDragenter:p[2]||(p[2]=l.withModifiers(b=>{var C,R;(R=(C=b.target)==null?void 0:C.classList)==null||R.add("drop-over")},["self"])),onDragleave:p[3]||(p[3]=l.withModifiers(b=>{var C,R;(R=(C=b.target)==null?void 0:C.classList)==null||R.remove("drop-over"),b.target.style.zIndex="-1"},["self"])),onDragover:p[4]||(p[4]=l.withModifiers(()=>{},["prevent"])),style:{position:"absolute",bottom:"0",left:"0",right:"0",top:"0","z-index":"-1"}},null,544),l.createElementVNode("div",{class:"messages-container",ref_key:"messageContainerRef",ref:w,onDragenter:p[7]||(p[7]=l.withModifiers(b=>a.value.style.zIndex="1",["prevent"]))},[f.value?(l.openBlock(),l.createElementBlock("div",kc,[l.createVNode(hl)])):l.createCommentVNode("",!0),c.value.data.length>0?(l.openBlock(),l.createBlock(ll,{key:1,messages:c.value.data,canLoadMoreMessages:c.value.canLoadMoreMessages,onLoadMore:Q,onRetry:q,onOnQualifying:p[5]||(p[5]=b=>su(b)),onSee:p[6]||(p[6]=b=>{i.value=1,o.value=b.thumbnailFile,lu(b.msFileId),we.title="Imagen",we.modelValue=!0})},null,8,["messages","canLoadMoreMessages"])):(l.openBlock(),l.createElementBlock("div",bc,p[18]||(p[18]=[l.createElementVNode("span",{class:"center"},"No tienes mensajes",-1)])))],544)]),l.createElementVNode("div",Tc,[N.value?(l.openBlock(),l.createElementBlock("span",_c," Necesitamos que nos califique la atención para continuar ")):(l.openBlock(),l.createElementBlock("form",{key:0,class:"message-send",onSubmit:p[12]||(p[12]=l.withModifiers(b=>_(),["prevent"]))},[l.createElementVNode("div",Sc,[l.createElementVNode("div",vc,[l.withDirectives(l.createElementVNode("textarea",{"onUpdate:modelValue":p[8]||(p[8]=b=>n.value=b),class:"jl2-input-chat",placeholder:"Escribe tu mensaje",required:"",ref_key:"textAreaRef",ref:U,onInput:p[9]||(p[9]=()=>ne()),onKeydown:p[10]||(p[10]=l.withKeys(b=>{!l.unref(Xn)&&b.preventDefault()},["enter"])),onKeyup:l.withKeys(m,["enter"]),onPaste:ou},null,544),[[l.vModelText,n.value]]),l.createElementVNode("input",{type:"file",ref_key:"fileInputRef",ref:s,onChange:iu,accept:"image/png,image/jpeg,image/jpg,image/webp",style:{display:"none"}},null,544),l.createElementVNode("button",{type:"button",class:"pointer btn-primary",title:"Adjuntar archivo",onClick:p[11]||(p[11]=()=>{var b;s.value.value="",(b=s.value)==null||b.click()})},[l.createVNode(fc,{style:{width:"20px",height:"20px"}})]),l.createElementVNode("button",Oc,[l.createVNode(sr,{style:{width:"20px",height:"20px"}})])])])],32))])]),l.createVNode(pc,l.normalizeProps(l.guardReactiveProps(we)),{default:l.withCtx(()=>[i.value===0?(l.openBlock(),l.createElementBlock("div",Nc,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(ke.value,(b,C)=>(l.openBlock(),l.createElementBlock("img",{key:C,src:b.toString(),alt:"Image",width:"400"},null,8,Cc))),128)),l.createElementVNode("form",{class:"message-send",onSubmit:p[17]||(p[17]=l.withModifiers(b=>{_({codigoTipoMensaje:l.unref(ht).IMAGEN}),we.modelValue=!1},["prevent"]))},[l.createElementVNode("div",xc,[l.createElementVNode("div",Ac,[l.withDirectives(l.createElementVNode("textarea",{"onUpdate:modelValue":p[13]||(p[13]=b=>n.value=b),autofocus:"",class:"jl2-input-chat",placeholder:"Escribe tu mensaje",ref_key:"textAreaRef",ref:U,onInput:p[14]||(p[14]=()=>ne()),onKeydown:p[15]||(p[15]=l.withKeys(b=>{!l.unref(Xn)&&b.preventDefault()},["enter"])),onKeyup:p[16]||(p[16]=l.withKeys(b=>{m(b,l.unref(ht).IMAGEN)},["enter"]))},null,544),[[l.vModelText,n.value]]),l.createElementVNode("button",Rc,[l.createVNode(sr,{style:{width:"20px",height:"20px"}})])])])],32)])):(l.openBlock(),l.createElementBlock("div",Ic,[o.value?(l.openBlock(),l.createElementBlock("img",{key:0,src:o.value,alt:"Image",style:{"max-height":"85vh"}},null,8,Mc)):l.createCommentVNode("",!0)]))]),_:1},16)],64))}}),[["__scopeId","data-v-b1292574"]]),Vc={},Bc={width:"87",height:"87",viewBox:"0 0 87 87",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Fc(t,e){return l.openBlock(),l.createElementBlock("svg",Bc,e[0]||(e[0]=[l.createStaticVNode('<g filter="url(#filter0_d_4007_3488)"><path d="M43.5 77C64.2107 77 81 60.2107 81 39.5C81 18.7893 64.2107 2 43.5 2C22.7893 2 6 18.7893 6 39.5C6 60.2107 22.7893 77 43.5 77Z" fill="white" stroke="currentColor" stroke-width="3" stroke-miterlimit="10"></path><path d="M39.705 38.885C40.6908 38.885 41.49 38.0858 41.49 37.1C41.49 36.1142 40.6908 35.315 39.705 35.315C38.7192 35.315 37.92 36.1142 37.92 37.1C37.92 38.0858 38.7192 38.885 39.705 38.885Z" fill="currentColor"></path><path d="M45.075 38.885C46.0608 38.885 46.86 38.0858 46.86 37.1C46.86 36.1142 46.0608 35.315 45.075 35.315C44.0892 35.315 43.29 36.1142 43.29 37.1C43.29 38.0858 44.0892 38.885 45.075 38.885Z" fill="currentColor"></path><path d="M50.445 38.885C51.4308 38.885 52.23 38.0858 52.23 37.1C52.23 36.1142 51.4308 35.315 50.445 35.315C49.4592 35.315 48.66 36.1142 48.66 37.1C48.66 38.0858 49.4592 38.885 50.445 38.885Z" fill="currentColor"></path><path d="M63.27 58.235L58.755 47.78C61.125 44.765 62.415 40.97 62.415 37.175C62.415 26.435 52.665 18.185 41.925 20.12C39.99 19.325 37.98 18.905 35.835 18.905C26.955 18.905 19.785 26.135 19.785 34.955C19.785 38.54 21 41.975 23.145 44.765L18.99 54.44C18.84 54.8 18.915 55.235 19.2 55.445C19.485 55.73 19.92 55.73 20.205 55.595L30.6 50.15C31.89 50.585 33.255 50.87 34.68 50.945C39.48 54.53 45.57 55.25 50.655 53.45L61.905 59.33C62.265 59.48 62.625 59.48 62.91 59.18C63.345 58.97 63.405 58.61 63.27 58.25V58.235ZM51.24 51.71C51.03 51.56 50.745 51.56 50.52 51.635C48.795 52.28 46.935 52.64 45.15 52.64C36.69 52.64 29.61 45.755 29.61 37.1C29.61 29.72 34.845 23.345 42.075 21.845C51.75 19.91 60.705 27.29 60.705 37.1C60.705 40.685 59.415 44.27 57.12 46.985C56.91 47.27 56.835 47.63 56.97 47.915L60.69 56.585L51.24 51.71Z" fill="currentColor"></path></g><defs><filter id="filter0_d_4007_3488" x="0.5" y="0.5" width="86" height="86" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="4"></feOffset><feGaussianBlur stdDeviation="2"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4007_3488"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4007_3488" result="shape"></feBlend></filter></defs>',2)]))}const Uc=X(Vc,[["render",Fc]]),$c={},Pc={viewBox:"0 0 256 256",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",preserveAspectRatio:"xMidYMid"};function qc(t,e){return l.openBlock(),l.createElementBlock("svg",Pc,e[0]||(e[0]=[l.createElementVNode("g",null,[l.createElementVNode("path",{d:"M128,0 C57.307,0 0,57.307 0,128 L0,128 C0,198.693 57.307,256 128,256 L128,256 C198.693,256 256,198.693 256,128 L256,128 C256,57.307 198.693,0 128,0 L128,0 Z",fill:"#40B3E0"}),l.createElementVNode("path",{d:"M190.2826,73.6308 L167.4206,188.8978 C167.4206,188.8978 164.2236,196.8918 155.4306,193.0548 L102.6726,152.6068 L83.4886,143.3348 L51.1946,132.4628 C51.1946,132.4628 46.2386,130.7048 45.7586,126.8678 C45.2796,123.0308 51.3546,120.9528 51.3546,120.9528 L179.7306,70.5928 C179.7306,70.5928 190.2826,65.9568 190.2826,73.6308",fill:"#FFFFFF"}),l.createElementVNode("path",{d:"M98.6178,187.6035 C98.6178,187.6035 97.0778,187.4595 95.1588,181.3835 C93.2408,175.3085 83.4888,143.3345 83.4888,143.3345 L161.0258,94.0945 C161.0258,94.0945 165.5028,91.3765 165.3428,94.0945 C165.3428,94.0945 166.1418,94.5735 163.7438,96.8115 C161.3458,99.0505 102.8328,151.6475 102.8328,151.6475",fill:"#D2E5F1"}),l.createElementVNode("path",{d:"M122.9015,168.1154 L102.0335,187.1414 C102.0335,187.1414 100.4025,188.3794 98.6175,187.6034 L102.6135,152.2624",fill:"#B5CFE4"})],-1)]))}const Wc=X($c,[["render",qc]]),zc={},Hc={version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 455.731 455.731","xml:space":"preserve"};function Zc(t,e){return l.openBlock(),l.createElementBlock("svg",Hc,e[0]||(e[0]=[l.createElementVNode("g",null,[l.createElementVNode("rect",{x:"0",y:"0",style:{fill:"#1bd741"},width:"455.731",height:"455.731"}),l.createElementVNode("g",null,[l.createElementVNode("path",{style:{fill:"#ffffff"},d:`M68.494,387.41l22.323-79.284c-14.355-24.387-21.913-52.134-21.913-80.638
|
|
15
15
|
c0-87.765,71.402-159.167,159.167-159.167s159.166,71.402,159.166,159.167c0,87.765-71.401,159.167-159.166,159.167
|
|
16
16
|
c-27.347,0-54.125-7-77.814-20.292L68.494,387.41z M154.437,337.406l4.872,2.975c20.654,12.609,44.432,19.274,68.762,19.274
|
|
17
17
|
c72.877,0,132.166-59.29,132.166-132.167S300.948,95.321,228.071,95.321S95.904,154.611,95.904,227.488
|
package/package.json
CHANGED