@animaapp/anima-sdk-react 0.6.17 → 0.6.18
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 +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +309 -307
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -34,14 +34,14 @@ const va = (t) => {
|
|
|
34
34
|
e += String.fromCharCode(n[r]);
|
|
35
35
|
return btoa(e);
|
|
36
36
|
};
|
|
37
|
-
var _a = Object.defineProperty, ba = Object.defineProperties, wa = Object.getOwnPropertyDescriptors, qs = Object.getOwnPropertySymbols, ka = Object.prototype.hasOwnProperty,
|
|
37
|
+
var _a = Object.defineProperty, ba = Object.defineProperties, wa = Object.getOwnPropertyDescriptors, qs = Object.getOwnPropertySymbols, ka = Object.prototype.hasOwnProperty, Ea = Object.prototype.propertyIsEnumerable, Hs = (t, e, n) => e in t ? _a(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, d = (t, e) => {
|
|
38
38
|
for (var n in e || (e = {}))
|
|
39
39
|
ka.call(e, n) && Hs(t, n, e[n]);
|
|
40
40
|
if (qs)
|
|
41
41
|
for (var n of qs(e))
|
|
42
|
-
|
|
42
|
+
Ea.call(e, n) && Hs(t, n, e[n]);
|
|
43
43
|
return t;
|
|
44
|
-
},
|
|
44
|
+
}, x = (t, e) => ba(t, wa(e)), Ee = (t, e, n) => new Promise((s, r) => {
|
|
45
45
|
var a = (c) => {
|
|
46
46
|
try {
|
|
47
47
|
o(n.next(c));
|
|
@@ -67,14 +67,14 @@ class Gs extends Error {
|
|
|
67
67
|
super(), this.name = e, this.message = n, this.detail = r, this.status = s;
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
const
|
|
70
|
+
const xa = "Figma Token Issue";
|
|
71
71
|
class Sa extends Error {
|
|
72
72
|
constructor({
|
|
73
73
|
fileKey: e,
|
|
74
74
|
reason: n,
|
|
75
75
|
cause: s
|
|
76
76
|
}) {
|
|
77
|
-
super(
|
|
77
|
+
super(xa), this.fileKey = e, this.reason = n, this.cause = s;
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
const Oa = "Rate Limit Exceeded";
|
|
@@ -83,10 +83,10 @@ class Ta extends Error {
|
|
|
83
83
|
super(Oa), this.fileKey = e, this.cause = n;
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
-
const
|
|
87
|
-
class
|
|
86
|
+
const Ca = "Request Too Large";
|
|
87
|
+
class Aa extends Error {
|
|
88
88
|
constructor({ fileKey: e, cause: n }) {
|
|
89
|
-
super(
|
|
89
|
+
super(Ca), this.fileKey = e, this.cause = n;
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
const Na = "Not Found";
|
|
@@ -116,7 +116,7 @@ const ja = (t, e) => {
|
|
|
116
116
|
if (r === 404)
|
|
117
117
|
return new Ra({ fileKey: e, cause: t });
|
|
118
118
|
if (r === 400 && s.includes("Request too large"))
|
|
119
|
-
return new
|
|
119
|
+
return new Aa({ fileKey: e, cause: t });
|
|
120
120
|
}
|
|
121
121
|
return new Ia({ fileKey: e, cause: t });
|
|
122
122
|
};
|
|
@@ -129,7 +129,7 @@ var Za = Object.defineProperty, Da = Object.defineProperties, Ma = Object.getOwn
|
|
|
129
129
|
for (var n of Js(e))
|
|
130
130
|
$a.call(e, n) && Ys(t, n, e[n]);
|
|
131
131
|
return t;
|
|
132
|
-
}, Ts = (t, e) => Da(t, Ma(e)),
|
|
132
|
+
}, Ts = (t, e) => Da(t, Ma(e)), Cs = (t, e, n) => e.has(t) || Tr("Cannot " + n), j = (t, e, n) => (Cs(t, e, "read from private field"), n ? n.call(t) : e.get(t)), le = (t, e, n) => e.has(t) ? Tr("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), X = (t, e, n, s) => (Cs(t, e, "write to private field"), e.set(t, n), n), be = (t, e, n) => (Cs(t, e, "access private method"), n), B = (t, e, n) => new Promise((s, r) => {
|
|
133
133
|
var a = (c) => {
|
|
134
134
|
try {
|
|
135
135
|
o(n.next(c));
|
|
@@ -154,7 +154,7 @@ function za() {
|
|
|
154
154
|
(function(n, s) {
|
|
155
155
|
t.exports = s();
|
|
156
156
|
})(Va, function() {
|
|
157
|
-
var n = typeof Promise == "function", s = typeof self == "object" ? self : Wa, r = typeof Symbol != "undefined", a = typeof Map != "undefined", i = typeof Set != "undefined", o = typeof WeakMap != "undefined", c = typeof WeakSet != "undefined", u = typeof DataView != "undefined", h = r && typeof Symbol.iterator != "undefined", p = r && typeof Symbol.toStringTag != "undefined", k = i && typeof Set.prototype.entries == "function", g = a && typeof Map.prototype.entries == "function", b = k && Object.getPrototypeOf((/* @__PURE__ */ new Set()).entries()), m = g && Object.getPrototypeOf((/* @__PURE__ */ new Map()).entries()), _ = h && typeof Array.prototype[Symbol.iterator] == "function", l = _ && Object.getPrototypeOf([][Symbol.iterator]()),
|
|
157
|
+
var n = typeof Promise == "function", s = typeof self == "object" ? self : Wa, r = typeof Symbol != "undefined", a = typeof Map != "undefined", i = typeof Set != "undefined", o = typeof WeakMap != "undefined", c = typeof WeakSet != "undefined", u = typeof DataView != "undefined", h = r && typeof Symbol.iterator != "undefined", p = r && typeof Symbol.toStringTag != "undefined", k = i && typeof Set.prototype.entries == "function", g = a && typeof Map.prototype.entries == "function", b = k && Object.getPrototypeOf((/* @__PURE__ */ new Set()).entries()), m = g && Object.getPrototypeOf((/* @__PURE__ */ new Map()).entries()), _ = h && typeof Array.prototype[Symbol.iterator] == "function", l = _ && Object.getPrototypeOf([][Symbol.iterator]()), A = h && typeof String.prototype[Symbol.iterator] == "function", I = A && Object.getPrototypeOf(""[Symbol.iterator]()), K = 8, Z = -1;
|
|
158
158
|
function V(D) {
|
|
159
159
|
var M = typeof D;
|
|
160
160
|
if (M !== "object")
|
|
@@ -189,14 +189,14 @@ function za() {
|
|
|
189
189
|
if (typeof G == "string")
|
|
190
190
|
return G;
|
|
191
191
|
var $ = Object.getPrototypeOf(D);
|
|
192
|
-
return $ === RegExp.prototype ? "RegExp" : $ === Date.prototype ? "Date" : n && $ === Promise.prototype ? "Promise" : i && $ === Set.prototype ? "Set" : a && $ === Map.prototype ? "Map" : c && $ === WeakSet.prototype ? "WeakSet" : o && $ === WeakMap.prototype ? "WeakMap" : u && $ === DataView.prototype ? "DataView" : a && $ === m ? "Map Iterator" : i && $ === b ? "Set Iterator" : _ && $ === l ? "Array Iterator" :
|
|
192
|
+
return $ === RegExp.prototype ? "RegExp" : $ === Date.prototype ? "Date" : n && $ === Promise.prototype ? "Promise" : i && $ === Set.prototype ? "Set" : a && $ === Map.prototype ? "Map" : c && $ === WeakSet.prototype ? "WeakSet" : o && $ === WeakMap.prototype ? "WeakMap" : u && $ === DataView.prototype ? "DataView" : a && $ === m ? "Map Iterator" : i && $ === b ? "Set Iterator" : _ && $ === l ? "Array Iterator" : A && $ === I ? "String Iterator" : $ === null ? "Object" : Object.prototype.toString.call(D).slice(K, Z);
|
|
193
193
|
}
|
|
194
194
|
return V;
|
|
195
195
|
});
|
|
196
196
|
}(Bn)), Bn.exports;
|
|
197
197
|
}
|
|
198
198
|
var Ka = za();
|
|
199
|
-
const Ba = /* @__PURE__ */ Ua(Ka),
|
|
199
|
+
const Ba = /* @__PURE__ */ Ua(Ka), As = typeof Buffer != "undefined", qa = As && typeof Buffer.from != "undefined", Ha = As ? (
|
|
200
200
|
/**
|
|
201
201
|
* is value is Buffer?
|
|
202
202
|
*
|
|
@@ -227,7 +227,7 @@ const Ba = /* @__PURE__ */ Ua(Ka), Cs = typeof Buffer != "undefined", qa = Cs &&
|
|
|
227
227
|
function(t) {
|
|
228
228
|
return Buffer.from(t);
|
|
229
229
|
}
|
|
230
|
-
) :
|
|
230
|
+
) : As ? (
|
|
231
231
|
/**
|
|
232
232
|
* copy Buffer
|
|
233
233
|
*
|
|
@@ -318,7 +318,7 @@ function oi(t) {
|
|
|
318
318
|
function ci(t) {
|
|
319
319
|
return new String(t);
|
|
320
320
|
}
|
|
321
|
-
function
|
|
321
|
+
function Ce(t, e) {
|
|
322
322
|
return Rn[e].from ? Rn[e].from(t) : new Rn[e](t);
|
|
323
323
|
}
|
|
324
324
|
function ee(t) {
|
|
@@ -348,15 +348,15 @@ const fi = /* @__PURE__ */ new Map([
|
|
|
348
348
|
["String", ci],
|
|
349
349
|
// typed arrays
|
|
350
350
|
// TODO: pass bound function
|
|
351
|
-
["Float32Array",
|
|
352
|
-
["Float64Array",
|
|
353
|
-
["Int16Array",
|
|
354
|
-
["Int32Array",
|
|
355
|
-
["Int8Array",
|
|
356
|
-
["Uint16Array",
|
|
357
|
-
["Uint32Array",
|
|
358
|
-
["Uint8Array",
|
|
359
|
-
["Uint8ClampedArray",
|
|
351
|
+
["Float32Array", Ce],
|
|
352
|
+
["Float64Array", Ce],
|
|
353
|
+
["Int16Array", Ce],
|
|
354
|
+
["Int32Array", Ce],
|
|
355
|
+
["Int8Array", Ce],
|
|
356
|
+
["Uint16Array", Ce],
|
|
357
|
+
["Uint32Array", Ce],
|
|
358
|
+
["Uint8Array", Ce],
|
|
359
|
+
["Uint8ClampedArray", Ce],
|
|
360
360
|
// shallow copy
|
|
361
361
|
["Array Iterator", ee],
|
|
362
362
|
["Map Iterator", ee],
|
|
@@ -460,7 +460,7 @@ function Gn(t, e, n, s, r) {
|
|
|
460
460
|
return e;
|
|
461
461
|
}
|
|
462
462
|
const pi = (t) => new Promise((e) => setTimeout(e, t));
|
|
463
|
-
var an, He, on, Jn,
|
|
463
|
+
var an, He, on, Jn, Cr;
|
|
464
464
|
class mi {
|
|
465
465
|
constructor({ maxAttempts: e = 3, func: n }) {
|
|
466
466
|
le(this, Jn), le(this, an), le(this, He), le(this, on), X(this, an, e), X(this, on, n), X(this, He, 0);
|
|
@@ -472,13 +472,13 @@ class mi {
|
|
|
472
472
|
} catch (e) {
|
|
473
473
|
if (X(this, He, j(this, He) + 1), j(this, He) > j(this, an))
|
|
474
474
|
throw console.error("Max attempts reached"), e;
|
|
475
|
-
const n = be(this, Jn,
|
|
475
|
+
const n = be(this, Jn, Cr).call(this);
|
|
476
476
|
return yield pi(n), yield this.run();
|
|
477
477
|
}
|
|
478
478
|
});
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
|
-
an = /* @__PURE__ */ new WeakMap(), He = /* @__PURE__ */ new WeakMap(), on = /* @__PURE__ */ new WeakMap(), Jn = /* @__PURE__ */ new WeakSet(),
|
|
481
|
+
an = /* @__PURE__ */ new WeakMap(), He = /* @__PURE__ */ new WeakMap(), on = /* @__PURE__ */ new WeakMap(), Jn = /* @__PURE__ */ new WeakSet(), Cr = function() {
|
|
482
482
|
return j(this, He) * 1e3 * 1.5;
|
|
483
483
|
};
|
|
484
484
|
function yi() {
|
|
@@ -544,7 +544,7 @@ class nr extends Error {
|
|
|
544
544
|
}
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
|
-
class
|
|
547
|
+
class Et extends Error {
|
|
548
548
|
constructor(e = {}) {
|
|
549
549
|
const { canceled: n = !1 } = e;
|
|
550
550
|
super("Abort Error"), this.name = "Abort Error", this.canceled = n;
|
|
@@ -560,7 +560,7 @@ class Pn extends Error {
|
|
|
560
560
|
super(e), this.name = "Request Validation Error";
|
|
561
561
|
}
|
|
562
562
|
}
|
|
563
|
-
function
|
|
563
|
+
function Ar() {
|
|
564
564
|
return Array.from(
|
|
565
565
|
{ length: 32 },
|
|
566
566
|
() => Math.floor(Math.random() * 256).toString(16).padStart(2, "0")
|
|
@@ -570,8 +570,8 @@ function Xn() {
|
|
|
570
570
|
return Math.floor(Date.now() / 1e3).toString();
|
|
571
571
|
}
|
|
572
572
|
const wi = 5 * 60 * 1e3, ki = 1 * 1e3;
|
|
573
|
-
var Ge, se, ve, Yn, Qn,
|
|
574
|
-
class
|
|
573
|
+
var Ge, se, ve, Yn, Qn, xt;
|
|
574
|
+
class Ei {
|
|
575
575
|
constructor({ fetch: e = globalThis.fetch.bind(globalThis), baseAddress: n }) {
|
|
576
576
|
le(this, ve), le(this, Ge), le(this, se), this.baseAddress = n, X(this, Ge, e), X(this, se, {}), this.plugins = [];
|
|
577
577
|
}
|
|
@@ -592,31 +592,31 @@ class xi {
|
|
|
592
592
|
const { overrideBaseAddress: r, overrideDefaultHeaders: a } = s, i = r != null ? r : this.baseAddress;
|
|
593
593
|
let o = a != null ? a : this.headers;
|
|
594
594
|
const c = kt(j(this, se));
|
|
595
|
-
return X(this, se, {}), c.extraHeaders && (o = ie(ie({}, o), c.extraHeaders)), c.requestValidation && (o = Ts(ie({}, o), { "X-Request-Nonce":
|
|
595
|
+
return X(this, se, {}), c.extraHeaders && (o = ie(ie({}, o), c.extraHeaders)), c.requestValidation && (o = Ts(ie({}, o), { "X-Request-Nonce": Ar(), "X-Request-Timestamp": Xn() })), c.async ? yield be(this, ve, Qn).call(this, `${i}${n}`, c.async, { headers: o }) : yield be(this, ve, Yn).call(this, `${i}${n}`, c, { headers: o });
|
|
596
596
|
});
|
|
597
597
|
}
|
|
598
598
|
post(e, n) {
|
|
599
599
|
return B(this, arguments, function* (s, r, a = {}) {
|
|
600
600
|
const i = kt(j(this, se));
|
|
601
|
-
return X(this, se, {}), be(this, ve,
|
|
601
|
+
return X(this, se, {}), be(this, ve, xt).call(this, s, "POST", r, a, i);
|
|
602
602
|
});
|
|
603
603
|
}
|
|
604
604
|
put(e, n) {
|
|
605
605
|
return B(this, arguments, function* (s, r, a = {}) {
|
|
606
606
|
const i = kt(j(this, se));
|
|
607
|
-
return X(this, se, {}), be(this, ve,
|
|
607
|
+
return X(this, se, {}), be(this, ve, xt).call(this, s, "PUT", r, a, i);
|
|
608
608
|
});
|
|
609
609
|
}
|
|
610
610
|
delete(e, n) {
|
|
611
611
|
return B(this, arguments, function* (s, r, a = {}) {
|
|
612
612
|
const i = kt(j(this, se));
|
|
613
|
-
return X(this, se, {}), be(this, ve,
|
|
613
|
+
return X(this, se, {}), be(this, ve, xt).call(this, s, "DELETE", r, a, i);
|
|
614
614
|
});
|
|
615
615
|
}
|
|
616
616
|
patch(e, n) {
|
|
617
617
|
return B(this, arguments, function* (s, r, a = {}) {
|
|
618
618
|
const i = kt(j(this, se));
|
|
619
|
-
return X(this, se, {}), be(this, ve,
|
|
619
|
+
return X(this, se, {}), be(this, ve, xt).call(this, s, "PATCH", r, a, i);
|
|
620
620
|
});
|
|
621
621
|
}
|
|
622
622
|
}
|
|
@@ -627,7 +627,7 @@ Ge = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(), ve = /*
|
|
|
627
627
|
try {
|
|
628
628
|
return yield j(this, Ge).call(this, t, ie(ie({}, n), e.abortSignal && { signal: e.abortSignal }));
|
|
629
629
|
} catch (h) {
|
|
630
|
-
throw h instanceof Error && h.name === "AbortError" ? new
|
|
630
|
+
throw h instanceof Error && h.name === "AbortError" ? new Et({ canceled: (u = (c = e.abortSignal) == null ? void 0 : c.aborted) != null ? u : !1 }) : h;
|
|
631
631
|
}
|
|
632
632
|
}), { headers: r } = n != null ? n : {}, a = (c, u) => {
|
|
633
633
|
var h, p;
|
|
@@ -687,7 +687,7 @@ Ge = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(), ve = /*
|
|
|
687
687
|
try {
|
|
688
688
|
p = yield j(this, Ge).call(this, u, ie(ie({}, n), i && { signal: i }));
|
|
689
689
|
} catch (b) {
|
|
690
|
-
throw b instanceof Error && b.name === "AbortError" ? new
|
|
690
|
+
throw b instanceof Error && b.name === "AbortError" ? new Et({ canceled: (s = i == null ? void 0 : i.aborted) != null ? s : !1 }) : b;
|
|
691
691
|
}
|
|
692
692
|
if (!p.ok) {
|
|
693
693
|
const b = yield p.text().catch();
|
|
@@ -706,40 +706,40 @@ Ge = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(), ve = /*
|
|
|
706
706
|
return new Promise((b, m) => B(this, null, function* () {
|
|
707
707
|
const _ = setTimeout(() => {
|
|
708
708
|
m(new Error("Job timed out"));
|
|
709
|
-
}, c), l = (
|
|
709
|
+
}, c), l = (A = 0) => B(this, null, function* () {
|
|
710
710
|
if (i != null && i.aborted) {
|
|
711
711
|
clearTimeout(_), j(this, Ge).call(this, `${h}/${g}/cancel`, { method: "POST", headers: this.headers }).then(() => {
|
|
712
|
-
m(new
|
|
713
|
-
}).catch((
|
|
714
|
-
m(new
|
|
712
|
+
m(new Et({ canceled: !0 }));
|
|
713
|
+
}).catch((I) => {
|
|
714
|
+
m(new Et({ canceled: !1 }));
|
|
715
715
|
});
|
|
716
716
|
return;
|
|
717
717
|
}
|
|
718
718
|
try {
|
|
719
|
-
const
|
|
720
|
-
if (
|
|
719
|
+
const I = yield (yield j(this, Ge).call(this, `${h}/${g}`, { headers: this.headers })).json();
|
|
720
|
+
if (I.status === "success") {
|
|
721
721
|
clearTimeout(_);
|
|
722
|
-
const K =
|
|
722
|
+
const K = I.response_json;
|
|
723
723
|
b(K);
|
|
724
|
-
} else if (
|
|
725
|
-
clearTimeout(_), m(new bi(
|
|
724
|
+
} else if (I.status === "failed")
|
|
725
|
+
clearTimeout(_), m(new bi(I.response_json));
|
|
726
726
|
else {
|
|
727
|
-
a && a(
|
|
728
|
-
const K = o(
|
|
729
|
-
setTimeout(() => l(
|
|
727
|
+
a && a(I.response_json);
|
|
728
|
+
const K = o(A);
|
|
729
|
+
setTimeout(() => l(A + 1), K);
|
|
730
730
|
}
|
|
731
|
-
} catch (
|
|
732
|
-
m(
|
|
731
|
+
} catch (I) {
|
|
732
|
+
m(I);
|
|
733
733
|
}
|
|
734
734
|
});
|
|
735
735
|
l();
|
|
736
736
|
}));
|
|
737
737
|
});
|
|
738
|
-
},
|
|
738
|
+
}, xt = function(t, e, n, s, r) {
|
|
739
739
|
return B(this, null, function* () {
|
|
740
740
|
const { overrideBaseAddress: a, overrideDefaultHeaders: i } = s, o = a != null ? a : this.baseAddress;
|
|
741
741
|
let c = i != null ? i : this.headers;
|
|
742
|
-
r.extraHeaders && (c = ie(ie({}, c), r.extraHeaders)), r.requestValidation && (c = Ts(ie({}, c), { "X-Request-Nonce":
|
|
742
|
+
r.extraHeaders && (c = ie(ie({}, c), r.extraHeaders)), r.requestValidation && (c = Ts(ie({}, c), { "X-Request-Nonce": Ar(), "X-Request-Timestamp": Xn() }));
|
|
743
743
|
let u = n;
|
|
744
744
|
return typeof FormData != "undefined" && n instanceof FormData ? delete c["Content-Type"] : (u = s.skipBodyJsonStringify ? n : JSON.stringify(n), r.compress && yi() && (c["Content-Encoding"] = "gzip", u = yield gi(u))), r.async ? yield be(this, ve, Qn).call(this, `${o}${t}`, r.async, {
|
|
745
745
|
method: e,
|
|
@@ -748,7 +748,7 @@ Ge = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(), ve = /*
|
|
|
748
748
|
}) : yield be(this, ve, Yn).call(this, `${o}${t}`, r, { method: e, headers: c, body: u });
|
|
749
749
|
});
|
|
750
750
|
};
|
|
751
|
-
const sr = (t, e, n, s) => t instanceof
|
|
751
|
+
const sr = (t, e, n, s) => t instanceof Et ? t : new _i({ resource: e, api: String(n), args: s, cause: t }), In = (t, e) => new Proxy(e, {
|
|
752
752
|
get(n, s) {
|
|
753
753
|
return (...r) => {
|
|
754
754
|
var a;
|
|
@@ -770,7 +770,7 @@ const sr = (t, e, n, s) => t instanceof xt ? t : new _i({ resource: e, api: Stri
|
|
|
770
770
|
}
|
|
771
771
|
});
|
|
772
772
|
var St;
|
|
773
|
-
class
|
|
773
|
+
class xi {
|
|
774
774
|
constructor(e) {
|
|
775
775
|
le(this, St), this.resourceName = "Files", X(this, St, e);
|
|
776
776
|
}
|
|
@@ -835,7 +835,7 @@ _e = /* @__PURE__ */ new WeakMap(), es = /* @__PURE__ */ new WeakSet(), Nr = fun
|
|
|
835
835
|
});
|
|
836
836
|
};
|
|
837
837
|
var cn;
|
|
838
|
-
class
|
|
838
|
+
class Ci {
|
|
839
839
|
constructor(e) {
|
|
840
840
|
le(this, cn), this.resourceName = "Nodes", X(this, cn, e);
|
|
841
841
|
}
|
|
@@ -852,7 +852,7 @@ class Ai {
|
|
|
852
852
|
}
|
|
853
853
|
cn = /* @__PURE__ */ new WeakMap();
|
|
854
854
|
var je;
|
|
855
|
-
class
|
|
855
|
+
class Ai extends Ei {
|
|
856
856
|
constructor({
|
|
857
857
|
baseAddress: e = "https://api.figma.com/",
|
|
858
858
|
fetch: n = globalThis.fetch.bind(globalThis)
|
|
@@ -862,7 +862,7 @@ class Ci extends xi {
|
|
|
862
862
|
entries: /* @__PURE__ */ new Map(),
|
|
863
863
|
pendingRequests: /* @__PURE__ */ new Map()
|
|
864
864
|
}
|
|
865
|
-
}, this.files = In(this, new
|
|
865
|
+
}, this.files = In(this, new xi(this)), this.nodes = In(this, new Ci(this)), this.images = In(this, new Ti(this));
|
|
866
866
|
}
|
|
867
867
|
set token(e) {
|
|
868
868
|
if (!e.startsWith("figd_") && !e.startsWith("figu_"))
|
|
@@ -880,10 +880,10 @@ class Ci extends xi {
|
|
|
880
880
|
}
|
|
881
881
|
}
|
|
882
882
|
je = /* @__PURE__ */ new WeakMap();
|
|
883
|
-
const Ni = (t) =>
|
|
883
|
+
const Ni = (t) => Ee(void 0, [t], function* ({
|
|
884
884
|
fileKey: e,
|
|
885
885
|
authToken: n,
|
|
886
|
-
figmaRestApi: s = new
|
|
886
|
+
figmaRestApi: s = new Ai(),
|
|
887
887
|
params: r = {},
|
|
888
888
|
signal: a
|
|
889
889
|
}) {
|
|
@@ -1123,11 +1123,11 @@ function ln() {
|
|
|
1123
1123
|
return Rr;
|
|
1124
1124
|
}
|
|
1125
1125
|
const fn = (t) => {
|
|
1126
|
-
const { data: e, path: n, errorMaps: s, issueData: r } = t, a = [...n, ...r.path || []], i =
|
|
1126
|
+
const { data: e, path: n, errorMaps: s, issueData: r } = t, a = [...n, ...r.path || []], i = x(d({}, r), {
|
|
1127
1127
|
path: a
|
|
1128
1128
|
});
|
|
1129
1129
|
if (r.message !== void 0)
|
|
1130
|
-
return
|
|
1130
|
+
return x(d({}, r), {
|
|
1131
1131
|
path: a,
|
|
1132
1132
|
message: r.message
|
|
1133
1133
|
});
|
|
@@ -1135,7 +1135,7 @@ const fn = (t) => {
|
|
|
1135
1135
|
const c = s.filter((u) => !!u).slice().reverse();
|
|
1136
1136
|
for (const u of c)
|
|
1137
1137
|
o = u(i, { data: e, defaultError: o }).message;
|
|
1138
|
-
return
|
|
1138
|
+
return x(d({}, r), {
|
|
1139
1139
|
path: a,
|
|
1140
1140
|
message: o
|
|
1141
1141
|
});
|
|
@@ -1178,7 +1178,7 @@ class Y {
|
|
|
1178
1178
|
return { status: e.value, value: s };
|
|
1179
1179
|
}
|
|
1180
1180
|
static mergeObjectAsync(e, n) {
|
|
1181
|
-
return
|
|
1181
|
+
return Ee(this, null, function* () {
|
|
1182
1182
|
const s = [];
|
|
1183
1183
|
for (const r of n) {
|
|
1184
1184
|
const a = yield r.key, i = yield r.value;
|
|
@@ -1217,7 +1217,7 @@ var w;
|
|
|
1217
1217
|
t.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, t.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
|
|
1218
1218
|
})(w || (w = {}));
|
|
1219
1219
|
var Ot, Tt;
|
|
1220
|
-
class
|
|
1220
|
+
class xe {
|
|
1221
1221
|
constructor(e, n, s, r) {
|
|
1222
1222
|
this._cachedPath = [], this.parent = e, this.data = n, this._path = s, this._key = r;
|
|
1223
1223
|
}
|
|
@@ -1348,7 +1348,7 @@ class T {
|
|
|
1348
1348
|
});
|
|
1349
1349
|
}
|
|
1350
1350
|
parseAsync(e, n) {
|
|
1351
|
-
return
|
|
1351
|
+
return Ee(this, null, function* () {
|
|
1352
1352
|
const s = yield this.safeParseAsync(e, n);
|
|
1353
1353
|
if (s.success)
|
|
1354
1354
|
return s.data;
|
|
@@ -1356,7 +1356,7 @@ class T {
|
|
|
1356
1356
|
});
|
|
1357
1357
|
}
|
|
1358
1358
|
safeParseAsync(e, n) {
|
|
1359
|
-
return
|
|
1359
|
+
return Ee(this, null, function* () {
|
|
1360
1360
|
const s = {
|
|
1361
1361
|
common: {
|
|
1362
1362
|
issues: [],
|
|
@@ -1387,7 +1387,7 @@ class T {
|
|
|
1387
1387
|
_refinement(e) {
|
|
1388
1388
|
return new ge({
|
|
1389
1389
|
schema: this,
|
|
1390
|
-
typeName:
|
|
1390
|
+
typeName: E.ZodEffects,
|
|
1391
1391
|
effect: { type: "refinement", refinement: e }
|
|
1392
1392
|
});
|
|
1393
1393
|
}
|
|
@@ -1423,37 +1423,37 @@ class T {
|
|
|
1423
1423
|
return Mt.create(this, e, this._def);
|
|
1424
1424
|
}
|
|
1425
1425
|
transform(e) {
|
|
1426
|
-
return new ge(
|
|
1426
|
+
return new ge(x(d({}, O(this._def)), {
|
|
1427
1427
|
schema: this,
|
|
1428
|
-
typeName:
|
|
1428
|
+
typeName: E.ZodEffects,
|
|
1429
1429
|
effect: { type: "transform", transform: e }
|
|
1430
1430
|
}));
|
|
1431
1431
|
}
|
|
1432
1432
|
default(e) {
|
|
1433
1433
|
const n = typeof e == "function" ? e : () => e;
|
|
1434
|
-
return new Ut(
|
|
1434
|
+
return new Ut(x(d({}, O(this._def)), {
|
|
1435
1435
|
innerType: this,
|
|
1436
1436
|
defaultValue: n,
|
|
1437
|
-
typeName:
|
|
1437
|
+
typeName: E.ZodDefault
|
|
1438
1438
|
}));
|
|
1439
1439
|
}
|
|
1440
1440
|
brand() {
|
|
1441
1441
|
return new Ns(d({
|
|
1442
|
-
typeName:
|
|
1442
|
+
typeName: E.ZodBranded,
|
|
1443
1443
|
type: this
|
|
1444
1444
|
}, O(this._def)));
|
|
1445
1445
|
}
|
|
1446
1446
|
catch(e) {
|
|
1447
1447
|
const n = typeof e == "function" ? e : () => e;
|
|
1448
|
-
return new Vt(
|
|
1448
|
+
return new Vt(x(d({}, O(this._def)), {
|
|
1449
1449
|
innerType: this,
|
|
1450
1450
|
catchValue: n,
|
|
1451
|
-
typeName:
|
|
1451
|
+
typeName: E.ZodCatch
|
|
1452
1452
|
}));
|
|
1453
1453
|
}
|
|
1454
1454
|
describe(e) {
|
|
1455
1455
|
const n = this.constructor;
|
|
1456
|
-
return new n(
|
|
1456
|
+
return new n(x(d({}, this._def), {
|
|
1457
1457
|
description: e
|
|
1458
1458
|
}));
|
|
1459
1459
|
}
|
|
@@ -1663,7 +1663,7 @@ class me extends T {
|
|
|
1663
1663
|
}, w.errToObj(s)));
|
|
1664
1664
|
}
|
|
1665
1665
|
_addCheck(e) {
|
|
1666
|
-
return new me(
|
|
1666
|
+
return new me(x(d({}, this._def), {
|
|
1667
1667
|
checks: [...this._def.checks, e]
|
|
1668
1668
|
}));
|
|
1669
1669
|
}
|
|
@@ -1789,17 +1789,17 @@ class me extends T {
|
|
|
1789
1789
|
return this.min(1, w.errToObj(e));
|
|
1790
1790
|
}
|
|
1791
1791
|
trim() {
|
|
1792
|
-
return new me(
|
|
1792
|
+
return new me(x(d({}, this._def), {
|
|
1793
1793
|
checks: [...this._def.checks, { kind: "trim" }]
|
|
1794
1794
|
}));
|
|
1795
1795
|
}
|
|
1796
1796
|
toLowerCase() {
|
|
1797
|
-
return new me(
|
|
1797
|
+
return new me(x(d({}, this._def), {
|
|
1798
1798
|
checks: [...this._def.checks, { kind: "toLowerCase" }]
|
|
1799
1799
|
}));
|
|
1800
1800
|
}
|
|
1801
1801
|
toUpperCase() {
|
|
1802
|
-
return new me(
|
|
1802
|
+
return new me(x(d({}, this._def), {
|
|
1803
1803
|
checks: [...this._def.checks, { kind: "toUpperCase" }]
|
|
1804
1804
|
}));
|
|
1805
1805
|
}
|
|
@@ -1868,7 +1868,7 @@ me.create = (t) => {
|
|
|
1868
1868
|
var e;
|
|
1869
1869
|
return new me(d({
|
|
1870
1870
|
checks: [],
|
|
1871
|
-
typeName:
|
|
1871
|
+
typeName: E.ZodString,
|
|
1872
1872
|
coerce: (e = t == null ? void 0 : t.coerce) !== null && e !== void 0 ? e : !1
|
|
1873
1873
|
}, O(t)));
|
|
1874
1874
|
};
|
|
@@ -1934,7 +1934,7 @@ class Le extends T {
|
|
|
1934
1934
|
return this.setLimit("max", e, !1, w.toString(n));
|
|
1935
1935
|
}
|
|
1936
1936
|
setLimit(e, n, s, r) {
|
|
1937
|
-
return new Le(
|
|
1937
|
+
return new Le(x(d({}, this._def), {
|
|
1938
1938
|
checks: [
|
|
1939
1939
|
...this._def.checks,
|
|
1940
1940
|
{
|
|
@@ -1947,7 +1947,7 @@ class Le extends T {
|
|
|
1947
1947
|
}));
|
|
1948
1948
|
}
|
|
1949
1949
|
_addCheck(e) {
|
|
1950
|
-
return new Le(
|
|
1950
|
+
return new Le(x(d({}, this._def), {
|
|
1951
1951
|
checks: [...this._def.checks, e]
|
|
1952
1952
|
}));
|
|
1953
1953
|
}
|
|
@@ -2042,7 +2042,7 @@ class Le extends T {
|
|
|
2042
2042
|
}
|
|
2043
2043
|
Le.create = (t) => new Le(d({
|
|
2044
2044
|
checks: [],
|
|
2045
|
-
typeName:
|
|
2045
|
+
typeName: E.ZodNumber,
|
|
2046
2046
|
coerce: (t == null ? void 0 : t.coerce) || !1
|
|
2047
2047
|
}, O(t)));
|
|
2048
2048
|
class $e extends T {
|
|
@@ -2101,7 +2101,7 @@ class $e extends T {
|
|
|
2101
2101
|
return this.setLimit("max", e, !1, w.toString(n));
|
|
2102
2102
|
}
|
|
2103
2103
|
setLimit(e, n, s, r) {
|
|
2104
|
-
return new $e(
|
|
2104
|
+
return new $e(x(d({}, this._def), {
|
|
2105
2105
|
checks: [
|
|
2106
2106
|
...this._def.checks,
|
|
2107
2107
|
{
|
|
@@ -2114,7 +2114,7 @@ class $e extends T {
|
|
|
2114
2114
|
}));
|
|
2115
2115
|
}
|
|
2116
2116
|
_addCheck(e) {
|
|
2117
|
-
return new $e(
|
|
2117
|
+
return new $e(x(d({}, this._def), {
|
|
2118
2118
|
checks: [...this._def.checks, e]
|
|
2119
2119
|
}));
|
|
2120
2120
|
}
|
|
@@ -2174,7 +2174,7 @@ $e.create = (t) => {
|
|
|
2174
2174
|
var e;
|
|
2175
2175
|
return new $e(d({
|
|
2176
2176
|
checks: [],
|
|
2177
|
-
typeName:
|
|
2177
|
+
typeName: E.ZodBigInt,
|
|
2178
2178
|
coerce: (e = t == null ? void 0 : t.coerce) !== null && e !== void 0 ? e : !1
|
|
2179
2179
|
}, O(t)));
|
|
2180
2180
|
};
|
|
@@ -2192,7 +2192,7 @@ class It extends T {
|
|
|
2192
2192
|
}
|
|
2193
2193
|
}
|
|
2194
2194
|
It.create = (t) => new It(d({
|
|
2195
|
-
typeName:
|
|
2195
|
+
typeName: E.ZodBoolean,
|
|
2196
2196
|
coerce: (t == null ? void 0 : t.coerce) || !1
|
|
2197
2197
|
}, O(t)));
|
|
2198
2198
|
class Qe extends T {
|
|
@@ -2235,7 +2235,7 @@ class Qe extends T {
|
|
|
2235
2235
|
};
|
|
2236
2236
|
}
|
|
2237
2237
|
_addCheck(e) {
|
|
2238
|
-
return new Qe(
|
|
2238
|
+
return new Qe(x(d({}, this._def), {
|
|
2239
2239
|
checks: [...this._def.checks, e]
|
|
2240
2240
|
}));
|
|
2241
2241
|
}
|
|
@@ -2269,7 +2269,7 @@ class Qe extends T {
|
|
|
2269
2269
|
Qe.create = (t) => new Qe(d({
|
|
2270
2270
|
checks: [],
|
|
2271
2271
|
coerce: (t == null ? void 0 : t.coerce) || !1,
|
|
2272
|
-
typeName:
|
|
2272
|
+
typeName: E.ZodDate
|
|
2273
2273
|
}, O(t)));
|
|
2274
2274
|
class mn extends T {
|
|
2275
2275
|
_parse(e) {
|
|
@@ -2285,7 +2285,7 @@ class mn extends T {
|
|
|
2285
2285
|
}
|
|
2286
2286
|
}
|
|
2287
2287
|
mn.create = (t) => new mn(d({
|
|
2288
|
-
typeName:
|
|
2288
|
+
typeName: E.ZodSymbol
|
|
2289
2289
|
}, O(t)));
|
|
2290
2290
|
class jt extends T {
|
|
2291
2291
|
_parse(e) {
|
|
@@ -2301,7 +2301,7 @@ class jt extends T {
|
|
|
2301
2301
|
}
|
|
2302
2302
|
}
|
|
2303
2303
|
jt.create = (t) => new jt(d({
|
|
2304
|
-
typeName:
|
|
2304
|
+
typeName: E.ZodUndefined
|
|
2305
2305
|
}, O(t)));
|
|
2306
2306
|
class Zt extends T {
|
|
2307
2307
|
_parse(e) {
|
|
@@ -2317,7 +2317,7 @@ class Zt extends T {
|
|
|
2317
2317
|
}
|
|
2318
2318
|
}
|
|
2319
2319
|
Zt.create = (t) => new Zt(d({
|
|
2320
|
-
typeName:
|
|
2320
|
+
typeName: E.ZodNull
|
|
2321
2321
|
}, O(t)));
|
|
2322
2322
|
class gt extends T {
|
|
2323
2323
|
constructor() {
|
|
@@ -2328,7 +2328,7 @@ class gt extends T {
|
|
|
2328
2328
|
}
|
|
2329
2329
|
}
|
|
2330
2330
|
gt.create = (t) => new gt(d({
|
|
2331
|
-
typeName:
|
|
2331
|
+
typeName: E.ZodAny
|
|
2332
2332
|
}, O(t)));
|
|
2333
2333
|
class Xe extends T {
|
|
2334
2334
|
constructor() {
|
|
@@ -2339,7 +2339,7 @@ class Xe extends T {
|
|
|
2339
2339
|
}
|
|
2340
2340
|
}
|
|
2341
2341
|
Xe.create = (t) => new Xe(d({
|
|
2342
|
-
typeName:
|
|
2342
|
+
typeName: E.ZodUnknown
|
|
2343
2343
|
}, O(t)));
|
|
2344
2344
|
class Pe extends T {
|
|
2345
2345
|
_parse(e) {
|
|
@@ -2352,7 +2352,7 @@ class Pe extends T {
|
|
|
2352
2352
|
}
|
|
2353
2353
|
}
|
|
2354
2354
|
Pe.create = (t) => new Pe(d({
|
|
2355
|
-
typeName:
|
|
2355
|
+
typeName: E.ZodNever
|
|
2356
2356
|
}, O(t)));
|
|
2357
2357
|
class yn extends T {
|
|
2358
2358
|
_parse(e) {
|
|
@@ -2368,7 +2368,7 @@ class yn extends T {
|
|
|
2368
2368
|
}
|
|
2369
2369
|
}
|
|
2370
2370
|
yn.create = (t) => new yn(d({
|
|
2371
|
-
typeName:
|
|
2371
|
+
typeName: E.ZodVoid
|
|
2372
2372
|
}, O(t)));
|
|
2373
2373
|
class ye extends T {
|
|
2374
2374
|
_parse(e) {
|
|
@@ -2406,25 +2406,25 @@ class ye extends T {
|
|
|
2406
2406
|
exact: !1,
|
|
2407
2407
|
message: r.maxLength.message
|
|
2408
2408
|
}), s.dirty()), n.common.async)
|
|
2409
|
-
return Promise.all([...n.data].map((i, o) => r.type._parseAsync(new
|
|
2410
|
-
const a = [...n.data].map((i, o) => r.type._parseSync(new
|
|
2409
|
+
return Promise.all([...n.data].map((i, o) => r.type._parseAsync(new xe(n, i, n.path, o)))).then((i) => Y.mergeArray(s, i));
|
|
2410
|
+
const a = [...n.data].map((i, o) => r.type._parseSync(new xe(n, i, n.path, o)));
|
|
2411
2411
|
return Y.mergeArray(s, a);
|
|
2412
2412
|
}
|
|
2413
2413
|
get element() {
|
|
2414
2414
|
return this._def.type;
|
|
2415
2415
|
}
|
|
2416
2416
|
min(e, n) {
|
|
2417
|
-
return new ye(
|
|
2417
|
+
return new ye(x(d({}, this._def), {
|
|
2418
2418
|
minLength: { value: e, message: w.toString(n) }
|
|
2419
2419
|
}));
|
|
2420
2420
|
}
|
|
2421
2421
|
max(e, n) {
|
|
2422
|
-
return new ye(
|
|
2422
|
+
return new ye(x(d({}, this._def), {
|
|
2423
2423
|
maxLength: { value: e, message: w.toString(n) }
|
|
2424
2424
|
}));
|
|
2425
2425
|
}
|
|
2426
2426
|
length(e, n) {
|
|
2427
|
-
return new ye(
|
|
2427
|
+
return new ye(x(d({}, this._def), {
|
|
2428
2428
|
exactLength: { value: e, message: w.toString(n) }
|
|
2429
2429
|
}));
|
|
2430
2430
|
}
|
|
@@ -2437,7 +2437,7 @@ ye.create = (t, e) => new ye(d({
|
|
|
2437
2437
|
minLength: null,
|
|
2438
2438
|
maxLength: null,
|
|
2439
2439
|
exactLength: null,
|
|
2440
|
-
typeName:
|
|
2440
|
+
typeName: E.ZodArray
|
|
2441
2441
|
}, O(e)));
|
|
2442
2442
|
function ct(t) {
|
|
2443
2443
|
if (t instanceof U) {
|
|
@@ -2446,10 +2446,10 @@ function ct(t) {
|
|
|
2446
2446
|
const s = t.shape[n];
|
|
2447
2447
|
e[n] = ke.create(ct(s));
|
|
2448
2448
|
}
|
|
2449
|
-
return new U(
|
|
2449
|
+
return new U(x(d({}, t._def), {
|
|
2450
2450
|
shape: () => e
|
|
2451
2451
|
}));
|
|
2452
|
-
} else return t instanceof ye ? new ye(
|
|
2452
|
+
} else return t instanceof ye ? new ye(x(d({}, t._def), {
|
|
2453
2453
|
type: ct(t.element)
|
|
2454
2454
|
})) : t instanceof ke ? ke.create(ct(t.unwrap())) : t instanceof We ? We.create(ct(t.unwrap())) : t instanceof Se ? Se.create(t.items.map((e) => ct(e))) : t;
|
|
2455
2455
|
}
|
|
@@ -2481,7 +2481,7 @@ class U extends T {
|
|
|
2481
2481
|
const u = r[c], h = s.data[c];
|
|
2482
2482
|
o.push({
|
|
2483
2483
|
key: { status: "valid", value: c },
|
|
2484
|
-
value: u._parse(new
|
|
2484
|
+
value: u._parse(new xe(s, h, s.path, c)),
|
|
2485
2485
|
alwaysSet: c in s.data
|
|
2486
2486
|
});
|
|
2487
2487
|
}
|
|
@@ -2506,14 +2506,14 @@ class U extends T {
|
|
|
2506
2506
|
o.push({
|
|
2507
2507
|
key: { status: "valid", value: u },
|
|
2508
2508
|
value: c._parse(
|
|
2509
|
-
new
|
|
2509
|
+
new xe(s, h, s.path, u)
|
|
2510
2510
|
//, ctx.child(key), value, getParsedType(value)
|
|
2511
2511
|
),
|
|
2512
2512
|
alwaysSet: u in s.data
|
|
2513
2513
|
});
|
|
2514
2514
|
}
|
|
2515
2515
|
}
|
|
2516
|
-
return s.common.async ? Promise.resolve().then(() =>
|
|
2516
|
+
return s.common.async ? Promise.resolve().then(() => Ee(this, null, function* () {
|
|
2517
2517
|
const c = [];
|
|
2518
2518
|
for (const u of o) {
|
|
2519
2519
|
const h = yield u.key, p = yield u.value;
|
|
@@ -2530,7 +2530,7 @@ class U extends T {
|
|
|
2530
2530
|
return this._def.shape();
|
|
2531
2531
|
}
|
|
2532
2532
|
strict(e) {
|
|
2533
|
-
return w.errToObj, new U(d(
|
|
2533
|
+
return w.errToObj, new U(d(x(d({}, this._def), {
|
|
2534
2534
|
unknownKeys: "strict"
|
|
2535
2535
|
}), e !== void 0 ? {
|
|
2536
2536
|
errorMap: (n, s) => {
|
|
@@ -2545,12 +2545,12 @@ class U extends T {
|
|
|
2545
2545
|
} : {}));
|
|
2546
2546
|
}
|
|
2547
2547
|
strip() {
|
|
2548
|
-
return new U(
|
|
2548
|
+
return new U(x(d({}, this._def), {
|
|
2549
2549
|
unknownKeys: "strip"
|
|
2550
2550
|
}));
|
|
2551
2551
|
}
|
|
2552
2552
|
passthrough() {
|
|
2553
|
-
return new U(
|
|
2553
|
+
return new U(x(d({}, this._def), {
|
|
2554
2554
|
unknownKeys: "passthrough"
|
|
2555
2555
|
}));
|
|
2556
2556
|
}
|
|
@@ -2572,7 +2572,7 @@ class U extends T {
|
|
|
2572
2572
|
// }) as any;
|
|
2573
2573
|
// };
|
|
2574
2574
|
extend(e) {
|
|
2575
|
-
return new U(
|
|
2575
|
+
return new U(x(d({}, this._def), {
|
|
2576
2576
|
shape: () => d(d({}, this._def.shape()), e)
|
|
2577
2577
|
}));
|
|
2578
2578
|
}
|
|
@@ -2586,7 +2586,7 @@ class U extends T {
|
|
|
2586
2586
|
unknownKeys: e._def.unknownKeys,
|
|
2587
2587
|
catchall: e._def.catchall,
|
|
2588
2588
|
shape: () => d(d({}, this._def.shape()), e._def.shape()),
|
|
2589
|
-
typeName:
|
|
2589
|
+
typeName: E.ZodObject
|
|
2590
2590
|
});
|
|
2591
2591
|
}
|
|
2592
2592
|
// merge<
|
|
@@ -2649,7 +2649,7 @@ class U extends T {
|
|
|
2649
2649
|
// return merged;
|
|
2650
2650
|
// }
|
|
2651
2651
|
catchall(e) {
|
|
2652
|
-
return new U(
|
|
2652
|
+
return new U(x(d({}, this._def), {
|
|
2653
2653
|
catchall: e
|
|
2654
2654
|
}));
|
|
2655
2655
|
}
|
|
@@ -2657,7 +2657,7 @@ class U extends T {
|
|
|
2657
2657
|
const n = {};
|
|
2658
2658
|
return N.objectKeys(e).forEach((s) => {
|
|
2659
2659
|
e[s] && this.shape[s] && (n[s] = this.shape[s]);
|
|
2660
|
-
}), new U(
|
|
2660
|
+
}), new U(x(d({}, this._def), {
|
|
2661
2661
|
shape: () => n
|
|
2662
2662
|
}));
|
|
2663
2663
|
}
|
|
@@ -2665,7 +2665,7 @@ class U extends T {
|
|
|
2665
2665
|
const n = {};
|
|
2666
2666
|
return N.objectKeys(this.shape).forEach((s) => {
|
|
2667
2667
|
e[s] || (n[s] = this.shape[s]);
|
|
2668
|
-
}), new U(
|
|
2668
|
+
}), new U(x(d({}, this._def), {
|
|
2669
2669
|
shape: () => n
|
|
2670
2670
|
}));
|
|
2671
2671
|
}
|
|
@@ -2680,7 +2680,7 @@ class U extends T {
|
|
|
2680
2680
|
return N.objectKeys(this.shape).forEach((s) => {
|
|
2681
2681
|
const r = this.shape[s];
|
|
2682
2682
|
e && !e[s] ? n[s] = r : n[s] = r.optional();
|
|
2683
|
-
}), new U(
|
|
2683
|
+
}), new U(x(d({}, this._def), {
|
|
2684
2684
|
shape: () => n
|
|
2685
2685
|
}));
|
|
2686
2686
|
}
|
|
@@ -2695,7 +2695,7 @@ class U extends T {
|
|
|
2695
2695
|
r = r._def.innerType;
|
|
2696
2696
|
n[s] = r;
|
|
2697
2697
|
}
|
|
2698
|
-
}), new U(
|
|
2698
|
+
}), new U(x(d({}, this._def), {
|
|
2699
2699
|
shape: () => n
|
|
2700
2700
|
}));
|
|
2701
2701
|
}
|
|
@@ -2707,19 +2707,19 @@ U.create = (t, e) => new U(d({
|
|
|
2707
2707
|
shape: () => t,
|
|
2708
2708
|
unknownKeys: "strip",
|
|
2709
2709
|
catchall: Pe.create(),
|
|
2710
|
-
typeName:
|
|
2710
|
+
typeName: E.ZodObject
|
|
2711
2711
|
}, O(e)));
|
|
2712
2712
|
U.strictCreate = (t, e) => new U(d({
|
|
2713
2713
|
shape: () => t,
|
|
2714
2714
|
unknownKeys: "strict",
|
|
2715
2715
|
catchall: Pe.create(),
|
|
2716
|
-
typeName:
|
|
2716
|
+
typeName: E.ZodObject
|
|
2717
2717
|
}, O(e)));
|
|
2718
2718
|
U.lazycreate = (t, e) => new U(d({
|
|
2719
2719
|
shape: t,
|
|
2720
2720
|
unknownKeys: "strip",
|
|
2721
2721
|
catchall: Pe.create(),
|
|
2722
|
-
typeName:
|
|
2722
|
+
typeName: E.ZodObject
|
|
2723
2723
|
}, O(e)));
|
|
2724
2724
|
class Dt extends T {
|
|
2725
2725
|
_parse(e) {
|
|
@@ -2738,9 +2738,9 @@ class Dt extends T {
|
|
|
2738
2738
|
}), S;
|
|
2739
2739
|
}
|
|
2740
2740
|
if (n.common.async)
|
|
2741
|
-
return Promise.all(s.map((a) =>
|
|
2742
|
-
const i =
|
|
2743
|
-
common:
|
|
2741
|
+
return Promise.all(s.map((a) => Ee(this, null, function* () {
|
|
2742
|
+
const i = x(d({}, n), {
|
|
2743
|
+
common: x(d({}, n.common), {
|
|
2744
2744
|
issues: []
|
|
2745
2745
|
}),
|
|
2746
2746
|
parent: null
|
|
@@ -2758,8 +2758,8 @@ class Dt extends T {
|
|
|
2758
2758
|
let a;
|
|
2759
2759
|
const i = [];
|
|
2760
2760
|
for (const c of s) {
|
|
2761
|
-
const u =
|
|
2762
|
-
common:
|
|
2761
|
+
const u = x(d({}, n), {
|
|
2762
|
+
common: x(d({}, n.common), {
|
|
2763
2763
|
issues: []
|
|
2764
2764
|
}),
|
|
2765
2765
|
parent: null
|
|
@@ -2787,10 +2787,10 @@ class Dt extends T {
|
|
|
2787
2787
|
}
|
|
2788
2788
|
Dt.create = (t, e) => new Dt(d({
|
|
2789
2789
|
options: t,
|
|
2790
|
-
typeName:
|
|
2790
|
+
typeName: E.ZodUnion
|
|
2791
2791
|
}, O(e)));
|
|
2792
2792
|
const Ze = (t) => t instanceof $t ? Ze(t.schema) : t instanceof ge ? Ze(t.innerType()) : t instanceof Ft ? [t.value] : t instanceof Fe ? t.options : t instanceof Wt ? N.objectValues(t.enum) : t instanceof Ut ? Ze(t._def.innerType) : t instanceof jt ? [void 0] : t instanceof Zt ? [null] : t instanceof ke ? [void 0, ...Ze(t.unwrap())] : t instanceof We ? [null, ...Ze(t.unwrap())] : t instanceof Ns || t instanceof zt ? Ze(t.unwrap()) : t instanceof Vt ? Ze(t._def.innerType) : [];
|
|
2793
|
-
class
|
|
2793
|
+
class En extends T {
|
|
2794
2794
|
_parse(e) {
|
|
2795
2795
|
const { ctx: n } = this._processInputParams(e);
|
|
2796
2796
|
if (n.parsedType !== v.object)
|
|
@@ -2843,8 +2843,8 @@ class xn extends T {
|
|
|
2843
2843
|
r.set(o, a);
|
|
2844
2844
|
}
|
|
2845
2845
|
}
|
|
2846
|
-
return new
|
|
2847
|
-
typeName:
|
|
2846
|
+
return new En(d({
|
|
2847
|
+
typeName: E.ZodDiscriminatedUnion,
|
|
2848
2848
|
discriminator: e,
|
|
2849
2849
|
options: n,
|
|
2850
2850
|
optionsMap: r
|
|
@@ -2912,7 +2912,7 @@ class Mt extends T {
|
|
|
2912
2912
|
Mt.create = (t, e, n) => new Mt(d({
|
|
2913
2913
|
left: t,
|
|
2914
2914
|
right: e,
|
|
2915
|
-
typeName:
|
|
2915
|
+
typeName: E.ZodIntersection
|
|
2916
2916
|
}, O(n)));
|
|
2917
2917
|
class Se extends T {
|
|
2918
2918
|
_parse(e) {
|
|
@@ -2940,7 +2940,7 @@ class Se extends T {
|
|
|
2940
2940
|
}), n.dirty());
|
|
2941
2941
|
const r = [...s.data].map((a, i) => {
|
|
2942
2942
|
const o = this._def.items[i] || this._def.rest;
|
|
2943
|
-
return o ? o._parse(new
|
|
2943
|
+
return o ? o._parse(new xe(s, a, s.path, i)) : null;
|
|
2944
2944
|
}).filter((a) => !!a);
|
|
2945
2945
|
return s.common.async ? Promise.all(r).then((a) => Y.mergeArray(n, a)) : Y.mergeArray(n, r);
|
|
2946
2946
|
}
|
|
@@ -2948,7 +2948,7 @@ class Se extends T {
|
|
|
2948
2948
|
return this._def.items;
|
|
2949
2949
|
}
|
|
2950
2950
|
rest(e) {
|
|
2951
|
-
return new Se(
|
|
2951
|
+
return new Se(x(d({}, this._def), {
|
|
2952
2952
|
rest: e
|
|
2953
2953
|
}));
|
|
2954
2954
|
}
|
|
@@ -2958,7 +2958,7 @@ Se.create = (t, e) => {
|
|
|
2958
2958
|
throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
|
|
2959
2959
|
return new Se(d({
|
|
2960
2960
|
items: t,
|
|
2961
|
-
typeName:
|
|
2961
|
+
typeName: E.ZodTuple,
|
|
2962
2962
|
rest: null
|
|
2963
2963
|
}, O(e)));
|
|
2964
2964
|
};
|
|
@@ -2980,8 +2980,8 @@ class Lt extends T {
|
|
|
2980
2980
|
const r = [], a = this._def.keyType, i = this._def.valueType;
|
|
2981
2981
|
for (const o in s.data)
|
|
2982
2982
|
r.push({
|
|
2983
|
-
key: a._parse(new
|
|
2984
|
-
value: i._parse(new
|
|
2983
|
+
key: a._parse(new xe(s, o, s.path, o)),
|
|
2984
|
+
value: i._parse(new xe(s, s.data[o], s.path, o)),
|
|
2985
2985
|
alwaysSet: o in s.data
|
|
2986
2986
|
});
|
|
2987
2987
|
return s.common.async ? Y.mergeObjectAsync(n, r) : Y.mergeObjectSync(n, r);
|
|
@@ -2993,11 +2993,11 @@ class Lt extends T {
|
|
|
2993
2993
|
return n instanceof T ? new Lt(d({
|
|
2994
2994
|
keyType: e,
|
|
2995
2995
|
valueType: n,
|
|
2996
|
-
typeName:
|
|
2996
|
+
typeName: E.ZodRecord
|
|
2997
2997
|
}, O(s))) : new Lt(d({
|
|
2998
2998
|
keyType: me.create(),
|
|
2999
2999
|
valueType: e,
|
|
3000
|
-
typeName:
|
|
3000
|
+
typeName: E.ZodRecord
|
|
3001
3001
|
}, O(n)));
|
|
3002
3002
|
}
|
|
3003
3003
|
}
|
|
@@ -3017,12 +3017,12 @@ class gn extends T {
|
|
|
3017
3017
|
received: s.parsedType
|
|
3018
3018
|
}), S;
|
|
3019
3019
|
const r = this._def.keyType, a = this._def.valueType, i = [...s.data.entries()].map(([o, c], u) => ({
|
|
3020
|
-
key: r._parse(new
|
|
3021
|
-
value: a._parse(new
|
|
3020
|
+
key: r._parse(new xe(s, o, s.path, [u, "key"])),
|
|
3021
|
+
value: a._parse(new xe(s, c, s.path, [u, "value"]))
|
|
3022
3022
|
}));
|
|
3023
3023
|
if (s.common.async) {
|
|
3024
3024
|
const o = /* @__PURE__ */ new Map();
|
|
3025
|
-
return Promise.resolve().then(() =>
|
|
3025
|
+
return Promise.resolve().then(() => Ee(this, null, function* () {
|
|
3026
3026
|
for (const c of i) {
|
|
3027
3027
|
const u = yield c.key, h = yield c.value;
|
|
3028
3028
|
if (u.status === "aborted" || h.status === "aborted")
|
|
@@ -3046,7 +3046,7 @@ class gn extends T {
|
|
|
3046
3046
|
gn.create = (t, e, n) => new gn(d({
|
|
3047
3047
|
valueType: e,
|
|
3048
3048
|
keyType: t,
|
|
3049
|
-
typeName:
|
|
3049
|
+
typeName: E.ZodMap
|
|
3050
3050
|
}, O(n)));
|
|
3051
3051
|
class et extends T {
|
|
3052
3052
|
_parse(e) {
|
|
@@ -3083,16 +3083,16 @@ class et extends T {
|
|
|
3083
3083
|
}
|
|
3084
3084
|
return { status: n.value, value: u };
|
|
3085
3085
|
}
|
|
3086
|
-
const o = [...s.data.values()].map((c, u) => a._parse(new
|
|
3086
|
+
const o = [...s.data.values()].map((c, u) => a._parse(new xe(s, c, s.path, u)));
|
|
3087
3087
|
return s.common.async ? Promise.all(o).then((c) => i(c)) : i(o);
|
|
3088
3088
|
}
|
|
3089
3089
|
min(e, n) {
|
|
3090
|
-
return new et(
|
|
3090
|
+
return new et(x(d({}, this._def), {
|
|
3091
3091
|
minSize: { value: e, message: w.toString(n) }
|
|
3092
3092
|
}));
|
|
3093
3093
|
}
|
|
3094
3094
|
max(e, n) {
|
|
3095
|
-
return new et(
|
|
3095
|
+
return new et(x(d({}, this._def), {
|
|
3096
3096
|
maxSize: { value: e, message: w.toString(n) }
|
|
3097
3097
|
}));
|
|
3098
3098
|
}
|
|
@@ -3107,7 +3107,7 @@ et.create = (t, e) => new et(d({
|
|
|
3107
3107
|
valueType: t,
|
|
3108
3108
|
minSize: null,
|
|
3109
3109
|
maxSize: null,
|
|
3110
|
-
typeName:
|
|
3110
|
+
typeName: E.ZodSet
|
|
3111
3111
|
}, O(e)));
|
|
3112
3112
|
class ht extends T {
|
|
3113
3113
|
constructor() {
|
|
@@ -3157,7 +3157,7 @@ class ht extends T {
|
|
|
3157
3157
|
if (this._def.returns instanceof vt) {
|
|
3158
3158
|
const o = this;
|
|
3159
3159
|
return ne(function(...c) {
|
|
3160
|
-
return
|
|
3160
|
+
return Ee(this, null, function* () {
|
|
3161
3161
|
const u = new oe([]), h = yield o._def.args.parseAsync(c, a).catch((k) => {
|
|
3162
3162
|
throw u.addIssue(s(c, k)), u;
|
|
3163
3163
|
}), p = yield Reflect.apply(i, this, h);
|
|
@@ -3186,12 +3186,12 @@ class ht extends T {
|
|
|
3186
3186
|
return this._def.returns;
|
|
3187
3187
|
}
|
|
3188
3188
|
args(...e) {
|
|
3189
|
-
return new ht(
|
|
3189
|
+
return new ht(x(d({}, this._def), {
|
|
3190
3190
|
args: Se.create(e).rest(Xe.create())
|
|
3191
3191
|
}));
|
|
3192
3192
|
}
|
|
3193
3193
|
returns(e) {
|
|
3194
|
-
return new ht(
|
|
3194
|
+
return new ht(x(d({}, this._def), {
|
|
3195
3195
|
returns: e
|
|
3196
3196
|
}));
|
|
3197
3197
|
}
|
|
@@ -3205,7 +3205,7 @@ class ht extends T {
|
|
|
3205
3205
|
return new ht(d({
|
|
3206
3206
|
args: e || Se.create([]).rest(Xe.create()),
|
|
3207
3207
|
returns: n || Xe.create(),
|
|
3208
|
-
typeName:
|
|
3208
|
+
typeName: E.ZodFunction
|
|
3209
3209
|
}, O(s)));
|
|
3210
3210
|
}
|
|
3211
3211
|
}
|
|
@@ -3220,7 +3220,7 @@ class $t extends T {
|
|
|
3220
3220
|
}
|
|
3221
3221
|
$t.create = (t, e) => new $t(d({
|
|
3222
3222
|
getter: t,
|
|
3223
|
-
typeName:
|
|
3223
|
+
typeName: E.ZodLazy
|
|
3224
3224
|
}, O(e)));
|
|
3225
3225
|
class Ft extends T {
|
|
3226
3226
|
_parse(e) {
|
|
@@ -3240,12 +3240,12 @@ class Ft extends T {
|
|
|
3240
3240
|
}
|
|
3241
3241
|
Ft.create = (t, e) => new Ft(d({
|
|
3242
3242
|
value: t,
|
|
3243
|
-
typeName:
|
|
3243
|
+
typeName: E.ZodLiteral
|
|
3244
3244
|
}, O(e)));
|
|
3245
3245
|
function Dr(t, e) {
|
|
3246
3246
|
return new Fe(d({
|
|
3247
3247
|
values: t,
|
|
3248
|
-
typeName:
|
|
3248
|
+
typeName: E.ZodEnum
|
|
3249
3249
|
}, O(e)));
|
|
3250
3250
|
}
|
|
3251
3251
|
class Fe extends T {
|
|
@@ -3332,7 +3332,7 @@ class Wt extends T {
|
|
|
3332
3332
|
Tt = /* @__PURE__ */ new WeakMap();
|
|
3333
3333
|
Wt.create = (t, e) => new Wt(d({
|
|
3334
3334
|
values: t,
|
|
3335
|
-
typeName:
|
|
3335
|
+
typeName: E.ZodNativeEnum
|
|
3336
3336
|
}, O(e)));
|
|
3337
3337
|
class vt extends T {
|
|
3338
3338
|
unwrap() {
|
|
@@ -3355,14 +3355,14 @@ class vt extends T {
|
|
|
3355
3355
|
}
|
|
3356
3356
|
vt.create = (t, e) => new vt(d({
|
|
3357
3357
|
type: t,
|
|
3358
|
-
typeName:
|
|
3358
|
+
typeName: E.ZodPromise
|
|
3359
3359
|
}, O(e)));
|
|
3360
3360
|
class ge extends T {
|
|
3361
3361
|
innerType() {
|
|
3362
3362
|
return this._def.schema;
|
|
3363
3363
|
}
|
|
3364
3364
|
sourceType() {
|
|
3365
|
-
return this._def.schema._def.typeName ===
|
|
3365
|
+
return this._def.schema._def.typeName === E.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
|
|
3366
3366
|
}
|
|
3367
3367
|
_parse(e) {
|
|
3368
3368
|
const { status: n, ctx: s } = this._processInputParams(e), r = this._def.effect || null, a = {
|
|
@@ -3376,7 +3376,7 @@ class ge extends T {
|
|
|
3376
3376
|
if (a.addIssue = a.addIssue.bind(a), r.type === "preprocess") {
|
|
3377
3377
|
const i = r.transform(s.data, a);
|
|
3378
3378
|
if (s.common.async)
|
|
3379
|
-
return Promise.resolve(i).then((o) =>
|
|
3379
|
+
return Promise.resolve(i).then((o) => Ee(this, null, function* () {
|
|
3380
3380
|
if (n.value === "aborted")
|
|
3381
3381
|
return S;
|
|
3382
3382
|
const c = yield this._def.schema._parseAsync({
|
|
@@ -3436,13 +3436,13 @@ class ge extends T {
|
|
|
3436
3436
|
}
|
|
3437
3437
|
ge.create = (t, e, n) => new ge(d({
|
|
3438
3438
|
schema: t,
|
|
3439
|
-
typeName:
|
|
3439
|
+
typeName: E.ZodEffects,
|
|
3440
3440
|
effect: e
|
|
3441
3441
|
}, O(n)));
|
|
3442
3442
|
ge.createWithPreprocess = (t, e, n) => new ge(d({
|
|
3443
3443
|
schema: e,
|
|
3444
3444
|
effect: { type: "preprocess", transform: t },
|
|
3445
|
-
typeName:
|
|
3445
|
+
typeName: E.ZodEffects
|
|
3446
3446
|
}, O(n)));
|
|
3447
3447
|
class ke extends T {
|
|
3448
3448
|
_parse(e) {
|
|
@@ -3454,7 +3454,7 @@ class ke extends T {
|
|
|
3454
3454
|
}
|
|
3455
3455
|
ke.create = (t, e) => new ke(d({
|
|
3456
3456
|
innerType: t,
|
|
3457
|
-
typeName:
|
|
3457
|
+
typeName: E.ZodOptional
|
|
3458
3458
|
}, O(e)));
|
|
3459
3459
|
class We extends T {
|
|
3460
3460
|
_parse(e) {
|
|
@@ -3466,7 +3466,7 @@ class We extends T {
|
|
|
3466
3466
|
}
|
|
3467
3467
|
We.create = (t, e) => new We(d({
|
|
3468
3468
|
innerType: t,
|
|
3469
|
-
typeName:
|
|
3469
|
+
typeName: E.ZodNullable
|
|
3470
3470
|
}, O(e)));
|
|
3471
3471
|
class Ut extends T {
|
|
3472
3472
|
_parse(e) {
|
|
@@ -3484,13 +3484,13 @@ class Ut extends T {
|
|
|
3484
3484
|
}
|
|
3485
3485
|
Ut.create = (t, e) => new Ut(d({
|
|
3486
3486
|
innerType: t,
|
|
3487
|
-
typeName:
|
|
3487
|
+
typeName: E.ZodDefault,
|
|
3488
3488
|
defaultValue: typeof e.default == "function" ? e.default : () => e.default
|
|
3489
3489
|
}, O(e)));
|
|
3490
3490
|
class Vt extends T {
|
|
3491
3491
|
_parse(e) {
|
|
3492
|
-
const { ctx: n } = this._processInputParams(e), s =
|
|
3493
|
-
common:
|
|
3492
|
+
const { ctx: n } = this._processInputParams(e), s = x(d({}, n), {
|
|
3493
|
+
common: x(d({}, n.common), {
|
|
3494
3494
|
issues: []
|
|
3495
3495
|
})
|
|
3496
3496
|
}), r = this._def.innerType._parse({
|
|
@@ -3522,7 +3522,7 @@ class Vt extends T {
|
|
|
3522
3522
|
}
|
|
3523
3523
|
Vt.create = (t, e) => new Vt(d({
|
|
3524
3524
|
innerType: t,
|
|
3525
|
-
typeName:
|
|
3525
|
+
typeName: E.ZodCatch,
|
|
3526
3526
|
catchValue: typeof e.catch == "function" ? e.catch : () => e.catch
|
|
3527
3527
|
}, O(e)));
|
|
3528
3528
|
class vn extends T {
|
|
@@ -3539,7 +3539,7 @@ class vn extends T {
|
|
|
3539
3539
|
}
|
|
3540
3540
|
}
|
|
3541
3541
|
vn.create = (t) => new vn(d({
|
|
3542
|
-
typeName:
|
|
3542
|
+
typeName: E.ZodNaN
|
|
3543
3543
|
}, O(t)));
|
|
3544
3544
|
const to = Symbol("zod_brand");
|
|
3545
3545
|
class Ns extends T {
|
|
@@ -3559,7 +3559,7 @@ class Jt extends T {
|
|
|
3559
3559
|
_parse(e) {
|
|
3560
3560
|
const { status: n, ctx: s } = this._processInputParams(e);
|
|
3561
3561
|
if (s.common.async)
|
|
3562
|
-
return
|
|
3562
|
+
return Ee(this, null, function* () {
|
|
3563
3563
|
const r = yield this._def.in._parseAsync({
|
|
3564
3564
|
data: s.data,
|
|
3565
3565
|
path: s.path,
|
|
@@ -3591,7 +3591,7 @@ class Jt extends T {
|
|
|
3591
3591
|
return new Jt({
|
|
3592
3592
|
in: e,
|
|
3593
3593
|
out: n,
|
|
3594
|
-
typeName:
|
|
3594
|
+
typeName: E.ZodPipeline
|
|
3595
3595
|
});
|
|
3596
3596
|
}
|
|
3597
3597
|
}
|
|
@@ -3606,7 +3606,7 @@ class zt extends T {
|
|
|
3606
3606
|
}
|
|
3607
3607
|
zt.create = (t, e) => new zt(d({
|
|
3608
3608
|
innerType: t,
|
|
3609
|
-
typeName:
|
|
3609
|
+
typeName: E.ZodReadonly
|
|
3610
3610
|
}, O(e)));
|
|
3611
3611
|
function ar(t, e) {
|
|
3612
3612
|
const n = typeof t == "function" ? t(e) : typeof t == "string" ? { message: t } : t;
|
|
@@ -3621,34 +3621,34 @@ function Mr(t, e = {}, n) {
|
|
|
3621
3621
|
var u, h;
|
|
3622
3622
|
if (!c) {
|
|
3623
3623
|
const p = ar(e, s), k = (h = (u = p.fatal) !== null && u !== void 0 ? u : n) !== null && h !== void 0 ? h : !0;
|
|
3624
|
-
r.addIssue(
|
|
3624
|
+
r.addIssue(x(d({ code: "custom" }, p), { fatal: k }));
|
|
3625
3625
|
}
|
|
3626
3626
|
});
|
|
3627
3627
|
if (!o) {
|
|
3628
3628
|
const c = ar(e, s), u = (i = (a = c.fatal) !== null && a !== void 0 ? a : n) !== null && i !== void 0 ? i : !0;
|
|
3629
|
-
r.addIssue(
|
|
3629
|
+
r.addIssue(x(d({ code: "custom" }, c), { fatal: u }));
|
|
3630
3630
|
}
|
|
3631
3631
|
}) : gt.create();
|
|
3632
3632
|
}
|
|
3633
3633
|
const no = {
|
|
3634
3634
|
object: U.lazycreate
|
|
3635
3635
|
};
|
|
3636
|
-
var
|
|
3636
|
+
var E;
|
|
3637
3637
|
(function(t) {
|
|
3638
3638
|
t.ZodString = "ZodString", t.ZodNumber = "ZodNumber", t.ZodNaN = "ZodNaN", t.ZodBigInt = "ZodBigInt", t.ZodBoolean = "ZodBoolean", t.ZodDate = "ZodDate", t.ZodSymbol = "ZodSymbol", t.ZodUndefined = "ZodUndefined", t.ZodNull = "ZodNull", t.ZodAny = "ZodAny", t.ZodUnknown = "ZodUnknown", t.ZodNever = "ZodNever", t.ZodVoid = "ZodVoid", t.ZodArray = "ZodArray", t.ZodObject = "ZodObject", t.ZodUnion = "ZodUnion", t.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", t.ZodIntersection = "ZodIntersection", t.ZodTuple = "ZodTuple", t.ZodRecord = "ZodRecord", t.ZodMap = "ZodMap", t.ZodSet = "ZodSet", t.ZodFunction = "ZodFunction", t.ZodLazy = "ZodLazy", t.ZodLiteral = "ZodLiteral", t.ZodEnum = "ZodEnum", t.ZodEffects = "ZodEffects", t.ZodNativeEnum = "ZodNativeEnum", t.ZodOptional = "ZodOptional", t.ZodNullable = "ZodNullable", t.ZodDefault = "ZodDefault", t.ZodCatch = "ZodCatch", t.ZodPromise = "ZodPromise", t.ZodBranded = "ZodBranded", t.ZodPipeline = "ZodPipeline", t.ZodReadonly = "ZodReadonly";
|
|
3639
|
-
})(
|
|
3639
|
+
})(E || (E = {}));
|
|
3640
3640
|
const so = (t, e = {
|
|
3641
3641
|
message: `Input not instance of ${t.name}`
|
|
3642
|
-
}) => Mr((n) => n instanceof t, e), Lr = me.create, $r = Le.create, ro = vn.create, ao = $e.create, Fr = It.create, io = Qe.create, oo = mn.create, co = jt.create, uo = Zt.create, lo = gt.create, fo = Xe.create, ho = Pe.create, po = yn.create, mo = ye.create, yo = U.create, go = U.strictCreate, vo = Dt.create, _o =
|
|
3643
|
-
string: (t) => me.create(
|
|
3644
|
-
number: (t) => Le.create(
|
|
3645
|
-
boolean: (t) => It.create(
|
|
3642
|
+
}) => Mr((n) => n instanceof t, e), Lr = me.create, $r = Le.create, ro = vn.create, ao = $e.create, Fr = It.create, io = Qe.create, oo = mn.create, co = jt.create, uo = Zt.create, lo = gt.create, fo = Xe.create, ho = Pe.create, po = yn.create, mo = ye.create, yo = U.create, go = U.strictCreate, vo = Dt.create, _o = En.create, bo = Mt.create, wo = Se.create, ko = Lt.create, Eo = gn.create, xo = et.create, So = ht.create, Oo = $t.create, To = Ft.create, Co = Fe.create, Ao = Wt.create, No = vt.create, ir = ge.create, Ro = ke.create, Po = We.create, Io = ge.createWithPreprocess, jo = Jt.create, Zo = () => Lr().optional(), Do = () => $r().optional(), Mo = () => Fr().optional(), Lo = {
|
|
3643
|
+
string: (t) => me.create(x(d({}, t), { coerce: !0 })),
|
|
3644
|
+
number: (t) => Le.create(x(d({}, t), { coerce: !0 })),
|
|
3645
|
+
boolean: (t) => It.create(x(d({}, t), {
|
|
3646
3646
|
coerce: !0
|
|
3647
3647
|
})),
|
|
3648
|
-
bigint: (t) => $e.create(
|
|
3649
|
-
date: (t) => Qe.create(
|
|
3648
|
+
bigint: (t) => $e.create(x(d({}, t), { coerce: !0 })),
|
|
3649
|
+
date: (t) => Qe.create(x(d({}, t), { coerce: !0 }))
|
|
3650
3650
|
}, $o = S;
|
|
3651
|
-
var
|
|
3651
|
+
var P = /* @__PURE__ */ Object.freeze({
|
|
3652
3652
|
__proto__: null,
|
|
3653
3653
|
defaultErrorMap: yt,
|
|
3654
3654
|
setErrorMap: Pi,
|
|
@@ -3689,7 +3689,7 @@ var I = /* @__PURE__ */ Object.freeze({
|
|
|
3689
3689
|
ZodArray: ye,
|
|
3690
3690
|
ZodObject: U,
|
|
3691
3691
|
ZodUnion: Dt,
|
|
3692
|
-
ZodDiscriminatedUnion:
|
|
3692
|
+
ZodDiscriminatedUnion: En,
|
|
3693
3693
|
ZodIntersection: Mt,
|
|
3694
3694
|
ZodTuple: Se,
|
|
3695
3695
|
ZodRecord: Lt,
|
|
@@ -3717,7 +3717,7 @@ var I = /* @__PURE__ */ Object.freeze({
|
|
|
3717
3717
|
ZodSchema: T,
|
|
3718
3718
|
late: no,
|
|
3719
3719
|
get ZodFirstPartyTypeKind() {
|
|
3720
|
-
return
|
|
3720
|
+
return E;
|
|
3721
3721
|
},
|
|
3722
3722
|
coerce: Lo,
|
|
3723
3723
|
any: lo,
|
|
@@ -3727,15 +3727,15 @@ var I = /* @__PURE__ */ Object.freeze({
|
|
|
3727
3727
|
date: io,
|
|
3728
3728
|
discriminatedUnion: _o,
|
|
3729
3729
|
effect: ir,
|
|
3730
|
-
enum:
|
|
3730
|
+
enum: Co,
|
|
3731
3731
|
function: So,
|
|
3732
3732
|
instanceof: so,
|
|
3733
3733
|
intersection: bo,
|
|
3734
3734
|
lazy: Oo,
|
|
3735
3735
|
literal: To,
|
|
3736
|
-
map:
|
|
3736
|
+
map: Eo,
|
|
3737
3737
|
nan: ro,
|
|
3738
|
-
nativeEnum:
|
|
3738
|
+
nativeEnum: Ao,
|
|
3739
3739
|
never: ho,
|
|
3740
3740
|
null: uo,
|
|
3741
3741
|
nullable: Po,
|
|
@@ -3749,7 +3749,7 @@ var I = /* @__PURE__ */ Object.freeze({
|
|
|
3749
3749
|
preprocess: Io,
|
|
3750
3750
|
promise: No,
|
|
3751
3751
|
record: ko,
|
|
3752
|
-
set:
|
|
3752
|
+
set: xo,
|
|
3753
3753
|
strictObject: go,
|
|
3754
3754
|
string: Lr,
|
|
3755
3755
|
symbol: oo,
|
|
@@ -3764,16 +3764,16 @@ var I = /* @__PURE__ */ Object.freeze({
|
|
|
3764
3764
|
quotelessJson: Ri,
|
|
3765
3765
|
ZodError: oe
|
|
3766
3766
|
});
|
|
3767
|
-
|
|
3768
|
-
language:
|
|
3769
|
-
disableMarkedForExport:
|
|
3770
|
-
allowAutoSelectFirstNode:
|
|
3767
|
+
P.object({
|
|
3768
|
+
language: P.enum(["typescript", "javascript"]).optional(),
|
|
3769
|
+
disableMarkedForExport: P.boolean().optional(),
|
|
3770
|
+
allowAutoSelectFirstNode: P.boolean().optional().default(!0)
|
|
3771
3771
|
}).and(
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
framework:
|
|
3775
|
-
model:
|
|
3776
|
-
styling:
|
|
3772
|
+
P.union([
|
|
3773
|
+
P.object({
|
|
3774
|
+
framework: P.literal("react"),
|
|
3775
|
+
model: P.string().optional(),
|
|
3776
|
+
styling: P.enum([
|
|
3777
3777
|
"plain_css",
|
|
3778
3778
|
"css_modules",
|
|
3779
3779
|
"styled_components",
|
|
@@ -3782,27 +3782,29 @@ I.object({
|
|
|
3782
3782
|
"scss",
|
|
3783
3783
|
"inline_styles"
|
|
3784
3784
|
]),
|
|
3785
|
-
uiLibrary:
|
|
3786
|
-
responsivePages:
|
|
3787
|
-
|
|
3788
|
-
name:
|
|
3789
|
-
framesId:
|
|
3785
|
+
uiLibrary: P.enum(["mui", "antd", "radix", "shadcn", "clean_react"]).optional(),
|
|
3786
|
+
responsivePages: P.array(
|
|
3787
|
+
P.object({
|
|
3788
|
+
name: P.string(),
|
|
3789
|
+
framesId: P.array(P.string())
|
|
3790
3790
|
})
|
|
3791
3791
|
).optional(),
|
|
3792
|
-
enableUILibraryTheming:
|
|
3793
|
-
enableCompactStructure:
|
|
3794
|
-
enableDisplayScreenModelId:
|
|
3795
|
-
enableGeneratePackageLock:
|
|
3796
|
-
enableAnimationsPreset:
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3792
|
+
enableUILibraryTheming: P.boolean().optional(),
|
|
3793
|
+
enableCompactStructure: P.boolean().optional(),
|
|
3794
|
+
enableDisplayScreenModelId: P.boolean().optional(),
|
|
3795
|
+
enableGeneratePackageLock: P.boolean().optional(),
|
|
3796
|
+
enableAnimationsPreset: P.boolean().optional(),
|
|
3797
|
+
enableDisplayDataId: P.boolean().optional(),
|
|
3798
|
+
enableDisplayDataName: P.boolean().optional(),
|
|
3799
|
+
enableAutoSplit: P.boolean().optional(),
|
|
3800
|
+
autoSplitThreshold: P.number().optional(),
|
|
3801
|
+
url: P.string().url().optional(),
|
|
3802
|
+
codegenSettings: P.record(P.unknown()).optional()
|
|
3801
3803
|
}),
|
|
3802
|
-
|
|
3803
|
-
framework:
|
|
3804
|
-
styling:
|
|
3805
|
-
enableTranslation:
|
|
3804
|
+
P.object({
|
|
3805
|
+
framework: P.literal("html"),
|
|
3806
|
+
styling: P.enum(["plain_css", "inline_styles", "tailwind"]),
|
|
3807
|
+
enableTranslation: P.boolean().optional()
|
|
3806
3808
|
})
|
|
3807
3809
|
])
|
|
3808
3810
|
);
|
|
@@ -3821,10 +3823,10 @@ function Fo(t) {
|
|
|
3821
3823
|
const { onEvent: e = Zn, onError: n = Zn, onRetry: s = Zn, onComment: r } = t;
|
|
3822
3824
|
let a = "", i = !0, o, c = "", u = "";
|
|
3823
3825
|
function h(m) {
|
|
3824
|
-
const _ = i ? m.replace(/^\xEF\xBB\xBF/, "") : m, [l,
|
|
3825
|
-
for (const
|
|
3826
|
-
p(
|
|
3827
|
-
a =
|
|
3826
|
+
const _ = i ? m.replace(/^\xEF\xBB\xBF/, "") : m, [l, A] = Wo(`${a}${_}`);
|
|
3827
|
+
for (const I of l)
|
|
3828
|
+
p(I);
|
|
3829
|
+
a = A, i = !1;
|
|
3828
3830
|
}
|
|
3829
3831
|
function p(m) {
|
|
3830
3832
|
if (m === "") {
|
|
@@ -3837,8 +3839,8 @@ function Fo(t) {
|
|
|
3837
3839
|
}
|
|
3838
3840
|
const _ = m.indexOf(":");
|
|
3839
3841
|
if (_ !== -1) {
|
|
3840
|
-
const l = m.slice(0, _),
|
|
3841
|
-
k(l,
|
|
3842
|
+
const l = m.slice(0, _), A = m[_ + 1] === " " ? 2 : 1, I = m.slice(_ + A);
|
|
3843
|
+
k(l, I, m);
|
|
3842
3844
|
return;
|
|
3843
3845
|
}
|
|
3844
3846
|
k(m, "", m);
|
|
@@ -3968,54 +3970,54 @@ function ur(t) {
|
|
|
3968
3970
|
}
|
|
3969
3971
|
var Wr = (t) => {
|
|
3970
3972
|
throw TypeError(t);
|
|
3971
|
-
}, Rs = (t, e, n) => e.has(t) || Wr("Cannot " + n),
|
|
3973
|
+
}, Rs = (t, e, n) => e.has(t) || Wr("Cannot " + n), C = (t, e, n) => (Rs(t, e, "read from private field"), n ? n.call(t) : e.get(t)), q = (t, e, n) => e.has(t) ? Wr("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), W = (t, e, n, s) => (Rs(t, e, "write to private field"), e.set(t, n), n), Ae = (t, e, n) => (Rs(t, e, "access private method"), n), re, Je, ut, un, _n, Nt, ft, Rt, De, dt, pt, lt, Ct, pe, is, os, cs, dr, us, ds, At, ls, fs;
|
|
3972
3974
|
class dn extends EventTarget {
|
|
3973
3975
|
constructor(e, n) {
|
|
3974
3976
|
var s, r;
|
|
3975
|
-
super(), q(this, pe), this.CONNECTING = 0, this.OPEN = 1, this.CLOSED = 2, q(this, re), q(this, Je), q(this, ut), q(this, un), q(this, _n), q(this, Nt), q(this, ft), q(this, Rt, null), q(this, De), q(this, dt), q(this, pt, null), q(this, lt, null), q(this,
|
|
3977
|
+
super(), q(this, pe), this.CONNECTING = 0, this.OPEN = 1, this.CLOSED = 2, q(this, re), q(this, Je), q(this, ut), q(this, un), q(this, _n), q(this, Nt), q(this, ft), q(this, Rt, null), q(this, De), q(this, dt), q(this, pt, null), q(this, lt, null), q(this, Ct, null), q(this, os, (a) => Ie(this, null, function* () {
|
|
3976
3978
|
var i;
|
|
3977
|
-
|
|
3979
|
+
C(this, dt).reset();
|
|
3978
3980
|
const { body: o, redirected: c, status: u, headers: h } = a;
|
|
3979
3981
|
if (u === 204) {
|
|
3980
|
-
|
|
3982
|
+
Ae(this, pe, At).call(this, "Server sent HTTP 204, not reconnecting", 204), this.close();
|
|
3981
3983
|
return;
|
|
3982
3984
|
}
|
|
3983
3985
|
if (c ? W(this, ut, new URL(a.url)) : W(this, ut, void 0), u !== 200) {
|
|
3984
|
-
|
|
3986
|
+
Ae(this, pe, At).call(this, `Non-200 status code (${u})`, u);
|
|
3985
3987
|
return;
|
|
3986
3988
|
}
|
|
3987
3989
|
if (!(h.get("content-type") || "").startsWith("text/event-stream")) {
|
|
3988
|
-
|
|
3990
|
+
Ae(this, pe, At).call(this, 'Invalid content type, expected "text/event-stream"', u);
|
|
3989
3991
|
return;
|
|
3990
3992
|
}
|
|
3991
|
-
if (
|
|
3993
|
+
if (C(this, re) === this.CLOSED)
|
|
3992
3994
|
return;
|
|
3993
3995
|
W(this, re, this.OPEN);
|
|
3994
3996
|
const p = new Event("open");
|
|
3995
|
-
if ((i =
|
|
3996
|
-
|
|
3997
|
+
if ((i = C(this, Ct)) == null || i.call(this, p), this.dispatchEvent(p), typeof o != "object" || !o || !("getReader" in o)) {
|
|
3998
|
+
Ae(this, pe, At).call(this, "Invalid response body, expected a web ReadableStream", u), this.close();
|
|
3997
3999
|
return;
|
|
3998
4000
|
}
|
|
3999
4001
|
const k = new TextDecoder(), g = o.getReader();
|
|
4000
4002
|
let b = !0;
|
|
4001
4003
|
do {
|
|
4002
4004
|
const { done: m, value: _ } = yield g.read();
|
|
4003
|
-
_ &&
|
|
4005
|
+
_ && C(this, dt).feed(k.decode(_, { stream: !m })), m && (b = !1, C(this, dt).reset(), Ae(this, pe, ls).call(this));
|
|
4004
4006
|
} while (b);
|
|
4005
4007
|
})), q(this, cs, (a) => {
|
|
4006
|
-
W(this, De, void 0), !(a.name === "AbortError" || a.type === "aborted") &&
|
|
4008
|
+
W(this, De, void 0), !(a.name === "AbortError" || a.type === "aborted") && Ae(this, pe, ls).call(this, as(a));
|
|
4007
4009
|
}), q(this, us, (a) => {
|
|
4008
4010
|
typeof a.id == "string" && W(this, Rt, a.id);
|
|
4009
4011
|
const i = new MessageEvent(a.event || "message", {
|
|
4010
4012
|
data: a.data,
|
|
4011
|
-
origin:
|
|
4013
|
+
origin: C(this, ut) ? C(this, ut).origin : C(this, Je).origin,
|
|
4012
4014
|
lastEventId: a.id || ""
|
|
4013
4015
|
});
|
|
4014
|
-
|
|
4016
|
+
C(this, lt) && (!a.event || a.event === "message") && C(this, lt).call(this, i), this.dispatchEvent(i);
|
|
4015
4017
|
}), q(this, ds, (a) => {
|
|
4016
4018
|
W(this, Nt, a);
|
|
4017
4019
|
}), q(this, fs, () => {
|
|
4018
|
-
W(this, ft, void 0),
|
|
4020
|
+
W(this, ft, void 0), C(this, re) === this.CONNECTING && Ae(this, pe, is).call(this);
|
|
4019
4021
|
});
|
|
4020
4022
|
try {
|
|
4021
4023
|
if (e instanceof URL)
|
|
@@ -4028,9 +4030,9 @@ class dn extends EventTarget {
|
|
|
4028
4030
|
throw Uo("An invalid or illegal string was specified");
|
|
4029
4031
|
}
|
|
4030
4032
|
W(this, dt, Fo({
|
|
4031
|
-
onEvent:
|
|
4032
|
-
onRetry:
|
|
4033
|
-
})), W(this, re, this.CONNECTING), W(this, Nt, 3e3), W(this, _n, (s = n == null ? void 0 : n.fetch) != null ? s : globalThis.fetch), W(this, un, (r = n == null ? void 0 : n.withCredentials) != null ? r : !1),
|
|
4033
|
+
onEvent: C(this, us),
|
|
4034
|
+
onRetry: C(this, ds)
|
|
4035
|
+
})), W(this, re, this.CONNECTING), W(this, Nt, 3e3), W(this, _n, (s = n == null ? void 0 : n.fetch) != null ? s : globalThis.fetch), W(this, un, (r = n == null ? void 0 : n.withCredentials) != null ? r : !1), Ae(this, pe, is).call(this);
|
|
4034
4036
|
}
|
|
4035
4037
|
/**
|
|
4036
4038
|
* Returns the state of this EventSource object's connection. It can have the values described below.
|
|
@@ -4043,7 +4045,7 @@ class dn extends EventTarget {
|
|
|
4043
4045
|
* @public
|
|
4044
4046
|
*/
|
|
4045
4047
|
get readyState() {
|
|
4046
|
-
return
|
|
4048
|
+
return C(this, re);
|
|
4047
4049
|
}
|
|
4048
4050
|
/**
|
|
4049
4051
|
* Returns the URL providing the event stream.
|
|
@@ -4053,7 +4055,7 @@ class dn extends EventTarget {
|
|
|
4053
4055
|
* @public
|
|
4054
4056
|
*/
|
|
4055
4057
|
get url() {
|
|
4056
|
-
return
|
|
4058
|
+
return C(this, Je).href;
|
|
4057
4059
|
}
|
|
4058
4060
|
/**
|
|
4059
4061
|
* Returns true if the credentials mode for connection requests to the URL providing the event stream is set to "include", and false otherwise.
|
|
@@ -4061,28 +4063,28 @@ class dn extends EventTarget {
|
|
|
4061
4063
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/withCredentials)
|
|
4062
4064
|
*/
|
|
4063
4065
|
get withCredentials() {
|
|
4064
|
-
return
|
|
4066
|
+
return C(this, un);
|
|
4065
4067
|
}
|
|
4066
4068
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
|
|
4067
4069
|
get onerror() {
|
|
4068
|
-
return
|
|
4070
|
+
return C(this, pt);
|
|
4069
4071
|
}
|
|
4070
4072
|
set onerror(e) {
|
|
4071
4073
|
W(this, pt, e);
|
|
4072
4074
|
}
|
|
4073
4075
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
|
|
4074
4076
|
get onmessage() {
|
|
4075
|
-
return
|
|
4077
|
+
return C(this, lt);
|
|
4076
4078
|
}
|
|
4077
4079
|
set onmessage(e) {
|
|
4078
4080
|
W(this, lt, e);
|
|
4079
4081
|
}
|
|
4080
4082
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
|
|
4081
4083
|
get onopen() {
|
|
4082
|
-
return
|
|
4084
|
+
return C(this, Ct);
|
|
4083
4085
|
}
|
|
4084
4086
|
set onopen(e) {
|
|
4085
|
-
W(this,
|
|
4087
|
+
W(this, Ct, e);
|
|
4086
4088
|
}
|
|
4087
4089
|
addEventListener(e, n, s) {
|
|
4088
4090
|
const r = n;
|
|
@@ -4100,16 +4102,16 @@ class dn extends EventTarget {
|
|
|
4100
4102
|
* @public
|
|
4101
4103
|
*/
|
|
4102
4104
|
close() {
|
|
4103
|
-
|
|
4105
|
+
C(this, ft) && clearTimeout(C(this, ft)), C(this, re) !== this.CLOSED && (C(this, De) && C(this, De).abort(), W(this, re, this.CLOSED), W(this, De, void 0));
|
|
4104
4106
|
}
|
|
4105
4107
|
}
|
|
4106
|
-
re = /* @__PURE__ */ new WeakMap(), Je = /* @__PURE__ */ new WeakMap(), ut = /* @__PURE__ */ new WeakMap(), un = /* @__PURE__ */ new WeakMap(), _n = /* @__PURE__ */ new WeakMap(), Nt = /* @__PURE__ */ new WeakMap(), ft = /* @__PURE__ */ new WeakMap(), Rt = /* @__PURE__ */ new WeakMap(), De = /* @__PURE__ */ new WeakMap(), dt = /* @__PURE__ */ new WeakMap(), pt = /* @__PURE__ */ new WeakMap(), lt = /* @__PURE__ */ new WeakMap(),
|
|
4108
|
+
re = /* @__PURE__ */ new WeakMap(), Je = /* @__PURE__ */ new WeakMap(), ut = /* @__PURE__ */ new WeakMap(), un = /* @__PURE__ */ new WeakMap(), _n = /* @__PURE__ */ new WeakMap(), Nt = /* @__PURE__ */ new WeakMap(), ft = /* @__PURE__ */ new WeakMap(), Rt = /* @__PURE__ */ new WeakMap(), De = /* @__PURE__ */ new WeakMap(), dt = /* @__PURE__ */ new WeakMap(), pt = /* @__PURE__ */ new WeakMap(), lt = /* @__PURE__ */ new WeakMap(), Ct = /* @__PURE__ */ new WeakMap(), pe = /* @__PURE__ */ new WeakSet(), /**
|
|
4107
4109
|
* Connect to the given URL and start receiving events
|
|
4108
4110
|
*
|
|
4109
4111
|
* @internal
|
|
4110
4112
|
*/
|
|
4111
4113
|
is = function() {
|
|
4112
|
-
W(this, re, this.CONNECTING), W(this, De, new AbortController()),
|
|
4114
|
+
W(this, re, this.CONNECTING), W(this, De, new AbortController()), C(this, _n)(C(this, Je), Ae(this, pe, dr).call(this)).then(C(this, os)).catch(C(this, cs));
|
|
4113
4115
|
}, os = /* @__PURE__ */ new WeakMap(), cs = /* @__PURE__ */ new WeakMap(), /**
|
|
4114
4116
|
* Get request options for the `fetch()` request
|
|
4115
4117
|
*
|
|
@@ -4123,9 +4125,9 @@ dr = function() {
|
|
|
4123
4125
|
// [spec] …will have their mode set to "cors"…
|
|
4124
4126
|
mode: "cors",
|
|
4125
4127
|
redirect: "follow",
|
|
4126
|
-
headers: Ke({ Accept: "text/event-stream" },
|
|
4128
|
+
headers: Ke({ Accept: "text/event-stream" }, C(this, Rt) ? { "Last-Event-ID": C(this, Rt) } : void 0),
|
|
4127
4129
|
cache: "no-store",
|
|
4128
|
-
signal: (t =
|
|
4130
|
+
signal: (t = C(this, De)) == null ? void 0 : t.signal
|
|
4129
4131
|
};
|
|
4130
4132
|
return "window" in globalThis && (e.credentials = this.withCredentials ? "include" : "same-origin"), e;
|
|
4131
4133
|
}, us = /* @__PURE__ */ new WeakMap(), ds = /* @__PURE__ */ new WeakMap(), /**
|
|
@@ -4135,11 +4137,11 @@ dr = function() {
|
|
|
4135
4137
|
* @param code - The HTTP status code, if available
|
|
4136
4138
|
* @internal
|
|
4137
4139
|
*/
|
|
4138
|
-
|
|
4140
|
+
At = function(t, e) {
|
|
4139
4141
|
var n;
|
|
4140
|
-
|
|
4142
|
+
C(this, re) !== this.CLOSED && W(this, re, this.CLOSED);
|
|
4141
4143
|
const s = new cr("error", { code: e, message: t });
|
|
4142
|
-
(n =
|
|
4144
|
+
(n = C(this, pt)) == null || n.call(this, s), this.dispatchEvent(s);
|
|
4143
4145
|
}, /**
|
|
4144
4146
|
* Schedules a reconnection attempt against the EventSource endpoint.
|
|
4145
4147
|
*
|
|
@@ -4149,11 +4151,11 @@ Ct = function(t, e) {
|
|
|
4149
4151
|
*/
|
|
4150
4152
|
ls = function(t, e) {
|
|
4151
4153
|
var n;
|
|
4152
|
-
if (
|
|
4154
|
+
if (C(this, re) === this.CLOSED)
|
|
4153
4155
|
return;
|
|
4154
4156
|
W(this, re, this.CONNECTING);
|
|
4155
4157
|
const s = new cr("error", { code: e, message: t });
|
|
4156
|
-
(n =
|
|
4158
|
+
(n = C(this, pt)) == null || n.call(this, s), this.dispatchEvent(s), W(this, ft, setTimeout(C(this, fs), C(this, Nt)));
|
|
4157
4159
|
}, fs = /* @__PURE__ */ new WeakMap(), /**
|
|
4158
4160
|
* ReadyState representing an EventSource currently trying to connect
|
|
4159
4161
|
*
|
|
@@ -4233,19 +4235,19 @@ function Vr(t) {
|
|
|
4233
4235
|
return n === Object ? !0 : typeof n == "function" && Function.toString.call(n) === Ko;
|
|
4234
4236
|
}
|
|
4235
4237
|
function bn(t, e) {
|
|
4236
|
-
|
|
4238
|
+
xn(t) === 0 ? Reflect.ownKeys(t).forEach((n) => {
|
|
4237
4239
|
e(n, t[n], t);
|
|
4238
4240
|
}) : t.forEach((n, s) => e(s, n, t));
|
|
4239
4241
|
}
|
|
4240
|
-
function
|
|
4242
|
+
function xn(t) {
|
|
4241
4243
|
const e = t[ce];
|
|
4242
4244
|
return e ? e.type_ : Array.isArray(t) ? 1 : Sn(t) ? 2 : On(t) ? 3 : 0;
|
|
4243
4245
|
}
|
|
4244
4246
|
function hs(t, e) {
|
|
4245
|
-
return
|
|
4247
|
+
return xn(t) === 2 ? t.has(e) : Object.prototype.hasOwnProperty.call(t, e);
|
|
4246
4248
|
}
|
|
4247
4249
|
function zr(t, e, n) {
|
|
4248
|
-
const s =
|
|
4250
|
+
const s = xn(t);
|
|
4249
4251
|
s === 2 ? t.set(e, n) : s === 3 ? t.add(n) : t[e] = n;
|
|
4250
4252
|
}
|
|
4251
4253
|
function Bo(t, e) {
|
|
@@ -4292,7 +4294,7 @@ function ps(t, e) {
|
|
|
4292
4294
|
}
|
|
4293
4295
|
}
|
|
4294
4296
|
function Kt(t, e = !1) {
|
|
4295
|
-
return Tn(t) || bt(t) || !tt(t) || (
|
|
4297
|
+
return Tn(t) || bt(t) || !tt(t) || (xn(t) > 1 && (t.set = t.add = t.clear = t.delete = qo), Object.freeze(t), e && Object.entries(t).forEach(([n, s]) => Kt(s, !0))), t;
|
|
4296
4298
|
}
|
|
4297
4299
|
function qo() {
|
|
4298
4300
|
ae(2);
|
|
@@ -4691,14 +4693,14 @@ const yr = 10, gr = {
|
|
|
4691
4693
|
const b = {};
|
|
4692
4694
|
c.addEventListener("start", (_) => {
|
|
4693
4695
|
const l = JSON.parse(_.data);
|
|
4694
|
-
b.sessionId = l.sessionId, s((
|
|
4695
|
-
|
|
4696
|
+
b.sessionId = l.sessionId, s((A) => {
|
|
4697
|
+
A.tasks.fetchDesign.status = "running";
|
|
4696
4698
|
});
|
|
4697
4699
|
}), c.addEventListener("pre_codegen", (_) => {
|
|
4698
4700
|
JSON.parse(
|
|
4699
4701
|
_.data
|
|
4700
|
-
).message === "Anima model built" && s((
|
|
4701
|
-
|
|
4702
|
+
).message === "Anima model built" && s((A) => {
|
|
4703
|
+
A.tasks.fetchDesign.status = "finished", A.tasks.codeGeneration.status = "running", A.tasks.uploadAssets.status = "running";
|
|
4702
4704
|
});
|
|
4703
4705
|
}), c.addEventListener("figma_metadata", (_) => {
|
|
4704
4706
|
const l = JSON.parse(
|
|
@@ -4717,8 +4719,8 @@ const yr = 10, gr = {
|
|
|
4717
4719
|
const l = JSON.parse(
|
|
4718
4720
|
_.data
|
|
4719
4721
|
);
|
|
4720
|
-
l.payload.status === "success" && (b.files = l.payload.files), s((
|
|
4721
|
-
|
|
4722
|
+
l.payload.status === "success" && (b.files = l.payload.files), s((A) => {
|
|
4723
|
+
A.tasks.codeGeneration.progress = l.payload.progress, A.tasks.codeGeneration.status = "running";
|
|
4722
4724
|
});
|
|
4723
4725
|
}), c.addEventListener("codegen_completed", () => {
|
|
4724
4726
|
s((_) => {
|
|
@@ -4745,19 +4747,19 @@ const yr = 10, gr = {
|
|
|
4745
4747
|
`Experienced error during code generation (attempt ${m + 1} / ${yr})`,
|
|
4746
4748
|
_
|
|
4747
4749
|
);
|
|
4748
|
-
let l,
|
|
4750
|
+
let l, A, I = !1;
|
|
4749
4751
|
try {
|
|
4750
4752
|
if (_ instanceof MessageEvent)
|
|
4751
4753
|
l = JSON.parse(_.data);
|
|
4752
4754
|
else {
|
|
4753
4755
|
const G = yield o;
|
|
4754
|
-
|
|
4756
|
+
A = G.status;
|
|
4755
4757
|
try {
|
|
4756
4758
|
l = yield G.json();
|
|
4757
4759
|
} catch ($) {
|
|
4758
4760
|
}
|
|
4759
4761
|
}
|
|
4760
|
-
(((V = l == null ? void 0 : l.payload) == null ? void 0 : V.name) === "Task Crashed" ||
|
|
4762
|
+
(((V = l == null ? void 0 : l.payload) == null ? void 0 : V.name) === "Task Crashed" || A === 429) && (I = !0);
|
|
4761
4763
|
} catch (G) {
|
|
4762
4764
|
}
|
|
4763
4765
|
const K = new Gs({
|
|
@@ -4768,7 +4770,7 @@ const yr = 10, gr = {
|
|
|
4768
4770
|
});
|
|
4769
4771
|
m++;
|
|
4770
4772
|
let Z = !1;
|
|
4771
|
-
m > yr ? (console.error("Experienced too many errors, terminating request"), Z = !0) :
|
|
4773
|
+
m > yr ? (console.error("Experienced too many errors, terminating request"), Z = !0) : I && (console.error("Experienced unrecoverable error, terminating request"), Z = !0), Z && (s((G) => {
|
|
4772
4774
|
G.status = "error", G.error = K;
|
|
4773
4775
|
}), g({
|
|
4774
4776
|
result: null,
|
|
@@ -4776,8 +4778,8 @@ const yr = 10, gr = {
|
|
|
4776
4778
|
}));
|
|
4777
4779
|
})), c.addEventListener("done", (_) => {
|
|
4778
4780
|
const l = JSON.parse(_.data);
|
|
4779
|
-
b.tokenUsage = l.payload.tokenUsage, b.sessionId = l.payload.sessionId, s((
|
|
4780
|
-
|
|
4781
|
+
b.tokenUsage = l.payload.tokenUsage, b.sessionId = l.payload.sessionId, s((A) => {
|
|
4782
|
+
A.status = "success", A.result = b;
|
|
4781
4783
|
}), g({ result: b, error: null });
|
|
4782
4784
|
});
|
|
4783
4785
|
});
|
|
@@ -4786,17 +4788,17 @@ const yr = 10, gr = {
|
|
|
4786
4788
|
if (((p = i.assetsStorage) == null ? void 0 : p.strategy) === "local" && ((k = m == null ? void 0 : m.assets) != null && k.length)) {
|
|
4787
4789
|
const { filePath: _ } = vr(
|
|
4788
4790
|
i.assetsStorage
|
|
4789
|
-
), l = m.assets.map((
|
|
4790
|
-
const Z = yield (yield fetch(
|
|
4791
|
+
), l = m.assets.map((I) => Ie(void 0, null, function* () {
|
|
4792
|
+
const Z = yield (yield fetch(I.url)).arrayBuffer();
|
|
4791
4793
|
return {
|
|
4792
|
-
assetName:
|
|
4794
|
+
assetName: I.name,
|
|
4793
4795
|
base64: va(Z)
|
|
4794
4796
|
};
|
|
4795
|
-
})),
|
|
4796
|
-
for (const
|
|
4797
|
+
})), A = yield Promise.allSettled(l);
|
|
4798
|
+
for (const I of A) {
|
|
4797
4799
|
const K = {};
|
|
4798
|
-
if (
|
|
4799
|
-
const { assetName: Z, base64: V } =
|
|
4800
|
+
if (I.status === "fulfilled") {
|
|
4801
|
+
const { assetName: Z, base64: V } = I.value;
|
|
4800
4802
|
K[Z] = V;
|
|
4801
4803
|
const D = _ ? `${_}/${Z}` : Z;
|
|
4802
4804
|
m.files[D] = {
|
|
@@ -4898,16 +4900,16 @@ function rc() {
|
|
|
4898
4900
|
_ = i({
|
|
4899
4901
|
inst: { value: m, getSnapshot: b }
|
|
4900
4902
|
});
|
|
4901
|
-
var l = _[0].inst,
|
|
4903
|
+
var l = _[0].inst, A = _[1];
|
|
4902
4904
|
return c(
|
|
4903
4905
|
function() {
|
|
4904
|
-
l.value = m, l.getSnapshot = b, n(l) &&
|
|
4906
|
+
l.value = m, l.getSnapshot = b, n(l) && A({ inst: l });
|
|
4905
4907
|
},
|
|
4906
4908
|
[g, m, b]
|
|
4907
4909
|
), o(
|
|
4908
4910
|
function() {
|
|
4909
|
-
return n(l) &&
|
|
4910
|
-
n(l) &&
|
|
4911
|
+
return n(l) && A({ inst: l }), g(function() {
|
|
4912
|
+
n(l) && A({ inst: l });
|
|
4911
4913
|
});
|
|
4912
4914
|
},
|
|
4913
4915
|
[g]
|
|
@@ -4937,7 +4939,7 @@ function ac() {
|
|
|
4937
4939
|
}
|
|
4938
4940
|
var ic = ac();
|
|
4939
4941
|
const Hr = 0, Gr = 1, Jr = 2, kr = 3;
|
|
4940
|
-
var
|
|
4942
|
+
var Er = Object.prototype.hasOwnProperty;
|
|
4941
4943
|
function _s(t, e) {
|
|
4942
4944
|
var n, s;
|
|
4943
4945
|
if (t === e) return !0;
|
|
@@ -4952,7 +4954,7 @@ function _s(t, e) {
|
|
|
4952
4954
|
if (!n || typeof t == "object") {
|
|
4953
4955
|
s = 0;
|
|
4954
4956
|
for (n in t)
|
|
4955
|
-
if (
|
|
4957
|
+
if (Er.call(t, n) && ++s && !Er.call(e, n) || !(n in e) || !_s(t[n], e[n])) return !1;
|
|
4956
4958
|
return Object.keys(e).length === s;
|
|
4957
4959
|
}
|
|
4958
4960
|
}
|
|
@@ -4981,7 +4983,7 @@ const Re = /* @__PURE__ */ new WeakMap(), Me = () => {
|
|
|
4981
4983
|
];
|
|
4982
4984
|
};
|
|
4983
4985
|
let ks = !0;
|
|
4984
|
-
const uc = () => ks, [
|
|
4986
|
+
const uc = () => ks, [Es, xs] = Xt && window.addEventListener ? [
|
|
4985
4987
|
window.addEventListener.bind(window),
|
|
4986
4988
|
window.removeEventListener.bind(window)
|
|
4987
4989
|
] : [
|
|
@@ -4990,16 +4992,16 @@ const uc = () => ks, [xs, Es] = Xt && window.addEventListener ? [
|
|
|
4990
4992
|
], dc = () => {
|
|
4991
4993
|
const t = ws && document.visibilityState;
|
|
4992
4994
|
return R(t) || t !== "hidden";
|
|
4993
|
-
}, lc = (t) => (ws && document.addEventListener("visibilitychange", t),
|
|
4994
|
-
ws && document.removeEventListener("visibilitychange", t),
|
|
4995
|
+
}, lc = (t) => (ws && document.addEventListener("visibilitychange", t), Es("focus", t), () => {
|
|
4996
|
+
ws && document.removeEventListener("visibilitychange", t), xs("focus", t);
|
|
4995
4997
|
}), fc = (t) => {
|
|
4996
4998
|
const e = () => {
|
|
4997
4999
|
ks = !0, t();
|
|
4998
5000
|
}, n = () => {
|
|
4999
5001
|
ks = !1;
|
|
5000
5002
|
};
|
|
5001
|
-
return
|
|
5002
|
-
|
|
5003
|
+
return Es("online", e), Es("offline", n), () => {
|
|
5004
|
+
xs("online", e), xs("offline", n);
|
|
5003
5005
|
};
|
|
5004
5006
|
}, hc = {
|
|
5005
5007
|
isOnline: uc,
|
|
@@ -5007,7 +5009,7 @@ const uc = () => ks, [xs, Es] = Xt && window.addEventListener ? [
|
|
|
5007
5009
|
}, pc = {
|
|
5008
5010
|
initFocus: lc,
|
|
5009
5011
|
initReconnect: fc
|
|
5010
|
-
},
|
|
5012
|
+
}, xr = !Gt.useId, Ht = !Xt || oc, mc = (t) => cc() ? window.requestAnimationFrame(t) : setTimeout(t, 1), Wn = Ht ? ha : pa, Un = typeof navigator != "undefined" && navigator.connection, Sr = !Ht && Un && ([
|
|
5011
5013
|
"slow-2g",
|
|
5012
5014
|
"2g"
|
|
5013
5015
|
].includes(Un.effectiveType) || Un.saveData), sn = /* @__PURE__ */ new WeakMap(), Vn = (t, e) => bs.prototype.toString.call(t) === `[object ${e}]`;
|
|
@@ -5071,9 +5073,9 @@ function Qr(...t) {
|
|
|
5071
5073
|
return Ie(this, null, function* () {
|
|
5072
5074
|
const [g] = js(k);
|
|
5073
5075
|
if (!g) return;
|
|
5074
|
-
const [b, m] = Yr(e, g), [_, l,
|
|
5076
|
+
const [b, m] = Yr(e, g), [_, l, A, I] = Re.get(e), K = () => {
|
|
5075
5077
|
const fe = _[g];
|
|
5076
|
-
return (we(a.revalidate) ? a.revalidate(b().data, k) : a.revalidate !== !1) && (delete
|
|
5078
|
+
return (we(a.revalidate) ? a.revalidate(b().data, k) : a.revalidate !== !1) && (delete A[g], delete I[g], fe && fe[0]) ? fe[0](Jr).then(() => b().data) : b().data;
|
|
5077
5079
|
};
|
|
5078
5080
|
if (t.length < 3)
|
|
5079
5081
|
return K();
|
|
@@ -5203,16 +5205,16 @@ const Or = (t, e) => {
|
|
|
5203
5205
|
},
|
|
5204
5206
|
// use web preset by default
|
|
5205
5207
|
hc
|
|
5206
|
-
),
|
|
5208
|
+
), Ec = (t, e) => {
|
|
5207
5209
|
const n = Ue(t, e);
|
|
5208
5210
|
if (e) {
|
|
5209
5211
|
const { use: s, fallback: r } = t, { use: a, fallback: i } = e;
|
|
5210
5212
|
s && a && (n.use = s.concat(a)), r && i && (n.fallback = Ue(r, i));
|
|
5211
5213
|
}
|
|
5212
5214
|
return n;
|
|
5213
|
-
},
|
|
5215
|
+
}, xc = fa({}), Sc = "$inf$", ta = Xt && window.__SWR_DEVTOOLS_USE__, Oc = ta ? window.__SWR_DEVTOOLS_USE__ : [], Tc = () => {
|
|
5214
5216
|
ta && (window.__SWR_DEVTOOLS_REACT__ = Gt);
|
|
5215
|
-
},
|
|
5217
|
+
}, Cc = (t) => we(t[1]) ? [
|
|
5216
5218
|
t[0],
|
|
5217
5219
|
t[1],
|
|
5218
5220
|
t[2] || {}
|
|
@@ -5220,14 +5222,14 @@ const Or = (t, e) => {
|
|
|
5220
5222
|
t[0],
|
|
5221
5223
|
null,
|
|
5222
5224
|
(t[1] === null ? t[2] : t[1]) || {}
|
|
5223
|
-
],
|
|
5225
|
+
], Ac = () => Ue(kc, ma(xc)), Nc = (t) => (e, n, s) => t(e, n && ((...a) => {
|
|
5224
5226
|
const [i] = js(e), [, , , o] = Re.get(ea);
|
|
5225
5227
|
if (i.startsWith(Sc))
|
|
5226
5228
|
return n(...a);
|
|
5227
5229
|
const c = o[i];
|
|
5228
5230
|
return R(c) ? n(...a) : (delete o[i], c);
|
|
5229
5231
|
}), s), Rc = Oc.concat(Nc), Pc = (t) => function(...n) {
|
|
5230
|
-
const s =
|
|
5232
|
+
const s = Ac(), [r, a, i] = Cc(n), o = Ec(s, i);
|
|
5231
5233
|
let c = t;
|
|
5232
5234
|
const { use: u } = o, h = (u || []).concat(Rc);
|
|
5233
5235
|
for (let p = h.length; p--; )
|
|
@@ -5263,7 +5265,7 @@ const zn = Gt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
5263
5265
|
}), Kn = {
|
|
5264
5266
|
dedupe: !0
|
|
5265
5267
|
}, jc = (t, e, n) => {
|
|
5266
|
-
const { cache: s, compare: r, suspense: a, fallbackData: i, revalidateOnMount: o, revalidateIfStale: c, refreshInterval: u, refreshWhenHidden: h, refreshWhenOffline: p, keepPreviousData: k } = n, [g, b, m, _] = Re.get(s), [l,
|
|
5268
|
+
const { cache: s, compare: r, suspense: a, fallbackData: i, revalidateOnMount: o, revalidateIfStale: c, refreshInterval: u, refreshWhenHidden: h, refreshWhenOffline: p, keepPreviousData: k } = n, [g, b, m, _] = Re.get(s), [l, A] = js(t), I = Be(!1), K = Be(!1), Z = Be(l), V = Be(e), D = Be(n), M = () => D.current, G = () => M().isVisible() && M().isOnline(), [$, st, Ve, fe] = Yr(s, l), rt = Be({}).current, Yt = R(i) ? R(n.fallback) ? te : n.fallback[l] : i, Zs = (F, L) => {
|
|
5267
5269
|
for (const J in rt) {
|
|
5268
5270
|
const z = J;
|
|
5269
5271
|
if (z === "data") {
|
|
@@ -5301,13 +5303,13 @@ const zn = Gt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
5301
5303
|
s,
|
|
5302
5304
|
l
|
|
5303
5305
|
]
|
|
5304
|
-
), Ds[0], Ds[1]), Ms = !
|
|
5306
|
+
), Ds[0], Ds[1]), Ms = !I.current, na = g[l] && g[l].length > 0, it = at.data, ze = R(it) ? Yt && Xr(Yt) ? zn(Yt) : Yt : it, Qt = at.error, Cn = Be(ze), en = k ? R(it) ? R(Cn.current) ? ze : Cn.current : it : ze, Ls = na && !R(Qt) ? !1 : Ms && !R(o) ? o : M().isPaused() ? !1 : a ? R(ze) ? !1 : c : R(ze) || c, $s = !!(l && e && Ms && Ls), sa = R(at.isValidating) ? $s : at.isValidating, ra = R(at.isLoading) ? $s : at.isLoading, wt = rn(
|
|
5305
5307
|
(F) => Ie(void 0, null, function* () {
|
|
5306
5308
|
const L = V.current;
|
|
5307
5309
|
if (!l || !L || K.current || M().isPaused())
|
|
5308
5310
|
return !1;
|
|
5309
5311
|
let J, z, he = !0;
|
|
5310
|
-
const ot = F || {}, H = !m[l] || !ot.dedupe, Q = () =>
|
|
5312
|
+
const ot = F || {}, H = !m[l] || !ot.dedupe, Q = () => xr ? !K.current && l === Z.current && I.current : l === Z.current, Oe = {
|
|
5311
5313
|
isValidating: !1,
|
|
5312
5314
|
isLoading: !1
|
|
5313
5315
|
}, Ws = () => {
|
|
@@ -5323,7 +5325,7 @@ const zn = Gt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
5323
5325
|
if (H && (st(Vs), n.loadingTimeout && R($().data) && setTimeout(() => {
|
|
5324
5326
|
he && Q() && M().onLoadingSlow(l, n);
|
|
5325
5327
|
}, n.loadingTimeout), m[l] = [
|
|
5326
|
-
L(
|
|
5328
|
+
L(A),
|
|
5327
5329
|
Os()
|
|
5328
5330
|
]), [J, z] = m[l], J = yield J, H && setTimeout(Us, n.dedupingInterval), !m[l] || m[l][1] !== z)
|
|
5329
5331
|
return H && Q() && M().onDiscarded(l), !1;
|
|
@@ -5338,8 +5340,8 @@ const zn = Gt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
5338
5340
|
Oe.data = r(Te, J) ? Te : J, H && Q() && M().onSuccess(J, l, n);
|
|
5339
5341
|
} catch (de) {
|
|
5340
5342
|
Us();
|
|
5341
|
-
const Te = M(), { shouldRetryOnError:
|
|
5342
|
-
Te.isPaused() || (Oe.error = de, H && Q() && (Te.onError(de, l, Te), (
|
|
5343
|
+
const Te = M(), { shouldRetryOnError: An } = Te;
|
|
5344
|
+
Te.isPaused() || (Oe.error = de, H && Q() && (Te.onError(de, l, Te), (An === !0 || we(An) && An(de)) && (!M().revalidateOnFocus || !M().revalidateOnReconnect || G()) && Te.onErrorRetry(de, l, Te, (aa) => {
|
|
5343
5345
|
const Nn = g[l];
|
|
5344
5346
|
Nn && Nn[0] && Nn[0](kr, aa);
|
|
5345
5347
|
}, {
|
|
@@ -5371,7 +5373,7 @@ const zn = Gt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
5371
5373
|
[]
|
|
5372
5374
|
);
|
|
5373
5375
|
if (Wn(() => {
|
|
5374
|
-
V.current = e, D.current = n, R(it) || (
|
|
5376
|
+
V.current = e, D.current = n, R(it) || (Cn.current = it);
|
|
5375
5377
|
}), Wn(() => {
|
|
5376
5378
|
if (!l) return;
|
|
5377
5379
|
const F = wt.bind(te, Kn);
|
|
@@ -5390,8 +5392,8 @@ const zn = Gt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
5390
5392
|
return wt(ot);
|
|
5391
5393
|
}
|
|
5392
5394
|
});
|
|
5393
|
-
return K.current = !1, Z.current = l,
|
|
5394
|
-
_k:
|
|
5395
|
+
return K.current = !1, Z.current = l, I.current = !0, st({
|
|
5396
|
+
_k: A
|
|
5395
5397
|
}), Ls && (R(ze) || Ht ? F() : mc(F)), () => {
|
|
5396
5398
|
K.current = !0, z();
|
|
5397
5399
|
};
|
|
@@ -5415,7 +5417,7 @@ const zn = Gt.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
5415
5417
|
p,
|
|
5416
5418
|
l
|
|
5417
5419
|
]), ga(en), a && R(ze) && l) {
|
|
5418
|
-
if (!
|
|
5420
|
+
if (!xr && Ht)
|
|
5419
5421
|
throw new Error("Fallback data is required when using Suspense in SSR.");
|
|
5420
5422
|
V.current = e, D.current = n, K.current = !1;
|
|
5421
5423
|
const F = _[l];
|