UNPKG

holiday-react-big-scheduler

Version:

A scheduler and resource planning component built for React and made for modern browsers (IE10+)

1,633 lines 4.71 MB
var __defProp = Object.defineProperty; var __defNormalProp = (obj, key2, value) => key2 in obj ? __defProp(obj, key2, { enumerable: true, configurable: true, writable: true, value }) : obj[key2] = value; var __publicField = (obj, key2, value) => { __defNormalProp(obj, typeof key2 !== "symbol" ? key2 + "" : key2, value); return value; }; import * as ReactDOM from "react-dom"; import ReactDOM__default, { findDOMNode as findDOMNode$1, createPortal } from "react-dom"; import { DragSource, DropTarget } from "react-dnd"; import { rrulestr, RRuleSet } from "rrule"; var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {}; function getDefaultExportFromCjs(x2) { return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2; } function getAugmentedNamespace(n2) { if (n2.__esModule) return n2; var f2 = n2.default; if (typeof f2 == "function") { var a = function a2() { if (this instanceof a2) { var args = [null]; args.push.apply(args, arguments); var Ctor = Function.bind.apply(f2, args); return new Ctor(); } return f2.apply(this, arguments); }; a.prototype = f2.prototype; } else a = {}; Object.defineProperty(a, "__esModule", { value: true }); Object.keys(n2).forEach(function(k2) { var d2 = Object.getOwnPropertyDescriptor(n2, k2); Object.defineProperty(a, k2, d2.get ? d2 : { enumerable: true, get: function() { return n2[k2]; } }); }); return a; } var reactExports = {}; var react = { get exports() { return reactExports; }, set exports(v2) { reactExports = v2; } }; var react_production_min = {}; /* object-assign (c) Sindre Sorhus @license MIT */ var getOwnPropertySymbols$1 = Object.getOwnPropertySymbols; var hasOwnProperty$1 = Object.prototype.hasOwnProperty; var propIsEnumerable = Object.prototype.propertyIsEnumerable; function toObject$2(val) { if (val === null || val === void 0) { throw new TypeError("Object.assign cannot be called with null or undefined"); } return Object(val); } function shouldUseNative() { try { if (!Object.assign) { return false; } var test1 = new String("abc"); test1[5] = "de"; if (Object.getOwnPropertyNames(test1)[0] === "5") { return false; } var test2 = {}; for (var i = 0; i < 10; i++) { test2["_" + String.fromCharCode(i)] = i; } var order2 = Object.getOwnPropertyNames(test2).map(function(n2) { return test2[n2]; }); if (order2.join("") !== "0123456789") { return false; } var test3 = {}; "abcdefghijklmnopqrst".split("").forEach(function(letter) { test3[letter] = letter; }); if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") { return false; } return true; } catch (err) { return false; } } var objectAssign = shouldUseNative() ? Object.assign : function(target2, source) { var from2; var to2 = toObject$2(target2); var symbols; for (var s = 1; s < arguments.length; s++) { from2 = Object(arguments[s]); for (var key2 in from2) { if (hasOwnProperty$1.call(from2, key2)) { to2[key2] = from2[key2]; } } if (getOwnPropertySymbols$1) { symbols = getOwnPropertySymbols$1(from2); for (var i = 0; i < symbols.length; i++) { if (propIsEnumerable.call(from2, symbols[i])) { to2[symbols[i]] = from2[symbols[i]]; } } } } return to2; }; /** @license React v16.14.0 * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var l$1 = objectAssign, n$1 = "function" === typeof Symbol && Symbol.for, p$1 = n$1 ? Symbol.for("react.element") : 60103, q$1 = n$1 ? Symbol.for("react.portal") : 60106, r$1 = n$1 ? Symbol.for("react.fragment") : 60107, t$1 = n$1 ? Symbol.for("react.strict_mode") : 60108, u = n$1 ? Symbol.for("react.profiler") : 60114, v$1 = n$1 ? Symbol.for("react.provider") : 60109, w$1 = n$1 ? Symbol.for("react.context") : 60110, x$1 = n$1 ? Symbol.for("react.forward_ref") : 60112, y$1 = n$1 ? Symbol.for("react.suspense") : 60113, z$1 = n$1 ? Symbol.for("react.memo") : 60115, A$1 = n$1 ? Symbol.for("react.lazy") : 60116, B = "function" === typeof Symbol && Symbol.iterator; function C(a) { for (var b2 = "https://reactjs.org/docs/error-decoder.html?invariant=" + a, c2 = 1; c2 < arguments.length; c2++) b2 += "&args[]=" + encodeURIComponent(arguments[c2]); return "Minified React error #" + a + "; visit " + b2 + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings."; } var D = { isMounted: function() { return false; }, enqueueForceUpdate: function() { }, enqueueReplaceState: function() { }, enqueueSetState: function() { } }, E = {}; function F(a, b2, c2) { this.props = a; this.context = b2; this.refs = E; this.updater = c2 || D; } F.prototype.isReactComponent = {}; F.prototype.setState = function(a, b2) { if ("object" !== typeof a && "function" !== typeof a && null != a) throw Error(C(85)); this.updater.enqueueSetState(this, a, b2, "setState"); }; F.prototype.forceUpdate = function(a) { this.updater.enqueueForceUpdate(this, a, "forceUpdate"); }; function G() { } G.prototype = F.prototype; function H(a, b2, c2) { this.props = a; this.context = b2; this.refs = E; this.updater = c2 || D; } var I = H.prototype = new G(); I.constructor = H; l$1(I, F.prototype); I.isPureReactComponent = true; var J = { current: null }, K = Object.prototype.hasOwnProperty, L = { key: true, ref: true, __self: true, __source: true }; function M(a, b2, c2) { var e2, d2 = {}, g2 = null, k2 = null; if (null != b2) for (e2 in void 0 !== b2.ref && (k2 = b2.ref), void 0 !== b2.key && (g2 = "" + b2.key), b2) K.call(b2, e2) && !L.hasOwnProperty(e2) && (d2[e2] = b2[e2]); var f2 = arguments.length - 2; if (1 === f2) d2.children = c2; else if (1 < f2) { for (var h2 = Array(f2), m2 = 0; m2 < f2; m2++) h2[m2] = arguments[m2 + 2]; d2.children = h2; } if (a && a.defaultProps) for (e2 in f2 = a.defaultProps, f2) void 0 === d2[e2] && (d2[e2] = f2[e2]); return { $$typeof: p$1, type: a, key: g2, ref: k2, props: d2, _owner: J.current }; } function N(a, b2) { return { $$typeof: p$1, type: a.type, key: b2, ref: a.ref, props: a.props, _owner: a._owner }; } function O(a) { return "object" === typeof a && null !== a && a.$$typeof === p$1; } function escape(a) { var b2 = { "=": "=0", ":": "=2" }; return "$" + ("" + a).replace(/[=:]/g, function(a2) { return b2[a2]; }); } var P = /\/+/g, Q = []; function R(a, b2, c2, e2) { if (Q.length) { var d2 = Q.pop(); d2.result = a; d2.keyPrefix = b2; d2.func = c2; d2.context = e2; d2.count = 0; return d2; } return { result: a, keyPrefix: b2, func: c2, context: e2, count: 0 }; } function S(a) { a.result = null; a.keyPrefix = null; a.func = null; a.context = null; a.count = 0; 10 > Q.length && Q.push(a); } function T(a, b2, c2, e2) { var d2 = typeof a; if ("undefined" === d2 || "boolean" === d2) a = null; var g2 = false; if (null === a) g2 = true; else switch (d2) { case "string": case "number": g2 = true; break; case "object": switch (a.$$typeof) { case p$1: case q$1: g2 = true; } } if (g2) return c2(e2, a, "" === b2 ? "." + U(a, 0) : b2), 1; g2 = 0; b2 = "" === b2 ? "." : b2 + ":"; if (Array.isArray(a)) for (var k2 = 0; k2 < a.length; k2++) { d2 = a[k2]; var f2 = b2 + U(d2, k2); g2 += T(d2, f2, c2, e2); } else if (null === a || "object" !== typeof a ? f2 = null : (f2 = B && a[B] || a["@@iterator"], f2 = "function" === typeof f2 ? f2 : null), "function" === typeof f2) for (a = f2.call(a), k2 = 0; !(d2 = a.next()).done; ) d2 = d2.value, f2 = b2 + U(d2, k2++), g2 += T(d2, f2, c2, e2); else if ("object" === d2) throw c2 = "" + a, Error(C(31, "[object Object]" === c2 ? "object with keys {" + Object.keys(a).join(", ") + "}" : c2, "")); return g2; } function V(a, b2, c2) { return null == a ? 0 : T(a, "", b2, c2); } function U(a, b2) { return "object" === typeof a && null !== a && null != a.key ? escape(a.key) : b2.toString(36); } function W(a, b2) { a.func.call(a.context, b2, a.count++); } function aa(a, b2, c2) { var e2 = a.result, d2 = a.keyPrefix; a = a.func.call(a.context, b2, a.count++); Array.isArray(a) ? X(a, e2, c2, function(a2) { return a2; }) : null != a && (O(a) && (a = N(a, d2 + (!a.key || b2 && b2.key === a.key ? "" : ("" + a.key).replace(P, "$&/") + "/") + c2)), e2.push(a)); } function X(a, b2, c2, e2, d2) { var g2 = ""; null != c2 && (g2 = ("" + c2).replace(P, "$&/") + "/"); b2 = R(b2, g2, e2, d2); V(a, aa, b2); S(b2); } var Y = { current: null }; function Z() { var a = Y.current; if (null === a) throw Error(C(321)); return a; } var ba = { ReactCurrentDispatcher: Y, ReactCurrentBatchConfig: { suspense: null }, ReactCurrentOwner: J, IsSomeRendererActing: { current: false }, assign: l$1 }; react_production_min.Children = { map: function(a, b2, c2) { if (null == a) return a; var e2 = []; X(a, e2, null, b2, c2); return e2; }, forEach: function(a, b2, c2) { if (null == a) return a; b2 = R(null, null, b2, c2); V(a, W, b2); S(b2); }, count: function(a) { return V(a, function() { return null; }, null); }, toArray: function(a) { var b2 = []; X(a, b2, null, function(a2) { return a2; }); return b2; }, only: function(a) { if (!O(a)) throw Error(C(143)); return a; } }; react_production_min.Component = F; react_production_min.Fragment = r$1; react_production_min.Profiler = u; react_production_min.PureComponent = H; react_production_min.StrictMode = t$1; react_production_min.Suspense = y$1; react_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ba; react_production_min.cloneElement = function(a, b2, c2) { if (null === a || void 0 === a) throw Error(C(267, a)); var e2 = l$1({}, a.props), d2 = a.key, g2 = a.ref, k2 = a._owner; if (null != b2) { void 0 !== b2.ref && (g2 = b2.ref, k2 = J.current); void 0 !== b2.key && (d2 = "" + b2.key); if (a.type && a.type.defaultProps) var f2 = a.type.defaultProps; for (h2 in b2) K.call(b2, h2) && !L.hasOwnProperty(h2) && (e2[h2] = void 0 === b2[h2] && void 0 !== f2 ? f2[h2] : b2[h2]); } var h2 = arguments.length - 2; if (1 === h2) e2.children = c2; else if (1 < h2) { f2 = Array(h2); for (var m2 = 0; m2 < h2; m2++) f2[m2] = arguments[m2 + 2]; e2.children = f2; } return { $$typeof: p$1, type: a.type, key: d2, ref: g2, props: e2, _owner: k2 }; }; react_production_min.createContext = function(a, b2) { void 0 === b2 && (b2 = null); a = { $$typeof: w$1, _calculateChangedBits: b2, _currentValue: a, _currentValue2: a, _threadCount: 0, Provider: null, Consumer: null }; a.Provider = { $$typeof: v$1, _context: a }; return a.Consumer = a; }; react_production_min.createElement = M; react_production_min.createFactory = function(a) { var b2 = M.bind(null, a); b2.type = a; return b2; }; react_production_min.createRef = function() { return { current: null }; }; react_production_min.forwardRef = function(a) { return { $$typeof: x$1, render: a }; }; react_production_min.isValidElement = O; react_production_min.lazy = function(a) { return { $$typeof: A$1, _ctor: a, _status: -1, _result: null }; }; react_production_min.memo = function(a, b2) { return { $$typeof: z$1, type: a, compare: void 0 === b2 ? null : b2 }; }; react_production_min.useCallback = function(a, b2) { return Z().useCallback(a, b2); }; react_production_min.useContext = function(a, b2) { return Z().useContext(a, b2); }; react_production_min.useDebugValue = function() { }; react_production_min.useEffect = function(a, b2) { return Z().useEffect(a, b2); }; react_production_min.useImperativeHandle = function(a, b2, c2) { return Z().useImperativeHandle(a, b2, c2); }; react_production_min.useLayoutEffect = function(a, b2) { return Z().useLayoutEffect(a, b2); }; react_production_min.useMemo = function(a, b2) { return Z().useMemo(a, b2); }; react_production_min.useReducer = function(a, b2, c2) { return Z().useReducer(a, b2, c2); }; react_production_min.useRef = function(a) { return Z().useRef(a); }; react_production_min.useState = function(a) { return Z().useState(a); }; react_production_min.version = "16.14.0"; (function(module2) { { module2.exports = react_production_min; } })(react); const React = /* @__PURE__ */ getDefaultExportFromCjs(reactExports); var propTypesExports = {}; var propTypes = { get exports() { return propTypesExports; }, set exports(v2) { propTypesExports = v2; } }; var ReactPropTypesSecret$1 = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"; var ReactPropTypesSecret_1 = ReactPropTypesSecret$1; var ReactPropTypesSecret = ReactPropTypesSecret_1; function emptyFunction() { } function emptyFunctionWithReset() { } emptyFunctionWithReset.resetWarningCache = emptyFunction; var factoryWithThrowingShims = function() { function shim(props, propName, componentName, location, propFullName, secret) { if (secret === ReactPropTypesSecret) { return; } var err = new Error( "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types" ); err.name = "Invariant Violation"; throw err; } shim.isRequired = shim; function getShim() { return shim; } var ReactPropTypes = { array: shim, bigint: shim, bool: shim, func: shim, number: shim, object: shim, string: shim, symbol: shim, any: shim, arrayOf: getShim, element: shim, elementType: shim, instanceOf: getShim, node: shim, objectOf: getShim, oneOf: getShim, oneOfType: getShim, shape: getShim, exact: getShim, checkPropTypes: emptyFunctionWithReset, resetWarningCache: emptyFunction }; ReactPropTypes.PropTypes = ReactPropTypes; return ReactPropTypes; }; { propTypes.exports = factoryWithThrowingShims(); } var col$1 = {}; var grid = {}; var row$1 = {}; var classnamesExports = {}; var classnames$1 = { get exports() { return classnamesExports; }, set exports(v2) { classnamesExports = v2; } }; /*! Copyright (c) 2017 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ (function(module2) { (function() { var hasOwn = {}.hasOwnProperty; function classNames() { var classes = []; for (var i = 0; i < arguments.length; i++) { var arg = arguments[i]; if (!arg) continue; var argType = typeof arg; if (argType === "string" || argType === "number") { classes.push(arg); } else if (Array.isArray(arg) && arg.length) { var inner = classNames.apply(null, arg); if (inner) { classes.push(inner); } } else if (argType === "object") { for (var key2 in arg) { if (hasOwn.call(arg, key2) && arg[key2]) { classes.push(key2); } } } } return classes.join(" "); } if (module2.exports) { classNames.default = classNames; module2.exports = classNames; } else { window.classNames = classNames; } })(); })(classnames$1); const classnames = classnamesExports; var configProvider = {}; var localeProvider = {}; //! moment.js //! version : 2.29.4 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! license : MIT //! momentjs.com var hookCallback; function hooks() { return hookCallback.apply(null, arguments); } function setHookCallback(callback) { hookCallback = callback; } function isArray$1(input) { return input instanceof Array || Object.prototype.toString.call(input) === "[object Array]"; } function isObject$4(input) { return input != null && Object.prototype.toString.call(input) === "[object Object]"; } function hasOwnProp(a, b2) { return Object.prototype.hasOwnProperty.call(a, b2); } function isObjectEmpty(obj) { if (Object.getOwnPropertyNames) { return Object.getOwnPropertyNames(obj).length === 0; } else { var k2; for (k2 in obj) { if (hasOwnProp(obj, k2)) { return false; } } return true; } } function isUndefined(input) { return input === void 0; } function isNumber(input) { return typeof input === "number" || Object.prototype.toString.call(input) === "[object Number]"; } function isDate(input) { return input instanceof Date || Object.prototype.toString.call(input) === "[object Date]"; } function map(arr, fn) { var res = [], i, arrLen = arr.length; for (i = 0; i < arrLen; ++i) { res.push(fn(arr[i], i)); } return res; } function extend(a, b2) { for (var i in b2) { if (hasOwnProp(b2, i)) { a[i] = b2[i]; } } if (hasOwnProp(b2, "toString")) { a.toString = b2.toString; } if (hasOwnProp(b2, "valueOf")) { a.valueOf = b2.valueOf; } return a; } function createUTC(input, format2, locale2, strict) { return createLocalOrUTC(input, format2, locale2, strict, true).utc(); } function defaultParsingFlags() { return { empty: false, unusedTokens: [], unusedInput: [], overflow: -2, charsLeftOver: 0, nullInput: false, invalidEra: null, invalidMonth: null, invalidFormat: false, userInvalidated: false, iso: false, parsedDateParts: [], era: null, meridiem: null, rfc2822: false, weekdayMismatch: false }; } function getParsingFlags(m2) { if (m2._pf == null) { m2._pf = defaultParsingFlags(); } return m2._pf; } var some; if (Array.prototype.some) { some = Array.prototype.some; } else { some = function(fun) { var t2 = Object(this), len = t2.length >>> 0, i; for (i = 0; i < len; i++) { if (i in t2 && fun.call(this, t2[i], i, t2)) { return true; } } return false; }; } function isValid(m2) { if (m2._isValid == null) { var flags = getParsingFlags(m2), parsedParts = some.call(flags.parsedDateParts, function(i) { return i != null; }), isNowValid = !isNaN(m2._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidEra && !flags.invalidMonth && !flags.invalidWeekday && !flags.weekdayMismatch && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || flags.meridiem && parsedParts); if (m2._strict) { isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === void 0; } if (Object.isFrozen == null || !Object.isFrozen(m2)) { m2._isValid = isNowValid; } else { return isNowValid; } } return m2._isValid; } function createInvalid(flags) { var m2 = createUTC(NaN); if (flags != null) { extend(getParsingFlags(m2), flags); } else { getParsingFlags(m2).userInvalidated = true; } return m2; } var momentProperties = hooks.momentProperties = [], updateInProgress = false; function copyConfig(to2, from2) { var i, prop, val, momentPropertiesLen = momentProperties.length; if (!isUndefined(from2._isAMomentObject)) { to2._isAMomentObject = from2._isAMomentObject; } if (!isUndefined(from2._i)) { to2._i = from2._i; } if (!isUndefined(from2._f)) { to2._f = from2._f; } if (!isUndefined(from2._l)) { to2._l = from2._l; } if (!isUndefined(from2._strict)) { to2._strict = from2._strict; } if (!isUndefined(from2._tzm)) { to2._tzm = from2._tzm; } if (!isUndefined(from2._isUTC)) { to2._isUTC = from2._isUTC; } if (!isUndefined(from2._offset)) { to2._offset = from2._offset; } if (!isUndefined(from2._pf)) { to2._pf = getParsingFlags(from2); } if (!isUndefined(from2._locale)) { to2._locale = from2._locale; } if (momentPropertiesLen > 0) { for (i = 0; i < momentPropertiesLen; i++) { prop = momentProperties[i]; val = from2[prop]; if (!isUndefined(val)) { to2[prop] = val; } } } return to2; } function Moment(config2) { copyConfig(this, config2); this._d = new Date(config2._d != null ? config2._d.getTime() : NaN); if (!this.isValid()) { this._d = new Date(NaN); } if (updateInProgress === false) { updateInProgress = true; hooks.updateOffset(this); updateInProgress = false; } } function isMoment(obj) { return obj instanceof Moment || obj != null && obj._isAMomentObject != null; } function warn(msg) { if (hooks.suppressDeprecationWarnings === false && typeof console !== "undefined" && console.warn) { console.warn("Deprecation warning: " + msg); } } function deprecate(msg, fn) { var firstTime = true; return extend(function() { if (hooks.deprecationHandler != null) { hooks.deprecationHandler(null, msg); } if (firstTime) { var args = [], arg, i, key2, argLen = arguments.length; for (i = 0; i < argLen; i++) { arg = ""; if (typeof arguments[i] === "object") { arg += "\n[" + i + "] "; for (key2 in arguments[0]) { if (hasOwnProp(arguments[0], key2)) { arg += key2 + ": " + arguments[0][key2] + ", "; } } arg = arg.slice(0, -2); } else { arg = arguments[i]; } args.push(arg); } warn( msg + "\nArguments: " + Array.prototype.slice.call(args).join("") + "\n" + new Error().stack ); firstTime = false; } return fn.apply(this, arguments); }, fn); } var deprecations = {}; function deprecateSimple(name, msg) { if (hooks.deprecationHandler != null) { hooks.deprecationHandler(name, msg); } if (!deprecations[name]) { warn(msg); deprecations[name] = true; } } hooks.suppressDeprecationWarnings = false; hooks.deprecationHandler = null; function isFunction(input) { return typeof Function !== "undefined" && input instanceof Function || Object.prototype.toString.call(input) === "[object Function]"; } function set(config2) { var prop, i; for (i in config2) { if (hasOwnProp(config2, i)) { prop = config2[i]; if (isFunction(prop)) { this[i] = prop; } else { this["_" + i] = prop; } } } this._config = config2; this._dayOfMonthOrdinalParseLenient = new RegExp( (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + "|" + /\d{1,2}/.source ); } function mergeConfigs(parentConfig, childConfig) { var res = extend({}, parentConfig), prop; for (prop in childConfig) { if (hasOwnProp(childConfig, prop)) { if (isObject$4(parentConfig[prop]) && isObject$4(childConfig[prop])) { res[prop] = {}; extend(res[prop], parentConfig[prop]); extend(res[prop], childConfig[prop]); } else if (childConfig[prop] != null) { res[prop] = childConfig[prop]; } else { delete res[prop]; } } } for (prop in parentConfig) { if (hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject$4(parentConfig[prop])) { res[prop] = extend({}, res[prop]); } } return res; } function Locale(config2) { if (config2 != null) { this.set(config2); } } var keys; if (Object.keys) { keys = Object.keys; } else { keys = function(obj) { var i, res = []; for (i in obj) { if (hasOwnProp(obj, i)) { res.push(i); } } return res; }; } var defaultCalendar = { sameDay: "[Today at] LT", nextDay: "[Tomorrow at] LT", nextWeek: "dddd [at] LT", lastDay: "[Yesterday at] LT", lastWeek: "[Last] dddd [at] LT", sameElse: "L" }; function calendar$1(key2, mom, now2) { var output = this._calendar[key2] || this._calendar["sameElse"]; return isFunction(output) ? output.call(mom, now2) : output; } function zeroFill(number, targetLength, forceSign) { var absNumber = "" + Math.abs(number), zerosToFill = targetLength - absNumber.length, sign2 = number >= 0; return (sign2 ? forceSign ? "+" : "" : "-") + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber; } var formattingTokens = /(\[[^\[]*\])|(\\)?([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, localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, formatFunctions = {}, formatTokenFunctions = {}; function addFormatToken(token2, padded, ordinal2, callback) { var func = callback; if (typeof callback === "string") { func = function() { return this[callback](); }; } if (token2) { formatTokenFunctions[token2] = func; } if (padded) { formatTokenFunctions[padded[0]] = function() { return zeroFill(func.apply(this, arguments), padded[1], padded[2]); }; } if (ordinal2) { formatTokenFunctions[ordinal2] = function() { return this.localeData().ordinal( func.apply(this, arguments), token2 ); }; } } function removeFormattingTokens(input) { if (input.match(/\[[\s\S]/)) { return input.replace(/^\[|\]$/g, ""); } return input.replace(/\\/g, ""); } function makeFormatFunction(format2) { var array = format2.match(formattingTokens), i, length; for (i = 0, length = array.length; i < length; i++) { if (formatTokenFunctions[array[i]]) { array[i] = formatTokenFunctions[array[i]]; } else { array[i] = removeFormattingTokens(array[i]); } } return function(mom) { var output = "", i2; for (i2 = 0; i2 < length; i2++) { output += isFunction(array[i2]) ? array[i2].call(mom, format2) : array[i2]; } return output; }; } function formatMoment(m2, format2) { if (!m2.isValid()) { return m2.localeData().invalidDate(); } format2 = expandFormat(format2, m2.localeData()); formatFunctions[format2] = formatFunctions[format2] || makeFormatFunction(format2); return formatFunctions[format2](m2); } function expandFormat(format2, locale2) { var i = 5; function replaceLongDateFormatTokens(input) { return locale2.longDateFormat(input) || input; } localFormattingTokens.lastIndex = 0; while (i >= 0 && localFormattingTokens.test(format2)) { format2 = format2.replace( localFormattingTokens, replaceLongDateFormatTokens ); localFormattingTokens.lastIndex = 0; i -= 1; } return format2; } var defaultLongDateFormat = { 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 longDateFormat(key2) { var format2 = this._longDateFormat[key2], formatUpper = this._longDateFormat[key2.toUpperCase()]; if (format2 || !formatUpper) { return format2; } this._longDateFormat[key2] = formatUpper.match(formattingTokens).map(function(tok) { if (tok === "MMMM" || tok === "MM" || tok === "DD" || tok === "dddd") { return tok.slice(1); } return tok; }).join(""); return this._longDateFormat[key2]; } var defaultInvalidDate = "Invalid date"; function invalidDate() { return this._invalidDate; } var defaultOrdinal = "%d", defaultDayOfMonthOrdinalParse = /\d{1,2}/; function ordinal(number) { return this._ordinal.replace("%d", number); } var defaultRelativeTime = { 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 relativeTime(number, withoutSuffix, string, isFuture) { var output = this._relativeTime[string]; return isFunction(output) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number); } function pastFuture(diff2, output) { var format2 = this._relativeTime[diff2 > 0 ? "future" : "past"]; return isFunction(format2) ? format2(output) : format2.replace(/%s/i, output); } var aliases = {}; function addUnitAlias(unit, shorthand) { var lowerCase = unit.toLowerCase(); aliases[lowerCase] = aliases[lowerCase + "s"] = aliases[shorthand] = unit; } function normalizeUnits(units) { return typeof units === "string" ? aliases[units] || aliases[units.toLowerCase()] : void 0; } function normalizeObjectUnits(inputObject) { var normalizedInput = {}, normalizedProp, prop; for (prop in inputObject) { if (hasOwnProp(inputObject, prop)) { normalizedProp = normalizeUnits(prop); if (normalizedProp) { normalizedInput[normalizedProp] = inputObject[prop]; } } } return normalizedInput; } var priorities = {}; function addUnitPriority(unit, priority) { priorities[unit] = priority; } function getPrioritizedUnits(unitsObj) { var units = [], u2; for (u2 in unitsObj) { if (hasOwnProp(unitsObj, u2)) { units.push({ unit: u2, priority: priorities[u2] }); } } units.sort(function(a, b2) { return a.priority - b2.priority; }); return units; } function isLeapYear(year) { return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0; } function absFloor(number) { if (number < 0) { return Math.ceil(number) || 0; } else { return Math.floor(number); } } function toInt(argumentForCoercion) { var coercedNumber = +argumentForCoercion, value = 0; if (coercedNumber !== 0 && isFinite(coercedNumber)) { value = absFloor(coercedNumber); } return value; } function makeGetSet(unit, keepTime) { return function(value) { if (value != null) { set$1(this, unit, value); hooks.updateOffset(this, keepTime); return this; } else { return get(this, unit); } }; } function get(mom, unit) { return mom.isValid() ? mom._d["get" + (mom._isUTC ? "UTC" : "") + unit]() : NaN; } function set$1(mom, unit, value) { if (mom.isValid() && !isNaN(value)) { if (unit === "FullYear" && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) { value = toInt(value); mom._d["set" + (mom._isUTC ? "UTC" : "") + unit]( value, mom.month(), daysInMonth(value, mom.month()) ); } else { mom._d["set" + (mom._isUTC ? "UTC" : "") + unit](value); } } } function stringGet(units) { units = normalizeUnits(units); if (isFunction(this[units])) { return this[units](); } return this; } function stringSet(units, value) { if (typeof units === "object") { units = normalizeObjectUnits(units); var prioritized = getPrioritizedUnits(units), i, prioritizedLen = prioritized.length; for (i = 0; i < prioritizedLen; i++) { this[prioritized[i].unit](units[prioritized[i].unit]); } } else { units = normalizeUnits(units); if (isFunction(this[units])) { return this[units](value); } } return this; } var match1 = /\d/, match2 = /\d\d/, match3 = /\d{3}/, match4 = /\d{4}/, match6 = /[+-]?\d{6}/, match1to2 = /\d\d?/, match3to4 = /\d\d\d\d?/, match5to6 = /\d\d\d\d\d\d?/, match1to3 = /\d{1,3}/, match1to4 = /\d{1,4}/, match1to6 = /[+-]?\d{1,6}/, matchUnsigned = /\d+/, matchSigned = /[+-]?\d+/, matchOffset = /Z|[+-]\d\d:?\d\d/gi, matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, matchWord = /[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, regexes; regexes = {}; function addRegexToken(token2, regex, strictRegex) { regexes[token2] = isFunction(regex) ? regex : function(isStrict, localeData2) { return isStrict && strictRegex ? strictRegex : regex; }; } function getParseRegexForToken(token2, config2) { if (!hasOwnProp(regexes, token2)) { return new RegExp(unescapeFormat(token2)); } return regexes[token2](config2._strict, config2._locale); } function unescapeFormat(s) { return regexEscape( s.replace("\\", "").replace( /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function(matched, p1, p2, p3, p4) { return p1 || p2 || p3 || p4; } ) ); } function regexEscape(s) { return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"); } var tokens = {}; function addParseToken(token2, callback) { var i, func = callback, tokenLen; if (typeof token2 === "string") { token2 = [token2]; } if (isNumber(callback)) { func = function(input, array) { array[callback] = toInt(input); }; } tokenLen = token2.length; for (i = 0; i < tokenLen; i++) { tokens[token2[i]] = func; } } function addWeekParseToken(token2, callback) { addParseToken(token2, function(input, array, config2, token3) { config2._w = config2._w || {}; callback(input, config2._w, config2, token3); }); } function addTimeToArrayFromToken(token2, input, config2) { if (input != null && hasOwnProp(tokens, token2)) { tokens[token2](input, config2._a, config2, token2); } } var YEAR = 0, MONTH = 1, DATE = 2, HOUR = 3, MINUTE = 4, SECOND = 5, MILLISECOND = 6, WEEK = 7, WEEKDAY = 8; function mod(n2, x2) { return (n2 % x2 + x2) % x2; } var indexOf; if (Array.prototype.indexOf) { indexOf = Array.prototype.indexOf; } else { indexOf = function(o) { var i; for (i = 0; i < this.length; ++i) { if (this[i] === o) { return i; } } return -1; }; } function daysInMonth(year, month) { if (isNaN(year) || isNaN(month)) { return NaN; } var modMonth = mod(month, 12); year += (month - modMonth) / 12; return modMonth === 1 ? isLeapYear(year) ? 29 : 28 : 31 - modMonth % 7 % 2; } addFormatToken("M", ["MM", 2], "Mo", function() { return this.month() + 1; }); addFormatToken("MMM", 0, 0, function(format2) { return this.localeData().monthsShort(this, format2); }); addFormatToken("MMMM", 0, 0, function(format2) { return this.localeData().months(this, format2); }); addUnitAlias("month", "M"); addUnitPriority("month", 8); addRegexToken("M", match1to2); addRegexToken("MM", match1to2, match2); addRegexToken("MMM", function(isStrict, locale2) { return locale2.monthsShortRegex(isStrict); }); addRegexToken("MMMM", function(isStrict, locale2) { return locale2.monthsRegex(isStrict); }); addParseToken(["M", "MM"], function(input, array) { array[MONTH] = toInt(input) - 1; }); addParseToken(["MMM", "MMMM"], function(input, array, config2, token2) { var month = config2._locale.monthsParse(input, token2, config2._strict); if (month != null) { array[MONTH] = month; } else { getParsingFlags(config2).invalidMonth = input; } }); var defaultLocaleMonths = "January_February_March_April_May_June_July_August_September_October_November_December".split( "_" ), defaultLocaleMonthsShort = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, defaultMonthsShortRegex = matchWord, defaultMonthsRegex = matchWord; function localeMonths(m2, format2) { if (!m2) { return isArray$1(this._months) ? this._months : this._months["standalone"]; } return isArray$1(this._months) ? this._months[m2.month()] : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format2) ? "format" : "standalone"][m2.month()]; } function localeMonthsShort(m2, format2) { if (!m2) { return isArray$1(this._monthsShort) ? this._monthsShort : this._monthsShort["standalone"]; } return isArray$1(this._monthsShort) ? this._monthsShort[m2.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format2) ? "format" : "standalone"][m2.month()]; } function handleStrictParse(monthName, format2, strict) { var i, ii, mom, llc = monthName.toLocaleLowerCase(); if (!this._monthsParse) { this._monthsParse = []; this._longMonthsParse = []; this._shortMonthsParse = []; for (i = 0; i < 12; ++i) { mom = createUTC([2e3, i]); this._shortMonthsParse[i] = this.monthsShort( mom, "" ).toLocaleLowerCase(); this._longMonthsParse[i] = this.months(mom, "").toLocaleLowerCase(); } } if (strict) { if (format2 === "MMM") { ii = indexOf.call(this._shortMonthsParse, llc); return ii !== -1 ? ii : null; } else { ii = indexOf.call(this._longMonthsParse, llc); return ii !== -1 ? ii : null; } } else { if (format2 === "MMM") { ii = indexOf.call(this._shortMonthsParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._longMonthsParse, llc); return ii !== -1 ? ii : null; } else { ii = indexOf.call(this._longMonthsParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._shortMonthsParse, llc); return ii !== -1 ? ii : null; } } } function localeMonthsParse(monthName, format2, strict) { var i, mom, regex; if (this._monthsParseExact) { return handleStrictParse.call(this, monthName, format2, strict); } if (!this._monthsParse) { this._monthsParse = []; this._longMonthsParse = []; this._shortMonthsParse = []; } for (i = 0; i < 12; i++) { mom = createUTC([2e3, i]); if (strict && !this._longMonthsParse[i]) { this._longMonthsParse[i] = new RegExp( "^" + this.months(mom, "").replace(".", "") + "$", "i" ); this._shortMonthsParse[i] = new RegExp( "^" + this.monthsShort(mom, "").replace(".", "") + "$", "i" ); } if (!strict && !this._monthsParse[i]) { regex = "^" + this.months(mom, "") + "|^" + this.monthsShort(mom, ""); this._monthsParse[i] = new RegExp(regex.replace(".", ""), "i"); } if (strict && format2 === "MMMM" && this._longMonthsParse[i].test(monthName)) { return i; } else if (strict && format2 === "MMM" && this._shortMonthsParse[i].test(monthName)) { return i; } else if (!strict && this._monthsParse[i].test(monthName)) { return i; } } } function setMonth(mom, value) { var dayOfMonth; if (!mom.isValid()) { return mom; } if (typeof value === "string") { if (/^\d+$/.test(value)) { value = toInt(value); } else { value = mom.localeData().monthsParse(value); if (!isNumber(value)) { return mom; } } } dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); mom._d["set" + (mom._isUTC ? "UTC" : "") + "Month"](value, dayOfMonth); return mom; } function getSetMonth(value) { if (value != null) { setMonth(this, value); hooks.updateOffset(this, true); return this; } else { return get(this, "Month"); } } function getDaysInMonth() { return daysInMonth(this.year(), this.month()); } function monthsShortRegex(isStrict) { if (this._monthsParseExact) { if (!hasOwnProp(this, "_monthsRegex")) { computeMonthsParse.call(this); } if (isStrict) { return this._monthsShortStrictRegex; } else { return this._monthsShortRegex; } } else { if (!hasOwnProp(this, "_monthsShortRegex")) { this._monthsShortRegex = defaultMonthsShortRegex; } return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex; } } function monthsRegex(isStrict) { if (this._monthsParseExact) { if (!hasOwnProp(this, "_monthsRegex")) { computeMonthsParse.call(this); } if (isStrict) { return this._monthsStrictRegex; } else { return this._monthsRegex; } } else { if (!hasOwnProp(this, "_monthsRegex")) { this._monthsRegex = defaultMonthsRegex; } return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex; } } function computeMonthsParse() { function cmpLenRev(a, b2) { return b2.length - a.length; } var shortPieces = [], longPieces = [], mixedPieces = [], i, mom; for (i = 0; i < 12; i++) { mom = createUTC([2e3, i]); shortPieces.push(this.monthsShort(mom, "")); longPieces.push(this.months(mom, "")); mixedPieces.push(this.months(mom, "")); mixedPieces.push(this.monthsShort(mom, "")); } shortPieces.sort(cmpLenRev); longPieces.sort(cmpLenRev); mixedPieces.sort(cmpLenRev); for (i = 0; i < 12; i++) { shortPieces[i] = regexEscape(shortPieces[i]); longPieces[i] = regexEscape(longPieces[i]); } for (i = 0; i < 24; i++) { mixedPieces[i] = regexEscape(mixedPieces[i]); } this._monthsRegex = new RegExp("^(" + mixedPieces.join("|") + ")", "i"); this._monthsShortRegex = this._monthsRegex; this._monthsStrictRegex = new RegExp( "^(" + longPieces.join("|") + ")", "i" ); this._monthsShortStrictRegex = new RegExp( "^(" + shortPieces.join("|") + ")", "i" ); } addFormatToken("Y", 0, 0, function() { var y2 = this.year(); return y2 <= 9999 ? zeroFill(y2, 4) : "+" + y2; }); addFormatToken(0, ["YY", 2], 0, function() { return this.year() % 100; }); addFormatToken(0, ["YYYY", 4], 0, "year"); addFormatToken(0, ["YYYYY", 5], 0, "year"); addFormatToken(0, ["YYYYYY", 6, true], 0, "year"); addUnitAlias("year", "y"); addUnitPriority("year", 1); addRegexToken("Y", matchSigned); addRegexToken("YY", match1to2, match2); addRegexToken("YYYY", match1to4, match4); addRegexToken("YYYYY", match1to6, match6); addRegexToken("YYYYYY", match1to6, match6); addParseToken(["YYYYY", "YYYYYY"], YEAR); addParseToken("YYYY", function(input, array) { array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input); }); addParseToken("YY", function(input, array) { array[YEAR] = hooks.parseTwoDigitYear(input); }); addParseToken("Y", function(input, array) { array[YEAR] = parseInt(input, 10); }); function daysInYear(year) { return isLeapYear(year) ? 366 : 365; } hooks.parseTwoDigitYear = function(input) { return toInt(input) + (toInt(input) > 68 ? 1900 : 2e3); }; var getSetYear = makeGetSet("FullYear", true); function getIsLeapYear() { return isLeapYear(this.year()); } function createDate(y2, m2, d2, h2, M2, s, ms) { var date; if (y2 < 100 && y2 >= 0) { date = new Date(y2 + 400, m2, d2, h2, M2, s, ms); if (isFinite(date.getFullYear())) { date.setFullYear(y2); } } else { date = new Date(y2, m2, d2, h2, M2, s, ms); } return date; } function createUTCDate(y2) { var date, args; if (y2 < 100 && y2 >= 0) { args = Array.prototype.slice.call(arguments); args[0] = y2 + 400; date = new Date(Date.UTC.apply(null, args)); if (isFinite(date.getUTCFullYear())) { date.setUTCFullYear(y2); } } else { date = new Date(Date.UTC.apply(null, arguments)); } return date; } function firstWeekOffset(year, dow, doy) { var fwd = 7 + dow - doy, fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; return -fwdlw + fwd - 1; } function dayOfYearFromWeeks(year, week, weekday, dow, doy) { var localWeekday = (7 + weekday - dow) % 7, weekOffset = firstWeekOffset(year, dow, doy), dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, resYear, resDayOfYear; if (dayOfYear <= 0) { resYear = year - 1; resDayOfYear = daysInYear(resYear) + dayOfYear; } else if (dayOfYear > daysInYear(year)) { resYear = year + 1; resDayOfYear = dayOfYear - daysInYear(year); } else { resYear = year; resDayOfYear = dayOfYear; } return { year: resYear, dayOfYear: resDayOfYear }; } function weekOfYear(mom, dow, doy) { var weekOffset = firstWeekOffset(mom.year(), dow, doy), week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, resWeek, resYear; if (week < 1) { resYear = mom.year() - 1; resWeek = week + weeksInYear(resYear, dow, doy); } else if (week > weeksInYear(mom.year(), dow, doy)) { resWeek = week - weeksInYear(mom.year(), dow, doy); resYear = mom.year() + 1; } else { resYear = mom.year(); resWeek = week; } return { week: resWeek, year: resYear }; } function weeksInYear(year, dow, doy) { var weekOffset = firstWeekOffset(year, dow, doy), weekOffsetNext = firstWeekOffset(year + 1, dow, doy); return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; } addFormatToken("w", ["ww", 2], "wo", "week"); addFormatToken("W", ["WW", 2], "Wo", "isoWeek"); addUnitAlias("week", "w"); addUnitAlias("isoWeek", "W"); addUnitPriority("week", 5); addUnitPriority("isoWeek", 5); addRegexToken("w", match1to2); addRegexToken("ww", match1to2, match2); addRegexToken("W", match1to2); addRegexToken("WW", match1to2, match2); addWeekParseToken( ["w", "ww", "W", "WW"], function(input, week, config2, token2) { week[token2.substr(0, 1)] = toInt(input); } ); function localeWeek(mom) { return weekOfYear(mom, this._week.dow, this._week.doy).week; } var defaultLocaleWeek = { 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 localeFirstDayOfWeek() { return this._week.dow; } function localeFirstDayOfYear() { return this._week.doy; } function getSetWeek(input) { var week = this.localeData().week(this); return input == null ? week : this.add((input - week) * 7, "d"); } function getSetISOWeek(input) { var week = weekOfYear(this, 1, 4).week; return input == null ? week : this.add((input - week) * 7, "d"); } addFormatToken("d", 0, "do", "day"); addFormatToken("dd", 0, 0, function(format2) { return this.localeData().weekdaysMin(this, format2); }); addFormatToken("ddd", 0, 0, function(format2) { return this.localeData().weekdaysShort(this, format2); }); addFormatToken("dddd", 0, 0, function(format2) { return this.localeData().weekdays(this, format2); }); addFormatToken("e", 0, 0, "weekday"); addFormatToken("E", 0, 0, "isoWeekday"); addUnitAlias("day", "d"); addUnitAlias("weekday", "e"); addUnitAlias("isoWeekday", "E"); addUnitPriority("day", 11); addUnitPriority("weekday", 11); addUnitPriority("isoWeekday", 11); addRegexToken("d", match1to2); addRegexToken("e", match1to2); addRegexToken("E", match1to2); addRegexToken("dd", function(isStrict, locale2) { return locale2.weekdaysMinRegex(isStrict); }); addRegexToken("ddd", function(isStrict, locale2) { return locale2.weekdaysShortRegex(isStrict); }); addRegexToken("dddd", function(isStrict, locale2) { return locale2.weekdaysRegex(isStrict); }); addWeekParseToken(["dd", "ddd", "dddd"], function(input, week, config2, token2) { var weekday = config2._locale.weekdaysParse(input, token2, config2._strict); if (weekday != null) { week.d = weekday; } else { getParsingFlags(config2).invalidWeekday = input; } }); addWeekParseToken(["d", "e", "E"], function(input, week, config2, token2) { week[token2] = toInt(input); }); function parseWeekday(input, locale2) { if (typeof input !== "string") { return input; } if (!isNaN(input)) { return parseInt(input, 10); } input = locale2.weekdaysParse(input); if (typeof input === "number") { return input; } return null; } function parseIsoWeekday(input, locale2) { if (typeof input === "string") { return locale2.weekdaysParse(input) % 7 || 7; } return isNaN(input) ? null : input; } function shiftWeekdays(ws, n2) { return ws.slice(n2, 7).concat(ws.slice(0, n2)); } var defaultLocaleWeekdays = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), defaultLocaleWeekdaysShort = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), defaultLocaleWeekdaysMin = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), defaultWeekdaysRegex = matchWord, defaultWeekdaysShortRegex = matchWord, defaultWeekdaysMinRegex = matchWord; function localeWeekdays(m2, format2) { var weekdays = isArray$1(this._weekdays) ? this._weekdays : this._weekdays[m2 && m2 !== true && this._weekdays.isFormat.test(format2) ? "format" : "standalone"]; return m2 === true ? shiftWeekdays(weekdays, this._week.dow) : m2 ? weekdays[m2.day()] : weekdays; } function localeWeekdaysShort(m2) { return m2 === true ? shiftWeekdays(this._weekdaysShort, this._week.dow) : m2 ? this._weekdaysShort[m2.day()] : this._weekdaysShort; } function localeWeekdaysMin(m2) { return m2 === true ? shiftWeekdays(this._weekdaysMin, this._week.dow) : m2 ? this._weekdaysMin[m2.day()] : this._weekdaysMin; } function handleStrictParse$1(weekdayName, format2, strict) { var i, ii, mom, llc = weekdayName.toLocaleLowerCase(); if (!this._weekdaysParse) { this._weekdaysParse = []; this._shortWeekdaysParse = []; this._minWeekdaysParse = []; for (i = 0; i < 7; ++i) { mom = createUTC([2e3, 1]).day(i); this._minWeekdaysParse[i] = this.weekdaysMin( mom, "" ).toLocaleLowerCase(); this._shortWeekdaysParse[i] = this.weekdaysShort( mom, "" ).toLocaleLowerCase(); this._weekdaysParse[i] = this.weekdays(mom, "").toLocaleLowerCase(); } } if (strict) { if (format2 === "dddd") { ii = indexOf.call(this._weekdaysParse, llc); return ii !== -1 ? ii : null; } else if (format2 === "ddd") { ii = indexOf.call(this._shortWeekdaysParse, llc); return ii !== -1 ? ii : null; } else { ii = indexOf.call(this._minWeekdaysParse, llc); return ii !== -1 ? ii : null; } } else { if (format2 === "dddd") { ii = indexOf.call(this._weekdaysParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._shortWeekdaysParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._mi