@getsupertab/supertab-js 3.63.1 → 3.64.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pkg/prod/browser-ponyfill-DcUxEUTR.js +319 -0
- package/dist/pkg/prod/chunk-NnHqS4_Y.js +20 -0
- package/dist/pkg/prod/env-DVv1BfVl.js +3673 -0
- package/dist/pkg/prod/sentry-BLjG2igB.js +8557 -0
- package/dist/pkg/prod/supertab.js +48967 -4
- package/dist/pkg/prod/tailwind-Bf9DVZuD.js +4 -0
- package/package.json +10 -10
- package/dist/pkg/prod/browser-ponyfill-DEpfP7qr.js +0 -341
- package/dist/pkg/prod/index-CbrAYOEk.js +0 -63973
- package/dist/pkg/prod/sentry-DRloRAIc.js +0 -11221
- package/dist/pkg/prod/tailwind-BK-2Qnw7.js +0 -4
|
@@ -0,0 +1,3673 @@
|
|
|
1
|
+
import { t as e } from "./chunk-NnHqS4_Y.js";
|
|
2
|
+
//#region node_modules/react/cjs/react.production.js
|
|
3
|
+
var t = /* @__PURE__ */ e(((e) => {
|
|
4
|
+
var t = Symbol.for("react.transitional.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), o = Symbol.for("react.consumer"), s = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), u = Symbol.for("react.memo"), d = Symbol.for("react.lazy"), f = Symbol.for("react.activity"), p = Symbol.iterator;
|
|
5
|
+
function m(e) {
|
|
6
|
+
return typeof e != "object" || !e ? null : (e = p && e[p] || e["@@iterator"], typeof e == "function" ? e : null);
|
|
7
|
+
}
|
|
8
|
+
var h = {
|
|
9
|
+
isMounted: function() {
|
|
10
|
+
return !1;
|
|
11
|
+
},
|
|
12
|
+
enqueueForceUpdate: function() {},
|
|
13
|
+
enqueueReplaceState: function() {},
|
|
14
|
+
enqueueSetState: function() {}
|
|
15
|
+
}, g = Object.assign, _ = {};
|
|
16
|
+
function v(e, t, n) {
|
|
17
|
+
this.props = e, this.context = t, this.refs = _, this.updater = n || h;
|
|
18
|
+
}
|
|
19
|
+
v.prototype.isReactComponent = {}, v.prototype.setState = function(e, t) {
|
|
20
|
+
if (typeof e != "object" && typeof e != "function" && e != null) throw Error("takes an object of state variables to update or a function which returns an object of state variables.");
|
|
21
|
+
this.updater.enqueueSetState(this, e, t, "setState");
|
|
22
|
+
}, v.prototype.forceUpdate = function(e) {
|
|
23
|
+
this.updater.enqueueForceUpdate(this, e, "forceUpdate");
|
|
24
|
+
};
|
|
25
|
+
function ee() {}
|
|
26
|
+
ee.prototype = v.prototype;
|
|
27
|
+
function y(e, t, n) {
|
|
28
|
+
this.props = e, this.context = t, this.refs = _, this.updater = n || h;
|
|
29
|
+
}
|
|
30
|
+
var b = y.prototype = new ee();
|
|
31
|
+
b.constructor = y, g(b, v.prototype), b.isPureReactComponent = !0;
|
|
32
|
+
var x = Array.isArray;
|
|
33
|
+
function S() {}
|
|
34
|
+
var C = {
|
|
35
|
+
H: null,
|
|
36
|
+
A: null,
|
|
37
|
+
T: null,
|
|
38
|
+
S: null
|
|
39
|
+
}, w = Object.prototype.hasOwnProperty;
|
|
40
|
+
function T(e, n, r) {
|
|
41
|
+
var i = r.ref;
|
|
42
|
+
return {
|
|
43
|
+
$$typeof: t,
|
|
44
|
+
type: e,
|
|
45
|
+
key: n,
|
|
46
|
+
ref: i === void 0 ? null : i,
|
|
47
|
+
props: r
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function E(e, t) {
|
|
51
|
+
return T(e.type, t, e.props);
|
|
52
|
+
}
|
|
53
|
+
function D(e) {
|
|
54
|
+
return typeof e == "object" && !!e && e.$$typeof === t;
|
|
55
|
+
}
|
|
56
|
+
function te(e) {
|
|
57
|
+
var t = {
|
|
58
|
+
"=": "=0",
|
|
59
|
+
":": "=2"
|
|
60
|
+
};
|
|
61
|
+
return "$" + e.replace(/[=:]/g, function(e) {
|
|
62
|
+
return t[e];
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
var O = /\/+/g;
|
|
66
|
+
function k(e, t) {
|
|
67
|
+
return typeof e == "object" && e && e.key != null ? te("" + e.key) : t.toString(36);
|
|
68
|
+
}
|
|
69
|
+
function A(e) {
|
|
70
|
+
switch (e.status) {
|
|
71
|
+
case "fulfilled": return e.value;
|
|
72
|
+
case "rejected": throw e.reason;
|
|
73
|
+
default: switch (typeof e.status == "string" ? e.then(S, S) : (e.status = "pending", e.then(function(t) {
|
|
74
|
+
e.status === "pending" && (e.status = "fulfilled", e.value = t);
|
|
75
|
+
}, function(t) {
|
|
76
|
+
e.status === "pending" && (e.status = "rejected", e.reason = t);
|
|
77
|
+
})), e.status) {
|
|
78
|
+
case "fulfilled": return e.value;
|
|
79
|
+
case "rejected": throw e.reason;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
throw e;
|
|
83
|
+
}
|
|
84
|
+
function j(e, r, i, a, o) {
|
|
85
|
+
var s = typeof e;
|
|
86
|
+
(s === "undefined" || s === "boolean") && (e = null);
|
|
87
|
+
var c = !1;
|
|
88
|
+
if (e === null) c = !0;
|
|
89
|
+
else switch (s) {
|
|
90
|
+
case "bigint":
|
|
91
|
+
case "string":
|
|
92
|
+
case "number":
|
|
93
|
+
c = !0;
|
|
94
|
+
break;
|
|
95
|
+
case "object": switch (e.$$typeof) {
|
|
96
|
+
case t:
|
|
97
|
+
case n:
|
|
98
|
+
c = !0;
|
|
99
|
+
break;
|
|
100
|
+
case d: return c = e._init, j(c(e._payload), r, i, a, o);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
if (c) return o = o(e), c = a === "" ? "." + k(e, 0) : a, x(o) ? (i = "", c != null && (i = c.replace(O, "$&/") + "/"), j(o, r, i, "", function(e) {
|
|
104
|
+
return e;
|
|
105
|
+
})) : o != null && (D(o) && (o = E(o, i + (o.key == null || e && e.key === o.key ? "" : ("" + o.key).replace(O, "$&/") + "/") + c)), r.push(o)), 1;
|
|
106
|
+
c = 0;
|
|
107
|
+
var l = a === "" ? "." : a + ":";
|
|
108
|
+
if (x(e)) for (var u = 0; u < e.length; u++) a = e[u], s = l + k(a, u), c += j(a, r, i, s, o);
|
|
109
|
+
else if (u = m(e), typeof u == "function") for (e = u.call(e), u = 0; !(a = e.next()).done;) a = a.value, s = l + k(a, u++), c += j(a, r, i, s, o);
|
|
110
|
+
else if (s === "object") {
|
|
111
|
+
if (typeof e.then == "function") return j(A(e), r, i, a, o);
|
|
112
|
+
throw r = String(e), Error("Objects are not valid as a React child (found: " + (r === "[object Object]" ? "object with keys {" + Object.keys(e).join(", ") + "}" : r) + "). If you meant to render a collection of children, use an array instead.");
|
|
113
|
+
}
|
|
114
|
+
return c;
|
|
115
|
+
}
|
|
116
|
+
function M(e, t, n) {
|
|
117
|
+
if (e == null) return e;
|
|
118
|
+
var r = [], i = 0;
|
|
119
|
+
return j(e, r, "", "", function(e) {
|
|
120
|
+
return t.call(n, e, i++);
|
|
121
|
+
}), r;
|
|
122
|
+
}
|
|
123
|
+
function ne(e) {
|
|
124
|
+
if (e._status === -1) {
|
|
125
|
+
var t = e._result;
|
|
126
|
+
t = t(), t.then(function(t) {
|
|
127
|
+
(e._status === 0 || e._status === -1) && (e._status = 1, e._result = t);
|
|
128
|
+
}, function(t) {
|
|
129
|
+
(e._status === 0 || e._status === -1) && (e._status = 2, e._result = t);
|
|
130
|
+
}), e._status === -1 && (e._status = 0, e._result = t);
|
|
131
|
+
}
|
|
132
|
+
if (e._status === 1) return e._result.default;
|
|
133
|
+
throw e._result;
|
|
134
|
+
}
|
|
135
|
+
var re = typeof reportError == "function" ? reportError : function(e) {
|
|
136
|
+
if (typeof window == "object" && typeof window.ErrorEvent == "function") {
|
|
137
|
+
var t = new window.ErrorEvent("error", {
|
|
138
|
+
bubbles: !0,
|
|
139
|
+
cancelable: !0,
|
|
140
|
+
message: typeof e == "object" && e && typeof e.message == "string" ? String(e.message) : String(e),
|
|
141
|
+
error: e
|
|
142
|
+
});
|
|
143
|
+
if (!window.dispatchEvent(t)) return;
|
|
144
|
+
} else if (typeof process == "object" && typeof process.emit == "function") {
|
|
145
|
+
process.emit("uncaughtException", e);
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
console.error(e);
|
|
149
|
+
}, N = {
|
|
150
|
+
map: M,
|
|
151
|
+
forEach: function(e, t, n) {
|
|
152
|
+
M(e, function() {
|
|
153
|
+
t.apply(this, arguments);
|
|
154
|
+
}, n);
|
|
155
|
+
},
|
|
156
|
+
count: function(e) {
|
|
157
|
+
var t = 0;
|
|
158
|
+
return M(e, function() {
|
|
159
|
+
t++;
|
|
160
|
+
}), t;
|
|
161
|
+
},
|
|
162
|
+
toArray: function(e) {
|
|
163
|
+
return M(e, function(e) {
|
|
164
|
+
return e;
|
|
165
|
+
}) || [];
|
|
166
|
+
},
|
|
167
|
+
only: function(e) {
|
|
168
|
+
if (!D(e)) throw Error("React.Children.only expected to receive a single React element child.");
|
|
169
|
+
return e;
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
e.Activity = f, e.Children = N, e.Component = v, e.Fragment = r, e.Profiler = a, e.PureComponent = y, e.StrictMode = i, e.Suspense = l, e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = C, e.__COMPILER_RUNTIME = {
|
|
173
|
+
__proto__: null,
|
|
174
|
+
c: function(e) {
|
|
175
|
+
return C.H.useMemoCache(e);
|
|
176
|
+
}
|
|
177
|
+
}, e.cache = function(e) {
|
|
178
|
+
return function() {
|
|
179
|
+
return e.apply(null, arguments);
|
|
180
|
+
};
|
|
181
|
+
}, e.cacheSignal = function() {
|
|
182
|
+
return null;
|
|
183
|
+
}, e.cloneElement = function(e, t, n) {
|
|
184
|
+
if (e == null) throw Error("The argument must be a React element, but you passed " + e + ".");
|
|
185
|
+
var r = g({}, e.props), i = e.key;
|
|
186
|
+
if (t != null) for (a in t.key !== void 0 && (i = "" + t.key), t) !w.call(t, a) || a === "key" || a === "__self" || a === "__source" || a === "ref" && t.ref === void 0 || (r[a] = t[a]);
|
|
187
|
+
var a = arguments.length - 2;
|
|
188
|
+
if (a === 1) r.children = n;
|
|
189
|
+
else if (1 < a) {
|
|
190
|
+
for (var o = Array(a), s = 0; s < a; s++) o[s] = arguments[s + 2];
|
|
191
|
+
r.children = o;
|
|
192
|
+
}
|
|
193
|
+
return T(e.type, i, r);
|
|
194
|
+
}, e.createContext = function(e) {
|
|
195
|
+
return e = {
|
|
196
|
+
$$typeof: s,
|
|
197
|
+
_currentValue: e,
|
|
198
|
+
_currentValue2: e,
|
|
199
|
+
_threadCount: 0,
|
|
200
|
+
Provider: null,
|
|
201
|
+
Consumer: null
|
|
202
|
+
}, e.Provider = e, e.Consumer = {
|
|
203
|
+
$$typeof: o,
|
|
204
|
+
_context: e
|
|
205
|
+
}, e;
|
|
206
|
+
}, e.createElement = function(e, t, n) {
|
|
207
|
+
var r, i = {}, a = null;
|
|
208
|
+
if (t != null) for (r in t.key !== void 0 && (a = "" + t.key), t) w.call(t, r) && r !== "key" && r !== "__self" && r !== "__source" && (i[r] = t[r]);
|
|
209
|
+
var o = arguments.length - 2;
|
|
210
|
+
if (o === 1) i.children = n;
|
|
211
|
+
else if (1 < o) {
|
|
212
|
+
for (var s = Array(o), c = 0; c < o; c++) s[c] = arguments[c + 2];
|
|
213
|
+
i.children = s;
|
|
214
|
+
}
|
|
215
|
+
if (e && e.defaultProps) for (r in o = e.defaultProps, o) i[r] === void 0 && (i[r] = o[r]);
|
|
216
|
+
return T(e, a, i);
|
|
217
|
+
}, e.createRef = function() {
|
|
218
|
+
return { current: null };
|
|
219
|
+
}, e.forwardRef = function(e) {
|
|
220
|
+
return {
|
|
221
|
+
$$typeof: c,
|
|
222
|
+
render: e
|
|
223
|
+
};
|
|
224
|
+
}, e.isValidElement = D, e.lazy = function(e) {
|
|
225
|
+
return {
|
|
226
|
+
$$typeof: d,
|
|
227
|
+
_payload: {
|
|
228
|
+
_status: -1,
|
|
229
|
+
_result: e
|
|
230
|
+
},
|
|
231
|
+
_init: ne
|
|
232
|
+
};
|
|
233
|
+
}, e.memo = function(e, t) {
|
|
234
|
+
return {
|
|
235
|
+
$$typeof: u,
|
|
236
|
+
type: e,
|
|
237
|
+
compare: t === void 0 ? null : t
|
|
238
|
+
};
|
|
239
|
+
}, e.startTransition = function(e) {
|
|
240
|
+
var t = C.T, n = {};
|
|
241
|
+
C.T = n;
|
|
242
|
+
try {
|
|
243
|
+
var r = e(), i = C.S;
|
|
244
|
+
i !== null && i(n, r), typeof r == "object" && r && typeof r.then == "function" && r.then(S, re);
|
|
245
|
+
} catch (e) {
|
|
246
|
+
re(e);
|
|
247
|
+
} finally {
|
|
248
|
+
t !== null && n.types !== null && (t.types = n.types), C.T = t;
|
|
249
|
+
}
|
|
250
|
+
}, e.unstable_useCacheRefresh = function() {
|
|
251
|
+
return C.H.useCacheRefresh();
|
|
252
|
+
}, e.use = function(e) {
|
|
253
|
+
return C.H.use(e);
|
|
254
|
+
}, e.useActionState = function(e, t, n) {
|
|
255
|
+
return C.H.useActionState(e, t, n);
|
|
256
|
+
}, e.useCallback = function(e, t) {
|
|
257
|
+
return C.H.useCallback(e, t);
|
|
258
|
+
}, e.useContext = function(e) {
|
|
259
|
+
return C.H.useContext(e);
|
|
260
|
+
}, e.useDebugValue = function() {}, e.useDeferredValue = function(e, t) {
|
|
261
|
+
return C.H.useDeferredValue(e, t);
|
|
262
|
+
}, e.useEffect = function(e, t) {
|
|
263
|
+
return C.H.useEffect(e, t);
|
|
264
|
+
}, e.useEffectEvent = function(e) {
|
|
265
|
+
return C.H.useEffectEvent(e);
|
|
266
|
+
}, e.useId = function() {
|
|
267
|
+
return C.H.useId();
|
|
268
|
+
}, e.useImperativeHandle = function(e, t, n) {
|
|
269
|
+
return C.H.useImperativeHandle(e, t, n);
|
|
270
|
+
}, e.useInsertionEffect = function(e, t) {
|
|
271
|
+
return C.H.useInsertionEffect(e, t);
|
|
272
|
+
}, e.useLayoutEffect = function(e, t) {
|
|
273
|
+
return C.H.useLayoutEffect(e, t);
|
|
274
|
+
}, e.useMemo = function(e, t) {
|
|
275
|
+
return C.H.useMemo(e, t);
|
|
276
|
+
}, e.useOptimistic = function(e, t) {
|
|
277
|
+
return C.H.useOptimistic(e, t);
|
|
278
|
+
}, e.useReducer = function(e, t, n) {
|
|
279
|
+
return C.H.useReducer(e, t, n);
|
|
280
|
+
}, e.useRef = function(e) {
|
|
281
|
+
return C.H.useRef(e);
|
|
282
|
+
}, e.useState = function(e) {
|
|
283
|
+
return C.H.useState(e);
|
|
284
|
+
}, e.useSyncExternalStore = function(e, t, n) {
|
|
285
|
+
return C.H.useSyncExternalStore(e, t, n);
|
|
286
|
+
}, e.useTransition = function() {
|
|
287
|
+
return C.H.useTransition();
|
|
288
|
+
}, e.version = "19.2.5";
|
|
289
|
+
})), n = /* @__PURE__ */ e(((e, t) => {
|
|
290
|
+
process.env.NODE_ENV !== "production" && (function() {
|
|
291
|
+
function n(e, t) {
|
|
292
|
+
Object.defineProperty(a.prototype, e, { get: function() {
|
|
293
|
+
console.warn("%s(...) is deprecated in plain JavaScript React classes. %s", t[0], t[1]);
|
|
294
|
+
} });
|
|
295
|
+
}
|
|
296
|
+
function r(e) {
|
|
297
|
+
return typeof e != "object" || !e ? null : (e = pe && e[pe] || e["@@iterator"], typeof e == "function" ? e : null);
|
|
298
|
+
}
|
|
299
|
+
function i(e, t) {
|
|
300
|
+
e = (e = e.constructor) && (e.displayName || e.name) || "ReactClass";
|
|
301
|
+
var n = e + "." + t;
|
|
302
|
+
me[n] || (console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", t, e), me[n] = !0);
|
|
303
|
+
}
|
|
304
|
+
function a(e, t, n) {
|
|
305
|
+
this.props = e, this.context = t, this.refs = F, this.updater = n || he;
|
|
306
|
+
}
|
|
307
|
+
function o() {}
|
|
308
|
+
function s(e, t, n) {
|
|
309
|
+
this.props = e, this.context = t, this.refs = F, this.updater = n || he;
|
|
310
|
+
}
|
|
311
|
+
function c() {}
|
|
312
|
+
function l(e) {
|
|
313
|
+
return "" + e;
|
|
314
|
+
}
|
|
315
|
+
function u(e) {
|
|
316
|
+
try {
|
|
317
|
+
l(e);
|
|
318
|
+
var t = !1;
|
|
319
|
+
} catch {
|
|
320
|
+
t = !0;
|
|
321
|
+
}
|
|
322
|
+
if (t) {
|
|
323
|
+
t = console;
|
|
324
|
+
var n = t.error, r = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
325
|
+
return n.call(t, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", r), l(e);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
function d(e) {
|
|
329
|
+
if (e == null) return null;
|
|
330
|
+
if (typeof e == "function") return e.$$typeof === ve ? null : e.displayName || e.name || null;
|
|
331
|
+
if (typeof e == "string") return e;
|
|
332
|
+
switch (e) {
|
|
333
|
+
case N: return "Fragment";
|
|
334
|
+
case ae: return "Profiler";
|
|
335
|
+
case ie: return "StrictMode";
|
|
336
|
+
case le: return "Suspense";
|
|
337
|
+
case ue: return "SuspenseList";
|
|
338
|
+
case fe: return "Activity";
|
|
339
|
+
}
|
|
340
|
+
if (typeof e == "object") switch (typeof e.tag == "number" && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), e.$$typeof) {
|
|
341
|
+
case re: return "Portal";
|
|
342
|
+
case se: return e.displayName || "Context";
|
|
343
|
+
case oe: return (e._context.displayName || "Context") + ".Consumer";
|
|
344
|
+
case ce:
|
|
345
|
+
var t = e.render;
|
|
346
|
+
return e = e.displayName, e ||= (e = t.displayName || t.name || "", e === "" ? "ForwardRef" : "ForwardRef(" + e + ")"), e;
|
|
347
|
+
case de: return t = e.displayName || null, t === null ? d(e.type) || "Memo" : t;
|
|
348
|
+
case P:
|
|
349
|
+
t = e._payload, e = e._init;
|
|
350
|
+
try {
|
|
351
|
+
return d(e(t));
|
|
352
|
+
} catch {}
|
|
353
|
+
}
|
|
354
|
+
return null;
|
|
355
|
+
}
|
|
356
|
+
function f(e) {
|
|
357
|
+
if (e === N) return "<>";
|
|
358
|
+
if (typeof e == "object" && e && e.$$typeof === P) return "<...>";
|
|
359
|
+
try {
|
|
360
|
+
var t = d(e);
|
|
361
|
+
return t ? "<" + t + ">" : "<...>";
|
|
362
|
+
} catch {
|
|
363
|
+
return "<...>";
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
function p() {
|
|
367
|
+
var e = L.A;
|
|
368
|
+
return e === null ? null : e.getOwner();
|
|
369
|
+
}
|
|
370
|
+
function m() {
|
|
371
|
+
return Error("react-stack-top-frame");
|
|
372
|
+
}
|
|
373
|
+
function h(e) {
|
|
374
|
+
if (R.call(e, "key")) {
|
|
375
|
+
var t = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
376
|
+
if (t && t.isReactWarning) return !1;
|
|
377
|
+
}
|
|
378
|
+
return e.key !== void 0;
|
|
379
|
+
}
|
|
380
|
+
function g(e, t) {
|
|
381
|
+
function n() {
|
|
382
|
+
z || (z = !0, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", t));
|
|
383
|
+
}
|
|
384
|
+
n.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
385
|
+
get: n,
|
|
386
|
+
configurable: !0
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
function _() {
|
|
390
|
+
var e = d(this.type);
|
|
391
|
+
return be[e] || (be[e] = !0, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")), e = this.props.ref, e === void 0 ? null : e;
|
|
392
|
+
}
|
|
393
|
+
function v(e, t, n, r, i, a) {
|
|
394
|
+
var o = n.ref;
|
|
395
|
+
return e = {
|
|
396
|
+
$$typeof: ne,
|
|
397
|
+
type: e,
|
|
398
|
+
key: t,
|
|
399
|
+
props: n,
|
|
400
|
+
_owner: r
|
|
401
|
+
}, (o === void 0 ? null : o) === null ? Object.defineProperty(e, "ref", {
|
|
402
|
+
enumerable: !1,
|
|
403
|
+
value: null
|
|
404
|
+
}) : Object.defineProperty(e, "ref", {
|
|
405
|
+
enumerable: !1,
|
|
406
|
+
get: _
|
|
407
|
+
}), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
408
|
+
configurable: !1,
|
|
409
|
+
enumerable: !1,
|
|
410
|
+
writable: !0,
|
|
411
|
+
value: 0
|
|
412
|
+
}), Object.defineProperty(e, "_debugInfo", {
|
|
413
|
+
configurable: !1,
|
|
414
|
+
enumerable: !1,
|
|
415
|
+
writable: !0,
|
|
416
|
+
value: null
|
|
417
|
+
}), Object.defineProperty(e, "_debugStack", {
|
|
418
|
+
configurable: !1,
|
|
419
|
+
enumerable: !1,
|
|
420
|
+
writable: !0,
|
|
421
|
+
value: i
|
|
422
|
+
}), Object.defineProperty(e, "_debugTask", {
|
|
423
|
+
configurable: !1,
|
|
424
|
+
enumerable: !1,
|
|
425
|
+
writable: !0,
|
|
426
|
+
value: a
|
|
427
|
+
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
428
|
+
}
|
|
429
|
+
function ee(e, t) {
|
|
430
|
+
return t = v(e.type, t, e.props, e._owner, e._debugStack, e._debugTask), e._store && (t._store.validated = e._store.validated), t;
|
|
431
|
+
}
|
|
432
|
+
function y(e) {
|
|
433
|
+
b(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e && e.$$typeof === P && (e._payload.status === "fulfilled" ? b(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
434
|
+
}
|
|
435
|
+
function b(e) {
|
|
436
|
+
return typeof e == "object" && !!e && e.$$typeof === ne;
|
|
437
|
+
}
|
|
438
|
+
function x(e) {
|
|
439
|
+
var t = {
|
|
440
|
+
"=": "=0",
|
|
441
|
+
":": "=2"
|
|
442
|
+
};
|
|
443
|
+
return "$" + e.replace(/[=:]/g, function(e) {
|
|
444
|
+
return t[e];
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
function S(e, t) {
|
|
448
|
+
return typeof e == "object" && e && e.key != null ? (u(e.key), x("" + e.key)) : t.toString(36);
|
|
449
|
+
}
|
|
450
|
+
function C(e) {
|
|
451
|
+
switch (e.status) {
|
|
452
|
+
case "fulfilled": return e.value;
|
|
453
|
+
case "rejected": throw e.reason;
|
|
454
|
+
default: switch (typeof e.status == "string" ? e.then(c, c) : (e.status = "pending", e.then(function(t) {
|
|
455
|
+
e.status === "pending" && (e.status = "fulfilled", e.value = t);
|
|
456
|
+
}, function(t) {
|
|
457
|
+
e.status === "pending" && (e.status = "rejected", e.reason = t);
|
|
458
|
+
})), e.status) {
|
|
459
|
+
case "fulfilled": return e.value;
|
|
460
|
+
case "rejected": throw e.reason;
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
throw e;
|
|
464
|
+
}
|
|
465
|
+
function w(e, t, n, i, a) {
|
|
466
|
+
var o = typeof e;
|
|
467
|
+
(o === "undefined" || o === "boolean") && (e = null);
|
|
468
|
+
var s = !1;
|
|
469
|
+
if (e === null) s = !0;
|
|
470
|
+
else switch (o) {
|
|
471
|
+
case "bigint":
|
|
472
|
+
case "string":
|
|
473
|
+
case "number":
|
|
474
|
+
s = !0;
|
|
475
|
+
break;
|
|
476
|
+
case "object": switch (e.$$typeof) {
|
|
477
|
+
case ne:
|
|
478
|
+
case re:
|
|
479
|
+
s = !0;
|
|
480
|
+
break;
|
|
481
|
+
case P: return s = e._init, w(s(e._payload), t, n, i, a);
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
if (s) {
|
|
485
|
+
s = e, a = a(s);
|
|
486
|
+
var c = i === "" ? "." + S(s, 0) : i;
|
|
487
|
+
return _e(a) ? (n = "", c != null && (n = c.replace(U, "$&/") + "/"), w(a, t, n, "", function(e) {
|
|
488
|
+
return e;
|
|
489
|
+
})) : a != null && (b(a) && (a.key != null && (s && s.key === a.key || u(a.key)), n = ee(a, n + (a.key == null || s && s.key === a.key ? "" : ("" + a.key).replace(U, "$&/") + "/") + c), i !== "" && s != null && b(s) && s.key == null && s._store && !s._store.validated && (n._store.validated = 2), a = n), t.push(a)), 1;
|
|
490
|
+
}
|
|
491
|
+
if (s = 0, c = i === "" ? "." : i + ":", _e(e)) for (var l = 0; l < e.length; l++) i = e[l], o = c + S(i, l), s += w(i, t, n, o, a);
|
|
492
|
+
else if (l = r(e), typeof l == "function") for (l === e.entries && (xe || console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."), xe = !0), e = l.call(e), l = 0; !(i = e.next()).done;) i = i.value, o = c + S(i, l++), s += w(i, t, n, o, a);
|
|
493
|
+
else if (o === "object") {
|
|
494
|
+
if (typeof e.then == "function") return w(C(e), t, n, i, a);
|
|
495
|
+
throw t = String(e), Error("Objects are not valid as a React child (found: " + (t === "[object Object]" ? "object with keys {" + Object.keys(e).join(", ") + "}" : t) + "). If you meant to render a collection of children, use an array instead.");
|
|
496
|
+
}
|
|
497
|
+
return s;
|
|
498
|
+
}
|
|
499
|
+
function T(e, t, n) {
|
|
500
|
+
if (e == null) return e;
|
|
501
|
+
var r = [], i = 0;
|
|
502
|
+
return w(e, r, "", "", function(e) {
|
|
503
|
+
return t.call(n, e, i++);
|
|
504
|
+
}), r;
|
|
505
|
+
}
|
|
506
|
+
function E(e) {
|
|
507
|
+
if (e._status === -1) {
|
|
508
|
+
var t = e._ioInfo;
|
|
509
|
+
t != null && (t.start = t.end = performance.now()), t = e._result;
|
|
510
|
+
var n = t();
|
|
511
|
+
if (n.then(function(t) {
|
|
512
|
+
if (e._status === 0 || e._status === -1) {
|
|
513
|
+
e._status = 1, e._result = t;
|
|
514
|
+
var r = e._ioInfo;
|
|
515
|
+
r != null && (r.end = performance.now()), n.status === void 0 && (n.status = "fulfilled", n.value = t);
|
|
516
|
+
}
|
|
517
|
+
}, function(t) {
|
|
518
|
+
if (e._status === 0 || e._status === -1) {
|
|
519
|
+
e._status = 2, e._result = t;
|
|
520
|
+
var r = e._ioInfo;
|
|
521
|
+
r != null && (r.end = performance.now()), n.status === void 0 && (n.status = "rejected", n.reason = t);
|
|
522
|
+
}
|
|
523
|
+
}), t = e._ioInfo, t != null) {
|
|
524
|
+
t.value = n;
|
|
525
|
+
var r = n.displayName;
|
|
526
|
+
typeof r == "string" && (t.name = r);
|
|
527
|
+
}
|
|
528
|
+
e._status === -1 && (e._status = 0, e._result = n);
|
|
529
|
+
}
|
|
530
|
+
if (e._status === 1) return t = e._result, t === void 0 && console.error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?", t), "default" in t || console.error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))", t), t.default;
|
|
531
|
+
throw e._result;
|
|
532
|
+
}
|
|
533
|
+
function D() {
|
|
534
|
+
var e = L.H;
|
|
535
|
+
return e === null && console.error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."), e;
|
|
536
|
+
}
|
|
537
|
+
function te() {
|
|
538
|
+
L.asyncTransitions--;
|
|
539
|
+
}
|
|
540
|
+
function O(e) {
|
|
541
|
+
if (K === null) try {
|
|
542
|
+
var n = ("require" + Math.random()).slice(0, 7);
|
|
543
|
+
K = (t && t[n]).call(t, "timers").setImmediate;
|
|
544
|
+
} catch {
|
|
545
|
+
K = function(e) {
|
|
546
|
+
!1 === G && (G = !0, typeof MessageChannel > "u" && console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));
|
|
547
|
+
var t = new MessageChannel();
|
|
548
|
+
t.port1.onmessage = e, t.port2.postMessage(void 0);
|
|
549
|
+
};
|
|
550
|
+
}
|
|
551
|
+
return K(e);
|
|
552
|
+
}
|
|
553
|
+
function k(e) {
|
|
554
|
+
return 1 < e.length && typeof AggregateError == "function" ? AggregateError(e) : e[0];
|
|
555
|
+
}
|
|
556
|
+
function A(e, t) {
|
|
557
|
+
t !== q - 1 && console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "), q = t;
|
|
558
|
+
}
|
|
559
|
+
function j(e, t, n) {
|
|
560
|
+
var r = L.actQueue;
|
|
561
|
+
if (r !== null) if (r.length !== 0) try {
|
|
562
|
+
M(r), O(function() {
|
|
563
|
+
return j(e, t, n);
|
|
564
|
+
});
|
|
565
|
+
return;
|
|
566
|
+
} catch (e) {
|
|
567
|
+
L.thrownErrors.push(e);
|
|
568
|
+
}
|
|
569
|
+
else L.actQueue = null;
|
|
570
|
+
0 < L.thrownErrors.length ? (r = k(L.thrownErrors), L.thrownErrors.length = 0, n(r)) : t(e);
|
|
571
|
+
}
|
|
572
|
+
function M(e) {
|
|
573
|
+
if (!Ce) {
|
|
574
|
+
Ce = !0;
|
|
575
|
+
var t = 0;
|
|
576
|
+
try {
|
|
577
|
+
for (; t < e.length; t++) {
|
|
578
|
+
var n = e[t];
|
|
579
|
+
do {
|
|
580
|
+
L.didUsePromise = !1;
|
|
581
|
+
var r = n(!1);
|
|
582
|
+
if (r !== null) {
|
|
583
|
+
if (L.didUsePromise) {
|
|
584
|
+
e[t] = n, e.splice(0, t);
|
|
585
|
+
return;
|
|
586
|
+
}
|
|
587
|
+
n = r;
|
|
588
|
+
} else break;
|
|
589
|
+
} while (1);
|
|
590
|
+
}
|
|
591
|
+
e.length = 0;
|
|
592
|
+
} catch (n) {
|
|
593
|
+
e.splice(0, t + 1), L.thrownErrors.push(n);
|
|
594
|
+
} finally {
|
|
595
|
+
Ce = !1;
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
600
|
+
var ne = Symbol.for("react.transitional.element"), re = Symbol.for("react.portal"), N = Symbol.for("react.fragment"), ie = Symbol.for("react.strict_mode"), ae = Symbol.for("react.profiler"), oe = Symbol.for("react.consumer"), se = Symbol.for("react.context"), ce = Symbol.for("react.forward_ref"), le = Symbol.for("react.suspense"), ue = Symbol.for("react.suspense_list"), de = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), fe = Symbol.for("react.activity"), pe = Symbol.iterator, me = {}, he = {
|
|
601
|
+
isMounted: function() {
|
|
602
|
+
return !1;
|
|
603
|
+
},
|
|
604
|
+
enqueueForceUpdate: function(e) {
|
|
605
|
+
i(e, "forceUpdate");
|
|
606
|
+
},
|
|
607
|
+
enqueueReplaceState: function(e) {
|
|
608
|
+
i(e, "replaceState");
|
|
609
|
+
},
|
|
610
|
+
enqueueSetState: function(e) {
|
|
611
|
+
i(e, "setState");
|
|
612
|
+
}
|
|
613
|
+
}, ge = Object.assign, F = {};
|
|
614
|
+
Object.freeze(F), a.prototype.isReactComponent = {}, a.prototype.setState = function(e, t) {
|
|
615
|
+
if (typeof e != "object" && typeof e != "function" && e != null) throw Error("takes an object of state variables to update or a function which returns an object of state variables.");
|
|
616
|
+
this.updater.enqueueSetState(this, e, t, "setState");
|
|
617
|
+
}, a.prototype.forceUpdate = function(e) {
|
|
618
|
+
this.updater.enqueueForceUpdate(this, e, "forceUpdate");
|
|
619
|
+
};
|
|
620
|
+
var I = {
|
|
621
|
+
isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],
|
|
622
|
+
replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]
|
|
623
|
+
};
|
|
624
|
+
for (J in I) I.hasOwnProperty(J) && n(J, I[J]);
|
|
625
|
+
o.prototype = a.prototype, I = s.prototype = new o(), I.constructor = s, ge(I, a.prototype), I.isPureReactComponent = !0;
|
|
626
|
+
var _e = Array.isArray, ve = Symbol.for("react.client.reference"), L = {
|
|
627
|
+
H: null,
|
|
628
|
+
A: null,
|
|
629
|
+
T: null,
|
|
630
|
+
S: null,
|
|
631
|
+
actQueue: null,
|
|
632
|
+
asyncTransitions: 0,
|
|
633
|
+
isBatchingLegacy: !1,
|
|
634
|
+
didScheduleLegacyUpdate: !1,
|
|
635
|
+
didUsePromise: !1,
|
|
636
|
+
thrownErrors: [],
|
|
637
|
+
getCurrentStack: null,
|
|
638
|
+
recentlyCreatedOwnerStacks: 0
|
|
639
|
+
}, R = Object.prototype.hasOwnProperty, ye = console.createTask ? console.createTask : function() {
|
|
640
|
+
return null;
|
|
641
|
+
};
|
|
642
|
+
I = { react_stack_bottom_frame: function(e) {
|
|
643
|
+
return e();
|
|
644
|
+
} };
|
|
645
|
+
var z, B, be = {}, V = I.react_stack_bottom_frame.bind(I, m)(), H = ye(f(m)), xe = !1, U = /\/+/g, W = typeof reportError == "function" ? reportError : function(e) {
|
|
646
|
+
if (typeof window == "object" && typeof window.ErrorEvent == "function") {
|
|
647
|
+
var t = new window.ErrorEvent("error", {
|
|
648
|
+
bubbles: !0,
|
|
649
|
+
cancelable: !0,
|
|
650
|
+
message: typeof e == "object" && e && typeof e.message == "string" ? String(e.message) : String(e),
|
|
651
|
+
error: e
|
|
652
|
+
});
|
|
653
|
+
if (!window.dispatchEvent(t)) return;
|
|
654
|
+
} else if (typeof process == "object" && typeof process.emit == "function") {
|
|
655
|
+
process.emit("uncaughtException", e);
|
|
656
|
+
return;
|
|
657
|
+
}
|
|
658
|
+
console.error(e);
|
|
659
|
+
}, G = !1, K = null, q = 0, Se = !1, Ce = !1, we = typeof queueMicrotask == "function" ? function(e) {
|
|
660
|
+
queueMicrotask(function() {
|
|
661
|
+
return queueMicrotask(e);
|
|
662
|
+
});
|
|
663
|
+
} : O;
|
|
664
|
+
I = Object.freeze({
|
|
665
|
+
__proto__: null,
|
|
666
|
+
c: function(e) {
|
|
667
|
+
return D().useMemoCache(e);
|
|
668
|
+
}
|
|
669
|
+
});
|
|
670
|
+
var J = {
|
|
671
|
+
map: T,
|
|
672
|
+
forEach: function(e, t, n) {
|
|
673
|
+
T(e, function() {
|
|
674
|
+
t.apply(this, arguments);
|
|
675
|
+
}, n);
|
|
676
|
+
},
|
|
677
|
+
count: function(e) {
|
|
678
|
+
var t = 0;
|
|
679
|
+
return T(e, function() {
|
|
680
|
+
t++;
|
|
681
|
+
}), t;
|
|
682
|
+
},
|
|
683
|
+
toArray: function(e) {
|
|
684
|
+
return T(e, function(e) {
|
|
685
|
+
return e;
|
|
686
|
+
}) || [];
|
|
687
|
+
},
|
|
688
|
+
only: function(e) {
|
|
689
|
+
if (!b(e)) throw Error("React.Children.only expected to receive a single React element child.");
|
|
690
|
+
return e;
|
|
691
|
+
}
|
|
692
|
+
};
|
|
693
|
+
e.Activity = fe, e.Children = J, e.Component = a, e.Fragment = N, e.Profiler = ae, e.PureComponent = s, e.StrictMode = ie, e.Suspense = le, e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = L, e.__COMPILER_RUNTIME = I, e.act = function(e) {
|
|
694
|
+
var t = L.actQueue, n = q;
|
|
695
|
+
q++;
|
|
696
|
+
var r = L.actQueue = t === null ? [] : t, i = !1;
|
|
697
|
+
try {
|
|
698
|
+
var a = e();
|
|
699
|
+
} catch (e) {
|
|
700
|
+
L.thrownErrors.push(e);
|
|
701
|
+
}
|
|
702
|
+
if (0 < L.thrownErrors.length) throw A(t, n), e = k(L.thrownErrors), L.thrownErrors.length = 0, e;
|
|
703
|
+
if (typeof a == "object" && a && typeof a.then == "function") {
|
|
704
|
+
var o = a;
|
|
705
|
+
return we(function() {
|
|
706
|
+
i || Se || (Se = !0, console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"));
|
|
707
|
+
}), { then: function(e, a) {
|
|
708
|
+
i = !0, o.then(function(i) {
|
|
709
|
+
if (A(t, n), n === 0) {
|
|
710
|
+
try {
|
|
711
|
+
M(r), O(function() {
|
|
712
|
+
return j(i, e, a);
|
|
713
|
+
});
|
|
714
|
+
} catch (e) {
|
|
715
|
+
L.thrownErrors.push(e);
|
|
716
|
+
}
|
|
717
|
+
if (0 < L.thrownErrors.length) {
|
|
718
|
+
var o = k(L.thrownErrors);
|
|
719
|
+
L.thrownErrors.length = 0, a(o);
|
|
720
|
+
}
|
|
721
|
+
} else e(i);
|
|
722
|
+
}, function(e) {
|
|
723
|
+
A(t, n), 0 < L.thrownErrors.length ? (e = k(L.thrownErrors), L.thrownErrors.length = 0, a(e)) : a(e);
|
|
724
|
+
});
|
|
725
|
+
} };
|
|
726
|
+
}
|
|
727
|
+
var s = a;
|
|
728
|
+
if (A(t, n), n === 0 && (M(r), r.length !== 0 && we(function() {
|
|
729
|
+
i || Se || (Se = !0, console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"));
|
|
730
|
+
}), L.actQueue = null), 0 < L.thrownErrors.length) throw e = k(L.thrownErrors), L.thrownErrors.length = 0, e;
|
|
731
|
+
return { then: function(e, t) {
|
|
732
|
+
i = !0, n === 0 ? (L.actQueue = r, O(function() {
|
|
733
|
+
return j(s, e, t);
|
|
734
|
+
})) : e(s);
|
|
735
|
+
} };
|
|
736
|
+
}, e.cache = function(e) {
|
|
737
|
+
return function() {
|
|
738
|
+
return e.apply(null, arguments);
|
|
739
|
+
};
|
|
740
|
+
}, e.cacheSignal = function() {
|
|
741
|
+
return null;
|
|
742
|
+
}, e.captureOwnerStack = function() {
|
|
743
|
+
var e = L.getCurrentStack;
|
|
744
|
+
return e === null ? null : e();
|
|
745
|
+
}, e.cloneElement = function(e, t, n) {
|
|
746
|
+
if (e == null) throw Error("The argument must be a React element, but you passed " + e + ".");
|
|
747
|
+
var r = ge({}, e.props), i = e.key, a = e._owner;
|
|
748
|
+
if (t != null) {
|
|
749
|
+
var o;
|
|
750
|
+
a: {
|
|
751
|
+
if (R.call(t, "ref") && (o = Object.getOwnPropertyDescriptor(t, "ref").get) && o.isReactWarning) {
|
|
752
|
+
o = !1;
|
|
753
|
+
break a;
|
|
754
|
+
}
|
|
755
|
+
o = t.ref !== void 0;
|
|
756
|
+
}
|
|
757
|
+
for (s in o && (a = p()), h(t) && (u(t.key), i = "" + t.key), t) !R.call(t, s) || s === "key" || s === "__self" || s === "__source" || s === "ref" && t.ref === void 0 || (r[s] = t[s]);
|
|
758
|
+
}
|
|
759
|
+
var s = arguments.length - 2;
|
|
760
|
+
if (s === 1) r.children = n;
|
|
761
|
+
else if (1 < s) {
|
|
762
|
+
o = Array(s);
|
|
763
|
+
for (var c = 0; c < s; c++) o[c] = arguments[c + 2];
|
|
764
|
+
r.children = o;
|
|
765
|
+
}
|
|
766
|
+
for (r = v(e.type, i, r, a, e._debugStack, e._debugTask), i = 2; i < arguments.length; i++) y(arguments[i]);
|
|
767
|
+
return r;
|
|
768
|
+
}, e.createContext = function(e) {
|
|
769
|
+
return e = {
|
|
770
|
+
$$typeof: se,
|
|
771
|
+
_currentValue: e,
|
|
772
|
+
_currentValue2: e,
|
|
773
|
+
_threadCount: 0,
|
|
774
|
+
Provider: null,
|
|
775
|
+
Consumer: null
|
|
776
|
+
}, e.Provider = e, e.Consumer = {
|
|
777
|
+
$$typeof: oe,
|
|
778
|
+
_context: e
|
|
779
|
+
}, e._currentRenderer = null, e._currentRenderer2 = null, e;
|
|
780
|
+
}, e.createElement = function(e, t, n) {
|
|
781
|
+
for (var r = 2; r < arguments.length; r++) y(arguments[r]);
|
|
782
|
+
r = {};
|
|
783
|
+
var i = null;
|
|
784
|
+
if (t != null) for (c in B || !("__self" in t) || "key" in t || (B = !0, console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")), h(t) && (u(t.key), i = "" + t.key), t) R.call(t, c) && c !== "key" && c !== "__self" && c !== "__source" && (r[c] = t[c]);
|
|
785
|
+
var a = arguments.length - 2;
|
|
786
|
+
if (a === 1) r.children = n;
|
|
787
|
+
else if (1 < a) {
|
|
788
|
+
for (var o = Array(a), s = 0; s < a; s++) o[s] = arguments[s + 2];
|
|
789
|
+
Object.freeze && Object.freeze(o), r.children = o;
|
|
790
|
+
}
|
|
791
|
+
if (e && e.defaultProps) for (c in a = e.defaultProps, a) r[c] === void 0 && (r[c] = a[c]);
|
|
792
|
+
i && g(r, typeof e == "function" ? e.displayName || e.name || "Unknown" : e);
|
|
793
|
+
var c = 1e4 > L.recentlyCreatedOwnerStacks++;
|
|
794
|
+
return v(e, i, r, p(), c ? Error("react-stack-top-frame") : V, c ? ye(f(e)) : H);
|
|
795
|
+
}, e.createRef = function() {
|
|
796
|
+
var e = { current: null };
|
|
797
|
+
return Object.seal(e), e;
|
|
798
|
+
}, e.forwardRef = function(e) {
|
|
799
|
+
e != null && e.$$typeof === de ? console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).") : typeof e == "function" ? e.length !== 0 && e.length !== 2 && console.error("forwardRef render functions accept exactly two parameters: props and ref. %s", e.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined.") : console.error("forwardRef requires a render function but was given %s.", e === null ? "null" : typeof e), e != null && e.defaultProps != null && console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");
|
|
800
|
+
var t = {
|
|
801
|
+
$$typeof: ce,
|
|
802
|
+
render: e
|
|
803
|
+
}, n;
|
|
804
|
+
return Object.defineProperty(t, "displayName", {
|
|
805
|
+
enumerable: !1,
|
|
806
|
+
configurable: !0,
|
|
807
|
+
get: function() {
|
|
808
|
+
return n;
|
|
809
|
+
},
|
|
810
|
+
set: function(t) {
|
|
811
|
+
n = t, e.name || e.displayName || (Object.defineProperty(e, "name", { value: t }), e.displayName = t);
|
|
812
|
+
}
|
|
813
|
+
}), t;
|
|
814
|
+
}, e.isValidElement = b, e.lazy = function(e) {
|
|
815
|
+
e = {
|
|
816
|
+
_status: -1,
|
|
817
|
+
_result: e
|
|
818
|
+
};
|
|
819
|
+
var t = {
|
|
820
|
+
$$typeof: P,
|
|
821
|
+
_payload: e,
|
|
822
|
+
_init: E
|
|
823
|
+
}, n = {
|
|
824
|
+
name: "lazy",
|
|
825
|
+
start: -1,
|
|
826
|
+
end: -1,
|
|
827
|
+
value: null,
|
|
828
|
+
owner: null,
|
|
829
|
+
debugStack: Error("react-stack-top-frame"),
|
|
830
|
+
debugTask: console.createTask ? console.createTask("lazy()") : null
|
|
831
|
+
};
|
|
832
|
+
return e._ioInfo = n, t._debugInfo = [{ awaited: n }], t;
|
|
833
|
+
}, e.memo = function(e, t) {
|
|
834
|
+
e ?? console.error("memo: The first argument must be a component. Instead received: %s", e === null ? "null" : typeof e), t = {
|
|
835
|
+
$$typeof: de,
|
|
836
|
+
type: e,
|
|
837
|
+
compare: t === void 0 ? null : t
|
|
838
|
+
};
|
|
839
|
+
var n;
|
|
840
|
+
return Object.defineProperty(t, "displayName", {
|
|
841
|
+
enumerable: !1,
|
|
842
|
+
configurable: !0,
|
|
843
|
+
get: function() {
|
|
844
|
+
return n;
|
|
845
|
+
},
|
|
846
|
+
set: function(t) {
|
|
847
|
+
n = t, e.name || e.displayName || (Object.defineProperty(e, "name", { value: t }), e.displayName = t);
|
|
848
|
+
}
|
|
849
|
+
}), t;
|
|
850
|
+
}, e.startTransition = function(e) {
|
|
851
|
+
var t = L.T, n = {};
|
|
852
|
+
n._updatedFibers = /* @__PURE__ */ new Set(), L.T = n;
|
|
853
|
+
try {
|
|
854
|
+
var r = e(), i = L.S;
|
|
855
|
+
i !== null && i(n, r), typeof r == "object" && r && typeof r.then == "function" && (L.asyncTransitions++, r.then(te, te), r.then(c, W));
|
|
856
|
+
} catch (e) {
|
|
857
|
+
W(e);
|
|
858
|
+
} finally {
|
|
859
|
+
t === null && n._updatedFibers && (e = n._updatedFibers.size, n._updatedFibers.clear(), 10 < e && console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")), t !== null && n.types !== null && (t.types !== null && t.types !== n.types && console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."), t.types = n.types), L.T = t;
|
|
860
|
+
}
|
|
861
|
+
}, e.unstable_useCacheRefresh = function() {
|
|
862
|
+
return D().useCacheRefresh();
|
|
863
|
+
}, e.use = function(e) {
|
|
864
|
+
return D().use(e);
|
|
865
|
+
}, e.useActionState = function(e, t, n) {
|
|
866
|
+
return D().useActionState(e, t, n);
|
|
867
|
+
}, e.useCallback = function(e, t) {
|
|
868
|
+
return D().useCallback(e, t);
|
|
869
|
+
}, e.useContext = function(e) {
|
|
870
|
+
var t = D();
|
|
871
|
+
return e.$$typeof === oe && console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"), t.useContext(e);
|
|
872
|
+
}, e.useDebugValue = function(e, t) {
|
|
873
|
+
return D().useDebugValue(e, t);
|
|
874
|
+
}, e.useDeferredValue = function(e, t) {
|
|
875
|
+
return D().useDeferredValue(e, t);
|
|
876
|
+
}, e.useEffect = function(e, t) {
|
|
877
|
+
return e ?? console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"), D().useEffect(e, t);
|
|
878
|
+
}, e.useEffectEvent = function(e) {
|
|
879
|
+
return D().useEffectEvent(e);
|
|
880
|
+
}, e.useId = function() {
|
|
881
|
+
return D().useId();
|
|
882
|
+
}, e.useImperativeHandle = function(e, t, n) {
|
|
883
|
+
return D().useImperativeHandle(e, t, n);
|
|
884
|
+
}, e.useInsertionEffect = function(e, t) {
|
|
885
|
+
return e ?? console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"), D().useInsertionEffect(e, t);
|
|
886
|
+
}, e.useLayoutEffect = function(e, t) {
|
|
887
|
+
return e ?? console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"), D().useLayoutEffect(e, t);
|
|
888
|
+
}, e.useMemo = function(e, t) {
|
|
889
|
+
return D().useMemo(e, t);
|
|
890
|
+
}, e.useOptimistic = function(e, t) {
|
|
891
|
+
return D().useOptimistic(e, t);
|
|
892
|
+
}, e.useReducer = function(e, t, n) {
|
|
893
|
+
return D().useReducer(e, t, n);
|
|
894
|
+
}, e.useRef = function(e) {
|
|
895
|
+
return D().useRef(e);
|
|
896
|
+
}, e.useState = function(e) {
|
|
897
|
+
return D().useState(e);
|
|
898
|
+
}, e.useSyncExternalStore = function(e, t, n) {
|
|
899
|
+
return D().useSyncExternalStore(e, t, n);
|
|
900
|
+
}, e.useTransition = function() {
|
|
901
|
+
return D().useTransition();
|
|
902
|
+
}, e.version = "19.2.5", typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
903
|
+
})();
|
|
904
|
+
})), r = /* @__PURE__ */ e(((e, r) => {
|
|
905
|
+
process.env.NODE_ENV === "production" ? r.exports = t() : r.exports = n();
|
|
906
|
+
})), i;
|
|
907
|
+
(function(e) {
|
|
908
|
+
e.assertEqual = (e) => {};
|
|
909
|
+
function t(e) {}
|
|
910
|
+
e.assertIs = t;
|
|
911
|
+
function n(e) {
|
|
912
|
+
throw Error();
|
|
913
|
+
}
|
|
914
|
+
e.assertNever = n, e.arrayToEnum = (e) => {
|
|
915
|
+
let t = {};
|
|
916
|
+
for (let n of e) t[n] = n;
|
|
917
|
+
return t;
|
|
918
|
+
}, e.getValidEnumValues = (t) => {
|
|
919
|
+
let n = e.objectKeys(t).filter((e) => typeof t[t[e]] != "number"), r = {};
|
|
920
|
+
for (let e of n) r[e] = t[e];
|
|
921
|
+
return e.objectValues(r);
|
|
922
|
+
}, e.objectValues = (t) => e.objectKeys(t).map(function(e) {
|
|
923
|
+
return t[e];
|
|
924
|
+
}), e.objectKeys = typeof Object.keys == "function" ? (e) => Object.keys(e) : (e) => {
|
|
925
|
+
let t = [];
|
|
926
|
+
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && t.push(n);
|
|
927
|
+
return t;
|
|
928
|
+
}, e.find = (e, t) => {
|
|
929
|
+
for (let n of e) if (t(n)) return n;
|
|
930
|
+
}, e.isInteger = typeof Number.isInteger == "function" ? (e) => Number.isInteger(e) : (e) => typeof e == "number" && Number.isFinite(e) && Math.floor(e) === e;
|
|
931
|
+
function r(e, t = " | ") {
|
|
932
|
+
return e.map((e) => typeof e == "string" ? `'${e}'` : e).join(t);
|
|
933
|
+
}
|
|
934
|
+
e.joinValues = r, e.jsonStringifyReplacer = (e, t) => typeof t == "bigint" ? t.toString() : t;
|
|
935
|
+
})(i ||= {});
|
|
936
|
+
var a;
|
|
937
|
+
(function(e) {
|
|
938
|
+
e.mergeShapes = (e, t) => ({
|
|
939
|
+
...e,
|
|
940
|
+
...t
|
|
941
|
+
});
|
|
942
|
+
})(a ||= {});
|
|
943
|
+
var o = i.arrayToEnum([
|
|
944
|
+
"string",
|
|
945
|
+
"nan",
|
|
946
|
+
"number",
|
|
947
|
+
"integer",
|
|
948
|
+
"float",
|
|
949
|
+
"boolean",
|
|
950
|
+
"date",
|
|
951
|
+
"bigint",
|
|
952
|
+
"symbol",
|
|
953
|
+
"function",
|
|
954
|
+
"undefined",
|
|
955
|
+
"null",
|
|
956
|
+
"array",
|
|
957
|
+
"object",
|
|
958
|
+
"unknown",
|
|
959
|
+
"promise",
|
|
960
|
+
"void",
|
|
961
|
+
"never",
|
|
962
|
+
"map",
|
|
963
|
+
"set"
|
|
964
|
+
]), s = (e) => {
|
|
965
|
+
switch (typeof e) {
|
|
966
|
+
case "undefined": return o.undefined;
|
|
967
|
+
case "string": return o.string;
|
|
968
|
+
case "number": return Number.isNaN(e) ? o.nan : o.number;
|
|
969
|
+
case "boolean": return o.boolean;
|
|
970
|
+
case "function": return o.function;
|
|
971
|
+
case "bigint": return o.bigint;
|
|
972
|
+
case "symbol": return o.symbol;
|
|
973
|
+
case "object": return Array.isArray(e) ? o.array : e === null ? o.null : e.then && typeof e.then == "function" && e.catch && typeof e.catch == "function" ? o.promise : typeof Map < "u" && e instanceof Map ? o.map : typeof Set < "u" && e instanceof Set ? o.set : typeof Date < "u" && e instanceof Date ? o.date : o.object;
|
|
974
|
+
default: return o.unknown;
|
|
975
|
+
}
|
|
976
|
+
}, c = i.arrayToEnum([
|
|
977
|
+
"invalid_type",
|
|
978
|
+
"invalid_literal",
|
|
979
|
+
"custom",
|
|
980
|
+
"invalid_union",
|
|
981
|
+
"invalid_union_discriminator",
|
|
982
|
+
"invalid_enum_value",
|
|
983
|
+
"unrecognized_keys",
|
|
984
|
+
"invalid_arguments",
|
|
985
|
+
"invalid_return_type",
|
|
986
|
+
"invalid_date",
|
|
987
|
+
"invalid_string",
|
|
988
|
+
"too_small",
|
|
989
|
+
"too_big",
|
|
990
|
+
"invalid_intersection_types",
|
|
991
|
+
"not_multiple_of",
|
|
992
|
+
"not_finite"
|
|
993
|
+
]), l = class e extends Error {
|
|
994
|
+
get errors() {
|
|
995
|
+
return this.issues;
|
|
996
|
+
}
|
|
997
|
+
constructor(e) {
|
|
998
|
+
super(), this.issues = [], this.addIssue = (e) => {
|
|
999
|
+
this.issues = [...this.issues, e];
|
|
1000
|
+
}, this.addIssues = (e = []) => {
|
|
1001
|
+
this.issues = [...this.issues, ...e];
|
|
1002
|
+
};
|
|
1003
|
+
let t = new.target.prototype;
|
|
1004
|
+
Object.setPrototypeOf ? Object.setPrototypeOf(this, t) : this.__proto__ = t, this.name = "ZodError", this.issues = e;
|
|
1005
|
+
}
|
|
1006
|
+
format(e) {
|
|
1007
|
+
let t = e || function(e) {
|
|
1008
|
+
return e.message;
|
|
1009
|
+
}, n = { _errors: [] }, r = (e) => {
|
|
1010
|
+
for (let i of e.issues) if (i.code === "invalid_union") i.unionErrors.map(r);
|
|
1011
|
+
else if (i.code === "invalid_return_type") r(i.returnTypeError);
|
|
1012
|
+
else if (i.code === "invalid_arguments") r(i.argumentsError);
|
|
1013
|
+
else if (i.path.length === 0) n._errors.push(t(i));
|
|
1014
|
+
else {
|
|
1015
|
+
let e = n, r = 0;
|
|
1016
|
+
for (; r < i.path.length;) {
|
|
1017
|
+
let n = i.path[r];
|
|
1018
|
+
r === i.path.length - 1 ? (e[n] = e[n] || { _errors: [] }, e[n]._errors.push(t(i))) : e[n] = e[n] || { _errors: [] }, e = e[n], r++;
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
};
|
|
1022
|
+
return r(this), n;
|
|
1023
|
+
}
|
|
1024
|
+
static assert(t) {
|
|
1025
|
+
if (!(t instanceof e)) throw Error(`Not a ZodError: ${t}`);
|
|
1026
|
+
}
|
|
1027
|
+
toString() {
|
|
1028
|
+
return this.message;
|
|
1029
|
+
}
|
|
1030
|
+
get message() {
|
|
1031
|
+
return JSON.stringify(this.issues, i.jsonStringifyReplacer, 2);
|
|
1032
|
+
}
|
|
1033
|
+
get isEmpty() {
|
|
1034
|
+
return this.issues.length === 0;
|
|
1035
|
+
}
|
|
1036
|
+
flatten(e = (e) => e.message) {
|
|
1037
|
+
let t = {}, n = [];
|
|
1038
|
+
for (let r of this.issues) if (r.path.length > 0) {
|
|
1039
|
+
let n = r.path[0];
|
|
1040
|
+
t[n] = t[n] || [], t[n].push(e(r));
|
|
1041
|
+
} else n.push(e(r));
|
|
1042
|
+
return {
|
|
1043
|
+
formErrors: n,
|
|
1044
|
+
fieldErrors: t
|
|
1045
|
+
};
|
|
1046
|
+
}
|
|
1047
|
+
get formErrors() {
|
|
1048
|
+
return this.flatten();
|
|
1049
|
+
}
|
|
1050
|
+
};
|
|
1051
|
+
l.create = (e) => new l(e);
|
|
1052
|
+
//#endregion
|
|
1053
|
+
//#region node_modules/zod/v3/locales/en.js
|
|
1054
|
+
var u = (e, t) => {
|
|
1055
|
+
let n;
|
|
1056
|
+
switch (e.code) {
|
|
1057
|
+
case c.invalid_type:
|
|
1058
|
+
n = e.received === o.undefined ? "Required" : `Expected ${e.expected}, received ${e.received}`;
|
|
1059
|
+
break;
|
|
1060
|
+
case c.invalid_literal:
|
|
1061
|
+
n = `Invalid literal value, expected ${JSON.stringify(e.expected, i.jsonStringifyReplacer)}`;
|
|
1062
|
+
break;
|
|
1063
|
+
case c.unrecognized_keys:
|
|
1064
|
+
n = `Unrecognized key(s) in object: ${i.joinValues(e.keys, ", ")}`;
|
|
1065
|
+
break;
|
|
1066
|
+
case c.invalid_union:
|
|
1067
|
+
n = "Invalid input";
|
|
1068
|
+
break;
|
|
1069
|
+
case c.invalid_union_discriminator:
|
|
1070
|
+
n = `Invalid discriminator value. Expected ${i.joinValues(e.options)}`;
|
|
1071
|
+
break;
|
|
1072
|
+
case c.invalid_enum_value:
|
|
1073
|
+
n = `Invalid enum value. Expected ${i.joinValues(e.options)}, received '${e.received}'`;
|
|
1074
|
+
break;
|
|
1075
|
+
case c.invalid_arguments:
|
|
1076
|
+
n = "Invalid function arguments";
|
|
1077
|
+
break;
|
|
1078
|
+
case c.invalid_return_type:
|
|
1079
|
+
n = "Invalid function return type";
|
|
1080
|
+
break;
|
|
1081
|
+
case c.invalid_date:
|
|
1082
|
+
n = "Invalid date";
|
|
1083
|
+
break;
|
|
1084
|
+
case c.invalid_string:
|
|
1085
|
+
typeof e.validation == "object" ? "includes" in e.validation ? (n = `Invalid input: must include "${e.validation.includes}"`, typeof e.validation.position == "number" && (n = `${n} at one or more positions greater than or equal to ${e.validation.position}`)) : "startsWith" in e.validation ? n = `Invalid input: must start with "${e.validation.startsWith}"` : "endsWith" in e.validation ? n = `Invalid input: must end with "${e.validation.endsWith}"` : i.assertNever(e.validation) : n = e.validation === "regex" ? "Invalid" : `Invalid ${e.validation}`;
|
|
1086
|
+
break;
|
|
1087
|
+
case c.too_small:
|
|
1088
|
+
n = e.type === "array" ? `Array must contain ${e.exact ? "exactly" : e.inclusive ? "at least" : "more than"} ${e.minimum} element(s)` : e.type === "string" ? `String must contain ${e.exact ? "exactly" : e.inclusive ? "at least" : "over"} ${e.minimum} character(s)` : e.type === "number" || e.type === "bigint" ? `Number must be ${e.exact ? "exactly equal to " : e.inclusive ? "greater than or equal to " : "greater than "}${e.minimum}` : e.type === "date" ? `Date must be ${e.exact ? "exactly equal to " : e.inclusive ? "greater than or equal to " : "greater than "}${new Date(Number(e.minimum))}` : "Invalid input";
|
|
1089
|
+
break;
|
|
1090
|
+
case c.too_big:
|
|
1091
|
+
n = e.type === "array" ? `Array must contain ${e.exact ? "exactly" : e.inclusive ? "at most" : "less than"} ${e.maximum} element(s)` : e.type === "string" ? `String must contain ${e.exact ? "exactly" : e.inclusive ? "at most" : "under"} ${e.maximum} character(s)` : e.type === "number" ? `Number must be ${e.exact ? "exactly" : e.inclusive ? "less than or equal to" : "less than"} ${e.maximum}` : e.type === "bigint" ? `BigInt must be ${e.exact ? "exactly" : e.inclusive ? "less than or equal to" : "less than"} ${e.maximum}` : e.type === "date" ? `Date must be ${e.exact ? "exactly" : e.inclusive ? "smaller than or equal to" : "smaller than"} ${new Date(Number(e.maximum))}` : "Invalid input";
|
|
1092
|
+
break;
|
|
1093
|
+
case c.custom:
|
|
1094
|
+
n = "Invalid input";
|
|
1095
|
+
break;
|
|
1096
|
+
case c.invalid_intersection_types:
|
|
1097
|
+
n = "Intersection results could not be merged";
|
|
1098
|
+
break;
|
|
1099
|
+
case c.not_multiple_of:
|
|
1100
|
+
n = `Number must be a multiple of ${e.multipleOf}`;
|
|
1101
|
+
break;
|
|
1102
|
+
case c.not_finite:
|
|
1103
|
+
n = "Number must be finite";
|
|
1104
|
+
break;
|
|
1105
|
+
default: n = t.defaultError, i.assertNever(e);
|
|
1106
|
+
}
|
|
1107
|
+
return { message: n };
|
|
1108
|
+
}, d = u;
|
|
1109
|
+
function f() {
|
|
1110
|
+
return d;
|
|
1111
|
+
}
|
|
1112
|
+
//#endregion
|
|
1113
|
+
//#region node_modules/zod/v3/helpers/parseUtil.js
|
|
1114
|
+
var p = (e) => {
|
|
1115
|
+
let { data: t, path: n, errorMaps: r, issueData: i } = e, a = [...n, ...i.path || []], o = {
|
|
1116
|
+
...i,
|
|
1117
|
+
path: a
|
|
1118
|
+
};
|
|
1119
|
+
if (i.message !== void 0) return {
|
|
1120
|
+
...i,
|
|
1121
|
+
path: a,
|
|
1122
|
+
message: i.message
|
|
1123
|
+
};
|
|
1124
|
+
let s = "", c = r.filter((e) => !!e).slice().reverse();
|
|
1125
|
+
for (let e of c) s = e(o, {
|
|
1126
|
+
data: t,
|
|
1127
|
+
defaultError: s
|
|
1128
|
+
}).message;
|
|
1129
|
+
return {
|
|
1130
|
+
...i,
|
|
1131
|
+
path: a,
|
|
1132
|
+
message: s
|
|
1133
|
+
};
|
|
1134
|
+
};
|
|
1135
|
+
function m(e, t) {
|
|
1136
|
+
let n = f(), r = p({
|
|
1137
|
+
issueData: t,
|
|
1138
|
+
data: e.data,
|
|
1139
|
+
path: e.path,
|
|
1140
|
+
errorMaps: [
|
|
1141
|
+
e.common.contextualErrorMap,
|
|
1142
|
+
e.schemaErrorMap,
|
|
1143
|
+
n,
|
|
1144
|
+
n === u ? void 0 : u
|
|
1145
|
+
].filter((e) => !!e)
|
|
1146
|
+
});
|
|
1147
|
+
e.common.issues.push(r);
|
|
1148
|
+
}
|
|
1149
|
+
var h = class e {
|
|
1150
|
+
constructor() {
|
|
1151
|
+
this.value = "valid";
|
|
1152
|
+
}
|
|
1153
|
+
dirty() {
|
|
1154
|
+
this.value === "valid" && (this.value = "dirty");
|
|
1155
|
+
}
|
|
1156
|
+
abort() {
|
|
1157
|
+
this.value !== "aborted" && (this.value = "aborted");
|
|
1158
|
+
}
|
|
1159
|
+
static mergeArray(e, t) {
|
|
1160
|
+
let n = [];
|
|
1161
|
+
for (let r of t) {
|
|
1162
|
+
if (r.status === "aborted") return g;
|
|
1163
|
+
r.status === "dirty" && e.dirty(), n.push(r.value);
|
|
1164
|
+
}
|
|
1165
|
+
return {
|
|
1166
|
+
status: e.value,
|
|
1167
|
+
value: n
|
|
1168
|
+
};
|
|
1169
|
+
}
|
|
1170
|
+
static async mergeObjectAsync(t, n) {
|
|
1171
|
+
let r = [];
|
|
1172
|
+
for (let e of n) {
|
|
1173
|
+
let t = await e.key, n = await e.value;
|
|
1174
|
+
r.push({
|
|
1175
|
+
key: t,
|
|
1176
|
+
value: n
|
|
1177
|
+
});
|
|
1178
|
+
}
|
|
1179
|
+
return e.mergeObjectSync(t, r);
|
|
1180
|
+
}
|
|
1181
|
+
static mergeObjectSync(e, t) {
|
|
1182
|
+
let n = {};
|
|
1183
|
+
for (let r of t) {
|
|
1184
|
+
let { key: t, value: i } = r;
|
|
1185
|
+
if (t.status === "aborted" || i.status === "aborted") return g;
|
|
1186
|
+
t.status === "dirty" && e.dirty(), i.status === "dirty" && e.dirty(), t.value !== "__proto__" && (i.value !== void 0 || r.alwaysSet) && (n[t.value] = i.value);
|
|
1187
|
+
}
|
|
1188
|
+
return {
|
|
1189
|
+
status: e.value,
|
|
1190
|
+
value: n
|
|
1191
|
+
};
|
|
1192
|
+
}
|
|
1193
|
+
}, g = Object.freeze({ status: "aborted" }), _ = (e) => ({
|
|
1194
|
+
status: "dirty",
|
|
1195
|
+
value: e
|
|
1196
|
+
}), v = (e) => ({
|
|
1197
|
+
status: "valid",
|
|
1198
|
+
value: e
|
|
1199
|
+
}), ee = (e) => e.status === "aborted", y = (e) => e.status === "dirty", b = (e) => e.status === "valid", x = (e) => typeof Promise < "u" && e instanceof Promise, S;
|
|
1200
|
+
(function(e) {
|
|
1201
|
+
e.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, e.toString = (e) => typeof e == "string" ? e : e?.message;
|
|
1202
|
+
})(S ||= {});
|
|
1203
|
+
//#endregion
|
|
1204
|
+
//#region node_modules/zod/v3/types.js
|
|
1205
|
+
var C = class {
|
|
1206
|
+
constructor(e, t, n, r) {
|
|
1207
|
+
this._cachedPath = [], this.parent = e, this.data = t, this._path = n, this._key = r;
|
|
1208
|
+
}
|
|
1209
|
+
get path() {
|
|
1210
|
+
return this._cachedPath.length || (Array.isArray(this._key) ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
|
|
1211
|
+
}
|
|
1212
|
+
}, w = (e, t) => {
|
|
1213
|
+
if (b(t)) return {
|
|
1214
|
+
success: !0,
|
|
1215
|
+
data: t.value
|
|
1216
|
+
};
|
|
1217
|
+
if (!e.common.issues.length) throw Error("Validation failed but no issues detected.");
|
|
1218
|
+
return {
|
|
1219
|
+
success: !1,
|
|
1220
|
+
get error() {
|
|
1221
|
+
return this._error ||= new l(e.common.issues), this._error;
|
|
1222
|
+
}
|
|
1223
|
+
};
|
|
1224
|
+
};
|
|
1225
|
+
function T(e) {
|
|
1226
|
+
if (!e) return {};
|
|
1227
|
+
let { errorMap: t, invalid_type_error: n, required_error: r, description: i } = e;
|
|
1228
|
+
if (t && (n || r)) throw Error("Can't use \"invalid_type_error\" or \"required_error\" in conjunction with custom error map.");
|
|
1229
|
+
return t ? {
|
|
1230
|
+
errorMap: t,
|
|
1231
|
+
description: i
|
|
1232
|
+
} : {
|
|
1233
|
+
errorMap: (t, i) => {
|
|
1234
|
+
let { message: a } = e;
|
|
1235
|
+
return t.code === "invalid_enum_value" ? { message: a ?? i.defaultError } : i.data === void 0 ? { message: a ?? r ?? i.defaultError } : t.code === "invalid_type" ? { message: a ?? n ?? i.defaultError } : { message: i.defaultError };
|
|
1236
|
+
},
|
|
1237
|
+
description: i
|
|
1238
|
+
};
|
|
1239
|
+
}
|
|
1240
|
+
var E = class {
|
|
1241
|
+
get description() {
|
|
1242
|
+
return this._def.description;
|
|
1243
|
+
}
|
|
1244
|
+
_getType(e) {
|
|
1245
|
+
return s(e.data);
|
|
1246
|
+
}
|
|
1247
|
+
_getOrReturnCtx(e, t) {
|
|
1248
|
+
return t || {
|
|
1249
|
+
common: e.parent.common,
|
|
1250
|
+
data: e.data,
|
|
1251
|
+
parsedType: s(e.data),
|
|
1252
|
+
schemaErrorMap: this._def.errorMap,
|
|
1253
|
+
path: e.path,
|
|
1254
|
+
parent: e.parent
|
|
1255
|
+
};
|
|
1256
|
+
}
|
|
1257
|
+
_processInputParams(e) {
|
|
1258
|
+
return {
|
|
1259
|
+
status: new h(),
|
|
1260
|
+
ctx: {
|
|
1261
|
+
common: e.parent.common,
|
|
1262
|
+
data: e.data,
|
|
1263
|
+
parsedType: s(e.data),
|
|
1264
|
+
schemaErrorMap: this._def.errorMap,
|
|
1265
|
+
path: e.path,
|
|
1266
|
+
parent: e.parent
|
|
1267
|
+
}
|
|
1268
|
+
};
|
|
1269
|
+
}
|
|
1270
|
+
_parseSync(e) {
|
|
1271
|
+
let t = this._parse(e);
|
|
1272
|
+
if (x(t)) throw Error("Synchronous parse encountered promise.");
|
|
1273
|
+
return t;
|
|
1274
|
+
}
|
|
1275
|
+
_parseAsync(e) {
|
|
1276
|
+
let t = this._parse(e);
|
|
1277
|
+
return Promise.resolve(t);
|
|
1278
|
+
}
|
|
1279
|
+
parse(e, t) {
|
|
1280
|
+
let n = this.safeParse(e, t);
|
|
1281
|
+
if (n.success) return n.data;
|
|
1282
|
+
throw n.error;
|
|
1283
|
+
}
|
|
1284
|
+
safeParse(e, t) {
|
|
1285
|
+
let n = {
|
|
1286
|
+
common: {
|
|
1287
|
+
issues: [],
|
|
1288
|
+
async: t?.async ?? !1,
|
|
1289
|
+
contextualErrorMap: t?.errorMap
|
|
1290
|
+
},
|
|
1291
|
+
path: t?.path || [],
|
|
1292
|
+
schemaErrorMap: this._def.errorMap,
|
|
1293
|
+
parent: null,
|
|
1294
|
+
data: e,
|
|
1295
|
+
parsedType: s(e)
|
|
1296
|
+
};
|
|
1297
|
+
return w(n, this._parseSync({
|
|
1298
|
+
data: e,
|
|
1299
|
+
path: n.path,
|
|
1300
|
+
parent: n
|
|
1301
|
+
}));
|
|
1302
|
+
}
|
|
1303
|
+
"~validate"(e) {
|
|
1304
|
+
let t = {
|
|
1305
|
+
common: {
|
|
1306
|
+
issues: [],
|
|
1307
|
+
async: !!this["~standard"].async
|
|
1308
|
+
},
|
|
1309
|
+
path: [],
|
|
1310
|
+
schemaErrorMap: this._def.errorMap,
|
|
1311
|
+
parent: null,
|
|
1312
|
+
data: e,
|
|
1313
|
+
parsedType: s(e)
|
|
1314
|
+
};
|
|
1315
|
+
if (!this["~standard"].async) try {
|
|
1316
|
+
let n = this._parseSync({
|
|
1317
|
+
data: e,
|
|
1318
|
+
path: [],
|
|
1319
|
+
parent: t
|
|
1320
|
+
});
|
|
1321
|
+
return b(n) ? { value: n.value } : { issues: t.common.issues };
|
|
1322
|
+
} catch (e) {
|
|
1323
|
+
e?.message?.toLowerCase()?.includes("encountered") && (this["~standard"].async = !0), t.common = {
|
|
1324
|
+
issues: [],
|
|
1325
|
+
async: !0
|
|
1326
|
+
};
|
|
1327
|
+
}
|
|
1328
|
+
return this._parseAsync({
|
|
1329
|
+
data: e,
|
|
1330
|
+
path: [],
|
|
1331
|
+
parent: t
|
|
1332
|
+
}).then((e) => b(e) ? { value: e.value } : { issues: t.common.issues });
|
|
1333
|
+
}
|
|
1334
|
+
async parseAsync(e, t) {
|
|
1335
|
+
let n = await this.safeParseAsync(e, t);
|
|
1336
|
+
if (n.success) return n.data;
|
|
1337
|
+
throw n.error;
|
|
1338
|
+
}
|
|
1339
|
+
async safeParseAsync(e, t) {
|
|
1340
|
+
let n = {
|
|
1341
|
+
common: {
|
|
1342
|
+
issues: [],
|
|
1343
|
+
contextualErrorMap: t?.errorMap,
|
|
1344
|
+
async: !0
|
|
1345
|
+
},
|
|
1346
|
+
path: t?.path || [],
|
|
1347
|
+
schemaErrorMap: this._def.errorMap,
|
|
1348
|
+
parent: null,
|
|
1349
|
+
data: e,
|
|
1350
|
+
parsedType: s(e)
|
|
1351
|
+
}, r = this._parse({
|
|
1352
|
+
data: e,
|
|
1353
|
+
path: n.path,
|
|
1354
|
+
parent: n
|
|
1355
|
+
});
|
|
1356
|
+
return w(n, await (x(r) ? r : Promise.resolve(r)));
|
|
1357
|
+
}
|
|
1358
|
+
refine(e, t) {
|
|
1359
|
+
let n = (e) => typeof t == "string" || t === void 0 ? { message: t } : typeof t == "function" ? t(e) : t;
|
|
1360
|
+
return this._refinement((t, r) => {
|
|
1361
|
+
let i = e(t), a = () => r.addIssue({
|
|
1362
|
+
code: c.custom,
|
|
1363
|
+
...n(t)
|
|
1364
|
+
});
|
|
1365
|
+
return typeof Promise < "u" && i instanceof Promise ? i.then((e) => e ? !0 : (a(), !1)) : i ? !0 : (a(), !1);
|
|
1366
|
+
});
|
|
1367
|
+
}
|
|
1368
|
+
refinement(e, t) {
|
|
1369
|
+
return this._refinement((n, r) => e(n) ? !0 : (r.addIssue(typeof t == "function" ? t(n, r) : t), !1));
|
|
1370
|
+
}
|
|
1371
|
+
_refinement(e) {
|
|
1372
|
+
return new Y({
|
|
1373
|
+
schema: this,
|
|
1374
|
+
typeName: Q.ZodEffects,
|
|
1375
|
+
effect: {
|
|
1376
|
+
type: "refinement",
|
|
1377
|
+
refinement: e
|
|
1378
|
+
}
|
|
1379
|
+
});
|
|
1380
|
+
}
|
|
1381
|
+
superRefine(e) {
|
|
1382
|
+
return this._refinement(e);
|
|
1383
|
+
}
|
|
1384
|
+
constructor(e) {
|
|
1385
|
+
this.spa = this.safeParseAsync, this._def = e, this.parse = this.parse.bind(this), this.safeParse = this.safeParse.bind(this), this.parseAsync = this.parseAsync.bind(this), this.safeParseAsync = this.safeParseAsync.bind(this), this.spa = this.spa.bind(this), this.refine = this.refine.bind(this), this.refinement = this.refinement.bind(this), this.superRefine = this.superRefine.bind(this), this.optional = this.optional.bind(this), this.nullable = this.nullable.bind(this), this.nullish = this.nullish.bind(this), this.array = this.array.bind(this), this.promise = this.promise.bind(this), this.or = this.or.bind(this), this.and = this.and.bind(this), this.transform = this.transform.bind(this), this.brand = this.brand.bind(this), this.default = this.default.bind(this), this.catch = this.catch.bind(this), this.describe = this.describe.bind(this), this.pipe = this.pipe.bind(this), this.readonly = this.readonly.bind(this), this.isNullable = this.isNullable.bind(this), this.isOptional = this.isOptional.bind(this), this["~standard"] = {
|
|
1386
|
+
version: 1,
|
|
1387
|
+
vendor: "zod",
|
|
1388
|
+
validate: (e) => this["~validate"](e)
|
|
1389
|
+
};
|
|
1390
|
+
}
|
|
1391
|
+
optional() {
|
|
1392
|
+
return X.create(this, this._def);
|
|
1393
|
+
}
|
|
1394
|
+
nullable() {
|
|
1395
|
+
return Z.create(this, this._def);
|
|
1396
|
+
}
|
|
1397
|
+
nullish() {
|
|
1398
|
+
return this.nullable().optional();
|
|
1399
|
+
}
|
|
1400
|
+
array() {
|
|
1401
|
+
return U.create(this);
|
|
1402
|
+
}
|
|
1403
|
+
promise() {
|
|
1404
|
+
return Pe.create(this, this._def);
|
|
1405
|
+
}
|
|
1406
|
+
or(e) {
|
|
1407
|
+
return K.create([this, e], this._def);
|
|
1408
|
+
}
|
|
1409
|
+
and(e) {
|
|
1410
|
+
return we.create(this, e, this._def);
|
|
1411
|
+
}
|
|
1412
|
+
transform(e) {
|
|
1413
|
+
return new Y({
|
|
1414
|
+
...T(this._def),
|
|
1415
|
+
schema: this,
|
|
1416
|
+
typeName: Q.ZodEffects,
|
|
1417
|
+
effect: {
|
|
1418
|
+
type: "transform",
|
|
1419
|
+
transform: e
|
|
1420
|
+
}
|
|
1421
|
+
});
|
|
1422
|
+
}
|
|
1423
|
+
default(e) {
|
|
1424
|
+
let t = typeof e == "function" ? e : () => e;
|
|
1425
|
+
return new Fe({
|
|
1426
|
+
...T(this._def),
|
|
1427
|
+
innerType: this,
|
|
1428
|
+
defaultValue: t,
|
|
1429
|
+
typeName: Q.ZodDefault
|
|
1430
|
+
});
|
|
1431
|
+
}
|
|
1432
|
+
brand() {
|
|
1433
|
+
return new Re({
|
|
1434
|
+
typeName: Q.ZodBranded,
|
|
1435
|
+
type: this,
|
|
1436
|
+
...T(this._def)
|
|
1437
|
+
});
|
|
1438
|
+
}
|
|
1439
|
+
catch(e) {
|
|
1440
|
+
let t = typeof e == "function" ? e : () => e;
|
|
1441
|
+
return new Ie({
|
|
1442
|
+
...T(this._def),
|
|
1443
|
+
innerType: this,
|
|
1444
|
+
catchValue: t,
|
|
1445
|
+
typeName: Q.ZodCatch
|
|
1446
|
+
});
|
|
1447
|
+
}
|
|
1448
|
+
describe(e) {
|
|
1449
|
+
let t = this.constructor;
|
|
1450
|
+
return new t({
|
|
1451
|
+
...this._def,
|
|
1452
|
+
description: e
|
|
1453
|
+
});
|
|
1454
|
+
}
|
|
1455
|
+
pipe(e) {
|
|
1456
|
+
return ze.create(this, e);
|
|
1457
|
+
}
|
|
1458
|
+
readonly() {
|
|
1459
|
+
return Be.create(this);
|
|
1460
|
+
}
|
|
1461
|
+
isOptional() {
|
|
1462
|
+
return this.safeParse(void 0).success;
|
|
1463
|
+
}
|
|
1464
|
+
isNullable() {
|
|
1465
|
+
return this.safeParse(null).success;
|
|
1466
|
+
}
|
|
1467
|
+
}, D = /^c[^\s-]{8,}$/i, te = /^[0-9a-z]+$/, O = /^[0-9A-HJKMNP-TV-Z]{26}$/i, k = /^[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, A = /^[a-z0-9_-]{21}$/i, j = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, M = /^[-+]?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)?)??$/, ne = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, re = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", N, ie = /^(?:(?: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])$/, ae = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, oe = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, se = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, ce = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, le = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, ue = "((\\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])))", de = RegExp(`^${ue}$`);
|
|
1468
|
+
function P(e) {
|
|
1469
|
+
let t = "[0-5]\\d";
|
|
1470
|
+
e.precision ? t = `${t}\\.\\d{${e.precision}}` : e.precision ?? (t = `${t}(\\.\\d+)?`);
|
|
1471
|
+
let n = e.precision ? "+" : "?";
|
|
1472
|
+
return `([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`;
|
|
1473
|
+
}
|
|
1474
|
+
function fe(e) {
|
|
1475
|
+
return RegExp(`^${P(e)}$`);
|
|
1476
|
+
}
|
|
1477
|
+
function pe(e) {
|
|
1478
|
+
let t = `${ue}T${P(e)}`, n = [];
|
|
1479
|
+
return n.push(e.local ? "Z?" : "Z"), e.offset && n.push("([+-]\\d{2}:?\\d{2})"), t = `${t}(${n.join("|")})`, RegExp(`^${t}$`);
|
|
1480
|
+
}
|
|
1481
|
+
function me(e, t) {
|
|
1482
|
+
return !!((t === "v4" || !t) && ie.test(e) || (t === "v6" || !t) && oe.test(e));
|
|
1483
|
+
}
|
|
1484
|
+
function he(e, t) {
|
|
1485
|
+
if (!j.test(e)) return !1;
|
|
1486
|
+
try {
|
|
1487
|
+
let [n] = e.split(".");
|
|
1488
|
+
if (!n) return !1;
|
|
1489
|
+
let r = n.replace(/-/g, "+").replace(/_/g, "/").padEnd(n.length + (4 - n.length % 4) % 4, "="), i = JSON.parse(atob(r));
|
|
1490
|
+
return !(typeof i != "object" || !i || "typ" in i && i?.typ !== "JWT" || !i.alg || t && i.alg !== t);
|
|
1491
|
+
} catch {
|
|
1492
|
+
return !1;
|
|
1493
|
+
}
|
|
1494
|
+
}
|
|
1495
|
+
function ge(e, t) {
|
|
1496
|
+
return !!((t === "v4" || !t) && ae.test(e) || (t === "v6" || !t) && se.test(e));
|
|
1497
|
+
}
|
|
1498
|
+
var F = class e extends E {
|
|
1499
|
+
_parse(e) {
|
|
1500
|
+
if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== o.string) {
|
|
1501
|
+
let t = this._getOrReturnCtx(e);
|
|
1502
|
+
return m(t, {
|
|
1503
|
+
code: c.invalid_type,
|
|
1504
|
+
expected: o.string,
|
|
1505
|
+
received: t.parsedType
|
|
1506
|
+
}), g;
|
|
1507
|
+
}
|
|
1508
|
+
let t = new h(), n;
|
|
1509
|
+
for (let r of this._def.checks) if (r.kind === "min") e.data.length < r.value && (n = this._getOrReturnCtx(e, n), m(n, {
|
|
1510
|
+
code: c.too_small,
|
|
1511
|
+
minimum: r.value,
|
|
1512
|
+
type: "string",
|
|
1513
|
+
inclusive: !0,
|
|
1514
|
+
exact: !1,
|
|
1515
|
+
message: r.message
|
|
1516
|
+
}), t.dirty());
|
|
1517
|
+
else if (r.kind === "max") e.data.length > r.value && (n = this._getOrReturnCtx(e, n), m(n, {
|
|
1518
|
+
code: c.too_big,
|
|
1519
|
+
maximum: r.value,
|
|
1520
|
+
type: "string",
|
|
1521
|
+
inclusive: !0,
|
|
1522
|
+
exact: !1,
|
|
1523
|
+
message: r.message
|
|
1524
|
+
}), t.dirty());
|
|
1525
|
+
else if (r.kind === "length") {
|
|
1526
|
+
let i = e.data.length > r.value, a = e.data.length < r.value;
|
|
1527
|
+
(i || a) && (n = this._getOrReturnCtx(e, n), i ? m(n, {
|
|
1528
|
+
code: c.too_big,
|
|
1529
|
+
maximum: r.value,
|
|
1530
|
+
type: "string",
|
|
1531
|
+
inclusive: !0,
|
|
1532
|
+
exact: !0,
|
|
1533
|
+
message: r.message
|
|
1534
|
+
}) : a && m(n, {
|
|
1535
|
+
code: c.too_small,
|
|
1536
|
+
minimum: r.value,
|
|
1537
|
+
type: "string",
|
|
1538
|
+
inclusive: !0,
|
|
1539
|
+
exact: !0,
|
|
1540
|
+
message: r.message
|
|
1541
|
+
}), t.dirty());
|
|
1542
|
+
} else if (r.kind === "email") ne.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
|
|
1543
|
+
validation: "email",
|
|
1544
|
+
code: c.invalid_string,
|
|
1545
|
+
message: r.message
|
|
1546
|
+
}), t.dirty());
|
|
1547
|
+
else if (r.kind === "emoji") N ||= new RegExp(re, "u"), N.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
|
|
1548
|
+
validation: "emoji",
|
|
1549
|
+
code: c.invalid_string,
|
|
1550
|
+
message: r.message
|
|
1551
|
+
}), t.dirty());
|
|
1552
|
+
else if (r.kind === "uuid") k.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
|
|
1553
|
+
validation: "uuid",
|
|
1554
|
+
code: c.invalid_string,
|
|
1555
|
+
message: r.message
|
|
1556
|
+
}), t.dirty());
|
|
1557
|
+
else if (r.kind === "nanoid") A.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
|
|
1558
|
+
validation: "nanoid",
|
|
1559
|
+
code: c.invalid_string,
|
|
1560
|
+
message: r.message
|
|
1561
|
+
}), t.dirty());
|
|
1562
|
+
else if (r.kind === "cuid") D.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
|
|
1563
|
+
validation: "cuid",
|
|
1564
|
+
code: c.invalid_string,
|
|
1565
|
+
message: r.message
|
|
1566
|
+
}), t.dirty());
|
|
1567
|
+
else if (r.kind === "cuid2") te.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
|
|
1568
|
+
validation: "cuid2",
|
|
1569
|
+
code: c.invalid_string,
|
|
1570
|
+
message: r.message
|
|
1571
|
+
}), t.dirty());
|
|
1572
|
+
else if (r.kind === "ulid") O.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
|
|
1573
|
+
validation: "ulid",
|
|
1574
|
+
code: c.invalid_string,
|
|
1575
|
+
message: r.message
|
|
1576
|
+
}), t.dirty());
|
|
1577
|
+
else if (r.kind === "url") try {
|
|
1578
|
+
new URL(e.data);
|
|
1579
|
+
} catch {
|
|
1580
|
+
n = this._getOrReturnCtx(e, n), m(n, {
|
|
1581
|
+
validation: "url",
|
|
1582
|
+
code: c.invalid_string,
|
|
1583
|
+
message: r.message
|
|
1584
|
+
}), t.dirty();
|
|
1585
|
+
}
|
|
1586
|
+
else r.kind === "regex" ? (r.regex.lastIndex = 0, r.regex.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
|
|
1587
|
+
validation: "regex",
|
|
1588
|
+
code: c.invalid_string,
|
|
1589
|
+
message: r.message
|
|
1590
|
+
}), t.dirty())) : r.kind === "trim" ? e.data = e.data.trim() : r.kind === "includes" ? e.data.includes(r.value, r.position) || (n = this._getOrReturnCtx(e, n), m(n, {
|
|
1591
|
+
code: c.invalid_string,
|
|
1592
|
+
validation: {
|
|
1593
|
+
includes: r.value,
|
|
1594
|
+
position: r.position
|
|
1595
|
+
},
|
|
1596
|
+
message: r.message
|
|
1597
|
+
}), t.dirty()) : r.kind === "toLowerCase" ? e.data = e.data.toLowerCase() : r.kind === "toUpperCase" ? e.data = e.data.toUpperCase() : r.kind === "startsWith" ? e.data.startsWith(r.value) || (n = this._getOrReturnCtx(e, n), m(n, {
|
|
1598
|
+
code: c.invalid_string,
|
|
1599
|
+
validation: { startsWith: r.value },
|
|
1600
|
+
message: r.message
|
|
1601
|
+
}), t.dirty()) : r.kind === "endsWith" ? e.data.endsWith(r.value) || (n = this._getOrReturnCtx(e, n), m(n, {
|
|
1602
|
+
code: c.invalid_string,
|
|
1603
|
+
validation: { endsWith: r.value },
|
|
1604
|
+
message: r.message
|
|
1605
|
+
}), t.dirty()) : r.kind === "datetime" ? pe(r).test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
|
|
1606
|
+
code: c.invalid_string,
|
|
1607
|
+
validation: "datetime",
|
|
1608
|
+
message: r.message
|
|
1609
|
+
}), t.dirty()) : r.kind === "date" ? de.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
|
|
1610
|
+
code: c.invalid_string,
|
|
1611
|
+
validation: "date",
|
|
1612
|
+
message: r.message
|
|
1613
|
+
}), t.dirty()) : r.kind === "time" ? fe(r).test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
|
|
1614
|
+
code: c.invalid_string,
|
|
1615
|
+
validation: "time",
|
|
1616
|
+
message: r.message
|
|
1617
|
+
}), t.dirty()) : r.kind === "duration" ? M.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
|
|
1618
|
+
validation: "duration",
|
|
1619
|
+
code: c.invalid_string,
|
|
1620
|
+
message: r.message
|
|
1621
|
+
}), t.dirty()) : r.kind === "ip" ? me(e.data, r.version) || (n = this._getOrReturnCtx(e, n), m(n, {
|
|
1622
|
+
validation: "ip",
|
|
1623
|
+
code: c.invalid_string,
|
|
1624
|
+
message: r.message
|
|
1625
|
+
}), t.dirty()) : r.kind === "jwt" ? he(e.data, r.alg) || (n = this._getOrReturnCtx(e, n), m(n, {
|
|
1626
|
+
validation: "jwt",
|
|
1627
|
+
code: c.invalid_string,
|
|
1628
|
+
message: r.message
|
|
1629
|
+
}), t.dirty()) : r.kind === "cidr" ? ge(e.data, r.version) || (n = this._getOrReturnCtx(e, n), m(n, {
|
|
1630
|
+
validation: "cidr",
|
|
1631
|
+
code: c.invalid_string,
|
|
1632
|
+
message: r.message
|
|
1633
|
+
}), t.dirty()) : r.kind === "base64" ? ce.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
|
|
1634
|
+
validation: "base64",
|
|
1635
|
+
code: c.invalid_string,
|
|
1636
|
+
message: r.message
|
|
1637
|
+
}), t.dirty()) : r.kind === "base64url" ? le.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
|
|
1638
|
+
validation: "base64url",
|
|
1639
|
+
code: c.invalid_string,
|
|
1640
|
+
message: r.message
|
|
1641
|
+
}), t.dirty()) : i.assertNever(r);
|
|
1642
|
+
return {
|
|
1643
|
+
status: t.value,
|
|
1644
|
+
value: e.data
|
|
1645
|
+
};
|
|
1646
|
+
}
|
|
1647
|
+
_regex(e, t, n) {
|
|
1648
|
+
return this.refinement((t) => e.test(t), {
|
|
1649
|
+
validation: t,
|
|
1650
|
+
code: c.invalid_string,
|
|
1651
|
+
...S.errToObj(n)
|
|
1652
|
+
});
|
|
1653
|
+
}
|
|
1654
|
+
_addCheck(t) {
|
|
1655
|
+
return new e({
|
|
1656
|
+
...this._def,
|
|
1657
|
+
checks: [...this._def.checks, t]
|
|
1658
|
+
});
|
|
1659
|
+
}
|
|
1660
|
+
email(e) {
|
|
1661
|
+
return this._addCheck({
|
|
1662
|
+
kind: "email",
|
|
1663
|
+
...S.errToObj(e)
|
|
1664
|
+
});
|
|
1665
|
+
}
|
|
1666
|
+
url(e) {
|
|
1667
|
+
return this._addCheck({
|
|
1668
|
+
kind: "url",
|
|
1669
|
+
...S.errToObj(e)
|
|
1670
|
+
});
|
|
1671
|
+
}
|
|
1672
|
+
emoji(e) {
|
|
1673
|
+
return this._addCheck({
|
|
1674
|
+
kind: "emoji",
|
|
1675
|
+
...S.errToObj(e)
|
|
1676
|
+
});
|
|
1677
|
+
}
|
|
1678
|
+
uuid(e) {
|
|
1679
|
+
return this._addCheck({
|
|
1680
|
+
kind: "uuid",
|
|
1681
|
+
...S.errToObj(e)
|
|
1682
|
+
});
|
|
1683
|
+
}
|
|
1684
|
+
nanoid(e) {
|
|
1685
|
+
return this._addCheck({
|
|
1686
|
+
kind: "nanoid",
|
|
1687
|
+
...S.errToObj(e)
|
|
1688
|
+
});
|
|
1689
|
+
}
|
|
1690
|
+
cuid(e) {
|
|
1691
|
+
return this._addCheck({
|
|
1692
|
+
kind: "cuid",
|
|
1693
|
+
...S.errToObj(e)
|
|
1694
|
+
});
|
|
1695
|
+
}
|
|
1696
|
+
cuid2(e) {
|
|
1697
|
+
return this._addCheck({
|
|
1698
|
+
kind: "cuid2",
|
|
1699
|
+
...S.errToObj(e)
|
|
1700
|
+
});
|
|
1701
|
+
}
|
|
1702
|
+
ulid(e) {
|
|
1703
|
+
return this._addCheck({
|
|
1704
|
+
kind: "ulid",
|
|
1705
|
+
...S.errToObj(e)
|
|
1706
|
+
});
|
|
1707
|
+
}
|
|
1708
|
+
base64(e) {
|
|
1709
|
+
return this._addCheck({
|
|
1710
|
+
kind: "base64",
|
|
1711
|
+
...S.errToObj(e)
|
|
1712
|
+
});
|
|
1713
|
+
}
|
|
1714
|
+
base64url(e) {
|
|
1715
|
+
return this._addCheck({
|
|
1716
|
+
kind: "base64url",
|
|
1717
|
+
...S.errToObj(e)
|
|
1718
|
+
});
|
|
1719
|
+
}
|
|
1720
|
+
jwt(e) {
|
|
1721
|
+
return this._addCheck({
|
|
1722
|
+
kind: "jwt",
|
|
1723
|
+
...S.errToObj(e)
|
|
1724
|
+
});
|
|
1725
|
+
}
|
|
1726
|
+
ip(e) {
|
|
1727
|
+
return this._addCheck({
|
|
1728
|
+
kind: "ip",
|
|
1729
|
+
...S.errToObj(e)
|
|
1730
|
+
});
|
|
1731
|
+
}
|
|
1732
|
+
cidr(e) {
|
|
1733
|
+
return this._addCheck({
|
|
1734
|
+
kind: "cidr",
|
|
1735
|
+
...S.errToObj(e)
|
|
1736
|
+
});
|
|
1737
|
+
}
|
|
1738
|
+
datetime(e) {
|
|
1739
|
+
return typeof e == "string" ? this._addCheck({
|
|
1740
|
+
kind: "datetime",
|
|
1741
|
+
precision: null,
|
|
1742
|
+
offset: !1,
|
|
1743
|
+
local: !1,
|
|
1744
|
+
message: e
|
|
1745
|
+
}) : this._addCheck({
|
|
1746
|
+
kind: "datetime",
|
|
1747
|
+
precision: e?.precision === void 0 ? null : e?.precision,
|
|
1748
|
+
offset: e?.offset ?? !1,
|
|
1749
|
+
local: e?.local ?? !1,
|
|
1750
|
+
...S.errToObj(e?.message)
|
|
1751
|
+
});
|
|
1752
|
+
}
|
|
1753
|
+
date(e) {
|
|
1754
|
+
return this._addCheck({
|
|
1755
|
+
kind: "date",
|
|
1756
|
+
message: e
|
|
1757
|
+
});
|
|
1758
|
+
}
|
|
1759
|
+
time(e) {
|
|
1760
|
+
return typeof e == "string" ? this._addCheck({
|
|
1761
|
+
kind: "time",
|
|
1762
|
+
precision: null,
|
|
1763
|
+
message: e
|
|
1764
|
+
}) : this._addCheck({
|
|
1765
|
+
kind: "time",
|
|
1766
|
+
precision: e?.precision === void 0 ? null : e?.precision,
|
|
1767
|
+
...S.errToObj(e?.message)
|
|
1768
|
+
});
|
|
1769
|
+
}
|
|
1770
|
+
duration(e) {
|
|
1771
|
+
return this._addCheck({
|
|
1772
|
+
kind: "duration",
|
|
1773
|
+
...S.errToObj(e)
|
|
1774
|
+
});
|
|
1775
|
+
}
|
|
1776
|
+
regex(e, t) {
|
|
1777
|
+
return this._addCheck({
|
|
1778
|
+
kind: "regex",
|
|
1779
|
+
regex: e,
|
|
1780
|
+
...S.errToObj(t)
|
|
1781
|
+
});
|
|
1782
|
+
}
|
|
1783
|
+
includes(e, t) {
|
|
1784
|
+
return this._addCheck({
|
|
1785
|
+
kind: "includes",
|
|
1786
|
+
value: e,
|
|
1787
|
+
position: t?.position,
|
|
1788
|
+
...S.errToObj(t?.message)
|
|
1789
|
+
});
|
|
1790
|
+
}
|
|
1791
|
+
startsWith(e, t) {
|
|
1792
|
+
return this._addCheck({
|
|
1793
|
+
kind: "startsWith",
|
|
1794
|
+
value: e,
|
|
1795
|
+
...S.errToObj(t)
|
|
1796
|
+
});
|
|
1797
|
+
}
|
|
1798
|
+
endsWith(e, t) {
|
|
1799
|
+
return this._addCheck({
|
|
1800
|
+
kind: "endsWith",
|
|
1801
|
+
value: e,
|
|
1802
|
+
...S.errToObj(t)
|
|
1803
|
+
});
|
|
1804
|
+
}
|
|
1805
|
+
min(e, t) {
|
|
1806
|
+
return this._addCheck({
|
|
1807
|
+
kind: "min",
|
|
1808
|
+
value: e,
|
|
1809
|
+
...S.errToObj(t)
|
|
1810
|
+
});
|
|
1811
|
+
}
|
|
1812
|
+
max(e, t) {
|
|
1813
|
+
return this._addCheck({
|
|
1814
|
+
kind: "max",
|
|
1815
|
+
value: e,
|
|
1816
|
+
...S.errToObj(t)
|
|
1817
|
+
});
|
|
1818
|
+
}
|
|
1819
|
+
length(e, t) {
|
|
1820
|
+
return this._addCheck({
|
|
1821
|
+
kind: "length",
|
|
1822
|
+
value: e,
|
|
1823
|
+
...S.errToObj(t)
|
|
1824
|
+
});
|
|
1825
|
+
}
|
|
1826
|
+
nonempty(e) {
|
|
1827
|
+
return this.min(1, S.errToObj(e));
|
|
1828
|
+
}
|
|
1829
|
+
trim() {
|
|
1830
|
+
return new e({
|
|
1831
|
+
...this._def,
|
|
1832
|
+
checks: [...this._def.checks, { kind: "trim" }]
|
|
1833
|
+
});
|
|
1834
|
+
}
|
|
1835
|
+
toLowerCase() {
|
|
1836
|
+
return new e({
|
|
1837
|
+
...this._def,
|
|
1838
|
+
checks: [...this._def.checks, { kind: "toLowerCase" }]
|
|
1839
|
+
});
|
|
1840
|
+
}
|
|
1841
|
+
toUpperCase() {
|
|
1842
|
+
return new e({
|
|
1843
|
+
...this._def,
|
|
1844
|
+
checks: [...this._def.checks, { kind: "toUpperCase" }]
|
|
1845
|
+
});
|
|
1846
|
+
}
|
|
1847
|
+
get isDatetime() {
|
|
1848
|
+
return !!this._def.checks.find((e) => e.kind === "datetime");
|
|
1849
|
+
}
|
|
1850
|
+
get isDate() {
|
|
1851
|
+
return !!this._def.checks.find((e) => e.kind === "date");
|
|
1852
|
+
}
|
|
1853
|
+
get isTime() {
|
|
1854
|
+
return !!this._def.checks.find((e) => e.kind === "time");
|
|
1855
|
+
}
|
|
1856
|
+
get isDuration() {
|
|
1857
|
+
return !!this._def.checks.find((e) => e.kind === "duration");
|
|
1858
|
+
}
|
|
1859
|
+
get isEmail() {
|
|
1860
|
+
return !!this._def.checks.find((e) => e.kind === "email");
|
|
1861
|
+
}
|
|
1862
|
+
get isURL() {
|
|
1863
|
+
return !!this._def.checks.find((e) => e.kind === "url");
|
|
1864
|
+
}
|
|
1865
|
+
get isEmoji() {
|
|
1866
|
+
return !!this._def.checks.find((e) => e.kind === "emoji");
|
|
1867
|
+
}
|
|
1868
|
+
get isUUID() {
|
|
1869
|
+
return !!this._def.checks.find((e) => e.kind === "uuid");
|
|
1870
|
+
}
|
|
1871
|
+
get isNANOID() {
|
|
1872
|
+
return !!this._def.checks.find((e) => e.kind === "nanoid");
|
|
1873
|
+
}
|
|
1874
|
+
get isCUID() {
|
|
1875
|
+
return !!this._def.checks.find((e) => e.kind === "cuid");
|
|
1876
|
+
}
|
|
1877
|
+
get isCUID2() {
|
|
1878
|
+
return !!this._def.checks.find((e) => e.kind === "cuid2");
|
|
1879
|
+
}
|
|
1880
|
+
get isULID() {
|
|
1881
|
+
return !!this._def.checks.find((e) => e.kind === "ulid");
|
|
1882
|
+
}
|
|
1883
|
+
get isIP() {
|
|
1884
|
+
return !!this._def.checks.find((e) => e.kind === "ip");
|
|
1885
|
+
}
|
|
1886
|
+
get isCIDR() {
|
|
1887
|
+
return !!this._def.checks.find((e) => e.kind === "cidr");
|
|
1888
|
+
}
|
|
1889
|
+
get isBase64() {
|
|
1890
|
+
return !!this._def.checks.find((e) => e.kind === "base64");
|
|
1891
|
+
}
|
|
1892
|
+
get isBase64url() {
|
|
1893
|
+
return !!this._def.checks.find((e) => e.kind === "base64url");
|
|
1894
|
+
}
|
|
1895
|
+
get minLength() {
|
|
1896
|
+
let e = null;
|
|
1897
|
+
for (let t of this._def.checks) t.kind === "min" && (e === null || t.value > e) && (e = t.value);
|
|
1898
|
+
return e;
|
|
1899
|
+
}
|
|
1900
|
+
get maxLength() {
|
|
1901
|
+
let e = null;
|
|
1902
|
+
for (let t of this._def.checks) t.kind === "max" && (e === null || t.value < e) && (e = t.value);
|
|
1903
|
+
return e;
|
|
1904
|
+
}
|
|
1905
|
+
};
|
|
1906
|
+
F.create = (e) => new F({
|
|
1907
|
+
checks: [],
|
|
1908
|
+
typeName: Q.ZodString,
|
|
1909
|
+
coerce: e?.coerce ?? !1,
|
|
1910
|
+
...T(e)
|
|
1911
|
+
});
|
|
1912
|
+
function I(e, t) {
|
|
1913
|
+
let n = (e.toString().split(".")[1] || "").length, r = (t.toString().split(".")[1] || "").length, i = n > r ? n : r;
|
|
1914
|
+
return Number.parseInt(e.toFixed(i).replace(".", "")) % Number.parseInt(t.toFixed(i).replace(".", "")) / 10 ** i;
|
|
1915
|
+
}
|
|
1916
|
+
var _e = class e extends E {
|
|
1917
|
+
constructor() {
|
|
1918
|
+
super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
|
|
1919
|
+
}
|
|
1920
|
+
_parse(e) {
|
|
1921
|
+
if (this._def.coerce && (e.data = Number(e.data)), this._getType(e) !== o.number) {
|
|
1922
|
+
let t = this._getOrReturnCtx(e);
|
|
1923
|
+
return m(t, {
|
|
1924
|
+
code: c.invalid_type,
|
|
1925
|
+
expected: o.number,
|
|
1926
|
+
received: t.parsedType
|
|
1927
|
+
}), g;
|
|
1928
|
+
}
|
|
1929
|
+
let t, n = new h();
|
|
1930
|
+
for (let r of this._def.checks) r.kind === "int" ? i.isInteger(e.data) || (t = this._getOrReturnCtx(e, t), m(t, {
|
|
1931
|
+
code: c.invalid_type,
|
|
1932
|
+
expected: "integer",
|
|
1933
|
+
received: "float",
|
|
1934
|
+
message: r.message
|
|
1935
|
+
}), n.dirty()) : r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (t = this._getOrReturnCtx(e, t), m(t, {
|
|
1936
|
+
code: c.too_small,
|
|
1937
|
+
minimum: r.value,
|
|
1938
|
+
type: "number",
|
|
1939
|
+
inclusive: r.inclusive,
|
|
1940
|
+
exact: !1,
|
|
1941
|
+
message: r.message
|
|
1942
|
+
}), n.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (t = this._getOrReturnCtx(e, t), m(t, {
|
|
1943
|
+
code: c.too_big,
|
|
1944
|
+
maximum: r.value,
|
|
1945
|
+
type: "number",
|
|
1946
|
+
inclusive: r.inclusive,
|
|
1947
|
+
exact: !1,
|
|
1948
|
+
message: r.message
|
|
1949
|
+
}), n.dirty()) : r.kind === "multipleOf" ? I(e.data, r.value) !== 0 && (t = this._getOrReturnCtx(e, t), m(t, {
|
|
1950
|
+
code: c.not_multiple_of,
|
|
1951
|
+
multipleOf: r.value,
|
|
1952
|
+
message: r.message
|
|
1953
|
+
}), n.dirty()) : r.kind === "finite" ? Number.isFinite(e.data) || (t = this._getOrReturnCtx(e, t), m(t, {
|
|
1954
|
+
code: c.not_finite,
|
|
1955
|
+
message: r.message
|
|
1956
|
+
}), n.dirty()) : i.assertNever(r);
|
|
1957
|
+
return {
|
|
1958
|
+
status: n.value,
|
|
1959
|
+
value: e.data
|
|
1960
|
+
};
|
|
1961
|
+
}
|
|
1962
|
+
gte(e, t) {
|
|
1963
|
+
return this.setLimit("min", e, !0, S.toString(t));
|
|
1964
|
+
}
|
|
1965
|
+
gt(e, t) {
|
|
1966
|
+
return this.setLimit("min", e, !1, S.toString(t));
|
|
1967
|
+
}
|
|
1968
|
+
lte(e, t) {
|
|
1969
|
+
return this.setLimit("max", e, !0, S.toString(t));
|
|
1970
|
+
}
|
|
1971
|
+
lt(e, t) {
|
|
1972
|
+
return this.setLimit("max", e, !1, S.toString(t));
|
|
1973
|
+
}
|
|
1974
|
+
setLimit(t, n, r, i) {
|
|
1975
|
+
return new e({
|
|
1976
|
+
...this._def,
|
|
1977
|
+
checks: [...this._def.checks, {
|
|
1978
|
+
kind: t,
|
|
1979
|
+
value: n,
|
|
1980
|
+
inclusive: r,
|
|
1981
|
+
message: S.toString(i)
|
|
1982
|
+
}]
|
|
1983
|
+
});
|
|
1984
|
+
}
|
|
1985
|
+
_addCheck(t) {
|
|
1986
|
+
return new e({
|
|
1987
|
+
...this._def,
|
|
1988
|
+
checks: [...this._def.checks, t]
|
|
1989
|
+
});
|
|
1990
|
+
}
|
|
1991
|
+
int(e) {
|
|
1992
|
+
return this._addCheck({
|
|
1993
|
+
kind: "int",
|
|
1994
|
+
message: S.toString(e)
|
|
1995
|
+
});
|
|
1996
|
+
}
|
|
1997
|
+
positive(e) {
|
|
1998
|
+
return this._addCheck({
|
|
1999
|
+
kind: "min",
|
|
2000
|
+
value: 0,
|
|
2001
|
+
inclusive: !1,
|
|
2002
|
+
message: S.toString(e)
|
|
2003
|
+
});
|
|
2004
|
+
}
|
|
2005
|
+
negative(e) {
|
|
2006
|
+
return this._addCheck({
|
|
2007
|
+
kind: "max",
|
|
2008
|
+
value: 0,
|
|
2009
|
+
inclusive: !1,
|
|
2010
|
+
message: S.toString(e)
|
|
2011
|
+
});
|
|
2012
|
+
}
|
|
2013
|
+
nonpositive(e) {
|
|
2014
|
+
return this._addCheck({
|
|
2015
|
+
kind: "max",
|
|
2016
|
+
value: 0,
|
|
2017
|
+
inclusive: !0,
|
|
2018
|
+
message: S.toString(e)
|
|
2019
|
+
});
|
|
2020
|
+
}
|
|
2021
|
+
nonnegative(e) {
|
|
2022
|
+
return this._addCheck({
|
|
2023
|
+
kind: "min",
|
|
2024
|
+
value: 0,
|
|
2025
|
+
inclusive: !0,
|
|
2026
|
+
message: S.toString(e)
|
|
2027
|
+
});
|
|
2028
|
+
}
|
|
2029
|
+
multipleOf(e, t) {
|
|
2030
|
+
return this._addCheck({
|
|
2031
|
+
kind: "multipleOf",
|
|
2032
|
+
value: e,
|
|
2033
|
+
message: S.toString(t)
|
|
2034
|
+
});
|
|
2035
|
+
}
|
|
2036
|
+
finite(e) {
|
|
2037
|
+
return this._addCheck({
|
|
2038
|
+
kind: "finite",
|
|
2039
|
+
message: S.toString(e)
|
|
2040
|
+
});
|
|
2041
|
+
}
|
|
2042
|
+
safe(e) {
|
|
2043
|
+
return this._addCheck({
|
|
2044
|
+
kind: "min",
|
|
2045
|
+
inclusive: !0,
|
|
2046
|
+
value: -(2 ** 53 - 1),
|
|
2047
|
+
message: S.toString(e)
|
|
2048
|
+
})._addCheck({
|
|
2049
|
+
kind: "max",
|
|
2050
|
+
inclusive: !0,
|
|
2051
|
+
value: 2 ** 53 - 1,
|
|
2052
|
+
message: S.toString(e)
|
|
2053
|
+
});
|
|
2054
|
+
}
|
|
2055
|
+
get minValue() {
|
|
2056
|
+
let e = null;
|
|
2057
|
+
for (let t of this._def.checks) t.kind === "min" && (e === null || t.value > e) && (e = t.value);
|
|
2058
|
+
return e;
|
|
2059
|
+
}
|
|
2060
|
+
get maxValue() {
|
|
2061
|
+
let e = null;
|
|
2062
|
+
for (let t of this._def.checks) t.kind === "max" && (e === null || t.value < e) && (e = t.value);
|
|
2063
|
+
return e;
|
|
2064
|
+
}
|
|
2065
|
+
get isInt() {
|
|
2066
|
+
return !!this._def.checks.find((e) => e.kind === "int" || e.kind === "multipleOf" && i.isInteger(e.value));
|
|
2067
|
+
}
|
|
2068
|
+
get isFinite() {
|
|
2069
|
+
let e = null, t = null;
|
|
2070
|
+
for (let n of this._def.checks) if (n.kind === "finite" || n.kind === "int" || n.kind === "multipleOf") return !0;
|
|
2071
|
+
else n.kind === "min" ? (t === null || n.value > t) && (t = n.value) : n.kind === "max" && (e === null || n.value < e) && (e = n.value);
|
|
2072
|
+
return Number.isFinite(t) && Number.isFinite(e);
|
|
2073
|
+
}
|
|
2074
|
+
};
|
|
2075
|
+
_e.create = (e) => new _e({
|
|
2076
|
+
checks: [],
|
|
2077
|
+
typeName: Q.ZodNumber,
|
|
2078
|
+
coerce: e?.coerce || !1,
|
|
2079
|
+
...T(e)
|
|
2080
|
+
});
|
|
2081
|
+
var ve = class e extends E {
|
|
2082
|
+
constructor() {
|
|
2083
|
+
super(...arguments), this.min = this.gte, this.max = this.lte;
|
|
2084
|
+
}
|
|
2085
|
+
_parse(e) {
|
|
2086
|
+
if (this._def.coerce) try {
|
|
2087
|
+
e.data = BigInt(e.data);
|
|
2088
|
+
} catch {
|
|
2089
|
+
return this._getInvalidInput(e);
|
|
2090
|
+
}
|
|
2091
|
+
if (this._getType(e) !== o.bigint) return this._getInvalidInput(e);
|
|
2092
|
+
let t, n = new h();
|
|
2093
|
+
for (let r of this._def.checks) r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (t = this._getOrReturnCtx(e, t), m(t, {
|
|
2094
|
+
code: c.too_small,
|
|
2095
|
+
type: "bigint",
|
|
2096
|
+
minimum: r.value,
|
|
2097
|
+
inclusive: r.inclusive,
|
|
2098
|
+
message: r.message
|
|
2099
|
+
}), n.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (t = this._getOrReturnCtx(e, t), m(t, {
|
|
2100
|
+
code: c.too_big,
|
|
2101
|
+
type: "bigint",
|
|
2102
|
+
maximum: r.value,
|
|
2103
|
+
inclusive: r.inclusive,
|
|
2104
|
+
message: r.message
|
|
2105
|
+
}), n.dirty()) : r.kind === "multipleOf" ? e.data % r.value !== BigInt(0) && (t = this._getOrReturnCtx(e, t), m(t, {
|
|
2106
|
+
code: c.not_multiple_of,
|
|
2107
|
+
multipleOf: r.value,
|
|
2108
|
+
message: r.message
|
|
2109
|
+
}), n.dirty()) : i.assertNever(r);
|
|
2110
|
+
return {
|
|
2111
|
+
status: n.value,
|
|
2112
|
+
value: e.data
|
|
2113
|
+
};
|
|
2114
|
+
}
|
|
2115
|
+
_getInvalidInput(e) {
|
|
2116
|
+
let t = this._getOrReturnCtx(e);
|
|
2117
|
+
return m(t, {
|
|
2118
|
+
code: c.invalid_type,
|
|
2119
|
+
expected: o.bigint,
|
|
2120
|
+
received: t.parsedType
|
|
2121
|
+
}), g;
|
|
2122
|
+
}
|
|
2123
|
+
gte(e, t) {
|
|
2124
|
+
return this.setLimit("min", e, !0, S.toString(t));
|
|
2125
|
+
}
|
|
2126
|
+
gt(e, t) {
|
|
2127
|
+
return this.setLimit("min", e, !1, S.toString(t));
|
|
2128
|
+
}
|
|
2129
|
+
lte(e, t) {
|
|
2130
|
+
return this.setLimit("max", e, !0, S.toString(t));
|
|
2131
|
+
}
|
|
2132
|
+
lt(e, t) {
|
|
2133
|
+
return this.setLimit("max", e, !1, S.toString(t));
|
|
2134
|
+
}
|
|
2135
|
+
setLimit(t, n, r, i) {
|
|
2136
|
+
return new e({
|
|
2137
|
+
...this._def,
|
|
2138
|
+
checks: [...this._def.checks, {
|
|
2139
|
+
kind: t,
|
|
2140
|
+
value: n,
|
|
2141
|
+
inclusive: r,
|
|
2142
|
+
message: S.toString(i)
|
|
2143
|
+
}]
|
|
2144
|
+
});
|
|
2145
|
+
}
|
|
2146
|
+
_addCheck(t) {
|
|
2147
|
+
return new e({
|
|
2148
|
+
...this._def,
|
|
2149
|
+
checks: [...this._def.checks, t]
|
|
2150
|
+
});
|
|
2151
|
+
}
|
|
2152
|
+
positive(e) {
|
|
2153
|
+
return this._addCheck({
|
|
2154
|
+
kind: "min",
|
|
2155
|
+
value: BigInt(0),
|
|
2156
|
+
inclusive: !1,
|
|
2157
|
+
message: S.toString(e)
|
|
2158
|
+
});
|
|
2159
|
+
}
|
|
2160
|
+
negative(e) {
|
|
2161
|
+
return this._addCheck({
|
|
2162
|
+
kind: "max",
|
|
2163
|
+
value: BigInt(0),
|
|
2164
|
+
inclusive: !1,
|
|
2165
|
+
message: S.toString(e)
|
|
2166
|
+
});
|
|
2167
|
+
}
|
|
2168
|
+
nonpositive(e) {
|
|
2169
|
+
return this._addCheck({
|
|
2170
|
+
kind: "max",
|
|
2171
|
+
value: BigInt(0),
|
|
2172
|
+
inclusive: !0,
|
|
2173
|
+
message: S.toString(e)
|
|
2174
|
+
});
|
|
2175
|
+
}
|
|
2176
|
+
nonnegative(e) {
|
|
2177
|
+
return this._addCheck({
|
|
2178
|
+
kind: "min",
|
|
2179
|
+
value: BigInt(0),
|
|
2180
|
+
inclusive: !0,
|
|
2181
|
+
message: S.toString(e)
|
|
2182
|
+
});
|
|
2183
|
+
}
|
|
2184
|
+
multipleOf(e, t) {
|
|
2185
|
+
return this._addCheck({
|
|
2186
|
+
kind: "multipleOf",
|
|
2187
|
+
value: e,
|
|
2188
|
+
message: S.toString(t)
|
|
2189
|
+
});
|
|
2190
|
+
}
|
|
2191
|
+
get minValue() {
|
|
2192
|
+
let e = null;
|
|
2193
|
+
for (let t of this._def.checks) t.kind === "min" && (e === null || t.value > e) && (e = t.value);
|
|
2194
|
+
return e;
|
|
2195
|
+
}
|
|
2196
|
+
get maxValue() {
|
|
2197
|
+
let e = null;
|
|
2198
|
+
for (let t of this._def.checks) t.kind === "max" && (e === null || t.value < e) && (e = t.value);
|
|
2199
|
+
return e;
|
|
2200
|
+
}
|
|
2201
|
+
};
|
|
2202
|
+
ve.create = (e) => new ve({
|
|
2203
|
+
checks: [],
|
|
2204
|
+
typeName: Q.ZodBigInt,
|
|
2205
|
+
coerce: e?.coerce ?? !1,
|
|
2206
|
+
...T(e)
|
|
2207
|
+
});
|
|
2208
|
+
var L = class extends E {
|
|
2209
|
+
_parse(e) {
|
|
2210
|
+
if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== o.boolean) {
|
|
2211
|
+
let t = this._getOrReturnCtx(e);
|
|
2212
|
+
return m(t, {
|
|
2213
|
+
code: c.invalid_type,
|
|
2214
|
+
expected: o.boolean,
|
|
2215
|
+
received: t.parsedType
|
|
2216
|
+
}), g;
|
|
2217
|
+
}
|
|
2218
|
+
return v(e.data);
|
|
2219
|
+
}
|
|
2220
|
+
};
|
|
2221
|
+
L.create = (e) => new L({
|
|
2222
|
+
typeName: Q.ZodBoolean,
|
|
2223
|
+
coerce: e?.coerce || !1,
|
|
2224
|
+
...T(e)
|
|
2225
|
+
});
|
|
2226
|
+
var R = class e extends E {
|
|
2227
|
+
_parse(e) {
|
|
2228
|
+
if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== o.date) {
|
|
2229
|
+
let t = this._getOrReturnCtx(e);
|
|
2230
|
+
return m(t, {
|
|
2231
|
+
code: c.invalid_type,
|
|
2232
|
+
expected: o.date,
|
|
2233
|
+
received: t.parsedType
|
|
2234
|
+
}), g;
|
|
2235
|
+
}
|
|
2236
|
+
if (Number.isNaN(e.data.getTime())) return m(this._getOrReturnCtx(e), { code: c.invalid_date }), g;
|
|
2237
|
+
let t = new h(), n;
|
|
2238
|
+
for (let r of this._def.checks) r.kind === "min" ? e.data.getTime() < r.value && (n = this._getOrReturnCtx(e, n), m(n, {
|
|
2239
|
+
code: c.too_small,
|
|
2240
|
+
message: r.message,
|
|
2241
|
+
inclusive: !0,
|
|
2242
|
+
exact: !1,
|
|
2243
|
+
minimum: r.value,
|
|
2244
|
+
type: "date"
|
|
2245
|
+
}), t.dirty()) : r.kind === "max" ? e.data.getTime() > r.value && (n = this._getOrReturnCtx(e, n), m(n, {
|
|
2246
|
+
code: c.too_big,
|
|
2247
|
+
message: r.message,
|
|
2248
|
+
inclusive: !0,
|
|
2249
|
+
exact: !1,
|
|
2250
|
+
maximum: r.value,
|
|
2251
|
+
type: "date"
|
|
2252
|
+
}), t.dirty()) : i.assertNever(r);
|
|
2253
|
+
return {
|
|
2254
|
+
status: t.value,
|
|
2255
|
+
value: new Date(e.data.getTime())
|
|
2256
|
+
};
|
|
2257
|
+
}
|
|
2258
|
+
_addCheck(t) {
|
|
2259
|
+
return new e({
|
|
2260
|
+
...this._def,
|
|
2261
|
+
checks: [...this._def.checks, t]
|
|
2262
|
+
});
|
|
2263
|
+
}
|
|
2264
|
+
min(e, t) {
|
|
2265
|
+
return this._addCheck({
|
|
2266
|
+
kind: "min",
|
|
2267
|
+
value: e.getTime(),
|
|
2268
|
+
message: S.toString(t)
|
|
2269
|
+
});
|
|
2270
|
+
}
|
|
2271
|
+
max(e, t) {
|
|
2272
|
+
return this._addCheck({
|
|
2273
|
+
kind: "max",
|
|
2274
|
+
value: e.getTime(),
|
|
2275
|
+
message: S.toString(t)
|
|
2276
|
+
});
|
|
2277
|
+
}
|
|
2278
|
+
get minDate() {
|
|
2279
|
+
let e = null;
|
|
2280
|
+
for (let t of this._def.checks) t.kind === "min" && (e === null || t.value > e) && (e = t.value);
|
|
2281
|
+
return e == null ? null : new Date(e);
|
|
2282
|
+
}
|
|
2283
|
+
get maxDate() {
|
|
2284
|
+
let e = null;
|
|
2285
|
+
for (let t of this._def.checks) t.kind === "max" && (e === null || t.value < e) && (e = t.value);
|
|
2286
|
+
return e == null ? null : new Date(e);
|
|
2287
|
+
}
|
|
2288
|
+
};
|
|
2289
|
+
R.create = (e) => new R({
|
|
2290
|
+
checks: [],
|
|
2291
|
+
coerce: e?.coerce || !1,
|
|
2292
|
+
typeName: Q.ZodDate,
|
|
2293
|
+
...T(e)
|
|
2294
|
+
});
|
|
2295
|
+
var ye = class extends E {
|
|
2296
|
+
_parse(e) {
|
|
2297
|
+
if (this._getType(e) !== o.symbol) {
|
|
2298
|
+
let t = this._getOrReturnCtx(e);
|
|
2299
|
+
return m(t, {
|
|
2300
|
+
code: c.invalid_type,
|
|
2301
|
+
expected: o.symbol,
|
|
2302
|
+
received: t.parsedType
|
|
2303
|
+
}), g;
|
|
2304
|
+
}
|
|
2305
|
+
return v(e.data);
|
|
2306
|
+
}
|
|
2307
|
+
};
|
|
2308
|
+
ye.create = (e) => new ye({
|
|
2309
|
+
typeName: Q.ZodSymbol,
|
|
2310
|
+
...T(e)
|
|
2311
|
+
});
|
|
2312
|
+
var z = class extends E {
|
|
2313
|
+
_parse(e) {
|
|
2314
|
+
if (this._getType(e) !== o.undefined) {
|
|
2315
|
+
let t = this._getOrReturnCtx(e);
|
|
2316
|
+
return m(t, {
|
|
2317
|
+
code: c.invalid_type,
|
|
2318
|
+
expected: o.undefined,
|
|
2319
|
+
received: t.parsedType
|
|
2320
|
+
}), g;
|
|
2321
|
+
}
|
|
2322
|
+
return v(e.data);
|
|
2323
|
+
}
|
|
2324
|
+
};
|
|
2325
|
+
z.create = (e) => new z({
|
|
2326
|
+
typeName: Q.ZodUndefined,
|
|
2327
|
+
...T(e)
|
|
2328
|
+
});
|
|
2329
|
+
var B = class extends E {
|
|
2330
|
+
_parse(e) {
|
|
2331
|
+
if (this._getType(e) !== o.null) {
|
|
2332
|
+
let t = this._getOrReturnCtx(e);
|
|
2333
|
+
return m(t, {
|
|
2334
|
+
code: c.invalid_type,
|
|
2335
|
+
expected: o.null,
|
|
2336
|
+
received: t.parsedType
|
|
2337
|
+
}), g;
|
|
2338
|
+
}
|
|
2339
|
+
return v(e.data);
|
|
2340
|
+
}
|
|
2341
|
+
};
|
|
2342
|
+
B.create = (e) => new B({
|
|
2343
|
+
typeName: Q.ZodNull,
|
|
2344
|
+
...T(e)
|
|
2345
|
+
});
|
|
2346
|
+
var be = class extends E {
|
|
2347
|
+
constructor() {
|
|
2348
|
+
super(...arguments), this._any = !0;
|
|
2349
|
+
}
|
|
2350
|
+
_parse(e) {
|
|
2351
|
+
return v(e.data);
|
|
2352
|
+
}
|
|
2353
|
+
};
|
|
2354
|
+
be.create = (e) => new be({
|
|
2355
|
+
typeName: Q.ZodAny,
|
|
2356
|
+
...T(e)
|
|
2357
|
+
});
|
|
2358
|
+
var V = class extends E {
|
|
2359
|
+
constructor() {
|
|
2360
|
+
super(...arguments), this._unknown = !0;
|
|
2361
|
+
}
|
|
2362
|
+
_parse(e) {
|
|
2363
|
+
return v(e.data);
|
|
2364
|
+
}
|
|
2365
|
+
};
|
|
2366
|
+
V.create = (e) => new V({
|
|
2367
|
+
typeName: Q.ZodUnknown,
|
|
2368
|
+
...T(e)
|
|
2369
|
+
});
|
|
2370
|
+
var H = class extends E {
|
|
2371
|
+
_parse(e) {
|
|
2372
|
+
let t = this._getOrReturnCtx(e);
|
|
2373
|
+
return m(t, {
|
|
2374
|
+
code: c.invalid_type,
|
|
2375
|
+
expected: o.never,
|
|
2376
|
+
received: t.parsedType
|
|
2377
|
+
}), g;
|
|
2378
|
+
}
|
|
2379
|
+
};
|
|
2380
|
+
H.create = (e) => new H({
|
|
2381
|
+
typeName: Q.ZodNever,
|
|
2382
|
+
...T(e)
|
|
2383
|
+
});
|
|
2384
|
+
var xe = class extends E {
|
|
2385
|
+
_parse(e) {
|
|
2386
|
+
if (this._getType(e) !== o.undefined) {
|
|
2387
|
+
let t = this._getOrReturnCtx(e);
|
|
2388
|
+
return m(t, {
|
|
2389
|
+
code: c.invalid_type,
|
|
2390
|
+
expected: o.void,
|
|
2391
|
+
received: t.parsedType
|
|
2392
|
+
}), g;
|
|
2393
|
+
}
|
|
2394
|
+
return v(e.data);
|
|
2395
|
+
}
|
|
2396
|
+
};
|
|
2397
|
+
xe.create = (e) => new xe({
|
|
2398
|
+
typeName: Q.ZodVoid,
|
|
2399
|
+
...T(e)
|
|
2400
|
+
});
|
|
2401
|
+
var U = class e extends E {
|
|
2402
|
+
_parse(e) {
|
|
2403
|
+
let { ctx: t, status: n } = this._processInputParams(e), r = this._def;
|
|
2404
|
+
if (t.parsedType !== o.array) return m(t, {
|
|
2405
|
+
code: c.invalid_type,
|
|
2406
|
+
expected: o.array,
|
|
2407
|
+
received: t.parsedType
|
|
2408
|
+
}), g;
|
|
2409
|
+
if (r.exactLength !== null) {
|
|
2410
|
+
let e = t.data.length > r.exactLength.value, i = t.data.length < r.exactLength.value;
|
|
2411
|
+
(e || i) && (m(t, {
|
|
2412
|
+
code: e ? c.too_big : c.too_small,
|
|
2413
|
+
minimum: i ? r.exactLength.value : void 0,
|
|
2414
|
+
maximum: e ? r.exactLength.value : void 0,
|
|
2415
|
+
type: "array",
|
|
2416
|
+
inclusive: !0,
|
|
2417
|
+
exact: !0,
|
|
2418
|
+
message: r.exactLength.message
|
|
2419
|
+
}), n.dirty());
|
|
2420
|
+
}
|
|
2421
|
+
if (r.minLength !== null && t.data.length < r.minLength.value && (m(t, {
|
|
2422
|
+
code: c.too_small,
|
|
2423
|
+
minimum: r.minLength.value,
|
|
2424
|
+
type: "array",
|
|
2425
|
+
inclusive: !0,
|
|
2426
|
+
exact: !1,
|
|
2427
|
+
message: r.minLength.message
|
|
2428
|
+
}), n.dirty()), r.maxLength !== null && t.data.length > r.maxLength.value && (m(t, {
|
|
2429
|
+
code: c.too_big,
|
|
2430
|
+
maximum: r.maxLength.value,
|
|
2431
|
+
type: "array",
|
|
2432
|
+
inclusive: !0,
|
|
2433
|
+
exact: !1,
|
|
2434
|
+
message: r.maxLength.message
|
|
2435
|
+
}), n.dirty()), t.common.async) return Promise.all([...t.data].map((e, n) => r.type._parseAsync(new C(t, e, t.path, n)))).then((e) => h.mergeArray(n, e));
|
|
2436
|
+
let i = [...t.data].map((e, n) => r.type._parseSync(new C(t, e, t.path, n)));
|
|
2437
|
+
return h.mergeArray(n, i);
|
|
2438
|
+
}
|
|
2439
|
+
get element() {
|
|
2440
|
+
return this._def.type;
|
|
2441
|
+
}
|
|
2442
|
+
min(t, n) {
|
|
2443
|
+
return new e({
|
|
2444
|
+
...this._def,
|
|
2445
|
+
minLength: {
|
|
2446
|
+
value: t,
|
|
2447
|
+
message: S.toString(n)
|
|
2448
|
+
}
|
|
2449
|
+
});
|
|
2450
|
+
}
|
|
2451
|
+
max(t, n) {
|
|
2452
|
+
return new e({
|
|
2453
|
+
...this._def,
|
|
2454
|
+
maxLength: {
|
|
2455
|
+
value: t,
|
|
2456
|
+
message: S.toString(n)
|
|
2457
|
+
}
|
|
2458
|
+
});
|
|
2459
|
+
}
|
|
2460
|
+
length(t, n) {
|
|
2461
|
+
return new e({
|
|
2462
|
+
...this._def,
|
|
2463
|
+
exactLength: {
|
|
2464
|
+
value: t,
|
|
2465
|
+
message: S.toString(n)
|
|
2466
|
+
}
|
|
2467
|
+
});
|
|
2468
|
+
}
|
|
2469
|
+
nonempty(e) {
|
|
2470
|
+
return this.min(1, e);
|
|
2471
|
+
}
|
|
2472
|
+
};
|
|
2473
|
+
U.create = (e, t) => new U({
|
|
2474
|
+
type: e,
|
|
2475
|
+
minLength: null,
|
|
2476
|
+
maxLength: null,
|
|
2477
|
+
exactLength: null,
|
|
2478
|
+
typeName: Q.ZodArray,
|
|
2479
|
+
...T(t)
|
|
2480
|
+
});
|
|
2481
|
+
function W(e) {
|
|
2482
|
+
if (e instanceof G) {
|
|
2483
|
+
let t = {};
|
|
2484
|
+
for (let n in e.shape) {
|
|
2485
|
+
let r = e.shape[n];
|
|
2486
|
+
t[n] = X.create(W(r));
|
|
2487
|
+
}
|
|
2488
|
+
return new G({
|
|
2489
|
+
...e._def,
|
|
2490
|
+
shape: () => t
|
|
2491
|
+
});
|
|
2492
|
+
} else if (e instanceof U) return new U({
|
|
2493
|
+
...e._def,
|
|
2494
|
+
type: W(e.element)
|
|
2495
|
+
});
|
|
2496
|
+
else if (e instanceof X) return X.create(W(e.unwrap()));
|
|
2497
|
+
else if (e instanceof Z) return Z.create(W(e.unwrap()));
|
|
2498
|
+
else if (e instanceof J) return J.create(e.items.map((e) => W(e)));
|
|
2499
|
+
else return e;
|
|
2500
|
+
}
|
|
2501
|
+
var G = class e extends E {
|
|
2502
|
+
constructor() {
|
|
2503
|
+
super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend;
|
|
2504
|
+
}
|
|
2505
|
+
_getCached() {
|
|
2506
|
+
if (this._cached !== null) return this._cached;
|
|
2507
|
+
let e = this._def.shape();
|
|
2508
|
+
return this._cached = {
|
|
2509
|
+
shape: e,
|
|
2510
|
+
keys: i.objectKeys(e)
|
|
2511
|
+
}, this._cached;
|
|
2512
|
+
}
|
|
2513
|
+
_parse(e) {
|
|
2514
|
+
if (this._getType(e) !== o.object) {
|
|
2515
|
+
let t = this._getOrReturnCtx(e);
|
|
2516
|
+
return m(t, {
|
|
2517
|
+
code: c.invalid_type,
|
|
2518
|
+
expected: o.object,
|
|
2519
|
+
received: t.parsedType
|
|
2520
|
+
}), g;
|
|
2521
|
+
}
|
|
2522
|
+
let { status: t, ctx: n } = this._processInputParams(e), { shape: r, keys: i } = this._getCached(), a = [];
|
|
2523
|
+
if (!(this._def.catchall instanceof H && this._def.unknownKeys === "strip")) for (let e in n.data) i.includes(e) || a.push(e);
|
|
2524
|
+
let s = [];
|
|
2525
|
+
for (let e of i) {
|
|
2526
|
+
let t = r[e], i = n.data[e];
|
|
2527
|
+
s.push({
|
|
2528
|
+
key: {
|
|
2529
|
+
status: "valid",
|
|
2530
|
+
value: e
|
|
2531
|
+
},
|
|
2532
|
+
value: t._parse(new C(n, i, n.path, e)),
|
|
2533
|
+
alwaysSet: e in n.data
|
|
2534
|
+
});
|
|
2535
|
+
}
|
|
2536
|
+
if (this._def.catchall instanceof H) {
|
|
2537
|
+
let e = this._def.unknownKeys;
|
|
2538
|
+
if (e === "passthrough") for (let e of a) s.push({
|
|
2539
|
+
key: {
|
|
2540
|
+
status: "valid",
|
|
2541
|
+
value: e
|
|
2542
|
+
},
|
|
2543
|
+
value: {
|
|
2544
|
+
status: "valid",
|
|
2545
|
+
value: n.data[e]
|
|
2546
|
+
}
|
|
2547
|
+
});
|
|
2548
|
+
else if (e === "strict") a.length > 0 && (m(n, {
|
|
2549
|
+
code: c.unrecognized_keys,
|
|
2550
|
+
keys: a
|
|
2551
|
+
}), t.dirty());
|
|
2552
|
+
else if (e !== "strip") throw Error("Internal ZodObject error: invalid unknownKeys value.");
|
|
2553
|
+
} else {
|
|
2554
|
+
let e = this._def.catchall;
|
|
2555
|
+
for (let t of a) {
|
|
2556
|
+
let r = n.data[t];
|
|
2557
|
+
s.push({
|
|
2558
|
+
key: {
|
|
2559
|
+
status: "valid",
|
|
2560
|
+
value: t
|
|
2561
|
+
},
|
|
2562
|
+
value: e._parse(new C(n, r, n.path, t)),
|
|
2563
|
+
alwaysSet: t in n.data
|
|
2564
|
+
});
|
|
2565
|
+
}
|
|
2566
|
+
}
|
|
2567
|
+
return n.common.async ? Promise.resolve().then(async () => {
|
|
2568
|
+
let e = [];
|
|
2569
|
+
for (let t of s) {
|
|
2570
|
+
let n = await t.key, r = await t.value;
|
|
2571
|
+
e.push({
|
|
2572
|
+
key: n,
|
|
2573
|
+
value: r,
|
|
2574
|
+
alwaysSet: t.alwaysSet
|
|
2575
|
+
});
|
|
2576
|
+
}
|
|
2577
|
+
return e;
|
|
2578
|
+
}).then((e) => h.mergeObjectSync(t, e)) : h.mergeObjectSync(t, s);
|
|
2579
|
+
}
|
|
2580
|
+
get shape() {
|
|
2581
|
+
return this._def.shape();
|
|
2582
|
+
}
|
|
2583
|
+
strict(t) {
|
|
2584
|
+
return S.errToObj, new e({
|
|
2585
|
+
...this._def,
|
|
2586
|
+
unknownKeys: "strict",
|
|
2587
|
+
...t === void 0 ? {} : { errorMap: (e, n) => {
|
|
2588
|
+
let r = this._def.errorMap?.(e, n).message ?? n.defaultError;
|
|
2589
|
+
return e.code === "unrecognized_keys" ? { message: S.errToObj(t).message ?? r } : { message: r };
|
|
2590
|
+
} }
|
|
2591
|
+
});
|
|
2592
|
+
}
|
|
2593
|
+
strip() {
|
|
2594
|
+
return new e({
|
|
2595
|
+
...this._def,
|
|
2596
|
+
unknownKeys: "strip"
|
|
2597
|
+
});
|
|
2598
|
+
}
|
|
2599
|
+
passthrough() {
|
|
2600
|
+
return new e({
|
|
2601
|
+
...this._def,
|
|
2602
|
+
unknownKeys: "passthrough"
|
|
2603
|
+
});
|
|
2604
|
+
}
|
|
2605
|
+
extend(t) {
|
|
2606
|
+
return new e({
|
|
2607
|
+
...this._def,
|
|
2608
|
+
shape: () => ({
|
|
2609
|
+
...this._def.shape(),
|
|
2610
|
+
...t
|
|
2611
|
+
})
|
|
2612
|
+
});
|
|
2613
|
+
}
|
|
2614
|
+
merge(t) {
|
|
2615
|
+
return new e({
|
|
2616
|
+
unknownKeys: t._def.unknownKeys,
|
|
2617
|
+
catchall: t._def.catchall,
|
|
2618
|
+
shape: () => ({
|
|
2619
|
+
...this._def.shape(),
|
|
2620
|
+
...t._def.shape()
|
|
2621
|
+
}),
|
|
2622
|
+
typeName: Q.ZodObject
|
|
2623
|
+
});
|
|
2624
|
+
}
|
|
2625
|
+
setKey(e, t) {
|
|
2626
|
+
return this.augment({ [e]: t });
|
|
2627
|
+
}
|
|
2628
|
+
catchall(t) {
|
|
2629
|
+
return new e({
|
|
2630
|
+
...this._def,
|
|
2631
|
+
catchall: t
|
|
2632
|
+
});
|
|
2633
|
+
}
|
|
2634
|
+
pick(t) {
|
|
2635
|
+
let n = {};
|
|
2636
|
+
for (let e of i.objectKeys(t)) t[e] && this.shape[e] && (n[e] = this.shape[e]);
|
|
2637
|
+
return new e({
|
|
2638
|
+
...this._def,
|
|
2639
|
+
shape: () => n
|
|
2640
|
+
});
|
|
2641
|
+
}
|
|
2642
|
+
omit(t) {
|
|
2643
|
+
let n = {};
|
|
2644
|
+
for (let e of i.objectKeys(this.shape)) t[e] || (n[e] = this.shape[e]);
|
|
2645
|
+
return new e({
|
|
2646
|
+
...this._def,
|
|
2647
|
+
shape: () => n
|
|
2648
|
+
});
|
|
2649
|
+
}
|
|
2650
|
+
deepPartial() {
|
|
2651
|
+
return W(this);
|
|
2652
|
+
}
|
|
2653
|
+
partial(t) {
|
|
2654
|
+
let n = {};
|
|
2655
|
+
for (let e of i.objectKeys(this.shape)) {
|
|
2656
|
+
let r = this.shape[e];
|
|
2657
|
+
t && !t[e] ? n[e] = r : n[e] = r.optional();
|
|
2658
|
+
}
|
|
2659
|
+
return new e({
|
|
2660
|
+
...this._def,
|
|
2661
|
+
shape: () => n
|
|
2662
|
+
});
|
|
2663
|
+
}
|
|
2664
|
+
required(t) {
|
|
2665
|
+
let n = {};
|
|
2666
|
+
for (let e of i.objectKeys(this.shape)) if (t && !t[e]) n[e] = this.shape[e];
|
|
2667
|
+
else {
|
|
2668
|
+
let t = this.shape[e];
|
|
2669
|
+
for (; t instanceof X;) t = t._def.innerType;
|
|
2670
|
+
n[e] = t;
|
|
2671
|
+
}
|
|
2672
|
+
return new e({
|
|
2673
|
+
...this._def,
|
|
2674
|
+
shape: () => n
|
|
2675
|
+
});
|
|
2676
|
+
}
|
|
2677
|
+
keyof() {
|
|
2678
|
+
return je(i.objectKeys(this.shape));
|
|
2679
|
+
}
|
|
2680
|
+
};
|
|
2681
|
+
G.create = (e, t) => new G({
|
|
2682
|
+
shape: () => e,
|
|
2683
|
+
unknownKeys: "strip",
|
|
2684
|
+
catchall: H.create(),
|
|
2685
|
+
typeName: Q.ZodObject,
|
|
2686
|
+
...T(t)
|
|
2687
|
+
}), G.strictCreate = (e, t) => new G({
|
|
2688
|
+
shape: () => e,
|
|
2689
|
+
unknownKeys: "strict",
|
|
2690
|
+
catchall: H.create(),
|
|
2691
|
+
typeName: Q.ZodObject,
|
|
2692
|
+
...T(t)
|
|
2693
|
+
}), G.lazycreate = (e, t) => new G({
|
|
2694
|
+
shape: e,
|
|
2695
|
+
unknownKeys: "strip",
|
|
2696
|
+
catchall: H.create(),
|
|
2697
|
+
typeName: Q.ZodObject,
|
|
2698
|
+
...T(t)
|
|
2699
|
+
});
|
|
2700
|
+
var K = class extends E {
|
|
2701
|
+
_parse(e) {
|
|
2702
|
+
let { ctx: t } = this._processInputParams(e), n = this._def.options;
|
|
2703
|
+
function r(e) {
|
|
2704
|
+
for (let t of e) if (t.result.status === "valid") return t.result;
|
|
2705
|
+
for (let n of e) if (n.result.status === "dirty") return t.common.issues.push(...n.ctx.common.issues), n.result;
|
|
2706
|
+
let n = e.map((e) => new l(e.ctx.common.issues));
|
|
2707
|
+
return m(t, {
|
|
2708
|
+
code: c.invalid_union,
|
|
2709
|
+
unionErrors: n
|
|
2710
|
+
}), g;
|
|
2711
|
+
}
|
|
2712
|
+
if (t.common.async) return Promise.all(n.map(async (e) => {
|
|
2713
|
+
let n = {
|
|
2714
|
+
...t,
|
|
2715
|
+
common: {
|
|
2716
|
+
...t.common,
|
|
2717
|
+
issues: []
|
|
2718
|
+
},
|
|
2719
|
+
parent: null
|
|
2720
|
+
};
|
|
2721
|
+
return {
|
|
2722
|
+
result: await e._parseAsync({
|
|
2723
|
+
data: t.data,
|
|
2724
|
+
path: t.path,
|
|
2725
|
+
parent: n
|
|
2726
|
+
}),
|
|
2727
|
+
ctx: n
|
|
2728
|
+
};
|
|
2729
|
+
})).then(r);
|
|
2730
|
+
{
|
|
2731
|
+
let e, r = [];
|
|
2732
|
+
for (let i of n) {
|
|
2733
|
+
let n = {
|
|
2734
|
+
...t,
|
|
2735
|
+
common: {
|
|
2736
|
+
...t.common,
|
|
2737
|
+
issues: []
|
|
2738
|
+
},
|
|
2739
|
+
parent: null
|
|
2740
|
+
}, a = i._parseSync({
|
|
2741
|
+
data: t.data,
|
|
2742
|
+
path: t.path,
|
|
2743
|
+
parent: n
|
|
2744
|
+
});
|
|
2745
|
+
if (a.status === "valid") return a;
|
|
2746
|
+
a.status === "dirty" && !e && (e = {
|
|
2747
|
+
result: a,
|
|
2748
|
+
ctx: n
|
|
2749
|
+
}), n.common.issues.length && r.push(n.common.issues);
|
|
2750
|
+
}
|
|
2751
|
+
if (e) return t.common.issues.push(...e.ctx.common.issues), e.result;
|
|
2752
|
+
let i = r.map((e) => new l(e));
|
|
2753
|
+
return m(t, {
|
|
2754
|
+
code: c.invalid_union,
|
|
2755
|
+
unionErrors: i
|
|
2756
|
+
}), g;
|
|
2757
|
+
}
|
|
2758
|
+
}
|
|
2759
|
+
get options() {
|
|
2760
|
+
return this._def.options;
|
|
2761
|
+
}
|
|
2762
|
+
};
|
|
2763
|
+
K.create = (e, t) => new K({
|
|
2764
|
+
options: e,
|
|
2765
|
+
typeName: Q.ZodUnion,
|
|
2766
|
+
...T(t)
|
|
2767
|
+
});
|
|
2768
|
+
var q = (e) => e instanceof ke ? q(e.schema) : e instanceof Y ? q(e.innerType()) : e instanceof Ae ? [e.value] : e instanceof Me ? e.options : e instanceof Ne ? i.objectValues(e.enum) : e instanceof Fe ? q(e._def.innerType) : e instanceof z ? [void 0] : e instanceof B ? [null] : e instanceof X ? [void 0, ...q(e.unwrap())] : e instanceof Z ? [null, ...q(e.unwrap())] : e instanceof Re || e instanceof Be ? q(e.unwrap()) : e instanceof Ie ? q(e._def.innerType) : [], Se = class e extends E {
|
|
2769
|
+
_parse(e) {
|
|
2770
|
+
let { ctx: t } = this._processInputParams(e);
|
|
2771
|
+
if (t.parsedType !== o.object) return m(t, {
|
|
2772
|
+
code: c.invalid_type,
|
|
2773
|
+
expected: o.object,
|
|
2774
|
+
received: t.parsedType
|
|
2775
|
+
}), g;
|
|
2776
|
+
let n = this.discriminator, r = t.data[n], i = this.optionsMap.get(r);
|
|
2777
|
+
return i ? t.common.async ? i._parseAsync({
|
|
2778
|
+
data: t.data,
|
|
2779
|
+
path: t.path,
|
|
2780
|
+
parent: t
|
|
2781
|
+
}) : i._parseSync({
|
|
2782
|
+
data: t.data,
|
|
2783
|
+
path: t.path,
|
|
2784
|
+
parent: t
|
|
2785
|
+
}) : (m(t, {
|
|
2786
|
+
code: c.invalid_union_discriminator,
|
|
2787
|
+
options: Array.from(this.optionsMap.keys()),
|
|
2788
|
+
path: [n]
|
|
2789
|
+
}), g);
|
|
2790
|
+
}
|
|
2791
|
+
get discriminator() {
|
|
2792
|
+
return this._def.discriminator;
|
|
2793
|
+
}
|
|
2794
|
+
get options() {
|
|
2795
|
+
return this._def.options;
|
|
2796
|
+
}
|
|
2797
|
+
get optionsMap() {
|
|
2798
|
+
return this._def.optionsMap;
|
|
2799
|
+
}
|
|
2800
|
+
static create(t, n, r) {
|
|
2801
|
+
let i = /* @__PURE__ */ new Map();
|
|
2802
|
+
for (let e of n) {
|
|
2803
|
+
let n = q(e.shape[t]);
|
|
2804
|
+
if (!n.length) throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);
|
|
2805
|
+
for (let r of n) {
|
|
2806
|
+
if (i.has(r)) throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);
|
|
2807
|
+
i.set(r, e);
|
|
2808
|
+
}
|
|
2809
|
+
}
|
|
2810
|
+
return new e({
|
|
2811
|
+
typeName: Q.ZodDiscriminatedUnion,
|
|
2812
|
+
discriminator: t,
|
|
2813
|
+
options: n,
|
|
2814
|
+
optionsMap: i,
|
|
2815
|
+
...T(r)
|
|
2816
|
+
});
|
|
2817
|
+
}
|
|
2818
|
+
};
|
|
2819
|
+
function Ce(e, t) {
|
|
2820
|
+
let n = s(e), r = s(t);
|
|
2821
|
+
if (e === t) return {
|
|
2822
|
+
valid: !0,
|
|
2823
|
+
data: e
|
|
2824
|
+
};
|
|
2825
|
+
if (n === o.object && r === o.object) {
|
|
2826
|
+
let n = i.objectKeys(t), r = i.objectKeys(e).filter((e) => n.indexOf(e) !== -1), a = {
|
|
2827
|
+
...e,
|
|
2828
|
+
...t
|
|
2829
|
+
};
|
|
2830
|
+
for (let n of r) {
|
|
2831
|
+
let r = Ce(e[n], t[n]);
|
|
2832
|
+
if (!r.valid) return { valid: !1 };
|
|
2833
|
+
a[n] = r.data;
|
|
2834
|
+
}
|
|
2835
|
+
return {
|
|
2836
|
+
valid: !0,
|
|
2837
|
+
data: a
|
|
2838
|
+
};
|
|
2839
|
+
} else if (n === o.array && r === o.array) {
|
|
2840
|
+
if (e.length !== t.length) return { valid: !1 };
|
|
2841
|
+
let n = [];
|
|
2842
|
+
for (let r = 0; r < e.length; r++) {
|
|
2843
|
+
let i = e[r], a = t[r], o = Ce(i, a);
|
|
2844
|
+
if (!o.valid) return { valid: !1 };
|
|
2845
|
+
n.push(o.data);
|
|
2846
|
+
}
|
|
2847
|
+
return {
|
|
2848
|
+
valid: !0,
|
|
2849
|
+
data: n
|
|
2850
|
+
};
|
|
2851
|
+
} else if (n === o.date && r === o.date && +e == +t) return {
|
|
2852
|
+
valid: !0,
|
|
2853
|
+
data: e
|
|
2854
|
+
};
|
|
2855
|
+
else return { valid: !1 };
|
|
2856
|
+
}
|
|
2857
|
+
var we = class extends E {
|
|
2858
|
+
_parse(e) {
|
|
2859
|
+
let { status: t, ctx: n } = this._processInputParams(e), r = (e, r) => {
|
|
2860
|
+
if (ee(e) || ee(r)) return g;
|
|
2861
|
+
let i = Ce(e.value, r.value);
|
|
2862
|
+
return i.valid ? ((y(e) || y(r)) && t.dirty(), {
|
|
2863
|
+
status: t.value,
|
|
2864
|
+
value: i.data
|
|
2865
|
+
}) : (m(n, { code: c.invalid_intersection_types }), g);
|
|
2866
|
+
};
|
|
2867
|
+
return n.common.async ? Promise.all([this._def.left._parseAsync({
|
|
2868
|
+
data: n.data,
|
|
2869
|
+
path: n.path,
|
|
2870
|
+
parent: n
|
|
2871
|
+
}), this._def.right._parseAsync({
|
|
2872
|
+
data: n.data,
|
|
2873
|
+
path: n.path,
|
|
2874
|
+
parent: n
|
|
2875
|
+
})]).then(([e, t]) => r(e, t)) : r(this._def.left._parseSync({
|
|
2876
|
+
data: n.data,
|
|
2877
|
+
path: n.path,
|
|
2878
|
+
parent: n
|
|
2879
|
+
}), this._def.right._parseSync({
|
|
2880
|
+
data: n.data,
|
|
2881
|
+
path: n.path,
|
|
2882
|
+
parent: n
|
|
2883
|
+
}));
|
|
2884
|
+
}
|
|
2885
|
+
};
|
|
2886
|
+
we.create = (e, t, n) => new we({
|
|
2887
|
+
left: e,
|
|
2888
|
+
right: t,
|
|
2889
|
+
typeName: Q.ZodIntersection,
|
|
2890
|
+
...T(n)
|
|
2891
|
+
});
|
|
2892
|
+
var J = class e extends E {
|
|
2893
|
+
_parse(e) {
|
|
2894
|
+
let { status: t, ctx: n } = this._processInputParams(e);
|
|
2895
|
+
if (n.parsedType !== o.array) return m(n, {
|
|
2896
|
+
code: c.invalid_type,
|
|
2897
|
+
expected: o.array,
|
|
2898
|
+
received: n.parsedType
|
|
2899
|
+
}), g;
|
|
2900
|
+
if (n.data.length < this._def.items.length) return m(n, {
|
|
2901
|
+
code: c.too_small,
|
|
2902
|
+
minimum: this._def.items.length,
|
|
2903
|
+
inclusive: !0,
|
|
2904
|
+
exact: !1,
|
|
2905
|
+
type: "array"
|
|
2906
|
+
}), g;
|
|
2907
|
+
!this._def.rest && n.data.length > this._def.items.length && (m(n, {
|
|
2908
|
+
code: c.too_big,
|
|
2909
|
+
maximum: this._def.items.length,
|
|
2910
|
+
inclusive: !0,
|
|
2911
|
+
exact: !1,
|
|
2912
|
+
type: "array"
|
|
2913
|
+
}), t.dirty());
|
|
2914
|
+
let r = [...n.data].map((e, t) => {
|
|
2915
|
+
let r = this._def.items[t] || this._def.rest;
|
|
2916
|
+
return r ? r._parse(new C(n, e, n.path, t)) : null;
|
|
2917
|
+
}).filter((e) => !!e);
|
|
2918
|
+
return n.common.async ? Promise.all(r).then((e) => h.mergeArray(t, e)) : h.mergeArray(t, r);
|
|
2919
|
+
}
|
|
2920
|
+
get items() {
|
|
2921
|
+
return this._def.items;
|
|
2922
|
+
}
|
|
2923
|
+
rest(t) {
|
|
2924
|
+
return new e({
|
|
2925
|
+
...this._def,
|
|
2926
|
+
rest: t
|
|
2927
|
+
});
|
|
2928
|
+
}
|
|
2929
|
+
};
|
|
2930
|
+
J.create = (e, t) => {
|
|
2931
|
+
if (!Array.isArray(e)) throw Error("You must pass an array of schemas to z.tuple([ ... ])");
|
|
2932
|
+
return new J({
|
|
2933
|
+
items: e,
|
|
2934
|
+
typeName: Q.ZodTuple,
|
|
2935
|
+
rest: null,
|
|
2936
|
+
...T(t)
|
|
2937
|
+
});
|
|
2938
|
+
};
|
|
2939
|
+
var Te = class e extends E {
|
|
2940
|
+
get keySchema() {
|
|
2941
|
+
return this._def.keyType;
|
|
2942
|
+
}
|
|
2943
|
+
get valueSchema() {
|
|
2944
|
+
return this._def.valueType;
|
|
2945
|
+
}
|
|
2946
|
+
_parse(e) {
|
|
2947
|
+
let { status: t, ctx: n } = this._processInputParams(e);
|
|
2948
|
+
if (n.parsedType !== o.object) return m(n, {
|
|
2949
|
+
code: c.invalid_type,
|
|
2950
|
+
expected: o.object,
|
|
2951
|
+
received: n.parsedType
|
|
2952
|
+
}), g;
|
|
2953
|
+
let r = [], i = this._def.keyType, a = this._def.valueType;
|
|
2954
|
+
for (let e in n.data) r.push({
|
|
2955
|
+
key: i._parse(new C(n, e, n.path, e)),
|
|
2956
|
+
value: a._parse(new C(n, n.data[e], n.path, e)),
|
|
2957
|
+
alwaysSet: e in n.data
|
|
2958
|
+
});
|
|
2959
|
+
return n.common.async ? h.mergeObjectAsync(t, r) : h.mergeObjectSync(t, r);
|
|
2960
|
+
}
|
|
2961
|
+
get element() {
|
|
2962
|
+
return this._def.valueType;
|
|
2963
|
+
}
|
|
2964
|
+
static create(t, n, r) {
|
|
2965
|
+
return n instanceof E ? new e({
|
|
2966
|
+
keyType: t,
|
|
2967
|
+
valueType: n,
|
|
2968
|
+
typeName: Q.ZodRecord,
|
|
2969
|
+
...T(r)
|
|
2970
|
+
}) : new e({
|
|
2971
|
+
keyType: F.create(),
|
|
2972
|
+
valueType: t,
|
|
2973
|
+
typeName: Q.ZodRecord,
|
|
2974
|
+
...T(n)
|
|
2975
|
+
});
|
|
2976
|
+
}
|
|
2977
|
+
}, Ee = class extends E {
|
|
2978
|
+
get keySchema() {
|
|
2979
|
+
return this._def.keyType;
|
|
2980
|
+
}
|
|
2981
|
+
get valueSchema() {
|
|
2982
|
+
return this._def.valueType;
|
|
2983
|
+
}
|
|
2984
|
+
_parse(e) {
|
|
2985
|
+
let { status: t, ctx: n } = this._processInputParams(e);
|
|
2986
|
+
if (n.parsedType !== o.map) return m(n, {
|
|
2987
|
+
code: c.invalid_type,
|
|
2988
|
+
expected: o.map,
|
|
2989
|
+
received: n.parsedType
|
|
2990
|
+
}), g;
|
|
2991
|
+
let r = this._def.keyType, i = this._def.valueType, a = [...n.data.entries()].map(([e, t], a) => ({
|
|
2992
|
+
key: r._parse(new C(n, e, n.path, [a, "key"])),
|
|
2993
|
+
value: i._parse(new C(n, t, n.path, [a, "value"]))
|
|
2994
|
+
}));
|
|
2995
|
+
if (n.common.async) {
|
|
2996
|
+
let e = /* @__PURE__ */ new Map();
|
|
2997
|
+
return Promise.resolve().then(async () => {
|
|
2998
|
+
for (let n of a) {
|
|
2999
|
+
let r = await n.key, i = await n.value;
|
|
3000
|
+
if (r.status === "aborted" || i.status === "aborted") return g;
|
|
3001
|
+
(r.status === "dirty" || i.status === "dirty") && t.dirty(), e.set(r.value, i.value);
|
|
3002
|
+
}
|
|
3003
|
+
return {
|
|
3004
|
+
status: t.value,
|
|
3005
|
+
value: e
|
|
3006
|
+
};
|
|
3007
|
+
});
|
|
3008
|
+
} else {
|
|
3009
|
+
let e = /* @__PURE__ */ new Map();
|
|
3010
|
+
for (let n of a) {
|
|
3011
|
+
let r = n.key, i = n.value;
|
|
3012
|
+
if (r.status === "aborted" || i.status === "aborted") return g;
|
|
3013
|
+
(r.status === "dirty" || i.status === "dirty") && t.dirty(), e.set(r.value, i.value);
|
|
3014
|
+
}
|
|
3015
|
+
return {
|
|
3016
|
+
status: t.value,
|
|
3017
|
+
value: e
|
|
3018
|
+
};
|
|
3019
|
+
}
|
|
3020
|
+
}
|
|
3021
|
+
};
|
|
3022
|
+
Ee.create = (e, t, n) => new Ee({
|
|
3023
|
+
valueType: t,
|
|
3024
|
+
keyType: e,
|
|
3025
|
+
typeName: Q.ZodMap,
|
|
3026
|
+
...T(n)
|
|
3027
|
+
});
|
|
3028
|
+
var De = class e extends E {
|
|
3029
|
+
_parse(e) {
|
|
3030
|
+
let { status: t, ctx: n } = this._processInputParams(e);
|
|
3031
|
+
if (n.parsedType !== o.set) return m(n, {
|
|
3032
|
+
code: c.invalid_type,
|
|
3033
|
+
expected: o.set,
|
|
3034
|
+
received: n.parsedType
|
|
3035
|
+
}), g;
|
|
3036
|
+
let r = this._def;
|
|
3037
|
+
r.minSize !== null && n.data.size < r.minSize.value && (m(n, {
|
|
3038
|
+
code: c.too_small,
|
|
3039
|
+
minimum: r.minSize.value,
|
|
3040
|
+
type: "set",
|
|
3041
|
+
inclusive: !0,
|
|
3042
|
+
exact: !1,
|
|
3043
|
+
message: r.minSize.message
|
|
3044
|
+
}), t.dirty()), r.maxSize !== null && n.data.size > r.maxSize.value && (m(n, {
|
|
3045
|
+
code: c.too_big,
|
|
3046
|
+
maximum: r.maxSize.value,
|
|
3047
|
+
type: "set",
|
|
3048
|
+
inclusive: !0,
|
|
3049
|
+
exact: !1,
|
|
3050
|
+
message: r.maxSize.message
|
|
3051
|
+
}), t.dirty());
|
|
3052
|
+
let i = this._def.valueType;
|
|
3053
|
+
function a(e) {
|
|
3054
|
+
let n = /* @__PURE__ */ new Set();
|
|
3055
|
+
for (let r of e) {
|
|
3056
|
+
if (r.status === "aborted") return g;
|
|
3057
|
+
r.status === "dirty" && t.dirty(), n.add(r.value);
|
|
3058
|
+
}
|
|
3059
|
+
return {
|
|
3060
|
+
status: t.value,
|
|
3061
|
+
value: n
|
|
3062
|
+
};
|
|
3063
|
+
}
|
|
3064
|
+
let s = [...n.data.values()].map((e, t) => i._parse(new C(n, e, n.path, t)));
|
|
3065
|
+
return n.common.async ? Promise.all(s).then((e) => a(e)) : a(s);
|
|
3066
|
+
}
|
|
3067
|
+
min(t, n) {
|
|
3068
|
+
return new e({
|
|
3069
|
+
...this._def,
|
|
3070
|
+
minSize: {
|
|
3071
|
+
value: t,
|
|
3072
|
+
message: S.toString(n)
|
|
3073
|
+
}
|
|
3074
|
+
});
|
|
3075
|
+
}
|
|
3076
|
+
max(t, n) {
|
|
3077
|
+
return new e({
|
|
3078
|
+
...this._def,
|
|
3079
|
+
maxSize: {
|
|
3080
|
+
value: t,
|
|
3081
|
+
message: S.toString(n)
|
|
3082
|
+
}
|
|
3083
|
+
});
|
|
3084
|
+
}
|
|
3085
|
+
size(e, t) {
|
|
3086
|
+
return this.min(e, t).max(e, t);
|
|
3087
|
+
}
|
|
3088
|
+
nonempty(e) {
|
|
3089
|
+
return this.min(1, e);
|
|
3090
|
+
}
|
|
3091
|
+
};
|
|
3092
|
+
De.create = (e, t) => new De({
|
|
3093
|
+
valueType: e,
|
|
3094
|
+
minSize: null,
|
|
3095
|
+
maxSize: null,
|
|
3096
|
+
typeName: Q.ZodSet,
|
|
3097
|
+
...T(t)
|
|
3098
|
+
});
|
|
3099
|
+
var Oe = class e extends E {
|
|
3100
|
+
constructor() {
|
|
3101
|
+
super(...arguments), this.validate = this.implement;
|
|
3102
|
+
}
|
|
3103
|
+
_parse(e) {
|
|
3104
|
+
let { ctx: t } = this._processInputParams(e);
|
|
3105
|
+
if (t.parsedType !== o.function) return m(t, {
|
|
3106
|
+
code: c.invalid_type,
|
|
3107
|
+
expected: o.function,
|
|
3108
|
+
received: t.parsedType
|
|
3109
|
+
}), g;
|
|
3110
|
+
function n(e, n) {
|
|
3111
|
+
return p({
|
|
3112
|
+
data: e,
|
|
3113
|
+
path: t.path,
|
|
3114
|
+
errorMaps: [
|
|
3115
|
+
t.common.contextualErrorMap,
|
|
3116
|
+
t.schemaErrorMap,
|
|
3117
|
+
f(),
|
|
3118
|
+
u
|
|
3119
|
+
].filter((e) => !!e),
|
|
3120
|
+
issueData: {
|
|
3121
|
+
code: c.invalid_arguments,
|
|
3122
|
+
argumentsError: n
|
|
3123
|
+
}
|
|
3124
|
+
});
|
|
3125
|
+
}
|
|
3126
|
+
function r(e, n) {
|
|
3127
|
+
return p({
|
|
3128
|
+
data: e,
|
|
3129
|
+
path: t.path,
|
|
3130
|
+
errorMaps: [
|
|
3131
|
+
t.common.contextualErrorMap,
|
|
3132
|
+
t.schemaErrorMap,
|
|
3133
|
+
f(),
|
|
3134
|
+
u
|
|
3135
|
+
].filter((e) => !!e),
|
|
3136
|
+
issueData: {
|
|
3137
|
+
code: c.invalid_return_type,
|
|
3138
|
+
returnTypeError: n
|
|
3139
|
+
}
|
|
3140
|
+
});
|
|
3141
|
+
}
|
|
3142
|
+
let i = { errorMap: t.common.contextualErrorMap }, a = t.data;
|
|
3143
|
+
if (this._def.returns instanceof Pe) {
|
|
3144
|
+
let e = this;
|
|
3145
|
+
return v(async function(...t) {
|
|
3146
|
+
let o = new l([]), s = await e._def.args.parseAsync(t, i).catch((e) => {
|
|
3147
|
+
throw o.addIssue(n(t, e)), o;
|
|
3148
|
+
}), c = await Reflect.apply(a, this, s);
|
|
3149
|
+
return await e._def.returns._def.type.parseAsync(c, i).catch((e) => {
|
|
3150
|
+
throw o.addIssue(r(c, e)), o;
|
|
3151
|
+
});
|
|
3152
|
+
});
|
|
3153
|
+
} else {
|
|
3154
|
+
let e = this;
|
|
3155
|
+
return v(function(...t) {
|
|
3156
|
+
let o = e._def.args.safeParse(t, i);
|
|
3157
|
+
if (!o.success) throw new l([n(t, o.error)]);
|
|
3158
|
+
let s = Reflect.apply(a, this, o.data), c = e._def.returns.safeParse(s, i);
|
|
3159
|
+
if (!c.success) throw new l([r(s, c.error)]);
|
|
3160
|
+
return c.data;
|
|
3161
|
+
});
|
|
3162
|
+
}
|
|
3163
|
+
}
|
|
3164
|
+
parameters() {
|
|
3165
|
+
return this._def.args;
|
|
3166
|
+
}
|
|
3167
|
+
returnType() {
|
|
3168
|
+
return this._def.returns;
|
|
3169
|
+
}
|
|
3170
|
+
args(...t) {
|
|
3171
|
+
return new e({
|
|
3172
|
+
...this._def,
|
|
3173
|
+
args: J.create(t).rest(V.create())
|
|
3174
|
+
});
|
|
3175
|
+
}
|
|
3176
|
+
returns(t) {
|
|
3177
|
+
return new e({
|
|
3178
|
+
...this._def,
|
|
3179
|
+
returns: t
|
|
3180
|
+
});
|
|
3181
|
+
}
|
|
3182
|
+
implement(e) {
|
|
3183
|
+
return this.parse(e);
|
|
3184
|
+
}
|
|
3185
|
+
strictImplement(e) {
|
|
3186
|
+
return this.parse(e);
|
|
3187
|
+
}
|
|
3188
|
+
static create(t, n, r) {
|
|
3189
|
+
return new e({
|
|
3190
|
+
args: t || J.create([]).rest(V.create()),
|
|
3191
|
+
returns: n || V.create(),
|
|
3192
|
+
typeName: Q.ZodFunction,
|
|
3193
|
+
...T(r)
|
|
3194
|
+
});
|
|
3195
|
+
}
|
|
3196
|
+
}, ke = class extends E {
|
|
3197
|
+
get schema() {
|
|
3198
|
+
return this._def.getter();
|
|
3199
|
+
}
|
|
3200
|
+
_parse(e) {
|
|
3201
|
+
let { ctx: t } = this._processInputParams(e);
|
|
3202
|
+
return this._def.getter()._parse({
|
|
3203
|
+
data: t.data,
|
|
3204
|
+
path: t.path,
|
|
3205
|
+
parent: t
|
|
3206
|
+
});
|
|
3207
|
+
}
|
|
3208
|
+
};
|
|
3209
|
+
ke.create = (e, t) => new ke({
|
|
3210
|
+
getter: e,
|
|
3211
|
+
typeName: Q.ZodLazy,
|
|
3212
|
+
...T(t)
|
|
3213
|
+
});
|
|
3214
|
+
var Ae = class extends E {
|
|
3215
|
+
_parse(e) {
|
|
3216
|
+
if (e.data !== this._def.value) {
|
|
3217
|
+
let t = this._getOrReturnCtx(e);
|
|
3218
|
+
return m(t, {
|
|
3219
|
+
received: t.data,
|
|
3220
|
+
code: c.invalid_literal,
|
|
3221
|
+
expected: this._def.value
|
|
3222
|
+
}), g;
|
|
3223
|
+
}
|
|
3224
|
+
return {
|
|
3225
|
+
status: "valid",
|
|
3226
|
+
value: e.data
|
|
3227
|
+
};
|
|
3228
|
+
}
|
|
3229
|
+
get value() {
|
|
3230
|
+
return this._def.value;
|
|
3231
|
+
}
|
|
3232
|
+
};
|
|
3233
|
+
Ae.create = (e, t) => new Ae({
|
|
3234
|
+
value: e,
|
|
3235
|
+
typeName: Q.ZodLiteral,
|
|
3236
|
+
...T(t)
|
|
3237
|
+
});
|
|
3238
|
+
function je(e, t) {
|
|
3239
|
+
return new Me({
|
|
3240
|
+
values: e,
|
|
3241
|
+
typeName: Q.ZodEnum,
|
|
3242
|
+
...T(t)
|
|
3243
|
+
});
|
|
3244
|
+
}
|
|
3245
|
+
var Me = class e extends E {
|
|
3246
|
+
_parse(e) {
|
|
3247
|
+
if (typeof e.data != "string") {
|
|
3248
|
+
let t = this._getOrReturnCtx(e), n = this._def.values;
|
|
3249
|
+
return m(t, {
|
|
3250
|
+
expected: i.joinValues(n),
|
|
3251
|
+
received: t.parsedType,
|
|
3252
|
+
code: c.invalid_type
|
|
3253
|
+
}), g;
|
|
3254
|
+
}
|
|
3255
|
+
if (this._cache ||= new Set(this._def.values), !this._cache.has(e.data)) {
|
|
3256
|
+
let t = this._getOrReturnCtx(e), n = this._def.values;
|
|
3257
|
+
return m(t, {
|
|
3258
|
+
received: t.data,
|
|
3259
|
+
code: c.invalid_enum_value,
|
|
3260
|
+
options: n
|
|
3261
|
+
}), g;
|
|
3262
|
+
}
|
|
3263
|
+
return v(e.data);
|
|
3264
|
+
}
|
|
3265
|
+
get options() {
|
|
3266
|
+
return this._def.values;
|
|
3267
|
+
}
|
|
3268
|
+
get enum() {
|
|
3269
|
+
let e = {};
|
|
3270
|
+
for (let t of this._def.values) e[t] = t;
|
|
3271
|
+
return e;
|
|
3272
|
+
}
|
|
3273
|
+
get Values() {
|
|
3274
|
+
let e = {};
|
|
3275
|
+
for (let t of this._def.values) e[t] = t;
|
|
3276
|
+
return e;
|
|
3277
|
+
}
|
|
3278
|
+
get Enum() {
|
|
3279
|
+
let e = {};
|
|
3280
|
+
for (let t of this._def.values) e[t] = t;
|
|
3281
|
+
return e;
|
|
3282
|
+
}
|
|
3283
|
+
extract(t, n = this._def) {
|
|
3284
|
+
return e.create(t, {
|
|
3285
|
+
...this._def,
|
|
3286
|
+
...n
|
|
3287
|
+
});
|
|
3288
|
+
}
|
|
3289
|
+
exclude(t, n = this._def) {
|
|
3290
|
+
return e.create(this.options.filter((e) => !t.includes(e)), {
|
|
3291
|
+
...this._def,
|
|
3292
|
+
...n
|
|
3293
|
+
});
|
|
3294
|
+
}
|
|
3295
|
+
};
|
|
3296
|
+
Me.create = je;
|
|
3297
|
+
var Ne = class extends E {
|
|
3298
|
+
_parse(e) {
|
|
3299
|
+
let t = i.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e);
|
|
3300
|
+
if (n.parsedType !== o.string && n.parsedType !== o.number) {
|
|
3301
|
+
let e = i.objectValues(t);
|
|
3302
|
+
return m(n, {
|
|
3303
|
+
expected: i.joinValues(e),
|
|
3304
|
+
received: n.parsedType,
|
|
3305
|
+
code: c.invalid_type
|
|
3306
|
+
}), g;
|
|
3307
|
+
}
|
|
3308
|
+
if (this._cache ||= new Set(i.getValidEnumValues(this._def.values)), !this._cache.has(e.data)) {
|
|
3309
|
+
let e = i.objectValues(t);
|
|
3310
|
+
return m(n, {
|
|
3311
|
+
received: n.data,
|
|
3312
|
+
code: c.invalid_enum_value,
|
|
3313
|
+
options: e
|
|
3314
|
+
}), g;
|
|
3315
|
+
}
|
|
3316
|
+
return v(e.data);
|
|
3317
|
+
}
|
|
3318
|
+
get enum() {
|
|
3319
|
+
return this._def.values;
|
|
3320
|
+
}
|
|
3321
|
+
};
|
|
3322
|
+
Ne.create = (e, t) => new Ne({
|
|
3323
|
+
values: e,
|
|
3324
|
+
typeName: Q.ZodNativeEnum,
|
|
3325
|
+
...T(t)
|
|
3326
|
+
});
|
|
3327
|
+
var Pe = class extends E {
|
|
3328
|
+
unwrap() {
|
|
3329
|
+
return this._def.type;
|
|
3330
|
+
}
|
|
3331
|
+
_parse(e) {
|
|
3332
|
+
let { ctx: t } = this._processInputParams(e);
|
|
3333
|
+
return t.parsedType !== o.promise && t.common.async === !1 ? (m(t, {
|
|
3334
|
+
code: c.invalid_type,
|
|
3335
|
+
expected: o.promise,
|
|
3336
|
+
received: t.parsedType
|
|
3337
|
+
}), g) : v((t.parsedType === o.promise ? t.data : Promise.resolve(t.data)).then((e) => this._def.type.parseAsync(e, {
|
|
3338
|
+
path: t.path,
|
|
3339
|
+
errorMap: t.common.contextualErrorMap
|
|
3340
|
+
})));
|
|
3341
|
+
}
|
|
3342
|
+
};
|
|
3343
|
+
Pe.create = (e, t) => new Pe({
|
|
3344
|
+
type: e,
|
|
3345
|
+
typeName: Q.ZodPromise,
|
|
3346
|
+
...T(t)
|
|
3347
|
+
});
|
|
3348
|
+
var Y = class extends E {
|
|
3349
|
+
innerType() {
|
|
3350
|
+
return this._def.schema;
|
|
3351
|
+
}
|
|
3352
|
+
sourceType() {
|
|
3353
|
+
return this._def.schema._def.typeName === Q.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
|
|
3354
|
+
}
|
|
3355
|
+
_parse(e) {
|
|
3356
|
+
let { status: t, ctx: n } = this._processInputParams(e), r = this._def.effect || null, a = {
|
|
3357
|
+
addIssue: (e) => {
|
|
3358
|
+
m(n, e), e.fatal ? t.abort() : t.dirty();
|
|
3359
|
+
},
|
|
3360
|
+
get path() {
|
|
3361
|
+
return n.path;
|
|
3362
|
+
}
|
|
3363
|
+
};
|
|
3364
|
+
if (a.addIssue = a.addIssue.bind(a), r.type === "preprocess") {
|
|
3365
|
+
let e = r.transform(n.data, a);
|
|
3366
|
+
if (n.common.async) return Promise.resolve(e).then(async (e) => {
|
|
3367
|
+
if (t.value === "aborted") return g;
|
|
3368
|
+
let r = await this._def.schema._parseAsync({
|
|
3369
|
+
data: e,
|
|
3370
|
+
path: n.path,
|
|
3371
|
+
parent: n
|
|
3372
|
+
});
|
|
3373
|
+
return r.status === "aborted" ? g : r.status === "dirty" || t.value === "dirty" ? _(r.value) : r;
|
|
3374
|
+
});
|
|
3375
|
+
{
|
|
3376
|
+
if (t.value === "aborted") return g;
|
|
3377
|
+
let r = this._def.schema._parseSync({
|
|
3378
|
+
data: e,
|
|
3379
|
+
path: n.path,
|
|
3380
|
+
parent: n
|
|
3381
|
+
});
|
|
3382
|
+
return r.status === "aborted" ? g : r.status === "dirty" || t.value === "dirty" ? _(r.value) : r;
|
|
3383
|
+
}
|
|
3384
|
+
}
|
|
3385
|
+
if (r.type === "refinement") {
|
|
3386
|
+
let e = (e) => {
|
|
3387
|
+
let t = r.refinement(e, a);
|
|
3388
|
+
if (n.common.async) return Promise.resolve(t);
|
|
3389
|
+
if (t instanceof Promise) throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");
|
|
3390
|
+
return e;
|
|
3391
|
+
};
|
|
3392
|
+
if (n.common.async === !1) {
|
|
3393
|
+
let r = this._def.schema._parseSync({
|
|
3394
|
+
data: n.data,
|
|
3395
|
+
path: n.path,
|
|
3396
|
+
parent: n
|
|
3397
|
+
});
|
|
3398
|
+
return r.status === "aborted" ? g : (r.status === "dirty" && t.dirty(), e(r.value), {
|
|
3399
|
+
status: t.value,
|
|
3400
|
+
value: r.value
|
|
3401
|
+
});
|
|
3402
|
+
} else return this._def.schema._parseAsync({
|
|
3403
|
+
data: n.data,
|
|
3404
|
+
path: n.path,
|
|
3405
|
+
parent: n
|
|
3406
|
+
}).then((n) => n.status === "aborted" ? g : (n.status === "dirty" && t.dirty(), e(n.value).then(() => ({
|
|
3407
|
+
status: t.value,
|
|
3408
|
+
value: n.value
|
|
3409
|
+
}))));
|
|
3410
|
+
}
|
|
3411
|
+
if (r.type === "transform") if (n.common.async === !1) {
|
|
3412
|
+
let e = this._def.schema._parseSync({
|
|
3413
|
+
data: n.data,
|
|
3414
|
+
path: n.path,
|
|
3415
|
+
parent: n
|
|
3416
|
+
});
|
|
3417
|
+
if (!b(e)) return g;
|
|
3418
|
+
let i = r.transform(e.value, a);
|
|
3419
|
+
if (i instanceof Promise) throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
|
|
3420
|
+
return {
|
|
3421
|
+
status: t.value,
|
|
3422
|
+
value: i
|
|
3423
|
+
};
|
|
3424
|
+
} else return this._def.schema._parseAsync({
|
|
3425
|
+
data: n.data,
|
|
3426
|
+
path: n.path,
|
|
3427
|
+
parent: n
|
|
3428
|
+
}).then((e) => b(e) ? Promise.resolve(r.transform(e.value, a)).then((e) => ({
|
|
3429
|
+
status: t.value,
|
|
3430
|
+
value: e
|
|
3431
|
+
})) : g);
|
|
3432
|
+
i.assertNever(r);
|
|
3433
|
+
}
|
|
3434
|
+
};
|
|
3435
|
+
Y.create = (e, t, n) => new Y({
|
|
3436
|
+
schema: e,
|
|
3437
|
+
typeName: Q.ZodEffects,
|
|
3438
|
+
effect: t,
|
|
3439
|
+
...T(n)
|
|
3440
|
+
}), Y.createWithPreprocess = (e, t, n) => new Y({
|
|
3441
|
+
schema: t,
|
|
3442
|
+
effect: {
|
|
3443
|
+
type: "preprocess",
|
|
3444
|
+
transform: e
|
|
3445
|
+
},
|
|
3446
|
+
typeName: Q.ZodEffects,
|
|
3447
|
+
...T(n)
|
|
3448
|
+
});
|
|
3449
|
+
var X = class extends E {
|
|
3450
|
+
_parse(e) {
|
|
3451
|
+
return this._getType(e) === o.undefined ? v(void 0) : this._def.innerType._parse(e);
|
|
3452
|
+
}
|
|
3453
|
+
unwrap() {
|
|
3454
|
+
return this._def.innerType;
|
|
3455
|
+
}
|
|
3456
|
+
};
|
|
3457
|
+
X.create = (e, t) => new X({
|
|
3458
|
+
innerType: e,
|
|
3459
|
+
typeName: Q.ZodOptional,
|
|
3460
|
+
...T(t)
|
|
3461
|
+
});
|
|
3462
|
+
var Z = class extends E {
|
|
3463
|
+
_parse(e) {
|
|
3464
|
+
return this._getType(e) === o.null ? v(null) : this._def.innerType._parse(e);
|
|
3465
|
+
}
|
|
3466
|
+
unwrap() {
|
|
3467
|
+
return this._def.innerType;
|
|
3468
|
+
}
|
|
3469
|
+
};
|
|
3470
|
+
Z.create = (e, t) => new Z({
|
|
3471
|
+
innerType: e,
|
|
3472
|
+
typeName: Q.ZodNullable,
|
|
3473
|
+
...T(t)
|
|
3474
|
+
});
|
|
3475
|
+
var Fe = class extends E {
|
|
3476
|
+
_parse(e) {
|
|
3477
|
+
let { ctx: t } = this._processInputParams(e), n = t.data;
|
|
3478
|
+
return t.parsedType === o.undefined && (n = this._def.defaultValue()), this._def.innerType._parse({
|
|
3479
|
+
data: n,
|
|
3480
|
+
path: t.path,
|
|
3481
|
+
parent: t
|
|
3482
|
+
});
|
|
3483
|
+
}
|
|
3484
|
+
removeDefault() {
|
|
3485
|
+
return this._def.innerType;
|
|
3486
|
+
}
|
|
3487
|
+
};
|
|
3488
|
+
Fe.create = (e, t) => new Fe({
|
|
3489
|
+
innerType: e,
|
|
3490
|
+
typeName: Q.ZodDefault,
|
|
3491
|
+
defaultValue: typeof t.default == "function" ? t.default : () => t.default,
|
|
3492
|
+
...T(t)
|
|
3493
|
+
});
|
|
3494
|
+
var Ie = class extends E {
|
|
3495
|
+
_parse(e) {
|
|
3496
|
+
let { ctx: t } = this._processInputParams(e), n = {
|
|
3497
|
+
...t,
|
|
3498
|
+
common: {
|
|
3499
|
+
...t.common,
|
|
3500
|
+
issues: []
|
|
3501
|
+
}
|
|
3502
|
+
}, r = this._def.innerType._parse({
|
|
3503
|
+
data: n.data,
|
|
3504
|
+
path: n.path,
|
|
3505
|
+
parent: { ...n }
|
|
3506
|
+
});
|
|
3507
|
+
return x(r) ? r.then((e) => ({
|
|
3508
|
+
status: "valid",
|
|
3509
|
+
value: e.status === "valid" ? e.value : this._def.catchValue({
|
|
3510
|
+
get error() {
|
|
3511
|
+
return new l(n.common.issues);
|
|
3512
|
+
},
|
|
3513
|
+
input: n.data
|
|
3514
|
+
})
|
|
3515
|
+
})) : {
|
|
3516
|
+
status: "valid",
|
|
3517
|
+
value: r.status === "valid" ? r.value : this._def.catchValue({
|
|
3518
|
+
get error() {
|
|
3519
|
+
return new l(n.common.issues);
|
|
3520
|
+
},
|
|
3521
|
+
input: n.data
|
|
3522
|
+
})
|
|
3523
|
+
};
|
|
3524
|
+
}
|
|
3525
|
+
removeCatch() {
|
|
3526
|
+
return this._def.innerType;
|
|
3527
|
+
}
|
|
3528
|
+
};
|
|
3529
|
+
Ie.create = (e, t) => new Ie({
|
|
3530
|
+
innerType: e,
|
|
3531
|
+
typeName: Q.ZodCatch,
|
|
3532
|
+
catchValue: typeof t.catch == "function" ? t.catch : () => t.catch,
|
|
3533
|
+
...T(t)
|
|
3534
|
+
});
|
|
3535
|
+
var Le = class extends E {
|
|
3536
|
+
_parse(e) {
|
|
3537
|
+
if (this._getType(e) !== o.nan) {
|
|
3538
|
+
let t = this._getOrReturnCtx(e);
|
|
3539
|
+
return m(t, {
|
|
3540
|
+
code: c.invalid_type,
|
|
3541
|
+
expected: o.nan,
|
|
3542
|
+
received: t.parsedType
|
|
3543
|
+
}), g;
|
|
3544
|
+
}
|
|
3545
|
+
return {
|
|
3546
|
+
status: "valid",
|
|
3547
|
+
value: e.data
|
|
3548
|
+
};
|
|
3549
|
+
}
|
|
3550
|
+
};
|
|
3551
|
+
Le.create = (e) => new Le({
|
|
3552
|
+
typeName: Q.ZodNaN,
|
|
3553
|
+
...T(e)
|
|
3554
|
+
});
|
|
3555
|
+
var Re = class extends E {
|
|
3556
|
+
_parse(e) {
|
|
3557
|
+
let { ctx: t } = this._processInputParams(e), n = t.data;
|
|
3558
|
+
return this._def.type._parse({
|
|
3559
|
+
data: n,
|
|
3560
|
+
path: t.path,
|
|
3561
|
+
parent: t
|
|
3562
|
+
});
|
|
3563
|
+
}
|
|
3564
|
+
unwrap() {
|
|
3565
|
+
return this._def.type;
|
|
3566
|
+
}
|
|
3567
|
+
}, ze = class e extends E {
|
|
3568
|
+
_parse(e) {
|
|
3569
|
+
let { status: t, ctx: n } = this._processInputParams(e);
|
|
3570
|
+
if (n.common.async) return (async () => {
|
|
3571
|
+
let e = await this._def.in._parseAsync({
|
|
3572
|
+
data: n.data,
|
|
3573
|
+
path: n.path,
|
|
3574
|
+
parent: n
|
|
3575
|
+
});
|
|
3576
|
+
return e.status === "aborted" ? g : e.status === "dirty" ? (t.dirty(), _(e.value)) : this._def.out._parseAsync({
|
|
3577
|
+
data: e.value,
|
|
3578
|
+
path: n.path,
|
|
3579
|
+
parent: n
|
|
3580
|
+
});
|
|
3581
|
+
})();
|
|
3582
|
+
{
|
|
3583
|
+
let e = this._def.in._parseSync({
|
|
3584
|
+
data: n.data,
|
|
3585
|
+
path: n.path,
|
|
3586
|
+
parent: n
|
|
3587
|
+
});
|
|
3588
|
+
return e.status === "aborted" ? g : e.status === "dirty" ? (t.dirty(), {
|
|
3589
|
+
status: "dirty",
|
|
3590
|
+
value: e.value
|
|
3591
|
+
}) : this._def.out._parseSync({
|
|
3592
|
+
data: e.value,
|
|
3593
|
+
path: n.path,
|
|
3594
|
+
parent: n
|
|
3595
|
+
});
|
|
3596
|
+
}
|
|
3597
|
+
}
|
|
3598
|
+
static create(t, n) {
|
|
3599
|
+
return new e({
|
|
3600
|
+
in: t,
|
|
3601
|
+
out: n,
|
|
3602
|
+
typeName: Q.ZodPipeline
|
|
3603
|
+
});
|
|
3604
|
+
}
|
|
3605
|
+
}, Be = class extends E {
|
|
3606
|
+
_parse(e) {
|
|
3607
|
+
let t = this._def.innerType._parse(e), n = (e) => (b(e) && (e.value = Object.freeze(e.value)), e);
|
|
3608
|
+
return x(t) ? t.then((e) => n(e)) : n(t);
|
|
3609
|
+
}
|
|
3610
|
+
unwrap() {
|
|
3611
|
+
return this._def.innerType;
|
|
3612
|
+
}
|
|
3613
|
+
};
|
|
3614
|
+
Be.create = (e, t) => new Be({
|
|
3615
|
+
innerType: e,
|
|
3616
|
+
typeName: Q.ZodReadonly,
|
|
3617
|
+
...T(t)
|
|
3618
|
+
}), G.lazycreate;
|
|
3619
|
+
var Q;
|
|
3620
|
+
(function(e) {
|
|
3621
|
+
e.ZodString = "ZodString", e.ZodNumber = "ZodNumber", e.ZodNaN = "ZodNaN", e.ZodBigInt = "ZodBigInt", e.ZodBoolean = "ZodBoolean", e.ZodDate = "ZodDate", e.ZodSymbol = "ZodSymbol", e.ZodUndefined = "ZodUndefined", e.ZodNull = "ZodNull", e.ZodAny = "ZodAny", e.ZodUnknown = "ZodUnknown", e.ZodNever = "ZodNever", e.ZodVoid = "ZodVoid", e.ZodArray = "ZodArray", e.ZodObject = "ZodObject", e.ZodUnion = "ZodUnion", e.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", e.ZodIntersection = "ZodIntersection", e.ZodTuple = "ZodTuple", e.ZodRecord = "ZodRecord", e.ZodMap = "ZodMap", e.ZodSet = "ZodSet", e.ZodFunction = "ZodFunction", e.ZodLazy = "ZodLazy", e.ZodLiteral = "ZodLiteral", e.ZodEnum = "ZodEnum", e.ZodEffects = "ZodEffects", e.ZodNativeEnum = "ZodNativeEnum", e.ZodOptional = "ZodOptional", e.ZodNullable = "ZodNullable", e.ZodDefault = "ZodDefault", e.ZodCatch = "ZodCatch", e.ZodPromise = "ZodPromise", e.ZodBranded = "ZodBranded", e.ZodPipeline = "ZodPipeline", e.ZodReadonly = "ZodReadonly";
|
|
3622
|
+
})(Q ||= {});
|
|
3623
|
+
var $ = F.create, Ve = _e.create;
|
|
3624
|
+
Le.create, ve.create;
|
|
3625
|
+
var He = L.create;
|
|
3626
|
+
R.create, ye.create;
|
|
3627
|
+
var Ue = z.create, We = B.create;
|
|
3628
|
+
be.create;
|
|
3629
|
+
var Ge = V.create;
|
|
3630
|
+
H.create, xe.create;
|
|
3631
|
+
var Ke = U.create, qe = G.create;
|
|
3632
|
+
G.strictCreate;
|
|
3633
|
+
var Je = K.create;
|
|
3634
|
+
Se.create, we.create, J.create, Te.create, Ee.create, De.create, Oe.create, ke.create;
|
|
3635
|
+
var Ye = Ae.create;
|
|
3636
|
+
Me.create, Ne.create, Pe.create, Y.create, X.create, Z.create, Y.createWithPreprocess, ze.create;
|
|
3637
|
+
var { VITE_STATIC_REDIRECT_URI: Xe, VITE_GTM_CONTAINER_ID: Ze, VITE_SENTRY_DSN: Qe, VITE_BASE_URL: $e, VITE_DEMO_CLIENT_ID: et, VITE_API_BASE_URL: tt, VITE_SSO_BASE_URL: nt, VITE_AUTH_URL: rt, VITE_TOKEN_URL: it, VITE_CHECKOUT_URL: at, TAPPER_ENV: ot, PACKAGE_NAME: st, PACKAGE_VERSION: ct, MONETIZATION_PROVIDER_SCRIPT_URL: lt, VITE_POSTHOG_API_HOST: ut, VITE_POSTHOG_API_KEY: dt } = qe({
|
|
3638
|
+
VITE_STATIC_REDIRECT_URI: $().optional(),
|
|
3639
|
+
VITE_GTM_CONTAINER_ID: $().optional(),
|
|
3640
|
+
VITE_SENTRY_DSN: $().optional(),
|
|
3641
|
+
VITE_BASE_URL: $().optional(),
|
|
3642
|
+
VITE_DEMO_CLIENT_ID: $().optional(),
|
|
3643
|
+
VITE_API_BASE_URL: $().optional(),
|
|
3644
|
+
VITE_SSO_BASE_URL: $().optional(),
|
|
3645
|
+
VITE_AUTH_URL: $().optional(),
|
|
3646
|
+
VITE_TOKEN_URL: $().optional(),
|
|
3647
|
+
VITE_CHECKOUT_URL: $().optional(),
|
|
3648
|
+
TAPPER_ENV: $(),
|
|
3649
|
+
PACKAGE_NAME: $(),
|
|
3650
|
+
PACKAGE_VERSION: $(),
|
|
3651
|
+
MONETIZATION_PROVIDER_SCRIPT_URL: $().optional(),
|
|
3652
|
+
VITE_POSTHOG_API_HOST: $().optional(),
|
|
3653
|
+
VITE_POSTHOG_API_KEY: $().optional()
|
|
3654
|
+
}).parse({
|
|
3655
|
+
VITE_STATIC_REDIRECT_URI: void 0,
|
|
3656
|
+
VITE_GTM_CONTAINER_ID: "GTM-NG9GT7FM",
|
|
3657
|
+
VITE_SENTRY_DSN: "https://d08f3f301f364ceba6345c393c538faf@o23455.ingest.us.sentry.io/4507736861573120",
|
|
3658
|
+
VITE_BASE_URL: "https://js.supertab.co/v3.64.0/",
|
|
3659
|
+
VITE_DEMO_CLIENT_ID: void 0,
|
|
3660
|
+
VITE_API_BASE_URL: void 0,
|
|
3661
|
+
VITE_SSO_BASE_URL: void 0,
|
|
3662
|
+
VITE_AUTH_URL: void 0,
|
|
3663
|
+
VITE_TOKEN_URL: void 0,
|
|
3664
|
+
VITE_CHECKOUT_URL: void 0,
|
|
3665
|
+
TAPPER_ENV: "prod",
|
|
3666
|
+
PACKAGE_NAME: "@getsupertab/supertab-js",
|
|
3667
|
+
PACKAGE_VERSION: "3.64.0",
|
|
3668
|
+
MONETIZATION_PROVIDER_SCRIPT_URL: void 0,
|
|
3669
|
+
VITE_POSTHOG_API_HOST: void 0,
|
|
3670
|
+
VITE_POSTHOG_API_KEY: void 0
|
|
3671
|
+
});
|
|
3672
|
+
//#endregion
|
|
3673
|
+
export { Ge as C, Je as S, r as T, We as _, rt as a, $ as b, Ze as c, Qe as d, nt as f, Ye as g, He as h, tt as i, ut as l, Ke as m, ct as n, $e as o, it as p, ot as r, at as s, st as t, dt as u, Ve as v, c as w, Ue as x, qe as y };
|