@undp/design-system-react
Version:
React based design system for UNDP
1,538 lines (1,537 loc) • 1.1 MB
JavaScript
import * as g from "react";
import O, { forwardRef as c0, createElement as B9, useLayoutEffect as Is, useEffect as ir, useState as lt, useCallback as nt, useContext as ks, useRef as Jt, useMemo as Vn, createContext as _d, Component as Gd, Fragment as G2 } from "react";
import * as zr from "react-dom";
import zd, { createPortal as Wd, flushSync as Xd } from "react-dom";
function Pi(e) {
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
var d9 = { exports: {} }, vr = {};
/**
* @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 ga;
function $d() {
if (ga) return vr;
ga = 1;
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
function n(r, i, o) {
var a = null;
if (o !== void 0 && (a = "" + o), i.key !== void 0 && (a = "" + i.key), "key" in i) {
o = {};
for (var s in i)
s !== "key" && (o[s] = i[s]);
} else o = i;
return i = o.ref, {
$$typeof: e,
type: r,
key: a,
ref: i !== void 0 ? i : null,
props: o
};
}
return vr.Fragment = t, vr.jsx = n, vr.jsxs = n, vr;
}
var yr = {};
/**
* @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 ha;
function Yd() {
return ha || (ha = 1, process.env.NODE_ENV !== "production" && function() {
function e(w) {
if (w == null) return null;
if (typeof w == "function")
return w.$$typeof === M ? null : w.displayName || w.name || null;
if (typeof w == "string") return w;
switch (w) {
case h:
return "Fragment";
case v:
return "Profiler";
case b:
return "StrictMode";
case V:
return "Suspense";
case I:
return "SuspenseList";
case T:
return "Activity";
}
if (typeof w == "object")
switch (typeof w.tag == "number" && console.error(
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
), w.$$typeof) {
case C:
return "Portal";
case x:
return (w.displayName || "Context") + ".Provider";
case y:
return (w._context.displayName || "Context") + ".Consumer";
case H:
var X = w.render;
return w = w.displayName, w || (w = X.displayName || X.name || "", w = w !== "" ? "ForwardRef(" + w + ")" : "ForwardRef"), w;
case E:
return X = w.displayName || null, X !== null ? X : e(w.type) || "Memo";
case S:
X = w._payload, w = w._init;
try {
return e(w(X));
} catch {
}
}
return null;
}
function t(w) {
return "" + w;
}
function n(w) {
try {
t(w);
var X = !1;
} catch {
X = !0;
}
if (X) {
X = console;
var J = X.error, k = typeof Symbol == "function" && Symbol.toStringTag && w[Symbol.toStringTag] || w.constructor.name || "Object";
return J.call(
X,
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
k
), t(w);
}
}
function r(w) {
if (w === h) return "<>";
if (typeof w == "object" && w !== null && w.$$typeof === S)
return "<...>";
try {
var X = e(w);
return X ? "<" + X + ">" : "<...>";
} catch {
return "<...>";
}
}
function i() {
var w = R.A;
return w === null ? null : w.getOwner();
}
function o() {
return Error("react-stack-top-frame");
}
function a(w) {
if (P.call(w, "key")) {
var X = Object.getOwnPropertyDescriptor(w, "key").get;
if (X && X.isReactWarning) return !1;
}
return w.key !== void 0;
}
function s(w, X) {
function J() {
D || (D = !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)",
X
));
}
J.isReactWarning = !0, Object.defineProperty(w, "key", {
get: J,
configurable: !0
});
}
function l() {
var w = e(this.type);
return j[w] || (j[w] = !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."
)), w = this.props.ref, w !== void 0 ? w : null;
}
function c(w, X, J, k, K, ee, Q, _) {
return J = ee.ref, w = {
$$typeof: p,
type: w,
key: X,
props: ee,
_owner: K
}, (J !== void 0 ? J : null) !== null ? Object.defineProperty(w, "ref", {
enumerable: !1,
get: l
}) : Object.defineProperty(w, "ref", { enumerable: !1, value: null }), w._store = {}, Object.defineProperty(w._store, "validated", {
configurable: !1,
enumerable: !1,
writable: !0,
value: 0
}), Object.defineProperty(w, "_debugInfo", {
configurable: !1,
enumerable: !1,
writable: !0,
value: null
}), Object.defineProperty(w, "_debugStack", {
configurable: !1,
enumerable: !1,
writable: !0,
value: Q
}), Object.defineProperty(w, "_debugTask", {
configurable: !1,
enumerable: !1,
writable: !0,
value: _
}), Object.freeze && (Object.freeze(w.props), Object.freeze(w)), w;
}
function u(w, X, J, k, K, ee, Q, _) {
var U = X.children;
if (U !== void 0)
if (k)
if (F(U)) {
for (k = 0; k < U.length; k++)
d(U[k]);
Object.freeze && Object.freeze(U);
} 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 d(U);
if (P.call(X, "key")) {
U = e(w);
var ne = Object.keys(X).filter(function(ae) {
return ae !== "key";
});
k = 0 < ne.length ? "{key: someKey, " + ne.join(": ..., ") + ": ...}" : "{key: someKey}", B[U + k] || (ne = 0 < ne.length ? "{" + ne.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} />`,
k,
U,
ne,
U
), B[U + k] = !0);
}
if (U = null, J !== void 0 && (n(J), U = "" + J), a(X) && (n(X.key), U = "" + X.key), "key" in X) {
J = {};
for (var q in X)
q !== "key" && (J[q] = X[q]);
} else J = X;
return U && s(
J,
typeof w == "function" ? w.displayName || w.name || "Unknown" : w
), c(
w,
U,
ee,
K,
i(),
J,
Q,
_
);
}
function d(w) {
typeof w == "object" && w !== null && w.$$typeof === p && w._store && (w._store.validated = 1);
}
var m = O, p = Symbol.for("react.transitional.element"), C = Symbol.for("react.portal"), h = Symbol.for("react.fragment"), b = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), y = Symbol.for("react.consumer"), x = Symbol.for("react.context"), H = Symbol.for("react.forward_ref"), V = Symbol.for("react.suspense"), I = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), S = Symbol.for("react.lazy"), T = Symbol.for("react.activity"), M = Symbol.for("react.client.reference"), R = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, P = Object.prototype.hasOwnProperty, F = Array.isArray, L = console.createTask ? console.createTask : function() {
return null;
};
m = {
"react-stack-bottom-frame": function(w) {
return w();
}
};
var D, j = {}, z = m["react-stack-bottom-frame"].bind(
m,
o
)(), N = L(r(o)), B = {};
yr.Fragment = h, yr.jsx = function(w, X, J, k, K) {
var ee = 1e4 > R.recentlyCreatedOwnerStacks++;
return u(
w,
X,
J,
!1,
k,
K,
ee ? Error("react-stack-top-frame") : z,
ee ? L(r(w)) : N
);
}, yr.jsxs = function(w, X, J, k, K) {
var ee = 1e4 > R.recentlyCreatedOwnerStacks++;
return u(
w,
X,
J,
!0,
k,
K,
ee ? Error("react-stack-top-frame") : z,
ee ? L(r(w)) : N
);
};
}()), yr;
}
var Ca;
function Jd() {
return Ca || (Ca = 1, process.env.NODE_ENV === "production" ? d9.exports = $d() : d9.exports = Yd()), d9.exports;
}
var f = Jd();
function Ud(e, t) {
const n = g.createContext(t), r = (o) => {
const { children: a, ...s } = o, l = g.useMemo(() => s, Object.values(s));
return /* @__PURE__ */ f.jsx(n.Provider, { value: l, children: a });
};
r.displayName = e + "Provider";
function i(o) {
const a = g.useContext(n);
if (a) return a;
if (t !== void 0) return t;
throw new Error(`\`${o}\` must be used within \`${e}\``);
}
return [r, i];
}
function ze(e, t = []) {
let n = [];
function r(o, a) {
const s = g.createContext(a), l = n.length;
n = [...n, a];
const c = (d) => {
var v;
const { scope: m, children: p, ...C } = d, h = ((v = m == null ? void 0 : m[e]) == null ? void 0 : v[l]) || s, b = g.useMemo(() => C, Object.values(C));
return /* @__PURE__ */ f.jsx(h.Provider, { value: b, children: p });
};
c.displayName = o + "Provider";
function u(d, m) {
var h;
const p = ((h = m == null ? void 0 : m[e]) == null ? void 0 : h[l]) || s, C = g.useContext(p);
if (C) return C;
if (a !== void 0) return a;
throw new Error(`\`${d}\` must be used within \`${o}\``);
}
return [c, u];
}
const i = () => {
const o = n.map((a) => g.createContext(a));
return function(s) {
const l = (s == null ? void 0 : s[e]) || o;
return g.useMemo(
() => ({ [`__scope${e}`]: { ...s, [e]: l } }),
[s, l]
);
};
};
return i.scopeName = e, [r, Qd(i, ...t)];
}
function Qd(...e) {
const t = e[0];
if (e.length === 1) return t;
const n = () => {
const r = e.map((i) => ({
useScope: i(),
scopeName: i.scopeName
}));
return function(o) {
const a = r.reduce((s, { useScope: l, scopeName: c }) => {
const d = l(o)[`__scope${c}`];
return { ...s, ...d };
}, {});
return g.useMemo(() => ({ [`__scope${t.scopeName}`]: a }), [a]);
};
};
return n.scopeName = t.scopeName, n;
}
function ba(e, t) {
if (typeof e == "function")
return e(t);
e != null && (e.current = t);
}
function u0(...e) {
return (t) => {
let n = !1;
const r = e.map((i) => {
const o = ba(i, t);
return !n && typeof o == "function" && (n = !0), o;
});
if (n)
return () => {
for (let i = 0; i < r.length; i++) {
const o = r[i];
typeof o == "function" ? o() : ba(e[i], null);
}
};
};
}
function pe(...e) {
return g.useCallback(u0(...e), e);
}
// @__NO_SIDE_EFFECTS__
function Hn(e) {
const t = /* @__PURE__ */ Kd(e), n = g.forwardRef((r, i) => {
const { children: o, ...a } = r, s = g.Children.toArray(o), l = s.find(e6);
if (l) {
const c = l.props.children, u = s.map((d) => d === l ? g.Children.count(c) > 1 ? g.Children.only(null) : g.isValidElement(c) ? c.props.children : null : d);
return /* @__PURE__ */ f.jsx(t, { ...a, ref: i, children: g.isValidElement(c) ? g.cloneElement(c, void 0, u) : null });
}
return /* @__PURE__ */ f.jsx(t, { ...a, ref: i, children: o });
});
return n.displayName = `${e}.Slot`, n;
}
// @__NO_SIDE_EFFECTS__
function Kd(e) {
const t = g.forwardRef((n, r) => {
const { children: i, ...o } = n, a = g.isValidElement(i) ? n6(i) : void 0, s = pe(a, r);
if (g.isValidElement(i)) {
const l = t6(o, i.props);
return i.type !== g.Fragment && (l.ref = s), g.cloneElement(i, l);
}
return g.Children.count(i) > 1 ? g.Children.only(null) : null;
});
return t.displayName = `${e}.SlotClone`, t;
}
var Hs = Symbol("radix.slottable");
// @__NO_SIDE_EFFECTS__
function qd(e) {
const t = ({ children: n }) => /* @__PURE__ */ f.jsx(f.Fragment, { children: n });
return t.displayName = `${e}.Slottable`, t.__radixId = Hs, t;
}
function e6(e) {
return g.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Hs;
}
function t6(e, t) {
const n = { ...t };
for (const r in t) {
const i = e[r], o = t[r];
/^on[A-Z]/.test(r) ? i && o ? n[r] = (...s) => {
const l = o(...s);
return i(...s), l;
} : i && (n[r] = i) : r === "style" ? n[r] = { ...i, ...o } : r === "className" && (n[r] = [i, o].filter(Boolean).join(" "));
}
return { ...e, ...n };
}
function n6(e) {
var r, i;
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
return n ? e.ref : (t = (i = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : i.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
}
function Wr(e) {
const t = e + "CollectionProvider", [n, r] = ze(t), [i, o] = n(
t,
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
), a = (h) => {
const { scope: b, children: v } = h, y = O.useRef(null), x = O.useRef(/* @__PURE__ */ new Map()).current;
return /* @__PURE__ */ f.jsx(i, { scope: b, itemMap: x, collectionRef: y, children: v });
};
a.displayName = t;
const s = e + "CollectionSlot", l = /* @__PURE__ */ Hn(s), c = O.forwardRef(
(h, b) => {
const { scope: v, children: y } = h, x = o(s, v), H = pe(b, x.collectionRef);
return /* @__PURE__ */ f.jsx(l, { ref: H, children: y });
}
);
c.displayName = s;
const u = e + "CollectionItemSlot", d = "data-radix-collection-item", m = /* @__PURE__ */ Hn(u), p = O.forwardRef(
(h, b) => {
const { scope: v, children: y, ...x } = h, H = O.useRef(null), V = pe(b, H), I = o(u, v);
return O.useEffect(() => (I.itemMap.set(H, { ref: H, ...x }), () => void I.itemMap.delete(H))), /* @__PURE__ */ f.jsx(m, { [d]: "", ref: V, children: y });
}
);
p.displayName = u;
function C(h) {
const b = o(e + "CollectionConsumer", h);
return O.useCallback(() => {
const y = b.collectionRef.current;
if (!y) return [];
const x = Array.from(y.querySelectorAll(`[${d}]`));
return Array.from(b.itemMap.values()).sort(
(I, E) => x.indexOf(I.ref.current) - x.indexOf(E.ref.current)
);
}, [b.collectionRef, b.itemMap]);
}
return [
{ Provider: a, Slot: c, ItemSlot: p },
C,
r
];
}
function W(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
return function(i) {
if (e == null || e(i), n === !1 || !i.defaultPrevented)
return t == null ? void 0 : t(i);
};
}
var Ge = globalThis != null && globalThis.document ? g.useLayoutEffect : () => {
}, r6 = g[" useInsertionEffect ".trim().toString()] || Ge;
function Ye({
prop: e,
defaultProp: t,
onChange: n = () => {
},
caller: r
}) {
const [i, o, a] = i6({
defaultProp: t,
onChange: n
}), s = e !== void 0, l = s ? e : i;
{
const u = g.useRef(e !== void 0);
g.useEffect(() => {
const d = u.current;
d !== s && console.warn(
`${r} is changing from ${d ? "controlled" : "uncontrolled"} to ${s ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
), u.current = s;
}, [s, r]);
}
const c = g.useCallback(
(u) => {
var d;
if (s) {
const m = o6(u) ? u(e) : u;
m !== e && ((d = a.current) == null || d.call(a, m));
} else
o(u);
},
[s, e, o, a]
);
return [l, c];
}
function i6({
defaultProp: e,
onChange: t
}) {
const [n, r] = g.useState(e), i = g.useRef(n), o = g.useRef(t);
return r6(() => {
o.current = t;
}, [t]), g.useEffect(() => {
var a;
i.current !== n && ((a = o.current) == null || a.call(o, n), i.current = n);
}, [n, i]), [n, r, o];
}
function o6(e) {
return typeof e == "function";
}
var a6 = [
"a",
"button",
"div",
"form",
"h2",
"h3",
"img",
"input",
"label",
"li",
"nav",
"ol",
"p",
"select",
"span",
"svg",
"ul"
], re = a6.reduce((e, t) => {
const n = /* @__PURE__ */ Hn(`Primitive.${t}`), r = g.forwardRef((i, o) => {
const { asChild: a, ...s } = i, l = a ? n : t;
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ f.jsx(l, { ...s, ref: o });
});
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
}, {});
function Ti(e, t) {
e && zr.flushSync(() => e.dispatchEvent(t));
}
function s6(e, t) {
return g.useReducer((n, r) => t[n][r] ?? n, e);
}
var We = (e) => {
const { present: t, children: n } = e, r = l6(t), i = typeof n == "function" ? n({ present: r.isPresent }) : g.Children.only(n), o = pe(r.ref, c6(i));
return typeof n == "function" || r.isPresent ? g.cloneElement(i, { ref: o }) : null;
};
We.displayName = "Presence";
function l6(e) {
const [t, n] = g.useState(), r = g.useRef(null), i = g.useRef(e), o = g.useRef("none"), a = e ? "mounted" : "unmounted", [s, l] = s6(a, {
mounted: {
UNMOUNT: "unmounted",
ANIMATION_OUT: "unmountSuspended"
},
unmountSuspended: {
MOUNT: "mounted",
ANIMATION_END: "unmounted"
},
unmounted: {
MOUNT: "mounted"
}
});
return g.useEffect(() => {
const c = f9(r.current);
o.current = s === "mounted" ? c : "none";
}, [s]), Ge(() => {
const c = r.current, u = i.current;
if (u !== e) {
const m = o.current, p = f9(c);
e ? l("MOUNT") : p === "none" || (c == null ? void 0 : c.display) === "none" ? l("UNMOUNT") : l(u && m !== p ? "ANIMATION_OUT" : "UNMOUNT"), i.current = e;
}
}, [e, l]), Ge(() => {
if (t) {
let c;
const u = t.ownerDocument.defaultView ?? window, d = (p) => {
const h = f9(r.current).includes(p.animationName);
if (p.target === t && h && (l("ANIMATION_END"), !i.current)) {
const b = t.style.animationFillMode;
t.style.animationFillMode = "forwards", c = u.setTimeout(() => {
t.style.animationFillMode === "forwards" && (t.style.animationFillMode = b);
});
}
}, m = (p) => {
p.target === t && (o.current = f9(r.current));
};
return t.addEventListener("animationstart", m), t.addEventListener("animationcancel", d), t.addEventListener("animationend", d), () => {
u.clearTimeout(c), t.removeEventListener("animationstart", m), t.removeEventListener("animationcancel", d), t.removeEventListener("animationend", d);
};
} else
l("ANIMATION_END");
}, [t, l]), {
isPresent: ["mounted", "unmountSuspended"].includes(s),
ref: g.useCallback((c) => {
r.current = c ? getComputedStyle(c) : null, n(c);
}, [])
};
}
function f9(e) {
return (e == null ? void 0 : e.animationName) || "none";
}
function c6(e) {
var r, i;
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
return n ? e.ref : (t = (i = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : i.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
}
var u6 = g[" useId ".trim().toString()] || (() => {
}), d6 = 0;
function Ke(e) {
const [t, n] = g.useState(u6());
return Ge(() => {
n((r) => r ?? String(d6++));
}, [e]), t ? `radix-${t}` : "";
}
var d0 = "Collapsible", [f6, Ms] = ze(d0), [p6, Ni] = f6(d0), Es = g.forwardRef(
(e, t) => {
const {
__scopeCollapsible: n,
open: r,
defaultOpen: i,
disabled: o,
onOpenChange: a,
...s
} = e, [l, c] = Ye({
prop: r,
defaultProp: i ?? !1,
onChange: a,
caller: d0
});
return /* @__PURE__ */ f.jsx(
p6,
{
scope: n,
disabled: o,
contentId: Ke(),
open: l,
onOpenToggle: g.useCallback(() => c((u) => !u), [c]),
children: /* @__PURE__ */ f.jsx(
re.div,
{
"data-state": Oi(l),
"data-disabled": o ? "" : void 0,
...s,
ref: t
}
)
}
);
}
);
Es.displayName = d0;
var Ss = "CollapsibleTrigger", As = g.forwardRef(
(e, t) => {
const { __scopeCollapsible: n, ...r } = e, i = Ni(Ss, n);
return /* @__PURE__ */ f.jsx(
re.button,
{
type: "button",
"aria-controls": i.contentId,
"aria-expanded": i.open || !1,
"data-state": Oi(i.open),
"data-disabled": i.disabled ? "" : void 0,
disabled: i.disabled,
...r,
ref: t,
onClick: W(e.onClick, i.onOpenToggle)
}
);
}
);
As.displayName = Ss;
var Di = "CollapsibleContent", Ls = g.forwardRef(
(e, t) => {
const { forceMount: n, ...r } = e, i = Ni(Di, e.__scopeCollapsible);
return /* @__PURE__ */ f.jsx(We, { present: n || i.open, children: ({ present: o }) => /* @__PURE__ */ f.jsx(m6, { ...r, ref: t, present: o }) });
}
);
Ls.displayName = Di;
var m6 = g.forwardRef((e, t) => {
const { __scopeCollapsible: n, present: r, children: i, ...o } = e, a = Ni(Di, n), [s, l] = g.useState(r), c = g.useRef(null), u = pe(t, c), d = g.useRef(0), m = d.current, p = g.useRef(0), C = p.current, h = a.open || s, b = g.useRef(h), v = g.useRef(void 0);
return g.useEffect(() => {
const y = requestAnimationFrame(() => b.current = !1);
return () => cancelAnimationFrame(y);
}, []), Ge(() => {
const y = c.current;
if (y) {
v.current = v.current || {
transitionDuration: y.style.transitionDuration,
animationName: y.style.animationName
}, y.style.transitionDuration = "0s", y.style.animationName = "none";
const x = y.getBoundingClientRect();
d.current = x.height, p.current = x.width, b.current || (y.style.transitionDuration = v.current.transitionDuration, y.style.animationName = v.current.animationName), l(r);
}
}, [a.open, r]), /* @__PURE__ */ f.jsx(
re.div,
{
"data-state": Oi(a.open),
"data-disabled": a.disabled ? "" : void 0,
id: a.contentId,
hidden: !h,
...o,
ref: u,
style: {
"--radix-collapsible-content-height": m ? `${m}px` : void 0,
"--radix-collapsible-content-width": C ? `${C}px` : void 0,
...e.style
},
children: h && i
}
);
});
function Oi(e) {
return e ? "open" : "closed";
}
var g6 = Es, h6 = As, C6 = Ls, b6 = g.createContext(void 0);
function or(e) {
const t = g.useContext(b6);
return e || t || "ltr";
}
var Mt = "Accordion", v6 = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"], [Fi, y6, x6] = Wr(Mt), [f0, lA] = ze(Mt, [
x6,
Ms
]), Zi = Ms(), Rs = O.forwardRef(
(e, t) => {
const { type: n, ...r } = e, i = r, o = r;
return /* @__PURE__ */ f.jsx(Fi.Provider, { scope: e.__scopeAccordion, children: n === "multiple" ? /* @__PURE__ */ f.jsx(k6, { ...o, ref: t }) : /* @__PURE__ */ f.jsx(I6, { ...i, ref: t }) });
}
);
Rs.displayName = Mt;
var [Ps, w6] = f0(Mt), [Ts, V6] = f0(
Mt,
{ collapsible: !1 }
), I6 = O.forwardRef(
(e, t) => {
const {
value: n,
defaultValue: r,
onValueChange: i = () => {
},
collapsible: o = !1,
...a
} = e, [s, l] = Ye({
prop: n,
defaultProp: r ?? "",
onChange: i,
caller: Mt
});
return /* @__PURE__ */ f.jsx(
Ps,
{
scope: e.__scopeAccordion,
value: O.useMemo(() => s ? [s] : [], [s]),
onItemOpen: l,
onItemClose: O.useCallback(() => o && l(""), [o, l]),
children: /* @__PURE__ */ f.jsx(Ts, { scope: e.__scopeAccordion, collapsible: o, children: /* @__PURE__ */ f.jsx(Ns, { ...a, ref: t }) })
}
);
}
), k6 = O.forwardRef((e, t) => {
const {
value: n,
defaultValue: r,
onValueChange: i = () => {
},
...o
} = e, [a, s] = Ye({
prop: n,
defaultProp: r ?? [],
onChange: i,
caller: Mt
}), l = O.useCallback(
(u) => s((d = []) => [...d, u]),
[s]
), c = O.useCallback(
(u) => s((d = []) => d.filter((m) => m !== u)),
[s]
);
return /* @__PURE__ */ f.jsx(
Ps,
{
scope: e.__scopeAccordion,
value: a,
onItemOpen: l,
onItemClose: c,
children: /* @__PURE__ */ f.jsx(Ts, { scope: e.__scopeAccordion, collapsible: !0, children: /* @__PURE__ */ f.jsx(Ns, { ...o, ref: t }) })
}
);
}), [H6, p0] = f0(Mt), Ns = O.forwardRef(
(e, t) => {
const { __scopeAccordion: n, disabled: r, dir: i, orientation: o = "vertical", ...a } = e, s = O.useRef(null), l = pe(s, t), c = y6(n), d = or(i) === "ltr", m = W(e.onKeyDown, (p) => {
var S;
if (!v6.includes(p.key)) return;
const C = p.target, h = c().filter((T) => {
var M;
return !((M = T.ref.current) != null && M.disabled);
}), b = h.findIndex((T) => T.ref.current === C), v = h.length;
if (b === -1) return;
p.preventDefault();
let y = b;
const x = 0, H = v - 1, V = () => {
y = b + 1, y > H && (y = x);
}, I = () => {
y = b - 1, y < x && (y = H);
};
switch (p.key) {
case "Home":
y = x;
break;
case "End":
y = H;
break;
case "ArrowRight":
o === "horizontal" && (d ? V() : I());
break;
case "ArrowDown":
o === "vertical" && V();
break;
case "ArrowLeft":
o === "horizontal" && (d ? I() : V());
break;
case "ArrowUp":
o === "vertical" && I();
break;
}
const E = y % v;
(S = h[E].ref.current) == null || S.focus();
});
return /* @__PURE__ */ f.jsx(
H6,
{
scope: n,
disabled: r,
direction: i,
orientation: o,
children: /* @__PURE__ */ f.jsx(Fi.Slot, { scope: n, children: /* @__PURE__ */ f.jsx(
re.div,
{
...a,
"data-orientation": o,
ref: l,
onKeyDown: r ? void 0 : m
}
) })
}
);
}
), _9 = "AccordionItem", [M6, ji] = f0(_9), Ds = O.forwardRef(
(e, t) => {
const { __scopeAccordion: n, value: r, ...i } = e, o = p0(_9, n), a = w6(_9, n), s = Zi(n), l = Ke(), c = r && a.value.includes(r) || !1, u = o.disabled || e.disabled;
return /* @__PURE__ */ f.jsx(
M6,
{
scope: n,
open: c,
disabled: u,
triggerId: l,
children: /* @__PURE__ */ f.jsx(
g6,
{
"data-orientation": o.orientation,
"data-state": _s(c),
...s,
...i,
ref: t,
disabled: u,
open: c,
onOpenChange: (d) => {
d ? a.onItemOpen(r) : a.onItemClose(r);
}
}
)
}
);
}
);
Ds.displayName = _9;
var Os = "AccordionHeader", Fs = O.forwardRef(
(e, t) => {
const { __scopeAccordion: n, ...r } = e, i = p0(Mt, n), o = ji(Os, n);
return /* @__PURE__ */ f.jsx(
re.h3,
{
"data-orientation": i.orientation,
"data-state": _s(o.open),
"data-disabled": o.disabled ? "" : void 0,
...r,
ref: t
}
);
}
);
Fs.displayName = Os;
var z2 = "AccordionTrigger", Zs = O.forwardRef(
(e, t) => {
const { __scopeAccordion: n, ...r } = e, i = p0(Mt, n), o = ji(z2, n), a = V6(z2, n), s = Zi(n);
return /* @__PURE__ */ f.jsx(Fi.ItemSlot, { scope: n, children: /* @__PURE__ */ f.jsx(
h6,
{
"aria-disabled": o.open && !a.collapsible || void 0,
"data-orientation": i.orientation,
id: o.triggerId,
...s,
...r,
ref: t
}
) });
}
);
Zs.displayName = z2;
var js = "AccordionContent", Bs = O.forwardRef(
(e, t) => {
const { __scopeAccordion: n, ...r } = e, i = p0(Mt, n), o = ji(js, n), a = Zi(n);
return /* @__PURE__ */ f.jsx(
C6,
{
role: "region",
"aria-labelledby": o.triggerId,
"data-orientation": i.orientation,
...a,
...r,
ref: t,
style: {
"--radix-accordion-content-height": "var(--radix-collapsible-content-height)",
"--radix-accordion-content-width": "var(--radix-collapsible-content-width)",
...e.style
}
}
);
}
);
Bs.displayName = js;
function _s(e) {
return e ? "open" : "closed";
}
var Gs = Rs, E6 = Ds, S6 = Fs, zs = Zs, Ws = Bs;
/**
* @license lucide-react v0.488.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const A6 = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), L6 = (e) => e.replace(
/^([A-Z])|[\s-_]+(\w)/g,
(t, n, r) => r ? r.toUpperCase() : n.toLowerCase()
), va = (e) => {
const t = L6(e);
return t.charAt(0).toUpperCase() + t.slice(1);
}, Xs = (...e) => e.filter((t, n, r) => !!t && t.trim() !== "" && r.indexOf(t) === n).join(" ").trim();
/**
* @license lucide-react v0.488.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
var R6 = {
xmlns: "http://www.w3.org/2000/svg",
width: 24,
height: 24,
viewBox: "0 0 24 24",
fill: "none",
stroke: "currentColor",
strokeWidth: 2,
strokeLinecap: "round",
strokeLinejoin: "round"
};
/**
* @license lucide-react v0.488.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const P6 = c0(
({
color: e = "currentColor",
size: t = 24,
strokeWidth: n = 2,
absoluteStrokeWidth: r,
className: i = "",
children: o,
iconNode: a,
...s
}, l) => B9(
"svg",
{
ref: l,
...R6,
width: t,
height: t,
stroke: e,
strokeWidth: r ? Number(n) * 24 / Number(t) : n,
className: Xs("lucide", i),
...s
},
[
...a.map(([c, u]) => B9(c, u)),
...Array.isArray(o) ? o : [o]
]
)
);
/**
* @license lucide-react v0.488.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const ot = (e, t) => {
const n = c0(
({ className: r, ...i }, o) => B9(P6, {
ref: o,
iconNode: t,
className: Xs(
`lucide-${A6(va(e))}`,
`lucide-${e}`,
r
),
...i
})
);
return n.displayName = va(e), n;
};
/**
* @license lucide-react v0.488.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const T6 = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], m0 = ot("check", T6);
/**
* @license lucide-react v0.488.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const N6 = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], G9 = ot("chevron-down", N6);
/**
* @license lucide-react v0.488.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const D6 = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], $s = ot("chevron-left", D6);
/**
* @license lucide-react v0.488.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const O6 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], Bi = ot("chevron-right", O6);
/**
* @license lucide-react v0.488.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const F6 = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]], Z6 = ot("chevron-up", F6);
/**
* @license lucide-react v0.488.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const j6 = [
["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
], B6 = ot("circle-check-big", j6);
/**
* @license lucide-react v0.488.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const _6 = [
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
["path", { d: "m15 9-6 6", key: "1uzhvr" }],
["path", { d: "m9 9 6 6", key: "z0biqf" }]
], G6 = ot("circle-x", _6);
/**
* @license lucide-react v0.488.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const z6 = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]], W6 = ot("circle", z6);
/**
* @license lucide-react v0.488.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const X6 = [
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
], Ys = ot("ellipsis", X6);
/**
* @license lucide-react v0.488.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const $6 = [
["line", { x1: "4", x2: "20", y1: "12", y2: "12", key: "1e0a9i" }],
["line", { x1: "4", x2: "20", y1: "6", y2: "6", key: "1owob3" }],
["line", { x1: "4", x2: "20", y1: "18", y2: "18", key: "yk5zj1" }]
], Y6 = ot("menu", $6);
/**
* @license lucide-react v0.488.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const J6 = [
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
], ya = ot("search", J6);
/**
* @license lucide-react v0.488.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const U6 = [
["path", { d: "M3 6h18", key: "d0wm0j" }],
["path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6", key: "4alrt4" }],
["path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2", key: "v07s0e" }],
["line", { x1: "10", x2: "10", y1: "11", y2: "17", key: "1uufr5" }],
["line", { x1: "14", x2: "14", y1: "11", y2: "17", key: "xtxkd" }]
], Q6 = ot("trash-2", U6);
/**
* @license lucide-react v0.488.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const K6 = [
[
"path",
{
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
key: "wmoenq"
}
],
["path", { d: "M12 9v4", key: "juzpu7" }],
["path", { d: "M12 17h.01", key: "p32p05" }]
], q6 = ot("triangle-alert", K6);
/**
* @license lucide-react v0.488.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const e5 = [
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
["polyline", { points: "17 8 12 3 7 8", key: "t8dd8p" }],
["line", { x1: "12", x2: "12", y1: "3", y2: "15", key: "widbto" }]
], t5 = ot("upload", e5);
/**
* @license lucide-react v0.488.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const n5 = [
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
], Xr = ot("x", n5);
function Js(e) {
var t, n, r = "";
if (typeof e == "string" || typeof e == "number") r += e;
else if (typeof e == "object") if (Array.isArray(e)) {
var i = e.length;
for (t = 0; t < i; t++) e[t] && (n = Js(e[t])) && (r && (r += " "), r += n);
} else for (n in e) e[n] && (r && (r += " "), r += n);
return r;
}
function Us() {
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = Js(e)) && (r && (r += " "), r += t);
return r;
}
const xa = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, wa = Us, Ce = (e, t) => (n) => {
var r;
if ((t == null ? void 0 : t.variants) == null) return wa(e, n == null ? void 0 : n.class, n == null ? void 0 : n.className);
const { variants: i, defaultVariants: o } = t, a = Object.keys(i).map((c) => {
const u = n == null ? void 0 : n[c], d = o == null ? void 0 : o[c];
if (u === null) return null;
const m = xa(u) || xa(d);
return i[c][m];
}), s = n && Object.entries(n).reduce((c, u) => {
let [d, m] = u;
return m === void 0 || (c[d] = m), c;
}, {}), l = t == null || (r = t.compoundVariants) === null || r === void 0 ? void 0 : r.reduce((c, u) => {
let { class: d, className: m, ...p } = u;
return Object.entries(p).every((C) => {
let [h, b] = C;
return Array.isArray(b) ? b.includes({
...o,
...s
}[h]) : {
...o,
...s
}[h] === b;
}) ? [
...c,
d,
m
] : c;
}, []);
return wa(e, a, l, n == null ? void 0 : n.class, n == null ? void 0 : n.className);
}, _i = "-", r5 = (e) => {
const t = o5(e), {
conflictingClassGroups: n,
conflictingClassGroupModifiers: r
} = e;
return {
getClassGroupId: (a) => {
const s = a.split(_i);
return s[0] === "" && s.length !== 1 && s.shift(), Qs(s, t) || i5(a);
},
getConflictingClassGroupIds: (a, s) => {
const l = n[a] || [];
return s && r[a] ? [...l, ...r[a]] : l;
}
};
}, Qs = (e, t) => {
var a;
if (e.length === 0)
return t.classGroupId;
const n = e[0], r = t.nextPart.get(n), i = r ? Qs(e.slice(1), r) : void 0;
if (i)
return i;
if (t.validators.length === 0)
return;
const o = e.join(_i);
return (a = t.validators.find(({
validator: s
}) => s(o))) == null ? void 0 : a.classGroupId;
}, Va = /^\[(.+)\]$/, i5 = (e) => {
if (Va.test(e)) {
const t = Va.exec(e)[1], n = t == null ? void 0 : t.substring(0, t.indexOf(":"));
if (n)
return "arbitrary.." + n;
}
}, o5 = (e) => {
const {
theme: t,
classGroups: n
} = e, r = {
nextPart: /* @__PURE__ */ new Map(),
validators: []
};
for (const i in n)
W2(n[i], r, i, t);
return r;
}, W2 = (e, t, n, r) => {
e.forEach((i) => {
if (typeof i == "string") {
const o = i === "" ? t : Ia(t, i);
o.classGroupId = n;
return;
}
if (typeof i == "function") {
if (a5(i)) {
W2(i(r), t, n, r);
return;
}
t.validators.push({
validator: i,
classGroupId: n
});
return;
}
Object.entries(i).forEach(([o, a]) => {
W2(a, Ia(t, o), n, r);
});
});
}, Ia = (e, t) => {
let n = e;
return t.split(_i).forEach((r) => {
n.nextPart.has(r) || n.nextPart.set(r, {
nextPart: /* @__PURE__ */ new Map(),
validators: []
}), n = n.nextPart.get(r);
}), n;
}, a5 = (e) => e.isThemeGetter, s5 = (e) => {
if (e < 1)
return {
get: () => {
},
set: () => {
}
};
let t = 0, n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
const i = (o, a) => {
n.set(o, a), t++, t > e && (t = 0, r = n, n = /* @__PURE__ */ new Map());
};
return {
get(o) {
let a = n.get(o);
if (a !== void 0)
return a;
if ((a = r.get(o)) !== void 0)
return i(o, a), a;
},
set(o, a) {
n.has(o) ? n.set(o, a) : i(o, a);
}
};
}, X2 = "!", $2 = ":", l5 = $2.length, c5 = (e) => {
const {
prefix: t,
experimentalParseClassName: n
} = e;
let r = (i) => {
const o = [];
let a = 0, s = 0, l = 0, c;
for (let C = 0; C < i.length; C++) {
let h = i[C];
if (a === 0 && s === 0) {
if (h === $2) {
o.push(i.slice(l, C)), l = C + l5;
continue;
}
if (h === "/") {
c = C;
continue;
}
}
h === "[" ? a++ : h === "]" ? a-- : h === "(" ? s++ : h === ")" && s--;
}
const u = o.length === 0 ? i : i.substring(l), d = u5(u), m = d !== u, p = c && c > l ? c - l : void 0;
return {
modifiers: o,
hasImportantModifier: m,
baseClassName: d,
maybePostfixModifierPosition: p
};
};
if (t) {
const i = t + $2, o = r;
r = (a) => a.startsWith(i) ? o(a.substring(i.length)) : {
isExternal: !0,
modifiers: [],
hasImportantModifier: !1,
baseClassName: a,
maybePostfixModifierPosition: void 0
};
}
if (n) {
const i = r;
r = (o) => n({
className: o,
parseClassName: i
});
}
return r;
}, u5 = (e) => e.endsWith(X2) ? e.substring(0, e.length - 1) : e.startsWith(X2) ? e.substring(1) : e, d5 = (e) => {
const t = Object.fromEntries(e.orderSensitiveModifiers.map((r) => [r, !0]));
return (r) => {
if (r.length <= 1)
return r;
const i = [];
let o = [];
return r.forEach((a) => {
a[0] === "[" || t[a] ? (i.push(...o.sort(), a), o = []) : o.push(a);
}), i.push(...o.sort()), i;
};
}, f5 = (e) => ({
cache: s5(e.cacheSize),
parseClassName: c5(e),
sortModifiers: d5(e),
...r5(e)
}), p5 = /\s+/, m5 = (e, t) => {
const {
parseClassName: n,
getClassGroupId: r,
getConflictingClassGroupIds: i,
sortModifiers: o
} = t, a = [], s = e.trim().split(p5);
let l = "";
for (let c = s.length - 1; c >= 0; c -= 1) {
const u = s[c], {
isExternal: d,
modifiers: m,
hasImportantModifier: p,
baseClassName: C,
maybePostfixModifierPosition: h
} = n(u);
if (d) {
l = u + (l.length > 0 ? " " + l : l);
continue;
}
let b = !!h, v = r(b ? C.substring(0, h) : C);
if (!v) {
if (!b) {
l = u + (l.length > 0 ? " " + l : l);
continue;
}
if (v = r(C), !v) {
l = u + (l.length > 0 ? " " + l : l);
continue;
}
b = !1;
}
const y = o(m).join(":"), x = p ? y + X2 : y, H = x + v;
if (a.includes(H))
continue;
a.push(H);
const V = i(v, b);
for (let I = 0; I < V.length; ++I) {
const E = V[I];
a.push(x + E);
}
l = u + (l.length > 0 ? " " + l : l);
}
return l;
};
function g5() {
let e = 0, t, n, r = "";
for (; e < arguments.length; )
(t = arguments[e++]) && (n = Ks(t)) && (r && (r += " "), r += n);
return r;
}
const Ks = (e) => {
if (typeof e == "string")
return e;
let t, n = "";
for (let r = 0; r < e.length; r++)
e[r] && (t = Ks(e[r])) && (n && (n += " "), n += t);
return n;
};
function h5(e, ...t) {
let n, r, i, o = a;
function a(l) {
const c = t.reduce((u, d) => d(u), e());
return n = f5(c), r = n.cache.get, i = n.cache.set, o = s, s(l);
}
function s(l) {
const c = r(l);
if (c)
return c;
const u = m5(l, n);
return i(l, u), u;
}
return function() {
return o(g5.apply(null, arguments));
};
}
const Fe = (e) => {
const t = (n) => n[e] || [];
return t.isThemeGetter = !0, t;
}, qs = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, el = /^\((?:(\w[\w-]*):)?(.+)\)$/i, C5 = /^\d+\/\d+$/, b5 = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, v5 = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, y5 = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, x5 = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, w5 = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, jn = (e) => C5.test(e), ge = (e) => !!e && !Number.isNaN(Number(e)), sn = (e) => !!e && Number.isInteger(Number(e)), e2 = (e) => e.endsWith("%") && ge(e.slice(0, -1)), Yt = (e) => b5.test(e), V5 = () => !0, I5 = (e) => (
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
v5.test(e) && !y5.test(e)
), tl = () => !1, k5 = (e) => x5.test(e), H5 = (e) => w5.test(e), M5 = (e) => !ie(e) && !oe(e), E5 = (e) => ar(e, il, tl), ie = (e) => qs.test(e), xn = (e) => ar(e, ol, I5), t2 = (e) => ar(e, P5, ge), ka = (e) => ar(e, nl, tl), S5 = (e) => ar(e, rl, H5), p9 = (e) => ar(e, al, k5), oe = (e) => el.test(e), xr = (e) => sr(e, ol), A5 = (e) => sr(e, T5), Ha = (e) => sr(e, nl), L5 = (e) => sr(e, il), R5 = (e) => sr(e, rl), m9 = (e) => sr(e, al, !0), ar = (e, t, n) => {
const r = qs.exec(e);
return r ? r[1] ? t(r[1]) : n(r[2]) : !1;
}, sr = (e, t, n = !1) => {
const r = el.exec(e);
return r ? r[1] ? t(r[1]) : n : !1;
}, nl = (e) => e === "position" || e === "percentage", rl = (e) => e === "image" || e === "url", il = (e) => e === "length" || e === "size" || e === "bg-size", ol = (e) => e === "length", P5 = (e) => e === "number", T5 = (e) => e === "family-name", al = (e) => e === "shadow", N5 = () => {
const e = Fe("color"), t = Fe("font"), n = Fe("text"), r = Fe("font-weight"), i = Fe("tracking"), o = Fe("leading"), a = Fe("breakpoint"), s = Fe("container"), l = Fe("spacing"), c = Fe("radius"), u = Fe("shadow"), d = Fe("inset-shadow"), m = Fe("text-shadow"), p = Fe("drop-shadow"), C = Fe("blur"), h = Fe("perspective"), b = Fe("aspect"), v = Fe("ease"), y = Fe("animate"), x = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], H = () => [
"center",
"top",
"bottom",
"left",
"right",
"top-left",
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
"left-top",
"top-right",
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
"right-top",
"bottom-right",
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
"right-bottom",
"bottom-left",
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
"left-bottom"
], V = () => [...H(), oe, ie], I = () => ["auto", "hidden", "clip", "visible", "scroll"], E = () => ["auto", "contain", "none"], S = () => [oe, ie, l], T = () => [jn, "full", "auto", ...S()], M = () => [sn, "none", "subgrid", oe, ie], R = () => ["auto", {
span: ["full", sn, oe, ie]
}, sn, oe, ie], P = () => [sn, "auto", oe, ie], F = () => ["auto", "min", "max", "fr", oe, ie], L = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], D = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], j = () => ["auto", ...S()], z = () => [jn, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...S()], N = () => [e, oe, ie], B = () => [...H(), Ha, ka, {
position: [oe, ie]
}], w = () => ["no-repeat", {
repeat: ["", "x", "y", "space", "round"]
}], X = () => ["auto", "cover", "contain", L5, E5, {
size: [oe, ie]
}], J = () => [e2, xr, xn], k = () => [
// Deprecated since Tailwind CSS v4.0.0
"",
"none",
"full",
c,
oe,
ie
], K = () => ["", ge, xr, xn], ee = () => ["solid", "dashed", "dotted", "double"], Q = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], _ = () => [ge, e2, Ha, ka], U = () => [
// Deprecated since Tailwind CSS v4.0.0
"",
"none",
C,
oe,
ie
], ne = () => ["none", ge, oe, ie], q = () => ["none", ge, oe, ie], ae = () => [ge, oe, ie], G = () => [jn, "full", ...S()];
return {
cacheSize: 500,
theme: {
animate: ["spin", "ping", "pulse", "bounce"],
aspect: ["video"],
blur: [Yt],
breakpoint: [Yt],
color: [V5],
container: [Yt],
"drop-shadow": [Yt],
ease: ["in", "out", "in-out"],
font: [M5],
"font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
"inset-shadow": [Yt],
leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
perspective: ["dramatic", "near", "normal", "midrange", "distant", "none"],
radius: [Yt],
shadow: [Yt],
spacing: ["px", ge],
text: [Yt],
"text-shadow": [Yt],
tracking: ["tighter", "tight", "normal", "wide", "wider", "widest"]
},
classGroups: {
// --------------
// --- Layout ---