nayan
Version:
<div align="center"> <img width="200" src="https://github.com/ursnj/nayan/blob/main/public/nayan.png?raw=true"> </div> <h1 align="center">Nayan UI</h1>
1,700 lines (1,697 loc) • 529 kB
JavaScript
var dp = Object.defineProperty;
var fp = (e, t, n) => t in e ? dp(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
var Ne = (e, t, n) => (fp(e, typeof t != "symbol" ? t + "" : t, n), n);
import * as E from "react";
import W, { createContext as qt, useMemo as Te, createElement as C, useContext as Rt, useCallback as J, forwardRef as R, Children as _t, isValidElement as fr, cloneElement as la, Fragment as gt, useRef as O, useEffect as z, useState as oe, useLayoutEffect as ua, useReducer as pp, Component as ac } from "react";
import * as bp from "react-dom";
import mp, { flushSync as ic, createPortal as sc } from "react-dom";
var To = { exports: {} }, pn = {};
/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var Si;
function gp() {
if (Si)
return pn;
Si = 1;
var e = W, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = { key: !0, ref: !0, __self: !0, __source: !0 };
function i(c, s, l) {
var u, d = {}, f = null, p = null;
l !== void 0 && (f = "" + l), s.key !== void 0 && (f = "" + s.key), s.ref !== void 0 && (p = s.ref);
for (u in s)
r.call(s, u) && !a.hasOwnProperty(u) && (d[u] = s[u]);
if (c && c.defaultProps)
for (u in s = c.defaultProps, s)
d[u] === void 0 && (d[u] = s[u]);
return { $$typeof: t, type: c, key: f, ref: p, props: d, _owner: o.current };
}
return pn.Fragment = n, pn.jsx = i, pn.jsxs = i, pn;
}
var bn = {};
/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var Ti;
function hp() {
return Ti || (Ti = 1, process.env.NODE_ENV !== "production" && function() {
var e = W, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), c = Symbol.for("react.context"), s = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), d = Symbol.for("react.memo"), f = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), g = Symbol.iterator, b = "@@iterator";
function m(x) {
if (x === null || typeof x != "object")
return null;
var P = g && x[g] || x[b];
return typeof P == "function" ? P : null;
}
var h = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function v(x) {
{
for (var P = arguments.length, L = new Array(P > 1 ? P - 1 : 0), ee = 1; ee < P; ee++)
L[ee - 1] = arguments[ee];
w("error", x, L);
}
}
function w(x, P, L) {
{
var ee = h.ReactDebugCurrentFrame, le = ee.getStackAddendum();
le !== "" && (P += "%s", L = L.concat([le]));
var ge = L.map(function(ce) {
return String(ce);
});
ge.unshift("Warning: " + P), Function.prototype.apply.call(console[x], console, ge);
}
}
var $ = !1, I = !1, S = !1, N = !1, T = !1, M;
M = Symbol.for("react.module.reference");
function X(x) {
return !!(typeof x == "string" || typeof x == "function" || x === r || x === a || T || x === o || x === l || x === u || N || x === p || $ || I || S || typeof x == "object" && x !== null && (x.$$typeof === f || x.$$typeof === d || x.$$typeof === i || x.$$typeof === c || x.$$typeof === s || // This needs to include all possible module reference object
// types supported by any Flight configuration anywhere since
// we don't know which Flight build this will end up being used
// with.
x.$$typeof === M || x.getModuleId !== void 0));
}
function U(x, P, L) {
var ee = x.displayName;
if (ee)
return ee;
var le = P.displayName || P.name || "";
return le !== "" ? L + "(" + le + ")" : L;
}
function F(x) {
return x.displayName || "Context";
}
function Q(x) {
if (x == null)
return null;
if (typeof x.tag == "number" && v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof x == "function")
return x.displayName || x.name || null;
if (typeof x == "string")
return x;
switch (x) {
case r:
return "Fragment";
case n:
return "Portal";
case a:
return "Profiler";
case o:
return "StrictMode";
case l:
return "Suspense";
case u:
return "SuspenseList";
}
if (typeof x == "object")
switch (x.$$typeof) {
case c:
var P = x;
return F(P) + ".Consumer";
case i:
var L = x;
return F(L._context) + ".Provider";
case s:
return U(x, x.render, "ForwardRef");
case d:
var ee = x.displayName || null;
return ee !== null ? ee : Q(x.type) || "Memo";
case f: {
var le = x, ge = le._payload, ce = le._init;
try {
return Q(ce(ge));
} catch {
return null;
}
}
}
return null;
}
var D = Object.assign, k = 0, j, Z, te, G, re, se, ne;
function q() {
}
q.__reactDisabledLog = !0;
function xe() {
{
if (k === 0) {
j = console.log, Z = console.info, te = console.warn, G = console.error, re = console.group, se = console.groupCollapsed, ne = console.groupEnd;
var x = {
configurable: !0,
enumerable: !0,
value: q,
writable: !0
};
Object.defineProperties(console, {
info: x,
log: x,
warn: x,
error: x,
group: x,
groupCollapsed: x,
groupEnd: x
});
}
k++;
}
}
function $e() {
{
if (k--, k === 0) {
var x = {
configurable: !0,
enumerable: !0,
writable: !0
};
Object.defineProperties(console, {
log: D({}, x, {
value: j
}),
info: D({}, x, {
value: Z
}),
warn: D({}, x, {
value: te
}),
error: D({}, x, {
value: G
}),
group: D({}, x, {
value: re
}),
groupCollapsed: D({}, x, {
value: se
}),
groupEnd: D({}, x, {
value: ne
})
});
}
k < 0 && v("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
}
}
var me = h.ReactCurrentDispatcher, ye;
function Ie(x, P, L) {
{
if (ye === void 0)
try {
throw Error();
} catch (le) {
var ee = le.stack.trim().match(/\n( *(at )?)/);
ye = ee && ee[1] || "";
}
return `
` + ye + x;
}
}
var he = !1, Be;
{
var pt = typeof WeakMap == "function" ? WeakMap : Map;
Be = new pt();
}
function B(x, P) {
if (!x || he)
return "";
{
var L = Be.get(x);
if (L !== void 0)
return L;
}
var ee;
he = !0;
var le = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
var ge;
ge = me.current, me.current = null, xe();
try {
if (P) {
var ce = function() {
throw Error();
};
if (Object.defineProperty(ce.prototype, "props", {
set: function() {
throw Error();
}
}), typeof Reflect == "object" && Reflect.construct) {
try {
Reflect.construct(ce, []);
} catch (st) {
ee = st;
}
Reflect.construct(x, [], ce);
} else {
try {
ce.call();
} catch (st) {
ee = st;
}
x.call(ce.prototype);
}
} else {
try {
throw Error();
} catch (st) {
ee = st;
}
x();
}
} catch (st) {
if (st && ee && typeof st.stack == "string") {
for (var ae = st.stack.split(`
`), Me = ee.stack.split(`
`), we = ae.length - 1, Ae = Me.length - 1; we >= 1 && Ae >= 0 && ae[we] !== Me[Ae]; )
Ae--;
for (; we >= 1 && Ae >= 0; we--, Ae--)
if (ae[we] !== Me[Ae]) {
if (we !== 1 || Ae !== 1)
do
if (we--, Ae--, Ae < 0 || ae[we] !== Me[Ae]) {
var He = `
` + ae[we].replace(" at new ", " at ");
return x.displayName && He.includes("<anonymous>") && (He = He.replace("<anonymous>", x.displayName)), typeof x == "function" && Be.set(x, He), He;
}
while (we >= 1 && Ae >= 0);
break;
}
}
} finally {
he = !1, me.current = ge, $e(), Error.prepareStackTrace = le;
}
var Gt = x ? x.displayName || x.name : "", Ni = Gt ? Ie(Gt) : "";
return typeof x == "function" && Be.set(x, Ni), Ni;
}
function it(x, P, L) {
return B(x, !1);
}
function Je(x) {
var P = x.prototype;
return !!(P && P.isReactComponent);
}
function Oe(x, P, L) {
if (x == null)
return "";
if (typeof x == "function")
return B(x, Je(x));
if (typeof x == "string")
return Ie(x);
switch (x) {
case l:
return Ie("Suspense");
case u:
return Ie("SuspenseList");
}
if (typeof x == "object")
switch (x.$$typeof) {
case s:
return it(x.render);
case d:
return Oe(x.type, P, L);
case f: {
var ee = x, le = ee._payload, ge = ee._init;
try {
return Oe(ge(le), P, L);
} catch {
}
}
}
return "";
}
var At = Object.prototype.hasOwnProperty, jn = {}, Xn = h.ReactDebugCurrentFrame;
function Ot(x) {
if (x) {
var P = x._owner, L = Oe(x.type, x._source, P ? P.type : null);
Xn.setExtraStackFrame(L);
} else
Xn.setExtraStackFrame(null);
}
function qr(x, P, L, ee, le) {
{
var ge = Function.call.bind(At);
for (var ce in x)
if (ge(x, ce)) {
var ae = void 0;
try {
if (typeof x[ce] != "function") {
var Me = Error((ee || "React class") + ": " + L + " type `" + ce + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof x[ce] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
throw Me.name = "Invariant Violation", Me;
}
ae = x[ce](P, ce, ee, L, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
} catch (we) {
ae = we;
}
ae && !(ae instanceof Error) && (Ot(le), v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", ee || "React class", L, ce, typeof ae), Ot(null)), ae instanceof Error && !(ae.message in jn) && (jn[ae.message] = !0, Ot(le), v("Failed %s type: %s", L, ae.message), Ot(null));
}
}
}
var Mt = Array.isArray;
function eo(x) {
return Mt(x);
}
function zf(x) {
{
var P = typeof Symbol == "function" && Symbol.toStringTag, L = P && x[Symbol.toStringTag] || x.constructor.name || "Object";
return L;
}
}
function Yf(x) {
try {
return hi(x), !1;
} catch {
return !0;
}
}
function hi(x) {
return "" + x;
}
function yi(x) {
if (Yf(x))
return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", zf(x)), hi(x);
}
var fn = h.ReactCurrentOwner, Jf = {
key: !0,
ref: !0,
__self: !0,
__source: !0
}, xi, Ci, to;
to = {};
function Uf(x) {
if (At.call(x, "ref")) {
var P = Object.getOwnPropertyDescriptor(x, "ref").get;
if (P && P.isReactWarning)
return !1;
}
return x.ref !== void 0;
}
function Qf(x) {
if (At.call(x, "key")) {
var P = Object.getOwnPropertyDescriptor(x, "key").get;
if (P && P.isReactWarning)
return !1;
}
return x.key !== void 0;
}
function Kf(x, P) {
if (typeof x.ref == "string" && fn.current && P && fn.current.stateNode !== P) {
var L = Q(fn.current.type);
to[L] || (v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', Q(fn.current.type), x.ref), to[L] = !0);
}
}
function qf(x, P) {
{
var L = function() {
xi || (xi = !0, v("%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://reactjs.org/link/special-props)", P));
};
L.isReactWarning = !0, Object.defineProperty(x, "key", {
get: L,
configurable: !0
});
}
}
function ep(x, P) {
{
var L = function() {
Ci || (Ci = !0, v("%s: `ref` 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://reactjs.org/link/special-props)", P));
};
L.isReactWarning = !0, Object.defineProperty(x, "ref", {
get: L,
configurable: !0
});
}
}
var tp = function(x, P, L, ee, le, ge, ce) {
var ae = {
// This tag allows us to uniquely identify this as a React Element
$$typeof: t,
// Built-in properties that belong on the element
type: x,
key: P,
ref: L,
props: ce,
// Record the component responsible for creating this element.
_owner: ge
};
return ae._store = {}, Object.defineProperty(ae._store, "validated", {
configurable: !1,
enumerable: !1,
writable: !0,
value: !1
}), Object.defineProperty(ae, "_self", {
configurable: !1,
enumerable: !1,
writable: !1,
value: ee
}), Object.defineProperty(ae, "_source", {
configurable: !1,
enumerable: !1,
writable: !1,
value: le
}), Object.freeze && (Object.freeze(ae.props), Object.freeze(ae)), ae;
};
function np(x, P, L, ee, le) {
{
var ge, ce = {}, ae = null, Me = null;
L !== void 0 && (yi(L), ae = "" + L), Qf(P) && (yi(P.key), ae = "" + P.key), Uf(P) && (Me = P.ref, Kf(P, le));
for (ge in P)
At.call(P, ge) && !Jf.hasOwnProperty(ge) && (ce[ge] = P[ge]);
if (x && x.defaultProps) {
var we = x.defaultProps;
for (ge in we)
ce[ge] === void 0 && (ce[ge] = we[ge]);
}
if (ae || Me) {
var Ae = typeof x == "function" ? x.displayName || x.name || "Unknown" : x;
ae && qf(ce, Ae), Me && ep(ce, Ae);
}
return tp(x, ae, Me, le, ee, fn.current, ce);
}
}
var no = h.ReactCurrentOwner, Ii = h.ReactDebugCurrentFrame;
function kt(x) {
if (x) {
var P = x._owner, L = Oe(x.type, x._source, P ? P.type : null);
Ii.setExtraStackFrame(L);
} else
Ii.setExtraStackFrame(null);
}
var ro;
ro = !1;
function oo(x) {
return typeof x == "object" && x !== null && x.$$typeof === t;
}
function wi() {
{
if (no.current) {
var x = Q(no.current.type);
if (x)
return `
Check the render method of \`` + x + "`.";
}
return "";
}
}
function rp(x) {
{
if (x !== void 0) {
var P = x.fileName.replace(/^.*[\\\/]/, ""), L = x.lineNumber;
return `
Check your code at ` + P + ":" + L + ".";
}
return "";
}
}
var $i = {};
function op(x) {
{
var P = wi();
if (!P) {
var L = typeof x == "string" ? x : x.displayName || x.name;
L && (P = `
Check the top-level render call using <` + L + ">.");
}
return P;
}
}
function Ai(x, P) {
{
if (!x._store || x._store.validated || x.key != null)
return;
x._store.validated = !0;
var L = op(P);
if ($i[L])
return;
$i[L] = !0;
var ee = "";
x && x._owner && x._owner !== no.current && (ee = " It was passed a child from " + Q(x._owner.type) + "."), kt(x), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', L, ee), kt(null);
}
}
function Ei(x, P) {
{
if (typeof x != "object")
return;
if (eo(x))
for (var L = 0; L < x.length; L++) {
var ee = x[L];
oo(ee) && Ai(ee, P);
}
else if (oo(x))
x._store && (x._store.validated = !0);
else if (x) {
var le = m(x);
if (typeof le == "function" && le !== x.entries)
for (var ge = le.call(x), ce; !(ce = ge.next()).done; )
oo(ce.value) && Ai(ce.value, P);
}
}
}
function ap(x) {
{
var P = x.type;
if (P == null || typeof P == "string")
return;
var L;
if (typeof P == "function")
L = P.propTypes;
else if (typeof P == "object" && (P.$$typeof === s || // Note: Memo only checks outer props here.
// Inner props are checked in the reconciler.
P.$$typeof === d))
L = P.propTypes;
else
return;
if (L) {
var ee = Q(P);
qr(L, x.props, "prop", ee, x);
} else if (P.PropTypes !== void 0 && !ro) {
ro = !0;
var le = Q(P);
v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", le || "Unknown");
}
typeof P.getDefaultProps == "function" && !P.getDefaultProps.isReactClassApproved && v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
}
}
function ip(x) {
{
for (var P = Object.keys(x.props), L = 0; L < P.length; L++) {
var ee = P[L];
if (ee !== "children" && ee !== "key") {
kt(x), v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", ee), kt(null);
break;
}
}
x.ref !== null && (kt(x), v("Invalid attribute `ref` supplied to `React.Fragment`."), kt(null));
}
}
function _i(x, P, L, ee, le, ge) {
{
var ce = X(x);
if (!ce) {
var ae = "";
(x === void 0 || typeof x == "object" && x !== null && Object.keys(x).length === 0) && (ae += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
var Me = rp(le);
Me ? ae += Me : ae += wi();
var we;
x === null ? we = "null" : eo(x) ? we = "array" : x !== void 0 && x.$$typeof === t ? (we = "<" + (Q(x.type) || "Unknown") + " />", ae = " Did you accidentally export a JSX literal instead of a component?") : we = typeof x, v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", we, ae);
}
var Ae = np(x, P, L, le, ge);
if (Ae == null)
return Ae;
if (ce) {
var He = P.children;
if (He !== void 0)
if (ee)
if (eo(He)) {
for (var Gt = 0; Gt < He.length; Gt++)
Ei(He[Gt], x);
Object.freeze && Object.freeze(He);
} else
v("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
Ei(He, x);
}
return x === r ? ip(Ae) : ap(Ae), Ae;
}
}
function sp(x, P, L) {
return _i(x, P, L, !0);
}
function cp(x, P, L) {
return _i(x, P, L, !1);
}
var lp = cp, up = sp;
bn.Fragment = r, bn.jsx = lp, bn.jsxs = up;
}()), bn;
}
process.env.NODE_ENV === "production" ? To.exports = gp() : To.exports = hp();
var y = To.exports;
function A() {
return A = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n)
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
}
return e;
}, A.apply(this, arguments);
}
function vp(e, t) {
const n = /* @__PURE__ */ qt(t);
function r(a) {
const { children: i, ...c } = a, s = Te(
() => c,
Object.values(c)
);
return /* @__PURE__ */ C(n.Provider, {
value: s
}, i);
}
function o(a) {
const i = Rt(n);
if (i)
return i;
if (t !== void 0)
return t;
throw new Error(`\`${a}\` must be used within \`${e}\``);
}
return r.displayName = e + "Provider", [
r,
o
];
}
function _e(e, t = []) {
let n = [];
function r(a, i) {
const c = /* @__PURE__ */ qt(i), s = n.length;
n = [
...n,
i
];
function l(d) {
const { scope: f, children: p, ...g } = d, b = (f == null ? void 0 : f[e][s]) || c, m = Te(
() => g,
Object.values(g)
);
return /* @__PURE__ */ C(b.Provider, {
value: m
}, p);
}
function u(d, f) {
const p = (f == null ? void 0 : f[e][s]) || c, g = Rt(p);
if (g)
return g;
if (i !== void 0)
return i;
throw new Error(`\`${d}\` must be used within \`${a}\``);
}
return l.displayName = a + "Provider", [
l,
u
];
}
const o = () => {
const a = n.map((i) => /* @__PURE__ */ qt(i));
return function(c) {
const s = (c == null ? void 0 : c[e]) || a;
return Te(
() => ({
[`__scope${e}`]: {
...c,
[e]: s
}
}),
[
c,
s
]
);
};
};
return o.scopeName = e, [
r,
yp(o, ...t)
];
}
function yp(...e) {
const t = e[0];
if (e.length === 1)
return t;
const n = () => {
const r = e.map(
(o) => ({
useScope: o(),
scopeName: o.scopeName
})
);
return function(a) {
const i = r.reduce((c, { useScope: s, scopeName: l }) => {
const d = s(a)[`__scope${l}`];
return {
...c,
...d
};
}, {});
return Te(
() => ({
[`__scope${t.scopeName}`]: i
}),
[
i
]
);
};
};
return n.scopeName = t.scopeName, n;
}
function xp(e, t) {
typeof e == "function" ? e(t) : e != null && (e.current = t);
}
function _r(...e) {
return (t) => e.forEach(
(n) => xp(n, t)
);
}
function be(...e) {
return J(_r(...e), e);
}
const ht = /* @__PURE__ */ R((e, t) => {
const { children: n, ...r } = e, o = _t.toArray(n), a = o.find(Cp);
if (a) {
const i = a.props.children, c = o.map((s) => s === a ? _t.count(i) > 1 ? _t.only(null) : /* @__PURE__ */ fr(i) ? i.props.children : null : s);
return /* @__PURE__ */ C(Ro, A({}, r, {
ref: t
}), /* @__PURE__ */ fr(i) ? /* @__PURE__ */ la(i, void 0, c) : null);
}
return /* @__PURE__ */ C(Ro, A({}, r, {
ref: t
}), n);
});
ht.displayName = "Slot";
const Ro = /* @__PURE__ */ R((e, t) => {
const { children: n, ...r } = e;
return /* @__PURE__ */ fr(n) ? /* @__PURE__ */ la(n, {
...Ip(r, n.props),
ref: t ? _r(t, n.ref) : n.ref
}) : _t.count(n) > 1 ? _t.only(null) : null;
});
Ro.displayName = "SlotClone";
const da = ({ children: e }) => /* @__PURE__ */ C(gt, null, e);
function Cp(e) {
return /* @__PURE__ */ fr(e) && e.type === da;
}
function Ip(e, t) {
const n = {
...t
};
for (const r in t) {
const o = e[r], a = t[r];
/^on[A-Z]/.test(r) ? o && a ? n[r] = (...c) => {
a(...c), o(...c);
} : o && (n[r] = o) : r === "style" ? n[r] = {
...o,
...a
} : r === "className" && (n[r] = [
o,
a
].filter(Boolean).join(" "));
}
return {
...e,
...n
};
}
function Nr(e) {
const t = e + "CollectionProvider", [n, r] = _e(t), [o, a] = n(t, {
collectionRef: {
current: null
},
itemMap: /* @__PURE__ */ new Map()
}), i = (p) => {
const { scope: g, children: b } = p, m = W.useRef(null), h = W.useRef(/* @__PURE__ */ new Map()).current;
return /* @__PURE__ */ W.createElement(o, {
scope: g,
itemMap: h,
collectionRef: m
}, b);
}, c = e + "CollectionSlot", s = /* @__PURE__ */ W.forwardRef((p, g) => {
const { scope: b, children: m } = p, h = a(c, b), v = be(g, h.collectionRef);
return /* @__PURE__ */ W.createElement(ht, {
ref: v
}, m);
}), l = e + "CollectionItemSlot", u = "data-radix-collection-item", d = /* @__PURE__ */ W.forwardRef((p, g) => {
const { scope: b, children: m, ...h } = p, v = W.useRef(null), w = be(g, v), $ = a(l, b);
return W.useEffect(() => ($.itemMap.set(v, {
ref: v,
...h
}), () => void $.itemMap.delete(v))), /* @__PURE__ */ W.createElement(ht, {
[u]: "",
ref: w
}, m);
});
function f(p) {
const g = a(e + "CollectionConsumer", p);
return W.useCallback(() => {
const m = g.collectionRef.current;
if (!m)
return [];
const h = Array.from(m.querySelectorAll(`[${u}]`));
return Array.from(g.itemMap.values()).sort(
($, I) => h.indexOf($.ref.current) - h.indexOf(I.ref.current)
);
}, [
g.collectionRef,
g.itemMap
]);
}
return [
{
Provider: i,
Slot: s,
ItemSlot: d
},
f,
r
];
}
function V(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
return function(o) {
if (e == null || e(o), n === !1 || !o.defaultPrevented)
return t == null ? void 0 : t(o);
};
}
function ke(e) {
const t = O(e);
return z(() => {
t.current = e;
}), Te(
() => (...n) => {
var r;
return (r = t.current) === null || r === void 0 ? void 0 : r.call(t, ...n);
},
[]
);
}
function Le({ prop: e, defaultProp: t, onChange: n = () => {
} }) {
const [r, o] = wp({
defaultProp: t,
onChange: n
}), a = e !== void 0, i = a ? e : r, c = ke(n), s = J((l) => {
if (a) {
const d = typeof l == "function" ? l(e) : l;
d !== e && c(d);
} else
o(l);
}, [
a,
e,
o,
c
]);
return [
i,
s
];
}
function wp({ defaultProp: e, onChange: t }) {
const n = oe(e), [r] = n, o = O(r), a = ke(t);
return z(() => {
o.current !== r && (a(r), o.current = r);
}, [
r,
o,
a
]), n;
}
const $p = [
"a",
"button",
"div",
"form",
"h2",
"h3",
"img",
"input",
"label",
"li",
"nav",
"ol",
"p",
"span",
"svg",
"ul"
], K = $p.reduce((e, t) => {
const n = /* @__PURE__ */ R((r, o) => {
const { asChild: a, ...i } = r, c = a ? ht : t;
return z(() => {
window[Symbol.for("radix-ui")] = !0;
}, []), /* @__PURE__ */ C(c, A({}, i, {
ref: o
}));
});
return n.displayName = `Primitive.${t}`, {
...e,
[t]: n
};
}, {});
function fa(e, t) {
e && ic(
() => e.dispatchEvent(t)
);
}
const vt = globalThis != null && globalThis.document ? ua : () => {
};
function Ap(e, t) {
return pp((n, r) => {
const o = t[n][r];
return o ?? n;
}, e);
}
const Fe = (e) => {
const { present: t, children: n } = e, r = Ep(t), o = typeof n == "function" ? n({
present: r.isPresent
}) : _t.only(n), a = be(r.ref, o.ref);
return typeof n == "function" || r.isPresent ? /* @__PURE__ */ la(o, {
ref: a
}) : null;
};
Fe.displayName = "Presence";
function Ep(e) {
const [t, n] = oe(), r = O({}), o = O(e), a = O("none"), i = e ? "mounted" : "unmounted", [c, s] = Ap(i, {
mounted: {
UNMOUNT: "unmounted",
ANIMATION_OUT: "unmountSuspended"
},
unmountSuspended: {
MOUNT: "mounted",
ANIMATION_END: "unmounted"
},
unmounted: {
MOUNT: "mounted"
}
});
return z(() => {
const l = Zn(r.current);
a.current = c === "mounted" ? l : "none";
}, [
c
]), vt(() => {
const l = r.current, u = o.current;
if (u !== e) {
const f = a.current, p = Zn(l);
e ? s("MOUNT") : p === "none" || (l == null ? void 0 : l.display) === "none" ? s("UNMOUNT") : s(u && f !== p ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
}
}, [
e,
s
]), vt(() => {
if (t) {
const l = (d) => {
const p = Zn(r.current).includes(d.animationName);
d.target === t && p && ic(
() => s("ANIMATION_END")
);
}, u = (d) => {
d.target === t && (a.current = Zn(r.current));
};
return t.addEventListener("animationstart", u), t.addEventListener("animationcancel", l), t.addEventListener("animationend", l), () => {
t.removeEventListener("animationstart", u), t.removeEventListener("animationcancel", l), t.removeEventListener("animationend", l);
};
} else
s("ANIMATION_END");
}, [
t,
s
]), {
isPresent: [
"mounted",
"unmountSuspended"
].includes(c),
ref: J((l) => {
l && (r.current = getComputedStyle(l)), n(l);
}, [])
};
}
function Zn(e) {
return (e == null ? void 0 : e.animationName) || "none";
}
const _p = E.useId || (() => {
});
let Np = 0;
function je(e) {
const [t, n] = E.useState(_p());
return vt(() => {
e || n(
(r) => r ?? String(Np++)
);
}, [
e
]), e || (t ? `radix-${t}` : "");
}
const cc = "Collapsible", [Sp, lc] = _e(cc), [Tp, pa] = Sp(cc), Rp = /* @__PURE__ */ R((e, t) => {
const { __scopeCollapsible: n, open: r, defaultOpen: o, disabled: a, onOpenChange: i, ...c } = e, [s = !1, l] = Le({
prop: r,
defaultProp: o,
onChange: i
});
return /* @__PURE__ */ C(Tp, {
scope: n,
disabled: a,
contentId: je(),
open: s,
onOpenToggle: J(
() => l(
(u) => !u
),
[
l
]
)
}, /* @__PURE__ */ C(K.div, A({
"data-state": ba(s),
"data-disabled": a ? "" : void 0
}, c, {
ref: t
})));
}), Dp = "CollapsibleTrigger", Pp = /* @__PURE__ */ R((e, t) => {
const { __scopeCollapsible: n, ...r } = e, o = pa(Dp, n);
return /* @__PURE__ */ C(K.button, A({
type: "button",
"aria-controls": o.contentId,
"aria-expanded": o.open || !1,
"data-state": ba(o.open),
"data-disabled": o.disabled ? "" : void 0,
disabled: o.disabled
}, r, {
ref: t,
onClick: V(e.onClick, o.onOpenToggle)
}));
}), uc = "CollapsibleContent", Fp = /* @__PURE__ */ R((e, t) => {
const { forceMount: n, ...r } = e, o = pa(uc, e.__scopeCollapsible);
return /* @__PURE__ */ C(
Fe,
{
present: n || o.open
},
({ present: a }) => /* @__PURE__ */ C(Op, A({}, r, {
ref: t,
present: a
}))
);
}), Op = /* @__PURE__ */ R((e, t) => {
const { __scopeCollapsible: n, present: r, children: o, ...a } = e, i = pa(uc, n), [c, s] = oe(r), l = O(null), u = be(t, l), d = O(0), f = d.current, p = O(0), g = p.current, b = i.open || c, m = O(b), h = O();
return z(() => {
const v = requestAnimationFrame(
() => m.current = !1
);
return () => cancelAnimationFrame(v);
}, []), vt(() => {
const v = l.current;
if (v) {
h.current = h.current || {
transitionDuration: v.style.transitionDuration,
animationName: v.style.animationName
}, v.style.transitionDuration = "0s", v.style.animationName = "none";
const w = v.getBoundingClientRect();
d.current = w.height, p.current = w.width, m.current || (v.style.transitionDuration = h.current.transitionDuration, v.style.animationName = h.current.animationName), s(r);
}
}, [
i.open,
r
]), /* @__PURE__ */ C(K.div, A({
"data-state": ba(i.open),
"data-disabled": i.disabled ? "" : void 0,
id: i.contentId,
hidden: !b
}, a, {
ref: u,
style: {
"--radix-collapsible-content-height": f ? `${f}px` : void 0,
"--radix-collapsible-content-width": g ? `${g}px` : void 0,
...e.style
}
}), b && o);
});
function ba(e) {
return e ? "open" : "closed";
}
const Mp = Rp, kp = Pp, Gp = Fp, Lp = /* @__PURE__ */ qt(void 0);
function Pn(e) {
const t = Rt(Lp);
return e || t || "ltr";
}
const It = "Accordion", Vp = [
"Home",
"End",
"ArrowDown",
"ArrowUp",
"ArrowLeft",
"ArrowRight"
], [ma, Bp, Wp] = Nr(It), [Sr, K$] = _e(It, [
Wp,
lc
]), ga = lc(), dc = /* @__PURE__ */ W.forwardRef((e, t) => {
const { type: n, ...r } = e, o = r, a = r;
return /* @__PURE__ */ W.createElement(ma.Provider, {
scope: e.__scopeAccordion
}, n === "multiple" ? /* @__PURE__ */ W.createElement(Hp, A({}, a, {
ref: t
})) : /* @__PURE__ */ W.createElement(Zp, A({}, o, {
ref: t
})));
});
dc.propTypes = {
type(e) {
const t = e.value || e.defaultValue;
return e.type && ![
"single",
"multiple"
].includes(e.type) ? new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`.") : e.type === "multiple" && typeof t == "string" ? new Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`.") : e.type === "single" && Array.isArray(t) ? new Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`.") : null;
}
};
const [fc, jp] = Sr(It), [pc, Xp] = Sr(It, {
collapsible: !1
}), Zp = /* @__PURE__ */ W.forwardRef((e, t) => {
const { value: n, defaultValue: r, onValueChange: o = () => {
}, collapsible: a = !1, ...i } = e, [c, s] = Le({
prop: n,
defaultProp: r,
onChange: o
});
return /* @__PURE__ */ W.createElement(fc, {
scope: e.__scopeAccordion,
value: c ? [
c
] : [],
onItemOpen: s,
onItemClose: W.useCallback(
() => a && s(""),
[
a,
s
]
)
}, /* @__PURE__ */ W.createElement(pc, {
scope: e.__scopeAccordion,
collapsible: a
}, /* @__PURE__ */ W.createElement(bc, A({}, i, {
ref: t
}))));
}), Hp = /* @__PURE__ */ W.forwardRef((e, t) => {
const { value: n, defaultValue: r, onValueChange: o = () => {
}, ...a } = e, [i = [], c] = Le({
prop: n,
defaultProp: r,
onChange: o
}), s = W.useCallback(
(u) => c(
(d = []) => [
...d,
u
]
),
[
c
]
), l = W.useCallback(
(u) => c(
(d = []) => d.filter(
(f) => f !== u
)
),
[
c
]
);
return /* @__PURE__ */ W.createElement(fc, {
scope: e.__scopeAccordion,
value: i,
onItemOpen: s,
onItemClose: l
}, /* @__PURE__ */ W.createElement(pc, {
scope: e.__scopeAccordion,
collapsible: !0
}, /* @__PURE__ */ W.createElement(bc, A({}, a, {
ref: t
}))));
}), [zp, Tr] = Sr(It), bc = /* @__PURE__ */ W.forwardRef((e, t) => {
const { __scopeAccordion: n, disabled: r, dir: o, orientation: a = "vertical", ...i } = e, c = W.useRef(null), s = be(c, t), l = Bp(n), d = Pn(o) === "ltr", f = V(e.onKeyDown, (p) => {
var g;
if (!Vp.includes(p.key))
return;
const b = p.target, m = l().filter((M) => {
var X;
return !((X = M.ref.current) !== null && X !== void 0 && X.disabled);
}), h = m.findIndex(
(M) => M.ref.current === b
), v = m.length;
if (h === -1)
return;
p.preventDefault();
let w = h;
const $ = 0, I = v - 1, S = () => {
w = h + 1, w > I && (w = $);
}, N = () => {
w = h - 1, w < $ && (w = I);
};
switch (p.key) {
case "Home":
w = $;
break;
case "End":
w = I;
break;
case "ArrowRight":
a === "horizontal" && (d ? S() : N());
break;
case "ArrowDown":
a === "vertical" && S();
break;
case "ArrowLeft":
a === "horizontal" && (d ? N() : S());
break;
case "ArrowUp":
a === "vertical" && N();
break;
}
const T = w % v;
(g = m[T].ref.current) === null || g === void 0 || g.focus();
});
return /* @__PURE__ */ W.createElement(zp, {
scope: n,
disabled: r,
direction: o,
orientation: a
}, /* @__PURE__ */ W.createElement(ma.Slot, {
scope: n
}, /* @__PURE__ */ W.createElement(K.div, A({}, i, {
"data-orientation": a,
ref: s,
onKeyDown: r ? void 0 : f
}))));
}), Do = "AccordionItem", [Yp, ha] = Sr(Do), Jp = /* @__PURE__ */ W.forwardRef((e, t) => {
const { __scopeAccordion: n, value: r, ...o } = e, a = Tr(Do, n), i = jp(Do, n), c = ga(n), s = je(), l = r && i.value.includes(r) || !1, u = a.disabled || e.disabled;
return /* @__PURE__ */ W.createElement(Yp, {
scope: n,
open: l,
disabled: u,
triggerId: s
}, /* @__PURE__ */ W.createElement(Mp, A({
"data-orientation": a.orientation,
"data-state": mc(l)
}, c, o, {
ref: t,
disabled: u,
open: l,
onOpenChange: (d) => {
d ? i.onItemOpen(r) : i.onItemClose(r);
}
})));
}), Up = "AccordionHeader", Qp = /* @__PURE__ */ W.forwardRef((e, t) => {
const { __scopeAccordion: n, ...r } = e, o = Tr(It, n), a = ha(Up, n);
return /* @__PURE__ */ W.createElement(K.h3, A({
"data-orientation": o.orientation,
"data-state": mc(a.open),
"data-disabled": a.disabled ? "" : void 0
}, r, {
ref: t
}));
}), Ri = "AccordionTrigger", Kp = /* @__PURE__ */ W.forwardRef((e, t) => {
const { __scopeAccordion: n, ...r } = e, o = Tr(It, n), a = ha(Ri, n), i = Xp(Ri, n), c = ga(n);
return /* @__PURE__ */ W.createElement(ma.ItemSlot, {
scope: n
}, /* @__PURE__ */ W.createElement(kp, A({
"aria-disabled": a.open && !i.collapsible || void 0,
"data-orientation": o.orientation,
id: a.triggerId
}, c, r, {
ref: t
})));
}), qp = "AccordionContent", eb = /* @__PURE__ */ W.forwardRef((e, t) => {
const { __scopeAccordion: n, ...r } = e, o = Tr(It, n), a = ha(qp, n), i = ga(n);
return /* @__PURE__ */ W.createElement(Gp, A({
role: "region",
"aria-labelledby": a.triggerId,
"data-orientation": o.orientation
}, i, r, {
ref: t,
style: {
"--radix-accordion-content-height": "var(--radix-collapsible-content-height)",
"--radix-accordion-content-width": "var(--radix-collapsible-content-width)",
...e.style
}
}));
});
function mc(e) {
return e ? "open" : "closed";
}
const tb = dc, nb = Jp, rb = Qp, gc = Kp, hc = eb;
/**
* @license lucide-react v0.394.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const ob = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), vc = (...e) => e.filter((t, n, r) => !!t && r.indexOf(t) === n).join(" ");
/**
* @license lucide-react v0.394.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
var ab = {
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.394.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const ib = R(
({
color: e = "currentColor",
size: t = 24,
strokeWidth: n = 2,
absoluteStrokeWidth: r,
className: o = "",
children: a,
iconNode: i,
...c
}, s) => C(
"svg",
{
ref: s,
...ab,
width: t,
height: t,
stroke: e,
strokeWidth: r ? Number(n) * 24 / Number(t) : n,
className: vc("lucide", o),
...c
},
[
...i.map(([l, u]) => C(l, u)),
...Array.isArray(a) ? a : [a]
]
)
);
/**
* @license lucide-react v0.394.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const rt = (e, t) => {
const n = R(
({ className: r, ...o }, a) => C(ib, {
ref: a,
iconNode: t,
className: vc(`lucide-${ob(e)}`, r),
...o
})
);
return n.displayName = `${e}`, n;
};
/**
* @license lucide-react v0.394.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const sb = rt("BadgeAlert", [
[
"path",
{
d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",
key: "3c2336"
}
],
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
]);
/**
* @license lucide-react v0.394.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const yc = rt("Check", [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]]);
/**
* @license lucide-react v0.394.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const cb = rt("ChevronDown", [
["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]
]);
/**
* @license lucide-react v0.394.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const lb = rt("ChevronRight", [
["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
]);
/**
* @license lucide-react v0.394.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const ub = rt("CircleCheck", [
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
]);
/**
* @license lucide-react v0.394.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const db = rt("CircleX", [
["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" }]
]);
/**
* @license lucide-react v0.394.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const xc = rt("Circle", [
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]
]);
/**
* @license lucide-react v0.394.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const fb = rt("Info", [
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
["path", { d: "M12 16v-4", key: "1dtifu" }],
["path", { d: "M12 8h.01", key: "e9boi3" }]
]);
/**
* @license lucide-react v0.394.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const pb = rt("TriangleAlert", [
[
"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" }]
]);
/**
* @license lucide-react v0.394.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const Rr = rt("X", [
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
]);
function Cc(e) {
var t, n, r = "";
if (typeof e == "string" || typeof e == "number")
r += e;
else if (typeof e == "object")
if (Array.isArray(e)) {
var o = e.length;
for (t = 0; t < o; t++)
e[t] && (n = Cc(e[t])) && (r && (r += " "), r += n);
} else
for (n in e)
e[n] && (r && (r += " "), r += n);
return r;
}
function bb() {
for (var e, t, n = 0, r = "", o = arguments.length; n < o; n++)
(e = arguments[n]) && (t = Cc(e)) && (r && (r += " "), r += t);
return r;
}
function mb() {
for (var e = 0, t, n, r = ""; e < arguments.length; )
(t = arguments[e++]) && (n = Ic(t)) && (r && (r += " "), r += n);
return r;
}
function Ic(e) {
if (typeof e == "string")
return e;
for (var t, n = "", r = 0; r < e.length; r++)
e[r] && (t = Ic(e[r])) && (n && (n += " "), n += t);
return n;
}
var va = "-";
function gb(e) {
var t = vb(e), n = e.conflictingClassGroups, r = e.conflictingClassGroupModifiers, o = r === void 0 ? {} : r;
function a(c) {
var s = c.split(va);
return s[0] === "" && s.length !== 1 && s.shift(), wc(s, t) || hb(c);
}
function i(c, s) {
var l = n[c] || [];
return s && o[c] ? [].concat(l, o[c]) : l;
}
return {
getClassGroupId: a,
getConflictingClassGroupIds: i
};
}
function wc(e, t) {
var i;
if (e.length === 0)
return t.classGroupId;
var n = e[0], r = t.nextPart.get(n), o = r ? wc(e.slice(1), r) : void 0;
if (o)
return o;
if (t.validators.length !== 0) {
var a = e.join(va);
return (i = t.validators.find(function(c) {
var s = c.validator;
return s(a);
})) == null ? void 0 : i.classGroupId;
}
}
var Di = /^\[(.+)\]$/;
function hb(e) {
if (Di.test(e)) {
var t = Di.exec(e)[1], n = t == null ? void 0 : t.substring(0, t.indexOf(":"));
if (n)
return "arbitrary.." + n;
}
}
function vb(e) {
var t = e.theme, n = e.prefix, r = {
nextPart: /* @__PURE__ */ new Map(),
validators: []
}, o = xb(Object.entries(e.classGroups), n);
return o.forEach(function(a) {
var i = a[0], c = a[1];
Po(c, r, i, t);
}), r;
}
function Po(e, t, n, r) {
e.forEach(function(o) {
if (typeof o == "string") {
var a = o === "" ? t : Pi(t, o);
a.classGroupId = n;
return;
}
if (typeof o == "function") {
if (yb(o)) {
Po(o(r), t, n, r);
return;
}
t.validators.push({
validator: o,
classGroupId: n
});
return;
}
Object.entries(o).forEach(function(i) {
var c = i[0], s = i[1];
Po(s, Pi(t, c), n, r);
});
});
}
function Pi(e, t) {
var n = e;
return t.split(va).forEach(function(r) {
n.nextPart.has(r) || n.nextPart.set(r, {
nextPart: /* @__PURE__ */ new Map(),
validators: []
}), n = n.nextPart.get(r);
}), n;
}
function yb(e) {
return e.isThemeGetter;
}
function xb(e, t) {
return t ? e.map(function(n) {
var r = n[0], o = n[1], a = o.map(function(i) {
return typeof i == "string" ? t + i : typeof i == "object" ? Object.fromEntries(Object.entries(i).map(function(c) {
var s = c[0], l = c[1];
return [t + s, l];
})) : i;
});
return [r, a];
}) : e;
}
function Cb(e) {
if (e < 1)
return {
get: function() {
},
set: function() {
}
};
var t = 0, n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
function o(a, i) {
n.set(a, i), t++, t > e && (t = 0, r = n, n = /* @__PURE__ */ new Map());
}
return {
get: function(i) {
var c = n.get(i);
if (c !== void 0)
return c;
if ((c = r.get(i)) !== void 0)
return o(i, c), c;
},
set: function(i, c) {
n.has(i) ? n.set(i, c) : o(i, c);
}
};
}
var $c = "!";
function Ib(e) {
var t = e.separator || ":", n = t.length === 1, r = t[0], o = t.length;
return function(i) {
for (var c = [], s = 0, l = 0, u, d = 0; d < i.length; d++) {
var f = i[d];
if (s === 0) {
if (f === r && (n || i.slice(d, d + o) === t)) {
c.push(i.slice(l, d)), l = d + o;
continue;
}
if (f === "/") {
u = d;
continue;
}
}
f === "[" ? s++ : f === "]" && s--;
}
var p = c.length === 0 ? i : i.substring(l), g = p.startsWith($c), b = g ? p.substring(1) : p, m = u && u > l ? u - l : void 0;
return {
modifiers: c,
hasImportantModifier: g,
baseClassName: b,
maybePostfixModifierPosition: m
};
};
}
f