@next-feature/client 0.1.1-beta.5 → 0.1.1-beta.6

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/index.js CHANGED
@@ -3,33 +3,33 @@ function $t(t, e) {
3
3
  return t.apply(e, arguments);
4
4
  };
5
5
  }
6
- const { toString: yr } = Object.prototype, { getPrototypeOf: _t } = Object, { iterator: qe, toStringTag: Mt } = Symbol, Ve = /* @__PURE__ */ ((t) => (e) => {
7
- const r = yr.call(e);
6
+ const { toString: _r } = Object.prototype, { getPrototypeOf: vt } = Object, { iterator: He, toStringTag: zt } = Symbol, We = /* @__PURE__ */ ((t) => (e) => {
7
+ const r = _r.call(e);
8
8
  return t[r] || (t[r] = r.slice(8, -1).toLowerCase());
9
- })(/* @__PURE__ */ Object.create(null)), $ = (t) => (t = t.toLowerCase(), (e) => Ve(e) === t), He = (t) => (e) => typeof e === t, { isArray: fe } = Array, ve = He("undefined");
10
- function gr(t) {
11
- return t !== null && !ve(t) && t.constructor !== null && !ve(t.constructor) && L(t.constructor.isBuffer) && t.constructor.isBuffer(t);
9
+ })(/* @__PURE__ */ Object.create(null)), M = (t) => (t = t.toLowerCase(), (e) => We(e) === t), Je = (t) => (e) => typeof e === t, { isArray: he } = Array, be = Je("undefined");
10
+ function vr(t) {
11
+ return t !== null && !be(t) && t.constructor !== null && !be(t.constructor) && L(t.constructor.isBuffer) && t.constructor.isBuffer(t);
12
12
  }
13
- const Bt = $("ArrayBuffer");
14
- function _r(t) {
13
+ const qt = M("ArrayBuffer");
14
+ function br(t) {
15
15
  let e;
16
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && Bt(t.buffer), e;
16
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && qt(t.buffer), e;
17
17
  }
18
- const vr = He("string"), L = He("function"), zt = He("number"), We = (t) => t !== null && typeof t == "object", br = (t) => t === !0 || t === !1, Te = (t) => {
19
- if (Ve(t) !== "object")
18
+ const wr = Je("string"), L = Je("function"), Vt = Je("number"), Ke = (t) => t !== null && typeof t == "object", xr = (t) => t === !0 || t === !1, Te = (t) => {
19
+ if (We(t) !== "object")
20
20
  return !1;
21
- const e = _t(t);
22
- return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Mt in t) && !(qe in t);
23
- }, wr = $("Date"), xr = $("File"), kr = $("Blob"), Er = $("FileList"), Rr = (t) => We(t) && L(t.pipe), Tr = (t) => {
21
+ const e = vt(t);
22
+ return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(zt in t) && !(He in t);
23
+ }, kr = M("Date"), Er = M("File"), Rr = M("Blob"), Sr = M("FileList"), Tr = (t) => Ke(t) && L(t.pipe), Ar = (t) => {
24
24
  let e;
25
- return t && (typeof FormData == "function" && t instanceof FormData || L(t.append) && ((e = Ve(t)) === "formdata" || // detect form-data instance
25
+ return t && (typeof FormData == "function" && t instanceof FormData || L(t.append) && ((e = We(t)) === "formdata" || // detect form-data instance
26
26
  e === "object" && L(t.toString) && t.toString() === "[object FormData]"));
27
- }, Sr = $("URLSearchParams"), [Ar, Or, Cr, Nr] = ["ReadableStream", "Request", "Response", "Headers"].map($), jr = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
28
- function ke(t, e, { allOwnKeys: r = !1 } = {}) {
27
+ }, Or = M("URLSearchParams"), [Cr, Nr, jr, Pr] = ["ReadableStream", "Request", "Response", "Headers"].map(M), Ir = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
28
+ function Ee(t, e, { allOwnKeys: r = !1 } = {}) {
29
29
  if (t === null || typeof t > "u")
30
30
  return;
31
31
  let n, s;
32
- if (typeof t != "object" && (t = [t]), fe(t))
32
+ if (typeof t != "object" && (t = [t]), he(t))
33
33
  for (n = 0, s = t.length; n < s; n++)
34
34
  e.call(null, t[n], n, t);
35
35
  else {
@@ -39,7 +39,7 @@ function ke(t, e, { allOwnKeys: r = !1 } = {}) {
39
39
  o = i[n], e.call(null, t[o], o, t);
40
40
  }
41
41
  }
42
- function qt(t, e) {
42
+ function Ht(t, e) {
43
43
  e = e.toLowerCase();
44
44
  const r = Object.keys(t);
45
45
  let n = r.length, s;
@@ -48,71 +48,71 @@ function qt(t, e) {
48
48
  return s;
49
49
  return null;
50
50
  }
51
- const te = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Vt = (t) => !ve(t) && t !== te;
52
- function rt() {
53
- const { caseless: t } = Vt(this) && this || {}, e = {}, r = (n, s) => {
54
- const i = t && qt(e, s) || s;
55
- Te(e[i]) && Te(n) ? e[i] = rt(e[i], n) : Te(n) ? e[i] = rt({}, n) : fe(n) ? e[i] = n.slice() : e[i] = n;
51
+ const ee = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Wt = (t) => !be(t) && t !== ee;
52
+ function st() {
53
+ const { caseless: t } = Wt(this) && this || {}, e = {}, r = (n, s) => {
54
+ const i = t && Ht(e, s) || s;
55
+ Te(e[i]) && Te(n) ? e[i] = st(e[i], n) : Te(n) ? e[i] = st({}, n) : he(n) ? e[i] = n.slice() : e[i] = n;
56
56
  };
57
57
  for (let n = 0, s = arguments.length; n < s; n++)
58
- arguments[n] && ke(arguments[n], r);
58
+ arguments[n] && Ee(arguments[n], r);
59
59
  return e;
60
60
  }
61
- const Pr = (t, e, r, { allOwnKeys: n } = {}) => (ke(e, (s, i) => {
61
+ const Dr = (t, e, r, { allOwnKeys: n } = {}) => (Ee(e, (s, i) => {
62
62
  r && L(s) ? t[i] = $t(s, r) : t[i] = s;
63
- }, { allOwnKeys: n }), t), Dr = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), Ir = (t, e, r, n) => {
63
+ }, { allOwnKeys: n }), t), Lr = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), Ur = (t, e, r, n) => {
64
64
  t.prototype = Object.create(e.prototype, n), t.prototype.constructor = t, Object.defineProperty(t, "super", {
65
65
  value: e.prototype
66
66
  }), r && Object.assign(t.prototype, r);
67
- }, Lr = (t, e, r, n) => {
67
+ }, Fr = (t, e, r, n) => {
68
68
  let s, i, a;
69
69
  const o = {};
70
70
  if (e = e || {}, t == null) return e;
71
71
  do {
72
72
  for (s = Object.getOwnPropertyNames(t), i = s.length; i-- > 0; )
73
73
  a = s[i], (!n || n(a, t, e)) && !o[a] && (e[a] = t[a], o[a] = !0);
74
- t = r !== !1 && _t(t);
74
+ t = r !== !1 && vt(t);
75
75
  } while (t && (!r || r(t, e)) && t !== Object.prototype);
76
76
  return e;
77
- }, Ur = (t, e, r) => {
77
+ }, Zr = (t, e, r) => {
78
78
  t = String(t), (r === void 0 || r > t.length) && (r = t.length), r -= e.length;
79
79
  const n = t.indexOf(e, r);
80
80
  return n !== -1 && n === r;
81
- }, Fr = (t) => {
81
+ }, Mr = (t) => {
82
82
  if (!t) return null;
83
- if (fe(t)) return t;
83
+ if (he(t)) return t;
84
84
  let e = t.length;
85
- if (!zt(e)) return null;
85
+ if (!Vt(e)) return null;
86
86
  const r = new Array(e);
87
87
  for (; e-- > 0; )
88
88
  r[e] = t[e];
89
89
  return r;
90
- }, Zr = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && _t(Uint8Array)), $r = (t, e) => {
91
- const n = (t && t[qe]).call(t);
90
+ }, Br = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && vt(Uint8Array)), $r = (t, e) => {
91
+ const n = (t && t[He]).call(t);
92
92
  let s;
93
93
  for (; (s = n.next()) && !s.done; ) {
94
94
  const i = s.value;
95
95
  e.call(t, i[0], i[1]);
96
96
  }
97
- }, Mr = (t, e) => {
97
+ }, zr = (t, e) => {
98
98
  let r;
99
99
  const n = [];
100
100
  for (; (r = t.exec(e)) !== null; )
101
101
  n.push(r);
102
102
  return n;
103
- }, Br = $("HTMLFormElement"), zr = (t) => t.toLowerCase().replace(
103
+ }, qr = M("HTMLFormElement"), Vr = (t) => t.toLowerCase().replace(
104
104
  /[-_\s]([a-z\d])(\w*)/g,
105
105
  function(r, n, s) {
106
106
  return n.toUpperCase() + s;
107
107
  }
108
- ), kt = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), qr = $("RegExp"), Ht = (t, e) => {
108
+ ), Rt = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), Hr = M("RegExp"), Jt = (t, e) => {
109
109
  const r = Object.getOwnPropertyDescriptors(t), n = {};
110
- ke(r, (s, i) => {
110
+ Ee(r, (s, i) => {
111
111
  let a;
112
112
  (a = e(s, i, t)) !== !1 && (n[i] = a || s);
113
113
  }), Object.defineProperties(t, n);
114
- }, Vr = (t) => {
115
- Ht(t, (e, r) => {
114
+ }, Wr = (t) => {
115
+ Jt(t, (e, r) => {
116
116
  if (L(t) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
117
117
  return !1;
118
118
  const n = t[r];
@@ -126,100 +126,100 @@ const Pr = (t, e, r, { allOwnKeys: n } = {}) => (ke(e, (s, i) => {
126
126
  });
127
127
  }
128
128
  });
129
- }, Hr = (t, e) => {
129
+ }, Jr = (t, e) => {
130
130
  const r = {}, n = (s) => {
131
131
  s.forEach((i) => {
132
132
  r[i] = !0;
133
133
  });
134
134
  };
135
- return fe(t) ? n(t) : n(String(t).split(e)), r;
136
- }, Wr = () => {
137
- }, Jr = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
138
- function Kr(t) {
139
- return !!(t && L(t.append) && t[Mt] === "FormData" && t[qe]);
135
+ return he(t) ? n(t) : n(String(t).split(e)), r;
136
+ }, Kr = () => {
137
+ }, Xr = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
138
+ function Gr(t) {
139
+ return !!(t && L(t.append) && t[zt] === "FormData" && t[He]);
140
140
  }
141
- const Xr = (t) => {
141
+ const Yr = (t) => {
142
142
  const e = new Array(10), r = (n, s) => {
143
- if (We(n)) {
143
+ if (Ke(n)) {
144
144
  if (e.indexOf(n) >= 0)
145
145
  return;
146
146
  if (!("toJSON" in n)) {
147
147
  e[s] = n;
148
- const i = fe(n) ? [] : {};
149
- return ke(n, (a, o) => {
148
+ const i = he(n) ? [] : {};
149
+ return Ee(n, (a, o) => {
150
150
  const d = r(a, s + 1);
151
- !ve(d) && (i[o] = d);
151
+ !be(d) && (i[o] = d);
152
152
  }), e[s] = void 0, i;
153
153
  }
154
154
  }
155
155
  return n;
156
156
  };
157
157
  return r(t, 0);
158
- }, Gr = $("AsyncFunction"), Yr = (t) => t && (We(t) || L(t)) && L(t.then) && L(t.catch), Wt = ((t, e) => t ? setImmediate : e ? ((r, n) => (te.addEventListener("message", ({ source: s, data: i }) => {
159
- s === te && i === r && n.length && n.shift()();
158
+ }, Qr = M("AsyncFunction"), en = (t) => t && (Ke(t) || L(t)) && L(t.then) && L(t.catch), Kt = ((t, e) => t ? setImmediate : e ? ((r, n) => (ee.addEventListener("message", ({ source: s, data: i }) => {
159
+ s === ee && i === r && n.length && n.shift()();
160
160
  }, !1), (s) => {
161
- n.push(s), te.postMessage(r, "*");
161
+ n.push(s), ee.postMessage(r, "*");
162
162
  }))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
163
163
  typeof setImmediate == "function",
164
- L(te.postMessage)
165
- ), Qr = typeof queueMicrotask < "u" ? queueMicrotask.bind(te) : typeof process < "u" && process.nextTick || Wt, en = (t) => t != null && L(t[qe]), u = {
166
- isArray: fe,
167
- isArrayBuffer: Bt,
168
- isBuffer: gr,
169
- isFormData: Tr,
170
- isArrayBufferView: _r,
171
- isString: vr,
172
- isNumber: zt,
173
- isBoolean: br,
174
- isObject: We,
164
+ L(ee.postMessage)
165
+ ), tn = typeof queueMicrotask < "u" ? queueMicrotask.bind(ee) : typeof process < "u" && process.nextTick || Kt, rn = (t) => t != null && L(t[He]), u = {
166
+ isArray: he,
167
+ isArrayBuffer: qt,
168
+ isBuffer: vr,
169
+ isFormData: Ar,
170
+ isArrayBufferView: br,
171
+ isString: wr,
172
+ isNumber: Vt,
173
+ isBoolean: xr,
174
+ isObject: Ke,
175
175
  isPlainObject: Te,
176
- isReadableStream: Ar,
177
- isRequest: Or,
178
- isResponse: Cr,
179
- isHeaders: Nr,
180
- isUndefined: ve,
181
- isDate: wr,
182
- isFile: xr,
183
- isBlob: kr,
184
- isRegExp: qr,
176
+ isReadableStream: Cr,
177
+ isRequest: Nr,
178
+ isResponse: jr,
179
+ isHeaders: Pr,
180
+ isUndefined: be,
181
+ isDate: kr,
182
+ isFile: Er,
183
+ isBlob: Rr,
184
+ isRegExp: Hr,
185
185
  isFunction: L,
186
- isStream: Rr,
187
- isURLSearchParams: Sr,
188
- isTypedArray: Zr,
189
- isFileList: Er,
190
- forEach: ke,
191
- merge: rt,
192
- extend: Pr,
193
- trim: jr,
194
- stripBOM: Dr,
195
- inherits: Ir,
196
- toFlatObject: Lr,
197
- kindOf: Ve,
198
- kindOfTest: $,
199
- endsWith: Ur,
200
- toArray: Fr,
186
+ isStream: Tr,
187
+ isURLSearchParams: Or,
188
+ isTypedArray: Br,
189
+ isFileList: Sr,
190
+ forEach: Ee,
191
+ merge: st,
192
+ extend: Dr,
193
+ trim: Ir,
194
+ stripBOM: Lr,
195
+ inherits: Ur,
196
+ toFlatObject: Fr,
197
+ kindOf: We,
198
+ kindOfTest: M,
199
+ endsWith: Zr,
200
+ toArray: Mr,
201
201
  forEachEntry: $r,
202
- matchAll: Mr,
203
- isHTMLForm: Br,
204
- hasOwnProperty: kt,
205
- hasOwnProp: kt,
202
+ matchAll: zr,
203
+ isHTMLForm: qr,
204
+ hasOwnProperty: Rt,
205
+ hasOwnProp: Rt,
206
206
  // an alias to avoid ESLint no-prototype-builtins detection
207
- reduceDescriptors: Ht,
208
- freezeMethods: Vr,
209
- toObjectSet: Hr,
210
- toCamelCase: zr,
211
- noop: Wr,
212
- toFiniteNumber: Jr,
213
- findKey: qt,
214
- global: te,
215
- isContextDefined: Vt,
216
- isSpecCompliantForm: Kr,
217
- toJSONObject: Xr,
218
- isAsyncFn: Gr,
219
- isThenable: Yr,
220
- setImmediate: Wt,
221
- asap: Qr,
222
- isIterable: en
207
+ reduceDescriptors: Jt,
208
+ freezeMethods: Wr,
209
+ toObjectSet: Jr,
210
+ toCamelCase: Vr,
211
+ noop: Kr,
212
+ toFiniteNumber: Xr,
213
+ findKey: Ht,
214
+ global: ee,
215
+ isContextDefined: Wt,
216
+ isSpecCompliantForm: Gr,
217
+ toJSONObject: Yr,
218
+ isAsyncFn: Qr,
219
+ isThenable: en,
220
+ setImmediate: Kt,
221
+ asap: tn,
222
+ isIterable: rn
223
223
  };
224
224
  function w(t, e, r, n, s) {
225
225
  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), r && (this.config = r), n && (this.request = n), s && (this.response = s, this.status = s.status ? s.status : null);
@@ -245,7 +245,7 @@ u.inherits(w, Error, {
245
245
  };
246
246
  }
247
247
  });
248
- const Jt = w.prototype, Kt = {};
248
+ const Xt = w.prototype, Gt = {};
249
249
  [
250
250
  "ERR_BAD_OPTION_VALUE",
251
251
  "ERR_BAD_OPTION",
@@ -261,35 +261,35 @@ const Jt = w.prototype, Kt = {};
261
261
  "ERR_INVALID_URL"
262
262
  // eslint-disable-next-line func-names
263
263
  ].forEach((t) => {
264
- Kt[t] = { value: t };
264
+ Gt[t] = { value: t };
265
265
  });
266
- Object.defineProperties(w, Kt);
267
- Object.defineProperty(Jt, "isAxiosError", { value: !0 });
266
+ Object.defineProperties(w, Gt);
267
+ Object.defineProperty(Xt, "isAxiosError", { value: !0 });
268
268
  w.from = (t, e, r, n, s, i) => {
269
- const a = Object.create(Jt);
269
+ const a = Object.create(Xt);
270
270
  return u.toFlatObject(t, a, function(d) {
271
271
  return d !== Error.prototype;
272
272
  }, (o) => o !== "isAxiosError"), w.call(a, t.message, e, r, n, s), a.cause = t, a.name = t.name, i && Object.assign(a, i), a;
273
273
  };
274
- const tn = null;
275
- function nt(t) {
274
+ const nn = null;
275
+ function it(t) {
276
276
  return u.isPlainObject(t) || u.isArray(t);
277
277
  }
278
- function Xt(t) {
278
+ function Yt(t) {
279
279
  return u.endsWith(t, "[]") ? t.slice(0, -2) : t;
280
280
  }
281
- function Et(t, e, r) {
281
+ function St(t, e, r) {
282
282
  return t ? t.concat(e).map(function(s, i) {
283
- return s = Xt(s), !r && i ? "[" + s + "]" : s;
283
+ return s = Yt(s), !r && i ? "[" + s + "]" : s;
284
284
  }).join(r ? "." : "") : e;
285
285
  }
286
- function rn(t) {
287
- return u.isArray(t) && !t.some(nt);
286
+ function sn(t) {
287
+ return u.isArray(t) && !t.some(it);
288
288
  }
289
- const nn = u.toFlatObject(u, {}, null, function(e) {
289
+ const an = u.toFlatObject(u, {}, null, function(e) {
290
290
  return /^is[A-Z]/.test(e);
291
291
  });
292
- function Je(t, e, r) {
292
+ function Xe(t, e, r) {
293
293
  if (!u.isObject(t))
294
294
  throw new TypeError("target must be an object");
295
295
  e = e || new FormData(), r = u.toFlatObject(r, {
@@ -311,46 +311,46 @@ function Je(t, e, r) {
311
311
  return u.isArrayBuffer(g) || u.isTypedArray(g) ? d && typeof Blob == "function" ? new Blob([g]) : Buffer.from(g) : g;
312
312
  }
313
313
  function l(g, k, _) {
314
- let C = g;
314
+ let O = g;
315
315
  if (g && !_ && typeof g == "object") {
316
316
  if (u.endsWith(k, "{}"))
317
317
  k = n ? k : k.slice(0, -2), g = JSON.stringify(g);
318
- else if (u.isArray(g) && rn(g) || (u.isFileList(g) || u.endsWith(k, "[]")) && (C = u.toArray(g)))
319
- return k = Xt(k), C.forEach(function(j, V) {
318
+ else if (u.isArray(g) && sn(g) || (u.isFileList(g) || u.endsWith(k, "[]")) && (O = u.toArray(g)))
319
+ return k = Yt(k), O.forEach(function(j, q) {
320
320
  !(u.isUndefined(j) || j === null) && e.append(
321
321
  // eslint-disable-next-line no-nested-ternary
322
- a === !0 ? Et([k], V, i) : a === null ? k : k + "[]",
322
+ a === !0 ? St([k], q, i) : a === null ? k : k + "[]",
323
323
  c(j)
324
324
  );
325
325
  }), !1;
326
326
  }
327
- return nt(g) ? !0 : (e.append(Et(_, k, i), c(g)), !1);
327
+ return it(g) ? !0 : (e.append(St(_, k, i), c(g)), !1);
328
328
  }
329
- const m = [], T = Object.assign(nn, {
329
+ const m = [], S = Object.assign(an, {
330
330
  defaultVisitor: l,
331
331
  convertValue: c,
332
- isVisitable: nt
332
+ isVisitable: it
333
333
  });
334
- function S(g, k) {
334
+ function T(g, k) {
335
335
  if (!u.isUndefined(g)) {
336
336
  if (m.indexOf(g) !== -1)
337
337
  throw Error("Circular reference detected in " + k.join("."));
338
- m.push(g), u.forEach(g, function(C, N) {
339
- (!(u.isUndefined(C) || C === null) && s.call(
338
+ m.push(g), u.forEach(g, function(O, N) {
339
+ (!(u.isUndefined(O) || O === null) && s.call(
340
340
  e,
341
- C,
341
+ O,
342
342
  u.isString(N) ? N.trim() : N,
343
343
  k,
344
- T
345
- )) === !0 && S(C, k ? k.concat(N) : [N]);
344
+ S
345
+ )) === !0 && T(O, k ? k.concat(N) : [N]);
346
346
  }), m.pop();
347
347
  }
348
348
  }
349
349
  if (!u.isObject(t))
350
350
  throw new TypeError("data must be an object");
351
- return S(t), e;
351
+ return T(t), e;
352
352
  }
353
- function Rt(t) {
353
+ function Tt(t) {
354
354
  const e = {
355
355
  "!": "%21",
356
356
  "'": "%27",
@@ -364,40 +364,40 @@ function Rt(t) {
364
364
  return e[n];
365
365
  });
366
366
  }
367
- function vt(t, e) {
368
- this._pairs = [], t && Je(t, this, e);
367
+ function bt(t, e) {
368
+ this._pairs = [], t && Xe(t, this, e);
369
369
  }
370
- const Gt = vt.prototype;
371
- Gt.append = function(e, r) {
370
+ const Qt = bt.prototype;
371
+ Qt.append = function(e, r) {
372
372
  this._pairs.push([e, r]);
373
373
  };
374
- Gt.toString = function(e) {
374
+ Qt.toString = function(e) {
375
375
  const r = e ? function(n) {
376
- return e.call(this, n, Rt);
377
- } : Rt;
376
+ return e.call(this, n, Tt);
377
+ } : Tt;
378
378
  return this._pairs.map(function(s) {
379
379
  return r(s[0]) + "=" + r(s[1]);
380
380
  }, "").join("&");
381
381
  };
382
- function sn(t) {
382
+ function on(t) {
383
383
  return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
384
384
  }
385
- function Yt(t, e, r) {
385
+ function er(t, e, r) {
386
386
  if (!e)
387
387
  return t;
388
- const n = r && r.encode || sn;
388
+ const n = r && r.encode || on;
389
389
  u.isFunction(r) && (r = {
390
390
  serialize: r
391
391
  });
392
392
  const s = r && r.serialize;
393
393
  let i;
394
- if (s ? i = s(e, r) : i = u.isURLSearchParams(e) ? e.toString() : new vt(e, r).toString(n), i) {
394
+ if (s ? i = s(e, r) : i = u.isURLSearchParams(e) ? e.toString() : new bt(e, r).toString(n), i) {
395
395
  const a = t.indexOf("#");
396
396
  a !== -1 && (t = t.slice(0, a)), t += (t.indexOf("?") === -1 ? "?" : "&") + i;
397
397
  }
398
398
  return t;
399
399
  }
400
- class Tt {
400
+ class At {
401
401
  constructor() {
402
402
  this.handlers = [];
403
403
  }
@@ -451,41 +451,41 @@ class Tt {
451
451
  });
452
452
  }
453
453
  }
454
- const Qt = {
454
+ const tr = {
455
455
  silentJSONParsing: !0,
456
456
  forcedJSONParsing: !0,
457
457
  clarifyTimeoutError: !1
458
- }, an = typeof URLSearchParams < "u" ? URLSearchParams : vt, on = typeof FormData < "u" ? FormData : null, cn = typeof Blob < "u" ? Blob : null, un = {
458
+ }, cn = typeof URLSearchParams < "u" ? URLSearchParams : bt, un = typeof FormData < "u" ? FormData : null, ln = typeof Blob < "u" ? Blob : null, dn = {
459
459
  isBrowser: !0,
460
460
  classes: {
461
- URLSearchParams: an,
462
- FormData: on,
463
- Blob: cn
461
+ URLSearchParams: cn,
462
+ FormData: un,
463
+ Blob: ln
464
464
  },
465
465
  protocols: ["http", "https", "file", "blob", "url", "data"]
466
- }, bt = typeof window < "u" && typeof document < "u", st = typeof navigator == "object" && navigator || void 0, ln = bt && (!st || ["ReactNative", "NativeScript", "NS"].indexOf(st.product) < 0), dn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
467
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function", fn = bt && window.location.href || "http://localhost", hn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
466
+ }, wt = typeof window < "u" && typeof document < "u", at = typeof navigator == "object" && navigator || void 0, fn = wt && (!at || ["ReactNative", "NativeScript", "NS"].indexOf(at.product) < 0), hn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
467
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", pn = wt && window.location.href || "http://localhost", mn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
468
468
  __proto__: null,
469
- hasBrowserEnv: bt,
470
- hasStandardBrowserEnv: ln,
471
- hasStandardBrowserWebWorkerEnv: dn,
472
- navigator: st,
473
- origin: fn
469
+ hasBrowserEnv: wt,
470
+ hasStandardBrowserEnv: fn,
471
+ hasStandardBrowserWebWorkerEnv: hn,
472
+ navigator: at,
473
+ origin: pn
474
474
  }, Symbol.toStringTag, { value: "Module" })), P = {
475
- ...hn,
476
- ...un
475
+ ...mn,
476
+ ...dn
477
477
  };
478
- function pn(t, e) {
479
- return Je(t, new P.classes.URLSearchParams(), Object.assign({
478
+ function yn(t, e) {
479
+ return Xe(t, new P.classes.URLSearchParams(), Object.assign({
480
480
  visitor: function(r, n, s, i) {
481
481
  return P.isNode && u.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
482
482
  }
483
483
  }, e));
484
484
  }
485
- function mn(t) {
485
+ function gn(t) {
486
486
  return u.matchAll(/\w+|\[(\w*)]/g, t).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
487
487
  }
488
- function yn(t) {
488
+ function _n(t) {
489
489
  const e = {}, r = Object.keys(t);
490
490
  let n;
491
491
  const s = r.length;
@@ -494,22 +494,22 @@ function yn(t) {
494
494
  i = r[n], e[i] = t[i];
495
495
  return e;
496
496
  }
497
- function er(t) {
497
+ function rr(t) {
498
498
  function e(r, n, s, i) {
499
499
  let a = r[i++];
500
500
  if (a === "__proto__") return !0;
501
501
  const o = Number.isFinite(+a), d = i >= r.length;
502
- return a = !a && u.isArray(s) ? s.length : a, d ? (u.hasOwnProp(s, a) ? s[a] = [s[a], n] : s[a] = n, !o) : ((!s[a] || !u.isObject(s[a])) && (s[a] = []), e(r, n, s[a], i) && u.isArray(s[a]) && (s[a] = yn(s[a])), !o);
502
+ return a = !a && u.isArray(s) ? s.length : a, d ? (u.hasOwnProp(s, a) ? s[a] = [s[a], n] : s[a] = n, !o) : ((!s[a] || !u.isObject(s[a])) && (s[a] = []), e(r, n, s[a], i) && u.isArray(s[a]) && (s[a] = _n(s[a])), !o);
503
503
  }
504
504
  if (u.isFormData(t) && u.isFunction(t.entries)) {
505
505
  const r = {};
506
506
  return u.forEachEntry(t, (n, s) => {
507
- e(mn(n), s, r, 0);
507
+ e(gn(n), s, r, 0);
508
508
  }), r;
509
509
  }
510
510
  return null;
511
511
  }
512
- function gn(t, e, r) {
512
+ function vn(t, e, r) {
513
513
  if (u.isString(t))
514
514
  try {
515
515
  return (e || JSON.parse)(t), u.trim(t);
@@ -519,13 +519,13 @@ function gn(t, e, r) {
519
519
  }
520
520
  return (r || JSON.stringify)(t);
521
521
  }
522
- const Ee = {
523
- transitional: Qt,
522
+ const Re = {
523
+ transitional: tr,
524
524
  adapter: ["xhr", "http", "fetch"],
525
525
  transformRequest: [function(e, r) {
526
526
  const n = r.getContentType() || "", s = n.indexOf("application/json") > -1, i = u.isObject(e);
527
527
  if (i && u.isHTMLForm(e) && (e = new FormData(e)), u.isFormData(e))
528
- return s ? JSON.stringify(er(e)) : e;
528
+ return s ? JSON.stringify(rr(e)) : e;
529
529
  if (u.isArrayBuffer(e) || u.isBuffer(e) || u.isStream(e) || u.isFile(e) || u.isBlob(e) || u.isReadableStream(e))
530
530
  return e;
531
531
  if (u.isArrayBufferView(e))
@@ -535,20 +535,20 @@ const Ee = {
535
535
  let o;
536
536
  if (i) {
537
537
  if (n.indexOf("application/x-www-form-urlencoded") > -1)
538
- return pn(e, this.formSerializer).toString();
538
+ return yn(e, this.formSerializer).toString();
539
539
  if ((o = u.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
540
540
  const d = this.env && this.env.FormData;
541
- return Je(
541
+ return Xe(
542
542
  o ? { "files[]": e } : e,
543
543
  d && new d(),
544
544
  this.formSerializer
545
545
  );
546
546
  }
547
547
  }
548
- return i || s ? (r.setContentType("application/json", !1), gn(e)) : e;
548
+ return i || s ? (r.setContentType("application/json", !1), vn(e)) : e;
549
549
  }],
550
550
  transformResponse: [function(e) {
551
- const r = this.transitional || Ee.transitional, n = r && r.forcedJSONParsing, s = this.responseType === "json";
551
+ const r = this.transitional || Re.transitional, n = r && r.forcedJSONParsing, s = this.responseType === "json";
552
552
  if (u.isResponse(e) || u.isReadableStream(e))
553
553
  return e;
554
554
  if (e && u.isString(e) && (n && !this.responseType || s)) {
@@ -586,9 +586,9 @@ const Ee = {
586
586
  }
587
587
  };
588
588
  u.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
589
- Ee.headers[t] = {};
589
+ Re.headers[t] = {};
590
590
  });
591
- const _n = u.toObjectSet([
591
+ const bn = u.toObjectSet([
592
592
  "age",
593
593
  "authorization",
594
594
  "content-length",
@@ -606,29 +606,29 @@ const _n = u.toObjectSet([
606
606
  "referer",
607
607
  "retry-after",
608
608
  "user-agent"
609
- ]), vn = (t) => {
609
+ ]), wn = (t) => {
610
610
  const e = {};
611
611
  let r, n, s;
612
612
  return t && t.split(`
613
613
  `).forEach(function(a) {
614
- s = a.indexOf(":"), r = a.substring(0, s).trim().toLowerCase(), n = a.substring(s + 1).trim(), !(!r || e[r] && _n[r]) && (r === "set-cookie" ? e[r] ? e[r].push(n) : e[r] = [n] : e[r] = e[r] ? e[r] + ", " + n : n);
614
+ s = a.indexOf(":"), r = a.substring(0, s).trim().toLowerCase(), n = a.substring(s + 1).trim(), !(!r || e[r] && bn[r]) && (r === "set-cookie" ? e[r] ? e[r].push(n) : e[r] = [n] : e[r] = e[r] ? e[r] + ", " + n : n);
615
615
  }), e;
616
- }, St = Symbol("internals");
617
- function pe(t) {
616
+ }, Ot = Symbol("internals");
617
+ function me(t) {
618
618
  return t && String(t).trim().toLowerCase();
619
619
  }
620
- function Se(t) {
621
- return t === !1 || t == null ? t : u.isArray(t) ? t.map(Se) : String(t);
620
+ function Ae(t) {
621
+ return t === !1 || t == null ? t : u.isArray(t) ? t.map(Ae) : String(t);
622
622
  }
623
- function bn(t) {
623
+ function xn(t) {
624
624
  const e = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
625
625
  let n;
626
626
  for (; n = r.exec(t); )
627
627
  e[n[1]] = n[2];
628
628
  return e;
629
629
  }
630
- const wn = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
631
- function Ye(t, e, r, n, s) {
630
+ const kn = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
631
+ function et(t, e, r, n, s) {
632
632
  if (u.isFunction(n))
633
633
  return n.call(this, e, r);
634
634
  if (s && (e = r), !!u.isString(e)) {
@@ -638,10 +638,10 @@ function Ye(t, e, r, n, s) {
638
638
  return n.test(e);
639
639
  }
640
640
  }
641
- function xn(t) {
641
+ function En(t) {
642
642
  return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, r, n) => r.toUpperCase() + n);
643
643
  }
644
- function kn(t, e) {
644
+ function Rn(t, e) {
645
645
  const r = u.toCamelCase(" " + e);
646
646
  ["get", "set", "has"].forEach((n) => {
647
647
  Object.defineProperty(t, n + r, {
@@ -659,17 +659,17 @@ let U = class {
659
659
  set(e, r, n) {
660
660
  const s = this;
661
661
  function i(o, d, c) {
662
- const l = pe(d);
662
+ const l = me(d);
663
663
  if (!l)
664
664
  throw new Error("header name must be a non-empty string");
665
665
  const m = u.findKey(s, l);
666
- (!m || s[m] === void 0 || c === !0 || c === void 0 && s[m] !== !1) && (s[m || d] = Se(o));
666
+ (!m || s[m] === void 0 || c === !0 || c === void 0 && s[m] !== !1) && (s[m || d] = Ae(o));
667
667
  }
668
668
  const a = (o, d) => u.forEach(o, (c, l) => i(c, l, d));
669
669
  if (u.isPlainObject(e) || e instanceof this.constructor)
670
670
  a(e, r);
671
- else if (u.isString(e) && (e = e.trim()) && !wn(e))
672
- a(vn(e), r);
671
+ else if (u.isString(e) && (e = e.trim()) && !kn(e))
672
+ a(wn(e), r);
673
673
  else if (u.isObject(e) && u.isIterable(e)) {
674
674
  let o = {}, d, c;
675
675
  for (const l of e) {
@@ -683,14 +683,14 @@ let U = class {
683
683
  return this;
684
684
  }
685
685
  get(e, r) {
686
- if (e = pe(e), e) {
686
+ if (e = me(e), e) {
687
687
  const n = u.findKey(this, e);
688
688
  if (n) {
689
689
  const s = this[n];
690
690
  if (!r)
691
691
  return s;
692
692
  if (r === !0)
693
- return bn(s);
693
+ return xn(s);
694
694
  if (u.isFunction(r))
695
695
  return r.call(this, s, n);
696
696
  if (u.isRegExp(r))
@@ -700,9 +700,9 @@ let U = class {
700
700
  }
701
701
  }
702
702
  has(e, r) {
703
- if (e = pe(e), e) {
703
+ if (e = me(e), e) {
704
704
  const n = u.findKey(this, e);
705
- return !!(n && this[n] !== void 0 && (!r || Ye(this, this[n], n, r)));
705
+ return !!(n && this[n] !== void 0 && (!r || et(this, this[n], n, r)));
706
706
  }
707
707
  return !1;
708
708
  }
@@ -710,9 +710,9 @@ let U = class {
710
710
  const n = this;
711
711
  let s = !1;
712
712
  function i(a) {
713
- if (a = pe(a), a) {
713
+ if (a = me(a), a) {
714
714
  const o = u.findKey(n, a);
715
- o && (!r || Ye(n, n[o], o, r)) && (delete n[o], s = !0);
715
+ o && (!r || et(n, n[o], o, r)) && (delete n[o], s = !0);
716
716
  }
717
717
  }
718
718
  return u.isArray(e) ? e.forEach(i) : i(e), s;
@@ -722,7 +722,7 @@ let U = class {
722
722
  let n = r.length, s = !1;
723
723
  for (; n--; ) {
724
724
  const i = r[n];
725
- (!e || Ye(this, this[i], i, e, !0)) && (delete this[i], s = !0);
725
+ (!e || et(this, this[i], i, e, !0)) && (delete this[i], s = !0);
726
726
  }
727
727
  return s;
728
728
  }
@@ -731,11 +731,11 @@ let U = class {
731
731
  return u.forEach(this, (s, i) => {
732
732
  const a = u.findKey(n, i);
733
733
  if (a) {
734
- r[a] = Se(s), delete r[i];
734
+ r[a] = Ae(s), delete r[i];
735
735
  return;
736
736
  }
737
- const o = e ? xn(i) : String(i).trim();
738
- o !== i && delete r[i], r[o] = Se(s), n[o] = !0;
737
+ const o = e ? En(i) : String(i).trim();
738
+ o !== i && delete r[i], r[o] = Ae(s), n[o] = !0;
739
739
  }), this;
740
740
  }
741
741
  concat(...e) {
@@ -768,12 +768,12 @@ let U = class {
768
768
  return r.forEach((s) => n.set(s)), n;
769
769
  }
770
770
  static accessor(e) {
771
- const n = (this[St] = this[St] = {
771
+ const n = (this[Ot] = this[Ot] = {
772
772
  accessors: {}
773
773
  }).accessors, s = this.prototype;
774
774
  function i(a) {
775
- const o = pe(a);
776
- n[o] || (kn(s, a), n[o] = !0);
775
+ const o = me(a);
776
+ n[o] || (Rn(s, a), n[o] = !0);
777
777
  }
778
778
  return u.isArray(e) ? e.forEach(i) : i(e), this;
779
779
  }
@@ -789,23 +789,23 @@ u.reduceDescriptors(U.prototype, ({ value: t }, e) => {
789
789
  };
790
790
  });
791
791
  u.freezeMethods(U);
792
- function Qe(t, e) {
793
- const r = this || Ee, n = e || r, s = U.from(n.headers);
792
+ function tt(t, e) {
793
+ const r = this || Re, n = e || r, s = U.from(n.headers);
794
794
  let i = n.data;
795
795
  return u.forEach(t, function(o) {
796
796
  i = o.call(r, i, s.normalize(), e ? e.status : void 0);
797
797
  }), s.normalize(), i;
798
798
  }
799
- function tr(t) {
799
+ function nr(t) {
800
800
  return !!(t && t.__CANCEL__);
801
801
  }
802
- function he(t, e, r) {
802
+ function pe(t, e, r) {
803
803
  w.call(this, t ?? "canceled", w.ERR_CANCELED, e, r), this.name = "CanceledError";
804
804
  }
805
- u.inherits(he, w, {
805
+ u.inherits(pe, w, {
806
806
  __CANCEL__: !0
807
807
  });
808
- function rr(t, e, r) {
808
+ function sr(t, e, r) {
809
809
  const n = r.config.validateStatus;
810
810
  !r.status || !n || n(r.status) ? t(r) : e(new w(
811
811
  "Request failed with status code " + r.status,
@@ -815,27 +815,27 @@ function rr(t, e, r) {
815
815
  r
816
816
  ));
817
817
  }
818
- function En(t) {
818
+ function Sn(t) {
819
819
  const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t);
820
820
  return e && e[1] || "";
821
821
  }
822
- function Rn(t, e) {
822
+ function Tn(t, e) {
823
823
  t = t || 10;
824
824
  const r = new Array(t), n = new Array(t);
825
825
  let s = 0, i = 0, a;
826
826
  return e = e !== void 0 ? e : 1e3, function(d) {
827
827
  const c = Date.now(), l = n[i];
828
828
  a || (a = c), r[s] = d, n[s] = c;
829
- let m = i, T = 0;
829
+ let m = i, S = 0;
830
830
  for (; m !== s; )
831
- T += r[m++], m = m % t;
831
+ S += r[m++], m = m % t;
832
832
  if (s = (s + 1) % t, s === i && (i = (i + 1) % t), c - a < e)
833
833
  return;
834
- const S = l && c - l;
835
- return S ? Math.round(T * 1e3 / S) : void 0;
834
+ const T = l && c - l;
835
+ return T ? Math.round(S * 1e3 / T) : void 0;
836
836
  };
837
837
  }
838
- function Tn(t, e) {
838
+ function An(t, e) {
839
839
  let r = 0, n = 1e3 / e, s, i;
840
840
  const a = (c, l = Date.now()) => {
841
841
  r = l, s = null, i && (clearTimeout(i), i = null), t.apply(null, c);
@@ -847,10 +847,10 @@ function Tn(t, e) {
847
847
  }, n - m)));
848
848
  }, () => s && a(s)];
849
849
  }
850
- const Oe = (t, e, r = 3) => {
850
+ const Ce = (t, e, r = 3) => {
851
851
  let n = 0;
852
- const s = Rn(50, 250);
853
- return Tn((i) => {
852
+ const s = Tn(50, 250);
853
+ return An((i) => {
854
854
  const a = i.loaded, o = i.lengthComputable ? i.total : void 0, d = a - n, c = s(d), l = a <= o;
855
855
  n = a;
856
856
  const m = {
@@ -866,17 +866,17 @@ const Oe = (t, e, r = 3) => {
866
866
  };
867
867
  t(m);
868
868
  }, r);
869
- }, At = (t, e) => {
869
+ }, Ct = (t, e) => {
870
870
  const r = t != null;
871
871
  return [(n) => e[0]({
872
872
  lengthComputable: r,
873
873
  total: t,
874
874
  loaded: n
875
875
  }), e[1]];
876
- }, Ot = (t) => (...e) => u.asap(() => t(...e)), Sn = P.hasStandardBrowserEnv ? /* @__PURE__ */ ((t, e) => (r) => (r = new URL(r, P.origin), t.protocol === r.protocol && t.host === r.host && (e || t.port === r.port)))(
876
+ }, Nt = (t) => (...e) => u.asap(() => t(...e)), On = P.hasStandardBrowserEnv ? /* @__PURE__ */ ((t, e) => (r) => (r = new URL(r, P.origin), t.protocol === r.protocol && t.host === r.host && (e || t.port === r.port)))(
877
877
  new URL(P.origin),
878
878
  P.navigator && /(msie|trident)/i.test(P.navigator.userAgent)
879
- ) : () => !0, An = P.hasStandardBrowserEnv ? (
879
+ ) : () => !0, Cn = P.hasStandardBrowserEnv ? (
880
880
  // Standard browser envs support document.cookie
881
881
  {
882
882
  write(t, e, r, n, s, i) {
@@ -903,28 +903,28 @@ const Oe = (t, e, r = 3) => {
903
903
  }
904
904
  }
905
905
  );
906
- function On(t) {
906
+ function Nn(t) {
907
907
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
908
908
  }
909
- function Cn(t, e) {
909
+ function jn(t, e) {
910
910
  return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t;
911
911
  }
912
- function nr(t, e, r) {
913
- let n = !On(e);
914
- return t && (n || r == !1) ? Cn(t, e) : e;
912
+ function ir(t, e, r) {
913
+ let n = !Nn(e);
914
+ return t && (n || r == !1) ? jn(t, e) : e;
915
915
  }
916
- const Ct = (t) => t instanceof U ? { ...t } : t;
917
- function ne(t, e) {
916
+ const jt = (t) => t instanceof U ? { ...t } : t;
917
+ function re(t, e) {
918
918
  e = e || {};
919
919
  const r = {};
920
- function n(c, l, m, T) {
921
- return u.isPlainObject(c) && u.isPlainObject(l) ? u.merge.call({ caseless: T }, c, l) : u.isPlainObject(l) ? u.merge({}, l) : u.isArray(l) ? l.slice() : l;
920
+ function n(c, l, m, S) {
921
+ return u.isPlainObject(c) && u.isPlainObject(l) ? u.merge.call({ caseless: S }, c, l) : u.isPlainObject(l) ? u.merge({}, l) : u.isArray(l) ? l.slice() : l;
922
922
  }
923
- function s(c, l, m, T) {
923
+ function s(c, l, m, S) {
924
924
  if (u.isUndefined(l)) {
925
925
  if (!u.isUndefined(c))
926
- return n(void 0, c, m, T);
927
- } else return n(c, l, m, T);
926
+ return n(void 0, c, m, S);
927
+ } else return n(c, l, m, S);
928
928
  }
929
929
  function i(c, l) {
930
930
  if (!u.isUndefined(l))
@@ -971,17 +971,17 @@ function ne(t, e) {
971
971
  socketPath: a,
972
972
  responseEncoding: a,
973
973
  validateStatus: o,
974
- headers: (c, l, m) => s(Ct(c), Ct(l), m, !0)
974
+ headers: (c, l, m) => s(jt(c), jt(l), m, !0)
975
975
  };
976
976
  return u.forEach(Object.keys(Object.assign({}, t, e)), function(l) {
977
- const m = d[l] || s, T = m(t[l], e[l], l);
978
- u.isUndefined(T) && m !== o || (r[l] = T);
977
+ const m = d[l] || s, S = m(t[l], e[l], l);
978
+ u.isUndefined(S) && m !== o || (r[l] = S);
979
979
  }), r;
980
980
  }
981
- const sr = (t) => {
982
- const e = ne({}, t);
981
+ const ar = (t) => {
982
+ const e = re({}, t);
983
983
  let { data: r, withXSRFToken: n, xsrfHeaderName: s, xsrfCookieName: i, headers: a, auth: o } = e;
984
- e.headers = a = U.from(a), e.url = Yt(nr(e.baseURL, e.url, e.allowAbsoluteUrls), t.params, t.paramsSerializer), o && a.set(
984
+ e.headers = a = U.from(a), e.url = er(ir(e.baseURL, e.url, e.allowAbsoluteUrls), t.params, t.paramsSerializer), o && a.set(
985
985
  "Authorization",
986
986
  "Basic " + btoa((o.username || "") + ":" + (o.password ? unescape(encodeURIComponent(o.password)) : ""))
987
987
  );
@@ -994,28 +994,28 @@ const sr = (t) => {
994
994
  a.setContentType([c || "multipart/form-data", ...l].join("; "));
995
995
  }
996
996
  }
997
- if (P.hasStandardBrowserEnv && (n && u.isFunction(n) && (n = n(e)), n || n !== !1 && Sn(e.url))) {
998
- const c = s && i && An.read(i);
997
+ if (P.hasStandardBrowserEnv && (n && u.isFunction(n) && (n = n(e)), n || n !== !1 && On(e.url))) {
998
+ const c = s && i && Cn.read(i);
999
999
  c && a.set(s, c);
1000
1000
  }
1001
1001
  return e;
1002
- }, Nn = typeof XMLHttpRequest < "u", jn = Nn && function(t) {
1002
+ }, Pn = typeof XMLHttpRequest < "u", In = Pn && function(t) {
1003
1003
  return new Promise(function(r, n) {
1004
- const s = sr(t);
1004
+ const s = ar(t);
1005
1005
  let i = s.data;
1006
1006
  const a = U.from(s.headers).normalize();
1007
- let { responseType: o, onUploadProgress: d, onDownloadProgress: c } = s, l, m, T, S, g;
1007
+ let { responseType: o, onUploadProgress: d, onDownloadProgress: c } = s, l, m, S, T, g;
1008
1008
  function k() {
1009
- S && S(), g && g(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
1009
+ T && T(), g && g(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
1010
1010
  }
1011
1011
  let _ = new XMLHttpRequest();
1012
1012
  _.open(s.method.toUpperCase(), s.url, !0), _.timeout = s.timeout;
1013
- function C() {
1013
+ function O() {
1014
1014
  if (!_)
1015
1015
  return;
1016
1016
  const j = U.from(
1017
1017
  "getAllResponseHeaders" in _ && _.getAllResponseHeaders()
1018
- ), I = {
1018
+ ), D = {
1019
1019
  data: !o || o === "text" || o === "json" ? _.responseText : _.response,
1020
1020
  status: _.status,
1021
1021
  statusText: _.statusText,
@@ -1023,40 +1023,40 @@ const sr = (t) => {
1023
1023
  config: t,
1024
1024
  request: _
1025
1025
  };
1026
- rr(function(ee) {
1027
- r(ee), k();
1028
- }, function(ee) {
1029
- n(ee), k();
1030
- }, I), _ = null;
1026
+ sr(function(Q) {
1027
+ r(Q), k();
1028
+ }, function(Q) {
1029
+ n(Q), k();
1030
+ }, D), _ = null;
1031
1031
  }
1032
- "onloadend" in _ ? _.onloadend = C : _.onreadystatechange = function() {
1033
- !_ || _.readyState !== 4 || _.status === 0 && !(_.responseURL && _.responseURL.indexOf("file:") === 0) || setTimeout(C);
1032
+ "onloadend" in _ ? _.onloadend = O : _.onreadystatechange = function() {
1033
+ !_ || _.readyState !== 4 || _.status === 0 && !(_.responseURL && _.responseURL.indexOf("file:") === 0) || setTimeout(O);
1034
1034
  }, _.onabort = function() {
1035
1035
  _ && (n(new w("Request aborted", w.ECONNABORTED, t, _)), _ = null);
1036
1036
  }, _.onerror = function() {
1037
1037
  n(new w("Network Error", w.ERR_NETWORK, t, _)), _ = null;
1038
1038
  }, _.ontimeout = function() {
1039
- let V = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1040
- const I = s.transitional || Qt;
1041
- s.timeoutErrorMessage && (V = s.timeoutErrorMessage), n(new w(
1042
- V,
1043
- I.clarifyTimeoutError ? w.ETIMEDOUT : w.ECONNABORTED,
1039
+ let q = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1040
+ const D = s.transitional || tr;
1041
+ s.timeoutErrorMessage && (q = s.timeoutErrorMessage), n(new w(
1042
+ q,
1043
+ D.clarifyTimeoutError ? w.ETIMEDOUT : w.ECONNABORTED,
1044
1044
  t,
1045
1045
  _
1046
1046
  )), _ = null;
1047
- }, i === void 0 && a.setContentType(null), "setRequestHeader" in _ && u.forEach(a.toJSON(), function(V, I) {
1048
- _.setRequestHeader(I, V);
1049
- }), u.isUndefined(s.withCredentials) || (_.withCredentials = !!s.withCredentials), o && o !== "json" && (_.responseType = s.responseType), c && ([T, g] = Oe(c, !0), _.addEventListener("progress", T)), d && _.upload && ([m, S] = Oe(d), _.upload.addEventListener("progress", m), _.upload.addEventListener("loadend", S)), (s.cancelToken || s.signal) && (l = (j) => {
1050
- _ && (n(!j || j.type ? new he(null, t, _) : j), _.abort(), _ = null);
1047
+ }, i === void 0 && a.setContentType(null), "setRequestHeader" in _ && u.forEach(a.toJSON(), function(q, D) {
1048
+ _.setRequestHeader(D, q);
1049
+ }), u.isUndefined(s.withCredentials) || (_.withCredentials = !!s.withCredentials), o && o !== "json" && (_.responseType = s.responseType), c && ([S, g] = Ce(c, !0), _.addEventListener("progress", S)), d && _.upload && ([m, T] = Ce(d), _.upload.addEventListener("progress", m), _.upload.addEventListener("loadend", T)), (s.cancelToken || s.signal) && (l = (j) => {
1050
+ _ && (n(!j || j.type ? new pe(null, t, _) : j), _.abort(), _ = null);
1051
1051
  }, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
1052
- const N = En(s.url);
1052
+ const N = Sn(s.url);
1053
1053
  if (N && P.protocols.indexOf(N) === -1) {
1054
1054
  n(new w("Unsupported protocol " + N + ":", w.ERR_BAD_REQUEST, t));
1055
1055
  return;
1056
1056
  }
1057
1057
  _.send(i || null);
1058
1058
  });
1059
- }, Pn = (t, e) => {
1059
+ }, Dn = (t, e) => {
1060
1060
  const { length: r } = t = t ? t.filter(Boolean) : [];
1061
1061
  if (e || r) {
1062
1062
  let n = new AbortController(), s;
@@ -1064,7 +1064,7 @@ const sr = (t) => {
1064
1064
  if (!s) {
1065
1065
  s = !0, o();
1066
1066
  const l = c instanceof Error ? c : this.reason;
1067
- n.abort(l instanceof w ? l : new he(l instanceof Error ? l.message : l));
1067
+ n.abort(l instanceof w ? l : new pe(l instanceof Error ? l.message : l));
1068
1068
  }
1069
1069
  };
1070
1070
  let a = e && setTimeout(() => {
@@ -1079,7 +1079,7 @@ const sr = (t) => {
1079
1079
  const { signal: d } = n;
1080
1080
  return d.unsubscribe = () => u.asap(o), d;
1081
1081
  }
1082
- }, Dn = function* (t, e) {
1082
+ }, Ln = function* (t, e) {
1083
1083
  let r = t.byteLength;
1084
1084
  if (r < e) {
1085
1085
  yield t;
@@ -1088,10 +1088,10 @@ const sr = (t) => {
1088
1088
  let n = 0, s;
1089
1089
  for (; n < r; )
1090
1090
  s = n + e, yield t.slice(n, s), n = s;
1091
- }, In = async function* (t, e) {
1092
- for await (const r of Ln(t))
1093
- yield* Dn(r, e);
1094
- }, Ln = async function* (t) {
1091
+ }, Un = async function* (t, e) {
1092
+ for await (const r of Fn(t))
1093
+ yield* Ln(r, e);
1094
+ }, Fn = async function* (t) {
1095
1095
  if (t[Symbol.asyncIterator]) {
1096
1096
  yield* t;
1097
1097
  return;
@@ -1107,8 +1107,8 @@ const sr = (t) => {
1107
1107
  } finally {
1108
1108
  await e.cancel();
1109
1109
  }
1110
- }, Nt = (t, e, r, n) => {
1111
- const s = In(t, e);
1110
+ }, Pt = (t, e, r, n) => {
1111
+ const s = Un(t, e);
1112
1112
  let i = 0, a, o = (d) => {
1113
1113
  a || (a = !0, n && n(d));
1114
1114
  };
@@ -1122,8 +1122,8 @@ const sr = (t) => {
1122
1122
  }
1123
1123
  let m = l.byteLength;
1124
1124
  if (r) {
1125
- let T = i += m;
1126
- r(T);
1125
+ let S = i += m;
1126
+ r(S);
1127
1127
  }
1128
1128
  d.enqueue(new Uint8Array(l));
1129
1129
  } catch (c) {
@@ -1136,13 +1136,13 @@ const sr = (t) => {
1136
1136
  }, {
1137
1137
  highWaterMark: 2
1138
1138
  });
1139
- }, Ke = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", ir = Ke && typeof ReadableStream == "function", Un = Ke && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((t) => (e) => t.encode(e))(new TextEncoder()) : async (t) => new Uint8Array(await new Response(t).arrayBuffer())), ar = (t, ...e) => {
1139
+ }, Ge = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", or = Ge && typeof ReadableStream == "function", Zn = Ge && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((t) => (e) => t.encode(e))(new TextEncoder()) : async (t) => new Uint8Array(await new Response(t).arrayBuffer())), cr = (t, ...e) => {
1140
1140
  try {
1141
1141
  return !!t(...e);
1142
1142
  } catch {
1143
1143
  return !1;
1144
1144
  }
1145
- }, Fn = ir && ar(() => {
1145
+ }, Mn = or && cr(() => {
1146
1146
  let t = !1;
1147
1147
  const e = new Request(P.origin, {
1148
1148
  body: new ReadableStream(),
@@ -1152,17 +1152,17 @@ const sr = (t) => {
1152
1152
  }
1153
1153
  }).headers.has("Content-Type");
1154
1154
  return t && !e;
1155
- }), jt = 64 * 1024, it = ir && ar(() => u.isReadableStream(new Response("").body)), Ce = {
1156
- stream: it && ((t) => t.body)
1155
+ }), It = 64 * 1024, ot = or && cr(() => u.isReadableStream(new Response("").body)), Ne = {
1156
+ stream: ot && ((t) => t.body)
1157
1157
  };
1158
- Ke && ((t) => {
1158
+ Ge && ((t) => {
1159
1159
  ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((e) => {
1160
- !Ce[e] && (Ce[e] = u.isFunction(t[e]) ? (r) => r[e]() : (r, n) => {
1160
+ !Ne[e] && (Ne[e] = u.isFunction(t[e]) ? (r) => r[e]() : (r, n) => {
1161
1161
  throw new w(`Response type '${e}' is not supported`, w.ERR_NOT_SUPPORT, n);
1162
1162
  });
1163
1163
  });
1164
1164
  })(new Response());
1165
- const Zn = async (t) => {
1165
+ const Bn = async (t) => {
1166
1166
  if (t == null)
1167
1167
  return 0;
1168
1168
  if (u.isBlob(t))
@@ -1175,11 +1175,11 @@ const Zn = async (t) => {
1175
1175
  if (u.isArrayBufferView(t) || u.isArrayBuffer(t))
1176
1176
  return t.byteLength;
1177
1177
  if (u.isURLSearchParams(t) && (t = t + ""), u.isString(t))
1178
- return (await Un(t)).byteLength;
1178
+ return (await Zn(t)).byteLength;
1179
1179
  }, $n = async (t, e) => {
1180
1180
  const r = u.toFiniteNumber(t.getContentLength());
1181
- return r ?? Zn(e);
1182
- }, Mn = Ke && (async (t) => {
1181
+ return r ?? Bn(e);
1182
+ }, zn = Ge && (async (t) => {
1183
1183
  let {
1184
1184
  url: e,
1185
1185
  method: r,
@@ -1192,63 +1192,63 @@ const Zn = async (t) => {
1192
1192
  responseType: c,
1193
1193
  headers: l,
1194
1194
  withCredentials: m = "same-origin",
1195
- fetchOptions: T
1196
- } = sr(t);
1195
+ fetchOptions: S
1196
+ } = ar(t);
1197
1197
  c = c ? (c + "").toLowerCase() : "text";
1198
- let S = Pn([s, i && i.toAbortSignal()], a), g;
1199
- const k = S && S.unsubscribe && (() => {
1200
- S.unsubscribe();
1198
+ let T = Dn([s, i && i.toAbortSignal()], a), g;
1199
+ const k = T && T.unsubscribe && (() => {
1200
+ T.unsubscribe();
1201
1201
  });
1202
1202
  let _;
1203
1203
  try {
1204
- if (d && Fn && r !== "get" && r !== "head" && (_ = await $n(l, n)) !== 0) {
1205
- let I = new Request(e, {
1204
+ if (d && Mn && r !== "get" && r !== "head" && (_ = await $n(l, n)) !== 0) {
1205
+ let D = new Request(e, {
1206
1206
  method: "POST",
1207
1207
  body: n,
1208
1208
  duplex: "half"
1209
- }), G;
1210
- if (u.isFormData(n) && (G = I.headers.get("content-type")) && l.setContentType(G), I.body) {
1211
- const [ee, Re] = At(
1209
+ }), X;
1210
+ if (u.isFormData(n) && (X = D.headers.get("content-type")) && l.setContentType(X), D.body) {
1211
+ const [Q, Se] = Ct(
1212
1212
  _,
1213
- Oe(Ot(d))
1213
+ Ce(Nt(d))
1214
1214
  );
1215
- n = Nt(I.body, jt, ee, Re);
1215
+ n = Pt(D.body, It, Q, Se);
1216
1216
  }
1217
1217
  }
1218
1218
  u.isString(m) || (m = m ? "include" : "omit");
1219
- const C = "credentials" in Request.prototype;
1219
+ const O = "credentials" in Request.prototype;
1220
1220
  g = new Request(e, {
1221
- ...T,
1222
- signal: S,
1221
+ ...S,
1222
+ signal: T,
1223
1223
  method: r.toUpperCase(),
1224
1224
  headers: l.normalize().toJSON(),
1225
1225
  body: n,
1226
1226
  duplex: "half",
1227
- credentials: C ? m : void 0
1227
+ credentials: O ? m : void 0
1228
1228
  });
1229
1229
  let N = await fetch(g);
1230
- const j = it && (c === "stream" || c === "response");
1231
- if (it && (o || j && k)) {
1232
- const I = {};
1233
- ["status", "statusText", "headers"].forEach((xt) => {
1234
- I[xt] = N[xt];
1230
+ const j = ot && (c === "stream" || c === "response");
1231
+ if (ot && (o || j && k)) {
1232
+ const D = {};
1233
+ ["status", "statusText", "headers"].forEach((Et) => {
1234
+ D[Et] = N[Et];
1235
1235
  });
1236
- const G = u.toFiniteNumber(N.headers.get("content-length")), [ee, Re] = o && At(
1237
- G,
1238
- Oe(Ot(o), !0)
1236
+ const X = u.toFiniteNumber(N.headers.get("content-length")), [Q, Se] = o && Ct(
1237
+ X,
1238
+ Ce(Nt(o), !0)
1239
1239
  ) || [];
1240
1240
  N = new Response(
1241
- Nt(N.body, jt, ee, () => {
1242
- Re && Re(), k && k();
1241
+ Pt(N.body, It, Q, () => {
1242
+ Se && Se(), k && k();
1243
1243
  }),
1244
- I
1244
+ D
1245
1245
  );
1246
1246
  }
1247
1247
  c = c || "text";
1248
- let V = await Ce[u.findKey(Ce, c) || "text"](N, t);
1249
- return !j && k && k(), await new Promise((I, G) => {
1250
- rr(I, G, {
1251
- data: V,
1248
+ let q = await Ne[u.findKey(Ne, c) || "text"](N, t);
1249
+ return !j && k && k(), await new Promise((D, X) => {
1250
+ sr(D, X, {
1251
+ data: q,
1252
1252
  headers: U.from(N.headers),
1253
1253
  status: N.status,
1254
1254
  statusText: N.statusText,
@@ -1256,20 +1256,20 @@ const Zn = async (t) => {
1256
1256
  request: g
1257
1257
  });
1258
1258
  });
1259
- } catch (C) {
1260
- throw k && k(), C && C.name === "TypeError" && /Load failed|fetch/i.test(C.message) ? Object.assign(
1259
+ } catch (O) {
1260
+ throw k && k(), O && O.name === "TypeError" && /Load failed|fetch/i.test(O.message) ? Object.assign(
1261
1261
  new w("Network Error", w.ERR_NETWORK, t, g),
1262
1262
  {
1263
- cause: C.cause || C
1263
+ cause: O.cause || O
1264
1264
  }
1265
- ) : w.from(C, C && C.code, t, g);
1265
+ ) : w.from(O, O && O.code, t, g);
1266
1266
  }
1267
- }), at = {
1268
- http: tn,
1269
- xhr: jn,
1270
- fetch: Mn
1267
+ }), ct = {
1268
+ http: nn,
1269
+ xhr: In,
1270
+ fetch: zn
1271
1271
  };
1272
- u.forEach(at, (t, e) => {
1272
+ u.forEach(ct, (t, e) => {
1273
1273
  if (t) {
1274
1274
  try {
1275
1275
  Object.defineProperty(t, "name", { value: e });
@@ -1278,7 +1278,7 @@ u.forEach(at, (t, e) => {
1278
1278
  Object.defineProperty(t, "adapterName", { value: e });
1279
1279
  }
1280
1280
  });
1281
- const Pt = (t) => `- ${t}`, Bn = (t) => u.isFunction(t) || t === null || t === !1, or = {
1281
+ const Dt = (t) => `- ${t}`, qn = (t) => u.isFunction(t) || t === null || t === !1, ur = {
1282
1282
  getAdapter: (t) => {
1283
1283
  t = u.isArray(t) ? t : [t];
1284
1284
  const { length: e } = t;
@@ -1287,7 +1287,7 @@ const Pt = (t) => `- ${t}`, Bn = (t) => u.isFunction(t) || t === null || t === !
1287
1287
  for (let i = 0; i < e; i++) {
1288
1288
  r = t[i];
1289
1289
  let a;
1290
- if (n = r, !Bn(r) && (n = at[(a = String(r)).toLowerCase()], n === void 0))
1290
+ if (n = r, !qn(r) && (n = ct[(a = String(r)).toLowerCase()], n === void 0))
1291
1291
  throw new w(`Unknown adapter '${a}'`);
1292
1292
  if (n)
1293
1293
  break;
@@ -1298,8 +1298,8 @@ const Pt = (t) => `- ${t}`, Bn = (t) => u.isFunction(t) || t === null || t === !
1298
1298
  ([o, d]) => `adapter ${o} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
1299
1299
  );
1300
1300
  let a = e ? i.length > 1 ? `since :
1301
- ` + i.map(Pt).join(`
1302
- `) : " " + Pt(i[0]) : "as no adapter specified";
1301
+ ` + i.map(Dt).join(`
1302
+ `) : " " + Dt(i[0]) : "as no adapter specified";
1303
1303
  throw new w(
1304
1304
  "There is no suitable adapter to dispatch the request " + a,
1305
1305
  "ERR_NOT_SUPPORT"
@@ -1307,40 +1307,40 @@ const Pt = (t) => `- ${t}`, Bn = (t) => u.isFunction(t) || t === null || t === !
1307
1307
  }
1308
1308
  return n;
1309
1309
  },
1310
- adapters: at
1310
+ adapters: ct
1311
1311
  };
1312
- function et(t) {
1312
+ function rt(t) {
1313
1313
  if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
1314
- throw new he(null, t);
1314
+ throw new pe(null, t);
1315
1315
  }
1316
- function Dt(t) {
1317
- return et(t), t.headers = U.from(t.headers), t.data = Qe.call(
1316
+ function Lt(t) {
1317
+ return rt(t), t.headers = U.from(t.headers), t.data = tt.call(
1318
1318
  t,
1319
1319
  t.transformRequest
1320
- ), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), or.getAdapter(t.adapter || Ee.adapter)(t).then(function(n) {
1321
- return et(t), n.data = Qe.call(
1320
+ ), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), ur.getAdapter(t.adapter || Re.adapter)(t).then(function(n) {
1321
+ return rt(t), n.data = tt.call(
1322
1322
  t,
1323
1323
  t.transformResponse,
1324
1324
  n
1325
1325
  ), n.headers = U.from(n.headers), n;
1326
1326
  }, function(n) {
1327
- return tr(n) || (et(t), n && n.response && (n.response.data = Qe.call(
1327
+ return nr(n) || (rt(t), n && n.response && (n.response.data = tt.call(
1328
1328
  t,
1329
1329
  t.transformResponse,
1330
1330
  n.response
1331
1331
  ), n.response.headers = U.from(n.response.headers))), Promise.reject(n);
1332
1332
  });
1333
1333
  }
1334
- const cr = "1.9.0", Xe = {};
1334
+ const lr = "1.9.0", Ye = {};
1335
1335
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
1336
- Xe[t] = function(n) {
1336
+ Ye[t] = function(n) {
1337
1337
  return typeof n === t || "a" + (e < 1 ? "n " : " ") + t;
1338
1338
  };
1339
1339
  });
1340
- const It = {};
1341
- Xe.transitional = function(e, r, n) {
1340
+ const Ut = {};
1341
+ Ye.transitional = function(e, r, n) {
1342
1342
  function s(i, a) {
1343
- return "[Axios v" + cr + "] Transitional option '" + i + "'" + a + (n ? ". " + n : "");
1343
+ return "[Axios v" + lr + "] Transitional option '" + i + "'" + a + (n ? ". " + n : "");
1344
1344
  }
1345
1345
  return (i, a, o) => {
1346
1346
  if (e === !1)
@@ -1348,7 +1348,7 @@ Xe.transitional = function(e, r, n) {
1348
1348
  s(a, " has been removed" + (r ? " in " + r : "")),
1349
1349
  w.ERR_DEPRECATED
1350
1350
  );
1351
- return r && !It[a] && (It[a] = !0, console.warn(
1351
+ return r && !Ut[a] && (Ut[a] = !0, console.warn(
1352
1352
  s(
1353
1353
  a,
1354
1354
  " has been deprecated since v" + r + " and will be removed in the near future"
@@ -1356,10 +1356,10 @@ Xe.transitional = function(e, r, n) {
1356
1356
  )), e ? e(i, a, o) : !0;
1357
1357
  };
1358
1358
  };
1359
- Xe.spelling = function(e) {
1359
+ Ye.spelling = function(e) {
1360
1360
  return (r, n) => (console.warn(`${n} is likely a misspelling of ${e}`), !0);
1361
1361
  };
1362
- function zn(t, e, r) {
1362
+ function Vn(t, e, r) {
1363
1363
  if (typeof t != "object")
1364
1364
  throw new w("options must be an object", w.ERR_BAD_OPTION_VALUE);
1365
1365
  const n = Object.keys(t);
@@ -1376,15 +1376,15 @@ function zn(t, e, r) {
1376
1376
  throw new w("Unknown option " + i, w.ERR_BAD_OPTION);
1377
1377
  }
1378
1378
  }
1379
- const Ae = {
1380
- assertOptions: zn,
1381
- validators: Xe
1382
- }, M = Ae.validators;
1383
- let re = class {
1379
+ const Oe = {
1380
+ assertOptions: Vn,
1381
+ validators: Ye
1382
+ }, B = Oe.validators;
1383
+ let te = class {
1384
1384
  constructor(e) {
1385
1385
  this.defaults = e || {}, this.interceptors = {
1386
- request: new Tt(),
1387
- response: new Tt()
1386
+ request: new At(),
1387
+ response: new At()
1388
1388
  };
1389
1389
  }
1390
1390
  /**
@@ -1413,20 +1413,20 @@ let re = class {
1413
1413
  }
1414
1414
  }
1415
1415
  _request(e, r) {
1416
- typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r = ne(this.defaults, r);
1416
+ typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r = re(this.defaults, r);
1417
1417
  const { transitional: n, paramsSerializer: s, headers: i } = r;
1418
- n !== void 0 && Ae.assertOptions(n, {
1419
- silentJSONParsing: M.transitional(M.boolean),
1420
- forcedJSONParsing: M.transitional(M.boolean),
1421
- clarifyTimeoutError: M.transitional(M.boolean)
1418
+ n !== void 0 && Oe.assertOptions(n, {
1419
+ silentJSONParsing: B.transitional(B.boolean),
1420
+ forcedJSONParsing: B.transitional(B.boolean),
1421
+ clarifyTimeoutError: B.transitional(B.boolean)
1422
1422
  }, !1), s != null && (u.isFunction(s) ? r.paramsSerializer = {
1423
1423
  serialize: s
1424
- } : Ae.assertOptions(s, {
1425
- encode: M.function,
1426
- serialize: M.function
1427
- }, !0)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0), Ae.assertOptions(r, {
1428
- baseUrl: M.spelling("baseURL"),
1429
- withXsrfToken: M.spelling("withXSRFToken")
1424
+ } : Oe.assertOptions(s, {
1425
+ encode: B.function,
1426
+ serialize: B.function
1427
+ }, !0)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0), Oe.assertOptions(r, {
1428
+ baseUrl: B.spelling("baseURL"),
1429
+ withXsrfToken: B.spelling("withXSRFToken")
1430
1430
  }, !0), r.method = (r.method || this.defaults.method || "get").toLowerCase();
1431
1431
  let a = i && u.merge(
1432
1432
  i.common,
@@ -1447,42 +1447,42 @@ let re = class {
1447
1447
  this.interceptors.response.forEach(function(k) {
1448
1448
  c.push(k.fulfilled, k.rejected);
1449
1449
  });
1450
- let l, m = 0, T;
1450
+ let l, m = 0, S;
1451
1451
  if (!d) {
1452
- const g = [Dt.bind(this), void 0];
1453
- for (g.unshift.apply(g, o), g.push.apply(g, c), T = g.length, l = Promise.resolve(r); m < T; )
1452
+ const g = [Lt.bind(this), void 0];
1453
+ for (g.unshift.apply(g, o), g.push.apply(g, c), S = g.length, l = Promise.resolve(r); m < S; )
1454
1454
  l = l.then(g[m++], g[m++]);
1455
1455
  return l;
1456
1456
  }
1457
- T = o.length;
1458
- let S = r;
1459
- for (m = 0; m < T; ) {
1457
+ S = o.length;
1458
+ let T = r;
1459
+ for (m = 0; m < S; ) {
1460
1460
  const g = o[m++], k = o[m++];
1461
1461
  try {
1462
- S = g(S);
1462
+ T = g(T);
1463
1463
  } catch (_) {
1464
1464
  k.call(this, _);
1465
1465
  break;
1466
1466
  }
1467
1467
  }
1468
1468
  try {
1469
- l = Dt.call(this, S);
1469
+ l = Lt.call(this, T);
1470
1470
  } catch (g) {
1471
1471
  return Promise.reject(g);
1472
1472
  }
1473
- for (m = 0, T = c.length; m < T; )
1473
+ for (m = 0, S = c.length; m < S; )
1474
1474
  l = l.then(c[m++], c[m++]);
1475
1475
  return l;
1476
1476
  }
1477
1477
  getUri(e) {
1478
- e = ne(this.defaults, e);
1479
- const r = nr(e.baseURL, e.url, e.allowAbsoluteUrls);
1480
- return Yt(r, e.params, e.paramsSerializer);
1478
+ e = re(this.defaults, e);
1479
+ const r = ir(e.baseURL, e.url, e.allowAbsoluteUrls);
1480
+ return er(r, e.params, e.paramsSerializer);
1481
1481
  }
1482
1482
  };
1483
1483
  u.forEach(["delete", "get", "head", "options"], function(e) {
1484
- re.prototype[e] = function(r, n) {
1485
- return this.request(ne(n || {}, {
1484
+ te.prototype[e] = function(r, n) {
1485
+ return this.request(re(n || {}, {
1486
1486
  method: e,
1487
1487
  url: r,
1488
1488
  data: (n || {}).data
@@ -1492,7 +1492,7 @@ u.forEach(["delete", "get", "head", "options"], function(e) {
1492
1492
  u.forEach(["post", "put", "patch"], function(e) {
1493
1493
  function r(n) {
1494
1494
  return function(i, a, o) {
1495
- return this.request(ne(o || {}, {
1495
+ return this.request(re(o || {}, {
1496
1496
  method: e,
1497
1497
  headers: n ? {
1498
1498
  "Content-Type": "multipart/form-data"
@@ -1502,9 +1502,9 @@ u.forEach(["post", "put", "patch"], function(e) {
1502
1502
  }));
1503
1503
  };
1504
1504
  }
1505
- re.prototype[e] = r(), re.prototype[e + "Form"] = r(!0);
1505
+ te.prototype[e] = r(), te.prototype[e + "Form"] = r(!0);
1506
1506
  });
1507
- let qn = class ur {
1507
+ let Hn = class dr {
1508
1508
  constructor(e) {
1509
1509
  if (typeof e != "function")
1510
1510
  throw new TypeError("executor must be a function.");
@@ -1528,7 +1528,7 @@ let qn = class ur {
1528
1528
  n.unsubscribe(i);
1529
1529
  }, a;
1530
1530
  }, e(function(i, a, o) {
1531
- n.reason || (n.reason = new he(i, a, o), r(n.reason));
1531
+ n.reason || (n.reason = new pe(i, a, o), r(n.reason));
1532
1532
  });
1533
1533
  }
1534
1534
  /**
@@ -1570,22 +1570,22 @@ let qn = class ur {
1570
1570
  static source() {
1571
1571
  let e;
1572
1572
  return {
1573
- token: new ur(function(s) {
1573
+ token: new dr(function(s) {
1574
1574
  e = s;
1575
1575
  }),
1576
1576
  cancel: e
1577
1577
  };
1578
1578
  }
1579
1579
  };
1580
- function Vn(t) {
1580
+ function Wn(t) {
1581
1581
  return function(r) {
1582
1582
  return t.apply(null, r);
1583
1583
  };
1584
1584
  }
1585
- function Hn(t) {
1585
+ function Jn(t) {
1586
1586
  return u.isObject(t) && t.isAxiosError === !0;
1587
1587
  }
1588
- const ot = {
1588
+ const ut = {
1589
1589
  Continue: 100,
1590
1590
  SwitchingProtocols: 101,
1591
1591
  Processing: 102,
@@ -1650,53 +1650,53 @@ const ot = {
1650
1650
  NotExtended: 510,
1651
1651
  NetworkAuthenticationRequired: 511
1652
1652
  };
1653
- Object.entries(ot).forEach(([t, e]) => {
1654
- ot[e] = t;
1653
+ Object.entries(ut).forEach(([t, e]) => {
1654
+ ut[e] = t;
1655
1655
  });
1656
- function lr(t) {
1657
- const e = new re(t), r = $t(re.prototype.request, e);
1658
- return u.extend(r, re.prototype, e, { allOwnKeys: !0 }), u.extend(r, e, null, { allOwnKeys: !0 }), r.create = function(s) {
1659
- return lr(ne(t, s));
1656
+ function fr(t) {
1657
+ const e = new te(t), r = $t(te.prototype.request, e);
1658
+ return u.extend(r, te.prototype, e, { allOwnKeys: !0 }), u.extend(r, e, null, { allOwnKeys: !0 }), r.create = function(s) {
1659
+ return fr(re(t, s));
1660
1660
  }, r;
1661
1661
  }
1662
- const O = lr(Ee);
1663
- O.Axios = re;
1664
- O.CanceledError = he;
1665
- O.CancelToken = qn;
1666
- O.isCancel = tr;
1667
- O.VERSION = cr;
1668
- O.toFormData = Je;
1669
- O.AxiosError = w;
1670
- O.Cancel = O.CanceledError;
1671
- O.all = function(e) {
1662
+ const C = fr(Re);
1663
+ C.Axios = te;
1664
+ C.CanceledError = pe;
1665
+ C.CancelToken = Hn;
1666
+ C.isCancel = nr;
1667
+ C.VERSION = lr;
1668
+ C.toFormData = Xe;
1669
+ C.AxiosError = w;
1670
+ C.Cancel = C.CanceledError;
1671
+ C.all = function(e) {
1672
1672
  return Promise.all(e);
1673
1673
  };
1674
- O.spread = Vn;
1675
- O.isAxiosError = Hn;
1676
- O.mergeConfig = ne;
1677
- O.AxiosHeaders = U;
1678
- O.formToJSON = (t) => er(u.isHTMLForm(t) ? new FormData(t) : t);
1679
- O.getAdapter = or.getAdapter;
1680
- O.HttpStatusCode = ot;
1681
- O.default = O;
1674
+ C.spread = Wn;
1675
+ C.isAxiosError = Jn;
1676
+ C.mergeConfig = re;
1677
+ C.AxiosHeaders = U;
1678
+ C.formToJSON = (t) => rr(u.isHTMLForm(t) ? new FormData(t) : t);
1679
+ C.getAdapter = ur.getAdapter;
1680
+ C.HttpStatusCode = ut;
1681
+ C.default = C;
1682
1682
  const {
1683
- Axios: bs,
1684
- AxiosError: Wn,
1685
- CanceledError: ws,
1686
- isCancel: xs,
1687
- CancelToken: ks,
1688
- VERSION: Es,
1689
- all: Rs,
1690
- Cancel: Ts,
1691
- isAxiosError: Ss,
1692
- spread: As,
1693
- toFormData: Os,
1694
- AxiosHeaders: Cs,
1695
- HttpStatusCode: ct,
1696
- formToJSON: Ns,
1697
- getAdapter: js,
1698
- mergeConfig: Ps
1699
- } = O;
1683
+ Axios: Es,
1684
+ AxiosError: Kn,
1685
+ CanceledError: Rs,
1686
+ isCancel: Ss,
1687
+ CancelToken: Ts,
1688
+ VERSION: As,
1689
+ all: Os,
1690
+ Cancel: Cs,
1691
+ isAxiosError: Ns,
1692
+ spread: js,
1693
+ toFormData: Ps,
1694
+ AxiosHeaders: Is,
1695
+ HttpStatusCode: xt,
1696
+ formToJSON: Ds,
1697
+ getAdapter: Ls,
1698
+ mergeConfig: Us
1699
+ } = C;
1700
1700
  var R;
1701
1701
  (function(t) {
1702
1702
  t.assertEqual = (s) => s;
@@ -1733,14 +1733,14 @@ var R;
1733
1733
  }
1734
1734
  t.joinValues = n, t.jsonStringifyReplacer = (s, i) => typeof i == "bigint" ? i.toString() : i;
1735
1735
  })(R || (R = {}));
1736
- var Lt;
1736
+ var Ft;
1737
1737
  (function(t) {
1738
1738
  t.mergeShapes = (e, r) => ({
1739
1739
  ...e,
1740
1740
  ...r
1741
1741
  // second overwrites first
1742
1742
  });
1743
- })(Lt || (Lt = {}));
1743
+ })(Ft || (Ft = {}));
1744
1744
  const p = R.arrayToEnum([
1745
1745
  "string",
1746
1746
  "nan",
@@ -1762,7 +1762,7 @@ const p = R.arrayToEnum([
1762
1762
  "never",
1763
1763
  "map",
1764
1764
  "set"
1765
- ]), Y = (t) => {
1765
+ ]), G = (t) => {
1766
1766
  switch (typeof t) {
1767
1767
  case "undefined":
1768
1768
  return p.undefined;
@@ -1861,7 +1861,7 @@ class Z extends Error {
1861
1861
  }
1862
1862
  }
1863
1863
  Z.create = (t) => new Z(t);
1864
- const be = (t, e) => {
1864
+ const we = (t, e) => {
1865
1865
  let r;
1866
1866
  switch (t.code) {
1867
1867
  case f.invalid_type:
@@ -1917,11 +1917,11 @@ const be = (t, e) => {
1917
1917
  }
1918
1918
  return { message: r };
1919
1919
  };
1920
- let Jn = be;
1921
- function ut() {
1922
- return Jn;
1920
+ let Xn = we;
1921
+ function lt() {
1922
+ return Xn;
1923
1923
  }
1924
- const lt = (t) => {
1924
+ const dt = (t) => {
1925
1925
  const { data: e, path: r, errorMaps: n, issueData: s } = t, i = [...r, ...s.path || []], a = {
1926
1926
  ...s,
1927
1927
  path: i
@@ -1943,7 +1943,7 @@ const lt = (t) => {
1943
1943
  };
1944
1944
  };
1945
1945
  function h(t, e) {
1946
- const r = ut(), n = lt({
1946
+ const r = lt(), n = dt({
1947
1947
  issueData: e,
1948
1948
  data: t.data,
1949
1949
  path: t.path,
@@ -1954,13 +1954,13 @@ function h(t, e) {
1954
1954
  // then schema-bound map if available
1955
1955
  r,
1956
1956
  // then global override map
1957
- r === be ? void 0 : be
1957
+ r === we ? void 0 : we
1958
1958
  // then global default map
1959
1959
  ].filter((s) => !!s)
1960
1960
  });
1961
1961
  t.common.issues.push(n);
1962
1962
  }
1963
- class D {
1963
+ class I {
1964
1964
  constructor() {
1965
1965
  this.value = "valid";
1966
1966
  }
@@ -1988,7 +1988,7 @@ class D {
1988
1988
  value: a
1989
1989
  });
1990
1990
  }
1991
- return D.mergeObjectSync(e, n);
1991
+ return I.mergeObjectSync(e, n);
1992
1992
  }
1993
1993
  static mergeObjectSync(e, r) {
1994
1994
  const n = {};
@@ -2003,12 +2003,12 @@ class D {
2003
2003
  }
2004
2004
  const b = Object.freeze({
2005
2005
  status: "aborted"
2006
- }), me = (t) => ({ status: "dirty", value: t }), F = (t) => ({ status: "valid", value: t }), Ut = (t) => t.status === "aborted", Ft = (t) => t.status === "dirty", ce = (t) => t.status === "valid", Ne = (t) => typeof Promise < "u" && t instanceof Promise;
2007
- function je(t, e, r, n) {
2006
+ }), ye = (t) => ({ status: "dirty", value: t }), F = (t) => ({ status: "valid", value: t }), Zt = (t) => t.status === "aborted", Mt = (t) => t.status === "dirty", ue = (t) => t.status === "valid", je = (t) => typeof Promise < "u" && t instanceof Promise;
2007
+ function Pe(t, e, r, n) {
2008
2008
  if (typeof e == "function" ? t !== e || !0 : !e.has(t)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
2009
2009
  return e.get(t);
2010
2010
  }
2011
- function dr(t, e, r, n, s) {
2011
+ function hr(t, e, r, n, s) {
2012
2012
  if (typeof e == "function" ? t !== e || !0 : !e.has(t)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
2013
2013
  return e.set(t, r), r;
2014
2014
  }
@@ -2016,8 +2016,8 @@ var y;
2016
2016
  (function(t) {
2017
2017
  t.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, t.toString = (e) => typeof e == "string" ? e : e?.message;
2018
2018
  })(y || (y = {}));
2019
- var ye, ge;
2020
- class q {
2019
+ var ge, _e;
2020
+ class z {
2021
2021
  constructor(e, r, n, s) {
2022
2022
  this._cachedPath = [], this.parent = e, this.data = r, this._path = n, this._key = s;
2023
2023
  }
@@ -2025,8 +2025,8 @@ class q {
2025
2025
  return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
2026
2026
  }
2027
2027
  }
2028
- const Zt = (t, e) => {
2029
- if (ce(e))
2028
+ const Bt = (t, e) => {
2029
+ if (ue(e))
2030
2030
  return { success: !0, data: e.value };
2031
2031
  if (!t.common.issues.length)
2032
2032
  throw new Error("Validation failed but no issues detected.");
@@ -2057,13 +2057,13 @@ class E {
2057
2057
  return this._def.description;
2058
2058
  }
2059
2059
  _getType(e) {
2060
- return Y(e.data);
2060
+ return G(e.data);
2061
2061
  }
2062
2062
  _getOrReturnCtx(e, r) {
2063
2063
  return r || {
2064
2064
  common: e.parent.common,
2065
2065
  data: e.data,
2066
- parsedType: Y(e.data),
2066
+ parsedType: G(e.data),
2067
2067
  schemaErrorMap: this._def.errorMap,
2068
2068
  path: e.path,
2069
2069
  parent: e.parent
@@ -2071,11 +2071,11 @@ class E {
2071
2071
  }
2072
2072
  _processInputParams(e) {
2073
2073
  return {
2074
- status: new D(),
2074
+ status: new I(),
2075
2075
  ctx: {
2076
2076
  common: e.parent.common,
2077
2077
  data: e.data,
2078
- parsedType: Y(e.data),
2078
+ parsedType: G(e.data),
2079
2079
  schemaErrorMap: this._def.errorMap,
2080
2080
  path: e.path,
2081
2081
  parent: e.parent
@@ -2084,7 +2084,7 @@ class E {
2084
2084
  }
2085
2085
  _parseSync(e) {
2086
2086
  const r = this._parse(e);
2087
- if (Ne(r))
2087
+ if (je(r))
2088
2088
  throw new Error("Synchronous parse encountered promise.");
2089
2089
  return r;
2090
2090
  }
@@ -2110,9 +2110,9 @@ class E {
2110
2110
  schemaErrorMap: this._def.errorMap,
2111
2111
  parent: null,
2112
2112
  data: e,
2113
- parsedType: Y(e)
2113
+ parsedType: G(e)
2114
2114
  }, i = this._parseSync({ data: e, path: s.path, parent: s });
2115
- return Zt(s, i);
2115
+ return Bt(s, i);
2116
2116
  }
2117
2117
  "~validate"(e) {
2118
2118
  var r, n;
@@ -2125,12 +2125,12 @@ class E {
2125
2125
  schemaErrorMap: this._def.errorMap,
2126
2126
  parent: null,
2127
2127
  data: e,
2128
- parsedType: Y(e)
2128
+ parsedType: G(e)
2129
2129
  };
2130
2130
  if (!this["~standard"].async)
2131
2131
  try {
2132
2132
  const i = this._parseSync({ data: e, path: [], parent: s });
2133
- return ce(i) ? {
2133
+ return ue(i) ? {
2134
2134
  value: i.value
2135
2135
  } : {
2136
2136
  issues: s.common.issues
@@ -2141,7 +2141,7 @@ class E {
2141
2141
  async: !0
2142
2142
  };
2143
2143
  }
2144
- return this._parseAsync({ data: e, path: [], parent: s }).then((i) => ce(i) ? {
2144
+ return this._parseAsync({ data: e, path: [], parent: s }).then((i) => ue(i) ? {
2145
2145
  value: i.value
2146
2146
  } : {
2147
2147
  issues: s.common.issues
@@ -2164,9 +2164,9 @@ class E {
2164
2164
  schemaErrorMap: this._def.errorMap,
2165
2165
  parent: null,
2166
2166
  data: e,
2167
- parsedType: Y(e)
2168
- }, s = this._parse({ data: e, path: n.path, parent: n }), i = await (Ne(s) ? s : Promise.resolve(s));
2169
- return Zt(n, i);
2167
+ parsedType: G(e)
2168
+ }, s = this._parse({ data: e, path: n.path, parent: n }), i = await (je(s) ? s : Promise.resolve(s));
2169
+ return Bt(n, i);
2170
2170
  }
2171
2171
  refine(e, r) {
2172
2172
  const n = (s) => typeof r == "string" || typeof r > "u" ? { message: r } : typeof r == "function" ? r(s) : r;
@@ -2182,7 +2182,7 @@ class E {
2182
2182
  return this._refinement((n, s) => e(n) ? !0 : (s.addIssue(typeof r == "function" ? r(n, s) : r), !1));
2183
2183
  }
2184
2184
  _refinement(e) {
2185
- return new X({
2185
+ return new K({
2186
2186
  schema: this,
2187
2187
  typeName: v.ZodEffects,
2188
2188
  effect: { type: "refinement", refinement: e }
@@ -2199,28 +2199,28 @@ class E {
2199
2199
  };
2200
2200
  }
2201
2201
  optional() {
2202
- return J.create(this, this._def);
2202
+ return W.create(this, this._def);
2203
2203
  }
2204
2204
  nullable() {
2205
- return ie.create(this, this._def);
2205
+ return se.create(this, this._def);
2206
2206
  }
2207
2207
  nullish() {
2208
2208
  return this.nullable().optional();
2209
2209
  }
2210
2210
  array() {
2211
- return z.create(this);
2211
+ return $.create(this);
2212
2212
  }
2213
2213
  promise() {
2214
- return xe.create(this, this._def);
2214
+ return ke.create(this, this._def);
2215
2215
  }
2216
2216
  or(e) {
2217
- return Ie.create([this, e], this._def);
2217
+ return Le.create([this, e], this._def);
2218
2218
  }
2219
2219
  and(e) {
2220
- return Le.create(this, e, this._def);
2220
+ return Ue.create(this, e, this._def);
2221
2221
  }
2222
2222
  transform(e) {
2223
- return new X({
2223
+ return new K({
2224
2224
  ...x(this._def),
2225
2225
  schema: this,
2226
2226
  typeName: v.ZodEffects,
@@ -2229,7 +2229,7 @@ class E {
2229
2229
  }
2230
2230
  default(e) {
2231
2231
  const r = typeof e == "function" ? e : () => e;
2232
- return new Me({
2232
+ return new $e({
2233
2233
  ...x(this._def),
2234
2234
  innerType: this,
2235
2235
  defaultValue: r,
@@ -2237,7 +2237,7 @@ class E {
2237
2237
  });
2238
2238
  }
2239
2239
  brand() {
2240
- return new mr({
2240
+ return new gr({
2241
2241
  typeName: v.ZodBranded,
2242
2242
  type: this,
2243
2243
  ...x(this._def)
@@ -2245,7 +2245,7 @@ class E {
2245
2245
  }
2246
2246
  catch(e) {
2247
2247
  const r = typeof e == "function" ? e : () => e;
2248
- return new Be({
2248
+ return new ze({
2249
2249
  ...x(this._def),
2250
2250
  innerType: this,
2251
2251
  catchValue: r,
@@ -2260,10 +2260,10 @@ class E {
2260
2260
  });
2261
2261
  }
2262
2262
  pipe(e) {
2263
- return Ge.create(this, e);
2263
+ return Qe.create(this, e);
2264
2264
  }
2265
2265
  readonly() {
2266
- return ze.create(this);
2266
+ return qe.create(this);
2267
2267
  }
2268
2268
  isOptional() {
2269
2269
  return this.safeParse(void 0).success;
@@ -2272,28 +2272,28 @@ class E {
2272
2272
  return this.safeParse(null).success;
2273
2273
  }
2274
2274
  }
2275
- const Kn = /^c[^\s-]{8,}$/i, Xn = /^[0-9a-z]+$/, Gn = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Yn = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, Qn = /^[a-z0-9_-]{21}$/i, es = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, ts = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, rs = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, ns = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
2276
- let tt;
2277
- const ss = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, is = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, as = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, os = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, cs = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, us = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, fr = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", ls = new RegExp(`^${fr}$`);
2278
- function hr(t) {
2275
+ const Gn = /^c[^\s-]{8,}$/i, Yn = /^[0-9a-z]+$/, Qn = /^[0-9A-HJKMNP-TV-Z]{26}$/i, es = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, ts = /^[a-z0-9_-]{21}$/i, rs = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, ns = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, ss = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, is = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
2276
+ let nt;
2277
+ const as = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, os = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, cs = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, us = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, ls = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, ds = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, pr = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", fs = new RegExp(`^${pr}$`);
2278
+ function mr(t) {
2279
2279
  let e = "[0-5]\\d";
2280
2280
  t.precision ? e = `${e}\\.\\d{${t.precision}}` : t.precision == null && (e = `${e}(\\.\\d+)?`);
2281
2281
  const r = t.precision ? "+" : "?";
2282
2282
  return `([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`;
2283
2283
  }
2284
- function ds(t) {
2285
- return new RegExp(`^${hr(t)}$`);
2284
+ function hs(t) {
2285
+ return new RegExp(`^${mr(t)}$`);
2286
2286
  }
2287
- function fs(t) {
2288
- let e = `${fr}T${hr(t)}`;
2287
+ function ps(t) {
2288
+ let e = `${pr}T${mr(t)}`;
2289
2289
  const r = [];
2290
2290
  return r.push(t.local ? "Z?" : "Z"), t.offset && r.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${r.join("|")})`, new RegExp(`^${e}$`);
2291
2291
  }
2292
- function hs(t, e) {
2293
- return !!((e === "v4" || !e) && ss.test(t) || (e === "v6" || !e) && as.test(t));
2292
+ function ms(t, e) {
2293
+ return !!((e === "v4" || !e) && as.test(t) || (e === "v6" || !e) && cs.test(t));
2294
2294
  }
2295
- function ps(t, e) {
2296
- if (!es.test(t))
2295
+ function ys(t, e) {
2296
+ if (!rs.test(t))
2297
2297
  return !1;
2298
2298
  try {
2299
2299
  const [r] = t.split("."), n = r.replace(/-/g, "+").replace(/_/g, "/").padEnd(r.length + (4 - r.length % 4) % 4, "="), s = JSON.parse(atob(n));
@@ -2302,10 +2302,10 @@ function ps(t, e) {
2302
2302
  return !1;
2303
2303
  }
2304
2304
  }
2305
- function ms(t, e) {
2306
- return !!((e === "v4" || !e) && is.test(t) || (e === "v6" || !e) && os.test(t));
2305
+ function gs(t, e) {
2306
+ return !!((e === "v4" || !e) && os.test(t) || (e === "v6" || !e) && us.test(t));
2307
2307
  }
2308
- class W extends E {
2308
+ class H extends E {
2309
2309
  _parse(e) {
2310
2310
  if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== p.string) {
2311
2311
  const i = this._getOrReturnCtx(e);
@@ -2315,7 +2315,7 @@ class W extends E {
2315
2315
  received: i.parsedType
2316
2316
  }), b;
2317
2317
  }
2318
- const n = new D();
2318
+ const n = new I();
2319
2319
  let s;
2320
2320
  for (const i of this._def.checks)
2321
2321
  if (i.kind === "min")
@@ -2354,43 +2354,43 @@ class W extends E {
2354
2354
  message: i.message
2355
2355
  }), n.dirty());
2356
2356
  } else if (i.kind === "email")
2357
- rs.test(e.data) || (s = this._getOrReturnCtx(e, s), h(s, {
2357
+ ss.test(e.data) || (s = this._getOrReturnCtx(e, s), h(s, {
2358
2358
  validation: "email",
2359
2359
  code: f.invalid_string,
2360
2360
  message: i.message
2361
2361
  }), n.dirty());
2362
2362
  else if (i.kind === "emoji")
2363
- tt || (tt = new RegExp(ns, "u")), tt.test(e.data) || (s = this._getOrReturnCtx(e, s), h(s, {
2363
+ nt || (nt = new RegExp(is, "u")), nt.test(e.data) || (s = this._getOrReturnCtx(e, s), h(s, {
2364
2364
  validation: "emoji",
2365
2365
  code: f.invalid_string,
2366
2366
  message: i.message
2367
2367
  }), n.dirty());
2368
2368
  else if (i.kind === "uuid")
2369
- Yn.test(e.data) || (s = this._getOrReturnCtx(e, s), h(s, {
2369
+ es.test(e.data) || (s = this._getOrReturnCtx(e, s), h(s, {
2370
2370
  validation: "uuid",
2371
2371
  code: f.invalid_string,
2372
2372
  message: i.message
2373
2373
  }), n.dirty());
2374
2374
  else if (i.kind === "nanoid")
2375
- Qn.test(e.data) || (s = this._getOrReturnCtx(e, s), h(s, {
2375
+ ts.test(e.data) || (s = this._getOrReturnCtx(e, s), h(s, {
2376
2376
  validation: "nanoid",
2377
2377
  code: f.invalid_string,
2378
2378
  message: i.message
2379
2379
  }), n.dirty());
2380
2380
  else if (i.kind === "cuid")
2381
- Kn.test(e.data) || (s = this._getOrReturnCtx(e, s), h(s, {
2381
+ Gn.test(e.data) || (s = this._getOrReturnCtx(e, s), h(s, {
2382
2382
  validation: "cuid",
2383
2383
  code: f.invalid_string,
2384
2384
  message: i.message
2385
2385
  }), n.dirty());
2386
2386
  else if (i.kind === "cuid2")
2387
- Xn.test(e.data) || (s = this._getOrReturnCtx(e, s), h(s, {
2387
+ Yn.test(e.data) || (s = this._getOrReturnCtx(e, s), h(s, {
2388
2388
  validation: "cuid2",
2389
2389
  code: f.invalid_string,
2390
2390
  message: i.message
2391
2391
  }), n.dirty());
2392
2392
  else if (i.kind === "ulid")
2393
- Gn.test(e.data) || (s = this._getOrReturnCtx(e, s), h(s, {
2393
+ Qn.test(e.data) || (s = this._getOrReturnCtx(e, s), h(s, {
2394
2394
  validation: "ulid",
2395
2395
  code: f.invalid_string,
2396
2396
  message: i.message
@@ -2421,39 +2421,39 @@ class W extends E {
2421
2421
  code: f.invalid_string,
2422
2422
  validation: { endsWith: i.value },
2423
2423
  message: i.message
2424
- }), n.dirty()) : i.kind === "datetime" ? fs(i).test(e.data) || (s = this._getOrReturnCtx(e, s), h(s, {
2424
+ }), n.dirty()) : i.kind === "datetime" ? ps(i).test(e.data) || (s = this._getOrReturnCtx(e, s), h(s, {
2425
2425
  code: f.invalid_string,
2426
2426
  validation: "datetime",
2427
2427
  message: i.message
2428
- }), n.dirty()) : i.kind === "date" ? ls.test(e.data) || (s = this._getOrReturnCtx(e, s), h(s, {
2428
+ }), n.dirty()) : i.kind === "date" ? fs.test(e.data) || (s = this._getOrReturnCtx(e, s), h(s, {
2429
2429
  code: f.invalid_string,
2430
2430
  validation: "date",
2431
2431
  message: i.message
2432
- }), n.dirty()) : i.kind === "time" ? ds(i).test(e.data) || (s = this._getOrReturnCtx(e, s), h(s, {
2432
+ }), n.dirty()) : i.kind === "time" ? hs(i).test(e.data) || (s = this._getOrReturnCtx(e, s), h(s, {
2433
2433
  code: f.invalid_string,
2434
2434
  validation: "time",
2435
2435
  message: i.message
2436
- }), n.dirty()) : i.kind === "duration" ? ts.test(e.data) || (s = this._getOrReturnCtx(e, s), h(s, {
2436
+ }), n.dirty()) : i.kind === "duration" ? ns.test(e.data) || (s = this._getOrReturnCtx(e, s), h(s, {
2437
2437
  validation: "duration",
2438
2438
  code: f.invalid_string,
2439
2439
  message: i.message
2440
- }), n.dirty()) : i.kind === "ip" ? hs(e.data, i.version) || (s = this._getOrReturnCtx(e, s), h(s, {
2440
+ }), n.dirty()) : i.kind === "ip" ? ms(e.data, i.version) || (s = this._getOrReturnCtx(e, s), h(s, {
2441
2441
  validation: "ip",
2442
2442
  code: f.invalid_string,
2443
2443
  message: i.message
2444
- }), n.dirty()) : i.kind === "jwt" ? ps(e.data, i.alg) || (s = this._getOrReturnCtx(e, s), h(s, {
2444
+ }), n.dirty()) : i.kind === "jwt" ? ys(e.data, i.alg) || (s = this._getOrReturnCtx(e, s), h(s, {
2445
2445
  validation: "jwt",
2446
2446
  code: f.invalid_string,
2447
2447
  message: i.message
2448
- }), n.dirty()) : i.kind === "cidr" ? ms(e.data, i.version) || (s = this._getOrReturnCtx(e, s), h(s, {
2448
+ }), n.dirty()) : i.kind === "cidr" ? gs(e.data, i.version) || (s = this._getOrReturnCtx(e, s), h(s, {
2449
2449
  validation: "cidr",
2450
2450
  code: f.invalid_string,
2451
2451
  message: i.message
2452
- }), n.dirty()) : i.kind === "base64" ? cs.test(e.data) || (s = this._getOrReturnCtx(e, s), h(s, {
2452
+ }), n.dirty()) : i.kind === "base64" ? ls.test(e.data) || (s = this._getOrReturnCtx(e, s), h(s, {
2453
2453
  validation: "base64",
2454
2454
  code: f.invalid_string,
2455
2455
  message: i.message
2456
- }), n.dirty()) : i.kind === "base64url" ? us.test(e.data) || (s = this._getOrReturnCtx(e, s), h(s, {
2456
+ }), n.dirty()) : i.kind === "base64url" ? ds.test(e.data) || (s = this._getOrReturnCtx(e, s), h(s, {
2457
2457
  validation: "base64url",
2458
2458
  code: f.invalid_string,
2459
2459
  message: i.message
@@ -2468,7 +2468,7 @@ class W extends E {
2468
2468
  });
2469
2469
  }
2470
2470
  _addCheck(e) {
2471
- return new W({
2471
+ return new H({
2472
2472
  ...this._def,
2473
2473
  checks: [...this._def.checks, e]
2474
2474
  });
@@ -2605,19 +2605,19 @@ class W extends E {
2605
2605
  return this.min(1, y.errToObj(e));
2606
2606
  }
2607
2607
  trim() {
2608
- return new W({
2608
+ return new H({
2609
2609
  ...this._def,
2610
2610
  checks: [...this._def.checks, { kind: "trim" }]
2611
2611
  });
2612
2612
  }
2613
2613
  toLowerCase() {
2614
- return new W({
2614
+ return new H({
2615
2615
  ...this._def,
2616
2616
  checks: [...this._def.checks, { kind: "toLowerCase" }]
2617
2617
  });
2618
2618
  }
2619
2619
  toUpperCase() {
2620
- return new W({
2620
+ return new H({
2621
2621
  ...this._def,
2622
2622
  checks: [...this._def.checks, { kind: "toUpperCase" }]
2623
2623
  });
@@ -2683,20 +2683,20 @@ class W extends E {
2683
2683
  return e;
2684
2684
  }
2685
2685
  }
2686
- W.create = (t) => {
2686
+ H.create = (t) => {
2687
2687
  var e;
2688
- return new W({
2688
+ return new H({
2689
2689
  checks: [],
2690
2690
  typeName: v.ZodString,
2691
2691
  coerce: (e = t?.coerce) !== null && e !== void 0 ? e : !1,
2692
2692
  ...x(t)
2693
2693
  });
2694
2694
  };
2695
- function ys(t, e) {
2695
+ function _s(t, e) {
2696
2696
  const r = (t.toString().split(".")[1] || "").length, n = (e.toString().split(".")[1] || "").length, s = r > n ? r : n, i = parseInt(t.toFixed(s).replace(".", "")), a = parseInt(e.toFixed(s).replace(".", ""));
2697
2697
  return i % a / Math.pow(10, s);
2698
2698
  }
2699
- class ue extends E {
2699
+ class le extends E {
2700
2700
  constructor() {
2701
2701
  super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
2702
2702
  }
@@ -2710,7 +2710,7 @@ class ue extends E {
2710
2710
  }), b;
2711
2711
  }
2712
2712
  let n;
2713
- const s = new D();
2713
+ const s = new I();
2714
2714
  for (const i of this._def.checks)
2715
2715
  i.kind === "int" ? R.isInteger(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
2716
2716
  code: f.invalid_type,
@@ -2731,7 +2731,7 @@ class ue extends E {
2731
2731
  inclusive: i.inclusive,
2732
2732
  exact: !1,
2733
2733
  message: i.message
2734
- }), s.dirty()) : i.kind === "multipleOf" ? ys(e.data, i.value) !== 0 && (n = this._getOrReturnCtx(e, n), h(n, {
2734
+ }), s.dirty()) : i.kind === "multipleOf" ? _s(e.data, i.value) !== 0 && (n = this._getOrReturnCtx(e, n), h(n, {
2735
2735
  code: f.not_multiple_of,
2736
2736
  multipleOf: i.value,
2737
2737
  message: i.message
@@ -2754,7 +2754,7 @@ class ue extends E {
2754
2754
  return this.setLimit("max", e, !1, y.toString(r));
2755
2755
  }
2756
2756
  setLimit(e, r, n, s) {
2757
- return new ue({
2757
+ return new le({
2758
2758
  ...this._def,
2759
2759
  checks: [
2760
2760
  ...this._def.checks,
@@ -2768,7 +2768,7 @@ class ue extends E {
2768
2768
  });
2769
2769
  }
2770
2770
  _addCheck(e) {
2771
- return new ue({
2771
+ return new le({
2772
2772
  ...this._def,
2773
2773
  checks: [...this._def.checks, e]
2774
2774
  });
@@ -2862,13 +2862,13 @@ class ue extends E {
2862
2862
  return Number.isFinite(r) && Number.isFinite(e);
2863
2863
  }
2864
2864
  }
2865
- ue.create = (t) => new ue({
2865
+ le.create = (t) => new le({
2866
2866
  checks: [],
2867
2867
  typeName: v.ZodNumber,
2868
2868
  coerce: t?.coerce || !1,
2869
2869
  ...x(t)
2870
2870
  });
2871
- class le extends E {
2871
+ class de extends E {
2872
2872
  constructor() {
2873
2873
  super(...arguments), this.min = this.gte, this.max = this.lte;
2874
2874
  }
@@ -2882,7 +2882,7 @@ class le extends E {
2882
2882
  if (this._getType(e) !== p.bigint)
2883
2883
  return this._getInvalidInput(e);
2884
2884
  let n;
2885
- const s = new D();
2885
+ const s = new I();
2886
2886
  for (const i of this._def.checks)
2887
2887
  i.kind === "min" ? (i.inclusive ? e.data < i.value : e.data <= i.value) && (n = this._getOrReturnCtx(e, n), h(n, {
2888
2888
  code: f.too_small,
@@ -2924,7 +2924,7 @@ class le extends E {
2924
2924
  return this.setLimit("max", e, !1, y.toString(r));
2925
2925
  }
2926
2926
  setLimit(e, r, n, s) {
2927
- return new le({
2927
+ return new de({
2928
2928
  ...this._def,
2929
2929
  checks: [
2930
2930
  ...this._def.checks,
@@ -2938,7 +2938,7 @@ class le extends E {
2938
2938
  });
2939
2939
  }
2940
2940
  _addCheck(e) {
2941
- return new le({
2941
+ return new de({
2942
2942
  ...this._def,
2943
2943
  checks: [...this._def.checks, e]
2944
2944
  });
@@ -2995,16 +2995,16 @@ class le extends E {
2995
2995
  return e;
2996
2996
  }
2997
2997
  }
2998
- le.create = (t) => {
2998
+ de.create = (t) => {
2999
2999
  var e;
3000
- return new le({
3000
+ return new de({
3001
3001
  checks: [],
3002
3002
  typeName: v.ZodBigInt,
3003
3003
  coerce: (e = t?.coerce) !== null && e !== void 0 ? e : !1,
3004
3004
  ...x(t)
3005
3005
  });
3006
3006
  };
3007
- class dt extends E {
3007
+ class ft extends E {
3008
3008
  _parse(e) {
3009
3009
  if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== p.boolean) {
3010
3010
  const n = this._getOrReturnCtx(e);
@@ -3017,12 +3017,12 @@ class dt extends E {
3017
3017
  return F(e.data);
3018
3018
  }
3019
3019
  }
3020
- dt.create = (t) => new dt({
3020
+ ft.create = (t) => new ft({
3021
3021
  typeName: v.ZodBoolean,
3022
3022
  coerce: t?.coerce || !1,
3023
3023
  ...x(t)
3024
3024
  });
3025
- class we extends E {
3025
+ class xe extends E {
3026
3026
  _parse(e) {
3027
3027
  if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== p.date) {
3028
3028
  const i = this._getOrReturnCtx(e);
@@ -3038,7 +3038,7 @@ class we extends E {
3038
3038
  code: f.invalid_date
3039
3039
  }), b;
3040
3040
  }
3041
- const n = new D();
3041
+ const n = new I();
3042
3042
  let s;
3043
3043
  for (const i of this._def.checks)
3044
3044
  i.kind === "min" ? e.data.getTime() < i.value && (s = this._getOrReturnCtx(e, s), h(s, {
@@ -3062,7 +3062,7 @@ class we extends E {
3062
3062
  };
3063
3063
  }
3064
3064
  _addCheck(e) {
3065
- return new we({
3065
+ return new xe({
3066
3066
  ...this._def,
3067
3067
  checks: [...this._def.checks, e]
3068
3068
  });
@@ -3094,13 +3094,13 @@ class we extends E {
3094
3094
  return e != null ? new Date(e) : null;
3095
3095
  }
3096
3096
  }
3097
- we.create = (t) => new we({
3097
+ xe.create = (t) => new xe({
3098
3098
  checks: [],
3099
3099
  coerce: t?.coerce || !1,
3100
3100
  typeName: v.ZodDate,
3101
3101
  ...x(t)
3102
3102
  });
3103
- class ft extends E {
3103
+ class ht extends E {
3104
3104
  _parse(e) {
3105
3105
  if (this._getType(e) !== p.symbol) {
3106
3106
  const n = this._getOrReturnCtx(e);
@@ -3113,11 +3113,11 @@ class ft extends E {
3113
3113
  return F(e.data);
3114
3114
  }
3115
3115
  }
3116
- ft.create = (t) => new ft({
3116
+ ht.create = (t) => new ht({
3117
3117
  typeName: v.ZodSymbol,
3118
3118
  ...x(t)
3119
3119
  });
3120
- class Pe extends E {
3120
+ class Ie extends E {
3121
3121
  _parse(e) {
3122
3122
  if (this._getType(e) !== p.undefined) {
3123
3123
  const n = this._getOrReturnCtx(e);
@@ -3130,7 +3130,7 @@ class Pe extends E {
3130
3130
  return F(e.data);
3131
3131
  }
3132
3132
  }
3133
- Pe.create = (t) => new Pe({
3133
+ Ie.create = (t) => new Ie({
3134
3134
  typeName: v.ZodUndefined,
3135
3135
  ...x(t)
3136
3136
  });
@@ -3151,7 +3151,7 @@ De.create = (t) => new De({
3151
3151
  typeName: v.ZodNull,
3152
3152
  ...x(t)
3153
3153
  });
3154
- class ht extends E {
3154
+ class pt extends E {
3155
3155
  constructor() {
3156
3156
  super(...arguments), this._any = !0;
3157
3157
  }
@@ -3159,11 +3159,11 @@ class ht extends E {
3159
3159
  return F(e.data);
3160
3160
  }
3161
3161
  }
3162
- ht.create = (t) => new ht({
3162
+ pt.create = (t) => new pt({
3163
3163
  typeName: v.ZodAny,
3164
3164
  ...x(t)
3165
3165
  });
3166
- class oe extends E {
3166
+ class ce extends E {
3167
3167
  constructor() {
3168
3168
  super(...arguments), this._unknown = !0;
3169
3169
  }
@@ -3171,11 +3171,11 @@ class oe extends E {
3171
3171
  return F(e.data);
3172
3172
  }
3173
3173
  }
3174
- oe.create = (t) => new oe({
3174
+ ce.create = (t) => new ce({
3175
3175
  typeName: v.ZodUnknown,
3176
3176
  ...x(t)
3177
3177
  });
3178
- class Q extends E {
3178
+ class Y extends E {
3179
3179
  _parse(e) {
3180
3180
  const r = this._getOrReturnCtx(e);
3181
3181
  return h(r, {
@@ -3185,11 +3185,11 @@ class Q extends E {
3185
3185
  }), b;
3186
3186
  }
3187
3187
  }
3188
- Q.create = (t) => new Q({
3188
+ Y.create = (t) => new Y({
3189
3189
  typeName: v.ZodNever,
3190
3190
  ...x(t)
3191
3191
  });
3192
- class pt extends E {
3192
+ class mt extends E {
3193
3193
  _parse(e) {
3194
3194
  if (this._getType(e) !== p.undefined) {
3195
3195
  const n = this._getOrReturnCtx(e);
@@ -3202,11 +3202,11 @@ class pt extends E {
3202
3202
  return F(e.data);
3203
3203
  }
3204
3204
  }
3205
- pt.create = (t) => new pt({
3205
+ mt.create = (t) => new mt({
3206
3206
  typeName: v.ZodVoid,
3207
3207
  ...x(t)
3208
3208
  });
3209
- class z extends E {
3209
+ class $ extends E {
3210
3210
  _parse(e) {
3211
3211
  const { ctx: r, status: n } = this._processInputParams(e), s = this._def;
3212
3212
  if (r.parsedType !== p.array)
@@ -3242,27 +3242,27 @@ class z extends E {
3242
3242
  exact: !1,
3243
3243
  message: s.maxLength.message
3244
3244
  }), n.dirty()), r.common.async)
3245
- return Promise.all([...r.data].map((a, o) => s.type._parseAsync(new q(r, a, r.path, o)))).then((a) => D.mergeArray(n, a));
3246
- const i = [...r.data].map((a, o) => s.type._parseSync(new q(r, a, r.path, o)));
3247
- return D.mergeArray(n, i);
3245
+ return Promise.all([...r.data].map((a, o) => s.type._parseAsync(new z(r, a, r.path, o)))).then((a) => I.mergeArray(n, a));
3246
+ const i = [...r.data].map((a, o) => s.type._parseSync(new z(r, a, r.path, o)));
3247
+ return I.mergeArray(n, i);
3248
3248
  }
3249
3249
  get element() {
3250
3250
  return this._def.type;
3251
3251
  }
3252
3252
  min(e, r) {
3253
- return new z({
3253
+ return new $({
3254
3254
  ...this._def,
3255
3255
  minLength: { value: e, message: y.toString(r) }
3256
3256
  });
3257
3257
  }
3258
3258
  max(e, r) {
3259
- return new z({
3259
+ return new $({
3260
3260
  ...this._def,
3261
3261
  maxLength: { value: e, message: y.toString(r) }
3262
3262
  });
3263
3263
  }
3264
3264
  length(e, r) {
3265
- return new z({
3265
+ return new $({
3266
3266
  ...this._def,
3267
3267
  exactLength: { value: e, message: y.toString(r) }
3268
3268
  });
@@ -3271,7 +3271,7 @@ class z extends E {
3271
3271
  return this.min(1, e);
3272
3272
  }
3273
3273
  }
3274
- z.create = (t, e) => new z({
3274
+ $.create = (t, e) => new $({
3275
3275
  type: t,
3276
3276
  minLength: null,
3277
3277
  maxLength: null,
@@ -3284,16 +3284,16 @@ function ae(t) {
3284
3284
  const e = {};
3285
3285
  for (const r in t.shape) {
3286
3286
  const n = t.shape[r];
3287
- e[r] = J.create(ae(n));
3287
+ e[r] = W.create(ae(n));
3288
3288
  }
3289
3289
  return new A({
3290
3290
  ...t._def,
3291
3291
  shape: () => e
3292
3292
  });
3293
- } else return t instanceof z ? new z({
3293
+ } else return t instanceof $ ? new $({
3294
3294
  ...t._def,
3295
3295
  type: ae(t.element)
3296
- }) : t instanceof J ? J.create(ae(t.unwrap())) : t instanceof ie ? ie.create(ae(t.unwrap())) : t instanceof K ? K.create(t.items.map((e) => ae(e))) : t;
3296
+ }) : t instanceof W ? W.create(ae(t.unwrap())) : t instanceof se ? se.create(ae(t.unwrap())) : t instanceof J ? J.create(t.items.map((e) => ae(e))) : t;
3297
3297
  }
3298
3298
  class A extends E {
3299
3299
  constructor() {
@@ -3315,7 +3315,7 @@ class A extends E {
3315
3315
  }), b;
3316
3316
  }
3317
3317
  const { status: n, ctx: s } = this._processInputParams(e), { shape: i, keys: a } = this._getCached(), o = [];
3318
- if (!(this._def.catchall instanceof Q && this._def.unknownKeys === "strip"))
3318
+ if (!(this._def.catchall instanceof Y && this._def.unknownKeys === "strip"))
3319
3319
  for (const c in s.data)
3320
3320
  a.includes(c) || o.push(c);
3321
3321
  const d = [];
@@ -3323,11 +3323,11 @@ class A extends E {
3323
3323
  const l = i[c], m = s.data[c];
3324
3324
  d.push({
3325
3325
  key: { status: "valid", value: c },
3326
- value: l._parse(new q(s, m, s.path, c)),
3326
+ value: l._parse(new z(s, m, s.path, c)),
3327
3327
  alwaysSet: c in s.data
3328
3328
  });
3329
3329
  }
3330
- if (this._def.catchall instanceof Q) {
3330
+ if (this._def.catchall instanceof Y) {
3331
3331
  const c = this._def.unknownKeys;
3332
3332
  if (c === "passthrough")
3333
3333
  for (const l of o)
@@ -3348,7 +3348,7 @@ class A extends E {
3348
3348
  d.push({
3349
3349
  key: { status: "valid", value: l },
3350
3350
  value: c._parse(
3351
- new q(s, m, s.path, l)
3351
+ new z(s, m, s.path, l)
3352
3352
  //, ctx.child(key), value, getParsedType(value)
3353
3353
  ),
3354
3354
  alwaysSet: l in s.data
@@ -3358,15 +3358,15 @@ class A extends E {
3358
3358
  return s.common.async ? Promise.resolve().then(async () => {
3359
3359
  const c = [];
3360
3360
  for (const l of d) {
3361
- const m = await l.key, T = await l.value;
3361
+ const m = await l.key, S = await l.value;
3362
3362
  c.push({
3363
3363
  key: m,
3364
- value: T,
3364
+ value: S,
3365
3365
  alwaysSet: l.alwaysSet
3366
3366
  });
3367
3367
  }
3368
3368
  return c;
3369
- }).then((c) => D.mergeObjectSync(n, c)) : D.mergeObjectSync(n, d);
3369
+ }).then((c) => I.mergeObjectSync(n, c)) : I.mergeObjectSync(n, d);
3370
3370
  }
3371
3371
  get shape() {
3372
3372
  return this._def.shape();
@@ -3548,7 +3548,7 @@ class A extends E {
3548
3548
  r[n] = this.shape[n];
3549
3549
  else {
3550
3550
  let i = this.shape[n];
3551
- for (; i instanceof J; )
3551
+ for (; i instanceof W; )
3552
3552
  i = i._def.innerType;
3553
3553
  r[n] = i;
3554
3554
  }
@@ -3558,31 +3558,31 @@ class A extends E {
3558
3558
  });
3559
3559
  }
3560
3560
  keyof() {
3561
- return pr(R.objectKeys(this.shape));
3561
+ return yr(R.objectKeys(this.shape));
3562
3562
  }
3563
3563
  }
3564
3564
  A.create = (t, e) => new A({
3565
3565
  shape: () => t,
3566
3566
  unknownKeys: "strip",
3567
- catchall: Q.create(),
3567
+ catchall: Y.create(),
3568
3568
  typeName: v.ZodObject,
3569
3569
  ...x(e)
3570
3570
  });
3571
3571
  A.strictCreate = (t, e) => new A({
3572
3572
  shape: () => t,
3573
3573
  unknownKeys: "strict",
3574
- catchall: Q.create(),
3574
+ catchall: Y.create(),
3575
3575
  typeName: v.ZodObject,
3576
3576
  ...x(e)
3577
3577
  });
3578
3578
  A.lazycreate = (t, e) => new A({
3579
3579
  shape: t,
3580
3580
  unknownKeys: "strip",
3581
- catchall: Q.create(),
3581
+ catchall: Y.create(),
3582
3582
  typeName: v.ZodObject,
3583
3583
  ...x(e)
3584
3584
  });
3585
- class Ie extends E {
3585
+ class Le extends E {
3586
3586
  _parse(e) {
3587
3587
  const { ctx: r } = this._processInputParams(e), n = this._def.options;
3588
3588
  function s(i) {
@@ -3650,13 +3650,13 @@ class Ie extends E {
3650
3650
  return this._def.options;
3651
3651
  }
3652
3652
  }
3653
- Ie.create = (t, e) => new Ie({
3653
+ Le.create = (t, e) => new Le({
3654
3654
  options: t,
3655
3655
  typeName: v.ZodUnion,
3656
3656
  ...x(e)
3657
3657
  });
3658
- const H = (t) => t instanceof Fe ? H(t.schema) : t instanceof X ? H(t.innerType()) : t instanceof Ze ? [t.value] : t instanceof se ? t.options : t instanceof $e ? R.objectValues(t.enum) : t instanceof Me ? H(t._def.innerType) : t instanceof Pe ? [void 0] : t instanceof De ? [null] : t instanceof J ? [void 0, ...H(t.unwrap())] : t instanceof ie ? [null, ...H(t.unwrap())] : t instanceof mr || t instanceof ze ? H(t.unwrap()) : t instanceof Be ? H(t._def.innerType) : [];
3659
- class wt extends E {
3658
+ const V = (t) => t instanceof Ze ? V(t.schema) : t instanceof K ? V(t.innerType()) : t instanceof Me ? [t.value] : t instanceof ne ? t.options : t instanceof Be ? R.objectValues(t.enum) : t instanceof $e ? V(t._def.innerType) : t instanceof Ie ? [void 0] : t instanceof De ? [null] : t instanceof W ? [void 0, ...V(t.unwrap())] : t instanceof se ? [null, ...V(t.unwrap())] : t instanceof gr || t instanceof qe ? V(t.unwrap()) : t instanceof ze ? V(t._def.innerType) : [];
3659
+ class kt extends E {
3660
3660
  _parse(e) {
3661
3661
  const { ctx: r } = this._processInputParams(e);
3662
3662
  if (r.parsedType !== p.object)
@@ -3700,7 +3700,7 @@ class wt extends E {
3700
3700
  static create(e, r, n) {
3701
3701
  const s = /* @__PURE__ */ new Map();
3702
3702
  for (const i of r) {
3703
- const a = H(i.shape[e]);
3703
+ const a = V(i.shape[e]);
3704
3704
  if (!a.length)
3705
3705
  throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);
3706
3706
  for (const o of a) {
@@ -3709,7 +3709,7 @@ class wt extends E {
3709
3709
  s.set(o, i);
3710
3710
  }
3711
3711
  }
3712
- return new wt({
3712
+ return new kt({
3713
3713
  typeName: v.ZodDiscriminatedUnion,
3714
3714
  discriminator: e,
3715
3715
  options: r,
@@ -3718,14 +3718,14 @@ class wt extends E {
3718
3718
  });
3719
3719
  }
3720
3720
  }
3721
- function mt(t, e) {
3722
- const r = Y(t), n = Y(e);
3721
+ function yt(t, e) {
3722
+ const r = G(t), n = G(e);
3723
3723
  if (t === e)
3724
3724
  return { valid: !0, data: t };
3725
3725
  if (r === p.object && n === p.object) {
3726
3726
  const s = R.objectKeys(e), i = R.objectKeys(t).filter((o) => s.indexOf(o) !== -1), a = { ...t, ...e };
3727
3727
  for (const o of i) {
3728
- const d = mt(t[o], e[o]);
3728
+ const d = yt(t[o], e[o]);
3729
3729
  if (!d.valid)
3730
3730
  return { valid: !1 };
3731
3731
  a[o] = d.data;
@@ -3736,7 +3736,7 @@ function mt(t, e) {
3736
3736
  return { valid: !1 };
3737
3737
  const s = [];
3738
3738
  for (let i = 0; i < t.length; i++) {
3739
- const a = t[i], o = e[i], d = mt(a, o);
3739
+ const a = t[i], o = e[i], d = yt(a, o);
3740
3740
  if (!d.valid)
3741
3741
  return { valid: !1 };
3742
3742
  s.push(d.data);
@@ -3744,13 +3744,13 @@ function mt(t, e) {
3744
3744
  return { valid: !0, data: s };
3745
3745
  } else return r === p.date && n === p.date && +t == +e ? { valid: !0, data: t } : { valid: !1 };
3746
3746
  }
3747
- class Le extends E {
3747
+ class Ue extends E {
3748
3748
  _parse(e) {
3749
3749
  const { status: r, ctx: n } = this._processInputParams(e), s = (i, a) => {
3750
- if (Ut(i) || Ut(a))
3750
+ if (Zt(i) || Zt(a))
3751
3751
  return b;
3752
- const o = mt(i.value, a.value);
3753
- return o.valid ? ((Ft(i) || Ft(a)) && r.dirty(), { status: r.value, value: o.data }) : (h(n, {
3752
+ const o = yt(i.value, a.value);
3753
+ return o.valid ? ((Mt(i) || Mt(a)) && r.dirty(), { status: r.value, value: o.data }) : (h(n, {
3754
3754
  code: f.invalid_intersection_types
3755
3755
  }), b);
3756
3756
  };
@@ -3776,13 +3776,13 @@ class Le extends E {
3776
3776
  }));
3777
3777
  }
3778
3778
  }
3779
- Le.create = (t, e, r) => new Le({
3779
+ Ue.create = (t, e, r) => new Ue({
3780
3780
  left: t,
3781
3781
  right: e,
3782
3782
  typeName: v.ZodIntersection,
3783
3783
  ...x(r)
3784
3784
  });
3785
- class K extends E {
3785
+ class J extends E {
3786
3786
  _parse(e) {
3787
3787
  const { status: r, ctx: n } = this._processInputParams(e);
3788
3788
  if (n.parsedType !== p.array)
@@ -3808,31 +3808,31 @@ class K extends E {
3808
3808
  }), r.dirty());
3809
3809
  const i = [...n.data].map((a, o) => {
3810
3810
  const d = this._def.items[o] || this._def.rest;
3811
- return d ? d._parse(new q(n, a, n.path, o)) : null;
3811
+ return d ? d._parse(new z(n, a, n.path, o)) : null;
3812
3812
  }).filter((a) => !!a);
3813
- return n.common.async ? Promise.all(i).then((a) => D.mergeArray(r, a)) : D.mergeArray(r, i);
3813
+ return n.common.async ? Promise.all(i).then((a) => I.mergeArray(r, a)) : I.mergeArray(r, i);
3814
3814
  }
3815
3815
  get items() {
3816
3816
  return this._def.items;
3817
3817
  }
3818
3818
  rest(e) {
3819
- return new K({
3819
+ return new J({
3820
3820
  ...this._def,
3821
3821
  rest: e
3822
3822
  });
3823
3823
  }
3824
3824
  }
3825
- K.create = (t, e) => {
3825
+ J.create = (t, e) => {
3826
3826
  if (!Array.isArray(t))
3827
3827
  throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
3828
- return new K({
3828
+ return new J({
3829
3829
  items: t,
3830
3830
  typeName: v.ZodTuple,
3831
3831
  rest: null,
3832
3832
  ...x(e)
3833
3833
  });
3834
3834
  };
3835
- class Ue extends E {
3835
+ class Fe extends E {
3836
3836
  get keySchema() {
3837
3837
  return this._def.keyType;
3838
3838
  }
@@ -3850,30 +3850,30 @@ class Ue extends E {
3850
3850
  const s = [], i = this._def.keyType, a = this._def.valueType;
3851
3851
  for (const o in n.data)
3852
3852
  s.push({
3853
- key: i._parse(new q(n, o, n.path, o)),
3854
- value: a._parse(new q(n, n.data[o], n.path, o)),
3853
+ key: i._parse(new z(n, o, n.path, o)),
3854
+ value: a._parse(new z(n, n.data[o], n.path, o)),
3855
3855
  alwaysSet: o in n.data
3856
3856
  });
3857
- return n.common.async ? D.mergeObjectAsync(r, s) : D.mergeObjectSync(r, s);
3857
+ return n.common.async ? I.mergeObjectAsync(r, s) : I.mergeObjectSync(r, s);
3858
3858
  }
3859
3859
  get element() {
3860
3860
  return this._def.valueType;
3861
3861
  }
3862
3862
  static create(e, r, n) {
3863
- return r instanceof E ? new Ue({
3863
+ return r instanceof E ? new Fe({
3864
3864
  keyType: e,
3865
3865
  valueType: r,
3866
3866
  typeName: v.ZodRecord,
3867
3867
  ...x(n)
3868
- }) : new Ue({
3869
- keyType: W.create(),
3868
+ }) : new Fe({
3869
+ keyType: H.create(),
3870
3870
  valueType: e,
3871
3871
  typeName: v.ZodRecord,
3872
3872
  ...x(r)
3873
3873
  });
3874
3874
  }
3875
3875
  }
3876
- class yt extends E {
3876
+ class gt extends E {
3877
3877
  get keySchema() {
3878
3878
  return this._def.keyType;
3879
3879
  }
@@ -3889,8 +3889,8 @@ class yt extends E {
3889
3889
  received: n.parsedType
3890
3890
  }), b;
3891
3891
  const s = this._def.keyType, i = this._def.valueType, a = [...n.data.entries()].map(([o, d], c) => ({
3892
- key: s._parse(new q(n, o, n.path, [c, "key"])),
3893
- value: i._parse(new q(n, d, n.path, [c, "value"]))
3892
+ key: s._parse(new z(n, o, n.path, [c, "key"])),
3893
+ value: i._parse(new z(n, d, n.path, [c, "value"]))
3894
3894
  }));
3895
3895
  if (n.common.async) {
3896
3896
  const o = /* @__PURE__ */ new Map();
@@ -3915,13 +3915,13 @@ class yt extends E {
3915
3915
  }
3916
3916
  }
3917
3917
  }
3918
- yt.create = (t, e, r) => new yt({
3918
+ gt.create = (t, e, r) => new gt({
3919
3919
  valueType: e,
3920
3920
  keyType: t,
3921
3921
  typeName: v.ZodMap,
3922
3922
  ...x(r)
3923
3923
  });
3924
- class de extends E {
3924
+ class fe extends E {
3925
3925
  _parse(e) {
3926
3926
  const { status: r, ctx: n } = this._processInputParams(e);
3927
3927
  if (n.parsedType !== p.set)
@@ -3956,17 +3956,17 @@ class de extends E {
3956
3956
  }
3957
3957
  return { status: r.value, value: c };
3958
3958
  }
3959
- const o = [...n.data.values()].map((d, c) => i._parse(new q(n, d, n.path, c)));
3959
+ const o = [...n.data.values()].map((d, c) => i._parse(new z(n, d, n.path, c)));
3960
3960
  return n.common.async ? Promise.all(o).then((d) => a(d)) : a(o);
3961
3961
  }
3962
3962
  min(e, r) {
3963
- return new de({
3963
+ return new fe({
3964
3964
  ...this._def,
3965
3965
  minSize: { value: e, message: y.toString(r) }
3966
3966
  });
3967
3967
  }
3968
3968
  max(e, r) {
3969
- return new de({
3969
+ return new fe({
3970
3970
  ...this._def,
3971
3971
  maxSize: { value: e, message: y.toString(r) }
3972
3972
  });
@@ -3978,14 +3978,14 @@ class de extends E {
3978
3978
  return this.min(1, e);
3979
3979
  }
3980
3980
  }
3981
- de.create = (t, e) => new de({
3981
+ fe.create = (t, e) => new fe({
3982
3982
  valueType: t,
3983
3983
  minSize: null,
3984
3984
  maxSize: null,
3985
3985
  typeName: v.ZodSet,
3986
3986
  ...x(e)
3987
3987
  });
3988
- class _e extends E {
3988
+ class ve extends E {
3989
3989
  constructor() {
3990
3990
  super(...arguments), this.validate = this.implement;
3991
3991
  }
@@ -3998,14 +3998,14 @@ class _e extends E {
3998
3998
  received: r.parsedType
3999
3999
  }), b;
4000
4000
  function n(o, d) {
4001
- return lt({
4001
+ return dt({
4002
4002
  data: o,
4003
4003
  path: r.path,
4004
4004
  errorMaps: [
4005
4005
  r.common.contextualErrorMap,
4006
4006
  r.schemaErrorMap,
4007
- ut(),
4008
- be
4007
+ lt(),
4008
+ we
4009
4009
  ].filter((c) => !!c),
4010
4010
  issueData: {
4011
4011
  code: f.invalid_arguments,
@@ -4014,14 +4014,14 @@ class _e extends E {
4014
4014
  });
4015
4015
  }
4016
4016
  function s(o, d) {
4017
- return lt({
4017
+ return dt({
4018
4018
  data: o,
4019
4019
  path: r.path,
4020
4020
  errorMaps: [
4021
4021
  r.common.contextualErrorMap,
4022
4022
  r.schemaErrorMap,
4023
- ut(),
4024
- be
4023
+ lt(),
4024
+ we
4025
4025
  ].filter((c) => !!c),
4026
4026
  issueData: {
4027
4027
  code: f.invalid_return_type,
@@ -4030,14 +4030,14 @@ class _e extends E {
4030
4030
  });
4031
4031
  }
4032
4032
  const i = { errorMap: r.common.contextualErrorMap }, a = r.data;
4033
- if (this._def.returns instanceof xe) {
4033
+ if (this._def.returns instanceof ke) {
4034
4034
  const o = this;
4035
4035
  return F(async function(...d) {
4036
- const c = new Z([]), l = await o._def.args.parseAsync(d, i).catch((S) => {
4037
- throw c.addIssue(n(d, S)), c;
4036
+ const c = new Z([]), l = await o._def.args.parseAsync(d, i).catch((T) => {
4037
+ throw c.addIssue(n(d, T)), c;
4038
4038
  }), m = await Reflect.apply(a, this, l);
4039
- return await o._def.returns._def.type.parseAsync(m, i).catch((S) => {
4040
- throw c.addIssue(s(m, S)), c;
4039
+ return await o._def.returns._def.type.parseAsync(m, i).catch((T) => {
4040
+ throw c.addIssue(s(m, T)), c;
4041
4041
  });
4042
4042
  });
4043
4043
  } else {
@@ -4060,13 +4060,13 @@ class _e extends E {
4060
4060
  return this._def.returns;
4061
4061
  }
4062
4062
  args(...e) {
4063
- return new _e({
4063
+ return new ve({
4064
4064
  ...this._def,
4065
- args: K.create(e).rest(oe.create())
4065
+ args: J.create(e).rest(ce.create())
4066
4066
  });
4067
4067
  }
4068
4068
  returns(e) {
4069
- return new _e({
4069
+ return new ve({
4070
4070
  ...this._def,
4071
4071
  returns: e
4072
4072
  });
@@ -4078,15 +4078,15 @@ class _e extends E {
4078
4078
  return this.parse(e);
4079
4079
  }
4080
4080
  static create(e, r, n) {
4081
- return new _e({
4082
- args: e || K.create([]).rest(oe.create()),
4083
- returns: r || oe.create(),
4081
+ return new ve({
4082
+ args: e || J.create([]).rest(ce.create()),
4083
+ returns: r || ce.create(),
4084
4084
  typeName: v.ZodFunction,
4085
4085
  ...x(n)
4086
4086
  });
4087
4087
  }
4088
4088
  }
4089
- class Fe extends E {
4089
+ class Ze extends E {
4090
4090
  get schema() {
4091
4091
  return this._def.getter();
4092
4092
  }
@@ -4095,12 +4095,12 @@ class Fe extends E {
4095
4095
  return this._def.getter()._parse({ data: r.data, path: r.path, parent: r });
4096
4096
  }
4097
4097
  }
4098
- Fe.create = (t, e) => new Fe({
4098
+ Ze.create = (t, e) => new Ze({
4099
4099
  getter: t,
4100
4100
  typeName: v.ZodLazy,
4101
4101
  ...x(e)
4102
4102
  });
4103
- class Ze extends E {
4103
+ class Me extends E {
4104
4104
  _parse(e) {
4105
4105
  if (e.data !== this._def.value) {
4106
4106
  const r = this._getOrReturnCtx(e);
@@ -4116,21 +4116,21 @@ class Ze extends E {
4116
4116
  return this._def.value;
4117
4117
  }
4118
4118
  }
4119
- Ze.create = (t, e) => new Ze({
4119
+ Me.create = (t, e) => new Me({
4120
4120
  value: t,
4121
4121
  typeName: v.ZodLiteral,
4122
4122
  ...x(e)
4123
4123
  });
4124
- function pr(t, e) {
4125
- return new se({
4124
+ function yr(t, e) {
4125
+ return new ne({
4126
4126
  values: t,
4127
4127
  typeName: v.ZodEnum,
4128
4128
  ...x(e)
4129
4129
  });
4130
4130
  }
4131
- class se extends E {
4131
+ class ne extends E {
4132
4132
  constructor() {
4133
- super(...arguments), ye.set(this, void 0);
4133
+ super(...arguments), ge.set(this, void 0);
4134
4134
  }
4135
4135
  _parse(e) {
4136
4136
  if (typeof e.data != "string") {
@@ -4141,7 +4141,7 @@ class se extends E {
4141
4141
  code: f.invalid_type
4142
4142
  }), b;
4143
4143
  }
4144
- if (je(this, ye) || dr(this, ye, new Set(this._def.values)), !je(this, ye).has(e.data)) {
4144
+ if (Pe(this, ge) || hr(this, ge, new Set(this._def.values)), !Pe(this, ge).has(e.data)) {
4145
4145
  const r = this._getOrReturnCtx(e), n = this._def.values;
4146
4146
  return h(r, {
4147
4147
  received: r.data,
@@ -4173,23 +4173,23 @@ class se extends E {
4173
4173
  return e;
4174
4174
  }
4175
4175
  extract(e, r = this._def) {
4176
- return se.create(e, {
4176
+ return ne.create(e, {
4177
4177
  ...this._def,
4178
4178
  ...r
4179
4179
  });
4180
4180
  }
4181
4181
  exclude(e, r = this._def) {
4182
- return se.create(this.options.filter((n) => !e.includes(n)), {
4182
+ return ne.create(this.options.filter((n) => !e.includes(n)), {
4183
4183
  ...this._def,
4184
4184
  ...r
4185
4185
  });
4186
4186
  }
4187
4187
  }
4188
- ye = /* @__PURE__ */ new WeakMap();
4189
- se.create = pr;
4190
- class $e extends E {
4188
+ ge = /* @__PURE__ */ new WeakMap();
4189
+ ne.create = yr;
4190
+ class Be extends E {
4191
4191
  constructor() {
4192
- super(...arguments), ge.set(this, void 0);
4192
+ super(...arguments), _e.set(this, void 0);
4193
4193
  }
4194
4194
  _parse(e) {
4195
4195
  const r = R.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e);
@@ -4201,7 +4201,7 @@ class $e extends E {
4201
4201
  code: f.invalid_type
4202
4202
  }), b;
4203
4203
  }
4204
- if (je(this, ge) || dr(this, ge, new Set(R.getValidEnumValues(this._def.values))), !je(this, ge).has(e.data)) {
4204
+ if (Pe(this, _e) || hr(this, _e, new Set(R.getValidEnumValues(this._def.values))), !Pe(this, _e).has(e.data)) {
4205
4205
  const s = R.objectValues(r);
4206
4206
  return h(n, {
4207
4207
  received: n.data,
@@ -4215,13 +4215,13 @@ class $e extends E {
4215
4215
  return this._def.values;
4216
4216
  }
4217
4217
  }
4218
- ge = /* @__PURE__ */ new WeakMap();
4219
- $e.create = (t, e) => new $e({
4218
+ _e = /* @__PURE__ */ new WeakMap();
4219
+ Be.create = (t, e) => new Be({
4220
4220
  values: t,
4221
4221
  typeName: v.ZodNativeEnum,
4222
4222
  ...x(e)
4223
4223
  });
4224
- class xe extends E {
4224
+ class ke extends E {
4225
4225
  unwrap() {
4226
4226
  return this._def.type;
4227
4227
  }
@@ -4240,12 +4240,12 @@ class xe extends E {
4240
4240
  })));
4241
4241
  }
4242
4242
  }
4243
- xe.create = (t, e) => new xe({
4243
+ ke.create = (t, e) => new ke({
4244
4244
  type: t,
4245
4245
  typeName: v.ZodPromise,
4246
4246
  ...x(e)
4247
4247
  });
4248
- class X extends E {
4248
+ class K extends E {
4249
4249
  innerType() {
4250
4250
  return this._def.schema;
4251
4251
  }
@@ -4272,7 +4272,7 @@ class X extends E {
4272
4272
  path: n.path,
4273
4273
  parent: n
4274
4274
  });
4275
- return d.status === "aborted" ? b : d.status === "dirty" || r.value === "dirty" ? me(d.value) : d;
4275
+ return d.status === "aborted" ? b : d.status === "dirty" || r.value === "dirty" ? ye(d.value) : d;
4276
4276
  });
4277
4277
  {
4278
4278
  if (r.value === "aborted")
@@ -4282,7 +4282,7 @@ class X extends E {
4282
4282
  path: n.path,
4283
4283
  parent: n
4284
4284
  });
4285
- return o.status === "aborted" ? b : o.status === "dirty" || r.value === "dirty" ? me(o.value) : o;
4285
+ return o.status === "aborted" ? b : o.status === "dirty" || r.value === "dirty" ? ye(o.value) : o;
4286
4286
  }
4287
4287
  }
4288
4288
  if (s.type === "refinement") {
@@ -4311,30 +4311,30 @@ class X extends E {
4311
4311
  path: n.path,
4312
4312
  parent: n
4313
4313
  });
4314
- if (!ce(a))
4314
+ if (!ue(a))
4315
4315
  return a;
4316
4316
  const o = s.transform(a.value, i);
4317
4317
  if (o instanceof Promise)
4318
4318
  throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
4319
4319
  return { status: r.value, value: o };
4320
4320
  } else
4321
- return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((a) => ce(a) ? Promise.resolve(s.transform(a.value, i)).then((o) => ({ status: r.value, value: o })) : a);
4321
+ return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((a) => ue(a) ? Promise.resolve(s.transform(a.value, i)).then((o) => ({ status: r.value, value: o })) : a);
4322
4322
  R.assertNever(s);
4323
4323
  }
4324
4324
  }
4325
- X.create = (t, e, r) => new X({
4325
+ K.create = (t, e, r) => new K({
4326
4326
  schema: t,
4327
4327
  typeName: v.ZodEffects,
4328
4328
  effect: e,
4329
4329
  ...x(r)
4330
4330
  });
4331
- X.createWithPreprocess = (t, e, r) => new X({
4331
+ K.createWithPreprocess = (t, e, r) => new K({
4332
4332
  schema: e,
4333
4333
  effect: { type: "preprocess", transform: t },
4334
4334
  typeName: v.ZodEffects,
4335
4335
  ...x(r)
4336
4336
  });
4337
- class J extends E {
4337
+ class W extends E {
4338
4338
  _parse(e) {
4339
4339
  return this._getType(e) === p.undefined ? F(void 0) : this._def.innerType._parse(e);
4340
4340
  }
@@ -4342,12 +4342,12 @@ class J extends E {
4342
4342
  return this._def.innerType;
4343
4343
  }
4344
4344
  }
4345
- J.create = (t, e) => new J({
4345
+ W.create = (t, e) => new W({
4346
4346
  innerType: t,
4347
4347
  typeName: v.ZodOptional,
4348
4348
  ...x(e)
4349
4349
  });
4350
- class ie extends E {
4350
+ class se extends E {
4351
4351
  _parse(e) {
4352
4352
  return this._getType(e) === p.null ? F(null) : this._def.innerType._parse(e);
4353
4353
  }
@@ -4355,12 +4355,12 @@ class ie extends E {
4355
4355
  return this._def.innerType;
4356
4356
  }
4357
4357
  }
4358
- ie.create = (t, e) => new ie({
4358
+ se.create = (t, e) => new se({
4359
4359
  innerType: t,
4360
4360
  typeName: v.ZodNullable,
4361
4361
  ...x(e)
4362
4362
  });
4363
- class Me extends E {
4363
+ class $e extends E {
4364
4364
  _parse(e) {
4365
4365
  const { ctx: r } = this._processInputParams(e);
4366
4366
  let n = r.data;
@@ -4374,13 +4374,13 @@ class Me extends E {
4374
4374
  return this._def.innerType;
4375
4375
  }
4376
4376
  }
4377
- Me.create = (t, e) => new Me({
4377
+ $e.create = (t, e) => new $e({
4378
4378
  innerType: t,
4379
4379
  typeName: v.ZodDefault,
4380
4380
  defaultValue: typeof e.default == "function" ? e.default : () => e.default,
4381
4381
  ...x(e)
4382
4382
  });
4383
- class Be extends E {
4383
+ class ze extends E {
4384
4384
  _parse(e) {
4385
4385
  const { ctx: r } = this._processInputParams(e), n = {
4386
4386
  ...r,
@@ -4395,7 +4395,7 @@ class Be extends E {
4395
4395
  ...n
4396
4396
  }
4397
4397
  });
4398
- return Ne(s) ? s.then((i) => ({
4398
+ return je(s) ? s.then((i) => ({
4399
4399
  status: "valid",
4400
4400
  value: i.status === "valid" ? i.value : this._def.catchValue({
4401
4401
  get error() {
@@ -4417,13 +4417,13 @@ class Be extends E {
4417
4417
  return this._def.innerType;
4418
4418
  }
4419
4419
  }
4420
- Be.create = (t, e) => new Be({
4420
+ ze.create = (t, e) => new ze({
4421
4421
  innerType: t,
4422
4422
  typeName: v.ZodCatch,
4423
4423
  catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
4424
4424
  ...x(e)
4425
4425
  });
4426
- class gt extends E {
4426
+ class _t extends E {
4427
4427
  _parse(e) {
4428
4428
  if (this._getType(e) !== p.nan) {
4429
4429
  const n = this._getOrReturnCtx(e);
@@ -4436,11 +4436,11 @@ class gt extends E {
4436
4436
  return { status: "valid", value: e.data };
4437
4437
  }
4438
4438
  }
4439
- gt.create = (t) => new gt({
4439
+ _t.create = (t) => new _t({
4440
4440
  typeName: v.ZodNaN,
4441
4441
  ...x(t)
4442
4442
  });
4443
- class mr extends E {
4443
+ class gr extends E {
4444
4444
  _parse(e) {
4445
4445
  const { ctx: r } = this._processInputParams(e), n = r.data;
4446
4446
  return this._def.type._parse({
@@ -4453,7 +4453,7 @@ class mr extends E {
4453
4453
  return this._def.type;
4454
4454
  }
4455
4455
  }
4456
- class Ge extends E {
4456
+ class Qe extends E {
4457
4457
  _parse(e) {
4458
4458
  const { status: r, ctx: n } = this._processInputParams(e);
4459
4459
  if (n.common.async)
@@ -4463,7 +4463,7 @@ class Ge extends E {
4463
4463
  path: n.path,
4464
4464
  parent: n
4465
4465
  });
4466
- return i.status === "aborted" ? b : i.status === "dirty" ? (r.dirty(), me(i.value)) : this._def.out._parseAsync({
4466
+ return i.status === "aborted" ? b : i.status === "dirty" ? (r.dirty(), ye(i.value)) : this._def.out._parseAsync({
4467
4467
  data: i.value,
4468
4468
  path: n.path,
4469
4469
  parent: n
@@ -4486,23 +4486,23 @@ class Ge extends E {
4486
4486
  }
4487
4487
  }
4488
4488
  static create(e, r) {
4489
- return new Ge({
4489
+ return new Qe({
4490
4490
  in: e,
4491
4491
  out: r,
4492
4492
  typeName: v.ZodPipeline
4493
4493
  });
4494
4494
  }
4495
4495
  }
4496
- class ze extends E {
4496
+ class qe extends E {
4497
4497
  _parse(e) {
4498
- const r = this._def.innerType._parse(e), n = (s) => (ce(s) && (s.value = Object.freeze(s.value)), s);
4499
- return Ne(r) ? r.then((s) => n(s)) : n(r);
4498
+ const r = this._def.innerType._parse(e), n = (s) => (ue(s) && (s.value = Object.freeze(s.value)), s);
4499
+ return je(r) ? r.then((s) => n(s)) : n(r);
4500
4500
  }
4501
4501
  unwrap() {
4502
4502
  return this._def.innerType;
4503
4503
  }
4504
4504
  }
4505
- ze.create = (t, e) => new ze({
4505
+ qe.create = (t, e) => new qe({
4506
4506
  innerType: t,
4507
4507
  typeName: v.ZodReadonly,
4508
4508
  ...x(e)
@@ -4512,45 +4512,51 @@ var v;
4512
4512
  (function(t) {
4513
4513
  t.ZodString = "ZodString", t.ZodNumber = "ZodNumber", t.ZodNaN = "ZodNaN", t.ZodBigInt = "ZodBigInt", t.ZodBoolean = "ZodBoolean", t.ZodDate = "ZodDate", t.ZodSymbol = "ZodSymbol", t.ZodUndefined = "ZodUndefined", t.ZodNull = "ZodNull", t.ZodAny = "ZodAny", t.ZodUnknown = "ZodUnknown", t.ZodNever = "ZodNever", t.ZodVoid = "ZodVoid", t.ZodArray = "ZodArray", t.ZodObject = "ZodObject", t.ZodUnion = "ZodUnion", t.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", t.ZodIntersection = "ZodIntersection", t.ZodTuple = "ZodTuple", t.ZodRecord = "ZodRecord", t.ZodMap = "ZodMap", t.ZodSet = "ZodSet", t.ZodFunction = "ZodFunction", t.ZodLazy = "ZodLazy", t.ZodLiteral = "ZodLiteral", t.ZodEnum = "ZodEnum", t.ZodEffects = "ZodEffects", t.ZodNativeEnum = "ZodNativeEnum", t.ZodOptional = "ZodOptional", t.ZodNullable = "ZodNullable", t.ZodDefault = "ZodDefault", t.ZodCatch = "ZodCatch", t.ZodPromise = "ZodPromise", t.ZodBranded = "ZodBranded", t.ZodPipeline = "ZodPipeline", t.ZodReadonly = "ZodReadonly";
4514
4514
  })(v || (v = {}));
4515
- W.create;
4516
- ue.create;
4517
- gt.create;
4515
+ H.create;
4518
4516
  le.create;
4519
- dt.create;
4520
- we.create;
4517
+ _t.create;
4518
+ de.create;
4521
4519
  ft.create;
4522
- Pe.create;
4523
- De.create;
4520
+ xe.create;
4524
4521
  ht.create;
4525
- oe.create;
4526
- Q.create;
4522
+ Ie.create;
4523
+ De.create;
4527
4524
  pt.create;
4528
- z.create;
4525
+ ce.create;
4526
+ Y.create;
4527
+ mt.create;
4528
+ $.create;
4529
4529
  A.create;
4530
4530
  A.strictCreate;
4531
- Ie.create;
4532
- wt.create;
4533
4531
  Le.create;
4534
- K.create;
4532
+ kt.create;
4535
4533
  Ue.create;
4536
- yt.create;
4537
- de.create;
4538
- _e.create;
4534
+ J.create;
4539
4535
  Fe.create;
4536
+ gt.create;
4537
+ fe.create;
4538
+ ve.create;
4540
4539
  Ze.create;
4540
+ Me.create;
4541
+ ne.create;
4542
+ Be.create;
4543
+ ke.create;
4544
+ K.create;
4545
+ W.create;
4541
4546
  se.create;
4542
- $e.create;
4543
- xe.create;
4544
- X.create;
4545
- J.create;
4546
- ie.create;
4547
- X.createWithPreprocess;
4548
- Ge.create;
4549
- class B extends Error {
4550
- constructor(e, r, n, s) {
4547
+ K.createWithPreprocess;
4548
+ Qe.create;
4549
+ class ie extends Error {
4550
+ constructor(e, r) {
4551
4551
  super(
4552
- s || r?.detail || r?.title || n?.message || "An error occurred"
4553
- ), this.status = e, this.problemDetail = r, this.originalError = n, this.name = "ApiError", Object.setPrototypeOf(this, B.prototype);
4552
+ e.detail || e.title || r?.message || "An API error occurred"
4553
+ ), this.problemDetail = e, this.originalError = r, this.name = "ApiError", Object.setPrototypeOf(this, ie.prototype);
4554
+ }
4555
+ get status() {
4556
+ return this.problemDetail.status;
4557
+ }
4558
+ get body() {
4559
+ return this.problemDetail;
4554
4560
  }
4555
4561
  get isClientError() {
4556
4562
  return this.status >= 400 && this.status < 500;
@@ -4568,80 +4574,114 @@ class B extends Error {
4568
4574
  return this.status === 404;
4569
4575
  }
4570
4576
  static builder() {
4571
- return new gs();
4577
+ return new Ve(null);
4572
4578
  }
4573
4579
  static of(e) {
4574
- return e instanceof B ? e : B.builder().originalError(e).build();
4575
- }
4576
- /**
4577
- * Create ApiError from Zod validation error
4578
- */
4579
- static fromZodError(e) {
4580
- const r = {};
4581
- return e.errors.forEach((n) => {
4582
- n.path.forEach((s) => {
4583
- r[s] = n.message;
4584
- });
4585
- }), B.builder().originalError(e).status(ct.BadRequest).message("Validation error").detail("errors", r).build();
4580
+ return console.error("ApiError#of", e), oe(e);
4586
4581
  }
4587
4582
  }
4588
- class gs {
4589
- constructor() {
4590
- this._status = ct.InternalServerError, this._problemDetail = {
4591
- status: this._status,
4592
- title: "",
4583
+ class Ve {
4584
+ constructor(e) {
4585
+ this._originalError = e, this._problemDetail = {
4586
+ title: e?.name || "ApiError",
4587
+ detail: e?.message || "",
4588
+ status: xt.InternalServerError,
4593
4589
  type: "about:blank"
4594
- }, this._originalError = new Error(), this._message = "";
4595
- }
4596
- /**
4597
- * Set standard ProblemDetail fields
4598
- */
4599
- detail(e, r) {
4600
- return this._problemDetail[e] = r, this;
4590
+ };
4601
4591
  }
4602
4592
  /**
4603
- * Set standard ProblemDetail fields
4593
+ * Set standard ProblemDetail
4604
4594
  */
4605
4595
  problemDetail(e) {
4606
4596
  return e && (this._problemDetail = e), this;
4607
4597
  }
4608
4598
  originalError(e) {
4609
- return this._originalError = e, this._problemDetail.title = e.name, e instanceof Wn && this.status(e.status), e instanceof Z && (this.status(ct.BadRequest), this.message("Validation error")), this;
4599
+ return this._originalError = e, this._problemDetail.title = e.name, this._problemDetail.detail = e.message, this;
4600
+ }
4601
+ message(e) {
4602
+ return this._problemDetail.detail = e, this;
4610
4603
  }
4611
4604
  status(e) {
4612
- return this._status = e, this._problemDetail.status = e, this;
4605
+ return this._problemDetail.status = e, this;
4613
4606
  }
4614
- message(e) {
4615
- return this._message = e, this._problemDetail.detail = e, this;
4607
+ errors(e) {
4608
+ return this._problemDetail.errors = e || {}, this;
4609
+ }
4610
+ title(e) {
4611
+ return this._problemDetail.title = e, this;
4612
+ }
4613
+ instance(e) {
4614
+ return this._problemDetail.instance = e, this;
4616
4615
  }
4617
4616
  build() {
4618
- return new B(
4619
- this._status,
4620
- this._problemDetail,
4621
- this._originalError,
4622
- this._message
4623
- );
4617
+ return new ie(this._problemDetail, this._originalError);
4624
4618
  }
4625
4619
  }
4626
- class Ds {
4620
+ function vs(t) {
4621
+ if (!t.data)
4622
+ return null;
4623
+ const e = t.data;
4624
+ return typeof e == "object" && "type" in e && "title" in e && "status" in e ? e : null;
4625
+ }
4626
+ function bs(t) {
4627
+ const e = new Ve(t);
4628
+ if (e.instance(t.config.url), t.status && e.status(t.status), t.response && t.response.data) {
4629
+ const r = vs(t.response);
4630
+ if (r !== null)
4631
+ return e.problemDetail(r).build();
4632
+ }
4633
+ return t.code === "ECONNREFUSED" && e.status(xt.ServiceUnavailable).message("Failed to connect to service").title("Service Unavailable"), e.build();
4634
+ }
4635
+ function ws(t) {
4636
+ const e = {};
4637
+ return t.errors.forEach((r) => {
4638
+ r.path.forEach((n) => {
4639
+ e[n] = r.message;
4640
+ });
4641
+ }), ie.builder().originalError(t).status(xt.BadRequest).message("Validation Error").errors(e).build();
4642
+ }
4643
+ function Fs(t) {
4644
+ return t instanceof ie ? t.problemDetail.detail ? t.problemDetail.detail : t.problemDetail.title ? t.problemDetail.title : t.message : t instanceof Error ? t.message : "An unexpected error occurred";
4645
+ }
4646
+ function Zs(t, e) {
4647
+ return t instanceof ie && t.status === e;
4648
+ }
4649
+ function oe(t) {
4650
+ if (t instanceof ie)
4651
+ return t;
4652
+ if (t instanceof Kn)
4653
+ return bs(t);
4654
+ if (t instanceof Z)
4655
+ return ws(t);
4656
+ if (t instanceof Error)
4657
+ return new Ve(t).build();
4658
+ const e = new Error("Unknown api error");
4659
+ return new Ve(e).instance("handleApiError").build();
4660
+ }
4661
+ class Ms {
4627
4662
  constructor(e) {
4628
4663
  this.isRefreshing = !1, this.pendingRequests = [], this.config = {
4629
4664
  timeout: 3e4,
4630
- enableRefreshToken: !0,
4665
+ enableRefreshToken: !1,
4631
4666
  maxRetries: 3,
4632
4667
  retryDelay: 1e3,
4633
4668
  onUnauthorized: async () => {
4634
- typeof window < "u" && (window.location.href = "/login");
4669
+ console.log("Unauthorized");
4635
4670
  },
4636
4671
  onRefreshTokenExpired: async () => {
4637
- console.error("Session expired. Please login again."), typeof window < "u" && (window.location.href = "/login?expired=true");
4672
+ console.log("Refresh token expired");
4638
4673
  },
4639
4674
  onAuthenticated: async (r) => {
4640
- console.log("Authenticated", r.data);
4675
+ console.log(
4676
+ "[api-client]",
4677
+ r.method.toUpperCase(),
4678
+ r.url,
4679
+ r.data
4680
+ );
4641
4681
  },
4642
4682
  onRefreshToken: async () => "",
4643
4683
  ...e
4644
- }, this.instance = O.create({
4684
+ }, this.instance = C.create({
4645
4685
  baseURL: this.config.baseURL,
4646
4686
  timeout: this.config.timeout,
4647
4687
  headers: {
@@ -4668,7 +4708,7 @@ class Ds {
4668
4708
  try {
4669
4709
  return this.config.onAuthenticated && this.config.onAuthenticated(e), e;
4670
4710
  } catch (r) {
4671
- return console.error("Error attaching token to request:", r), e;
4711
+ return console.error("onAuthenticated error on request:", r), e;
4672
4712
  }
4673
4713
  }
4674
4714
  /**
@@ -4688,24 +4728,24 @@ class Ds {
4688
4728
  */
4689
4729
  async handleResponseRejected(e) {
4690
4730
  const r = e.config;
4691
- return r ? e.response?.status === 401 && this.config.enableRefreshToken ? this.handleUnauthorizedError(e, r) : this.shouldRetry(e, r) ? this.retryRequest(r) : Promise.reject(this.createApiError(e)) : Promise.reject(this.createApiError(e));
4731
+ return r ? e.response?.status === 401 && this.config.enableRefreshToken ? this.handleUnauthorizedError(e, r) : this.shouldRetry(e, r) ? this.retryRequest(r) : Promise.reject(oe(e)) : Promise.reject(oe(e));
4692
4732
  }
4693
4733
  /**
4694
4734
  * Handle 401 errors with token refresh
4695
4735
  */
4696
4736
  async handleUnauthorizedError(e, r) {
4697
4737
  if (r._retry)
4698
- return this.config.onRefreshTokenExpired && await this.config.onRefreshTokenExpired(), Promise.reject(this.createApiError(e));
4738
+ return this.config.onRefreshTokenExpired && await this.config.onRefreshTokenExpired(), Promise.reject(oe(e));
4699
4739
  if (r._retry = !0, this.isRefreshing)
4700
4740
  return new Promise((n, s) => {
4701
4741
  this.pendingRequests.push({ resolve: n, reject: s });
4702
- }).then((n) => (r.headers.Authorization = `Bearer ${n}`, this.instance(r))).catch((n) => Promise.reject(n));
4742
+ }).then((n) => (r.headers.Authorization = `Bearer ${n}`, this.instance(r))).catch((n) => Promise.reject(oe(n)));
4703
4743
  this.isRefreshing = !0;
4704
4744
  try {
4705
4745
  const n = await this.refreshToken();
4706
4746
  return r.headers.Authorization = `Bearer ${n}`, this.processPendingRequests(null, n), this.instance(r);
4707
4747
  } catch (n) {
4708
- return this.processPendingRequests(n, null), this.config.onUnauthorized && await this.config.onUnauthorized(), Promise.reject(this.createApiError(e));
4748
+ return this.processPendingRequests(n, null), this.config.onUnauthorized && await this.config.onUnauthorized(), Promise.reject(oe(e));
4709
4749
  } finally {
4710
4750
  this.isRefreshing = !1;
4711
4751
  }
@@ -4715,37 +4755,11 @@ class Ds {
4715
4755
  */
4716
4756
  async refreshToken() {
4717
4757
  try {
4718
- const e = this.config.onRefreshToken(), n = (await O.post(
4719
- `${this.config.baseURL}/auth/refresh`,
4720
- { refreshToken: e },
4721
- {
4722
- headers: {
4723
- "Content-Type": "application/json"
4724
- }
4725
- }
4726
- )).data.jwtToken;
4727
- return await this.updateSession(n), n;
4758
+ return this.config.onRefreshToken();
4728
4759
  } catch (e) {
4729
4760
  throw console.error("Token refresh failed:", e), e;
4730
4761
  }
4731
4762
  }
4732
- /**
4733
- * Update session with new token
4734
- * Implement this based on your Next.js auth setup
4735
- */
4736
- async updateSession(e) {
4737
- try {
4738
- await fetch("/api/auth/update-token", {
4739
- method: "POST",
4740
- headers: {
4741
- "Content-Type": "application/json"
4742
- },
4743
- body: JSON.stringify({ jwtToken: e })
4744
- });
4745
- } catch (r) {
4746
- throw console.error("Failed to update session:", r), r;
4747
- }
4748
- }
4749
4763
  /**
4750
4764
  * Process all pending requests after token refresh
4751
4765
  */
@@ -4782,22 +4796,6 @@ class Ds {
4782
4796
  sleep(e) {
4783
4797
  return new Promise((r) => setTimeout(r, e));
4784
4798
  }
4785
- /**
4786
- * Create ApiError from AxiosError
4787
- */
4788
- createApiError(e) {
4789
- const r = e.response?.status || 0, n = this.extractProblemDetail(e);
4790
- return new B(r, n, e);
4791
- }
4792
- /**
4793
- * Extract ProblemDetail from error response
4794
- */
4795
- extractProblemDetail(e) {
4796
- if (!e.response?.data)
4797
- return null;
4798
- const r = e.response.data;
4799
- return typeof r == "object" && "type" in r && "title" in r && "status" in r ? r : null;
4800
- }
4801
4799
  /**
4802
4800
  * HTTP Methods with proper typing
4803
4801
  */
@@ -4823,86 +4821,11 @@ class Ds {
4823
4821
  return this.instance;
4824
4822
  }
4825
4823
  }
4826
- function Is(t) {
4827
- return t instanceof B ? t.problemDetail?.detail ? t.problemDetail.detail : t.problemDetail?.title ? t.problemDetail.title : t.message : t instanceof Error ? t.message : "An unexpected error occurred";
4828
- }
4829
- function Ls(t) {
4830
- if (!t.problemDetail)
4831
- return t.message;
4832
- const e = [];
4833
- return t.problemDetail.title && e.push(`Title: ${t.problemDetail.title}`), t.problemDetail.detail && e.push(`Detail: ${t.problemDetail.detail}`), t.problemDetail.instance && e.push(`Instance: ${t.problemDetail.instance}`), e.join(`
4834
- `);
4835
- }
4836
- function Us(t, e) {
4837
- return t instanceof B && t.status === e;
4838
- }
4839
- function Fs(t) {
4840
- if (!(t instanceof B)) {
4841
- console.error("Unexpected error:", t);
4842
- return;
4843
- }
4844
- switch (t.status) {
4845
- case 400:
4846
- console.error("Bad Request:", t.problemDetail?.detail);
4847
- break;
4848
- case 401:
4849
- console.error("Unauthorized - Please login");
4850
- break;
4851
- case 403:
4852
- console.error("Forbidden - Access denied");
4853
- break;
4854
- case 404:
4855
- console.error("Not Found:", t.problemDetail?.detail);
4856
- break;
4857
- case 409:
4858
- console.error("Conflict:", t.problemDetail?.detail);
4859
- break;
4860
- case 422:
4861
- console.error("Validation Error:", t.problemDetail);
4862
- break;
4863
- case 429:
4864
- console.error("Too Many Requests - Please slow down");
4865
- break;
4866
- case 500:
4867
- console.error("Server Error:", t.problemDetail?.detail);
4868
- break;
4869
- case 503:
4870
- console.error("Service Unavailable - Please try again later");
4871
- break;
4872
- default:
4873
- console.error(`Error ${t.status}:`, t.message);
4874
- }
4875
- }
4876
- function Zs(t) {
4877
- if (!t.problemDetail || t.status !== 400)
4878
- return null;
4879
- const e = t.problemDetail.errors || t.problemDetail.fieldErrors;
4880
- if (!e)
4881
- return null;
4882
- if (Array.isArray(e)) {
4883
- const r = {};
4884
- return e.forEach((n) => {
4885
- const s = n.field || n.property || "general", i = n.message || n.defaultMessage || "Validation error";
4886
- r[s] || (r[s] = []), r[s].push(i);
4887
- }), r;
4888
- }
4889
- return e;
4890
- }
4891
- function $s(t) {
4892
- return t;
4893
- }
4894
- function Ms(t, e) {
4895
- return t ? t.errors?.[e] : void 0;
4896
- }
4897
4824
  export {
4898
- Ds as ApiClient,
4899
- B as ApiError,
4900
- gs as ApiErrorBuilder,
4901
- Zs as extractValidationErrors,
4902
- Ls as formatProblemDetail,
4903
- Is as getErrorMessage,
4904
- Ms as getFieldError,
4905
- Fs as handleApiError,
4906
- Us as isHttpStatus,
4907
- $s as showErrorToast
4825
+ Ms as ApiClient,
4826
+ ie as ApiError,
4827
+ Fs as getErrorMessage,
4828
+ bs as handleAxiosError,
4829
+ ws as handleZodError,
4830
+ Zs as isHttpStatus
4908
4831
  };