-
Notifications
You must be signed in to change notification settings - Fork 14
/
moment.js
2 lines (2 loc) · 33.7 KB
/
moment.js
1
2
(function(a){function ca(a,b,c){switch(arguments.length){case 2:return null!=a?a:b;case 3:return null!=a?a:null!=b?b:c;default:throw new Error("Implement me")}}function da(a,b){return g.call(a,b)}function ea(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function fa(a){b.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+a)}function ga(a,b){var c=!0;return pa(function(){return c&&(fa(a),c=!1),b.apply(this,arguments)},b)}function ha(a,b){_[a]||(fa(b),_[a]=!0)}function ia(a,b){return function(c){return sa(a.call(this,c),b)}}function ja(a,b){return function(c){return this.localeData().ordinal(a.call(this,c),b)}}function ka(a,b){var e,f,c=12*(b.year()-a.year())+(b.month()-a.month()),d=a.clone().add(c,"months");return b-d<0?(e=a.clone().add(c-1,"months"),f=(b-d)/(d-e)):(e=a.clone().add(c+1,"months"),f=(b-d)/(e-d)),-(c+f)}function la(a,b,c){var d;return null==c?b:null!=a.meridiemHour?a.meridiemHour(b,c):null!=a.isPM?(d=a.isPM(c),d&&b<12&&(b+=12),d||12!==b||(b=0),b):b}function ma(){}function na(a,c){c!==!1&&Ia(a),qa(this,a),this._d=new Date(+a._d),ba===!1&&(ba=!0,b.updateOffset(this),ba=!1)}function oa(a){var c=Ba(a),d=c.year||0,e=c.quarter||0,f=c.month||0,g=c.week||0,h=c.day||0,i=c.hour||0,j=c.minute||0,k=c.second||0,l=c.millisecond||0;this._milliseconds=+l+1e3*k+6e4*j+36e5*i,this._days=+h+7*g,this._months=+f+3*e+12*d,this._data={},this._locale=b.localeData(),this._bubble()}function pa(a,b){for(var c in b)da(b,c)&&(a[c]=b[c]);return da(b,"toString")&&(a.toString=b.toString),da(b,"valueOf")&&(a.valueOf=b.valueOf),a}function qa(a,b){var c,d,e;if("undefined"!=typeof b._isAMomentObject&&(a._isAMomentObject=b._isAMomentObject),"undefined"!=typeof b._i&&(a._i=b._i),"undefined"!=typeof b._f&&(a._f=b._f),"undefined"!=typeof b._l&&(a._l=b._l),"undefined"!=typeof b._strict&&(a._strict=b._strict),"undefined"!=typeof b._tzm&&(a._tzm=b._tzm),"undefined"!=typeof b._isUTC&&(a._isUTC=b._isUTC),"undefined"!=typeof b._offset&&(a._offset=b._offset),"undefined"!=typeof b._pf&&(a._pf=b._pf),"undefined"!=typeof b._locale&&(a._locale=b._locale),q.length>0)for(c in q)d=q[c],e=b[d],"undefined"!=typeof e&&(a[d]=e);return a}function ra(a){return a<0?Math.ceil(a):Math.floor(a)}function sa(a,b,c){for(var d=""+Math.abs(a),e=a>=0;d.length<b;)d="0"+d;return(e?c?"+":"":"-")+d}function ta(a,b){var c={milliseconds:0,months:0};return c.months=b.month()-a.month()+12*(b.year()-a.year()),a.clone().add(c.months,"M").isAfter(b)&&--c.months,c.milliseconds=+b-+a.clone().add(c.months,"M"),c}function ua(a,b){var c;return b=Na(b,a),a.isBefore(b)?c=ta(a,b):(c=ta(b,a),c.milliseconds=-c.milliseconds,c.months=-c.months),c}function va(a,c){return function(d,e){var f,g;return null===e||isNaN(+e)||(ha(c,"moment()."+c+"(period, number) is deprecated. Please use moment()."+c+"(number, period)."),g=d,d=e,e=g),d="string"==typeof d?+d:d,f=b.duration(d,e),wa(this,f,a),this}}function wa(a,c,d,e){var f=c._milliseconds,g=c._days,h=c._months;e=null==e||e,f&&a._d.setTime(+a._d+f*d),g&&qb(a,"Date",pb(a,"Date")+g*d),h&&ob(a,pb(a,"Month")+h*d),e&&b.updateOffset(a,g||h)}function xa(a){return"[object Array]"===Object.prototype.toString.call(a)}function ya(a){return"[object Date]"===Object.prototype.toString.call(a)||a instanceof Date}function za(a,b,c){var g,d=Math.min(a.length,b.length),e=Math.abs(a.length-b.length),f=0;for(g=0;g<d;g++)(c&&a[g]!==b[g]||!c&&Da(a[g])!==Da(b[g]))&&f++;return f+e}function Aa(a){if(a){var b=a.toLowerCase().replace(/(.)s$/,"$1");a=U[a]||V[b]||b}return a}function Ba(a){var c,d,b={};for(d in a)da(a,d)&&(c=Aa(d),c&&(b[c]=a[d]));return b}function Ca(c){var d,e;if(0===c.indexOf("week"))d=7,e="day";else{if(0!==c.indexOf("month"))return;d=12,e="month"}b[c]=function(f,g){var h,i,j=b._locale[c],k=[];if("number"==typeof f&&(g=f,f=a),i=function(a){var c=b().utc().set(e,a);return j.call(b._locale,c,f||"")},null!=g)return i(g);for(h=0;h<d;h++)k.push(i(h));return k}}function Da(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=b>=0?Math.floor(b):Math.ceil(b)),c}function Ea(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function Fa(a,c,d){return kb(b([a,11,31+c-d]),c,d).week}function Ga(a){return Ha(a)?366:365}function Ha(a){return a%4===0&&a%100!==0||a%400===0}function Ia(a){var b;a._a&&a._pf.overflow===-2&&(b=a._a[j]<0||a._a[j]>11?j:a._a[k]<1||a._a[k]>Ea(a._a[i],a._a[j])?k:a._a[l]<0||a._a[l]>24||24===a._a[l]&&(0!==a._a[m]||0!==a._a[n]||0!==a._a[o])?l:a._a[m]<0||a._a[m]>59?m:a._a[n]<0||a._a[n]>59?n:a._a[o]<0||a._a[o]>999?o:-1,a._pf._overflowDayOfYear&&(b<i||b>k)&&(b=k),a._pf.overflow=b)}function Ja(b){return null==b._isValid&&(b._isValid=!isNaN(b._d.getTime())&&b._pf.overflow<0&&!b._pf.empty&&!b._pf.invalidMonth&&!b._pf.nullInput&&!b._pf.invalidFormat&&!b._pf.userInvalidated,b._strict&&(b._isValid=b._isValid&&0===b._pf.charsLeftOver&&0===b._pf.unusedTokens.length&&b._pf.bigHour===a)),b._isValid}function Ka(a){return a?a.toLowerCase().replace("_","-"):a}function La(a){for(var c,d,e,f,b=0;b<a.length;){for(f=Ka(a[b]).split("-"),c=f.length,d=Ka(a[b+1]),d=d?d.split("-"):null;c>0;){if(e=Ma(f.slice(0,c).join("-")))return e;if(d&&d.length>=c&&za(f,d,!0)>=c-1)break;c--}b++}return null}function Ma(a){var c=null;if(!p[a]&&r)try{c=b.locale(),require("./locale/"+a),b.locale(c)}catch(a){}return p[a]}function Na(a,c){var d,e;return c._isUTC?(d=c.clone(),e=(b.isMoment(a)||ya(a)?+a:+b(a))-+d,d._d.setTime(+d._d+e),b.updateOffset(d,!1),d):b(a).local()}function Oa(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function Pa(a){var c,d,b=a.match(v);for(c=0,d=b.length;c<d;c++)$[b[c]]?b[c]=$[b[c]]:b[c]=Oa(b[c]);return function(e){var f="";for(c=0;c<d;c++)f+=b[c]instanceof Function?b[c].call(e,a):b[c];return f}}function Qa(a,b){return a.isValid()?(b=Ra(b,a.localeData()),W[b]||(W[b]=Pa(b)),W[b](a)):a.localeData().invalidDate()}function Ra(a,b){function d(a){return b.longDateFormat(a)||a}var c=5;for(w.lastIndex=0;c>=0&&w.test(a);)a=a.replace(w,d),w.lastIndex=0,c-=1;return a}function Sa(a,b){var c,d=b._strict;switch(a){case"Q":return H;case"DDDD":return J;case"YYYY":case"GGGG":case"gggg":return d?K:z;case"Y":case"G":case"g":return M;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return d?L:A;case"S":if(d)return H;case"SS":if(d)return I;case"SSS":if(d)return J;case"DDD":return y;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return C;case"a":case"A":return b._locale._meridiemParse;case"x":return F;case"X":return G;case"Z":case"ZZ":return D;case"T":return E;case"SSSS":return B;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return d?I:x;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return x;case"Do":return d?b._locale._ordinalParse:b._locale._ordinalParseLenient;default:return c=new RegExp(_a($a(a.replace("\\","")),"i"))}}function Ta(a){a=a||"";var b=a.match(D)||[],c=b[b.length-1]||[],d=(c+"").match(R)||["-",0,0],e=+(60*d[1])+Da(d[2]);return"+"===d[0]?e:-e}function Ua(a,c,d){var e,f=d._a;switch(a){case"Q":null!=c&&(f[j]=3*(Da(c)-1));break;case"M":case"MM":null!=c&&(f[j]=Da(c)-1);break;case"MMM":case"MMMM":e=d._locale.monthsParse(c,a,d._strict),null!=e?f[j]=e:d._pf.invalidMonth=c;break;case"D":case"DD":null!=c&&(f[k]=Da(c));break;case"Do":null!=c&&(f[k]=Da(parseInt(c.match(/\d{1,2}/)[0],10)));break;case"DDD":case"DDDD":null!=c&&(d._dayOfYear=Da(c));break;case"YY":f[i]=b.parseTwoDigitYear(c);break;case"YYYY":case"YYYYY":case"YYYYYY":f[i]=Da(c);break;case"a":case"A":d._meridiem=c;break;case"h":case"hh":d._pf.bigHour=!0;case"H":case"HH":f[l]=Da(c);break;case"m":case"mm":f[m]=Da(c);break;case"s":case"ss":f[n]=Da(c);break;case"S":case"SS":case"SSS":case"SSSS":f[o]=Da(1e3*("0."+c));break;case"x":d._d=new Date(Da(c));break;case"X":d._d=new Date(1e3*parseFloat(c));break;case"Z":case"ZZ":d._useUTC=!0,d._tzm=Ta(c);break;case"dd":case"ddd":case"dddd":e=d._locale.weekdaysParse(c),null!=e?(d._w=d._w||{},d._w.d=e):d._pf.invalidWeekday=c;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":a=a.substr(0,1);case"gggg":case"GGGG":case"GGGGG":a=a.substr(0,2),c&&(d._w=d._w||{},d._w[a]=Da(c));break;case"gg":case"GG":d._w=d._w||{},d._w[a]=b.parseTwoDigitYear(c)}}function Va(a){var c,d,e,f,g,h,j;c=a._w,null!=c.GG||null!=c.W||null!=c.E?(g=1,h=4,d=ca(c.GG,a._a[i],kb(b(),1,4).year),e=ca(c.W,1),f=ca(c.E,1)):(g=a._locale._week.dow,h=a._locale._week.doy,d=ca(c.gg,a._a[i],kb(b(),g,h).year),e=ca(c.w,1),null!=c.d?(f=c.d,f<g&&++e):f=null!=c.e?c.e+g:g),j=lb(d,e,f,h,g),a._a[i]=j.year,a._dayOfYear=j.dayOfYear}function Wa(a){var b,c,e,f,d=[];if(!a._d){for(e=Ya(a),a._w&&null==a._a[k]&&null==a._a[j]&&Va(a),a._dayOfYear&&(f=ca(a._a[i],e[i]),a._dayOfYear>Ga(f)&&(a._pf._overflowDayOfYear=!0),c=gb(f,0,a._dayOfYear),a._a[j]=c.getUTCMonth(),a._a[k]=c.getUTCDate()),b=0;b<3&&null==a._a[b];++b)a._a[b]=d[b]=e[b];for(;b<7;b++)a._a[b]=d[b]=null==a._a[b]?2===b?1:0:a._a[b];24===a._a[l]&&0===a._a[m]&&0===a._a[n]&&0===a._a[o]&&(a._nextDay=!0,a._a[l]=0),a._d=(a._useUTC?gb:fb).apply(null,d),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),a._nextDay&&(a._a[l]=24)}}function Xa(a){var b;a._d||(b=Ba(a._i),a._a=[b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],Wa(a))}function Ya(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function Za(c){if(c._f===b.ISO_8601)return void bb(c);c._a=[],c._pf.empty=!0;var e,f,g,h,i,d=""+c._i,j=d.length,k=0;for(g=Ra(c._f,c._locale).match(v)||[],e=0;e<g.length;e++)h=g[e],f=(d.match(Sa(h,c))||[])[0],f&&(i=d.substr(0,d.indexOf(f)),i.length>0&&c._pf.unusedInput.push(i),d=d.slice(d.indexOf(f)+f.length),k+=f.length),$[h]?(f?c._pf.empty=!1:c._pf.unusedTokens.push(h),Ua(h,f,c)):c._strict&&!f&&c._pf.unusedTokens.push(h);c._pf.charsLeftOver=j-k,d.length>0&&c._pf.unusedInput.push(d),c._pf.bigHour===!0&&c._a[l]<=12&&(c._pf.bigHour=a),c._a[l]=la(c._locale,c._a[l],c._meridiem),Wa(c),Ia(c)}function $a(a){return a.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e})}function _a(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ab(a){var b,c,d,e,f;if(0===a._f.length)return a._pf.invalidFormat=!0,void(a._d=new Date(NaN));for(e=0;e<a._f.length;e++)f=0,b=qa({},a),null!=a._useUTC&&(b._useUTC=a._useUTC),b._pf=ea(),b._f=a._f[e],Za(b),Ja(b)&&(f+=b._pf.charsLeftOver,f+=10*b._pf.unusedTokens.length,b._pf.score=f,(null==d||f<d)&&(d=f,c=b));pa(a,c||b)}function bb(a){var b,c,d=a._i,e=N.exec(d);if(e){for(a._pf.iso=!0,b=0,c=P.length;b<c;b++)if(P[b][1].exec(d)){a._f=P[b][0]+(e[6]||" ");break}for(b=0,c=Q.length;b<c;b++)if(Q[b][1].exec(d)){a._f+=Q[b][0];break}d.match(D)&&(a._f+="Z"),Za(a)}else a._isValid=!1}function cb(a){bb(a),a._isValid===!1&&(delete a._isValid,b.createFromInputFallback(a))}function db(a,b){var d,c=[];for(d=0;d<a.length;++d)c.push(b(a[d],d));return c}function eb(c){var e,d=c._i;d===a?c._d=new Date:ya(d)?c._d=new Date(+d):null!==(e=s.exec(d))?c._d=new Date(+e[1]):"string"==typeof d?cb(c):xa(d)?(c._a=db(d.slice(0),function(a){return parseInt(a,10)}),Wa(c)):"object"==typeof d?Xa(c):"number"==typeof d?c._d=new Date(d):b.createFromInputFallback(c)}function fb(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);return a<1970&&h.setFullYear(a),h}function gb(a){var b=new Date(Date.UTC.apply(null,arguments));return a<1970&&b.setUTCFullYear(a),b}function hb(a,b){if("string"==typeof a)if(isNaN(a)){if(a=b.weekdaysParse(a),"number"!=typeof a)return null}else a=parseInt(a,10);return a}function ib(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function jb(a,c,d){var e=b.duration(a).abs(),g=f(e.as("s")),h=f(e.as("m")),i=f(e.as("h")),j=f(e.as("d")),k=f(e.as("M")),l=f(e.as("y")),m=g<X.s&&["s",g]||1===h&&["m"]||h<X.m&&["mm",h]||1===i&&["h"]||i<X.h&&["hh",i]||1===j&&["d"]||j<X.d&&["dd",j]||1===k&&["M"]||k<X.M&&["MM",k]||1===l&&["y"]||["yy",l];return m[2]=c,m[3]=+a>0,m[4]=d,ib.apply({},m)}function kb(a,c,d){var g,e=d-c,f=d-a.day();return f>e&&(f-=7),f<e-7&&(f+=7),g=b(a).add(f,"d"),{week:Math.ceil(g.dayOfYear()/7),year:g.year()}}function lb(a,b,c,d,e){var g,h,f=gb(a,0,1).getUTCDay();return f=0===f?7:f,c=null!=c?c:e,g=e-f+(f>d?7:0)-(f<e?7:0),h=7*(b-1)+(c-e)+g+1,{year:h>0?a:a-1,dayOfYear:h>0?h:Ga(a-1)+h}}function mb(c){var f,d=c._i,e=c._f;return c._locale=c._locale||b.localeData(c._l),null===d||e===a&&""===d?b.invalid({nullInput:!0}):("string"==typeof d&&(c._i=d=c._locale.preparse(d)),b.isMoment(d)?new na(d,!0):(e?xa(e)?ab(c):Za(c):eb(c),f=new na(c),f._nextDay&&(f.add(1,"d"),f._nextDay=a),f))}function nb(a,c){var d,e;if(1===c.length&&xa(c[0])&&(c=c[0]),!c.length)return b();for(d=c[0],e=1;e<c.length;++e)c[e][a](d)&&(d=c[e]);return d}function ob(a,b){var c;return"string"==typeof b&&(b=a.localeData().monthsParse(b),"number"!=typeof b)?a:(c=Math.min(a.date(),Ea(a.year(),b)),a._d["set"+(a._isUTC?"UTC":"")+"Month"](b,c),a)}function pb(a,b){return a._d["get"+(a._isUTC?"UTC":"")+b]()}function qb(a,b,c){return"Month"===b?ob(a,c):a._d["set"+(a._isUTC?"UTC":"")+b](c)}function rb(a,c){return function(d){return null!=d?(qb(this,a,d),b.updateOffset(this,c),this):pb(this,a)}}function sb(a){return 400*a/146097}function tb(a){return 146097*a/400}function ub(a){b.duration.fn[a]=function(){return this._data[a]}}function vb(a){"undefined"==typeof ender&&(e=d.moment,a?d.moment=ga("Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release.",b):d.moment=b)}for(var b,e,h,c="2.9.0",d="undefined"==typeof global||"undefined"!=typeof window&&window!==global.window?this:global,f=Math.round,g=Object.prototype.hasOwnProperty,i=0,j=1,k=2,l=3,m=4,n=5,o=6,p={},q=[],r="undefined"!=typeof module&&module&&module.exports,s=/^\/?Date\((\-?\d+)/i,t=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,u=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,v=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|x|X|zz?|ZZ?|.)/g,w=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,x=/\d\d?/,y=/\d{1,3}/,z=/\d{1,4}/,A=/[+\-]?\d{1,6}/,B=/\d+/,C=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,D=/Z|[\+\-]\d\d:?\d\d/gi,E=/T/i,F=/[\+\-]?\d+/,G=/[\+\-]?\d+(\.\d{1,3})?/,H=/\d/,I=/\d\d/,J=/\d{3}/,K=/\d{4}/,L=/[+-]?\d{6}/,M=/[+-]?\d+/,N=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,O="YYYY-MM-DDTHH:mm:ssZ",P=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],Q=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],R=/([\+\-]|\d\d)/gi,T=("Date|Hours|Minutes|Seconds|Milliseconds".split("|"),{Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6}),U={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",D:"date",w:"week",W:"isoWeek",M:"month",Q:"quarter",y:"year",DDD:"dayOfYear",e:"weekday",E:"isoWeekday",gg:"weekYear",GG:"isoWeekYear"},V={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},W={},X={s:45,m:45,h:22,d:26,M:11},Y="DDD w W M D d".split(" "),Z="M D H h m s w W".split(" "),$={M:function(){return this.month()+1},MMM:function(a){return this.localeData().monthsShort(this,a)},MMMM:function(a){return this.localeData().months(this,a)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(a){return this.localeData().weekdaysMin(this,a)},ddd:function(a){return this.localeData().weekdaysShort(this,a)},dddd:function(a){return this.localeData().weekdays(this,a)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return sa(this.year()%100,2)},YYYY:function(){return sa(this.year(),4)},YYYYY:function(){return sa(this.year(),5)},YYYYYY:function(){var a=this.year(),b=a>=0?"+":"-";return b+sa(Math.abs(a),6)},gg:function(){return sa(this.weekYear()%100,2)},gggg:function(){return sa(this.weekYear(),4)},ggggg:function(){return sa(this.weekYear(),5)},GG:function(){return sa(this.isoWeekYear()%100,2)},GGGG:function(){return sa(this.isoWeekYear(),4)},GGGGG:function(){return sa(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return Da(this.milliseconds()/100)},SS:function(){return sa(Da(this.milliseconds()/10),2)},SSS:function(){return sa(this.milliseconds(),3)},SSSS:function(){return sa(this.milliseconds(),3)},Z:function(){var a=this.utcOffset(),b="+";return a<0&&(a=-a,b="-"),b+sa(Da(a/60),2)+":"+sa(Da(a)%60,2)},ZZ:function(){var a=this.utcOffset(),b="+";return a<0&&(a=-a,b="-"),b+sa(Da(a/60),2)+sa(Da(a)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},x:function(){return this.valueOf()},X:function(){return this.unix()},Q:function(){return this.quarter()}},_={},aa=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"],ba=!1;Y.length;)h=Y.pop(),$[h+"o"]=ja($[h],h);for(;Z.length;)h=Z.pop(),$[h+h]=ia($[h],2);$.DDDD=ia($.DDD,3),pa(ma.prototype,{set:function(a){var b,c;for(c in a)b=a[c],"function"==typeof b?this[c]=b:this["_"+c]=b;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(a){return this._months[a.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(a){return this._monthsShort[a.month()]},monthsParse:function(a,c,d){var e,f,g;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),e=0;e<12;e++){if(f=b.utc([2e3,e]),d&&!this._longMonthsParse[e]&&(this._longMonthsParse[e]=new RegExp("^"+this.months(f,"").replace(".","")+"$","i"),this._shortMonthsParse[e]=new RegExp("^"+this.monthsShort(f,"").replace(".","")+"$","i")),d||this._monthsParse[e]||(g="^"+this.months(f,"")+"|^"+this.monthsShort(f,""),this._monthsParse[e]=new RegExp(g.replace(".",""),"i")),d&&"MMMM"===c&&this._longMonthsParse[e].test(a))return e;if(d&&"MMM"===c&&this._shortMonthsParse[e].test(a))return e;if(!d&&this._monthsParse[e].test(a))return e}},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(a){return this._weekdays[a.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(a){return this._weekdaysShort[a.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(a){return this._weekdaysMin[a.day()]},weekdaysParse:function(a){var c,d,e;for(this._weekdaysParse||(this._weekdaysParse=[]),c=0;c<7;c++)if(this._weekdaysParse[c]||(d=b([2e3,1]).day(c),e="^"+this.weekdays(d,"")+"|^"+this.weekdaysShort(d,"")+"|^"+this.weekdaysMin(d,""),this._weekdaysParse[c]=new RegExp(e.replace(".",""),"i")),this._weekdaysParse[c].test(a))return c},_longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},longDateFormat:function(a){var b=this._longDateFormat[a];return!b&&this._longDateFormat[a.toUpperCase()]&&(b=this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a]=b),b},isPM:function(a){return"p"===(a+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(a,b,c){var d=this._calendar[a];return"function"==typeof d?d.apply(b,[c]):d},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)},pastFuture:function(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)},ordinal:function(a){return this._ordinal.replace("%d",a)},_ordinal:"%d",_ordinalParse:/\d{1,2}/,preparse:function(a){return a},postformat:function(a){return a},week:function(a){return kb(a,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},firstDayOfWeek:function(){return this._week.dow},firstDayOfYear:function(){return this._week.doy},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),b=function(b,c,d,e){var f;return"boolean"==typeof d&&(e=d,d=a),f={},f._isAMomentObject=!0,f._i=b,f._f=c,f._l=d,f._strict=e,f._isUTC=!1,f._pf=ea(),mb(f)},b.suppressDeprecationWarnings=!1,b.createFromInputFallback=ga("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))}),b.min=function(){var a=[].slice.call(arguments,0);return nb("isBefore",a)},b.max=function(){var a=[].slice.call(arguments,0);return nb("isAfter",a)},b.utc=function(b,c,d,e){var f;return"boolean"==typeof d&&(e=d,d=a),f={},f._isAMomentObject=!0,f._useUTC=!0,f._isUTC=!0,f._l=d,f._i=b,f._f=c,f._strict=e,f._pf=ea(),mb(f).utc()},b.unix=function(a){return b(1e3*a)},b.duration=function(a,c){var f,g,h,i,d=a,e=null;return b.isDuration(a)?d={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(d={},c?d[c]=a:d.milliseconds=a):(e=t.exec(a))?(f="-"===e[1]?-1:1,d={y:0,d:Da(e[k])*f,h:Da(e[l])*f,m:Da(e[m])*f,s:Da(e[n])*f,ms:Da(e[o])*f}):(e=u.exec(a))?(f="-"===e[1]?-1:1,h=function(a){var b=a&&parseFloat(a.replace(",","."));return(isNaN(b)?0:b)*f},d={y:h(e[2]),M:h(e[3]),d:h(e[4]),h:h(e[5]),m:h(e[6]),s:h(e[7]),w:h(e[8])}):null==d?d={}:"object"==typeof d&&("from"in d||"to"in d)&&(i=ua(b(d.from),b(d.to)),d={},d.ms=i.milliseconds,d.M=i.months),g=new oa(d),b.isDuration(a)&&da(a,"_locale")&&(g._locale=a._locale),g},b.version=c,b.defaultFormat=O,b.ISO_8601=function(){},b.momentProperties=q,b.updateOffset=function(){},b.relativeTimeThreshold=function(b,c){return X[b]!==a&&(c===a?X[b]:(X[b]=c,!0))},b.lang=ga("moment.lang is deprecated. Use moment.locale instead.",function(a,c){return b.locale(a,c)}),b.locale=function(a,c){var d;return a&&(d="undefined"!=typeof c?b.defineLocale(a,c):b.localeData(a),d&&(b.duration._locale=b._locale=d)),b._locale._abbr},b.defineLocale=function(a,c){return null!==c?(c.abbr=a,p[a]||(p[a]=new ma),p[a].set(c),b.locale(a),p[a]):(delete p[a],null)},b.langData=ga("moment.langData is deprecated. Use moment.localeData instead.",function(a){return b.localeData(a)}),b.localeData=function(a){var c;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return b._locale;if(!xa(a)){if(c=Ma(a))return c;a=[a]}return La(a)},b.isMoment=function(a){return a instanceof na||null!=a&&da(a,"_isAMomentObject")},b.isDuration=function(a){return a instanceof oa};for(h=aa.length-1;h>=0;--h)Ca(aa[h]);b.normalizeUnits=function(a){return Aa(a)},b.invalid=function(a){var c=b.utc(NaN);return null!=a?pa(c._pf,a):c._pf.userInvalidated=!0,c},b.parseZone=function(){return b.apply(null,arguments).parseZone()},b.parseTwoDigitYear=function(a){return Da(a)+(Da(a)>68?1900:2e3)},b.isDate=ya,pa(b.fn=na.prototype,{clone:function(){return b(this)},valueOf:function(){return+this._d-6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var a=b(this).utc();return 0<a.year()&&a.year()<=9999?"function"==typeof Date.prototype.toISOString?this.toDate().toISOString():Qa(a,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):Qa(a,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var a=this;return[a.year(),a.month(),a.date(),a.hours(),a.minutes(),a.seconds(),a.milliseconds()]},isValid:function(){return Ja(this)},isDSTShifted:function(){return!!this._a&&(this.isValid()&&za(this._a,(this._isUTC?b.utc(this._a):b(this._a)).toArray())>0)},parsingFlags:function(){return pa({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(a){return this.utcOffset(0,a)},local:function(a){return this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(this._dateUtcOffset(),"m")),this},format:function(a){var c=Qa(this,a||b.defaultFormat);return this.localeData().postformat(c)},add:va(1,"add"),subtract:va(-1,"subtract"),diff:function(a,b,c){var g,h,d=Na(a,this),e=6e4*(d.utcOffset()-this.utcOffset());return b=Aa(b),"year"===b||"month"===b||"quarter"===b?(h=ka(this,d),"quarter"===b?h/=3:"year"===b&&(h/=12)):(g=this-d,h="second"===b?g/1e3:"minute"===b?g/6e4:"hour"===b?g/36e5:"day"===b?(g-e)/864e5:"week"===b?(g-e)/6048e5:g),c?h:ra(h)},from:function(a,c){return b.duration({to:this,from:a}).locale(this.locale()).humanize(!c)},fromNow:function(a){return this.from(b(),a)},calendar:function(a){var c=a||b(),d=Na(c,this).startOf("day"),e=this.diff(d,"days",!0),f=e<-6?"sameElse":e<-1?"lastWeek":e<0?"lastDay":e<1?"sameDay":e<2?"nextDay":e<7?"nextWeek":"sameElse";return this.format(this.localeData().calendar(f,this,b(c)))},isLeapYear:function(){return Ha(this.year())},isDST:function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},day:function(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=hb(a,this.localeData()),this.add(a-b,"d")):b},month:rb("Month",!0),startOf:function(a){switch(a=Aa(a)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===a?this.weekday(0):"isoWeek"===a&&this.isoWeekday(1),"quarter"===a&&this.month(3*Math.floor(this.month()/3)),this},endOf:function(b){return b=Aa(b),b===a||"millisecond"===b?this:this.startOf(b).add(1,"isoWeek"===b?"week":b).subtract(1,"ms")},isAfter:function(a,c){var d;return c=Aa("undefined"!=typeof c?c:"millisecond"),"millisecond"===c?(a=b.isMoment(a)?a:b(a),+this>+a):(d=b.isMoment(a)?+a:+b(a),d<+this.clone().startOf(c))},isBefore:function(a,c){var d;return c=Aa("undefined"!=typeof c?c:"millisecond"),"millisecond"===c?(a=b.isMoment(a)?a:b(a),+this<+a):(d=b.isMoment(a)?+a:+b(a),+this.clone().endOf(c)<d)},isBetween:function(a,b,c){return this.isAfter(a,c)&&this.isBefore(b,c)},isSame:function(a,c){var d;return c=Aa(c||"millisecond"),"millisecond"===c?(a=b.isMoment(a)?a:b(a),+this===+a):(d=+b(a),+this.clone().startOf(c)<=d&&d<=+this.clone().endOf(c))},min:ga("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(a){return a=b.apply(null,arguments),a<this?this:a}),max:ga("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(a){return a=b.apply(null,arguments),a>this?this:a}),zone:ga("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",function(a,b){return null!=a?("string"!=typeof a&&(a=-a),this.utcOffset(a,b),this):-this.utcOffset()}),utcOffset:function(a,c){var e,d=this._offset||0;return null!=a?("string"==typeof a&&(a=Ta(a)),Math.abs(a)<16&&(a*=60),!this._isUTC&&c&&(e=this._dateUtcOffset()),this._offset=a,this._isUTC=!0,null!=e&&this.add(e,"m"),d!==a&&(!c||this._changeInProgress?wa(this,b.duration(a-d,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,b.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?d:this._dateUtcOffset()},isLocal:function(){return!this._isUTC},isUtcOffset:function(){return this._isUTC},isUtc:function(){return this._isUTC&&0===this._offset},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Ta(this._i)),this},hasAlignedHourOffset:function(a){return a=a?b(a).utcOffset():0,(this.utcOffset()-a)%60===0},daysInMonth:function(){return Ea(this.year(),this.month())},dayOfYear:function(a){var c=f((b(this).startOf("day")-b(this).startOf("year"))/864e5)+1;return null==a?c:this.add(a-c,"d")},quarter:function(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)},weekYear:function(a){var b=kb(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==a?b:this.add(a-b,"y")},isoWeekYear:function(a){var b=kb(this,1,4).year;return null==a?b:this.add(a-b,"y")},week:function(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")},isoWeek:function(a){var b=kb(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")},weekday:function(a){var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")},isoWeekday:function(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)},isoWeeksInYear:function(){return Fa(this.year(),1,4)},weeksInYear:function(){var a=this.localeData()._week;return Fa(this.year(),a.dow,a.doy)},get:function(a){return a=Aa(a),this[a]()},set:function(a,b){var c;if("object"==typeof a)for(c in a)this.set(c,a[c]);else a=Aa(a),"function"==typeof this[a]&&this[a](b);return this},locale:function(c){var d;return c===a?this._locale._abbr:(d=b.localeData(c),null!=d&&(this._locale=d),this)},lang:ga("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(b){return b===a?this.localeData():this.locale(b)}),localeData:function(){return this._locale},_dateUtcOffset:function(){return 15*-Math.round(this._d.getTimezoneOffset()/15)}}),b.fn.millisecond=b.fn.milliseconds=rb("Milliseconds",!1),b.fn.second=b.fn.seconds=rb("Seconds",!1),b.fn.minute=b.fn.minutes=rb("Minutes",!1),b.fn.hour=b.fn.hours=rb("Hours",!0),b.fn.date=rb("Date",!0),b.fn.dates=ga("dates accessor is deprecated. Use date instead.",rb("Date",!0)),b.fn.year=rb("FullYear",!0),b.fn.years=ga("years accessor is deprecated. Use year instead.",rb("FullYear",!0)),b.fn.days=b.fn.day,b.fn.months=b.fn.month,b.fn.weeks=b.fn.week,b.fn.isoWeeks=b.fn.isoWeek,b.fn.quarters=b.fn.quarter,b.fn.toJSON=b.fn.toISOString,b.fn.isUTC=b.fn.isUtc,pa(b.duration.fn=oa.prototype,{_bubble:function(){var e,f,g,a=this._milliseconds,b=this._days,c=this._months,d=this._data,h=0;d.milliseconds=a%1e3,e=ra(a/1e3),d.seconds=e%60,f=ra(e/60),d.minutes=f%60,g=ra(f/60),d.hours=g%24,b+=ra(g/24),h=ra(sb(b)),b-=ra(tb(h)),c+=ra(b/30),b%=30,h+=ra(c/12),c%=12,d.days=b,d.months=c,d.years=h},abs:function(){return this._milliseconds=Math.abs(this._milliseconds),this._days=Math.abs(this._days),this._months=Math.abs(this._months),this._data.milliseconds=Math.abs(this._data.milliseconds),this._data.seconds=Math.abs(this._data.seconds),this._data.minutes=Math.abs(this._data.minutes),this._data.hours=Math.abs(this._data.hours),this._data.months=Math.abs(this._data.months),this._data.years=Math.abs(this._data.years),this},weeks:function(){return ra(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*Da(this._months/12)},humanize:function(a){var b=jb(this,!a,this.localeData());return a&&(b=this.localeData().pastFuture(+this,b)),
this.localeData().postformat(b)},add:function(a,c){var d=b.duration(a,c);return this._milliseconds+=d._milliseconds,this._days+=d._days,this._months+=d._months,this._bubble(),this},subtract:function(a,c){var d=b.duration(a,c);return this._milliseconds-=d._milliseconds,this._days-=d._days,this._months-=d._months,this._bubble(),this},get:function(a){return a=Aa(a),this[a.toLowerCase()+"s"]()},as:function(a){var b,c;if(a=Aa(a),"month"===a||"year"===a)return b=this._days+this._milliseconds/864e5,c=this._months+12*sb(b),"month"===a?c:c/12;switch(b=this._days+Math.round(tb(this._months/12)),a){case"week":return b/7+this._milliseconds/6048e5;case"day":return b+this._milliseconds/864e5;case"hour":return 24*b+this._milliseconds/36e5;case"minute":return 24*b*60+this._milliseconds/6e4;case"second":return 24*b*60*60+this._milliseconds/1e3;case"millisecond":return Math.floor(24*b*60*60*1e3)+this._milliseconds;default:throw new Error("Unknown unit "+a)}},lang:b.fn.lang,locale:b.fn.locale,toIsoString:ga("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var a=Math.abs(this.years()),b=Math.abs(this.months()),c=Math.abs(this.days()),d=Math.abs(this.hours()),e=Math.abs(this.minutes()),f=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(a?a+"Y":"")+(b?b+"M":"")+(c?c+"D":"")+(d||e||f?"T":"")+(d?d+"H":"")+(e?e+"M":"")+(f?f+"S":""):"P0D"},localeData:function(){return this._locale},toJSON:function(){return this.toISOString()}}),b.duration.fn.toString=b.duration.fn.toISOString;for(h in T)da(T,h)&&ub(h.toLowerCase());b.duration.fn.asMilliseconds=function(){return this.as("ms")},b.duration.fn.asSeconds=function(){return this.as("s")},b.duration.fn.asMinutes=function(){return this.as("m")},b.duration.fn.asHours=function(){return this.as("h")},b.duration.fn.asDays=function(){return this.as("d")},b.duration.fn.asWeeks=function(){return this.as("weeks")},b.duration.fn.asMonths=function(){return this.as("M")},b.duration.fn.asYears=function(){return this.as("y")},b.locale("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,c=1===Da(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),r?module.exports=b:"function"==typeof define&&define.amd?(define(function(a,c,f){return f.config&&f.config()&&f.config().noGlobal===!0&&(d.moment=e),b}),vb(!0)):vb()}).call(this);