@cgi-learning-hub/ui
Version:
@cgi-learning-hub/ui is an open-source React component library that implements UI for HUB's features
1,194 lines • 339 kB
JavaScript
import { jsx as T, jsxs as be } from "react/jsx-runtime";
import { _ as y, T as vo, B as Cr } from "./ButtonBase-6TF6t2SP.js";
import { _ as Or, a as ne } from "./TransitionGroupContext-DbLioz_6.js";
import * as h from "react";
import Hn from "react";
import { P as t, g as mt } from "./index-Sy88PpwE.js";
import { u as De } from "./useThemeProps-CQ9rZe7g.js";
import { w as Mo } from "./warning-C8W811fV.js";
import { T as Tr, G as Me, F as xe, H as Ie, K as Ir, n as pt } from "./identifier-PWESmBq6.js";
import { a as Rr } from "./useTheme--i9fxE_A.js";
import { g as Er } from "./useThemeProps-B4VFkcP0.js";
import { u as qe, a as U } from "./useEventCallback-Y2KwRxBw.js";
import { u as Ge } from "./index-DX2Sl0Ig.js";
import { s as Q, c as Se, f as rt } from "./DefaultPropsProvider-DqazQPtr.js";
import { T as yt } from "./Typography-Dy8r_tT2.js";
import { u as xo } from "./useTheme-XJ9sFCWX.js";
import { F as zt } from "./Backdrop-CjZYrxkZ.js";
import { f as Vr, T as ko, c as Fr } from "./utils-BQenyzDz.js";
import { u as Le } from "./useForkRef-u29GSuCu.js";
import { u as me } from "./useSlotProps-DdMuGelR.js";
import { u as ht } from "./useControlled-nm4pBabJ.js";
import { u as qt } from "./useId-CK6Kn3Tn.js";
import { c as Qe } from "./createSvgIcon-B1E6Wo8z.js";
import { I as jt } from "./IconButton-BYvak8Nw.js";
import { r as Yt } from "./useSlot-BzdKwDQ5.js";
import { u as ut } from "./useTimeout-CrCYVizI.js";
import { a as Nr } from "./Select-CpNF3a57.js";
import { u as Co } from "./useFormControl-CatNKXAi.js";
import { r as Ke } from "./refType-Dp7CJc86.js";
import { F as Ar, T as Lr } from "./TextField-BenBw4oE.js";
import { F as $r } from "./FormLabel-B3WAnPGP.js";
import { I as Br } from "./InputAdornment-BBZXvhZ-.js";
import { G as _r } from "./Grow-BfjkXlG8.js";
import { F as jr } from "./Modal-D3Q9vEAI.js";
import { o as cn } from "./ownerDocument-CUrv0DIK.js";
import { P as Yr } from "./Paper-IQckggbn.js";
import { P as Wr } from "./Popper-CfFLBZ7-.js";
import { B as Xe } from "./Button-DDV5EfwJ.js";
import { D as Hr, a as zr } from "./DialogContent-C294EkoQ.js";
import { L as qr } from "./ListItem-DAZQEir2.js";
import { C as Ur } from "./Chip-DmjZbx_X.js";
import { L as Gr } from "./List-CB_cqCSw.js";
import { D as Kr, d as zn } from "./Dialog-DEWB041V.js";
function Qr(e, o, r, n, s) {
const [a, l] = h.useState(() => s && r ? r(e).matches : n ? n(e).matches : o);
return qe(() => {
if (!r)
return;
const c = r(e), i = () => {
l(c.matches);
};
return i(), c.addEventListener("change", i), () => {
c.removeEventListener("change", i);
};
}, [e, r]), a;
}
const Zr = {
...h
}, Oo = Zr.useSyncExternalStore;
function Xr(e, o, r, n, s) {
const a = h.useCallback(() => o, [o]), l = h.useMemo(() => {
if (s && r)
return () => r(e).matches;
if (n !== null) {
const {
matches: d
} = n(e);
return () => d;
}
return a;
}, [a, e, n, s, r]), [c, i] = h.useMemo(() => {
if (r === null)
return [a, () => () => {
}];
const d = r(e);
return [() => d.matches, (p) => (d.addEventListener("change", p), () => {
d.removeEventListener("change", p);
})];
}, [a, r, e]);
return Oo(i, c, l);
}
function To(e = {}) {
const {
themeId: o
} = e;
return function(n, s = {}) {
let a = Rr();
a && o && (a = a[o] || a);
const l = typeof window < "u" && typeof window.matchMedia < "u", {
defaultMatches: c = !1,
matchMedia: i = l ? window.matchMedia : null,
ssrMatchMedia: u = null,
noSsr: d = !1
} = Er({
name: "MuiUseMediaQuery",
props: s,
theme: a
});
process.env.NODE_ENV !== "production" && typeof n == "function" && a === null && console.error(["MUI: The `query` argument provided is invalid.", "You are providing a function without a theme in the context.", "One of the parent elements needs to use a ThemeProvider."].join(`
`));
let p = typeof n == "function" ? n(a) : n;
p = p.replace(/^@media( ?)/m, ""), p.includes("print") && console.warn(["MUI: You have provided a `print` query to the `useMediaQuery` hook.", "Using the print media query to modify print styles can lead to unexpected results.", "Consider using the `displayPrint` field in the `sx` prop instead.", "More information about `displayPrint` on our docs: https://mui.com/system/display/#display-in-print."].join(`
`));
const S = (Oo !== void 0 ? Xr : Qr)(p, c, i, u, d);
return process.env.NODE_ENV !== "production" && h.useDebugValue({
query: p,
match: S
}), S;
};
}
To();
function Jr(e, o) {
return e.classList ? !!o && e.classList.contains(o) : (" " + (e.className.baseVal || e.className) + " ").indexOf(" " + o + " ") !== -1;
}
function es(e, o) {
e.classList ? e.classList.add(o) : Jr(e, o) || (typeof e.className == "string" ? e.className = e.className + " " + o : e.setAttribute("class", (e.className && e.className.baseVal || "") + " " + o));
}
function qn(e, o) {
return e.replace(new RegExp("(^|\\s)" + o + "(?:\\s|$)", "g"), "$1").replace(/\s+/g, " ").replace(/^\s*|\s*$/g, "");
}
function ts(e, o) {
e.classList ? e.classList.remove(o) : typeof e.className == "string" ? e.className = qn(e.className, o) : e.setAttribute("class", qn(e.className && e.className.baseVal || "", o));
}
var ns = function(o, r) {
return o && r && r.split(" ").forEach(function(n) {
return es(o, n);
});
}, un = function(o, r) {
return o && r && r.split(" ").forEach(function(n) {
return ts(o, n);
});
}, yn = /* @__PURE__ */ function(e) {
Or(o, e);
function o() {
for (var n, s = arguments.length, a = new Array(s), l = 0; l < s; l++)
a[l] = arguments[l];
return n = e.call.apply(e, [this].concat(a)) || this, n.appliedClasses = {
appear: {},
enter: {},
exit: {}
}, n.onEnter = function(c, i) {
var u = n.resolveArguments(c, i), d = u[0], p = u[1];
n.removeClasses(d, "exit"), n.addClass(d, p ? "appear" : "enter", "base"), n.props.onEnter && n.props.onEnter(c, i);
}, n.onEntering = function(c, i) {
var u = n.resolveArguments(c, i), d = u[0], p = u[1], g = p ? "appear" : "enter";
n.addClass(d, g, "active"), n.props.onEntering && n.props.onEntering(c, i);
}, n.onEntered = function(c, i) {
var u = n.resolveArguments(c, i), d = u[0], p = u[1], g = p ? "appear" : "enter";
n.removeClasses(d, g), n.addClass(d, g, "done"), n.props.onEntered && n.props.onEntered(c, i);
}, n.onExit = function(c) {
var i = n.resolveArguments(c), u = i[0];
n.removeClasses(u, "appear"), n.removeClasses(u, "enter"), n.addClass(u, "exit", "base"), n.props.onExit && n.props.onExit(c);
}, n.onExiting = function(c) {
var i = n.resolveArguments(c), u = i[0];
n.addClass(u, "exit", "active"), n.props.onExiting && n.props.onExiting(c);
}, n.onExited = function(c) {
var i = n.resolveArguments(c), u = i[0];
n.removeClasses(u, "exit"), n.addClass(u, "exit", "done"), n.props.onExited && n.props.onExited(c);
}, n.resolveArguments = function(c, i) {
return n.props.nodeRef ? [n.props.nodeRef.current, c] : [c, i];
}, n.getClassNames = function(c) {
var i = n.props.classNames, u = typeof i == "string", d = u && i ? i + "-" : "", p = u ? "" + d + c : i[c], g = u ? p + "-active" : i[c + "Active"], S = u ? p + "-done" : i[c + "Done"];
return {
baseClassName: p,
activeClassName: g,
doneClassName: S
};
}, n;
}
var r = o.prototype;
return r.addClass = function(s, a, l) {
var c = this.getClassNames(a)[l + "ClassName"], i = this.getClassNames("enter"), u = i.doneClassName;
a === "appear" && l === "done" && u && (c += " " + u), l === "active" && s && Vr(s), c && (this.appliedClasses[a][l] = c, ns(s, c));
}, r.removeClasses = function(s, a) {
var l = this.appliedClasses[a], c = l.base, i = l.active, u = l.done;
this.appliedClasses[a] = {}, c && un(s, c), i && un(s, i), u && un(s, u);
}, r.render = function() {
var s = this.props;
s.classNames;
var a = ne(s, ["classNames"]);
return /* @__PURE__ */ Hn.createElement(ko, y({}, a, {
onEnter: this.onEnter,
onEntered: this.onEntered,
onEntering: this.onEntering,
onExit: this.onExit,
onExiting: this.onExiting,
onExited: this.onExited
}));
}, o;
}(Hn.Component);
yn.defaultProps = {
classNames: ""
};
yn.propTypes = process.env.NODE_ENV !== "production" ? y({}, ko.propTypes, {
/**
* The animation classNames applied to the component as it appears, enters,
* exits or has finished the transition. A single name can be provided, which
* will be suffixed for each stage, e.g. `classNames="fade"` applies:
*
* - `fade-appear`, `fade-appear-active`, `fade-appear-done`
* - `fade-enter`, `fade-enter-active`, `fade-enter-done`
* - `fade-exit`, `fade-exit-active`, `fade-exit-done`
*
* A few details to note about how these classes are applied:
*
* 1. They are _joined_ with the ones that are already defined on the child
* component, so if you want to add some base styles, you can use
* `className` without worrying that it will be overridden.
*
* 2. If the transition component mounts with `in={false}`, no classes are
* applied yet. You might be expecting `*-exit-done`, but if you think
* about it, a component cannot finish exiting if it hasn't entered yet.
*
* 2. `fade-appear-done` and `fade-enter-done` will _both_ be applied. This
* allows you to define different behavior for when appearing is done and
* when regular entering is done, using selectors like
* `.fade-enter-done:not(.fade-appear-done)`. For example, you could apply
* an epic entrance animation when element first appears in the DOM using
* [Animate.css](https://daneden.github.io/animate.css/). Otherwise you can
* simply use `fade-enter-done` for defining both cases.
*
* Each individual classNames can also be specified independently like:
*
* ```js
* classNames={{
* appear: 'my-appear',
* appearActive: 'my-active-appear',
* appearDone: 'my-done-appear',
* enter: 'my-enter',
* enterActive: 'my-active-enter',
* enterDone: 'my-done-enter',
* exit: 'my-exit',
* exitActive: 'my-active-exit',
* exitDone: 'my-done-exit',
* }}
* ```
*
* If you want to set these classes using CSS Modules:
*
* ```js
* import styles from './styles.css';
* ```
*
* you might want to use camelCase in your CSS file, that way could simply
* spread them instead of listing them one by one:
*
* ```js
* classNames={{ ...styles }}
* ```
*
* @type {string | {
* appear?: string,
* appearActive?: string,
* appearDone?: string,
* enter?: string,
* enterActive?: string,
* enterDone?: string,
* exit?: string,
* exitActive?: string,
* exitDone?: string,
* }}
*/
classNames: Fr,
/**
* A `<Transition>` callback fired immediately after the 'enter' or 'appear' class is
* applied.
*
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
*
* @type Function(node: HtmlElement, isAppearing: bool)
*/
onEnter: t.func,
/**
* A `<Transition>` callback fired immediately after the 'enter-active' or
* 'appear-active' class is applied.
*
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
*
* @type Function(node: HtmlElement, isAppearing: bool)
*/
onEntering: t.func,
/**
* A `<Transition>` callback fired immediately after the 'enter' or
* 'appear' classes are **removed** and the `done` class is added to the DOM node.
*
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
*
* @type Function(node: HtmlElement, isAppearing: bool)
*/
onEntered: t.func,
/**
* A `<Transition>` callback fired immediately after the 'exit' class is
* applied.
*
* **Note**: when `nodeRef` prop is passed, `node` is not passed
*
* @type Function(node: HtmlElement)
*/
onExit: t.func,
/**
* A `<Transition>` callback fired immediately after the 'exit-active' is applied.
*
* **Note**: when `nodeRef` prop is passed, `node` is not passed
*
* @type Function(node: HtmlElement)
*/
onExiting: t.func,
/**
* A `<Transition>` callback fired immediately after the 'exit' classes
* are **removed** and the `exit-done` class is added to the DOM node.
*
* **Note**: when `nodeRef` prop is passed, `node` is not passed
*
* @type Function(node: HtmlElement)
*/
onExited: t.func
}) : {};
const Io = To({
themeId: Tr
});
var Et = { exports: {} }, os = Et.exports, Un;
function Ro() {
return Un || (Un = 1, function(e, o) {
(function(r, n) {
e.exports = n();
})(os, function() {
var r = 1e3, n = 6e4, s = 36e5, a = "millisecond", l = "second", c = "minute", i = "hour", u = "day", d = "week", p = "month", g = "quarter", S = "year", m = "date", M = "Invalid Date", f = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, b = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, w = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(k) {
var P = ["th", "st", "nd", "rd"], D = k % 100;
return "[" + k + (P[(D - 20) % 10] || P[D] || P[0]) + "]";
} }, x = function(k, P, D) {
var C = String(k);
return !C || C.length >= P ? k : "" + Array(P + 1 - C.length).join(D) + k;
}, O = { s: x, z: function(k) {
var P = -k.utcOffset(), D = Math.abs(P), C = Math.floor(D / 60), I = D % 60;
return (P <= 0 ? "+" : "-") + x(C, 2, "0") + ":" + x(I, 2, "0");
}, m: function k(P, D) {
if (P.date() < D.date()) return -k(D, P);
var C = 12 * (D.year() - P.year()) + (D.month() - P.month()), I = P.clone().add(C, p), R = D - I < 0, B = P.clone().add(C + (R ? -1 : 1), p);
return +(-(C + (D - I) / (R ? I - B : B - I)) || 0);
}, a: function(k) {
return k < 0 ? Math.ceil(k) || 0 : Math.floor(k);
}, p: function(k) {
return { M: p, y: S, w: d, d: u, D: m, h: i, m: c, s: l, ms: a, Q: g }[k] || String(k || "").toLowerCase().replace(/s$/, "");
}, u: function(k) {
return k === void 0;
} }, F = "en", V = {};
V[F] = w;
var _ = "$isDayjsObject", j = function(k) {
return k instanceof v || !(!k || !k[_]);
}, L = function k(P, D, C) {
var I;
if (!P) return F;
if (typeof P == "string") {
var R = P.toLowerCase();
V[R] && (I = R), D && (V[R] = D, I = R);
var B = P.split("-");
if (!I && B.length > 1) return k(B[0]);
} else {
var E = P.name;
V[E] = P, I = E;
}
return !C && I && (F = I), I || !C && F;
}, A = function(k, P) {
if (j(k)) return k.clone();
var D = typeof P == "object" ? P : {};
return D.date = k, D.args = arguments, new v(D);
}, N = O;
N.l = L, N.i = j, N.w = function(k, P) {
return A(k, { locale: P.$L, utc: P.$u, x: P.$x, $offset: P.$offset });
};
var v = function() {
function k(D) {
this.$L = L(D.locale, null, !0), this.parse(D), this.$x = this.$x || D.x || {}, this[_] = !0;
}
var P = k.prototype;
return P.parse = function(D) {
this.$d = function(C) {
var I = C.date, R = C.utc;
if (I === null) return /* @__PURE__ */ new Date(NaN);
if (N.u(I)) return /* @__PURE__ */ new Date();
if (I instanceof Date) return new Date(I);
if (typeof I == "string" && !/Z$/i.test(I)) {
var B = I.match(f);
if (B) {
var E = B[2] - 1 || 0, z = (B[7] || "0").substring(0, 3);
return R ? new Date(Date.UTC(B[1], E, B[3] || 1, B[4] || 0, B[5] || 0, B[6] || 0, z)) : new Date(B[1], E, B[3] || 1, B[4] || 0, B[5] || 0, B[6] || 0, z);
}
}
return new Date(I);
}(D), this.init();
}, P.init = function() {
var D = this.$d;
this.$y = D.getFullYear(), this.$M = D.getMonth(), this.$D = D.getDate(), this.$W = D.getDay(), this.$H = D.getHours(), this.$m = D.getMinutes(), this.$s = D.getSeconds(), this.$ms = D.getMilliseconds();
}, P.$utils = function() {
return N;
}, P.isValid = function() {
return this.$d.toString() !== M;
}, P.isSame = function(D, C) {
var I = A(D);
return this.startOf(C) <= I && I <= this.endOf(C);
}, P.isAfter = function(D, C) {
return A(D) < this.startOf(C);
}, P.isBefore = function(D, C) {
return this.endOf(C) < A(D);
}, P.$g = function(D, C, I) {
return N.u(D) ? this[C] : this.set(I, D);
}, P.unix = function() {
return Math.floor(this.valueOf() / 1e3);
}, P.valueOf = function() {
return this.$d.getTime();
}, P.startOf = function(D, C) {
var I = this, R = !!N.u(C) || C, B = N.p(D), E = function(te, G) {
var $ = N.w(I.$u ? Date.UTC(I.$y, G, te) : new Date(I.$y, G, te), I);
return R ? $ : $.endOf(u);
}, z = function(te, G) {
return N.w(I.toDate()[te].apply(I.toDate("s"), (R ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(G)), I);
}, J = this.$W, ee = this.$M, le = this.$D, re = "set" + (this.$u ? "UTC" : "");
switch (B) {
case S:
return R ? E(1, 0) : E(31, 11);
case p:
return R ? E(1, ee) : E(0, ee + 1);
case d:
var oe = this.$locale().weekStart || 0, fe = (J < oe ? J + 7 : J) - oe;
return E(R ? le - fe : le + (6 - fe), ee);
case u:
case m:
return z(re + "Hours", 0);
case i:
return z(re + "Minutes", 1);
case c:
return z(re + "Seconds", 2);
case l:
return z(re + "Milliseconds", 3);
default:
return this.clone();
}
}, P.endOf = function(D) {
return this.startOf(D, !1);
}, P.$set = function(D, C) {
var I, R = N.p(D), B = "set" + (this.$u ? "UTC" : ""), E = (I = {}, I[u] = B + "Date", I[m] = B + "Date", I[p] = B + "Month", I[S] = B + "FullYear", I[i] = B + "Hours", I[c] = B + "Minutes", I[l] = B + "Seconds", I[a] = B + "Milliseconds", I)[R], z = R === u ? this.$D + (C - this.$W) : C;
if (R === p || R === S) {
var J = this.clone().set(m, 1);
J.$d[E](z), J.init(), this.$d = J.set(m, Math.min(this.$D, J.daysInMonth())).$d;
} else E && this.$d[E](z);
return this.init(), this;
}, P.set = function(D, C) {
return this.clone().$set(D, C);
}, P.get = function(D) {
return this[N.p(D)]();
}, P.add = function(D, C) {
var I, R = this;
D = Number(D);
var B = N.p(C), E = function(ee) {
var le = A(R);
return N.w(le.date(le.date() + Math.round(ee * D)), R);
};
if (B === p) return this.set(p, this.$M + D);
if (B === S) return this.set(S, this.$y + D);
if (B === u) return E(1);
if (B === d) return E(7);
var z = (I = {}, I[c] = n, I[i] = s, I[l] = r, I)[B] || 1, J = this.$d.getTime() + D * z;
return N.w(J, this);
}, P.subtract = function(D, C) {
return this.add(-1 * D, C);
}, P.format = function(D) {
var C = this, I = this.$locale();
if (!this.isValid()) return I.invalidDate || M;
var R = D || "YYYY-MM-DDTHH:mm:ssZ", B = N.z(this), E = this.$H, z = this.$m, J = this.$M, ee = I.weekdays, le = I.months, re = I.meridiem, oe = function(G, $, K, W) {
return G && (G[$] || G(C, R)) || K[$].slice(0, W);
}, fe = function(G) {
return N.s(E % 12 || 12, G, "0");
}, te = re || function(G, $, K) {
var W = G < 12 ? "AM" : "PM";
return K ? W.toLowerCase() : W;
};
return R.replace(b, function(G, $) {
return $ || function(K) {
switch (K) {
case "YY":
return String(C.$y).slice(-2);
case "YYYY":
return N.s(C.$y, 4, "0");
case "M":
return J + 1;
case "MM":
return N.s(J + 1, 2, "0");
case "MMM":
return oe(I.monthsShort, J, le, 3);
case "MMMM":
return oe(le, J);
case "D":
return C.$D;
case "DD":
return N.s(C.$D, 2, "0");
case "d":
return String(C.$W);
case "dd":
return oe(I.weekdaysMin, C.$W, ee, 2);
case "ddd":
return oe(I.weekdaysShort, C.$W, ee, 3);
case "dddd":
return ee[C.$W];
case "H":
return String(E);
case "HH":
return N.s(E, 2, "0");
case "h":
return fe(1);
case "hh":
return fe(2);
case "a":
return te(E, z, !0);
case "A":
return te(E, z, !1);
case "m":
return String(z);
case "mm":
return N.s(z, 2, "0");
case "s":
return String(C.$s);
case "ss":
return N.s(C.$s, 2, "0");
case "SSS":
return N.s(C.$ms, 3, "0");
case "Z":
return B;
}
return null;
}(G) || B.replace(":", "");
});
}, P.utcOffset = function() {
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
}, P.diff = function(D, C, I) {
var R, B = this, E = N.p(C), z = A(D), J = (z.utcOffset() - this.utcOffset()) * n, ee = this - z, le = function() {
return N.m(B, z);
};
switch (E) {
case S:
R = le() / 12;
break;
case p:
R = le();
break;
case g:
R = le() / 3;
break;
case d:
R = (ee - J) / 6048e5;
break;
case u:
R = (ee - J) / 864e5;
break;
case i:
R = ee / s;
break;
case c:
R = ee / n;
break;
case l:
R = ee / r;
break;
default:
R = ee;
}
return I ? R : N.a(R);
}, P.daysInMonth = function() {
return this.endOf(p).$D;
}, P.$locale = function() {
return V[this.$L];
}, P.locale = function(D, C) {
if (!D) return this.$L;
var I = this.clone(), R = L(D, C, !0);
return R && (I.$L = R), I;
}, P.clone = function() {
return N.w(this.$d, this);
}, P.toDate = function() {
return new Date(this.valueOf());
}, P.toJSON = function() {
return this.isValid() ? this.toISOString() : null;
}, P.toISOString = function() {
return this.$d.toISOString();
}, P.toString = function() {
return this.$d.toUTCString();
}, k;
}(), Y = v.prototype;
return A.prototype = Y, [["$ms", a], ["$s", l], ["$m", c], ["$H", i], ["$W", u], ["$M", p], ["$y", S], ["$D", m]].forEach(function(k) {
Y[k[1]] = function(P) {
return this.$g(P, k[0], k[1]);
};
}), A.extend = function(k, P) {
return k.$i || (k(P, v, A), k.$i = !0), A;
}, A.locale = L, A.isDayjs = j, A.unix = function(k) {
return A(1e3 * k);
}, A.en = V[F], A.Ls = V, A.p = {}, A;
});
}(Et)), Et.exports;
}
var rs = Ro();
const Oe = /* @__PURE__ */ mt(rs);
var Vt = { exports: {} }, ss = Vt.exports, Gn;
function as() {
return Gn || (Gn = 1, function(e, o) {
(function(r, n) {
e.exports = n();
})(ss, function() {
var r = "week", n = "year";
return function(s, a, l) {
var c = a.prototype;
c.week = function(i) {
if (i === void 0 && (i = null), i !== null) return this.add(7 * (i - this.week()), "day");
var u = this.$locale().yearStart || 1;
if (this.month() === 11 && this.date() > 25) {
var d = l(this).startOf(n).add(1, n).date(u), p = l(this).endOf(r);
if (d.isBefore(p)) return 1;
}
var g = l(this).startOf(n).date(u).startOf(r).subtract(1, "millisecond"), S = this.diff(g, r, !0);
return S < 0 ? l(this).startOf("week").week() : Math.ceil(S);
}, c.weeks = function(i) {
return i === void 0 && (i = null), this.week(i);
};
};
});
}(Vt)), Vt.exports;
}
var is = as();
const ls = /* @__PURE__ */ mt(is);
var Ft = { exports: {} }, cs = Ft.exports, Kn;
function us() {
return Kn || (Kn = 1, function(e, o) {
(function(r, n) {
e.exports = n();
})(cs, function() {
var r = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, n = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, s = /\d/, a = /\d\d/, l = /\d\d?/, c = /\d*[^-_:/,()\s\d]+/, i = {}, u = function(f) {
return (f = +f) + (f > 68 ? 1900 : 2e3);
}, d = function(f) {
return function(b) {
this[f] = +b;
};
}, p = [/[+-]\d\d:?(\d\d)?|Z/, function(f) {
(this.zone || (this.zone = {})).offset = function(b) {
if (!b || b === "Z") return 0;
var w = b.match(/([+-]|\d\d)/g), x = 60 * w[1] + (+w[2] || 0);
return x === 0 ? 0 : w[0] === "+" ? -x : x;
}(f);
}], g = function(f) {
var b = i[f];
return b && (b.indexOf ? b : b.s.concat(b.f));
}, S = function(f, b) {
var w, x = i.meridiem;
if (x) {
for (var O = 1; O <= 24; O += 1) if (f.indexOf(x(O, 0, b)) > -1) {
w = O > 12;
break;
}
} else w = f === (b ? "pm" : "PM");
return w;
}, m = { A: [c, function(f) {
this.afternoon = S(f, !1);
}], a: [c, function(f) {
this.afternoon = S(f, !0);
}], Q: [s, function(f) {
this.month = 3 * (f - 1) + 1;
}], S: [s, function(f) {
this.milliseconds = 100 * +f;
}], SS: [a, function(f) {
this.milliseconds = 10 * +f;
}], SSS: [/\d{3}/, function(f) {
this.milliseconds = +f;
}], s: [l, d("seconds")], ss: [l, d("seconds")], m: [l, d("minutes")], mm: [l, d("minutes")], H: [l, d("hours")], h: [l, d("hours")], HH: [l, d("hours")], hh: [l, d("hours")], D: [l, d("day")], DD: [a, d("day")], Do: [c, function(f) {
var b = i.ordinal, w = f.match(/\d+/);
if (this.day = w[0], b) for (var x = 1; x <= 31; x += 1) b(x).replace(/\[|\]/g, "") === f && (this.day = x);
}], w: [l, d("week")], ww: [a, d("week")], M: [l, d("month")], MM: [a, d("month")], MMM: [c, function(f) {
var b = g("months"), w = (g("monthsShort") || b.map(function(x) {
return x.slice(0, 3);
})).indexOf(f) + 1;
if (w < 1) throw new Error();
this.month = w % 12 || w;
}], MMMM: [c, function(f) {
var b = g("months").indexOf(f) + 1;
if (b < 1) throw new Error();
this.month = b % 12 || b;
}], Y: [/[+-]?\d+/, d("year")], YY: [a, function(f) {
this.year = u(f);
}], YYYY: [/\d{4}/, d("year")], Z: p, ZZ: p };
function M(f) {
var b, w;
b = f, w = i && i.formats;
for (var x = (f = b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(A, N, v) {
var Y = v && v.toUpperCase();
return N || w[v] || r[v] || w[Y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(k, P, D) {
return P || D.slice(1);
});
})).match(n), O = x.length, F = 0; F < O; F += 1) {
var V = x[F], _ = m[V], j = _ && _[0], L = _ && _[1];
x[F] = L ? { regex: j, parser: L } : V.replace(/^\[|\]$/g, "");
}
return function(A) {
for (var N = {}, v = 0, Y = 0; v < O; v += 1) {
var k = x[v];
if (typeof k == "string") Y += k.length;
else {
var P = k.regex, D = k.parser, C = A.slice(Y), I = P.exec(C)[0];
D.call(N, I), A = A.replace(I, "");
}
}
return function(R) {
var B = R.afternoon;
if (B !== void 0) {
var E = R.hours;
B ? E < 12 && (R.hours += 12) : E === 12 && (R.hours = 0), delete R.afternoon;
}
}(N), N;
};
}
return function(f, b, w) {
w.p.customParseFormat = !0, f && f.parseTwoDigitYear && (u = f.parseTwoDigitYear);
var x = b.prototype, O = x.parse;
x.parse = function(F) {
var V = F.date, _ = F.utc, j = F.args;
this.$u = _;
var L = j[1];
if (typeof L == "string") {
var A = j[2] === !0, N = j[3] === !0, v = A || N, Y = j[2];
N && (Y = j[2]), i = this.$locale(), !A && Y && (i = w.Ls[Y]), this.$d = function(C, I, R, B) {
try {
if (["x", "X"].indexOf(I) > -1) return new Date((I === "X" ? 1e3 : 1) * C);
var E = M(I)(C), z = E.year, J = E.month, ee = E.day, le = E.hours, re = E.minutes, oe = E.seconds, fe = E.milliseconds, te = E.zone, G = E.week, $ = /* @__PURE__ */ new Date(), K = ee || (z || J ? 1 : $.getDate()), W = z || $.getFullYear(), X = 0;
z && !J || (X = J > 0 ? J - 1 : $.getMonth());
var ae, q = le || 0, ue = re || 0, H = oe || 0, se = fe || 0;
return te ? new Date(Date.UTC(W, X, K, q, ue, H, se + 60 * te.offset * 1e3)) : R ? new Date(Date.UTC(W, X, K, q, ue, H, se)) : (ae = new Date(W, X, K, q, ue, H, se), G && (ae = B(ae).week(G).toDate()), ae);
} catch {
return /* @__PURE__ */ new Date("");
}
}(V, L, _, w), this.init(), Y && Y !== !0 && (this.$L = this.locale(Y).$L), v && V != this.format(L) && (this.$d = /* @__PURE__ */ new Date("")), i = {};
} else if (L instanceof Array) for (var k = L.length, P = 1; P <= k; P += 1) {
j[1] = L[P - 1];
var D = w.apply(this, j);
if (D.isValid()) {
this.$d = D.$d, this.$L = D.$L, this.init();
break;
}
P === k && (this.$d = /* @__PURE__ */ new Date(""));
}
else O.call(this, F);
};
};
});
}(Ft)), Ft.exports;
}
var ds = us();
const fs = /* @__PURE__ */ mt(ds);
var Nt = { exports: {} }, ps = Nt.exports, Qn;
function hs() {
return Qn || (Qn = 1, function(e, o) {
(function(r, n) {
e.exports = n();
})(ps, function() {
var r = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" };
return function(n, s, a) {
var l = s.prototype, c = l.format;
a.en.formats = r, l.format = function(i) {
i === void 0 && (i = "YYYY-MM-DDTHH:mm:ssZ");
var u = this.$locale().formats, d = function(p, g) {
return p.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(S, m, M) {
var f = M && M.toUpperCase();
return m || g[M] || r[M] || g[f].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(b, w, x) {
return w || x.slice(1);
});
});
}(i, u === void 0 ? {} : u);
return c.call(this, d);
};
};
});
}(Nt)), Nt.exports;
}
var ms = hs();
const ys = /* @__PURE__ */ mt(ms);
var At = { exports: {} }, gs = At.exports, Zn;
function bs() {
return Zn || (Zn = 1, function(e, o) {
(function(r, n) {
e.exports = n();
})(gs, function() {
return function(r, n, s) {
n.prototype.isBetween = function(a, l, c, i) {
var u = s(a), d = s(l), p = (i = i || "()")[0] === "(", g = i[1] === ")";
return (p ? this.isAfter(u, c) : !this.isBefore(u, c)) && (g ? this.isBefore(d, c) : !this.isAfter(d, c)) || (p ? this.isBefore(u, c) : !this.isAfter(u, c)) && (g ? this.isAfter(d, c) : !this.isBefore(d, c));
};
};
});
}(At)), At.exports;
}
var Ds = bs();
const Ss = /* @__PURE__ */ mt(Ds);
var Lt = { exports: {} }, ws = Lt.exports, Xn;
function Ps() {
return Xn || (Xn = 1, function(e, o) {
(function(r, n) {
e.exports = n();
})(ws, function() {
return function(r, n) {
var s = n.prototype, a = s.format;
s.format = function(l) {
var c = this, i = this.$locale();
if (!this.isValid()) return a.bind(this)(l);
var u = this.$utils(), d = (l || "YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g, function(p) {
switch (p) {
case "Q":
return Math.ceil((c.$M + 1) / 3);
case "Do":
return i.ordinal(c.$D);
case "gggg":
return c.weekYear();
case "GGGG":
return c.isoWeekYear();
case "wo":
return i.ordinal(c.week(), "W");
case "w":
case "ww":
return u.s(c.week(), p === "w" ? 1 : 2, "0");
case "W":
case "WW":
return u.s(c.isoWeek(), p === "W" ? 1 : 2, "0");
case "k":
case "kk":
return u.s(String(c.$H === 0 ? 24 : c.$H), p === "k" ? 1 : 2, "0");
case "X":
return Math.floor(c.$d.getTime() / 1e3);
case "x":
return c.$d.getTime();
case "z":
return "[" + c.offsetName() + "]";
case "zzz":
return "[" + c.offsetName("long") + "]";
default:
return p;
}
});
return a.bind(this)(d);
};
};
});
}(Lt)), Lt.exports;
}
var vs = Ps();
const Ms = /* @__PURE__ */ mt(vs);
Oe.extend(ys);
Oe.extend(ls);
Oe.extend(Ss);
Oe.extend(Ms);
const xs = {
// Year
YY: "year",
YYYY: {
sectionType: "year",
contentType: "digit",
maxLength: 4
},
// Month
M: {
sectionType: "month",
contentType: "digit",
maxLength: 2
},
MM: "month",
MMM: {
sectionType: "month",
contentType: "letter"
},
MMMM: {
sectionType: "month",
contentType: "letter"
},
// Day of the month
D: {
sectionType: "day",
contentType: "digit",
maxLength: 2
},
DD: "day",
Do: {
sectionType: "day",
contentType: "digit-with-letter"
},
// Day of the week
d: {
sectionType: "weekDay",
contentType: "digit",
maxLength: 2
},
dd: {
sectionType: "weekDay",
contentType: "letter"
},
ddd: {
sectionType: "weekDay",
contentType: "letter"
},
dddd: {
sectionType: "weekDay",
contentType: "letter"
},
// Meridiem
A: "meridiem",
a: "meridiem",
// Hours
H: {
sectionType: "hours",
contentType: "digit",
maxLength: 2
},
HH: "hours",
h: {
sectionType: "hours",
contentType: "digit",
maxLength: 2
},
hh: "hours",
// Minutes
m: {
sectionType: "minutes",
contentType: "digit",
maxLength: 2
},
mm: "minutes",
// Seconds
s: {
sectionType: "seconds",
contentType: "digit",
maxLength: 2
},
ss: "seconds"
}, ks = {
year: "YYYY",
month: "MMMM",
monthShort: "MMM",
dayOfMonth: "D",
dayOfMonthFull: "Do",
weekday: "dddd",
weekdayShort: "dd",
hours24h: "HH",
hours12h: "hh",
meridiem: "A",
minutes: "mm",
seconds: "ss",
fullDate: "ll",
keyboardDate: "L",
shortDate: "MMM D",
normalDate: "D MMMM",
normalDateWithWeekday: "ddd, MMM D",
fullTime12h: "hh:mm A",
fullTime24h: "HH:mm",
keyboardDateTime12h: "L hh:mm A",
keyboardDateTime24h: "L HH:mm"
}, dn = ["Missing UTC plugin", "To be able to use UTC or timezones, you have to enable the `utc` plugin", "Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc"].join(`
`), Jn = ["Missing timezone plugin", "To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin", "Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone"].join(`
`), Cs = (e, o) => o ? (...r) => e(...r).locale(o) : e;
class Os {
constructor({
locale: o,
formats: r
} = {}) {
this.isMUIAdapter = !0, this.isTimezoneCompatible = !0, this.lib = "dayjs", this.dayjs = void 0, this.locale = void 0, this.formats = void 0, this.escapedCharacters = {
start: "[",
end: "]"
}, this.formatTokenMap = xs, this.setLocaleToValue = (n) => {
const s = this.getCurrentLocaleCode();
return s === n.locale() ? n : n.locale(s);
}, this.hasUTCPlugin = () => typeof Oe.utc < "u", this.hasTimezonePlugin = () => typeof Oe.tz < "u", this.isSame = (n, s, a) => {
const l = this.setTimezone(s, this.getTimezone(n));
return n.format(a) === l.format(a);
}, this.cleanTimezone = (n) => {
switch (n) {
case "default":
return;
case "system":
return Oe.tz.guess();
default:
return n;
}
}, this.createSystemDate = (n) => {
if (this.hasUTCPlugin() && this.hasTimezonePlugin()) {
const s = Oe.tz.guess();
return s !== "UTC" ? Oe.tz(n, s) : Oe(n);
}
return Oe(n);
}, this.createUTCDate = (n) => {
if (!this.hasUTCPlugin())
throw new Error(dn);
return Oe.utc(n);
}, this.createTZDate = (n, s) => {
if (!this.hasUTCPlugin())
throw new Error(dn);
if (!this.hasTimezonePlugin())
throw new Error(Jn);
const a = n !== void 0 && !n.endsWith("Z");
return Oe(n).tz(this.cleanTimezone(s), a);
}, this.getLocaleFormats = () => {
const n = Oe.Ls, s = this.locale || "en";
let a = n[s];
return a === void 0 && (process.env.NODE_ENV !== "production" && Mo(["MUI X: Your locale has not been found.", "Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale.", "Or you forget to import the locale from 'dayjs/locale/{localeUsed}'", "fallback on English locale."]), a = n.en), a.formats;
}, this.adjustOffset = (n) => {
if (!this.hasTimezonePlugin())
return n;
const s = this.getTimezone(n);
if (s !== "UTC") {
const a = n.tz(this.cleanTimezone(s), !0);
if (a.$offset === (n.$offset ?? 0))
return n;
n.$offset = a.$offset;
}
return n;
}, this.date = (n, s = "default") => {
if (n === null)
return null;
let a;
return s === "UTC" ? a = this.createUTCDate(n) : s === "system" || s === "default" && !this.hasTimezonePlugin() ? a = this.createSystemDate(n) : a = this.createTZDate(n, s), this.locale === void 0 ? a : a.locale(this.locale);
}, this.getInvalidDate = () => Oe(/* @__PURE__ */ new Date("Invalid date")), this.getTimezone = (n) => {
var s;
if (this.hasTimezonePlugin()) {
const a = (s = n.$x) == null ? void 0 : s.$timezone;
if (a)
return a;
}
return this.hasUTCPlugin() && n.isUTC() ? "UTC" : "system";
}, this.setTimezone = (n, s) => {
if (this.getTimezone(n) === s)
return n;
if (s === "UTC") {
if (!this.hasUTCPlugin())
throw new Error(dn);
return n.utc();
}
if (s === "system")
return n.local();
if (!this.hasTimezonePlugin()) {
if (s === "default")
return n;
throw new Error(Jn);
}
return Oe.tz(n, this.cleanTimezone(s));
}, this.toJsDate = (n) => n.toDate(), this.parse = (n, s) => n === "" ? null : this.dayjs(n, s, this.locale, !0), this.getCurrentLocaleCode = () => this.locale || "en", this.is12HourCycleInCurrentLocale = () => /A|a/.test(this.getLocaleFormats().LT || ""), this.expandFormat = (n) => {
const s = this.getLocaleFormats(), a = (l) => l.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (c, i, u) => i || u.slice(1));
return n.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (l, c, i) => {
const u = i && i.toUpperCase();
return c || s[i] || a(s[u]);
});
}, this.isValid = (n) => n == null ? !1 : n.isValid(), this.format = (n, s) => this.formatByString(n, this.formats[s]), this.formatByString = (n, s) => this.dayjs(n).format(s), this.formatNumber = (n) => n, this.isEqual = (n, s) => n === null && s === null ? !0 : n === null || s === null ? !1 : n.toDate().getTime() === s.toDate().getTime(), this.isSameYear = (n, s) => this.isSame(n, s, "YYYY"), this.isSameMonth = (n, s) => this.isSame(n, s, "YYYY-MM"), this.isSameDay = (n, s) => this.isSame(n, s, "YYYY-MM-DD"), this.isSameHour = (n, s) => n.isSame(s, "hour"), this.isAfter = (n, s) => n > s, this.isAfterYear = (n, s) => this.hasUTCPlugin() ? !this.isSameYear(n, s) && n.utc() > s.utc() : n.isAfter(s, "year"), this.isAfterDay = (n, s) => this.hasUTCPlugin() ? !this.isSameDay(n, s) && n.utc() > s.utc() : n.isAfter(s, "day"), this.isBefore = (n, s) => n < s, this.isBeforeYear = (n, s) => this.hasUTCPlugin() ? !this.isSameYear(n, s) && n.utc() < s.utc() : n.isBefore(s, "year"), this.isBeforeDay = (n, s) => this.hasUTCPlugin() ? !this.isSameDay(n, s) && n.utc() < s.utc() : n.isBefore(s, "day"), this.isWithinRange = (n, [s, a]) => n >= s && n <= a, this.startOfYear = (n) => this.adjustOffset(n.startOf("year")), this.startOfMonth = (n) => this.adjustOffset(n.startOf("month")), this.startOfWeek = (n) => this.adjustOffset(this.setLocaleToValue(n).startOf("week")), this.startOfDay = (n) => this.adjustOffset(n.startOf("day")), this.endOfYear = (n) => this.adjustOffset(n.endOf("year")), this.endOfMonth = (n) => this.adjustOffset(n.endOf("month")), this.endOfWeek = (n) => this.adjustOffset(this.setLocaleToValue(n).endOf("week")), this.endOfDay = (n) => this.adjustOffset(n.endOf("day")), this.addYears = (n, s) => this.adjustOffset(s < 0 ? n.subtract(Math.abs(s), "year") : n.add(s, "year")), this.addMonths = (n, s) => this.adjustOffset(s < 0 ? n.subtract(Math.abs(s), "month") : n.add(s, "month")), this.addWeeks = (n, s) => this.adjustOffset(s < 0 ? n.subtract(Math.abs(s), "week") : n.add(s, "week")), this.addDays = (n, s) => this.adjustOffset(s < 0 ? n.subtract(Math.abs(s), "day") : n.add(s, "day")), this.addHours = (n, s) => this.adjustOffset(s < 0 ? n.subtract(Math.abs(s), "hour") : n.add(s, "hour")), this.addMinutes = (n, s) => this.adjustOffset(s < 0 ? n.subtract(Math.abs(s), "minute") : n.add(s, "minute")), this.addSeconds = (n, s) => this.adjustOffset(s < 0 ? n.subtract(Math.abs(s), "second") : n.add(s, "second")), this.getYear = (n) => n.year(), this.getMonth = (n) => n.month(), this.getDate = (n) => n.date(), this.getHours = (n) => n.hour(), this.getMinutes = (n) => n.minute(), this.getSeconds = (n) => n.second(), this.getMilliseconds = (n) => n.millisecond(), this.setYear = (n, s) => this.adjustOffset(n.set("year", s)), this.setMonth = (n, s) => this.adjustOffset(n.set("month", s)), this.setDate = (n, s) => this.adjustOffset(n.set("date", s)), this.setHours = (n, s) => this.adjustOffset(n.set("hour", s)), this.setMinutes = (n, s) => this.adjustOffset(n.set("minute", s)), this.setSeconds = (n, s) => this.adjustOffset(n.set("second", s)), this.setMilliseconds = (n, s) => this.adjustOffset(n.set("millisecond", s)), this.getDaysInMonth = (n) => n.daysInMonth(), this.getWeekArray = (n) => {
const s = this.startOfWeek(this.startOfMonth(n)), a = this.endOfWeek(this.endOfMonth(n));
let l = 0, c = s;
const i = [];
for (; c < a; ) {
const u = Math.floor(l / 7);
i[u] = i[u] || [], i[u].push(c), c = this.addDays(c, 1), l += 1;
}
return i;
}, this.getWeekNumber = (n) => n.week(), this.getYearRange = ([n, s]) => {
const a = this.startOfYear(n), l = this.endOfYear(s), c = [];
let i = a;
for (; this.isBefore(i, l); )
c.push(i), i = this.addYears(i, 1);
return c;
}, this.dayjs = Cs(Oe, o), this.locale = o, this.formats = y({}, ks, r), Oe.extend(fs);
}
getDayOfWeek(o) {
return o.day() + 1;
}
}
const bt = (e, o) => e.length !== o.length ? !1 : o.every((r) => e.includes(r)), Ts = ({
openTo: e,
defaultOpenTo: o,
views: r,
defaultViews: n
}) => {
const s = r ?? n;
let a;
if (e != null)
a = e;
else if (s.includes(o))
a = o;
else if (s.length > 0)
a = s[0];
else
throw new Error("MUI X: The `views` prop must contain at least one view.");
return {
views: s,
openTo: a
};
}, Wt = (e, o, r) => {
let n = o;
return n = e.setHours(n, e.getHours(r)), n = e.setMinutes(n, e.getMinutes(r)), n = e.setSeconds(n, e.getSeconds(r)), n = e.setMilliseconds(n, e.getMilliseconds(r)), n;
}, vt = ({
date: e,
disableFuture: o,
disablePast: r,
maxDate: n,
minDate: s,
isDateDisabled: a,
utils: l,
timezone: c
}) => {
const i = Wt(l, l.date(void 0, c), e);
r && l.isBefore(s, i) && (s = i), o && l.isAfter(n, i) && (n = i);
let u = e, d = e;
for (l.isBefore(e, s) && (u = s, d = null), l.isAfter(e, n) && (d && (d = n), u = null); u || d; ) {
if (u && l.isAfter(u, n) && (u = null), d && l.isBefore(d, s) && (d = null), u) {
if (!a(u))
return u;
u = l.addDays(u, 1);
}
if (d) {
if (!a(d))
return d;
d = l.addDays(d, -1);
}
}
return null;
}, Is = (e, o) => e.isValid(o) ? o : null, eo = (e, o, r) => o == null || !e.isValid(o) ? r : o, Rs = (e, o, r) => !e.isValid(o) && o != null && !e.isValid(r) && r != null ? !0 : e.isEqual(o, r), gn = (e, o) => {
const n = [e.startOfYear(o)];
for (; n.length < 12; ) {
const s = n[n.length - 1];
n.push(e.addMonths(s, 1));
}
return n;
}, Eo = (e, o, r) => r === "date" ? e.startOfDay(e.date(void 0, o)) : e.date(void 0, o), Es = ["year", "month", "day"], to = (e) => Es.includes(e), bn = (e, {
format: o,
views: r
}, n) => {
if (o != null)
return o;
const s = e.formats;
return bt(r, ["year"]) ? s.year : bt(r, ["month"]) ? s.month : bt(r, ["day"]) ? s.dayOfMonth : bt(r, ["month", "year"]) ? `${s.month} ${s.year}` : bt(r, ["day", "month"]) ? `${s.month} ${s.dayOfMonth}` : n ? /en/.test(e.getCurrentLocaleCode()) ? s.normalDateWithWeekday : s.normalDate : s.keyboardDate;
}, Vs = (e, o) => {
const r = e.startOfWeek(o);
return [0, 1, 2, 3, 4, 5, 6].map((n) => e.addDays(r, n));
}, Fs = ["hours", "minutes", "seconds"], Ns = (e) => Fs.includes(e), no = (e, o) => o.getHours(e) * 3600 + o.getMinutes(e) * 60 + o.getSeconds(e), As = (e, o) => (r, n) => e ? o.isAfter(r, n) : no(r, o) > no(n, o), ze = {
year: 1,
month: 2,
day: 3,
hours: 4,
minutes: 5,
seconds: 6,
milliseconds: 7
}, Ls = (e) => Math.max(...e.map((o) => ze[o.type] ?? 1)), Dt = (e, o, r) => {
if (o === ze.year)
return e.startOfYear(r);
if (o === ze.month)
return e.startOfMonth(r);
if (o === ze.day)
return e.startOfDay(r);
let n = r;
return o < ze.minutes && (n = e.setMinutes(n, 0)), o < ze.seconds && (n = e.setSeconds(n, 0)), o < ze.milliseconds && (n = e.setMilliseconds(n, 0)), n;
}, $s = ({
props: e,
utils: o,
granularity: r,
timezone: n,
getTodayDate: s
}) => {
let a = s ? s() : Dt(o, r, Eo(o, n));
e.minDate != null && o.isAfterDay(e.minDate, a) && (a = Dt(o, r, e.minDate)), e.maxDate != null && o.isBeforeDay(e.maxDate, a) && (a = Dt(o, r, e.maxDate));
const l = As(e.disableIgnoringDatePartForTimeValidation ?? !1, o);
return e.minTime != null && l(e.minTime, a) && (a = Dt(o, r, e.disableIgnoringDatePartForTimeValidation ? e.minTime : Wt(o, a, e.minTime))), e.maxTime != null && l(a, e.maxTime) && (a = Dt(o, r, e.disableIgnoringDatePartForTimeValidation ? e.maxTime : Wt(o, a, e.maxTime))), a;
}, Dn = (e, o) => {
const r = e.formatTokenMap[o];
if (r == null)
throw new Error([`MUI X: The token "${o}" is not supported by the Date and Time Pickers.`, "Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported."].join(`
`));
return typeof r == "string" ? {
type: r,
contentType: r === "meridiem" ? "letter" : "digit",
maxLength: void 0
} : {
type: r.sectionType,
contentType: r.contentType,
maxLength: r.maxLength
};
}, Ut = (e, o) => {
const r = [], n = e.date(void 0, "default"), s = e.startOfWeek(n), a = e.endOfWeek(n);
let l = s;
for (; e.isBefore(l, a); )
r.push(l), l = e.addDays(l, 1);
return r.map((c) => e.formatByString(c, o));
}, Vo = (e, o, r, n) => {
switch (r) {
case "month":
return gn(e, e.date(void 0, o)).map((s) => e.formatByString(s, n));
case "weekDay":
return Ut(e, n);
case "meridiem": {
const s = e.date(void 0, o);
return [e.startOfDay(s), e.endOfDay(s)].map((a) => e.formatByS