UNPKG

@offsetpartners/react-components

Version:

React Components for Figure and Offset

1,462 lines 1.03 MB
import * as kE from "react-dom"; import Pa, { findDOMNode as Vg } from "react-dom"; import * as F from "react"; import pe, { useState as bt, useMemo as kn, useRef as Re, useContext as ur, useEffect as ct, useLayoutEffect as uu, createElement as Ui, Component as Ih, useCallback as Jt, forwardRef as Jr, useImperativeHandle as rc, createContext as Ma, memo as ai, cloneElement as Hl, useId as $h, useInsertionEffect as AE, Children as IE, isValidElement as $E } from "react"; const FE = (e) => !e || !Array.isArray(e) ? e : [].concat([], ...e), VE = (e, t = 2, r = ".", n = ",") => { try { t = Math.abs(t), t = isNaN(t) ? 2 : t; const a = e < 0 ? "-" : ""; let i = parseInt( e = Math.abs(Number(e) || 0).toFixed(t) ).toString(), o = i.length > 3 ? i.length % 3 : 0; return a + (o ? i.substr(0, o) + n : "") + i.substr(o).replace(/(\d{3})(?=\d)/g, "$1" + n) + (t ? r + Math.abs(e - i).toFixed(t).slice(2) : ""); } catch { } }; var zs = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function yn(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } function Rr(e) { var t = e.default; if (typeof t == "function") { var r = function() { return t.apply(this, arguments); }; r.prototype = t.prototype; } else r = {}; return Object.defineProperty(r, "__esModule", { value: !0 }), Object.keys(e).forEach(function(n) { var a = Object.getOwnPropertyDescriptor(e, n); Object.defineProperty(r, n, a.get ? a : { enumerable: !0, get: function() { return e[n]; } }); }), r; } var Ja, Hs = Pa; if (process.env.NODE_ENV === "production") Ja = Hs.createRoot, Hs.hydrateRoot; else { var Lg = Hs.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; Ja = function(e, t) { Lg.usingClientEntryPoint = !0; try { return Hs.createRoot(e, t); } finally { Lg.usingClientEntryPoint = !1; } }; } //! moment.js //! version : 2.29.4 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! license : MIT //! momentjs.com var j_; function te() { return j_.apply(null, arguments); } function LE(e) { j_ = e; } function vn(e) { return e instanceof Array || Object.prototype.toString.call(e) === "[object Array]"; } function Za(e) { return e != null && Object.prototype.toString.call(e) === "[object Object]"; } function Nt(e, t) { return Object.prototype.hasOwnProperty.call(e, t); } function Fh(e) { if (Object.getOwnPropertyNames) return Object.getOwnPropertyNames(e).length === 0; var t; for (t in e) if (Nt(e, t)) return !1; return !0; } function Nr(e) { return e === void 0; } function ta(e) { return typeof e == "number" || Object.prototype.toString.call(e) === "[object Number]"; } function cs(e) { return e instanceof Date || Object.prototype.toString.call(e) === "[object Date]"; } function W_(e, t) { var r = [], n, a = e.length; for (n = 0; n < a; ++n) r.push(t(e[n], n)); return r; } function pa(e, t) { for (var r in t) Nt(t, r) && (e[r] = t[r]); return Nt(t, "toString") && (e.toString = t.toString), Nt(t, "valueOf") && (e.valueOf = t.valueOf), e; } function Fn(e, t, r, n) { return fx(e, t, r, n, !0).utc(); } function jE() { 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 gt(e) { return e._pf == null && (e._pf = jE()), e._pf; } var qd; Array.prototype.some ? qd = Array.prototype.some : qd = function(e) { var t = Object(this), r = t.length >>> 0, n; for (n = 0; n < r; n++) if (n in t && e.call(this, t[n], n, t)) return !0; return !1; }; function Vh(e) { if (e._isValid == null) { var t = gt(e), r = qd.call(t.parsedDateParts, function(a) { return a != null; }), n = !isNaN(e._d.getTime()) && t.overflow < 0 && !t.empty && !t.invalidEra && !t.invalidMonth && !t.invalidWeekday && !t.weekdayMismatch && !t.nullInput && !t.invalidFormat && !t.userInvalidated && (!t.meridiem || t.meridiem && r); if (e._strict && (n = n && t.charsLeftOver === 0 && t.unusedTokens.length === 0 && t.bigHour === void 0), Object.isFrozen == null || !Object.isFrozen(e)) e._isValid = n; else return n; } return e._isValid; } function nc(e) { var t = Fn(NaN); return e != null ? pa(gt(t), e) : gt(t).userInvalidated = !0, t; } var jg = te.momentProperties = [], $f = !1; function Lh(e, t) { var r, n, a, i = jg.length; if (Nr(t._isAMomentObject) || (e._isAMomentObject = t._isAMomentObject), Nr(t._i) || (e._i = t._i), Nr(t._f) || (e._f = t._f), Nr(t._l) || (e._l = t._l), Nr(t._strict) || (e._strict = t._strict), Nr(t._tzm) || (e._tzm = t._tzm), Nr(t._isUTC) || (e._isUTC = t._isUTC), Nr(t._offset) || (e._offset = t._offset), Nr(t._pf) || (e._pf = gt(t)), Nr(t._locale) || (e._locale = t._locale), i > 0) for (r = 0; r < i; r++) n = jg[r], a = t[n], Nr(a) || (e[n] = a); return e; } function fs(e) { Lh(this, e), this._d = new Date(e._d != null ? e._d.getTime() : NaN), this.isValid() || (this._d = new Date(NaN)), $f === !1 && ($f = !0, te.updateOffset(this), $f = !1); } function hn(e) { return e instanceof fs || e != null && e._isAMomentObject != null; } function Y_(e) { te.suppressDeprecationWarnings === !1 && typeof console < "u" && console.warn && console.warn("Deprecation warning: " + e); } function en(e, t) { var r = !0; return pa(function() { if (te.deprecationHandler != null && te.deprecationHandler(null, e), r) { var n = [], a, i, o, s = arguments.length; for (i = 0; i < s; i++) { if (a = "", typeof arguments[i] == "object") { a += ` [` + i + "] "; for (o in arguments[0]) Nt(arguments[0], o) && (a += o + ": " + arguments[0][o] + ", "); a = a.slice(0, -2); } else a = arguments[i]; n.push(a); } Y_( e + ` Arguments: ` + Array.prototype.slice.call(n).join("") + ` ` + new Error().stack ), r = !1; } return t.apply(this, arguments); }, t); } var Wg = {}; function z_(e, t) { te.deprecationHandler != null && te.deprecationHandler(e, t), Wg[e] || (Y_(t), Wg[e] = !0); } te.suppressDeprecationWarnings = !1; te.deprecationHandler = null; function Vn(e) { return typeof Function < "u" && e instanceof Function || Object.prototype.toString.call(e) === "[object Function]"; } function WE(e) { var t, r; for (r in e) Nt(e, r) && (t = e[r], Vn(t) ? this[r] = t : this["_" + r] = t); this._config = e, this._dayOfMonthOrdinalParseLenient = new RegExp( (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + "|" + /\d{1,2}/.source ); } function Bd(e, t) { var r = pa({}, e), n; for (n in t) Nt(t, n) && (Za(e[n]) && Za(t[n]) ? (r[n] = {}, pa(r[n], e[n]), pa(r[n], t[n])) : t[n] != null ? r[n] = t[n] : delete r[n]); for (n in e) Nt(e, n) && !Nt(t, n) && Za(e[n]) && (r[n] = pa({}, r[n])); return r; } function jh(e) { e != null && this.set(e); } var Kd; Object.keys ? Kd = Object.keys : Kd = function(e) { var t, r = []; for (t in e) Nt(e, t) && r.push(t); return r; }; var YE = { sameDay: "[Today at] LT", nextDay: "[Tomorrow at] LT", nextWeek: "dddd [at] LT", lastDay: "[Yesterday at] LT", lastWeek: "[Last] dddd [at] LT", sameElse: "L" }; function zE(e, t, r) { var n = this._calendar[e] || this._calendar.sameElse; return Vn(n) ? n.call(t, r) : n; } function An(e, t, r) { var n = "" + Math.abs(e), a = t - n.length, i = e >= 0; return (i ? r ? "+" : "" : "-") + Math.pow(10, Math.max(0, a)).toString().substr(1) + n; } var Wh = /(\[[^\[]*\])|(\\)?([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, Us = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, Ff = {}, ki = {}; function Je(e, t, r, n) { var a = n; typeof n == "string" && (a = function() { return this[n](); }), e && (ki[e] = a), t && (ki[t[0]] = function() { return An(a.apply(this, arguments), t[1], t[2]); }), r && (ki[r] = function() { return this.localeData().ordinal( a.apply(this, arguments), e ); }); } function HE(e) { return e.match(/\[[\s\S]/) ? e.replace(/^\[|\]$/g, "") : e.replace(/\\/g, ""); } function UE(e) { var t = e.match(Wh), r, n; for (r = 0, n = t.length; r < n; r++) ki[t[r]] ? t[r] = ki[t[r]] : t[r] = HE(t[r]); return function(a) { var i = "", o; for (o = 0; o < n; o++) i += Vn(t[o]) ? t[o].call(a, e) : t[o]; return i; }; } function Ul(e, t) { return e.isValid() ? (t = H_(t, e.localeData()), Ff[t] = Ff[t] || UE(t), Ff[t](e)) : e.localeData().invalidDate(); } function H_(e, t) { var r = 5; function n(a) { return t.longDateFormat(a) || a; } for (Us.lastIndex = 0; r >= 0 && Us.test(e); ) e = e.replace( Us, n ), Us.lastIndex = 0, r -= 1; return e; } var qE = { 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 BE(e) { var t = this._longDateFormat[e], r = this._longDateFormat[e.toUpperCase()]; return t || !r ? t : (this._longDateFormat[e] = r.match(Wh).map(function(n) { return n === "MMMM" || n === "MM" || n === "DD" || n === "dddd" ? n.slice(1) : n; }).join(""), this._longDateFormat[e]); } var KE = "Invalid date"; function GE() { return this._invalidDate; } var XE = "%d", ZE = /\d{1,2}/; function QE(e) { return this._ordinal.replace("%d", e); } var JE = { 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, r, n) { var a = this._relativeTime[r]; return Vn(a) ? a(e, t, r, n) : a.replace(/%d/i, e); } function tM(e, t) { var r = this._relativeTime[e > 0 ? "future" : "past"]; return Vn(r) ? r(t) : r.replace(/%s/i, t); } var Do = {}; function _r(e, t) { var r = e.toLowerCase(); Do[r] = Do[r + "s"] = Do[t] = e; } function tn(e) { return typeof e == "string" ? Do[e] || Do[e.toLowerCase()] : void 0; } function Yh(e) { var t = {}, r, n; for (n in e) Nt(e, n) && (r = tn(n), r && (t[r] = e[n])); return t; } var U_ = {}; function xr(e, t) { U_[e] = t; } function rM(e) { var t = [], r; for (r in e) Nt(e, r) && t.push({ unit: r, priority: U_[r] }); return t.sort(function(n, a) { return n.priority - a.priority; }), t; } function ac(e) { return e % 4 === 0 && e % 100 !== 0 || e % 400 === 0; } function Xr(e) { return e < 0 ? Math.ceil(e) || 0 : Math.floor(e); } function _t(e) { var t = +e, r = 0; return t !== 0 && isFinite(t) && (r = Xr(t)), r; } function qi(e, t) { return function(r) { return r != null ? (q_(this, e, r), te.updateOffset(this, t), this) : cu(this, e); }; } function cu(e, t) { return e.isValid() ? e._d["get" + (e._isUTC ? "UTC" : "") + t]() : NaN; } function q_(e, t, r) { e.isValid() && !isNaN(r) && (t === "FullYear" && ac(e.year()) && e.month() === 1 && e.date() === 29 ? (r = _t(r), e._d["set" + (e._isUTC ? "UTC" : "") + t]( r, e.month(), cc(r, e.month()) )) : e._d["set" + (e._isUTC ? "UTC" : "") + t](r)); } function nM(e) { return e = tn(e), Vn(this[e]) ? this[e]() : this; } function aM(e, t) { if (typeof e == "object") { e = Yh(e); var r = rM(e), n, a = r.length; for (n = 0; n < a; n++) this[r[n].unit](e[r[n].unit]); } else if (e = tn(e), Vn(this[e])) return this[e](t); return this; } var B_ = /\d/, jr = /\d\d/, K_ = /\d{3}/, zh = /\d{4}/, ic = /[+-]?\d{6}/, Gt = /\d\d?/, G_ = /\d\d\d\d?/, X_ = /\d\d\d\d\d\d?/, oc = /\d{1,3}/, Hh = /\d{1,4}/, sc = /[+-]?\d{1,6}/, Bi = /\d+/, lc = /[+-]?\d+/, iM = /Z|[+-]\d\d:?\d\d/gi, uc = /Z|[+-]\d\d(?::?\d\d)?/gi, oM = /[+-]?\d+(\.\d{1,3})?/, ds = /[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, fu; fu = {}; function Ve(e, t, r) { fu[e] = Vn(t) ? t : function(n, a) { return n && r ? r : t; }; } function sM(e, t) { return Nt(fu, e) ? fu[e](t._strict, t._locale) : new RegExp(lM(e)); } function lM(e) { return $r( e.replace("\\", "").replace( /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function(t, r, n, a, i) { return r || n || a || i; } ) ); } function $r(e) { return e.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"); } var Gd = {}; function Ht(e, t) { var r, n = t, a; for (typeof e == "string" && (e = [e]), ta(t) && (n = function(i, o) { o[t] = _t(i); }), a = e.length, r = 0; r < a; r++) Gd[e[r]] = n; } function vs(e, t) { Ht(e, function(r, n, a, i) { a._w = a._w || {}, t(r, a._w, a, i); }); } function uM(e, t, r) { t != null && Nt(Gd, e) && Gd[e](t, r._a, r, e); } var br = 0, Gn = 1, Mn = 2, cr = 3, cn = 4, Xn = 5, qa = 6, cM = 7, fM = 8; function dM(e, t) { return (e % t + t) % t; } var sr; Array.prototype.indexOf ? sr = Array.prototype.indexOf : sr = function(e) { var t; for (t = 0; t < this.length; ++t) if (this[t] === e) return t; return -1; }; function cc(e, t) { if (isNaN(e) || isNaN(t)) return NaN; var r = dM(t, 12); return e += (t - r) / 12, r === 1 ? ac(e) ? 29 : 28 : 31 - r % 7 % 2; } Je("M", ["MM", 2], "Mo", function() { return this.month() + 1; }); Je("MMM", 0, 0, function(e) { return this.localeData().monthsShort(this, e); }); Je("MMMM", 0, 0, function(e) { return this.localeData().months(this, e); }); _r("month", "M"); xr("month", 8); Ve("M", Gt); Ve("MM", Gt, jr); Ve("MMM", function(e, t) { return t.monthsShortRegex(e); }); Ve("MMMM", function(e, t) { return t.monthsRegex(e); }); Ht(["M", "MM"], function(e, t) { t[Gn] = _t(e) - 1; }); Ht(["MMM", "MMMM"], function(e, t, r, n) { var a = r._locale.monthsParse(e, n, r._strict); a != null ? t[Gn] = a : gt(r).invalidMonth = e; }); var vM = "January_February_March_April_May_June_July_August_September_October_November_December".split( "_" ), Z_ = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), Q_ = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, hM = ds, pM = ds; function mM(e, t) { return e ? vn(this._months) ? this._months[e.month()] : this._months[(this._months.isFormat || Q_).test(t) ? "format" : "standalone"][e.month()] : vn(this._months) ? this._months : this._months.standalone; } function gM(e, t) { return e ? vn(this._monthsShort) ? this._monthsShort[e.month()] : this._monthsShort[Q_.test(t) ? "format" : "standalone"][e.month()] : vn(this._monthsShort) ? this._monthsShort : this._monthsShort.standalone; } function yM(e, t, r) { var n, a, i, o = e.toLocaleLowerCase(); if (!this._monthsParse) for (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = [], n = 0; n < 12; ++n) i = Fn([2e3, n]), this._shortMonthsParse[n] = this.monthsShort( i, "" ).toLocaleLowerCase(), this._longMonthsParse[n] = this.months(i, "").toLocaleLowerCase(); return r ? t === "MMM" ? (a = sr.call(this._shortMonthsParse, o), a !== -1 ? a : null) : (a = sr.call(this._longMonthsParse, o), a !== -1 ? a : null) : t === "MMM" ? (a = sr.call(this._shortMonthsParse, o), a !== -1 ? a : (a = sr.call(this._longMonthsParse, o), a !== -1 ? a : null)) : (a = sr.call(this._longMonthsParse, o), a !== -1 ? a : (a = sr.call(this._shortMonthsParse, o), a !== -1 ? a : null)); } function bM(e, t, r) { var n, a, i; if (this._monthsParseExact) return yM.call(this, e, t, r); for (this._monthsParse || (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = []), n = 0; n < 12; n++) { if (a = Fn([2e3, n]), r && !this._longMonthsParse[n] && (this._longMonthsParse[n] = new RegExp( "^" + this.months(a, "").replace(".", "") + "$", "i" ), this._shortMonthsParse[n] = new RegExp( "^" + this.monthsShort(a, "").replace(".", "") + "$", "i" )), !r && !this._monthsParse[n] && (i = "^" + this.months(a, "") + "|^" + this.monthsShort(a, ""), this._monthsParse[n] = new RegExp(i.replace(".", ""), "i")), r && t === "MMMM" && this._longMonthsParse[n].test(e)) return n; if (r && t === "MMM" && this._shortMonthsParse[n].test(e)) return n; if (!r && this._monthsParse[n].test(e)) return n; } } function J_(e, t) { var r; if (!e.isValid()) return e; if (typeof t == "string") { if (/^\d+$/.test(t)) t = _t(t); else if (t = e.localeData().monthsParse(t), !ta(t)) return e; } return r = Math.min(e.date(), cc(e.year(), t)), e._d["set" + (e._isUTC ? "UTC" : "") + "Month"](t, r), e; } function ex(e) { return e != null ? (J_(this, e), te.updateOffset(this, !0), this) : cu(this, "Month"); } function CM() { return cc(this.year(), this.month()); } function _M(e) { return this._monthsParseExact ? (Nt(this, "_monthsRegex") || tx.call(this), e ? this._monthsShortStrictRegex : this._monthsShortRegex) : (Nt(this, "_monthsShortRegex") || (this._monthsShortRegex = hM), this._monthsShortStrictRegex && e ? this._monthsShortStrictRegex : this._monthsShortRegex); } function xM(e) { return this._monthsParseExact ? (Nt(this, "_monthsRegex") || tx.call(this), e ? this._monthsStrictRegex : this._monthsRegex) : (Nt(this, "_monthsRegex") || (this._monthsRegex = pM), this._monthsStrictRegex && e ? this._monthsStrictRegex : this._monthsRegex); } function tx() { function e(o, s) { return s.length - o.length; } var t = [], r = [], n = [], a, i; for (a = 0; a < 12; a++) i = Fn([2e3, a]), t.push(this.monthsShort(i, "")), r.push(this.months(i, "")), n.push(this.months(i, "")), n.push(this.monthsShort(i, "")); for (t.sort(e), r.sort(e), n.sort(e), a = 0; a < 12; a++) t[a] = $r(t[a]), r[a] = $r(r[a]); for (a = 0; a < 24; a++) n[a] = $r(n[a]); this._monthsRegex = new RegExp("^(" + n.join("|") + ")", "i"), this._monthsShortRegex = this._monthsRegex, this._monthsStrictRegex = new RegExp( "^(" + r.join("|") + ")", "i" ), this._monthsShortStrictRegex = new RegExp( "^(" + t.join("|") + ")", "i" ); } Je("Y", 0, 0, function() { var e = this.year(); return e <= 9999 ? An(e, 4) : "+" + e; }); Je(0, ["YY", 2], 0, function() { return this.year() % 100; }); Je(0, ["YYYY", 4], 0, "year"); Je(0, ["YYYYY", 5], 0, "year"); Je(0, ["YYYYYY", 6, !0], 0, "year"); _r("year", "y"); xr("year", 1); Ve("Y", lc); Ve("YY", Gt, jr); Ve("YYYY", Hh, zh); Ve("YYYYY", sc, ic); Ve("YYYYYY", sc, ic); Ht(["YYYYY", "YYYYYY"], br); Ht("YYYY", function(e, t) { t[br] = e.length === 2 ? te.parseTwoDigitYear(e) : _t(e); }); Ht("YY", function(e, t) { t[br] = te.parseTwoDigitYear(e); }); Ht("Y", function(e, t) { t[br] = parseInt(e, 10); }); function ko(e) { return ac(e) ? 366 : 365; } te.parseTwoDigitYear = function(e) { return _t(e) + (_t(e) > 68 ? 1900 : 2e3); }; var rx = qi("FullYear", !0); function wM() { return ac(this.year()); } function SM(e, t, r, n, a, i, o) { var s; return e < 100 && e >= 0 ? (s = new Date(e + 400, t, r, n, a, i, o), isFinite(s.getFullYear()) && s.setFullYear(e)) : s = new Date(e, t, r, n, a, i, o), s; } function Bo(e) { var t, r; return e < 100 && e >= 0 ? (r = Array.prototype.slice.call(arguments), r[0] = e + 400, t = new Date(Date.UTC.apply(null, r)), isFinite(t.getUTCFullYear()) && t.setUTCFullYear(e)) : t = new Date(Date.UTC.apply(null, arguments)), t; } function du(e, t, r) { var n = 7 + t - r, a = (7 + Bo(e, 0, n).getUTCDay() - t) % 7; return -a + n - 1; } function nx(e, t, r, n, a) { var i = (7 + r - n) % 7, o = du(e, n, a), s = 1 + 7 * (t - 1) + i + o, l, u; return s <= 0 ? (l = e - 1, u = ko(l) + s) : s > ko(e) ? (l = e + 1, u = s - ko(e)) : (l = e, u = s), { year: l, dayOfYear: u }; } function Ko(e, t, r) { var n = du(e.year(), t, r), a = Math.floor((e.dayOfYear() - n - 1) / 7) + 1, i, o; return a < 1 ? (o = e.year() - 1, i = a + ea(o, t, r)) : a > ea(e.year(), t, r) ? (i = a - ea(e.year(), t, r), o = e.year() + 1) : (o = e.year(), i = a), { week: i, year: o }; } function ea(e, t, r) { var n = du(e, t, r), a = du(e + 1, t, r); return (ko(e) - n + a) / 7; } Je("w", ["ww", 2], "wo", "week"); Je("W", ["WW", 2], "Wo", "isoWeek"); _r("week", "w"); _r("isoWeek", "W"); xr("week", 5); xr("isoWeek", 5); Ve("w", Gt); Ve("ww", Gt, jr); Ve("W", Gt); Ve("WW", Gt, jr); vs( ["w", "ww", "W", "WW"], function(e, t, r, n) { t[n.substr(0, 1)] = _t(e); } ); function PM(e) { return Ko(e, this._week.dow, this._week.doy).week; } var OM = { dow: 0, doy: 6 }; function RM() { return this._week.dow; } function EM() { return this._week.doy; } function MM(e) { var t = this.localeData().week(this); return e == null ? t : this.add((e - t) * 7, "d"); } function TM(e) { var t = Ko(this, 1, 4).week; return e == null ? t : this.add((e - t) * 7, "d"); } Je("d", 0, "do", "day"); Je("dd", 0, 0, function(e) { return this.localeData().weekdaysMin(this, e); }); Je("ddd", 0, 0, function(e) { return this.localeData().weekdaysShort(this, e); }); Je("dddd", 0, 0, function(e) { return this.localeData().weekdays(this, e); }); Je("e", 0, 0, "weekday"); Je("E", 0, 0, "isoWeekday"); _r("day", "d"); _r("weekday", "e"); _r("isoWeekday", "E"); xr("day", 11); xr("weekday", 11); xr("isoWeekday", 11); Ve("d", Gt); Ve("e", Gt); Ve("E", Gt); Ve("dd", function(e, t) { return t.weekdaysMinRegex(e); }); Ve("ddd", function(e, t) { return t.weekdaysShortRegex(e); }); Ve("dddd", function(e, t) { return t.weekdaysRegex(e); }); vs(["dd", "ddd", "dddd"], function(e, t, r, n) { var a = r._locale.weekdaysParse(e, n, r._strict); a != null ? t.d = a : gt(r).invalidWeekday = e; }); vs(["d", "e", "E"], function(e, t, r, n) { t[n] = _t(e); }); function NM(e, t) { return typeof e != "string" ? e : isNaN(e) ? (e = t.weekdaysParse(e), typeof e == "number" ? e : null) : parseInt(e, 10); } function DM(e, t) { return typeof e == "string" ? t.weekdaysParse(e) % 7 || 7 : isNaN(e) ? null : e; } function Uh(e, t) { return e.slice(t, 7).concat(e.slice(0, t)); } var kM = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), ax = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), AM = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), IM = ds, $M = ds, FM = ds; function VM(e, t) { var r = vn(this._weekdays) ? this._weekdays : this._weekdays[e && e !== !0 && this._weekdays.isFormat.test(t) ? "format" : "standalone"]; return e === !0 ? Uh(r, this._week.dow) : e ? r[e.day()] : r; } function LM(e) { return e === !0 ? Uh(this._weekdaysShort, this._week.dow) : e ? this._weekdaysShort[e.day()] : this._weekdaysShort; } function jM(e) { return e === !0 ? Uh(this._weekdaysMin, this._week.dow) : e ? this._weekdaysMin[e.day()] : this._weekdaysMin; } function WM(e, t, r) { var n, a, i, o = e.toLocaleLowerCase(); if (!this._weekdaysParse) for (this._weekdaysParse = [], this._shortWeekdaysParse = [], this._minWeekdaysParse = [], n = 0; n < 7; ++n) i = Fn([2e3, 1]).day(n), this._minWeekdaysParse[n] = this.weekdaysMin( i, "" ).toLocaleLowerCase(), this._shortWeekdaysParse[n] = this.weekdaysShort( i, "" ).toLocaleLowerCase(), this._weekdaysParse[n] = this.weekdays(i, "").toLocaleLowerCase(); return r ? t === "dddd" ? (a = sr.call(this._weekdaysParse, o), a !== -1 ? a : null) : t === "ddd" ? (a = sr.call(this._shortWeekdaysParse, o), a !== -1 ? a : null) : (a = sr.call(this._minWeekdaysParse, o), a !== -1 ? a : null) : t === "dddd" ? (a = sr.call(this._weekdaysParse, o), a !== -1 || (a = sr.call(this._shortWeekdaysParse, o), a !== -1) ? a : (a = sr.call(this._minWeekdaysParse, o), a !== -1 ? a : null)) : t === "ddd" ? (a = sr.call(this._shortWeekdaysParse, o), a !== -1 || (a = sr.call(this._weekdaysParse, o), a !== -1) ? a : (a = sr.call(this._minWeekdaysParse, o), a !== -1 ? a : null)) : (a = sr.call(this._minWeekdaysParse, o), a !== -1 || (a = sr.call(this._weekdaysParse, o), a !== -1) ? a : (a = sr.call(this._shortWeekdaysParse, o), a !== -1 ? a : null)); } function YM(e, t, r) { var n, a, i; if (this._weekdaysParseExact) return WM.call(this, e, t, r); for (this._weekdaysParse || (this._weekdaysParse = [], this._minWeekdaysParse = [], this._shortWeekdaysParse = [], this._fullWeekdaysParse = []), n = 0; n < 7; n++) { if (a = Fn([2e3, 1]).day(n), r && !this._fullWeekdaysParse[n] && (this._fullWeekdaysParse[n] = new RegExp( "^" + this.weekdays(a, "").replace(".", "\\.?") + "$", "i" ), this._shortWeekdaysParse[n] = new RegExp( "^" + this.weekdaysShort(a, "").replace(".", "\\.?") + "$", "i" ), this._minWeekdaysParse[n] = new RegExp( "^" + this.weekdaysMin(a, "").replace(".", "\\.?") + "$", "i" )), this._weekdaysParse[n] || (i = "^" + this.weekdays(a, "") + "|^" + this.weekdaysShort(a, "") + "|^" + this.weekdaysMin(a, ""), this._weekdaysParse[n] = new RegExp(i.replace(".", ""), "i")), r && t === "dddd" && this._fullWeekdaysParse[n].test(e)) return n; if (r && t === "ddd" && this._shortWeekdaysParse[n].test(e)) return n; if (r && t === "dd" && this._minWeekdaysParse[n].test(e)) return n; if (!r && this._weekdaysParse[n].test(e)) return n; } } function zM(e) { if (!this.isValid()) return e != null ? this : NaN; var t = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); return e != null ? (e = NM(e, this.localeData()), this.add(e - t, "d")) : t; } function HM(e) { if (!this.isValid()) return e != null ? this : NaN; var t = (this.day() + 7 - this.localeData()._week.dow) % 7; return e == null ? t : this.add(e - t, "d"); } function UM(e) { if (!this.isValid()) return e != null ? this : NaN; if (e != null) { var t = DM(e, this.localeData()); return this.day(this.day() % 7 ? t : t - 7); } else return this.day() || 7; } function qM(e) { return this._weekdaysParseExact ? (Nt(this, "_weekdaysRegex") || qh.call(this), e ? this._weekdaysStrictRegex : this._weekdaysRegex) : (Nt(this, "_weekdaysRegex") || (this._weekdaysRegex = IM), this._weekdaysStrictRegex && e ? this._weekdaysStrictRegex : this._weekdaysRegex); } function BM(e) { return this._weekdaysParseExact ? (Nt(this, "_weekdaysRegex") || qh.call(this), e ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex) : (Nt(this, "_weekdaysShortRegex") || (this._weekdaysShortRegex = $M), this._weekdaysShortStrictRegex && e ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex); } function KM(e) { return this._weekdaysParseExact ? (Nt(this, "_weekdaysRegex") || qh.call(this), e ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex) : (Nt(this, "_weekdaysMinRegex") || (this._weekdaysMinRegex = FM), this._weekdaysMinStrictRegex && e ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex); } function qh() { function e(c, f) { return f.length - c.length; } var t = [], r = [], n = [], a = [], i, o, s, l, u; for (i = 0; i < 7; i++) o = Fn([2e3, 1]).day(i), s = $r(this.weekdaysMin(o, "")), l = $r(this.weekdaysShort(o, "")), u = $r(this.weekdays(o, "")), t.push(s), r.push(l), n.push(u), a.push(s), a.push(l), a.push(u); t.sort(e), r.sort(e), n.sort(e), a.sort(e), this._weekdaysRegex = new RegExp("^(" + a.join("|") + ")", "i"), this._weekdaysShortRegex = this._weekdaysRegex, this._weekdaysMinRegex = this._weekdaysRegex, this._weekdaysStrictRegex = new RegExp( "^(" + n.join("|") + ")", "i" ), this._weekdaysShortStrictRegex = new RegExp( "^(" + r.join("|") + ")", "i" ), this._weekdaysMinStrictRegex = new RegExp( "^(" + t.join("|") + ")", "i" ); } function Bh() { return this.hours() % 12 || 12; } function GM() { return this.hours() || 24; } Je("H", ["HH", 2], 0, "hour"); Je("h", ["hh", 2], 0, Bh); Je("k", ["kk", 2], 0, GM); Je("hmm", 0, 0, function() { return "" + Bh.apply(this) + An(this.minutes(), 2); }); Je("hmmss", 0, 0, function() { return "" + Bh.apply(this) + An(this.minutes(), 2) + An(this.seconds(), 2); }); Je("Hmm", 0, 0, function() { return "" + this.hours() + An(this.minutes(), 2); }); Je("Hmmss", 0, 0, function() { return "" + this.hours() + An(this.minutes(), 2) + An(this.seconds(), 2); }); function ix(e, t) { Je(e, 0, 0, function() { return this.localeData().meridiem( this.hours(), this.minutes(), t ); }); } ix("a", !0); ix("A", !1); _r("hour", "h"); xr("hour", 13); function ox(e, t) { return t._meridiemParse; } Ve("a", ox); Ve("A", ox); Ve("H", Gt); Ve("h", Gt); Ve("k", Gt); Ve("HH", Gt, jr); Ve("hh", Gt, jr); Ve("kk", Gt, jr); Ve("hmm", G_); Ve("hmmss", X_); Ve("Hmm", G_); Ve("Hmmss", X_); Ht(["H", "HH"], cr); Ht(["k", "kk"], function(e, t, r) { var n = _t(e); t[cr] = n === 24 ? 0 : n; }); Ht(["a", "A"], function(e, t, r) { r._isPm = r._locale.isPM(e), r._meridiem = e; }); Ht(["h", "hh"], function(e, t, r) { t[cr] = _t(e), gt(r).bigHour = !0; }); Ht("hmm", function(e, t, r) { var n = e.length - 2; t[cr] = _t(e.substr(0, n)), t[cn] = _t(e.substr(n)), gt(r).bigHour = !0; }); Ht("hmmss", function(e, t, r) { var n = e.length - 4, a = e.length - 2; t[cr] = _t(e.substr(0, n)), t[cn] = _t(e.substr(n, 2)), t[Xn] = _t(e.substr(a)), gt(r).bigHour = !0; }); Ht("Hmm", function(e, t, r) { var n = e.length - 2; t[cr] = _t(e.substr(0, n)), t[cn] = _t(e.substr(n)); }); Ht("Hmmss", function(e, t, r) { var n = e.length - 4, a = e.length - 2; t[cr] = _t(e.substr(0, n)), t[cn] = _t(e.substr(n, 2)), t[Xn] = _t(e.substr(a)); }); function XM(e) { return (e + "").toLowerCase().charAt(0) === "p"; } var ZM = /[ap]\.?m?\.?/i, QM = qi("Hours", !0); function JM(e, t, r) { return e > 11 ? r ? "pm" : "PM" : r ? "am" : "AM"; } var sx = { calendar: YE, longDateFormat: qE, invalidDate: KE, ordinal: XE, dayOfMonthOrdinalParse: ZE, relativeTime: JE, months: vM, monthsShort: Z_, week: OM, weekdays: kM, weekdaysMin: AM, weekdaysShort: ax, meridiemParse: ZM }, Xt = {}, co = {}, Go; function e2(e, t) { var r, n = Math.min(e.length, t.length); for (r = 0; r < n; r += 1) if (e[r] !== t[r]) return r; return n; } function Yg(e) { return e && e.toLowerCase().replace("_", "-"); } function t2(e) { for (var t = 0, r, n, a, i; t < e.length; ) { for (i = Yg(e[t]).split("-"), r = i.length, n = Yg(e[t + 1]), n = n ? n.split("-") : null; r > 0; ) { if (a = fc(i.slice(0, r).join("-")), a) return a; if (n && n.length >= r && e2(i, n) >= r - 1) break; r--; } t++; } return Go; } function r2(e) { return e.match("^[^/\\\\]*$") != null; } function fc(e) { var t = null, r; if (Xt[e] === void 0 && typeof module < "u" && module && module.exports && r2(e)) try { t = Go._abbr, r = require, r("./locale/" + e), wa(t); } catch { Xt[e] = null; } return Xt[e]; } function wa(e, t) { var r; return e && (Nr(t) ? r = aa(e) : r = Kh(e, t), r ? Go = r : typeof console < "u" && console.warn && console.warn( "Locale " + e + " not found. Did you forget to load it?" )), Go._abbr; } function Kh(e, t) { if (t !== null) { var r, n = sx; if (t.abbr = e, Xt[e] != null) z_( "defineLocaleOverride", "use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info." ), n = Xt[e]._config; else if (t.parentLocale != null) if (Xt[t.parentLocale] != null) n = Xt[t.parentLocale]._config; else if (r = fc(t.parentLocale), r != null) n = r._config; else return co[t.parentLocale] || (co[t.parentLocale] = []), co[t.parentLocale].push({ name: e, config: t }), null; return Xt[e] = new jh(Bd(n, t)), co[e] && co[e].forEach(function(a) { Kh(a.name, a.config); }), wa(e), Xt[e]; } else return delete Xt[e], null; } function n2(e, t) { if (t != null) { var r, n, a = sx; Xt[e] != null && Xt[e].parentLocale != null ? Xt[e].set(Bd(Xt[e]._config, t)) : (n = fc(e), n != null && (a = n._config), t = Bd(a, t), n == null && (t.abbr = e), r = new jh(t), r.parentLocale = Xt[e], Xt[e] = r), wa(e); } else Xt[e] != null && (Xt[e].parentLocale != null ? (Xt[e] = Xt[e].parentLocale, e === wa() && wa(e)) : Xt[e] != null && delete Xt[e]); return Xt[e]; } function aa(e) { var t; if (e && e._locale && e._locale._abbr && (e = e._locale._abbr), !e) return Go; if (!vn(e)) { if (t = fc(e), t) return t; e = [e]; } return t2(e); } function a2() { return Kd(Xt); } function Gh(e) { var t, r = e._a; return r && gt(e).overflow === -2 && (t = r[Gn] < 0 || r[Gn] > 11 ? Gn : r[Mn] < 1 || r[Mn] > cc(r[br], r[Gn]) ? Mn : r[cr] < 0 || r[cr] > 24 || r[cr] === 24 && (r[cn] !== 0 || r[Xn] !== 0 || r[qa] !== 0) ? cr : r[cn] < 0 || r[cn] > 59 ? cn : r[Xn] < 0 || r[Xn] > 59 ? Xn : r[qa] < 0 || r[qa] > 999 ? qa : -1, gt(e)._overflowDayOfYear && (t < br || t > Mn) && (t = Mn), gt(e)._overflowWeeks && t === -1 && (t = cM), gt(e)._overflowWeekday && t === -1 && (t = fM), gt(e).overflow = t), e; } var i2 = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, o2 = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, s2 = /Z|[+-]\d\d(?::?\d\d)?/, qs = [ ["YYYYYY-MM-DD", /[+-]\d{6}-\d\d-\d\d/], ["YYYY-MM-DD", /\d{4}-\d\d-\d\d/], ["GGGG-[W]WW-E", /\d{4}-W\d\d-\d/], ["GGGG-[W]WW", /\d{4}-W\d\d/, !1], ["YYYY-DDD", /\d{4}-\d{3}/], ["YYYY-MM", /\d{4}-\d\d/, !1], ["YYYYYYMMDD", /[+-]\d{10}/], ["YYYYMMDD", /\d{8}/], ["GGGG[W]WWE", /\d{4}W\d{3}/], ["GGGG[W]WW", /\d{4}W\d{2}/, !1], ["YYYYDDD", /\d{7}/], ["YYYYMM", /\d{6}/, !1], ["YYYY", /\d{4}/, !1] ], Vf = [ ["HH:mm:ss.SSSS", /\d\d:\d\d:\d\d\.\d+/], ["HH:mm:ss,SSSS", /\d\d:\d\d:\d\d,\d+/], ["HH:mm:ss", /\d\d:\d\d:\d\d/], ["HH:mm", /\d\d:\d\d/], ["HHmmss.SSSS", /\d\d\d\d\d\d\.\d+/], ["HHmmss,SSSS", /\d\d\d\d\d\d,\d+/], ["HHmmss", /\d\d\d\d\d\d/], ["HHmm", /\d\d\d\d/], ["HH", /\d\d/] ], l2 = /^\/?Date\((-?\d+)/i, u2 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/, c2 = { UT: 0, GMT: 0, EDT: -4 * 60, EST: -5 * 60, CDT: -5 * 60, CST: -6 * 60, MDT: -6 * 60, MST: -7 * 60, PDT: -7 * 60, PST: -8 * 60 }; function lx(e) { var t, r, n = e._i, a = i2.exec(n) || o2.exec(n), i, o, s, l, u = qs.length, c = Vf.length; if (a) { for (gt(e).iso = !0, t = 0, r = u; t < r; t++) if (qs[t][1].exec(a[1])) { o = qs[t][0], i = qs[t][2] !== !1; break; } if (o == null) { e._isValid = !1; return; } if (a[3]) { for (t = 0, r = c; t < r; t++) if (Vf[t][1].exec(a[3])) { s = (a[2] || " ") + Vf[t][0]; break; } if (s == null) { e._isValid = !1; return; } } if (!i && s != null) { e._isValid = !1; return; } if (a[4]) if (s2.exec(a[4])) l = "Z"; else { e._isValid = !1; return; } e._f = o + (s || "") + (l || ""), Zh(e); } else e._isValid = !1; } function f2(e, t, r, n, a, i) { var o = [ d2(e), Z_.indexOf(t), parseInt(r, 10), parseInt(n, 10), parseInt(a, 10) ]; return i && o.push(parseInt(i, 10)), o; } function d2(e) { var t = parseInt(e, 10); return t <= 49 ? 2e3 + t : t <= 999 ? 1900 + t : t; } function v2(e) { return e.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").replace(/^\s\s*/, "").replace(/\s\s*$/, ""); } function h2(e, t, r) { if (e) { var n = ax.indexOf(e), a = new Date( t[0], t[1], t[2] ).getDay(); if (n !== a) return gt(r).weekdayMismatch = !0, r._isValid = !1, !1; } return !0; } function p2(e, t, r) { if (e) return c2[e]; if (t) return 0; var n = parseInt(r, 10), a = n % 100, i = (n - a) / 100; return i * 60 + a; } function ux(e) { var t = u2.exec(v2(e._i)), r; if (t) { if (r = f2( t[4], t[3], t[2], t[5], t[6], t[7] ), !h2(t[1], r, e)) return; e._a = r, e._tzm = p2(t[8], t[9], t[10]), e._d = Bo.apply(null, e._a), e._d.setUTCMinutes(e._d.getUTCMinutes() - e._tzm), gt(e).rfc2822 = !0; } else e._isValid = !1; } function m2(e) { var t = l2.exec(e._i); if (t !== null) { e._d = new Date(+t[1]); return; } if (lx(e), e._isValid === !1) delete e._isValid; else return; if (ux(e), e._isValid === !1) delete e._isValid; else return; e._strict ? e._isValid = !1 : te.createFromInputFallback(e); } te.createFromInputFallback = en( "value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.", function(e) { e._d = new Date(e._i + (e._useUTC ? " UTC" : "")); } ); function Si(e, t, r) { return e != null ? e : t != null ? t : r; } function g2(e) { var t = new Date(te.now()); return e._useUTC ? [ t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate() ] : [t.getFullYear(), t.getMonth(), t.getDate()]; } function Xh(e) { var t, r, n = [], a, i, o; if (!e._d) { for (a = g2(e), e._w && e._a[Mn] == null && e._a[Gn] == null && y2(e), e._dayOfYear != null && (o = Si(e._a[br], a[br]), (e._dayOfYear > ko(o) || e._dayOfYear === 0) && (gt(e)._overflowDayOfYear = !0), r = Bo(o, 0, e._dayOfYear), e._a[Gn] = r.getUTCMonth(), e._a[Mn] = r.getUTCDate()), t = 0; t < 3 && e._a[t] == null; ++t) e._a[t] = n[t] = a[t]; for (; t < 7; t++) e._a[t] = n[t] = e._a[t] == null ? t === 2 ? 1 : 0 : e._a[t]; e._a[cr] === 24 && e._a[cn] === 0 && e._a[Xn] === 0 && e._a[qa] === 0 && (e._nextDay = !0, e._a[cr] = 0), e._d = (e._useUTC ? Bo : SM).apply( null, n ), i = e._useUTC ? e._d.getUTCDay() : e._d.getDay(), e._tzm != null && e._d.setUTCMinutes(e._d.getUTCMinutes() - e._tzm), e._nextDay && (e._a[cr] = 24), e._w && typeof e._w.d < "u" && e._w.d !== i && (gt(e).weekdayMismatch = !0); } } function y2(e) { var t, r, n, a, i, o, s, l, u; t = e._w, t.GG != null || t.W != null || t.E != null ? (i = 1, o = 4, r = Si( t.GG, e._a[br], Ko(Kt(), 1, 4).year ), n = Si(t.W, 1), a = Si(t.E, 1), (a < 1 || a > 7) && (l = !0)) : (i = e._locale._week.dow, o = e._locale._week.doy, u = Ko(Kt(), i, o), r = Si(t.gg, e._a[br], u.year), n = Si(t.w, u.week), t.d != null ? (a = t.d, (a < 0 || a > 6) && (l = !0)) : t.e != null ? (a = t.e + i, (t.e < 0 || t.e > 6) && (l = !0)) : a = i), n < 1 || n > ea(r, i, o) ? gt(e)._overflowWeeks = !0 : l != null ? gt(e)._overflowWeekday = !0 : (s = nx(r, n, a, i, o), e._a[br] = s.year, e._dayOfYear = s.dayOfYear); } te.ISO_8601 = function() { }; te.RFC_2822 = function() { }; function Zh(e) { if (e._f === te.ISO_8601) { lx(e); return; } if (e._f === te.RFC_2822) { ux(e); return; } e._a = [], gt(e).empty = !0; var t = "" + e._i, r, n, a, i, o, s = t.length, l = 0, u, c; for (a = H_(e._f, e._locale).match(Wh) || [], c = a.length, r = 0; r < c; r++) i = a[r], n = (t.match(sM(i, e)) || [])[0], n && (o = t.substr(0, t.indexOf(n)), o.length > 0 && gt(e).unusedInput.push(o), t = t.slice( t.indexOf(n) + n.length ), l += n.length), ki[i] ? (n ? gt(e).empty = !1 : gt(e).unusedTokens.push(i), uM(i, n, e)) : e._strict && !n && gt(e).unusedTokens.push(i); gt(e).charsLeftOver = s - l, t.length > 0 && gt(e).unusedInput.push(t), e._a[cr] <= 12 && gt(e).bigHour === !0 && e._a[cr] > 0 && (gt(e).bigHour = void 0), gt(e).parsedDateParts = e._a.slice(0), gt(e).meridiem = e._meridiem, e._a[cr] = b2( e._locale, e._a[cr], e._meridiem ), u = gt(e).era, u !== null && (e._a[br] = e._locale.erasConvertYear(u, e._a[br])), Xh(e), Gh(e); } function b2(e, t, r) { var n; return r == null ? t : e.meridiemHour != null ? e.meridiemHour(t, r) : (e.isPM != null && (n = e.isPM(r), n && t < 12 && (t += 12), !n && t === 12 && (t = 0)), t); } function C2(e) { var t, r, n, a, i, o, s = !1, l = e._f.length; if (l === 0) { gt(e).invalidFormat = !0, e._d = new Date(NaN); return; } for (a = 0; a < l; a++) i = 0, o = !1, t = Lh({}, e), e._useUTC != null && (t._useUTC = e._useUTC), t._f = e._f[a], Zh(t), Vh(t) && (o = !0), i += gt(t).charsLeftOver, i += gt(t).unusedTokens.length * 10, gt(t).score = i, s ? i < n && (n = i, r = t) : (n == null || i < n || o) && (n = i, r = t, o && (s = !0)); pa(e, r || t); } function _2(e) { if (!e._d) { var t = Yh(e._i), r = t.day === void 0 ? t.date : t.day; e._a = W_( [t.year, t.month, r, t.hour, t.minute, t.second, t.millisecond], function(n) { return n && parseInt(n, 10); } ), Xh(e); } } function x2(e) { var t = new fs(Gh(cx(e))); return t._nextDay && (t.add(1, "d"), t._nextDay = void 0), t; } function cx(e) { var t = e._i, r = e._f; return e._locale = e._locale || aa(e._l), t === null || r === void 0 && t === "" ? nc({ nullInput: !0 }) : (typeof t == "string" && (e._i = t = e._locale.preparse(t)), hn(t) ? new fs(Gh(t)) : (cs(t) ? e._d = t : vn(r) ? C2(e) : r ? Zh(e) : w2(e), Vh(e) || (e._d = null), e)); } function w2(e) { var t = e._i; Nr(t) ? e._d = new Date(te.now()) : cs(t) ? e._d = new Date(t.valueOf()) : typeof t == "string" ? m2(e) : vn(t) ? (e._a = W_(t.slice(0), function(r) { return parseInt(r, 10); }), Xh(e)) : Za(t) ? _2(e) : ta(t) ? e._d = new Date(t) : te.createFromInputFallback(e); } function fx(e, t, r, n, a) { var i = {}; return (t === !0 || t === !1) && (n = t, t = void 0), (r === !0 || r === !1) && (n = r, r = void 0), (Za(e) && Fh(e) || vn(e) && e.length === 0) && (e = void 0), i._isAMomentObject = !0, i._useUTC = i._isUTC = a, i._l = r, i._i = e, i._f = t, i._strict = n, x2(i); } function Kt(e, t, r, n) { return fx(e, t, r, n, !1); } var S2 = en( "moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/", function() { var e = Kt.apply(null, arguments); return this.isValid() && e.isValid() ? e < this ? this : e : nc(); } ), P2 = en( "moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/", function() { var e = Kt.apply(null, arguments); return this.isValid() && e.isValid() ? e > this ? this : e : nc(); } ); function dx(e, t) { var r, n; if (t.length === 1 && vn(t[0]) && (t = t[0]), !t.length) return Kt(); for (r = t[0], n = 1; n < t.length; ++n) (!t[n].isValid() || t[n][e](r)) && (r = t[n]); return r; } function O2() { var e = [].slice.call(arguments, 0); return dx("isBefore", e); } function R2() { var e = [].slice.call(arguments, 0); return dx("isAfter", e); } var E2 = function() { return Date.now ? Date.now() : +new Date(); }, fo = [ "year", "quarter", "month", "week", "day", "hour", "minute", "second", "millisecond" ]; function M2(e) { var t, r = !1, n, a = fo.length; for (t in e) if (Nt(e, t) && !(sr.call(fo, t) !== -1 && (e[t] == null || !isNaN(e[t])))) return !1; for (n = 0; n < a; ++n) if (e[fo[n]]) { if (r) return !1; parseFloat(e[fo[n]]) !== _t(e[fo[n]]) && (r = !0); } return !0; } function T2() { return this._isValid; } function N2() { return bn(NaN); } function dc(e) { var t = Yh(e), r = t.year || 0, n = t.quarter || 0, a = t.month || 0, i = t.week || t.isoWeek || 0, o = t.day || 0, s = t.hour || 0, l = t.minute || 0, u = t.second || 0, c = t.millisecond || 0; this._isValid = M2(t), this._milliseconds = +c + u * 1e3 + l * 6e4 + s * 1e3 * 60 * 60, this._days = +o + i * 7, this._months = +a + n * 3 + r * 12, this._data = {}, this._locale = aa(), this._bubble(); } function ql(e) { return e instanceof dc; } function Xd(e) { return e < 0 ? Math.round(-1 * e) * -1 : Math.round(e); } function D2(e, t, r) { var n = Math.min(e.length, t.length), a = Math.abs(e.length - t.length), i = 0, o; for (o = 0; o < n; o++) (r && e[o] !== t[o] || !r && _t(e[o]) !== _t(t[o])) && i++; return i + a; } function vx(e, t) { Je(e, 0, 0, function() { var r = this.utcOffset(), n = "+"; return r < 0 && (r = -r, n = "-"), n + An(~~(r / 60), 2) + t + An(~~r % 60, 2); }); } vx("Z", ":"); vx("ZZ", ""); Ve("Z", uc); Ve("ZZ", uc); Ht(["Z", "ZZ"], function(e, t, r) { r._useUTC = !0, r._tzm = Qh(uc, e); }); var k2 = /([\+\-]|\d\d)/gi; function Qh(e, t) { var r = (t || "").match(e), n, a, i; return r === null ? null : (n = r[r.length - 1] || [], a = (n + "").match(k2) || ["-", 0, 0], i = +(a[1] * 60) + _t(a[2]), i === 0 ? 0 : a[0] === "+" ? i : -i); } function Jh(e, t) { var r, n; return t._isUTC ? (r = t.clone(), n = (hn(e) || cs(e) ? e.valueOf() : Kt(e).valueOf()) - r.valueOf(), r._d.setTime(r._d.valueOf() + n), te.updateOffset(r, !1), r) : Kt(e).local(); } function Zd(e) { return -Math.round(e._d.getTimezoneOffset()); } te.updateOffset = function() { }; function A2(e, t, r) { var n = this._offset || 0, a; if (!this.isValid()) return e != null ? this : NaN; if (e != null) { if (typeof e == "string") { if (e = Qh(uc, e), e === null) return this; } else Math.abs(e) < 16 && !r && (e = e * 60); return !this._isUTC && t && (a = Zd(this)), this._offset = e, this._isUTC = !0, a != null && this.add(a, "m"), n !== e && (!t || this._changeInProgress ? mx( this, bn(e - n, "m"), 1, !1 ) : this._changeInProgress || (this._changeInProgress = !0, te.updateOffset(this, !0), this._changeInProgress = null)), this; } else return this._isUTC ? n : Zd(this); } function I2(e, t) { return e != null ? (typeof e != "string" && (e = -e), this.utcOffset(e, t), this) : -this.utcOffset(); } function $2(e) { return this.utcOffset(0, e); } function F2(e) { return this._isUTC && (this.utcOffset(0, e), this._isUTC = !1, e && this.subtract(Zd(this), "m")), this; } function V2() { if (this._tzm != null) this.utcOffset(this._tzm, !1, !0); else if (typeof this._i == "string") { var e = Qh(iM, this._i); e != null ? this.utcOffset(e) : this.utcOffset(0, !0); } return this; } function L2(e) { return this.isValid() ? (e = e ? Kt(e).utcOffset() : 0, (this.utcOffset() - e) % 60 === 0) : !1; } function j2() { return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset(); } function W2() { if (!Nr(this._isDSTShifted)) return this._isDSTShifted; var e = {}, t; return Lh(e, this), e = cx(e), e._a ? (t = e._isUTC ? Fn(e._a) : Kt(e._a), this._isDSTShifted = this.isValid() && D2(e._a, t.toArray()) > 0) : this._isDSTShifted = !1, this._isDSTShifted; } function Y2() { return this.isValid() ? !this._isUTC : !1; } function z2() { return this.isValid() ? this._isUTC : !1; } function hx() { return this.isValid() ? this._isUTC && this._offset === 0 : !1; } var H2 = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, U2 = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; function bn(e, t) { var r = e, n = null, a, i, o; return ql(e) ? r = { ms: e._milliseconds, d: e._days, M: e._months } : ta(e) || !isNaN(+e) ? (r = {}, t ? r[t] = +e : r.milliseconds = +e) : (n = H2.exec(e)) ? (a = n[1] === "-" ? -1 : 1, r = { y: 0, d: _t(n[Mn]) * a, h: _t(n[cr]) * a, m: _t(n[cn]) * a, s: _t(n[Xn]) * a, ms: _t(Xd(n[qa] * 1e3)) * a }) : (n = U2.exec(e)) ? (a = n[1] === "-" ? -1 : 1, r = { y: Va(n[2], a), M: Va(n[3], a), w: Va(n[4], a), d: Va(n[5], a), h: Va(n[6], a), m: Va(n[7], a), s: Va(n[8], a) }) : r == null ? r = {} : typeof r == "object" && ("from" in r || "to" in r) && (o = q2( Kt(r.from), Kt(r.to) ), r = {}, r.ms = o.milliseconds, r.M = o.months), i = new dc(r), ql(e) && Nt(e, "_locale") && (i._locale = e._locale), ql(e) && Nt(e, "_isValid") && (i._isValid = e._isValid), i; } bn.fn = dc.prototype; bn.invalid = N2; function Va(e, t) { var r = e && parseFloat(e.replace(",", ".")); return (isNaN(r) ? 0 : r) * t; } function zg(e, t) { var r = {}; return r.months = t.month() - e.month() + (t.year() - e.year()) * 12, e.clone().add(r.months, "M").isAfter(t) && --r.months, r.milliseconds = +t - +e.clone().add(r.months, "M"), r; } function q2(e, t) { var r; return e.isValid() && t.isValid() ? (t = Jh(t, e), e.isBefore(t) ? r = zg(e, t) : (r = zg(t, e), r.milliseconds = -r.milliseconds, r.months = -r.months), r) : { milliseconds: 0, months: 0 }; } function px(e, t) { return function(r, n) { var a, i; return n !== null && !isNaN(+n) && (z_( t, "moment()." + t + "(period, number) is deprecated. Please use moment()." + t + "(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info." ), i = r, r = n, n = i), a = bn(r, n), mx(this, a, e), this