eth-graph-query 2.0.15 → 2.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,235 +1,245 @@
1
- var Me = Object.defineProperty;
2
- var qe = (e, t, n) => t in e ? Me(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var j = (e, t, n) => (qe(e, typeof t != "symbol" ? t + "" : t, n), n);
4
- function Ee(e, t) {
1
+ function Je(t, e) {
5
2
  return function() {
6
- return e.apply(t, arguments);
3
+ return t.apply(e, arguments);
7
4
  };
8
5
  }
9
- const { toString: Qe } = Object.prototype, { getPrototypeOf: te } = Object, M = /* @__PURE__ */ ((e) => (t) => {
10
- const n = Qe.call(t);
11
- return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
12
- })(/* @__PURE__ */ Object.create(null)), O = (e) => (e = e.toLowerCase(), (t) => M(t) === e), q = (e) => (t) => typeof t === e, { isArray: F } = Array, k = q("undefined");
13
- function Je(e) {
14
- return e !== null && !k(e) && e.constructor !== null && !k(e.constructor) && g(e.constructor.isBuffer) && e.constructor.isBuffer(e);
6
+ const { toString: mt } = Object.prototype, { getPrototypeOf: we } = Object, { iterator: se, toStringTag: ze } = Symbol, oe = /* @__PURE__ */ ((t) => (e) => {
7
+ const n = mt.call(e);
8
+ return t[n] || (t[n] = n.slice(8, -1).toLowerCase());
9
+ })(/* @__PURE__ */ Object.create(null)), F = (t) => (t = t.toLowerCase(), (e) => oe(e) === t), ie = (t) => (e) => typeof e === t, { isArray: I } = Array, M = ie("undefined");
10
+ function z(t) {
11
+ return t !== null && !M(t) && t.constructor !== null && !M(t.constructor) && A(t.constructor.isBuffer) && t.constructor.isBuffer(t);
15
12
  }
16
- const Se = O("ArrayBuffer");
17
- function ze(e) {
18
- let t;
19
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Se(e.buffer), t;
13
+ const Ve = F("ArrayBuffer");
14
+ function yt(t) {
15
+ let e;
16
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && Ve(t.buffer), e;
20
17
  }
21
- const Ve = q("string"), g = q("function"), ge = q("number"), Q = (e) => e !== null && typeof e == "object", We = (e) => e === !0 || e === !1, L = (e) => {
22
- if (M(e) !== "object")
18
+ const bt = ie("string"), A = ie("function"), ve = ie("number"), V = (t) => t !== null && typeof t == "object", wt = (t) => t === !0 || t === !1, ee = (t) => {
19
+ if (oe(t) !== "object")
23
20
  return !1;
24
- const t = te(e);
25
- return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
26
- }, Ke = O("Date"), Ge = O("File"), Xe = O("Blob"), ve = O("FileList"), Ze = (e) => Q(e) && g(e.pipe), Ye = (e) => {
27
- let t;
28
- return e && (typeof FormData == "function" && e instanceof FormData || g(e.append) && ((t = M(e)) === "formdata" || // detect form-data instance
29
- t === "object" && g(e.toString) && e.toString() === "[object FormData]"));
30
- }, et = O("URLSearchParams"), tt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
31
- function C(e, t, { allOwnKeys: n = !1 } = {}) {
32
- if (e === null || typeof e > "u")
21
+ const e = we(t);
22
+ return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(ze in t) && !(se in t);
23
+ }, gt = (t) => {
24
+ if (!V(t) || z(t))
25
+ return !1;
26
+ try {
27
+ return Object.keys(t).length === 0 && Object.getPrototypeOf(t) === Object.prototype;
28
+ } catch {
29
+ return !1;
30
+ }
31
+ }, Et = F("Date"), St = F("File"), Rt = F("Blob"), Ot = F("FileList"), At = (t) => V(t) && A(t.pipe), Tt = (t) => {
32
+ let e;
33
+ return t && (typeof FormData == "function" && t instanceof FormData || A(t.append) && ((e = oe(t)) === "formdata" || // detect form-data instance
34
+ e === "object" && A(t.toString) && t.toString() === "[object FormData]"));
35
+ }, xt = F("URLSearchParams"), [_t, Ct, Ft, Nt] = ["ReadableStream", "Request", "Response", "Headers"].map(F), kt = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
36
+ function v(t, e, { allOwnKeys: n = !1 } = {}) {
37
+ if (t === null || typeof t > "u")
33
38
  return;
34
39
  let r, s;
35
- if (typeof e != "object" && (e = [e]), F(e))
36
- for (r = 0, s = e.length; r < s; r++)
37
- t.call(null, e[r], r, e);
40
+ if (typeof t != "object" && (t = [t]), I(t))
41
+ for (r = 0, s = t.length; r < s; r++)
42
+ e.call(null, t[r], r, t);
38
43
  else {
39
- const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
44
+ if (z(t))
45
+ return;
46
+ const o = n ? Object.getOwnPropertyNames(t) : Object.keys(t), i = o.length;
40
47
  let c;
41
48
  for (r = 0; r < i; r++)
42
- c = o[r], t.call(null, e[c], c, e);
49
+ c = o[r], e.call(null, t[c], c, t);
43
50
  }
44
51
  }
45
- function Re(e, t) {
46
- t = t.toLowerCase();
47
- const n = Object.keys(e);
52
+ function We(t, e) {
53
+ if (z(t))
54
+ return null;
55
+ e = e.toLowerCase();
56
+ const n = Object.keys(t);
48
57
  let r = n.length, s;
49
58
  for (; r-- > 0; )
50
- if (s = n[r], t === s.toLowerCase())
59
+ if (s = n[r], e === s.toLowerCase())
51
60
  return s;
52
61
  return null;
53
62
  }
54
- const Oe = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Ae = (e) => !k(e) && e !== Oe;
55
- function X() {
56
- const { caseless: e } = Ae(this) && this || {}, t = {}, n = (r, s) => {
57
- const o = e && Re(t, s) || s;
58
- L(t[o]) && L(r) ? t[o] = X(t[o], r) : L(r) ? t[o] = X({}, r) : F(r) ? t[o] = r.slice() : t[o] = r;
63
+ const j = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Ke = (t) => !M(t) && t !== j;
64
+ function pe() {
65
+ const { caseless: t, skipUndefined: e } = Ke(this) && this || {}, n = {}, r = (s, o) => {
66
+ const i = t && We(n, o) || o;
67
+ ee(n[i]) && ee(s) ? n[i] = pe(n[i], s) : ee(s) ? n[i] = pe({}, s) : I(s) ? n[i] = s.slice() : (!e || !M(s)) && (n[i] = s);
59
68
  };
60
- for (let r = 0, s = arguments.length; r < s; r++)
61
- arguments[r] && C(arguments[r], n);
62
- return t;
69
+ for (let s = 0, o = arguments.length; s < o; s++)
70
+ arguments[s] && v(arguments[s], r);
71
+ return n;
63
72
  }
64
- const nt = (e, t, n, { allOwnKeys: r } = {}) => (C(t, (s, o) => {
65
- n && g(s) ? e[o] = Ee(s, n) : e[o] = s;
66
- }, { allOwnKeys: r }), e), rt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), st = (e, t, n, r) => {
67
- e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
68
- value: t.prototype
69
- }), n && Object.assign(e.prototype, n);
70
- }, ot = (e, t, n, r) => {
73
+ const Pt = (t, e, n, { allOwnKeys: r } = {}) => (v(e, (s, o) => {
74
+ n && A(s) ? t[o] = Je(s, n) : t[o] = s;
75
+ }, { allOwnKeys: r }), t), Ut = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), Lt = (t, e, n, r) => {
76
+ t.prototype = Object.create(e.prototype, r), t.prototype.constructor = t, Object.defineProperty(t, "super", {
77
+ value: e.prototype
78
+ }), n && Object.assign(t.prototype, n);
79
+ }, $t = (t, e, n, r) => {
71
80
  let s, o, i;
72
81
  const c = {};
73
- if (t = t || {}, e == null)
74
- return t;
82
+ if (e = e || {}, t == null) return e;
75
83
  do {
76
- for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
77
- i = s[o], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
78
- e = n !== !1 && te(e);
79
- } while (e && (!n || n(e, t)) && e !== Object.prototype);
80
- return t;
81
- }, it = (e, t, n) => {
82
- e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
83
- const r = e.indexOf(t, n);
84
+ for (s = Object.getOwnPropertyNames(t), o = s.length; o-- > 0; )
85
+ i = s[o], (!r || r(i, t, e)) && !c[i] && (e[i] = t[i], c[i] = !0);
86
+ t = n !== !1 && we(t);
87
+ } while (t && (!n || n(t, e)) && t !== Object.prototype);
88
+ return e;
89
+ }, jt = (t, e, n) => {
90
+ t = String(t), (n === void 0 || n > t.length) && (n = t.length), n -= e.length;
91
+ const r = t.indexOf(e, n);
84
92
  return r !== -1 && r === n;
85
- }, at = (e) => {
86
- if (!e)
87
- return null;
88
- if (F(e))
89
- return e;
90
- let t = e.length;
91
- if (!ge(t))
92
- return null;
93
- const n = new Array(t);
94
- for (; t-- > 0; )
95
- n[t] = e[t];
93
+ }, Bt = (t) => {
94
+ if (!t) return null;
95
+ if (I(t)) return t;
96
+ let e = t.length;
97
+ if (!ve(e)) return null;
98
+ const n = new Array(e);
99
+ for (; e-- > 0; )
100
+ n[e] = t[e];
96
101
  return n;
97
- }, ct = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && te(Uint8Array)), lt = (e, t) => {
98
- const r = (e && e[Symbol.iterator]).call(e);
102
+ }, Dt = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && we(Uint8Array)), qt = (t, e) => {
103
+ const r = (t && t[se]).call(t);
99
104
  let s;
100
105
  for (; (s = r.next()) && !s.done; ) {
101
106
  const o = s.value;
102
- t.call(e, o[0], o[1]);
107
+ e.call(t, o[0], o[1]);
103
108
  }
104
- }, ut = (e, t) => {
109
+ }, Mt = (t, e) => {
105
110
  let n;
106
111
  const r = [];
107
- for (; (n = e.exec(t)) !== null; )
112
+ for (; (n = t.exec(e)) !== null; )
108
113
  r.push(n);
109
114
  return r;
110
- }, ft = O("HTMLFormElement"), dt = (e) => e.toLowerCase().replace(
115
+ }, It = F("HTMLFormElement"), Ht = (t) => t.toLowerCase().replace(
111
116
  /[-_\s]([a-z\d])(\w*)/g,
112
117
  function(n, r, s) {
113
118
  return r.toUpperCase() + s;
114
119
  }
115
- ), ae = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), ht = O("RegExp"), Te = (e, t) => {
116
- const n = Object.getOwnPropertyDescriptors(e), r = {};
117
- C(n, (s, o) => {
120
+ ), Ce = (({ hasOwnProperty: t }) => (e, n) => t.call(e, n))(Object.prototype), Qt = F("RegExp"), Xe = (t, e) => {
121
+ const n = Object.getOwnPropertyDescriptors(t), r = {};
122
+ v(n, (s, o) => {
118
123
  let i;
119
- (i = t(s, o, e)) !== !1 && (r[o] = i || s);
120
- }), Object.defineProperties(e, r);
121
- }, pt = (e) => {
122
- Te(e, (t, n) => {
123
- if (g(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
124
+ (i = e(s, o, t)) !== !1 && (r[o] = i || s);
125
+ }), Object.defineProperties(t, r);
126
+ }, Jt = (t) => {
127
+ Xe(t, (e, n) => {
128
+ if (A(t) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
124
129
  return !1;
125
- const r = e[n];
126
- if (g(r)) {
127
- if (t.enumerable = !1, "writable" in t) {
128
- t.writable = !1;
130
+ const r = t[n];
131
+ if (A(r)) {
132
+ if (e.enumerable = !1, "writable" in e) {
133
+ e.writable = !1;
129
134
  return;
130
135
  }
131
- t.set || (t.set = () => {
136
+ e.set || (e.set = () => {
132
137
  throw Error("Can not rewrite read-only method '" + n + "'");
133
138
  });
134
139
  }
135
140
  });
136
- }, mt = (e, t) => {
141
+ }, zt = (t, e) => {
137
142
  const n = {}, r = (s) => {
138
143
  s.forEach((o) => {
139
144
  n[o] = !0;
140
145
  });
141
146
  };
142
- return F(e) ? r(e) : r(String(e).split(t)), n;
143
- }, yt = () => {
144
- }, bt = (e, t) => (e = +e, Number.isFinite(e) ? e : t), V = "abcdefghijklmnopqrstuvwxyz", ce = "0123456789", _e = {
145
- DIGIT: ce,
146
- ALPHA: V,
147
- ALPHA_DIGIT: V + V.toUpperCase() + ce
148
- }, wt = (e = 16, t = _e.ALPHA_DIGIT) => {
149
- let n = "";
150
- const { length: r } = t;
151
- for (; e--; )
152
- n += t[Math.random() * r | 0];
153
- return n;
154
- };
155
- function Et(e) {
156
- return !!(e && g(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
147
+ return I(t) ? r(t) : r(String(t).split(e)), n;
148
+ }, Vt = () => {
149
+ }, vt = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
150
+ function Wt(t) {
151
+ return !!(t && A(t.append) && t[ze] === "FormData" && t[se]);
157
152
  }
158
- const St = (e) => {
159
- const t = new Array(10), n = (r, s) => {
160
- if (Q(r)) {
161
- if (t.indexOf(r) >= 0)
153
+ const Kt = (t) => {
154
+ const e = new Array(10), n = (r, s) => {
155
+ if (V(r)) {
156
+ if (e.indexOf(r) >= 0)
162
157
  return;
158
+ if (z(r))
159
+ return r;
163
160
  if (!("toJSON" in r)) {
164
- t[s] = r;
165
- const o = F(r) ? [] : {};
166
- return C(r, (i, c) => {
161
+ e[s] = r;
162
+ const o = I(r) ? [] : {};
163
+ return v(r, (i, c) => {
167
164
  const d = n(i, s + 1);
168
- !k(d) && (o[c] = d);
169
- }), t[s] = void 0, o;
165
+ !M(d) && (o[c] = d);
166
+ }), e[s] = void 0, o;
170
167
  }
171
168
  }
172
169
  return r;
173
170
  };
174
- return n(e, 0);
175
- }, gt = O("AsyncFunction"), Rt = (e) => e && (Q(e) || g(e)) && g(e.then) && g(e.catch), a = {
176
- isArray: F,
177
- isArrayBuffer: Se,
178
- isBuffer: Je,
179
- isFormData: Ye,
180
- isArrayBufferView: ze,
181
- isString: Ve,
182
- isNumber: ge,
183
- isBoolean: We,
184
- isObject: Q,
185
- isPlainObject: L,
186
- isUndefined: k,
187
- isDate: Ke,
188
- isFile: Ge,
189
- isBlob: Xe,
190
- isRegExp: ht,
191
- isFunction: g,
192
- isStream: Ze,
193
- isURLSearchParams: et,
194
- isTypedArray: ct,
195
- isFileList: ve,
196
- forEach: C,
197
- merge: X,
198
- extend: nt,
199
- trim: tt,
200
- stripBOM: rt,
201
- inherits: st,
202
- toFlatObject: ot,
203
- kindOf: M,
204
- kindOfTest: O,
205
- endsWith: it,
206
- toArray: at,
207
- forEachEntry: lt,
208
- matchAll: ut,
209
- isHTMLForm: ft,
210
- hasOwnProperty: ae,
211
- hasOwnProp: ae,
171
+ return n(t, 0);
172
+ }, Xt = F("AsyncFunction"), Gt = (t) => t && (V(t) || A(t)) && A(t.then) && A(t.catch), Ge = ((t, e) => t ? setImmediate : e ? ((n, r) => (j.addEventListener("message", ({ source: s, data: o }) => {
173
+ s === j && o === n && r.length && r.shift()();
174
+ }, !1), (s) => {
175
+ r.push(s), j.postMessage(n, "*");
176
+ }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
177
+ typeof setImmediate == "function",
178
+ A(j.postMessage)
179
+ ), Zt = typeof queueMicrotask < "u" ? queueMicrotask.bind(j) : typeof process < "u" && process.nextTick || Ge, Yt = (t) => t != null && A(t[se]), a = {
180
+ isArray: I,
181
+ isArrayBuffer: Ve,
182
+ isBuffer: z,
183
+ isFormData: Tt,
184
+ isArrayBufferView: yt,
185
+ isString: bt,
186
+ isNumber: ve,
187
+ isBoolean: wt,
188
+ isObject: V,
189
+ isPlainObject: ee,
190
+ isEmptyObject: gt,
191
+ isReadableStream: _t,
192
+ isRequest: Ct,
193
+ isResponse: Ft,
194
+ isHeaders: Nt,
195
+ isUndefined: M,
196
+ isDate: Et,
197
+ isFile: St,
198
+ isBlob: Rt,
199
+ isRegExp: Qt,
200
+ isFunction: A,
201
+ isStream: At,
202
+ isURLSearchParams: xt,
203
+ isTypedArray: Dt,
204
+ isFileList: Ot,
205
+ forEach: v,
206
+ merge: pe,
207
+ extend: Pt,
208
+ trim: kt,
209
+ stripBOM: Ut,
210
+ inherits: Lt,
211
+ toFlatObject: $t,
212
+ kindOf: oe,
213
+ kindOfTest: F,
214
+ endsWith: jt,
215
+ toArray: Bt,
216
+ forEachEntry: qt,
217
+ matchAll: Mt,
218
+ isHTMLForm: It,
219
+ hasOwnProperty: Ce,
220
+ hasOwnProp: Ce,
212
221
  // an alias to avoid ESLint no-prototype-builtins detection
213
- reduceDescriptors: Te,
214
- freezeMethods: pt,
215
- toObjectSet: mt,
216
- toCamelCase: dt,
217
- noop: yt,
218
- toFiniteNumber: bt,
219
- findKey: Re,
220
- global: Oe,
221
- isContextDefined: Ae,
222
- ALPHABET: _e,
223
- generateString: wt,
224
- isSpecCompliantForm: Et,
225
- toJSONObject: St,
226
- isAsyncFn: gt,
227
- isThenable: Rt
222
+ reduceDescriptors: Xe,
223
+ freezeMethods: Jt,
224
+ toObjectSet: zt,
225
+ toCamelCase: Ht,
226
+ noop: Vt,
227
+ toFiniteNumber: vt,
228
+ findKey: We,
229
+ global: j,
230
+ isContextDefined: Ke,
231
+ isSpecCompliantForm: Wt,
232
+ toJSONObject: Kt,
233
+ isAsyncFn: Xt,
234
+ isThenable: Gt,
235
+ setImmediate: Ge,
236
+ asap: Zt,
237
+ isIterable: Yt
228
238
  };
229
- function m(e, t, n, r, s) {
230
- Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), s && (this.response = s);
239
+ function y(t, e, n, r, s) {
240
+ Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", e && (this.code = e), n && (this.config = n), r && (this.request = r), s && (this.response = s, this.status = s.status ? s.status : null);
231
241
  }
232
- a.inherits(m, Error, {
242
+ a.inherits(y, Error, {
233
243
  toJSON: function() {
234
244
  return {
235
245
  // Standard
@@ -246,11 +256,11 @@ a.inherits(m, Error, {
246
256
  // Axios
247
257
  config: a.toJSONObject(this.config),
248
258
  code: this.code,
249
- status: this.response && this.response.status ? this.response.status : null
259
+ status: this.status
250
260
  };
251
261
  }
252
262
  });
253
- const Ne = m.prototype, xe = {};
263
+ const Ze = y.prototype, Ye = {};
254
264
  [
255
265
  "ERR_BAD_OPTION_VALUE",
256
266
  "ERR_BAD_OPTION",
@@ -265,99 +275,102 @@ const Ne = m.prototype, xe = {};
265
275
  "ERR_NOT_SUPPORT",
266
276
  "ERR_INVALID_URL"
267
277
  // eslint-disable-next-line func-names
268
- ].forEach((e) => {
269
- xe[e] = { value: e };
278
+ ].forEach((t) => {
279
+ Ye[t] = { value: t };
270
280
  });
271
- Object.defineProperties(m, xe);
272
- Object.defineProperty(Ne, "isAxiosError", { value: !0 });
273
- m.from = (e, t, n, r, s, o) => {
274
- const i = Object.create(Ne);
275
- return a.toFlatObject(e, i, function(d) {
276
- return d !== Error.prototype;
277
- }, (c) => c !== "isAxiosError"), m.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
281
+ Object.defineProperties(y, Ye);
282
+ Object.defineProperty(Ze, "isAxiosError", { value: !0 });
283
+ y.from = (t, e, n, r, s, o) => {
284
+ const i = Object.create(Ze);
285
+ a.toFlatObject(t, i, function(l) {
286
+ return l !== Error.prototype;
287
+ }, (u) => u !== "isAxiosError");
288
+ const c = t && t.message ? t.message : "Error", d = e == null && t ? t.code : e;
289
+ return y.call(i, c, d, n, r, s), t && i.cause == null && Object.defineProperty(i, "cause", { value: t, configurable: !0 }), i.name = t && t.name || "Error", o && Object.assign(i, o), i;
278
290
  };
279
- const Ot = null;
280
- function v(e) {
281
- return a.isPlainObject(e) || a.isArray(e);
291
+ const en = null;
292
+ function me(t) {
293
+ return a.isPlainObject(t) || a.isArray(t);
282
294
  }
283
- function Fe(e) {
284
- return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
295
+ function et(t) {
296
+ return a.endsWith(t, "[]") ? t.slice(0, -2) : t;
285
297
  }
286
- function le(e, t, n) {
287
- return e ? e.concat(t).map(function(s, o) {
288
- return s = Fe(s), !n && o ? "[" + s + "]" : s;
289
- }).join(n ? "." : "") : t;
298
+ function Fe(t, e, n) {
299
+ return t ? t.concat(e).map(function(s, o) {
300
+ return s = et(s), !n && o ? "[" + s + "]" : s;
301
+ }).join(n ? "." : "") : e;
290
302
  }
291
- function At(e) {
292
- return a.isArray(e) && !e.some(v);
303
+ function tn(t) {
304
+ return a.isArray(t) && !t.some(me);
293
305
  }
294
- const Tt = a.toFlatObject(a, {}, null, function(t) {
295
- return /^is[A-Z]/.test(t);
306
+ const nn = a.toFlatObject(a, {}, null, function(e) {
307
+ return /^is[A-Z]/.test(e);
296
308
  });
297
- function J(e, t, n) {
298
- if (!a.isObject(e))
309
+ function ae(t, e, n) {
310
+ if (!a.isObject(t))
299
311
  throw new TypeError("target must be an object");
300
- t = t || new FormData(), n = a.toFlatObject(n, {
312
+ e = e || new FormData(), n = a.toFlatObject(n, {
301
313
  metaTokens: !0,
302
314
  dots: !1,
303
315
  indexes: !1
304
- }, !1, function(p, w) {
305
- return !a.isUndefined(w[p]);
316
+ }, !1, function(m, h) {
317
+ return !a.isUndefined(h[m]);
306
318
  });
307
- const r = n.metaTokens, s = n.visitor || u, o = n.dots, i = n.indexes, d = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
319
+ const r = n.metaTokens, s = n.visitor || l, o = n.dots, i = n.indexes, d = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(e);
308
320
  if (!a.isFunction(s))
309
321
  throw new TypeError("visitor must be a function");
310
- function f(h) {
311
- if (h === null)
312
- return "";
313
- if (a.isDate(h))
314
- return h.toISOString();
315
- if (!d && a.isBlob(h))
316
- throw new m("Blob is not supported. Use a Buffer instead.");
317
- return a.isArrayBuffer(h) || a.isTypedArray(h) ? d && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
318
- }
319
- function u(h, p, w) {
320
- let E = h;
321
- if (h && !w && typeof h == "object") {
322
- if (a.endsWith(p, "{}"))
323
- p = r ? p : p.slice(0, -2), h = JSON.stringify(h);
324
- else if (a.isArray(h) && At(h) || (a.isFileList(h) || a.endsWith(p, "[]")) && (E = a.toArray(h)))
325
- return p = Fe(p), E.forEach(function(_, Ie) {
326
- !(a.isUndefined(_) || _ === null) && t.append(
322
+ function u(f) {
323
+ if (f === null) return "";
324
+ if (a.isDate(f))
325
+ return f.toISOString();
326
+ if (a.isBoolean(f))
327
+ return f.toString();
328
+ if (!d && a.isBlob(f))
329
+ throw new y("Blob is not supported. Use a Buffer instead.");
330
+ return a.isArrayBuffer(f) || a.isTypedArray(f) ? d && typeof Blob == "function" ? new Blob([f]) : Buffer.from(f) : f;
331
+ }
332
+ function l(f, m, h) {
333
+ let g = f;
334
+ if (f && !h && typeof f == "object") {
335
+ if (a.endsWith(m, "{}"))
336
+ m = r ? m : m.slice(0, -2), f = JSON.stringify(f);
337
+ else if (a.isArray(f) && tn(f) || (a.isFileList(f) || a.endsWith(m, "[]")) && (g = a.toArray(f)))
338
+ return m = et(m), g.forEach(function(E, O) {
339
+ !(a.isUndefined(E) || E === null) && e.append(
327
340
  // eslint-disable-next-line no-nested-ternary
328
- i === !0 ? le([p], Ie, o) : i === null ? p : p + "[]",
329
- f(_)
341
+ i === !0 ? Fe([m], O, o) : i === null ? m : m + "[]",
342
+ u(E)
330
343
  );
331
344
  }), !1;
332
345
  }
333
- return v(h) ? !0 : (t.append(le(w, p, o), f(h)), !1);
346
+ return me(f) ? !0 : (e.append(Fe(h, m, o), u(f)), !1);
334
347
  }
335
- const l = [], b = Object.assign(Tt, {
336
- defaultVisitor: u,
337
- convertValue: f,
338
- isVisitable: v
348
+ const p = [], b = Object.assign(nn, {
349
+ defaultVisitor: l,
350
+ convertValue: u,
351
+ isVisitable: me
339
352
  });
340
- function S(h, p) {
341
- if (!a.isUndefined(h)) {
342
- if (l.indexOf(h) !== -1)
343
- throw Error("Circular reference detected in " + p.join("."));
344
- l.push(h), a.forEach(h, function(E, T) {
345
- (!(a.isUndefined(E) || E === null) && s.call(
346
- t,
347
- E,
348
- a.isString(T) ? T.trim() : T,
349
- p,
353
+ function S(f, m) {
354
+ if (!a.isUndefined(f)) {
355
+ if (p.indexOf(f) !== -1)
356
+ throw Error("Circular reference detected in " + m.join("."));
357
+ p.push(f), a.forEach(f, function(g, x) {
358
+ (!(a.isUndefined(g) || g === null) && s.call(
359
+ e,
360
+ g,
361
+ a.isString(x) ? x.trim() : x,
362
+ m,
350
363
  b
351
- )) === !0 && S(E, p ? p.concat(T) : [T]);
352
- }), l.pop();
364
+ )) === !0 && S(g, m ? m.concat(x) : [x]);
365
+ }), p.pop();
353
366
  }
354
367
  }
355
- if (!a.isObject(e))
368
+ if (!a.isObject(t))
356
369
  throw new TypeError("data must be an object");
357
- return S(e), t;
370
+ return S(t), e;
358
371
  }
359
- function ue(e) {
360
- const t = {
372
+ function Ne(t) {
373
+ const e = {
361
374
  "!": "%21",
362
375
  "'": "%27",
363
376
  "(": "%28",
@@ -366,40 +379,44 @@ function ue(e) {
366
379
  "%20": "+",
367
380
  "%00": "\0"
368
381
  };
369
- return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
370
- return t[r];
382
+ return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g, function(r) {
383
+ return e[r];
371
384
  });
372
385
  }
373
- function ne(e, t) {
374
- this._pairs = [], e && J(e, this, t);
386
+ function ge(t, e) {
387
+ this._pairs = [], t && ae(t, this, e);
375
388
  }
376
- const Pe = ne.prototype;
377
- Pe.append = function(t, n) {
378
- this._pairs.push([t, n]);
389
+ const tt = ge.prototype;
390
+ tt.append = function(e, n) {
391
+ this._pairs.push([e, n]);
379
392
  };
380
- Pe.toString = function(t) {
381
- const n = t ? function(r) {
382
- return t.call(this, r, ue);
383
- } : ue;
393
+ tt.toString = function(e) {
394
+ const n = e ? function(r) {
395
+ return e.call(this, r, Ne);
396
+ } : Ne;
384
397
  return this._pairs.map(function(s) {
385
398
  return n(s[0]) + "=" + n(s[1]);
386
399
  }, "").join("&");
387
400
  };
388
- function _t(e) {
389
- return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
401
+ function rn(t) {
402
+ return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
390
403
  }
391
- function ke(e, t, n) {
392
- if (!t)
393
- return e;
394
- const r = n && n.encode || _t, s = n && n.serialize;
404
+ function nt(t, e, n) {
405
+ if (!e)
406
+ return t;
407
+ const r = n && n.encode || rn;
408
+ a.isFunction(n) && (n = {
409
+ serialize: n
410
+ });
411
+ const s = n && n.serialize;
395
412
  let o;
396
- if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new ne(t, n).toString(r), o) {
397
- const i = e.indexOf("#");
398
- i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
413
+ if (s ? o = s(e, n) : o = a.isURLSearchParams(e) ? e.toString() : new ge(e, n).toString(r), o) {
414
+ const i = t.indexOf("#");
415
+ i !== -1 && (t = t.slice(0, i)), t += (t.indexOf("?") === -1 ? "?" : "&") + o;
399
416
  }
400
- return e;
417
+ return t;
401
418
  }
402
- class fe {
419
+ class ke {
403
420
  constructor() {
404
421
  this.handlers = [];
405
422
  }
@@ -411,9 +428,9 @@ class fe {
411
428
  *
412
429
  * @return {Number} An ID used to remove interceptor later
413
430
  */
414
- use(t, n, r) {
431
+ use(e, n, r) {
415
432
  return this.handlers.push({
416
- fulfilled: t,
433
+ fulfilled: e,
417
434
  rejected: n,
418
435
  synchronous: r ? r.synchronous : !1,
419
436
  runWhen: r ? r.runWhen : null
@@ -424,10 +441,10 @@ class fe {
424
441
  *
425
442
  * @param {Number} id The ID that was returned by `use`
426
443
  *
427
- * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
444
+ * @returns {void}
428
445
  */
429
- eject(t) {
430
- this.handlers[t] && (this.handlers[t] = null);
446
+ eject(e) {
447
+ this.handlers[e] && (this.handlers[e] = null);
431
448
  }
432
449
  /**
433
450
  * Clear all interceptors from the stack
@@ -447,119 +464,123 @@ class fe {
447
464
  *
448
465
  * @returns {void}
449
466
  */
450
- forEach(t) {
467
+ forEach(e) {
451
468
  a.forEach(this.handlers, function(r) {
452
- r !== null && t(r);
469
+ r !== null && e(r);
453
470
  });
454
471
  }
455
472
  }
456
- const Ce = {
473
+ const rt = {
457
474
  silentJSONParsing: !0,
458
475
  forcedJSONParsing: !0,
459
476
  clarifyTimeoutError: !1
460
- }, Nt = typeof URLSearchParams < "u" ? URLSearchParams : ne, xt = typeof FormData < "u" ? FormData : null, Ft = typeof Blob < "u" ? Blob : null, Pt = {
477
+ }, sn = typeof URLSearchParams < "u" ? URLSearchParams : ge, on = typeof FormData < "u" ? FormData : null, an = typeof Blob < "u" ? Blob : null, cn = {
461
478
  isBrowser: !0,
462
479
  classes: {
463
- URLSearchParams: Nt,
464
- FormData: xt,
465
- Blob: Ft
480
+ URLSearchParams: sn,
481
+ FormData: on,
482
+ Blob: an
466
483
  },
467
484
  protocols: ["http", "https", "file", "blob", "url", "data"]
468
- }, Be = typeof window < "u" && typeof document < "u", kt = ((e) => Be && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), Ct = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
469
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Bt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
485
+ }, Ee = typeof window < "u" && typeof document < "u", ye = typeof navigator == "object" && navigator || void 0, ln = Ee && (!ye || ["ReactNative", "NativeScript", "NS"].indexOf(ye.product) < 0), un = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
486
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", fn = Ee && window.location.href || "http://localhost", dn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
470
487
  __proto__: null,
471
- hasBrowserEnv: Be,
472
- hasStandardBrowserEnv: kt,
473
- hasStandardBrowserWebWorkerEnv: Ct
488
+ hasBrowserEnv: Ee,
489
+ hasStandardBrowserEnv: ln,
490
+ hasStandardBrowserWebWorkerEnv: un,
491
+ navigator: ye,
492
+ origin: fn
474
493
  }, Symbol.toStringTag, { value: "Module" })), R = {
475
- ...Bt,
476
- ...Pt
494
+ ...dn,
495
+ ...cn
477
496
  };
478
- function jt(e, t) {
479
- return J(e, new R.classes.URLSearchParams(), Object.assign({
497
+ function hn(t, e) {
498
+ return ae(t, new R.classes.URLSearchParams(), {
480
499
  visitor: function(n, r, s, o) {
481
500
  return R.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
482
- }
483
- }, t));
501
+ },
502
+ ...e
503
+ });
484
504
  }
485
- function Dt(e) {
486
- return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
505
+ function pn(t) {
506
+ return a.matchAll(/\w+|\[(\w*)]/g, t).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
487
507
  }
488
- function $t(e) {
489
- const t = {}, n = Object.keys(e);
508
+ function mn(t) {
509
+ const e = {}, n = Object.keys(t);
490
510
  let r;
491
511
  const s = n.length;
492
512
  let o;
493
513
  for (r = 0; r < s; r++)
494
- o = n[r], t[o] = e[o];
495
- return t;
514
+ o = n[r], e[o] = t[o];
515
+ return e;
496
516
  }
497
- function je(e) {
498
- function t(n, r, s, o) {
517
+ function st(t) {
518
+ function e(n, r, s, o) {
499
519
  let i = n[o++];
500
- if (i === "__proto__")
501
- return !0;
520
+ if (i === "__proto__") return !0;
502
521
  const c = Number.isFinite(+i), d = o >= n.length;
503
- return i = !i && a.isArray(s) ? s.length : i, d ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = $t(s[i])), !c);
522
+ return i = !i && a.isArray(s) ? s.length : i, d ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), e(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = mn(s[i])), !c);
504
523
  }
505
- if (a.isFormData(e) && a.isFunction(e.entries)) {
524
+ if (a.isFormData(t) && a.isFunction(t.entries)) {
506
525
  const n = {};
507
- return a.forEachEntry(e, (r, s) => {
508
- t(Dt(r), s, n, 0);
526
+ return a.forEachEntry(t, (r, s) => {
527
+ e(pn(r), s, n, 0);
509
528
  }), n;
510
529
  }
511
530
  return null;
512
531
  }
513
- function Lt(e, t, n) {
514
- if (a.isString(e))
532
+ function yn(t, e, n) {
533
+ if (a.isString(t))
515
534
  try {
516
- return (t || JSON.parse)(e), a.trim(e);
535
+ return (e || JSON.parse)(t), a.trim(t);
517
536
  } catch (r) {
518
537
  if (r.name !== "SyntaxError")
519
538
  throw r;
520
539
  }
521
- return (n || JSON.stringify)(e);
540
+ return (n || JSON.stringify)(t);
522
541
  }
523
- const re = {
524
- transitional: Ce,
525
- adapter: ["xhr", "http"],
526
- transformRequest: [function(t, n) {
527
- const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
528
- if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
529
- return s ? JSON.stringify(je(t)) : t;
530
- if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t))
531
- return t;
532
- if (a.isArrayBufferView(t))
533
- return t.buffer;
534
- if (a.isURLSearchParams(t))
535
- return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
542
+ const W = {
543
+ transitional: rt,
544
+ adapter: ["xhr", "http", "fetch"],
545
+ transformRequest: [function(e, n) {
546
+ const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(e);
547
+ if (o && a.isHTMLForm(e) && (e = new FormData(e)), a.isFormData(e))
548
+ return s ? JSON.stringify(st(e)) : e;
549
+ if (a.isArrayBuffer(e) || a.isBuffer(e) || a.isStream(e) || a.isFile(e) || a.isBlob(e) || a.isReadableStream(e))
550
+ return e;
551
+ if (a.isArrayBufferView(e))
552
+ return e.buffer;
553
+ if (a.isURLSearchParams(e))
554
+ return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
536
555
  let c;
537
556
  if (o) {
538
557
  if (r.indexOf("application/x-www-form-urlencoded") > -1)
539
- return jt(t, this.formSerializer).toString();
540
- if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
558
+ return hn(e, this.formSerializer).toString();
559
+ if ((c = a.isFileList(e)) || r.indexOf("multipart/form-data") > -1) {
541
560
  const d = this.env && this.env.FormData;
542
- return J(
543
- c ? { "files[]": t } : t,
561
+ return ae(
562
+ c ? { "files[]": e } : e,
544
563
  d && new d(),
545
564
  this.formSerializer
546
565
  );
547
566
  }
548
567
  }
549
- return o || s ? (n.setContentType("application/json", !1), Lt(t)) : t;
568
+ return o || s ? (n.setContentType("application/json", !1), yn(e)) : e;
550
569
  }],
551
- transformResponse: [function(t) {
552
- const n = this.transitional || re.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
553
- if (t && a.isString(t) && (r && !this.responseType || s)) {
570
+ transformResponse: [function(e) {
571
+ const n = this.transitional || W.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
572
+ if (a.isResponse(e) || a.isReadableStream(e))
573
+ return e;
574
+ if (e && a.isString(e) && (r && !this.responseType || s)) {
554
575
  const i = !(n && n.silentJSONParsing) && s;
555
576
  try {
556
- return JSON.parse(t);
577
+ return JSON.parse(e, this.parseReviver);
557
578
  } catch (c) {
558
579
  if (i)
559
- throw c.name === "SyntaxError" ? m.from(c, m.ERR_BAD_RESPONSE, this, null, this.response) : c;
580
+ throw c.name === "SyntaxError" ? y.from(c, y.ERR_BAD_RESPONSE, this, null, this.response) : c;
560
581
  }
561
582
  }
562
- return t;
583
+ return e;
563
584
  }],
564
585
  /**
565
586
  * A timeout in milliseconds to abort a request. If set to 0 (default) a
@@ -574,8 +595,8 @@ const re = {
574
595
  FormData: R.classes.FormData,
575
596
  Blob: R.classes.Blob
576
597
  },
577
- validateStatus: function(t) {
578
- return t >= 200 && t < 300;
598
+ validateStatus: function(e) {
599
+ return e >= 200 && e < 300;
579
600
  },
580
601
  headers: {
581
602
  common: {
@@ -584,10 +605,10 @@ const re = {
584
605
  }
585
606
  }
586
607
  };
587
- a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
588
- re.headers[e] = {};
608
+ a.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
609
+ W.headers[t] = {};
589
610
  });
590
- const se = re, Ut = a.toObjectSet([
611
+ const bn = a.toObjectSet([
591
612
  "age",
592
613
  "authorization",
593
614
  "content-length",
@@ -605,77 +626,91 @@ const se = re, Ut = a.toObjectSet([
605
626
  "referer",
606
627
  "retry-after",
607
628
  "user-agent"
608
- ]), Ht = (e) => {
609
- const t = {};
629
+ ]), wn = (t) => {
630
+ const e = {};
610
631
  let n, r, s;
611
- return e && e.split(`
632
+ return t && t.split(`
612
633
  `).forEach(function(i) {
613
- s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && Ut[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
614
- }), t;
615
- }, de = Symbol("internals");
616
- function P(e) {
617
- return e && String(e).trim().toLowerCase();
634
+ s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || e[n] && bn[n]) && (n === "set-cookie" ? e[n] ? e[n].push(r) : e[n] = [r] : e[n] = e[n] ? e[n] + ", " + r : r);
635
+ }), e;
636
+ }, Pe = /* @__PURE__ */ Symbol("internals");
637
+ function J(t) {
638
+ return t && String(t).trim().toLowerCase();
618
639
  }
619
- function U(e) {
620
- return e === !1 || e == null ? e : a.isArray(e) ? e.map(U) : String(e);
640
+ function te(t) {
641
+ return t === !1 || t == null ? t : a.isArray(t) ? t.map(te) : String(t);
621
642
  }
622
- function It(e) {
623
- const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
643
+ function gn(t) {
644
+ const e = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
624
645
  let r;
625
- for (; r = n.exec(e); )
626
- t[r[1]] = r[2];
627
- return t;
646
+ for (; r = n.exec(t); )
647
+ e[r[1]] = r[2];
648
+ return e;
628
649
  }
629
- const Mt = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
630
- function W(e, t, n, r, s) {
650
+ const En = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
651
+ function fe(t, e, n, r, s) {
631
652
  if (a.isFunction(r))
632
- return r.call(this, t, n);
633
- if (s && (t = n), !!a.isString(t)) {
653
+ return r.call(this, e, n);
654
+ if (s && (e = n), !!a.isString(e)) {
634
655
  if (a.isString(r))
635
- return t.indexOf(r) !== -1;
656
+ return e.indexOf(r) !== -1;
636
657
  if (a.isRegExp(r))
637
- return r.test(t);
658
+ return r.test(e);
638
659
  }
639
660
  }
640
- function qt(e) {
641
- return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
661
+ function Sn(t) {
662
+ return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, n, r) => n.toUpperCase() + r);
642
663
  }
643
- function Qt(e, t) {
644
- const n = a.toCamelCase(" " + t);
664
+ function Rn(t, e) {
665
+ const n = a.toCamelCase(" " + e);
645
666
  ["get", "set", "has"].forEach((r) => {
646
- Object.defineProperty(e, r + n, {
667
+ Object.defineProperty(t, r + n, {
647
668
  value: function(s, o, i) {
648
- return this[r].call(this, t, s, o, i);
669
+ return this[r].call(this, e, s, o, i);
649
670
  },
650
671
  configurable: !0
651
672
  });
652
673
  });
653
674
  }
654
- class z {
655
- constructor(t) {
656
- t && this.set(t);
675
+ let T = class {
676
+ constructor(e) {
677
+ e && this.set(e);
657
678
  }
658
- set(t, n, r) {
679
+ set(e, n, r) {
659
680
  const s = this;
660
- function o(c, d, f) {
661
- const u = P(d);
662
- if (!u)
681
+ function o(c, d, u) {
682
+ const l = J(d);
683
+ if (!l)
663
684
  throw new Error("header name must be a non-empty string");
664
- const l = a.findKey(s, u);
665
- (!l || s[l] === void 0 || f === !0 || f === void 0 && s[l] !== !1) && (s[l || d] = U(c));
685
+ const p = a.findKey(s, l);
686
+ (!p || s[p] === void 0 || u === !0 || u === void 0 && s[p] !== !1) && (s[p || d] = te(c));
666
687
  }
667
- const i = (c, d) => a.forEach(c, (f, u) => o(f, u, d));
668
- return a.isPlainObject(t) || t instanceof this.constructor ? i(t, n) : a.isString(t) && (t = t.trim()) && !Mt(t) ? i(Ht(t), n) : t != null && o(n, t, r), this;
688
+ const i = (c, d) => a.forEach(c, (u, l) => o(u, l, d));
689
+ if (a.isPlainObject(e) || e instanceof this.constructor)
690
+ i(e, n);
691
+ else if (a.isString(e) && (e = e.trim()) && !En(e))
692
+ i(wn(e), n);
693
+ else if (a.isObject(e) && a.isIterable(e)) {
694
+ let c = {}, d, u;
695
+ for (const l of e) {
696
+ if (!a.isArray(l))
697
+ throw TypeError("Object iterator must return a key-value pair");
698
+ c[u = l[0]] = (d = c[u]) ? a.isArray(d) ? [...d, l[1]] : [d, l[1]] : l[1];
699
+ }
700
+ i(c, n);
701
+ } else
702
+ e != null && o(n, e, r);
703
+ return this;
669
704
  }
670
- get(t, n) {
671
- if (t = P(t), t) {
672
- const r = a.findKey(this, t);
705
+ get(e, n) {
706
+ if (e = J(e), e) {
707
+ const r = a.findKey(this, e);
673
708
  if (r) {
674
709
  const s = this[r];
675
710
  if (!n)
676
711
  return s;
677
712
  if (n === !0)
678
- return It(s);
713
+ return gn(s);
679
714
  if (a.isFunction(n))
680
715
  return n.call(this, s, r);
681
716
  if (a.isRegExp(n))
@@ -684,133 +719,198 @@ class z {
684
719
  }
685
720
  }
686
721
  }
687
- has(t, n) {
688
- if (t = P(t), t) {
689
- const r = a.findKey(this, t);
690
- return !!(r && this[r] !== void 0 && (!n || W(this, this[r], r, n)));
722
+ has(e, n) {
723
+ if (e = J(e), e) {
724
+ const r = a.findKey(this, e);
725
+ return !!(r && this[r] !== void 0 && (!n || fe(this, this[r], r, n)));
691
726
  }
692
727
  return !1;
693
728
  }
694
- delete(t, n) {
729
+ delete(e, n) {
695
730
  const r = this;
696
731
  let s = !1;
697
732
  function o(i) {
698
- if (i = P(i), i) {
733
+ if (i = J(i), i) {
699
734
  const c = a.findKey(r, i);
700
- c && (!n || W(r, r[c], c, n)) && (delete r[c], s = !0);
735
+ c && (!n || fe(r, r[c], c, n)) && (delete r[c], s = !0);
701
736
  }
702
737
  }
703
- return a.isArray(t) ? t.forEach(o) : o(t), s;
738
+ return a.isArray(e) ? e.forEach(o) : o(e), s;
704
739
  }
705
- clear(t) {
740
+ clear(e) {
706
741
  const n = Object.keys(this);
707
742
  let r = n.length, s = !1;
708
743
  for (; r--; ) {
709
744
  const o = n[r];
710
- (!t || W(this, this[o], o, t, !0)) && (delete this[o], s = !0);
745
+ (!e || fe(this, this[o], o, e, !0)) && (delete this[o], s = !0);
711
746
  }
712
747
  return s;
713
748
  }
714
- normalize(t) {
749
+ normalize(e) {
715
750
  const n = this, r = {};
716
751
  return a.forEach(this, (s, o) => {
717
752
  const i = a.findKey(r, o);
718
753
  if (i) {
719
- n[i] = U(s), delete n[o];
754
+ n[i] = te(s), delete n[o];
720
755
  return;
721
756
  }
722
- const c = t ? qt(o) : String(o).trim();
723
- c !== o && delete n[o], n[c] = U(s), r[c] = !0;
757
+ const c = e ? Sn(o) : String(o).trim();
758
+ c !== o && delete n[o], n[c] = te(s), r[c] = !0;
724
759
  }), this;
725
760
  }
726
- concat(...t) {
727
- return this.constructor.concat(this, ...t);
761
+ concat(...e) {
762
+ return this.constructor.concat(this, ...e);
728
763
  }
729
- toJSON(t) {
764
+ toJSON(e) {
730
765
  const n = /* @__PURE__ */ Object.create(null);
731
766
  return a.forEach(this, (r, s) => {
732
- r != null && r !== !1 && (n[s] = t && a.isArray(r) ? r.join(", ") : r);
767
+ r != null && r !== !1 && (n[s] = e && a.isArray(r) ? r.join(", ") : r);
733
768
  }), n;
734
769
  }
735
770
  [Symbol.iterator]() {
736
771
  return Object.entries(this.toJSON())[Symbol.iterator]();
737
772
  }
738
773
  toString() {
739
- return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
774
+ return Object.entries(this.toJSON()).map(([e, n]) => e + ": " + n).join(`
740
775
  `);
741
776
  }
777
+ getSetCookie() {
778
+ return this.get("set-cookie") || [];
779
+ }
742
780
  get [Symbol.toStringTag]() {
743
781
  return "AxiosHeaders";
744
782
  }
745
- static from(t) {
746
- return t instanceof this ? t : new this(t);
783
+ static from(e) {
784
+ return e instanceof this ? e : new this(e);
747
785
  }
748
- static concat(t, ...n) {
749
- const r = new this(t);
786
+ static concat(e, ...n) {
787
+ const r = new this(e);
750
788
  return n.forEach((s) => r.set(s)), r;
751
789
  }
752
- static accessor(t) {
753
- const r = (this[de] = this[de] = {
790
+ static accessor(e) {
791
+ const r = (this[Pe] = this[Pe] = {
754
792
  accessors: {}
755
793
  }).accessors, s = this.prototype;
756
794
  function o(i) {
757
- const c = P(i);
758
- r[c] || (Qt(s, i), r[c] = !0);
795
+ const c = J(i);
796
+ r[c] || (Rn(s, i), r[c] = !0);
759
797
  }
760
- return a.isArray(t) ? t.forEach(o) : o(t), this;
798
+ return a.isArray(e) ? e.forEach(o) : o(e), this;
761
799
  }
762
- }
763
- z.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
764
- a.reduceDescriptors(z.prototype, ({ value: e }, t) => {
765
- let n = t[0].toUpperCase() + t.slice(1);
800
+ };
801
+ T.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
802
+ a.reduceDescriptors(T.prototype, ({ value: t }, e) => {
803
+ let n = e[0].toUpperCase() + e.slice(1);
766
804
  return {
767
- get: () => e,
805
+ get: () => t,
768
806
  set(r) {
769
807
  this[n] = r;
770
808
  }
771
809
  };
772
810
  });
773
- a.freezeMethods(z);
774
- const A = z;
775
- function K(e, t) {
776
- const n = this || se, r = t || n, s = A.from(r.headers);
811
+ a.freezeMethods(T);
812
+ function de(t, e) {
813
+ const n = this || W, r = e || n, s = T.from(r.headers);
777
814
  let o = r.data;
778
- return a.forEach(e, function(c) {
779
- o = c.call(n, o, s.normalize(), t ? t.status : void 0);
815
+ return a.forEach(t, function(c) {
816
+ o = c.call(n, o, s.normalize(), e ? e.status : void 0);
780
817
  }), s.normalize(), o;
781
818
  }
782
- function De(e) {
783
- return !!(e && e.__CANCEL__);
819
+ function ot(t) {
820
+ return !!(t && t.__CANCEL__);
784
821
  }
785
- function B(e, t, n) {
786
- m.call(this, e ?? "canceled", m.ERR_CANCELED, t, n), this.name = "CanceledError";
822
+ function H(t, e, n) {
823
+ y.call(this, t ?? "canceled", y.ERR_CANCELED, e, n), this.name = "CanceledError";
787
824
  }
788
- a.inherits(B, m, {
825
+ a.inherits(H, y, {
789
826
  __CANCEL__: !0
790
827
  });
791
- function Jt(e, t, n) {
828
+ function it(t, e, n) {
792
829
  const r = n.config.validateStatus;
793
- !n.status || !r || r(n.status) ? e(n) : t(new m(
830
+ !n.status || !r || r(n.status) ? t(n) : e(new y(
794
831
  "Request failed with status code " + n.status,
795
- [m.ERR_BAD_REQUEST, m.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
832
+ [y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
796
833
  n.config,
797
834
  n.request,
798
835
  n
799
836
  ));
800
837
  }
801
- const zt = R.hasStandardBrowserEnv ? (
838
+ function On(t) {
839
+ const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t);
840
+ return e && e[1] || "";
841
+ }
842
+ function An(t, e) {
843
+ t = t || 10;
844
+ const n = new Array(t), r = new Array(t);
845
+ let s = 0, o = 0, i;
846
+ return e = e !== void 0 ? e : 1e3, function(d) {
847
+ const u = Date.now(), l = r[o];
848
+ i || (i = u), n[s] = d, r[s] = u;
849
+ let p = o, b = 0;
850
+ for (; p !== s; )
851
+ b += n[p++], p = p % t;
852
+ if (s = (s + 1) % t, s === o && (o = (o + 1) % t), u - i < e)
853
+ return;
854
+ const S = l && u - l;
855
+ return S ? Math.round(b * 1e3 / S) : void 0;
856
+ };
857
+ }
858
+ function Tn(t, e) {
859
+ let n = 0, r = 1e3 / e, s, o;
860
+ const i = (u, l = Date.now()) => {
861
+ n = l, s = null, o && (clearTimeout(o), o = null), t(...u);
862
+ };
863
+ return [(...u) => {
864
+ const l = Date.now(), p = l - n;
865
+ p >= r ? i(u, l) : (s = u, o || (o = setTimeout(() => {
866
+ o = null, i(s);
867
+ }, r - p)));
868
+ }, () => s && i(s)];
869
+ }
870
+ const re = (t, e, n = 3) => {
871
+ let r = 0;
872
+ const s = An(50, 250);
873
+ return Tn((o) => {
874
+ const i = o.loaded, c = o.lengthComputable ? o.total : void 0, d = i - r, u = s(d), l = i <= c;
875
+ r = i;
876
+ const p = {
877
+ loaded: i,
878
+ total: c,
879
+ progress: c ? i / c : void 0,
880
+ bytes: d,
881
+ rate: u || void 0,
882
+ estimated: u && c && l ? (c - i) / u : void 0,
883
+ event: o,
884
+ lengthComputable: c != null,
885
+ [e ? "download" : "upload"]: !0
886
+ };
887
+ t(p);
888
+ }, n);
889
+ }, Ue = (t, e) => {
890
+ const n = t != null;
891
+ return [(r) => e[0]({
892
+ lengthComputable: n,
893
+ total: t,
894
+ loaded: r
895
+ }), e[1]];
896
+ }, Le = (t) => (...e) => a.asap(() => t(...e)), xn = R.hasStandardBrowserEnv ? /* @__PURE__ */ ((t, e) => (n) => (n = new URL(n, R.origin), t.protocol === n.protocol && t.host === n.host && (e || t.port === n.port)))(
897
+ new URL(R.origin),
898
+ R.navigator && /(msie|trident)/i.test(R.navigator.userAgent)
899
+ ) : () => !0, _n = R.hasStandardBrowserEnv ? (
802
900
  // Standard browser envs support document.cookie
803
901
  {
804
- write(e, t, n, r, s, o) {
805
- const i = [e + "=" + encodeURIComponent(t)];
806
- a.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), a.isString(r) && i.push("path=" + r), a.isString(s) && i.push("domain=" + s), o === !0 && i.push("secure"), document.cookie = i.join("; ");
902
+ write(t, e, n, r, s, o, i) {
903
+ if (typeof document > "u") return;
904
+ const c = [`${t}=${encodeURIComponent(e)}`];
905
+ a.isNumber(n) && c.push(`expires=${new Date(n).toUTCString()}`), a.isString(r) && c.push(`path=${r}`), a.isString(s) && c.push(`domain=${s}`), o === !0 && c.push("secure"), a.isString(i) && c.push(`SameSite=${i}`), document.cookie = c.join("; ");
807
906
  },
808
- read(e) {
809
- const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
810
- return t ? decodeURIComponent(t[3]) : null;
907
+ read(t) {
908
+ if (typeof document > "u") return null;
909
+ const e = document.cookie.match(new RegExp("(?:^|; )" + t + "=([^;]*)"));
910
+ return e ? decodeURIComponent(e[1]) : null;
811
911
  },
812
- remove(e) {
813
- this.write(e, "", Date.now() - 864e5);
912
+ remove(t) {
913
+ this.write(t, "", Date.now() - 864e5, "/");
814
914
  }
815
915
  }
816
916
  ) : (
@@ -825,256 +925,45 @@ const zt = R.hasStandardBrowserEnv ? (
825
925
  }
826
926
  }
827
927
  );
828
- function Vt(e) {
829
- return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
830
- }
831
- function Wt(e, t) {
832
- return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
833
- }
834
- function $e(e, t) {
835
- return e && !Vt(t) ? Wt(e, t) : t;
836
- }
837
- const Kt = R.hasStandardBrowserEnv ? (
838
- // Standard browser envs have full support of the APIs needed to test
839
- // whether the request URL is of the same origin as current location.
840
- function() {
841
- const t = /(msie|trident)/i.test(navigator.userAgent), n = document.createElement("a");
842
- let r;
843
- function s(o) {
844
- let i = o;
845
- return t && (n.setAttribute("href", i), i = n.href), n.setAttribute("href", i), {
846
- href: n.href,
847
- protocol: n.protocol ? n.protocol.replace(/:$/, "") : "",
848
- host: n.host,
849
- search: n.search ? n.search.replace(/^\?/, "") : "",
850
- hash: n.hash ? n.hash.replace(/^#/, "") : "",
851
- hostname: n.hostname,
852
- port: n.port,
853
- pathname: n.pathname.charAt(0) === "/" ? n.pathname : "/" + n.pathname
854
- };
855
- }
856
- return r = s(window.location.href), function(i) {
857
- const c = a.isString(i) ? s(i) : i;
858
- return c.protocol === r.protocol && c.host === r.host;
859
- };
860
- }()
861
- ) : (
862
- // Non standard browser envs (web workers, react-native) lack needed support.
863
- /* @__PURE__ */ function() {
864
- return function() {
865
- return !0;
866
- };
867
- }()
868
- );
869
- function Gt(e) {
870
- const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
871
- return t && t[1] || "";
928
+ function Cn(t) {
929
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
872
930
  }
873
- function Xt(e, t) {
874
- e = e || 10;
875
- const n = new Array(e), r = new Array(e);
876
- let s = 0, o = 0, i;
877
- return t = t !== void 0 ? t : 1e3, function(d) {
878
- const f = Date.now(), u = r[o];
879
- i || (i = f), n[s] = d, r[s] = f;
880
- let l = o, b = 0;
881
- for (; l !== s; )
882
- b += n[l++], l = l % e;
883
- if (s = (s + 1) % e, s === o && (o = (o + 1) % e), f - i < t)
884
- return;
885
- const S = u && f - u;
886
- return S ? Math.round(b * 1e3 / S) : void 0;
887
- };
931
+ function Fn(t, e) {
932
+ return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t;
888
933
  }
889
- function he(e, t) {
890
- let n = 0;
891
- const r = Xt(50, 250);
892
- return (s) => {
893
- const o = s.loaded, i = s.lengthComputable ? s.total : void 0, c = o - n, d = r(c), f = o <= i;
894
- n = o;
895
- const u = {
896
- loaded: o,
897
- total: i,
898
- progress: i ? o / i : void 0,
899
- bytes: c,
900
- rate: d || void 0,
901
- estimated: d && i && f ? (i - o) / d : void 0,
902
- event: s
903
- };
904
- u[t ? "download" : "upload"] = !0, e(u);
905
- };
934
+ function at(t, e, n) {
935
+ let r = !Cn(e);
936
+ return t && (r || n == !1) ? Fn(t, e) : e;
906
937
  }
907
- const vt = typeof XMLHttpRequest < "u", Zt = vt && function(e) {
908
- return new Promise(function(n, r) {
909
- let s = e.data;
910
- const o = A.from(e.headers).normalize();
911
- let { responseType: i, withXSRFToken: c } = e, d;
912
- function f() {
913
- e.cancelToken && e.cancelToken.unsubscribe(d), e.signal && e.signal.removeEventListener("abort", d);
914
- }
915
- let u;
916
- if (a.isFormData(s)) {
917
- if (R.hasStandardBrowserEnv || R.hasStandardBrowserWebWorkerEnv)
918
- o.setContentType(!1);
919
- else if ((u = o.getContentType()) !== !1) {
920
- const [p, ...w] = u ? u.split(";").map((E) => E.trim()).filter(Boolean) : [];
921
- o.setContentType([p || "multipart/form-data", ...w].join("; "));
922
- }
923
- }
924
- let l = new XMLHttpRequest();
925
- if (e.auth) {
926
- const p = e.auth.username || "", w = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
927
- o.set("Authorization", "Basic " + btoa(p + ":" + w));
928
- }
929
- const b = $e(e.baseURL, e.url);
930
- l.open(e.method.toUpperCase(), ke(b, e.params, e.paramsSerializer), !0), l.timeout = e.timeout;
931
- function S() {
932
- if (!l)
933
- return;
934
- const p = A.from(
935
- "getAllResponseHeaders" in l && l.getAllResponseHeaders()
936
- ), E = {
937
- data: !i || i === "text" || i === "json" ? l.responseText : l.response,
938
- status: l.status,
939
- statusText: l.statusText,
940
- headers: p,
941
- config: e,
942
- request: l
943
- };
944
- Jt(function(_) {
945
- n(_), f();
946
- }, function(_) {
947
- r(_), f();
948
- }, E), l = null;
949
- }
950
- if ("onloadend" in l ? l.onloadend = S : l.onreadystatechange = function() {
951
- !l || l.readyState !== 4 || l.status === 0 && !(l.responseURL && l.responseURL.indexOf("file:") === 0) || setTimeout(S);
952
- }, l.onabort = function() {
953
- l && (r(new m("Request aborted", m.ECONNABORTED, e, l)), l = null);
954
- }, l.onerror = function() {
955
- r(new m("Network Error", m.ERR_NETWORK, e, l)), l = null;
956
- }, l.ontimeout = function() {
957
- let w = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
958
- const E = e.transitional || Ce;
959
- e.timeoutErrorMessage && (w = e.timeoutErrorMessage), r(new m(
960
- w,
961
- E.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
962
- e,
963
- l
964
- )), l = null;
965
- }, R.hasStandardBrowserEnv && (c && a.isFunction(c) && (c = c(e)), c || c !== !1 && Kt(b))) {
966
- const p = e.xsrfHeaderName && e.xsrfCookieName && zt.read(e.xsrfCookieName);
967
- p && o.set(e.xsrfHeaderName, p);
968
- }
969
- s === void 0 && o.setContentType(null), "setRequestHeader" in l && a.forEach(o.toJSON(), function(w, E) {
970
- l.setRequestHeader(E, w);
971
- }), a.isUndefined(e.withCredentials) || (l.withCredentials = !!e.withCredentials), i && i !== "json" && (l.responseType = e.responseType), typeof e.onDownloadProgress == "function" && l.addEventListener("progress", he(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && l.upload && l.upload.addEventListener("progress", he(e.onUploadProgress)), (e.cancelToken || e.signal) && (d = (p) => {
972
- l && (r(!p || p.type ? new B(null, e, l) : p), l.abort(), l = null);
973
- }, e.cancelToken && e.cancelToken.subscribe(d), e.signal && (e.signal.aborted ? d() : e.signal.addEventListener("abort", d)));
974
- const h = Gt(b);
975
- if (h && R.protocols.indexOf(h) === -1) {
976
- r(new m("Unsupported protocol " + h + ":", m.ERR_BAD_REQUEST, e));
977
- return;
978
- }
979
- l.send(s || null);
980
- });
981
- }, Z = {
982
- http: Ot,
983
- xhr: Zt
984
- };
985
- a.forEach(Z, (e, t) => {
986
- if (e) {
987
- try {
988
- Object.defineProperty(e, "name", { value: t });
989
- } catch {
990
- }
991
- Object.defineProperty(e, "adapterName", { value: t });
992
- }
993
- });
994
- const pe = (e) => `- ${e}`, Yt = (e) => a.isFunction(e) || e === null || e === !1, Le = {
995
- getAdapter: (e) => {
996
- e = a.isArray(e) ? e : [e];
997
- const { length: t } = e;
998
- let n, r;
999
- const s = {};
1000
- for (let o = 0; o < t; o++) {
1001
- n = e[o];
1002
- let i;
1003
- if (r = n, !Yt(n) && (r = Z[(i = String(n)).toLowerCase()], r === void 0))
1004
- throw new m(`Unknown adapter '${i}'`);
1005
- if (r)
1006
- break;
1007
- s[i || "#" + o] = r;
1008
- }
1009
- if (!r) {
1010
- const o = Object.entries(s).map(
1011
- ([c, d]) => `adapter ${c} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
1012
- );
1013
- let i = t ? o.length > 1 ? `since :
1014
- ` + o.map(pe).join(`
1015
- `) : " " + pe(o[0]) : "as no adapter specified";
1016
- throw new m(
1017
- "There is no suitable adapter to dispatch the request " + i,
1018
- "ERR_NOT_SUPPORT"
1019
- );
1020
- }
1021
- return r;
1022
- },
1023
- adapters: Z
1024
- };
1025
- function G(e) {
1026
- if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1027
- throw new B(null, e);
1028
- }
1029
- function me(e) {
1030
- return G(e), e.headers = A.from(e.headers), e.data = K.call(
1031
- e,
1032
- e.transformRequest
1033
- ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Le.getAdapter(e.adapter || se.adapter)(e).then(function(r) {
1034
- return G(e), r.data = K.call(
1035
- e,
1036
- e.transformResponse,
1037
- r
1038
- ), r.headers = A.from(r.headers), r;
1039
- }, function(r) {
1040
- return De(r) || (G(e), r && r.response && (r.response.data = K.call(
1041
- e,
1042
- e.transformResponse,
1043
- r.response
1044
- ), r.response.headers = A.from(r.response.headers))), Promise.reject(r);
1045
- });
1046
- }
1047
- const ye = (e) => e instanceof A ? { ...e } : e;
1048
- function x(e, t) {
1049
- t = t || {};
938
+ const $e = (t) => t instanceof T ? { ...t } : t;
939
+ function D(t, e) {
940
+ e = e || {};
1050
941
  const n = {};
1051
- function r(f, u, l) {
1052
- return a.isPlainObject(f) && a.isPlainObject(u) ? a.merge.call({ caseless: l }, f, u) : a.isPlainObject(u) ? a.merge({}, u) : a.isArray(u) ? u.slice() : u;
1053
- }
1054
- function s(f, u, l) {
1055
- if (a.isUndefined(u)) {
1056
- if (!a.isUndefined(f))
1057
- return r(void 0, f, l);
1058
- } else
1059
- return r(f, u, l);
1060
- }
1061
- function o(f, u) {
1062
- if (!a.isUndefined(u))
942
+ function r(u, l, p, b) {
943
+ return a.isPlainObject(u) && a.isPlainObject(l) ? a.merge.call({ caseless: b }, u, l) : a.isPlainObject(l) ? a.merge({}, l) : a.isArray(l) ? l.slice() : l;
944
+ }
945
+ function s(u, l, p, b) {
946
+ if (a.isUndefined(l)) {
947
+ if (!a.isUndefined(u))
948
+ return r(void 0, u, p, b);
949
+ } else return r(u, l, p, b);
950
+ }
951
+ function o(u, l) {
952
+ if (!a.isUndefined(l))
953
+ return r(void 0, l);
954
+ }
955
+ function i(u, l) {
956
+ if (a.isUndefined(l)) {
957
+ if (!a.isUndefined(u))
958
+ return r(void 0, u);
959
+ } else return r(void 0, l);
960
+ }
961
+ function c(u, l, p) {
962
+ if (p in e)
963
+ return r(u, l);
964
+ if (p in t)
1063
965
  return r(void 0, u);
1064
966
  }
1065
- function i(f, u) {
1066
- if (a.isUndefined(u)) {
1067
- if (!a.isUndefined(f))
1068
- return r(void 0, f);
1069
- } else
1070
- return r(void 0, u);
1071
- }
1072
- function c(f, u, l) {
1073
- if (l in t)
1074
- return r(f, u);
1075
- if (l in e)
1076
- return r(void 0, f);
1077
- }
1078
967
  const d = {
1079
968
  url: o,
1080
969
  method: o,
@@ -1104,64 +993,462 @@ function x(e, t) {
1104
993
  socketPath: i,
1105
994
  responseEncoding: i,
1106
995
  validateStatus: c,
1107
- headers: (f, u) => s(ye(f), ye(u), !0)
996
+ headers: (u, l, p) => s($e(u), $e(l), p, !0)
1108
997
  };
1109
- return a.forEach(Object.keys(Object.assign({}, e, t)), function(u) {
1110
- const l = d[u] || s, b = l(e[u], t[u], u);
1111
- a.isUndefined(b) && l !== c || (n[u] = b);
998
+ return a.forEach(Object.keys({ ...t, ...e }), function(l) {
999
+ const p = d[l] || s, b = p(t[l], e[l], l);
1000
+ a.isUndefined(b) && p !== c || (n[l] = b);
1112
1001
  }), n;
1113
1002
  }
1114
- const Ue = "1.6.8", oe = {};
1115
- ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
1116
- oe[e] = function(r) {
1117
- return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
1003
+ const ct = (t) => {
1004
+ const e = D({}, t);
1005
+ let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } = e;
1006
+ if (e.headers = i = T.from(i), e.url = nt(at(e.baseURL, e.url, e.allowAbsoluteUrls), t.params, t.paramsSerializer), c && i.set(
1007
+ "Authorization",
1008
+ "Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
1009
+ ), a.isFormData(n)) {
1010
+ if (R.hasStandardBrowserEnv || R.hasStandardBrowserWebWorkerEnv)
1011
+ i.setContentType(void 0);
1012
+ else if (a.isFunction(n.getHeaders)) {
1013
+ const d = n.getHeaders(), u = ["content-type", "content-length"];
1014
+ Object.entries(d).forEach(([l, p]) => {
1015
+ u.includes(l.toLowerCase()) && i.set(l, p);
1016
+ });
1017
+ }
1018
+ }
1019
+ if (R.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(e)), r || r !== !1 && xn(e.url))) {
1020
+ const d = s && o && _n.read(o);
1021
+ d && i.set(s, d);
1022
+ }
1023
+ return e;
1024
+ }, Nn = typeof XMLHttpRequest < "u", kn = Nn && function(t) {
1025
+ return new Promise(function(n, r) {
1026
+ const s = ct(t);
1027
+ let o = s.data;
1028
+ const i = T.from(s.headers).normalize();
1029
+ let { responseType: c, onUploadProgress: d, onDownloadProgress: u } = s, l, p, b, S, f;
1030
+ function m() {
1031
+ S && S(), f && f(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
1032
+ }
1033
+ let h = new XMLHttpRequest();
1034
+ h.open(s.method.toUpperCase(), s.url, !0), h.timeout = s.timeout;
1035
+ function g() {
1036
+ if (!h)
1037
+ return;
1038
+ const E = T.from(
1039
+ "getAllResponseHeaders" in h && h.getAllResponseHeaders()
1040
+ ), C = {
1041
+ data: !c || c === "text" || c === "json" ? h.responseText : h.response,
1042
+ status: h.status,
1043
+ statusText: h.statusText,
1044
+ headers: E,
1045
+ config: t,
1046
+ request: h
1047
+ };
1048
+ it(function(_) {
1049
+ n(_), m();
1050
+ }, function(_) {
1051
+ r(_), m();
1052
+ }, C), h = null;
1053
+ }
1054
+ "onloadend" in h ? h.onloadend = g : h.onreadystatechange = function() {
1055
+ !h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(g);
1056
+ }, h.onabort = function() {
1057
+ h && (r(new y("Request aborted", y.ECONNABORTED, t, h)), h = null);
1058
+ }, h.onerror = function(O) {
1059
+ const C = O && O.message ? O.message : "Network Error", L = new y(C, y.ERR_NETWORK, t, h);
1060
+ L.event = O || null, r(L), h = null;
1061
+ }, h.ontimeout = function() {
1062
+ let O = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1063
+ const C = s.transitional || rt;
1064
+ s.timeoutErrorMessage && (O = s.timeoutErrorMessage), r(new y(
1065
+ O,
1066
+ C.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
1067
+ t,
1068
+ h
1069
+ )), h = null;
1070
+ }, o === void 0 && i.setContentType(null), "setRequestHeader" in h && a.forEach(i.toJSON(), function(O, C) {
1071
+ h.setRequestHeader(C, O);
1072
+ }), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), c && c !== "json" && (h.responseType = s.responseType), u && ([b, f] = re(u, !0), h.addEventListener("progress", b)), d && h.upload && ([p, S] = re(d), h.upload.addEventListener("progress", p), h.upload.addEventListener("loadend", S)), (s.cancelToken || s.signal) && (l = (E) => {
1073
+ h && (r(!E || E.type ? new H(null, t, h) : E), h.abort(), h = null);
1074
+ }, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
1075
+ const x = On(s.url);
1076
+ if (x && R.protocols.indexOf(x) === -1) {
1077
+ r(new y("Unsupported protocol " + x + ":", y.ERR_BAD_REQUEST, t));
1078
+ return;
1079
+ }
1080
+ h.send(o || null);
1081
+ });
1082
+ }, Pn = (t, e) => {
1083
+ const { length: n } = t = t ? t.filter(Boolean) : [];
1084
+ if (e || n) {
1085
+ let r = new AbortController(), s;
1086
+ const o = function(u) {
1087
+ if (!s) {
1088
+ s = !0, c();
1089
+ const l = u instanceof Error ? u : this.reason;
1090
+ r.abort(l instanceof y ? l : new H(l instanceof Error ? l.message : l));
1091
+ }
1092
+ };
1093
+ let i = e && setTimeout(() => {
1094
+ i = null, o(new y(`timeout ${e} of ms exceeded`, y.ETIMEDOUT));
1095
+ }, e);
1096
+ const c = () => {
1097
+ t && (i && clearTimeout(i), i = null, t.forEach((u) => {
1098
+ u.unsubscribe ? u.unsubscribe(o) : u.removeEventListener("abort", o);
1099
+ }), t = null);
1100
+ };
1101
+ t.forEach((u) => u.addEventListener("abort", o));
1102
+ const { signal: d } = r;
1103
+ return d.unsubscribe = () => a.asap(c), d;
1104
+ }
1105
+ }, Un = function* (t, e) {
1106
+ let n = t.byteLength;
1107
+ if (n < e) {
1108
+ yield t;
1109
+ return;
1110
+ }
1111
+ let r = 0, s;
1112
+ for (; r < n; )
1113
+ s = r + e, yield t.slice(r, s), r = s;
1114
+ }, Ln = async function* (t, e) {
1115
+ for await (const n of $n(t))
1116
+ yield* Un(n, e);
1117
+ }, $n = async function* (t) {
1118
+ if (t[Symbol.asyncIterator]) {
1119
+ yield* t;
1120
+ return;
1121
+ }
1122
+ const e = t.getReader();
1123
+ try {
1124
+ for (; ; ) {
1125
+ const { done: n, value: r } = await e.read();
1126
+ if (n)
1127
+ break;
1128
+ yield r;
1129
+ }
1130
+ } finally {
1131
+ await e.cancel();
1132
+ }
1133
+ }, je = (t, e, n, r) => {
1134
+ const s = Ln(t, e);
1135
+ let o = 0, i, c = (d) => {
1136
+ i || (i = !0, r && r(d));
1137
+ };
1138
+ return new ReadableStream({
1139
+ async pull(d) {
1140
+ try {
1141
+ const { done: u, value: l } = await s.next();
1142
+ if (u) {
1143
+ c(), d.close();
1144
+ return;
1145
+ }
1146
+ let p = l.byteLength;
1147
+ if (n) {
1148
+ let b = o += p;
1149
+ n(b);
1150
+ }
1151
+ d.enqueue(new Uint8Array(l));
1152
+ } catch (u) {
1153
+ throw c(u), u;
1154
+ }
1155
+ },
1156
+ cancel(d) {
1157
+ return c(d), s.return();
1158
+ }
1159
+ }, {
1160
+ highWaterMark: 2
1161
+ });
1162
+ }, Be = 64 * 1024, { isFunction: Z } = a, jn = (({ Request: t, Response: e }) => ({
1163
+ Request: t,
1164
+ Response: e
1165
+ }))(a.global), {
1166
+ ReadableStream: De,
1167
+ TextEncoder: qe
1168
+ } = a.global, Me = (t, ...e) => {
1169
+ try {
1170
+ return !!t(...e);
1171
+ } catch {
1172
+ return !1;
1173
+ }
1174
+ }, Bn = (t) => {
1175
+ t = a.merge.call({
1176
+ skipUndefined: !0
1177
+ }, jn, t);
1178
+ const { fetch: e, Request: n, Response: r } = t, s = e ? Z(e) : typeof fetch == "function", o = Z(n), i = Z(r);
1179
+ if (!s)
1180
+ return !1;
1181
+ const c = s && Z(De), d = s && (typeof qe == "function" ? /* @__PURE__ */ ((f) => (m) => f.encode(m))(new qe()) : async (f) => new Uint8Array(await new n(f).arrayBuffer())), u = o && c && Me(() => {
1182
+ let f = !1;
1183
+ const m = new n(R.origin, {
1184
+ body: new De(),
1185
+ method: "POST",
1186
+ get duplex() {
1187
+ return f = !0, "half";
1188
+ }
1189
+ }).headers.has("Content-Type");
1190
+ return f && !m;
1191
+ }), l = i && c && Me(() => a.isReadableStream(new r("").body)), p = {
1192
+ stream: l && ((f) => f.body)
1193
+ };
1194
+ s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((f) => {
1195
+ !p[f] && (p[f] = (m, h) => {
1196
+ let g = m && m[f];
1197
+ if (g)
1198
+ return g.call(m);
1199
+ throw new y(`Response type '${f}' is not supported`, y.ERR_NOT_SUPPORT, h);
1200
+ });
1201
+ });
1202
+ const b = async (f) => {
1203
+ if (f == null)
1204
+ return 0;
1205
+ if (a.isBlob(f))
1206
+ return f.size;
1207
+ if (a.isSpecCompliantForm(f))
1208
+ return (await new n(R.origin, {
1209
+ method: "POST",
1210
+ body: f
1211
+ }).arrayBuffer()).byteLength;
1212
+ if (a.isArrayBufferView(f) || a.isArrayBuffer(f))
1213
+ return f.byteLength;
1214
+ if (a.isURLSearchParams(f) && (f = f + ""), a.isString(f))
1215
+ return (await d(f)).byteLength;
1216
+ }, S = async (f, m) => {
1217
+ const h = a.toFiniteNumber(f.getContentLength());
1218
+ return h ?? b(m);
1219
+ };
1220
+ return async (f) => {
1221
+ let {
1222
+ url: m,
1223
+ method: h,
1224
+ data: g,
1225
+ signal: x,
1226
+ cancelToken: E,
1227
+ timeout: O,
1228
+ onDownloadProgress: C,
1229
+ onUploadProgress: L,
1230
+ responseType: _,
1231
+ headers: le,
1232
+ withCredentials: K = "same-origin",
1233
+ fetchOptions: Re
1234
+ } = ct(f), Oe = e || fetch;
1235
+ _ = _ ? (_ + "").toLowerCase() : "text";
1236
+ let X = Pn([x, E && E.toAbortSignal()], O), Q = null;
1237
+ const $ = X && X.unsubscribe && (() => {
1238
+ X.unsubscribe();
1239
+ });
1240
+ let Ae;
1241
+ try {
1242
+ if (L && u && h !== "get" && h !== "head" && (Ae = await S(le, g)) !== 0) {
1243
+ let U = new n(m, {
1244
+ method: "POST",
1245
+ body: g,
1246
+ duplex: "half"
1247
+ }), q;
1248
+ if (a.isFormData(g) && (q = U.headers.get("content-type")) && le.setContentType(q), U.body) {
1249
+ const [ue, G] = Ue(
1250
+ Ae,
1251
+ re(Le(L))
1252
+ );
1253
+ g = je(U.body, Be, ue, G);
1254
+ }
1255
+ }
1256
+ a.isString(K) || (K = K ? "include" : "omit");
1257
+ const N = o && "credentials" in n.prototype, Te = {
1258
+ ...Re,
1259
+ signal: X,
1260
+ method: h.toUpperCase(),
1261
+ headers: le.normalize().toJSON(),
1262
+ body: g,
1263
+ duplex: "half",
1264
+ credentials: N ? K : void 0
1265
+ };
1266
+ Q = o && new n(m, Te);
1267
+ let P = await (o ? Oe(Q, Re) : Oe(m, Te));
1268
+ const xe = l && (_ === "stream" || _ === "response");
1269
+ if (l && (C || xe && $)) {
1270
+ const U = {};
1271
+ ["status", "statusText", "headers"].forEach((_e) => {
1272
+ U[_e] = P[_e];
1273
+ });
1274
+ const q = a.toFiniteNumber(P.headers.get("content-length")), [ue, G] = C && Ue(
1275
+ q,
1276
+ re(Le(C), !0)
1277
+ ) || [];
1278
+ P = new r(
1279
+ je(P.body, Be, ue, () => {
1280
+ G && G(), $ && $();
1281
+ }),
1282
+ U
1283
+ );
1284
+ }
1285
+ _ = _ || "text";
1286
+ let pt = await p[a.findKey(p, _) || "text"](P, f);
1287
+ return !xe && $ && $(), await new Promise((U, q) => {
1288
+ it(U, q, {
1289
+ data: pt,
1290
+ headers: T.from(P.headers),
1291
+ status: P.status,
1292
+ statusText: P.statusText,
1293
+ config: f,
1294
+ request: Q
1295
+ });
1296
+ });
1297
+ } catch (N) {
1298
+ throw $ && $(), N && N.name === "TypeError" && /Load failed|fetch/i.test(N.message) ? Object.assign(
1299
+ new y("Network Error", y.ERR_NETWORK, f, Q),
1300
+ {
1301
+ cause: N.cause || N
1302
+ }
1303
+ ) : y.from(N, N && N.code, f, Q);
1304
+ }
1305
+ };
1306
+ }, Dn = /* @__PURE__ */ new Map(), lt = (t) => {
1307
+ let e = t && t.env || {};
1308
+ const { fetch: n, Request: r, Response: s } = e, o = [
1309
+ r,
1310
+ s,
1311
+ n
1312
+ ];
1313
+ let i = o.length, c = i, d, u, l = Dn;
1314
+ for (; c--; )
1315
+ d = o[c], u = l.get(d), u === void 0 && l.set(d, u = c ? /* @__PURE__ */ new Map() : Bn(e)), l = u;
1316
+ return u;
1317
+ };
1318
+ lt();
1319
+ const Se = {
1320
+ http: en,
1321
+ xhr: kn,
1322
+ fetch: {
1323
+ get: lt
1324
+ }
1325
+ };
1326
+ a.forEach(Se, (t, e) => {
1327
+ if (t) {
1328
+ try {
1329
+ Object.defineProperty(t, "name", { value: e });
1330
+ } catch {
1331
+ }
1332
+ Object.defineProperty(t, "adapterName", { value: e });
1333
+ }
1334
+ });
1335
+ const Ie = (t) => `- ${t}`, qn = (t) => a.isFunction(t) || t === null || t === !1;
1336
+ function Mn(t, e) {
1337
+ t = a.isArray(t) ? t : [t];
1338
+ const { length: n } = t;
1339
+ let r, s;
1340
+ const o = {};
1341
+ for (let i = 0; i < n; i++) {
1342
+ r = t[i];
1343
+ let c;
1344
+ if (s = r, !qn(r) && (s = Se[(c = String(r)).toLowerCase()], s === void 0))
1345
+ throw new y(`Unknown adapter '${c}'`);
1346
+ if (s && (a.isFunction(s) || (s = s.get(e))))
1347
+ break;
1348
+ o[c || "#" + i] = s;
1349
+ }
1350
+ if (!s) {
1351
+ const i = Object.entries(o).map(
1352
+ ([d, u]) => `adapter ${d} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
1353
+ );
1354
+ let c = n ? i.length > 1 ? `since :
1355
+ ` + i.map(Ie).join(`
1356
+ `) : " " + Ie(i[0]) : "as no adapter specified";
1357
+ throw new y(
1358
+ "There is no suitable adapter to dispatch the request " + c,
1359
+ "ERR_NOT_SUPPORT"
1360
+ );
1361
+ }
1362
+ return s;
1363
+ }
1364
+ const ut = {
1365
+ /**
1366
+ * Resolve an adapter from a list of adapter names or functions.
1367
+ * @type {Function}
1368
+ */
1369
+ getAdapter: Mn,
1370
+ /**
1371
+ * Exposes all known adapters
1372
+ * @type {Object<string, Function|Object>}
1373
+ */
1374
+ adapters: Se
1375
+ };
1376
+ function he(t) {
1377
+ if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
1378
+ throw new H(null, t);
1379
+ }
1380
+ function He(t) {
1381
+ return he(t), t.headers = T.from(t.headers), t.data = de.call(
1382
+ t,
1383
+ t.transformRequest
1384
+ ), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), ut.getAdapter(t.adapter || W.adapter, t)(t).then(function(r) {
1385
+ return he(t), r.data = de.call(
1386
+ t,
1387
+ t.transformResponse,
1388
+ r
1389
+ ), r.headers = T.from(r.headers), r;
1390
+ }, function(r) {
1391
+ return ot(r) || (he(t), r && r.response && (r.response.data = de.call(
1392
+ t,
1393
+ t.transformResponse,
1394
+ r.response
1395
+ ), r.response.headers = T.from(r.response.headers))), Promise.reject(r);
1396
+ });
1397
+ }
1398
+ const ft = "1.13.2", ce = {};
1399
+ ["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
1400
+ ce[t] = function(r) {
1401
+ return typeof r === t || "a" + (e < 1 ? "n " : " ") + t;
1118
1402
  };
1119
1403
  });
1120
- const be = {};
1121
- oe.transitional = function(t, n, r) {
1404
+ const Qe = {};
1405
+ ce.transitional = function(e, n, r) {
1122
1406
  function s(o, i) {
1123
- return "[Axios v" + Ue + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
1407
+ return "[Axios v" + ft + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
1124
1408
  }
1125
1409
  return (o, i, c) => {
1126
- if (t === !1)
1127
- throw new m(
1410
+ if (e === !1)
1411
+ throw new y(
1128
1412
  s(i, " has been removed" + (n ? " in " + n : "")),
1129
- m.ERR_DEPRECATED
1413
+ y.ERR_DEPRECATED
1130
1414
  );
1131
- return n && !be[i] && (be[i] = !0, console.warn(
1415
+ return n && !Qe[i] && (Qe[i] = !0, console.warn(
1132
1416
  s(
1133
1417
  i,
1134
1418
  " has been deprecated since v" + n + " and will be removed in the near future"
1135
1419
  )
1136
- )), t ? t(o, i, c) : !0;
1420
+ )), e ? e(o, i, c) : !0;
1137
1421
  };
1138
1422
  };
1139
- function en(e, t, n) {
1140
- if (typeof e != "object")
1141
- throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
1142
- const r = Object.keys(e);
1423
+ ce.spelling = function(e) {
1424
+ return (n, r) => (console.warn(`${r} is likely a misspelling of ${e}`), !0);
1425
+ };
1426
+ function In(t, e, n) {
1427
+ if (typeof t != "object")
1428
+ throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
1429
+ const r = Object.keys(t);
1143
1430
  let s = r.length;
1144
1431
  for (; s-- > 0; ) {
1145
- const o = r[s], i = t[o];
1432
+ const o = r[s], i = e[o];
1146
1433
  if (i) {
1147
- const c = e[o], d = c === void 0 || i(c, o, e);
1434
+ const c = t[o], d = c === void 0 || i(c, o, t);
1148
1435
  if (d !== !0)
1149
- throw new m("option " + o + " must be " + d, m.ERR_BAD_OPTION_VALUE);
1436
+ throw new y("option " + o + " must be " + d, y.ERR_BAD_OPTION_VALUE);
1150
1437
  continue;
1151
1438
  }
1152
1439
  if (n !== !0)
1153
- throw new m("Unknown option " + o, m.ERR_BAD_OPTION);
1440
+ throw new y("Unknown option " + o, y.ERR_BAD_OPTION);
1154
1441
  }
1155
1442
  }
1156
- const Y = {
1157
- assertOptions: en,
1158
- validators: oe
1159
- }, N = Y.validators;
1160
- class I {
1161
- constructor(t) {
1162
- this.defaults = t, this.interceptors = {
1163
- request: new fe(),
1164
- response: new fe()
1443
+ const ne = {
1444
+ assertOptions: In,
1445
+ validators: ce
1446
+ }, k = ne.validators;
1447
+ let B = class {
1448
+ constructor(e) {
1449
+ this.defaults = e || {}, this.interceptors = {
1450
+ request: new ke(),
1451
+ response: new ke()
1165
1452
  };
1166
1453
  }
1167
1454
  /**
@@ -1172,99 +1459,105 @@ class I {
1172
1459
  *
1173
1460
  * @returns {Promise} The Promise to be fulfilled
1174
1461
  */
1175
- async request(t, n) {
1462
+ async request(e, n) {
1176
1463
  try {
1177
- return await this._request(t, n);
1464
+ return await this._request(e, n);
1178
1465
  } catch (r) {
1179
1466
  if (r instanceof Error) {
1180
- let s;
1181
- Error.captureStackTrace ? Error.captureStackTrace(s = {}) : s = new Error();
1467
+ let s = {};
1468
+ Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
1182
1469
  const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
1183
- r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
1470
+ try {
1471
+ r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
1184
1472
  ` + o) : r.stack = o;
1473
+ } catch {
1474
+ }
1185
1475
  }
1186
1476
  throw r;
1187
1477
  }
1188
1478
  }
1189
- _request(t, n) {
1190
- typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = x(this.defaults, n);
1479
+ _request(e, n) {
1480
+ typeof e == "string" ? (n = n || {}, n.url = e) : n = e || {}, n = D(this.defaults, n);
1191
1481
  const { transitional: r, paramsSerializer: s, headers: o } = n;
1192
- r !== void 0 && Y.assertOptions(r, {
1193
- silentJSONParsing: N.transitional(N.boolean),
1194
- forcedJSONParsing: N.transitional(N.boolean),
1195
- clarifyTimeoutError: N.transitional(N.boolean)
1482
+ r !== void 0 && ne.assertOptions(r, {
1483
+ silentJSONParsing: k.transitional(k.boolean),
1484
+ forcedJSONParsing: k.transitional(k.boolean),
1485
+ clarifyTimeoutError: k.transitional(k.boolean)
1196
1486
  }, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
1197
1487
  serialize: s
1198
- } : Y.assertOptions(s, {
1199
- encode: N.function,
1200
- serialize: N.function
1201
- }, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
1488
+ } : ne.assertOptions(s, {
1489
+ encode: k.function,
1490
+ serialize: k.function
1491
+ }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), ne.assertOptions(n, {
1492
+ baseUrl: k.spelling("baseURL"),
1493
+ withXsrfToken: k.spelling("withXSRFToken")
1494
+ }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
1202
1495
  let i = o && a.merge(
1203
1496
  o.common,
1204
1497
  o[n.method]
1205
1498
  );
1206
1499
  o && a.forEach(
1207
1500
  ["delete", "get", "head", "post", "put", "patch", "common"],
1208
- (h) => {
1209
- delete o[h];
1501
+ (f) => {
1502
+ delete o[f];
1210
1503
  }
1211
- ), n.headers = A.concat(i, o);
1504
+ ), n.headers = T.concat(i, o);
1212
1505
  const c = [];
1213
1506
  let d = !0;
1214
- this.interceptors.request.forEach(function(p) {
1215
- typeof p.runWhen == "function" && p.runWhen(n) === !1 || (d = d && p.synchronous, c.unshift(p.fulfilled, p.rejected));
1507
+ this.interceptors.request.forEach(function(m) {
1508
+ typeof m.runWhen == "function" && m.runWhen(n) === !1 || (d = d && m.synchronous, c.unshift(m.fulfilled, m.rejected));
1216
1509
  });
1217
- const f = [];
1218
- this.interceptors.response.forEach(function(p) {
1219
- f.push(p.fulfilled, p.rejected);
1510
+ const u = [];
1511
+ this.interceptors.response.forEach(function(m) {
1512
+ u.push(m.fulfilled, m.rejected);
1220
1513
  });
1221
- let u, l = 0, b;
1514
+ let l, p = 0, b;
1222
1515
  if (!d) {
1223
- const h = [me.bind(this), void 0];
1224
- for (h.unshift.apply(h, c), h.push.apply(h, f), b = h.length, u = Promise.resolve(n); l < b; )
1225
- u = u.then(h[l++], h[l++]);
1226
- return u;
1516
+ const f = [He.bind(this), void 0];
1517
+ for (f.unshift(...c), f.push(...u), b = f.length, l = Promise.resolve(n); p < b; )
1518
+ l = l.then(f[p++], f[p++]);
1519
+ return l;
1227
1520
  }
1228
1521
  b = c.length;
1229
1522
  let S = n;
1230
- for (l = 0; l < b; ) {
1231
- const h = c[l++], p = c[l++];
1523
+ for (; p < b; ) {
1524
+ const f = c[p++], m = c[p++];
1232
1525
  try {
1233
- S = h(S);
1234
- } catch (w) {
1235
- p.call(this, w);
1526
+ S = f(S);
1527
+ } catch (h) {
1528
+ m.call(this, h);
1236
1529
  break;
1237
1530
  }
1238
1531
  }
1239
1532
  try {
1240
- u = me.call(this, S);
1241
- } catch (h) {
1242
- return Promise.reject(h);
1533
+ l = He.call(this, S);
1534
+ } catch (f) {
1535
+ return Promise.reject(f);
1243
1536
  }
1244
- for (l = 0, b = f.length; l < b; )
1245
- u = u.then(f[l++], f[l++]);
1246
- return u;
1537
+ for (p = 0, b = u.length; p < b; )
1538
+ l = l.then(u[p++], u[p++]);
1539
+ return l;
1247
1540
  }
1248
- getUri(t) {
1249
- t = x(this.defaults, t);
1250
- const n = $e(t.baseURL, t.url);
1251
- return ke(n, t.params, t.paramsSerializer);
1541
+ getUri(e) {
1542
+ e = D(this.defaults, e);
1543
+ const n = at(e.baseURL, e.url, e.allowAbsoluteUrls);
1544
+ return nt(n, e.params, e.paramsSerializer);
1252
1545
  }
1253
- }
1254
- a.forEach(["delete", "get", "head", "options"], function(t) {
1255
- I.prototype[t] = function(n, r) {
1256
- return this.request(x(r || {}, {
1257
- method: t,
1546
+ };
1547
+ a.forEach(["delete", "get", "head", "options"], function(e) {
1548
+ B.prototype[e] = function(n, r) {
1549
+ return this.request(D(r || {}, {
1550
+ method: e,
1258
1551
  url: n,
1259
1552
  data: (r || {}).data
1260
1553
  }));
1261
1554
  };
1262
1555
  });
1263
- a.forEach(["post", "put", "patch"], function(t) {
1556
+ a.forEach(["post", "put", "patch"], function(e) {
1264
1557
  function n(r) {
1265
1558
  return function(o, i, c) {
1266
- return this.request(x(c || {}, {
1267
- method: t,
1559
+ return this.request(D(c || {}, {
1560
+ method: e,
1268
1561
  headers: r ? {
1269
1562
  "Content-Type": "multipart/form-data"
1270
1563
  } : {},
@@ -1273,12 +1566,11 @@ a.forEach(["post", "put", "patch"], function(t) {
1273
1566
  }));
1274
1567
  };
1275
1568
  }
1276
- I.prototype[t] = n(), I.prototype[t + "Form"] = n(!0);
1569
+ B.prototype[e] = n(), B.prototype[e + "Form"] = n(!0);
1277
1570
  });
1278
- const H = I;
1279
- class ie {
1280
- constructor(t) {
1281
- if (typeof t != "function")
1571
+ let Hn = class dt {
1572
+ constructor(e) {
1573
+ if (typeof e != "function")
1282
1574
  throw new TypeError("executor must be a function.");
1283
1575
  let n;
1284
1576
  this.promise = new Promise(function(o) {
@@ -1286,8 +1578,7 @@ class ie {
1286
1578
  });
1287
1579
  const r = this;
1288
1580
  this.promise.then((s) => {
1289
- if (!r._listeners)
1290
- return;
1581
+ if (!r._listeners) return;
1291
1582
  let o = r._listeners.length;
1292
1583
  for (; o-- > 0; )
1293
1584
  r._listeners[o](s);
@@ -1300,8 +1591,8 @@ class ie {
1300
1591
  return i.cancel = function() {
1301
1592
  r.unsubscribe(o);
1302
1593
  }, i;
1303
- }, t(function(o, i, c) {
1304
- r.reason || (r.reason = new B(o, i, c), n(r.reason));
1594
+ }, e(function(o, i, c) {
1595
+ r.reason || (r.reason = new H(o, i, c), n(r.reason));
1305
1596
  });
1306
1597
  }
1307
1598
  /**
@@ -1314,46 +1605,51 @@ class ie {
1314
1605
  /**
1315
1606
  * Subscribe to the cancel signal
1316
1607
  */
1317
- subscribe(t) {
1608
+ subscribe(e) {
1318
1609
  if (this.reason) {
1319
- t(this.reason);
1610
+ e(this.reason);
1320
1611
  return;
1321
1612
  }
1322
- this._listeners ? this._listeners.push(t) : this._listeners = [t];
1613
+ this._listeners ? this._listeners.push(e) : this._listeners = [e];
1323
1614
  }
1324
1615
  /**
1325
1616
  * Unsubscribe from the cancel signal
1326
1617
  */
1327
- unsubscribe(t) {
1618
+ unsubscribe(e) {
1328
1619
  if (!this._listeners)
1329
1620
  return;
1330
- const n = this._listeners.indexOf(t);
1621
+ const n = this._listeners.indexOf(e);
1331
1622
  n !== -1 && this._listeners.splice(n, 1);
1332
1623
  }
1624
+ toAbortSignal() {
1625
+ const e = new AbortController(), n = (r) => {
1626
+ e.abort(r);
1627
+ };
1628
+ return this.subscribe(n), e.signal.unsubscribe = () => this.unsubscribe(n), e.signal;
1629
+ }
1333
1630
  /**
1334
1631
  * Returns an object that contains a new `CancelToken` and a function that, when called,
1335
1632
  * cancels the `CancelToken`.
1336
1633
  */
1337
1634
  static source() {
1338
- let t;
1635
+ let e;
1339
1636
  return {
1340
- token: new ie(function(s) {
1341
- t = s;
1637
+ token: new dt(function(s) {
1638
+ e = s;
1342
1639
  }),
1343
- cancel: t
1640
+ cancel: e
1344
1641
  };
1345
1642
  }
1346
- }
1347
- const tn = ie;
1348
- function nn(e) {
1643
+ };
1644
+ function Qn(t) {
1349
1645
  return function(n) {
1350
- return e.apply(null, n);
1646
+ return t.apply(null, n);
1351
1647
  };
1352
1648
  }
1353
- function rn(e) {
1354
- return a.isObject(e) && e.isAxiosError === !0;
1649
+ function Jn(t) {
1650
+ return a.isObject(t) && t.isAxiosError === !0;
1355
1651
  }
1356
- const ee = {
1652
+ const be = {
1357
1653
  Continue: 100,
1358
1654
  SwitchingProtocols: 101,
1359
1655
  Processing: 102,
@@ -1416,63 +1712,142 @@ const ee = {
1416
1712
  InsufficientStorage: 507,
1417
1713
  LoopDetected: 508,
1418
1714
  NotExtended: 510,
1419
- NetworkAuthenticationRequired: 511
1715
+ NetworkAuthenticationRequired: 511,
1716
+ WebServerIsDown: 521,
1717
+ ConnectionTimedOut: 522,
1718
+ OriginIsUnreachable: 523,
1719
+ TimeoutOccurred: 524,
1720
+ SslHandshakeFailed: 525,
1721
+ InvalidSslCertificate: 526
1420
1722
  };
1421
- Object.entries(ee).forEach(([e, t]) => {
1422
- ee[t] = e;
1723
+ Object.entries(be).forEach(([t, e]) => {
1724
+ be[e] = t;
1423
1725
  });
1424
- const sn = ee;
1425
- function He(e) {
1426
- const t = new H(e), n = Ee(H.prototype.request, t);
1427
- return a.extend(n, H.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
1428
- return He(x(e, s));
1726
+ function ht(t) {
1727
+ const e = new B(t), n = Je(B.prototype.request, e);
1728
+ return a.extend(n, B.prototype, e, { allOwnKeys: !0 }), a.extend(n, e, null, { allOwnKeys: !0 }), n.create = function(s) {
1729
+ return ht(D(t, s));
1429
1730
  }, n;
1430
1731
  }
1431
- const y = He(se);
1432
- y.Axios = H;
1433
- y.CanceledError = B;
1434
- y.CancelToken = tn;
1435
- y.isCancel = De;
1436
- y.VERSION = Ue;
1437
- y.toFormData = J;
1438
- y.AxiosError = m;
1439
- y.Cancel = y.CanceledError;
1440
- y.all = function(t) {
1441
- return Promise.all(t);
1732
+ const w = ht(W);
1733
+ w.Axios = B;
1734
+ w.CanceledError = H;
1735
+ w.CancelToken = Hn;
1736
+ w.isCancel = ot;
1737
+ w.VERSION = ft;
1738
+ w.toFormData = ae;
1739
+ w.AxiosError = y;
1740
+ w.Cancel = w.CanceledError;
1741
+ w.all = function(e) {
1742
+ return Promise.all(e);
1442
1743
  };
1443
- y.spread = nn;
1444
- y.isAxiosError = rn;
1445
- y.mergeConfig = x;
1446
- y.AxiosHeaders = A;
1447
- y.formToJSON = (e) => je(a.isHTMLForm(e) ? new FormData(e) : e);
1448
- y.getAdapter = Le.getAdapter;
1449
- y.HttpStatusCode = sn;
1450
- y.default = y;
1451
- const we = { Accept: "application/json", "Content-Type": "application/json" };
1452
- function D(e) {
1453
- return e.data;
1744
+ w.spread = Qn;
1745
+ w.isAxiosError = Jn;
1746
+ w.mergeConfig = D;
1747
+ w.AxiosHeaders = T;
1748
+ w.formToJSON = (t) => st(a.isHTMLForm(t) ? new FormData(t) : t);
1749
+ w.getAdapter = ut.getAdapter;
1750
+ w.HttpStatusCode = be;
1751
+ w.default = w;
1752
+ const {
1753
+ Axios: Yn,
1754
+ AxiosError: er,
1755
+ CanceledError: tr,
1756
+ isCancel: nr,
1757
+ CancelToken: rr,
1758
+ VERSION: sr,
1759
+ all: or,
1760
+ Cancel: ir,
1761
+ isAxiosError: ar,
1762
+ spread: cr,
1763
+ toFormData: lr,
1764
+ AxiosHeaders: ur,
1765
+ HttpStatusCode: fr,
1766
+ formToJSON: dr,
1767
+ getAdapter: hr,
1768
+ mergeConfig: pr
1769
+ } = w, zn = { Accept: "application/json", "Content-Type": "application/json" };
1770
+ function Vn(t) {
1771
+ return t.data;
1454
1772
  }
1455
- class on {
1456
- constructor(t, n) {
1457
- j(this, "root");
1458
- j(this, "config");
1459
- var r;
1460
- this.root = t, n ? (this.config = n, (r = this.config) != null && r.headers || (this.config.headers = {}), this.config.headers = { ...this.config.headers, ...we }) : this.config = { headers: we };
1773
+ class vn {
1774
+ /** The root URL for all API requests. */
1775
+ root;
1776
+ /** Axios configuration used for all requests. */
1777
+ config;
1778
+ /**
1779
+ * Initializes a new instance of the ApiQuery class.
1780
+ * @param rootUrl - The base URL for the API.
1781
+ * @param config - Optional axios configuration.
1782
+ */
1783
+ constructor(e, n = {}) {
1784
+ this.root = e, this.config = {
1785
+ ...n,
1786
+ headers: {
1787
+ ...zn,
1788
+ ...n.headers || {}
1789
+ }
1790
+ };
1461
1791
  }
1462
- async get(t, n) {
1463
- return await y.get(`${this.root}${t}`, { ...n, ...this.config }).then(D);
1792
+ /**
1793
+ * Performs an API request.
1794
+ * @template T - The expected response type.
1795
+ * @param method - The HTTP method to use.
1796
+ * @param url - The relative URL for the request.
1797
+ * @param data - The request payload (for POST, PUT).
1798
+ * @param config - Optional axios configuration to override defaults.
1799
+ * @returns A promise that resolves to the response data.
1800
+ */
1801
+ async request(e, n, r, s) {
1802
+ const o = `${this.root}${n}`, i = { ...this.config, ...s }, c = await (e === "get" || e === "delete" ? w[e](o, i) : w[e](o, r, i));
1803
+ return Vn(c);
1804
+ }
1805
+ /**
1806
+ * Performs a GET request.
1807
+ * @template T - The expected response type.
1808
+ * @param url - The relative URL for the request.
1809
+ * @param config - Optional axios configuration to override defaults.
1810
+ * @returns A promise that resolves to the response data.
1811
+ */
1812
+ async get(e, n) {
1813
+ return this.request("get", e, void 0, n);
1464
1814
  }
1465
- async post(t, n, r) {
1466
- return await y.post(`${this.root}${t}`, n, { ...r, ...this.config }).then(D);
1815
+ /**
1816
+ * Performs a POST request.
1817
+ * @template B - The request body type.
1818
+ * @template T - The expected response type.
1819
+ * @param url - The relative URL for the request.
1820
+ * @param data - The request payload.
1821
+ * @param config - Optional axios configuration to override defaults.
1822
+ * @returns A promise that resolves to the response data.
1823
+ */
1824
+ async post(e, n, r) {
1825
+ return this.request("post", e, n, r);
1467
1826
  }
1468
- async put(t, n, r) {
1469
- return await y.put(`${this.root}${t}`, n, { ...r, ...this.config }).then(D);
1827
+ /**
1828
+ * Performs a PUT request.
1829
+ * @template B - The request body type.
1830
+ * @template T - The expected response type.
1831
+ * @param url - The relative URL for the request.
1832
+ * @param data - The request payload.
1833
+ * @param config - Optional axios configuration to override defaults.
1834
+ * @returns A promise that resolves to the response data.
1835
+ */
1836
+ async put(e, n, r) {
1837
+ return this.request("put", e, n, r);
1470
1838
  }
1471
- async del(t, n) {
1472
- return await y.delete(`${this.root}${t}`, { ...n, ...this.config }).then(D);
1839
+ /**
1840
+ * Performs a DELETE request.
1841
+ * @template T - The expected response type.
1842
+ * @param url - The relative URL for the request.
1843
+ * @param config - Optional axios configuration to override defaults.
1844
+ * @returns A promise that resolves to the response data.
1845
+ */
1846
+ async del(e, n) {
1847
+ return this.request("delete", e, void 0, n);
1473
1848
  }
1474
1849
  }
1475
- const an = [
1850
+ const Wn = [
1476
1851
  "contains",
1477
1852
  "contains_nocase",
1478
1853
  "ends_with",
@@ -1492,76 +1867,70 @@ const an = [
1492
1867
  "not",
1493
1868
  "in",
1494
1869
  "not_in"
1495
- ];
1496
- class $ {
1870
+ ], Kn = 1e3, Xn = 5e3;
1871
+ class Y {
1497
1872
  /**
1498
- * Create a query string from a query with json format.
1499
- * @param {QueryJson} query the json format query
1500
- * @returns a query string respective with the json format query
1873
+ * Converts a JSON query object into a GraphQL-compatible string.
1874
+ * Handles nested objects and operator mapping (e.g., $gt -> _gt).
1875
+ * @param query - The JSON filter object to build.
1876
+ * @returns A string representing the GraphQL 'where' or 'block' filter.
1501
1877
  */
1502
- static buildJsonQuery(t) {
1878
+ static buildJsonQuery(e) {
1503
1879
  const n = [];
1504
- for (const r in t)
1505
- if (t[r] !== void 0)
1506
- if (t[r] === null && n.push(`${r}: null`), Array.isArray(t[r])) {
1507
- const s = t[r];
1508
- n.push(`${r}: [${s.map((o) => `"${o}"`).join(", ")}]`);
1509
- } else if (typeof t[r] == "string")
1510
- n.push(`${r}: "${t[r]}"`);
1511
- else if (typeof t[r] == "object") {
1512
- const s = {}, o = {}, i = t[r];
1513
- for (const c in i) {
1514
- const d = i[c];
1515
- if (c.length == 1)
1516
- s[c] = d;
1517
- else if (c[0] == "$") {
1518
- const f = c.slice(1);
1519
- an.includes(f) && (o[`${r}_${f}`] = d);
1880
+ for (const r in e) {
1881
+ const s = e[r];
1882
+ if (s !== void 0)
1883
+ if (s === null)
1884
+ n.push(`${r}: null`);
1885
+ else if (Array.isArray(s)) {
1886
+ const o = s;
1887
+ n.push(`${r}: [${o.map((i) => typeof i == "string" ? `"${i}"` : i).join(", ")}]`);
1888
+ } else if (typeof s == "string")
1889
+ n.push(`${r}: "${s}"`);
1890
+ else if (typeof s == "object") {
1891
+ const o = {}, i = {}, c = s;
1892
+ for (const d in c) {
1893
+ const u = c[d];
1894
+ if (d.startsWith("$")) {
1895
+ const l = d.slice(1);
1896
+ Wn.includes(l) ? i[`${r}_${l}`] = u : o[d] = u;
1520
1897
  } else
1521
- s[c] = d;
1898
+ o[d] = u;
1522
1899
  }
1523
- Object.keys(s).length > 0 && n.push(`${r}: {${this.buildJsonQuery(s)}}`), Object.keys(o).length > 0 && n.push(this.buildJsonQuery(o));
1900
+ Object.keys(o).length > 0 && n.push(`${r}: {${this.buildJsonQuery(o)}}`), Object.keys(i).length > 0 && n.push(this.buildJsonQuery(i));
1524
1901
  } else
1525
- n.push(`${r}: ${t[r]}`);
1902
+ n.push(`${r}: ${s}`);
1903
+ }
1526
1904
  return n.join(", ");
1527
1905
  }
1528
1906
  /**
1529
- * Given a json format array as element input, returns the string array represent elements you want to query in the graph.
1530
- * @param {Array<ElementType>} elements A array with {@link ElementType} elements, each element in the array represent a element in the graph you want to query
1531
- * @returns {Array<string>} The string array represent the input array
1907
+ * Builds the fields/elements part of a GraphQL query from an array of strings or objects.
1908
+ * @param elements - An array of fields to query. Can include nested collections as GraphObject.
1909
+ * @returns An array of strings representing the selected fields.
1532
1910
  */
1533
- static buildElements(t) {
1534
- const n = [];
1535
- for (const r of t)
1536
- if (typeof r == "string")
1537
- n.push(r);
1538
- else {
1539
- const s = r;
1540
- n.push(this.buildQuery({ collection: s.collection, params: s.params }));
1541
- }
1542
- return n;
1911
+ static buildElements(e) {
1912
+ return e.map((n) => {
1913
+ if (typeof n == "string")
1914
+ return n;
1915
+ const r = n;
1916
+ return this.buildQuery({ collection: r.collection, params: r.params });
1917
+ });
1543
1918
  }
1544
1919
  /**
1545
- * Given a instance of {@link Metadata}, returns the string represent the metadata you want to query
1546
- * @param {Metadata} metadata The instance represent all metadata you want to query
1547
- * @returns The string represent the metadata you want to query
1920
+ * Builds the metadata (_meta) fragment of a GraphQL query.
1921
+ * @param metadata - The metadata configuration.
1922
+ * @returns A string representing the _meta query fragment.
1548
1923
  */
1549
- static buildMetadata(t) {
1924
+ static buildMetadata(e) {
1550
1925
  let n = "";
1551
1926
  const r = [];
1552
- t.blockQuery && (t.blockQuery.hash && r.push(`hash: "${t.blockQuery.hash}"`), t.blockQuery.number && r.push(`number: ${t.blockQuery.number}`), t.blockQuery.number_gte && r.push(`number_gte: ${t.blockQuery.number_gte}`));
1927
+ e.blockQuery && (e.blockQuery.hash && r.push(`hash: "${e.blockQuery.hash}"`), e.blockQuery.number !== void 0 && r.push(`number: ${e.blockQuery.number}`), e.blockQuery.number_gte !== void 0 && r.push(`number_gte: ${e.blockQuery.number_gte}`));
1553
1928
  const s = r.join(", ");
1554
1929
  s.length > 0 && (n += `(block: {${s}})`);
1555
1930
  const o = [], i = [];
1556
- if (t.elements) {
1557
- for (const f of t.elements)
1558
- if (f == "deployment" || f == "hasIndexingErrors") {
1559
- const u = f.toString();
1560
- o.includes(u) || o.push(u);
1561
- } else {
1562
- const u = f.toString();
1563
- i.includes(u) || i.push(u);
1564
- }
1931
+ if (e.elements) {
1932
+ for (const u of e.elements)
1933
+ u === "deployment" || u === "hasIndexingErrors" ? o.includes(u) || o.push(u) : i.includes(u) || i.push(u);
1565
1934
  const c = i.join(" ");
1566
1935
  c.length > 0 && o.push(`block{${c}}`);
1567
1936
  const d = o.join(" ");
@@ -1569,129 +1938,135 @@ class $ {
1569
1938
  }
1570
1939
  return n.length > 0 ? `_meta${n}` : "";
1571
1940
  }
1572
- static _buildInlineFragment(t) {
1573
- var r;
1574
- let n = ["id"];
1575
- return (r = t.params) != null && r.elements && (n = this.buildElements(t.params.elements)), `... on ${t.collection}{${n.join(" ")}}`;
1941
+ /**
1942
+ * Builds an inline fragment (... on Collection { ... }) for a query.
1943
+ * @param fragment - The inline fragment configuration.
1944
+ * @returns A string representing the inline fragment.
1945
+ * @private
1946
+ */
1947
+ static _buildInlineFragment(e) {
1948
+ const n = e.params?.elements?.length ? this.buildElements(e.params.elements) : ["id"];
1949
+ return `... on ${e.collection}{${n.join(" ")}}`;
1576
1950
  }
1577
1951
  /**
1578
- * Given a instance of Array<{@link InlineFragmentType}>, returns the string represent the inline fragments you want to query
1579
- * @param {Array<InlineFragmentType>} fragments The instance represent the inline fragments you want to query
1580
- * @returns The string represent the inline fragments you want to query
1952
+ * Builds multiple inline fragments from an array of fragment configurations.
1953
+ * @param fragments - An array of inline fragments.
1954
+ * @returns A string containing all built inline fragments.
1581
1955
  */
1582
- static buildInlineFragments(t) {
1583
- const n = [];
1584
- for (const r of t)
1585
- n.push(this._buildInlineFragment(r));
1586
- return n.join(" ");
1956
+ static buildInlineFragments(e) {
1957
+ return e.map((n) => this._buildInlineFragment(n)).join(" ");
1587
1958
  }
1588
1959
  /**
1589
- * Given json data, returns the string query. This function only can create a string query for a particular collection.
1590
- * @param {GraphObject} data An data for create query, contains two elements:
1591
- * 1. collection: string - collection name
1592
- * 2. params: GraphParams | undefined - If it is defined, it create a query to the collection
1593
- * @param {Metadata | undefined} metadata If it is defined, the query can get metadata that you defined
1594
- * @returns The string query
1960
+ * Builds a complete GraphQL query for a single collection.
1961
+ * @param data - The collection and parameters for the query.
1962
+ * @param metadata - Optional metadata configuration.
1963
+ * @returns A string containing the GraphQL query for the collection.
1595
1964
  */
1596
- static buildQuery(t, n) {
1597
- const r = t.collection, s = t.params, o = [];
1598
- if ((s == null ? void 0 : s.id) != null && o.push(`id: ${s.id}`), s != null && s.orderBy && o.push(`orderBy: ${s.orderBy}`), s != null && s.orderDirection && o.push(`orderDirection: ${s.orderDirection}`), (s == null ? void 0 : s.first) != null && (s.first < 0 ? s.first = 0 : s.first > 1e3 && (s.first = 1e3), o.push(`first: ${s.first}`)), (s == null ? void 0 : s.skip) != null && (s.skip < 0 ? s.skip = 0 : s.skip > 5e3 && (s.skip = 5e3), o.push(`skip: ${s.skip}`)), s != null && s.where) {
1965
+ static buildQuery(e, n) {
1966
+ const { collection: r, params: s } = e, o = [];
1967
+ if (s?.id !== void 0 && o.push(`id: ${s.id}`), s?.orderBy && o.push(`orderBy: ${s.orderBy}`), s?.orderDirection && o.push(`orderDirection: ${s.orderDirection}`), s?.first !== void 0) {
1968
+ const l = Math.max(0, Math.min(s.first, Kn));
1969
+ o.push(`first: ${l}`);
1970
+ }
1971
+ if (s?.skip !== void 0) {
1972
+ const l = Math.max(0, Math.min(s.skip, Xn));
1973
+ o.push(`skip: ${l}`);
1974
+ }
1975
+ if (s?.where) {
1599
1976
  const l = this.buildJsonQuery(s.where);
1600
1977
  l.length > 0 && o.push(`where: {${l}}`);
1601
1978
  }
1602
- if (s != null && s.block) {
1979
+ if (s?.block) {
1603
1980
  const l = this.buildJsonQuery(s.block);
1604
1981
  l.length > 0 && o.push(`block: {${l}}`);
1605
1982
  }
1606
- const i = o.join(", ");
1983
+ const i = o.length > 0 ? `(${o.join(", ")})` : "";
1607
1984
  let c = ["id"];
1608
- s != null && s.elements && s.elements.length > 0 && (c = this.buildElements(s.elements));
1985
+ s?.elements && s.elements.length > 0 && (c = this.buildElements(s.elements));
1609
1986
  let d = "";
1610
- s != null && s.inlineFragments && s.inlineFragments.length > 0 && (d = this.buildInlineFragments(s.inlineFragments));
1611
- let f = "";
1612
- const u = d.length > 0 ? `${c.join(" ")} ${d}` : c.join(" ");
1613
- if (i.length > 0 ? f = `${r}(${i}) {${u}}` : f = `${r} {${u}}`, n) {
1987
+ s?.inlineFragments && s.inlineFragments.length > 0 && (d = ` ${this.buildInlineFragments(s.inlineFragments)}`);
1988
+ const u = `${r}${i} {${c.join(" ")}${d}}`;
1989
+ if (n) {
1614
1990
  const l = this.buildMetadata(n);
1615
- return l.length > 0 ? `${l} ${f}` : f;
1991
+ return l ? `${l} ${u}` : u;
1616
1992
  }
1617
- return f;
1993
+ return u;
1618
1994
  }
1619
1995
  /**
1620
- * Given a array contain many json data, return a query string represent a query to all collections that is in a array.
1621
- * @param {Array<GraphObject>} data An array contain data to query to many collections
1622
- * @param {Metadata | undefined} metadata If it is defined, the query can get metadata that you defined
1623
- * @returns The query string
1996
+ * Builds a query that targets multiple collections simultaneously.
1997
+ * @param data - An array of collection queries and their parameters.
1998
+ * @param metadata - Optional metadata configuration that applies to the entire query.
1999
+ * @returns A string containing the merged GraphQL query for multiple collections.
1624
2000
  */
1625
- static buildMultipleQuery(t, n) {
1626
- const r = [];
1627
- for (const o of t)
1628
- r.push(this.buildQuery({ collection: o.collection, params: o.params }));
1629
- const s = r.join(" ");
2001
+ static buildMultipleQuery(e, n) {
2002
+ const s = e.map((o) => this.buildQuery({ collection: o.collection, params: o.params })).join(" ");
1630
2003
  if (n) {
1631
2004
  const o = this.buildMetadata(n);
1632
- return o.length > 0 ? `${o} ${s}` : s;
2005
+ return o ? `${o} ${s}` : s;
1633
2006
  }
1634
2007
  return s;
1635
2008
  }
1636
2009
  /**
1637
- * Create complete query string, you can use directly this query to query to the graph
1638
- * @param {string} query The query string
1639
- * @param {string} queryName The query name(default query)
1640
- * @returns The complete query string
2010
+ * Wraps a query fragment into a full GraphQL 'query' block.
2011
+ * @param query - The query fragment to wrap.
2012
+ * @param queryName - An optional name for the GraphQL query (defaults to 'query').
2013
+ * @returns The full GraphQL query string.
1641
2014
  */
1642
- static makeFullQuery(t, n = "query") {
1643
- return `query ${n} {${t}}`;
2015
+ static makeFullQuery(e, n = "query") {
2016
+ return `query ${n} {${e}}`;
1644
2017
  }
1645
2018
  }
1646
- class ln extends on {
2019
+ class mr extends vn {
2020
+ /** The name of the GraphQL query, used in makeFullQuery. */
2021
+ queryName;
1647
2022
  /**
1648
- * The constructor for create a query instance.
1649
- * @param {string} rootUrl The url leading to the graph
1650
- * @param {AxiosRequestConfig | undefined} config Config for base axios
2023
+ * Initializes a new EthGraphQuery instance.
2024
+ * @param rootUrl - The endpoint URL of the subgraph.
2025
+ * @param config - Optional axios configuration for custom headers or timeouts.
1651
2026
  */
1652
- constructor(n, r) {
1653
- super(n, r);
1654
- j(this, "queryName");
1655
- this.queryName = "query";
2027
+ constructor(e, n) {
2028
+ super(e, n), this.queryName = "query";
1656
2029
  }
1657
2030
  /**
1658
- * Given query string, returns the data respective with it.
1659
- * @param {string} query A query string containing all data you want to fetch
1660
- * @returns The data respective with the query string
2031
+ * Executes a raw GraphQL query string.
2032
+ * @template T - The expected return type of the data.
2033
+ * @param data - The raw GraphQL query string.
2034
+ * @returns A promise resolving to the query result.
2035
+ * @throws Error if the response contains any GraphQL errors.
1661
2036
  */
1662
- async stringQuery(n) {
1663
- const r = await this.post("", { query: n });
1664
- if (r.errors) {
1665
- const s = r;
1666
- throw new Error(s.errors[0].message);
2037
+ async stringQuery(e) {
2038
+ const n = await this.post("", { query: e });
2039
+ if (n && typeof n == "object" && "errors" in n) {
2040
+ const s = n.errors.map((o) => o.message).join("; ");
2041
+ throw new Error(`GraphQL Error: ${s}`);
1667
2042
  }
1668
- return r;
2043
+ return n.data;
1669
2044
  }
1670
2045
  /**
1671
- * Create a query to a particular collection, returns the data respective with the query data.
1672
- * @param {GraphObject} data An data for create query, contains two elements:
1673
- * 1. collection: string - collection name
1674
- * 2. params: GraphParams | undefined - If it is defined, it create a query to the collection
1675
- * @param {Metadata | undefined} metadata If it is defined, the query can get metadata that you defined
1676
- * @returns The data respective with the query data
2046
+ * Executes a single collection query using a JSON configuration.
2047
+ * @template T - The expected return type of the data.
2048
+ * @param data - The configuration for the collection query.
2049
+ * @param metadata - Optional metadata fields to include in the query.
2050
+ * @returns A promise resolving to the fetched data.
1677
2051
  */
1678
- async query(n, r) {
1679
- const s = n, o = $.buildQuery({ collection: s.collection, params: s.params }, r);
1680
- return await this.stringQuery($.makeFullQuery(o, this.queryName));
2052
+ async query(e, n) {
2053
+ const r = Y.buildQuery(e, n);
2054
+ return this.stringQuery(Y.makeFullQuery(r, this.queryName));
1681
2055
  }
1682
2056
  /**
1683
- * Create a query to many collections, returns the data respective with the query data.
1684
- * @param {Array<GraphObject>} data An array contain data to query to many collections
1685
- * @param {Metadata | undefined} metadata If it is defined, the query can get metadata that you defined
1686
- * @returns The data respective with the query data
2057
+ * Executes multiple collection queries in a single request using JSON configurations.
2058
+ * @template T - The expected return type of the data.
2059
+ * @param data - An array of query configurations.
2060
+ * @param metadata - Optional metadata fields to include in the query.
2061
+ * @returns A promise resolving to the merged results of all queries.
1687
2062
  */
1688
- async multipleQuery(n, r) {
1689
- const s = $.buildMultipleQuery(n, r);
1690
- return await this.stringQuery($.makeFullQuery(s, this.queryName));
2063
+ async multipleQuery(e, n) {
2064
+ const r = Y.buildMultipleQuery(e, n);
2065
+ return this.stringQuery(Y.makeFullQuery(r, this.queryName));
1691
2066
  }
1692
2067
  }
1693
2068
  export {
1694
- ln as EthGraphQuery,
1695
- an as OptionKeys,
1696
- $ as QueryBuilder
2069
+ mr as EthGraphQuery,
2070
+ Wn as OptionKeys,
2071
+ Y as QueryBuilder
1697
2072
  };