@solidtime/api 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +402 -7
- package/dist/openapi.json.client.d.ts +820 -49
- package/dist/solidtime-api.js +919 -753
- package/dist/solidtime-api.umd.cjs +9 -9
- package/package.json +1 -1
package/dist/solidtime-api.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
function
|
|
1
|
+
function os(s, e) {
|
|
2
2
|
return function() {
|
|
3
3
|
return s.apply(e, arguments);
|
|
4
4
|
};
|
|
5
5
|
}
|
|
6
|
-
const { toString:
|
|
7
|
-
const r =
|
|
6
|
+
const { toString: Vs } = Object.prototype, { getPrototypeOf: Ot } = Object, st = /* @__PURE__ */ ((s) => (e) => {
|
|
7
|
+
const r = Vs.call(e);
|
|
8
8
|
return s[r] || (s[r] = r.slice(8, -1).toLowerCase());
|
|
9
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
10
|
-
function
|
|
11
|
-
return s !== null && !we(s) && s.constructor !== null && !we(s.constructor) &&
|
|
9
|
+
})(/* @__PURE__ */ Object.create(null)), V = (s) => (s = s.toLowerCase(), (e) => st(e) === s), rt = (s) => (e) => typeof e === s, { isArray: ye } = Array, we = rt("undefined");
|
|
10
|
+
function Hs(s) {
|
|
11
|
+
return s !== null && !we(s) && s.constructor !== null && !we(s.constructor) && q(s.constructor.isBuffer) && s.constructor.isBuffer(s);
|
|
12
12
|
}
|
|
13
|
-
const
|
|
14
|
-
function
|
|
13
|
+
const cs = V("ArrayBuffer");
|
|
14
|
+
function Ws(s) {
|
|
15
15
|
let e;
|
|
16
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(s) : e = s && s.buffer &&
|
|
16
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(s) : e = s && s.buffer && cs(s.buffer), e;
|
|
17
17
|
}
|
|
18
|
-
const
|
|
18
|
+
const Qs = rt("string"), q = rt("function"), us = rt("number"), nt = (s) => s !== null && typeof s == "object", Js = (s) => s === !0 || s === !1, $e = (s) => {
|
|
19
19
|
if (st(s) !== "object")
|
|
20
20
|
return !1;
|
|
21
|
-
const e =
|
|
21
|
+
const e = Ot(s);
|
|
22
22
|
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Symbol.toStringTag in s) && !(Symbol.iterator in s);
|
|
23
|
-
},
|
|
23
|
+
}, Ks = V("Date"), Gs = V("File"), Xs = V("Blob"), Ys = V("FileList"), er = (s) => nt(s) && q(s.pipe), tr = (s) => {
|
|
24
24
|
let e;
|
|
25
|
-
return s && (typeof FormData == "function" && s instanceof FormData ||
|
|
26
|
-
e === "object" &&
|
|
27
|
-
},
|
|
25
|
+
return s && (typeof FormData == "function" && s instanceof FormData || q(s.append) && ((e = st(s)) === "formdata" || // detect form-data instance
|
|
26
|
+
e === "object" && q(s.toString) && s.toString() === "[object FormData]"));
|
|
27
|
+
}, sr = V("URLSearchParams"), [rr, nr, ar, ir] = ["ReadableStream", "Request", "Response", "Headers"].map(V), or = (s) => s.trim ? s.trim() : s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
28
28
|
function Ze(s, e, { allOwnKeys: r = !1 } = {}) {
|
|
29
29
|
if (s === null || typeof s > "u")
|
|
30
30
|
return;
|
|
@@ -39,7 +39,7 @@ function Ze(s, e, { allOwnKeys: r = !1 } = {}) {
|
|
|
39
39
|
c = i[n], e.call(null, s[c], c, s);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function ds(s, e) {
|
|
43
43
|
e = e.toLowerCase();
|
|
44
44
|
const r = Object.keys(s);
|
|
45
45
|
let n = r.length, a;
|
|
@@ -48,75 +48,75 @@ function cs(s, e) {
|
|
|
48
48
|
return a;
|
|
49
49
|
return null;
|
|
50
50
|
}
|
|
51
|
-
const
|
|
52
|
-
function
|
|
53
|
-
const { caseless: s } =
|
|
54
|
-
const i = s &&
|
|
55
|
-
|
|
51
|
+
const ne = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, ls = (s) => !we(s) && s !== ne;
|
|
52
|
+
function yt() {
|
|
53
|
+
const { caseless: s } = ls(this) && this || {}, e = {}, r = (n, a) => {
|
|
54
|
+
const i = s && ds(e, a) || a;
|
|
55
|
+
$e(e[i]) && $e(n) ? e[i] = yt(e[i], n) : $e(n) ? e[i] = yt({}, n) : ye(n) ? e[i] = n.slice() : e[i] = n;
|
|
56
56
|
};
|
|
57
57
|
for (let n = 0, a = arguments.length; n < a; n++)
|
|
58
58
|
arguments[n] && Ze(arguments[n], r);
|
|
59
59
|
return e;
|
|
60
60
|
}
|
|
61
|
-
const
|
|
62
|
-
r &&
|
|
63
|
-
}, { allOwnKeys: n }), s),
|
|
61
|
+
const cr = (s, e, r, { allOwnKeys: n } = {}) => (Ze(e, (a, i) => {
|
|
62
|
+
r && q(a) ? s[i] = os(a, r) : s[i] = a;
|
|
63
|
+
}, { allOwnKeys: n }), s), ur = (s) => (s.charCodeAt(0) === 65279 && (s = s.slice(1)), s), dr = (s, e, r, n) => {
|
|
64
64
|
s.prototype = Object.create(e.prototype, n), s.prototype.constructor = s, Object.defineProperty(s, "super", {
|
|
65
65
|
value: e.prototype
|
|
66
66
|
}), r && Object.assign(s.prototype, r);
|
|
67
|
-
},
|
|
67
|
+
}, lr = (s, e, r, n) => {
|
|
68
68
|
let a, i, o;
|
|
69
69
|
const c = {};
|
|
70
70
|
if (e = e || {}, s == null) return e;
|
|
71
71
|
do {
|
|
72
72
|
for (a = Object.getOwnPropertyNames(s), i = a.length; i-- > 0; )
|
|
73
73
|
o = a[i], (!n || n(o, s, e)) && !c[o] && (e[o] = s[o], c[o] = !0);
|
|
74
|
-
s = r !== !1 &&
|
|
74
|
+
s = r !== !1 && Ot(s);
|
|
75
75
|
} while (s && (!r || r(s, e)) && s !== Object.prototype);
|
|
76
76
|
return e;
|
|
77
|
-
},
|
|
77
|
+
}, hr = (s, e, r) => {
|
|
78
78
|
s = String(s), (r === void 0 || r > s.length) && (r = s.length), r -= e.length;
|
|
79
79
|
const n = s.indexOf(e, r);
|
|
80
80
|
return n !== -1 && n === r;
|
|
81
|
-
},
|
|
81
|
+
}, pr = (s) => {
|
|
82
82
|
if (!s) return null;
|
|
83
83
|
if (ye(s)) return s;
|
|
84
84
|
let e = s.length;
|
|
85
|
-
if (!
|
|
85
|
+
if (!us(e)) return null;
|
|
86
86
|
const r = new Array(e);
|
|
87
87
|
for (; e-- > 0; )
|
|
88
88
|
r[e] = s[e];
|
|
89
89
|
return r;
|
|
90
|
-
},
|
|
90
|
+
}, mr = /* @__PURE__ */ ((s) => (e) => s && e instanceof s)(typeof Uint8Array < "u" && Ot(Uint8Array)), fr = (s, e) => {
|
|
91
91
|
const n = (s && s[Symbol.iterator]).call(s);
|
|
92
92
|
let a;
|
|
93
93
|
for (; (a = n.next()) && !a.done; ) {
|
|
94
94
|
const i = a.value;
|
|
95
95
|
e.call(s, i[0], i[1]);
|
|
96
96
|
}
|
|
97
|
-
},
|
|
97
|
+
}, gr = (s, e) => {
|
|
98
98
|
let r;
|
|
99
99
|
const n = [];
|
|
100
100
|
for (; (r = s.exec(e)) !== null; )
|
|
101
101
|
n.push(r);
|
|
102
102
|
return n;
|
|
103
|
-
},
|
|
103
|
+
}, yr = V("HTMLFormElement"), br = (s) => s.toLowerCase().replace(
|
|
104
104
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
105
105
|
function(r, n, a) {
|
|
106
106
|
return n.toUpperCase() + a;
|
|
107
107
|
}
|
|
108
|
-
),
|
|
108
|
+
), qt = (({ hasOwnProperty: s }) => (e, r) => s.call(e, r))(Object.prototype), _r = V("RegExp"), hs = (s, e) => {
|
|
109
109
|
const r = Object.getOwnPropertyDescriptors(s), n = {};
|
|
110
110
|
Ze(r, (a, i) => {
|
|
111
111
|
let o;
|
|
112
112
|
(o = e(a, i, s)) !== !1 && (n[i] = o || a);
|
|
113
113
|
}), Object.defineProperties(s, n);
|
|
114
|
-
},
|
|
115
|
-
|
|
116
|
-
if (
|
|
114
|
+
}, vr = (s) => {
|
|
115
|
+
hs(s, (e, r) => {
|
|
116
|
+
if (q(s) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
|
|
117
117
|
return !1;
|
|
118
118
|
const n = s[r];
|
|
119
|
-
if (
|
|
119
|
+
if (q(n)) {
|
|
120
120
|
if (e.enumerable = !1, "writable" in e) {
|
|
121
121
|
e.writable = !1;
|
|
122
122
|
return;
|
|
@@ -126,29 +126,29 @@ const ir = (s, e, r, { allOwnKeys: n } = {}) => (Ze(e, (a, i) => {
|
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
128
|
});
|
|
129
|
-
},
|
|
129
|
+
}, jr = (s, e) => {
|
|
130
130
|
const r = {}, n = (a) => {
|
|
131
131
|
a.forEach((i) => {
|
|
132
132
|
r[i] = !0;
|
|
133
133
|
});
|
|
134
134
|
};
|
|
135
135
|
return ye(s) ? n(s) : n(String(s).split(e)), r;
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
DIGIT:
|
|
139
|
-
ALPHA:
|
|
140
|
-
ALPHA_DIGIT:
|
|
141
|
-
},
|
|
136
|
+
}, wr = () => {
|
|
137
|
+
}, xr = (s, e) => s != null && Number.isFinite(s = +s) ? s : e, dt = "abcdefghijklmnopqrstuvwxyz", Mt = "0123456789", ps = {
|
|
138
|
+
DIGIT: Mt,
|
|
139
|
+
ALPHA: dt,
|
|
140
|
+
ALPHA_DIGIT: dt + dt.toUpperCase() + Mt
|
|
141
|
+
}, kr = (s = 16, e = ps.ALPHA_DIGIT) => {
|
|
142
142
|
let r = "";
|
|
143
143
|
const { length: n } = e;
|
|
144
144
|
for (; s--; )
|
|
145
145
|
r += e[Math.random() * n | 0];
|
|
146
146
|
return r;
|
|
147
147
|
};
|
|
148
|
-
function
|
|
149
|
-
return !!(s &&
|
|
148
|
+
function Tr(s) {
|
|
149
|
+
return !!(s && q(s.append) && s[Symbol.toStringTag] === "FormData" && s[Symbol.iterator]);
|
|
150
150
|
}
|
|
151
|
-
const
|
|
151
|
+
const Er = (s) => {
|
|
152
152
|
const e = new Array(10), r = (n, a) => {
|
|
153
153
|
if (nt(n)) {
|
|
154
154
|
if (e.indexOf(n) >= 0)
|
|
@@ -165,75 +165,75 @@ const kr = (s) => {
|
|
|
165
165
|
return n;
|
|
166
166
|
};
|
|
167
167
|
return r(s, 0);
|
|
168
|
-
},
|
|
169
|
-
a ===
|
|
168
|
+
}, Rr = V("AsyncFunction"), Sr = (s) => s && (nt(s) || q(s)) && q(s.then) && q(s.catch), ms = ((s, e) => s ? setImmediate : e ? ((r, n) => (ne.addEventListener("message", ({ source: a, data: i }) => {
|
|
169
|
+
a === ne && i === r && n.length && n.shift()();
|
|
170
170
|
}, !1), (a) => {
|
|
171
|
-
n.push(a),
|
|
171
|
+
n.push(a), ne.postMessage(r, "*");
|
|
172
172
|
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
|
|
173
173
|
typeof setImmediate == "function",
|
|
174
|
-
|
|
175
|
-
),
|
|
174
|
+
q(ne.postMessage)
|
|
175
|
+
), Ar = typeof queueMicrotask < "u" ? queueMicrotask.bind(ne) : typeof process < "u" && process.nextTick || ms, l = {
|
|
176
176
|
isArray: ye,
|
|
177
|
-
isArrayBuffer:
|
|
178
|
-
isBuffer:
|
|
179
|
-
isFormData:
|
|
180
|
-
isArrayBufferView:
|
|
181
|
-
isString:
|
|
182
|
-
isNumber:
|
|
183
|
-
isBoolean:
|
|
177
|
+
isArrayBuffer: cs,
|
|
178
|
+
isBuffer: Hs,
|
|
179
|
+
isFormData: tr,
|
|
180
|
+
isArrayBufferView: Ws,
|
|
181
|
+
isString: Qs,
|
|
182
|
+
isNumber: us,
|
|
183
|
+
isBoolean: Js,
|
|
184
184
|
isObject: nt,
|
|
185
|
-
isPlainObject:
|
|
186
|
-
isReadableStream:
|
|
187
|
-
isRequest:
|
|
188
|
-
isResponse:
|
|
189
|
-
isHeaders:
|
|
185
|
+
isPlainObject: $e,
|
|
186
|
+
isReadableStream: rr,
|
|
187
|
+
isRequest: nr,
|
|
188
|
+
isResponse: ar,
|
|
189
|
+
isHeaders: ir,
|
|
190
190
|
isUndefined: we,
|
|
191
|
-
isDate:
|
|
192
|
-
isFile:
|
|
193
|
-
isBlob:
|
|
194
|
-
isRegExp:
|
|
195
|
-
isFunction:
|
|
196
|
-
isStream:
|
|
197
|
-
isURLSearchParams:
|
|
198
|
-
isTypedArray:
|
|
199
|
-
isFileList:
|
|
191
|
+
isDate: Ks,
|
|
192
|
+
isFile: Gs,
|
|
193
|
+
isBlob: Xs,
|
|
194
|
+
isRegExp: _r,
|
|
195
|
+
isFunction: q,
|
|
196
|
+
isStream: er,
|
|
197
|
+
isURLSearchParams: sr,
|
|
198
|
+
isTypedArray: mr,
|
|
199
|
+
isFileList: Ys,
|
|
200
200
|
forEach: Ze,
|
|
201
|
-
merge:
|
|
202
|
-
extend:
|
|
203
|
-
trim:
|
|
204
|
-
stripBOM:
|
|
205
|
-
inherits:
|
|
206
|
-
toFlatObject:
|
|
201
|
+
merge: yt,
|
|
202
|
+
extend: cr,
|
|
203
|
+
trim: or,
|
|
204
|
+
stripBOM: ur,
|
|
205
|
+
inherits: dr,
|
|
206
|
+
toFlatObject: lr,
|
|
207
207
|
kindOf: st,
|
|
208
|
-
kindOfTest:
|
|
209
|
-
endsWith:
|
|
210
|
-
toArray:
|
|
211
|
-
forEachEntry:
|
|
212
|
-
matchAll:
|
|
213
|
-
isHTMLForm:
|
|
214
|
-
hasOwnProperty:
|
|
215
|
-
hasOwnProp:
|
|
208
|
+
kindOfTest: V,
|
|
209
|
+
endsWith: hr,
|
|
210
|
+
toArray: pr,
|
|
211
|
+
forEachEntry: fr,
|
|
212
|
+
matchAll: gr,
|
|
213
|
+
isHTMLForm: yr,
|
|
214
|
+
hasOwnProperty: qt,
|
|
215
|
+
hasOwnProp: qt,
|
|
216
216
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
217
|
-
reduceDescriptors:
|
|
218
|
-
freezeMethods:
|
|
219
|
-
toObjectSet:
|
|
220
|
-
toCamelCase:
|
|
221
|
-
noop:
|
|
222
|
-
toFiniteNumber:
|
|
223
|
-
findKey:
|
|
224
|
-
global:
|
|
225
|
-
isContextDefined:
|
|
226
|
-
ALPHABET:
|
|
227
|
-
generateString:
|
|
228
|
-
isSpecCompliantForm:
|
|
229
|
-
toJSONObject:
|
|
230
|
-
isAsyncFn:
|
|
231
|
-
isThenable:
|
|
232
|
-
setImmediate:
|
|
233
|
-
asap:
|
|
217
|
+
reduceDescriptors: hs,
|
|
218
|
+
freezeMethods: vr,
|
|
219
|
+
toObjectSet: jr,
|
|
220
|
+
toCamelCase: br,
|
|
221
|
+
noop: wr,
|
|
222
|
+
toFiniteNumber: xr,
|
|
223
|
+
findKey: ds,
|
|
224
|
+
global: ne,
|
|
225
|
+
isContextDefined: ls,
|
|
226
|
+
ALPHABET: ps,
|
|
227
|
+
generateString: kr,
|
|
228
|
+
isSpecCompliantForm: Tr,
|
|
229
|
+
toJSONObject: Er,
|
|
230
|
+
isAsyncFn: Rr,
|
|
231
|
+
isThenable: Sr,
|
|
232
|
+
setImmediate: ms,
|
|
233
|
+
asap: Ar
|
|
234
234
|
};
|
|
235
235
|
function x(s, e, r, n, a) {
|
|
236
|
-
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = s, this.name = "AxiosError", e && (this.code = e), r && (this.config = r), n && (this.request = n), a && (this.response = a);
|
|
236
|
+
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = s, this.name = "AxiosError", e && (this.code = e), r && (this.config = r), n && (this.request = n), a && (this.response = a, this.status = a.status ? a.status : null);
|
|
237
237
|
}
|
|
238
238
|
l.inherits(x, Error, {
|
|
239
239
|
toJSON: function() {
|
|
@@ -252,11 +252,11 @@ l.inherits(x, Error, {
|
|
|
252
252
|
// Axios
|
|
253
253
|
config: l.toJSONObject(this.config),
|
|
254
254
|
code: this.code,
|
|
255
|
-
status: this.
|
|
255
|
+
status: this.status
|
|
256
256
|
};
|
|
257
257
|
}
|
|
258
258
|
});
|
|
259
|
-
const
|
|
259
|
+
const fs = x.prototype, gs = {};
|
|
260
260
|
[
|
|
261
261
|
"ERR_BAD_OPTION_VALUE",
|
|
262
262
|
"ERR_BAD_OPTION",
|
|
@@ -272,32 +272,32 @@ const ps = x.prototype, ms = {};
|
|
|
272
272
|
"ERR_INVALID_URL"
|
|
273
273
|
// eslint-disable-next-line func-names
|
|
274
274
|
].forEach((s) => {
|
|
275
|
-
|
|
275
|
+
gs[s] = { value: s };
|
|
276
276
|
});
|
|
277
|
-
Object.defineProperties(x,
|
|
278
|
-
Object.defineProperty(
|
|
277
|
+
Object.defineProperties(x, gs);
|
|
278
|
+
Object.defineProperty(fs, "isAxiosError", { value: !0 });
|
|
279
279
|
x.from = (s, e, r, n, a, i) => {
|
|
280
|
-
const o = Object.create(
|
|
280
|
+
const o = Object.create(fs);
|
|
281
281
|
return l.toFlatObject(s, o, function(d) {
|
|
282
282
|
return d !== Error.prototype;
|
|
283
283
|
}, (c) => c !== "isAxiosError"), x.call(o, s.message, e, r, n, a), o.cause = s, o.name = s.name, i && Object.assign(o, i), o;
|
|
284
284
|
};
|
|
285
|
-
const
|
|
286
|
-
function
|
|
285
|
+
const Pr = null;
|
|
286
|
+
function bt(s) {
|
|
287
287
|
return l.isPlainObject(s) || l.isArray(s);
|
|
288
288
|
}
|
|
289
|
-
function
|
|
289
|
+
function ys(s) {
|
|
290
290
|
return l.endsWith(s, "[]") ? s.slice(0, -2) : s;
|
|
291
291
|
}
|
|
292
|
-
function
|
|
292
|
+
function Lt(s, e, r) {
|
|
293
293
|
return s ? s.concat(e).map(function(a, i) {
|
|
294
|
-
return a =
|
|
294
|
+
return a = ys(a), !r && i ? "[" + a + "]" : a;
|
|
295
295
|
}).join(r ? "." : "") : e;
|
|
296
296
|
}
|
|
297
|
-
function
|
|
298
|
-
return l.isArray(s) && !s.some(
|
|
297
|
+
function Or(s) {
|
|
298
|
+
return l.isArray(s) && !s.some(bt);
|
|
299
299
|
}
|
|
300
|
-
const
|
|
300
|
+
const Nr = l.toFlatObject(l, {}, null, function(e) {
|
|
301
301
|
return /^is[A-Z]/.test(e);
|
|
302
302
|
});
|
|
303
303
|
function at(s, e, r) {
|
|
@@ -322,46 +322,46 @@ function at(s, e, r) {
|
|
|
322
322
|
return l.isArrayBuffer(_) || l.isTypedArray(_) ? d && typeof Blob == "function" ? new Blob([_]) : Buffer.from(_) : _;
|
|
323
323
|
}
|
|
324
324
|
function h(_, E, y) {
|
|
325
|
-
let
|
|
325
|
+
let I = _;
|
|
326
326
|
if (_ && !y && typeof _ == "object") {
|
|
327
327
|
if (l.endsWith(E, "{}"))
|
|
328
328
|
E = n ? E : E.slice(0, -2), _ = JSON.stringify(_);
|
|
329
|
-
else if (l.isArray(_) &&
|
|
330
|
-
return E =
|
|
331
|
-
!(l.isUndefined(
|
|
329
|
+
else if (l.isArray(_) && Or(_) || (l.isFileList(_) || l.endsWith(E, "[]")) && (I = l.toArray(_)))
|
|
330
|
+
return E = ys(E), I.forEach(function(A, N) {
|
|
331
|
+
!(l.isUndefined(A) || A === null) && e.append(
|
|
332
332
|
// eslint-disable-next-line no-nested-ternary
|
|
333
|
-
o === !0 ?
|
|
334
|
-
u(
|
|
333
|
+
o === !0 ? Lt([E], N, i) : o === null ? E : E + "[]",
|
|
334
|
+
u(A)
|
|
335
335
|
);
|
|
336
336
|
}), !1;
|
|
337
337
|
}
|
|
338
|
-
return
|
|
338
|
+
return bt(_) ? !0 : (e.append(Lt(y, E, i), u(_)), !1);
|
|
339
339
|
}
|
|
340
|
-
const m = [], w = Object.assign(
|
|
340
|
+
const m = [], w = Object.assign(Nr, {
|
|
341
341
|
defaultVisitor: h,
|
|
342
342
|
convertValue: u,
|
|
343
|
-
isVisitable:
|
|
343
|
+
isVisitable: bt
|
|
344
344
|
});
|
|
345
|
-
function
|
|
345
|
+
function S(_, E) {
|
|
346
346
|
if (!l.isUndefined(_)) {
|
|
347
347
|
if (m.indexOf(_) !== -1)
|
|
348
348
|
throw Error("Circular reference detected in " + E.join("."));
|
|
349
|
-
m.push(_), l.forEach(_, function(
|
|
350
|
-
(!(l.isUndefined(
|
|
349
|
+
m.push(_), l.forEach(_, function(I, Z) {
|
|
350
|
+
(!(l.isUndefined(I) || I === null) && a.call(
|
|
351
351
|
e,
|
|
352
|
-
|
|
353
|
-
l.isString(
|
|
352
|
+
I,
|
|
353
|
+
l.isString(Z) ? Z.trim() : Z,
|
|
354
354
|
E,
|
|
355
355
|
w
|
|
356
|
-
)) === !0 &&
|
|
356
|
+
)) === !0 && S(I, E ? E.concat(Z) : [Z]);
|
|
357
357
|
}), m.pop();
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
360
|
if (!l.isObject(s))
|
|
361
361
|
throw new TypeError("data must be an object");
|
|
362
|
-
return
|
|
362
|
+
return S(s), e;
|
|
363
363
|
}
|
|
364
|
-
function
|
|
364
|
+
function Bt(s) {
|
|
365
365
|
const e = {
|
|
366
366
|
"!": "%21",
|
|
367
367
|
"'": "%27",
|
|
@@ -375,36 +375,36 @@ function Mt(s) {
|
|
|
375
375
|
return e[n];
|
|
376
376
|
});
|
|
377
377
|
}
|
|
378
|
-
function
|
|
378
|
+
function Nt(s, e) {
|
|
379
379
|
this._pairs = [], s && at(s, this, e);
|
|
380
380
|
}
|
|
381
|
-
const
|
|
382
|
-
|
|
381
|
+
const bs = Nt.prototype;
|
|
382
|
+
bs.append = function(e, r) {
|
|
383
383
|
this._pairs.push([e, r]);
|
|
384
384
|
};
|
|
385
|
-
|
|
385
|
+
bs.toString = function(e) {
|
|
386
386
|
const r = e ? function(n) {
|
|
387
|
-
return e.call(this, n,
|
|
388
|
-
} :
|
|
387
|
+
return e.call(this, n, Bt);
|
|
388
|
+
} : Bt;
|
|
389
389
|
return this._pairs.map(function(a) {
|
|
390
390
|
return r(a[0]) + "=" + r(a[1]);
|
|
391
391
|
}, "").join("&");
|
|
392
392
|
};
|
|
393
|
-
function
|
|
393
|
+
function zr(s) {
|
|
394
394
|
return encodeURIComponent(s).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
395
395
|
}
|
|
396
|
-
function
|
|
396
|
+
function _s(s, e, r) {
|
|
397
397
|
if (!e)
|
|
398
398
|
return s;
|
|
399
|
-
const n = r && r.encode ||
|
|
399
|
+
const n = r && r.encode || zr, a = r && r.serialize;
|
|
400
400
|
let i;
|
|
401
|
-
if (a ? i = a(e, r) : i = l.isURLSearchParams(e) ? e.toString() : new
|
|
401
|
+
if (a ? i = a(e, r) : i = l.isURLSearchParams(e) ? e.toString() : new Nt(e, r).toString(n), i) {
|
|
402
402
|
const o = s.indexOf("#");
|
|
403
403
|
o !== -1 && (s = s.slice(0, o)), s += (s.indexOf("?") === -1 ? "?" : "&") + i;
|
|
404
404
|
}
|
|
405
405
|
return s;
|
|
406
406
|
}
|
|
407
|
-
class
|
|
407
|
+
class Dt {
|
|
408
408
|
constructor() {
|
|
409
409
|
this.handlers = [];
|
|
410
410
|
}
|
|
@@ -458,40 +458,41 @@ class Lt {
|
|
|
458
458
|
});
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
const
|
|
461
|
+
const vs = {
|
|
462
462
|
silentJSONParsing: !0,
|
|
463
463
|
forcedJSONParsing: !0,
|
|
464
464
|
clarifyTimeoutError: !1
|
|
465
|
-
},
|
|
465
|
+
}, Cr = typeof URLSearchParams < "u" ? URLSearchParams : Nt, Ir = typeof FormData < "u" ? FormData : null, Ur = typeof Blob < "u" ? Blob : null, Zr = {
|
|
466
466
|
isBrowser: !0,
|
|
467
467
|
classes: {
|
|
468
|
-
URLSearchParams:
|
|
469
|
-
FormData:
|
|
470
|
-
Blob:
|
|
468
|
+
URLSearchParams: Cr,
|
|
469
|
+
FormData: Ir,
|
|
470
|
+
Blob: Ur
|
|
471
471
|
},
|
|
472
472
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
473
|
-
},
|
|
474
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
473
|
+
}, zt = typeof window < "u" && typeof document < "u", _t = typeof navigator == "object" && navigator || void 0, qr = zt && (!_t || ["ReactNative", "NativeScript", "NS"].indexOf(_t.product) < 0), Mr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
474
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Lr = zt && window.location.href || "http://localhost", Br = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
475
475
|
__proto__: null,
|
|
476
|
-
hasBrowserEnv:
|
|
477
|
-
hasStandardBrowserEnv:
|
|
478
|
-
hasStandardBrowserWebWorkerEnv:
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
...
|
|
476
|
+
hasBrowserEnv: zt,
|
|
477
|
+
hasStandardBrowserEnv: qr,
|
|
478
|
+
hasStandardBrowserWebWorkerEnv: Mr,
|
|
479
|
+
navigator: _t,
|
|
480
|
+
origin: Lr
|
|
481
|
+
}, Symbol.toStringTag, { value: "Module" })), M = {
|
|
482
|
+
...Br,
|
|
483
|
+
...Zr
|
|
483
484
|
};
|
|
484
|
-
function
|
|
485
|
-
return at(s, new
|
|
485
|
+
function Dr(s, e) {
|
|
486
|
+
return at(s, new M.classes.URLSearchParams(), Object.assign({
|
|
486
487
|
visitor: function(r, n, a, i) {
|
|
487
|
-
return
|
|
488
|
+
return M.isNode && l.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
488
489
|
}
|
|
489
490
|
}, e));
|
|
490
491
|
}
|
|
491
|
-
function
|
|
492
|
+
function Fr(s) {
|
|
492
493
|
return l.matchAll(/\w+|\[(\w*)]/g, s).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
493
494
|
}
|
|
494
|
-
function
|
|
495
|
+
function $r(s) {
|
|
495
496
|
const e = {}, r = Object.keys(s);
|
|
496
497
|
let n;
|
|
497
498
|
const a = r.length;
|
|
@@ -500,22 +501,22 @@ function Br(s) {
|
|
|
500
501
|
i = r[n], e[i] = s[i];
|
|
501
502
|
return e;
|
|
502
503
|
}
|
|
503
|
-
function
|
|
504
|
+
function js(s) {
|
|
504
505
|
function e(r, n, a, i) {
|
|
505
506
|
let o = r[i++];
|
|
506
507
|
if (o === "__proto__") return !0;
|
|
507
508
|
const c = Number.isFinite(+o), d = i >= r.length;
|
|
508
|
-
return o = !o && l.isArray(a) ? a.length : o, d ? (l.hasOwnProp(a, o) ? a[o] = [a[o], n] : a[o] = n, !c) : ((!a[o] || !l.isObject(a[o])) && (a[o] = []), e(r, n, a[o], i) && l.isArray(a[o]) && (a[o] =
|
|
509
|
+
return o = !o && l.isArray(a) ? a.length : o, d ? (l.hasOwnProp(a, o) ? a[o] = [a[o], n] : a[o] = n, !c) : ((!a[o] || !l.isObject(a[o])) && (a[o] = []), e(r, n, a[o], i) && l.isArray(a[o]) && (a[o] = $r(a[o])), !c);
|
|
509
510
|
}
|
|
510
511
|
if (l.isFormData(s) && l.isFunction(s.entries)) {
|
|
511
512
|
const r = {};
|
|
512
513
|
return l.forEachEntry(s, (n, a) => {
|
|
513
|
-
e(
|
|
514
|
+
e(Fr(n), a, r, 0);
|
|
514
515
|
}), r;
|
|
515
516
|
}
|
|
516
517
|
return null;
|
|
517
518
|
}
|
|
518
|
-
function
|
|
519
|
+
function Vr(s, e, r) {
|
|
519
520
|
if (l.isString(s))
|
|
520
521
|
try {
|
|
521
522
|
return (e || JSON.parse)(s), l.trim(s);
|
|
@@ -526,12 +527,12 @@ function Fr(s, e, r) {
|
|
|
526
527
|
return (r || JSON.stringify)(s);
|
|
527
528
|
}
|
|
528
529
|
const qe = {
|
|
529
|
-
transitional:
|
|
530
|
+
transitional: vs,
|
|
530
531
|
adapter: ["xhr", "http", "fetch"],
|
|
531
532
|
transformRequest: [function(e, r) {
|
|
532
533
|
const n = r.getContentType() || "", a = n.indexOf("application/json") > -1, i = l.isObject(e);
|
|
533
534
|
if (i && l.isHTMLForm(e) && (e = new FormData(e)), l.isFormData(e))
|
|
534
|
-
return a ? JSON.stringify(
|
|
535
|
+
return a ? JSON.stringify(js(e)) : e;
|
|
535
536
|
if (l.isArrayBuffer(e) || l.isBuffer(e) || l.isStream(e) || l.isFile(e) || l.isBlob(e) || l.isReadableStream(e))
|
|
536
537
|
return e;
|
|
537
538
|
if (l.isArrayBufferView(e))
|
|
@@ -541,7 +542,7 @@ const qe = {
|
|
|
541
542
|
let c;
|
|
542
543
|
if (i) {
|
|
543
544
|
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
544
|
-
return
|
|
545
|
+
return Dr(e, this.formSerializer).toString();
|
|
545
546
|
if ((c = l.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
|
|
546
547
|
const d = this.env && this.env.FormData;
|
|
547
548
|
return at(
|
|
@@ -551,7 +552,7 @@ const qe = {
|
|
|
551
552
|
);
|
|
552
553
|
}
|
|
553
554
|
}
|
|
554
|
-
return i || a ? (r.setContentType("application/json", !1),
|
|
555
|
+
return i || a ? (r.setContentType("application/json", !1), Vr(e)) : e;
|
|
555
556
|
}],
|
|
556
557
|
transformResponse: [function(e) {
|
|
557
558
|
const r = this.transitional || qe.transitional, n = r && r.forcedJSONParsing, a = this.responseType === "json";
|
|
@@ -578,8 +579,8 @@ const qe = {
|
|
|
578
579
|
maxContentLength: -1,
|
|
579
580
|
maxBodyLength: -1,
|
|
580
581
|
env: {
|
|
581
|
-
FormData:
|
|
582
|
-
Blob:
|
|
582
|
+
FormData: M.classes.FormData,
|
|
583
|
+
Blob: M.classes.Blob
|
|
583
584
|
},
|
|
584
585
|
validateStatus: function(e) {
|
|
585
586
|
return e >= 200 && e < 300;
|
|
@@ -594,7 +595,7 @@ const qe = {
|
|
|
594
595
|
l.forEach(["delete", "get", "head", "post", "put", "patch"], (s) => {
|
|
595
596
|
qe.headers[s] = {};
|
|
596
597
|
});
|
|
597
|
-
const
|
|
598
|
+
const Hr = l.toObjectSet([
|
|
598
599
|
"age",
|
|
599
600
|
"authorization",
|
|
600
601
|
"content-length",
|
|
@@ -612,29 +613,29 @@ const $r = l.toObjectSet([
|
|
|
612
613
|
"referer",
|
|
613
614
|
"retry-after",
|
|
614
615
|
"user-agent"
|
|
615
|
-
]),
|
|
616
|
+
]), Wr = (s) => {
|
|
616
617
|
const e = {};
|
|
617
618
|
let r, n, a;
|
|
618
619
|
return s && s.split(`
|
|
619
620
|
`).forEach(function(o) {
|
|
620
|
-
a = o.indexOf(":"), r = o.substring(0, a).trim().toLowerCase(), n = o.substring(a + 1).trim(), !(!r || e[r] &&
|
|
621
|
+
a = o.indexOf(":"), r = o.substring(0, a).trim().toLowerCase(), n = o.substring(a + 1).trim(), !(!r || e[r] && Hr[r]) && (r === "set-cookie" ? e[r] ? e[r].push(n) : e[r] = [n] : e[r] = e[r] ? e[r] + ", " + n : n);
|
|
621
622
|
}), e;
|
|
622
|
-
},
|
|
623
|
+
}, Ft = Symbol("internals");
|
|
623
624
|
function _e(s) {
|
|
624
625
|
return s && String(s).trim().toLowerCase();
|
|
625
626
|
}
|
|
626
|
-
function
|
|
627
|
-
return s === !1 || s == null ? s : l.isArray(s) ? s.map(
|
|
627
|
+
function Ve(s) {
|
|
628
|
+
return s === !1 || s == null ? s : l.isArray(s) ? s.map(Ve) : String(s);
|
|
628
629
|
}
|
|
629
|
-
function
|
|
630
|
+
function Qr(s) {
|
|
630
631
|
const e = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
631
632
|
let n;
|
|
632
633
|
for (; n = r.exec(s); )
|
|
633
634
|
e[n[1]] = n[2];
|
|
634
635
|
return e;
|
|
635
636
|
}
|
|
636
|
-
const
|
|
637
|
-
function
|
|
637
|
+
const Jr = (s) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(s.trim());
|
|
638
|
+
function lt(s, e, r, n, a) {
|
|
638
639
|
if (l.isFunction(n))
|
|
639
640
|
return n.call(this, e, r);
|
|
640
641
|
if (a && (e = r), !!l.isString(e)) {
|
|
@@ -644,10 +645,10 @@ function dt(s, e, r, n, a) {
|
|
|
644
645
|
return n.test(e);
|
|
645
646
|
}
|
|
646
647
|
}
|
|
647
|
-
function
|
|
648
|
+
function Kr(s) {
|
|
648
649
|
return s.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, r, n) => r.toUpperCase() + n);
|
|
649
650
|
}
|
|
650
|
-
function
|
|
651
|
+
function Gr(s, e) {
|
|
651
652
|
const r = l.toCamelCase(" " + e);
|
|
652
653
|
["get", "set", "has"].forEach((n) => {
|
|
653
654
|
Object.defineProperty(s, n + r, {
|
|
@@ -658,7 +659,7 @@ function Jr(s, e) {
|
|
|
658
659
|
});
|
|
659
660
|
});
|
|
660
661
|
}
|
|
661
|
-
class
|
|
662
|
+
class U {
|
|
662
663
|
constructor(e) {
|
|
663
664
|
e && this.set(e);
|
|
664
665
|
}
|
|
@@ -669,13 +670,13 @@ class I {
|
|
|
669
670
|
if (!h)
|
|
670
671
|
throw new Error("header name must be a non-empty string");
|
|
671
672
|
const m = l.findKey(a, h);
|
|
672
|
-
(!m || a[m] === void 0 || u === !0 || u === void 0 && a[m] !== !1) && (a[m || d] =
|
|
673
|
+
(!m || a[m] === void 0 || u === !0 || u === void 0 && a[m] !== !1) && (a[m || d] = Ve(c));
|
|
673
674
|
}
|
|
674
675
|
const o = (c, d) => l.forEach(c, (u, h) => i(u, h, d));
|
|
675
676
|
if (l.isPlainObject(e) || e instanceof this.constructor)
|
|
676
677
|
o(e, r);
|
|
677
|
-
else if (l.isString(e) && (e = e.trim()) && !
|
|
678
|
-
o(
|
|
678
|
+
else if (l.isString(e) && (e = e.trim()) && !Jr(e))
|
|
679
|
+
o(Wr(e), r);
|
|
679
680
|
else if (l.isHeaders(e))
|
|
680
681
|
for (const [c, d] of e.entries())
|
|
681
682
|
i(d, c, n);
|
|
@@ -691,7 +692,7 @@ class I {
|
|
|
691
692
|
if (!r)
|
|
692
693
|
return a;
|
|
693
694
|
if (r === !0)
|
|
694
|
-
return
|
|
695
|
+
return Qr(a);
|
|
695
696
|
if (l.isFunction(r))
|
|
696
697
|
return r.call(this, a, n);
|
|
697
698
|
if (l.isRegExp(r))
|
|
@@ -703,7 +704,7 @@ class I {
|
|
|
703
704
|
has(e, r) {
|
|
704
705
|
if (e = _e(e), e) {
|
|
705
706
|
const n = l.findKey(this, e);
|
|
706
|
-
return !!(n && this[n] !== void 0 && (!r ||
|
|
707
|
+
return !!(n && this[n] !== void 0 && (!r || lt(this, this[n], n, r)));
|
|
707
708
|
}
|
|
708
709
|
return !1;
|
|
709
710
|
}
|
|
@@ -713,7 +714,7 @@ class I {
|
|
|
713
714
|
function i(o) {
|
|
714
715
|
if (o = _e(o), o) {
|
|
715
716
|
const c = l.findKey(n, o);
|
|
716
|
-
c && (!r ||
|
|
717
|
+
c && (!r || lt(n, n[c], c, r)) && (delete n[c], a = !0);
|
|
717
718
|
}
|
|
718
719
|
}
|
|
719
720
|
return l.isArray(e) ? e.forEach(i) : i(e), a;
|
|
@@ -723,7 +724,7 @@ class I {
|
|
|
723
724
|
let n = r.length, a = !1;
|
|
724
725
|
for (; n--; ) {
|
|
725
726
|
const i = r[n];
|
|
726
|
-
(!e ||
|
|
727
|
+
(!e || lt(this, this[i], i, e, !0)) && (delete this[i], a = !0);
|
|
727
728
|
}
|
|
728
729
|
return a;
|
|
729
730
|
}
|
|
@@ -732,11 +733,11 @@ class I {
|
|
|
732
733
|
return l.forEach(this, (a, i) => {
|
|
733
734
|
const o = l.findKey(n, i);
|
|
734
735
|
if (o) {
|
|
735
|
-
r[o] =
|
|
736
|
+
r[o] = Ve(a), delete r[i];
|
|
736
737
|
return;
|
|
737
738
|
}
|
|
738
|
-
const c = e ?
|
|
739
|
-
c !== i && delete r[i], r[c] =
|
|
739
|
+
const c = e ? Kr(i) : String(i).trim();
|
|
740
|
+
c !== i && delete r[i], r[c] = Ve(a), n[c] = !0;
|
|
740
741
|
}), this;
|
|
741
742
|
}
|
|
742
743
|
concat(...e) {
|
|
@@ -766,18 +767,18 @@ class I {
|
|
|
766
767
|
return r.forEach((a) => n.set(a)), n;
|
|
767
768
|
}
|
|
768
769
|
static accessor(e) {
|
|
769
|
-
const n = (this[
|
|
770
|
+
const n = (this[Ft] = this[Ft] = {
|
|
770
771
|
accessors: {}
|
|
771
772
|
}).accessors, a = this.prototype;
|
|
772
773
|
function i(o) {
|
|
773
774
|
const c = _e(o);
|
|
774
|
-
n[c] || (
|
|
775
|
+
n[c] || (Gr(a, o), n[c] = !0);
|
|
775
776
|
}
|
|
776
777
|
return l.isArray(e) ? e.forEach(i) : i(e), this;
|
|
777
778
|
}
|
|
778
779
|
}
|
|
779
|
-
|
|
780
|
-
l.reduceDescriptors(
|
|
780
|
+
U.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
781
|
+
l.reduceDescriptors(U.prototype, ({ value: s }, e) => {
|
|
781
782
|
let r = e[0].toUpperCase() + e.slice(1);
|
|
782
783
|
return {
|
|
783
784
|
get: () => s,
|
|
@@ -786,15 +787,15 @@ l.reduceDescriptors(I.prototype, ({ value: s }, e) => {
|
|
|
786
787
|
}
|
|
787
788
|
};
|
|
788
789
|
});
|
|
789
|
-
l.freezeMethods(
|
|
790
|
-
function
|
|
791
|
-
const r = this || qe, n = e || r, a =
|
|
790
|
+
l.freezeMethods(U);
|
|
791
|
+
function ht(s, e) {
|
|
792
|
+
const r = this || qe, n = e || r, a = U.from(n.headers);
|
|
792
793
|
let i = n.data;
|
|
793
794
|
return l.forEach(s, function(c) {
|
|
794
795
|
i = c.call(r, i, a.normalize(), e ? e.status : void 0);
|
|
795
796
|
}), a.normalize(), i;
|
|
796
797
|
}
|
|
797
|
-
function
|
|
798
|
+
function ws(s) {
|
|
798
799
|
return !!(s && s.__CANCEL__);
|
|
799
800
|
}
|
|
800
801
|
function be(s, e, r) {
|
|
@@ -803,7 +804,7 @@ function be(s, e, r) {
|
|
|
803
804
|
l.inherits(be, x, {
|
|
804
805
|
__CANCEL__: !0
|
|
805
806
|
});
|
|
806
|
-
function
|
|
807
|
+
function xs(s, e, r) {
|
|
807
808
|
const n = r.config.validateStatus;
|
|
808
809
|
!r.status || !n || n(r.status) ? s(r) : e(new x(
|
|
809
810
|
"Request failed with status code " + r.status,
|
|
@@ -813,11 +814,11 @@ function js(s, e, r) {
|
|
|
813
814
|
r
|
|
814
815
|
));
|
|
815
816
|
}
|
|
816
|
-
function
|
|
817
|
+
function Xr(s) {
|
|
817
818
|
const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(s);
|
|
818
819
|
return e && e[1] || "";
|
|
819
820
|
}
|
|
820
|
-
function
|
|
821
|
+
function Yr(s, e) {
|
|
821
822
|
s = s || 10;
|
|
822
823
|
const r = new Array(s), n = new Array(s);
|
|
823
824
|
let a = 0, i = 0, o;
|
|
@@ -829,11 +830,11 @@ function Gr(s, e) {
|
|
|
829
830
|
w += r[m++], m = m % s;
|
|
830
831
|
if (a = (a + 1) % s, a === i && (i = (i + 1) % s), u - o < e)
|
|
831
832
|
return;
|
|
832
|
-
const
|
|
833
|
-
return
|
|
833
|
+
const S = h && u - h;
|
|
834
|
+
return S ? Math.round(w * 1e3 / S) : void 0;
|
|
834
835
|
};
|
|
835
836
|
}
|
|
836
|
-
function
|
|
837
|
+
function en(s, e) {
|
|
837
838
|
let r = 0, n = 1e3 / e, a, i;
|
|
838
839
|
const o = (u, h = Date.now()) => {
|
|
839
840
|
r = h, a = null, i && (clearTimeout(i), i = null), s.apply(null, u);
|
|
@@ -847,8 +848,8 @@ function Xr(s, e) {
|
|
|
847
848
|
}
|
|
848
849
|
const He = (s, e, r = 3) => {
|
|
849
850
|
let n = 0;
|
|
850
|
-
const a =
|
|
851
|
-
return
|
|
851
|
+
const a = Yr(50, 250);
|
|
852
|
+
return en((i) => {
|
|
852
853
|
const o = i.loaded, c = i.lengthComputable ? i.total : void 0, d = o - n, u = a(d), h = o <= c;
|
|
853
854
|
n = o;
|
|
854
855
|
const m = {
|
|
@@ -864,18 +865,18 @@ const He = (s, e, r = 3) => {
|
|
|
864
865
|
};
|
|
865
866
|
s(m);
|
|
866
867
|
}, r);
|
|
867
|
-
},
|
|
868
|
+
}, $t = (s, e) => {
|
|
868
869
|
const r = s != null;
|
|
869
870
|
return [(n) => e[0]({
|
|
870
871
|
lengthComputable: r,
|
|
871
872
|
total: s,
|
|
872
873
|
loaded: n
|
|
873
874
|
}), e[1]];
|
|
874
|
-
},
|
|
875
|
+
}, Vt = (s) => (...e) => l.asap(() => s(...e)), tn = M.hasStandardBrowserEnv ? (
|
|
875
876
|
// Standard browser envs have full support of the APIs needed to test
|
|
876
877
|
// whether the request URL is of the same origin as current location.
|
|
877
878
|
function() {
|
|
878
|
-
const e = /(msie|trident)/i.test(navigator.userAgent), r = document.createElement("a");
|
|
879
|
+
const e = M.navigator && /(msie|trident)/i.test(M.navigator.userAgent), r = document.createElement("a");
|
|
879
880
|
let n;
|
|
880
881
|
function a(i) {
|
|
881
882
|
let o = i;
|
|
@@ -902,7 +903,7 @@ const He = (s, e, r = 3) => {
|
|
|
902
903
|
return !0;
|
|
903
904
|
};
|
|
904
905
|
}()
|
|
905
|
-
),
|
|
906
|
+
), sn = M.hasStandardBrowserEnv ? (
|
|
906
907
|
// Standard browser envs support document.cookie
|
|
907
908
|
{
|
|
908
909
|
write(s, e, r, n, a, i) {
|
|
@@ -929,17 +930,17 @@ const He = (s, e, r = 3) => {
|
|
|
929
930
|
}
|
|
930
931
|
}
|
|
931
932
|
);
|
|
932
|
-
function
|
|
933
|
+
function rn(s) {
|
|
933
934
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(s);
|
|
934
935
|
}
|
|
935
|
-
function
|
|
936
|
+
function nn(s, e) {
|
|
936
937
|
return e ? s.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : s;
|
|
937
938
|
}
|
|
938
|
-
function
|
|
939
|
-
return s && !
|
|
939
|
+
function ks(s, e) {
|
|
940
|
+
return s && !rn(e) ? nn(s, e) : e;
|
|
940
941
|
}
|
|
941
|
-
const
|
|
942
|
-
function
|
|
942
|
+
const Ht = (s) => s instanceof U ? { ...s } : s;
|
|
943
|
+
function oe(s, e) {
|
|
943
944
|
e = e || {};
|
|
944
945
|
const r = {};
|
|
945
946
|
function n(u, h, m) {
|
|
@@ -996,92 +997,92 @@ function ce(s, e) {
|
|
|
996
997
|
socketPath: o,
|
|
997
998
|
responseEncoding: o,
|
|
998
999
|
validateStatus: c,
|
|
999
|
-
headers: (u, h) => a(
|
|
1000
|
+
headers: (u, h) => a(Ht(u), Ht(h), !0)
|
|
1000
1001
|
};
|
|
1001
1002
|
return l.forEach(Object.keys(Object.assign({}, s, e)), function(h) {
|
|
1002
1003
|
const m = d[h] || a, w = m(s[h], e[h], h);
|
|
1003
1004
|
l.isUndefined(w) && m !== c || (r[h] = w);
|
|
1004
1005
|
}), r;
|
|
1005
1006
|
}
|
|
1006
|
-
const
|
|
1007
|
-
const e =
|
|
1007
|
+
const Ts = (s) => {
|
|
1008
|
+
const e = oe({}, s);
|
|
1008
1009
|
let { data: r, withXSRFToken: n, xsrfHeaderName: a, xsrfCookieName: i, headers: o, auth: c } = e;
|
|
1009
|
-
e.headers = o =
|
|
1010
|
+
e.headers = o = U.from(o), e.url = _s(ks(e.baseURL, e.url), s.params, s.paramsSerializer), c && o.set(
|
|
1010
1011
|
"Authorization",
|
|
1011
1012
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1012
1013
|
);
|
|
1013
1014
|
let d;
|
|
1014
1015
|
if (l.isFormData(r)) {
|
|
1015
|
-
if (
|
|
1016
|
+
if (M.hasStandardBrowserEnv || M.hasStandardBrowserWebWorkerEnv)
|
|
1016
1017
|
o.setContentType(void 0);
|
|
1017
1018
|
else if ((d = o.getContentType()) !== !1) {
|
|
1018
1019
|
const [u, ...h] = d ? d.split(";").map((m) => m.trim()).filter(Boolean) : [];
|
|
1019
1020
|
o.setContentType([u || "multipart/form-data", ...h].join("; "));
|
|
1020
1021
|
}
|
|
1021
1022
|
}
|
|
1022
|
-
if (
|
|
1023
|
-
const u = a && i &&
|
|
1023
|
+
if (M.hasStandardBrowserEnv && (n && l.isFunction(n) && (n = n(e)), n || n !== !1 && tn(e.url))) {
|
|
1024
|
+
const u = a && i && sn.read(i);
|
|
1024
1025
|
u && o.set(a, u);
|
|
1025
1026
|
}
|
|
1026
1027
|
return e;
|
|
1027
|
-
},
|
|
1028
|
+
}, an = typeof XMLHttpRequest < "u", on = an && function(s) {
|
|
1028
1029
|
return new Promise(function(r, n) {
|
|
1029
|
-
const a =
|
|
1030
|
+
const a = Ts(s);
|
|
1030
1031
|
let i = a.data;
|
|
1031
|
-
const o =
|
|
1032
|
-
let { responseType: c, onUploadProgress: d, onDownloadProgress: u } = a, h, m, w,
|
|
1032
|
+
const o = U.from(a.headers).normalize();
|
|
1033
|
+
let { responseType: c, onUploadProgress: d, onDownloadProgress: u } = a, h, m, w, S, _;
|
|
1033
1034
|
function E() {
|
|
1034
|
-
|
|
1035
|
+
S && S(), _ && _(), a.cancelToken && a.cancelToken.unsubscribe(h), a.signal && a.signal.removeEventListener("abort", h);
|
|
1035
1036
|
}
|
|
1036
1037
|
let y = new XMLHttpRequest();
|
|
1037
1038
|
y.open(a.method.toUpperCase(), a.url, !0), y.timeout = a.timeout;
|
|
1038
|
-
function
|
|
1039
|
+
function I() {
|
|
1039
1040
|
if (!y)
|
|
1040
1041
|
return;
|
|
1041
|
-
const
|
|
1042
|
+
const A = U.from(
|
|
1042
1043
|
"getAllResponseHeaders" in y && y.getAllResponseHeaders()
|
|
1043
|
-
),
|
|
1044
|
+
), J = {
|
|
1044
1045
|
data: !c || c === "text" || c === "json" ? y.responseText : y.response,
|
|
1045
1046
|
status: y.status,
|
|
1046
1047
|
statusText: y.statusText,
|
|
1047
|
-
headers:
|
|
1048
|
+
headers: A,
|
|
1048
1049
|
config: s,
|
|
1049
1050
|
request: y
|
|
1050
1051
|
};
|
|
1051
|
-
|
|
1052
|
-
r(
|
|
1053
|
-
}, function(
|
|
1054
|
-
n(
|
|
1055
|
-
},
|
|
1052
|
+
xs(function(B) {
|
|
1053
|
+
r(B), E();
|
|
1054
|
+
}, function(B) {
|
|
1055
|
+
n(B), E();
|
|
1056
|
+
}, J), y = null;
|
|
1056
1057
|
}
|
|
1057
|
-
"onloadend" in y ? y.onloadend =
|
|
1058
|
-
!y || y.readyState !== 4 || y.status === 0 && !(y.responseURL && y.responseURL.indexOf("file:") === 0) || setTimeout(
|
|
1058
|
+
"onloadend" in y ? y.onloadend = I : y.onreadystatechange = function() {
|
|
1059
|
+
!y || y.readyState !== 4 || y.status === 0 && !(y.responseURL && y.responseURL.indexOf("file:") === 0) || setTimeout(I);
|
|
1059
1060
|
}, y.onabort = function() {
|
|
1060
1061
|
y && (n(new x("Request aborted", x.ECONNABORTED, s, y)), y = null);
|
|
1061
1062
|
}, y.onerror = function() {
|
|
1062
1063
|
n(new x("Network Error", x.ERR_NETWORK, s, y)), y = null;
|
|
1063
1064
|
}, y.ontimeout = function() {
|
|
1064
|
-
let
|
|
1065
|
-
const
|
|
1066
|
-
a.timeoutErrorMessage && (
|
|
1067
|
-
|
|
1068
|
-
|
|
1065
|
+
let N = a.timeout ? "timeout of " + a.timeout + "ms exceeded" : "timeout exceeded";
|
|
1066
|
+
const J = a.transitional || vs;
|
|
1067
|
+
a.timeoutErrorMessage && (N = a.timeoutErrorMessage), n(new x(
|
|
1068
|
+
N,
|
|
1069
|
+
J.clarifyTimeoutError ? x.ETIMEDOUT : x.ECONNABORTED,
|
|
1069
1070
|
s,
|
|
1070
1071
|
y
|
|
1071
1072
|
)), y = null;
|
|
1072
|
-
}, i === void 0 && o.setContentType(null), "setRequestHeader" in y && l.forEach(o.toJSON(), function(
|
|
1073
|
-
y.setRequestHeader(
|
|
1074
|
-
}), l.isUndefined(a.withCredentials) || (y.withCredentials = !!a.withCredentials), c && c !== "json" && (y.responseType = a.responseType), u && ([w, _] = He(u, !0), y.addEventListener("progress", w)), d && y.upload && ([m,
|
|
1075
|
-
y && (n(!
|
|
1073
|
+
}, i === void 0 && o.setContentType(null), "setRequestHeader" in y && l.forEach(o.toJSON(), function(N, J) {
|
|
1074
|
+
y.setRequestHeader(J, N);
|
|
1075
|
+
}), l.isUndefined(a.withCredentials) || (y.withCredentials = !!a.withCredentials), c && c !== "json" && (y.responseType = a.responseType), u && ([w, _] = He(u, !0), y.addEventListener("progress", w)), d && y.upload && ([m, S] = He(d), y.upload.addEventListener("progress", m), y.upload.addEventListener("loadend", S)), (a.cancelToken || a.signal) && (h = (A) => {
|
|
1076
|
+
y && (n(!A || A.type ? new be(null, s, y) : A), y.abort(), y = null);
|
|
1076
1077
|
}, a.cancelToken && a.cancelToken.subscribe(h), a.signal && (a.signal.aborted ? h() : a.signal.addEventListener("abort", h)));
|
|
1077
|
-
const
|
|
1078
|
-
if (
|
|
1079
|
-
n(new x("Unsupported protocol " +
|
|
1078
|
+
const Z = Xr(a.url);
|
|
1079
|
+
if (Z && M.protocols.indexOf(Z) === -1) {
|
|
1080
|
+
n(new x("Unsupported protocol " + Z + ":", x.ERR_BAD_REQUEST, s));
|
|
1080
1081
|
return;
|
|
1081
1082
|
}
|
|
1082
1083
|
y.send(i || null);
|
|
1083
1084
|
});
|
|
1084
|
-
},
|
|
1085
|
+
}, cn = (s, e) => {
|
|
1085
1086
|
let r = new AbortController(), n;
|
|
1086
1087
|
const a = function(d) {
|
|
1087
1088
|
if (!n) {
|
|
@@ -1103,7 +1104,7 @@ const xs = (s) => {
|
|
|
1103
1104
|
return c.unsubscribe = o, [c, () => {
|
|
1104
1105
|
i && clearTimeout(i), i = null;
|
|
1105
1106
|
}];
|
|
1106
|
-
},
|
|
1107
|
+
}, un = function* (s, e) {
|
|
1107
1108
|
let r = s.byteLength;
|
|
1108
1109
|
if (!e || r < e) {
|
|
1109
1110
|
yield s;
|
|
@@ -1112,11 +1113,11 @@ const xs = (s) => {
|
|
|
1112
1113
|
let n = 0, a;
|
|
1113
1114
|
for (; n < r; )
|
|
1114
1115
|
a = n + e, yield s.slice(n, a), n = a;
|
|
1115
|
-
},
|
|
1116
|
+
}, dn = async function* (s, e, r) {
|
|
1116
1117
|
for await (const n of s)
|
|
1117
|
-
yield*
|
|
1118
|
-
},
|
|
1119
|
-
const i =
|
|
1118
|
+
yield* un(ArrayBuffer.isView(n) ? n : await r(String(n)), e);
|
|
1119
|
+
}, Wt = (s, e, r, n, a) => {
|
|
1120
|
+
const i = dn(s, e, a);
|
|
1120
1121
|
let o = 0, c, d = (u) => {
|
|
1121
1122
|
c || (c = !0, n && n(u));
|
|
1122
1123
|
};
|
|
@@ -1130,8 +1131,8 @@ const xs = (s) => {
|
|
|
1130
1131
|
}
|
|
1131
1132
|
let w = m.byteLength;
|
|
1132
1133
|
if (r) {
|
|
1133
|
-
let
|
|
1134
|
-
r(
|
|
1134
|
+
let S = o += w;
|
|
1135
|
+
r(S);
|
|
1135
1136
|
}
|
|
1136
1137
|
u.enqueue(new Uint8Array(m));
|
|
1137
1138
|
} catch (h) {
|
|
@@ -1144,15 +1145,15 @@ const xs = (s) => {
|
|
|
1144
1145
|
}, {
|
|
1145
1146
|
highWaterMark: 2
|
|
1146
1147
|
});
|
|
1147
|
-
}, it = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function",
|
|
1148
|
+
}, it = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Es = it && typeof ReadableStream == "function", vt = it && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((s) => (e) => s.encode(e))(new TextEncoder()) : async (s) => new Uint8Array(await new Response(s).arrayBuffer())), Rs = (s, ...e) => {
|
|
1148
1149
|
try {
|
|
1149
1150
|
return !!s(...e);
|
|
1150
1151
|
} catch {
|
|
1151
1152
|
return !1;
|
|
1152
1153
|
}
|
|
1153
|
-
},
|
|
1154
|
+
}, ln = Es && Rs(() => {
|
|
1154
1155
|
let s = !1;
|
|
1155
|
-
const e = new Request(
|
|
1156
|
+
const e = new Request(M.origin, {
|
|
1156
1157
|
body: new ReadableStream(),
|
|
1157
1158
|
method: "POST",
|
|
1158
1159
|
get duplex() {
|
|
@@ -1160,8 +1161,8 @@ const xs = (s) => {
|
|
|
1160
1161
|
}
|
|
1161
1162
|
}).headers.has("Content-Type");
|
|
1162
1163
|
return s && !e;
|
|
1163
|
-
}),
|
|
1164
|
-
stream:
|
|
1164
|
+
}), Qt = 64 * 1024, jt = Es && Rs(() => l.isReadableStream(new Response("").body)), We = {
|
|
1165
|
+
stream: jt && ((s) => s.body)
|
|
1165
1166
|
};
|
|
1166
1167
|
it && ((s) => {
|
|
1167
1168
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((e) => {
|
|
@@ -1170,7 +1171,7 @@ it && ((s) => {
|
|
|
1170
1171
|
});
|
|
1171
1172
|
});
|
|
1172
1173
|
})(new Response());
|
|
1173
|
-
const
|
|
1174
|
+
const hn = async (s) => {
|
|
1174
1175
|
if (s == null)
|
|
1175
1176
|
return 0;
|
|
1176
1177
|
if (l.isBlob(s))
|
|
@@ -1180,11 +1181,11 @@ const dn = async (s) => {
|
|
|
1180
1181
|
if (l.isArrayBufferView(s) || l.isArrayBuffer(s))
|
|
1181
1182
|
return s.byteLength;
|
|
1182
1183
|
if (l.isURLSearchParams(s) && (s = s + ""), l.isString(s))
|
|
1183
|
-
return (await
|
|
1184
|
-
},
|
|
1184
|
+
return (await vt(s)).byteLength;
|
|
1185
|
+
}, pn = async (s, e) => {
|
|
1185
1186
|
const r = l.toFiniteNumber(s.getContentLength());
|
|
1186
|
-
return r ??
|
|
1187
|
-
},
|
|
1187
|
+
return r ?? hn(e);
|
|
1188
|
+
}, mn = it && (async (s) => {
|
|
1188
1189
|
let {
|
|
1189
1190
|
url: e,
|
|
1190
1191
|
method: r,
|
|
@@ -1198,83 +1199,85 @@ const dn = async (s) => {
|
|
|
1198
1199
|
headers: h,
|
|
1199
1200
|
withCredentials: m = "same-origin",
|
|
1200
1201
|
fetchOptions: w
|
|
1201
|
-
} =
|
|
1202
|
+
} = Ts(s);
|
|
1202
1203
|
u = u ? (u + "").toLowerCase() : "text";
|
|
1203
|
-
let [
|
|
1204
|
-
const
|
|
1204
|
+
let [S, _] = a || i || o ? cn([a, i], o) : [], E, y;
|
|
1205
|
+
const I = () => {
|
|
1205
1206
|
!E && setTimeout(() => {
|
|
1206
|
-
|
|
1207
|
+
S && S.unsubscribe();
|
|
1207
1208
|
}), E = !0;
|
|
1208
1209
|
};
|
|
1209
|
-
let
|
|
1210
|
+
let Z;
|
|
1210
1211
|
try {
|
|
1211
|
-
if (d &&
|
|
1212
|
-
let
|
|
1212
|
+
if (d && ln && r !== "get" && r !== "head" && (Z = await pn(h, n)) !== 0) {
|
|
1213
|
+
let B = new Request(e, {
|
|
1213
1214
|
method: "POST",
|
|
1214
1215
|
body: n,
|
|
1215
1216
|
duplex: "half"
|
|
1216
|
-
}),
|
|
1217
|
-
if (l.isFormData(n) && (
|
|
1218
|
-
const [
|
|
1219
|
-
|
|
1220
|
-
He(
|
|
1217
|
+
}), de;
|
|
1218
|
+
if (l.isFormData(n) && (de = B.headers.get("content-type")) && h.setContentType(de), B.body) {
|
|
1219
|
+
const [ut, Le] = $t(
|
|
1220
|
+
Z,
|
|
1221
|
+
He(Vt(d))
|
|
1221
1222
|
);
|
|
1222
|
-
n =
|
|
1223
|
+
n = Wt(B.body, Qt, ut, Le, vt);
|
|
1223
1224
|
}
|
|
1224
1225
|
}
|
|
1225
|
-
l.isString(m) || (m = m ? "include" : "omit")
|
|
1226
|
+
l.isString(m) || (m = m ? "include" : "omit");
|
|
1227
|
+
const A = "credentials" in Request.prototype;
|
|
1228
|
+
y = new Request(e, {
|
|
1226
1229
|
...w,
|
|
1227
|
-
signal:
|
|
1230
|
+
signal: S,
|
|
1228
1231
|
method: r.toUpperCase(),
|
|
1229
1232
|
headers: h.normalize().toJSON(),
|
|
1230
1233
|
body: n,
|
|
1231
1234
|
duplex: "half",
|
|
1232
|
-
credentials: m
|
|
1235
|
+
credentials: A ? m : void 0
|
|
1233
1236
|
});
|
|
1234
|
-
let
|
|
1235
|
-
const
|
|
1236
|
-
if (
|
|
1237
|
-
const
|
|
1238
|
-
["status", "statusText", "headers"].forEach((
|
|
1239
|
-
|
|
1237
|
+
let N = await fetch(y);
|
|
1238
|
+
const J = jt && (u === "stream" || u === "response");
|
|
1239
|
+
if (jt && (c || J)) {
|
|
1240
|
+
const B = {};
|
|
1241
|
+
["status", "statusText", "headers"].forEach((Zt) => {
|
|
1242
|
+
B[Zt] = N[Zt];
|
|
1240
1243
|
});
|
|
1241
|
-
const
|
|
1242
|
-
|
|
1243
|
-
He(
|
|
1244
|
+
const de = l.toFiniteNumber(N.headers.get("content-length")), [ut, Le] = c && $t(
|
|
1245
|
+
de,
|
|
1246
|
+
He(Vt(c), !0)
|
|
1244
1247
|
) || [];
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
Le && Le(),
|
|
1248
|
-
},
|
|
1249
|
-
|
|
1248
|
+
N = new Response(
|
|
1249
|
+
Wt(N.body, Qt, ut, () => {
|
|
1250
|
+
Le && Le(), J && I();
|
|
1251
|
+
}, vt),
|
|
1252
|
+
B
|
|
1250
1253
|
);
|
|
1251
1254
|
}
|
|
1252
1255
|
u = u || "text";
|
|
1253
|
-
let
|
|
1254
|
-
return !
|
|
1255
|
-
|
|
1256
|
-
data:
|
|
1257
|
-
headers:
|
|
1258
|
-
status:
|
|
1259
|
-
statusText:
|
|
1256
|
+
let ct = await We[l.findKey(We, u) || "text"](N, s);
|
|
1257
|
+
return !J && I(), _ && _(), await new Promise((B, de) => {
|
|
1258
|
+
xs(B, de, {
|
|
1259
|
+
data: ct,
|
|
1260
|
+
headers: U.from(N.headers),
|
|
1261
|
+
status: N.status,
|
|
1262
|
+
statusText: N.statusText,
|
|
1260
1263
|
config: s,
|
|
1261
1264
|
request: y
|
|
1262
1265
|
});
|
|
1263
1266
|
});
|
|
1264
|
-
} catch (
|
|
1265
|
-
throw
|
|
1267
|
+
} catch (A) {
|
|
1268
|
+
throw I(), A && A.name === "TypeError" && /fetch/i.test(A.message) ? Object.assign(
|
|
1266
1269
|
new x("Network Error", x.ERR_NETWORK, s, y),
|
|
1267
1270
|
{
|
|
1268
|
-
cause:
|
|
1271
|
+
cause: A.cause || A
|
|
1269
1272
|
}
|
|
1270
|
-
) : x.from(
|
|
1273
|
+
) : x.from(A, A && A.code, s, y);
|
|
1271
1274
|
}
|
|
1272
|
-
}),
|
|
1273
|
-
http:
|
|
1274
|
-
xhr:
|
|
1275
|
-
fetch:
|
|
1275
|
+
}), wt = {
|
|
1276
|
+
http: Pr,
|
|
1277
|
+
xhr: on,
|
|
1278
|
+
fetch: mn
|
|
1276
1279
|
};
|
|
1277
|
-
l.forEach(
|
|
1280
|
+
l.forEach(wt, (s, e) => {
|
|
1278
1281
|
if (s) {
|
|
1279
1282
|
try {
|
|
1280
1283
|
Object.defineProperty(s, "name", { value: e });
|
|
@@ -1283,7 +1286,7 @@ l.forEach(vt, (s, e) => {
|
|
|
1283
1286
|
Object.defineProperty(s, "adapterName", { value: e });
|
|
1284
1287
|
}
|
|
1285
1288
|
});
|
|
1286
|
-
const
|
|
1289
|
+
const Jt = (s) => `- ${s}`, fn = (s) => l.isFunction(s) || s === null || s === !1, Ss = {
|
|
1287
1290
|
getAdapter: (s) => {
|
|
1288
1291
|
s = l.isArray(s) ? s : [s];
|
|
1289
1292
|
const { length: e } = s;
|
|
@@ -1292,7 +1295,7 @@ const Wt = (s) => `- ${s}`, pn = (s) => l.isFunction(s) || s === null || s === !
|
|
|
1292
1295
|
for (let i = 0; i < e; i++) {
|
|
1293
1296
|
r = s[i];
|
|
1294
1297
|
let o;
|
|
1295
|
-
if (n = r, !
|
|
1298
|
+
if (n = r, !fn(r) && (n = wt[(o = String(r)).toLowerCase()], n === void 0))
|
|
1296
1299
|
throw new x(`Unknown adapter '${o}'`);
|
|
1297
1300
|
if (n)
|
|
1298
1301
|
break;
|
|
@@ -1303,8 +1306,8 @@ const Wt = (s) => `- ${s}`, pn = (s) => l.isFunction(s) || s === null || s === !
|
|
|
1303
1306
|
([c, d]) => `adapter ${c} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1304
1307
|
);
|
|
1305
1308
|
let o = e ? i.length > 1 ? `since :
|
|
1306
|
-
` + i.map(
|
|
1307
|
-
`) : " " +
|
|
1309
|
+
` + i.map(Jt).join(`
|
|
1310
|
+
`) : " " + Jt(i[0]) : "as no adapter specified";
|
|
1308
1311
|
throw new x(
|
|
1309
1312
|
"There is no suitable adapter to dispatch the request " + o,
|
|
1310
1313
|
"ERR_NOT_SUPPORT"
|
|
@@ -1312,40 +1315,40 @@ const Wt = (s) => `- ${s}`, pn = (s) => l.isFunction(s) || s === null || s === !
|
|
|
1312
1315
|
}
|
|
1313
1316
|
return n;
|
|
1314
1317
|
},
|
|
1315
|
-
adapters:
|
|
1318
|
+
adapters: wt
|
|
1316
1319
|
};
|
|
1317
|
-
function
|
|
1320
|
+
function pt(s) {
|
|
1318
1321
|
if (s.cancelToken && s.cancelToken.throwIfRequested(), s.signal && s.signal.aborted)
|
|
1319
1322
|
throw new be(null, s);
|
|
1320
1323
|
}
|
|
1321
|
-
function
|
|
1322
|
-
return
|
|
1324
|
+
function Kt(s) {
|
|
1325
|
+
return pt(s), s.headers = U.from(s.headers), s.data = ht.call(
|
|
1323
1326
|
s,
|
|
1324
1327
|
s.transformRequest
|
|
1325
|
-
), ["post", "put", "patch"].indexOf(s.method) !== -1 && s.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1326
|
-
return
|
|
1328
|
+
), ["post", "put", "patch"].indexOf(s.method) !== -1 && s.headers.setContentType("application/x-www-form-urlencoded", !1), Ss.getAdapter(s.adapter || qe.adapter)(s).then(function(n) {
|
|
1329
|
+
return pt(s), n.data = ht.call(
|
|
1327
1330
|
s,
|
|
1328
1331
|
s.transformResponse,
|
|
1329
1332
|
n
|
|
1330
|
-
), n.headers =
|
|
1333
|
+
), n.headers = U.from(n.headers), n;
|
|
1331
1334
|
}, function(n) {
|
|
1332
|
-
return
|
|
1335
|
+
return ws(n) || (pt(s), n && n.response && (n.response.data = ht.call(
|
|
1333
1336
|
s,
|
|
1334
1337
|
s.transformResponse,
|
|
1335
1338
|
n.response
|
|
1336
|
-
), n.response.headers =
|
|
1339
|
+
), n.response.headers = U.from(n.response.headers))), Promise.reject(n);
|
|
1337
1340
|
});
|
|
1338
1341
|
}
|
|
1339
|
-
const
|
|
1342
|
+
const As = "1.7.5", Ct = {};
|
|
1340
1343
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((s, e) => {
|
|
1341
|
-
|
|
1344
|
+
Ct[s] = function(n) {
|
|
1342
1345
|
return typeof n === s || "a" + (e < 1 ? "n " : " ") + s;
|
|
1343
1346
|
};
|
|
1344
1347
|
});
|
|
1345
|
-
const
|
|
1346
|
-
|
|
1348
|
+
const Gt = {};
|
|
1349
|
+
Ct.transitional = function(e, r, n) {
|
|
1347
1350
|
function a(i, o) {
|
|
1348
|
-
return "[Axios v" +
|
|
1351
|
+
return "[Axios v" + As + "] Transitional option '" + i + "'" + o + (n ? ". " + n : "");
|
|
1349
1352
|
}
|
|
1350
1353
|
return (i, o, c) => {
|
|
1351
1354
|
if (e === !1)
|
|
@@ -1353,7 +1356,7 @@ Nt.transitional = function(e, r, n) {
|
|
|
1353
1356
|
a(o, " has been removed" + (r ? " in " + r : "")),
|
|
1354
1357
|
x.ERR_DEPRECATED
|
|
1355
1358
|
);
|
|
1356
|
-
return r && !
|
|
1359
|
+
return r && !Gt[o] && (Gt[o] = !0, console.warn(
|
|
1357
1360
|
a(
|
|
1358
1361
|
o,
|
|
1359
1362
|
" has been deprecated since v" + r + " and will be removed in the near future"
|
|
@@ -1361,7 +1364,7 @@ Nt.transitional = function(e, r, n) {
|
|
|
1361
1364
|
)), e ? e(i, o, c) : !0;
|
|
1362
1365
|
};
|
|
1363
1366
|
};
|
|
1364
|
-
function
|
|
1367
|
+
function gn(s, e, r) {
|
|
1365
1368
|
if (typeof s != "object")
|
|
1366
1369
|
throw new x("options must be an object", x.ERR_BAD_OPTION_VALUE);
|
|
1367
1370
|
const n = Object.keys(s);
|
|
@@ -1378,15 +1381,15 @@ function mn(s, e, r) {
|
|
|
1378
1381
|
throw new x("Unknown option " + i, x.ERR_BAD_OPTION);
|
|
1379
1382
|
}
|
|
1380
1383
|
}
|
|
1381
|
-
const
|
|
1382
|
-
assertOptions:
|
|
1383
|
-
validators:
|
|
1384
|
-
}, X =
|
|
1385
|
-
class
|
|
1384
|
+
const xt = {
|
|
1385
|
+
assertOptions: gn,
|
|
1386
|
+
validators: Ct
|
|
1387
|
+
}, X = xt.validators;
|
|
1388
|
+
class ae {
|
|
1386
1389
|
constructor(e) {
|
|
1387
1390
|
this.defaults = e, this.interceptors = {
|
|
1388
|
-
request: new
|
|
1389
|
-
response: new
|
|
1391
|
+
request: new Dt(),
|
|
1392
|
+
response: new Dt()
|
|
1390
1393
|
};
|
|
1391
1394
|
}
|
|
1392
1395
|
/**
|
|
@@ -1415,15 +1418,15 @@ class ie {
|
|
|
1415
1418
|
}
|
|
1416
1419
|
}
|
|
1417
1420
|
_request(e, r) {
|
|
1418
|
-
typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r =
|
|
1421
|
+
typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r = oe(this.defaults, r);
|
|
1419
1422
|
const { transitional: n, paramsSerializer: a, headers: i } = r;
|
|
1420
|
-
n !== void 0 &&
|
|
1423
|
+
n !== void 0 && xt.assertOptions(n, {
|
|
1421
1424
|
silentJSONParsing: X.transitional(X.boolean),
|
|
1422
1425
|
forcedJSONParsing: X.transitional(X.boolean),
|
|
1423
1426
|
clarifyTimeoutError: X.transitional(X.boolean)
|
|
1424
1427
|
}, !1), a != null && (l.isFunction(a) ? r.paramsSerializer = {
|
|
1425
1428
|
serialize: a
|
|
1426
|
-
} :
|
|
1429
|
+
} : xt.assertOptions(a, {
|
|
1427
1430
|
encode: X.function,
|
|
1428
1431
|
serialize: X.function
|
|
1429
1432
|
}, !0)), r.method = (r.method || this.defaults.method || "get").toLowerCase();
|
|
@@ -1436,7 +1439,7 @@ class ie {
|
|
|
1436
1439
|
(_) => {
|
|
1437
1440
|
delete i[_];
|
|
1438
1441
|
}
|
|
1439
|
-
), r.headers =
|
|
1442
|
+
), r.headers = U.concat(o, i);
|
|
1440
1443
|
const c = [];
|
|
1441
1444
|
let d = !0;
|
|
1442
1445
|
this.interceptors.request.forEach(function(E) {
|
|
@@ -1448,24 +1451,24 @@ class ie {
|
|
|
1448
1451
|
});
|
|
1449
1452
|
let h, m = 0, w;
|
|
1450
1453
|
if (!d) {
|
|
1451
|
-
const _ = [
|
|
1454
|
+
const _ = [Kt.bind(this), void 0];
|
|
1452
1455
|
for (_.unshift.apply(_, c), _.push.apply(_, u), w = _.length, h = Promise.resolve(r); m < w; )
|
|
1453
1456
|
h = h.then(_[m++], _[m++]);
|
|
1454
1457
|
return h;
|
|
1455
1458
|
}
|
|
1456
1459
|
w = c.length;
|
|
1457
|
-
let
|
|
1460
|
+
let S = r;
|
|
1458
1461
|
for (m = 0; m < w; ) {
|
|
1459
1462
|
const _ = c[m++], E = c[m++];
|
|
1460
1463
|
try {
|
|
1461
|
-
|
|
1464
|
+
S = _(S);
|
|
1462
1465
|
} catch (y) {
|
|
1463
1466
|
E.call(this, y);
|
|
1464
1467
|
break;
|
|
1465
1468
|
}
|
|
1466
1469
|
}
|
|
1467
1470
|
try {
|
|
1468
|
-
h =
|
|
1471
|
+
h = Kt.call(this, S);
|
|
1469
1472
|
} catch (_) {
|
|
1470
1473
|
return Promise.reject(_);
|
|
1471
1474
|
}
|
|
@@ -1474,14 +1477,14 @@ class ie {
|
|
|
1474
1477
|
return h;
|
|
1475
1478
|
}
|
|
1476
1479
|
getUri(e) {
|
|
1477
|
-
e =
|
|
1478
|
-
const r =
|
|
1479
|
-
return
|
|
1480
|
+
e = oe(this.defaults, e);
|
|
1481
|
+
const r = ks(e.baseURL, e.url);
|
|
1482
|
+
return _s(r, e.params, e.paramsSerializer);
|
|
1480
1483
|
}
|
|
1481
1484
|
}
|
|
1482
1485
|
l.forEach(["delete", "get", "head", "options"], function(e) {
|
|
1483
|
-
|
|
1484
|
-
return this.request(
|
|
1486
|
+
ae.prototype[e] = function(r, n) {
|
|
1487
|
+
return this.request(oe(n || {}, {
|
|
1485
1488
|
method: e,
|
|
1486
1489
|
url: r,
|
|
1487
1490
|
data: (n || {}).data
|
|
@@ -1491,7 +1494,7 @@ l.forEach(["delete", "get", "head", "options"], function(e) {
|
|
|
1491
1494
|
l.forEach(["post", "put", "patch"], function(e) {
|
|
1492
1495
|
function r(n) {
|
|
1493
1496
|
return function(i, o, c) {
|
|
1494
|
-
return this.request(
|
|
1497
|
+
return this.request(oe(c || {}, {
|
|
1495
1498
|
method: e,
|
|
1496
1499
|
headers: n ? {
|
|
1497
1500
|
"Content-Type": "multipart/form-data"
|
|
@@ -1501,9 +1504,9 @@ l.forEach(["post", "put", "patch"], function(e) {
|
|
|
1501
1504
|
}));
|
|
1502
1505
|
};
|
|
1503
1506
|
}
|
|
1504
|
-
|
|
1507
|
+
ae.prototype[e] = r(), ae.prototype[e + "Form"] = r(!0);
|
|
1505
1508
|
});
|
|
1506
|
-
class
|
|
1509
|
+
class It {
|
|
1507
1510
|
constructor(e) {
|
|
1508
1511
|
if (typeof e != "function")
|
|
1509
1512
|
throw new TypeError("executor must be a function.");
|
|
@@ -1563,22 +1566,22 @@ class Ct {
|
|
|
1563
1566
|
static source() {
|
|
1564
1567
|
let e;
|
|
1565
1568
|
return {
|
|
1566
|
-
token: new
|
|
1569
|
+
token: new It(function(a) {
|
|
1567
1570
|
e = a;
|
|
1568
1571
|
}),
|
|
1569
1572
|
cancel: e
|
|
1570
1573
|
};
|
|
1571
1574
|
}
|
|
1572
1575
|
}
|
|
1573
|
-
function
|
|
1576
|
+
function yn(s) {
|
|
1574
1577
|
return function(r) {
|
|
1575
1578
|
return s.apply(null, r);
|
|
1576
1579
|
};
|
|
1577
1580
|
}
|
|
1578
|
-
function
|
|
1581
|
+
function bn(s) {
|
|
1579
1582
|
return l.isObject(s) && s.isAxiosError === !0;
|
|
1580
1583
|
}
|
|
1581
|
-
const
|
|
1584
|
+
const kt = {
|
|
1582
1585
|
Continue: 100,
|
|
1583
1586
|
SwitchingProtocols: 101,
|
|
1584
1587
|
Processing: 102,
|
|
@@ -1643,35 +1646,35 @@ const wt = {
|
|
|
1643
1646
|
NotExtended: 510,
|
|
1644
1647
|
NetworkAuthenticationRequired: 511
|
|
1645
1648
|
};
|
|
1646
|
-
Object.entries(
|
|
1647
|
-
|
|
1649
|
+
Object.entries(kt).forEach(([s, e]) => {
|
|
1650
|
+
kt[e] = s;
|
|
1648
1651
|
});
|
|
1649
|
-
function
|
|
1650
|
-
const e = new
|
|
1651
|
-
return l.extend(r,
|
|
1652
|
-
return
|
|
1652
|
+
function Ps(s) {
|
|
1653
|
+
const e = new ae(s), r = os(ae.prototype.request, e);
|
|
1654
|
+
return l.extend(r, ae.prototype, e, { allOwnKeys: !0 }), l.extend(r, e, null, { allOwnKeys: !0 }), r.create = function(a) {
|
|
1655
|
+
return Ps(oe(s, a));
|
|
1653
1656
|
}, r;
|
|
1654
1657
|
}
|
|
1655
|
-
const
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1658
|
+
const O = Ps(qe);
|
|
1659
|
+
O.Axios = ae;
|
|
1660
|
+
O.CanceledError = be;
|
|
1661
|
+
O.CancelToken = It;
|
|
1662
|
+
O.isCancel = ws;
|
|
1663
|
+
O.VERSION = As;
|
|
1664
|
+
O.toFormData = at;
|
|
1665
|
+
O.AxiosError = x;
|
|
1666
|
+
O.Cancel = O.CanceledError;
|
|
1667
|
+
O.all = function(e) {
|
|
1665
1668
|
return Promise.all(e);
|
|
1666
1669
|
};
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1670
|
+
O.spread = yn;
|
|
1671
|
+
O.isAxiosError = bn;
|
|
1672
|
+
O.mergeConfig = oe;
|
|
1673
|
+
O.AxiosHeaders = U;
|
|
1674
|
+
O.formToJSON = (s) => js(l.isHTMLForm(s) ? new FormData(s) : s);
|
|
1675
|
+
O.getAdapter = Ss.getAdapter;
|
|
1676
|
+
O.HttpStatusCode = kt;
|
|
1677
|
+
O.default = O;
|
|
1675
1678
|
var R;
|
|
1676
1679
|
(function(s) {
|
|
1677
1680
|
s.assertEqual = (a) => a;
|
|
@@ -1708,14 +1711,14 @@ var R;
|
|
|
1708
1711
|
}
|
|
1709
1712
|
s.joinValues = n, s.jsonStringifyReplacer = (a, i) => typeof i == "bigint" ? i.toString() : i;
|
|
1710
1713
|
})(R || (R = {}));
|
|
1711
|
-
var
|
|
1714
|
+
var Tt;
|
|
1712
1715
|
(function(s) {
|
|
1713
1716
|
s.mergeShapes = (e, r) => ({
|
|
1714
1717
|
...e,
|
|
1715
1718
|
...r
|
|
1716
1719
|
// second overwrites first
|
|
1717
1720
|
});
|
|
1718
|
-
})(
|
|
1721
|
+
})(Tt || (Tt = {}));
|
|
1719
1722
|
const g = R.arrayToEnum([
|
|
1720
1723
|
"string",
|
|
1721
1724
|
"nan",
|
|
@@ -1775,8 +1778,8 @@ const g = R.arrayToEnum([
|
|
|
1775
1778
|
"invalid_intersection_types",
|
|
1776
1779
|
"not_multiple_of",
|
|
1777
1780
|
"not_finite"
|
|
1778
|
-
]),
|
|
1779
|
-
class
|
|
1781
|
+
]), _n = (s) => JSON.stringify(s, null, 2).replace(/"([^"]+)":/g, "$1:");
|
|
1782
|
+
class L extends Error {
|
|
1780
1783
|
constructor(e) {
|
|
1781
1784
|
super(), this.issues = [], this.addIssue = (n) => {
|
|
1782
1785
|
this.issues = [...this.issues, n];
|
|
@@ -1813,7 +1816,7 @@ class q extends Error {
|
|
|
1813
1816
|
return a(this), n;
|
|
1814
1817
|
}
|
|
1815
1818
|
static assert(e) {
|
|
1816
|
-
if (!(e instanceof
|
|
1819
|
+
if (!(e instanceof L))
|
|
1817
1820
|
throw new Error(`Not a ZodError: ${e}`);
|
|
1818
1821
|
}
|
|
1819
1822
|
toString() {
|
|
@@ -1835,7 +1838,7 @@ class q extends Error {
|
|
|
1835
1838
|
return this.flatten();
|
|
1836
1839
|
}
|
|
1837
1840
|
}
|
|
1838
|
-
|
|
1841
|
+
L.create = (s) => new L(s);
|
|
1839
1842
|
const me = (s, e) => {
|
|
1840
1843
|
let r;
|
|
1841
1844
|
switch (s.code) {
|
|
@@ -1892,12 +1895,12 @@ const me = (s, e) => {
|
|
|
1892
1895
|
}
|
|
1893
1896
|
return { message: r };
|
|
1894
1897
|
};
|
|
1895
|
-
let
|
|
1896
|
-
function
|
|
1897
|
-
|
|
1898
|
+
let Os = me;
|
|
1899
|
+
function vn(s) {
|
|
1900
|
+
Os = s;
|
|
1898
1901
|
}
|
|
1899
1902
|
function Qe() {
|
|
1900
|
-
return
|
|
1903
|
+
return Os;
|
|
1901
1904
|
}
|
|
1902
1905
|
const Je = (s) => {
|
|
1903
1906
|
const { data: e, path: r, errorMaps: n, issueData: a } = s, i = [...r, ...a.path || []], o = {
|
|
@@ -1919,7 +1922,7 @@ const Je = (s) => {
|
|
|
1919
1922
|
path: i,
|
|
1920
1923
|
message: c
|
|
1921
1924
|
};
|
|
1922
|
-
},
|
|
1925
|
+
}, jn = [];
|
|
1923
1926
|
function f(s, e) {
|
|
1924
1927
|
const r = Qe(), n = Je({
|
|
1925
1928
|
issueData: e,
|
|
@@ -1935,7 +1938,7 @@ function f(s, e) {
|
|
|
1935
1938
|
});
|
|
1936
1939
|
s.common.issues.push(n);
|
|
1937
1940
|
}
|
|
1938
|
-
class
|
|
1941
|
+
class z {
|
|
1939
1942
|
constructor() {
|
|
1940
1943
|
this.value = "valid";
|
|
1941
1944
|
}
|
|
@@ -1963,7 +1966,7 @@ class N {
|
|
|
1963
1966
|
value: o
|
|
1964
1967
|
});
|
|
1965
1968
|
}
|
|
1966
|
-
return
|
|
1969
|
+
return z.mergeObjectSync(e, n);
|
|
1967
1970
|
}
|
|
1968
1971
|
static mergeObjectSync(e, r) {
|
|
1969
1972
|
const n = {};
|
|
@@ -1978,12 +1981,12 @@ class N {
|
|
|
1978
1981
|
}
|
|
1979
1982
|
const j = Object.freeze({
|
|
1980
1983
|
status: "aborted"
|
|
1981
|
-
}), he = (s) => ({ status: "dirty", value: s }), C = (s) => ({ status: "valid", value: s }),
|
|
1984
|
+
}), he = (s) => ({ status: "dirty", value: s }), C = (s) => ({ status: "valid", value: s }), Et = (s) => s.status === "aborted", Rt = (s) => s.status === "dirty", xe = (s) => s.status === "valid", ke = (s) => typeof Promise < "u" && s instanceof Promise;
|
|
1982
1985
|
function Ke(s, e, r, n) {
|
|
1983
1986
|
if (typeof e == "function" ? s !== e || !n : !e.has(s)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
1984
1987
|
return e.get(s);
|
|
1985
1988
|
}
|
|
1986
|
-
function
|
|
1989
|
+
function Ns(s, e, r, n, a) {
|
|
1987
1990
|
if (typeof e == "function" ? s !== e || !a : !e.has(s)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
1988
1991
|
return e.set(s, r), r;
|
|
1989
1992
|
}
|
|
@@ -1992,7 +1995,7 @@ var b;
|
|
|
1992
1995
|
s.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, s.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
|
|
1993
1996
|
})(b || (b = {}));
|
|
1994
1997
|
var ve, je;
|
|
1995
|
-
class
|
|
1998
|
+
class W {
|
|
1996
1999
|
constructor(e, r, n, a) {
|
|
1997
2000
|
this._cachedPath = [], this.parent = e, this.data = r, this._path = n, this._key = a;
|
|
1998
2001
|
}
|
|
@@ -2000,7 +2003,7 @@ class Q {
|
|
|
2000
2003
|
return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
|
|
2001
2004
|
}
|
|
2002
2005
|
}
|
|
2003
|
-
const
|
|
2006
|
+
const Xt = (s, e) => {
|
|
2004
2007
|
if (xe(e))
|
|
2005
2008
|
return { success: !0, data: e.value };
|
|
2006
2009
|
if (!s.common.issues.length)
|
|
@@ -2010,7 +2013,7 @@ const Kt = (s, e) => {
|
|
|
2010
2013
|
get error() {
|
|
2011
2014
|
if (this._error)
|
|
2012
2015
|
return this._error;
|
|
2013
|
-
const r = new
|
|
2016
|
+
const r = new L(s.common.issues);
|
|
2014
2017
|
return this._error = r, this._error;
|
|
2015
2018
|
}
|
|
2016
2019
|
};
|
|
@@ -2049,7 +2052,7 @@ class T {
|
|
|
2049
2052
|
}
|
|
2050
2053
|
_processInputParams(e) {
|
|
2051
2054
|
return {
|
|
2052
|
-
status: new
|
|
2055
|
+
status: new z(),
|
|
2053
2056
|
ctx: {
|
|
2054
2057
|
common: e.parent.common,
|
|
2055
2058
|
data: e.data,
|
|
@@ -2090,7 +2093,7 @@ class T {
|
|
|
2090
2093
|
data: e,
|
|
2091
2094
|
parsedType: Y(e)
|
|
2092
2095
|
}, i = this._parseSync({ data: e, path: a.path, parent: a });
|
|
2093
|
-
return
|
|
2096
|
+
return Xt(a, i);
|
|
2094
2097
|
}
|
|
2095
2098
|
async parseAsync(e, r) {
|
|
2096
2099
|
const n = await this.safeParseAsync(e, r);
|
|
@@ -2111,7 +2114,7 @@ class T {
|
|
|
2111
2114
|
data: e,
|
|
2112
2115
|
parsedType: Y(e)
|
|
2113
2116
|
}, a = this._parse({ data: e, path: n.path, parent: n }), i = await (ke(a) ? a : Promise.resolve(a));
|
|
2114
|
-
return
|
|
2117
|
+
return Xt(n, i);
|
|
2115
2118
|
}
|
|
2116
2119
|
refine(e, r) {
|
|
2117
2120
|
const n = (a) => typeof r == "string" || typeof r > "u" ? { message: r } : typeof r == "function" ? r(a) : r;
|
|
@@ -2127,7 +2130,7 @@ class T {
|
|
|
2127
2130
|
return this._refinement((n, a) => e(n) ? !0 : (a.addIssue(typeof r == "function" ? r(n, a) : r), !1));
|
|
2128
2131
|
}
|
|
2129
2132
|
_refinement(e) {
|
|
2130
|
-
return new
|
|
2133
|
+
return new $({
|
|
2131
2134
|
schema: this,
|
|
2132
2135
|
typeName: v.ZodEffects,
|
|
2133
2136
|
effect: { type: "refinement", refinement: e }
|
|
@@ -2137,7 +2140,7 @@ class T {
|
|
|
2137
2140
|
return this._refinement(e);
|
|
2138
2141
|
}
|
|
2139
2142
|
optional() {
|
|
2140
|
-
return
|
|
2143
|
+
return H.create(this, this._def);
|
|
2141
2144
|
}
|
|
2142
2145
|
nullable() {
|
|
2143
2146
|
return re.create(this, this._def);
|
|
@@ -2146,7 +2149,7 @@ class T {
|
|
|
2146
2149
|
return this.nullable().optional();
|
|
2147
2150
|
}
|
|
2148
2151
|
array() {
|
|
2149
|
-
return
|
|
2152
|
+
return F.create(this, this._def);
|
|
2150
2153
|
}
|
|
2151
2154
|
promise() {
|
|
2152
2155
|
return ge.create(this, this._def);
|
|
@@ -2158,7 +2161,7 @@ class T {
|
|
|
2158
2161
|
return Ae.create(this, e, this._def);
|
|
2159
2162
|
}
|
|
2160
2163
|
transform(e) {
|
|
2161
|
-
return new
|
|
2164
|
+
return new $({
|
|
2162
2165
|
...k(this._def),
|
|
2163
2166
|
schema: this,
|
|
2164
2167
|
typeName: v.ZodEffects,
|
|
@@ -2167,7 +2170,7 @@ class T {
|
|
|
2167
2170
|
}
|
|
2168
2171
|
default(e) {
|
|
2169
2172
|
const r = typeof e == "function" ? e : () => e;
|
|
2170
|
-
return new
|
|
2173
|
+
return new Ce({
|
|
2171
2174
|
...k(this._def),
|
|
2172
2175
|
innerType: this,
|
|
2173
2176
|
defaultValue: r,
|
|
@@ -2175,7 +2178,7 @@ class T {
|
|
|
2175
2178
|
});
|
|
2176
2179
|
}
|
|
2177
2180
|
brand() {
|
|
2178
|
-
return new
|
|
2181
|
+
return new Ut({
|
|
2179
2182
|
typeName: v.ZodBranded,
|
|
2180
2183
|
type: this,
|
|
2181
2184
|
...k(this._def)
|
|
@@ -2210,25 +2213,25 @@ class T {
|
|
|
2210
2213
|
return this.safeParse(null).success;
|
|
2211
2214
|
}
|
|
2212
2215
|
}
|
|
2213
|
-
const
|
|
2214
|
-
let
|
|
2215
|
-
const
|
|
2216
|
-
function
|
|
2216
|
+
const wn = /^c[^\s-]{8,}$/i, xn = /^[0-9a-z]+$/, kn = /^[0-9A-HJKMNP-TV-Z]{26}$/, Tn = /^[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, En = /^[a-z0-9_-]{21}$/i, Rn = /^[-+]?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)?)??$/, Sn = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, An = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
2217
|
+
let mt;
|
|
2218
|
+
const Pn = /^(?:(?: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])$/, On = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, Nn = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, zs = "((\\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])))", zn = new RegExp(`^${zs}$`);
|
|
2219
|
+
function Cs(s) {
|
|
2217
2220
|
let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
|
|
2218
2221
|
return s.precision ? e = `${e}\\.\\d{${s.precision}}` : s.precision == null && (e = `${e}(\\.\\d+)?`), e;
|
|
2219
2222
|
}
|
|
2220
|
-
function
|
|
2221
|
-
return new RegExp(`^${
|
|
2223
|
+
function Cn(s) {
|
|
2224
|
+
return new RegExp(`^${Cs(s)}$`);
|
|
2222
2225
|
}
|
|
2223
|
-
function
|
|
2224
|
-
let e = `${
|
|
2226
|
+
function Is(s) {
|
|
2227
|
+
let e = `${zs}T${Cs(s)}`;
|
|
2225
2228
|
const r = [];
|
|
2226
2229
|
return r.push(s.local ? "Z?" : "Z"), s.offset && r.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${r.join("|")})`, new RegExp(`^${e}$`);
|
|
2227
2230
|
}
|
|
2228
|
-
function
|
|
2229
|
-
return !!((e === "v4" || !e) &&
|
|
2231
|
+
function In(s, e) {
|
|
2232
|
+
return !!((e === "v4" || !e) && Pn.test(s) || (e === "v6" || !e) && On.test(s));
|
|
2230
2233
|
}
|
|
2231
|
-
class
|
|
2234
|
+
class D extends T {
|
|
2232
2235
|
_parse(e) {
|
|
2233
2236
|
if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== g.string) {
|
|
2234
2237
|
const i = this._getOrReturnCtx(e);
|
|
@@ -2238,7 +2241,7 @@ class L extends T {
|
|
|
2238
2241
|
received: i.parsedType
|
|
2239
2242
|
}), j;
|
|
2240
2243
|
}
|
|
2241
|
-
const n = new
|
|
2244
|
+
const n = new z();
|
|
2242
2245
|
let a;
|
|
2243
2246
|
for (const i of this._def.checks)
|
|
2244
2247
|
if (i.kind === "min")
|
|
@@ -2277,43 +2280,43 @@ class L extends T {
|
|
|
2277
2280
|
message: i.message
|
|
2278
2281
|
}), n.dirty());
|
|
2279
2282
|
} else if (i.kind === "email")
|
|
2280
|
-
|
|
2283
|
+
Sn.test(e.data) || (a = this._getOrReturnCtx(e, a), f(a, {
|
|
2281
2284
|
validation: "email",
|
|
2282
2285
|
code: p.invalid_string,
|
|
2283
2286
|
message: i.message
|
|
2284
2287
|
}), n.dirty());
|
|
2285
2288
|
else if (i.kind === "emoji")
|
|
2286
|
-
|
|
2289
|
+
mt || (mt = new RegExp(An, "u")), mt.test(e.data) || (a = this._getOrReturnCtx(e, a), f(a, {
|
|
2287
2290
|
validation: "emoji",
|
|
2288
2291
|
code: p.invalid_string,
|
|
2289
2292
|
message: i.message
|
|
2290
2293
|
}), n.dirty());
|
|
2291
2294
|
else if (i.kind === "uuid")
|
|
2292
|
-
|
|
2295
|
+
Tn.test(e.data) || (a = this._getOrReturnCtx(e, a), f(a, {
|
|
2293
2296
|
validation: "uuid",
|
|
2294
2297
|
code: p.invalid_string,
|
|
2295
2298
|
message: i.message
|
|
2296
2299
|
}), n.dirty());
|
|
2297
2300
|
else if (i.kind === "nanoid")
|
|
2298
|
-
|
|
2301
|
+
En.test(e.data) || (a = this._getOrReturnCtx(e, a), f(a, {
|
|
2299
2302
|
validation: "nanoid",
|
|
2300
2303
|
code: p.invalid_string,
|
|
2301
2304
|
message: i.message
|
|
2302
2305
|
}), n.dirty());
|
|
2303
2306
|
else if (i.kind === "cuid")
|
|
2304
|
-
|
|
2307
|
+
wn.test(e.data) || (a = this._getOrReturnCtx(e, a), f(a, {
|
|
2305
2308
|
validation: "cuid",
|
|
2306
2309
|
code: p.invalid_string,
|
|
2307
2310
|
message: i.message
|
|
2308
2311
|
}), n.dirty());
|
|
2309
2312
|
else if (i.kind === "cuid2")
|
|
2310
|
-
|
|
2313
|
+
xn.test(e.data) || (a = this._getOrReturnCtx(e, a), f(a, {
|
|
2311
2314
|
validation: "cuid2",
|
|
2312
2315
|
code: p.invalid_string,
|
|
2313
2316
|
message: i.message
|
|
2314
2317
|
}), n.dirty());
|
|
2315
2318
|
else if (i.kind === "ulid")
|
|
2316
|
-
|
|
2319
|
+
kn.test(e.data) || (a = this._getOrReturnCtx(e, a), f(a, {
|
|
2317
2320
|
validation: "ulid",
|
|
2318
2321
|
code: p.invalid_string,
|
|
2319
2322
|
message: i.message
|
|
@@ -2344,27 +2347,27 @@ class L extends T {
|
|
|
2344
2347
|
code: p.invalid_string,
|
|
2345
2348
|
validation: { endsWith: i.value },
|
|
2346
2349
|
message: i.message
|
|
2347
|
-
}), n.dirty()) : i.kind === "datetime" ?
|
|
2350
|
+
}), n.dirty()) : i.kind === "datetime" ? Is(i).test(e.data) || (a = this._getOrReturnCtx(e, a), f(a, {
|
|
2348
2351
|
code: p.invalid_string,
|
|
2349
2352
|
validation: "datetime",
|
|
2350
2353
|
message: i.message
|
|
2351
|
-
}), n.dirty()) : i.kind === "date" ?
|
|
2354
|
+
}), n.dirty()) : i.kind === "date" ? zn.test(e.data) || (a = this._getOrReturnCtx(e, a), f(a, {
|
|
2352
2355
|
code: p.invalid_string,
|
|
2353
2356
|
validation: "date",
|
|
2354
2357
|
message: i.message
|
|
2355
|
-
}), n.dirty()) : i.kind === "time" ?
|
|
2358
|
+
}), n.dirty()) : i.kind === "time" ? Cn(i).test(e.data) || (a = this._getOrReturnCtx(e, a), f(a, {
|
|
2356
2359
|
code: p.invalid_string,
|
|
2357
2360
|
validation: "time",
|
|
2358
2361
|
message: i.message
|
|
2359
|
-
}), n.dirty()) : i.kind === "duration" ?
|
|
2362
|
+
}), n.dirty()) : i.kind === "duration" ? Rn.test(e.data) || (a = this._getOrReturnCtx(e, a), f(a, {
|
|
2360
2363
|
validation: "duration",
|
|
2361
2364
|
code: p.invalid_string,
|
|
2362
2365
|
message: i.message
|
|
2363
|
-
}), n.dirty()) : i.kind === "ip" ?
|
|
2366
|
+
}), n.dirty()) : i.kind === "ip" ? In(e.data, i.version) || (a = this._getOrReturnCtx(e, a), f(a, {
|
|
2364
2367
|
validation: "ip",
|
|
2365
2368
|
code: p.invalid_string,
|
|
2366
2369
|
message: i.message
|
|
2367
|
-
}), n.dirty()) : i.kind === "base64" ?
|
|
2370
|
+
}), n.dirty()) : i.kind === "base64" ? Nn.test(e.data) || (a = this._getOrReturnCtx(e, a), f(a, {
|
|
2368
2371
|
validation: "base64",
|
|
2369
2372
|
code: p.invalid_string,
|
|
2370
2373
|
message: i.message
|
|
@@ -2379,7 +2382,7 @@ class L extends T {
|
|
|
2379
2382
|
});
|
|
2380
2383
|
}
|
|
2381
2384
|
_addCheck(e) {
|
|
2382
|
-
return new
|
|
2385
|
+
return new D({
|
|
2383
2386
|
...this._def,
|
|
2384
2387
|
checks: [...this._def.checks, e]
|
|
2385
2388
|
});
|
|
@@ -2505,19 +2508,19 @@ class L extends T {
|
|
|
2505
2508
|
return this.min(1, b.errToObj(e));
|
|
2506
2509
|
}
|
|
2507
2510
|
trim() {
|
|
2508
|
-
return new
|
|
2511
|
+
return new D({
|
|
2509
2512
|
...this._def,
|
|
2510
2513
|
checks: [...this._def.checks, { kind: "trim" }]
|
|
2511
2514
|
});
|
|
2512
2515
|
}
|
|
2513
2516
|
toLowerCase() {
|
|
2514
|
-
return new
|
|
2517
|
+
return new D({
|
|
2515
2518
|
...this._def,
|
|
2516
2519
|
checks: [...this._def.checks, { kind: "toLowerCase" }]
|
|
2517
2520
|
});
|
|
2518
2521
|
}
|
|
2519
2522
|
toUpperCase() {
|
|
2520
|
-
return new
|
|
2523
|
+
return new D({
|
|
2521
2524
|
...this._def,
|
|
2522
2525
|
checks: [...this._def.checks, { kind: "toUpperCase" }]
|
|
2523
2526
|
});
|
|
@@ -2577,16 +2580,16 @@ class L extends T {
|
|
|
2577
2580
|
return e;
|
|
2578
2581
|
}
|
|
2579
2582
|
}
|
|
2580
|
-
|
|
2583
|
+
D.create = (s) => {
|
|
2581
2584
|
var e;
|
|
2582
|
-
return new
|
|
2585
|
+
return new D({
|
|
2583
2586
|
checks: [],
|
|
2584
2587
|
typeName: v.ZodString,
|
|
2585
2588
|
coerce: (e = s == null ? void 0 : s.coerce) !== null && e !== void 0 ? e : !1,
|
|
2586
2589
|
...k(s)
|
|
2587
2590
|
});
|
|
2588
2591
|
};
|
|
2589
|
-
function
|
|
2592
|
+
function Un(s, e) {
|
|
2590
2593
|
const r = (s.toString().split(".")[1] || "").length, n = (e.toString().split(".")[1] || "").length, a = r > n ? r : n, i = parseInt(s.toFixed(a).replace(".", "")), o = parseInt(e.toFixed(a).replace(".", ""));
|
|
2591
2594
|
return i % o / Math.pow(10, a);
|
|
2592
2595
|
}
|
|
@@ -2604,7 +2607,7 @@ class ee extends T {
|
|
|
2604
2607
|
}), j;
|
|
2605
2608
|
}
|
|
2606
2609
|
let n;
|
|
2607
|
-
const a = new
|
|
2610
|
+
const a = new z();
|
|
2608
2611
|
for (const i of this._def.checks)
|
|
2609
2612
|
i.kind === "int" ? R.isInteger(e.data) || (n = this._getOrReturnCtx(e, n), f(n, {
|
|
2610
2613
|
code: p.invalid_type,
|
|
@@ -2625,7 +2628,7 @@ class ee extends T {
|
|
|
2625
2628
|
inclusive: i.inclusive,
|
|
2626
2629
|
exact: !1,
|
|
2627
2630
|
message: i.message
|
|
2628
|
-
}), a.dirty()) : i.kind === "multipleOf" ?
|
|
2631
|
+
}), a.dirty()) : i.kind === "multipleOf" ? Un(e.data, i.value) !== 0 && (n = this._getOrReturnCtx(e, n), f(n, {
|
|
2629
2632
|
code: p.not_multiple_of,
|
|
2630
2633
|
multipleOf: i.value,
|
|
2631
2634
|
message: i.message
|
|
@@ -2776,7 +2779,7 @@ class te extends T {
|
|
|
2776
2779
|
}), j;
|
|
2777
2780
|
}
|
|
2778
2781
|
let n;
|
|
2779
|
-
const a = new
|
|
2782
|
+
const a = new z();
|
|
2780
2783
|
for (const i of this._def.checks)
|
|
2781
2784
|
i.kind === "min" ? (i.inclusive ? e.data < i.value : e.data <= i.value) && (n = this._getOrReturnCtx(e, n), f(n, {
|
|
2782
2785
|
code: p.too_small,
|
|
@@ -2908,7 +2911,7 @@ Te.create = (s) => new Te({
|
|
|
2908
2911
|
coerce: (s == null ? void 0 : s.coerce) || !1,
|
|
2909
2912
|
...k(s)
|
|
2910
2913
|
});
|
|
2911
|
-
class
|
|
2914
|
+
class ce extends T {
|
|
2912
2915
|
_parse(e) {
|
|
2913
2916
|
if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== g.date) {
|
|
2914
2917
|
const i = this._getOrReturnCtx(e);
|
|
@@ -2924,7 +2927,7 @@ class ue extends T {
|
|
|
2924
2927
|
code: p.invalid_date
|
|
2925
2928
|
}), j;
|
|
2926
2929
|
}
|
|
2927
|
-
const n = new
|
|
2930
|
+
const n = new z();
|
|
2928
2931
|
let a;
|
|
2929
2932
|
for (const i of this._def.checks)
|
|
2930
2933
|
i.kind === "min" ? e.data.getTime() < i.value && (a = this._getOrReturnCtx(e, a), f(a, {
|
|
@@ -2948,7 +2951,7 @@ class ue extends T {
|
|
|
2948
2951
|
};
|
|
2949
2952
|
}
|
|
2950
2953
|
_addCheck(e) {
|
|
2951
|
-
return new
|
|
2954
|
+
return new ce({
|
|
2952
2955
|
...this._def,
|
|
2953
2956
|
checks: [...this._def.checks, e]
|
|
2954
2957
|
});
|
|
@@ -2980,7 +2983,7 @@ class ue extends T {
|
|
|
2980
2983
|
return e != null ? new Date(e) : null;
|
|
2981
2984
|
}
|
|
2982
2985
|
}
|
|
2983
|
-
|
|
2986
|
+
ce.create = (s) => new ce({
|
|
2984
2987
|
checks: [],
|
|
2985
2988
|
coerce: (s == null ? void 0 : s.coerce) || !1,
|
|
2986
2989
|
typeName: v.ZodDate,
|
|
@@ -3049,7 +3052,7 @@ fe.create = (s) => new fe({
|
|
|
3049
3052
|
typeName: v.ZodAny,
|
|
3050
3053
|
...k(s)
|
|
3051
3054
|
});
|
|
3052
|
-
class
|
|
3055
|
+
class ie extends T {
|
|
3053
3056
|
constructor() {
|
|
3054
3057
|
super(...arguments), this._unknown = !0;
|
|
3055
3058
|
}
|
|
@@ -3057,7 +3060,7 @@ class oe extends T {
|
|
|
3057
3060
|
return C(e.data);
|
|
3058
3061
|
}
|
|
3059
3062
|
}
|
|
3060
|
-
|
|
3063
|
+
ie.create = (s) => new ie({
|
|
3061
3064
|
typeName: v.ZodUnknown,
|
|
3062
3065
|
...k(s)
|
|
3063
3066
|
});
|
|
@@ -3092,7 +3095,7 @@ Xe.create = (s) => new Xe({
|
|
|
3092
3095
|
typeName: v.ZodVoid,
|
|
3093
3096
|
...k(s)
|
|
3094
3097
|
});
|
|
3095
|
-
class
|
|
3098
|
+
class F extends T {
|
|
3096
3099
|
_parse(e) {
|
|
3097
3100
|
const { ctx: r, status: n } = this._processInputParams(e), a = this._def;
|
|
3098
3101
|
if (r.parsedType !== g.array)
|
|
@@ -3128,27 +3131,27 @@ class B extends T {
|
|
|
3128
3131
|
exact: !1,
|
|
3129
3132
|
message: a.maxLength.message
|
|
3130
3133
|
}), n.dirty()), r.common.async)
|
|
3131
|
-
return Promise.all([...r.data].map((o, c) => a.type._parseAsync(new
|
|
3132
|
-
const i = [...r.data].map((o, c) => a.type._parseSync(new
|
|
3133
|
-
return
|
|
3134
|
+
return Promise.all([...r.data].map((o, c) => a.type._parseAsync(new W(r, o, r.path, c)))).then((o) => z.mergeArray(n, o));
|
|
3135
|
+
const i = [...r.data].map((o, c) => a.type._parseSync(new W(r, o, r.path, c)));
|
|
3136
|
+
return z.mergeArray(n, i);
|
|
3134
3137
|
}
|
|
3135
3138
|
get element() {
|
|
3136
3139
|
return this._def.type;
|
|
3137
3140
|
}
|
|
3138
3141
|
min(e, r) {
|
|
3139
|
-
return new
|
|
3142
|
+
return new F({
|
|
3140
3143
|
...this._def,
|
|
3141
3144
|
minLength: { value: e, message: b.toString(r) }
|
|
3142
3145
|
});
|
|
3143
3146
|
}
|
|
3144
3147
|
max(e, r) {
|
|
3145
|
-
return new
|
|
3148
|
+
return new F({
|
|
3146
3149
|
...this._def,
|
|
3147
3150
|
maxLength: { value: e, message: b.toString(r) }
|
|
3148
3151
|
});
|
|
3149
3152
|
}
|
|
3150
3153
|
length(e, r) {
|
|
3151
|
-
return new
|
|
3154
|
+
return new F({
|
|
3152
3155
|
...this._def,
|
|
3153
3156
|
exactLength: { value: e, message: b.toString(r) }
|
|
3154
3157
|
});
|
|
@@ -3157,7 +3160,7 @@ class B extends T {
|
|
|
3157
3160
|
return this.min(1, e);
|
|
3158
3161
|
}
|
|
3159
3162
|
}
|
|
3160
|
-
|
|
3163
|
+
F.create = (s, e) => new F({
|
|
3161
3164
|
type: s,
|
|
3162
3165
|
minLength: null,
|
|
3163
3166
|
maxLength: null,
|
|
@@ -3166,22 +3169,22 @@ B.create = (s, e) => new B({
|
|
|
3166
3169
|
...k(e)
|
|
3167
3170
|
});
|
|
3168
3171
|
function le(s) {
|
|
3169
|
-
if (s instanceof
|
|
3172
|
+
if (s instanceof P) {
|
|
3170
3173
|
const e = {};
|
|
3171
3174
|
for (const r in s.shape) {
|
|
3172
3175
|
const n = s.shape[r];
|
|
3173
|
-
e[r] =
|
|
3176
|
+
e[r] = H.create(le(n));
|
|
3174
3177
|
}
|
|
3175
|
-
return new
|
|
3178
|
+
return new P({
|
|
3176
3179
|
...s._def,
|
|
3177
3180
|
shape: () => e
|
|
3178
3181
|
});
|
|
3179
|
-
} else return s instanceof
|
|
3182
|
+
} else return s instanceof F ? new F({
|
|
3180
3183
|
...s._def,
|
|
3181
3184
|
type: le(s.element)
|
|
3182
|
-
}) : s instanceof
|
|
3185
|
+
}) : s instanceof H ? H.create(le(s.unwrap())) : s instanceof re ? re.create(le(s.unwrap())) : s instanceof Q ? Q.create(s.items.map((e) => le(e))) : s;
|
|
3183
3186
|
}
|
|
3184
|
-
class
|
|
3187
|
+
class P extends T {
|
|
3185
3188
|
constructor() {
|
|
3186
3189
|
super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend;
|
|
3187
3190
|
}
|
|
@@ -3209,7 +3212,7 @@ class O extends T {
|
|
|
3209
3212
|
const h = i[u], m = a.data[u];
|
|
3210
3213
|
d.push({
|
|
3211
3214
|
key: { status: "valid", value: u },
|
|
3212
|
-
value: h._parse(new
|
|
3215
|
+
value: h._parse(new W(a, m, a.path, u)),
|
|
3213
3216
|
alwaysSet: u in a.data
|
|
3214
3217
|
});
|
|
3215
3218
|
}
|
|
@@ -3234,7 +3237,7 @@ class O extends T {
|
|
|
3234
3237
|
d.push({
|
|
3235
3238
|
key: { status: "valid", value: h },
|
|
3236
3239
|
value: u._parse(
|
|
3237
|
-
new
|
|
3240
|
+
new W(a, m, a.path, h)
|
|
3238
3241
|
//, ctx.child(key), value, getParsedType(value)
|
|
3239
3242
|
),
|
|
3240
3243
|
alwaysSet: h in a.data
|
|
@@ -3252,13 +3255,13 @@ class O extends T {
|
|
|
3252
3255
|
});
|
|
3253
3256
|
}
|
|
3254
3257
|
return u;
|
|
3255
|
-
}).then((u) =>
|
|
3258
|
+
}).then((u) => z.mergeObjectSync(n, u)) : z.mergeObjectSync(n, d);
|
|
3256
3259
|
}
|
|
3257
3260
|
get shape() {
|
|
3258
3261
|
return this._def.shape();
|
|
3259
3262
|
}
|
|
3260
3263
|
strict(e) {
|
|
3261
|
-
return b.errToObj, new
|
|
3264
|
+
return b.errToObj, new P({
|
|
3262
3265
|
...this._def,
|
|
3263
3266
|
unknownKeys: "strict",
|
|
3264
3267
|
...e !== void 0 ? {
|
|
@@ -3275,13 +3278,13 @@ class O extends T {
|
|
|
3275
3278
|
});
|
|
3276
3279
|
}
|
|
3277
3280
|
strip() {
|
|
3278
|
-
return new
|
|
3281
|
+
return new P({
|
|
3279
3282
|
...this._def,
|
|
3280
3283
|
unknownKeys: "strip"
|
|
3281
3284
|
});
|
|
3282
3285
|
}
|
|
3283
3286
|
passthrough() {
|
|
3284
|
-
return new
|
|
3287
|
+
return new P({
|
|
3285
3288
|
...this._def,
|
|
3286
3289
|
unknownKeys: "passthrough"
|
|
3287
3290
|
});
|
|
@@ -3304,7 +3307,7 @@ class O extends T {
|
|
|
3304
3307
|
// }) as any;
|
|
3305
3308
|
// };
|
|
3306
3309
|
extend(e) {
|
|
3307
|
-
return new
|
|
3310
|
+
return new P({
|
|
3308
3311
|
...this._def,
|
|
3309
3312
|
shape: () => ({
|
|
3310
3313
|
...this._def.shape(),
|
|
@@ -3318,7 +3321,7 @@ class O extends T {
|
|
|
3318
3321
|
* upgrade if you are experiencing issues.
|
|
3319
3322
|
*/
|
|
3320
3323
|
merge(e) {
|
|
3321
|
-
return new
|
|
3324
|
+
return new P({
|
|
3322
3325
|
unknownKeys: e._def.unknownKeys,
|
|
3323
3326
|
catchall: e._def.catchall,
|
|
3324
3327
|
shape: () => ({
|
|
@@ -3388,7 +3391,7 @@ class O extends T {
|
|
|
3388
3391
|
// return merged;
|
|
3389
3392
|
// }
|
|
3390
3393
|
catchall(e) {
|
|
3391
|
-
return new
|
|
3394
|
+
return new P({
|
|
3392
3395
|
...this._def,
|
|
3393
3396
|
catchall: e
|
|
3394
3397
|
});
|
|
@@ -3397,7 +3400,7 @@ class O extends T {
|
|
|
3397
3400
|
const r = {};
|
|
3398
3401
|
return R.objectKeys(e).forEach((n) => {
|
|
3399
3402
|
e[n] && this.shape[n] && (r[n] = this.shape[n]);
|
|
3400
|
-
}), new
|
|
3403
|
+
}), new P({
|
|
3401
3404
|
...this._def,
|
|
3402
3405
|
shape: () => r
|
|
3403
3406
|
});
|
|
@@ -3406,7 +3409,7 @@ class O extends T {
|
|
|
3406
3409
|
const r = {};
|
|
3407
3410
|
return R.objectKeys(this.shape).forEach((n) => {
|
|
3408
3411
|
e[n] || (r[n] = this.shape[n]);
|
|
3409
|
-
}), new
|
|
3412
|
+
}), new P({
|
|
3410
3413
|
...this._def,
|
|
3411
3414
|
shape: () => r
|
|
3412
3415
|
});
|
|
@@ -3422,7 +3425,7 @@ class O extends T {
|
|
|
3422
3425
|
return R.objectKeys(this.shape).forEach((n) => {
|
|
3423
3426
|
const a = this.shape[n];
|
|
3424
3427
|
e && !e[n] ? r[n] = a : r[n] = a.optional();
|
|
3425
|
-
}), new
|
|
3428
|
+
}), new P({
|
|
3426
3429
|
...this._def,
|
|
3427
3430
|
shape: () => r
|
|
3428
3431
|
});
|
|
@@ -3434,34 +3437,34 @@ class O extends T {
|
|
|
3434
3437
|
r[n] = this.shape[n];
|
|
3435
3438
|
else {
|
|
3436
3439
|
let i = this.shape[n];
|
|
3437
|
-
for (; i instanceof
|
|
3440
|
+
for (; i instanceof H; )
|
|
3438
3441
|
i = i._def.innerType;
|
|
3439
3442
|
r[n] = i;
|
|
3440
3443
|
}
|
|
3441
|
-
}), new
|
|
3444
|
+
}), new P({
|
|
3442
3445
|
...this._def,
|
|
3443
3446
|
shape: () => r
|
|
3444
3447
|
});
|
|
3445
3448
|
}
|
|
3446
3449
|
keyof() {
|
|
3447
|
-
return
|
|
3450
|
+
return Us(R.objectKeys(this.shape));
|
|
3448
3451
|
}
|
|
3449
3452
|
}
|
|
3450
|
-
|
|
3453
|
+
P.create = (s, e) => new P({
|
|
3451
3454
|
shape: () => s,
|
|
3452
3455
|
unknownKeys: "strip",
|
|
3453
3456
|
catchall: G.create(),
|
|
3454
3457
|
typeName: v.ZodObject,
|
|
3455
3458
|
...k(e)
|
|
3456
3459
|
});
|
|
3457
|
-
|
|
3460
|
+
P.strictCreate = (s, e) => new P({
|
|
3458
3461
|
shape: () => s,
|
|
3459
3462
|
unknownKeys: "strict",
|
|
3460
3463
|
catchall: G.create(),
|
|
3461
3464
|
typeName: v.ZodObject,
|
|
3462
3465
|
...k(e)
|
|
3463
3466
|
});
|
|
3464
|
-
|
|
3467
|
+
P.lazycreate = (s, e) => new P({
|
|
3465
3468
|
shape: s,
|
|
3466
3469
|
unknownKeys: "strip",
|
|
3467
3470
|
catchall: G.create(),
|
|
@@ -3478,7 +3481,7 @@ class Se extends T {
|
|
|
3478
3481
|
for (const c of i)
|
|
3479
3482
|
if (c.result.status === "dirty")
|
|
3480
3483
|
return r.common.issues.push(...c.ctx.common.issues), c.result;
|
|
3481
|
-
const o = i.map((c) => new
|
|
3484
|
+
const o = i.map((c) => new L(c.ctx.common.issues));
|
|
3482
3485
|
return f(r, {
|
|
3483
3486
|
code: p.invalid_union,
|
|
3484
3487
|
unionErrors: o
|
|
@@ -3525,7 +3528,7 @@ class Se extends T {
|
|
|
3525
3528
|
}
|
|
3526
3529
|
if (i)
|
|
3527
3530
|
return r.common.issues.push(...i.ctx.common.issues), i.result;
|
|
3528
|
-
const c = o.map((d) => new
|
|
3531
|
+
const c = o.map((d) => new L(d));
|
|
3529
3532
|
return f(r, {
|
|
3530
3533
|
code: p.invalid_union,
|
|
3531
3534
|
unionErrors: c
|
|
@@ -3541,7 +3544,7 @@ Se.create = (s, e) => new Se({
|
|
|
3541
3544
|
typeName: v.ZodUnion,
|
|
3542
3545
|
...k(e)
|
|
3543
3546
|
});
|
|
3544
|
-
const K = (s) => s instanceof
|
|
3547
|
+
const K = (s) => s instanceof Oe ? K(s.schema) : s instanceof $ ? K(s.innerType()) : s instanceof Ne ? [s.value] : s instanceof se ? s.options : s instanceof ze ? R.objectValues(s.enum) : s instanceof Ce ? K(s._def.innerType) : s instanceof Ee ? [void 0] : s instanceof Re ? [null] : s instanceof H ? [void 0, ...K(s.unwrap())] : s instanceof re ? [null, ...K(s.unwrap())] : s instanceof Ut || s instanceof Ue ? K(s.unwrap()) : s instanceof Ie ? K(s._def.innerType) : [];
|
|
3545
3548
|
class ot extends T {
|
|
3546
3549
|
_parse(e) {
|
|
3547
3550
|
const { ctx: r } = this._processInputParams(e);
|
|
@@ -3604,14 +3607,14 @@ class ot extends T {
|
|
|
3604
3607
|
});
|
|
3605
3608
|
}
|
|
3606
3609
|
}
|
|
3607
|
-
function
|
|
3610
|
+
function St(s, e) {
|
|
3608
3611
|
const r = Y(s), n = Y(e);
|
|
3609
3612
|
if (s === e)
|
|
3610
3613
|
return { valid: !0, data: s };
|
|
3611
3614
|
if (r === g.object && n === g.object) {
|
|
3612
3615
|
const a = R.objectKeys(e), i = R.objectKeys(s).filter((c) => a.indexOf(c) !== -1), o = { ...s, ...e };
|
|
3613
3616
|
for (const c of i) {
|
|
3614
|
-
const d =
|
|
3617
|
+
const d = St(s[c], e[c]);
|
|
3615
3618
|
if (!d.valid)
|
|
3616
3619
|
return { valid: !1 };
|
|
3617
3620
|
o[c] = d.data;
|
|
@@ -3622,7 +3625,7 @@ function Et(s, e) {
|
|
|
3622
3625
|
return { valid: !1 };
|
|
3623
3626
|
const a = [];
|
|
3624
3627
|
for (let i = 0; i < s.length; i++) {
|
|
3625
|
-
const o = s[i], c = e[i], d =
|
|
3628
|
+
const o = s[i], c = e[i], d = St(o, c);
|
|
3626
3629
|
if (!d.valid)
|
|
3627
3630
|
return { valid: !1 };
|
|
3628
3631
|
a.push(d.data);
|
|
@@ -3633,10 +3636,10 @@ function Et(s, e) {
|
|
|
3633
3636
|
class Ae extends T {
|
|
3634
3637
|
_parse(e) {
|
|
3635
3638
|
const { status: r, ctx: n } = this._processInputParams(e), a = (i, o) => {
|
|
3636
|
-
if (
|
|
3639
|
+
if (Et(i) || Et(o))
|
|
3637
3640
|
return j;
|
|
3638
|
-
const c =
|
|
3639
|
-
return c.valid ? ((
|
|
3641
|
+
const c = St(i.value, o.value);
|
|
3642
|
+
return c.valid ? ((Rt(i) || Rt(o)) && r.dirty(), { status: r.value, value: c.data }) : (f(n, {
|
|
3640
3643
|
code: p.invalid_intersection_types
|
|
3641
3644
|
}), j);
|
|
3642
3645
|
};
|
|
@@ -3668,7 +3671,7 @@ Ae.create = (s, e, r) => new Ae({
|
|
|
3668
3671
|
typeName: v.ZodIntersection,
|
|
3669
3672
|
...k(r)
|
|
3670
3673
|
});
|
|
3671
|
-
class
|
|
3674
|
+
class Q extends T {
|
|
3672
3675
|
_parse(e) {
|
|
3673
3676
|
const { status: r, ctx: n } = this._processInputParams(e);
|
|
3674
3677
|
if (n.parsedType !== g.array)
|
|
@@ -3694,31 +3697,31 @@ class J extends T {
|
|
|
3694
3697
|
}), r.dirty());
|
|
3695
3698
|
const i = [...n.data].map((o, c) => {
|
|
3696
3699
|
const d = this._def.items[c] || this._def.rest;
|
|
3697
|
-
return d ? d._parse(new
|
|
3700
|
+
return d ? d._parse(new W(n, o, n.path, c)) : null;
|
|
3698
3701
|
}).filter((o) => !!o);
|
|
3699
|
-
return n.common.async ? Promise.all(i).then((o) =>
|
|
3702
|
+
return n.common.async ? Promise.all(i).then((o) => z.mergeArray(r, o)) : z.mergeArray(r, i);
|
|
3700
3703
|
}
|
|
3701
3704
|
get items() {
|
|
3702
3705
|
return this._def.items;
|
|
3703
3706
|
}
|
|
3704
3707
|
rest(e) {
|
|
3705
|
-
return new
|
|
3708
|
+
return new Q({
|
|
3706
3709
|
...this._def,
|
|
3707
3710
|
rest: e
|
|
3708
3711
|
});
|
|
3709
3712
|
}
|
|
3710
3713
|
}
|
|
3711
|
-
|
|
3714
|
+
Q.create = (s, e) => {
|
|
3712
3715
|
if (!Array.isArray(s))
|
|
3713
3716
|
throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
|
|
3714
|
-
return new
|
|
3717
|
+
return new Q({
|
|
3715
3718
|
items: s,
|
|
3716
3719
|
typeName: v.ZodTuple,
|
|
3717
3720
|
rest: null,
|
|
3718
3721
|
...k(e)
|
|
3719
3722
|
});
|
|
3720
3723
|
};
|
|
3721
|
-
class
|
|
3724
|
+
class Pe extends T {
|
|
3722
3725
|
get keySchema() {
|
|
3723
3726
|
return this._def.keyType;
|
|
3724
3727
|
}
|
|
@@ -3736,23 +3739,23 @@ class Oe extends T {
|
|
|
3736
3739
|
const a = [], i = this._def.keyType, o = this._def.valueType;
|
|
3737
3740
|
for (const c in n.data)
|
|
3738
3741
|
a.push({
|
|
3739
|
-
key: i._parse(new
|
|
3740
|
-
value: o._parse(new
|
|
3742
|
+
key: i._parse(new W(n, c, n.path, c)),
|
|
3743
|
+
value: o._parse(new W(n, n.data[c], n.path, c)),
|
|
3741
3744
|
alwaysSet: c in n.data
|
|
3742
3745
|
});
|
|
3743
|
-
return n.common.async ?
|
|
3746
|
+
return n.common.async ? z.mergeObjectAsync(r, a) : z.mergeObjectSync(r, a);
|
|
3744
3747
|
}
|
|
3745
3748
|
get element() {
|
|
3746
3749
|
return this._def.valueType;
|
|
3747
3750
|
}
|
|
3748
3751
|
static create(e, r, n) {
|
|
3749
|
-
return r instanceof T ? new
|
|
3752
|
+
return r instanceof T ? new Pe({
|
|
3750
3753
|
keyType: e,
|
|
3751
3754
|
valueType: r,
|
|
3752
3755
|
typeName: v.ZodRecord,
|
|
3753
3756
|
...k(n)
|
|
3754
|
-
}) : new
|
|
3755
|
-
keyType:
|
|
3757
|
+
}) : new Pe({
|
|
3758
|
+
keyType: D.create(),
|
|
3756
3759
|
valueType: e,
|
|
3757
3760
|
typeName: v.ZodRecord,
|
|
3758
3761
|
...k(r)
|
|
@@ -3775,8 +3778,8 @@ class Ye extends T {
|
|
|
3775
3778
|
received: n.parsedType
|
|
3776
3779
|
}), j;
|
|
3777
3780
|
const a = this._def.keyType, i = this._def.valueType, o = [...n.data.entries()].map(([c, d], u) => ({
|
|
3778
|
-
key: a._parse(new
|
|
3779
|
-
value: i._parse(new
|
|
3781
|
+
key: a._parse(new W(n, c, n.path, [u, "key"])),
|
|
3782
|
+
value: i._parse(new W(n, d, n.path, [u, "value"]))
|
|
3780
3783
|
}));
|
|
3781
3784
|
if (n.common.async) {
|
|
3782
3785
|
const c = /* @__PURE__ */ new Map();
|
|
@@ -3807,7 +3810,7 @@ Ye.create = (s, e, r) => new Ye({
|
|
|
3807
3810
|
typeName: v.ZodMap,
|
|
3808
3811
|
...k(r)
|
|
3809
3812
|
});
|
|
3810
|
-
class
|
|
3813
|
+
class ue extends T {
|
|
3811
3814
|
_parse(e) {
|
|
3812
3815
|
const { status: r, ctx: n } = this._processInputParams(e);
|
|
3813
3816
|
if (n.parsedType !== g.set)
|
|
@@ -3842,17 +3845,17 @@ class de extends T {
|
|
|
3842
3845
|
}
|
|
3843
3846
|
return { status: r.value, value: u };
|
|
3844
3847
|
}
|
|
3845
|
-
const c = [...n.data.values()].map((d, u) => i._parse(new
|
|
3848
|
+
const c = [...n.data.values()].map((d, u) => i._parse(new W(n, d, n.path, u)));
|
|
3846
3849
|
return n.common.async ? Promise.all(c).then((d) => o(d)) : o(c);
|
|
3847
3850
|
}
|
|
3848
3851
|
min(e, r) {
|
|
3849
|
-
return new
|
|
3852
|
+
return new ue({
|
|
3850
3853
|
...this._def,
|
|
3851
3854
|
minSize: { value: e, message: b.toString(r) }
|
|
3852
3855
|
});
|
|
3853
3856
|
}
|
|
3854
3857
|
max(e, r) {
|
|
3855
|
-
return new
|
|
3858
|
+
return new ue({
|
|
3856
3859
|
...this._def,
|
|
3857
3860
|
maxSize: { value: e, message: b.toString(r) }
|
|
3858
3861
|
});
|
|
@@ -3864,7 +3867,7 @@ class de extends T {
|
|
|
3864
3867
|
return this.min(1, e);
|
|
3865
3868
|
}
|
|
3866
3869
|
}
|
|
3867
|
-
|
|
3870
|
+
ue.create = (s, e) => new ue({
|
|
3868
3871
|
valueType: s,
|
|
3869
3872
|
minSize: null,
|
|
3870
3873
|
maxSize: null,
|
|
@@ -3919,11 +3922,11 @@ class pe extends T {
|
|
|
3919
3922
|
if (this._def.returns instanceof ge) {
|
|
3920
3923
|
const c = this;
|
|
3921
3924
|
return C(async function(...d) {
|
|
3922
|
-
const u = new
|
|
3923
|
-
throw u.addIssue(n(d,
|
|
3925
|
+
const u = new L([]), h = await c._def.args.parseAsync(d, i).catch((S) => {
|
|
3926
|
+
throw u.addIssue(n(d, S)), u;
|
|
3924
3927
|
}), m = await Reflect.apply(o, this, h);
|
|
3925
|
-
return await c._def.returns._def.type.parseAsync(m, i).catch((
|
|
3926
|
-
throw u.addIssue(a(m,
|
|
3928
|
+
return await c._def.returns._def.type.parseAsync(m, i).catch((S) => {
|
|
3929
|
+
throw u.addIssue(a(m, S)), u;
|
|
3927
3930
|
});
|
|
3928
3931
|
});
|
|
3929
3932
|
} else {
|
|
@@ -3931,10 +3934,10 @@ class pe extends T {
|
|
|
3931
3934
|
return C(function(...d) {
|
|
3932
3935
|
const u = c._def.args.safeParse(d, i);
|
|
3933
3936
|
if (!u.success)
|
|
3934
|
-
throw new
|
|
3937
|
+
throw new L([n(d, u.error)]);
|
|
3935
3938
|
const h = Reflect.apply(o, this, u.data), m = c._def.returns.safeParse(h, i);
|
|
3936
3939
|
if (!m.success)
|
|
3937
|
-
throw new
|
|
3940
|
+
throw new L([a(h, m.error)]);
|
|
3938
3941
|
return m.data;
|
|
3939
3942
|
});
|
|
3940
3943
|
}
|
|
@@ -3948,7 +3951,7 @@ class pe extends T {
|
|
|
3948
3951
|
args(...e) {
|
|
3949
3952
|
return new pe({
|
|
3950
3953
|
...this._def,
|
|
3951
|
-
args:
|
|
3954
|
+
args: Q.create(e).rest(ie.create())
|
|
3952
3955
|
});
|
|
3953
3956
|
}
|
|
3954
3957
|
returns(e) {
|
|
@@ -3965,14 +3968,14 @@ class pe extends T {
|
|
|
3965
3968
|
}
|
|
3966
3969
|
static create(e, r, n) {
|
|
3967
3970
|
return new pe({
|
|
3968
|
-
args: e ||
|
|
3969
|
-
returns: r ||
|
|
3971
|
+
args: e || Q.create([]).rest(ie.create()),
|
|
3972
|
+
returns: r || ie.create(),
|
|
3970
3973
|
typeName: v.ZodFunction,
|
|
3971
3974
|
...k(n)
|
|
3972
3975
|
});
|
|
3973
3976
|
}
|
|
3974
3977
|
}
|
|
3975
|
-
class
|
|
3978
|
+
class Oe extends T {
|
|
3976
3979
|
get schema() {
|
|
3977
3980
|
return this._def.getter();
|
|
3978
3981
|
}
|
|
@@ -3981,7 +3984,7 @@ class Pe extends T {
|
|
|
3981
3984
|
return this._def.getter()._parse({ data: r.data, path: r.path, parent: r });
|
|
3982
3985
|
}
|
|
3983
3986
|
}
|
|
3984
|
-
|
|
3987
|
+
Oe.create = (s, e) => new Oe({
|
|
3985
3988
|
getter: s,
|
|
3986
3989
|
typeName: v.ZodLazy,
|
|
3987
3990
|
...k(e)
|
|
@@ -4007,7 +4010,7 @@ Ne.create = (s, e) => new Ne({
|
|
|
4007
4010
|
typeName: v.ZodLiteral,
|
|
4008
4011
|
...k(e)
|
|
4009
4012
|
});
|
|
4010
|
-
function
|
|
4013
|
+
function Us(s, e) {
|
|
4011
4014
|
return new se({
|
|
4012
4015
|
values: s,
|
|
4013
4016
|
typeName: v.ZodEnum,
|
|
@@ -4027,7 +4030,7 @@ class se extends T {
|
|
|
4027
4030
|
code: p.invalid_type
|
|
4028
4031
|
}), j;
|
|
4029
4032
|
}
|
|
4030
|
-
if (Ke(this, ve) ||
|
|
4033
|
+
if (Ke(this, ve) || Ns(this, ve, new Set(this._def.values)), !Ke(this, ve).has(e.data)) {
|
|
4031
4034
|
const r = this._getOrReturnCtx(e), n = this._def.values;
|
|
4032
4035
|
return f(r, {
|
|
4033
4036
|
received: r.data,
|
|
@@ -4072,8 +4075,8 @@ class se extends T {
|
|
|
4072
4075
|
}
|
|
4073
4076
|
}
|
|
4074
4077
|
ve = /* @__PURE__ */ new WeakMap();
|
|
4075
|
-
se.create =
|
|
4076
|
-
class
|
|
4078
|
+
se.create = Us;
|
|
4079
|
+
class ze extends T {
|
|
4077
4080
|
constructor() {
|
|
4078
4081
|
super(...arguments), je.set(this, void 0);
|
|
4079
4082
|
}
|
|
@@ -4087,7 +4090,7 @@ class Ce extends T {
|
|
|
4087
4090
|
code: p.invalid_type
|
|
4088
4091
|
}), j;
|
|
4089
4092
|
}
|
|
4090
|
-
if (Ke(this, je) ||
|
|
4093
|
+
if (Ke(this, je) || Ns(this, je, new Set(R.getValidEnumValues(this._def.values))), !Ke(this, je).has(e.data)) {
|
|
4091
4094
|
const a = R.objectValues(r);
|
|
4092
4095
|
return f(n, {
|
|
4093
4096
|
received: n.data,
|
|
@@ -4102,7 +4105,7 @@ class Ce extends T {
|
|
|
4102
4105
|
}
|
|
4103
4106
|
}
|
|
4104
4107
|
je = /* @__PURE__ */ new WeakMap();
|
|
4105
|
-
|
|
4108
|
+
ze.create = (s, e) => new ze({
|
|
4106
4109
|
values: s,
|
|
4107
4110
|
typeName: v.ZodNativeEnum,
|
|
4108
4111
|
...k(e)
|
|
@@ -4131,7 +4134,7 @@ ge.create = (s, e) => new ge({
|
|
|
4131
4134
|
typeName: v.ZodPromise,
|
|
4132
4135
|
...k(e)
|
|
4133
4136
|
});
|
|
4134
|
-
class
|
|
4137
|
+
class $ extends T {
|
|
4135
4138
|
innerType() {
|
|
4136
4139
|
return this._def.schema;
|
|
4137
4140
|
}
|
|
@@ -4208,19 +4211,19 @@ class F extends T {
|
|
|
4208
4211
|
R.assertNever(a);
|
|
4209
4212
|
}
|
|
4210
4213
|
}
|
|
4211
|
-
|
|
4214
|
+
$.create = (s, e, r) => new $({
|
|
4212
4215
|
schema: s,
|
|
4213
4216
|
typeName: v.ZodEffects,
|
|
4214
4217
|
effect: e,
|
|
4215
4218
|
...k(r)
|
|
4216
4219
|
});
|
|
4217
|
-
|
|
4220
|
+
$.createWithPreprocess = (s, e, r) => new $({
|
|
4218
4221
|
schema: e,
|
|
4219
4222
|
effect: { type: "preprocess", transform: s },
|
|
4220
4223
|
typeName: v.ZodEffects,
|
|
4221
4224
|
...k(r)
|
|
4222
4225
|
});
|
|
4223
|
-
class
|
|
4226
|
+
class H extends T {
|
|
4224
4227
|
_parse(e) {
|
|
4225
4228
|
return this._getType(e) === g.undefined ? C(void 0) : this._def.innerType._parse(e);
|
|
4226
4229
|
}
|
|
@@ -4228,7 +4231,7 @@ class W extends T {
|
|
|
4228
4231
|
return this._def.innerType;
|
|
4229
4232
|
}
|
|
4230
4233
|
}
|
|
4231
|
-
|
|
4234
|
+
H.create = (s, e) => new H({
|
|
4232
4235
|
innerType: s,
|
|
4233
4236
|
typeName: v.ZodOptional,
|
|
4234
4237
|
...k(e)
|
|
@@ -4246,7 +4249,7 @@ re.create = (s, e) => new re({
|
|
|
4246
4249
|
typeName: v.ZodNullable,
|
|
4247
4250
|
...k(e)
|
|
4248
4251
|
});
|
|
4249
|
-
class
|
|
4252
|
+
class Ce extends T {
|
|
4250
4253
|
_parse(e) {
|
|
4251
4254
|
const { ctx: r } = this._processInputParams(e);
|
|
4252
4255
|
let n = r.data;
|
|
@@ -4260,7 +4263,7 @@ class ze extends T {
|
|
|
4260
4263
|
return this._def.innerType;
|
|
4261
4264
|
}
|
|
4262
4265
|
}
|
|
4263
|
-
|
|
4266
|
+
Ce.create = (s, e) => new Ce({
|
|
4264
4267
|
innerType: s,
|
|
4265
4268
|
typeName: v.ZodDefault,
|
|
4266
4269
|
defaultValue: typeof e.default == "function" ? e.default : () => e.default,
|
|
@@ -4285,7 +4288,7 @@ class Ie extends T {
|
|
|
4285
4288
|
status: "valid",
|
|
4286
4289
|
value: i.status === "valid" ? i.value : this._def.catchValue({
|
|
4287
4290
|
get error() {
|
|
4288
|
-
return new
|
|
4291
|
+
return new L(n.common.issues);
|
|
4289
4292
|
},
|
|
4290
4293
|
input: n.data
|
|
4291
4294
|
})
|
|
@@ -4293,7 +4296,7 @@ class Ie extends T {
|
|
|
4293
4296
|
status: "valid",
|
|
4294
4297
|
value: a.status === "valid" ? a.value : this._def.catchValue({
|
|
4295
4298
|
get error() {
|
|
4296
|
-
return new
|
|
4299
|
+
return new L(n.common.issues);
|
|
4297
4300
|
},
|
|
4298
4301
|
input: n.data
|
|
4299
4302
|
})
|
|
@@ -4326,8 +4329,8 @@ et.create = (s) => new et({
|
|
|
4326
4329
|
typeName: v.ZodNaN,
|
|
4327
4330
|
...k(s)
|
|
4328
4331
|
});
|
|
4329
|
-
const
|
|
4330
|
-
class
|
|
4332
|
+
const Zn = Symbol("zod_brand");
|
|
4333
|
+
class Ut extends T {
|
|
4331
4334
|
_parse(e) {
|
|
4332
4335
|
const { ctx: r } = this._processInputParams(e), n = r.data;
|
|
4333
4336
|
return this._def.type._parse({
|
|
@@ -4394,7 +4397,7 @@ Ue.create = (s, e) => new Ue({
|
|
|
4394
4397
|
typeName: v.ZodReadonly,
|
|
4395
4398
|
...k(e)
|
|
4396
4399
|
});
|
|
4397
|
-
function
|
|
4400
|
+
function Zs(s, e = {}, r) {
|
|
4398
4401
|
return s ? fe.create().superRefine((n, a) => {
|
|
4399
4402
|
var i, o;
|
|
4400
4403
|
if (!s(n)) {
|
|
@@ -4403,155 +4406,155 @@ function Is(s, e = {}, r) {
|
|
|
4403
4406
|
}
|
|
4404
4407
|
}) : fe.create();
|
|
4405
4408
|
}
|
|
4406
|
-
const
|
|
4407
|
-
object:
|
|
4409
|
+
const qn = {
|
|
4410
|
+
object: P.lazycreate
|
|
4408
4411
|
};
|
|
4409
4412
|
var v;
|
|
4410
4413
|
(function(s) {
|
|
4411
4414
|
s.ZodString = "ZodString", s.ZodNumber = "ZodNumber", s.ZodNaN = "ZodNaN", s.ZodBigInt = "ZodBigInt", s.ZodBoolean = "ZodBoolean", s.ZodDate = "ZodDate", s.ZodSymbol = "ZodSymbol", s.ZodUndefined = "ZodUndefined", s.ZodNull = "ZodNull", s.ZodAny = "ZodAny", s.ZodUnknown = "ZodUnknown", s.ZodNever = "ZodNever", s.ZodVoid = "ZodVoid", s.ZodArray = "ZodArray", s.ZodObject = "ZodObject", s.ZodUnion = "ZodUnion", s.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", s.ZodIntersection = "ZodIntersection", s.ZodTuple = "ZodTuple", s.ZodRecord = "ZodRecord", s.ZodMap = "ZodMap", s.ZodSet = "ZodSet", s.ZodFunction = "ZodFunction", s.ZodLazy = "ZodLazy", s.ZodLiteral = "ZodLiteral", s.ZodEnum = "ZodEnum", s.ZodEffects = "ZodEffects", s.ZodNativeEnum = "ZodNativeEnum", s.ZodOptional = "ZodOptional", s.ZodNullable = "ZodNullable", s.ZodDefault = "ZodDefault", s.ZodCatch = "ZodCatch", s.ZodPromise = "ZodPromise", s.ZodBranded = "ZodBranded", s.ZodPipeline = "ZodPipeline", s.ZodReadonly = "ZodReadonly";
|
|
4412
4415
|
})(v || (v = {}));
|
|
4413
|
-
const
|
|
4416
|
+
const Mn = (s, e = {
|
|
4414
4417
|
message: `Input not instance of ${s.name}`
|
|
4415
|
-
}) =>
|
|
4416
|
-
string: (s) =>
|
|
4418
|
+
}) => Zs((r) => r instanceof s, e), qs = D.create, Ms = ee.create, Ln = et.create, Bn = te.create, Ls = Te.create, Dn = ce.create, Fn = Ge.create, $n = Ee.create, Vn = Re.create, Hn = fe.create, Wn = ie.create, Qn = G.create, Jn = Xe.create, Kn = F.create, Gn = P.create, Xn = P.strictCreate, Yn = Se.create, ea = ot.create, ta = Ae.create, sa = Q.create, ra = Pe.create, na = Ye.create, aa = ue.create, ia = pe.create, oa = Oe.create, ca = Ne.create, ua = se.create, da = ze.create, la = ge.create, Yt = $.create, ha = H.create, pa = re.create, ma = $.createWithPreprocess, fa = Me.create, ga = () => qs().optional(), ya = () => Ms().optional(), ba = () => Ls().optional(), _a = {
|
|
4419
|
+
string: (s) => D.create({ ...s, coerce: !0 }),
|
|
4417
4420
|
number: (s) => ee.create({ ...s, coerce: !0 }),
|
|
4418
4421
|
boolean: (s) => Te.create({
|
|
4419
4422
|
...s,
|
|
4420
4423
|
coerce: !0
|
|
4421
4424
|
}),
|
|
4422
4425
|
bigint: (s) => te.create({ ...s, coerce: !0 }),
|
|
4423
|
-
date: (s) =>
|
|
4424
|
-
},
|
|
4426
|
+
date: (s) => ce.create({ ...s, coerce: !0 })
|
|
4427
|
+
}, va = j;
|
|
4425
4428
|
var t = /* @__PURE__ */ Object.freeze({
|
|
4426
4429
|
__proto__: null,
|
|
4427
4430
|
defaultErrorMap: me,
|
|
4428
|
-
setErrorMap:
|
|
4431
|
+
setErrorMap: vn,
|
|
4429
4432
|
getErrorMap: Qe,
|
|
4430
4433
|
makeIssue: Je,
|
|
4431
|
-
EMPTY_PATH:
|
|
4434
|
+
EMPTY_PATH: jn,
|
|
4432
4435
|
addIssueToContext: f,
|
|
4433
|
-
ParseStatus:
|
|
4436
|
+
ParseStatus: z,
|
|
4434
4437
|
INVALID: j,
|
|
4435
4438
|
DIRTY: he,
|
|
4436
4439
|
OK: C,
|
|
4437
|
-
isAborted:
|
|
4438
|
-
isDirty:
|
|
4440
|
+
isAborted: Et,
|
|
4441
|
+
isDirty: Rt,
|
|
4439
4442
|
isValid: xe,
|
|
4440
4443
|
isAsync: ke,
|
|
4441
4444
|
get util() {
|
|
4442
4445
|
return R;
|
|
4443
4446
|
},
|
|
4444
4447
|
get objectUtil() {
|
|
4445
|
-
return
|
|
4448
|
+
return Tt;
|
|
4446
4449
|
},
|
|
4447
4450
|
ZodParsedType: g,
|
|
4448
4451
|
getParsedType: Y,
|
|
4449
4452
|
ZodType: T,
|
|
4450
|
-
datetimeRegex:
|
|
4451
|
-
ZodString:
|
|
4453
|
+
datetimeRegex: Is,
|
|
4454
|
+
ZodString: D,
|
|
4452
4455
|
ZodNumber: ee,
|
|
4453
4456
|
ZodBigInt: te,
|
|
4454
4457
|
ZodBoolean: Te,
|
|
4455
|
-
ZodDate:
|
|
4458
|
+
ZodDate: ce,
|
|
4456
4459
|
ZodSymbol: Ge,
|
|
4457
4460
|
ZodUndefined: Ee,
|
|
4458
4461
|
ZodNull: Re,
|
|
4459
4462
|
ZodAny: fe,
|
|
4460
|
-
ZodUnknown:
|
|
4463
|
+
ZodUnknown: ie,
|
|
4461
4464
|
ZodNever: G,
|
|
4462
4465
|
ZodVoid: Xe,
|
|
4463
|
-
ZodArray:
|
|
4464
|
-
ZodObject:
|
|
4466
|
+
ZodArray: F,
|
|
4467
|
+
ZodObject: P,
|
|
4465
4468
|
ZodUnion: Se,
|
|
4466
4469
|
ZodDiscriminatedUnion: ot,
|
|
4467
4470
|
ZodIntersection: Ae,
|
|
4468
|
-
ZodTuple:
|
|
4469
|
-
ZodRecord:
|
|
4471
|
+
ZodTuple: Q,
|
|
4472
|
+
ZodRecord: Pe,
|
|
4470
4473
|
ZodMap: Ye,
|
|
4471
|
-
ZodSet:
|
|
4474
|
+
ZodSet: ue,
|
|
4472
4475
|
ZodFunction: pe,
|
|
4473
|
-
ZodLazy:
|
|
4476
|
+
ZodLazy: Oe,
|
|
4474
4477
|
ZodLiteral: Ne,
|
|
4475
4478
|
ZodEnum: se,
|
|
4476
|
-
ZodNativeEnum:
|
|
4479
|
+
ZodNativeEnum: ze,
|
|
4477
4480
|
ZodPromise: ge,
|
|
4478
|
-
ZodEffects:
|
|
4479
|
-
ZodTransformer:
|
|
4480
|
-
ZodOptional:
|
|
4481
|
+
ZodEffects: $,
|
|
4482
|
+
ZodTransformer: $,
|
|
4483
|
+
ZodOptional: H,
|
|
4481
4484
|
ZodNullable: re,
|
|
4482
|
-
ZodDefault:
|
|
4485
|
+
ZodDefault: Ce,
|
|
4483
4486
|
ZodCatch: Ie,
|
|
4484
4487
|
ZodNaN: et,
|
|
4485
|
-
BRAND:
|
|
4486
|
-
ZodBranded:
|
|
4488
|
+
BRAND: Zn,
|
|
4489
|
+
ZodBranded: Ut,
|
|
4487
4490
|
ZodPipeline: Me,
|
|
4488
4491
|
ZodReadonly: Ue,
|
|
4489
|
-
custom:
|
|
4492
|
+
custom: Zs,
|
|
4490
4493
|
Schema: T,
|
|
4491
4494
|
ZodSchema: T,
|
|
4492
|
-
late:
|
|
4495
|
+
late: qn,
|
|
4493
4496
|
get ZodFirstPartyTypeKind() {
|
|
4494
4497
|
return v;
|
|
4495
4498
|
},
|
|
4496
|
-
coerce:
|
|
4497
|
-
any:
|
|
4498
|
-
array:
|
|
4499
|
-
bigint:
|
|
4500
|
-
boolean:
|
|
4501
|
-
date:
|
|
4502
|
-
discriminatedUnion:
|
|
4503
|
-
effect:
|
|
4504
|
-
enum:
|
|
4505
|
-
function:
|
|
4506
|
-
instanceof:
|
|
4507
|
-
intersection:
|
|
4508
|
-
lazy:
|
|
4509
|
-
literal:
|
|
4510
|
-
map:
|
|
4511
|
-
nan:
|
|
4512
|
-
nativeEnum:
|
|
4513
|
-
never:
|
|
4514
|
-
null:
|
|
4515
|
-
nullable:
|
|
4516
|
-
number:
|
|
4517
|
-
object:
|
|
4518
|
-
oboolean:
|
|
4519
|
-
onumber:
|
|
4520
|
-
optional:
|
|
4521
|
-
ostring:
|
|
4522
|
-
pipeline:
|
|
4523
|
-
preprocess:
|
|
4524
|
-
promise:
|
|
4525
|
-
record:
|
|
4526
|
-
set:
|
|
4527
|
-
strictObject:
|
|
4528
|
-
string:
|
|
4529
|
-
symbol:
|
|
4530
|
-
transformer:
|
|
4531
|
-
tuple:
|
|
4532
|
-
undefined:
|
|
4533
|
-
union:
|
|
4534
|
-
unknown:
|
|
4535
|
-
void:
|
|
4536
|
-
NEVER:
|
|
4499
|
+
coerce: _a,
|
|
4500
|
+
any: Hn,
|
|
4501
|
+
array: Kn,
|
|
4502
|
+
bigint: Bn,
|
|
4503
|
+
boolean: Ls,
|
|
4504
|
+
date: Dn,
|
|
4505
|
+
discriminatedUnion: ea,
|
|
4506
|
+
effect: Yt,
|
|
4507
|
+
enum: ua,
|
|
4508
|
+
function: ia,
|
|
4509
|
+
instanceof: Mn,
|
|
4510
|
+
intersection: ta,
|
|
4511
|
+
lazy: oa,
|
|
4512
|
+
literal: ca,
|
|
4513
|
+
map: na,
|
|
4514
|
+
nan: Ln,
|
|
4515
|
+
nativeEnum: da,
|
|
4516
|
+
never: Qn,
|
|
4517
|
+
null: Vn,
|
|
4518
|
+
nullable: pa,
|
|
4519
|
+
number: Ms,
|
|
4520
|
+
object: Gn,
|
|
4521
|
+
oboolean: ba,
|
|
4522
|
+
onumber: ya,
|
|
4523
|
+
optional: ha,
|
|
4524
|
+
ostring: ga,
|
|
4525
|
+
pipeline: fa,
|
|
4526
|
+
preprocess: ma,
|
|
4527
|
+
promise: la,
|
|
4528
|
+
record: ra,
|
|
4529
|
+
set: aa,
|
|
4530
|
+
strictObject: Xn,
|
|
4531
|
+
string: qs,
|
|
4532
|
+
symbol: Fn,
|
|
4533
|
+
transformer: Yt,
|
|
4534
|
+
tuple: sa,
|
|
4535
|
+
undefined: $n,
|
|
4536
|
+
union: Yn,
|
|
4537
|
+
unknown: Wn,
|
|
4538
|
+
void: Jn,
|
|
4539
|
+
NEVER: va,
|
|
4537
4540
|
ZodIssueCode: p,
|
|
4538
|
-
quotelessJson:
|
|
4539
|
-
ZodError:
|
|
4541
|
+
quotelessJson: _n,
|
|
4542
|
+
ZodError: L
|
|
4540
4543
|
});
|
|
4541
|
-
function
|
|
4544
|
+
function ja(s, e) {
|
|
4542
4545
|
let r = { ...s };
|
|
4543
4546
|
for (let n of e) delete r[n];
|
|
4544
4547
|
return r;
|
|
4545
4548
|
}
|
|
4546
|
-
var
|
|
4547
|
-
function
|
|
4549
|
+
var wa = /:([a-zA-Z_][a-zA-Z0-9_]*)/g;
|
|
4550
|
+
function xa(s) {
|
|
4548
4551
|
let e = s.url, r = s.params;
|
|
4549
|
-
return r && (e = e.replace(
|
|
4552
|
+
return r && (e = e.replace(wa, (n, a) => a in r ? `${r[a]}` : n)), e;
|
|
4550
4553
|
}
|
|
4551
|
-
function
|
|
4554
|
+
function es(s, e, r) {
|
|
4552
4555
|
return s.find((n) => n.method === e && n.path === r);
|
|
4553
4556
|
}
|
|
4554
|
-
function
|
|
4557
|
+
function ka(s) {
|
|
4555
4558
|
let e = new FormData();
|
|
4556
4559
|
for (let r in s) e.append(r, s[r]);
|
|
4557
4560
|
return { data: e };
|
|
@@ -4560,33 +4563,33 @@ var tt = class extends Error {
|
|
|
4560
4563
|
constructor(s, e, r, n) {
|
|
4561
4564
|
super(s), this.config = e, this.data = r, this.cause = n;
|
|
4562
4565
|
}
|
|
4563
|
-
},
|
|
4566
|
+
}, Ta = { name: "form-data", request: async (s, e) => {
|
|
4564
4567
|
if (typeof e.data != "object" || Array.isArray(e.data)) throw new tt("Zodios: multipart/form-data body must be an object", e);
|
|
4565
|
-
let r =
|
|
4568
|
+
let r = ka(e.data);
|
|
4566
4569
|
return { ...e, data: r.data, headers: { ...e.headers, ...r.headers } };
|
|
4567
4570
|
} };
|
|
4568
|
-
function
|
|
4569
|
-
return
|
|
4571
|
+
function Ea() {
|
|
4572
|
+
return Ta;
|
|
4570
4573
|
}
|
|
4571
|
-
var
|
|
4574
|
+
var Ra = { name: "form-url", request: async (s, e) => {
|
|
4572
4575
|
if (typeof e.data != "object" || Array.isArray(e.data)) throw new tt("Zodios: application/x-www-form-urlencoded body must be an object", e);
|
|
4573
4576
|
return { ...e, data: new URLSearchParams(e.data).toString(), headers: { ...e.headers, "Content-Type": "application/x-www-form-urlencoded" } };
|
|
4574
4577
|
} };
|
|
4575
|
-
function
|
|
4576
|
-
return
|
|
4578
|
+
function Sa() {
|
|
4579
|
+
return Ra;
|
|
4577
4580
|
}
|
|
4578
|
-
function
|
|
4581
|
+
function ts(s, e) {
|
|
4579
4582
|
return { request: async (r, n) => ({ ...n, headers: { ...n.headers, [s]: e } }) };
|
|
4580
4583
|
}
|
|
4581
|
-
function
|
|
4584
|
+
function ss(s) {
|
|
4582
4585
|
return [!0, "response", "all"].includes(s);
|
|
4583
4586
|
}
|
|
4584
|
-
function
|
|
4587
|
+
function rs(s) {
|
|
4585
4588
|
return [!0, "request", "all"].includes(s);
|
|
4586
4589
|
}
|
|
4587
|
-
function
|
|
4588
|
-
return { name: "zod-validation", request:
|
|
4589
|
-
let i =
|
|
4590
|
+
function Aa({ validate: s, transform: e, sendDefaults: r }) {
|
|
4591
|
+
return { name: "zod-validation", request: rs(s) ? async (n, a) => {
|
|
4592
|
+
let i = es(n, a.method, a.url);
|
|
4590
4593
|
if (!i) throw new Error(`No endpoint found for ${a.method} ${a.url}`);
|
|
4591
4594
|
let { parameters: o } = i;
|
|
4592
4595
|
if (!o) return a;
|
|
@@ -4599,19 +4602,19 @@ function Ra({ validate: s, transform: e, sendDefaults: r }) {
|
|
|
4599
4602
|
}, Path: (m) => {
|
|
4600
4603
|
var w;
|
|
4601
4604
|
return (w = c.params) == null ? void 0 : w[m];
|
|
4602
|
-
} }, u = { Query: (m, w) => c.queries[m] = w, Body: (m, w) => c.data = w, Header: (m, w) => c.headers[m] = w, Path: (m, w) => c.params[m] = w }, h =
|
|
4605
|
+
} }, u = { Query: (m, w) => c.queries[m] = w, Body: (m, w) => c.data = w, Header: (m, w) => c.headers[m] = w, Path: (m, w) => c.params[m] = w }, h = rs(e);
|
|
4603
4606
|
for (let m of o) {
|
|
4604
|
-
let { name: w, schema:
|
|
4607
|
+
let { name: w, schema: S, type: _ } = m, E = d[_](w);
|
|
4605
4608
|
if (r || E !== void 0) {
|
|
4606
|
-
let y = await
|
|
4609
|
+
let y = await S.safeParseAsync(E);
|
|
4607
4610
|
if (!y.success) throw new tt(`Zodios: Invalid ${_} parameter '${w}'`, a, E, y.error);
|
|
4608
4611
|
h && u[_](w, y.data);
|
|
4609
4612
|
}
|
|
4610
4613
|
}
|
|
4611
4614
|
return c;
|
|
4612
|
-
} : void 0, response:
|
|
4615
|
+
} : void 0, response: ss(s) ? async (n, a, i) => {
|
|
4613
4616
|
var o, c, d, u;
|
|
4614
|
-
let h =
|
|
4617
|
+
let h = es(n, a.method, a.url);
|
|
4615
4618
|
if (!h) throw new Error(`No endpoint found for ${a.method} ${a.url}`);
|
|
4616
4619
|
if ((c = (o = i.headers) == null ? void 0 : o["content-type"]) != null && c.includes("application/json") || (u = (d = i.headers) == null ? void 0 : d["content-type"]) != null && u.includes("application/vnd.api+json")) {
|
|
4617
4620
|
let m = await h.response.safeParseAsync(i.data);
|
|
@@ -4621,12 +4624,12 @@ cause:
|
|
|
4621
4624
|
${m.error.message}
|
|
4622
4625
|
received:
|
|
4623
4626
|
${JSON.stringify(i.data, null, 2)}`, a, i.data, m.error);
|
|
4624
|
-
|
|
4627
|
+
ss(e) && (i.data = m.data);
|
|
4625
4628
|
}
|
|
4626
4629
|
return i;
|
|
4627
4630
|
} : void 0 };
|
|
4628
4631
|
}
|
|
4629
|
-
var
|
|
4632
|
+
var ns = class {
|
|
4630
4633
|
constructor(s, e) {
|
|
4631
4634
|
this.plugins = [], this.key = `${s}-${e}`;
|
|
4632
4635
|
}
|
|
@@ -4667,7 +4670,7 @@ var ss = class {
|
|
|
4667
4670
|
return this.plugins.reduce((s, e) => e ? s + 1 : s, 0);
|
|
4668
4671
|
}
|
|
4669
4672
|
};
|
|
4670
|
-
function
|
|
4673
|
+
function Bs(s) {
|
|
4671
4674
|
let e = /* @__PURE__ */ new Set();
|
|
4672
4675
|
for (let n of s) {
|
|
4673
4676
|
let a = `${n.method} ${n.path}`;
|
|
@@ -4681,10 +4684,10 @@ function Ms(s) {
|
|
|
4681
4684
|
}
|
|
4682
4685
|
for (let n of s) if (n.parameters && n.parameters.filter((a) => a.type === "Body").length > 1) throw new Error(`Zodios: Multiple body parameters in endpoint '${n.path}'`);
|
|
4683
4686
|
}
|
|
4684
|
-
function
|
|
4685
|
-
return
|
|
4687
|
+
function Pa(s) {
|
|
4688
|
+
return Bs(s), s;
|
|
4686
4689
|
}
|
|
4687
|
-
var
|
|
4690
|
+
var Oa = class {
|
|
4688
4691
|
constructor(s, e, r) {
|
|
4689
4692
|
this.endpointPlugins = /* @__PURE__ */ new Map();
|
|
4690
4693
|
let n;
|
|
@@ -4693,23 +4696,23 @@ var Aa = class {
|
|
|
4693
4696
|
if (typeof s == "string" && Array.isArray(e)) a = s, this.api = e, n = r || {};
|
|
4694
4697
|
else if (Array.isArray(s) && !Array.isArray(e)) this.api = s, n = e || {};
|
|
4695
4698
|
else throw new Error("Zodios: api must be an array");
|
|
4696
|
-
|
|
4699
|
+
Bs(this.api), this.options = { validate: !0, transform: !0, sendDefaults: !1, ...n }, this.options.axiosInstance ? this.axiosInstance = this.options.axiosInstance : this.axiosInstance = O.create({ ...this.options.axiosConfig }), a && (this.axiosInstance.defaults.baseURL = a), this.injectAliasEndpoints(), this.initPlugins(), [!0, "all", "request", "response"].includes(this.options.validate) && this.use(Aa(this.options));
|
|
4697
4700
|
}
|
|
4698
4701
|
initPlugins() {
|
|
4699
|
-
this.endpointPlugins.set("any-any", new
|
|
4700
|
-
let e = new
|
|
4702
|
+
this.endpointPlugins.set("any-any", new ns("any", "any")), this.api.forEach((s) => {
|
|
4703
|
+
let e = new ns(s.method, s.path);
|
|
4701
4704
|
switch (s.requestFormat) {
|
|
4702
4705
|
case "binary":
|
|
4703
|
-
e.use(
|
|
4706
|
+
e.use(ts("Content-Type", "application/octet-stream"));
|
|
4704
4707
|
break;
|
|
4705
4708
|
case "form-data":
|
|
4706
|
-
e.use(
|
|
4709
|
+
e.use(Ea());
|
|
4707
4710
|
break;
|
|
4708
4711
|
case "form-url":
|
|
4709
|
-
e.use(
|
|
4712
|
+
e.use(Sa());
|
|
4710
4713
|
break;
|
|
4711
4714
|
case "text":
|
|
4712
|
-
e.use(
|
|
4715
|
+
e.use(ts("Content-Type", "text/plain"));
|
|
4713
4716
|
break;
|
|
4714
4717
|
}
|
|
4715
4718
|
this.endpointPlugins.set(`${s.method}-${s.path}`, e);
|
|
@@ -4760,7 +4763,7 @@ var Aa = class {
|
|
|
4760
4763
|
async request(s) {
|
|
4761
4764
|
let e = s, r = this.getAnyEndpointPlugins(), n = this.findEnpointPlugins(e.method, e.url);
|
|
4762
4765
|
e = await r.interceptRequest(this.api, e), n && (e = await n.interceptRequest(this.api, e));
|
|
4763
|
-
let a = this.axiosInstance.request({ ...
|
|
4766
|
+
let a = this.axiosInstance.request({ ...ja(e, ["params", "queries"]), url: xa(e), params: e.queries });
|
|
4764
4767
|
return n && (a = n.interceptResponse(this.api, e, a)), a = r.interceptResponse(this.api, e, a), (await a).data;
|
|
4765
4768
|
}
|
|
4766
4769
|
async get(s, ...[e]) {
|
|
@@ -4778,19 +4781,19 @@ var Aa = class {
|
|
|
4778
4781
|
async delete(s, e, ...[r]) {
|
|
4779
4782
|
return this.request({ ...r, method: "delete", url: s, data: e });
|
|
4780
4783
|
}
|
|
4781
|
-
},
|
|
4782
|
-
const
|
|
4784
|
+
}, Ds = Oa;
|
|
4785
|
+
const At = t.object({
|
|
4783
4786
|
id: t.string(),
|
|
4784
4787
|
name: t.string(),
|
|
4785
4788
|
is_archived: t.boolean(),
|
|
4786
4789
|
created_at: t.string(),
|
|
4787
4790
|
updated_at: t.string()
|
|
4788
|
-
}).passthrough(),
|
|
4791
|
+
}).passthrough(), Na = t.array(At);
|
|
4789
4792
|
t.object({ name: t.string().min(1).max(255) }).passthrough();
|
|
4790
|
-
const
|
|
4793
|
+
const za = t.object({
|
|
4791
4794
|
name: t.string().min(1).max(255),
|
|
4792
4795
|
is_archived: t.boolean().optional()
|
|
4793
|
-
}).passthrough(),
|
|
4796
|
+
}).passthrough(), Ca = t.object({ type: t.string(), data: t.string() }).passthrough(), Ia = t.object({ id: t.string(), email: t.string(), role: t.string() }).passthrough(), Fs = t.enum(["owner", "admin", "manager", "employee", "placeholder"]), Ua = t.object({ email: t.string().email(), role: Fs }).passthrough(), as = t.object({
|
|
4794
4797
|
id: t.string(),
|
|
4795
4798
|
user_id: t.string(),
|
|
4796
4799
|
name: t.string(),
|
|
@@ -4798,62 +4801,75 @@ const Pa = t.object({
|
|
|
4798
4801
|
role: t.string(),
|
|
4799
4802
|
is_placeholder: t.boolean(),
|
|
4800
4803
|
billable_rate: t.union([t.number(), t.null()])
|
|
4801
|
-
}).passthrough(),
|
|
4804
|
+
}).passthrough(), Za = t.object({ role: Fs, billable_rate: t.union([t.number(), t.null()]) }).partial().passthrough(), is = t.object({
|
|
4802
4805
|
id: t.string(),
|
|
4803
4806
|
name: t.string(),
|
|
4804
4807
|
is_personal: t.boolean(),
|
|
4805
|
-
billable_rate: t.union([t.number(), t.null()])
|
|
4806
|
-
|
|
4808
|
+
billable_rate: t.union([t.number(), t.null()]),
|
|
4809
|
+
employees_can_see_billable_rates: t.boolean()
|
|
4810
|
+
}).passthrough(), qa = t.object({
|
|
4807
4811
|
name: t.string().max(255),
|
|
4808
|
-
billable_rate: t.union([t.number(), t.null()]).optional()
|
|
4809
|
-
|
|
4812
|
+
billable_rate: t.union([t.number(), t.null()]).optional(),
|
|
4813
|
+
employees_can_see_billable_rates: t.boolean().optional()
|
|
4814
|
+
}).passthrough(), Be = t.object({
|
|
4810
4815
|
id: t.string(),
|
|
4811
4816
|
name: t.string(),
|
|
4812
4817
|
color: t.string(),
|
|
4813
4818
|
client_id: t.union([t.string(), t.null()]),
|
|
4814
4819
|
is_archived: t.boolean(),
|
|
4815
4820
|
billable_rate: t.union([t.number(), t.null()]),
|
|
4816
|
-
is_billable: t.boolean()
|
|
4817
|
-
|
|
4821
|
+
is_billable: t.boolean(),
|
|
4822
|
+
estimated_time: t.union([t.number(), t.null()]),
|
|
4823
|
+
spent_time: t.number().int()
|
|
4824
|
+
}).passthrough(), Ma = t.object({
|
|
4818
4825
|
name: t.string().min(1).max(255),
|
|
4819
4826
|
color: t.string().max(255),
|
|
4820
4827
|
is_billable: t.boolean(),
|
|
4821
4828
|
billable_rate: t.union([t.number(), t.null()]).optional(),
|
|
4822
|
-
client_id: t.union([t.string(), t.null()]).optional()
|
|
4823
|
-
|
|
4829
|
+
client_id: t.union([t.string(), t.null()]).optional(),
|
|
4830
|
+
estimated_time: t.union([t.number(), t.null()]).optional()
|
|
4831
|
+
}).passthrough(), La = t.object({
|
|
4824
4832
|
name: t.string().max(255),
|
|
4825
4833
|
color: t.string().max(255),
|
|
4826
4834
|
is_billable: t.boolean(),
|
|
4827
4835
|
is_archived: t.boolean().optional(),
|
|
4828
4836
|
client_id: t.union([t.string(), t.null()]).optional(),
|
|
4829
|
-
billable_rate: t.union([t.number(), t.null()]).optional()
|
|
4830
|
-
|
|
4837
|
+
billable_rate: t.union([t.number(), t.null()]).optional(),
|
|
4838
|
+
estimated_time: t.union([t.number(), t.null()]).optional()
|
|
4839
|
+
}).passthrough(), ft = t.object({
|
|
4831
4840
|
id: t.string(),
|
|
4832
4841
|
billable_rate: t.union([t.number(), t.null()]),
|
|
4833
4842
|
member_id: t.string(),
|
|
4834
4843
|
project_id: t.string()
|
|
4835
|
-
}).passthrough(),
|
|
4844
|
+
}).passthrough(), Ba = t.object({
|
|
4836
4845
|
member_id: t.string().uuid(),
|
|
4837
4846
|
billable_rate: t.union([t.number(), t.null()]).optional()
|
|
4838
|
-
}).passthrough(),
|
|
4847
|
+
}).passthrough(), Da = t.object({ billable_rate: t.union([t.number(), t.null()]) }).partial().passthrough(), Pt = t.object({
|
|
4839
4848
|
id: t.string(),
|
|
4840
4849
|
name: t.string(),
|
|
4841
4850
|
created_at: t.string(),
|
|
4842
4851
|
updated_at: t.string()
|
|
4843
|
-
}).passthrough(),
|
|
4852
|
+
}).passthrough(), Fa = t.array(Pt);
|
|
4844
4853
|
t.object({ name: t.string().min(1).max(255) }).passthrough();
|
|
4845
4854
|
t.object({ name: t.string().min(1).max(255) }).passthrough();
|
|
4846
|
-
const
|
|
4855
|
+
const gt = t.object({
|
|
4847
4856
|
id: t.string(),
|
|
4848
4857
|
name: t.string(),
|
|
4849
4858
|
is_done: t.boolean(),
|
|
4850
4859
|
project_id: t.string(),
|
|
4860
|
+
estimated_time: t.union([t.number(), t.null()]),
|
|
4861
|
+
spent_time: t.number().int(),
|
|
4851
4862
|
created_at: t.string(),
|
|
4852
4863
|
updated_at: t.string()
|
|
4853
|
-
}).passthrough(),
|
|
4864
|
+
}).passthrough(), $a = t.object({
|
|
4854
4865
|
name: t.string().min(1).max(255),
|
|
4855
|
-
|
|
4856
|
-
|
|
4866
|
+
project_id: t.string(),
|
|
4867
|
+
estimated_time: t.union([t.number(), t.null()]).optional()
|
|
4868
|
+
}).passthrough(), Va = t.object({
|
|
4869
|
+
name: t.string().min(1).max(255),
|
|
4870
|
+
is_done: t.boolean().optional(),
|
|
4871
|
+
estimated_time: t.union([t.number(), t.null()]).optional()
|
|
4872
|
+
}).passthrough(), De = t.union([t.string(), t.null()]).optional(), Fe = t.object({
|
|
4857
4873
|
id: t.string(),
|
|
4858
4874
|
start: t.string(),
|
|
4859
4875
|
end: t.union([t.string(), t.null()]),
|
|
@@ -4865,7 +4881,7 @@ const ft = t.object({
|
|
|
4865
4881
|
user_id: t.string(),
|
|
4866
4882
|
tags: t.array(t.string()),
|
|
4867
4883
|
billable: t.boolean()
|
|
4868
|
-
}).passthrough(),
|
|
4884
|
+
}).passthrough(), Ha = t.object({
|
|
4869
4885
|
member_id: t.string().uuid(),
|
|
4870
4886
|
project_id: t.union([t.string(), t.null()]).optional(),
|
|
4871
4887
|
task_id: t.union([t.string(), t.null()]).optional(),
|
|
@@ -4874,7 +4890,7 @@ const ft = t.object({
|
|
|
4874
4890
|
billable: t.boolean(),
|
|
4875
4891
|
description: t.union([t.string(), t.null()]).optional(),
|
|
4876
4892
|
tags: t.union([t.array(t.string().uuid()), t.null()]).optional()
|
|
4877
|
-
}).passthrough(),
|
|
4893
|
+
}).passthrough(), Wa = t.object({
|
|
4878
4894
|
ids: t.array(t.string().uuid()),
|
|
4879
4895
|
changes: t.object({
|
|
4880
4896
|
member_id: t.string().uuid(),
|
|
@@ -4884,7 +4900,7 @@ const ft = t.object({
|
|
|
4884
4900
|
description: t.union([t.string(), t.null()]),
|
|
4885
4901
|
tags: t.union([t.array(t.string().uuid()), t.null()])
|
|
4886
4902
|
}).partial().passthrough()
|
|
4887
|
-
}).passthrough(),
|
|
4903
|
+
}).passthrough(), Qa = t.object({
|
|
4888
4904
|
member_id: t.string().uuid(),
|
|
4889
4905
|
project_id: t.union([t.string(), t.null()]),
|
|
4890
4906
|
task_id: t.union([t.string(), t.null()]),
|
|
@@ -4893,7 +4909,7 @@ const ft = t.object({
|
|
|
4893
4909
|
billable: t.boolean(),
|
|
4894
4910
|
description: t.union([t.string(), t.null()]),
|
|
4895
4911
|
tags: t.union([t.array(t.string().uuid()), t.null()])
|
|
4896
|
-
}).partial().passthrough(),
|
|
4912
|
+
}).partial().passthrough(), Ja = t.enum([
|
|
4897
4913
|
"monday",
|
|
4898
4914
|
"tuesday",
|
|
4899
4915
|
"wednesday",
|
|
@@ -4901,18 +4917,18 @@ const ft = t.object({
|
|
|
4901
4917
|
"friday",
|
|
4902
4918
|
"saturday",
|
|
4903
4919
|
"sunday"
|
|
4904
|
-
]),
|
|
4920
|
+
]), Ka = t.object({
|
|
4905
4921
|
id: t.string(),
|
|
4906
4922
|
name: t.string(),
|
|
4907
4923
|
email: t.string(),
|
|
4908
4924
|
profile_photo_url: t.string(),
|
|
4909
4925
|
timezone: t.string(),
|
|
4910
|
-
week_start:
|
|
4911
|
-
}).passthrough(),
|
|
4926
|
+
week_start: Ja
|
|
4927
|
+
}).passthrough(), Ga = t.object({
|
|
4912
4928
|
id: t.string(),
|
|
4913
4929
|
organization: t.object({ id: t.string(), name: t.string() }).passthrough(),
|
|
4914
4930
|
role: t.string()
|
|
4915
|
-
}).passthrough(),
|
|
4931
|
+
}).passthrough(), Xa = t.array(Ga), $s = Pa([
|
|
4916
4932
|
{
|
|
4917
4933
|
method: "get",
|
|
4918
4934
|
path: "/v1/organizations/:organization",
|
|
@@ -4925,7 +4941,7 @@ const ft = t.object({
|
|
|
4925
4941
|
schema: t.string()
|
|
4926
4942
|
}
|
|
4927
4943
|
],
|
|
4928
|
-
response: t.object({ data:
|
|
4944
|
+
response: t.object({ data: is }).passthrough(),
|
|
4929
4945
|
errors: [
|
|
4930
4946
|
{
|
|
4931
4947
|
status: 401,
|
|
@@ -4953,7 +4969,7 @@ const ft = t.object({
|
|
|
4953
4969
|
{
|
|
4954
4970
|
name: "body",
|
|
4955
4971
|
type: "Body",
|
|
4956
|
-
schema:
|
|
4972
|
+
schema: qa
|
|
4957
4973
|
},
|
|
4958
4974
|
{
|
|
4959
4975
|
name: "organization",
|
|
@@ -4961,7 +4977,7 @@ const ft = t.object({
|
|
|
4961
4977
|
schema: t.string()
|
|
4962
4978
|
}
|
|
4963
4979
|
],
|
|
4964
|
-
response: t.object({ data:
|
|
4980
|
+
response: t.object({ data: is }).passthrough(),
|
|
4965
4981
|
errors: [
|
|
4966
4982
|
{
|
|
4967
4983
|
status: 401,
|
|
@@ -5010,7 +5026,7 @@ const ft = t.object({
|
|
|
5010
5026
|
schema: t.enum(["true", "false", "all"]).optional()
|
|
5011
5027
|
}
|
|
5012
5028
|
],
|
|
5013
|
-
response: t.object({ data:
|
|
5029
|
+
response: t.object({ data: Na }).passthrough(),
|
|
5014
5030
|
errors: [
|
|
5015
5031
|
{
|
|
5016
5032
|
status: 401,
|
|
@@ -5054,7 +5070,7 @@ const ft = t.object({
|
|
|
5054
5070
|
schema: t.string()
|
|
5055
5071
|
}
|
|
5056
5072
|
],
|
|
5057
|
-
response: t.object({ data:
|
|
5073
|
+
response: t.object({ data: At }).passthrough(),
|
|
5058
5074
|
errors: [
|
|
5059
5075
|
{
|
|
5060
5076
|
status: 401,
|
|
@@ -5090,7 +5106,7 @@ const ft = t.object({
|
|
|
5090
5106
|
{
|
|
5091
5107
|
name: "body",
|
|
5092
5108
|
type: "Body",
|
|
5093
|
-
schema:
|
|
5109
|
+
schema: za
|
|
5094
5110
|
},
|
|
5095
5111
|
{
|
|
5096
5112
|
name: "organization",
|
|
@@ -5103,7 +5119,7 @@ const ft = t.object({
|
|
|
5103
5119
|
schema: t.string()
|
|
5104
5120
|
}
|
|
5105
5121
|
],
|
|
5106
|
-
response: t.object({ data:
|
|
5122
|
+
response: t.object({ data: At }).passthrough(),
|
|
5107
5123
|
errors: [
|
|
5108
5124
|
{
|
|
5109
5125
|
status: 401,
|
|
@@ -5175,6 +5191,51 @@ const ft = t.object({
|
|
|
5175
5191
|
}
|
|
5176
5192
|
]
|
|
5177
5193
|
},
|
|
5194
|
+
{
|
|
5195
|
+
method: "post",
|
|
5196
|
+
path: "/v1/organizations/:organization/export",
|
|
5197
|
+
alias: "exportOrganization",
|
|
5198
|
+
requestFormat: "json",
|
|
5199
|
+
parameters: [
|
|
5200
|
+
{
|
|
5201
|
+
name: "body",
|
|
5202
|
+
type: "Body",
|
|
5203
|
+
schema: t.object({}).partial().passthrough()
|
|
5204
|
+
},
|
|
5205
|
+
{
|
|
5206
|
+
name: "organization",
|
|
5207
|
+
type: "Path",
|
|
5208
|
+
schema: t.string()
|
|
5209
|
+
}
|
|
5210
|
+
],
|
|
5211
|
+
response: t.object({ success: t.boolean(), download_url: t.string() }).passthrough(),
|
|
5212
|
+
errors: [
|
|
5213
|
+
{
|
|
5214
|
+
status: 400,
|
|
5215
|
+
description: "API exception",
|
|
5216
|
+
schema: t.object({
|
|
5217
|
+
error: t.boolean(),
|
|
5218
|
+
key: t.string(),
|
|
5219
|
+
message: t.string()
|
|
5220
|
+
}).passthrough()
|
|
5221
|
+
},
|
|
5222
|
+
{
|
|
5223
|
+
status: 401,
|
|
5224
|
+
description: "Unauthenticated",
|
|
5225
|
+
schema: t.object({ message: t.string() }).passthrough()
|
|
5226
|
+
},
|
|
5227
|
+
{
|
|
5228
|
+
status: 403,
|
|
5229
|
+
description: "Authorization error",
|
|
5230
|
+
schema: t.object({ message: t.string() }).passthrough()
|
|
5231
|
+
},
|
|
5232
|
+
{
|
|
5233
|
+
status: 404,
|
|
5234
|
+
description: "Not found",
|
|
5235
|
+
schema: t.object({ message: t.string() }).passthrough()
|
|
5236
|
+
}
|
|
5237
|
+
]
|
|
5238
|
+
},
|
|
5178
5239
|
{
|
|
5179
5240
|
method: "post",
|
|
5180
5241
|
path: "/v1/organizations/:organization/import",
|
|
@@ -5184,7 +5245,7 @@ const ft = t.object({
|
|
|
5184
5245
|
{
|
|
5185
5246
|
name: "body",
|
|
5186
5247
|
type: "Body",
|
|
5187
|
-
schema:
|
|
5248
|
+
schema: Ca
|
|
5188
5249
|
},
|
|
5189
5250
|
{
|
|
5190
5251
|
name: "organization",
|
|
@@ -5287,7 +5348,7 @@ const ft = t.object({
|
|
|
5287
5348
|
}
|
|
5288
5349
|
],
|
|
5289
5350
|
response: t.object({
|
|
5290
|
-
data: t.array(
|
|
5351
|
+
data: t.array(Ia),
|
|
5291
5352
|
links: t.object({
|
|
5292
5353
|
first: t.union([t.string(), t.null()]),
|
|
5293
5354
|
last: t.union([t.string(), t.null()]),
|
|
@@ -5346,7 +5407,7 @@ const ft = t.object({
|
|
|
5346
5407
|
{
|
|
5347
5408
|
name: "body",
|
|
5348
5409
|
type: "Body",
|
|
5349
|
-
schema:
|
|
5410
|
+
schema: Ua
|
|
5350
5411
|
},
|
|
5351
5412
|
{
|
|
5352
5413
|
name: "organization",
|
|
@@ -5480,7 +5541,7 @@ const ft = t.object({
|
|
|
5480
5541
|
}
|
|
5481
5542
|
],
|
|
5482
5543
|
response: t.object({
|
|
5483
|
-
data: t.array(
|
|
5544
|
+
data: t.array(as),
|
|
5484
5545
|
links: t.object({
|
|
5485
5546
|
first: t.union([t.string(), t.null()]),
|
|
5486
5547
|
last: t.union([t.string(), t.null()]),
|
|
@@ -5539,7 +5600,7 @@ const ft = t.object({
|
|
|
5539
5600
|
{
|
|
5540
5601
|
name: "body",
|
|
5541
5602
|
type: "Body",
|
|
5542
|
-
schema:
|
|
5603
|
+
schema: Za
|
|
5543
5604
|
},
|
|
5544
5605
|
{
|
|
5545
5606
|
name: "organization",
|
|
@@ -5552,7 +5613,7 @@ const ft = t.object({
|
|
|
5552
5613
|
schema: t.string()
|
|
5553
5614
|
}
|
|
5554
5615
|
],
|
|
5555
|
-
response: t.object({ data:
|
|
5616
|
+
response: t.object({ data: as }).passthrough(),
|
|
5556
5617
|
errors: [
|
|
5557
5618
|
{
|
|
5558
5619
|
status: 400,
|
|
@@ -5683,6 +5744,56 @@ const ft = t.object({
|
|
|
5683
5744
|
}
|
|
5684
5745
|
]
|
|
5685
5746
|
},
|
|
5747
|
+
{
|
|
5748
|
+
method: "post",
|
|
5749
|
+
path: "/v1/organizations/:organization/members/:member/make-placeholder",
|
|
5750
|
+
alias: "v1.members.make-placeholder",
|
|
5751
|
+
requestFormat: "json",
|
|
5752
|
+
parameters: [
|
|
5753
|
+
{
|
|
5754
|
+
name: "body",
|
|
5755
|
+
type: "Body",
|
|
5756
|
+
schema: t.object({}).partial().passthrough()
|
|
5757
|
+
},
|
|
5758
|
+
{
|
|
5759
|
+
name: "organization",
|
|
5760
|
+
type: "Path",
|
|
5761
|
+
schema: t.string()
|
|
5762
|
+
},
|
|
5763
|
+
{
|
|
5764
|
+
name: "member",
|
|
5765
|
+
type: "Path",
|
|
5766
|
+
schema: t.string()
|
|
5767
|
+
}
|
|
5768
|
+
],
|
|
5769
|
+
response: t.null(),
|
|
5770
|
+
errors: [
|
|
5771
|
+
{
|
|
5772
|
+
status: 400,
|
|
5773
|
+
description: "API exception",
|
|
5774
|
+
schema: t.object({
|
|
5775
|
+
error: t.boolean(),
|
|
5776
|
+
key: t.string(),
|
|
5777
|
+
message: t.string()
|
|
5778
|
+
}).passthrough()
|
|
5779
|
+
},
|
|
5780
|
+
{
|
|
5781
|
+
status: 401,
|
|
5782
|
+
description: "Unauthenticated",
|
|
5783
|
+
schema: t.object({ message: t.string() }).passthrough()
|
|
5784
|
+
},
|
|
5785
|
+
{
|
|
5786
|
+
status: 403,
|
|
5787
|
+
description: "Authorization error",
|
|
5788
|
+
schema: t.object({ message: t.string() }).passthrough()
|
|
5789
|
+
},
|
|
5790
|
+
{
|
|
5791
|
+
status: 404,
|
|
5792
|
+
description: "Not found",
|
|
5793
|
+
schema: t.object({ message: t.string() }).passthrough()
|
|
5794
|
+
}
|
|
5795
|
+
]
|
|
5796
|
+
},
|
|
5686
5797
|
{
|
|
5687
5798
|
method: "put",
|
|
5688
5799
|
path: "/v1/organizations/:organization/project-members/:projectMember",
|
|
@@ -5692,7 +5803,7 @@ const ft = t.object({
|
|
|
5692
5803
|
{
|
|
5693
5804
|
name: "body",
|
|
5694
5805
|
type: "Body",
|
|
5695
|
-
schema:
|
|
5806
|
+
schema: Da
|
|
5696
5807
|
},
|
|
5697
5808
|
{
|
|
5698
5809
|
name: "organization",
|
|
@@ -5705,7 +5816,7 @@ const ft = t.object({
|
|
|
5705
5816
|
schema: t.string()
|
|
5706
5817
|
}
|
|
5707
5818
|
],
|
|
5708
|
-
response: t.object({ data:
|
|
5819
|
+
response: t.object({ data: ft }).passthrough(),
|
|
5709
5820
|
errors: [
|
|
5710
5821
|
{
|
|
5711
5822
|
status: 401,
|
|
@@ -5791,7 +5902,7 @@ const ft = t.object({
|
|
|
5791
5902
|
}
|
|
5792
5903
|
],
|
|
5793
5904
|
response: t.object({
|
|
5794
|
-
data: t.array(
|
|
5905
|
+
data: t.array(Be),
|
|
5795
5906
|
links: t.object({
|
|
5796
5907
|
first: t.union([t.string(), t.null()]),
|
|
5797
5908
|
last: t.union([t.string(), t.null()]),
|
|
@@ -5850,7 +5961,7 @@ const ft = t.object({
|
|
|
5850
5961
|
{
|
|
5851
5962
|
name: "body",
|
|
5852
5963
|
type: "Body",
|
|
5853
|
-
schema:
|
|
5964
|
+
schema: Ma
|
|
5854
5965
|
},
|
|
5855
5966
|
{
|
|
5856
5967
|
name: "organization",
|
|
@@ -5858,7 +5969,7 @@ const ft = t.object({
|
|
|
5858
5969
|
schema: t.string()
|
|
5859
5970
|
}
|
|
5860
5971
|
],
|
|
5861
|
-
response: t.object({ data:
|
|
5972
|
+
response: t.object({ data: Be }).passthrough(),
|
|
5862
5973
|
errors: [
|
|
5863
5974
|
{
|
|
5864
5975
|
status: 401,
|
|
@@ -5902,7 +6013,7 @@ const ft = t.object({
|
|
|
5902
6013
|
schema: t.string()
|
|
5903
6014
|
}
|
|
5904
6015
|
],
|
|
5905
|
-
response: t.object({ data:
|
|
6016
|
+
response: t.object({ data: Be }).passthrough(),
|
|
5906
6017
|
errors: [
|
|
5907
6018
|
{
|
|
5908
6019
|
status: 401,
|
|
@@ -5930,7 +6041,7 @@ const ft = t.object({
|
|
|
5930
6041
|
{
|
|
5931
6042
|
name: "body",
|
|
5932
6043
|
type: "Body",
|
|
5933
|
-
schema:
|
|
6044
|
+
schema: La
|
|
5934
6045
|
},
|
|
5935
6046
|
{
|
|
5936
6047
|
name: "organization",
|
|
@@ -5943,7 +6054,7 @@ const ft = t.object({
|
|
|
5943
6054
|
schema: t.string()
|
|
5944
6055
|
}
|
|
5945
6056
|
],
|
|
5946
|
-
response: t.object({ data:
|
|
6057
|
+
response: t.object({ data: Be }).passthrough(),
|
|
5947
6058
|
errors: [
|
|
5948
6059
|
{
|
|
5949
6060
|
status: 401,
|
|
@@ -6033,7 +6144,7 @@ const ft = t.object({
|
|
|
6033
6144
|
}
|
|
6034
6145
|
],
|
|
6035
6146
|
response: t.object({
|
|
6036
|
-
data: t.array(
|
|
6147
|
+
data: t.array(ft),
|
|
6037
6148
|
links: t.object({
|
|
6038
6149
|
first: t.union([t.string(), t.null()]),
|
|
6039
6150
|
last: t.union([t.string(), t.null()]),
|
|
@@ -6084,7 +6195,7 @@ const ft = t.object({
|
|
|
6084
6195
|
{
|
|
6085
6196
|
name: "body",
|
|
6086
6197
|
type: "Body",
|
|
6087
|
-
schema:
|
|
6198
|
+
schema: Ba
|
|
6088
6199
|
},
|
|
6089
6200
|
{
|
|
6090
6201
|
name: "organization",
|
|
@@ -6097,7 +6208,7 @@ const ft = t.object({
|
|
|
6097
6208
|
schema: t.string()
|
|
6098
6209
|
}
|
|
6099
6210
|
],
|
|
6100
|
-
response: t.object({ data:
|
|
6211
|
+
response: t.object({ data: ft }).passthrough(),
|
|
6101
6212
|
errors: [
|
|
6102
6213
|
{
|
|
6103
6214
|
status: 400,
|
|
@@ -6145,7 +6256,7 @@ const ft = t.object({
|
|
|
6145
6256
|
schema: t.string()
|
|
6146
6257
|
}
|
|
6147
6258
|
],
|
|
6148
|
-
response: t.object({ data:
|
|
6259
|
+
response: t.object({ data: Fa }).passthrough(),
|
|
6149
6260
|
errors: [
|
|
6150
6261
|
{
|
|
6151
6262
|
status: 401,
|
|
@@ -6181,7 +6292,7 @@ const ft = t.object({
|
|
|
6181
6292
|
schema: t.string()
|
|
6182
6293
|
}
|
|
6183
6294
|
],
|
|
6184
|
-
response: t.object({ data:
|
|
6295
|
+
response: t.object({ data: Pt }).passthrough(),
|
|
6185
6296
|
errors: [
|
|
6186
6297
|
{
|
|
6187
6298
|
status: 401,
|
|
@@ -6230,7 +6341,7 @@ const ft = t.object({
|
|
|
6230
6341
|
schema: t.string()
|
|
6231
6342
|
}
|
|
6232
6343
|
],
|
|
6233
|
-
response: t.object({ data:
|
|
6344
|
+
response: t.object({ data: Pt }).passthrough(),
|
|
6234
6345
|
errors: [
|
|
6235
6346
|
{
|
|
6236
6347
|
status: 401,
|
|
@@ -6325,7 +6436,7 @@ const ft = t.object({
|
|
|
6325
6436
|
}
|
|
6326
6437
|
],
|
|
6327
6438
|
response: t.object({
|
|
6328
|
-
data: t.array(
|
|
6439
|
+
data: t.array(gt),
|
|
6329
6440
|
links: t.object({
|
|
6330
6441
|
first: t.union([t.string(), t.null()]),
|
|
6331
6442
|
last: t.union([t.string(), t.null()]),
|
|
@@ -6384,7 +6495,7 @@ const ft = t.object({
|
|
|
6384
6495
|
{
|
|
6385
6496
|
name: "body",
|
|
6386
6497
|
type: "Body",
|
|
6387
|
-
schema:
|
|
6498
|
+
schema: $a
|
|
6388
6499
|
},
|
|
6389
6500
|
{
|
|
6390
6501
|
name: "organization",
|
|
@@ -6392,7 +6503,7 @@ const ft = t.object({
|
|
|
6392
6503
|
schema: t.string()
|
|
6393
6504
|
}
|
|
6394
6505
|
],
|
|
6395
|
-
response: t.object({ data:
|
|
6506
|
+
response: t.object({ data: gt }).passthrough(),
|
|
6396
6507
|
errors: [
|
|
6397
6508
|
{
|
|
6398
6509
|
status: 401,
|
|
@@ -6428,7 +6539,7 @@ const ft = t.object({
|
|
|
6428
6539
|
{
|
|
6429
6540
|
name: "body",
|
|
6430
6541
|
type: "Body",
|
|
6431
|
-
schema:
|
|
6542
|
+
schema: Va
|
|
6432
6543
|
},
|
|
6433
6544
|
{
|
|
6434
6545
|
name: "organization",
|
|
@@ -6441,7 +6552,7 @@ const ft = t.object({
|
|
|
6441
6552
|
schema: t.string()
|
|
6442
6553
|
}
|
|
6443
6554
|
],
|
|
6444
|
-
response: t.object({ data:
|
|
6555
|
+
response: t.object({ data: gt }).passthrough(),
|
|
6445
6556
|
errors: [
|
|
6446
6557
|
{
|
|
6447
6558
|
status: 401,
|
|
@@ -6534,12 +6645,12 @@ Users with the permission `time-entries:view:own` can only use this en
|
|
|
6534
6645
|
{
|
|
6535
6646
|
name: "start",
|
|
6536
6647
|
type: "Query",
|
|
6537
|
-
schema:
|
|
6648
|
+
schema: De
|
|
6538
6649
|
},
|
|
6539
6650
|
{
|
|
6540
6651
|
name: "end",
|
|
6541
6652
|
type: "Query",
|
|
6542
|
-
schema:
|
|
6653
|
+
schema: De
|
|
6543
6654
|
},
|
|
6544
6655
|
{
|
|
6545
6656
|
name: "active",
|
|
@@ -6556,6 +6667,11 @@ Users with the permission `time-entries:view:own` can only use this en
|
|
|
6556
6667
|
type: "Query",
|
|
6557
6668
|
schema: t.number().int().gte(1).lte(500).optional()
|
|
6558
6669
|
},
|
|
6670
|
+
{
|
|
6671
|
+
name: "offset",
|
|
6672
|
+
type: "Query",
|
|
6673
|
+
schema: t.number().int().gte(0).optional()
|
|
6674
|
+
},
|
|
6559
6675
|
{
|
|
6560
6676
|
name: "only_full_dates",
|
|
6561
6677
|
type: "Query",
|
|
@@ -6567,24 +6683,24 @@ Users with the permission `time-entries:view:own` can only use this en
|
|
|
6567
6683
|
schema: t.array(t.string().uuid()).min(1).optional()
|
|
6568
6684
|
},
|
|
6569
6685
|
{
|
|
6570
|
-
name: "
|
|
6686
|
+
name: "client_ids",
|
|
6571
6687
|
type: "Query",
|
|
6572
6688
|
schema: t.array(t.string().uuid()).min(1).optional()
|
|
6573
6689
|
},
|
|
6574
6690
|
{
|
|
6575
|
-
name: "
|
|
6691
|
+
name: "project_ids",
|
|
6576
6692
|
type: "Query",
|
|
6577
6693
|
schema: t.array(t.string().uuid()).min(1).optional()
|
|
6578
6694
|
},
|
|
6579
6695
|
{
|
|
6580
|
-
name: "
|
|
6696
|
+
name: "tag_ids",
|
|
6581
6697
|
type: "Query",
|
|
6582
6698
|
schema: t.array(t.string().uuid()).min(1).optional()
|
|
6583
6699
|
},
|
|
6584
6700
|
{
|
|
6585
|
-
name: "
|
|
6701
|
+
name: "task_ids",
|
|
6586
6702
|
type: "Query",
|
|
6587
|
-
schema: t.string().optional()
|
|
6703
|
+
schema: t.array(t.string().uuid()).min(1).optional()
|
|
6588
6704
|
},
|
|
6589
6705
|
{
|
|
6590
6706
|
name: "user_id",
|
|
@@ -6592,7 +6708,10 @@ Users with the permission `time-entries:view:own` can only use this en
|
|
|
6592
6708
|
schema: t.string().optional()
|
|
6593
6709
|
}
|
|
6594
6710
|
],
|
|
6595
|
-
response: t.object({
|
|
6711
|
+
response: t.object({
|
|
6712
|
+
data: t.array(Fe),
|
|
6713
|
+
meta: t.object({ total: t.number().int() }).passthrough()
|
|
6714
|
+
}).passthrough(),
|
|
6596
6715
|
errors: [
|
|
6597
6716
|
{
|
|
6598
6717
|
status: 401,
|
|
@@ -6628,7 +6747,7 @@ Users with the permission `time-entries:view:own` can only use this en
|
|
|
6628
6747
|
{
|
|
6629
6748
|
name: "body",
|
|
6630
6749
|
type: "Body",
|
|
6631
|
-
schema:
|
|
6750
|
+
schema: Ha
|
|
6632
6751
|
},
|
|
6633
6752
|
{
|
|
6634
6753
|
name: "organization",
|
|
@@ -6636,7 +6755,7 @@ Users with the permission `time-entries:view:own` can only use this en
|
|
|
6636
6755
|
schema: t.string()
|
|
6637
6756
|
}
|
|
6638
6757
|
],
|
|
6639
|
-
response: t.object({ data:
|
|
6758
|
+
response: t.object({ data: Fe }).passthrough(),
|
|
6640
6759
|
errors: [
|
|
6641
6760
|
{
|
|
6642
6761
|
status: 400,
|
|
@@ -6681,7 +6800,7 @@ Users with the permission `time-entries:view:own` can only use this en
|
|
|
6681
6800
|
{
|
|
6682
6801
|
name: "body",
|
|
6683
6802
|
type: "Body",
|
|
6684
|
-
schema:
|
|
6803
|
+
schema: Wa
|
|
6685
6804
|
},
|
|
6686
6805
|
{
|
|
6687
6806
|
name: "organization",
|
|
@@ -6716,6 +6835,50 @@ Users with the permission `time-entries:view:own` can only use this en
|
|
|
6716
6835
|
}
|
|
6717
6836
|
]
|
|
6718
6837
|
},
|
|
6838
|
+
{
|
|
6839
|
+
method: "delete",
|
|
6840
|
+
path: "/v1/organizations/:organization/time-entries",
|
|
6841
|
+
alias: "deleteTimeEntries",
|
|
6842
|
+
requestFormat: "json",
|
|
6843
|
+
parameters: [
|
|
6844
|
+
{
|
|
6845
|
+
name: "organization",
|
|
6846
|
+
type: "Path",
|
|
6847
|
+
schema: t.string()
|
|
6848
|
+
},
|
|
6849
|
+
{
|
|
6850
|
+
name: "ids",
|
|
6851
|
+
type: "Query",
|
|
6852
|
+
schema: t.array(t.string().uuid())
|
|
6853
|
+
}
|
|
6854
|
+
],
|
|
6855
|
+
response: t.object({ success: t.string(), error: t.string() }).passthrough(),
|
|
6856
|
+
errors: [
|
|
6857
|
+
{
|
|
6858
|
+
status: 401,
|
|
6859
|
+
description: "Unauthenticated",
|
|
6860
|
+
schema: t.object({ message: t.string() }).passthrough()
|
|
6861
|
+
},
|
|
6862
|
+
{
|
|
6863
|
+
status: 403,
|
|
6864
|
+
description: "Authorization error",
|
|
6865
|
+
schema: t.object({ message: t.string() }).passthrough()
|
|
6866
|
+
},
|
|
6867
|
+
{
|
|
6868
|
+
status: 404,
|
|
6869
|
+
description: "Not found",
|
|
6870
|
+
schema: t.object({ message: t.string() }).passthrough()
|
|
6871
|
+
},
|
|
6872
|
+
{
|
|
6873
|
+
status: 422,
|
|
6874
|
+
description: "Validation error",
|
|
6875
|
+
schema: t.object({
|
|
6876
|
+
message: t.string(),
|
|
6877
|
+
errors: t.record(t.array(t.string()))
|
|
6878
|
+
}).passthrough()
|
|
6879
|
+
}
|
|
6880
|
+
]
|
|
6881
|
+
},
|
|
6719
6882
|
{
|
|
6720
6883
|
method: "put",
|
|
6721
6884
|
path: "/v1/organizations/:organization/time-entries/:timeEntry",
|
|
@@ -6725,7 +6888,7 @@ Users with the permission `time-entries:view:own` can only use this en
|
|
|
6725
6888
|
{
|
|
6726
6889
|
name: "body",
|
|
6727
6890
|
type: "Body",
|
|
6728
|
-
schema:
|
|
6891
|
+
schema: Qa
|
|
6729
6892
|
},
|
|
6730
6893
|
{
|
|
6731
6894
|
name: "organization",
|
|
@@ -6738,7 +6901,7 @@ Users with the permission `time-entries:view:own` can only use this en
|
|
|
6738
6901
|
schema: t.string()
|
|
6739
6902
|
}
|
|
6740
6903
|
],
|
|
6741
|
-
response: t.object({ data:
|
|
6904
|
+
response: t.object({ data: Fe }).passthrough(),
|
|
6742
6905
|
errors: [
|
|
6743
6906
|
{
|
|
6744
6907
|
status: 400,
|
|
@@ -6836,7 +6999,8 @@ If the group parameters are all set to `null` or are all missing, the
|
|
|
6836
6999
|
"project",
|
|
6837
7000
|
"task",
|
|
6838
7001
|
"client",
|
|
6839
|
-
"billable"
|
|
7002
|
+
"billable",
|
|
7003
|
+
"description"
|
|
6840
7004
|
]).optional()
|
|
6841
7005
|
},
|
|
6842
7006
|
{
|
|
@@ -6851,7 +7015,8 @@ If the group parameters are all set to `null` or are all missing, the
|
|
|
6851
7015
|
"project",
|
|
6852
7016
|
"task",
|
|
6853
7017
|
"client",
|
|
6854
|
-
"billable"
|
|
7018
|
+
"billable",
|
|
7019
|
+
"description"
|
|
6855
7020
|
]).optional()
|
|
6856
7021
|
},
|
|
6857
7022
|
{
|
|
@@ -6867,12 +7032,12 @@ If the group parameters are all set to `null` or are all missing, the
|
|
|
6867
7032
|
{
|
|
6868
7033
|
name: "start",
|
|
6869
7034
|
type: "Query",
|
|
6870
|
-
schema:
|
|
7035
|
+
schema: De
|
|
6871
7036
|
},
|
|
6872
7037
|
{
|
|
6873
7038
|
name: "end",
|
|
6874
7039
|
type: "Query",
|
|
6875
|
-
schema:
|
|
7040
|
+
schema: De
|
|
6876
7041
|
},
|
|
6877
7042
|
{
|
|
6878
7043
|
name: "active",
|
|
@@ -6983,7 +7148,7 @@ If the group parameters are all set to `null` or are all missing, the
|
|
|
6983
7148
|
alias: "getMe",
|
|
6984
7149
|
description: "This endpoint is independent of organization.",
|
|
6985
7150
|
requestFormat: "json",
|
|
6986
|
-
response: t.object({ data:
|
|
7151
|
+
response: t.object({ data: Ka }).passthrough(),
|
|
6987
7152
|
errors: [
|
|
6988
7153
|
{
|
|
6989
7154
|
status: 401,
|
|
@@ -7003,7 +7168,7 @@ If the group parameters are all set to `null` or are all missing, the
|
|
|
7003
7168
|
alias: "getMyMemberships",
|
|
7004
7169
|
description: "This endpoint is independent of organization.",
|
|
7005
7170
|
requestFormat: "json",
|
|
7006
|
-
response: t.object({ data:
|
|
7171
|
+
response: t.object({ data: Xa }).passthrough(),
|
|
7007
7172
|
errors: [
|
|
7008
7173
|
{
|
|
7009
7174
|
status: 401,
|
|
@@ -7023,7 +7188,7 @@ If the group parameters are all set to `null` or are all missing, the
|
|
|
7023
7188
|
alias: "getMyActiveTimeEntry",
|
|
7024
7189
|
description: "This endpoint is independent of organization.",
|
|
7025
7190
|
requestFormat: "json",
|
|
7026
|
-
response: t.object({ data:
|
|
7191
|
+
response: t.object({ data: Fe }).passthrough(),
|
|
7027
7192
|
errors: [
|
|
7028
7193
|
{
|
|
7029
7194
|
status: 401,
|
|
@@ -7038,11 +7203,12 @@ If the group parameters are all set to `null` or are all missing, the
|
|
|
7038
7203
|
]
|
|
7039
7204
|
}
|
|
7040
7205
|
]);
|
|
7041
|
-
new
|
|
7042
|
-
function
|
|
7043
|
-
return new
|
|
7206
|
+
new Ds("/api", $s);
|
|
7207
|
+
function Ya(s, e) {
|
|
7208
|
+
return new Ds(s, $s, e);
|
|
7044
7209
|
}
|
|
7045
|
-
const
|
|
7210
|
+
const ei = Ya("/api", { validate: "none" });
|
|
7046
7211
|
export {
|
|
7047
|
-
|
|
7212
|
+
ei as api,
|
|
7213
|
+
Ya as createApiClient
|
|
7048
7214
|
};
|