UNPKG

@amnstak/react-image-annotate

Version:

[![npm version](https://img.shields.io/npm/v/@asi/react-image-annotate.svg)](https://www.npmjs.com/package/@amnstak/react-image-annotate)

1,632 lines 965 kB
import { jsx as M, jsxs as He, Fragment as EI } from "react/jsx-runtime"; import * as Ne from "react"; import Dt, { useState as Vo, useRef as li, useEffect as So, useCallback as Id, useMemo as Ki, memo as mi, Fragment as Zh, useLayoutEffect as Xm, PureComponent as Yu, Component as Yi, forwardRef as Vb, useImperativeHandle as Xb, createElement as OI, useReducer as PI } from "react"; import { S as II, B as TI, T as uo, t as Zm, a as AI, c as Zb, W as MI } from "./index-CtUXE5q6.js"; import { p as Ve, c as $r, T as Hr, r as DI, b as Td, g as LI, o as RI, a as NI, d as fr, e as ga, s as We, f as ur, h as ea, i as Zt, j as _n, u as dr, k as Jb, l as Jh, m as $t, n as bn, B as Qh, q as Ds, t as Gi, v as Lr, P as m, w as rr, I as KI, x as hi, y as Qb, z as FI, A as Gu, C as ep, D as hs, E as e1, F as t1, G as Kn, H as tp, J as n1, K as Jm, L as $I } from "./Portal-IhUi94Sd.js"; import { L as ua, t as Ls, a as HI, m as r1, g as zI, P as Ad, u as np, b as Ll, c as BI, d as UI, R as jI, e as WI, I as YI, f as GI, h as qI, i as i1, T as o1, S as Qm, j as qu, k as a1, F as ev, M as VI, B as XI, l as s1, n as ZI, o as Rl, p as Wf, q as JI, r as QI, s as Su, v as eT, w as tT } from "./index-BLVsk0vl.js"; var Dn = { fullscreenEnabled: 0, fullscreenElement: 1, requestFullscreen: 2, exitFullscreen: 3, fullscreenchange: 4, fullscreenerror: 5, fullscreen: 6 }, tv = [ "webkitFullscreenEnabled", "webkitFullscreenElement", "webkitRequestFullscreen", "webkitExitFullscreen", "webkitfullscreenchange", "webkitfullscreenerror", "-webkit-full-screen" ], nv = [ "mozFullScreenEnabled", "mozFullScreenElement", "mozRequestFullScreen", "mozCancelFullScreen", "mozfullscreenchange", "mozfullscreenerror", "-moz-full-screen" ], rv = [ "msFullscreenEnabled", "msFullscreenElement", "msRequestFullscreen", "msExitFullscreen", "MSFullscreenChange", "MSFullscreenError", "-ms-fullscreen" ], yn = typeof window < "u" && typeof window.document < "u" ? window.document : {}, Qn = "fullscreenEnabled" in yn && Object.keys(Dn) || tv[0] in yn && tv || nv[0] in yn && nv || rv[0] in yn && rv || [], ti = { requestFullscreen: function(e) { return e[Qn[Dn.requestFullscreen]](); }, requestFullscreenFunction: function(e) { return e[Qn[Dn.requestFullscreen]]; }, get exitFullscreen() { return yn[Qn[Dn.exitFullscreen]].bind(yn); }, get fullscreenPseudoClass() { return ":" + Qn[Dn.fullscreen]; }, addEventListener: function(e, t, n) { return yn.addEventListener(Qn[Dn[e]], t, n); }, removeEventListener: function(e, t, n) { return yn.removeEventListener(Qn[Dn[e]], t, n); }, get fullscreenEnabled() { return !!yn[Qn[Dn.fullscreenEnabled]]; }, set fullscreenEnabled(e) { }, get fullscreenElement() { return yn[Qn[Dn.fullscreenElement]]; }, set fullscreenElement(e) { }, get onfullscreenchange() { return yn[("on" + Qn[Dn.fullscreenchange]).toLowerCase()]; }, set onfullscreenchange(e) { return yn[("on" + Qn[Dn.fullscreenchange]).toLowerCase()] = e; }, get onfullscreenerror() { return yn[("on" + Qn[Dn.fullscreenerror]).toLowerCase()]; }, set onfullscreenerror(e) { return yn[("on" + Qn[Dn.fullscreenerror]).toLowerCase()] = e; } }; function nT() { var e = Vo(!1), t = e[0], n = e[1], r = li(null); So(function() { var l = function() { n(ti.fullscreenElement === r.current); }; return ti.addEventListener("fullscreenchange", l), function() { return ti.removeEventListener("fullscreenchange", l); }; }, []); var i = Id(function() { if (ti.fullscreenElement) return ti.exitFullscreen().then(function() { return ti.requestFullscreen(r.current); }); if (r.current) return ti.requestFullscreen(r.current); }, []), a = Id(function() { return ti.fullscreenElement === r.current ? ti.exitFullscreen() : Promise.resolve(); }, []); return Ki(function() { return { active: t, enter: i, exit: a, node: r }; }, [t, i, a]); } var rT = function(t) { var n = t.handle, r = t.onChange, i = t.children, a = t.className, l = []; return a && l.push(a), l.push("fullscreen"), n.active && l.push("fullscreen-enabled"), So(function() { r && r(n.active, n); }, [n.active]), Dt.createElement("div", { className: l.join(" "), ref: n.node, style: n.active ? { height: "100%", width: "100%" } : void 0 }, i); }; function iT(e, t) { if (Ve.env.NODE_ENV === "production") return () => null; const n = t ? { ...t.propTypes } : null; return (i) => (a, l, u, f, d, ...p) => { const y = d || l, _ = n == null ? void 0 : n[y]; if (_) { const g = _(a, l, u, f, d, ...p); if (g) return g; } return typeof a[l] < "u" && !a[i] ? new Error(`The prop \`${y}\` of \`${e}\` can only be used together with the \`${i}\` prop.`) : null; }; } const oT = { 500: "#e91e63" }, aT = { 500: "#3f51b5" }, sT = { 500: "#009688" }, lT = { 700: "#689f38" }, uT = { 500: "#cddc39" }, cT = { 500: "#795548" }, fT = { 500: "#607d8b" }, dT = $r(), hT = ({ icon: e, title: t, children: n }) => /* @__PURE__ */ M(Hr, { theme: dT, children: /* @__PURE__ */ M(II, { icon: e, title: t, children: n }) }), ya = mi( hT, (e, t) => e.title === t.title && e.children === t.children ), co = [ DI[500], Td[500], LI[500], RI[800], cT[500], lT[700], oT[500], NI[500], aT[500], sT[500], uT[500], fT[500] ], pT = 2281701376; function gT(e) { e = e.replace("#", ""); const t = e.substr(4, 2) + e.substr(2, 2) + e.substr(0, 2); return parseInt(t, 16); } co.map( (e) => (gT(e) | pT) >>> 0 ); const yT = fr(/* @__PURE__ */ M("path", { fillRule: "evenodd", d: "M13 9.5h5v-2h-5zm0 7h5v-2h-5zm6 4.5H5c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2v14c0 1.1-.9 2-2 2M6 11h5V6H6zm1-4h3v3H7zM6 18h5v-5H6zm1-4h3v3H7z" }), "Ballot"); var mT = typeof globalThis == "object" && globalThis && globalThis.Object === Object && globalThis, l1 = mT, vT = l1, _T = typeof self == "object" && self && self.Object === Object && self, bT = vT || _T || Function("return this")(), vi = bT, wT = vi, kT = wT.Symbol, Vu = kT; function ST(e, t) { for (var n = -1, r = e == null ? 0 : e.length, i = Array(r); ++n < r; ) i[n] = t(e[n], n, e); return i; } var xT = ST, CT = Array.isArray, ma = CT, iv = Vu, u1 = Object.prototype, ET = u1.hasOwnProperty, OT = u1.toString, Wa = iv ? iv.toStringTag : void 0; function PT(e) { var t = ET.call(e, Wa), n = e[Wa]; try { e[Wa] = void 0; var r = !0; } catch { } var i = OT.call(e); return r && (t ? e[Wa] = n : delete e[Wa]), i; } var IT = PT, TT = Object.prototype, AT = TT.toString; function MT(e) { return AT.call(e); } var DT = MT, ov = Vu, LT = IT, RT = DT, NT = "[object Null]", KT = "[object Undefined]", av = ov ? ov.toStringTag : void 0; function FT(e) { return e == null ? e === void 0 ? KT : NT : av && av in Object(e) ? LT(e) : RT(e); } var Rs = FT; function $T(e) { return e != null && typeof e == "object"; } var Ns = $T, HT = Rs, zT = Ns, BT = "[object Symbol]"; function UT(e) { return typeof e == "symbol" || zT(e) && HT(e) == BT; } var rp = UT, sv = Vu, jT = xT, WT = ma, YT = rp, lv = sv ? sv.prototype : void 0, uv = lv ? lv.toString : void 0; function c1(e) { if (typeof e == "string") return e; if (WT(e)) return jT(e, c1) + ""; if (YT(e)) return uv ? uv.call(e) : ""; var t = e + ""; return t == "0" && 1 / e == -1 / 0 ? "-0" : t; } var GT = c1, qT = GT; function VT(e) { return e == null ? "" : qT(e); } var ip = VT; function XT(e, t, n) { var r = -1, i = e.length; t < 0 && (t = -t > i ? 0 : i + t), n = n > i ? i : n, n < 0 && (n += i), i = t > n ? 0 : n - t >>> 0, t >>>= 0; for (var a = Array(i); ++r < i; ) a[r] = e[r + t]; return a; } var ZT = XT, JT = ZT; function QT(e, t, n) { var r = e.length; return n = n === void 0 ? r : n, !t && n >= r ? e : JT(e, t, n); } var eA = QT, tA = "\\ud800-\\udfff", nA = "\\u0300-\\u036f", rA = "\\ufe20-\\ufe2f", iA = "\\u20d0-\\u20ff", oA = nA + rA + iA, aA = "\\ufe0e\\ufe0f", sA = "\\u200d", lA = RegExp("[" + sA + tA + oA + aA + "]"); function uA(e) { return lA.test(e); } var f1 = uA; function cA(e) { return e.split(""); } var fA = cA, d1 = "\\ud800-\\udfff", dA = "\\u0300-\\u036f", hA = "\\ufe20-\\ufe2f", pA = "\\u20d0-\\u20ff", gA = dA + hA + pA, yA = "\\ufe0e\\ufe0f", mA = "[" + d1 + "]", Md = "[" + gA + "]", Dd = "\\ud83c[\\udffb-\\udfff]", vA = "(?:" + Md + "|" + Dd + ")", h1 = "[^" + d1 + "]", p1 = "(?:\\ud83c[\\udde6-\\uddff]){2}", g1 = "[\\ud800-\\udbff][\\udc00-\\udfff]", _A = "\\u200d", y1 = vA + "?", m1 = "[" + yA + "]?", bA = "(?:" + _A + "(?:" + [h1, p1, g1].join("|") + ")" + m1 + y1 + ")*", wA = m1 + y1 + bA, kA = "(?:" + [h1 + Md + "?", Md, p1, g1, mA].join("|") + ")", SA = RegExp(Dd + "(?=" + Dd + ")|" + kA + wA, "g"); function xA(e) { return e.match(SA) || []; } var CA = xA, EA = fA, OA = f1, PA = CA; function IA(e) { return OA(e) ? PA(e) : EA(e); } var TA = IA, AA = eA, MA = f1, DA = TA, LA = ip; function RA(e) { return function(t) { t = LA(t); var n = MA(t) ? DA(t) : void 0, r = n ? n[0] : t.charAt(0), i = n ? AA(n, 1).join("") : t.slice(1); return r[e]() + i; }; } var NA = RA, KA = NA, FA = KA("toUpperCase"), $A = FA, HA = ip, zA = $A; function BA(e) { return zA(HA(e).toLowerCase()); } var UA = BA; const jA = /* @__PURE__ */ ga(UA), WA = $r(), YA = We("div")(() => ({ display: "flex", paddingTop: 4, paddingBottom: 4, paddingLeft: 16, paddingRight: 16, alignItems: "center", cursor: "pointer", opacity: 0.7, backgroundColor: "#fff", "&:hover": { opacity: 1 }, "&.selected": { opacity: 1, fontWeight: "bold" } })), GA = We("div")(() => ({ width: 12, height: 12, borderRadius: 12, marginRight: 8 })), qA = We("div")(() => ({ fontSize: 11 })), VA = We("div")(() => ({ flexGrow: 1, borderBottom: `2px dotted ${ur[300]}`, marginLeft: 8, marginRight: 8 })), XA = We("div")(() => ({ fontSize: 11, textAlign: "center", minWidth: 14, paddingTop: 2, paddingBottom: 2, fontWeight: "bold", color: ur[700] })), Ya = (e) => typeof e == "string" ? e : e.id, ZA = ({ selectedCls: e, regionClsList: t, onSelectCls: n }) => (So(() => { const r = {}; for (let a = 0; a < 9 && a < t.length; a++) r[a + 1] = () => { const l = t[a]; n(Ya(l)); }; const i = (a) => { r[a.key] && (r[a.key](), a.preventDefault(), a.stopPropagation()); }; return window.addEventListener("keydown", i), () => window.removeEventListener("keydown", i); }, [t, e]), /* @__PURE__ */ M(Hr, { theme: WA, children: /* @__PURE__ */ He( ya, { title: "Available Classes", icon: /* @__PURE__ */ M(yT, { style: { color: ur[700] } }), expandedByDefault: !0, children: [ t.map((r, i) => /* @__PURE__ */ He( YA, { className: ea({ selected: Ya(r) === e }), onClick: () => n(Ya(r)), children: [ /* @__PURE__ */ M( GA, { style: { backgroundColor: typeof r == "object" ? r.color : co[i % co.length] } } ), /* @__PURE__ */ M( qA, { className: ea({ selected: Ya(r) === e }), children: jA(typeof r == "string" ? r : r.label) } ), /* @__PURE__ */ M(VA, {}), /* @__PURE__ */ M( XA, { className: ea({ selected: Ya(r) === e }), children: i < 9 ? `Key [${i + 1}]` : "" } ) ] }, typeof r == "object" ? r.id : r )), /* @__PURE__ */ M(TI, { pb: 2 }) ] } ) })), JA = ({ state: e, lastAction: t }) => { const n = e.selectedImage ? (e.images || [])[e.selectedImage] : null, r = n ? (n.regions || []).filter((i) => i.highlighted) : null; return /* @__PURE__ */ M(ya, { title: "Debug", icon: /* @__PURE__ */ M("span", {}), expandedByDefault: !0, children: /* @__PURE__ */ He("div", { style: { padding: 4 }, children: [ /* @__PURE__ */ He("div", { children: [ /* @__PURE__ */ M("b", { children: "region" }), ":" ] }), /* @__PURE__ */ M("pre", { children: JSON.stringify(r, null, " ") }), /* @__PURE__ */ He("div", { children: [ /* @__PURE__ */ M("b", { children: "lastAction" }), ":" ] }), /* @__PURE__ */ M("pre", { children: JSON.stringify(t, null, " ") }), /* @__PURE__ */ He("div", { children: [ /* @__PURE__ */ M("b", { children: "mode" }), ":" ] }), /* @__PURE__ */ M("pre", { children: JSON.stringify(e.mode, null, " ") }), /* @__PURE__ */ M("div", { children: /* @__PURE__ */ M("b", { children: "frame:" }) }), /* @__PURE__ */ M("pre", { children: "selectedImageFrameTime" in e ? JSON.stringify(e.selectedImageFrameTime, null, " ") : null }) ] }) }); }, QA = fr(/* @__PURE__ */ M("path", { d: "M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8z" }), "History"); function eM(e) { return _n("MuiListItemButton", e); } const Ga = Zt("MuiListItemButton", ["root", "focusVisible", "dense", "alignItemsFlexStart", "disabled", "divider", "gutters", "selected"]), tM = (e, t) => { const { ownerState: n } = e; return [t.root, n.dense && t.dense, n.alignItems === "flex-start" && t.alignItemsFlexStart, n.divider && t.divider, !n.disableGutters && t.gutters]; }, nM = (e) => { const { alignItems: t, classes: n, dense: r, disabled: i, disableGutters: a, divider: l, selected: u } = e, d = bn({ root: ["root", r && "dense", !a && "gutters", l && "divider", i && "disabled", t === "flex-start" && "alignItemsFlexStart", u && "selected"] }, eM, n); return { ...n, ...d }; }, rM = We(Qh, { shouldForwardProp: (e) => Ds(e) || e === "classes", name: "MuiListItemButton", slot: "Root", overridesResolver: tM })(Gi(({ theme: e }) => ({ display: "flex", flexGrow: 1, justifyContent: "flex-start", alignItems: "center", position: "relative", textDecoration: "none", minWidth: 0, boxSizing: "border-box", textAlign: "left", paddingTop: 8, paddingBottom: 8, transition: e.transitions.create("background-color", { duration: e.transitions.duration.shortest }), "&:hover": { textDecoration: "none", backgroundColor: (e.vars || e).palette.action.hover, // Reset on touch devices, it doesn't add specificity "@media (hover: none)": { backgroundColor: "transparent" } }, [`&.${Ga.selected}`]: { backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : Lr(e.palette.primary.main, e.palette.action.selectedOpacity), [`&.${Ga.focusVisible}`]: { backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))` : Lr(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.focusOpacity) } }, [`&.${Ga.selected}:hover`]: { backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))` : Lr(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.hoverOpacity), // Reset on touch devices, it doesn't add specificity "@media (hover: none)": { backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : Lr(e.palette.primary.main, e.palette.action.selectedOpacity) } }, [`&.${Ga.focusVisible}`]: { backgroundColor: (e.vars || e).palette.action.focus }, [`&.${Ga.disabled}`]: { opacity: (e.vars || e).palette.action.disabledOpacity }, variants: [{ props: ({ ownerState: t }) => t.divider, style: { borderBottom: `1px solid ${(e.vars || e).palette.divider}`, backgroundClip: "padding-box" } }, { props: { alignItems: "flex-start" }, style: { alignItems: "flex-start" } }, { props: ({ ownerState: t }) => !t.disableGutters, style: { paddingLeft: 16, paddingRight: 16 } }, { props: ({ ownerState: t }) => t.dense, style: { paddingTop: 4, paddingBottom: 4 } }] }))), v1 = /* @__PURE__ */ Ne.forwardRef(function(t, n) { const r = dr({ props: t, name: "MuiListItemButton" }), { alignItems: i = "center", autoFocus: a = !1, component: l = "div", children: u, dense: f = !1, disableGutters: d = !1, divider: p = !1, focusVisibleClassName: y, selected: _ = !1, className: g, ...k } = r, S = Ne.useContext(ua), O = Ne.useMemo(() => ({ dense: f || S.dense || !1, alignItems: i, disableGutters: d }), [i, S.dense, f, d]), x = Ne.useRef(null); Jb(() => { a && (x.current ? x.current.focus() : Ve.env.NODE_ENV !== "production" && console.error("MUI: Unable to set focus to a ListItemButton whose component has not been rendered.")); }, [a]); const A = { ...r, alignItems: i, dense: O.dense, disableGutters: d, divider: p, selected: _ }, T = nM(A), L = Jh(x, n); return /* @__PURE__ */ M(ua.Provider, { value: O, children: /* @__PURE__ */ M(rM, { ref: L, href: k.href || k.to, component: (k.href || k.to) && l === "div" ? "button" : l, focusVisibleClassName: $t(T.focusVisible, y), ownerState: A, className: $t(T.root, g), ...k, classes: T, children: u }) }); }); Ve.env.NODE_ENV !== "production" && (v1.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │ // └─────────────────────────────────────────────────────────────────────┘ /** * Defines the `align-items` style property. * @default 'center' */ alignItems: m.oneOf(["center", "flex-start"]), /** * If `true`, the list item is focused during the first mount. * Focus will also be triggered if the value changes from false to true. * @default false */ autoFocus: m.bool, /** * The content of the component if a `ListItemSecondaryAction` is used it must * be the last child. */ children: m.node, /** * Override or extend the styles applied to the component. */ classes: m.object, /** * @ignore */ className: m.string, /** * The component used for the root node. * Either a string to use a HTML element or a component. */ component: m.elementType, /** * If `true`, compact vertical padding designed for keyboard and mouse input is used. * The prop defaults to the value inherited from the parent List component. * @default false */ dense: m.bool, /** * If `true`, the component is disabled. * @default false */ disabled: m.bool, /** * If `true`, the left and right padding is removed. * @default false */ disableGutters: m.bool, /** * If `true`, a 1px light border is added to the bottom of the list item. * @default false */ divider: m.bool, /** * This prop can help identify which element has keyboard focus. * The class name will be applied when the element gains the focus through keyboard interaction. * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo). * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md). * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components * if needed. */ focusVisibleClassName: m.string, /** * @ignore */ href: m.string, /** * Use to apply selected styling. * @default false */ selected: m.bool, /** * The system prop that allows defining system overrides as well as additional CSS styles. */ sx: m.oneOfType([m.arrayOf(m.oneOfType([m.func, m.object, m.bool])), m.func, m.object]) }); function iM(e) { return _n("MuiListItemText", e); } const Xo = Zt("MuiListItemText", ["root", "multiline", "dense", "inset", "primary", "secondary"]), oM = (e) => { const { classes: t, inset: n, primary: r, secondary: i, dense: a } = e; return bn({ root: ["root", n && "inset", a && "dense", r && i && "multiline"], primary: ["primary"], secondary: ["secondary"] }, iM, t); }, aM = We("div", { name: "MuiListItemText", slot: "Root", overridesResolver: (e, t) => { const { ownerState: n } = e; return [{ [`& .${Xo.primary}`]: t.primary }, { [`& .${Xo.secondary}`]: t.secondary }, t.root, n.inset && t.inset, n.primary && n.secondary && t.multiline, n.dense && t.dense]; } })({ flex: "1 1 auto", minWidth: 0, marginTop: 4, marginBottom: 4, [`.${Zm.root}:where(& .${Xo.primary})`]: { display: "block" }, [`.${Zm.root}:where(& .${Xo.secondary})`]: { display: "block" }, variants: [{ props: ({ ownerState: e }) => e.primary && e.secondary, style: { marginTop: 6, marginBottom: 6 } }, { props: ({ ownerState: e }) => e.inset, style: { paddingLeft: 56 } }] }), _1 = /* @__PURE__ */ Ne.forwardRef(function(t, n) { const r = dr({ props: t, name: "MuiListItemText" }), { children: i, className: a, disableTypography: l = !1, inset: u = !1, primary: f, primaryTypographyProps: d, secondary: p, secondaryTypographyProps: y, slots: _ = {}, slotProps: g = {}, ...k } = r, { dense: S } = Ne.useContext(ua); let O = f ?? i, x = p; const A = { ...r, disableTypography: l, inset: u, primary: !!O, secondary: !!x, dense: S }, T = oM(A), L = { slots: _, slotProps: { primary: d, secondary: y, ...g } }, [K, N] = rr("root", { className: $t(T.root, a), elementType: aM, externalForwardedProps: { ...L, ...k }, ownerState: A, ref: n }), [W, ne] = rr("primary", { className: T.primary, elementType: uo, externalForwardedProps: L, ownerState: A }), [oe, le] = rr("secondary", { className: T.secondary, elementType: uo, externalForwardedProps: L, ownerState: A }); return O != null && O.type !== uo && !l && (O = /* @__PURE__ */ M(W, { variant: S ? "body2" : "body1", component: ne != null && ne.variant ? void 0 : "span", ...ne, children: O })), x != null && x.type !== uo && !l && (x = /* @__PURE__ */ M(oe, { variant: "body2", color: "textSecondary", ...le, children: x })), /* @__PURE__ */ He(K, { ...N, children: [O, x] }); }); Ve.env.NODE_ENV !== "production" && (_1.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │ // └─────────────────────────────────────────────────────────────────────┘ /** * Alias for the `primary` prop. */ children: m.node, /** * Override or extend the styles applied to the component. */ classes: m.object, /** * @ignore */ className: m.string, /** * If `true`, the children won't be wrapped by a Typography component. * This can be useful to render an alternative Typography variant by wrapping * the `children` (or `primary`) text, and optional `secondary` text * with the Typography component. * @default false */ disableTypography: m.bool, /** * If `true`, the children are indented. * This should be used if there is no left avatar or left icon. * @default false */ inset: m.bool, /** * The main content element. */ primary: m.node, /** * These props will be forwarded to the primary typography component * (as long as disableTypography is not `true`). * @deprecated Use `slotProps.primary` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ primaryTypographyProps: m.object, /** * The secondary content element. */ secondary: m.node, /** * These props will be forwarded to the secondary typography component * (as long as disableTypography is not `true`). * @deprecated Use `slotProps.secondary` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ secondaryTypographyProps: m.object, /** * The props used for each slot inside. * @default {} */ slotProps: m.shape({ primary: m.oneOfType([m.func, m.object]), root: m.oneOfType([m.func, m.object]), secondary: m.oneOfType([m.func, m.object]) }), /** * The components used for each slot inside. * @default {} */ slots: m.shape({ primary: m.elementType, root: m.elementType, secondary: m.elementType }), /** * The system prop that allows defining system overrides as well as additional CSS styles. */ sx: m.oneOfType([m.arrayOf(m.oneOfType([m.func, m.object, m.bool])), m.func, m.object]) }); function sM(e) { return _n("MuiListItemSecondaryAction", e); } Zt("MuiListItemSecondaryAction", ["root", "disableGutters"]); const lM = (e) => { const { disableGutters: t, classes: n } = e; return bn({ root: ["root", t && "disableGutters"] }, sM, n); }, uM = We("div", { name: "MuiListItemSecondaryAction", slot: "Root", overridesResolver: (e, t) => { const { ownerState: n } = e; return [t.root, n.disableGutters && t.disableGutters]; } })({ position: "absolute", right: 16, top: "50%", transform: "translateY(-50%)", variants: [{ props: ({ ownerState: e }) => e.disableGutters, style: { right: 0 } }] }), op = /* @__PURE__ */ Ne.forwardRef(function(t, n) { const r = dr({ props: t, name: "MuiListItemSecondaryAction" }), { className: i, ...a } = r, l = Ne.useContext(ua), u = { ...r, disableGutters: l.disableGutters }, f = lM(u); return /* @__PURE__ */ M(uM, { className: $t(f.root, i), ownerState: u, ref: n, ...a }); }); Ve.env.NODE_ENV !== "production" && (op.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │ // └─────────────────────────────────────────────────────────────────────┘ /** * The content of the component, normally an `IconButton` or selection control. */ children: m.node, /** * Override or extend the styles applied to the component. */ classes: m.object, /** * @ignore */ className: m.string, /** * The system prop that allows defining system overrides as well as additional CSS styles. */ sx: m.oneOfType([m.arrayOf(m.oneOfType([m.func, m.object, m.bool])), m.func, m.object]) }); op.muiName = "ListItemSecondaryAction"; const cM = fr(/* @__PURE__ */ M("path", { d: "M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8" }), "Undo"); //! moment.js //! version : 2.30.1 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! license : MIT //! momentjs.com var b1; function J() { return b1.apply(null, arguments); } function fM(e) { b1 = e; } function Sr(e) { return e instanceof Array || Object.prototype.toString.call(e) === "[object Array]"; } function go(e) { return e != null && Object.prototype.toString.call(e) === "[object Object]"; } function ze(e, t) { return Object.prototype.hasOwnProperty.call(e, t); } function ap(e) { if (Object.getOwnPropertyNames) return Object.getOwnPropertyNames(e).length === 0; var t; for (t in e) if (ze(e, t)) return !1; return !0; } function gn(e) { return e === void 0; } function pi(e) { return typeof e == "number" || Object.prototype.toString.call(e) === "[object Number]"; } function Ks(e) { return e instanceof Date || Object.prototype.toString.call(e) === "[object Date]"; } function w1(e, t) { var n = [], r, i = e.length; for (r = 0; r < i; ++r) n.push(t(e[r], r)); return n; } function Fi(e, t) { for (var n in t) ze(t, n) && (e[n] = t[n]); return ze(t, "toString") && (e.toString = t.toString), ze(t, "valueOf") && (e.valueOf = t.valueOf), e; } function zr(e, t, n, r) { return j1(e, t, n, r, !0).utc(); } function dM() { return { empty: !1, unusedTokens: [], unusedInput: [], overflow: -2, charsLeftOver: 0, nullInput: !1, invalidEra: null, invalidMonth: null, invalidFormat: !1, userInvalidated: !1, iso: !1, parsedDateParts: [], era: null, meridiem: null, rfc2822: !1, weekdayMismatch: !1 }; } function Oe(e) { return e._pf == null && (e._pf = dM()), e._pf; } var Ld; Array.prototype.some ? Ld = Array.prototype.some : Ld = function(e) { var t = Object(this), n = t.length >>> 0, r; for (r = 0; r < n; r++) if (r in t && e.call(this, t[r], r, t)) return !0; return !1; }; function sp(e) { var t = null, n = !1, r = e._d && !isNaN(e._d.getTime()); if (r && (t = Oe(e), n = Ld.call(t.parsedDateParts, function(i) { return i != null; }), r = t.overflow < 0 && !t.empty && !t.invalidEra && !t.invalidMonth && !t.invalidWeekday && !t.weekdayMismatch && !t.nullInput && !t.invalidFormat && !t.userInvalidated && (!t.meridiem || t.meridiem && n), e._strict && (r = r && t.charsLeftOver === 0 && t.unusedTokens.length === 0 && t.bigHour === void 0)), Object.isFrozen == null || !Object.isFrozen(e)) e._isValid = r; else return r; return e._isValid; } function Xu(e) { var t = zr(NaN); return e != null ? Fi(Oe(t), e) : Oe(t).userInvalidated = !0, t; } var cv = J.momentProperties = [], Yf = !1; function lp(e, t) { var n, r, i, a = cv.length; if (gn(t._isAMomentObject) || (e._isAMomentObject = t._isAMomentObject), gn(t._i) || (e._i = t._i), gn(t._f) || (e._f = t._f), gn(t._l) || (e._l = t._l), gn(t._strict) || (e._strict = t._strict), gn(t._tzm) || (e._tzm = t._tzm), gn(t._isUTC) || (e._isUTC = t._isUTC), gn(t._offset) || (e._offset = t._offset), gn(t._pf) || (e._pf = Oe(t)), gn(t._locale) || (e._locale = t._locale), a > 0) for (n = 0; n < a; n++) r = cv[n], i = t[r], gn(i) || (e[r] = i); return e; } function Fs(e) { lp(this, e), this._d = new Date(e._d != null ? e._d.getTime() : NaN), this.isValid() || (this._d = /* @__PURE__ */ new Date(NaN)), Yf === !1 && (Yf = !0, J.updateOffset(this), Yf = !1); } function xr(e) { return e instanceof Fs || e != null && e._isAMomentObject != null; } function k1(e) { J.suppressDeprecationWarnings === !1 && typeof console < "u" && console.warn && console.warn("Deprecation warning: " + e); } function hr(e, t) { var n = !0; return Fi(function() { if (J.deprecationHandler != null && J.deprecationHandler(null, e), n) { var r = [], i, a, l, u = arguments.length; for (a = 0; a < u; a++) { if (i = "", typeof arguments[a] == "object") { i += ` [` + a + "] "; for (l in arguments[0]) ze(arguments[0], l) && (i += l + ": " + arguments[0][l] + ", "); i = i.slice(0, -2); } else i = arguments[a]; r.push(i); } k1( e + ` Arguments: ` + Array.prototype.slice.call(r).join("") + ` ` + new Error().stack ), n = !1; } return t.apply(this, arguments); }, t); } var fv = {}; function S1(e, t) { J.deprecationHandler != null && J.deprecationHandler(e, t), fv[e] || (k1(t), fv[e] = !0); } J.suppressDeprecationWarnings = !1; J.deprecationHandler = null; function Br(e) { return typeof Function < "u" && e instanceof Function || Object.prototype.toString.call(e) === "[object Function]"; } function hM(e) { var t, n; for (n in e) ze(e, n) && (t = e[n], Br(t) ? this[n] = t : this["_" + n] = t); this._config = e, this._dayOfMonthOrdinalParseLenient = new RegExp( (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + "|" + /\d{1,2}/.source ); } function Rd(e, t) { var n = Fi({}, e), r; for (r in t) ze(t, r) && (go(e[r]) && go(t[r]) ? (n[r] = {}, Fi(n[r], e[r]), Fi(n[r], t[r])) : t[r] != null ? n[r] = t[r] : delete n[r]); for (r in e) ze(e, r) && !ze(t, r) && go(e[r]) && (n[r] = Fi({}, n[r])); return n; } function up(e) { e != null && this.set(e); } var Nd; Object.keys ? Nd = Object.keys : Nd = function(e) { var t, n = []; for (t in e) ze(e, t) && n.push(t); return n; }; var pM = { sameDay: "[Today at] LT", nextDay: "[Tomorrow at] LT", nextWeek: "dddd [at] LT", lastDay: "[Yesterday at] LT", lastWeek: "[Last] dddd [at] LT", sameElse: "L" }; function gM(e, t, n) { var r = this._calendar[e] || this._calendar.sameElse; return Br(r) ? r.call(t, n) : r; } function Kr(e, t, n) { var r = "" + Math.abs(e), i = t - r.length, a = e >= 0; return (a ? n ? "+" : "" : "-") + Math.pow(10, Math.max(0, i)).toString().substr(1) + r; } var cp = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, Nl = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, Gf = {}, ta = {}; function fe(e, t, n, r) { var i = r; typeof r == "string" && (i = function() { return this[r](); }), e && (ta[e] = i), t && (ta[t[0]] = function() { return Kr(i.apply(this, arguments), t[1], t[2]); }), n && (ta[n] = function() { return this.localeData().ordinal( i.apply(this, arguments), e ); }); } function yM(e) { return e.match(/\[[\s\S]/) ? e.replace(/^\[|\]$/g, "") : e.replace(/\\/g, ""); } function mM(e) { var t = e.match(cp), n, r; for (n = 0, r = t.length; n < r; n++) ta[t[n]] ? t[n] = ta[t[n]] : t[n] = yM(t[n]); return function(i) { var a = "", l; for (l = 0; l < r; l++) a += Br(t[l]) ? t[l].call(i, e) : t[l]; return a; }; } function Vl(e, t) { return e.isValid() ? (t = x1(t, e.localeData()), Gf[t] = Gf[t] || mM(t), Gf[t](e)) : e.localeData().invalidDate(); } function x1(e, t) { var n = 5; function r(i) { return t.longDateFormat(i) || i; } for (Nl.lastIndex = 0; n >= 0 && Nl.test(e); ) e = e.replace( Nl, r ), Nl.lastIndex = 0, n -= 1; return e; } var vM = { 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" }; function _M(e) { var t = this._longDateFormat[e], n = this._longDateFormat[e.toUpperCase()]; return t || !n ? t : (this._longDateFormat[e] = n.match(cp).map(function(r) { return r === "MMMM" || r === "MM" || r === "DD" || r === "dddd" ? r.slice(1) : r; }).join(""), this._longDateFormat[e]); } var bM = "Invalid date"; function wM() { return this._invalidDate; } var kM = "%d", SM = /\d{1,2}/; function xM(e) { return this._ordinal.replace("%d", e); } var CM = { future: "in %s", past: "%s ago", s: "a few seconds", ss: "%d seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", w: "a week", ww: "%d weeks", M: "a month", MM: "%d months", y: "a year", yy: "%d years" }; function EM(e, t, n, r) { var i = this._relativeTime[n]; return Br(i) ? i(e, t, n, r) : i.replace(/%d/i, e); } function OM(e, t) { var n = this._relativeTime[e > 0 ? "future" : "past"]; return Br(n) ? n(t) : n.replace(/%s/i, t); } var dv = { D: "date", dates: "date", date: "date", d: "day", days: "day", day: "day", e: "weekday", weekdays: "weekday", weekday: "weekday", E: "isoWeekday", isoweekdays: "isoWeekday", isoweekday: "isoWeekday", DDD: "dayOfYear", dayofyears: "dayOfYear", dayofyear: "dayOfYear", h: "hour", hours: "hour", hour: "hour", ms: "millisecond", milliseconds: "millisecond", millisecond: "millisecond", m: "minute", minutes: "minute", minute: "minute", M: "month", months: "month", month: "month", Q: "quarter", quarters: "quarter", quarter: "quarter", s: "second", seconds: "second", second: "second", gg: "weekYear", weekyears: "weekYear", weekyear: "weekYear", GG: "isoWeekYear", isoweekyears: "isoWeekYear", isoweekyear: "isoWeekYear", w: "week", weeks: "week", week: "week", W: "isoWeek", isoweeks: "isoWeek", isoweek: "isoWeek", y: "year", years: "year", year: "year" }; function pr(e) { return typeof e == "string" ? dv[e] || dv[e.toLowerCase()] : void 0; } function fp(e) { var t = {}, n, r; for (r in e) ze(e, r) && (n = pr(r), n && (t[n] = e[r])); return t; } var PM = { date: 9, day: 11, weekday: 11, isoWeekday: 11, dayOfYear: 4, hour: 13, millisecond: 16, minute: 14, month: 8, quarter: 7, second: 15, weekYear: 1, isoWeekYear: 1, week: 5, isoWeek: 5, year: 1 }; function IM(e) { var t = [], n; for (n in e) ze(e, n) && t.push({ unit: n, priority: PM[n] }); return t.sort(function(r, i) { return r.priority - i.priority; }), t; } var C1 = /\d/, Hn = /\d\d/, E1 = /\d{3}/, dp = /\d{4}/, Zu = /[+-]?\d{6}/, ht = /\d\d?/, O1 = /\d\d\d\d?/, P1 = /\d\d\d\d\d\d?/, Ju = /\d{1,3}/, hp = /\d{1,4}/, Qu = /[+-]?\d{1,6}/, va = /\d+/, ec = /[+-]?\d+/, TM = /Z|[+-]\d\d:?\d\d/gi, tc = /Z|[+-]\d\d(?::?\d\d)?/gi, AM = /[+-]?\d+(\.\d{1,3})?/, $s = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i, _a = /^[1-9]\d?/, pp = /^([1-9]\d|\d)/, xu; xu = {}; function te(e, t, n) { xu[e] = Br(t) ? t : function(r, i) { return r && n ? n : t; }; } function MM(e, t) { return ze(xu, e) ? xu[e](t._strict, t._locale) : new RegExp(DM(e)); } function DM(e) { return ui( e.replace("\\", "").replace( /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function(t, n, r, i, a) { return n || r || i || a; } ) ); } function ui(e) { return e.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"); } function tr(e) { return e < 0 ? Math.ceil(e) || 0 : Math.floor(e); } function Re(e) { var t = +e, n = 0; return t !== 0 && isFinite(t) && (n = tr(t)), n; } var Kd = {}; function Ze(e, t) { var n, r = t, i; for (typeof e == "string" && (e = [e]), pi(t) && (r = function(a, l) { l[t] = Re(a); }), i = e.length, n = 0; n < i; n++) Kd[e[n]] = r; } function Hs(e, t) { Ze(e, function(n, r, i, a) { i._w = i._w || {}, t(n, i._w, i, a); }); } function LM(e, t, n) { t != null && ze(Kd, e) && Kd[e](t, n._a, n, e); } function nc(e) { return e % 4 === 0 && e % 100 !== 0 || e % 400 === 0; } var Vt = 0, oi = 1, Mr = 2, Mt = 3, br = 4, ai = 5, fo = 6, RM = 7, NM = 8; fe("Y", 0, 0, function() { var e = this.year(); return e <= 9999 ? Kr(e, 4) : "+" + e; }); fe(0, ["YY", 2], 0, function() { return this.year() % 100; }); fe(0, ["YYYY", 4], 0, "year"); fe(0, ["YYYYY", 5], 0, "year"); fe(0, ["YYYYYY", 6, !0], 0, "year"); te("Y", ec); te("YY", ht, Hn); te("YYYY", hp, dp); te("YYYYY", Qu, Zu); te("YYYYYY", Qu, Zu); Ze(["YYYYY", "YYYYYY"], Vt); Ze("YYYY", function(e, t) { t[Vt] = e.length === 2 ? J.parseTwoDigitYear(e) : Re(e); }); Ze("YY", function(e, t) { t[Vt] = J.parseTwoDigitYear(e); }); Ze("Y", function(e, t) { t[Vt] = parseInt(e, 10); }); function rs(e) { return nc(e) ? 366 : 365; } J.parseTwoDigitYear = function(e) { return Re(e) + (Re(e) > 68 ? 1900 : 2e3); }; var I1 = ba("FullYear", !0); function KM() { return nc(this.year()); } function ba(e, t) { return function(n) { return n != null ? (T1(this, e, n), J.updateOffset(this, t), this) : ps(this, e); }; } function ps(e, t) { if (!e.isValid()) return NaN; var n = e._d, r = e._isUTC; switch (t) { case "Milliseconds": return r ? n.getUTCMilliseconds() : n.getMilliseconds(); case "Seconds": return r ? n.getUTCSeconds() : n.getSeconds(); case "Minutes": return r ? n.getUTCMinutes() : n.getMinutes(); case "Hours": return r ? n.getUTCHours() : n.getHours(); case "Date": return r ? n.getUTCDate() : n.getDate(); case "Day": return r ? n.getUTCDay() : n.getDay(); case "Month": return r ? n.getUTCMonth() : n.getMonth(); case "FullYear": return r ? n.getUTCFullYear() : n.getFullYear(); default: return NaN; } } function T1(e, t, n) { var r, i, a, l, u; if (!(!e.isValid() || isNaN(n))) { switch (r = e._d, i = e._isUTC, t) { case "Milliseconds": return void (i ? r.setUTCMilliseconds(n) : r.setMilliseconds(n)); case "Seconds": return void (i ? r.setUTCSeconds(n) : r.setSeconds(n)); case "Minutes": return void (i ? r.setUTCMinutes(n) : r.setMinutes(n)); case "Hours": return void (i ? r.setUTCHours(n) : r.setHours(n)); case "Date": return void (i ? r.setUTCDate(n) : r.setDate(n)); case "FullYear": break; default: return; } a = n, l = e.month(), u = e.date(), u = u === 29 && l === 1 && !nc(a) ? 28 : u, i ? r.setUTCFullYear(a, l, u) : r.setFullYear(a, l, u); } } function FM(e) { return e = pr(e), Br(this[e]) ? this[e]() : this; } function $M(e, t) { if (typeof e == "object") { e = fp(e); var n = IM(e), r, i = n.length; for (r = 0; r < i; r++) this[n[r].unit](e[n[r].unit]); } else if (e = pr(e), Br(this[e])) return this[e](t); return this; } function HM(e, t) { return (e % t + t) % t; } var Ct; Array.prototype.indexOf ? Ct = Array.prototype.indexOf : Ct = function(e) { var t; for (t = 0; t < this.length; ++t) if (this[t] === e) return t; return -1; }; function gp(e, t) { if (isNaN(e) || isNaN(t)) return NaN; var n = HM(t, 12); return e += (t - n) / 12, n === 1 ? nc(e) ? 29 : 28 : 31 - n % 7 % 2; } fe("M", ["MM", 2], "Mo", function() { return this.month() + 1; }); fe("MMM", 0, 0, function(e) { return this.localeData().monthsShort(this, e); }); fe("MMMM", 0, 0, function(e) { return this.localeData().months(this, e); }); te("M", ht, _a); te("MM", ht, Hn); te("MMM", function(e, t) { return t.monthsShortRegex(e); }); te("MMMM", function(e, t) { return t.monthsRegex(e); }); Ze(["M", "MM"], function(e, t) { t[oi] = Re(e) - 1; }); Ze(["MMM", "MMMM"], function(e, t, n, r) { var i = n._locale.monthsParse(e, r, n._strict); i != null ? t[oi] = i : Oe(n).invalidMonth = e; }); var zM = "January_February_March_April_May_June_July_August_September_October_November_December".split( "_" ), A1 = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), M1 = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, BM = $s, UM = $s; function jM(e, t) { return e ? Sr(this._months) ? this._months[e.month()] : this._months[(this._months.isFormat || M1).test(t) ? "format" : "standalone"][e.month()] : Sr(this._months) ? this._months : this._months.standalone; } function WM(e, t) { return e ? Sr(this._monthsShort) ? this._monthsShort[e.month()] : this._monthsShort[M1.test(t) ? "format" : "standalone"][e.month()] : Sr(this._monthsShort) ? this._monthsShort : this._monthsShort.standalone; } function YM(e, t, n) { var r, i, a, l = e.toLocaleLowerCase(); if (!this._monthsParse) for (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = [], r = 0; r < 12; ++r) a = zr([2e3, r]), this._shortMonthsParse[r] = this.monthsShort( a, "" ).toLocaleLowerCase(), this._longMonthsParse[r] = this.months(a, "").toLocaleLowerCase(); return n ? t === "MMM" ? (i = Ct.call(this._shortMonthsParse, l), i !== -1 ? i : null) : (i = Ct.call(this._longMonthsParse, l), i !== -1 ? i : null) : t === "MMM" ? (i = Ct.call(this._shortMonthsParse, l), i !== -1 ? i : (i = Ct.call(this._longMonthsParse, l), i !== -1 ? i : null)) : (i = Ct.call(this._longMonthsParse, l), i !== -1 ? i : (i = Ct.call(this._shortMonthsParse, l), i !== -1 ? i : null)); } function GM(e, t, n) { var r, i, a; if (this._monthsParseExact) return YM.call(this, e, t, n); for (this._monthsParse || (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = []), r = 0; r < 12; r++) { if (i = zr([2e3, r]), n && !this._longMonthsParse[r] && (this._longMonthsParse[r] = new RegExp( "^" + this.months(i, "").replace(".", "") + "$", "i" ), this._shortMonthsParse[r] = new RegExp( "^" + this.monthsShort(i, "").replace(".", "") + "$", "i" )), !n && !this._monthsParse[r] && (a = "^" + this.months(i, "") + "|^" + this.monthsShort(i, ""), this._monthsParse[r] = new RegExp(a.replace(".", ""), "i")), n && t === "MMMM" && this._longMonthsParse[r].test(e)) return r; if (n && t === "MMM" && this._shortMonthsParse[r].test(e)) return r; if (!n && this._monthsParse[r].test(e)) return r; } } function D1(e, t) { if (!e.isValid()) return e; if (typeof t == "string") { if (/^\d+$/.test(t)) t = Re(t); else if (t = e.localeData().monthsParse(t), !pi(t)) return e; } var n = t, r = e.date(); return r = r < 29 ? r : Math.min(r, gp(e.year(), n)), e._isUTC ? e._d.setUTCMonth(n, r) : e._d.setMonth(n, r), e; } function L1(e) { return e != null ? (D1(this, e), J.updateOffset(this, !0), this) : ps(this, "Month"); } function qM() { return gp(this.year(), this.month()); } function VM(e) { return this._monthsParseExact ? (ze(this, "_monthsRegex") || R1.call(this), e ? this._monthsShortStrictRegex : this._monthsShortRegex) : (ze(this, "_monthsShortRegex") || (this._monthsShortRegex = BM), this._monthsShortStrictRegex && e ? this._monthsShortStrictRegex : this._monthsShortRegex); } function XM(e) { return this._monthsParseExact ? (ze(this, "_monthsRegex") || R1.call(this), e ? this._monthsStrictRegex : this._monthsRegex) : (ze(this, "_monthsRegex") || (this._monthsRegex = UM), this._monthsStrictRegex && e ? this._monthsStrictRegex : this._monthsRegex); } function R1() { function e(f, d) { return d.length - f.length; } var t = [], n = [], r = [], i, a, l, u; for (i = 0; i < 12; i++) a = zr([2e3, i]), l = ui(this.monthsShort(a, "")), u = ui(this.months(a, "")), t.push(l), n.push(u), r.push(u), r.push(l); t.sort(e), n.sort(e), r.sort(e), this._monthsRegex = new RegExp("^(" + r.join("|") + ")", "i"), this._monthsShortRegex = this._monthsRegex, this._monthsStrictRegex = new RegExp( "^(" + n.join("|") + ")", "i" ), this._monthsShortStrictRegex = new RegExp( "^(" + t.join("|") + ")", "i" ); } function ZM(e, t, n, r, i, a, l) { var u; return e < 100 && e >= 0 ? (u = new Date(e + 400, t, n, r, i, a, l), isFinite(u.getFullYear()) && u.setFullYear(e)) : u = new Date(e, t, n, r, i, a, l), u; } function gs(e) { var t, n; return e < 100 && e >= 0 ? (n = Array.prototype.slice.call(arguments), n[0] = e + 400, t = new Date(Date.UTC.apply(null, n)), isFinite(t.getUTCFullYear()) && t.setUTCFullYear(e)) : t = new Date(Date.UTC.apply(null, arguments)), t; } function Cu(e, t, n) { var r = 7 + t - n, i = (7 + gs(e, 0, r).getUTCDay() - t) % 7; return -i + r - 1; } function N1(e, t, n, r, i) { var a = (7 + n - r) % 7, l = Cu(e, r, i), u = 1 + 7 * (t - 1) + a + l, f, d; return u <= 0 ? (f = e - 1, d = rs(f) + u) : u > rs(e) ? (f = e + 1, d = u - rs(e)) : (f = e, d = u), { year: f, dayOfYear: d }; } function ys(e, t, n) { var r = Cu(e.year(), t, n), i = Math.floor((e.dayOfYear() - r - 1) / 7) + 1, a, l; return i < 1 ? (l = e.year() - 1, a = i + ci(l, t, n)) : i > ci(e.year(), t, n) ? (a = i - ci(e.year(), t, n), l = e.year() + 1) : (l = e.year(), a = i), { week: a, year: l }; } function ci(e, t, n) { var r = Cu(e, t, n), i = Cu(e + 1, t, n); return (rs(e) - r + i) / 7; } fe("w", ["ww", 2], "wo", "week"); fe("W", ["WW", 2], "Wo", "isoWeek"); te("w", ht, _a); te("ww", ht, Hn); te("W", ht, _a); te("WW", ht, Hn); Hs( ["w", "ww", "W", "WW"], function(e, t, n, r) { t[r.substr(0, 1)] = Re(e); } ); function JM(e) { return ys(e, this._week.dow, this._week.doy).week; } var QM = { dow: 0, // Sunday is the first day of the week. doy: 6 // The week that contains Jan 6th is the first week of the year. }; function e3() { return this._week.dow; } function t3() { return this._week.doy; } function n3(e) { var t = this.localeData().week(this); return e == null ? t : this.add((e - t) * 7, "d"); } function r3(e) { var t = ys(this, 1, 4).week; return e == null ? t : this.add((e - t) * 7, "d"); } fe("d", 0, "do", "day"); fe("dd", 0, 0, function(e) { return this.localeData().weekdaysMin(this, e); }); fe("ddd", 0, 0, function(e) { return this.localeData().weekdaysShort(this, e); }); fe("dddd", 0, 0, function(e) { return this.localeData().weekdays(this, e); }); fe("e", 0, 0, "weekday"); fe("E", 0, 0, "isoWeekday"); te("d", ht); te("e", ht); te("E", ht); te("dd", function(e, t) { return t.weekdaysMinRegex(e); }); te("ddd", function(e, t) { return t.weekdaysShortRegex(e); }); te("dddd", function(e, t)