cherry-styled-components
Version:
Cherry is a design system for the modern web. Designed in Figma, built in React using Typescript.
1,428 lines (1,426 loc) • 156 kB
JavaScript
import B, { useState as Pr, useMemo as At, useEffect as Vn, useContext as Xn, useRef as Do, useDebugValue as Ur, createElement as No, createContext as Io, forwardRef as re } from "react";
function Lo(e) {
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
var lt = { exports: {} }, rt = {};
/**
* @license React
* react-jsx-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var Gr;
function Mo() {
if (Gr) return rt;
Gr = 1;
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
function r(n, o, i) {
var s = null;
if (i !== void 0 && (s = "" + i), o.key !== void 0 && (s = "" + o.key), "key" in o) {
i = {};
for (var c in o)
c !== "key" && (i[c] = o[c]);
} else i = o;
return o = i.ref, {
$$typeof: e,
type: n,
key: s,
ref: o !== void 0 ? o : null,
props: i
};
}
return rt.Fragment = t, rt.jsx = r, rt.jsxs = r, rt;
}
var nt = {};
/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var Yr;
function zo() {
return Yr || (Yr = 1, process.env.NODE_ENV !== "production" && function() {
function e(a) {
if (a == null) return null;
if (typeof a == "function")
return a.$$typeof === Ae ? null : a.displayName || a.name || null;
if (typeof a == "string") return a;
switch (a) {
case $:
return "Fragment";
case C:
return "Portal";
case F:
return "Profiler";
case S:
return "StrictMode";
case _e:
return "Suspense";
case fe:
return "SuspenseList";
}
if (typeof a == "object")
switch (typeof a.tag == "number" && console.error(
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
), a.$$typeof) {
case de:
return (a.displayName || "Context") + ".Provider";
case V:
return (a._context.displayName || "Context") + ".Consumer";
case Se:
var m = a.render;
return a = a.displayName, a || (a = m.displayName || m.name || "", a = a !== "" ? "ForwardRef(" + a + ")" : "ForwardRef"), a;
case Pe:
return m = a.displayName || null, m !== null ? m : e(a.type) || "Memo";
case Oe:
m = a._payload, a = a._init;
try {
return e(a(m));
} catch {
}
}
return null;
}
function t(a) {
return "" + a;
}
function r(a) {
try {
t(a);
var m = !1;
} catch {
m = !0;
}
if (m) {
m = console;
var b = m.error, j = typeof Symbol == "function" && Symbol.toStringTag && a[Symbol.toStringTag] || a.constructor.name || "Object";
return b.call(
m,
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
j
), t(a);
}
}
function n() {
}
function o() {
if (oe === 0) {
he = console.log, ce = console.info, ge = console.warn, ie = console.error, d = console.group, f = console.groupCollapsed, h = console.groupEnd;
var a = {
configurable: !0,
enumerable: !0,
value: n,
writable: !0
};
Object.defineProperties(console, {
info: a,
log: a,
warn: a,
error: a,
group: a,
groupCollapsed: a,
groupEnd: a
});
}
oe++;
}
function i() {
if (oe--, oe === 0) {
var a = { configurable: !0, enumerable: !0, writable: !0 };
Object.defineProperties(console, {
log: J({}, a, { value: he }),
info: J({}, a, { value: ce }),
warn: J({}, a, { value: ge }),
error: J({}, a, { value: ie }),
group: J({}, a, { value: d }),
groupCollapsed: J({}, a, { value: f }),
groupEnd: J({}, a, { value: h })
});
}
0 > oe && console.error(
"disabledDepth fell below zero. This is a bug in React. Please file an issue."
);
}
function s(a) {
if (k === void 0)
try {
throw Error();
} catch (b) {
var m = b.stack.trim().match(/\n( *(at )?)/);
k = m && m[1] || "", L = -1 < b.stack.indexOf(`
at`) ? " (<anonymous>)" : -1 < b.stack.indexOf("@") ? "@unknown:0:0" : "";
}
return `
` + k + a + L;
}
function c(a, m) {
if (!a || Z) return "";
var b = ue.get(a);
if (b !== void 0) return b;
Z = !0, b = Error.prepareStackTrace, Error.prepareStackTrace = void 0;
var j = null;
j = U.H, U.H = null, o();
try {
var K = {
DetermineComponentFrameRoot: function() {
try {
if (m) {
var Ee = function() {
throw Error();
};
if (Object.defineProperty(Ee.prototype, "props", {
set: function() {
throw Error();
}
}), typeof Reflect == "object" && Reflect.construct) {
try {
Reflect.construct(Ee, []);
} catch (me) {
var ut = me;
}
Reflect.construct(a, [], Ee);
} else {
try {
Ee.call();
} catch (me) {
ut = me;
}
a.call(Ee.prototype);
}
} else {
try {
throw Error();
} catch (me) {
ut = me;
}
(Ee = a()) && typeof Ee.catch == "function" && Ee.catch(function() {
});
}
} catch (me) {
if (me && ut && typeof me.stack == "string")
return [me.stack, ut.stack];
}
return [null, null];
}
};
K.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot";
var q = Object.getOwnPropertyDescriptor(
K.DetermineComponentFrameRoot,
"name"
);
q && q.configurable && Object.defineProperty(
K.DetermineComponentFrameRoot,
"name",
{ value: "DetermineComponentFrameRoot" }
);
var P = K.DetermineComponentFrameRoot(), ye = P[0], We = P[1];
if (ye && We) {
var Q = ye.split(`
`), Te = We.split(`
`);
for (P = q = 0; q < Q.length && !Q[q].includes(
"DetermineComponentFrameRoot"
); )
q++;
for (; P < Te.length && !Te[P].includes(
"DetermineComponentFrameRoot"
); )
P++;
if (q === Q.length || P === Te.length)
for (q = Q.length - 1, P = Te.length - 1; 1 <= q && 0 <= P && Q[q] !== Te[P]; )
P--;
for (; 1 <= q && 0 <= P; q--, P--)
if (Q[q] !== Te[P]) {
if (q !== 1 || P !== 1)
do
if (q--, P--, 0 > P || Q[q] !== Te[P]) {
var tt = `
` + Q[q].replace(
" at new ",
" at "
);
return a.displayName && tt.includes("<anonymous>") && (tt = tt.replace("<anonymous>", a.displayName)), typeof a == "function" && ue.set(a, tt), tt;
}
while (1 <= q && 0 <= P);
break;
}
}
} finally {
Z = !1, U.H = j, i(), Error.prepareStackTrace = b;
}
return Q = (Q = a ? a.displayName || a.name : "") ? s(Q) : "", typeof a == "function" && ue.set(a, Q), Q;
}
function u(a) {
if (a == null) return "";
if (typeof a == "function") {
var m = a.prototype;
return c(
a,
!(!m || !m.isReactComponent)
);
}
if (typeof a == "string") return s(a);
switch (a) {
case _e:
return s("Suspense");
case fe:
return s("SuspenseList");
}
if (typeof a == "object")
switch (a.$$typeof) {
case Se:
return a = c(a.render, !1), a;
case Pe:
return u(a.type);
case Oe:
m = a._payload, a = a._init;
try {
return u(a(m));
} catch {
}
}
return "";
}
function l() {
var a = U.A;
return a === null ? null : a.getOwner();
}
function p(a) {
if (se.call(a, "key")) {
var m = Object.getOwnPropertyDescriptor(a, "key").get;
if (m && m.isReactWarning) return !1;
}
return a.key !== void 0;
}
function y(a, m) {
function b() {
Be || (Be = !0, console.error(
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
m
));
}
b.isReactWarning = !0, Object.defineProperty(a, "key", {
get: b,
configurable: !0
});
}
function g() {
var a = e(this.type);
return Br[a] || (Br[a] = !0, console.error(
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
)), a = this.props.ref, a !== void 0 ? a : null;
}
function v(a, m, b, j, K, q) {
return b = q.ref, a = {
$$typeof: E,
type: a,
key: m,
props: q,
_owner: K
}, (b !== void 0 ? b : null) !== null ? Object.defineProperty(a, "ref", {
enumerable: !1,
get: g
}) : Object.defineProperty(a, "ref", { enumerable: !1, value: null }), a._store = {}, Object.defineProperty(a._store, "validated", {
configurable: !1,
enumerable: !1,
writable: !0,
value: 0
}), Object.defineProperty(a, "_debugInfo", {
configurable: !1,
enumerable: !1,
writable: !0,
value: null
}), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
}
function R(a, m, b, j, K, q) {
if (typeof a == "string" || typeof a == "function" || a === $ || a === F || a === S || a === _e || a === fe || a === Qe || typeof a == "object" && a !== null && (a.$$typeof === Oe || a.$$typeof === Pe || a.$$typeof === de || a.$$typeof === V || a.$$typeof === Se || a.$$typeof === X || a.getModuleId !== void 0)) {
var P = m.children;
if (P !== void 0)
if (j)
if (pe(P)) {
for (j = 0; j < P.length; j++)
T(P[j], a);
Object.freeze && Object.freeze(P);
} else
console.error(
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
);
else T(P, a);
} else
P = "", (a === void 0 || typeof a == "object" && a !== null && Object.keys(a).length === 0) && (P += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."), a === null ? j = "null" : pe(a) ? j = "array" : a !== void 0 && a.$$typeof === E ? (j = "<" + (e(a.type) || "Unknown") + " />", P = " Did you accidentally export a JSX literal instead of a component?") : j = typeof a, console.error(
"React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",
j,
P
);
if (se.call(m, "key")) {
P = e(a);
var ye = Object.keys(m).filter(function(Q) {
return Q !== "key";
});
j = 0 < ye.length ? "{key: someKey, " + ye.join(": ..., ") + ": ...}" : "{key: someKey}", Wr[P + j] || (ye = 0 < ye.length ? "{" + ye.join(": ..., ") + ": ...}" : "{}", console.error(
`A props object containing a "key" prop is being spread into JSX:
let props = %s;
<%s {...props} />
React keys must be passed directly to JSX without using spread:
let props = %s;
<%s key={someKey} {...props} />`,
j,
P,
ye,
P
), Wr[P + j] = !0);
}
if (P = null, b !== void 0 && (r(b), P = "" + b), p(m) && (r(m.key), P = "" + m.key), "key" in m) {
b = {};
for (var We in m)
We !== "key" && (b[We] = m[We]);
} else b = m;
return P && y(
b,
typeof a == "function" ? a.displayName || a.name || "Unknown" : a
), v(a, P, q, K, l(), b);
}
function T(a, m) {
if (typeof a == "object" && a && a.$$typeof !== et) {
if (pe(a))
for (var b = 0; b < a.length; b++) {
var j = a[b];
z(j) && I(j, m);
}
else if (z(a))
a._store && (a._store.validated = 1);
else if (a === null || typeof a != "object" ? b = null : (b = $e && a[$e] || a["@@iterator"], b = typeof b == "function" ? b : null), typeof b == "function" && b !== a.entries && (b = b.call(a), b !== a))
for (; !(a = b.next()).done; )
z(a.value) && I(a.value, m);
}
}
function z(a) {
return typeof a == "object" && a !== null && a.$$typeof === E;
}
function I(a, m) {
if (a._store && !a._store.validated && a.key == null && (a._store.validated = 1, m = w(m), !Fr[m])) {
Fr[m] = !0;
var b = "";
a && a._owner != null && a._owner !== l() && (b = null, typeof a._owner.tag == "number" ? b = e(a._owner.type) : typeof a._owner.name == "string" && (b = a._owner.name), b = " It was passed a child from " + b + ".");
var j = U.getCurrentStack;
U.getCurrentStack = function() {
var K = u(a.type);
return j && (K += j() || ""), K;
}, console.error(
'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
m,
b
), U.getCurrentStack = j;
}
}
function w(a) {
var m = "", b = l();
return b && (b = e(b.type)) && (m = `
Check the render method of \`` + b + "`."), m || (a = e(a)) && (m = `
Check the top-level render call using <` + a + ">."), m;
}
var _ = B, E = Symbol.for("react.transitional.element"), C = Symbol.for("react.portal"), $ = Symbol.for("react.fragment"), S = Symbol.for("react.strict_mode"), F = Symbol.for("react.profiler"), V = Symbol.for("react.consumer"), de = Symbol.for("react.context"), Se = Symbol.for("react.forward_ref"), _e = Symbol.for("react.suspense"), fe = Symbol.for("react.suspense_list"), Pe = Symbol.for("react.memo"), Oe = Symbol.for("react.lazy"), Qe = Symbol.for("react.offscreen"), $e = Symbol.iterator, Ae = Symbol.for("react.client.reference"), U = _.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, se = Object.prototype.hasOwnProperty, J = Object.assign, X = Symbol.for("react.client.reference"), pe = Array.isArray, oe = 0, he, ce, ge, ie, d, f, h;
n.__reactDisabledLog = !0;
var k, L, Z = !1, ue = new (typeof WeakMap == "function" ? WeakMap : Map)(), et = Symbol.for("react.client.reference"), Be, Br = {}, Wr = {}, Fr = {};
nt.Fragment = $, nt.jsx = function(a, m, b, j, K) {
return R(a, m, b, !1, j, K);
}, nt.jsxs = function(a, m, b, j, K) {
return R(a, m, b, !0, j, K);
};
}()), nt;
}
var Vr;
function qo() {
return Vr || (Vr = 1, process.env.NODE_ENV === "production" ? lt.exports = Mo() : lt.exports = zo()), lt.exports;
}
var x = qo(), dt = { exports: {} }, Vt = {}, Xt = {}, Xr;
function Ho() {
if (Xr) return Xt;
Xr = 1;
function e(t) {
return t && t.__esModule ? t : { default: t };
}
return Xt._ = e, Xt;
}
var Kr;
function Bo() {
return Kr || (Kr = 1, function(e) {
"use client";
Object.defineProperty(e, "__esModule", {
value: !0
});
function t(l, p) {
for (var y in p) Object.defineProperty(l, y, {
enumerable: !0,
get: p[y]
});
}
t(e, {
AppRouterContext: function() {
return o;
},
GlobalLayoutRouterContext: function() {
return s;
},
LayoutRouterContext: function() {
return i;
},
MissingSlotContext: function() {
return u;
},
TemplateContext: function() {
return c;
}
});
const n = /* @__PURE__ */ (/* @__PURE__ */ Ho())._(B), o = n.default.createContext(null), i = n.default.createContext(null), s = n.default.createContext(null), c = n.default.createContext(null);
process.env.NODE_ENV !== "production" && (o.displayName = "AppRouterContext", i.displayName = "LayoutRouterContext", s.displayName = "GlobalLayoutRouterContext", c.displayName = "TemplateContext");
const u = n.default.createContext(/* @__PURE__ */ new Set());
}(Vt)), Vt;
}
var Kt = {}, Jr;
function Wo() {
return Jr || (Jr = 1, function(e) {
"use client";
Object.defineProperty(e, "__esModule", {
value: !0
});
function t(s, c) {
for (var u in c) Object.defineProperty(s, u, {
enumerable: !0,
get: c[u]
});
}
t(e, {
PathParamsContext: function() {
return i;
},
PathnameContext: function() {
return o;
},
SearchParamsContext: function() {
return n;
}
});
const r = B, n = (0, r.createContext)(null), o = (0, r.createContext)(null), i = (0, r.createContext)(null);
process.env.NODE_ENV !== "production" && (n.displayName = "SearchParamsContext", o.displayName = "PathnameContext", i.displayName = "PathParamsContext");
}(Kt)), Kt;
}
var ft = { exports: {} }, Zr;
function Fo() {
return Zr || (Zr = 1, function(e, t) {
Object.defineProperty(t, "__esModule", {
value: !0
}), Object.defineProperty(t, "getSegmentValue", {
enumerable: !0,
get: function() {
return r;
}
});
function r(n) {
return Array.isArray(n) ? n[1] : n;
}
(typeof t.default == "function" || typeof t.default == "object" && t.default !== null) && typeof t.default.__esModule > "u" && (Object.defineProperty(t.default, "__esModule", { value: !0 }), Object.assign(t.default, t), e.exports = t.default);
}(ft, ft.exports)), ft.exports;
}
var Jt = {}, Qr;
function Uo() {
return Qr || (Qr = 1, function(e) {
Object.defineProperty(e, "__esModule", {
value: !0
});
function t(c, u) {
for (var l in u) Object.defineProperty(c, l, {
enumerable: !0,
get: u[l]
});
}
t(e, {
DEFAULT_SEGMENT_KEY: function() {
return s;
},
PAGE_SEGMENT_KEY: function() {
return i;
},
addSearchParamsIfPageSegment: function() {
return o;
},
isGroupSegment: function() {
return r;
},
isParallelRouteSegment: function() {
return n;
}
});
function r(c) {
return c[0] === "(" && c.endsWith(")");
}
function n(c) {
return c.startsWith("@") && c !== "@children";
}
function o(c, u) {
if (c.includes(i)) {
const p = JSON.stringify(u);
return p !== "{}" ? i + "?" + p : i;
}
return c;
}
const i = "__PAGE__", s = "__DEFAULT__";
}(Jt)), Jt;
}
var pt = { exports: {} }, ht = { exports: {} }, Zt = {}, Qt = {}, er = {}, en;
function Or() {
return en || (en = 1, function(e) {
Object.defineProperty(e, "__esModule", {
value: !0
});
function t(u, l) {
for (var p in l) Object.defineProperty(u, p, {
enumerable: !0,
get: l[p]
});
}
t(e, {
bindSnapshot: function() {
return s;
},
createAsyncLocalStorage: function() {
return i;
},
createSnapshot: function() {
return c;
}
});
const r = new Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");
class n {
disable() {
throw r;
}
getStore() {
}
run() {
throw r;
}
exit() {
throw r;
}
enterWith() {
throw r;
}
static bind(l) {
return l;
}
}
const o = typeof globalThis < "u" && globalThis.AsyncLocalStorage;
function i() {
return o ? new o() : new n();
}
function s(u) {
return o ? o.bind(u) : n.bind(u);
}
function c() {
return o ? o.snapshot() : function(u, ...l) {
return u(...l);
};
}
}(er)), er;
}
var tn;
function Go() {
return tn || (tn = 1, function(e) {
Object.defineProperty(e, "__esModule", {
value: !0
}), Object.defineProperty(e, "actionAsyncStorageInstance", {
enumerable: !0,
get: function() {
return r;
}
});
const r = (0, Or().createAsyncLocalStorage)();
}(Qt)), Qt;
}
var rn;
function Yo() {
return rn || (rn = 1, function(e) {
Object.defineProperty(e, "__esModule", {
value: !0
}), Object.defineProperty(e, "actionAsyncStorage", {
enumerable: !0,
get: function() {
return t.actionAsyncStorageInstance;
}
});
const t = Go();
}(Zt)), Zt;
}
var gt = { exports: {} }, nn;
function Kn() {
return nn || (nn = 1, function(e, t) {
Object.defineProperty(t, "__esModule", {
value: !0
}), Object.defineProperty(t, "RedirectStatusCode", {
enumerable: !0,
get: function() {
return r;
}
});
var r = /* @__PURE__ */ function(n) {
return n[n.SeeOther = 303] = "SeeOther", n[n.TemporaryRedirect = 307] = "TemporaryRedirect", n[n.PermanentRedirect = 308] = "PermanentRedirect", n;
}({});
(typeof t.default == "function" || typeof t.default == "object" && t.default !== null) && typeof t.default.__esModule > "u" && (Object.defineProperty(t.default, "__esModule", { value: !0 }), Object.assign(t.default, t), e.exports = t.default);
}(gt, gt.exports)), gt.exports;
}
var yt = { exports: {} }, on;
function Ar() {
return on || (on = 1, function(e, t) {
Object.defineProperty(t, "__esModule", {
value: !0
});
function r(c, u) {
for (var l in u) Object.defineProperty(c, l, {
enumerable: !0,
get: u[l]
});
}
r(t, {
REDIRECT_ERROR_CODE: function() {
return o;
},
RedirectType: function() {
return i;
},
isRedirectError: function() {
return s;
}
});
const n = Kn(), o = "NEXT_REDIRECT";
var i = /* @__PURE__ */ function(c) {
return c.push = "push", c.replace = "replace", c;
}({});
function s(c) {
if (typeof c != "object" || c === null || !("digest" in c) || typeof c.digest != "string")
return !1;
const u = c.digest.split(";"), [l, p] = u, y = u.slice(2, -2).join(";"), g = u.at(-2), v = Number(g);
return l === o && (p === "replace" || p === "push") && typeof y == "string" && !isNaN(v) && v in n.RedirectStatusCode;
}
(typeof t.default == "function" || typeof t.default == "object" && t.default !== null) && typeof t.default.__esModule > "u" && (Object.defineProperty(t.default, "__esModule", { value: !0 }), Object.assign(t.default, t), e.exports = t.default);
}(yt, yt.exports)), yt.exports;
}
var an;
function Vo() {
return an || (an = 1, function(e, t) {
Object.defineProperty(t, "__esModule", {
value: !0
});
function r(g, v) {
for (var R in v) Object.defineProperty(g, R, {
enumerable: !0,
get: v[R]
});
}
r(t, {
getRedirectError: function() {
return s;
},
getRedirectStatusCodeFromError: function() {
return y;
},
getRedirectTypeFromError: function() {
return p;
},
getURLFromRedirectError: function() {
return l;
},
permanentRedirect: function() {
return u;
},
redirect: function() {
return c;
}
});
const n = Yo(), o = Kn(), i = Ar();
function s(g, v, R) {
R === void 0 && (R = o.RedirectStatusCode.TemporaryRedirect);
const T = new Error(i.REDIRECT_ERROR_CODE);
return T.digest = i.REDIRECT_ERROR_CODE + ";" + v + ";" + g + ";" + R + ";", T;
}
function c(g, v) {
const R = n.actionAsyncStorage.getStore(), T = v || (R != null && R.isAction ? i.RedirectType.push : i.RedirectType.replace);
throw s(g, T, o.RedirectStatusCode.TemporaryRedirect);
}
function u(g, v) {
throw v === void 0 && (v = i.RedirectType.replace), s(g, v, o.RedirectStatusCode.PermanentRedirect);
}
function l(g) {
return (0, i.isRedirectError)(g) ? g.digest.split(";").slice(2, -2).join(";") : null;
}
function p(g) {
if (!(0, i.isRedirectError)(g))
throw new Error("Not a redirect error");
return g.digest.split(";", 2)[1];
}
function y(g) {
if (!(0, i.isRedirectError)(g))
throw new Error("Not a redirect error");
return Number(g.digest.split(";").at(-2));
}
(typeof t.default == "function" || typeof t.default == "object" && t.default !== null) && typeof t.default.__esModule > "u" && (Object.defineProperty(t.default, "__esModule", { value: !0 }), Object.assign(t.default, t), e.exports = t.default);
}(ht, ht.exports)), ht.exports;
}
var mt = { exports: {} }, bt = { exports: {} }, sn;
function Bt() {
return sn || (sn = 1, function(e, t) {
Object.defineProperty(t, "__esModule", {
value: !0
});
function r(l, p) {
for (var y in p) Object.defineProperty(l, y, {
enumerable: !0,
get: p[y]
});
}
r(t, {
HTTPAccessErrorStatus: function() {
return n;
},
HTTP_ERROR_FALLBACK_ERROR_CODE: function() {
return i;
},
getAccessFallbackErrorTypeByStatus: function() {
return u;
},
getAccessFallbackHTTPStatus: function() {
return c;
},
isHTTPAccessFallbackError: function() {
return s;
}
});
const n = {
NOT_FOUND: 404,
FORBIDDEN: 403,
UNAUTHORIZED: 401
}, o = new Set(Object.values(n)), i = "NEXT_HTTP_ERROR_FALLBACK";
function s(l) {
if (typeof l != "object" || l === null || !("digest" in l) || typeof l.digest != "string")
return !1;
const [p, y] = l.digest.split(";");
return p === i && o.has(Number(y));
}
function c(l) {
const p = l.digest.split(";")[1];
return Number(p);
}
function u(l) {
switch (l) {
case 401:
return "unauthorized";
case 403:
return "forbidden";
case 404:
return "not-found";
default:
return;
}
}
(typeof t.default == "function" || typeof t.default == "object" && t.default !== null) && typeof t.default.__esModule > "u" && (Object.defineProperty(t.default, "__esModule", { value: !0 }), Object.assign(t.default, t), e.exports = t.default);
}(bt, bt.exports)), bt.exports;
}
var cn;
function Xo() {
return cn || (cn = 1, function(e, t) {
Object.defineProperty(t, "__esModule", {
value: !0
}), Object.defineProperty(t, "notFound", {
enumerable: !0,
get: function() {
return o;
}
});
const n = "" + Bt().HTTP_ERROR_FALLBACK_ERROR_CODE + ";404";
function o() {
const i = new Error(n);
throw i.digest = n, i;
}
(typeof t.default == "function" || typeof t.default == "object" && t.default !== null) && typeof t.default.__esModule > "u" && (Object.defineProperty(t.default, "__esModule", { value: !0 }), Object.assign(t.default, t), e.exports = t.default);
}(mt, mt.exports)), mt.exports;
}
var xt = { exports: {} }, un;
function Ko() {
return un || (un = 1, function(e, t) {
Object.defineProperty(t, "__esModule", {
value: !0
}), Object.defineProperty(t, "forbidden", {
enumerable: !0,
get: function() {
return o;
}
});
const n = "" + Bt().HTTP_ERROR_FALLBACK_ERROR_CODE + ";403";
function o() {
if (!process.env.__NEXT_EXPERIMENTAL_AUTH_INTERRUPTS)
throw new Error("`forbidden()` is experimental and only allowed to be enabled when `experimental.authInterrupts` is enabled.");
const i = new Error(n);
throw i.digest = n, i;
}
(typeof t.default == "function" || typeof t.default == "object" && t.default !== null) && typeof t.default.__esModule > "u" && (Object.defineProperty(t.default, "__esModule", { value: !0 }), Object.assign(t.default, t), e.exports = t.default);
}(xt, xt.exports)), xt.exports;
}
var vt = { exports: {} }, ln;
function Jo() {
return ln || (ln = 1, function(e, t) {
Object.defineProperty(t, "__esModule", {
value: !0
}), Object.defineProperty(t, "unauthorized", {
enumerable: !0,
get: function() {
return o;
}
});
const n = "" + Bt().HTTP_ERROR_FALLBACK_ERROR_CODE + ";401";
function o() {
if (!process.env.__NEXT_EXPERIMENTAL_AUTH_INTERRUPTS)
throw new Error("`unauthorized()` is experimental and only allowed to be used when `experimental.authInterrupts` is enabled.");
const i = new Error(n);
throw i.digest = n, i;
}
(typeof t.default == "function" || typeof t.default == "object" && t.default !== null) && typeof t.default.__esModule > "u" && (Object.defineProperty(t.default, "__esModule", { value: !0 }), Object.assign(t.default, t), e.exports = t.default);
}(vt, vt.exports)), vt.exports;
}
var wt = { exports: {} }, tr = {}, St = { exports: {} }, dn;
function Jn() {
return dn || (dn = 1, function(e, t) {
Object.defineProperty(t, "__esModule", {
value: !0
});
function r(s, c) {
for (var u in c) Object.defineProperty(s, u, {
enumerable: !0,
get: c[u]
});
}
r(t, {
DynamicServerError: function() {
return o;
},
isDynamicServerError: function() {
return i;
}
});
const n = "DYNAMIC_SERVER_USAGE";
class o extends Error {
constructor(c) {
super("Dynamic server usage: " + c), this.description = c, this.digest = n;
}
}
function i(s) {
return typeof s != "object" || s === null || !("digest" in s) || typeof s.digest != "string" ? !1 : s.digest === n;
}
(typeof t.default == "function" || typeof t.default == "object" && t.default !== null) && typeof t.default.__esModule > "u" && (Object.defineProperty(t.default, "__esModule", { value: !0 }), Object.assign(t.default, t), e.exports = t.default);
}(St, St.exports)), St.exports;
}
var rr = {}, fn;
function Tr() {
return fn || (fn = 1, function(e) {
Object.defineProperty(e, "__esModule", {
value: !0
});
function t(i, s) {
for (var c in s) Object.defineProperty(i, c, {
enumerable: !0,
get: s[c]
});
}
t(e, {
BailoutToCSRError: function() {
return n;
},
isBailoutToCSRError: function() {
return o;
}
});
const r = "BAILOUT_TO_CLIENT_SIDE_RENDERING";
class n extends Error {
constructor(s) {
super("Bail out to client-side rendering: " + s), this.reason = s, this.digest = r;
}
}
function o(i) {
return typeof i != "object" || i === null || !("digest" in i) ? !1 : i.digest === r;
}
}(rr)), rr;
}
var _t = { exports: {} }, pn;
function Zn() {
return pn || (pn = 1, function(e, t) {
Object.defineProperty(t, "__esModule", {
value: !0
}), Object.defineProperty(t, "isNextRouterError", {
enumerable: !0,
get: function() {
return o;
}
});
const r = Bt(), n = Ar();
function o(i) {
return (0, n.isRedirectError)(i) || (0, r.isHTTPAccessFallbackError)(i);
}
(typeof t.default == "function" || typeof t.default == "object" && t.default !== null) && typeof t.default.__esModule > "u" && (Object.defineProperty(t.default, "__esModule", { value: !0 }), Object.assign(t.default, t), e.exports = t.default);
}(_t, _t.exports)), _t.exports;
}
var nr = {}, $t = { exports: {} }, hn;
function Zo() {
return hn || (hn = 1, function(e, t) {
Object.defineProperty(t, "__esModule", {
value: !0
});
function r(s, c) {
for (var u in c) Object.defineProperty(s, u, {
enumerable: !0,
get: c[u]
});
}
r(t, {
StaticGenBailoutError: function() {
return o;
},
isStaticGenBailoutError: function() {
return i;
}
});
const n = "NEXT_STATIC_GEN_BAILOUT";
class o extends Error {
constructor(...c) {
super(...c), this.code = n;
}
}
function i(s) {
return typeof s != "object" || s === null || !("code" in s) ? !1 : s.code === n;
}
(typeof t.default == "function" || typeof t.default == "object" && t.default !== null) && typeof t.default.__esModule > "u" && (Object.defineProperty(t.default, "__esModule", { value: !0 }), Object.assign(t.default, t), e.exports = t.default);
}($t, $t.exports)), $t.exports;
}
var or = {}, ir = {}, gn;
function Qo() {
return gn || (gn = 1, function(e) {
Object.defineProperty(e, "__esModule", {
value: !0
}), Object.defineProperty(e, "workUnitAsyncStorageInstance", {
enumerable: !0,
get: function() {
return r;
}
});
const r = (0, Or().createAsyncLocalStorage)();
}(ir)), ir;
}
var yn;
function ei() {
return yn || (yn = 1, function(e) {
Object.defineProperty(e, "__esModule", {
value: !0
});
function t(s, c) {
for (var u in c) Object.defineProperty(s, u, {
enumerable: !0,
get: c[u]
});
}
t(e, {
getExpectedRequestStore: function() {
return n;
},
getPrerenderResumeDataCache: function() {
return o;
},
getRenderResumeDataCache: function() {
return i;
},
workUnitAsyncStorage: function() {
return r.workUnitAsyncStorageInstance;
}
});
const r = Qo();
function n(s) {
const c = r.workUnitAsyncStorageInstance.getStore();
if (c) {
if (c.type === "request")
return c;
if (c.type === "prerender" || c.type === "prerender-ppr" || c.type === "prerender-legacy")
throw new Error(`\`${s}\` cannot be called inside a prerender. This is a bug in Next.js.`);
if (c.type === "cache")
throw new Error(`\`${s}\` cannot be called inside "use cache". Call it outside and pass an argument instead. Read more: https://nextjs.org/docs/messages/next-request-in-use-cache`);
if (c.type === "unstable-cache")
throw new Error(`\`${s}\` cannot be called inside unstable_cache. Call it outside and pass an argument instead. Read more: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`);
}
throw new Error(`\`${s}\` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`);
}
function o(s) {
return s.type === "prerender" || s.type === "prerender-ppr" ? s.prerenderResumeDataCache : null;
}
function i(s) {
return s.type !== "prerender-legacy" && s.type !== "cache" && s.type !== "unstable-cache" ? s.type === "request" ? s.renderResumeDataCache : s.prerenderResumeDataCache : null;
}
}(or)), or;
}
var ar = {}, sr = {}, mn;
function ti() {
return mn || (mn = 1, function(e) {
Object.defineProperty(e, "__esModule", {
value: !0
}), Object.defineProperty(e, "workAsyncStorageInstance", {
enumerable: !0,
get: function() {
return r;
}
});
const r = (0, Or().createAsyncLocalStorage)();
}(sr)), sr;
}
var bn;
function Qn() {
return bn || (bn = 1, function(e) {
Object.defineProperty(e, "__esModule", {
value: !0
}), Object.defineProperty(e, "workAsyncStorage", {
enumerable: !0,
get: function() {
return t.workAsyncStorageInstance;
}
});
const t = ti();
}(ar)), ar;
}
var cr = {}, xn;
function ri() {
return xn || (xn = 1, function(e) {
Object.defineProperty(e, "__esModule", {
value: !0
}), Object.defineProperty(e, "makeHangingPromise", {
enumerable: !0,
get: function() {
return t;
}
});
function t(n, o) {
const i = new Promise((s, c) => {
n.addEventListener("abort", () => {
c(new Error(`During prerendering, ${o} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${o} to a different context by using \`setTimeout\`, \`after\`, or similar functions you may observe this error and you should handle it in that context.`));
}, {
once: !0
});
});
return i.catch(r), i;
}
function r() {
}
}(cr)), cr;
}
var ur = {}, vn;
function ni() {
return vn || (vn = 1, function(e) {
Object.defineProperty(e, "__esModule", {
value: !0
});
function t(i, s) {
for (var c in s) Object.defineProperty(i, c, {
enumerable: !0,
get: s[c]
});
}
t(e, {
METADATA_BOUNDARY_NAME: function() {
return r;
},
OUTLET_BOUNDARY_NAME: function() {
return o;
},
VIEWPORT_BOUNDARY_NAME: function() {
return n;
}
});
const r = "__next_metadata_boundary__", n = "__next_viewport_boundary__", o = "__next_outlet_boundary__";
}(ur)), ur;
}
var wn;
function eo() {
return wn || (wn = 1, function(e) {
Object.defineProperty(e, "__esModule", {
value: !0
});
function t(d, f) {
for (var h in f) Object.defineProperty(d, h, {
enumerable: !0,
get: f[h]
});
}
t(e, {
Postpone: function() {
return S;
},
abortAndThrowOnSynchronousRequestDataAccess: function() {
return C;
},
abortOnSynchronousPlatformIOAccess: function() {
return _;
},
accessedDynamicData: function() {
return Oe;
},
annotateDynamicAccess: function() {
return se;
},
consumeDynamicAccess: function() {
return Qe;
},
createDynamicTrackingState: function() {
return y;
},
createDynamicValidationState: function() {
return g;
},
createPostponedAbortSignal: function() {
return U;
},
formatDynamicAPIAccesses: function() {
return $e;
},
getFirstDynamicReason: function() {
return v;
},
isDynamicPostpone: function() {
return de;
},
isPrerenderInterruptedError: function() {
return Pe;
},
markCurrentScopeAsDynamic: function() {
return R;
},
postponeWithTracking: function() {
return F;
},
throwIfDisallowedDynamic: function() {
return ie;
},
throwToInterruptStaticGeneration: function() {
return z;
},
trackAllowedDynamicAccess: function() {
return ce;
},
trackDynamicDataInDynamicRender: function() {
return I;
},
trackFallbackParamAccessed: function() {
return T;
},
trackSynchronousPlatformIOAccessInDev: function() {
return E;
},
trackSynchronousRequestDataAccessInDev: function() {
return $;
},
useDynamicRouteParams: function() {
return J;
}
});
const r = /* @__PURE__ */ l(B), n = Jn(), o = Zo(), i = ei(), s = Qn(), c = ri(), u = ni();
function l(d) {
return d && d.__esModule ? d : {
default: d
};
}
const p = typeof r.default.unstable_postpone == "function";
function y(d) {
return {
isDebugDynamicAccesses: d,
dynamicAccesses: [],
syncDynamicExpression: void 0,
syncDynamicErrorWithStack: null
};
}
function g() {
return {
hasSuspendedDynamic: !1,
hasDynamicMetadata: !1,
hasDynamicViewport: !1,
hasSyncDynamicErrors: !1,
dynamicErrors: []
};
}
function v(d) {
var f;
return (f = d.dynamicAccesses[0]) == null ? void 0 : f.expression;
}
function R(d, f, h) {
if (!(f && (f.type === "cache" || f.type === "unstable-cache")) && !(d.forceDynamic || d.forceStatic)) {
if (d.dynamicShouldError)
throw new o.StaticGenBailoutError(`Route ${d.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${h}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`);
if (f)
if (f.type === "prerender-ppr")
F(d.route, h, f.dynamicTracking);
else if (f.type === "prerender-legacy") {
f.revalidate = 0;
const k = new n.DynamicServerError(`Route ${d.route} couldn't be rendered statically because it used ${h}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`);
throw d.dynamicUsageDescription = h, d.dynamicUsageStack = k.stack, k;
} else process.env.NODE_ENV === "development" && f && f.type === "request" && (f.usedDynamic = !0);
}
}
function T(d, f) {
const h = i.workUnitAsyncStorage.getStore();
!h || h.type !== "prerender-ppr" || F(d.route, f, h.dynamicTracking);
}
function z(d, f, h) {
const k = new n.DynamicServerError(`Route ${f.route} couldn't be rendered statically because it used \`${d}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`);
throw h.revalidate = 0, f.dynamicUsageDescription = d, f.dynamicUsageStack = k.stack, k;
}
function I(d, f) {
if (f) {
if (f.type === "cache" || f.type === "unstable-cache")
return;
(f.type === "prerender" || f.type === "prerender-legacy") && (f.revalidate = 0), process.env.NODE_ENV === "development" && f.type === "request" && (f.usedDynamic = !0);
}
}
function w(d, f, h) {
const k = `Route ${d} needs to bail out of prerendering at this point because it used ${f}.`, L = fe(k);
h.controller.abort(L);
const Z = h.dynamicTracking;
Z && Z.dynamicAccesses.push({
// When we aren't debugging, we don't need to create another error for the
// stack trace.
stack: Z.isDebugDynamicAccesses ? new Error().stack : void 0,
expression: f
});
}
function _(d, f, h, k) {
const L = k.dynamicTracking;
return L && L.syncDynamicErrorWithStack === null && (L.syncDynamicExpression = f, L.syncDynamicErrorWithStack = h), w(d, f, k);
}
function E(d) {
d.prerenderPhase = !1;
}
function C(d, f, h, k) {
const L = k.dynamicTracking;
throw L && L.syncDynamicErrorWithStack === null && (L.syncDynamicExpression = f, L.syncDynamicErrorWithStack = h, k.validating === !0 && (L.syncDynamicLogged = !0)), w(d, f, k), fe(`Route ${d} needs to bail out of prerendering at this point because it used ${f}.`);
}
const $ = E;
function S({ reason: d, route: f }) {
const h = i.workUnitAsyncStorage.getStore(), k = h && h.type === "prerender-ppr" ? h.dynamicTracking : null;
F(f, d, k);
}
function F(d, f, h) {
Ae(), h && h.dynamicAccesses.push({
// When we aren't debugging, we don't need to create another error for the
// stack trace.
stack: h.isDebugDynamicAccesses ? new Error().stack : void 0,
expression: f
}), r.default.unstable_postpone(V(d, f));
}
function V(d, f) {
return `Route ${d} needs to bail out of prerendering at this point because it used ${f}. React throws this special object to indicate where. It should not be caught by your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`;
}
function de(d) {
return typeof d == "object" && d !== null && typeof d.message == "string" ? Se(d.message) : !1;
}
function Se(d) {
return d.includes("needs to bail out of prerendering at this point because it used") && d.includes("Learn more: https://nextjs.org/docs/messages/ppr-caught-error");
}
if (Se(V("%%%", "^^^")) === !1)
throw new Error("Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js");
const _e = "NEXT_PRERENDER_INTERRUPTED";
function fe(d) {
const f = new Error(d);
return f.digest = _e, f;
}
function Pe(d) {
return typeof d == "object" && d !== null && d.digest === _e && "name" in d && "message" in d && d instanceof Error;
}
function Oe(d) {
return d.length > 0;
}
function Qe(d, f) {
return d.dynamicAccesses.push(...f.dynamicAccesses), d.dynamicAccesses;
}
function $e(d) {
return d.filter((f) => typeof f.stack == "string" && f.stack.length > 0).map(({ expression: f, stack: h }) => (h = h.split(`
`).slice(4).filter((k) => !(k.includes("node_modules/next/") || k.includes(" (<anonymous>)") || k.includes(" (node:"))).join(`
`), `Dynamic API Usage Debug - ${f}:
${h}`));
}
function Ae() {
if (!p)
throw new Error("Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js");
}
function U(d) {
Ae();
const f = new AbortController();
try {
r.default.unstable_postpone(d);
} catch (h) {
f.abort(h);
}
return f.signal;
}
function se(d, f) {
const h = f.dynamicTracking;
h && h.dynamicAccesses.push({
stack: h.isDebugDynamicAccesses ? new Error().stack : void 0,
expression: d
});
}
function J(d) {
if (typeof window > "u") {
const f = s.workAsyncStorage.getStore();
if (f && f.isStaticGeneration && f.fallbackRouteParams && f.fallbackRouteParams.size > 0) {
const h = i.workUnitAsyncStorage.getStore();
h && (h.type === "prerender" ? r.default.use((0, c.makeHangingPromise)(h.renderSignal, d)) : h.type === "prerender-ppr" ? F(f.route, d, h.dynamicTracking) : h.type === "prerender-legacy" && z(d, f, h));
}
}
}
const X = /\n\s+at Suspense \(<anonymous>\)/, pe = new RegExp(`\\n\\s+at ${u.METADATA_BOUNDARY_NAME}[\\n\\s]`), oe = new RegExp(`\\n\\s+at ${u.VIEWPORT_BOUNDARY_NAME}[\\n\\s]`), he = new RegExp(`\\n\\s+at ${u.OUTLET_BOUNDARY_NAME}[\\n\\s]`);
function ce(d, f, h, k, L) {
if (!he.test(f))
if (pe.test(f)) {
h.hasDynamicMetadata = !0;
return;
} else if (oe.test(f)) {
h.hasDynamicViewport = !0;
return;
} else if (X.test(f)) {
h.hasSuspendedDynamic = !0;
return;
} else if (k.syncDynamicErrorWithStack || L.syncDynamicErrorWithStack) {
h.hasSyncDynamicErrors = !0;
return;
} else {
const Z = `Route "${d}": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a "use cache" above it. We don't have the exact line number added to error messages yet but you can see which component in the stack below. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense`, ue = ge(Z, f);
h.dynamicErrors.push(ue);
return;
}
}
function ge(d, f) {
const h = new Error(d);
return h.stack = "Error: " + d + f, h;
}
function ie(d, f, h, k) {
let L, Z, ue;
if (h.syncDynamicErrorWithStack ? (L = h.syncDynamicErrorWithStack, Z = h.syncDynamicExpression, ue = h.syncDynamicLogged === !0) : k.syncDynamicErrorWithStack ? (L = k.syncDynamicErrorWithStack, Z = k.syncDynamicExpression, ue = k.syncDynamicLogged === !0) : (L = null, Z = void 0, ue = !1), f.hasSyncDynamicErrors && L)
throw ue || console.error(L), new o.StaticGenBailoutError();
const et = f.dynamicErrors;
if (et.length) {
for (let Be = 0; Be < et.length; Be++)
console.error(et[Be]);
throw new o.StaticGenBailoutError();
}
if (!f.hasSuspendedDynamic) {
if (f.hasDynamicMetadata)
throw L ? (console.error(L), new o.StaticGenBailoutError(`Route "${d}" has a \`generateMetadata\` that could not finish rendering before ${Z} was used. Follow the instructions in the error for this expression to resolve.`)) : new o.StaticGenBailoutError(`Route "${d}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or external data (\`fetch(...)\`, etc...) but the rest of the route was static or only used cached data (\`"use cache"\`). If you expected this route to be prerenderable update your \`generateMetadata\` to not use Request data and only use cached external data. Otherwise, add \`await connection()\` somewhere within this route to indicate explicitly it should not be prerendered.`);
if (f.hasDynamicViewport)
throw L ? (console.error(L), new o.StaticGenBailoutError(`Route "${d}" has a \`generateViewport\` that could not finish rendering before ${Z} was used. Follow the instructions in the error for this expression to