@btc-vision/transaction 1.7.22 → 1.7.23
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/.babelrc +10 -1
- package/browser/_version.d.ts +1 -1
- package/browser/bip39.js +204 -0
- package/browser/bitcoin-utils.js +3172 -0
- package/browser/btc-vision-bip32.js +805 -0
- package/browser/btc-vision-bitcoin.js +4179 -0
- package/browser/btc-vision-logger.js +273 -0
- package/browser/btc-vision-post-quantum.js +542 -0
- package/browser/chain/ChainData.d.ts +1 -1
- package/browser/crypto/crypto.d.ts +1 -1
- package/browser/generators/AddressGenerator.d.ts +1 -1
- package/browser/generators/Generator.d.ts +1 -1
- package/browser/generators/MLDSAData.d.ts +1 -1
- package/browser/generators/builders/CalldataGenerator.d.ts +1 -1
- package/browser/generators/builders/CustomGenerator.d.ts +1 -1
- package/browser/generators/builders/DeploymentGenerator.d.ts +1 -1
- package/browser/generators/builders/HashCommitmentGenerator.d.ts +1 -1
- package/browser/generators/builders/LegacyCalldataGenerator.d.ts +1 -1
- package/browser/generators/builders/P2WDAGenerator.d.ts +1 -1
- package/browser/index.js +10775 -2
- package/browser/keypair/Address.d.ts +2 -2
- package/browser/keypair/AddressVerificator.d.ts +2 -2
- package/browser/keypair/EcKeyPair.d.ts +2 -2
- package/browser/keypair/MessageSigner.d.ts +2 -2
- package/browser/keypair/Wallet.d.ts +2 -2
- package/browser/metadata/ContractBaseMetadata.d.ts +1 -1
- package/browser/mnemonic/Mnemonic.d.ts +2 -2
- package/browser/noble-curves.js +3316 -0
- package/browser/noble-hashes.js +1608 -0
- package/browser/opnet.d.ts +10 -2
- package/browser/p2wda/P2WDADetector.d.ts +2 -2
- package/browser/polyfills.js +4590 -0
- package/browser/scure-base.js +410 -0
- package/browser/signer/AddressRotation.d.ts +1 -1
- package/browser/signer/SignerUtils.d.ts +1 -1
- package/browser/signer/TweakedSigner.d.ts +1 -1
- package/browser/transaction/TransactionFactory.d.ts +1 -1
- package/browser/transaction/browser/BrowserSignerBase.d.ts +1 -1
- package/browser/transaction/browser/Web3Provider.d.ts +1 -1
- package/browser/transaction/browser/extensions/UnisatSigner.d.ts +1 -1
- package/browser/transaction/browser/extensions/XverseSigner.d.ts +1 -1
- package/browser/transaction/builders/CancelTransaction.d.ts +1 -1
- package/browser/transaction/builders/ConsolidatedInteractionTransaction.d.ts +4 -4
- package/browser/transaction/builders/CustomScriptTransaction.d.ts +1 -1
- package/browser/transaction/builders/DeploymentTransaction.d.ts +1 -1
- package/browser/transaction/builders/FundingTransaction.d.ts +1 -1
- package/browser/transaction/builders/InteractionTransaction.d.ts +1 -1
- package/browser/transaction/builders/InteractionTransactionP2WDA.d.ts +2 -2
- package/browser/transaction/builders/MultiSignTransaction.d.ts +1 -1
- package/browser/transaction/builders/SharedInteractionTransaction.d.ts +1 -1
- package/browser/transaction/builders/TransactionBuilder.d.ts +1 -1
- package/browser/transaction/interfaces/ITransactionParameters.d.ts +1 -1
- package/browser/transaction/interfaces/Tap.d.ts +1 -1
- package/browser/transaction/mineable/TimelockGenerator.d.ts +1 -1
- package/browser/transaction/offline/OfflineTransactionManager.d.ts +1 -1
- package/browser/transaction/offline/TransactionReconstructor.d.ts +2 -2
- package/browser/transaction/processor/PsbtTransaction.d.ts +1 -1
- package/browser/transaction/shared/P2TR_MS.d.ts +1 -1
- package/browser/transaction/shared/TweakedTransaction.d.ts +3 -3
- package/browser/utxo/OPNetLimitedProvider.d.ts +1 -1
- package/browser/valibot.js +4948 -0
- package/browser/vendors.js +12913 -0
- package/browser/verification/TapscriptVerificator.d.ts +1 -1
- package/build/_version.d.ts +1 -1
- package/build/_version.js +1 -1
- package/build/opnet.d.ts +9 -1
- package/build/opnet.js +6 -1
- package/build/transaction/builders/ConsolidatedInteractionTransaction.d.ts +3 -3
- package/build/transaction/builders/ConsolidatedInteractionTransaction.js +16 -16
- package/package.json +61 -3
- package/src/_version.ts +1 -1
- package/src/opnet.ts +9 -1
- package/src/transaction/TransactionFactory.ts +1 -4
- package/src/transaction/builders/ConsolidatedInteractionTransaction.ts +40 -47
- package/vite.config.browser.ts +92 -0
- package/webpack.config.js +143 -2
- package/browser/crypto/crypto-browser.d.ts +0 -11
- package/browser/index.js.LICENSE.txt +0 -29
- package/browser/transaction/offline/index.d.ts +0 -5
- package/browser/transaction/offline/interfaces/index.d.ts +0 -2
- package/build/transaction/offline/index.d.ts +0 -5
- package/build/transaction/offline/index.js +0 -5
- package/build/transaction/offline/interfaces/index.d.ts +0 -2
- package/build/transaction/offline/interfaces/index.js +0 -2
- package/src/transaction/offline/index.ts +0 -8
- package/src/transaction/offline/interfaces/index.ts +0 -2
|
@@ -0,0 +1,4948 @@
|
|
|
1
|
+
var t = {}, us;
|
|
2
|
+
function Ys() {
|
|
3
|
+
if (us) return t;
|
|
4
|
+
us = 1;
|
|
5
|
+
let D;
|
|
6
|
+
function ls(r) {
|
|
7
|
+
D = {
|
|
8
|
+
...D,
|
|
9
|
+
...r
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
// @__NO_SIDE_EFFECTS__
|
|
13
|
+
function j(r) {
|
|
14
|
+
return {
|
|
15
|
+
lang: r?.lang ?? D?.lang,
|
|
16
|
+
message: r?.message,
|
|
17
|
+
abortEarly: r?.abortEarly ?? D?.abortEarly,
|
|
18
|
+
abortPipeEarly: r?.abortPipeEarly ?? D?.abortPipeEarly
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function os() {
|
|
22
|
+
D = void 0;
|
|
23
|
+
}
|
|
24
|
+
let O;
|
|
25
|
+
function cs(r, n) {
|
|
26
|
+
O || (O = /* @__PURE__ */ new Map()), O.set(n, r);
|
|
27
|
+
}
|
|
28
|
+
// @__NO_SIDE_EFFECTS__
|
|
29
|
+
function ie(r) {
|
|
30
|
+
return O?.get(r);
|
|
31
|
+
}
|
|
32
|
+
function fs(r) {
|
|
33
|
+
O?.delete(r);
|
|
34
|
+
}
|
|
35
|
+
let G;
|
|
36
|
+
function ps(r, n) {
|
|
37
|
+
G || (G = /* @__PURE__ */ new Map()), G.set(n, r);
|
|
38
|
+
}
|
|
39
|
+
// @__NO_SIDE_EFFECTS__
|
|
40
|
+
function se(r) {
|
|
41
|
+
return G?.get(r);
|
|
42
|
+
}
|
|
43
|
+
function as(r) {
|
|
44
|
+
G?.delete(r);
|
|
45
|
+
}
|
|
46
|
+
let w;
|
|
47
|
+
function ys(r, n, e) {
|
|
48
|
+
w || (w = /* @__PURE__ */ new Map()), w.get(r) || w.set(r, /* @__PURE__ */ new Map()), w.get(r).set(e, n);
|
|
49
|
+
}
|
|
50
|
+
// @__NO_SIDE_EFFECTS__
|
|
51
|
+
function te(r, n) {
|
|
52
|
+
return w?.get(r)?.get(n);
|
|
53
|
+
}
|
|
54
|
+
function hs(r, n) {
|
|
55
|
+
w?.get(r)?.delete(n);
|
|
56
|
+
}
|
|
57
|
+
// @__NO_SIDE_EFFECTS__
|
|
58
|
+
function m(r) {
|
|
59
|
+
const n = typeof r;
|
|
60
|
+
return n === "string" ? `"${r}"` : n === "number" || n === "bigint" || n === "boolean" ? `${r}` : n === "object" || n === "function" ? (r && Object.getPrototypeOf(r)?.constructor?.name) ?? "null" : n;
|
|
61
|
+
}
|
|
62
|
+
function f(r, n, e, i, s) {
|
|
63
|
+
const u = s && "input" in s ? s.input : e.value, l = s?.expected ?? r.expects ?? null, c = s?.received ?? /* @__PURE__ */ m(u), o = {
|
|
64
|
+
kind: r.kind,
|
|
65
|
+
type: r.type,
|
|
66
|
+
input: u,
|
|
67
|
+
expected: l,
|
|
68
|
+
received: c,
|
|
69
|
+
message: `Invalid ${n}: ${l ? `Expected ${l} but r` : "R"}eceived ${c}`,
|
|
70
|
+
requirement: r.requirement,
|
|
71
|
+
path: s?.path,
|
|
72
|
+
issues: s?.issues,
|
|
73
|
+
lang: i.lang,
|
|
74
|
+
abortEarly: i.abortEarly,
|
|
75
|
+
abortPipeEarly: i.abortPipeEarly
|
|
76
|
+
}, p = r.kind === "schema", a = s?.message ?? r.message ?? /* @__PURE__ */ te(r.reference, o.lang) ?? (p ? /* @__PURE__ */ se(o.lang) : null) ?? i.message ?? /* @__PURE__ */ ie(o.lang);
|
|
77
|
+
a !== void 0 && (o.message = typeof a == "function" ? a(o) : a), p && (e.typed = !1), e.issues ? e.issues.push(o) : e.issues = [o];
|
|
78
|
+
}
|
|
79
|
+
let z;
|
|
80
|
+
// @__NO_SIDE_EFFECTS__
|
|
81
|
+
function R(r) {
|
|
82
|
+
return z || (z = new TextEncoder()), z.encode(r).length;
|
|
83
|
+
}
|
|
84
|
+
let T;
|
|
85
|
+
// @__NO_SIDE_EFFECTS__
|
|
86
|
+
function q(r) {
|
|
87
|
+
T || (T = new Intl.Segmenter());
|
|
88
|
+
const n = T.segment(r);
|
|
89
|
+
let e = 0;
|
|
90
|
+
for (const i of n) e++;
|
|
91
|
+
return e;
|
|
92
|
+
}
|
|
93
|
+
// @__NO_SIDE_EFFECTS__
|
|
94
|
+
function X(r, n) {
|
|
95
|
+
if ("pipe" in r) {
|
|
96
|
+
const e = [];
|
|
97
|
+
for (let i = r.pipe.length - 1; i >= 0; i--) {
|
|
98
|
+
const s = r.pipe[i];
|
|
99
|
+
if (s.kind === "schema" && "pipe" in s) e.push(s);
|
|
100
|
+
else if (s.kind === "metadata" && s.type === n) return s[n];
|
|
101
|
+
}
|
|
102
|
+
for (const i of e) {
|
|
103
|
+
const s = /* @__PURE__ */ X(i, n);
|
|
104
|
+
if (s !== void 0) return s;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
// @__NO_SIDE_EFFECTS__
|
|
109
|
+
function y(r) {
|
|
110
|
+
return {
|
|
111
|
+
version: 1,
|
|
112
|
+
vendor: "valibot",
|
|
113
|
+
validate(n) {
|
|
114
|
+
return r["~run"]({ value: n }, /* @__PURE__ */ j());
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
let M;
|
|
119
|
+
// @__NO_SIDE_EFFECTS__
|
|
120
|
+
function S(r, n) {
|
|
121
|
+
M || (M = /* @__PURE__ */ new Map()), M.get(r) || M.set(r, new Intl.Segmenter(r, { granularity: "word" }));
|
|
122
|
+
const e = M.get(r).segment(n);
|
|
123
|
+
let i = 0;
|
|
124
|
+
for (const s of e) s.isWordLike && i++;
|
|
125
|
+
return i;
|
|
126
|
+
}
|
|
127
|
+
const vs = /\D/gu;
|
|
128
|
+
// @__NO_SIDE_EFFECTS__
|
|
129
|
+
function F(r) {
|
|
130
|
+
const n = r.replace(vs, "");
|
|
131
|
+
let e = n.length, i = 1, s = 0;
|
|
132
|
+
for (; e; ) {
|
|
133
|
+
const u = +n[--e];
|
|
134
|
+
i ^= 1, s += i ? [
|
|
135
|
+
0,
|
|
136
|
+
2,
|
|
137
|
+
4,
|
|
138
|
+
6,
|
|
139
|
+
8,
|
|
140
|
+
1,
|
|
141
|
+
3,
|
|
142
|
+
5,
|
|
143
|
+
7,
|
|
144
|
+
9
|
|
145
|
+
][u] : u;
|
|
146
|
+
}
|
|
147
|
+
return s % 10 === 0;
|
|
148
|
+
}
|
|
149
|
+
// @__NO_SIDE_EFFECTS__
|
|
150
|
+
function I(r, n) {
|
|
151
|
+
return Object.hasOwn(r, n) && n !== "__proto__" && n !== "prototype" && n !== "constructor";
|
|
152
|
+
}
|
|
153
|
+
// @__NO_SIDE_EFFECTS__
|
|
154
|
+
function E(r, n) {
|
|
155
|
+
const e = [...new Set(r)];
|
|
156
|
+
return e.length > 1 ? `(${e.join(` ${n} `)})` : e[0] ?? "never";
|
|
157
|
+
}
|
|
158
|
+
// @__NO_SIDE_EFFECTS__
|
|
159
|
+
function ms(r, n) {
|
|
160
|
+
const e = {};
|
|
161
|
+
for (const i of r) e[i] = n;
|
|
162
|
+
return e;
|
|
163
|
+
}
|
|
164
|
+
// @__NO_SIDE_EFFECTS__
|
|
165
|
+
function gs(r) {
|
|
166
|
+
const n = {};
|
|
167
|
+
for (const e of r) Object.assign(n, e.entries);
|
|
168
|
+
return n;
|
|
169
|
+
}
|
|
170
|
+
// @__NO_SIDE_EFFECTS__
|
|
171
|
+
function $(r) {
|
|
172
|
+
if (r.path) {
|
|
173
|
+
let n = "";
|
|
174
|
+
for (const e of r.path) if (typeof e.key == "string" || typeof e.key == "number") n ? n += `.${e.key}` : n += e.key;
|
|
175
|
+
else return null;
|
|
176
|
+
return n;
|
|
177
|
+
}
|
|
178
|
+
return null;
|
|
179
|
+
}
|
|
180
|
+
// @__NO_SIDE_EFFECTS__
|
|
181
|
+
function ds(r, n) {
|
|
182
|
+
return n.kind === r;
|
|
183
|
+
}
|
|
184
|
+
// @__NO_SIDE_EFFECTS__
|
|
185
|
+
function ks(r, n) {
|
|
186
|
+
return n.type === r;
|
|
187
|
+
}
|
|
188
|
+
// @__NO_SIDE_EFFECTS__
|
|
189
|
+
function bs(r) {
|
|
190
|
+
return r instanceof x;
|
|
191
|
+
}
|
|
192
|
+
var x = class extends Error {
|
|
193
|
+
/**
|
|
194
|
+
* Creates a Valibot error with useful information.
|
|
195
|
+
*
|
|
196
|
+
* @param issues The error issues.
|
|
197
|
+
*/
|
|
198
|
+
constructor(r) {
|
|
199
|
+
super(r[0].message), this.name = "ValiError", this.issues = r;
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
// @__NO_SIDE_EFFECTS__
|
|
203
|
+
function ue(r) {
|
|
204
|
+
return {
|
|
205
|
+
kind: "transformation",
|
|
206
|
+
type: "args",
|
|
207
|
+
reference: ue,
|
|
208
|
+
async: !1,
|
|
209
|
+
schema: r,
|
|
210
|
+
"~run"(n, e) {
|
|
211
|
+
const i = n.value;
|
|
212
|
+
return n.value = (...s) => {
|
|
213
|
+
const u = this.schema["~run"]({ value: s }, e);
|
|
214
|
+
if (u.issues) throw new x(u.issues);
|
|
215
|
+
return i(...u.value);
|
|
216
|
+
}, n;
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
// @__NO_SIDE_EFFECTS__
|
|
221
|
+
function le(r) {
|
|
222
|
+
return {
|
|
223
|
+
kind: "transformation",
|
|
224
|
+
type: "args",
|
|
225
|
+
reference: le,
|
|
226
|
+
async: !1,
|
|
227
|
+
schema: r,
|
|
228
|
+
"~run"(n, e) {
|
|
229
|
+
const i = n.value;
|
|
230
|
+
return n.value = async (...s) => {
|
|
231
|
+
const u = await r["~run"]({ value: s }, e);
|
|
232
|
+
if (u.issues) throw new x(u.issues);
|
|
233
|
+
return i(...u.value);
|
|
234
|
+
}, n;
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
// @__NO_SIDE_EFFECTS__
|
|
239
|
+
function oe() {
|
|
240
|
+
return {
|
|
241
|
+
kind: "transformation",
|
|
242
|
+
type: "await",
|
|
243
|
+
reference: oe,
|
|
244
|
+
async: !0,
|
|
245
|
+
async "~run"(r) {
|
|
246
|
+
return r.value = await r.value, r;
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
const ce = /^(?:[\da-z+/]{4})*(?:[\da-z+/]{2}==|[\da-z+/]{3}=)?$/iu, fe = /^[A-Z]{6}(?!00)[\dA-Z]{2}(?:[\dA-Z]{3})?$/u, pe = /^[a-z][\da-z]*$/u, ae = /^[+-]?(?:\d*\.)?\d+$/u, ye = /^\d+$/u, he = /^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu, ve = /^(?:[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|(?![\p{Emoji_Modifier_Base}\u{1F1E6}-\u{1F1FF}])\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|(?![\p{Emoji_Modifier_Base}\u{1F1E6}-\u{1F1FF}])\p{Emoji_Presentation}))*)+$/u, me = /^(?:0[hx])?[\da-fA-F]+$/u, ge = /^#(?:[\da-fA-F]{3,4}|[\da-fA-F]{6}|[\da-fA-F]{8})$/u, de = /^\d{15}$|^\d{2}-\d{6}-\d{6}-\d$/u, ke = /^(?:(?:[1-9]|1\d|2[0-4])?\d|25[0-5])(?:\.(?:(?:[1-9]|1\d|2[0-4])?\d|25[0-5])){3}$/u, be = /^(?:(?:[\da-f]{1,4}:){7}[\da-f]{1,4}|(?:[\da-f]{1,4}:){1,7}:|(?:[\da-f]{1,4}:){1,6}:[\da-f]{1,4}|(?:[\da-f]{1,4}:){1,5}(?::[\da-f]{1,4}){1,2}|(?:[\da-f]{1,4}:){1,4}(?::[\da-f]{1,4}){1,3}|(?:[\da-f]{1,4}:){1,3}(?::[\da-f]{1,4}){1,4}|(?:[\da-f]{1,4}:){1,2}(?::[\da-f]{1,4}){1,5}|[\da-f]{1,4}:(?::[\da-f]{1,4}){1,6}|:(?:(?::[\da-f]{1,4}){1,7}|:)|fe80:(?::[\da-f]{0,4}){0,4}%[\da-z]+|::(?:f{4}(?::0{1,4})?:)?(?:(?:25[0-5]|(?:2[0-4]|1?\d)?\d)\.){3}(?:25[0-5]|(?:2[0-4]|1?\d)?\d)|(?:[\da-f]{1,4}:){1,4}:(?:(?:25[0-5]|(?:2[0-4]|1?\d)?\d)\.){3}(?:25[0-5]|(?:2[0-4]|1?\d)?\d))$/iu, Ee = /^(?:(?:[1-9]|1\d|2[0-4])?\d|25[0-5])(?:\.(?:(?:[1-9]|1\d|2[0-4])?\d|25[0-5])){3}$|^(?:(?:[\da-f]{1,4}:){7}[\da-f]{1,4}|(?:[\da-f]{1,4}:){1,7}:|(?:[\da-f]{1,4}:){1,6}:[\da-f]{1,4}|(?:[\da-f]{1,4}:){1,5}(?::[\da-f]{1,4}){1,2}|(?:[\da-f]{1,4}:){1,4}(?::[\da-f]{1,4}){1,3}|(?:[\da-f]{1,4}:){1,3}(?::[\da-f]{1,4}){1,4}|(?:[\da-f]{1,4}:){1,2}(?::[\da-f]{1,4}){1,5}|[\da-f]{1,4}:(?::[\da-f]{1,4}){1,6}|:(?:(?::[\da-f]{1,4}){1,7}|:)|fe80:(?::[\da-f]{0,4}){0,4}%[\da-z]+|::(?:f{4}(?::0{1,4})?:)?(?:(?:25[0-5]|(?:2[0-4]|1?\d)?\d)\.){3}(?:25[0-5]|(?:2[0-4]|1?\d)?\d)|(?:[\da-f]{1,4}:){1,4}:(?:(?:25[0-5]|(?:2[0-4]|1?\d)?\d)\.){3}(?:25[0-5]|(?:2[0-4]|1?\d)?\d))$/iu, xe = /^\d{4}-(?:0[1-9]|1[0-2])-(?:[12]\d|0[1-9]|3[01])$/u, _e = /^\d{4}-(?:0[1-9]|1[0-2])-(?:[12]\d|0[1-9]|3[01])[T ](?:0\d|1\d|2[0-3]):[0-5]\d$/u, Ae = /^(?:0\d|1\d|2[0-3]):[0-5]\d$/u, we = /^(?:0\d|1\d|2[0-3])(?::[0-5]\d){2}$/u, Ie = /^\d{4}-(?:0[1-9]|1[0-2])-(?:[12]\d|0[1-9]|3[01])[T ](?:0\d|1\d|2[0-3])(?::[0-5]\d){2}(?:\.\d{1,9})?(?:Z|[+-](?:0\d|1\d|2[0-3])(?::?[0-5]\d)?)$/u, De = /^\d{4}-W(?:0[1-9]|[1-4]\d|5[0-3])$/u, je = /^(?:[\da-f]{2}:){5}[\da-f]{2}$|^(?:[\da-f]{2}-){5}[\da-f]{2}$|^(?:[\da-f]{4}\.){2}[\da-f]{4}$/iu, Oe = /^(?:[\da-f]{2}:){7}[\da-f]{2}$|^(?:[\da-f]{2}-){7}[\da-f]{2}$|^(?:[\da-f]{4}\.){3}[\da-f]{4}$|^(?:[\da-f]{4}:){3}[\da-f]{4}$/iu, Ge = /^(?:[\da-f]{2}:){5}[\da-f]{2}$|^(?:[\da-f]{2}-){5}[\da-f]{2}$|^(?:[\da-f]{4}\.){2}[\da-f]{4}$|^(?:[\da-f]{2}:){7}[\da-f]{2}$|^(?:[\da-f]{2}-){7}[\da-f]{2}$|^(?:[\da-f]{4}\.){3}[\da-f]{4}$|^(?:[\da-f]{4}:){3}[\da-f]{4}$/iu, Re = /^[\w-]+$/u, qe = /^(?:0o)?[0-7]+$/u, Me = /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/, Se = /^[\da-z]+(?:[-_][\da-z]+)*$/u, Pe = /^[\da-hjkmnp-tv-zA-HJKMNP-TV-Z]{26}$/u, Xe = /^[\da-f]{8}(?:-[\da-f]{4}){3}-[\da-f]{12}$/iu;
|
|
251
|
+
// @__NO_SIDE_EFFECTS__
|
|
252
|
+
function Ne(r) {
|
|
253
|
+
return {
|
|
254
|
+
kind: "validation",
|
|
255
|
+
type: "base64",
|
|
256
|
+
reference: Ne,
|
|
257
|
+
async: !1,
|
|
258
|
+
expects: null,
|
|
259
|
+
requirement: ce,
|
|
260
|
+
message: r,
|
|
261
|
+
"~run"(n, e) {
|
|
262
|
+
return n.typed && !this.requirement.test(n.value) && f(this, "Base64", n, e), n;
|
|
263
|
+
}
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
// @__NO_SIDE_EFFECTS__
|
|
267
|
+
function Ce(r) {
|
|
268
|
+
return {
|
|
269
|
+
kind: "validation",
|
|
270
|
+
type: "bic",
|
|
271
|
+
reference: Ce,
|
|
272
|
+
async: !1,
|
|
273
|
+
expects: null,
|
|
274
|
+
requirement: fe,
|
|
275
|
+
message: r,
|
|
276
|
+
"~run"(n, e) {
|
|
277
|
+
return n.typed && !this.requirement.test(n.value) && f(this, "BIC", n, e), n;
|
|
278
|
+
}
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
// @__NO_SIDE_EFFECTS__
|
|
282
|
+
function ze(r) {
|
|
283
|
+
return {
|
|
284
|
+
kind: "transformation",
|
|
285
|
+
type: "brand",
|
|
286
|
+
reference: ze,
|
|
287
|
+
async: !1,
|
|
288
|
+
name: r,
|
|
289
|
+
"~run"(n) {
|
|
290
|
+
return n;
|
|
291
|
+
}
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
// @__NO_SIDE_EFFECTS__
|
|
295
|
+
function Te(r, n) {
|
|
296
|
+
return {
|
|
297
|
+
kind: "validation",
|
|
298
|
+
type: "bytes",
|
|
299
|
+
reference: Te,
|
|
300
|
+
async: !1,
|
|
301
|
+
expects: `${r}`,
|
|
302
|
+
requirement: r,
|
|
303
|
+
message: n,
|
|
304
|
+
"~run"(e, i) {
|
|
305
|
+
if (e.typed) {
|
|
306
|
+
const s = /* @__PURE__ */ R(e.value);
|
|
307
|
+
s !== this.requirement && f(this, "bytes", e, i, { received: `${s}` });
|
|
308
|
+
}
|
|
309
|
+
return e;
|
|
310
|
+
}
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
// @__NO_SIDE_EFFECTS__
|
|
314
|
+
function Fe(r, n) {
|
|
315
|
+
return {
|
|
316
|
+
kind: "validation",
|
|
317
|
+
type: "check",
|
|
318
|
+
reference: Fe,
|
|
319
|
+
async: !1,
|
|
320
|
+
expects: null,
|
|
321
|
+
requirement: r,
|
|
322
|
+
message: n,
|
|
323
|
+
"~run"(e, i) {
|
|
324
|
+
return e.typed && !this.requirement(e.value) && f(this, "input", e, i), e;
|
|
325
|
+
}
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
// @__NO_SIDE_EFFECTS__
|
|
329
|
+
function $e(r, n) {
|
|
330
|
+
return {
|
|
331
|
+
kind: "validation",
|
|
332
|
+
type: "check",
|
|
333
|
+
reference: $e,
|
|
334
|
+
async: !0,
|
|
335
|
+
expects: null,
|
|
336
|
+
requirement: r,
|
|
337
|
+
message: n,
|
|
338
|
+
async "~run"(e, i) {
|
|
339
|
+
return e.typed && !await this.requirement(e.value) && f(this, "input", e, i), e;
|
|
340
|
+
}
|
|
341
|
+
};
|
|
342
|
+
}
|
|
343
|
+
// @__NO_SIDE_EFFECTS__
|
|
344
|
+
function Ve(r, n) {
|
|
345
|
+
return {
|
|
346
|
+
kind: "validation",
|
|
347
|
+
type: "check_items",
|
|
348
|
+
reference: Ve,
|
|
349
|
+
async: !1,
|
|
350
|
+
expects: null,
|
|
351
|
+
requirement: r,
|
|
352
|
+
message: n,
|
|
353
|
+
"~run"(e, i) {
|
|
354
|
+
if (e.typed) for (let s = 0; s < e.value.length; s++) {
|
|
355
|
+
const u = e.value[s];
|
|
356
|
+
this.requirement(u, s, e.value) || f(this, "item", e, i, {
|
|
357
|
+
input: u,
|
|
358
|
+
path: [{
|
|
359
|
+
type: "array",
|
|
360
|
+
origin: "value",
|
|
361
|
+
input: e.value,
|
|
362
|
+
key: s,
|
|
363
|
+
value: u
|
|
364
|
+
}]
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
return e;
|
|
368
|
+
}
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
// @__NO_SIDE_EFFECTS__
|
|
372
|
+
function Le(r, n) {
|
|
373
|
+
return {
|
|
374
|
+
kind: "validation",
|
|
375
|
+
type: "check_items",
|
|
376
|
+
reference: Le,
|
|
377
|
+
async: !0,
|
|
378
|
+
expects: null,
|
|
379
|
+
requirement: r,
|
|
380
|
+
message: n,
|
|
381
|
+
async "~run"(e, i) {
|
|
382
|
+
if (e.typed) {
|
|
383
|
+
const s = await Promise.all(e.value.map(this.requirement));
|
|
384
|
+
for (let u = 0; u < e.value.length; u++) if (!s[u]) {
|
|
385
|
+
const l = e.value[u];
|
|
386
|
+
f(this, "item", e, i, {
|
|
387
|
+
input: l,
|
|
388
|
+
path: [{
|
|
389
|
+
type: "array",
|
|
390
|
+
origin: "value",
|
|
391
|
+
input: e.value,
|
|
392
|
+
key: u,
|
|
393
|
+
value: l
|
|
394
|
+
}]
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
return e;
|
|
399
|
+
}
|
|
400
|
+
};
|
|
401
|
+
}
|
|
402
|
+
const Es = /^(?:\d{14,19}|\d{4}(?: \d{3,6}){2,4}|\d{4}(?:-\d{3,6}){2,4})$/u, xs = /[- ]/gu, _s = [
|
|
403
|
+
/^3[47]\d{13}$/u,
|
|
404
|
+
/^3(?:0[0-5]|[68]\d)\d{11,13}$/u,
|
|
405
|
+
/^6(?:011|5\d{2})\d{12,15}$/u,
|
|
406
|
+
/^(?:2131|1800|35\d{3})\d{11}$/u,
|
|
407
|
+
/^5[1-5]\d{2}|(?:222\d|22[3-9]\d|2[3-6]\d{2}|27[01]\d|2720)\d{12}$/u,
|
|
408
|
+
/^(?:6[27]\d{14,17}|81\d{14,17})$/u,
|
|
409
|
+
/^4\d{12}(?:\d{3,6})?$/u
|
|
410
|
+
];
|
|
411
|
+
// @__NO_SIDE_EFFECTS__
|
|
412
|
+
function Je(r) {
|
|
413
|
+
return {
|
|
414
|
+
kind: "validation",
|
|
415
|
+
type: "credit_card",
|
|
416
|
+
reference: Je,
|
|
417
|
+
async: !1,
|
|
418
|
+
expects: null,
|
|
419
|
+
requirement(n) {
|
|
420
|
+
let e;
|
|
421
|
+
return Es.test(n) && (e = n.replace(xs, "")) && _s.some((i) => i.test(e)) && /* @__PURE__ */ F(e);
|
|
422
|
+
},
|
|
423
|
+
message: r,
|
|
424
|
+
"~run"(n, e) {
|
|
425
|
+
return n.typed && !this.requirement(n.value) && f(this, "credit card", n, e), n;
|
|
426
|
+
}
|
|
427
|
+
};
|
|
428
|
+
}
|
|
429
|
+
// @__NO_SIDE_EFFECTS__
|
|
430
|
+
function We(r) {
|
|
431
|
+
return {
|
|
432
|
+
kind: "validation",
|
|
433
|
+
type: "cuid2",
|
|
434
|
+
reference: We,
|
|
435
|
+
async: !1,
|
|
436
|
+
expects: null,
|
|
437
|
+
requirement: pe,
|
|
438
|
+
message: r,
|
|
439
|
+
"~run"(n, e) {
|
|
440
|
+
return n.typed && !this.requirement.test(n.value) && f(this, "Cuid2", n, e), n;
|
|
441
|
+
}
|
|
442
|
+
};
|
|
443
|
+
}
|
|
444
|
+
// @__NO_SIDE_EFFECTS__
|
|
445
|
+
function Be(r) {
|
|
446
|
+
return {
|
|
447
|
+
kind: "validation",
|
|
448
|
+
type: "decimal",
|
|
449
|
+
reference: Be,
|
|
450
|
+
async: !1,
|
|
451
|
+
expects: null,
|
|
452
|
+
requirement: ae,
|
|
453
|
+
message: r,
|
|
454
|
+
"~run"(n, e) {
|
|
455
|
+
return n.typed && !this.requirement.test(n.value) && f(this, "decimal", n, e), n;
|
|
456
|
+
}
|
|
457
|
+
};
|
|
458
|
+
}
|
|
459
|
+
// @__NO_SIDE_EFFECTS__
|
|
460
|
+
function Ue(r) {
|
|
461
|
+
return {
|
|
462
|
+
kind: "metadata",
|
|
463
|
+
type: "description",
|
|
464
|
+
reference: Ue,
|
|
465
|
+
description: r
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
// @__NO_SIDE_EFFECTS__
|
|
469
|
+
function Ze(r) {
|
|
470
|
+
return {
|
|
471
|
+
kind: "validation",
|
|
472
|
+
type: "digits",
|
|
473
|
+
reference: Ze,
|
|
474
|
+
async: !1,
|
|
475
|
+
expects: null,
|
|
476
|
+
requirement: ye,
|
|
477
|
+
message: r,
|
|
478
|
+
"~run"(n, e) {
|
|
479
|
+
return n.typed && !this.requirement.test(n.value) && f(this, "digits", n, e), n;
|
|
480
|
+
}
|
|
481
|
+
};
|
|
482
|
+
}
|
|
483
|
+
// @__NO_SIDE_EFFECTS__
|
|
484
|
+
function Ke(r) {
|
|
485
|
+
return {
|
|
486
|
+
kind: "validation",
|
|
487
|
+
type: "email",
|
|
488
|
+
reference: Ke,
|
|
489
|
+
expects: null,
|
|
490
|
+
async: !1,
|
|
491
|
+
requirement: he,
|
|
492
|
+
message: r,
|
|
493
|
+
"~run"(n, e) {
|
|
494
|
+
return n.typed && !this.requirement.test(n.value) && f(this, "email", n, e), n;
|
|
495
|
+
}
|
|
496
|
+
};
|
|
497
|
+
}
|
|
498
|
+
// @__NO_SIDE_EFFECTS__
|
|
499
|
+
function He(r) {
|
|
500
|
+
return {
|
|
501
|
+
kind: "validation",
|
|
502
|
+
type: "emoji",
|
|
503
|
+
reference: He,
|
|
504
|
+
async: !1,
|
|
505
|
+
expects: null,
|
|
506
|
+
requirement: ve,
|
|
507
|
+
message: r,
|
|
508
|
+
"~run"(n, e) {
|
|
509
|
+
return n.typed && !this.requirement.test(n.value) && f(this, "emoji", n, e), n;
|
|
510
|
+
}
|
|
511
|
+
};
|
|
512
|
+
}
|
|
513
|
+
// @__NO_SIDE_EFFECTS__
|
|
514
|
+
function Qe(r) {
|
|
515
|
+
return {
|
|
516
|
+
kind: "validation",
|
|
517
|
+
type: "empty",
|
|
518
|
+
reference: Qe,
|
|
519
|
+
async: !1,
|
|
520
|
+
expects: "0",
|
|
521
|
+
message: r,
|
|
522
|
+
"~run"(n, e) {
|
|
523
|
+
return n.typed && n.value.length > 0 && f(this, "length", n, e, { received: `${n.value.length}` }), n;
|
|
524
|
+
}
|
|
525
|
+
};
|
|
526
|
+
}
|
|
527
|
+
// @__NO_SIDE_EFFECTS__
|
|
528
|
+
function Ye(r, n) {
|
|
529
|
+
return {
|
|
530
|
+
kind: "validation",
|
|
531
|
+
type: "ends_with",
|
|
532
|
+
reference: Ye,
|
|
533
|
+
async: !1,
|
|
534
|
+
expects: `"${r}"`,
|
|
535
|
+
requirement: r,
|
|
536
|
+
message: n,
|
|
537
|
+
"~run"(e, i) {
|
|
538
|
+
return e.typed && !e.value.endsWith(this.requirement) && f(this, "end", e, i, { received: `"${e.value.slice(-this.requirement.length)}"` }), e;
|
|
539
|
+
}
|
|
540
|
+
};
|
|
541
|
+
}
|
|
542
|
+
// @__NO_SIDE_EFFECTS__
|
|
543
|
+
function en(r, n) {
|
|
544
|
+
return {
|
|
545
|
+
kind: "validation",
|
|
546
|
+
type: "entries",
|
|
547
|
+
reference: en,
|
|
548
|
+
async: !1,
|
|
549
|
+
expects: `${r}`,
|
|
550
|
+
requirement: r,
|
|
551
|
+
message: n,
|
|
552
|
+
"~run"(e, i) {
|
|
553
|
+
if (!e.typed) return e;
|
|
554
|
+
const s = Object.keys(e.value).length;
|
|
555
|
+
return e.typed && s !== this.requirement && f(this, "entries", e, i, { received: `${s}` }), e;
|
|
556
|
+
}
|
|
557
|
+
};
|
|
558
|
+
}
|
|
559
|
+
// @__NO_SIDE_EFFECTS__
|
|
560
|
+
function nn(r, n) {
|
|
561
|
+
return {
|
|
562
|
+
kind: "validation",
|
|
563
|
+
type: "every_item",
|
|
564
|
+
reference: nn,
|
|
565
|
+
async: !1,
|
|
566
|
+
expects: null,
|
|
567
|
+
requirement: r,
|
|
568
|
+
message: n,
|
|
569
|
+
"~run"(e, i) {
|
|
570
|
+
return e.typed && !e.value.every(this.requirement) && f(this, "item", e, i), e;
|
|
571
|
+
}
|
|
572
|
+
};
|
|
573
|
+
}
|
|
574
|
+
// @__NO_SIDE_EFFECTS__
|
|
575
|
+
function rn(r) {
|
|
576
|
+
return {
|
|
577
|
+
kind: "metadata",
|
|
578
|
+
type: "examples",
|
|
579
|
+
reference: rn,
|
|
580
|
+
examples: r
|
|
581
|
+
};
|
|
582
|
+
}
|
|
583
|
+
// @__NO_SIDE_EFFECTS__
|
|
584
|
+
function sn(r, n) {
|
|
585
|
+
const e = /* @__PURE__ */ m(r);
|
|
586
|
+
return {
|
|
587
|
+
kind: "validation",
|
|
588
|
+
type: "excludes",
|
|
589
|
+
reference: sn,
|
|
590
|
+
async: !1,
|
|
591
|
+
expects: `!${e}`,
|
|
592
|
+
requirement: r,
|
|
593
|
+
message: n,
|
|
594
|
+
"~run"(i, s) {
|
|
595
|
+
return i.typed && i.value.includes(this.requirement) && f(this, "content", i, s, { received: e }), i;
|
|
596
|
+
}
|
|
597
|
+
};
|
|
598
|
+
}
|
|
599
|
+
// @__NO_SIDE_EFFECTS__
|
|
600
|
+
function tn(r) {
|
|
601
|
+
return {
|
|
602
|
+
kind: "transformation",
|
|
603
|
+
type: "filter_items",
|
|
604
|
+
reference: tn,
|
|
605
|
+
async: !1,
|
|
606
|
+
operation: r,
|
|
607
|
+
"~run"(n) {
|
|
608
|
+
return n.value = n.value.filter(this.operation), n;
|
|
609
|
+
}
|
|
610
|
+
};
|
|
611
|
+
}
|
|
612
|
+
// @__NO_SIDE_EFFECTS__
|
|
613
|
+
function un(r) {
|
|
614
|
+
return {
|
|
615
|
+
kind: "transformation",
|
|
616
|
+
type: "find_item",
|
|
617
|
+
reference: un,
|
|
618
|
+
async: !1,
|
|
619
|
+
operation: r,
|
|
620
|
+
"~run"(n) {
|
|
621
|
+
return n.value = n.value.find(this.operation), n;
|
|
622
|
+
}
|
|
623
|
+
};
|
|
624
|
+
}
|
|
625
|
+
// @__NO_SIDE_EFFECTS__
|
|
626
|
+
function ln(r) {
|
|
627
|
+
return {
|
|
628
|
+
kind: "validation",
|
|
629
|
+
type: "finite",
|
|
630
|
+
reference: ln,
|
|
631
|
+
async: !1,
|
|
632
|
+
expects: null,
|
|
633
|
+
requirement: Number.isFinite,
|
|
634
|
+
message: r,
|
|
635
|
+
"~run"(n, e) {
|
|
636
|
+
return n.typed && !this.requirement(n.value) && f(this, "finite", n, e), n;
|
|
637
|
+
}
|
|
638
|
+
};
|
|
639
|
+
}
|
|
640
|
+
// @__NO_SIDE_EFFECTS__
|
|
641
|
+
function on(r) {
|
|
642
|
+
return {
|
|
643
|
+
kind: "transformation",
|
|
644
|
+
type: "flavor",
|
|
645
|
+
reference: on,
|
|
646
|
+
async: !1,
|
|
647
|
+
name: r,
|
|
648
|
+
"~run"(n) {
|
|
649
|
+
return n;
|
|
650
|
+
}
|
|
651
|
+
};
|
|
652
|
+
}
|
|
653
|
+
// @__NO_SIDE_EFFECTS__
|
|
654
|
+
function cn(r, n) {
|
|
655
|
+
return {
|
|
656
|
+
kind: "validation",
|
|
657
|
+
type: "graphemes",
|
|
658
|
+
reference: cn,
|
|
659
|
+
async: !1,
|
|
660
|
+
expects: `${r}`,
|
|
661
|
+
requirement: r,
|
|
662
|
+
message: n,
|
|
663
|
+
"~run"(e, i) {
|
|
664
|
+
if (e.typed) {
|
|
665
|
+
const s = /* @__PURE__ */ q(e.value);
|
|
666
|
+
s !== this.requirement && f(this, "graphemes", e, i, { received: `${s}` });
|
|
667
|
+
}
|
|
668
|
+
return e;
|
|
669
|
+
}
|
|
670
|
+
};
|
|
671
|
+
}
|
|
672
|
+
// @__NO_SIDE_EFFECTS__
|
|
673
|
+
function fn(r, n) {
|
|
674
|
+
return {
|
|
675
|
+
kind: "validation",
|
|
676
|
+
type: "gt_value",
|
|
677
|
+
reference: fn,
|
|
678
|
+
async: !1,
|
|
679
|
+
expects: `>${r instanceof Date ? r.toJSON() : /* @__PURE__ */ m(r)}`,
|
|
680
|
+
requirement: r,
|
|
681
|
+
message: n,
|
|
682
|
+
"~run"(e, i) {
|
|
683
|
+
return e.typed && !(e.value > this.requirement) && f(this, "value", e, i, { received: e.value instanceof Date ? e.value.toJSON() : /* @__PURE__ */ m(e.value) }), e;
|
|
684
|
+
}
|
|
685
|
+
};
|
|
686
|
+
}
|
|
687
|
+
const As = {
|
|
688
|
+
md4: 32,
|
|
689
|
+
md5: 32,
|
|
690
|
+
sha1: 40,
|
|
691
|
+
sha256: 64,
|
|
692
|
+
sha384: 96,
|
|
693
|
+
sha512: 128,
|
|
694
|
+
ripemd128: 32,
|
|
695
|
+
ripemd160: 40,
|
|
696
|
+
tiger128: 32,
|
|
697
|
+
tiger160: 40,
|
|
698
|
+
tiger192: 48,
|
|
699
|
+
crc32: 8,
|
|
700
|
+
crc32b: 8,
|
|
701
|
+
adler32: 8
|
|
702
|
+
};
|
|
703
|
+
// @__NO_SIDE_EFFECTS__
|
|
704
|
+
function pn(r, n) {
|
|
705
|
+
return {
|
|
706
|
+
kind: "validation",
|
|
707
|
+
type: "hash",
|
|
708
|
+
reference: pn,
|
|
709
|
+
expects: null,
|
|
710
|
+
async: !1,
|
|
711
|
+
requirement: RegExp(r.map((e) => `^[a-f0-9]{${As[e]}}$`).join("|"), "iu"),
|
|
712
|
+
message: n,
|
|
713
|
+
"~run"(e, i) {
|
|
714
|
+
return e.typed && !this.requirement.test(e.value) && f(this, "hash", e, i), e;
|
|
715
|
+
}
|
|
716
|
+
};
|
|
717
|
+
}
|
|
718
|
+
// @__NO_SIDE_EFFECTS__
|
|
719
|
+
function an(r) {
|
|
720
|
+
return {
|
|
721
|
+
kind: "validation",
|
|
722
|
+
type: "hexadecimal",
|
|
723
|
+
reference: an,
|
|
724
|
+
async: !1,
|
|
725
|
+
expects: null,
|
|
726
|
+
requirement: me,
|
|
727
|
+
message: r,
|
|
728
|
+
"~run"(n, e) {
|
|
729
|
+
return n.typed && !this.requirement.test(n.value) && f(this, "hexadecimal", n, e), n;
|
|
730
|
+
}
|
|
731
|
+
};
|
|
732
|
+
}
|
|
733
|
+
// @__NO_SIDE_EFFECTS__
|
|
734
|
+
function yn(r) {
|
|
735
|
+
return {
|
|
736
|
+
kind: "validation",
|
|
737
|
+
type: "hex_color",
|
|
738
|
+
reference: yn,
|
|
739
|
+
async: !1,
|
|
740
|
+
expects: null,
|
|
741
|
+
requirement: ge,
|
|
742
|
+
message: r,
|
|
743
|
+
"~run"(n, e) {
|
|
744
|
+
return n.typed && !this.requirement.test(n.value) && f(this, "hex color", n, e), n;
|
|
745
|
+
}
|
|
746
|
+
};
|
|
747
|
+
}
|
|
748
|
+
// @__NO_SIDE_EFFECTS__
|
|
749
|
+
function hn(r) {
|
|
750
|
+
return {
|
|
751
|
+
kind: "validation",
|
|
752
|
+
type: "imei",
|
|
753
|
+
reference: hn,
|
|
754
|
+
async: !1,
|
|
755
|
+
expects: null,
|
|
756
|
+
requirement(n) {
|
|
757
|
+
return de.test(n) && /* @__PURE__ */ F(n);
|
|
758
|
+
},
|
|
759
|
+
message: r,
|
|
760
|
+
"~run"(n, e) {
|
|
761
|
+
return n.typed && !this.requirement(n.value) && f(this, "IMEI", n, e), n;
|
|
762
|
+
}
|
|
763
|
+
};
|
|
764
|
+
}
|
|
765
|
+
// @__NO_SIDE_EFFECTS__
|
|
766
|
+
function vn(r, n) {
|
|
767
|
+
const e = /* @__PURE__ */ m(r);
|
|
768
|
+
return {
|
|
769
|
+
kind: "validation",
|
|
770
|
+
type: "includes",
|
|
771
|
+
reference: vn,
|
|
772
|
+
async: !1,
|
|
773
|
+
expects: e,
|
|
774
|
+
requirement: r,
|
|
775
|
+
message: n,
|
|
776
|
+
"~run"(i, s) {
|
|
777
|
+
return i.typed && !i.value.includes(this.requirement) && f(this, "content", i, s, { received: `!${e}` }), i;
|
|
778
|
+
}
|
|
779
|
+
};
|
|
780
|
+
}
|
|
781
|
+
// @__NO_SIDE_EFFECTS__
|
|
782
|
+
function mn(r) {
|
|
783
|
+
return {
|
|
784
|
+
kind: "validation",
|
|
785
|
+
type: "integer",
|
|
786
|
+
reference: mn,
|
|
787
|
+
async: !1,
|
|
788
|
+
expects: null,
|
|
789
|
+
requirement: Number.isInteger,
|
|
790
|
+
message: r,
|
|
791
|
+
"~run"(n, e) {
|
|
792
|
+
return n.typed && !this.requirement(n.value) && f(this, "integer", n, e), n;
|
|
793
|
+
}
|
|
794
|
+
};
|
|
795
|
+
}
|
|
796
|
+
// @__NO_SIDE_EFFECTS__
|
|
797
|
+
function gn(r) {
|
|
798
|
+
return {
|
|
799
|
+
kind: "validation",
|
|
800
|
+
type: "ip",
|
|
801
|
+
reference: gn,
|
|
802
|
+
async: !1,
|
|
803
|
+
expects: null,
|
|
804
|
+
requirement: Ee,
|
|
805
|
+
message: r,
|
|
806
|
+
"~run"(n, e) {
|
|
807
|
+
return n.typed && !this.requirement.test(n.value) && f(this, "IP", n, e), n;
|
|
808
|
+
}
|
|
809
|
+
};
|
|
810
|
+
}
|
|
811
|
+
// @__NO_SIDE_EFFECTS__
|
|
812
|
+
function dn(r) {
|
|
813
|
+
return {
|
|
814
|
+
kind: "validation",
|
|
815
|
+
type: "ipv4",
|
|
816
|
+
reference: dn,
|
|
817
|
+
async: !1,
|
|
818
|
+
expects: null,
|
|
819
|
+
requirement: ke,
|
|
820
|
+
message: r,
|
|
821
|
+
"~run"(n, e) {
|
|
822
|
+
return n.typed && !this.requirement.test(n.value) && f(this, "IPv4", n, e), n;
|
|
823
|
+
}
|
|
824
|
+
};
|
|
825
|
+
}
|
|
826
|
+
// @__NO_SIDE_EFFECTS__
|
|
827
|
+
function kn(r) {
|
|
828
|
+
return {
|
|
829
|
+
kind: "validation",
|
|
830
|
+
type: "ipv6",
|
|
831
|
+
reference: kn,
|
|
832
|
+
async: !1,
|
|
833
|
+
expects: null,
|
|
834
|
+
requirement: be,
|
|
835
|
+
message: r,
|
|
836
|
+
"~run"(n, e) {
|
|
837
|
+
return n.typed && !this.requirement.test(n.value) && f(this, "IPv6", n, e), n;
|
|
838
|
+
}
|
|
839
|
+
};
|
|
840
|
+
}
|
|
841
|
+
// @__NO_SIDE_EFFECTS__
|
|
842
|
+
function bn(r) {
|
|
843
|
+
return {
|
|
844
|
+
kind: "validation",
|
|
845
|
+
type: "iso_date",
|
|
846
|
+
reference: bn,
|
|
847
|
+
async: !1,
|
|
848
|
+
expects: null,
|
|
849
|
+
requirement: xe,
|
|
850
|
+
message: r,
|
|
851
|
+
"~run"(n, e) {
|
|
852
|
+
return n.typed && !this.requirement.test(n.value) && f(this, "date", n, e), n;
|
|
853
|
+
}
|
|
854
|
+
};
|
|
855
|
+
}
|
|
856
|
+
// @__NO_SIDE_EFFECTS__
|
|
857
|
+
function En(r) {
|
|
858
|
+
return {
|
|
859
|
+
kind: "validation",
|
|
860
|
+
type: "iso_date_time",
|
|
861
|
+
reference: En,
|
|
862
|
+
async: !1,
|
|
863
|
+
expects: null,
|
|
864
|
+
requirement: _e,
|
|
865
|
+
message: r,
|
|
866
|
+
"~run"(n, e) {
|
|
867
|
+
return n.typed && !this.requirement.test(n.value) && f(this, "date-time", n, e), n;
|
|
868
|
+
}
|
|
869
|
+
};
|
|
870
|
+
}
|
|
871
|
+
// @__NO_SIDE_EFFECTS__
|
|
872
|
+
function xn(r) {
|
|
873
|
+
return {
|
|
874
|
+
kind: "validation",
|
|
875
|
+
type: "iso_time",
|
|
876
|
+
reference: xn,
|
|
877
|
+
async: !1,
|
|
878
|
+
expects: null,
|
|
879
|
+
requirement: Ae,
|
|
880
|
+
message: r,
|
|
881
|
+
"~run"(n, e) {
|
|
882
|
+
return n.typed && !this.requirement.test(n.value) && f(this, "time", n, e), n;
|
|
883
|
+
}
|
|
884
|
+
};
|
|
885
|
+
}
|
|
886
|
+
// @__NO_SIDE_EFFECTS__
|
|
887
|
+
function _n(r) {
|
|
888
|
+
return {
|
|
889
|
+
kind: "validation",
|
|
890
|
+
type: "iso_time_second",
|
|
891
|
+
reference: _n,
|
|
892
|
+
async: !1,
|
|
893
|
+
expects: null,
|
|
894
|
+
requirement: we,
|
|
895
|
+
message: r,
|
|
896
|
+
"~run"(n, e) {
|
|
897
|
+
return n.typed && !this.requirement.test(n.value) && f(this, "time-second", n, e), n;
|
|
898
|
+
}
|
|
899
|
+
};
|
|
900
|
+
}
|
|
901
|
+
// @__NO_SIDE_EFFECTS__
|
|
902
|
+
function An(r) {
|
|
903
|
+
return {
|
|
904
|
+
kind: "validation",
|
|
905
|
+
type: "iso_timestamp",
|
|
906
|
+
reference: An,
|
|
907
|
+
async: !1,
|
|
908
|
+
expects: null,
|
|
909
|
+
requirement: Ie,
|
|
910
|
+
message: r,
|
|
911
|
+
"~run"(n, e) {
|
|
912
|
+
return n.typed && !this.requirement.test(n.value) && f(this, "timestamp", n, e), n;
|
|
913
|
+
}
|
|
914
|
+
};
|
|
915
|
+
}
|
|
916
|
+
// @__NO_SIDE_EFFECTS__
|
|
917
|
+
function wn(r) {
|
|
918
|
+
return {
|
|
919
|
+
kind: "validation",
|
|
920
|
+
type: "iso_week",
|
|
921
|
+
reference: wn,
|
|
922
|
+
async: !1,
|
|
923
|
+
expects: null,
|
|
924
|
+
requirement: De,
|
|
925
|
+
message: r,
|
|
926
|
+
"~run"(n, e) {
|
|
927
|
+
return n.typed && !this.requirement.test(n.value) && f(this, "week", n, e), n;
|
|
928
|
+
}
|
|
929
|
+
};
|
|
930
|
+
}
|
|
931
|
+
// @__NO_SIDE_EFFECTS__
|
|
932
|
+
function In(r, n) {
|
|
933
|
+
return {
|
|
934
|
+
kind: "validation",
|
|
935
|
+
type: "length",
|
|
936
|
+
reference: In,
|
|
937
|
+
async: !1,
|
|
938
|
+
expects: `${r}`,
|
|
939
|
+
requirement: r,
|
|
940
|
+
message: n,
|
|
941
|
+
"~run"(e, i) {
|
|
942
|
+
return e.typed && e.value.length !== this.requirement && f(this, "length", e, i, { received: `${e.value.length}` }), e;
|
|
943
|
+
}
|
|
944
|
+
};
|
|
945
|
+
}
|
|
946
|
+
// @__NO_SIDE_EFFECTS__
|
|
947
|
+
function Dn(r, n) {
|
|
948
|
+
return {
|
|
949
|
+
kind: "validation",
|
|
950
|
+
type: "lt_value",
|
|
951
|
+
reference: Dn,
|
|
952
|
+
async: !1,
|
|
953
|
+
expects: `<${r instanceof Date ? r.toJSON() : /* @__PURE__ */ m(r)}`,
|
|
954
|
+
requirement: r,
|
|
955
|
+
message: n,
|
|
956
|
+
"~run"(e, i) {
|
|
957
|
+
return e.typed && !(e.value < this.requirement) && f(this, "value", e, i, { received: e.value instanceof Date ? e.value.toJSON() : /* @__PURE__ */ m(e.value) }), e;
|
|
958
|
+
}
|
|
959
|
+
};
|
|
960
|
+
}
|
|
961
|
+
// @__NO_SIDE_EFFECTS__
|
|
962
|
+
function jn(r) {
|
|
963
|
+
return {
|
|
964
|
+
kind: "validation",
|
|
965
|
+
type: "mac",
|
|
966
|
+
reference: jn,
|
|
967
|
+
async: !1,
|
|
968
|
+
expects: null,
|
|
969
|
+
requirement: Ge,
|
|
970
|
+
message: r,
|
|
971
|
+
"~run"(n, e) {
|
|
972
|
+
return n.typed && !this.requirement.test(n.value) && f(this, "MAC", n, e), n;
|
|
973
|
+
}
|
|
974
|
+
};
|
|
975
|
+
}
|
|
976
|
+
// @__NO_SIDE_EFFECTS__
|
|
977
|
+
function On(r) {
|
|
978
|
+
return {
|
|
979
|
+
kind: "validation",
|
|
980
|
+
type: "mac48",
|
|
981
|
+
reference: On,
|
|
982
|
+
async: !1,
|
|
983
|
+
expects: null,
|
|
984
|
+
requirement: je,
|
|
985
|
+
message: r,
|
|
986
|
+
"~run"(n, e) {
|
|
987
|
+
return n.typed && !this.requirement.test(n.value) && f(this, "48-bit MAC", n, e), n;
|
|
988
|
+
}
|
|
989
|
+
};
|
|
990
|
+
}
|
|
991
|
+
// @__NO_SIDE_EFFECTS__
|
|
992
|
+
function Gn(r) {
|
|
993
|
+
return {
|
|
994
|
+
kind: "validation",
|
|
995
|
+
type: "mac64",
|
|
996
|
+
reference: Gn,
|
|
997
|
+
async: !1,
|
|
998
|
+
expects: null,
|
|
999
|
+
requirement: Oe,
|
|
1000
|
+
message: r,
|
|
1001
|
+
"~run"(n, e) {
|
|
1002
|
+
return n.typed && !this.requirement.test(n.value) && f(this, "64-bit MAC", n, e), n;
|
|
1003
|
+
}
|
|
1004
|
+
};
|
|
1005
|
+
}
|
|
1006
|
+
// @__NO_SIDE_EFFECTS__
|
|
1007
|
+
function Rn(r) {
|
|
1008
|
+
return {
|
|
1009
|
+
kind: "transformation",
|
|
1010
|
+
type: "map_items",
|
|
1011
|
+
reference: Rn,
|
|
1012
|
+
async: !1,
|
|
1013
|
+
operation: r,
|
|
1014
|
+
"~run"(n) {
|
|
1015
|
+
return n.value = n.value.map(this.operation), n;
|
|
1016
|
+
}
|
|
1017
|
+
};
|
|
1018
|
+
}
|
|
1019
|
+
// @__NO_SIDE_EFFECTS__
|
|
1020
|
+
function qn(r, n) {
|
|
1021
|
+
return {
|
|
1022
|
+
kind: "validation",
|
|
1023
|
+
type: "max_bytes",
|
|
1024
|
+
reference: qn,
|
|
1025
|
+
async: !1,
|
|
1026
|
+
expects: `<=${r}`,
|
|
1027
|
+
requirement: r,
|
|
1028
|
+
message: n,
|
|
1029
|
+
"~run"(e, i) {
|
|
1030
|
+
if (e.typed) {
|
|
1031
|
+
const s = /* @__PURE__ */ R(e.value);
|
|
1032
|
+
s > this.requirement && f(this, "bytes", e, i, { received: `${s}` });
|
|
1033
|
+
}
|
|
1034
|
+
return e;
|
|
1035
|
+
}
|
|
1036
|
+
};
|
|
1037
|
+
}
|
|
1038
|
+
// @__NO_SIDE_EFFECTS__
|
|
1039
|
+
function Mn(r, n) {
|
|
1040
|
+
return {
|
|
1041
|
+
kind: "validation",
|
|
1042
|
+
type: "max_entries",
|
|
1043
|
+
reference: Mn,
|
|
1044
|
+
async: !1,
|
|
1045
|
+
expects: `<=${r}`,
|
|
1046
|
+
requirement: r,
|
|
1047
|
+
message: n,
|
|
1048
|
+
"~run"(e, i) {
|
|
1049
|
+
if (!e.typed) return e;
|
|
1050
|
+
const s = Object.keys(e.value).length;
|
|
1051
|
+
return e.typed && s > this.requirement && f(this, "entries", e, i, { received: `${s}` }), e;
|
|
1052
|
+
}
|
|
1053
|
+
};
|
|
1054
|
+
}
|
|
1055
|
+
// @__NO_SIDE_EFFECTS__
|
|
1056
|
+
function Sn(r, n) {
|
|
1057
|
+
return {
|
|
1058
|
+
kind: "validation",
|
|
1059
|
+
type: "max_graphemes",
|
|
1060
|
+
reference: Sn,
|
|
1061
|
+
async: !1,
|
|
1062
|
+
expects: `<=${r}`,
|
|
1063
|
+
requirement: r,
|
|
1064
|
+
message: n,
|
|
1065
|
+
"~run"(e, i) {
|
|
1066
|
+
if (e.typed) {
|
|
1067
|
+
const s = /* @__PURE__ */ q(e.value);
|
|
1068
|
+
s > this.requirement && f(this, "graphemes", e, i, { received: `${s}` });
|
|
1069
|
+
}
|
|
1070
|
+
return e;
|
|
1071
|
+
}
|
|
1072
|
+
};
|
|
1073
|
+
}
|
|
1074
|
+
// @__NO_SIDE_EFFECTS__
|
|
1075
|
+
function Pn(r, n) {
|
|
1076
|
+
return {
|
|
1077
|
+
kind: "validation",
|
|
1078
|
+
type: "max_length",
|
|
1079
|
+
reference: Pn,
|
|
1080
|
+
async: !1,
|
|
1081
|
+
expects: `<=${r}`,
|
|
1082
|
+
requirement: r,
|
|
1083
|
+
message: n,
|
|
1084
|
+
"~run"(e, i) {
|
|
1085
|
+
return e.typed && e.value.length > this.requirement && f(this, "length", e, i, { received: `${e.value.length}` }), e;
|
|
1086
|
+
}
|
|
1087
|
+
};
|
|
1088
|
+
}
|
|
1089
|
+
// @__NO_SIDE_EFFECTS__
|
|
1090
|
+
function Xn(r, n) {
|
|
1091
|
+
return {
|
|
1092
|
+
kind: "validation",
|
|
1093
|
+
type: "max_size",
|
|
1094
|
+
reference: Xn,
|
|
1095
|
+
async: !1,
|
|
1096
|
+
expects: `<=${r}`,
|
|
1097
|
+
requirement: r,
|
|
1098
|
+
message: n,
|
|
1099
|
+
"~run"(e, i) {
|
|
1100
|
+
return e.typed && e.value.size > this.requirement && f(this, "size", e, i, { received: `${e.value.size}` }), e;
|
|
1101
|
+
}
|
|
1102
|
+
};
|
|
1103
|
+
}
|
|
1104
|
+
// @__NO_SIDE_EFFECTS__
|
|
1105
|
+
function Nn(r, n) {
|
|
1106
|
+
return {
|
|
1107
|
+
kind: "validation",
|
|
1108
|
+
type: "max_value",
|
|
1109
|
+
reference: Nn,
|
|
1110
|
+
async: !1,
|
|
1111
|
+
expects: `<=${r instanceof Date ? r.toJSON() : /* @__PURE__ */ m(r)}`,
|
|
1112
|
+
requirement: r,
|
|
1113
|
+
message: n,
|
|
1114
|
+
"~run"(e, i) {
|
|
1115
|
+
return e.typed && !(e.value <= this.requirement) && f(this, "value", e, i, { received: e.value instanceof Date ? e.value.toJSON() : /* @__PURE__ */ m(e.value) }), e;
|
|
1116
|
+
}
|
|
1117
|
+
};
|
|
1118
|
+
}
|
|
1119
|
+
// @__NO_SIDE_EFFECTS__
|
|
1120
|
+
function Cn(r, n, e) {
|
|
1121
|
+
return {
|
|
1122
|
+
kind: "validation",
|
|
1123
|
+
type: "max_words",
|
|
1124
|
+
reference: Cn,
|
|
1125
|
+
async: !1,
|
|
1126
|
+
expects: `<=${n}`,
|
|
1127
|
+
locales: r,
|
|
1128
|
+
requirement: n,
|
|
1129
|
+
message: e,
|
|
1130
|
+
"~run"(i, s) {
|
|
1131
|
+
if (i.typed) {
|
|
1132
|
+
const u = /* @__PURE__ */ S(this.locales, i.value);
|
|
1133
|
+
u > this.requirement && f(this, "words", i, s, { received: `${u}` });
|
|
1134
|
+
}
|
|
1135
|
+
return i;
|
|
1136
|
+
}
|
|
1137
|
+
};
|
|
1138
|
+
}
|
|
1139
|
+
// @__NO_SIDE_EFFECTS__
|
|
1140
|
+
function zn(r) {
|
|
1141
|
+
return {
|
|
1142
|
+
kind: "metadata",
|
|
1143
|
+
type: "metadata",
|
|
1144
|
+
reference: zn,
|
|
1145
|
+
metadata: r
|
|
1146
|
+
};
|
|
1147
|
+
}
|
|
1148
|
+
// @__NO_SIDE_EFFECTS__
|
|
1149
|
+
function Tn(r, n) {
|
|
1150
|
+
return {
|
|
1151
|
+
kind: "validation",
|
|
1152
|
+
type: "mime_type",
|
|
1153
|
+
reference: Tn,
|
|
1154
|
+
async: !1,
|
|
1155
|
+
expects: /* @__PURE__ */ E(r.map((e) => `"${e}"`), "|"),
|
|
1156
|
+
requirement: r,
|
|
1157
|
+
message: n,
|
|
1158
|
+
"~run"(e, i) {
|
|
1159
|
+
return e.typed && !this.requirement.includes(e.value.type) && f(this, "MIME type", e, i, { received: `"${e.value.type}"` }), e;
|
|
1160
|
+
}
|
|
1161
|
+
};
|
|
1162
|
+
}
|
|
1163
|
+
// @__NO_SIDE_EFFECTS__
|
|
1164
|
+
function Fn(r, n) {
|
|
1165
|
+
return {
|
|
1166
|
+
kind: "validation",
|
|
1167
|
+
type: "min_bytes",
|
|
1168
|
+
reference: Fn,
|
|
1169
|
+
async: !1,
|
|
1170
|
+
expects: `>=${r}`,
|
|
1171
|
+
requirement: r,
|
|
1172
|
+
message: n,
|
|
1173
|
+
"~run"(e, i) {
|
|
1174
|
+
if (e.typed) {
|
|
1175
|
+
const s = /* @__PURE__ */ R(e.value);
|
|
1176
|
+
s < this.requirement && f(this, "bytes", e, i, { received: `${s}` });
|
|
1177
|
+
}
|
|
1178
|
+
return e;
|
|
1179
|
+
}
|
|
1180
|
+
};
|
|
1181
|
+
}
|
|
1182
|
+
// @__NO_SIDE_EFFECTS__
|
|
1183
|
+
function $n(r, n) {
|
|
1184
|
+
return {
|
|
1185
|
+
kind: "validation",
|
|
1186
|
+
type: "min_entries",
|
|
1187
|
+
reference: $n,
|
|
1188
|
+
async: !1,
|
|
1189
|
+
expects: `>=${r}`,
|
|
1190
|
+
requirement: r,
|
|
1191
|
+
message: n,
|
|
1192
|
+
"~run"(e, i) {
|
|
1193
|
+
if (!e.typed) return e;
|
|
1194
|
+
const s = Object.keys(e.value).length;
|
|
1195
|
+
return e.typed && s < this.requirement && f(this, "entries", e, i, { received: `${s}` }), e;
|
|
1196
|
+
}
|
|
1197
|
+
};
|
|
1198
|
+
}
|
|
1199
|
+
// @__NO_SIDE_EFFECTS__
|
|
1200
|
+
function Vn(r, n) {
|
|
1201
|
+
return {
|
|
1202
|
+
kind: "validation",
|
|
1203
|
+
type: "min_graphemes",
|
|
1204
|
+
reference: Vn,
|
|
1205
|
+
async: !1,
|
|
1206
|
+
expects: `>=${r}`,
|
|
1207
|
+
requirement: r,
|
|
1208
|
+
message: n,
|
|
1209
|
+
"~run"(e, i) {
|
|
1210
|
+
if (e.typed) {
|
|
1211
|
+
const s = /* @__PURE__ */ q(e.value);
|
|
1212
|
+
s < this.requirement && f(this, "graphemes", e, i, { received: `${s}` });
|
|
1213
|
+
}
|
|
1214
|
+
return e;
|
|
1215
|
+
}
|
|
1216
|
+
};
|
|
1217
|
+
}
|
|
1218
|
+
// @__NO_SIDE_EFFECTS__
|
|
1219
|
+
function Ln(r, n) {
|
|
1220
|
+
return {
|
|
1221
|
+
kind: "validation",
|
|
1222
|
+
type: "min_length",
|
|
1223
|
+
reference: Ln,
|
|
1224
|
+
async: !1,
|
|
1225
|
+
expects: `>=${r}`,
|
|
1226
|
+
requirement: r,
|
|
1227
|
+
message: n,
|
|
1228
|
+
"~run"(e, i) {
|
|
1229
|
+
return e.typed && e.value.length < this.requirement && f(this, "length", e, i, { received: `${e.value.length}` }), e;
|
|
1230
|
+
}
|
|
1231
|
+
};
|
|
1232
|
+
}
|
|
1233
|
+
// @__NO_SIDE_EFFECTS__
|
|
1234
|
+
function Jn(r, n) {
|
|
1235
|
+
return {
|
|
1236
|
+
kind: "validation",
|
|
1237
|
+
type: "min_size",
|
|
1238
|
+
reference: Jn,
|
|
1239
|
+
async: !1,
|
|
1240
|
+
expects: `>=${r}`,
|
|
1241
|
+
requirement: r,
|
|
1242
|
+
message: n,
|
|
1243
|
+
"~run"(e, i) {
|
|
1244
|
+
return e.typed && e.value.size < this.requirement && f(this, "size", e, i, { received: `${e.value.size}` }), e;
|
|
1245
|
+
}
|
|
1246
|
+
};
|
|
1247
|
+
}
|
|
1248
|
+
// @__NO_SIDE_EFFECTS__
|
|
1249
|
+
function Wn(r, n) {
|
|
1250
|
+
return {
|
|
1251
|
+
kind: "validation",
|
|
1252
|
+
type: "min_value",
|
|
1253
|
+
reference: Wn,
|
|
1254
|
+
async: !1,
|
|
1255
|
+
expects: `>=${r instanceof Date ? r.toJSON() : /* @__PURE__ */ m(r)}`,
|
|
1256
|
+
requirement: r,
|
|
1257
|
+
message: n,
|
|
1258
|
+
"~run"(e, i) {
|
|
1259
|
+
return e.typed && !(e.value >= this.requirement) && f(this, "value", e, i, { received: e.value instanceof Date ? e.value.toJSON() : /* @__PURE__ */ m(e.value) }), e;
|
|
1260
|
+
}
|
|
1261
|
+
};
|
|
1262
|
+
}
|
|
1263
|
+
// @__NO_SIDE_EFFECTS__
|
|
1264
|
+
function Bn(r, n, e) {
|
|
1265
|
+
return {
|
|
1266
|
+
kind: "validation",
|
|
1267
|
+
type: "min_words",
|
|
1268
|
+
reference: Bn,
|
|
1269
|
+
async: !1,
|
|
1270
|
+
expects: `>=${n}`,
|
|
1271
|
+
locales: r,
|
|
1272
|
+
requirement: n,
|
|
1273
|
+
message: e,
|
|
1274
|
+
"~run"(i, s) {
|
|
1275
|
+
if (i.typed) {
|
|
1276
|
+
const u = /* @__PURE__ */ S(this.locales, i.value);
|
|
1277
|
+
u < this.requirement && f(this, "words", i, s, { received: `${u}` });
|
|
1278
|
+
}
|
|
1279
|
+
return i;
|
|
1280
|
+
}
|
|
1281
|
+
};
|
|
1282
|
+
}
|
|
1283
|
+
// @__NO_SIDE_EFFECTS__
|
|
1284
|
+
function Un(r, n) {
|
|
1285
|
+
return {
|
|
1286
|
+
kind: "validation",
|
|
1287
|
+
type: "multiple_of",
|
|
1288
|
+
reference: Un,
|
|
1289
|
+
async: !1,
|
|
1290
|
+
expects: `%${r}`,
|
|
1291
|
+
requirement: r,
|
|
1292
|
+
message: n,
|
|
1293
|
+
"~run"(e, i) {
|
|
1294
|
+
return e.typed && e.value % this.requirement != 0 && f(this, "multiple", e, i), e;
|
|
1295
|
+
}
|
|
1296
|
+
};
|
|
1297
|
+
}
|
|
1298
|
+
// @__NO_SIDE_EFFECTS__
|
|
1299
|
+
function Zn(r) {
|
|
1300
|
+
return {
|
|
1301
|
+
kind: "validation",
|
|
1302
|
+
type: "nanoid",
|
|
1303
|
+
reference: Zn,
|
|
1304
|
+
async: !1,
|
|
1305
|
+
expects: null,
|
|
1306
|
+
requirement: Re,
|
|
1307
|
+
message: r,
|
|
1308
|
+
"~run"(n, e) {
|
|
1309
|
+
return n.typed && !this.requirement.test(n.value) && f(this, "Nano ID", n, e), n;
|
|
1310
|
+
}
|
|
1311
|
+
};
|
|
1312
|
+
}
|
|
1313
|
+
// @__NO_SIDE_EFFECTS__
|
|
1314
|
+
function Kn(r) {
|
|
1315
|
+
return {
|
|
1316
|
+
kind: "validation",
|
|
1317
|
+
type: "non_empty",
|
|
1318
|
+
reference: Kn,
|
|
1319
|
+
async: !1,
|
|
1320
|
+
expects: "!0",
|
|
1321
|
+
message: r,
|
|
1322
|
+
"~run"(n, e) {
|
|
1323
|
+
return n.typed && n.value.length === 0 && f(this, "length", n, e, { received: "0" }), n;
|
|
1324
|
+
}
|
|
1325
|
+
};
|
|
1326
|
+
}
|
|
1327
|
+
// @__NO_SIDE_EFFECTS__
|
|
1328
|
+
function Hn(r) {
|
|
1329
|
+
return {
|
|
1330
|
+
kind: "transformation",
|
|
1331
|
+
type: "normalize",
|
|
1332
|
+
reference: Hn,
|
|
1333
|
+
async: !1,
|
|
1334
|
+
form: r,
|
|
1335
|
+
"~run"(n) {
|
|
1336
|
+
return n.value = n.value.normalize(this.form), n;
|
|
1337
|
+
}
|
|
1338
|
+
};
|
|
1339
|
+
}
|
|
1340
|
+
// @__NO_SIDE_EFFECTS__
|
|
1341
|
+
function Qn(r, n) {
|
|
1342
|
+
return {
|
|
1343
|
+
kind: "validation",
|
|
1344
|
+
type: "not_bytes",
|
|
1345
|
+
reference: Qn,
|
|
1346
|
+
async: !1,
|
|
1347
|
+
expects: `!${r}`,
|
|
1348
|
+
requirement: r,
|
|
1349
|
+
message: n,
|
|
1350
|
+
"~run"(e, i) {
|
|
1351
|
+
if (e.typed) {
|
|
1352
|
+
const s = /* @__PURE__ */ R(e.value);
|
|
1353
|
+
s === this.requirement && f(this, "bytes", e, i, { received: `${s}` });
|
|
1354
|
+
}
|
|
1355
|
+
return e;
|
|
1356
|
+
}
|
|
1357
|
+
};
|
|
1358
|
+
}
|
|
1359
|
+
// @__NO_SIDE_EFFECTS__
|
|
1360
|
+
function Yn(r, n) {
|
|
1361
|
+
return {
|
|
1362
|
+
kind: "validation",
|
|
1363
|
+
type: "not_entries",
|
|
1364
|
+
reference: Yn,
|
|
1365
|
+
async: !1,
|
|
1366
|
+
expects: `!${r}`,
|
|
1367
|
+
requirement: r,
|
|
1368
|
+
message: n,
|
|
1369
|
+
"~run"(e, i) {
|
|
1370
|
+
if (!e.typed) return e;
|
|
1371
|
+
const s = Object.keys(e.value).length;
|
|
1372
|
+
return e.typed && s === this.requirement && f(this, "entries", e, i, { received: `${s}` }), e;
|
|
1373
|
+
}
|
|
1374
|
+
};
|
|
1375
|
+
}
|
|
1376
|
+
// @__NO_SIDE_EFFECTS__
|
|
1377
|
+
function er(r, n) {
|
|
1378
|
+
return {
|
|
1379
|
+
kind: "validation",
|
|
1380
|
+
type: "not_graphemes",
|
|
1381
|
+
reference: er,
|
|
1382
|
+
async: !1,
|
|
1383
|
+
expects: `!${r}`,
|
|
1384
|
+
requirement: r,
|
|
1385
|
+
message: n,
|
|
1386
|
+
"~run"(e, i) {
|
|
1387
|
+
if (e.typed) {
|
|
1388
|
+
const s = /* @__PURE__ */ q(e.value);
|
|
1389
|
+
s === this.requirement && f(this, "graphemes", e, i, { received: `${s}` });
|
|
1390
|
+
}
|
|
1391
|
+
return e;
|
|
1392
|
+
}
|
|
1393
|
+
};
|
|
1394
|
+
}
|
|
1395
|
+
// @__NO_SIDE_EFFECTS__
|
|
1396
|
+
function nr(r, n) {
|
|
1397
|
+
return {
|
|
1398
|
+
kind: "validation",
|
|
1399
|
+
type: "not_length",
|
|
1400
|
+
reference: nr,
|
|
1401
|
+
async: !1,
|
|
1402
|
+
expects: `!${r}`,
|
|
1403
|
+
requirement: r,
|
|
1404
|
+
message: n,
|
|
1405
|
+
"~run"(e, i) {
|
|
1406
|
+
return e.typed && e.value.length === this.requirement && f(this, "length", e, i, { received: `${e.value.length}` }), e;
|
|
1407
|
+
}
|
|
1408
|
+
};
|
|
1409
|
+
}
|
|
1410
|
+
// @__NO_SIDE_EFFECTS__
|
|
1411
|
+
function rr(r, n) {
|
|
1412
|
+
return {
|
|
1413
|
+
kind: "validation",
|
|
1414
|
+
type: "not_size",
|
|
1415
|
+
reference: rr,
|
|
1416
|
+
async: !1,
|
|
1417
|
+
expects: `!${r}`,
|
|
1418
|
+
requirement: r,
|
|
1419
|
+
message: n,
|
|
1420
|
+
"~run"(e, i) {
|
|
1421
|
+
return e.typed && e.value.size === this.requirement && f(this, "size", e, i, { received: `${e.value.size}` }), e;
|
|
1422
|
+
}
|
|
1423
|
+
};
|
|
1424
|
+
}
|
|
1425
|
+
// @__NO_SIDE_EFFECTS__
|
|
1426
|
+
function ir(r, n) {
|
|
1427
|
+
return {
|
|
1428
|
+
kind: "validation",
|
|
1429
|
+
type: "not_value",
|
|
1430
|
+
reference: ir,
|
|
1431
|
+
async: !1,
|
|
1432
|
+
expects: r instanceof Date ? `!${r.toJSON()}` : `!${/* @__PURE__ */ m(r)}`,
|
|
1433
|
+
requirement: r,
|
|
1434
|
+
message: n,
|
|
1435
|
+
"~run"(e, i) {
|
|
1436
|
+
return e.typed && this.requirement <= e.value && this.requirement >= e.value && f(this, "value", e, i, { received: e.value instanceof Date ? e.value.toJSON() : /* @__PURE__ */ m(e.value) }), e;
|
|
1437
|
+
}
|
|
1438
|
+
};
|
|
1439
|
+
}
|
|
1440
|
+
// @__NO_SIDE_EFFECTS__
|
|
1441
|
+
function sr(r, n) {
|
|
1442
|
+
return {
|
|
1443
|
+
kind: "validation",
|
|
1444
|
+
type: "not_values",
|
|
1445
|
+
reference: sr,
|
|
1446
|
+
async: !1,
|
|
1447
|
+
expects: `!${/* @__PURE__ */ E(r.map((e) => e instanceof Date ? e.toJSON() : /* @__PURE__ */ m(e)), "|")}`,
|
|
1448
|
+
requirement: r,
|
|
1449
|
+
message: n,
|
|
1450
|
+
"~run"(e, i) {
|
|
1451
|
+
return e.typed && this.requirement.some((s) => s <= e.value && s >= e.value) && f(this, "value", e, i, { received: e.value instanceof Date ? e.value.toJSON() : /* @__PURE__ */ m(e.value) }), e;
|
|
1452
|
+
}
|
|
1453
|
+
};
|
|
1454
|
+
}
|
|
1455
|
+
// @__NO_SIDE_EFFECTS__
|
|
1456
|
+
function tr(r, n, e) {
|
|
1457
|
+
return {
|
|
1458
|
+
kind: "validation",
|
|
1459
|
+
type: "not_words",
|
|
1460
|
+
reference: tr,
|
|
1461
|
+
async: !1,
|
|
1462
|
+
expects: `!${n}`,
|
|
1463
|
+
locales: r,
|
|
1464
|
+
requirement: n,
|
|
1465
|
+
message: e,
|
|
1466
|
+
"~run"(i, s) {
|
|
1467
|
+
if (i.typed) {
|
|
1468
|
+
const u = /* @__PURE__ */ S(this.locales, i.value);
|
|
1469
|
+
u === this.requirement && f(this, "words", i, s, { received: `${u}` });
|
|
1470
|
+
}
|
|
1471
|
+
return i;
|
|
1472
|
+
}
|
|
1473
|
+
};
|
|
1474
|
+
}
|
|
1475
|
+
// @__NO_SIDE_EFFECTS__
|
|
1476
|
+
function ur(r) {
|
|
1477
|
+
return {
|
|
1478
|
+
kind: "validation",
|
|
1479
|
+
type: "octal",
|
|
1480
|
+
reference: ur,
|
|
1481
|
+
async: !1,
|
|
1482
|
+
expects: null,
|
|
1483
|
+
requirement: qe,
|
|
1484
|
+
message: r,
|
|
1485
|
+
"~run"(n, e) {
|
|
1486
|
+
return n.typed && !this.requirement.test(n.value) && f(this, "octal", n, e), n;
|
|
1487
|
+
}
|
|
1488
|
+
};
|
|
1489
|
+
}
|
|
1490
|
+
// @__NO_SIDE_EFFECTS__
|
|
1491
|
+
function lr(r, n) {
|
|
1492
|
+
return {
|
|
1493
|
+
kind: "transformation",
|
|
1494
|
+
type: "parse_json",
|
|
1495
|
+
reference: lr,
|
|
1496
|
+
config: r,
|
|
1497
|
+
message: n,
|
|
1498
|
+
async: !1,
|
|
1499
|
+
"~run"(e, i) {
|
|
1500
|
+
try {
|
|
1501
|
+
e.value = JSON.parse(e.value, this.config?.reviver);
|
|
1502
|
+
} catch (s) {
|
|
1503
|
+
if (s instanceof Error)
|
|
1504
|
+
f(this, "JSON", e, i, { received: `"${s.message}"` }), e.typed = !1;
|
|
1505
|
+
else throw s;
|
|
1506
|
+
}
|
|
1507
|
+
return e;
|
|
1508
|
+
}
|
|
1509
|
+
};
|
|
1510
|
+
}
|
|
1511
|
+
// @__NO_SIDE_EFFECTS__
|
|
1512
|
+
function or(r, n) {
|
|
1513
|
+
if (r.issues) for (const e of n) for (const i of r.issues) {
|
|
1514
|
+
let s = !1;
|
|
1515
|
+
const u = Math.min(e.length, i.path?.length ?? 0);
|
|
1516
|
+
for (let l = 0; l < u; l++) if (e[l] !== i.path[l].key && (e[l] !== "$" || i.path[l].type !== "array")) {
|
|
1517
|
+
s = !0;
|
|
1518
|
+
break;
|
|
1519
|
+
}
|
|
1520
|
+
if (!s) return !1;
|
|
1521
|
+
}
|
|
1522
|
+
return !0;
|
|
1523
|
+
}
|
|
1524
|
+
// @__NO_SIDE_EFFECTS__
|
|
1525
|
+
function cr(r, n, e) {
|
|
1526
|
+
return {
|
|
1527
|
+
kind: "validation",
|
|
1528
|
+
type: "partial_check",
|
|
1529
|
+
reference: cr,
|
|
1530
|
+
async: !1,
|
|
1531
|
+
expects: null,
|
|
1532
|
+
paths: r,
|
|
1533
|
+
requirement: n,
|
|
1534
|
+
message: e,
|
|
1535
|
+
"~run"(i, s) {
|
|
1536
|
+
return (i.typed || /* @__PURE__ */ or(i, r)) && !this.requirement(i.value) && f(this, "input", i, s), i;
|
|
1537
|
+
}
|
|
1538
|
+
};
|
|
1539
|
+
}
|
|
1540
|
+
// @__NO_SIDE_EFFECTS__
|
|
1541
|
+
function fr(r, n, e) {
|
|
1542
|
+
return {
|
|
1543
|
+
kind: "validation",
|
|
1544
|
+
type: "partial_check",
|
|
1545
|
+
reference: fr,
|
|
1546
|
+
async: !0,
|
|
1547
|
+
expects: null,
|
|
1548
|
+
paths: r,
|
|
1549
|
+
requirement: n,
|
|
1550
|
+
message: e,
|
|
1551
|
+
async "~run"(i, s) {
|
|
1552
|
+
return (i.typed || /* @__PURE__ */ or(i, r)) && !await this.requirement(i.value) && f(this, "input", i, s), i;
|
|
1553
|
+
}
|
|
1554
|
+
};
|
|
1555
|
+
}
|
|
1556
|
+
// @__NO_SIDE_EFFECTS__
|
|
1557
|
+
function pr(r) {
|
|
1558
|
+
return {
|
|
1559
|
+
kind: "validation",
|
|
1560
|
+
type: "raw_check",
|
|
1561
|
+
reference: pr,
|
|
1562
|
+
async: !1,
|
|
1563
|
+
expects: null,
|
|
1564
|
+
"~run"(n, e) {
|
|
1565
|
+
return r({
|
|
1566
|
+
dataset: n,
|
|
1567
|
+
config: e,
|
|
1568
|
+
addIssue: (i) => f(this, i?.label ?? "input", n, e, i)
|
|
1569
|
+
}), n;
|
|
1570
|
+
}
|
|
1571
|
+
};
|
|
1572
|
+
}
|
|
1573
|
+
// @__NO_SIDE_EFFECTS__
|
|
1574
|
+
function ar(r) {
|
|
1575
|
+
return {
|
|
1576
|
+
kind: "validation",
|
|
1577
|
+
type: "raw_check",
|
|
1578
|
+
reference: ar,
|
|
1579
|
+
async: !0,
|
|
1580
|
+
expects: null,
|
|
1581
|
+
async "~run"(n, e) {
|
|
1582
|
+
return await r({
|
|
1583
|
+
dataset: n,
|
|
1584
|
+
config: e,
|
|
1585
|
+
addIssue: (i) => f(this, i?.label ?? "input", n, e, i)
|
|
1586
|
+
}), n;
|
|
1587
|
+
}
|
|
1588
|
+
};
|
|
1589
|
+
}
|
|
1590
|
+
// @__NO_SIDE_EFFECTS__
|
|
1591
|
+
function yr(r) {
|
|
1592
|
+
return {
|
|
1593
|
+
kind: "transformation",
|
|
1594
|
+
type: "raw_transform",
|
|
1595
|
+
reference: yr,
|
|
1596
|
+
async: !1,
|
|
1597
|
+
"~run"(n, e) {
|
|
1598
|
+
const i = r({
|
|
1599
|
+
dataset: n,
|
|
1600
|
+
config: e,
|
|
1601
|
+
addIssue: (s) => f(this, s?.label ?? "input", n, e, s),
|
|
1602
|
+
NEVER: null
|
|
1603
|
+
});
|
|
1604
|
+
return n.issues ? n.typed = !1 : n.value = i, n;
|
|
1605
|
+
}
|
|
1606
|
+
};
|
|
1607
|
+
}
|
|
1608
|
+
// @__NO_SIDE_EFFECTS__
|
|
1609
|
+
function hr(r) {
|
|
1610
|
+
return {
|
|
1611
|
+
kind: "transformation",
|
|
1612
|
+
type: "raw_transform",
|
|
1613
|
+
reference: hr,
|
|
1614
|
+
async: !0,
|
|
1615
|
+
async "~run"(n, e) {
|
|
1616
|
+
const i = await r({
|
|
1617
|
+
dataset: n,
|
|
1618
|
+
config: e,
|
|
1619
|
+
addIssue: (s) => f(this, s?.label ?? "input", n, e, s),
|
|
1620
|
+
NEVER: null
|
|
1621
|
+
});
|
|
1622
|
+
return n.issues ? n.typed = !1 : n.value = i, n;
|
|
1623
|
+
}
|
|
1624
|
+
};
|
|
1625
|
+
}
|
|
1626
|
+
// @__NO_SIDE_EFFECTS__
|
|
1627
|
+
function vr() {
|
|
1628
|
+
return {
|
|
1629
|
+
kind: "transformation",
|
|
1630
|
+
type: "readonly",
|
|
1631
|
+
reference: vr,
|
|
1632
|
+
async: !1,
|
|
1633
|
+
"~run"(r) {
|
|
1634
|
+
return r;
|
|
1635
|
+
}
|
|
1636
|
+
};
|
|
1637
|
+
}
|
|
1638
|
+
// @__NO_SIDE_EFFECTS__
|
|
1639
|
+
function mr(r, n) {
|
|
1640
|
+
return {
|
|
1641
|
+
kind: "transformation",
|
|
1642
|
+
type: "reduce_items",
|
|
1643
|
+
reference: mr,
|
|
1644
|
+
async: !1,
|
|
1645
|
+
operation: r,
|
|
1646
|
+
initial: n,
|
|
1647
|
+
"~run"(e) {
|
|
1648
|
+
return e.value = e.value.reduce(this.operation, this.initial), e;
|
|
1649
|
+
}
|
|
1650
|
+
};
|
|
1651
|
+
}
|
|
1652
|
+
// @__NO_SIDE_EFFECTS__
|
|
1653
|
+
function gr(r, n) {
|
|
1654
|
+
return {
|
|
1655
|
+
kind: "validation",
|
|
1656
|
+
type: "regex",
|
|
1657
|
+
reference: gr,
|
|
1658
|
+
async: !1,
|
|
1659
|
+
expects: `${r}`,
|
|
1660
|
+
requirement: r,
|
|
1661
|
+
message: n,
|
|
1662
|
+
"~run"(e, i) {
|
|
1663
|
+
return e.typed && !this.requirement.test(e.value) && f(this, "format", e, i), e;
|
|
1664
|
+
}
|
|
1665
|
+
};
|
|
1666
|
+
}
|
|
1667
|
+
// @__NO_SIDE_EFFECTS__
|
|
1668
|
+
function dr(r) {
|
|
1669
|
+
return {
|
|
1670
|
+
kind: "transformation",
|
|
1671
|
+
type: "returns",
|
|
1672
|
+
reference: dr,
|
|
1673
|
+
async: !1,
|
|
1674
|
+
schema: r,
|
|
1675
|
+
"~run"(n, e) {
|
|
1676
|
+
const i = n.value;
|
|
1677
|
+
return n.value = (...s) => {
|
|
1678
|
+
const u = this.schema["~run"]({ value: i(...s) }, e);
|
|
1679
|
+
if (u.issues) throw new x(u.issues);
|
|
1680
|
+
return u.value;
|
|
1681
|
+
}, n;
|
|
1682
|
+
}
|
|
1683
|
+
};
|
|
1684
|
+
}
|
|
1685
|
+
// @__NO_SIDE_EFFECTS__
|
|
1686
|
+
function kr(r) {
|
|
1687
|
+
return {
|
|
1688
|
+
kind: "transformation",
|
|
1689
|
+
type: "returns",
|
|
1690
|
+
reference: kr,
|
|
1691
|
+
async: !1,
|
|
1692
|
+
schema: r,
|
|
1693
|
+
"~run"(n, e) {
|
|
1694
|
+
const i = n.value;
|
|
1695
|
+
return n.value = async (...s) => {
|
|
1696
|
+
const u = await this.schema["~run"]({ value: await i(...s) }, e);
|
|
1697
|
+
if (u.issues) throw new x(u.issues);
|
|
1698
|
+
return u.value;
|
|
1699
|
+
}, n;
|
|
1700
|
+
}
|
|
1701
|
+
};
|
|
1702
|
+
}
|
|
1703
|
+
// @__NO_SIDE_EFFECTS__
|
|
1704
|
+
function br(r) {
|
|
1705
|
+
return {
|
|
1706
|
+
kind: "validation",
|
|
1707
|
+
type: "rfc_email",
|
|
1708
|
+
reference: br,
|
|
1709
|
+
expects: null,
|
|
1710
|
+
async: !1,
|
|
1711
|
+
requirement: Me,
|
|
1712
|
+
message: r,
|
|
1713
|
+
"~run"(n, e) {
|
|
1714
|
+
return n.typed && !this.requirement.test(n.value) && f(this, "email", n, e), n;
|
|
1715
|
+
}
|
|
1716
|
+
};
|
|
1717
|
+
}
|
|
1718
|
+
// @__NO_SIDE_EFFECTS__
|
|
1719
|
+
function Er(r) {
|
|
1720
|
+
return {
|
|
1721
|
+
kind: "validation",
|
|
1722
|
+
type: "safe_integer",
|
|
1723
|
+
reference: Er,
|
|
1724
|
+
async: !1,
|
|
1725
|
+
expects: null,
|
|
1726
|
+
requirement: Number.isSafeInteger,
|
|
1727
|
+
message: r,
|
|
1728
|
+
"~run"(n, e) {
|
|
1729
|
+
return n.typed && !this.requirement(n.value) && f(this, "safe integer", n, e), n;
|
|
1730
|
+
}
|
|
1731
|
+
};
|
|
1732
|
+
}
|
|
1733
|
+
// @__NO_SIDE_EFFECTS__
|
|
1734
|
+
function xr(r, n) {
|
|
1735
|
+
return {
|
|
1736
|
+
kind: "validation",
|
|
1737
|
+
type: "size",
|
|
1738
|
+
reference: xr,
|
|
1739
|
+
async: !1,
|
|
1740
|
+
expects: `${r}`,
|
|
1741
|
+
requirement: r,
|
|
1742
|
+
message: n,
|
|
1743
|
+
"~run"(e, i) {
|
|
1744
|
+
return e.typed && e.value.size !== this.requirement && f(this, "size", e, i, { received: `${e.value.size}` }), e;
|
|
1745
|
+
}
|
|
1746
|
+
};
|
|
1747
|
+
}
|
|
1748
|
+
// @__NO_SIDE_EFFECTS__
|
|
1749
|
+
function _r(r) {
|
|
1750
|
+
return {
|
|
1751
|
+
kind: "validation",
|
|
1752
|
+
type: "slug",
|
|
1753
|
+
reference: _r,
|
|
1754
|
+
async: !1,
|
|
1755
|
+
expects: null,
|
|
1756
|
+
requirement: Se,
|
|
1757
|
+
message: r,
|
|
1758
|
+
"~run"(n, e) {
|
|
1759
|
+
return n.typed && !this.requirement.test(n.value) && f(this, "slug", n, e), n;
|
|
1760
|
+
}
|
|
1761
|
+
};
|
|
1762
|
+
}
|
|
1763
|
+
// @__NO_SIDE_EFFECTS__
|
|
1764
|
+
function Ar(r, n) {
|
|
1765
|
+
return {
|
|
1766
|
+
kind: "validation",
|
|
1767
|
+
type: "some_item",
|
|
1768
|
+
reference: Ar,
|
|
1769
|
+
async: !1,
|
|
1770
|
+
expects: null,
|
|
1771
|
+
requirement: r,
|
|
1772
|
+
message: n,
|
|
1773
|
+
"~run"(e, i) {
|
|
1774
|
+
return e.typed && !e.value.some(this.requirement) && f(this, "item", e, i), e;
|
|
1775
|
+
}
|
|
1776
|
+
};
|
|
1777
|
+
}
|
|
1778
|
+
// @__NO_SIDE_EFFECTS__
|
|
1779
|
+
function wr(r) {
|
|
1780
|
+
return {
|
|
1781
|
+
kind: "transformation",
|
|
1782
|
+
type: "sort_items",
|
|
1783
|
+
reference: wr,
|
|
1784
|
+
async: !1,
|
|
1785
|
+
operation: r,
|
|
1786
|
+
"~run"(n) {
|
|
1787
|
+
return n.value = n.value.sort(this.operation), n;
|
|
1788
|
+
}
|
|
1789
|
+
};
|
|
1790
|
+
}
|
|
1791
|
+
// @__NO_SIDE_EFFECTS__
|
|
1792
|
+
function Ir(r, n) {
|
|
1793
|
+
return {
|
|
1794
|
+
kind: "validation",
|
|
1795
|
+
type: "starts_with",
|
|
1796
|
+
reference: Ir,
|
|
1797
|
+
async: !1,
|
|
1798
|
+
expects: `"${r}"`,
|
|
1799
|
+
requirement: r,
|
|
1800
|
+
message: n,
|
|
1801
|
+
"~run"(e, i) {
|
|
1802
|
+
return e.typed && !e.value.startsWith(this.requirement) && f(this, "start", e, i, { received: `"${e.value.slice(0, this.requirement.length)}"` }), e;
|
|
1803
|
+
}
|
|
1804
|
+
};
|
|
1805
|
+
}
|
|
1806
|
+
// @__NO_SIDE_EFFECTS__
|
|
1807
|
+
function Dr(r, n) {
|
|
1808
|
+
return {
|
|
1809
|
+
kind: "transformation",
|
|
1810
|
+
type: "stringify_json",
|
|
1811
|
+
reference: Dr,
|
|
1812
|
+
message: n,
|
|
1813
|
+
config: r,
|
|
1814
|
+
async: !1,
|
|
1815
|
+
"~run"(e, i) {
|
|
1816
|
+
try {
|
|
1817
|
+
const s = JSON.stringify(e.value, this.config?.replacer, this.config?.space);
|
|
1818
|
+
s === void 0 && (f(this, "JSON", e, i), e.typed = !1), e.value = s;
|
|
1819
|
+
} catch (s) {
|
|
1820
|
+
if (s instanceof Error)
|
|
1821
|
+
f(this, "JSON", e, i, { received: `"${s.message}"` }), e.typed = !1;
|
|
1822
|
+
else throw s;
|
|
1823
|
+
}
|
|
1824
|
+
return e;
|
|
1825
|
+
}
|
|
1826
|
+
};
|
|
1827
|
+
}
|
|
1828
|
+
// @__NO_SIDE_EFFECTS__
|
|
1829
|
+
function jr(r) {
|
|
1830
|
+
return {
|
|
1831
|
+
kind: "metadata",
|
|
1832
|
+
type: "title",
|
|
1833
|
+
reference: jr,
|
|
1834
|
+
title: r
|
|
1835
|
+
};
|
|
1836
|
+
}
|
|
1837
|
+
// @__NO_SIDE_EFFECTS__
|
|
1838
|
+
function Or(r) {
|
|
1839
|
+
return {
|
|
1840
|
+
kind: "transformation",
|
|
1841
|
+
type: "to_bigint",
|
|
1842
|
+
reference: Or,
|
|
1843
|
+
async: !1,
|
|
1844
|
+
message: r,
|
|
1845
|
+
"~run"(n, e) {
|
|
1846
|
+
try {
|
|
1847
|
+
n.value = BigInt(n.value);
|
|
1848
|
+
} catch {
|
|
1849
|
+
f(this, "bigint", n, e), n.typed = !1;
|
|
1850
|
+
}
|
|
1851
|
+
return n;
|
|
1852
|
+
}
|
|
1853
|
+
};
|
|
1854
|
+
}
|
|
1855
|
+
// @__NO_SIDE_EFFECTS__
|
|
1856
|
+
function Gr() {
|
|
1857
|
+
return {
|
|
1858
|
+
kind: "transformation",
|
|
1859
|
+
type: "to_boolean",
|
|
1860
|
+
reference: Gr,
|
|
1861
|
+
async: !1,
|
|
1862
|
+
"~run"(r) {
|
|
1863
|
+
return r.value = !!r.value, r;
|
|
1864
|
+
}
|
|
1865
|
+
};
|
|
1866
|
+
}
|
|
1867
|
+
// @__NO_SIDE_EFFECTS__
|
|
1868
|
+
function Rr(r) {
|
|
1869
|
+
return {
|
|
1870
|
+
kind: "transformation",
|
|
1871
|
+
type: "to_date",
|
|
1872
|
+
reference: Rr,
|
|
1873
|
+
async: !1,
|
|
1874
|
+
message: r,
|
|
1875
|
+
"~run"(n, e) {
|
|
1876
|
+
try {
|
|
1877
|
+
n.value = new Date(n.value), isNaN(n.value) && (f(this, "date", n, e, { received: '"Invalid Date"' }), n.typed = !1);
|
|
1878
|
+
} catch {
|
|
1879
|
+
f(this, "date", n, e), n.typed = !1;
|
|
1880
|
+
}
|
|
1881
|
+
return n;
|
|
1882
|
+
}
|
|
1883
|
+
};
|
|
1884
|
+
}
|
|
1885
|
+
// @__NO_SIDE_EFFECTS__
|
|
1886
|
+
function qr() {
|
|
1887
|
+
return {
|
|
1888
|
+
kind: "transformation",
|
|
1889
|
+
type: "to_lower_case",
|
|
1890
|
+
reference: qr,
|
|
1891
|
+
async: !1,
|
|
1892
|
+
"~run"(r) {
|
|
1893
|
+
return r.value = r.value.toLowerCase(), r;
|
|
1894
|
+
}
|
|
1895
|
+
};
|
|
1896
|
+
}
|
|
1897
|
+
// @__NO_SIDE_EFFECTS__
|
|
1898
|
+
function Mr(r) {
|
|
1899
|
+
return {
|
|
1900
|
+
kind: "transformation",
|
|
1901
|
+
type: "to_max_value",
|
|
1902
|
+
reference: Mr,
|
|
1903
|
+
async: !1,
|
|
1904
|
+
requirement: r,
|
|
1905
|
+
"~run"(n) {
|
|
1906
|
+
return n.value = n.value > this.requirement ? this.requirement : n.value, n;
|
|
1907
|
+
}
|
|
1908
|
+
};
|
|
1909
|
+
}
|
|
1910
|
+
// @__NO_SIDE_EFFECTS__
|
|
1911
|
+
function Sr(r) {
|
|
1912
|
+
return {
|
|
1913
|
+
kind: "transformation",
|
|
1914
|
+
type: "to_min_value",
|
|
1915
|
+
reference: Sr,
|
|
1916
|
+
async: !1,
|
|
1917
|
+
requirement: r,
|
|
1918
|
+
"~run"(n) {
|
|
1919
|
+
return n.value = n.value < this.requirement ? this.requirement : n.value, n;
|
|
1920
|
+
}
|
|
1921
|
+
};
|
|
1922
|
+
}
|
|
1923
|
+
// @__NO_SIDE_EFFECTS__
|
|
1924
|
+
function Pr(r) {
|
|
1925
|
+
return {
|
|
1926
|
+
kind: "transformation",
|
|
1927
|
+
type: "to_number",
|
|
1928
|
+
reference: Pr,
|
|
1929
|
+
async: !1,
|
|
1930
|
+
message: r,
|
|
1931
|
+
"~run"(n, e) {
|
|
1932
|
+
try {
|
|
1933
|
+
n.value = Number(n.value), isNaN(n.value) && (f(this, "number", n, e), n.typed = !1);
|
|
1934
|
+
} catch {
|
|
1935
|
+
f(this, "number", n, e), n.typed = !1;
|
|
1936
|
+
}
|
|
1937
|
+
return n;
|
|
1938
|
+
}
|
|
1939
|
+
};
|
|
1940
|
+
}
|
|
1941
|
+
// @__NO_SIDE_EFFECTS__
|
|
1942
|
+
function Xr(r) {
|
|
1943
|
+
return {
|
|
1944
|
+
kind: "transformation",
|
|
1945
|
+
type: "to_string",
|
|
1946
|
+
reference: Xr,
|
|
1947
|
+
async: !1,
|
|
1948
|
+
message: r,
|
|
1949
|
+
"~run"(n, e) {
|
|
1950
|
+
try {
|
|
1951
|
+
n.value = String(n.value);
|
|
1952
|
+
} catch {
|
|
1953
|
+
f(this, "string", n, e), n.typed = !1;
|
|
1954
|
+
}
|
|
1955
|
+
return n;
|
|
1956
|
+
}
|
|
1957
|
+
};
|
|
1958
|
+
}
|
|
1959
|
+
// @__NO_SIDE_EFFECTS__
|
|
1960
|
+
function Nr() {
|
|
1961
|
+
return {
|
|
1962
|
+
kind: "transformation",
|
|
1963
|
+
type: "to_upper_case",
|
|
1964
|
+
reference: Nr,
|
|
1965
|
+
async: !1,
|
|
1966
|
+
"~run"(r) {
|
|
1967
|
+
return r.value = r.value.toUpperCase(), r;
|
|
1968
|
+
}
|
|
1969
|
+
};
|
|
1970
|
+
}
|
|
1971
|
+
// @__NO_SIDE_EFFECTS__
|
|
1972
|
+
function Cr(r) {
|
|
1973
|
+
return {
|
|
1974
|
+
kind: "transformation",
|
|
1975
|
+
type: "transform",
|
|
1976
|
+
reference: Cr,
|
|
1977
|
+
async: !1,
|
|
1978
|
+
operation: r,
|
|
1979
|
+
"~run"(n) {
|
|
1980
|
+
return n.value = this.operation(n.value), n;
|
|
1981
|
+
}
|
|
1982
|
+
};
|
|
1983
|
+
}
|
|
1984
|
+
// @__NO_SIDE_EFFECTS__
|
|
1985
|
+
function zr(r) {
|
|
1986
|
+
return {
|
|
1987
|
+
kind: "transformation",
|
|
1988
|
+
type: "transform",
|
|
1989
|
+
reference: zr,
|
|
1990
|
+
async: !0,
|
|
1991
|
+
operation: r,
|
|
1992
|
+
async "~run"(n) {
|
|
1993
|
+
return n.value = await this.operation(n.value), n;
|
|
1994
|
+
}
|
|
1995
|
+
};
|
|
1996
|
+
}
|
|
1997
|
+
// @__NO_SIDE_EFFECTS__
|
|
1998
|
+
function Tr() {
|
|
1999
|
+
return {
|
|
2000
|
+
kind: "transformation",
|
|
2001
|
+
type: "trim",
|
|
2002
|
+
reference: Tr,
|
|
2003
|
+
async: !1,
|
|
2004
|
+
"~run"(r) {
|
|
2005
|
+
return r.value = r.value.trim(), r;
|
|
2006
|
+
}
|
|
2007
|
+
};
|
|
2008
|
+
}
|
|
2009
|
+
// @__NO_SIDE_EFFECTS__
|
|
2010
|
+
function Fr() {
|
|
2011
|
+
return {
|
|
2012
|
+
kind: "transformation",
|
|
2013
|
+
type: "trim_end",
|
|
2014
|
+
reference: Fr,
|
|
2015
|
+
async: !1,
|
|
2016
|
+
"~run"(r) {
|
|
2017
|
+
return r.value = r.value.trimEnd(), r;
|
|
2018
|
+
}
|
|
2019
|
+
};
|
|
2020
|
+
}
|
|
2021
|
+
// @__NO_SIDE_EFFECTS__
|
|
2022
|
+
function $r() {
|
|
2023
|
+
return {
|
|
2024
|
+
kind: "transformation",
|
|
2025
|
+
type: "trim_start",
|
|
2026
|
+
reference: $r,
|
|
2027
|
+
async: !1,
|
|
2028
|
+
"~run"(r) {
|
|
2029
|
+
return r.value = r.value.trimStart(), r;
|
|
2030
|
+
}
|
|
2031
|
+
};
|
|
2032
|
+
}
|
|
2033
|
+
// @__NO_SIDE_EFFECTS__
|
|
2034
|
+
function Vr(r) {
|
|
2035
|
+
return {
|
|
2036
|
+
kind: "validation",
|
|
2037
|
+
type: "ulid",
|
|
2038
|
+
reference: Vr,
|
|
2039
|
+
async: !1,
|
|
2040
|
+
expects: null,
|
|
2041
|
+
requirement: Pe,
|
|
2042
|
+
message: r,
|
|
2043
|
+
"~run"(n, e) {
|
|
2044
|
+
return n.typed && !this.requirement.test(n.value) && f(this, "ULID", n, e), n;
|
|
2045
|
+
}
|
|
2046
|
+
};
|
|
2047
|
+
}
|
|
2048
|
+
// @__NO_SIDE_EFFECTS__
|
|
2049
|
+
function Lr(r) {
|
|
2050
|
+
return {
|
|
2051
|
+
kind: "validation",
|
|
2052
|
+
type: "url",
|
|
2053
|
+
reference: Lr,
|
|
2054
|
+
async: !1,
|
|
2055
|
+
expects: null,
|
|
2056
|
+
requirement(n) {
|
|
2057
|
+
try {
|
|
2058
|
+
return new URL(n), !0;
|
|
2059
|
+
} catch {
|
|
2060
|
+
return !1;
|
|
2061
|
+
}
|
|
2062
|
+
},
|
|
2063
|
+
message: r,
|
|
2064
|
+
"~run"(n, e) {
|
|
2065
|
+
return n.typed && !this.requirement(n.value) && f(this, "URL", n, e), n;
|
|
2066
|
+
}
|
|
2067
|
+
};
|
|
2068
|
+
}
|
|
2069
|
+
// @__NO_SIDE_EFFECTS__
|
|
2070
|
+
function Jr(r) {
|
|
2071
|
+
return {
|
|
2072
|
+
kind: "validation",
|
|
2073
|
+
type: "uuid",
|
|
2074
|
+
reference: Jr,
|
|
2075
|
+
async: !1,
|
|
2076
|
+
expects: null,
|
|
2077
|
+
requirement: Xe,
|
|
2078
|
+
message: r,
|
|
2079
|
+
"~run"(n, e) {
|
|
2080
|
+
return n.typed && !this.requirement.test(n.value) && f(this, "UUID", n, e), n;
|
|
2081
|
+
}
|
|
2082
|
+
};
|
|
2083
|
+
}
|
|
2084
|
+
// @__NO_SIDE_EFFECTS__
|
|
2085
|
+
function Wr(r, n) {
|
|
2086
|
+
return {
|
|
2087
|
+
kind: "validation",
|
|
2088
|
+
type: "value",
|
|
2089
|
+
reference: Wr,
|
|
2090
|
+
async: !1,
|
|
2091
|
+
expects: r instanceof Date ? r.toJSON() : /* @__PURE__ */ m(r),
|
|
2092
|
+
requirement: r,
|
|
2093
|
+
message: n,
|
|
2094
|
+
"~run"(e, i) {
|
|
2095
|
+
return e.typed && !(this.requirement <= e.value && this.requirement >= e.value) && f(this, "value", e, i, { received: e.value instanceof Date ? e.value.toJSON() : /* @__PURE__ */ m(e.value) }), e;
|
|
2096
|
+
}
|
|
2097
|
+
};
|
|
2098
|
+
}
|
|
2099
|
+
// @__NO_SIDE_EFFECTS__
|
|
2100
|
+
function Br(r, n) {
|
|
2101
|
+
return {
|
|
2102
|
+
kind: "validation",
|
|
2103
|
+
type: "values",
|
|
2104
|
+
reference: Br,
|
|
2105
|
+
async: !1,
|
|
2106
|
+
expects: `${/* @__PURE__ */ E(r.map((e) => e instanceof Date ? e.toJSON() : /* @__PURE__ */ m(e)), "|")}`,
|
|
2107
|
+
requirement: r,
|
|
2108
|
+
message: n,
|
|
2109
|
+
"~run"(e, i) {
|
|
2110
|
+
return e.typed && !this.requirement.some((s) => s <= e.value && s >= e.value) && f(this, "value", e, i, { received: e.value instanceof Date ? e.value.toJSON() : /* @__PURE__ */ m(e.value) }), e;
|
|
2111
|
+
}
|
|
2112
|
+
};
|
|
2113
|
+
}
|
|
2114
|
+
// @__NO_SIDE_EFFECTS__
|
|
2115
|
+
function Ur(r, n, e) {
|
|
2116
|
+
return {
|
|
2117
|
+
kind: "validation",
|
|
2118
|
+
type: "words",
|
|
2119
|
+
reference: Ur,
|
|
2120
|
+
async: !1,
|
|
2121
|
+
expects: `${n}`,
|
|
2122
|
+
locales: r,
|
|
2123
|
+
requirement: n,
|
|
2124
|
+
message: e,
|
|
2125
|
+
"~run"(i, s) {
|
|
2126
|
+
if (i.typed) {
|
|
2127
|
+
const u = /* @__PURE__ */ S(this.locales, i.value);
|
|
2128
|
+
u !== this.requirement && f(this, "words", i, s, { received: `${u}` });
|
|
2129
|
+
}
|
|
2130
|
+
return i;
|
|
2131
|
+
}
|
|
2132
|
+
};
|
|
2133
|
+
}
|
|
2134
|
+
function ws(r, n) {
|
|
2135
|
+
const e = r["~run"]({ value: n }, { abortEarly: !0 }).issues;
|
|
2136
|
+
if (e) throw new x(e);
|
|
2137
|
+
}
|
|
2138
|
+
// @__NO_SIDE_EFFECTS__
|
|
2139
|
+
function Is(r, n) {
|
|
2140
|
+
return {
|
|
2141
|
+
...r,
|
|
2142
|
+
get "~standard"() {
|
|
2143
|
+
return /* @__PURE__ */ y(this);
|
|
2144
|
+
},
|
|
2145
|
+
"~run"(e, i) {
|
|
2146
|
+
return r["~run"](e, {
|
|
2147
|
+
...i,
|
|
2148
|
+
...n
|
|
2149
|
+
});
|
|
2150
|
+
}
|
|
2151
|
+
};
|
|
2152
|
+
}
|
|
2153
|
+
// @__NO_SIDE_EFFECTS__
|
|
2154
|
+
function b(r, n, e) {
|
|
2155
|
+
return typeof r.fallback == "function" ? r.fallback(n, e) : r.fallback;
|
|
2156
|
+
}
|
|
2157
|
+
// @__NO_SIDE_EFFECTS__
|
|
2158
|
+
function Ds(r, n) {
|
|
2159
|
+
return {
|
|
2160
|
+
...r,
|
|
2161
|
+
fallback: n,
|
|
2162
|
+
get "~standard"() {
|
|
2163
|
+
return /* @__PURE__ */ y(this);
|
|
2164
|
+
},
|
|
2165
|
+
"~run"(e, i) {
|
|
2166
|
+
const s = r["~run"](e, i);
|
|
2167
|
+
return s.issues ? {
|
|
2168
|
+
typed: !0,
|
|
2169
|
+
value: /* @__PURE__ */ b(this, s, i)
|
|
2170
|
+
} : s;
|
|
2171
|
+
}
|
|
2172
|
+
};
|
|
2173
|
+
}
|
|
2174
|
+
// @__NO_SIDE_EFFECTS__
|
|
2175
|
+
function js(r, n) {
|
|
2176
|
+
return {
|
|
2177
|
+
...r,
|
|
2178
|
+
fallback: n,
|
|
2179
|
+
async: !0,
|
|
2180
|
+
get "~standard"() {
|
|
2181
|
+
return /* @__PURE__ */ y(this);
|
|
2182
|
+
},
|
|
2183
|
+
async "~run"(e, i) {
|
|
2184
|
+
const s = await r["~run"](e, i);
|
|
2185
|
+
return s.issues ? {
|
|
2186
|
+
typed: !0,
|
|
2187
|
+
value: await /* @__PURE__ */ b(this, s, i)
|
|
2188
|
+
} : s;
|
|
2189
|
+
}
|
|
2190
|
+
};
|
|
2191
|
+
}
|
|
2192
|
+
// @__NO_SIDE_EFFECTS__
|
|
2193
|
+
function Os(r) {
|
|
2194
|
+
const n = {};
|
|
2195
|
+
for (const e of r) if (e.path) {
|
|
2196
|
+
const i = /* @__PURE__ */ $(e);
|
|
2197
|
+
i ? (n.nested || (n.nested = {}), n.nested[i] ? n.nested[i].push(e.message) : n.nested[i] = [e.message]) : n.other ? n.other.push(e.message) : n.other = [e.message];
|
|
2198
|
+
} else n.root ? n.root.push(e.message) : n.root = [e.message];
|
|
2199
|
+
return n;
|
|
2200
|
+
}
|
|
2201
|
+
// @__NO_SIDE_EFFECTS__
|
|
2202
|
+
function Gs(r, n) {
|
|
2203
|
+
return {
|
|
2204
|
+
...r,
|
|
2205
|
+
"~run"(e, i) {
|
|
2206
|
+
const s = e.issues && [...e.issues];
|
|
2207
|
+
if (e = r["~run"](e, i), e.issues) {
|
|
2208
|
+
for (const u of e.issues) if (!s?.includes(u)) {
|
|
2209
|
+
let l = e.value;
|
|
2210
|
+
for (const c of n) {
|
|
2211
|
+
const o = l[c], p = {
|
|
2212
|
+
type: "unknown",
|
|
2213
|
+
origin: "value",
|
|
2214
|
+
input: l,
|
|
2215
|
+
key: c,
|
|
2216
|
+
value: o
|
|
2217
|
+
};
|
|
2218
|
+
if (u.path ? u.path.push(p) : u.path = [p], !o) break;
|
|
2219
|
+
l = o;
|
|
2220
|
+
}
|
|
2221
|
+
}
|
|
2222
|
+
}
|
|
2223
|
+
return e;
|
|
2224
|
+
}
|
|
2225
|
+
};
|
|
2226
|
+
}
|
|
2227
|
+
// @__NO_SIDE_EFFECTS__
|
|
2228
|
+
function Rs(r, n) {
|
|
2229
|
+
return {
|
|
2230
|
+
...r,
|
|
2231
|
+
async: !0,
|
|
2232
|
+
async "~run"(e, i) {
|
|
2233
|
+
const s = e.issues && [...e.issues];
|
|
2234
|
+
if (e = await r["~run"](e, i), e.issues) {
|
|
2235
|
+
for (const u of e.issues) if (!s?.includes(u)) {
|
|
2236
|
+
let l = e.value;
|
|
2237
|
+
for (const c of n) {
|
|
2238
|
+
const o = l[c], p = {
|
|
2239
|
+
type: "unknown",
|
|
2240
|
+
origin: "value",
|
|
2241
|
+
input: l,
|
|
2242
|
+
key: c,
|
|
2243
|
+
value: o
|
|
2244
|
+
};
|
|
2245
|
+
if (u.path ? u.path.push(p) : u.path = [p], !o) break;
|
|
2246
|
+
l = o;
|
|
2247
|
+
}
|
|
2248
|
+
}
|
|
2249
|
+
}
|
|
2250
|
+
return e;
|
|
2251
|
+
}
|
|
2252
|
+
};
|
|
2253
|
+
}
|
|
2254
|
+
// @__NO_SIDE_EFFECTS__
|
|
2255
|
+
function d(r, n, e) {
|
|
2256
|
+
return typeof r.default == "function" ? r.default(n, e) : r.default;
|
|
2257
|
+
}
|
|
2258
|
+
// @__NO_SIDE_EFFECTS__
|
|
2259
|
+
function V(r) {
|
|
2260
|
+
if ("entries" in r) {
|
|
2261
|
+
const n = {};
|
|
2262
|
+
for (const e in r.entries) n[e] = /* @__PURE__ */ V(r.entries[e]);
|
|
2263
|
+
return n;
|
|
2264
|
+
}
|
|
2265
|
+
return "items" in r ? r.items.map(V) : /* @__PURE__ */ d(r);
|
|
2266
|
+
}
|
|
2267
|
+
// @__NO_SIDE_EFFECTS__
|
|
2268
|
+
async function L(r) {
|
|
2269
|
+
return "entries" in r ? Object.fromEntries(await Promise.all(Object.entries(r.entries).map(async ([n, e]) => [n, await /* @__PURE__ */ L(e)]))) : "items" in r ? Promise.all(r.items.map(L)) : /* @__PURE__ */ d(r);
|
|
2270
|
+
}
|
|
2271
|
+
// @__NO_SIDE_EFFECTS__
|
|
2272
|
+
function qs(r) {
|
|
2273
|
+
return /* @__PURE__ */ X(r, "description");
|
|
2274
|
+
}
|
|
2275
|
+
// @__NO_SIDE_EFFECTS__
|
|
2276
|
+
function Ms(r) {
|
|
2277
|
+
const n = [];
|
|
2278
|
+
function e(i) {
|
|
2279
|
+
if ("pipe" in i)
|
|
2280
|
+
for (const s of i.pipe) s.kind === "schema" && "pipe" in s ? e(s) : s.kind === "metadata" && s.type === "examples" && n.push(...s.examples);
|
|
2281
|
+
}
|
|
2282
|
+
return e(r), n;
|
|
2283
|
+
}
|
|
2284
|
+
// @__NO_SIDE_EFFECTS__
|
|
2285
|
+
function J(r) {
|
|
2286
|
+
if ("entries" in r) {
|
|
2287
|
+
const n = {};
|
|
2288
|
+
for (const e in r.entries) n[e] = /* @__PURE__ */ J(r.entries[e]);
|
|
2289
|
+
return n;
|
|
2290
|
+
}
|
|
2291
|
+
return "items" in r ? r.items.map(J) : /* @__PURE__ */ b(r);
|
|
2292
|
+
}
|
|
2293
|
+
// @__NO_SIDE_EFFECTS__
|
|
2294
|
+
async function W(r) {
|
|
2295
|
+
return "entries" in r ? Object.fromEntries(await Promise.all(Object.entries(r.entries).map(async ([n, e]) => [n, await /* @__PURE__ */ W(e)]))) : "items" in r ? Promise.all(r.items.map(W)) : /* @__PURE__ */ b(r);
|
|
2296
|
+
}
|
|
2297
|
+
// @__NO_SIDE_EFFECTS__
|
|
2298
|
+
function Ss(r) {
|
|
2299
|
+
const n = {};
|
|
2300
|
+
function e(i) {
|
|
2301
|
+
if ("pipe" in i)
|
|
2302
|
+
for (const s of i.pipe) s.kind === "schema" && "pipe" in s ? e(s) : s.kind === "metadata" && s.type === "metadata" && Object.assign(n, s.metadata);
|
|
2303
|
+
}
|
|
2304
|
+
return e(r), n;
|
|
2305
|
+
}
|
|
2306
|
+
// @__NO_SIDE_EFFECTS__
|
|
2307
|
+
function Ps(r) {
|
|
2308
|
+
return /* @__PURE__ */ X(r, "title");
|
|
2309
|
+
}
|
|
2310
|
+
// @__NO_SIDE_EFFECTS__
|
|
2311
|
+
function Xs(r, n) {
|
|
2312
|
+
return !r["~run"]({ value: n }, { abortEarly: !0 }).issues;
|
|
2313
|
+
}
|
|
2314
|
+
// @__NO_SIDE_EFFECTS__
|
|
2315
|
+
function Zr() {
|
|
2316
|
+
return {
|
|
2317
|
+
kind: "schema",
|
|
2318
|
+
type: "any",
|
|
2319
|
+
reference: Zr,
|
|
2320
|
+
expects: "any",
|
|
2321
|
+
async: !1,
|
|
2322
|
+
get "~standard"() {
|
|
2323
|
+
return /* @__PURE__ */ y(this);
|
|
2324
|
+
},
|
|
2325
|
+
"~run"(r) {
|
|
2326
|
+
return r.typed = !0, r;
|
|
2327
|
+
}
|
|
2328
|
+
};
|
|
2329
|
+
}
|
|
2330
|
+
// @__NO_SIDE_EFFECTS__
|
|
2331
|
+
function Kr(r, n) {
|
|
2332
|
+
return {
|
|
2333
|
+
kind: "schema",
|
|
2334
|
+
type: "array",
|
|
2335
|
+
reference: Kr,
|
|
2336
|
+
expects: "Array",
|
|
2337
|
+
async: !1,
|
|
2338
|
+
item: r,
|
|
2339
|
+
message: n,
|
|
2340
|
+
get "~standard"() {
|
|
2341
|
+
return /* @__PURE__ */ y(this);
|
|
2342
|
+
},
|
|
2343
|
+
"~run"(e, i) {
|
|
2344
|
+
const s = e.value;
|
|
2345
|
+
if (Array.isArray(s)) {
|
|
2346
|
+
e.typed = !0, e.value = [];
|
|
2347
|
+
for (let u = 0; u < s.length; u++) {
|
|
2348
|
+
const l = s[u], c = this.item["~run"]({ value: l }, i);
|
|
2349
|
+
if (c.issues) {
|
|
2350
|
+
const o = {
|
|
2351
|
+
type: "array",
|
|
2352
|
+
origin: "value",
|
|
2353
|
+
input: s,
|
|
2354
|
+
key: u,
|
|
2355
|
+
value: l
|
|
2356
|
+
};
|
|
2357
|
+
for (const p of c.issues)
|
|
2358
|
+
p.path ? p.path.unshift(o) : p.path = [o], e.issues?.push(p);
|
|
2359
|
+
if (e.issues || (e.issues = c.issues), i.abortEarly) {
|
|
2360
|
+
e.typed = !1;
|
|
2361
|
+
break;
|
|
2362
|
+
}
|
|
2363
|
+
}
|
|
2364
|
+
c.typed || (e.typed = !1), e.value.push(c.value);
|
|
2365
|
+
}
|
|
2366
|
+
} else f(this, "type", e, i);
|
|
2367
|
+
return e;
|
|
2368
|
+
}
|
|
2369
|
+
};
|
|
2370
|
+
}
|
|
2371
|
+
// @__NO_SIDE_EFFECTS__
|
|
2372
|
+
function Hr(r, n) {
|
|
2373
|
+
return {
|
|
2374
|
+
kind: "schema",
|
|
2375
|
+
type: "array",
|
|
2376
|
+
reference: Hr,
|
|
2377
|
+
expects: "Array",
|
|
2378
|
+
async: !0,
|
|
2379
|
+
item: r,
|
|
2380
|
+
message: n,
|
|
2381
|
+
get "~standard"() {
|
|
2382
|
+
return /* @__PURE__ */ y(this);
|
|
2383
|
+
},
|
|
2384
|
+
async "~run"(e, i) {
|
|
2385
|
+
const s = e.value;
|
|
2386
|
+
if (Array.isArray(s)) {
|
|
2387
|
+
e.typed = !0, e.value = [];
|
|
2388
|
+
const u = await Promise.all(s.map((l) => this.item["~run"]({ value: l }, i)));
|
|
2389
|
+
for (let l = 0; l < u.length; l++) {
|
|
2390
|
+
const c = u[l];
|
|
2391
|
+
if (c.issues) {
|
|
2392
|
+
const o = {
|
|
2393
|
+
type: "array",
|
|
2394
|
+
origin: "value",
|
|
2395
|
+
input: s,
|
|
2396
|
+
key: l,
|
|
2397
|
+
value: s[l]
|
|
2398
|
+
};
|
|
2399
|
+
for (const p of c.issues)
|
|
2400
|
+
p.path ? p.path.unshift(o) : p.path = [o], e.issues?.push(p);
|
|
2401
|
+
if (e.issues || (e.issues = c.issues), i.abortEarly) {
|
|
2402
|
+
e.typed = !1;
|
|
2403
|
+
break;
|
|
2404
|
+
}
|
|
2405
|
+
}
|
|
2406
|
+
c.typed || (e.typed = !1), e.value.push(c.value);
|
|
2407
|
+
}
|
|
2408
|
+
} else f(this, "type", e, i);
|
|
2409
|
+
return e;
|
|
2410
|
+
}
|
|
2411
|
+
};
|
|
2412
|
+
}
|
|
2413
|
+
// @__NO_SIDE_EFFECTS__
|
|
2414
|
+
function Qr(r) {
|
|
2415
|
+
return {
|
|
2416
|
+
kind: "schema",
|
|
2417
|
+
type: "bigint",
|
|
2418
|
+
reference: Qr,
|
|
2419
|
+
expects: "bigint",
|
|
2420
|
+
async: !1,
|
|
2421
|
+
message: r,
|
|
2422
|
+
get "~standard"() {
|
|
2423
|
+
return /* @__PURE__ */ y(this);
|
|
2424
|
+
},
|
|
2425
|
+
"~run"(n, e) {
|
|
2426
|
+
return typeof n.value == "bigint" ? n.typed = !0 : f(this, "type", n, e), n;
|
|
2427
|
+
}
|
|
2428
|
+
};
|
|
2429
|
+
}
|
|
2430
|
+
// @__NO_SIDE_EFFECTS__
|
|
2431
|
+
function Yr(r) {
|
|
2432
|
+
return {
|
|
2433
|
+
kind: "schema",
|
|
2434
|
+
type: "blob",
|
|
2435
|
+
reference: Yr,
|
|
2436
|
+
expects: "Blob",
|
|
2437
|
+
async: !1,
|
|
2438
|
+
message: r,
|
|
2439
|
+
get "~standard"() {
|
|
2440
|
+
return /* @__PURE__ */ y(this);
|
|
2441
|
+
},
|
|
2442
|
+
"~run"(n, e) {
|
|
2443
|
+
return n.value instanceof Blob ? n.typed = !0 : f(this, "type", n, e), n;
|
|
2444
|
+
}
|
|
2445
|
+
};
|
|
2446
|
+
}
|
|
2447
|
+
// @__NO_SIDE_EFFECTS__
|
|
2448
|
+
function ei(r) {
|
|
2449
|
+
return {
|
|
2450
|
+
kind: "schema",
|
|
2451
|
+
type: "boolean",
|
|
2452
|
+
reference: ei,
|
|
2453
|
+
expects: "boolean",
|
|
2454
|
+
async: !1,
|
|
2455
|
+
message: r,
|
|
2456
|
+
get "~standard"() {
|
|
2457
|
+
return /* @__PURE__ */ y(this);
|
|
2458
|
+
},
|
|
2459
|
+
"~run"(n, e) {
|
|
2460
|
+
return typeof n.value == "boolean" ? n.typed = !0 : f(this, "type", n, e), n;
|
|
2461
|
+
}
|
|
2462
|
+
};
|
|
2463
|
+
}
|
|
2464
|
+
// @__NO_SIDE_EFFECTS__
|
|
2465
|
+
function ni(r, n) {
|
|
2466
|
+
return {
|
|
2467
|
+
kind: "schema",
|
|
2468
|
+
type: "custom",
|
|
2469
|
+
reference: ni,
|
|
2470
|
+
expects: "unknown",
|
|
2471
|
+
async: !1,
|
|
2472
|
+
check: r,
|
|
2473
|
+
message: n,
|
|
2474
|
+
get "~standard"() {
|
|
2475
|
+
return /* @__PURE__ */ y(this);
|
|
2476
|
+
},
|
|
2477
|
+
"~run"(e, i) {
|
|
2478
|
+
return this.check(e.value) ? e.typed = !0 : f(this, "type", e, i), e;
|
|
2479
|
+
}
|
|
2480
|
+
};
|
|
2481
|
+
}
|
|
2482
|
+
// @__NO_SIDE_EFFECTS__
|
|
2483
|
+
function ri(r, n) {
|
|
2484
|
+
return {
|
|
2485
|
+
kind: "schema",
|
|
2486
|
+
type: "custom",
|
|
2487
|
+
reference: ri,
|
|
2488
|
+
expects: "unknown",
|
|
2489
|
+
async: !0,
|
|
2490
|
+
check: r,
|
|
2491
|
+
message: n,
|
|
2492
|
+
get "~standard"() {
|
|
2493
|
+
return /* @__PURE__ */ y(this);
|
|
2494
|
+
},
|
|
2495
|
+
async "~run"(e, i) {
|
|
2496
|
+
return await this.check(e.value) ? e.typed = !0 : f(this, "type", e, i), e;
|
|
2497
|
+
}
|
|
2498
|
+
};
|
|
2499
|
+
}
|
|
2500
|
+
// @__NO_SIDE_EFFECTS__
|
|
2501
|
+
function ii(r) {
|
|
2502
|
+
return {
|
|
2503
|
+
kind: "schema",
|
|
2504
|
+
type: "date",
|
|
2505
|
+
reference: ii,
|
|
2506
|
+
expects: "Date",
|
|
2507
|
+
async: !1,
|
|
2508
|
+
message: r,
|
|
2509
|
+
get "~standard"() {
|
|
2510
|
+
return /* @__PURE__ */ y(this);
|
|
2511
|
+
},
|
|
2512
|
+
"~run"(n, e) {
|
|
2513
|
+
return n.value instanceof Date ? isNaN(n.value) ? f(this, "type", n, e, { received: '"Invalid Date"' }) : n.typed = !0 : f(this, "type", n, e), n;
|
|
2514
|
+
}
|
|
2515
|
+
};
|
|
2516
|
+
}
|
|
2517
|
+
// @__NO_SIDE_EFFECTS__
|
|
2518
|
+
function B(r, n) {
|
|
2519
|
+
const e = [];
|
|
2520
|
+
for (const i in r) (`${+i}` !== i || typeof r[i] != "string" || !Object.is(r[r[i]], +i)) && e.push(r[i]);
|
|
2521
|
+
return {
|
|
2522
|
+
kind: "schema",
|
|
2523
|
+
type: "enum",
|
|
2524
|
+
reference: B,
|
|
2525
|
+
expects: /* @__PURE__ */ E(e.map(m), "|"),
|
|
2526
|
+
async: !1,
|
|
2527
|
+
enum: r,
|
|
2528
|
+
options: e,
|
|
2529
|
+
message: n,
|
|
2530
|
+
get "~standard"() {
|
|
2531
|
+
return /* @__PURE__ */ y(this);
|
|
2532
|
+
},
|
|
2533
|
+
"~run"(i, s) {
|
|
2534
|
+
return this.options.includes(i.value) ? i.typed = !0 : f(this, "type", i, s), i;
|
|
2535
|
+
}
|
|
2536
|
+
};
|
|
2537
|
+
}
|
|
2538
|
+
// @__NO_SIDE_EFFECTS__
|
|
2539
|
+
function si(r, n) {
|
|
2540
|
+
return {
|
|
2541
|
+
kind: "schema",
|
|
2542
|
+
type: "exact_optional",
|
|
2543
|
+
reference: si,
|
|
2544
|
+
expects: r.expects,
|
|
2545
|
+
async: !1,
|
|
2546
|
+
wrapped: r,
|
|
2547
|
+
default: n,
|
|
2548
|
+
get "~standard"() {
|
|
2549
|
+
return /* @__PURE__ */ y(this);
|
|
2550
|
+
},
|
|
2551
|
+
"~run"(e, i) {
|
|
2552
|
+
return this.wrapped["~run"](e, i);
|
|
2553
|
+
}
|
|
2554
|
+
};
|
|
2555
|
+
}
|
|
2556
|
+
// @__NO_SIDE_EFFECTS__
|
|
2557
|
+
function ti(r, n) {
|
|
2558
|
+
return {
|
|
2559
|
+
kind: "schema",
|
|
2560
|
+
type: "exact_optional",
|
|
2561
|
+
reference: ti,
|
|
2562
|
+
expects: r.expects,
|
|
2563
|
+
async: !0,
|
|
2564
|
+
wrapped: r,
|
|
2565
|
+
default: n,
|
|
2566
|
+
get "~standard"() {
|
|
2567
|
+
return /* @__PURE__ */ y(this);
|
|
2568
|
+
},
|
|
2569
|
+
async "~run"(e, i) {
|
|
2570
|
+
return this.wrapped["~run"](e, i);
|
|
2571
|
+
}
|
|
2572
|
+
};
|
|
2573
|
+
}
|
|
2574
|
+
// @__NO_SIDE_EFFECTS__
|
|
2575
|
+
function ui(r) {
|
|
2576
|
+
return {
|
|
2577
|
+
kind: "schema",
|
|
2578
|
+
type: "file",
|
|
2579
|
+
reference: ui,
|
|
2580
|
+
expects: "File",
|
|
2581
|
+
async: !1,
|
|
2582
|
+
message: r,
|
|
2583
|
+
get "~standard"() {
|
|
2584
|
+
return /* @__PURE__ */ y(this);
|
|
2585
|
+
},
|
|
2586
|
+
"~run"(n, e) {
|
|
2587
|
+
return n.value instanceof File ? n.typed = !0 : f(this, "type", n, e), n;
|
|
2588
|
+
}
|
|
2589
|
+
};
|
|
2590
|
+
}
|
|
2591
|
+
// @__NO_SIDE_EFFECTS__
|
|
2592
|
+
function U(r) {
|
|
2593
|
+
return {
|
|
2594
|
+
kind: "schema",
|
|
2595
|
+
type: "function",
|
|
2596
|
+
reference: U,
|
|
2597
|
+
expects: "Function",
|
|
2598
|
+
async: !1,
|
|
2599
|
+
message: r,
|
|
2600
|
+
get "~standard"() {
|
|
2601
|
+
return /* @__PURE__ */ y(this);
|
|
2602
|
+
},
|
|
2603
|
+
"~run"(n, e) {
|
|
2604
|
+
return typeof n.value == "function" ? n.typed = !0 : f(this, "type", n, e), n;
|
|
2605
|
+
}
|
|
2606
|
+
};
|
|
2607
|
+
}
|
|
2608
|
+
// @__NO_SIDE_EFFECTS__
|
|
2609
|
+
function li(r, n) {
|
|
2610
|
+
return {
|
|
2611
|
+
kind: "schema",
|
|
2612
|
+
type: "instance",
|
|
2613
|
+
reference: li,
|
|
2614
|
+
expects: r.name,
|
|
2615
|
+
async: !1,
|
|
2616
|
+
class: r,
|
|
2617
|
+
message: n,
|
|
2618
|
+
get "~standard"() {
|
|
2619
|
+
return /* @__PURE__ */ y(this);
|
|
2620
|
+
},
|
|
2621
|
+
"~run"(e, i) {
|
|
2622
|
+
return e.value instanceof this.class ? e.typed = !0 : f(this, "type", e, i), e;
|
|
2623
|
+
}
|
|
2624
|
+
};
|
|
2625
|
+
}
|
|
2626
|
+
// @__NO_SIDE_EFFECTS__
|
|
2627
|
+
function N(r, n) {
|
|
2628
|
+
if (typeof r == typeof n) {
|
|
2629
|
+
if (r === n || r instanceof Date && n instanceof Date && +r == +n) return { value: r };
|
|
2630
|
+
if (r && n && r.constructor === Object && n.constructor === Object) {
|
|
2631
|
+
for (const e in n) if (e in r) {
|
|
2632
|
+
const i = /* @__PURE__ */ N(r[e], n[e]);
|
|
2633
|
+
if (i.issue) return i;
|
|
2634
|
+
r[e] = i.value;
|
|
2635
|
+
} else r[e] = n[e];
|
|
2636
|
+
return { value: r };
|
|
2637
|
+
}
|
|
2638
|
+
if (Array.isArray(r) && Array.isArray(n) && r.length === n.length) {
|
|
2639
|
+
for (let e = 0; e < r.length; e++) {
|
|
2640
|
+
const i = /* @__PURE__ */ N(r[e], n[e]);
|
|
2641
|
+
if (i.issue) return i;
|
|
2642
|
+
r[e] = i.value;
|
|
2643
|
+
}
|
|
2644
|
+
return { value: r };
|
|
2645
|
+
}
|
|
2646
|
+
}
|
|
2647
|
+
return { issue: !0 };
|
|
2648
|
+
}
|
|
2649
|
+
// @__NO_SIDE_EFFECTS__
|
|
2650
|
+
function oi(r, n) {
|
|
2651
|
+
return {
|
|
2652
|
+
kind: "schema",
|
|
2653
|
+
type: "intersect",
|
|
2654
|
+
reference: oi,
|
|
2655
|
+
expects: /* @__PURE__ */ E(r.map((e) => e.expects), "&"),
|
|
2656
|
+
async: !1,
|
|
2657
|
+
options: r,
|
|
2658
|
+
message: n,
|
|
2659
|
+
get "~standard"() {
|
|
2660
|
+
return /* @__PURE__ */ y(this);
|
|
2661
|
+
},
|
|
2662
|
+
"~run"(e, i) {
|
|
2663
|
+
if (this.options.length) {
|
|
2664
|
+
const s = e.value;
|
|
2665
|
+
let u;
|
|
2666
|
+
e.typed = !0;
|
|
2667
|
+
for (const l of this.options) {
|
|
2668
|
+
const c = l["~run"]({ value: s }, i);
|
|
2669
|
+
if (c.issues && (e.issues ? e.issues.push(...c.issues) : e.issues = c.issues, i.abortEarly)) {
|
|
2670
|
+
e.typed = !1;
|
|
2671
|
+
break;
|
|
2672
|
+
}
|
|
2673
|
+
c.typed || (e.typed = !1), e.typed && (u ? u.push(c.value) : u = [c.value]);
|
|
2674
|
+
}
|
|
2675
|
+
if (e.typed) {
|
|
2676
|
+
e.value = u[0];
|
|
2677
|
+
for (let l = 1; l < u.length; l++) {
|
|
2678
|
+
const c = /* @__PURE__ */ N(e.value, u[l]);
|
|
2679
|
+
if (c.issue) {
|
|
2680
|
+
f(this, "type", e, i, { received: "unknown" });
|
|
2681
|
+
break;
|
|
2682
|
+
}
|
|
2683
|
+
e.value = c.value;
|
|
2684
|
+
}
|
|
2685
|
+
}
|
|
2686
|
+
} else f(this, "type", e, i);
|
|
2687
|
+
return e;
|
|
2688
|
+
}
|
|
2689
|
+
};
|
|
2690
|
+
}
|
|
2691
|
+
// @__NO_SIDE_EFFECTS__
|
|
2692
|
+
function ci(r, n) {
|
|
2693
|
+
return {
|
|
2694
|
+
kind: "schema",
|
|
2695
|
+
type: "intersect",
|
|
2696
|
+
reference: ci,
|
|
2697
|
+
expects: /* @__PURE__ */ E(r.map((e) => e.expects), "&"),
|
|
2698
|
+
async: !0,
|
|
2699
|
+
options: r,
|
|
2700
|
+
message: n,
|
|
2701
|
+
get "~standard"() {
|
|
2702
|
+
return /* @__PURE__ */ y(this);
|
|
2703
|
+
},
|
|
2704
|
+
async "~run"(e, i) {
|
|
2705
|
+
if (this.options.length) {
|
|
2706
|
+
const s = e.value;
|
|
2707
|
+
let u;
|
|
2708
|
+
e.typed = !0;
|
|
2709
|
+
const l = await Promise.all(this.options.map((c) => c["~run"]({ value: s }, i)));
|
|
2710
|
+
for (const c of l) {
|
|
2711
|
+
if (c.issues && (e.issues ? e.issues.push(...c.issues) : e.issues = c.issues, i.abortEarly)) {
|
|
2712
|
+
e.typed = !1;
|
|
2713
|
+
break;
|
|
2714
|
+
}
|
|
2715
|
+
c.typed || (e.typed = !1), e.typed && (u ? u.push(c.value) : u = [c.value]);
|
|
2716
|
+
}
|
|
2717
|
+
if (e.typed) {
|
|
2718
|
+
e.value = u[0];
|
|
2719
|
+
for (let c = 1; c < u.length; c++) {
|
|
2720
|
+
const o = /* @__PURE__ */ N(e.value, u[c]);
|
|
2721
|
+
if (o.issue) {
|
|
2722
|
+
f(this, "type", e, i, { received: "unknown" });
|
|
2723
|
+
break;
|
|
2724
|
+
}
|
|
2725
|
+
e.value = o.value;
|
|
2726
|
+
}
|
|
2727
|
+
}
|
|
2728
|
+
} else f(this, "type", e, i);
|
|
2729
|
+
return e;
|
|
2730
|
+
}
|
|
2731
|
+
};
|
|
2732
|
+
}
|
|
2733
|
+
// @__NO_SIDE_EFFECTS__
|
|
2734
|
+
function fi(r) {
|
|
2735
|
+
return {
|
|
2736
|
+
kind: "schema",
|
|
2737
|
+
type: "lazy",
|
|
2738
|
+
reference: fi,
|
|
2739
|
+
expects: "unknown",
|
|
2740
|
+
async: !1,
|
|
2741
|
+
getter: r,
|
|
2742
|
+
get "~standard"() {
|
|
2743
|
+
return /* @__PURE__ */ y(this);
|
|
2744
|
+
},
|
|
2745
|
+
"~run"(n, e) {
|
|
2746
|
+
return this.getter(n.value)["~run"](n, e);
|
|
2747
|
+
}
|
|
2748
|
+
};
|
|
2749
|
+
}
|
|
2750
|
+
// @__NO_SIDE_EFFECTS__
|
|
2751
|
+
function pi(r) {
|
|
2752
|
+
return {
|
|
2753
|
+
kind: "schema",
|
|
2754
|
+
type: "lazy",
|
|
2755
|
+
reference: pi,
|
|
2756
|
+
expects: "unknown",
|
|
2757
|
+
async: !0,
|
|
2758
|
+
getter: r,
|
|
2759
|
+
get "~standard"() {
|
|
2760
|
+
return /* @__PURE__ */ y(this);
|
|
2761
|
+
},
|
|
2762
|
+
async "~run"(n, e) {
|
|
2763
|
+
return (await this.getter(n.value))["~run"](n, e);
|
|
2764
|
+
}
|
|
2765
|
+
};
|
|
2766
|
+
}
|
|
2767
|
+
// @__NO_SIDE_EFFECTS__
|
|
2768
|
+
function ai(r, n) {
|
|
2769
|
+
return {
|
|
2770
|
+
kind: "schema",
|
|
2771
|
+
type: "literal",
|
|
2772
|
+
reference: ai,
|
|
2773
|
+
expects: /* @__PURE__ */ m(r),
|
|
2774
|
+
async: !1,
|
|
2775
|
+
literal: r,
|
|
2776
|
+
message: n,
|
|
2777
|
+
get "~standard"() {
|
|
2778
|
+
return /* @__PURE__ */ y(this);
|
|
2779
|
+
},
|
|
2780
|
+
"~run"(e, i) {
|
|
2781
|
+
return e.value === this.literal ? e.typed = !0 : f(this, "type", e, i), e;
|
|
2782
|
+
}
|
|
2783
|
+
};
|
|
2784
|
+
}
|
|
2785
|
+
// @__NO_SIDE_EFFECTS__
|
|
2786
|
+
function yi(r, n) {
|
|
2787
|
+
return {
|
|
2788
|
+
kind: "schema",
|
|
2789
|
+
type: "loose_object",
|
|
2790
|
+
reference: yi,
|
|
2791
|
+
expects: "Object",
|
|
2792
|
+
async: !1,
|
|
2793
|
+
entries: r,
|
|
2794
|
+
message: n,
|
|
2795
|
+
get "~standard"() {
|
|
2796
|
+
return /* @__PURE__ */ y(this);
|
|
2797
|
+
},
|
|
2798
|
+
"~run"(e, i) {
|
|
2799
|
+
const s = e.value;
|
|
2800
|
+
if (s && typeof s == "object") {
|
|
2801
|
+
e.typed = !0, e.value = {};
|
|
2802
|
+
for (const u in this.entries) {
|
|
2803
|
+
const l = this.entries[u];
|
|
2804
|
+
if (u in s || (l.type === "exact_optional" || l.type === "optional" || l.type === "nullish") && l.default !== void 0) {
|
|
2805
|
+
const c = u in s ? s[u] : /* @__PURE__ */ d(l), o = l["~run"]({ value: c }, i);
|
|
2806
|
+
if (o.issues) {
|
|
2807
|
+
const p = {
|
|
2808
|
+
type: "object",
|
|
2809
|
+
origin: "value",
|
|
2810
|
+
input: s,
|
|
2811
|
+
key: u,
|
|
2812
|
+
value: c
|
|
2813
|
+
};
|
|
2814
|
+
for (const a of o.issues)
|
|
2815
|
+
a.path ? a.path.unshift(p) : a.path = [p], e.issues?.push(a);
|
|
2816
|
+
if (e.issues || (e.issues = o.issues), i.abortEarly) {
|
|
2817
|
+
e.typed = !1;
|
|
2818
|
+
break;
|
|
2819
|
+
}
|
|
2820
|
+
}
|
|
2821
|
+
o.typed || (e.typed = !1), e.value[u] = o.value;
|
|
2822
|
+
} else if (l.fallback !== void 0) e.value[u] = /* @__PURE__ */ b(l);
|
|
2823
|
+
else if (l.type !== "exact_optional" && l.type !== "optional" && l.type !== "nullish" && (f(this, "key", e, i, {
|
|
2824
|
+
input: void 0,
|
|
2825
|
+
expected: `"${u}"`,
|
|
2826
|
+
path: [{
|
|
2827
|
+
type: "object",
|
|
2828
|
+
origin: "key",
|
|
2829
|
+
input: s,
|
|
2830
|
+
key: u,
|
|
2831
|
+
value: s[u]
|
|
2832
|
+
}]
|
|
2833
|
+
}), i.abortEarly))
|
|
2834
|
+
break;
|
|
2835
|
+
}
|
|
2836
|
+
if (!e.issues || !i.abortEarly)
|
|
2837
|
+
for (const u in s) /* @__PURE__ */ I(s, u) && !(u in this.entries) && (e.value[u] = s[u]);
|
|
2838
|
+
} else f(this, "type", e, i);
|
|
2839
|
+
return e;
|
|
2840
|
+
}
|
|
2841
|
+
};
|
|
2842
|
+
}
|
|
2843
|
+
// @__NO_SIDE_EFFECTS__
|
|
2844
|
+
function hi(r, n) {
|
|
2845
|
+
return {
|
|
2846
|
+
kind: "schema",
|
|
2847
|
+
type: "loose_object",
|
|
2848
|
+
reference: hi,
|
|
2849
|
+
expects: "Object",
|
|
2850
|
+
async: !0,
|
|
2851
|
+
entries: r,
|
|
2852
|
+
message: n,
|
|
2853
|
+
get "~standard"() {
|
|
2854
|
+
return /* @__PURE__ */ y(this);
|
|
2855
|
+
},
|
|
2856
|
+
async "~run"(e, i) {
|
|
2857
|
+
const s = e.value;
|
|
2858
|
+
if (s && typeof s == "object") {
|
|
2859
|
+
e.typed = !0, e.value = {};
|
|
2860
|
+
const u = await Promise.all(Object.entries(this.entries).map(async ([l, c]) => {
|
|
2861
|
+
if (l in s || (c.type === "exact_optional" || c.type === "optional" || c.type === "nullish") && c.default !== void 0) {
|
|
2862
|
+
const o = l in s ? s[l] : await /* @__PURE__ */ d(c);
|
|
2863
|
+
return [
|
|
2864
|
+
l,
|
|
2865
|
+
o,
|
|
2866
|
+
c,
|
|
2867
|
+
await c["~run"]({ value: o }, i)
|
|
2868
|
+
];
|
|
2869
|
+
}
|
|
2870
|
+
return [
|
|
2871
|
+
l,
|
|
2872
|
+
s[l],
|
|
2873
|
+
c,
|
|
2874
|
+
null
|
|
2875
|
+
];
|
|
2876
|
+
}));
|
|
2877
|
+
for (const [l, c, o, p] of u) if (p) {
|
|
2878
|
+
if (p.issues) {
|
|
2879
|
+
const a = {
|
|
2880
|
+
type: "object",
|
|
2881
|
+
origin: "value",
|
|
2882
|
+
input: s,
|
|
2883
|
+
key: l,
|
|
2884
|
+
value: c
|
|
2885
|
+
};
|
|
2886
|
+
for (const h of p.issues)
|
|
2887
|
+
h.path ? h.path.unshift(a) : h.path = [a], e.issues?.push(h);
|
|
2888
|
+
if (e.issues || (e.issues = p.issues), i.abortEarly) {
|
|
2889
|
+
e.typed = !1;
|
|
2890
|
+
break;
|
|
2891
|
+
}
|
|
2892
|
+
}
|
|
2893
|
+
p.typed || (e.typed = !1), e.value[l] = p.value;
|
|
2894
|
+
} else if (o.fallback !== void 0) e.value[l] = await /* @__PURE__ */ b(o);
|
|
2895
|
+
else if (o.type !== "exact_optional" && o.type !== "optional" && o.type !== "nullish" && (f(this, "key", e, i, {
|
|
2896
|
+
input: void 0,
|
|
2897
|
+
expected: `"${l}"`,
|
|
2898
|
+
path: [{
|
|
2899
|
+
type: "object",
|
|
2900
|
+
origin: "key",
|
|
2901
|
+
input: s,
|
|
2902
|
+
key: l,
|
|
2903
|
+
value: c
|
|
2904
|
+
}]
|
|
2905
|
+
}), i.abortEarly))
|
|
2906
|
+
break;
|
|
2907
|
+
if (!e.issues || !i.abortEarly)
|
|
2908
|
+
for (const l in s) /* @__PURE__ */ I(s, l) && !(l in this.entries) && (e.value[l] = s[l]);
|
|
2909
|
+
} else f(this, "type", e, i);
|
|
2910
|
+
return e;
|
|
2911
|
+
}
|
|
2912
|
+
};
|
|
2913
|
+
}
|
|
2914
|
+
// @__NO_SIDE_EFFECTS__
|
|
2915
|
+
function vi(r, n) {
|
|
2916
|
+
return {
|
|
2917
|
+
kind: "schema",
|
|
2918
|
+
type: "loose_tuple",
|
|
2919
|
+
reference: vi,
|
|
2920
|
+
expects: "Array",
|
|
2921
|
+
async: !1,
|
|
2922
|
+
items: r,
|
|
2923
|
+
message: n,
|
|
2924
|
+
get "~standard"() {
|
|
2925
|
+
return /* @__PURE__ */ y(this);
|
|
2926
|
+
},
|
|
2927
|
+
"~run"(e, i) {
|
|
2928
|
+
const s = e.value;
|
|
2929
|
+
if (Array.isArray(s)) {
|
|
2930
|
+
e.typed = !0, e.value = [];
|
|
2931
|
+
for (let u = 0; u < this.items.length; u++) {
|
|
2932
|
+
const l = s[u], c = this.items[u]["~run"]({ value: l }, i);
|
|
2933
|
+
if (c.issues) {
|
|
2934
|
+
const o = {
|
|
2935
|
+
type: "array",
|
|
2936
|
+
origin: "value",
|
|
2937
|
+
input: s,
|
|
2938
|
+
key: u,
|
|
2939
|
+
value: l
|
|
2940
|
+
};
|
|
2941
|
+
for (const p of c.issues)
|
|
2942
|
+
p.path ? p.path.unshift(o) : p.path = [o], e.issues?.push(p);
|
|
2943
|
+
if (e.issues || (e.issues = c.issues), i.abortEarly) {
|
|
2944
|
+
e.typed = !1;
|
|
2945
|
+
break;
|
|
2946
|
+
}
|
|
2947
|
+
}
|
|
2948
|
+
c.typed || (e.typed = !1), e.value.push(c.value);
|
|
2949
|
+
}
|
|
2950
|
+
if (!e.issues || !i.abortEarly) for (let u = this.items.length; u < s.length; u++) e.value.push(s[u]);
|
|
2951
|
+
} else f(this, "type", e, i);
|
|
2952
|
+
return e;
|
|
2953
|
+
}
|
|
2954
|
+
};
|
|
2955
|
+
}
|
|
2956
|
+
// @__NO_SIDE_EFFECTS__
|
|
2957
|
+
function mi(r, n) {
|
|
2958
|
+
return {
|
|
2959
|
+
kind: "schema",
|
|
2960
|
+
type: "loose_tuple",
|
|
2961
|
+
reference: mi,
|
|
2962
|
+
expects: "Array",
|
|
2963
|
+
async: !0,
|
|
2964
|
+
items: r,
|
|
2965
|
+
message: n,
|
|
2966
|
+
get "~standard"() {
|
|
2967
|
+
return /* @__PURE__ */ y(this);
|
|
2968
|
+
},
|
|
2969
|
+
async "~run"(e, i) {
|
|
2970
|
+
const s = e.value;
|
|
2971
|
+
if (Array.isArray(s)) {
|
|
2972
|
+
e.typed = !0, e.value = [];
|
|
2973
|
+
const u = await Promise.all(this.items.map(async (l, c) => {
|
|
2974
|
+
const o = s[c];
|
|
2975
|
+
return [
|
|
2976
|
+
c,
|
|
2977
|
+
o,
|
|
2978
|
+
await l["~run"]({ value: o }, i)
|
|
2979
|
+
];
|
|
2980
|
+
}));
|
|
2981
|
+
for (const [l, c, o] of u) {
|
|
2982
|
+
if (o.issues) {
|
|
2983
|
+
const p = {
|
|
2984
|
+
type: "array",
|
|
2985
|
+
origin: "value",
|
|
2986
|
+
input: s,
|
|
2987
|
+
key: l,
|
|
2988
|
+
value: c
|
|
2989
|
+
};
|
|
2990
|
+
for (const a of o.issues)
|
|
2991
|
+
a.path ? a.path.unshift(p) : a.path = [p], e.issues?.push(a);
|
|
2992
|
+
if (e.issues || (e.issues = o.issues), i.abortEarly) {
|
|
2993
|
+
e.typed = !1;
|
|
2994
|
+
break;
|
|
2995
|
+
}
|
|
2996
|
+
}
|
|
2997
|
+
o.typed || (e.typed = !1), e.value.push(o.value);
|
|
2998
|
+
}
|
|
2999
|
+
if (!e.issues || !i.abortEarly) for (let l = this.items.length; l < s.length; l++) e.value.push(s[l]);
|
|
3000
|
+
} else f(this, "type", e, i);
|
|
3001
|
+
return e;
|
|
3002
|
+
}
|
|
3003
|
+
};
|
|
3004
|
+
}
|
|
3005
|
+
// @__NO_SIDE_EFFECTS__
|
|
3006
|
+
function gi(r, n, e) {
|
|
3007
|
+
return {
|
|
3008
|
+
kind: "schema",
|
|
3009
|
+
type: "map",
|
|
3010
|
+
reference: gi,
|
|
3011
|
+
expects: "Map",
|
|
3012
|
+
async: !1,
|
|
3013
|
+
key: r,
|
|
3014
|
+
value: n,
|
|
3015
|
+
message: e,
|
|
3016
|
+
get "~standard"() {
|
|
3017
|
+
return /* @__PURE__ */ y(this);
|
|
3018
|
+
},
|
|
3019
|
+
"~run"(i, s) {
|
|
3020
|
+
const u = i.value;
|
|
3021
|
+
if (u instanceof Map) {
|
|
3022
|
+
i.typed = !0, i.value = /* @__PURE__ */ new Map();
|
|
3023
|
+
for (const [l, c] of u) {
|
|
3024
|
+
const o = this.key["~run"]({ value: l }, s);
|
|
3025
|
+
if (o.issues) {
|
|
3026
|
+
const a = {
|
|
3027
|
+
type: "map",
|
|
3028
|
+
origin: "key",
|
|
3029
|
+
input: u,
|
|
3030
|
+
key: l,
|
|
3031
|
+
value: c
|
|
3032
|
+
};
|
|
3033
|
+
for (const h of o.issues)
|
|
3034
|
+
h.path ? h.path.unshift(a) : h.path = [a], i.issues?.push(h);
|
|
3035
|
+
if (i.issues || (i.issues = o.issues), s.abortEarly) {
|
|
3036
|
+
i.typed = !1;
|
|
3037
|
+
break;
|
|
3038
|
+
}
|
|
3039
|
+
}
|
|
3040
|
+
const p = this.value["~run"]({ value: c }, s);
|
|
3041
|
+
if (p.issues) {
|
|
3042
|
+
const a = {
|
|
3043
|
+
type: "map",
|
|
3044
|
+
origin: "value",
|
|
3045
|
+
input: u,
|
|
3046
|
+
key: l,
|
|
3047
|
+
value: c
|
|
3048
|
+
};
|
|
3049
|
+
for (const h of p.issues)
|
|
3050
|
+
h.path ? h.path.unshift(a) : h.path = [a], i.issues?.push(h);
|
|
3051
|
+
if (i.issues || (i.issues = p.issues), s.abortEarly) {
|
|
3052
|
+
i.typed = !1;
|
|
3053
|
+
break;
|
|
3054
|
+
}
|
|
3055
|
+
}
|
|
3056
|
+
(!o.typed || !p.typed) && (i.typed = !1), i.value.set(o.value, p.value);
|
|
3057
|
+
}
|
|
3058
|
+
} else f(this, "type", i, s);
|
|
3059
|
+
return i;
|
|
3060
|
+
}
|
|
3061
|
+
};
|
|
3062
|
+
}
|
|
3063
|
+
// @__NO_SIDE_EFFECTS__
|
|
3064
|
+
function di(r, n, e) {
|
|
3065
|
+
return {
|
|
3066
|
+
kind: "schema",
|
|
3067
|
+
type: "map",
|
|
3068
|
+
reference: di,
|
|
3069
|
+
expects: "Map",
|
|
3070
|
+
async: !0,
|
|
3071
|
+
key: r,
|
|
3072
|
+
value: n,
|
|
3073
|
+
message: e,
|
|
3074
|
+
get "~standard"() {
|
|
3075
|
+
return /* @__PURE__ */ y(this);
|
|
3076
|
+
},
|
|
3077
|
+
async "~run"(i, s) {
|
|
3078
|
+
const u = i.value;
|
|
3079
|
+
if (u instanceof Map) {
|
|
3080
|
+
i.typed = !0, i.value = /* @__PURE__ */ new Map();
|
|
3081
|
+
const l = await Promise.all([...u].map(([c, o]) => Promise.all([
|
|
3082
|
+
c,
|
|
3083
|
+
o,
|
|
3084
|
+
this.key["~run"]({ value: c }, s),
|
|
3085
|
+
this.value["~run"]({ value: o }, s)
|
|
3086
|
+
])));
|
|
3087
|
+
for (const [c, o, p, a] of l) {
|
|
3088
|
+
if (p.issues) {
|
|
3089
|
+
const h = {
|
|
3090
|
+
type: "map",
|
|
3091
|
+
origin: "key",
|
|
3092
|
+
input: u,
|
|
3093
|
+
key: c,
|
|
3094
|
+
value: o
|
|
3095
|
+
};
|
|
3096
|
+
for (const v of p.issues)
|
|
3097
|
+
v.path ? v.path.unshift(h) : v.path = [h], i.issues?.push(v);
|
|
3098
|
+
if (i.issues || (i.issues = p.issues), s.abortEarly) {
|
|
3099
|
+
i.typed = !1;
|
|
3100
|
+
break;
|
|
3101
|
+
}
|
|
3102
|
+
}
|
|
3103
|
+
if (a.issues) {
|
|
3104
|
+
const h = {
|
|
3105
|
+
type: "map",
|
|
3106
|
+
origin: "value",
|
|
3107
|
+
input: u,
|
|
3108
|
+
key: c,
|
|
3109
|
+
value: o
|
|
3110
|
+
};
|
|
3111
|
+
for (const v of a.issues)
|
|
3112
|
+
v.path ? v.path.unshift(h) : v.path = [h], i.issues?.push(v);
|
|
3113
|
+
if (i.issues || (i.issues = a.issues), s.abortEarly) {
|
|
3114
|
+
i.typed = !1;
|
|
3115
|
+
break;
|
|
3116
|
+
}
|
|
3117
|
+
}
|
|
3118
|
+
(!p.typed || !a.typed) && (i.typed = !1), i.value.set(p.value, a.value);
|
|
3119
|
+
}
|
|
3120
|
+
} else f(this, "type", i, s);
|
|
3121
|
+
return i;
|
|
3122
|
+
}
|
|
3123
|
+
};
|
|
3124
|
+
}
|
|
3125
|
+
// @__NO_SIDE_EFFECTS__
|
|
3126
|
+
function ki(r) {
|
|
3127
|
+
return {
|
|
3128
|
+
kind: "schema",
|
|
3129
|
+
type: "nan",
|
|
3130
|
+
reference: ki,
|
|
3131
|
+
expects: "NaN",
|
|
3132
|
+
async: !1,
|
|
3133
|
+
message: r,
|
|
3134
|
+
get "~standard"() {
|
|
3135
|
+
return /* @__PURE__ */ y(this);
|
|
3136
|
+
},
|
|
3137
|
+
"~run"(n, e) {
|
|
3138
|
+
return Number.isNaN(n.value) ? n.typed = !0 : f(this, "type", n, e), n;
|
|
3139
|
+
}
|
|
3140
|
+
};
|
|
3141
|
+
}
|
|
3142
|
+
// @__NO_SIDE_EFFECTS__
|
|
3143
|
+
function bi(r) {
|
|
3144
|
+
return {
|
|
3145
|
+
kind: "schema",
|
|
3146
|
+
type: "never",
|
|
3147
|
+
reference: bi,
|
|
3148
|
+
expects: "never",
|
|
3149
|
+
async: !1,
|
|
3150
|
+
message: r,
|
|
3151
|
+
get "~standard"() {
|
|
3152
|
+
return /* @__PURE__ */ y(this);
|
|
3153
|
+
},
|
|
3154
|
+
"~run"(n, e) {
|
|
3155
|
+
return f(this, "type", n, e), n;
|
|
3156
|
+
}
|
|
3157
|
+
};
|
|
3158
|
+
}
|
|
3159
|
+
// @__NO_SIDE_EFFECTS__
|
|
3160
|
+
function Ei(r, n) {
|
|
3161
|
+
return {
|
|
3162
|
+
kind: "schema",
|
|
3163
|
+
type: "non_nullable",
|
|
3164
|
+
reference: Ei,
|
|
3165
|
+
expects: "!null",
|
|
3166
|
+
async: !1,
|
|
3167
|
+
wrapped: r,
|
|
3168
|
+
message: n,
|
|
3169
|
+
get "~standard"() {
|
|
3170
|
+
return /* @__PURE__ */ y(this);
|
|
3171
|
+
},
|
|
3172
|
+
"~run"(e, i) {
|
|
3173
|
+
return e.value !== null && (e = this.wrapped["~run"](e, i)), e.value === null && f(this, "type", e, i), e;
|
|
3174
|
+
}
|
|
3175
|
+
};
|
|
3176
|
+
}
|
|
3177
|
+
// @__NO_SIDE_EFFECTS__
|
|
3178
|
+
function xi(r, n) {
|
|
3179
|
+
return {
|
|
3180
|
+
kind: "schema",
|
|
3181
|
+
type: "non_nullable",
|
|
3182
|
+
reference: xi,
|
|
3183
|
+
expects: "!null",
|
|
3184
|
+
async: !0,
|
|
3185
|
+
wrapped: r,
|
|
3186
|
+
message: n,
|
|
3187
|
+
get "~standard"() {
|
|
3188
|
+
return /* @__PURE__ */ y(this);
|
|
3189
|
+
},
|
|
3190
|
+
async "~run"(e, i) {
|
|
3191
|
+
return e.value !== null && (e = await this.wrapped["~run"](e, i)), e.value === null && f(this, "type", e, i), e;
|
|
3192
|
+
}
|
|
3193
|
+
};
|
|
3194
|
+
}
|
|
3195
|
+
// @__NO_SIDE_EFFECTS__
|
|
3196
|
+
function _i(r, n) {
|
|
3197
|
+
return {
|
|
3198
|
+
kind: "schema",
|
|
3199
|
+
type: "non_nullish",
|
|
3200
|
+
reference: _i,
|
|
3201
|
+
expects: "(!null & !undefined)",
|
|
3202
|
+
async: !1,
|
|
3203
|
+
wrapped: r,
|
|
3204
|
+
message: n,
|
|
3205
|
+
get "~standard"() {
|
|
3206
|
+
return /* @__PURE__ */ y(this);
|
|
3207
|
+
},
|
|
3208
|
+
"~run"(e, i) {
|
|
3209
|
+
return e.value === null || e.value === void 0 || (e = this.wrapped["~run"](e, i)), (e.value === null || e.value === void 0) && f(this, "type", e, i), e;
|
|
3210
|
+
}
|
|
3211
|
+
};
|
|
3212
|
+
}
|
|
3213
|
+
// @__NO_SIDE_EFFECTS__
|
|
3214
|
+
function Ai(r, n) {
|
|
3215
|
+
return {
|
|
3216
|
+
kind: "schema",
|
|
3217
|
+
type: "non_nullish",
|
|
3218
|
+
reference: Ai,
|
|
3219
|
+
expects: "(!null & !undefined)",
|
|
3220
|
+
async: !0,
|
|
3221
|
+
wrapped: r,
|
|
3222
|
+
message: n,
|
|
3223
|
+
get "~standard"() {
|
|
3224
|
+
return /* @__PURE__ */ y(this);
|
|
3225
|
+
},
|
|
3226
|
+
async "~run"(e, i) {
|
|
3227
|
+
return e.value === null || e.value === void 0 || (e = await this.wrapped["~run"](e, i)), (e.value === null || e.value === void 0) && f(this, "type", e, i), e;
|
|
3228
|
+
}
|
|
3229
|
+
};
|
|
3230
|
+
}
|
|
3231
|
+
// @__NO_SIDE_EFFECTS__
|
|
3232
|
+
function Z(r, n) {
|
|
3233
|
+
return {
|
|
3234
|
+
kind: "schema",
|
|
3235
|
+
type: "non_optional",
|
|
3236
|
+
reference: Z,
|
|
3237
|
+
expects: "!undefined",
|
|
3238
|
+
async: !1,
|
|
3239
|
+
wrapped: r,
|
|
3240
|
+
message: n,
|
|
3241
|
+
get "~standard"() {
|
|
3242
|
+
return /* @__PURE__ */ y(this);
|
|
3243
|
+
},
|
|
3244
|
+
"~run"(e, i) {
|
|
3245
|
+
return e.value !== void 0 && (e = this.wrapped["~run"](e, i)), e.value === void 0 && f(this, "type", e, i), e;
|
|
3246
|
+
}
|
|
3247
|
+
};
|
|
3248
|
+
}
|
|
3249
|
+
// @__NO_SIDE_EFFECTS__
|
|
3250
|
+
function K(r, n) {
|
|
3251
|
+
return {
|
|
3252
|
+
kind: "schema",
|
|
3253
|
+
type: "non_optional",
|
|
3254
|
+
reference: K,
|
|
3255
|
+
expects: "!undefined",
|
|
3256
|
+
async: !0,
|
|
3257
|
+
wrapped: r,
|
|
3258
|
+
message: n,
|
|
3259
|
+
get "~standard"() {
|
|
3260
|
+
return /* @__PURE__ */ y(this);
|
|
3261
|
+
},
|
|
3262
|
+
async "~run"(e, i) {
|
|
3263
|
+
return e.value !== void 0 && (e = await this.wrapped["~run"](e, i)), e.value === void 0 && f(this, "type", e, i), e;
|
|
3264
|
+
}
|
|
3265
|
+
};
|
|
3266
|
+
}
|
|
3267
|
+
// @__NO_SIDE_EFFECTS__
|
|
3268
|
+
function H(r) {
|
|
3269
|
+
return {
|
|
3270
|
+
kind: "schema",
|
|
3271
|
+
type: "null",
|
|
3272
|
+
reference: H,
|
|
3273
|
+
expects: "null",
|
|
3274
|
+
async: !1,
|
|
3275
|
+
message: r,
|
|
3276
|
+
get "~standard"() {
|
|
3277
|
+
return /* @__PURE__ */ y(this);
|
|
3278
|
+
},
|
|
3279
|
+
"~run"(n, e) {
|
|
3280
|
+
return n.value === null ? n.typed = !0 : f(this, "type", n, e), n;
|
|
3281
|
+
}
|
|
3282
|
+
};
|
|
3283
|
+
}
|
|
3284
|
+
// @__NO_SIDE_EFFECTS__
|
|
3285
|
+
function wi(r, n) {
|
|
3286
|
+
return {
|
|
3287
|
+
kind: "schema",
|
|
3288
|
+
type: "nullable",
|
|
3289
|
+
reference: wi,
|
|
3290
|
+
expects: `(${r.expects} | null)`,
|
|
3291
|
+
async: !1,
|
|
3292
|
+
wrapped: r,
|
|
3293
|
+
default: n,
|
|
3294
|
+
get "~standard"() {
|
|
3295
|
+
return /* @__PURE__ */ y(this);
|
|
3296
|
+
},
|
|
3297
|
+
"~run"(e, i) {
|
|
3298
|
+
return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */ d(this, e, i)), e.value === null) ? (e.typed = !0, e) : this.wrapped["~run"](e, i);
|
|
3299
|
+
}
|
|
3300
|
+
};
|
|
3301
|
+
}
|
|
3302
|
+
// @__NO_SIDE_EFFECTS__
|
|
3303
|
+
function Ii(r, n) {
|
|
3304
|
+
return {
|
|
3305
|
+
kind: "schema",
|
|
3306
|
+
type: "nullable",
|
|
3307
|
+
reference: Ii,
|
|
3308
|
+
expects: `(${r.expects} | null)`,
|
|
3309
|
+
async: !0,
|
|
3310
|
+
wrapped: r,
|
|
3311
|
+
default: n,
|
|
3312
|
+
get "~standard"() {
|
|
3313
|
+
return /* @__PURE__ */ y(this);
|
|
3314
|
+
},
|
|
3315
|
+
async "~run"(e, i) {
|
|
3316
|
+
return e.value === null && (this.default !== void 0 && (e.value = await /* @__PURE__ */ d(this, e, i)), e.value === null) ? (e.typed = !0, e) : this.wrapped["~run"](e, i);
|
|
3317
|
+
}
|
|
3318
|
+
};
|
|
3319
|
+
}
|
|
3320
|
+
// @__NO_SIDE_EFFECTS__
|
|
3321
|
+
function Di(r, n) {
|
|
3322
|
+
return {
|
|
3323
|
+
kind: "schema",
|
|
3324
|
+
type: "nullish",
|
|
3325
|
+
reference: Di,
|
|
3326
|
+
expects: `(${r.expects} | null | undefined)`,
|
|
3327
|
+
async: !1,
|
|
3328
|
+
wrapped: r,
|
|
3329
|
+
default: n,
|
|
3330
|
+
get "~standard"() {
|
|
3331
|
+
return /* @__PURE__ */ y(this);
|
|
3332
|
+
},
|
|
3333
|
+
"~run"(e, i) {
|
|
3334
|
+
return (e.value === null || e.value === void 0) && (this.default !== void 0 && (e.value = /* @__PURE__ */ d(this, e, i)), e.value === null || e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, i);
|
|
3335
|
+
}
|
|
3336
|
+
};
|
|
3337
|
+
}
|
|
3338
|
+
// @__NO_SIDE_EFFECTS__
|
|
3339
|
+
function ji(r, n) {
|
|
3340
|
+
return {
|
|
3341
|
+
kind: "schema",
|
|
3342
|
+
type: "nullish",
|
|
3343
|
+
reference: ji,
|
|
3344
|
+
expects: `(${r.expects} | null | undefined)`,
|
|
3345
|
+
async: !0,
|
|
3346
|
+
wrapped: r,
|
|
3347
|
+
default: n,
|
|
3348
|
+
get "~standard"() {
|
|
3349
|
+
return /* @__PURE__ */ y(this);
|
|
3350
|
+
},
|
|
3351
|
+
async "~run"(e, i) {
|
|
3352
|
+
return (e.value === null || e.value === void 0) && (this.default !== void 0 && (e.value = await /* @__PURE__ */ d(this, e, i)), e.value === null || e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, i);
|
|
3353
|
+
}
|
|
3354
|
+
};
|
|
3355
|
+
}
|
|
3356
|
+
// @__NO_SIDE_EFFECTS__
|
|
3357
|
+
function Oi(r) {
|
|
3358
|
+
return {
|
|
3359
|
+
kind: "schema",
|
|
3360
|
+
type: "number",
|
|
3361
|
+
reference: Oi,
|
|
3362
|
+
expects: "number",
|
|
3363
|
+
async: !1,
|
|
3364
|
+
message: r,
|
|
3365
|
+
get "~standard"() {
|
|
3366
|
+
return /* @__PURE__ */ y(this);
|
|
3367
|
+
},
|
|
3368
|
+
"~run"(n, e) {
|
|
3369
|
+
return typeof n.value == "number" && !isNaN(n.value) ? n.typed = !0 : f(this, "type", n, e), n;
|
|
3370
|
+
}
|
|
3371
|
+
};
|
|
3372
|
+
}
|
|
3373
|
+
// @__NO_SIDE_EFFECTS__
|
|
3374
|
+
function Gi(r, n) {
|
|
3375
|
+
return {
|
|
3376
|
+
kind: "schema",
|
|
3377
|
+
type: "object",
|
|
3378
|
+
reference: Gi,
|
|
3379
|
+
expects: "Object",
|
|
3380
|
+
async: !1,
|
|
3381
|
+
entries: r,
|
|
3382
|
+
message: n,
|
|
3383
|
+
get "~standard"() {
|
|
3384
|
+
return /* @__PURE__ */ y(this);
|
|
3385
|
+
},
|
|
3386
|
+
"~run"(e, i) {
|
|
3387
|
+
const s = e.value;
|
|
3388
|
+
if (s && typeof s == "object") {
|
|
3389
|
+
e.typed = !0, e.value = {};
|
|
3390
|
+
for (const u in this.entries) {
|
|
3391
|
+
const l = this.entries[u];
|
|
3392
|
+
if (u in s || (l.type === "exact_optional" || l.type === "optional" || l.type === "nullish") && l.default !== void 0) {
|
|
3393
|
+
const c = u in s ? s[u] : /* @__PURE__ */ d(l), o = l["~run"]({ value: c }, i);
|
|
3394
|
+
if (o.issues) {
|
|
3395
|
+
const p = {
|
|
3396
|
+
type: "object",
|
|
3397
|
+
origin: "value",
|
|
3398
|
+
input: s,
|
|
3399
|
+
key: u,
|
|
3400
|
+
value: c
|
|
3401
|
+
};
|
|
3402
|
+
for (const a of o.issues)
|
|
3403
|
+
a.path ? a.path.unshift(p) : a.path = [p], e.issues?.push(a);
|
|
3404
|
+
if (e.issues || (e.issues = o.issues), i.abortEarly) {
|
|
3405
|
+
e.typed = !1;
|
|
3406
|
+
break;
|
|
3407
|
+
}
|
|
3408
|
+
}
|
|
3409
|
+
o.typed || (e.typed = !1), e.value[u] = o.value;
|
|
3410
|
+
} else if (l.fallback !== void 0) e.value[u] = /* @__PURE__ */ b(l);
|
|
3411
|
+
else if (l.type !== "exact_optional" && l.type !== "optional" && l.type !== "nullish" && (f(this, "key", e, i, {
|
|
3412
|
+
input: void 0,
|
|
3413
|
+
expected: `"${u}"`,
|
|
3414
|
+
path: [{
|
|
3415
|
+
type: "object",
|
|
3416
|
+
origin: "key",
|
|
3417
|
+
input: s,
|
|
3418
|
+
key: u,
|
|
3419
|
+
value: s[u]
|
|
3420
|
+
}]
|
|
3421
|
+
}), i.abortEarly))
|
|
3422
|
+
break;
|
|
3423
|
+
}
|
|
3424
|
+
} else f(this, "type", e, i);
|
|
3425
|
+
return e;
|
|
3426
|
+
}
|
|
3427
|
+
};
|
|
3428
|
+
}
|
|
3429
|
+
// @__NO_SIDE_EFFECTS__
|
|
3430
|
+
function Ri(r, n) {
|
|
3431
|
+
return {
|
|
3432
|
+
kind: "schema",
|
|
3433
|
+
type: "object",
|
|
3434
|
+
reference: Ri,
|
|
3435
|
+
expects: "Object",
|
|
3436
|
+
async: !0,
|
|
3437
|
+
entries: r,
|
|
3438
|
+
message: n,
|
|
3439
|
+
get "~standard"() {
|
|
3440
|
+
return /* @__PURE__ */ y(this);
|
|
3441
|
+
},
|
|
3442
|
+
async "~run"(e, i) {
|
|
3443
|
+
const s = e.value;
|
|
3444
|
+
if (s && typeof s == "object") {
|
|
3445
|
+
e.typed = !0, e.value = {};
|
|
3446
|
+
const u = await Promise.all(Object.entries(this.entries).map(async ([l, c]) => {
|
|
3447
|
+
if (l in s || (c.type === "exact_optional" || c.type === "optional" || c.type === "nullish") && c.default !== void 0) {
|
|
3448
|
+
const o = l in s ? s[l] : await /* @__PURE__ */ d(c);
|
|
3449
|
+
return [
|
|
3450
|
+
l,
|
|
3451
|
+
o,
|
|
3452
|
+
c,
|
|
3453
|
+
await c["~run"]({ value: o }, i)
|
|
3454
|
+
];
|
|
3455
|
+
}
|
|
3456
|
+
return [
|
|
3457
|
+
l,
|
|
3458
|
+
s[l],
|
|
3459
|
+
c,
|
|
3460
|
+
null
|
|
3461
|
+
];
|
|
3462
|
+
}));
|
|
3463
|
+
for (const [l, c, o, p] of u) if (p) {
|
|
3464
|
+
if (p.issues) {
|
|
3465
|
+
const a = {
|
|
3466
|
+
type: "object",
|
|
3467
|
+
origin: "value",
|
|
3468
|
+
input: s,
|
|
3469
|
+
key: l,
|
|
3470
|
+
value: c
|
|
3471
|
+
};
|
|
3472
|
+
for (const h of p.issues)
|
|
3473
|
+
h.path ? h.path.unshift(a) : h.path = [a], e.issues?.push(h);
|
|
3474
|
+
if (e.issues || (e.issues = p.issues), i.abortEarly) {
|
|
3475
|
+
e.typed = !1;
|
|
3476
|
+
break;
|
|
3477
|
+
}
|
|
3478
|
+
}
|
|
3479
|
+
p.typed || (e.typed = !1), e.value[l] = p.value;
|
|
3480
|
+
} else if (o.fallback !== void 0) e.value[l] = await /* @__PURE__ */ b(o);
|
|
3481
|
+
else if (o.type !== "exact_optional" && o.type !== "optional" && o.type !== "nullish" && (f(this, "key", e, i, {
|
|
3482
|
+
input: void 0,
|
|
3483
|
+
expected: `"${l}"`,
|
|
3484
|
+
path: [{
|
|
3485
|
+
type: "object",
|
|
3486
|
+
origin: "key",
|
|
3487
|
+
input: s,
|
|
3488
|
+
key: l,
|
|
3489
|
+
value: c
|
|
3490
|
+
}]
|
|
3491
|
+
}), i.abortEarly))
|
|
3492
|
+
break;
|
|
3493
|
+
} else f(this, "type", e, i);
|
|
3494
|
+
return e;
|
|
3495
|
+
}
|
|
3496
|
+
};
|
|
3497
|
+
}
|
|
3498
|
+
// @__NO_SIDE_EFFECTS__
|
|
3499
|
+
function qi(r, n, e) {
|
|
3500
|
+
return {
|
|
3501
|
+
kind: "schema",
|
|
3502
|
+
type: "object_with_rest",
|
|
3503
|
+
reference: qi,
|
|
3504
|
+
expects: "Object",
|
|
3505
|
+
async: !1,
|
|
3506
|
+
entries: r,
|
|
3507
|
+
rest: n,
|
|
3508
|
+
message: e,
|
|
3509
|
+
get "~standard"() {
|
|
3510
|
+
return /* @__PURE__ */ y(this);
|
|
3511
|
+
},
|
|
3512
|
+
"~run"(i, s) {
|
|
3513
|
+
const u = i.value;
|
|
3514
|
+
if (u && typeof u == "object") {
|
|
3515
|
+
i.typed = !0, i.value = {};
|
|
3516
|
+
for (const l in this.entries) {
|
|
3517
|
+
const c = this.entries[l];
|
|
3518
|
+
if (l in u || (c.type === "exact_optional" || c.type === "optional" || c.type === "nullish") && c.default !== void 0) {
|
|
3519
|
+
const o = l in u ? u[l] : /* @__PURE__ */ d(c), p = c["~run"]({ value: o }, s);
|
|
3520
|
+
if (p.issues) {
|
|
3521
|
+
const a = {
|
|
3522
|
+
type: "object",
|
|
3523
|
+
origin: "value",
|
|
3524
|
+
input: u,
|
|
3525
|
+
key: l,
|
|
3526
|
+
value: o
|
|
3527
|
+
};
|
|
3528
|
+
for (const h of p.issues)
|
|
3529
|
+
h.path ? h.path.unshift(a) : h.path = [a], i.issues?.push(h);
|
|
3530
|
+
if (i.issues || (i.issues = p.issues), s.abortEarly) {
|
|
3531
|
+
i.typed = !1;
|
|
3532
|
+
break;
|
|
3533
|
+
}
|
|
3534
|
+
}
|
|
3535
|
+
p.typed || (i.typed = !1), i.value[l] = p.value;
|
|
3536
|
+
} else if (c.fallback !== void 0) i.value[l] = /* @__PURE__ */ b(c);
|
|
3537
|
+
else if (c.type !== "exact_optional" && c.type !== "optional" && c.type !== "nullish" && (f(this, "key", i, s, {
|
|
3538
|
+
input: void 0,
|
|
3539
|
+
expected: `"${l}"`,
|
|
3540
|
+
path: [{
|
|
3541
|
+
type: "object",
|
|
3542
|
+
origin: "key",
|
|
3543
|
+
input: u,
|
|
3544
|
+
key: l,
|
|
3545
|
+
value: u[l]
|
|
3546
|
+
}]
|
|
3547
|
+
}), s.abortEarly))
|
|
3548
|
+
break;
|
|
3549
|
+
}
|
|
3550
|
+
if (!i.issues || !s.abortEarly) {
|
|
3551
|
+
for (const l in u) if (/* @__PURE__ */ I(u, l) && !(l in this.entries)) {
|
|
3552
|
+
const c = this.rest["~run"]({ value: u[l] }, s);
|
|
3553
|
+
if (c.issues) {
|
|
3554
|
+
const o = {
|
|
3555
|
+
type: "object",
|
|
3556
|
+
origin: "value",
|
|
3557
|
+
input: u,
|
|
3558
|
+
key: l,
|
|
3559
|
+
value: u[l]
|
|
3560
|
+
};
|
|
3561
|
+
for (const p of c.issues)
|
|
3562
|
+
p.path ? p.path.unshift(o) : p.path = [o], i.issues?.push(p);
|
|
3563
|
+
if (i.issues || (i.issues = c.issues), s.abortEarly) {
|
|
3564
|
+
i.typed = !1;
|
|
3565
|
+
break;
|
|
3566
|
+
}
|
|
3567
|
+
}
|
|
3568
|
+
c.typed || (i.typed = !1), i.value[l] = c.value;
|
|
3569
|
+
}
|
|
3570
|
+
}
|
|
3571
|
+
} else f(this, "type", i, s);
|
|
3572
|
+
return i;
|
|
3573
|
+
}
|
|
3574
|
+
};
|
|
3575
|
+
}
|
|
3576
|
+
// @__NO_SIDE_EFFECTS__
|
|
3577
|
+
function Mi(r, n, e) {
|
|
3578
|
+
return {
|
|
3579
|
+
kind: "schema",
|
|
3580
|
+
type: "object_with_rest",
|
|
3581
|
+
reference: Mi,
|
|
3582
|
+
expects: "Object",
|
|
3583
|
+
async: !0,
|
|
3584
|
+
entries: r,
|
|
3585
|
+
rest: n,
|
|
3586
|
+
message: e,
|
|
3587
|
+
get "~standard"() {
|
|
3588
|
+
return /* @__PURE__ */ y(this);
|
|
3589
|
+
},
|
|
3590
|
+
async "~run"(i, s) {
|
|
3591
|
+
const u = i.value;
|
|
3592
|
+
if (u && typeof u == "object") {
|
|
3593
|
+
i.typed = !0, i.value = {};
|
|
3594
|
+
const [l, c] = await Promise.all([Promise.all(Object.entries(this.entries).map(async ([o, p]) => {
|
|
3595
|
+
if (o in u || (p.type === "exact_optional" || p.type === "optional" || p.type === "nullish") && p.default !== void 0) {
|
|
3596
|
+
const a = o in u ? u[o] : await /* @__PURE__ */ d(p);
|
|
3597
|
+
return [
|
|
3598
|
+
o,
|
|
3599
|
+
a,
|
|
3600
|
+
p,
|
|
3601
|
+
await p["~run"]({ value: a }, s)
|
|
3602
|
+
];
|
|
3603
|
+
}
|
|
3604
|
+
return [
|
|
3605
|
+
o,
|
|
3606
|
+
u[o],
|
|
3607
|
+
p,
|
|
3608
|
+
null
|
|
3609
|
+
];
|
|
3610
|
+
})), Promise.all(Object.entries(u).filter(([o]) => /* @__PURE__ */ I(u, o) && !(o in this.entries)).map(async ([o, p]) => [
|
|
3611
|
+
o,
|
|
3612
|
+
p,
|
|
3613
|
+
await this.rest["~run"]({ value: p }, s)
|
|
3614
|
+
]))]);
|
|
3615
|
+
for (const [o, p, a, h] of l) if (h) {
|
|
3616
|
+
if (h.issues) {
|
|
3617
|
+
const v = {
|
|
3618
|
+
type: "object",
|
|
3619
|
+
origin: "value",
|
|
3620
|
+
input: u,
|
|
3621
|
+
key: o,
|
|
3622
|
+
value: p
|
|
3623
|
+
};
|
|
3624
|
+
for (const k of h.issues)
|
|
3625
|
+
k.path ? k.path.unshift(v) : k.path = [v], i.issues?.push(k);
|
|
3626
|
+
if (i.issues || (i.issues = h.issues), s.abortEarly) {
|
|
3627
|
+
i.typed = !1;
|
|
3628
|
+
break;
|
|
3629
|
+
}
|
|
3630
|
+
}
|
|
3631
|
+
h.typed || (i.typed = !1), i.value[o] = h.value;
|
|
3632
|
+
} else if (a.fallback !== void 0) i.value[o] = await /* @__PURE__ */ b(a);
|
|
3633
|
+
else if (a.type !== "exact_optional" && a.type !== "optional" && a.type !== "nullish" && (f(this, "key", i, s, {
|
|
3634
|
+
input: void 0,
|
|
3635
|
+
expected: `"${o}"`,
|
|
3636
|
+
path: [{
|
|
3637
|
+
type: "object",
|
|
3638
|
+
origin: "key",
|
|
3639
|
+
input: u,
|
|
3640
|
+
key: o,
|
|
3641
|
+
value: p
|
|
3642
|
+
}]
|
|
3643
|
+
}), s.abortEarly))
|
|
3644
|
+
break;
|
|
3645
|
+
if (!i.issues || !s.abortEarly) for (const [o, p, a] of c) {
|
|
3646
|
+
if (a.issues) {
|
|
3647
|
+
const h = {
|
|
3648
|
+
type: "object",
|
|
3649
|
+
origin: "value",
|
|
3650
|
+
input: u,
|
|
3651
|
+
key: o,
|
|
3652
|
+
value: p
|
|
3653
|
+
};
|
|
3654
|
+
for (const v of a.issues)
|
|
3655
|
+
v.path ? v.path.unshift(h) : v.path = [h], i.issues?.push(v);
|
|
3656
|
+
if (i.issues || (i.issues = a.issues), s.abortEarly) {
|
|
3657
|
+
i.typed = !1;
|
|
3658
|
+
break;
|
|
3659
|
+
}
|
|
3660
|
+
}
|
|
3661
|
+
a.typed || (i.typed = !1), i.value[o] = a.value;
|
|
3662
|
+
}
|
|
3663
|
+
} else f(this, "type", i, s);
|
|
3664
|
+
return i;
|
|
3665
|
+
}
|
|
3666
|
+
};
|
|
3667
|
+
}
|
|
3668
|
+
// @__NO_SIDE_EFFECTS__
|
|
3669
|
+
function Q(r, n) {
|
|
3670
|
+
return {
|
|
3671
|
+
kind: "schema",
|
|
3672
|
+
type: "optional",
|
|
3673
|
+
reference: Q,
|
|
3674
|
+
expects: `(${r.expects} | undefined)`,
|
|
3675
|
+
async: !1,
|
|
3676
|
+
wrapped: r,
|
|
3677
|
+
default: n,
|
|
3678
|
+
get "~standard"() {
|
|
3679
|
+
return /* @__PURE__ */ y(this);
|
|
3680
|
+
},
|
|
3681
|
+
"~run"(e, i) {
|
|
3682
|
+
return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ d(this, e, i)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, i);
|
|
3683
|
+
}
|
|
3684
|
+
};
|
|
3685
|
+
}
|
|
3686
|
+
// @__NO_SIDE_EFFECTS__
|
|
3687
|
+
function Y(r, n) {
|
|
3688
|
+
return {
|
|
3689
|
+
kind: "schema",
|
|
3690
|
+
type: "optional",
|
|
3691
|
+
reference: Y,
|
|
3692
|
+
expects: `(${r.expects} | undefined)`,
|
|
3693
|
+
async: !0,
|
|
3694
|
+
wrapped: r,
|
|
3695
|
+
default: n,
|
|
3696
|
+
get "~standard"() {
|
|
3697
|
+
return /* @__PURE__ */ y(this);
|
|
3698
|
+
},
|
|
3699
|
+
async "~run"(e, i) {
|
|
3700
|
+
return e.value === void 0 && (this.default !== void 0 && (e.value = await /* @__PURE__ */ d(this, e, i)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, i);
|
|
3701
|
+
}
|
|
3702
|
+
};
|
|
3703
|
+
}
|
|
3704
|
+
// @__NO_SIDE_EFFECTS__
|
|
3705
|
+
function ee(r, n) {
|
|
3706
|
+
return {
|
|
3707
|
+
kind: "schema",
|
|
3708
|
+
type: "picklist",
|
|
3709
|
+
reference: ee,
|
|
3710
|
+
expects: /* @__PURE__ */ E(r.map(m), "|"),
|
|
3711
|
+
async: !1,
|
|
3712
|
+
options: r,
|
|
3713
|
+
message: n,
|
|
3714
|
+
get "~standard"() {
|
|
3715
|
+
return /* @__PURE__ */ y(this);
|
|
3716
|
+
},
|
|
3717
|
+
"~run"(e, i) {
|
|
3718
|
+
return this.options.includes(e.value) ? e.typed = !0 : f(this, "type", e, i), e;
|
|
3719
|
+
}
|
|
3720
|
+
};
|
|
3721
|
+
}
|
|
3722
|
+
// @__NO_SIDE_EFFECTS__
|
|
3723
|
+
function Si(r) {
|
|
3724
|
+
return {
|
|
3725
|
+
kind: "schema",
|
|
3726
|
+
type: "promise",
|
|
3727
|
+
reference: Si,
|
|
3728
|
+
expects: "Promise",
|
|
3729
|
+
async: !1,
|
|
3730
|
+
message: r,
|
|
3731
|
+
get "~standard"() {
|
|
3732
|
+
return /* @__PURE__ */ y(this);
|
|
3733
|
+
},
|
|
3734
|
+
"~run"(n, e) {
|
|
3735
|
+
return n.value instanceof Promise ? n.typed = !0 : f(this, "type", n, e), n;
|
|
3736
|
+
}
|
|
3737
|
+
};
|
|
3738
|
+
}
|
|
3739
|
+
// @__NO_SIDE_EFFECTS__
|
|
3740
|
+
function Pi(r, n, e) {
|
|
3741
|
+
return {
|
|
3742
|
+
kind: "schema",
|
|
3743
|
+
type: "record",
|
|
3744
|
+
reference: Pi,
|
|
3745
|
+
expects: "Object",
|
|
3746
|
+
async: !1,
|
|
3747
|
+
key: r,
|
|
3748
|
+
value: n,
|
|
3749
|
+
message: e,
|
|
3750
|
+
get "~standard"() {
|
|
3751
|
+
return /* @__PURE__ */ y(this);
|
|
3752
|
+
},
|
|
3753
|
+
"~run"(i, s) {
|
|
3754
|
+
const u = i.value;
|
|
3755
|
+
if (u && typeof u == "object") {
|
|
3756
|
+
i.typed = !0, i.value = {};
|
|
3757
|
+
for (const l in u) if (/* @__PURE__ */ I(u, l)) {
|
|
3758
|
+
const c = u[l], o = this.key["~run"]({ value: l }, s);
|
|
3759
|
+
if (o.issues) {
|
|
3760
|
+
const a = {
|
|
3761
|
+
type: "object",
|
|
3762
|
+
origin: "key",
|
|
3763
|
+
input: u,
|
|
3764
|
+
key: l,
|
|
3765
|
+
value: c
|
|
3766
|
+
};
|
|
3767
|
+
for (const h of o.issues)
|
|
3768
|
+
h.path = [a], i.issues?.push(h);
|
|
3769
|
+
if (i.issues || (i.issues = o.issues), s.abortEarly) {
|
|
3770
|
+
i.typed = !1;
|
|
3771
|
+
break;
|
|
3772
|
+
}
|
|
3773
|
+
}
|
|
3774
|
+
const p = this.value["~run"]({ value: c }, s);
|
|
3775
|
+
if (p.issues) {
|
|
3776
|
+
const a = {
|
|
3777
|
+
type: "object",
|
|
3778
|
+
origin: "value",
|
|
3779
|
+
input: u,
|
|
3780
|
+
key: l,
|
|
3781
|
+
value: c
|
|
3782
|
+
};
|
|
3783
|
+
for (const h of p.issues)
|
|
3784
|
+
h.path ? h.path.unshift(a) : h.path = [a], i.issues?.push(h);
|
|
3785
|
+
if (i.issues || (i.issues = p.issues), s.abortEarly) {
|
|
3786
|
+
i.typed = !1;
|
|
3787
|
+
break;
|
|
3788
|
+
}
|
|
3789
|
+
}
|
|
3790
|
+
(!o.typed || !p.typed) && (i.typed = !1), o.typed && (i.value[o.value] = p.value);
|
|
3791
|
+
}
|
|
3792
|
+
} else f(this, "type", i, s);
|
|
3793
|
+
return i;
|
|
3794
|
+
}
|
|
3795
|
+
};
|
|
3796
|
+
}
|
|
3797
|
+
// @__NO_SIDE_EFFECTS__
|
|
3798
|
+
function Xi(r, n, e) {
|
|
3799
|
+
return {
|
|
3800
|
+
kind: "schema",
|
|
3801
|
+
type: "record",
|
|
3802
|
+
reference: Xi,
|
|
3803
|
+
expects: "Object",
|
|
3804
|
+
async: !0,
|
|
3805
|
+
key: r,
|
|
3806
|
+
value: n,
|
|
3807
|
+
message: e,
|
|
3808
|
+
get "~standard"() {
|
|
3809
|
+
return /* @__PURE__ */ y(this);
|
|
3810
|
+
},
|
|
3811
|
+
async "~run"(i, s) {
|
|
3812
|
+
const u = i.value;
|
|
3813
|
+
if (u && typeof u == "object") {
|
|
3814
|
+
i.typed = !0, i.value = {};
|
|
3815
|
+
const l = await Promise.all(Object.entries(u).filter(([c]) => /* @__PURE__ */ I(u, c)).map(([c, o]) => Promise.all([
|
|
3816
|
+
c,
|
|
3817
|
+
o,
|
|
3818
|
+
this.key["~run"]({ value: c }, s),
|
|
3819
|
+
this.value["~run"]({ value: o }, s)
|
|
3820
|
+
])));
|
|
3821
|
+
for (const [c, o, p, a] of l) {
|
|
3822
|
+
if (p.issues) {
|
|
3823
|
+
const h = {
|
|
3824
|
+
type: "object",
|
|
3825
|
+
origin: "key",
|
|
3826
|
+
input: u,
|
|
3827
|
+
key: c,
|
|
3828
|
+
value: o
|
|
3829
|
+
};
|
|
3830
|
+
for (const v of p.issues)
|
|
3831
|
+
v.path = [h], i.issues?.push(v);
|
|
3832
|
+
if (i.issues || (i.issues = p.issues), s.abortEarly) {
|
|
3833
|
+
i.typed = !1;
|
|
3834
|
+
break;
|
|
3835
|
+
}
|
|
3836
|
+
}
|
|
3837
|
+
if (a.issues) {
|
|
3838
|
+
const h = {
|
|
3839
|
+
type: "object",
|
|
3840
|
+
origin: "value",
|
|
3841
|
+
input: u,
|
|
3842
|
+
key: c,
|
|
3843
|
+
value: o
|
|
3844
|
+
};
|
|
3845
|
+
for (const v of a.issues)
|
|
3846
|
+
v.path ? v.path.unshift(h) : v.path = [h], i.issues?.push(v);
|
|
3847
|
+
if (i.issues || (i.issues = a.issues), s.abortEarly) {
|
|
3848
|
+
i.typed = !1;
|
|
3849
|
+
break;
|
|
3850
|
+
}
|
|
3851
|
+
}
|
|
3852
|
+
(!p.typed || !a.typed) && (i.typed = !1), p.typed && (i.value[p.value] = a.value);
|
|
3853
|
+
}
|
|
3854
|
+
} else f(this, "type", i, s);
|
|
3855
|
+
return i;
|
|
3856
|
+
}
|
|
3857
|
+
};
|
|
3858
|
+
}
|
|
3859
|
+
// @__NO_SIDE_EFFECTS__
|
|
3860
|
+
function Ni(r, n) {
|
|
3861
|
+
return {
|
|
3862
|
+
kind: "schema",
|
|
3863
|
+
type: "set",
|
|
3864
|
+
reference: Ni,
|
|
3865
|
+
expects: "Set",
|
|
3866
|
+
async: !1,
|
|
3867
|
+
value: r,
|
|
3868
|
+
message: n,
|
|
3869
|
+
get "~standard"() {
|
|
3870
|
+
return /* @__PURE__ */ y(this);
|
|
3871
|
+
},
|
|
3872
|
+
"~run"(e, i) {
|
|
3873
|
+
const s = e.value;
|
|
3874
|
+
if (s instanceof Set) {
|
|
3875
|
+
e.typed = !0, e.value = /* @__PURE__ */ new Set();
|
|
3876
|
+
for (const u of s) {
|
|
3877
|
+
const l = this.value["~run"]({ value: u }, i);
|
|
3878
|
+
if (l.issues) {
|
|
3879
|
+
const c = {
|
|
3880
|
+
type: "set",
|
|
3881
|
+
origin: "value",
|
|
3882
|
+
input: s,
|
|
3883
|
+
key: null,
|
|
3884
|
+
value: u
|
|
3885
|
+
};
|
|
3886
|
+
for (const o of l.issues)
|
|
3887
|
+
o.path ? o.path.unshift(c) : o.path = [c], e.issues?.push(o);
|
|
3888
|
+
if (e.issues || (e.issues = l.issues), i.abortEarly) {
|
|
3889
|
+
e.typed = !1;
|
|
3890
|
+
break;
|
|
3891
|
+
}
|
|
3892
|
+
}
|
|
3893
|
+
l.typed || (e.typed = !1), e.value.add(l.value);
|
|
3894
|
+
}
|
|
3895
|
+
} else f(this, "type", e, i);
|
|
3896
|
+
return e;
|
|
3897
|
+
}
|
|
3898
|
+
};
|
|
3899
|
+
}
|
|
3900
|
+
// @__NO_SIDE_EFFECTS__
|
|
3901
|
+
function Ci(r, n) {
|
|
3902
|
+
return {
|
|
3903
|
+
kind: "schema",
|
|
3904
|
+
type: "set",
|
|
3905
|
+
reference: Ci,
|
|
3906
|
+
expects: "Set",
|
|
3907
|
+
async: !0,
|
|
3908
|
+
value: r,
|
|
3909
|
+
message: n,
|
|
3910
|
+
get "~standard"() {
|
|
3911
|
+
return /* @__PURE__ */ y(this);
|
|
3912
|
+
},
|
|
3913
|
+
async "~run"(e, i) {
|
|
3914
|
+
const s = e.value;
|
|
3915
|
+
if (s instanceof Set) {
|
|
3916
|
+
e.typed = !0, e.value = /* @__PURE__ */ new Set();
|
|
3917
|
+
const u = await Promise.all([...s].map(async (l) => [l, await this.value["~run"]({ value: l }, i)]));
|
|
3918
|
+
for (const [l, c] of u) {
|
|
3919
|
+
if (c.issues) {
|
|
3920
|
+
const o = {
|
|
3921
|
+
type: "set",
|
|
3922
|
+
origin: "value",
|
|
3923
|
+
input: s,
|
|
3924
|
+
key: null,
|
|
3925
|
+
value: l
|
|
3926
|
+
};
|
|
3927
|
+
for (const p of c.issues)
|
|
3928
|
+
p.path ? p.path.unshift(o) : p.path = [o], e.issues?.push(p);
|
|
3929
|
+
if (e.issues || (e.issues = c.issues), i.abortEarly) {
|
|
3930
|
+
e.typed = !1;
|
|
3931
|
+
break;
|
|
3932
|
+
}
|
|
3933
|
+
}
|
|
3934
|
+
c.typed || (e.typed = !1), e.value.add(c.value);
|
|
3935
|
+
}
|
|
3936
|
+
} else f(this, "type", e, i);
|
|
3937
|
+
return e;
|
|
3938
|
+
}
|
|
3939
|
+
};
|
|
3940
|
+
}
|
|
3941
|
+
// @__NO_SIDE_EFFECTS__
|
|
3942
|
+
function zi(r, n) {
|
|
3943
|
+
return {
|
|
3944
|
+
kind: "schema",
|
|
3945
|
+
type: "strict_object",
|
|
3946
|
+
reference: zi,
|
|
3947
|
+
expects: "Object",
|
|
3948
|
+
async: !1,
|
|
3949
|
+
entries: r,
|
|
3950
|
+
message: n,
|
|
3951
|
+
get "~standard"() {
|
|
3952
|
+
return /* @__PURE__ */ y(this);
|
|
3953
|
+
},
|
|
3954
|
+
"~run"(e, i) {
|
|
3955
|
+
const s = e.value;
|
|
3956
|
+
if (s && typeof s == "object") {
|
|
3957
|
+
e.typed = !0, e.value = {};
|
|
3958
|
+
for (const u in this.entries) {
|
|
3959
|
+
const l = this.entries[u];
|
|
3960
|
+
if (u in s || (l.type === "exact_optional" || l.type === "optional" || l.type === "nullish") && l.default !== void 0) {
|
|
3961
|
+
const c = u in s ? s[u] : /* @__PURE__ */ d(l), o = l["~run"]({ value: c }, i);
|
|
3962
|
+
if (o.issues) {
|
|
3963
|
+
const p = {
|
|
3964
|
+
type: "object",
|
|
3965
|
+
origin: "value",
|
|
3966
|
+
input: s,
|
|
3967
|
+
key: u,
|
|
3968
|
+
value: c
|
|
3969
|
+
};
|
|
3970
|
+
for (const a of o.issues)
|
|
3971
|
+
a.path ? a.path.unshift(p) : a.path = [p], e.issues?.push(a);
|
|
3972
|
+
if (e.issues || (e.issues = o.issues), i.abortEarly) {
|
|
3973
|
+
e.typed = !1;
|
|
3974
|
+
break;
|
|
3975
|
+
}
|
|
3976
|
+
}
|
|
3977
|
+
o.typed || (e.typed = !1), e.value[u] = o.value;
|
|
3978
|
+
} else if (l.fallback !== void 0) e.value[u] = /* @__PURE__ */ b(l);
|
|
3979
|
+
else if (l.type !== "exact_optional" && l.type !== "optional" && l.type !== "nullish" && (f(this, "key", e, i, {
|
|
3980
|
+
input: void 0,
|
|
3981
|
+
expected: `"${u}"`,
|
|
3982
|
+
path: [{
|
|
3983
|
+
type: "object",
|
|
3984
|
+
origin: "key",
|
|
3985
|
+
input: s,
|
|
3986
|
+
key: u,
|
|
3987
|
+
value: s[u]
|
|
3988
|
+
}]
|
|
3989
|
+
}), i.abortEarly))
|
|
3990
|
+
break;
|
|
3991
|
+
}
|
|
3992
|
+
if (!e.issues || !i.abortEarly) {
|
|
3993
|
+
for (const u in s) if (!(u in this.entries)) {
|
|
3994
|
+
f(this, "key", e, i, {
|
|
3995
|
+
input: u,
|
|
3996
|
+
expected: "never",
|
|
3997
|
+
path: [{
|
|
3998
|
+
type: "object",
|
|
3999
|
+
origin: "key",
|
|
4000
|
+
input: s,
|
|
4001
|
+
key: u,
|
|
4002
|
+
value: s[u]
|
|
4003
|
+
}]
|
|
4004
|
+
});
|
|
4005
|
+
break;
|
|
4006
|
+
}
|
|
4007
|
+
}
|
|
4008
|
+
} else f(this, "type", e, i);
|
|
4009
|
+
return e;
|
|
4010
|
+
}
|
|
4011
|
+
};
|
|
4012
|
+
}
|
|
4013
|
+
// @__NO_SIDE_EFFECTS__
|
|
4014
|
+
function Ti(r, n) {
|
|
4015
|
+
return {
|
|
4016
|
+
kind: "schema",
|
|
4017
|
+
type: "strict_object",
|
|
4018
|
+
reference: Ti,
|
|
4019
|
+
expects: "Object",
|
|
4020
|
+
async: !0,
|
|
4021
|
+
entries: r,
|
|
4022
|
+
message: n,
|
|
4023
|
+
get "~standard"() {
|
|
4024
|
+
return /* @__PURE__ */ y(this);
|
|
4025
|
+
},
|
|
4026
|
+
async "~run"(e, i) {
|
|
4027
|
+
const s = e.value;
|
|
4028
|
+
if (s && typeof s == "object") {
|
|
4029
|
+
e.typed = !0, e.value = {};
|
|
4030
|
+
const u = await Promise.all(Object.entries(this.entries).map(async ([l, c]) => {
|
|
4031
|
+
if (l in s || (c.type === "exact_optional" || c.type === "optional" || c.type === "nullish") && c.default !== void 0) {
|
|
4032
|
+
const o = l in s ? s[l] : await /* @__PURE__ */ d(c);
|
|
4033
|
+
return [
|
|
4034
|
+
l,
|
|
4035
|
+
o,
|
|
4036
|
+
c,
|
|
4037
|
+
await c["~run"]({ value: o }, i)
|
|
4038
|
+
];
|
|
4039
|
+
}
|
|
4040
|
+
return [
|
|
4041
|
+
l,
|
|
4042
|
+
s[l],
|
|
4043
|
+
c,
|
|
4044
|
+
null
|
|
4045
|
+
];
|
|
4046
|
+
}));
|
|
4047
|
+
for (const [l, c, o, p] of u) if (p) {
|
|
4048
|
+
if (p.issues) {
|
|
4049
|
+
const a = {
|
|
4050
|
+
type: "object",
|
|
4051
|
+
origin: "value",
|
|
4052
|
+
input: s,
|
|
4053
|
+
key: l,
|
|
4054
|
+
value: c
|
|
4055
|
+
};
|
|
4056
|
+
for (const h of p.issues)
|
|
4057
|
+
h.path ? h.path.unshift(a) : h.path = [a], e.issues?.push(h);
|
|
4058
|
+
if (e.issues || (e.issues = p.issues), i.abortEarly) {
|
|
4059
|
+
e.typed = !1;
|
|
4060
|
+
break;
|
|
4061
|
+
}
|
|
4062
|
+
}
|
|
4063
|
+
p.typed || (e.typed = !1), e.value[l] = p.value;
|
|
4064
|
+
} else if (o.fallback !== void 0) e.value[l] = await /* @__PURE__ */ b(o);
|
|
4065
|
+
else if (o.type !== "exact_optional" && o.type !== "optional" && o.type !== "nullish" && (f(this, "key", e, i, {
|
|
4066
|
+
input: void 0,
|
|
4067
|
+
expected: `"${l}"`,
|
|
4068
|
+
path: [{
|
|
4069
|
+
type: "object",
|
|
4070
|
+
origin: "key",
|
|
4071
|
+
input: s,
|
|
4072
|
+
key: l,
|
|
4073
|
+
value: c
|
|
4074
|
+
}]
|
|
4075
|
+
}), i.abortEarly))
|
|
4076
|
+
break;
|
|
4077
|
+
if (!e.issues || !i.abortEarly) {
|
|
4078
|
+
for (const l in s) if (!(l in this.entries)) {
|
|
4079
|
+
f(this, "key", e, i, {
|
|
4080
|
+
input: l,
|
|
4081
|
+
expected: "never",
|
|
4082
|
+
path: [{
|
|
4083
|
+
type: "object",
|
|
4084
|
+
origin: "key",
|
|
4085
|
+
input: s,
|
|
4086
|
+
key: l,
|
|
4087
|
+
value: s[l]
|
|
4088
|
+
}]
|
|
4089
|
+
});
|
|
4090
|
+
break;
|
|
4091
|
+
}
|
|
4092
|
+
}
|
|
4093
|
+
} else f(this, "type", e, i);
|
|
4094
|
+
return e;
|
|
4095
|
+
}
|
|
4096
|
+
};
|
|
4097
|
+
}
|
|
4098
|
+
// @__NO_SIDE_EFFECTS__
|
|
4099
|
+
function Fi(r, n) {
|
|
4100
|
+
return {
|
|
4101
|
+
kind: "schema",
|
|
4102
|
+
type: "strict_tuple",
|
|
4103
|
+
reference: Fi,
|
|
4104
|
+
expects: "Array",
|
|
4105
|
+
async: !1,
|
|
4106
|
+
items: r,
|
|
4107
|
+
message: n,
|
|
4108
|
+
get "~standard"() {
|
|
4109
|
+
return /* @__PURE__ */ y(this);
|
|
4110
|
+
},
|
|
4111
|
+
"~run"(e, i) {
|
|
4112
|
+
const s = e.value;
|
|
4113
|
+
if (Array.isArray(s)) {
|
|
4114
|
+
e.typed = !0, e.value = [];
|
|
4115
|
+
for (let u = 0; u < this.items.length; u++) {
|
|
4116
|
+
const l = s[u], c = this.items[u]["~run"]({ value: l }, i);
|
|
4117
|
+
if (c.issues) {
|
|
4118
|
+
const o = {
|
|
4119
|
+
type: "array",
|
|
4120
|
+
origin: "value",
|
|
4121
|
+
input: s,
|
|
4122
|
+
key: u,
|
|
4123
|
+
value: l
|
|
4124
|
+
};
|
|
4125
|
+
for (const p of c.issues)
|
|
4126
|
+
p.path ? p.path.unshift(o) : p.path = [o], e.issues?.push(p);
|
|
4127
|
+
if (e.issues || (e.issues = c.issues), i.abortEarly) {
|
|
4128
|
+
e.typed = !1;
|
|
4129
|
+
break;
|
|
4130
|
+
}
|
|
4131
|
+
}
|
|
4132
|
+
c.typed || (e.typed = !1), e.value.push(c.value);
|
|
4133
|
+
}
|
|
4134
|
+
!(e.issues && i.abortEarly) && this.items.length < s.length && f(this, "type", e, i, {
|
|
4135
|
+
input: s[this.items.length],
|
|
4136
|
+
expected: "never",
|
|
4137
|
+
path: [{
|
|
4138
|
+
type: "array",
|
|
4139
|
+
origin: "value",
|
|
4140
|
+
input: s,
|
|
4141
|
+
key: this.items.length,
|
|
4142
|
+
value: s[this.items.length]
|
|
4143
|
+
}]
|
|
4144
|
+
});
|
|
4145
|
+
} else f(this, "type", e, i);
|
|
4146
|
+
return e;
|
|
4147
|
+
}
|
|
4148
|
+
};
|
|
4149
|
+
}
|
|
4150
|
+
// @__NO_SIDE_EFFECTS__
|
|
4151
|
+
function $i(r, n) {
|
|
4152
|
+
return {
|
|
4153
|
+
kind: "schema",
|
|
4154
|
+
type: "strict_tuple",
|
|
4155
|
+
reference: $i,
|
|
4156
|
+
expects: "Array",
|
|
4157
|
+
async: !0,
|
|
4158
|
+
items: r,
|
|
4159
|
+
message: n,
|
|
4160
|
+
get "~standard"() {
|
|
4161
|
+
return /* @__PURE__ */ y(this);
|
|
4162
|
+
},
|
|
4163
|
+
async "~run"(e, i) {
|
|
4164
|
+
const s = e.value;
|
|
4165
|
+
if (Array.isArray(s)) {
|
|
4166
|
+
e.typed = !0, e.value = [];
|
|
4167
|
+
const u = await Promise.all(this.items.map(async (l, c) => {
|
|
4168
|
+
const o = s[c];
|
|
4169
|
+
return [
|
|
4170
|
+
c,
|
|
4171
|
+
o,
|
|
4172
|
+
await l["~run"]({ value: o }, i)
|
|
4173
|
+
];
|
|
4174
|
+
}));
|
|
4175
|
+
for (const [l, c, o] of u) {
|
|
4176
|
+
if (o.issues) {
|
|
4177
|
+
const p = {
|
|
4178
|
+
type: "array",
|
|
4179
|
+
origin: "value",
|
|
4180
|
+
input: s,
|
|
4181
|
+
key: l,
|
|
4182
|
+
value: c
|
|
4183
|
+
};
|
|
4184
|
+
for (const a of o.issues)
|
|
4185
|
+
a.path ? a.path.unshift(p) : a.path = [p], e.issues?.push(a);
|
|
4186
|
+
if (e.issues || (e.issues = o.issues), i.abortEarly) {
|
|
4187
|
+
e.typed = !1;
|
|
4188
|
+
break;
|
|
4189
|
+
}
|
|
4190
|
+
}
|
|
4191
|
+
o.typed || (e.typed = !1), e.value.push(o.value);
|
|
4192
|
+
}
|
|
4193
|
+
!(e.issues && i.abortEarly) && this.items.length < s.length && f(this, "type", e, i, {
|
|
4194
|
+
input: s[this.items.length],
|
|
4195
|
+
expected: "never",
|
|
4196
|
+
path: [{
|
|
4197
|
+
type: "array",
|
|
4198
|
+
origin: "value",
|
|
4199
|
+
input: s,
|
|
4200
|
+
key: this.items.length,
|
|
4201
|
+
value: s[this.items.length]
|
|
4202
|
+
}]
|
|
4203
|
+
});
|
|
4204
|
+
} else f(this, "type", e, i);
|
|
4205
|
+
return e;
|
|
4206
|
+
}
|
|
4207
|
+
};
|
|
4208
|
+
}
|
|
4209
|
+
// @__NO_SIDE_EFFECTS__
|
|
4210
|
+
function Vi(r) {
|
|
4211
|
+
return {
|
|
4212
|
+
kind: "schema",
|
|
4213
|
+
type: "string",
|
|
4214
|
+
reference: Vi,
|
|
4215
|
+
expects: "string",
|
|
4216
|
+
async: !1,
|
|
4217
|
+
message: r,
|
|
4218
|
+
get "~standard"() {
|
|
4219
|
+
return /* @__PURE__ */ y(this);
|
|
4220
|
+
},
|
|
4221
|
+
"~run"(n, e) {
|
|
4222
|
+
return typeof n.value == "string" ? n.typed = !0 : f(this, "type", n, e), n;
|
|
4223
|
+
}
|
|
4224
|
+
};
|
|
4225
|
+
}
|
|
4226
|
+
// @__NO_SIDE_EFFECTS__
|
|
4227
|
+
function Li(r) {
|
|
4228
|
+
return {
|
|
4229
|
+
kind: "schema",
|
|
4230
|
+
type: "symbol",
|
|
4231
|
+
reference: Li,
|
|
4232
|
+
expects: "symbol",
|
|
4233
|
+
async: !1,
|
|
4234
|
+
message: r,
|
|
4235
|
+
get "~standard"() {
|
|
4236
|
+
return /* @__PURE__ */ y(this);
|
|
4237
|
+
},
|
|
4238
|
+
"~run"(n, e) {
|
|
4239
|
+
return typeof n.value == "symbol" ? n.typed = !0 : f(this, "type", n, e), n;
|
|
4240
|
+
}
|
|
4241
|
+
};
|
|
4242
|
+
}
|
|
4243
|
+
// @__NO_SIDE_EFFECTS__
|
|
4244
|
+
function Ji(r, n) {
|
|
4245
|
+
return {
|
|
4246
|
+
kind: "schema",
|
|
4247
|
+
type: "tuple",
|
|
4248
|
+
reference: Ji,
|
|
4249
|
+
expects: "Array",
|
|
4250
|
+
async: !1,
|
|
4251
|
+
items: r,
|
|
4252
|
+
message: n,
|
|
4253
|
+
get "~standard"() {
|
|
4254
|
+
return /* @__PURE__ */ y(this);
|
|
4255
|
+
},
|
|
4256
|
+
"~run"(e, i) {
|
|
4257
|
+
const s = e.value;
|
|
4258
|
+
if (Array.isArray(s)) {
|
|
4259
|
+
e.typed = !0, e.value = [];
|
|
4260
|
+
for (let u = 0; u < this.items.length; u++) {
|
|
4261
|
+
const l = s[u], c = this.items[u]["~run"]({ value: l }, i);
|
|
4262
|
+
if (c.issues) {
|
|
4263
|
+
const o = {
|
|
4264
|
+
type: "array",
|
|
4265
|
+
origin: "value",
|
|
4266
|
+
input: s,
|
|
4267
|
+
key: u,
|
|
4268
|
+
value: l
|
|
4269
|
+
};
|
|
4270
|
+
for (const p of c.issues)
|
|
4271
|
+
p.path ? p.path.unshift(o) : p.path = [o], e.issues?.push(p);
|
|
4272
|
+
if (e.issues || (e.issues = c.issues), i.abortEarly) {
|
|
4273
|
+
e.typed = !1;
|
|
4274
|
+
break;
|
|
4275
|
+
}
|
|
4276
|
+
}
|
|
4277
|
+
c.typed || (e.typed = !1), e.value.push(c.value);
|
|
4278
|
+
}
|
|
4279
|
+
} else f(this, "type", e, i);
|
|
4280
|
+
return e;
|
|
4281
|
+
}
|
|
4282
|
+
};
|
|
4283
|
+
}
|
|
4284
|
+
// @__NO_SIDE_EFFECTS__
|
|
4285
|
+
function Wi(r, n) {
|
|
4286
|
+
return {
|
|
4287
|
+
kind: "schema",
|
|
4288
|
+
type: "tuple",
|
|
4289
|
+
reference: Wi,
|
|
4290
|
+
expects: "Array",
|
|
4291
|
+
async: !0,
|
|
4292
|
+
items: r,
|
|
4293
|
+
message: n,
|
|
4294
|
+
get "~standard"() {
|
|
4295
|
+
return /* @__PURE__ */ y(this);
|
|
4296
|
+
},
|
|
4297
|
+
async "~run"(e, i) {
|
|
4298
|
+
const s = e.value;
|
|
4299
|
+
if (Array.isArray(s)) {
|
|
4300
|
+
e.typed = !0, e.value = [];
|
|
4301
|
+
const u = await Promise.all(this.items.map(async (l, c) => {
|
|
4302
|
+
const o = s[c];
|
|
4303
|
+
return [
|
|
4304
|
+
c,
|
|
4305
|
+
o,
|
|
4306
|
+
await l["~run"]({ value: o }, i)
|
|
4307
|
+
];
|
|
4308
|
+
}));
|
|
4309
|
+
for (const [l, c, o] of u) {
|
|
4310
|
+
if (o.issues) {
|
|
4311
|
+
const p = {
|
|
4312
|
+
type: "array",
|
|
4313
|
+
origin: "value",
|
|
4314
|
+
input: s,
|
|
4315
|
+
key: l,
|
|
4316
|
+
value: c
|
|
4317
|
+
};
|
|
4318
|
+
for (const a of o.issues)
|
|
4319
|
+
a.path ? a.path.unshift(p) : a.path = [p], e.issues?.push(a);
|
|
4320
|
+
if (e.issues || (e.issues = o.issues), i.abortEarly) {
|
|
4321
|
+
e.typed = !1;
|
|
4322
|
+
break;
|
|
4323
|
+
}
|
|
4324
|
+
}
|
|
4325
|
+
o.typed || (e.typed = !1), e.value.push(o.value);
|
|
4326
|
+
}
|
|
4327
|
+
} else f(this, "type", e, i);
|
|
4328
|
+
return e;
|
|
4329
|
+
}
|
|
4330
|
+
};
|
|
4331
|
+
}
|
|
4332
|
+
// @__NO_SIDE_EFFECTS__
|
|
4333
|
+
function Bi(r, n, e) {
|
|
4334
|
+
return {
|
|
4335
|
+
kind: "schema",
|
|
4336
|
+
type: "tuple_with_rest",
|
|
4337
|
+
reference: Bi,
|
|
4338
|
+
expects: "Array",
|
|
4339
|
+
async: !1,
|
|
4340
|
+
items: r,
|
|
4341
|
+
rest: n,
|
|
4342
|
+
message: e,
|
|
4343
|
+
get "~standard"() {
|
|
4344
|
+
return /* @__PURE__ */ y(this);
|
|
4345
|
+
},
|
|
4346
|
+
"~run"(i, s) {
|
|
4347
|
+
const u = i.value;
|
|
4348
|
+
if (Array.isArray(u)) {
|
|
4349
|
+
i.typed = !0, i.value = [];
|
|
4350
|
+
for (let l = 0; l < this.items.length; l++) {
|
|
4351
|
+
const c = u[l], o = this.items[l]["~run"]({ value: c }, s);
|
|
4352
|
+
if (o.issues) {
|
|
4353
|
+
const p = {
|
|
4354
|
+
type: "array",
|
|
4355
|
+
origin: "value",
|
|
4356
|
+
input: u,
|
|
4357
|
+
key: l,
|
|
4358
|
+
value: c
|
|
4359
|
+
};
|
|
4360
|
+
for (const a of o.issues)
|
|
4361
|
+
a.path ? a.path.unshift(p) : a.path = [p], i.issues?.push(a);
|
|
4362
|
+
if (i.issues || (i.issues = o.issues), s.abortEarly) {
|
|
4363
|
+
i.typed = !1;
|
|
4364
|
+
break;
|
|
4365
|
+
}
|
|
4366
|
+
}
|
|
4367
|
+
o.typed || (i.typed = !1), i.value.push(o.value);
|
|
4368
|
+
}
|
|
4369
|
+
if (!i.issues || !s.abortEarly) for (let l = this.items.length; l < u.length; l++) {
|
|
4370
|
+
const c = u[l], o = this.rest["~run"]({ value: c }, s);
|
|
4371
|
+
if (o.issues) {
|
|
4372
|
+
const p = {
|
|
4373
|
+
type: "array",
|
|
4374
|
+
origin: "value",
|
|
4375
|
+
input: u,
|
|
4376
|
+
key: l,
|
|
4377
|
+
value: c
|
|
4378
|
+
};
|
|
4379
|
+
for (const a of o.issues)
|
|
4380
|
+
a.path ? a.path.unshift(p) : a.path = [p], i.issues?.push(a);
|
|
4381
|
+
if (i.issues || (i.issues = o.issues), s.abortEarly) {
|
|
4382
|
+
i.typed = !1;
|
|
4383
|
+
break;
|
|
4384
|
+
}
|
|
4385
|
+
}
|
|
4386
|
+
o.typed || (i.typed = !1), i.value.push(o.value);
|
|
4387
|
+
}
|
|
4388
|
+
} else f(this, "type", i, s);
|
|
4389
|
+
return i;
|
|
4390
|
+
}
|
|
4391
|
+
};
|
|
4392
|
+
}
|
|
4393
|
+
// @__NO_SIDE_EFFECTS__
|
|
4394
|
+
function Ui(r, n, e) {
|
|
4395
|
+
return {
|
|
4396
|
+
kind: "schema",
|
|
4397
|
+
type: "tuple_with_rest",
|
|
4398
|
+
reference: Ui,
|
|
4399
|
+
expects: "Array",
|
|
4400
|
+
async: !0,
|
|
4401
|
+
items: r,
|
|
4402
|
+
rest: n,
|
|
4403
|
+
message: e,
|
|
4404
|
+
get "~standard"() {
|
|
4405
|
+
return /* @__PURE__ */ y(this);
|
|
4406
|
+
},
|
|
4407
|
+
async "~run"(i, s) {
|
|
4408
|
+
const u = i.value;
|
|
4409
|
+
if (Array.isArray(u)) {
|
|
4410
|
+
i.typed = !0, i.value = [];
|
|
4411
|
+
const [l, c] = await Promise.all([Promise.all(this.items.map(async (o, p) => {
|
|
4412
|
+
const a = u[p];
|
|
4413
|
+
return [
|
|
4414
|
+
p,
|
|
4415
|
+
a,
|
|
4416
|
+
await o["~run"]({ value: a }, s)
|
|
4417
|
+
];
|
|
4418
|
+
})), Promise.all(u.slice(this.items.length).map(async (o, p) => [
|
|
4419
|
+
p + this.items.length,
|
|
4420
|
+
o,
|
|
4421
|
+
await this.rest["~run"]({ value: o }, s)
|
|
4422
|
+
]))]);
|
|
4423
|
+
for (const [o, p, a] of l) {
|
|
4424
|
+
if (a.issues) {
|
|
4425
|
+
const h = {
|
|
4426
|
+
type: "array",
|
|
4427
|
+
origin: "value",
|
|
4428
|
+
input: u,
|
|
4429
|
+
key: o,
|
|
4430
|
+
value: p
|
|
4431
|
+
};
|
|
4432
|
+
for (const v of a.issues)
|
|
4433
|
+
v.path ? v.path.unshift(h) : v.path = [h], i.issues?.push(v);
|
|
4434
|
+
if (i.issues || (i.issues = a.issues), s.abortEarly) {
|
|
4435
|
+
i.typed = !1;
|
|
4436
|
+
break;
|
|
4437
|
+
}
|
|
4438
|
+
}
|
|
4439
|
+
a.typed || (i.typed = !1), i.value.push(a.value);
|
|
4440
|
+
}
|
|
4441
|
+
if (!i.issues || !s.abortEarly) for (const [o, p, a] of c) {
|
|
4442
|
+
if (a.issues) {
|
|
4443
|
+
const h = {
|
|
4444
|
+
type: "array",
|
|
4445
|
+
origin: "value",
|
|
4446
|
+
input: u,
|
|
4447
|
+
key: o,
|
|
4448
|
+
value: p
|
|
4449
|
+
};
|
|
4450
|
+
for (const v of a.issues)
|
|
4451
|
+
v.path ? v.path.unshift(h) : v.path = [h], i.issues?.push(v);
|
|
4452
|
+
if (i.issues || (i.issues = a.issues), s.abortEarly) {
|
|
4453
|
+
i.typed = !1;
|
|
4454
|
+
break;
|
|
4455
|
+
}
|
|
4456
|
+
}
|
|
4457
|
+
a.typed || (i.typed = !1), i.value.push(a.value);
|
|
4458
|
+
}
|
|
4459
|
+
} else f(this, "type", i, s);
|
|
4460
|
+
return i;
|
|
4461
|
+
}
|
|
4462
|
+
};
|
|
4463
|
+
}
|
|
4464
|
+
// @__NO_SIDE_EFFECTS__
|
|
4465
|
+
function ne(r) {
|
|
4466
|
+
return {
|
|
4467
|
+
kind: "schema",
|
|
4468
|
+
type: "undefined",
|
|
4469
|
+
reference: ne,
|
|
4470
|
+
expects: "undefined",
|
|
4471
|
+
async: !1,
|
|
4472
|
+
message: r,
|
|
4473
|
+
get "~standard"() {
|
|
4474
|
+
return /* @__PURE__ */ y(this);
|
|
4475
|
+
},
|
|
4476
|
+
"~run"(n, e) {
|
|
4477
|
+
return n.value === void 0 ? n.typed = !0 : f(this, "type", n, e), n;
|
|
4478
|
+
}
|
|
4479
|
+
};
|
|
4480
|
+
}
|
|
4481
|
+
// @__NO_SIDE_EFFECTS__
|
|
4482
|
+
function Zi(r, n) {
|
|
4483
|
+
return {
|
|
4484
|
+
kind: "schema",
|
|
4485
|
+
type: "undefinedable",
|
|
4486
|
+
reference: Zi,
|
|
4487
|
+
expects: `(${r.expects} | undefined)`,
|
|
4488
|
+
async: !1,
|
|
4489
|
+
wrapped: r,
|
|
4490
|
+
default: n,
|
|
4491
|
+
get "~standard"() {
|
|
4492
|
+
return /* @__PURE__ */ y(this);
|
|
4493
|
+
},
|
|
4494
|
+
"~run"(e, i) {
|
|
4495
|
+
return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ d(this, e, i)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, i);
|
|
4496
|
+
}
|
|
4497
|
+
};
|
|
4498
|
+
}
|
|
4499
|
+
// @__NO_SIDE_EFFECTS__
|
|
4500
|
+
function Ki(r, n) {
|
|
4501
|
+
return {
|
|
4502
|
+
kind: "schema",
|
|
4503
|
+
type: "undefinedable",
|
|
4504
|
+
reference: Ki,
|
|
4505
|
+
expects: `(${r.expects} | undefined)`,
|
|
4506
|
+
async: !0,
|
|
4507
|
+
wrapped: r,
|
|
4508
|
+
default: n,
|
|
4509
|
+
get "~standard"() {
|
|
4510
|
+
return /* @__PURE__ */ y(this);
|
|
4511
|
+
},
|
|
4512
|
+
async "~run"(e, i) {
|
|
4513
|
+
return e.value === void 0 && (this.default !== void 0 && (e.value = await /* @__PURE__ */ d(this, e, i)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, i);
|
|
4514
|
+
}
|
|
4515
|
+
};
|
|
4516
|
+
}
|
|
4517
|
+
// @__NO_SIDE_EFFECTS__
|
|
4518
|
+
function C(r) {
|
|
4519
|
+
let n;
|
|
4520
|
+
if (r) for (const e of r) n ? n.push(...e.issues) : n = e.issues;
|
|
4521
|
+
return n;
|
|
4522
|
+
}
|
|
4523
|
+
// @__NO_SIDE_EFFECTS__
|
|
4524
|
+
function Hi(r, n) {
|
|
4525
|
+
return {
|
|
4526
|
+
kind: "schema",
|
|
4527
|
+
type: "union",
|
|
4528
|
+
reference: Hi,
|
|
4529
|
+
expects: /* @__PURE__ */ E(r.map((e) => e.expects), "|"),
|
|
4530
|
+
async: !1,
|
|
4531
|
+
options: r,
|
|
4532
|
+
message: n,
|
|
4533
|
+
get "~standard"() {
|
|
4534
|
+
return /* @__PURE__ */ y(this);
|
|
4535
|
+
},
|
|
4536
|
+
"~run"(e, i) {
|
|
4537
|
+
let s, u, l;
|
|
4538
|
+
for (const c of this.options) {
|
|
4539
|
+
const o = c["~run"]({ value: e.value }, i);
|
|
4540
|
+
if (o.typed) if (o.issues) u ? u.push(o) : u = [o];
|
|
4541
|
+
else {
|
|
4542
|
+
s = o;
|
|
4543
|
+
break;
|
|
4544
|
+
}
|
|
4545
|
+
else l ? l.push(o) : l = [o];
|
|
4546
|
+
}
|
|
4547
|
+
if (s) return s;
|
|
4548
|
+
if (u) {
|
|
4549
|
+
if (u.length === 1) return u[0];
|
|
4550
|
+
f(this, "type", e, i, { issues: /* @__PURE__ */ C(u) }), e.typed = !0;
|
|
4551
|
+
} else {
|
|
4552
|
+
if (l?.length === 1) return l[0];
|
|
4553
|
+
f(this, "type", e, i, { issues: /* @__PURE__ */ C(l) });
|
|
4554
|
+
}
|
|
4555
|
+
return e;
|
|
4556
|
+
}
|
|
4557
|
+
};
|
|
4558
|
+
}
|
|
4559
|
+
// @__NO_SIDE_EFFECTS__
|
|
4560
|
+
function Qi(r, n) {
|
|
4561
|
+
return {
|
|
4562
|
+
kind: "schema",
|
|
4563
|
+
type: "union",
|
|
4564
|
+
reference: Qi,
|
|
4565
|
+
expects: /* @__PURE__ */ E(r.map((e) => e.expects), "|"),
|
|
4566
|
+
async: !0,
|
|
4567
|
+
options: r,
|
|
4568
|
+
message: n,
|
|
4569
|
+
get "~standard"() {
|
|
4570
|
+
return /* @__PURE__ */ y(this);
|
|
4571
|
+
},
|
|
4572
|
+
async "~run"(e, i) {
|
|
4573
|
+
let s, u, l;
|
|
4574
|
+
for (const c of this.options) {
|
|
4575
|
+
const o = await c["~run"]({ value: e.value }, i);
|
|
4576
|
+
if (o.typed) if (o.issues) u ? u.push(o) : u = [o];
|
|
4577
|
+
else {
|
|
4578
|
+
s = o;
|
|
4579
|
+
break;
|
|
4580
|
+
}
|
|
4581
|
+
else l ? l.push(o) : l = [o];
|
|
4582
|
+
}
|
|
4583
|
+
if (s) return s;
|
|
4584
|
+
if (u) {
|
|
4585
|
+
if (u.length === 1) return u[0];
|
|
4586
|
+
f(this, "type", e, i, { issues: /* @__PURE__ */ C(u) }), e.typed = !0;
|
|
4587
|
+
} else {
|
|
4588
|
+
if (l?.length === 1) return l[0];
|
|
4589
|
+
f(this, "type", e, i, { issues: /* @__PURE__ */ C(l) });
|
|
4590
|
+
}
|
|
4591
|
+
return e;
|
|
4592
|
+
}
|
|
4593
|
+
};
|
|
4594
|
+
}
|
|
4595
|
+
// @__NO_SIDE_EFFECTS__
|
|
4596
|
+
function Yi() {
|
|
4597
|
+
return {
|
|
4598
|
+
kind: "schema",
|
|
4599
|
+
type: "unknown",
|
|
4600
|
+
reference: Yi,
|
|
4601
|
+
expects: "unknown",
|
|
4602
|
+
async: !1,
|
|
4603
|
+
get "~standard"() {
|
|
4604
|
+
return /* @__PURE__ */ y(this);
|
|
4605
|
+
},
|
|
4606
|
+
"~run"(r) {
|
|
4607
|
+
return r.typed = !0, r;
|
|
4608
|
+
}
|
|
4609
|
+
};
|
|
4610
|
+
}
|
|
4611
|
+
// @__NO_SIDE_EFFECTS__
|
|
4612
|
+
function es(r, n, e) {
|
|
4613
|
+
return {
|
|
4614
|
+
kind: "schema",
|
|
4615
|
+
type: "variant",
|
|
4616
|
+
reference: es,
|
|
4617
|
+
expects: "Object",
|
|
4618
|
+
async: !1,
|
|
4619
|
+
key: r,
|
|
4620
|
+
options: n,
|
|
4621
|
+
message: e,
|
|
4622
|
+
get "~standard"() {
|
|
4623
|
+
return /* @__PURE__ */ y(this);
|
|
4624
|
+
},
|
|
4625
|
+
"~run"(i, s) {
|
|
4626
|
+
const u = i.value;
|
|
4627
|
+
if (u && typeof u == "object") {
|
|
4628
|
+
let l, c = 0, o = this.key, p = [];
|
|
4629
|
+
const a = (h, v) => {
|
|
4630
|
+
for (const k of h.options) {
|
|
4631
|
+
if (k.type === "variant") a(k, new Set(v).add(k.key));
|
|
4632
|
+
else {
|
|
4633
|
+
let P = !0, _ = 0;
|
|
4634
|
+
for (const g of v) {
|
|
4635
|
+
const A = k.entries[g];
|
|
4636
|
+
if (g in u ? A["~run"]({
|
|
4637
|
+
typed: !1,
|
|
4638
|
+
value: u[g]
|
|
4639
|
+
}, { abortEarly: !0 }).issues : A.type !== "exact_optional" && A.type !== "optional" && A.type !== "nullish") {
|
|
4640
|
+
P = !1, o !== g && (c < _ || c === _ && g in u && !(o in u)) && (c = _, o = g, p = []), o === g && p.push(k.entries[g].expects);
|
|
4641
|
+
break;
|
|
4642
|
+
}
|
|
4643
|
+
_++;
|
|
4644
|
+
}
|
|
4645
|
+
if (P) {
|
|
4646
|
+
const g = k["~run"]({ value: u }, s);
|
|
4647
|
+
(!l || !l.typed && g.typed) && (l = g);
|
|
4648
|
+
}
|
|
4649
|
+
}
|
|
4650
|
+
if (l && !l.issues) break;
|
|
4651
|
+
}
|
|
4652
|
+
};
|
|
4653
|
+
if (a(this, /* @__PURE__ */ new Set([this.key])), l) return l;
|
|
4654
|
+
f(this, "type", i, s, {
|
|
4655
|
+
input: u[o],
|
|
4656
|
+
expected: /* @__PURE__ */ E(p, "|"),
|
|
4657
|
+
path: [{
|
|
4658
|
+
type: "object",
|
|
4659
|
+
origin: "value",
|
|
4660
|
+
input: u,
|
|
4661
|
+
key: o,
|
|
4662
|
+
value: u[o]
|
|
4663
|
+
}]
|
|
4664
|
+
});
|
|
4665
|
+
} else f(this, "type", i, s);
|
|
4666
|
+
return i;
|
|
4667
|
+
}
|
|
4668
|
+
};
|
|
4669
|
+
}
|
|
4670
|
+
// @__NO_SIDE_EFFECTS__
|
|
4671
|
+
function ns(r, n, e) {
|
|
4672
|
+
return {
|
|
4673
|
+
kind: "schema",
|
|
4674
|
+
type: "variant",
|
|
4675
|
+
reference: ns,
|
|
4676
|
+
expects: "Object",
|
|
4677
|
+
async: !0,
|
|
4678
|
+
key: r,
|
|
4679
|
+
options: n,
|
|
4680
|
+
message: e,
|
|
4681
|
+
get "~standard"() {
|
|
4682
|
+
return /* @__PURE__ */ y(this);
|
|
4683
|
+
},
|
|
4684
|
+
async "~run"(i, s) {
|
|
4685
|
+
const u = i.value;
|
|
4686
|
+
if (u && typeof u == "object") {
|
|
4687
|
+
let l, c = 0, o = this.key, p = [];
|
|
4688
|
+
const a = async (h, v) => {
|
|
4689
|
+
for (const k of h.options) {
|
|
4690
|
+
if (k.type === "variant") await a(k, new Set(v).add(k.key));
|
|
4691
|
+
else {
|
|
4692
|
+
let P = !0, _ = 0;
|
|
4693
|
+
for (const g of v) {
|
|
4694
|
+
const A = k.entries[g];
|
|
4695
|
+
if (g in u ? (await A["~run"]({
|
|
4696
|
+
typed: !1,
|
|
4697
|
+
value: u[g]
|
|
4698
|
+
}, { abortEarly: !0 })).issues : A.type !== "exact_optional" && A.type !== "optional" && A.type !== "nullish") {
|
|
4699
|
+
P = !1, o !== g && (c < _ || c === _ && g in u && !(o in u)) && (c = _, o = g, p = []), o === g && p.push(k.entries[g].expects);
|
|
4700
|
+
break;
|
|
4701
|
+
}
|
|
4702
|
+
_++;
|
|
4703
|
+
}
|
|
4704
|
+
if (P) {
|
|
4705
|
+
const g = await k["~run"]({ value: u }, s);
|
|
4706
|
+
(!l || !l.typed && g.typed) && (l = g);
|
|
4707
|
+
}
|
|
4708
|
+
}
|
|
4709
|
+
if (l && !l.issues) break;
|
|
4710
|
+
}
|
|
4711
|
+
};
|
|
4712
|
+
if (await a(this, /* @__PURE__ */ new Set([this.key])), l) return l;
|
|
4713
|
+
f(this, "type", i, s, {
|
|
4714
|
+
input: u[o],
|
|
4715
|
+
expected: /* @__PURE__ */ E(p, "|"),
|
|
4716
|
+
path: [{
|
|
4717
|
+
type: "object",
|
|
4718
|
+
origin: "value",
|
|
4719
|
+
input: u,
|
|
4720
|
+
key: o,
|
|
4721
|
+
value: u[o]
|
|
4722
|
+
}]
|
|
4723
|
+
});
|
|
4724
|
+
} else f(this, "type", i, s);
|
|
4725
|
+
return i;
|
|
4726
|
+
}
|
|
4727
|
+
};
|
|
4728
|
+
}
|
|
4729
|
+
// @__NO_SIDE_EFFECTS__
|
|
4730
|
+
function re(r) {
|
|
4731
|
+
return {
|
|
4732
|
+
kind: "schema",
|
|
4733
|
+
type: "void",
|
|
4734
|
+
reference: re,
|
|
4735
|
+
expects: "void",
|
|
4736
|
+
async: !1,
|
|
4737
|
+
message: r,
|
|
4738
|
+
get "~standard"() {
|
|
4739
|
+
return /* @__PURE__ */ y(this);
|
|
4740
|
+
},
|
|
4741
|
+
"~run"(n, e) {
|
|
4742
|
+
return n.value === void 0 ? n.typed = !0 : f(this, "type", n, e), n;
|
|
4743
|
+
}
|
|
4744
|
+
};
|
|
4745
|
+
}
|
|
4746
|
+
// @__NO_SIDE_EFFECTS__
|
|
4747
|
+
function Ns(r, n) {
|
|
4748
|
+
return /* @__PURE__ */ ee(Object.keys(r.entries), n);
|
|
4749
|
+
}
|
|
4750
|
+
// @__NO_SIDE_EFFECTS__
|
|
4751
|
+
function Cs(r, n) {
|
|
4752
|
+
return {
|
|
4753
|
+
...r,
|
|
4754
|
+
get "~standard"() {
|
|
4755
|
+
return /* @__PURE__ */ y(this);
|
|
4756
|
+
},
|
|
4757
|
+
"~run"(e, i) {
|
|
4758
|
+
return r["~run"](e, {
|
|
4759
|
+
...i,
|
|
4760
|
+
message: n
|
|
4761
|
+
});
|
|
4762
|
+
}
|
|
4763
|
+
};
|
|
4764
|
+
}
|
|
4765
|
+
// @__NO_SIDE_EFFECTS__
|
|
4766
|
+
function zs(r, n) {
|
|
4767
|
+
const e = { ...r.entries };
|
|
4768
|
+
for (const i of n) delete e[i];
|
|
4769
|
+
return {
|
|
4770
|
+
...r,
|
|
4771
|
+
entries: e,
|
|
4772
|
+
get "~standard"() {
|
|
4773
|
+
return /* @__PURE__ */ y(this);
|
|
4774
|
+
}
|
|
4775
|
+
};
|
|
4776
|
+
}
|
|
4777
|
+
function rs(r, n, e) {
|
|
4778
|
+
const i = r["~run"]({ value: n }, /* @__PURE__ */ j(e));
|
|
4779
|
+
if (i.issues) throw new x(i.issues);
|
|
4780
|
+
return i.value;
|
|
4781
|
+
}
|
|
4782
|
+
async function is(r, n, e) {
|
|
4783
|
+
const i = await r["~run"]({ value: n }, /* @__PURE__ */ j(e));
|
|
4784
|
+
if (i.issues) throw new x(i.issues);
|
|
4785
|
+
return i.value;
|
|
4786
|
+
}
|
|
4787
|
+
// @__NO_SIDE_EFFECTS__
|
|
4788
|
+
function Ts(r, n) {
|
|
4789
|
+
const e = (i) => rs(r, i, n);
|
|
4790
|
+
return e.schema = r, e.config = n, e;
|
|
4791
|
+
}
|
|
4792
|
+
// @__NO_SIDE_EFFECTS__
|
|
4793
|
+
function Fs(r, n) {
|
|
4794
|
+
const e = (i) => is(r, i, n);
|
|
4795
|
+
return e.schema = r, e.config = n, e;
|
|
4796
|
+
}
|
|
4797
|
+
// @__NO_SIDE_EFFECTS__
|
|
4798
|
+
function $s(r, n) {
|
|
4799
|
+
const e = {};
|
|
4800
|
+
for (const i in r.entries) e[i] = !n || n.includes(i) ? /* @__PURE__ */ Q(r.entries[i]) : r.entries[i];
|
|
4801
|
+
return {
|
|
4802
|
+
...r,
|
|
4803
|
+
entries: e,
|
|
4804
|
+
get "~standard"() {
|
|
4805
|
+
return /* @__PURE__ */ y(this);
|
|
4806
|
+
}
|
|
4807
|
+
};
|
|
4808
|
+
}
|
|
4809
|
+
// @__NO_SIDE_EFFECTS__
|
|
4810
|
+
function Vs(r, n) {
|
|
4811
|
+
const e = {};
|
|
4812
|
+
for (const i in r.entries) e[i] = !n || n.includes(i) ? /* @__PURE__ */ Y(r.entries[i]) : r.entries[i];
|
|
4813
|
+
return {
|
|
4814
|
+
...r,
|
|
4815
|
+
entries: e,
|
|
4816
|
+
get "~standard"() {
|
|
4817
|
+
return /* @__PURE__ */ y(this);
|
|
4818
|
+
}
|
|
4819
|
+
};
|
|
4820
|
+
}
|
|
4821
|
+
// @__NO_SIDE_EFFECTS__
|
|
4822
|
+
function Ls(r, n) {
|
|
4823
|
+
const e = {};
|
|
4824
|
+
for (const i of n) e[i] = r.entries[i];
|
|
4825
|
+
return {
|
|
4826
|
+
...r,
|
|
4827
|
+
entries: e,
|
|
4828
|
+
get "~standard"() {
|
|
4829
|
+
return /* @__PURE__ */ y(this);
|
|
4830
|
+
}
|
|
4831
|
+
};
|
|
4832
|
+
}
|
|
4833
|
+
// @__NO_SIDE_EFFECTS__
|
|
4834
|
+
function Js(...r) {
|
|
4835
|
+
return {
|
|
4836
|
+
...r[0],
|
|
4837
|
+
pipe: r,
|
|
4838
|
+
get "~standard"() {
|
|
4839
|
+
return /* @__PURE__ */ y(this);
|
|
4840
|
+
},
|
|
4841
|
+
"~run"(n, e) {
|
|
4842
|
+
for (const i of r) if (i.kind !== "metadata") {
|
|
4843
|
+
if (n.issues && (i.kind === "schema" || i.kind === "transformation")) {
|
|
4844
|
+
n.typed = !1;
|
|
4845
|
+
break;
|
|
4846
|
+
}
|
|
4847
|
+
(!n.issues || !e.abortEarly && !e.abortPipeEarly) && (n = i["~run"](n, e));
|
|
4848
|
+
}
|
|
4849
|
+
return n;
|
|
4850
|
+
}
|
|
4851
|
+
};
|
|
4852
|
+
}
|
|
4853
|
+
// @__NO_SIDE_EFFECTS__
|
|
4854
|
+
function Ws(...r) {
|
|
4855
|
+
return {
|
|
4856
|
+
...r[0],
|
|
4857
|
+
pipe: r,
|
|
4858
|
+
async: !0,
|
|
4859
|
+
get "~standard"() {
|
|
4860
|
+
return /* @__PURE__ */ y(this);
|
|
4861
|
+
},
|
|
4862
|
+
async "~run"(n, e) {
|
|
4863
|
+
for (const i of r) if (i.kind !== "metadata") {
|
|
4864
|
+
if (n.issues && (i.kind === "schema" || i.kind === "transformation")) {
|
|
4865
|
+
n.typed = !1;
|
|
4866
|
+
break;
|
|
4867
|
+
}
|
|
4868
|
+
(!n.issues || !e.abortEarly && !e.abortPipeEarly) && (n = await i["~run"](n, e));
|
|
4869
|
+
}
|
|
4870
|
+
return n;
|
|
4871
|
+
}
|
|
4872
|
+
};
|
|
4873
|
+
}
|
|
4874
|
+
// @__NO_SIDE_EFFECTS__
|
|
4875
|
+
function Bs(r, n, e) {
|
|
4876
|
+
const i = Array.isArray(n) ? n : void 0, s = Array.isArray(n) ? e : n, u = {};
|
|
4877
|
+
for (const l in r.entries) u[l] = !i || i.includes(l) ? /* @__PURE__ */ Z(r.entries[l], s) : r.entries[l];
|
|
4878
|
+
return {
|
|
4879
|
+
...r,
|
|
4880
|
+
entries: u,
|
|
4881
|
+
get "~standard"() {
|
|
4882
|
+
return /* @__PURE__ */ y(this);
|
|
4883
|
+
}
|
|
4884
|
+
};
|
|
4885
|
+
}
|
|
4886
|
+
// @__NO_SIDE_EFFECTS__
|
|
4887
|
+
function Us(r, n, e) {
|
|
4888
|
+
const i = Array.isArray(n) ? n : void 0, s = Array.isArray(n) ? e : n, u = {};
|
|
4889
|
+
for (const l in r.entries) u[l] = !i || i.includes(l) ? /* @__PURE__ */ K(r.entries[l], s) : r.entries[l];
|
|
4890
|
+
return {
|
|
4891
|
+
...r,
|
|
4892
|
+
entries: u,
|
|
4893
|
+
get "~standard"() {
|
|
4894
|
+
return /* @__PURE__ */ y(this);
|
|
4895
|
+
}
|
|
4896
|
+
};
|
|
4897
|
+
}
|
|
4898
|
+
// @__NO_SIDE_EFFECTS__
|
|
4899
|
+
function ss(r, n, e) {
|
|
4900
|
+
const i = r["~run"]({ value: n }, /* @__PURE__ */ j(e));
|
|
4901
|
+
return {
|
|
4902
|
+
typed: i.typed,
|
|
4903
|
+
success: !i.issues,
|
|
4904
|
+
output: i.value,
|
|
4905
|
+
issues: i.issues
|
|
4906
|
+
};
|
|
4907
|
+
}
|
|
4908
|
+
// @__NO_SIDE_EFFECTS__
|
|
4909
|
+
async function ts(r, n, e) {
|
|
4910
|
+
const i = await r["~run"]({ value: n }, /* @__PURE__ */ j(e));
|
|
4911
|
+
return {
|
|
4912
|
+
typed: i.typed,
|
|
4913
|
+
success: !i.issues,
|
|
4914
|
+
output: i.value,
|
|
4915
|
+
issues: i.issues
|
|
4916
|
+
};
|
|
4917
|
+
}
|
|
4918
|
+
// @__NO_SIDE_EFFECTS__
|
|
4919
|
+
function Zs(r, n) {
|
|
4920
|
+
const e = (i) => /* @__PURE__ */ ss(r, i, n);
|
|
4921
|
+
return e.schema = r, e.config = n, e;
|
|
4922
|
+
}
|
|
4923
|
+
// @__NO_SIDE_EFFECTS__
|
|
4924
|
+
function Ks(r, n) {
|
|
4925
|
+
const e = (i) => /* @__PURE__ */ ts(r, i, n);
|
|
4926
|
+
return e.schema = r, e.config = n, e;
|
|
4927
|
+
}
|
|
4928
|
+
// @__NO_SIDE_EFFECTS__
|
|
4929
|
+
function Hs(r) {
|
|
4930
|
+
let n = "";
|
|
4931
|
+
for (const e of r) {
|
|
4932
|
+
n && (n += `
|
|
4933
|
+
`), n += `× ${e.message}`;
|
|
4934
|
+
const i = /* @__PURE__ */ $(e);
|
|
4935
|
+
i && (n += `
|
|
4936
|
+
→ at ${i}`);
|
|
4937
|
+
}
|
|
4938
|
+
return n;
|
|
4939
|
+
}
|
|
4940
|
+
// @__NO_SIDE_EFFECTS__
|
|
4941
|
+
function Qs(r) {
|
|
4942
|
+
return r.wrapped;
|
|
4943
|
+
}
|
|
4944
|
+
return t.BASE64_REGEX = ce, t.BIC_REGEX = fe, t.CUID2_REGEX = pe, t.DECIMAL_REGEX = ae, t.DIGITS_REGEX = ye, t.EMAIL_REGEX = he, t.EMOJI_REGEX = ve, t.HEXADECIMAL_REGEX = me, t.HEX_COLOR_REGEX = ge, t.IMEI_REGEX = de, t.IPV4_REGEX = ke, t.IPV6_REGEX = be, t.IP_REGEX = Ee, t.ISO_DATE_REGEX = xe, t.ISO_DATE_TIME_REGEX = _e, t.ISO_TIMESTAMP_REGEX = Ie, t.ISO_TIME_REGEX = Ae, t.ISO_TIME_SECOND_REGEX = we, t.ISO_WEEK_REGEX = De, t.MAC48_REGEX = je, t.MAC64_REGEX = Oe, t.MAC_REGEX = Ge, t.NANO_ID_REGEX = Re, t.OCTAL_REGEX = qe, t.RFC_EMAIL_REGEX = Me, t.SLUG_REGEX = Se, t.ULID_REGEX = Pe, t.UUID_REGEX = Xe, t.ValiError = x, t._addIssue = f, t._getByteCount = R, t._getGraphemeCount = q, t._getLastMetadata = X, t._getStandardProps = y, t._getWordCount = S, t._isLuhnAlgo = F, t._isValidObjectKey = I, t._joinExpects = E, t._stringify = m, t.any = Zr, t.args = ue, t.argsAsync = le, t.array = Kr, t.arrayAsync = Hr, t.assert = ws, t.awaitAsync = oe, t.base64 = Ne, t.bic = Ce, t.bigint = Qr, t.blob = Yr, t.boolean = ei, t.brand = ze, t.bytes = Te, t.check = Fe, t.checkAsync = $e, t.checkItems = Ve, t.checkItemsAsync = Le, t.config = Is, t.creditCard = Je, t.cuid2 = We, t.custom = ni, t.customAsync = ri, t.date = ii, t.decimal = Be, t.deleteGlobalConfig = os, t.deleteGlobalMessage = fs, t.deleteSchemaMessage = as, t.deleteSpecificMessage = hs, t.description = Ue, t.digits = Ze, t.email = Ke, t.emoji = He, t.empty = Qe, t.endsWith = Ye, t.entries = en, t.entriesFromList = ms, t.entriesFromObjects = gs, t.enum = B, t.enum_ = B, t.everyItem = nn, t.exactOptional = si, t.exactOptionalAsync = ti, t.examples = rn, t.excludes = sn, t.fallback = Ds, t.fallbackAsync = js, t.file = ui, t.filterItems = tn, t.findItem = un, t.finite = ln, t.flatten = Os, t.flavor = on, t.forward = Gs, t.forwardAsync = Rs, t.function = U, t.function_ = U, t.getDefault = d, t.getDefaults = V, t.getDefaultsAsync = L, t.getDescription = qs, t.getDotPath = $, t.getExamples = Ms, t.getFallback = b, t.getFallbacks = J, t.getFallbacksAsync = W, t.getGlobalConfig = j, t.getGlobalMessage = ie, t.getMetadata = Ss, t.getSchemaMessage = se, t.getSpecificMessage = te, t.getTitle = Ps, t.graphemes = cn, t.gtValue = fn, t.hash = pn, t.hexColor = yn, t.hexadecimal = an, t.imei = hn, t.includes = vn, t.instance = li, t.integer = mn, t.intersect = oi, t.intersectAsync = ci, t.ip = gn, t.ipv4 = dn, t.ipv6 = kn, t.is = Xs, t.isOfKind = ds, t.isOfType = ks, t.isValiError = bs, t.isoDate = bn, t.isoDateTime = En, t.isoTime = xn, t.isoTimeSecond = _n, t.isoTimestamp = An, t.isoWeek = wn, t.keyof = Ns, t.lazy = fi, t.lazyAsync = pi, t.length = In, t.literal = ai, t.looseObject = yi, t.looseObjectAsync = hi, t.looseTuple = vi, t.looseTupleAsync = mi, t.ltValue = Dn, t.mac = jn, t.mac48 = On, t.mac64 = Gn, t.map = gi, t.mapAsync = di, t.mapItems = Rn, t.maxBytes = qn, t.maxEntries = Mn, t.maxGraphemes = Sn, t.maxLength = Pn, t.maxSize = Xn, t.maxValue = Nn, t.maxWords = Cn, t.message = Cs, t.metadata = zn, t.mimeType = Tn, t.minBytes = Fn, t.minEntries = $n, t.minGraphemes = Vn, t.minLength = Ln, t.minSize = Jn, t.minValue = Wn, t.minWords = Bn, t.multipleOf = Un, t.nan = ki, t.nanoid = Zn, t.never = bi, t.nonEmpty = Kn, t.nonNullable = Ei, t.nonNullableAsync = xi, t.nonNullish = _i, t.nonNullishAsync = Ai, t.nonOptional = Z, t.nonOptionalAsync = K, t.normalize = Hn, t.notBytes = Qn, t.notEntries = Yn, t.notGraphemes = er, t.notLength = nr, t.notSize = rr, t.notValue = ir, t.notValues = sr, t.notWords = tr, t.null = H, t.null_ = H, t.nullable = wi, t.nullableAsync = Ii, t.nullish = Di, t.nullishAsync = ji, t.number = Oi, t.object = Gi, t.objectAsync = Ri, t.objectWithRest = qi, t.objectWithRestAsync = Mi, t.octal = ur, t.omit = zs, t.optional = Q, t.optionalAsync = Y, t.parse = rs, t.parseAsync = is, t.parseJson = lr, t.parser = Ts, t.parserAsync = Fs, t.partial = $s, t.partialAsync = Vs, t.partialCheck = cr, t.partialCheckAsync = fr, t.pick = Ls, t.picklist = ee, t.pipe = Js, t.pipeAsync = Ws, t.promise = Si, t.rawCheck = pr, t.rawCheckAsync = ar, t.rawTransform = yr, t.rawTransformAsync = hr, t.readonly = vr, t.record = Pi, t.recordAsync = Xi, t.reduceItems = mr, t.regex = gr, t.required = Bs, t.requiredAsync = Us, t.returns = dr, t.returnsAsync = kr, t.rfcEmail = br, t.safeInteger = Er, t.safeParse = ss, t.safeParseAsync = ts, t.safeParser = Zs, t.safeParserAsync = Ks, t.set = Ni, t.setAsync = Ci, t.setGlobalConfig = ls, t.setGlobalMessage = cs, t.setSchemaMessage = ps, t.setSpecificMessage = ys, t.size = xr, t.slug = _r, t.someItem = Ar, t.sortItems = wr, t.startsWith = Ir, t.strictObject = zi, t.strictObjectAsync = Ti, t.strictTuple = Fi, t.strictTupleAsync = $i, t.string = Vi, t.stringifyJson = Dr, t.summarize = Hs, t.symbol = Li, t.title = jr, t.toBigint = Or, t.toBoolean = Gr, t.toDate = Rr, t.toLowerCase = qr, t.toMaxValue = Mr, t.toMinValue = Sr, t.toNumber = Pr, t.toString = Xr, t.toUpperCase = Nr, t.transform = Cr, t.transformAsync = zr, t.trim = Tr, t.trimEnd = Fr, t.trimStart = $r, t.tuple = Ji, t.tupleAsync = Wi, t.tupleWithRest = Bi, t.tupleWithRestAsync = Ui, t.ulid = Vr, t.undefined = ne, t.undefined_ = ne, t.undefinedable = Zi, t.undefinedableAsync = Ki, t.union = Hi, t.unionAsync = Qi, t.unknown = Yi, t.unwrap = Qs, t.url = Lr, t.uuid = Jr, t.value = Wr, t.values = Br, t.variant = es, t.variantAsync = ns, t.void = re, t.void_ = re, t.words = Ur, t;
|
|
4945
|
+
}
|
|
4946
|
+
export {
|
|
4947
|
+
Ys as r
|
|
4948
|
+
};
|