mhz-helpers 1.0.40 → 1.0.42
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 +138 -124
- package/package.json +15 -15
package/dist/index.js
CHANGED
|
@@ -214,13 +214,13 @@ function pe(t, e, n) {
|
|
|
214
214
|
return o && ue(f, o.prototype), f;
|
|
215
215
|
}, pe.apply(null, arguments);
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function Wn(t) {
|
|
218
218
|
return Function.toString.call(t).indexOf("[native code]") !== -1;
|
|
219
219
|
}
|
|
220
220
|
function Qe(t) {
|
|
221
221
|
var e = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
222
222
|
return Qe = function(r) {
|
|
223
|
-
if (r === null || !
|
|
223
|
+
if (r === null || !Wn(r))
|
|
224
224
|
return r;
|
|
225
225
|
if (typeof r != "function")
|
|
226
226
|
throw new TypeError("Super expression must either be null or a function");
|
|
@@ -242,7 +242,7 @@ function Qe(t) {
|
|
|
242
242
|
}), ue(s, r);
|
|
243
243
|
}, Qe(t);
|
|
244
244
|
}
|
|
245
|
-
var
|
|
245
|
+
var zn = /%[sdj%]/g, Kt = function() {
|
|
246
246
|
};
|
|
247
247
|
typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (Kt = function(e, n) {
|
|
248
248
|
typeof console < "u" && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING > "u" && n.every(function(r) {
|
|
@@ -265,7 +265,7 @@ function q(t) {
|
|
|
265
265
|
if (typeof t == "function")
|
|
266
266
|
return t.apply(null, n);
|
|
267
267
|
if (typeof t == "string") {
|
|
268
|
-
var o = t.replace(
|
|
268
|
+
var o = t.replace(zn, function(a) {
|
|
269
269
|
if (a === "%%")
|
|
270
270
|
return "%";
|
|
271
271
|
if (s >= i)
|
|
@@ -388,7 +388,7 @@ function yt(t, e) {
|
|
|
388
388
|
}
|
|
389
389
|
return t;
|
|
390
390
|
}
|
|
391
|
-
var
|
|
391
|
+
var Wt = function(e, n, r, s, i, o) {
|
|
392
392
|
e.required && (!r.hasOwnProperty(e.field) || P(n, o || e.type)) && s.push(q(i.messages.required, e.fullField));
|
|
393
393
|
}, tr = function(e, n, r, s, i) {
|
|
394
394
|
(/^\s+$/.test(n) || n === "") && s.push(q(i.messages.whitespace, e.fullField));
|
|
@@ -468,7 +468,7 @@ var zt = function(e, n, r, s, i, o) {
|
|
|
468
468
|
}
|
|
469
469
|
}, rr = function(e, n, r, s, i) {
|
|
470
470
|
if (e.required && n === void 0) {
|
|
471
|
-
|
|
471
|
+
Wt(e, n, r, s, i);
|
|
472
472
|
return;
|
|
473
473
|
}
|
|
474
474
|
var o = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], a = e.type;
|
|
@@ -489,8 +489,8 @@ var zt = function(e, n, r, s, i, o) {
|
|
|
489
489
|
o.test(n) || s.push(q(i.messages.pattern.mismatch, e.fullField, n, e.pattern));
|
|
490
490
|
}
|
|
491
491
|
}
|
|
492
|
-
},
|
|
493
|
-
required:
|
|
492
|
+
}, S = {
|
|
493
|
+
required: Wt,
|
|
494
494
|
whitespace: tr,
|
|
495
495
|
type: rr,
|
|
496
496
|
range: sr,
|
|
@@ -501,7 +501,7 @@ var zt = function(e, n, r, s, i, o) {
|
|
|
501
501
|
if (a) {
|
|
502
502
|
if (P(n, "string") && !e.required)
|
|
503
503
|
return r();
|
|
504
|
-
|
|
504
|
+
S.required(e, n, s, o, i, "string"), P(n, "string") || (S.type(e, n, s, o, i), S.range(e, n, s, o, i), S.pattern(e, n, s, o, i), e.whitespace === !0 && S.whitespace(e, n, s, o, i));
|
|
505
505
|
}
|
|
506
506
|
r(o);
|
|
507
507
|
}, ur = function(e, n, r, s, i) {
|
|
@@ -509,7 +509,7 @@ var zt = function(e, n, r, s, i, o) {
|
|
|
509
509
|
if (a) {
|
|
510
510
|
if (P(n) && !e.required)
|
|
511
511
|
return r();
|
|
512
|
-
|
|
512
|
+
S.required(e, n, s, o, i), n !== void 0 && S.type(e, n, s, o, i);
|
|
513
513
|
}
|
|
514
514
|
r(o);
|
|
515
515
|
}, cr = function(e, n, r, s, i) {
|
|
@@ -517,7 +517,7 @@ var zt = function(e, n, r, s, i, o) {
|
|
|
517
517
|
if (a) {
|
|
518
518
|
if (n === "" && (n = void 0), P(n) && !e.required)
|
|
519
519
|
return r();
|
|
520
|
-
|
|
520
|
+
S.required(e, n, s, o, i), n !== void 0 && (S.type(e, n, s, o, i), S.range(e, n, s, o, i));
|
|
521
521
|
}
|
|
522
522
|
r(o);
|
|
523
523
|
}, fr = function(e, n, r, s, i) {
|
|
@@ -525,7 +525,7 @@ var zt = function(e, n, r, s, i, o) {
|
|
|
525
525
|
if (a) {
|
|
526
526
|
if (P(n) && !e.required)
|
|
527
527
|
return r();
|
|
528
|
-
|
|
528
|
+
S.required(e, n, s, o, i), n !== void 0 && S.type(e, n, s, o, i);
|
|
529
529
|
}
|
|
530
530
|
r(o);
|
|
531
531
|
}, lr = function(e, n, r, s, i) {
|
|
@@ -533,7 +533,7 @@ var zt = function(e, n, r, s, i, o) {
|
|
|
533
533
|
if (a) {
|
|
534
534
|
if (P(n) && !e.required)
|
|
535
535
|
return r();
|
|
536
|
-
|
|
536
|
+
S.required(e, n, s, o, i), P(n) || S.type(e, n, s, o, i);
|
|
537
537
|
}
|
|
538
538
|
r(o);
|
|
539
539
|
}, hr = function(e, n, r, s, i) {
|
|
@@ -541,7 +541,7 @@ var zt = function(e, n, r, s, i, o) {
|
|
|
541
541
|
if (a) {
|
|
542
542
|
if (P(n) && !e.required)
|
|
543
543
|
return r();
|
|
544
|
-
|
|
544
|
+
S.required(e, n, s, o, i), n !== void 0 && (S.type(e, n, s, o, i), S.range(e, n, s, o, i));
|
|
545
545
|
}
|
|
546
546
|
r(o);
|
|
547
547
|
}, dr = function(e, n, r, s, i) {
|
|
@@ -549,7 +549,7 @@ var zt = function(e, n, r, s, i, o) {
|
|
|
549
549
|
if (a) {
|
|
550
550
|
if (P(n) && !e.required)
|
|
551
551
|
return r();
|
|
552
|
-
|
|
552
|
+
S.required(e, n, s, o, i), n !== void 0 && (S.type(e, n, s, o, i), S.range(e, n, s, o, i));
|
|
553
553
|
}
|
|
554
554
|
r(o);
|
|
555
555
|
}, pr = function(e, n, r, s, i) {
|
|
@@ -557,7 +557,7 @@ var zt = function(e, n, r, s, i, o) {
|
|
|
557
557
|
if (a) {
|
|
558
558
|
if (n == null && !e.required)
|
|
559
559
|
return r();
|
|
560
|
-
|
|
560
|
+
S.required(e, n, s, o, i, "array"), n != null && (S.type(e, n, s, o, i), S.range(e, n, s, o, i));
|
|
561
561
|
}
|
|
562
562
|
r(o);
|
|
563
563
|
}, yr = function(e, n, r, s, i) {
|
|
@@ -565,7 +565,7 @@ var zt = function(e, n, r, s, i, o) {
|
|
|
565
565
|
if (a) {
|
|
566
566
|
if (P(n) && !e.required)
|
|
567
567
|
return r();
|
|
568
|
-
|
|
568
|
+
S.required(e, n, s, o, i), n !== void 0 && S.type(e, n, s, o, i);
|
|
569
569
|
}
|
|
570
570
|
r(o);
|
|
571
571
|
}, mr = "enum", gr = function(e, n, r, s, i) {
|
|
@@ -573,7 +573,7 @@ var zt = function(e, n, r, s, i, o) {
|
|
|
573
573
|
if (a) {
|
|
574
574
|
if (P(n) && !e.required)
|
|
575
575
|
return r();
|
|
576
|
-
|
|
576
|
+
S.required(e, n, s, o, i), n !== void 0 && S[mr](e, n, s, o, i);
|
|
577
577
|
}
|
|
578
578
|
r(o);
|
|
579
579
|
}, br = function(e, n, r, s, i) {
|
|
@@ -581,7 +581,7 @@ var zt = function(e, n, r, s, i, o) {
|
|
|
581
581
|
if (a) {
|
|
582
582
|
if (P(n, "string") && !e.required)
|
|
583
583
|
return r();
|
|
584
|
-
|
|
584
|
+
S.required(e, n, s, o, i), P(n, "string") || S.pattern(e, n, s, o, i);
|
|
585
585
|
}
|
|
586
586
|
r(o);
|
|
587
587
|
}, vr = function(e, n, r, s, i) {
|
|
@@ -589,21 +589,21 @@ var zt = function(e, n, r, s, i, o) {
|
|
|
589
589
|
if (a) {
|
|
590
590
|
if (P(n, "date") && !e.required)
|
|
591
591
|
return r();
|
|
592
|
-
if (
|
|
592
|
+
if (S.required(e, n, s, o, i), !P(n, "date")) {
|
|
593
593
|
var u;
|
|
594
|
-
n instanceof Date ? u = n : u = new Date(n),
|
|
594
|
+
n instanceof Date ? u = n : u = new Date(n), S.type(e, u, s, o, i), u && S.range(e, u.getTime(), s, o, i);
|
|
595
595
|
}
|
|
596
596
|
}
|
|
597
597
|
r(o);
|
|
598
598
|
}, Or = function(e, n, r, s, i) {
|
|
599
599
|
var o = [], a = Array.isArray(n) ? "array" : typeof n;
|
|
600
|
-
|
|
600
|
+
S.required(e, n, s, o, i, a), r(o);
|
|
601
601
|
}, Pe = function(e, n, r, s, i) {
|
|
602
602
|
var o = e.type, a = [], u = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
603
603
|
if (u) {
|
|
604
604
|
if (P(n, o) && !e.required)
|
|
605
605
|
return r();
|
|
606
|
-
|
|
606
|
+
S.required(e, n, s, a, i, o), P(n, o) || S.type(e, n, s, a, i);
|
|
607
607
|
}
|
|
608
608
|
r(a);
|
|
609
609
|
}, wr = function(e, n, r, s, i) {
|
|
@@ -611,7 +611,7 @@ var zt = function(e, n, r, s, i, o) {
|
|
|
611
611
|
if (a) {
|
|
612
612
|
if (P(n) && !e.required)
|
|
613
613
|
return r();
|
|
614
|
-
|
|
614
|
+
S.required(e, n, s, o, i);
|
|
615
615
|
}
|
|
616
616
|
r(o);
|
|
617
617
|
}, ae = {
|
|
@@ -822,7 +822,7 @@ Z.warning = Kt;
|
|
|
822
822
|
Z.messages = ke;
|
|
823
823
|
Z.validators = ae;
|
|
824
824
|
const Er = Z.default || Z;
|
|
825
|
-
function
|
|
825
|
+
function Sr(t, e, n = {}) {
|
|
826
826
|
const {
|
|
827
827
|
validateOption: r = {},
|
|
828
828
|
immediate: s = !0,
|
|
@@ -875,7 +875,7 @@ function Ar(t, e, n = {}) {
|
|
|
875
875
|
};
|
|
876
876
|
}
|
|
877
877
|
function Bi(t, e) {
|
|
878
|
-
const { errorFields: n, isFinished: r, pass: s } =
|
|
878
|
+
const { errorFields: n, isFinished: r, pass: s } = Sr(t, e, {
|
|
879
879
|
validateOption: { suppressWarning: !0 }
|
|
880
880
|
}), i = B(0);
|
|
881
881
|
function o() {
|
|
@@ -891,9 +891,9 @@ function Bi(t, e) {
|
|
|
891
891
|
isValid: o
|
|
892
892
|
};
|
|
893
893
|
}
|
|
894
|
-
const
|
|
894
|
+
const zt = B(!1), Ar = we(zt);
|
|
895
895
|
function Rr(t) {
|
|
896
|
-
|
|
896
|
+
zt.value = t;
|
|
897
897
|
}
|
|
898
898
|
function Fr(t, e, n) {
|
|
899
899
|
Pr(n), e(), window.location.href = t;
|
|
@@ -914,7 +914,7 @@ function Vi() {
|
|
|
914
914
|
Cr(r, o), i(r), Rr(!0), t.push(s);
|
|
915
915
|
}
|
|
916
916
|
function n(r) {
|
|
917
|
-
|
|
917
|
+
Ar.value && t.push(r);
|
|
918
918
|
}
|
|
919
919
|
return {
|
|
920
920
|
auth: e,
|
|
@@ -927,7 +927,7 @@ function $i(t) {
|
|
|
927
927
|
function Ki(t) {
|
|
928
928
|
return t ? new Intl.DateTimeFormat().format(new Date(t)) : "-";
|
|
929
929
|
}
|
|
930
|
-
function
|
|
930
|
+
function Wi(t) {
|
|
931
931
|
return t ? new Intl.DateTimeFormat(void 0, {
|
|
932
932
|
year: "numeric",
|
|
933
933
|
month: "numeric",
|
|
@@ -936,7 +936,7 @@ function zi(t) {
|
|
|
936
936
|
minute: "numeric"
|
|
937
937
|
}).format(new Date(t)) : "-";
|
|
938
938
|
}
|
|
939
|
-
function
|
|
939
|
+
function zi() {
|
|
940
940
|
return `temp-${crypto.randomUUID()}`;
|
|
941
941
|
}
|
|
942
942
|
function Gi(t) {
|
|
@@ -960,7 +960,7 @@ function Gt(t, e) {
|
|
|
960
960
|
const { toString: Tr } = Object.prototype, { getPrototypeOf: tt } = Object, Ee = /* @__PURE__ */ ((t) => (e) => {
|
|
961
961
|
const n = Tr.call(e);
|
|
962
962
|
return t[n] || (t[n] = n.slice(8, -1).toLowerCase());
|
|
963
|
-
})(/* @__PURE__ */ Object.create(null)), M = (t) => (t = t.toLowerCase(), (e) => Ee(e) === t),
|
|
963
|
+
})(/* @__PURE__ */ Object.create(null)), M = (t) => (t = t.toLowerCase(), (e) => Ee(e) === t), Se = (t) => (e) => typeof e === t, { isArray: ne } = Array, ce = Se("undefined");
|
|
964
964
|
function xr(t) {
|
|
965
965
|
return t !== null && !ce(t) && t.constructor !== null && !ce(t.constructor) && _(t.constructor.isBuffer) && t.constructor.isBuffer(t);
|
|
966
966
|
}
|
|
@@ -969,12 +969,12 @@ function qr(t) {
|
|
|
969
969
|
let e;
|
|
970
970
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && Jt(t.buffer), e;
|
|
971
971
|
}
|
|
972
|
-
const Dr =
|
|
972
|
+
const Dr = Se("string"), _ = Se("function"), Xt = Se("number"), Ae = (t) => t !== null && typeof t == "object", _r = (t) => t === !0 || t === !1, ye = (t) => {
|
|
973
973
|
if (Ee(t) !== "object")
|
|
974
974
|
return !1;
|
|
975
975
|
const e = tt(t);
|
|
976
976
|
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Symbol.toStringTag in t) && !(Symbol.iterator in t);
|
|
977
|
-
}, Ur = M("Date"), Nr = M("File"), Ir = M("Blob"), Mr = M("FileList"), Qr = (t) =>
|
|
977
|
+
}, Ur = M("Date"), Nr = M("File"), Ir = M("Blob"), Mr = M("FileList"), Qr = (t) => Ae(t) && _(t.pipe), jr = (t) => {
|
|
978
978
|
let e;
|
|
979
979
|
return t && (typeof FormData == "function" && t instanceof FormData || _(t.append) && ((e = Ee(t)) === "formdata" || // detect form-data instance
|
|
980
980
|
e === "object" && _(t.toString) && t.toString() === "[object FormData]"));
|
|
@@ -1033,7 +1033,7 @@ const Br = (t, e, n, { allOwnKeys: r } = {}) => (le(e, (s, i) => {
|
|
|
1033
1033
|
t = String(t), (n === void 0 || n > t.length) && (n = t.length), n -= e.length;
|
|
1034
1034
|
const r = t.indexOf(e, n);
|
|
1035
1035
|
return r !== -1 && r === n;
|
|
1036
|
-
},
|
|
1036
|
+
}, Wr = (t) => {
|
|
1037
1037
|
if (!t)
|
|
1038
1038
|
return null;
|
|
1039
1039
|
if (ne(t))
|
|
@@ -1045,7 +1045,7 @@ const Br = (t, e, n, { allOwnKeys: r } = {}) => (le(e, (s, i) => {
|
|
|
1045
1045
|
for (; e-- > 0; )
|
|
1046
1046
|
n[e] = t[e];
|
|
1047
1047
|
return n;
|
|
1048
|
-
},
|
|
1048
|
+
}, zr = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && tt(Uint8Array)), Gr = (t, e) => {
|
|
1049
1049
|
const r = (t && t[Symbol.iterator]).call(t);
|
|
1050
1050
|
let s;
|
|
1051
1051
|
for (; (s = r.next()) && !s.done; ) {
|
|
@@ -1108,7 +1108,7 @@ function is(t) {
|
|
|
1108
1108
|
}
|
|
1109
1109
|
const os = (t) => {
|
|
1110
1110
|
const e = new Array(10), n = (r, s) => {
|
|
1111
|
-
if (
|
|
1111
|
+
if (Ae(r)) {
|
|
1112
1112
|
if (e.indexOf(r) >= 0)
|
|
1113
1113
|
return;
|
|
1114
1114
|
if (!("toJSON" in r)) {
|
|
@@ -1123,7 +1123,7 @@ const os = (t) => {
|
|
|
1123
1123
|
return r;
|
|
1124
1124
|
};
|
|
1125
1125
|
return n(t, 0);
|
|
1126
|
-
}, as = M("AsyncFunction"), us = (t) => t && (
|
|
1126
|
+
}, as = M("AsyncFunction"), us = (t) => t && (Ae(t) || _(t)) && _(t.then) && _(t.catch), d = {
|
|
1127
1127
|
isArray: ne,
|
|
1128
1128
|
isArrayBuffer: Jt,
|
|
1129
1129
|
isBuffer: xr,
|
|
@@ -1132,7 +1132,7 @@ const os = (t) => {
|
|
|
1132
1132
|
isString: Dr,
|
|
1133
1133
|
isNumber: Xt,
|
|
1134
1134
|
isBoolean: _r,
|
|
1135
|
-
isObject:
|
|
1135
|
+
isObject: Ae,
|
|
1136
1136
|
isPlainObject: ye,
|
|
1137
1137
|
isUndefined: ce,
|
|
1138
1138
|
isDate: Ur,
|
|
@@ -1142,7 +1142,7 @@ const os = (t) => {
|
|
|
1142
1142
|
isFunction: _,
|
|
1143
1143
|
isStream: Qr,
|
|
1144
1144
|
isURLSearchParams: Lr,
|
|
1145
|
-
isTypedArray:
|
|
1145
|
+
isTypedArray: zr,
|
|
1146
1146
|
isFileList: Mr,
|
|
1147
1147
|
forEach: le,
|
|
1148
1148
|
merge: Be,
|
|
@@ -1154,7 +1154,7 @@ const os = (t) => {
|
|
|
1154
1154
|
kindOf: Ee,
|
|
1155
1155
|
kindOfTest: M,
|
|
1156
1156
|
endsWith: Kr,
|
|
1157
|
-
toArray:
|
|
1157
|
+
toArray: Wr,
|
|
1158
1158
|
forEachEntry: Gr,
|
|
1159
1159
|
matchAll: Jr,
|
|
1160
1160
|
isHTMLForm: Xr,
|
|
@@ -1177,10 +1177,10 @@ const os = (t) => {
|
|
|
1177
1177
|
isAsyncFn: as,
|
|
1178
1178
|
isThenable: us
|
|
1179
1179
|
};
|
|
1180
|
-
function
|
|
1180
|
+
function A(t, e, n, r, s) {
|
|
1181
1181
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", e && (this.code = e), n && (this.config = n), r && (this.request = r), s && (this.response = s);
|
|
1182
1182
|
}
|
|
1183
|
-
d.inherits(
|
|
1183
|
+
d.inherits(A, Error, {
|
|
1184
1184
|
toJSON: function() {
|
|
1185
1185
|
return {
|
|
1186
1186
|
// Standard
|
|
@@ -1201,7 +1201,7 @@ d.inherits(S, Error, {
|
|
|
1201
1201
|
};
|
|
1202
1202
|
}
|
|
1203
1203
|
});
|
|
1204
|
-
const rn =
|
|
1204
|
+
const rn = A.prototype, sn = {};
|
|
1205
1205
|
[
|
|
1206
1206
|
"ERR_BAD_OPTION_VALUE",
|
|
1207
1207
|
"ERR_BAD_OPTION",
|
|
@@ -1219,13 +1219,13 @@ const rn = S.prototype, sn = {};
|
|
|
1219
1219
|
].forEach((t) => {
|
|
1220
1220
|
sn[t] = { value: t };
|
|
1221
1221
|
});
|
|
1222
|
-
Object.defineProperties(
|
|
1222
|
+
Object.defineProperties(A, sn);
|
|
1223
1223
|
Object.defineProperty(rn, "isAxiosError", { value: !0 });
|
|
1224
|
-
|
|
1224
|
+
A.from = (t, e, n, r, s, i) => {
|
|
1225
1225
|
const o = Object.create(rn);
|
|
1226
1226
|
return d.toFlatObject(t, o, function(u) {
|
|
1227
1227
|
return u !== Error.prototype;
|
|
1228
|
-
}, (a) => a !== "isAxiosError"),
|
|
1228
|
+
}, (a) => a !== "isAxiosError"), A.call(o, t.message, e, n, r, s), o.cause = t, o.name = t.name, i && Object.assign(o, i), o;
|
|
1229
1229
|
};
|
|
1230
1230
|
const cs = null;
|
|
1231
1231
|
function He(t) {
|
|
@@ -1264,7 +1264,7 @@ function Re(t, e, n) {
|
|
|
1264
1264
|
if (d.isDate(m))
|
|
1265
1265
|
return m.toISOString();
|
|
1266
1266
|
if (!u && d.isBlob(m))
|
|
1267
|
-
throw new
|
|
1267
|
+
throw new A("Blob is not supported. Use a Buffer instead.");
|
|
1268
1268
|
return d.isArrayBuffer(m) || d.isTypedArray(m) ? u && typeof Blob == "function" ? new Blob([m]) : Buffer.from(m) : m;
|
|
1269
1269
|
}
|
|
1270
1270
|
function h(m, l, g) {
|
|
@@ -1461,7 +1461,7 @@ function ln(t) {
|
|
|
1461
1461
|
}
|
|
1462
1462
|
return null;
|
|
1463
1463
|
}
|
|
1464
|
-
function
|
|
1464
|
+
function Ss(t, e, n) {
|
|
1465
1465
|
if (d.isString(t))
|
|
1466
1466
|
try {
|
|
1467
1467
|
return (e || JSON.parse)(t), d.trim(t);
|
|
@@ -1477,7 +1477,7 @@ const rt = {
|
|
|
1477
1477
|
transformRequest: [function(e, n) {
|
|
1478
1478
|
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, i = d.isObject(e);
|
|
1479
1479
|
if (i && d.isHTMLForm(e) && (e = new FormData(e)), d.isFormData(e))
|
|
1480
|
-
return s
|
|
1480
|
+
return s ? JSON.stringify(ln(e)) : e;
|
|
1481
1481
|
if (d.isArrayBuffer(e) || d.isBuffer(e) || d.isStream(e) || d.isFile(e) || d.isBlob(e))
|
|
1482
1482
|
return e;
|
|
1483
1483
|
if (d.isArrayBufferView(e))
|
|
@@ -1497,7 +1497,7 @@ const rt = {
|
|
|
1497
1497
|
);
|
|
1498
1498
|
}
|
|
1499
1499
|
}
|
|
1500
|
-
return i || s ? (n.setContentType("application/json", !1),
|
|
1500
|
+
return i || s ? (n.setContentType("application/json", !1), Ss(e)) : e;
|
|
1501
1501
|
}],
|
|
1502
1502
|
transformResponse: [function(e) {
|
|
1503
1503
|
const n = this.transitional || rt.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
@@ -1507,7 +1507,7 @@ const rt = {
|
|
|
1507
1507
|
return JSON.parse(e);
|
|
1508
1508
|
} catch (a) {
|
|
1509
1509
|
if (o)
|
|
1510
|
-
throw a.name === "SyntaxError" ?
|
|
1510
|
+
throw a.name === "SyntaxError" ? A.from(a, A.ERR_BAD_RESPONSE, this, null, this.response) : a;
|
|
1511
1511
|
}
|
|
1512
1512
|
}
|
|
1513
1513
|
return e;
|
|
@@ -1538,7 +1538,7 @@ const rt = {
|
|
|
1538
1538
|
d.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
|
|
1539
1539
|
rt.headers[t] = {};
|
|
1540
1540
|
});
|
|
1541
|
-
const st = rt,
|
|
1541
|
+
const st = rt, As = d.toObjectSet([
|
|
1542
1542
|
"age",
|
|
1543
1543
|
"authorization",
|
|
1544
1544
|
"content-length",
|
|
@@ -1561,7 +1561,7 @@ const st = rt, Ss = d.toObjectSet([
|
|
|
1561
1561
|
let n, r, s;
|
|
1562
1562
|
return t && t.split(`
|
|
1563
1563
|
`).forEach(function(o) {
|
|
1564
|
-
s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || e[n] &&
|
|
1564
|
+
s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || e[n] && As[n]) && (n === "set-cookie" ? e[n] ? e[n].push(r) : e[n] = [r] : e[n] = e[n] ? e[n] + ", " + r : r);
|
|
1565
1565
|
}), e;
|
|
1566
1566
|
}, Et = Symbol("internals");
|
|
1567
1567
|
function ie(t) {
|
|
@@ -1734,16 +1734,16 @@ function hn(t) {
|
|
|
1734
1734
|
return !!(t && t.__CANCEL__);
|
|
1735
1735
|
}
|
|
1736
1736
|
function he(t, e, n) {
|
|
1737
|
-
|
|
1737
|
+
A.call(this, t ?? "canceled", A.ERR_CANCELED, e, n), this.name = "CanceledError";
|
|
1738
1738
|
}
|
|
1739
|
-
d.inherits(he,
|
|
1739
|
+
d.inherits(he, A, {
|
|
1740
1740
|
__CANCEL__: !0
|
|
1741
1741
|
});
|
|
1742
1742
|
function xs(t, e, n) {
|
|
1743
1743
|
const r = n.config.validateStatus;
|
|
1744
|
-
!n.status || !r || r(n.status) ? t(n) : e(new
|
|
1744
|
+
!n.status || !r || r(n.status) ? t(n) : e(new A(
|
|
1745
1745
|
"Request failed with status code " + n.status,
|
|
1746
|
-
[
|
|
1746
|
+
[A.ERR_BAD_REQUEST, A.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
1747
1747
|
n.config,
|
|
1748
1748
|
n.request,
|
|
1749
1749
|
n
|
|
@@ -1837,7 +1837,7 @@ function Is(t, e) {
|
|
|
1837
1837
|
return b ? Math.round(p * 1e3 / b) : void 0;
|
|
1838
1838
|
};
|
|
1839
1839
|
}
|
|
1840
|
-
function
|
|
1840
|
+
function St(t, e) {
|
|
1841
1841
|
let n = 0;
|
|
1842
1842
|
const r = Is(50, 250);
|
|
1843
1843
|
return (s) => {
|
|
@@ -1901,15 +1901,15 @@ const Ms = typeof XMLHttpRequest < "u", Qs = Ms && function(t) {
|
|
|
1901
1901
|
if ("onloadend" in c ? c.onloadend = b : c.onreadystatechange = function() {
|
|
1902
1902
|
!c || c.readyState !== 4 || c.status === 0 && !(c.responseURL && c.responseURL.indexOf("file:") === 0) || setTimeout(b);
|
|
1903
1903
|
}, c.onabort = function() {
|
|
1904
|
-
c && (r(new
|
|
1904
|
+
c && (r(new A("Request aborted", A.ECONNABORTED, t, c)), c = null);
|
|
1905
1905
|
}, c.onerror = function() {
|
|
1906
|
-
r(new
|
|
1906
|
+
r(new A("Network Error", A.ERR_NETWORK, t, c)), c = null;
|
|
1907
1907
|
}, c.ontimeout = function() {
|
|
1908
1908
|
let g = t.timeout ? "timeout of " + t.timeout + "ms exceeded" : "timeout exceeded";
|
|
1909
1909
|
const y = t.transitional || cn;
|
|
1910
|
-
t.timeoutErrorMessage && (g = t.timeoutErrorMessage), r(new
|
|
1910
|
+
t.timeoutErrorMessage && (g = t.timeoutErrorMessage), r(new A(
|
|
1911
1911
|
g,
|
|
1912
|
-
y.clarifyTimeoutError ?
|
|
1912
|
+
y.clarifyTimeoutError ? A.ETIMEDOUT : A.ECONNABORTED,
|
|
1913
1913
|
t,
|
|
1914
1914
|
c
|
|
1915
1915
|
)), c = null;
|
|
@@ -1919,12 +1919,12 @@ const Ms = typeof XMLHttpRequest < "u", Qs = Ms && function(t) {
|
|
|
1919
1919
|
}
|
|
1920
1920
|
s === void 0 && i.setContentType(null), "setRequestHeader" in c && d.forEach(i.toJSON(), function(g, y) {
|
|
1921
1921
|
c.setRequestHeader(y, g);
|
|
1922
|
-
}), d.isUndefined(t.withCredentials) || (c.withCredentials = !!t.withCredentials), o && o !== "json" && (c.responseType = t.responseType), typeof t.onDownloadProgress == "function" && c.addEventListener("progress",
|
|
1922
|
+
}), d.isUndefined(t.withCredentials) || (c.withCredentials = !!t.withCredentials), o && o !== "json" && (c.responseType = t.responseType), typeof t.onDownloadProgress == "function" && c.addEventListener("progress", St(t.onDownloadProgress, !0)), typeof t.onUploadProgress == "function" && c.upload && c.upload.addEventListener("progress", St(t.onUploadProgress)), (t.cancelToken || t.signal) && (u = (l) => {
|
|
1923
1923
|
c && (r(!l || l.type ? new he(null, t, c) : l), c.abort(), c = null);
|
|
1924
1924
|
}, t.cancelToken && t.cancelToken.subscribe(u), t.signal && (t.signal.aborted ? u() : t.signal.addEventListener("abort", u)));
|
|
1925
1925
|
const m = Ns(p);
|
|
1926
1926
|
if (m && I.protocols.indexOf(m) === -1) {
|
|
1927
|
-
r(new
|
|
1927
|
+
r(new A("Unsupported protocol " + m + ":", A.ERR_BAD_REQUEST, t));
|
|
1928
1928
|
return;
|
|
1929
1929
|
}
|
|
1930
1930
|
c.send(s || null);
|
|
@@ -1942,7 +1942,7 @@ d.forEach(Ve, (t, e) => {
|
|
|
1942
1942
|
Object.defineProperty(t, "adapterName", { value: e });
|
|
1943
1943
|
}
|
|
1944
1944
|
});
|
|
1945
|
-
const
|
|
1945
|
+
const At = (t) => `- ${t}`, js = (t) => d.isFunction(t) || t === null || t === !1, pn = {
|
|
1946
1946
|
getAdapter: (t) => {
|
|
1947
1947
|
t = d.isArray(t) ? t : [t];
|
|
1948
1948
|
const { length: e } = t;
|
|
@@ -1952,7 +1952,7 @@ const St = (t) => `- ${t}`, js = (t) => d.isFunction(t) || t === null || t === !
|
|
|
1952
1952
|
n = t[i];
|
|
1953
1953
|
let o;
|
|
1954
1954
|
if (r = n, !js(n) && (r = Ve[(o = String(n)).toLowerCase()], r === void 0))
|
|
1955
|
-
throw new
|
|
1955
|
+
throw new A(`Unknown adapter '${o}'`);
|
|
1956
1956
|
if (r)
|
|
1957
1957
|
break;
|
|
1958
1958
|
s[o || "#" + i] = r;
|
|
@@ -1962,9 +1962,9 @@ const St = (t) => `- ${t}`, js = (t) => d.isFunction(t) || t === null || t === !
|
|
|
1962
1962
|
([a, u]) => `adapter ${a} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1963
1963
|
);
|
|
1964
1964
|
let o = e ? i.length > 1 ? `since :
|
|
1965
|
-
` + i.map(
|
|
1966
|
-
`) : " " +
|
|
1967
|
-
throw new
|
|
1965
|
+
` + i.map(At).join(`
|
|
1966
|
+
`) : " " + At(i[0]) : "as no adapter specified";
|
|
1967
|
+
throw new A(
|
|
1968
1968
|
"There is no suitable adapter to dispatch the request " + o,
|
|
1969
1969
|
"ERR_NOT_SUPPORT"
|
|
1970
1970
|
);
|
|
@@ -2062,7 +2062,7 @@ function ee(t, e) {
|
|
|
2062
2062
|
d.isUndefined(p) && c !== a || (n[h] = p);
|
|
2063
2063
|
}), n;
|
|
2064
2064
|
}
|
|
2065
|
-
const yn = "1.6.
|
|
2065
|
+
const yn = "1.6.7", it = {};
|
|
2066
2066
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
|
|
2067
2067
|
it[t] = function(r) {
|
|
2068
2068
|
return typeof r === t || "a" + (e < 1 ? "n " : " ") + t;
|
|
@@ -2075,9 +2075,9 @@ it.transitional = function(e, n, r) {
|
|
|
2075
2075
|
}
|
|
2076
2076
|
return (i, o, a) => {
|
|
2077
2077
|
if (e === !1)
|
|
2078
|
-
throw new
|
|
2078
|
+
throw new A(
|
|
2079
2079
|
s(o, " has been removed" + (n ? " in " + n : "")),
|
|
2080
|
-
|
|
2080
|
+
A.ERR_DEPRECATED
|
|
2081
2081
|
);
|
|
2082
2082
|
return n && !Ct[o] && (Ct[o] = !0, console.warn(
|
|
2083
2083
|
s(
|
|
@@ -2089,7 +2089,7 @@ it.transitional = function(e, n, r) {
|
|
|
2089
2089
|
};
|
|
2090
2090
|
function Ls(t, e, n) {
|
|
2091
2091
|
if (typeof t != "object")
|
|
2092
|
-
throw new
|
|
2092
|
+
throw new A("options must be an object", A.ERR_BAD_OPTION_VALUE);
|
|
2093
2093
|
const r = Object.keys(t);
|
|
2094
2094
|
let s = r.length;
|
|
2095
2095
|
for (; s-- > 0; ) {
|
|
@@ -2097,11 +2097,11 @@ function Ls(t, e, n) {
|
|
|
2097
2097
|
if (o) {
|
|
2098
2098
|
const a = t[i], u = a === void 0 || o(a, i, t);
|
|
2099
2099
|
if (u !== !0)
|
|
2100
|
-
throw new
|
|
2100
|
+
throw new A("option " + i + " must be " + u, A.ERR_BAD_OPTION_VALUE);
|
|
2101
2101
|
continue;
|
|
2102
2102
|
}
|
|
2103
2103
|
if (n !== !0)
|
|
2104
|
-
throw new
|
|
2104
|
+
throw new A("Unknown option " + i, A.ERR_BAD_OPTION);
|
|
2105
2105
|
}
|
|
2106
2106
|
}
|
|
2107
2107
|
const $e = {
|
|
@@ -2123,7 +2123,21 @@ class be {
|
|
|
2123
2123
|
*
|
|
2124
2124
|
* @returns {Promise} The Promise to be fulfilled
|
|
2125
2125
|
*/
|
|
2126
|
-
request(e, n) {
|
|
2126
|
+
async request(e, n) {
|
|
2127
|
+
try {
|
|
2128
|
+
return await this._request(e, n);
|
|
2129
|
+
} catch (r) {
|
|
2130
|
+
if (r instanceof Error) {
|
|
2131
|
+
let s;
|
|
2132
|
+
Error.captureStackTrace ? Error.captureStackTrace(s = {}) : s = new Error();
|
|
2133
|
+
const i = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
2134
|
+
r.stack ? i && !String(r.stack).endsWith(i.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
2135
|
+
` + i) : r.stack = i;
|
|
2136
|
+
}
|
|
2137
|
+
throw r;
|
|
2138
|
+
}
|
|
2139
|
+
}
|
|
2140
|
+
_request(e, n) {
|
|
2127
2141
|
typeof e == "string" ? (n = n || {}, n.url = e) : n = e || {}, n = ee(this.defaults, n);
|
|
2128
2142
|
const { transitional: r, paramsSerializer: s, headers: i } = n;
|
|
2129
2143
|
r !== void 0 && $e.assertOptions(r, {
|
|
@@ -2372,7 +2386,7 @@ F.CancelToken = ks;
|
|
|
2372
2386
|
F.isCancel = hn;
|
|
2373
2387
|
F.VERSION = yn;
|
|
2374
2388
|
F.toFormData = Re;
|
|
2375
|
-
F.AxiosError =
|
|
2389
|
+
F.AxiosError = A;
|
|
2376
2390
|
F.Cancel = F.CanceledError;
|
|
2377
2391
|
F.all = function(e) {
|
|
2378
2392
|
return Promise.all(e);
|
|
@@ -2414,13 +2428,13 @@ var re = class {
|
|
|
2414
2428
|
}
|
|
2415
2429
|
onUnsubscribe() {
|
|
2416
2430
|
}
|
|
2417
|
-
},
|
|
2431
|
+
}, z = typeof window > "u" || "Deno" in window;
|
|
2418
2432
|
function D() {
|
|
2419
2433
|
}
|
|
2420
2434
|
function Ks(t, e) {
|
|
2421
2435
|
return typeof t == "function" ? t(e) : t;
|
|
2422
2436
|
}
|
|
2423
|
-
function
|
|
2437
|
+
function We(t) {
|
|
2424
2438
|
return typeof t == "number" && t >= 0 && t !== 1 / 0;
|
|
2425
2439
|
}
|
|
2426
2440
|
function bn(t, e) {
|
|
@@ -2468,7 +2482,7 @@ function at(t, e) {
|
|
|
2468
2482
|
function G(t) {
|
|
2469
2483
|
return JSON.stringify(
|
|
2470
2484
|
t,
|
|
2471
|
-
(e, n) =>
|
|
2485
|
+
(e, n) => ze(n) ? Object.keys(n).sort().reduce((r, s) => (r[s] = n[s], r), {}) : n
|
|
2472
2486
|
);
|
|
2473
2487
|
}
|
|
2474
2488
|
function fe(t, e) {
|
|
@@ -2478,7 +2492,7 @@ function vn(t, e) {
|
|
|
2478
2492
|
if (t === e)
|
|
2479
2493
|
return t;
|
|
2480
2494
|
const n = qt(t) && qt(e);
|
|
2481
|
-
if (n ||
|
|
2495
|
+
if (n || ze(t) && ze(e)) {
|
|
2482
2496
|
const r = n ? t : Object.keys(t), s = r.length, i = n ? e : Object.keys(e), o = i.length, a = n ? [] : {};
|
|
2483
2497
|
let u = 0;
|
|
2484
2498
|
for (let f = 0; f < o; f++) {
|
|
@@ -2500,7 +2514,7 @@ function ve(t, e) {
|
|
|
2500
2514
|
function qt(t) {
|
|
2501
2515
|
return Array.isArray(t) && t.length === Object.keys(t).length;
|
|
2502
2516
|
}
|
|
2503
|
-
function
|
|
2517
|
+
function ze(t) {
|
|
2504
2518
|
if (!Dt(t))
|
|
2505
2519
|
return !1;
|
|
2506
2520
|
const e = t.constructor;
|
|
@@ -2512,7 +2526,7 @@ function We(t) {
|
|
|
2512
2526
|
function Dt(t) {
|
|
2513
2527
|
return Object.prototype.toString.call(t) === "[object Object]";
|
|
2514
2528
|
}
|
|
2515
|
-
function
|
|
2529
|
+
function Ws(t) {
|
|
2516
2530
|
return new Promise((e) => {
|
|
2517
2531
|
setTimeout(e, t);
|
|
2518
2532
|
});
|
|
@@ -2520,7 +2534,7 @@ function zs(t) {
|
|
|
2520
2534
|
function Ge(t, e, n) {
|
|
2521
2535
|
return typeof n.structuralSharing == "function" ? n.structuralSharing(t, e) : n.structuralSharing !== !1 ? vn(t, e) : e;
|
|
2522
2536
|
}
|
|
2523
|
-
function
|
|
2537
|
+
function zs(t, e, n = 0) {
|
|
2524
2538
|
const r = [...t, e];
|
|
2525
2539
|
return n && r.length > n ? r.slice(1) : r;
|
|
2526
2540
|
}
|
|
@@ -2534,7 +2548,7 @@ var Js = class extends re {
|
|
|
2534
2548
|
#n;
|
|
2535
2549
|
constructor() {
|
|
2536
2550
|
super(), this.#n = (t) => {
|
|
2537
|
-
if (!
|
|
2551
|
+
if (!z && window.addEventListener) {
|
|
2538
2552
|
const e = () => t();
|
|
2539
2553
|
return window.addEventListener("visibilitychange", e, !1), () => {
|
|
2540
2554
|
window.removeEventListener("visibilitychange", e);
|
|
@@ -2570,7 +2584,7 @@ var Js = class extends re {
|
|
|
2570
2584
|
#n;
|
|
2571
2585
|
constructor() {
|
|
2572
2586
|
super(), this.#n = (t) => {
|
|
2573
|
-
if (!
|
|
2587
|
+
if (!z && window.addEventListener) {
|
|
2574
2588
|
const e = () => t(!0), n = () => t(!1);
|
|
2575
2589
|
return window.addEventListener("online", e, !1), window.addEventListener("offline", n, !1), () => {
|
|
2576
2590
|
window.removeEventListener("online", e), window.removeEventListener("offline", n);
|
|
@@ -2643,12 +2657,12 @@ function wn(t) {
|
|
|
2643
2657
|
Promise.resolve(g).then(p).catch((y) => {
|
|
2644
2658
|
if (r)
|
|
2645
2659
|
return;
|
|
2646
|
-
const O = t.retry ?? (
|
|
2660
|
+
const O = t.retry ?? (z ? 0 : 3), v = t.retryDelay ?? Ys, w = typeof v == "function" ? v(n, y) : v, R = O === !0 || typeof O == "number" && n < O || typeof O == "function" && O(n, y);
|
|
2647
2661
|
if (e || !R) {
|
|
2648
2662
|
b(y);
|
|
2649
2663
|
return;
|
|
2650
2664
|
}
|
|
2651
|
-
n++, t.onFail?.(n, y),
|
|
2665
|
+
n++, t.onFail?.(n, y), Ws(w).then(() => {
|
|
2652
2666
|
if (c())
|
|
2653
2667
|
return m();
|
|
2654
2668
|
}).then(() => {
|
|
@@ -2718,23 +2732,20 @@ var T = Zs(), En = class {
|
|
|
2718
2732
|
this.clearGcTimeout();
|
|
2719
2733
|
}
|
|
2720
2734
|
scheduleGc() {
|
|
2721
|
-
this.clearGcTimeout(),
|
|
2735
|
+
this.clearGcTimeout(), We(this.gcTime) && (this.#e = setTimeout(() => {
|
|
2722
2736
|
this.optionalRemove();
|
|
2723
2737
|
}, this.gcTime));
|
|
2724
2738
|
}
|
|
2725
2739
|
updateGcTime(t) {
|
|
2726
2740
|
this.gcTime = Math.max(
|
|
2727
2741
|
this.gcTime || 0,
|
|
2728
|
-
t ?? (
|
|
2742
|
+
t ?? (z ? 1 / 0 : 5 * 60 * 1e3)
|
|
2729
2743
|
);
|
|
2730
2744
|
}
|
|
2731
2745
|
clearGcTimeout() {
|
|
2732
2746
|
this.#e && (clearTimeout(this.#e), this.#e = void 0);
|
|
2733
2747
|
}
|
|
2734
2748
|
}, ei = class extends En {
|
|
2735
|
-
constructor(t) {
|
|
2736
|
-
super(), this.#u = !1, this.#o = t.defaultOptions, this.#c(t.options), this.#i = [], this.#n = t.cache, this.queryKey = t.queryKey, this.queryHash = t.queryHash, this.#e = t.state || ti(this.options), this.state = this.#e, this.scheduleGc();
|
|
2737
|
-
}
|
|
2738
2749
|
#e;
|
|
2739
2750
|
#t;
|
|
2740
2751
|
#n;
|
|
@@ -2743,6 +2754,9 @@ var T = Zs(), En = class {
|
|
|
2743
2754
|
#i;
|
|
2744
2755
|
#o;
|
|
2745
2756
|
#u;
|
|
2757
|
+
constructor(t) {
|
|
2758
|
+
super(), this.#u = !1, this.#o = t.defaultOptions, this.#c(t.options), this.#i = [], this.#n = t.cache, this.queryKey = t.queryKey, this.queryHash = t.queryHash, this.#e = t.state || ti(this.options), this.state = this.#e, this.scheduleGc();
|
|
2759
|
+
}
|
|
2746
2760
|
get meta() {
|
|
2747
2761
|
return this.options.meta;
|
|
2748
2762
|
}
|
|
@@ -2987,7 +3001,7 @@ function ti(t) {
|
|
|
2987
3001
|
fetchStatus: "idle"
|
|
2988
3002
|
};
|
|
2989
3003
|
}
|
|
2990
|
-
var
|
|
3004
|
+
var Sn = class extends re {
|
|
2991
3005
|
constructor(e = {}) {
|
|
2992
3006
|
super(), this.config = e, this.#e = /* @__PURE__ */ new Map();
|
|
2993
3007
|
}
|
|
@@ -3059,13 +3073,13 @@ var An = class extends re {
|
|
|
3059
3073
|
});
|
|
3060
3074
|
}
|
|
3061
3075
|
}, ni = class extends En {
|
|
3062
|
-
constructor(t) {
|
|
3063
|
-
super(), this.mutationId = t.mutationId, this.#t = t.defaultOptions, this.#n = t.mutationCache, this.#e = [], this.state = t.state || Sn(), this.setOptions(t.options), this.scheduleGc();
|
|
3064
|
-
}
|
|
3065
3076
|
#e;
|
|
3066
3077
|
#t;
|
|
3067
3078
|
#n;
|
|
3068
3079
|
#r;
|
|
3080
|
+
constructor(t) {
|
|
3081
|
+
super(), this.mutationId = t.mutationId, this.#t = t.defaultOptions, this.#n = t.mutationCache, this.#e = [], this.state = t.state || An(), this.setOptions(t.options), this.scheduleGc();
|
|
3082
|
+
}
|
|
3069
3083
|
setOptions(t) {
|
|
3070
3084
|
this.options = { ...this.#t, ...t }, this.updateGcTime(this.options.gcTime);
|
|
3071
3085
|
}
|
|
@@ -3228,7 +3242,7 @@ var An = class extends re {
|
|
|
3228
3242
|
});
|
|
3229
3243
|
}
|
|
3230
3244
|
};
|
|
3231
|
-
function
|
|
3245
|
+
function An() {
|
|
3232
3246
|
return {
|
|
3233
3247
|
context: void 0,
|
|
3234
3248
|
data: void 0,
|
|
@@ -3334,7 +3348,7 @@ function ri(t) {
|
|
|
3334
3348
|
h(y);
|
|
3335
3349
|
const O = await c(
|
|
3336
3350
|
y
|
|
3337
|
-
), { maxPages: v } = e.options, w = g ? Gs :
|
|
3351
|
+
), { maxPages: v } = e.options, w = g ? Gs : zs;
|
|
3338
3352
|
return {
|
|
3339
3353
|
pages: w(m.pages, O, v),
|
|
3340
3354
|
pageParams: w(m.pageParams, l, v)
|
|
@@ -3399,7 +3413,7 @@ var ii = class {
|
|
|
3399
3413
|
#o;
|
|
3400
3414
|
#u;
|
|
3401
3415
|
constructor(e = {}) {
|
|
3402
|
-
this.#e = e.queryCache || new
|
|
3416
|
+
this.#e = e.queryCache || new Sn(), this.#t = e.mutationCache || new Rn(), this.#n = e.defaultOptions || {}, this.#r = /* @__PURE__ */ new Map(), this.#s = /* @__PURE__ */ new Map(), this.#i = 0;
|
|
3403
3417
|
}
|
|
3404
3418
|
mount() {
|
|
3405
3419
|
this.#i++, this.#i === 1 && (this.#o = Oe.subscribe(() => {
|
|
@@ -3686,7 +3700,7 @@ var ii = class {
|
|
|
3686
3700
|
return t?.throwOnError || (e = e.catch(D)), e;
|
|
3687
3701
|
}
|
|
3688
3702
|
#y() {
|
|
3689
|
-
if (this.#v(),
|
|
3703
|
+
if (this.#v(), z || this.#r.isStale || !We(this.options.staleTime))
|
|
3690
3704
|
return;
|
|
3691
3705
|
const e = bn(
|
|
3692
3706
|
this.#r.dataUpdatedAt,
|
|
@@ -3700,7 +3714,7 @@ var ii = class {
|
|
|
3700
3714
|
return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.#t) : this.options.refetchInterval) ?? !1;
|
|
3701
3715
|
}
|
|
3702
3716
|
#g(t) {
|
|
3703
|
-
this.#O(), this.#f = t, !(
|
|
3717
|
+
this.#O(), this.#f = t, !(z || this.options.enabled === !1 || !We(this.#f) || this.#f === 0) && (this.#h = setInterval(() => {
|
|
3704
3718
|
(this.options.refetchIntervalInBackground || Oe.isFocused()) && this.#d();
|
|
3705
3719
|
}, this.#f));
|
|
3706
3720
|
}
|
|
@@ -3844,13 +3858,13 @@ function ui(t, e) {
|
|
|
3844
3858
|
return !ve(t.getCurrentResult(), e);
|
|
3845
3859
|
}
|
|
3846
3860
|
var ci = class extends re {
|
|
3847
|
-
constructor(t, e) {
|
|
3848
|
-
super(), this.#t = void 0, this.#e = t, this.setOptions(e), this.bindMethods(), this.#s();
|
|
3849
|
-
}
|
|
3850
3861
|
#e;
|
|
3851
|
-
#t;
|
|
3862
|
+
#t = void 0;
|
|
3852
3863
|
#n;
|
|
3853
3864
|
#r;
|
|
3865
|
+
constructor(t, e) {
|
|
3866
|
+
super(), this.#e = t, this.setOptions(e), this.bindMethods(), this.#s();
|
|
3867
|
+
}
|
|
3854
3868
|
bindMethods() {
|
|
3855
3869
|
this.mutate = this.mutate.bind(this), this.reset = this.reset.bind(this);
|
|
3856
3870
|
}
|
|
@@ -3878,7 +3892,7 @@ var ci = class extends re {
|
|
|
3878
3892
|
return this.#r = e, this.#n?.removeObserver(this), this.#n = this.#e.getMutationCache().build(this.#e, this.options), this.#n.addObserver(this), this.#n.execute(t);
|
|
3879
3893
|
}
|
|
3880
3894
|
#s() {
|
|
3881
|
-
const t = this.#n?.state ??
|
|
3895
|
+
const t = this.#n?.state ?? An();
|
|
3882
3896
|
this.#t = {
|
|
3883
3897
|
...t,
|
|
3884
3898
|
isPending: t.status === "pending",
|
|
@@ -3959,7 +3973,7 @@ function Pn(t = "") {
|
|
|
3959
3973
|
);
|
|
3960
3974
|
return n;
|
|
3961
3975
|
}
|
|
3962
|
-
var Tn = class extends
|
|
3976
|
+
var Tn = class extends Sn {
|
|
3963
3977
|
find(t) {
|
|
3964
3978
|
return super.find(E(t));
|
|
3965
3979
|
}
|
|
@@ -4571,7 +4585,7 @@ const Dn = {
|
|
|
4571
4585
|
Z̧: "Z",
|
|
4572
4586
|
z̧: "z"
|
|
4573
4587
|
}, wi = Object.keys(Dn).join("|"), Ei = new RegExp(wi, "g");
|
|
4574
|
-
function
|
|
4588
|
+
function Si(t) {
|
|
4575
4589
|
return t.replace(Ei, (e) => Dn[e]);
|
|
4576
4590
|
}
|
|
4577
4591
|
/**
|
|
@@ -4590,7 +4604,7 @@ const x = {
|
|
|
4590
4604
|
MATCHES: 1,
|
|
4591
4605
|
NO_MATCH: 0
|
|
4592
4606
|
};
|
|
4593
|
-
function
|
|
4607
|
+
function Ai(t, e, n) {
|
|
4594
4608
|
var r;
|
|
4595
4609
|
if (n = n || {}, n.threshold = (r = n.threshold) != null ? r : x.MATCHES, !n.accessors) {
|
|
4596
4610
|
const o = It(t, e, n);
|
|
@@ -4661,7 +4675,7 @@ function Mt(t, e) {
|
|
|
4661
4675
|
let {
|
|
4662
4676
|
keepDiacritics: n
|
|
4663
4677
|
} = e;
|
|
4664
|
-
return t = `${t}`, n || (t =
|
|
4678
|
+
return t = `${t}`, n || (t = Si(t)), t;
|
|
4665
4679
|
}
|
|
4666
4680
|
function Ci(t, e) {
|
|
4667
4681
|
let n = e;
|
|
@@ -4691,21 +4705,21 @@ function Ti(t) {
|
|
|
4691
4705
|
...t
|
|
4692
4706
|
};
|
|
4693
4707
|
}
|
|
4694
|
-
function
|
|
4708
|
+
function W(t) {
|
|
4695
4709
|
return t.state.fetchStatus === "fetching" ? 0 : t.state.fetchStatus === "paused" ? 4 : t.getObserversCount() ? t.isStale() ? 2 : 1 : 3;
|
|
4696
4710
|
}
|
|
4697
4711
|
function jt(t) {
|
|
4698
|
-
const e =
|
|
4712
|
+
const e = W(t);
|
|
4699
4713
|
return e === 0 ? "fetching" : e === 4 ? "paused" : e === 2 ? "stale" : e === 3 ? "inactive" : "fresh";
|
|
4700
4714
|
}
|
|
4701
4715
|
function xi(t) {
|
|
4702
|
-
return
|
|
4716
|
+
return W(t) === 2 ? 0 : 16777215;
|
|
4703
4717
|
}
|
|
4704
4718
|
function qi(t) {
|
|
4705
|
-
const e =
|
|
4719
|
+
const e = W(t);
|
|
4706
4720
|
return e === 0 ? 27647 : e === 4 ? 9193963 : e === 2 ? 16757248 : e === 3 ? 4148832 : 33575;
|
|
4707
4721
|
}
|
|
4708
|
-
var Di = (t, e) => t.queryHash.localeCompare(e.queryHash), _n = (t, e) => t.state.dataUpdatedAt < e.state.dataUpdatedAt ? 1 : -1, _i = (t, e) =>
|
|
4722
|
+
var Di = (t, e) => t.queryHash.localeCompare(e.queryHash), _n = (t, e) => t.state.dataUpdatedAt < e.state.dataUpdatedAt ? 1 : -1, _i = (t, e) => W(t) === W(e) ? _n(t, e) : W(t) > W(e) ? 1 : -1, Ue = {
|
|
4709
4723
|
"Status > Last Updated": _i,
|
|
4710
4724
|
"Query Hash": Di,
|
|
4711
4725
|
"Last Updated": _n
|
|
@@ -4850,7 +4864,7 @@ function Ui(t, e) {
|
|
|
4850
4864
|
}), n.on.getInspectorTree((i) => {
|
|
4851
4865
|
if (i.inspectorId === V) {
|
|
4852
4866
|
const o = s.getAll(), a = n.getSettings(), h = (i.filter ? o.filter(
|
|
4853
|
-
(c) =>
|
|
4867
|
+
(c) => Ai(c.queryHash, i.filter).passed
|
|
4854
4868
|
) : [...o]).sort(
|
|
4855
4869
|
(c, p) => Ue[a.sortFn](c, p) * a.baseSort
|
|
4856
4870
|
).map((c) => {
|
|
@@ -4921,7 +4935,7 @@ var so = {
|
|
|
4921
4935
|
const o = "queryClientConfig" in e ? e.queryClientConfig : void 0;
|
|
4922
4936
|
r = new xn(o);
|
|
4923
4937
|
}
|
|
4924
|
-
|
|
4938
|
+
z || r.mount();
|
|
4925
4939
|
let s = () => {
|
|
4926
4940
|
};
|
|
4927
4941
|
if (e.clientPersister) {
|
|
@@ -4947,7 +4961,7 @@ var so = {
|
|
|
4947
4961
|
};
|
|
4948
4962
|
function Ni(t, e, n) {
|
|
4949
4963
|
process.env.NODE_ENV === "development" && (kt() || console.warn(
|
|
4950
|
-
'vue-query
|
|
4964
|
+
'vue-query composable like "useQuery()" should only be used inside a "setup()" function or a running effect scope. They might otherwise lead to memory leaks.'
|
|
4951
4965
|
));
|
|
4952
4966
|
const r = n || Pn(), s = $(() => {
|
|
4953
4967
|
const p = E(e);
|
|
@@ -5008,7 +5022,7 @@ function io(t, e) {
|
|
|
5008
5022
|
}
|
|
5009
5023
|
function oo(t, e) {
|
|
5010
5024
|
process.env.NODE_ENV === "development" && (kt() || console.warn(
|
|
5011
|
-
'vue-query
|
|
5025
|
+
'vue-query composable like "useQuery()" should only be used inside a "setup()" function or a running effect scope. They might otherwise lead to memory leaks.'
|
|
5012
5026
|
));
|
|
5013
5027
|
const n = e || Pn(), r = $(() => n.defaultMutationOptions(E(t))), s = new ci(n, r.value), i = Bt(s.getCurrentResult()), o = s.subscribe((f) => {
|
|
5014
5028
|
Xe(i, f);
|
|
@@ -5064,17 +5078,17 @@ export {
|
|
|
5064
5078
|
gn as api,
|
|
5065
5079
|
$i as clone,
|
|
5066
5080
|
ji as convertParams,
|
|
5067
|
-
|
|
5081
|
+
zi as createTempId,
|
|
5068
5082
|
$s as deleteAuthHeader,
|
|
5069
5083
|
Pr as deleteCookieToken,
|
|
5070
5084
|
Ji as deleteId,
|
|
5071
5085
|
Gi as deleteTempId,
|
|
5072
5086
|
Yi as email,
|
|
5073
5087
|
Ki as formatDate,
|
|
5074
|
-
|
|
5088
|
+
Wi as formatDateTime,
|
|
5075
5089
|
Hi as getCookieToken,
|
|
5076
5090
|
Pt as handleError,
|
|
5077
|
-
|
|
5091
|
+
Ar as isAuth,
|
|
5078
5092
|
Fr as logout,
|
|
5079
5093
|
ao as queryClient,
|
|
5080
5094
|
Xi as required,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mhz-helpers",
|
|
3
3
|
"description": "9000 Mhz frontend helpers and composables",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.42",
|
|
5
5
|
"author": "Alexandr Dergunov <dergunovs@mail.ru> (https://github.com/dergunovs)",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
@@ -22,40 +22,40 @@
|
|
|
22
22
|
"ts": "vue-tsc --noEmit"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@tanstack/vue-query": "5.
|
|
25
|
+
"@tanstack/vue-query": "5.20.1",
|
|
26
26
|
"@vueuse/core": "10.7.2",
|
|
27
27
|
"@vueuse/integrations": "10.7.2",
|
|
28
28
|
"async-validator": "4.2.5",
|
|
29
|
-
"axios": "1.6.
|
|
30
|
-
"vue": "3.4.
|
|
29
|
+
"axios": "1.6.7",
|
|
30
|
+
"vue": "3.4.18",
|
|
31
31
|
"vue-router": "4.2.5"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@types/node": "20.11.
|
|
35
|
-
"@typescript-eslint/eslint-plugin": "6.
|
|
36
|
-
"@typescript-eslint/parser": "6.
|
|
37
|
-
"@vitejs/plugin-vue": "5.0.
|
|
34
|
+
"@types/node": "20.11.17",
|
|
35
|
+
"@typescript-eslint/eslint-plugin": "6.21.0",
|
|
36
|
+
"@typescript-eslint/parser": "6.21.0",
|
|
37
|
+
"@vitejs/plugin-vue": "5.0.4",
|
|
38
38
|
"eslint": "8.56.0",
|
|
39
39
|
"eslint-config-prettier": "9.1.0",
|
|
40
40
|
"eslint-import-resolver-typescript": "3.6.1",
|
|
41
41
|
"eslint-plugin-import": "2.29.1",
|
|
42
42
|
"eslint-plugin-prettier": "5.1.3",
|
|
43
|
-
"eslint-plugin-vue": "9.
|
|
43
|
+
"eslint-plugin-vue": "9.21.1",
|
|
44
44
|
"postcss-html": "1.6.0",
|
|
45
|
-
"prettier": "3.2.
|
|
46
|
-
"stylelint": "16.1
|
|
47
|
-
"stylelint-config-recess-order": "4.
|
|
45
|
+
"prettier": "3.2.5",
|
|
46
|
+
"stylelint": "16.2.1",
|
|
47
|
+
"stylelint-config-recess-order": "4.6.0",
|
|
48
48
|
"stylelint-config-recommended-scss": "14.0.0",
|
|
49
49
|
"stylelint-config-recommended-vue": "1.5.0",
|
|
50
50
|
"stylelint-prettier": "5.0.0",
|
|
51
51
|
"typescript": "5.3.3",
|
|
52
|
-
"vite": "5.
|
|
53
|
-
"vite-plugin-dts": "3.7.
|
|
52
|
+
"vite": "5.1.1",
|
|
53
|
+
"vite-plugin-dts": "3.7.2",
|
|
54
54
|
"vue-linters-config": "0.1.13",
|
|
55
55
|
"vue-tsc": "1.8.27"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"vue": "3.4.
|
|
58
|
+
"vue": "3.4.18",
|
|
59
59
|
"vue-router": "4.2.5"
|
|
60
60
|
},
|
|
61
61
|
"engines": {
|