@webitel/chat-web-sdk 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +281 -278
- package/dist/index.js.map +1 -1
- package/dist/modules/messages/types/Message.types.d.ts +8 -0
- package/dist/modules/messages/types/Message.types.d.ts.map +1 -1
- package/dist/modules/messages/utils/sendDocumentMessage.d.ts.map +1 -1
- package/dist/modules/messages/utils/sendImageMessage.d.ts.map +1 -1
- package/dist/modules/socket/types/ChatsSocketConnectionState.types.d.ts +10 -0
- package/dist/modules/socket/types/ChatsSocketConnectionState.types.d.ts.map +1 -0
- package/dist/modules/threads/classes/Thread.class.d.ts.map +1 -1
- package/dist/modules/threads/types/Thread.types.d.ts +19 -8
- package/dist/modules/threads/types/Thread.types.d.ts.map +1 -1
- package/dist/modules/ui/components/WtChatMessageBubble.vue.d.ts +1 -1
- package/dist/modules/ui/components/WtChatMessageBubble.vue.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/modules/socket/enums/SocketClientConnectionStatus.enum.d.ts +0 -9
- package/dist/modules/socket/enums/SocketClientConnectionStatus.enum.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -346,10 +346,10 @@ function ue(e, t) {
|
|
|
346
346
|
}
|
|
347
347
|
//#endregion
|
|
348
348
|
//#region node_modules/axios/lib/utils.js
|
|
349
|
-
var { toString: de } = Object.prototype, { getPrototypeOf: fe } = Object, { iterator:
|
|
349
|
+
var { toString: de } = Object.prototype, { getPrototypeOf: fe } = Object, { iterator: pe, toStringTag: me } = Symbol, j = ((e) => (t) => {
|
|
350
350
|
let n = de.call(t);
|
|
351
351
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
352
|
-
})(Object.create(null)), M = (e) => (e = e.toLowerCase(), (t) =>
|
|
352
|
+
})(Object.create(null)), M = (e) => (e = e.toLowerCase(), (t) => j(t) === e), he = (e) => (t) => typeof t === e, { isArray: N } = Array, P = he("undefined");
|
|
353
353
|
function F(e) {
|
|
354
354
|
return e !== null && !P(e) && e.constructor !== null && !P(e.constructor) && I(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
355
355
|
}
|
|
@@ -359,9 +359,9 @@ function _e(e) {
|
|
|
359
359
|
return t = typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(e) : e && e.buffer && ge(e.buffer), t;
|
|
360
360
|
}
|
|
361
361
|
var ve = he("string"), I = he("function"), ye = he("number"), L = (e) => typeof e == "object" && !!e, be = (e) => e === !0 || e === !1, xe = (e) => {
|
|
362
|
-
if (
|
|
362
|
+
if (j(e) !== "object") return !1;
|
|
363
363
|
let t = fe(e);
|
|
364
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
364
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(me in e) && !(pe in e);
|
|
365
365
|
}, Se = (e) => {
|
|
366
366
|
if (!L(e) || F(e)) return !1;
|
|
367
367
|
try {
|
|
@@ -375,7 +375,7 @@ function Ae() {
|
|
|
375
375
|
}
|
|
376
376
|
var je = Ae(), Me = je.FormData === void 0 ? void 0 : je.FormData, Ne = (e) => {
|
|
377
377
|
let t;
|
|
378
|
-
return e && (Me && e instanceof Me || I(e.append) && ((t =
|
|
378
|
+
return e && (Me && e instanceof Me || I(e.append) && ((t = j(e)) === "formdata" || t === "object" && I(e.toString) && e.toString() === "[object FormData]"));
|
|
379
379
|
}, Pe = M("URLSearchParams"), [Fe, Ie, Le, Re] = [
|
|
380
380
|
"ReadableStream",
|
|
381
381
|
"Request",
|
|
@@ -449,7 +449,7 @@ var Ue = (e, t, n, { allOwnKeys: r } = {}) => (R(t, (t, r) => {
|
|
|
449
449
|
for (; t-- > 0;) n[t] = e[t];
|
|
450
450
|
return n;
|
|
451
451
|
}, Ye = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && fe(Uint8Array)), Xe = (e, t) => {
|
|
452
|
-
let n = (e && e[
|
|
452
|
+
let n = (e && e[pe]).call(e), r;
|
|
453
453
|
for (; (r = n.next()) && !r.done;) {
|
|
454
454
|
let n = r.value;
|
|
455
455
|
t.call(e, n[0], n[1]);
|
|
@@ -493,7 +493,7 @@ var Ue = (e, t, n, { allOwnKeys: r } = {}) => (R(t, (t, r) => {
|
|
|
493
493
|
return N(e) ? r(e) : r(String(e).split(t)), n;
|
|
494
494
|
}, at = () => {}, ot = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
495
495
|
function st(e) {
|
|
496
|
-
return !!(e && I(e.append) && e[
|
|
496
|
+
return !!(e && I(e.append) && e[me] === "FormData" && e[pe]);
|
|
497
497
|
}
|
|
498
498
|
var ct = (e) => {
|
|
499
499
|
let t = Array(10), n = (e, r) => {
|
|
@@ -551,7 +551,7 @@ var ct = (e) => {
|
|
|
551
551
|
stripBOM: We,
|
|
552
552
|
inherits: Ge,
|
|
553
553
|
toFlatObject: Ke,
|
|
554
|
-
kindOf:
|
|
554
|
+
kindOf: j,
|
|
555
555
|
kindOfTest: M,
|
|
556
556
|
endsWith: qe,
|
|
557
557
|
toArray: Je,
|
|
@@ -575,7 +575,7 @@ var ct = (e) => {
|
|
|
575
575
|
isThenable: ut,
|
|
576
576
|
setImmediate: dt,
|
|
577
577
|
asap: typeof queueMicrotask < "u" ? queueMicrotask.bind(z) : typeof process < "u" && process.nextTick || dt,
|
|
578
|
-
isIterable: (e) => e != null && I(e[
|
|
578
|
+
isIterable: (e) => e != null && I(e[pe])
|
|
579
579
|
}, V = class e extends Error {
|
|
580
580
|
static from(t, n, r, i, a, o) {
|
|
581
581
|
let s = new e(t.message, n || t.code, r, i, a);
|
|
@@ -625,7 +625,7 @@ function ht(e) {
|
|
|
625
625
|
var gt = B.toFlatObject(B, {}, null, function(e) {
|
|
626
626
|
return /^is[A-Z]/.test(e);
|
|
627
627
|
});
|
|
628
|
-
function
|
|
628
|
+
function H(e, t, n) {
|
|
629
629
|
if (!B.isObject(e)) throw TypeError("target must be an object");
|
|
630
630
|
t ||= new FormData(), n = B.toFlatObject(n, {
|
|
631
631
|
metaTokens: !0,
|
|
@@ -672,7 +672,7 @@ function _t(e, t, n) {
|
|
|
672
672
|
}
|
|
673
673
|
//#endregion
|
|
674
674
|
//#region node_modules/axios/lib/helpers/AxiosURLSearchParams.js
|
|
675
|
-
function
|
|
675
|
+
function _t(e) {
|
|
676
676
|
let t = {
|
|
677
677
|
"!": "%21",
|
|
678
678
|
"'": "%27",
|
|
@@ -686,29 +686,29 @@ function vt(e) {
|
|
|
686
686
|
return t[e];
|
|
687
687
|
});
|
|
688
688
|
}
|
|
689
|
-
function
|
|
690
|
-
this._pairs = [], e &&
|
|
689
|
+
function vt(e, t) {
|
|
690
|
+
this._pairs = [], e && H(e, this, t);
|
|
691
691
|
}
|
|
692
|
-
var
|
|
693
|
-
|
|
692
|
+
var yt = vt.prototype;
|
|
693
|
+
yt.append = function(e, t) {
|
|
694
694
|
this._pairs.push([e, t]);
|
|
695
|
-
},
|
|
695
|
+
}, yt.toString = function(e) {
|
|
696
696
|
let t = e ? function(t) {
|
|
697
|
-
return e.call(this, t,
|
|
698
|
-
} :
|
|
697
|
+
return e.call(this, t, _t);
|
|
698
|
+
} : _t;
|
|
699
699
|
return this._pairs.map(function(e) {
|
|
700
700
|
return t(e[0]) + "=" + t(e[1]);
|
|
701
701
|
}, "").join("&");
|
|
702
702
|
};
|
|
703
703
|
//#endregion
|
|
704
704
|
//#region node_modules/axios/lib/helpers/buildURL.js
|
|
705
|
-
function
|
|
705
|
+
function bt(e) {
|
|
706
706
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
707
707
|
}
|
|
708
|
-
function
|
|
708
|
+
function xt(e, t, n) {
|
|
709
709
|
if (!t) return e;
|
|
710
|
-
let r = n && n.encode ||
|
|
711
|
-
if (o = a ? a(t, i) : B.isURLSearchParams(t) ? t.toString() : new
|
|
710
|
+
let r = n && n.encode || bt, i = B.isFunction(n) ? { serialize: n } : n, a = i && i.serialize, o;
|
|
711
|
+
if (o = a ? a(t, i) : B.isURLSearchParams(t) ? t.toString() : new vt(t, i).toString(r), o) {
|
|
712
712
|
let t = e.indexOf("#");
|
|
713
713
|
t !== -1 && (e = e.slice(0, t)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
714
714
|
}
|
|
@@ -716,7 +716,7 @@ function St(e, t, n) {
|
|
|
716
716
|
}
|
|
717
717
|
//#endregion
|
|
718
718
|
//#region node_modules/axios/lib/core/InterceptorManager.js
|
|
719
|
-
var
|
|
719
|
+
var St = class {
|
|
720
720
|
constructor() {
|
|
721
721
|
this.handlers = [];
|
|
722
722
|
}
|
|
@@ -739,15 +739,15 @@ var Ct = class {
|
|
|
739
739
|
t !== null && e(t);
|
|
740
740
|
});
|
|
741
741
|
}
|
|
742
|
-
},
|
|
742
|
+
}, Ct = {
|
|
743
743
|
silentJSONParsing: !0,
|
|
744
744
|
forcedJSONParsing: !0,
|
|
745
745
|
clarifyTimeoutError: !1,
|
|
746
746
|
legacyInterceptorReqResOrdering: !0
|
|
747
|
-
},
|
|
747
|
+
}, wt = {
|
|
748
748
|
isBrowser: !0,
|
|
749
749
|
classes: {
|
|
750
|
-
URLSearchParams: typeof URLSearchParams < "u" ? URLSearchParams :
|
|
750
|
+
URLSearchParams: typeof URLSearchParams < "u" ? URLSearchParams : vt,
|
|
751
751
|
FormData: typeof FormData < "u" ? FormData : null,
|
|
752
752
|
Blob: typeof Blob < "u" ? Blob : null
|
|
753
753
|
},
|
|
@@ -759,58 +759,58 @@ var Ct = class {
|
|
|
759
759
|
"url",
|
|
760
760
|
"data"
|
|
761
761
|
]
|
|
762
|
-
},
|
|
763
|
-
hasBrowserEnv: () =>
|
|
764
|
-
hasStandardBrowserEnv: () =>
|
|
765
|
-
hasStandardBrowserWebWorkerEnv: () =>
|
|
766
|
-
navigator: () =>
|
|
767
|
-
origin: () =>
|
|
768
|
-
}),
|
|
762
|
+
}, Tt = /* @__PURE__ */ n({
|
|
763
|
+
hasBrowserEnv: () => Et,
|
|
764
|
+
hasStandardBrowserEnv: () => Ot,
|
|
765
|
+
hasStandardBrowserWebWorkerEnv: () => kt,
|
|
766
|
+
navigator: () => Dt,
|
|
767
|
+
origin: () => At
|
|
768
|
+
}), Et = typeof window < "u" && typeof document < "u", Dt = typeof navigator == "object" && navigator || void 0, Ot = Et && (!Dt || [
|
|
769
769
|
"ReactNative",
|
|
770
770
|
"NativeScript",
|
|
771
771
|
"NS"
|
|
772
|
-
].indexOf(
|
|
773
|
-
...
|
|
774
|
-
...
|
|
772
|
+
].indexOf(Dt.product) < 0), kt = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope && typeof self.importScripts == "function", At = Et && window.location.href || "http://localhost", U = {
|
|
773
|
+
...Tt,
|
|
774
|
+
...wt
|
|
775
775
|
};
|
|
776
776
|
//#endregion
|
|
777
777
|
//#region node_modules/axios/lib/helpers/toURLEncodedForm.js
|
|
778
|
-
function
|
|
779
|
-
return
|
|
778
|
+
function jt(e, t) {
|
|
779
|
+
return H(e, new U.classes.URLSearchParams(), {
|
|
780
780
|
visitor: function(e, t, n, r) {
|
|
781
|
-
return
|
|
781
|
+
return U.isNode && B.isBuffer(e) ? (this.append(t, e.toString("base64")), !1) : r.defaultVisitor.apply(this, arguments);
|
|
782
782
|
},
|
|
783
783
|
...t
|
|
784
784
|
});
|
|
785
785
|
}
|
|
786
786
|
//#endregion
|
|
787
787
|
//#region node_modules/axios/lib/helpers/formDataToJSON.js
|
|
788
|
-
function
|
|
788
|
+
function Mt(e) {
|
|
789
789
|
return B.matchAll(/\w+|\[(\w*)]/g, e).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
790
790
|
}
|
|
791
|
-
function
|
|
791
|
+
function Nt(e) {
|
|
792
792
|
let t = {}, n = Object.keys(e), r, i = n.length, a;
|
|
793
793
|
for (r = 0; r < i; r++) a = n[r], t[a] = e[a];
|
|
794
794
|
return t;
|
|
795
795
|
}
|
|
796
|
-
function
|
|
796
|
+
function Pt(e) {
|
|
797
797
|
function t(e, n, r, i) {
|
|
798
798
|
let a = e[i++];
|
|
799
799
|
if (a === "__proto__") return !0;
|
|
800
800
|
let o = Number.isFinite(+a), s = i >= e.length;
|
|
801
|
-
return a = !a && B.isArray(r) ? r.length : a, s ? (B.hasOwnProp(r, a) ? r[a] = [r[a], n] : r[a] = n, !o) : ((!r[a] || !B.isObject(r[a])) && (r[a] = []), t(e, n, r[a], i) && B.isArray(r[a]) && (r[a] =
|
|
801
|
+
return a = !a && B.isArray(r) ? r.length : a, s ? (B.hasOwnProp(r, a) ? r[a] = [r[a], n] : r[a] = n, !o) : ((!r[a] || !B.isObject(r[a])) && (r[a] = []), t(e, n, r[a], i) && B.isArray(r[a]) && (r[a] = Nt(r[a])), !o);
|
|
802
802
|
}
|
|
803
803
|
if (B.isFormData(e) && B.isFunction(e.entries)) {
|
|
804
804
|
let n = {};
|
|
805
805
|
return B.forEachEntry(e, (e, r) => {
|
|
806
|
-
t(
|
|
806
|
+
t(Mt(e), r, n, 0);
|
|
807
807
|
}), n;
|
|
808
808
|
}
|
|
809
809
|
return null;
|
|
810
810
|
}
|
|
811
811
|
//#endregion
|
|
812
812
|
//#region node_modules/axios/lib/defaults/index.js
|
|
813
|
-
function
|
|
813
|
+
function Ft(e, t, n) {
|
|
814
814
|
if (B.isString(e)) try {
|
|
815
815
|
return (t || JSON.parse)(e), B.trim(e);
|
|
816
816
|
} catch (e) {
|
|
@@ -818,8 +818,8 @@ function It(e, t, n) {
|
|
|
818
818
|
}
|
|
819
819
|
return (n || JSON.stringify)(e);
|
|
820
820
|
}
|
|
821
|
-
var
|
|
822
|
-
transitional:
|
|
821
|
+
var W = {
|
|
822
|
+
transitional: Ct,
|
|
823
823
|
adapter: [
|
|
824
824
|
"xhr",
|
|
825
825
|
"http",
|
|
@@ -827,22 +827,22 @@ var U = {
|
|
|
827
827
|
],
|
|
828
828
|
transformRequest: [function(e, t) {
|
|
829
829
|
let n = t.getContentType() || "", r = n.indexOf("application/json") > -1, i = B.isObject(e);
|
|
830
|
-
if (i && B.isHTMLForm(e) && (e = new FormData(e)), B.isFormData(e)) return r ? JSON.stringify(
|
|
830
|
+
if (i && B.isHTMLForm(e) && (e = new FormData(e)), B.isFormData(e)) return r ? JSON.stringify(Pt(e)) : e;
|
|
831
831
|
if (B.isArrayBuffer(e) || B.isBuffer(e) || B.isStream(e) || B.isFile(e) || B.isBlob(e) || B.isReadableStream(e)) return e;
|
|
832
832
|
if (B.isArrayBufferView(e)) return e.buffer;
|
|
833
833
|
if (B.isURLSearchParams(e)) return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
|
|
834
834
|
let a;
|
|
835
835
|
if (i) {
|
|
836
|
-
if (n.indexOf("application/x-www-form-urlencoded") > -1) return
|
|
836
|
+
if (n.indexOf("application/x-www-form-urlencoded") > -1) return jt(e, this.formSerializer).toString();
|
|
837
837
|
if ((a = B.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
|
|
838
838
|
let t = this.env && this.env.FormData;
|
|
839
|
-
return
|
|
839
|
+
return H(a ? { "files[]": e } : e, t && new t(), this.formSerializer);
|
|
840
840
|
}
|
|
841
841
|
}
|
|
842
|
-
return i || r ? (t.setContentType("application/json", !1),
|
|
842
|
+
return i || r ? (t.setContentType("application/json", !1), Ft(e)) : e;
|
|
843
843
|
}],
|
|
844
844
|
transformResponse: [function(e) {
|
|
845
|
-
let t = this.transitional ||
|
|
845
|
+
let t = this.transitional || W.transitional, n = t && t.forcedJSONParsing, r = this.responseType === "json";
|
|
846
846
|
if (B.isResponse(e) || B.isReadableStream(e)) return e;
|
|
847
847
|
if (e && B.isString(e) && (n && !this.responseType || r)) {
|
|
848
848
|
let n = !(t && t.silentJSONParsing) && r;
|
|
@@ -860,8 +860,8 @@ var U = {
|
|
|
860
860
|
maxContentLength: -1,
|
|
861
861
|
maxBodyLength: -1,
|
|
862
862
|
env: {
|
|
863
|
-
FormData:
|
|
864
|
-
Blob:
|
|
863
|
+
FormData: U.classes.FormData,
|
|
864
|
+
Blob: U.classes.Blob
|
|
865
865
|
},
|
|
866
866
|
validateStatus: function(e) {
|
|
867
867
|
return e >= 200 && e < 300;
|
|
@@ -879,11 +879,11 @@ B.forEach([
|
|
|
879
879
|
"put",
|
|
880
880
|
"patch"
|
|
881
881
|
], (e) => {
|
|
882
|
-
|
|
882
|
+
W.headers[e] = {};
|
|
883
883
|
});
|
|
884
884
|
//#endregion
|
|
885
885
|
//#region node_modules/axios/lib/helpers/parseHeaders.js
|
|
886
|
-
var
|
|
886
|
+
var It = B.toObjectSet([
|
|
887
887
|
"age",
|
|
888
888
|
"authorization",
|
|
889
889
|
"content-length",
|
|
@@ -901,35 +901,35 @@ var Lt = B.toObjectSet([
|
|
|
901
901
|
"referer",
|
|
902
902
|
"retry-after",
|
|
903
903
|
"user-agent"
|
|
904
|
-
]),
|
|
904
|
+
]), Lt = (e) => {
|
|
905
905
|
let t = {}, n, r, i;
|
|
906
906
|
return e && e.split("\n").forEach(function(e) {
|
|
907
|
-
i = e.indexOf(":"), n = e.substring(0, i).trim().toLowerCase(), r = e.substring(i + 1).trim(), !(!n || t[n] &&
|
|
907
|
+
i = e.indexOf(":"), n = e.substring(0, i).trim().toLowerCase(), r = e.substring(i + 1).trim(), !(!n || t[n] && It[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
908
908
|
}), t;
|
|
909
|
-
},
|
|
910
|
-
function
|
|
909
|
+
}, Rt = Symbol("internals");
|
|
910
|
+
function G(e) {
|
|
911
911
|
return e && String(e).trim().toLowerCase();
|
|
912
912
|
}
|
|
913
|
-
function
|
|
914
|
-
return e === !1 || e == null ? e : B.isArray(e) ? e.map(
|
|
913
|
+
function zt(e) {
|
|
914
|
+
return e === !1 || e == null ? e : B.isArray(e) ? e.map(zt) : String(e);
|
|
915
915
|
}
|
|
916
|
-
function
|
|
916
|
+
function Bt(e) {
|
|
917
917
|
let t = Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g, r;
|
|
918
918
|
for (; r = n.exec(e);) t[r[1]] = r[2];
|
|
919
919
|
return t;
|
|
920
920
|
}
|
|
921
|
-
var
|
|
922
|
-
function
|
|
921
|
+
var Vt = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
922
|
+
function Ht(e, t, n, r, i) {
|
|
923
923
|
if (B.isFunction(r)) return r.call(this, t, n);
|
|
924
924
|
if (i && (t = n), B.isString(t)) {
|
|
925
925
|
if (B.isString(r)) return t.indexOf(r) !== -1;
|
|
926
926
|
if (B.isRegExp(r)) return r.test(t);
|
|
927
927
|
}
|
|
928
928
|
}
|
|
929
|
-
function
|
|
929
|
+
function Ut(e) {
|
|
930
930
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, t, n) => t.toUpperCase() + n);
|
|
931
931
|
}
|
|
932
|
-
function
|
|
932
|
+
function Wt(e, t) {
|
|
933
933
|
let n = B.toCamelCase(" " + t);
|
|
934
934
|
[
|
|
935
935
|
"get",
|
|
@@ -944,21 +944,21 @@ function Gt(e, t) {
|
|
|
944
944
|
});
|
|
945
945
|
});
|
|
946
946
|
}
|
|
947
|
-
var
|
|
947
|
+
var K = class {
|
|
948
948
|
constructor(e) {
|
|
949
949
|
e && this.set(e);
|
|
950
950
|
}
|
|
951
951
|
set(e, t, n) {
|
|
952
952
|
let r = this;
|
|
953
953
|
function i(e, t, n) {
|
|
954
|
-
let i =
|
|
954
|
+
let i = G(t);
|
|
955
955
|
if (!i) throw Error("header name must be a non-empty string");
|
|
956
956
|
let a = B.findKey(r, i);
|
|
957
|
-
(!a || r[a] === void 0 || n === !0 || n === void 0 && r[a] !== !1) && (r[a || t] =
|
|
957
|
+
(!a || r[a] === void 0 || n === !0 || n === void 0 && r[a] !== !1) && (r[a || t] = zt(e));
|
|
958
958
|
}
|
|
959
959
|
let a = (e, t) => B.forEach(e, (e, n) => i(e, n, t));
|
|
960
960
|
if (B.isPlainObject(e) || e instanceof this.constructor) a(e, t);
|
|
961
|
-
else if (B.isString(e) && (e = e.trim()) && !
|
|
961
|
+
else if (B.isString(e) && (e = e.trim()) && !Vt(e)) a(Lt(e), t);
|
|
962
962
|
else if (B.isObject(e) && B.isIterable(e)) {
|
|
963
963
|
let n = {}, r, i;
|
|
964
964
|
for (let t of e) {
|
|
@@ -970,12 +970,12 @@ var G = class {
|
|
|
970
970
|
return this;
|
|
971
971
|
}
|
|
972
972
|
get(e, t) {
|
|
973
|
-
if (e =
|
|
973
|
+
if (e = G(e), e) {
|
|
974
974
|
let n = B.findKey(this, e);
|
|
975
975
|
if (n) {
|
|
976
976
|
let e = this[n];
|
|
977
977
|
if (!t) return e;
|
|
978
|
-
if (t === !0) return
|
|
978
|
+
if (t === !0) return Bt(e);
|
|
979
979
|
if (B.isFunction(t)) return t.call(this, e, n);
|
|
980
980
|
if (B.isRegExp(t)) return t.exec(e);
|
|
981
981
|
throw TypeError("parser must be boolean|regexp|function");
|
|
@@ -983,18 +983,18 @@ var G = class {
|
|
|
983
983
|
}
|
|
984
984
|
}
|
|
985
985
|
has(e, t) {
|
|
986
|
-
if (e =
|
|
986
|
+
if (e = G(e), e) {
|
|
987
987
|
let n = B.findKey(this, e);
|
|
988
|
-
return !!(n && this[n] !== void 0 && (!t ||
|
|
988
|
+
return !!(n && this[n] !== void 0 && (!t || Ht(this, this[n], n, t)));
|
|
989
989
|
}
|
|
990
990
|
return !1;
|
|
991
991
|
}
|
|
992
992
|
delete(e, t) {
|
|
993
993
|
let n = this, r = !1;
|
|
994
994
|
function i(e) {
|
|
995
|
-
if (e =
|
|
995
|
+
if (e = G(e), e) {
|
|
996
996
|
let i = B.findKey(n, e);
|
|
997
|
-
i && (!t ||
|
|
997
|
+
i && (!t || Ht(n, n[i], i, t)) && (delete n[i], r = !0);
|
|
998
998
|
}
|
|
999
999
|
}
|
|
1000
1000
|
return B.isArray(e) ? e.forEach(i) : i(e), r;
|
|
@@ -1003,7 +1003,7 @@ var G = class {
|
|
|
1003
1003
|
let t = Object.keys(this), n = t.length, r = !1;
|
|
1004
1004
|
for (; n--;) {
|
|
1005
1005
|
let i = t[n];
|
|
1006
|
-
(!e ||
|
|
1006
|
+
(!e || Ht(this, this[i], i, e, !0)) && (delete this[i], r = !0);
|
|
1007
1007
|
}
|
|
1008
1008
|
return r;
|
|
1009
1009
|
}
|
|
@@ -1012,11 +1012,11 @@ var G = class {
|
|
|
1012
1012
|
return B.forEach(this, (r, i) => {
|
|
1013
1013
|
let a = B.findKey(n, i);
|
|
1014
1014
|
if (a) {
|
|
1015
|
-
t[a] =
|
|
1015
|
+
t[a] = zt(r), delete t[i];
|
|
1016
1016
|
return;
|
|
1017
1017
|
}
|
|
1018
|
-
let o = e ?
|
|
1019
|
-
o !== i && delete t[i], t[o] =
|
|
1018
|
+
let o = e ? Ut(i) : String(i).trim();
|
|
1019
|
+
o !== i && delete t[i], t[o] = zt(r), n[o] = !0;
|
|
1020
1020
|
}), this;
|
|
1021
1021
|
}
|
|
1022
1022
|
concat(...e) {
|
|
@@ -1048,22 +1048,22 @@ var G = class {
|
|
|
1048
1048
|
return t.forEach((e) => n.set(e)), n;
|
|
1049
1049
|
}
|
|
1050
1050
|
static accessor(e) {
|
|
1051
|
-
let t = (this[
|
|
1051
|
+
let t = (this[Rt] = this[Rt] = { accessors: {} }).accessors, n = this.prototype;
|
|
1052
1052
|
function r(e) {
|
|
1053
|
-
let r =
|
|
1054
|
-
t[r] || (
|
|
1053
|
+
let r = G(e);
|
|
1054
|
+
t[r] || (Wt(n, e), t[r] = !0);
|
|
1055
1055
|
}
|
|
1056
1056
|
return B.isArray(e) ? e.forEach(r) : r(e), this;
|
|
1057
1057
|
}
|
|
1058
1058
|
};
|
|
1059
|
-
|
|
1059
|
+
K.accessor([
|
|
1060
1060
|
"Content-Type",
|
|
1061
1061
|
"Content-Length",
|
|
1062
1062
|
"Accept",
|
|
1063
1063
|
"Accept-Encoding",
|
|
1064
1064
|
"User-Agent",
|
|
1065
1065
|
"Authorization"
|
|
1066
|
-
]), B.reduceDescriptors(
|
|
1066
|
+
]), B.reduceDescriptors(K.prototype, ({ value: e }, t) => {
|
|
1067
1067
|
let n = t[0].toUpperCase() + t.slice(1);
|
|
1068
1068
|
return {
|
|
1069
1069
|
get: () => e,
|
|
@@ -1071,42 +1071,42 @@ G.accessor([
|
|
|
1071
1071
|
this[n] = e;
|
|
1072
1072
|
}
|
|
1073
1073
|
};
|
|
1074
|
-
}), B.freezeMethods(
|
|
1074
|
+
}), B.freezeMethods(K);
|
|
1075
1075
|
//#endregion
|
|
1076
1076
|
//#region node_modules/axios/lib/core/transformData.js
|
|
1077
|
-
function
|
|
1078
|
-
let n = this ||
|
|
1077
|
+
function Gt(e, t) {
|
|
1078
|
+
let n = this || W, r = t || n, i = K.from(r.headers), a = r.data;
|
|
1079
1079
|
return B.forEach(e, function(e) {
|
|
1080
1080
|
a = e.call(n, a, i.normalize(), t ? t.status : void 0);
|
|
1081
1081
|
}), i.normalize(), a;
|
|
1082
1082
|
}
|
|
1083
1083
|
//#endregion
|
|
1084
1084
|
//#region node_modules/axios/lib/cancel/isCancel.js
|
|
1085
|
-
function
|
|
1085
|
+
function Kt(e) {
|
|
1086
1086
|
return !!(e && e.__CANCEL__);
|
|
1087
1087
|
}
|
|
1088
1088
|
//#endregion
|
|
1089
1089
|
//#region node_modules/axios/lib/cancel/CanceledError.js
|
|
1090
|
-
var
|
|
1090
|
+
var q = class extends V {
|
|
1091
1091
|
constructor(e, t, n) {
|
|
1092
1092
|
super(e ?? "canceled", V.ERR_CANCELED, t, n), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
1093
1093
|
}
|
|
1094
1094
|
};
|
|
1095
1095
|
//#endregion
|
|
1096
1096
|
//#region node_modules/axios/lib/core/settle.js
|
|
1097
|
-
function
|
|
1097
|
+
function qt(e, t, n) {
|
|
1098
1098
|
let r = n.config.validateStatus;
|
|
1099
1099
|
!n.status || !r || r(n.status) ? e(n) : t(new V("Request failed with status code " + n.status, [V.ERR_BAD_REQUEST, V.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4], n.config, n.request, n));
|
|
1100
1100
|
}
|
|
1101
1101
|
//#endregion
|
|
1102
1102
|
//#region node_modules/axios/lib/helpers/parseProtocol.js
|
|
1103
|
-
function
|
|
1103
|
+
function Jt(e) {
|
|
1104
1104
|
let t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
1105
1105
|
return t && t[1] || "";
|
|
1106
1106
|
}
|
|
1107
1107
|
//#endregion
|
|
1108
1108
|
//#region node_modules/axios/lib/helpers/speedometer.js
|
|
1109
|
-
function
|
|
1109
|
+
function Yt(e, t) {
|
|
1110
1110
|
e ||= 10;
|
|
1111
1111
|
let n = Array(e), r = Array(e), i = 0, a = 0, o;
|
|
1112
1112
|
return t = t === void 0 ? 1e3 : t, function(s) {
|
|
@@ -1121,7 +1121,7 @@ function Xt(e, t) {
|
|
|
1121
1121
|
}
|
|
1122
1122
|
//#endregion
|
|
1123
1123
|
//#region node_modules/axios/lib/helpers/throttle.js
|
|
1124
|
-
function
|
|
1124
|
+
function Xt(e, t) {
|
|
1125
1125
|
let n = 0, r = 1e3 / t, i, a, o = (t, r = Date.now()) => {
|
|
1126
1126
|
n = r, i = null, a &&= (clearTimeout(a), null), e(...t);
|
|
1127
1127
|
};
|
|
@@ -1134,9 +1134,9 @@ function Zt(e, t) {
|
|
|
1134
1134
|
}
|
|
1135
1135
|
//#endregion
|
|
1136
1136
|
//#region node_modules/axios/lib/helpers/progressEventReducer.js
|
|
1137
|
-
var
|
|
1138
|
-
let r = 0, i =
|
|
1139
|
-
return
|
|
1137
|
+
var Zt = (e, t, n = 3) => {
|
|
1138
|
+
let r = 0, i = Yt(50, 250);
|
|
1139
|
+
return Xt((n) => {
|
|
1140
1140
|
let a = n.loaded, o = n.lengthComputable ? n.total : void 0, s = a - r, c = i(s), l = a <= o;
|
|
1141
1141
|
r = a, e({
|
|
1142
1142
|
loaded: a,
|
|
@@ -1150,14 +1150,14 @@ var Qt = (e, t, n = 3) => {
|
|
|
1150
1150
|
[t ? "download" : "upload"]: !0
|
|
1151
1151
|
});
|
|
1152
1152
|
}, n);
|
|
1153
|
-
},
|
|
1153
|
+
}, Qt = (e, t) => {
|
|
1154
1154
|
let n = e != null;
|
|
1155
1155
|
return [(r) => t[0]({
|
|
1156
1156
|
lengthComputable: n,
|
|
1157
1157
|
total: e,
|
|
1158
1158
|
loaded: r
|
|
1159
1159
|
}), t[1]];
|
|
1160
|
-
},
|
|
1160
|
+
}, $t = (e) => (...t) => B.asap(() => e(...t)), en = U.hasStandardBrowserEnv ? ((e, t) => (n) => (n = new URL(n, U.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(new URL(U.origin), U.navigator && /(msie|trident)/i.test(U.navigator.userAgent)) : () => !0, tn = U.hasStandardBrowserEnv ? {
|
|
1161
1161
|
write(e, t, n, r, i, a, o) {
|
|
1162
1162
|
if (typeof document > "u") return;
|
|
1163
1163
|
let s = [`${e}=${encodeURIComponent(t)}`];
|
|
@@ -1180,24 +1180,24 @@ var Qt = (e, t, n = 3) => {
|
|
|
1180
1180
|
};
|
|
1181
1181
|
//#endregion
|
|
1182
1182
|
//#region node_modules/axios/lib/helpers/isAbsoluteURL.js
|
|
1183
|
-
function
|
|
1183
|
+
function nn(e) {
|
|
1184
1184
|
return typeof e == "string" ? /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e) : !1;
|
|
1185
1185
|
}
|
|
1186
1186
|
//#endregion
|
|
1187
1187
|
//#region node_modules/axios/lib/helpers/combineURLs.js
|
|
1188
|
-
function
|
|
1188
|
+
function rn(e, t) {
|
|
1189
1189
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1190
1190
|
}
|
|
1191
1191
|
//#endregion
|
|
1192
1192
|
//#region node_modules/axios/lib/core/buildFullPath.js
|
|
1193
|
-
function
|
|
1194
|
-
let r = !
|
|
1195
|
-
return e && (r || n == 0) ?
|
|
1193
|
+
function an(e, t, n) {
|
|
1194
|
+
let r = !nn(t);
|
|
1195
|
+
return e && (r || n == 0) ? rn(e, t) : t;
|
|
1196
1196
|
}
|
|
1197
1197
|
//#endregion
|
|
1198
1198
|
//#region node_modules/axios/lib/core/mergeConfig.js
|
|
1199
|
-
var
|
|
1200
|
-
function
|
|
1199
|
+
var on = (e) => e instanceof K ? { ...e } : e;
|
|
1200
|
+
function J(e, t) {
|
|
1201
1201
|
t ||= {};
|
|
1202
1202
|
let n = {};
|
|
1203
1203
|
function r(e, t, n, r) {
|
|
@@ -1247,7 +1247,7 @@ function q(e, t) {
|
|
|
1247
1247
|
socketPath: o,
|
|
1248
1248
|
responseEncoding: o,
|
|
1249
1249
|
validateStatus: s,
|
|
1250
|
-
headers: (e, t, n) => i(
|
|
1250
|
+
headers: (e, t, n) => i(on(e), on(t), n, !0)
|
|
1251
1251
|
};
|
|
1252
1252
|
return B.forEach(Object.keys({
|
|
1253
1253
|
...e,
|
|
@@ -1260,10 +1260,10 @@ function q(e, t) {
|
|
|
1260
1260
|
}
|
|
1261
1261
|
//#endregion
|
|
1262
1262
|
//#region node_modules/axios/lib/helpers/resolveConfig.js
|
|
1263
|
-
var
|
|
1264
|
-
let t =
|
|
1265
|
-
if (t.headers = o =
|
|
1266
|
-
if (
|
|
1263
|
+
var sn = (e) => {
|
|
1264
|
+
let t = J({}, e), { data: n, withXSRFToken: r, xsrfHeaderName: i, xsrfCookieName: a, headers: o, auth: s } = t;
|
|
1265
|
+
if (t.headers = o = K.from(o), t.url = xt(an(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), s && o.set("Authorization", "Basic " + btoa((s.username || "") + ":" + (s.password ? unescape(encodeURIComponent(s.password)) : ""))), B.isFormData(n)) {
|
|
1266
|
+
if (U.hasStandardBrowserEnv || U.hasStandardBrowserWebWorkerEnv) o.setContentType(void 0);
|
|
1267
1267
|
else if (B.isFunction(n.getHeaders)) {
|
|
1268
1268
|
let e = n.getHeaders(), t = ["content-type", "content-length"];
|
|
1269
1269
|
Object.entries(e).forEach(([e, n]) => {
|
|
@@ -1271,14 +1271,14 @@ var cn = (e) => {
|
|
|
1271
1271
|
});
|
|
1272
1272
|
}
|
|
1273
1273
|
}
|
|
1274
|
-
if (
|
|
1275
|
-
let e = i && a &&
|
|
1274
|
+
if (U.hasStandardBrowserEnv && (r && B.isFunction(r) && (r = r(t)), r || r !== !1 && en(t.url))) {
|
|
1275
|
+
let e = i && a && tn.read(a);
|
|
1276
1276
|
e && o.set(i, e);
|
|
1277
1277
|
}
|
|
1278
1278
|
return t;
|
|
1279
|
-
},
|
|
1279
|
+
}, cn = typeof XMLHttpRequest < "u" && function(e) {
|
|
1280
1280
|
return new Promise(function(t, n) {
|
|
1281
|
-
let r =
|
|
1281
|
+
let r = sn(e), i = r.data, a = K.from(r.headers).normalize(), { responseType: o, onUploadProgress: s, onDownloadProgress: c } = r, l, u, d, f, p;
|
|
1282
1282
|
function m() {
|
|
1283
1283
|
f && f(), p && p(), r.cancelToken && r.cancelToken.unsubscribe(l), r.signal && r.signal.removeEventListener("abort", l);
|
|
1284
1284
|
}
|
|
@@ -1286,8 +1286,8 @@ var cn = (e) => {
|
|
|
1286
1286
|
h.open(r.method.toUpperCase(), r.url, !0), h.timeout = r.timeout;
|
|
1287
1287
|
function g() {
|
|
1288
1288
|
if (!h) return;
|
|
1289
|
-
let r =
|
|
1290
|
-
|
|
1289
|
+
let r = K.from("getAllResponseHeaders" in h && h.getAllResponseHeaders());
|
|
1290
|
+
qt(function(e) {
|
|
1291
1291
|
t(e), m();
|
|
1292
1292
|
}, function(e) {
|
|
1293
1293
|
n(e), m();
|
|
@@ -1308,28 +1308,28 @@ var cn = (e) => {
|
|
|
1308
1308
|
let r = new V(t && t.message ? t.message : "Network Error", V.ERR_NETWORK, e, h);
|
|
1309
1309
|
r.event = t || null, n(r), h = null;
|
|
1310
1310
|
}, h.ontimeout = function() {
|
|
1311
|
-
let t = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded", i = r.transitional ||
|
|
1311
|
+
let t = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded", i = r.transitional || Ct;
|
|
1312
1312
|
r.timeoutErrorMessage && (t = r.timeoutErrorMessage), n(new V(t, i.clarifyTimeoutError ? V.ETIMEDOUT : V.ECONNABORTED, e, h)), h = null;
|
|
1313
1313
|
}, i === void 0 && a.setContentType(null), "setRequestHeader" in h && B.forEach(a.toJSON(), function(e, t) {
|
|
1314
1314
|
h.setRequestHeader(t, e);
|
|
1315
|
-
}), B.isUndefined(r.withCredentials) || (h.withCredentials = !!r.withCredentials), o && o !== "json" && (h.responseType = r.responseType), c && ([d, p] =
|
|
1316
|
-
h &&= (n(!t || t.type ? new
|
|
1315
|
+
}), B.isUndefined(r.withCredentials) || (h.withCredentials = !!r.withCredentials), o && o !== "json" && (h.responseType = r.responseType), c && ([d, p] = Zt(c, !0), h.addEventListener("progress", d)), s && h.upload && ([u, f] = Zt(s), h.upload.addEventListener("progress", u), h.upload.addEventListener("loadend", f)), (r.cancelToken || r.signal) && (l = (t) => {
|
|
1316
|
+
h &&= (n(!t || t.type ? new q(null, e, h) : t), h.abort(), null);
|
|
1317
1317
|
}, r.cancelToken && r.cancelToken.subscribe(l), r.signal && (r.signal.aborted ? l() : r.signal.addEventListener("abort", l)));
|
|
1318
|
-
let _ =
|
|
1319
|
-
if (_ &&
|
|
1318
|
+
let _ = Jt(r.url);
|
|
1319
|
+
if (_ && U.protocols.indexOf(_) === -1) {
|
|
1320
1320
|
n(new V("Unsupported protocol " + _ + ":", V.ERR_BAD_REQUEST, e));
|
|
1321
1321
|
return;
|
|
1322
1322
|
}
|
|
1323
1323
|
h.send(i || null);
|
|
1324
1324
|
});
|
|
1325
|
-
},
|
|
1325
|
+
}, ln = (e, t) => {
|
|
1326
1326
|
let { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1327
1327
|
if (t || n) {
|
|
1328
1328
|
let n = new AbortController(), r, i = function(e) {
|
|
1329
1329
|
if (!r) {
|
|
1330
1330
|
r = !0, o();
|
|
1331
1331
|
let t = e instanceof Error ? e : this.reason;
|
|
1332
|
-
n.abort(t instanceof V ? t : new
|
|
1332
|
+
n.abort(t instanceof V ? t : new q(t instanceof Error ? t.message : t));
|
|
1333
1333
|
}
|
|
1334
1334
|
}, a = t && setTimeout(() => {
|
|
1335
1335
|
a = null, i(new V(`timeout of ${t}ms exceeded`, V.ETIMEDOUT));
|
|
@@ -1342,7 +1342,7 @@ var cn = (e) => {
|
|
|
1342
1342
|
let { signal: s } = n;
|
|
1343
1343
|
return s.unsubscribe = () => B.asap(o), s;
|
|
1344
1344
|
}
|
|
1345
|
-
},
|
|
1345
|
+
}, un = function* (e, t) {
|
|
1346
1346
|
let n = e.byteLength;
|
|
1347
1347
|
if (!t || n < t) {
|
|
1348
1348
|
yield e;
|
|
@@ -1350,9 +1350,9 @@ var cn = (e) => {
|
|
|
1350
1350
|
}
|
|
1351
1351
|
let r = 0, i;
|
|
1352
1352
|
for (; r < n;) i = r + t, yield e.slice(r, i), r = i;
|
|
1353
|
-
},
|
|
1354
|
-
for await (let n of
|
|
1355
|
-
},
|
|
1353
|
+
}, dn = async function* (e, t) {
|
|
1354
|
+
for await (let n of fn(e)) yield* un(n, t);
|
|
1355
|
+
}, fn = async function* (e) {
|
|
1356
1356
|
if (e[Symbol.asyncIterator]) {
|
|
1357
1357
|
yield* e;
|
|
1358
1358
|
return;
|
|
@@ -1367,8 +1367,8 @@ var cn = (e) => {
|
|
|
1367
1367
|
} finally {
|
|
1368
1368
|
await t.cancel();
|
|
1369
1369
|
}
|
|
1370
|
-
},
|
|
1371
|
-
let i =
|
|
1370
|
+
}, pn = (e, t, n, r) => {
|
|
1371
|
+
let i = dn(e, t), a = 0, o, s = (e) => {
|
|
1372
1372
|
o || (o = !0, r && r(e));
|
|
1373
1373
|
};
|
|
1374
1374
|
return new ReadableStream({
|
|
@@ -1389,29 +1389,29 @@ var cn = (e) => {
|
|
|
1389
1389
|
return s(e), i.return();
|
|
1390
1390
|
}
|
|
1391
1391
|
}, { highWaterMark: 2 });
|
|
1392
|
-
},
|
|
1392
|
+
}, mn = 64 * 1024, { isFunction: hn } = B, gn = (({ Request: e, Response: t }) => ({
|
|
1393
1393
|
Request: e,
|
|
1394
1394
|
Response: t
|
|
1395
|
-
}))(B.global), { ReadableStream:
|
|
1395
|
+
}))(B.global), { ReadableStream: _n, TextEncoder: vn } = B.global, yn = (e, ...t) => {
|
|
1396
1396
|
try {
|
|
1397
1397
|
return !!e(...t);
|
|
1398
1398
|
} catch {
|
|
1399
1399
|
return !1;
|
|
1400
1400
|
}
|
|
1401
|
-
},
|
|
1402
|
-
e = B.merge.call({ skipUndefined: !0 },
|
|
1403
|
-
let { fetch: t, Request: n, Response: r } = e, i = t ?
|
|
1401
|
+
}, bn = (e) => {
|
|
1402
|
+
e = B.merge.call({ skipUndefined: !0 }, gn, e);
|
|
1403
|
+
let { fetch: t, Request: n, Response: r } = e, i = t ? hn(t) : typeof fetch == "function", a = hn(n), o = hn(r);
|
|
1404
1404
|
if (!i) return !1;
|
|
1405
|
-
let s = i &&
|
|
1406
|
-
let e = !1, t = new n(
|
|
1407
|
-
body: new
|
|
1405
|
+
let s = i && hn(_n), c = i && (typeof vn == "function" ? ((e) => (t) => e.encode(t))(new vn()) : async (e) => new Uint8Array(await new n(e).arrayBuffer())), l = a && s && yn(() => {
|
|
1406
|
+
let e = !1, t = new n(U.origin, {
|
|
1407
|
+
body: new _n(),
|
|
1408
1408
|
method: "POST",
|
|
1409
1409
|
get duplex() {
|
|
1410
1410
|
return e = !0, "half";
|
|
1411
1411
|
}
|
|
1412
1412
|
}).headers.has("Content-Type");
|
|
1413
1413
|
return e && !t;
|
|
1414
|
-
}), u = o && s &&
|
|
1414
|
+
}), u = o && s && yn(() => B.isReadableStream(new r("").body)), d = { stream: u && ((e) => e.body) };
|
|
1415
1415
|
i && [
|
|
1416
1416
|
"text",
|
|
1417
1417
|
"arrayBuffer",
|
|
@@ -1428,7 +1428,7 @@ var cn = (e) => {
|
|
|
1428
1428
|
let f = async (e) => {
|
|
1429
1429
|
if (e == null) return 0;
|
|
1430
1430
|
if (B.isBlob(e)) return e.size;
|
|
1431
|
-
if (B.isSpecCompliantForm(e)) return (await new n(
|
|
1431
|
+
if (B.isSpecCompliantForm(e)) return (await new n(U.origin, {
|
|
1432
1432
|
method: "POST",
|
|
1433
1433
|
body: e
|
|
1434
1434
|
}).arrayBuffer()).byteLength;
|
|
@@ -1436,9 +1436,9 @@ var cn = (e) => {
|
|
|
1436
1436
|
if (B.isURLSearchParams(e) && (e += ""), B.isString(e)) return (await c(e)).byteLength;
|
|
1437
1437
|
}, p = async (e, t) => B.toFiniteNumber(e.getContentLength()) ?? f(t);
|
|
1438
1438
|
return async (e) => {
|
|
1439
|
-
let { url: i, method: o, data: s, signal: c, cancelToken: f, timeout: m, onDownloadProgress: h, onUploadProgress: g, responseType: _, headers: v, withCredentials: y = "same-origin", fetchOptions: b } =
|
|
1439
|
+
let { url: i, method: o, data: s, signal: c, cancelToken: f, timeout: m, onDownloadProgress: h, onUploadProgress: g, responseType: _, headers: v, withCredentials: y = "same-origin", fetchOptions: b } = sn(e), x = t || fetch;
|
|
1440
1440
|
_ = _ ? (_ + "").toLowerCase() : "text";
|
|
1441
|
-
let S =
|
|
1441
|
+
let S = ln([c, f && f.toAbortSignal()], m), C = null, w = S && S.unsubscribe && (() => {
|
|
1442
1442
|
S.unsubscribe();
|
|
1443
1443
|
}), T;
|
|
1444
1444
|
try {
|
|
@@ -1449,8 +1449,8 @@ var cn = (e) => {
|
|
|
1449
1449
|
duplex: "half"
|
|
1450
1450
|
}), t;
|
|
1451
1451
|
if (B.isFormData(s) && (t = e.headers.get("content-type")) && v.setContentType(t), e.body) {
|
|
1452
|
-
let [t, n] =
|
|
1453
|
-
s =
|
|
1452
|
+
let [t, n] = Qt(T, Zt($t(g)));
|
|
1453
|
+
s = pn(e.body, mn, t, n);
|
|
1454
1454
|
}
|
|
1455
1455
|
}
|
|
1456
1456
|
B.isString(y) || (y = y ? "include" : "omit");
|
|
@@ -1474,17 +1474,17 @@ var cn = (e) => {
|
|
|
1474
1474
|
].forEach((t) => {
|
|
1475
1475
|
e[t] = f[t];
|
|
1476
1476
|
});
|
|
1477
|
-
let t = B.toFiniteNumber(f.headers.get("content-length")), [n, i] = h &&
|
|
1478
|
-
f = new r(
|
|
1477
|
+
let t = B.toFiniteNumber(f.headers.get("content-length")), [n, i] = h && Qt(t, Zt($t(h), !0)) || [];
|
|
1478
|
+
f = new r(pn(f.body, mn, n, () => {
|
|
1479
1479
|
i && i(), w && w();
|
|
1480
1480
|
}), e);
|
|
1481
1481
|
}
|
|
1482
1482
|
_ ||= "text";
|
|
1483
1483
|
let ee = await d[B.findKey(d, _) || "text"](f, e);
|
|
1484
1484
|
return !m && w && w(), await new Promise((t, n) => {
|
|
1485
|
-
|
|
1485
|
+
qt(t, n, {
|
|
1486
1486
|
data: ee,
|
|
1487
|
-
headers:
|
|
1487
|
+
headers: K.from(f.headers),
|
|
1488
1488
|
status: f.status,
|
|
1489
1489
|
statusText: f.statusText,
|
|
1490
1490
|
config: e,
|
|
@@ -1495,24 +1495,24 @@ var cn = (e) => {
|
|
|
1495
1495
|
throw w && w(), t && t.name === "TypeError" && /Load failed|fetch/i.test(t.message) ? Object.assign(new V("Network Error", V.ERR_NETWORK, e, C, t && t.response), { cause: t.cause || t }) : V.from(t, t && t.code, e, C, t && t.response);
|
|
1496
1496
|
}
|
|
1497
1497
|
};
|
|
1498
|
-
},
|
|
1498
|
+
}, xn = /* @__PURE__ */ new Map(), Sn = (e) => {
|
|
1499
1499
|
let t = e && e.env || {}, { fetch: n, Request: r, Response: i } = t, a = [
|
|
1500
1500
|
r,
|
|
1501
1501
|
i,
|
|
1502
1502
|
n
|
|
1503
|
-
], o = a.length, s, c, l =
|
|
1504
|
-
for (; o--;) s = a[o], c = l.get(s), c === void 0 && l.set(s, c = o ? /* @__PURE__ */ new Map() :
|
|
1503
|
+
], o = a.length, s, c, l = xn;
|
|
1504
|
+
for (; o--;) s = a[o], c = l.get(s), c === void 0 && l.set(s, c = o ? /* @__PURE__ */ new Map() : bn(t)), l = c;
|
|
1505
1505
|
return c;
|
|
1506
1506
|
};
|
|
1507
|
-
|
|
1507
|
+
Sn();
|
|
1508
1508
|
//#endregion
|
|
1509
1509
|
//#region node_modules/axios/lib/adapters/adapters.js
|
|
1510
|
-
var
|
|
1510
|
+
var Cn = {
|
|
1511
1511
|
http: null,
|
|
1512
|
-
xhr:
|
|
1513
|
-
fetch: { get:
|
|
1512
|
+
xhr: cn,
|
|
1513
|
+
fetch: { get: Sn }
|
|
1514
1514
|
};
|
|
1515
|
-
B.forEach(
|
|
1515
|
+
B.forEach(Cn, (e, t) => {
|
|
1516
1516
|
if (e) {
|
|
1517
1517
|
try {
|
|
1518
1518
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1520,46 +1520,46 @@ B.forEach(wn, (e, t) => {
|
|
|
1520
1520
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1521
1521
|
}
|
|
1522
1522
|
});
|
|
1523
|
-
var
|
|
1524
|
-
function
|
|
1523
|
+
var wn = (e) => `- ${e}`, Tn = (e) => B.isFunction(e) || e === null || e === !1;
|
|
1524
|
+
function En(e, t) {
|
|
1525
1525
|
e = B.isArray(e) ? e : [e];
|
|
1526
1526
|
let { length: n } = e, r, i, a = {};
|
|
1527
1527
|
for (let o = 0; o < n; o++) {
|
|
1528
1528
|
r = e[o];
|
|
1529
1529
|
let n;
|
|
1530
|
-
if (i = r, !
|
|
1530
|
+
if (i = r, !Tn(r) && (i = Cn[(n = String(r)).toLowerCase()], i === void 0)) throw new V(`Unknown adapter '${n}'`);
|
|
1531
1531
|
if (i && (B.isFunction(i) || (i = i.get(t)))) break;
|
|
1532
1532
|
a[n || "#" + o] = i;
|
|
1533
1533
|
}
|
|
1534
1534
|
if (!i) {
|
|
1535
1535
|
let e = Object.entries(a).map(([e, t]) => `adapter ${e} ` + (t === !1 ? "is not supported by the environment" : "is not available in the build"));
|
|
1536
|
-
throw new V("There is no suitable adapter to dispatch the request " + (n ? e.length > 1 ? "since :\n" + e.map(
|
|
1536
|
+
throw new V("There is no suitable adapter to dispatch the request " + (n ? e.length > 1 ? "since :\n" + e.map(wn).join("\n") : " " + wn(e[0]) : "as no adapter specified"), "ERR_NOT_SUPPORT");
|
|
1537
1537
|
}
|
|
1538
1538
|
return i;
|
|
1539
1539
|
}
|
|
1540
|
-
var
|
|
1541
|
-
getAdapter:
|
|
1542
|
-
adapters:
|
|
1540
|
+
var Dn = {
|
|
1541
|
+
getAdapter: En,
|
|
1542
|
+
adapters: Cn
|
|
1543
1543
|
};
|
|
1544
1544
|
//#endregion
|
|
1545
1545
|
//#region node_modules/axios/lib/core/dispatchRequest.js
|
|
1546
|
-
function
|
|
1547
|
-
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new
|
|
1546
|
+
function On(e) {
|
|
1547
|
+
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new q(null, e);
|
|
1548
1548
|
}
|
|
1549
|
-
function
|
|
1550
|
-
return
|
|
1549
|
+
function kn(e) {
|
|
1550
|
+
return On(e), e.headers = K.from(e.headers), e.data = Gt.call(e, e.transformRequest), [
|
|
1551
1551
|
"post",
|
|
1552
1552
|
"put",
|
|
1553
1553
|
"patch"
|
|
1554
|
-
].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1555
|
-
return
|
|
1554
|
+
].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Dn.getAdapter(e.adapter || W.adapter, e)(e).then(function(t) {
|
|
1555
|
+
return On(e), t.data = Gt.call(e, e.transformResponse, t), t.headers = K.from(t.headers), t;
|
|
1556
1556
|
}, function(t) {
|
|
1557
|
-
return
|
|
1557
|
+
return Kt(t) || (On(e), t && t.response && (t.response.data = Gt.call(e, e.transformResponse, t.response), t.response.headers = K.from(t.response.headers))), Promise.reject(t);
|
|
1558
1558
|
});
|
|
1559
1559
|
}
|
|
1560
1560
|
//#endregion
|
|
1561
1561
|
//#region node_modules/axios/lib/env/data.js
|
|
1562
|
-
var
|
|
1562
|
+
var An = "1.13.6", jn = {};
|
|
1563
1563
|
[
|
|
1564
1564
|
"object",
|
|
1565
1565
|
"boolean",
|
|
@@ -1568,23 +1568,23 @@ var jn = "1.13.6", Mn = {};
|
|
|
1568
1568
|
"string",
|
|
1569
1569
|
"symbol"
|
|
1570
1570
|
].forEach((e, t) => {
|
|
1571
|
-
|
|
1571
|
+
jn[e] = function(n) {
|
|
1572
1572
|
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1573
1573
|
};
|
|
1574
1574
|
});
|
|
1575
|
-
var
|
|
1576
|
-
|
|
1575
|
+
var Mn = {};
|
|
1576
|
+
jn.transitional = function(e, t, n) {
|
|
1577
1577
|
function r(e, t) {
|
|
1578
|
-
return "[Axios v" +
|
|
1578
|
+
return "[Axios v" + An + "] Transitional option '" + e + "'" + t + (n ? ". " + n : "");
|
|
1579
1579
|
}
|
|
1580
1580
|
return (n, i, a) => {
|
|
1581
1581
|
if (e === !1) throw new V(r(i, " has been removed" + (t ? " in " + t : "")), V.ERR_DEPRECATED);
|
|
1582
|
-
return t && !
|
|
1582
|
+
return t && !Mn[i] && (Mn[i] = !0, console.warn(r(i, " has been deprecated since v" + t + " and will be removed in the near future"))), e ? e(n, i, a) : !0;
|
|
1583
1583
|
};
|
|
1584
|
-
},
|
|
1584
|
+
}, jn.spelling = function(e) {
|
|
1585
1585
|
return (t, n) => (console.warn(`${n} is likely a misspelling of ${e}`), !0);
|
|
1586
1586
|
};
|
|
1587
|
-
function
|
|
1587
|
+
function Nn(e, t, n) {
|
|
1588
1588
|
if (typeof e != "object") throw new V("options must be an object", V.ERR_BAD_OPTION_VALUE);
|
|
1589
1589
|
let r = Object.keys(e), i = r.length;
|
|
1590
1590
|
for (; i-- > 0;) {
|
|
@@ -1597,14 +1597,14 @@ function Pn(e, t, n) {
|
|
|
1597
1597
|
if (n !== !0) throw new V("Unknown option " + a, V.ERR_BAD_OPTION);
|
|
1598
1598
|
}
|
|
1599
1599
|
}
|
|
1600
|
-
var
|
|
1601
|
-
assertOptions:
|
|
1602
|
-
validators:
|
|
1603
|
-
},
|
|
1600
|
+
var Pn = {
|
|
1601
|
+
assertOptions: Nn,
|
|
1602
|
+
validators: jn
|
|
1603
|
+
}, Y = Pn.validators, X = class {
|
|
1604
1604
|
constructor(e) {
|
|
1605
1605
|
this.defaults = e || {}, this.interceptors = {
|
|
1606
|
-
request: new
|
|
1607
|
-
response: new
|
|
1606
|
+
request: new St(),
|
|
1607
|
+
response: new St()
|
|
1608
1608
|
};
|
|
1609
1609
|
}
|
|
1610
1610
|
async request(e, t) {
|
|
@@ -1623,19 +1623,19 @@ var Fn = {
|
|
|
1623
1623
|
}
|
|
1624
1624
|
}
|
|
1625
1625
|
_request(e, t) {
|
|
1626
|
-
typeof e == "string" ? (t ||= {}, t.url = e) : t = e || {}, t =
|
|
1626
|
+
typeof e == "string" ? (t ||= {}, t.url = e) : t = e || {}, t = J(this.defaults, t);
|
|
1627
1627
|
let { transitional: n, paramsSerializer: r, headers: i } = t;
|
|
1628
|
-
n !== void 0 &&
|
|
1629
|
-
silentJSONParsing:
|
|
1630
|
-
forcedJSONParsing:
|
|
1631
|
-
clarifyTimeoutError:
|
|
1632
|
-
legacyInterceptorReqResOrdering:
|
|
1633
|
-
}, !1), r != null && (B.isFunction(r) ? t.paramsSerializer = { serialize: r } :
|
|
1634
|
-
encode:
|
|
1635
|
-
serialize:
|
|
1636
|
-
}, !0)), t.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls === void 0 ? t.allowAbsoluteUrls = !0 : t.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls),
|
|
1637
|
-
baseUrl:
|
|
1638
|
-
withXsrfToken:
|
|
1628
|
+
n !== void 0 && Pn.assertOptions(n, {
|
|
1629
|
+
silentJSONParsing: Y.transitional(Y.boolean),
|
|
1630
|
+
forcedJSONParsing: Y.transitional(Y.boolean),
|
|
1631
|
+
clarifyTimeoutError: Y.transitional(Y.boolean),
|
|
1632
|
+
legacyInterceptorReqResOrdering: Y.transitional(Y.boolean)
|
|
1633
|
+
}, !1), r != null && (B.isFunction(r) ? t.paramsSerializer = { serialize: r } : Pn.assertOptions(r, {
|
|
1634
|
+
encode: Y.function,
|
|
1635
|
+
serialize: Y.function
|
|
1636
|
+
}, !0)), t.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls === void 0 ? t.allowAbsoluteUrls = !0 : t.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls), Pn.assertOptions(t, {
|
|
1637
|
+
baseUrl: Y.spelling("baseURL"),
|
|
1638
|
+
withXsrfToken: Y.spelling("withXSRFToken")
|
|
1639
1639
|
}, !0), t.method = (t.method || this.defaults.method || "get").toLowerCase();
|
|
1640
1640
|
let a = i && B.merge(i.common, i[t.method]);
|
|
1641
1641
|
i && B.forEach([
|
|
@@ -1648,12 +1648,12 @@ var Fn = {
|
|
|
1648
1648
|
"common"
|
|
1649
1649
|
], (e) => {
|
|
1650
1650
|
delete i[e];
|
|
1651
|
-
}), t.headers =
|
|
1651
|
+
}), t.headers = K.concat(a, i);
|
|
1652
1652
|
let o = [], s = !0;
|
|
1653
1653
|
this.interceptors.request.forEach(function(e) {
|
|
1654
1654
|
if (typeof e.runWhen == "function" && e.runWhen(t) === !1) return;
|
|
1655
1655
|
s &&= e.synchronous;
|
|
1656
|
-
let n = t.transitional ||
|
|
1656
|
+
let n = t.transitional || Ct;
|
|
1657
1657
|
n && n.legacyInterceptorReqResOrdering ? o.unshift(e.fulfilled, e.rejected) : o.push(e.fulfilled, e.rejected);
|
|
1658
1658
|
});
|
|
1659
1659
|
let c = [];
|
|
@@ -1662,7 +1662,7 @@ var Fn = {
|
|
|
1662
1662
|
});
|
|
1663
1663
|
let l, u = 0, d;
|
|
1664
1664
|
if (!s) {
|
|
1665
|
-
let e = [
|
|
1665
|
+
let e = [kn.bind(this), void 0];
|
|
1666
1666
|
for (e.unshift(...o), e.push(...c), d = e.length, l = Promise.resolve(t); u < d;) l = l.then(e[u++], e[u++]);
|
|
1667
1667
|
return l;
|
|
1668
1668
|
}
|
|
@@ -1678,7 +1678,7 @@ var Fn = {
|
|
|
1678
1678
|
}
|
|
1679
1679
|
}
|
|
1680
1680
|
try {
|
|
1681
|
-
l =
|
|
1681
|
+
l = kn.call(this, f);
|
|
1682
1682
|
} catch (e) {
|
|
1683
1683
|
return Promise.reject(e);
|
|
1684
1684
|
}
|
|
@@ -1686,7 +1686,7 @@ var Fn = {
|
|
|
1686
1686
|
return l;
|
|
1687
1687
|
}
|
|
1688
1688
|
getUri(e) {
|
|
1689
|
-
return e =
|
|
1689
|
+
return e = J(this.defaults, e), xt(an(e.baseURL, e.url, e.allowAbsoluteUrls), e.params, e.paramsSerializer);
|
|
1690
1690
|
}
|
|
1691
1691
|
};
|
|
1692
1692
|
B.forEach([
|
|
@@ -1695,8 +1695,8 @@ B.forEach([
|
|
|
1695
1695
|
"head",
|
|
1696
1696
|
"options"
|
|
1697
1697
|
], function(e) {
|
|
1698
|
-
|
|
1699
|
-
return this.request(
|
|
1698
|
+
X.prototype[e] = function(t, n) {
|
|
1699
|
+
return this.request(J(n || {}, {
|
|
1700
1700
|
method: e,
|
|
1701
1701
|
url: t,
|
|
1702
1702
|
data: (n || {}).data
|
|
@@ -1709,7 +1709,7 @@ B.forEach([
|
|
|
1709
1709
|
], function(e) {
|
|
1710
1710
|
function t(t) {
|
|
1711
1711
|
return function(n, r, i) {
|
|
1712
|
-
return this.request(
|
|
1712
|
+
return this.request(J(i || {}, {
|
|
1713
1713
|
method: e,
|
|
1714
1714
|
headers: t ? { "Content-Type": "multipart/form-data" } : {},
|
|
1715
1715
|
url: n,
|
|
@@ -1717,11 +1717,11 @@ B.forEach([
|
|
|
1717
1717
|
}));
|
|
1718
1718
|
};
|
|
1719
1719
|
}
|
|
1720
|
-
|
|
1720
|
+
X.prototype[e] = t(), X.prototype[e + "Form"] = t(!0);
|
|
1721
1721
|
});
|
|
1722
1722
|
//#endregion
|
|
1723
1723
|
//#region node_modules/axios/lib/cancel/CancelToken.js
|
|
1724
|
-
var
|
|
1724
|
+
var Fn = class e {
|
|
1725
1725
|
constructor(e) {
|
|
1726
1726
|
if (typeof e != "function") throw TypeError("executor must be a function.");
|
|
1727
1727
|
let t;
|
|
@@ -1742,7 +1742,7 @@ var In = class e {
|
|
|
1742
1742
|
n.unsubscribe(t);
|
|
1743
1743
|
}, r;
|
|
1744
1744
|
}, e(function(e, r, i) {
|
|
1745
|
-
n.reason || (n.reason = new
|
|
1745
|
+
n.reason || (n.reason = new q(e, r, i), t(n.reason));
|
|
1746
1746
|
});
|
|
1747
1747
|
}
|
|
1748
1748
|
throwIfRequested() {
|
|
@@ -1778,19 +1778,19 @@ var In = class e {
|
|
|
1778
1778
|
};
|
|
1779
1779
|
//#endregion
|
|
1780
1780
|
//#region node_modules/axios/lib/helpers/spread.js
|
|
1781
|
-
function
|
|
1781
|
+
function In(e) {
|
|
1782
1782
|
return function(t) {
|
|
1783
1783
|
return e.apply(null, t);
|
|
1784
1784
|
};
|
|
1785
1785
|
}
|
|
1786
1786
|
//#endregion
|
|
1787
1787
|
//#region node_modules/axios/lib/helpers/isAxiosError.js
|
|
1788
|
-
function
|
|
1788
|
+
function Ln(e) {
|
|
1789
1789
|
return B.isObject(e) && e.isAxiosError === !0;
|
|
1790
1790
|
}
|
|
1791
1791
|
//#endregion
|
|
1792
1792
|
//#region node_modules/axios/lib/helpers/HttpStatusCode.js
|
|
1793
|
-
var
|
|
1793
|
+
var Rn = {
|
|
1794
1794
|
Continue: 100,
|
|
1795
1795
|
SwitchingProtocols: 101,
|
|
1796
1796
|
Processing: 102,
|
|
@@ -1861,29 +1861,29 @@ var zn = {
|
|
|
1861
1861
|
SslHandshakeFailed: 525,
|
|
1862
1862
|
InvalidSslCertificate: 526
|
|
1863
1863
|
};
|
|
1864
|
-
Object.entries(
|
|
1865
|
-
|
|
1864
|
+
Object.entries(Rn).forEach(([e, t]) => {
|
|
1865
|
+
Rn[t] = e;
|
|
1866
1866
|
});
|
|
1867
1867
|
//#endregion
|
|
1868
1868
|
//#region node_modules/axios/lib/axios.js
|
|
1869
|
-
function
|
|
1870
|
-
let t = new
|
|
1871
|
-
return B.extend(n,
|
|
1872
|
-
return
|
|
1869
|
+
function zn(e) {
|
|
1870
|
+
let t = new X(e), n = ue(X.prototype.request, t);
|
|
1871
|
+
return B.extend(n, X.prototype, t, { allOwnKeys: !0 }), B.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(t) {
|
|
1872
|
+
return zn(J(e, t));
|
|
1873
1873
|
}, n;
|
|
1874
1874
|
}
|
|
1875
|
-
var
|
|
1876
|
-
|
|
1875
|
+
var Z = zn(W);
|
|
1876
|
+
Z.Axios = X, Z.CanceledError = q, Z.CancelToken = Fn, Z.isCancel = Kt, Z.VERSION = An, Z.toFormData = H, Z.AxiosError = V, Z.Cancel = Z.CanceledError, Z.all = function(e) {
|
|
1877
1877
|
return Promise.all(e);
|
|
1878
|
-
},
|
|
1878
|
+
}, Z.spread = In, Z.isAxiosError = Ln, Z.mergeConfig = J, Z.AxiosHeaders = K, Z.formToJSON = (e) => Pt(B.isHTMLForm(e) ? new FormData(e) : e), Z.getAdapter = Dn.getAdapter, Z.HttpStatusCode = Rn, Z.default = Z;
|
|
1879
1879
|
//#endregion
|
|
1880
1880
|
//#region src/modules/configs/serviceConfig/ServiceConfig.class.ts
|
|
1881
|
-
var
|
|
1881
|
+
var Bn = class {
|
|
1882
1882
|
baseUrl;
|
|
1883
1883
|
accessToken;
|
|
1884
1884
|
axiosInstance;
|
|
1885
1885
|
constructor({ baseUrl: e, accessToken: t }) {
|
|
1886
|
-
this.baseUrl = e, this.accessToken = t, this.axiosInstance =
|
|
1886
|
+
this.baseUrl = e, this.accessToken = t, this.axiosInstance = Z.create({
|
|
1887
1887
|
baseURL: this.baseUrl,
|
|
1888
1888
|
paramsSerializer: (e) => ie(e, { allowDots: !0 })
|
|
1889
1889
|
}), this.setupAxiosTokenHandler();
|
|
@@ -1892,24 +1892,24 @@ var Vn = class {
|
|
|
1892
1892
|
typeof this.accessToken == "function" ? this.axiosInstance.interceptors.request.use(async (e) => (e.headers["X-Webitel-Access"] = await this.accessToken(), e)) : this.axiosInstance.defaults.headers.common["X-Webitel-Access"] = this.accessToken;
|
|
1893
1893
|
}
|
|
1894
1894
|
};
|
|
1895
|
-
function
|
|
1896
|
-
return new
|
|
1895
|
+
function Vn(e) {
|
|
1896
|
+
return new Bn(e);
|
|
1897
1897
|
}
|
|
1898
1898
|
//#endregion
|
|
1899
1899
|
//#region src/modules/configs/socketConfig/SocketConfig.class.ts
|
|
1900
|
-
var
|
|
1900
|
+
var Hn = class {
|
|
1901
1901
|
baseUrl;
|
|
1902
1902
|
accessToken;
|
|
1903
1903
|
constructor({ baseUrl: e, accessToken: t }) {
|
|
1904
1904
|
this.baseUrl = e, this.accessToken = t;
|
|
1905
1905
|
}
|
|
1906
1906
|
};
|
|
1907
|
-
function
|
|
1908
|
-
return new
|
|
1907
|
+
function Un(e) {
|
|
1908
|
+
return new Hn(e);
|
|
1909
1909
|
}
|
|
1910
1910
|
//#endregion
|
|
1911
1911
|
//#region src/modules/messages/classes/Message.class.ts
|
|
1912
|
-
var
|
|
1912
|
+
var Wn = class {
|
|
1913
1913
|
_serviceConfig;
|
|
1914
1914
|
constructor(e, { serviceConfig: t }) {
|
|
1915
1915
|
Object.assign(this, e), this._serviceConfig = t;
|
|
@@ -1921,12 +1921,12 @@ var Gn = class {
|
|
|
1921
1921
|
throw Error("Method not implemented.");
|
|
1922
1922
|
}
|
|
1923
1923
|
};
|
|
1924
|
-
function
|
|
1925
|
-
return new
|
|
1924
|
+
function Gn(e, { serviceConfig: t }) {
|
|
1925
|
+
return new Wn(e, { serviceConfig: t });
|
|
1926
1926
|
}
|
|
1927
1927
|
//#endregion
|
|
1928
1928
|
//#region src/modules/messages/api/Messages.api.ts
|
|
1929
|
-
var
|
|
1929
|
+
var Kn = ({ axiosInstance: e }) => {
|
|
1930
1930
|
async function t(t, n = {}) {
|
|
1931
1931
|
let i = r(n, [l()]);
|
|
1932
1932
|
return r((await e.get(`/v1/${t}/messages`, { params: i })).data, [A()]);
|
|
@@ -1956,48 +1956,54 @@ var qn = ({ axiosInstance: e }) => {
|
|
|
1956
1956
|
sendDocumentMessage: a,
|
|
1957
1957
|
sendImageMessage: o
|
|
1958
1958
|
};
|
|
1959
|
-
},
|
|
1960
|
-
let r = await
|
|
1959
|
+
}, qn = (e) => async (t, n = {}) => await Kn(e).getMessageHistory(t, n), Jn = (e, { serviceConfig: t }) => e.map((e) => Gn(e, { serviceConfig: t })), Yn = async (e, t, n = {}) => {
|
|
1960
|
+
let r = await qn(e)(t, n);
|
|
1961
1961
|
return {
|
|
1962
1962
|
...r,
|
|
1963
|
-
items:
|
|
1963
|
+
items: Jn(r.items ?? [], { serviceConfig: e })
|
|
1964
1964
|
};
|
|
1965
|
-
},
|
|
1966
|
-
let n = oe(
|
|
1967
|
-
if (!
|
|
1968
|
-
if (
|
|
1969
|
-
let
|
|
1965
|
+
}, Xn = async (e, t) => {
|
|
1966
|
+
let { files: n, body: r, ...i } = t, a = oe(n), { threadId: o } = i.to;
|
|
1967
|
+
if (!o) throw Error("threadId is required to send a document message");
|
|
1968
|
+
if (a.length === 0) throw Error("At least one file is required to send a document message");
|
|
1969
|
+
let s = Kn(e), c = (await s.uploadFiles(o, a)).map((e) => ({
|
|
1970
1970
|
fileName: e.name,
|
|
1971
1971
|
id: `${e.id}`,
|
|
1972
1972
|
mimeType: e.mime,
|
|
1973
1973
|
sizeBytes: `${e.size}`
|
|
1974
1974
|
}));
|
|
1975
|
-
return
|
|
1976
|
-
...
|
|
1977
|
-
document: {
|
|
1975
|
+
return s.sendDocumentMessage({
|
|
1976
|
+
...i,
|
|
1977
|
+
document: {
|
|
1978
|
+
body: r,
|
|
1979
|
+
documents: c
|
|
1980
|
+
}
|
|
1978
1981
|
});
|
|
1979
|
-
},
|
|
1980
|
-
let n = oe(
|
|
1981
|
-
if (!
|
|
1982
|
-
if (
|
|
1983
|
-
let
|
|
1982
|
+
}, Zn = async (e, t) => {
|
|
1983
|
+
let { files: n, body: r, ...i } = t, a = oe(n), { threadId: o } = i.to;
|
|
1984
|
+
if (!o) throw Error("threadId is required to send an image message");
|
|
1985
|
+
if (a.length === 0) throw Error("At least one file is required to send an image message");
|
|
1986
|
+
let s = Kn(e), c = (await s.uploadFiles(o, a)).map((e) => ({
|
|
1984
1987
|
id: `${e.id}`,
|
|
1985
1988
|
mimeType: e.mime,
|
|
1986
1989
|
name: e.name
|
|
1987
1990
|
}));
|
|
1988
|
-
return
|
|
1989
|
-
...
|
|
1990
|
-
image: {
|
|
1991
|
+
return s.sendImageMessage({
|
|
1992
|
+
...i,
|
|
1993
|
+
image: {
|
|
1994
|
+
body: r,
|
|
1995
|
+
images: c
|
|
1996
|
+
}
|
|
1991
1997
|
});
|
|
1992
|
-
},
|
|
1998
|
+
}, Qn = async (e, t) => Kn(e).sendTextMessage(t);
|
|
1993
1999
|
//#endregion
|
|
1994
2000
|
//#region src/modules/messages/messagesSevice.ts
|
|
1995
|
-
function
|
|
2001
|
+
function $n(e) {
|
|
1996
2002
|
return {
|
|
1997
|
-
fetchMessageHistory: (t, n) =>
|
|
1998
|
-
sendTextMessage: (t) =>
|
|
1999
|
-
sendDocumentMessage: (t) =>
|
|
2000
|
-
sendImageMessage: (t) =>
|
|
2003
|
+
fetchMessageHistory: (t, n) => Yn(e, t, n ?? {}),
|
|
2004
|
+
sendTextMessage: (t) => Qn(e, t),
|
|
2005
|
+
sendDocumentMessage: (t) => Xn(e, t),
|
|
2006
|
+
sendImageMessage: (t) => Zn(e, t)
|
|
2001
2007
|
};
|
|
2002
2008
|
}
|
|
2003
2009
|
//#endregion
|
|
@@ -2010,7 +2016,7 @@ var er = class {
|
|
|
2010
2016
|
Object.assign(this, e), this._serviceConfig = t;
|
|
2011
2017
|
}
|
|
2012
2018
|
async sendTextMessage(e, t = {}) {
|
|
2013
|
-
return
|
|
2019
|
+
return $n(this.serviceConfig).sendTextMessage({
|
|
2014
2020
|
...t,
|
|
2015
2021
|
body: e,
|
|
2016
2022
|
to: { contact: {
|
|
@@ -2089,27 +2095,24 @@ var Q = {
|
|
|
2089
2095
|
Object.assign(this, e), this._serviceConfig = t;
|
|
2090
2096
|
}
|
|
2091
2097
|
async fetchMessageHistory(e) {
|
|
2092
|
-
return
|
|
2098
|
+
return $n(this.serviceConfig).fetchMessageHistory(this.id, e);
|
|
2093
2099
|
}
|
|
2094
|
-
async
|
|
2095
|
-
|
|
2096
|
-
|
|
2100
|
+
async sendMessage({ body: e, documents: t, images: n, sendId: r }) {
|
|
2101
|
+
let i = $n(this.serviceConfig), a = { threadId: this.id };
|
|
2102
|
+
return n ? i.sendImageMessage({
|
|
2103
|
+
files: n,
|
|
2097
2104
|
body: e,
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
return Z(this.serviceConfig).sendImageMessage({
|
|
2110
|
-
...t,
|
|
2111
|
-
files: oe(e),
|
|
2112
|
-
to: { threadId: this.id }
|
|
2105
|
+
sendId: r,
|
|
2106
|
+
to: a
|
|
2107
|
+
}) : t ? i.sendDocumentMessage({
|
|
2108
|
+
files: t,
|
|
2109
|
+
body: e,
|
|
2110
|
+
sendId: r,
|
|
2111
|
+
to: a
|
|
2112
|
+
}) : i.sendTextMessage({
|
|
2113
|
+
body: e ?? "",
|
|
2114
|
+
sendId: r,
|
|
2115
|
+
to: a
|
|
2113
2116
|
});
|
|
2114
2117
|
}
|
|
2115
2118
|
get serviceConfig() {
|
|
@@ -2122,7 +2125,7 @@ function lr(e, { serviceConfig: t }) {
|
|
|
2122
2125
|
//#endregion
|
|
2123
2126
|
//#region src/modules/socket/utils/instantiateSocketEventEntities.ts
|
|
2124
2127
|
function ur(e, { serviceConfig: t }) {
|
|
2125
|
-
return e.name === Q.ThreadMessage ?
|
|
2128
|
+
return e.name === Q.ThreadMessage ? Gn(e.payload, { serviceConfig: t }) : lr(e.payload, { serviceConfig: t });
|
|
2126
2129
|
}
|
|
2127
2130
|
//#endregion
|
|
2128
2131
|
//#region src/modules/socket/utils/processSocketEventPayload.ts
|
|
@@ -2233,6 +2236,6 @@ function xr(e) {
|
|
|
2233
2236
|
return { fetchThreads: (t) => br(e, t ?? {}) };
|
|
2234
2237
|
}
|
|
2235
2238
|
//#endregion
|
|
2236
|
-
export { $ as ChatsSocketConnectionStatus, Q as ChatsSocketMessage, gr as createChatsSocketClient,
|
|
2239
|
+
export { $ as ChatsSocketConnectionStatus, Q as ChatsSocketMessage, gr as createChatsSocketClient, Vn as createServiceConfig, Un as createSocketConfig, le as useAccountService, or as useContactsService, $n as useMessagesService, xr as useThreadsService };
|
|
2237
2240
|
|
|
2238
2241
|
//# sourceMappingURL=index.js.map
|