aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeterminant <ted.sybil@gmail.com>2019-02-20 12:16:17 -0500
committerDeterminant <ted.sybil@gmail.com>2019-02-20 12:16:17 -0500
commitf23552831c5f2310a3afa4b16198e06a7283a069 (patch)
treef53df430019d24951f78803c0ebb9bbf5f16b870
parentfbfef737e35ed4943df55e84505640d6eb54c09d (diff)
manage auth by background.js; fix bugs
-rw-r--r--dist/background.js8
-rw-r--r--dist/index.js6
-rw-r--r--dist/popup.js6
-rw-r--r--dist/tab.js4
-rw-r--r--src/Analyze.tsx11
-rw-r--r--src/Settings.tsx72
-rw-r--r--src/background.ts75
-rw-r--r--src/gapi.ts120
-rw-r--r--src/msg.ts12
-rw-r--r--src/tab.tsx16
10 files changed, 227 insertions, 103 deletions
diff --git a/dist/background.js b/dist/background.js
index b79e09a..f839e66 100644
--- a/dist/background.js
+++ b/dist/background.js
@@ -1,9 +1,9 @@
-!function(e){var t={};function n(a){if(t[a])return t[a].exports;var r=t[a]={i:a,l:!1,exports:{}};return e[a].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(a,r,function(t){return e[t]}.bind(null,r));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=987)}([function(e,t,n){(function(e){e.exports=function(){"use strict";var t,a;function r(){return t.apply(null,arguments)}function s(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function o(e){return void 0===e}function d(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function l(e,t){var n,a=[];for(n=0;n<e.length;++n)a.push(t(e[n],n));return a}function _(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function c(e,t){for(var n in t)_(t,n)&&(e[n]=t[n]);return _(t,"toString")&&(e.toString=t.toString),_(t,"valueOf")&&(e.valueOf=t.valueOf),e}function m(e,t,n,a){return xt(e,t,n,a,!0).utc()}function h(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function f(e){if(null==e._isValid){var t=h(e),n=a.call(t.parsedDateParts,function(e){return null!=e}),r=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(r=r&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return r;e._isValid=r}return e._isValid}function y(e){var t=m(NaN);return null!=e?c(h(t),e):h(t).userInvalidated=!0,t}a=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,a=0;a<n;a++)if(a in t&&e.call(this,t[a],a,t))return!0;return!1};var M=r.momentProperties=[];function p(e,t){var n,a,r;if(o(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),o(t._i)||(e._i=t._i),o(t._f)||(e._f=t._f),o(t._l)||(e._l=t._l),o(t._strict)||(e._strict=t._strict),o(t._tzm)||(e._tzm=t._tzm),o(t._isUTC)||(e._isUTC=t._isUTC),o(t._offset)||(e._offset=t._offset),o(t._pf)||(e._pf=h(t)),o(t._locale)||(e._locale=t._locale),M.length>0)for(n=0;n<M.length;n++)a=M[n],o(r=t[a])||(e[a]=r);return e}var L=!1;function Y(e){p(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===L&&(L=!0,r.updateOffset(this),L=!1)}function v(e){return e instanceof Y||null!=e&&null!=e._isAMomentObject}function g(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function k(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=g(t)),n}function b(e,t,n){var a,r=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),i=0;for(a=0;a<r;a++)(n&&e[a]!==t[a]||!n&&k(e[a])!==k(t[a]))&&i++;return i+s}function D(e){!1===r.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function w(e,t){var n=!0;return c(function(){if(null!=r.deprecationHandler&&r.deprecationHandler(null,e),n){for(var a,s=[],i=0;i<arguments.length;i++){if(a="","object"==typeof arguments[i]){for(var o in a+="\n["+i+"] ",arguments[0])a+=o+": "+arguments[0][o]+", ";a=a.slice(0,-2)}else a=arguments[i];s.push(a)}D(e+"\nArguments: "+Array.prototype.slice.call(s).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)},t)}var T,S={};function j(e,t){null!=r.deprecationHandler&&r.deprecationHandler(e,t),S[e]||(D(t),S[e]=!0)}function x(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function H(e,t){var n,a=c({},e);for(n in t)_(t,n)&&(i(e[n])&&i(t[n])?(a[n]={},c(a[n],e[n]),c(a[n],t[n])):null!=t[n]?a[n]=t[n]:delete a[n]);for(n in e)_(e,n)&&!_(t,n)&&i(e[n])&&(a[n]=c({},a[n]));return a}function P(e){null!=e&&this.set(e)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,T=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)_(e,t)&&n.push(t);return n};var O={};function E(e,t){var n=e.toLowerCase();O[n]=O[n+"s"]=O[t]=e}function W(e){return"string"==typeof e?O[e]||O[e.toLowerCase()]:void 0}function A(e){var t,n,a={};for(n in e)_(e,n)&&(t=W(n))&&(a[t]=e[n]);return a}var F={};function C(e,t){F[e]=t}function R(e,t,n){var a=""+Math.abs(e),r=t-a.length,s=e>=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+a}var z=/(\[[^\[]*\])|(\\)?([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,N=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,J={},I={};function G(e,t,n,a){var r=a;"string"==typeof a&&(r=function(){return this[a]()}),e&&(I[e]=r),t&&(I[t[0]]=function(){return R(r.apply(this,arguments),t[1],t[2])}),n&&(I[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),e)})}function U(e,t){return e.isValid()?(t=V(t,e.localeData()),J[t]=J[t]||function(e){var t,n,a,r=e.match(z);for(t=0,n=r.length;t<n;t++)I[r[t]]?r[t]=I[r[t]]:r[t]=(a=r[t]).match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"");return function(t){var a,s="";for(a=0;a<n;a++)s+=x(r[a])?r[a].call(t,e):r[a];return s}}(t),J[t](e)):e.localeData().invalidDate()}function V(e,t){var n=5;function a(e){return t.longDateFormat(e)||e}for(N.lastIndex=0;n>=0&&N.test(e);)e=e.replace(N,a),N.lastIndex=0,n-=1;return e}var $=/\d/,q=/\d\d/,K=/\d{3}/,B=/\d{4}/,Z=/[+-]?\d{6}/,Q=/\d\d?/,X=/\d\d\d\d?/,ee=/\d\d\d\d\d\d?/,te=/\d{1,3}/,ne=/\d{1,4}/,ae=/[+-]?\d{1,6}/,re=/\d+/,se=/[+-]?\d+/,ie=/Z|[+-]\d\d:?\d\d/gi,oe=/Z|[+-]\d\d(?::?\d\d)?/gi,de=/[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,ue={};function le(e,t,n){ue[e]=x(t)?t:function(e,a){return e&&n?n:t}}function _e(e,t){return _(ue,e)?ue[e](t._strict,t._locale):new RegExp(ce(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,a,r){return t||n||a||r})))}function ce(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var me={};function he(e,t){var n,a=t;for("string"==typeof e&&(e=[e]),d(t)&&(a=function(e,n){n[t]=k(e)}),n=0;n<e.length;n++)me[e[n]]=a}function fe(e,t){he(e,function(e,n,a,r){a._w=a._w||{},t(e,a._w,a,r)})}function ye(e,t,n){null!=t&&_(me,e)&&me[e](t,n._a,n,e)}var Me=0,pe=1,Le=2,Ye=3,ve=4,ge=5,ke=6,be=7,De=8;function we(e){return Te(e)?366:365}function Te(e){return e%4==0&&e%100!=0||e%400==0}G("Y",0,0,function(){var e=this.year();return e<=9999?""+e:"+"+e}),G(0,["YY",2],0,function(){return this.year()%100}),G(0,["YYYY",4],0,"year"),G(0,["YYYYY",5],0,"year"),G(0,["YYYYYY",6,!0],0,"year"),E("year","y"),C("year",1),le("Y",se),le("YY",Q,q),le("YYYY",ne,B),le("YYYYY",ae,Z),le("YYYYYY",ae,Z),he(["YYYYY","YYYYYY"],Me),he("YYYY",function(e,t){t[Me]=2===e.length?r.parseTwoDigitYear(e):k(e)}),he("YY",function(e,t){t[Me]=r.parseTwoDigitYear(e)}),he("Y",function(e,t){t[Me]=parseInt(e,10)}),r.parseTwoDigitYear=function(e){return k(e)+(k(e)>68?1900:2e3)};var Se,je=xe("FullYear",!0);function xe(e,t){return function(n){return null!=n?(Pe(this,e,n),r.updateOffset(this,t),this):He(this,e)}}function He(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Pe(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&Te(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Oe(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Oe(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,a=(t%(n=12)+n)%n;return e+=(t-a)/12,1===a?Te(e)?29:28:31-a%7%2}Se=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},G("M",["MM",2],"Mo",function(){return this.month()+1}),G("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),G("MMMM",0,0,function(e){return this.localeData().months(this,e)}),E("month","M"),C("month",8),le("M",Q),le("MM",Q,q),le("MMM",function(e,t){return t.monthsShortRegex(e)}),le("MMMM",function(e,t){return t.monthsRegex(e)}),he(["M","MM"],function(e,t){t[pe]=k(e)-1}),he(["MMM","MMMM"],function(e,t,n,a){var r=n._locale.monthsParse(e,a,n._strict);null!=r?t[pe]=r:h(n).invalidMonth=e});var Ee=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,We="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ae="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Fe(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=k(t);else if(!d(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Oe(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Ce(e){return null!=e?(Fe(this,e),r.updateOffset(this,!0),this):He(this,"Month")}var Re=de,ze=de;function Ne(){function e(e,t){return t.length-e.length}var t,n,a=[],r=[],s=[];for(t=0;t<12;t++)n=m([2e3,t]),a.push(this.monthsShort(n,"")),r.push(this.months(n,"")),s.push(this.months(n,"")),s.push(this.monthsShort(n,""));for(a.sort(e),r.sort(e),s.sort(e),t=0;t<12;t++)a[t]=ce(a[t]),r[t]=ce(r[t]);for(t=0;t<24;t++)s[t]=ce(s[t]);this._monthsRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Je(e){var t;if(e<100&&e>=0){var n=Array.prototype.slice.call(arguments);n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function Ie(e,t,n){var a=7+t-n,r=(7+Je(e,0,a).getUTCDay()-t)%7;return-r+a-1}function Ge(e,t,n,a,r){var s,i,o=(7+n-a)%7,d=Ie(e,a,r),u=1+7*(t-1)+o+d;return u<=0?i=we(s=e-1)+u:u>we(e)?(s=e+1,i=u-we(e)):(s=e,i=u),{year:s,dayOfYear:i}}function Ue(e,t,n){var a,r,s=Ie(e.year(),t,n),i=Math.floor((e.dayOfYear()-s-1)/7)+1;return i<1?(r=e.year()-1,a=i+Ve(r,t,n)):i>Ve(e.year(),t,n)?(a=i-Ve(e.year(),t,n),r=e.year()+1):(r=e.year(),a=i),{week:a,year:r}}function Ve(e,t,n){var a=Ie(e,t,n),r=Ie(e+1,t,n);return(we(e)-a+r)/7}function $e(e,t){return e.slice(t,7).concat(e.slice(0,t))}G("w",["ww",2],"wo","week"),G("W",["WW",2],"Wo","isoWeek"),E("week","w"),E("isoWeek","W"),C("week",5),C("isoWeek",5),le("w",Q),le("ww",Q,q),le("W",Q),le("WW",Q,q),fe(["w","ww","W","WW"],function(e,t,n,a){t[a.substr(0,1)]=k(e)}),G("d",0,"do","day"),G("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),G("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),G("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),G("e",0,0,"weekday"),G("E",0,0,"isoWeekday"),E("day","d"),E("weekday","e"),E("isoWeekday","E"),C("day",11),C("weekday",11),C("isoWeekday",11),le("d",Q),le("e",Q),le("E",Q),le("dd",function(e,t){return t.weekdaysMinRegex(e)}),le("ddd",function(e,t){return t.weekdaysShortRegex(e)}),le("dddd",function(e,t){return t.weekdaysRegex(e)}),fe(["dd","ddd","dddd"],function(e,t,n,a){var r=n._locale.weekdaysParse(e,a,n._strict);null!=r?t.d=r:h(n).invalidWeekday=e}),fe(["d","e","E"],function(e,t,n,a){t[a]=k(e)});var qe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ke="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Be="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ze=de,Qe=de,Xe=de;function et(){function e(e,t){return t.length-e.length}var t,n,a,r,s,i=[],o=[],d=[],u=[];for(t=0;t<7;t++)n=m([2e3,1]).day(t),a=this.weekdaysMin(n,""),r=this.weekdaysShort(n,""),s=this.weekdays(n,""),i.push(a),o.push(r),d.push(s),u.push(a),u.push(r),u.push(s);for(i.sort(e),o.sort(e),d.sort(e),u.sort(e),t=0;t<7;t++)o[t]=ce(o[t]),d[t]=ce(d[t]),u[t]=ce(u[t]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function tt(){return this.hours()%12||12}function nt(e,t){G(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function at(e,t){return t._meridiemParse}G("H",["HH",2],0,"hour"),G("h",["hh",2],0,tt),G("k",["kk",2],0,function(){return this.hours()||24}),G("hmm",0,0,function(){return""+tt.apply(this)+R(this.minutes(),2)}),G("hmmss",0,0,function(){return""+tt.apply(this)+R(this.minutes(),2)+R(this.seconds(),2)}),G("Hmm",0,0,function(){return""+this.hours()+R(this.minutes(),2)}),G("Hmmss",0,0,function(){return""+this.hours()+R(this.minutes(),2)+R(this.seconds(),2)}),nt("a",!0),nt("A",!1),E("hour","h"),C("hour",13),le("a",at),le("A",at),le("H",Q),le("h",Q),le("k",Q),le("HH",Q,q),le("hh",Q,q),le("kk",Q,q),le("hmm",X),le("hmmss",ee),le("Hmm",X),le("Hmmss",ee),he(["H","HH"],Ye),he(["k","kk"],function(e,t,n){var a=k(e);t[Ye]=24===a?0:a}),he(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),he(["h","hh"],function(e,t,n){t[Ye]=k(e),h(n).bigHour=!0}),he("hmm",function(e,t,n){var a=e.length-2;t[Ye]=k(e.substr(0,a)),t[ve]=k(e.substr(a)),h(n).bigHour=!0}),he("hmmss",function(e,t,n){var a=e.length-4,r=e.length-2;t[Ye]=k(e.substr(0,a)),t[ve]=k(e.substr(a,2)),t[ge]=k(e.substr(r)),h(n).bigHour=!0}),he("Hmm",function(e,t,n){var a=e.length-2;t[Ye]=k(e.substr(0,a)),t[ve]=k(e.substr(a))}),he("Hmmss",function(e,t,n){var a=e.length-4,r=e.length-2;t[Ye]=k(e.substr(0,a)),t[ve]=k(e.substr(a,2)),t[ge]=k(e.substr(r))});var rt,st=xe("Hours",!0),it={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:We,monthsShort:Ae,week:{dow:0,doy:6},weekdays:qe,weekdaysMin:Be,weekdaysShort:Ke,meridiemParse:/[ap]\.?m?\.?/i},ot={},dt={};function ut(e){return e?e.toLowerCase().replace("_","-"):e}function lt(t){var a=null;if(!ot[t]&&void 0!==e&&e&&e.exports)try{a=rt._abbr,n(372)("./"+t),_t(a)}catch(e){}return ot[t]}function _t(e,t){var n;return e&&((n=o(t)?mt(e):ct(e,t))?rt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),rt._abbr}function ct(e,t){if(null!==t){var n,a=it;if(t.abbr=e,null!=ot[e])j("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),a=ot[e]._config;else if(null!=t.parentLocale)if(null!=ot[t.parentLocale])a=ot[t.parentLocale]._config;else{if(null==(n=lt(t.parentLocale)))return dt[t.parentLocale]||(dt[t.parentLocale]=[]),dt[t.parentLocale].push({name:e,config:t}),null;a=n._config}return ot[e]=new P(H(a,t)),dt[e]&&dt[e].forEach(function(e){ct(e.name,e.config)}),_t(e),ot[e]}return delete ot[e],null}function mt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return rt;if(!s(e)){if(t=lt(e))return t;e=[e]}return function(e){for(var t,n,a,r,s=0;s<e.length;){for(r=ut(e[s]).split("-"),t=r.length,n=(n=ut(e[s+1]))?n.split("-"):null;t>0;){if(a=lt(r.slice(0,t).join("-")))return a;if(n&&n.length>=t&&b(r,n,!0)>=t-1)break;t--}s++}return rt}(e)}function ht(e){var t,n=e._a;return n&&-2===h(e).overflow&&(t=n[pe]<0||n[pe]>11?pe:n[Le]<1||n[Le]>Oe(n[Me],n[pe])?Le:n[Ye]<0||n[Ye]>24||24===n[Ye]&&(0!==n[ve]||0!==n[ge]||0!==n[ke])?Ye:n[ve]<0||n[ve]>59?ve:n[ge]<0||n[ge]>59?ge:n[ke]<0||n[ke]>999?ke:-1,h(e)._overflowDayOfYear&&(t<Me||t>Le)&&(t=Le),h(e)._overflowWeeks&&-1===t&&(t=be),h(e)._overflowWeekday&&-1===t&&(t=De),h(e).overflow=t),e}function ft(e,t,n){return null!=e?e:null!=t?t:n}function yt(e){var t,n,a,s,i,o=[];if(!e._d){for(a=function(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[Le]&&null==e._a[pe]&&function(e){var t,n,a,r,s,i,o,d;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)s=1,i=4,n=ft(t.GG,e._a[Me],Ue(Ht(),1,4).year),a=ft(t.W,1),((r=ft(t.E,1))<1||r>7)&&(d=!0);else{s=e._locale._week.dow,i=e._locale._week.doy;var u=Ue(Ht(),s,i);n=ft(t.gg,e._a[Me],u.year),a=ft(t.w,u.week),null!=t.d?((r=t.d)<0||r>6)&&(d=!0):null!=t.e?(r=t.e+s,(t.e<0||t.e>6)&&(d=!0)):r=s}a<1||a>Ve(n,s,i)?h(e)._overflowWeeks=!0:null!=d?h(e)._overflowWeekday=!0:(o=Ge(n,a,r,s,i),e._a[Me]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(i=ft(e._a[Me],a[Me]),(e._dayOfYear>we(i)||0===e._dayOfYear)&&(h(e)._overflowDayOfYear=!0),n=Je(i,0,e._dayOfYear),e._a[pe]=n.getUTCMonth(),e._a[Le]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=a[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Ye]&&0===e._a[ve]&&0===e._a[ge]&&0===e._a[ke]&&(e._nextDay=!0,e._a[Ye]=0),e._d=(e._useUTC?Je:function(e,t,n,a,r,s,i){var o;return e<100&&e>=0?(o=new Date(e+400,t,n,a,r,s,i),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,a,r,s,i),o}).apply(null,o),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ye]=24),e._w&&void 0!==e._w.d&&e._w.d!==s&&(h(e).weekdayMismatch=!0)}}var Mt=/^\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)?)?$/,pt=/^\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)?)?$/,Lt=/Z|[+-]\d\d(?::?\d\d)?/,Yt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],vt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],gt=/^\/?Date\((\-?\d+)/i;function kt(e){var t,n,a,r,s,i,o=e._i,d=Mt.exec(o)||pt.exec(o);if(d){for(h(e).iso=!0,t=0,n=Yt.length;t<n;t++)if(Yt[t][1].exec(d[1])){r=Yt[t][0],a=!1!==Yt[t][2];break}if(null==r)return void(e._isValid=!1);if(d[3]){for(t=0,n=vt.length;t<n;t++)if(vt[t][1].exec(d[3])){s=(d[2]||" ")+vt[t][0];break}if(null==s)return void(e._isValid=!1)}if(!a&&null!=s)return void(e._isValid=!1);if(d[4]){if(!Lt.exec(d[4]))return void(e._isValid=!1);i="Z"}e._f=r+(s||"")+(i||""),St(e)}else e._isValid=!1}var bt=/^(?:(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}))$/;function Dt(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}var wt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Tt(e){var t,n,a,r,s,i,o,d=bt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(d){var u=(t=d[4],n=d[3],a=d[2],r=d[5],s=d[6],i=d[7],o=[Dt(t),Ae.indexOf(n),parseInt(a,10),parseInt(r,10),parseInt(s,10)],i&&o.push(parseInt(i,10)),o);if(!function(e,t,n){if(e){var a=Ke.indexOf(e),r=new Date(t[0],t[1],t[2]).getDay();if(a!==r)return h(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}(d[1],u,e))return;e._a=u,e._tzm=function(e,t,n){if(e)return wt[e];if(t)return 0;var a=parseInt(n,10),r=a%100,s=(a-r)/100;return 60*s+r}(d[8],d[9],d[10]),e._d=Je.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),h(e).rfc2822=!0}else e._isValid=!1}function St(e){if(e._f!==r.ISO_8601)if(e._f!==r.RFC_2822){e._a=[],h(e).empty=!0;var t,n,a,s,i,o=""+e._i,d=o.length,u=0;for(a=V(e._f,e._locale).match(z)||[],t=0;t<a.length;t++)s=a[t],(n=(o.match(_e(s,e))||[])[0])&&((i=o.substr(0,o.indexOf(n))).length>0&&h(e).unusedInput.push(i),o=o.slice(o.indexOf(n)+n.length),u+=n.length),I[s]?(n?h(e).empty=!1:h(e).unusedTokens.push(s),ye(s,n,e)):e._strict&&!n&&h(e).unusedTokens.push(s);h(e).charsLeftOver=d-u,o.length>0&&h(e).unusedInput.push(o),e._a[Ye]<=12&&!0===h(e).bigHour&&e._a[Ye]>0&&(h(e).bigHour=void 0),h(e).parsedDateParts=e._a.slice(0),h(e).meridiem=e._meridiem,e._a[Ye]=(l=e._locale,_=e._a[Ye],null==(c=e._meridiem)?_:null!=l.meridiemHour?l.meridiemHour(_,c):null!=l.isPM?((m=l.isPM(c))&&_<12&&(_+=12),m||12!==_||(_=0),_):_),yt(e),ht(e)}else Tt(e);else kt(e);var l,_,c,m}function jt(e){var t=e._i,n=e._f;return e._locale=e._locale||mt(e._l),null===t||void 0===n&&""===t?y({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),v(t)?new Y(ht(t)):(u(t)?e._d=t:s(n)?function(e){var t,n,a,r,s;if(0===e._f.length)return h(e).invalidFormat=!0,void(e._d=new Date(NaN));for(r=0;r<e._f.length;r++)s=0,t=p({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[r],St(t),f(t)&&(s+=h(t).charsLeftOver,s+=10*h(t).unusedTokens.length,h(t).score=s,(null==a||s<a)&&(a=s,n=t));c(e,n||t)}(e):n?St(e):function(e){var t=e._i;o(t)?e._d=new Date(r.now()):u(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=gt.exec(e._i);null===t?(kt(e),!1===e._isValid&&(delete e._isValid,Tt(e),!1===e._isValid&&(delete e._isValid,r.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):s(t)?(e._a=l(t.slice(0),function(e){return parseInt(e,10)}),yt(e)):i(t)?function(e){if(!e._d){var t=A(e._i);e._a=l([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),yt(e)}}(e):d(t)?e._d=new Date(t):r.createFromInputFallback(e)}(e),f(e)||(e._d=null),e))}function xt(e,t,n,a,r){var o,d={};return!0!==n&&!1!==n||(a=n,n=void 0),(i(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}(e)||s(e)&&0===e.length)&&(e=void 0),d._isAMomentObject=!0,d._useUTC=d._isUTC=r,d._l=n,d._i=e,d._f=t,d._strict=a,(o=new Y(ht(jt(d))))._nextDay&&(o.add(1,"d"),o._nextDay=void 0),o}function Ht(e,t,n,a){return xt(e,t,n,a,!1)}r.createFromInputFallback=w("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),r.ISO_8601=function(){},r.RFC_2822=function(){};var Pt=w("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ht.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:y()}),Ot=w("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ht.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:y()});function Et(e,t){var n,a;if(1===t.length&&s(t[0])&&(t=t[0]),!t.length)return Ht();for(n=t[0],a=1;a<t.length;++a)t[a].isValid()&&!t[a][e](n)||(n=t[a]);return n}var Wt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function At(e){var t=A(e),n=t.year||0,a=t.quarter||0,r=t.month||0,s=t.week||t.isoWeek||0,i=t.day||0,o=t.hour||0,d=t.minute||0,u=t.second||0,l=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===Se.call(Wt,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,a=0;a<Wt.length;++a)if(e[Wt[a]]){if(n)return!1;parseFloat(e[Wt[a]])!==k(e[Wt[a]])&&(n=!0)}return!0}(t),this._milliseconds=+l+1e3*u+6e4*d+1e3*o*60*60,this._days=+i+7*s,this._months=+r+3*a+12*n,this._data={},this._locale=mt(),this._bubble()}function Ft(e){return e instanceof At}function Ct(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Rt(e,t){G(e,0,0,function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+R(~~(e/60),2)+t+R(~~e%60,2)})}Rt("Z",":"),Rt("ZZ",""),le("Z",oe),le("ZZ",oe),he(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Nt(oe,e)});var zt=/([\+\-]|\d\d)/gi;function Nt(e,t){var n=(t||"").match(e);if(null===n)return null;var a=n[n.length-1]||[],r=(a+"").match(zt)||["-",0,0],s=60*r[1]+k(r[2]);return 0===s?0:"+"===r[0]?s:-s}function Jt(e,t){var n,a;return t._isUTC?(n=t.clone(),a=(v(e)||u(e)?e.valueOf():Ht(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+a),r.updateOffset(n,!1),n):Ht(e).local()}function It(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Gt(){return!!this.isValid()&&this._isUTC&&0===this._offset}r.updateOffset=function(){};var Ut=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Vt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function $t(e,t){var n,a,r,s,i,o,u=e,l=null;return Ft(e)?u={ms:e._milliseconds,d:e._days,M:e._months}:d(e)?(u={},t?u[t]=e:u.milliseconds=e):(l=Ut.exec(e))?(n="-"===l[1]?-1:1,u={y:0,d:k(l[Le])*n,h:k(l[Ye])*n,m:k(l[ve])*n,s:k(l[ge])*n,ms:k(Ct(1e3*l[ke]))*n}):(l=Vt.exec(e))?(n="-"===l[1]?-1:1,u={y:qt(l[2],n),M:qt(l[3],n),w:qt(l[4],n),d:qt(l[5],n),h:qt(l[6],n),m:qt(l[7],n),s:qt(l[8],n)}):null==u?u={}:"object"==typeof u&&("from"in u||"to"in u)&&(s=Ht(u.from),i=Ht(u.to),r=s.isValid()&&i.isValid()?(i=Jt(i,s),s.isBefore(i)?o=Kt(s,i):((o=Kt(i,s)).milliseconds=-o.milliseconds,o.months=-o.months),o):{milliseconds:0,months:0},(u={}).ms=r.milliseconds,u.M=r.months),a=new At(u),Ft(e)&&_(e,"_locale")&&(a._locale=e._locale),a}function qt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Kt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Bt(e,t){return function(n,a){var r;return null===a||isNaN(+a)||(j(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),r=n,n=a,a=r),Zt(this,$t(n="string"==typeof n?+n:n,a),e),this}}function Zt(e,t,n,a){var s=t._milliseconds,i=Ct(t._days),o=Ct(t._months);e.isValid()&&(a=null==a||a,o&&Fe(e,He(e,"Month")+o*n),i&&Pe(e,"Date",He(e,"Date")+i*n),s&&e._d.setTime(e._d.valueOf()+s*n),a&&r.updateOffset(e,i||o))}$t.fn=At.prototype,$t.invalid=function(){return $t(NaN)};var Qt=Bt(1,"add"),Xt=Bt(-1,"subtract");function en(e,t){var n,a,r=12*(t.year()-e.year())+(t.month()-e.month()),s=e.clone().add(r,"months");return t-s<0?(n=e.clone().add(r-1,"months"),a=(t-s)/(s-n)):(n=e.clone().add(r+1,"months"),a=(t-s)/(n-s)),-(r+a)||0}function tn(e){var t;return void 0===e?this._locale._abbr:(null!=(t=mt(e))&&(this._locale=t),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var nn=w("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function an(){return this._locale}var rn=1e3,sn=60*rn,on=60*sn,dn=3506328*on;function un(e,t){return(e%t+t)%t}function ln(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-dn:new Date(e,t,n).valueOf()}function _n(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-dn:Date.UTC(e,t,n)}function cn(e,t){G(0,[e,e.length],0,t)}function mn(e,t,n,a,r){var s;return null==e?Ue(this,a,r).year:(s=Ve(e,a,r),t>s&&(t=s),function(e,t,n,a,r){var s=Ge(e,t,n,a,r),i=Je(s.year,0,s.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}.call(this,e,t,n,a,r))}G(0,["gg",2],0,function(){return this.weekYear()%100}),G(0,["GG",2],0,function(){return this.isoWeekYear()%100}),cn("gggg","weekYear"),cn("ggggg","weekYear"),cn("GGGG","isoWeekYear"),cn("GGGGG","isoWeekYear"),E("weekYear","gg"),E("isoWeekYear","GG"),C("weekYear",1),C("isoWeekYear",1),le("G",se),le("g",se),le("GG",Q,q),le("gg",Q,q),le("GGGG",ne,B),le("gggg",ne,B),le("GGGGG",ae,Z),le("ggggg",ae,Z),fe(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,a){t[a.substr(0,2)]=k(e)}),fe(["gg","GG"],function(e,t,n,a){t[a]=r.parseTwoDigitYear(e)}),G("Q",0,"Qo","quarter"),E("quarter","Q"),C("quarter",7),le("Q",$),he("Q",function(e,t){t[pe]=3*(k(e)-1)}),G("D",["DD",2],"Do","date"),E("date","D"),C("date",9),le("D",Q),le("DD",Q,q),le("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),he(["D","DD"],Le),he("Do",function(e,t){t[Le]=k(e.match(Q)[0])});var hn=xe("Date",!0);G("DDD",["DDDD",3],"DDDo","dayOfYear"),E("dayOfYear","DDD"),C("dayOfYear",4),le("DDD",te),le("DDDD",K),he(["DDD","DDDD"],function(e,t,n){n._dayOfYear=k(e)}),G("m",["mm",2],0,"minute"),E("minute","m"),C("minute",14),le("m",Q),le("mm",Q,q),he(["m","mm"],ve);var fn=xe("Minutes",!1);G("s",["ss",2],0,"second"),E("second","s"),C("second",15),le("s",Q),le("ss",Q,q),he(["s","ss"],ge);var yn,Mn=xe("Seconds",!1);for(G("S",0,0,function(){return~~(this.millisecond()/100)}),G(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),G(0,["SSS",3],0,"millisecond"),G(0,["SSSS",4],0,function(){return 10*this.millisecond()}),G(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),G(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),G(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),G(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),G(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),E("millisecond","ms"),C("millisecond",16),le("S",te,$),le("SS",te,q),le("SSS",te,K),yn="SSSS";yn.length<=9;yn+="S")le(yn,re);function pn(e,t){t[ke]=k(1e3*("0."+e))}for(yn="S";yn.length<=9;yn+="S")he(yn,pn);var Ln=xe("Milliseconds",!1);G("z",0,0,"zoneAbbr"),G("zz",0,0,"zoneName");var Yn=Y.prototype;function vn(e){return e}Yn.add=Qt,Yn.calendar=function(e,t){var n=e||Ht(),a=Jt(n,this).startOf("day"),s=r.calendarFormat(this,a)||"sameElse",i=t&&(x(t[s])?t[s].call(this,n):t[s]);return this.format(i||this.localeData().calendar(s,this,Ht(n)))},Yn.clone=function(){return new Y(this)},Yn.diff=function(e,t,n){var a,r,s;if(!this.isValid())return NaN;if(!(a=Jt(e,this)).isValid())return NaN;switch(r=6e4*(a.utcOffset()-this.utcOffset()),t=W(t)){case"year":s=en(this,a)/12;break;case"month":s=en(this,a);break;case"quarter":s=en(this,a)/3;break;case"second":s=(this-a)/1e3;break;case"minute":s=(this-a)/6e4;break;case"hour":s=(this-a)/36e5;break;case"day":s=(this-a-r)/864e5;break;case"week":s=(this-a-r)/6048e5;break;default:s=this-a}return n?s:g(s)},Yn.endOf=function(e){var t;if(void 0===(e=W(e))||"millisecond"===e||!this.isValid())return this;var n=this._isUTC?_n:ln;switch(e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=on-un(t+(this._isUTC?0:this.utcOffset()*sn),on)-1;break;case"minute":t=this._d.valueOf(),t+=sn-un(t,sn)-1;break;case"second":t=this._d.valueOf(),t+=rn-un(t,rn)-1}return this._d.setTime(t),r.updateOffset(this,!0),this},Yn.format=function(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=U(this,e);return this.localeData().postformat(t)},Yn.from=function(e,t){return this.isValid()&&(v(e)&&e.isValid()||Ht(e).isValid())?$t({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Yn.fromNow=function(e){return this.from(Ht(),e)},Yn.to=function(e,t){return this.isValid()&&(v(e)&&e.isValid()||Ht(e).isValid())?$t({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Yn.toNow=function(e){return this.to(Ht(),e)},Yn.get=function(e){return x(this[e=W(e)])?this[e]():this},Yn.invalidAt=function(){return h(this).overflow},Yn.isAfter=function(e,t){var n=v(e)?e:Ht(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=W(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},Yn.isBefore=function(e,t){var n=v(e)?e:Ht(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=W(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},Yn.isBetween=function(e,t,n,a){var r=v(e)?e:Ht(e),s=v(t)?t:Ht(t);return!!(this.isValid()&&r.isValid()&&s.isValid())&&(("("===(a=a||"()")[0]?this.isAfter(r,n):!this.isBefore(r,n))&&(")"===a[1]?this.isBefore(s,n):!this.isAfter(s,n)))},Yn.isSame=function(e,t){var n,a=v(e)?e:Ht(e);return!(!this.isValid()||!a.isValid())&&("millisecond"===(t=W(t)||"millisecond")?this.valueOf()===a.valueOf():(n=a.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},Yn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},Yn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},Yn.isValid=function(){return f(this)},Yn.lang=nn,Yn.locale=tn,Yn.localeData=an,Yn.max=Ot,Yn.min=Pt,Yn.parsingFlags=function(){return c({},h(this))},Yn.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t=[];for(var n in e)t.push({unit:n,priority:F[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}(e=A(e)),a=0;a<n.length;a++)this[n[a].unit](e[n[a].unit]);else if(x(this[e=W(e)]))return this[e](t);return this},Yn.startOf=function(e){var t;if(void 0===(e=W(e))||"millisecond"===e||!this.isValid())return this;var n=this._isUTC?_n:ln;switch(e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=un(t+(this._isUTC?0:this.utcOffset()*sn),on);break;case"minute":t=this._d.valueOf(),t-=un(t,sn);break;case"second":t=this._d.valueOf(),t-=un(t,rn)}return this._d.setTime(t),r.updateOffset(this,!0),this},Yn.subtract=Xt,Yn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},Yn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},Yn.toDate=function(){return new Date(this.valueOf())},Yn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?U(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):x(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",U(n,"Z")):U(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},Yn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',a=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r=t+'[")]';return this.format(n+a+"-MM-DD[T]HH:mm:ss.SSS"+r)},Yn.toJSON=function(){return this.isValid()?this.toISOString():null},Yn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},Yn.unix=function(){return Math.floor(this.valueOf()/1e3)},Yn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},Yn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},Yn.year=je,Yn.isLeapYear=function(){return Te(this.year())},Yn.weekYear=function(e){return mn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},Yn.isoWeekYear=function(e){return mn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},Yn.quarter=Yn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},Yn.month=Ce,Yn.daysInMonth=function(){return Oe(this.year(),this.month())},Yn.week=Yn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},Yn.isoWeek=Yn.isoWeeks=function(e){var t=Ue(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},Yn.weeksInYear=function(){var e=this.localeData()._week;return Ve(this.year(),e.dow,e.doy)},Yn.isoWeeksInYear=function(){return Ve(this.year(),1,4)},Yn.date=hn,Yn.day=Yn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},Yn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},Yn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},Yn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},Yn.hour=Yn.hours=st,Yn.minute=Yn.minutes=fn,Yn.second=Yn.seconds=Mn,Yn.millisecond=Yn.milliseconds=Ln,Yn.utcOffset=function(e,t,n){var a,s=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Nt(oe,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(a=It(this)),this._offset=e,this._isUTC=!0,null!=a&&this.add(a,"m"),s!==e&&(!t||this._changeInProgress?Zt(this,$t(e-s,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?s:It(this)},Yn.utc=function(e){return this.utcOffset(0,e)},Yn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(It(this),"m")),this},Yn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Nt(ie,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},Yn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Ht(e).utcOffset():0,(this.utcOffset()-e)%60==0)},Yn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Yn.isLocal=function(){return!!this.isValid()&&!this._isUTC},Yn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Yn.isUtc=Gt,Yn.isUTC=Gt,Yn.zoneAbbr=function(){return this._isUTC?"UTC":""},Yn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Yn.dates=w("dates accessor is deprecated. Use date instead.",hn),Yn.months=w("months accessor is deprecated. Use month instead",Ce),Yn.years=w("years accessor is deprecated. Use year instead",je),Yn.zone=w("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),Yn.isDSTShifted=w("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!o(this._isDSTShifted))return this._isDSTShifted;var e={};if(p(e,this),(e=jt(e))._a){var t=e._isUTC?m(e._a):Ht(e._a);this._isDSTShifted=this.isValid()&&b(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted});var gn=P.prototype;function kn(e,t,n,a){var r=mt(),s=m().set(a,t);return r[n](s,e)}function bn(e,t,n){if(d(e)&&(t=e,e=void 0),e=e||"",null!=t)return kn(e,t,n,"month");var a,r=[];for(a=0;a<12;a++)r[a]=kn(e,a,n,"month");return r}function Dn(e,t,n,a){"boolean"==typeof e?(d(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,d(t)&&(n=t,t=void 0),t=t||"");var r,s=mt(),i=e?s._week.dow:0;if(null!=n)return kn(t,(n+i)%7,a,"day");var o=[];for(r=0;r<7;r++)o[r]=kn(t,(r+i)%7,a,"day");return o}gn.calendar=function(e,t,n){var a=this._calendar[e]||this._calendar.sameElse;return x(a)?a.call(t,n):a},gn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},gn.invalidDate=function(){return this._invalidDate},gn.ordinal=function(e){return this._ordinal.replace("%d",e)},gn.preparse=vn,gn.postformat=vn,gn.relativeTime=function(e,t,n,a){var r=this._relativeTime[n];return x(r)?r(e,t,n,a):r.replace(/%d/i,e)},gn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return x(n)?n(t):n.replace(/%s/i,t)},gn.set=function(e){var t,n;for(n in e)x(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},gn.months=function(e,t){return e?s(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Ee).test(t)?"format":"standalone"][e.month()]:s(this._months)?this._months:this._months.standalone},gn.monthsShort=function(e,t){return e?s(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Ee.test(t)?"format":"standalone"][e.month()]:s(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},gn.monthsParse=function(e,t,n){var a,r,s;if(this._monthsParseExact)return function(e,t,n){var a,r,s,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],a=0;a<12;++a)s=m([2e3,a]),this._shortMonthsParse[a]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[a]=this.months(s,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(r=Se.call(this._shortMonthsParse,i))?r:null:-1!==(r=Se.call(this._longMonthsParse,i))?r:null:"MMM"===t?-1!==(r=Se.call(this._shortMonthsParse,i))?r:-1!==(r=Se.call(this._longMonthsParse,i))?r:null:-1!==(r=Se.call(this._longMonthsParse,i))?r:-1!==(r=Se.call(this._shortMonthsParse,i))?r:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),a=0;a<12;a++){if(r=m([2e3,a]),n&&!this._longMonthsParse[a]&&(this._longMonthsParse[a]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[a]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),n||this._monthsParse[a]||(s="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[a]=new RegExp(s.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[a].test(e))return a;if(n&&"MMM"===t&&this._shortMonthsParse[a].test(e))return a;if(!n&&this._monthsParse[a].test(e))return a}},gn.monthsRegex=function(e){return this._monthsParseExact?(_(this,"_monthsRegex")||Ne.call(this),e?this._monthsStrictRegex:this._monthsRegex):(_(this,"_monthsRegex")||(this._monthsRegex=ze),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},gn.monthsShortRegex=function(e){return this._monthsParseExact?(_(this,"_monthsRegex")||Ne.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(_(this,"_monthsShortRegex")||(this._monthsShortRegex=Re),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},gn.week=function(e){return Ue(e,this._week.dow,this._week.doy).week},gn.firstDayOfYear=function(){return this._week.doy},gn.firstDayOfWeek=function(){return this._week.dow},gn.weekdays=function(e,t){var n=s(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?$e(n,this._week.dow):e?n[e.day()]:n},gn.weekdaysMin=function(e){return!0===e?$e(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},gn.weekdaysShort=function(e){return!0===e?$e(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},gn.weekdaysParse=function(e,t,n){var a,r,s;if(this._weekdaysParseExact)return function(e,t,n){var a,r,s,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],a=0;a<7;++a)s=m([2e3,1]).day(a),this._minWeekdaysParse[a]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[a]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[a]=this.weekdays(s,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(r=Se.call(this._weekdaysParse,i))?r:null:"ddd"===t?-1!==(r=Se.call(this._shortWeekdaysParse,i))?r:null:-1!==(r=Se.call(this._minWeekdaysParse,i))?r:null:"dddd"===t?-1!==(r=Se.call(this._weekdaysParse,i))?r:-1!==(r=Se.call(this._shortWeekdaysParse,i))?r:-1!==(r=Se.call(this._minWeekdaysParse,i))?r:null:"ddd"===t?-1!==(r=Se.call(this._shortWeekdaysParse,i))?r:-1!==(r=Se.call(this._weekdaysParse,i))?r:-1!==(r=Se.call(this._minWeekdaysParse,i))?r:null:-1!==(r=Se.call(this._minWeekdaysParse,i))?r:-1!==(r=Se.call(this._weekdaysParse,i))?r:-1!==(r=Se.call(this._shortWeekdaysParse,i))?r:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),a=0;a<7;a++){if(r=m([2e3,1]).day(a),n&&!this._fullWeekdaysParse[a]&&(this._fullWeekdaysParse[a]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[a]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[a]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[a]||(s="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[a]=new RegExp(s.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[a].test(e))return a;if(n&&"ddd"===t&&this._shortWeekdaysParse[a].test(e))return a;if(n&&"dd"===t&&this._minWeekdaysParse[a].test(e))return a;if(!n&&this._weekdaysParse[a].test(e))return a}},gn.weekdaysRegex=function(e){return this._weekdaysParseExact?(_(this,"_weekdaysRegex")||et.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(_(this,"_weekdaysRegex")||(this._weekdaysRegex=Ze),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},gn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(_(this,"_weekdaysRegex")||et.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(_(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Qe),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},gn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(_(this,"_weekdaysRegex")||et.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(_(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Xe),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},gn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},gn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},_t("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=1===k(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n}}),r.lang=w("moment.lang is deprecated. Use moment.locale instead.",_t),r.langData=w("moment.langData is deprecated. Use moment.localeData instead.",mt);var wn=Math.abs;function Tn(e,t,n,a){var r=$t(t,n);return e._milliseconds+=a*r._milliseconds,e._days+=a*r._days,e._months+=a*r._months,e._bubble()}function Sn(e){return e<0?Math.floor(e):Math.ceil(e)}function jn(e){return 4800*e/146097}function xn(e){return 146097*e/4800}function Hn(e){return function(){return this.as(e)}}var Pn=Hn("ms"),On=Hn("s"),En=Hn("m"),Wn=Hn("h"),An=Hn("d"),Fn=Hn("w"),Cn=Hn("M"),Rn=Hn("Q"),zn=Hn("y");function Nn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Jn=Nn("milliseconds"),In=Nn("seconds"),Gn=Nn("minutes"),Un=Nn("hours"),Vn=Nn("days"),$n=Nn("months"),qn=Nn("years"),Kn=Math.round,Bn={ss:44,s:45,m:45,h:22,d:26,M:11},Zn=Math.abs;function Qn(e){return(e>0)-(e<0)||+e}function Xn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Zn(this._milliseconds)/1e3,a=Zn(this._days),r=Zn(this._months);e=g(n/60),t=g(e/60),n%=60,e%=60;var s=g(r/12),i=r%=12,o=a,d=t,u=e,l=n?n.toFixed(3).replace(/\.?0+$/,""):"",_=this.asSeconds();if(!_)return"P0D";var c=_<0?"-":"",m=Qn(this._months)!==Qn(_)?"-":"",h=Qn(this._days)!==Qn(_)?"-":"",f=Qn(this._milliseconds)!==Qn(_)?"-":"";return c+"P"+(s?m+s+"Y":"")+(i?m+i+"M":"")+(o?h+o+"D":"")+(d||u||l?"T":"")+(d?f+d+"H":"")+(u?f+u+"M":"")+(l?f+l+"S":"")}var ea=At.prototype;return ea.isValid=function(){return this._isValid},ea.abs=function(){var e=this._data;return this._milliseconds=wn(this._milliseconds),this._days=wn(this._days),this._months=wn(this._months),e.milliseconds=wn(e.milliseconds),e.seconds=wn(e.seconds),e.minutes=wn(e.minutes),e.hours=wn(e.hours),e.months=wn(e.months),e.years=wn(e.years),this},ea.add=function(e,t){return Tn(this,e,t,1)},ea.subtract=function(e,t){return Tn(this,e,t,-1)},ea.as=function(e){if(!this.isValid())return NaN;var t,n,a=this._milliseconds;if("month"===(e=W(e))||"quarter"===e||"year"===e)switch(t=this._days+a/864e5,n=this._months+jn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(xn(this._months)),e){case"week":return t/7+a/6048e5;case"day":return t+a/864e5;case"hour":return 24*t+a/36e5;case"minute":return 1440*t+a/6e4;case"second":return 86400*t+a/1e3;case"millisecond":return Math.floor(864e5*t)+a;default:throw new Error("Unknown unit "+e)}},ea.asMilliseconds=Pn,ea.asSeconds=On,ea.asMinutes=En,ea.asHours=Wn,ea.asDays=An,ea.asWeeks=Fn,ea.asMonths=Cn,ea.asQuarters=Rn,ea.asYears=zn,ea.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*k(this._months/12):NaN},ea._bubble=function(){var e,t,n,a,r,s=this._milliseconds,i=this._days,o=this._months,d=this._data;return s>=0&&i>=0&&o>=0||s<=0&&i<=0&&o<=0||(s+=864e5*Sn(xn(o)+i),i=0,o=0),d.milliseconds=s%1e3,e=g(s/1e3),d.seconds=e%60,t=g(e/60),d.minutes=t%60,n=g(t/60),d.hours=n%24,i+=g(n/24),r=g(jn(i)),o+=r,i-=Sn(xn(r)),a=g(o/12),o%=12,d.days=i,d.months=o,d.years=a,this},ea.clone=function(){return $t(this)},ea.get=function(e){return e=W(e),this.isValid()?this[e+"s"]():NaN},ea.milliseconds=Jn,ea.seconds=In,ea.minutes=Gn,ea.hours=Un,ea.days=Vn,ea.weeks=function(){return g(this.days()/7)},ea.months=$n,ea.years=qn,ea.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var a=$t(e).abs(),r=Kn(a.as("s")),s=Kn(a.as("m")),i=Kn(a.as("h")),o=Kn(a.as("d")),d=Kn(a.as("M")),u=Kn(a.as("y")),l=r<=Bn.ss&&["s",r]||r<Bn.s&&["ss",r]||s<=1&&["m"]||s<Bn.m&&["mm",s]||i<=1&&["h"]||i<Bn.h&