Your Name 1912bcd25b
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled
chore: sync all remaining local workspace changes
2026-05-08 11:26:57 +08:00

1600 lines
52 KiB
JavaScript

/*
* Extracted from browser-delivered Turbopack chunk: ffa5de913d3f001d.98ff1c0dc5.js
* Module id: 832082
* For reading/searching only; this factory depends on the original Turbopack runtime.
*/
const moduleFactory = (e, t, r) => {
"use strict";
var n = e.r(111558),
a = { stream: !0 },
l = Object.prototype.hasOwnProperty;
function u(t) {
var r = e.r(t);
return "function" != typeof r.then || "fulfilled" === r.status
? null
: (r.then(
function (e) {
(r.status = "fulfilled"), (r.value = e);
},
function (e) {
(r.status = "rejected"), (r.reason = e);
},
),
r);
}
var o = new WeakSet(),
i = new WeakSet();
function s() {}
function c(t) {
for (var r = t[1], n = [], a = 0; a < r.length; a++) {
var l = e.L(r[a]);
if ((i.has(l) || n.push(l), !o.has(l))) {
var c = i.add.bind(i, l);
l.then(c, s), o.add(l);
}
}
return 4 === t.length
? 0 === n.length
? u(t[0])
: Promise.all(n).then(function () {
return u(t[0]);
})
: 0 < n.length
? Promise.all(n)
: null;
}
function f(t) {
var r = e.r(t[0]);
if (4 === t.length && "function" == typeof r.then)
if ("fulfilled" === r.status) r = r.value;
else throw r.reason;
return "*" === t[2]
? r
: "" === t[2]
? r.__esModule
? r.default
: r
: l.call(r, t[2])
? r[t[2]]
: void 0;
}
var d = n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
h = Symbol.for("react.transitional.element"),
p = Symbol.for("react.lazy"),
y = Symbol.iterator,
g = Symbol.asyncIterator,
v = Array.isArray,
_ = Object.getPrototypeOf,
b = Object.prototype,
R = new WeakMap();
function m(e, t, r) {
R.has(e) || R.set(e, { id: t, originalBind: e.bind, bound: r });
}
function P(e, t, r) {
(this.status = e), (this.value = t), (this.reason = r);
}
function E(e) {
switch (e.status) {
case "resolved_model":
U(e);
break;
case "resolved_module":
k(e);
}
switch (e.status) {
case "fulfilled":
return e.value;
case "pending":
case "blocked":
case "halted":
throw e;
default:
throw e.reason;
}
}
function S(e, t, r, n) {
for (var a = 0; a < t.length; a++) {
var l = t[a];
"function" == typeof l ? l(r) : x(e, l, r, n);
}
}
function O(e, t, r) {
for (var n = 0; n < t.length; n++) {
var a = t[n];
"function" == typeof a ? a(r) : H(e, a.handler, r);
}
}
function T(e, t) {
var r = t.handler.chunk;
if (null === r) return null;
if (r === e) return t.handler;
if (null !== (t = r.value))
for (r = 0; r < t.length; r++) {
var n = t[r];
if ("function" != typeof n && null !== (n = T(e, n))) return n;
}
return null;
}
function w(e, t, r, n) {
switch (t.status) {
case "fulfilled":
S(e, r, t.value, t);
break;
case "blocked":
for (var a = 0; a < r.length; a++) {
var l = r[a];
if ("function" != typeof l) {
var u = T(t, l);
if (null !== u)
switch (
(x(e, l, u.value, t),
r.splice(a, 1),
a--,
null !== n && -1 !== (l = n.indexOf(l)) && n.splice(l, 1),
t.status)
) {
case "fulfilled":
S(e, r, t.value, t);
return;
case "rejected":
null !== n && O(e, n, t.reason);
return;
}
}
}
case "pending":
if (t.value) for (e = 0; e < r.length; e++) t.value.push(r[e]);
else t.value = r;
if (t.reason) {
if (n) for (r = 0; r < n.length; r++) t.reason.push(n[r]);
} else t.reason = n;
break;
case "rejected":
n && O(e, n, t.reason);
}
}
function j(e, t, r) {
if ("pending" !== t.status && "blocked" !== t.status) t.reason.error(r);
else {
var n = t.reason;
(t.status = "rejected"), (t.reason = r), null !== n && O(e, n, r);
}
}
function M(e, t, r) {
return new P(
"resolved_model",
(r ? '{"done":true,"value":' : '{"done":false,"value":') + t + "}",
e,
);
}
function A(e, t, r, n) {
C(
e,
t,
(n ? '{"done":true,"value":' : '{"done":false,"value":') + r + "}",
);
}
function C(e, t, r) {
if ("pending" !== t.status) t.reason.enqueueModel(r);
else {
var n = t.value,
a = t.reason;
(t.status = "resolved_model"),
(t.value = r),
(t.reason = e),
null !== n && (U(t), w(e, t, n, a));
}
}
function N(e, t, r) {
if ("pending" === t.status || "blocked" === t.status) {
var n = t.value,
a = t.reason;
(t.status = "resolved_module"),
(t.value = r),
(t.reason = null),
null !== n && (k(t), w(e, t, n, a));
}
}
(P.prototype = Object.create(Promise.prototype)),
(P.prototype.then = function (e, t) {
switch (this.status) {
case "resolved_model":
U(this);
break;
case "resolved_module":
k(this);
}
switch (this.status) {
case "fulfilled":
"function" == typeof e && e(this.value);
break;
case "pending":
case "blocked":
"function" == typeof e &&
(null === this.value && (this.value = []), this.value.push(e)),
"function" == typeof t &&
(null === this.reason && (this.reason = []),
this.reason.push(t));
break;
case "halted":
break;
default:
"function" == typeof t && t(this.reason);
}
});
var F = null;
function U(e) {
var t = F;
F = null;
var r = e.value,
n = e.reason;
(e.status = "blocked"), (e.value = null), (e.reason = null);
try {
var a = JSON.parse(r, n._fromJSON),
l = e.value;
if (null !== l)
for (e.value = null, e.reason = null, r = 0; r < l.length; r++) {
var u = l[r];
"function" == typeof u ? u(a) : x(n, u, a, e);
}
if (null !== F) {
if (F.errored) throw F.reason;
if (0 < F.deps) {
(F.value = a), (F.chunk = e);
return;
}
}
(e.status = "fulfilled"), (e.value = a);
} catch (t) {
(e.status = "rejected"), (e.reason = t);
} finally {
F = t;
}
}
function k(e) {
try {
var t = f(e.value);
(e.status = "fulfilled"), (e.value = t);
} catch (t) {
(e.status = "rejected"), (e.reason = t);
}
}
function I(e, t) {
(e._closed = !0),
(e._closedReason = t),
e._chunks.forEach(function (r) {
"pending" === r.status
? j(e, r, t)
: "fulfilled" === r.status &&
null !== r.reason &&
r.reason.error(t);
});
}
function L(e) {
return { $$typeof: p, _payload: e, _init: E };
}
function D(e, t) {
var r = e._chunks,
n = r.get(t);
return (
n ||
((n = e._closed
? new P("rejected", null, e._closedReason)
: new P("pending", null, null)),
r.set(t, n)),
n
);
}
function x(e, t, r) {
var n = t.handler,
a = t.parentObject,
u = t.key,
o = t.map,
i = t.path;
try {
for (var s = 1; s < i.length; s++) {
for (; "object" == typeof r && null !== r && r.$$typeof === p; ) {
var c = r._payload;
if (c === n.chunk) r = n.value;
else {
switch (c.status) {
case "resolved_model":
U(c);
break;
case "resolved_module":
k(c);
}
switch (c.status) {
case "fulfilled":
r = c.value;
continue;
case "blocked":
var f = T(c, t);
if (null !== f) {
r = f.value;
continue;
}
case "pending":
i.splice(0, s - 1),
null === c.value ? (c.value = [t]) : c.value.push(t),
null === c.reason ? (c.reason = [t]) : c.reason.push(t);
return;
case "halted":
return;
default:
H(e, t.handler, c.reason);
return;
}
}
}
var d = i[s];
if ("object" == typeof r && null !== r && l.call(r, d)) r = r[d];
else throw Error("Invalid reference.");
}
for (; "object" == typeof r && null !== r && r.$$typeof === p; ) {
var y = r._payload;
if (y === n.chunk) r = n.value;
else {
switch (y.status) {
case "resolved_model":
U(y);
break;
case "resolved_module":
k(y);
}
if ("fulfilled" === y.status) {
r = y.value;
continue;
}
break;
}
}
var g = o(e, r, a, u);
if (
("__proto__" !== u && (a[u] = g),
"" === u && null === n.value && (n.value = g),
a[0] === h &&
"object" == typeof n.value &&
null !== n.value &&
n.value.$$typeof === h)
) {
var v = n.value;
"3" === u && (v.props = g);
}
} catch (r) {
H(e, t.handler, r);
return;
}
n.deps--,
0 === n.deps &&
null !== (t = n.chunk) &&
"blocked" === t.status &&
((r = t.value),
(t.status = "fulfilled"),
(t.value = n.value),
(t.reason = n.reason),
null !== r && S(e, r, n.value, t));
}
function H(e, t, r) {
t.errored ||
((t.errored = !0),
(t.value = null),
(t.reason = r),
null !== (t = t.chunk) && "blocked" === t.status && j(e, t, r));
}
function B(e, t, r, n, a, l) {
return (
F
? ((n = F), n.deps++)
: (n = F =
{
parent: null,
chunk: null,
value: null,
reason: null,
deps: 1,
errored: !1,
}),
(t = { handler: n, parentObject: t, key: r, map: a, path: l }),
null === e.value ? (e.value = [t]) : e.value.push(t),
null === e.reason ? (e.reason = [t]) : e.reason.push(t),
null
);
}
function $(e, t, r, n) {
if (!e._serverReferenceConfig)
return (function (e, t) {
function r() {
var e = Array.prototype.slice.call(arguments);
return a
? "fulfilled" === a.status
? t(n, a.value.concat(e))
: Promise.resolve(a).then(function (r) {
return t(n, r.concat(e));
})
: t(n, e);
}
var n = e.id,
a = e.bound;
return m(r, n, a), r;
})(t, e._callServer);
var a = (function (e, t) {
var r = "",
n = e[t];
if (n) r = n.name;
else {
var a = t.lastIndexOf("#");
if (
(-1 !== a && ((r = t.slice(a + 1)), (n = e[t.slice(0, a)])), !n)
)
throw Error(
'Could not find the module "' +
t +
'" in the React Server Manifest. This is probably a bug in the React Server Components bundler.',
);
}
return n.async ? [n.id, n.chunks, r, 1] : [n.id, n.chunks, r];
})(e._serverReferenceConfig, t.id),
l = c(a);
if (l) t.bound && (l = Promise.all([l, t.bound]));
else {
if (!t.bound) return m((l = f(a)), t.id, t.bound), l;
l = Promise.resolve(t.bound);
}
if (F) {
var u = F;
u.deps++;
} else
u = F = {
parent: null,
chunk: null,
value: null,
reason: null,
deps: 1,
errored: !1,
};
return (
l.then(
function () {
var l = f(a);
if (t.bound) {
var o = t.bound.value.slice(0);
o.unshift(null), (l = l.bind.apply(l, o));
}
m(l, t.id, t.bound),
"__proto__" !== n && (r[n] = l),
"" === n && null === u.value && (u.value = l),
r[0] === h &&
"object" == typeof u.value &&
null !== u.value &&
u.value.$$typeof === h &&
((o = u.value), "3" === n) &&
(o.props = l),
u.deps--,
0 === u.deps &&
null !== (l = u.chunk) &&
"blocked" === l.status &&
((o = l.value),
(l.status = "fulfilled"),
(l.value = u.value),
(l.reason = null),
null !== o && S(e, o, u.value, l));
},
function (t) {
if (!u.errored) {
(u.errored = !0), (u.value = null), (u.reason = t);
var r = u.chunk;
null !== r && "blocked" === r.status && j(e, r, t);
}
},
),
null
);
}
function K(e, t, r, n, a) {
var l = parseInt((t = t.split(":"))[0], 16);
switch ((l = D(e, l)).status) {
case "resolved_model":
U(l);
break;
case "resolved_module":
k(l);
}
switch (l.status) {
case "fulfilled":
l = l.value;
for (var u = 1; u < t.length; u++) {
for (; "object" == typeof l && null !== l && l.$$typeof === p; ) {
switch ((l = l._payload).status) {
case "resolved_model":
U(l);
break;
case "resolved_module":
k(l);
}
switch (l.status) {
case "fulfilled":
l = l.value;
break;
case "blocked":
case "pending":
return B(l, r, n, e, a, t.slice(u - 1));
case "halted":
return (
F
? ((e = F), e.deps++)
: (F = {
parent: null,
chunk: null,
value: null,
reason: null,
deps: 1,
errored: !1,
}),
null
);
default:
return (
F
? ((F.errored = !0),
(F.value = null),
(F.reason = l.reason))
: (F = {
parent: null,
chunk: null,
value: null,
reason: l.reason,
deps: 0,
errored: !0,
}),
null
);
}
}
l = l[t[u]];
}
for (; "object" == typeof l && null !== l && l.$$typeof === p; ) {
switch ((t = l._payload).status) {
case "resolved_model":
U(t);
break;
case "resolved_module":
k(t);
}
if ("fulfilled" === t.status) {
l = t.value;
continue;
}
break;
}
return a(e, l, r, n);
case "pending":
case "blocked":
return B(l, r, n, e, a, t);
case "halted":
return (
F
? ((e = F), e.deps++)
: (F = {
parent: null,
chunk: null,
value: null,
reason: null,
deps: 1,
errored: !1,
}),
null
);
default:
return (
F
? ((F.errored = !0), (F.value = null), (F.reason = l.reason))
: (F = {
parent: null,
chunk: null,
value: null,
reason: l.reason,
deps: 0,
errored: !0,
}),
null
);
}
}
function V(e, t) {
return new Map(t);
}
function q(e, t) {
return new Set(t);
}
function G(e, t) {
return new Blob(t.slice(1), { type: t[0] });
}
function W(e, t) {
e = new FormData();
for (var r = 0; r < t.length; r++) e.append(t[r][0], t[r][1]);
return e;
}
function X(e, t) {
return t[Symbol.iterator]();
}
function z(e, t) {
return t;
}
function Y() {
throw Error(
'Trying to call a function from "use server" but the callServer option was not implemented in your router runtime.',
);
}
function Q(e, t, r, n, a, l, u) {
var o,
i = new Map();
(this._bundlerConfig = e),
(this._serverReferenceConfig = t),
(this._moduleLoading = r),
(this._callServer = void 0 !== n ? n : Y),
(this._encodeFormAction = a),
(this._nonce = l),
(this._chunks = i),
(this._stringDecoder = new TextDecoder()),
(this._fromJSON = null),
(this._closed = !1),
(this._closedReason = null),
(this._tempRefs = u),
(this._fromJSON =
((o = this),
function (e, t) {
if ("__proto__" !== e) {
if ("string" == typeof t) {
var r = o,
n = this,
a = e,
l = t;
if ("$" === l[0]) {
if ("$" === l)
return (
null !== F &&
"0" === a &&
(F = {
parent: F,
chunk: null,
value: null,
reason: null,
deps: 0,
errored: !1,
}),
h
);
switch (l[1]) {
case "$":
return l.slice(1);
case "L":
return L((r = D(r, (n = parseInt(l.slice(2), 16)))));
case "@":
return D(r, (n = parseInt(l.slice(2), 16)));
case "S":
return Symbol.for(l.slice(2));
case "h":
return K(r, (l = l.slice(2)), n, a, $);
case "T":
if (((n = "$" + l.slice(2)), null == (r = r._tempRefs)))
throw Error(
"Missing a temporary reference set but the RSC response returned a temporary reference. Pass a temporaryReference option with the set that was used with the reply.",
);
return r.get(n);
case "Q":
return K(r, (l = l.slice(2)), n, a, V);
case "W":
return K(r, (l = l.slice(2)), n, a, q);
case "B":
return K(r, (l = l.slice(2)), n, a, G);
case "K":
return K(r, (l = l.slice(2)), n, a, W);
case "Z":
return en();
case "i":
return K(r, (l = l.slice(2)), n, a, X);
case "I":
return 1 / 0;
case "-":
return "$-0" === l ? -0 : -1 / 0;
case "N":
return NaN;
case "u":
return;
case "D":
return new Date(Date.parse(l.slice(2)));
case "n":
return BigInt(l.slice(2));
default:
return K(r, (l = l.slice(1)), n, a, z);
}
}
return l;
}
if ("object" == typeof t && null !== t) {
if (t[0] === h) {
if (
((e = {
$$typeof: h,
type: t[1],
key: t[2],
ref: null,
props: t[3],
}),
null !== F)
) {
if (((F = (t = F).parent), t.errored))
e = L((e = new P("rejected", null, t.reason)));
else if (0 < t.deps) {
var u = new P("blocked", null, null);
(t.value = e), (t.chunk = u), (e = L(u));
}
}
} else e = t;
return e;
}
return t;
}
}));
}
function J(e, t, r) {
var n = (e = e._chunks).get(t);
n && "pending" !== n.status
? n.reason.enqueueValue(r)
: ((r = new P("fulfilled", r, null)), e.set(t, r));
}
function Z(e, t, r, n) {
var a = e._chunks,
l = a.get(t);
l
? "pending" === l.status &&
((t = l.value),
(l.status = "fulfilled"),
(l.value = r),
(l.reason = n),
null !== t && S(e, t, l.value, l))
: ((e = new P("fulfilled", r, n)), a.set(t, e));
}
function ee(e, t, r) {
var n = null,
a = !1;
r = new ReadableStream({
type: r,
start: function (e) {
n = e;
},
});
var l = null;
Z(e, t, r, {
enqueueValue: function (e) {
null === l
? n.enqueue(e)
: l.then(function () {
n.enqueue(e);
});
},
enqueueModel: function (t) {
if (null === l) {
var r = new P("resolved_model", t, e);
U(r),
"fulfilled" === r.status
? n.enqueue(r.value)
: (r.then(
function (e) {
return n.enqueue(e);
},
function (e) {
return n.error(e);
},
),
(l = r));
} else {
r = l;
var a = new P("pending", null, null);
a.then(
function (e) {
return n.enqueue(e);
},
function (e) {
return n.error(e);
},
),
(l = a),
r.then(function () {
l === a && (l = null), C(e, a, t);
});
}
},
close: function () {
if (!a)
if (((a = !0), null === l)) n.close();
else {
var e = l;
(l = null),
e.then(function () {
return n.close();
});
}
},
error: function (e) {
if (!a)
if (((a = !0), null === l)) n.error(e);
else {
var t = l;
(l = null),
t.then(function () {
return n.error(e);
});
}
},
});
}
function et() {
return this;
}
function er(e, t, r) {
var n = [],
a = !1,
l = 0,
u = {};
(u[g] = function () {
var e,
t = 0;
return (
((e = {
next: (e = function (e) {
if (void 0 !== e)
throw Error(
"Values cannot be passed to next() of AsyncIterables passed to Client Components.",
);
if (t === n.length) {
if (a)
return new P("fulfilled", { done: !0, value: void 0 }, null);
n[t] = new P("pending", null, null);
}
return n[t++];
}),
})[g] = et),
e
);
}),
Z(e, t, r ? u[g]() : u, {
enqueueValue: function (t) {
if (l === n.length)
n[l] = new P("fulfilled", { done: !1, value: t }, null);
else {
var r = n[l],
a = r.value,
u = r.reason;
(r.status = "fulfilled"),
(r.value = { done: !1, value: t }),
(r.reason = null),
null !== a && w(e, r, a, u);
}
l++;
},
enqueueModel: function (t) {
l === n.length ? (n[l] = M(e, t, !1)) : A(e, n[l], t, !1), l++;
},
close: function (t) {
if (!a)
for (
a = !0,
l === n.length ? (n[l] = M(e, t, !0)) : A(e, n[l], t, !0),
l++;
l < n.length;
)
A(e, n[l++], '"$undefined"', !0);
},
error: function (t) {
if (!a)
for (
a = !0, l === n.length && (n[l] = new P("pending", null, null));
l < n.length;
)
j(e, n[l++], t);
},
});
}
function en() {
var e = Error(
"An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.",
);
return (e.stack = "Error: " + e.message), e;
}
function ea(e, t) {
for (var r = e.length, n = t.length, a = 0; a < r; a++)
n += e[a].byteLength;
n = new Uint8Array(n);
for (var l = (a = 0); l < r; l++) {
var u = e[l];
n.set(u, a), (a += u.byteLength);
}
return n.set(t, a), n;
}
function el(e, t, r, n, a, l) {
J(
e,
t,
(a = new a(
(r = 0 === r.length && 0 == n.byteOffset % l ? n : ea(r, n)).buffer,
r.byteOffset,
r.byteLength / l,
)),
);
}
function eu(e) {
I(e, Error("Connection closed."));
}
function eo(e) {
return new Q(
null,
null,
null,
e && e.callServer ? e.callServer : void 0,
void 0,
void 0,
e && e.temporaryReferences ? e.temporaryReferences : void 0,
);
}
function ei(e, t, r) {
function n(t) {
I(e, t);
}
var l = {
_rowState: 0,
_rowID: 0,
_rowTag: 0,
_rowLength: 0,
_buffer: [],
},
u = t.getReader();
u.read()
.then(function t(o) {
var i = o.value;
if (o.done) return r();
var s = 0,
f = l._rowState;
o = l._rowID;
for (
var h = l._rowTag, p = l._rowLength, y = l._buffer, g = i.length;
s < g;
) {
var v = -1;
switch (f) {
case 0:
58 === (v = i[s++])
? (f = 1)
: (o = (o << 4) | (96 < v ? v - 87 : v - 48));
continue;
case 1:
84 === (f = i[s]) ||
65 === f ||
79 === f ||
111 === f ||
98 === f ||
85 === f ||
83 === f ||
115 === f ||
76 === f ||
108 === f ||
71 === f ||
103 === f ||
77 === f ||
109 === f ||
86 === f
? ((h = f), (f = 2), s++)
: (64 < f && 91 > f) || 35 === f || 114 === f || 120 === f
? ((h = f), (f = 3), s++)
: ((h = 0), (f = 3));
continue;
case 2:
44 === (v = i[s++])
? (f = 4)
: (p = (p << 4) | (96 < v ? v - 87 : v - 48));
continue;
case 3:
v = i.indexOf(10, s);
break;
case 4:
(v = s + p) > i.length && (v = -1);
}
var _ = i.byteOffset + s;
if (-1 < v)
(p = new Uint8Array(i.buffer, _, v - s)),
98 === h
? J(e, o, v === g ? p : p.slice())
: (function (e, t, r, n, l, u) {
switch (n) {
case 65:
J(e, r, ea(l, u).buffer);
return;
case 79:
el(e, r, l, u, Int8Array, 1);
return;
case 111:
J(e, r, 0 === l.length ? u : ea(l, u));
return;
case 85:
el(e, r, l, u, Uint8ClampedArray, 1);
return;
case 83:
el(e, r, l, u, Int16Array, 2);
return;
case 115:
el(e, r, l, u, Uint16Array, 2);
return;
case 76:
el(e, r, l, u, Int32Array, 4);
return;
case 108:
el(e, r, l, u, Uint32Array, 4);
return;
case 71:
el(e, r, l, u, Float32Array, 4);
return;
case 103:
el(e, r, l, u, Float64Array, 8);
return;
case 77:
el(e, r, l, u, BigInt64Array, 8);
return;
case 109:
el(e, r, l, u, BigUint64Array, 8);
return;
case 86:
el(e, r, l, u, DataView, 1);
return;
}
t = e._stringDecoder;
for (var o = "", i = 0; i < l.length; i++)
o += t.decode(l[i], a);
switch (((l = o += t.decode(u)), n)) {
case 73:
var s = e,
f = r,
h = l,
p = s._chunks,
y = p.get(f);
h = JSON.parse(h, s._fromJSON);
var g = (function (e, t) {
if (e) {
var r = e[t[0]];
if ((e = r && r[t[2]])) r = e.name;
else {
if (!(e = r && r["*"]))
throw Error(
'Could not find the module "' +
t[0] +
'" in the React Server Consumer Manifest. This is probably a bug in the React Server Components bundler.',
);
r = t[2];
}
return 4 === t.length
? [e.id, e.chunks, r, 1]
: [e.id, e.chunks, r];
}
return t;
})(s._bundlerConfig, h);
if ((h = c(g))) {
if (y) {
var v = y;
v.status = "blocked";
} else
(v = new P("blocked", null, null)), p.set(f, v);
h.then(
function () {
return N(s, v, g);
},
function (e) {
return j(s, v, e);
},
);
} else
y
? N(s, y, g)
: ((y = new P("resolved_module", g, null)),
p.set(f, y));
break;
case 72:
switch (
((r = l[0]),
(e = JSON.parse((l = l.slice(1)), e._fromJSON)),
(l = d.d),
r)
) {
case "D":
l.D(e);
break;
case "C":
"string" == typeof e ? l.C(e) : l.C(e[0], e[1]);
break;
case "L":
(r = e[0]),
(n = e[1]),
3 === e.length ? l.L(r, n, e[2]) : l.L(r, n);
break;
case "m":
"string" == typeof e ? l.m(e) : l.m(e[0], e[1]);
break;
case "X":
"string" == typeof e ? l.X(e) : l.X(e[0], e[1]);
break;
case "S":
"string" == typeof e
? l.S(e)
: l.S(
e[0],
0 === e[1] ? void 0 : e[1],
3 === e.length ? e[2] : void 0,
);
break;
case "M":
"string" == typeof e ? l.M(e) : l.M(e[0], e[1]);
}
break;
case 69:
(u = (n = e._chunks).get(r)),
(l = JSON.parse(l)),
((t = en()).digest = l.digest),
u
? j(e, u, t)
: ((e = new P("rejected", null, t)), n.set(r, e));
break;
case 84:
(n = (e = e._chunks).get(r)) && "pending" !== n.status
? n.reason.enqueueValue(l)
: ((l = new P("fulfilled", l, null)), e.set(r, l));
break;
case 78:
case 68:
case 74:
case 87:
throw Error(
"Failed to read a RSC payload created by a development version of React on the server while using a production version on the client. Always use matching versions on the server and the client.",
);
case 82:
ee(e, r, void 0);
break;
case 114:
ee(e, r, "bytes");
break;
case 88:
er(e, r, !1);
break;
case 120:
er(e, r, !0);
break;
case 67:
(r = e._chunks.get(r)) &&
"fulfilled" === r.status &&
r.reason.close("" === l ? '"$undefined"' : l);
break;
default:
(u = (n = e._chunks).get(r))
? C(e, u, l)
: ((e = new P("resolved_model", l, e)),
n.set(r, e));
}
})(e, l, o, h, y, p),
(s = v),
3 === f && s++,
(p = o = h = f = 0),
(y.length = 0);
else {
(i = new Uint8Array(i.buffer, _, i.byteLength - s)),
98 === h
? ((p -= i.byteLength), J(e, o, i))
: (y.push(i), (p -= i.byteLength));
break;
}
}
return (
(l._rowState = f),
(l._rowID = o),
(l._rowTag = h),
(l._rowLength = p),
u.read().then(t).catch(n)
);
})
.catch(n);
}
(r.createFromFetch = function (e, t) {
var r = eo(t);
return (
e.then(
function (e) {
ei(r, e.body, eu.bind(null, r));
},
function (e) {
I(r, e);
},
),
D(r, 0)
);
}),
(r.createFromReadableStream = function (e, t) {
return ei((t = eo(t)), e, eu.bind(null, t)), D(t, 0);
}),
(r.createServerReference = function (e, t) {
function r() {
var r = Array.prototype.slice.call(arguments);
return t(e, r);
}
return m(r, e, null), r;
}),
(r.createTemporaryReferenceSet = function () {
return new Map();
}),
(r.encodeReply = function (e, t) {
return new Promise(function (r, n) {
var a = (function (e, t, r, n, a) {
function l(e, t) {
t = new Blob([
new Uint8Array(t.buffer, t.byteOffset, t.byteLength),
]);
var r = i++;
return (
null === c && (c = new FormData()),
c.append("" + r, t),
"$" + e + r.toString(16)
);
}
function u(e, t) {
if (null === t) return null;
if ("object" == typeof t) {
switch (t.$$typeof) {
case h:
if (void 0 !== r && -1 === e.indexOf(":")) {
var m,
P,
E,
S,
O,
T = f.get(this);
if (void 0 !== T) return r.set(T + ":" + e, t), "$T";
}
throw Error(
"React Element cannot be passed to Server Functions from the Client without a temporary reference set. Pass a TemporaryReferenceSet to the options.",
);
case p:
T = t._payload;
var w = t._init;
null === c && (c = new FormData()), s++;
try {
var j = w(T),
M = i++,
A = o(j, M);
return c.append("" + M, A), "$" + M.toString(16);
} catch (e) {
if (
"object" == typeof e &&
null !== e &&
"function" == typeof e.then
) {
s++;
var C = i++;
return (
(T = function () {
try {
var e = o(t, C),
r = c;
r.append("" + C, e), s--, 0 === s && n(r);
} catch (e) {
a(e);
}
}),
e.then(T, T),
"$" + C.toString(16)
);
}
return a(e), null;
} finally {
s--;
}
}
if (((T = f.get(t)), "function" == typeof t.then)) {
if (void 0 !== T)
if (d !== t) return T;
else d = null;
null === c && (c = new FormData()), s++;
var N = i++;
return (
(e = "$@" + N.toString(16)),
f.set(t, e),
t.then(function (e) {
try {
var t = f.get(e),
r = void 0 !== t ? JSON.stringify(t) : o(e, N);
(e = c).append("" + N, r), s--, 0 === s && n(e);
} catch (e) {
a(e);
}
}, a),
e
);
}
if (void 0 !== T)
if (d !== t) return T;
else d = null;
else
-1 === e.indexOf(":") &&
void 0 !== (T = f.get(this)) &&
((e = T + ":" + e),
f.set(t, e),
void 0 !== r && r.set(e, t));
if (v(t)) return t;
if (t instanceof FormData) {
null === c && (c = new FormData());
var F = c,
U = "" + (e = i++) + "_";
return (
t.forEach(function (e, t) {
F.append(U + t, e);
}),
"$K" + e.toString(16)
);
}
if (t instanceof Map)
return (
(e = i++),
(T = o(Array.from(t), e)),
null === c && (c = new FormData()),
c.append("" + e, T),
"$Q" + e.toString(16)
);
if (t instanceof Set)
return (
(e = i++),
(T = o(Array.from(t), e)),
null === c && (c = new FormData()),
c.append("" + e, T),
"$W" + e.toString(16)
);
if (t instanceof ArrayBuffer)
return (
(e = new Blob([t])),
(T = i++),
null === c && (c = new FormData()),
c.append("" + T, e),
"$A" + T.toString(16)
);
if (t instanceof Int8Array) return l("O", t);
if (t instanceof Uint8Array) return l("o", t);
if (t instanceof Uint8ClampedArray) return l("U", t);
if (t instanceof Int16Array) return l("S", t);
if (t instanceof Uint16Array) return l("s", t);
if (t instanceof Int32Array) return l("L", t);
if (t instanceof Uint32Array) return l("l", t);
if (t instanceof Float32Array) return l("G", t);
if (t instanceof Float64Array) return l("g", t);
if (t instanceof BigInt64Array) return l("M", t);
if (t instanceof BigUint64Array) return l("m", t);
if (t instanceof DataView) return l("V", t);
if ("function" == typeof Blob && t instanceof Blob)
return (
null === c && (c = new FormData()),
(e = i++),
c.append("" + e, t),
"$B" + e.toString(16)
);
if (
(e =
null === (m = t) || "object" != typeof m
? null
: "function" ==
typeof (m = (y && m[y]) || m["@@iterator"])
? m
: null)
)
return (T = e.call(t)) === t
? ((e = i++),
(T = o(Array.from(T), e)),
null === c && (c = new FormData()),
c.append("" + e, T),
"$i" + e.toString(16))
: Array.from(T);
if (
"function" == typeof ReadableStream &&
t instanceof ReadableStream
)
return (function (e) {
try {
var t,
r,
l,
o,
f,
d,
h,
p = e.getReader({ mode: "byob" });
} catch (o) {
return (
(t = e.getReader()),
null === c && (c = new FormData()),
(r = c),
s++,
(l = i++),
t.read().then(function e(o) {
if (o.done) r.append("" + l, "C"), 0 == --s && n(r);
else
try {
var i = JSON.stringify(o.value, u);
r.append("" + l, i), t.read().then(e, a);
} catch (e) {
a(e);
}
}, a),
"$R" + l.toString(16)
);
}
return (
(o = p),
null === c && (c = new FormData()),
(f = c),
s++,
(d = i++),
(h = []),
o.read(new Uint8Array(1024)).then(function e(t) {
t.done
? ((t = i++),
f.append("" + t, new Blob(h)),
f.append("" + d, '"$o' + t.toString(16) + '"'),
f.append("" + d, "C"),
0 == --s && n(f))
: (h.push(t.value),
o.read(new Uint8Array(1024)).then(e, a));
}, a),
"$r" + d.toString(16)
);
})(t);
if ("function" == typeof (e = t[g]))
return (
(P = t),
(E = e.call(t)),
null === c && (c = new FormData()),
(S = c),
s++,
(O = i++),
(P = P === E),
E.next().then(function e(t) {
if (t.done) {
if (void 0 === t.value) S.append("" + O, "C");
else
try {
var r = JSON.stringify(t.value, u);
S.append("" + O, "C" + r);
} catch (e) {
a(e);
return;
}
0 == --s && n(S);
} else
try {
var l = JSON.stringify(t.value, u);
S.append("" + O, l), E.next().then(e, a);
} catch (e) {
a(e);
}
}, a),
"$" + (P ? "x" : "X") + O.toString(16)
);
if ((e = _(t)) !== b && (null === e || null !== _(e))) {
if (void 0 === r)
throw Error(
"Only plain objects, and a few built-ins, can be passed to Server Functions. Classes or null prototypes are not supported.",
);
return "$T";
}
return t;
}
if ("string" == typeof t)
return "Z" === t[t.length - 1] && this[e] instanceof Date
? "$D" + t
: (e = "$" === t[0] ? "$" + t : t);
if ("boolean" == typeof t) return t;
if ("number" == typeof t)
return Number.isFinite(t)
? 0 === t && -1 / 0 == 1 / t
? "$-0"
: t
: 1 / 0 === t
? "$Infinity"
: -1 / 0 === t
? "$-Infinity"
: "$NaN";
if (void 0 === t) return "$undefined";
if ("function" == typeof t) {
if (void 0 !== (T = R.get(t)))
return (
void 0 !== (e = f.get(t)) ||
((e = JSON.stringify({ id: T.id, bound: T.bound }, u)),
null === c && (c = new FormData()),
(T = i++),
c.set("" + T, e),
(e = "$h" + T.toString(16)),
f.set(t, e)),
e
);
if (
void 0 !== r &&
-1 === e.indexOf(":") &&
void 0 !== (T = f.get(this))
)
return r.set(T + ":" + e, t), "$T";
throw Error(
"Client Functions cannot be passed directly to Server Functions. Only Functions passed from the Server can be passed back again.",
);
}
if ("symbol" == typeof t) {
if (
void 0 !== r &&
-1 === e.indexOf(":") &&
void 0 !== (T = f.get(this))
)
return r.set(T + ":" + e, t), "$T";
throw Error(
"Symbols cannot be passed to a Server Function without a temporary reference set. Pass a TemporaryReferenceSet to the options.",
);
}
if ("bigint" == typeof t) return "$n" + t.toString(10);
throw Error(
"Type " +
typeof t +
" is not supported as an argument to a Server Function.",
);
}
function o(e, t) {
return (
"object" == typeof e &&
null !== e &&
((t = "$" + t.toString(16)),
f.set(e, t),
void 0 !== r && r.set(t, e)),
(d = e),
JSON.stringify(e, u)
);
}
var i = 1,
s = 0,
c = null,
f = new WeakMap(),
d = e,
m = o(e, 0);
return (
null === c ? n(m) : (c.set("0", m), 0 === s && n(c)),
function () {
0 < s && ((s = 0), null === c ? n(m) : n(c));
}
);
})(
e,
0,
t && t.temporaryReferences ? t.temporaryReferences : void 0,
r,
n,
);
if (t && t.signal) {
var l = t.signal;
if (l.aborted) a(l.reason);
else {
var u = function () {
a(l.reason), l.removeEventListener("abort", u);
};
l.addEventListener("abort", u);
}
}
});
}),
(r.registerServerReference = function (e, t) {
return m(e, t, null), e;
});
};
export default moduleFactory;