@animaapp/anima-sdk 0.26.0 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.js +1145 -1136
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
1
|
+
var Oo = Object.defineProperty, xo = Object.defineProperties;
|
|
2
|
+
var Ao = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var Zn = Object.getOwnPropertySymbols;
|
|
4
|
+
var Io = Object.prototype.hasOwnProperty, No = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var xn = (e) => {
|
|
6
6
|
throw TypeError(e);
|
|
7
|
-
},
|
|
7
|
+
}, An = Math.pow, On = (e, t, n) => t in e ? Oo(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, p = (e, t) => {
|
|
8
8
|
for (var n in t || (t = {}))
|
|
9
|
-
|
|
10
|
-
if (
|
|
11
|
-
for (var n of
|
|
12
|
-
|
|
9
|
+
Io.call(t, n) && On(e, n, t[n]);
|
|
10
|
+
if (Zn)
|
|
11
|
+
for (var n of Zn(t))
|
|
12
|
+
No.call(t, n) && On(e, n, t[n]);
|
|
13
13
|
return e;
|
|
14
|
-
}, y = (e, t) =>
|
|
15
|
-
var
|
|
16
|
-
var v = (e, t, n) => (
|
|
14
|
+
}, y = (e, t) => xo(e, Ao(t));
|
|
15
|
+
var jt = (e, t, n) => t.has(e) || xn("Cannot " + n);
|
|
16
|
+
var v = (e, t, n) => (jt(e, t, "read from private field"), n ? n.call(e) : t.get(e)), re = (e, t, n) => t.has(e) ? xn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), X = (e, t, n, r) => (jt(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n), j = (e, t, n) => (jt(e, t, "access private method"), n);
|
|
17
17
|
var k = (e, t, n) => new Promise((r, o) => {
|
|
18
18
|
var i = (c) => {
|
|
19
19
|
try {
|
|
@@ -31,43 +31,43 @@ var k = (e, t, n) => new Promise((r, o) => {
|
|
|
31
31
|
s((n = n.apply(e, t)).next());
|
|
32
32
|
});
|
|
33
33
|
/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */
|
|
34
|
-
function
|
|
34
|
+
function Ve(e) {
|
|
35
35
|
let t = e.length;
|
|
36
36
|
for (; --t >= 0; )
|
|
37
37
|
e[t] = 0;
|
|
38
38
|
}
|
|
39
|
-
const
|
|
39
|
+
const Po = 0, br = 1, Ro = 2, Do = 3, Co = 258, pn = 29, dt = 256, ot = dt + 1 + pn, De = 30, _n = 19, wr = 2 * ot + 1, Se = 15, Ut = 16, Fo = 7, gn = 256, vr = 16, kr = 17, zr = 18, Gt = (
|
|
40
40
|
/* extra bits for each length code */
|
|
41
41
|
new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0])
|
|
42
|
-
),
|
|
42
|
+
), zt = (
|
|
43
43
|
/* extra bits for each distance code */
|
|
44
44
|
new Uint8Array([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13])
|
|
45
|
-
),
|
|
45
|
+
), jo = (
|
|
46
46
|
/* extra bits for each bit length code */
|
|
47
47
|
new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7])
|
|
48
|
-
),
|
|
49
|
-
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
function
|
|
48
|
+
), Sr = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), Uo = 512, fe = new Array((ot + 2) * 2);
|
|
49
|
+
Ve(fe);
|
|
50
|
+
const nt = new Array(De * 2);
|
|
51
|
+
Ve(nt);
|
|
52
|
+
const it = new Array(Uo);
|
|
53
|
+
Ve(it);
|
|
54
|
+
const at = new Array(Co - Do + 1);
|
|
55
|
+
Ve(at);
|
|
56
|
+
const mn = new Array(pn);
|
|
57
|
+
Ve(mn);
|
|
58
|
+
const Tt = new Array(De);
|
|
59
|
+
Ve(Tt);
|
|
60
|
+
function Lt(e, t, n, r, o) {
|
|
61
61
|
this.static_tree = e, this.extra_bits = t, this.extra_base = n, this.elems = r, this.max_length = o, this.has_stree = e && e.length;
|
|
62
62
|
}
|
|
63
|
-
let
|
|
64
|
-
function
|
|
63
|
+
let Er, Tr, $r;
|
|
64
|
+
function Mt(e, t) {
|
|
65
65
|
this.dyn_tree = e, this.max_code = 0, this.stat_desc = t;
|
|
66
66
|
}
|
|
67
|
-
const
|
|
67
|
+
const Zr = (e) => e < 256 ? it[e] : it[256 + (e >>> 7)], st = (e, t) => {
|
|
68
68
|
e.pending_buf[e.pending++] = t & 255, e.pending_buf[e.pending++] = t >>> 8 & 255;
|
|
69
69
|
}, B = (e, t, n) => {
|
|
70
|
-
e.bi_valid >
|
|
70
|
+
e.bi_valid > Ut - n ? (e.bi_buf |= t << e.bi_valid & 65535, st(e, e.bi_buf), e.bi_buf = t >> Ut - e.bi_valid, e.bi_valid += n - Ut) : (e.bi_buf |= t << e.bi_valid & 65535, e.bi_valid += n);
|
|
71
71
|
}, ie = (e, t, n) => {
|
|
72
72
|
B(
|
|
73
73
|
e,
|
|
@@ -75,20 +75,20 @@ const Sr = (e) => e < 256 ? rt[e] : rt[256 + (e >>> 7)], it = (e, t) => {
|
|
|
75
75
|
n[t * 2 + 1]
|
|
76
76
|
/*.Len*/
|
|
77
77
|
);
|
|
78
|
-
},
|
|
78
|
+
}, Or = (e, t) => {
|
|
79
79
|
let n = 0;
|
|
80
80
|
do
|
|
81
81
|
n |= e & 1, e >>>= 1, n <<= 1;
|
|
82
82
|
while (--t > 0);
|
|
83
83
|
return n >>> 1;
|
|
84
|
-
},
|
|
85
|
-
e.bi_valid === 16 ? (
|
|
86
|
-
},
|
|
84
|
+
}, Lo = (e) => {
|
|
85
|
+
e.bi_valid === 16 ? (st(e, e.bi_buf), e.bi_buf = 0, e.bi_valid = 0) : e.bi_valid >= 8 && (e.pending_buf[e.pending++] = e.bi_buf & 255, e.bi_buf >>= 8, e.bi_valid -= 8);
|
|
86
|
+
}, Mo = (e, t) => {
|
|
87
87
|
const n = t.dyn_tree, r = t.max_code, o = t.stat_desc.static_tree, i = t.stat_desc.has_stree, a = t.stat_desc.extra_bits, s = t.stat_desc.extra_base, c = t.stat_desc.max_length;
|
|
88
88
|
let u, l, d, f, _, m, w = 0;
|
|
89
89
|
for (f = 0; f <= Se; f++)
|
|
90
90
|
e.bl_count[f] = 0;
|
|
91
|
-
for (n[e.heap[e.heap_max] * 2 + 1] = 0, u = e.heap_max + 1; u <
|
|
91
|
+
for (n[e.heap[e.heap_max] * 2 + 1] = 0, u = e.heap_max + 1; u < wr; u++)
|
|
92
92
|
l = e.heap[u], f = n[n[l * 2 + 1] * 2 + 1] + 1, f > c && (f = c, w++), n[l * 2 + 1] = f, !(l > r) && (e.bl_count[f]++, _ = 0, l >= s && (_ = a[l - s]), m = n[l * 2], e.opt_len += m * (f + _), i && (e.static_len += m * (o[l * 2 + 1] + _)));
|
|
93
93
|
if (w !== 0) {
|
|
94
94
|
do {
|
|
@@ -100,27 +100,27 @@ const Sr = (e) => e < 256 ? rt[e] : rt[256 + (e >>> 7)], it = (e, t) => {
|
|
|
100
100
|
for (l = e.bl_count[f]; l !== 0; )
|
|
101
101
|
d = e.heap[--u], !(d > r) && (n[d * 2 + 1] !== f && (e.opt_len += (f - n[d * 2 + 1]) * n[d * 2], n[d * 2 + 1] = f), l--);
|
|
102
102
|
}
|
|
103
|
-
},
|
|
103
|
+
}, xr = (e, t, n) => {
|
|
104
104
|
const r = new Array(Se + 1);
|
|
105
105
|
let o = 0, i, a;
|
|
106
106
|
for (i = 1; i <= Se; i++)
|
|
107
107
|
o = o + n[i - 1] << 1, r[i] = o;
|
|
108
108
|
for (a = 0; a <= t; a++) {
|
|
109
109
|
let s = e[a * 2 + 1];
|
|
110
|
-
s !== 0 && (e[a * 2] =
|
|
110
|
+
s !== 0 && (e[a * 2] = Or(r[s]++, s));
|
|
111
111
|
}
|
|
112
|
-
},
|
|
112
|
+
}, Jo = () => {
|
|
113
113
|
let e, t, n, r, o;
|
|
114
114
|
const i = new Array(Se + 1);
|
|
115
|
-
for (n = 0, r = 0; r <
|
|
116
|
-
for (
|
|
117
|
-
|
|
118
|
-
for (
|
|
119
|
-
for (
|
|
120
|
-
|
|
121
|
-
for (o >>= 7; r <
|
|
122
|
-
for (
|
|
123
|
-
|
|
115
|
+
for (n = 0, r = 0; r < pn - 1; r++)
|
|
116
|
+
for (mn[r] = n, e = 0; e < 1 << Gt[r]; e++)
|
|
117
|
+
at[n++] = r;
|
|
118
|
+
for (at[n - 1] = r, o = 0, r = 0; r < 16; r++)
|
|
119
|
+
for (Tt[r] = o, e = 0; e < 1 << zt[r]; e++)
|
|
120
|
+
it[o++] = r;
|
|
121
|
+
for (o >>= 7; r < De; r++)
|
|
122
|
+
for (Tt[r] = o << 7, e = 0; e < 1 << zt[r] - 7; e++)
|
|
123
|
+
it[256 + o++] = r;
|
|
124
124
|
for (t = 0; t <= Se; t++)
|
|
125
125
|
i[t] = 0;
|
|
126
126
|
for (e = 0; e <= 143; )
|
|
@@ -131,45 +131,45 @@ const Sr = (e) => e < 256 ? rt[e] : rt[256 + (e >>> 7)], it = (e, t) => {
|
|
|
131
131
|
fe[e * 2 + 1] = 7, e++, i[7]++;
|
|
132
132
|
for (; e <= 287; )
|
|
133
133
|
fe[e * 2 + 1] = 8, e++, i[8]++;
|
|
134
|
-
for (
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
},
|
|
134
|
+
for (xr(fe, ot + 1, i), e = 0; e < De; e++)
|
|
135
|
+
nt[e * 2 + 1] = 5, nt[e * 2] = Or(e, 5);
|
|
136
|
+
Er = new Lt(fe, Gt, dt + 1, ot, Se), Tr = new Lt(nt, zt, 0, De, Se), $r = new Lt(new Array(0), jo, 0, _n, Fo);
|
|
137
|
+
}, Ar = (e) => {
|
|
138
138
|
let t;
|
|
139
|
-
for (t = 0; t <
|
|
139
|
+
for (t = 0; t < ot; t++)
|
|
140
140
|
e.dyn_ltree[t * 2] = 0;
|
|
141
|
-
for (t = 0; t <
|
|
141
|
+
for (t = 0; t < De; t++)
|
|
142
142
|
e.dyn_dtree[t * 2] = 0;
|
|
143
|
-
for (t = 0; t <
|
|
143
|
+
for (t = 0; t < _n; t++)
|
|
144
144
|
e.bl_tree[t * 2] = 0;
|
|
145
|
-
e.dyn_ltree[
|
|
146
|
-
},
|
|
147
|
-
e.bi_valid > 8 ?
|
|
148
|
-
},
|
|
145
|
+
e.dyn_ltree[gn * 2] = 1, e.opt_len = e.static_len = 0, e.sym_next = e.matches = 0;
|
|
146
|
+
}, Ir = (e) => {
|
|
147
|
+
e.bi_valid > 8 ? st(e, e.bi_buf) : e.bi_valid > 0 && (e.pending_buf[e.pending++] = e.bi_buf), e.bi_buf = 0, e.bi_valid = 0;
|
|
148
|
+
}, In = (e, t, n, r) => {
|
|
149
149
|
const o = t * 2, i = n * 2;
|
|
150
150
|
return e[o] < e[i] || e[o] === e[i] && r[t] <= r[n];
|
|
151
|
-
},
|
|
151
|
+
}, Jt = (e, t, n) => {
|
|
152
152
|
const r = e.heap[n];
|
|
153
153
|
let o = n << 1;
|
|
154
|
-
for (; o <= e.heap_len && (o < e.heap_len &&
|
|
154
|
+
for (; o <= e.heap_len && (o < e.heap_len && In(t, e.heap[o + 1], e.heap[o], e.depth) && o++, !In(t, r, e.heap[o], e.depth)); )
|
|
155
155
|
e.heap[n] = e.heap[o], n = o, o <<= 1;
|
|
156
156
|
e.heap[n] = r;
|
|
157
|
-
},
|
|
157
|
+
}, Nn = (e, t, n) => {
|
|
158
158
|
let r, o, i = 0, a, s;
|
|
159
159
|
if (e.sym_next !== 0)
|
|
160
160
|
do
|
|
161
|
-
r = e.pending_buf[e.sym_buf + i++] & 255, r += (e.pending_buf[e.sym_buf + i++] & 255) << 8, o = e.pending_buf[e.sym_buf + i++], r === 0 ? ie(e, o, t) : (a =
|
|
161
|
+
r = e.pending_buf[e.sym_buf + i++] & 255, r += (e.pending_buf[e.sym_buf + i++] & 255) << 8, o = e.pending_buf[e.sym_buf + i++], r === 0 ? ie(e, o, t) : (a = at[o], ie(e, a + dt + 1, t), s = Gt[a], s !== 0 && (o -= mn[a], B(e, o, s)), r--, a = Zr(r), ie(e, a, n), s = zt[a], s !== 0 && (r -= Tt[a], B(e, r, s)));
|
|
162
162
|
while (i < e.sym_next);
|
|
163
|
-
ie(e,
|
|
164
|
-
},
|
|
163
|
+
ie(e, gn, t);
|
|
164
|
+
}, qt = (e, t) => {
|
|
165
165
|
const n = t.dyn_tree, r = t.stat_desc.static_tree, o = t.stat_desc.has_stree, i = t.stat_desc.elems;
|
|
166
166
|
let a, s, c = -1, u;
|
|
167
|
-
for (e.heap_len = 0, e.heap_max =
|
|
167
|
+
for (e.heap_len = 0, e.heap_max = wr, a = 0; a < i; a++)
|
|
168
168
|
n[a * 2] !== 0 ? (e.heap[++e.heap_len] = c = a, e.depth[a] = 0) : n[a * 2 + 1] = 0;
|
|
169
169
|
for (; e.heap_len < 2; )
|
|
170
170
|
u = e.heap[++e.heap_len] = c < 2 ? ++c : 0, n[u * 2] = 1, e.depth[u] = 0, e.opt_len--, o && (e.static_len -= r[u * 2 + 1]);
|
|
171
171
|
for (t.max_code = c, a = e.heap_len >> 1; a >= 1; a--)
|
|
172
|
-
|
|
172
|
+
Jt(e, n, a);
|
|
173
173
|
u = i;
|
|
174
174
|
do
|
|
175
175
|
a = e.heap[
|
|
@@ -178,7 +178,7 @@ const Sr = (e) => e < 256 ? rt[e] : rt[256 + (e >>> 7)], it = (e, t) => {
|
|
|
178
178
|
], e.heap[
|
|
179
179
|
1
|
|
180
180
|
/*SMALLEST*/
|
|
181
|
-
] = e.heap[e.heap_len--],
|
|
181
|
+
] = e.heap[e.heap_len--], Jt(
|
|
182
182
|
e,
|
|
183
183
|
n,
|
|
184
184
|
1
|
|
@@ -189,7 +189,7 @@ const Sr = (e) => e < 256 ? rt[e] : rt[256 + (e >>> 7)], it = (e, t) => {
|
|
|
189
189
|
], e.heap[--e.heap_max] = a, e.heap[--e.heap_max] = s, n[u * 2] = n[a * 2] + n[s * 2], e.depth[u] = (e.depth[a] >= e.depth[s] ? e.depth[a] : e.depth[s]) + 1, n[a * 2 + 1] = n[s * 2 + 1] = u, e.heap[
|
|
190
190
|
1
|
|
191
191
|
/*SMALLEST*/
|
|
192
|
-
] = u++,
|
|
192
|
+
] = u++, Jt(
|
|
193
193
|
e,
|
|
194
194
|
n,
|
|
195
195
|
1
|
|
@@ -199,12 +199,12 @@ const Sr = (e) => e < 256 ? rt[e] : rt[256 + (e >>> 7)], it = (e, t) => {
|
|
|
199
199
|
e.heap[--e.heap_max] = e.heap[
|
|
200
200
|
1
|
|
201
201
|
/*SMALLEST*/
|
|
202
|
-
],
|
|
203
|
-
},
|
|
202
|
+
], Mo(e, t), xr(n, c, e.bl_count);
|
|
203
|
+
}, Pn = (e, t, n) => {
|
|
204
204
|
let r, o = -1, i, a = t[1], s = 0, c = 7, u = 4;
|
|
205
205
|
for (a === 0 && (c = 138, u = 3), t[(n + 1) * 2 + 1] = 65535, r = 0; r <= n; r++)
|
|
206
|
-
i = a, a = t[(r + 1) * 2 + 1], !(++s < c && i === a) && (s < u ? e.bl_tree[i * 2] += s : i !== 0 ? (i !== o && e.bl_tree[i * 2]++, e.bl_tree[
|
|
207
|
-
},
|
|
206
|
+
i = a, a = t[(r + 1) * 2 + 1], !(++s < c && i === a) && (s < u ? e.bl_tree[i * 2] += s : i !== 0 ? (i !== o && e.bl_tree[i * 2]++, e.bl_tree[vr * 2]++) : s <= 10 ? e.bl_tree[kr * 2]++ : e.bl_tree[zr * 2]++, s = 0, o = i, a === 0 ? (c = 138, u = 3) : i === a ? (c = 6, u = 3) : (c = 7, u = 4));
|
|
207
|
+
}, Rn = (e, t, n) => {
|
|
208
208
|
let r, o = -1, i, a = t[1], s = 0, c = 7, u = 4;
|
|
209
209
|
for (a === 0 && (c = 138, u = 3), r = 0; r <= n; r++)
|
|
210
210
|
if (i = a, a = t[(r + 1) * 2 + 1], !(++s < c && i === a)) {
|
|
@@ -212,50 +212,50 @@ const Sr = (e) => e < 256 ? rt[e] : rt[256 + (e >>> 7)], it = (e, t) => {
|
|
|
212
212
|
do
|
|
213
213
|
ie(e, i, e.bl_tree);
|
|
214
214
|
while (--s !== 0);
|
|
215
|
-
else i !== 0 ? (i !== o && (ie(e, i, e.bl_tree), s--), ie(e,
|
|
215
|
+
else i !== 0 ? (i !== o && (ie(e, i, e.bl_tree), s--), ie(e, vr, e.bl_tree), B(e, s - 3, 2)) : s <= 10 ? (ie(e, kr, e.bl_tree), B(e, s - 3, 3)) : (ie(e, zr, e.bl_tree), B(e, s - 11, 7));
|
|
216
216
|
s = 0, o = i, a === 0 ? (c = 138, u = 3) : i === a ? (c = 6, u = 3) : (c = 7, u = 4);
|
|
217
217
|
}
|
|
218
|
-
},
|
|
218
|
+
}, Bo = (e) => {
|
|
219
219
|
let t;
|
|
220
|
-
for (
|
|
220
|
+
for (Pn(e, e.dyn_ltree, e.l_desc.max_code), Pn(e, e.dyn_dtree, e.d_desc.max_code), qt(e, e.bl_desc), t = _n - 1; t >= 3 && e.bl_tree[Sr[t] * 2 + 1] === 0; t--)
|
|
221
221
|
;
|
|
222
222
|
return e.opt_len += 3 * (t + 1) + 5 + 5 + 4, t;
|
|
223
|
-
},
|
|
223
|
+
}, Vo = (e, t, n, r) => {
|
|
224
224
|
let o;
|
|
225
225
|
for (B(e, t - 257, 5), B(e, n - 1, 5), B(e, r - 4, 4), o = 0; o < r; o++)
|
|
226
|
-
B(e, e.bl_tree[
|
|
227
|
-
|
|
228
|
-
},
|
|
226
|
+
B(e, e.bl_tree[Sr[o] * 2 + 1], 3);
|
|
227
|
+
Rn(e, e.dyn_ltree, t - 1), Rn(e, e.dyn_dtree, n - 1);
|
|
228
|
+
}, Wo = (e) => {
|
|
229
229
|
let t = 4093624447, n;
|
|
230
230
|
for (n = 0; n <= 31; n++, t >>>= 1)
|
|
231
231
|
if (t & 1 && e.dyn_ltree[n * 2] !== 0)
|
|
232
232
|
return 0;
|
|
233
233
|
if (e.dyn_ltree[18] !== 0 || e.dyn_ltree[20] !== 0 || e.dyn_ltree[26] !== 0)
|
|
234
234
|
return 1;
|
|
235
|
-
for (n = 32; n <
|
|
235
|
+
for (n = 32; n < dt; n++)
|
|
236
236
|
if (e.dyn_ltree[n * 2] !== 0)
|
|
237
237
|
return 1;
|
|
238
238
|
return 0;
|
|
239
239
|
};
|
|
240
|
-
let
|
|
241
|
-
const
|
|
242
|
-
|
|
243
|
-
},
|
|
244
|
-
B(e, (
|
|
245
|
-
},
|
|
246
|
-
B(e,
|
|
247
|
-
},
|
|
240
|
+
let Dn = !1;
|
|
241
|
+
const Ho = (e) => {
|
|
242
|
+
Dn || (Jo(), Dn = !0), e.l_desc = new Mt(e.dyn_ltree, Er), e.d_desc = new Mt(e.dyn_dtree, Tr), e.bl_desc = new Mt(e.bl_tree, $r), e.bi_buf = 0, e.bi_valid = 0, Ar(e);
|
|
243
|
+
}, Nr = (e, t, n, r) => {
|
|
244
|
+
B(e, (Po << 1) + (r ? 1 : 0), 3), Ir(e), st(e, n), st(e, ~n), n && e.pending_buf.set(e.window.subarray(t, t + n), e.pending), e.pending += n;
|
|
245
|
+
}, Ko = (e) => {
|
|
246
|
+
B(e, br << 1, 3), ie(e, gn, fe), Lo(e);
|
|
247
|
+
}, Go = (e, t, n, r) => {
|
|
248
248
|
let o, i, a = 0;
|
|
249
|
-
e.level > 0 ? (e.strm.data_type === 2 && (e.strm.data_type =
|
|
250
|
-
},
|
|
251
|
-
var
|
|
252
|
-
_tr_init:
|
|
253
|
-
_tr_stored_block:
|
|
254
|
-
_tr_flush_block:
|
|
255
|
-
_tr_tally:
|
|
256
|
-
_tr_align:
|
|
249
|
+
e.level > 0 ? (e.strm.data_type === 2 && (e.strm.data_type = Wo(e)), qt(e, e.l_desc), qt(e, e.d_desc), a = Bo(e), o = e.opt_len + 3 + 7 >>> 3, i = e.static_len + 3 + 7 >>> 3, i <= o && (o = i)) : o = i = n + 5, n + 4 <= o && t !== -1 ? Nr(e, t, n, r) : e.strategy === 4 || i === o ? (B(e, (br << 1) + (r ? 1 : 0), 3), Nn(e, fe, nt)) : (B(e, (Ro << 1) + (r ? 1 : 0), 3), Vo(e, e.l_desc.max_code + 1, e.d_desc.max_code + 1, a + 1), Nn(e, e.dyn_ltree, e.dyn_dtree)), Ar(e), r && Ir(e);
|
|
250
|
+
}, qo = (e, t, n) => (e.pending_buf[e.sym_buf + e.sym_next++] = t, e.pending_buf[e.sym_buf + e.sym_next++] = t >> 8, e.pending_buf[e.sym_buf + e.sym_next++] = n, t === 0 ? e.dyn_ltree[n * 2]++ : (e.matches++, t--, e.dyn_ltree[(at[n] + dt + 1) * 2]++, e.dyn_dtree[Zr(t) * 2]++), e.sym_next === e.sym_end);
|
|
251
|
+
var Xo = Ho, Yo = Nr, Qo = Go, ei = qo, ti = Ko, ni = {
|
|
252
|
+
_tr_init: Xo,
|
|
253
|
+
_tr_stored_block: Yo,
|
|
254
|
+
_tr_flush_block: Qo,
|
|
255
|
+
_tr_tally: ei,
|
|
256
|
+
_tr_align: ti
|
|
257
257
|
};
|
|
258
|
-
const
|
|
258
|
+
const ri = (e, t, n, r) => {
|
|
259
259
|
let o = e & 65535 | 0, i = e >>> 16 & 65535 | 0, a = 0;
|
|
260
260
|
for (; n !== 0; ) {
|
|
261
261
|
a = n > 2e3 ? 2e3 : n, n -= a;
|
|
@@ -266,8 +266,8 @@ const Qo = (e, t, n, r) => {
|
|
|
266
266
|
}
|
|
267
267
|
return o | i << 16 | 0;
|
|
268
268
|
};
|
|
269
|
-
var
|
|
270
|
-
const
|
|
269
|
+
var Pr = ri;
|
|
270
|
+
const oi = () => {
|
|
271
271
|
let e, t = [];
|
|
272
272
|
for (var n = 0; n < 256; n++) {
|
|
273
273
|
e = n;
|
|
@@ -276,14 +276,14 @@ const ei = () => {
|
|
|
276
276
|
t[n] = e;
|
|
277
277
|
}
|
|
278
278
|
return t;
|
|
279
|
-
},
|
|
280
|
-
const o =
|
|
279
|
+
}, ii = new Uint32Array(oi()), ai = (e, t, n, r) => {
|
|
280
|
+
const o = ii, i = r + n;
|
|
281
281
|
e ^= -1;
|
|
282
282
|
for (let a = r; a < i; a++)
|
|
283
283
|
e = e >>> 8 ^ o[(e ^ t[a]) & 255];
|
|
284
284
|
return e ^ -1;
|
|
285
285
|
};
|
|
286
|
-
var pe =
|
|
286
|
+
var pe = ai, $t = {
|
|
287
287
|
2: "need dictionary",
|
|
288
288
|
/* Z_NEED_DICT 2 */
|
|
289
289
|
1: "stream end",
|
|
@@ -302,7 +302,7 @@ var pe = ni, St = {
|
|
|
302
302
|
/* Z_BUF_ERROR (-5) */
|
|
303
303
|
"-6": "incompatible version"
|
|
304
304
|
/* Z_VERSION_ERROR (-6) */
|
|
305
|
-
},
|
|
305
|
+
}, Rr = {
|
|
306
306
|
/* Allowed flush values; see deflate() and inflate() below for details */
|
|
307
307
|
Z_NO_FLUSH: 0,
|
|
308
308
|
Z_PARTIAL_FLUSH: 1,
|
|
@@ -330,30 +330,30 @@ var pe = ni, St = {
|
|
|
330
330
|
Z_DEFLATED: 8
|
|
331
331
|
//Z_NULL: null // Use -1 or null inline, depending on var type
|
|
332
332
|
};
|
|
333
|
-
const { _tr_init:
|
|
333
|
+
const { _tr_init: si, _tr_stored_block: Xt, _tr_flush_block: ci, _tr_tally: me, _tr_align: ui } = ni, {
|
|
334
334
|
Z_NO_FLUSH: ye,
|
|
335
|
-
Z_PARTIAL_FLUSH:
|
|
336
|
-
Z_FULL_FLUSH:
|
|
335
|
+
Z_PARTIAL_FLUSH: li,
|
|
336
|
+
Z_FULL_FLUSH: fi,
|
|
337
337
|
Z_FINISH: ee,
|
|
338
|
-
Z_BLOCK:
|
|
339
|
-
Z_OK:
|
|
340
|
-
Z_STREAM_END:
|
|
338
|
+
Z_BLOCK: Cn,
|
|
339
|
+
Z_OK: C,
|
|
340
|
+
Z_STREAM_END: Fn,
|
|
341
341
|
Z_STREAM_ERROR: se,
|
|
342
|
-
Z_DATA_ERROR:
|
|
343
|
-
Z_BUF_ERROR:
|
|
344
|
-
Z_DEFAULT_COMPRESSION:
|
|
345
|
-
Z_FILTERED:
|
|
346
|
-
Z_HUFFMAN_ONLY:
|
|
347
|
-
Z_RLE:
|
|
348
|
-
Z_FIXED:
|
|
349
|
-
Z_DEFAULT_STRATEGY:
|
|
350
|
-
Z_UNKNOWN:
|
|
351
|
-
Z_DEFLATED:
|
|
352
|
-
} =
|
|
342
|
+
Z_DATA_ERROR: di,
|
|
343
|
+
Z_BUF_ERROR: Bt,
|
|
344
|
+
Z_DEFAULT_COMPRESSION: hi,
|
|
345
|
+
Z_FILTERED: pi,
|
|
346
|
+
Z_HUFFMAN_ONLY: yt,
|
|
347
|
+
Z_RLE: _i,
|
|
348
|
+
Z_FIXED: gi,
|
|
349
|
+
Z_DEFAULT_STRATEGY: mi,
|
|
350
|
+
Z_UNKNOWN: yi,
|
|
351
|
+
Z_DEFLATED: Nt
|
|
352
|
+
} = Rr, bi = 9, wi = 15, vi = 8, ki = 29, zi = 256, Yt = zi + 1 + ki, Si = 30, Ei = 19, Ti = 2 * Yt + 1, $i = 15, z = 3, ge = 258, ce = ge + z + 1, Zi = 32, Ue = 42, yn = 57, Qt = 69, en = 73, tn = 91, nn = 103, Ee = 113, Xe = 666, J = 1, We = 2, $e = 3, He = 4, Oi = 3, Te = (e, t) => (e.msg = $t[t], t), jn = (e) => e * 2 - (e > 4 ? 9 : 0), _e = (e) => {
|
|
353
353
|
let t = e.length;
|
|
354
354
|
for (; --t >= 0; )
|
|
355
355
|
e[t] = 0;
|
|
356
|
-
},
|
|
356
|
+
}, xi = (e) => {
|
|
357
357
|
let t, n, r, o = e.w_size;
|
|
358
358
|
t = e.hash_size, r = t;
|
|
359
359
|
do
|
|
@@ -364,21 +364,21 @@ const { _tr_init: ri, _tr_stored_block: Kt, _tr_flush_block: oi, _tr_tally: me,
|
|
|
364
364
|
n = e.prev[--r], e.prev[r] = n >= o ? n - o : 0;
|
|
365
365
|
while (--t);
|
|
366
366
|
};
|
|
367
|
-
let
|
|
367
|
+
let Ai = (e, t, n) => (t << e.hash_shift ^ n) & e.hash_mask, be = Ai;
|
|
368
368
|
const G = (e) => {
|
|
369
369
|
const t = e.state;
|
|
370
370
|
let n = t.pending;
|
|
371
371
|
n > e.avail_out && (n = e.avail_out), n !== 0 && (e.output.set(t.pending_buf.subarray(t.pending_out, t.pending_out + n), e.next_out), e.next_out += n, t.pending_out += n, e.total_out += n, e.avail_out -= n, t.pending -= n, t.pending === 0 && (t.pending_out = 0));
|
|
372
372
|
}, q = (e, t) => {
|
|
373
|
-
|
|
373
|
+
ci(e, e.block_start >= 0 ? e.block_start : -1, e.strstart - e.block_start, t), e.block_start = e.strstart, G(e.strm);
|
|
374
374
|
}, $ = (e, t) => {
|
|
375
375
|
e.pending_buf[e.pending++] = t;
|
|
376
|
-
},
|
|
376
|
+
}, qe = (e, t) => {
|
|
377
377
|
e.pending_buf[e.pending++] = t >>> 8 & 255, e.pending_buf[e.pending++] = t & 255;
|
|
378
|
-
},
|
|
378
|
+
}, rn = (e, t, n, r) => {
|
|
379
379
|
let o = e.avail_in;
|
|
380
|
-
return o > r && (o = r), o === 0 ? 0 : (e.avail_in -= o, t.set(e.input.subarray(e.next_in, e.next_in + o), n), e.state.wrap === 1 ? e.adler =
|
|
381
|
-
},
|
|
380
|
+
return o > r && (o = r), o === 0 ? 0 : (e.avail_in -= o, t.set(e.input.subarray(e.next_in, e.next_in + o), n), e.state.wrap === 1 ? e.adler = Pr(e.adler, t, o, n) : e.state.wrap === 2 && (e.adler = pe(e.adler, t, o, n)), e.next_in += o, e.total_in += o, o);
|
|
381
|
+
}, Dr = (e, t) => {
|
|
382
382
|
let n = e.max_chain_length, r = e.strstart, o, i, a = e.prev_length, s = e.nice_match;
|
|
383
383
|
const c = e.strstart > e.w_size - ce ? e.strstart - (e.w_size - ce) : 0, u = e.window, l = e.w_mask, d = e.prev, f = e.strstart + ge;
|
|
384
384
|
let _ = u[r + a - 1], m = u[r + a];
|
|
@@ -397,34 +397,34 @@ const G = (e) => {
|
|
|
397
397
|
}
|
|
398
398
|
while ((t = d[t & l]) > c && --n !== 0);
|
|
399
399
|
return a <= e.lookahead ? a : e.lookahead;
|
|
400
|
-
},
|
|
400
|
+
}, Le = (e) => {
|
|
401
401
|
const t = e.w_size;
|
|
402
402
|
let n, r, o;
|
|
403
403
|
do {
|
|
404
|
-
if (r = e.window_size - e.lookahead - e.strstart, e.strstart >= t + (t - ce) && (e.window.set(e.window.subarray(t, t + t - r), 0), e.match_start -= t, e.strstart -= t, e.block_start -= t, e.insert > e.strstart && (e.insert = e.strstart),
|
|
404
|
+
if (r = e.window_size - e.lookahead - e.strstart, e.strstart >= t + (t - ce) && (e.window.set(e.window.subarray(t, t + t - r), 0), e.match_start -= t, e.strstart -= t, e.block_start -= t, e.insert > e.strstart && (e.insert = e.strstart), xi(e), r += t), e.strm.avail_in === 0)
|
|
405
405
|
break;
|
|
406
|
-
if (n =
|
|
406
|
+
if (n = rn(e.strm, e.window, e.strstart + e.lookahead, r), e.lookahead += n, e.lookahead + e.insert >= z)
|
|
407
407
|
for (o = e.strstart - e.insert, e.ins_h = e.window[o], e.ins_h = be(e, e.ins_h, e.window[o + 1]); e.insert && (e.ins_h = be(e, e.ins_h, e.window[o + z - 1]), e.prev[o & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = o, o++, e.insert--, !(e.lookahead + e.insert < z)); )
|
|
408
408
|
;
|
|
409
409
|
} while (e.lookahead < ce && e.strm.avail_in !== 0);
|
|
410
|
-
},
|
|
410
|
+
}, Cr = (e, t) => {
|
|
411
411
|
let n = e.pending_buf_size - 5 > e.w_size ? e.w_size : e.pending_buf_size - 5, r, o, i, a = 0, s = e.strm.avail_in;
|
|
412
412
|
do {
|
|
413
413
|
if (r = 65535, i = e.bi_valid + 42 >> 3, e.strm.avail_out < i || (i = e.strm.avail_out - i, o = e.strstart - e.block_start, r > o + e.strm.avail_in && (r = o + e.strm.avail_in), r > i && (r = i), r < n && (r === 0 && t !== ee || t === ye || r !== o + e.strm.avail_in)))
|
|
414
414
|
break;
|
|
415
|
-
a = t === ee && r === o + e.strm.avail_in ? 1 : 0,
|
|
415
|
+
a = t === ee && r === o + e.strm.avail_in ? 1 : 0, Xt(e, 0, 0, a), e.pending_buf[e.pending - 4] = r, e.pending_buf[e.pending - 3] = r >> 8, e.pending_buf[e.pending - 2] = ~r, e.pending_buf[e.pending - 1] = ~r >> 8, G(e.strm), o && (o > r && (o = r), e.strm.output.set(e.window.subarray(e.block_start, e.block_start + o), e.strm.next_out), e.strm.next_out += o, e.strm.avail_out -= o, e.strm.total_out += o, e.block_start += o, r -= o), r && (rn(e.strm, e.strm.output, e.strm.next_out, r), e.strm.next_out += r, e.strm.avail_out -= r, e.strm.total_out += r);
|
|
416
416
|
} while (a === 0);
|
|
417
|
-
return s -= e.strm.avail_in, s && (s >= e.w_size ? (e.matches = 2, e.window.set(e.strm.input.subarray(e.strm.next_in - e.w_size, e.strm.next_in), 0), e.strstart = e.w_size, e.insert = e.strstart) : (e.window_size - e.strstart <= s && (e.strstart -= e.w_size, e.window.set(e.window.subarray(e.w_size, e.w_size + e.strstart), 0), e.matches < 2 && e.matches++, e.insert > e.strstart && (e.insert = e.strstart)), e.window.set(e.strm.input.subarray(e.strm.next_in - s, e.strm.next_in), e.strstart), e.strstart += s, e.insert += s > e.w_size - e.insert ? e.w_size - e.insert : s), e.block_start = e.strstart), e.high_water < e.strstart && (e.high_water = e.strstart), a ?
|
|
418
|
-
},
|
|
417
|
+
return s -= e.strm.avail_in, s && (s >= e.w_size ? (e.matches = 2, e.window.set(e.strm.input.subarray(e.strm.next_in - e.w_size, e.strm.next_in), 0), e.strstart = e.w_size, e.insert = e.strstart) : (e.window_size - e.strstart <= s && (e.strstart -= e.w_size, e.window.set(e.window.subarray(e.w_size, e.w_size + e.strstart), 0), e.matches < 2 && e.matches++, e.insert > e.strstart && (e.insert = e.strstart)), e.window.set(e.strm.input.subarray(e.strm.next_in - s, e.strm.next_in), e.strstart), e.strstart += s, e.insert += s > e.w_size - e.insert ? e.w_size - e.insert : s), e.block_start = e.strstart), e.high_water < e.strstart && (e.high_water = e.strstart), a ? He : t !== ye && t !== ee && e.strm.avail_in === 0 && e.strstart === e.block_start ? We : (i = e.window_size - e.strstart, e.strm.avail_in > i && e.block_start >= e.w_size && (e.block_start -= e.w_size, e.strstart -= e.w_size, e.window.set(e.window.subarray(e.w_size, e.w_size + e.strstart), 0), e.matches < 2 && e.matches++, i += e.w_size, e.insert > e.strstart && (e.insert = e.strstart)), i > e.strm.avail_in && (i = e.strm.avail_in), i && (rn(e.strm, e.window, e.strstart, i), e.strstart += i, e.insert += i > e.w_size - e.insert ? e.w_size - e.insert : i), e.high_water < e.strstart && (e.high_water = e.strstart), i = e.bi_valid + 42 >> 3, i = e.pending_buf_size - i > 65535 ? 65535 : e.pending_buf_size - i, n = i > e.w_size ? e.w_size : i, o = e.strstart - e.block_start, (o >= n || (o || t === ee) && t !== ye && e.strm.avail_in === 0 && o <= i) && (r = o > i ? i : o, a = t === ee && e.strm.avail_in === 0 && r === o ? 1 : 0, Xt(e, e.block_start, r, a), e.block_start += r, G(e.strm)), a ? $e : J);
|
|
418
|
+
}, Vt = (e, t) => {
|
|
419
419
|
let n, r;
|
|
420
420
|
for (; ; ) {
|
|
421
421
|
if (e.lookahead < ce) {
|
|
422
|
-
if (
|
|
422
|
+
if (Le(e), e.lookahead < ce && t === ye)
|
|
423
423
|
return J;
|
|
424
424
|
if (e.lookahead === 0)
|
|
425
425
|
break;
|
|
426
426
|
}
|
|
427
|
-
if (n = 0, e.lookahead >= z && (e.ins_h = be(e, e.ins_h, e.window[e.strstart + z - 1]), n = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), n !== 0 && e.strstart - n <= e.w_size - ce && (e.match_length =
|
|
427
|
+
if (n = 0, e.lookahead >= z && (e.ins_h = be(e, e.ins_h, e.window[e.strstart + z - 1]), n = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), n !== 0 && e.strstart - n <= e.w_size - ce && (e.match_length = Dr(e, n)), e.match_length >= z)
|
|
428
428
|
if (r = me(e, e.strstart - e.match_start, e.match_length - z), e.lookahead -= e.match_length, e.match_length <= e.max_lazy_match && e.lookahead >= z) {
|
|
429
429
|
e.match_length--;
|
|
430
430
|
do
|
|
@@ -438,17 +438,17 @@ const G = (e) => {
|
|
|
438
438
|
if (r && (q(e, !1), e.strm.avail_out === 0))
|
|
439
439
|
return J;
|
|
440
440
|
}
|
|
441
|
-
return e.insert = e.strstart < z - 1 ? e.strstart : z - 1, t === ee ? (q(e, !0), e.strm.avail_out === 0 ? $e :
|
|
442
|
-
},
|
|
441
|
+
return e.insert = e.strstart < z - 1 ? e.strstart : z - 1, t === ee ? (q(e, !0), e.strm.avail_out === 0 ? $e : He) : e.sym_next && (q(e, !1), e.strm.avail_out === 0) ? J : We;
|
|
442
|
+
}, Ae = (e, t) => {
|
|
443
443
|
let n, r, o;
|
|
444
444
|
for (; ; ) {
|
|
445
445
|
if (e.lookahead < ce) {
|
|
446
|
-
if (
|
|
446
|
+
if (Le(e), e.lookahead < ce && t === ye)
|
|
447
447
|
return J;
|
|
448
448
|
if (e.lookahead === 0)
|
|
449
449
|
break;
|
|
450
450
|
}
|
|
451
|
-
if (n = 0, e.lookahead >= z && (e.ins_h = be(e, e.ins_h, e.window[e.strstart + z - 1]), n = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), e.prev_length = e.match_length, e.prev_match = e.match_start, e.match_length = z - 1, n !== 0 && e.prev_length < e.max_lazy_match && e.strstart - n <= e.w_size - ce && (e.match_length =
|
|
451
|
+
if (n = 0, e.lookahead >= z && (e.ins_h = be(e, e.ins_h, e.window[e.strstart + z - 1]), n = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), e.prev_length = e.match_length, e.prev_match = e.match_start, e.match_length = z - 1, n !== 0 && e.prev_length < e.max_lazy_match && e.strstart - n <= e.w_size - ce && (e.match_length = Dr(e, n), e.match_length <= 5 && (e.strategy === pi || e.match_length === z && e.strstart - e.match_start > 4096) && (e.match_length = z - 1)), e.prev_length >= z && e.match_length <= e.prev_length) {
|
|
452
452
|
o = e.strstart + e.lookahead - z, r = me(e, e.strstart - 1 - e.prev_match, e.prev_length - z), e.lookahead -= e.prev_length - 1, e.prev_length -= 2;
|
|
453
453
|
do
|
|
454
454
|
++e.strstart <= o && (e.ins_h = be(e, e.ins_h, e.window[e.strstart + z - 1]), n = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart);
|
|
@@ -461,13 +461,13 @@ const G = (e) => {
|
|
|
461
461
|
} else
|
|
462
462
|
e.match_available = 1, e.strstart++, e.lookahead--;
|
|
463
463
|
}
|
|
464
|
-
return e.match_available && (r = me(e, 0, e.window[e.strstart - 1]), e.match_available = 0), e.insert = e.strstart < z - 1 ? e.strstart : z - 1, t === ee ? (q(e, !0), e.strm.avail_out === 0 ? $e :
|
|
465
|
-
},
|
|
464
|
+
return e.match_available && (r = me(e, 0, e.window[e.strstart - 1]), e.match_available = 0), e.insert = e.strstart < z - 1 ? e.strstart : z - 1, t === ee ? (q(e, !0), e.strm.avail_out === 0 ? $e : He) : e.sym_next && (q(e, !1), e.strm.avail_out === 0) ? J : We;
|
|
465
|
+
}, Ii = (e, t) => {
|
|
466
466
|
let n, r, o, i;
|
|
467
467
|
const a = e.window;
|
|
468
468
|
for (; ; ) {
|
|
469
469
|
if (e.lookahead <= ge) {
|
|
470
|
-
if (
|
|
470
|
+
if (Le(e), e.lookahead <= ge && t === ye)
|
|
471
471
|
return J;
|
|
472
472
|
if (e.lookahead === 0)
|
|
473
473
|
break;
|
|
@@ -482,11 +482,11 @@ const G = (e) => {
|
|
|
482
482
|
if (e.match_length >= z ? (n = me(e, 1, e.match_length - z), e.lookahead -= e.match_length, e.strstart += e.match_length, e.match_length = 0) : (n = me(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++), n && (q(e, !1), e.strm.avail_out === 0))
|
|
483
483
|
return J;
|
|
484
484
|
}
|
|
485
|
-
return e.insert = 0, t === ee ? (q(e, !0), e.strm.avail_out === 0 ? $e :
|
|
486
|
-
},
|
|
485
|
+
return e.insert = 0, t === ee ? (q(e, !0), e.strm.avail_out === 0 ? $e : He) : e.sym_next && (q(e, !1), e.strm.avail_out === 0) ? J : We;
|
|
486
|
+
}, Ni = (e, t) => {
|
|
487
487
|
let n;
|
|
488
488
|
for (; ; ) {
|
|
489
|
-
if (e.lookahead === 0 && (
|
|
489
|
+
if (e.lookahead === 0 && (Le(e), e.lookahead === 0)) {
|
|
490
490
|
if (t === ye)
|
|
491
491
|
return J;
|
|
492
492
|
break;
|
|
@@ -494,197 +494,197 @@ const G = (e) => {
|
|
|
494
494
|
if (e.match_length = 0, n = me(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++, n && (q(e, !1), e.strm.avail_out === 0))
|
|
495
495
|
return J;
|
|
496
496
|
}
|
|
497
|
-
return e.insert = 0, t === ee ? (q(e, !0), e.strm.avail_out === 0 ? $e :
|
|
497
|
+
return e.insert = 0, t === ee ? (q(e, !0), e.strm.avail_out === 0 ? $e : He) : e.sym_next && (q(e, !1), e.strm.avail_out === 0) ? J : We;
|
|
498
498
|
};
|
|
499
499
|
function oe(e, t, n, r, o) {
|
|
500
500
|
this.good_length = e, this.max_lazy = t, this.nice_length = n, this.max_chain = r, this.func = o;
|
|
501
501
|
}
|
|
502
|
-
const
|
|
502
|
+
const Ye = [
|
|
503
503
|
/* good lazy nice chain */
|
|
504
|
-
new oe(0, 0, 0, 0,
|
|
504
|
+
new oe(0, 0, 0, 0, Cr),
|
|
505
505
|
/* 0 store only */
|
|
506
|
-
new oe(4, 4, 8, 4,
|
|
506
|
+
new oe(4, 4, 8, 4, Vt),
|
|
507
507
|
/* 1 max speed, no lazy matches */
|
|
508
|
-
new oe(4, 5, 16, 8,
|
|
508
|
+
new oe(4, 5, 16, 8, Vt),
|
|
509
509
|
/* 2 */
|
|
510
|
-
new oe(4, 6, 32, 32,
|
|
510
|
+
new oe(4, 6, 32, 32, Vt),
|
|
511
511
|
/* 3 */
|
|
512
|
-
new oe(4, 4, 16, 16,
|
|
512
|
+
new oe(4, 4, 16, 16, Ae),
|
|
513
513
|
/* 4 lazy matches */
|
|
514
|
-
new oe(8, 16, 32, 32,
|
|
514
|
+
new oe(8, 16, 32, 32, Ae),
|
|
515
515
|
/* 5 */
|
|
516
|
-
new oe(8, 16, 128, 128,
|
|
516
|
+
new oe(8, 16, 128, 128, Ae),
|
|
517
517
|
/* 6 */
|
|
518
|
-
new oe(8, 32, 128, 256,
|
|
518
|
+
new oe(8, 32, 128, 256, Ae),
|
|
519
519
|
/* 7 */
|
|
520
|
-
new oe(32, 128, 258, 1024,
|
|
520
|
+
new oe(32, 128, 258, 1024, Ae),
|
|
521
521
|
/* 8 */
|
|
522
|
-
new oe(32, 258, 258, 4096,
|
|
522
|
+
new oe(32, 258, 258, 4096, Ae)
|
|
523
523
|
/* 9 max compression */
|
|
524
|
-
],
|
|
525
|
-
e.window_size = 2 * e.w_size, _e(e.head), e.max_lazy_match =
|
|
524
|
+
], Pi = (e) => {
|
|
525
|
+
e.window_size = 2 * e.w_size, _e(e.head), e.max_lazy_match = Ye[e.level].max_lazy, e.good_match = Ye[e.level].good_length, e.nice_match = Ye[e.level].nice_length, e.max_chain_length = Ye[e.level].max_chain, e.strstart = 0, e.block_start = 0, e.lookahead = 0, e.insert = 0, e.match_length = e.prev_length = z - 1, e.match_available = 0, e.ins_h = 0;
|
|
526
526
|
};
|
|
527
|
-
function
|
|
528
|
-
this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method =
|
|
527
|
+
function Ri() {
|
|
528
|
+
this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = Nt, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new Uint16Array(Ti * 2), this.dyn_dtree = new Uint16Array((2 * Si + 1) * 2), this.bl_tree = new Uint16Array((2 * Ei + 1) * 2), _e(this.dyn_ltree), _e(this.dyn_dtree), _e(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new Uint16Array($i + 1), this.heap = new Uint16Array(2 * Yt + 1), _e(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new Uint16Array(2 * Yt + 1), _e(this.depth), this.sym_buf = 0, this.lit_bufsize = 0, this.sym_next = 0, this.sym_end = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;
|
|
529
529
|
}
|
|
530
|
-
const
|
|
530
|
+
const ht = (e) => {
|
|
531
531
|
if (!e)
|
|
532
532
|
return 1;
|
|
533
533
|
const t = e.state;
|
|
534
|
-
return !t || t.strm !== e || t.status !==
|
|
535
|
-
t.status !==
|
|
536
|
-
t.status !==
|
|
537
|
-
},
|
|
538
|
-
if (
|
|
534
|
+
return !t || t.strm !== e || t.status !== Ue && //#ifdef GZIP
|
|
535
|
+
t.status !== yn && //#endif
|
|
536
|
+
t.status !== Qt && t.status !== en && t.status !== tn && t.status !== nn && t.status !== Ee && t.status !== Xe ? 1 : 0;
|
|
537
|
+
}, Fr = (e) => {
|
|
538
|
+
if (ht(e))
|
|
539
539
|
return Te(e, se);
|
|
540
|
-
e.total_in = e.total_out = 0, e.data_type =
|
|
540
|
+
e.total_in = e.total_out = 0, e.data_type = yi;
|
|
541
541
|
const t = e.state;
|
|
542
542
|
return t.pending = 0, t.pending_out = 0, t.wrap < 0 && (t.wrap = -t.wrap), t.status = //#ifdef GZIP
|
|
543
|
-
t.wrap === 2 ?
|
|
543
|
+
t.wrap === 2 ? yn : (
|
|
544
544
|
//#endif
|
|
545
|
-
t.wrap ?
|
|
546
|
-
), e.adler = t.wrap === 2 ? 0 : 1, t.last_flush = -2,
|
|
547
|
-
},
|
|
548
|
-
const t =
|
|
549
|
-
return t ===
|
|
550
|
-
},
|
|
545
|
+
t.wrap ? Ue : Ee
|
|
546
|
+
), e.adler = t.wrap === 2 ? 0 : 1, t.last_flush = -2, si(t), C;
|
|
547
|
+
}, jr = (e) => {
|
|
548
|
+
const t = Fr(e);
|
|
549
|
+
return t === C && Pi(e.state), t;
|
|
550
|
+
}, Di = (e, t) => ht(e) || e.state.wrap !== 2 ? se : (e.state.gzhead = t, C), Ur = (e, t, n, r, o, i) => {
|
|
551
551
|
if (!e)
|
|
552
552
|
return se;
|
|
553
553
|
let a = 1;
|
|
554
|
-
if (t ===
|
|
554
|
+
if (t === hi && (t = 6), r < 0 ? (a = 0, r = -r) : r > 15 && (a = 2, r -= 16), o < 1 || o > bi || n !== Nt || r < 8 || r > 15 || t < 0 || t > 9 || i < 0 || i > gi || r === 8 && a !== 1)
|
|
555
555
|
return Te(e, se);
|
|
556
556
|
r === 8 && (r = 9);
|
|
557
|
-
const s = new
|
|
558
|
-
return e.state = s, s.strm = e, s.status =
|
|
559
|
-
},
|
|
560
|
-
if (
|
|
557
|
+
const s = new Ri();
|
|
558
|
+
return e.state = s, s.strm = e, s.status = Ue, s.wrap = a, s.gzhead = null, s.w_bits = r, s.w_size = 1 << s.w_bits, s.w_mask = s.w_size - 1, s.hash_bits = o + 7, s.hash_size = 1 << s.hash_bits, s.hash_mask = s.hash_size - 1, s.hash_shift = ~~((s.hash_bits + z - 1) / z), s.window = new Uint8Array(s.w_size * 2), s.head = new Uint16Array(s.hash_size), s.prev = new Uint16Array(s.w_size), s.lit_bufsize = 1 << o + 6, s.pending_buf_size = s.lit_bufsize * 4, s.pending_buf = new Uint8Array(s.pending_buf_size), s.sym_buf = s.lit_bufsize, s.sym_end = (s.lit_bufsize - 1) * 3, s.level = t, s.strategy = i, s.method = n, jr(e);
|
|
559
|
+
}, Ci = (e, t) => Ur(e, t, Nt, wi, vi, mi), Fi = (e, t) => {
|
|
560
|
+
if (ht(e) || t > Cn || t < 0)
|
|
561
561
|
return e ? Te(e, se) : se;
|
|
562
562
|
const n = e.state;
|
|
563
|
-
if (!e.output || e.avail_in !== 0 && !e.input || n.status ===
|
|
564
|
-
return Te(e, e.avail_out === 0 ?
|
|
563
|
+
if (!e.output || e.avail_in !== 0 && !e.input || n.status === Xe && t !== ee)
|
|
564
|
+
return Te(e, e.avail_out === 0 ? Bt : se);
|
|
565
565
|
const r = n.last_flush;
|
|
566
566
|
if (n.last_flush = t, n.pending !== 0) {
|
|
567
567
|
if (G(e), e.avail_out === 0)
|
|
568
|
-
return n.last_flush = -1,
|
|
569
|
-
} else if (e.avail_in === 0 &&
|
|
570
|
-
return Te(e,
|
|
571
|
-
if (n.status ===
|
|
572
|
-
return Te(e,
|
|
573
|
-
if (n.status ===
|
|
574
|
-
let o =
|
|
575
|
-
if (n.strategy >=
|
|
576
|
-
return n.last_flush = -1,
|
|
568
|
+
return n.last_flush = -1, C;
|
|
569
|
+
} else if (e.avail_in === 0 && jn(t) <= jn(r) && t !== ee)
|
|
570
|
+
return Te(e, Bt);
|
|
571
|
+
if (n.status === Xe && e.avail_in !== 0)
|
|
572
|
+
return Te(e, Bt);
|
|
573
|
+
if (n.status === Ue && n.wrap === 0 && (n.status = Ee), n.status === Ue) {
|
|
574
|
+
let o = Nt + (n.w_bits - 8 << 4) << 8, i = -1;
|
|
575
|
+
if (n.strategy >= yt || n.level < 2 ? i = 0 : n.level < 6 ? i = 1 : n.level === 6 ? i = 2 : i = 3, o |= i << 6, n.strstart !== 0 && (o |= Zi), o += 31 - o % 31, qe(n, o), n.strstart !== 0 && (qe(n, e.adler >>> 16), qe(n, e.adler & 65535)), e.adler = 1, n.status = Ee, G(e), n.pending !== 0)
|
|
576
|
+
return n.last_flush = -1, C;
|
|
577
577
|
}
|
|
578
|
-
if (n.status ===
|
|
578
|
+
if (n.status === yn) {
|
|
579
579
|
if (e.adler = 0, $(n, 31), $(n, 139), $(n, 8), n.gzhead)
|
|
580
580
|
$(
|
|
581
581
|
n,
|
|
582
582
|
(n.gzhead.text ? 1 : 0) + (n.gzhead.hcrc ? 2 : 0) + (n.gzhead.extra ? 4 : 0) + (n.gzhead.name ? 8 : 0) + (n.gzhead.comment ? 16 : 0)
|
|
583
|
-
), $(n, n.gzhead.time & 255), $(n, n.gzhead.time >> 8 & 255), $(n, n.gzhead.time >> 16 & 255), $(n, n.gzhead.time >> 24 & 255), $(n, n.level === 9 ? 2 : n.strategy >=
|
|
584
|
-
else if ($(n, 0), $(n, 0), $(n, 0), $(n, 0), $(n, 0), $(n, n.level === 9 ? 2 : n.strategy >=
|
|
585
|
-
return n.last_flush = -1,
|
|
583
|
+
), $(n, n.gzhead.time & 255), $(n, n.gzhead.time >> 8 & 255), $(n, n.gzhead.time >> 16 & 255), $(n, n.gzhead.time >> 24 & 255), $(n, n.level === 9 ? 2 : n.strategy >= yt || n.level < 2 ? 4 : 0), $(n, n.gzhead.os & 255), n.gzhead.extra && n.gzhead.extra.length && ($(n, n.gzhead.extra.length & 255), $(n, n.gzhead.extra.length >> 8 & 255)), n.gzhead.hcrc && (e.adler = pe(e.adler, n.pending_buf, n.pending, 0)), n.gzindex = 0, n.status = Qt;
|
|
584
|
+
else if ($(n, 0), $(n, 0), $(n, 0), $(n, 0), $(n, 0), $(n, n.level === 9 ? 2 : n.strategy >= yt || n.level < 2 ? 4 : 0), $(n, Oi), n.status = Ee, G(e), n.pending !== 0)
|
|
585
|
+
return n.last_flush = -1, C;
|
|
586
586
|
}
|
|
587
|
-
if (n.status ===
|
|
587
|
+
if (n.status === Qt) {
|
|
588
588
|
if (n.gzhead.extra) {
|
|
589
589
|
let o = n.pending, i = (n.gzhead.extra.length & 65535) - n.gzindex;
|
|
590
590
|
for (; n.pending + i > n.pending_buf_size; ) {
|
|
591
591
|
let s = n.pending_buf_size - n.pending;
|
|
592
592
|
if (n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex, n.gzindex + s), n.pending), n.pending = n.pending_buf_size, n.gzhead.hcrc && n.pending > o && (e.adler = pe(e.adler, n.pending_buf, n.pending - o, o)), n.gzindex += s, G(e), n.pending !== 0)
|
|
593
|
-
return n.last_flush = -1,
|
|
593
|
+
return n.last_flush = -1, C;
|
|
594
594
|
o = 0, i -= s;
|
|
595
595
|
}
|
|
596
596
|
let a = new Uint8Array(n.gzhead.extra);
|
|
597
597
|
n.pending_buf.set(a.subarray(n.gzindex, n.gzindex + i), n.pending), n.pending += i, n.gzhead.hcrc && n.pending > o && (e.adler = pe(e.adler, n.pending_buf, n.pending - o, o)), n.gzindex = 0;
|
|
598
598
|
}
|
|
599
|
-
n.status =
|
|
599
|
+
n.status = en;
|
|
600
600
|
}
|
|
601
|
-
if (n.status ===
|
|
601
|
+
if (n.status === en) {
|
|
602
602
|
if (n.gzhead.name) {
|
|
603
603
|
let o = n.pending, i;
|
|
604
604
|
do {
|
|
605
605
|
if (n.pending === n.pending_buf_size) {
|
|
606
606
|
if (n.gzhead.hcrc && n.pending > o && (e.adler = pe(e.adler, n.pending_buf, n.pending - o, o)), G(e), n.pending !== 0)
|
|
607
|
-
return n.last_flush = -1,
|
|
607
|
+
return n.last_flush = -1, C;
|
|
608
608
|
o = 0;
|
|
609
609
|
}
|
|
610
610
|
n.gzindex < n.gzhead.name.length ? i = n.gzhead.name.charCodeAt(n.gzindex++) & 255 : i = 0, $(n, i);
|
|
611
611
|
} while (i !== 0);
|
|
612
612
|
n.gzhead.hcrc && n.pending > o && (e.adler = pe(e.adler, n.pending_buf, n.pending - o, o)), n.gzindex = 0;
|
|
613
613
|
}
|
|
614
|
-
n.status =
|
|
614
|
+
n.status = tn;
|
|
615
615
|
}
|
|
616
|
-
if (n.status ===
|
|
616
|
+
if (n.status === tn) {
|
|
617
617
|
if (n.gzhead.comment) {
|
|
618
618
|
let o = n.pending, i;
|
|
619
619
|
do {
|
|
620
620
|
if (n.pending === n.pending_buf_size) {
|
|
621
621
|
if (n.gzhead.hcrc && n.pending > o && (e.adler = pe(e.adler, n.pending_buf, n.pending - o, o)), G(e), n.pending !== 0)
|
|
622
|
-
return n.last_flush = -1,
|
|
622
|
+
return n.last_flush = -1, C;
|
|
623
623
|
o = 0;
|
|
624
624
|
}
|
|
625
625
|
n.gzindex < n.gzhead.comment.length ? i = n.gzhead.comment.charCodeAt(n.gzindex++) & 255 : i = 0, $(n, i);
|
|
626
626
|
} while (i !== 0);
|
|
627
627
|
n.gzhead.hcrc && n.pending > o && (e.adler = pe(e.adler, n.pending_buf, n.pending - o, o));
|
|
628
628
|
}
|
|
629
|
-
n.status =
|
|
629
|
+
n.status = nn;
|
|
630
630
|
}
|
|
631
|
-
if (n.status ===
|
|
631
|
+
if (n.status === nn) {
|
|
632
632
|
if (n.gzhead.hcrc) {
|
|
633
633
|
if (n.pending + 2 > n.pending_buf_size && (G(e), n.pending !== 0))
|
|
634
|
-
return n.last_flush = -1,
|
|
634
|
+
return n.last_flush = -1, C;
|
|
635
635
|
$(n, e.adler & 255), $(n, e.adler >> 8 & 255), e.adler = 0;
|
|
636
636
|
}
|
|
637
637
|
if (n.status = Ee, G(e), n.pending !== 0)
|
|
638
|
-
return n.last_flush = -1,
|
|
638
|
+
return n.last_flush = -1, C;
|
|
639
639
|
}
|
|
640
|
-
if (e.avail_in !== 0 || n.lookahead !== 0 || t !== ye && n.status !==
|
|
641
|
-
let o = n.level === 0 ?
|
|
642
|
-
if ((o === $e || o ===
|
|
643
|
-
return e.avail_out === 0 && (n.last_flush = -1),
|
|
644
|
-
if (o ===
|
|
645
|
-
return n.last_flush = -1,
|
|
640
|
+
if (e.avail_in !== 0 || n.lookahead !== 0 || t !== ye && n.status !== Xe) {
|
|
641
|
+
let o = n.level === 0 ? Cr(n, t) : n.strategy === yt ? Ni(n, t) : n.strategy === _i ? Ii(n, t) : Ye[n.level].func(n, t);
|
|
642
|
+
if ((o === $e || o === He) && (n.status = Xe), o === J || o === $e)
|
|
643
|
+
return e.avail_out === 0 && (n.last_flush = -1), C;
|
|
644
|
+
if (o === We && (t === li ? ui(n) : t !== Cn && (Xt(n, 0, 0, !1), t === fi && (_e(n.head), n.lookahead === 0 && (n.strstart = 0, n.block_start = 0, n.insert = 0))), G(e), e.avail_out === 0))
|
|
645
|
+
return n.last_flush = -1, C;
|
|
646
646
|
}
|
|
647
|
-
return t !== ee ?
|
|
648
|
-
},
|
|
649
|
-
if (
|
|
647
|
+
return t !== ee ? C : n.wrap <= 0 ? Fn : (n.wrap === 2 ? ($(n, e.adler & 255), $(n, e.adler >> 8 & 255), $(n, e.adler >> 16 & 255), $(n, e.adler >> 24 & 255), $(n, e.total_in & 255), $(n, e.total_in >> 8 & 255), $(n, e.total_in >> 16 & 255), $(n, e.total_in >> 24 & 255)) : (qe(n, e.adler >>> 16), qe(n, e.adler & 65535)), G(e), n.wrap > 0 && (n.wrap = -n.wrap), n.pending !== 0 ? C : Fn);
|
|
648
|
+
}, ji = (e) => {
|
|
649
|
+
if (ht(e))
|
|
650
650
|
return se;
|
|
651
651
|
const t = e.state.status;
|
|
652
|
-
return e.state = null, t === Ee ? Te(e,
|
|
653
|
-
},
|
|
652
|
+
return e.state = null, t === Ee ? Te(e, di) : C;
|
|
653
|
+
}, Ui = (e, t) => {
|
|
654
654
|
let n = t.length;
|
|
655
|
-
if (
|
|
655
|
+
if (ht(e))
|
|
656
656
|
return se;
|
|
657
657
|
const r = e.state, o = r.wrap;
|
|
658
|
-
if (o === 2 || o === 1 && r.status !==
|
|
658
|
+
if (o === 2 || o === 1 && r.status !== Ue || r.lookahead)
|
|
659
659
|
return se;
|
|
660
|
-
if (o === 1 && (e.adler =
|
|
660
|
+
if (o === 1 && (e.adler = Pr(e.adler, t, n, 0)), r.wrap = 0, n >= r.w_size) {
|
|
661
661
|
o === 0 && (_e(r.head), r.strstart = 0, r.block_start = 0, r.insert = 0);
|
|
662
662
|
let c = new Uint8Array(r.w_size);
|
|
663
663
|
c.set(t.subarray(n - r.w_size, n), 0), t = c, n = r.w_size;
|
|
664
664
|
}
|
|
665
665
|
const i = e.avail_in, a = e.next_in, s = e.input;
|
|
666
|
-
for (e.avail_in = n, e.next_in = 0, e.input = t,
|
|
666
|
+
for (e.avail_in = n, e.next_in = 0, e.input = t, Le(r); r.lookahead >= z; ) {
|
|
667
667
|
let c = r.strstart, u = r.lookahead - (z - 1);
|
|
668
668
|
do
|
|
669
669
|
r.ins_h = be(r, r.ins_h, r.window[c + z - 1]), r.prev[c & r.w_mask] = r.head[r.ins_h], r.head[r.ins_h] = c, c++;
|
|
670
670
|
while (--u);
|
|
671
|
-
r.strstart = c, r.lookahead = z - 1,
|
|
671
|
+
r.strstart = c, r.lookahead = z - 1, Le(r);
|
|
672
672
|
}
|
|
673
|
-
return r.strstart += r.lookahead, r.block_start = r.strstart, r.insert = r.lookahead, r.lookahead = 0, r.match_length = r.prev_length = z - 1, r.match_available = 0, e.next_in = a, e.input = s, e.avail_in = i, r.wrap = o,
|
|
673
|
+
return r.strstart += r.lookahead, r.block_start = r.strstart, r.insert = r.lookahead, r.lookahead = 0, r.match_length = r.prev_length = z - 1, r.match_available = 0, e.next_in = a, e.input = s, e.avail_in = i, r.wrap = o, C;
|
|
674
674
|
};
|
|
675
|
-
var
|
|
676
|
-
deflateInit:
|
|
677
|
-
deflateInit2:
|
|
678
|
-
deflateReset:
|
|
679
|
-
deflateResetKeep:
|
|
680
|
-
deflateSetHeader:
|
|
681
|
-
deflate:
|
|
682
|
-
deflateEnd:
|
|
683
|
-
deflateSetDictionary:
|
|
684
|
-
deflateInfo:
|
|
675
|
+
var Li = Ci, Mi = Ur, Ji = jr, Bi = Fr, Vi = Di, Wi = Fi, Hi = ji, Ki = Ui, Gi = "pako deflate (from Nodeca project)", rt = {
|
|
676
|
+
deflateInit: Li,
|
|
677
|
+
deflateInit2: Mi,
|
|
678
|
+
deflateReset: Ji,
|
|
679
|
+
deflateResetKeep: Bi,
|
|
680
|
+
deflateSetHeader: Vi,
|
|
681
|
+
deflate: Wi,
|
|
682
|
+
deflateEnd: Hi,
|
|
683
|
+
deflateSetDictionary: Ki,
|
|
684
|
+
deflateInfo: Gi
|
|
685
685
|
};
|
|
686
|
-
const
|
|
687
|
-
var
|
|
686
|
+
const qi = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
|
|
687
|
+
var Xi = function(e) {
|
|
688
688
|
const t = Array.prototype.slice.call(arguments, 1);
|
|
689
689
|
for (; t.length; ) {
|
|
690
690
|
const n = t.shift();
|
|
@@ -692,11 +692,11 @@ var Hi = function(e) {
|
|
|
692
692
|
if (typeof n != "object")
|
|
693
693
|
throw new TypeError(n + "must be non-object");
|
|
694
694
|
for (const r in n)
|
|
695
|
-
|
|
695
|
+
qi(n, r) && (e[r] = n[r]);
|
|
696
696
|
}
|
|
697
697
|
}
|
|
698
698
|
return e;
|
|
699
|
-
},
|
|
699
|
+
}, Yi = (e) => {
|
|
700
700
|
let t = 0;
|
|
701
701
|
for (let r = 0, o = e.length; r < o; r++)
|
|
702
702
|
t += e[r].length;
|
|
@@ -706,21 +706,21 @@ var Hi = function(e) {
|
|
|
706
706
|
n.set(a, o), o += a.length;
|
|
707
707
|
}
|
|
708
708
|
return n;
|
|
709
|
-
},
|
|
710
|
-
assign:
|
|
711
|
-
flattenChunks:
|
|
709
|
+
}, Lr = {
|
|
710
|
+
assign: Xi,
|
|
711
|
+
flattenChunks: Yi
|
|
712
712
|
};
|
|
713
|
-
let
|
|
713
|
+
let Mr = !0;
|
|
714
714
|
try {
|
|
715
715
|
String.fromCharCode.apply(null, new Uint8Array(1));
|
|
716
716
|
} catch (e) {
|
|
717
|
-
|
|
717
|
+
Mr = !1;
|
|
718
718
|
}
|
|
719
|
-
const
|
|
719
|
+
const ct = new Uint8Array(256);
|
|
720
720
|
for (let e = 0; e < 256; e++)
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
var
|
|
721
|
+
ct[e] = e >= 252 ? 6 : e >= 248 ? 5 : e >= 240 ? 4 : e >= 224 ? 3 : e >= 192 ? 2 : 1;
|
|
722
|
+
ct[254] = ct[254] = 1;
|
|
723
|
+
var Qi = (e) => {
|
|
724
724
|
if (typeof TextEncoder == "function" && TextEncoder.prototype.encode)
|
|
725
725
|
return new TextEncoder().encode(e);
|
|
726
726
|
let t, n, r, o, i, a = e.length, s = 0;
|
|
@@ -730,15 +730,15 @@ var Gi = (e) => {
|
|
|
730
730
|
n = e.charCodeAt(o), (n & 64512) === 55296 && o + 1 < a && (r = e.charCodeAt(o + 1), (r & 64512) === 56320 && (n = 65536 + (n - 55296 << 10) + (r - 56320), o++)), n < 128 ? t[i++] = n : n < 2048 ? (t[i++] = 192 | n >>> 6, t[i++] = 128 | n & 63) : n < 65536 ? (t[i++] = 224 | n >>> 12, t[i++] = 128 | n >>> 6 & 63, t[i++] = 128 | n & 63) : (t[i++] = 240 | n >>> 18, t[i++] = 128 | n >>> 12 & 63, t[i++] = 128 | n >>> 6 & 63, t[i++] = 128 | n & 63);
|
|
731
731
|
return t;
|
|
732
732
|
};
|
|
733
|
-
const
|
|
734
|
-
if (t < 65534 && e.subarray &&
|
|
733
|
+
const ea = (e, t) => {
|
|
734
|
+
if (t < 65534 && e.subarray && Mr)
|
|
735
735
|
return String.fromCharCode.apply(null, e.length === t ? e : e.subarray(0, t));
|
|
736
736
|
let n = "";
|
|
737
737
|
for (let r = 0; r < t; r++)
|
|
738
738
|
n += String.fromCharCode(e[r]);
|
|
739
739
|
return n;
|
|
740
740
|
};
|
|
741
|
-
var
|
|
741
|
+
var ta = (e, t) => {
|
|
742
742
|
const n = t || e.length;
|
|
743
743
|
if (typeof TextDecoder == "function" && TextDecoder.prototype.decode)
|
|
744
744
|
return new TextDecoder().decode(e.subarray(0, t));
|
|
@@ -750,7 +750,7 @@ var Xi = (e, t) => {
|
|
|
750
750
|
i[o++] = a;
|
|
751
751
|
continue;
|
|
752
752
|
}
|
|
753
|
-
let s =
|
|
753
|
+
let s = ct[a];
|
|
754
754
|
if (s > 4) {
|
|
755
755
|
i[o++] = 65533, r += s - 1;
|
|
756
756
|
continue;
|
|
@@ -763,45 +763,45 @@ var Xi = (e, t) => {
|
|
|
763
763
|
}
|
|
764
764
|
a < 65536 ? i[o++] = a : (a -= 65536, i[o++] = 55296 | a >> 10 & 1023, i[o++] = 56320 | a & 1023);
|
|
765
765
|
}
|
|
766
|
-
return
|
|
767
|
-
},
|
|
766
|
+
return ea(i, o);
|
|
767
|
+
}, na = (e, t) => {
|
|
768
768
|
t = t || e.length, t > e.length && (t = e.length);
|
|
769
769
|
let n = t - 1;
|
|
770
770
|
for (; n >= 0 && (e[n] & 192) === 128; )
|
|
771
771
|
n--;
|
|
772
|
-
return n < 0 || n === 0 ? t : n +
|
|
773
|
-
},
|
|
774
|
-
string2buf:
|
|
775
|
-
buf2string:
|
|
776
|
-
utf8border:
|
|
772
|
+
return n < 0 || n === 0 ? t : n + ct[e[n]] > t ? n : t;
|
|
773
|
+
}, Jr = {
|
|
774
|
+
string2buf: Qi,
|
|
775
|
+
buf2string: ta,
|
|
776
|
+
utf8border: na
|
|
777
777
|
};
|
|
778
|
-
function
|
|
778
|
+
function ra() {
|
|
779
779
|
this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = "", this.state = null, this.data_type = 2, this.adler = 0;
|
|
780
780
|
}
|
|
781
|
-
var
|
|
782
|
-
const
|
|
783
|
-
Z_NO_FLUSH:
|
|
784
|
-
Z_SYNC_FLUSH:
|
|
785
|
-
Z_FULL_FLUSH:
|
|
786
|
-
Z_FINISH:
|
|
787
|
-
Z_OK:
|
|
788
|
-
Z_STREAM_END:
|
|
789
|
-
Z_DEFAULT_COMPRESSION:
|
|
790
|
-
Z_DEFAULT_STRATEGY:
|
|
791
|
-
Z_DEFLATED:
|
|
792
|
-
} =
|
|
793
|
-
function
|
|
794
|
-
this.options =
|
|
795
|
-
level:
|
|
796
|
-
method:
|
|
781
|
+
var oa = ra;
|
|
782
|
+
const Br = Object.prototype.toString, {
|
|
783
|
+
Z_NO_FLUSH: ia,
|
|
784
|
+
Z_SYNC_FLUSH: aa,
|
|
785
|
+
Z_FULL_FLUSH: sa,
|
|
786
|
+
Z_FINISH: ca,
|
|
787
|
+
Z_OK: Zt,
|
|
788
|
+
Z_STREAM_END: ua,
|
|
789
|
+
Z_DEFAULT_COMPRESSION: la,
|
|
790
|
+
Z_DEFAULT_STRATEGY: fa,
|
|
791
|
+
Z_DEFLATED: da
|
|
792
|
+
} = Rr;
|
|
793
|
+
function Pt(e) {
|
|
794
|
+
this.options = Lr.assign({
|
|
795
|
+
level: la,
|
|
796
|
+
method: da,
|
|
797
797
|
chunkSize: 16384,
|
|
798
798
|
windowBits: 15,
|
|
799
799
|
memLevel: 8,
|
|
800
|
-
strategy:
|
|
800
|
+
strategy: fa
|
|
801
801
|
}, e || {});
|
|
802
802
|
let t = this.options;
|
|
803
|
-
t.raw && t.windowBits > 0 ? t.windowBits = -t.windowBits : t.gzip && t.windowBits > 0 && t.windowBits < 16 && (t.windowBits += 16), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new
|
|
804
|
-
let n =
|
|
803
|
+
t.raw && t.windowBits > 0 ? t.windowBits = -t.windowBits : t.gzip && t.windowBits > 0 && t.windowBits < 16 && (t.windowBits += 16), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new oa(), this.strm.avail_out = 0;
|
|
804
|
+
let n = rt.deflateInit2(
|
|
805
805
|
this.strm,
|
|
806
806
|
t.level,
|
|
807
807
|
t.method,
|
|
@@ -809,27 +809,27 @@ function At(e) {
|
|
|
809
809
|
t.memLevel,
|
|
810
810
|
t.strategy
|
|
811
811
|
);
|
|
812
|
-
if (n !==
|
|
813
|
-
throw new Error(
|
|
814
|
-
if (t.header &&
|
|
812
|
+
if (n !== Zt)
|
|
813
|
+
throw new Error($t[n]);
|
|
814
|
+
if (t.header && rt.deflateSetHeader(this.strm, t.header), t.dictionary) {
|
|
815
815
|
let r;
|
|
816
|
-
if (typeof t.dictionary == "string" ? r =
|
|
817
|
-
throw new Error(
|
|
816
|
+
if (typeof t.dictionary == "string" ? r = Jr.string2buf(t.dictionary) : Br.call(t.dictionary) === "[object ArrayBuffer]" ? r = new Uint8Array(t.dictionary) : r = t.dictionary, n = rt.deflateSetDictionary(this.strm, r), n !== Zt)
|
|
817
|
+
throw new Error($t[n]);
|
|
818
818
|
this._dict_set = !0;
|
|
819
819
|
}
|
|
820
820
|
}
|
|
821
|
-
|
|
821
|
+
Pt.prototype.push = function(e, t) {
|
|
822
822
|
const n = this.strm, r = this.options.chunkSize;
|
|
823
823
|
let o, i;
|
|
824
824
|
if (this.ended)
|
|
825
825
|
return !1;
|
|
826
|
-
for (t === ~~t ? i = t : i = t === !0 ?
|
|
827
|
-
if (n.avail_out === 0 && (n.output = new Uint8Array(r), n.next_out = 0, n.avail_out = r), (i ===
|
|
826
|
+
for (t === ~~t ? i = t : i = t === !0 ? ca : ia, typeof e == "string" ? n.input = Jr.string2buf(e) : Br.call(e) === "[object ArrayBuffer]" ? n.input = new Uint8Array(e) : n.input = e, n.next_in = 0, n.avail_in = n.input.length; ; ) {
|
|
827
|
+
if (n.avail_out === 0 && (n.output = new Uint8Array(r), n.next_out = 0, n.avail_out = r), (i === aa || i === sa) && n.avail_out <= 6) {
|
|
828
828
|
this.onData(n.output.subarray(0, n.next_out)), n.avail_out = 0;
|
|
829
829
|
continue;
|
|
830
830
|
}
|
|
831
|
-
if (o =
|
|
832
|
-
return n.next_out > 0 && this.onData(n.output.subarray(0, n.next_out)), o =
|
|
831
|
+
if (o = rt.deflate(n, i), o === ua)
|
|
832
|
+
return n.next_out > 0 && this.onData(n.output.subarray(0, n.next_out)), o = rt.deflateEnd(this.strm), this.onEnd(o), this.ended = !0, o === Zt;
|
|
833
833
|
if (n.avail_out === 0) {
|
|
834
834
|
this.onData(n.output);
|
|
835
835
|
continue;
|
|
@@ -842,26 +842,26 @@ At.prototype.push = function(e, t) {
|
|
|
842
842
|
}
|
|
843
843
|
return !0;
|
|
844
844
|
};
|
|
845
|
-
|
|
845
|
+
Pt.prototype.onData = function(e) {
|
|
846
846
|
this.chunks.push(e);
|
|
847
847
|
};
|
|
848
|
-
|
|
849
|
-
e ===
|
|
848
|
+
Pt.prototype.onEnd = function(e) {
|
|
849
|
+
e === Zt && (this.result = Lr.flattenChunks(this.chunks)), this.chunks = [], this.err = e, this.msg = this.strm.msg;
|
|
850
850
|
};
|
|
851
|
-
function
|
|
852
|
-
const n = new
|
|
851
|
+
function ha(e, t) {
|
|
852
|
+
const n = new Pt(t);
|
|
853
853
|
if (n.push(e, !0), n.err)
|
|
854
|
-
throw n.msg ||
|
|
854
|
+
throw n.msg || $t[n.err];
|
|
855
855
|
return n.result;
|
|
856
856
|
}
|
|
857
|
-
function
|
|
858
|
-
return t = t || {}, t.gzip = !0,
|
|
857
|
+
function pa(e, t) {
|
|
858
|
+
return t = t || {}, t.gzip = !0, ha(e, t);
|
|
859
859
|
}
|
|
860
|
-
var
|
|
861
|
-
gzip:
|
|
860
|
+
var _a = pa, ga = {
|
|
861
|
+
gzip: _a
|
|
862
862
|
};
|
|
863
|
-
const { gzip:
|
|
864
|
-
var
|
|
863
|
+
const { gzip: ma } = ga;
|
|
864
|
+
var ya = ma;
|
|
865
865
|
class he extends Error {
|
|
866
866
|
constructor({
|
|
867
867
|
name: t,
|
|
@@ -872,61 +872,61 @@ class he extends Error {
|
|
|
872
872
|
super(), this.name = t, this.message = n, this.detail = o, this.status = r;
|
|
873
873
|
}
|
|
874
874
|
}
|
|
875
|
-
class
|
|
875
|
+
class ba extends Error {
|
|
876
876
|
constructor() {
|
|
877
877
|
super("Malformatted Figma Token");
|
|
878
878
|
}
|
|
879
879
|
}
|
|
880
|
-
class
|
|
880
|
+
class wa extends Error {
|
|
881
881
|
constructor() {
|
|
882
882
|
super("Missing Figma Token");
|
|
883
883
|
}
|
|
884
884
|
}
|
|
885
|
-
class
|
|
885
|
+
class Un extends Error {
|
|
886
886
|
constructor() {
|
|
887
887
|
super("Needs Reauth Figma Token");
|
|
888
888
|
}
|
|
889
889
|
}
|
|
890
|
-
class
|
|
890
|
+
class Ln extends Error {
|
|
891
891
|
constructor() {
|
|
892
892
|
super("Expired Figma Token");
|
|
893
893
|
}
|
|
894
894
|
}
|
|
895
|
-
class
|
|
895
|
+
class Mn extends Error {
|
|
896
896
|
constructor() {
|
|
897
897
|
super("File Not Exportable");
|
|
898
898
|
}
|
|
899
899
|
}
|
|
900
|
-
class
|
|
900
|
+
class Jn extends Error {
|
|
901
901
|
constructor({ reason: t }) {
|
|
902
902
|
super("Unknown Forbidden Figma Error"), this.reason = t;
|
|
903
903
|
}
|
|
904
904
|
}
|
|
905
|
-
const
|
|
906
|
-
class
|
|
905
|
+
const Vr = "Not Found";
|
|
906
|
+
class va extends Error {
|
|
907
907
|
constructor({ cause: t }) {
|
|
908
|
-
super(
|
|
908
|
+
super(Vr), this.cause = t;
|
|
909
909
|
}
|
|
910
910
|
}
|
|
911
|
-
const
|
|
912
|
-
class
|
|
911
|
+
const Kf = (e) => e.message === Vr, Wr = "Unknown Figma API Exception";
|
|
912
|
+
class ka extends Error {
|
|
913
913
|
constructor({ cause: t }) {
|
|
914
|
-
super(
|
|
914
|
+
super(Wr), this.cause = t;
|
|
915
915
|
}
|
|
916
916
|
}
|
|
917
|
-
const
|
|
918
|
-
class
|
|
917
|
+
const Gf = (e) => e.message === Wr, Hr = "Rate Limit Exceeded";
|
|
918
|
+
class Bn extends Error {
|
|
919
919
|
constructor({ cause: t }) {
|
|
920
|
-
super(
|
|
920
|
+
super(Hr), this.cause = t;
|
|
921
921
|
}
|
|
922
922
|
}
|
|
923
|
-
const
|
|
924
|
-
class
|
|
923
|
+
const qf = (e) => e.message === Hr, Kr = "Request Too Large";
|
|
924
|
+
class za extends Error {
|
|
925
925
|
constructor({ cause: t }) {
|
|
926
|
-
super(
|
|
926
|
+
super(Kr), this.cause = t;
|
|
927
927
|
}
|
|
928
928
|
}
|
|
929
|
-
const
|
|
929
|
+
const Xf = (e) => e.message === Kr;
|
|
930
930
|
function h(e, t, n) {
|
|
931
931
|
var s;
|
|
932
932
|
function r(c, u) {
|
|
@@ -966,28 +966,28 @@ function h(e, t, n) {
|
|
|
966
966
|
}
|
|
967
967
|
}), Object.defineProperty(a, "name", { value: e }), a;
|
|
968
968
|
}
|
|
969
|
-
class
|
|
969
|
+
class Ce extends Error {
|
|
970
970
|
constructor() {
|
|
971
971
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
972
972
|
}
|
|
973
973
|
}
|
|
974
|
-
class
|
|
974
|
+
class Gr extends Error {
|
|
975
975
|
constructor(t) {
|
|
976
976
|
super(`Encountered unidirectional transform during encode: ${t}`), this.name = "ZodEncodeError";
|
|
977
977
|
}
|
|
978
978
|
}
|
|
979
|
-
const
|
|
979
|
+
const qr = {};
|
|
980
980
|
function we(e) {
|
|
981
|
-
return
|
|
981
|
+
return qr;
|
|
982
982
|
}
|
|
983
|
-
function
|
|
983
|
+
function Xr(e) {
|
|
984
984
|
const t = Object.values(e).filter((r) => typeof r == "number");
|
|
985
985
|
return Object.entries(e).filter(([r, o]) => t.indexOf(+r) === -1).map(([r, o]) => o);
|
|
986
986
|
}
|
|
987
|
-
function
|
|
987
|
+
function on(e, t) {
|
|
988
988
|
return typeof t == "bigint" ? t.toString() : t;
|
|
989
989
|
}
|
|
990
|
-
function
|
|
990
|
+
function bn(e) {
|
|
991
991
|
return {
|
|
992
992
|
get value() {
|
|
993
993
|
{
|
|
@@ -997,14 +997,14 @@ function gn(e) {
|
|
|
997
997
|
}
|
|
998
998
|
};
|
|
999
999
|
}
|
|
1000
|
-
function
|
|
1000
|
+
function wn(e) {
|
|
1001
1001
|
return e == null;
|
|
1002
1002
|
}
|
|
1003
|
-
function
|
|
1003
|
+
function vn(e) {
|
|
1004
1004
|
const t = e.startsWith("^") ? 1 : 0, n = e.endsWith("$") ? e.length - 1 : e.length;
|
|
1005
1005
|
return e.slice(t, n);
|
|
1006
1006
|
}
|
|
1007
|
-
function
|
|
1007
|
+
function Sa(e, t) {
|
|
1008
1008
|
const n = (e.toString().split(".")[1] || "").length, r = t.toString();
|
|
1009
1009
|
let o = (r.split(".")[1] || "").length;
|
|
1010
1010
|
if (o === 0 && /\d?e-\d?/.test(r)) {
|
|
@@ -1012,15 +1012,15 @@ function wa(e, t) {
|
|
|
1012
1012
|
c != null && c[1] && (o = Number.parseInt(c[1]));
|
|
1013
1013
|
}
|
|
1014
1014
|
const i = n > o ? n : o, a = Number.parseInt(e.toFixed(i).replace(".", "")), s = Number.parseInt(t.toFixed(i).replace(".", ""));
|
|
1015
|
-
return a % s /
|
|
1015
|
+
return a % s / An(10, i);
|
|
1016
1016
|
}
|
|
1017
|
-
const
|
|
1017
|
+
const Vn = Symbol("evaluating");
|
|
1018
1018
|
function Z(e, t, n) {
|
|
1019
1019
|
let r;
|
|
1020
1020
|
Object.defineProperty(e, t, {
|
|
1021
1021
|
get() {
|
|
1022
|
-
if (r !==
|
|
1023
|
-
return r === void 0 && (r =
|
|
1022
|
+
if (r !== Vn)
|
|
1023
|
+
return r === void 0 && (r = Vn, r = n()), r;
|
|
1024
1024
|
},
|
|
1025
1025
|
set(o) {
|
|
1026
1026
|
Object.defineProperty(e, t, {
|
|
@@ -1047,18 +1047,18 @@ function ke(...e) {
|
|
|
1047
1047
|
}
|
|
1048
1048
|
return Object.defineProperties({}, t);
|
|
1049
1049
|
}
|
|
1050
|
-
function
|
|
1050
|
+
function Wn(e) {
|
|
1051
1051
|
return JSON.stringify(e);
|
|
1052
1052
|
}
|
|
1053
|
-
function
|
|
1053
|
+
function Ea(e) {
|
|
1054
1054
|
return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
1055
1055
|
}
|
|
1056
|
-
const
|
|
1056
|
+
const Yr = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
1057
1057
|
};
|
|
1058
|
-
function
|
|
1058
|
+
function Ot(e) {
|
|
1059
1059
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
1060
1060
|
}
|
|
1061
|
-
const
|
|
1061
|
+
const Ta = bn(() => {
|
|
1062
1062
|
var e;
|
|
1063
1063
|
if (typeof navigator != "undefined" && ((e = navigator == null ? void 0 : navigator.userAgent) != null && e.includes("Cloudflare")))
|
|
1064
1064
|
return !1;
|
|
@@ -1069,20 +1069,20 @@ const ka = gn(() => {
|
|
|
1069
1069
|
return !1;
|
|
1070
1070
|
}
|
|
1071
1071
|
});
|
|
1072
|
-
function
|
|
1073
|
-
if (
|
|
1072
|
+
function Me(e) {
|
|
1073
|
+
if (Ot(e) === !1)
|
|
1074
1074
|
return !1;
|
|
1075
1075
|
const t = e.constructor;
|
|
1076
1076
|
if (t === void 0 || typeof t != "function")
|
|
1077
1077
|
return !0;
|
|
1078
1078
|
const n = t.prototype;
|
|
1079
|
-
return !(
|
|
1079
|
+
return !(Ot(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
|
|
1080
1080
|
}
|
|
1081
|
-
function
|
|
1082
|
-
return
|
|
1081
|
+
function Qr(e) {
|
|
1082
|
+
return Me(e) ? p({}, e) : Array.isArray(e) ? [...e] : e;
|
|
1083
1083
|
}
|
|
1084
|
-
const
|
|
1085
|
-
function
|
|
1084
|
+
const $a = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
1085
|
+
function Je(e) {
|
|
1086
1086
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1087
1087
|
}
|
|
1088
1088
|
function ze(e, t, n) {
|
|
@@ -1102,17 +1102,17 @@ function g(e) {
|
|
|
1102
1102
|
}
|
|
1103
1103
|
return delete t.message, typeof t.error == "string" ? y(p({}, t), { error: () => t.error }) : t;
|
|
1104
1104
|
}
|
|
1105
|
-
function
|
|
1105
|
+
function Za(e) {
|
|
1106
1106
|
return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
|
|
1107
1107
|
}
|
|
1108
|
-
const
|
|
1108
|
+
const Oa = {
|
|
1109
1109
|
safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
|
|
1110
1110
|
int32: [-2147483648, 2147483647],
|
|
1111
1111
|
uint32: [0, 4294967295],
|
|
1112
1112
|
float32: [-34028234663852886e22, 34028234663852886e22],
|
|
1113
1113
|
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
|
|
1114
1114
|
};
|
|
1115
|
-
function
|
|
1115
|
+
function xa(e, t) {
|
|
1116
1116
|
const n = e._zod.def, r = n.checks;
|
|
1117
1117
|
if (r && r.length > 0)
|
|
1118
1118
|
throw new Error(".pick() cannot be used on object schemas containing refinements");
|
|
@@ -1130,7 +1130,7 @@ function Ta(e, t) {
|
|
|
1130
1130
|
});
|
|
1131
1131
|
return ze(e, i);
|
|
1132
1132
|
}
|
|
1133
|
-
function
|
|
1133
|
+
function Aa(e, t) {
|
|
1134
1134
|
const n = e._zod.def, r = n.checks;
|
|
1135
1135
|
if (r && r.length > 0)
|
|
1136
1136
|
throw new Error(".omit() cannot be used on object schemas containing refinements");
|
|
@@ -1148,8 +1148,8 @@ function $a(e, t) {
|
|
|
1148
1148
|
});
|
|
1149
1149
|
return ze(e, i);
|
|
1150
1150
|
}
|
|
1151
|
-
function
|
|
1152
|
-
if (!
|
|
1151
|
+
function Ia(e, t) {
|
|
1152
|
+
if (!Me(t))
|
|
1153
1153
|
throw new Error("Invalid input to extend: expected a plain object");
|
|
1154
1154
|
const n = e._zod.def.checks;
|
|
1155
1155
|
if (n && n.length > 0) {
|
|
@@ -1166,8 +1166,8 @@ function Za(e, t) {
|
|
|
1166
1166
|
});
|
|
1167
1167
|
return ze(e, o);
|
|
1168
1168
|
}
|
|
1169
|
-
function
|
|
1170
|
-
if (!
|
|
1169
|
+
function Na(e, t) {
|
|
1170
|
+
if (!Me(t))
|
|
1171
1171
|
throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
1172
1172
|
const n = ke(e._zod.def, {
|
|
1173
1173
|
get shape() {
|
|
@@ -1177,7 +1177,7 @@ function Oa(e, t) {
|
|
|
1177
1177
|
});
|
|
1178
1178
|
return ze(e, n);
|
|
1179
1179
|
}
|
|
1180
|
-
function
|
|
1180
|
+
function Pa(e, t) {
|
|
1181
1181
|
const n = ke(e._zod.def, {
|
|
1182
1182
|
get shape() {
|
|
1183
1183
|
const r = p(p({}, e._zod.def.shape), t._zod.def.shape);
|
|
@@ -1191,7 +1191,7 @@ function xa(e, t) {
|
|
|
1191
1191
|
});
|
|
1192
1192
|
return ze(e, n);
|
|
1193
1193
|
}
|
|
1194
|
-
function
|
|
1194
|
+
function Ra(e, t, n) {
|
|
1195
1195
|
const o = t._zod.def.checks;
|
|
1196
1196
|
if (o && o.length > 0)
|
|
1197
1197
|
throw new Error(".partial() cannot be used on object schemas containing refinements");
|
|
@@ -1219,7 +1219,7 @@ function Aa(e, t, n) {
|
|
|
1219
1219
|
});
|
|
1220
1220
|
return ze(t, a);
|
|
1221
1221
|
}
|
|
1222
|
-
function
|
|
1222
|
+
function Da(e, t, n) {
|
|
1223
1223
|
const r = ke(t._zod.def, {
|
|
1224
1224
|
get shape() {
|
|
1225
1225
|
const o = t._zod.def.shape, i = p({}, o);
|
|
@@ -1243,7 +1243,7 @@ function Ia(e, t, n) {
|
|
|
1243
1243
|
});
|
|
1244
1244
|
return ze(t, r);
|
|
1245
1245
|
}
|
|
1246
|
-
function
|
|
1246
|
+
function Pe(e, t = 0) {
|
|
1247
1247
|
var n;
|
|
1248
1248
|
if (e.aborted === !0)
|
|
1249
1249
|
return !0;
|
|
@@ -1252,29 +1252,29 @@ function Ne(e, t = 0) {
|
|
|
1252
1252
|
return !0;
|
|
1253
1253
|
return !1;
|
|
1254
1254
|
}
|
|
1255
|
-
function
|
|
1255
|
+
function Re(e, t) {
|
|
1256
1256
|
return t.map((n) => {
|
|
1257
1257
|
var o;
|
|
1258
1258
|
var r;
|
|
1259
1259
|
return (o = (r = n).path) != null || (r.path = []), n.path.unshift(e), n;
|
|
1260
1260
|
});
|
|
1261
1261
|
}
|
|
1262
|
-
function
|
|
1262
|
+
function bt(e) {
|
|
1263
1263
|
return typeof e == "string" ? e : e == null ? void 0 : e.message;
|
|
1264
1264
|
}
|
|
1265
1265
|
function ve(e, t, n) {
|
|
1266
1266
|
var o, i, a, s, c, u, l, d, f, _, m;
|
|
1267
1267
|
const r = y(p({}, e), { path: (o = e.path) != null ? o : [] });
|
|
1268
1268
|
if (!e.message) {
|
|
1269
|
-
const w = (m = (_ = (d = (u =
|
|
1269
|
+
const w = (m = (_ = (d = (u = bt((s = (a = (i = e.inst) == null ? void 0 : i._zod.def) == null ? void 0 : a.error) == null ? void 0 : s.call(a, e))) != null ? u : bt((c = t == null ? void 0 : t.error) == null ? void 0 : c.call(t, e))) != null ? d : bt((l = n.customError) == null ? void 0 : l.call(n, e))) != null ? _ : bt((f = n.localeError) == null ? void 0 : f.call(n, e))) != null ? m : "Invalid input";
|
|
1270
1270
|
r.message = w;
|
|
1271
1271
|
}
|
|
1272
1272
|
return delete r.inst, delete r.continue, t != null && t.reportInput || delete r.input, r;
|
|
1273
1273
|
}
|
|
1274
|
-
function
|
|
1274
|
+
function kn(e) {
|
|
1275
1275
|
return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
|
|
1276
1276
|
}
|
|
1277
|
-
function
|
|
1277
|
+
function ut(...e) {
|
|
1278
1278
|
const [t, n, r] = e;
|
|
1279
1279
|
return typeof t == "string" ? {
|
|
1280
1280
|
message: t,
|
|
@@ -1283,25 +1283,25 @@ function st(...e) {
|
|
|
1283
1283
|
inst: r
|
|
1284
1284
|
} : p({}, t);
|
|
1285
1285
|
}
|
|
1286
|
-
const
|
|
1286
|
+
const eo = (e, t) => {
|
|
1287
1287
|
e.name = "$ZodError", Object.defineProperty(e, "_zod", {
|
|
1288
1288
|
value: e._zod,
|
|
1289
1289
|
enumerable: !1
|
|
1290
1290
|
}), Object.defineProperty(e, "issues", {
|
|
1291
1291
|
value: t,
|
|
1292
1292
|
enumerable: !1
|
|
1293
|
-
}), e.message = JSON.stringify(t,
|
|
1293
|
+
}), e.message = JSON.stringify(t, on, 2), Object.defineProperty(e, "toString", {
|
|
1294
1294
|
value: () => e.message,
|
|
1295
1295
|
enumerable: !1
|
|
1296
1296
|
});
|
|
1297
|
-
},
|
|
1298
|
-
function
|
|
1297
|
+
}, to = h("$ZodError", eo), no = h("$ZodError", eo, { Parent: Error });
|
|
1298
|
+
function Ca(e, t = (n) => n.message) {
|
|
1299
1299
|
const n = {}, r = [];
|
|
1300
1300
|
for (const o of e.issues)
|
|
1301
1301
|
o.path.length > 0 ? (n[o.path[0]] = n[o.path[0]] || [], n[o.path[0]].push(t(o))) : r.push(t(o));
|
|
1302
1302
|
return { formErrors: r, fieldErrors: n };
|
|
1303
1303
|
}
|
|
1304
|
-
function
|
|
1304
|
+
function Fa(e, t = (n) => n.message) {
|
|
1305
1305
|
const n = { _errors: [] }, r = (o) => {
|
|
1306
1306
|
for (const i of o.issues)
|
|
1307
1307
|
if (i.code === "invalid_union" && i.errors.length)
|
|
@@ -1322,89 +1322,89 @@ function Pa(e, t = (n) => n.message) {
|
|
|
1322
1322
|
};
|
|
1323
1323
|
return r(e), n;
|
|
1324
1324
|
}
|
|
1325
|
-
const
|
|
1325
|
+
const zn = (e) => (t, n, r, o) => {
|
|
1326
1326
|
var s;
|
|
1327
1327
|
const i = r ? Object.assign(r, { async: !1 }) : { async: !1 }, a = t._zod.run({ value: n, issues: [] }, i);
|
|
1328
1328
|
if (a instanceof Promise)
|
|
1329
|
-
throw new
|
|
1329
|
+
throw new Ce();
|
|
1330
1330
|
if (a.issues.length) {
|
|
1331
1331
|
const c = new ((s = o == null ? void 0 : o.Err) != null ? s : e)(a.issues.map((u) => ve(u, i, we())));
|
|
1332
|
-
throw
|
|
1332
|
+
throw Yr(c, o == null ? void 0 : o.callee), c;
|
|
1333
1333
|
}
|
|
1334
1334
|
return a.value;
|
|
1335
|
-
},
|
|
1335
|
+
}, Sn = (e) => (t, n, r, o) => k(null, null, function* () {
|
|
1336
1336
|
var s;
|
|
1337
1337
|
const i = r ? Object.assign(r, { async: !0 }) : { async: !0 };
|
|
1338
1338
|
let a = t._zod.run({ value: n, issues: [] }, i);
|
|
1339
1339
|
if (a instanceof Promise && (a = yield a), a.issues.length) {
|
|
1340
1340
|
const c = new ((s = o == null ? void 0 : o.Err) != null ? s : e)(a.issues.map((u) => ve(u, i, we())));
|
|
1341
|
-
throw
|
|
1341
|
+
throw Yr(c, o == null ? void 0 : o.callee), c;
|
|
1342
1342
|
}
|
|
1343
1343
|
return a.value;
|
|
1344
|
-
}),
|
|
1344
|
+
}), Rt = (e) => (t, n, r) => {
|
|
1345
1345
|
const o = r ? y(p({}, r), { async: !1 }) : { async: !1 }, i = t._zod.run({ value: n, issues: [] }, o);
|
|
1346
1346
|
if (i instanceof Promise)
|
|
1347
|
-
throw new
|
|
1347
|
+
throw new Ce();
|
|
1348
1348
|
return i.issues.length ? {
|
|
1349
1349
|
success: !1,
|
|
1350
|
-
error: new (e != null ? e :
|
|
1350
|
+
error: new (e != null ? e : to)(i.issues.map((a) => ve(a, o, we())))
|
|
1351
1351
|
} : { success: !0, data: i.value };
|
|
1352
|
-
},
|
|
1352
|
+
}, ja = /* @__PURE__ */ Rt(no), Dt = (e) => (t, n, r) => k(null, null, function* () {
|
|
1353
1353
|
const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
|
|
1354
1354
|
let i = t._zod.run({ value: n, issues: [] }, o);
|
|
1355
1355
|
return i instanceof Promise && (i = yield i), i.issues.length ? {
|
|
1356
1356
|
success: !1,
|
|
1357
1357
|
error: new e(i.issues.map((a) => ve(a, o, we())))
|
|
1358
1358
|
} : { success: !0, data: i.value };
|
|
1359
|
-
}),
|
|
1359
|
+
}), Ua = /* @__PURE__ */ Dt(no), La = (e) => (t, n, r) => {
|
|
1360
1360
|
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
1361
|
-
return
|
|
1362
|
-
},
|
|
1361
|
+
return zn(e)(t, n, o);
|
|
1362
|
+
}, Ma = (e) => (t, n, r) => zn(e)(t, n, r), Ja = (e) => (t, n, r) => k(null, null, function* () {
|
|
1363
1363
|
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
1364
|
-
return
|
|
1365
|
-
}),
|
|
1366
|
-
return
|
|
1367
|
-
}),
|
|
1364
|
+
return Sn(e)(t, n, o);
|
|
1365
|
+
}), Ba = (e) => (t, n, r) => k(null, null, function* () {
|
|
1366
|
+
return Sn(e)(t, n, r);
|
|
1367
|
+
}), Va = (e) => (t, n, r) => {
|
|
1368
1368
|
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
1369
|
-
return
|
|
1370
|
-
},
|
|
1369
|
+
return Rt(e)(t, n, o);
|
|
1370
|
+
}, Wa = (e) => (t, n, r) => Rt(e)(t, n, r), Ha = (e) => (t, n, r) => k(null, null, function* () {
|
|
1371
1371
|
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
1372
|
-
return
|
|
1373
|
-
}),
|
|
1374
|
-
return
|
|
1375
|
-
}),
|
|
1376
|
-
function
|
|
1377
|
-
return new RegExp(
|
|
1378
|
-
}
|
|
1379
|
-
const
|
|
1380
|
-
function
|
|
1372
|
+
return Dt(e)(t, n, o);
|
|
1373
|
+
}), Ka = (e) => (t, n, r) => k(null, null, function* () {
|
|
1374
|
+
return Dt(e)(t, n, r);
|
|
1375
|
+
}), Ga = /^[cC][^\s-]{8,}$/, qa = /^[0-9a-z]+$/, Xa = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Ya = /^[0-9a-vA-V]{20}$/, Qa = /^[A-Za-z0-9]{27}$/, es = /^[a-zA-Z0-9_-]{21}$/, ts = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, ns = /^([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})$/, Hn = (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)$/, rs = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, os = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
1376
|
+
function is() {
|
|
1377
|
+
return new RegExp(os, "u");
|
|
1378
|
+
}
|
|
1379
|
+
const as = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, ss = /^(([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}|:))$/, cs = /^((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])$/, us = /^(([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])$/, ls = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, ro = /^[A-Za-z0-9_-]*$/, fs = /^\+[1-9]\d{6,14}$/, oo = "(?:(?:\\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])))", ds = /* @__PURE__ */ new RegExp(`^${oo}$`);
|
|
1380
|
+
function io(e) {
|
|
1381
1381
|
const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
|
|
1382
1382
|
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+)?)?`;
|
|
1383
1383
|
}
|
|
1384
|
-
function
|
|
1385
|
-
return new RegExp(`^${
|
|
1384
|
+
function hs(e) {
|
|
1385
|
+
return new RegExp(`^${io(e)}$`);
|
|
1386
1386
|
}
|
|
1387
|
-
function
|
|
1388
|
-
const t =
|
|
1387
|
+
function ps(e) {
|
|
1388
|
+
const t = io({ precision: e.precision }), n = ["Z"];
|
|
1389
1389
|
e.local && n.push(""), e.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
|
|
1390
1390
|
const r = `${t}(?:${n.join("|")})`;
|
|
1391
|
-
return new RegExp(`^${
|
|
1391
|
+
return new RegExp(`^${oo}T(?:${r})$`);
|
|
1392
1392
|
}
|
|
1393
|
-
const
|
|
1393
|
+
const _s = (e) => {
|
|
1394
1394
|
var n, r;
|
|
1395
1395
|
const t = e ? `[\\s\\S]{${(n = e == null ? void 0 : e.minimum) != null ? n : 0},${(r = e == null ? void 0 : e.maximum) != null ? r : ""}}` : "[\\s\\S]*";
|
|
1396
1396
|
return new RegExp(`^${t}$`);
|
|
1397
|
-
},
|
|
1397
|
+
}, gs = /^-?\d+$/, ao = /^-?\d+(?:\.\d+)?$/, ms = /^(?:true|false)$/i, ys = /^[^A-Z]*$/, bs = /^[^a-z]*$/, W = /* @__PURE__ */ h("$ZodCheck", (e, t) => {
|
|
1398
1398
|
var r, o;
|
|
1399
1399
|
var n;
|
|
1400
1400
|
(r = e._zod) != null || (e._zod = {}), e._zod.def = t, (o = (n = e._zod).onattach) != null || (n.onattach = []);
|
|
1401
|
-
}),
|
|
1401
|
+
}), so = {
|
|
1402
1402
|
number: "number",
|
|
1403
1403
|
bigint: "bigint",
|
|
1404
1404
|
object: "date"
|
|
1405
|
-
},
|
|
1405
|
+
}, co = /* @__PURE__ */ h("$ZodCheckLessThan", (e, t) => {
|
|
1406
1406
|
W.init(e, t);
|
|
1407
|
-
const n =
|
|
1407
|
+
const n = so[typeof t.value];
|
|
1408
1408
|
e._zod.onattach.push((r) => {
|
|
1409
1409
|
var a;
|
|
1410
1410
|
const o = r._zod.bag, i = (a = t.inclusive ? o.maximum : o.exclusiveMaximum) != null ? a : Number.POSITIVE_INFINITY;
|
|
@@ -1420,9 +1420,9 @@ const fs = (e) => {
|
|
|
1420
1420
|
continue: !t.abort
|
|
1421
1421
|
});
|
|
1422
1422
|
};
|
|
1423
|
-
}),
|
|
1423
|
+
}), uo = /* @__PURE__ */ h("$ZodCheckGreaterThan", (e, t) => {
|
|
1424
1424
|
W.init(e, t);
|
|
1425
|
-
const n =
|
|
1425
|
+
const n = so[typeof t.value];
|
|
1426
1426
|
e._zod.onattach.push((r) => {
|
|
1427
1427
|
var a;
|
|
1428
1428
|
const o = r._zod.bag, i = (a = t.inclusive ? o.minimum : o.exclusiveMinimum) != null ? a : Number.NEGATIVE_INFINITY;
|
|
@@ -1438,7 +1438,7 @@ const fs = (e) => {
|
|
|
1438
1438
|
continue: !t.abort
|
|
1439
1439
|
});
|
|
1440
1440
|
};
|
|
1441
|
-
}),
|
|
1441
|
+
}), ws = /* @__PURE__ */ h("$ZodCheckMultipleOf", (e, t) => {
|
|
1442
1442
|
W.init(e, t), e._zod.onattach.push((n) => {
|
|
1443
1443
|
var o;
|
|
1444
1444
|
var r;
|
|
@@ -1446,7 +1446,7 @@ const fs = (e) => {
|
|
|
1446
1446
|
}), e._zod.check = (n) => {
|
|
1447
1447
|
if (typeof n.value != typeof t.value)
|
|
1448
1448
|
throw new Error("Cannot mix number and bigint in multiple_of check.");
|
|
1449
|
-
(typeof n.value == "bigint" ? n.value % t.value === BigInt(0) :
|
|
1449
|
+
(typeof n.value == "bigint" ? n.value % t.value === BigInt(0) : Sa(n.value, t.value) === 0) || n.issues.push({
|
|
1450
1450
|
origin: typeof n.value,
|
|
1451
1451
|
code: "not_multiple_of",
|
|
1452
1452
|
divisor: t.value,
|
|
@@ -1455,13 +1455,13 @@ const fs = (e) => {
|
|
|
1455
1455
|
continue: !t.abort
|
|
1456
1456
|
});
|
|
1457
1457
|
};
|
|
1458
|
-
}),
|
|
1458
|
+
}), vs = /* @__PURE__ */ h("$ZodCheckNumberFormat", (e, t) => {
|
|
1459
1459
|
var a;
|
|
1460
1460
|
W.init(e, t), t.format = t.format || "float64";
|
|
1461
|
-
const n = (a = t.format) == null ? void 0 : a.includes("int"), r = n ? "int" : "number", [o, i] =
|
|
1461
|
+
const n = (a = t.format) == null ? void 0 : a.includes("int"), r = n ? "int" : "number", [o, i] = Oa[t.format];
|
|
1462
1462
|
e._zod.onattach.push((s) => {
|
|
1463
1463
|
const c = s._zod.bag;
|
|
1464
|
-
c.format = t.format, c.minimum = o, c.maximum = i, n && (c.pattern =
|
|
1464
|
+
c.format = t.format, c.minimum = o, c.maximum = i, n && (c.pattern = gs);
|
|
1465
1465
|
}), e._zod.check = (s) => {
|
|
1466
1466
|
const c = s.value;
|
|
1467
1467
|
if (n) {
|
|
@@ -1517,12 +1517,12 @@ const fs = (e) => {
|
|
|
1517
1517
|
continue: !t.abort
|
|
1518
1518
|
});
|
|
1519
1519
|
};
|
|
1520
|
-
}),
|
|
1520
|
+
}), ks = /* @__PURE__ */ h("$ZodCheckMaxLength", (e, t) => {
|
|
1521
1521
|
var r;
|
|
1522
1522
|
var n;
|
|
1523
1523
|
W.init(e, t), (r = (n = e._zod.def).when) != null || (n.when = (o) => {
|
|
1524
1524
|
const i = o.value;
|
|
1525
|
-
return !
|
|
1525
|
+
return !wn(i) && i.length !== void 0;
|
|
1526
1526
|
}), e._zod.onattach.push((o) => {
|
|
1527
1527
|
var a;
|
|
1528
1528
|
const i = (a = o._zod.bag.maximum) != null ? a : Number.POSITIVE_INFINITY;
|
|
@@ -1531,7 +1531,7 @@ const fs = (e) => {
|
|
|
1531
1531
|
const i = o.value;
|
|
1532
1532
|
if (i.length <= t.maximum)
|
|
1533
1533
|
return;
|
|
1534
|
-
const s =
|
|
1534
|
+
const s = kn(i);
|
|
1535
1535
|
o.issues.push({
|
|
1536
1536
|
origin: s,
|
|
1537
1537
|
code: "too_big",
|
|
@@ -1542,12 +1542,12 @@ const fs = (e) => {
|
|
|
1542
1542
|
continue: !t.abort
|
|
1543
1543
|
});
|
|
1544
1544
|
};
|
|
1545
|
-
}),
|
|
1545
|
+
}), zs = /* @__PURE__ */ h("$ZodCheckMinLength", (e, t) => {
|
|
1546
1546
|
var r;
|
|
1547
1547
|
var n;
|
|
1548
1548
|
W.init(e, t), (r = (n = e._zod.def).when) != null || (n.when = (o) => {
|
|
1549
1549
|
const i = o.value;
|
|
1550
|
-
return !
|
|
1550
|
+
return !wn(i) && i.length !== void 0;
|
|
1551
1551
|
}), e._zod.onattach.push((o) => {
|
|
1552
1552
|
var a;
|
|
1553
1553
|
const i = (a = o._zod.bag.minimum) != null ? a : Number.NEGATIVE_INFINITY;
|
|
@@ -1556,7 +1556,7 @@ const fs = (e) => {
|
|
|
1556
1556
|
const i = o.value;
|
|
1557
1557
|
if (i.length >= t.minimum)
|
|
1558
1558
|
return;
|
|
1559
|
-
const s =
|
|
1559
|
+
const s = kn(i);
|
|
1560
1560
|
o.issues.push({
|
|
1561
1561
|
origin: s,
|
|
1562
1562
|
code: "too_small",
|
|
@@ -1567,12 +1567,12 @@ const fs = (e) => {
|
|
|
1567
1567
|
continue: !t.abort
|
|
1568
1568
|
});
|
|
1569
1569
|
};
|
|
1570
|
-
}),
|
|
1570
|
+
}), Ss = /* @__PURE__ */ h("$ZodCheckLengthEquals", (e, t) => {
|
|
1571
1571
|
var r;
|
|
1572
1572
|
var n;
|
|
1573
1573
|
W.init(e, t), (r = (n = e._zod.def).when) != null || (n.when = (o) => {
|
|
1574
1574
|
const i = o.value;
|
|
1575
|
-
return !
|
|
1575
|
+
return !wn(i) && i.length !== void 0;
|
|
1576
1576
|
}), e._zod.onattach.push((o) => {
|
|
1577
1577
|
const i = o._zod.bag;
|
|
1578
1578
|
i.minimum = t.length, i.maximum = t.length, i.length = t.length;
|
|
@@ -1580,7 +1580,7 @@ const fs = (e) => {
|
|
|
1580
1580
|
const i = o.value, a = i.length;
|
|
1581
1581
|
if (a === t.length)
|
|
1582
1582
|
return;
|
|
1583
|
-
const s =
|
|
1583
|
+
const s = kn(i), c = a > t.length;
|
|
1584
1584
|
o.issues.push(y(p({
|
|
1585
1585
|
origin: s
|
|
1586
1586
|
}, c ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length }), {
|
|
@@ -1591,7 +1591,7 @@ const fs = (e) => {
|
|
|
1591
1591
|
continue: !t.abort
|
|
1592
1592
|
}));
|
|
1593
1593
|
};
|
|
1594
|
-
}),
|
|
1594
|
+
}), Ct = /* @__PURE__ */ h("$ZodCheckStringFormat", (e, t) => {
|
|
1595
1595
|
var o, i;
|
|
1596
1596
|
var n, r;
|
|
1597
1597
|
W.init(e, t), e._zod.onattach.push((a) => {
|
|
@@ -1610,8 +1610,8 @@ const fs = (e) => {
|
|
|
1610
1610
|
}));
|
|
1611
1611
|
}) : (i = (r = e._zod).check) != null || (r.check = () => {
|
|
1612
1612
|
});
|
|
1613
|
-
}),
|
|
1614
|
-
|
|
1613
|
+
}), Es = /* @__PURE__ */ h("$ZodCheckRegex", (e, t) => {
|
|
1614
|
+
Ct.init(e, t), e._zod.check = (n) => {
|
|
1615
1615
|
t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
|
|
1616
1616
|
origin: "string",
|
|
1617
1617
|
code: "invalid_format",
|
|
@@ -1622,15 +1622,15 @@ const fs = (e) => {
|
|
|
1622
1622
|
continue: !t.abort
|
|
1623
1623
|
});
|
|
1624
1624
|
};
|
|
1625
|
-
}),
|
|
1625
|
+
}), Ts = /* @__PURE__ */ h("$ZodCheckLowerCase", (e, t) => {
|
|
1626
1626
|
var n;
|
|
1627
|
-
(n = t.pattern) != null || (t.pattern =
|
|
1628
|
-
}),
|
|
1627
|
+
(n = t.pattern) != null || (t.pattern = ys), Ct.init(e, t);
|
|
1628
|
+
}), $s = /* @__PURE__ */ h("$ZodCheckUpperCase", (e, t) => {
|
|
1629
1629
|
var n;
|
|
1630
|
-
(n = t.pattern) != null || (t.pattern =
|
|
1631
|
-
}),
|
|
1630
|
+
(n = t.pattern) != null || (t.pattern = bs), Ct.init(e, t);
|
|
1631
|
+
}), Zs = /* @__PURE__ */ h("$ZodCheckIncludes", (e, t) => {
|
|
1632
1632
|
W.init(e, t);
|
|
1633
|
-
const n =
|
|
1633
|
+
const n = Je(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
|
|
1634
1634
|
t.pattern = r, e._zod.onattach.push((o) => {
|
|
1635
1635
|
var a;
|
|
1636
1636
|
const i = o._zod.bag;
|
|
@@ -1646,10 +1646,10 @@ const fs = (e) => {
|
|
|
1646
1646
|
continue: !t.abort
|
|
1647
1647
|
});
|
|
1648
1648
|
};
|
|
1649
|
-
}),
|
|
1649
|
+
}), Os = /* @__PURE__ */ h("$ZodCheckStartsWith", (e, t) => {
|
|
1650
1650
|
var r;
|
|
1651
1651
|
W.init(e, t);
|
|
1652
|
-
const n = new RegExp(`^${
|
|
1652
|
+
const n = new RegExp(`^${Je(t.prefix)}.*`);
|
|
1653
1653
|
(r = t.pattern) != null || (t.pattern = n), e._zod.onattach.push((o) => {
|
|
1654
1654
|
var a;
|
|
1655
1655
|
const i = o._zod.bag;
|
|
@@ -1665,10 +1665,10 @@ const fs = (e) => {
|
|
|
1665
1665
|
continue: !t.abort
|
|
1666
1666
|
});
|
|
1667
1667
|
};
|
|
1668
|
-
}),
|
|
1668
|
+
}), xs = /* @__PURE__ */ h("$ZodCheckEndsWith", (e, t) => {
|
|
1669
1669
|
var r;
|
|
1670
1670
|
W.init(e, t);
|
|
1671
|
-
const n = new RegExp(`.*${
|
|
1671
|
+
const n = new RegExp(`.*${Je(t.suffix)}$`);
|
|
1672
1672
|
(r = t.pattern) != null || (t.pattern = n), e._zod.onattach.push((o) => {
|
|
1673
1673
|
var a;
|
|
1674
1674
|
const i = o._zod.bag;
|
|
@@ -1684,12 +1684,12 @@ const fs = (e) => {
|
|
|
1684
1684
|
continue: !t.abort
|
|
1685
1685
|
});
|
|
1686
1686
|
};
|
|
1687
|
-
}),
|
|
1687
|
+
}), As = /* @__PURE__ */ h("$ZodCheckOverwrite", (e, t) => {
|
|
1688
1688
|
W.init(e, t), e._zod.check = (n) => {
|
|
1689
1689
|
n.value = t.tx(n.value);
|
|
1690
1690
|
};
|
|
1691
1691
|
});
|
|
1692
|
-
class
|
|
1692
|
+
class Is {
|
|
1693
1693
|
constructor(t = []) {
|
|
1694
1694
|
this.content = [], this.indent = 0, this && (this.args = t);
|
|
1695
1695
|
}
|
|
@@ -1713,14 +1713,14 @@ class Zs {
|
|
|
1713
1713
|
`));
|
|
1714
1714
|
}
|
|
1715
1715
|
}
|
|
1716
|
-
const
|
|
1716
|
+
const Ns = {
|
|
1717
1717
|
major: 4,
|
|
1718
1718
|
minor: 3,
|
|
1719
1719
|
patch: 6
|
|
1720
1720
|
}, I = /* @__PURE__ */ h("$ZodType", (e, t) => {
|
|
1721
1721
|
var o, i, a;
|
|
1722
1722
|
var n;
|
|
1723
|
-
e != null || (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version =
|
|
1723
|
+
e != null || (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = Ns;
|
|
1724
1724
|
const r = [...(o = e._zod.def.checks) != null ? o : []];
|
|
1725
1725
|
e._zod.traits.has("$ZodCheck") && r.unshift(e);
|
|
1726
1726
|
for (const s of r)
|
|
@@ -1732,7 +1732,7 @@ const Os = {
|
|
|
1732
1732
|
});
|
|
1733
1733
|
else {
|
|
1734
1734
|
const s = (u, l, d) => {
|
|
1735
|
-
let f =
|
|
1735
|
+
let f = Pe(u), _;
|
|
1736
1736
|
for (const m of l) {
|
|
1737
1737
|
if (m._zod.def.when) {
|
|
1738
1738
|
if (!m._zod.def.when(u))
|
|
@@ -1741,25 +1741,25 @@ const Os = {
|
|
|
1741
1741
|
continue;
|
|
1742
1742
|
const w = u.issues.length, O = m._zod.check(u);
|
|
1743
1743
|
if (O instanceof Promise && (d == null ? void 0 : d.async) === !1)
|
|
1744
|
-
throw new
|
|
1744
|
+
throw new Ce();
|
|
1745
1745
|
if (_ || O instanceof Promise)
|
|
1746
1746
|
_ = (_ != null ? _ : Promise.resolve()).then(() => k(null, null, function* () {
|
|
1747
|
-
yield O, u.issues.length !== w && (f || (f =
|
|
1747
|
+
yield O, u.issues.length !== w && (f || (f = Pe(u, w)));
|
|
1748
1748
|
}));
|
|
1749
1749
|
else {
|
|
1750
1750
|
if (u.issues.length === w)
|
|
1751
1751
|
continue;
|
|
1752
|
-
f || (f =
|
|
1752
|
+
f || (f = Pe(u, w));
|
|
1753
1753
|
}
|
|
1754
1754
|
}
|
|
1755
1755
|
return _ ? _.then(() => u) : u;
|
|
1756
1756
|
}, c = (u, l, d) => {
|
|
1757
|
-
if (
|
|
1757
|
+
if (Pe(u))
|
|
1758
1758
|
return u.aborted = !0, u;
|
|
1759
1759
|
const f = s(l, r, d);
|
|
1760
1760
|
if (f instanceof Promise) {
|
|
1761
1761
|
if (d.async === !1)
|
|
1762
|
-
throw new
|
|
1762
|
+
throw new Ce();
|
|
1763
1763
|
return f.then((_) => e._zod.parse(_, d));
|
|
1764
1764
|
}
|
|
1765
1765
|
return e._zod.parse(f, d);
|
|
@@ -1774,7 +1774,7 @@ const Os = {
|
|
|
1774
1774
|
const d = e._zod.parse(u, l);
|
|
1775
1775
|
if (d instanceof Promise) {
|
|
1776
1776
|
if (l.async === !1)
|
|
1777
|
-
throw new
|
|
1777
|
+
throw new Ce();
|
|
1778
1778
|
return d.then((f) => s(f, r, l));
|
|
1779
1779
|
}
|
|
1780
1780
|
return s(d, r, l);
|
|
@@ -1784,10 +1784,10 @@ const Os = {
|
|
|
1784
1784
|
validate: (s) => {
|
|
1785
1785
|
var c;
|
|
1786
1786
|
try {
|
|
1787
|
-
const u =
|
|
1787
|
+
const u = ja(e, s);
|
|
1788
1788
|
return u.success ? { value: u.data } : { issues: (c = u.error) == null ? void 0 : c.issues };
|
|
1789
1789
|
} catch (u) {
|
|
1790
|
-
return
|
|
1790
|
+
return Ua(e, s).then((l) => {
|
|
1791
1791
|
var d;
|
|
1792
1792
|
return l.success ? { value: l.data } : { issues: (d = l.error) == null ? void 0 : d.issues };
|
|
1793
1793
|
});
|
|
@@ -1796,9 +1796,9 @@ const Os = {
|
|
|
1796
1796
|
vendor: "zod",
|
|
1797
1797
|
version: 1
|
|
1798
1798
|
}));
|
|
1799
|
-
}),
|
|
1799
|
+
}), En = /* @__PURE__ */ h("$ZodString", (e, t) => {
|
|
1800
1800
|
var n, r, o;
|
|
1801
|
-
I.init(e, t), e._zod.pattern = (o = [...(r = (n = e == null ? void 0 : e._zod.bag) == null ? void 0 : n.patterns) != null ? r : []].pop()) != null ? o :
|
|
1801
|
+
I.init(e, t), e._zod.pattern = (o = [...(r = (n = e == null ? void 0 : e._zod.bag) == null ? void 0 : n.patterns) != null ? r : []].pop()) != null ? o : _s(e._zod.bag), e._zod.parse = (i, a) => {
|
|
1802
1802
|
if (t.coerce)
|
|
1803
1803
|
try {
|
|
1804
1804
|
i.value = String(i.value);
|
|
@@ -1812,11 +1812,11 @@ const Os = {
|
|
|
1812
1812
|
}), i;
|
|
1813
1813
|
};
|
|
1814
1814
|
}), A = /* @__PURE__ */ h("$ZodStringFormat", (e, t) => {
|
|
1815
|
-
|
|
1816
|
-
}),
|
|
1815
|
+
Ct.init(e, t), En.init(e, t);
|
|
1816
|
+
}), Ps = /* @__PURE__ */ h("$ZodGUID", (e, t) => {
|
|
1817
1817
|
var n;
|
|
1818
|
-
(n = t.pattern) != null || (t.pattern =
|
|
1819
|
-
}),
|
|
1818
|
+
(n = t.pattern) != null || (t.pattern = ns), A.init(e, t);
|
|
1819
|
+
}), Rs = /* @__PURE__ */ h("$ZodUUID", (e, t) => {
|
|
1820
1820
|
var n, r;
|
|
1821
1821
|
if (t.version) {
|
|
1822
1822
|
const i = {
|
|
@@ -1831,14 +1831,14 @@ const Os = {
|
|
|
1831
1831
|
}[t.version];
|
|
1832
1832
|
if (i === void 0)
|
|
1833
1833
|
throw new Error(`Invalid UUID version: "${t.version}"`);
|
|
1834
|
-
(n = t.pattern) != null || (t.pattern =
|
|
1834
|
+
(n = t.pattern) != null || (t.pattern = Hn(i));
|
|
1835
1835
|
} else
|
|
1836
|
-
(r = t.pattern) != null || (t.pattern =
|
|
1836
|
+
(r = t.pattern) != null || (t.pattern = Hn());
|
|
1837
1837
|
A.init(e, t);
|
|
1838
|
-
}),
|
|
1838
|
+
}), Ds = /* @__PURE__ */ h("$ZodEmail", (e, t) => {
|
|
1839
1839
|
var n;
|
|
1840
|
-
(n = t.pattern) != null || (t.pattern =
|
|
1841
|
-
}),
|
|
1840
|
+
(n = t.pattern) != null || (t.pattern = rs), A.init(e, t);
|
|
1841
|
+
}), Cs = /* @__PURE__ */ h("$ZodURL", (e, t) => {
|
|
1842
1842
|
A.init(e, t), e._zod.check = (n) => {
|
|
1843
1843
|
try {
|
|
1844
1844
|
const r = n.value.trim(), o = new URL(r);
|
|
@@ -1870,45 +1870,45 @@ const Os = {
|
|
|
1870
1870
|
});
|
|
1871
1871
|
}
|
|
1872
1872
|
};
|
|
1873
|
-
}),
|
|
1873
|
+
}), Fs = /* @__PURE__ */ h("$ZodEmoji", (e, t) => {
|
|
1874
1874
|
var n;
|
|
1875
|
-
(n = t.pattern) != null || (t.pattern =
|
|
1876
|
-
}),
|
|
1875
|
+
(n = t.pattern) != null || (t.pattern = is()), A.init(e, t);
|
|
1876
|
+
}), js = /* @__PURE__ */ h("$ZodNanoID", (e, t) => {
|
|
1877
1877
|
var n;
|
|
1878
|
-
(n = t.pattern) != null || (t.pattern =
|
|
1879
|
-
}),
|
|
1878
|
+
(n = t.pattern) != null || (t.pattern = es), A.init(e, t);
|
|
1879
|
+
}), Us = /* @__PURE__ */ h("$ZodCUID", (e, t) => {
|
|
1880
1880
|
var n;
|
|
1881
|
-
(n = t.pattern) != null || (t.pattern =
|
|
1882
|
-
}),
|
|
1881
|
+
(n = t.pattern) != null || (t.pattern = Ga), A.init(e, t);
|
|
1882
|
+
}), Ls = /* @__PURE__ */ h("$ZodCUID2", (e, t) => {
|
|
1883
1883
|
var n;
|
|
1884
|
-
(n = t.pattern) != null || (t.pattern =
|
|
1885
|
-
}),
|
|
1884
|
+
(n = t.pattern) != null || (t.pattern = qa), A.init(e, t);
|
|
1885
|
+
}), Ms = /* @__PURE__ */ h("$ZodULID", (e, t) => {
|
|
1886
1886
|
var n;
|
|
1887
|
-
(n = t.pattern) != null || (t.pattern =
|
|
1888
|
-
}),
|
|
1887
|
+
(n = t.pattern) != null || (t.pattern = Xa), A.init(e, t);
|
|
1888
|
+
}), Js = /* @__PURE__ */ h("$ZodXID", (e, t) => {
|
|
1889
1889
|
var n;
|
|
1890
|
-
(n = t.pattern) != null || (t.pattern =
|
|
1891
|
-
}),
|
|
1890
|
+
(n = t.pattern) != null || (t.pattern = Ya), A.init(e, t);
|
|
1891
|
+
}), Bs = /* @__PURE__ */ h("$ZodKSUID", (e, t) => {
|
|
1892
1892
|
var n;
|
|
1893
|
-
(n = t.pattern) != null || (t.pattern =
|
|
1894
|
-
}),
|
|
1893
|
+
(n = t.pattern) != null || (t.pattern = Qa), A.init(e, t);
|
|
1894
|
+
}), Vs = /* @__PURE__ */ h("$ZodISODateTime", (e, t) => {
|
|
1895
1895
|
var n;
|
|
1896
|
-
(n = t.pattern) != null || (t.pattern =
|
|
1897
|
-
}),
|
|
1896
|
+
(n = t.pattern) != null || (t.pattern = ps(t)), A.init(e, t);
|
|
1897
|
+
}), Ws = /* @__PURE__ */ h("$ZodISODate", (e, t) => {
|
|
1898
1898
|
var n;
|
|
1899
|
-
(n = t.pattern) != null || (t.pattern =
|
|
1900
|
-
}),
|
|
1899
|
+
(n = t.pattern) != null || (t.pattern = ds), A.init(e, t);
|
|
1900
|
+
}), Hs = /* @__PURE__ */ h("$ZodISOTime", (e, t) => {
|
|
1901
1901
|
var n;
|
|
1902
|
-
(n = t.pattern) != null || (t.pattern =
|
|
1903
|
-
}),
|
|
1902
|
+
(n = t.pattern) != null || (t.pattern = hs(t)), A.init(e, t);
|
|
1903
|
+
}), Ks = /* @__PURE__ */ h("$ZodISODuration", (e, t) => {
|
|
1904
1904
|
var n;
|
|
1905
|
-
(n = t.pattern) != null || (t.pattern =
|
|
1906
|
-
}),
|
|
1905
|
+
(n = t.pattern) != null || (t.pattern = ts), A.init(e, t);
|
|
1906
|
+
}), Gs = /* @__PURE__ */ h("$ZodIPv4", (e, t) => {
|
|
1907
1907
|
var n;
|
|
1908
|
-
(n = t.pattern) != null || (t.pattern =
|
|
1909
|
-
}),
|
|
1908
|
+
(n = t.pattern) != null || (t.pattern = as), A.init(e, t), e._zod.bag.format = "ipv4";
|
|
1909
|
+
}), qs = /* @__PURE__ */ h("$ZodIPv6", (e, t) => {
|
|
1910
1910
|
var n;
|
|
1911
|
-
(n = t.pattern) != null || (t.pattern =
|
|
1911
|
+
(n = t.pattern) != null || (t.pattern = ss), A.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (r) => {
|
|
1912
1912
|
try {
|
|
1913
1913
|
new URL(`http://[${r.value}]`);
|
|
1914
1914
|
} catch (o) {
|
|
@@ -1921,12 +1921,12 @@ const Os = {
|
|
|
1921
1921
|
});
|
|
1922
1922
|
}
|
|
1923
1923
|
};
|
|
1924
|
-
}),
|
|
1924
|
+
}), Xs = /* @__PURE__ */ h("$ZodCIDRv4", (e, t) => {
|
|
1925
1925
|
var n;
|
|
1926
|
-
(n = t.pattern) != null || (t.pattern =
|
|
1927
|
-
}),
|
|
1926
|
+
(n = t.pattern) != null || (t.pattern = cs), A.init(e, t);
|
|
1927
|
+
}), Ys = /* @__PURE__ */ h("$ZodCIDRv6", (e, t) => {
|
|
1928
1928
|
var n;
|
|
1929
|
-
(n = t.pattern) != null || (t.pattern =
|
|
1929
|
+
(n = t.pattern) != null || (t.pattern = us), A.init(e, t), e._zod.check = (r) => {
|
|
1930
1930
|
const o = r.value.split("/");
|
|
1931
1931
|
try {
|
|
1932
1932
|
if (o.length !== 2)
|
|
@@ -1951,7 +1951,7 @@ const Os = {
|
|
|
1951
1951
|
}
|
|
1952
1952
|
};
|
|
1953
1953
|
});
|
|
1954
|
-
function
|
|
1954
|
+
function lo(e) {
|
|
1955
1955
|
if (e === "")
|
|
1956
1956
|
return !0;
|
|
1957
1957
|
if (e.length % 4 !== 0)
|
|
@@ -1962,10 +1962,10 @@ function ao(e) {
|
|
|
1962
1962
|
return !1;
|
|
1963
1963
|
}
|
|
1964
1964
|
}
|
|
1965
|
-
const
|
|
1965
|
+
const Qs = /* @__PURE__ */ h("$ZodBase64", (e, t) => {
|
|
1966
1966
|
var n;
|
|
1967
|
-
(n = t.pattern) != null || (t.pattern =
|
|
1968
|
-
|
|
1967
|
+
(n = t.pattern) != null || (t.pattern = ls), A.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (r) => {
|
|
1968
|
+
lo(r.value) || r.issues.push({
|
|
1969
1969
|
code: "invalid_format",
|
|
1970
1970
|
format: "base64",
|
|
1971
1971
|
input: r.value,
|
|
@@ -1974,16 +1974,16 @@ const Gs = /* @__PURE__ */ h("$ZodBase64", (e, t) => {
|
|
|
1974
1974
|
});
|
|
1975
1975
|
};
|
|
1976
1976
|
});
|
|
1977
|
-
function
|
|
1978
|
-
if (!
|
|
1977
|
+
function ec(e) {
|
|
1978
|
+
if (!ro.test(e))
|
|
1979
1979
|
return !1;
|
|
1980
1980
|
const t = e.replace(/[-_]/g, (r) => r === "-" ? "+" : "/"), n = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
|
|
1981
|
-
return
|
|
1981
|
+
return lo(n);
|
|
1982
1982
|
}
|
|
1983
|
-
const
|
|
1983
|
+
const tc = /* @__PURE__ */ h("$ZodBase64URL", (e, t) => {
|
|
1984
1984
|
var n;
|
|
1985
|
-
(n = t.pattern) != null || (t.pattern =
|
|
1986
|
-
|
|
1985
|
+
(n = t.pattern) != null || (t.pattern = ro), A.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (r) => {
|
|
1986
|
+
ec(r.value) || r.issues.push({
|
|
1987
1987
|
code: "invalid_format",
|
|
1988
1988
|
format: "base64url",
|
|
1989
1989
|
input: r.value,
|
|
@@ -1991,11 +1991,11 @@ const Xs = /* @__PURE__ */ h("$ZodBase64URL", (e, t) => {
|
|
|
1991
1991
|
continue: !t.abort
|
|
1992
1992
|
});
|
|
1993
1993
|
};
|
|
1994
|
-
}),
|
|
1994
|
+
}), nc = /* @__PURE__ */ h("$ZodE164", (e, t) => {
|
|
1995
1995
|
var n;
|
|
1996
|
-
(n = t.pattern) != null || (t.pattern =
|
|
1996
|
+
(n = t.pattern) != null || (t.pattern = fs), A.init(e, t);
|
|
1997
1997
|
});
|
|
1998
|
-
function
|
|
1998
|
+
function rc(e, t = null) {
|
|
1999
1999
|
try {
|
|
2000
2000
|
const n = e.split(".");
|
|
2001
2001
|
if (n.length !== 3)
|
|
@@ -2009,9 +2009,9 @@ function Qs(e, t = null) {
|
|
|
2009
2009
|
return !1;
|
|
2010
2010
|
}
|
|
2011
2011
|
}
|
|
2012
|
-
const
|
|
2012
|
+
const oc = /* @__PURE__ */ h("$ZodJWT", (e, t) => {
|
|
2013
2013
|
A.init(e, t), e._zod.check = (n) => {
|
|
2014
|
-
|
|
2014
|
+
rc(n.value, t.alg) || n.issues.push({
|
|
2015
2015
|
code: "invalid_format",
|
|
2016
2016
|
format: "jwt",
|
|
2017
2017
|
input: n.value,
|
|
@@ -2019,9 +2019,9 @@ const ec = /* @__PURE__ */ h("$ZodJWT", (e, t) => {
|
|
|
2019
2019
|
continue: !t.abort
|
|
2020
2020
|
});
|
|
2021
2021
|
};
|
|
2022
|
-
}),
|
|
2022
|
+
}), fo = /* @__PURE__ */ h("$ZodNumber", (e, t) => {
|
|
2023
2023
|
var n;
|
|
2024
|
-
I.init(e, t), e._zod.pattern = (n = e._zod.bag.pattern) != null ? n :
|
|
2024
|
+
I.init(e, t), e._zod.pattern = (n = e._zod.bag.pattern) != null ? n : ao, e._zod.parse = (r, o) => {
|
|
2025
2025
|
if (t.coerce)
|
|
2026
2026
|
try {
|
|
2027
2027
|
r.value = Number(r.value);
|
|
@@ -2038,10 +2038,10 @@ const ec = /* @__PURE__ */ h("$ZodJWT", (e, t) => {
|
|
|
2038
2038
|
inst: e
|
|
2039
2039
|
}, a ? { received: a } : {})), r;
|
|
2040
2040
|
};
|
|
2041
|
-
}),
|
|
2042
|
-
|
|
2043
|
-
}),
|
|
2044
|
-
I.init(e, t), e._zod.pattern =
|
|
2041
|
+
}), ic = /* @__PURE__ */ h("$ZodNumberFormat", (e, t) => {
|
|
2042
|
+
vs.init(e, t), fo.init(e, t);
|
|
2043
|
+
}), ac = /* @__PURE__ */ h("$ZodBoolean", (e, t) => {
|
|
2044
|
+
I.init(e, t), e._zod.pattern = ms, e._zod.parse = (n, r) => {
|
|
2045
2045
|
if (t.coerce)
|
|
2046
2046
|
try {
|
|
2047
2047
|
n.value = !!n.value;
|
|
@@ -2055,9 +2055,9 @@ const ec = /* @__PURE__ */ h("$ZodJWT", (e, t) => {
|
|
|
2055
2055
|
inst: e
|
|
2056
2056
|
}), n;
|
|
2057
2057
|
};
|
|
2058
|
-
}),
|
|
2058
|
+
}), sc = /* @__PURE__ */ h("$ZodUnknown", (e, t) => {
|
|
2059
2059
|
I.init(e, t), e._zod.parse = (n) => n;
|
|
2060
|
-
}),
|
|
2060
|
+
}), cc = /* @__PURE__ */ h("$ZodNever", (e, t) => {
|
|
2061
2061
|
I.init(e, t), e._zod.parse = (n, r) => (n.issues.push({
|
|
2062
2062
|
expected: "never",
|
|
2063
2063
|
code: "invalid_type",
|
|
@@ -2065,10 +2065,10 @@ const ec = /* @__PURE__ */ h("$ZodJWT", (e, t) => {
|
|
|
2065
2065
|
inst: e
|
|
2066
2066
|
}), n);
|
|
2067
2067
|
});
|
|
2068
|
-
function
|
|
2069
|
-
e.issues.length && t.issues.push(...
|
|
2068
|
+
function Kn(e, t, n) {
|
|
2069
|
+
e.issues.length && t.issues.push(...Re(n, e.issues)), t.value[n] = e.value;
|
|
2070
2070
|
}
|
|
2071
|
-
const
|
|
2071
|
+
const uc = /* @__PURE__ */ h("$ZodArray", (e, t) => {
|
|
2072
2072
|
I.init(e, t), e._zod.parse = (n, r) => {
|
|
2073
2073
|
const o = n.value;
|
|
2074
2074
|
if (!Array.isArray(o))
|
|
@@ -2085,26 +2085,26 @@ const ic = /* @__PURE__ */ h("$ZodArray", (e, t) => {
|
|
|
2085
2085
|
value: s,
|
|
2086
2086
|
issues: []
|
|
2087
2087
|
}, r);
|
|
2088
|
-
c instanceof Promise ? i.push(c.then((u) =>
|
|
2088
|
+
c instanceof Promise ? i.push(c.then((u) => Kn(u, n, a))) : Kn(c, n, a);
|
|
2089
2089
|
}
|
|
2090
2090
|
return i.length ? Promise.all(i).then(() => n) : n;
|
|
2091
2091
|
};
|
|
2092
2092
|
});
|
|
2093
|
-
function
|
|
2093
|
+
function xt(e, t, n, r, o) {
|
|
2094
2094
|
if (e.issues.length) {
|
|
2095
2095
|
if (o && !(n in r))
|
|
2096
2096
|
return;
|
|
2097
|
-
t.issues.push(...
|
|
2097
|
+
t.issues.push(...Re(n, e.issues));
|
|
2098
2098
|
}
|
|
2099
2099
|
e.value === void 0 ? n in r && (t.value[n] = void 0) : t.value[n] = e.value;
|
|
2100
2100
|
}
|
|
2101
|
-
function
|
|
2101
|
+
function ho(e) {
|
|
2102
2102
|
var r, o, i, a;
|
|
2103
2103
|
const t = Object.keys(e.shape);
|
|
2104
2104
|
for (const s of t)
|
|
2105
2105
|
if (!((a = (i = (o = (r = e.shape) == null ? void 0 : r[s]) == null ? void 0 : o._zod) == null ? void 0 : i.traits) != null && a.has("$ZodType")))
|
|
2106
2106
|
throw new Error(`Invalid element at key "${s}": expected a Zod schema`);
|
|
2107
|
-
const n =
|
|
2107
|
+
const n = Za(e.shape);
|
|
2108
2108
|
return y(p({}, e), {
|
|
2109
2109
|
keys: t,
|
|
2110
2110
|
keySet: new Set(t),
|
|
@@ -2112,7 +2112,7 @@ function co(e) {
|
|
|
2112
2112
|
optionalKeys: new Set(n)
|
|
2113
2113
|
});
|
|
2114
2114
|
}
|
|
2115
|
-
function
|
|
2115
|
+
function po(e, t, n, r, o, i) {
|
|
2116
2116
|
const a = [], s = o.keySet, c = o.catchall._zod, u = c.def.type, l = c.optout === "optional";
|
|
2117
2117
|
for (const d in t) {
|
|
2118
2118
|
if (s.has(d))
|
|
@@ -2122,7 +2122,7 @@ function uo(e, t, n, r, o, i) {
|
|
|
2122
2122
|
continue;
|
|
2123
2123
|
}
|
|
2124
2124
|
const f = c.run({ value: t[d], issues: [] }, r);
|
|
2125
|
-
f instanceof Promise ? e.push(f.then((_) =>
|
|
2125
|
+
f instanceof Promise ? e.push(f.then((_) => xt(_, n, d, t, l))) : xt(f, n, d, t, l);
|
|
2126
2126
|
}
|
|
2127
2127
|
return a.length && n.issues.push({
|
|
2128
2128
|
code: "unrecognized_keys",
|
|
@@ -2131,7 +2131,7 @@ function uo(e, t, n, r, o, i) {
|
|
|
2131
2131
|
inst: i
|
|
2132
2132
|
}), e.length ? Promise.all(e).then(() => n) : n;
|
|
2133
2133
|
}
|
|
2134
|
-
const
|
|
2134
|
+
const lc = /* @__PURE__ */ h("$ZodObject", (e, t) => {
|
|
2135
2135
|
I.init(e, t);
|
|
2136
2136
|
const n = Object.getOwnPropertyDescriptor(t, "shape");
|
|
2137
2137
|
if (!(n != null && n.get)) {
|
|
@@ -2145,7 +2145,7 @@ const ac = /* @__PURE__ */ h("$ZodObject", (e, t) => {
|
|
|
2145
2145
|
}
|
|
2146
2146
|
});
|
|
2147
2147
|
}
|
|
2148
|
-
const r =
|
|
2148
|
+
const r = bn(() => ho(t));
|
|
2149
2149
|
Z(e._zod, "propValues", () => {
|
|
2150
2150
|
var u;
|
|
2151
2151
|
const s = t.shape, c = {};
|
|
@@ -2159,7 +2159,7 @@ const ac = /* @__PURE__ */ h("$ZodObject", (e, t) => {
|
|
|
2159
2159
|
}
|
|
2160
2160
|
return c;
|
|
2161
2161
|
});
|
|
2162
|
-
const o =
|
|
2162
|
+
const o = Ot, i = t.catchall;
|
|
2163
2163
|
let a;
|
|
2164
2164
|
e._zod.parse = (s, c) => {
|
|
2165
2165
|
a != null || (a = r.value);
|
|
@@ -2175,16 +2175,16 @@ const ac = /* @__PURE__ */ h("$ZodObject", (e, t) => {
|
|
|
2175
2175
|
const l = [], d = a.shape;
|
|
2176
2176
|
for (const f of a.keys) {
|
|
2177
2177
|
const _ = d[f], m = _._zod.optout === "optional", w = _._zod.run({ value: u[f], issues: [] }, c);
|
|
2178
|
-
w instanceof Promise ? l.push(w.then((O) =>
|
|
2178
|
+
w instanceof Promise ? l.push(w.then((O) => xt(O, s, f, u, m))) : xt(w, s, f, u, m);
|
|
2179
2179
|
}
|
|
2180
|
-
return i ?
|
|
2180
|
+
return i ? po(l, u, s, c, r.value, e) : l.length ? Promise.all(l).then(() => s) : s;
|
|
2181
2181
|
};
|
|
2182
|
-
}),
|
|
2183
|
-
|
|
2184
|
-
const n = e._zod.parse, r =
|
|
2182
|
+
}), fc = /* @__PURE__ */ h("$ZodObjectJIT", (e, t) => {
|
|
2183
|
+
lc.init(e, t);
|
|
2184
|
+
const n = e._zod.parse, r = bn(() => ho(t)), o = (f) => {
|
|
2185
2185
|
var K;
|
|
2186
|
-
const _ = new
|
|
2187
|
-
const S =
|
|
2186
|
+
const _ = new Is(["shape", "payload", "ctx"]), m = r.value, w = (T) => {
|
|
2187
|
+
const S = Wn(T);
|
|
2188
2188
|
return `shape[${S}]._zod.run({ value: input[${S}], issues: [] }, ctx)`;
|
|
2189
2189
|
};
|
|
2190
2190
|
_.write("const input = payload.value;");
|
|
@@ -2194,7 +2194,7 @@ const ac = /* @__PURE__ */ h("$ZodObject", (e, t) => {
|
|
|
2194
2194
|
O[T] = `key_${U++}`;
|
|
2195
2195
|
_.write("const newResult = {};");
|
|
2196
2196
|
for (const T of m.keys) {
|
|
2197
|
-
const S = O[T], R =
|
|
2197
|
+
const S = O[T], R = Wn(T), b = f[T], ue = ((K = b == null ? void 0 : b._zod) == null ? void 0 : K.optout) === "optional";
|
|
2198
2198
|
_.write(`const ${S} = ${w(T)};`), ue ? _.write(`
|
|
2199
2199
|
if (${S}.issues.length) {
|
|
2200
2200
|
if (${R} in input) {
|
|
@@ -2236,12 +2236,12 @@ const ac = /* @__PURE__ */ h("$ZodObject", (e, t) => {
|
|
|
2236
2236
|
return (T, S) => H(f, T, S);
|
|
2237
2237
|
};
|
|
2238
2238
|
let i;
|
|
2239
|
-
const a =
|
|
2239
|
+
const a = Ot, s = !qr.jitless, u = s && Ta.value, l = t.catchall;
|
|
2240
2240
|
let d;
|
|
2241
2241
|
e._zod.parse = (f, _) => {
|
|
2242
2242
|
d != null || (d = r.value);
|
|
2243
2243
|
const m = f.value;
|
|
2244
|
-
return a(m) ? s && u && (_ == null ? void 0 : _.async) === !1 && _.jitless !== !0 ? (i || (i = o(t.shape)), f = i(f, _), l ?
|
|
2244
|
+
return a(m) ? s && u && (_ == null ? void 0 : _.async) === !1 && _.jitless !== !0 ? (i || (i = o(t.shape)), f = i(f, _), l ? po([], m, f, _, d, e) : f) : n(f, _) : (f.issues.push({
|
|
2245
2245
|
expected: "object",
|
|
2246
2246
|
code: "invalid_type",
|
|
2247
2247
|
input: m,
|
|
@@ -2249,11 +2249,11 @@ const ac = /* @__PURE__ */ h("$ZodObject", (e, t) => {
|
|
|
2249
2249
|
}), f);
|
|
2250
2250
|
};
|
|
2251
2251
|
});
|
|
2252
|
-
function
|
|
2252
|
+
function Gn(e, t, n, r) {
|
|
2253
2253
|
for (const i of e)
|
|
2254
2254
|
if (i.issues.length === 0)
|
|
2255
2255
|
return t.value = i.value, t;
|
|
2256
|
-
const o = e.filter((i) => !
|
|
2256
|
+
const o = e.filter((i) => !Pe(i));
|
|
2257
2257
|
return o.length === 1 ? (t.value = o[0].value, o[0]) : (t.issues.push({
|
|
2258
2258
|
code: "invalid_union",
|
|
2259
2259
|
input: t.value,
|
|
@@ -2261,14 +2261,14 @@ function Vn(e, t, n, r) {
|
|
|
2261
2261
|
errors: e.map((i) => i.issues.map((a) => ve(a, r, we())))
|
|
2262
2262
|
}), t);
|
|
2263
2263
|
}
|
|
2264
|
-
const
|
|
2264
|
+
const dc = /* @__PURE__ */ h("$ZodUnion", (e, t) => {
|
|
2265
2265
|
I.init(e, t), Z(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), Z(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), Z(e._zod, "values", () => {
|
|
2266
2266
|
if (t.options.every((o) => o._zod.values))
|
|
2267
2267
|
return new Set(t.options.flatMap((o) => Array.from(o._zod.values)));
|
|
2268
2268
|
}), Z(e._zod, "pattern", () => {
|
|
2269
2269
|
if (t.options.every((o) => o._zod.pattern)) {
|
|
2270
2270
|
const o = t.options.map((i) => i._zod.pattern);
|
|
2271
|
-
return new RegExp(`^(${o.map((i) =>
|
|
2271
|
+
return new RegExp(`^(${o.map((i) => vn(i.source)).join("|")})$`);
|
|
2272
2272
|
}
|
|
2273
2273
|
});
|
|
2274
2274
|
const n = t.options.length === 1, r = t.options[0]._zod.run;
|
|
@@ -2290,23 +2290,23 @@ const cc = /* @__PURE__ */ h("$ZodUnion", (e, t) => {
|
|
|
2290
2290
|
s.push(u);
|
|
2291
2291
|
}
|
|
2292
2292
|
}
|
|
2293
|
-
return a ? Promise.all(s).then((c) =>
|
|
2293
|
+
return a ? Promise.all(s).then((c) => Gn(c, o, e, i)) : Gn(s, o, e, i);
|
|
2294
2294
|
};
|
|
2295
|
-
}),
|
|
2295
|
+
}), hc = /* @__PURE__ */ h("$ZodIntersection", (e, t) => {
|
|
2296
2296
|
I.init(e, t), e._zod.parse = (n, r) => {
|
|
2297
2297
|
const o = n.value, i = t.left._zod.run({ value: o, issues: [] }, r), a = t.right._zod.run({ value: o, issues: [] }, r);
|
|
2298
|
-
return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([c, u]) =>
|
|
2298
|
+
return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([c, u]) => qn(n, c, u)) : qn(n, i, a);
|
|
2299
2299
|
};
|
|
2300
2300
|
});
|
|
2301
|
-
function
|
|
2301
|
+
function an(e, t) {
|
|
2302
2302
|
if (e === t)
|
|
2303
2303
|
return { valid: !0, data: e };
|
|
2304
2304
|
if (e instanceof Date && t instanceof Date && +e == +t)
|
|
2305
2305
|
return { valid: !0, data: e };
|
|
2306
|
-
if (
|
|
2306
|
+
if (Me(e) && Me(t)) {
|
|
2307
2307
|
const n = Object.keys(t), r = Object.keys(e).filter((i) => n.indexOf(i) !== -1), o = p(p({}, e), t);
|
|
2308
2308
|
for (const i of r) {
|
|
2309
|
-
const a =
|
|
2309
|
+
const a = an(e[i], t[i]);
|
|
2310
2310
|
if (!a.valid)
|
|
2311
2311
|
return {
|
|
2312
2312
|
valid: !1,
|
|
@@ -2321,7 +2321,7 @@ function nn(e, t) {
|
|
|
2321
2321
|
return { valid: !1, mergeErrorPath: [] };
|
|
2322
2322
|
const n = [];
|
|
2323
2323
|
for (let r = 0; r < e.length; r++) {
|
|
2324
|
-
const o = e[r], i = t[r], a =
|
|
2324
|
+
const o = e[r], i = t[r], a = an(o, i);
|
|
2325
2325
|
if (!a.valid)
|
|
2326
2326
|
return {
|
|
2327
2327
|
valid: !1,
|
|
@@ -2333,7 +2333,7 @@ function nn(e, t) {
|
|
|
2333
2333
|
}
|
|
2334
2334
|
return { valid: !1, mergeErrorPath: [] };
|
|
2335
2335
|
}
|
|
2336
|
-
function
|
|
2336
|
+
function qn(e, t, n) {
|
|
2337
2337
|
const r = /* @__PURE__ */ new Map();
|
|
2338
2338
|
let o;
|
|
2339
2339
|
for (const s of t.issues)
|
|
@@ -2350,17 +2350,17 @@ function Wn(e, t, n) {
|
|
|
2350
2350
|
else
|
|
2351
2351
|
e.issues.push(s);
|
|
2352
2352
|
const i = [...r].filter(([, s]) => s.l && s.r).map(([s]) => s);
|
|
2353
|
-
if (i.length && o && e.issues.push(y(p({}, o), { keys: i })),
|
|
2353
|
+
if (i.length && o && e.issues.push(y(p({}, o), { keys: i })), Pe(e))
|
|
2354
2354
|
return e;
|
|
2355
|
-
const a =
|
|
2355
|
+
const a = an(t.value, n.value);
|
|
2356
2356
|
if (!a.valid)
|
|
2357
2357
|
throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);
|
|
2358
2358
|
return e.value = a.data, e;
|
|
2359
2359
|
}
|
|
2360
|
-
const
|
|
2360
|
+
const pc = /* @__PURE__ */ h("$ZodRecord", (e, t) => {
|
|
2361
2361
|
I.init(e, t), e._zod.parse = (n, r) => {
|
|
2362
2362
|
const o = n.value;
|
|
2363
|
-
if (!
|
|
2363
|
+
if (!Me(o))
|
|
2364
2364
|
return n.issues.push({
|
|
2365
2365
|
expected: "record",
|
|
2366
2366
|
code: "invalid_type",
|
|
@@ -2376,8 +2376,8 @@ const lc = /* @__PURE__ */ h("$ZodRecord", (e, t) => {
|
|
|
2376
2376
|
s.add(typeof u == "number" ? u.toString() : u);
|
|
2377
2377
|
const l = t.valueType._zod.run({ value: o[u], issues: [] }, r);
|
|
2378
2378
|
l instanceof Promise ? i.push(l.then((d) => {
|
|
2379
|
-
d.issues.length && n.issues.push(...
|
|
2380
|
-
})) : (l.issues.length && n.issues.push(...
|
|
2379
|
+
d.issues.length && n.issues.push(...Re(u, d.issues)), n.value[u] = d.value;
|
|
2380
|
+
})) : (l.issues.length && n.issues.push(...Re(u, l.issues)), n.value[u] = l.value);
|
|
2381
2381
|
}
|
|
2382
2382
|
let c;
|
|
2383
2383
|
for (const u in o)
|
|
@@ -2396,7 +2396,7 @@ const lc = /* @__PURE__ */ h("$ZodRecord", (e, t) => {
|
|
|
2396
2396
|
let c = t.keyType._zod.run({ value: s, issues: [] }, r);
|
|
2397
2397
|
if (c instanceof Promise)
|
|
2398
2398
|
throw new Error("Async schemas not supported in object keys currently");
|
|
2399
|
-
if (typeof s == "string" &&
|
|
2399
|
+
if (typeof s == "string" && ao.test(s) && c.issues.length) {
|
|
2400
2400
|
const d = t.keyType._zod.run({ value: Number(s), issues: [] }, r);
|
|
2401
2401
|
if (d instanceof Promise)
|
|
2402
2402
|
throw new Error("Async schemas not supported in object keys currently");
|
|
@@ -2415,16 +2415,16 @@ const lc = /* @__PURE__ */ h("$ZodRecord", (e, t) => {
|
|
|
2415
2415
|
}
|
|
2416
2416
|
const l = t.valueType._zod.run({ value: o[s], issues: [] }, r);
|
|
2417
2417
|
l instanceof Promise ? i.push(l.then((d) => {
|
|
2418
|
-
d.issues.length && n.issues.push(...
|
|
2419
|
-
})) : (l.issues.length && n.issues.push(...
|
|
2418
|
+
d.issues.length && n.issues.push(...Re(s, d.issues)), n.value[c.value] = d.value;
|
|
2419
|
+
})) : (l.issues.length && n.issues.push(...Re(s, l.issues)), n.value[c.value] = l.value);
|
|
2420
2420
|
}
|
|
2421
2421
|
}
|
|
2422
2422
|
return i.length ? Promise.all(i).then(() => n) : n;
|
|
2423
2423
|
};
|
|
2424
|
-
}),
|
|
2424
|
+
}), _c = /* @__PURE__ */ h("$ZodEnum", (e, t) => {
|
|
2425
2425
|
I.init(e, t);
|
|
2426
|
-
const n =
|
|
2427
|
-
e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) =>
|
|
2426
|
+
const n = Xr(t.entries), r = new Set(n);
|
|
2427
|
+
e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) => $a.has(typeof o)).map((o) => typeof o == "string" ? Je(o) : o.toString()).join("|")})$`), e._zod.parse = (o, i) => {
|
|
2428
2428
|
const a = o.value;
|
|
2429
2429
|
return r.has(a) || o.issues.push({
|
|
2430
2430
|
code: "invalid_value",
|
|
@@ -2433,11 +2433,11 @@ const lc = /* @__PURE__ */ h("$ZodRecord", (e, t) => {
|
|
|
2433
2433
|
inst: e
|
|
2434
2434
|
}), o;
|
|
2435
2435
|
};
|
|
2436
|
-
}),
|
|
2436
|
+
}), gc = /* @__PURE__ */ h("$ZodLiteral", (e, t) => {
|
|
2437
2437
|
if (I.init(e, t), t.values.length === 0)
|
|
2438
2438
|
throw new Error("Cannot create literal schema with no valid values");
|
|
2439
2439
|
const n = new Set(t.values);
|
|
2440
|
-
e._zod.values = n, e._zod.pattern = new RegExp(`^(${t.values.map((r) => typeof r == "string" ?
|
|
2440
|
+
e._zod.values = n, e._zod.pattern = new RegExp(`^(${t.values.map((r) => typeof r == "string" ? Je(r) : r ? Je(r.toString()) : String(r)).join("|")})$`), e._zod.parse = (r, o) => {
|
|
2441
2441
|
const i = r.value;
|
|
2442
2442
|
return n.has(i) || r.issues.push({
|
|
2443
2443
|
code: "invalid_value",
|
|
@@ -2446,64 +2446,64 @@ const lc = /* @__PURE__ */ h("$ZodRecord", (e, t) => {
|
|
|
2446
2446
|
inst: e
|
|
2447
2447
|
}), r;
|
|
2448
2448
|
};
|
|
2449
|
-
}),
|
|
2449
|
+
}), mc = /* @__PURE__ */ h("$ZodTransform", (e, t) => {
|
|
2450
2450
|
I.init(e, t), e._zod.parse = (n, r) => {
|
|
2451
2451
|
if (r.direction === "backward")
|
|
2452
|
-
throw new
|
|
2452
|
+
throw new Gr(e.constructor.name);
|
|
2453
2453
|
const o = t.transform(n.value, n);
|
|
2454
2454
|
if (r.async)
|
|
2455
2455
|
return (o instanceof Promise ? o : Promise.resolve(o)).then((a) => (n.value = a, n));
|
|
2456
2456
|
if (o instanceof Promise)
|
|
2457
|
-
throw new
|
|
2457
|
+
throw new Ce();
|
|
2458
2458
|
return n.value = o, n;
|
|
2459
2459
|
};
|
|
2460
2460
|
});
|
|
2461
|
-
function
|
|
2461
|
+
function Xn(e, t) {
|
|
2462
2462
|
return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e;
|
|
2463
2463
|
}
|
|
2464
|
-
const
|
|
2464
|
+
const _o = /* @__PURE__ */ h("$ZodOptional", (e, t) => {
|
|
2465
2465
|
I.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", () => {
|
|
2466
2466
|
const n = t.innerType._zod.pattern;
|
|
2467
|
-
return n ? new RegExp(`^(${
|
|
2467
|
+
return n ? new RegExp(`^(${vn(n.source)})?$`) : void 0;
|
|
2468
2468
|
}), e._zod.parse = (n, r) => {
|
|
2469
2469
|
if (t.innerType._zod.optin === "optional") {
|
|
2470
2470
|
const o = t.innerType._zod.run(n, r);
|
|
2471
|
-
return o instanceof Promise ? o.then((i) =>
|
|
2471
|
+
return o instanceof Promise ? o.then((i) => Xn(i, n.value)) : Xn(o, n.value);
|
|
2472
2472
|
}
|
|
2473
2473
|
return n.value === void 0 ? n : t.innerType._zod.run(n, r);
|
|
2474
2474
|
};
|
|
2475
|
-
}),
|
|
2476
|
-
|
|
2477
|
-
}),
|
|
2475
|
+
}), yc = /* @__PURE__ */ h("$ZodExactOptional", (e, t) => {
|
|
2476
|
+
_o.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);
|
|
2477
|
+
}), bc = /* @__PURE__ */ h("$ZodNullable", (e, t) => {
|
|
2478
2478
|
I.init(e, t), Z(e._zod, "optin", () => t.innerType._zod.optin), Z(e._zod, "optout", () => t.innerType._zod.optout), Z(e._zod, "pattern", () => {
|
|
2479
2479
|
const n = t.innerType._zod.pattern;
|
|
2480
|
-
return n ? new RegExp(`^(${
|
|
2480
|
+
return n ? new RegExp(`^(${vn(n.source)}|null)$`) : void 0;
|
|
2481
2481
|
}), 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);
|
|
2482
|
-
}),
|
|
2482
|
+
}), wc = /* @__PURE__ */ h("$ZodDefault", (e, t) => {
|
|
2483
2483
|
I.init(e, t), e._zod.optin = "optional", Z(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
|
|
2484
2484
|
if (r.direction === "backward")
|
|
2485
2485
|
return t.innerType._zod.run(n, r);
|
|
2486
2486
|
if (n.value === void 0)
|
|
2487
2487
|
return n.value = t.defaultValue, n;
|
|
2488
2488
|
const o = t.innerType._zod.run(n, r);
|
|
2489
|
-
return o instanceof Promise ? o.then((i) =>
|
|
2489
|
+
return o instanceof Promise ? o.then((i) => Yn(i, t)) : Yn(o, t);
|
|
2490
2490
|
};
|
|
2491
2491
|
});
|
|
2492
|
-
function
|
|
2492
|
+
function Yn(e, t) {
|
|
2493
2493
|
return e.value === void 0 && (e.value = t.defaultValue), e;
|
|
2494
2494
|
}
|
|
2495
|
-
const
|
|
2495
|
+
const vc = /* @__PURE__ */ h("$ZodPrefault", (e, t) => {
|
|
2496
2496
|
I.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));
|
|
2497
|
-
}),
|
|
2497
|
+
}), kc = /* @__PURE__ */ h("$ZodNonOptional", (e, t) => {
|
|
2498
2498
|
I.init(e, t), Z(e._zod, "values", () => {
|
|
2499
2499
|
const n = t.innerType._zod.values;
|
|
2500
2500
|
return n ? new Set([...n].filter((r) => r !== void 0)) : void 0;
|
|
2501
2501
|
}), e._zod.parse = (n, r) => {
|
|
2502
2502
|
const o = t.innerType._zod.run(n, r);
|
|
2503
|
-
return o instanceof Promise ? o.then((i) =>
|
|
2503
|
+
return o instanceof Promise ? o.then((i) => Qn(i, e)) : Qn(o, e);
|
|
2504
2504
|
};
|
|
2505
2505
|
});
|
|
2506
|
-
function
|
|
2506
|
+
function Qn(e, t) {
|
|
2507
2507
|
return !e.issues.length && e.value === void 0 && e.issues.push({
|
|
2508
2508
|
code: "invalid_type",
|
|
2509
2509
|
expected: "nonoptional",
|
|
@@ -2511,7 +2511,7 @@ function Gn(e, t) {
|
|
|
2511
2511
|
inst: t
|
|
2512
2512
|
}), e;
|
|
2513
2513
|
}
|
|
2514
|
-
const
|
|
2514
|
+
const zc = /* @__PURE__ */ h("$ZodCatch", (e, t) => {
|
|
2515
2515
|
I.init(e, t), Z(e._zod, "optin", () => t.innerType._zod.optin), Z(e._zod, "optout", () => t.innerType._zod.optout), Z(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
|
|
2516
2516
|
if (r.direction === "backward")
|
|
2517
2517
|
return t.innerType._zod.run(n, r);
|
|
@@ -2528,20 +2528,20 @@ const bc = /* @__PURE__ */ h("$ZodCatch", (e, t) => {
|
|
|
2528
2528
|
input: n.value
|
|
2529
2529
|
})), n.issues = []), n);
|
|
2530
2530
|
};
|
|
2531
|
-
}),
|
|
2531
|
+
}), Sc = /* @__PURE__ */ h("$ZodPipe", (e, t) => {
|
|
2532
2532
|
I.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) => {
|
|
2533
2533
|
if (r.direction === "backward") {
|
|
2534
2534
|
const i = t.out._zod.run(n, r);
|
|
2535
|
-
return i instanceof Promise ? i.then((a) =>
|
|
2535
|
+
return i instanceof Promise ? i.then((a) => wt(a, t.in, r)) : wt(i, t.in, r);
|
|
2536
2536
|
}
|
|
2537
2537
|
const o = t.in._zod.run(n, r);
|
|
2538
|
-
return o instanceof Promise ? o.then((i) =>
|
|
2538
|
+
return o instanceof Promise ? o.then((i) => wt(i, t.out, r)) : wt(o, t.out, r);
|
|
2539
2539
|
};
|
|
2540
2540
|
});
|
|
2541
|
-
function
|
|
2541
|
+
function wt(e, t, n) {
|
|
2542
2542
|
return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues }, n);
|
|
2543
2543
|
}
|
|
2544
|
-
const
|
|
2544
|
+
const Ec = /* @__PURE__ */ h("$ZodReadonly", (e, t) => {
|
|
2545
2545
|
I.init(e, t), Z(e._zod, "propValues", () => t.innerType._zod.propValues), Z(e._zod, "values", () => t.innerType._zod.values), Z(e._zod, "optin", () => {
|
|
2546
2546
|
var n, r;
|
|
2547
2547
|
return (r = (n = t.innerType) == null ? void 0 : n._zod) == null ? void 0 : r.optin;
|
|
@@ -2552,21 +2552,21 @@ const vc = /* @__PURE__ */ h("$ZodReadonly", (e, t) => {
|
|
|
2552
2552
|
if (r.direction === "backward")
|
|
2553
2553
|
return t.innerType._zod.run(n, r);
|
|
2554
2554
|
const o = t.innerType._zod.run(n, r);
|
|
2555
|
-
return o instanceof Promise ? o.then(
|
|
2555
|
+
return o instanceof Promise ? o.then(er) : er(o);
|
|
2556
2556
|
};
|
|
2557
2557
|
});
|
|
2558
|
-
function
|
|
2558
|
+
function er(e) {
|
|
2559
2559
|
return e.value = Object.freeze(e.value), e;
|
|
2560
2560
|
}
|
|
2561
|
-
const
|
|
2561
|
+
const Tc = /* @__PURE__ */ h("$ZodCustom", (e, t) => {
|
|
2562
2562
|
W.init(e, t), I.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
|
|
2563
2563
|
const r = n.value, o = t.fn(r);
|
|
2564
2564
|
if (o instanceof Promise)
|
|
2565
|
-
return o.then((i) =>
|
|
2566
|
-
|
|
2565
|
+
return o.then((i) => tr(i, n, r, e));
|
|
2566
|
+
tr(o, n, r, e);
|
|
2567
2567
|
};
|
|
2568
2568
|
});
|
|
2569
|
-
function
|
|
2569
|
+
function tr(e, t, n, r) {
|
|
2570
2570
|
var o;
|
|
2571
2571
|
if (!e) {
|
|
2572
2572
|
const i = {
|
|
@@ -2579,11 +2579,11 @@ function Xn(e, t, n, r) {
|
|
|
2579
2579
|
continue: !r._zod.def.abort
|
|
2580
2580
|
// params: inst._zod.def.params,
|
|
2581
2581
|
};
|
|
2582
|
-
r._zod.def.params && (i.params = r._zod.def.params), t.issues.push(
|
|
2582
|
+
r._zod.def.params && (i.params = r._zod.def.params), t.issues.push(ut(i));
|
|
2583
2583
|
}
|
|
2584
2584
|
}
|
|
2585
|
-
var
|
|
2586
|
-
class
|
|
2585
|
+
var nr;
|
|
2586
|
+
class $c {
|
|
2587
2587
|
constructor() {
|
|
2588
2588
|
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
|
|
2589
2589
|
}
|
|
@@ -2613,20 +2613,20 @@ class zc {
|
|
|
2613
2613
|
return this._map.has(t);
|
|
2614
2614
|
}
|
|
2615
2615
|
}
|
|
2616
|
-
function
|
|
2617
|
-
return new
|
|
2616
|
+
function Zc() {
|
|
2617
|
+
return new $c();
|
|
2618
2618
|
}
|
|
2619
|
-
var
|
|
2620
|
-
(
|
|
2621
|
-
const
|
|
2619
|
+
var yr;
|
|
2620
|
+
(yr = (nr = globalThis).__zod_globalRegistry) != null || (nr.__zod_globalRegistry = Zc());
|
|
2621
|
+
const Qe = globalThis.__zod_globalRegistry;
|
|
2622
2622
|
// @__NO_SIDE_EFFECTS__
|
|
2623
|
-
function
|
|
2623
|
+
function Oc(e, t) {
|
|
2624
2624
|
return new e(p({
|
|
2625
2625
|
type: "string"
|
|
2626
2626
|
}, g(t)));
|
|
2627
2627
|
}
|
|
2628
2628
|
// @__NO_SIDE_EFFECTS__
|
|
2629
|
-
function
|
|
2629
|
+
function xc(e, t) {
|
|
2630
2630
|
return new e(p({
|
|
2631
2631
|
type: "string",
|
|
2632
2632
|
format: "email",
|
|
@@ -2635,7 +2635,7 @@ function Tc(e, t) {
|
|
|
2635
2635
|
}, g(t)));
|
|
2636
2636
|
}
|
|
2637
2637
|
// @__NO_SIDE_EFFECTS__
|
|
2638
|
-
function
|
|
2638
|
+
function rr(e, t) {
|
|
2639
2639
|
return new e(p({
|
|
2640
2640
|
type: "string",
|
|
2641
2641
|
format: "guid",
|
|
@@ -2644,7 +2644,7 @@ function Qn(e, t) {
|
|
|
2644
2644
|
}, g(t)));
|
|
2645
2645
|
}
|
|
2646
2646
|
// @__NO_SIDE_EFFECTS__
|
|
2647
|
-
function
|
|
2647
|
+
function Ac(e, t) {
|
|
2648
2648
|
return new e(p({
|
|
2649
2649
|
type: "string",
|
|
2650
2650
|
format: "uuid",
|
|
@@ -2653,7 +2653,7 @@ function $c(e, t) {
|
|
|
2653
2653
|
}, g(t)));
|
|
2654
2654
|
}
|
|
2655
2655
|
// @__NO_SIDE_EFFECTS__
|
|
2656
|
-
function
|
|
2656
|
+
function Ic(e, t) {
|
|
2657
2657
|
return new e(p({
|
|
2658
2658
|
type: "string",
|
|
2659
2659
|
format: "uuid",
|
|
@@ -2663,7 +2663,7 @@ function Zc(e, t) {
|
|
|
2663
2663
|
}, g(t)));
|
|
2664
2664
|
}
|
|
2665
2665
|
// @__NO_SIDE_EFFECTS__
|
|
2666
|
-
function
|
|
2666
|
+
function Nc(e, t) {
|
|
2667
2667
|
return new e(p({
|
|
2668
2668
|
type: "string",
|
|
2669
2669
|
format: "uuid",
|
|
@@ -2673,7 +2673,7 @@ function Oc(e, t) {
|
|
|
2673
2673
|
}, g(t)));
|
|
2674
2674
|
}
|
|
2675
2675
|
// @__NO_SIDE_EFFECTS__
|
|
2676
|
-
function
|
|
2676
|
+
function Pc(e, t) {
|
|
2677
2677
|
return new e(p({
|
|
2678
2678
|
type: "string",
|
|
2679
2679
|
format: "uuid",
|
|
@@ -2683,7 +2683,7 @@ function xc(e, t) {
|
|
|
2683
2683
|
}, g(t)));
|
|
2684
2684
|
}
|
|
2685
2685
|
// @__NO_SIDE_EFFECTS__
|
|
2686
|
-
function
|
|
2686
|
+
function Rc(e, t) {
|
|
2687
2687
|
return new e(p({
|
|
2688
2688
|
type: "string",
|
|
2689
2689
|
format: "url",
|
|
@@ -2692,7 +2692,7 @@ function Ac(e, t) {
|
|
|
2692
2692
|
}, g(t)));
|
|
2693
2693
|
}
|
|
2694
2694
|
// @__NO_SIDE_EFFECTS__
|
|
2695
|
-
function
|
|
2695
|
+
function Dc(e, t) {
|
|
2696
2696
|
return new e(p({
|
|
2697
2697
|
type: "string",
|
|
2698
2698
|
format: "emoji",
|
|
@@ -2701,7 +2701,7 @@ function Ic(e, t) {
|
|
|
2701
2701
|
}, g(t)));
|
|
2702
2702
|
}
|
|
2703
2703
|
// @__NO_SIDE_EFFECTS__
|
|
2704
|
-
function
|
|
2704
|
+
function Cc(e, t) {
|
|
2705
2705
|
return new e(p({
|
|
2706
2706
|
type: "string",
|
|
2707
2707
|
format: "nanoid",
|
|
@@ -2710,7 +2710,7 @@ function Nc(e, t) {
|
|
|
2710
2710
|
}, g(t)));
|
|
2711
2711
|
}
|
|
2712
2712
|
// @__NO_SIDE_EFFECTS__
|
|
2713
|
-
function
|
|
2713
|
+
function Fc(e, t) {
|
|
2714
2714
|
return new e(p({
|
|
2715
2715
|
type: "string",
|
|
2716
2716
|
format: "cuid",
|
|
@@ -2719,7 +2719,7 @@ function Pc(e, t) {
|
|
|
2719
2719
|
}, g(t)));
|
|
2720
2720
|
}
|
|
2721
2721
|
// @__NO_SIDE_EFFECTS__
|
|
2722
|
-
function
|
|
2722
|
+
function jc(e, t) {
|
|
2723
2723
|
return new e(p({
|
|
2724
2724
|
type: "string",
|
|
2725
2725
|
format: "cuid2",
|
|
@@ -2728,7 +2728,7 @@ function Rc(e, t) {
|
|
|
2728
2728
|
}, g(t)));
|
|
2729
2729
|
}
|
|
2730
2730
|
// @__NO_SIDE_EFFECTS__
|
|
2731
|
-
function
|
|
2731
|
+
function Uc(e, t) {
|
|
2732
2732
|
return new e(p({
|
|
2733
2733
|
type: "string",
|
|
2734
2734
|
format: "ulid",
|
|
@@ -2737,7 +2737,7 @@ function Dc(e, t) {
|
|
|
2737
2737
|
}, g(t)));
|
|
2738
2738
|
}
|
|
2739
2739
|
// @__NO_SIDE_EFFECTS__
|
|
2740
|
-
function
|
|
2740
|
+
function Lc(e, t) {
|
|
2741
2741
|
return new e(p({
|
|
2742
2742
|
type: "string",
|
|
2743
2743
|
format: "xid",
|
|
@@ -2746,7 +2746,7 @@ function Cc(e, t) {
|
|
|
2746
2746
|
}, g(t)));
|
|
2747
2747
|
}
|
|
2748
2748
|
// @__NO_SIDE_EFFECTS__
|
|
2749
|
-
function
|
|
2749
|
+
function Mc(e, t) {
|
|
2750
2750
|
return new e(p({
|
|
2751
2751
|
type: "string",
|
|
2752
2752
|
format: "ksuid",
|
|
@@ -2755,7 +2755,7 @@ function Fc(e, t) {
|
|
|
2755
2755
|
}, g(t)));
|
|
2756
2756
|
}
|
|
2757
2757
|
// @__NO_SIDE_EFFECTS__
|
|
2758
|
-
function
|
|
2758
|
+
function Jc(e, t) {
|
|
2759
2759
|
return new e(p({
|
|
2760
2760
|
type: "string",
|
|
2761
2761
|
format: "ipv4",
|
|
@@ -2764,7 +2764,7 @@ function jc(e, t) {
|
|
|
2764
2764
|
}, g(t)));
|
|
2765
2765
|
}
|
|
2766
2766
|
// @__NO_SIDE_EFFECTS__
|
|
2767
|
-
function
|
|
2767
|
+
function Bc(e, t) {
|
|
2768
2768
|
return new e(p({
|
|
2769
2769
|
type: "string",
|
|
2770
2770
|
format: "ipv6",
|
|
@@ -2773,7 +2773,7 @@ function Uc(e, t) {
|
|
|
2773
2773
|
}, g(t)));
|
|
2774
2774
|
}
|
|
2775
2775
|
// @__NO_SIDE_EFFECTS__
|
|
2776
|
-
function
|
|
2776
|
+
function Vc(e, t) {
|
|
2777
2777
|
return new e(p({
|
|
2778
2778
|
type: "string",
|
|
2779
2779
|
format: "cidrv4",
|
|
@@ -2782,7 +2782,7 @@ function Lc(e, t) {
|
|
|
2782
2782
|
}, g(t)));
|
|
2783
2783
|
}
|
|
2784
2784
|
// @__NO_SIDE_EFFECTS__
|
|
2785
|
-
function
|
|
2785
|
+
function Wc(e, t) {
|
|
2786
2786
|
return new e(p({
|
|
2787
2787
|
type: "string",
|
|
2788
2788
|
format: "cidrv6",
|
|
@@ -2791,7 +2791,7 @@ function Mc(e, t) {
|
|
|
2791
2791
|
}, g(t)));
|
|
2792
2792
|
}
|
|
2793
2793
|
// @__NO_SIDE_EFFECTS__
|
|
2794
|
-
function
|
|
2794
|
+
function Hc(e, t) {
|
|
2795
2795
|
return new e(p({
|
|
2796
2796
|
type: "string",
|
|
2797
2797
|
format: "base64",
|
|
@@ -2800,7 +2800,7 @@ function Jc(e, t) {
|
|
|
2800
2800
|
}, g(t)));
|
|
2801
2801
|
}
|
|
2802
2802
|
// @__NO_SIDE_EFFECTS__
|
|
2803
|
-
function
|
|
2803
|
+
function Kc(e, t) {
|
|
2804
2804
|
return new e(p({
|
|
2805
2805
|
type: "string",
|
|
2806
2806
|
format: "base64url",
|
|
@@ -2809,7 +2809,7 @@ function Bc(e, t) {
|
|
|
2809
2809
|
}, g(t)));
|
|
2810
2810
|
}
|
|
2811
2811
|
// @__NO_SIDE_EFFECTS__
|
|
2812
|
-
function
|
|
2812
|
+
function Gc(e, t) {
|
|
2813
2813
|
return new e(p({
|
|
2814
2814
|
type: "string",
|
|
2815
2815
|
format: "e164",
|
|
@@ -2818,7 +2818,7 @@ function Vc(e, t) {
|
|
|
2818
2818
|
}, g(t)));
|
|
2819
2819
|
}
|
|
2820
2820
|
// @__NO_SIDE_EFFECTS__
|
|
2821
|
-
function
|
|
2821
|
+
function qc(e, t) {
|
|
2822
2822
|
return new e(p({
|
|
2823
2823
|
type: "string",
|
|
2824
2824
|
format: "jwt",
|
|
@@ -2827,7 +2827,7 @@ function Wc(e, t) {
|
|
|
2827
2827
|
}, g(t)));
|
|
2828
2828
|
}
|
|
2829
2829
|
// @__NO_SIDE_EFFECTS__
|
|
2830
|
-
function
|
|
2830
|
+
function Xc(e, t) {
|
|
2831
2831
|
return new e(p({
|
|
2832
2832
|
type: "string",
|
|
2833
2833
|
format: "datetime",
|
|
@@ -2838,7 +2838,7 @@ function Hc(e, t) {
|
|
|
2838
2838
|
}, g(t)));
|
|
2839
2839
|
}
|
|
2840
2840
|
// @__NO_SIDE_EFFECTS__
|
|
2841
|
-
function
|
|
2841
|
+
function Yc(e, t) {
|
|
2842
2842
|
return new e(p({
|
|
2843
2843
|
type: "string",
|
|
2844
2844
|
format: "date",
|
|
@@ -2846,7 +2846,7 @@ function Kc(e, t) {
|
|
|
2846
2846
|
}, g(t)));
|
|
2847
2847
|
}
|
|
2848
2848
|
// @__NO_SIDE_EFFECTS__
|
|
2849
|
-
function
|
|
2849
|
+
function Qc(e, t) {
|
|
2850
2850
|
return new e(p({
|
|
2851
2851
|
type: "string",
|
|
2852
2852
|
format: "time",
|
|
@@ -2855,7 +2855,7 @@ function Gc(e, t) {
|
|
|
2855
2855
|
}, g(t)));
|
|
2856
2856
|
}
|
|
2857
2857
|
// @__NO_SIDE_EFFECTS__
|
|
2858
|
-
function
|
|
2858
|
+
function eu(e, t) {
|
|
2859
2859
|
return new e(p({
|
|
2860
2860
|
type: "string",
|
|
2861
2861
|
format: "duration",
|
|
@@ -2863,14 +2863,14 @@ function qc(e, t) {
|
|
|
2863
2863
|
}, g(t)));
|
|
2864
2864
|
}
|
|
2865
2865
|
// @__NO_SIDE_EFFECTS__
|
|
2866
|
-
function
|
|
2866
|
+
function tu(e, t) {
|
|
2867
2867
|
return new e(p({
|
|
2868
2868
|
type: "number",
|
|
2869
2869
|
checks: []
|
|
2870
2870
|
}, g(t)));
|
|
2871
2871
|
}
|
|
2872
2872
|
// @__NO_SIDE_EFFECTS__
|
|
2873
|
-
function
|
|
2873
|
+
function nu(e, t) {
|
|
2874
2874
|
return new e(p({
|
|
2875
2875
|
type: "number",
|
|
2876
2876
|
check: "number_format",
|
|
@@ -2879,26 +2879,26 @@ function Yc(e, t) {
|
|
|
2879
2879
|
}, g(t)));
|
|
2880
2880
|
}
|
|
2881
2881
|
// @__NO_SIDE_EFFECTS__
|
|
2882
|
-
function
|
|
2882
|
+
function ru(e, t) {
|
|
2883
2883
|
return new e(p({
|
|
2884
2884
|
type: "boolean"
|
|
2885
2885
|
}, g(t)));
|
|
2886
2886
|
}
|
|
2887
2887
|
// @__NO_SIDE_EFFECTS__
|
|
2888
|
-
function
|
|
2888
|
+
function ou(e) {
|
|
2889
2889
|
return new e({
|
|
2890
2890
|
type: "unknown"
|
|
2891
2891
|
});
|
|
2892
2892
|
}
|
|
2893
2893
|
// @__NO_SIDE_EFFECTS__
|
|
2894
|
-
function
|
|
2894
|
+
function iu(e, t) {
|
|
2895
2895
|
return new e(p({
|
|
2896
2896
|
type: "never"
|
|
2897
2897
|
}, g(t)));
|
|
2898
2898
|
}
|
|
2899
2899
|
// @__NO_SIDE_EFFECTS__
|
|
2900
|
-
function
|
|
2901
|
-
return new
|
|
2900
|
+
function or(e, t) {
|
|
2901
|
+
return new co(y(p({
|
|
2902
2902
|
check: "less_than"
|
|
2903
2903
|
}, g(t)), {
|
|
2904
2904
|
value: e,
|
|
@@ -2906,8 +2906,8 @@ function er(e, t) {
|
|
|
2906
2906
|
}));
|
|
2907
2907
|
}
|
|
2908
2908
|
// @__NO_SIDE_EFFECTS__
|
|
2909
|
-
function
|
|
2910
|
-
return new
|
|
2909
|
+
function Wt(e, t) {
|
|
2910
|
+
return new co(y(p({
|
|
2911
2911
|
check: "less_than"
|
|
2912
2912
|
}, g(t)), {
|
|
2913
2913
|
value: e,
|
|
@@ -2915,8 +2915,8 @@ function Jt(e, t) {
|
|
|
2915
2915
|
}));
|
|
2916
2916
|
}
|
|
2917
2917
|
// @__NO_SIDE_EFFECTS__
|
|
2918
|
-
function
|
|
2919
|
-
return new
|
|
2918
|
+
function ir(e, t) {
|
|
2919
|
+
return new uo(y(p({
|
|
2920
2920
|
check: "greater_than"
|
|
2921
2921
|
}, g(t)), {
|
|
2922
2922
|
value: e,
|
|
@@ -2924,8 +2924,8 @@ function tr(e, t) {
|
|
|
2924
2924
|
}));
|
|
2925
2925
|
}
|
|
2926
2926
|
// @__NO_SIDE_EFFECTS__
|
|
2927
|
-
function
|
|
2928
|
-
return new
|
|
2927
|
+
function Ht(e, t) {
|
|
2928
|
+
return new uo(y(p({
|
|
2929
2929
|
check: "greater_than"
|
|
2930
2930
|
}, g(t)), {
|
|
2931
2931
|
value: e,
|
|
@@ -2933,40 +2933,40 @@ function Bt(e, t) {
|
|
|
2933
2933
|
}));
|
|
2934
2934
|
}
|
|
2935
2935
|
// @__NO_SIDE_EFFECTS__
|
|
2936
|
-
function
|
|
2937
|
-
return new
|
|
2936
|
+
function ar(e, t) {
|
|
2937
|
+
return new ws(y(p({
|
|
2938
2938
|
check: "multiple_of"
|
|
2939
2939
|
}, g(t)), {
|
|
2940
2940
|
value: e
|
|
2941
2941
|
}));
|
|
2942
2942
|
}
|
|
2943
2943
|
// @__NO_SIDE_EFFECTS__
|
|
2944
|
-
function
|
|
2945
|
-
return new
|
|
2944
|
+
function go(e, t) {
|
|
2945
|
+
return new ks(y(p({
|
|
2946
2946
|
check: "max_length"
|
|
2947
2947
|
}, g(t)), {
|
|
2948
2948
|
maximum: e
|
|
2949
2949
|
}));
|
|
2950
2950
|
}
|
|
2951
2951
|
// @__NO_SIDE_EFFECTS__
|
|
2952
|
-
function
|
|
2953
|
-
return new
|
|
2952
|
+
function At(e, t) {
|
|
2953
|
+
return new zs(y(p({
|
|
2954
2954
|
check: "min_length"
|
|
2955
2955
|
}, g(t)), {
|
|
2956
2956
|
minimum: e
|
|
2957
2957
|
}));
|
|
2958
2958
|
}
|
|
2959
2959
|
// @__NO_SIDE_EFFECTS__
|
|
2960
|
-
function
|
|
2961
|
-
return new
|
|
2960
|
+
function mo(e, t) {
|
|
2961
|
+
return new Ss(y(p({
|
|
2962
2962
|
check: "length_equals"
|
|
2963
2963
|
}, g(t)), {
|
|
2964
2964
|
length: e
|
|
2965
2965
|
}));
|
|
2966
2966
|
}
|
|
2967
2967
|
// @__NO_SIDE_EFFECTS__
|
|
2968
|
-
function
|
|
2969
|
-
return new
|
|
2968
|
+
function au(e, t) {
|
|
2969
|
+
return new Es(y(p({
|
|
2970
2970
|
check: "string_format",
|
|
2971
2971
|
format: "regex"
|
|
2972
2972
|
}, g(t)), {
|
|
@@ -2974,22 +2974,22 @@ function nu(e, t) {
|
|
|
2974
2974
|
}));
|
|
2975
2975
|
}
|
|
2976
2976
|
// @__NO_SIDE_EFFECTS__
|
|
2977
|
-
function
|
|
2978
|
-
return new
|
|
2977
|
+
function su(e) {
|
|
2978
|
+
return new Ts(p({
|
|
2979
2979
|
check: "string_format",
|
|
2980
2980
|
format: "lowercase"
|
|
2981
2981
|
}, g(e)));
|
|
2982
2982
|
}
|
|
2983
2983
|
// @__NO_SIDE_EFFECTS__
|
|
2984
|
-
function
|
|
2985
|
-
return new
|
|
2984
|
+
function cu(e) {
|
|
2985
|
+
return new $s(p({
|
|
2986
2986
|
check: "string_format",
|
|
2987
2987
|
format: "uppercase"
|
|
2988
2988
|
}, g(e)));
|
|
2989
2989
|
}
|
|
2990
2990
|
// @__NO_SIDE_EFFECTS__
|
|
2991
|
-
function
|
|
2992
|
-
return new
|
|
2991
|
+
function uu(e, t) {
|
|
2992
|
+
return new Zs(y(p({
|
|
2993
2993
|
check: "string_format",
|
|
2994
2994
|
format: "includes"
|
|
2995
2995
|
}, g(t)), {
|
|
@@ -2997,8 +2997,8 @@ function iu(e, t) {
|
|
|
2997
2997
|
}));
|
|
2998
2998
|
}
|
|
2999
2999
|
// @__NO_SIDE_EFFECTS__
|
|
3000
|
-
function
|
|
3001
|
-
return new
|
|
3000
|
+
function lu(e, t) {
|
|
3001
|
+
return new Os(y(p({
|
|
3002
3002
|
check: "string_format",
|
|
3003
3003
|
format: "starts_with"
|
|
3004
3004
|
}, g(t)), {
|
|
@@ -3006,8 +3006,8 @@ function au(e, t) {
|
|
|
3006
3006
|
}));
|
|
3007
3007
|
}
|
|
3008
3008
|
// @__NO_SIDE_EFFECTS__
|
|
3009
|
-
function
|
|
3010
|
-
return new
|
|
3009
|
+
function fu(e, t) {
|
|
3010
|
+
return new xs(y(p({
|
|
3011
3011
|
check: "string_format",
|
|
3012
3012
|
format: "ends_with"
|
|
3013
3013
|
}, g(t)), {
|
|
@@ -3015,41 +3015,41 @@ function su(e, t) {
|
|
|
3015
3015
|
}));
|
|
3016
3016
|
}
|
|
3017
3017
|
// @__NO_SIDE_EFFECTS__
|
|
3018
|
-
function
|
|
3019
|
-
return new
|
|
3018
|
+
function Ke(e) {
|
|
3019
|
+
return new As({
|
|
3020
3020
|
check: "overwrite",
|
|
3021
3021
|
tx: e
|
|
3022
3022
|
});
|
|
3023
3023
|
}
|
|
3024
3024
|
// @__NO_SIDE_EFFECTS__
|
|
3025
|
-
function
|
|
3026
|
-
return /* @__PURE__ */
|
|
3025
|
+
function du(e) {
|
|
3026
|
+
return /* @__PURE__ */ Ke((t) => t.normalize(e));
|
|
3027
3027
|
}
|
|
3028
3028
|
// @__NO_SIDE_EFFECTS__
|
|
3029
|
-
function
|
|
3030
|
-
return /* @__PURE__ */
|
|
3029
|
+
function hu() {
|
|
3030
|
+
return /* @__PURE__ */ Ke((e) => e.trim());
|
|
3031
3031
|
}
|
|
3032
3032
|
// @__NO_SIDE_EFFECTS__
|
|
3033
|
-
function
|
|
3034
|
-
return /* @__PURE__ */
|
|
3033
|
+
function pu() {
|
|
3034
|
+
return /* @__PURE__ */ Ke((e) => e.toLowerCase());
|
|
3035
3035
|
}
|
|
3036
3036
|
// @__NO_SIDE_EFFECTS__
|
|
3037
|
-
function
|
|
3038
|
-
return /* @__PURE__ */
|
|
3037
|
+
function _u() {
|
|
3038
|
+
return /* @__PURE__ */ Ke((e) => e.toUpperCase());
|
|
3039
3039
|
}
|
|
3040
3040
|
// @__NO_SIDE_EFFECTS__
|
|
3041
|
-
function
|
|
3042
|
-
return /* @__PURE__ */
|
|
3041
|
+
function gu() {
|
|
3042
|
+
return /* @__PURE__ */ Ke((e) => Ea(e));
|
|
3043
3043
|
}
|
|
3044
3044
|
// @__NO_SIDE_EFFECTS__
|
|
3045
|
-
function
|
|
3045
|
+
function mu(e, t, n) {
|
|
3046
3046
|
return new e(p({
|
|
3047
3047
|
type: "array",
|
|
3048
3048
|
element: t
|
|
3049
3049
|
}, g(n)));
|
|
3050
3050
|
}
|
|
3051
3051
|
// @__NO_SIDE_EFFECTS__
|
|
3052
|
-
function
|
|
3052
|
+
function yu(e, t, n) {
|
|
3053
3053
|
return new e(p({
|
|
3054
3054
|
type: "custom",
|
|
3055
3055
|
check: "custom",
|
|
@@ -3057,31 +3057,31 @@ function pu(e, t, n) {
|
|
|
3057
3057
|
}, g(n)));
|
|
3058
3058
|
}
|
|
3059
3059
|
// @__NO_SIDE_EFFECTS__
|
|
3060
|
-
function
|
|
3061
|
-
const t = /* @__PURE__ */
|
|
3060
|
+
function bu(e) {
|
|
3061
|
+
const t = /* @__PURE__ */ wu((n) => (n.addIssue = (r) => {
|
|
3062
3062
|
var o, i, a, s;
|
|
3063
3063
|
if (typeof r == "string")
|
|
3064
|
-
n.issues.push(
|
|
3064
|
+
n.issues.push(ut(r, n.value, t._zod.def));
|
|
3065
3065
|
else {
|
|
3066
3066
|
const c = r;
|
|
3067
|
-
c.fatal && (c.continue = !1), (o = c.code) != null || (c.code = "custom"), (i = c.input) != null || (c.input = n.value), (a = c.inst) != null || (c.inst = t), (s = c.continue) != null || (c.continue = !t._zod.def.abort), n.issues.push(
|
|
3067
|
+
c.fatal && (c.continue = !1), (o = c.code) != null || (c.code = "custom"), (i = c.input) != null || (c.input = n.value), (a = c.inst) != null || (c.inst = t), (s = c.continue) != null || (c.continue = !t._zod.def.abort), n.issues.push(ut(c));
|
|
3068
3068
|
}
|
|
3069
3069
|
}, e(n.value, n)));
|
|
3070
3070
|
return t;
|
|
3071
3071
|
}
|
|
3072
3072
|
// @__NO_SIDE_EFFECTS__
|
|
3073
|
-
function
|
|
3073
|
+
function wu(e, t) {
|
|
3074
3074
|
const n = new W(p({
|
|
3075
3075
|
check: "custom"
|
|
3076
3076
|
}, g(t)));
|
|
3077
3077
|
return n._zod.check = e, n;
|
|
3078
3078
|
}
|
|
3079
|
-
function
|
|
3079
|
+
function yo(e) {
|
|
3080
3080
|
var n, r, o, i, a, s, c, u, l;
|
|
3081
3081
|
let t = (n = e == null ? void 0 : e.target) != null ? n : "draft-2020-12";
|
|
3082
3082
|
return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
|
|
3083
3083
|
processors: (r = e.processors) != null ? r : {},
|
|
3084
|
-
metadataRegistry: (o = e == null ? void 0 : e.metadata) != null ? o :
|
|
3084
|
+
metadataRegistry: (o = e == null ? void 0 : e.metadata) != null ? o : Qe,
|
|
3085
3085
|
target: t,
|
|
3086
3086
|
unrepresentable: (i = e == null ? void 0 : e.unrepresentable) != null ? i : "throw",
|
|
3087
3087
|
override: (a = e == null ? void 0 : e.override) != null ? a : (() => {
|
|
@@ -3094,7 +3094,7 @@ function po(e) {
|
|
|
3094
3094
|
external: (l = e == null ? void 0 : e.external) != null ? l : void 0
|
|
3095
3095
|
};
|
|
3096
3096
|
}
|
|
3097
|
-
function
|
|
3097
|
+
function D(e, t, n = { path: [], schemaPath: [] }) {
|
|
3098
3098
|
var l, d, f;
|
|
3099
3099
|
var r;
|
|
3100
3100
|
const o = e._zod.def, i = t.seen.get(e);
|
|
@@ -3119,12 +3119,12 @@ function C(e, t, n = { path: [], schemaPath: [] }) {
|
|
|
3119
3119
|
O(e, t, w, _);
|
|
3120
3120
|
}
|
|
3121
3121
|
const m = e._zod.parent;
|
|
3122
|
-
m && (a.ref || (a.ref = m),
|
|
3122
|
+
m && (a.ref || (a.ref = m), D(m, t, _), t.seen.get(m).isParent = !0);
|
|
3123
3123
|
}
|
|
3124
3124
|
const c = t.metadataRegistry.get(e);
|
|
3125
3125
|
return c && Object.assign(a.schema, c), t.io === "input" && M(e) && (delete a.schema.examples, delete a.schema.default), t.io === "input" && a.schema._prefault && ((f = (r = a.schema).default) != null || (r.default = a.schema._prefault)), delete a.schema._prefault, t.seen.get(e).schema;
|
|
3126
3126
|
}
|
|
3127
|
-
function
|
|
3127
|
+
function bo(e, t) {
|
|
3128
3128
|
var a, s, c, u;
|
|
3129
3129
|
const n = e.seen.get(t);
|
|
3130
3130
|
if (!n)
|
|
@@ -3198,7 +3198,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
3198
3198
|
}
|
|
3199
3199
|
}
|
|
3200
3200
|
}
|
|
3201
|
-
function
|
|
3201
|
+
function wo(e, t) {
|
|
3202
3202
|
var a, s, c, u, l;
|
|
3203
3203
|
const n = e.seen.get(t);
|
|
3204
3204
|
if (!n)
|
|
@@ -3254,8 +3254,8 @@ function go(e, t) {
|
|
|
3254
3254
|
return Object.defineProperty(d, "~standard", {
|
|
3255
3255
|
value: y(p({}, t["~standard"]), {
|
|
3256
3256
|
jsonSchema: {
|
|
3257
|
-
input:
|
|
3258
|
-
output:
|
|
3257
|
+
input: It(t, "input", e.processors),
|
|
3258
|
+
output: It(t, "output", e.processors)
|
|
3259
3259
|
}
|
|
3260
3260
|
}),
|
|
3261
3261
|
enumerable: !1,
|
|
@@ -3307,25 +3307,25 @@ function M(e, t) {
|
|
|
3307
3307
|
}
|
|
3308
3308
|
return !1;
|
|
3309
3309
|
}
|
|
3310
|
-
const
|
|
3311
|
-
const r =
|
|
3312
|
-
return
|
|
3313
|
-
},
|
|
3314
|
-
const { libraryOptions: o, target: i } = r != null ? r : {}, a =
|
|
3315
|
-
return
|
|
3316
|
-
},
|
|
3310
|
+
const vu = (e, t = {}) => (n) => {
|
|
3311
|
+
const r = yo(y(p({}, n), { processors: t }));
|
|
3312
|
+
return D(e, r), bo(r, e), wo(r, e);
|
|
3313
|
+
}, It = (e, t, n = {}) => (r) => {
|
|
3314
|
+
const { libraryOptions: o, target: i } = r != null ? r : {}, a = yo(y(p({}, o != null ? o : {}), { target: i, io: t, processors: n }));
|
|
3315
|
+
return D(e, a), bo(a, e), wo(a, e);
|
|
3316
|
+
}, ku = {
|
|
3317
3317
|
guid: "uuid",
|
|
3318
3318
|
url: "uri",
|
|
3319
3319
|
datetime: "date-time",
|
|
3320
3320
|
json_string: "json-string",
|
|
3321
3321
|
regex: ""
|
|
3322
3322
|
// do not set
|
|
3323
|
-
},
|
|
3323
|
+
}, zu = (e, t, n, r) => {
|
|
3324
3324
|
var l;
|
|
3325
3325
|
const o = n;
|
|
3326
3326
|
o.type = "string";
|
|
3327
3327
|
const { minimum: i, maximum: a, format: s, patterns: c, contentEncoding: u } = e._zod.bag;
|
|
3328
|
-
if (typeof i == "number" && (o.minLength = i), typeof a == "number" && (o.maxLength = a), s && (o.format = (l =
|
|
3328
|
+
if (typeof i == "number" && (o.minLength = i), typeof a == "number" && (o.maxLength = a), s && (o.format = (l = ku[s]) != null ? l : s, o.format === "" && delete o.format, s === "time" && delete o.format), u && (o.contentEncoding = u), c && c.size > 0) {
|
|
3329
3329
|
const d = [...c];
|
|
3330
3330
|
d.length === 1 ? o.pattern = d[0].source : d.length > 1 && (o.allOf = [
|
|
3331
3331
|
...d.map((f) => y(p({}, t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0" ? { type: "string" } : {}), {
|
|
@@ -3333,18 +3333,18 @@ const mu = (e, t = {}) => (n) => {
|
|
|
3333
3333
|
}))
|
|
3334
3334
|
]);
|
|
3335
3335
|
}
|
|
3336
|
-
},
|
|
3336
|
+
}, Su = (e, t, n, r) => {
|
|
3337
3337
|
const o = n, { minimum: i, maximum: a, format: s, multipleOf: c, exclusiveMaximum: u, exclusiveMinimum: l } = e._zod.bag;
|
|
3338
3338
|
typeof s == "string" && s.includes("int") ? o.type = "integer" : o.type = "number", typeof l == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (o.minimum = l, o.exclusiveMinimum = !0) : o.exclusiveMinimum = l), typeof i == "number" && (o.minimum = i, typeof l == "number" && t.target !== "draft-04" && (l >= i ? delete o.minimum : delete o.exclusiveMinimum)), typeof u == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (o.maximum = u, o.exclusiveMaximum = !0) : o.exclusiveMaximum = u), typeof a == "number" && (o.maximum = a, typeof u == "number" && t.target !== "draft-04" && (u <= a ? delete o.maximum : delete o.exclusiveMaximum)), typeof c == "number" && (o.multipleOf = c);
|
|
3339
|
-
},
|
|
3339
|
+
}, Eu = (e, t, n, r) => {
|
|
3340
3340
|
n.type = "boolean";
|
|
3341
|
-
},
|
|
3341
|
+
}, Tu = (e, t, n, r) => {
|
|
3342
3342
|
n.not = {};
|
|
3343
|
-
},
|
|
3344
|
-
},
|
|
3345
|
-
const o = e._zod.def, i =
|
|
3343
|
+
}, $u = (e, t, n, r) => {
|
|
3344
|
+
}, Zu = (e, t, n, r) => {
|
|
3345
|
+
const o = e._zod.def, i = Xr(o.entries);
|
|
3346
3346
|
i.every((a) => typeof a == "number") && (n.type = "number"), i.every((a) => typeof a == "string") && (n.type = "string"), n.enum = i;
|
|
3347
|
-
},
|
|
3347
|
+
}, Ou = (e, t, n, r) => {
|
|
3348
3348
|
const o = e._zod.def, i = [];
|
|
3349
3349
|
for (const a of o.values)
|
|
3350
3350
|
if (a === void 0) {
|
|
@@ -3361,61 +3361,61 @@ const mu = (e, t = {}) => (n) => {
|
|
|
3361
3361
|
n.type = a === null ? "null" : typeof a, t.target === "draft-04" || t.target === "openapi-3.0" ? n.enum = [a] : n.const = a;
|
|
3362
3362
|
} else
|
|
3363
3363
|
i.every((a) => typeof a == "number") && (n.type = "number"), i.every((a) => typeof a == "string") && (n.type = "string"), i.every((a) => typeof a == "boolean") && (n.type = "boolean"), i.every((a) => a === null) && (n.type = "null"), n.enum = i;
|
|
3364
|
-
},
|
|
3364
|
+
}, xu = (e, t, n, r) => {
|
|
3365
3365
|
if (t.unrepresentable === "throw")
|
|
3366
3366
|
throw new Error("Custom types cannot be represented in JSON Schema");
|
|
3367
|
-
},
|
|
3367
|
+
}, Au = (e, t, n, r) => {
|
|
3368
3368
|
if (t.unrepresentable === "throw")
|
|
3369
3369
|
throw new Error("Transforms cannot be represented in JSON Schema");
|
|
3370
|
-
},
|
|
3370
|
+
}, Iu = (e, t, n, r) => {
|
|
3371
3371
|
const o = n, i = e._zod.def, { minimum: a, maximum: s } = e._zod.bag;
|
|
3372
|
-
typeof a == "number" && (o.minItems = a), typeof s == "number" && (o.maxItems = s), o.type = "array", o.items =
|
|
3373
|
-
},
|
|
3372
|
+
typeof a == "number" && (o.minItems = a), typeof s == "number" && (o.maxItems = s), o.type = "array", o.items = D(i.element, t, y(p({}, r), { path: [...r.path, "items"] }));
|
|
3373
|
+
}, Nu = (e, t, n, r) => {
|
|
3374
3374
|
var u;
|
|
3375
3375
|
const o = n, i = e._zod.def;
|
|
3376
3376
|
o.type = "object", o.properties = {};
|
|
3377
3377
|
const a = i.shape;
|
|
3378
3378
|
for (const l in a)
|
|
3379
|
-
o.properties[l] =
|
|
3379
|
+
o.properties[l] = D(a[l], t, y(p({}, r), {
|
|
3380
3380
|
path: [...r.path, "properties", l]
|
|
3381
3381
|
}));
|
|
3382
3382
|
const s = new Set(Object.keys(a)), c = new Set([...s].filter((l) => {
|
|
3383
3383
|
const d = i.shape[l]._zod;
|
|
3384
3384
|
return t.io === "input" ? d.optin === void 0 : d.optout === void 0;
|
|
3385
3385
|
}));
|
|
3386
|
-
c.size > 0 && (o.required = Array.from(c)), ((u = i.catchall) == null ? void 0 : u._zod.def.type) === "never" ? o.additionalProperties = !1 : i.catchall ? i.catchall && (o.additionalProperties =
|
|
3386
|
+
c.size > 0 && (o.required = Array.from(c)), ((u = i.catchall) == null ? void 0 : u._zod.def.type) === "never" ? o.additionalProperties = !1 : i.catchall ? i.catchall && (o.additionalProperties = D(i.catchall, t, y(p({}, r), {
|
|
3387
3387
|
path: [...r.path, "additionalProperties"]
|
|
3388
3388
|
}))) : t.io === "output" && (o.additionalProperties = !1);
|
|
3389
|
-
},
|
|
3390
|
-
const o = e._zod.def, i = o.inclusive === !1, a = o.options.map((s, c) =>
|
|
3389
|
+
}, Pu = (e, t, n, r) => {
|
|
3390
|
+
const o = e._zod.def, i = o.inclusive === !1, a = o.options.map((s, c) => D(s, t, y(p({}, r), {
|
|
3391
3391
|
path: [...r.path, i ? "oneOf" : "anyOf", c]
|
|
3392
3392
|
})));
|
|
3393
3393
|
i ? n.oneOf = a : n.anyOf = a;
|
|
3394
|
-
},
|
|
3395
|
-
const o = e._zod.def, i =
|
|
3394
|
+
}, Ru = (e, t, n, r) => {
|
|
3395
|
+
const o = e._zod.def, i = D(o.left, t, y(p({}, r), {
|
|
3396
3396
|
path: [...r.path, "allOf", 0]
|
|
3397
|
-
})), a =
|
|
3397
|
+
})), a = D(o.right, t, y(p({}, r), {
|
|
3398
3398
|
path: [...r.path, "allOf", 1]
|
|
3399
3399
|
})), s = (u) => "allOf" in u && Object.keys(u).length === 1, c = [
|
|
3400
3400
|
...s(i) ? i.allOf : [i],
|
|
3401
3401
|
...s(a) ? a.allOf : [a]
|
|
3402
3402
|
];
|
|
3403
3403
|
n.allOf = c;
|
|
3404
|
-
},
|
|
3404
|
+
}, Du = (e, t, n, r) => {
|
|
3405
3405
|
const o = n, i = e._zod.def;
|
|
3406
3406
|
o.type = "object";
|
|
3407
3407
|
const a = i.keyType, s = a._zod.bag, c = s == null ? void 0 : s.patterns;
|
|
3408
3408
|
if (i.mode === "loose" && c && c.size > 0) {
|
|
3409
|
-
const l =
|
|
3409
|
+
const l = D(i.valueType, t, y(p({}, r), {
|
|
3410
3410
|
path: [...r.path, "patternProperties", "*"]
|
|
3411
3411
|
}));
|
|
3412
3412
|
o.patternProperties = {};
|
|
3413
3413
|
for (const d of c)
|
|
3414
3414
|
o.patternProperties[d.source] = l;
|
|
3415
3415
|
} else
|
|
3416
|
-
(t.target === "draft-07" || t.target === "draft-2020-12") && (o.propertyNames =
|
|
3416
|
+
(t.target === "draft-07" || t.target === "draft-2020-12") && (o.propertyNames = D(i.keyType, t, y(p({}, r), {
|
|
3417
3417
|
path: [...r.path, "propertyNames"]
|
|
3418
|
-
}))), o.additionalProperties =
|
|
3418
|
+
}))), o.additionalProperties = D(i.valueType, t, y(p({}, r), {
|
|
3419
3419
|
path: [...r.path, "additionalProperties"]
|
|
3420
3420
|
}));
|
|
3421
3421
|
const u = a._zod.values;
|
|
@@ -3423,27 +3423,27 @@ const mu = (e, t = {}) => (n) => {
|
|
|
3423
3423
|
const l = [...u].filter((d) => typeof d == "string" || typeof d == "number");
|
|
3424
3424
|
l.length > 0 && (o.required = l);
|
|
3425
3425
|
}
|
|
3426
|
-
},
|
|
3427
|
-
const o = e._zod.def, i =
|
|
3426
|
+
}, Cu = (e, t, n, r) => {
|
|
3427
|
+
const o = e._zod.def, i = D(o.innerType, t, r), a = t.seen.get(e);
|
|
3428
3428
|
t.target === "openapi-3.0" ? (a.ref = o.innerType, n.nullable = !0) : n.anyOf = [i, { type: "null" }];
|
|
3429
|
-
},
|
|
3429
|
+
}, Fu = (e, t, n, r) => {
|
|
3430
3430
|
const o = e._zod.def;
|
|
3431
|
-
|
|
3431
|
+
D(o.innerType, t, r);
|
|
3432
3432
|
const i = t.seen.get(e);
|
|
3433
3433
|
i.ref = o.innerType;
|
|
3434
|
-
},
|
|
3434
|
+
}, ju = (e, t, n, r) => {
|
|
3435
3435
|
const o = e._zod.def;
|
|
3436
|
-
|
|
3436
|
+
D(o.innerType, t, r);
|
|
3437
3437
|
const i = t.seen.get(e);
|
|
3438
3438
|
i.ref = o.innerType, n.default = JSON.parse(JSON.stringify(o.defaultValue));
|
|
3439
|
-
},
|
|
3439
|
+
}, Uu = (e, t, n, r) => {
|
|
3440
3440
|
const o = e._zod.def;
|
|
3441
|
-
|
|
3441
|
+
D(o.innerType, t, r);
|
|
3442
3442
|
const i = t.seen.get(e);
|
|
3443
3443
|
i.ref = o.innerType, t.io === "input" && (n._prefault = JSON.parse(JSON.stringify(o.defaultValue)));
|
|
3444
|
-
},
|
|
3444
|
+
}, Lu = (e, t, n, r) => {
|
|
3445
3445
|
const o = e._zod.def;
|
|
3446
|
-
|
|
3446
|
+
D(o.innerType, t, r);
|
|
3447
3447
|
const i = t.seen.get(e);
|
|
3448
3448
|
i.ref = o.innerType;
|
|
3449
3449
|
let a;
|
|
@@ -3453,64 +3453,64 @@ const mu = (e, t = {}) => (n) => {
|
|
|
3453
3453
|
throw new Error("Dynamic catch values are not supported in JSON Schema");
|
|
3454
3454
|
}
|
|
3455
3455
|
n.default = a;
|
|
3456
|
-
},
|
|
3456
|
+
}, Mu = (e, t, n, r) => {
|
|
3457
3457
|
const o = e._zod.def, i = t.io === "input" ? o.in._zod.def.type === "transform" ? o.out : o.in : o.out;
|
|
3458
|
-
|
|
3458
|
+
D(i, t, r);
|
|
3459
3459
|
const a = t.seen.get(e);
|
|
3460
3460
|
a.ref = i;
|
|
3461
|
-
},
|
|
3461
|
+
}, Ju = (e, t, n, r) => {
|
|
3462
3462
|
const o = e._zod.def;
|
|
3463
|
-
|
|
3463
|
+
D(o.innerType, t, r);
|
|
3464
3464
|
const i = t.seen.get(e);
|
|
3465
3465
|
i.ref = o.innerType, n.readOnly = !0;
|
|
3466
|
-
},
|
|
3466
|
+
}, vo = (e, t, n, r) => {
|
|
3467
3467
|
const o = e._zod.def;
|
|
3468
|
-
|
|
3468
|
+
D(o.innerType, t, r);
|
|
3469
3469
|
const i = t.seen.get(e);
|
|
3470
3470
|
i.ref = o.innerType;
|
|
3471
|
-
},
|
|
3472
|
-
|
|
3471
|
+
}, Bu = /* @__PURE__ */ h("ZodISODateTime", (e, t) => {
|
|
3472
|
+
Vs.init(e, t), P.init(e, t);
|
|
3473
3473
|
});
|
|
3474
|
-
function
|
|
3475
|
-
return /* @__PURE__ */
|
|
3474
|
+
function Vu(e) {
|
|
3475
|
+
return /* @__PURE__ */ Xc(Bu, e);
|
|
3476
3476
|
}
|
|
3477
|
-
const
|
|
3478
|
-
|
|
3477
|
+
const Wu = /* @__PURE__ */ h("ZodISODate", (e, t) => {
|
|
3478
|
+
Ws.init(e, t), P.init(e, t);
|
|
3479
3479
|
});
|
|
3480
|
-
function
|
|
3481
|
-
return /* @__PURE__ */
|
|
3480
|
+
function Hu(e) {
|
|
3481
|
+
return /* @__PURE__ */ Yc(Wu, e);
|
|
3482
3482
|
}
|
|
3483
|
-
const
|
|
3484
|
-
|
|
3483
|
+
const Ku = /* @__PURE__ */ h("ZodISOTime", (e, t) => {
|
|
3484
|
+
Hs.init(e, t), P.init(e, t);
|
|
3485
3485
|
});
|
|
3486
|
-
function
|
|
3487
|
-
return /* @__PURE__ */
|
|
3486
|
+
function Gu(e) {
|
|
3487
|
+
return /* @__PURE__ */ Qc(Ku, e);
|
|
3488
3488
|
}
|
|
3489
|
-
const
|
|
3490
|
-
|
|
3489
|
+
const qu = /* @__PURE__ */ h("ZodISODuration", (e, t) => {
|
|
3490
|
+
Ks.init(e, t), P.init(e, t);
|
|
3491
3491
|
});
|
|
3492
|
-
function
|
|
3493
|
-
return /* @__PURE__ */
|
|
3492
|
+
function Xu(e) {
|
|
3493
|
+
return /* @__PURE__ */ eu(qu, e);
|
|
3494
3494
|
}
|
|
3495
|
-
const
|
|
3496
|
-
|
|
3495
|
+
const Yu = (e, t) => {
|
|
3496
|
+
to.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
|
|
3497
3497
|
format: {
|
|
3498
|
-
value: (n) =>
|
|
3498
|
+
value: (n) => Fa(e, n)
|
|
3499
3499
|
// enumerable: false,
|
|
3500
3500
|
},
|
|
3501
3501
|
flatten: {
|
|
3502
|
-
value: (n) =>
|
|
3502
|
+
value: (n) => Ca(e, n)
|
|
3503
3503
|
// enumerable: false,
|
|
3504
3504
|
},
|
|
3505
3505
|
addIssue: {
|
|
3506
3506
|
value: (n) => {
|
|
3507
|
-
e.issues.push(n), e.message = JSON.stringify(e.issues,
|
|
3507
|
+
e.issues.push(n), e.message = JSON.stringify(e.issues, on, 2);
|
|
3508
3508
|
}
|
|
3509
3509
|
// enumerable: false,
|
|
3510
3510
|
},
|
|
3511
3511
|
addIssues: {
|
|
3512
3512
|
value: (n) => {
|
|
3513
|
-
e.issues.push(...n), e.message = JSON.stringify(e.issues,
|
|
3513
|
+
e.issues.push(...n), e.message = JSON.stringify(e.issues, on, 2);
|
|
3514
3514
|
}
|
|
3515
3515
|
// enumerable: false,
|
|
3516
3516
|
},
|
|
@@ -3521,14 +3521,14 @@ const Ku = (e, t) => {
|
|
|
3521
3521
|
// enumerable: false,
|
|
3522
3522
|
}
|
|
3523
3523
|
});
|
|
3524
|
-
}, te = h("ZodError",
|
|
3524
|
+
}, te = h("ZodError", Yu, {
|
|
3525
3525
|
Parent: Error
|
|
3526
|
-
}),
|
|
3526
|
+
}), Qu = /* @__PURE__ */ zn(te), el = /* @__PURE__ */ Sn(te), tl = /* @__PURE__ */ Rt(te), nl = /* @__PURE__ */ Dt(te), rl = /* @__PURE__ */ La(te), ol = /* @__PURE__ */ Ma(te), il = /* @__PURE__ */ Ja(te), al = /* @__PURE__ */ Ba(te), sl = /* @__PURE__ */ Va(te), cl = /* @__PURE__ */ Wa(te), ul = /* @__PURE__ */ Ha(te), ll = /* @__PURE__ */ Ka(te), N = /* @__PURE__ */ h("ZodType", (e, t) => (I.init(e, t), Object.assign(e["~standard"], {
|
|
3527
3527
|
jsonSchema: {
|
|
3528
|
-
input:
|
|
3529
|
-
output:
|
|
3528
|
+
input: It(e, "input"),
|
|
3529
|
+
output: It(e, "output")
|
|
3530
3530
|
}
|
|
3531
|
-
}), e.toJSONSchema =
|
|
3531
|
+
}), e.toJSONSchema = vu(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => {
|
|
3532
3532
|
var r;
|
|
3533
3533
|
return e.clone(ke(t, {
|
|
3534
3534
|
checks: [
|
|
@@ -3538,163 +3538,163 @@ const Ku = (e, t) => {
|
|
|
3538
3538
|
}), {
|
|
3539
3539
|
parent: !0
|
|
3540
3540
|
});
|
|
3541
|
-
}, e.with = e.check, e.clone = (n, r) => ze(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) =>
|
|
3542
|
-
return
|
|
3541
|
+
}, e.with = e.check, e.clone = (n, r) => ze(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => Qu(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => tl(e, n, r), e.parseAsync = (n, r) => k(null, null, function* () {
|
|
3542
|
+
return el(e, n, r, { callee: e.parseAsync });
|
|
3543
3543
|
}), e.safeParseAsync = (n, r) => k(null, null, function* () {
|
|
3544
|
-
return Yu(e, n, r);
|
|
3545
|
-
}), e.spa = e.safeParseAsync, e.encode = (n, r) => Qu(e, n, r), e.decode = (n, r) => el(e, n, r), e.encodeAsync = (n, r) => k(null, null, function* () {
|
|
3546
|
-
return tl(e, n, r);
|
|
3547
|
-
}), e.decodeAsync = (n, r) => k(null, null, function* () {
|
|
3548
3544
|
return nl(e, n, r);
|
|
3549
|
-
}), e.
|
|
3545
|
+
}), e.spa = e.safeParseAsync, e.encode = (n, r) => rl(e, n, r), e.decode = (n, r) => ol(e, n, r), e.encodeAsync = (n, r) => k(null, null, function* () {
|
|
3550
3546
|
return il(e, n, r);
|
|
3551
|
-
}), e.
|
|
3547
|
+
}), e.decodeAsync = (n, r) => k(null, null, function* () {
|
|
3552
3548
|
return al(e, n, r);
|
|
3553
|
-
}), e.
|
|
3549
|
+
}), e.safeEncode = (n, r) => sl(e, n, r), e.safeDecode = (n, r) => cl(e, n, r), e.safeEncodeAsync = (n, r) => k(null, null, function* () {
|
|
3550
|
+
return ul(e, n, r);
|
|
3551
|
+
}), e.safeDecodeAsync = (n, r) => k(null, null, function* () {
|
|
3552
|
+
return ll(e, n, r);
|
|
3553
|
+
}), e.refine = (n, r) => e.check(af(n, r)), e.superRefine = (n) => e.check(sf(n)), e.overwrite = (n) => e.check(/* @__PURE__ */ Ke(n)), e.optional = () => lr(e), e.exactOptional = () => Wl(e), e.nullable = () => fr(e), e.nullish = () => lr(fr(e)), e.nonoptional = (n) => Yl(e, n), e.array = () => cn(e), e.or = (n) => So([e, n]), e.and = (n) => jl(e, n), e.transform = (n) => dr(e, Bl(n)), e.default = (n) => Gl(e, n), e.prefault = (n) => Xl(e, n), e.catch = (n) => ef(e, n), e.pipe = (n) => dr(e, n), e.readonly = () => rf(e), e.describe = (n) => {
|
|
3554
3554
|
const r = e.clone();
|
|
3555
|
-
return
|
|
3555
|
+
return Qe.add(r, { description: n }), r;
|
|
3556
3556
|
}, Object.defineProperty(e, "description", {
|
|
3557
3557
|
get() {
|
|
3558
3558
|
var n;
|
|
3559
|
-
return (n =
|
|
3559
|
+
return (n = Qe.get(e)) == null ? void 0 : n.description;
|
|
3560
3560
|
},
|
|
3561
3561
|
configurable: !0
|
|
3562
3562
|
}), e.meta = (...n) => {
|
|
3563
3563
|
if (n.length === 0)
|
|
3564
|
-
return
|
|
3564
|
+
return Qe.get(e);
|
|
3565
3565
|
const r = e.clone();
|
|
3566
|
-
return
|
|
3567
|
-
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (n) => n(e), e)),
|
|
3566
|
+
return Qe.add(r, n[0]), r;
|
|
3567
|
+
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (n) => n(e), e)), ko = /* @__PURE__ */ h("_ZodString", (e, t) => {
|
|
3568
3568
|
var r, o, i;
|
|
3569
|
-
|
|
3569
|
+
En.init(e, t), N.init(e, t), e._zod.processJSONSchema = (a, s, c) => zu(e, a, s);
|
|
3570
3570
|
const n = e._zod.bag;
|
|
3571
|
-
e.format = (r = n.format) != null ? r : null, e.minLength = (o = n.minimum) != null ? o : null, e.maxLength = (i = n.maximum) != null ? i : null, e.regex = (...a) => e.check(/* @__PURE__ */
|
|
3572
|
-
}),
|
|
3573
|
-
|
|
3571
|
+
e.format = (r = n.format) != null ? r : null, e.minLength = (o = n.minimum) != null ? o : null, e.maxLength = (i = n.maximum) != null ? i : null, e.regex = (...a) => e.check(/* @__PURE__ */ au(...a)), e.includes = (...a) => e.check(/* @__PURE__ */ uu(...a)), e.startsWith = (...a) => e.check(/* @__PURE__ */ lu(...a)), e.endsWith = (...a) => e.check(/* @__PURE__ */ fu(...a)), e.min = (...a) => e.check(/* @__PURE__ */ At(...a)), e.max = (...a) => e.check(/* @__PURE__ */ go(...a)), e.length = (...a) => e.check(/* @__PURE__ */ mo(...a)), e.nonempty = (...a) => e.check(/* @__PURE__ */ At(1, ...a)), e.lowercase = (a) => e.check(/* @__PURE__ */ su(a)), e.uppercase = (a) => e.check(/* @__PURE__ */ cu(a)), e.trim = () => e.check(/* @__PURE__ */ hu()), e.normalize = (...a) => e.check(/* @__PURE__ */ du(...a)), e.toLowerCase = () => e.check(/* @__PURE__ */ pu()), e.toUpperCase = () => e.check(/* @__PURE__ */ _u()), e.slugify = () => e.check(/* @__PURE__ */ gu());
|
|
3572
|
+
}), fl = /* @__PURE__ */ h("ZodString", (e, t) => {
|
|
3573
|
+
En.init(e, t), ko.init(e, t), e.email = (n) => e.check(/* @__PURE__ */ xc(dl, n)), e.url = (n) => e.check(/* @__PURE__ */ Rc(hl, n)), e.jwt = (n) => e.check(/* @__PURE__ */ qc(Zl, n)), e.emoji = (n) => e.check(/* @__PURE__ */ Dc(pl, n)), e.guid = (n) => e.check(/* @__PURE__ */ rr(sr, n)), e.uuid = (n) => e.check(/* @__PURE__ */ Ac(vt, n)), e.uuidv4 = (n) => e.check(/* @__PURE__ */ Ic(vt, n)), e.uuidv6 = (n) => e.check(/* @__PURE__ */ Nc(vt, n)), e.uuidv7 = (n) => e.check(/* @__PURE__ */ Pc(vt, n)), e.nanoid = (n) => e.check(/* @__PURE__ */ Cc(_l, n)), e.guid = (n) => e.check(/* @__PURE__ */ rr(sr, n)), e.cuid = (n) => e.check(/* @__PURE__ */ Fc(gl, n)), e.cuid2 = (n) => e.check(/* @__PURE__ */ jc(ml, n)), e.ulid = (n) => e.check(/* @__PURE__ */ Uc(yl, n)), e.base64 = (n) => e.check(/* @__PURE__ */ Hc(El, n)), e.base64url = (n) => e.check(/* @__PURE__ */ Kc(Tl, n)), e.xid = (n) => e.check(/* @__PURE__ */ Lc(bl, n)), e.ksuid = (n) => e.check(/* @__PURE__ */ Mc(wl, n)), e.ipv4 = (n) => e.check(/* @__PURE__ */ Jc(vl, n)), e.ipv6 = (n) => e.check(/* @__PURE__ */ Bc(kl, n)), e.cidrv4 = (n) => e.check(/* @__PURE__ */ Vc(zl, n)), e.cidrv6 = (n) => e.check(/* @__PURE__ */ Wc(Sl, n)), e.e164 = (n) => e.check(/* @__PURE__ */ Gc($l, n)), e.datetime = (n) => e.check(Vu(n)), e.date = (n) => e.check(Hu(n)), e.time = (n) => e.check(Gu(n)), e.duration = (n) => e.check(Xu(n));
|
|
3574
3574
|
});
|
|
3575
|
-
function
|
|
3576
|
-
return /* @__PURE__ */
|
|
3575
|
+
function Ie(e) {
|
|
3576
|
+
return /* @__PURE__ */ Oc(fl, e);
|
|
3577
3577
|
}
|
|
3578
3578
|
const P = /* @__PURE__ */ h("ZodStringFormat", (e, t) => {
|
|
3579
|
-
A.init(e, t),
|
|
3580
|
-
}),
|
|
3581
|
-
|
|
3582
|
-
}),
|
|
3583
|
-
xs.init(e, t), P.init(e, t);
|
|
3584
|
-
}), yt = /* @__PURE__ */ h("ZodUUID", (e, t) => {
|
|
3585
|
-
As.init(e, t), P.init(e, t);
|
|
3586
|
-
}), ul = /* @__PURE__ */ h("ZodURL", (e, t) => {
|
|
3587
|
-
Ns.init(e, t), P.init(e, t);
|
|
3588
|
-
}), ll = /* @__PURE__ */ h("ZodEmoji", (e, t) => {
|
|
3579
|
+
A.init(e, t), ko.init(e, t);
|
|
3580
|
+
}), dl = /* @__PURE__ */ h("ZodEmail", (e, t) => {
|
|
3581
|
+
Ds.init(e, t), P.init(e, t);
|
|
3582
|
+
}), sr = /* @__PURE__ */ h("ZodGUID", (e, t) => {
|
|
3589
3583
|
Ps.init(e, t), P.init(e, t);
|
|
3590
|
-
}),
|
|
3584
|
+
}), vt = /* @__PURE__ */ h("ZodUUID", (e, t) => {
|
|
3591
3585
|
Rs.init(e, t), P.init(e, t);
|
|
3592
|
-
}),
|
|
3593
|
-
Ds.init(e, t), P.init(e, t);
|
|
3594
|
-
}), hl = /* @__PURE__ */ h("ZodCUID2", (e, t) => {
|
|
3586
|
+
}), hl = /* @__PURE__ */ h("ZodURL", (e, t) => {
|
|
3595
3587
|
Cs.init(e, t), P.init(e, t);
|
|
3596
|
-
}), pl = /* @__PURE__ */ h("
|
|
3588
|
+
}), pl = /* @__PURE__ */ h("ZodEmoji", (e, t) => {
|
|
3597
3589
|
Fs.init(e, t), P.init(e, t);
|
|
3598
|
-
}), _l = /* @__PURE__ */ h("
|
|
3590
|
+
}), _l = /* @__PURE__ */ h("ZodNanoID", (e, t) => {
|
|
3599
3591
|
js.init(e, t), P.init(e, t);
|
|
3600
|
-
}), gl = /* @__PURE__ */ h("
|
|
3592
|
+
}), gl = /* @__PURE__ */ h("ZodCUID", (e, t) => {
|
|
3601
3593
|
Us.init(e, t), P.init(e, t);
|
|
3602
|
-
}), ml = /* @__PURE__ */ h("
|
|
3603
|
-
|
|
3604
|
-
}), yl = /* @__PURE__ */ h("
|
|
3605
|
-
|
|
3606
|
-
}), bl = /* @__PURE__ */ h("
|
|
3607
|
-
|
|
3608
|
-
}), wl = /* @__PURE__ */ h("
|
|
3609
|
-
|
|
3610
|
-
}), vl = /* @__PURE__ */ h("
|
|
3594
|
+
}), ml = /* @__PURE__ */ h("ZodCUID2", (e, t) => {
|
|
3595
|
+
Ls.init(e, t), P.init(e, t);
|
|
3596
|
+
}), yl = /* @__PURE__ */ h("ZodULID", (e, t) => {
|
|
3597
|
+
Ms.init(e, t), P.init(e, t);
|
|
3598
|
+
}), bl = /* @__PURE__ */ h("ZodXID", (e, t) => {
|
|
3599
|
+
Js.init(e, t), P.init(e, t);
|
|
3600
|
+
}), wl = /* @__PURE__ */ h("ZodKSUID", (e, t) => {
|
|
3601
|
+
Bs.init(e, t), P.init(e, t);
|
|
3602
|
+
}), vl = /* @__PURE__ */ h("ZodIPv4", (e, t) => {
|
|
3611
3603
|
Gs.init(e, t), P.init(e, t);
|
|
3612
|
-
}), kl = /* @__PURE__ */ h("
|
|
3604
|
+
}), kl = /* @__PURE__ */ h("ZodIPv6", (e, t) => {
|
|
3605
|
+
qs.init(e, t), P.init(e, t);
|
|
3606
|
+
}), zl = /* @__PURE__ */ h("ZodCIDRv4", (e, t) => {
|
|
3613
3607
|
Xs.init(e, t), P.init(e, t);
|
|
3614
|
-
}),
|
|
3608
|
+
}), Sl = /* @__PURE__ */ h("ZodCIDRv6", (e, t) => {
|
|
3615
3609
|
Ys.init(e, t), P.init(e, t);
|
|
3616
|
-
}),
|
|
3617
|
-
|
|
3618
|
-
}),
|
|
3610
|
+
}), El = /* @__PURE__ */ h("ZodBase64", (e, t) => {
|
|
3611
|
+
Qs.init(e, t), P.init(e, t);
|
|
3612
|
+
}), Tl = /* @__PURE__ */ h("ZodBase64URL", (e, t) => {
|
|
3613
|
+
tc.init(e, t), P.init(e, t);
|
|
3614
|
+
}), $l = /* @__PURE__ */ h("ZodE164", (e, t) => {
|
|
3615
|
+
nc.init(e, t), P.init(e, t);
|
|
3616
|
+
}), Zl = /* @__PURE__ */ h("ZodJWT", (e, t) => {
|
|
3617
|
+
oc.init(e, t), P.init(e, t);
|
|
3618
|
+
}), zo = /* @__PURE__ */ h("ZodNumber", (e, t) => {
|
|
3619
3619
|
var r, o, i, a, s, c, u, l, d;
|
|
3620
|
-
|
|
3620
|
+
fo.init(e, t), N.init(e, t), e._zod.processJSONSchema = (f, _, m) => Su(e, f, _), e.gt = (f, _) => e.check(/* @__PURE__ */ ir(f, _)), e.gte = (f, _) => e.check(/* @__PURE__ */ Ht(f, _)), e.min = (f, _) => e.check(/* @__PURE__ */ Ht(f, _)), e.lt = (f, _) => e.check(/* @__PURE__ */ or(f, _)), e.lte = (f, _) => e.check(/* @__PURE__ */ Wt(f, _)), e.max = (f, _) => e.check(/* @__PURE__ */ Wt(f, _)), e.int = (f) => e.check(cr(f)), e.safe = (f) => e.check(cr(f)), e.positive = (f) => e.check(/* @__PURE__ */ ir(0, f)), e.nonnegative = (f) => e.check(/* @__PURE__ */ Ht(0, f)), e.negative = (f) => e.check(/* @__PURE__ */ or(0, f)), e.nonpositive = (f) => e.check(/* @__PURE__ */ Wt(0, f)), e.multipleOf = (f, _) => e.check(/* @__PURE__ */ ar(f, _)), e.step = (f, _) => e.check(/* @__PURE__ */ ar(f, _)), e.finite = () => e;
|
|
3621
3621
|
const n = e._zod.bag;
|
|
3622
3622
|
e.minValue = (i = Math.max((r = n.minimum) != null ? r : Number.NEGATIVE_INFINITY, (o = n.exclusiveMinimum) != null ? o : Number.NEGATIVE_INFINITY)) != null ? i : null, e.maxValue = (c = Math.min((a = n.maximum) != null ? a : Number.POSITIVE_INFINITY, (s = n.exclusiveMaximum) != null ? s : Number.POSITIVE_INFINITY)) != null ? c : null, e.isInt = ((u = n.format) != null ? u : "").includes("int") || Number.isSafeInteger((l = n.multipleOf) != null ? l : 0.5), e.isFinite = !0, e.format = (d = n.format) != null ? d : null;
|
|
3623
3623
|
});
|
|
3624
|
-
function
|
|
3625
|
-
return /* @__PURE__ */
|
|
3624
|
+
function Ol(e) {
|
|
3625
|
+
return /* @__PURE__ */ tu(zo, e);
|
|
3626
3626
|
}
|
|
3627
|
-
const
|
|
3628
|
-
|
|
3627
|
+
const xl = /* @__PURE__ */ h("ZodNumberFormat", (e, t) => {
|
|
3628
|
+
ic.init(e, t), zo.init(e, t);
|
|
3629
3629
|
});
|
|
3630
|
-
function
|
|
3631
|
-
return /* @__PURE__ */
|
|
3630
|
+
function cr(e) {
|
|
3631
|
+
return /* @__PURE__ */ nu(xl, e);
|
|
3632
3632
|
}
|
|
3633
|
-
const
|
|
3634
|
-
|
|
3633
|
+
const Al = /* @__PURE__ */ h("ZodBoolean", (e, t) => {
|
|
3634
|
+
ac.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => Eu(e, n, r);
|
|
3635
3635
|
});
|
|
3636
3636
|
function Y(e) {
|
|
3637
|
-
return /* @__PURE__ */
|
|
3637
|
+
return /* @__PURE__ */ ru(Al, e);
|
|
3638
3638
|
}
|
|
3639
|
-
const
|
|
3640
|
-
|
|
3639
|
+
const Il = /* @__PURE__ */ h("ZodUnknown", (e, t) => {
|
|
3640
|
+
sc.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => $u();
|
|
3641
3641
|
});
|
|
3642
|
-
function
|
|
3643
|
-
return /* @__PURE__ */
|
|
3642
|
+
function sn() {
|
|
3643
|
+
return /* @__PURE__ */ ou(Il);
|
|
3644
3644
|
}
|
|
3645
|
-
const
|
|
3646
|
-
|
|
3645
|
+
const Nl = /* @__PURE__ */ h("ZodNever", (e, t) => {
|
|
3646
|
+
cc.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => Tu(e, n, r);
|
|
3647
3647
|
});
|
|
3648
|
-
function
|
|
3649
|
-
return /* @__PURE__ */
|
|
3648
|
+
function Pl(e) {
|
|
3649
|
+
return /* @__PURE__ */ iu(Nl, e);
|
|
3650
3650
|
}
|
|
3651
|
-
const
|
|
3652
|
-
|
|
3651
|
+
const Rl = /* @__PURE__ */ h("ZodArray", (e, t) => {
|
|
3652
|
+
uc.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => Iu(e, n, r, o), e.element = t.element, e.min = (n, r) => e.check(/* @__PURE__ */ At(n, r)), e.nonempty = (n) => e.check(/* @__PURE__ */ At(1, n)), e.max = (n, r) => e.check(/* @__PURE__ */ go(n, r)), e.length = (n, r) => e.check(/* @__PURE__ */ mo(n, r)), e.unwrap = () => e.element;
|
|
3653
3653
|
});
|
|
3654
|
-
function
|
|
3655
|
-
return /* @__PURE__ */
|
|
3654
|
+
function cn(e, t) {
|
|
3655
|
+
return /* @__PURE__ */ mu(Rl, e, t);
|
|
3656
3656
|
}
|
|
3657
|
-
const
|
|
3658
|
-
|
|
3657
|
+
const Dl = /* @__PURE__ */ h("ZodObject", (e, t) => {
|
|
3658
|
+
fc.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => Nu(e, n, r, o), Z(e, "shape", () => t.shape), e.keyof = () => et(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone(y(p({}, e._zod.def), { catchall: n })), e.passthrough = () => e.clone(y(p({}, e._zod.def), { catchall: sn() })), e.loose = () => e.clone(y(p({}, e._zod.def), { catchall: sn() })), e.strict = () => e.clone(y(p({}, e._zod.def), { catchall: Pl() })), e.strip = () => e.clone(y(p({}, e._zod.def), { catchall: void 0 })), e.extend = (n) => Ia(e, n), e.safeExtend = (n) => Na(e, n), e.merge = (n) => Pa(e, n), e.pick = (n) => xa(e, n), e.omit = (n) => Aa(e, n), e.partial = (...n) => Ra(Eo, e, n[0]), e.required = (...n) => Da(To, e, n[0]);
|
|
3659
3659
|
});
|
|
3660
|
-
function
|
|
3660
|
+
function kt(e, t) {
|
|
3661
3661
|
const n = p({
|
|
3662
3662
|
type: "object",
|
|
3663
3663
|
shape: e != null ? e : {}
|
|
3664
3664
|
}, g(t));
|
|
3665
|
-
return new
|
|
3665
|
+
return new Dl(n);
|
|
3666
3666
|
}
|
|
3667
|
-
const
|
|
3668
|
-
|
|
3667
|
+
const Cl = /* @__PURE__ */ h("ZodUnion", (e, t) => {
|
|
3668
|
+
dc.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => Pu(e, n, r, o), e.options = t.options;
|
|
3669
3669
|
});
|
|
3670
|
-
function
|
|
3671
|
-
return new
|
|
3670
|
+
function So(e, t) {
|
|
3671
|
+
return new Cl(p({
|
|
3672
3672
|
type: "union",
|
|
3673
3673
|
options: e
|
|
3674
3674
|
}, g(t)));
|
|
3675
3675
|
}
|
|
3676
|
-
const
|
|
3677
|
-
|
|
3676
|
+
const Fl = /* @__PURE__ */ h("ZodIntersection", (e, t) => {
|
|
3677
|
+
hc.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ru(e, n, r, o);
|
|
3678
3678
|
});
|
|
3679
|
-
function
|
|
3680
|
-
return new
|
|
3679
|
+
function jl(e, t) {
|
|
3680
|
+
return new Fl({
|
|
3681
3681
|
type: "intersection",
|
|
3682
3682
|
left: e,
|
|
3683
3683
|
right: t
|
|
3684
3684
|
});
|
|
3685
3685
|
}
|
|
3686
|
-
const
|
|
3687
|
-
|
|
3686
|
+
const Ul = /* @__PURE__ */ h("ZodRecord", (e, t) => {
|
|
3687
|
+
pc.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => Du(e, n, r, o), e.keyType = t.keyType, e.valueType = t.valueType;
|
|
3688
3688
|
});
|
|
3689
|
-
function
|
|
3690
|
-
return new
|
|
3689
|
+
function Ll(e, t, n) {
|
|
3690
|
+
return new Ul(p({
|
|
3691
3691
|
type: "record",
|
|
3692
3692
|
keyType: e,
|
|
3693
3693
|
valueType: t
|
|
3694
3694
|
}, g(n)));
|
|
3695
3695
|
}
|
|
3696
|
-
const
|
|
3697
|
-
|
|
3696
|
+
const un = /* @__PURE__ */ h("ZodEnum", (e, t) => {
|
|
3697
|
+
_c.init(e, t), N.init(e, t), e._zod.processJSONSchema = (r, o, i) => Zu(e, r, o), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
3698
3698
|
const n = new Set(Object.keys(t.entries));
|
|
3699
3699
|
e.extract = (r, o) => {
|
|
3700
3700
|
const i = {};
|
|
@@ -3703,7 +3703,7 @@ const an = /* @__PURE__ */ h("ZodEnum", (e, t) => {
|
|
|
3703
3703
|
i[a] = t.entries[a];
|
|
3704
3704
|
else
|
|
3705
3705
|
throw new Error(`Key ${a} not found in enum`);
|
|
3706
|
-
return new
|
|
3706
|
+
return new un(y(p(y(p({}, t), {
|
|
3707
3707
|
checks: []
|
|
3708
3708
|
}), g(o)), {
|
|
3709
3709
|
entries: i
|
|
@@ -3715,22 +3715,22 @@ const an = /* @__PURE__ */ h("ZodEnum", (e, t) => {
|
|
|
3715
3715
|
delete i[a];
|
|
3716
3716
|
else
|
|
3717
3717
|
throw new Error(`Key ${a} not found in enum`);
|
|
3718
|
-
return new
|
|
3718
|
+
return new un(y(p(y(p({}, t), {
|
|
3719
3719
|
checks: []
|
|
3720
3720
|
}), g(o)), {
|
|
3721
3721
|
entries: i
|
|
3722
3722
|
}));
|
|
3723
3723
|
};
|
|
3724
3724
|
});
|
|
3725
|
-
function
|
|
3725
|
+
function et(e, t) {
|
|
3726
3726
|
const n = Array.isArray(e) ? Object.fromEntries(e.map((r) => [r, r])) : e;
|
|
3727
|
-
return new
|
|
3727
|
+
return new un(p({
|
|
3728
3728
|
type: "enum",
|
|
3729
3729
|
entries: n
|
|
3730
3730
|
}, g(t)));
|
|
3731
3731
|
}
|
|
3732
|
-
const
|
|
3733
|
-
|
|
3732
|
+
const Ml = /* @__PURE__ */ h("ZodLiteral", (e, t) => {
|
|
3733
|
+
gc.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ou(e, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", {
|
|
3734
3734
|
get() {
|
|
3735
3735
|
if (t.values.length > 1)
|
|
3736
3736
|
throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
@@ -3738,152 +3738,152 @@ const Fl = /* @__PURE__ */ h("ZodLiteral", (e, t) => {
|
|
|
3738
3738
|
}
|
|
3739
3739
|
});
|
|
3740
3740
|
});
|
|
3741
|
-
function
|
|
3742
|
-
return new
|
|
3741
|
+
function ur(e, t) {
|
|
3742
|
+
return new Ml(p({
|
|
3743
3743
|
type: "literal",
|
|
3744
3744
|
values: Array.isArray(e) ? e : [e]
|
|
3745
3745
|
}, g(t)));
|
|
3746
3746
|
}
|
|
3747
|
-
const
|
|
3748
|
-
|
|
3747
|
+
const Jl = /* @__PURE__ */ h("ZodTransform", (e, t) => {
|
|
3748
|
+
mc.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => Au(e, n), e._zod.parse = (n, r) => {
|
|
3749
3749
|
if (r.direction === "backward")
|
|
3750
|
-
throw new
|
|
3750
|
+
throw new Gr(e.constructor.name);
|
|
3751
3751
|
n.addIssue = (i) => {
|
|
3752
3752
|
var a, s, c;
|
|
3753
3753
|
if (typeof i == "string")
|
|
3754
|
-
n.issues.push(
|
|
3754
|
+
n.issues.push(ut(i, n.value, t));
|
|
3755
3755
|
else {
|
|
3756
3756
|
const u = i;
|
|
3757
|
-
u.fatal && (u.continue = !1), (a = u.code) != null || (u.code = "custom"), (s = u.input) != null || (u.input = n.value), (c = u.inst) != null || (u.inst = e), n.issues.push(
|
|
3757
|
+
u.fatal && (u.continue = !1), (a = u.code) != null || (u.code = "custom"), (s = u.input) != null || (u.input = n.value), (c = u.inst) != null || (u.inst = e), n.issues.push(ut(u));
|
|
3758
3758
|
}
|
|
3759
3759
|
};
|
|
3760
3760
|
const o = t.transform(n.value, n);
|
|
3761
3761
|
return o instanceof Promise ? o.then((i) => (n.value = i, n)) : (n.value = o, n);
|
|
3762
3762
|
};
|
|
3763
3763
|
});
|
|
3764
|
-
function
|
|
3765
|
-
return new
|
|
3764
|
+
function Bl(e) {
|
|
3765
|
+
return new Jl({
|
|
3766
3766
|
type: "transform",
|
|
3767
3767
|
transform: e
|
|
3768
3768
|
});
|
|
3769
3769
|
}
|
|
3770
|
-
const
|
|
3771
|
-
|
|
3770
|
+
const Eo = /* @__PURE__ */ h("ZodOptional", (e, t) => {
|
|
3771
|
+
_o.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => vo(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
3772
3772
|
});
|
|
3773
|
-
function
|
|
3774
|
-
return new
|
|
3773
|
+
function lr(e) {
|
|
3774
|
+
return new Eo({
|
|
3775
3775
|
type: "optional",
|
|
3776
3776
|
innerType: e
|
|
3777
3777
|
});
|
|
3778
3778
|
}
|
|
3779
|
-
const
|
|
3780
|
-
|
|
3779
|
+
const Vl = /* @__PURE__ */ h("ZodExactOptional", (e, t) => {
|
|
3780
|
+
yc.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => vo(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
3781
3781
|
});
|
|
3782
|
-
function
|
|
3783
|
-
return new
|
|
3782
|
+
function Wl(e) {
|
|
3783
|
+
return new Vl({
|
|
3784
3784
|
type: "optional",
|
|
3785
3785
|
innerType: e
|
|
3786
3786
|
});
|
|
3787
3787
|
}
|
|
3788
|
-
const
|
|
3789
|
-
|
|
3788
|
+
const Hl = /* @__PURE__ */ h("ZodNullable", (e, t) => {
|
|
3789
|
+
bc.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => Cu(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
3790
3790
|
});
|
|
3791
|
-
function
|
|
3792
|
-
return new
|
|
3791
|
+
function fr(e) {
|
|
3792
|
+
return new Hl({
|
|
3793
3793
|
type: "nullable",
|
|
3794
3794
|
innerType: e
|
|
3795
3795
|
});
|
|
3796
3796
|
}
|
|
3797
|
-
const
|
|
3798
|
-
|
|
3797
|
+
const Kl = /* @__PURE__ */ h("ZodDefault", (e, t) => {
|
|
3798
|
+
wc.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => ju(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
3799
3799
|
});
|
|
3800
|
-
function
|
|
3801
|
-
return new
|
|
3800
|
+
function Gl(e, t) {
|
|
3801
|
+
return new Kl({
|
|
3802
3802
|
type: "default",
|
|
3803
3803
|
innerType: e,
|
|
3804
3804
|
get defaultValue() {
|
|
3805
|
-
return typeof t == "function" ? t() :
|
|
3805
|
+
return typeof t == "function" ? t() : Qr(t);
|
|
3806
3806
|
}
|
|
3807
3807
|
});
|
|
3808
3808
|
}
|
|
3809
|
-
const
|
|
3810
|
-
|
|
3809
|
+
const ql = /* @__PURE__ */ h("ZodPrefault", (e, t) => {
|
|
3810
|
+
vc.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => Uu(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
3811
3811
|
});
|
|
3812
|
-
function
|
|
3813
|
-
return new
|
|
3812
|
+
function Xl(e, t) {
|
|
3813
|
+
return new ql({
|
|
3814
3814
|
type: "prefault",
|
|
3815
3815
|
innerType: e,
|
|
3816
3816
|
get defaultValue() {
|
|
3817
|
-
return typeof t == "function" ? t() :
|
|
3817
|
+
return typeof t == "function" ? t() : Qr(t);
|
|
3818
3818
|
}
|
|
3819
3819
|
});
|
|
3820
3820
|
}
|
|
3821
|
-
const
|
|
3822
|
-
|
|
3821
|
+
const To = /* @__PURE__ */ h("ZodNonOptional", (e, t) => {
|
|
3822
|
+
kc.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => Fu(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
3823
3823
|
});
|
|
3824
|
-
function
|
|
3825
|
-
return new
|
|
3824
|
+
function Yl(e, t) {
|
|
3825
|
+
return new To(p({
|
|
3826
3826
|
type: "nonoptional",
|
|
3827
3827
|
innerType: e
|
|
3828
3828
|
}, g(t)));
|
|
3829
3829
|
}
|
|
3830
|
-
const
|
|
3831
|
-
|
|
3830
|
+
const Ql = /* @__PURE__ */ h("ZodCatch", (e, t) => {
|
|
3831
|
+
zc.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => Lu(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
3832
3832
|
});
|
|
3833
|
-
function
|
|
3834
|
-
return new
|
|
3833
|
+
function ef(e, t) {
|
|
3834
|
+
return new Ql({
|
|
3835
3835
|
type: "catch",
|
|
3836
3836
|
innerType: e,
|
|
3837
3837
|
catchValue: typeof t == "function" ? t : () => t
|
|
3838
3838
|
});
|
|
3839
3839
|
}
|
|
3840
|
-
const
|
|
3841
|
-
|
|
3840
|
+
const tf = /* @__PURE__ */ h("ZodPipe", (e, t) => {
|
|
3841
|
+
Sc.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => Mu(e, n, r, o), e.in = t.in, e.out = t.out;
|
|
3842
3842
|
});
|
|
3843
|
-
function
|
|
3844
|
-
return new
|
|
3843
|
+
function dr(e, t) {
|
|
3844
|
+
return new tf({
|
|
3845
3845
|
type: "pipe",
|
|
3846
3846
|
in: e,
|
|
3847
3847
|
out: t
|
|
3848
3848
|
// ...util.normalizeParams(params),
|
|
3849
3849
|
});
|
|
3850
3850
|
}
|
|
3851
|
-
const
|
|
3852
|
-
|
|
3851
|
+
const nf = /* @__PURE__ */ h("ZodReadonly", (e, t) => {
|
|
3852
|
+
Ec.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ju(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
3853
3853
|
});
|
|
3854
|
-
function
|
|
3855
|
-
return new
|
|
3854
|
+
function rf(e) {
|
|
3855
|
+
return new nf({
|
|
3856
3856
|
type: "readonly",
|
|
3857
3857
|
innerType: e
|
|
3858
3858
|
});
|
|
3859
3859
|
}
|
|
3860
|
-
const
|
|
3861
|
-
|
|
3860
|
+
const of = /* @__PURE__ */ h("ZodCustom", (e, t) => {
|
|
3861
|
+
Tc.init(e, t), N.init(e, t), e._zod.processJSONSchema = (n, r, o) => xu(e, n);
|
|
3862
3862
|
});
|
|
3863
|
-
function
|
|
3864
|
-
return /* @__PURE__ */
|
|
3863
|
+
function af(e, t = {}) {
|
|
3864
|
+
return /* @__PURE__ */ yu(of, e, t);
|
|
3865
3865
|
}
|
|
3866
|
-
function
|
|
3867
|
-
return /* @__PURE__ */
|
|
3866
|
+
function sf(e) {
|
|
3867
|
+
return /* @__PURE__ */ bu(e);
|
|
3868
3868
|
}
|
|
3869
|
-
const
|
|
3870
|
-
language:
|
|
3869
|
+
const cf = kt({
|
|
3870
|
+
language: et(["typescript", "javascript"]).optional(),
|
|
3871
3871
|
disableMarkedForExport: Y().optional(),
|
|
3872
3872
|
allowAutoSelectFirstNode: Y().optional().default(!0),
|
|
3873
3873
|
enableDisplayDataId: Y().optional(),
|
|
3874
3874
|
enableDisplayDataName: Y().optional(),
|
|
3875
3875
|
enableDisplayDataVariant: Y().optional()
|
|
3876
3876
|
}).and(
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
framework:
|
|
3880
|
-
model:
|
|
3881
|
-
styling:
|
|
3882
|
-
uiLibrary:
|
|
3883
|
-
responsivePages:
|
|
3884
|
-
|
|
3885
|
-
name:
|
|
3886
|
-
framesId:
|
|
3877
|
+
So([
|
|
3878
|
+
kt({
|
|
3879
|
+
framework: ur("react"),
|
|
3880
|
+
model: Ie().optional(),
|
|
3881
|
+
styling: et(["plain_css", "tailwind", "inline_styles"]),
|
|
3882
|
+
uiLibrary: et(["mui", "antd", "radix", "shadcn", "clean_react", "custom_design_system"]).optional(),
|
|
3883
|
+
responsivePages: cn(
|
|
3884
|
+
kt({
|
|
3885
|
+
name: Ie(),
|
|
3886
|
+
framesId: cn(Ie())
|
|
3887
3887
|
})
|
|
3888
3888
|
).optional(),
|
|
3889
3889
|
enableUILibraryTheming: Y().optional(),
|
|
@@ -3892,42 +3892,42 @@ const rf = bt({
|
|
|
3892
3892
|
enableGeneratePackageLock: Y().optional(),
|
|
3893
3893
|
enableAnimationsPreset: Y().optional(),
|
|
3894
3894
|
enableAutoSplit: Y().optional(),
|
|
3895
|
-
autoSplitThreshold:
|
|
3896
|
-
url:
|
|
3897
|
-
codegenSettings:
|
|
3898
|
-
designSystemId:
|
|
3895
|
+
autoSplitThreshold: Ol().optional(),
|
|
3896
|
+
url: Ie().url().optional(),
|
|
3897
|
+
codegenSettings: Ll(Ie(), sn()).optional(),
|
|
3898
|
+
designSystemId: Ie().optional()
|
|
3899
3899
|
}),
|
|
3900
|
-
|
|
3901
|
-
framework:
|
|
3902
|
-
styling:
|
|
3900
|
+
kt({
|
|
3901
|
+
framework: ur("html"),
|
|
3902
|
+
styling: et(["plain_css", "inline_styles", "tailwind"]),
|
|
3903
3903
|
enableTranslation: Y().optional()
|
|
3904
3904
|
})
|
|
3905
3905
|
])
|
|
3906
|
-
),
|
|
3907
|
-
const t =
|
|
3906
|
+
), uf = (e) => {
|
|
3907
|
+
const t = cf.safeParse(e);
|
|
3908
3908
|
if (t.success === !1) {
|
|
3909
3909
|
const n = new Error("Invalid codegen settings");
|
|
3910
3910
|
throw n.cause = t.error, n;
|
|
3911
3911
|
}
|
|
3912
3912
|
return t.data;
|
|
3913
|
-
},
|
|
3913
|
+
}, $o = (e, t) => {
|
|
3914
3914
|
if (e.id === t)
|
|
3915
3915
|
return e;
|
|
3916
3916
|
if ("children" in e)
|
|
3917
3917
|
for (const n of e.children) {
|
|
3918
|
-
const r =
|
|
3918
|
+
const r = $o(n, t);
|
|
3919
3919
|
if (r)
|
|
3920
3920
|
return r;
|
|
3921
3921
|
}
|
|
3922
3922
|
return null;
|
|
3923
|
-
},
|
|
3923
|
+
}, hr = /* @__PURE__ */ new Set([
|
|
3924
3924
|
"FRAME",
|
|
3925
3925
|
"INSTANCE",
|
|
3926
3926
|
"COMPONENT",
|
|
3927
3927
|
"COMPONENT_SET",
|
|
3928
3928
|
"GROUP"
|
|
3929
|
-
]),
|
|
3930
|
-
const r =
|
|
3929
|
+
]), lf = (e, t, n = { allowAutoSelectFirstNode: !0 }) => {
|
|
3930
|
+
const r = $o(e.document, t);
|
|
3931
3931
|
if (!r)
|
|
3932
3932
|
return {
|
|
3933
3933
|
isValid: !1,
|
|
@@ -3935,7 +3935,7 @@ const rf = bt({
|
|
|
3935
3935
|
};
|
|
3936
3936
|
if (r.type === "CANVAS") {
|
|
3937
3937
|
const o = r.children.filter(
|
|
3938
|
-
(i) =>
|
|
3938
|
+
(i) => hr.has(i.type)
|
|
3939
3939
|
);
|
|
3940
3940
|
return o.length === 0 ? {
|
|
3941
3941
|
isValid: !1,
|
|
@@ -3953,20 +3953,20 @@ const rf = bt({
|
|
|
3953
3953
|
reason: "Selected node is a page with multiple children"
|
|
3954
3954
|
};
|
|
3955
3955
|
}
|
|
3956
|
-
return
|
|
3956
|
+
return hr.has(r.type) ? { isValid: !0, node: r } : {
|
|
3957
3957
|
isValid: !1,
|
|
3958
3958
|
reason: "Selected node type is not supported"
|
|
3959
3959
|
};
|
|
3960
3960
|
};
|
|
3961
|
-
function
|
|
3961
|
+
function ff(e) {
|
|
3962
3962
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
3963
3963
|
}
|
|
3964
|
-
var
|
|
3965
|
-
function
|
|
3966
|
-
return
|
|
3964
|
+
var St = { exports: {} }, df = St.exports, pr;
|
|
3965
|
+
function hf() {
|
|
3966
|
+
return pr || (pr = 1, (function(e, t) {
|
|
3967
3967
|
(function(n, r) {
|
|
3968
3968
|
e.exports = r();
|
|
3969
|
-
})(
|
|
3969
|
+
})(df, (function() {
|
|
3970
3970
|
var n = typeof Promise == "function", r = (function(b) {
|
|
3971
3971
|
if (typeof globalThis == "object")
|
|
3972
3972
|
return globalThis;
|
|
@@ -4012,15 +4012,15 @@ function uf() {
|
|
|
4012
4012
|
var Oe = d && b[Symbol.toStringTag];
|
|
4013
4013
|
if (typeof Oe == "string")
|
|
4014
4014
|
return Oe;
|
|
4015
|
-
var
|
|
4016
|
-
return
|
|
4015
|
+
var F = Object.getPrototypeOf(b);
|
|
4016
|
+
return F === RegExp.prototype ? "RegExp" : F === Date.prototype ? "Date" : n && F === Promise.prototype ? "Promise" : a && F === Set.prototype ? "Set" : i && F === Map.prototype ? "Map" : c && F === WeakSet.prototype ? "WeakSet" : s && F === WeakMap.prototype ? "WeakMap" : u && F === DataView.prototype ? "DataView" : i && F === w ? "Map Iterator" : a && F === m ? "Set Iterator" : O && F === U ? "Array Iterator" : H && F === K ? "String Iterator" : F === null ? "Object" : Object.prototype.toString.call(b).slice(T, S);
|
|
4017
4017
|
}
|
|
4018
4018
|
return R;
|
|
4019
4019
|
}));
|
|
4020
|
-
})(
|
|
4020
|
+
})(St)), St.exports;
|
|
4021
4021
|
}
|
|
4022
|
-
var
|
|
4023
|
-
const
|
|
4022
|
+
var pf = hf();
|
|
4023
|
+
const _f = /* @__PURE__ */ ff(pf), Tn = typeof Buffer != "undefined", gf = Tn && typeof Buffer.from != "undefined", mf = Tn ? (
|
|
4024
4024
|
/**
|
|
4025
4025
|
* is value is Buffer?
|
|
4026
4026
|
*
|
|
@@ -4041,7 +4041,7 @@ const ff = /* @__PURE__ */ sf(lf), zn = typeof Buffer != "undefined", df = zn &&
|
|
|
4041
4041
|
function() {
|
|
4042
4042
|
return !1;
|
|
4043
4043
|
}
|
|
4044
|
-
),
|
|
4044
|
+
), yf = gf ? (
|
|
4045
4045
|
/**
|
|
4046
4046
|
* copy Buffer
|
|
4047
4047
|
*
|
|
@@ -4051,7 +4051,7 @@ const ff = /* @__PURE__ */ sf(lf), zn = typeof Buffer != "undefined", df = zn &&
|
|
|
4051
4051
|
function(t) {
|
|
4052
4052
|
return Buffer.from(t);
|
|
4053
4053
|
}
|
|
4054
|
-
) :
|
|
4054
|
+
) : Tn ? (
|
|
4055
4055
|
/**
|
|
4056
4056
|
* copy Buffer
|
|
4057
4057
|
*
|
|
@@ -4076,18 +4076,18 @@ const ff = /* @__PURE__ */ sf(lf), zn = typeof Buffer != "undefined", df = zn &&
|
|
|
4076
4076
|
return t;
|
|
4077
4077
|
}
|
|
4078
4078
|
);
|
|
4079
|
-
function
|
|
4080
|
-
return
|
|
4079
|
+
function Be(e) {
|
|
4080
|
+
return mf(e) ? "Buffer" : _f(e);
|
|
4081
4081
|
}
|
|
4082
|
-
const
|
|
4082
|
+
const bf = /* @__PURE__ */ new Set([
|
|
4083
4083
|
"Arguments",
|
|
4084
4084
|
"Array",
|
|
4085
4085
|
"Map",
|
|
4086
4086
|
"Object",
|
|
4087
4087
|
"Set"
|
|
4088
4088
|
]);
|
|
4089
|
-
function
|
|
4090
|
-
switch (n ||
|
|
4089
|
+
function wf(e, t, n = null) {
|
|
4090
|
+
switch (n || Be(e)) {
|
|
4091
4091
|
case "Arguments":
|
|
4092
4092
|
case "Array":
|
|
4093
4093
|
case "Object":
|
|
@@ -4098,11 +4098,11 @@ function gf(e, t, n = null) {
|
|
|
4098
4098
|
return t;
|
|
4099
4099
|
}
|
|
4100
4100
|
}
|
|
4101
|
-
function
|
|
4102
|
-
return
|
|
4101
|
+
function ln(e) {
|
|
4102
|
+
return bf.has(e);
|
|
4103
4103
|
}
|
|
4104
|
-
function
|
|
4105
|
-
switch (r ||
|
|
4104
|
+
function _r(e, t, n, r = null) {
|
|
4105
|
+
switch (r || Be(e)) {
|
|
4106
4106
|
case "Arguments":
|
|
4107
4107
|
case "Array":
|
|
4108
4108
|
case "Object":
|
|
@@ -4117,59 +4117,59 @@ function fr(e, t, n, r = null) {
|
|
|
4117
4117
|
}
|
|
4118
4118
|
return e;
|
|
4119
4119
|
}
|
|
4120
|
-
const
|
|
4121
|
-
function
|
|
4120
|
+
const vf = typeof globalThis != "undefined" && globalThis !== null && globalThis.Object === Object && globalThis, kf = typeof global != "undefined" && global !== null && global.Object === Object && global, zf = typeof self != "undefined" && self !== null && self.Object === Object && self, Kt = vf || kf || zf || Function("return this")();
|
|
4121
|
+
function Sf(e) {
|
|
4122
4122
|
return e.slice(0);
|
|
4123
4123
|
}
|
|
4124
|
-
function
|
|
4124
|
+
function Ef(e) {
|
|
4125
4125
|
return new Boolean(e.valueOf());
|
|
4126
4126
|
}
|
|
4127
|
-
function
|
|
4127
|
+
function Tf(e) {
|
|
4128
4128
|
return new DataView(e.buffer);
|
|
4129
4129
|
}
|
|
4130
|
-
function
|
|
4131
|
-
return
|
|
4130
|
+
function $f(e) {
|
|
4131
|
+
return yf(e);
|
|
4132
4132
|
}
|
|
4133
|
-
function
|
|
4133
|
+
function Zf(e) {
|
|
4134
4134
|
return new Date(e.getTime());
|
|
4135
4135
|
}
|
|
4136
|
-
function
|
|
4136
|
+
function Of(e) {
|
|
4137
4137
|
return new Number(e);
|
|
4138
4138
|
}
|
|
4139
|
-
function
|
|
4139
|
+
function xf(e) {
|
|
4140
4140
|
return new RegExp(e.source, e.flags);
|
|
4141
4141
|
}
|
|
4142
|
-
function
|
|
4142
|
+
function Af(e) {
|
|
4143
4143
|
return new String(e);
|
|
4144
4144
|
}
|
|
4145
4145
|
function le(e, t) {
|
|
4146
|
-
return
|
|
4146
|
+
return Kt[t].from ? Kt[t].from(e) : new Kt[t](e);
|
|
4147
4147
|
}
|
|
4148
4148
|
function L(e) {
|
|
4149
4149
|
return e;
|
|
4150
4150
|
}
|
|
4151
|
-
function
|
|
4151
|
+
function gr() {
|
|
4152
4152
|
return [];
|
|
4153
4153
|
}
|
|
4154
|
-
function
|
|
4154
|
+
function If() {
|
|
4155
4155
|
return /* @__PURE__ */ new Map();
|
|
4156
4156
|
}
|
|
4157
|
-
function
|
|
4157
|
+
function Nf() {
|
|
4158
4158
|
return {};
|
|
4159
4159
|
}
|
|
4160
|
-
function
|
|
4160
|
+
function Pf() {
|
|
4161
4161
|
return /* @__PURE__ */ new Set();
|
|
4162
4162
|
}
|
|
4163
|
-
const
|
|
4163
|
+
const Rf = /* @__PURE__ */ new Map([
|
|
4164
4164
|
// deep copy
|
|
4165
|
-
["ArrayBuffer",
|
|
4166
|
-
["Boolean",
|
|
4167
|
-
["Buffer",
|
|
4168
|
-
["DataView",
|
|
4169
|
-
["Date",
|
|
4170
|
-
["Number",
|
|
4171
|
-
["RegExp",
|
|
4172
|
-
["String",
|
|
4165
|
+
["ArrayBuffer", Sf],
|
|
4166
|
+
["Boolean", Ef],
|
|
4167
|
+
["Buffer", $f],
|
|
4168
|
+
["DataView", Tf],
|
|
4169
|
+
["Date", Zf],
|
|
4170
|
+
["Number", Of],
|
|
4171
|
+
["RegExp", xf],
|
|
4172
|
+
["String", Af],
|
|
4173
4173
|
// typed arrays
|
|
4174
4174
|
// TODO: pass bound function
|
|
4175
4175
|
["Float32Array", le],
|
|
@@ -4201,11 +4201,11 @@ const Af = /* @__PURE__ */ new Map([
|
|
|
4201
4201
|
["undefined", L],
|
|
4202
4202
|
// collections
|
|
4203
4203
|
// NOTE: return empty value, because recursively copy later.
|
|
4204
|
-
["Arguments",
|
|
4205
|
-
["Array",
|
|
4206
|
-
["Map",
|
|
4207
|
-
["Object",
|
|
4208
|
-
["Set",
|
|
4204
|
+
["Arguments", gr],
|
|
4205
|
+
["Array", gr],
|
|
4206
|
+
["Map", If],
|
|
4207
|
+
["Object", Nf],
|
|
4208
|
+
["Set", Pf]
|
|
4209
4209
|
// NOTE: type-detect returns following types
|
|
4210
4210
|
// 'Location'
|
|
4211
4211
|
// 'Document'
|
|
@@ -4217,11 +4217,11 @@ const Af = /* @__PURE__ */ new Map([
|
|
|
4217
4217
|
// TODO: is type-detect never return 'object'?
|
|
4218
4218
|
// 'object'
|
|
4219
4219
|
]);
|
|
4220
|
-
function
|
|
4220
|
+
function Df() {
|
|
4221
4221
|
}
|
|
4222
|
-
function
|
|
4222
|
+
function fn(e, t = null, n = Df) {
|
|
4223
4223
|
arguments.length === 2 && typeof t == "function" && (n = t, t = null);
|
|
4224
|
-
const r = t ||
|
|
4224
|
+
const r = t || Be(e), o = Rf.get(r);
|
|
4225
4225
|
if (r === "Object") {
|
|
4226
4226
|
const i = n(e, r);
|
|
4227
4227
|
if (i !== void 0)
|
|
@@ -4229,7 +4229,7 @@ function cn(e, t = null, n = If) {
|
|
|
4229
4229
|
}
|
|
4230
4230
|
return o ? o(e, r) : e;
|
|
4231
4231
|
}
|
|
4232
|
-
function
|
|
4232
|
+
function mr(e, t = {}) {
|
|
4233
4233
|
typeof t == "function" && (t = {
|
|
4234
4234
|
customizer: t
|
|
4235
4235
|
});
|
|
@@ -4238,15 +4238,15 @@ function hr(e, t = {}) {
|
|
|
4238
4238
|
customizer: n
|
|
4239
4239
|
// TODO: max depth
|
|
4240
4240
|
// depth = Infinity,
|
|
4241
|
-
} = t, r =
|
|
4242
|
-
if (!
|
|
4243
|
-
return
|
|
4244
|
-
const o =
|
|
4245
|
-
return
|
|
4246
|
-
}
|
|
4247
|
-
function
|
|
4248
|
-
const i =
|
|
4249
|
-
if (!
|
|
4241
|
+
} = t, r = Be(e);
|
|
4242
|
+
if (!ln(r))
|
|
4243
|
+
return dn(e, null, null, null);
|
|
4244
|
+
const o = fn(e, r, n), i = new WeakMap([[e, o]]), a = new WeakSet([e]);
|
|
4245
|
+
return dn(e, o, i, a);
|
|
4246
|
+
}
|
|
4247
|
+
function dn(e, t, n, r, o) {
|
|
4248
|
+
const i = Be(e), a = fn(e, i);
|
|
4249
|
+
if (!ln(i))
|
|
4250
4250
|
return a;
|
|
4251
4251
|
let s;
|
|
4252
4252
|
switch (i) {
|
|
@@ -4263,15 +4263,15 @@ function un(e, t, n, r, o) {
|
|
|
4263
4263
|
break;
|
|
4264
4264
|
}
|
|
4265
4265
|
for (let c of s) {
|
|
4266
|
-
const u =
|
|
4266
|
+
const u = wf(e, c, i);
|
|
4267
4267
|
if (r.has(u))
|
|
4268
|
-
|
|
4268
|
+
_r(t, c, n.get(u), i);
|
|
4269
4269
|
else {
|
|
4270
|
-
const l =
|
|
4271
|
-
|
|
4270
|
+
const l = Be(u), d = fn(u, l);
|
|
4271
|
+
ln(l) && (n.set(u, d), r.add(u)), _r(
|
|
4272
4272
|
t,
|
|
4273
4273
|
c,
|
|
4274
|
-
|
|
4274
|
+
dn(
|
|
4275
4275
|
u,
|
|
4276
4276
|
d,
|
|
4277
4277
|
n,
|
|
@@ -4283,25 +4283,25 @@ function un(e, t, n, r, o) {
|
|
|
4283
4283
|
}
|
|
4284
4284
|
return t;
|
|
4285
4285
|
}
|
|
4286
|
-
var
|
|
4287
|
-
class
|
|
4286
|
+
var lt, Fe, de, Q, V, hn, Et, tt;
|
|
4287
|
+
class Cf {
|
|
4288
4288
|
constructor({
|
|
4289
4289
|
fetch: t = globalThis.fetch.bind(globalThis),
|
|
4290
4290
|
baseAddress: n = "https://api.figma.com/",
|
|
4291
4291
|
defaultOptions: r = {}
|
|
4292
4292
|
} = {}) {
|
|
4293
4293
|
re(this, V);
|
|
4294
|
-
re(this,
|
|
4295
|
-
re(this,
|
|
4294
|
+
re(this, lt);
|
|
4295
|
+
re(this, Fe);
|
|
4296
4296
|
re(this, de);
|
|
4297
4297
|
re(this, Q);
|
|
4298
|
-
X(this,
|
|
4298
|
+
X(this, lt, n), X(this, Fe, t), X(this, Q, r), X(this, de, v(this, Q)), r.token && j(this, V, hn).call(this, r.token);
|
|
4299
4299
|
}
|
|
4300
4300
|
hasDefaultToken() {
|
|
4301
4301
|
return !!v(this, Q).token;
|
|
4302
4302
|
}
|
|
4303
4303
|
updateDefaultOptions(t) {
|
|
4304
|
-
t.token && j(this, V,
|
|
4304
|
+
t.token && j(this, V, hn).call(this, t.token), X(this, Q, p(p({}, v(this, Q)), t)), X(this, de, v(this, Q));
|
|
4305
4305
|
}
|
|
4306
4306
|
withOptions(t) {
|
|
4307
4307
|
return X(this, de, p(p(p({}, v(this, Q)), v(this, de)), t)), this;
|
|
@@ -4315,7 +4315,7 @@ class Nf {
|
|
|
4315
4315
|
else if (r != null && r.startsWith("figu_"))
|
|
4316
4316
|
n.Authorization = `Bearer ${r}`;
|
|
4317
4317
|
else
|
|
4318
|
-
throw new
|
|
4318
|
+
throw new wa();
|
|
4319
4319
|
return n;
|
|
4320
4320
|
}
|
|
4321
4321
|
getFile(o) {
|
|
@@ -4330,7 +4330,7 @@ class Nf {
|
|
|
4330
4330
|
});
|
|
4331
4331
|
n.length > 0 && i.append("ids", n.join(",")), r && i.append("depth", `${r}`);
|
|
4332
4332
|
const a = i.toString(), s = `v1/files/${t}?${a}`;
|
|
4333
|
-
return yield j(this, V,
|
|
4333
|
+
return yield j(this, V, tt).call(this, s);
|
|
4334
4334
|
});
|
|
4335
4335
|
}
|
|
4336
4336
|
getNodeImages(a) {
|
|
@@ -4341,14 +4341,14 @@ class Nf {
|
|
|
4341
4341
|
as: o = "arrayBuffer",
|
|
4342
4342
|
format: i = "jpg"
|
|
4343
4343
|
}) {
|
|
4344
|
-
const c = (yield j(this, V,
|
|
4344
|
+
const c = (yield j(this, V, tt).call(this, `v1/images/${t}?ids=${n}&format=${i}&scale=${r}`)).images;
|
|
4345
4345
|
if (o === "links")
|
|
4346
4346
|
return c;
|
|
4347
4347
|
const u = n.map((f) => k(this, null, function* () {
|
|
4348
4348
|
const _ = c[f];
|
|
4349
4349
|
if (!_)
|
|
4350
4350
|
return null;
|
|
4351
|
-
const m = yield v(this,
|
|
4351
|
+
const m = yield v(this, Fe).call(this, _);
|
|
4352
4352
|
return m.ok ? yield m.arrayBuffer() : null;
|
|
4353
4353
|
})), l = yield Promise.allSettled(u);
|
|
4354
4354
|
return n.reduce(
|
|
@@ -4366,19 +4366,19 @@ class Nf {
|
|
|
4366
4366
|
}) {
|
|
4367
4367
|
var i, a;
|
|
4368
4368
|
const r = `v1/files/${t}/images`;
|
|
4369
|
-
return (a = (i = (yield j(this, V,
|
|
4369
|
+
return (a = (i = (yield j(this, V, tt).call(this, r)).meta) == null ? void 0 : i.images) != null ? a : {};
|
|
4370
4370
|
});
|
|
4371
4371
|
}
|
|
4372
4372
|
getMe() {
|
|
4373
4373
|
return k(this, null, function* () {
|
|
4374
|
-
return yield j(this, V,
|
|
4374
|
+
return yield j(this, V, tt).call(this, "v1/me");
|
|
4375
4375
|
});
|
|
4376
4376
|
}
|
|
4377
4377
|
}
|
|
4378
|
-
|
|
4378
|
+
lt = new WeakMap(), Fe = new WeakMap(), de = new WeakMap(), Q = new WeakMap(), V = new WeakSet(), hn = function(t) {
|
|
4379
4379
|
if (!t.startsWith("figd_") && !t.startsWith("figu_"))
|
|
4380
|
-
throw new
|
|
4381
|
-
},
|
|
4380
|
+
throw new ba();
|
|
4381
|
+
}, Et = function(t, n) {
|
|
4382
4382
|
return k(this, null, function* () {
|
|
4383
4383
|
var o;
|
|
4384
4384
|
const r = yield n();
|
|
@@ -4390,13 +4390,13 @@ ct = new WeakMap(), Ce = new WeakMap(), de = new WeakMap(), Q = new WeakMap(), V
|
|
|
4390
4390
|
} catch (s) {
|
|
4391
4391
|
}
|
|
4392
4392
|
if (i === 403)
|
|
4393
|
-
throw a != null && a.includes("Invalid token") ? new
|
|
4393
|
+
throw a != null && a.includes("Invalid token") ? new Un() : a != null && a.includes("Token expired") ? new Ln() : a != null && a.includes("File not exportable") ? new Mn() : new Jn({ reason: a });
|
|
4394
4394
|
if (i === 404)
|
|
4395
|
-
throw new
|
|
4395
|
+
throw new va({ cause: r });
|
|
4396
4396
|
if (i === 429) {
|
|
4397
4397
|
const s = r.headers.get("Retry-After"), c = s ? Number(s) : null;
|
|
4398
4398
|
if (!c)
|
|
4399
|
-
throw new
|
|
4399
|
+
throw new Bn({
|
|
4400
4400
|
cause: r
|
|
4401
4401
|
});
|
|
4402
4402
|
if (yield (o = t.onRateLimited) == null ? void 0 : o.call(t, {
|
|
@@ -4413,7 +4413,7 @@ ct = new WeakMap(), Ce = new WeakMap(), de = new WeakMap(), Q = new WeakMap(), V
|
|
|
4413
4413
|
const f = setTimeout(
|
|
4414
4414
|
() => {
|
|
4415
4415
|
var m;
|
|
4416
|
-
(m = t.abortSignal) != null && m.aborted || j(this, V,
|
|
4416
|
+
(m = t.abortSignal) != null && m.aborted || j(this, V, Et).call(this, t, n).then(l).catch(d);
|
|
4417
4417
|
},
|
|
4418
4418
|
c * 1e3 + 1e3
|
|
4419
4419
|
);
|
|
@@ -4421,53 +4421,53 @@ ct = new WeakMap(), Ce = new WeakMap(), de = new WeakMap(), Q = new WeakMap(), V
|
|
|
4421
4421
|
clearTimeout(f), d(new Error("The operation was aborted."));
|
|
4422
4422
|
});
|
|
4423
4423
|
});
|
|
4424
|
-
throw new
|
|
4425
|
-
} else throw i === 500 && (a != null && a.includes("Request too large")) ? new
|
|
4424
|
+
throw new Bn({ cause: r });
|
|
4425
|
+
} else throw i === 500 && (a != null && a.includes("Request too large")) ? new za({ cause: r }) : new ka({
|
|
4426
4426
|
cause: r
|
|
4427
4427
|
});
|
|
4428
4428
|
}
|
|
4429
4429
|
return r;
|
|
4430
4430
|
});
|
|
4431
|
-
},
|
|
4431
|
+
}, tt = function(t) {
|
|
4432
4432
|
return k(this, null, function* () {
|
|
4433
|
-
const n =
|
|
4434
|
-
X(this, de,
|
|
4433
|
+
const n = mr(v(this, de));
|
|
4434
|
+
X(this, de, mr(v(this, Q)));
|
|
4435
4435
|
const r = () => k(this, null, function* () {
|
|
4436
|
-
return yield v(this,
|
|
4436
|
+
return yield v(this, Fe).call(this, `${v(this, lt)}${t}`, {
|
|
4437
4437
|
method: "GET",
|
|
4438
4438
|
headers: this.getHeaders(n.token),
|
|
4439
4439
|
signal: n.abortSignal
|
|
4440
4440
|
});
|
|
4441
4441
|
});
|
|
4442
4442
|
try {
|
|
4443
|
-
return yield (yield j(this, V,
|
|
4443
|
+
return yield (yield j(this, V, Et).call(this, n, r)).json();
|
|
4444
4444
|
} catch (o) {
|
|
4445
|
-
if (n.onForbidden && (o instanceof
|
|
4445
|
+
if (n.onForbidden && (o instanceof Un || o instanceof Ln || o instanceof Mn || o instanceof Jn)) {
|
|
4446
4446
|
const i = yield n.onForbidden(o);
|
|
4447
4447
|
if (i)
|
|
4448
|
-
return n.token = i.retry.newToken, yield (yield j(this, V,
|
|
4448
|
+
return n.token = i.retry.newToken, yield (yield j(this, V, Et).call(this, n, r)).json();
|
|
4449
4449
|
}
|
|
4450
4450
|
throw o;
|
|
4451
4451
|
}
|
|
4452
4452
|
});
|
|
4453
4453
|
};
|
|
4454
|
-
const
|
|
4454
|
+
const Ff = {
|
|
4455
4455
|
codegen: "f2c",
|
|
4456
4456
|
l2c: "l2c",
|
|
4457
4457
|
p2c: "p2c"
|
|
4458
4458
|
};
|
|
4459
|
-
var x,
|
|
4460
|
-
class
|
|
4459
|
+
var x, je, ft, ae, Zo, Ne;
|
|
4460
|
+
class Yf {
|
|
4461
4461
|
constructor({
|
|
4462
4462
|
auth: t,
|
|
4463
4463
|
apiBaseAddress: n = "https://public-api.animaapp.com",
|
|
4464
|
-
figmaRestApi: r = new
|
|
4464
|
+
figmaRestApi: r = new Cf()
|
|
4465
4465
|
} = {}) {
|
|
4466
4466
|
re(this, ae);
|
|
4467
4467
|
re(this, x);
|
|
4468
|
-
re(this,
|
|
4469
|
-
re(this,
|
|
4470
|
-
X(this,
|
|
4468
|
+
re(this, je);
|
|
4469
|
+
re(this, ft);
|
|
4470
|
+
X(this, je, n), X(this, ft, r), t && (this.auth = t);
|
|
4471
4471
|
}
|
|
4472
4472
|
hasAuth() {
|
|
4473
4473
|
return !!v(this, x);
|
|
@@ -4486,15 +4486,15 @@ class Gf {
|
|
|
4486
4486
|
var u;
|
|
4487
4487
|
let i;
|
|
4488
4488
|
try {
|
|
4489
|
-
i = yield v(this,
|
|
4489
|
+
i = yield v(this, ft).withOptions({ token: t.figmaToken, abortSignal: r }).getFile({
|
|
4490
4490
|
fileKey: t.fileKey
|
|
4491
4491
|
});
|
|
4492
4492
|
} catch (l) {
|
|
4493
4493
|
if (l instanceof Error && l.name === "AbortError")
|
|
4494
4494
|
throw l;
|
|
4495
4495
|
}
|
|
4496
|
-
const a =
|
|
4497
|
-
i && (yield j(this, ae,
|
|
4496
|
+
const a = uf(t.settings);
|
|
4497
|
+
i && (yield j(this, ae, Zo).call(this, i, t.nodesId, {
|
|
4498
4498
|
allowAutoSelectFirstNode: (u = a.allowAutoSelectFirstNode) != null ? u : !0
|
|
4499
4499
|
}));
|
|
4500
4500
|
let s = t.tracking;
|
|
@@ -4532,7 +4532,7 @@ class Gf {
|
|
|
4532
4532
|
// @ts-expect-error: We don't need to expose this parameter to GetCodeParams
|
|
4533
4533
|
createSession: t.createSession
|
|
4534
4534
|
};
|
|
4535
|
-
return j(this, ae,
|
|
4535
|
+
return j(this, ae, Ne).call(this, "POST", "/v1/codegen", c, n, "codegen", r);
|
|
4536
4536
|
});
|
|
4537
4537
|
}
|
|
4538
4538
|
generateCodeFromWebsite(o) {
|
|
@@ -4583,7 +4583,7 @@ class Gf {
|
|
|
4583
4583
|
subpages: t.subpages
|
|
4584
4584
|
}, (u = t.settings.codegenSettings) != null ? u : {})
|
|
4585
4585
|
};
|
|
4586
|
-
return j(this, ae,
|
|
4586
|
+
return j(this, ae, Ne).call(this, "POST", "/v1/l2c", c, n, "l2c", r);
|
|
4587
4587
|
});
|
|
4588
4588
|
}
|
|
4589
4589
|
discoverSubpages(t, n) {
|
|
@@ -4591,7 +4591,7 @@ class Gf {
|
|
|
4591
4591
|
if (this.hasAuth() === !1)
|
|
4592
4592
|
throw new Error('It needs to set "auth" before calling this method.');
|
|
4593
4593
|
const r = yield fetch(
|
|
4594
|
-
`${v(this,
|
|
4594
|
+
`${v(this, je)}/v1/l2c/discover-subpages`,
|
|
4595
4595
|
{
|
|
4596
4596
|
method: "POST",
|
|
4597
4597
|
headers: this.headers,
|
|
@@ -4672,7 +4672,7 @@ class Gf {
|
|
|
4672
4672
|
}, (s = t.settings.codegenSettings) != null ? s : {}),
|
|
4673
4673
|
webhookUrl: t.webhookUrl
|
|
4674
4674
|
};
|
|
4675
|
-
return j(this, ae,
|
|
4675
|
+
return j(this, ae, Ne).call(this, "POST", "/v1/p2c", a, n, "p2c", r);
|
|
4676
4676
|
});
|
|
4677
4677
|
}
|
|
4678
4678
|
/**
|
|
@@ -4687,20 +4687,20 @@ class Gf {
|
|
|
4687
4687
|
assetsStorage: t.assetsStorage,
|
|
4688
4688
|
params: t.params
|
|
4689
4689
|
};
|
|
4690
|
-
return j(this, ae,
|
|
4690
|
+
return j(this, ae, Ne).call(this, "POST", "/v1/l2c", a, n, "l2c", r);
|
|
4691
4691
|
});
|
|
4692
4692
|
}
|
|
4693
4693
|
attachToGenerationJob(o) {
|
|
4694
4694
|
return k(this, arguments, function* (t, n = {}, r) {
|
|
4695
4695
|
const i = {};
|
|
4696
|
-
return j(this, ae,
|
|
4696
|
+
return j(this, ae, Ne).call(this, "GET", `/v1/jobs/${t.sessionId}`, i, n, void 0, r);
|
|
4697
4697
|
});
|
|
4698
4698
|
}
|
|
4699
4699
|
}
|
|
4700
|
-
x = new WeakMap(),
|
|
4700
|
+
x = new WeakMap(), je = new WeakMap(), ft = new WeakMap(), ae = new WeakSet(), Zo = function(t, n, r) {
|
|
4701
4701
|
return k(this, null, function* () {
|
|
4702
4702
|
const i = n.map(
|
|
4703
|
-
(a) =>
|
|
4703
|
+
(a) => lf(t, a, r)
|
|
4704
4704
|
).find(
|
|
4705
4705
|
(a) => !a.isValid
|
|
4706
4706
|
);
|
|
@@ -4710,9 +4710,9 @@ x = new WeakMap(), Fe = new WeakMap(), ut = new WeakMap(), ae = new WeakSet(), S
|
|
|
4710
4710
|
reason: i.reason
|
|
4711
4711
|
});
|
|
4712
4712
|
});
|
|
4713
|
-
},
|
|
4713
|
+
}, Ne = function(t, n, r, o, i, a) {
|
|
4714
4714
|
return k(this, null, function* () {
|
|
4715
|
-
var w, O, U, H, K, T, S, R, b, ue, Oe;
|
|
4715
|
+
var w, O, U, H, K, T, S, R, b, ue, Oe, F;
|
|
4716
4716
|
if (this.hasAuth() === !1)
|
|
4717
4717
|
throw new Error('It needs to set "auth" before calling this method.');
|
|
4718
4718
|
const s = {}, c = {
|
|
@@ -4723,19 +4723,19 @@ x = new WeakMap(), Fe = new WeakMap(), ut = new WeakMap(), ae = new WeakSet(), S
|
|
|
4723
4723
|
signal: a
|
|
4724
4724
|
};
|
|
4725
4725
|
if (t === "POST") {
|
|
4726
|
-
const
|
|
4727
|
-
c.body =
|
|
4726
|
+
const xe = ya(JSON.stringify(r));
|
|
4727
|
+
c.body = xe, c.headers = y(p({}, c.headers), {
|
|
4728
4728
|
"Content-Encoding": "gzip",
|
|
4729
4729
|
"Content-Type": "application/json"
|
|
4730
4730
|
});
|
|
4731
4731
|
}
|
|
4732
|
-
const u = yield fetch(`${v(this,
|
|
4732
|
+
const u = yield fetch(`${v(this, je)}${n}`, c);
|
|
4733
4733
|
if (!u.ok) {
|
|
4734
|
-
const
|
|
4734
|
+
const xe = yield u.text();
|
|
4735
4735
|
let ne;
|
|
4736
4736
|
try {
|
|
4737
|
-
ne = JSON.parse(
|
|
4738
|
-
} catch (
|
|
4737
|
+
ne = JSON.parse(xe);
|
|
4738
|
+
} catch (Ft) {
|
|
4739
4739
|
}
|
|
4740
4740
|
throw ((w = ne == null ? void 0 : ne.error) == null ? void 0 : w.name) === "ZodError" ? (console.log(
|
|
4741
4741
|
"Zod validation error:",
|
|
@@ -4751,7 +4751,7 @@ x = new WeakMap(), Fe = new WeakMap(), ut = new WeakMap(), ae = new WeakSet(), S
|
|
|
4751
4751
|
status: u.status
|
|
4752
4752
|
}) : new he({
|
|
4753
4753
|
name: "HTTP error from Anima API",
|
|
4754
|
-
reason:
|
|
4754
|
+
reason: xe,
|
|
4755
4755
|
status: u.status
|
|
4756
4756
|
});
|
|
4757
4757
|
}
|
|
@@ -4761,25 +4761,25 @@ x = new WeakMap(), Fe = new WeakMap(), ut = new WeakMap(), ae = new WeakSet(), S
|
|
|
4761
4761
|
reason: "Response body is null",
|
|
4762
4762
|
status: u.status
|
|
4763
4763
|
});
|
|
4764
|
-
const l = u.headers.get("x-anima-job-type"), d = l &&
|
|
4764
|
+
const l = u.headers.get("x-anima-job-type"), d = l && Ff[l];
|
|
4765
4765
|
d && typeof o == "function" && o({ type: "set_job_type", payload: { jobType: d } });
|
|
4766
4766
|
const f = u.body.getReader(), _ = new TextDecoder();
|
|
4767
4767
|
let m = "";
|
|
4768
4768
|
try {
|
|
4769
4769
|
for (; ; ) {
|
|
4770
|
-
const { done:
|
|
4771
|
-
if (
|
|
4770
|
+
const { done: xe, value: ne } = yield f.read();
|
|
4771
|
+
if (xe)
|
|
4772
4772
|
break;
|
|
4773
4773
|
m += _.decode(ne, { stream: !0 });
|
|
4774
|
-
const
|
|
4774
|
+
const Ft = m.split(`
|
|
4775
4775
|
`);
|
|
4776
|
-
m =
|
|
4777
|
-
for (const
|
|
4778
|
-
if (!(!
|
|
4776
|
+
m = Ft.pop() || "";
|
|
4777
|
+
for (const gt of Ft)
|
|
4778
|
+
if (!(!gt.trim() || gt.startsWith(":")) && gt.startsWith("data: ")) {
|
|
4779
4779
|
let E;
|
|
4780
4780
|
try {
|
|
4781
|
-
E = JSON.parse(
|
|
4782
|
-
} catch (
|
|
4781
|
+
E = JSON.parse(gt.slice(6));
|
|
4782
|
+
} catch (Ge) {
|
|
4783
4783
|
continue;
|
|
4784
4784
|
}
|
|
4785
4785
|
switch (E.type) {
|
|
@@ -4843,8 +4843,17 @@ x = new WeakMap(), Fe = new WeakMap(), ut = new WeakMap(), ae = new WeakSet(), S
|
|
|
4843
4843
|
name: E.payload.errorName,
|
|
4844
4844
|
reason: E.payload.reason
|
|
4845
4845
|
});
|
|
4846
|
-
case "done":
|
|
4847
|
-
|
|
4846
|
+
case "done": {
|
|
4847
|
+
s.tokenUsage = E.payload.tokenUsage, s.sessionId = E.payload.sessionId;
|
|
4848
|
+
const Ge = (F = E.payload) == null ? void 0 : F.metadata;
|
|
4849
|
+
if (Ge && typeof Ge == "object") {
|
|
4850
|
+
const mt = Ge.viewport;
|
|
4851
|
+
(mt === "desktop" || mt === "mobile" || mt === "tablet") && (s.viewport = mt);
|
|
4852
|
+
const $n = Ge.viewportReason;
|
|
4853
|
+
typeof $n == "string" && (s.viewportReason = $n);
|
|
4854
|
+
}
|
|
4855
|
+
return s;
|
|
4856
|
+
}
|
|
4848
4857
|
}
|
|
4849
4858
|
}
|
|
4850
4859
|
}
|
|
@@ -4858,7 +4867,7 @@ x = new WeakMap(), Fe = new WeakMap(), ut = new WeakMap(), ae = new WeakSet(), S
|
|
|
4858
4867
|
});
|
|
4859
4868
|
});
|
|
4860
4869
|
};
|
|
4861
|
-
const
|
|
4870
|
+
const Qf = (e) => {
|
|
4862
4871
|
var t;
|
|
4863
4872
|
if (!e)
|
|
4864
4873
|
return [!1, "", ""];
|
|
@@ -4874,7 +4883,7 @@ const qf = (e) => {
|
|
|
4874
4883
|
} catch (n) {
|
|
4875
4884
|
return [!1, "", ""];
|
|
4876
4885
|
}
|
|
4877
|
-
},
|
|
4886
|
+
}, ed = ({
|
|
4878
4887
|
fileKey: e,
|
|
4879
4888
|
nodeId: t,
|
|
4880
4889
|
duplicate: n
|
|
@@ -4882,12 +4891,12 @@ const qf = (e) => {
|
|
|
4882
4891
|
const r = new URL("https://www.figma.com");
|
|
4883
4892
|
return r.pathname = `design/${e}`, n && (r.pathname = `${r.pathname}/dummy/duplicate`), t && r.searchParams.set("node-id", t.replace(":", "-")), r;
|
|
4884
4893
|
};
|
|
4885
|
-
class
|
|
4894
|
+
class td extends Error {
|
|
4886
4895
|
constructor(t, n) {
|
|
4887
4896
|
super(t), this.response = n;
|
|
4888
4897
|
}
|
|
4889
4898
|
}
|
|
4890
|
-
const
|
|
4899
|
+
const nd = ({
|
|
4891
4900
|
files: e,
|
|
4892
4901
|
screenPath: t = "src/screens"
|
|
4893
4902
|
}) => {
|
|
@@ -4895,12 +4904,12 @@ const Qf = ({
|
|
|
4895
4904
|
function o(i) {
|
|
4896
4905
|
if (r.has(i) || !e[i])
|
|
4897
4906
|
return;
|
|
4898
|
-
r.add(i), n[i] = e[i],
|
|
4907
|
+
r.add(i), n[i] = e[i], jf(e[i].content).forEach((s) => {
|
|
4899
4908
|
try {
|
|
4900
|
-
const c =
|
|
4909
|
+
const c = Uf(i, s);
|
|
4901
4910
|
if (c.startsWith("src/")) {
|
|
4902
4911
|
const u = c.split("/").slice(0, -1).join("/");
|
|
4903
|
-
|
|
4912
|
+
Lf(e, u).forEach((d) => {
|
|
4904
4913
|
r.has(d) || o(d);
|
|
4905
4914
|
});
|
|
4906
4915
|
}
|
|
@@ -4916,7 +4925,7 @@ const Qf = ({
|
|
|
4916
4925
|
i.startsWith(t) ? o(i) : i.startsWith("src/") || (n[i] = a);
|
|
4917
4926
|
}), n;
|
|
4918
4927
|
};
|
|
4919
|
-
function
|
|
4928
|
+
function jf(e) {
|
|
4920
4929
|
const t = /import.*?["']([^"']+)["']/g, n = /export.*from\s+["']([^"']+)["']/g, r = [];
|
|
4921
4930
|
let o;
|
|
4922
4931
|
for (; (o = t.exec(e)) !== null; )
|
|
@@ -4925,7 +4934,7 @@ function Rf(e) {
|
|
|
4925
4934
|
r.push(o[1]);
|
|
4926
4935
|
return [...new Set(r)];
|
|
4927
4936
|
}
|
|
4928
|
-
function
|
|
4937
|
+
function Uf(e, t) {
|
|
4929
4938
|
if (!t.startsWith("."))
|
|
4930
4939
|
return t;
|
|
4931
4940
|
const n = e.split("/").slice(0, -1), r = t.split("/"), o = [...n];
|
|
@@ -4933,10 +4942,10 @@ function Df(e, t) {
|
|
|
4933
4942
|
i === ".." ? o.pop() : i !== "." && o.push(i);
|
|
4934
4943
|
return o.join("/");
|
|
4935
4944
|
}
|
|
4936
|
-
function
|
|
4945
|
+
function Lf(e, t) {
|
|
4937
4946
|
return Object.keys(e).filter((n) => n.startsWith(t));
|
|
4938
4947
|
}
|
|
4939
|
-
function
|
|
4948
|
+
function pt(e, t, n) {
|
|
4940
4949
|
return new ReadableStream({
|
|
4941
4950
|
start(r) {
|
|
4942
4951
|
n.call(e, t, (o) => {
|
|
@@ -4964,8 +4973,8 @@ function dt(e, t, n) {
|
|
|
4964
4973
|
}
|
|
4965
4974
|
});
|
|
4966
4975
|
}
|
|
4967
|
-
const
|
|
4968
|
-
function
|
|
4976
|
+
const Mf = (e, t) => pt(e, t, e.generateCode);
|
|
4977
|
+
function _t(e) {
|
|
4969
4978
|
return k(this, null, function* () {
|
|
4970
4979
|
var a, s, c, u;
|
|
4971
4980
|
const [t, n] = e.tee(), r = yield t.getReader().read();
|
|
@@ -4999,56 +5008,56 @@ data: ${JSON.stringify(
|
|
|
4999
5008
|
});
|
|
5000
5009
|
});
|
|
5001
5010
|
}
|
|
5002
|
-
const
|
|
5003
|
-
const n = Ff(e, t);
|
|
5004
|
-
return ht(n);
|
|
5005
|
-
}), jf = (e, t) => dt(e, t, e.generateCodeFromWebsite), td = (e, t) => k(null, null, function* () {
|
|
5006
|
-
const n = jf(e, t);
|
|
5007
|
-
return ht(n);
|
|
5008
|
-
}), Uf = (e, t) => dt(e, t, e.generateCodeFromPrompt), nd = (e, t) => k(null, null, function* () {
|
|
5009
|
-
const n = Uf(e, t);
|
|
5010
|
-
return ht(n);
|
|
5011
|
-
}), Lf = (e, t) => dt(e, t, e.attachToGenerationJob), rd = (e, t) => k(null, null, function* () {
|
|
5012
|
-
const n = Lf(e, t);
|
|
5013
|
-
return ht(n);
|
|
5014
|
-
}), Mf = (e, t) => dt(e, t, e.generateLink2Code), od = (e, t) => k(null, null, function* () {
|
|
5011
|
+
const rd = (e, t) => k(null, null, function* () {
|
|
5015
5012
|
const n = Mf(e, t);
|
|
5016
|
-
return
|
|
5013
|
+
return _t(n);
|
|
5014
|
+
}), Jf = (e, t) => pt(e, t, e.generateCodeFromWebsite), od = (e, t) => k(null, null, function* () {
|
|
5015
|
+
const n = Jf(e, t);
|
|
5016
|
+
return _t(n);
|
|
5017
|
+
}), Bf = (e, t) => pt(e, t, e.generateCodeFromPrompt), id = (e, t) => k(null, null, function* () {
|
|
5018
|
+
const n = Bf(e, t);
|
|
5019
|
+
return _t(n);
|
|
5020
|
+
}), Vf = (e, t) => pt(e, t, e.attachToGenerationJob), ad = (e, t) => k(null, null, function* () {
|
|
5021
|
+
const n = Vf(e, t);
|
|
5022
|
+
return _t(n);
|
|
5023
|
+
}), Wf = (e, t) => pt(e, t, e.generateLink2Code), sd = (e, t) => k(null, null, function* () {
|
|
5024
|
+
const n = Wf(e, t);
|
|
5025
|
+
return _t(n);
|
|
5017
5026
|
});
|
|
5018
5027
|
export {
|
|
5019
|
-
|
|
5028
|
+
Yf as Anima,
|
|
5020
5029
|
he as CodegenError,
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5030
|
+
Ln as ExpiredFigmaToken,
|
|
5031
|
+
Cf as FigmaRestApi,
|
|
5032
|
+
Mn as FileNotExportable,
|
|
5033
|
+
ba as MalformattedFigmaToken,
|
|
5034
|
+
wa as MissingFigmaToken,
|
|
5035
|
+
Un as NeedsReauthFigmaToken,
|
|
5036
|
+
va as NotFound,
|
|
5037
|
+
Bn as RateLimitExceeded,
|
|
5038
|
+
za as RequestTooLarge,
|
|
5039
|
+
td as ResponseError,
|
|
5040
|
+
ka as UnknownFigmaApiException,
|
|
5041
|
+
Jn as UnknownForbiddenFigmaError,
|
|
5042
|
+
ad as attachToGenerationJobResponseEventStream,
|
|
5043
|
+
Vf as attachToGenerationJobStream,
|
|
5044
|
+
id as createCodeFromPromptResponseEventStream,
|
|
5045
|
+
Bf as createCodeFromPromptStream,
|
|
5046
|
+
od as createCodeFromWebsiteResponseEventStream,
|
|
5047
|
+
Jf as createCodeFromWebsiteStream,
|
|
5048
|
+
rd as createCodegenResponseEventStream,
|
|
5049
|
+
Mf as createCodegenStream,
|
|
5050
|
+
sd as createLink2CodeResponseEventStream,
|
|
5051
|
+
Wf as createLink2CodeStream,
|
|
5052
|
+
$o as findChildrenNode,
|
|
5053
|
+
ed as formatToFigmaLink,
|
|
5054
|
+
nd as getRelatedScreenFiles,
|
|
5055
|
+
lf as isNodeCodegenCompatible,
|
|
5056
|
+
Kf as isNotFound,
|
|
5057
|
+
qf as isRateLimitExceeded,
|
|
5058
|
+
Xf as isRequestTooLarge,
|
|
5059
|
+
Gf as isUnknownFigmaApiException,
|
|
5060
|
+
Qf as isValidFigmaUrl,
|
|
5061
|
+
uf as validateSettings
|
|
5053
5062
|
};
|
|
5054
5063
|
//# sourceMappingURL=index.js.map
|