@vscode/markdown-editor 0.0.2-53 → 0.0.2-55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +40 -5
- package/dist/index.js +2668 -2573
- package/dist/index.js.map +1 -1
- package/dist/web-editors.d.ts +0 -32
- package/dist/web-editors.js +899 -1009
- package/dist/web-editors.js.map +1 -1
- package/package.json +7 -4
- package/src/view/editor.css +36 -0
- package/src/view/themes/vscode-default.css +4 -0
- package/src/view/themes/vscode-github.css +4 -0
package/dist/web-editors.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as
|
|
1
|
+
import { S as sr, O as ar } from "./stringEdit-CVDbCUBY.js";
|
|
2
2
|
var yt;
|
|
3
3
|
function $(e, t, n) {
|
|
4
4
|
function r(a, c) {
|
|
@@ -34,24 +34,24 @@ function $(e, t, n) {
|
|
|
34
34
|
value: (a) => n?.Parent && a instanceof n.Parent ? !0 : a?._zod?.traits?.has(e)
|
|
35
35
|
}), Object.defineProperty(i, "name", { value: e }), i;
|
|
36
36
|
}
|
|
37
|
-
let
|
|
37
|
+
let ve = class extends Error {
|
|
38
38
|
constructor() {
|
|
39
39
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
(yt = globalThis).__zod_globalConfig ?? (yt.__zod_globalConfig = {});
|
|
43
|
-
const
|
|
44
|
-
function
|
|
45
|
-
return
|
|
43
|
+
const cr = globalThis.__zod_globalConfig;
|
|
44
|
+
function ze(e) {
|
|
45
|
+
return cr;
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function ln(e) {
|
|
48
48
|
const t = Object.values(e).filter((r) => typeof r == "number");
|
|
49
49
|
return Object.entries(e).filter(([r, o]) => t.indexOf(+r) === -1).map(([r, o]) => o);
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function ur(e, t) {
|
|
52
52
|
return typeof t == "bigint" ? t.toString() : t;
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function lr(e) {
|
|
55
55
|
return {
|
|
56
56
|
get value() {
|
|
57
57
|
{
|
|
@@ -61,7 +61,7 @@ function pr(e) {
|
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function dn(e) {
|
|
65
65
|
const t = e.startsWith("^") ? 1 : 0, n = e.endsWith("$") ? e.length - 1 : e.length;
|
|
66
66
|
return e.slice(t, n);
|
|
67
67
|
}
|
|
@@ -82,33 +82,33 @@ function B(e, t, n) {
|
|
|
82
82
|
configurable: !0
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
|
-
const
|
|
85
|
+
const fn = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
86
86
|
};
|
|
87
|
-
function
|
|
87
|
+
function dr(e) {
|
|
88
88
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
89
89
|
}
|
|
90
|
-
const
|
|
91
|
-
function
|
|
90
|
+
const fr = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
91
|
+
function hr(e) {
|
|
92
92
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function pr(e, t, n) {
|
|
95
95
|
const r = new e._zod.constr(t ?? e._zod.def);
|
|
96
96
|
return (!t || n?.parent) && (r._zod.parent = e), r;
|
|
97
97
|
}
|
|
98
98
|
function J(e) {
|
|
99
99
|
return {};
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function mr(e) {
|
|
102
102
|
return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
|
|
103
103
|
}
|
|
104
|
-
const
|
|
104
|
+
const _r = {
|
|
105
105
|
safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
|
|
106
106
|
int32: [-2147483648, 2147483647],
|
|
107
107
|
uint32: [0, 4294967295],
|
|
108
108
|
float32: [-34028234663852886e22, 34028234663852886e22],
|
|
109
109
|
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
|
|
110
110
|
};
|
|
111
|
-
function
|
|
111
|
+
function _e(e, t = 0) {
|
|
112
112
|
if (e.aborted === !0)
|
|
113
113
|
return !0;
|
|
114
114
|
for (let n = t; n < e.issues.length; n++)
|
|
@@ -116,7 +116,7 @@ function ge(e, t = 0) {
|
|
|
116
116
|
return !0;
|
|
117
117
|
return !1;
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function gr(e, t = 0) {
|
|
120
120
|
if (e.aborted === !0)
|
|
121
121
|
return !0;
|
|
122
122
|
for (let n = t; n < e.issues.length; n++)
|
|
@@ -124,75 +124,75 @@ function wr(e, t = 0) {
|
|
|
124
124
|
return !0;
|
|
125
125
|
return !1;
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function hn(e, t) {
|
|
128
128
|
return t.map((n) => {
|
|
129
129
|
var r;
|
|
130
130
|
return (r = n).path ?? (r.path = []), n.path.unshift(e), n;
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
|
-
function
|
|
133
|
+
function Se(e) {
|
|
134
134
|
return typeof e == "string" ? e : e?.message;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
137
|
-
const r = e.message ? e.message :
|
|
136
|
+
function $e(e, t, n) {
|
|
137
|
+
const r = e.message ? e.message : Se(e.inst?._zod.def?.error?.(e)) ?? Se(t?.error?.(e)) ?? Se(n.customError?.(e)) ?? Se(n.localeError?.(e)) ?? "Invalid input", { inst: o, continue: s, input: i, ...a } = e;
|
|
138
138
|
return a.path ?? (a.path = []), a.message = r, t?.reportInput && (a.input = i), a;
|
|
139
139
|
}
|
|
140
|
-
const
|
|
140
|
+
const pn = (e, t) => {
|
|
141
141
|
e.name = "$ZodError", Object.defineProperty(e, "_zod", {
|
|
142
142
|
value: e._zod,
|
|
143
143
|
enumerable: !1
|
|
144
144
|
}), Object.defineProperty(e, "issues", {
|
|
145
145
|
value: t,
|
|
146
146
|
enumerable: !1
|
|
147
|
-
}), e.message = JSON.stringify(t,
|
|
147
|
+
}), e.message = JSON.stringify(t, ur, 2), Object.defineProperty(e, "toString", {
|
|
148
148
|
value: () => e.message,
|
|
149
149
|
enumerable: !1
|
|
150
150
|
});
|
|
151
|
-
},
|
|
151
|
+
}, vr = $("$ZodError", pn), Le = $("$ZodError", pn, { Parent: Error }), yr = (e) => (t, n, r, o) => {
|
|
152
152
|
const s = r ? { ...r, async: !1 } : { async: !1 }, i = t._zod.run({ value: n, issues: [] }, s);
|
|
153
153
|
if (i instanceof Promise)
|
|
154
|
-
throw new
|
|
154
|
+
throw new ve();
|
|
155
155
|
if (i.issues.length) {
|
|
156
|
-
const a = new (o?.Err ?? e)(i.issues.map((c) =>
|
|
157
|
-
throw
|
|
156
|
+
const a = new (o?.Err ?? e)(i.issues.map((c) => $e(c, s, ze())));
|
|
157
|
+
throw fn(a, o?.callee), a;
|
|
158
158
|
}
|
|
159
159
|
return i.value;
|
|
160
|
-
},
|
|
160
|
+
}, br = /* @__PURE__ */ yr(Le), wr = (e) => async (t, n, r, o) => {
|
|
161
161
|
const s = r ? { ...r, async: !0 } : { async: !0 };
|
|
162
162
|
let i = t._zod.run({ value: n, issues: [] }, s);
|
|
163
163
|
if (i instanceof Promise && (i = await i), i.issues.length) {
|
|
164
|
-
const a = new (o?.Err ?? e)(i.issues.map((c) =>
|
|
165
|
-
throw
|
|
164
|
+
const a = new (o?.Err ?? e)(i.issues.map((c) => $e(c, s, ze())));
|
|
165
|
+
throw fn(a, o?.callee), a;
|
|
166
166
|
}
|
|
167
167
|
return i.value;
|
|
168
|
-
},
|
|
168
|
+
}, zr = /* @__PURE__ */ wr(Le), $r = (e) => (t, n, r) => {
|
|
169
169
|
const o = r ? { ...r, async: !1 } : { async: !1 }, s = t._zod.run({ value: n, issues: [] }, o);
|
|
170
170
|
if (s instanceof Promise)
|
|
171
|
-
throw new
|
|
171
|
+
throw new ve();
|
|
172
172
|
return s.issues.length ? {
|
|
173
173
|
success: !1,
|
|
174
|
-
error: new (e ??
|
|
174
|
+
error: new (e ?? vr)(s.issues.map((i) => $e(i, o, ze())))
|
|
175
175
|
} : { success: !0, data: s.value };
|
|
176
|
-
}, q = /* @__PURE__ */
|
|
176
|
+
}, q = /* @__PURE__ */ $r(Le), kr = (e) => async (t, n, r) => {
|
|
177
177
|
const o = r ? { ...r, async: !0 } : { async: !0 };
|
|
178
178
|
let s = t._zod.run({ value: n, issues: [] }, o);
|
|
179
179
|
return s instanceof Promise && (s = await s), s.issues.length ? {
|
|
180
180
|
success: !1,
|
|
181
|
-
error: new e(s.issues.map((i) =>
|
|
181
|
+
error: new e(s.issues.map((i) => $e(i, o, ze())))
|
|
182
182
|
} : { success: !0, data: s.value };
|
|
183
|
-
},
|
|
183
|
+
}, mn = /* @__PURE__ */ kr(Le), Sr = (e) => {
|
|
184
184
|
const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
185
185
|
return new RegExp(`^${t}$`);
|
|
186
|
-
},
|
|
186
|
+
}, Er = /^-?\d+$/, Or = /^-?\d+(?:\.\d+)?$/, Ir = /^(?:true|false)$/i, _n = /* @__PURE__ */ $("$ZodCheck", (e, t) => {
|
|
187
187
|
var n;
|
|
188
188
|
e._zod ?? (e._zod = {}), e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
|
|
189
|
-
}),
|
|
189
|
+
}), Pr = {
|
|
190
190
|
number: "number",
|
|
191
191
|
bigint: "bigint",
|
|
192
192
|
object: "date"
|
|
193
|
-
},
|
|
194
|
-
|
|
195
|
-
const n =
|
|
193
|
+
}, gn = /* @__PURE__ */ $("$ZodCheckGreaterThan", (e, t) => {
|
|
194
|
+
_n.init(e, t);
|
|
195
|
+
const n = Pr[typeof t.value];
|
|
196
196
|
e._zod.onattach.push((r) => {
|
|
197
197
|
const o = r._zod.bag, s = (t.inclusive ? o.minimum : o.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
|
|
198
198
|
t.value > s && (t.inclusive ? o.minimum = t.value : o.exclusiveMinimum = t.value);
|
|
@@ -207,12 +207,12 @@ const _n = (e, t) => {
|
|
|
207
207
|
continue: !t.abort
|
|
208
208
|
});
|
|
209
209
|
};
|
|
210
|
-
}),
|
|
211
|
-
|
|
212
|
-
const n = t.format?.includes("int"), r = n ? "int" : "number", [o, s] =
|
|
210
|
+
}), Zr = /* @__PURE__ */ $("$ZodCheckNumberFormat", (e, t) => {
|
|
211
|
+
_n.init(e, t), t.format = t.format || "float64";
|
|
212
|
+
const n = t.format?.includes("int"), r = n ? "int" : "number", [o, s] = _r[t.format];
|
|
213
213
|
e._zod.onattach.push((i) => {
|
|
214
214
|
const a = i._zod.bag;
|
|
215
|
-
a.format = t.format, a.minimum = o, a.maximum = s, n && (a.pattern =
|
|
215
|
+
a.format = t.format, a.minimum = o, a.maximum = s, n && (a.pattern = Er);
|
|
216
216
|
}), e._zod.check = (i) => {
|
|
217
217
|
const a = i.value;
|
|
218
218
|
if (n) {
|
|
@@ -268,13 +268,13 @@ const _n = (e, t) => {
|
|
|
268
268
|
continue: !t.abort
|
|
269
269
|
});
|
|
270
270
|
};
|
|
271
|
-
}),
|
|
271
|
+
}), Nr = {
|
|
272
272
|
major: 4,
|
|
273
273
|
minor: 4,
|
|
274
274
|
patch: 3
|
|
275
275
|
}, V = /* @__PURE__ */ $("$ZodType", (e, t) => {
|
|
276
276
|
var n;
|
|
277
|
-
e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version =
|
|
277
|
+
e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = Nr;
|
|
278
278
|
const r = [...e._zod.def.checks ?? []];
|
|
279
279
|
e._zod.traits.has("$ZodCheck") && r.unshift(e);
|
|
280
280
|
for (const o of r)
|
|
@@ -286,34 +286,34 @@ const _n = (e, t) => {
|
|
|
286
286
|
});
|
|
287
287
|
else {
|
|
288
288
|
const o = (i, a, c) => {
|
|
289
|
-
let u =
|
|
289
|
+
let u = _e(i), l;
|
|
290
290
|
for (const f of a) {
|
|
291
291
|
if (f._zod.def.when) {
|
|
292
|
-
if (
|
|
292
|
+
if (gr(i) || !f._zod.def.when(i))
|
|
293
293
|
continue;
|
|
294
294
|
} else if (u)
|
|
295
295
|
continue;
|
|
296
296
|
const h = i.issues.length, p = f._zod.check(i);
|
|
297
297
|
if (p instanceof Promise && c?.async === !1)
|
|
298
|
-
throw new
|
|
298
|
+
throw new ve();
|
|
299
299
|
if (l || p instanceof Promise)
|
|
300
300
|
l = (l ?? Promise.resolve()).then(async () => {
|
|
301
|
-
await p, i.issues.length !== h && (u || (u =
|
|
301
|
+
await p, i.issues.length !== h && (u || (u = _e(i, h)));
|
|
302
302
|
});
|
|
303
303
|
else {
|
|
304
304
|
if (i.issues.length === h)
|
|
305
305
|
continue;
|
|
306
|
-
u || (u =
|
|
306
|
+
u || (u = _e(i, h));
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
309
|
return l ? l.then(() => i) : i;
|
|
310
310
|
}, s = (i, a, c) => {
|
|
311
|
-
if (
|
|
311
|
+
if (_e(i))
|
|
312
312
|
return i.aborted = !0, i;
|
|
313
313
|
const u = o(a, r, c);
|
|
314
314
|
if (u instanceof Promise) {
|
|
315
315
|
if (c.async === !1)
|
|
316
|
-
throw new
|
|
316
|
+
throw new ve();
|
|
317
317
|
return u.then((l) => e._zod.parse(l, c));
|
|
318
318
|
}
|
|
319
319
|
return e._zod.parse(u, c);
|
|
@@ -328,7 +328,7 @@ const _n = (e, t) => {
|
|
|
328
328
|
const c = e._zod.parse(i, a);
|
|
329
329
|
if (c instanceof Promise) {
|
|
330
330
|
if (a.async === !1)
|
|
331
|
-
throw new
|
|
331
|
+
throw new ve();
|
|
332
332
|
return c.then((u) => o(u, r, a));
|
|
333
333
|
}
|
|
334
334
|
return o(c, r, a);
|
|
@@ -340,14 +340,14 @@ const _n = (e, t) => {
|
|
|
340
340
|
const s = q(e, o);
|
|
341
341
|
return s.success ? { value: s.data } : { issues: s.error?.issues };
|
|
342
342
|
} catch {
|
|
343
|
-
return
|
|
343
|
+
return mn(e, o).then((i) => i.success ? { value: i.data } : { issues: i.error?.issues });
|
|
344
344
|
}
|
|
345
345
|
},
|
|
346
346
|
vendor: "zod",
|
|
347
347
|
version: 1
|
|
348
348
|
}));
|
|
349
|
-
}),
|
|
350
|
-
V.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ??
|
|
349
|
+
}), Tr = /* @__PURE__ */ $("$ZodString", (e, t) => {
|
|
350
|
+
V.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? Sr(e._zod.bag), e._zod.parse = (n, r) => {
|
|
351
351
|
if (t.coerce)
|
|
352
352
|
try {
|
|
353
353
|
n.value = String(n.value);
|
|
@@ -360,8 +360,8 @@ const _n = (e, t) => {
|
|
|
360
360
|
inst: e
|
|
361
361
|
}), n;
|
|
362
362
|
};
|
|
363
|
-
}),
|
|
364
|
-
V.init(e, t), e._zod.pattern = e._zod.bag.pattern ??
|
|
363
|
+
}), vn = /* @__PURE__ */ $("$ZodNumber", (e, t) => {
|
|
364
|
+
V.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? Or, e._zod.parse = (n, r) => {
|
|
365
365
|
if (t.coerce)
|
|
366
366
|
try {
|
|
367
367
|
n.value = Number(n.value);
|
|
@@ -379,10 +379,10 @@ const _n = (e, t) => {
|
|
|
379
379
|
...s ? { received: s } : {}
|
|
380
380
|
}), n;
|
|
381
381
|
};
|
|
382
|
-
}),
|
|
383
|
-
|
|
384
|
-
}),
|
|
385
|
-
V.init(e, t), e._zod.pattern =
|
|
382
|
+
}), Rr = /* @__PURE__ */ $("$ZodNumberFormat", (e, t) => {
|
|
383
|
+
Zr.init(e, t), vn.init(e, t);
|
|
384
|
+
}), Cr = /* @__PURE__ */ $("$ZodBoolean", (e, t) => {
|
|
385
|
+
V.init(e, t), e._zod.pattern = Ir, e._zod.parse = (n, r) => {
|
|
386
386
|
if (t.coerce)
|
|
387
387
|
try {
|
|
388
388
|
n.value = !!n.value;
|
|
@@ -396,9 +396,9 @@ const _n = (e, t) => {
|
|
|
396
396
|
inst: e
|
|
397
397
|
}), n;
|
|
398
398
|
};
|
|
399
|
-
}),
|
|
399
|
+
}), jr = /* @__PURE__ */ $("$ZodUnknown", (e, t) => {
|
|
400
400
|
V.init(e, t), e._zod.parse = (n) => n;
|
|
401
|
-
}),
|
|
401
|
+
}), Ar = /* @__PURE__ */ $("$ZodVoid", (e, t) => {
|
|
402
402
|
V.init(e, t), e._zod.parse = (n, r) => {
|
|
403
403
|
const o = n.value;
|
|
404
404
|
return typeof o > "u" || n.issues.push({
|
|
@@ -410,9 +410,9 @@ const _n = (e, t) => {
|
|
|
410
410
|
};
|
|
411
411
|
});
|
|
412
412
|
function wt(e, t, n) {
|
|
413
|
-
e.issues.length && t.issues.push(...
|
|
413
|
+
e.issues.length && t.issues.push(...hn(n, e.issues)), t.value[n] = e.value;
|
|
414
414
|
}
|
|
415
|
-
const
|
|
415
|
+
const xr = /* @__PURE__ */ $("$ZodArray", (e, t) => {
|
|
416
416
|
V.init(e, t), e._zod.parse = (n, r) => {
|
|
417
417
|
const o = n.value;
|
|
418
418
|
if (!Array.isArray(o))
|
|
@@ -434,12 +434,12 @@ const Lr = /* @__PURE__ */ $("$ZodArray", (e, t) => {
|
|
|
434
434
|
return s.length ? Promise.all(s).then(() => n) : n;
|
|
435
435
|
};
|
|
436
436
|
});
|
|
437
|
-
function
|
|
437
|
+
function Re(e, t, n, r, o, s) {
|
|
438
438
|
const i = n in r;
|
|
439
439
|
if (e.issues.length) {
|
|
440
440
|
if (o && s && !i)
|
|
441
441
|
return;
|
|
442
|
-
t.issues.push(...
|
|
442
|
+
t.issues.push(...hn(n, e.issues));
|
|
443
443
|
}
|
|
444
444
|
if (!i && !o) {
|
|
445
445
|
e.issues.length || t.issues.push({
|
|
@@ -452,12 +452,12 @@ function Ce(e, t, n, r, o, s) {
|
|
|
452
452
|
}
|
|
453
453
|
e.value === void 0 ? i && (t.value[n] = void 0) : t.value[n] = e.value;
|
|
454
454
|
}
|
|
455
|
-
function
|
|
455
|
+
function Mr(e) {
|
|
456
456
|
const t = Object.keys(e.shape);
|
|
457
457
|
for (const r of t)
|
|
458
458
|
if (!e.shape?.[r]?._zod?.traits?.has("$ZodType"))
|
|
459
459
|
throw new Error(`Invalid element at key "${r}": expected a Zod schema`);
|
|
460
|
-
const n =
|
|
460
|
+
const n = mr(e.shape);
|
|
461
461
|
return {
|
|
462
462
|
...e,
|
|
463
463
|
keys: t,
|
|
@@ -466,7 +466,7 @@ function Ur(e) {
|
|
|
466
466
|
optionalKeys: new Set(n)
|
|
467
467
|
};
|
|
468
468
|
}
|
|
469
|
-
function
|
|
469
|
+
function Fr(e, t, n, r, o, s) {
|
|
470
470
|
const i = [], a = o.keySet, c = o.catchall._zod, u = c.def.type, l = c.optin === "optional", f = c.optout === "optional";
|
|
471
471
|
for (const h in t) {
|
|
472
472
|
if (h === "__proto__" || a.has(h))
|
|
@@ -476,7 +476,7 @@ function Jr(e, t, n, r, o, s) {
|
|
|
476
476
|
continue;
|
|
477
477
|
}
|
|
478
478
|
const p = c.run({ value: t[h], issues: [] }, r);
|
|
479
|
-
p instanceof Promise ? e.push(p.then((_) =>
|
|
479
|
+
p instanceof Promise ? e.push(p.then((_) => Re(_, n, h, t, l, f))) : Re(p, n, h, t, l, f);
|
|
480
480
|
}
|
|
481
481
|
return i.length && n.issues.push({
|
|
482
482
|
code: "unrecognized_keys",
|
|
@@ -485,7 +485,7 @@ function Jr(e, t, n, r, o, s) {
|
|
|
485
485
|
inst: s
|
|
486
486
|
}), e.length ? Promise.all(e).then(() => n) : n;
|
|
487
487
|
}
|
|
488
|
-
const
|
|
488
|
+
const Dr = /* @__PURE__ */ $("$ZodObject", (e, t) => {
|
|
489
489
|
if (V.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
|
|
490
490
|
const a = t.shape;
|
|
491
491
|
Object.defineProperty(t, "shape", {
|
|
@@ -497,7 +497,7 @@ const Vr = /* @__PURE__ */ $("$ZodObject", (e, t) => {
|
|
|
497
497
|
}
|
|
498
498
|
});
|
|
499
499
|
}
|
|
500
|
-
const r =
|
|
500
|
+
const r = lr(() => Mr(t));
|
|
501
501
|
B(e._zod, "propValues", () => {
|
|
502
502
|
const a = t.shape, c = {};
|
|
503
503
|
for (const u in a) {
|
|
@@ -510,7 +510,7 @@ const Vr = /* @__PURE__ */ $("$ZodObject", (e, t) => {
|
|
|
510
510
|
}
|
|
511
511
|
return c;
|
|
512
512
|
});
|
|
513
|
-
const o =
|
|
513
|
+
const o = dr, s = t.catchall;
|
|
514
514
|
let i;
|
|
515
515
|
e._zod.parse = (a, c) => {
|
|
516
516
|
i ?? (i = r.value);
|
|
@@ -526,31 +526,31 @@ const Vr = /* @__PURE__ */ $("$ZodObject", (e, t) => {
|
|
|
526
526
|
const l = [], f = i.shape;
|
|
527
527
|
for (const h of i.keys) {
|
|
528
528
|
const p = f[h], _ = p._zod.optin === "optional", v = p._zod.optout === "optional", k = p._zod.run({ value: u[h], issues: [] }, c);
|
|
529
|
-
k instanceof Promise ? l.push(k.then((j) =>
|
|
529
|
+
k instanceof Promise ? l.push(k.then((j) => Re(j, a, h, u, _, v))) : Re(k, a, h, u, _, v);
|
|
530
530
|
}
|
|
531
|
-
return s ?
|
|
531
|
+
return s ? Fr(l, u, a, c, r.value, e) : l.length ? Promise.all(l).then(() => a) : a;
|
|
532
532
|
};
|
|
533
533
|
});
|
|
534
534
|
function zt(e, t, n, r) {
|
|
535
535
|
for (const s of e)
|
|
536
536
|
if (s.issues.length === 0)
|
|
537
537
|
return t.value = s.value, t;
|
|
538
|
-
const o = e.filter((s) => !
|
|
538
|
+
const o = e.filter((s) => !_e(s));
|
|
539
539
|
return o.length === 1 ? (t.value = o[0].value, o[0]) : (t.issues.push({
|
|
540
540
|
code: "invalid_union",
|
|
541
541
|
input: t.value,
|
|
542
542
|
inst: n,
|
|
543
|
-
errors: e.map((s) => s.issues.map((i) =>
|
|
543
|
+
errors: e.map((s) => s.issues.map((i) => $e(i, r, ze())))
|
|
544
544
|
}), t);
|
|
545
545
|
}
|
|
546
|
-
const
|
|
546
|
+
const Lr = /* @__PURE__ */ $("$ZodUnion", (e, t) => {
|
|
547
547
|
V.init(e, t), B(e._zod, "optin", () => t.options.some((r) => r._zod.optin === "optional") ? "optional" : void 0), B(e._zod, "optout", () => t.options.some((r) => r._zod.optout === "optional") ? "optional" : void 0), B(e._zod, "values", () => {
|
|
548
548
|
if (t.options.every((r) => r._zod.values))
|
|
549
549
|
return new Set(t.options.flatMap((r) => Array.from(r._zod.values)));
|
|
550
550
|
}), B(e._zod, "pattern", () => {
|
|
551
551
|
if (t.options.every((r) => r._zod.pattern)) {
|
|
552
552
|
const r = t.options.map((o) => o._zod.pattern);
|
|
553
|
-
return new RegExp(`^(${r.map((o) =>
|
|
553
|
+
return new RegExp(`^(${r.map((o) => dn(o.source)).join("|")})$`);
|
|
554
554
|
}
|
|
555
555
|
});
|
|
556
556
|
const n = t.options.length === 1 ? t.options[0]._zod.run : null;
|
|
@@ -574,10 +574,10 @@ const Hr = /* @__PURE__ */ $("$ZodUnion", (e, t) => {
|
|
|
574
574
|
}
|
|
575
575
|
return s ? Promise.all(i).then((a) => zt(a, r, e, o)) : zt(i, r, e, o);
|
|
576
576
|
};
|
|
577
|
-
}),
|
|
577
|
+
}), Ur = /* @__PURE__ */ $("$ZodEnum", (e, t) => {
|
|
578
578
|
V.init(e, t);
|
|
579
|
-
const n =
|
|
580
|
-
e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) =>
|
|
579
|
+
const n = ln(t.entries), r = new Set(n);
|
|
580
|
+
e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) => fr.has(typeof o)).map((o) => typeof o == "string" ? hr(o) : o.toString()).join("|")})$`), e._zod.parse = (o, s) => {
|
|
581
581
|
const i = o.value;
|
|
582
582
|
return r.has(i) || o.issues.push({
|
|
583
583
|
code: "invalid_value",
|
|
@@ -590,10 +590,10 @@ const Hr = /* @__PURE__ */ $("$ZodUnion", (e, t) => {
|
|
|
590
590
|
function $t(e, t) {
|
|
591
591
|
return t === void 0 && (e.issues.length || e.fallback) ? { issues: [], value: void 0 } : e;
|
|
592
592
|
}
|
|
593
|
-
const
|
|
593
|
+
const Jr = /* @__PURE__ */ $("$ZodOptional", (e, t) => {
|
|
594
594
|
V.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", B(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), B(e._zod, "pattern", () => {
|
|
595
595
|
const n = t.innerType._zod.pattern;
|
|
596
|
-
return n ? new RegExp(`^(${
|
|
596
|
+
return n ? new RegExp(`^(${dn(n.source)})?$`) : void 0;
|
|
597
597
|
}), e._zod.parse = (n, r) => {
|
|
598
598
|
if (t.innerType._zod.optin === "optional") {
|
|
599
599
|
const o = n.value, s = t.innerType._zod.run(n, r);
|
|
@@ -603,7 +603,7 @@ const Wr = /* @__PURE__ */ $("$ZodOptional", (e, t) => {
|
|
|
603
603
|
};
|
|
604
604
|
});
|
|
605
605
|
var kt;
|
|
606
|
-
let
|
|
606
|
+
let Vr = class {
|
|
607
607
|
constructor() {
|
|
608
608
|
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
|
|
609
609
|
}
|
|
@@ -632,20 +632,20 @@ let Kr = class {
|
|
|
632
632
|
return this._map.has(t);
|
|
633
633
|
}
|
|
634
634
|
};
|
|
635
|
-
function
|
|
636
|
-
return new
|
|
635
|
+
function Hr() {
|
|
636
|
+
return new Vr();
|
|
637
637
|
}
|
|
638
|
-
(kt = globalThis).__zod_globalRegistry ?? (kt.__zod_globalRegistry =
|
|
639
|
-
const
|
|
638
|
+
(kt = globalThis).__zod_globalRegistry ?? (kt.__zod_globalRegistry = Hr());
|
|
639
|
+
const qr = globalThis.__zod_globalRegistry;
|
|
640
640
|
// @__NO_SIDE_EFFECTS__
|
|
641
|
-
function
|
|
641
|
+
function Wr(e, t) {
|
|
642
642
|
return new e({
|
|
643
643
|
type: "string",
|
|
644
644
|
...J()
|
|
645
645
|
});
|
|
646
646
|
}
|
|
647
647
|
// @__NO_SIDE_EFFECTS__
|
|
648
|
-
function
|
|
648
|
+
function Kr(e, t) {
|
|
649
649
|
return new e({
|
|
650
650
|
type: "number",
|
|
651
651
|
checks: [],
|
|
@@ -653,7 +653,7 @@ function Xr(e, t) {
|
|
|
653
653
|
});
|
|
654
654
|
}
|
|
655
655
|
// @__NO_SIDE_EFFECTS__
|
|
656
|
-
function
|
|
656
|
+
function Br(e, t) {
|
|
657
657
|
return new e({
|
|
658
658
|
type: "number",
|
|
659
659
|
check: "number_format",
|
|
@@ -663,28 +663,28 @@ function Qr(e, t) {
|
|
|
663
663
|
});
|
|
664
664
|
}
|
|
665
665
|
// @__NO_SIDE_EFFECTS__
|
|
666
|
-
function
|
|
666
|
+
function Gr(e, t) {
|
|
667
667
|
return new e({
|
|
668
668
|
type: "boolean",
|
|
669
669
|
...J()
|
|
670
670
|
});
|
|
671
671
|
}
|
|
672
672
|
// @__NO_SIDE_EFFECTS__
|
|
673
|
-
function
|
|
673
|
+
function Yr(e) {
|
|
674
674
|
return new e({
|
|
675
675
|
type: "unknown"
|
|
676
676
|
});
|
|
677
677
|
}
|
|
678
678
|
// @__NO_SIDE_EFFECTS__
|
|
679
|
-
function
|
|
679
|
+
function Xr(e, t) {
|
|
680
680
|
return new e({
|
|
681
681
|
type: "void",
|
|
682
682
|
...J()
|
|
683
683
|
});
|
|
684
684
|
}
|
|
685
685
|
// @__NO_SIDE_EFFECTS__
|
|
686
|
-
function
|
|
687
|
-
return new
|
|
686
|
+
function Qr(e, t) {
|
|
687
|
+
return new gn({
|
|
688
688
|
check: "greater_than",
|
|
689
689
|
...J(),
|
|
690
690
|
value: e,
|
|
@@ -692,8 +692,8 @@ function ro(e, t) {
|
|
|
692
692
|
});
|
|
693
693
|
}
|
|
694
694
|
// @__NO_SIDE_EFFECTS__
|
|
695
|
-
function
|
|
696
|
-
return new
|
|
695
|
+
function eo(e, t) {
|
|
696
|
+
return new gn({
|
|
697
697
|
check: "greater_than",
|
|
698
698
|
...J(),
|
|
699
699
|
value: e,
|
|
@@ -701,18 +701,18 @@ function oo(e, t) {
|
|
|
701
701
|
});
|
|
702
702
|
}
|
|
703
703
|
// @__NO_SIDE_EFFECTS__
|
|
704
|
-
function
|
|
705
|
-
return /* @__PURE__ */
|
|
704
|
+
function to(e) {
|
|
705
|
+
return /* @__PURE__ */ Qr(0);
|
|
706
706
|
}
|
|
707
707
|
// @__NO_SIDE_EFFECTS__
|
|
708
|
-
function
|
|
709
|
-
return /* @__PURE__ */
|
|
708
|
+
function no(e) {
|
|
709
|
+
return /* @__PURE__ */ eo(0);
|
|
710
710
|
}
|
|
711
711
|
function Xe(e) {
|
|
712
712
|
let t = e?.target ?? "draft-2020-12";
|
|
713
713
|
return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
|
|
714
714
|
processors: e.processors ?? {},
|
|
715
|
-
metadataRegistry: e?.metadata ??
|
|
715
|
+
metadataRegistry: e?.metadata ?? qr,
|
|
716
716
|
target: t,
|
|
717
717
|
unrepresentable: e?.unrepresentable ?? "throw",
|
|
718
718
|
override: e?.override ?? (() => {
|
|
@@ -940,18 +940,18 @@ function A(e, t) {
|
|
|
940
940
|
const St = (e, t, n = {}) => (r) => {
|
|
941
941
|
const { libraryOptions: o, target: s } = r ?? {}, i = Xe({ ...o ?? {}, target: s, io: t, processors: n });
|
|
942
942
|
return E(e, i), Qe(i, e), et(i, e);
|
|
943
|
-
},
|
|
943
|
+
}, ro = {
|
|
944
944
|
guid: "uuid",
|
|
945
945
|
url: "uri",
|
|
946
946
|
datetime: "date-time",
|
|
947
947
|
json_string: "json-string",
|
|
948
948
|
regex: ""
|
|
949
949
|
// do not set
|
|
950
|
-
},
|
|
950
|
+
}, oo = (e, t, n, r) => {
|
|
951
951
|
const o = n;
|
|
952
952
|
o.type = "string";
|
|
953
953
|
const { minimum: s, maximum: i, format: a, patterns: c, contentEncoding: u } = e._zod.bag;
|
|
954
|
-
if (typeof s == "number" && (o.minLength = s), typeof i == "number" && (o.maxLength = i), a && (o.format =
|
|
954
|
+
if (typeof s == "number" && (o.minLength = s), typeof i == "number" && (o.maxLength = i), a && (o.format = ro[a] ?? a, o.format === "" && delete o.format, a === "time" && delete o.format), u && (o.contentEncoding = u), c && c.size > 0) {
|
|
955
955
|
const l = [...c];
|
|
956
956
|
l.length === 1 ? o.pattern = l[0].source : l.length > 1 && (o.allOf = [
|
|
957
957
|
...l.map((f) => ({
|
|
@@ -960,38 +960,38 @@ const St = (e, t, n = {}) => (r) => {
|
|
|
960
960
|
}))
|
|
961
961
|
]);
|
|
962
962
|
}
|
|
963
|
-
},
|
|
963
|
+
}, io = (e, t, n, r) => {
|
|
964
964
|
const o = n, { minimum: s, maximum: i, format: a, multipleOf: c, exclusiveMaximum: u, exclusiveMinimum: l } = e._zod.bag;
|
|
965
965
|
typeof a == "string" && a.includes("int") ? o.type = "integer" : o.type = "number";
|
|
966
966
|
const f = typeof l == "number" && l >= (s ?? Number.NEGATIVE_INFINITY), h = typeof u == "number" && u <= (i ?? Number.POSITIVE_INFINITY), p = t.target === "draft-04" || t.target === "openapi-3.0";
|
|
967
967
|
f ? p ? (o.minimum = l, o.exclusiveMinimum = !0) : o.exclusiveMinimum = l : typeof s == "number" && (o.minimum = s), h ? p ? (o.maximum = u, o.exclusiveMaximum = !0) : o.exclusiveMaximum = u : typeof i == "number" && (o.maximum = i), typeof c == "number" && (o.multipleOf = c);
|
|
968
|
-
},
|
|
968
|
+
}, so = (e, t, n, r) => {
|
|
969
969
|
n.type = "boolean";
|
|
970
|
-
},
|
|
970
|
+
}, ao = (e, t, n, r) => {
|
|
971
971
|
if (t.unrepresentable === "throw")
|
|
972
972
|
throw new Error("BigInt cannot be represented in JSON Schema");
|
|
973
|
-
},
|
|
973
|
+
}, co = (e, t, n, r) => {
|
|
974
974
|
if (t.unrepresentable === "throw")
|
|
975
975
|
throw new Error("Symbols cannot be represented in JSON Schema");
|
|
976
|
-
},
|
|
976
|
+
}, uo = (e, t, n, r) => {
|
|
977
977
|
t.target === "openapi-3.0" ? (n.type = "string", n.nullable = !0, n.enum = [null]) : n.type = "null";
|
|
978
|
-
},
|
|
978
|
+
}, lo = (e, t, n, r) => {
|
|
979
979
|
if (t.unrepresentable === "throw")
|
|
980
980
|
throw new Error("Undefined cannot be represented in JSON Schema");
|
|
981
|
-
},
|
|
981
|
+
}, fo = (e, t, n, r) => {
|
|
982
982
|
if (t.unrepresentable === "throw")
|
|
983
983
|
throw new Error("Void cannot be represented in JSON Schema");
|
|
984
|
-
},
|
|
984
|
+
}, ho = (e, t, n, r) => {
|
|
985
985
|
n.not = {};
|
|
986
|
-
},
|
|
987
|
-
},
|
|
988
|
-
},
|
|
986
|
+
}, po = (e, t, n, r) => {
|
|
987
|
+
}, mo = (e, t, n, r) => {
|
|
988
|
+
}, _o = (e, t, n, r) => {
|
|
989
989
|
if (t.unrepresentable === "throw")
|
|
990
990
|
throw new Error("Date cannot be represented in JSON Schema");
|
|
991
|
-
},
|
|
992
|
-
const o = e._zod.def, s =
|
|
991
|
+
}, go = (e, t, n, r) => {
|
|
992
|
+
const o = e._zod.def, s = ln(o.entries);
|
|
993
993
|
s.every((i) => typeof i == "number") && (n.type = "number"), s.every((i) => typeof i == "string") && (n.type = "string"), n.enum = s;
|
|
994
|
-
},
|
|
994
|
+
}, vo = (e, t, n, r) => {
|
|
995
995
|
const o = e._zod.def, s = [];
|
|
996
996
|
for (const i of o.values)
|
|
997
997
|
if (i === void 0) {
|
|
@@ -1008,45 +1008,45 @@ const St = (e, t, n = {}) => (r) => {
|
|
|
1008
1008
|
n.type = i === null ? "null" : typeof i, t.target === "draft-04" || t.target === "openapi-3.0" ? n.enum = [i] : n.const = i;
|
|
1009
1009
|
} else
|
|
1010
1010
|
s.every((i) => typeof i == "number") && (n.type = "number"), s.every((i) => typeof i == "string") && (n.type = "string"), s.every((i) => typeof i == "boolean") && (n.type = "boolean"), s.every((i) => i === null) && (n.type = "null"), n.enum = s;
|
|
1011
|
-
},
|
|
1011
|
+
}, yo = (e, t, n, r) => {
|
|
1012
1012
|
if (t.unrepresentable === "throw")
|
|
1013
1013
|
throw new Error("NaN cannot be represented in JSON Schema");
|
|
1014
|
-
},
|
|
1014
|
+
}, bo = (e, t, n, r) => {
|
|
1015
1015
|
const o = n, s = e._zod.pattern;
|
|
1016
1016
|
if (!s)
|
|
1017
1017
|
throw new Error("Pattern not found in template literal");
|
|
1018
1018
|
o.type = "string", o.pattern = s.source;
|
|
1019
|
-
},
|
|
1019
|
+
}, wo = (e, t, n, r) => {
|
|
1020
1020
|
const o = n, s = {
|
|
1021
1021
|
type: "string",
|
|
1022
1022
|
format: "binary",
|
|
1023
1023
|
contentEncoding: "binary"
|
|
1024
1024
|
}, { minimum: i, maximum: a, mime: c } = e._zod.bag;
|
|
1025
1025
|
i !== void 0 && (s.minLength = i), a !== void 0 && (s.maxLength = a), c ? c.length === 1 ? (s.contentMediaType = c[0], Object.assign(o, s)) : (Object.assign(o, s), o.anyOf = c.map((u) => ({ contentMediaType: u }))) : Object.assign(o, s);
|
|
1026
|
-
},
|
|
1026
|
+
}, zo = (e, t, n, r) => {
|
|
1027
1027
|
n.type = "boolean";
|
|
1028
|
-
},
|
|
1028
|
+
}, $o = (e, t, n, r) => {
|
|
1029
1029
|
if (t.unrepresentable === "throw")
|
|
1030
1030
|
throw new Error("Custom types cannot be represented in JSON Schema");
|
|
1031
|
-
},
|
|
1031
|
+
}, ko = (e, t, n, r) => {
|
|
1032
1032
|
if (t.unrepresentable === "throw")
|
|
1033
1033
|
throw new Error("Function types cannot be represented in JSON Schema");
|
|
1034
|
-
},
|
|
1034
|
+
}, So = (e, t, n, r) => {
|
|
1035
1035
|
if (t.unrepresentable === "throw")
|
|
1036
1036
|
throw new Error("Transforms cannot be represented in JSON Schema");
|
|
1037
|
-
},
|
|
1037
|
+
}, Eo = (e, t, n, r) => {
|
|
1038
1038
|
if (t.unrepresentable === "throw")
|
|
1039
1039
|
throw new Error("Map cannot be represented in JSON Schema");
|
|
1040
|
-
},
|
|
1040
|
+
}, Oo = (e, t, n, r) => {
|
|
1041
1041
|
if (t.unrepresentable === "throw")
|
|
1042
1042
|
throw new Error("Set cannot be represented in JSON Schema");
|
|
1043
|
-
},
|
|
1043
|
+
}, Io = (e, t, n, r) => {
|
|
1044
1044
|
const o = n, s = e._zod.def, { minimum: i, maximum: a } = e._zod.bag;
|
|
1045
1045
|
typeof i == "number" && (o.minItems = i), typeof a == "number" && (o.maxItems = a), o.type = "array", o.items = E(s.element, t, {
|
|
1046
1046
|
...r,
|
|
1047
1047
|
path: [...r.path, "items"]
|
|
1048
1048
|
});
|
|
1049
|
-
},
|
|
1049
|
+
}, Po = (e, t, n, r) => {
|
|
1050
1050
|
const o = n, s = e._zod.def;
|
|
1051
1051
|
o.type = "object", o.properties = {};
|
|
1052
1052
|
const i = s.shape;
|
|
@@ -1063,13 +1063,13 @@ const St = (e, t, n = {}) => (r) => {
|
|
|
1063
1063
|
...r,
|
|
1064
1064
|
path: [...r.path, "additionalProperties"]
|
|
1065
1065
|
})) : t.io === "output" && (o.additionalProperties = !1);
|
|
1066
|
-
},
|
|
1066
|
+
}, Zo = (e, t, n, r) => {
|
|
1067
1067
|
const o = e._zod.def, s = o.inclusive === !1, i = o.options.map((a, c) => E(a, t, {
|
|
1068
1068
|
...r,
|
|
1069
1069
|
path: [...r.path, s ? "oneOf" : "anyOf", c]
|
|
1070
1070
|
}));
|
|
1071
1071
|
s ? n.oneOf = i : n.anyOf = i;
|
|
1072
|
-
},
|
|
1072
|
+
}, No = (e, t, n, r) => {
|
|
1073
1073
|
const o = e._zod.def, s = E(o.left, t, {
|
|
1074
1074
|
...r,
|
|
1075
1075
|
path: [...r.path, "allOf", 0]
|
|
@@ -1081,7 +1081,7 @@ const St = (e, t, n = {}) => (r) => {
|
|
|
1081
1081
|
...a(i) ? i.allOf : [i]
|
|
1082
1082
|
];
|
|
1083
1083
|
n.allOf = c;
|
|
1084
|
-
},
|
|
1084
|
+
}, To = (e, t, n, r) => {
|
|
1085
1085
|
const o = n, s = e._zod.def;
|
|
1086
1086
|
o.type = "array";
|
|
1087
1087
|
const i = t.target === "draft-2020-12" ? "prefixItems" : "items", a = t.target === "draft-2020-12" || t.target === "openapi-3.0" ? "items" : "additionalItems", c = s.items.map((h, p) => E(h, t, {
|
|
@@ -1096,7 +1096,7 @@ const St = (e, t, n = {}) => (r) => {
|
|
|
1096
1096
|
}, u && o.items.anyOf.push(u), o.minItems = c.length, u || (o.maxItems = c.length)) : (o.items = c, u && (o.additionalItems = u));
|
|
1097
1097
|
const { minimum: l, maximum: f } = e._zod.bag;
|
|
1098
1098
|
typeof l == "number" && (o.minItems = l), typeof f == "number" && (o.maxItems = f);
|
|
1099
|
-
},
|
|
1099
|
+
}, Ro = (e, t, n, r) => {
|
|
1100
1100
|
const o = n, s = e._zod.def;
|
|
1101
1101
|
o.type = "object";
|
|
1102
1102
|
const i = s.keyType, c = i._zod.bag?.patterns;
|
|
@@ -1121,25 +1121,25 @@ const St = (e, t, n = {}) => (r) => {
|
|
|
1121
1121
|
const l = [...u].filter((f) => typeof f == "string" || typeof f == "number");
|
|
1122
1122
|
l.length > 0 && (o.required = l);
|
|
1123
1123
|
}
|
|
1124
|
-
},
|
|
1124
|
+
}, Co = (e, t, n, r) => {
|
|
1125
1125
|
const o = e._zod.def, s = E(o.innerType, t, r), i = t.seen.get(e);
|
|
1126
1126
|
t.target === "openapi-3.0" ? (i.ref = o.innerType, n.nullable = !0) : n.anyOf = [s, { type: "null" }];
|
|
1127
|
-
},
|
|
1127
|
+
}, jo = (e, t, n, r) => {
|
|
1128
1128
|
const o = e._zod.def;
|
|
1129
1129
|
E(o.innerType, t, r);
|
|
1130
1130
|
const s = t.seen.get(e);
|
|
1131
1131
|
s.ref = o.innerType;
|
|
1132
|
-
},
|
|
1132
|
+
}, Ao = (e, t, n, r) => {
|
|
1133
1133
|
const o = e._zod.def;
|
|
1134
1134
|
E(o.innerType, t, r);
|
|
1135
1135
|
const s = t.seen.get(e);
|
|
1136
1136
|
s.ref = o.innerType, n.default = JSON.parse(JSON.stringify(o.defaultValue));
|
|
1137
|
-
},
|
|
1137
|
+
}, xo = (e, t, n, r) => {
|
|
1138
1138
|
const o = e._zod.def;
|
|
1139
1139
|
E(o.innerType, t, r);
|
|
1140
1140
|
const s = t.seen.get(e);
|
|
1141
1141
|
s.ref = o.innerType, t.io === "input" && (n._prefault = JSON.parse(JSON.stringify(o.defaultValue)));
|
|
1142
|
-
},
|
|
1142
|
+
}, Mo = (e, t, n, r) => {
|
|
1143
1143
|
const o = e._zod.def;
|
|
1144
1144
|
E(o.innerType, t, r);
|
|
1145
1145
|
const s = t.seen.get(e);
|
|
@@ -1151,73 +1151,73 @@ const St = (e, t, n = {}) => (r) => {
|
|
|
1151
1151
|
throw new Error("Dynamic catch values are not supported in JSON Schema");
|
|
1152
1152
|
}
|
|
1153
1153
|
n.default = i;
|
|
1154
|
-
},
|
|
1154
|
+
}, Fo = (e, t, n, r) => {
|
|
1155
1155
|
const o = e._zod.def, s = o.in._zod.traits.has("$ZodTransform"), i = t.io === "input" ? s ? o.out : o.in : o.out;
|
|
1156
1156
|
E(i, t, r);
|
|
1157
1157
|
const a = t.seen.get(e);
|
|
1158
1158
|
a.ref = i;
|
|
1159
|
-
},
|
|
1159
|
+
}, Do = (e, t, n, r) => {
|
|
1160
1160
|
const o = e._zod.def;
|
|
1161
1161
|
E(o.innerType, t, r);
|
|
1162
1162
|
const s = t.seen.get(e);
|
|
1163
1163
|
s.ref = o.innerType, n.readOnly = !0;
|
|
1164
|
-
},
|
|
1164
|
+
}, Lo = (e, t, n, r) => {
|
|
1165
1165
|
const o = e._zod.def;
|
|
1166
1166
|
E(o.innerType, t, r);
|
|
1167
1167
|
const s = t.seen.get(e);
|
|
1168
1168
|
s.ref = o.innerType;
|
|
1169
|
-
},
|
|
1169
|
+
}, Uo = (e, t, n, r) => {
|
|
1170
1170
|
const o = e._zod.def;
|
|
1171
1171
|
E(o.innerType, t, r);
|
|
1172
1172
|
const s = t.seen.get(e);
|
|
1173
1173
|
s.ref = o.innerType;
|
|
1174
|
-
},
|
|
1174
|
+
}, Jo = (e, t, n, r) => {
|
|
1175
1175
|
const o = e._zod.innerType;
|
|
1176
1176
|
E(o, t, r);
|
|
1177
1177
|
const s = t.seen.get(e);
|
|
1178
1178
|
s.ref = o;
|
|
1179
1179
|
}, Et = {
|
|
1180
|
-
string:
|
|
1181
|
-
number:
|
|
1182
|
-
boolean:
|
|
1183
|
-
bigint:
|
|
1184
|
-
symbol:
|
|
1185
|
-
null:
|
|
1186
|
-
undefined:
|
|
1187
|
-
void:
|
|
1188
|
-
never:
|
|
1189
|
-
any:
|
|
1190
|
-
unknown:
|
|
1191
|
-
date:
|
|
1192
|
-
enum:
|
|
1193
|
-
literal:
|
|
1194
|
-
nan:
|
|
1195
|
-
template_literal:
|
|
1196
|
-
file:
|
|
1197
|
-
success:
|
|
1198
|
-
custom:
|
|
1199
|
-
function:
|
|
1200
|
-
transform:
|
|
1201
|
-
map:
|
|
1202
|
-
set:
|
|
1203
|
-
array:
|
|
1204
|
-
object:
|
|
1205
|
-
union:
|
|
1206
|
-
intersection:
|
|
1207
|
-
tuple:
|
|
1208
|
-
record:
|
|
1209
|
-
nullable:
|
|
1210
|
-
nonoptional:
|
|
1211
|
-
default:
|
|
1212
|
-
prefault:
|
|
1213
|
-
catch:
|
|
1214
|
-
pipe:
|
|
1215
|
-
readonly:
|
|
1216
|
-
promise:
|
|
1217
|
-
optional:
|
|
1218
|
-
lazy:
|
|
1180
|
+
string: oo,
|
|
1181
|
+
number: io,
|
|
1182
|
+
boolean: so,
|
|
1183
|
+
bigint: ao,
|
|
1184
|
+
symbol: co,
|
|
1185
|
+
null: uo,
|
|
1186
|
+
undefined: lo,
|
|
1187
|
+
void: fo,
|
|
1188
|
+
never: ho,
|
|
1189
|
+
any: po,
|
|
1190
|
+
unknown: mo,
|
|
1191
|
+
date: _o,
|
|
1192
|
+
enum: go,
|
|
1193
|
+
literal: vo,
|
|
1194
|
+
nan: yo,
|
|
1195
|
+
template_literal: bo,
|
|
1196
|
+
file: wo,
|
|
1197
|
+
success: zo,
|
|
1198
|
+
custom: $o,
|
|
1199
|
+
function: ko,
|
|
1200
|
+
transform: So,
|
|
1201
|
+
map: Eo,
|
|
1202
|
+
set: Oo,
|
|
1203
|
+
array: Io,
|
|
1204
|
+
object: Po,
|
|
1205
|
+
union: Zo,
|
|
1206
|
+
intersection: No,
|
|
1207
|
+
tuple: To,
|
|
1208
|
+
record: Ro,
|
|
1209
|
+
nullable: Co,
|
|
1210
|
+
nonoptional: jo,
|
|
1211
|
+
default: Ao,
|
|
1212
|
+
prefault: xo,
|
|
1213
|
+
catch: Mo,
|
|
1214
|
+
pipe: Fo,
|
|
1215
|
+
readonly: Do,
|
|
1216
|
+
promise: Lo,
|
|
1217
|
+
optional: Uo,
|
|
1218
|
+
lazy: Jo
|
|
1219
1219
|
};
|
|
1220
|
-
function
|
|
1220
|
+
function Vo(e, t) {
|
|
1221
1221
|
if ("_idmap" in e) {
|
|
1222
1222
|
const r = e, o = Xe({ ...t, processors: Et }), s = {};
|
|
1223
1223
|
for (const c of r._idmap.entries()) {
|
|
@@ -1248,7 +1248,7 @@ function Ko(e, t) {
|
|
|
1248
1248
|
const W = /* @__PURE__ */ $("ZodMiniType", (e, t) => {
|
|
1249
1249
|
if (!e._zod)
|
|
1250
1250
|
throw new Error("Uninitialized schema in ZodMiniType.");
|
|
1251
|
-
V.init(e, t), e.def = t, e.type = t.type, e.parse = (n, r) =>
|
|
1251
|
+
V.init(e, t), e.def = t, e.type = t.type, e.parse = (n, r) => br(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => q(e, n, r), e.parseAsync = async (n, r) => zr(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => mn(e, n, r), e.check = (...n) => e.clone({
|
|
1252
1252
|
...t,
|
|
1253
1253
|
checks: [
|
|
1254
1254
|
...t.checks ?? [],
|
|
@@ -1256,62 +1256,62 @@ const W = /* @__PURE__ */ $("ZodMiniType", (e, t) => {
|
|
|
1256
1256
|
_zod: { check: r, def: { check: "custom" }, onattach: [] }
|
|
1257
1257
|
} : r)
|
|
1258
1258
|
]
|
|
1259
|
-
}, { parent: !0 }), e.with = e.check, e.clone = (n, r) =>
|
|
1260
|
-
}),
|
|
1261
|
-
|
|
1259
|
+
}, { parent: !0 }), e.with = e.check, e.clone = (n, r) => pr(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.apply = (n) => n(e);
|
|
1260
|
+
}), Ho = /* @__PURE__ */ $("ZodMiniString", (e, t) => {
|
|
1261
|
+
Tr.init(e, t), W.init(e, t);
|
|
1262
1262
|
});
|
|
1263
1263
|
// @__NO_SIDE_EFFECTS__
|
|
1264
1264
|
function S(e) {
|
|
1265
|
-
return /* @__PURE__ */
|
|
1265
|
+
return /* @__PURE__ */ Wr(Ho);
|
|
1266
1266
|
}
|
|
1267
|
-
const
|
|
1268
|
-
|
|
1267
|
+
const yn = /* @__PURE__ */ $("ZodMiniNumber", (e, t) => {
|
|
1268
|
+
vn.init(e, t), W.init(e, t);
|
|
1269
1269
|
});
|
|
1270
1270
|
// @__NO_SIDE_EFFECTS__
|
|
1271
1271
|
function tt(e) {
|
|
1272
|
-
return /* @__PURE__ */
|
|
1272
|
+
return /* @__PURE__ */ Kr(yn);
|
|
1273
1273
|
}
|
|
1274
|
-
const
|
|
1275
|
-
|
|
1274
|
+
const qo = /* @__PURE__ */ $("ZodMiniNumberFormat", (e, t) => {
|
|
1275
|
+
Rr.init(e, t), yn.init(e, t);
|
|
1276
1276
|
});
|
|
1277
1277
|
// @__NO_SIDE_EFFECTS__
|
|
1278
1278
|
function Ot(e) {
|
|
1279
|
-
return /* @__PURE__ */
|
|
1279
|
+
return /* @__PURE__ */ Br(qo);
|
|
1280
1280
|
}
|
|
1281
|
-
const
|
|
1282
|
-
|
|
1281
|
+
const Wo = /* @__PURE__ */ $("ZodMiniBoolean", (e, t) => {
|
|
1282
|
+
Cr.init(e, t), W.init(e, t);
|
|
1283
1283
|
});
|
|
1284
1284
|
// @__NO_SIDE_EFFECTS__
|
|
1285
|
-
function
|
|
1286
|
-
return /* @__PURE__ */
|
|
1285
|
+
function ut(e) {
|
|
1286
|
+
return /* @__PURE__ */ Gr(Wo);
|
|
1287
1287
|
}
|
|
1288
|
-
const
|
|
1289
|
-
|
|
1288
|
+
const Ko = /* @__PURE__ */ $("ZodMiniUnknown", (e, t) => {
|
|
1289
|
+
jr.init(e, t), W.init(e, t);
|
|
1290
1290
|
});
|
|
1291
1291
|
// @__NO_SIDE_EFFECTS__
|
|
1292
|
-
function
|
|
1293
|
-
return /* @__PURE__ */
|
|
1292
|
+
function Ce() {
|
|
1293
|
+
return /* @__PURE__ */ Yr(Ko);
|
|
1294
1294
|
}
|
|
1295
|
-
const
|
|
1296
|
-
|
|
1295
|
+
const Bo = /* @__PURE__ */ $("ZodMiniVoid", (e, t) => {
|
|
1296
|
+
Ar.init(e, t), W.init(e, t);
|
|
1297
1297
|
});
|
|
1298
1298
|
// @__NO_SIDE_EFFECTS__
|
|
1299
1299
|
function It(e) {
|
|
1300
|
-
return /* @__PURE__ */
|
|
1300
|
+
return /* @__PURE__ */ Xr(Bo);
|
|
1301
1301
|
}
|
|
1302
|
-
const
|
|
1303
|
-
|
|
1302
|
+
const Go = /* @__PURE__ */ $("ZodMiniArray", (e, t) => {
|
|
1303
|
+
xr.init(e, t), W.init(e, t);
|
|
1304
1304
|
});
|
|
1305
1305
|
// @__NO_SIDE_EFFECTS__
|
|
1306
1306
|
function Ue(e, t) {
|
|
1307
|
-
return new
|
|
1307
|
+
return new Go({
|
|
1308
1308
|
type: "array",
|
|
1309
1309
|
element: e,
|
|
1310
1310
|
...J()
|
|
1311
1311
|
});
|
|
1312
1312
|
}
|
|
1313
|
-
const
|
|
1314
|
-
|
|
1313
|
+
const Yo = /* @__PURE__ */ $("ZodMiniObject", (e, t) => {
|
|
1314
|
+
Dr.init(e, t), W.init(e, t), B(e, "shape", () => t.shape);
|
|
1315
1315
|
});
|
|
1316
1316
|
// @__NO_SIDE_EFFECTS__
|
|
1317
1317
|
function b(e, t) {
|
|
@@ -1320,42 +1320,42 @@ function b(e, t) {
|
|
|
1320
1320
|
shape: e ?? {},
|
|
1321
1321
|
...J()
|
|
1322
1322
|
};
|
|
1323
|
-
return new
|
|
1323
|
+
return new Yo(n);
|
|
1324
1324
|
}
|
|
1325
|
-
const
|
|
1326
|
-
|
|
1325
|
+
const Xo = /* @__PURE__ */ $("ZodMiniUnion", (e, t) => {
|
|
1326
|
+
Lr.init(e, t), W.init(e, t);
|
|
1327
1327
|
});
|
|
1328
1328
|
// @__NO_SIDE_EFFECTS__
|
|
1329
|
-
function
|
|
1330
|
-
return new
|
|
1329
|
+
function Qo(e, t) {
|
|
1330
|
+
return new Xo({
|
|
1331
1331
|
type: "union",
|
|
1332
1332
|
options: e,
|
|
1333
1333
|
...J()
|
|
1334
1334
|
});
|
|
1335
1335
|
}
|
|
1336
|
-
const
|
|
1337
|
-
|
|
1336
|
+
const ei = /* @__PURE__ */ $("ZodMiniEnum", (e, t) => {
|
|
1337
|
+
Ur.init(e, t), W.init(e, t), e.options = Object.values(t.entries);
|
|
1338
1338
|
});
|
|
1339
1339
|
// @__NO_SIDE_EFFECTS__
|
|
1340
1340
|
function Pt(e, t) {
|
|
1341
1341
|
const n = Array.isArray(e) ? Object.fromEntries(e.map((r) => [r, r])) : e;
|
|
1342
|
-
return new
|
|
1342
|
+
return new ei({
|
|
1343
1343
|
type: "enum",
|
|
1344
1344
|
entries: n,
|
|
1345
1345
|
...J()
|
|
1346
1346
|
});
|
|
1347
1347
|
}
|
|
1348
|
-
const
|
|
1349
|
-
|
|
1348
|
+
const ti = /* @__PURE__ */ $("ZodMiniOptional", (e, t) => {
|
|
1349
|
+
Jr.init(e, t), W.init(e, t);
|
|
1350
1350
|
});
|
|
1351
1351
|
// @__NO_SIDE_EFFECTS__
|
|
1352
1352
|
function P(e) {
|
|
1353
|
-
return new
|
|
1353
|
+
return new ti({
|
|
1354
1354
|
type: "optional",
|
|
1355
1355
|
innerType: e
|
|
1356
1356
|
});
|
|
1357
1357
|
}
|
|
1358
|
-
const
|
|
1358
|
+
const ni = /* @__PURE__ */ new Set([
|
|
1359
1359
|
"type",
|
|
1360
1360
|
"format",
|
|
1361
1361
|
"properties",
|
|
@@ -1377,20 +1377,20 @@ function Ne(e) {
|
|
|
1377
1377
|
if (e === null || typeof e != "object") throw new Error(`normalizeJsonSchema: expected object, got ${typeof e}`);
|
|
1378
1378
|
if (Array.isArray(e)) throw new Error("normalizeJsonSchema: expected object, got array");
|
|
1379
1379
|
const t = e;
|
|
1380
|
-
if ("not" in t &&
|
|
1380
|
+
if ("not" in t && oi(t.not)) return !1;
|
|
1381
1381
|
const n = {};
|
|
1382
1382
|
for (const [r, o] of Object.entries(t)) {
|
|
1383
|
-
if (!
|
|
1384
|
-
const s =
|
|
1383
|
+
if (!ni.has(r)) continue;
|
|
1384
|
+
const s = ri(r, o);
|
|
1385
1385
|
s !== void 0 && (n[r] = s);
|
|
1386
1386
|
}
|
|
1387
1387
|
if (n.type === "object" && !("additionalProperties" in n) && (n.additionalProperties = !1), Array.isArray(n.oneOf) && !("discriminator" in n)) {
|
|
1388
|
-
const r =
|
|
1388
|
+
const r = ii(n.oneOf);
|
|
1389
1389
|
r !== void 0 && (n.discriminator = r);
|
|
1390
1390
|
}
|
|
1391
1391
|
return "discriminator" in n && !Array.isArray(n.oneOf) && delete n.discriminator, Object.keys(n).length === 0 ? !0 : n;
|
|
1392
1392
|
}
|
|
1393
|
-
function
|
|
1393
|
+
function ri(e, t) {
|
|
1394
1394
|
switch (e) {
|
|
1395
1395
|
case "properties": {
|
|
1396
1396
|
if (!nt(t)) return {};
|
|
@@ -1418,13 +1418,13 @@ function ai(e, t) {
|
|
|
1418
1418
|
return t;
|
|
1419
1419
|
}
|
|
1420
1420
|
}
|
|
1421
|
-
function
|
|
1421
|
+
function oi(e) {
|
|
1422
1422
|
return nt(e) && Object.keys(e).length === 0;
|
|
1423
1423
|
}
|
|
1424
1424
|
function nt(e) {
|
|
1425
1425
|
return e !== null && typeof e == "object" && !Array.isArray(e);
|
|
1426
1426
|
}
|
|
1427
|
-
function
|
|
1427
|
+
function ii(e) {
|
|
1428
1428
|
if (e.length < 2) return;
|
|
1429
1429
|
const t = [];
|
|
1430
1430
|
for (const r of e) {
|
|
@@ -1456,7 +1456,7 @@ function Zt(e) {
|
|
|
1456
1456
|
r === !0 || r === !1 || "const" in r && t.push(n);
|
|
1457
1457
|
return t;
|
|
1458
1458
|
}
|
|
1459
|
-
var
|
|
1459
|
+
var bn = class wn {
|
|
1460
1460
|
paramsSchema;
|
|
1461
1461
|
resultSchema;
|
|
1462
1462
|
errorSchema;
|
|
@@ -1473,9 +1473,9 @@ var zn = class $n {
|
|
|
1473
1473
|
* closed.
|
|
1474
1474
|
*/
|
|
1475
1475
|
withStream(t) {
|
|
1476
|
-
return new
|
|
1476
|
+
return new wn(this.paramsSchema, this.resultSchema, this.errorSchema, this.docs, t.client, t.server);
|
|
1477
1477
|
}
|
|
1478
|
-
},
|
|
1478
|
+
}, zn = class {
|
|
1479
1479
|
paramsSchema;
|
|
1480
1480
|
docs;
|
|
1481
1481
|
kind = "notification";
|
|
@@ -1483,24 +1483,24 @@ var zn = class $n {
|
|
|
1483
1483
|
this.paramsSchema = e, this.docs = t;
|
|
1484
1484
|
}
|
|
1485
1485
|
};
|
|
1486
|
-
function
|
|
1486
|
+
function T(e, t, n, r) {
|
|
1487
1487
|
const o = {};
|
|
1488
|
-
return new
|
|
1488
|
+
return new bn(e, t ?? /* @__PURE__ */ It(), /* @__PURE__ */ It(), o);
|
|
1489
1489
|
}
|
|
1490
1490
|
function Q(e, t = {}) {
|
|
1491
|
-
return new
|
|
1491
|
+
return new zn(e, t);
|
|
1492
1492
|
}
|
|
1493
|
-
function
|
|
1493
|
+
function me(e) {
|
|
1494
1494
|
const t = e._zod?.def?.type;
|
|
1495
|
-
return t === "void" || t === "undefined" ? !0 : Ne(
|
|
1495
|
+
return t === "void" || t === "undefined" ? !0 : Ne(Vo(e));
|
|
1496
1496
|
}
|
|
1497
|
-
function
|
|
1498
|
-
const t =
|
|
1497
|
+
function si(e) {
|
|
1498
|
+
const t = Te(e);
|
|
1499
1499
|
if (t === void 0) throw new Error("jcsCanonicalize: value is not JSON-representable");
|
|
1500
1500
|
return t;
|
|
1501
1501
|
}
|
|
1502
1502
|
new TextEncoder();
|
|
1503
|
-
function
|
|
1503
|
+
function Te(e, t = /* @__PURE__ */ new Set()) {
|
|
1504
1504
|
if (typeof e == "number" && Number.isNaN(e)) throw new Error("NaN is not allowed");
|
|
1505
1505
|
if (typeof e == "number" && !Number.isFinite(e)) throw new Error("Infinity is not allowed");
|
|
1506
1506
|
if (e === null || typeof e != "object") return JSON.stringify(e);
|
|
@@ -1508,24 +1508,24 @@ function Re(e, t = /* @__PURE__ */ new Set()) {
|
|
|
1508
1508
|
if (typeof n.toJSON == "function") {
|
|
1509
1509
|
if (t.has(n)) throw new Error("Circular reference detected");
|
|
1510
1510
|
t.add(n);
|
|
1511
|
-
const o =
|
|
1511
|
+
const o = Te(n.toJSON(), t);
|
|
1512
1512
|
return t.delete(n), o;
|
|
1513
1513
|
}
|
|
1514
1514
|
if (t.has(n)) throw new Error("Circular reference detected");
|
|
1515
1515
|
t.add(n);
|
|
1516
1516
|
let r;
|
|
1517
|
-
if (Array.isArray(n)) r = `[${n.map((o) =>
|
|
1517
|
+
if (Array.isArray(n)) r = `[${n.map((o) => Te(o === void 0 || typeof o == "symbol" ? null : o, t)).join(",")}]`;
|
|
1518
1518
|
else {
|
|
1519
1519
|
const o = [];
|
|
1520
1520
|
for (const s of Object.keys(n).sort()) {
|
|
1521
1521
|
const i = n[s];
|
|
1522
|
-
i === void 0 || typeof i == "symbol" || o.push(`${JSON.stringify(s)}:${
|
|
1522
|
+
i === void 0 || typeof i == "symbol" || o.push(`${JSON.stringify(s)}:${Te(i, t)}`);
|
|
1523
1523
|
}
|
|
1524
1524
|
r = `{${o.join(",")}}`;
|
|
1525
1525
|
}
|
|
1526
1526
|
return t.delete(n), r;
|
|
1527
1527
|
}
|
|
1528
|
-
const
|
|
1528
|
+
const ai = new Uint32Array([
|
|
1529
1529
|
1116352408,
|
|
1530
1530
|
1899447441,
|
|
1531
1531
|
3049323471,
|
|
@@ -1594,7 +1594,7 @@ const di = new Uint32Array([
|
|
|
1594
1594
|
function H(e, t) {
|
|
1595
1595
|
return e >>> t | e << 32 - t;
|
|
1596
1596
|
}
|
|
1597
|
-
function
|
|
1597
|
+
function ci(e) {
|
|
1598
1598
|
const t = e.length, n = t * 8, r = t + 9 + 63 & -64, o = new Uint8Array(r);
|
|
1599
1599
|
o.set(e), o[t] = 128;
|
|
1600
1600
|
const s = new DataView(o.buffer);
|
|
@@ -1612,13 +1612,13 @@ function fi(e) {
|
|
|
1612
1612
|
for (let l = 0; l < r; l += 64) {
|
|
1613
1613
|
for (let g = 0; g < 16; g++) a[g] = s.getUint32(l + g * 4, !1);
|
|
1614
1614
|
for (let g = 16; g < 64; g++) {
|
|
1615
|
-
const w = a[g - 15], Y = a[g - 2], ne = H(w, 7) ^ H(w, 18) ^ w >>> 3,
|
|
1616
|
-
a[g] = a[g - 16] + ne + a[g - 7] +
|
|
1615
|
+
const w = a[g - 15], Y = a[g - 2], ne = H(w, 7) ^ H(w, 18) ^ w >>> 3, pe = H(Y, 17) ^ H(Y, 19) ^ Y >>> 10;
|
|
1616
|
+
a[g] = a[g - 16] + ne + a[g - 7] + pe >>> 0;
|
|
1617
1617
|
}
|
|
1618
1618
|
let f = i[0], h = i[1], p = i[2], _ = i[3], v = i[4], k = i[5], j = i[6], C = i[7];
|
|
1619
1619
|
for (let g = 0; g < 64; g++) {
|
|
1620
|
-
const w = H(v, 6) ^ H(v, 11) ^ H(v, 25), Y = v & k ^ ~v & j, ne = C + w + Y +
|
|
1621
|
-
C = j, j = k, k = v, v = _ + ne >>> 0, _ = p, p = h, h = f, f = ne +
|
|
1620
|
+
const w = H(v, 6) ^ H(v, 11) ^ H(v, 25), Y = v & k ^ ~v & j, ne = C + w + Y + ai[g] + a[g] >>> 0, pe = (H(f, 2) ^ H(f, 13) ^ H(f, 22)) + (f & h ^ f & p ^ h & p) >>> 0;
|
|
1621
|
+
C = j, j = k, k = v, v = _ + ne >>> 0, _ = p, p = h, h = f, f = ne + pe >>> 0;
|
|
1622
1622
|
}
|
|
1623
1623
|
i[0] = i[0] + f >>> 0, i[1] = i[1] + h >>> 0, i[2] = i[2] + p >>> 0, i[3] = i[3] + _ >>> 0, i[4] = i[4] + v >>> 0, i[5] = i[5] + k >>> 0, i[6] = i[6] + j >>> 0, i[7] = i[7] + C >>> 0;
|
|
1624
1624
|
}
|
|
@@ -1626,8 +1626,8 @@ function fi(e) {
|
|
|
1626
1626
|
for (let l = 0; l < 8; l++) u.setUint32(l * 4, i[l], !1);
|
|
1627
1627
|
return c;
|
|
1628
1628
|
}
|
|
1629
|
-
function
|
|
1630
|
-
const t =
|
|
1629
|
+
function ui(e) {
|
|
1630
|
+
const t = si(rt(e, !0)), n = ci(new TextEncoder().encode(t));
|
|
1631
1631
|
return Array.from(n.subarray(0, 8), (r) => r.toString(16).padStart(2, "0")).join("");
|
|
1632
1632
|
}
|
|
1633
1633
|
function rt(e, t = !1) {
|
|
@@ -1642,7 +1642,7 @@ function rt(e, t = !1) {
|
|
|
1642
1642
|
return n;
|
|
1643
1643
|
}
|
|
1644
1644
|
const We = /* @__PURE__ */ new WeakMap();
|
|
1645
|
-
var
|
|
1645
|
+
var li = class {
|
|
1646
1646
|
info;
|
|
1647
1647
|
members;
|
|
1648
1648
|
constructor(e, t, n = {}) {
|
|
@@ -1655,7 +1655,7 @@ var pi = class {
|
|
|
1655
1655
|
/** Content hash of this interface (see `computeInterfaceHash`). */
|
|
1656
1656
|
get schemaHash() {
|
|
1657
1657
|
const e = We.get(this);
|
|
1658
|
-
return e.hashCache === void 0 && (e.hashCache =
|
|
1658
|
+
return e.hashCache === void 0 && (e.hashCache = ui(e.frozenSchema ?? Nt(this.info, this.members, ""))), e.hashCache;
|
|
1659
1659
|
}
|
|
1660
1660
|
/** Lower the definition to a wire-format `HubRpcInterfaceSchema`, hash filled in. */
|
|
1661
1661
|
toSchema() {
|
|
@@ -1663,12 +1663,12 @@ var pi = class {
|
|
|
1663
1663
|
return e.schemaCache === void 0 && (e.schemaCache = e.frozenSchema !== void 0 ? {
|
|
1664
1664
|
...e.frozenSchema,
|
|
1665
1665
|
hash: this.schemaHash
|
|
1666
|
-
} :
|
|
1666
|
+
} : Nt(this.info, this.members, this.schemaHash)), e.schemaCache;
|
|
1667
1667
|
}
|
|
1668
1668
|
};
|
|
1669
|
-
function
|
|
1669
|
+
function Nt(e, t, n) {
|
|
1670
1670
|
const r = {};
|
|
1671
|
-
for (const [s, i] of Object.entries(t)) r[s] =
|
|
1671
|
+
for (const [s, i] of Object.entries(t)) r[s] = di(i);
|
|
1672
1672
|
const o = {
|
|
1673
1673
|
id: e.id,
|
|
1674
1674
|
hash: n,
|
|
@@ -1676,33 +1676,33 @@ function Tt(e, t, n) {
|
|
|
1676
1676
|
};
|
|
1677
1677
|
return e.description !== void 0 && (o.description = e.description), e.comment !== void 0 && (o.comment = e.comment), o;
|
|
1678
1678
|
}
|
|
1679
|
-
function
|
|
1679
|
+
function di(e) {
|
|
1680
1680
|
const t = e.docs;
|
|
1681
1681
|
if (e.kind === "request") {
|
|
1682
1682
|
const r = {
|
|
1683
|
-
params:
|
|
1684
|
-
result:
|
|
1683
|
+
params: me(e.paramsSchema),
|
|
1684
|
+
result: me(e.resultSchema)
|
|
1685
1685
|
};
|
|
1686
|
-
return e.clientStreamSchema !== void 0 && (r.clientStream =
|
|
1686
|
+
return e.clientStreamSchema !== void 0 && (r.clientStream = me(e.clientStreamSchema)), e.serverStreamSchema !== void 0 && (r.serverStream = me(e.serverStreamSchema)), t.description !== void 0 && (r.description = t.description), t.comment !== void 0 && (r.comment = t.comment), t.annotations !== void 0 && (r.annotations = t.annotations), r;
|
|
1687
1687
|
}
|
|
1688
|
-
const n = { params:
|
|
1688
|
+
const n = { params: me(e.paramsSchema) };
|
|
1689
1689
|
return t.description !== void 0 && (n.description = t.description), t.comment !== void 0 && (n.comment = t.comment), t.annotations !== void 0 && (n.annotations = t.annotations), n;
|
|
1690
1690
|
}
|
|
1691
1691
|
function K(e, t) {
|
|
1692
|
-
return new
|
|
1692
|
+
return new li(e, t);
|
|
1693
1693
|
}
|
|
1694
|
-
const
|
|
1694
|
+
const Tt = K({
|
|
1695
1695
|
id: "hubrpc.defaults",
|
|
1696
1696
|
description: "Reflection: preset default service / interface on this connection."
|
|
1697
|
-
}, { get:
|
|
1697
|
+
}, { get: T(/* @__PURE__ */ b({}), /* @__PURE__ */ b({
|
|
1698
1698
|
serviceId: /* @__PURE__ */ P(/* @__PURE__ */ S()),
|
|
1699
1699
|
interfaceId: /* @__PURE__ */ P(/* @__PURE__ */ S()),
|
|
1700
1700
|
/** Hash of the preset interface, if known. */
|
|
1701
1701
|
interfaceHash: /* @__PURE__ */ P(/* @__PURE__ */ S())
|
|
1702
|
-
})) }),
|
|
1702
|
+
})) }), fi = /* @__PURE__ */ Ue(/* @__PURE__ */ b({
|
|
1703
1703
|
principal: /* @__PURE__ */ S(),
|
|
1704
|
-
transitive: /* @__PURE__ */ P(/* @__PURE__ */
|
|
1705
|
-
})),
|
|
1704
|
+
transitive: /* @__PURE__ */ P(/* @__PURE__ */ ut())
|
|
1705
|
+
})), hi = /* @__PURE__ */ b({
|
|
1706
1706
|
serviceId: /* @__PURE__ */ S(),
|
|
1707
1707
|
interfaceId: /* @__PURE__ */ S(),
|
|
1708
1708
|
/** Hash of the interface as implemented by this service. */
|
|
@@ -1714,12 +1714,12 @@ const Nt = K({
|
|
|
1714
1714
|
* satisfy **every** set (AND), and a set is satisfied by **any one** of its
|
|
1715
1715
|
* principals (OR). Omitted/empty => no root-principal requirement.
|
|
1716
1716
|
*/
|
|
1717
|
-
rootPrincipalSets: /* @__PURE__ */ P(/* @__PURE__ */ Ue(
|
|
1717
|
+
rootPrincipalSets: /* @__PURE__ */ P(/* @__PURE__ */ Ue(fi))
|
|
1718
1718
|
}), Rt = K({
|
|
1719
1719
|
id: "hubrpc.directory",
|
|
1720
1720
|
description: "Reflection: list services exposed by this endpoint. Can also list other directory services that can be explored."
|
|
1721
1721
|
}, {
|
|
1722
|
-
list:
|
|
1722
|
+
list: T(/* @__PURE__ */ b({
|
|
1723
1723
|
/** Filter: only return services implementing this interface id. */
|
|
1724
1724
|
interfaceId: /* @__PURE__ */ P(/* @__PURE__ */ S()),
|
|
1725
1725
|
/** Filter: only return entries for this service id. */
|
|
@@ -1727,15 +1727,15 @@ const Nt = K({
|
|
|
1727
1727
|
/** Paging: opaque continuation token from a previous response. */
|
|
1728
1728
|
cursor: /* @__PURE__ */ P(/* @__PURE__ */ S()),
|
|
1729
1729
|
/** Paging: max items in this page. Server MAY return fewer. */
|
|
1730
|
-
limit: /* @__PURE__ */ P((/* @__PURE__ */ tt()).check(/* @__PURE__ */ Ot(), /* @__PURE__ */
|
|
1730
|
+
limit: /* @__PURE__ */ P((/* @__PURE__ */ tt()).check(/* @__PURE__ */ Ot(), /* @__PURE__ */ to())),
|
|
1731
1731
|
/** Soft cap on time the server spends gathering this page, in ms. */
|
|
1732
|
-
timeoutMs: /* @__PURE__ */ P((/* @__PURE__ */ tt()).check(/* @__PURE__ */ Ot(), /* @__PURE__ */
|
|
1732
|
+
timeoutMs: /* @__PURE__ */ P((/* @__PURE__ */ tt()).check(/* @__PURE__ */ Ot(), /* @__PURE__ */ no()))
|
|
1733
1733
|
}), /* @__PURE__ */ b({
|
|
1734
|
-
items: /* @__PURE__ */ Ue(
|
|
1734
|
+
items: /* @__PURE__ */ Ue(hi),
|
|
1735
1735
|
/** Omitted => no more pages. */
|
|
1736
1736
|
nextCursor: /* @__PURE__ */ P(/* @__PURE__ */ S()),
|
|
1737
1737
|
/** True if `timeoutMs` cut the page short before exhausting results. */
|
|
1738
|
-
truncated: /* @__PURE__ */ P(/* @__PURE__ */
|
|
1738
|
+
truncated: /* @__PURE__ */ P(/* @__PURE__ */ ut())
|
|
1739
1739
|
})),
|
|
1740
1740
|
/**
|
|
1741
1741
|
* Coarse change tap on the directory.
|
|
@@ -1754,7 +1754,7 @@ const Nt = K({
|
|
|
1754
1754
|
* The request resolves when the caller cancels (or the connection
|
|
1755
1755
|
* drops); the runtime auto-detaches the stream when it settles.
|
|
1756
1756
|
*/
|
|
1757
|
-
watch:
|
|
1757
|
+
watch: T(/* @__PURE__ */ b({
|
|
1758
1758
|
/** Relevance hint: changes touching this interface id. */
|
|
1759
1759
|
interfaceId: /* @__PURE__ */ P(/* @__PURE__ */ S()),
|
|
1760
1760
|
/** Relevance hint: changes touching this service id. */
|
|
@@ -1764,7 +1764,7 @@ const Nt = K({
|
|
|
1764
1764
|
server: /* @__PURE__ */ b({})
|
|
1765
1765
|
})
|
|
1766
1766
|
});
|
|
1767
|
-
function
|
|
1767
|
+
function pi(e, t, n) {
|
|
1768
1768
|
return new Promise((r) => {
|
|
1769
1769
|
if (n.signal.aborted) {
|
|
1770
1770
|
r({});
|
|
@@ -1776,13 +1776,13 @@ function vi(e, t, n) {
|
|
|
1776
1776
|
const Ct = K({
|
|
1777
1777
|
id: "hubrpc.schemas",
|
|
1778
1778
|
description: "Reflection: fetch interface schemas by id (+ optional hash). Must serve the interfaces advertised in this endpoint's directory."
|
|
1779
|
-
}, { get:
|
|
1779
|
+
}, { get: T(/* @__PURE__ */ b({
|
|
1780
1780
|
interfaceId: /* @__PURE__ */ S(),
|
|
1781
1781
|
/** Omit => server picks the version it exposes. */
|
|
1782
1782
|
hash: /* @__PURE__ */ P(/* @__PURE__ */ S())
|
|
1783
1783
|
}), /* @__PURE__ */ b({
|
|
1784
1784
|
/** A full `SvcInterfaceSchema`. */
|
|
1785
|
-
schema: /* @__PURE__ */
|
|
1785
|
+
schema: /* @__PURE__ */ Ce()
|
|
1786
1786
|
})) }), ce = {
|
|
1787
1787
|
/** callee → caller: progress, partial results. Routes like a response. */
|
|
1788
1788
|
toCaller: "toCaller",
|
|
@@ -1811,7 +1811,7 @@ const Ct = K({
|
|
|
1811
1811
|
* Carries no app effect — purely a liveness acknowledgement.
|
|
1812
1812
|
*/
|
|
1813
1813
|
pong: "pong"
|
|
1814
|
-
},
|
|
1814
|
+
}, mi = K({
|
|
1815
1815
|
id: "$stream",
|
|
1816
1816
|
description: "Reserved sub-protocol for in-flight stream messages correlated to a request by `requestId`."
|
|
1817
1817
|
}, { send: Q(/* @__PURE__ */ b({
|
|
@@ -1820,7 +1820,7 @@ const Ct = K({
|
|
|
1820
1820
|
* The hub rewrites this across the forwarding boundary
|
|
1821
1821
|
* in the same way it rewrites response ids.
|
|
1822
1822
|
*/
|
|
1823
|
-
requestId: /* @__PURE__ */
|
|
1823
|
+
requestId: /* @__PURE__ */ Qo([/* @__PURE__ */ tt(), /* @__PURE__ */ S()]),
|
|
1824
1824
|
/**
|
|
1825
1825
|
* Which way this message travels relative to the request.
|
|
1826
1826
|
* Explicit so the hub can author messages (e.g. cancel on
|
|
@@ -1848,8 +1848,8 @@ const Ct = K({
|
|
|
1848
1848
|
nonce: /* @__PURE__ */ P(/* @__PURE__ */ S())
|
|
1849
1849
|
})),
|
|
1850
1850
|
/** Opaque app payload — typed per call by the request's stream schema. */
|
|
1851
|
-
payload: /* @__PURE__ */ P(/* @__PURE__ */
|
|
1852
|
-
}), { description: "Emit a stream message tied to the request `requestId`." }) }), jt = `${
|
|
1851
|
+
payload: /* @__PURE__ */ P(/* @__PURE__ */ Ce())
|
|
1852
|
+
}), { description: "Emit a stream message tied to the request `requestId`." }) }), jt = `${mi.info.id}::send`, U = {
|
|
1853
1853
|
parseError: -32700,
|
|
1854
1854
|
invalidRequest: -32600,
|
|
1855
1855
|
methodNotFound: -32601,
|
|
@@ -1864,16 +1864,16 @@ const Ct = K({
|
|
|
1864
1864
|
/** The request was cancelled (by the caller, or by the hub on disconnect). */
|
|
1865
1865
|
cancelled: -32800
|
|
1866
1866
|
};
|
|
1867
|
-
function
|
|
1867
|
+
function _i(e) {
|
|
1868
1868
|
return typeof e.method == "string" && e.id !== void 0;
|
|
1869
1869
|
}
|
|
1870
|
-
function
|
|
1870
|
+
function gi(e) {
|
|
1871
1871
|
return typeof e.method == "string" && e.id === void 0;
|
|
1872
1872
|
}
|
|
1873
|
-
function
|
|
1873
|
+
function vi(e) {
|
|
1874
1874
|
return typeof e.method != "string";
|
|
1875
1875
|
}
|
|
1876
|
-
function
|
|
1876
|
+
function yi(e) {
|
|
1877
1877
|
const t = e.split("::");
|
|
1878
1878
|
if (t.length === 3 && t[0].length === 0 && t[1].length > 0 && t[2].length > 0) return {
|
|
1879
1879
|
kind: "interface",
|
|
@@ -1898,7 +1898,7 @@ function $i(e) {
|
|
|
1898
1898
|
};
|
|
1899
1899
|
}
|
|
1900
1900
|
}
|
|
1901
|
-
var
|
|
1901
|
+
var bi = class $n {
|
|
1902
1902
|
sender;
|
|
1903
1903
|
_setHandler;
|
|
1904
1904
|
constructor(t, n) {
|
|
@@ -1915,7 +1915,7 @@ var ki = class Sn {
|
|
|
1915
1915
|
* so the receive side is bound exactly once regardless of decoration depth.
|
|
1916
1916
|
*/
|
|
1917
1917
|
withSender(t) {
|
|
1918
|
-
return new
|
|
1918
|
+
return new $n(t(this.sender), this._setHandler);
|
|
1919
1919
|
}
|
|
1920
1920
|
}, oe = class extends Error {
|
|
1921
1921
|
code;
|
|
@@ -1924,8 +1924,8 @@ var ki = class Sn {
|
|
|
1924
1924
|
super(e), this.code = t, this.data = n, this.name = "RpcError";
|
|
1925
1925
|
}
|
|
1926
1926
|
};
|
|
1927
|
-
const
|
|
1928
|
-
var
|
|
1927
|
+
const wi = 10 * 6e4;
|
|
1928
|
+
var kn = class Sn {
|
|
1929
1929
|
_transport;
|
|
1930
1930
|
/**
|
|
1931
1931
|
* Wrap a transport in a {@link Channel}. The channel's sender is live
|
|
@@ -1933,8 +1933,8 @@ var ut = class En {
|
|
|
1933
1933
|
* to {@link HubRpcConnection}) to bind the inbound handler.
|
|
1934
1934
|
*/
|
|
1935
1935
|
static create(t) {
|
|
1936
|
-
const n = new
|
|
1937
|
-
return new
|
|
1936
|
+
const n = new Sn(t);
|
|
1937
|
+
return new bi(n, (r) => n.setRequestHandler(r));
|
|
1938
1938
|
}
|
|
1939
1939
|
_nextId = 1;
|
|
1940
1940
|
_pending = /* @__PURE__ */ new Map();
|
|
@@ -1997,7 +1997,7 @@ var ut = class En {
|
|
|
1997
1997
|
this._streamControl.set(s, u.onControl);
|
|
1998
1998
|
const l = setInterval(() => {
|
|
1999
1999
|
this._sendStream(o, ce.toCallee, { control: { type: X.ping } });
|
|
2000
|
-
},
|
|
2000
|
+
}, wi);
|
|
2001
2001
|
l.unref?.();
|
|
2002
2002
|
const f = () => {
|
|
2003
2003
|
clearInterval(l), u.dispose(), this._streamControl.delete(s);
|
|
@@ -2087,7 +2087,7 @@ var ut = class En {
|
|
|
2087
2087
|
}
|
|
2088
2088
|
_onMessage(t) {
|
|
2089
2089
|
const n = t.context;
|
|
2090
|
-
if (
|
|
2090
|
+
if (vi(t)) {
|
|
2091
2091
|
if (t.id === null) return;
|
|
2092
2092
|
const r = String(t.id), o = this._pending.get(r);
|
|
2093
2093
|
if (!o) return;
|
|
@@ -2097,11 +2097,11 @@ var ut = class En {
|
|
|
2097
2097
|
} else o.resolve(t.result);
|
|
2098
2098
|
return;
|
|
2099
2099
|
}
|
|
2100
|
-
if (
|
|
2100
|
+
if (_i(t)) {
|
|
2101
2101
|
this._handleRequest(t, n);
|
|
2102
2102
|
return;
|
|
2103
2103
|
}
|
|
2104
|
-
if (
|
|
2104
|
+
if (gi(t)) {
|
|
2105
2105
|
if (t.method === jt) {
|
|
2106
2106
|
this._handleStreamNotification(t);
|
|
2107
2107
|
return;
|
|
@@ -2178,20 +2178,20 @@ var ut = class En {
|
|
|
2178
2178
|
method: t.method,
|
|
2179
2179
|
params: t.params,
|
|
2180
2180
|
context: n,
|
|
2181
|
-
stream:
|
|
2182
|
-
signal:
|
|
2181
|
+
stream: zi,
|
|
2182
|
+
signal: $i
|
|
2183
2183
|
});
|
|
2184
2184
|
} catch {
|
|
2185
2185
|
}
|
|
2186
2186
|
}
|
|
2187
2187
|
};
|
|
2188
|
-
const
|
|
2188
|
+
const zi = {
|
|
2189
2189
|
send: () => Promise.resolve(),
|
|
2190
2190
|
onMessage: () => {
|
|
2191
2191
|
},
|
|
2192
2192
|
ping: () => Promise.resolve()
|
|
2193
|
-
},
|
|
2194
|
-
var
|
|
2193
|
+
}, $i = new AbortController().signal;
|
|
2194
|
+
var ki = class En {
|
|
2195
2195
|
/**
|
|
2196
2196
|
* Convenience: build a {@link JsonRpcChannel} `Channel` from the
|
|
2197
2197
|
* given transport and wrap it in an `HubRpcConnection`. Use this
|
|
@@ -2199,7 +2199,7 @@ var On = class In {
|
|
|
2199
2199
|
* stack (e.g. signing).
|
|
2200
2200
|
*/
|
|
2201
2201
|
static fromTransport(t) {
|
|
2202
|
-
return new
|
|
2202
|
+
return new En(kn.create(t));
|
|
2203
2203
|
}
|
|
2204
2204
|
/** Underlying JSON-RPC sender — useful for callers that need raw access (e.g. to call hub-served methods that bypass the interface registry). */
|
|
2205
2205
|
channel;
|
|
@@ -2228,7 +2228,7 @@ var On = class In {
|
|
|
2228
2228
|
}
|
|
2229
2229
|
/** Get a service-scoped handle; all interfaces obtained from it route via `serviceId` (form 3). */
|
|
2230
2230
|
service(t) {
|
|
2231
|
-
return new
|
|
2231
|
+
return new Ei(this, t);
|
|
2232
2232
|
}
|
|
2233
2233
|
/** Register handlers for an interface on this connection's server side. */
|
|
2234
2234
|
register(t, n, r = {}) {
|
|
@@ -2243,7 +2243,7 @@ var On = class In {
|
|
|
2243
2243
|
if (r.rootPrincipalSets !== void 0) {
|
|
2244
2244
|
if (o === void 0) throw new Error("register: `rootPrincipalSets` requires `serviceId`.");
|
|
2245
2245
|
const c = this._serviceRootPrincipalSets.get(o);
|
|
2246
|
-
if (c !== void 0 && !
|
|
2246
|
+
if (c !== void 0 && !Si(c, r.rootPrincipalSets)) throw new Error(`register: conflicting rootPrincipalSets for service "${o}".`);
|
|
2247
2247
|
this._serviceRootPrincipalSets.set(o, r.rootPrincipalSets);
|
|
2248
2248
|
}
|
|
2249
2249
|
const i = {
|
|
@@ -2307,13 +2307,13 @@ var On = class In {
|
|
|
2307
2307
|
* is a no-op.
|
|
2308
2308
|
*/
|
|
2309
2309
|
enableReflection(t = {}) {
|
|
2310
|
-
const n = `${t.serviceId ?? ""}::${
|
|
2310
|
+
const n = `${t.serviceId ?? ""}::${Tt.info.id}`;
|
|
2311
2311
|
if (this._registry.has(n)) return { dispose() {
|
|
2312
2312
|
} };
|
|
2313
2313
|
const r = `${t.serviceId ?? ""}::`;
|
|
2314
2314
|
for (const a of [Rt, Ct]) if (this._registry.has(`${r}${a.info.id}`)) throw new Error(`enableReflection: partial reflection registration for service "${t.serviceId ?? ""}".`);
|
|
2315
2315
|
const o = t.serviceId !== void 0 ? { serviceId: t.serviceId } : {}, s = [];
|
|
2316
|
-
if (s.push(this.register(
|
|
2316
|
+
if (s.push(this.register(Tt, { get: () => this._preset ? {
|
|
2317
2317
|
serviceId: this._preset.serviceId,
|
|
2318
2318
|
interfaceId: this._preset.interfaceId,
|
|
2319
2319
|
interfaceHash: this._preset.hash
|
|
@@ -2331,7 +2331,7 @@ var On = class In {
|
|
|
2331
2331
|
nextCursor: String(p)
|
|
2332
2332
|
} : { items: _ };
|
|
2333
2333
|
},
|
|
2334
|
-
watch:
|
|
2334
|
+
watch: pi
|
|
2335
2335
|
}, o)), s.push(this.register(Ct, { get: ({ interfaceId: a, hash: c }) => {
|
|
2336
2336
|
const u = this.findRegisteredInterface(a, c);
|
|
2337
2337
|
if (!u) throw new oe("Interface not found", U.methodNotFound, {
|
|
@@ -2412,18 +2412,18 @@ var On = class In {
|
|
|
2412
2412
|
}
|
|
2413
2413
|
async _handleRequest(t) {
|
|
2414
2414
|
const n = this._parseRouted(t.method);
|
|
2415
|
-
if (!n.ok) return
|
|
2415
|
+
if (!n.ok) return Ee(n.reason, t.method);
|
|
2416
2416
|
const { entry: r, memberName: o } = n, s = r.iface.members[o];
|
|
2417
|
-
if (!s) return
|
|
2417
|
+
if (!s) return Ee("unknown-method", t.method);
|
|
2418
2418
|
const i = r.handlers[o];
|
|
2419
|
-
if (!i) return
|
|
2419
|
+
if (!i) return Ee("unknown-method", t.method);
|
|
2420
2420
|
const a = q(s.paramsSchema, t.params);
|
|
2421
2421
|
if (!a.success) return { error: {
|
|
2422
2422
|
code: U.invalidParams,
|
|
2423
2423
|
message: "Invalid params",
|
|
2424
2424
|
data: { issues: a.error.issues }
|
|
2425
2425
|
} };
|
|
2426
|
-
if (!(s instanceof
|
|
2426
|
+
if (!(s instanceof bn)) return Ee("unknown-method", t.method);
|
|
2427
2427
|
const c = this._buildStreamApi(t.stream, t.signal, s);
|
|
2428
2428
|
try {
|
|
2429
2429
|
const u = await i(a.data, t.context, c), l = q(s.resultSchema, u);
|
|
@@ -2470,14 +2470,14 @@ var On = class In {
|
|
|
2470
2470
|
const n = this._parseRouted(t.method);
|
|
2471
2471
|
if (!n.ok) return;
|
|
2472
2472
|
const { entry: r, memberName: o } = n, s = r.iface.members[o];
|
|
2473
|
-
if (!(s instanceof
|
|
2473
|
+
if (!(s instanceof zn)) return;
|
|
2474
2474
|
const i = r.handlers[o];
|
|
2475
2475
|
if (!i) return;
|
|
2476
2476
|
const a = q(s.paramsSchema, t.params);
|
|
2477
2477
|
a.success && i(a.data, t.context);
|
|
2478
2478
|
}
|
|
2479
2479
|
_parseRouted(t) {
|
|
2480
|
-
const n =
|
|
2480
|
+
const n = yi(t);
|
|
2481
2481
|
if (!n) return {
|
|
2482
2482
|
ok: !1,
|
|
2483
2483
|
reason: "bad-method-grammar"
|
|
@@ -2508,7 +2508,7 @@ var On = class In {
|
|
|
2508
2508
|
};
|
|
2509
2509
|
}
|
|
2510
2510
|
};
|
|
2511
|
-
function
|
|
2511
|
+
function Si(e, t) {
|
|
2512
2512
|
if (e.length !== t.length) return !1;
|
|
2513
2513
|
for (let n = 0; n < e.length; n++) {
|
|
2514
2514
|
const r = e[n], o = t[n];
|
|
@@ -2518,7 +2518,7 @@ function Ii(e, t) {
|
|
|
2518
2518
|
}
|
|
2519
2519
|
return !0;
|
|
2520
2520
|
}
|
|
2521
|
-
var
|
|
2521
|
+
var Ei = class {
|
|
2522
2522
|
_connection;
|
|
2523
2523
|
_serviceId;
|
|
2524
2524
|
constructor(e, t) {
|
|
@@ -2537,7 +2537,7 @@ var Pi = class {
|
|
|
2537
2537
|
});
|
|
2538
2538
|
}
|
|
2539
2539
|
};
|
|
2540
|
-
function
|
|
2540
|
+
function Ee(e, t) {
|
|
2541
2541
|
return { error: {
|
|
2542
2542
|
code: U.methodNotFound,
|
|
2543
2543
|
message: `Method not found: ${t}`,
|
|
@@ -2547,8 +2547,8 @@ function Oe(e, t) {
|
|
|
2547
2547
|
}
|
|
2548
2548
|
} };
|
|
2549
2549
|
}
|
|
2550
|
-
|
|
2551
|
-
function
|
|
2550
|
+
Oi(globalThis, {});
|
|
2551
|
+
function Oi(e, t) {
|
|
2552
2552
|
return new Proxy(e, {
|
|
2553
2553
|
get(n, r, o) {
|
|
2554
2554
|
return r in t ? t[r] : e[r];
|
|
@@ -2580,14 +2580,14 @@ K({
|
|
|
2580
2580
|
id: "identity",
|
|
2581
2581
|
description: "Per-participant key oracle: exposes signing and HPKE-based wrap/unwrap for the identity the executor has attached to this participant's root overlay. Private keys never leave the executor."
|
|
2582
2582
|
}, {
|
|
2583
|
-
getPrincipal:
|
|
2584
|
-
getWrapPublicKey:
|
|
2585
|
-
sign:
|
|
2586
|
-
wrap:
|
|
2583
|
+
getPrincipal: T(/* @__PURE__ */ b({}), /* @__PURE__ */ b({ principal: /* @__PURE__ */ S() })),
|
|
2584
|
+
getWrapPublicKey: T(/* @__PURE__ */ b({}), /* @__PURE__ */ b({ wrapPublicKey: re })),
|
|
2585
|
+
sign: T(/* @__PURE__ */ b({ bytes: re }), /* @__PURE__ */ b({ signature: re })),
|
|
2586
|
+
wrap: T(/* @__PURE__ */ b({
|
|
2587
2587
|
domain: /* @__PURE__ */ S(),
|
|
2588
2588
|
bytes: re
|
|
2589
2589
|
}), /* @__PURE__ */ b({ blob: re })),
|
|
2590
|
-
unwrap:
|
|
2590
|
+
unwrap: T(/* @__PURE__ */ b({
|
|
2591
2591
|
domain: /* @__PURE__ */ S(),
|
|
2592
2592
|
blob: re
|
|
2593
2593
|
}), /* @__PURE__ */ b({ bytes: re }))
|
|
@@ -2596,15 +2596,15 @@ K({
|
|
|
2596
2596
|
id: "identity.storage",
|
|
2597
2597
|
description: "Per-identity persistent key/value store. Scope is the executor's managed-identity slot; lifecycle is tied to the identity itself. Backed by an at-rest-encrypted file in the executor."
|
|
2598
2598
|
}, {
|
|
2599
|
-
get:
|
|
2600
|
-
set:
|
|
2599
|
+
get: T(/* @__PURE__ */ b({ key: /* @__PURE__ */ S() }), /* @__PURE__ */ b({ value: /* @__PURE__ */ P(/* @__PURE__ */ Ce()) })),
|
|
2600
|
+
set: T(/* @__PURE__ */ b({
|
|
2601
2601
|
key: /* @__PURE__ */ S(),
|
|
2602
|
-
value: /* @__PURE__ */
|
|
2602
|
+
value: /* @__PURE__ */ Ce()
|
|
2603
2603
|
}), /* @__PURE__ */ b({})),
|
|
2604
|
-
delete:
|
|
2605
|
-
list:
|
|
2604
|
+
delete: T(/* @__PURE__ */ b({ key: /* @__PURE__ */ S() }), /* @__PURE__ */ b({ existed: /* @__PURE__ */ ut() })),
|
|
2605
|
+
list: T(/* @__PURE__ */ b({ prefix: /* @__PURE__ */ P(/* @__PURE__ */ S()) }), /* @__PURE__ */ b({ keys: /* @__PURE__ */ Ue(/* @__PURE__ */ S()) }))
|
|
2606
2606
|
});
|
|
2607
|
-
var
|
|
2607
|
+
var Ii = class {
|
|
2608
2608
|
_our;
|
|
2609
2609
|
_their;
|
|
2610
2610
|
_filterSource;
|
|
@@ -2614,7 +2614,7 @@ var Pn = class {
|
|
|
2614
2614
|
_handler = (e) => {
|
|
2615
2615
|
if (this._filterSource && e.source !== this._their) return;
|
|
2616
2616
|
const t = e.data;
|
|
2617
|
-
|
|
2617
|
+
Pi(t) && (this._listener ? this._listener(t) : this._buffer.push(t));
|
|
2618
2618
|
};
|
|
2619
2619
|
constructor(e, t, n = !0) {
|
|
2620
2620
|
if (this._our = e, this._their = t, this._filterSource = n, e === t) throw new Error("WindowMessageTransport: cannot connect to self");
|
|
@@ -2630,7 +2630,7 @@ var Pn = class {
|
|
|
2630
2630
|
this._closed || (this._closed = !0, this._our.removeEventListener("message", this._handler));
|
|
2631
2631
|
}
|
|
2632
2632
|
};
|
|
2633
|
-
function
|
|
2633
|
+
function Pi(e) {
|
|
2634
2634
|
return typeof e == "object" && e !== null && e.jsonrpc === "2.0";
|
|
2635
2635
|
}
|
|
2636
2636
|
var At;
|
|
@@ -2668,7 +2668,7 @@ var le = class extends Error {
|
|
|
2668
2668
|
constructor() {
|
|
2669
2669
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
2670
2670
|
}
|
|
2671
|
-
},
|
|
2671
|
+
}, On = class extends Error {
|
|
2672
2672
|
constructor(e) {
|
|
2673
2673
|
super(`Encountered unidirectional transform during encode: ${e}`), this.name = "ZodEncodeError";
|
|
2674
2674
|
}
|
|
@@ -2678,7 +2678,7 @@ const lt = globalThis.__zod_globalConfig;
|
|
|
2678
2678
|
function ie(e) {
|
|
2679
2679
|
return lt;
|
|
2680
2680
|
}
|
|
2681
|
-
function
|
|
2681
|
+
function In(e) {
|
|
2682
2682
|
const t = Object.values(e).filter((n) => typeof n == "number");
|
|
2683
2683
|
return Object.entries(e).filter(([n, r]) => t.indexOf(+n) === -1).map(([n, r]) => r);
|
|
2684
2684
|
}
|
|
@@ -2700,7 +2700,7 @@ function ft(e) {
|
|
|
2700
2700
|
const t = e.startsWith("^") ? 1 : 0, n = e.endsWith("$") ? e.length - 1 : e.length;
|
|
2701
2701
|
return e.slice(t, n);
|
|
2702
2702
|
}
|
|
2703
|
-
function
|
|
2703
|
+
function Zi(e, t) {
|
|
2704
2704
|
const n = e / t, r = Math.round(n), o = Number.EPSILON * Math.max(Math.abs(n), 1);
|
|
2705
2705
|
return Math.abs(n - r) < o ? 0 : n - r;
|
|
2706
2706
|
}
|
|
@@ -2737,15 +2737,15 @@ function ee(...e) {
|
|
|
2737
2737
|
function Mt(e) {
|
|
2738
2738
|
return JSON.stringify(e);
|
|
2739
2739
|
}
|
|
2740
|
-
function
|
|
2740
|
+
function Ni(e) {
|
|
2741
2741
|
return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
2742
2742
|
}
|
|
2743
|
-
const
|
|
2743
|
+
const Pn = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
2744
2744
|
};
|
|
2745
|
-
function
|
|
2745
|
+
function ye(e) {
|
|
2746
2746
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
2747
2747
|
}
|
|
2748
|
-
const
|
|
2748
|
+
const Ti = /* @__PURE__ */ Je(() => {
|
|
2749
2749
|
if (lt.jitless || typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare")) return !1;
|
|
2750
2750
|
try {
|
|
2751
2751
|
return new Function(""), !0;
|
|
@@ -2753,17 +2753,17 @@ const Ci = /* @__PURE__ */ Je(() => {
|
|
|
2753
2753
|
return !1;
|
|
2754
2754
|
}
|
|
2755
2755
|
});
|
|
2756
|
-
function
|
|
2757
|
-
if (
|
|
2756
|
+
function be(e) {
|
|
2757
|
+
if (ye(e) === !1) return !1;
|
|
2758
2758
|
const t = e.constructor;
|
|
2759
2759
|
if (t === void 0 || typeof t != "function") return !0;
|
|
2760
2760
|
const n = t.prototype;
|
|
2761
|
-
return !(
|
|
2761
|
+
return !(ye(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
|
|
2762
2762
|
}
|
|
2763
|
-
function
|
|
2764
|
-
return
|
|
2763
|
+
function Zn(e) {
|
|
2764
|
+
return be(e) ? { ...e } : Array.isArray(e) ? [...e] : e instanceof Map ? new Map(e) : e instanceof Set ? new Set(e) : e;
|
|
2765
2765
|
}
|
|
2766
|
-
const
|
|
2766
|
+
const Ri = /* @__PURE__ */ new Set([
|
|
2767
2767
|
"string",
|
|
2768
2768
|
"number",
|
|
2769
2769
|
"symbol"
|
|
@@ -2788,17 +2788,17 @@ function m(e) {
|
|
|
2788
2788
|
error: () => t.error
|
|
2789
2789
|
} : t;
|
|
2790
2790
|
}
|
|
2791
|
-
function
|
|
2791
|
+
function Ci(e) {
|
|
2792
2792
|
return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
|
|
2793
2793
|
}
|
|
2794
|
-
const
|
|
2794
|
+
const ji = {
|
|
2795
2795
|
safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
|
|
2796
2796
|
int32: [-2147483648, 2147483647],
|
|
2797
2797
|
uint32: [0, 4294967295],
|
|
2798
2798
|
float32: [-34028234663852886e22, 34028234663852886e22],
|
|
2799
2799
|
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
|
|
2800
2800
|
};
|
|
2801
|
-
function
|
|
2801
|
+
function Ai(e, t) {
|
|
2802
2802
|
const n = e._zod.def, r = n.checks;
|
|
2803
2803
|
if (r && r.length > 0) throw new Error(".pick() cannot be used on object schemas containing refinements");
|
|
2804
2804
|
return te(e, ee(e._zod.def, {
|
|
@@ -2813,7 +2813,7 @@ function Mi(e, t) {
|
|
|
2813
2813
|
checks: []
|
|
2814
2814
|
}));
|
|
2815
2815
|
}
|
|
2816
|
-
function
|
|
2816
|
+
function xi(e, t) {
|
|
2817
2817
|
const n = e._zod.def, r = n.checks;
|
|
2818
2818
|
if (r && r.length > 0) throw new Error(".omit() cannot be used on object schemas containing refinements");
|
|
2819
2819
|
return te(e, ee(e._zod.def, {
|
|
@@ -2828,8 +2828,8 @@ function Fi(e, t) {
|
|
|
2828
2828
|
checks: []
|
|
2829
2829
|
}));
|
|
2830
2830
|
}
|
|
2831
|
-
function
|
|
2832
|
-
if (!
|
|
2831
|
+
function Mi(e, t) {
|
|
2832
|
+
if (!be(t)) throw new Error("Invalid input to extend: expected a plain object");
|
|
2833
2833
|
const n = e._zod.def.checks;
|
|
2834
2834
|
if (n && n.length > 0) {
|
|
2835
2835
|
const r = e._zod.def.shape;
|
|
@@ -2843,8 +2843,8 @@ function Di(e, t) {
|
|
|
2843
2843
|
return ae(this, "shape", r), r;
|
|
2844
2844
|
} }));
|
|
2845
2845
|
}
|
|
2846
|
-
function
|
|
2847
|
-
if (!
|
|
2846
|
+
function Fi(e, t) {
|
|
2847
|
+
if (!be(t)) throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
2848
2848
|
return te(e, ee(e._zod.def, { get shape() {
|
|
2849
2849
|
const n = {
|
|
2850
2850
|
...e._zod.def.shape,
|
|
@@ -2853,7 +2853,7 @@ function Li(e, t) {
|
|
|
2853
2853
|
return ae(this, "shape", n), n;
|
|
2854
2854
|
} }));
|
|
2855
2855
|
}
|
|
2856
|
-
function
|
|
2856
|
+
function Di(e, t) {
|
|
2857
2857
|
if (e._zod.def.checks?.length) throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
|
|
2858
2858
|
return te(e, ee(e._zod.def, {
|
|
2859
2859
|
get shape() {
|
|
@@ -2869,7 +2869,7 @@ function Ui(e, t) {
|
|
|
2869
2869
|
checks: t._zod.def.checks ?? []
|
|
2870
2870
|
}));
|
|
2871
2871
|
}
|
|
2872
|
-
function
|
|
2872
|
+
function Li(e, t, n) {
|
|
2873
2873
|
const r = t._zod.def.checks;
|
|
2874
2874
|
if (r && r.length > 0) throw new Error(".partial() cannot be used on object schemas containing refinements");
|
|
2875
2875
|
return te(t, ee(t._zod.def, {
|
|
@@ -2891,7 +2891,7 @@ function Ji(e, t, n) {
|
|
|
2891
2891
|
checks: []
|
|
2892
2892
|
}));
|
|
2893
2893
|
}
|
|
2894
|
-
function
|
|
2894
|
+
function Ui(e, t, n) {
|
|
2895
2895
|
return te(t, ee(t._zod.def, { get shape() {
|
|
2896
2896
|
const r = t._zod.def.shape, o = { ...r };
|
|
2897
2897
|
if (n) for (const s in n) {
|
|
@@ -2913,28 +2913,28 @@ function ue(e, t = 0) {
|
|
|
2913
2913
|
for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue !== !0) return !0;
|
|
2914
2914
|
return !1;
|
|
2915
2915
|
}
|
|
2916
|
-
function
|
|
2916
|
+
function Ji(e, t = 0) {
|
|
2917
2917
|
if (e.aborted === !0) return !0;
|
|
2918
2918
|
for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue === !1) return !0;
|
|
2919
2919
|
return !1;
|
|
2920
2920
|
}
|
|
2921
|
-
function
|
|
2921
|
+
function Nn(e, t) {
|
|
2922
2922
|
return t.map((n) => {
|
|
2923
2923
|
var r;
|
|
2924
2924
|
return (r = n).path ?? (r.path = []), n.path.unshift(e), n;
|
|
2925
2925
|
});
|
|
2926
2926
|
}
|
|
2927
|
-
function
|
|
2927
|
+
function Oe(e) {
|
|
2928
2928
|
return typeof e == "string" ? e : e?.message;
|
|
2929
2929
|
}
|
|
2930
2930
|
function se(e, t, n) {
|
|
2931
|
-
const r = e.message ? e.message :
|
|
2931
|
+
const r = e.message ? e.message : Oe(e.inst?._zod.def?.error?.(e)) ?? Oe(t?.error?.(e)) ?? Oe(n.customError?.(e)) ?? Oe(n.localeError?.(e)) ?? "Invalid input", { inst: o, continue: s, input: i, ...a } = e;
|
|
2932
2932
|
return a.path ?? (a.path = []), a.message = r, t?.reportInput && (a.input = i), a;
|
|
2933
2933
|
}
|
|
2934
2934
|
function ht(e) {
|
|
2935
2935
|
return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
|
|
2936
2936
|
}
|
|
2937
|
-
function
|
|
2937
|
+
function we(...e) {
|
|
2938
2938
|
const [t, n, r] = e;
|
|
2939
2939
|
return typeof t == "string" ? {
|
|
2940
2940
|
message: t,
|
|
@@ -2943,7 +2943,7 @@ function ze(...e) {
|
|
|
2943
2943
|
inst: r
|
|
2944
2944
|
} : { ...t };
|
|
2945
2945
|
}
|
|
2946
|
-
const
|
|
2946
|
+
const Tn = (e, t) => {
|
|
2947
2947
|
e.name = "$ZodError", Object.defineProperty(e, "_zod", {
|
|
2948
2948
|
value: e._zod,
|
|
2949
2949
|
enumerable: !1
|
|
@@ -2954,8 +2954,8 @@ const jn = (e, t) => {
|
|
|
2954
2954
|
value: () => e.message,
|
|
2955
2955
|
enumerable: !1
|
|
2956
2956
|
});
|
|
2957
|
-
},
|
|
2958
|
-
function
|
|
2957
|
+
}, Rn = d("$ZodError", Tn), Cn = d("$ZodError", Tn, { Parent: Error });
|
|
2958
|
+
function Vi(e, t = (n) => n.message) {
|
|
2959
2959
|
const n = {}, r = [];
|
|
2960
2960
|
for (const o of e.issues) o.path.length > 0 ? (n[o.path[0]] = n[o.path[0]] || [], n[o.path[0]].push(t(o))) : r.push(t(o));
|
|
2961
2961
|
return {
|
|
@@ -2963,7 +2963,7 @@ function qi(e, t = (n) => n.message) {
|
|
|
2963
2963
|
fieldErrors: n
|
|
2964
2964
|
};
|
|
2965
2965
|
}
|
|
2966
|
-
function
|
|
2966
|
+
function Hi(e, t = (n) => n.message) {
|
|
2967
2967
|
const n = { _errors: [] }, r = (o, s = []) => {
|
|
2968
2968
|
for (const i of o.issues) if (i.code === "invalid_union" && i.errors.length) i.errors.map((a) => r({ issues: a }, [...s, ...i.path]));
|
|
2969
2969
|
else if (i.code === "invalid_key") r({ issues: i.issues }, [...s, ...i.path]);
|
|
@@ -2993,7 +2993,7 @@ const pt = (e) => (t, n, r, o) => {
|
|
|
2993
2993
|
if (i instanceof Promise) throw new le();
|
|
2994
2994
|
if (i.issues.length) {
|
|
2995
2995
|
const a = new (o?.Err ?? e)(i.issues.map((c) => se(c, s, ie())));
|
|
2996
|
-
throw
|
|
2996
|
+
throw Pn(a, o?.callee), a;
|
|
2997
2997
|
}
|
|
2998
2998
|
return i.value;
|
|
2999
2999
|
}, mt = (e) => async (t, n, r, o) => {
|
|
@@ -3007,7 +3007,7 @@ const pt = (e) => (t, n, r, o) => {
|
|
|
3007
3007
|
}, s);
|
|
3008
3008
|
if (i instanceof Promise && (i = await i), i.issues.length) {
|
|
3009
3009
|
const a = new (o?.Err ?? e)(i.issues.map((c) => se(c, s, ie())));
|
|
3010
|
-
throw
|
|
3010
|
+
throw Pn(a, o?.callee), a;
|
|
3011
3011
|
}
|
|
3012
3012
|
return i.value;
|
|
3013
3013
|
}, Ve = (e) => (t, n, r) => {
|
|
@@ -3021,12 +3021,12 @@ const pt = (e) => (t, n, r, o) => {
|
|
|
3021
3021
|
if (s instanceof Promise) throw new le();
|
|
3022
3022
|
return s.issues.length ? {
|
|
3023
3023
|
success: !1,
|
|
3024
|
-
error: new (e ??
|
|
3024
|
+
error: new (e ?? Rn)(s.issues.map((i) => se(i, o, ie())))
|
|
3025
3025
|
} : {
|
|
3026
3026
|
success: !0,
|
|
3027
3027
|
data: s.value
|
|
3028
3028
|
};
|
|
3029
|
-
},
|
|
3029
|
+
}, qi = /* @__PURE__ */ Ve(Cn), He = (e) => async (t, n, r) => {
|
|
3030
3030
|
const o = r ? {
|
|
3031
3031
|
...r,
|
|
3032
3032
|
async: !0
|
|
@@ -3042,61 +3042,61 @@ const pt = (e) => (t, n, r, o) => {
|
|
|
3042
3042
|
success: !0,
|
|
3043
3043
|
data: s.value
|
|
3044
3044
|
};
|
|
3045
|
-
},
|
|
3045
|
+
}, Wi = /* @__PURE__ */ He(Cn), Ki = (e) => (t, n, r) => {
|
|
3046
3046
|
const o = r ? {
|
|
3047
3047
|
...r,
|
|
3048
3048
|
direction: "backward"
|
|
3049
3049
|
} : { direction: "backward" };
|
|
3050
3050
|
return pt(e)(t, n, o);
|
|
3051
|
-
},
|
|
3051
|
+
}, Bi = (e) => (t, n, r) => pt(e)(t, n, r), Gi = (e) => async (t, n, r) => {
|
|
3052
3052
|
const o = r ? {
|
|
3053
3053
|
...r,
|
|
3054
3054
|
direction: "backward"
|
|
3055
3055
|
} : { direction: "backward" };
|
|
3056
3056
|
return mt(e)(t, n, o);
|
|
3057
|
-
},
|
|
3057
|
+
}, Yi = (e) => async (t, n, r) => mt(e)(t, n, r), Xi = (e) => (t, n, r) => {
|
|
3058
3058
|
const o = r ? {
|
|
3059
3059
|
...r,
|
|
3060
3060
|
direction: "backward"
|
|
3061
3061
|
} : { direction: "backward" };
|
|
3062
3062
|
return Ve(e)(t, n, o);
|
|
3063
|
-
},
|
|
3063
|
+
}, Qi = (e) => (t, n, r) => Ve(e)(t, n, r), es = (e) => async (t, n, r) => {
|
|
3064
3064
|
const o = r ? {
|
|
3065
3065
|
...r,
|
|
3066
3066
|
direction: "backward"
|
|
3067
3067
|
} : { direction: "backward" };
|
|
3068
3068
|
return He(e)(t, n, o);
|
|
3069
|
-
},
|
|
3070
|
-
function
|
|
3071
|
-
return new RegExp(
|
|
3069
|
+
}, ts = (e) => async (t, n, r) => He(e)(t, n, r), ns = /^[cC][0-9a-z]{6,}$/, rs = /^[0-9a-z]+$/, os = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, is = /^[0-9a-vA-V]{20}$/, ss = /^[A-Za-z0-9]{27}$/, as = /^[a-zA-Z0-9_-]{21}$/, cs = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, us = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, Ft = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, ls = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, ds = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
3070
|
+
function fs() {
|
|
3071
|
+
return new RegExp(ds, "u");
|
|
3072
3072
|
}
|
|
3073
|
-
const
|
|
3074
|
-
function
|
|
3073
|
+
const hs = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, ps = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, ms = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, _s = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, gs = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, jn = /^[A-Za-z0-9_-]*$/, vs = /^https?$/, ys = /^\+[1-9]\d{6,14}$/, An = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", bs = /* @__PURE__ */ new RegExp(`^${An}$`);
|
|
3074
|
+
function xn(e) {
|
|
3075
3075
|
const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
|
|
3076
3076
|
return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
|
|
3077
3077
|
}
|
|
3078
|
-
function
|
|
3079
|
-
return new RegExp(`^${
|
|
3078
|
+
function ws(e) {
|
|
3079
|
+
return new RegExp(`^${xn(e)}$`);
|
|
3080
3080
|
}
|
|
3081
|
-
function
|
|
3082
|
-
const t =
|
|
3081
|
+
function zs(e) {
|
|
3082
|
+
const t = xn({ precision: e.precision }), n = ["Z"];
|
|
3083
3083
|
e.local && n.push(""), e.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
|
|
3084
3084
|
const r = `${t}(?:${n.join("|")})`;
|
|
3085
|
-
return new RegExp(`^${
|
|
3085
|
+
return new RegExp(`^${An}T(?:${r})$`);
|
|
3086
3086
|
}
|
|
3087
|
-
const
|
|
3087
|
+
const $s = (e) => {
|
|
3088
3088
|
const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
3089
3089
|
return new RegExp(`^${t}$`);
|
|
3090
|
-
},
|
|
3090
|
+
}, ks = /^-?\d+$/, Ss = /^-?\d+(?:\.\d+)?$/, Es = /^(?:true|false)$/i, Os = /^[^A-Z]*$/, Is = /^[^a-z]*$/, D = /* @__PURE__ */ d("$ZodCheck", (e, t) => {
|
|
3091
3091
|
var n;
|
|
3092
3092
|
e._zod ?? (e._zod = {}), e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
|
|
3093
|
-
}),
|
|
3093
|
+
}), Mn = {
|
|
3094
3094
|
number: "number",
|
|
3095
3095
|
bigint: "bigint",
|
|
3096
3096
|
object: "date"
|
|
3097
|
-
},
|
|
3097
|
+
}, Fn = /* @__PURE__ */ d("$ZodCheckLessThan", (e, t) => {
|
|
3098
3098
|
D.init(e, t);
|
|
3099
|
-
const n =
|
|
3099
|
+
const n = Mn[typeof t.value];
|
|
3100
3100
|
e._zod.onattach.push((r) => {
|
|
3101
3101
|
const o = r._zod.bag, s = (t.inclusive ? o.maximum : o.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
|
|
3102
3102
|
t.value < s && (t.inclusive ? o.maximum = t.value : o.exclusiveMaximum = t.value);
|
|
@@ -3111,9 +3111,9 @@ const Ss = (e) => {
|
|
|
3111
3111
|
continue: !t.abort
|
|
3112
3112
|
});
|
|
3113
3113
|
};
|
|
3114
|
-
}),
|
|
3114
|
+
}), Dn = /* @__PURE__ */ d("$ZodCheckGreaterThan", (e, t) => {
|
|
3115
3115
|
D.init(e, t);
|
|
3116
|
-
const n =
|
|
3116
|
+
const n = Mn[typeof t.value];
|
|
3117
3117
|
e._zod.onattach.push((r) => {
|
|
3118
3118
|
const o = r._zod.bag, s = (t.inclusive ? o.minimum : o.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
|
|
3119
3119
|
t.value > s && (t.inclusive ? o.minimum = t.value : o.exclusiveMinimum = t.value);
|
|
@@ -3128,13 +3128,13 @@ const Ss = (e) => {
|
|
|
3128
3128
|
continue: !t.abort
|
|
3129
3129
|
});
|
|
3130
3130
|
};
|
|
3131
|
-
}),
|
|
3131
|
+
}), Ps = /* @__PURE__ */ d("$ZodCheckMultipleOf", (e, t) => {
|
|
3132
3132
|
D.init(e, t), e._zod.onattach.push((n) => {
|
|
3133
3133
|
var r;
|
|
3134
3134
|
(r = n._zod.bag).multipleOf ?? (r.multipleOf = t.value);
|
|
3135
3135
|
}), e._zod.check = (n) => {
|
|
3136
3136
|
if (typeof n.value != typeof t.value) throw new Error("Cannot mix number and bigint in multiple_of check.");
|
|
3137
|
-
(typeof n.value == "bigint" ? n.value % t.value === BigInt(0) :
|
|
3137
|
+
(typeof n.value == "bigint" ? n.value % t.value === BigInt(0) : Zi(n.value, t.value) === 0) || n.issues.push({
|
|
3138
3138
|
origin: typeof n.value,
|
|
3139
3139
|
code: "not_multiple_of",
|
|
3140
3140
|
divisor: t.value,
|
|
@@ -3143,12 +3143,12 @@ const Ss = (e) => {
|
|
|
3143
3143
|
continue: !t.abort
|
|
3144
3144
|
});
|
|
3145
3145
|
};
|
|
3146
|
-
}),
|
|
3146
|
+
}), Zs = /* @__PURE__ */ d("$ZodCheckNumberFormat", (e, t) => {
|
|
3147
3147
|
D.init(e, t), t.format = t.format || "float64";
|
|
3148
|
-
const n = t.format?.includes("int"), r = n ? "int" : "number", [o, s] =
|
|
3148
|
+
const n = t.format?.includes("int"), r = n ? "int" : "number", [o, s] = ji[t.format];
|
|
3149
3149
|
e._zod.onattach.push((i) => {
|
|
3150
3150
|
const a = i._zod.bag;
|
|
3151
|
-
a.format = t.format, a.minimum = o, a.maximum = s, n && (a.pattern =
|
|
3151
|
+
a.format = t.format, a.minimum = o, a.maximum = s, n && (a.pattern = ks);
|
|
3152
3152
|
}), e._zod.check = (i) => {
|
|
3153
3153
|
const a = i.value;
|
|
3154
3154
|
if (n) {
|
|
@@ -3204,7 +3204,7 @@ const Ss = (e) => {
|
|
|
3204
3204
|
continue: !t.abort
|
|
3205
3205
|
});
|
|
3206
3206
|
};
|
|
3207
|
-
}),
|
|
3207
|
+
}), Ns = /* @__PURE__ */ d("$ZodCheckMaxLength", (e, t) => {
|
|
3208
3208
|
var n;
|
|
3209
3209
|
D.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
3210
3210
|
const o = r.value;
|
|
@@ -3226,7 +3226,7 @@ const Ss = (e) => {
|
|
|
3226
3226
|
continue: !t.abort
|
|
3227
3227
|
});
|
|
3228
3228
|
};
|
|
3229
|
-
}),
|
|
3229
|
+
}), Ts = /* @__PURE__ */ d("$ZodCheckMinLength", (e, t) => {
|
|
3230
3230
|
var n;
|
|
3231
3231
|
D.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
3232
3232
|
const o = r.value;
|
|
@@ -3248,7 +3248,7 @@ const Ss = (e) => {
|
|
|
3248
3248
|
continue: !t.abort
|
|
3249
3249
|
});
|
|
3250
3250
|
};
|
|
3251
|
-
}),
|
|
3251
|
+
}), Rs = /* @__PURE__ */ d("$ZodCheckLengthEquals", (e, t) => {
|
|
3252
3252
|
var n;
|
|
3253
3253
|
D.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
3254
3254
|
const o = r.value;
|
|
@@ -3293,7 +3293,7 @@ const Ss = (e) => {
|
|
|
3293
3293
|
});
|
|
3294
3294
|
}) : (r = e._zod).check ?? (r.check = () => {
|
|
3295
3295
|
});
|
|
3296
|
-
}),
|
|
3296
|
+
}), Cs = /* @__PURE__ */ d("$ZodCheckRegex", (e, t) => {
|
|
3297
3297
|
qe.init(e, t), e._zod.check = (n) => {
|
|
3298
3298
|
t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
|
|
3299
3299
|
origin: "string",
|
|
@@ -3305,11 +3305,11 @@ const Ss = (e) => {
|
|
|
3305
3305
|
continue: !t.abort
|
|
3306
3306
|
});
|
|
3307
3307
|
};
|
|
3308
|
-
}),
|
|
3309
|
-
t.pattern ?? (t.pattern =
|
|
3310
|
-
}),
|
|
3311
|
-
t.pattern ?? (t.pattern =
|
|
3312
|
-
}),
|
|
3308
|
+
}), js = /* @__PURE__ */ d("$ZodCheckLowerCase", (e, t) => {
|
|
3309
|
+
t.pattern ?? (t.pattern = Os), qe.init(e, t);
|
|
3310
|
+
}), As = /* @__PURE__ */ d("$ZodCheckUpperCase", (e, t) => {
|
|
3311
|
+
t.pattern ?? (t.pattern = Is), qe.init(e, t);
|
|
3312
|
+
}), xs = /* @__PURE__ */ d("$ZodCheckIncludes", (e, t) => {
|
|
3313
3313
|
D.init(e, t);
|
|
3314
3314
|
const n = fe(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
|
|
3315
3315
|
t.pattern = r, e._zod.onattach.push((o) => {
|
|
@@ -3326,7 +3326,7 @@ const Ss = (e) => {
|
|
|
3326
3326
|
continue: !t.abort
|
|
3327
3327
|
});
|
|
3328
3328
|
};
|
|
3329
|
-
}),
|
|
3329
|
+
}), Ms = /* @__PURE__ */ d("$ZodCheckStartsWith", (e, t) => {
|
|
3330
3330
|
D.init(e, t);
|
|
3331
3331
|
const n = new RegExp(`^${fe(t.prefix)}.*`);
|
|
3332
3332
|
t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
|
|
@@ -3343,7 +3343,7 @@ const Ss = (e) => {
|
|
|
3343
3343
|
continue: !t.abort
|
|
3344
3344
|
});
|
|
3345
3345
|
};
|
|
3346
|
-
}),
|
|
3346
|
+
}), Fs = /* @__PURE__ */ d("$ZodCheckEndsWith", (e, t) => {
|
|
3347
3347
|
D.init(e, t);
|
|
3348
3348
|
const n = new RegExp(`.*${fe(t.suffix)}$`);
|
|
3349
3349
|
t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
|
|
@@ -3360,12 +3360,12 @@ const Ss = (e) => {
|
|
|
3360
3360
|
continue: !t.abort
|
|
3361
3361
|
});
|
|
3362
3362
|
};
|
|
3363
|
-
}),
|
|
3363
|
+
}), Ds = /* @__PURE__ */ d("$ZodCheckOverwrite", (e, t) => {
|
|
3364
3364
|
D.init(e, t), e._zod.check = (n) => {
|
|
3365
3365
|
n.value = t.tx(n.value);
|
|
3366
3366
|
};
|
|
3367
3367
|
});
|
|
3368
|
-
var
|
|
3368
|
+
var Ls = class {
|
|
3369
3369
|
constructor(e = []) {
|
|
3370
3370
|
this.content = [], this.indent = 0, this && (this.args = e);
|
|
3371
3371
|
}
|
|
@@ -3387,13 +3387,13 @@ var Js = class {
|
|
|
3387
3387
|
`));
|
|
3388
3388
|
}
|
|
3389
3389
|
};
|
|
3390
|
-
const
|
|
3390
|
+
const Us = {
|
|
3391
3391
|
major: 4,
|
|
3392
3392
|
minor: 4,
|
|
3393
3393
|
patch: 3
|
|
3394
3394
|
}, Z = /* @__PURE__ */ d("$ZodType", (e, t) => {
|
|
3395
3395
|
var n;
|
|
3396
|
-
e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version =
|
|
3396
|
+
e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = Us;
|
|
3397
3397
|
const r = [...e._zod.def.checks ?? []];
|
|
3398
3398
|
e._zod.traits.has("$ZodCheck") && r.unshift(e);
|
|
3399
3399
|
for (const o of r) for (const s of o._zod.onattach) s(e);
|
|
@@ -3406,7 +3406,7 @@ const Vs = {
|
|
|
3406
3406
|
let u = ue(i), l;
|
|
3407
3407
|
for (const f of a) {
|
|
3408
3408
|
if (f._zod.def.when) {
|
|
3409
|
-
if (
|
|
3409
|
+
if (Ji(i) || !f._zod.def.when(i)) continue;
|
|
3410
3410
|
} else if (u) continue;
|
|
3411
3411
|
const h = i.issues.length, p = f._zod.check(i);
|
|
3412
3412
|
if (p instanceof Promise && c?.async === !1) throw new le();
|
|
@@ -3452,17 +3452,17 @@ const Vs = {
|
|
|
3452
3452
|
z(e, "~standard", () => ({
|
|
3453
3453
|
validate: (o) => {
|
|
3454
3454
|
try {
|
|
3455
|
-
const s =
|
|
3455
|
+
const s = qi(e, o);
|
|
3456
3456
|
return s.success ? { value: s.data } : { issues: s.error?.issues };
|
|
3457
3457
|
} catch {
|
|
3458
|
-
return
|
|
3458
|
+
return Wi(e, o).then((i) => i.success ? { value: i.data } : { issues: i.error?.issues });
|
|
3459
3459
|
}
|
|
3460
3460
|
},
|
|
3461
3461
|
vendor: "zod",
|
|
3462
3462
|
version: 1
|
|
3463
3463
|
}));
|
|
3464
3464
|
}), _t = /* @__PURE__ */ d("$ZodString", (e, t) => {
|
|
3465
|
-
Z.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ??
|
|
3465
|
+
Z.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? $s(e._zod.bag), e._zod.parse = (n, r) => {
|
|
3466
3466
|
if (t.coerce) try {
|
|
3467
3467
|
n.value = String(n.value);
|
|
3468
3468
|
} catch {
|
|
@@ -3476,9 +3476,9 @@ const Vs = {
|
|
|
3476
3476
|
};
|
|
3477
3477
|
}), O = /* @__PURE__ */ d("$ZodStringFormat", (e, t) => {
|
|
3478
3478
|
qe.init(e, t), _t.init(e, t);
|
|
3479
|
-
}),
|
|
3480
|
-
t.pattern ?? (t.pattern =
|
|
3481
|
-
}),
|
|
3479
|
+
}), Js = /* @__PURE__ */ d("$ZodGUID", (e, t) => {
|
|
3480
|
+
t.pattern ?? (t.pattern = us), O.init(e, t);
|
|
3481
|
+
}), Vs = /* @__PURE__ */ d("$ZodUUID", (e, t) => {
|
|
3482
3482
|
if (t.version) {
|
|
3483
3483
|
const n = {
|
|
3484
3484
|
v1: 1,
|
|
@@ -3494,13 +3494,13 @@ const Vs = {
|
|
|
3494
3494
|
t.pattern ?? (t.pattern = Ft(n));
|
|
3495
3495
|
} else t.pattern ?? (t.pattern = Ft());
|
|
3496
3496
|
O.init(e, t);
|
|
3497
|
-
}),
|
|
3498
|
-
t.pattern ?? (t.pattern =
|
|
3499
|
-
}),
|
|
3497
|
+
}), Hs = /* @__PURE__ */ d("$ZodEmail", (e, t) => {
|
|
3498
|
+
t.pattern ?? (t.pattern = ls), O.init(e, t);
|
|
3499
|
+
}), qs = /* @__PURE__ */ d("$ZodURL", (e, t) => {
|
|
3500
3500
|
O.init(e, t), e._zod.check = (n) => {
|
|
3501
3501
|
try {
|
|
3502
3502
|
const r = n.value.trim();
|
|
3503
|
-
if (!t.normalize && t.protocol?.source ===
|
|
3503
|
+
if (!t.normalize && t.protocol?.source === vs.source && !/^https?:\/\//i.test(r)) {
|
|
3504
3504
|
n.issues.push({
|
|
3505
3505
|
code: "invalid_format",
|
|
3506
3506
|
format: "url",
|
|
@@ -3540,32 +3540,32 @@ const Vs = {
|
|
|
3540
3540
|
});
|
|
3541
3541
|
}
|
|
3542
3542
|
};
|
|
3543
|
-
}),
|
|
3544
|
-
t.pattern ?? (t.pattern =
|
|
3545
|
-
}),
|
|
3546
|
-
t.pattern ?? (t.pattern =
|
|
3547
|
-
}),
|
|
3543
|
+
}), Ws = /* @__PURE__ */ d("$ZodEmoji", (e, t) => {
|
|
3544
|
+
t.pattern ?? (t.pattern = fs()), O.init(e, t);
|
|
3545
|
+
}), Ks = /* @__PURE__ */ d("$ZodNanoID", (e, t) => {
|
|
3546
|
+
t.pattern ?? (t.pattern = as), O.init(e, t);
|
|
3547
|
+
}), Bs = /* @__PURE__ */ d("$ZodCUID", (e, t) => {
|
|
3548
|
+
t.pattern ?? (t.pattern = ns), O.init(e, t);
|
|
3549
|
+
}), Gs = /* @__PURE__ */ d("$ZodCUID2", (e, t) => {
|
|
3550
|
+
t.pattern ?? (t.pattern = rs), O.init(e, t);
|
|
3551
|
+
}), Ys = /* @__PURE__ */ d("$ZodULID", (e, t) => {
|
|
3548
3552
|
t.pattern ?? (t.pattern = os), O.init(e, t);
|
|
3549
|
-
}), Xs = /* @__PURE__ */ d("$
|
|
3553
|
+
}), Xs = /* @__PURE__ */ d("$ZodXID", (e, t) => {
|
|
3550
3554
|
t.pattern ?? (t.pattern = is), O.init(e, t);
|
|
3551
|
-
}), Qs = /* @__PURE__ */ d("$
|
|
3555
|
+
}), Qs = /* @__PURE__ */ d("$ZodKSUID", (e, t) => {
|
|
3552
3556
|
t.pattern ?? (t.pattern = ss), O.init(e, t);
|
|
3553
|
-
}), ea = /* @__PURE__ */ d("$
|
|
3554
|
-
t.pattern ?? (t.pattern =
|
|
3555
|
-
}), ta = /* @__PURE__ */ d("$
|
|
3557
|
+
}), ea = /* @__PURE__ */ d("$ZodISODateTime", (e, t) => {
|
|
3558
|
+
t.pattern ?? (t.pattern = zs(t)), O.init(e, t);
|
|
3559
|
+
}), ta = /* @__PURE__ */ d("$ZodISODate", (e, t) => {
|
|
3560
|
+
t.pattern ?? (t.pattern = bs), O.init(e, t);
|
|
3561
|
+
}), na = /* @__PURE__ */ d("$ZodISOTime", (e, t) => {
|
|
3562
|
+
t.pattern ?? (t.pattern = ws(t)), O.init(e, t);
|
|
3563
|
+
}), ra = /* @__PURE__ */ d("$ZodISODuration", (e, t) => {
|
|
3556
3564
|
t.pattern ?? (t.pattern = cs), O.init(e, t);
|
|
3557
|
-
}),
|
|
3558
|
-
t.pattern ?? (t.pattern =
|
|
3559
|
-
}),
|
|
3560
|
-
t.pattern ?? (t.pattern =
|
|
3561
|
-
}), oa = /* @__PURE__ */ d("$ZodISOTime", (e, t) => {
|
|
3562
|
-
t.pattern ?? (t.pattern = $s(t)), O.init(e, t);
|
|
3563
|
-
}), ia = /* @__PURE__ */ d("$ZodISODuration", (e, t) => {
|
|
3564
|
-
t.pattern ?? (t.pattern = ls), O.init(e, t);
|
|
3565
|
-
}), sa = /* @__PURE__ */ d("$ZodIPv4", (e, t) => {
|
|
3566
|
-
t.pattern ?? (t.pattern = ms), O.init(e, t), e._zod.bag.format = "ipv4";
|
|
3567
|
-
}), aa = /* @__PURE__ */ d("$ZodIPv6", (e, t) => {
|
|
3568
|
-
t.pattern ?? (t.pattern = _s), O.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
|
|
3565
|
+
}), oa = /* @__PURE__ */ d("$ZodIPv4", (e, t) => {
|
|
3566
|
+
t.pattern ?? (t.pattern = hs), O.init(e, t), e._zod.bag.format = "ipv4";
|
|
3567
|
+
}), ia = /* @__PURE__ */ d("$ZodIPv6", (e, t) => {
|
|
3568
|
+
t.pattern ?? (t.pattern = ps), O.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
|
|
3569
3569
|
try {
|
|
3570
3570
|
new URL(`http://[${n.value}]`);
|
|
3571
3571
|
} catch {
|
|
@@ -3578,10 +3578,10 @@ const Vs = {
|
|
|
3578
3578
|
});
|
|
3579
3579
|
}
|
|
3580
3580
|
};
|
|
3581
|
-
}),
|
|
3582
|
-
t.pattern ?? (t.pattern =
|
|
3583
|
-
}),
|
|
3584
|
-
t.pattern ?? (t.pattern =
|
|
3581
|
+
}), sa = /* @__PURE__ */ d("$ZodCIDRv4", (e, t) => {
|
|
3582
|
+
t.pattern ?? (t.pattern = ms), O.init(e, t);
|
|
3583
|
+
}), aa = /* @__PURE__ */ d("$ZodCIDRv6", (e, t) => {
|
|
3584
|
+
t.pattern ?? (t.pattern = _s), O.init(e, t), e._zod.check = (n) => {
|
|
3585
3585
|
const r = n.value.split("/");
|
|
3586
3586
|
try {
|
|
3587
3587
|
if (r.length !== 2) throw new Error();
|
|
@@ -3602,7 +3602,7 @@ const Vs = {
|
|
|
3602
3602
|
}
|
|
3603
3603
|
};
|
|
3604
3604
|
});
|
|
3605
|
-
function
|
|
3605
|
+
function Ln(e) {
|
|
3606
3606
|
if (e === "") return !0;
|
|
3607
3607
|
if (/\s/.test(e) || e.length % 4 !== 0) return !1;
|
|
3608
3608
|
try {
|
|
@@ -3611,9 +3611,9 @@ function Vn(e) {
|
|
|
3611
3611
|
return !1;
|
|
3612
3612
|
}
|
|
3613
3613
|
}
|
|
3614
|
-
const
|
|
3615
|
-
t.pattern ?? (t.pattern =
|
|
3616
|
-
|
|
3614
|
+
const ca = /* @__PURE__ */ d("$ZodBase64", (e, t) => {
|
|
3615
|
+
t.pattern ?? (t.pattern = gs), O.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
|
|
3616
|
+
Ln(n.value) || n.issues.push({
|
|
3617
3617
|
code: "invalid_format",
|
|
3618
3618
|
format: "base64",
|
|
3619
3619
|
input: n.value,
|
|
@@ -3622,14 +3622,14 @@ const la = /* @__PURE__ */ d("$ZodBase64", (e, t) => {
|
|
|
3622
3622
|
});
|
|
3623
3623
|
};
|
|
3624
3624
|
});
|
|
3625
|
-
function
|
|
3626
|
-
if (!
|
|
3625
|
+
function ua(e) {
|
|
3626
|
+
if (!jn.test(e)) return !1;
|
|
3627
3627
|
const t = e.replace(/[-_]/g, (n) => n === "-" ? "+" : "/");
|
|
3628
|
-
return
|
|
3628
|
+
return Ln(t.padEnd(Math.ceil(t.length / 4) * 4, "="));
|
|
3629
3629
|
}
|
|
3630
|
-
const
|
|
3631
|
-
t.pattern ?? (t.pattern =
|
|
3632
|
-
|
|
3630
|
+
const la = /* @__PURE__ */ d("$ZodBase64URL", (e, t) => {
|
|
3631
|
+
t.pattern ?? (t.pattern = jn), O.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
|
|
3632
|
+
ua(n.value) || n.issues.push({
|
|
3633
3633
|
code: "invalid_format",
|
|
3634
3634
|
format: "base64url",
|
|
3635
3635
|
input: n.value,
|
|
@@ -3637,10 +3637,10 @@ const fa = /* @__PURE__ */ d("$ZodBase64URL", (e, t) => {
|
|
|
3637
3637
|
continue: !t.abort
|
|
3638
3638
|
});
|
|
3639
3639
|
};
|
|
3640
|
-
}),
|
|
3641
|
-
t.pattern ?? (t.pattern =
|
|
3640
|
+
}), da = /* @__PURE__ */ d("$ZodE164", (e, t) => {
|
|
3641
|
+
t.pattern ?? (t.pattern = ys), O.init(e, t);
|
|
3642
3642
|
});
|
|
3643
|
-
function
|
|
3643
|
+
function fa(e, t = null) {
|
|
3644
3644
|
try {
|
|
3645
3645
|
const n = e.split(".");
|
|
3646
3646
|
if (n.length !== 3) return !1;
|
|
@@ -3652,9 +3652,9 @@ function pa(e, t = null) {
|
|
|
3652
3652
|
return !1;
|
|
3653
3653
|
}
|
|
3654
3654
|
}
|
|
3655
|
-
const
|
|
3655
|
+
const ha = /* @__PURE__ */ d("$ZodJWT", (e, t) => {
|
|
3656
3656
|
O.init(e, t), e._zod.check = (n) => {
|
|
3657
|
-
|
|
3657
|
+
fa(n.value, t.alg) || n.issues.push({
|
|
3658
3658
|
code: "invalid_format",
|
|
3659
3659
|
format: "jwt",
|
|
3660
3660
|
input: n.value,
|
|
@@ -3662,8 +3662,8 @@ const ma = /* @__PURE__ */ d("$ZodJWT", (e, t) => {
|
|
|
3662
3662
|
continue: !t.abort
|
|
3663
3663
|
});
|
|
3664
3664
|
};
|
|
3665
|
-
}),
|
|
3666
|
-
Z.init(e, t), e._zod.pattern = e._zod.bag.pattern ??
|
|
3665
|
+
}), Un = /* @__PURE__ */ d("$ZodNumber", (e, t) => {
|
|
3666
|
+
Z.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? Ss, e._zod.parse = (n, r) => {
|
|
3667
3667
|
if (t.coerce) try {
|
|
3668
3668
|
n.value = Number(n.value);
|
|
3669
3669
|
} catch {
|
|
@@ -3679,10 +3679,10 @@ const ma = /* @__PURE__ */ d("$ZodJWT", (e, t) => {
|
|
|
3679
3679
|
...s ? { received: s } : {}
|
|
3680
3680
|
}), n;
|
|
3681
3681
|
};
|
|
3682
|
-
}),
|
|
3683
|
-
|
|
3684
|
-
}),
|
|
3685
|
-
Z.init(e, t), e._zod.pattern =
|
|
3682
|
+
}), pa = /* @__PURE__ */ d("$ZodNumberFormat", (e, t) => {
|
|
3683
|
+
Zs.init(e, t), Un.init(e, t);
|
|
3684
|
+
}), ma = /* @__PURE__ */ d("$ZodBoolean", (e, t) => {
|
|
3685
|
+
Z.init(e, t), e._zod.pattern = Es, e._zod.parse = (n, r) => {
|
|
3686
3686
|
if (t.coerce) try {
|
|
3687
3687
|
n.value = !!n.value;
|
|
3688
3688
|
} catch {
|
|
@@ -3695,9 +3695,9 @@ const ma = /* @__PURE__ */ d("$ZodJWT", (e, t) => {
|
|
|
3695
3695
|
inst: e
|
|
3696
3696
|
}), n;
|
|
3697
3697
|
};
|
|
3698
|
-
}),
|
|
3698
|
+
}), _a = /* @__PURE__ */ d("$ZodUnknown", (e, t) => {
|
|
3699
3699
|
Z.init(e, t), e._zod.parse = (n) => n;
|
|
3700
|
-
}),
|
|
3700
|
+
}), ga = /* @__PURE__ */ d("$ZodNever", (e, t) => {
|
|
3701
3701
|
Z.init(e, t), e._zod.parse = (n, r) => (n.issues.push({
|
|
3702
3702
|
expected: "never",
|
|
3703
3703
|
code: "invalid_type",
|
|
@@ -3706,9 +3706,9 @@ const ma = /* @__PURE__ */ d("$ZodJWT", (e, t) => {
|
|
|
3706
3706
|
}), n);
|
|
3707
3707
|
});
|
|
3708
3708
|
function Dt(e, t, n) {
|
|
3709
|
-
e.issues.length && t.issues.push(...
|
|
3709
|
+
e.issues.length && t.issues.push(...Nn(n, e.issues)), t.value[n] = e.value;
|
|
3710
3710
|
}
|
|
3711
|
-
const
|
|
3711
|
+
const va = /* @__PURE__ */ d("$ZodArray", (e, t) => {
|
|
3712
3712
|
Z.init(e, t), e._zod.parse = (n, r) => {
|
|
3713
3713
|
const o = n.value;
|
|
3714
3714
|
if (!Array.isArray(o))
|
|
@@ -3730,11 +3730,11 @@ const ba = /* @__PURE__ */ d("$ZodArray", (e, t) => {
|
|
|
3730
3730
|
return s.length ? Promise.all(s).then(() => n) : n;
|
|
3731
3731
|
};
|
|
3732
3732
|
});
|
|
3733
|
-
function
|
|
3733
|
+
function je(e, t, n, r, o, s) {
|
|
3734
3734
|
const i = n in r;
|
|
3735
3735
|
if (e.issues.length) {
|
|
3736
3736
|
if (o && s && !i) return;
|
|
3737
|
-
t.issues.push(...
|
|
3737
|
+
t.issues.push(...Nn(n, e.issues));
|
|
3738
3738
|
}
|
|
3739
3739
|
if (!i && !o) {
|
|
3740
3740
|
e.issues.length || t.issues.push({
|
|
@@ -3747,10 +3747,10 @@ function Ae(e, t, n, r, o, s) {
|
|
|
3747
3747
|
}
|
|
3748
3748
|
e.value === void 0 ? i && (t.value[n] = void 0) : t.value[n] = e.value;
|
|
3749
3749
|
}
|
|
3750
|
-
function
|
|
3750
|
+
function Jn(e) {
|
|
3751
3751
|
const t = Object.keys(e.shape);
|
|
3752
3752
|
for (const r of t) if (!e.shape?.[r]?._zod?.traits?.has("$ZodType")) throw new Error(`Invalid element at key "${r}": expected a Zod schema`);
|
|
3753
|
-
const n =
|
|
3753
|
+
const n = Ci(e.shape);
|
|
3754
3754
|
return {
|
|
3755
3755
|
...e,
|
|
3756
3756
|
keys: t,
|
|
@@ -3759,7 +3759,7 @@ function qn(e) {
|
|
|
3759
3759
|
optionalKeys: new Set(n)
|
|
3760
3760
|
};
|
|
3761
3761
|
}
|
|
3762
|
-
function
|
|
3762
|
+
function Vn(e, t, n, r, o, s) {
|
|
3763
3763
|
const i = [], a = o.keySet, c = o.catchall._zod, u = c.def.type, l = c.optin === "optional", f = c.optout === "optional";
|
|
3764
3764
|
for (const h in t) {
|
|
3765
3765
|
if (h === "__proto__" || a.has(h)) continue;
|
|
@@ -3771,7 +3771,7 @@ function Wn(e, t, n, r, o, s) {
|
|
|
3771
3771
|
value: t[h],
|
|
3772
3772
|
issues: []
|
|
3773
3773
|
}, r);
|
|
3774
|
-
p instanceof Promise ? e.push(p.then((_) =>
|
|
3774
|
+
p instanceof Promise ? e.push(p.then((_) => je(_, n, h, t, l, f))) : je(p, n, h, t, l, f);
|
|
3775
3775
|
}
|
|
3776
3776
|
return i.length && n.issues.push({
|
|
3777
3777
|
code: "unrecognized_keys",
|
|
@@ -3780,7 +3780,7 @@ function Wn(e, t, n, r, o, s) {
|
|
|
3780
3780
|
inst: s
|
|
3781
3781
|
}), e.length ? Promise.all(e).then(() => n) : n;
|
|
3782
3782
|
}
|
|
3783
|
-
const
|
|
3783
|
+
const ya = /* @__PURE__ */ d("$ZodObject", (e, t) => {
|
|
3784
3784
|
if (Z.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
|
|
3785
3785
|
const i = t.shape;
|
|
3786
3786
|
Object.defineProperty(t, "shape", { get: () => {
|
|
@@ -3788,7 +3788,7 @@ const wa = /* @__PURE__ */ d("$ZodObject", (e, t) => {
|
|
|
3788
3788
|
return Object.defineProperty(t, "shape", { value: a }), a;
|
|
3789
3789
|
} });
|
|
3790
3790
|
}
|
|
3791
|
-
const n = Je(() =>
|
|
3791
|
+
const n = Je(() => Jn(t));
|
|
3792
3792
|
z(e._zod, "propValues", () => {
|
|
3793
3793
|
const i = t.shape, a = {};
|
|
3794
3794
|
for (const c in i) {
|
|
@@ -3800,7 +3800,7 @@ const wa = /* @__PURE__ */ d("$ZodObject", (e, t) => {
|
|
|
3800
3800
|
}
|
|
3801
3801
|
return a;
|
|
3802
3802
|
});
|
|
3803
|
-
const r =
|
|
3803
|
+
const r = ye, o = t.catchall;
|
|
3804
3804
|
let s;
|
|
3805
3805
|
e._zod.parse = (i, a) => {
|
|
3806
3806
|
s ?? (s = n.value);
|
|
@@ -3819,14 +3819,14 @@ const wa = /* @__PURE__ */ d("$ZodObject", (e, t) => {
|
|
|
3819
3819
|
value: c[f],
|
|
3820
3820
|
issues: []
|
|
3821
3821
|
}, a);
|
|
3822
|
-
v instanceof Promise ? u.push(v.then((k) =>
|
|
3822
|
+
v instanceof Promise ? u.push(v.then((k) => je(k, i, f, c, p, _))) : je(v, i, f, c, p, _);
|
|
3823
3823
|
}
|
|
3824
|
-
return o ?
|
|
3824
|
+
return o ? Vn(u, c, i, a, n.value, e) : u.length ? Promise.all(u).then(() => i) : i;
|
|
3825
3825
|
};
|
|
3826
|
-
}),
|
|
3827
|
-
|
|
3828
|
-
const n = e._zod.parse, r = Je(() =>
|
|
3829
|
-
const h = new
|
|
3826
|
+
}), ba = /* @__PURE__ */ d("$ZodObjectJIT", (e, t) => {
|
|
3827
|
+
ya.init(e, t);
|
|
3828
|
+
const n = e._zod.parse, r = Je(() => Jn(t)), o = (f) => {
|
|
3829
|
+
const h = new Ls([
|
|
3830
3830
|
"shape",
|
|
3831
3831
|
"payload",
|
|
3832
3832
|
"ctx"
|
|
@@ -3840,8 +3840,8 @@ const wa = /* @__PURE__ */ d("$ZodObject", (e, t) => {
|
|
|
3840
3840
|
for (const C of p.keys) v[C] = `key_${k++}`;
|
|
3841
3841
|
h.write("const newResult = {};");
|
|
3842
3842
|
for (const C of p.keys) {
|
|
3843
|
-
const g = v[C], w = Mt(C), Y = f[C], ne = Y?._zod?.optin === "optional",
|
|
3844
|
-
h.write(`const ${g} = ${_(C)};`), ne &&
|
|
3843
|
+
const g = v[C], w = Mt(C), Y = f[C], ne = Y?._zod?.optin === "optional", pe = Y?._zod?.optout === "optional";
|
|
3844
|
+
h.write(`const ${g} = ${_(C)};`), ne && pe ? h.write(`
|
|
3845
3845
|
if (${g}.issues.length) {
|
|
3846
3846
|
if (${w} in input) {
|
|
3847
3847
|
payload.issues = payload.issues.concat(${g}.issues.map(iss => ({
|
|
@@ -3907,12 +3907,12 @@ const wa = /* @__PURE__ */ d("$ZodObject", (e, t) => {
|
|
|
3907
3907
|
return (C, g) => j(f, C, g);
|
|
3908
3908
|
};
|
|
3909
3909
|
let s;
|
|
3910
|
-
const i =
|
|
3910
|
+
const i = ye, a = !lt.jitless, c = a && Ti.value, u = t.catchall;
|
|
3911
3911
|
let l;
|
|
3912
3912
|
e._zod.parse = (f, h) => {
|
|
3913
3913
|
l ?? (l = r.value);
|
|
3914
3914
|
const p = f.value;
|
|
3915
|
-
return i(p) ? a && c && h?.async === !1 && h.jitless !== !0 ? (s || (s = o(t.shape)), f = s(f, h), u ?
|
|
3915
|
+
return i(p) ? a && c && h?.async === !1 && h.jitless !== !0 ? (s || (s = o(t.shape)), f = s(f, h), u ? Vn([], p, f, h, l, e) : f) : n(f, h) : (f.issues.push({
|
|
3916
3916
|
expected: "object",
|
|
3917
3917
|
code: "invalid_type",
|
|
3918
3918
|
input: p,
|
|
@@ -3931,7 +3931,7 @@ function Lt(e, t, n, r) {
|
|
|
3931
3931
|
errors: e.map((s) => s.issues.map((i) => se(i, r, ie())))
|
|
3932
3932
|
}), t);
|
|
3933
3933
|
}
|
|
3934
|
-
const
|
|
3934
|
+
const Hn = /* @__PURE__ */ d("$ZodUnion", (e, t) => {
|
|
3935
3935
|
Z.init(e, t), z(e._zod, "optin", () => t.options.some((r) => r._zod.optin === "optional") ? "optional" : void 0), z(e._zod, "optout", () => t.options.some((r) => r._zod.optout === "optional") ? "optional" : void 0), z(e._zod, "values", () => {
|
|
3936
3936
|
if (t.options.every((r) => r._zod.values)) return new Set(t.options.flatMap((r) => Array.from(r._zod.values)));
|
|
3937
3937
|
}), z(e._zod, "pattern", () => {
|
|
@@ -3959,8 +3959,8 @@ const Kn = /* @__PURE__ */ d("$ZodUnion", (e, t) => {
|
|
|
3959
3959
|
}
|
|
3960
3960
|
return s ? Promise.all(i).then((a) => Lt(a, r, e, o)) : Lt(i, r, e, o);
|
|
3961
3961
|
};
|
|
3962
|
-
}),
|
|
3963
|
-
t.inclusive = !1,
|
|
3962
|
+
}), wa = /* @__PURE__ */ d("$ZodDiscriminatedUnion", (e, t) => {
|
|
3963
|
+
t.inclusive = !1, Hn.init(e, t);
|
|
3964
3964
|
const n = e._zod.parse;
|
|
3965
3965
|
z(e._zod, "propValues", () => {
|
|
3966
3966
|
const o = {};
|
|
@@ -3988,7 +3988,7 @@ const Kn = /* @__PURE__ */ d("$ZodUnion", (e, t) => {
|
|
|
3988
3988
|
});
|
|
3989
3989
|
e._zod.parse = (o, s) => {
|
|
3990
3990
|
const i = o.value;
|
|
3991
|
-
if (!
|
|
3991
|
+
if (!ye(i))
|
|
3992
3992
|
return o.issues.push({
|
|
3993
3993
|
code: "invalid_type",
|
|
3994
3994
|
expected: "object",
|
|
@@ -4007,7 +4007,7 @@ const Kn = /* @__PURE__ */ d("$ZodUnion", (e, t) => {
|
|
|
4007
4007
|
inst: e
|
|
4008
4008
|
}), o);
|
|
4009
4009
|
};
|
|
4010
|
-
}),
|
|
4010
|
+
}), za = /* @__PURE__ */ d("$ZodIntersection", (e, t) => {
|
|
4011
4011
|
Z.init(e, t), e._zod.parse = (n, r) => {
|
|
4012
4012
|
const o = n.value, s = t.left._zod.run({
|
|
4013
4013
|
value: o,
|
|
@@ -4028,7 +4028,7 @@ function it(e, t) {
|
|
|
4028
4028
|
valid: !0,
|
|
4029
4029
|
data: e
|
|
4030
4030
|
};
|
|
4031
|
-
if (
|
|
4031
|
+
if (be(e) && be(t)) {
|
|
4032
4032
|
const n = Object.keys(t), r = Object.keys(e).filter((s) => n.indexOf(s) !== -1), o = {
|
|
4033
4033
|
...e,
|
|
4034
4034
|
...t
|
|
@@ -4090,10 +4090,10 @@ function Ut(e, t, n) {
|
|
|
4090
4090
|
if (!i.valid) throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);
|
|
4091
4091
|
return e.value = i.data, e;
|
|
4092
4092
|
}
|
|
4093
|
-
const
|
|
4093
|
+
const $a = /* @__PURE__ */ d("$ZodEnum", (e, t) => {
|
|
4094
4094
|
Z.init(e, t);
|
|
4095
|
-
const n =
|
|
4096
|
-
e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) =>
|
|
4095
|
+
const n = In(t.entries), r = new Set(n);
|
|
4096
|
+
e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) => Ri.has(typeof o)).map((o) => typeof o == "string" ? fe(o) : o.toString()).join("|")})$`), e._zod.parse = (o, s) => {
|
|
4097
4097
|
const i = o.value;
|
|
4098
4098
|
return r.has(i) || o.issues.push({
|
|
4099
4099
|
code: "invalid_value",
|
|
@@ -4102,7 +4102,7 @@ const Sa = /* @__PURE__ */ d("$ZodEnum", (e, t) => {
|
|
|
4102
4102
|
inst: e
|
|
4103
4103
|
}), o;
|
|
4104
4104
|
};
|
|
4105
|
-
}),
|
|
4105
|
+
}), ka = /* @__PURE__ */ d("$ZodLiteral", (e, t) => {
|
|
4106
4106
|
if (Z.init(e, t), t.values.length === 0) throw new Error("Cannot create literal schema with no valid values");
|
|
4107
4107
|
const n = new Set(t.values);
|
|
4108
4108
|
e._zod.values = n, e._zod.pattern = new RegExp(`^(${t.values.map((r) => typeof r == "string" ? fe(r) : r ? fe(r.toString()) : String(r)).join("|")})$`), e._zod.parse = (r, o) => {
|
|
@@ -4114,9 +4114,9 @@ const Sa = /* @__PURE__ */ d("$ZodEnum", (e, t) => {
|
|
|
4114
4114
|
inst: e
|
|
4115
4115
|
}), r;
|
|
4116
4116
|
};
|
|
4117
|
-
}),
|
|
4117
|
+
}), Sa = /* @__PURE__ */ d("$ZodTransform", (e, t) => {
|
|
4118
4118
|
Z.init(e, t), e._zod.optin = "optional", e._zod.parse = (n, r) => {
|
|
4119
|
-
if (r.direction === "backward") throw new
|
|
4119
|
+
if (r.direction === "backward") throw new On(e.constructor.name);
|
|
4120
4120
|
const o = t.transform(n.value, n);
|
|
4121
4121
|
if (r.async) return (o instanceof Promise ? o : Promise.resolve(o)).then((s) => (n.value = s, n.fallback = !0, n));
|
|
4122
4122
|
if (o instanceof Promise) throw new le();
|
|
@@ -4129,7 +4129,7 @@ function Jt(e, t) {
|
|
|
4129
4129
|
value: void 0
|
|
4130
4130
|
} : e;
|
|
4131
4131
|
}
|
|
4132
|
-
const
|
|
4132
|
+
const qn = /* @__PURE__ */ d("$ZodOptional", (e, t) => {
|
|
4133
4133
|
Z.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", z(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), z(e._zod, "pattern", () => {
|
|
4134
4134
|
const n = t.innerType._zod.pattern;
|
|
4135
4135
|
return n ? new RegExp(`^(${ft(n.source)})?$`) : void 0;
|
|
@@ -4140,14 +4140,14 @@ const Bn = /* @__PURE__ */ d("$ZodOptional", (e, t) => {
|
|
|
4140
4140
|
}
|
|
4141
4141
|
return n.value === void 0 ? n : t.innerType._zod.run(n, r);
|
|
4142
4142
|
};
|
|
4143
|
-
}),
|
|
4144
|
-
|
|
4145
|
-
}),
|
|
4143
|
+
}), Ea = /* @__PURE__ */ d("$ZodExactOptional", (e, t) => {
|
|
4144
|
+
qn.init(e, t), z(e._zod, "values", () => t.innerType._zod.values), z(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (n, r) => t.innerType._zod.run(n, r);
|
|
4145
|
+
}), Oa = /* @__PURE__ */ d("$ZodNullable", (e, t) => {
|
|
4146
4146
|
Z.init(e, t), z(e._zod, "optin", () => t.innerType._zod.optin), z(e._zod, "optout", () => t.innerType._zod.optout), z(e._zod, "pattern", () => {
|
|
4147
4147
|
const n = t.innerType._zod.pattern;
|
|
4148
4148
|
return n ? new RegExp(`^(${ft(n.source)}|null)$`) : void 0;
|
|
4149
4149
|
}), z(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (n, r) => n.value === null ? n : t.innerType._zod.run(n, r);
|
|
4150
|
-
}),
|
|
4150
|
+
}), Ia = /* @__PURE__ */ d("$ZodDefault", (e, t) => {
|
|
4151
4151
|
Z.init(e, t), e._zod.optin = "optional", z(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
|
|
4152
4152
|
if (r.direction === "backward") return t.innerType._zod.run(n, r);
|
|
4153
4153
|
if (n.value === void 0)
|
|
@@ -4159,9 +4159,9 @@ const Bn = /* @__PURE__ */ d("$ZodOptional", (e, t) => {
|
|
|
4159
4159
|
function Vt(e, t) {
|
|
4160
4160
|
return e.value === void 0 && (e.value = t.defaultValue), e;
|
|
4161
4161
|
}
|
|
4162
|
-
const
|
|
4162
|
+
const Pa = /* @__PURE__ */ d("$ZodPrefault", (e, t) => {
|
|
4163
4163
|
Z.init(e, t), e._zod.optin = "optional", z(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => (r.direction === "backward" || n.value === void 0 && (n.value = t.defaultValue), t.innerType._zod.run(n, r));
|
|
4164
|
-
}),
|
|
4164
|
+
}), Za = /* @__PURE__ */ d("$ZodNonOptional", (e, t) => {
|
|
4165
4165
|
Z.init(e, t), z(e._zod, "values", () => {
|
|
4166
4166
|
const n = t.innerType._zod.values;
|
|
4167
4167
|
return n ? new Set([...n].filter((r) => r !== void 0)) : void 0;
|
|
@@ -4178,7 +4178,7 @@ function Ht(e, t) {
|
|
|
4178
4178
|
inst: t
|
|
4179
4179
|
}), e;
|
|
4180
4180
|
}
|
|
4181
|
-
const
|
|
4181
|
+
const Na = /* @__PURE__ */ d("$ZodCatch", (e, t) => {
|
|
4182
4182
|
Z.init(e, t), e._zod.optin = "optional", z(e._zod, "optout", () => t.innerType._zod.optout), z(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
|
|
4183
4183
|
if (r.direction === "backward") return t.innerType._zod.run(n, r);
|
|
4184
4184
|
const o = t.innerType._zod.run(n, r);
|
|
@@ -4192,24 +4192,24 @@ const Ra = /* @__PURE__ */ d("$ZodCatch", (e, t) => {
|
|
|
4192
4192
|
input: n.value
|
|
4193
4193
|
}), n.issues = [], n.fallback = !0), n);
|
|
4194
4194
|
};
|
|
4195
|
-
}),
|
|
4195
|
+
}), Ta = /* @__PURE__ */ d("$ZodPipe", (e, t) => {
|
|
4196
4196
|
Z.init(e, t), z(e._zod, "values", () => t.in._zod.values), z(e._zod, "optin", () => t.in._zod.optin), z(e._zod, "optout", () => t.out._zod.optout), z(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
|
|
4197
4197
|
if (r.direction === "backward") {
|
|
4198
4198
|
const s = t.out._zod.run(n, r);
|
|
4199
|
-
return s instanceof Promise ? s.then((i) =>
|
|
4199
|
+
return s instanceof Promise ? s.then((i) => Ie(i, t.in, r)) : Ie(s, t.in, r);
|
|
4200
4200
|
}
|
|
4201
4201
|
const o = t.in._zod.run(n, r);
|
|
4202
|
-
return o instanceof Promise ? o.then((s) =>
|
|
4202
|
+
return o instanceof Promise ? o.then((s) => Ie(s, t.out, r)) : Ie(o, t.out, r);
|
|
4203
4203
|
};
|
|
4204
4204
|
});
|
|
4205
|
-
function
|
|
4205
|
+
function Ie(e, t, n) {
|
|
4206
4206
|
return e.issues.length ? (e.aborted = !0, e) : t._zod.run({
|
|
4207
4207
|
value: e.value,
|
|
4208
4208
|
issues: e.issues,
|
|
4209
4209
|
fallback: e.fallback
|
|
4210
4210
|
}, n);
|
|
4211
4211
|
}
|
|
4212
|
-
const
|
|
4212
|
+
const Ra = /* @__PURE__ */ d("$ZodReadonly", (e, t) => {
|
|
4213
4213
|
Z.init(e, t), z(e._zod, "propValues", () => t.innerType._zod.propValues), z(e._zod, "values", () => t.innerType._zod.values), z(e._zod, "optin", () => t.innerType?._zod?.optin), z(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (n, r) => {
|
|
4214
4214
|
if (r.direction === "backward") return t.innerType._zod.run(n, r);
|
|
4215
4215
|
const o = t.innerType._zod.run(n, r);
|
|
@@ -4219,7 +4219,7 @@ const ja = /* @__PURE__ */ d("$ZodReadonly", (e, t) => {
|
|
|
4219
4219
|
function qt(e) {
|
|
4220
4220
|
return e.value = Object.freeze(e.value), e;
|
|
4221
4221
|
}
|
|
4222
|
-
const
|
|
4222
|
+
const Ca = /* @__PURE__ */ d("$ZodCustom", (e, t) => {
|
|
4223
4223
|
D.init(e, t), Z.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
|
|
4224
4224
|
const r = n.value, o = t.fn(r);
|
|
4225
4225
|
if (o instanceof Promise) return o.then((s) => Wt(s, n, r, e));
|
|
@@ -4235,10 +4235,10 @@ function Wt(e, t, n, r) {
|
|
|
4235
4235
|
path: [...r._zod.def.path ?? []],
|
|
4236
4236
|
continue: !r._zod.def.abort
|
|
4237
4237
|
};
|
|
4238
|
-
r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(
|
|
4238
|
+
r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(we(o));
|
|
4239
4239
|
}
|
|
4240
4240
|
}
|
|
4241
|
-
var Kt,
|
|
4241
|
+
var Kt, ja = class {
|
|
4242
4242
|
constructor() {
|
|
4243
4243
|
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
|
|
4244
4244
|
}
|
|
@@ -4270,20 +4270,20 @@ var Kt, xa = class {
|
|
|
4270
4270
|
return this._map.has(e);
|
|
4271
4271
|
}
|
|
4272
4272
|
};
|
|
4273
|
-
function
|
|
4274
|
-
return new
|
|
4273
|
+
function Aa() {
|
|
4274
|
+
return new ja();
|
|
4275
4275
|
}
|
|
4276
|
-
(Kt = globalThis).__zod_globalRegistry ?? (Kt.__zod_globalRegistry =
|
|
4277
|
-
const
|
|
4276
|
+
(Kt = globalThis).__zod_globalRegistry ?? (Kt.__zod_globalRegistry = Aa());
|
|
4277
|
+
const ge = globalThis.__zod_globalRegistry;
|
|
4278
4278
|
// @__NO_SIDE_EFFECTS__
|
|
4279
|
-
function
|
|
4279
|
+
function xa(e, t) {
|
|
4280
4280
|
return new e({
|
|
4281
4281
|
type: "string",
|
|
4282
4282
|
...m(t)
|
|
4283
4283
|
});
|
|
4284
4284
|
}
|
|
4285
4285
|
// @__NO_SIDE_EFFECTS__
|
|
4286
|
-
function
|
|
4286
|
+
function Ma(e, t) {
|
|
4287
4287
|
return new e({
|
|
4288
4288
|
type: "string",
|
|
4289
4289
|
format: "email",
|
|
@@ -4303,7 +4303,7 @@ function Bt(e, t) {
|
|
|
4303
4303
|
});
|
|
4304
4304
|
}
|
|
4305
4305
|
// @__NO_SIDE_EFFECTS__
|
|
4306
|
-
function
|
|
4306
|
+
function Fa(e, t) {
|
|
4307
4307
|
return new e({
|
|
4308
4308
|
type: "string",
|
|
4309
4309
|
format: "uuid",
|
|
@@ -4313,7 +4313,7 @@ function La(e, t) {
|
|
|
4313
4313
|
});
|
|
4314
4314
|
}
|
|
4315
4315
|
// @__NO_SIDE_EFFECTS__
|
|
4316
|
-
function
|
|
4316
|
+
function Da(e, t) {
|
|
4317
4317
|
return new e({
|
|
4318
4318
|
type: "string",
|
|
4319
4319
|
format: "uuid",
|
|
@@ -4324,7 +4324,7 @@ function Ua(e, t) {
|
|
|
4324
4324
|
});
|
|
4325
4325
|
}
|
|
4326
4326
|
// @__NO_SIDE_EFFECTS__
|
|
4327
|
-
function
|
|
4327
|
+
function La(e, t) {
|
|
4328
4328
|
return new e({
|
|
4329
4329
|
type: "string",
|
|
4330
4330
|
format: "uuid",
|
|
@@ -4335,7 +4335,7 @@ function Ja(e, t) {
|
|
|
4335
4335
|
});
|
|
4336
4336
|
}
|
|
4337
4337
|
// @__NO_SIDE_EFFECTS__
|
|
4338
|
-
function
|
|
4338
|
+
function Ua(e, t) {
|
|
4339
4339
|
return new e({
|
|
4340
4340
|
type: "string",
|
|
4341
4341
|
format: "uuid",
|
|
@@ -4346,7 +4346,7 @@ function Va(e, t) {
|
|
|
4346
4346
|
});
|
|
4347
4347
|
}
|
|
4348
4348
|
// @__NO_SIDE_EFFECTS__
|
|
4349
|
-
function
|
|
4349
|
+
function Ja(e, t) {
|
|
4350
4350
|
return new e({
|
|
4351
4351
|
type: "string",
|
|
4352
4352
|
format: "url",
|
|
@@ -4356,7 +4356,7 @@ function Ha(e, t) {
|
|
|
4356
4356
|
});
|
|
4357
4357
|
}
|
|
4358
4358
|
// @__NO_SIDE_EFFECTS__
|
|
4359
|
-
function
|
|
4359
|
+
function Va(e, t) {
|
|
4360
4360
|
return new e({
|
|
4361
4361
|
type: "string",
|
|
4362
4362
|
format: "emoji",
|
|
@@ -4366,7 +4366,7 @@ function qa(e, t) {
|
|
|
4366
4366
|
});
|
|
4367
4367
|
}
|
|
4368
4368
|
// @__NO_SIDE_EFFECTS__
|
|
4369
|
-
function
|
|
4369
|
+
function Ha(e, t) {
|
|
4370
4370
|
return new e({
|
|
4371
4371
|
type: "string",
|
|
4372
4372
|
format: "nanoid",
|
|
@@ -4376,7 +4376,7 @@ function Wa(e, t) {
|
|
|
4376
4376
|
});
|
|
4377
4377
|
}
|
|
4378
4378
|
// @__NO_SIDE_EFFECTS__
|
|
4379
|
-
function
|
|
4379
|
+
function qa(e, t) {
|
|
4380
4380
|
return new e({
|
|
4381
4381
|
type: "string",
|
|
4382
4382
|
format: "cuid",
|
|
@@ -4386,7 +4386,7 @@ function Ka(e, t) {
|
|
|
4386
4386
|
});
|
|
4387
4387
|
}
|
|
4388
4388
|
// @__NO_SIDE_EFFECTS__
|
|
4389
|
-
function
|
|
4389
|
+
function Wa(e, t) {
|
|
4390
4390
|
return new e({
|
|
4391
4391
|
type: "string",
|
|
4392
4392
|
format: "cuid2",
|
|
@@ -4396,7 +4396,7 @@ function Ba(e, t) {
|
|
|
4396
4396
|
});
|
|
4397
4397
|
}
|
|
4398
4398
|
// @__NO_SIDE_EFFECTS__
|
|
4399
|
-
function
|
|
4399
|
+
function Ka(e, t) {
|
|
4400
4400
|
return new e({
|
|
4401
4401
|
type: "string",
|
|
4402
4402
|
format: "ulid",
|
|
@@ -4406,7 +4406,7 @@ function Ga(e, t) {
|
|
|
4406
4406
|
});
|
|
4407
4407
|
}
|
|
4408
4408
|
// @__NO_SIDE_EFFECTS__
|
|
4409
|
-
function
|
|
4409
|
+
function Ba(e, t) {
|
|
4410
4410
|
return new e({
|
|
4411
4411
|
type: "string",
|
|
4412
4412
|
format: "xid",
|
|
@@ -4416,7 +4416,7 @@ function Ya(e, t) {
|
|
|
4416
4416
|
});
|
|
4417
4417
|
}
|
|
4418
4418
|
// @__NO_SIDE_EFFECTS__
|
|
4419
|
-
function
|
|
4419
|
+
function Ga(e, t) {
|
|
4420
4420
|
return new e({
|
|
4421
4421
|
type: "string",
|
|
4422
4422
|
format: "ksuid",
|
|
@@ -4426,7 +4426,7 @@ function Xa(e, t) {
|
|
|
4426
4426
|
});
|
|
4427
4427
|
}
|
|
4428
4428
|
// @__NO_SIDE_EFFECTS__
|
|
4429
|
-
function
|
|
4429
|
+
function Ya(e, t) {
|
|
4430
4430
|
return new e({
|
|
4431
4431
|
type: "string",
|
|
4432
4432
|
format: "ipv4",
|
|
@@ -4436,7 +4436,7 @@ function Qa(e, t) {
|
|
|
4436
4436
|
});
|
|
4437
4437
|
}
|
|
4438
4438
|
// @__NO_SIDE_EFFECTS__
|
|
4439
|
-
function
|
|
4439
|
+
function Xa(e, t) {
|
|
4440
4440
|
return new e({
|
|
4441
4441
|
type: "string",
|
|
4442
4442
|
format: "ipv6",
|
|
@@ -4446,7 +4446,7 @@ function ec(e, t) {
|
|
|
4446
4446
|
});
|
|
4447
4447
|
}
|
|
4448
4448
|
// @__NO_SIDE_EFFECTS__
|
|
4449
|
-
function
|
|
4449
|
+
function Qa(e, t) {
|
|
4450
4450
|
return new e({
|
|
4451
4451
|
type: "string",
|
|
4452
4452
|
format: "cidrv4",
|
|
@@ -4456,7 +4456,7 @@ function tc(e, t) {
|
|
|
4456
4456
|
});
|
|
4457
4457
|
}
|
|
4458
4458
|
// @__NO_SIDE_EFFECTS__
|
|
4459
|
-
function
|
|
4459
|
+
function ec(e, t) {
|
|
4460
4460
|
return new e({
|
|
4461
4461
|
type: "string",
|
|
4462
4462
|
format: "cidrv6",
|
|
@@ -4466,7 +4466,7 @@ function nc(e, t) {
|
|
|
4466
4466
|
});
|
|
4467
4467
|
}
|
|
4468
4468
|
// @__NO_SIDE_EFFECTS__
|
|
4469
|
-
function
|
|
4469
|
+
function tc(e, t) {
|
|
4470
4470
|
return new e({
|
|
4471
4471
|
type: "string",
|
|
4472
4472
|
format: "base64",
|
|
@@ -4476,7 +4476,7 @@ function rc(e, t) {
|
|
|
4476
4476
|
});
|
|
4477
4477
|
}
|
|
4478
4478
|
// @__NO_SIDE_EFFECTS__
|
|
4479
|
-
function
|
|
4479
|
+
function nc(e, t) {
|
|
4480
4480
|
return new e({
|
|
4481
4481
|
type: "string",
|
|
4482
4482
|
format: "base64url",
|
|
@@ -4486,7 +4486,7 @@ function oc(e, t) {
|
|
|
4486
4486
|
});
|
|
4487
4487
|
}
|
|
4488
4488
|
// @__NO_SIDE_EFFECTS__
|
|
4489
|
-
function
|
|
4489
|
+
function rc(e, t) {
|
|
4490
4490
|
return new e({
|
|
4491
4491
|
type: "string",
|
|
4492
4492
|
format: "e164",
|
|
@@ -4496,7 +4496,7 @@ function ic(e, t) {
|
|
|
4496
4496
|
});
|
|
4497
4497
|
}
|
|
4498
4498
|
// @__NO_SIDE_EFFECTS__
|
|
4499
|
-
function
|
|
4499
|
+
function oc(e, t) {
|
|
4500
4500
|
return new e({
|
|
4501
4501
|
type: "string",
|
|
4502
4502
|
format: "jwt",
|
|
@@ -4506,7 +4506,7 @@ function sc(e, t) {
|
|
|
4506
4506
|
});
|
|
4507
4507
|
}
|
|
4508
4508
|
// @__NO_SIDE_EFFECTS__
|
|
4509
|
-
function
|
|
4509
|
+
function ic(e, t) {
|
|
4510
4510
|
return new e({
|
|
4511
4511
|
type: "string",
|
|
4512
4512
|
format: "datetime",
|
|
@@ -4518,7 +4518,7 @@ function ac(e, t) {
|
|
|
4518
4518
|
});
|
|
4519
4519
|
}
|
|
4520
4520
|
// @__NO_SIDE_EFFECTS__
|
|
4521
|
-
function
|
|
4521
|
+
function sc(e, t) {
|
|
4522
4522
|
return new e({
|
|
4523
4523
|
type: "string",
|
|
4524
4524
|
format: "date",
|
|
@@ -4527,7 +4527,7 @@ function cc(e, t) {
|
|
|
4527
4527
|
});
|
|
4528
4528
|
}
|
|
4529
4529
|
// @__NO_SIDE_EFFECTS__
|
|
4530
|
-
function
|
|
4530
|
+
function ac(e, t) {
|
|
4531
4531
|
return new e({
|
|
4532
4532
|
type: "string",
|
|
4533
4533
|
format: "time",
|
|
@@ -4537,7 +4537,7 @@ function uc(e, t) {
|
|
|
4537
4537
|
});
|
|
4538
4538
|
}
|
|
4539
4539
|
// @__NO_SIDE_EFFECTS__
|
|
4540
|
-
function
|
|
4540
|
+
function cc(e, t) {
|
|
4541
4541
|
return new e({
|
|
4542
4542
|
type: "string",
|
|
4543
4543
|
format: "duration",
|
|
@@ -4546,7 +4546,7 @@ function lc(e, t) {
|
|
|
4546
4546
|
});
|
|
4547
4547
|
}
|
|
4548
4548
|
// @__NO_SIDE_EFFECTS__
|
|
4549
|
-
function
|
|
4549
|
+
function uc(e, t) {
|
|
4550
4550
|
return new e({
|
|
4551
4551
|
type: "number",
|
|
4552
4552
|
checks: [],
|
|
@@ -4554,7 +4554,7 @@ function dc(e, t) {
|
|
|
4554
4554
|
});
|
|
4555
4555
|
}
|
|
4556
4556
|
// @__NO_SIDE_EFFECTS__
|
|
4557
|
-
function
|
|
4557
|
+
function lc(e, t) {
|
|
4558
4558
|
return new e({
|
|
4559
4559
|
type: "number",
|
|
4560
4560
|
check: "number_format",
|
|
@@ -4564,18 +4564,18 @@ function fc(e, t) {
|
|
|
4564
4564
|
});
|
|
4565
4565
|
}
|
|
4566
4566
|
// @__NO_SIDE_EFFECTS__
|
|
4567
|
-
function
|
|
4567
|
+
function dc(e, t) {
|
|
4568
4568
|
return new e({
|
|
4569
4569
|
type: "boolean",
|
|
4570
4570
|
...m(t)
|
|
4571
4571
|
});
|
|
4572
4572
|
}
|
|
4573
4573
|
// @__NO_SIDE_EFFECTS__
|
|
4574
|
-
function
|
|
4574
|
+
function fc(e) {
|
|
4575
4575
|
return new e({ type: "unknown" });
|
|
4576
4576
|
}
|
|
4577
4577
|
// @__NO_SIDE_EFFECTS__
|
|
4578
|
-
function
|
|
4578
|
+
function hc(e, t) {
|
|
4579
4579
|
return new e({
|
|
4580
4580
|
type: "never",
|
|
4581
4581
|
...m(t)
|
|
@@ -4583,7 +4583,7 @@ function mc(e, t) {
|
|
|
4583
4583
|
}
|
|
4584
4584
|
// @__NO_SIDE_EFFECTS__
|
|
4585
4585
|
function Gt(e, t) {
|
|
4586
|
-
return new
|
|
4586
|
+
return new Fn({
|
|
4587
4587
|
check: "less_than",
|
|
4588
4588
|
...m(t),
|
|
4589
4589
|
value: e,
|
|
@@ -4592,7 +4592,7 @@ function Gt(e, t) {
|
|
|
4592
4592
|
}
|
|
4593
4593
|
// @__NO_SIDE_EFFECTS__
|
|
4594
4594
|
function Ke(e, t) {
|
|
4595
|
-
return new
|
|
4595
|
+
return new Fn({
|
|
4596
4596
|
check: "less_than",
|
|
4597
4597
|
...m(t),
|
|
4598
4598
|
value: e,
|
|
@@ -4601,7 +4601,7 @@ function Ke(e, t) {
|
|
|
4601
4601
|
}
|
|
4602
4602
|
// @__NO_SIDE_EFFECTS__
|
|
4603
4603
|
function Yt(e, t) {
|
|
4604
|
-
return new
|
|
4604
|
+
return new Dn({
|
|
4605
4605
|
check: "greater_than",
|
|
4606
4606
|
...m(t),
|
|
4607
4607
|
value: e,
|
|
@@ -4610,7 +4610,7 @@ function Yt(e, t) {
|
|
|
4610
4610
|
}
|
|
4611
4611
|
// @__NO_SIDE_EFFECTS__
|
|
4612
4612
|
function Be(e, t) {
|
|
4613
|
-
return new
|
|
4613
|
+
return new Dn({
|
|
4614
4614
|
check: "greater_than",
|
|
4615
4615
|
...m(t),
|
|
4616
4616
|
value: e,
|
|
@@ -4619,39 +4619,39 @@ function Be(e, t) {
|
|
|
4619
4619
|
}
|
|
4620
4620
|
// @__NO_SIDE_EFFECTS__
|
|
4621
4621
|
function Xt(e, t) {
|
|
4622
|
-
return new
|
|
4622
|
+
return new Ps({
|
|
4623
4623
|
check: "multiple_of",
|
|
4624
4624
|
...m(t),
|
|
4625
4625
|
value: e
|
|
4626
4626
|
});
|
|
4627
4627
|
}
|
|
4628
4628
|
// @__NO_SIDE_EFFECTS__
|
|
4629
|
-
function
|
|
4630
|
-
return new
|
|
4629
|
+
function Wn(e, t) {
|
|
4630
|
+
return new Ns({
|
|
4631
4631
|
check: "max_length",
|
|
4632
4632
|
...m(t),
|
|
4633
4633
|
maximum: e
|
|
4634
4634
|
});
|
|
4635
4635
|
}
|
|
4636
4636
|
// @__NO_SIDE_EFFECTS__
|
|
4637
|
-
function
|
|
4638
|
-
return new
|
|
4637
|
+
function Ae(e, t) {
|
|
4638
|
+
return new Ts({
|
|
4639
4639
|
check: "min_length",
|
|
4640
4640
|
...m(t),
|
|
4641
4641
|
minimum: e
|
|
4642
4642
|
});
|
|
4643
4643
|
}
|
|
4644
4644
|
// @__NO_SIDE_EFFECTS__
|
|
4645
|
-
function
|
|
4646
|
-
return new
|
|
4645
|
+
function Kn(e, t) {
|
|
4646
|
+
return new Rs({
|
|
4647
4647
|
check: "length_equals",
|
|
4648
4648
|
...m(t),
|
|
4649
4649
|
length: e
|
|
4650
4650
|
});
|
|
4651
4651
|
}
|
|
4652
4652
|
// @__NO_SIDE_EFFECTS__
|
|
4653
|
-
function
|
|
4654
|
-
return new
|
|
4653
|
+
function pc(e, t) {
|
|
4654
|
+
return new Cs({
|
|
4655
4655
|
check: "string_format",
|
|
4656
4656
|
format: "regex",
|
|
4657
4657
|
...m(t),
|
|
@@ -4659,24 +4659,24 @@ function _c(e, t) {
|
|
|
4659
4659
|
});
|
|
4660
4660
|
}
|
|
4661
4661
|
// @__NO_SIDE_EFFECTS__
|
|
4662
|
-
function
|
|
4663
|
-
return new
|
|
4662
|
+
function mc(e) {
|
|
4663
|
+
return new js({
|
|
4664
4664
|
check: "string_format",
|
|
4665
4665
|
format: "lowercase",
|
|
4666
4666
|
...m(e)
|
|
4667
4667
|
});
|
|
4668
4668
|
}
|
|
4669
4669
|
// @__NO_SIDE_EFFECTS__
|
|
4670
|
-
function
|
|
4671
|
-
return new
|
|
4670
|
+
function _c(e) {
|
|
4671
|
+
return new As({
|
|
4672
4672
|
check: "string_format",
|
|
4673
4673
|
format: "uppercase",
|
|
4674
4674
|
...m(e)
|
|
4675
4675
|
});
|
|
4676
4676
|
}
|
|
4677
4677
|
// @__NO_SIDE_EFFECTS__
|
|
4678
|
-
function
|
|
4679
|
-
return new
|
|
4678
|
+
function gc(e, t) {
|
|
4679
|
+
return new xs({
|
|
4680
4680
|
check: "string_format",
|
|
4681
4681
|
format: "includes",
|
|
4682
4682
|
...m(t),
|
|
@@ -4684,8 +4684,8 @@ function yc(e, t) {
|
|
|
4684
4684
|
});
|
|
4685
4685
|
}
|
|
4686
4686
|
// @__NO_SIDE_EFFECTS__
|
|
4687
|
-
function
|
|
4688
|
-
return new
|
|
4687
|
+
function vc(e, t) {
|
|
4688
|
+
return new Ms({
|
|
4689
4689
|
check: "string_format",
|
|
4690
4690
|
format: "starts_with",
|
|
4691
4691
|
...m(t),
|
|
@@ -4693,8 +4693,8 @@ function bc(e, t) {
|
|
|
4693
4693
|
});
|
|
4694
4694
|
}
|
|
4695
4695
|
// @__NO_SIDE_EFFECTS__
|
|
4696
|
-
function
|
|
4697
|
-
return new
|
|
4696
|
+
function yc(e, t) {
|
|
4697
|
+
return new Fs({
|
|
4698
4698
|
check: "string_format",
|
|
4699
4699
|
format: "ends_with",
|
|
4700
4700
|
...m(t),
|
|
@@ -4702,34 +4702,34 @@ function wc(e, t) {
|
|
|
4702
4702
|
});
|
|
4703
4703
|
}
|
|
4704
4704
|
// @__NO_SIDE_EFFECTS__
|
|
4705
|
-
function
|
|
4706
|
-
return new
|
|
4705
|
+
function he(e) {
|
|
4706
|
+
return new Ds({
|
|
4707
4707
|
check: "overwrite",
|
|
4708
4708
|
tx: e
|
|
4709
4709
|
});
|
|
4710
4710
|
}
|
|
4711
4711
|
// @__NO_SIDE_EFFECTS__
|
|
4712
|
-
function
|
|
4713
|
-
return /* @__PURE__ */
|
|
4712
|
+
function bc(e) {
|
|
4713
|
+
return /* @__PURE__ */ he((t) => t.normalize(e));
|
|
4714
4714
|
}
|
|
4715
4715
|
// @__NO_SIDE_EFFECTS__
|
|
4716
|
-
function
|
|
4717
|
-
return /* @__PURE__ */
|
|
4716
|
+
function wc() {
|
|
4717
|
+
return /* @__PURE__ */ he((e) => e.trim());
|
|
4718
4718
|
}
|
|
4719
4719
|
// @__NO_SIDE_EFFECTS__
|
|
4720
|
-
function
|
|
4721
|
-
return /* @__PURE__ */
|
|
4720
|
+
function zc() {
|
|
4721
|
+
return /* @__PURE__ */ he((e) => e.toLowerCase());
|
|
4722
4722
|
}
|
|
4723
4723
|
// @__NO_SIDE_EFFECTS__
|
|
4724
|
-
function
|
|
4725
|
-
return /* @__PURE__ */
|
|
4724
|
+
function $c() {
|
|
4725
|
+
return /* @__PURE__ */ he((e) => e.toUpperCase());
|
|
4726
4726
|
}
|
|
4727
4727
|
// @__NO_SIDE_EFFECTS__
|
|
4728
|
-
function
|
|
4729
|
-
return /* @__PURE__ */
|
|
4728
|
+
function kc() {
|
|
4729
|
+
return /* @__PURE__ */ he((e) => Ni(e));
|
|
4730
4730
|
}
|
|
4731
4731
|
// @__NO_SIDE_EFFECTS__
|
|
4732
|
-
function
|
|
4732
|
+
function Sc(e, t, n) {
|
|
4733
4733
|
return new e({
|
|
4734
4734
|
type: "array",
|
|
4735
4735
|
element: t,
|
|
@@ -4737,7 +4737,7 @@ function Oc(e, t, n) {
|
|
|
4737
4737
|
});
|
|
4738
4738
|
}
|
|
4739
4739
|
// @__NO_SIDE_EFFECTS__
|
|
4740
|
-
function
|
|
4740
|
+
function Ec(e, t, n) {
|
|
4741
4741
|
return new e({
|
|
4742
4742
|
type: "custom",
|
|
4743
4743
|
check: "custom",
|
|
@@ -4746,29 +4746,29 @@ function Ic(e, t, n) {
|
|
|
4746
4746
|
});
|
|
4747
4747
|
}
|
|
4748
4748
|
// @__NO_SIDE_EFFECTS__
|
|
4749
|
-
function
|
|
4750
|
-
const n = /* @__PURE__ */
|
|
4751
|
-
if (typeof o == "string") r.issues.push(
|
|
4749
|
+
function Oc(e, t) {
|
|
4750
|
+
const n = /* @__PURE__ */ Ic((r) => (r.addIssue = (o) => {
|
|
4751
|
+
if (typeof o == "string") r.issues.push(we(o, r.value, n._zod.def));
|
|
4752
4752
|
else {
|
|
4753
4753
|
const s = o;
|
|
4754
|
-
s.fatal && (s.continue = !1), s.code ?? (s.code = "custom"), s.input ?? (s.input = r.value), s.inst ?? (s.inst = n), s.continue ?? (s.continue = !n._zod.def.abort), r.issues.push(
|
|
4754
|
+
s.fatal && (s.continue = !1), s.code ?? (s.code = "custom"), s.input ?? (s.input = r.value), s.inst ?? (s.inst = n), s.continue ?? (s.continue = !n._zod.def.abort), r.issues.push(we(s));
|
|
4755
4755
|
}
|
|
4756
4756
|
}, e(r.value, r)), t);
|
|
4757
4757
|
return n;
|
|
4758
4758
|
}
|
|
4759
4759
|
// @__NO_SIDE_EFFECTS__
|
|
4760
|
-
function
|
|
4760
|
+
function Ic(e, t) {
|
|
4761
4761
|
const n = new D({
|
|
4762
4762
|
check: "custom",
|
|
4763
4763
|
...m(t)
|
|
4764
4764
|
});
|
|
4765
4765
|
return n._zod.check = e, n;
|
|
4766
4766
|
}
|
|
4767
|
-
function
|
|
4767
|
+
function Bn(e) {
|
|
4768
4768
|
let t = e?.target ?? "draft-2020-12";
|
|
4769
4769
|
return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
|
|
4770
4770
|
processors: e.processors ?? {},
|
|
4771
|
-
metadataRegistry: e?.metadata ??
|
|
4771
|
+
metadataRegistry: e?.metadata ?? ge,
|
|
4772
4772
|
target: t,
|
|
4773
4773
|
unrepresentable: e?.unrepresentable ?? "throw",
|
|
4774
4774
|
override: e?.override ?? (() => {
|
|
@@ -4816,7 +4816,7 @@ function R(e, t, n = {
|
|
|
4816
4816
|
const c = t.metadataRegistry.get(e);
|
|
4817
4817
|
return c && Object.assign(i.schema, c), t.io === "input" && x(e) && (delete i.schema.examples, delete i.schema.default), t.io === "input" && "_prefault" in i.schema && ((r = i.schema).default ?? (r.default = i.schema._prefault)), delete i.schema._prefault, t.seen.get(e).schema;
|
|
4818
4818
|
}
|
|
4819
|
-
function
|
|
4819
|
+
function Gn(e, t) {
|
|
4820
4820
|
const n = e.seen.get(t);
|
|
4821
4821
|
if (!n) throw new Error("Unprocessed schema. This is a bug in Zod.");
|
|
4822
4822
|
const r = /* @__PURE__ */ new Map();
|
|
@@ -4886,7 +4886,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4886
4886
|
}
|
|
4887
4887
|
}
|
|
4888
4888
|
}
|
|
4889
|
-
function
|
|
4889
|
+
function Yn(e, t) {
|
|
4890
4890
|
const n = e.seen.get(t);
|
|
4891
4891
|
if (!n) throw new Error("Unprocessed schema. This is a bug in Zod.");
|
|
4892
4892
|
const r = (a) => {
|
|
@@ -4937,8 +4937,8 @@ function er(e, t) {
|
|
|
4937
4937
|
value: {
|
|
4938
4938
|
...t["~standard"],
|
|
4939
4939
|
jsonSchema: {
|
|
4940
|
-
input:
|
|
4941
|
-
output:
|
|
4940
|
+
input: xe(t, "input", e.processors),
|
|
4941
|
+
output: xe(t, "output", e.processors)
|
|
4942
4942
|
}
|
|
4943
4943
|
},
|
|
4944
4944
|
enumerable: !1,
|
|
@@ -4976,50 +4976,50 @@ function x(e, t) {
|
|
|
4976
4976
|
}
|
|
4977
4977
|
return !1;
|
|
4978
4978
|
}
|
|
4979
|
-
const
|
|
4980
|
-
const r =
|
|
4979
|
+
const Pc = (e, t = {}) => (n) => {
|
|
4980
|
+
const r = Bn({
|
|
4981
4981
|
...n,
|
|
4982
4982
|
processors: t
|
|
4983
4983
|
});
|
|
4984
|
-
return R(e, r),
|
|
4985
|
-
},
|
|
4986
|
-
const { libraryOptions: o, target: s } = r ?? {}, i =
|
|
4984
|
+
return R(e, r), Gn(r, e), Yn(r, e);
|
|
4985
|
+
}, xe = (e, t, n = {}) => (r) => {
|
|
4986
|
+
const { libraryOptions: o, target: s } = r ?? {}, i = Bn({
|
|
4987
4987
|
...o ?? {},
|
|
4988
4988
|
target: s,
|
|
4989
4989
|
io: t,
|
|
4990
4990
|
processors: n
|
|
4991
4991
|
});
|
|
4992
|
-
return R(e, i),
|
|
4993
|
-
},
|
|
4992
|
+
return R(e, i), Gn(i, e), Yn(i, e);
|
|
4993
|
+
}, Zc = {
|
|
4994
4994
|
guid: "uuid",
|
|
4995
4995
|
url: "uri",
|
|
4996
4996
|
datetime: "date-time",
|
|
4997
4997
|
json_string: "json-string",
|
|
4998
4998
|
regex: ""
|
|
4999
|
-
},
|
|
4999
|
+
}, Nc = (e, t, n, r) => {
|
|
5000
5000
|
const o = n;
|
|
5001
5001
|
o.type = "string";
|
|
5002
5002
|
const { minimum: s, maximum: i, format: a, patterns: c, contentEncoding: u } = e._zod.bag;
|
|
5003
|
-
if (typeof s == "number" && (o.minLength = s), typeof i == "number" && (o.maxLength = i), a && (o.format =
|
|
5003
|
+
if (typeof s == "number" && (o.minLength = s), typeof i == "number" && (o.maxLength = i), a && (o.format = Zc[a] ?? a, o.format === "" && delete o.format, a === "time" && delete o.format), u && (o.contentEncoding = u), c && c.size > 0) {
|
|
5004
5004
|
const l = [...c];
|
|
5005
5005
|
l.length === 1 ? o.pattern = l[0].source : l.length > 1 && (o.allOf = [...l.map((f) => ({
|
|
5006
5006
|
...t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0" ? { type: "string" } : {},
|
|
5007
5007
|
pattern: f.source
|
|
5008
5008
|
}))]);
|
|
5009
5009
|
}
|
|
5010
|
-
},
|
|
5010
|
+
}, Tc = (e, t, n, r) => {
|
|
5011
5011
|
const o = n, { minimum: s, maximum: i, format: a, multipleOf: c, exclusiveMaximum: u, exclusiveMinimum: l } = e._zod.bag;
|
|
5012
5012
|
typeof a == "string" && a.includes("int") ? o.type = "integer" : o.type = "number";
|
|
5013
5013
|
const f = typeof l == "number" && l >= (s ?? Number.NEGATIVE_INFINITY), h = typeof u == "number" && u <= (i ?? Number.POSITIVE_INFINITY), p = t.target === "draft-04" || t.target === "openapi-3.0";
|
|
5014
5014
|
f ? p ? (o.minimum = l, o.exclusiveMinimum = !0) : o.exclusiveMinimum = l : typeof s == "number" && (o.minimum = s), h ? p ? (o.maximum = u, o.exclusiveMaximum = !0) : o.exclusiveMaximum = u : typeof i == "number" && (o.maximum = i), typeof c == "number" && (o.multipleOf = c);
|
|
5015
|
-
},
|
|
5015
|
+
}, Rc = (e, t, n, r) => {
|
|
5016
5016
|
n.type = "boolean";
|
|
5017
|
-
},
|
|
5017
|
+
}, Cc = (e, t, n, r) => {
|
|
5018
5018
|
n.not = {};
|
|
5019
|
-
},
|
|
5020
|
-
const o = e._zod.def, s =
|
|
5019
|
+
}, jc = (e, t, n, r) => {
|
|
5020
|
+
const o = e._zod.def, s = In(o.entries);
|
|
5021
5021
|
s.every((i) => typeof i == "number") && (n.type = "number"), s.every((i) => typeof i == "string") && (n.type = "string"), n.enum = s;
|
|
5022
|
-
},
|
|
5022
|
+
}, Ac = (e, t, n, r) => {
|
|
5023
5023
|
const o = e._zod.def, s = [];
|
|
5024
5024
|
for (const i of o.values) if (i === void 0) {
|
|
5025
5025
|
if (t.unrepresentable === "throw") throw new Error("Literal `undefined` cannot be represented in JSON Schema");
|
|
@@ -5032,17 +5032,17 @@ const Tc = (e, t = {}) => (n) => {
|
|
|
5032
5032
|
n.type = i === null ? "null" : typeof i, t.target === "draft-04" || t.target === "openapi-3.0" ? n.enum = [i] : n.const = i;
|
|
5033
5033
|
} else
|
|
5034
5034
|
s.every((i) => typeof i == "number") && (n.type = "number"), s.every((i) => typeof i == "string") && (n.type = "string"), s.every((i) => typeof i == "boolean") && (n.type = "boolean"), s.every((i) => i === null) && (n.type = "null"), n.enum = s;
|
|
5035
|
-
},
|
|
5035
|
+
}, xc = (e, t, n, r) => {
|
|
5036
5036
|
if (t.unrepresentable === "throw") throw new Error("Custom types cannot be represented in JSON Schema");
|
|
5037
|
-
},
|
|
5037
|
+
}, Mc = (e, t, n, r) => {
|
|
5038
5038
|
if (t.unrepresentable === "throw") throw new Error("Transforms cannot be represented in JSON Schema");
|
|
5039
|
-
},
|
|
5039
|
+
}, Fc = (e, t, n, r) => {
|
|
5040
5040
|
const o = n, s = e._zod.def, { minimum: i, maximum: a } = e._zod.bag;
|
|
5041
5041
|
typeof i == "number" && (o.minItems = i), typeof a == "number" && (o.maxItems = a), o.type = "array", o.items = R(s.element, t, {
|
|
5042
5042
|
...r,
|
|
5043
5043
|
path: [...r.path, "items"]
|
|
5044
5044
|
});
|
|
5045
|
-
},
|
|
5045
|
+
}, Dc = (e, t, n, r) => {
|
|
5046
5046
|
const o = n, s = e._zod.def;
|
|
5047
5047
|
o.type = "object", o.properties = {};
|
|
5048
5048
|
const i = s.shape;
|
|
@@ -5062,7 +5062,7 @@ const Tc = (e, t = {}) => (n) => {
|
|
|
5062
5062
|
...r,
|
|
5063
5063
|
path: [...r.path, "additionalProperties"]
|
|
5064
5064
|
})) : t.io === "output" && (o.additionalProperties = !1);
|
|
5065
|
-
},
|
|
5065
|
+
}, Lc = (e, t, n, r) => {
|
|
5066
5066
|
const o = e._zod.def, s = o.inclusive === !1, i = o.options.map((a, c) => R(a, t, {
|
|
5067
5067
|
...r,
|
|
5068
5068
|
path: [
|
|
@@ -5072,7 +5072,7 @@ const Tc = (e, t = {}) => (n) => {
|
|
|
5072
5072
|
]
|
|
5073
5073
|
}));
|
|
5074
5074
|
s ? n.oneOf = i : n.anyOf = i;
|
|
5075
|
-
},
|
|
5075
|
+
}, Uc = (e, t, n, r) => {
|
|
5076
5076
|
const o = e._zod.def, s = R(o.left, t, {
|
|
5077
5077
|
...r,
|
|
5078
5078
|
path: [
|
|
@@ -5089,25 +5089,25 @@ const Tc = (e, t = {}) => (n) => {
|
|
|
5089
5089
|
]
|
|
5090
5090
|
}), a = (c) => "allOf" in c && Object.keys(c).length === 1;
|
|
5091
5091
|
n.allOf = [...a(s) ? s.allOf : [s], ...a(i) ? i.allOf : [i]];
|
|
5092
|
-
},
|
|
5092
|
+
}, Jc = (e, t, n, r) => {
|
|
5093
5093
|
const o = e._zod.def, s = R(o.innerType, t, r), i = t.seen.get(e);
|
|
5094
5094
|
t.target === "openapi-3.0" ? (i.ref = o.innerType, n.nullable = !0) : n.anyOf = [s, { type: "null" }];
|
|
5095
|
-
},
|
|
5095
|
+
}, Vc = (e, t, n, r) => {
|
|
5096
5096
|
const o = e._zod.def;
|
|
5097
5097
|
R(o.innerType, t, r);
|
|
5098
5098
|
const s = t.seen.get(e);
|
|
5099
5099
|
s.ref = o.innerType;
|
|
5100
|
-
},
|
|
5100
|
+
}, Hc = (e, t, n, r) => {
|
|
5101
5101
|
const o = e._zod.def;
|
|
5102
5102
|
R(o.innerType, t, r);
|
|
5103
5103
|
const s = t.seen.get(e);
|
|
5104
5104
|
s.ref = o.innerType, n.default = JSON.parse(JSON.stringify(o.defaultValue));
|
|
5105
|
-
},
|
|
5105
|
+
}, qc = (e, t, n, r) => {
|
|
5106
5106
|
const o = e._zod.def;
|
|
5107
5107
|
R(o.innerType, t, r);
|
|
5108
5108
|
const s = t.seen.get(e);
|
|
5109
5109
|
s.ref = o.innerType, t.io === "input" && (n._prefault = JSON.parse(JSON.stringify(o.defaultValue)));
|
|
5110
|
-
},
|
|
5110
|
+
}, Wc = (e, t, n, r) => {
|
|
5111
5111
|
const o = e._zod.def;
|
|
5112
5112
|
R(o.innerType, t, r);
|
|
5113
5113
|
const s = t.seen.get(e);
|
|
@@ -5119,49 +5119,49 @@ const Tc = (e, t = {}) => (n) => {
|
|
|
5119
5119
|
throw new Error("Dynamic catch values are not supported in JSON Schema");
|
|
5120
5120
|
}
|
|
5121
5121
|
n.default = i;
|
|
5122
|
-
},
|
|
5122
|
+
}, Kc = (e, t, n, r) => {
|
|
5123
5123
|
const o = e._zod.def, s = o.in._zod.traits.has("$ZodTransform"), i = t.io === "input" ? s ? o.out : o.in : o.out;
|
|
5124
5124
|
R(i, t, r);
|
|
5125
5125
|
const a = t.seen.get(e);
|
|
5126
5126
|
a.ref = i;
|
|
5127
|
-
},
|
|
5127
|
+
}, Bc = (e, t, n, r) => {
|
|
5128
5128
|
const o = e._zod.def;
|
|
5129
5129
|
R(o.innerType, t, r);
|
|
5130
5130
|
const s = t.seen.get(e);
|
|
5131
5131
|
s.ref = o.innerType, n.readOnly = !0;
|
|
5132
|
-
},
|
|
5132
|
+
}, Xn = (e, t, n, r) => {
|
|
5133
5133
|
const o = e._zod.def;
|
|
5134
5134
|
R(o.innerType, t, r);
|
|
5135
5135
|
const s = t.seen.get(e);
|
|
5136
5136
|
s.ref = o.innerType;
|
|
5137
|
-
},
|
|
5138
|
-
|
|
5137
|
+
}, Gc = /* @__PURE__ */ d("ZodISODateTime", (e, t) => {
|
|
5138
|
+
ea.init(e, t), I.init(e, t);
|
|
5139
|
+
});
|
|
5140
|
+
function Yc(e) {
|
|
5141
|
+
return /* @__PURE__ */ ic(Gc, e);
|
|
5142
|
+
}
|
|
5143
|
+
const Xc = /* @__PURE__ */ d("ZodISODate", (e, t) => {
|
|
5144
|
+
ta.init(e, t), I.init(e, t);
|
|
5139
5145
|
});
|
|
5140
5146
|
function Qc(e) {
|
|
5141
|
-
return /* @__PURE__ */
|
|
5147
|
+
return /* @__PURE__ */ sc(Xc, e);
|
|
5142
5148
|
}
|
|
5143
|
-
const eu = /* @__PURE__ */ d("
|
|
5144
|
-
|
|
5149
|
+
const eu = /* @__PURE__ */ d("ZodISOTime", (e, t) => {
|
|
5150
|
+
na.init(e, t), I.init(e, t);
|
|
5145
5151
|
});
|
|
5146
5152
|
function tu(e) {
|
|
5147
|
-
return /* @__PURE__ */
|
|
5153
|
+
return /* @__PURE__ */ ac(eu, e);
|
|
5148
5154
|
}
|
|
5149
|
-
const nu = /* @__PURE__ */ d("
|
|
5150
|
-
|
|
5155
|
+
const nu = /* @__PURE__ */ d("ZodISODuration", (e, t) => {
|
|
5156
|
+
ra.init(e, t), I.init(e, t);
|
|
5151
5157
|
});
|
|
5152
5158
|
function ru(e) {
|
|
5153
|
-
return /* @__PURE__ */
|
|
5159
|
+
return /* @__PURE__ */ cc(nu, e);
|
|
5154
5160
|
}
|
|
5155
|
-
const ou =
|
|
5156
|
-
|
|
5157
|
-
}
|
|
5158
|
-
|
|
5159
|
-
return /* @__PURE__ */ lc(ou, e);
|
|
5160
|
-
}
|
|
5161
|
-
const su = (e, t) => {
|
|
5162
|
-
An.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
|
|
5163
|
-
format: { value: (n) => Wi(e, n) },
|
|
5164
|
-
flatten: { value: (n) => qi(e, n) },
|
|
5161
|
+
const ou = (e, t) => {
|
|
5162
|
+
Rn.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
|
|
5163
|
+
format: { value: (n) => Hi(e, n) },
|
|
5164
|
+
flatten: { value: (n) => Vi(e, n) },
|
|
5165
5165
|
addIssue: { value: (n) => {
|
|
5166
5166
|
e.issues.push(n), e.message = JSON.stringify(e.issues, ot, 2);
|
|
5167
5167
|
} },
|
|
@@ -5172,8 +5172,8 @@ const su = (e, t) => {
|
|
|
5172
5172
|
return e.issues.length === 0;
|
|
5173
5173
|
} }
|
|
5174
5174
|
});
|
|
5175
|
-
}, L = /* @__PURE__ */ d("ZodError",
|
|
5176
|
-
function
|
|
5175
|
+
}, L = /* @__PURE__ */ d("ZodError", ou, { Parent: Error }), iu = /* @__PURE__ */ pt(L), su = /* @__PURE__ */ mt(L), au = /* @__PURE__ */ Ve(L), cu = /* @__PURE__ */ He(L), uu = /* @__PURE__ */ Ki(L), lu = /* @__PURE__ */ Bi(L), du = /* @__PURE__ */ Gi(L), fu = /* @__PURE__ */ Yi(L), hu = /* @__PURE__ */ Xi(L), pu = /* @__PURE__ */ Qi(L), mu = /* @__PURE__ */ es(L), _u = /* @__PURE__ */ ts(L), Qt = /* @__PURE__ */ new WeakMap();
|
|
5176
|
+
function ke(e, t, n) {
|
|
5177
5177
|
const r = Object.getPrototypeOf(e);
|
|
5178
5178
|
let o = Qt.get(r);
|
|
5179
5179
|
if (o || (o = /* @__PURE__ */ new Set(), Qt.set(r, o)), !o.has(t)) {
|
|
@@ -5204,10 +5204,10 @@ function Se(e, t, n) {
|
|
|
5204
5204
|
}
|
|
5205
5205
|
}
|
|
5206
5206
|
}
|
|
5207
|
-
const
|
|
5208
|
-
input:
|
|
5209
|
-
output:
|
|
5210
|
-
} }), e.toJSONSchema =
|
|
5207
|
+
const N = /* @__PURE__ */ d("ZodType", (e, t) => (Z.init(e, t), Object.assign(e["~standard"], { jsonSchema: {
|
|
5208
|
+
input: xe(e, "input"),
|
|
5209
|
+
output: xe(e, "output")
|
|
5210
|
+
} }), e.toJSONSchema = Pc(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.parse = (n, r) => iu(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => au(e, n, r), e.parseAsync = async (n, r) => su(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => cu(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => uu(e, n, r), e.decode = (n, r) => lu(e, n, r), e.encodeAsync = async (n, r) => du(e, n, r), e.decodeAsync = async (n, r) => fu(e, n, r), e.safeEncode = (n, r) => hu(e, n, r), e.safeDecode = (n, r) => pu(e, n, r), e.safeEncodeAsync = async (n, r) => mu(e, n, r), e.safeDecodeAsync = async (n, r) => _u(e, n, r), ke(e, "ZodType", {
|
|
5211
5211
|
check(...n) {
|
|
5212
5212
|
const r = this.def;
|
|
5213
5213
|
return this.clone(ee(r, { checks: [...r.checks ?? [], ...n.map((o) => typeof o == "function" ? { _zod: {
|
|
@@ -5229,19 +5229,19 @@ const T = /* @__PURE__ */ d("ZodType", (e, t) => (Z.init(e, t), Object.assign(e[
|
|
|
5229
5229
|
return n.add(this, r), this;
|
|
5230
5230
|
},
|
|
5231
5231
|
refine(n, r) {
|
|
5232
|
-
return this.check(
|
|
5232
|
+
return this.check(ll(n, r));
|
|
5233
5233
|
},
|
|
5234
5234
|
superRefine(n, r) {
|
|
5235
|
-
return this.check(
|
|
5235
|
+
return this.check(dl(n, r));
|
|
5236
5236
|
},
|
|
5237
5237
|
overwrite(n) {
|
|
5238
|
-
return this.check(/* @__PURE__ */
|
|
5238
|
+
return this.check(/* @__PURE__ */ he(n));
|
|
5239
5239
|
},
|
|
5240
5240
|
optional() {
|
|
5241
5241
|
return nn(this);
|
|
5242
5242
|
},
|
|
5243
5243
|
exactOptional() {
|
|
5244
|
-
return
|
|
5244
|
+
return Yu(this);
|
|
5245
5245
|
},
|
|
5246
5246
|
nullable() {
|
|
5247
5247
|
return rn(this);
|
|
@@ -5250,43 +5250,43 @@ const T = /* @__PURE__ */ d("ZodType", (e, t) => (Z.init(e, t), Object.assign(e[
|
|
|
5250
5250
|
return nn(rn(this));
|
|
5251
5251
|
},
|
|
5252
5252
|
nonoptional(n) {
|
|
5253
|
-
return
|
|
5253
|
+
return rl(this, n);
|
|
5254
5254
|
},
|
|
5255
5255
|
array() {
|
|
5256
5256
|
return de(this);
|
|
5257
5257
|
},
|
|
5258
5258
|
or(n) {
|
|
5259
|
-
return
|
|
5259
|
+
return Uu([this, n]);
|
|
5260
5260
|
},
|
|
5261
5261
|
and(n) {
|
|
5262
|
-
return
|
|
5262
|
+
return qu(this, n);
|
|
5263
5263
|
},
|
|
5264
5264
|
transform(n) {
|
|
5265
|
-
return on(this,
|
|
5265
|
+
return on(this, Bu(n));
|
|
5266
5266
|
},
|
|
5267
5267
|
default(n) {
|
|
5268
|
-
return
|
|
5268
|
+
return el(this, n);
|
|
5269
5269
|
},
|
|
5270
5270
|
prefault(n) {
|
|
5271
|
-
return
|
|
5271
|
+
return nl(this, n);
|
|
5272
5272
|
},
|
|
5273
5273
|
catch(n) {
|
|
5274
|
-
return
|
|
5274
|
+
return il(this, n);
|
|
5275
5275
|
},
|
|
5276
5276
|
pipe(n) {
|
|
5277
5277
|
return on(this, n);
|
|
5278
5278
|
},
|
|
5279
5279
|
readonly() {
|
|
5280
|
-
return
|
|
5280
|
+
return cl(this);
|
|
5281
5281
|
},
|
|
5282
5282
|
describe(n) {
|
|
5283
5283
|
const r = this.clone();
|
|
5284
|
-
return
|
|
5284
|
+
return ge.add(r, { description: n }), r;
|
|
5285
5285
|
},
|
|
5286
5286
|
meta(...n) {
|
|
5287
|
-
if (n.length === 0) return
|
|
5287
|
+
if (n.length === 0) return ge.get(this);
|
|
5288
5288
|
const r = this.clone();
|
|
5289
|
-
return
|
|
5289
|
+
return ge.add(r, n[0]), r;
|
|
5290
5290
|
},
|
|
5291
5291
|
isOptional() {
|
|
5292
5292
|
return this.safeParse(void 0).success;
|
|
@@ -5299,107 +5299,107 @@ const T = /* @__PURE__ */ d("ZodType", (e, t) => (Z.init(e, t), Object.assign(e[
|
|
|
5299
5299
|
}
|
|
5300
5300
|
}), Object.defineProperty(e, "description", {
|
|
5301
5301
|
get() {
|
|
5302
|
-
return
|
|
5302
|
+
return ge.get(e)?.description;
|
|
5303
5303
|
},
|
|
5304
5304
|
configurable: !0
|
|
5305
|
-
}), e)),
|
|
5306
|
-
_t.init(e, t),
|
|
5305
|
+
}), e)), Qn = /* @__PURE__ */ d("_ZodString", (e, t) => {
|
|
5306
|
+
_t.init(e, t), N.init(e, t), e._zod.processJSONSchema = (r, o, s) => Nc(e, r, o);
|
|
5307
5307
|
const n = e._zod.bag;
|
|
5308
|
-
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null,
|
|
5308
|
+
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, ke(e, "_ZodString", {
|
|
5309
5309
|
regex(...r) {
|
|
5310
|
-
return this.check(/* @__PURE__ */
|
|
5310
|
+
return this.check(/* @__PURE__ */ pc(...r));
|
|
5311
5311
|
},
|
|
5312
5312
|
includes(...r) {
|
|
5313
|
-
return this.check(/* @__PURE__ */
|
|
5313
|
+
return this.check(/* @__PURE__ */ gc(...r));
|
|
5314
5314
|
},
|
|
5315
5315
|
startsWith(...r) {
|
|
5316
|
-
return this.check(/* @__PURE__ */
|
|
5316
|
+
return this.check(/* @__PURE__ */ vc(...r));
|
|
5317
5317
|
},
|
|
5318
5318
|
endsWith(...r) {
|
|
5319
|
-
return this.check(/* @__PURE__ */
|
|
5319
|
+
return this.check(/* @__PURE__ */ yc(...r));
|
|
5320
5320
|
},
|
|
5321
5321
|
min(...r) {
|
|
5322
|
-
return this.check(/* @__PURE__ */
|
|
5322
|
+
return this.check(/* @__PURE__ */ Ae(...r));
|
|
5323
5323
|
},
|
|
5324
5324
|
max(...r) {
|
|
5325
|
-
return this.check(/* @__PURE__ */
|
|
5325
|
+
return this.check(/* @__PURE__ */ Wn(...r));
|
|
5326
5326
|
},
|
|
5327
5327
|
length(...r) {
|
|
5328
|
-
return this.check(/* @__PURE__ */
|
|
5328
|
+
return this.check(/* @__PURE__ */ Kn(...r));
|
|
5329
5329
|
},
|
|
5330
5330
|
nonempty(...r) {
|
|
5331
|
-
return this.check(/* @__PURE__ */
|
|
5331
|
+
return this.check(/* @__PURE__ */ Ae(1, ...r));
|
|
5332
5332
|
},
|
|
5333
5333
|
lowercase(r) {
|
|
5334
|
-
return this.check(/* @__PURE__ */
|
|
5334
|
+
return this.check(/* @__PURE__ */ mc(r));
|
|
5335
5335
|
},
|
|
5336
5336
|
uppercase(r) {
|
|
5337
|
-
return this.check(/* @__PURE__ */
|
|
5337
|
+
return this.check(/* @__PURE__ */ _c(r));
|
|
5338
5338
|
},
|
|
5339
5339
|
trim() {
|
|
5340
|
-
return this.check(/* @__PURE__ */
|
|
5340
|
+
return this.check(/* @__PURE__ */ wc());
|
|
5341
5341
|
},
|
|
5342
5342
|
normalize(...r) {
|
|
5343
|
-
return this.check(/* @__PURE__ */
|
|
5343
|
+
return this.check(/* @__PURE__ */ bc(...r));
|
|
5344
5344
|
},
|
|
5345
5345
|
toLowerCase() {
|
|
5346
|
-
return this.check(/* @__PURE__ */
|
|
5346
|
+
return this.check(/* @__PURE__ */ zc());
|
|
5347
5347
|
},
|
|
5348
5348
|
toUpperCase() {
|
|
5349
|
-
return this.check(/* @__PURE__ */
|
|
5349
|
+
return this.check(/* @__PURE__ */ $c());
|
|
5350
5350
|
},
|
|
5351
5351
|
slugify() {
|
|
5352
|
-
return this.check(/* @__PURE__ */
|
|
5352
|
+
return this.check(/* @__PURE__ */ kc());
|
|
5353
5353
|
}
|
|
5354
5354
|
});
|
|
5355
|
-
}),
|
|
5356
|
-
_t.init(e, t),
|
|
5355
|
+
}), gu = /* @__PURE__ */ d("ZodString", (e, t) => {
|
|
5356
|
+
_t.init(e, t), Qn.init(e, t), e.email = (n) => e.check(/* @__PURE__ */ Ma(vu, n)), e.url = (n) => e.check(/* @__PURE__ */ Ja(yu, n)), e.jwt = (n) => e.check(/* @__PURE__ */ oc(Cu, n)), e.emoji = (n) => e.check(/* @__PURE__ */ Va(bu, n)), e.guid = (n) => e.check(/* @__PURE__ */ Bt(en, n)), e.uuid = (n) => e.check(/* @__PURE__ */ Fa(Pe, n)), e.uuidv4 = (n) => e.check(/* @__PURE__ */ Da(Pe, n)), e.uuidv6 = (n) => e.check(/* @__PURE__ */ La(Pe, n)), e.uuidv7 = (n) => e.check(/* @__PURE__ */ Ua(Pe, n)), e.nanoid = (n) => e.check(/* @__PURE__ */ Ha(wu, n)), e.guid = (n) => e.check(/* @__PURE__ */ Bt(en, n)), e.cuid = (n) => e.check(/* @__PURE__ */ qa(zu, n)), e.cuid2 = (n) => e.check(/* @__PURE__ */ Wa($u, n)), e.ulid = (n) => e.check(/* @__PURE__ */ Ka(ku, n)), e.base64 = (n) => e.check(/* @__PURE__ */ tc(Nu, n)), e.base64url = (n) => e.check(/* @__PURE__ */ nc(Tu, n)), e.xid = (n) => e.check(/* @__PURE__ */ Ba(Su, n)), e.ksuid = (n) => e.check(/* @__PURE__ */ Ga(Eu, n)), e.ipv4 = (n) => e.check(/* @__PURE__ */ Ya(Ou, n)), e.ipv6 = (n) => e.check(/* @__PURE__ */ Xa(Iu, n)), e.cidrv4 = (n) => e.check(/* @__PURE__ */ Qa(Pu, n)), e.cidrv6 = (n) => e.check(/* @__PURE__ */ ec(Zu, n)), e.e164 = (n) => e.check(/* @__PURE__ */ rc(Ru, n)), e.datetime = (n) => e.check(Yc(n)), e.date = (n) => e.check(Qc(n)), e.time = (n) => e.check(tu(n)), e.duration = (n) => e.check(ru(n));
|
|
5357
5357
|
});
|
|
5358
5358
|
function M(e) {
|
|
5359
|
-
return /* @__PURE__ */
|
|
5359
|
+
return /* @__PURE__ */ xa(gu, e);
|
|
5360
5360
|
}
|
|
5361
5361
|
const I = /* @__PURE__ */ d("ZodStringFormat", (e, t) => {
|
|
5362
|
-
O.init(e, t),
|
|
5363
|
-
}),
|
|
5364
|
-
Ws.init(e, t), I.init(e, t);
|
|
5365
|
-
}), en = /* @__PURE__ */ d("ZodGUID", (e, t) => {
|
|
5362
|
+
O.init(e, t), Qn.init(e, t);
|
|
5363
|
+
}), vu = /* @__PURE__ */ d("ZodEmail", (e, t) => {
|
|
5366
5364
|
Hs.init(e, t), I.init(e, t);
|
|
5367
|
-
}),
|
|
5365
|
+
}), en = /* @__PURE__ */ d("ZodGUID", (e, t) => {
|
|
5366
|
+
Js.init(e, t), I.init(e, t);
|
|
5367
|
+
}), Pe = /* @__PURE__ */ d("ZodUUID", (e, t) => {
|
|
5368
|
+
Vs.init(e, t), I.init(e, t);
|
|
5369
|
+
}), yu = /* @__PURE__ */ d("ZodURL", (e, t) => {
|
|
5368
5370
|
qs.init(e, t), I.init(e, t);
|
|
5369
|
-
}),
|
|
5371
|
+
}), bu = /* @__PURE__ */ d("ZodEmoji", (e, t) => {
|
|
5372
|
+
Ws.init(e, t), I.init(e, t);
|
|
5373
|
+
}), wu = /* @__PURE__ */ d("ZodNanoID", (e, t) => {
|
|
5370
5374
|
Ks.init(e, t), I.init(e, t);
|
|
5371
|
-
}), zu = /* @__PURE__ */ d("
|
|
5375
|
+
}), zu = /* @__PURE__ */ d("ZodCUID", (e, t) => {
|
|
5372
5376
|
Bs.init(e, t), I.init(e, t);
|
|
5373
|
-
}), $u = /* @__PURE__ */ d("
|
|
5377
|
+
}), $u = /* @__PURE__ */ d("ZodCUID2", (e, t) => {
|
|
5374
5378
|
Gs.init(e, t), I.init(e, t);
|
|
5375
|
-
}), ku = /* @__PURE__ */ d("
|
|
5379
|
+
}), ku = /* @__PURE__ */ d("ZodULID", (e, t) => {
|
|
5376
5380
|
Ys.init(e, t), I.init(e, t);
|
|
5377
|
-
}), Su = /* @__PURE__ */ d("
|
|
5381
|
+
}), Su = /* @__PURE__ */ d("ZodXID", (e, t) => {
|
|
5378
5382
|
Xs.init(e, t), I.init(e, t);
|
|
5379
|
-
}), Eu = /* @__PURE__ */ d("
|
|
5383
|
+
}), Eu = /* @__PURE__ */ d("ZodKSUID", (e, t) => {
|
|
5380
5384
|
Qs.init(e, t), I.init(e, t);
|
|
5381
|
-
}), Ou = /* @__PURE__ */ d("
|
|
5382
|
-
|
|
5383
|
-
}), Iu = /* @__PURE__ */ d("
|
|
5384
|
-
|
|
5385
|
-
}), Pu = /* @__PURE__ */ d("
|
|
5385
|
+
}), Ou = /* @__PURE__ */ d("ZodIPv4", (e, t) => {
|
|
5386
|
+
oa.init(e, t), I.init(e, t);
|
|
5387
|
+
}), Iu = /* @__PURE__ */ d("ZodIPv6", (e, t) => {
|
|
5388
|
+
ia.init(e, t), I.init(e, t);
|
|
5389
|
+
}), Pu = /* @__PURE__ */ d("ZodCIDRv4", (e, t) => {
|
|
5386
5390
|
sa.init(e, t), I.init(e, t);
|
|
5387
|
-
}), Zu = /* @__PURE__ */ d("
|
|
5391
|
+
}), Zu = /* @__PURE__ */ d("ZodCIDRv6", (e, t) => {
|
|
5388
5392
|
aa.init(e, t), I.init(e, t);
|
|
5389
|
-
}),
|
|
5393
|
+
}), Nu = /* @__PURE__ */ d("ZodBase64", (e, t) => {
|
|
5390
5394
|
ca.init(e, t), I.init(e, t);
|
|
5391
|
-
}),
|
|
5392
|
-
ua.init(e, t), I.init(e, t);
|
|
5393
|
-
}), Ru = /* @__PURE__ */ d("ZodBase64", (e, t) => {
|
|
5395
|
+
}), Tu = /* @__PURE__ */ d("ZodBase64URL", (e, t) => {
|
|
5394
5396
|
la.init(e, t), I.init(e, t);
|
|
5395
|
-
}),
|
|
5396
|
-
|
|
5397
|
-
}),
|
|
5397
|
+
}), Ru = /* @__PURE__ */ d("ZodE164", (e, t) => {
|
|
5398
|
+
da.init(e, t), I.init(e, t);
|
|
5399
|
+
}), Cu = /* @__PURE__ */ d("ZodJWT", (e, t) => {
|
|
5398
5400
|
ha.init(e, t), I.init(e, t);
|
|
5399
|
-
}),
|
|
5400
|
-
|
|
5401
|
-
}), rr = /* @__PURE__ */ d("ZodNumber", (e, t) => {
|
|
5402
|
-
Hn.init(e, t), T.init(e, t), e._zod.processJSONSchema = (r, o, s) => Cc(e, r, o), Se(e, "ZodNumber", {
|
|
5401
|
+
}), er = /* @__PURE__ */ d("ZodNumber", (e, t) => {
|
|
5402
|
+
Un.init(e, t), N.init(e, t), e._zod.processJSONSchema = (r, o, s) => Tc(e, r, o), ke(e, "ZodNumber", {
|
|
5403
5403
|
gt(r, o) {
|
|
5404
5404
|
return this.check(/* @__PURE__ */ Yt(r, o));
|
|
5405
5405
|
},
|
|
@@ -5450,46 +5450,46 @@ const I = /* @__PURE__ */ d("ZodStringFormat", (e, t) => {
|
|
|
5450
5450
|
e.minValue = Math.max(n.minimum ?? Number.NEGATIVE_INFINITY, n.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(n.maximum ?? Number.POSITIVE_INFINITY, n.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (n.format ?? "").includes("int") || Number.isSafeInteger(n.multipleOf ?? 0.5), e.isFinite = !0, e.format = n.format ?? null;
|
|
5451
5451
|
});
|
|
5452
5452
|
function G(e) {
|
|
5453
|
-
return /* @__PURE__ */
|
|
5453
|
+
return /* @__PURE__ */ uc(er, e);
|
|
5454
5454
|
}
|
|
5455
|
-
const
|
|
5456
|
-
|
|
5455
|
+
const ju = /* @__PURE__ */ d("ZodNumberFormat", (e, t) => {
|
|
5456
|
+
pa.init(e, t), er.init(e, t);
|
|
5457
5457
|
});
|
|
5458
5458
|
function tn(e) {
|
|
5459
|
-
return /* @__PURE__ */
|
|
5459
|
+
return /* @__PURE__ */ lc(ju, e);
|
|
5460
5460
|
}
|
|
5461
|
-
const
|
|
5462
|
-
|
|
5461
|
+
const Au = /* @__PURE__ */ d("ZodBoolean", (e, t) => {
|
|
5462
|
+
ma.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => Rc(e, n, r);
|
|
5463
5463
|
});
|
|
5464
5464
|
function F(e) {
|
|
5465
|
-
return /* @__PURE__ */
|
|
5465
|
+
return /* @__PURE__ */ dc(Au, e);
|
|
5466
5466
|
}
|
|
5467
|
-
const
|
|
5468
|
-
|
|
5467
|
+
const xu = /* @__PURE__ */ d("ZodUnknown", (e, t) => {
|
|
5468
|
+
_a.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => {
|
|
5469
5469
|
};
|
|
5470
5470
|
});
|
|
5471
5471
|
function st() {
|
|
5472
|
-
return /* @__PURE__ */
|
|
5472
|
+
return /* @__PURE__ */ fc(xu);
|
|
5473
5473
|
}
|
|
5474
|
-
const
|
|
5475
|
-
|
|
5474
|
+
const Mu = /* @__PURE__ */ d("ZodNever", (e, t) => {
|
|
5475
|
+
ga.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => Cc(e, n, r);
|
|
5476
5476
|
});
|
|
5477
|
-
function
|
|
5478
|
-
return /* @__PURE__ */
|
|
5477
|
+
function Fu(e) {
|
|
5478
|
+
return /* @__PURE__ */ hc(Mu, e);
|
|
5479
5479
|
}
|
|
5480
|
-
const
|
|
5481
|
-
|
|
5480
|
+
const Du = /* @__PURE__ */ d("ZodArray", (e, t) => {
|
|
5481
|
+
va.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => Fc(e, n, r, o), e.element = t.element, ke(e, "ZodArray", {
|
|
5482
5482
|
min(n, r) {
|
|
5483
|
-
return this.check(/* @__PURE__ */
|
|
5483
|
+
return this.check(/* @__PURE__ */ Ae(n, r));
|
|
5484
5484
|
},
|
|
5485
5485
|
nonempty(n) {
|
|
5486
|
-
return this.check(/* @__PURE__ */
|
|
5486
|
+
return this.check(/* @__PURE__ */ Ae(1, n));
|
|
5487
5487
|
},
|
|
5488
5488
|
max(n, r) {
|
|
5489
|
-
return this.check(/* @__PURE__ */
|
|
5489
|
+
return this.check(/* @__PURE__ */ Wn(n, r));
|
|
5490
5490
|
},
|
|
5491
5491
|
length(n, r) {
|
|
5492
|
-
return this.check(/* @__PURE__ */
|
|
5492
|
+
return this.check(/* @__PURE__ */ Kn(n, r));
|
|
5493
5493
|
},
|
|
5494
5494
|
unwrap() {
|
|
5495
5495
|
return this.element;
|
|
@@ -5497,10 +5497,10 @@ const Uu = /* @__PURE__ */ d("ZodArray", (e, t) => {
|
|
|
5497
5497
|
});
|
|
5498
5498
|
});
|
|
5499
5499
|
function de(e, t) {
|
|
5500
|
-
return /* @__PURE__ */
|
|
5500
|
+
return /* @__PURE__ */ Sc(Du, e, t);
|
|
5501
5501
|
}
|
|
5502
|
-
const
|
|
5503
|
-
|
|
5502
|
+
const Lu = /* @__PURE__ */ d("ZodObject", (e, t) => {
|
|
5503
|
+
ba.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => Dc(e, n, r, o), z(e, "shape", () => t.shape), ke(e, "ZodObject", {
|
|
5504
5504
|
keyof() {
|
|
5505
5505
|
return gt(Object.keys(this._zod.def.shape));
|
|
5506
5506
|
},
|
|
@@ -5525,7 +5525,7 @@ const Ju = /* @__PURE__ */ d("ZodObject", (e, t) => {
|
|
|
5525
5525
|
strict() {
|
|
5526
5526
|
return this.clone({
|
|
5527
5527
|
...this._zod.def,
|
|
5528
|
-
catchall:
|
|
5528
|
+
catchall: Fu()
|
|
5529
5529
|
});
|
|
5530
5530
|
},
|
|
5531
5531
|
strip() {
|
|
@@ -5535,25 +5535,25 @@ const Ju = /* @__PURE__ */ d("ZodObject", (e, t) => {
|
|
|
5535
5535
|
});
|
|
5536
5536
|
},
|
|
5537
5537
|
extend(n) {
|
|
5538
|
-
return
|
|
5538
|
+
return Mi(this, n);
|
|
5539
5539
|
},
|
|
5540
5540
|
safeExtend(n) {
|
|
5541
|
-
return
|
|
5541
|
+
return Fi(this, n);
|
|
5542
5542
|
},
|
|
5543
5543
|
merge(n) {
|
|
5544
|
-
return
|
|
5544
|
+
return Di(this, n);
|
|
5545
5545
|
},
|
|
5546
5546
|
pick(n) {
|
|
5547
|
-
return
|
|
5547
|
+
return Ai(this, n);
|
|
5548
5548
|
},
|
|
5549
5549
|
omit(n) {
|
|
5550
|
-
return
|
|
5550
|
+
return xi(this, n);
|
|
5551
5551
|
},
|
|
5552
5552
|
partial(...n) {
|
|
5553
|
-
return
|
|
5553
|
+
return Li(nr, this, n[0]);
|
|
5554
5554
|
},
|
|
5555
5555
|
required(...n) {
|
|
5556
|
-
return
|
|
5556
|
+
return Ui(rr, this, n[0]);
|
|
5557
5557
|
}
|
|
5558
5558
|
});
|
|
5559
5559
|
});
|
|
@@ -5563,41 +5563,41 @@ function y(e, t) {
|
|
|
5563
5563
|
shape: e ?? {},
|
|
5564
5564
|
...m(t)
|
|
5565
5565
|
};
|
|
5566
|
-
return new
|
|
5566
|
+
return new Lu(n);
|
|
5567
5567
|
}
|
|
5568
|
-
const
|
|
5569
|
-
|
|
5568
|
+
const tr = /* @__PURE__ */ d("ZodUnion", (e, t) => {
|
|
5569
|
+
Hn.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => Lc(e, n, r, o), e.options = t.options;
|
|
5570
5570
|
});
|
|
5571
|
-
function
|
|
5572
|
-
return new
|
|
5571
|
+
function Uu(e, t) {
|
|
5572
|
+
return new tr({
|
|
5573
5573
|
type: "union",
|
|
5574
5574
|
options: e,
|
|
5575
5575
|
...m(t)
|
|
5576
5576
|
});
|
|
5577
5577
|
}
|
|
5578
|
-
const
|
|
5579
|
-
|
|
5578
|
+
const Ju = /* @__PURE__ */ d("ZodDiscriminatedUnion", (e, t) => {
|
|
5579
|
+
tr.init(e, t), wa.init(e, t);
|
|
5580
5580
|
});
|
|
5581
|
-
function
|
|
5582
|
-
return new
|
|
5581
|
+
function Vu(e, t, n) {
|
|
5582
|
+
return new Ju({
|
|
5583
5583
|
type: "union",
|
|
5584
5584
|
options: t,
|
|
5585
5585
|
discriminator: e,
|
|
5586
5586
|
...m(n)
|
|
5587
5587
|
});
|
|
5588
5588
|
}
|
|
5589
|
-
const
|
|
5590
|
-
|
|
5589
|
+
const Hu = /* @__PURE__ */ d("ZodIntersection", (e, t) => {
|
|
5590
|
+
za.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => Uc(e, n, r, o);
|
|
5591
5591
|
});
|
|
5592
|
-
function
|
|
5593
|
-
return new
|
|
5592
|
+
function qu(e, t) {
|
|
5593
|
+
return new Hu({
|
|
5594
5594
|
type: "intersection",
|
|
5595
5595
|
left: e,
|
|
5596
5596
|
right: t
|
|
5597
5597
|
});
|
|
5598
5598
|
}
|
|
5599
5599
|
const at = /* @__PURE__ */ d("ZodEnum", (e, t) => {
|
|
5600
|
-
|
|
5600
|
+
$a.init(e, t), N.init(e, t), e._zod.processJSONSchema = (r, o, s) => jc(e, r, o), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
5601
5601
|
const n = new Set(Object.keys(t.entries));
|
|
5602
5602
|
e.extract = (r, o) => {
|
|
5603
5603
|
const s = {};
|
|
@@ -5629,178 +5629,178 @@ function gt(e, t) {
|
|
|
5629
5629
|
...m(t)
|
|
5630
5630
|
});
|
|
5631
5631
|
}
|
|
5632
|
-
const
|
|
5633
|
-
|
|
5632
|
+
const Wu = /* @__PURE__ */ d("ZodLiteral", (e, t) => {
|
|
5633
|
+
ka.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ac(e, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", { get() {
|
|
5634
5634
|
if (t.values.length > 1) throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
5635
5635
|
return t.values[0];
|
|
5636
5636
|
} });
|
|
5637
5637
|
});
|
|
5638
|
-
function
|
|
5639
|
-
return new
|
|
5638
|
+
function Me(e, t) {
|
|
5639
|
+
return new Wu({
|
|
5640
5640
|
type: "literal",
|
|
5641
5641
|
values: Array.isArray(e) ? e : [e],
|
|
5642
5642
|
...m(t)
|
|
5643
5643
|
});
|
|
5644
5644
|
}
|
|
5645
|
-
const
|
|
5646
|
-
|
|
5647
|
-
if (r.direction === "backward") throw new
|
|
5645
|
+
const Ku = /* @__PURE__ */ d("ZodTransform", (e, t) => {
|
|
5646
|
+
Sa.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => Mc(e, n), e._zod.parse = (n, r) => {
|
|
5647
|
+
if (r.direction === "backward") throw new On(e.constructor.name);
|
|
5648
5648
|
n.addIssue = (s) => {
|
|
5649
|
-
if (typeof s == "string") n.issues.push(
|
|
5649
|
+
if (typeof s == "string") n.issues.push(we(s, n.value, t));
|
|
5650
5650
|
else {
|
|
5651
5651
|
const i = s;
|
|
5652
|
-
i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), i.input ?? (i.input = n.value), i.inst ?? (i.inst = e), n.issues.push(
|
|
5652
|
+
i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), i.input ?? (i.input = n.value), i.inst ?? (i.inst = e), n.issues.push(we(i));
|
|
5653
5653
|
}
|
|
5654
5654
|
};
|
|
5655
5655
|
const o = t.transform(n.value, n);
|
|
5656
5656
|
return o instanceof Promise ? o.then((s) => (n.value = s, n.fallback = !0, n)) : (n.value = o, n.fallback = !0, n);
|
|
5657
5657
|
};
|
|
5658
5658
|
});
|
|
5659
|
-
function
|
|
5660
|
-
return new
|
|
5659
|
+
function Bu(e) {
|
|
5660
|
+
return new Ku({
|
|
5661
5661
|
type: "transform",
|
|
5662
5662
|
transform: e
|
|
5663
5663
|
});
|
|
5664
5664
|
}
|
|
5665
|
-
const
|
|
5666
|
-
|
|
5665
|
+
const nr = /* @__PURE__ */ d("ZodOptional", (e, t) => {
|
|
5666
|
+
qn.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => Xn(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
5667
5667
|
});
|
|
5668
5668
|
function nn(e) {
|
|
5669
|
-
return new
|
|
5669
|
+
return new nr({
|
|
5670
5670
|
type: "optional",
|
|
5671
5671
|
innerType: e
|
|
5672
5672
|
});
|
|
5673
5673
|
}
|
|
5674
|
-
const
|
|
5675
|
-
|
|
5674
|
+
const Gu = /* @__PURE__ */ d("ZodExactOptional", (e, t) => {
|
|
5675
|
+
Ea.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => Xn(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
5676
5676
|
});
|
|
5677
|
-
function
|
|
5678
|
-
return new
|
|
5677
|
+
function Yu(e) {
|
|
5678
|
+
return new Gu({
|
|
5679
5679
|
type: "optional",
|
|
5680
5680
|
innerType: e
|
|
5681
5681
|
});
|
|
5682
5682
|
}
|
|
5683
|
-
const
|
|
5684
|
-
|
|
5683
|
+
const Xu = /* @__PURE__ */ d("ZodNullable", (e, t) => {
|
|
5684
|
+
Oa.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => Jc(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
5685
5685
|
});
|
|
5686
5686
|
function rn(e) {
|
|
5687
|
-
return new
|
|
5687
|
+
return new Xu({
|
|
5688
5688
|
type: "nullable",
|
|
5689
5689
|
innerType: e
|
|
5690
5690
|
});
|
|
5691
5691
|
}
|
|
5692
|
-
const
|
|
5693
|
-
|
|
5692
|
+
const Qu = /* @__PURE__ */ d("ZodDefault", (e, t) => {
|
|
5693
|
+
Ia.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => Hc(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
5694
5694
|
});
|
|
5695
|
-
function
|
|
5696
|
-
return new
|
|
5695
|
+
function el(e, t) {
|
|
5696
|
+
return new Qu({
|
|
5697
5697
|
type: "default",
|
|
5698
5698
|
innerType: e,
|
|
5699
5699
|
get defaultValue() {
|
|
5700
|
-
return typeof t == "function" ? t() :
|
|
5700
|
+
return typeof t == "function" ? t() : Zn(t);
|
|
5701
5701
|
}
|
|
5702
5702
|
});
|
|
5703
5703
|
}
|
|
5704
|
-
const
|
|
5705
|
-
|
|
5704
|
+
const tl = /* @__PURE__ */ d("ZodPrefault", (e, t) => {
|
|
5705
|
+
Pa.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => qc(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
5706
5706
|
});
|
|
5707
|
-
function
|
|
5708
|
-
return new
|
|
5707
|
+
function nl(e, t) {
|
|
5708
|
+
return new tl({
|
|
5709
5709
|
type: "prefault",
|
|
5710
5710
|
innerType: e,
|
|
5711
5711
|
get defaultValue() {
|
|
5712
|
-
return typeof t == "function" ? t() :
|
|
5712
|
+
return typeof t == "function" ? t() : Zn(t);
|
|
5713
5713
|
}
|
|
5714
5714
|
});
|
|
5715
5715
|
}
|
|
5716
|
-
const
|
|
5717
|
-
|
|
5716
|
+
const rr = /* @__PURE__ */ d("ZodNonOptional", (e, t) => {
|
|
5717
|
+
Za.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => Vc(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
5718
5718
|
});
|
|
5719
|
-
function
|
|
5720
|
-
return new
|
|
5719
|
+
function rl(e, t) {
|
|
5720
|
+
return new rr({
|
|
5721
5721
|
type: "nonoptional",
|
|
5722
5722
|
innerType: e,
|
|
5723
5723
|
...m(t)
|
|
5724
5724
|
});
|
|
5725
5725
|
}
|
|
5726
|
-
const
|
|
5727
|
-
|
|
5726
|
+
const ol = /* @__PURE__ */ d("ZodCatch", (e, t) => {
|
|
5727
|
+
Na.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => Wc(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
5728
5728
|
});
|
|
5729
|
-
function
|
|
5730
|
-
return new
|
|
5729
|
+
function il(e, t) {
|
|
5730
|
+
return new ol({
|
|
5731
5731
|
type: "catch",
|
|
5732
5732
|
innerType: e,
|
|
5733
5733
|
catchValue: typeof t == "function" ? t : () => t
|
|
5734
5734
|
});
|
|
5735
5735
|
}
|
|
5736
|
-
const
|
|
5737
|
-
|
|
5736
|
+
const sl = /* @__PURE__ */ d("ZodPipe", (e, t) => {
|
|
5737
|
+
Ta.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => Kc(e, n, r, o), e.in = t.in, e.out = t.out;
|
|
5738
5738
|
});
|
|
5739
5739
|
function on(e, t) {
|
|
5740
|
-
return new
|
|
5740
|
+
return new sl({
|
|
5741
5741
|
type: "pipe",
|
|
5742
5742
|
in: e,
|
|
5743
5743
|
out: t
|
|
5744
5744
|
});
|
|
5745
5745
|
}
|
|
5746
|
-
const
|
|
5747
|
-
|
|
5746
|
+
const al = /* @__PURE__ */ d("ZodReadonly", (e, t) => {
|
|
5747
|
+
Ra.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => Bc(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
5748
5748
|
});
|
|
5749
|
-
function
|
|
5750
|
-
return new
|
|
5749
|
+
function cl(e) {
|
|
5750
|
+
return new al({
|
|
5751
5751
|
type: "readonly",
|
|
5752
5752
|
innerType: e
|
|
5753
5753
|
});
|
|
5754
5754
|
}
|
|
5755
|
-
const
|
|
5756
|
-
|
|
5755
|
+
const ul = /* @__PURE__ */ d("ZodCustom", (e, t) => {
|
|
5756
|
+
Ca.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => xc(e, n);
|
|
5757
5757
|
});
|
|
5758
|
-
function
|
|
5759
|
-
return /* @__PURE__ */
|
|
5758
|
+
function ll(e, t = {}) {
|
|
5759
|
+
return /* @__PURE__ */ Ec(ul, e, t);
|
|
5760
5760
|
}
|
|
5761
|
-
function
|
|
5762
|
-
return /* @__PURE__ */
|
|
5761
|
+
function dl(e, t) {
|
|
5762
|
+
return /* @__PURE__ */ Oc(e, t);
|
|
5763
5763
|
}
|
|
5764
|
-
const
|
|
5764
|
+
const Fe = st(), fl = y({
|
|
5765
5765
|
supportsContentEdits: F().optional(),
|
|
5766
5766
|
supportsOptions: F().optional()
|
|
5767
|
-
}),
|
|
5767
|
+
}), hl = y({
|
|
5768
5768
|
supportsContentEdits: F().optional(),
|
|
5769
5769
|
supportsOptions: F().optional(),
|
|
5770
5770
|
supportsForceUpdate: F().optional()
|
|
5771
|
-
}),
|
|
5771
|
+
}), pl = y({
|
|
5772
5772
|
offset: G().int().nonnegative(),
|
|
5773
5773
|
length: G().int().nonnegative(),
|
|
5774
5774
|
newText: M()
|
|
5775
|
-
}),
|
|
5776
|
-
kind:
|
|
5775
|
+
}), or = Vu("kind", [y({
|
|
5776
|
+
kind: Me("replace"),
|
|
5777
5777
|
path: de(M()),
|
|
5778
|
-
newValue:
|
|
5778
|
+
newValue: Fe
|
|
5779
5779
|
}), y({
|
|
5780
|
-
kind:
|
|
5780
|
+
kind: Me("stringEdits"),
|
|
5781
5781
|
path: de(M()),
|
|
5782
|
-
stringEdits: de(
|
|
5783
|
-
})]),
|
|
5784
|
-
content:
|
|
5785
|
-
options:
|
|
5782
|
+
stringEdits: de(pl)
|
|
5783
|
+
})]), ml = y({
|
|
5784
|
+
content: Fe.optional(),
|
|
5785
|
+
options: Fe.optional(),
|
|
5786
5786
|
readOnly: F().optional(),
|
|
5787
5787
|
serverRevision: G().int().nonnegative().optional(),
|
|
5788
5788
|
acknowledgedClientRevision: G().int().nonnegative().optional(),
|
|
5789
5789
|
force: F().optional()
|
|
5790
|
-
}),
|
|
5790
|
+
}), _l = K({
|
|
5791
5791
|
id: "web-editor-host",
|
|
5792
5792
|
description: "Methods the host exposes to the editor (web-editor/0.12)."
|
|
5793
5793
|
}, {
|
|
5794
|
-
initialized:
|
|
5795
|
-
protocolVersion:
|
|
5794
|
+
initialized: T(y({
|
|
5795
|
+
protocolVersion: Me("web-editor/0.12"),
|
|
5796
5796
|
contentType: gt(["text", "json"]),
|
|
5797
|
-
capabilities:
|
|
5797
|
+
capabilities: fl.optional()
|
|
5798
5798
|
}), y({
|
|
5799
|
-
protocolVersion:
|
|
5800
|
-
capabilities:
|
|
5799
|
+
protocolVersion: Me("web-editor-host/0.12"),
|
|
5800
|
+
capabilities: hl.optional()
|
|
5801
5801
|
})),
|
|
5802
5802
|
applyContentEdit: Q(y({
|
|
5803
|
-
edits: de(
|
|
5803
|
+
edits: de(or),
|
|
5804
5804
|
clientRevision: G().int().nonnegative(),
|
|
5805
5805
|
basedOnServerRevision: G().int().nonnegative()
|
|
5806
5806
|
})),
|
|
@@ -5810,18 +5810,18 @@ const De = st(), pl = y({
|
|
|
5810
5810
|
* uses this to size the frame once the guest has measured itself.
|
|
5811
5811
|
*/
|
|
5812
5812
|
reportSize: Q(y({ height: G().nonnegative() }))
|
|
5813
|
-
}),
|
|
5813
|
+
}), gl = K({
|
|
5814
5814
|
id: "web-editor",
|
|
5815
5815
|
description: "Methods the editor exposes to the host (web-editor/0.12)."
|
|
5816
5816
|
}, {
|
|
5817
|
-
update: Q(
|
|
5817
|
+
update: Q(ml),
|
|
5818
5818
|
applyContentEdits: Q(y({
|
|
5819
|
-
edits: de(
|
|
5819
|
+
edits: de(or),
|
|
5820
5820
|
serverRevision: G().int().nonnegative(),
|
|
5821
5821
|
acknowledgedClientRevision: G().int().nonnegative()
|
|
5822
5822
|
})),
|
|
5823
|
-
getContentSchema:
|
|
5824
|
-
}),
|
|
5823
|
+
getContentSchema: T(y({}), y({ schema: Fe }))
|
|
5824
|
+
}), Ze = y({
|
|
5825
5825
|
registered: F(),
|
|
5826
5826
|
isDefault: F()
|
|
5827
5827
|
}), vt = y({
|
|
@@ -5829,29 +5829,29 @@ const De = st(), pl = y({
|
|
|
5829
5829
|
appId: M(),
|
|
5830
5830
|
serviceId: M(),
|
|
5831
5831
|
serviceIdPrefix: M()
|
|
5832
|
-
}),
|
|
5832
|
+
}), vl = vt.extend({ parentAppId: M() });
|
|
5833
5833
|
K({
|
|
5834
5834
|
id: "vscode-app-host",
|
|
5835
5835
|
description: "Methods an app `.vscode-app.html` exposes to the host (vscode-app-host/0.1)."
|
|
5836
5836
|
}, {
|
|
5837
|
-
getContext:
|
|
5837
|
+
getContext: T(y({}), y({
|
|
5838
5838
|
dataDocument: y({ contentType: gt(["text", "json"]) }).nullable(),
|
|
5839
|
-
embedding:
|
|
5839
|
+
embedding: vl.nullable()
|
|
5840
5840
|
})),
|
|
5841
5841
|
/**
|
|
5842
5842
|
* Load a relative local app as an initially-hidden, independently
|
|
5843
5843
|
* sandboxed child. Resolves after the child signals that its API is ready.
|
|
5844
5844
|
*/
|
|
5845
|
-
loadApp:
|
|
5845
|
+
loadApp: T(y({ path: M() }), vt).withStream({ server: y({}) }),
|
|
5846
5846
|
/** Unload a direct child owned by this app runtime. */
|
|
5847
|
-
unloadApp:
|
|
5847
|
+
unloadApp: T(y({ handleId: M() }), y({})),
|
|
5848
5848
|
/** Signal that this embedded app has registered the API its parent calls. */
|
|
5849
5849
|
embeddedReady: Q(y({})),
|
|
5850
5850
|
/**
|
|
5851
5851
|
* Show or hide this embedded app's trusted-shell-owned modal surface.
|
|
5852
5852
|
* Only embedded runtimes may call this method.
|
|
5853
5853
|
*/
|
|
5854
|
-
setModalVisibility:
|
|
5854
|
+
setModalVisibility: T(y({
|
|
5855
5855
|
visible: F(),
|
|
5856
5856
|
presentation: y({ title: M().optional() }).optional()
|
|
5857
5857
|
}), y({})),
|
|
@@ -5867,9 +5867,9 @@ K({
|
|
|
5867
5867
|
* `hasWorkspace` indicates whether a workspace is open. Changing any of
|
|
5868
5868
|
* this is done via {@link configureEditorAssociation} (host-rendered).
|
|
5869
5869
|
*/
|
|
5870
|
-
getEditorRegistration:
|
|
5871
|
-
global:
|
|
5872
|
-
workspace:
|
|
5870
|
+
getEditorRegistration: T(y({ extension: M() }), y({
|
|
5871
|
+
global: Ze,
|
|
5872
|
+
workspace: Ze,
|
|
5873
5873
|
hasWorkspace: F()
|
|
5874
5874
|
})),
|
|
5875
5875
|
/**
|
|
@@ -5885,12 +5885,12 @@ K({
|
|
|
5885
5885
|
* `false`. Resolves once the dialog is dismissed, reporting the final
|
|
5886
5886
|
* per-scope registration and whether anything `changed`.
|
|
5887
5887
|
*/
|
|
5888
|
-
configureEditorAssociation:
|
|
5888
|
+
configureEditorAssociation: T(y({
|
|
5889
5889
|
extension: M(),
|
|
5890
5890
|
dismissable: F().optional()
|
|
5891
5891
|
}), y({
|
|
5892
|
-
global:
|
|
5893
|
-
workspace:
|
|
5892
|
+
global: Ze,
|
|
5893
|
+
workspace: Ze,
|
|
5894
5894
|
hasWorkspace: F(),
|
|
5895
5895
|
changed: F()
|
|
5896
5896
|
}))
|
|
@@ -5906,18 +5906,18 @@ function sn(e, t) {
|
|
|
5906
5906
|
let n = e;
|
|
5907
5907
|
for (const r of t) if (r.kind === "replace") n = an(n, r.path, r.newValue);
|
|
5908
5908
|
else {
|
|
5909
|
-
const o =
|
|
5909
|
+
const o = bl(n, r.path);
|
|
5910
5910
|
if (typeof o != "string") throw new Error(`applyContentEdits: stringEdits at path [${r.path.join(", ")}] requires a string, got ${typeof o}`);
|
|
5911
|
-
n = an(n, r.path,
|
|
5911
|
+
n = an(n, r.path, yl(o, r.stringEdits));
|
|
5912
5912
|
}
|
|
5913
5913
|
return n;
|
|
5914
5914
|
}
|
|
5915
|
-
function
|
|
5915
|
+
function yl(e, t) {
|
|
5916
5916
|
let n = e;
|
|
5917
5917
|
for (const r of t) n = n.slice(0, r.offset) + r.newText + n.slice(r.offset + r.length);
|
|
5918
5918
|
return n;
|
|
5919
5919
|
}
|
|
5920
|
-
function
|
|
5920
|
+
function bl(e, t) {
|
|
5921
5921
|
let n = e;
|
|
5922
5922
|
for (const r of t) {
|
|
5923
5923
|
if (n == null) return;
|
|
@@ -5963,7 +5963,7 @@ var Ye = class {
|
|
|
5963
5963
|
dispose() {
|
|
5964
5964
|
this._listeners.clear();
|
|
5965
5965
|
}
|
|
5966
|
-
},
|
|
5966
|
+
}, wl = class {
|
|
5967
5967
|
_connection;
|
|
5968
5968
|
_editor;
|
|
5969
5969
|
_contentType;
|
|
@@ -5983,7 +5983,7 @@ var Ye = class {
|
|
|
5983
5983
|
_onDidReportSize = new Ye();
|
|
5984
5984
|
onDidReportSize = this._onDidReportSize.event;
|
|
5985
5985
|
constructor(e) {
|
|
5986
|
-
this._connection = e.connection, this._contentType = e.contentType ?? "text", this._text = e.initialText ?? "", this._readOnly = e.readOnly ?? !1, this._jsonFormat = e.jsonFormat ?? {}, this._onError = e.onError ?? ((t, n) => console.error("WebEditorHost:", t, n)), this._capabilities = e.capabilities ?? { supportsForceUpdate: !0 }, this._editor = this._connection.get(
|
|
5986
|
+
this._connection = e.connection, this._contentType = e.contentType ?? "text", this._text = e.initialText ?? "", this._readOnly = e.readOnly ?? !1, this._jsonFormat = e.jsonFormat ?? {}, this._onError = e.onError ?? ((t, n) => console.error("WebEditorHost:", t, n)), this._capabilities = e.capabilities ?? { supportsForceUpdate: !0 }, this._editor = this._connection.get(gl), this._connection.register(_l, {
|
|
5987
5987
|
initialized: (t) => (t.contentType !== this._contentType && this._onError(`Editor contentType "${t.contentType}" does not match host "${this._contentType}"`), this._editorCapabilities = t.capabilities, this._editorInitialized = !0, this._serverRevision = 0, this._acknowledgedClientRevision = 0, this._pushFullUpdate(), this._onDidInitialize.fire({ capabilities: t.capabilities }), {
|
|
5988
5988
|
protocolVersion: "web-editor-host/0.12",
|
|
5989
5989
|
capabilities: this._capabilities
|
|
@@ -6096,7 +6096,7 @@ var Ye = class {
|
|
|
6096
6096
|
this._acknowledgedClientRevision = Math.max(this._acknowledgedClientRevision, e), this._pushFullUpdate(!0);
|
|
6097
6097
|
}
|
|
6098
6098
|
};
|
|
6099
|
-
function
|
|
6099
|
+
function zl(e, t) {
|
|
6100
6100
|
const n = e.filter((s) => "language" in s.selector && s.selector.language === t);
|
|
6101
6101
|
if (n.length > 0)
|
|
6102
6102
|
return n.length === 1 ? { kind: "match", provider: n[0] } : { kind: "ambiguous", providers: n };
|
|
@@ -6110,7 +6110,7 @@ function $l(e, t) {
|
|
|
6110
6110
|
if (o.length !== 0)
|
|
6111
6111
|
return o.length === 1 ? { kind: "match", provider: o[0] } : { kind: "ambiguous", providers: o };
|
|
6112
6112
|
}
|
|
6113
|
-
const
|
|
6113
|
+
const $l = `
|
|
6114
6114
|
:root { color-scheme: light dark; }
|
|
6115
6115
|
html, body { margin: 0; padding: 0; background: transparent; }
|
|
6116
6116
|
body {
|
|
@@ -6119,43 +6119,9 @@ const kl = `
|
|
|
6119
6119
|
color: var(--vscode-foreground, #1e1e1e);
|
|
6120
6120
|
box-sizing: border-box;
|
|
6121
6121
|
}
|
|
6122
|
-
`,
|
|
6123
|
-
|
|
6124
|
-
|
|
6125
|
-
text-transform: uppercase;
|
|
6126
|
-
letter-spacing: .06em;
|
|
6127
|
-
opacity: .6;
|
|
6128
|
-
margin-bottom: 8px;
|
|
6129
|
-
}
|
|
6130
|
-
.fields { display: flex; flex-direction: column; gap: 6px; }
|
|
6131
|
-
.field { display: grid; grid-template-columns: 80px 1fr; align-items: center; gap: 8px; }
|
|
6132
|
-
.field-name { opacity: .7; }
|
|
6133
|
-
.field-input {
|
|
6134
|
-
font: inherit;
|
|
6135
|
-
padding: 4px 8px;
|
|
6136
|
-
border: 1px solid var(--vscode-input-border, rgba(128,128,128,.4));
|
|
6137
|
-
border-radius: 4px;
|
|
6138
|
-
background: var(--vscode-input-background, rgba(128,128,128,.08));
|
|
6139
|
-
color: var(--vscode-input-foreground, inherit);
|
|
6140
|
-
}
|
|
6141
|
-
.field-input:focus {
|
|
6142
|
-
outline: 1px solid var(--vscode-focusBorder, #007fd4);
|
|
6143
|
-
outline-offset: -1px;
|
|
6144
|
-
}
|
|
6145
|
-
`, he = "vscode-markdown-editor::control", ur = 1e4;
|
|
6146
|
-
function El(e) {
|
|
6147
|
-
if (e.html !== void 0)
|
|
6148
|
-
return e.html;
|
|
6149
|
-
if (e.bundleJs !== void 0) {
|
|
6150
|
-
const t = e.bundleJs.replace(/<\/(script)/gi, "<\\/$1");
|
|
6151
|
-
return `<!doctype html><html><head><meta charset="utf-8"><style>${Sl.replace(/<\/style/gi, "<\\/style")}</style></head><body>
|
|
6152
|
-
<div class="sample-editor-header">Sample web editor (iframe)</div>
|
|
6153
|
-
<div id="app"></div><script>${t}<\/script></body></html>`;
|
|
6154
|
-
}
|
|
6155
|
-
throw new Error("IframeEmbeddedEditorOptions requires html");
|
|
6156
|
-
}
|
|
6157
|
-
function lr(e, t, n) {
|
|
6158
|
-
const r = kl.replace(/<\/style/gi, "<\\/style"), o = (t ?? "").replace(/<\/style/gi, "<\\/style"), s = n ? ` nonce="${Ol(n)}"` : "", i = `<style data-vscode-markdown-editor-base>${r}</style><style data-vscode-markdown-editor-theme>${o}</style><script${s}>(function(){var t=document.currentScript.previousElementSibling;var sendSize=function(){parent.postMessage({type:${JSON.stringify(he)},height:Math.max(document.documentElement.scrollHeight,document.body?document.body.scrollHeight:0)},"*");};addEventListener("message",function(e){if(e.source!==parent)return;var d=e.data;if(d&&d.type===${JSON.stringify(he)}&&typeof d.themeCss==="string")t.textContent=d.themeCss;});addEventListener("load",sendSize);new ResizeObserver(sendSize).observe(document.documentElement);})();<\/script>`, a = n ? e.replace(/<script\b(?![^>]*\bnonce\s*=)/gi, `<script${s}`) : e, c = a.search(/<\/head\s*>/i);
|
|
6122
|
+
`, De = "vscode-markdown-editor::control", kl = 1e4;
|
|
6123
|
+
function Sl(e, t, n) {
|
|
6124
|
+
const r = $l.replace(/<\/style/gi, "<\\/style"), o = (t ?? "").replace(/<\/style/gi, "<\\/style"), s = n ? ` nonce="${El(n)}"` : "", i = `<style data-vscode-markdown-editor-base>${r}</style><style data-vscode-markdown-editor-theme>${o}</style><script${s}>(function(){var t=document.currentScript.previousElementSibling;var sendSize=function(){parent.postMessage({type:${JSON.stringify(De)},height:Math.max(document.documentElement.scrollHeight,document.body?document.body.scrollHeight:0)},"*");};addEventListener("message",function(e){if(e.source!==parent)return;var d=e.data;if(d&&d.type===${JSON.stringify(De)}&&typeof d.themeCss==="string")t.textContent=d.themeCss;});addEventListener("load",sendSize);new ResizeObserver(sendSize).observe(document.documentElement);})();<\/script>`, a = n ? e.replace(/<script\b(?![^>]*\bnonce\s*=)/gi, `<script${s}`) : e, c = a.search(/<\/head\s*>/i);
|
|
6159
6125
|
if (c !== -1)
|
|
6160
6126
|
return a.slice(0, c) + i + a.slice(c);
|
|
6161
6127
|
const u = a.match(/<html[^>]*>/i);
|
|
@@ -6165,88 +6131,10 @@ function lr(e, t, n) {
|
|
|
6165
6131
|
}
|
|
6166
6132
|
return `<!doctype html><html><head>${i}</head><body>${a}</body></html>`;
|
|
6167
6133
|
}
|
|
6168
|
-
function
|
|
6134
|
+
function El(e) {
|
|
6169
6135
|
return e.replaceAll("&", "&").replaceAll('"', """);
|
|
6170
6136
|
}
|
|
6171
|
-
class
|
|
6172
|
-
constructor(t, n) {
|
|
6173
|
-
this._options = t, this._lastContent = n, this.estimateHeight = t.estimateHeight;
|
|
6174
|
-
const r = document.createElement("div");
|
|
6175
|
-
r.style.width = "100%";
|
|
6176
|
-
const o = document.createElement("iframe");
|
|
6177
|
-
o.setAttribute("sandbox", "allow-scripts"), o.style.width = "100%", o.style.border = "none", o.style.display = "block", o.style.background = "transparent", o.style.height = "0px", r.appendChild(o), this.element = r, this._iframe = o, this._onWindowMessage = (s) => {
|
|
6178
|
-
if (s.source !== this._iframe.contentWindow)
|
|
6179
|
-
return;
|
|
6180
|
-
const i = s.data;
|
|
6181
|
-
i?.type !== he || typeof i.height != "number" || !Number.isFinite(i.height) || this._applyHeight(i.height);
|
|
6182
|
-
}, window.addEventListener("message", this._onWindowMessage), typeof this._options.themeCss == "function" && (this._themeObserver = new MutationObserver(() => this._postTheme()), this._themeObserver.observe(document.documentElement, { attributes: !0, attributeFilter: ["style", "class"] }), this._themeObserver.observe(document.body, { attributes: !0, attributeFilter: ["style", "class"] })), queueMicrotask(() => this._trySetup());
|
|
6183
|
-
}
|
|
6184
|
-
element;
|
|
6185
|
-
onEdit;
|
|
6186
|
-
estimateHeight;
|
|
6187
|
-
_iframe;
|
|
6188
|
-
_host;
|
|
6189
|
-
_transport;
|
|
6190
|
-
_disposed = !1;
|
|
6191
|
-
_readOnly = !1;
|
|
6192
|
-
_onWindowMessage;
|
|
6193
|
-
_themeObserver;
|
|
6194
|
-
/** The text the host currently holds — used to build whole-content edits and drop echoes. */
|
|
6195
|
-
_lastContent;
|
|
6196
|
-
/** A `setContent` that arrived before the transport was wired. */
|
|
6197
|
-
_pendingContent;
|
|
6198
|
-
setContent(t) {
|
|
6199
|
-
t !== this._lastContent && (this._lastContent = t, this._host ? this._host.setText(t) : this._pendingContent = t);
|
|
6200
|
-
}
|
|
6201
|
-
setReadOnly(t) {
|
|
6202
|
-
this._readOnly = t, this._host?.setReadOnly(t);
|
|
6203
|
-
}
|
|
6204
|
-
dispose() {
|
|
6205
|
-
this._disposed = !0, window.removeEventListener("message", this._onWindowMessage), this._themeObserver?.disconnect(), this._host?.dispose(), this._transport?.dispose(), this._iframe.remove();
|
|
6206
|
-
}
|
|
6207
|
-
_trySetup() {
|
|
6208
|
-
if (this._disposed)
|
|
6209
|
-
return;
|
|
6210
|
-
const t = this._iframe.contentWindow;
|
|
6211
|
-
if (!t) {
|
|
6212
|
-
requestAnimationFrame(() => this._trySetup());
|
|
6213
|
-
return;
|
|
6214
|
-
}
|
|
6215
|
-
this._transport = new Pn(window, t);
|
|
6216
|
-
const n = new On(ut.create(this._transport));
|
|
6217
|
-
this._host = new cr({
|
|
6218
|
-
connection: n,
|
|
6219
|
-
contentType: this._options.contentType ?? "text",
|
|
6220
|
-
initialText: this._lastContent,
|
|
6221
|
-
readOnly: this._readOnly
|
|
6222
|
-
}), this._host.onDidChangeText(({ text: r }) => {
|
|
6223
|
-
const o = ln.replace(dn.ofLength(this._lastContent.length), r);
|
|
6224
|
-
this._lastContent = r, this.onEdit?.(o);
|
|
6225
|
-
}), this._host.onDidReportSize(({ height: r }) => {
|
|
6226
|
-
this._applyHeight(r);
|
|
6227
|
-
}), this._pendingContent !== void 0 && (this._host.setText(this._pendingContent), this._pendingContent = void 0), this._iframe.addEventListener("load", () => this._postTheme(), { once: !0 }), this._iframe.srcdoc = lr(El(this._options), this._getThemeCss(), this._options.scriptNonce);
|
|
6228
|
-
}
|
|
6229
|
-
_applyHeight(t) {
|
|
6230
|
-
const n = `${Math.max(1, Math.min(ur, Math.ceil(t)))}px`;
|
|
6231
|
-
this.element.style.minHeight = "", this._iframe.style.height !== n && (this._iframe.style.height = n);
|
|
6232
|
-
}
|
|
6233
|
-
_getThemeCss() {
|
|
6234
|
-
return typeof this._options.themeCss == "function" ? this._options.themeCss() : this._options.themeCss;
|
|
6235
|
-
}
|
|
6236
|
-
_postTheme() {
|
|
6237
|
-
const t = this._getThemeCss();
|
|
6238
|
-
t !== void 0 && this._iframe.contentWindow?.postMessage({ type: he, themeCss: t }, "*");
|
|
6239
|
-
}
|
|
6240
|
-
}
|
|
6241
|
-
function Al(e) {
|
|
6242
|
-
return {
|
|
6243
|
-
create(t, n) {
|
|
6244
|
-
if (e.handlesLanguage(t))
|
|
6245
|
-
return new Il(e, n);
|
|
6246
|
-
}
|
|
6247
|
-
};
|
|
6248
|
-
}
|
|
6249
|
-
class xl {
|
|
6137
|
+
class Cl {
|
|
6250
6138
|
constructor(t) {
|
|
6251
6139
|
this._options = t, this._providers = t.providers, this._frameLayer = document.createElement("div"), this._frameLayer.style.position = "absolute", this._frameLayer.style.inset = "0", this._frameLayer.style.height = "0", this._frameLayer.style.pointerEvents = "none", this._frameLayer.style.zIndex = "1", t.frameRoot && this._setFrameRoot(t.frameRoot), this._observer = typeof IntersectionObserver > "u" ? void 0 : new IntersectionObserver((n) => {
|
|
6252
6140
|
for (const r of n)
|
|
@@ -6286,7 +6174,7 @@ class xl {
|
|
|
6286
6174
|
};
|
|
6287
6175
|
}
|
|
6288
6176
|
create(t, n) {
|
|
6289
|
-
const r =
|
|
6177
|
+
const r = zl(this._providers, t);
|
|
6290
6178
|
if (!r)
|
|
6291
6179
|
return;
|
|
6292
6180
|
if (r.kind === "ambiguous") {
|
|
@@ -6296,7 +6184,7 @@ class xl {
|
|
|
6296
6184
|
const o = un(r.provider.id, t);
|
|
6297
6185
|
if (this._rejectedProviders.has(o))
|
|
6298
6186
|
return;
|
|
6299
|
-
const s = new
|
|
6187
|
+
const s = new Ol(
|
|
6300
6188
|
this,
|
|
6301
6189
|
r.provider,
|
|
6302
6190
|
t,
|
|
@@ -6330,11 +6218,11 @@ class xl {
|
|
|
6330
6218
|
this._rejectEditor(t, n, r);
|
|
6331
6219
|
return;
|
|
6332
6220
|
}
|
|
6333
|
-
const i =
|
|
6221
|
+
const i = Zl(t.provider.id, t.language, s);
|
|
6334
6222
|
let a = this._pools.get(i);
|
|
6335
6223
|
if (!a) {
|
|
6336
6224
|
const c = this._ensureFrameRoot(t);
|
|
6337
|
-
a = new
|
|
6225
|
+
a = new Il(
|
|
6338
6226
|
s,
|
|
6339
6227
|
this._frameLayer,
|
|
6340
6228
|
c,
|
|
@@ -6373,7 +6261,7 @@ class xl {
|
|
|
6373
6261
|
this._pools.clear();
|
|
6374
6262
|
}
|
|
6375
6263
|
}
|
|
6376
|
-
class
|
|
6264
|
+
class Ol {
|
|
6377
6265
|
constructor(t, n, r, o, s, i) {
|
|
6378
6266
|
this._factory = t, this.provider = n, this.language = r, this._content = o, this.element = document.createElement("div"), this.element.style.width = "100%", this.element.style.minHeight = `${s}px`, this._frameHost = document.createElement("div"), this._frameHost.style.width = "100%", this.element.appendChild(this._frameHost), this.estimateHeight = () => parseFloat(this.element.style.minHeight) || s, this._factory.resolve(this, i);
|
|
6379
6267
|
}
|
|
@@ -6413,11 +6301,11 @@ class Pl {
|
|
|
6413
6301
|
applyGuestText(t) {
|
|
6414
6302
|
if (t === this._content)
|
|
6415
6303
|
return;
|
|
6416
|
-
const n =
|
|
6304
|
+
const n = sr.replace(ar.ofLength(this._content.length), t);
|
|
6417
6305
|
this._content = t, this.onEdit?.(n);
|
|
6418
6306
|
}
|
|
6419
6307
|
applyHeight(t) {
|
|
6420
|
-
const n =
|
|
6308
|
+
const n = ct(t);
|
|
6421
6309
|
this.element.style.minHeight = `${n}px`, this.frame && (this.frame.iframe.style.height = `${n}px`, this.frame.layout(this));
|
|
6422
6310
|
}
|
|
6423
6311
|
observeLayout(t) {
|
|
@@ -6443,7 +6331,7 @@ class Pl {
|
|
|
6443
6331
|
n.textContent = this._content, t.appendChild(n), this._frameHost.replaceChildren(t);
|
|
6444
6332
|
}
|
|
6445
6333
|
}
|
|
6446
|
-
class
|
|
6334
|
+
class Il {
|
|
6447
6335
|
constructor(t, n, r, o, s) {
|
|
6448
6336
|
this._frameLayer = n, this._frameRoot = r, this._scriptNonce = o, this._themeCss = s, this.descriptor = t;
|
|
6449
6337
|
}
|
|
@@ -6479,22 +6367,22 @@ class Zl {
|
|
|
6479
6367
|
t.editor && t.layout(t.editor);
|
|
6480
6368
|
}
|
|
6481
6369
|
_createFrame() {
|
|
6482
|
-
const t = new
|
|
6370
|
+
const t = new Pl(this, this.descriptor, this._frameLayer, this._frameRoot, this._scriptNonce, this._themeCss);
|
|
6483
6371
|
return this._frames.add(t), t;
|
|
6484
6372
|
}
|
|
6485
6373
|
}
|
|
6486
|
-
class
|
|
6374
|
+
class Pl {
|
|
6487
6375
|
constructor(t, n, r, o, s, i) {
|
|
6488
6376
|
this._descriptor = n, this._frameRoot = o, this._scriptNonce = s, this._themeCss = i, this.pool = t;
|
|
6489
6377
|
const a = document.createElement("iframe");
|
|
6490
|
-
a.setAttribute("sandbox",
|
|
6378
|
+
a.setAttribute("sandbox", ir(n.sandbox)), a.setAttribute("allow", n.sandbox?.clipboardWrite ? "clipboard-write" : ""), a.style.width = "100%", a.style.border = "none", a.style.display = "block", a.style.position = "absolute", a.style.pointerEvents = "auto", a.style.background = "transparent", a.style.height = `${n.initialHeight ?? 120}px`, t.park(a), a.addEventListener("blur", () => {
|
|
6491
6379
|
const c = this.editor;
|
|
6492
6380
|
c && !c.visible && this.pool.release(c);
|
|
6493
6381
|
}), this.iframe = a, this._onWindowMessage = (c) => {
|
|
6494
6382
|
if (c.source !== a.contentWindow)
|
|
6495
6383
|
return;
|
|
6496
6384
|
const u = c.data;
|
|
6497
|
-
u?.type !==
|
|
6385
|
+
u?.type !== De || typeof u.height != "number" || !Number.isFinite(u.height) || this.editor?.applyHeight(u.height);
|
|
6498
6386
|
}, window.addEventListener("message", this._onWindowMessage), r.appendChild(a), queueMicrotask(() => this._setup());
|
|
6499
6387
|
}
|
|
6500
6388
|
iframe;
|
|
@@ -6507,10 +6395,10 @@ class Tl {
|
|
|
6507
6395
|
_onWindowMessage;
|
|
6508
6396
|
bind(t) {
|
|
6509
6397
|
if (this.editor === t) {
|
|
6510
|
-
this._host?.setText(t.content), this._host?.setReadOnly(t.readOnly), this.layout(t);
|
|
6398
|
+
this._host?.setText(t.content), this._host?.setReadOnly(t.readOnly), this.iframe.style.height = `${ct(t.estimateHeight())}px`, this.layout(t);
|
|
6511
6399
|
return;
|
|
6512
6400
|
}
|
|
6513
|
-
this.editor && this.editor !== t && this.unbind(), this._pendingEditor = t, this._host && this._host.reuse(t.content, t.readOnly), this.editor = t, this._pendingEditor = void 0, t.bindFrame(this)
|
|
6401
|
+
this.editor && this.editor !== t && this.unbind(), this._pendingEditor = t, this._host && this._host.reuse(t.content, t.readOnly), this.editor = t, this._pendingEditor = void 0, t.bindFrame(this), this.iframe.style.height = `${ct(t.estimateHeight())}px`;
|
|
6514
6402
|
}
|
|
6515
6403
|
unbind() {
|
|
6516
6404
|
const t = this.editor;
|
|
@@ -6536,14 +6424,14 @@ class Tl {
|
|
|
6536
6424
|
requestAnimationFrame(() => this._setup());
|
|
6537
6425
|
return;
|
|
6538
6426
|
}
|
|
6539
|
-
this._transport = new
|
|
6540
|
-
const n = new
|
|
6541
|
-
this._host = new
|
|
6427
|
+
this._transport = new Ii(window, t);
|
|
6428
|
+
const n = new ki(kn.create(this._transport)), r = this._pendingEditor ?? this.editor;
|
|
6429
|
+
this._host = new wl({
|
|
6542
6430
|
connection: n,
|
|
6543
6431
|
contentType: this._descriptor.contentType ?? "text",
|
|
6544
6432
|
initialText: r?.content ?? "",
|
|
6545
6433
|
readOnly: r?.readOnly ?? !1
|
|
6546
|
-
}), this._host.onDidChangeText(({ text: o }) => this.editor?.applyGuestText(o)), this._host.onDidReportSize(({ height: o }) => this.editor?.applyHeight(o)), this.iframe.addEventListener("load", () => this._postTheme(), { once: !0 }), this.iframe.srcdoc =
|
|
6434
|
+
}), this._host.onDidChangeText(({ text: o }) => this.editor?.applyGuestText(o)), this._host.onDidReportSize(({ height: o }) => this.editor?.applyHeight(o)), this.iframe.addEventListener("load", () => this._postTheme(), { once: !0 }), this.iframe.srcdoc = Sl(
|
|
6547
6435
|
this._descriptor.html,
|
|
6548
6436
|
this._getThemeCss(),
|
|
6549
6437
|
this._scriptNonce
|
|
@@ -6554,28 +6442,30 @@ class Tl {
|
|
|
6554
6442
|
}
|
|
6555
6443
|
_postTheme() {
|
|
6556
6444
|
const t = this._getThemeCss();
|
|
6557
|
-
t !== void 0 && this.iframe.contentWindow?.postMessage({ type:
|
|
6445
|
+
t !== void 0 && this.iframe.contentWindow?.postMessage({ type: De, themeCss: t }, "*");
|
|
6558
6446
|
}
|
|
6559
6447
|
}
|
|
6560
|
-
function
|
|
6448
|
+
function ir(e) {
|
|
6561
6449
|
const t = ["allow-scripts"];
|
|
6562
6450
|
return e?.forms && t.push("allow-forms"), e?.downloads && t.push("allow-downloads"), e?.pointerLock && t.push("allow-pointer-lock"), t.join(" ");
|
|
6563
6451
|
}
|
|
6452
|
+
function ct(e) {
|
|
6453
|
+
return Math.max(1, Math.min(kl, Math.ceil(e)));
|
|
6454
|
+
}
|
|
6564
6455
|
function un(e, t) {
|
|
6565
6456
|
return `${e}\0${t}`;
|
|
6566
6457
|
}
|
|
6567
|
-
function
|
|
6458
|
+
function Zl(e, t, n) {
|
|
6568
6459
|
return [
|
|
6569
6460
|
e,
|
|
6570
6461
|
n.cacheKey ?? t,
|
|
6571
6462
|
n.contentType ?? "text",
|
|
6572
|
-
|
|
6463
|
+
ir(n.sandbox),
|
|
6573
6464
|
n.sandbox?.clipboardWrite === !0 ? "clipboard-write" : ""
|
|
6574
6465
|
].join("\0");
|
|
6575
6466
|
}
|
|
6576
6467
|
export {
|
|
6577
|
-
|
|
6578
|
-
|
|
6579
|
-
$l as selectCodeBlockEditorProvider
|
|
6468
|
+
Cl as VirtualizedIframeEmbeddedEditorFactory,
|
|
6469
|
+
zl as selectCodeBlockEditorProvider
|
|
6580
6470
|
};
|
|
6581
6471
|
//# sourceMappingURL=web-editors.js.map
|