react-nepali-datetime-picker
Version:
A simple and reusable Nepali calendar, date and time picker components for React.
1,754 lines (1,750 loc) • 200 kB
JavaScript
var kn = Object.defineProperty;
var An = (t, e, n) => e in t ? kn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
var ie = (t, e, n) => (An(t, typeof e != "symbol" ? e + "" : e, n), n);
import * as ue from "react";
import w0, { forwardRef as Yt, useState as F, useEffect as ae, useMemo as Ae, useCallback as In, useRef as Ne } from "react";
function Dn(t) {
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
}
var Rt = { exports: {} }, Ke = {};
/**
* @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 t0;
function Rn() {
if (t0)
return Ke;
t0 = 1;
var t = w0, e = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, o = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = { key: !0, ref: !0, __self: !0, __source: !0 };
function l(i, u, f) {
var d, c = {}, p = null, y = null;
f !== void 0 && (p = "" + f), u.key !== void 0 && (p = "" + u.key), u.ref !== void 0 && (y = u.ref);
for (d in u)
r.call(u, d) && !a.hasOwnProperty(d) && (c[d] = u[d]);
if (i && i.defaultProps)
for (d in u = i.defaultProps, u)
c[d] === void 0 && (c[d] = u[d]);
return { $$typeof: e, type: i, key: p, ref: y, props: c, _owner: o.current };
}
return Ke.Fragment = n, Ke.jsx = l, Ke.jsxs = l, Ke;
}
var Qe = {};
/**
* @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 n0;
function On() {
return n0 || (n0 = 1, process.env.NODE_ENV !== "production" && function() {
var t = w0, e = 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"), l = Symbol.for("react.provider"), i = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), c = Symbol.for("react.memo"), p = Symbol.for("react.lazy"), y = Symbol.for("react.offscreen"), m = Symbol.iterator, g = "@@iterator";
function E(s) {
if (s === null || typeof s != "object")
return null;
var v = m && s[m] || s[g];
return typeof v == "function" ? v : null;
}
var C = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function k(s) {
{
for (var v = arguments.length, b = new Array(v > 1 ? v - 1 : 0), _ = 1; _ < v; _++)
b[_ - 1] = arguments[_];
B("error", s, b);
}
}
function B(s, v, b) {
{
var _ = C.ReactDebugCurrentFrame, S = _.getStackAddendum();
S !== "" && (v += "%s", b = b.concat([S]));
var Y = b.map(function(P) {
return String(P);
});
Y.unshift("Warning: " + v), Function.prototype.apply.call(console[s], console, Y);
}
}
var z = !1, A = !1, V = !1, M = !1, $ = !1, D;
D = Symbol.for("react.module.reference");
function R(s) {
return !!(typeof s == "string" || typeof s == "function" || s === r || s === a || $ || s === o || s === f || s === d || M || s === y || z || A || V || typeof s == "object" && s !== null && (s.$$typeof === p || s.$$typeof === c || s.$$typeof === l || s.$$typeof === i || s.$$typeof === u || // 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.
s.$$typeof === D || s.getModuleId !== void 0));
}
function x(s, v, b) {
var _ = s.displayName;
if (_)
return _;
var S = v.displayName || v.name || "";
return S !== "" ? b + "(" + S + ")" : b;
}
function w(s) {
return s.displayName || "Context";
}
function j(s) {
if (s == null)
return null;
if (typeof s.tag == "number" && k("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof s == "function")
return s.displayName || s.name || null;
if (typeof s == "string")
return s;
switch (s) {
case r:
return "Fragment";
case n:
return "Portal";
case a:
return "Profiler";
case o:
return "StrictMode";
case f:
return "Suspense";
case d:
return "SuspenseList";
}
if (typeof s == "object")
switch (s.$$typeof) {
case i:
var v = s;
return w(v) + ".Consumer";
case l:
var b = s;
return w(b._context) + ".Provider";
case u:
return x(s, s.render, "ForwardRef");
case c:
var _ = s.displayName || null;
return _ !== null ? _ : j(s.type) || "Memo";
case p: {
var S = s, Y = S._payload, P = S._init;
try {
return j(P(Y));
} catch {
return null;
}
}
}
return null;
}
var I = Object.assign, K = 0, Q, _e, ye, se, ce, te, we;
function Z() {
}
Z.__reactDisabledLog = !0;
function at() {
{
if (K === 0) {
Q = console.log, _e = console.info, ye = console.warn, se = console.error, ce = console.group, te = console.groupCollapsed, we = console.groupEnd;
var s = {
configurable: !0,
enumerable: !0,
value: Z,
writable: !0
};
Object.defineProperties(console, {
info: s,
log: s,
warn: s,
error: s,
group: s,
groupCollapsed: s,
groupEnd: s
});
}
K++;
}
}
function Oe() {
{
if (K--, K === 0) {
var s = {
configurable: !0,
enumerable: !0,
writable: !0
};
Object.defineProperties(console, {
log: I({}, s, {
value: Q
}),
info: I({}, s, {
value: _e
}),
warn: I({}, s, {
value: ye
}),
error: I({}, s, {
value: se
}),
group: I({}, s, {
value: ce
}),
groupCollapsed: I({}, s, {
value: te
}),
groupEnd: I({}, s, {
value: we
})
});
}
K < 0 && k("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
}
}
var Ue = C.ReactCurrentDispatcher, Je;
function Te(s, v, b) {
{
if (Je === void 0)
try {
throw Error();
} catch (S) {
var _ = S.stack.trim().match(/\n( *(at )?)/);
Je = _ && _[1] || "";
}
return `
` + Je + s;
}
}
var $e = !1, Pe;
{
var wt = typeof WeakMap == "function" ? WeakMap : Map;
Pe = new wt();
}
function Se(s, v) {
if (!s || $e)
return "";
{
var b = Pe.get(s);
if (b !== void 0)
return b;
}
var _;
$e = !0;
var S = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
var Y;
Y = Ue.current, Ue.current = null, at();
try {
if (v) {
var P = function() {
throw Error();
};
if (Object.defineProperty(P.prototype, "props", {
set: function() {
throw Error();
}
}), typeof Reflect == "object" && Reflect.construct) {
try {
Reflect.construct(P, []);
} catch (Me) {
_ = Me;
}
Reflect.construct(s, [], P);
} else {
try {
P.call();
} catch (Me) {
_ = Me;
}
s.call(P.prototype);
}
} else {
try {
throw Error();
} catch (Me) {
_ = Me;
}
s();
}
} catch (Me) {
if (Me && _ && typeof Me.stack == "string") {
for (var O = Me.stack.split(`
`), re = _.stack.split(`
`), U = O.length - 1, J = re.length - 1; U >= 1 && J >= 0 && O[U] !== re[J]; )
J--;
for (; U >= 1 && J >= 0; U--, J--)
if (O[U] !== re[J]) {
if (U !== 1 || J !== 1)
do
if (U--, J--, J < 0 || O[U] !== re[J]) {
var le = `
` + O[U].replace(" at new ", " at ");
return s.displayName && le.includes("<anonymous>") && (le = le.replace("<anonymous>", s.displayName)), typeof s == "function" && Pe.set(s, le), le;
}
while (U >= 1 && J >= 0);
break;
}
}
} finally {
$e = !1, Ue.current = Y, Oe(), Error.prepareStackTrace = S;
}
var Ve = s ? s.displayName || s.name : "", e0 = Ve ? Te(Ve) : "";
return typeof s == "function" && Pe.set(s, e0), e0;
}
function Mt(s, v, b) {
return Se(s, !1);
}
function Et(s) {
var v = s.prototype;
return !!(v && v.isReactComponent);
}
function Ye(s, v, b) {
if (s == null)
return "";
if (typeof s == "function")
return Se(s, Et(s));
if (typeof s == "string")
return Te(s);
switch (s) {
case f:
return Te("Suspense");
case d:
return Te("SuspenseList");
}
if (typeof s == "object")
switch (s.$$typeof) {
case u:
return Mt(s.render);
case c:
return Ye(s.type, v, b);
case p: {
var _ = s, S = _._payload, Y = _._init;
try {
return Ye(Y(S), v, b);
} catch {
}
}
}
return "";
}
var He = Object.prototype.hasOwnProperty, ot = {}, Xe = C.ReactDebugCurrentFrame;
function ke(s) {
if (s) {
var v = s._owner, b = Ye(s.type, s._source, v ? v.type : null);
Xe.setExtraStackFrame(b);
} else
Xe.setExtraStackFrame(null);
}
function st(s, v, b, _, S) {
{
var Y = Function.call.bind(He);
for (var P in s)
if (Y(s, P)) {
var O = void 0;
try {
if (typeof s[P] != "function") {
var re = Error((_ || "React class") + ": " + b + " type `" + P + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof s[P] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
throw re.name = "Invariant Violation", re;
}
O = s[P](v, P, _, b, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
} catch (U) {
O = U;
}
O && !(O instanceof Error) && (ke(S), k("%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).", _ || "React class", b, P, typeof O), ke(null)), O instanceof Error && !(O.message in ot) && (ot[O.message] = !0, ke(S), k("Failed %s type: %s", b, O.message), ke(null));
}
}
}
var lt = Array.isArray;
function Fe(s) {
return lt(s);
}
function it(s) {
{
var v = typeof Symbol == "function" && Symbol.toStringTag, b = v && s[Symbol.toStringTag] || s.constructor.name || "Object";
return b;
}
}
function ut(s) {
try {
return Ze(s), !1;
} catch {
return !0;
}
}
function Ze(s) {
return "" + s;
}
function qe(s) {
if (ut(s))
return k("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", it(s)), Ze(s);
}
var Ee = C.ReactCurrentOwner, H = {
key: !0,
ref: !0,
__self: !0,
__source: !0
}, ee, q, ne;
ne = {};
function pe(s) {
if (He.call(s, "ref")) {
var v = Object.getOwnPropertyDescriptor(s, "ref").get;
if (v && v.isReactWarning)
return !1;
}
return s.ref !== void 0;
}
function dt(s) {
if (He.call(s, "key")) {
var v = Object.getOwnPropertyDescriptor(s, "key").get;
if (v && v.isReactWarning)
return !1;
}
return s.key !== void 0;
}
function ct(s, v) {
if (typeof s.ref == "string" && Ee.current && v && Ee.current.stateNode !== v) {
var b = j(Ee.current.type);
ne[b] || (k('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', j(Ee.current.type), s.ref), ne[b] = !0);
}
}
function mn(s, v) {
{
var b = function() {
ee || (ee = !0, k("%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)", v));
};
b.isReactWarning = !0, Object.defineProperty(s, "key", {
get: b,
configurable: !0
});
}
}
function gn(s, v) {
{
var b = function() {
q || (q = !0, k("%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)", v));
};
b.isReactWarning = !0, Object.defineProperty(s, "ref", {
get: b,
configurable: !0
});
}
}
var bn = function(s, v, b, _, S, Y, P) {
var O = {
// This tag allows us to uniquely identify this as a React Element
$$typeof: e,
// Built-in properties that belong on the element
type: s,
key: v,
ref: b,
props: P,
// Record the component responsible for creating this element.
_owner: Y
};
return O._store = {}, Object.defineProperty(O._store, "validated", {
configurable: !1,
enumerable: !1,
writable: !0,
value: !1
}), Object.defineProperty(O, "_self", {
configurable: !1,
enumerable: !1,
writable: !1,
value: _
}), Object.defineProperty(O, "_source", {
configurable: !1,
enumerable: !1,
writable: !1,
value: S
}), Object.freeze && (Object.freeze(O.props), Object.freeze(O)), O;
};
function xn(s, v, b, _, S) {
{
var Y, P = {}, O = null, re = null;
b !== void 0 && (qe(b), O = "" + b), dt(v) && (qe(v.key), O = "" + v.key), pe(v) && (re = v.ref, ct(v, S));
for (Y in v)
He.call(v, Y) && !H.hasOwnProperty(Y) && (P[Y] = v[Y]);
if (s && s.defaultProps) {
var U = s.defaultProps;
for (Y in U)
P[Y] === void 0 && (P[Y] = U[Y]);
}
if (O || re) {
var J = typeof s == "function" ? s.displayName || s.name || "Unknown" : s;
O && mn(P, J), re && gn(P, J);
}
return bn(s, O, re, S, _, Ee.current, P);
}
}
var Ct = C.ReactCurrentOwner, Jt = C.ReactDebugCurrentFrame;
function Le(s) {
if (s) {
var v = s._owner, b = Ye(s.type, s._source, v ? v.type : null);
Jt.setExtraStackFrame(b);
} else
Jt.setExtraStackFrame(null);
}
var Nt;
Nt = !1;
function jt(s) {
return typeof s == "object" && s !== null && s.$$typeof === e;
}
function Xt() {
{
if (Ct.current) {
var s = j(Ct.current.type);
if (s)
return `
Check the render method of \`` + s + "`.";
}
return "";
}
}
function yn(s) {
{
if (s !== void 0) {
var v = s.fileName.replace(/^.*[\\\/]/, ""), b = s.lineNumber;
return `
Check your code at ` + v + ":" + b + ".";
}
return "";
}
}
var Zt = {};
function wn(s) {
{
var v = Xt();
if (!v) {
var b = typeof s == "string" ? s : s.displayName || s.name;
b && (v = `
Check the top-level render call using <` + b + ">.");
}
return v;
}
}
function qt(s, v) {
{
if (!s._store || s._store.validated || s.key != null)
return;
s._store.validated = !0;
var b = wn(v);
if (Zt[b])
return;
Zt[b] = !0;
var _ = "";
s && s._owner && s._owner !== Ct.current && (_ = " It was passed a child from " + j(s._owner.type) + "."), Le(s), k('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', b, _), Le(null);
}
}
function Kt(s, v) {
{
if (typeof s != "object")
return;
if (Fe(s))
for (var b = 0; b < s.length; b++) {
var _ = s[b];
jt(_) && qt(_, v);
}
else if (jt(s))
s._store && (s._store.validated = !0);
else if (s) {
var S = E(s);
if (typeof S == "function" && S !== s.entries)
for (var Y = S.call(s), P; !(P = Y.next()).done; )
jt(P.value) && qt(P.value, v);
}
}
}
function Mn(s) {
{
var v = s.type;
if (v == null || typeof v == "string")
return;
var b;
if (typeof v == "function")
b = v.propTypes;
else if (typeof v == "object" && (v.$$typeof === u || // Note: Memo only checks outer props here.
// Inner props are checked in the reconciler.
v.$$typeof === c))
b = v.propTypes;
else
return;
if (b) {
var _ = j(v);
st(b, s.props, "prop", _, s);
} else if (v.PropTypes !== void 0 && !Nt) {
Nt = !0;
var S = j(v);
k("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", S || "Unknown");
}
typeof v.getDefaultProps == "function" && !v.getDefaultProps.isReactClassApproved && k("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
}
}
function En(s) {
{
for (var v = Object.keys(s.props), b = 0; b < v.length; b++) {
var _ = v[b];
if (_ !== "children" && _ !== "key") {
Le(s), k("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", _), Le(null);
break;
}
}
s.ref !== null && (Le(s), k("Invalid attribute `ref` supplied to `React.Fragment`."), Le(null));
}
}
function Qt(s, v, b, _, S, Y) {
{
var P = R(s);
if (!P) {
var O = "";
(s === void 0 || typeof s == "object" && s !== null && Object.keys(s).length === 0) && (O += " 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 re = yn(S);
re ? O += re : O += Xt();
var U;
s === null ? U = "null" : Fe(s) ? U = "array" : s !== void 0 && s.$$typeof === e ? (U = "<" + (j(s.type) || "Unknown") + " />", O = " Did you accidentally export a JSX literal instead of a component?") : U = typeof s, k("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", U, O);
}
var J = xn(s, v, b, S, Y);
if (J == null)
return J;
if (P) {
var le = v.children;
if (le !== void 0)
if (_)
if (Fe(le)) {
for (var Ve = 0; Ve < le.length; Ve++)
Kt(le[Ve], s);
Object.freeze && Object.freeze(le);
} else
k("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
Kt(le, s);
}
return s === r ? En(J) : Mn(J), J;
}
}
function Cn(s, v, b) {
return Qt(s, v, b, !0);
}
function Nn(s, v, b) {
return Qt(s, v, b, !1);
}
var jn = Nn, _n = Cn;
Qe.Fragment = r, Qe.jsx = jn, Qe.jsxs = _n;
}()), Qe;
}
process.env.NODE_ENV === "production" ? Rt.exports = Rn() : Rt.exports = On();
var h = Rt.exports;
const M0 = (t) => /* @__PURE__ */ ue.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ ue.createElement("path", { d: "M9,10V12H7V10H9M13,10V12H11V10H13M17,10V12H15V10H17M19,3A2,2 0 0,1 21,5V19A2,2 0 0,1 19,21H5C3.89,21 3,20.1 3,19V5A2,2 0 0,1 5,3H6V1H8V3H16V1H18V3H19M19,19V8H5V19H19M9,14V16H7V14H9M13,14V16H11V14H13M17,14V16H15V14H17Z" }));
function E0(t) {
var e, n, r = "";
if (typeof t == "string" || typeof t == "number")
r += t;
else if (typeof t == "object")
if (Array.isArray(t))
for (e = 0; e < t.length; e++)
t[e] && (n = E0(t[e])) && (r && (r += " "), r += n);
else
for (e in t)
t[e] && (r && (r += " "), r += e);
return r;
}
function Tn() {
for (var t, e, n = 0, r = ""; n < arguments.length; )
(t = arguments[n++]) && (e = E0(t)) && (r && (r += " "), r += e);
return r;
}
function $n() {
for (var t = 0, e, n, r = ""; t < arguments.length; )
(e = arguments[t++]) && (n = C0(e)) && (r && (r += " "), r += n);
return r;
}
function C0(t) {
if (typeof t == "string")
return t;
for (var e, n = "", r = 0; r < t.length; r++)
t[r] && (e = C0(t[r])) && (n && (n += " "), n += e);
return n;
}
var Ht = "-";
function Pn(t) {
var e = Yn(t), n = t.conflictingClassGroups, r = t.conflictingClassGroupModifiers, o = r === void 0 ? {} : r;
function a(i) {
var u = i.split(Ht);
return u[0] === "" && u.length !== 1 && u.shift(), N0(u, e) || Sn(i);
}
function l(i, u) {
var f = n[i] || [];
return u && o[i] ? [].concat(f, o[i]) : f;
}
return {
getClassGroupId: a,
getConflictingClassGroupIds: l
};
}
function N0(t, e) {
var l;
if (t.length === 0)
return e.classGroupId;
var n = t[0], r = e.nextPart.get(n), o = r ? N0(t.slice(1), r) : void 0;
if (o)
return o;
if (e.validators.length !== 0) {
var a = t.join(Ht);
return (l = e.validators.find(function(i) {
var u = i.validator;
return u(a);
})) == null ? void 0 : l.classGroupId;
}
}
var r0 = /^\[(.+)\]$/;
function Sn(t) {
if (r0.test(t)) {
var e = r0.exec(t)[1], n = e == null ? void 0 : e.substring(0, e.indexOf(":"));
if (n)
return "arbitrary.." + n;
}
}
function Yn(t) {
var e = t.theme, n = t.prefix, r = {
nextPart: /* @__PURE__ */ new Map(),
validators: []
}, o = Fn(Object.entries(t.classGroups), n);
return o.forEach(function(a) {
var l = a[0], i = a[1];
Ot(i, r, l, e);
}), r;
}
function Ot(t, e, n, r) {
t.forEach(function(o) {
if (typeof o == "string") {
var a = o === "" ? e : a0(e, o);
a.classGroupId = n;
return;
}
if (typeof o == "function") {
if (Hn(o)) {
Ot(o(r), e, n, r);
return;
}
e.validators.push({
validator: o,
classGroupId: n
});
return;
}
Object.entries(o).forEach(function(l) {
var i = l[0], u = l[1];
Ot(u, a0(e, i), n, r);
});
});
}
function a0(t, e) {
var n = t;
return e.split(Ht).forEach(function(r) {
n.nextPart.has(r) || n.nextPart.set(r, {
nextPart: /* @__PURE__ */ new Map(),
validators: []
}), n = n.nextPart.get(r);
}), n;
}
function Hn(t) {
return t.isThemeGetter;
}
function Fn(t, e) {
return e ? t.map(function(n) {
var r = n[0], o = n[1], a = o.map(function(l) {
return typeof l == "string" ? e + l : typeof l == "object" ? Object.fromEntries(Object.entries(l).map(function(i) {
var u = i[0], f = i[1];
return [e + u, f];
})) : l;
});
return [r, a];
}) : t;
}
function Ln(t) {
if (t < 1)
return {
get: function() {
},
set: function() {
}
};
var e = 0, n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
function o(a, l) {
n.set(a, l), e++, e > t && (e = 0, r = n, n = /* @__PURE__ */ new Map());
}
return {
get: function(l) {
var i = n.get(l);
if (i !== void 0)
return i;
if ((i = r.get(l)) !== void 0)
return o(l, i), i;
},
set: function(l, i) {
n.has(l) ? n.set(l, i) : o(l, i);
}
};
}
var j0 = "!";
function Vn(t) {
var e = t.separator || ":", n = e.length === 1, r = e[0], o = e.length;
return function(l) {
for (var i = [], u = 0, f = 0, d, c = 0; c < l.length; c++) {
var p = l[c];
if (u === 0) {
if (p === r && (n || l.slice(c, c + o) === e)) {
i.push(l.slice(f, c)), f = c + o;
continue;
}
if (p === "/") {
d = c;
continue;
}
}
p === "[" ? u++ : p === "]" && u--;
}
var y = i.length === 0 ? l : l.substring(f), m = y.startsWith(j0), g = m ? y.substring(1) : y, E = d && d > f ? d - f : void 0;
return {
modifiers: i,
hasImportantModifier: m,
baseClassName: g,
maybePostfixModifierPosition: E
};
};
}
function Gn(t) {
if (t.length <= 1)
return t;
var e = [], n = [];
return t.forEach(function(r) {
var o = r[0] === "[";
o ? (e.push.apply(e, n.sort().concat([r])), n = []) : n.push(r);
}), e.push.apply(e, n.sort()), e;
}
function Bn(t) {
return {
cache: Ln(t.cacheSize),
splitModifiers: Vn(t),
...Pn(t)
};
}
var zn = /\s+/;
function Wn(t, e) {
var n = e.splitModifiers, r = e.getClassGroupId, o = e.getConflictingClassGroupIds, a = /* @__PURE__ */ new Set();
return t.trim().split(zn).map(function(l) {
var i = n(l), u = i.modifiers, f = i.hasImportantModifier, d = i.baseClassName, c = i.maybePostfixModifierPosition, p = r(c ? d.substring(0, c) : d), y = !!c;
if (!p) {
if (!c)
return {
isTailwindClass: !1,
originalClassName: l
};
if (p = r(d), !p)
return {
isTailwindClass: !1,
originalClassName: l
};
y = !1;
}
var m = Gn(u).join(":"), g = f ? m + j0 : m;
return {
isTailwindClass: !0,
modifierId: g,
classGroupId: p,
originalClassName: l,
hasPostfixModifier: y
};
}).reverse().filter(function(l) {
if (!l.isTailwindClass)
return !0;
var i = l.modifierId, u = l.classGroupId, f = l.hasPostfixModifier, d = i + u;
return a.has(d) ? !1 : (a.add(d), o(u, f).forEach(function(c) {
return a.add(i + c);
}), !0);
}).reverse().map(function(l) {
return l.originalClassName;
}).join(" ");
}
function o0() {
for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
e[n] = arguments[n];
var r, o, a, l = i;
function i(f) {
var d = e[0], c = e.slice(1), p = c.reduce(function(y, m) {
return m(y);
}, d());
return r = Bn(p), o = r.cache.get, a = r.cache.set, l = u, u(f);
}
function u(f) {
var d = o(f);
if (d)
return d;
var c = Wn(f, r);
return a(f, c), c;
}
return function() {
return l($n.apply(null, arguments));
};
}
function L(t) {
var e = function(r) {
return r[t] || [];
};
return e.isThemeGetter = !0, e;
}
var _0 = /^\[(?:([a-z-]+):)?(.+)\]$/i, Un = /^\d+\/\d+$/, Jn = /* @__PURE__ */ new Set(["px", "full", "screen"]), Xn = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Zn = /\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$/, qn = /^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
function fe(t) {
return Ie(t) || Jn.has(t) || Un.test(t) || Tt(t);
}
function Tt(t) {
return Re(t, "length", rr);
}
function Kn(t) {
return Re(t, "size", k0);
}
function Qn(t) {
return Re(t, "position", k0);
}
function er(t) {
return Re(t, "url", ar);
}
function ft(t) {
return Re(t, "number", Ie);
}
function Ie(t) {
return !Number.isNaN(Number(t));
}
function tr(t) {
return t.endsWith("%") && Ie(t.slice(0, -1));
}
function et(t) {
return s0(t) || Re(t, "number", s0);
}
function T(t) {
return _0.test(t);
}
function tt() {
return !0;
}
function Ce(t) {
return Xn.test(t);
}
function nr(t) {
return Re(t, "", or);
}
function Re(t, e, n) {
var r = _0.exec(t);
return r ? r[1] ? r[1] === e : n(r[2]) : !1;
}
function rr(t) {
return Zn.test(t);
}
function k0() {
return !1;
}
function ar(t) {
return t.startsWith("url(");
}
function s0(t) {
return Number.isInteger(Number(t));
}
function or(t) {
return qn.test(t);
}
function l0() {
var t = L("colors"), e = L("spacing"), n = L("blur"), r = L("brightness"), o = L("borderColor"), a = L("borderRadius"), l = L("borderSpacing"), i = L("borderWidth"), u = L("contrast"), f = L("grayscale"), d = L("hueRotate"), c = L("invert"), p = L("gap"), y = L("gradientColorStops"), m = L("gradientColorStopPositions"), g = L("inset"), E = L("margin"), C = L("opacity"), k = L("padding"), B = L("saturate"), z = L("scale"), A = L("sepia"), V = L("skew"), M = L("space"), $ = L("translate"), D = function() {
return ["auto", "contain", "none"];
}, R = function() {
return ["auto", "hidden", "clip", "visible", "scroll"];
}, x = function() {
return ["auto", T, e];
}, w = function() {
return [T, e];
}, j = function() {
return ["", fe];
}, I = function() {
return ["auto", Ie, T];
}, K = function() {
return ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"];
}, Q = function() {
return ["solid", "dashed", "dotted", "double", "none"];
}, _e = function() {
return ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity", "plus-lighter"];
}, ye = function() {
return ["start", "end", "center", "between", "around", "evenly", "stretch"];
}, se = function() {
return ["", "0", T];
}, ce = function() {
return ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"];
}, te = function() {
return [Ie, ft];
}, we = function() {
return [Ie, T];
};
return {
cacheSize: 500,
theme: {
colors: [tt],
spacing: [fe],
blur: ["none", "", Ce, T],
brightness: te(),
borderColor: [t],
borderRadius: ["none", "", "full", Ce, T],
borderSpacing: w(),
borderWidth: j(),
contrast: te(),
grayscale: se(),
hueRotate: we(),
invert: se(),
gap: w(),
gradientColorStops: [t],
gradientColorStopPositions: [tr, Tt],
inset: x(),
margin: x(),
opacity: te(),
padding: w(),
saturate: te(),
scale: te(),
sepia: se(),
skew: we(),
space: w(),
translate: w()
},
classGroups: {
// Layout
/**
* Aspect Ratio
* @see https://tailwindcss.com/docs/aspect-ratio
*/
aspect: [{
aspect: ["auto", "square", "video", T]
}],
/**
* Container
* @see https://tailwindcss.com/docs/container
*/
container: ["container"],
/**
* Columns
* @see https://tailwindcss.com/docs/columns
*/
columns: [{
columns: [Ce]
}],
/**
* Break After
* @see https://tailwindcss.com/docs/break-after
*/
"break-after": [{
"break-after": ce()
}],
/**
* Break Before
* @see https://tailwindcss.com/docs/break-before
*/
"break-before": [{
"break-before": ce()
}],
/**
* Break Inside
* @see https://tailwindcss.com/docs/break-inside
*/
"break-inside": [{
"break-inside": ["auto", "avoid", "avoid-page", "avoid-column"]
}],
/**
* Box Decoration Break
* @see https://tailwindcss.com/docs/box-decoration-break
*/
"box-decoration": [{
"box-decoration": ["slice", "clone"]
}],
/**
* Box Sizing
* @see https://tailwindcss.com/docs/box-sizing
*/
box: [{
box: ["border", "content"]
}],
/**
* Display
* @see https://tailwindcss.com/docs/display
*/
display: ["block", "inline-block", "inline", "flex", "inline-flex", "table", "inline-table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group", "table-row-group", "table-row", "flow-root", "grid", "inline-grid", "contents", "list-item", "hidden"],
/**
* Floats
* @see https://tailwindcss.com/docs/float
*/
float: [{
float: ["right", "left", "none"]
}],
/**
* Clear
* @see https://tailwindcss.com/docs/clear
*/
clear: [{
clear: ["left", "right", "both", "none"]
}],
/**
* Isolation
* @see https://tailwindcss.com/docs/isolation
*/
isolation: ["isolate", "isolation-auto"],
/**
* Object Fit
* @see https://tailwindcss.com/docs/object-fit
*/
"object-fit": [{
object: ["contain", "cover", "fill", "none", "scale-down"]
}],
/**
* Object Position
* @see https://tailwindcss.com/docs/object-position
*/
"object-position": [{
object: [].concat(K(), [T])
}],
/**
* Overflow
* @see https://tailwindcss.com/docs/overflow
*/
overflow: [{
overflow: R()
}],
/**
* Overflow X
* @see https://tailwindcss.com/docs/overflow
*/
"overflow-x": [{
"overflow-x": R()
}],
/**
* Overflow Y
* @see https://tailwindcss.com/docs/overflow
*/
"overflow-y": [{
"overflow-y": R()
}],
/**
* Overscroll Behavior
* @see https://tailwindcss.com/docs/overscroll-behavior
*/
overscroll: [{
overscroll: D()
}],
/**
* Overscroll Behavior X
* @see https://tailwindcss.com/docs/overscroll-behavior
*/
"overscroll-x": [{
"overscroll-x": D()
}],
/**
* Overscroll Behavior Y
* @see https://tailwindcss.com/docs/overscroll-behavior
*/
"overscroll-y": [{
"overscroll-y": D()
}],
/**
* Position
* @see https://tailwindcss.com/docs/position
*/
position: ["static", "fixed", "absolute", "relative", "sticky"],
/**
* Top / Right / Bottom / Left
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
inset: [{
inset: [g]
}],
/**
* Right / Left
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
"inset-x": [{
"inset-x": [g]
}],
/**
* Top / Bottom
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
"inset-y": [{
"inset-y": [g]
}],
/**
* Start
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
start: [{
start: [g]
}],
/**
* End
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
end: [{
end: [g]
}],
/**
* Top
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
top: [{
top: [g]
}],
/**
* Right
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
right: [{
right: [g]
}],
/**
* Bottom
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
bottom: [{
bottom: [g]
}],
/**
* Left
* @see https://tailwindcss.com/docs/top-right-bottom-left
*/
left: [{
left: [g]
}],
/**
* Visibility
* @see https://tailwindcss.com/docs/visibility
*/
visibility: ["visible", "invisible", "collapse"],
/**
* Z-Index
* @see https://tailwindcss.com/docs/z-index
*/
z: [{
z: ["auto", et]
}],
// Flexbox and Grid
/**
* Flex Basis
* @see https://tailwindcss.com/docs/flex-basis
*/
basis: [{
basis: x()
}],
/**
* Flex Direction
* @see https://tailwindcss.com/docs/flex-direction
*/
"flex-direction": [{
flex: ["row", "row-reverse", "col", "col-reverse"]
}],
/**
* Flex Wrap
* @see https://tailwindcss.com/docs/flex-wrap
*/
"flex-wrap": [{
flex: ["wrap", "wrap-reverse", "nowrap"]
}],
/**
* Flex
* @see https://tailwindcss.com/docs/flex
*/
flex: [{
flex: ["1", "auto", "initial", "none", T]
}],
/**
* Flex Grow
* @see https://tailwindcss.com/docs/flex-grow
*/
grow: [{
grow: se()
}],
/**
* Flex Shrink
* @see https://tailwindcss.com/docs/flex-shrink
*/
shrink: [{
shrink: se()
}],
/**
* Order
* @see https://tailwindcss.com/docs/order
*/
order: [{
order: ["first", "last", "none", et]
}],
/**
* Grid Template Columns
* @see https://tailwindcss.com/docs/grid-template-columns
*/
"grid-cols": [{
"grid-cols": [tt]
}],
/**
* Grid Column Start / End
* @see https://tailwindcss.com/docs/grid-column
*/
"col-start-end": [{
col: ["auto", {
span: ["full", et]
}, T]
}],
/**
* Grid Column Start
* @see https://tailwindcss.com/docs/grid-column
*/
"col-start": [{
"col-start": I()
}],
/**
* Grid Column End
* @see https://tailwindcss.com/docs/grid-column
*/
"col-end": [{
"col-end": I()
}],
/**
* Grid Template Rows
* @see https://tailwindcss.com/docs/grid-template-rows
*/
"grid-rows": [{
"grid-rows": [tt]
}],
/**
* Grid Row Start / End
* @see https://tailwindcss.com/docs/grid-row
*/
"row-start-end": [{
row: ["auto", {
span: [et]
}, T]
}],
/**
* Grid Row Start
* @see https://tailwindcss.com/docs/grid-row
*/
"row-start": [{
"row-start": I()
}],
/**
* Grid Row End
* @see https://tailwindcss.com/docs/grid-row
*/
"row-end": [{
"row-end": I()
}],
/**
* Grid Auto Flow
* @see https://tailwindcss.com/docs/grid-auto-flow
*/
"grid-flow": [{
"grid-flow": ["row", "col", "dense", "row-dense", "col-dense"]
}],
/**
* Grid Auto Columns
* @see https://tailwindcss.com/docs/grid-auto-columns
*/
"auto-cols": [{
"auto-cols": ["auto", "min", "max", "fr", T]
}],
/**
* Grid Auto Rows
* @see https://tailwindcss.com/docs/grid-auto-rows
*/
"auto-rows": [{
"auto-rows": ["auto", "min", "max", "fr", T]
}],
/**
* Gap
* @see https://tailwindcss.com/docs/gap
*/
gap: [{
gap: [p]
}],
/**
* Gap X
* @see https://tailwindcss.com/docs/gap
*/
"gap-x": [{
"gap-x": [p]
}],
/**
* Gap Y
* @see https://tailwindcss.com/docs/gap
*/
"gap-y": [{
"gap-y": [p]
}],
/**
* Justify Content
* @see https://tailwindcss.com/docs/justify-content
*/
"justify-content": [{
justify: ["normal"].concat(ye())
}],
/**
* Justify Items
* @see https://tailwindcss.com/docs/justify-items
*/
"justify-items": [{
"justify-items": ["start", "end", "center", "stretch"]
}],
/**
* Justify Self
* @see https://tailwindcss.com/docs/justify-self
*/
"justify-self": [{
"justify-self": ["auto", "start", "end", "center", "stretch"]
}],
/**
* Align Content
* @see https://tailwindcss.com/docs/align-content
*/
"align-content": [{
content: ["normal"].concat(ye(), ["baseline"])
}],
/**
* Align Items
* @see https://tailwindcss.com/docs/align-items
*/
"align-items": [{
items: ["start", "end", "center", "baseline", "stretch"]
}],
/**
* Align Self
* @see https://tailwindcss.com/docs/align-self
*/
"align-self": [{
self: ["auto", "start", "end", "center", "stretch", "baseline"]
}],
/**
* Place Content
* @see https://tailwindcss.com/docs/place-content
*/
"place-content": [{
"place-content": [].concat(ye(), ["baseline"])
}],
/**
* Place Items
* @see https://tailwindcss.com/docs/place-items
*/
"place-items": [{
"place-items": ["start", "end", "center", "baseline", "stretch"]
}],
/**
* Place Self
* @see https://tailwindcss.com/docs/place-self
*/
"place-self": [{
"place-self": ["auto", "start", "end", "center", "stretch"]
}],
// Spacing
/**
* Padding
* @see https://tailwindcss.com/docs/padding
*/
p: [{
p: [k]
}],
/**
* Padding X
* @see https://tailwindcss.com/docs/padding
*/
px: [{
px: [k]
}],
/**
* Padding Y
* @see https://tailwindcss.com/docs/padding
*/
py: [{
py: [k]
}],
/**
* Padding Start
* @see https://tailwindcss.com/docs/padding
*/
ps: [{
ps: [k]
}],
/**
* Padding End
* @see https://tailwindcss.com/docs/padding
*/
pe: [{
pe: [k]
}],
/**
* Padding Top
* @see https://tailwindcss.com/docs/padding
*/
pt: [{
pt: [k]
}],
/**
* Padding Right
* @see https://tailwindcss.com/docs/padding
*/
pr: [{
pr: [k]
}],
/**
* Padding Bottom
* @see https://tailwindcss.com/docs/padding
*/
pb: [{
pb: [k]
}],
/**
* Padding Left
* @see https://tailwindcss.com/docs/padding
*/
pl: [{
pl: [k]
}],
/**
* Margin
* @see https://tailwindcss.com/docs/margin
*/
m: [{
m: [E]
}],
/**
* Margin X
* @see https://tailwindcss.com/docs/margin
*/
mx: [{
mx: [E]
}],
/**
* Margin Y
* @see https://tailwindcss.com/docs/margin
*/
my: [{
my: [E]
}],
/**
* Margin Start
* @see https://tailwindcss.com/docs/margin
*/
ms: [{
ms: [E]
}],
/**
* Margin End
* @see https://tailwindcss.com/docs/margin
*/
me: [{
me: [E]
}],
/**
* Margin Top
* @see https://tailwindcss.com/docs/margin
*/
mt: [{
mt: [E]
}],
/**
* Margin Right
* @see https://tailwindcss.com/docs/margin
*/
mr: [{
mr: [E]
}],
/**
* Margin Bottom
* @see https://tailwindcss.com/docs/margin
*/
mb: [{
mb: [E]
}],
/**
* Margin Left
* @see https://tailwindcss.com/docs/margin
*/
ml: [{
ml: [E]
}],
/**
* Space Between X
* @see https://tailwindcss.com/docs/space
*/
"space-x": [{
"space-x": [M]
}],
/**
* Space Between X Reverse
* @see https://tailwindcss.com/docs/space
*/
"space-x-reverse": ["space-x-reverse"],
/**
* Space Between Y
* @see https://tailwindcss.com/docs/space
*/
"space-y": [{
"space-y": [M]
}],
/**
* Space Between Y Reverse
* @see https://tailwindcss.com/docs/space
*/
"space-y-reverse": ["space-y-reverse"],
// Sizing
/**
* Width
* @see https://tailwindcss.com/docs/width
*/
w: [{
w: ["auto", "min", "max", "fit", T, e]
}],
/**
* Min-Width
* @see https://tailwindcss.com/docs/min-width
*/
"min-w": [{
"min-w": ["min", "max", "fit", T, fe]
}],
/**
* Max-Width
* @see https://tailwindcss.com/docs/max-width
*/
"max-w": [{
"max-w": ["0", "none", "full", "min", "max", "fit", "prose", {
screen: [Ce]
}, Ce, T]
}],
/**
* Height
* @see https://tailwindcss.com/docs/height
*/
h: [{
h: [T, e, "auto", "min", "max", "fit"]
}],
/**
* Min-Height
* @see https://tailwindcss.com/docs/min-height
*/
"min-h": [{
"min-h": ["min", "max", "fit", T, fe]
}],
/**
* Max-Height
* @see https://tailwindcss.com/docs/max-height
*/
"max-h": [{
"max-h": [T, e, "min", "max", "fit"]
}],
// Typography
/**
* Font Size
* @see https://tailwindcss.com/docs/font-size
*/
"font-size": [{
text: ["base", Ce, Tt]
}],
/**
* Font Smoothing
* @see https://tailwindcss.com/docs/font-smoothing
*/
"font-smoothing": ["antialiased", "subpixel-antialiased"],
/**
* Font Style
* @see https://tailwindcss.com/docs/font-style
*/
"font-style": ["italic", "not-italic"],
/**
* Font Weight
* @see https://tailwindcss.com/docs/font-weight
*/
"font-weight": [{
font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", ft]
}],
/**
* Font Family
* @see https://tailwindcss.com/docs/font-family
*/
"font-family": [{
font: [tt]
}],
/**
* Font Variant Numeric
* @see https://tailwindcss.com/docs/font-variant-numeric
*/
"fvn-normal": ["normal-nums"],
/**
* Font Variant Numeric
* @see https://tailwindcss.com/docs/font-variant-numeric
*/
"fvn-ordinal": ["ordinal"],
/**
* Font Variant Numeric
* @see https://tailwindcss.com/docs/font-variant-numeric
*/
"fvn-slashed-zero": ["slashed-zero"],
/**
* Font Variant Numeric
* @see https://tailwindcss.com/docs/font-variant-numeric
*/
"fvn-figure": ["lining-nums", "oldstyle-nums"],
/**
* Font Variant Numeric
* @see https://tailwindcss.com/docs/font-variant-numeric
*/
"fvn-spacing": ["proportional-nums", "tabular-nums"],
/**
* Font Variant Numeric
* @see https://tailwindcss.com/docs/font-variant-numeric
*/
"fvn-fraction": ["diagonal-fractions", "stacked-fractons"],
/**
* Letter Spacing
* @see https://tailwindcss.com/docs/letter-spacing
*/
tracking: [{
tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", T]
}],
/**
* Line Clamp
* @see https://tailwindcss.com/docs/line-clamp
*/
"line-clamp": [{
"line-clamp": ["none", Ie, ft]
}],
/**
* Line Height
* @see https://tailwindcss.com/docs/line-height
*/
leading: [{
leading: ["none", "tight", "snug", "normal", "relaxed", "loose", T, fe]
}],
/**
* List Style Image
* @see https://tailwindcss.com/docs/list-style-image
*/
"list-image": [{
"list-image": ["none", T]
}],
/**
* List Style Type
* @see https://tailwindcss.com/docs/list-style-type
*/
"list-style-type": [{
list: ["none", "disc", "decimal", T]
}],
/**
* List Style Position
* @see https://tailwindcss.com/docs/list-style-position
*/
"list-style-position": [{
list: ["inside", "outside"]
}],
/**
* Placeholder Color
* @deprecated since Tailwind CSS v3.0.0
* @see https://tailwindcss.com/docs/placeholder-color
*/
"placeholder-color": [{
placeholder: [t]
}],
/**
* Placeholder Opacity