dgz-ui
Version:
Custom ui library using React.js, Shadcn/ui, TailwindCSS, Typescript
1,298 lines (1,282 loc) • 526 kB
JavaScript
var Rf = Object.defineProperty;
var Lf = (r, e, t) => e in r ? Rf(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
var J = (r, e, t) => Lf(r, typeof e != "symbol" ? e + "" : e, t);
import { j as O } from "./jsx-runtime-DS1N_tNq.js";
import * as I from "react";
import ae, { useState as El, useEffect as Mf, useDebugValue as wl, createElement as qs, useRef as gc, useContext as Df, PureComponent as Bf, createRef as xl, forwardRef as Pf } from "react";
import { u as Be } from "./index-DLcqcWxM.js";
import { c as Jn, u as tr } from "./index-ljY4mZHt.js";
import { P as mc, c as Ce } from "./index-DljuG5oz.js";
import { u as zn, a as Ba } from "./index-C-L1jRHK.js";
import { u as Pa, c as vc, R as Ff, A as qf, C as jf, a as Vf } from "./index-ZsCkaYy6.js";
import { P as Te } from "./index-l3y0hILL.js";
import { R as $f, s as Uf, X as zf, q as Hf } from "./index-Br4MVOGV.js";
import { c as ke } from "./utils-B6fNqzRf.js";
import { S as Gf, c as Kf } from "./index-Dq2jN6bR.js";
import { c as Fa } from "./index-BhbquNdX.js";
import * as yc from "react-dom";
import { c as _l } from "./index-rKs9bXHr.js";
import { c as Wf } from "./index-D3yPpw0n.js";
import { u as bc } from "./index-DTDT63Qf.js";
import { D as Yf } from "./index-BL59b1Bz.js";
import { P as Zf, h as Xf, u as Qf, R as Jf, F as ep } from "./index-1abu5A4A.js";
import { u as tp } from "./index-DwYXX2sM.js";
import { V as rp } from "./index-CbK6da4c.js";
import { _ as np, a as sp, b as Sl, c as Yt, g as qa } from "./react-select-DVPHHTAP.js";
import { C as Ec } from "./chevron-down-vqQwpxPF.js";
import { C as ip, a as op } from "./circle-COtEidYe.js";
import { c as ap } from "./createLucideIcon-B950nf2d.js";
import { c as wc, R as lp, I as up } from "./index-Cths1nBq.js";
import { B as cp } from "./button-CdZDBhmr.js";
/**
* @license lucide-react v0.511.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const hp = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]], dp = ap("chevron-up", hp);
function li(r) {
const e = I.useRef({ value: r, previous: r });
return I.useMemo(() => (e.current.value !== r && (e.current.previous = e.current.value, e.current.value = r), e.current.previous), [r]);
}
var ui = "Checkbox", [fp, Hx] = Jn(ui), [pp, ja] = fp(ui);
function gp(r) {
const {
__scopeCheckbox: e,
checked: t,
children: n,
defaultChecked: s,
disabled: i,
form: o,
name: a,
onCheckedChange: l,
required: c,
value: d = "on",
// @ts-expect-error
internal_do_not_use_render: g
} = r, [h, m] = zn({
prop: t,
defaultProp: s ?? !1,
onChange: l,
caller: ui
}), [v, f] = I.useState(null), [y, E] = I.useState(null), x = I.useRef(!1), S = v ? !!o || !!v.closest("form") : (
// We set this to true by default so that events bubble to forms without JS (SSR)
!0
), k = {
checked: h,
disabled: i,
setChecked: m,
control: v,
setControl: f,
name: a,
form: o,
value: d,
hasConsumerStoppedPropagationRef: x,
required: c,
defaultChecked: Qt(s) ? !1 : s,
isFormControl: S,
bubbleInput: y,
setBubbleInput: E
};
return /* @__PURE__ */ O.jsx(
pp,
{
scope: e,
...k,
children: mp(g) ? g(k) : n
}
);
}
var xc = "CheckboxTrigger", _c = I.forwardRef(
({ __scopeCheckbox: r, onKeyDown: e, onClick: t, ...n }, s) => {
const {
control: i,
value: o,
disabled: a,
checked: l,
required: c,
setControl: d,
setChecked: g,
hasConsumerStoppedPropagationRef: h,
isFormControl: m,
bubbleInput: v
} = ja(xc, r), f = Be(s, d), y = I.useRef(l);
return I.useEffect(() => {
const E = i == null ? void 0 : i.form;
if (E) {
const x = () => g(y.current);
return E.addEventListener("reset", x), () => E.removeEventListener("reset", x);
}
}, [i, g]), /* @__PURE__ */ O.jsx(
Te.button,
{
type: "button",
role: "checkbox",
"aria-checked": Qt(l) ? "mixed" : l,
"aria-required": c,
"data-state": Tc(l),
"data-disabled": a ? "" : void 0,
disabled: a,
value: o,
...n,
ref: f,
onKeyDown: Ce(e, (E) => {
E.key === "Enter" && E.preventDefault();
}),
onClick: Ce(t, (E) => {
g((x) => Qt(x) ? !0 : !x), v && m && (h.current = E.isPropagationStopped(), h.current || E.stopPropagation());
})
}
);
}
);
_c.displayName = xc;
var Va = I.forwardRef(
(r, e) => {
const {
__scopeCheckbox: t,
name: n,
checked: s,
defaultChecked: i,
required: o,
disabled: a,
value: l,
onCheckedChange: c,
form: d,
...g
} = r;
return /* @__PURE__ */ O.jsx(
gp,
{
__scopeCheckbox: t,
checked: s,
defaultChecked: i,
disabled: a,
required: o,
onCheckedChange: c,
name: n,
form: d,
value: l,
internal_do_not_use_render: ({ isFormControl: h }) => /* @__PURE__ */ O.jsxs(O.Fragment, { children: [
/* @__PURE__ */ O.jsx(
_c,
{
...g,
ref: e,
__scopeCheckbox: t
}
),
h && /* @__PURE__ */ O.jsx(
kc,
{
__scopeCheckbox: t
}
)
] })
}
);
}
);
Va.displayName = ui;
var Sc = "CheckboxIndicator", Ac = I.forwardRef(
(r, e) => {
const { __scopeCheckbox: t, forceMount: n, ...s } = r, i = ja(Sc, t);
return /* @__PURE__ */ O.jsx(
mc,
{
present: n || Qt(i.checked) || i.checked === !0,
children: /* @__PURE__ */ O.jsx(
Te.span,
{
"data-state": Tc(i.checked),
"data-disabled": i.disabled ? "" : void 0,
...s,
ref: e,
style: { pointerEvents: "none", ...r.style }
}
)
}
);
}
);
Ac.displayName = Sc;
var Cc = "CheckboxBubbleInput", kc = I.forwardRef(
({ __scopeCheckbox: r, ...e }, t) => {
const {
control: n,
hasConsumerStoppedPropagationRef: s,
checked: i,
defaultChecked: o,
required: a,
disabled: l,
name: c,
value: d,
form: g,
bubbleInput: h,
setBubbleInput: m
} = ja(Cc, r), v = Be(t, m), f = li(i), y = Pa(n);
I.useEffect(() => {
const x = h;
if (!x) return;
const S = window.HTMLInputElement.prototype, _ = Object.getOwnPropertyDescriptor(
S,
"checked"
).set, D = !s.current;
if (f !== i && _) {
const q = new Event("click", { bubbles: D });
x.indeterminate = Qt(i), _.call(x, Qt(i) ? !1 : i), x.dispatchEvent(q);
}
}, [h, f, i, s]);
const E = I.useRef(Qt(i) ? !1 : i);
return /* @__PURE__ */ O.jsx(
Te.input,
{
type: "checkbox",
"aria-hidden": !0,
defaultChecked: o ?? E.current,
required: a,
disabled: l,
name: c,
value: d,
form: g,
...e,
tabIndex: -1,
ref: v,
style: {
...e.style,
...y,
position: "absolute",
pointerEvents: "none",
opacity: 0,
margin: 0,
// We transform because the input is absolutely positioned but we have
// rendered it **after** the button. This pulls it back to sit on top
// of the button.
transform: "translateX(-100%)"
}
}
);
}
);
kc.displayName = Cc;
function mp(r) {
return typeof r == "function";
}
function Qt(r) {
return r === "indeterminate";
}
function Tc(r) {
return Qt(r) ? "indeterminate" : r ? "checked" : "unchecked";
}
const vp = I.forwardRef(({ className: r, ...e }, t) => /* @__PURE__ */ O.jsx(
Va,
{
ref: t,
className: ke(
"peer border-primary ring-offset-background focus-visible:ring-ring data-[state=checked]:text-primary size-4 shrink-0 rounded-sm border focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
r
),
...e,
children: /* @__PURE__ */ O.jsx(
Ac,
{
className: ke("flex size-4 items-center justify-center text-current"),
children: e.checked === "indeterminate" ? /* @__PURE__ */ O.jsx($f, { className: "text-primary mr-0.5 mb-0.5 size-3.5" }) : /* @__PURE__ */ O.jsx(Uf, { className: "text-primary mr-0.5 mb-0.5 size-3.5" })
}
)
}
));
vp.displayName = Va.displayName;
const $a = Fa(
"flex h-10 w-full rounded-lg border border-border-alpha-strong px-3 py-2 dark:bg-transparent file:border-0 placeholder:text-secondary placeholder:text-body-sm-regular focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-bg focus-visible:ring-offset-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
{
variants: {
variant: {
default: "focus-visible:ring-item-primary",
failure: "focus-visible:ring-item-destructive bg-item-destructive-focus placeholder:text-item-destructive border-item-destructive text-destructive",
success: "focus-visible:ring-success bg-success/20 placeholder:text-success/80 border-success text-success"
}
},
defaultVariants: {
variant: "default"
}
}
), yp = I.forwardRef(
({ className: r, type: e, variant: t, ...n }, s) => {
const [i, o] = El(!1), [a, l] = El(!1);
return Mf(() => {
o(e === "password");
}, [e]), /* @__PURE__ */ O.jsxs("div", { className: "relative", children: [
/* @__PURE__ */ O.jsx(
"input",
{
type: a ? "text" : e,
className: ke(
$a({ variant: t }),
r,
i && "pr-10"
),
ref: s,
...n
}
),
i && /* @__PURE__ */ O.jsx(
cp,
{
type: "button",
size: "icon",
variant: "tertiary",
className: "absolute top-1 right-1 size-8 cursor-pointer rounded-md p-2 !ring-0 !ring-offset-0",
onClick: () => {
l(!a);
},
children: a ? /* @__PURE__ */ O.jsx(zf, {}) : /* @__PURE__ */ O.jsx(Hf, {})
}
)
] });
}
);
yp.displayName = "Input";
var We = function() {
return We = Object.assign || function(e) {
for (var t, n = 1, s = arguments.length; n < s; n++) {
t = arguments[n];
for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
}
return e;
}, We.apply(this, arguments);
};
function en(r, e, t) {
if (t || arguments.length === 2) for (var n = 0, s = e.length, i; n < s; n++)
(i || !(n in e)) && (i || (i = Array.prototype.slice.call(e, 0, n)), i[n] = e[n]);
return r.concat(i || Array.prototype.slice.call(e));
}
function bp(r) {
var e = /* @__PURE__ */ Object.create(null);
return function(t) {
return e[t] === void 0 && (e[t] = r(t)), e[t];
};
}
var Ep = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/, wp = /* @__PURE__ */ bp(
function(r) {
return Ep.test(r) || r.charCodeAt(0) === 111 && r.charCodeAt(1) === 110 && r.charCodeAt(2) < 91;
}
/* Z+1 */
), _e = "-ms-", qn = "-moz-", we = "-webkit-", Nc = "comm", ci = "rule", Ua = "decl", xp = "@import", Ic = "@keyframes", _p = "@layer", Oc = Math.abs, za = String.fromCharCode, Qo = Object.assign;
function Sp(r, e) {
return Re(r, 0) ^ 45 ? (((e << 2 ^ Re(r, 0)) << 2 ^ Re(r, 1)) << 2 ^ Re(r, 2)) << 2 ^ Re(r, 3) : 0;
}
function Rc(r) {
return r.trim();
}
function Dt(r, e) {
return (r = e.exec(r)) ? r[0] : r;
}
function de(r, e, t) {
return r.replace(e, t);
}
function js(r, e, t) {
return r.indexOf(e, t);
}
function Re(r, e) {
return r.charCodeAt(e) | 0;
}
function tn(r, e, t) {
return r.slice(e, t);
}
function xt(r) {
return r.length;
}
function Lc(r) {
return r.length;
}
function Ln(r, e) {
return e.push(r), r;
}
function Ap(r, e) {
return r.map(e).join("");
}
function Al(r, e) {
return r.filter(function(t) {
return !Dt(t, e);
});
}
var hi = 1, rn = 1, Mc = 0, nt = 0, Ie = 0, dn = "";
function di(r, e, t, n, s, i, o, a) {
return { value: r, root: e, parent: t, type: n, props: s, children: i, line: hi, column: rn, length: o, return: "", siblings: a };
}
function Gt(r, e) {
return Qo(di("", null, null, "", null, null, 0, r.siblings), r, { length: -r.length }, e);
}
function Ur(r) {
for (; r.root; )
r = Gt(r.root, { children: [r] });
Ln(r, r.siblings);
}
function Cp() {
return Ie;
}
function kp() {
return Ie = nt > 0 ? Re(dn, --nt) : 0, rn--, Ie === 10 && (rn = 1, hi--), Ie;
}
function ht() {
return Ie = nt < Mc ? Re(dn, nt++) : 0, rn++, Ie === 10 && (rn = 1, hi++), Ie;
}
function vr() {
return Re(dn, nt);
}
function Vs() {
return nt;
}
function fi(r, e) {
return tn(dn, r, e);
}
function Jo(r) {
switch (r) {
// \0 \t \n \r \s whitespace token
case 0:
case 9:
case 10:
case 13:
case 32:
return 5;
// ! + , / > @ ~ isolate token
case 33:
case 43:
case 44:
case 47:
case 62:
case 64:
case 126:
// ; { } breakpoint token
case 59:
case 123:
case 125:
return 4;
// : accompanied token
case 58:
return 3;
// " ' ( [ opening delimit token
case 34:
case 39:
case 40:
case 91:
return 2;
// ) ] closing delimit token
case 41:
case 93:
return 1;
}
return 0;
}
function Tp(r) {
return hi = rn = 1, Mc = xt(dn = r), nt = 0, [];
}
function Np(r) {
return dn = "", r;
}
function So(r) {
return Rc(fi(nt - 1, ea(r === 91 ? r + 2 : r === 40 ? r + 1 : r)));
}
function Ip(r) {
for (; (Ie = vr()) && Ie < 33; )
ht();
return Jo(r) > 2 || Jo(Ie) > 3 ? "" : " ";
}
function Op(r, e) {
for (; --e && ht() && !(Ie < 48 || Ie > 102 || Ie > 57 && Ie < 65 || Ie > 70 && Ie < 97); )
;
return fi(r, Vs() + (e < 6 && vr() == 32 && ht() == 32));
}
function ea(r) {
for (; ht(); )
switch (Ie) {
// ] ) " '
case r:
return nt;
// " '
case 34:
case 39:
r !== 34 && r !== 39 && ea(Ie);
break;
// (
case 40:
r === 41 && ea(r);
break;
// \
case 92:
ht();
break;
}
return nt;
}
function Rp(r, e) {
for (; ht() && r + Ie !== 57; )
if (r + Ie === 84 && vr() === 47)
break;
return "/*" + fi(e, nt - 1) + "*" + za(r === 47 ? r : ht());
}
function Lp(r) {
for (; !Jo(vr()); )
ht();
return fi(r, nt);
}
function Mp(r) {
return Np($s("", null, null, null, [""], r = Tp(r), 0, [0], r));
}
function $s(r, e, t, n, s, i, o, a, l) {
for (var c = 0, d = 0, g = o, h = 0, m = 0, v = 0, f = 1, y = 1, E = 1, x = 0, S = "", k = s, _ = i, D = n, q = S; y; )
switch (v = x, x = ht()) {
// (
case 40:
if (v != 108 && Re(q, g - 1) == 58) {
js(q += de(So(x), "&", "&\f"), "&\f", Oc(c ? a[c - 1] : 0)) != -1 && (E = -1);
break;
}
// " ' [
case 34:
case 39:
case 91:
q += So(x);
break;
// \t \n \r \s
case 9:
case 10:
case 13:
case 32:
q += Ip(v);
break;
// \
case 92:
q += Op(Vs() - 1, 7);
continue;
// /
case 47:
switch (vr()) {
case 42:
case 47:
Ln(Dp(Rp(ht(), Vs()), e, t, l), l);
break;
default:
q += "/";
}
break;
// {
case 123 * f:
a[c++] = xt(q) * E;
// } ; \0
case 125 * f:
case 59:
case 0:
switch (x) {
// \0 }
case 0:
case 125:
y = 0;
// ;
case 59 + d:
E == -1 && (q = de(q, /\f/g, "")), m > 0 && xt(q) - g && Ln(m > 32 ? kl(q + ";", n, t, g - 1, l) : kl(de(q, " ", "") + ";", n, t, g - 2, l), l);
break;
// @ ;
case 59:
q += ";";
// { rule/at-rule
default:
if (Ln(D = Cl(q, e, t, c, d, s, a, S, k = [], _ = [], g, i), i), x === 123)
if (d === 0)
$s(q, e, D, D, k, i, g, a, _);
else
switch (h === 99 && Re(q, 3) === 110 ? 100 : h) {
// d l m s
case 100:
case 108:
case 109:
case 115:
$s(r, D, D, n && Ln(Cl(r, D, D, 0, 0, s, a, S, s, k = [], g, _), _), s, _, g, a, n ? k : _);
break;
default:
$s(q, D, D, D, [""], _, 0, a, _);
}
}
c = d = m = 0, f = E = 1, S = q = "", g = o;
break;
// :
case 58:
g = 1 + xt(q), m = v;
default:
if (f < 1) {
if (x == 123)
--f;
else if (x == 125 && f++ == 0 && kp() == 125)
continue;
}
switch (q += za(x), x * f) {
// &
case 38:
E = d > 0 ? 1 : (q += "\f", -1);
break;
// ,
case 44:
a[c++] = (xt(q) - 1) * E, E = 1;
break;
// @
case 64:
vr() === 45 && (q += So(ht())), h = vr(), d = g = xt(S = q += Lp(Vs())), x++;
break;
// -
case 45:
v === 45 && xt(q) == 2 && (f = 0);
}
}
return i;
}
function Cl(r, e, t, n, s, i, o, a, l, c, d, g) {
for (var h = s - 1, m = s === 0 ? i : [""], v = Lc(m), f = 0, y = 0, E = 0; f < n; ++f)
for (var x = 0, S = tn(r, h + 1, h = Oc(y = o[f])), k = r; x < v; ++x)
(k = Rc(y > 0 ? m[x] + " " + S : de(S, /&\f/g, m[x]))) && (l[E++] = k);
return di(r, e, t, s === 0 ? ci : a, l, c, d, g);
}
function Dp(r, e, t, n) {
return di(r, e, t, Nc, za(Cp()), tn(r, 2, -2), 0, n);
}
function kl(r, e, t, n, s) {
return di(r, e, t, Ua, tn(r, 0, n), tn(r, n + 1, -1), n, s);
}
function Dc(r, e, t) {
switch (Sp(r, e)) {
// color-adjust
case 5103:
return we + "print-" + r + r;
// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
case 5737:
case 4201:
case 3177:
case 3433:
case 1641:
case 4457:
case 2921:
// text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
case 5572:
case 6356:
case 5844:
case 3191:
case 6645:
case 3005:
// mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
case 6391:
case 5879:
case 5623:
case 6135:
case 4599:
case 4855:
// background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
case 4215:
case 6389:
case 5109:
case 5365:
case 5621:
case 3829:
return we + r + r;
// tab-size
case 4789:
return qn + r + r;
// appearance, user-select, transform, hyphens, text-size-adjust
case 5349:
case 4246:
case 4810:
case 6968:
case 2756:
return we + r + qn + r + _e + r + r;
// writing-mode
case 5936:
switch (Re(r, e + 11)) {
// vertical-l(r)
case 114:
return we + r + _e + de(r, /[svh]\w+-[tblr]{2}/, "tb") + r;
// vertical-r(l)
case 108:
return we + r + _e + de(r, /[svh]\w+-[tblr]{2}/, "tb-rl") + r;
// horizontal(-)tb
case 45:
return we + r + _e + de(r, /[svh]\w+-[tblr]{2}/, "lr") + r;
}
// flex, flex-direction, scroll-snap-type, writing-mode
case 6828:
case 4268:
case 2903:
return we + r + _e + r + r;
// order
case 6165:
return we + r + _e + "flex-" + r + r;
// align-items
case 5187:
return we + r + de(r, /(\w+).+(:[^]+)/, we + "box-$1$2" + _e + "flex-$1$2") + r;
// align-self
case 5443:
return we + r + _e + "flex-item-" + de(r, /flex-|-self/g, "") + (Dt(r, /flex-|baseline/) ? "" : _e + "grid-row-" + de(r, /flex-|-self/g, "")) + r;
// align-content
case 4675:
return we + r + _e + "flex-line-pack" + de(r, /align-content|flex-|-self/g, "") + r;
// flex-shrink
case 5548:
return we + r + _e + de(r, "shrink", "negative") + r;
// flex-basis
case 5292:
return we + r + _e + de(r, "basis", "preferred-size") + r;
// flex-grow
case 6060:
return we + "box-" + de(r, "-grow", "") + we + r + _e + de(r, "grow", "positive") + r;
// transition
case 4554:
return we + de(r, /([^-])(transform)/g, "$1" + we + "$2") + r;
// cursor
case 6187:
return de(de(de(r, /(zoom-|grab)/, we + "$1"), /(image-set)/, we + "$1"), r, "") + r;
// background, background-image
case 5495:
case 3959:
return de(r, /(image-set\([^]*)/, we + "$1$`$1");
// justify-content
case 4968:
return de(de(r, /(.+:)(flex-)?(.*)/, we + "box-pack:$3" + _e + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + we + r + r;
// justify-self
case 4200:
if (!Dt(r, /flex-|baseline/)) return _e + "grid-column-align" + tn(r, e) + r;
break;
// grid-template-(columns|rows)
case 2592:
case 3360:
return _e + de(r, "template-", "") + r;
// grid-(row|column)-start
case 4384:
case 3616:
return t && t.some(function(n, s) {
return e = s, Dt(n.props, /grid-\w+-end/);
}) ? ~js(r + (t = t[e].value), "span", 0) ? r : _e + de(r, "-start", "") + r + _e + "grid-row-span:" + (~js(t, "span", 0) ? Dt(t, /\d+/) : +Dt(t, /\d+/) - +Dt(r, /\d+/)) + ";" : _e + de(r, "-start", "") + r;
// grid-(row|column)-end
case 4896:
case 4128:
return t && t.some(function(n) {
return Dt(n.props, /grid-\w+-start/);
}) ? r : _e + de(de(r, "-end", "-span"), "span ", "") + r;
// (margin|padding)-inline-(start|end)
case 4095:
case 3583:
case 4068:
case 2532:
return de(r, /(.+)-inline(.+)/, we + "$1$2") + r;
// (min|max)?(width|height|inline-size|block-size)
case 8116:
case 7059:
case 5753:
case 5535:
case 5445:
case 5701:
case 4933:
case 4677:
case 5533:
case 5789:
case 5021:
case 4765:
if (xt(r) - 1 - e > 6)
switch (Re(r, e + 1)) {
// (m)ax-content, (m)in-content
case 109:
if (Re(r, e + 4) !== 45)
break;
// (f)ill-available, (f)it-content
case 102:
return de(r, /(.+:)(.+)-([^]+)/, "$1" + we + "$2-$3$1" + qn + (Re(r, e + 3) == 108 ? "$3" : "$2-$3")) + r;
// (s)tretch
case 115:
return ~js(r, "stretch", 0) ? Dc(de(r, "stretch", "fill-available"), e, t) + r : r;
}
break;
// grid-(column|row)
case 5152:
case 5920:
return de(r, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(n, s, i, o, a, l, c) {
return _e + s + ":" + i + c + (o ? _e + s + "-span:" + (a ? l : +l - +i) + c : "") + r;
});
// position: sticky
case 4949:
if (Re(r, e + 6) === 121)
return de(r, ":", ":" + we) + r;
break;
// display: (flex|inline-flex|grid|inline-grid)
case 6444:
switch (Re(r, Re(r, 14) === 45 ? 18 : 11)) {
// (inline-)?fle(x)
case 120:
return de(r, /(.+:)([^;\s!]+)(;|(\s+)?!.+)?/, "$1" + we + (Re(r, 14) === 45 ? "inline-" : "") + "box$3$1" + we + "$2$3$1" + _e + "$2box$3") + r;
// (inline-)?gri(d)
case 100:
return de(r, ":", ":" + _e) + r;
}
break;
// scroll-margin, scroll-margin-(top|right|bottom|left)
case 5719:
case 2647:
case 2135:
case 3927:
case 2391:
return de(r, "scroll-", "scroll-snap-") + r;
}
return r;
}
function Qs(r, e) {
for (var t = "", n = 0; n < r.length; n++)
t += e(r[n], n, r, e) || "";
return t;
}
function Bp(r, e, t, n) {
switch (r.type) {
case _p:
if (r.children.length) break;
case xp:
case Ua:
return r.return = r.return || r.value;
case Nc:
return "";
case Ic:
return r.return = r.value + "{" + Qs(r.children, n) + "}";
case ci:
if (!xt(r.value = r.props.join(","))) return "";
}
return xt(t = Qs(r.children, n)) ? r.return = r.value + "{" + t + "}" : "";
}
function Pp(r) {
var e = Lc(r);
return function(t, n, s, i) {
for (var o = "", a = 0; a < e; a++)
o += r[a](t, n, s, i) || "";
return o;
};
}
function Fp(r) {
return function(e) {
e.root || (e = e.return) && r(e);
};
}
function qp(r, e, t, n) {
if (r.length > -1 && !r.return)
switch (r.type) {
case Ua:
r.return = Dc(r.value, r.length, t);
return;
case Ic:
return Qs([Gt(r, { value: de(r.value, "@", "@" + we) })], n);
case ci:
if (r.length)
return Ap(t = r.props, function(s) {
switch (Dt(s, n = /(::plac\w+|:read-\w+)/)) {
// :read-(only|write)
case ":read-only":
case ":read-write":
Ur(Gt(r, { props: [de(s, /:(read-\w+)/, ":" + qn + "$1")] })), Ur(Gt(r, { props: [s] })), Qo(r, { props: Al(t, n) });
break;
// :placeholder
case "::placeholder":
Ur(Gt(r, { props: [de(s, /:(plac\w+)/, ":" + we + "input-$1")] })), Ur(Gt(r, { props: [de(s, /:(plac\w+)/, ":" + qn + "$1")] })), Ur(Gt(r, { props: [de(s, /:(plac\w+)/, _e + "input-$1")] })), Ur(Gt(r, { props: [s] })), Qo(r, { props: Al(t, n) });
break;
}
return "";
});
}
}
var jp = {
animationIterationCount: 1,
aspectRatio: 1,
borderImageOutset: 1,
borderImageSlice: 1,
borderImageWidth: 1,
boxFlex: 1,
boxFlexGroup: 1,
boxOrdinalGroup: 1,
columnCount: 1,
columns: 1,
flex: 1,
flexGrow: 1,
flexPositive: 1,
flexShrink: 1,
flexNegative: 1,
flexOrder: 1,
gridRow: 1,
gridRowEnd: 1,
gridRowSpan: 1,
gridRowStart: 1,
gridColumn: 1,
gridColumnEnd: 1,
gridColumnSpan: 1,
gridColumnStart: 1,
msGridRow: 1,
msGridRowSpan: 1,
msGridColumn: 1,
msGridColumnSpan: 1,
fontWeight: 1,
lineHeight: 1,
opacity: 1,
order: 1,
orphans: 1,
tabSize: 1,
widows: 1,
zIndex: 1,
zoom: 1,
WebkitLineClamp: 1,
// SVG-related properties
fillOpacity: 1,
floodOpacity: 1,
stopOpacity: 1,
strokeDasharray: 1,
strokeDashoffset: 1,
strokeMiterlimit: 1,
strokeOpacity: 1,
strokeWidth: 1
}, br = typeof process < "u" && process.env !== void 0 && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || "data-styled", Bc = "active", Pc = "data-styled-version", pi = "6.1.19", Ha = `/*!sc*/
`, Js = typeof window < "u" && typeof document < "u", Vp = !!(typeof SC_DISABLE_SPEEDY == "boolean" ? SC_DISABLE_SPEEDY : typeof process < "u" && process.env !== void 0 && process.env.REACT_APP_SC_DISABLE_SPEEDY !== void 0 && process.env.REACT_APP_SC_DISABLE_SPEEDY !== "" ? process.env.REACT_APP_SC_DISABLE_SPEEDY !== "false" && process.env.REACT_APP_SC_DISABLE_SPEEDY : typeof process < "u" && process.env !== void 0 && process.env.SC_DISABLE_SPEEDY !== void 0 && process.env.SC_DISABLE_SPEEDY !== "" ? process.env.SC_DISABLE_SPEEDY !== "false" && process.env.SC_DISABLE_SPEEDY : process.env.NODE_ENV !== "production"), Tl = /invalid hook call/i, _s = /* @__PURE__ */ new Set(), $p = function(r, e) {
if (process.env.NODE_ENV !== "production") {
var t = e ? ' with the id of "'.concat(e, '"') : "", n = "The component ".concat(r).concat(t, ` has been created dynamically.
`) + `You may see this warning because you've called styled inside another component.
To resolve this only create new StyledComponents outside of any render method and function component.
See https://styled-components.com/docs/basics#define-styled-components-outside-of-the-render-method for more info.
`, s = console.error;
try {
var i = !0;
console.error = function(o) {
for (var a = [], l = 1; l < arguments.length; l++) a[l - 1] = arguments[l];
Tl.test(o) ? (i = !1, _s.delete(n)) : s.apply(void 0, en([o], a, !1));
}, gc(), i && !_s.has(n) && (console.warn(n), _s.add(n));
} catch (o) {
Tl.test(o.message) && _s.delete(n);
} finally {
console.error = s;
}
}
}, gi = Object.freeze([]), nn = Object.freeze({});
function Up(r, e, t) {
return t === void 0 && (t = nn), r.theme !== t.theme && r.theme || e || t.theme;
}
var ta = /* @__PURE__ */ new Set(["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "u", "ul", "use", "var", "video", "wbr", "circle", "clipPath", "defs", "ellipse", "foreignObject", "g", "image", "line", "linearGradient", "marker", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "svg", "text", "tspan"]), zp = /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g, Hp = /(^-|-$)/g;
function Nl(r) {
return r.replace(zp, "-").replace(Hp, "");
}
var Gp = /(a)(d)/gi, Ss = 52, Il = function(r) {
return String.fromCharCode(r + (r > 25 ? 39 : 97));
};
function ra(r) {
var e, t = "";
for (e = Math.abs(r); e > Ss; e = e / Ss | 0) t = Il(e % Ss) + t;
return (Il(e % Ss) + t).replace(Gp, "$1-$2");
}
var Ao, Fc = 5381, pr = function(r, e) {
for (var t = e.length; t; ) r = 33 * r ^ e.charCodeAt(--t);
return r;
}, qc = function(r) {
return pr(Fc, r);
};
function Kp(r) {
return ra(qc(r) >>> 0);
}
function jc(r) {
return process.env.NODE_ENV !== "production" && typeof r == "string" && r || r.displayName || r.name || "Component";
}
function Co(r) {
return typeof r == "string" && (process.env.NODE_ENV === "production" || r.charAt(0) === r.charAt(0).toLowerCase());
}
var Vc = typeof Symbol == "function" && Symbol.for, $c = Vc ? Symbol.for("react.memo") : 60115, Wp = Vc ? Symbol.for("react.forward_ref") : 60112, Yp = { childContextTypes: !0, contextType: !0, contextTypes: !0, defaultProps: !0, displayName: !0, getDefaultProps: !0, getDerivedStateFromError: !0, getDerivedStateFromProps: !0, mixins: !0, propTypes: !0, type: !0 }, Zp = { name: !0, length: !0, prototype: !0, caller: !0, callee: !0, arguments: !0, arity: !0 }, Uc = { $$typeof: !0, compare: !0, defaultProps: !0, displayName: !0, propTypes: !0, type: !0 }, Xp = ((Ao = {})[Wp] = { $$typeof: !0, render: !0, defaultProps: !0, displayName: !0, propTypes: !0 }, Ao[$c] = Uc, Ao);
function Ol(r) {
return ("type" in (e = r) && e.type.$$typeof) === $c ? Uc : "$$typeof" in r ? Xp[r.$$typeof] : Yp;
var e;
}
var Qp = Object.defineProperty, Jp = Object.getOwnPropertyNames, Rl = Object.getOwnPropertySymbols, eg = Object.getOwnPropertyDescriptor, tg = Object.getPrototypeOf, Ll = Object.prototype;
function zc(r, e, t) {
if (typeof e != "string") {
if (Ll) {
var n = tg(e);
n && n !== Ll && zc(r, n, t);
}
var s = Jp(e);
Rl && (s = s.concat(Rl(e)));
for (var i = Ol(r), o = Ol(e), a = 0; a < s.length; ++a) {
var l = s[a];
if (!(l in Zp || t && t[l] || o && l in o || i && l in i)) {
var c = eg(e, l);
try {
Qp(r, l, c);
} catch {
}
}
}
}
return r;
}
function sn(r) {
return typeof r == "function";
}
function Ga(r) {
return typeof r == "object" && "styledComponentId" in r;
}
function gr(r, e) {
return r && e ? "".concat(r, " ").concat(e) : r || e || "";
}
function Ml(r, e) {
if (r.length === 0) return "";
for (var t = r[0], n = 1; n < r.length; n++) t += r[n];
return t;
}
function on(r) {
return r !== null && typeof r == "object" && r.constructor.name === Object.name && !("props" in r && r.$$typeof);
}
function na(r, e, t) {
if (t === void 0 && (t = !1), !t && !on(r) && !Array.isArray(r)) return e;
if (Array.isArray(e)) for (var n = 0; n < e.length; n++) r[n] = na(r[n], e[n]);
else if (on(e)) for (var n in e) r[n] = na(r[n], e[n]);
return r;
}
function Ka(r, e) {
Object.defineProperty(r, "toString", { value: e });
}
var rg = process.env.NODE_ENV !== "production" ? { 1: `Cannot create styled-component for component: %s.
`, 2: `Can't collect styles once you've consumed a \`ServerStyleSheet\`'s styles! \`ServerStyleSheet\` is a one off instance for each server-side render cycle.
- Are you trying to reuse it across renders?
- Are you accidentally calling collectStyles twice?
`, 3: `Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.
`, 4: `The \`StyleSheetManager\` expects a valid target or sheet prop!
- Does this error occur on the client and is your target falsy?
- Does this error occur on the server and is the sheet falsy?
`, 5: `The clone method cannot be used on the client!
- Are you running in a client-like environment on the server?
- Are you trying to run SSR on the client?
`, 6: `Trying to insert a new style tag, but the given Node is unmounted!
- Are you using a custom target that isn't mounted?
- Does your document not have a valid head element?
- Have you accidentally removed a style tag manually?
`, 7: 'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n', 8: `ThemeProvider: Please make your "theme" prop an object.
`, 9: "Missing document `<head>`\n\n", 10: `Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021
`, 11: `_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.
`, 12: "It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n", 13: `%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.
`, 14: `ThemeProvider: "theme" prop is required.
`, 15: "A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n", 16: `Reached the limit of how many styled components may be created at group %s.
You may only create up to 1,073,741,824 components. If you're creating components dynamically,
as for instance in your render method then you may be running into this limitation.
`, 17: `CSSStyleSheet could not be found on HTMLStyleElement.
Has styled-components' style tag been unmounted or altered by another script?
`, 18: "ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`" } : {};
function ng() {
for (var r = [], e = 0; e < arguments.length; e++) r[e] = arguments[e];
for (var t = r[0], n = [], s = 1, i = r.length; s < i; s += 1) n.push(r[s]);
return n.forEach(function(o) {
t = t.replace(/%[a-z]/, o);
}), t;
}
function fn(r) {
for (var e = [], t = 1; t < arguments.length; t++) e[t - 1] = arguments[t];
return process.env.NODE_ENV === "production" ? new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(r, " for more information.").concat(e.length > 0 ? " Args: ".concat(e.join(", ")) : "")) : new Error(ng.apply(void 0, en([rg[r]], e, !1)).trim());
}
var sg = function() {
function r(e) {
this.groupSizes = new Uint32Array(512), this.length = 512, this.tag = e;
}
return r.prototype.indexOfGroup = function(e) {
for (var t = 0, n = 0; n < e; n++) t += this.groupSizes[n];
return t;
}, r.prototype.insertRules = function(e, t) {
if (e >= this.groupSizes.length) {
for (var n = this.groupSizes, s = n.length, i = s; e >= i; ) if ((i <<= 1) < 0) throw fn(16, "".concat(e));
this.groupSizes = new Uint32Array(i), this.groupSizes.set(n), this.length = i;
for (var o = s; o < i; o++) this.groupSizes[o] = 0;
}
for (var a = this.indexOfGroup(e + 1), l = (o = 0, t.length); o < l; o++) this.tag.insertRule(a, t[o]) && (this.groupSizes[e]++, a++);
}, r.prototype.clearGroup = function(e) {
if (e < this.length) {
var t = this.groupSizes[e], n = this.indexOfGroup(e), s = n + t;
this.groupSizes[e] = 0;
for (var i = n; i < s; i++) this.tag.deleteRule(n);
}
}, r.prototype.getGroup = function(e) {
var t = "";
if (e >= this.length || this.groupSizes[e] === 0) return t;
for (var n = this.groupSizes[e], s = this.indexOfGroup(e), i = s + n, o = s; o < i; o++) t += "".concat(this.tag.getRule(o)).concat(Ha);
return t;
}, r;
}(), ig = 1 << 30, Us = /* @__PURE__ */ new Map(), ei = /* @__PURE__ */ new Map(), zs = 1, As = function(r) {
if (Us.has(r)) return Us.get(r);
for (; ei.has(zs); ) zs++;
var e = zs++;
if (process.env.NODE_ENV !== "production" && ((0 | e) < 0 || e > ig)) throw fn(16, "".concat(e));
return Us.set(r, e), ei.set(e, r), e;
}, og = function(r, e) {
zs = e + 1, Us.set(r, e), ei.set(e, r);
}, ag = "style[".concat(br, "][").concat(Pc, '="').concat(pi, '"]'), lg = new RegExp("^".concat(br, '\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')), ug = function(r, e, t) {
for (var n, s = t.split(","), i = 0, o = s.length; i < o; i++) (n = s[i]) && r.registerName(e, n);
}, cg = function(r, e) {
for (var t, n = ((t = e.textContent) !== null && t !== void 0 ? t : "").split(Ha), s = [], i = 0, o = n.length; i < o; i++) {
var a = n[i].trim();
if (a) {
var l = a.match(lg);
if (l) {
var c = 0 | parseInt(l[1], 10), d = l[2];
c !== 0 && (og(d, c), ug(r, d, l[3]), r.getTag().insertRules(c, s)), s.length = 0;
} else s.push(a);
}
}
}, Dl = function(r) {
for (var e = document.querySelectorAll(ag), t = 0, n = e.length; t < n; t++) {
var s = e[t];
s && s.getAttribute(br) !== Bc && (cg(r, s), s.parentNode && s.parentNode.removeChild(s));
}
};
function hg() {
return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : null;
}
var Hc = function(r) {
var e = document.head, t = r || e, n = document.createElement("style"), s = function(a) {
var l = Array.from(a.querySelectorAll("style[".concat(br, "]")));
return l[l.length - 1];
}(t), i = s !== void 0 ? s.nextSibling : null;
n.setAttribute(br, Bc), n.setAttribute(Pc, pi);
var o = hg();
return o && n.setAttribute("nonce", o), t.insertBefore(n, i), n;
}, dg = function() {
function r(e) {
this.element = Hc(e), this.element.appendChild(document.createTextNode("")), this.sheet = function(t) {
if (t.sheet) return t.sheet;
for (var n = document.styleSheets, s = 0, i = n.length; s < i; s++) {
var o = n[s];
if (o.ownerNode === t) return o;
}
throw fn(17);
}(this.element), this.length = 0;
}
return r.prototype.insertRule = function(e, t) {
try {
return this.sheet.insertRule(t, e), this.length++, !0;
} catch {
return !1;
}
}, r.prototype.deleteRule = function(e) {
this.sheet.deleteRule(e), this.length--;
}, r.prototype.getRule = function(e) {
var t = this.sheet.cssRules[e];
return t && t.cssText ? t.cssText : "";
}, r;
}(), fg = function() {
function r(e) {
this.element = Hc(e), this.nodes = this.element.childNodes, this.length = 0;
}
return r.prototype.insertRule = function(e, t) {
if (e <= this.length && e >= 0) {
var n = document.createTextNode(t);
return this.element.insertBefore(n, this.nodes[e] || null), this.length++, !0;
}
return !1;
}, r.prototype.deleteRule = function(e) {
this.element.removeChild(this.nodes[e]), this.length--;
}, r.prototype.getRule = function(e) {
return e < this.length ? this.nodes[e].textContent : "";
}, r;
}(), pg = function() {
function r(e) {
this.rules = [], this.length = 0;
}
return r.prototype.insertRule = function(e, t) {
return e <= this.length && (this.rules.splice(e, 0, t), this.length++, !0);
}, r.prototype.deleteRule = function(e) {
this.rules.splice(e, 1), this.length--;
}, r.prototype.getRule = function(e) {
return e < this.length ? this.rules[e] : "";
}, r;
}(), Bl = Js, gg = { isServer: !Js, useCSSOMInjection: !Vp }, Gc = function() {
function r(e, t, n) {
e === void 0 && (e = nn), t === void 0 && (t = {});
var s = this;
this.options = We(We({}, gg), e), this.gs = t, this.names = new Map(n), this.server = !!e.isServer, !this.server && Js && Bl && (Bl = !1, Dl(this)), Ka(this, function() {
return function(i) {
for (var o = i.getTag(), a = o.length, l = "", c = function(g) {
var h = function(E) {
return ei.get(E);
}(g);
if (h === void 0) return "continue";
var m = i.names.get(h), v = o.getGroup(g);
if (m === void 0 || !m.size || v.length === 0) return "continue";
var f = "".concat(br, ".g").concat(g, '[id="').concat(h, '"]'), y = "";
m !== void 0 && m.forEach(function(E) {
E.length > 0 && (y += "".concat(E, ","));
}), l += "".concat(v).concat(f, '{content:"').concat(y, '"}').concat(Ha);
}, d = 0; d < a; d++) c(d);
return l;
}(s);
});
}
return r.registerId = function(e) {
return As(e);
}, r.prototype.rehydrate = function() {
!this.server && Js && Dl(this);
}, r.prototype.reconstructWithOptions = function(e, t) {
return t === void 0 && (t = !0), new r(We(We({}, this.options), e), this.gs, t && this.names || void 0);
}, r.prototype.allocateGSInstance = function(e) {
return this.gs[e] = (this.gs[e] || 0) + 1;
}, r.prototype.getTag = function() {
return this.tag || (this.tag = (e = function(t) {
var n = t.useCSSOMInjection, s = t.target;
return t.isServer ? new pg(s) : n ? new dg(s) : new fg(s);
}(this.options), new sg(e)));
var e;
}, r.prototype.hasNameForId = function(e, t) {
return this.names.has(e) && this.names.get(e).has(t);
}, r.prototype.registerName = function(e, t) {
if (As(e), this.names.has(e)) this.names.get(e).add(t);
else {
var n = /* @__PURE__ */ new Set();
n.add(t), this.names.set(e, n);
}
}, r.prototype.insertRules = function(e, t, n) {
this.registerName(e, t), this.getTag().insertRules(As(e), n);
}, r.prototype.clearNames = function(e) {
this.names.has(e) && this.names.get(e).clear();
}, r.prototype.clearRules = function(e) {
this.getTag().clearGroup(As(e)), this.clearNames(e);
}, r.prototype.clearTag = function() {
this.tag = void 0;
}, r;
}(), mg = /&/g, vg = /^\s*\/\/.*$/gm;
function Kc(r, e) {
return r.map(function(t) {
return t.type === "rule" && (t.value = "".concat(e, " ").concat(t.value), t.value = t.value.replaceAll(",", ",".concat(e, " ")), t.props = t.props.map(function(n) {
return "".concat(e, " ").concat(n);
})), Array.isArray(t.children) && t.type !== "@keyframes" && (t.children = Kc(t.children, e)), t;
});
}
function yg(r) {
var e, t, n, s = nn, i = s.options, o = i === void 0 ? nn : i, a = s.plugins, l = a === void 0 ? gi : a, c = function(h, m, v) {
return v.startsWith(t) && v.endsWith(t) && v.replaceAll(t, "").length > 0 ? ".".concat(e) : h;
}, d = l.slice();
d.push(function(h) {
h.type === ci && h.value.includes("&") && (h.props[0] = h.props[0].replace(mg, t).replace(n, c));
}), o.prefix && d.push(qp), d.push(Bp);
var g = function(h, m, v, f) {
m === void 0 && (m = ""), v === void 0 && (v = ""), f === void 0 && (f = "&"), e = f, t = m, n = new RegExp("\\".concat(t, "\\b"), "g");
var y = h.replace(vg, ""), E = Mp(v || m ? "".concat(v, " ").concat(m, " { ").concat(y, " }") : y);
o.namespace && (E = Kc(E, o.namespace));
var x = [];
return Qs(E, Pp(d.concat(Fp(function(S) {
return x.push(S);
})))), x;
};
return g.hash = l.length ? l.reduce(function(h, m) {
return m.name || fn(15), pr(h, m.name);
}, Fc).toString() : "", g;
}
var bg = new Gc(), sa = yg(), Wc = ae.createContext({ shouldForwardProp: void 0, styleSheet: bg, stylis: sa });
Wc.Consumer;
ae.createContext(void 0);
function Pl() {
return Df(Wc);
}
var Fl = function() {
function r(e, t) {
var n = this;
this.inject = function(s, i) {
i === void 0 && (i = sa);
var o = n.name + i.hash;
s.hasName