@ezpaarse-project/ezreeport-sdk-js 1.0.0-beta.1
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/CHANGELOG.md +42 -0
- package/README.md +774 -0
- package/dist/browser/ezreeport-sdk-js.mjs +2263 -0
- package/dist/browser/ezreeport-sdk-js.mjs.map +1 -0
- package/dist/browser/ezreeport-sdk-js.umd.js +4 -0
- package/dist/browser/ezreeport-sdk-js.umd.js.map +1 -0
- package/dist/node/package.json +56 -0
- package/dist/types/index.d.ts +24 -0
- package/dist/types/lib/axios.d.ts +51 -0
- package/dist/types/lib/promises.d.ts +18 -0
- package/dist/types/lib/utils.d.ts +22 -0
- package/dist/types/modules/auth.d.ts +90 -0
- package/dist/types/modules/auth.public.d.ts +1 -0
- package/dist/types/modules/crons.d.ts +78 -0
- package/dist/types/modules/crons.public.d.ts +1 -0
- package/dist/types/modules/health.d.ts +53 -0
- package/dist/types/modules/health.public.d.ts +1 -0
- package/dist/types/modules/history.d.ts +38 -0
- package/dist/types/modules/history.public.d.ts +1 -0
- package/dist/types/modules/institutions.d.ts +56 -0
- package/dist/types/modules/namespaces.d.ts +19 -0
- package/dist/types/modules/namespaces.public.d.ts +1 -0
- package/dist/types/modules/queues.d.ts +93 -0
- package/dist/types/modules/queues.public.d.ts +1 -0
- package/dist/types/modules/reports.d.ts +194 -0
- package/dist/types/modules/reports.public.d.ts +1 -0
- package/dist/types/modules/setup.d.ts +17 -0
- package/dist/types/modules/setup.public.d.ts +2 -0
- package/dist/types/modules/tasks.base.d.ts +48 -0
- package/dist/types/modules/tasks.d.ts +124 -0
- package/dist/types/modules/tasks.public.d.ts +2 -0
- package/dist/types/modules/templates.d.ts +120 -0
- package/dist/types/modules/templates.public.d.ts +1 -0
- package/package.json +56 -0
|
@@ -0,0 +1,2263 @@
|
|
|
1
|
+
function _t(e) {
|
|
2
|
+
if (e === null || e === !0 || e === !1)
|
|
3
|
+
return NaN;
|
|
4
|
+
var t = Number(e);
|
|
5
|
+
return isNaN(t) ? t : t < 0 ? Math.ceil(t) : Math.floor(t);
|
|
6
|
+
}
|
|
7
|
+
function Nt(e, t) {
|
|
8
|
+
if (t.length < e)
|
|
9
|
+
throw new TypeError(e + " argument" + (e > 1 ? "s" : "") + " required, but only " + t.length + " present");
|
|
10
|
+
}
|
|
11
|
+
var De = 6e4, $e = 36e5;
|
|
12
|
+
function g(e, t) {
|
|
13
|
+
var n;
|
|
14
|
+
Nt(1, arguments);
|
|
15
|
+
var r = _t((n = t == null ? void 0 : t.additionalDigits) !== null && n !== void 0 ? n : 2);
|
|
16
|
+
if (r !== 2 && r !== 1 && r !== 0)
|
|
17
|
+
throw new RangeError("additionalDigits must be 0, 1 or 2");
|
|
18
|
+
if (!(typeof e == "string" || Object.prototype.toString.call(e) === "[object String]"))
|
|
19
|
+
return /* @__PURE__ */ new Date(NaN);
|
|
20
|
+
var s = Pt(e), o;
|
|
21
|
+
if (s.date) {
|
|
22
|
+
var i = Dt(s.date, r);
|
|
23
|
+
o = $t(i.restDateString, i.year);
|
|
24
|
+
}
|
|
25
|
+
if (!o || isNaN(o.getTime()))
|
|
26
|
+
return /* @__PURE__ */ new Date(NaN);
|
|
27
|
+
var c = o.getTime(), f = 0, u;
|
|
28
|
+
if (s.time && (f = Ft(s.time), isNaN(f)))
|
|
29
|
+
return /* @__PURE__ */ new Date(NaN);
|
|
30
|
+
if (s.timezone) {
|
|
31
|
+
if (u = kt(s.timezone), isNaN(u))
|
|
32
|
+
return /* @__PURE__ */ new Date(NaN);
|
|
33
|
+
} else {
|
|
34
|
+
var l = new Date(c + f), p = /* @__PURE__ */ new Date(0);
|
|
35
|
+
return p.setFullYear(l.getUTCFullYear(), l.getUTCMonth(), l.getUTCDate()), p.setHours(l.getUTCHours(), l.getUTCMinutes(), l.getUTCSeconds(), l.getUTCMilliseconds()), p;
|
|
36
|
+
}
|
|
37
|
+
return new Date(c + f + u);
|
|
38
|
+
}
|
|
39
|
+
var q = {
|
|
40
|
+
dateTimeDelimiter: /[T ]/,
|
|
41
|
+
timeZoneDelimiter: /[Z ]/i,
|
|
42
|
+
timezone: /([Z+-].*)$/
|
|
43
|
+
}, Lt = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/, xt = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/, Ct = /^([+-])(\d{2})(?::?(\d{2}))?$/;
|
|
44
|
+
function Pt(e) {
|
|
45
|
+
var t = {}, n = e.split(q.dateTimeDelimiter), r;
|
|
46
|
+
if (n.length > 2)
|
|
47
|
+
return t;
|
|
48
|
+
if (/:/.test(n[0]) ? r = n[0] : (t.date = n[0], r = n[1], q.timeZoneDelimiter.test(t.date) && (t.date = e.split(q.timeZoneDelimiter)[0], r = e.substr(t.date.length, e.length))), r) {
|
|
49
|
+
var s = q.timezone.exec(r);
|
|
50
|
+
s ? (t.time = r.replace(s[1], ""), t.timezone = s[1]) : t.time = r;
|
|
51
|
+
}
|
|
52
|
+
return t;
|
|
53
|
+
}
|
|
54
|
+
function Dt(e, t) {
|
|
55
|
+
var n = new RegExp("^(?:(\\d{4}|[+-]\\d{" + (4 + t) + "})|(\\d{2}|[+-]\\d{" + (2 + t) + "})$)"), r = e.match(n);
|
|
56
|
+
if (!r)
|
|
57
|
+
return {
|
|
58
|
+
year: NaN,
|
|
59
|
+
restDateString: ""
|
|
60
|
+
};
|
|
61
|
+
var s = r[1] ? parseInt(r[1]) : null, o = r[2] ? parseInt(r[2]) : null;
|
|
62
|
+
return {
|
|
63
|
+
year: o === null ? s : o * 100,
|
|
64
|
+
restDateString: e.slice((r[1] || r[2]).length)
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
function $t(e, t) {
|
|
68
|
+
if (t === null)
|
|
69
|
+
return /* @__PURE__ */ new Date(NaN);
|
|
70
|
+
var n = e.match(Lt);
|
|
71
|
+
if (!n)
|
|
72
|
+
return /* @__PURE__ */ new Date(NaN);
|
|
73
|
+
var r = !!n[4], s = F(n[1]), o = F(n[2]) - 1, i = F(n[3]), c = F(n[4]), f = F(n[5]) - 1;
|
|
74
|
+
if (r)
|
|
75
|
+
return It(t, c, f) ? Ut(t, c, f) : /* @__PURE__ */ new Date(NaN);
|
|
76
|
+
var u = /* @__PURE__ */ new Date(0);
|
|
77
|
+
return !Bt(t, o, i) || !Mt(t, s) ? /* @__PURE__ */ new Date(NaN) : (u.setUTCFullYear(t, o, Math.max(s, i)), u);
|
|
78
|
+
}
|
|
79
|
+
function F(e) {
|
|
80
|
+
return e ? parseInt(e) : 1;
|
|
81
|
+
}
|
|
82
|
+
function Ft(e) {
|
|
83
|
+
var t = e.match(xt);
|
|
84
|
+
if (!t)
|
|
85
|
+
return NaN;
|
|
86
|
+
var n = re(t[1]), r = re(t[2]), s = re(t[3]);
|
|
87
|
+
return Ht(n, r, s) ? n * $e + r * De + s * 1e3 : NaN;
|
|
88
|
+
}
|
|
89
|
+
function re(e) {
|
|
90
|
+
return e && parseFloat(e.replace(",", ".")) || 0;
|
|
91
|
+
}
|
|
92
|
+
function kt(e) {
|
|
93
|
+
if (e === "Z")
|
|
94
|
+
return 0;
|
|
95
|
+
var t = e.match(Ct);
|
|
96
|
+
if (!t)
|
|
97
|
+
return 0;
|
|
98
|
+
var n = t[1] === "+" ? -1 : 1, r = parseInt(t[2]), s = t[3] && parseInt(t[3]) || 0;
|
|
99
|
+
return zt(r, s) ? n * (r * $e + s * De) : NaN;
|
|
100
|
+
}
|
|
101
|
+
function Ut(e, t, n) {
|
|
102
|
+
var r = /* @__PURE__ */ new Date(0);
|
|
103
|
+
r.setUTCFullYear(e, 0, 4);
|
|
104
|
+
var s = r.getUTCDay() || 7, o = (t - 1) * 7 + n + 1 - s;
|
|
105
|
+
return r.setUTCDate(r.getUTCDate() + o), r;
|
|
106
|
+
}
|
|
107
|
+
var jt = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
108
|
+
function Fe(e) {
|
|
109
|
+
return e % 400 === 0 || e % 4 === 0 && e % 100 !== 0;
|
|
110
|
+
}
|
|
111
|
+
function Bt(e, t, n) {
|
|
112
|
+
return t >= 0 && t <= 11 && n >= 1 && n <= (jt[t] || (Fe(e) ? 29 : 28));
|
|
113
|
+
}
|
|
114
|
+
function Mt(e, t) {
|
|
115
|
+
return t >= 1 && t <= (Fe(e) ? 366 : 365);
|
|
116
|
+
}
|
|
117
|
+
function It(e, t, n) {
|
|
118
|
+
return t >= 1 && t <= 53 && n >= 0 && n <= 6;
|
|
119
|
+
}
|
|
120
|
+
function Ht(e, t, n) {
|
|
121
|
+
return e === 24 ? t === 0 && n === 0 : n >= 0 && n < 60 && t >= 0 && t < 60 && e >= 0 && e < 25;
|
|
122
|
+
}
|
|
123
|
+
function zt(e, t) {
|
|
124
|
+
return t >= 0 && t <= 59;
|
|
125
|
+
}
|
|
126
|
+
function ke(e, t) {
|
|
127
|
+
return function() {
|
|
128
|
+
return e.apply(t, arguments);
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
const { toString: Ue } = Object.prototype, { getPrototypeOf: de } = Object, pe = ((e) => (t) => {
|
|
132
|
+
const n = Ue.call(t);
|
|
133
|
+
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
134
|
+
})(/* @__PURE__ */ Object.create(null)), _ = (e) => (e = e.toLowerCase(), (t) => pe(t) === e), Z = (e) => (t) => typeof t === e, { isArray: D } = Array, U = Z("undefined");
|
|
135
|
+
function qt(e) {
|
|
136
|
+
return e !== null && !U(e) && e.constructor !== null && !U(e.constructor) && L(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
137
|
+
}
|
|
138
|
+
const je = _("ArrayBuffer");
|
|
139
|
+
function Jt(e) {
|
|
140
|
+
let t;
|
|
141
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && je(e.buffer), t;
|
|
142
|
+
}
|
|
143
|
+
const Wt = Z("string"), L = Z("function"), Be = Z("number"), he = (e) => e !== null && typeof e == "object", Kt = (e) => e === !0 || e === !1, J = (e) => {
|
|
144
|
+
if (pe(e) !== "object")
|
|
145
|
+
return !1;
|
|
146
|
+
const t = de(e);
|
|
147
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
148
|
+
}, Vt = _("Date"), Yt = _("File"), Gt = _("Blob"), Qt = _("FileList"), Zt = (e) => he(e) && L(e.pipe), Xt = (e) => {
|
|
149
|
+
const t = "[object FormData]";
|
|
150
|
+
return e && (typeof FormData == "function" && e instanceof FormData || Ue.call(e) === t || L(e.toString) && e.toString() === t);
|
|
151
|
+
}, en = _("URLSearchParams"), tn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
152
|
+
function j(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
153
|
+
if (e === null || typeof e > "u")
|
|
154
|
+
return;
|
|
155
|
+
let r, s;
|
|
156
|
+
if (typeof e != "object" && (e = [e]), D(e))
|
|
157
|
+
for (r = 0, s = e.length; r < s; r++)
|
|
158
|
+
t.call(null, e[r], r, e);
|
|
159
|
+
else {
|
|
160
|
+
const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
|
|
161
|
+
let c;
|
|
162
|
+
for (r = 0; r < i; r++)
|
|
163
|
+
c = o[r], t.call(null, e[c], c, e);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
function Me(e, t) {
|
|
167
|
+
t = t.toLowerCase();
|
|
168
|
+
const n = Object.keys(e);
|
|
169
|
+
let r = n.length, s;
|
|
170
|
+
for (; r-- > 0; )
|
|
171
|
+
if (s = n[r], t === s.toLowerCase())
|
|
172
|
+
return s;
|
|
173
|
+
return null;
|
|
174
|
+
}
|
|
175
|
+
const Ie = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), He = (e) => !U(e) && e !== Ie;
|
|
176
|
+
function ce() {
|
|
177
|
+
const { caseless: e } = He(this) && this || {}, t = {}, n = (r, s) => {
|
|
178
|
+
const o = e && Me(t, s) || s;
|
|
179
|
+
J(t[o]) && J(r) ? t[o] = ce(t[o], r) : J(r) ? t[o] = ce({}, r) : D(r) ? t[o] = r.slice() : t[o] = r;
|
|
180
|
+
};
|
|
181
|
+
for (let r = 0, s = arguments.length; r < s; r++)
|
|
182
|
+
arguments[r] && j(arguments[r], n);
|
|
183
|
+
return t;
|
|
184
|
+
}
|
|
185
|
+
const nn = (e, t, n, { allOwnKeys: r } = {}) => (j(t, (s, o) => {
|
|
186
|
+
n && L(s) ? e[o] = ke(s, n) : e[o] = s;
|
|
187
|
+
}, { allOwnKeys: r }), e), rn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), sn = (e, t, n, r) => {
|
|
188
|
+
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
189
|
+
value: t.prototype
|
|
190
|
+
}), n && Object.assign(e.prototype, n);
|
|
191
|
+
}, on = (e, t, n, r) => {
|
|
192
|
+
let s, o, i;
|
|
193
|
+
const c = {};
|
|
194
|
+
if (t = t || {}, e == null)
|
|
195
|
+
return t;
|
|
196
|
+
do {
|
|
197
|
+
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
198
|
+
i = s[o], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
|
|
199
|
+
e = n !== !1 && de(e);
|
|
200
|
+
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
201
|
+
return t;
|
|
202
|
+
}, an = (e, t, n) => {
|
|
203
|
+
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
204
|
+
const r = e.indexOf(t, n);
|
|
205
|
+
return r !== -1 && r === n;
|
|
206
|
+
}, cn = (e) => {
|
|
207
|
+
if (!e)
|
|
208
|
+
return null;
|
|
209
|
+
if (D(e))
|
|
210
|
+
return e;
|
|
211
|
+
let t = e.length;
|
|
212
|
+
if (!Be(t))
|
|
213
|
+
return null;
|
|
214
|
+
const n = new Array(t);
|
|
215
|
+
for (; t-- > 0; )
|
|
216
|
+
n[t] = e[t];
|
|
217
|
+
return n;
|
|
218
|
+
}, un = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && de(Uint8Array)), ln = (e, t) => {
|
|
219
|
+
const r = (e && e[Symbol.iterator]).call(e);
|
|
220
|
+
let s;
|
|
221
|
+
for (; (s = r.next()) && !s.done; ) {
|
|
222
|
+
const o = s.value;
|
|
223
|
+
t.call(e, o[0], o[1]);
|
|
224
|
+
}
|
|
225
|
+
}, fn = (e, t) => {
|
|
226
|
+
let n;
|
|
227
|
+
const r = [];
|
|
228
|
+
for (; (n = e.exec(t)) !== null; )
|
|
229
|
+
r.push(n);
|
|
230
|
+
return r;
|
|
231
|
+
}, dn = _("HTMLFormElement"), pn = (e) => e.toLowerCase().replace(
|
|
232
|
+
/[-_\s]([a-z\d])(\w*)/g,
|
|
233
|
+
function(n, r, s) {
|
|
234
|
+
return r.toUpperCase() + s;
|
|
235
|
+
}
|
|
236
|
+
), ve = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), hn = _("RegExp"), ze = (e, t) => {
|
|
237
|
+
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
238
|
+
j(n, (s, o) => {
|
|
239
|
+
t(s, o, e) !== !1 && (r[o] = s);
|
|
240
|
+
}), Object.defineProperties(e, r);
|
|
241
|
+
}, mn = (e) => {
|
|
242
|
+
ze(e, (t, n) => {
|
|
243
|
+
if (L(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
244
|
+
return !1;
|
|
245
|
+
const r = e[n];
|
|
246
|
+
if (L(r)) {
|
|
247
|
+
if (t.enumerable = !1, "writable" in t) {
|
|
248
|
+
t.writable = !1;
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
t.set || (t.set = () => {
|
|
252
|
+
throw Error("Can not rewrite read-only method '" + n + "'");
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
});
|
|
256
|
+
}, yn = (e, t) => {
|
|
257
|
+
const n = {}, r = (s) => {
|
|
258
|
+
s.forEach((o) => {
|
|
259
|
+
n[o] = !0;
|
|
260
|
+
});
|
|
261
|
+
};
|
|
262
|
+
return D(e) ? r(e) : r(String(e).split(t)), n;
|
|
263
|
+
}, wn = () => {
|
|
264
|
+
}, bn = (e, t) => (e = +e, Number.isFinite(e) ? e : t), se = "abcdefghijklmnopqrstuvwxyz", Oe = "0123456789", qe = {
|
|
265
|
+
DIGIT: Oe,
|
|
266
|
+
ALPHA: se,
|
|
267
|
+
ALPHA_DIGIT: se + se.toUpperCase() + Oe
|
|
268
|
+
}, gn = (e = 16, t = qe.ALPHA_DIGIT) => {
|
|
269
|
+
let n = "";
|
|
270
|
+
const { length: r } = t;
|
|
271
|
+
for (; e--; )
|
|
272
|
+
n += t[Math.random() * r | 0];
|
|
273
|
+
return n;
|
|
274
|
+
};
|
|
275
|
+
function En(e) {
|
|
276
|
+
return !!(e && L(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
277
|
+
}
|
|
278
|
+
const vn = (e) => {
|
|
279
|
+
const t = new Array(10), n = (r, s) => {
|
|
280
|
+
if (he(r)) {
|
|
281
|
+
if (t.indexOf(r) >= 0)
|
|
282
|
+
return;
|
|
283
|
+
if (!("toJSON" in r)) {
|
|
284
|
+
t[s] = r;
|
|
285
|
+
const o = D(r) ? [] : {};
|
|
286
|
+
return j(r, (i, c) => {
|
|
287
|
+
const f = n(i, s + 1);
|
|
288
|
+
!U(f) && (o[c] = f);
|
|
289
|
+
}), t[s] = void 0, o;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
return r;
|
|
293
|
+
};
|
|
294
|
+
return n(e, 0);
|
|
295
|
+
}, a = {
|
|
296
|
+
isArray: D,
|
|
297
|
+
isArrayBuffer: je,
|
|
298
|
+
isBuffer: qt,
|
|
299
|
+
isFormData: Xt,
|
|
300
|
+
isArrayBufferView: Jt,
|
|
301
|
+
isString: Wt,
|
|
302
|
+
isNumber: Be,
|
|
303
|
+
isBoolean: Kt,
|
|
304
|
+
isObject: he,
|
|
305
|
+
isPlainObject: J,
|
|
306
|
+
isUndefined: U,
|
|
307
|
+
isDate: Vt,
|
|
308
|
+
isFile: Yt,
|
|
309
|
+
isBlob: Gt,
|
|
310
|
+
isRegExp: hn,
|
|
311
|
+
isFunction: L,
|
|
312
|
+
isStream: Zt,
|
|
313
|
+
isURLSearchParams: en,
|
|
314
|
+
isTypedArray: un,
|
|
315
|
+
isFileList: Qt,
|
|
316
|
+
forEach: j,
|
|
317
|
+
merge: ce,
|
|
318
|
+
extend: nn,
|
|
319
|
+
trim: tn,
|
|
320
|
+
stripBOM: rn,
|
|
321
|
+
inherits: sn,
|
|
322
|
+
toFlatObject: on,
|
|
323
|
+
kindOf: pe,
|
|
324
|
+
kindOfTest: _,
|
|
325
|
+
endsWith: an,
|
|
326
|
+
toArray: cn,
|
|
327
|
+
forEachEntry: ln,
|
|
328
|
+
matchAll: fn,
|
|
329
|
+
isHTMLForm: dn,
|
|
330
|
+
hasOwnProperty: ve,
|
|
331
|
+
hasOwnProp: ve,
|
|
332
|
+
// an alias to avoid ESLint no-prototype-builtins detection
|
|
333
|
+
reduceDescriptors: ze,
|
|
334
|
+
freezeMethods: mn,
|
|
335
|
+
toObjectSet: yn,
|
|
336
|
+
toCamelCase: pn,
|
|
337
|
+
noop: wn,
|
|
338
|
+
toFiniteNumber: bn,
|
|
339
|
+
findKey: Me,
|
|
340
|
+
global: Ie,
|
|
341
|
+
isContextDefined: He,
|
|
342
|
+
ALPHABET: qe,
|
|
343
|
+
generateString: gn,
|
|
344
|
+
isSpecCompliantForm: En,
|
|
345
|
+
toJSONObject: vn
|
|
346
|
+
};
|
|
347
|
+
function y(e, t, n, r, s) {
|
|
348
|
+
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), s && (this.response = s);
|
|
349
|
+
}
|
|
350
|
+
a.inherits(y, Error, {
|
|
351
|
+
toJSON: function() {
|
|
352
|
+
return {
|
|
353
|
+
// Standard
|
|
354
|
+
message: this.message,
|
|
355
|
+
name: this.name,
|
|
356
|
+
// Microsoft
|
|
357
|
+
description: this.description,
|
|
358
|
+
number: this.number,
|
|
359
|
+
// Mozilla
|
|
360
|
+
fileName: this.fileName,
|
|
361
|
+
lineNumber: this.lineNumber,
|
|
362
|
+
columnNumber: this.columnNumber,
|
|
363
|
+
stack: this.stack,
|
|
364
|
+
// Axios
|
|
365
|
+
config: a.toJSONObject(this.config),
|
|
366
|
+
code: this.code,
|
|
367
|
+
status: this.response && this.response.status ? this.response.status : null
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
});
|
|
371
|
+
const Je = y.prototype, We = {};
|
|
372
|
+
[
|
|
373
|
+
"ERR_BAD_OPTION_VALUE",
|
|
374
|
+
"ERR_BAD_OPTION",
|
|
375
|
+
"ECONNABORTED",
|
|
376
|
+
"ETIMEDOUT",
|
|
377
|
+
"ERR_NETWORK",
|
|
378
|
+
"ERR_FR_TOO_MANY_REDIRECTS",
|
|
379
|
+
"ERR_DEPRECATED",
|
|
380
|
+
"ERR_BAD_RESPONSE",
|
|
381
|
+
"ERR_BAD_REQUEST",
|
|
382
|
+
"ERR_CANCELED",
|
|
383
|
+
"ERR_NOT_SUPPORT",
|
|
384
|
+
"ERR_INVALID_URL"
|
|
385
|
+
// eslint-disable-next-line func-names
|
|
386
|
+
].forEach((e) => {
|
|
387
|
+
We[e] = { value: e };
|
|
388
|
+
});
|
|
389
|
+
Object.defineProperties(y, We);
|
|
390
|
+
Object.defineProperty(Je, "isAxiosError", { value: !0 });
|
|
391
|
+
y.from = (e, t, n, r, s, o) => {
|
|
392
|
+
const i = Object.create(Je);
|
|
393
|
+
return a.toFlatObject(e, i, function(f) {
|
|
394
|
+
return f !== Error.prototype;
|
|
395
|
+
}, (c) => c !== "isAxiosError"), y.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
396
|
+
};
|
|
397
|
+
const On = null;
|
|
398
|
+
function ue(e) {
|
|
399
|
+
return a.isPlainObject(e) || a.isArray(e);
|
|
400
|
+
}
|
|
401
|
+
function Ke(e) {
|
|
402
|
+
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
403
|
+
}
|
|
404
|
+
function Ae(e, t, n) {
|
|
405
|
+
return e ? e.concat(t).map(function(s, o) {
|
|
406
|
+
return s = Ke(s), !n && o ? "[" + s + "]" : s;
|
|
407
|
+
}).join(n ? "." : "") : t;
|
|
408
|
+
}
|
|
409
|
+
function An(e) {
|
|
410
|
+
return a.isArray(e) && !e.some(ue);
|
|
411
|
+
}
|
|
412
|
+
const Rn = a.toFlatObject(a, {}, null, function(t) {
|
|
413
|
+
return /^is[A-Z]/.test(t);
|
|
414
|
+
});
|
|
415
|
+
function X(e, t, n) {
|
|
416
|
+
if (!a.isObject(e))
|
|
417
|
+
throw new TypeError("target must be an object");
|
|
418
|
+
t = t || new FormData(), n = a.toFlatObject(n, {
|
|
419
|
+
metaTokens: !0,
|
|
420
|
+
dots: !1,
|
|
421
|
+
indexes: !1
|
|
422
|
+
}, !1, function(h, R) {
|
|
423
|
+
return !a.isUndefined(R[h]);
|
|
424
|
+
});
|
|
425
|
+
const r = n.metaTokens, s = n.visitor || l, o = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
426
|
+
if (!a.isFunction(s))
|
|
427
|
+
throw new TypeError("visitor must be a function");
|
|
428
|
+
function u(d) {
|
|
429
|
+
if (d === null)
|
|
430
|
+
return "";
|
|
431
|
+
if (a.isDate(d))
|
|
432
|
+
return d.toISOString();
|
|
433
|
+
if (!f && a.isBlob(d))
|
|
434
|
+
throw new y("Blob is not supported. Use a Buffer instead.");
|
|
435
|
+
return a.isArrayBuffer(d) || a.isTypedArray(d) ? f && typeof Blob == "function" ? new Blob([d]) : Buffer.from(d) : d;
|
|
436
|
+
}
|
|
437
|
+
function l(d, h, R) {
|
|
438
|
+
let O = d;
|
|
439
|
+
if (d && !R && typeof d == "object") {
|
|
440
|
+
if (a.endsWith(h, "{}"))
|
|
441
|
+
h = r ? h : h.slice(0, -2), d = JSON.stringify(d);
|
|
442
|
+
else if (a.isArray(d) && An(d) || (a.isFileList(d) || a.endsWith(h, "[]")) && (O = a.toArray(d)))
|
|
443
|
+
return h = Ke(h), O.forEach(function(z, Tt) {
|
|
444
|
+
!(a.isUndefined(z) || z === null) && t.append(
|
|
445
|
+
// eslint-disable-next-line no-nested-ternary
|
|
446
|
+
i === !0 ? Ae([h], Tt, o) : i === null ? h : h + "[]",
|
|
447
|
+
u(z)
|
|
448
|
+
);
|
|
449
|
+
}), !1;
|
|
450
|
+
}
|
|
451
|
+
return ue(d) ? !0 : (t.append(Ae(R, h, o), u(d)), !1);
|
|
452
|
+
}
|
|
453
|
+
const p = [], v = Object.assign(Rn, {
|
|
454
|
+
defaultVisitor: l,
|
|
455
|
+
convertValue: u,
|
|
456
|
+
isVisitable: ue
|
|
457
|
+
});
|
|
458
|
+
function b(d, h) {
|
|
459
|
+
if (!a.isUndefined(d)) {
|
|
460
|
+
if (p.indexOf(d) !== -1)
|
|
461
|
+
throw Error("Circular reference detected in " + h.join("."));
|
|
462
|
+
p.push(d), a.forEach(d, function(O, x) {
|
|
463
|
+
(!(a.isUndefined(O) || O === null) && s.call(
|
|
464
|
+
t,
|
|
465
|
+
O,
|
|
466
|
+
a.isString(x) ? x.trim() : x,
|
|
467
|
+
h,
|
|
468
|
+
v
|
|
469
|
+
)) === !0 && b(O, h ? h.concat(x) : [x]);
|
|
470
|
+
}), p.pop();
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
if (!a.isObject(e))
|
|
474
|
+
throw new TypeError("data must be an object");
|
|
475
|
+
return b(e), t;
|
|
476
|
+
}
|
|
477
|
+
function Re(e) {
|
|
478
|
+
const t = {
|
|
479
|
+
"!": "%21",
|
|
480
|
+
"'": "%27",
|
|
481
|
+
"(": "%28",
|
|
482
|
+
")": "%29",
|
|
483
|
+
"~": "%7E",
|
|
484
|
+
"%20": "+",
|
|
485
|
+
"%00": "\0"
|
|
486
|
+
};
|
|
487
|
+
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
|
|
488
|
+
return t[r];
|
|
489
|
+
});
|
|
490
|
+
}
|
|
491
|
+
function me(e, t) {
|
|
492
|
+
this._pairs = [], e && X(e, this, t);
|
|
493
|
+
}
|
|
494
|
+
const Ve = me.prototype;
|
|
495
|
+
Ve.append = function(t, n) {
|
|
496
|
+
this._pairs.push([t, n]);
|
|
497
|
+
};
|
|
498
|
+
Ve.toString = function(t) {
|
|
499
|
+
const n = t ? function(r) {
|
|
500
|
+
return t.call(this, r, Re);
|
|
501
|
+
} : Re;
|
|
502
|
+
return this._pairs.map(function(s) {
|
|
503
|
+
return n(s[0]) + "=" + n(s[1]);
|
|
504
|
+
}, "").join("&");
|
|
505
|
+
};
|
|
506
|
+
function Sn(e) {
|
|
507
|
+
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
508
|
+
}
|
|
509
|
+
function Ye(e, t, n) {
|
|
510
|
+
if (!t)
|
|
511
|
+
return e;
|
|
512
|
+
const r = n && n.encode || Sn, s = n && n.serialize;
|
|
513
|
+
let o;
|
|
514
|
+
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new me(t, n).toString(r), o) {
|
|
515
|
+
const i = e.indexOf("#");
|
|
516
|
+
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
517
|
+
}
|
|
518
|
+
return e;
|
|
519
|
+
}
|
|
520
|
+
class Tn {
|
|
521
|
+
constructor() {
|
|
522
|
+
this.handlers = [];
|
|
523
|
+
}
|
|
524
|
+
/**
|
|
525
|
+
* Add a new interceptor to the stack
|
|
526
|
+
*
|
|
527
|
+
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
528
|
+
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
529
|
+
*
|
|
530
|
+
* @return {Number} An ID used to remove interceptor later
|
|
531
|
+
*/
|
|
532
|
+
use(t, n, r) {
|
|
533
|
+
return this.handlers.push({
|
|
534
|
+
fulfilled: t,
|
|
535
|
+
rejected: n,
|
|
536
|
+
synchronous: r ? r.synchronous : !1,
|
|
537
|
+
runWhen: r ? r.runWhen : null
|
|
538
|
+
}), this.handlers.length - 1;
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* Remove an interceptor from the stack
|
|
542
|
+
*
|
|
543
|
+
* @param {Number} id The ID that was returned by `use`
|
|
544
|
+
*
|
|
545
|
+
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
|
|
546
|
+
*/
|
|
547
|
+
eject(t) {
|
|
548
|
+
this.handlers[t] && (this.handlers[t] = null);
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* Clear all interceptors from the stack
|
|
552
|
+
*
|
|
553
|
+
* @returns {void}
|
|
554
|
+
*/
|
|
555
|
+
clear() {
|
|
556
|
+
this.handlers && (this.handlers = []);
|
|
557
|
+
}
|
|
558
|
+
/**
|
|
559
|
+
* Iterate over all the registered interceptors
|
|
560
|
+
*
|
|
561
|
+
* This method is particularly useful for skipping over any
|
|
562
|
+
* interceptors that may have become `null` calling `eject`.
|
|
563
|
+
*
|
|
564
|
+
* @param {Function} fn The function to call for each interceptor
|
|
565
|
+
*
|
|
566
|
+
* @returns {void}
|
|
567
|
+
*/
|
|
568
|
+
forEach(t) {
|
|
569
|
+
a.forEach(this.handlers, function(r) {
|
|
570
|
+
r !== null && t(r);
|
|
571
|
+
});
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
const Se = Tn, Ge = {
|
|
575
|
+
silentJSONParsing: !0,
|
|
576
|
+
forcedJSONParsing: !0,
|
|
577
|
+
clarifyTimeoutError: !1
|
|
578
|
+
}, _n = typeof URLSearchParams < "u" ? URLSearchParams : me, Nn = typeof FormData < "u" ? FormData : null, Ln = typeof Blob < "u" ? Blob : null, xn = (() => {
|
|
579
|
+
let e;
|
|
580
|
+
return typeof navigator < "u" && ((e = navigator.product) === "ReactNative" || e === "NativeScript" || e === "NS") ? !1 : typeof window < "u" && typeof document < "u";
|
|
581
|
+
})(), Cn = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
582
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), A = {
|
|
583
|
+
isBrowser: !0,
|
|
584
|
+
classes: {
|
|
585
|
+
URLSearchParams: _n,
|
|
586
|
+
FormData: Nn,
|
|
587
|
+
Blob: Ln
|
|
588
|
+
},
|
|
589
|
+
isStandardBrowserEnv: xn,
|
|
590
|
+
isStandardBrowserWebWorkerEnv: Cn,
|
|
591
|
+
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
592
|
+
};
|
|
593
|
+
function Pn(e, t) {
|
|
594
|
+
return X(e, new A.classes.URLSearchParams(), Object.assign({
|
|
595
|
+
visitor: function(n, r, s, o) {
|
|
596
|
+
return A.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
597
|
+
}
|
|
598
|
+
}, t));
|
|
599
|
+
}
|
|
600
|
+
function Dn(e) {
|
|
601
|
+
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
602
|
+
}
|
|
603
|
+
function $n(e) {
|
|
604
|
+
const t = {}, n = Object.keys(e);
|
|
605
|
+
let r;
|
|
606
|
+
const s = n.length;
|
|
607
|
+
let o;
|
|
608
|
+
for (r = 0; r < s; r++)
|
|
609
|
+
o = n[r], t[o] = e[o];
|
|
610
|
+
return t;
|
|
611
|
+
}
|
|
612
|
+
function Qe(e) {
|
|
613
|
+
function t(n, r, s, o) {
|
|
614
|
+
let i = n[o++];
|
|
615
|
+
const c = Number.isFinite(+i), f = o >= n.length;
|
|
616
|
+
return i = !i && a.isArray(s) ? s.length : i, f ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = $n(s[i])), !c);
|
|
617
|
+
}
|
|
618
|
+
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
619
|
+
const n = {};
|
|
620
|
+
return a.forEachEntry(e, (r, s) => {
|
|
621
|
+
t(Dn(r), s, n, 0);
|
|
622
|
+
}), n;
|
|
623
|
+
}
|
|
624
|
+
return null;
|
|
625
|
+
}
|
|
626
|
+
const Fn = {
|
|
627
|
+
"Content-Type": void 0
|
|
628
|
+
};
|
|
629
|
+
function kn(e, t, n) {
|
|
630
|
+
if (a.isString(e))
|
|
631
|
+
try {
|
|
632
|
+
return (t || JSON.parse)(e), a.trim(e);
|
|
633
|
+
} catch (r) {
|
|
634
|
+
if (r.name !== "SyntaxError")
|
|
635
|
+
throw r;
|
|
636
|
+
}
|
|
637
|
+
return (n || JSON.stringify)(e);
|
|
638
|
+
}
|
|
639
|
+
const ee = {
|
|
640
|
+
transitional: Ge,
|
|
641
|
+
adapter: ["xhr", "http"],
|
|
642
|
+
transformRequest: [function(t, n) {
|
|
643
|
+
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
|
|
644
|
+
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
645
|
+
return s && s ? JSON.stringify(Qe(t)) : t;
|
|
646
|
+
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t))
|
|
647
|
+
return t;
|
|
648
|
+
if (a.isArrayBufferView(t))
|
|
649
|
+
return t.buffer;
|
|
650
|
+
if (a.isURLSearchParams(t))
|
|
651
|
+
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
652
|
+
let c;
|
|
653
|
+
if (o) {
|
|
654
|
+
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
655
|
+
return Pn(t, this.formSerializer).toString();
|
|
656
|
+
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
657
|
+
const f = this.env && this.env.FormData;
|
|
658
|
+
return X(
|
|
659
|
+
c ? { "files[]": t } : t,
|
|
660
|
+
f && new f(),
|
|
661
|
+
this.formSerializer
|
|
662
|
+
);
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
return o || s ? (n.setContentType("application/json", !1), kn(t)) : t;
|
|
666
|
+
}],
|
|
667
|
+
transformResponse: [function(t) {
|
|
668
|
+
const n = this.transitional || ee.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
669
|
+
if (t && a.isString(t) && (r && !this.responseType || s)) {
|
|
670
|
+
const i = !(n && n.silentJSONParsing) && s;
|
|
671
|
+
try {
|
|
672
|
+
return JSON.parse(t);
|
|
673
|
+
} catch (c) {
|
|
674
|
+
if (i)
|
|
675
|
+
throw c.name === "SyntaxError" ? y.from(c, y.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
return t;
|
|
679
|
+
}],
|
|
680
|
+
/**
|
|
681
|
+
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
682
|
+
* timeout is not created.
|
|
683
|
+
*/
|
|
684
|
+
timeout: 0,
|
|
685
|
+
xsrfCookieName: "XSRF-TOKEN",
|
|
686
|
+
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
687
|
+
maxContentLength: -1,
|
|
688
|
+
maxBodyLength: -1,
|
|
689
|
+
env: {
|
|
690
|
+
FormData: A.classes.FormData,
|
|
691
|
+
Blob: A.classes.Blob
|
|
692
|
+
},
|
|
693
|
+
validateStatus: function(t) {
|
|
694
|
+
return t >= 200 && t < 300;
|
|
695
|
+
},
|
|
696
|
+
headers: {
|
|
697
|
+
common: {
|
|
698
|
+
Accept: "application/json, text/plain, */*"
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
};
|
|
702
|
+
a.forEach(["delete", "get", "head"], function(t) {
|
|
703
|
+
ee.headers[t] = {};
|
|
704
|
+
});
|
|
705
|
+
a.forEach(["post", "put", "patch"], function(t) {
|
|
706
|
+
ee.headers[t] = a.merge(Fn);
|
|
707
|
+
});
|
|
708
|
+
const ye = ee, Un = a.toObjectSet([
|
|
709
|
+
"age",
|
|
710
|
+
"authorization",
|
|
711
|
+
"content-length",
|
|
712
|
+
"content-type",
|
|
713
|
+
"etag",
|
|
714
|
+
"expires",
|
|
715
|
+
"from",
|
|
716
|
+
"host",
|
|
717
|
+
"if-modified-since",
|
|
718
|
+
"if-unmodified-since",
|
|
719
|
+
"last-modified",
|
|
720
|
+
"location",
|
|
721
|
+
"max-forwards",
|
|
722
|
+
"proxy-authorization",
|
|
723
|
+
"referer",
|
|
724
|
+
"retry-after",
|
|
725
|
+
"user-agent"
|
|
726
|
+
]), jn = (e) => {
|
|
727
|
+
const t = {};
|
|
728
|
+
let n, r, s;
|
|
729
|
+
return e && e.split(`
|
|
730
|
+
`).forEach(function(i) {
|
|
731
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && Un[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
732
|
+
}), t;
|
|
733
|
+
}, Te = Symbol("internals");
|
|
734
|
+
function k(e) {
|
|
735
|
+
return e && String(e).trim().toLowerCase();
|
|
736
|
+
}
|
|
737
|
+
function W(e) {
|
|
738
|
+
return e === !1 || e == null ? e : a.isArray(e) ? e.map(W) : String(e);
|
|
739
|
+
}
|
|
740
|
+
function Bn(e) {
|
|
741
|
+
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
742
|
+
let r;
|
|
743
|
+
for (; r = n.exec(e); )
|
|
744
|
+
t[r[1]] = r[2];
|
|
745
|
+
return t;
|
|
746
|
+
}
|
|
747
|
+
const Mn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
748
|
+
function oe(e, t, n, r, s) {
|
|
749
|
+
if (a.isFunction(r))
|
|
750
|
+
return r.call(this, t, n);
|
|
751
|
+
if (s && (t = n), !!a.isString(t)) {
|
|
752
|
+
if (a.isString(r))
|
|
753
|
+
return t.indexOf(r) !== -1;
|
|
754
|
+
if (a.isRegExp(r))
|
|
755
|
+
return r.test(t);
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
function In(e) {
|
|
759
|
+
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
760
|
+
}
|
|
761
|
+
function Hn(e, t) {
|
|
762
|
+
const n = a.toCamelCase(" " + t);
|
|
763
|
+
["get", "set", "has"].forEach((r) => {
|
|
764
|
+
Object.defineProperty(e, r + n, {
|
|
765
|
+
value: function(s, o, i) {
|
|
766
|
+
return this[r].call(this, t, s, o, i);
|
|
767
|
+
},
|
|
768
|
+
configurable: !0
|
|
769
|
+
});
|
|
770
|
+
});
|
|
771
|
+
}
|
|
772
|
+
let te = class {
|
|
773
|
+
constructor(t) {
|
|
774
|
+
t && this.set(t);
|
|
775
|
+
}
|
|
776
|
+
set(t, n, r) {
|
|
777
|
+
const s = this;
|
|
778
|
+
function o(c, f, u) {
|
|
779
|
+
const l = k(f);
|
|
780
|
+
if (!l)
|
|
781
|
+
throw new Error("header name must be a non-empty string");
|
|
782
|
+
const p = a.findKey(s, l);
|
|
783
|
+
(!p || s[p] === void 0 || u === !0 || u === void 0 && s[p] !== !1) && (s[p || f] = W(c));
|
|
784
|
+
}
|
|
785
|
+
const i = (c, f) => a.forEach(c, (u, l) => o(u, l, f));
|
|
786
|
+
return a.isPlainObject(t) || t instanceof this.constructor ? i(t, n) : a.isString(t) && (t = t.trim()) && !Mn(t) ? i(jn(t), n) : t != null && o(n, t, r), this;
|
|
787
|
+
}
|
|
788
|
+
get(t, n) {
|
|
789
|
+
if (t = k(t), t) {
|
|
790
|
+
const r = a.findKey(this, t);
|
|
791
|
+
if (r) {
|
|
792
|
+
const s = this[r];
|
|
793
|
+
if (!n)
|
|
794
|
+
return s;
|
|
795
|
+
if (n === !0)
|
|
796
|
+
return Bn(s);
|
|
797
|
+
if (a.isFunction(n))
|
|
798
|
+
return n.call(this, s, r);
|
|
799
|
+
if (a.isRegExp(n))
|
|
800
|
+
return n.exec(s);
|
|
801
|
+
throw new TypeError("parser must be boolean|regexp|function");
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
has(t, n) {
|
|
806
|
+
if (t = k(t), t) {
|
|
807
|
+
const r = a.findKey(this, t);
|
|
808
|
+
return !!(r && this[r] !== void 0 && (!n || oe(this, this[r], r, n)));
|
|
809
|
+
}
|
|
810
|
+
return !1;
|
|
811
|
+
}
|
|
812
|
+
delete(t, n) {
|
|
813
|
+
const r = this;
|
|
814
|
+
let s = !1;
|
|
815
|
+
function o(i) {
|
|
816
|
+
if (i = k(i), i) {
|
|
817
|
+
const c = a.findKey(r, i);
|
|
818
|
+
c && (!n || oe(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
return a.isArray(t) ? t.forEach(o) : o(t), s;
|
|
822
|
+
}
|
|
823
|
+
clear(t) {
|
|
824
|
+
const n = Object.keys(this);
|
|
825
|
+
let r = n.length, s = !1;
|
|
826
|
+
for (; r--; ) {
|
|
827
|
+
const o = n[r];
|
|
828
|
+
(!t || oe(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
829
|
+
}
|
|
830
|
+
return s;
|
|
831
|
+
}
|
|
832
|
+
normalize(t) {
|
|
833
|
+
const n = this, r = {};
|
|
834
|
+
return a.forEach(this, (s, o) => {
|
|
835
|
+
const i = a.findKey(r, o);
|
|
836
|
+
if (i) {
|
|
837
|
+
n[i] = W(s), delete n[o];
|
|
838
|
+
return;
|
|
839
|
+
}
|
|
840
|
+
const c = t ? In(o) : String(o).trim();
|
|
841
|
+
c !== o && delete n[o], n[c] = W(s), r[c] = !0;
|
|
842
|
+
}), this;
|
|
843
|
+
}
|
|
844
|
+
concat(...t) {
|
|
845
|
+
return this.constructor.concat(this, ...t);
|
|
846
|
+
}
|
|
847
|
+
toJSON(t) {
|
|
848
|
+
const n = /* @__PURE__ */ Object.create(null);
|
|
849
|
+
return a.forEach(this, (r, s) => {
|
|
850
|
+
r != null && r !== !1 && (n[s] = t && a.isArray(r) ? r.join(", ") : r);
|
|
851
|
+
}), n;
|
|
852
|
+
}
|
|
853
|
+
[Symbol.iterator]() {
|
|
854
|
+
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
855
|
+
}
|
|
856
|
+
toString() {
|
|
857
|
+
return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
|
|
858
|
+
`);
|
|
859
|
+
}
|
|
860
|
+
get [Symbol.toStringTag]() {
|
|
861
|
+
return "AxiosHeaders";
|
|
862
|
+
}
|
|
863
|
+
static from(t) {
|
|
864
|
+
return t instanceof this ? t : new this(t);
|
|
865
|
+
}
|
|
866
|
+
static concat(t, ...n) {
|
|
867
|
+
const r = new this(t);
|
|
868
|
+
return n.forEach((s) => r.set(s)), r;
|
|
869
|
+
}
|
|
870
|
+
static accessor(t) {
|
|
871
|
+
const r = (this[Te] = this[Te] = {
|
|
872
|
+
accessors: {}
|
|
873
|
+
}).accessors, s = this.prototype;
|
|
874
|
+
function o(i) {
|
|
875
|
+
const c = k(i);
|
|
876
|
+
r[c] || (Hn(s, i), r[c] = !0);
|
|
877
|
+
}
|
|
878
|
+
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
879
|
+
}
|
|
880
|
+
};
|
|
881
|
+
te.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
882
|
+
a.freezeMethods(te.prototype);
|
|
883
|
+
a.freezeMethods(te);
|
|
884
|
+
const T = te;
|
|
885
|
+
function ie(e, t) {
|
|
886
|
+
const n = this || ye, r = t || n, s = T.from(r.headers);
|
|
887
|
+
let o = r.data;
|
|
888
|
+
return a.forEach(e, function(c) {
|
|
889
|
+
o = c.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
890
|
+
}), s.normalize(), o;
|
|
891
|
+
}
|
|
892
|
+
function Ze(e) {
|
|
893
|
+
return !!(e && e.__CANCEL__);
|
|
894
|
+
}
|
|
895
|
+
function B(e, t, n) {
|
|
896
|
+
y.call(this, e ?? "canceled", y.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
897
|
+
}
|
|
898
|
+
a.inherits(B, y, {
|
|
899
|
+
__CANCEL__: !0
|
|
900
|
+
});
|
|
901
|
+
function zn(e, t, n) {
|
|
902
|
+
const r = n.config.validateStatus;
|
|
903
|
+
!n.status || !r || r(n.status) ? e(n) : t(new y(
|
|
904
|
+
"Request failed with status code " + n.status,
|
|
905
|
+
[y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
906
|
+
n.config,
|
|
907
|
+
n.request,
|
|
908
|
+
n
|
|
909
|
+
));
|
|
910
|
+
}
|
|
911
|
+
const qn = A.isStandardBrowserEnv ? (
|
|
912
|
+
// Standard browser envs support document.cookie
|
|
913
|
+
function() {
|
|
914
|
+
return {
|
|
915
|
+
write: function(n, r, s, o, i, c) {
|
|
916
|
+
const f = [];
|
|
917
|
+
f.push(n + "=" + encodeURIComponent(r)), a.isNumber(s) && f.push("expires=" + new Date(s).toGMTString()), a.isString(o) && f.push("path=" + o), a.isString(i) && f.push("domain=" + i), c === !0 && f.push("secure"), document.cookie = f.join("; ");
|
|
918
|
+
},
|
|
919
|
+
read: function(n) {
|
|
920
|
+
const r = document.cookie.match(new RegExp("(^|;\\s*)(" + n + ")=([^;]*)"));
|
|
921
|
+
return r ? decodeURIComponent(r[3]) : null;
|
|
922
|
+
},
|
|
923
|
+
remove: function(n) {
|
|
924
|
+
this.write(n, "", Date.now() - 864e5);
|
|
925
|
+
}
|
|
926
|
+
};
|
|
927
|
+
}()
|
|
928
|
+
) : (
|
|
929
|
+
// Non standard browser env (web workers, react-native) lack needed support.
|
|
930
|
+
function() {
|
|
931
|
+
return {
|
|
932
|
+
write: function() {
|
|
933
|
+
},
|
|
934
|
+
read: function() {
|
|
935
|
+
return null;
|
|
936
|
+
},
|
|
937
|
+
remove: function() {
|
|
938
|
+
}
|
|
939
|
+
};
|
|
940
|
+
}()
|
|
941
|
+
);
|
|
942
|
+
function Jn(e) {
|
|
943
|
+
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
944
|
+
}
|
|
945
|
+
function Wn(e, t) {
|
|
946
|
+
return t ? e.replace(/\/+$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
947
|
+
}
|
|
948
|
+
function Xe(e, t) {
|
|
949
|
+
return e && !Jn(t) ? Wn(e, t) : t;
|
|
950
|
+
}
|
|
951
|
+
const Kn = A.isStandardBrowserEnv ? (
|
|
952
|
+
// Standard browser envs have full support of the APIs needed to test
|
|
953
|
+
// whether the request URL is of the same origin as current location.
|
|
954
|
+
function() {
|
|
955
|
+
const t = /(msie|trident)/i.test(navigator.userAgent), n = document.createElement("a");
|
|
956
|
+
let r;
|
|
957
|
+
function s(o) {
|
|
958
|
+
let i = o;
|
|
959
|
+
return t && (n.setAttribute("href", i), i = n.href), n.setAttribute("href", i), {
|
|
960
|
+
href: n.href,
|
|
961
|
+
protocol: n.protocol ? n.protocol.replace(/:$/, "") : "",
|
|
962
|
+
host: n.host,
|
|
963
|
+
search: n.search ? n.search.replace(/^\?/, "") : "",
|
|
964
|
+
hash: n.hash ? n.hash.replace(/^#/, "") : "",
|
|
965
|
+
hostname: n.hostname,
|
|
966
|
+
port: n.port,
|
|
967
|
+
pathname: n.pathname.charAt(0) === "/" ? n.pathname : "/" + n.pathname
|
|
968
|
+
};
|
|
969
|
+
}
|
|
970
|
+
return r = s(window.location.href), function(i) {
|
|
971
|
+
const c = a.isString(i) ? s(i) : i;
|
|
972
|
+
return c.protocol === r.protocol && c.host === r.host;
|
|
973
|
+
};
|
|
974
|
+
}()
|
|
975
|
+
) : (
|
|
976
|
+
// Non standard browser envs (web workers, react-native) lack needed support.
|
|
977
|
+
function() {
|
|
978
|
+
return function() {
|
|
979
|
+
return !0;
|
|
980
|
+
};
|
|
981
|
+
}()
|
|
982
|
+
);
|
|
983
|
+
function Vn(e) {
|
|
984
|
+
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
985
|
+
return t && t[1] || "";
|
|
986
|
+
}
|
|
987
|
+
function Yn(e, t) {
|
|
988
|
+
e = e || 10;
|
|
989
|
+
const n = new Array(e), r = new Array(e);
|
|
990
|
+
let s = 0, o = 0, i;
|
|
991
|
+
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
992
|
+
const u = Date.now(), l = r[o];
|
|
993
|
+
i || (i = u), n[s] = f, r[s] = u;
|
|
994
|
+
let p = o, v = 0;
|
|
995
|
+
for (; p !== s; )
|
|
996
|
+
v += n[p++], p = p % e;
|
|
997
|
+
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), u - i < t)
|
|
998
|
+
return;
|
|
999
|
+
const b = l && u - l;
|
|
1000
|
+
return b ? Math.round(v * 1e3 / b) : void 0;
|
|
1001
|
+
};
|
|
1002
|
+
}
|
|
1003
|
+
function _e(e, t) {
|
|
1004
|
+
let n = 0;
|
|
1005
|
+
const r = Yn(50, 250);
|
|
1006
|
+
return (s) => {
|
|
1007
|
+
const o = s.loaded, i = s.lengthComputable ? s.total : void 0, c = o - n, f = r(c), u = o <= i;
|
|
1008
|
+
n = o;
|
|
1009
|
+
const l = {
|
|
1010
|
+
loaded: o,
|
|
1011
|
+
total: i,
|
|
1012
|
+
progress: i ? o / i : void 0,
|
|
1013
|
+
bytes: c,
|
|
1014
|
+
rate: f || void 0,
|
|
1015
|
+
estimated: f && i && u ? (i - o) / f : void 0,
|
|
1016
|
+
event: s
|
|
1017
|
+
};
|
|
1018
|
+
l[t ? "download" : "upload"] = !0, e(l);
|
|
1019
|
+
};
|
|
1020
|
+
}
|
|
1021
|
+
const Gn = typeof XMLHttpRequest < "u", Qn = Gn && function(e) {
|
|
1022
|
+
return new Promise(function(n, r) {
|
|
1023
|
+
let s = e.data;
|
|
1024
|
+
const o = T.from(e.headers).normalize(), i = e.responseType;
|
|
1025
|
+
let c;
|
|
1026
|
+
function f() {
|
|
1027
|
+
e.cancelToken && e.cancelToken.unsubscribe(c), e.signal && e.signal.removeEventListener("abort", c);
|
|
1028
|
+
}
|
|
1029
|
+
a.isFormData(s) && (A.isStandardBrowserEnv || A.isStandardBrowserWebWorkerEnv) && o.setContentType(!1);
|
|
1030
|
+
let u = new XMLHttpRequest();
|
|
1031
|
+
if (e.auth) {
|
|
1032
|
+
const b = e.auth.username || "", d = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
|
|
1033
|
+
o.set("Authorization", "Basic " + btoa(b + ":" + d));
|
|
1034
|
+
}
|
|
1035
|
+
const l = Xe(e.baseURL, e.url);
|
|
1036
|
+
u.open(e.method.toUpperCase(), Ye(l, e.params, e.paramsSerializer), !0), u.timeout = e.timeout;
|
|
1037
|
+
function p() {
|
|
1038
|
+
if (!u)
|
|
1039
|
+
return;
|
|
1040
|
+
const b = T.from(
|
|
1041
|
+
"getAllResponseHeaders" in u && u.getAllResponseHeaders()
|
|
1042
|
+
), h = {
|
|
1043
|
+
data: !i || i === "text" || i === "json" ? u.responseText : u.response,
|
|
1044
|
+
status: u.status,
|
|
1045
|
+
statusText: u.statusText,
|
|
1046
|
+
headers: b,
|
|
1047
|
+
config: e,
|
|
1048
|
+
request: u
|
|
1049
|
+
};
|
|
1050
|
+
zn(function(O) {
|
|
1051
|
+
n(O), f();
|
|
1052
|
+
}, function(O) {
|
|
1053
|
+
r(O), f();
|
|
1054
|
+
}, h), u = null;
|
|
1055
|
+
}
|
|
1056
|
+
if ("onloadend" in u ? u.onloadend = p : u.onreadystatechange = function() {
|
|
1057
|
+
!u || u.readyState !== 4 || u.status === 0 && !(u.responseURL && u.responseURL.indexOf("file:") === 0) || setTimeout(p);
|
|
1058
|
+
}, u.onabort = function() {
|
|
1059
|
+
u && (r(new y("Request aborted", y.ECONNABORTED, e, u)), u = null);
|
|
1060
|
+
}, u.onerror = function() {
|
|
1061
|
+
r(new y("Network Error", y.ERR_NETWORK, e, u)), u = null;
|
|
1062
|
+
}, u.ontimeout = function() {
|
|
1063
|
+
let d = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
|
|
1064
|
+
const h = e.transitional || Ge;
|
|
1065
|
+
e.timeoutErrorMessage && (d = e.timeoutErrorMessage), r(new y(
|
|
1066
|
+
d,
|
|
1067
|
+
h.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
|
|
1068
|
+
e,
|
|
1069
|
+
u
|
|
1070
|
+
)), u = null;
|
|
1071
|
+
}, A.isStandardBrowserEnv) {
|
|
1072
|
+
const b = (e.withCredentials || Kn(l)) && e.xsrfCookieName && qn.read(e.xsrfCookieName);
|
|
1073
|
+
b && o.set(e.xsrfHeaderName, b);
|
|
1074
|
+
}
|
|
1075
|
+
s === void 0 && o.setContentType(null), "setRequestHeader" in u && a.forEach(o.toJSON(), function(d, h) {
|
|
1076
|
+
u.setRequestHeader(h, d);
|
|
1077
|
+
}), a.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), i && i !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress", _e(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", _e(e.onUploadProgress)), (e.cancelToken || e.signal) && (c = (b) => {
|
|
1078
|
+
u && (r(!b || b.type ? new B(null, e, u) : b), u.abort(), u = null);
|
|
1079
|
+
}, e.cancelToken && e.cancelToken.subscribe(c), e.signal && (e.signal.aborted ? c() : e.signal.addEventListener("abort", c)));
|
|
1080
|
+
const v = Vn(l);
|
|
1081
|
+
if (v && A.protocols.indexOf(v) === -1) {
|
|
1082
|
+
r(new y("Unsupported protocol " + v + ":", y.ERR_BAD_REQUEST, e));
|
|
1083
|
+
return;
|
|
1084
|
+
}
|
|
1085
|
+
u.send(s || null);
|
|
1086
|
+
});
|
|
1087
|
+
}, K = {
|
|
1088
|
+
http: On,
|
|
1089
|
+
xhr: Qn
|
|
1090
|
+
};
|
|
1091
|
+
a.forEach(K, (e, t) => {
|
|
1092
|
+
if (e) {
|
|
1093
|
+
try {
|
|
1094
|
+
Object.defineProperty(e, "name", { value: t });
|
|
1095
|
+
} catch {
|
|
1096
|
+
}
|
|
1097
|
+
Object.defineProperty(e, "adapterName", { value: t });
|
|
1098
|
+
}
|
|
1099
|
+
});
|
|
1100
|
+
const Zn = {
|
|
1101
|
+
getAdapter: (e) => {
|
|
1102
|
+
e = a.isArray(e) ? e : [e];
|
|
1103
|
+
const { length: t } = e;
|
|
1104
|
+
let n, r;
|
|
1105
|
+
for (let s = 0; s < t && (n = e[s], !(r = a.isString(n) ? K[n.toLowerCase()] : n)); s++)
|
|
1106
|
+
;
|
|
1107
|
+
if (!r)
|
|
1108
|
+
throw r === !1 ? new y(
|
|
1109
|
+
`Adapter ${n} is not supported by the environment`,
|
|
1110
|
+
"ERR_NOT_SUPPORT"
|
|
1111
|
+
) : new Error(
|
|
1112
|
+
a.hasOwnProp(K, n) ? `Adapter '${n}' is not available in the build` : `Unknown adapter '${n}'`
|
|
1113
|
+
);
|
|
1114
|
+
if (!a.isFunction(r))
|
|
1115
|
+
throw new TypeError("adapter is not a function");
|
|
1116
|
+
return r;
|
|
1117
|
+
},
|
|
1118
|
+
adapters: K
|
|
1119
|
+
};
|
|
1120
|
+
function ae(e) {
|
|
1121
|
+
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1122
|
+
throw new B(null, e);
|
|
1123
|
+
}
|
|
1124
|
+
function Ne(e) {
|
|
1125
|
+
return ae(e), e.headers = T.from(e.headers), e.data = ie.call(
|
|
1126
|
+
e,
|
|
1127
|
+
e.transformRequest
|
|
1128
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Zn.getAdapter(e.adapter || ye.adapter)(e).then(function(r) {
|
|
1129
|
+
return ae(e), r.data = ie.call(
|
|
1130
|
+
e,
|
|
1131
|
+
e.transformResponse,
|
|
1132
|
+
r
|
|
1133
|
+
), r.headers = T.from(r.headers), r;
|
|
1134
|
+
}, function(r) {
|
|
1135
|
+
return Ze(r) || (ae(e), r && r.response && (r.response.data = ie.call(
|
|
1136
|
+
e,
|
|
1137
|
+
e.transformResponse,
|
|
1138
|
+
r.response
|
|
1139
|
+
), r.response.headers = T.from(r.response.headers))), Promise.reject(r);
|
|
1140
|
+
});
|
|
1141
|
+
}
|
|
1142
|
+
const Le = (e) => e instanceof T ? e.toJSON() : e;
|
|
1143
|
+
function P(e, t) {
|
|
1144
|
+
t = t || {};
|
|
1145
|
+
const n = {};
|
|
1146
|
+
function r(u, l, p) {
|
|
1147
|
+
return a.isPlainObject(u) && a.isPlainObject(l) ? a.merge.call({ caseless: p }, u, l) : a.isPlainObject(l) ? a.merge({}, l) : a.isArray(l) ? l.slice() : l;
|
|
1148
|
+
}
|
|
1149
|
+
function s(u, l, p) {
|
|
1150
|
+
if (a.isUndefined(l)) {
|
|
1151
|
+
if (!a.isUndefined(u))
|
|
1152
|
+
return r(void 0, u, p);
|
|
1153
|
+
} else
|
|
1154
|
+
return r(u, l, p);
|
|
1155
|
+
}
|
|
1156
|
+
function o(u, l) {
|
|
1157
|
+
if (!a.isUndefined(l))
|
|
1158
|
+
return r(void 0, l);
|
|
1159
|
+
}
|
|
1160
|
+
function i(u, l) {
|
|
1161
|
+
if (a.isUndefined(l)) {
|
|
1162
|
+
if (!a.isUndefined(u))
|
|
1163
|
+
return r(void 0, u);
|
|
1164
|
+
} else
|
|
1165
|
+
return r(void 0, l);
|
|
1166
|
+
}
|
|
1167
|
+
function c(u, l, p) {
|
|
1168
|
+
if (p in t)
|
|
1169
|
+
return r(u, l);
|
|
1170
|
+
if (p in e)
|
|
1171
|
+
return r(void 0, u);
|
|
1172
|
+
}
|
|
1173
|
+
const f = {
|
|
1174
|
+
url: o,
|
|
1175
|
+
method: o,
|
|
1176
|
+
data: o,
|
|
1177
|
+
baseURL: i,
|
|
1178
|
+
transformRequest: i,
|
|
1179
|
+
transformResponse: i,
|
|
1180
|
+
paramsSerializer: i,
|
|
1181
|
+
timeout: i,
|
|
1182
|
+
timeoutMessage: i,
|
|
1183
|
+
withCredentials: i,
|
|
1184
|
+
adapter: i,
|
|
1185
|
+
responseType: i,
|
|
1186
|
+
xsrfCookieName: i,
|
|
1187
|
+
xsrfHeaderName: i,
|
|
1188
|
+
onUploadProgress: i,
|
|
1189
|
+
onDownloadProgress: i,
|
|
1190
|
+
decompress: i,
|
|
1191
|
+
maxContentLength: i,
|
|
1192
|
+
maxBodyLength: i,
|
|
1193
|
+
beforeRedirect: i,
|
|
1194
|
+
transport: i,
|
|
1195
|
+
httpAgent: i,
|
|
1196
|
+
httpsAgent: i,
|
|
1197
|
+
cancelToken: i,
|
|
1198
|
+
socketPath: i,
|
|
1199
|
+
responseEncoding: i,
|
|
1200
|
+
validateStatus: c,
|
|
1201
|
+
headers: (u, l) => s(Le(u), Le(l), !0)
|
|
1202
|
+
};
|
|
1203
|
+
return a.forEach(Object.keys(e).concat(Object.keys(t)), function(l) {
|
|
1204
|
+
const p = f[l] || s, v = p(e[l], t[l], l);
|
|
1205
|
+
a.isUndefined(v) && p !== c || (n[l] = v);
|
|
1206
|
+
}), n;
|
|
1207
|
+
}
|
|
1208
|
+
const et = "1.3.5", we = {};
|
|
1209
|
+
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1210
|
+
we[e] = function(r) {
|
|
1211
|
+
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1212
|
+
};
|
|
1213
|
+
});
|
|
1214
|
+
const xe = {};
|
|
1215
|
+
we.transitional = function(t, n, r) {
|
|
1216
|
+
function s(o, i) {
|
|
1217
|
+
return "[Axios v" + et + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1218
|
+
}
|
|
1219
|
+
return (o, i, c) => {
|
|
1220
|
+
if (t === !1)
|
|
1221
|
+
throw new y(
|
|
1222
|
+
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1223
|
+
y.ERR_DEPRECATED
|
|
1224
|
+
);
|
|
1225
|
+
return n && !xe[i] && (xe[i] = !0, console.warn(
|
|
1226
|
+
s(
|
|
1227
|
+
i,
|
|
1228
|
+
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1229
|
+
)
|
|
1230
|
+
)), t ? t(o, i, c) : !0;
|
|
1231
|
+
};
|
|
1232
|
+
};
|
|
1233
|
+
function Xn(e, t, n) {
|
|
1234
|
+
if (typeof e != "object")
|
|
1235
|
+
throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
|
|
1236
|
+
const r = Object.keys(e);
|
|
1237
|
+
let s = r.length;
|
|
1238
|
+
for (; s-- > 0; ) {
|
|
1239
|
+
const o = r[s], i = t[o];
|
|
1240
|
+
if (i) {
|
|
1241
|
+
const c = e[o], f = c === void 0 || i(c, o, e);
|
|
1242
|
+
if (f !== !0)
|
|
1243
|
+
throw new y("option " + o + " must be " + f, y.ERR_BAD_OPTION_VALUE);
|
|
1244
|
+
continue;
|
|
1245
|
+
}
|
|
1246
|
+
if (n !== !0)
|
|
1247
|
+
throw new y("Unknown option " + o, y.ERR_BAD_OPTION);
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
const le = {
|
|
1251
|
+
assertOptions: Xn,
|
|
1252
|
+
validators: we
|
|
1253
|
+
}, N = le.validators;
|
|
1254
|
+
let G = class {
|
|
1255
|
+
constructor(t) {
|
|
1256
|
+
this.defaults = t, this.interceptors = {
|
|
1257
|
+
request: new Se(),
|
|
1258
|
+
response: new Se()
|
|
1259
|
+
};
|
|
1260
|
+
}
|
|
1261
|
+
/**
|
|
1262
|
+
* Dispatch a request
|
|
1263
|
+
*
|
|
1264
|
+
* @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
|
|
1265
|
+
* @param {?Object} config
|
|
1266
|
+
*
|
|
1267
|
+
* @returns {Promise} The Promise to be fulfilled
|
|
1268
|
+
*/
|
|
1269
|
+
request(t, n) {
|
|
1270
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = P(this.defaults, n);
|
|
1271
|
+
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1272
|
+
r !== void 0 && le.assertOptions(r, {
|
|
1273
|
+
silentJSONParsing: N.transitional(N.boolean),
|
|
1274
|
+
forcedJSONParsing: N.transitional(N.boolean),
|
|
1275
|
+
clarifyTimeoutError: N.transitional(N.boolean)
|
|
1276
|
+
}, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
1277
|
+
serialize: s
|
|
1278
|
+
} : le.assertOptions(s, {
|
|
1279
|
+
encode: N.function,
|
|
1280
|
+
serialize: N.function
|
|
1281
|
+
}, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1282
|
+
let i;
|
|
1283
|
+
i = o && a.merge(
|
|
1284
|
+
o.common,
|
|
1285
|
+
o[n.method]
|
|
1286
|
+
), i && a.forEach(
|
|
1287
|
+
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1288
|
+
(d) => {
|
|
1289
|
+
delete o[d];
|
|
1290
|
+
}
|
|
1291
|
+
), n.headers = T.concat(i, o);
|
|
1292
|
+
const c = [];
|
|
1293
|
+
let f = !0;
|
|
1294
|
+
this.interceptors.request.forEach(function(h) {
|
|
1295
|
+
typeof h.runWhen == "function" && h.runWhen(n) === !1 || (f = f && h.synchronous, c.unshift(h.fulfilled, h.rejected));
|
|
1296
|
+
});
|
|
1297
|
+
const u = [];
|
|
1298
|
+
this.interceptors.response.forEach(function(h) {
|
|
1299
|
+
u.push(h.fulfilled, h.rejected);
|
|
1300
|
+
});
|
|
1301
|
+
let l, p = 0, v;
|
|
1302
|
+
if (!f) {
|
|
1303
|
+
const d = [Ne.bind(this), void 0];
|
|
1304
|
+
for (d.unshift.apply(d, c), d.push.apply(d, u), v = d.length, l = Promise.resolve(n); p < v; )
|
|
1305
|
+
l = l.then(d[p++], d[p++]);
|
|
1306
|
+
return l;
|
|
1307
|
+
}
|
|
1308
|
+
v = c.length;
|
|
1309
|
+
let b = n;
|
|
1310
|
+
for (p = 0; p < v; ) {
|
|
1311
|
+
const d = c[p++], h = c[p++];
|
|
1312
|
+
try {
|
|
1313
|
+
b = d(b);
|
|
1314
|
+
} catch (R) {
|
|
1315
|
+
h.call(this, R);
|
|
1316
|
+
break;
|
|
1317
|
+
}
|
|
1318
|
+
}
|
|
1319
|
+
try {
|
|
1320
|
+
l = Ne.call(this, b);
|
|
1321
|
+
} catch (d) {
|
|
1322
|
+
return Promise.reject(d);
|
|
1323
|
+
}
|
|
1324
|
+
for (p = 0, v = u.length; p < v; )
|
|
1325
|
+
l = l.then(u[p++], u[p++]);
|
|
1326
|
+
return l;
|
|
1327
|
+
}
|
|
1328
|
+
getUri(t) {
|
|
1329
|
+
t = P(this.defaults, t);
|
|
1330
|
+
const n = Xe(t.baseURL, t.url);
|
|
1331
|
+
return Ye(n, t.params, t.paramsSerializer);
|
|
1332
|
+
}
|
|
1333
|
+
};
|
|
1334
|
+
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1335
|
+
G.prototype[t] = function(n, r) {
|
|
1336
|
+
return this.request(P(r || {}, {
|
|
1337
|
+
method: t,
|
|
1338
|
+
url: n,
|
|
1339
|
+
data: (r || {}).data
|
|
1340
|
+
}));
|
|
1341
|
+
};
|
|
1342
|
+
});
|
|
1343
|
+
a.forEach(["post", "put", "patch"], function(t) {
|
|
1344
|
+
function n(r) {
|
|
1345
|
+
return function(o, i, c) {
|
|
1346
|
+
return this.request(P(c || {}, {
|
|
1347
|
+
method: t,
|
|
1348
|
+
headers: r ? {
|
|
1349
|
+
"Content-Type": "multipart/form-data"
|
|
1350
|
+
} : {},
|
|
1351
|
+
url: o,
|
|
1352
|
+
data: i
|
|
1353
|
+
}));
|
|
1354
|
+
};
|
|
1355
|
+
}
|
|
1356
|
+
G.prototype[t] = n(), G.prototype[t + "Form"] = n(!0);
|
|
1357
|
+
});
|
|
1358
|
+
const V = G;
|
|
1359
|
+
let er = class tt {
|
|
1360
|
+
constructor(t) {
|
|
1361
|
+
if (typeof t != "function")
|
|
1362
|
+
throw new TypeError("executor must be a function.");
|
|
1363
|
+
let n;
|
|
1364
|
+
this.promise = new Promise(function(o) {
|
|
1365
|
+
n = o;
|
|
1366
|
+
});
|
|
1367
|
+
const r = this;
|
|
1368
|
+
this.promise.then((s) => {
|
|
1369
|
+
if (!r._listeners)
|
|
1370
|
+
return;
|
|
1371
|
+
let o = r._listeners.length;
|
|
1372
|
+
for (; o-- > 0; )
|
|
1373
|
+
r._listeners[o](s);
|
|
1374
|
+
r._listeners = null;
|
|
1375
|
+
}), this.promise.then = (s) => {
|
|
1376
|
+
let o;
|
|
1377
|
+
const i = new Promise((c) => {
|
|
1378
|
+
r.subscribe(c), o = c;
|
|
1379
|
+
}).then(s);
|
|
1380
|
+
return i.cancel = function() {
|
|
1381
|
+
r.unsubscribe(o);
|
|
1382
|
+
}, i;
|
|
1383
|
+
}, t(function(o, i, c) {
|
|
1384
|
+
r.reason || (r.reason = new B(o, i, c), n(r.reason));
|
|
1385
|
+
});
|
|
1386
|
+
}
|
|
1387
|
+
/**
|
|
1388
|
+
* Throws a `CanceledError` if cancellation has been requested.
|
|
1389
|
+
*/
|
|
1390
|
+
throwIfRequested() {
|
|
1391
|
+
if (this.reason)
|
|
1392
|
+
throw this.reason;
|
|
1393
|
+
}
|
|
1394
|
+
/**
|
|
1395
|
+
* Subscribe to the cancel signal
|
|
1396
|
+
*/
|
|
1397
|
+
subscribe(t) {
|
|
1398
|
+
if (this.reason) {
|
|
1399
|
+
t(this.reason);
|
|
1400
|
+
return;
|
|
1401
|
+
}
|
|
1402
|
+
this._listeners ? this._listeners.push(t) : this._listeners = [t];
|
|
1403
|
+
}
|
|
1404
|
+
/**
|
|
1405
|
+
* Unsubscribe from the cancel signal
|
|
1406
|
+
*/
|
|
1407
|
+
unsubscribe(t) {
|
|
1408
|
+
if (!this._listeners)
|
|
1409
|
+
return;
|
|
1410
|
+
const n = this._listeners.indexOf(t);
|
|
1411
|
+
n !== -1 && this._listeners.splice(n, 1);
|
|
1412
|
+
}
|
|
1413
|
+
/**
|
|
1414
|
+
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
1415
|
+
* cancels the `CancelToken`.
|
|
1416
|
+
*/
|
|
1417
|
+
static source() {
|
|
1418
|
+
let t;
|
|
1419
|
+
return {
|
|
1420
|
+
token: new tt(function(s) {
|
|
1421
|
+
t = s;
|
|
1422
|
+
}),
|
|
1423
|
+
cancel: t
|
|
1424
|
+
};
|
|
1425
|
+
}
|
|
1426
|
+
};
|
|
1427
|
+
const tr = er;
|
|
1428
|
+
function nr(e) {
|
|
1429
|
+
return function(n) {
|
|
1430
|
+
return e.apply(null, n);
|
|
1431
|
+
};
|
|
1432
|
+
}
|
|
1433
|
+
function rr(e) {
|
|
1434
|
+
return a.isObject(e) && e.isAxiosError === !0;
|
|
1435
|
+
}
|
|
1436
|
+
const fe = {
|
|
1437
|
+
Continue: 100,
|
|
1438
|
+
SwitchingProtocols: 101,
|
|
1439
|
+
Processing: 102,
|
|
1440
|
+
EarlyHints: 103,
|
|
1441
|
+
Ok: 200,
|
|
1442
|
+
Created: 201,
|
|
1443
|
+
Accepted: 202,
|
|
1444
|
+
NonAuthoritativeInformation: 203,
|
|
1445
|
+
NoContent: 204,
|
|
1446
|
+
ResetContent: 205,
|
|
1447
|
+
PartialContent: 206,
|
|
1448
|
+
MultiStatus: 207,
|
|
1449
|
+
AlreadyReported: 208,
|
|
1450
|
+
ImUsed: 226,
|
|
1451
|
+
MultipleChoices: 300,
|
|
1452
|
+
MovedPermanently: 301,
|
|
1453
|
+
Found: 302,
|
|
1454
|
+
SeeOther: 303,
|
|
1455
|
+
NotModified: 304,
|
|
1456
|
+
UseProxy: 305,
|
|
1457
|
+
Unused: 306,
|
|
1458
|
+
TemporaryRedirect: 307,
|
|
1459
|
+
PermanentRedirect: 308,
|
|
1460
|
+
BadRequest: 400,
|
|
1461
|
+
Unauthorized: 401,
|
|
1462
|
+
PaymentRequired: 402,
|
|
1463
|
+
Forbidden: 403,
|
|
1464
|
+
NotFound: 404,
|
|
1465
|
+
MethodNotAllowed: 405,
|
|
1466
|
+
NotAcceptable: 406,
|
|
1467
|
+
ProxyAuthenticationRequired: 407,
|
|
1468
|
+
RequestTimeout: 408,
|
|
1469
|
+
Conflict: 409,
|
|
1470
|
+
Gone: 410,
|
|
1471
|
+
LengthRequired: 411,
|
|
1472
|
+
PreconditionFailed: 412,
|
|
1473
|
+
PayloadTooLarge: 413,
|
|
1474
|
+
UriTooLong: 414,
|
|
1475
|
+
UnsupportedMediaType: 415,
|
|
1476
|
+
RangeNotSatisfiable: 416,
|
|
1477
|
+
ExpectationFailed: 417,
|
|
1478
|
+
ImATeapot: 418,
|
|
1479
|
+
MisdirectedRequest: 421,
|
|
1480
|
+
UnprocessableEntity: 422,
|
|
1481
|
+
Locked: 423,
|
|
1482
|
+
FailedDependency: 424,
|
|
1483
|
+
TooEarly: 425,
|
|
1484
|
+
UpgradeRequired: 426,
|
|
1485
|
+
PreconditionRequired: 428,
|
|
1486
|
+
TooManyRequests: 429,
|
|
1487
|
+
RequestHeaderFieldsTooLarge: 431,
|
|
1488
|
+
UnavailableForLegalReasons: 451,
|
|
1489
|
+
InternalServerError: 500,
|
|
1490
|
+
NotImplemented: 501,
|
|
1491
|
+
BadGateway: 502,
|
|
1492
|
+
ServiceUnavailable: 503,
|
|
1493
|
+
GatewayTimeout: 504,
|
|
1494
|
+
HttpVersionNotSupported: 505,
|
|
1495
|
+
VariantAlsoNegotiates: 506,
|
|
1496
|
+
InsufficientStorage: 507,
|
|
1497
|
+
LoopDetected: 508,
|
|
1498
|
+
NotExtended: 510,
|
|
1499
|
+
NetworkAuthenticationRequired: 511
|
|
1500
|
+
};
|
|
1501
|
+
Object.entries(fe).forEach(([e, t]) => {
|
|
1502
|
+
fe[t] = e;
|
|
1503
|
+
});
|
|
1504
|
+
const sr = fe;
|
|
1505
|
+
function nt(e) {
|
|
1506
|
+
const t = new V(e), n = ke(V.prototype.request, t);
|
|
1507
|
+
return a.extend(n, V.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1508
|
+
return nt(P(e, s));
|
|
1509
|
+
}, n;
|
|
1510
|
+
}
|
|
1511
|
+
const E = nt(ye);
|
|
1512
|
+
E.Axios = V;
|
|
1513
|
+
E.CanceledError = B;
|
|
1514
|
+
E.CancelToken = tr;
|
|
1515
|
+
E.isCancel = Ze;
|
|
1516
|
+
E.VERSION = et;
|
|
1517
|
+
E.toFormData = X;
|
|
1518
|
+
E.AxiosError = y;
|
|
1519
|
+
E.Cancel = E.CanceledError;
|
|
1520
|
+
E.all = function(t) {
|
|
1521
|
+
return Promise.all(t);
|
|
1522
|
+
};
|
|
1523
|
+
E.spread = nr;
|
|
1524
|
+
E.isAxiosError = rr;
|
|
1525
|
+
E.mergeConfig = P;
|
|
1526
|
+
E.AxiosHeaders = T;
|
|
1527
|
+
E.formToJSON = (e) => Qe(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1528
|
+
E.HttpStatusCode = sr;
|
|
1529
|
+
E.default = E;
|
|
1530
|
+
const rt = E, {
|
|
1531
|
+
Axios: as,
|
|
1532
|
+
AxiosError: or,
|
|
1533
|
+
CanceledError: cs,
|
|
1534
|
+
isCancel: us,
|
|
1535
|
+
CancelToken: ls,
|
|
1536
|
+
VERSION: fs,
|
|
1537
|
+
all: ds,
|
|
1538
|
+
Cancel: ps,
|
|
1539
|
+
isAxiosError: hs,
|
|
1540
|
+
spread: ms,
|
|
1541
|
+
toFormData: ys,
|
|
1542
|
+
AxiosHeaders: ws,
|
|
1543
|
+
HttpStatusCode: bs,
|
|
1544
|
+
formToJSON: gs,
|
|
1545
|
+
mergeConfig: Es
|
|
1546
|
+
} = rt, st = rt.create({}), S = async (e, ...t) => {
|
|
1547
|
+
try {
|
|
1548
|
+
return await st[e](...t);
|
|
1549
|
+
} catch (n) {
|
|
1550
|
+
if (!(n instanceof or) || !n.response)
|
|
1551
|
+
throw n;
|
|
1552
|
+
const r = n.response;
|
|
1553
|
+
let s = "";
|
|
1554
|
+
switch (r.status) {
|
|
1555
|
+
case 400:
|
|
1556
|
+
s = "Check parameters or API token";
|
|
1557
|
+
break;
|
|
1558
|
+
case 401:
|
|
1559
|
+
s = "You must be logged before using this function, use `auth.login(token)`";
|
|
1560
|
+
break;
|
|
1561
|
+
case 403:
|
|
1562
|
+
s = "You dont have enough permissions";
|
|
1563
|
+
break;
|
|
1564
|
+
case 404:
|
|
1565
|
+
s = "Check parameters";
|
|
1566
|
+
break;
|
|
1567
|
+
case 409:
|
|
1568
|
+
s = "Request conflit with current state";
|
|
1569
|
+
break;
|
|
1570
|
+
case 500:
|
|
1571
|
+
s = "Something went wrong with server";
|
|
1572
|
+
break;
|
|
1573
|
+
}
|
|
1574
|
+
throw s = `${n.code} (${r.status}) - ${s}: ${r.data.content.message}`, new Error(s);
|
|
1575
|
+
}
|
|
1576
|
+
}, m = Object.assign(
|
|
1577
|
+
st,
|
|
1578
|
+
{
|
|
1579
|
+
$get: async (...e) => (await S("get", ...e)).data,
|
|
1580
|
+
$post: async (...e) => (await S("post", ...e)).data,
|
|
1581
|
+
$put: async (...e) => (await S("put", ...e)).data,
|
|
1582
|
+
$patch: async (...e) => (await S("patch", ...e)).data,
|
|
1583
|
+
$delete: async (...e) => (await S("delete", ...e)).data
|
|
1584
|
+
}
|
|
1585
|
+
), ot = (e) => ({
|
|
1586
|
+
...e,
|
|
1587
|
+
createdAt: g(e.createdAt),
|
|
1588
|
+
updatedAt: e.updatedAt ? g(e.updatedAt) : void 0
|
|
1589
|
+
}), ir = (e) => ({
|
|
1590
|
+
...e,
|
|
1591
|
+
namespace: ot(e.namespace),
|
|
1592
|
+
createdAt: g(e.createdAt),
|
|
1593
|
+
updatedAt: e.updatedAt ? g(e.updatedAt) : void 0
|
|
1594
|
+
}), ar = (e) => ({
|
|
1595
|
+
...e,
|
|
1596
|
+
memberships: e.memberships.map(ir),
|
|
1597
|
+
createdAt: g(e.createdAt),
|
|
1598
|
+
updatedAt: e.updatedAt ? g(e.updatedAt) : void 0
|
|
1599
|
+
}), it = (e) => {
|
|
1600
|
+
m.defaults.headers.common.authorization = `Bearer ${e}`;
|
|
1601
|
+
}, at = () => {
|
|
1602
|
+
m.defaults.headers.common.authorization = void 0;
|
|
1603
|
+
}, ct = () => {
|
|
1604
|
+
const e = m.defaults.headers.common.authorization;
|
|
1605
|
+
if (!e || typeof e != "string")
|
|
1606
|
+
return !1;
|
|
1607
|
+
const [, t] = e.split("Bearer ");
|
|
1608
|
+
return !!t;
|
|
1609
|
+
}, cr = async () => {
|
|
1610
|
+
const { content: e, ...t } = await m.$get("/me");
|
|
1611
|
+
return {
|
|
1612
|
+
...t,
|
|
1613
|
+
content: ar(e)
|
|
1614
|
+
};
|
|
1615
|
+
}, ur = () => m.$get("/me/permissions"), lr = () => m.$get("/me/namespaces"), vs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1616
|
+
__proto__: null,
|
|
1617
|
+
getCurrentNamespaces: lr,
|
|
1618
|
+
getCurrentPermissions: ur,
|
|
1619
|
+
getCurrentUser: cr,
|
|
1620
|
+
isLogged: ct,
|
|
1621
|
+
login: it,
|
|
1622
|
+
logout: at
|
|
1623
|
+
}, Symbol.toStringTag, { value: "Module" })), M = (e) => ({
|
|
1624
|
+
...e,
|
|
1625
|
+
nextRun: e.nextRun ? g(e.nextRun) : void 0,
|
|
1626
|
+
lastRun: e.lastRun ? g(e.lastRun) : void 0
|
|
1627
|
+
}), fr = async () => {
|
|
1628
|
+
const { content: e, ...t } = await m.$get("/crons");
|
|
1629
|
+
return {
|
|
1630
|
+
...t,
|
|
1631
|
+
content: e.map(M)
|
|
1632
|
+
};
|
|
1633
|
+
}, dr = async (e) => {
|
|
1634
|
+
const { content: t, ...n } = await m.$get(`/crons/${e}`);
|
|
1635
|
+
return {
|
|
1636
|
+
...n,
|
|
1637
|
+
content: M(t)
|
|
1638
|
+
};
|
|
1639
|
+
}, pr = async (e) => {
|
|
1640
|
+
const { content: t, ...n } = await m.$put(`/crons/${e}/start`);
|
|
1641
|
+
return {
|
|
1642
|
+
...n,
|
|
1643
|
+
content: M(t)
|
|
1644
|
+
};
|
|
1645
|
+
}, hr = async (e) => {
|
|
1646
|
+
const { content: t, ...n } = await m.$put(`/crons/${e}/stop`);
|
|
1647
|
+
return {
|
|
1648
|
+
...n,
|
|
1649
|
+
content: M(t)
|
|
1650
|
+
};
|
|
1651
|
+
}, mr = async (e) => {
|
|
1652
|
+
const { content: t, ...n } = await m.$post(`/crons/${e}/force`);
|
|
1653
|
+
return {
|
|
1654
|
+
...n,
|
|
1655
|
+
content: M(t)
|
|
1656
|
+
};
|
|
1657
|
+
}, Os = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1658
|
+
__proto__: null,
|
|
1659
|
+
forceCron: mr,
|
|
1660
|
+
getAllCrons: fr,
|
|
1661
|
+
getCron: dr,
|
|
1662
|
+
startCron: pr,
|
|
1663
|
+
stopCron: hr
|
|
1664
|
+
}, Symbol.toStringTag, { value: "Module" })), ut = () => m.$get("/health"), yr = () => m.$get("/health/all"), lt = (e) => m.$get(`/health/${e}`), wr = async () => {
|
|
1665
|
+
const { content: { current: e } } = await ut();
|
|
1666
|
+
return lt(e);
|
|
1667
|
+
}, As = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1668
|
+
__proto__: null,
|
|
1669
|
+
checkAllConnectedService: yr,
|
|
1670
|
+
checkConnectedService: lt,
|
|
1671
|
+
checkCurrentService: wr,
|
|
1672
|
+
getAllConnectedServices: ut
|
|
1673
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
1674
|
+
var ft = /* @__PURE__ */ ((e) => (e.DAILY = "DAILY", e.WEEKLY = "WEEKLY", e.MONTHLY = "MONTHLY", e.QUARTERLY = "QUARTERLY", e.BIENNIAL = "BIENNIAL", e.YEARLY = "YEARLY", e))(ft || {});
|
|
1675
|
+
const dt = (e) => ({
|
|
1676
|
+
...e,
|
|
1677
|
+
nextRun: g(e.nextRun),
|
|
1678
|
+
lastRun: e.lastRun ? g(e.lastRun) : void 0,
|
|
1679
|
+
createdAt: g(e.createdAt),
|
|
1680
|
+
updatedAt: e.updatedAt ? g(e.updatedAt) : void 0
|
|
1681
|
+
}), pt = (e) => {
|
|
1682
|
+
const { namespace: t, ...n } = e, { namespaceId: r, ...s } = dt({
|
|
1683
|
+
namespaceId: t.id,
|
|
1684
|
+
...n
|
|
1685
|
+
});
|
|
1686
|
+
return {
|
|
1687
|
+
...s,
|
|
1688
|
+
namespace: ot(t)
|
|
1689
|
+
};
|
|
1690
|
+
}, br = (e) => ({
|
|
1691
|
+
...e,
|
|
1692
|
+
createdAt: g(e.createdAt)
|
|
1693
|
+
}), gr = (e) => ({
|
|
1694
|
+
...e,
|
|
1695
|
+
task: pt(e.task),
|
|
1696
|
+
createdAt: g(e.createdAt)
|
|
1697
|
+
}), Er = async (e, t) => {
|
|
1698
|
+
const { data: { content: n, ...r } } = await S(
|
|
1699
|
+
"get",
|
|
1700
|
+
"/history",
|
|
1701
|
+
{
|
|
1702
|
+
params: {
|
|
1703
|
+
namespaces: t,
|
|
1704
|
+
...e ?? {}
|
|
1705
|
+
}
|
|
1706
|
+
}
|
|
1707
|
+
);
|
|
1708
|
+
return {
|
|
1709
|
+
...r,
|
|
1710
|
+
content: n.map(gr)
|
|
1711
|
+
};
|
|
1712
|
+
}, Rs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1713
|
+
__proto__: null,
|
|
1714
|
+
getAllEntries: Er
|
|
1715
|
+
}, Symbol.toStringTag, { value: "Module" })), Ss = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1716
|
+
__proto__: null
|
|
1717
|
+
}, Symbol.toStringTag, { value: "Module" })), be = (e) => ({
|
|
1718
|
+
...e,
|
|
1719
|
+
added: g(e.added),
|
|
1720
|
+
started: e.started ? g(e.started) : void 0,
|
|
1721
|
+
ended: e.ended ? g(e.ended) : void 0
|
|
1722
|
+
}), vr = () => m.$get("/queues"), Or = async (e) => m.$put(`/queues/${e}/pause`), Ar = async (e) => m.$put(`/queues/${e}/resume`), Rr = async (e, t) => {
|
|
1723
|
+
const { data: { content: n, ...r } } = await S(
|
|
1724
|
+
"get",
|
|
1725
|
+
`/queues/${e}/jobs`,
|
|
1726
|
+
{
|
|
1727
|
+
params: t
|
|
1728
|
+
}
|
|
1729
|
+
);
|
|
1730
|
+
return {
|
|
1731
|
+
...r,
|
|
1732
|
+
content: n.map(be)
|
|
1733
|
+
};
|
|
1734
|
+
}, I = async (e, t, n) => {
|
|
1735
|
+
const { content: r, ...s } = await m.$get(`/queues/${e}/jobs/${t}`, { params: { namespaces: n } });
|
|
1736
|
+
return {
|
|
1737
|
+
...s,
|
|
1738
|
+
content: be(r)
|
|
1739
|
+
};
|
|
1740
|
+
}, Sr = async (e, t, n) => {
|
|
1741
|
+
const { content: r, ...s } = await m.$post(`/queues/${e}/jobs/${t}/retry`, { params: { namespaces: n } });
|
|
1742
|
+
return {
|
|
1743
|
+
...s,
|
|
1744
|
+
content: be(r)
|
|
1745
|
+
};
|
|
1746
|
+
}, Ts = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1747
|
+
__proto__: null,
|
|
1748
|
+
getAllQueues: vr,
|
|
1749
|
+
getJob: I,
|
|
1750
|
+
getQueueJobs: Rr,
|
|
1751
|
+
pauseQueue: Or,
|
|
1752
|
+
resumeQueue: Ar,
|
|
1753
|
+
retryJob: Sr
|
|
1754
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
1755
|
+
var Q = {}, Tr = {
|
|
1756
|
+
get exports() {
|
|
1757
|
+
return Q;
|
|
1758
|
+
},
|
|
1759
|
+
set exports(e) {
|
|
1760
|
+
Q = e;
|
|
1761
|
+
}
|
|
1762
|
+
}, C = typeof Reflect == "object" ? Reflect : null, Ce = C && typeof C.apply == "function" ? C.apply : function(t, n, r) {
|
|
1763
|
+
return Function.prototype.apply.call(t, n, r);
|
|
1764
|
+
}, Y;
|
|
1765
|
+
C && typeof C.ownKeys == "function" ? Y = C.ownKeys : Object.getOwnPropertySymbols ? Y = function(t) {
|
|
1766
|
+
return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t));
|
|
1767
|
+
} : Y = function(t) {
|
|
1768
|
+
return Object.getOwnPropertyNames(t);
|
|
1769
|
+
};
|
|
1770
|
+
function _r(e) {
|
|
1771
|
+
console && console.warn && console.warn(e);
|
|
1772
|
+
}
|
|
1773
|
+
var ht = Number.isNaN || function(t) {
|
|
1774
|
+
return t !== t;
|
|
1775
|
+
};
|
|
1776
|
+
function w() {
|
|
1777
|
+
w.init.call(this);
|
|
1778
|
+
}
|
|
1779
|
+
Tr.exports = w;
|
|
1780
|
+
Q.once = Cr;
|
|
1781
|
+
w.EventEmitter = w;
|
|
1782
|
+
w.prototype._events = void 0;
|
|
1783
|
+
w.prototype._eventsCount = 0;
|
|
1784
|
+
w.prototype._maxListeners = void 0;
|
|
1785
|
+
var Pe = 10;
|
|
1786
|
+
function ne(e) {
|
|
1787
|
+
if (typeof e != "function")
|
|
1788
|
+
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof e);
|
|
1789
|
+
}
|
|
1790
|
+
Object.defineProperty(w, "defaultMaxListeners", {
|
|
1791
|
+
enumerable: !0,
|
|
1792
|
+
get: function() {
|
|
1793
|
+
return Pe;
|
|
1794
|
+
},
|
|
1795
|
+
set: function(e) {
|
|
1796
|
+
if (typeof e != "number" || e < 0 || ht(e))
|
|
1797
|
+
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + e + ".");
|
|
1798
|
+
Pe = e;
|
|
1799
|
+
}
|
|
1800
|
+
});
|
|
1801
|
+
w.init = function() {
|
|
1802
|
+
(this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
|
|
1803
|
+
};
|
|
1804
|
+
w.prototype.setMaxListeners = function(t) {
|
|
1805
|
+
if (typeof t != "number" || t < 0 || ht(t))
|
|
1806
|
+
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + t + ".");
|
|
1807
|
+
return this._maxListeners = t, this;
|
|
1808
|
+
};
|
|
1809
|
+
function mt(e) {
|
|
1810
|
+
return e._maxListeners === void 0 ? w.defaultMaxListeners : e._maxListeners;
|
|
1811
|
+
}
|
|
1812
|
+
w.prototype.getMaxListeners = function() {
|
|
1813
|
+
return mt(this);
|
|
1814
|
+
};
|
|
1815
|
+
w.prototype.emit = function(t) {
|
|
1816
|
+
for (var n = [], r = 1; r < arguments.length; r++)
|
|
1817
|
+
n.push(arguments[r]);
|
|
1818
|
+
var s = t === "error", o = this._events;
|
|
1819
|
+
if (o !== void 0)
|
|
1820
|
+
s = s && o.error === void 0;
|
|
1821
|
+
else if (!s)
|
|
1822
|
+
return !1;
|
|
1823
|
+
if (s) {
|
|
1824
|
+
var i;
|
|
1825
|
+
if (n.length > 0 && (i = n[0]), i instanceof Error)
|
|
1826
|
+
throw i;
|
|
1827
|
+
var c = new Error("Unhandled error." + (i ? " (" + i.message + ")" : ""));
|
|
1828
|
+
throw c.context = i, c;
|
|
1829
|
+
}
|
|
1830
|
+
var f = o[t];
|
|
1831
|
+
if (f === void 0)
|
|
1832
|
+
return !1;
|
|
1833
|
+
if (typeof f == "function")
|
|
1834
|
+
Ce(f, this, n);
|
|
1835
|
+
else
|
|
1836
|
+
for (var u = f.length, l = Et(f, u), r = 0; r < u; ++r)
|
|
1837
|
+
Ce(l[r], this, n);
|
|
1838
|
+
return !0;
|
|
1839
|
+
};
|
|
1840
|
+
function yt(e, t, n, r) {
|
|
1841
|
+
var s, o, i;
|
|
1842
|
+
if (ne(n), o = e._events, o === void 0 ? (o = e._events = /* @__PURE__ */ Object.create(null), e._eventsCount = 0) : (o.newListener !== void 0 && (e.emit(
|
|
1843
|
+
"newListener",
|
|
1844
|
+
t,
|
|
1845
|
+
n.listener ? n.listener : n
|
|
1846
|
+
), o = e._events), i = o[t]), i === void 0)
|
|
1847
|
+
i = o[t] = n, ++e._eventsCount;
|
|
1848
|
+
else if (typeof i == "function" ? i = o[t] = r ? [n, i] : [i, n] : r ? i.unshift(n) : i.push(n), s = mt(e), s > 0 && i.length > s && !i.warned) {
|
|
1849
|
+
i.warned = !0;
|
|
1850
|
+
var c = new Error("Possible EventEmitter memory leak detected. " + i.length + " " + String(t) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
1851
|
+
c.name = "MaxListenersExceededWarning", c.emitter = e, c.type = t, c.count = i.length, _r(c);
|
|
1852
|
+
}
|
|
1853
|
+
return e;
|
|
1854
|
+
}
|
|
1855
|
+
w.prototype.addListener = function(t, n) {
|
|
1856
|
+
return yt(this, t, n, !1);
|
|
1857
|
+
};
|
|
1858
|
+
w.prototype.on = w.prototype.addListener;
|
|
1859
|
+
w.prototype.prependListener = function(t, n) {
|
|
1860
|
+
return yt(this, t, n, !0);
|
|
1861
|
+
};
|
|
1862
|
+
function Nr() {
|
|
1863
|
+
if (!this.fired)
|
|
1864
|
+
return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
|
|
1865
|
+
}
|
|
1866
|
+
function wt(e, t, n) {
|
|
1867
|
+
var r = { fired: !1, wrapFn: void 0, target: e, type: t, listener: n }, s = Nr.bind(r);
|
|
1868
|
+
return s.listener = n, r.wrapFn = s, s;
|
|
1869
|
+
}
|
|
1870
|
+
w.prototype.once = function(t, n) {
|
|
1871
|
+
return ne(n), this.on(t, wt(this, t, n)), this;
|
|
1872
|
+
};
|
|
1873
|
+
w.prototype.prependOnceListener = function(t, n) {
|
|
1874
|
+
return ne(n), this.prependListener(t, wt(this, t, n)), this;
|
|
1875
|
+
};
|
|
1876
|
+
w.prototype.removeListener = function(t, n) {
|
|
1877
|
+
var r, s, o, i, c;
|
|
1878
|
+
if (ne(n), s = this._events, s === void 0)
|
|
1879
|
+
return this;
|
|
1880
|
+
if (r = s[t], r === void 0)
|
|
1881
|
+
return this;
|
|
1882
|
+
if (r === n || r.listener === n)
|
|
1883
|
+
--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete s[t], s.removeListener && this.emit("removeListener", t, r.listener || n));
|
|
1884
|
+
else if (typeof r != "function") {
|
|
1885
|
+
for (o = -1, i = r.length - 1; i >= 0; i--)
|
|
1886
|
+
if (r[i] === n || r[i].listener === n) {
|
|
1887
|
+
c = r[i].listener, o = i;
|
|
1888
|
+
break;
|
|
1889
|
+
}
|
|
1890
|
+
if (o < 0)
|
|
1891
|
+
return this;
|
|
1892
|
+
o === 0 ? r.shift() : Lr(r, o), r.length === 1 && (s[t] = r[0]), s.removeListener !== void 0 && this.emit("removeListener", t, c || n);
|
|
1893
|
+
}
|
|
1894
|
+
return this;
|
|
1895
|
+
};
|
|
1896
|
+
w.prototype.off = w.prototype.removeListener;
|
|
1897
|
+
w.prototype.removeAllListeners = function(t) {
|
|
1898
|
+
var n, r, s;
|
|
1899
|
+
if (r = this._events, r === void 0)
|
|
1900
|
+
return this;
|
|
1901
|
+
if (r.removeListener === void 0)
|
|
1902
|
+
return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : r[t] !== void 0 && (--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete r[t]), this;
|
|
1903
|
+
if (arguments.length === 0) {
|
|
1904
|
+
var o = Object.keys(r), i;
|
|
1905
|
+
for (s = 0; s < o.length; ++s)
|
|
1906
|
+
i = o[s], i !== "removeListener" && this.removeAllListeners(i);
|
|
1907
|
+
return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this;
|
|
1908
|
+
}
|
|
1909
|
+
if (n = r[t], typeof n == "function")
|
|
1910
|
+
this.removeListener(t, n);
|
|
1911
|
+
else if (n !== void 0)
|
|
1912
|
+
for (s = n.length - 1; s >= 0; s--)
|
|
1913
|
+
this.removeListener(t, n[s]);
|
|
1914
|
+
return this;
|
|
1915
|
+
};
|
|
1916
|
+
function bt(e, t, n) {
|
|
1917
|
+
var r = e._events;
|
|
1918
|
+
if (r === void 0)
|
|
1919
|
+
return [];
|
|
1920
|
+
var s = r[t];
|
|
1921
|
+
return s === void 0 ? [] : typeof s == "function" ? n ? [s.listener || s] : [s] : n ? xr(s) : Et(s, s.length);
|
|
1922
|
+
}
|
|
1923
|
+
w.prototype.listeners = function(t) {
|
|
1924
|
+
return bt(this, t, !0);
|
|
1925
|
+
};
|
|
1926
|
+
w.prototype.rawListeners = function(t) {
|
|
1927
|
+
return bt(this, t, !1);
|
|
1928
|
+
};
|
|
1929
|
+
w.listenerCount = function(e, t) {
|
|
1930
|
+
return typeof e.listenerCount == "function" ? e.listenerCount(t) : gt.call(e, t);
|
|
1931
|
+
};
|
|
1932
|
+
w.prototype.listenerCount = gt;
|
|
1933
|
+
function gt(e) {
|
|
1934
|
+
var t = this._events;
|
|
1935
|
+
if (t !== void 0) {
|
|
1936
|
+
var n = t[e];
|
|
1937
|
+
if (typeof n == "function")
|
|
1938
|
+
return 1;
|
|
1939
|
+
if (n !== void 0)
|
|
1940
|
+
return n.length;
|
|
1941
|
+
}
|
|
1942
|
+
return 0;
|
|
1943
|
+
}
|
|
1944
|
+
w.prototype.eventNames = function() {
|
|
1945
|
+
return this._eventsCount > 0 ? Y(this._events) : [];
|
|
1946
|
+
};
|
|
1947
|
+
function Et(e, t) {
|
|
1948
|
+
for (var n = new Array(t), r = 0; r < t; ++r)
|
|
1949
|
+
n[r] = e[r];
|
|
1950
|
+
return n;
|
|
1951
|
+
}
|
|
1952
|
+
function Lr(e, t) {
|
|
1953
|
+
for (; t + 1 < e.length; t++)
|
|
1954
|
+
e[t] = e[t + 1];
|
|
1955
|
+
e.pop();
|
|
1956
|
+
}
|
|
1957
|
+
function xr(e) {
|
|
1958
|
+
for (var t = new Array(e.length), n = 0; n < t.length; ++n)
|
|
1959
|
+
t[n] = e[n].listener || e[n];
|
|
1960
|
+
return t;
|
|
1961
|
+
}
|
|
1962
|
+
function Cr(e, t) {
|
|
1963
|
+
return new Promise(function(n, r) {
|
|
1964
|
+
function s(i) {
|
|
1965
|
+
e.removeListener(t, o), r(i);
|
|
1966
|
+
}
|
|
1967
|
+
function o() {
|
|
1968
|
+
typeof e.removeListener == "function" && e.removeListener("error", s), n([].slice.call(arguments));
|
|
1969
|
+
}
|
|
1970
|
+
vt(e, t, o, { once: !0 }), t !== "error" && Pr(e, s, { once: !0 });
|
|
1971
|
+
});
|
|
1972
|
+
}
|
|
1973
|
+
function Pr(e, t, n) {
|
|
1974
|
+
typeof e.on == "function" && vt(e, "error", t, n);
|
|
1975
|
+
}
|
|
1976
|
+
function vt(e, t, n, r) {
|
|
1977
|
+
if (typeof e.on == "function")
|
|
1978
|
+
r.once ? e.once(t, n) : e.on(t, n);
|
|
1979
|
+
else if (typeof e.addEventListener == "function")
|
|
1980
|
+
e.addEventListener(t, function s(o) {
|
|
1981
|
+
r.once && e.removeEventListener(t, s), n(o);
|
|
1982
|
+
});
|
|
1983
|
+
else
|
|
1984
|
+
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof e);
|
|
1985
|
+
}
|
|
1986
|
+
const Dr = (e, t = new Q()) => {
|
|
1987
|
+
const n = e(t), r = Object.assign(
|
|
1988
|
+
n,
|
|
1989
|
+
{
|
|
1990
|
+
on: (...s) => (t.on(...s), r),
|
|
1991
|
+
once: (...s) => (t.on(...s), r),
|
|
1992
|
+
off: (...s) => (t.on(...s), r),
|
|
1993
|
+
emit: (...s) => (t.emit(...s), r)
|
|
1994
|
+
}
|
|
1995
|
+
);
|
|
1996
|
+
return r;
|
|
1997
|
+
}, $r = (e) => new Promise(
|
|
1998
|
+
(t) => {
|
|
1999
|
+
setTimeout(t, e);
|
|
2000
|
+
}
|
|
2001
|
+
), Fr = (e) => ({
|
|
2002
|
+
start: g(e.start),
|
|
2003
|
+
end: g(e.end)
|
|
2004
|
+
}), kr = (e) => ({
|
|
2005
|
+
...e,
|
|
2006
|
+
createdAt: g(e.createdAt),
|
|
2007
|
+
destroyAt: g(e.destroyAt),
|
|
2008
|
+
period: e.period ? Fr(e.period) : void 0
|
|
2009
|
+
}), ge = (e) => ({
|
|
2010
|
+
...e,
|
|
2011
|
+
detail: kr(e.detail)
|
|
2012
|
+
}), Ot = (e, t, n) => {
|
|
2013
|
+
var r, s;
|
|
2014
|
+
return m.$post(
|
|
2015
|
+
`/tasks/${e}/run`,
|
|
2016
|
+
null,
|
|
2017
|
+
{
|
|
2018
|
+
params: {
|
|
2019
|
+
test_emails: t == null ? void 0 : t.testEmails,
|
|
2020
|
+
period_start: (r = t == null ? void 0 : t.period) == null ? void 0 : r.start,
|
|
2021
|
+
period_end: (s = t == null ? void 0 : t.period) == null ? void 0 : s.end,
|
|
2022
|
+
namespaces: n
|
|
2023
|
+
}
|
|
2024
|
+
}
|
|
2025
|
+
);
|
|
2026
|
+
}, Ur = (...e) => Dr(
|
|
2027
|
+
async (t) => {
|
|
2028
|
+
const { content: { id: n, queue: r } } = await Ot(...e);
|
|
2029
|
+
t.emit("started", { id: n, queue: r });
|
|
2030
|
+
let s;
|
|
2031
|
+
do {
|
|
2032
|
+
const {
|
|
2033
|
+
content: {
|
|
2034
|
+
progress: o,
|
|
2035
|
+
status: i,
|
|
2036
|
+
result: c
|
|
2037
|
+
}
|
|
2038
|
+
// FIXME: What if param order changes ?
|
|
2039
|
+
// eslint-disable-next-line no-await-in-loop
|
|
2040
|
+
} = await I(r, n, e[2]);
|
|
2041
|
+
s = { progress: o, status: i, result: c }, t.emit("progress", { progress: o, status: i });
|
|
2042
|
+
let f = 1e3;
|
|
2043
|
+
s.status === "active" && (f = 250), await $r(f);
|
|
2044
|
+
} while (["completed", "failed", "stuck"].includes(s.status) === !1);
|
|
2045
|
+
if (!s.result)
|
|
2046
|
+
throw new Error("Generation failed with weird error");
|
|
2047
|
+
return ge(s.result);
|
|
2048
|
+
}
|
|
2049
|
+
), $ = async (e, t, n) => (await S(
|
|
2050
|
+
"get",
|
|
2051
|
+
`/reports/${e}`,
|
|
2052
|
+
{
|
|
2053
|
+
responseType: n,
|
|
2054
|
+
params: { namespaces: t }
|
|
2055
|
+
}
|
|
2056
|
+
)).data, jr = (e, t, n, r = "pdf") => $(`${e}.rep.${r}`, t, n), Br = async (e, t, n, r) => {
|
|
2057
|
+
var o;
|
|
2058
|
+
const { content: { result: s } } = await I(
|
|
2059
|
+
e,
|
|
2060
|
+
t,
|
|
2061
|
+
n
|
|
2062
|
+
);
|
|
2063
|
+
if (!s)
|
|
2064
|
+
throw new Error("Job have no result");
|
|
2065
|
+
return $(((o = s.detail) == null ? void 0 : o.files.report) ?? "", n, r);
|
|
2066
|
+
}, Mr = async (e, t, n) => {
|
|
2067
|
+
const r = await $(`${e}.det.json`, t, n);
|
|
2068
|
+
return !n || n === "json" ? ge(r) : r;
|
|
2069
|
+
}, Ir = async (e, t, n, r) => {
|
|
2070
|
+
var i;
|
|
2071
|
+
const { content: { result: s } } = await I(
|
|
2072
|
+
e,
|
|
2073
|
+
t,
|
|
2074
|
+
n
|
|
2075
|
+
);
|
|
2076
|
+
if (!s)
|
|
2077
|
+
throw new Error("Job have no result");
|
|
2078
|
+
const o = await $(((i = s.detail) == null ? void 0 : i.files.detail) ?? "", n, r);
|
|
2079
|
+
return !r || r === "json" ? ge(o) : o;
|
|
2080
|
+
}, Hr = (e, t, n) => $(`${e}.deb.json`, t, n), zr = async (e, t, n, r) => {
|
|
2081
|
+
var o;
|
|
2082
|
+
const { content: { result: s } } = await I(
|
|
2083
|
+
e,
|
|
2084
|
+
t,
|
|
2085
|
+
n
|
|
2086
|
+
);
|
|
2087
|
+
if (!s)
|
|
2088
|
+
throw new Error("Job have no result");
|
|
2089
|
+
return $(((o = s.detail) == null ? void 0 : o.files.debug) ?? "", n, r);
|
|
2090
|
+
}, _s = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2091
|
+
__proto__: null,
|
|
2092
|
+
getReportDebugByJob: zr,
|
|
2093
|
+
getReportDebugByName: Hr,
|
|
2094
|
+
getReportDetailByJob: Ir,
|
|
2095
|
+
getReportDetailByName: Mr,
|
|
2096
|
+
getReportFileByJob: Br,
|
|
2097
|
+
getReportFileByName: jr,
|
|
2098
|
+
startAndListenGeneration: Ur,
|
|
2099
|
+
startGeneration: Ot
|
|
2100
|
+
}, Symbol.toStringTag, { value: "Module" })), qr = (e) => {
|
|
2101
|
+
m.defaults.baseURL = e;
|
|
2102
|
+
}, Jr = () => {
|
|
2103
|
+
m.defaults.baseURL = void 0;
|
|
2104
|
+
}, Wr = () => !!m.defaults.baseURL, Ns = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2105
|
+
__proto__: null,
|
|
2106
|
+
isLogged: ct,
|
|
2107
|
+
isURLset: Wr,
|
|
2108
|
+
login: it,
|
|
2109
|
+
logout: at,
|
|
2110
|
+
setURL: qr,
|
|
2111
|
+
unsetURL: Jr
|
|
2112
|
+
}, Symbol.toStringTag, { value: "Module" })), H = (e) => {
|
|
2113
|
+
const {
|
|
2114
|
+
history: t,
|
|
2115
|
+
template: n,
|
|
2116
|
+
targets: r,
|
|
2117
|
+
...s
|
|
2118
|
+
} = e;
|
|
2119
|
+
return {
|
|
2120
|
+
...pt(s),
|
|
2121
|
+
history: t.map(br),
|
|
2122
|
+
template: n,
|
|
2123
|
+
targets: r
|
|
2124
|
+
};
|
|
2125
|
+
}, Kr = async (e, t) => {
|
|
2126
|
+
const { data: { content: n, ...r } } = await S(
|
|
2127
|
+
"get",
|
|
2128
|
+
"/tasks",
|
|
2129
|
+
{
|
|
2130
|
+
params: {
|
|
2131
|
+
namespaces: t,
|
|
2132
|
+
...e ?? {}
|
|
2133
|
+
}
|
|
2134
|
+
}
|
|
2135
|
+
);
|
|
2136
|
+
return {
|
|
2137
|
+
...r,
|
|
2138
|
+
content: n.map(dt)
|
|
2139
|
+
};
|
|
2140
|
+
}, Vr = async (e, t) => {
|
|
2141
|
+
const { content: n, ...r } = await m.$post(
|
|
2142
|
+
"/tasks",
|
|
2143
|
+
e,
|
|
2144
|
+
{ params: { namespaces: t } }
|
|
2145
|
+
);
|
|
2146
|
+
return {
|
|
2147
|
+
...r,
|
|
2148
|
+
content: H(n)
|
|
2149
|
+
};
|
|
2150
|
+
}, Yr = async (e, t) => {
|
|
2151
|
+
const { content: n, ...r } = await m.$get(`/tasks/${e}`, { params: { namespaces: t } });
|
|
2152
|
+
return {
|
|
2153
|
+
...r,
|
|
2154
|
+
content: H(n)
|
|
2155
|
+
};
|
|
2156
|
+
}, At = async (e, t, n) => {
|
|
2157
|
+
const { content: r, ...s } = await m.$put(
|
|
2158
|
+
`/tasks/${e}`,
|
|
2159
|
+
t,
|
|
2160
|
+
{ params: { namespaces: n } }
|
|
2161
|
+
);
|
|
2162
|
+
return {
|
|
2163
|
+
...s,
|
|
2164
|
+
content: H(r)
|
|
2165
|
+
};
|
|
2166
|
+
}, Gr = At, Qr = async (e, t) => {
|
|
2167
|
+
await m.$delete(`/tasks/${e}`, { params: { namespaces: t } });
|
|
2168
|
+
}, Zr = async (e, t) => {
|
|
2169
|
+
const { content: n, ...r } = await m.$put(
|
|
2170
|
+
`/tasks/${e}/enable`,
|
|
2171
|
+
void 0,
|
|
2172
|
+
{ params: { namespaces: t } }
|
|
2173
|
+
);
|
|
2174
|
+
return {
|
|
2175
|
+
...r,
|
|
2176
|
+
content: H(n)
|
|
2177
|
+
};
|
|
2178
|
+
}, Xr = async (e, t) => {
|
|
2179
|
+
const { content: n, ...r } = await m.$put(
|
|
2180
|
+
`/tasks/${e}/disable`,
|
|
2181
|
+
void 0,
|
|
2182
|
+
{ params: { namespaces: t } }
|
|
2183
|
+
);
|
|
2184
|
+
return {
|
|
2185
|
+
...r,
|
|
2186
|
+
content: H(n)
|
|
2187
|
+
};
|
|
2188
|
+
}, Ls = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2189
|
+
__proto__: null,
|
|
2190
|
+
Recurrence: ft,
|
|
2191
|
+
createTask: Vr,
|
|
2192
|
+
deleteTask: Qr,
|
|
2193
|
+
disableTask: Xr,
|
|
2194
|
+
enableTask: Zr,
|
|
2195
|
+
getAllTasks: Kr,
|
|
2196
|
+
getTask: Yr,
|
|
2197
|
+
updateTask: Gr,
|
|
2198
|
+
upsertTask: At
|
|
2199
|
+
}, Symbol.toStringTag, { value: "Module" })), Rt = (e) => ({
|
|
2200
|
+
...e,
|
|
2201
|
+
createdAt: g(e.createdAt),
|
|
2202
|
+
updatedAt: e.updatedAt ? g(e.updatedAt) : void 0
|
|
2203
|
+
}), Ee = (e) => {
|
|
2204
|
+
const { body: t, ...n } = e;
|
|
2205
|
+
return {
|
|
2206
|
+
...Rt(n),
|
|
2207
|
+
body: t
|
|
2208
|
+
};
|
|
2209
|
+
}, es = async () => {
|
|
2210
|
+
const { content: e, ...t } = await m.$get("/templates");
|
|
2211
|
+
return {
|
|
2212
|
+
...t,
|
|
2213
|
+
content: e.map(Rt)
|
|
2214
|
+
};
|
|
2215
|
+
}, ts = async (e) => {
|
|
2216
|
+
const { content: t, ...n } = await m.$get(`/templates/${e}`);
|
|
2217
|
+
return {
|
|
2218
|
+
...n,
|
|
2219
|
+
content: Ee(t)
|
|
2220
|
+
};
|
|
2221
|
+
}, ns = async (e) => {
|
|
2222
|
+
const { content: t, ...n } = await m.$post(
|
|
2223
|
+
"/templates",
|
|
2224
|
+
e
|
|
2225
|
+
);
|
|
2226
|
+
return {
|
|
2227
|
+
...n,
|
|
2228
|
+
content: Ee(t)
|
|
2229
|
+
};
|
|
2230
|
+
}, St = async (e, t) => {
|
|
2231
|
+
const { content: n, ...r } = await m.$put(
|
|
2232
|
+
`/templates/${e}`,
|
|
2233
|
+
t
|
|
2234
|
+
);
|
|
2235
|
+
return {
|
|
2236
|
+
...r,
|
|
2237
|
+
content: Ee(n)
|
|
2238
|
+
};
|
|
2239
|
+
}, rs = St, ss = async (e) => {
|
|
2240
|
+
await m.$delete(`/templates/${e}`);
|
|
2241
|
+
}, xs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2242
|
+
__proto__: null,
|
|
2243
|
+
createTemplate: ns,
|
|
2244
|
+
deleteTemplate: ss,
|
|
2245
|
+
getAllTemplates: es,
|
|
2246
|
+
getTemplate: ts,
|
|
2247
|
+
updateTemplate: rs,
|
|
2248
|
+
upsertTemplate: St
|
|
2249
|
+
}, Symbol.toStringTag, { value: "Module" })), Cs = "1.0.0-beta.3";
|
|
2250
|
+
export {
|
|
2251
|
+
vs as auth,
|
|
2252
|
+
Os as crons,
|
|
2253
|
+
As as health,
|
|
2254
|
+
Rs as history,
|
|
2255
|
+
Ss as namespaces,
|
|
2256
|
+
Ts as queues,
|
|
2257
|
+
_s as reports,
|
|
2258
|
+
Ns as setup,
|
|
2259
|
+
Ls as tasks,
|
|
2260
|
+
xs as templates,
|
|
2261
|
+
Cs as version
|
|
2262
|
+
};
|
|
2263
|
+
//# sourceMappingURL=ezreeport-sdk-js.mjs.map
|