{"version":3,"sources":["moment.js"],"names":["global","factory","exports","module","define","amd","moment","this","hooks","hookCallback","apply","arguments","isArray","input","Array","Object","prototype","toString","call","isObject","isObjectEmpty","obj","getOwnPropertyNames","length","k","hasOwnProperty","isUndefined","isNumber","isDate","Date","map","arr","fn","i","res","push","hasOwnProp","a","b","extend","valueOf","createUTC","format","locale","strict","createLocalOrUTC","utc","defaultParsingFlags","empty","unusedTokens","unusedInput","overflow","charsLeftOver","nullInput","invalidMonth","invalidFormat","userInvalidated","iso","parsedDateParts","meridiem","rfc2822","weekdayMismatch","getParsingFlags","m","_pf","isValid","_isValid","flags","parsedParts","some","isNowValid","isNaN","_d","getTime","invalidWeekday","_strict","undefined","bigHour","isFrozen","createInvalid","NaN","copyConfig","to","from","prop","val","_isAMomentObject","_i","_f","_l","_tzm","_isUTC","_offset","_locale","momentProperties","Moment","config","updateInProgress","updateOffset","isMoment","absFloor","number","Math","ceil","floor","toInt","argumentForCoercion","coercedNumber","value","isFinite","compareArrays","array1","array2","dontConvert","len","min","lengthDiff","abs","diffs","warn","msg","suppressDeprecationWarnings","console","deprecate","firstTime","deprecationHandler","arg","args","key","slice","join","Error","stack","deprecateSimple","name","deprecations","isFunction","Function","set","_config","_dayOfMonthOrdinalParseLenient","RegExp","_dayOfMonthOrdinalParse","source","_ordinalParse","mergeConfigs","parentConfig","childConfig","Locale","calendar","mom","now","output","_calendar","longDateFormat","_longDateFormat","formatUpper","toUpperCase","replace","invalidDate","_invalidDate","ordinal","_ordinal","relativeTime","withoutSuffix","string","isFuture","_relativeTime","pastFuture","diff","addUnitAlias","unit","shorthand","lowerCase","toLowerCase","aliases","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedProp","normalizedInput","addUnitPriority","priority","priorities","getPrioritizedUnits","unitsObj","u","sort","zeroFill","targetLength","forceSign","absNumber","zerosToFill","pow","max","substr","addFormatToken","token","padded","callback","func","formatTokenFunctions","localeData","removeFormattingTokens","match","makeFormatFunction","array","formattingTokens","formatMoment","expandFormat","formatFunctions","replaceLongDateFormatTokens","localFormattingTokens","lastIndex","test","addRegexToken","regex","strictRegex","regexes","isStrict","getParseRegexForToken","unescapeFormat","s","regexEscape","matched","p1","p2","p3","p4","addParseToken","tokens","addWeekParseToken","_w","addTimeToArrayFromToken","_a","daysInYear","year","isLeapYear","getIsLeapYear","makeGetSet","keepTime","set$1","get","month","date","daysInMonth","stringGet","stringSet","prioritized","mod","n","x","modMonth","localeMonths","_months","isFormat","MONTHS_IN_FORMAT","localeMonthsShort","_monthsShort","handleStrictParse","monthName","ii","llc","toLocaleLowerCase","_monthsParse","_longMonthsParse","_shortMonthsParse","monthsShort","months","indexOf","localeMonthsParse","_monthsParseExact","setMonth","dayOfMonth","monthsParse","getSetMonth","getDaysInMonth","monthsShortRegex","computeMonthsParse","_monthsShortStrictRegex","_monthsShortRegex","defaultMonthsShortRegex","monthsRegex","_monthsStrictRegex","_monthsRegex","defaultMonthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","createDate","y","d","h","M","ms","getFullYear","setFullYear","createUTCDate","UTC","getUTCFullYear","setUTCFullYear","firstWeekOffset","dow","doy","fwd","getUTCDay","dayOfYearFromWeeks","week","weekday","resYear","resDayOfYear","localWeekday","weekOffset","dayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","localeWeek","_week","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","add","getSetISOWeek","parseWeekday","weekdaysParse","parseInt","parseIsoWeekday","localeWeekdays","_weekdays","day","localeWeekdaysShort","_weekdaysShort","localeWeekdaysMin","_weekdaysMin","handleStrictParse$1","weekdayName","_weekdaysParse","_shortWeekdaysParse","_minWeekdaysParse","weekdaysMin","weekdaysShort","weekdays","localeWeekdaysParse","_weekdaysParseExact","_fullWeekdaysParse","getSetDayOfWeek","getDay","getSetLocaleDayOfWeek","getSetISODayOfWeek","weekdaysRegex","computeWeekdaysParse","_weekdaysStrictRegex","_weekdaysRegex","defaultWeekdaysRegex","weekdaysShortRegex","_weekdaysShortStrictRegex","_weekdaysShortRegex","defaultWeekdaysShortRegex","weekdaysMinRegex","_weekdaysMinStrictRegex","_weekdaysMinRegex","defaultWeekdaysMinRegex","minp","shortp","longp","minPieces","hFormat","hours","kFormat","lowercase","minutes","matchMeridiem","_meridiemParse","localeIsPM","charAt","localeMeridiem","isLower","normalizeLocale","chooseLocale","names","j","next","split","loadLocale","globalLocale","oldLocale","locales","_abbr","require","getSetGlobalLocale","e","values","data","getLocale","defineLocale","baseConfig","abbr","parentLocale","localeFamilies","forEach","updateLocale","tmpLocale","listLocales","keys","checkOverflow","MONTH","DATE","YEAR","HOUR","MINUTE","SECOND","MILLISECOND","_overflowDayOfYear","_overflowWeeks","WEEK","_overflowWeekday","WEEKDAY","defaults","c","currentDateArray","nowValue","_useUTC","getUTCMonth","getUTCDate","getMonth","getDate","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","_dayOfYear","_nextDay","setUTCMinutes","getUTCMinutes","w","weekYear","temp","weekdayOverflow","GG","W","E","createLocal","curWeek","gg","configFromISO","l","allowTime","dateFormat","timeFormat","tzFormat","extendedIsoRegex","exec","basicIsoRegex","isoDates","isoTimes","tzRegex","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","result","untruncateYear","defaultLocaleMonthsShort","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","defaultLocaleWeekdaysShort","calculateOffset","obsOffset","militaryOffset","numOffset","obsOffsets","hm","configFromRFC2822","parsedArray","configFromString","aspNetJsonRegex","createFromInputFallback","ISO_8601","RFC_2822","skipped","stringLength","totalParsedInputLength","_meridiem","meridiemFixWrap","hour","isPm","meridiemHour","isPM","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","score","configFromObject","minute","second","millisecond","createFromConfig","prepareConfig","preparse","configFromInput","isUTC","pickBy","moments","isDurationValid","ordering","unitHasDecimal","parseFloat","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","quarter","weeks","days","seconds","milliseconds","_milliseconds","_days","_data","_bubble","isDuration","absRound","round","offset","separator","utcOffset","sign","offsetFromString","matcher","matches","chunk","parts","chunkOffset","cloneWithOffset","model","clone","setTime","local","getDateOffset","getTimezoneOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","matchShortOffset","_changeInProgress","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","subtract","setOffsetToParsedOffset","tZone","matchOffset","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","_isDSTShifted","other","toArray","isLocal","isUtcOffset","isUtc","ret","diffRes","aspNetRegex","isoRegex","parseIso","momentsDifference","inp","positiveMomentsDifference","base","isAfter","isBefore","createAdder","direction","period","dur","tmp","isAdding","getCalendarFormat","myMoment","calendar$1","time","formats","sod","startOf","calendarFormat","localInput","endOf","isBetween","inclusivity","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","that","zoneDelta","monthDiff","anchor2","adjust","wholeMonthDiff","anchor","toISOString","keepOffset","toDate","inspect","zone","prefix","suffix","inputString","defaultFormatUtc","defaultFormat","postformat","humanize","fromNow","toNow","newLocaleData","isoWeekday","unix","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","isoWeek","getISOWeeksInYear","getWeeksInYear","weekInfo","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","getSetDayOfYear","parseMs","getZoneAbbr","getZoneName","createUnix","createInZone","parseZone","preParsePostFormat","get$1","index","field","setter","listMonthsImpl","out","listWeekdaysImpl","localeSorted","shift","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","mathAbs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","alias","clone$1","get$2","makeGetter","substituteTimeAgo","relativeTime$1","posNegDuration","thresholds","ss","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","limit","withSuffix","toISOString$1","abs$1","Y","D","toFixed","total","asSeconds","totalSign","ymSign","daysSign","hmsSign","fun","t","defaultCalendar","sameDay","nextDay","nextWeek","lastDay","lastWeek","sameElse","defaultLongDateFormat","LTS","LT","L","LL","LLL","LLLL","defaultDayOfMonthOrdinalParse","defaultRelativeTime","future","past","mm","hh","dd","MM","yy","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchTimestamp","matchWord","parseTwoDigitYear","getSetYear","o","defaultLocaleMonths","defaultLocaleWeek","defaultLocaleWeekdays","defaultLocaleWeekdaysMin","kInput","_isPm","pos","pos1","pos2","defaultLocaleMeridiemParse","getSetHour","dayOfMonthOrdinalParse","meridiemParse","UT","GMT","EDT","EST","CDT","CST","MDT","MST","PDT","PST","prototypeMin","prototypeMax","invalid","lang","isoWeekYear","getSetDayOfMonth","getSetMinute","getSetSecond","getSetMillisecond","proto","isoWeeks","isoWeeksInYear","isDST","zoneAbbr","zoneName","dates","isDSTShifted","proto$1","firstDayOfYear","firstDayOfWeek","langData","asMilliseconds","asMinutes","asHours","asDays","asWeeks","asMonths","asYears","proto$2","toIsoString","version","relativeTimeRounding","relativeTimeThreshold","HTML5_FMT","DATETIME_LOCAL","DATETIME_LOCAL_SECONDS","DATETIME_LOCAL_MS","TIME","TIME_SECONDS","TIME_MS"],"mappings":"CAEE,SAAUA,EAAQC,GACG,gBAAZC,UAA0C,mBAAXC,QAAyBA,OAAOD,QAAUD,IAC9D,kBAAXG,SAAyBA,OAAOC,IAAMD,OAAOH,GACpDD,EAAOM,OAASL,KAClBM,KAAM,WAAe,YAInB,SAASC,KACL,MAAOC,IAAaC,MAAM,KAAMC,WASpC,QAASC,GAAQC,GACb,MAAOA,aAAiBC,QAAmD,mBAA1CC,OAAOC,UAAUC,SAASC,KAAKL,GAGpE,QAASM,GAASN,GAGd,MAAgB,OAATA,GAA2D,oBAA1CE,OAAOC,UAAUC,SAAS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AAwBA,GAC9BhhB,EAAMoQ,YAAwBsZ,GAC9B1pB,EAAM+U,YAAwB8U,GAC9B7pB,EAAMsY,aAAwBA,GAC9BtY,EAAM4Y,aAAwBA,GAC9B5Y,EAAM8X,QAAwBgB,GAC9B9Y,EAAMgV,cAAwB4U,GAC9B5pB,EAAMwK,eAAwBA,EAC9BxK,EAAMqyB,qBAAwBlH,GAC9BnrB,EAAMsyB,sBAAwBjH,GAC9BrrB,EAAMmlB,eAAwBP,GAC9B5kB,EAAMQ,UAAwBuwB,GAG9B/wB,EAAMuyB,WACFC,eAAgB,mBAChBC,uBAAwB,sBACxBC,kBAAmB,0BACnBxZ,KAAM,aACNyZ,KAAM,QACNC,aAAc,WACdC,QAAS,eACTnZ,KAAM,aACNT,MAAO,WAGJjZ","file":"../moment.min.js","sourcesContent":["//! moment.js\r\n\r\n;(function (global, factory) {\r\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\r\n typeof define === 'function' && define.amd ? define(factory) :\r\n global.moment = factory()\r\n}(this, (function () { 'use strict';\r\n\r\n var hookCallback;\r\n\r\n function hooks () {\r\n return hookCallback.apply(null, arguments);\r\n }\r\n\r\n // This is done to register the method called with moment()\r\n // without creating circular dependencies.\r\n function setHookCallback (callback) {\r\n hookCallback = callback;\r\n }\r\n\r\n function isArray(input) {\r\n return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';\r\n }\r\n\r\n function isObject(input) {\r\n // IE8 will treat undefined and null as object if it wasn't for\r\n // input != null\r\n return input != null && Object.prototype.toString.call(input) === '[object Object]';\r\n }\r\n\r\n function isObjectEmpty(obj) {\r\n if (Object.getOwnPropertyNames) {\r\n return (Object.getOwnPropertyNames(obj).length === 0);\r\n } else {\r\n var k;\r\n for (k in obj) {\r\n if (obj.hasOwnProperty(k)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n }\r\n\r\n function isUndefined(input) {\r\n return input === void 0;\r\n }\r\n\r\n function isNumber(input) {\r\n return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';\r\n }\r\n\r\n function isDate(input) {\r\n return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';\r\n }\r\n\r\n function map(arr, fn) {\r\n var res = [], i;\r\n for (i = 0; i < arr.length; ++i) {\r\n res.push(fn(arr[i], i));\r\n }\r\n return res;\r\n }\r\n\r\n function hasOwnProp(a, b) {\r\n return Object.prototype.hasOwnProperty.call(a, b);\r\n }\r\n\r\n function extend(a, b) {\r\n for (var i in b) {\r\n if (hasOwnProp(b, i)) {\r\n a[i] = b[i];\r\n }\r\n }\r\n\r\n if (hasOwnProp(b, 'toString')) {\r\n a.toString = b.toString;\r\n }\r\n\r\n if (hasOwnProp(b, 'valueOf')) {\r\n a.valueOf = b.valueOf;\r\n }\r\n\r\n return a;\r\n }\r\n\r\n function createUTC (input, format, locale, strict) {\r\n return createLocalOrUTC(input, format, locale, strict, true).utc();\r\n }\r\n\r\n function defaultParsingFlags() {\r\n // We need to deep clone this object.\r\n return {\r\n empty : false,\r\n unusedTokens : [],\r\n unusedInput : [],\r\n overflow : -2,\r\n charsLeftOver : 0,\r\n nullInput : false,\r\n invalidMonth : null,\r\n invalidFormat : false,\r\n userInvalidated : false,\r\n iso : false,\r\n parsedDateParts : [],\r\n meridiem : null,\r\n rfc2822 : false,\r\n weekdayMismatch : false\r\n };\r\n }\r\n\r\n function getParsingFlags(m) {\r\n if (m._pf == null) {\r\n m._pf = defaultParsingFlags();\r\n }\r\n return m._pf;\r\n }\r\n\r\n var some;\r\n if (Array.prototype.some) {\r\n some = Array.prototype.some;\r\n } else {\r\n some = function (fun) {\r\n var t = Object(this);\r\n var len = t.length >>> 0;\r\n\r\n for (var i = 0; i < len; i++) {\r\n if (i in t && fun.call(this, t[i], i, t)) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n };\r\n }\r\n\r\n function isValid(m) {\r\n if (m._isValid == null) {\r\n var flags = getParsingFlags(m);\r\n var parsedParts = some.call(flags.parsedDateParts, function (i) {\r\n return i != null;\r\n });\r\n var isNowValid = !isNaN(m._d.getTime()) &&\r\n flags.overflow < 0 &&\r\n !flags.empty &&\r\n !flags.invalidMonth &&\r\n !flags.invalidWeekday &&\r\n !flags.weekdayMismatch &&\r\n !flags.nullInput &&\r\n !flags.invalidFormat &&\r\n !flags.userInvalidated &&\r\n (!flags.meridiem || (flags.meridiem && parsedParts));\r\n\r\n if (m._strict) {\r\n isNowValid = isNowValid &&\r\n flags.charsLeftOver === 0 &&\r\n flags.unusedTokens.length === 0 &&\r\n flags.bigHour === undefined;\r\n }\r\n\r\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\r\n m._isValid = isNowValid;\r\n }\r\n else {\r\n return isNowValid;\r\n }\r\n }\r\n return m._isValid;\r\n }\r\n\r\n function createInvalid (flags) {\r\n var m = createUTC(NaN);\r\n if (flags != null) {\r\n extend(getParsingFlags(m), flags);\r\n }\r\n else {\r\n getParsingFlags(m).userInvalidated = true;\r\n }\r\n\r\n return m;\r\n }\r\n\r\n // Plugins that add properties should also add the key here (null value),\r\n // so we can properly clone ourselves.\r\n var momentProperties = hooks.momentProperties = [];\r\n\r\n function copyConfig(to, from) {\r\n var i, prop, val;\r\n\r\n if (!isUndefined(from._isAMomentObject)) {\r\n to._isAMomentObject = from._isAMomentObject;\r\n }\r\n if (!isUndefined(from._i)) {\r\n to._i = from._i;\r\n }\r\n if (!isUndefined(from._f)) {\r\n to._f = from._f;\r\n }\r\n if (!isUndefined(from._l)) {\r\n to._l = from._l;\r\n }\r\n if (!isUndefined(from._strict)) {\r\n to._strict = from._strict;\r\n }\r\n if (!isUndefined(from._tzm)) {\r\n to._tzm = from._tzm;\r\n }\r\n if (!isUndefined(from._isUTC)) {\r\n to._isUTC = from._isUTC;\r\n }\r\n if (!isUndefined(from._offset)) {\r\n to._offset = from._offset;\r\n }\r\n if (!isUndefined(from._pf)) {\r\n to._pf = getParsingFlags(from);\r\n }\r\n if (!isUndefined(from._locale)) {\r\n to._locale = from._locale;\r\n }\r\n\r\n if (momentProperties.length > 0) {\r\n for (i = 0; i < momentProperties.length; i++) {\r\n prop = momentProperties[i];\r\n val = from[prop];\r\n if (!isUndefined(val)) {\r\n to[prop] = val;\r\n }\r\n }\r\n }\r\n\r\n return to;\r\n }\r\n\r\n var updateInProgress = false;\r\n\r\n // Moment prototype object\r\n function Moment(config) {\r\n copyConfig(this, config);\r\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\r\n if (!this.isValid()) {\r\n this._d = new Date(NaN);\r\n }\r\n // Prevent infinite loop in case updateOffset creates new moment\r\n // objects.\r\n if (updateInProgress === false) {\r\n updateInProgress = true;\r\n hooks.updateOffset(this);\r\n updateInProgress = false;\r\n }\r\n }\r\n\r\n function isMoment (obj) {\r\n return obj instanceof Moment || (obj != null && obj._isAMomentObject != null);\r\n }\r\n\r\n function absFloor (number) {\r\n if (number < 0) {\r\n // -0 -> 0\r\n return Math.ceil(number) || 0;\r\n } else {\r\n return Math.floor(number);\r\n }\r\n }\r\n\r\n function toInt(argumentForCoercion) {\r\n var coercedNumber = +argumentForCoercion,\r\n value = 0;\r\n\r\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\r\n value = absFloor(coercedNumber);\r\n }\r\n\r\n return value;\r\n }\r\n\r\n // compare two arrays, return the number of differences\r\n function compareArrays(array1, array2, dontConvert) {\r\n var len = Math.min(array1.length, array2.length),\r\n lengthDiff = Math.abs(array1.length - array2.length),\r\n diffs = 0,\r\n i;\r\n for (i = 0; i < len; i++) {\r\n if ((dontConvert && array1[i] !== array2[i]) ||\r\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\r\n diffs++;\r\n }\r\n }\r\n return diffs + lengthDiff;\r\n }\r\n\r\n function warn(msg) {\r\n if (hooks.suppressDeprecationWarnings === false &&\r\n (typeof console !== 'undefined') && console.warn) {\r\n console.warn('Deprecation warning: ' + msg);\r\n }\r\n }\r\n\r\n function deprecate(msg, fn) {\r\n var firstTime = true;\r\n\r\n return extend(function () {\r\n if (hooks.deprecationHandler != null) {\r\n hooks.deprecationHandler(null, msg);\r\n }\r\n if (firstTime) {\r\n var args = [];\r\n var arg;\r\n for (var i = 0; i < arguments.length; i++) {\r\n arg = '';\r\n if (typeof arguments[i] === 'object') {\r\n arg += '\\n[' + i + '] ';\r\n for (var key in arguments[0]) {\r\n arg += key + ': ' + arguments[0][key] + ', ';\r\n }\r\n arg = arg.slice(0, -2); // Remove trailing comma and space\r\n } else {\r\n arg = arguments[i];\r\n }\r\n args.push(arg);\r\n }\r\n warn(msg + '\\nArguments: ' + Array.prototype.slice.call(args).join('') + '\\n' + (new Error()).stack);\r\n firstTime = false;\r\n }\r\n return fn.apply(this, arguments);\r\n }, fn);\r\n }\r\n\r\n var deprecations = {};\r\n\r\n function deprecateSimple(name, msg) {\r\n if (hooks.deprecationHandler != null) {\r\n hooks.deprecationHandler(name, msg);\r\n }\r\n if (!deprecations[name]) {\r\n warn(msg);\r\n deprecations[name] = true;\r\n }\r\n }\r\n\r\n hooks.suppressDeprecationWarnings = false;\r\n hooks.deprecationHandler = null;\r\n\r\n function isFunction(input) {\r\n return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';\r\n }\r\n\r\n function set (config) {\r\n var prop, i;\r\n for (i in config) {\r\n prop = config[i];\r\n if (isFunction(prop)) {\r\n this[i] = prop;\r\n } else {\r\n this['_' + i] = prop;\r\n }\r\n }\r\n this._config = config;\r\n // Lenient ordinal parsing accepts just a number in addition to\r\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\r\n // TODO: Remove \"ordinalParse\" fallback in next major release.\r\n this._dayOfMonthOrdinalParseLenient = new RegExp(\r\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\r\n '|' + (/\\d{1,2}/).source);\r\n }\r\n\r\n function mergeConfigs(parentConfig, childConfig) {\r\n var res = extend({}, parentConfig), prop;\r\n for (prop in childConfig) {\r\n if (hasOwnProp(childConfig, prop)) {\r\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\r\n res[prop] = {};\r\n extend(res[prop], parentConfig[prop]);\r\n extend(res[prop], childConfig[prop]);\r\n } else if (childConfig[prop] != null) {\r\n res[prop] = childConfig[prop];\r\n } else {\r\n delete res[prop];\r\n }\r\n }\r\n }\r\n for (prop in parentConfig) {\r\n if (hasOwnProp(parentConfig, prop) &&\r\n !hasOwnProp(childConfig, prop) &&\r\n isObject(parentConfig[prop])) {\r\n // make sure changes to properties don't modify parent config\r\n res[prop] = extend({}, res[prop]);\r\n }\r\n }\r\n return res;\r\n }\r\n\r\n function Locale(config) {\r\n if (config != null) {\r\n this.set(config);\r\n }\r\n }\r\n\r\n var keys;\r\n\r\n if (Object.keys) {\r\n keys = Object.keys;\r\n } else {\r\n keys = function (obj) {\r\n var i, res = [];\r\n for (i in obj) {\r\n if (hasOwnProp(obj, i)) {\r\n res.push(i);\r\n }\r\n }\r\n return res;\r\n };\r\n }\r\n\r\n var defaultCalendar = {\r\n sameDay : '[Today at] LT',\r\n nextDay : '[Tomorrow at] LT',\r\n nextWeek : 'dddd [at] LT',\r\n lastDay : '[Yesterday at] LT',\r\n lastWeek : '[Last] dddd [at] LT',\r\n sameElse : 'L'\r\n };\r\n\r\n function calendar (key, mom, now) {\r\n var output = this._calendar[key] || this._calendar['sameElse'];\r\n return isFunction(output) ? output.call(mom, now) : output;\r\n }\r\n\r\n var defaultLongDateFormat = {\r\n LTS : 'h:mm:ss A',\r\n LT : 'h:mm A',\r\n L : 'MM/DD/YYYY',\r\n LL : 'MMMM D, YYYY',\r\n LLL : 'MMMM D, YYYY h:mm A',\r\n LLLL : 'dddd, MMMM D, YYYY h:mm A'\r\n };\r\n\r\n function longDateFormat (key) {\r\n var format = this._longDateFormat[key],\r\n formatUpper = this._longDateFormat[key.toUpperCase()];\r\n\r\n if (format || !formatUpper) {\r\n return format;\r\n }\r\n\r\n this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {\r\n return val.slice(1);\r\n });\r\n\r\n return this._longDateFormat[key];\r\n }\r\n\r\n var defaultInvalidDate = 'Invalid date';\r\n\r\n function invalidDate () {\r\n return this._invalidDate;\r\n }\r\n\r\n var defaultOrdinal = '%d';\r\n var defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\r\n\r\n function ordinal (number) {\r\n return this._ordinal.replace('%d', number);\r\n }\r\n\r\n var defaultRelativeTime = {\r\n future : 'in %s',\r\n past : '%s ago',\r\n s : 'a few seconds',\r\n ss : '%d seconds',\r\n m : 'a minute',\r\n mm : '%d minutes',\r\n h : 'an hour',\r\n hh : '%d hours',\r\n d : 'a day',\r\n dd : '%d days',\r\n M : 'a month',\r\n MM : '%d months',\r\n y : 'a year',\r\n yy : '%d years'\r\n };\r\n\r\n function relativeTime (number, withoutSuffix, string, isFuture) {\r\n var output = this._relativeTime[string];\r\n return (isFunction(output)) ?\r\n output(number, withoutSuffix, string, isFuture) :\r\n output.replace(/%d/i, number);\r\n }\r\n\r\n function pastFuture (diff, output) {\r\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\r\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\r\n }\r\n\r\n var aliases = {};\r\n\r\n function addUnitAlias (unit, shorthand) {\r\n var lowerCase = unit.toLowerCase();\r\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\r\n }\r\n\r\n function normalizeUnits(units) {\r\n return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;\r\n }\r\n\r\n function normalizeObjectUnits(inputObject) {\r\n var normalizedInput = {},\r\n normalizedProp,\r\n prop;\r\n\r\n for (prop in inputObject) {\r\n if (hasOwnProp(inputObject, prop)) {\r\n normalizedProp = normalizeUnits(prop);\r\n if (normalizedProp) {\r\n normalizedInput[normalizedProp] = inputObject[prop];\r\n }\r\n }\r\n }\r\n\r\n return normalizedInput;\r\n }\r\n\r\n var priorities = {};\r\n\r\n function addUnitPriority(unit, priority) {\r\n priorities[unit] = priority;\r\n }\r\n\r\n function getPrioritizedUnits(unitsObj) {\r\n var units = [];\r\n for (var u in unitsObj) {\r\n units.push({unit: u, priority: priorities[u]});\r\n }\r\n units.sort(function (a, b) {\r\n return a.priority - b.priority;\r\n });\r\n return units;\r\n }\r\n\r\n function zeroFill(number, targetLength, forceSign) {\r\n var absNumber = '' + Math.abs(number),\r\n zerosToFill = targetLength - absNumber.length,\r\n sign = number >= 0;\r\n return (sign ? (forceSign ? '+' : '') : '-') +\r\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;\r\n }\r\n\r\n var formattingTokens = /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;\r\n\r\n var localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g;\r\n\r\n var formatFunctions = {};\r\n\r\n var formatTokenFunctions = {};\r\n\r\n // token: 'M'\r\n // padded: ['MM', 2]\r\n // ordinal: 'Mo'\r\n // callback: function () { this.month() + 1 }\r\n function addFormatToken (token, padded, ordinal, callback) {\r\n var func = callback;\r\n if (typeof callback === 'string') {\r\n func = function () {\r\n return this[callback]();\r\n };\r\n }\r\n if (token) {\r\n formatTokenFunctions[token] = func;\r\n }\r\n if (padded) {\r\n formatTokenFunctions[padded[0]] = function () {\r\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\r\n };\r\n }\r\n if (ordinal) {\r\n formatTokenFunctions[ordinal] = function () {\r\n return this.localeData().ordinal(func.apply(this, arguments), token);\r\n };\r\n }\r\n }\r\n\r\n function removeFormattingTokens(input) {\r\n if (input.match(/\\[[\\s\\S]/)) {\r\n return input.replace(/^\\[|\\]$/g, '');\r\n }\r\n return input.replace(/\\\\/g, '');\r\n }\r\n\r\n function makeFormatFunction(format) {\r\n var array = format.match(formattingTokens), i, length;\r\n\r\n for (i = 0, length = array.length; i < length; i++) {\r\n if (formatTokenFunctions[array[i]]) {\r\n array[i] = formatTokenFunctions[array[i]];\r\n } else {\r\n array[i] = removeFormattingTokens(array[i]);\r\n }\r\n }\r\n\r\n return function (mom) {\r\n var output = '', i;\r\n for (i = 0; i < length; i++) {\r\n output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];\r\n }\r\n return output;\r\n };\r\n }\r\n\r\n // format date using native date object\r\n function formatMoment(m, format) {\r\n if (!m.isValid()) {\r\n return m.localeData().invalidDate();\r\n }\r\n\r\n format = expandFormat(format, m.localeData());\r\n formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);\r\n\r\n return formatFunctions[format](m);\r\n }\r\n\r\n function expandFormat(format, locale) {\r\n var i = 5;\r\n\r\n function replaceLongDateFormatTokens(input) {\r\n return locale.longDateFormat(input) || input;\r\n }\r\n\r\n localFormattingTokens.lastIndex = 0;\r\n while (i >= 0 && localFormattingTokens.test(format)) {\r\n format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);\r\n localFormattingTokens.lastIndex = 0;\r\n i -= 1;\r\n }\r\n\r\n return format;\r\n }\r\n\r\n var match1 = /\\d/; // 0 - 9\r\n var match2 = /\\d\\d/; // 00 - 99\r\n var match3 = /\\d{3}/; // 000 - 999\r\n var match4 = /\\d{4}/; // 0000 - 9999\r\n var match6 = /[+-]?\\d{6}/; // -999999 - 999999\r\n var match1to2 = /\\d\\d?/; // 0 - 99\r\n var match3to4 = /\\d\\d\\d\\d?/; // 999 - 9999\r\n var match5to6 = /\\d\\d\\d\\d\\d\\d?/; // 99999 - 999999\r\n var match1to3 = /\\d{1,3}/; // 0 - 999\r\n var match1to4 = /\\d{1,4}/; // 0 - 9999\r\n var match1to6 = /[+-]?\\d{1,6}/; // -999999 - 999999\r\n\r\n var matchUnsigned = /\\d+/; // 0 - inf\r\n var matchSigned = /[+-]?\\d+/; // -inf - inf\r\n\r\n var matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi; // +00:00 -00:00 +0000 -0000 or Z\r\n var matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z\r\n\r\n var matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/; // 123456789 123456789.123\r\n\r\n // any word (or two) characters or numbers including two/three word month in arabic.\r\n // includes scottish gaelic two word and hyphenated months\r\n var 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;\r\n\r\n var regexes = {};\r\n\r\n function addRegexToken (token, regex, strictRegex) {\r\n regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {\r\n return (isStrict && strictRegex) ? strictRegex : regex;\r\n };\r\n }\r\n\r\n function getParseRegexForToken (token, config) {\r\n if (!hasOwnProp(regexes, token)) {\r\n return new RegExp(unescapeFormat(token));\r\n }\r\n\r\n return regexes[token](config._strict, config._locale);\r\n }\r\n\r\n // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\r\n function unescapeFormat(s) {\r\n return regexEscape(s.replace('\\\\', '').replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (matched, p1, p2, p3, p4) {\r\n return p1 || p2 || p3 || p4;\r\n }));\r\n }\r\n\r\n function regexEscape(s) {\r\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\r\n }\r\n\r\n var tokens = {};\r\n\r\n function addParseToken (token, callback) {\r\n var i, func = callback;\r\n if (typeof token === 'string') {\r\n token = [token];\r\n }\r\n if (isNumber(callback)) {\r\n func = function (input, array) {\r\n array[callback] = toInt(input);\r\n };\r\n }\r\n for (i = 0; i < token.length; i++) {\r\n tokens[token[i]] = func;\r\n }\r\n }\r\n\r\n function addWeekParseToken (token, callback) {\r\n addParseToken(token, function (input, array, config, token) {\r\n config._w = config._w || {};\r\n callback(input, config._w, config, token);\r\n });\r\n }\r\n\r\n function addTimeToArrayFromToken(token, input, config) {\r\n if (input != null && hasOwnProp(tokens, token)) {\r\n tokens[token](input, config._a, config, token);\r\n }\r\n }\r\n\r\n var YEAR = 0;\r\n var MONTH = 1;\r\n var DATE = 2;\r\n var HOUR = 3;\r\n var MINUTE = 4;\r\n var SECOND = 5;\r\n var MILLISECOND = 6;\r\n var WEEK = 7;\r\n var WEEKDAY = 8;\r\n\r\n // FORMATTING\r\n\r\n addFormatToken('Y', 0, 0, function () {\r\n var y = this.year();\r\n return y <= 9999 ? '' + y : '+' + y;\r\n });\r\n\r\n addFormatToken(0, ['YY', 2], 0, function () {\r\n return this.year() % 100;\r\n });\r\n\r\n addFormatToken(0, ['YYYY', 4], 0, 'year');\r\n addFormatToken(0, ['YYYYY', 5], 0, 'year');\r\n addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\r\n\r\n // ALIASES\r\n\r\n addUnitAlias('year', 'y');\r\n\r\n // PRIORITIES\r\n\r\n addUnitPriority('year', 1);\r\n\r\n // PARSING\r\n\r\n addRegexToken('Y', matchSigned);\r\n addRegexToken('YY', match1to2, match2);\r\n addRegexToken('YYYY', match1to4, match4);\r\n addRegexToken('YYYYY', match1to6, match6);\r\n addRegexToken('YYYYYY', match1to6, match6);\r\n\r\n addParseToken(['YYYYY', 'YYYYYY'], YEAR);\r\n addParseToken('YYYY', function (input, array) {\r\n array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\r\n });\r\n addParseToken('YY', function (input, array) {\r\n array[YEAR] = hooks.parseTwoDigitYear(input);\r\n });\r\n addParseToken('Y', function (input, array) {\r\n array[YEAR] = parseInt(input, 10);\r\n });\r\n\r\n // HELPERS\r\n\r\n function daysInYear(year) {\r\n return isLeapYear(year) ? 366 : 365;\r\n }\r\n\r\n function isLeapYear(year) {\r\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\r\n }\r\n\r\n // HOOKS\r\n\r\n hooks.parseTwoDigitYear = function (input) {\r\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\r\n };\r\n\r\n // MOMENTS\r\n\r\n var getSetYear = makeGetSet('FullYear', true);\r\n\r\n function getIsLeapYear () {\r\n return isLeapYear(this.year());\r\n }\r\n\r\n function makeGetSet (unit, keepTime) {\r\n return function (value) {\r\n if (value != null) {\r\n set$1(this, unit, value);\r\n hooks.updateOffset(this, keepTime);\r\n return this;\r\n } else {\r\n return get(this, unit);\r\n }\r\n };\r\n }\r\n\r\n function get (mom, unit) {\r\n return mom.isValid() ?\r\n mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;\r\n }\r\n\r\n function set$1 (mom, unit, value) {\r\n if (mom.isValid() && !isNaN(value)) {\r\n if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) {\r\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month()));\r\n }\r\n else {\r\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\r\n }\r\n }\r\n }\r\n\r\n // MOMENTS\r\n\r\n function stringGet (units) {\r\n units = normalizeUnits(units);\r\n if (isFunction(this[units])) {\r\n return this[units]();\r\n }\r\n return this;\r\n }\r\n\r\n\r\n function stringSet (units, value) {\r\n if (typeof units === 'object') {\r\n units = normalizeObjectUnits(units);\r\n var prioritized = getPrioritizedUnits(units);\r\n for (var i = 0; i < prioritized.length; i++) {\r\n this[prioritized[i].unit](units[prioritized[i].unit]);\r\n }\r\n } else {\r\n units = normalizeUnits(units);\r\n if (isFunction(this[units])) {\r\n return this[units](value);\r\n }\r\n }\r\n return this;\r\n }\r\n\r\n function mod(n, x) {\r\n return ((n % x) + x) % x;\r\n }\r\n\r\n var indexOf;\r\n\r\n if (Array.prototype.indexOf) {\r\n indexOf = Array.prototype.indexOf;\r\n } else {\r\n indexOf = function (o) {\r\n // I know\r\n var i;\r\n for (i = 0; i < this.length; ++i) {\r\n if (this[i] === o) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n };\r\n }\r\n\r\n function daysInMonth(year, month) {\r\n if (isNaN(year) || isNaN(month)) {\r\n return NaN;\r\n }\r\n var modMonth = mod(month, 12);\r\n year += (month - modMonth) / 12;\r\n return modMonth === 1 ? (isLeapYear(year) ? 29 : 28) : (31 - modMonth % 7 % 2);\r\n }\r\n\r\n // FORMATTING\r\n\r\n addFormatToken('M', ['MM', 2], 'Mo', function () {\r\n return this.month() + 1;\r\n });\r\n\r\n addFormatToken('MMM', 0, 0, function (format) {\r\n return this.localeData().monthsShort(this, format);\r\n });\r\n\r\n addFormatToken('MMMM', 0, 0, function (format) {\r\n return this.localeData().months(this, format);\r\n });\r\n\r\n // ALIASES\r\n\r\n addUnitAlias('month', 'M');\r\n\r\n // PRIORITY\r\n\r\n addUnitPriority('month', 8);\r\n\r\n // PARSING\r\n\r\n addRegexToken('M', match1to2);\r\n addRegexToken('MM', match1to2, match2);\r\n addRegexToken('MMM', function (isStrict, locale) {\r\n return locale.monthsShortRegex(isStrict);\r\n });\r\n addRegexToken('MMMM', function (isStrict, locale) {\r\n return locale.monthsRegex(isStrict);\r\n });\r\n\r\n addParseToken(['M', 'MM'], function (input, array) {\r\n array[MONTH] = toInt(input) - 1;\r\n });\r\n\r\n addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\r\n var month = config._locale.monthsParse(input, token, config._strict);\r\n // if we didn't find a month name, mark the date as invalid.\r\n if (month != null) {\r\n array[MONTH] = month;\r\n } else {\r\n getParsingFlags(config).invalidMonth = input;\r\n }\r\n });\r\n\r\n // LOCALES\r\n\r\n var MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/;\r\n var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');\r\n function localeMonths (m, format) {\r\n if (!m) {\r\n return isArray(this._months) ? this._months :\r\n this._months['standalone'];\r\n }\r\n return isArray(this._months) ? this._months[m.month()] :\r\n this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];\r\n }\r\n\r\n var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');\r\n function localeMonthsShort (m, format) {\r\n if (!m) {\r\n return isArray(this._monthsShort) ? this._monthsShort :\r\n this._monthsShort['standalone'];\r\n }\r\n return isArray(this._monthsShort) ? this._monthsShort[m.month()] :\r\n this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];\r\n }\r\n\r\n function handleStrictParse(monthName, format, strict) {\r\n var i, ii, mom, llc = monthName.toLocaleLowerCase();\r\n if (!this._monthsParse) {\r\n // this is not used\r\n this._monthsParse = [];\r\n this._longMonthsParse = [];\r\n this._shortMonthsParse = [];\r\n for (i = 0; i < 12; ++i) {\r\n mom = createUTC([2000, i]);\r\n this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();\r\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\r\n }\r\n }\r\n\r\n if (strict) {\r\n if (format === 'MMM') {\r\n ii = indexOf.call(this._shortMonthsParse, llc);\r\n return ii !== -1 ? ii : null;\r\n } else {\r\n ii = indexOf.call(this._longMonthsParse, llc);\r\n return ii !== -1 ? ii : null;\r\n }\r\n } else {\r\n if (format === 'MMM') {\r\n ii = indexOf.call(this._shortMonthsParse, llc);\r\n if (ii !== -1) {\r\n return ii;\r\n }\r\n ii = indexOf.call(this._longMonthsParse, llc);\r\n return ii !== -1 ? ii : null;\r\n } else {\r\n ii = indexOf.call(this._longMonthsParse, llc);\r\n if (ii !== -1) {\r\n return ii;\r\n }\r\n ii = indexOf.call(this._shortMonthsParse, llc);\r\n return ii !== -1 ? ii : null;\r\n }\r\n }\r\n }\r\n\r\n function localeMonthsParse (monthName, format, strict) {\r\n var i, mom, regex;\r\n\r\n if (this._monthsParseExact) {\r\n return handleStrictParse.call(this, monthName, format, strict);\r\n }\r\n\r\n if (!this._monthsParse) {\r\n this._monthsParse = [];\r\n this._longMonthsParse = [];\r\n this._shortMonthsParse = [];\r\n }\r\n\r\n // TODO: add sorting\r\n // Sorting makes sure if one month (or abbr) is a prefix of another\r\n // see sorting in computeMonthsParse\r\n for (i = 0; i < 12; i++) {\r\n // make the regex if we don't have it already\r\n mom = createUTC([2000, i]);\r\n if (strict && !this._longMonthsParse[i]) {\r\n this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');\r\n this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');\r\n }\r\n if (!strict && !this._monthsParse[i]) {\r\n regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\r\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\r\n }\r\n // test the regex\r\n if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {\r\n return i;\r\n } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {\r\n return i;\r\n } else if (!strict && this._monthsParse[i].test(monthName)) {\r\n return i;\r\n }\r\n }\r\n }\r\n\r\n // MOMENTS\r\n\r\n function setMonth (mom, value) {\r\n var dayOfMonth;\r\n\r\n if (!mom.isValid()) {\r\n // No op\r\n return mom;\r\n }\r\n\r\n if (typeof value === 'string') {\r\n if (/^\\d+$/.test(value)) {\r\n value = toInt(value);\r\n } else {\r\n value = mom.localeData().monthsParse(value);\r\n // TODO: Another silent failure?\r\n if (!isNumber(value)) {\r\n return mom;\r\n }\r\n }\r\n }\r\n\r\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\r\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\r\n return mom;\r\n }\r\n\r\n function getSetMonth (value) {\r\n if (value != null) {\r\n setMonth(this, value);\r\n hooks.updateOffset(this, true);\r\n return this;\r\n } else {\r\n return get(this, 'Month');\r\n }\r\n }\r\n\r\n function getDaysInMonth () {\r\n return daysInMonth(this.year(), this.month());\r\n }\r\n\r\n var defaultMonthsShortRegex = matchWord;\r\n function monthsShortRegex (isStrict) {\r\n if (this._monthsParseExact) {\r\n if (!hasOwnProp(this, '_monthsRegex')) {\r\n computeMonthsParse.call(this);\r\n }\r\n if (isStrict) {\r\n return this._monthsShortStrictRegex;\r\n } else {\r\n return this._monthsShortRegex;\r\n }\r\n } else {\r\n if (!hasOwnProp(this, '_monthsShortRegex')) {\r\n this._monthsShortRegex = defaultMonthsShortRegex;\r\n }\r\n return this._monthsShortStrictRegex && isStrict ?\r\n this._monthsShortStrictRegex : this._monthsShortRegex;\r\n }\r\n }\r\n\r\n var defaultMonthsRegex = matchWord;\r\n function monthsRegex (isStrict) {\r\n if (this._monthsParseExact) {\r\n if (!hasOwnProp(this, '_monthsRegex')) {\r\n computeMonthsParse.call(this);\r\n }\r\n if (isStrict) {\r\n return this._monthsStrictRegex;\r\n } else {\r\n return this._monthsRegex;\r\n }\r\n } else {\r\n if (!hasOwnProp(this, '_monthsRegex')) {\r\n this._monthsRegex = defaultMonthsRegex;\r\n }\r\n return this._monthsStrictRegex && isStrict ?\r\n this._monthsStrictRegex : this._monthsRegex;\r\n }\r\n }\r\n\r\n function computeMonthsParse () {\r\n function cmpLenRev(a, b) {\r\n return b.length - a.length;\r\n }\r\n\r\n var shortPieces = [], longPieces = [], mixedPieces = [],\r\n i, mom;\r\n for (i = 0; i < 12; i++) {\r\n // make the regex if we don't have it already\r\n mom = createUTC([2000, i]);\r\n shortPieces.push(this.monthsShort(mom, ''));\r\n longPieces.push(this.months(mom, ''));\r\n mixedPieces.push(this.months(mom, ''));\r\n mixedPieces.push(this.monthsShort(mom, ''));\r\n }\r\n // Sorting makes sure if one month (or abbr) is a prefix of another it\r\n // will match the longer piece.\r\n shortPieces.sort(cmpLenRev);\r\n longPieces.sort(cmpLenRev);\r\n mixedPieces.sort(cmpLenRev);\r\n for (i = 0; i < 12; i++) {\r\n shortPieces[i] = regexEscape(shortPieces[i]);\r\n longPieces[i] = regexEscape(longPieces[i]);\r\n }\r\n for (i = 0; i < 24; i++) {\r\n mixedPieces[i] = regexEscape(mixedPieces[i]);\r\n }\r\n\r\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\r\n this._monthsShortRegex = this._monthsRegex;\r\n this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\r\n this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\r\n }\r\n\r\n function createDate (y, m, d, h, M, s, ms) {\r\n // can't just apply() to create a date:\r\n // https://stackoverflow.com/q/181348\r\n var date = new Date(y, m, d, h, M, s, ms);\r\n\r\n // the date constructor remaps years 0-99 to 1900-1999\r\n if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {\r\n date.setFullYear(y);\r\n }\r\n return date;\r\n }\r\n\r\n function createUTCDate (y) {\r\n var date = new Date(Date.UTC.apply(null, arguments));\r\n\r\n // the Date.UTC function remaps years 0-99 to 1900-1999\r\n if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {\r\n date.setUTCFullYear(y);\r\n }\r\n return date;\r\n }\r\n\r\n // start-of-first-week - start-of-year\r\n function firstWeekOffset(year, dow, doy) {\r\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\r\n fwd = 7 + dow - doy,\r\n // first-week day local weekday -- which local weekday is fwd\r\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\r\n\r\n return -fwdlw + fwd - 1;\r\n }\r\n\r\n // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\r\n function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\r\n var localWeekday = (7 + weekday - dow) % 7,\r\n weekOffset = firstWeekOffset(year, dow, doy),\r\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\r\n resYear, resDayOfYear;\r\n\r\n if (dayOfYear <= 0) {\r\n resYear = year - 1;\r\n resDayOfYear = daysInYear(resYear) + dayOfYear;\r\n } else if (dayOfYear > daysInYear(year)) {\r\n resYear = year + 1;\r\n resDayOfYear = dayOfYear - daysInYear(year);\r\n } else {\r\n resYear = year;\r\n resDayOfYear = dayOfYear;\r\n }\r\n\r\n return {\r\n year: resYear,\r\n dayOfYear: resDayOfYear\r\n };\r\n }\r\n\r\n function weekOfYear(mom, dow, doy) {\r\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\r\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\r\n resWeek, resYear;\r\n\r\n if (week < 1) {\r\n resYear = mom.year() - 1;\r\n resWeek = week + weeksInYear(resYear, dow, doy);\r\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\r\n resWeek = week - weeksInYear(mom.year(), dow, doy);\r\n resYear = mom.year() + 1;\r\n } else {\r\n resYear = mom.year();\r\n resWeek = week;\r\n }\r\n\r\n return {\r\n week: resWeek,\r\n year: resYear\r\n };\r\n }\r\n\r\n function weeksInYear(year, dow, doy) {\r\n var weekOffset = firstWeekOffset(year, dow, doy),\r\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\r\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\r\n }\r\n\r\n // FORMATTING\r\n\r\n addFormatToken('w', ['ww', 2], 'wo', 'week');\r\n addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\r\n\r\n // ALIASES\r\n\r\n addUnitAlias('week', 'w');\r\n addUnitAlias('isoWeek', 'W');\r\n\r\n // PRIORITIES\r\n\r\n addUnitPriority('week', 5);\r\n addUnitPriority('isoWeek', 5);\r\n\r\n // PARSING\r\n\r\n addRegexToken('w', match1to2);\r\n addRegexToken('ww', match1to2, match2);\r\n addRegexToken('W', match1to2);\r\n addRegexToken('WW', match1to2, match2);\r\n\r\n addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {\r\n week[token.substr(0, 1)] = toInt(input);\r\n });\r\n\r\n // HELPERS\r\n\r\n // LOCALES\r\n\r\n function localeWeek (mom) {\r\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\r\n }\r\n\r\n var defaultLocaleWeek = {\r\n dow : 0, // Sunday is the first day of the week.\r\n doy : 6 // The week that contains Jan 1st is the first week of the year.\r\n };\r\n\r\n function localeFirstDayOfWeek () {\r\n return this._week.dow;\r\n }\r\n\r\n function localeFirstDayOfYear () {\r\n return this._week.doy;\r\n }\r\n\r\n // MOMENTS\r\n\r\n function getSetWeek (input) {\r\n var week = this.localeData().week(this);\r\n return input == null ? week : this.add((input - week) * 7, 'd');\r\n }\r\n\r\n function getSetISOWeek (input) {\r\n var week = weekOfYear(this, 1, 4).week;\r\n return input == null ? week : this.add((input - week) * 7, 'd');\r\n }\r\n\r\n // FORMATTING\r\n\r\n addFormatToken('d', 0, 'do', 'day');\r\n\r\n addFormatToken('dd', 0, 0, function (format) {\r\n return this.localeData().weekdaysMin(this, format);\r\n });\r\n\r\n addFormatToken('ddd', 0, 0, function (format) {\r\n return this.localeData().weekdaysShort(this, format);\r\n });\r\n\r\n addFormatToken('dddd', 0, 0, function (format) {\r\n return this.localeData().weekdays(this, format);\r\n });\r\n\r\n addFormatToken('e', 0, 0, 'weekday');\r\n addFormatToken('E', 0, 0, 'isoWeekday');\r\n\r\n // ALIASES\r\n\r\n addUnitAlias('day', 'd');\r\n addUnitAlias('weekday', 'e');\r\n addUnitAlias('isoWeekday', 'E');\r\n\r\n // PRIORITY\r\n addUnitPriority('day', 11);\r\n addUnitPriority('weekday', 11);\r\n addUnitPriority('isoWeekday', 11);\r\n\r\n // PARSING\r\n\r\n addRegexToken('d', match1to2);\r\n addRegexToken('e', match1to2);\r\n addRegexToken('E', match1to2);\r\n addRegexToken('dd', function (isStrict, locale) {\r\n return locale.weekdaysMinRegex(isStrict);\r\n });\r\n addRegexToken('ddd', function (isStrict, locale) {\r\n return locale.weekdaysShortRegex(isStrict);\r\n });\r\n addRegexToken('dddd', function (isStrict, locale) {\r\n return locale.weekdaysRegex(isStrict);\r\n });\r\n\r\n addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\r\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\r\n // if we didn't get a weekday name, mark the date as invalid\r\n if (weekday != null) {\r\n week.d = weekday;\r\n } else {\r\n getParsingFlags(config).invalidWeekday = input;\r\n }\r\n });\r\n\r\n addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\r\n week[token] = toInt(input);\r\n });\r\n\r\n // HELPERS\r\n\r\n function parseWeekday(input, locale) {\r\n if (typeof input !== 'string') {\r\n return input;\r\n }\r\n\r\n if (!isNaN(input)) {\r\n return parseInt(input, 10);\r\n }\r\n\r\n input = locale.weekdaysParse(input);\r\n if (typeof input === 'number') {\r\n return input;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n function parseIsoWeekday(input, locale) {\r\n if (typeof input === 'string') {\r\n return locale.weekdaysParse(input) % 7 || 7;\r\n }\r\n return isNaN(input) ? null : input;\r\n }\r\n\r\n // LOCALES\r\n\r\n var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');\r\n function localeWeekdays (m, format) {\r\n if (!m) {\r\n return isArray(this._weekdays) ? this._weekdays :\r\n this._weekdays['standalone'];\r\n }\r\n return isArray(this._weekdays) ? this._weekdays[m.day()] :\r\n this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()];\r\n }\r\n\r\n var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');\r\n function localeWeekdaysShort (m) {\r\n return (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort;\r\n }\r\n\r\n var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');\r\n function localeWeekdaysMin (m) {\r\n return (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin;\r\n }\r\n\r\n function handleStrictParse$1(weekdayName, format, strict) {\r\n var i, ii, mom, llc = weekdayName.toLocaleLowerCase();\r\n if (!this._weekdaysParse) {\r\n this._weekdaysParse = [];\r\n this._shortWeekdaysParse = [];\r\n this._minWeekdaysParse = [];\r\n\r\n for (i = 0; i < 7; ++i) {\r\n mom = createUTC([2000, 1]).day(i);\r\n this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();\r\n this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();\r\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\r\n }\r\n }\r\n\r\n if (strict) {\r\n if (format === 'dddd') {\r\n ii = indexOf.call(this._weekdaysParse, llc);\r\n return ii !== -1 ? ii : null;\r\n } else if (format === 'ddd') {\r\n ii = indexOf.call(this._shortWeekdaysParse, llc);\r\n return ii !== -1 ? ii : null;\r\n } else {\r\n ii = indexOf.call(this._minWeekdaysParse, llc);\r\n return ii !== -1 ? ii : null;\r\n }\r\n } else {\r\n if (format === 'dddd') {\r\n ii = indexOf.call(this._weekdaysParse, llc);\r\n if (ii !== -1) {\r\n return ii;\r\n }\r\n ii = indexOf.call(this._shortWeekdaysParse, llc);\r\n if (ii !== -1) {\r\n return ii;\r\n }\r\n ii = indexOf.call(this._minWeekdaysParse, llc);\r\n return ii !== -1 ? ii : null;\r\n } else if (format === 'ddd') {\r\n ii = indexOf.call(this._shortWeekdaysParse, llc);\r\n if (ii !== -1) {\r\n return ii;\r\n }\r\n ii = indexOf.call(this._weekdaysParse, llc);\r\n if (ii !== -1) {\r\n return ii;\r\n }\r\n ii = indexOf.call(this._minWeekdaysParse, llc);\r\n return ii !== -1 ? ii : null;\r\n } else {\r\n ii = indexOf.call(this._minWeekdaysParse, llc);\r\n if (ii !== -1) {\r\n return ii;\r\n }\r\n ii = indexOf.call(this._weekdaysParse, llc);\r\n if (ii !== -1) {\r\n return ii;\r\n }\r\n ii = indexOf.call(this._shortWeekdaysParse, llc);\r\n return ii !== -1 ? ii : null;\r\n }\r\n }\r\n }\r\n\r\n function localeWeekdaysParse (weekdayName, format, strict) {\r\n var i, mom, regex;\r\n\r\n if (this._weekdaysParseExact) {\r\n return handleStrictParse$1.call(this, weekdayName, format, strict);\r\n }\r\n\r\n if (!this._weekdaysParse) {\r\n this._weekdaysParse = [];\r\n this._minWeekdaysParse = [];\r\n this._shortWeekdaysParse = [];\r\n this._fullWeekdaysParse = [];\r\n }\r\n\r\n for (i = 0; i < 7; i++) {\r\n // make the regex if we don't have it already\r\n\r\n mom = createUTC([2000, 1]).day(i);\r\n if (strict && !this._fullWeekdaysParse[i]) {\r\n this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$', 'i');\r\n this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$', 'i');\r\n this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$', 'i');\r\n }\r\n if (!this._weekdaysParse[i]) {\r\n regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');\r\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\r\n }\r\n // test the regex\r\n if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {\r\n return i;\r\n } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {\r\n return i;\r\n } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {\r\n return i;\r\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\r\n return i;\r\n }\r\n }\r\n }\r\n\r\n // MOMENTS\r\n\r\n function getSetDayOfWeek (input) {\r\n if (!this.isValid()) {\r\n return input != null ? this : NaN;\r\n }\r\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\r\n if (input != null) {\r\n input = parseWeekday(input, this.localeData());\r\n return this.add(input - day, 'd');\r\n } else {\r\n return day;\r\n }\r\n }\r\n\r\n function getSetLocaleDayOfWeek (input) {\r\n if (!this.isValid()) {\r\n return input != null ? this : NaN;\r\n }\r\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\r\n return input == null ? weekday : this.add(input - weekday, 'd');\r\n }\r\n\r\n function getSetISODayOfWeek (input) {\r\n if (!this.isValid()) {\r\n return input != null ? this : NaN;\r\n }\r\n\r\n // behaves the same as moment#day except\r\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\r\n // as a setter, sunday should belong to the previous week.\r\n\r\n if (input != null) {\r\n var weekday = parseIsoWeekday(input, this.localeData());\r\n return this.day(this.day() % 7 ? weekday : weekday - 7);\r\n } else {\r\n return this.day() || 7;\r\n }\r\n }\r\n\r\n var defaultWeekdaysRegex = matchWord;\r\n function weekdaysRegex (isStrict) {\r\n if (this._weekdaysParseExact) {\r\n if (!hasOwnProp(this, '_weekdaysRegex')) {\r\n computeWeekdaysParse.call(this);\r\n }\r\n if (isStrict) {\r\n return this._weekdaysStrictRegex;\r\n } else {\r\n return this._weekdaysRegex;\r\n }\r\n } else {\r\n if (!hasOwnProp(this, '_weekdaysRegex')) {\r\n this._weekdaysRegex = defaultWeekdaysRegex;\r\n }\r\n return this._weekdaysStrictRegex && isStrict ?\r\n this._weekdaysStrictRegex : this._weekdaysRegex;\r\n }\r\n }\r\n\r\n var defaultWeekdaysShortRegex = matchWord;\r\n function weekdaysShortRegex (isStrict) {\r\n if (this._weekdaysParseExact) {\r\n if (!hasOwnProp(this, '_weekdaysRegex')) {\r\n computeWeekdaysParse.call(this);\r\n }\r\n if (isStrict) {\r\n return this._weekdaysShortStrictRegex;\r\n } else {\r\n return this._weekdaysShortRegex;\r\n }\r\n } else {\r\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\r\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\r\n }\r\n return this._weekdaysShortStrictRegex && isStrict ?\r\n this._weekdaysShortStrictRegex : this._weekdaysShortRegex;\r\n }\r\n }\r\n\r\n var defaultWeekdaysMinRegex = matchWord;\r\n function weekdaysMinRegex (isStrict) {\r\n if (this._weekdaysParseExact) {\r\n if (!hasOwnProp(this, '_weekdaysRegex')) {\r\n computeWeekdaysParse.call(this);\r\n }\r\n if (isStrict) {\r\n return this._weekdaysMinStrictRegex;\r\n } else {\r\n return this._weekdaysMinRegex;\r\n }\r\n } else {\r\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\r\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\r\n }\r\n return this._weekdaysMinStrictRegex && isStrict ?\r\n this._weekdaysMinStrictRegex : this._weekdaysMinRegex;\r\n }\r\n }\r\n\r\n\r\n function computeWeekdaysParse () {\r\n function cmpLenRev(a, b) {\r\n return b.length - a.length;\r\n }\r\n\r\n var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [],\r\n i, mom, minp, shortp, longp;\r\n for (i = 0; i < 7; i++) {\r\n // make the regex if we don't have it already\r\n mom = createUTC([2000, 1]).day(i);\r\n minp = this.weekdaysMin(mom, '');\r\n shortp = this.weekdaysShort(mom, '');\r\n longp = this.weekdays(mom, '');\r\n minPieces.push(minp);\r\n shortPieces.push(shortp);\r\n longPieces.push(longp);\r\n mixedPieces.push(minp);\r\n mixedPieces.push(shortp);\r\n mixedPieces.push(longp);\r\n }\r\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\r\n // will match the longer piece.\r\n minPieces.sort(cmpLenRev);\r\n shortPieces.sort(cmpLenRev);\r\n longPieces.sort(cmpLenRev);\r\n mixedPieces.sort(cmpLenRev);\r\n for (i = 0; i < 7; i++) {\r\n shortPieces[i] = regexEscape(shortPieces[i]);\r\n longPieces[i] = regexEscape(longPieces[i]);\r\n mixedPieces[i] = regexEscape(mixedPieces[i]);\r\n }\r\n\r\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\r\n this._weekdaysShortRegex = this._weekdaysRegex;\r\n this._weekdaysMinRegex = this._weekdaysRegex;\r\n\r\n this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\r\n this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\r\n this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');\r\n }\r\n\r\n // FORMATTING\r\n\r\n function hFormat() {\r\n return this.hours() % 12 || 12;\r\n }\r\n\r\n function kFormat() {\r\n return this.hours() || 24;\r\n }\r\n\r\n addFormatToken('H', ['HH', 2], 0, 'hour');\r\n addFormatToken('h', ['hh', 2], 0, hFormat);\r\n addFormatToken('k', ['kk', 2], 0, kFormat);\r\n\r\n addFormatToken('hmm', 0, 0, function () {\r\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\r\n });\r\n\r\n addFormatToken('hmmss', 0, 0, function () {\r\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) +\r\n zeroFill(this.seconds(), 2);\r\n });\r\n\r\n addFormatToken('Hmm', 0, 0, function () {\r\n return '' + this.hours() + zeroFill(this.minutes(), 2);\r\n });\r\n\r\n addFormatToken('Hmmss', 0, 0, function () {\r\n return '' + this.hours() + zeroFill(this.minutes(), 2) +\r\n zeroFill(this.seconds(), 2);\r\n });\r\n\r\n function meridiem (token, lowercase) {\r\n addFormatToken(token, 0, 0, function () {\r\n return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);\r\n });\r\n }\r\n\r\n meridiem('a', true);\r\n meridiem('A', false);\r\n\r\n // ALIASES\r\n\r\n addUnitAlias('hour', 'h');\r\n\r\n // PRIORITY\r\n addUnitPriority('hour', 13);\r\n\r\n // PARSING\r\n\r\n function matchMeridiem (isStrict, locale) {\r\n return locale._meridiemParse;\r\n }\r\n\r\n addRegexToken('a', matchMeridiem);\r\n addRegexToken('A', matchMeridiem);\r\n addRegexToken('H', match1to2);\r\n addRegexToken('h', match1to2);\r\n addRegexToken('k', match1to2);\r\n addRegexToken('HH', match1to2, match2);\r\n addRegexToken('hh', match1to2, match2);\r\n addRegexToken('kk', match1to2, match2);\r\n\r\n addRegexToken('hmm', match3to4);\r\n addRegexToken('hmmss', match5to6);\r\n addRegexToken('Hmm', match3to4);\r\n addRegexToken('Hmmss', match5to6);\r\n\r\n addParseToken(['H', 'HH'], HOUR);\r\n addParseToken(['k', 'kk'], function (input, array, config) {\r\n var kInput = toInt(input);\r\n array[HOUR] = kInput === 24 ? 0 : kInput;\r\n });\r\n addParseToken(['a', 'A'], function (input, array, config) {\r\n config._isPm = config._locale.isPM(input);\r\n config._meridiem = input;\r\n });\r\n addParseToken(['h', 'hh'], function (input, array, config) {\r\n array[HOUR] = toInt(input);\r\n getParsingFlags(config).bigHour = true;\r\n });\r\n addParseToken('hmm', function (input, array, config) {\r\n var pos = input.length - 2;\r\n array[HOUR] = toInt(input.substr(0, pos));\r\n array[MINUTE] = toInt(input.substr(pos));\r\n getParsingFlags(config).bigHour = true;\r\n });\r\n addParseToken('hmmss', function (input, array, config) {\r\n var pos1 = input.length - 4;\r\n var pos2 = input.length - 2;\r\n array[HOUR] = toInt(input.substr(0, pos1));\r\n array[MINUTE] = toInt(input.substr(pos1, 2));\r\n array[SECOND] = toInt(input.substr(pos2));\r\n getParsingFlags(config).bigHour = true;\r\n });\r\n addParseToken('Hmm', function (input, array, config) {\r\n var pos = input.length - 2;\r\n array[HOUR] = toInt(input.substr(0, pos));\r\n array[MINUTE] = toInt(input.substr(pos));\r\n });\r\n addParseToken('Hmmss', function (input, array, config) {\r\n var pos1 = input.length - 4;\r\n var pos2 = input.length - 2;\r\n array[HOUR] = toInt(input.substr(0, pos1));\r\n array[MINUTE] = toInt(input.substr(pos1, 2));\r\n array[SECOND] = toInt(input.substr(pos2));\r\n });\r\n\r\n // LOCALES\r\n\r\n function localeIsPM (input) {\r\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\r\n // Using charAt should be more compatible.\r\n return ((input + '').toLowerCase().charAt(0) === 'p');\r\n }\r\n\r\n var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i;\r\n function localeMeridiem (hours, minutes, isLower) {\r\n if (hours > 11) {\r\n return isLower ? 'pm' : 'PM';\r\n } else {\r\n return isLower ? 'am' : 'AM';\r\n }\r\n }\r\n\r\n\r\n // MOMENTS\r\n\r\n // Setting the hour should keep the time, because the user explicitly\r\n // specified which hour they want. So trying to maintain the same hour (in\r\n // a new timezone) makes sense. Adding/subtracting hours does not follow\r\n // this rule.\r\n var getSetHour = makeGetSet('Hours', true);\r\n\r\n var baseConfig = {\r\n calendar: defaultCalendar,\r\n longDateFormat: defaultLongDateFormat,\r\n invalidDate: defaultInvalidDate,\r\n ordinal: defaultOrdinal,\r\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\r\n relativeTime: defaultRelativeTime,\r\n\r\n months: defaultLocaleMonths,\r\n monthsShort: defaultLocaleMonthsShort,\r\n\r\n week: defaultLocaleWeek,\r\n\r\n weekdays: defaultLocaleWeekdays,\r\n weekdaysMin: defaultLocaleWeekdaysMin,\r\n weekdaysShort: defaultLocaleWeekdaysShort,\r\n\r\n meridiemParse: defaultLocaleMeridiemParse\r\n };\r\n\r\n // internal storage for locale config files\r\n var locales = {};\r\n var localeFamilies = {};\r\n var globalLocale;\r\n\r\n function normalizeLocale(key) {\r\n return key ? key.toLowerCase().replace('_', '-') : key;\r\n }\r\n\r\n // pick the locale from the array\r\n // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\r\n // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\r\n function chooseLocale(names) {\r\n var i = 0, j, next, locale, split;\r\n\r\n while (i < names.length) {\r\n split = normalizeLocale(names[i]).split('-');\r\n j = split.length;\r\n next = normalizeLocale(names[i + 1]);\r\n next = next ? next.split('-') : null;\r\n while (j > 0) {\r\n locale = loadLocale(split.slice(0, j).join('-'));\r\n if (locale) {\r\n return locale;\r\n }\r\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\r\n //the next array item is better than a shallower substring of this one\r\n break;\r\n }\r\n j--;\r\n }\r\n i++;\r\n }\r\n return globalLocale;\r\n }\r\n\r\n function loadLocale(name) {\r\n var oldLocale = null;\r\n // TODO: Find a better way to register and load all the locales in Node\r\n if (!locales[name] && (typeof module !== 'undefined') &&\r\n module && module.exports) {\r\n try {\r\n oldLocale = globalLocale._abbr;\r\n var aliasedRequire = require;\r\n aliasedRequire('./locale/' + name);\r\n getSetGlobalLocale(oldLocale);\r\n } catch (e) {}\r\n }\r\n return locales[name];\r\n }\r\n\r\n // This function will load locale and then set the global locale. If\r\n // no arguments are passed in, it will simply return the current global\r\n // locale key.\r\n function getSetGlobalLocale (key, values) {\r\n var data;\r\n if (key) {\r\n if (isUndefined(values)) {\r\n data = getLocale(key);\r\n }\r\n else {\r\n data = defineLocale(key, values);\r\n }\r\n\r\n if (data) {\r\n // moment.duration._locale = moment._locale = data;\r\n globalLocale = data;\r\n }\r\n else {\r\n if ((typeof console !== 'undefined') && console.warn) {\r\n //warn user if arguments are passed but the locale could not be set\r\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\r\n }\r\n }\r\n }\r\n\r\n return globalLocale._abbr;\r\n }\r\n\r\n function defineLocale (name, config) {\r\n if (config !== null) {\r\n var locale, parentConfig = baseConfig;\r\n config.abbr = name;\r\n if (locales[name] != null) {\r\n deprecateSimple('defineLocaleOverride',\r\n 'use moment.updateLocale(localeName, config) to change ' +\r\n 'an existing locale. moment.defineLocale(localeName, ' +\r\n 'config) should only be used for creating a new locale ' +\r\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');\r\n parentConfig = locales[name]._config;\r\n } else if (config.parentLocale != null) {\r\n if (locales[config.parentLocale] != null) {\r\n parentConfig = locales[config.parentLocale]._config;\r\n } else {\r\n locale = loadLocale(config.parentLocale);\r\n if (locale != null) {\r\n parentConfig = locale._config;\r\n } else {\r\n if (!localeFamilies[config.parentLocale]) {\r\n localeFamilies[config.parentLocale] = [];\r\n }\r\n localeFamilies[config.parentLocale].push({\r\n name: name,\r\n config: config\r\n });\r\n return null;\r\n }\r\n }\r\n }\r\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\r\n\r\n if (localeFamilies[name]) {\r\n localeFamilies[name].forEach(function (x) {\r\n defineLocale(x.name, x.config);\r\n });\r\n }\r\n\r\n // backwards compat for now: also set the locale\r\n // make sure we set the locale AFTER all child locales have been\r\n // created, so we won't end up with the child locale set.\r\n getSetGlobalLocale(name);\r\n\r\n\r\n return locales[name];\r\n } else {\r\n // useful for testing\r\n delete locales[name];\r\n return null;\r\n }\r\n }\r\n\r\n function updateLocale(name, config) {\r\n if (config != null) {\r\n var locale, tmpLocale, parentConfig = baseConfig;\r\n // MERGE\r\n tmpLocale = loadLocale(name);\r\n if (tmpLocale != null) {\r\n parentConfig = tmpLocale._config;\r\n }\r\n config = mergeConfigs(parentConfig, config);\r\n locale = new Locale(config);\r\n locale.parentLocale = locales[name];\r\n locales[name] = locale;\r\n\r\n // backwards compat for now: also set the locale\r\n getSetGlobalLocale(name);\r\n } else {\r\n // pass null for config to unupdate, useful for tests\r\n if (locales[name] != null) {\r\n if (locales[name].parentLocale != null) {\r\n locales[name] = locales[name].parentLocale;\r\n } else if (locales[name] != null) {\r\n delete locales[name];\r\n }\r\n }\r\n }\r\n return locales[name];\r\n }\r\n\r\n // returns locale data\r\n function getLocale (key) {\r\n var locale;\r\n\r\n if (key && key._locale && key._locale._abbr) {\r\n key = key._locale._abbr;\r\n }\r\n\r\n if (!key) {\r\n return globalLocale;\r\n }\r\n\r\n if (!isArray(key)) {\r\n //short-circuit everything else\r\n locale = loadLocale(key);\r\n if (locale) {\r\n return locale;\r\n }\r\n key = [key];\r\n }\r\n\r\n return chooseLocale(key);\r\n }\r\n\r\n function listLocales() {\r\n return keys(locales);\r\n }\r\n\r\n function checkOverflow (m) {\r\n var overflow;\r\n var a = m._a;\r\n\r\n if (a && getParsingFlags(m).overflow === -2) {\r\n overflow =\r\n a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :\r\n a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :\r\n a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :\r\n a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :\r\n a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :\r\n a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :\r\n -1;\r\n\r\n if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {\r\n overflow = DATE;\r\n }\r\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\r\n overflow = WEEK;\r\n }\r\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\r\n overflow = WEEKDAY;\r\n }\r\n\r\n getParsingFlags(m).overflow = overflow;\r\n }\r\n\r\n return m;\r\n }\r\n\r\n // Pick the first defined of two or three arguments.\r\n function defaults(a, b, c) {\r\n if (a != null) {\r\n return a;\r\n }\r\n if (b != null) {\r\n return b;\r\n }\r\n return c;\r\n }\r\n\r\n function currentDateArray(config) {\r\n // hooks is actually the exported moment object\r\n var nowValue = new Date(hooks.now());\r\n if (config._useUTC) {\r\n return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];\r\n }\r\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\r\n }\r\n\r\n // convert an array to a date.\r\n // the array should mirror the parameters below\r\n // note: all values past the year are optional and will default to the lowest possible value.\r\n // [year, month, day , hour, minute, second, millisecond]\r\n function configFromArray (config) {\r\n var i, date, input = [], currentDate, expectedWeekday, yearToUse;\r\n\r\n if (config._d) {\r\n return;\r\n }\r\n\r\n currentDate = currentDateArray(config);\r\n\r\n //compute day of the year from weeks and weekdays\r\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\r\n dayOfYearFromWeekInfo(config);\r\n }\r\n\r\n //if the day of the year is set, figure out what it is\r\n if (config._dayOfYear != null) {\r\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\r\n\r\n if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\r\n getParsingFlags(config)._overflowDayOfYear = true;\r\n }\r\n\r\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\r\n config._a[MONTH] = date.getUTCMonth();\r\n config._a[DATE] = date.getUTCDate();\r\n }\r\n\r\n // Default to current date.\r\n // * if no year, month, day of month are given, default to today\r\n // * if day of month is given, default month and year\r\n // * if month is given, default only year\r\n // * if year is given, don't default anything\r\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\r\n config._a[i] = input[i] = currentDate[i];\r\n }\r\n\r\n // Zero out whatever was not defaulted, including time\r\n for (; i < 7; i++) {\r\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\r\n }\r\n\r\n // Check for 24:00:00.000\r\n if (config._a[HOUR] === 24 &&\r\n config._a[MINUTE] === 0 &&\r\n config._a[SECOND] === 0 &&\r\n config._a[MILLISECOND] === 0) {\r\n config._nextDay = true;\r\n config._a[HOUR] = 0;\r\n }\r\n\r\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\r\n expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay();\r\n\r\n // Apply timezone offset from input. The actual utcOffset can be changed\r\n // with parseZone.\r\n if (config._tzm != null) {\r\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\r\n }\r\n\r\n if (config._nextDay) {\r\n config._a[HOUR] = 24;\r\n }\r\n\r\n // check for mismatching day of week\r\n if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) {\r\n getParsingFlags(config).weekdayMismatch = true;\r\n }\r\n }\r\n\r\n function dayOfYearFromWeekInfo(config) {\r\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;\r\n\r\n w = config._w;\r\n if (w.GG != null || w.W != null || w.E != null) {\r\n dow = 1;\r\n doy = 4;\r\n\r\n // TODO: We need to take the current isoWeekYear, but that depends on\r\n // how we interpret now (local, utc, fixed offset). So create\r\n // a now version of current config (take local/utc/offset flags, and\r\n // create now).\r\n weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);\r\n week = defaults(w.W, 1);\r\n weekday = defaults(w.E, 1);\r\n if (weekday < 1 || weekday > 7) {\r\n weekdayOverflow = true;\r\n }\r\n } else {\r\n dow = config._locale._week.dow;\r\n doy = config._locale._week.doy;\r\n\r\n var curWeek = weekOfYear(createLocal(), dow, doy);\r\n\r\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\r\n\r\n // Default to current week.\r\n week = defaults(w.w, curWeek.week);\r\n\r\n if (w.d != null) {\r\n // weekday -- low day numbers are considered next week\r\n weekday = w.d;\r\n if (weekday < 0 || weekday > 6) {\r\n weekdayOverflow = true;\r\n }\r\n } else if (w.e != null) {\r\n // local weekday -- counting starts from begining of week\r\n weekday = w.e + dow;\r\n if (w.e < 0 || w.e > 6) {\r\n weekdayOverflow = true;\r\n }\r\n } else {\r\n // default to begining of week\r\n weekday = dow;\r\n }\r\n }\r\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\r\n getParsingFlags(config)._overflowWeeks = true;\r\n } else if (weekdayOverflow != null) {\r\n getParsingFlags(config)._overflowWeekday = true;\r\n } else {\r\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\r\n config._a[YEAR] = temp.year;\r\n config._dayOfYear = temp.dayOfYear;\r\n }\r\n }\r\n\r\n // iso 8601 regex\r\n // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\r\n var extendedIsoRegex = /^\\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)?)?$/;\r\n var basicIsoRegex = /^\\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)?)?$/;\r\n\r\n var tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/;\r\n\r\n var isoDates = [\r\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\r\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\r\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\r\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\r\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\r\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\r\n ['YYYYYYMMDD', /[+-]\\d{10}/],\r\n ['YYYYMMDD', /\\d{8}/],\r\n // YYYYMM is NOT allowed by the standard\r\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\r\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\r\n ['YYYYDDD', /\\d{7}/]\r\n ];\r\n\r\n // iso time formats and regexes\r\n var isoTimes = [\r\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\r\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\r\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\r\n ['HH:mm', /\\d\\d:\\d\\d/],\r\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\r\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\r\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\r\n ['HHmm', /\\d\\d\\d\\d/],\r\n ['HH', /\\d\\d/]\r\n ];\r\n\r\n var aspNetJsonRegex = /^\\/?Date\\((\\-?\\d+)/i;\r\n\r\n // date from iso format\r\n function configFromISO(config) {\r\n var i, l,\r\n string = config._i,\r\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\r\n allowTime, dateFormat, timeFormat, tzFormat;\r\n\r\n if (match) {\r\n getParsingFlags(config).iso = true;\r\n\r\n for (i = 0, l = isoDates.length; i < l; i++) {\r\n if (isoDates[i][1].exec(match[1])) {\r\n dateFormat = isoDates[i][0];\r\n allowTime = isoDates[i][2] !== false;\r\n break;\r\n }\r\n }\r\n if (dateFormat == null) {\r\n config._isValid = false;\r\n return;\r\n }\r\n if (match[3]) {\r\n for (i = 0, l = isoTimes.length; i < l; i++) {\r\n if (isoTimes[i][1].exec(match[3])) {\r\n // match[2] should be 'T' or space\r\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\r\n break;\r\n }\r\n }\r\n if (timeFormat == null) {\r\n config._isValid = false;\r\n return;\r\n }\r\n }\r\n if (!allowTime && timeFormat != null) {\r\n config._isValid = false;\r\n return;\r\n }\r\n if (match[4]) {\r\n if (tzRegex.exec(match[4])) {\r\n tzFormat = 'Z';\r\n } else {\r\n config._isValid = false;\r\n return;\r\n }\r\n }\r\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\r\n configFromStringAndFormat(config);\r\n } else {\r\n config._isValid = false;\r\n }\r\n }\r\n\r\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\r\n var rfc2822 = /^(?:(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}))$/;\r\n\r\n function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {\r\n var result = [\r\n untruncateYear(yearStr),\r\n defaultLocaleMonthsShort.indexOf(monthStr),\r\n parseInt(dayStr, 10),\r\n parseInt(hourStr, 10),\r\n parseInt(minuteStr, 10)\r\n ];\r\n\r\n if (secondStr) {\r\n result.push(parseInt(secondStr, 10));\r\n }\r\n\r\n return result;\r\n }\r\n\r\n function untruncateYear(yearStr) {\r\n var year = parseInt(yearStr, 10);\r\n if (year <= 49) {\r\n return 2000 + year;\r\n } else if (year <= 999) {\r\n return 1900 + year;\r\n }\r\n return year;\r\n }\r\n\r\n function preprocessRFC2822(s) {\r\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\r\n return s.replace(/\\([^)]*\\)|[\\n\\t]/g, ' ').replace(/(\\s\\s+)/g, ' ').replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\r\n }\r\n\r\n function checkWeekday(weekdayStr, parsedInput, config) {\r\n if (weekdayStr) {\r\n // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.\r\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\r\n weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay();\r\n if (weekdayProvided !== weekdayActual) {\r\n getParsingFlags(config).weekdayMismatch = true;\r\n config._isValid = false;\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n var obsOffsets = {\r\n UT: 0,\r\n GMT: 0,\r\n EDT: -4 * 60,\r\n EST: -5 * 60,\r\n CDT: -5 * 60,\r\n CST: -6 * 60,\r\n MDT: -6 * 60,\r\n MST: -7 * 60,\r\n PDT: -7 * 60,\r\n PST: -8 * 60\r\n };\r\n\r\n function calculateOffset(obsOffset, militaryOffset, numOffset) {\r\n if (obsOffset) {\r\n return obsOffsets[obsOffset];\r\n } else if (militaryOffset) {\r\n // the only allowed military tz is Z\r\n return 0;\r\n } else {\r\n var hm = parseInt(numOffset, 10);\r\n var m = hm % 100, h = (hm - m) / 100;\r\n return h * 60 + m;\r\n }\r\n }\r\n\r\n // date and time from ref 2822 format\r\n function configFromRFC2822(config) {\r\n var match = rfc2822.exec(preprocessRFC2822(config._i));\r\n if (match) {\r\n var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]);\r\n if (!checkWeekday(match[1], parsedArray, config)) {\r\n return;\r\n }\r\n\r\n config._a = parsedArray;\r\n config._tzm = calculateOffset(match[8], match[9], match[10]);\r\n\r\n config._d = createUTCDate.apply(null, config._a);\r\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\r\n\r\n getParsingFlags(config).rfc2822 = true;\r\n } else {\r\n config._isValid = false;\r\n }\r\n }\r\n\r\n // date from iso format or fallback\r\n function configFromString(config) {\r\n var matched = aspNetJsonRegex.exec(config._i);\r\n\r\n if (matched !== null) {\r\n config._d = new Date(+matched[1]);\r\n return;\r\n }\r\n\r\n configFromISO(config);\r\n if (config._isValid === false) {\r\n delete config._isValid;\r\n } else {\r\n return;\r\n }\r\n\r\n configFromRFC2822(config);\r\n if (config._isValid === false) {\r\n delete config._isValid;\r\n } else {\r\n return;\r\n }\r\n\r\n // Final attempt, use Input Fallback\r\n hooks.createFromInputFallback(config);\r\n }\r\n\r\n hooks.createFromInputFallback = deprecate(\r\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\r\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\r\n 'discouraged and will be removed in an upcoming major release. Please refer to ' +\r\n 'http://momentjs.com/guides/#/warnings/js-date/ for more info.',\r\n function (config) {\r\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\r\n }\r\n );\r\n\r\n // constant that refers to the ISO standard\r\n hooks.ISO_8601 = function () {};\r\n\r\n // constant that refers to the RFC 2822 form\r\n hooks.RFC_2822 = function () {};\r\n\r\n // date from string and format string\r\n function configFromStringAndFormat(config) {\r\n // TODO: Move this to another part of the creation flow to prevent circular deps\r\n if (config._f === hooks.ISO_8601) {\r\n configFromISO(config);\r\n return;\r\n }\r\n if (config._f === hooks.RFC_2822) {\r\n configFromRFC2822(config);\r\n return;\r\n }\r\n config._a = [];\r\n getParsingFlags(config).empty = true;\r\n\r\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\r\n var string = '' + config._i,\r\n i, parsedInput, tokens, token, skipped,\r\n stringLength = string.length,\r\n totalParsedInputLength = 0;\r\n\r\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\r\n\r\n for (i = 0; i < tokens.length; i++) {\r\n token = tokens[i];\r\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\r\n // console.log('token', token, 'parsedInput', parsedInput,\r\n // 'regex', getParseRegexForToken(token, config));\r\n if (parsedInput) {\r\n skipped = string.substr(0, string.indexOf(parsedInput));\r\n if (skipped.length > 0) {\r\n getParsingFlags(config).unusedInput.push(skipped);\r\n }\r\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\r\n totalParsedInputLength += parsedInput.length;\r\n }\r\n // don't parse if it's not a known token\r\n if (formatTokenFunctions[token]) {\r\n if (parsedInput) {\r\n getParsingFlags(config).empty = false;\r\n }\r\n else {\r\n getParsingFlags(config).unusedTokens.push(token);\r\n }\r\n addTimeToArrayFromToken(token, parsedInput, config);\r\n }\r\n else if (config._strict && !parsedInput) {\r\n getParsingFlags(config).unusedTokens.push(token);\r\n }\r\n }\r\n\r\n // add remaining unparsed input length to the string\r\n getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;\r\n if (string.length > 0) {\r\n getParsingFlags(config).unusedInput.push(string);\r\n }\r\n\r\n // clear _12h flag if hour is <= 12\r\n if (config._a[HOUR] <= 12 &&\r\n getParsingFlags(config).bigHour === true &&\r\n config._a[HOUR] > 0) {\r\n getParsingFlags(config).bigHour = undefined;\r\n }\r\n\r\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\r\n getParsingFlags(config).meridiem = config._meridiem;\r\n // handle meridiem\r\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);\r\n\r\n configFromArray(config);\r\n checkOverflow(config);\r\n }\r\n\r\n\r\n function meridiemFixWrap (locale, hour, meridiem) {\r\n var isPm;\r\n\r\n if (meridiem == null) {\r\n // nothing to do\r\n return hour;\r\n }\r\n if (locale.meridiemHour != null) {\r\n return locale.meridiemHour(hour, meridiem);\r\n } else if (locale.isPM != null) {\r\n // Fallback\r\n isPm = locale.isPM(meridiem);\r\n if (isPm && hour < 12) {\r\n hour += 12;\r\n }\r\n if (!isPm && hour === 12) {\r\n hour = 0;\r\n }\r\n return hour;\r\n } else {\r\n // this is not supposed to happen\r\n return hour;\r\n }\r\n }\r\n\r\n // date from string and array of format strings\r\n function configFromStringAndArray(config) {\r\n var tempConfig,\r\n bestMoment,\r\n\r\n scoreToBeat,\r\n i,\r\n currentScore;\r\n\r\n if (config._f.length === 0) {\r\n getParsingFlags(config).invalidFormat = true;\r\n config._d = new Date(NaN);\r\n return;\r\n }\r\n\r\n for (i = 0; i < config._f.length; i++) {\r\n currentScore = 0;\r\n tempConfig = copyConfig({}, config);\r\n if (config._useUTC != null) {\r\n tempConfig._useUTC = config._useUTC;\r\n }\r\n tempConfig._f = config._f[i];\r\n configFromStringAndFormat(tempConfig);\r\n\r\n if (!isValid(tempConfig)) {\r\n continue;\r\n }\r\n\r\n // if there is any input that was not parsed add a penalty for that format\r\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\r\n\r\n //or tokens\r\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\r\n\r\n getParsingFlags(tempConfig).score = currentScore;\r\n\r\n if (scoreToBeat == null || currentScore < scoreToBeat) {\r\n scoreToBeat = currentScore;\r\n bestMoment = tempConfig;\r\n }\r\n }\r\n\r\n extend(config, bestMoment || tempConfig);\r\n }\r\n\r\n function configFromObject(config) {\r\n if (config._d) {\r\n return;\r\n }\r\n\r\n var i = normalizeObjectUnits(config._i);\r\n config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {\r\n return obj && parseInt(obj, 10);\r\n });\r\n\r\n configFromArray(config);\r\n }\r\n\r\n function createFromConfig (config) {\r\n var res = new Moment(checkOverflow(prepareConfig(config)));\r\n if (res._nextDay) {\r\n // Adding is smart enough around DST\r\n res.add(1, 'd');\r\n res._nextDay = undefined;\r\n }\r\n\r\n return res;\r\n }\r\n\r\n function prepareConfig (config) {\r\n var input = config._i,\r\n format = config._f;\r\n\r\n config._locale = config._locale || getLocale(config._l);\r\n\r\n if (input === null || (format === undefined && input === '')) {\r\n return createInvalid({nullInput: true});\r\n }\r\n\r\n if (typeof input === 'string') {\r\n config._i = input = config._locale.preparse(input);\r\n }\r\n\r\n if (isMoment(input)) {\r\n return new Moment(checkOverflow(input));\r\n } else if (isDate(input)) {\r\n config._d = input;\r\n } else if (isArray(format)) {\r\n configFromStringAndArray(config);\r\n } else if (format) {\r\n configFromStringAndFormat(config);\r\n } else {\r\n configFromInput(config);\r\n }\r\n\r\n if (!isValid(config)) {\r\n config._d = null;\r\n }\r\n\r\n return config;\r\n }\r\n\r\n function configFromInput(config) {\r\n var input = config._i;\r\n if (isUndefined(input)) {\r\n config._d = new Date(hooks.now());\r\n } else if (isDate(input)) {\r\n config._d = new Date(input.valueOf());\r\n } else if (typeof input === 'string') {\r\n configFromString(config);\r\n } else if (isArray(input)) {\r\n config._a = map(input.slice(0), function (obj) {\r\n return parseInt(obj, 10);\r\n });\r\n configFromArray(config);\r\n } else if (isObject(input)) {\r\n configFromObject(config);\r\n } else if (isNumber(input)) {\r\n // from milliseconds\r\n config._d = new Date(input);\r\n } else {\r\n hooks.createFromInputFallback(config);\r\n }\r\n }\r\n\r\n function createLocalOrUTC (input, format, locale, strict, isUTC) {\r\n var c = {};\r\n\r\n if (locale === true || locale === false) {\r\n strict = locale;\r\n locale = undefined;\r\n }\r\n\r\n if ((isObject(input) && isObjectEmpty(input)) ||\r\n (isArray(input) && input.length === 0)) {\r\n input = undefined;\r\n }\r\n // object construction must be done this way.\r\n // https://github.com/moment/moment/issues/1423\r\n c._isAMomentObject = true;\r\n c._useUTC = c._isUTC = isUTC;\r\n c._l = locale;\r\n c._i = input;\r\n c._f = format;\r\n c._strict = strict;\r\n\r\n return createFromConfig(c);\r\n }\r\n\r\n function createLocal (input, format, locale, strict) {\r\n return createLocalOrUTC(input, format, locale, strict, false);\r\n }\r\n\r\n var prototypeMin = deprecate(\r\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\r\n function () {\r\n var other = createLocal.apply(null, arguments);\r\n if (this.isValid() && other.isValid()) {\r\n return other < this ? this : other;\r\n } else {\r\n return createInvalid();\r\n }\r\n }\r\n );\r\n\r\n var prototypeMax = deprecate(\r\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\r\n function () {\r\n var other = createLocal.apply(null, arguments);\r\n if (this.isValid() && other.isValid()) {\r\n return other > this ? this : other;\r\n } else {\r\n return createInvalid();\r\n }\r\n }\r\n );\r\n\r\n // Pick a moment m from moments so that m[fn](other) is true for all\r\n // other. This relies on the function fn to be transitive.\r\n //\r\n // moments should either be an array of moment objects or an array, whose\r\n // first element is an array of moment objects.\r\n function pickBy(fn, moments) {\r\n var res, i;\r\n if (moments.length === 1 && isArray(moments[0])) {\r\n moments = moments[0];\r\n }\r\n if (!moments.length) {\r\n return createLocal();\r\n }\r\n res = moments[0];\r\n for (i = 1; i < moments.length; ++i) {\r\n if (!moments[i].isValid() || moments[i][fn](res)) {\r\n res = moments[i];\r\n }\r\n }\r\n return res;\r\n }\r\n\r\n // TODO: Use [].sort instead?\r\n function min () {\r\n var args = [].slice.call(arguments, 0);\r\n\r\n return pickBy('isBefore', args);\r\n }\r\n\r\n function max () {\r\n var args = [].slice.call(arguments, 0);\r\n\r\n return pickBy('isAfter', args);\r\n }\r\n\r\n var now = function () {\r\n return Date.now ? Date.now() : +(new Date());\r\n };\r\n\r\n var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];\r\n\r\n function isDurationValid(m) {\r\n for (var key in m) {\r\n if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {\r\n return false;\r\n }\r\n }\r\n\r\n var unitHasDecimal = false;\r\n for (var i = 0; i < ordering.length; ++i) {\r\n if (m[ordering[i]]) {\r\n if (unitHasDecimal) {\r\n return false; // only allow non-integers for smallest unit\r\n }\r\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\r\n unitHasDecimal = true;\r\n }\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n function isValid$1() {\r\n return this._isValid;\r\n }\r\n\r\n function createInvalid$1() {\r\n return createDuration(NaN);\r\n }\r\n\r\n function Duration (duration) {\r\n var normalizedInput = normalizeObjectUnits(duration),\r\n years = normalizedInput.year || 0,\r\n quarters = normalizedInput.quarter || 0,\r\n months = normalizedInput.month || 0,\r\n weeks = normalizedInput.week || 0,\r\n days = normalizedInput.day || 0,\r\n hours = normalizedInput.hour || 0,\r\n minutes = normalizedInput.minute || 0,\r\n seconds = normalizedInput.second || 0,\r\n milliseconds = normalizedInput.millisecond || 0;\r\n\r\n this._isValid = isDurationValid(normalizedInput);\r\n\r\n // representation for dateAddRemove\r\n this._milliseconds = +milliseconds +\r\n seconds * 1e3 + // 1000\r\n minutes * 6e4 + // 1000 * 60\r\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\r\n // Because of dateAddRemove treats 24 hours as different from a\r\n // day when working around DST, we need to store them separately\r\n this._days = +days +\r\n weeks * 7;\r\n // It is impossible to translate months into days without knowing\r\n // which months you are are talking about, so we have to store\r\n // it separately.\r\n this._months = +months +\r\n quarters * 3 +\r\n years * 12;\r\n\r\n this._data = {};\r\n\r\n this._locale = getLocale();\r\n\r\n this._bubble();\r\n }\r\n\r\n function isDuration (obj) {\r\n return obj instanceof Duration;\r\n }\r\n\r\n function absRound (number) {\r\n if (number < 0) {\r\n return Math.round(-1 * number) * -1;\r\n } else {\r\n return Math.round(number);\r\n }\r\n }\r\n\r\n // FORMATTING\r\n\r\n function offset (token, separator) {\r\n addFormatToken(token, 0, 0, function () {\r\n var offset = this.utcOffset();\r\n var sign = '+';\r\n if (offset < 0) {\r\n offset = -offset;\r\n sign = '-';\r\n }\r\n return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);\r\n });\r\n }\r\n\r\n offset('Z', ':');\r\n offset('ZZ', '');\r\n\r\n // PARSING\r\n\r\n addRegexToken('Z', matchShortOffset);\r\n addRegexToken('ZZ', matchShortOffset);\r\n addParseToken(['Z', 'ZZ'], function (input, array, config) {\r\n config._useUTC = true;\r\n config._tzm = offsetFromString(matchShortOffset, input);\r\n });\r\n\r\n // HELPERS\r\n\r\n // timezone chunker\r\n // '+10:00' > ['10', '00']\r\n // '-1530' > ['-15', '30']\r\n var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\r\n\r\n function offsetFromString(matcher, string) {\r\n var matches = (string || '').match(matcher);\r\n\r\n if (matches === null) {\r\n return null;\r\n }\r\n\r\n var chunk = matches[matches.length - 1] || [];\r\n var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\r\n var minutes = +(parts[1] * 60) + toInt(parts[2]);\r\n\r\n return minutes === 0 ?\r\n 0 :\r\n parts[0] === '+' ? minutes : -minutes;\r\n }\r\n\r\n // Return a moment from input, that is local/utc/zone equivalent to model.\r\n function cloneWithOffset(input, model) {\r\n var res, diff;\r\n if (model._isUTC) {\r\n res = model.clone();\r\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\r\n // Use low-level api, because this fn is low-level api.\r\n res._d.setTime(res._d.valueOf() + diff);\r\n hooks.updateOffset(res, false);\r\n return res;\r\n } else {\r\n return createLocal(input).local();\r\n }\r\n }\r\n\r\n function getDateOffset (m) {\r\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\r\n // https://github.com/moment/moment/pull/1871\r\n return -Math.round(m._d.getTimezoneOffset() / 15) * 15;\r\n }\r\n\r\n // HOOKS\r\n\r\n // This function will be called whenever a moment is mutated.\r\n // It is intended to keep the offset in sync with the timezone.\r\n hooks.updateOffset = function () {};\r\n\r\n // MOMENTS\r\n\r\n // keepLocalTime = true means only change the timezone, without\r\n // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\r\n // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\r\n // +0200, so we adjust the time as needed, to be valid.\r\n //\r\n // Keeping the time actually adds/subtracts (one hour)\r\n // from the actual represented time. That is why we call updateOffset\r\n // a second time. In case it wants us to change the offset again\r\n // _changeInProgress == true case, then we have to adjust, because\r\n // there is no such time in the given timezone.\r\n function getSetOffset (input, keepLocalTime, keepMinutes) {\r\n var offset = this._offset || 0,\r\n localAdjust;\r\n if (!this.isValid()) {\r\n return input != null ? this : NaN;\r\n }\r\n if (input != null) {\r\n if (typeof input === 'string') {\r\n input = offsetFromString(matchShortOffset, input);\r\n if (input === null) {\r\n return this;\r\n }\r\n } else if (Math.abs(input) < 16 && !keepMinutes) {\r\n input = input * 60;\r\n }\r\n if (!this._isUTC && keepLocalTime) {\r\n localAdjust = getDateOffset(this);\r\n }\r\n this._offset = input;\r\n this._isUTC = true;\r\n if (localAdjust != null) {\r\n this.add(localAdjust, 'm');\r\n }\r\n if (offset !== input) {\r\n if (!keepLocalTime || this._changeInProgress) {\r\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\r\n } else if (!this._changeInProgress) {\r\n this._changeInProgress = true;\r\n hooks.updateOffset(this, true);\r\n this._changeInProgress = null;\r\n }\r\n }\r\n return this;\r\n } else {\r\n return this._isUTC ? offset : getDateOffset(this);\r\n }\r\n }\r\n\r\n function getSetZone (input, keepLocalTime) {\r\n if (input != null) {\r\n if (typeof input !== 'string') {\r\n input = -input;\r\n }\r\n\r\n this.utcOffset(input, keepLocalTime);\r\n\r\n return this;\r\n } else {\r\n return -this.utcOffset();\r\n }\r\n }\r\n\r\n function setOffsetToUTC (keepLocalTime) {\r\n return this.utcOffset(0, keepLocalTime);\r\n }\r\n\r\n function setOffsetToLocal (keepLocalTime) {\r\n if (this._isUTC) {\r\n this.utcOffset(0, keepLocalTime);\r\n this._isUTC = false;\r\n\r\n if (keepLocalTime) {\r\n this.subtract(getDateOffset(this), 'm');\r\n }\r\n }\r\n return this;\r\n }\r\n\r\n function setOffsetToParsedOffset () {\r\n if (this._tzm != null) {\r\n this.utcOffset(this._tzm, false, true);\r\n } else if (typeof this._i === 'string') {\r\n var tZone = offsetFromString(matchOffset, this._i);\r\n if (tZone != null) {\r\n this.utcOffset(tZone);\r\n }\r\n else {\r\n this.utcOffset(0, true);\r\n }\r\n }\r\n return this;\r\n }\r\n\r\n function hasAlignedHourOffset (input) {\r\n if (!this.isValid()) {\r\n return false;\r\n }\r\n input = input ? createLocal(input).utcOffset() : 0;\r\n\r\n return (this.utcOffset() - input) % 60 === 0;\r\n }\r\n\r\n function isDaylightSavingTime () {\r\n return (\r\n this.utcOffset() > this.clone().month(0).utcOffset() ||\r\n this.utcOffset() > this.clone().month(5).utcOffset()\r\n );\r\n }\r\n\r\n function isDaylightSavingTimeShifted () {\r\n if (!isUndefined(this._isDSTShifted)) {\r\n return this._isDSTShifted;\r\n }\r\n\r\n var c = {};\r\n\r\n copyConfig(c, this);\r\n c = prepareConfig(c);\r\n\r\n if (c._a) {\r\n var other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\r\n this._isDSTShifted = this.isValid() &&\r\n compareArrays(c._a, other.toArray()) > 0;\r\n } else {\r\n this._isDSTShifted = false;\r\n }\r\n\r\n return this._isDSTShifted;\r\n }\r\n\r\n function isLocal () {\r\n return this.isValid() ? !this._isUTC : false;\r\n }\r\n\r\n function isUtcOffset () {\r\n return this.isValid() ? this._isUTC : false;\r\n }\r\n\r\n function isUtc () {\r\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\r\n }\r\n\r\n // ASP.NET json date format regex\r\n var aspNetRegex = /^(\\-|\\+)?(?:(\\d*)[. ])?(\\d+)\\:(\\d+)(?:\\:(\\d+)(\\.\\d*)?)?$/;\r\n\r\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\r\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\r\n // and further modified to allow for strings containing both week and day\r\n var isoRegex = /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\r\n\r\n function createDuration (input, key) {\r\n var duration = input,\r\n // matching against regexp is expensive, do it on demand\r\n match = null,\r\n sign,\r\n ret,\r\n diffRes;\r\n\r\n if (isDuration(input)) {\r\n duration = {\r\n ms : input._milliseconds,\r\n d : input._days,\r\n M : input._months\r\n };\r\n } else if (isNumber(input)) {\r\n duration = {};\r\n if (key) {\r\n duration[key] = input;\r\n } else {\r\n duration.milliseconds = input;\r\n }\r\n } else if (!!(match = aspNetRegex.exec(input))) {\r\n sign = (match[1] === '-') ? -1 : 1;\r\n duration = {\r\n y : 0,\r\n d : toInt(match[DATE]) * sign,\r\n h : toInt(match[HOUR]) * sign,\r\n m : toInt(match[MINUTE]) * sign,\r\n s : toInt(match[SECOND]) * sign,\r\n ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match\r\n };\r\n } else if (!!(match = isoRegex.exec(input))) {\r\n sign = (match[1] === '-') ? -1 : (match[1] === '+') ? 1 : 1;\r\n duration = {\r\n y : parseIso(match[2], sign),\r\n M : parseIso(match[3], sign),\r\n w : parseIso(match[4], sign),\r\n d : parseIso(match[5], sign),\r\n h : parseIso(match[6], sign),\r\n m : parseIso(match[7], sign),\r\n s : parseIso(match[8], sign)\r\n };\r\n } else if (duration == null) {// checks for null or undefined\r\n duration = {};\r\n } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {\r\n diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));\r\n\r\n duration = {};\r\n duration.ms = diffRes.milliseconds;\r\n duration.M = diffRes.months;\r\n }\r\n\r\n ret = new Duration(duration);\r\n\r\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\r\n ret._locale = input._locale;\r\n }\r\n\r\n return ret;\r\n }\r\n\r\n createDuration.fn = Duration.prototype;\r\n createDuration.invalid = createInvalid$1;\r\n\r\n function parseIso (inp, sign) {\r\n // We'd normally use ~~inp for this, but unfortunately it also\r\n // converts floats to ints.\r\n // inp may be undefined, so careful calling replace on it.\r\n var res = inp && parseFloat(inp.replace(',', '.'));\r\n // apply sign while we're at it\r\n return (isNaN(res) ? 0 : res) * sign;\r\n }\r\n\r\n function positiveMomentsDifference(base, other) {\r\n var res = {milliseconds: 0, months: 0};\r\n\r\n res.months = other.month() - base.month() +\r\n (other.year() - base.year()) * 12;\r\n if (base.clone().add(res.months, 'M').isAfter(other)) {\r\n --res.months;\r\n }\r\n\r\n res.milliseconds = +other - +(base.clone().add(res.months, 'M'));\r\n\r\n return res;\r\n }\r\n\r\n function momentsDifference(base, other) {\r\n var res;\r\n if (!(base.isValid() && other.isValid())) {\r\n return {milliseconds: 0, months: 0};\r\n }\r\n\r\n other = cloneWithOffset(other, base);\r\n if (base.isBefore(other)) {\r\n res = positiveMomentsDifference(base, other);\r\n } else {\r\n res = positiveMomentsDifference(other, base);\r\n res.milliseconds = -res.milliseconds;\r\n res.months = -res.months;\r\n }\r\n\r\n return res;\r\n }\r\n\r\n // TODO: remove 'name' arg after deprecation is removed\r\n function createAdder(direction, name) {\r\n return function (val, period) {\r\n var dur, tmp;\r\n //invert the arguments, but complain about it\r\n if (period !== null && !isNaN(+period)) {\r\n deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\r\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\r\n tmp = val; val = period; period = tmp;\r\n }\r\n\r\n val = typeof val === 'string' ? +val : val;\r\n dur = createDuration(val, period);\r\n addSubtract(this, dur, direction);\r\n return this;\r\n };\r\n }\r\n\r\n function addSubtract (mom, duration, isAdding, updateOffset) {\r\n var milliseconds = duration._milliseconds,\r\n days = absRound(duration._days),\r\n months = absRound(duration._months);\r\n\r\n if (!mom.isValid()) {\r\n // No op\r\n return;\r\n }\r\n\r\n updateOffset = updateOffset == null ? true : updateOffset;\r\n\r\n if (months) {\r\n setMonth(mom, get(mom, 'Month') + months * isAdding);\r\n }\r\n if (days) {\r\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\r\n }\r\n if (milliseconds) {\r\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\r\n }\r\n if (updateOffset) {\r\n hooks.updateOffset(mom, days || months);\r\n }\r\n }\r\n\r\n var add = createAdder(1, 'add');\r\n var subtract = createAdder(-1, 'subtract');\r\n\r\n function getCalendarFormat(myMoment, now) {\r\n var diff = myMoment.diff(now, 'days', true);\r\n return diff < -6 ? 'sameElse' :\r\n diff < -1 ? 'lastWeek' :\r\n diff < 0 ? 'lastDay' :\r\n diff < 1 ? 'sameDay' :\r\n diff < 2 ? 'nextDay' :\r\n diff < 7 ? 'nextWeek' : 'sameElse';\r\n }\r\n\r\n function calendar$1 (time, formats) {\r\n // We want to compare the start of today, vs this.\r\n // Getting start-of-today depends on whether we're local/utc/offset or not.\r\n var now = time || createLocal(),\r\n sod = cloneWithOffset(now, this).startOf('day'),\r\n format = hooks.calendarFormat(this, sod) || 'sameElse';\r\n\r\n var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);\r\n\r\n return this.format(output || this.localeData().calendar(format, this, createLocal(now)));\r\n }\r\n\r\n function clone () {\r\n return new Moment(this);\r\n }\r\n\r\n function isAfter (input, units) {\r\n var localInput = isMoment(input) ? input : createLocal(input);\r\n if (!(this.isValid() && localInput.isValid())) {\r\n return false;\r\n }\r\n units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');\r\n if (units === 'millisecond') {\r\n return this.valueOf() > localInput.valueOf();\r\n } else {\r\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\r\n }\r\n }\r\n\r\n function isBefore (input, units) {\r\n var localInput = isMoment(input) ? input : createLocal(input);\r\n if (!(this.isValid() && localInput.isValid())) {\r\n return false;\r\n }\r\n units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');\r\n if (units === 'millisecond') {\r\n return this.valueOf() < localInput.valueOf();\r\n } else {\r\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\r\n }\r\n }\r\n\r\n function isBetween (from, to, units, inclusivity) {\r\n inclusivity = inclusivity || '()';\r\n return (inclusivity[0] === '(' ? this.isAfter(from, units) : !this.isBefore(from, units)) &&\r\n (inclusivity[1] === ')' ? this.isBefore(to, units) : !this.isAfter(to, units));\r\n }\r\n\r\n function isSame (input, units) {\r\n var localInput = isMoment(input) ? input : createLocal(input),\r\n inputMs;\r\n if (!(this.isValid() && localInput.isValid())) {\r\n return false;\r\n }\r\n units = normalizeUnits(units || 'millisecond');\r\n if (units === 'millisecond') {\r\n return this.valueOf() === localInput.valueOf();\r\n } else {\r\n inputMs = localInput.valueOf();\r\n return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();\r\n }\r\n }\r\n\r\n function isSameOrAfter (input, units) {\r\n return this.isSame(input, units) || this.isAfter(input,units);\r\n }\r\n\r\n function isSameOrBefore (input, units) {\r\n return this.isSame(input, units) || this.isBefore(input,units);\r\n }\r\n\r\n function diff (input, units, asFloat) {\r\n var that,\r\n zoneDelta,\r\n output;\r\n\r\n if (!this.isValid()) {\r\n return NaN;\r\n }\r\n\r\n that = cloneWithOffset(input, this);\r\n\r\n if (!that.isValid()) {\r\n return NaN;\r\n }\r\n\r\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\r\n\r\n units = normalizeUnits(units);\r\n\r\n switch (units) {\r\n case 'year': output = monthDiff(this, that) / 12; break;\r\n case 'month': output = monthDiff(this, that); break;\r\n case 'quarter': output = monthDiff(this, that) / 3; break;\r\n case 'second': output = (this - that) / 1e3; break; // 1000\r\n case 'minute': output = (this - that) / 6e4; break; // 1000 * 60\r\n case 'hour': output = (this - that) / 36e5; break; // 1000 * 60 * 60\r\n case 'day': output = (this - that - zoneDelta) / 864e5; break; // 1000 * 60 * 60 * 24, negate dst\r\n case 'week': output = (this - that - zoneDelta) / 6048e5; break; // 1000 * 60 * 60 * 24 * 7, negate dst\r\n default: output = this - that;\r\n }\r\n\r\n return asFloat ? output : absFloor(output);\r\n }\r\n\r\n function monthDiff (a, b) {\r\n // difference in months\r\n var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()),\r\n // b is in (anchor - 1 month, anchor + 1 month)\r\n anchor = a.clone().add(wholeMonthDiff, 'months'),\r\n anchor2, adjust;\r\n\r\n if (b - anchor < 0) {\r\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\r\n // linear across the month\r\n adjust = (b - anchor) / (anchor - anchor2);\r\n } else {\r\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\r\n // linear across the month\r\n adjust = (b - anchor) / (anchor2 - anchor);\r\n }\r\n\r\n //check for negative zero, return zero if negative zero\r\n return -(wholeMonthDiff + adjust) || 0;\r\n }\r\n\r\n hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\r\n hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\r\n\r\n function toString () {\r\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\r\n }\r\n\r\n function toISOString(keepOffset) {\r\n if (!this.isValid()) {\r\n return null;\r\n }\r\n var utc = keepOffset !== true;\r\n var m = utc ? this.clone().utc() : this;\r\n if (m.year() < 0 || m.year() > 9999) {\r\n return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ');\r\n }\r\n if (isFunction(Date.prototype.toISOString)) {\r\n // native implementation is ~50x faster, use it when we can\r\n if (utc) {\r\n return this.toDate().toISOString();\r\n } else {\r\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z'));\r\n }\r\n }\r\n return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ');\r\n }\r\n\r\n /**\r\n * Return a human readable representation of a moment that can\r\n * also be evaluated to get a new moment which is the same\r\n *\r\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\r\n */\r\n function inspect () {\r\n if (!this.isValid()) {\r\n return 'moment.invalid(/* ' + this._i + ' */)';\r\n }\r\n var func = 'moment';\r\n var zone = '';\r\n if (!this.isLocal()) {\r\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\r\n zone = 'Z';\r\n }\r\n var prefix = '[' + func + '(\"]';\r\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\r\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\r\n var suffix = zone + '[\")]';\r\n\r\n return this.format(prefix + year + datetime + suffix);\r\n }\r\n\r\n function format (inputString) {\r\n if (!inputString) {\r\n inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;\r\n }\r\n var output = formatMoment(this, inputString);\r\n return this.localeData().postformat(output);\r\n }\r\n\r\n function from (time, withoutSuffix) {\r\n if (this.isValid() &&\r\n ((isMoment(time) && time.isValid()) ||\r\n createLocal(time).isValid())) {\r\n return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);\r\n } else {\r\n return this.localeData().invalidDate();\r\n }\r\n }\r\n\r\n function fromNow (withoutSuffix) {\r\n return this.from(createLocal(), withoutSuffix);\r\n }\r\n\r\n function to (time, withoutSuffix) {\r\n if (this.isValid() &&\r\n ((isMoment(time) && time.isValid()) ||\r\n createLocal(time).isValid())) {\r\n return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);\r\n } else {\r\n return this.localeData().invalidDate();\r\n }\r\n }\r\n\r\n function toNow (withoutSuffix) {\r\n return this.to(createLocal(), withoutSuffix);\r\n }\r\n\r\n // If passed a locale key, it will set the locale for this\r\n // instance. Otherwise, it will return the locale configuration\r\n // variables for this instance.\r\n function locale (key) {\r\n var newLocaleData;\r\n\r\n if (key === undefined) {\r\n return this._locale._abbr;\r\n } else {\r\n newLocaleData = getLocale(key);\r\n if (newLocaleData != null) {\r\n this._locale = newLocaleData;\r\n }\r\n return this;\r\n }\r\n }\r\n\r\n var lang = deprecate(\r\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\r\n function (key) {\r\n if (key === undefined) {\r\n return this.localeData();\r\n } else {\r\n return this.locale(key);\r\n }\r\n }\r\n );\r\n\r\n function localeData () {\r\n return this._locale;\r\n }\r\n\r\n function startOf (units) {\r\n units = normalizeUnits(units);\r\n // the following switch intentionally omits break keywords\r\n // to utilize falling through the cases.\r\n switch (units) {\r\n case 'year':\r\n this.month(0);\r\n /* falls through */\r\n case 'quarter':\r\n case 'month':\r\n this.date(1);\r\n /* falls through */\r\n case 'week':\r\n case 'isoWeek':\r\n case 'day':\r\n case 'date':\r\n this.hours(0);\r\n /* falls through */\r\n case 'hour':\r\n this.minutes(0);\r\n /* falls through */\r\n case 'minute':\r\n this.seconds(0);\r\n /* falls through */\r\n case 'second':\r\n this.milliseconds(0);\r\n }\r\n\r\n // weeks are a special case\r\n if (units === 'week') {\r\n this.weekday(0);\r\n }\r\n if (units === 'isoWeek') {\r\n this.isoWeekday(1);\r\n }\r\n\r\n // quarters are also special\r\n if (units === 'quarter') {\r\n this.month(Math.floor(this.month() / 3) * 3);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n function endOf (units) {\r\n units = normalizeUnits(units);\r\n if (units === undefined || units === 'millisecond') {\r\n return this;\r\n }\r\n\r\n // 'date' is an alias for 'day', so it should be considered as such.\r\n if (units === 'date') {\r\n units = 'day';\r\n }\r\n\r\n return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');\r\n }\r\n\r\n function valueOf () {\r\n return this._d.valueOf() - ((this._offset || 0) * 60000);\r\n }\r\n\r\n function unix () {\r\n return Math.floor(this.valueOf() / 1000);\r\n }\r\n\r\n function toDate () {\r\n return new Date(this.valueOf());\r\n }\r\n\r\n function toArray () {\r\n var m = this;\r\n return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];\r\n }\r\n\r\n function toObject () {\r\n var m = this;\r\n return {\r\n years: m.year(),\r\n months: m.month(),\r\n date: m.date(),\r\n hours: m.hours(),\r\n minutes: m.minutes(),\r\n seconds: m.seconds(),\r\n milliseconds: m.milliseconds()\r\n };\r\n }\r\n\r\n function toJSON () {\r\n // new Date(NaN).toJSON() === null\r\n return this.isValid() ? this.toISOString() : null;\r\n }\r\n\r\n function isValid$2 () {\r\n return isValid(this);\r\n }\r\n\r\n function parsingFlags () {\r\n return extend({}, getParsingFlags(this));\r\n }\r\n\r\n function invalidAt () {\r\n return getParsingFlags(this).overflow;\r\n }\r\n\r\n function creationData() {\r\n return {\r\n input: this._i,\r\n format: this._f,\r\n locale: this._locale,\r\n isUTC: this._isUTC,\r\n strict: this._strict\r\n };\r\n }\r\n\r\n // FORMATTING\r\n\r\n addFormatToken(0, ['gg', 2], 0, function () {\r\n return this.weekYear() % 100;\r\n });\r\n\r\n addFormatToken(0, ['GG', 2], 0, function () {\r\n return this.isoWeekYear() % 100;\r\n });\r\n\r\n function addWeekYearFormatToken (token, getter) {\r\n addFormatToken(0, [token, token.length], 0, getter);\r\n }\r\n\r\n addWeekYearFormatToken('gggg', 'weekYear');\r\n addWeekYearFormatToken('ggggg', 'weekYear');\r\n addWeekYearFormatToken('GGGG', 'isoWeekYear');\r\n addWeekYearFormatToken('GGGGG', 'isoWeekYear');\r\n\r\n // ALIASES\r\n\r\n addUnitAlias('weekYear', 'gg');\r\n addUnitAlias('isoWeekYear', 'GG');\r\n\r\n // PRIORITY\r\n\r\n addUnitPriority('weekYear', 1);\r\n addUnitPriority('isoWeekYear', 1);\r\n\r\n\r\n // PARSING\r\n\r\n addRegexToken('G', matchSigned);\r\n addRegexToken('g', matchSigned);\r\n addRegexToken('GG', match1to2, match2);\r\n addRegexToken('gg', match1to2, match2);\r\n addRegexToken('GGGG', match1to4, match4);\r\n addRegexToken('gggg', match1to4, match4);\r\n addRegexToken('GGGGG', match1to6, match6);\r\n addRegexToken('ggggg', match1to6, match6);\r\n\r\n addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {\r\n week[token.substr(0, 2)] = toInt(input);\r\n });\r\n\r\n addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\r\n week[token] = hooks.parseTwoDigitYear(input);\r\n });\r\n\r\n // MOMENTS\r\n\r\n function getSetWeekYear (input) {\r\n return getSetWeekYearHelper.call(this,\r\n input,\r\n this.week(),\r\n this.weekday(),\r\n this.localeData()._week.dow,\r\n this.localeData()._week.doy);\r\n }\r\n\r\n function getSetISOWeekYear (input) {\r\n return getSetWeekYearHelper.call(this,\r\n input, this.isoWeek(), this.isoWeekday(), 1, 4);\r\n }\r\n\r\n function getISOWeeksInYear () {\r\n return weeksInYear(this.year(), 1, 4);\r\n }\r\n\r\n function getWeeksInYear () {\r\n var weekInfo = this.localeData()._week;\r\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\r\n }\r\n\r\n function getSetWeekYearHelper(input, week, weekday, dow, doy) {\r\n var weeksTarget;\r\n if (input == null) {\r\n return weekOfYear(this, dow, doy).year;\r\n } else {\r\n weeksTarget = weeksInYear(input, dow, doy);\r\n if (week > weeksTarget) {\r\n week = weeksTarget;\r\n }\r\n return setWeekAll.call(this, input, week, weekday, dow, doy);\r\n }\r\n }\r\n\r\n function setWeekAll(weekYear, week, weekday, dow, doy) {\r\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\r\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\r\n\r\n this.year(date.getUTCFullYear());\r\n this.month(date.getUTCMonth());\r\n this.date(date.getUTCDate());\r\n return this;\r\n }\r\n\r\n // FORMATTING\r\n\r\n addFormatToken('Q', 0, 'Qo', 'quarter');\r\n\r\n // ALIASES\r\n\r\n addUnitAlias('quarter', 'Q');\r\n\r\n // PRIORITY\r\n\r\n addUnitPriority('quarter', 7);\r\n\r\n // PARSING\r\n\r\n addRegexToken('Q', match1);\r\n addParseToken('Q', function (input, array) {\r\n array[MONTH] = (toInt(input) - 1) * 3;\r\n });\r\n\r\n // MOMENTS\r\n\r\n function getSetQuarter (input) {\r\n return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);\r\n }\r\n\r\n // FORMATTING\r\n\r\n addFormatToken('D', ['DD', 2], 'Do', 'date');\r\n\r\n // ALIASES\r\n\r\n addUnitAlias('date', 'D');\r\n\r\n // PRIORITY\r\n addUnitPriority('date', 9);\r\n\r\n // PARSING\r\n\r\n addRegexToken('D', match1to2);\r\n addRegexToken('DD', match1to2, match2);\r\n addRegexToken('Do', function (isStrict, locale) {\r\n // TODO: Remove \"ordinalParse\" fallback in next major release.\r\n return isStrict ?\r\n (locale._dayOfMonthOrdinalParse || locale._ordinalParse) :\r\n locale._dayOfMonthOrdinalParseLenient;\r\n });\r\n\r\n addParseToken(['D', 'DD'], DATE);\r\n addParseToken('Do', function (input, array) {\r\n array[DATE] = toInt(input.match(match1to2)[0]);\r\n });\r\n\r\n // MOMENTS\r\n\r\n var getSetDayOfMonth = makeGetSet('Date', true);\r\n\r\n // FORMATTING\r\n\r\n addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\r\n\r\n // ALIASES\r\n\r\n addUnitAlias('dayOfYear', 'DDD');\r\n\r\n // PRIORITY\r\n addUnitPriority('dayOfYear', 4);\r\n\r\n // PARSING\r\n\r\n addRegexToken('DDD', match1to3);\r\n addRegexToken('DDDD', match3);\r\n addParseToken(['DDD', 'DDDD'], function (input, array, config) {\r\n config._dayOfYear = toInt(input);\r\n });\r\n\r\n // HELPERS\r\n\r\n // MOMENTS\r\n\r\n function getSetDayOfYear (input) {\r\n var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;\r\n return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');\r\n }\r\n\r\n // FORMATTING\r\n\r\n addFormatToken('m', ['mm', 2], 0, 'minute');\r\n\r\n // ALIASES\r\n\r\n addUnitAlias('minute', 'm');\r\n\r\n // PRIORITY\r\n\r\n addUnitPriority('minute', 14);\r\n\r\n // PARSING\r\n\r\n addRegexToken('m', match1to2);\r\n addRegexToken('mm', match1to2, match2);\r\n addParseToken(['m', 'mm'], MINUTE);\r\n\r\n // MOMENTS\r\n\r\n var getSetMinute = makeGetSet('Minutes', false);\r\n\r\n // FORMATTING\r\n\r\n addFormatToken('s', ['ss', 2], 0, 'second');\r\n\r\n // ALIASES\r\n\r\n addUnitAlias('second', 's');\r\n\r\n // PRIORITY\r\n\r\n addUnitPriority('second', 15);\r\n\r\n // PARSING\r\n\r\n addRegexToken('s', match1to2);\r\n addRegexToken('ss', match1to2, match2);\r\n addParseToken(['s', 'ss'], SECOND);\r\n\r\n // MOMENTS\r\n\r\n var getSetSecond = makeGetSet('Seconds', false);\r\n\r\n // FORMATTING\r\n\r\n addFormatToken('S', 0, 0, function () {\r\n return ~~(this.millisecond() / 100);\r\n });\r\n\r\n addFormatToken(0, ['SS', 2], 0, function () {\r\n return ~~(this.millisecond() / 10);\r\n });\r\n\r\n addFormatToken(0, ['SSS', 3], 0, 'millisecond');\r\n addFormatToken(0, ['SSSS', 4], 0, function () {\r\n return this.millisecond() * 10;\r\n });\r\n addFormatToken(0, ['SSSSS', 5], 0, function () {\r\n return this.millisecond() * 100;\r\n });\r\n addFormatToken(0, ['SSSSSS', 6], 0, function () {\r\n return this.millisecond() * 1000;\r\n });\r\n addFormatToken(0, ['SSSSSSS', 7], 0, function () {\r\n return this.millisecond() * 10000;\r\n });\r\n addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\r\n return this.millisecond() * 100000;\r\n });\r\n addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\r\n return this.millisecond() * 1000000;\r\n });\r\n\r\n\r\n // ALIASES\r\n\r\n addUnitAlias('millisecond', 'ms');\r\n\r\n // PRIORITY\r\n\r\n addUnitPriority('millisecond', 16);\r\n\r\n // PARSING\r\n\r\n addRegexToken('S', match1to3, match1);\r\n addRegexToken('SS', match1to3, match2);\r\n addRegexToken('SSS', match1to3, match3);\r\n\r\n var token;\r\n for (token = 'SSSS'; token.length <= 9; token += 'S') {\r\n addRegexToken(token, matchUnsigned);\r\n }\r\n\r\n function parseMs(input, array) {\r\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\r\n }\r\n\r\n for (token = 'S'; token.length <= 9; token += 'S') {\r\n addParseToken(token, parseMs);\r\n }\r\n // MOMENTS\r\n\r\n var getSetMillisecond = makeGetSet('Milliseconds', false);\r\n\r\n // FORMATTING\r\n\r\n addFormatToken('z', 0, 0, 'zoneAbbr');\r\n addFormatToken('zz', 0, 0, 'zoneName');\r\n\r\n // MOMENTS\r\n\r\n function getZoneAbbr () {\r\n return this._isUTC ? 'UTC' : '';\r\n }\r\n\r\n function getZoneName () {\r\n return this._isUTC ? 'Coordinated Universal Time' : '';\r\n }\r\n\r\n var proto = Moment.prototype;\r\n\r\n proto.add = add;\r\n proto.calendar = calendar$1;\r\n proto.clone = clone;\r\n proto.diff = diff;\r\n proto.endOf = endOf;\r\n proto.format = format;\r\n proto.from = from;\r\n proto.fromNow = fromNow;\r\n proto.to = to;\r\n proto.toNow = toNow;\r\n proto.get = stringGet;\r\n proto.invalidAt = invalidAt;\r\n proto.isAfter = isAfter;\r\n proto.isBefore = isBefore;\r\n proto.isBetween = isBetween;\r\n proto.isSame = isSame;\r\n proto.isSameOrAfter = isSameOrAfter;\r\n proto.isSameOrBefore = isSameOrBefore;\r\n proto.isValid = isValid$2;\r\n proto.lang = lang;\r\n proto.locale = locale;\r\n proto.localeData = localeData;\r\n proto.max = prototypeMax;\r\n proto.min = prototypeMin;\r\n proto.parsingFlags = parsingFlags;\r\n proto.set = stringSet;\r\n proto.startOf = startOf;\r\n proto.subtract = subtract;\r\n proto.toArray = toArray;\r\n proto.toObject = toObject;\r\n proto.toDate = toDate;\r\n proto.toISOString = toISOString;\r\n proto.inspect = inspect;\r\n proto.toJSON = toJSON;\r\n proto.toString = toString;\r\n proto.unix = unix;\r\n proto.valueOf = valueOf;\r\n proto.creationData = creationData;\r\n proto.year = getSetYear;\r\n proto.isLeapYear = getIsLeapYear;\r\n proto.weekYear = getSetWeekYear;\r\n proto.isoWeekYear = getSetISOWeekYear;\r\n proto.quarter = proto.quarters = getSetQuarter;\r\n proto.month = getSetMonth;\r\n proto.daysInMonth = getDaysInMonth;\r\n proto.week = proto.weeks = getSetWeek;\r\n proto.isoWeek = proto.isoWeeks = getSetISOWeek;\r\n proto.weeksInYear = getWeeksInYear;\r\n proto.isoWeeksInYear = getISOWeeksInYear;\r\n proto.date = getSetDayOfMonth;\r\n proto.day = proto.days = getSetDayOfWeek;\r\n proto.weekday = getSetLocaleDayOfWeek;\r\n proto.isoWeekday = getSetISODayOfWeek;\r\n proto.dayOfYear = getSetDayOfYear;\r\n proto.hour = proto.hours = getSetHour;\r\n proto.minute = proto.minutes = getSetMinute;\r\n proto.second = proto.seconds = getSetSecond;\r\n proto.millisecond = proto.milliseconds = getSetMillisecond;\r\n proto.utcOffset = getSetOffset;\r\n proto.utc = setOffsetToUTC;\r\n proto.local = setOffsetToLocal;\r\n proto.parseZone = setOffsetToParsedOffset;\r\n proto.hasAlignedHourOffset = hasAlignedHourOffset;\r\n proto.isDST = isDaylightSavingTime;\r\n proto.isLocal = isLocal;\r\n proto.isUtcOffset = isUtcOffset;\r\n proto.isUtc = isUtc;\r\n proto.isUTC = isUtc;\r\n proto.zoneAbbr = getZoneAbbr;\r\n proto.zoneName = getZoneName;\r\n proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);\r\n proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);\r\n proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);\r\n proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);\r\n proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);\r\n\r\n function createUnix (input) {\r\n return createLocal(input * 1000);\r\n }\r\n\r\n function createInZone () {\r\n return createLocal.apply(null, arguments).parseZone();\r\n }\r\n\r\n function preParsePostFormat (string) {\r\n return string;\r\n }\r\n\r\n var proto$1 = Locale.prototype;\r\n\r\n proto$1.calendar = calendar;\r\n proto$1.longDateFormat = longDateFormat;\r\n proto$1.invalidDate = invalidDate;\r\n proto$1.ordinal = ordinal;\r\n proto$1.preparse = preParsePostFormat;\r\n proto$1.postformat = preParsePostFormat;\r\n proto$1.relativeTime = relativeTime;\r\n proto$1.pastFuture = pastFuture;\r\n proto$1.set = set;\r\n\r\n proto$1.months = localeMonths;\r\n proto$1.monthsShort = localeMonthsShort;\r\n proto$1.monthsParse = localeMonthsParse;\r\n proto$1.monthsRegex = monthsRegex;\r\n proto$1.monthsShortRegex = monthsShortRegex;\r\n proto$1.week = localeWeek;\r\n proto$1.firstDayOfYear = localeFirstDayOfYear;\r\n proto$1.firstDayOfWeek = localeFirstDayOfWeek;\r\n\r\n proto$1.weekdays = localeWeekdays;\r\n proto$1.weekdaysMin = localeWeekdaysMin;\r\n proto$1.weekdaysShort = localeWeekdaysShort;\r\n proto$1.weekdaysParse = localeWeekdaysParse;\r\n\r\n proto$1.weekdaysRegex = weekdaysRegex;\r\n proto$1.weekdaysShortRegex = weekdaysShortRegex;\r\n proto$1.weekdaysMinRegex = weekdaysMinRegex;\r\n\r\n proto$1.isPM = localeIsPM;\r\n proto$1.meridiem = localeMeridiem;\r\n\r\n function get$1 (format, index, field, setter) {\r\n var locale = getLocale();\r\n var utc = createUTC().set(setter, index);\r\n return locale[field](utc, format);\r\n }\r\n\r\n function listMonthsImpl (format, index, field) {\r\n if (isNumber(format)) {\r\n index = format;\r\n format = undefined;\r\n }\r\n\r\n format = format || '';\r\n\r\n if (index != null) {\r\n return get$1(format, index, field, 'month');\r\n }\r\n\r\n var i;\r\n var out = [];\r\n for (i = 0; i < 12; i++) {\r\n out[i] = get$1(format, i, field, 'month');\r\n }\r\n return out;\r\n }\r\n\r\n // ()\r\n // (5)\r\n // (fmt, 5)\r\n // (fmt)\r\n // (true)\r\n // (true, 5)\r\n // (true, fmt, 5)\r\n // (true, fmt)\r\n function listWeekdaysImpl (localeSorted, format, index, field) {\r\n if (typeof localeSorted === 'boolean') {\r\n if (isNumber(format)) {\r\n index = format;\r\n format = undefined;\r\n }\r\n\r\n format = format || '';\r\n } else {\r\n format = localeSorted;\r\n index = format;\r\n localeSorted = false;\r\n\r\n if (isNumber(format)) {\r\n index = format;\r\n format = undefined;\r\n }\r\n\r\n format = format || '';\r\n }\r\n\r\n var locale = getLocale(),\r\n shift = localeSorted ? locale._week.dow : 0;\r\n\r\n if (index != null) {\r\n return get$1(format, (index + shift) % 7, field, 'day');\r\n }\r\n\r\n var i;\r\n var out = [];\r\n for (i = 0; i < 7; i++) {\r\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\r\n }\r\n return out;\r\n }\r\n\r\n function listMonths (format, index) {\r\n return listMonthsImpl(format, index, 'months');\r\n }\r\n\r\n function listMonthsShort (format, index) {\r\n return listMonthsImpl(format, index, 'monthsShort');\r\n }\r\n\r\n function listWeekdays (localeSorted, format, index) {\r\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\r\n }\r\n\r\n function listWeekdaysShort (localeSorted, format, index) {\r\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\r\n }\r\n\r\n function listWeekdaysMin (localeSorted, format, index) {\r\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\r\n }\r\n\r\n getSetGlobalLocale('en', {\r\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\r\n ordinal : function (number) {\r\n var b = number % 10,\r\n output = (toInt(number % 100 / 10) === 1) ? 'th' :\r\n (b === 1) ? 'st' :\r\n (b === 2) ? 'nd' :\r\n (b === 3) ? 'rd' : 'th';\r\n return number + output;\r\n }\r\n });\r\n\r\n // Side effect imports\r\n\r\n hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);\r\n hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);\r\n\r\n var mathAbs = Math.abs;\r\n\r\n function abs () {\r\n var data = this._data;\r\n\r\n this._milliseconds = mathAbs(this._milliseconds);\r\n this._days = mathAbs(this._days);\r\n this._months = mathAbs(this._months);\r\n\r\n data.milliseconds = mathAbs(data.milliseconds);\r\n data.seconds = mathAbs(data.seconds);\r\n data.minutes = mathAbs(data.minutes);\r\n data.hours = mathAbs(data.hours);\r\n data.months = mathAbs(data.months);\r\n data.years = mathAbs(data.years);\r\n\r\n return this;\r\n }\r\n\r\n function addSubtract$1 (duration, input, value, direction) {\r\n var other = createDuration(input, value);\r\n\r\n duration._milliseconds += direction * other._milliseconds;\r\n duration._days += direction * other._days;\r\n duration._months += direction * other._months;\r\n\r\n return duration._bubble();\r\n }\r\n\r\n // supports only 2.0-style add(1, 's') or add(duration)\r\n function add$1 (input, value) {\r\n return addSubtract$1(this, input, value, 1);\r\n }\r\n\r\n // supports only 2.0-style subtract(1, 's') or subtract(duration)\r\n function subtract$1 (input, value) {\r\n return addSubtract$1(this, input, value, -1);\r\n }\r\n\r\n function absCeil (number) {\r\n if (number < 0) {\r\n return Math.floor(number);\r\n } else {\r\n return Math.ceil(number);\r\n }\r\n }\r\n\r\n function bubble () {\r\n var milliseconds = this._milliseconds;\r\n var days = this._days;\r\n var months = this._months;\r\n var data = this._data;\r\n var seconds, minutes, hours, years, monthsFromDays;\r\n\r\n // if we have a mix of positive and negative values, bubble down first\r\n // check: https://github.com/moment/moment/issues/2166\r\n if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||\r\n (milliseconds <= 0 && days <= 0 && months <= 0))) {\r\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\r\n days = 0;\r\n months = 0;\r\n }\r\n\r\n // The following code bubbles up values, see the tests for\r\n // examples of what that means.\r\n data.milliseconds = milliseconds % 1000;\r\n\r\n seconds = absFloor(milliseconds / 1000);\r\n data.seconds = seconds % 60;\r\n\r\n minutes = absFloor(seconds / 60);\r\n data.minutes = minutes % 60;\r\n\r\n hours = absFloor(minutes / 60);\r\n data.hours = hours % 24;\r\n\r\n days += absFloor(hours / 24);\r\n\r\n // convert days to months\r\n monthsFromDays = absFloor(daysToMonths(days));\r\n months += monthsFromDays;\r\n days -= absCeil(monthsToDays(monthsFromDays));\r\n\r\n // 12 months -> 1 year\r\n years = absFloor(months / 12);\r\n months %= 12;\r\n\r\n data.days = days;\r\n data.months = months;\r\n data.years = years;\r\n\r\n return this;\r\n }\r\n\r\n function daysToMonths (days) {\r\n // 400 years have 146097 days (taking into account leap year rules)\r\n // 400 years have 12 months === 4800\r\n return days * 4800 / 146097;\r\n }\r\n\r\n function monthsToDays (months) {\r\n // the reverse of daysToMonths\r\n return months * 146097 / 4800;\r\n }\r\n\r\n function as (units) {\r\n if (!this.isValid()) {\r\n return NaN;\r\n }\r\n var days;\r\n var months;\r\n var milliseconds = this._milliseconds;\r\n\r\n units = normalizeUnits(units);\r\n\r\n if (units === 'month' || units === 'year') {\r\n days = this._days + milliseconds / 864e5;\r\n months = this._months + daysToMonths(days);\r\n return units === 'month' ? months : months / 12;\r\n } else {\r\n // handle milliseconds separately because of floating point math errors (issue #1867)\r\n days = this._days + Math.round(monthsToDays(this._months));\r\n switch (units) {\r\n case 'week' : return days / 7 + milliseconds / 6048e5;\r\n case 'day' : return days + milliseconds / 864e5;\r\n case 'hour' : return days * 24 + milliseconds / 36e5;\r\n case 'minute' : return days * 1440 + milliseconds / 6e4;\r\n case 'second' : return days * 86400 + milliseconds / 1000;\r\n // Math.floor prevents floating point math errors here\r\n case 'millisecond': return Math.floor(days * 864e5) + milliseconds;\r\n default: throw new Error('Unknown unit ' + units);\r\n }\r\n }\r\n }\r\n\r\n // TODO: Use this.as('ms')?\r\n function valueOf$1 () {\r\n if (!this.isValid()) {\r\n return NaN;\r\n }\r\n return (\r\n this._milliseconds +\r\n this._days * 864e5 +\r\n (this._months % 12) * 2592e6 +\r\n toInt(this._months / 12) * 31536e6\r\n );\r\n }\r\n\r\n function makeAs (alias) {\r\n return function () {\r\n return this.as(alias);\r\n };\r\n }\r\n\r\n var asMilliseconds = makeAs('ms');\r\n var asSeconds = makeAs('s');\r\n var asMinutes = makeAs('m');\r\n var asHours = makeAs('h');\r\n var asDays = makeAs('d');\r\n var asWeeks = makeAs('w');\r\n var asMonths = makeAs('M');\r\n var asYears = makeAs('y');\r\n\r\n function clone$1 () {\r\n return createDuration(this);\r\n }\r\n\r\n function get$2 (units) {\r\n units = normalizeUnits(units);\r\n return this.isValid() ? this[units + 's']() : NaN;\r\n }\r\n\r\n function makeGetter(name) {\r\n return function () {\r\n return this.isValid() ? this._data[name] : NaN;\r\n };\r\n }\r\n\r\n var milliseconds = makeGetter('milliseconds');\r\n var seconds = makeGetter('seconds');\r\n var minutes = makeGetter('minutes');\r\n var hours = makeGetter('hours');\r\n var days = makeGetter('days');\r\n var months = makeGetter('months');\r\n var years = makeGetter('years');\r\n\r\n function weeks () {\r\n return absFloor(this.days() / 7);\r\n }\r\n\r\n var round = Math.round;\r\n var thresholds = {\r\n ss: 44, // a few seconds to seconds\r\n s : 45, // seconds to minute\r\n m : 45, // minutes to hour\r\n h : 22, // hours to day\r\n d : 26, // days to month\r\n M : 11 // months to year\r\n };\r\n\r\n // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\r\n function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\r\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\r\n }\r\n\r\n function relativeTime$1 (posNegDuration, withoutSuffix, locale) {\r\n var duration = createDuration(posNegDuration).abs();\r\n var seconds = round(duration.as('s'));\r\n var minutes = round(duration.as('m'));\r\n var hours = round(duration.as('h'));\r\n var days = round(duration.as('d'));\r\n var months = round(duration.as('M'));\r\n var years = round(duration.as('y'));\r\n\r\n var a = seconds <= thresholds.ss && ['s', seconds] ||\r\n seconds < thresholds.s && ['ss', seconds] ||\r\n minutes <= 1 && ['m'] ||\r\n minutes < thresholds.m && ['mm', minutes] ||\r\n hours <= 1 && ['h'] ||\r\n hours < thresholds.h && ['hh', hours] ||\r\n days <= 1 && ['d'] ||\r\n days < thresholds.d && ['dd', days] ||\r\n months <= 1 && ['M'] ||\r\n months < thresholds.M && ['MM', months] ||\r\n years <= 1 && ['y'] || ['yy', years];\r\n\r\n a[2] = withoutSuffix;\r\n a[3] = +posNegDuration > 0;\r\n a[4] = locale;\r\n return substituteTimeAgo.apply(null, a);\r\n }\r\n\r\n // This function allows you to set the rounding function for relative time strings\r\n function getSetRelativeTimeRounding (roundingFunction) {\r\n if (roundingFunction === undefined) {\r\n return round;\r\n }\r\n if (typeof(roundingFunction) === 'function') {\r\n round = roundingFunction;\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n // This function allows you to set a threshold for relative time strings\r\n function getSetRelativeTimeThreshold (threshold, limit) {\r\n if (thresholds[threshold] === undefined) {\r\n return false;\r\n }\r\n if (limit === undefined) {\r\n return thresholds[threshold];\r\n }\r\n thresholds[threshold] = limit;\r\n if (threshold === 's') {\r\n thresholds.ss = limit - 1;\r\n }\r\n return true;\r\n }\r\n\r\n function humanize (withSuffix) {\r\n if (!this.isValid()) {\r\n return this.localeData().invalidDate();\r\n }\r\n\r\n var locale = this.localeData();\r\n var output = relativeTime$1(this, !withSuffix, locale);\r\n\r\n if (withSuffix) {\r\n output = locale.pastFuture(+this, output);\r\n }\r\n\r\n return locale.postformat(output);\r\n }\r\n\r\n var abs$1 = Math.abs;\r\n\r\n function sign(x) {\r\n return ((x > 0) - (x < 0)) || +x;\r\n }\r\n\r\n function toISOString$1() {\r\n // for ISO strings we do not use the normal bubbling rules:\r\n // * milliseconds bubble up until they become hours\r\n // * days do not bubble at all\r\n // * months bubble up until they become years\r\n // This is because there is no context-free conversion between hours and days\r\n // (think of clock changes)\r\n // and also not between days and months (28-31 days per month)\r\n if (!this.isValid()) {\r\n return this.localeData().invalidDate();\r\n }\r\n\r\n var seconds = abs$1(this._milliseconds) / 1000;\r\n var days = abs$1(this._days);\r\n var months = abs$1(this._months);\r\n var minutes, hours, years;\r\n\r\n // 3600 seconds -> 60 minutes -> 1 hour\r\n minutes = absFloor(seconds / 60);\r\n hours = absFloor(minutes / 60);\r\n seconds %= 60;\r\n minutes %= 60;\r\n\r\n // 12 months -> 1 year\r\n years = absFloor(months / 12);\r\n months %= 12;\r\n\r\n\r\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\r\n var Y = years;\r\n var M = months;\r\n var D = days;\r\n var h = hours;\r\n var m = minutes;\r\n var s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\r\n var total = this.asSeconds();\r\n\r\n if (!total) {\r\n // this is the same as C#'s (Noda) and python (isodate)...\r\n // but not other JS (goog.date)\r\n return 'P0D';\r\n }\r\n\r\n var totalSign = total < 0 ? '-' : '';\r\n var ymSign = sign(this._months) !== sign(total) ? '-' : '';\r\n var daysSign = sign(this._days) !== sign(total) ? '-' : '';\r\n var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\r\n\r\n return totalSign + 'P' +\r\n (Y ? ymSign + Y + 'Y' : '') +\r\n (M ? ymSign + M + 'M' : '') +\r\n (D ? daysSign + D + 'D' : '') +\r\n ((h || m || s) ? 'T' : '') +\r\n (h ? hmsSign + h + 'H' : '') +\r\n (m ? hmsSign + m + 'M' : '') +\r\n (s ? hmsSign + s + 'S' : '');\r\n }\r\n\r\n var proto$2 = Duration.prototype;\r\n\r\n proto$2.isValid = isValid$1;\r\n proto$2.abs = abs;\r\n proto$2.add = add$1;\r\n proto$2.subtract = subtract$1;\r\n proto$2.as = as;\r\n proto$2.asMilliseconds = asMilliseconds;\r\n proto$2.asSeconds = asSeconds;\r\n proto$2.asMinutes = asMinutes;\r\n proto$2.asHours = asHours;\r\n proto$2.asDays = asDays;\r\n proto$2.asWeeks = asWeeks;\r\n proto$2.asMonths = asMonths;\r\n proto$2.asYears = asYears;\r\n proto$2.valueOf = valueOf$1;\r\n proto$2._bubble = bubble;\r\n proto$2.clone = clone$1;\r\n proto$2.get = get$2;\r\n proto$2.milliseconds = milliseconds;\r\n proto$2.seconds = seconds;\r\n proto$2.minutes = minutes;\r\n proto$2.hours = hours;\r\n proto$2.days = days;\r\n proto$2.weeks = weeks;\r\n proto$2.months = months;\r\n proto$2.years = years;\r\n proto$2.humanize = humanize;\r\n proto$2.toISOString = toISOString$1;\r\n proto$2.toString = toISOString$1;\r\n proto$2.toJSON = toISOString$1;\r\n proto$2.locale = locale;\r\n proto$2.localeData = localeData;\r\n\r\n proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);\r\n proto$2.lang = lang;\r\n\r\n // Side effect imports\r\n\r\n // FORMATTING\r\n\r\n addFormatToken('X', 0, 0, 'unix');\r\n addFormatToken('x', 0, 0, 'valueOf');\r\n\r\n // PARSING\r\n\r\n addRegexToken('x', matchSigned);\r\n addRegexToken('X', matchTimestamp);\r\n addParseToken('X', function (input, array, config) {\r\n config._d = new Date(parseFloat(input, 10) * 1000);\r\n });\r\n addParseToken('x', function (input, array, config) {\r\n config._d = new Date(toInt(input));\r\n });\r\n\r\n // Side effect imports\r\n\r\n\r\n hooks.version = '2.22.2';\r\n\r\n setHookCallback(createLocal);\r\n\r\n hooks.fn = proto;\r\n hooks.min = min;\r\n hooks.max = max;\r\n hooks.now = now;\r\n hooks.utc = createUTC;\r\n hooks.unix = createUnix;\r\n hooks.months = listMonths;\r\n hooks.isDate = isDate;\r\n hooks.locale = getSetGlobalLocale;\r\n hooks.invalid = createInvalid;\r\n hooks.duration = createDuration;\r\n hooks.isMoment = isMoment;\r\n hooks.weekdays = listWeekdays;\r\n hooks.parseZone = createInZone;\r\n hooks.localeData = getLocale;\r\n hooks.isDuration = isDuration;\r\n hooks.monthsShort = listMonthsShort;\r\n hooks.weekdaysMin = listWeekdaysMin;\r\n hooks.defineLocale = defineLocale;\r\n hooks.updateLocale = updateLocale;\r\n hooks.locales = listLocales;\r\n hooks.weekdaysShort = listWeekdaysShort;\r\n hooks.normalizeUnits = normalizeUnits;\r\n hooks.relativeTimeRounding = getSetRelativeTimeRounding;\r\n hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\r\n hooks.calendarFormat = getCalendarFormat;\r\n hooks.prototype = proto;\r\n\r\n // currently HTML5 input type only supports 24-hour formats\r\n hooks.HTML5_FMT = {\r\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \r\n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \r\n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \r\n DATE: 'YYYY-MM-DD', // \r\n TIME: 'HH:mm', // \r\n TIME_SECONDS: 'HH:mm:ss', // \r\n TIME_MS: 'HH:mm:ss.SSS', // \r\n WEEK: 'YYYY-[W]WW', // \r\n MONTH: 'YYYY-MM' // \r\n };\r\n\r\n return hooks;\r\n\r\n})));\r\n"]}