@libretexts/cxone-expert-node 1.3.0 → 1.4.0

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.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { createHmac as bt } from "crypto";
2
- class We {
1
+ import { createHmac as Ct } from "crypto";
2
+ class et {
3
3
  token = null;
4
4
  BrowserToken({ key: e }) {
5
5
  return this.token = e, this;
@@ -7,10 +7,10 @@ class We {
7
7
  ServerToken({ key: e, secret: t, user: s }) {
8
8
  if (!e || !t || !s)
9
9
  throw new Error("Missing required parameters: key, secret, user");
10
- const n = Math.floor(Date.now() / 1e3), a = bt("sha256", t);
11
- a.update(`${e}${n}=${s}`);
12
- const o = a.digest("hex");
13
- return this.token = `${e}_${n}_=${s}_${o}`, this;
10
+ const r = Math.floor(Date.now() / 1e3), n = Ct("sha256", t);
11
+ n.update(`${e}${r}=${s}`);
12
+ const o = n.digest("hex");
13
+ return this.token = `${e}_${r}_=${s}_${o}`, this;
14
14
  }
15
15
  getToken() {
16
16
  return this.token;
@@ -21,180 +21,505 @@ class We {
21
21
  };
22
22
  }
23
23
  }
24
- function h(r, e) {
25
- if (!e && !r.tld)
24
+ function Ft(a) {
25
+ return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
26
+ }
27
+ var re = { exports: {} }, fe, Ue;
28
+ function Et() {
29
+ if (Ue) return fe;
30
+ Ue = 1;
31
+ var a = 1e3, e = a * 60, t = e * 60, s = t * 24, r = s * 7, n = s * 365.25;
32
+ fe = function(u, h) {
33
+ h = h || {};
34
+ var m = typeof u;
35
+ if (m === "string" && u.length > 0)
36
+ return o(u);
37
+ if (m === "number" && isFinite(u))
38
+ return h.long ? l(u) : i(u);
39
+ throw new Error(
40
+ "val is not a non-empty string or a valid number. val=" + JSON.stringify(u)
41
+ );
42
+ };
43
+ function o(u) {
44
+ if (u = String(u), !(u.length > 100)) {
45
+ var h = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
46
+ u
47
+ );
48
+ if (h) {
49
+ var m = parseFloat(h[1]), q = (h[2] || "ms").toLowerCase();
50
+ switch (q) {
51
+ case "years":
52
+ case "year":
53
+ case "yrs":
54
+ case "yr":
55
+ case "y":
56
+ return m * n;
57
+ case "weeks":
58
+ case "week":
59
+ case "w":
60
+ return m * r;
61
+ case "days":
62
+ case "day":
63
+ case "d":
64
+ return m * s;
65
+ case "hours":
66
+ case "hour":
67
+ case "hrs":
68
+ case "hr":
69
+ case "h":
70
+ return m * t;
71
+ case "minutes":
72
+ case "minute":
73
+ case "mins":
74
+ case "min":
75
+ case "m":
76
+ return m * e;
77
+ case "seconds":
78
+ case "second":
79
+ case "secs":
80
+ case "sec":
81
+ case "s":
82
+ return m * a;
83
+ case "milliseconds":
84
+ case "millisecond":
85
+ case "msecs":
86
+ case "msec":
87
+ case "ms":
88
+ return m;
89
+ default:
90
+ return;
91
+ }
92
+ }
93
+ }
94
+ }
95
+ function i(u) {
96
+ var h = Math.abs(u);
97
+ return h >= s ? Math.round(u / s) + "d" : h >= t ? Math.round(u / t) + "h" : h >= e ? Math.round(u / e) + "m" : h >= a ? Math.round(u / a) + "s" : u + "ms";
98
+ }
99
+ function l(u) {
100
+ var h = Math.abs(u);
101
+ return h >= s ? d(u, h, s, "day") : h >= t ? d(u, h, t, "hour") : h >= e ? d(u, h, e, "minute") : h >= a ? d(u, h, a, "second") : u + " ms";
102
+ }
103
+ function d(u, h, m, q) {
104
+ var f = h >= m * 1.5;
105
+ return Math.round(u / m) + " " + q + (f ? "s" : "");
106
+ }
107
+ return fe;
108
+ }
109
+ var be, De;
110
+ function St() {
111
+ if (De) return be;
112
+ De = 1;
113
+ function a(e) {
114
+ s.debug = s, s.default = s, s.coerce = d, s.disable = i, s.enable = n, s.enabled = l, s.humanize = Et(), s.destroy = u, Object.keys(e).forEach((h) => {
115
+ s[h] = e[h];
116
+ }), s.names = [], s.skips = [], s.formatters = {};
117
+ function t(h) {
118
+ let m = 0;
119
+ for (let q = 0; q < h.length; q++)
120
+ m = (m << 5) - m + h.charCodeAt(q), m |= 0;
121
+ return s.colors[Math.abs(m) % s.colors.length];
122
+ }
123
+ s.selectColor = t;
124
+ function s(h) {
125
+ let m, q = null, f, y;
126
+ function b(...R) {
127
+ if (!b.enabled)
128
+ return;
129
+ const F = b, I = Number(/* @__PURE__ */ new Date()), E = I - (m || I);
130
+ F.diff = E, F.prev = m, F.curr = I, m = I, R[0] = s.coerce(R[0]), typeof R[0] != "string" && R.unshift("%O");
131
+ let S = 0;
132
+ R[0] = R[0].replace(/%([a-zA-Z%])/g, (T, J) => {
133
+ if (T === "%%")
134
+ return "%";
135
+ S++;
136
+ const L = s.formatters[J];
137
+ if (typeof L == "function") {
138
+ const ee = R[S];
139
+ T = L.call(F, ee), R.splice(S, 1), S--;
140
+ }
141
+ return T;
142
+ }), s.formatArgs.call(F, R), (F.log || s.log).apply(F, R);
143
+ }
144
+ return b.namespace = h, b.useColors = s.useColors(), b.color = s.selectColor(h), b.extend = r, b.destroy = s.destroy, Object.defineProperty(b, "enabled", {
145
+ enumerable: !0,
146
+ configurable: !1,
147
+ get: () => q !== null ? q : (f !== s.namespaces && (f = s.namespaces, y = s.enabled(h)), y),
148
+ set: (R) => {
149
+ q = R;
150
+ }
151
+ }), typeof s.init == "function" && s.init(b), b;
152
+ }
153
+ function r(h, m) {
154
+ const q = s(this.namespace + (typeof m > "u" ? ":" : m) + h);
155
+ return q.log = this.log, q;
156
+ }
157
+ function n(h) {
158
+ s.save(h), s.namespaces = h, s.names = [], s.skips = [];
159
+ const m = (typeof h == "string" ? h : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
160
+ for (const q of m)
161
+ q[0] === "-" ? s.skips.push(q.slice(1)) : s.names.push(q);
162
+ }
163
+ function o(h, m) {
164
+ let q = 0, f = 0, y = -1, b = 0;
165
+ for (; q < h.length; )
166
+ if (f < m.length && (m[f] === h[q] || m[f] === "*"))
167
+ m[f] === "*" ? (y = f, b = q, f++) : (q++, f++);
168
+ else if (y !== -1)
169
+ f = y + 1, b++, q = b;
170
+ else
171
+ return !1;
172
+ for (; f < m.length && m[f] === "*"; )
173
+ f++;
174
+ return f === m.length;
175
+ }
176
+ function i() {
177
+ const h = [
178
+ ...s.names,
179
+ ...s.skips.map((m) => "-" + m)
180
+ ].join(",");
181
+ return s.enable(""), h;
182
+ }
183
+ function l(h) {
184
+ for (const m of s.skips)
185
+ if (o(h, m))
186
+ return !1;
187
+ for (const m of s.names)
188
+ if (o(h, m))
189
+ return !0;
190
+ return !1;
191
+ }
192
+ function d(h) {
193
+ return h instanceof Error ? h.stack || h.message : h;
194
+ }
195
+ function u() {
196
+ console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
197
+ }
198
+ return s.enable(s.load()), s;
199
+ }
200
+ return be = a, be;
201
+ }
202
+ var ke;
203
+ function Tt() {
204
+ return ke || (ke = 1, (function(a, e) {
205
+ e.formatArgs = s, e.save = r, e.load = n, e.useColors = t, e.storage = o(), e.destroy = /* @__PURE__ */ (() => {
206
+ let l = !1;
207
+ return () => {
208
+ l || (l = !0, console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));
209
+ };
210
+ })(), e.colors = [
211
+ "#0000CC",
212
+ "#0000FF",
213
+ "#0033CC",
214
+ "#0033FF",
215
+ "#0066CC",
216
+ "#0066FF",
217
+ "#0099CC",
218
+ "#0099FF",
219
+ "#00CC00",
220
+ "#00CC33",
221
+ "#00CC66",
222
+ "#00CC99",
223
+ "#00CCCC",
224
+ "#00CCFF",
225
+ "#3300CC",
226
+ "#3300FF",
227
+ "#3333CC",
228
+ "#3333FF",
229
+ "#3366CC",
230
+ "#3366FF",
231
+ "#3399CC",
232
+ "#3399FF",
233
+ "#33CC00",
234
+ "#33CC33",
235
+ "#33CC66",
236
+ "#33CC99",
237
+ "#33CCCC",
238
+ "#33CCFF",
239
+ "#6600CC",
240
+ "#6600FF",
241
+ "#6633CC",
242
+ "#6633FF",
243
+ "#66CC00",
244
+ "#66CC33",
245
+ "#9900CC",
246
+ "#9900FF",
247
+ "#9933CC",
248
+ "#9933FF",
249
+ "#99CC00",
250
+ "#99CC33",
251
+ "#CC0000",
252
+ "#CC0033",
253
+ "#CC0066",
254
+ "#CC0099",
255
+ "#CC00CC",
256
+ "#CC00FF",
257
+ "#CC3300",
258
+ "#CC3333",
259
+ "#CC3366",
260
+ "#CC3399",
261
+ "#CC33CC",
262
+ "#CC33FF",
263
+ "#CC6600",
264
+ "#CC6633",
265
+ "#CC9900",
266
+ "#CC9933",
267
+ "#CCCC00",
268
+ "#CCCC33",
269
+ "#FF0000",
270
+ "#FF0033",
271
+ "#FF0066",
272
+ "#FF0099",
273
+ "#FF00CC",
274
+ "#FF00FF",
275
+ "#FF3300",
276
+ "#FF3333",
277
+ "#FF3366",
278
+ "#FF3399",
279
+ "#FF33CC",
280
+ "#FF33FF",
281
+ "#FF6600",
282
+ "#FF6633",
283
+ "#FF9900",
284
+ "#FF9933",
285
+ "#FFCC00",
286
+ "#FFCC33"
287
+ ];
288
+ function t() {
289
+ if (typeof window < "u" && window.process && (window.process.type === "renderer" || window.process.__nwjs))
290
+ return !0;
291
+ if (typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))
292
+ return !1;
293
+ let l;
294
+ return typeof document < "u" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
295
+ typeof window < "u" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
296
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
297
+ typeof navigator < "u" && navigator.userAgent && (l = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(l[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
298
+ typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
299
+ }
300
+ function s(l) {
301
+ if (l[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + l[0] + (this.useColors ? "%c " : " ") + "+" + a.exports.humanize(this.diff), !this.useColors)
302
+ return;
303
+ const d = "color: " + this.color;
304
+ l.splice(1, 0, d, "color: inherit");
305
+ let u = 0, h = 0;
306
+ l[0].replace(/%[a-zA-Z%]/g, (m) => {
307
+ m !== "%%" && (u++, m === "%c" && (h = u));
308
+ }), l.splice(h, 0, d);
309
+ }
310
+ e.log = console.debug || console.log || (() => {
311
+ });
312
+ function r(l) {
313
+ try {
314
+ l ? e.storage.setItem("debug", l) : e.storage.removeItem("debug");
315
+ } catch {
316
+ }
317
+ }
318
+ function n() {
319
+ let l;
320
+ try {
321
+ l = e.storage.getItem("debug") || e.storage.getItem("DEBUG");
322
+ } catch {
323
+ }
324
+ return !l && typeof process < "u" && "env" in process && (l = process.env.DEBUG), l;
325
+ }
326
+ function o() {
327
+ try {
328
+ return localStorage;
329
+ } catch {
330
+ }
331
+ }
332
+ a.exports = St()(e);
333
+ const { formatters: i } = a.exports;
334
+ i.j = function(l) {
335
+ try {
336
+ return JSON.stringify(l);
337
+ } catch (d) {
338
+ return "[UnexpectedJSONParseError]: " + d.message;
339
+ }
340
+ };
341
+ })(re, re.exports)), re.exports;
342
+ }
343
+ var xt = Tt();
344
+ const Ot = /* @__PURE__ */ Ft(xt);
345
+ function Ce(a, e) {
346
+ const t = Ot(a);
347
+ return e !== void 0 && (t.enabled = e), t;
348
+ }
349
+ function p(a, e) {
350
+ if (!e && !a.tld)
26
351
  throw new Error("TLD is required");
27
- return e ?? r.tld;
352
+ return e ?? a.tld;
28
353
  }
29
- function p(r, e) {
354
+ function g(a, e) {
30
355
  if (e)
31
356
  return e;
32
- if (r.auth) {
33
- const t = new We();
34
- if (r.auth.type === "server")
35
- return t.ServerToken(r.auth.params).getHeader();
36
- if (r.auth.type === "browser")
37
- return t.BrowserToken(r.auth.params).getHeader();
357
+ if (a.auth) {
358
+ const t = new et();
359
+ if (a.auth.type === "server")
360
+ return t.ServerToken(a.auth.params).getHeader();
361
+ if (a.auth.type === "browser")
362
+ return t.BrowserToken(a.auth.params).getHeader();
38
363
  }
39
364
  throw new Error("Authentication is required. Configure auth in Expert constructor or pass auth to method call.");
40
365
  }
41
- function Ve(r, e) {
366
+ function tt(a, e) {
42
367
  return function() {
43
- return r.apply(e, arguments);
368
+ return a.apply(e, arguments);
44
369
  };
45
370
  }
46
- const { toString: wt } = Object.prototype, { getPrototypeOf: Ie } = Object, { iterator: oe, toStringTag: Ge } = Symbol, ie = /* @__PURE__ */ ((r) => (e) => {
47
- const t = wt.call(e);
48
- return r[t] || (r[t] = t.slice(8, -1).toLowerCase());
49
- })(/* @__PURE__ */ Object.create(null)), U = (r) => (r = r.toLowerCase(), (e) => ie(e) === r), le = (r) => (e) => typeof e === r, { isArray: K } = Array, H = le("undefined");
50
- function W(r) {
51
- return r !== null && !H(r) && r.constructor !== null && !H(r.constructor) && O(r.constructor.isBuffer) && r.constructor.isBuffer(r);
371
+ const { toString: $t } = Object.prototype, { getPrototypeOf: Fe } = Object, { iterator: ue, toStringTag: st } = Symbol, ce = /* @__PURE__ */ ((a) => (e) => {
372
+ const t = $t.call(e);
373
+ return a[t] || (a[t] = t.slice(8, -1).toLowerCase());
374
+ })(/* @__PURE__ */ Object.create(null)), v = (a) => (a = a.toLowerCase(), (e) => ce(e) === a), de = (a) => (e) => typeof e === a, { isArray: z } = Array, K = de("undefined");
375
+ function G(a) {
376
+ return a !== null && !K(a) && a.constructor !== null && !K(a.constructor) && $(a.constructor.isBuffer) && a.constructor.isBuffer(a);
52
377
  }
53
- const Xe = U("ArrayBuffer");
54
- function yt(r) {
378
+ const rt = v("ArrayBuffer");
379
+ function _t(a) {
55
380
  let e;
56
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(r) : e = r && r.buffer && Xe(r.buffer), e;
381
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(a) : e = a && a.buffer && rt(a.buffer), e;
57
382
  }
58
- const It = le("string"), O = le("function"), Qe = le("number"), V = (r) => r !== null && typeof r == "object", qt = (r) => r === !0 || r === !1, se = (r) => {
59
- if (ie(r) !== "object")
383
+ const Nt = de("string"), $ = de("function"), at = de("number"), X = (a) => a !== null && typeof a == "object", vt = (a) => a === !0 || a === !1, ne = (a) => {
384
+ if (ce(a) !== "object")
60
385
  return !1;
61
- const e = Ie(r);
62
- return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Ge in r) && !(oe in r);
63
- }, Rt = (r) => {
64
- if (!V(r) || W(r))
386
+ const e = Fe(a);
387
+ return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(st in a) && !(ue in a);
388
+ }, Ut = (a) => {
389
+ if (!X(a) || G(a))
65
390
  return !1;
66
391
  try {
67
- return Object.keys(r).length === 0 && Object.getPrototypeOf(r) === Object.prototype;
392
+ return Object.keys(a).length === 0 && Object.getPrototypeOf(a) === Object.prototype;
68
393
  } catch {
69
394
  return !1;
70
395
  }
71
- }, Pt = U("Date"), Et = U("File"), St = U("Blob"), Tt = U("FileList"), $t = (r) => V(r) && O(r.pipe), Ot = (r) => {
396
+ }, Dt = v("Date"), kt = v("File"), Lt = v("Blob"), Bt = v("FileList"), At = (a) => X(a) && $(a.pipe), jt = (a) => {
72
397
  let e;
73
- return r && (typeof FormData == "function" && r instanceof FormData || O(r.append) && ((e = ie(r)) === "formdata" || // detect form-data instance
74
- e === "object" && O(r.toString) && r.toString() === "[object FormData]"));
75
- }, _t = U("URLSearchParams"), [Ft, Ct, xt, Nt] = [
398
+ return a && (typeof FormData == "function" && a instanceof FormData || $(a.append) && ((e = ce(a)) === "formdata" || // detect form-data instance
399
+ e === "object" && $(a.toString) && a.toString() === "[object FormData]"));
400
+ }, Mt = v("URLSearchParams"), [Ht, Kt, zt, Jt] = [
76
401
  "ReadableStream",
77
402
  "Request",
78
403
  "Response",
79
404
  "Headers"
80
- ].map(U), Ut = (r) => r.trim ? r.trim() : r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
81
- function G(r, e, { allOwnKeys: t = !1 } = {}) {
82
- if (r === null || typeof r > "u")
405
+ ].map(v), Wt = (a) => a.trim ? a.trim() : a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
406
+ function Q(a, e, { allOwnKeys: t = !1 } = {}) {
407
+ if (a === null || typeof a > "u")
83
408
  return;
84
- let s, n;
85
- if (typeof r != "object" && (r = [r]), K(r))
86
- for (s = 0, n = r.length; s < n; s++)
87
- e.call(null, r[s], s, r);
409
+ let s, r;
410
+ if (typeof a != "object" && (a = [a]), z(a))
411
+ for (s = 0, r = a.length; s < r; s++)
412
+ e.call(null, a[s], s, a);
88
413
  else {
89
- if (W(r))
414
+ if (G(a))
90
415
  return;
91
- const a = t ? Object.getOwnPropertyNames(r) : Object.keys(r), o = a.length;
416
+ const n = t ? Object.getOwnPropertyNames(a) : Object.keys(a), o = n.length;
92
417
  let i;
93
418
  for (s = 0; s < o; s++)
94
- i = a[s], e.call(null, r[i], i, r);
419
+ i = n[s], e.call(null, a[i], i, a);
95
420
  }
96
421
  }
97
- function Ze(r, e) {
98
- if (W(r))
422
+ function nt(a, e) {
423
+ if (G(a))
99
424
  return null;
100
425
  e = e.toLowerCase();
101
- const t = Object.keys(r);
102
- let s = t.length, n;
426
+ const t = Object.keys(a);
427
+ let s = t.length, r;
103
428
  for (; s-- > 0; )
104
- if (n = t[s], e === n.toLowerCase())
105
- return n;
429
+ if (r = t[s], e === r.toLowerCase())
430
+ return r;
106
431
  return null;
107
432
  }
108
- const v = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Ye = (r) => !H(r) && r !== v;
109
- function me() {
110
- const { caseless: r, skipUndefined: e } = Ye(this) && this || {}, t = {}, s = (n, a) => {
111
- if (a === "__proto__" || a === "constructor" || a === "prototype")
433
+ const A = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, ot = (a) => !K(a) && a !== A;
434
+ function Pe() {
435
+ const { caseless: a, skipUndefined: e } = ot(this) && this || {}, t = {}, s = (r, n) => {
436
+ if (n === "__proto__" || n === "constructor" || n === "prototype")
112
437
  return;
113
- const o = r && Ze(t, a) || a;
114
- se(t[o]) && se(n) ? t[o] = me(t[o], n) : se(n) ? t[o] = me({}, n) : K(n) ? t[o] = n.slice() : (!e || !H(n)) && (t[o] = n);
438
+ const o = a && nt(t, n) || n;
439
+ ne(t[o]) && ne(r) ? t[o] = Pe(t[o], r) : ne(r) ? t[o] = Pe({}, r) : z(r) ? t[o] = r.slice() : (!e || !K(r)) && (t[o] = r);
115
440
  };
116
- for (let n = 0, a = arguments.length; n < a; n++)
117
- arguments[n] && G(arguments[n], s);
441
+ for (let r = 0, n = arguments.length; r < n; r++)
442
+ arguments[r] && Q(arguments[r], s);
118
443
  return t;
119
444
  }
120
- const Dt = (r, e, t, { allOwnKeys: s } = {}) => (G(
445
+ const Vt = (a, e, t, { allOwnKeys: s } = {}) => (Q(
121
446
  e,
122
- (n, a) => {
123
- t && O(n) ? Object.defineProperty(r, a, {
124
- value: Ve(n, t),
447
+ (r, n) => {
448
+ t && $(r) ? Object.defineProperty(a, n, {
449
+ value: tt(r, t),
125
450
  writable: !0,
126
451
  enumerable: !0,
127
452
  configurable: !0
128
- }) : Object.defineProperty(r, a, {
129
- value: n,
453
+ }) : Object.defineProperty(a, n, {
454
+ value: r,
130
455
  writable: !0,
131
456
  enumerable: !0,
132
457
  configurable: !0
133
458
  });
134
459
  },
135
460
  { allOwnKeys: s }
136
- ), r), kt = (r) => (r.charCodeAt(0) === 65279 && (r = r.slice(1)), r), Lt = (r, e, t, s) => {
137
- r.prototype = Object.create(
461
+ ), a), Gt = (a) => (a.charCodeAt(0) === 65279 && (a = a.slice(1)), a), Xt = (a, e, t, s) => {
462
+ a.prototype = Object.create(
138
463
  e.prototype,
139
464
  s
140
- ), Object.defineProperty(r.prototype, "constructor", {
141
- value: r,
465
+ ), Object.defineProperty(a.prototype, "constructor", {
466
+ value: a,
142
467
  writable: !0,
143
468
  enumerable: !1,
144
469
  configurable: !0
145
- }), Object.defineProperty(r, "super", {
470
+ }), Object.defineProperty(a, "super", {
146
471
  value: e.prototype
147
- }), t && Object.assign(r.prototype, t);
148
- }, Bt = (r, e, t, s) => {
149
- let n, a, o;
472
+ }), t && Object.assign(a.prototype, t);
473
+ }, Qt = (a, e, t, s) => {
474
+ let r, n, o;
150
475
  const i = {};
151
- if (e = e || {}, r == null) return e;
476
+ if (e = e || {}, a == null) return e;
152
477
  do {
153
- for (n = Object.getOwnPropertyNames(r), a = n.length; a-- > 0; )
154
- o = n[a], (!s || s(o, r, e)) && !i[o] && (e[o] = r[o], i[o] = !0);
155
- r = t !== !1 && Ie(r);
156
- } while (r && (!t || t(r, e)) && r !== Object.prototype);
478
+ for (r = Object.getOwnPropertyNames(a), n = r.length; n-- > 0; )
479
+ o = r[n], (!s || s(o, a, e)) && !i[o] && (e[o] = a[o], i[o] = !0);
480
+ a = t !== !1 && Fe(a);
481
+ } while (a && (!t || t(a, e)) && a !== Object.prototype);
157
482
  return e;
158
- }, vt = (r, e, t) => {
159
- r = String(r), (t === void 0 || t > r.length) && (t = r.length), t -= e.length;
160
- const s = r.indexOf(e, t);
483
+ }, Zt = (a, e, t) => {
484
+ a = String(a), (t === void 0 || t > a.length) && (t = a.length), t -= e.length;
485
+ const s = a.indexOf(e, t);
161
486
  return s !== -1 && s === t;
162
- }, jt = (r) => {
163
- if (!r) return null;
164
- if (K(r)) return r;
165
- let e = r.length;
166
- if (!Qe(e)) return null;
487
+ }, Yt = (a) => {
488
+ if (!a) return null;
489
+ if (z(a)) return a;
490
+ let e = a.length;
491
+ if (!at(e)) return null;
167
492
  const t = new Array(e);
168
493
  for (; e-- > 0; )
169
- t[e] = r[e];
494
+ t[e] = a[e];
170
495
  return t;
171
- }, At = /* @__PURE__ */ ((r) => (e) => r && e instanceof r)(typeof Uint8Array < "u" && Ie(Uint8Array)), Mt = (r, e) => {
172
- const s = (r && r[oe]).call(r);
173
- let n;
174
- for (; (n = s.next()) && !n.done; ) {
175
- const a = n.value;
176
- e.call(r, a[0], a[1]);
177
- }
178
- }, Ht = (r, e) => {
496
+ }, es = /* @__PURE__ */ ((a) => (e) => a && e instanceof a)(typeof Uint8Array < "u" && Fe(Uint8Array)), ts = (a, e) => {
497
+ const s = (a && a[ue]).call(a);
498
+ let r;
499
+ for (; (r = s.next()) && !r.done; ) {
500
+ const n = r.value;
501
+ e.call(a, n[0], n[1]);
502
+ }
503
+ }, ss = (a, e) => {
179
504
  let t;
180
505
  const s = [];
181
- for (; (t = r.exec(e)) !== null; )
506
+ for (; (t = a.exec(e)) !== null; )
182
507
  s.push(t);
183
508
  return s;
184
- }, Kt = U("HTMLFormElement"), zt = (r) => r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(t, s, n) {
185
- return s.toUpperCase() + n;
186
- }), Ce = (({ hasOwnProperty: r }) => (e, t) => r.call(e, t))(Object.prototype), Jt = U("RegExp"), et = (r, e) => {
187
- const t = Object.getOwnPropertyDescriptors(r), s = {};
188
- G(t, (n, a) => {
509
+ }, rs = v("HTMLFormElement"), as = (a) => a.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(t, s, r) {
510
+ return s.toUpperCase() + r;
511
+ }), Le = (({ hasOwnProperty: a }) => (e, t) => a.call(e, t))(Object.prototype), ns = v("RegExp"), it = (a, e) => {
512
+ const t = Object.getOwnPropertyDescriptors(a), s = {};
513
+ Q(t, (r, n) => {
189
514
  let o;
190
- (o = e(n, a, r)) !== !1 && (s[a] = o || n);
191
- }), Object.defineProperties(r, s);
192
- }, Wt = (r) => {
193
- et(r, (e, t) => {
194
- if (O(r) && ["arguments", "caller", "callee"].indexOf(t) !== -1)
515
+ (o = e(r, n, a)) !== !1 && (s[n] = o || r);
516
+ }), Object.defineProperties(a, s);
517
+ }, os = (a) => {
518
+ it(a, (e, t) => {
519
+ if ($(a) && ["arguments", "caller", "callee"].indexOf(t) !== -1)
195
520
  return !1;
196
- const s = r[t];
197
- if (O(s)) {
521
+ const s = a[t];
522
+ if ($(s)) {
198
523
  if (e.enumerable = !1, "writable" in e) {
199
524
  e.writable = !1;
200
525
  return;
@@ -204,108 +529,108 @@ const Dt = (r, e, t, { allOwnKeys: s } = {}) => (G(
204
529
  });
205
530
  }
206
531
  });
207
- }, Vt = (r, e) => {
208
- const t = {}, s = (n) => {
209
- n.forEach((a) => {
210
- t[a] = !0;
532
+ }, is = (a, e) => {
533
+ const t = {}, s = (r) => {
534
+ r.forEach((n) => {
535
+ t[n] = !0;
211
536
  });
212
537
  };
213
- return K(r) ? s(r) : s(String(r).split(e)), t;
214
- }, Gt = () => {
215
- }, Xt = (r, e) => r != null && Number.isFinite(r = +r) ? r : e;
216
- function Qt(r) {
217
- return !!(r && O(r.append) && r[Ge] === "FormData" && r[oe]);
538
+ return z(a) ? s(a) : s(String(a).split(e)), t;
539
+ }, ls = () => {
540
+ }, us = (a, e) => a != null && Number.isFinite(a = +a) ? a : e;
541
+ function cs(a) {
542
+ return !!(a && $(a.append) && a[st] === "FormData" && a[ue]);
218
543
  }
219
- const Zt = (r) => {
220
- const e = new Array(10), t = (s, n) => {
221
- if (V(s)) {
544
+ const ds = (a) => {
545
+ const e = new Array(10), t = (s, r) => {
546
+ if (X(s)) {
222
547
  if (e.indexOf(s) >= 0)
223
548
  return;
224
- if (W(s))
549
+ if (G(s))
225
550
  return s;
226
551
  if (!("toJSON" in s)) {
227
- e[n] = s;
228
- const a = K(s) ? [] : {};
229
- return G(s, (o, i) => {
230
- const l = t(o, n + 1);
231
- !H(l) && (a[i] = l);
232
- }), e[n] = void 0, a;
552
+ e[r] = s;
553
+ const n = z(s) ? [] : {};
554
+ return Q(s, (o, i) => {
555
+ const l = t(o, r + 1);
556
+ !K(l) && (n[i] = l);
557
+ }), e[r] = void 0, n;
233
558
  }
234
559
  }
235
560
  return s;
236
561
  };
237
- return t(r, 0);
238
- }, Yt = U("AsyncFunction"), es = (r) => r && (V(r) || O(r)) && O(r.then) && O(r.catch), tt = ((r, e) => r ? setImmediate : e ? ((t, s) => (v.addEventListener(
562
+ return t(a, 0);
563
+ }, hs = v("AsyncFunction"), ps = (a) => a && (X(a) || $(a)) && $(a.then) && $(a.catch), lt = ((a, e) => a ? setImmediate : e ? ((t, s) => (A.addEventListener(
239
564
  "message",
240
- ({ source: n, data: a }) => {
241
- n === v && a === t && s.length && s.shift()();
565
+ ({ source: r, data: n }) => {
566
+ r === A && n === t && s.length && s.shift()();
242
567
  },
243
568
  !1
244
- ), (n) => {
245
- s.push(n), v.postMessage(t, "*");
246
- }))(`axios@${Math.random()}`, []) : (t) => setTimeout(t))(typeof setImmediate == "function", O(v.postMessage)), ts = typeof queueMicrotask < "u" ? queueMicrotask.bind(v) : typeof process < "u" && process.nextTick || tt, ss = (r) => r != null && O(r[oe]), c = {
247
- isArray: K,
248
- isArrayBuffer: Xe,
249
- isBuffer: W,
250
- isFormData: Ot,
251
- isArrayBufferView: yt,
252
- isString: It,
253
- isNumber: Qe,
254
- isBoolean: qt,
255
- isObject: V,
256
- isPlainObject: se,
257
- isEmptyObject: Rt,
258
- isReadableStream: Ft,
259
- isRequest: Ct,
260
- isResponse: xt,
261
- isHeaders: Nt,
262
- isUndefined: H,
263
- isDate: Pt,
264
- isFile: Et,
265
- isBlob: St,
266
- isRegExp: Jt,
267
- isFunction: O,
268
- isStream: $t,
269
- isURLSearchParams: _t,
270
- isTypedArray: At,
271
- isFileList: Tt,
272
- forEach: G,
273
- merge: me,
274
- extend: Dt,
275
- trim: Ut,
276
- stripBOM: kt,
277
- inherits: Lt,
278
- toFlatObject: Bt,
279
- kindOf: ie,
280
- kindOfTest: U,
281
- endsWith: vt,
282
- toArray: jt,
283
- forEachEntry: Mt,
284
- matchAll: Ht,
285
- isHTMLForm: Kt,
286
- hasOwnProperty: Ce,
287
- hasOwnProp: Ce,
569
+ ), (r) => {
570
+ s.push(r), A.postMessage(t, "*");
571
+ }))(`axios@${Math.random()}`, []) : (t) => setTimeout(t))(typeof setImmediate == "function", $(A.postMessage)), gs = typeof queueMicrotask < "u" ? queueMicrotask.bind(A) : typeof process < "u" && process.nextTick || lt, fs = (a) => a != null && $(a[ue]), c = {
572
+ isArray: z,
573
+ isArrayBuffer: rt,
574
+ isBuffer: G,
575
+ isFormData: jt,
576
+ isArrayBufferView: _t,
577
+ isString: Nt,
578
+ isNumber: at,
579
+ isBoolean: vt,
580
+ isObject: X,
581
+ isPlainObject: ne,
582
+ isEmptyObject: Ut,
583
+ isReadableStream: Ht,
584
+ isRequest: Kt,
585
+ isResponse: zt,
586
+ isHeaders: Jt,
587
+ isUndefined: K,
588
+ isDate: Dt,
589
+ isFile: kt,
590
+ isBlob: Lt,
591
+ isRegExp: ns,
592
+ isFunction: $,
593
+ isStream: At,
594
+ isURLSearchParams: Mt,
595
+ isTypedArray: es,
596
+ isFileList: Bt,
597
+ forEach: Q,
598
+ merge: Pe,
599
+ extend: Vt,
600
+ trim: Wt,
601
+ stripBOM: Gt,
602
+ inherits: Xt,
603
+ toFlatObject: Qt,
604
+ kindOf: ce,
605
+ kindOfTest: v,
606
+ endsWith: Zt,
607
+ toArray: Yt,
608
+ forEachEntry: ts,
609
+ matchAll: ss,
610
+ isHTMLForm: rs,
611
+ hasOwnProperty: Le,
612
+ hasOwnProp: Le,
288
613
  // an alias to avoid ESLint no-prototype-builtins detection
289
- reduceDescriptors: et,
290
- freezeMethods: Wt,
291
- toObjectSet: Vt,
292
- toCamelCase: zt,
293
- noop: Gt,
294
- toFiniteNumber: Xt,
295
- findKey: Ze,
296
- global: v,
297
- isContextDefined: Ye,
298
- isSpecCompliantForm: Qt,
299
- toJSONObject: Zt,
300
- isAsyncFn: Yt,
301
- isThenable: es,
302
- setImmediate: tt,
303
- asap: ts,
304
- isIterable: ss
614
+ reduceDescriptors: it,
615
+ freezeMethods: os,
616
+ toObjectSet: is,
617
+ toCamelCase: as,
618
+ noop: ls,
619
+ toFiniteNumber: us,
620
+ findKey: nt,
621
+ global: A,
622
+ isContextDefined: ot,
623
+ isSpecCompliantForm: cs,
624
+ toJSONObject: ds,
625
+ isAsyncFn: hs,
626
+ isThenable: ps,
627
+ setImmediate: lt,
628
+ asap: gs,
629
+ isIterable: fs
305
630
  };
306
- let y = class st extends Error {
307
- static from(e, t, s, n, a, o) {
308
- const i = new st(e.message, t || e.code, s, n, a);
631
+ let P = class ut extends Error {
632
+ static from(e, t, s, r, n, o) {
633
+ const i = new ut(e.message, t || e.code, s, r, n);
309
634
  return i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
310
635
  }
311
636
  /**
@@ -319,8 +644,8 @@ let y = class st extends Error {
319
644
  *
320
645
  * @returns {Error} The created error.
321
646
  */
322
- constructor(e, t, s, n, a) {
323
- super(e), this.name = "AxiosError", this.isAxiosError = !0, t && (this.code = t), s && (this.config = s), n && (this.request = n), a && (this.response = a, this.status = a.status);
647
+ constructor(e, t, s, r, n) {
648
+ super(e), this.name = "AxiosError", this.isAxiosError = !0, t && (this.code = t), s && (this.config = s), r && (this.request = r), n && (this.response = n, this.status = n.status);
324
649
  }
325
650
  toJSON() {
326
651
  return {
@@ -342,48 +667,48 @@ let y = class st extends Error {
342
667
  };
343
668
  }
344
669
  };
345
- y.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
346
- y.ERR_BAD_OPTION = "ERR_BAD_OPTION";
347
- y.ECONNABORTED = "ECONNABORTED";
348
- y.ETIMEDOUT = "ETIMEDOUT";
349
- y.ERR_NETWORK = "ERR_NETWORK";
350
- y.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
351
- y.ERR_DEPRECATED = "ERR_DEPRECATED";
352
- y.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
353
- y.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
354
- y.ERR_CANCELED = "ERR_CANCELED";
355
- y.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
356
- y.ERR_INVALID_URL = "ERR_INVALID_URL";
357
- const ns = null;
358
- function be(r) {
359
- return c.isPlainObject(r) || c.isArray(r);
670
+ P.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
671
+ P.ERR_BAD_OPTION = "ERR_BAD_OPTION";
672
+ P.ECONNABORTED = "ECONNABORTED";
673
+ P.ETIMEDOUT = "ETIMEDOUT";
674
+ P.ERR_NETWORK = "ERR_NETWORK";
675
+ P.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
676
+ P.ERR_DEPRECATED = "ERR_DEPRECATED";
677
+ P.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
678
+ P.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
679
+ P.ERR_CANCELED = "ERR_CANCELED";
680
+ P.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
681
+ P.ERR_INVALID_URL = "ERR_INVALID_URL";
682
+ const bs = null;
683
+ function qe(a) {
684
+ return c.isPlainObject(a) || c.isArray(a);
360
685
  }
361
- function nt(r) {
362
- return c.endsWith(r, "[]") ? r.slice(0, -2) : r;
686
+ function ct(a) {
687
+ return c.endsWith(a, "[]") ? a.slice(0, -2) : a;
363
688
  }
364
- function xe(r, e, t) {
365
- return r ? r.concat(e).map(function(n, a) {
366
- return n = nt(n), !t && a ? "[" + n + "]" : n;
689
+ function Be(a, e, t) {
690
+ return a ? a.concat(e).map(function(r, n) {
691
+ return r = ct(r), !t && n ? "[" + r + "]" : r;
367
692
  }).join(t ? "." : "") : e;
368
693
  }
369
- function rs(r) {
370
- return c.isArray(r) && !r.some(be);
694
+ function ms(a) {
695
+ return c.isArray(a) && !a.some(qe);
371
696
  }
372
- const as = c.toFlatObject(c, {}, null, function(e) {
697
+ const ys = c.toFlatObject(c, {}, null, function(e) {
373
698
  return /^is[A-Z]/.test(e);
374
699
  });
375
- function ce(r, e, t) {
376
- if (!c.isObject(r))
700
+ function he(a, e, t) {
701
+ if (!c.isObject(a))
377
702
  throw new TypeError("target must be an object");
378
703
  e = e || new FormData(), t = c.toFlatObject(t, {
379
704
  metaTokens: !0,
380
705
  dots: !1,
381
706
  indexes: !1
382
- }, !1, function(w, m) {
383
- return !c.isUndefined(m[w]);
707
+ }, !1, function(y, b) {
708
+ return !c.isUndefined(b[y]);
384
709
  });
385
- const s = t.metaTokens, n = t.visitor || u, a = t.dots, o = t.indexes, l = (t.Blob || typeof Blob < "u" && Blob) && c.isSpecCompliantForm(e);
386
- if (!c.isFunction(n))
710
+ const s = t.metaTokens, r = t.visitor || u, n = t.dots, o = t.indexes, l = (t.Blob || typeof Blob < "u" && Blob) && c.isSpecCompliantForm(e);
711
+ if (!c.isFunction(r))
387
712
  throw new TypeError("visitor must be a function");
388
713
  function d(f) {
389
714
  if (f === null) return "";
@@ -392,50 +717,50 @@ function ce(r, e, t) {
392
717
  if (c.isBoolean(f))
393
718
  return f.toString();
394
719
  if (!l && c.isBlob(f))
395
- throw new y("Blob is not supported. Use a Buffer instead.");
720
+ throw new P("Blob is not supported. Use a Buffer instead.");
396
721
  return c.isArrayBuffer(f) || c.isTypedArray(f) ? l && typeof Blob == "function" ? new Blob([f]) : Buffer.from(f) : f;
397
722
  }
398
- function u(f, w, m) {
723
+ function u(f, y, b) {
399
724
  let R = f;
400
- if (f && !m && typeof f == "object") {
401
- if (c.endsWith(w, "{}"))
402
- w = s ? w : w.slice(0, -2), f = JSON.stringify(f);
403
- else if (c.isArray(f) && rs(f) || (c.isFileList(f) || c.endsWith(w, "[]")) && (R = c.toArray(f)))
404
- return w = nt(w), R.forEach(function(P, T) {
405
- !(c.isUndefined(P) || P === null) && e.append(
725
+ if (f && !b && typeof f == "object") {
726
+ if (c.endsWith(y, "{}"))
727
+ y = s ? y : y.slice(0, -2), f = JSON.stringify(f);
728
+ else if (c.isArray(f) && ms(f) || (c.isFileList(f) || c.endsWith(y, "[]")) && (R = c.toArray(f)))
729
+ return y = ct(y), R.forEach(function(I, E) {
730
+ !(c.isUndefined(I) || I === null) && e.append(
406
731
  // eslint-disable-next-line no-nested-ternary
407
- o === !0 ? xe([w], T, a) : o === null ? w : w + "[]",
408
- d(P)
732
+ o === !0 ? Be([y], E, n) : o === null ? y : y + "[]",
733
+ d(I)
409
734
  );
410
735
  }), !1;
411
736
  }
412
- return be(f) ? !0 : (e.append(xe(m, w, a), d(f)), !1);
737
+ return qe(f) ? !0 : (e.append(Be(b, y, n), d(f)), !1);
413
738
  }
414
- const b = [], I = Object.assign(as, {
739
+ const h = [], m = Object.assign(ys, {
415
740
  defaultVisitor: u,
416
741
  convertValue: d,
417
- isVisitable: be
742
+ isVisitable: qe
418
743
  });
419
- function E(f, w) {
744
+ function q(f, y) {
420
745
  if (!c.isUndefined(f)) {
421
- if (b.indexOf(f) !== -1)
422
- throw Error("Circular reference detected in " + w.join("."));
423
- b.push(f), c.forEach(f, function(R, F) {
424
- (!(c.isUndefined(R) || R === null) && n.call(
746
+ if (h.indexOf(f) !== -1)
747
+ throw Error("Circular reference detected in " + y.join("."));
748
+ h.push(f), c.forEach(f, function(R, F) {
749
+ (!(c.isUndefined(R) || R === null) && r.call(
425
750
  e,
426
751
  R,
427
752
  c.isString(F) ? F.trim() : F,
428
- w,
429
- I
430
- )) === !0 && E(R, w ? w.concat(F) : [F]);
431
- }), b.pop();
753
+ y,
754
+ m
755
+ )) === !0 && q(R, y ? y.concat(F) : [F]);
756
+ }), h.pop();
432
757
  }
433
758
  }
434
- if (!c.isObject(r))
759
+ if (!c.isObject(a))
435
760
  throw new TypeError("data must be an object");
436
- return E(r), e;
761
+ return q(a), e;
437
762
  }
438
- function Ne(r) {
763
+ function Ae(a) {
439
764
  const e = {
440
765
  "!": "%21",
441
766
  "'": "%27",
@@ -445,42 +770,42 @@ function Ne(r) {
445
770
  "%20": "+",
446
771
  "%00": "\0"
447
772
  };
448
- return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g, function(s) {
773
+ return encodeURIComponent(a).replace(/[!'()~]|%20|%00/g, function(s) {
449
774
  return e[s];
450
775
  });
451
776
  }
452
- function qe(r, e) {
453
- this._pairs = [], r && ce(r, this, e);
777
+ function Ee(a, e) {
778
+ this._pairs = [], a && he(a, this, e);
454
779
  }
455
- const rt = qe.prototype;
456
- rt.append = function(e, t) {
780
+ const dt = Ee.prototype;
781
+ dt.append = function(e, t) {
457
782
  this._pairs.push([e, t]);
458
783
  };
459
- rt.toString = function(e) {
784
+ dt.toString = function(e) {
460
785
  const t = e ? function(s) {
461
- return e.call(this, s, Ne);
462
- } : Ne;
463
- return this._pairs.map(function(n) {
464
- return t(n[0]) + "=" + t(n[1]);
786
+ return e.call(this, s, Ae);
787
+ } : Ae;
788
+ return this._pairs.map(function(r) {
789
+ return t(r[0]) + "=" + t(r[1]);
465
790
  }, "").join("&");
466
791
  };
467
- function os(r) {
468
- return encodeURIComponent(r).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
792
+ function ws(a) {
793
+ return encodeURIComponent(a).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
469
794
  }
470
- function at(r, e, t) {
795
+ function ht(a, e, t) {
471
796
  if (!e)
472
- return r;
473
- const s = t && t.encode || os, n = c.isFunction(t) ? {
797
+ return a;
798
+ const s = t && t.encode || ws, r = c.isFunction(t) ? {
474
799
  serialize: t
475
- } : t, a = n && n.serialize;
800
+ } : t, n = r && r.serialize;
476
801
  let o;
477
- if (a ? o = a(e, n) : o = c.isURLSearchParams(e) ? e.toString() : new qe(e, n).toString(s), o) {
478
- const i = r.indexOf("#");
479
- i !== -1 && (r = r.slice(0, i)), r += (r.indexOf("?") === -1 ? "?" : "&") + o;
802
+ if (n ? o = n(e, r) : o = c.isURLSearchParams(e) ? e.toString() : new Ee(e, r).toString(s), o) {
803
+ const i = a.indexOf("#");
804
+ i !== -1 && (a = a.slice(0, i)), a += (a.indexOf("?") === -1 ? "?" : "&") + o;
480
805
  }
481
- return r;
806
+ return a;
482
807
  }
483
- class Ue {
808
+ class je {
484
809
  constructor() {
485
810
  this.handlers = [];
486
811
  }
@@ -535,83 +860,83 @@ class Ue {
535
860
  });
536
861
  }
537
862
  }
538
- const Re = {
863
+ const Se = {
539
864
  silentJSONParsing: !0,
540
865
  forcedJSONParsing: !0,
541
866
  clarifyTimeoutError: !1,
542
867
  legacyInterceptorReqResOrdering: !0
543
- }, is = typeof URLSearchParams < "u" ? URLSearchParams : qe, ls = typeof FormData < "u" ? FormData : null, cs = typeof Blob < "u" ? Blob : null, us = {
868
+ }, Ps = typeof URLSearchParams < "u" ? URLSearchParams : Ee, qs = typeof FormData < "u" ? FormData : null, Rs = typeof Blob < "u" ? Blob : null, Is = {
544
869
  isBrowser: !0,
545
870
  classes: {
546
- URLSearchParams: is,
547
- FormData: ls,
548
- Blob: cs
871
+ URLSearchParams: Ps,
872
+ FormData: qs,
873
+ Blob: Rs
549
874
  },
550
875
  protocols: ["http", "https", "file", "blob", "url", "data"]
551
- }, Pe = typeof window < "u" && typeof document < "u", we = typeof navigator == "object" && navigator || void 0, ds = Pe && (!we || ["ReactNative", "NativeScript", "NS"].indexOf(we.product) < 0), hs = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
552
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function", ps = Pe && window.location.href || "http://localhost", gs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
876
+ }, Te = typeof window < "u" && typeof document < "u", Re = typeof navigator == "object" && navigator || void 0, Cs = Te && (!Re || ["ReactNative", "NativeScript", "NS"].indexOf(Re.product) < 0), Fs = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
877
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Es = Te && window.location.href || "http://localhost", Ss = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
553
878
  __proto__: null,
554
- hasBrowserEnv: Pe,
555
- hasStandardBrowserEnv: ds,
556
- hasStandardBrowserWebWorkerEnv: hs,
557
- navigator: we,
558
- origin: ps
559
- }, Symbol.toStringTag, { value: "Module" })), S = {
560
- ...gs,
561
- ...us
879
+ hasBrowserEnv: Te,
880
+ hasStandardBrowserEnv: Cs,
881
+ hasStandardBrowserWebWorkerEnv: Fs,
882
+ navigator: Re,
883
+ origin: Es
884
+ }, Symbol.toStringTag, { value: "Module" })), x = {
885
+ ...Ss,
886
+ ...Is
562
887
  };
563
- function fs(r, e) {
564
- return ce(r, new S.classes.URLSearchParams(), {
565
- visitor: function(t, s, n, a) {
566
- return S.isNode && c.isBuffer(t) ? (this.append(s, t.toString("base64")), !1) : a.defaultVisitor.apply(this, arguments);
888
+ function Ts(a, e) {
889
+ return he(a, new x.classes.URLSearchParams(), {
890
+ visitor: function(t, s, r, n) {
891
+ return x.isNode && c.isBuffer(t) ? (this.append(s, t.toString("base64")), !1) : n.defaultVisitor.apply(this, arguments);
567
892
  },
568
893
  ...e
569
894
  });
570
895
  }
571
- function ms(r) {
572
- return c.matchAll(/\w+|\[(\w*)]/g, r).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
896
+ function xs(a) {
897
+ return c.matchAll(/\w+|\[(\w*)]/g, a).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
573
898
  }
574
- function bs(r) {
575
- const e = {}, t = Object.keys(r);
899
+ function Os(a) {
900
+ const e = {}, t = Object.keys(a);
576
901
  let s;
577
- const n = t.length;
578
- let a;
579
- for (s = 0; s < n; s++)
580
- a = t[s], e[a] = r[a];
902
+ const r = t.length;
903
+ let n;
904
+ for (s = 0; s < r; s++)
905
+ n = t[s], e[n] = a[n];
581
906
  return e;
582
907
  }
583
- function ot(r) {
584
- function e(t, s, n, a) {
585
- let o = t[a++];
908
+ function pt(a) {
909
+ function e(t, s, r, n) {
910
+ let o = t[n++];
586
911
  if (o === "__proto__") return !0;
587
- const i = Number.isFinite(+o), l = a >= t.length;
588
- return o = !o && c.isArray(n) ? n.length : o, l ? (c.hasOwnProp(n, o) ? n[o] = [n[o], s] : n[o] = s, !i) : ((!n[o] || !c.isObject(n[o])) && (n[o] = []), e(t, s, n[o], a) && c.isArray(n[o]) && (n[o] = bs(n[o])), !i);
912
+ const i = Number.isFinite(+o), l = n >= t.length;
913
+ return o = !o && c.isArray(r) ? r.length : o, l ? (c.hasOwnProp(r, o) ? r[o] = [r[o], s] : r[o] = s, !i) : ((!r[o] || !c.isObject(r[o])) && (r[o] = []), e(t, s, r[o], n) && c.isArray(r[o]) && (r[o] = Os(r[o])), !i);
589
914
  }
590
- if (c.isFormData(r) && c.isFunction(r.entries)) {
915
+ if (c.isFormData(a) && c.isFunction(a.entries)) {
591
916
  const t = {};
592
- return c.forEachEntry(r, (s, n) => {
593
- e(ms(s), n, t, 0);
917
+ return c.forEachEntry(a, (s, r) => {
918
+ e(xs(s), r, t, 0);
594
919
  }), t;
595
920
  }
596
921
  return null;
597
922
  }
598
- function ws(r, e, t) {
599
- if (c.isString(r))
923
+ function $s(a, e, t) {
924
+ if (c.isString(a))
600
925
  try {
601
- return (e || JSON.parse)(r), c.trim(r);
926
+ return (e || JSON.parse)(a), c.trim(a);
602
927
  } catch (s) {
603
928
  if (s.name !== "SyntaxError")
604
929
  throw s;
605
930
  }
606
- return (t || JSON.stringify)(r);
931
+ return (t || JSON.stringify)(a);
607
932
  }
608
- const X = {
609
- transitional: Re,
933
+ const Z = {
934
+ transitional: Se,
610
935
  adapter: ["xhr", "http", "fetch"],
611
936
  transformRequest: [function(e, t) {
612
- const s = t.getContentType() || "", n = s.indexOf("application/json") > -1, a = c.isObject(e);
613
- if (a && c.isHTMLForm(e) && (e = new FormData(e)), c.isFormData(e))
614
- return n ? JSON.stringify(ot(e)) : e;
937
+ const s = t.getContentType() || "", r = s.indexOf("application/json") > -1, n = c.isObject(e);
938
+ if (n && c.isHTMLForm(e) && (e = new FormData(e)), c.isFormData(e))
939
+ return r ? JSON.stringify(pt(e)) : e;
615
940
  if (c.isArrayBuffer(e) || c.isBuffer(e) || c.isStream(e) || c.isFile(e) || c.isBlob(e) || c.isReadableStream(e))
616
941
  return e;
617
942
  if (c.isArrayBufferView(e))
@@ -619,31 +944,31 @@ const X = {
619
944
  if (c.isURLSearchParams(e))
620
945
  return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
621
946
  let i;
622
- if (a) {
947
+ if (n) {
623
948
  if (s.indexOf("application/x-www-form-urlencoded") > -1)
624
- return fs(e, this.formSerializer).toString();
949
+ return Ts(e, this.formSerializer).toString();
625
950
  if ((i = c.isFileList(e)) || s.indexOf("multipart/form-data") > -1) {
626
951
  const l = this.env && this.env.FormData;
627
- return ce(
952
+ return he(
628
953
  i ? { "files[]": e } : e,
629
954
  l && new l(),
630
955
  this.formSerializer
631
956
  );
632
957
  }
633
958
  }
634
- return a || n ? (t.setContentType("application/json", !1), ws(e)) : e;
959
+ return n || r ? (t.setContentType("application/json", !1), $s(e)) : e;
635
960
  }],
636
961
  transformResponse: [function(e) {
637
- const t = this.transitional || X.transitional, s = t && t.forcedJSONParsing, n = this.responseType === "json";
962
+ const t = this.transitional || Z.transitional, s = t && t.forcedJSONParsing, r = this.responseType === "json";
638
963
  if (c.isResponse(e) || c.isReadableStream(e))
639
964
  return e;
640
- if (e && c.isString(e) && (s && !this.responseType || n)) {
641
- const o = !(t && t.silentJSONParsing) && n;
965
+ if (e && c.isString(e) && (s && !this.responseType || r)) {
966
+ const o = !(t && t.silentJSONParsing) && r;
642
967
  try {
643
968
  return JSON.parse(e, this.parseReviver);
644
969
  } catch (i) {
645
970
  if (o)
646
- throw i.name === "SyntaxError" ? y.from(i, y.ERR_BAD_RESPONSE, this, null, this.response) : i;
971
+ throw i.name === "SyntaxError" ? P.from(i, P.ERR_BAD_RESPONSE, this, null, this.response) : i;
647
972
  }
648
973
  }
649
974
  return e;
@@ -658,8 +983,8 @@ const X = {
658
983
  maxContentLength: -1,
659
984
  maxBodyLength: -1,
660
985
  env: {
661
- FormData: S.classes.FormData,
662
- Blob: S.classes.Blob
986
+ FormData: x.classes.FormData,
987
+ Blob: x.classes.Blob
663
988
  },
664
989
  validateStatus: function(e) {
665
990
  return e >= 200 && e < 300;
@@ -671,10 +996,10 @@ const X = {
671
996
  }
672
997
  }
673
998
  };
674
- c.forEach(["delete", "get", "head", "post", "put", "patch"], (r) => {
675
- X.headers[r] = {};
999
+ c.forEach(["delete", "get", "head", "post", "put", "patch"], (a) => {
1000
+ Z.headers[a] = {};
676
1001
  });
677
- const ys = c.toObjectSet([
1002
+ const _s = c.toObjectSet([
678
1003
  "age",
679
1004
  "authorization",
680
1005
  "content-length",
@@ -692,47 +1017,47 @@ const ys = c.toObjectSet([
692
1017
  "referer",
693
1018
  "retry-after",
694
1019
  "user-agent"
695
- ]), Is = (r) => {
1020
+ ]), Ns = (a) => {
696
1021
  const e = {};
697
- let t, s, n;
698
- return r && r.split(`
1022
+ let t, s, r;
1023
+ return a && a.split(`
699
1024
  `).forEach(function(o) {
700
- n = o.indexOf(":"), t = o.substring(0, n).trim().toLowerCase(), s = o.substring(n + 1).trim(), !(!t || e[t] && ys[t]) && (t === "set-cookie" ? e[t] ? e[t].push(s) : e[t] = [s] : e[t] = e[t] ? e[t] + ", " + s : s);
1025
+ r = o.indexOf(":"), t = o.substring(0, r).trim().toLowerCase(), s = o.substring(r + 1).trim(), !(!t || e[t] && _s[t]) && (t === "set-cookie" ? e[t] ? e[t].push(s) : e[t] = [s] : e[t] = e[t] ? e[t] + ", " + s : s);
701
1026
  }), e;
702
- }, De = /* @__PURE__ */ Symbol("internals");
703
- function J(r) {
704
- return r && String(r).trim().toLowerCase();
1027
+ }, Me = /* @__PURE__ */ Symbol("internals");
1028
+ function V(a) {
1029
+ return a && String(a).trim().toLowerCase();
705
1030
  }
706
- function ne(r) {
707
- return r === !1 || r == null ? r : c.isArray(r) ? r.map(ne) : String(r);
1031
+ function oe(a) {
1032
+ return a === !1 || a == null ? a : c.isArray(a) ? a.map(oe) : String(a);
708
1033
  }
709
- function qs(r) {
1034
+ function vs(a) {
710
1035
  const e = /* @__PURE__ */ Object.create(null), t = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
711
1036
  let s;
712
- for (; s = t.exec(r); )
1037
+ for (; s = t.exec(a); )
713
1038
  e[s[1]] = s[2];
714
1039
  return e;
715
1040
  }
716
- const Rs = (r) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());
717
- function pe(r, e, t, s, n) {
1041
+ const Us = (a) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(a.trim());
1042
+ function me(a, e, t, s, r) {
718
1043
  if (c.isFunction(s))
719
1044
  return s.call(this, e, t);
720
- if (n && (e = t), !!c.isString(e)) {
1045
+ if (r && (e = t), !!c.isString(e)) {
721
1046
  if (c.isString(s))
722
1047
  return e.indexOf(s) !== -1;
723
1048
  if (c.isRegExp(s))
724
1049
  return s.test(e);
725
1050
  }
726
1051
  }
727
- function Ps(r) {
728
- return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, t, s) => t.toUpperCase() + s);
1052
+ function Ds(a) {
1053
+ return a.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, t, s) => t.toUpperCase() + s);
729
1054
  }
730
- function Es(r, e) {
1055
+ function ks(a, e) {
731
1056
  const t = c.toCamelCase(" " + e);
732
1057
  ["get", "set", "has"].forEach((s) => {
733
- Object.defineProperty(r, s + t, {
734
- value: function(n, a, o) {
735
- return this[s].call(this, e, n, a, o);
1058
+ Object.defineProperty(a, s + t, {
1059
+ value: function(r, n, o) {
1060
+ return this[s].call(this, e, r, n, o);
736
1061
  },
737
1062
  configurable: !0
738
1063
  });
@@ -743,19 +1068,19 @@ let _ = class {
743
1068
  e && this.set(e);
744
1069
  }
745
1070
  set(e, t, s) {
746
- const n = this;
747
- function a(i, l, d) {
748
- const u = J(l);
1071
+ const r = this;
1072
+ function n(i, l, d) {
1073
+ const u = V(l);
749
1074
  if (!u)
750
1075
  throw new Error("header name must be a non-empty string");
751
- const b = c.findKey(n, u);
752
- (!b || n[b] === void 0 || d === !0 || d === void 0 && n[b] !== !1) && (n[b || l] = ne(i));
1076
+ const h = c.findKey(r, u);
1077
+ (!h || r[h] === void 0 || d === !0 || d === void 0 && r[h] !== !1) && (r[h || l] = oe(i));
753
1078
  }
754
- const o = (i, l) => c.forEach(i, (d, u) => a(d, u, l));
1079
+ const o = (i, l) => c.forEach(i, (d, u) => n(d, u, l));
755
1080
  if (c.isPlainObject(e) || e instanceof this.constructor)
756
1081
  o(e, t);
757
- else if (c.isString(e) && (e = e.trim()) && !Rs(e))
758
- o(Is(e), t);
1082
+ else if (c.isString(e) && (e = e.trim()) && !Us(e))
1083
+ o(Ns(e), t);
759
1084
  else if (c.isObject(e) && c.isIterable(e)) {
760
1085
  let i = {}, l, d;
761
1086
  for (const u of e) {
@@ -765,63 +1090,63 @@ let _ = class {
765
1090
  }
766
1091
  o(i, t);
767
1092
  } else
768
- e != null && a(t, e, s);
1093
+ e != null && n(t, e, s);
769
1094
  return this;
770
1095
  }
771
1096
  get(e, t) {
772
- if (e = J(e), e) {
1097
+ if (e = V(e), e) {
773
1098
  const s = c.findKey(this, e);
774
1099
  if (s) {
775
- const n = this[s];
1100
+ const r = this[s];
776
1101
  if (!t)
777
- return n;
1102
+ return r;
778
1103
  if (t === !0)
779
- return qs(n);
1104
+ return vs(r);
780
1105
  if (c.isFunction(t))
781
- return t.call(this, n, s);
1106
+ return t.call(this, r, s);
782
1107
  if (c.isRegExp(t))
783
- return t.exec(n);
1108
+ return t.exec(r);
784
1109
  throw new TypeError("parser must be boolean|regexp|function");
785
1110
  }
786
1111
  }
787
1112
  }
788
1113
  has(e, t) {
789
- if (e = J(e), e) {
1114
+ if (e = V(e), e) {
790
1115
  const s = c.findKey(this, e);
791
- return !!(s && this[s] !== void 0 && (!t || pe(this, this[s], s, t)));
1116
+ return !!(s && this[s] !== void 0 && (!t || me(this, this[s], s, t)));
792
1117
  }
793
1118
  return !1;
794
1119
  }
795
1120
  delete(e, t) {
796
1121
  const s = this;
797
- let n = !1;
798
- function a(o) {
799
- if (o = J(o), o) {
1122
+ let r = !1;
1123
+ function n(o) {
1124
+ if (o = V(o), o) {
800
1125
  const i = c.findKey(s, o);
801
- i && (!t || pe(s, s[i], i, t)) && (delete s[i], n = !0);
1126
+ i && (!t || me(s, s[i], i, t)) && (delete s[i], r = !0);
802
1127
  }
803
1128
  }
804
- return c.isArray(e) ? e.forEach(a) : a(e), n;
1129
+ return c.isArray(e) ? e.forEach(n) : n(e), r;
805
1130
  }
806
1131
  clear(e) {
807
1132
  const t = Object.keys(this);
808
- let s = t.length, n = !1;
1133
+ let s = t.length, r = !1;
809
1134
  for (; s--; ) {
810
- const a = t[s];
811
- (!e || pe(this, this[a], a, e, !0)) && (delete this[a], n = !0);
1135
+ const n = t[s];
1136
+ (!e || me(this, this[n], n, e, !0)) && (delete this[n], r = !0);
812
1137
  }
813
- return n;
1138
+ return r;
814
1139
  }
815
1140
  normalize(e) {
816
1141
  const t = this, s = {};
817
- return c.forEach(this, (n, a) => {
818
- const o = c.findKey(s, a);
1142
+ return c.forEach(this, (r, n) => {
1143
+ const o = c.findKey(s, n);
819
1144
  if (o) {
820
- t[o] = ne(n), delete t[a];
1145
+ t[o] = oe(r), delete t[n];
821
1146
  return;
822
1147
  }
823
- const i = e ? Ps(a) : String(a).trim();
824
- i !== a && delete t[a], t[i] = ne(n), s[i] = !0;
1148
+ const i = e ? Ds(n) : String(n).trim();
1149
+ i !== n && delete t[n], t[i] = oe(r), s[i] = !0;
825
1150
  }), this;
826
1151
  }
827
1152
  concat(...e) {
@@ -829,8 +1154,8 @@ let _ = class {
829
1154
  }
830
1155
  toJSON(e) {
831
1156
  const t = /* @__PURE__ */ Object.create(null);
832
- return c.forEach(this, (s, n) => {
833
- s != null && s !== !1 && (t[n] = e && c.isArray(s) ? s.join(", ") : s);
1157
+ return c.forEach(this, (s, r) => {
1158
+ s != null && s !== !1 && (t[r] = e && c.isArray(s) ? s.join(", ") : s);
834
1159
  }), t;
835
1160
  }
836
1161
  [Symbol.iterator]() {
@@ -851,41 +1176,41 @@ let _ = class {
851
1176
  }
852
1177
  static concat(e, ...t) {
853
1178
  const s = new this(e);
854
- return t.forEach((n) => s.set(n)), s;
1179
+ return t.forEach((r) => s.set(r)), s;
855
1180
  }
856
1181
  static accessor(e) {
857
- const s = (this[De] = this[De] = {
1182
+ const s = (this[Me] = this[Me] = {
858
1183
  accessors: {}
859
- }).accessors, n = this.prototype;
860
- function a(o) {
861
- const i = J(o);
862
- s[i] || (Es(n, o), s[i] = !0);
1184
+ }).accessors, r = this.prototype;
1185
+ function n(o) {
1186
+ const i = V(o);
1187
+ s[i] || (ks(r, o), s[i] = !0);
863
1188
  }
864
- return c.isArray(e) ? e.forEach(a) : a(e), this;
1189
+ return c.isArray(e) ? e.forEach(n) : n(e), this;
865
1190
  }
866
1191
  };
867
1192
  _.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
868
- c.reduceDescriptors(_.prototype, ({ value: r }, e) => {
1193
+ c.reduceDescriptors(_.prototype, ({ value: a }, e) => {
869
1194
  let t = e[0].toUpperCase() + e.slice(1);
870
1195
  return {
871
- get: () => r,
1196
+ get: () => a,
872
1197
  set(s) {
873
1198
  this[t] = s;
874
1199
  }
875
1200
  };
876
1201
  });
877
1202
  c.freezeMethods(_);
878
- function ge(r, e) {
879
- const t = this || X, s = e || t, n = _.from(s.headers);
880
- let a = s.data;
881
- return c.forEach(r, function(i) {
882
- a = i.call(t, a, n.normalize(), e ? e.status : void 0);
883
- }), n.normalize(), a;
1203
+ function ye(a, e) {
1204
+ const t = this || Z, s = e || t, r = _.from(s.headers);
1205
+ let n = s.data;
1206
+ return c.forEach(a, function(i) {
1207
+ n = i.call(t, n, r.normalize(), e ? e.status : void 0);
1208
+ }), r.normalize(), n;
884
1209
  }
885
- function it(r) {
886
- return !!(r && r.__CANCEL__);
1210
+ function gt(a) {
1211
+ return !!(a && a.__CANCEL__);
887
1212
  }
888
- let Q = class extends y {
1213
+ let Y = class extends P {
889
1214
  /**
890
1215
  * A `CanceledError` is an object that is thrown when an operation is canceled.
891
1216
  *
@@ -896,95 +1221,95 @@ let Q = class extends y {
896
1221
  * @returns {CanceledError} The created error.
897
1222
  */
898
1223
  constructor(e, t, s) {
899
- super(e ?? "canceled", y.ERR_CANCELED, t, s), this.name = "CanceledError", this.__CANCEL__ = !0;
1224
+ super(e ?? "canceled", P.ERR_CANCELED, t, s), this.name = "CanceledError", this.__CANCEL__ = !0;
900
1225
  }
901
1226
  };
902
- function lt(r, e, t) {
1227
+ function ft(a, e, t) {
903
1228
  const s = t.config.validateStatus;
904
- !t.status || !s || s(t.status) ? r(t) : e(new y(
1229
+ !t.status || !s || s(t.status) ? a(t) : e(new P(
905
1230
  "Request failed with status code " + t.status,
906
- [y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(t.status / 100) - 4],
1231
+ [P.ERR_BAD_REQUEST, P.ERR_BAD_RESPONSE][Math.floor(t.status / 100) - 4],
907
1232
  t.config,
908
1233
  t.request,
909
1234
  t
910
1235
  ));
911
1236
  }
912
- function Ss(r) {
913
- const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(r);
1237
+ function Ls(a) {
1238
+ const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(a);
914
1239
  return e && e[1] || "";
915
1240
  }
916
- function Ts(r, e) {
917
- r = r || 10;
918
- const t = new Array(r), s = new Array(r);
919
- let n = 0, a = 0, o;
1241
+ function Bs(a, e) {
1242
+ a = a || 10;
1243
+ const t = new Array(a), s = new Array(a);
1244
+ let r = 0, n = 0, o;
920
1245
  return e = e !== void 0 ? e : 1e3, function(l) {
921
- const d = Date.now(), u = s[a];
922
- o || (o = d), t[n] = l, s[n] = d;
923
- let b = a, I = 0;
924
- for (; b !== n; )
925
- I += t[b++], b = b % r;
926
- if (n = (n + 1) % r, n === a && (a = (a + 1) % r), d - o < e)
1246
+ const d = Date.now(), u = s[n];
1247
+ o || (o = d), t[r] = l, s[r] = d;
1248
+ let h = n, m = 0;
1249
+ for (; h !== r; )
1250
+ m += t[h++], h = h % a;
1251
+ if (r = (r + 1) % a, r === n && (n = (n + 1) % a), d - o < e)
927
1252
  return;
928
- const E = u && d - u;
929
- return E ? Math.round(I * 1e3 / E) : void 0;
1253
+ const q = u && d - u;
1254
+ return q ? Math.round(m * 1e3 / q) : void 0;
930
1255
  };
931
1256
  }
932
- function $s(r, e) {
933
- let t = 0, s = 1e3 / e, n, a;
1257
+ function As(a, e) {
1258
+ let t = 0, s = 1e3 / e, r, n;
934
1259
  const o = (d, u = Date.now()) => {
935
- t = u, n = null, a && (clearTimeout(a), a = null), r(...d);
1260
+ t = u, r = null, n && (clearTimeout(n), n = null), a(...d);
936
1261
  };
937
1262
  return [(...d) => {
938
- const u = Date.now(), b = u - t;
939
- b >= s ? o(d, u) : (n = d, a || (a = setTimeout(() => {
940
- a = null, o(n);
941
- }, s - b)));
942
- }, () => n && o(n)];
1263
+ const u = Date.now(), h = u - t;
1264
+ h >= s ? o(d, u) : (r = d, n || (n = setTimeout(() => {
1265
+ n = null, o(r);
1266
+ }, s - h)));
1267
+ }, () => r && o(r)];
943
1268
  }
944
- const ae = (r, e, t = 3) => {
1269
+ const le = (a, e, t = 3) => {
945
1270
  let s = 0;
946
- const n = Ts(50, 250);
947
- return $s((a) => {
948
- const o = a.loaded, i = a.lengthComputable ? a.total : void 0, l = o - s, d = n(l), u = o <= i;
1271
+ const r = Bs(50, 250);
1272
+ return As((n) => {
1273
+ const o = n.loaded, i = n.lengthComputable ? n.total : void 0, l = o - s, d = r(l), u = o <= i;
949
1274
  s = o;
950
- const b = {
1275
+ const h = {
951
1276
  loaded: o,
952
1277
  total: i,
953
1278
  progress: i ? o / i : void 0,
954
1279
  bytes: l,
955
1280
  rate: d || void 0,
956
1281
  estimated: d && i && u ? (i - o) / d : void 0,
957
- event: a,
1282
+ event: n,
958
1283
  lengthComputable: i != null,
959
1284
  [e ? "download" : "upload"]: !0
960
1285
  };
961
- r(b);
1286
+ a(h);
962
1287
  }, t);
963
- }, ke = (r, e) => {
964
- const t = r != null;
1288
+ }, He = (a, e) => {
1289
+ const t = a != null;
965
1290
  return [(s) => e[0]({
966
1291
  lengthComputable: t,
967
- total: r,
1292
+ total: a,
968
1293
  loaded: s
969
1294
  }), e[1]];
970
- }, Le = (r) => (...e) => c.asap(() => r(...e)), Os = S.hasStandardBrowserEnv ? /* @__PURE__ */ ((r, e) => (t) => (t = new URL(t, S.origin), r.protocol === t.protocol && r.host === t.host && (e || r.port === t.port)))(
971
- new URL(S.origin),
972
- S.navigator && /(msie|trident)/i.test(S.navigator.userAgent)
973
- ) : () => !0, _s = S.hasStandardBrowserEnv ? (
1295
+ }, Ke = (a) => (...e) => c.asap(() => a(...e)), js = x.hasStandardBrowserEnv ? /* @__PURE__ */ ((a, e) => (t) => (t = new URL(t, x.origin), a.protocol === t.protocol && a.host === t.host && (e || a.port === t.port)))(
1296
+ new URL(x.origin),
1297
+ x.navigator && /(msie|trident)/i.test(x.navigator.userAgent)
1298
+ ) : () => !0, Ms = x.hasStandardBrowserEnv ? (
974
1299
  // Standard browser envs support document.cookie
975
1300
  {
976
- write(r, e, t, s, n, a, o) {
1301
+ write(a, e, t, s, r, n, o) {
977
1302
  if (typeof document > "u") return;
978
- const i = [`${r}=${encodeURIComponent(e)}`];
979
- c.isNumber(t) && i.push(`expires=${new Date(t).toUTCString()}`), c.isString(s) && i.push(`path=${s}`), c.isString(n) && i.push(`domain=${n}`), a === !0 && i.push("secure"), c.isString(o) && i.push(`SameSite=${o}`), document.cookie = i.join("; ");
1303
+ const i = [`${a}=${encodeURIComponent(e)}`];
1304
+ c.isNumber(t) && i.push(`expires=${new Date(t).toUTCString()}`), c.isString(s) && i.push(`path=${s}`), c.isString(r) && i.push(`domain=${r}`), n === !0 && i.push("secure"), c.isString(o) && i.push(`SameSite=${o}`), document.cookie = i.join("; ");
980
1305
  },
981
- read(r) {
1306
+ read(a) {
982
1307
  if (typeof document > "u") return null;
983
- const e = document.cookie.match(new RegExp("(?:^|; )" + r + "=([^;]*)"));
1308
+ const e = document.cookie.match(new RegExp("(?:^|; )" + a + "=([^;]*)"));
984
1309
  return e ? decodeURIComponent(e[1]) : null;
985
1310
  },
986
- remove(r) {
987
- this.write(r, "", Date.now() - 864e5, "/");
1311
+ remove(a) {
1312
+ this.write(a, "", Date.now() - 864e5, "/");
988
1313
  }
989
1314
  }
990
1315
  ) : (
@@ -999,30 +1324,30 @@ const ae = (r, e, t = 3) => {
999
1324
  }
1000
1325
  }
1001
1326
  );
1002
- function Fs(r) {
1003
- return typeof r != "string" ? !1 : /^([a-z][a-z\d+\-.]*:)?\/\//i.test(r);
1327
+ function Hs(a) {
1328
+ return typeof a != "string" ? !1 : /^([a-z][a-z\d+\-.]*:)?\/\//i.test(a);
1004
1329
  }
1005
- function Cs(r, e) {
1006
- return e ? r.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : r;
1330
+ function Ks(a, e) {
1331
+ return e ? a.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : a;
1007
1332
  }
1008
- function ct(r, e, t) {
1009
- let s = !Fs(e);
1010
- return r && (s || t == !1) ? Cs(r, e) : e;
1333
+ function bt(a, e, t) {
1334
+ let s = !Hs(e);
1335
+ return a && (s || t == !1) ? Ks(a, e) : e;
1011
1336
  }
1012
- const Be = (r) => r instanceof _ ? { ...r } : r;
1013
- function A(r, e) {
1337
+ const ze = (a) => a instanceof _ ? { ...a } : a;
1338
+ function M(a, e) {
1014
1339
  e = e || {};
1015
1340
  const t = {};
1016
- function s(d, u, b, I) {
1017
- return c.isPlainObject(d) && c.isPlainObject(u) ? c.merge.call({ caseless: I }, d, u) : c.isPlainObject(u) ? c.merge({}, u) : c.isArray(u) ? u.slice() : u;
1341
+ function s(d, u, h, m) {
1342
+ return c.isPlainObject(d) && c.isPlainObject(u) ? c.merge.call({ caseless: m }, d, u) : c.isPlainObject(u) ? c.merge({}, u) : c.isArray(u) ? u.slice() : u;
1018
1343
  }
1019
- function n(d, u, b, I) {
1344
+ function r(d, u, h, m) {
1020
1345
  if (c.isUndefined(u)) {
1021
1346
  if (!c.isUndefined(d))
1022
- return s(void 0, d, b, I);
1023
- } else return s(d, u, b, I);
1347
+ return s(void 0, d, h, m);
1348
+ } else return s(d, u, h, m);
1024
1349
  }
1025
- function a(d, u) {
1350
+ function n(d, u) {
1026
1351
  if (!c.isUndefined(u))
1027
1352
  return s(void 0, u);
1028
1353
  }
@@ -1032,16 +1357,16 @@ function A(r, e) {
1032
1357
  return s(void 0, d);
1033
1358
  } else return s(void 0, u);
1034
1359
  }
1035
- function i(d, u, b) {
1036
- if (b in e)
1360
+ function i(d, u, h) {
1361
+ if (h in e)
1037
1362
  return s(d, u);
1038
- if (b in r)
1363
+ if (h in a)
1039
1364
  return s(void 0, d);
1040
1365
  }
1041
1366
  const l = {
1042
- url: a,
1043
- method: a,
1044
- data: a,
1367
+ url: n,
1368
+ method: n,
1369
+ data: n,
1045
1370
  baseURL: o,
1046
1371
  transformRequest: o,
1047
1372
  transformResponse: o,
@@ -1067,138 +1392,138 @@ function A(r, e) {
1067
1392
  socketPath: o,
1068
1393
  responseEncoding: o,
1069
1394
  validateStatus: i,
1070
- headers: (d, u, b) => n(Be(d), Be(u), b, !0)
1395
+ headers: (d, u, h) => r(ze(d), ze(u), h, !0)
1071
1396
  };
1072
1397
  return c.forEach(
1073
- Object.keys({ ...r, ...e }),
1398
+ Object.keys({ ...a, ...e }),
1074
1399
  function(u) {
1075
1400
  if (u === "__proto__" || u === "constructor" || u === "prototype")
1076
1401
  return;
1077
- const b = c.hasOwnProp(l, u) ? l[u] : n, I = b(r[u], e[u], u);
1078
- c.isUndefined(I) && b !== i || (t[u] = I);
1402
+ const h = c.hasOwnProp(l, u) ? l[u] : r, m = h(a[u], e[u], u);
1403
+ c.isUndefined(m) && h !== i || (t[u] = m);
1079
1404
  }
1080
1405
  ), t;
1081
1406
  }
1082
- const ut = (r) => {
1083
- const e = A({}, r);
1084
- let { data: t, withXSRFToken: s, xsrfHeaderName: n, xsrfCookieName: a, headers: o, auth: i } = e;
1085
- if (e.headers = o = _.from(o), e.url = at(ct(e.baseURL, e.url, e.allowAbsoluteUrls), r.params, r.paramsSerializer), i && o.set(
1407
+ const mt = (a) => {
1408
+ const e = M({}, a);
1409
+ let { data: t, withXSRFToken: s, xsrfHeaderName: r, xsrfCookieName: n, headers: o, auth: i } = e;
1410
+ if (e.headers = o = _.from(o), e.url = ht(bt(e.baseURL, e.url, e.allowAbsoluteUrls), a.params, a.paramsSerializer), i && o.set(
1086
1411
  "Authorization",
1087
1412
  "Basic " + btoa((i.username || "") + ":" + (i.password ? unescape(encodeURIComponent(i.password)) : ""))
1088
1413
  ), c.isFormData(t)) {
1089
- if (S.hasStandardBrowserEnv || S.hasStandardBrowserWebWorkerEnv)
1414
+ if (x.hasStandardBrowserEnv || x.hasStandardBrowserWebWorkerEnv)
1090
1415
  o.setContentType(void 0);
1091
1416
  else if (c.isFunction(t.getHeaders)) {
1092
1417
  const l = t.getHeaders(), d = ["content-type", "content-length"];
1093
- Object.entries(l).forEach(([u, b]) => {
1094
- d.includes(u.toLowerCase()) && o.set(u, b);
1418
+ Object.entries(l).forEach(([u, h]) => {
1419
+ d.includes(u.toLowerCase()) && o.set(u, h);
1095
1420
  });
1096
1421
  }
1097
1422
  }
1098
- if (S.hasStandardBrowserEnv && (s && c.isFunction(s) && (s = s(e)), s || s !== !1 && Os(e.url))) {
1099
- const l = n && a && _s.read(a);
1100
- l && o.set(n, l);
1423
+ if (x.hasStandardBrowserEnv && (s && c.isFunction(s) && (s = s(e)), s || s !== !1 && js(e.url))) {
1424
+ const l = r && n && Ms.read(n);
1425
+ l && o.set(r, l);
1101
1426
  }
1102
1427
  return e;
1103
- }, xs = typeof XMLHttpRequest < "u", Ns = xs && function(r) {
1428
+ }, zs = typeof XMLHttpRequest < "u", Js = zs && function(a) {
1104
1429
  return new Promise(function(t, s) {
1105
- const n = ut(r);
1106
- let a = n.data;
1107
- const o = _.from(n.headers).normalize();
1108
- let { responseType: i, onUploadProgress: l, onDownloadProgress: d } = n, u, b, I, E, f;
1109
- function w() {
1110
- E && E(), f && f(), n.cancelToken && n.cancelToken.unsubscribe(u), n.signal && n.signal.removeEventListener("abort", u);
1430
+ const r = mt(a);
1431
+ let n = r.data;
1432
+ const o = _.from(r.headers).normalize();
1433
+ let { responseType: i, onUploadProgress: l, onDownloadProgress: d } = r, u, h, m, q, f;
1434
+ function y() {
1435
+ q && q(), f && f(), r.cancelToken && r.cancelToken.unsubscribe(u), r.signal && r.signal.removeEventListener("abort", u);
1111
1436
  }
1112
- let m = new XMLHttpRequest();
1113
- m.open(n.method.toUpperCase(), n.url, !0), m.timeout = n.timeout;
1437
+ let b = new XMLHttpRequest();
1438
+ b.open(r.method.toUpperCase(), r.url, !0), b.timeout = r.timeout;
1114
1439
  function R() {
1115
- if (!m)
1440
+ if (!b)
1116
1441
  return;
1117
- const P = _.from(
1118
- "getAllResponseHeaders" in m && m.getAllResponseHeaders()
1119
- ), N = {
1120
- data: !i || i === "text" || i === "json" ? m.responseText : m.response,
1121
- status: m.status,
1122
- statusText: m.statusText,
1123
- headers: P,
1124
- config: r,
1125
- request: m
1442
+ const I = _.from(
1443
+ "getAllResponseHeaders" in b && b.getAllResponseHeaders()
1444
+ ), S = {
1445
+ data: !i || i === "text" || i === "json" ? b.responseText : b.response,
1446
+ status: b.status,
1447
+ statusText: b.statusText,
1448
+ headers: I,
1449
+ config: a,
1450
+ request: b
1126
1451
  };
1127
- lt(function(C) {
1128
- t(C), w();
1129
- }, function(C) {
1130
- s(C), w();
1131
- }, N), m = null;
1452
+ ft(function(T) {
1453
+ t(T), y();
1454
+ }, function(T) {
1455
+ s(T), y();
1456
+ }, S), b = null;
1132
1457
  }
1133
- "onloadend" in m ? m.onloadend = R : m.onreadystatechange = function() {
1134
- !m || m.readyState !== 4 || m.status === 0 && !(m.responseURL && m.responseURL.indexOf("file:") === 0) || setTimeout(R);
1135
- }, m.onabort = function() {
1136
- m && (s(new y("Request aborted", y.ECONNABORTED, r, m)), m = null);
1137
- }, m.onerror = function(T) {
1138
- const N = T && T.message ? T.message : "Network Error", L = new y(N, y.ERR_NETWORK, r, m);
1139
- L.event = T || null, s(L), m = null;
1140
- }, m.ontimeout = function() {
1141
- let T = n.timeout ? "timeout of " + n.timeout + "ms exceeded" : "timeout exceeded";
1142
- const N = n.transitional || Re;
1143
- n.timeoutErrorMessage && (T = n.timeoutErrorMessage), s(new y(
1144
- T,
1145
- N.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
1146
- r,
1147
- m
1148
- )), m = null;
1149
- }, a === void 0 && o.setContentType(null), "setRequestHeader" in m && c.forEach(o.toJSON(), function(T, N) {
1150
- m.setRequestHeader(N, T);
1151
- }), c.isUndefined(n.withCredentials) || (m.withCredentials = !!n.withCredentials), i && i !== "json" && (m.responseType = n.responseType), d && ([I, f] = ae(d, !0), m.addEventListener("progress", I)), l && m.upload && ([b, E] = ae(l), m.upload.addEventListener("progress", b), m.upload.addEventListener("loadend", E)), (n.cancelToken || n.signal) && (u = (P) => {
1152
- m && (s(!P || P.type ? new Q(null, r, m) : P), m.abort(), m = null);
1153
- }, n.cancelToken && n.cancelToken.subscribe(u), n.signal && (n.signal.aborted ? u() : n.signal.addEventListener("abort", u)));
1154
- const F = Ss(n.url);
1155
- if (F && S.protocols.indexOf(F) === -1) {
1156
- s(new y("Unsupported protocol " + F + ":", y.ERR_BAD_REQUEST, r));
1458
+ "onloadend" in b ? b.onloadend = R : b.onreadystatechange = function() {
1459
+ !b || b.readyState !== 4 || b.status === 0 && !(b.responseURL && b.responseURL.indexOf("file:") === 0) || setTimeout(R);
1460
+ }, b.onabort = function() {
1461
+ b && (s(new P("Request aborted", P.ECONNABORTED, a, b)), b = null);
1462
+ }, b.onerror = function(E) {
1463
+ const S = E && E.message ? E.message : "Network Error", U = new P(S, P.ERR_NETWORK, a, b);
1464
+ U.event = E || null, s(U), b = null;
1465
+ }, b.ontimeout = function() {
1466
+ let E = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
1467
+ const S = r.transitional || Se;
1468
+ r.timeoutErrorMessage && (E = r.timeoutErrorMessage), s(new P(
1469
+ E,
1470
+ S.clarifyTimeoutError ? P.ETIMEDOUT : P.ECONNABORTED,
1471
+ a,
1472
+ b
1473
+ )), b = null;
1474
+ }, n === void 0 && o.setContentType(null), "setRequestHeader" in b && c.forEach(o.toJSON(), function(E, S) {
1475
+ b.setRequestHeader(S, E);
1476
+ }), c.isUndefined(r.withCredentials) || (b.withCredentials = !!r.withCredentials), i && i !== "json" && (b.responseType = r.responseType), d && ([m, f] = le(d, !0), b.addEventListener("progress", m)), l && b.upload && ([h, q] = le(l), b.upload.addEventListener("progress", h), b.upload.addEventListener("loadend", q)), (r.cancelToken || r.signal) && (u = (I) => {
1477
+ b && (s(!I || I.type ? new Y(null, a, b) : I), b.abort(), b = null);
1478
+ }, r.cancelToken && r.cancelToken.subscribe(u), r.signal && (r.signal.aborted ? u() : r.signal.addEventListener("abort", u)));
1479
+ const F = Ls(r.url);
1480
+ if (F && x.protocols.indexOf(F) === -1) {
1481
+ s(new P("Unsupported protocol " + F + ":", P.ERR_BAD_REQUEST, a));
1157
1482
  return;
1158
1483
  }
1159
- m.send(a || null);
1484
+ b.send(n || null);
1160
1485
  });
1161
- }, Us = (r, e) => {
1162
- const { length: t } = r = r ? r.filter(Boolean) : [];
1486
+ }, Ws = (a, e) => {
1487
+ const { length: t } = a = a ? a.filter(Boolean) : [];
1163
1488
  if (e || t) {
1164
- let s = new AbortController(), n;
1165
- const a = function(d) {
1166
- if (!n) {
1167
- n = !0, i();
1489
+ let s = new AbortController(), r;
1490
+ const n = function(d) {
1491
+ if (!r) {
1492
+ r = !0, i();
1168
1493
  const u = d instanceof Error ? d : this.reason;
1169
- s.abort(u instanceof y ? u : new Q(u instanceof Error ? u.message : u));
1494
+ s.abort(u instanceof P ? u : new Y(u instanceof Error ? u.message : u));
1170
1495
  }
1171
1496
  };
1172
1497
  let o = e && setTimeout(() => {
1173
- o = null, a(new y(`timeout of ${e}ms exceeded`, y.ETIMEDOUT));
1498
+ o = null, n(new P(`timeout of ${e}ms exceeded`, P.ETIMEDOUT));
1174
1499
  }, e);
1175
1500
  const i = () => {
1176
- r && (o && clearTimeout(o), o = null, r.forEach((d) => {
1177
- d.unsubscribe ? d.unsubscribe(a) : d.removeEventListener("abort", a);
1178
- }), r = null);
1501
+ a && (o && clearTimeout(o), o = null, a.forEach((d) => {
1502
+ d.unsubscribe ? d.unsubscribe(n) : d.removeEventListener("abort", n);
1503
+ }), a = null);
1179
1504
  };
1180
- r.forEach((d) => d.addEventListener("abort", a));
1505
+ a.forEach((d) => d.addEventListener("abort", n));
1181
1506
  const { signal: l } = s;
1182
1507
  return l.unsubscribe = () => c.asap(i), l;
1183
1508
  }
1184
- }, Ds = function* (r, e) {
1185
- let t = r.byteLength;
1509
+ }, Vs = function* (a, e) {
1510
+ let t = a.byteLength;
1186
1511
  if (t < e) {
1187
- yield r;
1512
+ yield a;
1188
1513
  return;
1189
1514
  }
1190
- let s = 0, n;
1515
+ let s = 0, r;
1191
1516
  for (; s < t; )
1192
- n = s + e, yield r.slice(s, n), s = n;
1193
- }, ks = async function* (r, e) {
1194
- for await (const t of Ls(r))
1195
- yield* Ds(t, e);
1196
- }, Ls = async function* (r) {
1197
- if (r[Symbol.asyncIterator]) {
1198
- yield* r;
1517
+ r = s + e, yield a.slice(s, r), s = r;
1518
+ }, Gs = async function* (a, e) {
1519
+ for await (const t of Xs(a))
1520
+ yield* Vs(t, e);
1521
+ }, Xs = async function* (a) {
1522
+ if (a[Symbol.asyncIterator]) {
1523
+ yield* a;
1199
1524
  return;
1200
1525
  }
1201
- const e = r.getReader();
1526
+ const e = a.getReader();
1202
1527
  try {
1203
1528
  for (; ; ) {
1204
1529
  const { done: t, value: s } = await e.read();
@@ -1209,23 +1534,23 @@ const ut = (r) => {
1209
1534
  } finally {
1210
1535
  await e.cancel();
1211
1536
  }
1212
- }, ve = (r, e, t, s) => {
1213
- const n = ks(r, e);
1214
- let a = 0, o, i = (l) => {
1537
+ }, Je = (a, e, t, s) => {
1538
+ const r = Gs(a, e);
1539
+ let n = 0, o, i = (l) => {
1215
1540
  o || (o = !0, s && s(l));
1216
1541
  };
1217
1542
  return new ReadableStream({
1218
1543
  async pull(l) {
1219
1544
  try {
1220
- const { done: d, value: u } = await n.next();
1545
+ const { done: d, value: u } = await r.next();
1221
1546
  if (d) {
1222
1547
  i(), l.close();
1223
1548
  return;
1224
1549
  }
1225
- let b = u.byteLength;
1550
+ let h = u.byteLength;
1226
1551
  if (t) {
1227
- let I = a += b;
1228
- t(I);
1552
+ let m = n += h;
1553
+ t(m);
1229
1554
  }
1230
1555
  l.enqueue(new Uint8Array(u));
1231
1556
  } catch (d) {
@@ -1233,58 +1558,58 @@ const ut = (r) => {
1233
1558
  }
1234
1559
  },
1235
1560
  cancel(l) {
1236
- return i(l), n.return();
1561
+ return i(l), r.return();
1237
1562
  }
1238
1563
  }, {
1239
1564
  highWaterMark: 2
1240
1565
  });
1241
- }, je = 64 * 1024, { isFunction: te } = c, Bs = (({ Request: r, Response: e }) => ({
1242
- Request: r,
1566
+ }, We = 64 * 1024, { isFunction: ae } = c, Qs = (({ Request: a, Response: e }) => ({
1567
+ Request: a,
1243
1568
  Response: e
1244
1569
  }))(c.global), {
1245
- ReadableStream: Ae,
1246
- TextEncoder: Me
1247
- } = c.global, He = (r, ...e) => {
1570
+ ReadableStream: Ve,
1571
+ TextEncoder: Ge
1572
+ } = c.global, Xe = (a, ...e) => {
1248
1573
  try {
1249
- return !!r(...e);
1574
+ return !!a(...e);
1250
1575
  } catch {
1251
1576
  return !1;
1252
1577
  }
1253
- }, vs = (r) => {
1254
- r = c.merge.call({
1578
+ }, Zs = (a) => {
1579
+ a = c.merge.call({
1255
1580
  skipUndefined: !0
1256
- }, Bs, r);
1257
- const { fetch: e, Request: t, Response: s } = r, n = e ? te(e) : typeof fetch == "function", a = te(t), o = te(s);
1258
- if (!n)
1581
+ }, Qs, a);
1582
+ const { fetch: e, Request: t, Response: s } = a, r = e ? ae(e) : typeof fetch == "function", n = ae(t), o = ae(s);
1583
+ if (!r)
1259
1584
  return !1;
1260
- const i = n && te(Ae), l = n && (typeof Me == "function" ? /* @__PURE__ */ ((f) => (w) => f.encode(w))(new Me()) : async (f) => new Uint8Array(await new t(f).arrayBuffer())), d = a && i && He(() => {
1585
+ const i = r && ae(Ve), l = r && (typeof Ge == "function" ? /* @__PURE__ */ ((f) => (y) => f.encode(y))(new Ge()) : async (f) => new Uint8Array(await new t(f).arrayBuffer())), d = n && i && Xe(() => {
1261
1586
  let f = !1;
1262
- const w = new t(S.origin, {
1263
- body: new Ae(),
1587
+ const y = new t(x.origin, {
1588
+ body: new Ve(),
1264
1589
  method: "POST",
1265
1590
  get duplex() {
1266
1591
  return f = !0, "half";
1267
1592
  }
1268
1593
  }).headers.has("Content-Type");
1269
- return f && !w;
1270
- }), u = o && i && He(() => c.isReadableStream(new s("").body)), b = {
1594
+ return f && !y;
1595
+ }), u = o && i && Xe(() => c.isReadableStream(new s("").body)), h = {
1271
1596
  stream: u && ((f) => f.body)
1272
1597
  };
1273
- n && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((f) => {
1274
- !b[f] && (b[f] = (w, m) => {
1275
- let R = w && w[f];
1598
+ r && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((f) => {
1599
+ !h[f] && (h[f] = (y, b) => {
1600
+ let R = y && y[f];
1276
1601
  if (R)
1277
- return R.call(w);
1278
- throw new y(`Response type '${f}' is not supported`, y.ERR_NOT_SUPPORT, m);
1602
+ return R.call(y);
1603
+ throw new P(`Response type '${f}' is not supported`, P.ERR_NOT_SUPPORT, b);
1279
1604
  });
1280
1605
  });
1281
- const I = async (f) => {
1606
+ const m = async (f) => {
1282
1607
  if (f == null)
1283
1608
  return 0;
1284
1609
  if (c.isBlob(f))
1285
1610
  return f.size;
1286
1611
  if (c.isSpecCompliantForm(f))
1287
- return (await new t(S.origin, {
1612
+ return (await new t(x.origin, {
1288
1613
  method: "POST",
1289
1614
  body: f
1290
1615
  }).arrayBuffer()).byteLength;
@@ -1292,242 +1617,242 @@ const ut = (r) => {
1292
1617
  return f.byteLength;
1293
1618
  if (c.isURLSearchParams(f) && (f = f + ""), c.isString(f))
1294
1619
  return (await l(f)).byteLength;
1295
- }, E = async (f, w) => {
1296
- const m = c.toFiniteNumber(f.getContentLength());
1297
- return m ?? I(w);
1620
+ }, q = async (f, y) => {
1621
+ const b = c.toFiniteNumber(f.getContentLength());
1622
+ return b ?? m(y);
1298
1623
  };
1299
1624
  return async (f) => {
1300
1625
  let {
1301
- url: w,
1302
- method: m,
1626
+ url: y,
1627
+ method: b,
1303
1628
  data: R,
1304
1629
  signal: F,
1305
- cancelToken: P,
1306
- timeout: T,
1307
- onDownloadProgress: N,
1308
- onUploadProgress: L,
1309
- responseType: C,
1310
- headers: de,
1311
- withCredentials: Z = "same-origin",
1312
- fetchOptions: Se
1313
- } = ut(f), Te = e || fetch;
1314
- C = C ? (C + "").toLowerCase() : "text";
1315
- let Y = Us([F, P && P.toAbortSignal()], T), z = null;
1316
- const B = Y && Y.unsubscribe && (() => {
1317
- Y.unsubscribe();
1630
+ cancelToken: I,
1631
+ timeout: E,
1632
+ onDownloadProgress: S,
1633
+ onUploadProgress: U,
1634
+ responseType: T,
1635
+ headers: J,
1636
+ withCredentials: L = "same-origin",
1637
+ fetchOptions: ee
1638
+ } = mt(f), Oe = e || fetch;
1639
+ T = T ? (T + "").toLowerCase() : "text";
1640
+ let te = Ws([F, I && I.toAbortSignal()], E), W = null;
1641
+ const B = te && te.unsubscribe && (() => {
1642
+ te.unsubscribe();
1318
1643
  });
1319
1644
  let $e;
1320
1645
  try {
1321
- if (L && d && m !== "get" && m !== "head" && ($e = await E(de, R)) !== 0) {
1322
- let k = new t(w, {
1646
+ if (U && d && b !== "get" && b !== "head" && ($e = await q(J, R)) !== 0) {
1647
+ let k = new t(y, {
1323
1648
  method: "POST",
1324
1649
  body: R,
1325
1650
  duplex: "half"
1326
- }), M;
1327
- if (c.isFormData(R) && (M = k.headers.get("content-type")) && de.setContentType(M), k.body) {
1328
- const [he, ee] = ke(
1651
+ }), H;
1652
+ if (c.isFormData(R) && (H = k.headers.get("content-type")) && J.setContentType(H), k.body) {
1653
+ const [ge, se] = He(
1329
1654
  $e,
1330
- ae(Le(L))
1655
+ le(Ke(U))
1331
1656
  );
1332
- R = ve(k.body, je, he, ee);
1657
+ R = Je(k.body, We, ge, se);
1333
1658
  }
1334
1659
  }
1335
- c.isString(Z) || (Z = Z ? "include" : "omit");
1336
- const $ = a && "credentials" in t.prototype, Oe = {
1337
- ...Se,
1338
- signal: Y,
1339
- method: m.toUpperCase(),
1340
- headers: de.normalize().toJSON(),
1660
+ c.isString(L) || (L = L ? "include" : "omit");
1661
+ const O = n && "credentials" in t.prototype, _e = {
1662
+ ...ee,
1663
+ signal: te,
1664
+ method: b.toUpperCase(),
1665
+ headers: J.normalize().toJSON(),
1341
1666
  body: R,
1342
1667
  duplex: "half",
1343
- credentials: $ ? Z : void 0
1668
+ credentials: O ? L : void 0
1344
1669
  };
1345
- z = a && new t(w, Oe);
1346
- let D = await (a ? Te(z, Se) : Te(w, Oe));
1347
- const _e = u && (C === "stream" || C === "response");
1348
- if (u && (N || _e && B)) {
1670
+ W = n && new t(y, _e);
1671
+ let D = await (n ? Oe(W, ee) : Oe(y, _e));
1672
+ const Ne = u && (T === "stream" || T === "response");
1673
+ if (u && (S || Ne && B)) {
1349
1674
  const k = {};
1350
- ["status", "statusText", "headers"].forEach((Fe) => {
1351
- k[Fe] = D[Fe];
1675
+ ["status", "statusText", "headers"].forEach((ve) => {
1676
+ k[ve] = D[ve];
1352
1677
  });
1353
- const M = c.toFiniteNumber(D.headers.get("content-length")), [he, ee] = N && ke(
1354
- M,
1355
- ae(Le(N), !0)
1678
+ const H = c.toFiniteNumber(D.headers.get("content-length")), [ge, se] = S && He(
1679
+ H,
1680
+ le(Ke(S), !0)
1356
1681
  ) || [];
1357
1682
  D = new s(
1358
- ve(D.body, je, he, () => {
1359
- ee && ee(), B && B();
1683
+ Je(D.body, We, ge, () => {
1684
+ se && se(), B && B();
1360
1685
  }),
1361
1686
  k
1362
1687
  );
1363
1688
  }
1364
- C = C || "text";
1365
- let mt = await b[c.findKey(b, C) || "text"](D, f);
1366
- return !_e && B && B(), await new Promise((k, M) => {
1367
- lt(k, M, {
1368
- data: mt,
1689
+ T = T || "text";
1690
+ let It = await h[c.findKey(h, T) || "text"](D, f);
1691
+ return !Ne && B && B(), await new Promise((k, H) => {
1692
+ ft(k, H, {
1693
+ data: It,
1369
1694
  headers: _.from(D.headers),
1370
1695
  status: D.status,
1371
1696
  statusText: D.statusText,
1372
1697
  config: f,
1373
- request: z
1698
+ request: W
1374
1699
  });
1375
1700
  });
1376
- } catch ($) {
1377
- throw B && B(), $ && $.name === "TypeError" && /Load failed|fetch/i.test($.message) ? Object.assign(
1378
- new y("Network Error", y.ERR_NETWORK, f, z, $ && $.response),
1701
+ } catch (O) {
1702
+ throw B && B(), O && O.name === "TypeError" && /Load failed|fetch/i.test(O.message) ? Object.assign(
1703
+ new P("Network Error", P.ERR_NETWORK, f, W, O && O.response),
1379
1704
  {
1380
- cause: $.cause || $
1705
+ cause: O.cause || O
1381
1706
  }
1382
- ) : y.from($, $ && $.code, f, z, $ && $.response);
1707
+ ) : P.from(O, O && O.code, f, W, O && O.response);
1383
1708
  }
1384
1709
  };
1385
- }, js = /* @__PURE__ */ new Map(), dt = (r) => {
1386
- let e = r && r.env || {};
1387
- const { fetch: t, Request: s, Response: n } = e, a = [
1710
+ }, Ys = /* @__PURE__ */ new Map(), yt = (a) => {
1711
+ let e = a && a.env || {};
1712
+ const { fetch: t, Request: s, Response: r } = e, n = [
1388
1713
  s,
1389
- n,
1714
+ r,
1390
1715
  t
1391
1716
  ];
1392
- let o = a.length, i = o, l, d, u = js;
1717
+ let o = n.length, i = o, l, d, u = Ys;
1393
1718
  for (; i--; )
1394
- l = a[i], d = u.get(l), d === void 0 && u.set(l, d = i ? /* @__PURE__ */ new Map() : vs(e)), u = d;
1719
+ l = n[i], d = u.get(l), d === void 0 && u.set(l, d = i ? /* @__PURE__ */ new Map() : Zs(e)), u = d;
1395
1720
  return d;
1396
1721
  };
1397
- dt();
1398
- const Ee = {
1399
- http: ns,
1400
- xhr: Ns,
1722
+ yt();
1723
+ const xe = {
1724
+ http: bs,
1725
+ xhr: Js,
1401
1726
  fetch: {
1402
- get: dt
1727
+ get: yt
1403
1728
  }
1404
1729
  };
1405
- c.forEach(Ee, (r, e) => {
1406
- if (r) {
1730
+ c.forEach(xe, (a, e) => {
1731
+ if (a) {
1407
1732
  try {
1408
- Object.defineProperty(r, "name", { value: e });
1733
+ Object.defineProperty(a, "name", { value: e });
1409
1734
  } catch {
1410
1735
  }
1411
- Object.defineProperty(r, "adapterName", { value: e });
1736
+ Object.defineProperty(a, "adapterName", { value: e });
1412
1737
  }
1413
1738
  });
1414
- const Ke = (r) => `- ${r}`, As = (r) => c.isFunction(r) || r === null || r === !1;
1415
- function Ms(r, e) {
1416
- r = c.isArray(r) ? r : [r];
1417
- const { length: t } = r;
1418
- let s, n;
1419
- const a = {};
1739
+ const Qe = (a) => `- ${a}`, er = (a) => c.isFunction(a) || a === null || a === !1;
1740
+ function tr(a, e) {
1741
+ a = c.isArray(a) ? a : [a];
1742
+ const { length: t } = a;
1743
+ let s, r;
1744
+ const n = {};
1420
1745
  for (let o = 0; o < t; o++) {
1421
- s = r[o];
1746
+ s = a[o];
1422
1747
  let i;
1423
- if (n = s, !As(s) && (n = Ee[(i = String(s)).toLowerCase()], n === void 0))
1424
- throw new y(`Unknown adapter '${i}'`);
1425
- if (n && (c.isFunction(n) || (n = n.get(e))))
1748
+ if (r = s, !er(s) && (r = xe[(i = String(s)).toLowerCase()], r === void 0))
1749
+ throw new P(`Unknown adapter '${i}'`);
1750
+ if (r && (c.isFunction(r) || (r = r.get(e))))
1426
1751
  break;
1427
- a[i || "#" + o] = n;
1752
+ n[i || "#" + o] = r;
1428
1753
  }
1429
- if (!n) {
1430
- const o = Object.entries(a).map(
1754
+ if (!r) {
1755
+ const o = Object.entries(n).map(
1431
1756
  ([l, d]) => `adapter ${l} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
1432
1757
  );
1433
1758
  let i = t ? o.length > 1 ? `since :
1434
- ` + o.map(Ke).join(`
1435
- `) : " " + Ke(o[0]) : "as no adapter specified";
1436
- throw new y(
1759
+ ` + o.map(Qe).join(`
1760
+ `) : " " + Qe(o[0]) : "as no adapter specified";
1761
+ throw new P(
1437
1762
  "There is no suitable adapter to dispatch the request " + i,
1438
1763
  "ERR_NOT_SUPPORT"
1439
1764
  );
1440
1765
  }
1441
- return n;
1766
+ return r;
1442
1767
  }
1443
- const ht = {
1768
+ const wt = {
1444
1769
  /**
1445
1770
  * Resolve an adapter from a list of adapter names or functions.
1446
1771
  * @type {Function}
1447
1772
  */
1448
- getAdapter: Ms,
1773
+ getAdapter: tr,
1449
1774
  /**
1450
1775
  * Exposes all known adapters
1451
1776
  * @type {Object<string, Function|Object>}
1452
1777
  */
1453
- adapters: Ee
1778
+ adapters: xe
1454
1779
  };
1455
- function fe(r) {
1456
- if (r.cancelToken && r.cancelToken.throwIfRequested(), r.signal && r.signal.aborted)
1457
- throw new Q(null, r);
1780
+ function we(a) {
1781
+ if (a.cancelToken && a.cancelToken.throwIfRequested(), a.signal && a.signal.aborted)
1782
+ throw new Y(null, a);
1458
1783
  }
1459
- function ze(r) {
1460
- return fe(r), r.headers = _.from(r.headers), r.data = ge.call(
1461
- r,
1462
- r.transformRequest
1463
- ), ["post", "put", "patch"].indexOf(r.method) !== -1 && r.headers.setContentType("application/x-www-form-urlencoded", !1), ht.getAdapter(r.adapter || X.adapter, r)(r).then(function(s) {
1464
- return fe(r), s.data = ge.call(
1465
- r,
1466
- r.transformResponse,
1784
+ function Ze(a) {
1785
+ return we(a), a.headers = _.from(a.headers), a.data = ye.call(
1786
+ a,
1787
+ a.transformRequest
1788
+ ), ["post", "put", "patch"].indexOf(a.method) !== -1 && a.headers.setContentType("application/x-www-form-urlencoded", !1), wt.getAdapter(a.adapter || Z.adapter, a)(a).then(function(s) {
1789
+ return we(a), s.data = ye.call(
1790
+ a,
1791
+ a.transformResponse,
1467
1792
  s
1468
1793
  ), s.headers = _.from(s.headers), s;
1469
1794
  }, function(s) {
1470
- return it(s) || (fe(r), s && s.response && (s.response.data = ge.call(
1471
- r,
1472
- r.transformResponse,
1795
+ return gt(s) || (we(a), s && s.response && (s.response.data = ye.call(
1796
+ a,
1797
+ a.transformResponse,
1473
1798
  s.response
1474
1799
  ), s.response.headers = _.from(s.response.headers))), Promise.reject(s);
1475
1800
  });
1476
1801
  }
1477
- const pt = "1.13.5", ue = {};
1478
- ["object", "boolean", "number", "function", "string", "symbol"].forEach((r, e) => {
1479
- ue[r] = function(s) {
1480
- return typeof s === r || "a" + (e < 1 ? "n " : " ") + r;
1802
+ const Pt = "1.13.5", pe = {};
1803
+ ["object", "boolean", "number", "function", "string", "symbol"].forEach((a, e) => {
1804
+ pe[a] = function(s) {
1805
+ return typeof s === a || "a" + (e < 1 ? "n " : " ") + a;
1481
1806
  };
1482
1807
  });
1483
- const Je = {};
1484
- ue.transitional = function(e, t, s) {
1485
- function n(a, o) {
1486
- return "[Axios v" + pt + "] Transitional option '" + a + "'" + o + (s ? ". " + s : "");
1808
+ const Ye = {};
1809
+ pe.transitional = function(e, t, s) {
1810
+ function r(n, o) {
1811
+ return "[Axios v" + Pt + "] Transitional option '" + n + "'" + o + (s ? ". " + s : "");
1487
1812
  }
1488
- return (a, o, i) => {
1813
+ return (n, o, i) => {
1489
1814
  if (e === !1)
1490
- throw new y(
1491
- n(o, " has been removed" + (t ? " in " + t : "")),
1492
- y.ERR_DEPRECATED
1815
+ throw new P(
1816
+ r(o, " has been removed" + (t ? " in " + t : "")),
1817
+ P.ERR_DEPRECATED
1493
1818
  );
1494
- return t && !Je[o] && (Je[o] = !0, console.warn(
1495
- n(
1819
+ return t && !Ye[o] && (Ye[o] = !0, console.warn(
1820
+ r(
1496
1821
  o,
1497
1822
  " has been deprecated since v" + t + " and will be removed in the near future"
1498
1823
  )
1499
- )), e ? e(a, o, i) : !0;
1824
+ )), e ? e(n, o, i) : !0;
1500
1825
  };
1501
1826
  };
1502
- ue.spelling = function(e) {
1827
+ pe.spelling = function(e) {
1503
1828
  return (t, s) => (console.warn(`${s} is likely a misspelling of ${e}`), !0);
1504
1829
  };
1505
- function Hs(r, e, t) {
1506
- if (typeof r != "object")
1507
- throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
1508
- const s = Object.keys(r);
1509
- let n = s.length;
1510
- for (; n-- > 0; ) {
1511
- const a = s[n], o = e[a];
1830
+ function sr(a, e, t) {
1831
+ if (typeof a != "object")
1832
+ throw new P("options must be an object", P.ERR_BAD_OPTION_VALUE);
1833
+ const s = Object.keys(a);
1834
+ let r = s.length;
1835
+ for (; r-- > 0; ) {
1836
+ const n = s[r], o = e[n];
1512
1837
  if (o) {
1513
- const i = r[a], l = i === void 0 || o(i, a, r);
1838
+ const i = a[n], l = i === void 0 || o(i, n, a);
1514
1839
  if (l !== !0)
1515
- throw new y("option " + a + " must be " + l, y.ERR_BAD_OPTION_VALUE);
1840
+ throw new P("option " + n + " must be " + l, P.ERR_BAD_OPTION_VALUE);
1516
1841
  continue;
1517
1842
  }
1518
1843
  if (t !== !0)
1519
- throw new y("Unknown option " + a, y.ERR_BAD_OPTION);
1844
+ throw new P("Unknown option " + n, P.ERR_BAD_OPTION);
1520
1845
  }
1521
1846
  }
1522
- const re = {
1523
- assertOptions: Hs,
1524
- validators: ue
1525
- }, x = re.validators;
1847
+ const ie = {
1848
+ assertOptions: sr,
1849
+ validators: pe
1850
+ }, N = ie.validators;
1526
1851
  let j = class {
1527
1852
  constructor(e) {
1528
1853
  this.defaults = e || {}, this.interceptors = {
1529
- request: new Ue(),
1530
- response: new Ue()
1854
+ request: new je(),
1855
+ response: new je()
1531
1856
  };
1532
1857
  }
1533
1858
  /**
@@ -1543,12 +1868,12 @@ let j = class {
1543
1868
  return await this._request(e, t);
1544
1869
  } catch (s) {
1545
1870
  if (s instanceof Error) {
1546
- let n = {};
1547
- Error.captureStackTrace ? Error.captureStackTrace(n) : n = new Error();
1548
- const a = n.stack ? n.stack.replace(/^.+\n/, "") : "";
1871
+ let r = {};
1872
+ Error.captureStackTrace ? Error.captureStackTrace(r) : r = new Error();
1873
+ const n = r.stack ? r.stack.replace(/^.+\n/, "") : "";
1549
1874
  try {
1550
- s.stack ? a && !String(s.stack).endsWith(a.replace(/^.+\n.+\n/, "")) && (s.stack += `
1551
- ` + a) : s.stack = a;
1875
+ s.stack ? n && !String(s.stack).endsWith(n.replace(/^.+\n.+\n/, "")) && (s.stack += `
1876
+ ` + n) : s.stack = n;
1552
1877
  } catch {
1553
1878
  }
1554
1879
  }
@@ -1556,81 +1881,81 @@ let j = class {
1556
1881
  }
1557
1882
  }
1558
1883
  _request(e, t) {
1559
- typeof e == "string" ? (t = t || {}, t.url = e) : t = e || {}, t = A(this.defaults, t);
1560
- const { transitional: s, paramsSerializer: n, headers: a } = t;
1561
- s !== void 0 && re.assertOptions(s, {
1562
- silentJSONParsing: x.transitional(x.boolean),
1563
- forcedJSONParsing: x.transitional(x.boolean),
1564
- clarifyTimeoutError: x.transitional(x.boolean),
1565
- legacyInterceptorReqResOrdering: x.transitional(x.boolean)
1566
- }, !1), n != null && (c.isFunction(n) ? t.paramsSerializer = {
1567
- serialize: n
1568
- } : re.assertOptions(n, {
1569
- encode: x.function,
1570
- serialize: x.function
1571
- }, !0)), t.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? t.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : t.allowAbsoluteUrls = !0), re.assertOptions(t, {
1572
- baseUrl: x.spelling("baseURL"),
1573
- withXsrfToken: x.spelling("withXSRFToken")
1884
+ typeof e == "string" ? (t = t || {}, t.url = e) : t = e || {}, t = M(this.defaults, t);
1885
+ const { transitional: s, paramsSerializer: r, headers: n } = t;
1886
+ s !== void 0 && ie.assertOptions(s, {
1887
+ silentJSONParsing: N.transitional(N.boolean),
1888
+ forcedJSONParsing: N.transitional(N.boolean),
1889
+ clarifyTimeoutError: N.transitional(N.boolean),
1890
+ legacyInterceptorReqResOrdering: N.transitional(N.boolean)
1891
+ }, !1), r != null && (c.isFunction(r) ? t.paramsSerializer = {
1892
+ serialize: r
1893
+ } : ie.assertOptions(r, {
1894
+ encode: N.function,
1895
+ serialize: N.function
1896
+ }, !0)), t.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? t.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : t.allowAbsoluteUrls = !0), ie.assertOptions(t, {
1897
+ baseUrl: N.spelling("baseURL"),
1898
+ withXsrfToken: N.spelling("withXSRFToken")
1574
1899
  }, !0), t.method = (t.method || this.defaults.method || "get").toLowerCase();
1575
- let o = a && c.merge(
1576
- a.common,
1577
- a[t.method]
1900
+ let o = n && c.merge(
1901
+ n.common,
1902
+ n[t.method]
1578
1903
  );
1579
- a && c.forEach(
1904
+ n && c.forEach(
1580
1905
  ["delete", "get", "head", "post", "put", "patch", "common"],
1581
1906
  (f) => {
1582
- delete a[f];
1907
+ delete n[f];
1583
1908
  }
1584
- ), t.headers = _.concat(o, a);
1909
+ ), t.headers = _.concat(o, n);
1585
1910
  const i = [];
1586
1911
  let l = !0;
1587
- this.interceptors.request.forEach(function(w) {
1588
- if (typeof w.runWhen == "function" && w.runWhen(t) === !1)
1912
+ this.interceptors.request.forEach(function(y) {
1913
+ if (typeof y.runWhen == "function" && y.runWhen(t) === !1)
1589
1914
  return;
1590
- l = l && w.synchronous;
1591
- const m = t.transitional || Re;
1592
- m && m.legacyInterceptorReqResOrdering ? i.unshift(w.fulfilled, w.rejected) : i.push(w.fulfilled, w.rejected);
1915
+ l = l && y.synchronous;
1916
+ const b = t.transitional || Se;
1917
+ b && b.legacyInterceptorReqResOrdering ? i.unshift(y.fulfilled, y.rejected) : i.push(y.fulfilled, y.rejected);
1593
1918
  });
1594
1919
  const d = [];
1595
- this.interceptors.response.forEach(function(w) {
1596
- d.push(w.fulfilled, w.rejected);
1920
+ this.interceptors.response.forEach(function(y) {
1921
+ d.push(y.fulfilled, y.rejected);
1597
1922
  });
1598
- let u, b = 0, I;
1923
+ let u, h = 0, m;
1599
1924
  if (!l) {
1600
- const f = [ze.bind(this), void 0];
1601
- for (f.unshift(...i), f.push(...d), I = f.length, u = Promise.resolve(t); b < I; )
1602
- u = u.then(f[b++], f[b++]);
1925
+ const f = [Ze.bind(this), void 0];
1926
+ for (f.unshift(...i), f.push(...d), m = f.length, u = Promise.resolve(t); h < m; )
1927
+ u = u.then(f[h++], f[h++]);
1603
1928
  return u;
1604
1929
  }
1605
- I = i.length;
1606
- let E = t;
1607
- for (; b < I; ) {
1608
- const f = i[b++], w = i[b++];
1930
+ m = i.length;
1931
+ let q = t;
1932
+ for (; h < m; ) {
1933
+ const f = i[h++], y = i[h++];
1609
1934
  try {
1610
- E = f(E);
1611
- } catch (m) {
1612
- w.call(this, m);
1935
+ q = f(q);
1936
+ } catch (b) {
1937
+ y.call(this, b);
1613
1938
  break;
1614
1939
  }
1615
1940
  }
1616
1941
  try {
1617
- u = ze.call(this, E);
1942
+ u = Ze.call(this, q);
1618
1943
  } catch (f) {
1619
1944
  return Promise.reject(f);
1620
1945
  }
1621
- for (b = 0, I = d.length; b < I; )
1622
- u = u.then(d[b++], d[b++]);
1946
+ for (h = 0, m = d.length; h < m; )
1947
+ u = u.then(d[h++], d[h++]);
1623
1948
  return u;
1624
1949
  }
1625
1950
  getUri(e) {
1626
- e = A(this.defaults, e);
1627
- const t = ct(e.baseURL, e.url, e.allowAbsoluteUrls);
1628
- return at(t, e.params, e.paramsSerializer);
1951
+ e = M(this.defaults, e);
1952
+ const t = bt(e.baseURL, e.url, e.allowAbsoluteUrls);
1953
+ return ht(t, e.params, e.paramsSerializer);
1629
1954
  }
1630
1955
  };
1631
1956
  c.forEach(["delete", "get", "head", "options"], function(e) {
1632
1957
  j.prototype[e] = function(t, s) {
1633
- return this.request(A(s || {}, {
1958
+ return this.request(M(s || {}, {
1634
1959
  method: e,
1635
1960
  url: t,
1636
1961
  data: (s || {}).data
@@ -1639,44 +1964,44 @@ c.forEach(["delete", "get", "head", "options"], function(e) {
1639
1964
  });
1640
1965
  c.forEach(["post", "put", "patch"], function(e) {
1641
1966
  function t(s) {
1642
- return function(a, o, i) {
1643
- return this.request(A(i || {}, {
1967
+ return function(n, o, i) {
1968
+ return this.request(M(i || {}, {
1644
1969
  method: e,
1645
1970
  headers: s ? {
1646
1971
  "Content-Type": "multipart/form-data"
1647
1972
  } : {},
1648
- url: a,
1973
+ url: n,
1649
1974
  data: o
1650
1975
  }));
1651
1976
  };
1652
1977
  }
1653
1978
  j.prototype[e] = t(), j.prototype[e + "Form"] = t(!0);
1654
1979
  });
1655
- let Ks = class gt {
1980
+ let rr = class qt {
1656
1981
  constructor(e) {
1657
1982
  if (typeof e != "function")
1658
1983
  throw new TypeError("executor must be a function.");
1659
1984
  let t;
1660
- this.promise = new Promise(function(a) {
1661
- t = a;
1985
+ this.promise = new Promise(function(n) {
1986
+ t = n;
1662
1987
  });
1663
1988
  const s = this;
1664
- this.promise.then((n) => {
1989
+ this.promise.then((r) => {
1665
1990
  if (!s._listeners) return;
1666
- let a = s._listeners.length;
1667
- for (; a-- > 0; )
1668
- s._listeners[a](n);
1991
+ let n = s._listeners.length;
1992
+ for (; n-- > 0; )
1993
+ s._listeners[n](r);
1669
1994
  s._listeners = null;
1670
- }), this.promise.then = (n) => {
1671
- let a;
1995
+ }), this.promise.then = (r) => {
1996
+ let n;
1672
1997
  const o = new Promise((i) => {
1673
- s.subscribe(i), a = i;
1674
- }).then(n);
1998
+ s.subscribe(i), n = i;
1999
+ }).then(r);
1675
2000
  return o.cancel = function() {
1676
- s.unsubscribe(a);
2001
+ s.unsubscribe(n);
1677
2002
  }, o;
1678
- }, e(function(a, o, i) {
1679
- s.reason || (s.reason = new Q(a, o, i), t(s.reason));
2003
+ }, e(function(n, o, i) {
2004
+ s.reason || (s.reason = new Y(n, o, i), t(s.reason));
1680
2005
  });
1681
2006
  }
1682
2007
  /**
@@ -1718,22 +2043,22 @@ let Ks = class gt {
1718
2043
  static source() {
1719
2044
  let e;
1720
2045
  return {
1721
- token: new gt(function(n) {
1722
- e = n;
2046
+ token: new qt(function(r) {
2047
+ e = r;
1723
2048
  }),
1724
2049
  cancel: e
1725
2050
  };
1726
2051
  }
1727
2052
  };
1728
- function zs(r) {
2053
+ function ar(a) {
1729
2054
  return function(t) {
1730
- return r.apply(null, t);
2055
+ return a.apply(null, t);
1731
2056
  };
1732
2057
  }
1733
- function Js(r) {
1734
- return c.isObject(r) && r.isAxiosError === !0;
2058
+ function nr(a) {
2059
+ return c.isObject(a) && a.isAxiosError === !0;
1735
2060
  }
1736
- const ye = {
2061
+ const Ie = {
1737
2062
  Continue: 100,
1738
2063
  SwitchingProtocols: 101,
1739
2064
  Processing: 102,
@@ -1804,70 +2129,100 @@ const ye = {
1804
2129
  SslHandshakeFailed: 525,
1805
2130
  InvalidSslCertificate: 526
1806
2131
  };
1807
- Object.entries(ye).forEach(([r, e]) => {
1808
- ye[e] = r;
2132
+ Object.entries(Ie).forEach(([a, e]) => {
2133
+ Ie[e] = a;
1809
2134
  });
1810
- function ft(r) {
1811
- const e = new j(r), t = Ve(j.prototype.request, e);
1812
- return c.extend(t, j.prototype, e, { allOwnKeys: !0 }), c.extend(t, e, null, { allOwnKeys: !0 }), t.create = function(n) {
1813
- return ft(A(r, n));
2135
+ function Rt(a) {
2136
+ const e = new j(a), t = tt(j.prototype.request, e);
2137
+ return c.extend(t, j.prototype, e, { allOwnKeys: !0 }), c.extend(t, e, null, { allOwnKeys: !0 }), t.create = function(r) {
2138
+ return Rt(M(a, r));
1814
2139
  }, t;
1815
2140
  }
1816
- const q = ft(X);
1817
- q.Axios = j;
1818
- q.CanceledError = Q;
1819
- q.CancelToken = Ks;
1820
- q.isCancel = it;
1821
- q.VERSION = pt;
1822
- q.toFormData = ce;
1823
- q.AxiosError = y;
1824
- q.Cancel = q.CanceledError;
1825
- q.all = function(e) {
2141
+ const C = Rt(Z);
2142
+ C.Axios = j;
2143
+ C.CanceledError = Y;
2144
+ C.CancelToken = rr;
2145
+ C.isCancel = gt;
2146
+ C.VERSION = Pt;
2147
+ C.toFormData = he;
2148
+ C.AxiosError = P;
2149
+ C.Cancel = C.CanceledError;
2150
+ C.all = function(e) {
1826
2151
  return Promise.all(e);
1827
2152
  };
1828
- q.spread = zs;
1829
- q.isAxiosError = Js;
1830
- q.mergeConfig = A;
1831
- q.AxiosHeaders = _;
1832
- q.formToJSON = (r) => ot(c.isHTMLForm(r) ? new FormData(r) : r);
1833
- q.getAdapter = ht.getAdapter;
1834
- q.HttpStatusCode = ye;
1835
- q.default = q;
2153
+ C.spread = ar;
2154
+ C.isAxiosError = nr;
2155
+ C.mergeConfig = M;
2156
+ C.AxiosHeaders = _;
2157
+ C.formToJSON = (a) => pt(c.isHTMLForm(a) ? new FormData(a) : a);
2158
+ C.getAdapter = wt.getAdapter;
2159
+ C.HttpStatusCode = Ie;
2160
+ C.default = C;
1836
2161
  const {
1837
- Axios: on,
1838
- AxiosError: ln,
1839
- CanceledError: cn,
1840
- isCancel: un,
1841
- CancelToken: dn,
1842
- VERSION: hn,
1843
- all: pn,
1844
- Cancel: gn,
1845
- isAxiosError: fn,
1846
- spread: mn,
1847
- toFormData: bn,
1848
- AxiosHeaders: wn,
1849
- HttpStatusCode: yn,
1850
- formToJSON: In,
1851
- getAdapter: qn,
1852
- mergeConfig: Rn
1853
- } = q, Ws = "/@api/deki";
1854
- class g {
1855
- axiosInstance = q.create();
2162
+ Axios: wr,
2163
+ AxiosError: Pr,
2164
+ CanceledError: qr,
2165
+ isCancel: Rr,
2166
+ CancelToken: Ir,
2167
+ VERSION: Cr,
2168
+ all: Fr,
2169
+ Cancel: Er,
2170
+ isAxiosError: Sr,
2171
+ spread: Tr,
2172
+ toFormData: xr,
2173
+ AxiosHeaders: Or,
2174
+ HttpStatusCode: $r,
2175
+ formToJSON: _r,
2176
+ getAdapter: Nr,
2177
+ mergeConfig: vr
2178
+ } = C, or = "/@api/deki";
2179
+ class w {
2180
+ axiosInstance = C.create();
1856
2181
  format = "json";
1857
- constructor(e, t, s = "json") {
1858
- if (!e)
1859
- throw new Error("TLD is required");
2182
+ debug;
2183
+ constructor(e, t, s = "json", r) {
2184
+ if (this.debug = Ce("cxone-expert:requests", r), !e)
2185
+ throw this.debug("TLD is required to initialize Requests module"), new Error("TLD is required");
1860
2186
  if (!t)
1861
- throw new Error("Auth object is required");
2187
+ throw this.debug("Auth object is required to initialize Requests module"), new Error("Auth object is required");
1862
2188
  let n = e;
1863
- !n.startsWith("http://") && !n.startsWith("https://") && (n = `https://${n}`), n.endsWith("/") && (n = n.slice(0, n.length - 1)), this.format = s, this.axiosInstance = q.create({
1864
- baseURL: `${n}${Ws}`,
2189
+ !n.startsWith("http://") && !n.startsWith("https://") && (n = `https://${n}`), n.endsWith("/") && (n = n.slice(0, n.length - 1)), this.format = s, this.axiosInstance = C.create({
2190
+ baseURL: `${n}${or}`,
1865
2191
  headers: {
1866
2192
  "Content-Type": "application/json",
1867
2193
  "X-Requested-With": "XMLHttpRequest",
1868
2194
  ...t
1869
2195
  }
1870
- });
2196
+ }), this.setupInterceptors();
2197
+ }
2198
+ setupInterceptors() {
2199
+ this.axiosInstance.interceptors.request.use(
2200
+ (e) => {
2201
+ if (this.debug(`→ ${e.method?.toUpperCase()} ${e.baseURL}${e.url}`), e.params && Object.keys(e.params).length > 0 && this.debug(" Query params:", JSON.stringify(e.params)), e.data && e.headers?.["Content-Type"] !== "application/octet-stream") {
2202
+ const t = typeof e.data == "string" ? e.data : JSON.stringify(e.data);
2203
+ t.length > 200 ? this.debug(" Body:", t.substring(0, 200) + "... (truncated)") : t.length > 0 && this.debug(" Body:", t);
2204
+ }
2205
+ return e;
2206
+ },
2207
+ (e) => (this.debug("✗ Request error:", e.message), Promise.reject(e))
2208
+ ), this.axiosInstance.interceptors.response.use(
2209
+ (e) => {
2210
+ if (this.debug(`← ${e.status} ${e.config.method?.toUpperCase()} ${e.config.url}`), e.data && e.headers["content-type"]?.includes("application/json")) {
2211
+ const t = JSON.stringify(e.data);
2212
+ t.length > 200 ? this.debug(" Response:", t.substring(0, 200) + "... (truncated)") : this.debug(" Response:", t);
2213
+ } else e.headers["content-type"]?.includes("text/") ? this.debug(" Response: [text content]") : e.data && this.debug(" Response: [binary content]");
2214
+ return e;
2215
+ },
2216
+ (e) => {
2217
+ if (e.response) {
2218
+ if (this.debug(`✗ ${e.response.status} ${e.config?.method?.toUpperCase()} ${e.config?.url}`), this.debug(" Error:", e.response.statusText), e.response.data) {
2219
+ const t = typeof e.response.data == "string" ? e.response.data : JSON.stringify(e.response.data);
2220
+ t.length > 200 ? this.debug(" Error details:", t.substring(0, 200) + "... (truncated)") : this.debug(" Error details:", t);
2221
+ }
2222
+ } else e.request ? this.debug("✗ No response received:", e.message) : this.debug("✗ Request setup error:", e.message);
2223
+ return Promise.reject(e);
2224
+ }
2225
+ );
1871
2226
  }
1872
2227
  getFormatParam() {
1873
2228
  return {
@@ -1899,11 +2254,12 @@ class g {
1899
2254
  return await this.axiosInstance.head(e, { ...t });
1900
2255
  }
1901
2256
  }
1902
- class Vs {
2257
+ class ir {
1903
2258
  globals;
1904
2259
  _auth;
2260
+ debug;
1905
2261
  constructor(e, t) {
1906
- this.globals = e, this._auth = t;
2262
+ this.globals = e, this._auth = t, this.debug = Ce("cxone-expert-node:pages", e.debug), this.debug("Pages module initialized");
1907
2263
  }
1908
2264
  /**
1909
2265
  * Converts a page identifier (number or string) into the format expected by the API.
@@ -1929,270 +2285,307 @@ class Vs {
1929
2285
  parseKey(e) {
1930
2286
  return `${encodeURIComponent(encodeURIComponent(e))}`;
1931
2287
  }
2288
+ /**
2289
+ * Creates a Requests instance with the current global settings including debug state.
2290
+ * @param tld - The top-level domain
2291
+ * @param auth - The authentication object
2292
+ * @returns A configured Requests instance
2293
+ */
2294
+ createRequests(e, t) {
2295
+ return new w(e, t, "json", this.globals.debug);
2296
+ }
1932
2297
  async getPages(e, t) {
1933
- const s = h(this.globals, t?.tld), n = p(this.globals, t?.auth);
1934
- return (await new g(s, n).get("/pages", {
2298
+ this.debug("getPages called");
2299
+ const s = p(this.globals, t?.tld), r = g(this.globals, t?.auth), o = await this.createRequests(s, r).get("/pages", {
1935
2300
  params: {
1936
2301
  ...e
1937
2302
  }
1938
- })).data;
2303
+ });
2304
+ return this.debug("getPages completed successfully"), o.data;
1939
2305
  }
1940
2306
  async getPage(e, t, s) {
1941
- const n = this.parsePageId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
1942
- return (await new g(a, o).get(`/pages/${n}`, {
2307
+ this.debug("getPage called for:", e);
2308
+ const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).get(`/pages/${r}`, {
1943
2309
  params: {
1944
2310
  ...t
1945
2311
  }
1946
- })).data;
2312
+ });
2313
+ return this.debug("getPage completed successfully"), l.data;
1947
2314
  }
1948
2315
  async getPageContents(e, t, s) {
1949
- const n = this.parsePageId(e), a = h(this.globals, t?.tld), o = p(this.globals, t?.auth);
1950
- return (await new g(a, o).get(`/pages/${n}/contents`, {
2316
+ this.debug("getPageContents called for page:", e);
2317
+ const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).get(`/pages/${r}/contents`, {
1951
2318
  params: {
1952
- ...s
2319
+ ...t
1953
2320
  }
1954
- })).data;
2321
+ });
2322
+ return this.debug("getPageContents retrieved contents for page:", e), l.data;
1955
2323
  }
1956
2324
  async getPageContentsExplain(e, t, s) {
1957
- const n = this.parsePageId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
1958
- return (await new g(a, o).get(`/pages/${n}/contents/explain`, {
2325
+ this.debug("getPageContentsExplain called for page:", e);
2326
+ const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).get(`/pages/${r}/contents/explain`, {
1959
2327
  params: {
1960
2328
  ...t
1961
2329
  }
1962
- })).data;
2330
+ });
2331
+ return this.debug("getPageContentsExplain retrieved contents for page:", e), l.data;
1963
2332
  }
1964
2333
  async getPageDiff(e, t, s) {
1965
- const n = this.parsePageId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
1966
- return (await new g(a, o).get(`/pages/${n}/diff`, {
2334
+ this.debug("getPageDiff called for page:", e);
2335
+ const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).get(`/pages/${r}/diff`, {
1967
2336
  params: {
1968
2337
  ...t
1969
2338
  }
1970
- })).data;
2339
+ });
2340
+ return this.debug("getPageDiff retrieved diff for page:", e), l.data;
1971
2341
  }
1972
2342
  async getPageExplain(e, t, s) {
1973
- const n = this.parsePageId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
1974
- return (await new g(a, o).get(`/pages/${n}/explain`, {
2343
+ this.debug("getPageExplain called for page:", e);
2344
+ const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).get(`/pages/${r}/explain`, {
1975
2345
  params: {
1976
2346
  ...t
1977
2347
  }
1978
- })).data;
2348
+ });
2349
+ return this.debug("getPageExplain retrieved explanation for page:", e), l.data;
1979
2350
  }
1980
- async getPageExportToken(e, t, s, n) {
1981
- const a = this.parsePageId(e), o = h(this.globals, n?.tld), i = p(this.globals, n?.auth);
1982
- return (await new g(o, i).get(`/pages/${a}/export/${t}`, {
2351
+ async getPageExportToken(e, t, s, r) {
2352
+ this.debug("getPageExportToken called for page:", e);
2353
+ const n = this.parsePageId(e), o = p(this.globals, r?.tld), i = g(this.globals, r?.auth), d = await this.createRequests(o, i).get(`/pages/${n}/export/${t}`, {
1983
2354
  params: {
1984
2355
  ...s
1985
2356
  },
1986
2357
  responseType: "stream"
1987
- })).data;
2358
+ });
2359
+ return this.debug("getPageExportToken successfully retrieved export for page:", e), d.data;
1988
2360
  }
1989
- async getPageExportTokenFilename(e, t, s, n, a) {
1990
- const o = this.parsePageId(e), i = this.parseFileName(s), l = h(this.globals, a?.tld), d = p(this.globals, a?.auth);
1991
- return (await new g(l, d).get(`/pages/${o}/export/${t}/${i}`, {
2361
+ async getPageExportTokenFilename(e, t, s, r, n) {
2362
+ this.debug("getPageExportTokenFilename called for page:", e);
2363
+ const o = this.parsePageId(e), i = this.parseFileName(s), l = p(this.globals, n?.tld), d = g(this.globals, n?.auth), h = await this.createRequests(l, d).get(`/pages/${o}/export/${t}/${i}`, {
1992
2364
  params: {
1993
- ...n
2365
+ ...r
1994
2366
  },
1995
2367
  responseType: "stream"
1996
- })).data;
2368
+ });
2369
+ return this.debug("getPageExportTokenFilename successfully retrieved export for page:", e), h.data;
1997
2370
  }
1998
2371
  async getPageFilesSubpages(e, t, s) {
1999
- const n = this.parsePageId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2000
- return (await new g(a, o).get(`/pages/${n}/explain`, {
2372
+ this.debug("getPageFilesSubpages called for page:", e);
2373
+ const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).get(`/pages/${r}/explain`, {
2001
2374
  params: {
2002
2375
  ...t
2003
2376
  }
2004
- })).data;
2377
+ });
2378
+ return this.debug("getPageFilesSubpages retrieved file and subpage info for page:", e), l.data;
2005
2379
  }
2006
2380
  async getPageFiles(e, t, s) {
2007
- const n = this.parsePageId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2008
- return (await new g(a, o).get(`/pages/${n}/explain`, {
2381
+ this.debug("getPageFiles called");
2382
+ const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).get(`/pages/${r}/explain`, {
2009
2383
  params: {
2010
2384
  ...t
2011
2385
  }
2012
- })).data;
2386
+ });
2387
+ return this.debug("getPageFiles retrieved file info for page:", e), l.data;
2013
2388
  }
2014
- async getPageFile(e, t, s, n) {
2015
- const a = this.parsePageId(e), o = this.parseFileName(t), i = h(this.globals, n?.tld), l = p(this.globals, n?.auth);
2016
- return (await new g(i, l).get(`/pages/${a}/files/${o}`, {
2389
+ async getPageFile(e, t, s, r) {
2390
+ this.debug("getPageFile called for page:", e);
2391
+ const n = this.parsePageId(e), o = this.parseFileName(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth), u = await this.createRequests(i, l).get(`/pages/${n}/files/${o}`, {
2017
2392
  params: {
2018
2393
  ...s
2019
2394
  },
2020
2395
  responseType: "stream"
2021
- })).data;
2396
+ });
2397
+ return this.debug("getPageFile successfully retrieved file for page:", e), u.data;
2022
2398
  }
2023
- async getPageFileDescription(e, t, s, n) {
2024
- const a = this.parsePageId(e), o = this.parseFileName(t), i = h(this.globals, n?.tld), l = p(this.globals, n?.auth);
2025
- return (await new g(i, l).get(`/pages/${a}/files/${o}/description`, {
2399
+ async getPageFileDescription(e, t, s, r) {
2400
+ this.debug("getPageFileDescription called for page:", e);
2401
+ const n = this.parsePageId(e), o = this.parseFileName(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth), u = await this.createRequests(i, l).get(`/pages/${n}/files/${o}/description`, {
2026
2402
  params: {
2027
2403
  ...s
2028
2404
  },
2029
2405
  responseType: "stream"
2030
- })).data;
2406
+ });
2407
+ return this.debug("getPageFileDescription successfully retrieved description for page:", e), u.data;
2031
2408
  }
2032
- async getPageFileInfo(e, t, s, n) {
2033
- const a = this.parsePageId(e), o = this.parseFileName(t), i = h(this.globals, n?.tld), l = p(this.globals, n?.auth);
2034
- return (await new g(i, l).get(`/pages/${a}/files/${o}/info`, {
2409
+ async getPageFileInfo(e, t, s, r) {
2410
+ this.debug("getPageFileInfo called for page:", e);
2411
+ const n = this.parsePageId(e), o = this.parseFileName(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth), u = await this.createRequests(i, l).get(`/pages/${n}/files/${o}/info`, {
2035
2412
  params: {
2036
2413
  ...s
2037
2414
  }
2038
- })).data;
2415
+ });
2416
+ return this.debug("getPageFileInfo successfully retrieved info for file on page:", e), u.data;
2039
2417
  }
2040
- async getPageFileRevisions(e, t, s, n) {
2041
- const a = this.parsePageId(e), o = this.parseFileName(t), i = h(this.globals, n?.tld), l = p(this.globals, n?.auth);
2042
- return (await new g(i, l).get(`/pages/${a}/files/${o}/revisions`, {
2418
+ async getPageFileRevisions(e, t, s, r) {
2419
+ this.debug("getPageFileRevisions called for page:", e);
2420
+ const n = this.parsePageId(e), o = this.parseFileName(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth), u = await this.createRequests(i, l).get(`/pages/${n}/files/${o}/revisions`, {
2043
2421
  params: {
2044
2422
  ...s
2045
2423
  }
2046
- })).data;
2424
+ });
2425
+ return this.debug("getPageFileRevisions successfully retrieved revisions for file on page:", e), u.data;
2047
2426
  }
2048
2427
  async getPageFind(e, t, s) {
2049
- const n = this.parsePageId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2050
- return (await new g(a, o).get(`/pages/${n}/find`, {
2428
+ this.debug("getPageFind called for page:", e);
2429
+ const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).get(`/pages/${r}/find`, {
2051
2430
  params: {
2052
2431
  ...t
2053
2432
  }
2054
- })).data;
2433
+ });
2434
+ return this.debug("getPageFind successfully retrieved find results for page:", e), l.data;
2055
2435
  }
2056
2436
  async getPageInfo(e, t, s) {
2057
- const n = this.parsePageId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2058
- return (await new g(a, o).get(`/pages/${n}/info`, {
2437
+ this.debug("getPageInfo called for page:", e);
2438
+ const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).get(`/pages/${r}/info`, {
2059
2439
  params: {
2060
2440
  ...t
2061
2441
  }
2062
- })).data;
2442
+ });
2443
+ return this.debug("getPageInfo successfully retrieved info for page:", e), l.data;
2063
2444
  }
2064
2445
  async getPageLinks(e, t, s) {
2065
- const n = this.parsePageId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2066
- return (await new g(a, o).get(`/pages/${n}/links`, {
2446
+ this.debug("getPageLinks called for page:", e);
2447
+ const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).get(`/pages/${r}/links`, {
2067
2448
  params: {
2068
2449
  ...t
2069
2450
  }
2070
- })).data;
2451
+ });
2452
+ return this.debug("getPageLinks successfully retrieved links for page:", e), l.data;
2071
2453
  }
2072
2454
  async getPagePDF(e, t, s) {
2073
- const n = this.parsePageId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2074
- return (await new g(a, o).get(`/pages/${n}/pdf`, {
2455
+ this.debug("getPagePDF called for page:", e);
2456
+ const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).get(`/pages/${r}/pdf`, {
2075
2457
  params: {
2076
2458
  ...t
2077
2459
  },
2078
2460
  responseType: "stream"
2079
- })).data;
2461
+ });
2462
+ return this.debug("getPagePDF successfully retrieved PDF for page:", e), l.data;
2080
2463
  }
2081
- async getPagePDFFilename(e, t, s, n) {
2082
- const a = this.parsePageId(e), o = this.parseFileName(t), i = h(this.globals, n?.tld), l = p(this.globals, n?.auth);
2083
- return (await new g(i, l).get(`/pages/${a}/pdf/${o}`, {
2464
+ async getPagePDFFilename(e, t, s, r) {
2465
+ this.debug("getPagePDFFilename called for page:", e);
2466
+ const n = this.parsePageId(e), o = this.parseFileName(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth), u = await this.createRequests(i, l).get(`/pages/${n}/pdf/${o}`, {
2084
2467
  params: {
2085
2468
  ...s
2086
2469
  },
2087
2470
  responseType: "stream"
2088
- })).data;
2471
+ });
2472
+ return this.debug("getPagePDFFilename successfully retrieved PDF for page:", e), u.data;
2089
2473
  }
2090
2474
  async getPageProperties(e, t, s) {
2091
- const n = this.parsePageId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2092
- return (await new g(a, o).get(`/pages/${n}/properties`, {
2475
+ this.debug("getPageProperties called for page:", e);
2476
+ const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).get(`/pages/${r}/properties`, {
2093
2477
  params: {
2094
2478
  ...t
2095
2479
  }
2096
- })).data;
2480
+ });
2481
+ return this.debug("getPageProperties successfully retrieved properties for page:", e), l.data;
2097
2482
  }
2098
- async getPagePropertiesKey(e, t, s, n) {
2099
- const a = this.parsePageId(e), o = this.parseKey(t), i = h(this.globals, n?.tld), l = p(this.globals, n?.auth);
2100
- return (await new g(i, l).get(`/pages/${a}/properties/${o}`, {
2483
+ async getPagePropertiesKey(e, t, s, r) {
2484
+ this.debug("getPagePropertiesKey called for page:", e);
2485
+ const n = this.parsePageId(e), o = this.parseKey(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth), u = await this.createRequests(i, l).get(`/pages/${n}/properties/${o}`, {
2101
2486
  params: {
2102
2487
  ...s
2103
2488
  }
2104
- })).data;
2489
+ });
2490
+ return this.debug("getPagePropertiesKey successfully retrieved property key for page:", e), u.data;
2105
2491
  }
2106
- async getPagePropertiesKeyInfo(e, t, s, n) {
2107
- const a = this.parsePageId(e), o = this.parseKey(t), i = h(this.globals, n?.tld), l = p(this.globals, n?.auth);
2108
- return (await new g(i, l).get(`/pages/${a}/properties/${o}/info`, {
2492
+ async getPagePropertiesKeyInfo(e, t, s, r) {
2493
+ this.debug("getPagePropertiesKeyInfo called for page:", e);
2494
+ const n = this.parsePageId(e), o = this.parseKey(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth), u = await this.createRequests(i, l).get(`/pages/${n}/properties/${o}/info`, {
2109
2495
  params: {
2110
2496
  ...s
2111
2497
  }
2112
- })).data;
2498
+ });
2499
+ return this.debug("getPagePropertiesKeyInfo successfully retrieved property key info for page:", e), u.data;
2113
2500
  }
2114
2501
  async getPageRatings(e, t, s) {
2115
- const n = this.parsePageId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2116
- return (await new g(a, o).get(`/pages/${n}/ratings`, {
2502
+ this.debug("getPageRatings called for page:", e);
2503
+ const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).get(`/pages/${r}/ratings`, {
2117
2504
  params: {
2118
2505
  ...t
2119
2506
  }
2120
- })).data;
2507
+ });
2508
+ return this.debug("getPageRatings successfully retrieved ratings for page:", e), l.data;
2121
2509
  }
2122
2510
  async getPageRevisions(e, t, s) {
2123
- const n = this.parsePageId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2124
- return (await new g(a, o).get(`/pages/${n}/revisions`, {
2511
+ this.debug("getPageRevisions called for page:", e);
2512
+ const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).get(`/pages/${r}/revisions`, {
2125
2513
  params: {
2126
2514
  ...t
2127
2515
  }
2128
- })).data;
2516
+ });
2517
+ return this.debug("getPageRevisions successfully retrieved revisions for page:", e), l.data;
2129
2518
  }
2130
2519
  async getPageSubpages(e, t, s) {
2131
- const n = this.parsePageId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2132
- return (await new g(a, o).get(`/pages/${n}/subpages`, {
2520
+ this.debug("getPageSubpages called for page:", e);
2521
+ const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).get(`/pages/${r}/subpages`, {
2133
2522
  params: {
2134
2523
  ...t
2135
2524
  }
2136
- })).data;
2525
+ });
2526
+ return this.debug("getPageSubpages successfully retrieved subpages for page:", e), l.data;
2137
2527
  }
2138
2528
  async getPageTags(e, t, s) {
2139
- const n = this.parsePageId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2140
- return (await new g(a, o).get(`/pages/${n}/tags`, {
2529
+ this.debug("getPageTags called for page:", e);
2530
+ const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).get(`/pages/${r}/tags`, {
2141
2531
  params: {
2142
2532
  ...t
2143
2533
  }
2144
- })).data;
2534
+ });
2535
+ return this.debug("getPageTags successfully retrieved tags for page:", e), l.data;
2145
2536
  }
2146
2537
  async getPageTree(e, t, s) {
2147
- const n = this.parsePageId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2148
- return (await new g(a, o).get(`/pages/${n}/tree`, {
2538
+ this.debug("getPageTree called for page:", e);
2539
+ const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).get(`/pages/${r}/tree`, {
2149
2540
  params: {
2150
2541
  ...t
2151
2542
  }
2152
- })).data;
2543
+ });
2544
+ return this.debug("getPageTree successfully retrieved tree for page:", e), l.data;
2153
2545
  }
2154
- async getPageBook(e, t, s) {
2155
- this.parsePageId(e);
2156
- const n = h(this.globals, s?.tld), a = p(this.globals, s?.auth);
2157
- return (await new g(n, a).get("/pages/book", {
2546
+ async getPageBook(e, t) {
2547
+ this.debug("getPageBook called");
2548
+ const s = p(this.globals, t?.tld), r = g(this.globals, t?.auth), o = await this.createRequests(s, r).get("/pages/book", {
2158
2549
  params: {
2159
- ...t
2550
+ ...e
2160
2551
  },
2161
2552
  responseType: "stream"
2162
- })).data;
2553
+ });
2554
+ return this.debug("getPageBook successfully retrieved book"), o.data;
2163
2555
  }
2164
- async getPageBookFilename(e, t, s, n) {
2165
- this.parsePageId(e), this.parseFileName(t);
2166
- const a = h(this.globals, n?.tld), o = p(this.globals, n?.auth);
2167
- return (await new g(a, o).get(`/pages/book/${t}`, {
2556
+ async getPageBookFilename(e, t, s, r) {
2557
+ this.debug("getPageBookFilename called for page:", e), this.parsePageId(e), this.parseFileName(t);
2558
+ const n = p(this.globals, r?.tld), o = g(this.globals, r?.auth), l = await this.createRequests(n, o).get(`/pages/book/${t}`, {
2168
2559
  params: {
2169
2560
  ...s
2170
2561
  },
2171
2562
  responseType: "stream"
2172
- })).data;
2563
+ });
2564
+ return this.debug("getPageBookFilename successfully retrieved book for page:", e), l.data;
2173
2565
  }
2174
2566
  async getPagesCsv(e, t) {
2175
- const s = h(this.globals, t?.tld), n = p(this.globals, t?.auth);
2176
- return (await new g(s, n).get("/pages/csv", {
2567
+ this.debug("getPagesCsv called with params");
2568
+ const s = p(this.globals, t?.tld), r = g(this.globals, t?.auth), o = await this.createRequests(s, r).get("/pages/csv", {
2177
2569
  params: {
2178
2570
  ...e
2179
2571
  },
2180
2572
  responseType: "stream"
2181
- })).data;
2573
+ });
2574
+ return this.debug("getPagesCsv successfully retrieved CSV data"), o.data;
2182
2575
  }
2183
- async getPagesPopular(e, t, s) {
2184
- this.parsePageId(e);
2185
- const n = h(this.globals, s?.tld), a = p(this.globals, s?.auth);
2186
- return (await new g(n, a).get("/pages/popular", {
2576
+ async getPagesPopular(e, t) {
2577
+ this.debug("getPagesPopular called for page.");
2578
+ const s = p(this.globals, t?.tld), r = g(this.globals, t?.auth), o = await this.createRequests(s, r).get("/pages/popular", {
2187
2579
  params: {
2188
- ...t
2580
+ ...e
2189
2581
  }
2190
- })).data;
2582
+ });
2583
+ return this.debug("getPagesPopular successfully retrieved popular pages."), o.data;
2191
2584
  }
2192
- async postPageContents(e, t, s, n) {
2193
- const a = this.parsePageId(e), o = h(this.globals, n?.tld), i = p(this.globals, n?.auth);
2194
- return (await new g(o, i).post(
2195
- `/pages/${a}/contents`,
2585
+ async postPageContents(e, t, s, r) {
2586
+ this.debug("postPageContents called for page:", e);
2587
+ const n = this.parsePageId(e), o = p(this.globals, r?.tld), i = g(this.globals, r?.auth), d = await this.createRequests(o, i).post(
2588
+ `/pages/${n}/contents`,
2196
2589
  t ?? "",
2197
2590
  {
2198
2591
  headers: {
@@ -2202,81 +2595,89 @@ class Vs {
2202
2595
  ...s
2203
2596
  }
2204
2597
  }
2205
- )).data;
2598
+ );
2599
+ return this.debug("postPageContents successfully updated page:", e), d.data;
2206
2600
  }
2207
2601
  async putPageUnorder(e, t) {
2208
- const s = this.parsePageId(e), n = h(this.globals, t?.tld), a = p(this.globals, t?.auth);
2209
- return (await new g(n, a).put(
2602
+ this.debug("putPageUnorder called for page:", e);
2603
+ const s = this.parsePageId(e), r = p(this.globals, t?.tld), n = g(this.globals, t?.auth);
2604
+ return (await this.createRequests(r, n).put(
2210
2605
  `/pages/${s}/unorder`,
2211
2606
  ""
2212
2607
  )).data;
2213
2608
  }
2214
2609
  async delPageDelete(e, t, s) {
2215
- const n = this.parsePageId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2216
- return (await new g(a, o).del(
2217
- `/pages/${n}`,
2610
+ this.debug("delPageDelete called for page:", e);
2611
+ const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).del(
2612
+ `/pages/${r}`,
2218
2613
  {
2219
2614
  params: {
2220
2615
  ...t
2221
2616
  }
2222
2617
  }
2223
- )).data;
2618
+ );
2619
+ return this.debug("delPageDelete successfully deleted page:", e), l.data;
2224
2620
  }
2225
2621
  async delPageAllowed(e, t, s) {
2226
- const n = this.parsePageId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2227
- return (await new g(a, o).del(
2228
- `/pages/${n}/allowed`,
2622
+ this.debug("delPageAllowed called for page:", e);
2623
+ const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).del(
2624
+ `/pages/${r}/allowed`,
2229
2625
  {
2230
2626
  params: {
2231
2627
  ...t
2232
2628
  }
2233
2629
  }
2234
- )).data;
2630
+ );
2631
+ return this.debug("delPageAllowed successfully changed permissions for page:", e), l.data;
2235
2632
  }
2236
2633
  async postPageCopied(e, t, s) {
2237
- const n = this.parsePageId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2238
- return (await new g(a, o).post(
2239
- `/pages/${n}/copy`,
2634
+ this.debug("postPageCopied called for page:", e);
2635
+ const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).post(
2636
+ `/pages/${r}/copy`,
2240
2637
  "",
2241
2638
  {
2242
2639
  params: {
2243
2640
  ...t
2244
2641
  }
2245
2642
  }
2246
- )).data;
2643
+ );
2644
+ return this.debug("postPageCopied successfully copied page:", e), l.data;
2247
2645
  }
2248
2646
  async postPageExport(e, t) {
2249
- const s = this.parsePageId(e), n = h(this.globals, t?.tld), a = p(this.globals, t?.auth);
2250
- return (await new g(n, a).post(
2647
+ this.debug("postPageExport called for page:", e);
2648
+ const s = this.parsePageId(e), r = p(this.globals, t?.tld), n = g(this.globals, t?.auth), i = await this.createRequests(r, n).post(
2251
2649
  `/pages/${s}/export`,
2252
2650
  ""
2253
- )).data;
2651
+ );
2652
+ return this.debug("postPageExport successfully exported page:", e), i.data;
2254
2653
  }
2255
- async delPageFileName(e, t, s, n) {
2256
- const a = this.parsePageId(e), o = this.parseFileName(t), i = h(this.globals, n?.tld), l = p(this.globals, n?.auth);
2257
- return (await new g(i, l).del(
2258
- `/pages/${a}/files/${o}`,
2654
+ async delPageFileName(e, t, s, r) {
2655
+ this.debug("delPageFileName called for page:", e, "filename:", t);
2656
+ const n = this.parsePageId(e), o = this.parseFileName(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth), u = await this.createRequests(i, l).del(
2657
+ `/pages/${n}/files/${o}`,
2259
2658
  {
2260
2659
  params: {
2261
2660
  ...s
2262
2661
  }
2263
2662
  }
2264
- )).data;
2663
+ );
2664
+ return this.debug("delPageFileName successfully deleted file:", t, "from page:", e), u.data;
2265
2665
  }
2266
- async headPageFileName(e, t, s, n) {
2267
- const a = this.parsePageId(e), o = this.parseFileName(t), i = h(this.globals, n?.tld), l = p(this.globals, n?.auth);
2268
- return (await new g(i, l).head(
2269
- `/pages/${a}/files/${o}`,
2666
+ async headPageFileName(e, t, s, r) {
2667
+ this.debug("headPageFileName called for page:", e, "filename:", t);
2668
+ const n = this.parsePageId(e), o = this.parseFileName(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth), u = await this.createRequests(i, l).head(
2669
+ `/pages/${n}/files/${o}`,
2270
2670
  {
2271
2671
  params: {
2272
2672
  ...s
2273
2673
  }
2274
2674
  }
2275
- )).data;
2675
+ );
2676
+ return this.debug("headPageFileName successfully checked existence of file:", t, "on page:", e), u.data;
2276
2677
  }
2277
- async putPageFileName(e, t, s, n, a) {
2278
- const o = this.parsePageId(e), i = this.parseFileName(t), l = h(this.globals, a?.tld), d = p(this.globals, a?.auth);
2279
- return (await new g(l, d).put(
2678
+ async putPageFileName(e, t, s, r, n) {
2679
+ this.debug("putPageFileName called for page:", e, "filename:", t);
2680
+ const o = this.parsePageId(e), i = this.parseFileName(t), l = p(this.globals, n?.tld), d = g(this.globals, n?.auth), h = await this.createRequests(l, d).put(
2280
2681
  `/pages/${o}/files/${i}`,
2281
2682
  s,
2282
2683
  {
@@ -2284,84 +2685,91 @@ class Vs {
2284
2685
  "Content-Type": "application/octet-stream"
2285
2686
  },
2286
2687
  params: {
2287
- ...n
2688
+ ...r
2288
2689
  }
2289
2690
  }
2290
- )).data;
2691
+ );
2692
+ return this.debug("putPageFileName successfully uploaded file:", t, "to page:", e), h.data;
2291
2693
  }
2292
- async delPageFileNameDescription(e, t, s, n) {
2293
- const a = this.parsePageId(e), o = this.parseFileName(t), i = h(this.globals, n?.tld), l = p(this.globals, n?.auth);
2294
- return (await new g(i, l).del(
2295
- `/pages/${a}/files/${o}/description`,
2694
+ async delPageFileNameDescription(e, t, s, r) {
2695
+ this.debug("delPageFileNameDescription called for page:", e, "filename:", t);
2696
+ const n = this.parsePageId(e), o = this.parseFileName(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth), u = await this.createRequests(i, l).del(
2697
+ `/pages/${n}/files/${o}/description`,
2296
2698
  {
2297
2699
  params: {
2298
2700
  ...s
2299
2701
  }
2300
2702
  }
2301
- )).data;
2703
+ );
2704
+ return this.debug("delPageFileNameDescription successfully deleted description for file:", t, "on page:", e), u.data;
2302
2705
  }
2303
- async putPageFileNameDescription(e, t, s, n) {
2304
- const a = this.parsePageId(e), o = this.parseFileName(t), i = h(this.globals, n?.tld), l = p(this.globals, n?.auth);
2305
- return (await new g(i, l).put(
2306
- `/pages/${a}/files/${o}/description`,
2706
+ async putPageFileNameDescription(e, t, s, r) {
2707
+ this.debug("putPageFileNameDescription called for page:", e, "filename:", t);
2708
+ const n = this.parsePageId(e), o = this.parseFileName(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth), u = await this.createRequests(i, l).put(
2709
+ `/pages/${n}/files/${o}/description`,
2307
2710
  {
2308
2711
  params: {
2309
2712
  ...s
2310
2713
  }
2311
2714
  }
2312
- )).data;
2715
+ );
2716
+ return this.debug("putPageFileNameDescription successfully updated description for file:", t, "on page:", e), u.data;
2313
2717
  }
2314
- async putPageFileNamePropertiesKey(e, t, s, n, a) {
2315
- const o = this.parsePageId(e), i = this.parseFileName(t), l = this.parseKey(s), d = h(this.globals, a?.tld), u = p(this.globals, a?.auth);
2316
- return (await new g(d, u).put(
2718
+ async putPageFileNamePropertiesKey(e, t, s, r, n) {
2719
+ this.debug("putPageFileNamePropertiesKey called for page:", e, "filename:", t, "key:", s);
2720
+ const o = this.parsePageId(e), i = this.parseFileName(t), l = this.parseKey(s), d = p(this.globals, n?.tld), u = g(this.globals, n?.auth), m = await this.createRequests(d, u).put(
2317
2721
  `/pages/${o}/files/${i}/properties/${l}`,
2318
2722
  "",
2319
2723
  {
2320
2724
  params: {
2321
- ...n
2725
+ ...r
2322
2726
  }
2323
2727
  }
2324
- )).data;
2728
+ );
2729
+ return this.debug("putPageFileNamePropertiesKey successfully updated property key:", s, "for file:", t, "on page:", e), m.data;
2325
2730
  }
2326
2731
  async putPageImport(e, t, s) {
2327
- const n = this.parsePageId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2328
- return (await new g(a, o).put(
2329
- `/pages/${n}/import`,
2732
+ this.debug("putPageImport called for page:", e);
2733
+ const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).put(
2734
+ `/pages/${r}/import`,
2330
2735
  "",
2331
2736
  {
2332
2737
  params: {
2333
2738
  ...t
2334
2739
  }
2335
2740
  }
2336
- )).data;
2741
+ );
2742
+ return this.debug("putPageImport successfully imported content to page:", e), l.data;
2337
2743
  }
2338
2744
  async putPageMove(e, t, s) {
2339
- const n = this.parsePageId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2340
- return (await new g(a, o).put(
2341
- `/pages/${n}/move`,
2745
+ this.debug("putPageMove called for page:", e, "to:", t?.to);
2746
+ const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).put(
2747
+ `/pages/${r}/move`,
2342
2748
  "",
2343
2749
  {
2344
2750
  params: {
2345
2751
  ...t
2346
2752
  }
2347
2753
  }
2348
- )).data;
2754
+ );
2755
+ return this.debug("putPageMove successfully moved page:", e), l.data;
2349
2756
  }
2350
2757
  async putPageOrder(e, t, s) {
2351
- const n = this.parsePageId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2352
- return (await new g(a, o).put(
2353
- `/pages/${n}/order`,
2758
+ this.debug("putPageOrder called for page:", e);
2759
+ const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).put(
2760
+ `/pages/${r}/order`,
2354
2761
  "",
2355
2762
  {
2356
2763
  params: {
2357
2764
  ...t
2358
2765
  }
2359
2766
  }
2360
- )).data;
2767
+ );
2768
+ return this.debug("putPageOrder successfully updated order for page:", e), l.data;
2361
2769
  }
2362
- async postPageProperties(e, t, s, n, a) {
2363
- const o = this.parsePageId(e), i = h(this.globals, a?.tld), l = p(this.globals, a?.auth);
2364
- return (await new g(i, l).post(
2770
+ async postPageProperties(e, t, s, r, n) {
2771
+ this.debug("postPageProperties called for page:", e, "property:", t);
2772
+ const o = this.parsePageId(e), i = p(this.globals, n?.tld), l = g(this.globals, n?.auth), u = await this.createRequests(i, l).post(
2365
2773
  `/pages/${o}/properties`,
2366
2774
  s,
2367
2775
  {
@@ -2369,14 +2777,15 @@ class Vs {
2369
2777
  Slug: t
2370
2778
  },
2371
2779
  params: {
2372
- ...n
2780
+ ...r
2373
2781
  }
2374
2782
  }
2375
- )).data;
2783
+ );
2784
+ return this.debug("postPageProperties successfully created property:", t, "for page:", e), u.data;
2376
2785
  }
2377
- async putPageProperties(e, t, s, n, a) {
2378
- const o = this.parsePageId(e), i = h(this.globals, a?.tld), l = p(this.globals, a?.auth);
2379
- return (await new g(i, l).put(
2786
+ async putPageProperties(e, t, s, r, n) {
2787
+ this.debug("putPageProperties called for page:", e, "property:", t);
2788
+ const o = this.parsePageId(e), i = p(this.globals, n?.tld), l = g(this.globals, n?.auth), u = await this.createRequests(i, l).put(
2380
2789
  `/pages/${o}/properties`,
2381
2790
  s,
2382
2791
  {
@@ -2384,107 +2793,116 @@ class Vs {
2384
2793
  Slug: t
2385
2794
  },
2386
2795
  params: {
2387
- ...n
2796
+ ...r
2388
2797
  }
2389
2798
  }
2390
- )).data;
2799
+ );
2800
+ return this.debug("putPageProperties successfully updated property:", t, "for page:", e), u.data;
2391
2801
  }
2392
- async deletePagePropertiesKey(e, t, s, n) {
2393
- const a = this.parsePageId(e), o = this.parseKey(t), i = h(this.globals, n?.tld), l = p(this.globals, n?.auth);
2394
- return (await new g(i, l).del(
2395
- `/pages/${a}/properties/${o}`,
2802
+ async deletePagePropertiesKey(e, t, s, r) {
2803
+ this.debug("deletePagePropertiesKey called for page:", e, "key:", t);
2804
+ const n = this.parsePageId(e), o = this.parseKey(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth), u = await this.createRequests(i, l).del(
2805
+ `/pages/${n}/properties/${o}`,
2396
2806
  {
2397
2807
  params: {
2398
2808
  ...s
2399
2809
  }
2400
2810
  }
2401
- )).data;
2811
+ );
2812
+ return this.debug("deletePagePropertiesKey successfully deleted property key:", t, "for page:", e), u.data;
2402
2813
  }
2403
- async putPagePropertiesKey(e, t, s, n) {
2404
- const a = this.parsePageId(e), o = this.parseKey(t), i = h(this.globals, n?.tld), l = p(this.globals, n?.auth);
2405
- return (await new g(i, l).put(
2406
- `/pages/${a}/properties/${o}`,
2814
+ async putPagePropertiesKey(e, t, s, r) {
2815
+ this.debug("putPagePropertiesKey called for page:", e, "key:", t);
2816
+ const n = this.parsePageId(e), o = this.parseKey(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth), u = await this.createRequests(i, l).put(
2817
+ `/pages/${n}/properties/${o}`,
2407
2818
  "",
2408
2819
  {
2409
2820
  params: {
2410
2821
  ...s
2411
2822
  }
2412
2823
  }
2413
- )).data;
2824
+ );
2825
+ return this.debug("putPagePropertiesKey successfully updated property key:", t, "for page:", e), u.data;
2414
2826
  }
2415
2827
  async postPageRatings(e, t, s) {
2416
- const n = this.parsePageId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2417
- return (await new g(a, o).post(
2418
- `/pages/${n}/ratings`,
2828
+ this.debug("postPageRatings called for page:", e);
2829
+ const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).post(
2830
+ `/pages/${r}/ratings`,
2419
2831
  "",
2420
2832
  {
2421
2833
  params: {
2422
2834
  ...t
2423
2835
  }
2424
2836
  }
2425
- )).data;
2837
+ );
2838
+ return this.debug("postPageRatings successfully submitted rating for page:", e), l.data;
2426
2839
  }
2427
2840
  async postPageRevert(e, t, s) {
2428
- const n = this.parsePageId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2429
- return (await new g(a, o).post(
2430
- `/pages/${n}/revert`,
2841
+ this.debug("postPageRevert called for page:", e);
2842
+ const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).post(
2843
+ `/pages/${r}/revert`,
2431
2844
  "",
2432
2845
  {
2433
2846
  params: {
2434
2847
  ...t
2435
2848
  }
2436
2849
  }
2437
- )).data;
2850
+ );
2851
+ return this.debug("postPageRevert successfully reverted page:", e), l.data;
2438
2852
  }
2439
2853
  async deletePageSecurity(e, t, s) {
2440
- const n = this.parsePageId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2441
- return (await new g(a, o).del(
2442
- `/pages/${n}/security`,
2854
+ this.debug("deletePageSecurity called for page:", e);
2855
+ const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).del(
2856
+ `/pages/${r}/security`,
2443
2857
  {
2444
2858
  params: {
2445
2859
  ...t
2446
2860
  }
2447
2861
  }
2448
- )).data;
2862
+ );
2863
+ return this.debug("deletePageSecurity successfully deleted security settings for page:", e), l.data;
2449
2864
  }
2450
- async postPageSecurity(e, t, s, n) {
2451
- const a = this.parsePageId(e), o = h(this.globals, n?.tld), i = p(this.globals, n?.auth);
2452
- return (await new g(o, i).post(
2453
- `/pages/${a}/security`,
2865
+ async postPageSecurity(e, t, s, r) {
2866
+ this.debug("postPageSecurity called for page:", e);
2867
+ const n = this.parsePageId(e), o = p(this.globals, r?.tld), i = g(this.globals, r?.auth), d = await this.createRequests(o, i).post(
2868
+ `/pages/${n}/security`,
2454
2869
  t,
2455
2870
  {
2456
2871
  params: {
2457
2872
  ...s
2458
2873
  }
2459
2874
  }
2460
- )).data;
2875
+ );
2876
+ return this.debug("postPageSecurity successfully created security settings for page:", e), d.data;
2461
2877
  }
2462
- async putPageSecurity(e, t, s, n) {
2463
- const a = this.parsePageId(e), o = h(this.globals, n?.tld), i = p(this.globals, n?.auth);
2464
- return (await new g(o, i).put(
2465
- `/pages/${a}/security`,
2878
+ async putPageSecurity(e, t, s, r) {
2879
+ this.debug("putPageSecurity called for page:", e);
2880
+ const n = this.parsePageId(e), o = p(this.globals, r?.tld), i = g(this.globals, r?.auth), d = await this.createRequests(o, i).put(
2881
+ `/pages/${n}/security`,
2466
2882
  t,
2467
2883
  {
2468
2884
  params: {
2469
2885
  ...s
2470
2886
  }
2471
2887
  }
2472
- )).data;
2888
+ );
2889
+ return this.debug("putPageSecurity successfully updated security settings for page:", e), d.data;
2473
2890
  }
2474
- async putPageTags(e, t, s, n) {
2475
- const a = this.parsePageId(e), o = h(this.globals, n?.tld), i = p(this.globals, n?.auth);
2476
- return (await new g(o, i).put(
2477
- `/pages/${a}/tags`,
2891
+ async putPageTags(e, t, s, r) {
2892
+ this.debug("putPageTags called for page:", e);
2893
+ const n = this.parsePageId(e), o = p(this.globals, r?.tld), i = g(this.globals, r?.auth), d = await this.createRequests(o, i).put(
2894
+ `/pages/${n}/tags`,
2478
2895
  t,
2479
2896
  {
2480
2897
  params: {
2481
2898
  ...s
2482
2899
  }
2483
2900
  }
2484
- )).data;
2901
+ );
2902
+ return this.debug("putPageTags successfully updated tags for page:", e), d.data;
2485
2903
  }
2486
2904
  }
2487
- class Gs {
2905
+ class lr {
2488
2906
  globals;
2489
2907
  _auth;
2490
2908
  constructor(e, t) {
@@ -2494,31 +2912,31 @@ class Gs {
2494
2912
  return typeof e == "number" ? e.toString() : `=${encodeURIComponent(e)}`;
2495
2913
  }
2496
2914
  async getGroups(e, t) {
2497
- const s = h(this.globals, t?.tld), n = p(this.globals, t?.auth);
2498
- return (await new g(s, n).get("/groups", {
2915
+ const s = p(this.globals, t?.tld), r = g(this.globals, t?.auth);
2916
+ return (await new w(s, r).get("/groups", {
2499
2917
  params: {
2500
2918
  ...e
2501
2919
  }
2502
2920
  })).data;
2503
2921
  }
2504
2922
  async getGroup(e, t, s) {
2505
- const n = this.parseGroupId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2506
- return (await new g(a, o).get(`/groups/${n}`, {
2923
+ const r = this.parseGroupId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
2924
+ return (await new w(n, o).get(`/groups/${r}`, {
2507
2925
  params: {
2508
2926
  ...t
2509
2927
  }
2510
2928
  })).data;
2511
2929
  }
2512
2930
  async getGroupUser(e, t, s) {
2513
- const n = this.parseGroupId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2514
- return (await new g(a, o).get(`/groups/${n}/users`, {
2931
+ const r = this.parseGroupId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
2932
+ return (await new w(n, o).get(`/groups/${r}/users`, {
2515
2933
  params: {
2516
2934
  ...t
2517
2935
  }
2518
2936
  })).data;
2519
2937
  }
2520
2938
  }
2521
- class Xs {
2939
+ class ur {
2522
2940
  globals;
2523
2941
  _auth;
2524
2942
  constructor(e, t) {
@@ -2531,55 +2949,55 @@ class Xs {
2531
2949
  return typeof e == "number" ? e.toString() : `=${encodeURIComponent(encodeURIComponent(e))}`;
2532
2950
  }
2533
2951
  async getPageHierarchyById(e, t, s) {
2534
- const n = this.parsePageId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2535
- return (await new g(a, o).get(`events/page-hierarchy/${n}`, {
2952
+ const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
2953
+ return (await new w(n, o).get(`events/page-hierarchy/${r}`, {
2536
2954
  params: {
2537
2955
  ...t
2538
2956
  }
2539
2957
  })).data;
2540
2958
  }
2541
- async getPageHierarchyDetailById(e, t, s, n) {
2542
- const a = this.parsePageId(e), o = h(this.globals, n?.tld), i = p(this.globals, n?.auth);
2543
- return (await new g(o, i).get(`events/page-hierarchy/${a}/${t}`, {
2959
+ async getPageHierarchyDetailById(e, t, s, r) {
2960
+ const n = this.parsePageId(e), o = p(this.globals, r?.tld), i = g(this.globals, r?.auth);
2961
+ return (await new w(o, i).get(`events/page-hierarchy/${n}/${t}`, {
2544
2962
  params: {
2545
2963
  ...s
2546
2964
  }
2547
2965
  })).data;
2548
2966
  }
2549
2967
  async getEventPage(e, t, s) {
2550
- const n = this.parsePageId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2551
- return (await new g(a, o).get(`events/page/${n}`, {
2968
+ const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
2969
+ return (await new w(n, o).get(`events/page/${r}`, {
2552
2970
  params: {
2553
2971
  ...t
2554
2972
  }
2555
2973
  })).data;
2556
2974
  }
2557
- async getEventPageDetail(e, t, s, n) {
2558
- const a = this.parsePageId(e), o = h(this.globals, n?.tld), i = p(this.globals, n?.auth);
2559
- return (await new g(o, i).get(`/events/page/${a}/${t}`, {
2975
+ async getEventPageDetail(e, t, s, r) {
2976
+ const n = this.parsePageId(e), o = p(this.globals, r?.tld), i = g(this.globals, r?.auth);
2977
+ return (await new w(o, i).get(`/events/page/${n}/${t}`, {
2560
2978
  params: {
2561
2979
  ...s
2562
2980
  }
2563
2981
  })).data;
2564
2982
  }
2565
2983
  async getEventUserPage(e, t, s) {
2566
- const n = h(this.globals, s?.tld), a = p(this.globals, s?.auth);
2567
- return (await new g(n, a).get(`/events/user-page/${this.parseUserId(e)}`, {
2984
+ const r = p(this.globals, s?.tld), n = g(this.globals, s?.auth);
2985
+ return (await new w(r, n).get(`/events/user-page/${this.parseUserId(e)}`, {
2568
2986
  params: {
2569
2987
  ...t
2570
2988
  }
2571
2989
  })).data;
2572
2990
  }
2573
- async getEventUserDetailPage(e, t, s, n) {
2574
- const a = h(this.globals, n?.tld), o = p(this.globals, n?.auth);
2575
- return (await new g(a, o).get(`/events/user-page/${this.parseUserId(e)}/${t}`, {
2991
+ async getEventUserDetailPage(e, t, s, r) {
2992
+ const n = p(this.globals, r?.tld), o = g(this.globals, r?.auth);
2993
+ return (await new w(n, o).get(`/events/user-page/${this.parseUserId(e)}/${t}`, {
2576
2994
  params: {
2577
2995
  ...s
2578
2996
  }
2579
2997
  })).data;
2580
2998
  }
2581
2999
  }
2582
- class Qs {
3000
+ class cr {
2583
3001
  globals;
2584
3002
  _auth;
2585
3003
  constructor(e, t) {
@@ -2589,33 +3007,33 @@ class Qs {
2589
3007
  return `=${encodeURIComponent(encodeURIComponent(e))}`;
2590
3008
  }
2591
3009
  async getArchive(e, t) {
2592
- const s = h(this.globals, t?.tld), n = p(this.globals, t?.auth);
2593
- return (await new g(s, n).get("/archive", {
3010
+ const s = p(this.globals, t?.tld), r = g(this.globals, t?.auth);
3011
+ return (await new w(s, r).get("/archive", {
2594
3012
  params: {
2595
3013
  ...e
2596
3014
  }
2597
3015
  })).data;
2598
3016
  }
2599
3017
  async getArchiveFiles(e, t) {
2600
- const s = h(this.globals, t?.tld), n = p(this.globals, t?.auth);
2601
- return (await new g(s, n).get("/archive/files", {
3018
+ const s = p(this.globals, t?.tld), r = g(this.globals, t?.auth);
3019
+ return (await new w(s, r).get("/archive/files", {
2602
3020
  params: {
2603
3021
  ...e
2604
3022
  }
2605
3023
  })).data;
2606
3024
  }
2607
3025
  async getArchiveFile(e, t, s) {
2608
- const n = h(this.globals, s?.tld), a = p(this.globals, s?.auth);
2609
- return (await new g(n, a).get(`/archive/files/${e}`, {
3026
+ const r = p(this.globals, s?.tld), n = g(this.globals, s?.auth);
3027
+ return (await new w(r, n).get(`/archive/files/${e}`, {
2610
3028
  params: {
2611
3029
  ...t
2612
3030
  },
2613
3031
  responseType: "stream"
2614
3032
  })).data;
2615
3033
  }
2616
- async getArchiveFileByName(e, t, s, n) {
2617
- const a = h(this.globals, n?.tld), o = this.parseFileName(t), i = p(this.globals, n?.auth);
2618
- return (await new g(a, i).get(`/archive/files/${e}/${o}`, {
3034
+ async getArchiveFileByName(e, t, s, r) {
3035
+ const n = p(this.globals, r?.tld), o = this.parseFileName(t), i = g(this.globals, r?.auth);
3036
+ return (await new w(n, i).get(`/archive/files/${e}/${o}`, {
2619
3037
  params: {
2620
3038
  ...s
2621
3039
  },
@@ -2623,55 +3041,55 @@ class Qs {
2623
3041
  })).data;
2624
3042
  }
2625
3043
  async getArchiveFileInfo(e, t, s) {
2626
- const n = h(this.globals, s?.tld), a = p(this.globals, s?.auth);
2627
- return (await new g(n, a).get(`/archive/files/${e}/info`, {
3044
+ const r = p(this.globals, s?.tld), n = g(this.globals, s?.auth);
3045
+ return (await new w(r, n).get(`/archive/files/${e}/info`, {
2628
3046
  params: {
2629
3047
  ...t
2630
3048
  }
2631
3049
  })).data;
2632
3050
  }
2633
3051
  async getArchivePages(e, t) {
2634
- const s = h(this.globals, t?.tld), n = p(this.globals, t?.auth);
2635
- return (await new g(s, n).get("/archive/pages", {
3052
+ const s = p(this.globals, t?.tld), r = g(this.globals, t?.auth);
3053
+ return (await new w(s, r).get("/archive/pages", {
2636
3054
  params: {
2637
3055
  ...e
2638
3056
  }
2639
3057
  })).data;
2640
3058
  }
2641
3059
  async getArchivePage(e, t, s) {
2642
- const n = h(this.globals, s?.tld), a = p(this.globals, s?.auth);
2643
- return (await new g(n, a).get(`/archive/page/${e}`, {
3060
+ const r = p(this.globals, s?.tld), n = g(this.globals, s?.auth);
3061
+ return (await new w(r, n).get(`/archive/page/${e}`, {
2644
3062
  params: {
2645
3063
  ...t
2646
3064
  }
2647
3065
  })).data;
2648
3066
  }
2649
3067
  async getArchivePageContents(e, t, s) {
2650
- const n = h(this.globals, s?.tld), a = p(this.globals, s?.auth);
2651
- return (await new g(n, a).get(`/archive/page/${e}/contents`, {
3068
+ const r = p(this.globals, s?.tld), n = g(this.globals, s?.auth);
3069
+ return (await new w(r, n).get(`/archive/page/${e}/contents`, {
2652
3070
  params: {
2653
3071
  ...t
2654
3072
  }
2655
3073
  })).data;
2656
3074
  }
2657
3075
  async getArchivePageInfo(e, t, s) {
2658
- const n = h(this.globals, s?.tld), a = p(this.globals, s?.auth);
2659
- return (await new g(n, a).get(`/archive/page/${e}/info`, {
3076
+ const r = p(this.globals, s?.tld), n = g(this.globals, s?.auth);
3077
+ return (await new w(r, n).get(`/archive/page/${e}/info`, {
2660
3078
  params: {
2661
3079
  ...t
2662
3080
  }
2663
3081
  })).data;
2664
3082
  }
2665
3083
  async getArchivePageSubPages(e, t, s) {
2666
- const n = h(this.globals, s?.tld), a = p(this.globals, s?.auth);
2667
- return (await new g(n, a).get(`/archive/page/${e}/subpages`, {
3084
+ const r = p(this.globals, s?.tld), n = g(this.globals, s?.auth);
3085
+ return (await new w(r, n).get(`/archive/page/${e}/subpages`, {
2668
3086
  params: {
2669
3087
  ...t
2670
3088
  }
2671
3089
  })).data;
2672
3090
  }
2673
3091
  }
2674
- class Zs {
3092
+ class dr {
2675
3093
  globals;
2676
3094
  _auth;
2677
3095
  constructor(e, t) {
@@ -2684,25 +3102,25 @@ class Zs {
2684
3102
  return encodeURIComponent(encodeURIComponent(e));
2685
3103
  }
2686
3104
  async getSiteActivity(e, t) {
2687
- const s = h(this.globals, t?.tld), n = p(this.globals, t?.auth);
2688
- return (await new g(s, n).get("/site/activity", {
3105
+ const s = p(this.globals, t?.tld), r = g(this.globals, t?.auth);
3106
+ return (await new w(s, r).get("/site/activity", {
2689
3107
  params: {
2690
3108
  ...e
2691
3109
  }
2692
3110
  })).data;
2693
3111
  }
2694
3112
  async getSiteExportGroups(e) {
2695
- const t = h(this.globals, e?.tld), s = p(this.globals, e?.auth);
2696
- return (await new g(t, s).get("/site/export/groups")).data;
3113
+ const t = p(this.globals, e?.tld), s = g(this.globals, e?.auth);
3114
+ return (await new w(t, s).get("/site/export/groups")).data;
2697
3115
  }
2698
3116
  async getSiteExportUsers(e) {
2699
- const t = h(this.globals, e?.tld), s = p(this.globals, e?.auth);
2700
- return (await new g(t, s).get("/site/export/users")).data;
3117
+ const t = p(this.globals, e?.tld), s = g(this.globals, e?.auth);
3118
+ return (await new w(t, s).get("/site/export/users")).data;
2701
3119
  }
2702
3120
  async getSiteSubPagesTags(e, t, s) {
2703
- const n = this.parsePageId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2704
- return (await new g(a, o).get(
2705
- `/site/nav/${n}/children`,
3121
+ const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
3122
+ return (await new w(n, o).get(
3123
+ `/site/nav/${r}/children`,
2706
3124
  {
2707
3125
  params: {
2708
3126
  ...t
@@ -2711,9 +3129,9 @@ class Zs {
2711
3129
  )).data;
2712
3130
  }
2713
3131
  async getSiteFullNavTreeTags(e, t, s) {
2714
- const n = this.parsePageId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2715
- return (await new g(a, o).get(
2716
- `/site/nav/${n}/full`,
3132
+ const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
3133
+ return (await new w(n, o).get(
3134
+ `/site/nav/${r}/full`,
2717
3135
  {
2718
3136
  params: {
2719
3137
  ...t
@@ -2722,8 +3140,8 @@ class Zs {
2722
3140
  )).data;
2723
3141
  }
2724
3142
  async getSiteOperations(e, t) {
2725
- const s = h(this.globals, t?.tld), n = p(this.globals, t?.auth);
2726
- return (await new g(s, n).get(
3143
+ const s = p(this.globals, t?.tld), r = g(this.globals, t?.auth);
3144
+ return (await new w(s, r).get(
2727
3145
  "/site/operations",
2728
3146
  {
2729
3147
  params: {
@@ -2733,8 +3151,8 @@ class Zs {
2733
3151
  )).data;
2734
3152
  }
2735
3153
  async getSiteProperties(e, t) {
2736
- const s = h(this.globals, t?.tld), n = p(this.globals, t?.auth);
2737
- return (await new g(s, n).get(
3154
+ const s = p(this.globals, t?.tld), r = g(this.globals, t?.auth);
3155
+ return (await new w(s, r).get(
2738
3156
  "/site/properties",
2739
3157
  {
2740
3158
  params: {
@@ -2744,9 +3162,9 @@ class Zs {
2744
3162
  )).data;
2745
3163
  }
2746
3164
  async GetSiteKeyProperties(e, t, s) {
2747
- const n = this.parseKey(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2748
- return (await new g(a, o).get(
2749
- `/site/properties/${n}`,
3165
+ const r = this.parseKey(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
3166
+ return (await new w(n, o).get(
3167
+ `/site/properties/${r}`,
2750
3168
  {
2751
3169
  params: {
2752
3170
  ...t
@@ -2755,9 +3173,9 @@ class Zs {
2755
3173
  )).data;
2756
3174
  }
2757
3175
  async GetSiteKeyPropertiesInfo(e, t, s) {
2758
- const n = this.parseKey(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2759
- return (await new g(a, o).get(
2760
- `/site/properties/${n}/info`,
3176
+ const r = this.parseKey(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
3177
+ return (await new w(n, o).get(
3178
+ `/site/properties/${r}/info`,
2761
3179
  {
2762
3180
  params: {
2763
3181
  ...t
@@ -2766,8 +3184,8 @@ class Zs {
2766
3184
  )).data;
2767
3185
  }
2768
3186
  async GetSiteQuery(e, t) {
2769
- const s = h(this.globals, t?.tld), n = p(this.globals, t?.auth);
2770
- return (await new g(s, n).get(
3187
+ const s = p(this.globals, t?.tld), r = g(this.globals, t?.auth);
3188
+ return (await new w(s, r).get(
2771
3189
  "/site/query",
2772
3190
  {
2773
3191
  params: {
@@ -2777,14 +3195,14 @@ class Zs {
2777
3195
  )).data;
2778
3196
  }
2779
3197
  async GetSiteStatus(e) {
2780
- const t = h(this.globals, e?.tld), s = p(this.globals, e?.auth);
2781
- return (await new g(t, s).get(
3198
+ const t = p(this.globals, e?.tld), s = g(this.globals, e?.auth);
3199
+ return (await new w(t, s).get(
2782
3200
  "/site/status"
2783
3201
  )).data;
2784
3202
  }
2785
3203
  async GetSiteTags(e, t) {
2786
- const s = h(this.globals, t?.tld), n = p(this.globals, t?.auth);
2787
- return (await new g(s, n).get(
3204
+ const s = p(this.globals, t?.tld), r = g(this.globals, t?.auth);
3205
+ return (await new w(s, r).get(
2788
3206
  "/site/tags",
2789
3207
  {
2790
3208
  params: {
@@ -2794,8 +3212,8 @@ class Zs {
2794
3212
  )).data;
2795
3213
  }
2796
3214
  async GetSiteTag(e, t) {
2797
- const s = h(this.globals, t?.tld), n = p(this.globals, t?.auth);
2798
- return (await new g(s, n).get(
3215
+ const s = p(this.globals, t?.tld), r = g(this.globals, t?.auth);
3216
+ return (await new w(s, r).get(
2799
3217
  "/site/tag",
2800
3218
  {
2801
3219
  params: {
@@ -2805,7 +3223,7 @@ class Zs {
2805
3223
  )).data;
2806
3224
  }
2807
3225
  }
2808
- class Ys {
3226
+ class hr {
2809
3227
  globals;
2810
3228
  _auth;
2811
3229
  constructor(e, t) {
@@ -2815,23 +3233,23 @@ class Ys {
2815
3233
  return `=${encodeURIComponent(encodeURIComponent(e))}`;
2816
3234
  }
2817
3235
  async getContextMaps(e, t) {
2818
- const s = h(this.globals, t?.tld), n = p(this.globals, t?.auth);
2819
- return (await new g(s, n).get("/contextmaps", {
3236
+ const s = p(this.globals, t?.tld), r = g(this.globals, t?.auth);
3237
+ return (await new w(s, r).get("/contextmaps", {
2820
3238
  params: {
2821
3239
  ...e
2822
3240
  }
2823
3241
  })).data;
2824
3242
  }
2825
- async getContextMapsById(e, t, s, n) {
2826
- const a = h(this.globals, n?.tld), o = p(this.globals, n?.auth);
2827
- return (await new g(a, o).get(`/contextmaps/${e}/${t}`, {
3243
+ async getContextMapsById(e, t, s, r) {
3244
+ const n = p(this.globals, r?.tld), o = g(this.globals, r?.auth);
3245
+ return (await new w(n, o).get(`/contextmaps/${e}/${t}`, {
2828
3246
  params: {
2829
3247
  ...s
2830
3248
  }
2831
3249
  })).data;
2832
3250
  }
2833
3251
  }
2834
- class en {
3252
+ class pr {
2835
3253
  globals;
2836
3254
  _auth;
2837
3255
  constructor(e, t) {
@@ -2844,63 +3262,63 @@ class en {
2844
3262
  return encodeURIComponent(encodeURIComponent(e));
2845
3263
  }
2846
3264
  async getUsers(e, t) {
2847
- const s = h(this.globals, t?.tld), n = p(this.globals, t?.auth);
2848
- return (await new g(s, n).get("/users", {
3265
+ const s = p(this.globals, t?.tld), r = g(this.globals, t?.auth);
3266
+ return (await new w(s, r).get("/users", {
2849
3267
  params: {
2850
3268
  ...e
2851
3269
  }
2852
3270
  })).data;
2853
3271
  }
2854
3272
  async getUser(e, t, s) {
2855
- const n = this.parseUserId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2856
- return (await new g(a, o).get(`/users/${n}`, {
3273
+ const r = this.parseUserId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
3274
+ return (await new w(n, o).get(`/users/${r}`, {
2857
3275
  params: {
2858
3276
  ...t
2859
3277
  }
2860
3278
  })).data;
2861
3279
  }
2862
3280
  async getUserMetrics(e, t, s) {
2863
- const n = this.parseUserId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2864
- return (await new g(a, o).get(`/users/${n}/metrics`, {
3281
+ const r = this.parseUserId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
3282
+ return (await new w(n, o).get(`/users/${r}/metrics`, {
2865
3283
  params: {
2866
3284
  ...t
2867
3285
  }
2868
3286
  })).data;
2869
3287
  }
2870
3288
  async getUserProperties(e, t, s) {
2871
- const n = this.parseUserId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2872
- return (await new g(a, o).get(`/users/${n}/properties`, {
3289
+ const r = this.parseUserId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
3290
+ return (await new w(n, o).get(`/users/${r}/properties`, {
2873
3291
  params: {
2874
3292
  ...t
2875
3293
  }
2876
3294
  })).data;
2877
3295
  }
2878
- async getUserPropertiesKey(e, t, s, n) {
2879
- const a = this.parseUserId(e), o = this.parseKey(t), i = h(this.globals, n?.tld), l = p(this.globals, n?.auth);
2880
- return (await new g(i, l).get(`/users/${a}/properties/${o}`, {
3296
+ async getUserPropertiesKey(e, t, s, r) {
3297
+ const n = this.parseUserId(e), o = this.parseKey(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth);
3298
+ return (await new w(i, l).get(`/users/${n}/properties/${o}`, {
2881
3299
  params: {
2882
3300
  ...s
2883
3301
  }
2884
3302
  })).data;
2885
3303
  }
2886
- async getUserPropertiesKeyInfo(e, t, s, n) {
2887
- const a = this.parseUserId(e), o = this.parseKey(t), i = h(this.globals, n?.tld), l = p(this.globals, n?.auth);
2888
- return (await new g(i, l).get(`/users/${a}/properties/${o}/info`, {
3304
+ async getUserPropertiesKeyInfo(e, t, s, r) {
3305
+ const n = this.parseUserId(e), o = this.parseKey(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth);
3306
+ return (await new w(i, l).get(`/users/${n}/properties/${o}/info`, {
2889
3307
  params: {
2890
3308
  ...s
2891
3309
  }
2892
3310
  })).data;
2893
3311
  }
2894
3312
  async getUsersSearch(e, t) {
2895
- const s = h(this.globals, t?.tld), n = p(this.globals, t?.auth);
2896
- return (await new g(s, n).get("/users/search", {
3313
+ const s = p(this.globals, t?.tld), r = g(this.globals, t?.auth);
3314
+ return (await new w(s, r).get("/users/search", {
2897
3315
  params: {
2898
3316
  ...e
2899
3317
  }
2900
3318
  })).data;
2901
3319
  }
2902
3320
  }
2903
- class tn {
3321
+ class gr {
2904
3322
  globals;
2905
3323
  _auth;
2906
3324
  constructor(e, t) {
@@ -2916,17 +3334,17 @@ class tn {
2916
3334
  return encodeURIComponent(encodeURIComponent(e));
2917
3335
  }
2918
3336
  async getFile(e, t, s) {
2919
- const n = this.parseFileId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2920
- return (await new g(a, o).get(`files/${n}`, {
3337
+ const r = this.parseFileId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
3338
+ return (await new w(n, o).get(`files/${r}`, {
2921
3339
  params: {
2922
3340
  ...t
2923
3341
  },
2924
3342
  responseType: "stream"
2925
3343
  })).data;
2926
3344
  }
2927
- async getFileName(e, t, s, n) {
2928
- const a = this.parseFileId(e), o = this.parseFileName(t), i = h(this.globals, n?.tld), l = p(this.globals, n?.auth);
2929
- return (await new g(i, l).get(`files/${a}/${o}`, {
3345
+ async getFileName(e, t, s, r) {
3346
+ const n = this.parseFileId(e), o = this.parseFileName(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth);
3347
+ return (await new w(i, l).get(`files/${n}/${o}`, {
2930
3348
  params: {
2931
3349
  ...s
2932
3350
  },
@@ -2934,8 +3352,8 @@ class tn {
2934
3352
  })).data;
2935
3353
  }
2936
3354
  async getFileDescription(e, t, s) {
2937
- const n = this.parseFileId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2938
- return (await new g(a, o).get(`files/${n}/description`, {
3355
+ const r = this.parseFileId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
3356
+ return (await new w(n, o).get(`files/${r}/description`, {
2939
3357
  params: {
2940
3358
  ...t
2941
3359
  },
@@ -2943,41 +3361,41 @@ class tn {
2943
3361
  })).data;
2944
3362
  }
2945
3363
  async getFileInfo(e, t, s) {
2946
- const n = this.parseFileId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2947
- return (await new g(a, o).get(`files/${n}/info`, {
3364
+ const r = this.parseFileId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
3365
+ return (await new w(n, o).get(`files/${r}/info`, {
2948
3366
  params: {
2949
3367
  ...t
2950
3368
  }
2951
3369
  })).data;
2952
3370
  }
2953
3371
  async getFileRevisions(e, t, s) {
2954
- const n = this.parseFileId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2955
- return (await new g(a, o).get(`files/${n}/revisions`, {
3372
+ const r = this.parseFileId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
3373
+ return (await new w(n, o).get(`files/${r}/revisions`, {
2956
3374
  params: {
2957
3375
  ...t
2958
3376
  }
2959
3377
  })).data;
2960
3378
  }
2961
3379
  async deleteFile(e, t, s) {
2962
- const n = this.parseFileId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2963
- return (await new g(a, o).del(`files/${n}`, {
3380
+ const r = this.parseFileId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
3381
+ return (await new w(n, o).del(`files/${r}`, {
2964
3382
  params: {
2965
3383
  ...t
2966
3384
  }
2967
3385
  })).data;
2968
3386
  }
2969
3387
  async headFile(e, t, s) {
2970
- const n = this.parseFileId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2971
- return (await new g(a, o).head(`files/${n}`, {
3388
+ const r = this.parseFileId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
3389
+ return (await new w(n, o).head(`files/${r}`, {
2972
3390
  params: {
2973
3391
  ...t
2974
3392
  }
2975
3393
  })).data;
2976
3394
  }
2977
3395
  async putFile(e, t, s) {
2978
- const n = this.parseFileId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
2979
- return (await new g(a, o).put(
2980
- `files/${n}`,
3396
+ const r = this.parseFileId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
3397
+ return (await new w(n, o).put(
3398
+ `files/${r}`,
2981
3399
  "",
2982
3400
  {
2983
3401
  params: {
@@ -2986,26 +3404,26 @@ class tn {
2986
3404
  }
2987
3405
  )).data;
2988
3406
  }
2989
- async deleteFileName(e, t, s, n) {
2990
- const a = this.parseFileId(e), o = this.parseFileName(t), i = h(this.globals, n?.tld), l = p(this.globals, n?.auth);
2991
- return (await new g(i, l).del(`files/${a}/${o}`, {
3407
+ async deleteFileName(e, t, s, r) {
3408
+ const n = this.parseFileId(e), o = this.parseFileName(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth);
3409
+ return (await new w(i, l).del(`files/${n}/${o}`, {
2992
3410
  params: {
2993
3411
  ...s
2994
3412
  }
2995
3413
  })).data;
2996
3414
  }
2997
- async headFileName(e, t, s, n) {
2998
- const a = this.parseFileId(e), o = this.parseFileName(t), i = h(this.globals, n?.tld), l = p(this.globals, n?.auth);
2999
- return (await new g(i, l).head(`files/${a}/${o}`, {
3415
+ async headFileName(e, t, s, r) {
3416
+ const n = this.parseFileId(e), o = this.parseFileName(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth);
3417
+ return (await new w(i, l).head(`files/${n}/${o}`, {
3000
3418
  params: {
3001
3419
  ...s
3002
3420
  }
3003
3421
  })).data;
3004
3422
  }
3005
- async putFileName(e, t, s, n) {
3006
- const a = this.parseFileId(e), o = this.parseFileName(t), i = h(this.globals, n?.tld), l = p(this.globals, n?.auth);
3007
- return (await new g(i, l).put(
3008
- `files/${a}/${o}`,
3423
+ async putFileName(e, t, s, r) {
3424
+ const n = this.parseFileId(e), o = this.parseFileName(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth);
3425
+ return (await new w(i, l).put(
3426
+ `files/${n}/${o}`,
3009
3427
  "",
3010
3428
  {
3011
3429
  params: {
@@ -3015,9 +3433,9 @@ class tn {
3015
3433
  )).data;
3016
3434
  }
3017
3435
  async postFileCopy(e, t, s) {
3018
- const n = this.parseFileId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
3019
- return (await new g(a, o).post(
3020
- `files/${n}/copy`,
3436
+ const r = this.parseFileId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
3437
+ return (await new w(n, o).post(
3438
+ `files/${r}/copy`,
3021
3439
  "",
3022
3440
  {
3023
3441
  params: {
@@ -3027,16 +3445,17 @@ class tn {
3027
3445
  )).data;
3028
3446
  }
3029
3447
  async delDescriptionFile(e, t, s) {
3030
- const n = this.parseFileId(e), a = h(this.globals, s?.tld), o = p(this.globals, s?.auth);
3031
- return (await new g(a, o).del(`files/${n}/description`, {
3448
+ const r = this.parseFileId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
3449
+ return (await new w(n, o).del(`files/${r}/description`, {
3032
3450
  params: {
3033
3451
  ...t
3034
3452
  }
3035
3453
  })).data;
3036
3454
  }
3037
3455
  }
3038
- class Pn {
3456
+ class Ur {
3039
3457
  globals = {};
3458
+ debug;
3040
3459
  _pages;
3041
3460
  _groups;
3042
3461
  _site;
@@ -3047,45 +3466,45 @@ class Pn {
3047
3466
  _users;
3048
3467
  _files;
3049
3468
  constructor(e) {
3050
- e && (e.tld && (this.globals.tld = e.tld), e.auth && (this.globals.auth = e.auth));
3469
+ e && (e.tld && (this.globals.tld = e.tld), e.auth && (this.globals.auth = e.auth), e.debug !== void 0 && (this.globals.debug = e.debug)), this.debug = Ce("cxone-expert-node", this.globals.debug), this.debug("Debug logging enabled for cxone-expert-node. This is not recommended for production use as credentials may be exposed in log files!"), this.debug("Expert instance created with options:", e);
3051
3470
  }
3052
3471
  setAuth(e) {
3053
- return this.globals.auth = e, this;
3472
+ return this.globals.auth = e, this.debug("Authentication configured:", e), this;
3054
3473
  }
3055
3474
  configureServerAuth(e) {
3056
- return this.globals.auth = { type: "server", params: e }, this;
3475
+ return this.globals.auth = { type: "server", params: e }, this.debug("Server authentication configured:", e), this;
3057
3476
  }
3058
3477
  configureBrowserAuth(e) {
3059
- return this.globals.auth = { type: "browser", params: e }, this;
3478
+ return this.globals.auth = { type: "browser", params: e }, this.debug("Browser authentication configured:", e), this;
3060
3479
  }
3061
3480
  get pages() {
3062
- return this._pages || (this._pages = new Vs(this.globals)), this._pages;
3481
+ return this._pages || (this.debug("Initializing Pages module"), this._pages = new ir(this.globals)), this._pages;
3063
3482
  }
3064
3483
  get auth() {
3065
- return this._auth || (this._auth = new We()), this._auth;
3484
+ return this._auth || (this.debug("Initializing Auth module"), this._auth = new et()), this._auth;
3066
3485
  }
3067
3486
  get site() {
3068
- return this._site || (this._site = new Zs(this.globals)), this._site;
3487
+ return this._site || (this.debug("Initializing Site module"), this._site = new dr(this.globals)), this._site;
3069
3488
  }
3070
3489
  get archive() {
3071
- return this._archive || (this._archive = new Qs(this.globals)), this._archive;
3490
+ return this._archive || (this.debug("Initializing Archive module"), this._archive = new cr(this.globals)), this._archive;
3072
3491
  }
3073
3492
  get groups() {
3074
- return this._groups || (this._groups = new Gs(this.globals)), this._groups;
3493
+ return this._groups || (this.debug("Initializing Groups module"), this._groups = new lr(this.globals)), this._groups;
3075
3494
  }
3076
3495
  get events() {
3077
- return this._events || (this._events = new Xs(this.globals)), this._events;
3496
+ return this._events || (this.debug("Initializing Events module"), this._events = new ur(this.globals)), this._events;
3078
3497
  }
3079
3498
  get contextMaps() {
3080
- return this._contextMaps || (this._contextMaps = new Ys(this.globals)), this._contextMaps;
3499
+ return this._contextMaps || (this.debug("Initializing Context Maps module"), this._contextMaps = new hr(this.globals)), this._contextMaps;
3081
3500
  }
3082
3501
  get users() {
3083
- return this._users || (this._users = new en(this.globals)), this._users;
3502
+ return this._users || (this.debug("Initializing Users module"), this._users = new pr(this.globals)), this._users;
3084
3503
  }
3085
3504
  get files() {
3086
- return this._files || (this._files = new tn(this.globals)), this._files;
3505
+ return this._files || (this.debug("Initializing Files module"), this._files = new gr(this.globals)), this._files;
3087
3506
  }
3088
3507
  }
3089
3508
  export {
3090
- Pn as default
3509
+ Ur as default
3091
3510
  };