From dfd449b101fab1d2d134509d49b2a34c27263dfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20Caune?= Date: Thu, 22 Aug 2019 11:17:27 +0300 Subject: [PATCH] Three choices in timezone switcher (UTC / check's timezone / browser's timezone). Fixes #278 --- CHANGELOG.md | 1 + hc/front/tests/test_log.py | 2 +- static/js/details.js | 9 ++++----- static/js/log.js | 11 +++++------ static/js/moment.min.js | 7 ------- static/js/spacetime.min.js | 1 + static/js/update-timeout-modal.js | 1 + templates/front/details.html | 17 ++++++++++++----- templates/front/details_events.html | 2 -- templates/front/log.html | 13 ++++++++++--- 10 files changed, 35 insertions(+), 29 deletions(-) delete mode 100644 static/js/moment.min.js create mode 100644 static/js/spacetime.min.js diff --git a/CHANGELOG.md b/CHANGELOG.md index ae8539e8..88a3ebc7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file. - Show the number of downtimes and total downtime minutes in "Check Details" page - Add the `pruneflips` management command - Add Mattermost integration (#276) +- Three choices in timezone switcher (UTC / check's timezone / browser's timezone) (#278) ## Bug Fixes - Fix javascript code to construct correct URLs when running from a subdirectory (#273) diff --git a/hc/front/tests/test_log.py b/hc/front/tests/test_log.py index 93717390..f798d579 100644 --- a/hc/front/tests/test_log.py +++ b/hc/front/tests/test_log.py @@ -22,7 +22,7 @@ class LogTestCase(BaseTestCase): self.client.login(username="alice@example.org", password="password") r = self.client.get(self.url) - self.assertContains(r, "Local Time", status_code=200) + self.assertContains(r, "Browser's time zone", status_code=200) def test_team_access_works(self): diff --git a/static/js/details.js b/static/js/details.js index 8515a00f..3301868f 100644 --- a/static/js/details.js +++ b/static/js/details.js @@ -109,12 +109,11 @@ $(function () { var lastFormat = "local"; function switchDateFormat(format) { lastFormat = format; + var tz = format == "local" ? spacetime().timezone().name : format; $("#log tr").each(function(index, row) { - var dt = moment(row.getAttribute("data-dt")); - format == "local" ? dt.local() : dt.utc(); - - $(".date", row).text(dt.format("MMM D")); - $(".time", row).text(dt.format("HH:mm")); + var s = spacetime(row.getAttribute("data-dt")).goto(tz); + $(".date", row).text(s.unixFmt("MMM d")); + $(".time", row).text(s.unixFmt("h:mm")); }) // The table is initially hidden to avoid flickering as we convert dates. diff --git a/static/js/log.js b/static/js/log.js index 3b056d16..a98327bc 100644 --- a/static/js/log.js +++ b/static/js/log.js @@ -4,19 +4,18 @@ $(function () { $('#ping-details-modal').modal("show"); $.get(this.dataset.url, function(data) { - $("#ping-details-body" ).html(data); + $("#ping-details-body").html(data); }); return false; }); function switchDateFormat(format) { + var tz = format == "local" ? spacetime().timezone().name : format; $("#log tr").each(function(index, row) { - var dt = moment(row.getAttribute("data-dt")); - format == "local" ? dt.local() : dt.utc(); - - $(".date", row).text(dt.format("MMM D")); - $(".time", row).text(dt.format("HH:mm")); + var s = spacetime(row.getAttribute("data-dt")).goto(tz); + $(".date", row).text(s.unixFmt("MMM d")); + $(".time", row).text(s.unixFmt("h:mm")); }) } diff --git a/static/js/moment.min.js b/static/js/moment.min.js deleted file mode 100644 index d301ddbb..00000000 --- a/static/js/moment.min.js +++ /dev/null @@ -1,7 +0,0 @@ -//! moment.js -//! version : 2.13.0 -//! authors : Tim Wood, Iskren Chernev, Moment.js contributors -//! license : MIT -//! momentjs.com -!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):a.moment=b()}(this,function(){"use strict";function a(){return fd.apply(null,arguments)}function b(a){fd=a}function c(a){return a instanceof Array||"[object Array]"===Object.prototype.toString.call(a)}function d(a){return a instanceof Date||"[object Date]"===Object.prototype.toString.call(a)}function e(a,b){var c,d=[];for(c=0;c0)for(c in hd)d=hd[c],e=b[d],m(e)||(a[d]=e);return a}function o(b){n(this,b),this._d=new Date(null!=b._d?b._d.getTime():NaN),id===!1&&(id=!0,a.updateOffset(this),id=!1)}function p(a){return a instanceof o||null!=a&&null!=a._isAMomentObject}function q(a){return 0>a?Math.ceil(a):Math.floor(a)}function r(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=q(b)),c}function s(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;e>d;d++)(c&&a[d]!==b[d]||!c&&r(a[d])!==r(b[d]))&&g++;return g+f}function t(b){a.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+b)}function u(b,c){var d=!0;return g(function(){return null!=a.deprecationHandler&&a.deprecationHandler(null,b),d&&(t(b+"\nArguments: "+Array.prototype.slice.call(arguments).join(", ")+"\n"+(new Error).stack),d=!1),c.apply(this,arguments)},c)}function v(b,c){null!=a.deprecationHandler&&a.deprecationHandler(b,c),jd[b]||(t(c),jd[b]=!0)}function w(a){return a instanceof Function||"[object Function]"===Object.prototype.toString.call(a)}function x(a){return"[object Object]"===Object.prototype.toString.call(a)}function y(a){var b,c;for(c in a)b=a[c],w(b)?this[c]=b:this["_"+c]=b;this._config=a,this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function z(a,b){var c,d=g({},a);for(c in b)f(b,c)&&(x(a[c])&&x(b[c])?(d[c]={},g(d[c],a[c]),g(d[c],b[c])):null!=b[c]?d[c]=b[c]:delete d[c]);return d}function A(a){null!=a&&this.set(a)}function B(a){return a?a.toLowerCase().replace("_","-"):a}function C(a){for(var b,c,d,e,f=0;f0;){if(d=D(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&s(e,c,!0)>=b-1)break;b--}f++}return null}function D(a){var b=null;if(!nd[a]&&"undefined"!=typeof module&&module&&module.exports)try{b=ld._abbr,require("./locale/"+a),E(b)}catch(c){}return nd[a]}function E(a,b){var c;return a&&(c=m(b)?H(a):F(a,b),c&&(ld=c)),ld._abbr}function F(a,b){return null!==b?(b.abbr=a,null!=nd[a]?(v("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale"),b=z(nd[a]._config,b)):null!=b.parentLocale&&(null!=nd[b.parentLocale]?b=z(nd[b.parentLocale]._config,b):v("parentLocaleUndefined","specified parentLocale is not defined yet")),nd[a]=new A(b),E(a),nd[a]):(delete nd[a],null)}function G(a,b){if(null!=b){var c;null!=nd[a]&&(b=z(nd[a]._config,b)),c=new A(b),c.parentLocale=nd[a],nd[a]=c,E(a)}else null!=nd[a]&&(null!=nd[a].parentLocale?nd[a]=nd[a].parentLocale:null!=nd[a]&&delete nd[a]);return nd[a]}function H(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return ld;if(!c(a)){if(b=D(a))return b;a=[a]}return C(a)}function I(){return kd(nd)}function J(a,b){var c=a.toLowerCase();od[c]=od[c+"s"]=od[b]=a}function K(a){return"string"==typeof a?od[a]||od[a.toLowerCase()]:void 0}function L(a){var b,c,d={};for(c in a)f(a,c)&&(b=K(c),b&&(d[b]=a[c]));return d}function M(b,c){return function(d){return null!=d?(O(this,b,d),a.updateOffset(this,c),this):N(this,b)}}function N(a,b){return a.isValid()?a._d["get"+(a._isUTC?"UTC":"")+b]():NaN}function O(a,b,c){a.isValid()&&a._d["set"+(a._isUTC?"UTC":"")+b](c)}function P(a,b){var c;if("object"==typeof a)for(c in a)this.set(c,a[c]);else if(a=K(a),w(this[a]))return this[a](b);return this}function Q(a,b,c){var d=""+Math.abs(a),e=b-d.length,f=a>=0;return(f?c?"+":"":"-")+Math.pow(10,Math.max(0,e)).toString().substr(1)+d}function R(a,b,c,d){var e=d;"string"==typeof d&&(e=function(){return this[d]()}),a&&(sd[a]=e),b&&(sd[b[0]]=function(){return Q(e.apply(this,arguments),b[1],b[2])}),c&&(sd[c]=function(){return this.localeData().ordinal(e.apply(this,arguments),a)})}function S(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function T(a){var b,c,d=a.match(pd);for(b=0,c=d.length;c>b;b++)sd[d[b]]?d[b]=sd[d[b]]:d[b]=S(d[b]);return function(b){var e,f="";for(e=0;c>e;e++)f+=d[e]instanceof Function?d[e].call(b,a):d[e];return f}}function U(a,b){return a.isValid()?(b=V(b,a.localeData()),rd[b]=rd[b]||T(b),rd[b](a)):a.localeData().invalidDate()}function V(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(qd.lastIndex=0;d>=0&&qd.test(a);)a=a.replace(qd,c),qd.lastIndex=0,d-=1;return a}function W(a,b,c){Kd[a]=w(b)?b:function(a,d){return a&&c?c:b}}function X(a,b){return f(Kd,a)?Kd[a](b._strict,b._locale):new RegExp(Y(a))}function Y(a){return Z(a.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e}))}function Z(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function $(a,b){var c,d=b;for("string"==typeof a&&(a=[a]),"number"==typeof b&&(d=function(a,c){c[b]=r(a)}),c=0;cd;++d)f=h([2e3,d]),this._shortMonthsParse[d]=this.monthsShort(f,"").toLocaleLowerCase(),this._longMonthsParse[d]=this.months(f,"").toLocaleLowerCase();return c?"MMM"===b?(e=md.call(this._shortMonthsParse,g),-1!==e?e:null):(e=md.call(this._longMonthsParse,g),-1!==e?e:null):"MMM"===b?(e=md.call(this._shortMonthsParse,g),-1!==e?e:(e=md.call(this._longMonthsParse,g),-1!==e?e:null)):(e=md.call(this._longMonthsParse,g),-1!==e?e:(e=md.call(this._shortMonthsParse,g),-1!==e?e:null))}function fa(a,b,c){var d,e,f;if(this._monthsParseExact)return ea.call(this,a,b,c);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),d=0;12>d;d++){if(e=h([2e3,d]),c&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new RegExp("^"+this.months(e,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=new RegExp("^"+this.monthsShort(e,"").replace(".","")+"$","i")),c||this._monthsParse[d]||(f="^"+this.months(e,"")+"|^"+this.monthsShort(e,""),this._monthsParse[d]=new RegExp(f.replace(".",""),"i")),c&&"MMMM"===b&&this._longMonthsParse[d].test(a))return d;if(c&&"MMM"===b&&this._shortMonthsParse[d].test(a))return d;if(!c&&this._monthsParse[d].test(a))return d}}function ga(a,b){var c;if(!a.isValid())return a;if("string"==typeof b)if(/^\d+$/.test(b))b=r(b);else if(b=a.localeData().monthsParse(b),"number"!=typeof b)return a;return c=Math.min(a.date(),ba(a.year(),b)),a._d["set"+(a._isUTC?"UTC":"")+"Month"](b,c),a}function ha(b){return null!=b?(ga(this,b),a.updateOffset(this,!0),this):N(this,"Month")}function ia(){return ba(this.year(),this.month())}function ja(a){return this._monthsParseExact?(f(this,"_monthsRegex")||la.call(this),a?this._monthsShortStrictRegex:this._monthsShortRegex):this._monthsShortStrictRegex&&a?this._monthsShortStrictRegex:this._monthsShortRegex}function ka(a){return this._monthsParseExact?(f(this,"_monthsRegex")||la.call(this),a?this._monthsStrictRegex:this._monthsRegex):this._monthsStrictRegex&&a?this._monthsStrictRegex:this._monthsRegex}function la(){function a(a,b){return b.length-a.length}var b,c,d=[],e=[],f=[];for(b=0;12>b;b++)c=h([2e3,b]),d.push(this.monthsShort(c,"")),e.push(this.months(c,"")),f.push(this.months(c,"")),f.push(this.monthsShort(c,""));for(d.sort(a),e.sort(a),f.sort(a),b=0;12>b;b++)d[b]=Z(d[b]),e[b]=Z(e[b]),f[b]=Z(f[b]);this._monthsRegex=new RegExp("^("+f.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+e.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+d.join("|")+")","i")}function ma(a){var b,c=a._a;return c&&-2===j(a).overflow&&(b=c[Nd]<0||c[Nd]>11?Nd:c[Od]<1||c[Od]>ba(c[Md],c[Nd])?Od:c[Pd]<0||c[Pd]>24||24===c[Pd]&&(0!==c[Qd]||0!==c[Rd]||0!==c[Sd])?Pd:c[Qd]<0||c[Qd]>59?Qd:c[Rd]<0||c[Rd]>59?Rd:c[Sd]<0||c[Sd]>999?Sd:-1,j(a)._overflowDayOfYear&&(Md>b||b>Od)&&(b=Od),j(a)._overflowWeeks&&-1===b&&(b=Td),j(a)._overflowWeekday&&-1===b&&(b=Ud),j(a).overflow=b),a}function na(a){var b,c,d,e,f,g,h=a._i,i=$d.exec(h)||_d.exec(h);if(i){for(j(a).iso=!0,b=0,c=be.length;c>b;b++)if(be[b][1].exec(i[1])){e=be[b][0],d=be[b][2]!==!1;break}if(null==e)return void(a._isValid=!1);if(i[3]){for(b=0,c=ce.length;c>b;b++)if(ce[b][1].exec(i[3])){f=(i[2]||" ")+ce[b][0];break}if(null==f)return void(a._isValid=!1)}if(!d&&null!=f)return void(a._isValid=!1);if(i[4]){if(!ae.exec(i[4]))return void(a._isValid=!1);g="Z"}a._f=e+(f||"")+(g||""),Ca(a)}else a._isValid=!1}function oa(b){var c=de.exec(b._i);return null!==c?void(b._d=new Date(+c[1])):(na(b),void(b._isValid===!1&&(delete b._isValid,a.createFromInputFallback(b))))}function pa(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);return 100>a&&a>=0&&isFinite(h.getFullYear())&&h.setFullYear(a),h}function qa(a){var b=new Date(Date.UTC.apply(null,arguments));return 100>a&&a>=0&&isFinite(b.getUTCFullYear())&&b.setUTCFullYear(a),b}function ra(a){return sa(a)?366:365}function sa(a){return a%4===0&&a%100!==0||a%400===0}function ta(){return sa(this.year())}function ua(a,b,c){var d=7+b-c,e=(7+qa(a,0,d).getUTCDay()-b)%7;return-e+d-1}function va(a,b,c,d,e){var f,g,h=(7+c-d)%7,i=ua(a,d,e),j=1+7*(b-1)+h+i;return 0>=j?(f=a-1,g=ra(f)+j):j>ra(a)?(f=a+1,g=j-ra(a)):(f=a,g=j),{year:f,dayOfYear:g}}function wa(a,b,c){var d,e,f=ua(a.year(),b,c),g=Math.floor((a.dayOfYear()-f-1)/7)+1;return 1>g?(e=a.year()-1,d=g+xa(e,b,c)):g>xa(a.year(),b,c)?(d=g-xa(a.year(),b,c),e=a.year()+1):(e=a.year(),d=g),{week:d,year:e}}function xa(a,b,c){var d=ua(a,b,c),e=ua(a+1,b,c);return(ra(a)-d+e)/7}function ya(a,b,c){return null!=a?a:null!=b?b:c}function za(b){var c=new Date(a.now());return b._useUTC?[c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()]:[c.getFullYear(),c.getMonth(),c.getDate()]}function Aa(a){var b,c,d,e,f=[];if(!a._d){for(d=za(a),a._w&&null==a._a[Od]&&null==a._a[Nd]&&Ba(a),a._dayOfYear&&(e=ya(a._a[Md],d[Md]),a._dayOfYear>ra(e)&&(j(a)._overflowDayOfYear=!0),c=qa(e,0,a._dayOfYear),a._a[Nd]=c.getUTCMonth(),a._a[Od]=c.getUTCDate()),b=0;3>b&&null==a._a[b];++b)a._a[b]=f[b]=d[b];for(;7>b;b++)a._a[b]=f[b]=null==a._a[b]?2===b?1:0:a._a[b];24===a._a[Pd]&&0===a._a[Qd]&&0===a._a[Rd]&&0===a._a[Sd]&&(a._nextDay=!0,a._a[Pd]=0),a._d=(a._useUTC?qa:pa).apply(null,f),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),a._nextDay&&(a._a[Pd]=24)}}function Ba(a){var b,c,d,e,f,g,h,i;b=a._w,null!=b.GG||null!=b.W||null!=b.E?(f=1,g=4,c=ya(b.GG,a._a[Md],wa(Ka(),1,4).year),d=ya(b.W,1),e=ya(b.E,1),(1>e||e>7)&&(i=!0)):(f=a._locale._week.dow,g=a._locale._week.doy,c=ya(b.gg,a._a[Md],wa(Ka(),f,g).year),d=ya(b.w,1),null!=b.d?(e=b.d,(0>e||e>6)&&(i=!0)):null!=b.e?(e=b.e+f,(b.e<0||b.e>6)&&(i=!0)):e=f),1>d||d>xa(c,f,g)?j(a)._overflowWeeks=!0:null!=i?j(a)._overflowWeekday=!0:(h=va(c,d,e,f,g),a._a[Md]=h.year,a._dayOfYear=h.dayOfYear)}function Ca(b){if(b._f===a.ISO_8601)return void na(b);b._a=[],j(b).empty=!0;var c,d,e,f,g,h=""+b._i,i=h.length,k=0;for(e=V(b._f,b._locale).match(pd)||[],c=0;c0&&j(b).unusedInput.push(g),h=h.slice(h.indexOf(d)+d.length),k+=d.length),sd[f]?(d?j(b).empty=!1:j(b).unusedTokens.push(f),aa(f,d,b)):b._strict&&!d&&j(b).unusedTokens.push(f);j(b).charsLeftOver=i-k,h.length>0&&j(b).unusedInput.push(h),j(b).bigHour===!0&&b._a[Pd]<=12&&b._a[Pd]>0&&(j(b).bigHour=void 0),j(b).parsedDateParts=b._a.slice(0),j(b).meridiem=b._meridiem,b._a[Pd]=Da(b._locale,b._a[Pd],b._meridiem),Aa(b),ma(b)}function Da(a,b,c){var d;return null==c?b:null!=a.meridiemHour?a.meridiemHour(b,c):null!=a.isPM?(d=a.isPM(c),d&&12>b&&(b+=12),d||12!==b||(b=0),b):b}function Ea(a){var b,c,d,e,f;if(0===a._f.length)return j(a).invalidFormat=!0,void(a._d=new Date(NaN));for(e=0;ef)&&(d=f,c=b));g(a,c||b)}function Fa(a){if(!a._d){var b=L(a._i);a._a=e([b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],function(a){return a&&parseInt(a,10)}),Aa(a)}}function Ga(a){var b=new o(ma(Ha(a)));return b._nextDay&&(b.add(1,"d"),b._nextDay=void 0),b}function Ha(a){var b=a._i,e=a._f;return a._locale=a._locale||H(a._l),null===b||void 0===e&&""===b?l({nullInput:!0}):("string"==typeof b&&(a._i=b=a._locale.preparse(b)),p(b)?new o(ma(b)):(c(e)?Ea(a):e?Ca(a):d(b)?a._d=b:Ia(a),k(a)||(a._d=null),a))}function Ia(b){var f=b._i;void 0===f?b._d=new Date(a.now()):d(f)?b._d=new Date(f.valueOf()):"string"==typeof f?oa(b):c(f)?(b._a=e(f.slice(0),function(a){return parseInt(a,10)}),Aa(b)):"object"==typeof f?Fa(b):"number"==typeof f?b._d=new Date(f):a.createFromInputFallback(b)}function Ja(a,b,c,d,e){var f={};return"boolean"==typeof c&&(d=c,c=void 0),f._isAMomentObject=!0,f._useUTC=f._isUTC=e,f._l=c,f._i=a,f._f=b,f._strict=d,Ga(f)}function Ka(a,b,c,d){return Ja(a,b,c,d,!1)}function La(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return Ka();for(d=b[0],e=1;ea&&(a=-a,c="-"),c+Q(~~(a/60),2)+b+Q(~~a%60,2)})}function Ra(a,b){var c=(b||"").match(a)||[],d=c[c.length-1]||[],e=(d+"").match(ie)||["-",0,0],f=+(60*e[1])+r(e[2]);return"+"===e[0]?f:-f}function Sa(b,c){var e,f;return c._isUTC?(e=c.clone(),f=(p(b)||d(b)?b.valueOf():Ka(b).valueOf())-e.valueOf(),e._d.setTime(e._d.valueOf()+f),a.updateOffset(e,!1),e):Ka(b).local()}function Ta(a){return 15*-Math.round(a._d.getTimezoneOffset()/15)}function Ua(b,c){var d,e=this._offset||0;return this.isValid()?null!=b?("string"==typeof b?b=Ra(Hd,b):Math.abs(b)<16&&(b=60*b),!this._isUTC&&c&&(d=Ta(this)),this._offset=b,this._isUTC=!0,null!=d&&this.add(d,"m"),e!==b&&(!c||this._changeInProgress?jb(this,db(b-e,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?e:Ta(this):null!=b?this:NaN}function Va(a,b){return null!=a?("string"!=typeof a&&(a=-a),this.utcOffset(a,b),this):-this.utcOffset()}function Wa(a){return this.utcOffset(0,a)}function Xa(a){return this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(Ta(this),"m")),this}function Ya(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Ra(Gd,this._i)),this}function Za(a){return this.isValid()?(a=a?Ka(a).utcOffset():0,(this.utcOffset()-a)%60===0):!1}function $a(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function _a(){if(!m(this._isDSTShifted))return this._isDSTShifted;var a={};if(n(a,this),a=Ha(a),a._a){var b=a._isUTC?h(a._a):Ka(a._a);this._isDSTShifted=this.isValid()&&s(a._a,b.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function ab(){return this.isValid()?!this._isUTC:!1}function bb(){return this.isValid()?this._isUTC:!1}function cb(){return this.isValid()?this._isUTC&&0===this._offset:!1}function db(a,b){var c,d,e,g=a,h=null;return Pa(a)?g={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(g={},b?g[b]=a:g.milliseconds=a):(h=je.exec(a))?(c="-"===h[1]?-1:1,g={y:0,d:r(h[Od])*c,h:r(h[Pd])*c,m:r(h[Qd])*c,s:r(h[Rd])*c,ms:r(h[Sd])*c}):(h=ke.exec(a))?(c="-"===h[1]?-1:1,g={y:eb(h[2],c),M:eb(h[3],c),w:eb(h[4],c),d:eb(h[5],c),h:eb(h[6],c),m:eb(h[7],c),s:eb(h[8],c)}):null==g?g={}:"object"==typeof g&&("from"in g||"to"in g)&&(e=gb(Ka(g.from),Ka(g.to)),g={},g.ms=e.milliseconds,g.M=e.months),d=new Oa(g),Pa(a)&&f(a,"_locale")&&(d._locale=a._locale),d}function eb(a,b){var c=a&&parseFloat(a.replace(",","."));return(isNaN(c)?0:c)*b}function fb(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 gb(a,b){var c;return a.isValid()&&b.isValid()?(b=Sa(b,a),a.isBefore(b)?c=fb(a,b):(c=fb(b,a),c.milliseconds=-c.milliseconds,c.months=-c.months),c):{milliseconds:0,months:0}}function hb(a){return 0>a?-1*Math.round(-1*a):Math.round(a)}function ib(a,b){return function(c,d){var e,f;return null===d||isNaN(+d)||(v(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period)."),f=c,c=d,d=f),c="string"==typeof c?+c:c,e=db(c,d),jb(this,e,a),this}}function jb(b,c,d,e){var f=c._milliseconds,g=hb(c._days),h=hb(c._months);b.isValid()&&(e=null==e?!0:e,f&&b._d.setTime(b._d.valueOf()+f*d),g&&O(b,"Date",N(b,"Date")+g*d),h&&ga(b,N(b,"Month")+h*d),e&&a.updateOffset(b,g||h))}function kb(a,b){var c=a||Ka(),d=Sa(c,this).startOf("day"),e=this.diff(d,"days",!0),f=-6>e?"sameElse":-1>e?"lastWeek":0>e?"lastDay":1>e?"sameDay":2>e?"nextDay":7>e?"nextWeek":"sameElse",g=b&&(w(b[f])?b[f]():b[f]);return this.format(g||this.localeData().calendar(f,this,Ka(c)))}function lb(){return new o(this)}function mb(a,b){var c=p(a)?a:Ka(a);return this.isValid()&&c.isValid()?(b=K(m(b)?"millisecond":b),"millisecond"===b?this.valueOf()>c.valueOf():c.valueOf()b-f?(c=a.clone().add(e-1,"months"),d=(b-f)/(f-c)):(c=a.clone().add(e+1,"months"),d=(b-f)/(c-f)),-(e+d)||0}function ub(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function vb(){var a=this.clone().utc();return 0f&&(b=f),Vb.call(this,a,b,c,d,e))}function Vb(a,b,c,d,e){var f=va(a,b,c,d,e),g=qa(f.year,0,f.dayOfYear);return this.year(g.getUTCFullYear()),this.month(g.getUTCMonth()),this.date(g.getUTCDate()),this}function Wb(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)}function Xb(a){return wa(a,this._week.dow,this._week.doy).week}function Yb(){return this._week.dow}function Zb(){return this._week.doy}function $b(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")}function _b(a){var b=wa(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")}function ac(a,b){return"string"!=typeof a?a:isNaN(a)?(a=b.weekdaysParse(a),"number"==typeof a?a:null):parseInt(a,10)}function bc(a,b){return c(this._weekdays)?this._weekdays[a.day()]:this._weekdays[this._weekdays.isFormat.test(b)?"format":"standalone"][a.day()]}function cc(a){return this._weekdaysShort[a.day()]}function dc(a){return this._weekdaysMin[a.day()]}function ec(a,b,c){var d,e,f,g=a.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],d=0;7>d;++d)f=h([2e3,1]).day(d),this._minWeekdaysParse[d]=this.weekdaysMin(f,"").toLocaleLowerCase(),this._shortWeekdaysParse[d]=this.weekdaysShort(f,"").toLocaleLowerCase(),this._weekdaysParse[d]=this.weekdays(f,"").toLocaleLowerCase();return c?"dddd"===b?(e=md.call(this._weekdaysParse,g),-1!==e?e:null):"ddd"===b?(e=md.call(this._shortWeekdaysParse,g),-1!==e?e:null):(e=md.call(this._minWeekdaysParse,g),-1!==e?e:null):"dddd"===b?(e=md.call(this._weekdaysParse,g),-1!==e?e:(e=md.call(this._shortWeekdaysParse,g),-1!==e?e:(e=md.call(this._minWeekdaysParse,g),-1!==e?e:null))):"ddd"===b?(e=md.call(this._shortWeekdaysParse,g),-1!==e?e:(e=md.call(this._weekdaysParse,g),-1!==e?e:(e=md.call(this._minWeekdaysParse,g),-1!==e?e:null))):(e=md.call(this._minWeekdaysParse,g),-1!==e?e:(e=md.call(this._weekdaysParse,g),-1!==e?e:(e=md.call(this._shortWeekdaysParse,g),-1!==e?e:null)))}function fc(a,b,c){var d,e,f;if(this._weekdaysParseExact)return ec.call(this,a,b,c);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),d=0;7>d;d++){if(e=h([2e3,1]).day(d),c&&!this._fullWeekdaysParse[d]&&(this._fullWeekdaysParse[d]=new RegExp("^"+this.weekdays(e,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[d]=new RegExp("^"+this.weekdaysShort(e,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[d]=new RegExp("^"+this.weekdaysMin(e,"").replace(".",".?")+"$","i")),this._weekdaysParse[d]||(f="^"+this.weekdays(e,"")+"|^"+this.weekdaysShort(e,"")+"|^"+this.weekdaysMin(e,""),this._weekdaysParse[d]=new RegExp(f.replace(".",""),"i")),c&&"dddd"===b&&this._fullWeekdaysParse[d].test(a))return d;if(c&&"ddd"===b&&this._shortWeekdaysParse[d].test(a))return d;if(c&&"dd"===b&&this._minWeekdaysParse[d].test(a))return d;if(!c&&this._weekdaysParse[d].test(a))return d}}function gc(a){if(!this.isValid())return null!=a?this:NaN;var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=ac(a,this.localeData()),this.add(a-b,"d")):b}function hc(a){if(!this.isValid())return null!=a?this:NaN;var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")}function ic(a){return this.isValid()?null==a?this.day()||7:this.day(this.day()%7?a:a-7):null!=a?this:NaN}function jc(a){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||mc.call(this),a?this._weekdaysStrictRegex:this._weekdaysRegex):this._weekdaysStrictRegex&&a?this._weekdaysStrictRegex:this._weekdaysRegex}function kc(a){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||mc.call(this),a?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):this._weekdaysShortStrictRegex&&a?this._weekdaysShortStrictRegex:this._weekdaysShortRegex}function lc(a){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||mc.call(this),a?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):this._weekdaysMinStrictRegex&&a?this._weekdaysMinStrictRegex:this._weekdaysMinRegex}function mc(){function a(a,b){return b.length-a.length}var b,c,d,e,f,g=[],i=[],j=[],k=[];for(b=0;7>b;b++)c=h([2e3,1]).day(b),d=this.weekdaysMin(c,""),e=this.weekdaysShort(c,""),f=this.weekdays(c,""),g.push(d),i.push(e),j.push(f),k.push(d),k.push(e),k.push(f);for(g.sort(a),i.sort(a),j.sort(a),k.sort(a),b=0;7>b;b++)i[b]=Z(i[b]),j[b]=Z(j[b]),k[b]=Z(k[b]);this._weekdaysRegex=new RegExp("^("+k.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+j.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+g.join("|")+")","i")}function nc(a){var b=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")}function oc(){return this.hours()%12||12}function pc(){return this.hours()||24}function qc(a,b){R(a,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),b)})}function rc(a,b){return b._meridiemParse}function sc(a){return"p"===(a+"").toLowerCase().charAt(0)}function tc(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"}function uc(a,b){b[Sd]=r(1e3*("0."+a))}function vc(){return this._isUTC?"UTC":""}function wc(){return this._isUTC?"Coordinated Universal Time":""}function xc(a){return Ka(1e3*a)}function yc(){return Ka.apply(null,arguments).parseZone()}function zc(a,b,c){var d=this._calendar[a];return w(d)?d.call(b,c):d}function Ac(a){var b=this._longDateFormat[a],c=this._longDateFormat[a.toUpperCase()];return b||!c?b:(this._longDateFormat[a]=c.replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a])}function Bc(){return this._invalidDate}function Cc(a){return this._ordinal.replace("%d",a)}function Dc(a){return a}function Ec(a,b,c,d){var e=this._relativeTime[c];return w(e)?e(a,b,c,d):e.replace(/%d/i,a)}function Fc(a,b){var c=this._relativeTime[a>0?"future":"past"];return w(c)?c(b):c.replace(/%s/i,b)}function Gc(a,b,c,d){var e=H(),f=h().set(d,b);return e[c](f,a)}function Hc(a,b,c){if("number"==typeof a&&(b=a,a=void 0),a=a||"",null!=b)return Gc(a,b,c,"month");var d,e=[];for(d=0;12>d;d++)e[d]=Gc(a,d,c,"month");return e}function Ic(a,b,c,d){"boolean"==typeof a?("number"==typeof b&&(c=b,b=void 0),b=b||""):(b=a,c=b,a=!1,"number"==typeof b&&(c=b,b=void 0),b=b||"");var e=H(),f=a?e._week.dow:0;if(null!=c)return Gc(b,(c+f)%7,d,"day");var g,h=[];for(g=0;7>g;g++)h[g]=Gc(b,(g+f)%7,d,"day");return h}function Jc(a,b){return Hc(a,b,"months")}function Kc(a,b){return Hc(a,b,"monthsShort")}function Lc(a,b,c){return Ic(a,b,c,"weekdays")}function Mc(a,b,c){return Ic(a,b,c,"weekdaysShort")}function Nc(a,b,c){return Ic(a,b,c,"weekdaysMin")}function Oc(){var a=this._data;return this._milliseconds=Le(this._milliseconds),this._days=Le(this._days),this._months=Le(this._months),a.milliseconds=Le(a.milliseconds),a.seconds=Le(a.seconds),a.minutes=Le(a.minutes),a.hours=Le(a.hours),a.months=Le(a.months),a.years=Le(a.years),this}function Pc(a,b,c,d){var e=db(b,c);return a._milliseconds+=d*e._milliseconds,a._days+=d*e._days,a._months+=d*e._months,a._bubble()}function Qc(a,b){return Pc(this,a,b,1)}function Rc(a,b){return Pc(this,a,b,-1)}function Sc(a){return 0>a?Math.floor(a):Math.ceil(a)}function Tc(){var a,b,c,d,e,f=this._milliseconds,g=this._days,h=this._months,i=this._data;return f>=0&&g>=0&&h>=0||0>=f&&0>=g&&0>=h||(f+=864e5*Sc(Vc(h)+g),g=0,h=0),i.milliseconds=f%1e3,a=q(f/1e3),i.seconds=a%60,b=q(a/60),i.minutes=b%60,c=q(b/60),i.hours=c%24,g+=q(c/24),e=q(Uc(g)),h+=e,g-=Sc(Vc(e)),d=q(h/12),h%=12,i.days=g,i.months=h,i.years=d,this}function Uc(a){return 4800*a/146097}function Vc(a){return 146097*a/4800}function Wc(a){var b,c,d=this._milliseconds;if(a=K(a),"month"===a||"year"===a)return b=this._days+d/864e5,c=this._months+Uc(b),"month"===a?c:c/12;switch(b=this._days+Math.round(Vc(this._months)),a){case"week":return b/7+d/6048e5;case"day":return b+d/864e5;case"hour":return 24*b+d/36e5;case"minute":return 1440*b+d/6e4;case"second":return 86400*b+d/1e3;case"millisecond":return Math.floor(864e5*b)+d;default:throw new Error("Unknown unit "+a)}}function Xc(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*r(this._months/12)}function Yc(a){return function(){return this.as(a)}}function Zc(a){ -return a=K(a),this[a+"s"]()}function $c(a){return function(){return this._data[a]}}function _c(){return q(this.days()/7)}function ad(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function bd(a,b,c){var d=db(a).abs(),e=_e(d.as("s")),f=_e(d.as("m")),g=_e(d.as("h")),h=_e(d.as("d")),i=_e(d.as("M")),j=_e(d.as("y")),k=e=f&&["m"]||f=g&&["h"]||g=h&&["d"]||h=i&&["M"]||i=j&&["y"]||["yy",j];return k[2]=b,k[3]=+a>0,k[4]=c,ad.apply(null,k)}function cd(a,b){return void 0===af[a]?!1:void 0===b?af[a]:(af[a]=b,!0)}function dd(a){var b=this.localeData(),c=bd(this,!a,b);return a&&(c=b.pastFuture(+this,c)),b.postformat(c)}function ed(){var a,b,c,d=bf(this._milliseconds)/1e3,e=bf(this._days),f=bf(this._months);a=q(d/60),b=q(a/60),d%=60,a%=60,c=q(f/12),f%=12;var g=c,h=f,i=e,j=b,k=a,l=d,m=this.asSeconds();return m?(0>m?"-":"")+"P"+(g?g+"Y":"")+(h?h+"M":"")+(i?i+"D":"")+(j||k||l?"T":"")+(j?j+"H":"")+(k?k+"M":"")+(l?l+"S":""):"P0D"}var fd,gd;gd=Array.prototype.some?Array.prototype.some:function(a){for(var b=Object(this),c=b.length>>>0,d=0;c>d;d++)if(d in b&&a.call(this,b[d],d,b))return!0;return!1};var hd=a.momentProperties=[],id=!1,jd={};a.suppressDeprecationWarnings=!1,a.deprecationHandler=null;var kd;kd=Object.keys?Object.keys:function(a){var b,c=[];for(b in a)f(a,b)&&c.push(b);return c};var ld,md,nd={},od={},pd=/(\[[^\[]*\])|(\\)?([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,qd=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,rd={},sd={},td=/\d/,ud=/\d\d/,vd=/\d{3}/,wd=/\d{4}/,xd=/[+-]?\d{6}/,yd=/\d\d?/,zd=/\d\d\d\d?/,Ad=/\d\d\d\d\d\d?/,Bd=/\d{1,3}/,Cd=/\d{1,4}/,Dd=/[+-]?\d{1,6}/,Ed=/\d+/,Fd=/[+-]?\d+/,Gd=/Z|[+-]\d\d:?\d\d/gi,Hd=/Z|[+-]\d\d(?::?\d\d)?/gi,Id=/[+-]?\d+(\.\d{1,3})?/,Jd=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Kd={},Ld={},Md=0,Nd=1,Od=2,Pd=3,Qd=4,Rd=5,Sd=6,Td=7,Ud=8;md=Array.prototype.indexOf?Array.prototype.indexOf:function(a){var b;for(b=0;b=a?""+a:"+"+a}),R(0,["YY",2],0,function(){return this.year()%100}),R(0,["YYYY",4],0,"year"),R(0,["YYYYY",5],0,"year"),R(0,["YYYYYY",6,!0],0,"year"),J("year","y"),W("Y",Fd),W("YY",yd,ud),W("YYYY",Cd,wd),W("YYYYY",Dd,xd),W("YYYYYY",Dd,xd),$(["YYYYY","YYYYYY"],Md),$("YYYY",function(b,c){c[Md]=2===b.length?a.parseTwoDigitYear(b):r(b)}),$("YY",function(b,c){c[Md]=a.parseTwoDigitYear(b)}),$("Y",function(a,b){b[Md]=parseInt(a,10)}),a.parseTwoDigitYear=function(a){return r(a)+(r(a)>68?1900:2e3)};var ee=M("FullYear",!0);a.ISO_8601=function(){};var fe=u("moment().min is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var a=Ka.apply(null,arguments);return this.isValid()&&a.isValid()?this>a?this:a:l()}),ge=u("moment().max is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var a=Ka.apply(null,arguments);return this.isValid()&&a.isValid()?a>this?this:a:l()}),he=function(){return Date.now?Date.now():+new Date};Qa("Z",":"),Qa("ZZ",""),W("Z",Hd),W("ZZ",Hd),$(["Z","ZZ"],function(a,b,c){c._useUTC=!0,c._tzm=Ra(Hd,a)});var ie=/([\+\-]|\d\d)/gi;a.updateOffset=function(){};var je=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/,ke=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;db.fn=Oa.prototype;var le=ib(1,"add"),me=ib(-1,"subtract");a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",a.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ne=u("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(a){return void 0===a?this.localeData():this.locale(a)});R(0,["gg",2],0,function(){return this.weekYear()%100}),R(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Pb("gggg","weekYear"),Pb("ggggg","weekYear"),Pb("GGGG","isoWeekYear"),Pb("GGGGG","isoWeekYear"),J("weekYear","gg"),J("isoWeekYear","GG"),W("G",Fd),W("g",Fd),W("GG",yd,ud),W("gg",yd,ud),W("GGGG",Cd,wd),W("gggg",Cd,wd),W("GGGGG",Dd,xd),W("ggggg",Dd,xd),_(["gggg","ggggg","GGGG","GGGGG"],function(a,b,c,d){b[d.substr(0,2)]=r(a)}),_(["gg","GG"],function(b,c,d,e){c[e]=a.parseTwoDigitYear(b)}),R("Q",0,"Qo","quarter"),J("quarter","Q"),W("Q",td),$("Q",function(a,b){b[Nd]=3*(r(a)-1)}),R("w",["ww",2],"wo","week"),R("W",["WW",2],"Wo","isoWeek"),J("week","w"),J("isoWeek","W"),W("w",yd),W("ww",yd,ud),W("W",yd),W("WW",yd,ud),_(["w","ww","W","WW"],function(a,b,c,d){b[d.substr(0,1)]=r(a)});var oe={dow:0,doy:6};R("D",["DD",2],"Do","date"),J("date","D"),W("D",yd),W("DD",yd,ud),W("Do",function(a,b){return a?b._ordinalParse:b._ordinalParseLenient}),$(["D","DD"],Od),$("Do",function(a,b){b[Od]=r(a.match(yd)[0],10)});var pe=M("Date",!0);R("d",0,"do","day"),R("dd",0,0,function(a){return this.localeData().weekdaysMin(this,a)}),R("ddd",0,0,function(a){return this.localeData().weekdaysShort(this,a)}),R("dddd",0,0,function(a){return this.localeData().weekdays(this,a)}),R("e",0,0,"weekday"),R("E",0,0,"isoWeekday"),J("day","d"),J("weekday","e"),J("isoWeekday","E"),W("d",yd),W("e",yd),W("E",yd),W("dd",function(a,b){return b.weekdaysMinRegex(a)}),W("ddd",function(a,b){return b.weekdaysShortRegex(a)}),W("dddd",function(a,b){return b.weekdaysRegex(a)}),_(["dd","ddd","dddd"],function(a,b,c,d){var e=c._locale.weekdaysParse(a,d,c._strict);null!=e?b.d=e:j(c).invalidWeekday=a}),_(["d","e","E"],function(a,b,c,d){b[d]=r(a)});var qe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),re="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),se="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),te=Jd,ue=Jd,ve=Jd;R("DDD",["DDDD",3],"DDDo","dayOfYear"),J("dayOfYear","DDD"),W("DDD",Bd),W("DDDD",vd),$(["DDD","DDDD"],function(a,b,c){c._dayOfYear=r(a)}),R("H",["HH",2],0,"hour"),R("h",["hh",2],0,oc),R("k",["kk",2],0,pc),R("hmm",0,0,function(){return""+oc.apply(this)+Q(this.minutes(),2)}),R("hmmss",0,0,function(){return""+oc.apply(this)+Q(this.minutes(),2)+Q(this.seconds(),2)}),R("Hmm",0,0,function(){return""+this.hours()+Q(this.minutes(),2)}),R("Hmmss",0,0,function(){return""+this.hours()+Q(this.minutes(),2)+Q(this.seconds(),2)}),qc("a",!0),qc("A",!1),J("hour","h"),W("a",rc),W("A",rc),W("H",yd),W("h",yd),W("HH",yd,ud),W("hh",yd,ud),W("hmm",zd),W("hmmss",Ad),W("Hmm",zd),W("Hmmss",Ad),$(["H","HH"],Pd),$(["a","A"],function(a,b,c){c._isPm=c._locale.isPM(a),c._meridiem=a}),$(["h","hh"],function(a,b,c){b[Pd]=r(a),j(c).bigHour=!0}),$("hmm",function(a,b,c){var d=a.length-2;b[Pd]=r(a.substr(0,d)),b[Qd]=r(a.substr(d)),j(c).bigHour=!0}),$("hmmss",function(a,b,c){var d=a.length-4,e=a.length-2;b[Pd]=r(a.substr(0,d)),b[Qd]=r(a.substr(d,2)),b[Rd]=r(a.substr(e)),j(c).bigHour=!0}),$("Hmm",function(a,b,c){var d=a.length-2;b[Pd]=r(a.substr(0,d)),b[Qd]=r(a.substr(d))}),$("Hmmss",function(a,b,c){var d=a.length-4,e=a.length-2;b[Pd]=r(a.substr(0,d)),b[Qd]=r(a.substr(d,2)),b[Rd]=r(a.substr(e))});var we=/[ap]\.?m?\.?/i,xe=M("Hours",!0);R("m",["mm",2],0,"minute"),J("minute","m"),W("m",yd),W("mm",yd,ud),$(["m","mm"],Qd);var ye=M("Minutes",!1);R("s",["ss",2],0,"second"),J("second","s"),W("s",yd),W("ss",yd,ud),$(["s","ss"],Rd);var ze=M("Seconds",!1);R("S",0,0,function(){return~~(this.millisecond()/100)}),R(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),R(0,["SSS",3],0,"millisecond"),R(0,["SSSS",4],0,function(){return 10*this.millisecond()}),R(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),R(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),R(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),R(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),R(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),J("millisecond","ms"),W("S",Bd,td),W("SS",Bd,ud),W("SSS",Bd,vd);var Ae;for(Ae="SSSS";Ae.length<=9;Ae+="S")W(Ae,Ed);for(Ae="S";Ae.length<=9;Ae+="S")$(Ae,uc);var Be=M("Milliseconds",!1);R("z",0,0,"zoneAbbr"),R("zz",0,0,"zoneName");var Ce=o.prototype;Ce.add=le,Ce.calendar=kb,Ce.clone=lb,Ce.diff=sb,Ce.endOf=Eb,Ce.format=wb,Ce.from=xb,Ce.fromNow=yb,Ce.to=zb,Ce.toNow=Ab,Ce.get=P,Ce.invalidAt=Nb,Ce.isAfter=mb,Ce.isBefore=nb,Ce.isBetween=ob,Ce.isSame=pb,Ce.isSameOrAfter=qb,Ce.isSameOrBefore=rb,Ce.isValid=Lb,Ce.lang=ne,Ce.locale=Bb,Ce.localeData=Cb,Ce.max=ge,Ce.min=fe,Ce.parsingFlags=Mb,Ce.set=P,Ce.startOf=Db,Ce.subtract=me,Ce.toArray=Ib,Ce.toObject=Jb,Ce.toDate=Hb,Ce.toISOString=vb,Ce.toJSON=Kb,Ce.toString=ub,Ce.unix=Gb,Ce.valueOf=Fb,Ce.creationData=Ob,Ce.year=ee,Ce.isLeapYear=ta,Ce.weekYear=Qb,Ce.isoWeekYear=Rb,Ce.quarter=Ce.quarters=Wb,Ce.month=ha,Ce.daysInMonth=ia,Ce.week=Ce.weeks=$b,Ce.isoWeek=Ce.isoWeeks=_b,Ce.weeksInYear=Tb,Ce.isoWeeksInYear=Sb,Ce.date=pe,Ce.day=Ce.days=gc,Ce.weekday=hc,Ce.isoWeekday=ic,Ce.dayOfYear=nc,Ce.hour=Ce.hours=xe,Ce.minute=Ce.minutes=ye,Ce.second=Ce.seconds=ze,Ce.millisecond=Ce.milliseconds=Be,Ce.utcOffset=Ua,Ce.utc=Wa,Ce.local=Xa,Ce.parseZone=Ya,Ce.hasAlignedHourOffset=Za,Ce.isDST=$a,Ce.isDSTShifted=_a,Ce.isLocal=ab,Ce.isUtcOffset=bb,Ce.isUtc=cb,Ce.isUTC=cb,Ce.zoneAbbr=vc,Ce.zoneName=wc,Ce.dates=u("dates accessor is deprecated. Use date instead.",pe),Ce.months=u("months accessor is deprecated. Use month instead",ha),Ce.years=u("years accessor is deprecated. Use year instead",ee),Ce.zone=u("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Va);var De=Ce,Ee={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Fe={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"},Ge="Invalid date",He="%d",Ie=/\d{1,2}/,Je={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"},Ke=A.prototype;Ke._calendar=Ee,Ke.calendar=zc,Ke._longDateFormat=Fe,Ke.longDateFormat=Ac,Ke._invalidDate=Ge,Ke.invalidDate=Bc,Ke._ordinal=He,Ke.ordinal=Cc,Ke._ordinalParse=Ie,Ke.preparse=Dc,Ke.postformat=Dc,Ke._relativeTime=Je,Ke.relativeTime=Ec,Ke.pastFuture=Fc,Ke.set=y,Ke.months=ca,Ke._months=Wd,Ke.monthsShort=da,Ke._monthsShort=Xd,Ke.monthsParse=fa,Ke._monthsRegex=Zd,Ke.monthsRegex=ka,Ke._monthsShortRegex=Yd,Ke.monthsShortRegex=ja,Ke.week=Xb,Ke._week=oe,Ke.firstDayOfYear=Zb,Ke.firstDayOfWeek=Yb,Ke.weekdays=bc,Ke._weekdays=qe,Ke.weekdaysMin=dc,Ke._weekdaysMin=se,Ke.weekdaysShort=cc,Ke._weekdaysShort=re,Ke.weekdaysParse=fc,Ke._weekdaysRegex=te,Ke.weekdaysRegex=jc,Ke._weekdaysShortRegex=ue,Ke.weekdaysShortRegex=kc,Ke._weekdaysMinRegex=ve,Ke.weekdaysMinRegex=lc,Ke.isPM=sc,Ke._meridiemParse=we,Ke.meridiem=tc,E("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,c=1===r(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),a.lang=u("moment.lang is deprecated. Use moment.locale instead.",E),a.langData=u("moment.langData is deprecated. Use moment.localeData instead.",H);var Le=Math.abs,Me=Yc("ms"),Ne=Yc("s"),Oe=Yc("m"),Pe=Yc("h"),Qe=Yc("d"),Re=Yc("w"),Se=Yc("M"),Te=Yc("y"),Ue=$c("milliseconds"),Ve=$c("seconds"),We=$c("minutes"),Xe=$c("hours"),Ye=$c("days"),Ze=$c("months"),$e=$c("years"),_e=Math.round,af={s:45,m:45,h:22,d:26,M:11},bf=Math.abs,cf=Oa.prototype;cf.abs=Oc,cf.add=Qc,cf.subtract=Rc,cf.as=Wc,cf.asMilliseconds=Me,cf.asSeconds=Ne,cf.asMinutes=Oe,cf.asHours=Pe,cf.asDays=Qe,cf.asWeeks=Re,cf.asMonths=Se,cf.asYears=Te,cf.valueOf=Xc,cf._bubble=Tc,cf.get=Zc,cf.milliseconds=Ue,cf.seconds=Ve,cf.minutes=We,cf.hours=Xe,cf.days=Ye,cf.weeks=_c,cf.months=Ze,cf.years=$e,cf.humanize=dd,cf.toISOString=ed,cf.toString=ed,cf.toJSON=ed,cf.locale=Bb,cf.localeData=Cb,cf.toIsoString=u("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ed),cf.lang=ne,R("X",0,0,"unix"),R("x",0,0,"valueOf"),W("x",Fd),W("X",Id),$("X",function(a,b,c){c._d=new Date(1e3*parseFloat(a,10))}),$("x",function(a,b,c){c._d=new Date(r(a))}),a.version="2.13.0",b(Ka),a.fn=De,a.min=Ma,a.max=Na,a.now=he,a.utc=h,a.unix=xc,a.months=Jc,a.isDate=d,a.locale=E,a.invalid=l,a.duration=db,a.isMoment=p,a.weekdays=Lc,a.parseZone=yc,a.localeData=H,a.isDuration=Pa,a.monthsShort=Kc,a.weekdaysMin=Nc,a.defineLocale=F,a.updateLocale=G,a.locales=I,a.weekdaysShort=Mc,a.normalizeUnits=K,a.relativeTimeThreshold=cd,a.prototype=De;var df=a;return df}); \ No newline at end of file diff --git a/static/js/spacetime.min.js b/static/js/spacetime.min.js new file mode 100644 index 00000000..7878acfe --- /dev/null +++ b/static/js/spacetime.min.js @@ -0,0 +1 @@ +!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e=e||self).spacetime=n()}(this,function(){"use strict";var e,n=function(e,n){return e(n={exports:{}},n.exports),n.exports}(function(e,n){n.isLeapYear=function(e){return e%4==0&&e%100!=0||e%400==0},n.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e.valueOf())},n.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},n.isObject=function(e){return"[object Object]"===Object.prototype.toString.call(e)},n.zeroPad=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,t="0";return(e+="").length>=n?e:new Array(n-e.length+1).join(t)+e},n.titleCase=function(e){return e?e[0].toUpperCase()+e.substr(1):""},n.ordinal=function(e){var n=e%10,t=e%100;return 1===n&&11!==t?e+"st":2===n&&12!==t?e+"nd":3===n&&13!==t?e+"rd":e+"th"},n.toCardinal=function(e){return e=(e=String(e)).replace(/([0-9])(st|nd|rd|th)$/i,"$1"),parseInt(e,10)},n.normalize=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"day"===(e=(e=(e=(e=e.toLowerCase().trim()).replace(/ies$/,"y")).replace(/s$/,"")).replace(/-/g,""))?"date":e},n.getEpoch=function(e){return"number"==typeof e?e:n.isDate(e)?e.getTime():e.epoch?e.epoch:null},n.beADate=function(e,t){return!1===n.isObject(e)?t.clone().set(e):e},n.formatTimezone=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=Math.abs(e),a=e>0?"+":"-";return"".concat(a).concat(n.zeroPad(r)).concat(t,"00")}}),t=(n.isLeapYear,n.isDate,n.isArray,n.isObject,n.zeroPad,n.titleCase,n.ordinal,n.toCardinal,n.normalize,n.getEpoch,n.beADate,n.formatTimezone,n.zeroPad),r=function(e,n,r,a){var o=new Date(e),i=(o.getTimezoneOffset()||0)+60*a;i=60*i*1e3;var u=function(e){return t(e.getMonth()+1)+"/"+t(e.getDate())+":"+t(e.getHours())}(o=new Date(e+i));return u>=n&&u");return!0===r(e.epoch,o[0],o[1],t)?t:a},o=["africa","america","asia","atlantic","australia","brazil","canada","chile","europe","indian","mexico","pacific","antarctica","etc"],i=(e=Object.freeze({default:{"9|s":"2/dili,2/jayapura","9|n":"2/chita,2/khandyga,2/pyongyang,2/seoul,2/tokyo,11/palau","9.5|s|04/07:03->10/06:02":"4/adelaide,4/broken_hill,4/south,4/yancowinna","9.5|s":"4/darwin,4/north","8|s":"12/casey,2/kuala_lumpur,2/makassar,2/singapore,4/perth,4/west","8|n|03/25:03->09/29:23":"2/ulan_bator","8|n":"2/brunei,2/choibalsan,2/chongqing,2/chungking,2/harbin,2/hong_kong,2/irkutsk,2/kuching,2/macao,2/macau,2/manila,2/shanghai,2/taipei,2/ujung_pandang,2/ulaanbaatar","8.75|s":"4/eucla","7|s":"12/davis,2/jakarta,9/christmas","7|n":"2/bangkok,2/barnaul,2/ho_chi_minh,2/hovd,2/krasnoyarsk,2/novokuznetsk,2/novosibirsk,2/phnom_penh,2/pontianak,2/saigon,2/tomsk,2/vientiane","6|s":"12/vostok","6|n":"2/almaty,2/bishkek,2/dacca,2/dhaka,2/kashgar,2/omsk,2/qyzylorda,2/thimbu,2/thimphu,2/urumqi,9/chagos","6.5|n":"2/rangoon,9/cocos","5|s":"12/mawson,9/kerguelen","5|n":"2/aqtau,2/aqtobe,2/ashgabat,2/ashkhabad,2/atyrau,2/baku,2/dushanbe,2/karachi,2/oral,2/samarkand,2/tashkent,2/yekaterinburg,9/maldives","5.75|n":"2/kathmandu,2/katmandu","5.5|n":"2/calcutta,2/colombo,2/kolkata","4|s":"9/reunion","4|n":"2/dubai,2/muscat,2/tbilisi,2/yerevan,8/astrakhan,8/samara,8/saratov,8/ulyanovsk,8/volgograd,2/volgograd,9/mahe,9/mauritius","4.5|n|03/22:00->09/21:24":"2/tehran","4.5|n":"2/kabul","3|s":"12/syowa,9/antananarivo","3|n|03/31:03->10/27:04":"2/nicosia,8/athens,8/bucharest,8/helsinki,8/kiev,8/mariehamn,8/nicosia,8/riga,8/sofia,8/tallinn,8/uzhgorod,8/vilnius,8/zaporozhye","3|n|03/31:02->10/27:03":"8/chisinau,8/tiraspol","3|n|03/31:00->10/26:24":"2/beirut","3|n|03/29:02->10/27:02":"2/jerusalem,2/tel_aviv","3|n|03/29:00->10/25:01":"2/amman","3|n|03/29:00->10/24:24":"2/damascus","3|n|03/23:01->10/26:01":"2/gaza,2/hebron","3|n":"0/addis_ababa,0/asmara,0/asmera,0/dar_es_salaam,0/djibouti,0/juba,0/kampala,0/mogadishu,0/nairobi,2/aden,2/baghdad,2/bahrain,2/istanbul,2/kuwait,2/qatar,2/riyadh,8/istanbul,8/kirov,8/minsk,8/moscow,8/simferopol,9/comoro,9/mayotte","2|s|03/31:02->10/27:02":"12/troll","2|s":"0/gaborone,0/harare,0/johannesburg,0/lubumbashi,0/lusaka,0/maputo,0/maseru,0/mbabane","2|n|03/31:02->10/27:03":"0/ceuta,arctic/longyearbyen,3/jan_mayen,8/amsterdam,8/andorra,8/belgrade,8/berlin,8/bratislava,8/brussels,8/budapest,8/busingen,8/copenhagen,8/gibraltar,8/ljubljana,8/luxembourg,8/madrid,8/malta,8/monaco,8/oslo,8/paris,8/podgorica,8/prague,8/rome,8/san_marino,8/sarajevo,8/skopje,8/stockholm,8/tirane,8/vaduz,8/vatican,8/vienna,8/warsaw,8/zagreb,8/zurich","2|n":"0/blantyre,0/bujumbura,0/cairo,0/khartoum,0/kigali,0/tripoli,8/kaliningrad","1|s|04/02:01->09/03:03":"0/windhoek","1|s":"0/kinshasa,0/luanda","1|n|05/05:03->06/09:02":"0/casablanca,0/el_aaiun","1|n|03/31:01->10/27:02":"3/canary,3/faeroe,3/faroe,3/madeira,8/belfast,8/dublin,8/guernsey,8/isle_of_man,8/jersey,8/lisbon,8/london","1|n":"0/algiers,0/bangui,0/brazzaville,0/douala,0/lagos,0/libreville,0/malabo,0/ndjamena,0/niamey,0/porto-novo,0/tunis","14|n":"11/kiritimati","13|s|04/07:04->09/29:03":"11/apia","13|s|01/15:02->11/05:03":"11/tongatapu","13|n":"11/enderbury,11/fakaofo","12|s|04/07:03->09/29:02":"12/mcmurdo,12/south_pole,11/auckland","12|s|01/13:03->11/03:02":"11/fiji","12|n":"2/anadyr,2/kamchatka,2/srednekolymsk,11/funafuti,11/kwajalein,11/majuro,11/nauru,11/tarawa,11/wake,11/wallis","12.75|s|04/07:03->04/07:02":"11/chatham","11|s":"12/macquarie,11/bougainville","11|n":"2/magadan,2/sakhalin,11/efate,11/guadalcanal,11/kosrae,11/noumea,11/pohnpei,11/ponape","11.5|n":"11/norfolk","10|s|04/07:03->10/06:02":"4/act,4/canberra,4/currie,4/hobart,4/melbourne,4/nsw,4/sydney,4/tasmania,4/victoria","10|s":"12/dumontdurville,4/brisbane,4/lindeman,4/queensland","10|n":"2/ust-nera,2/vladivostok,2/yakutsk,11/chuuk,11/guam,11/port_moresby,11/saipan,11/truk,11/yap","10.5|s|04/07:01->10/06:02":"4/lhi,4/lord_howe","0|n|03/31:00->10/27:01":"1/scoresbysund,3/azores","0|n":"0/abidjan,0/accra,0/bamako,0/banjul,0/bissau,0/conakry,0/dakar,0/freetown,0/lome,0/monrovia,0/nouakchott,0/ouagadougou,0/sao_tome,0/timbuktu,1/danmarkshavn,3/reykjavik,3/st_helena,13/gmt,13/gmt+0,13/gmt-0,13/gmt0,13/greenwich,13/utc,13/universal,13/zulu","-9|n|03/10:02->11/03:02":"1/adak,1/atka","-9|n":"11/gambier","-9.5|n":"11/marquesas","-8|n|03/10:02->11/03:02":"1/anchorage,1/juneau,1/metlakatla,1/nome,1/sitka,1/yakutat","-8|n":"11/pitcairn","-7|n|03/10:02->11/03:02":"1/dawson,1/ensenada,1/los_angeles,1/santa_isabel,1/tijuana,1/vancouver,1/whitehorse,6/pacific,6/yukon,10/bajanorte","-7|n":"1/creston,1/dawson_creek,1/hermosillo,1/phoenix","-6|s|04/06:22->09/07:22":"7/easterisland,11/easter","-6|n|04/07:02->10/27:02":"1/chihuahua,1/mazatlan,10/bajasur","-6|n|03/10:02->11/03:02":"1/boise,1/cambridge_bay,1/denver,1/edmonton,1/inuvik,1/ojinaga,1/shiprock,1/yellowknife,6/mountain","-6|n":"1/belize,1/costa_rica,1/el_salvador,1/guatemala,1/managua,1/regina,1/swift_current,1/tegucigalpa,6/east-saskatchewan,6/saskatchewan,11/galapagos","-5|s":"1/lima,1/rio_branco,5/acre","-5|n|04/07:02->10/27:02":"1/bahia_banderas,1/merida,1/mexico_city,1/monterrey,10/general","-5|n|03/12:03->11/05:01":"1/north_dakota","-5|n|03/10:02->11/03:02":"1/chicago,1/knox_in,1/matamoros,1/menominee,1/rainy_river,1/rankin_inlet,1/resolute,1/winnipeg,6/central","-5|n":"1/atikokan,1/bogota,1/cancun,1/cayman,1/coral_harbour,1/eirunepe,1/guayaquil,1/jamaica,1/panama,1/porto_acre","-4|s|05/13:23->08/13:01":"12/palmer","-4|s|04/06:24->09/08:00":"1/santiago,7/continental","-4|s|03/23:24->10/06:00":"1/asuncion","-4|s|02/16:24->11/03:00":"1/campo_grande,1/cuiaba","-4|s":"1/la_paz,1/manaus,5/west","-4|n|03/12:03->11/05:01":"1/indiana,1/kentucky","-4|n|03/10:02->11/03:02":"1/detroit,1/fort_wayne,1/grand_turk,1/indianapolis,1/iqaluit,1/louisville,1/montreal,1/nassau,1/new_york,1/nipigon,1/pangnirtung,1/port-au-prince,1/thunder_bay,1/toronto,6/eastern","-4|n|03/10:00->11/03:01":"1/havana","-4|n":"1/anguilla,1/antigua,1/aruba,1/barbados,1/blanc-sablon,1/boa_vista,1/caracas,1/curacao,1/dominica,1/grenada,1/guadeloupe,1/guyana,1/kralendijk,1/lower_princes,1/marigot,1/martinique,1/montserrat,1/port_of_spain,1/porto_velho,1/puerto_rico,1/santo_domingo,1/st_barthelemy,1/st_kitts,1/st_lucia,1/st_thomas,1/st_vincent,1/tortola,1/virgin","-3|s|02/16:24->11/03:00":"1/sao_paulo,5/east","-3|s":"1/argentina,1/buenos_aires,1/cordoba,1/fortaleza,1/montevideo,1/punta_arenas,12/rothera,3/stanley","-3|n|03/10:02->11/03:02":"1/glace_bay,1/goose_bay,1/halifax,1/moncton,1/thule,3/bermuda,6/atlantic","-3|n":"1/araguaina,1/bahia,1/belem,1/catamarca,1/cayenne,1/jujuy,1/maceio,1/mendoza,1/paramaribo,1/recife,1/rosario,1/santarem","-2|s":"5/denoronha","-2|n|03/30:22->10/26:23":"1/godthab","-2|n|03/10:02->11/03:02":"1/miquelon","-2|n":"1/noronha,3/south_georgia","-2.5|n|03/10:02->11/03:02":"1/st_johns,6/newfoundland","-1|n":"3/cape_verde","-11|n":"11/midway,11/niue,11/pago_pago,11/samoa","-10|n":"11/honolulu,11/johnston,11/rarotonga,11/tahiti"}}))&&e.default||e,u={};Object.keys(i).forEach(function(e){var n=e.split("|"),t={offset:Number(n[0]),hem:n[1]};n[2]&&(t.dst=n[2]),i[e].split(",").forEach(function(e){e=e.replace(/(^[0-9]+)\//,function(e,n){return n=Number(n),o[n]+"/"}),u[e]=t})}),u.utc={offset:0,hem:"n"};for(var s=-13;s<=13;s+=.5){var c=s;c>0&&(c="+"+c);var h="etc/gmt"+c;u[h]={offset:-1*s,hem:"n"},u[h="utc/gmt"+c]={offset:-1*s,hem:"n"}}var f=u,d=/(\-?[0-9]+)h(rs)?/i,m=/(\-?[0-9]+)/,l=/utc([\-+]?[0-9]+)/i,p=/gmt([\-+]?[0-9]+)/i,y=function(e){return(e=Number(e))>-13&&e<13?"etc/gmt"+(e=((e*=-1)>0?"+":"")+e):null},v=function(e){var n=e.match(d);if(null!==n)return y(n[1]);if(null!==(n=e.match(l)))return y(n[1]);if(null!==(n=e.match(p))){var t=-1*Number(n[1]);return y(t)}return null!==(n=e.match(m))?y(n[1]):null},g=function(){var e=function(){if("undefined"==typeof Intl||void 0===Intl.DateTimeFormat)return null;var e=Intl.DateTimeFormat();if(void 0===e||void 0===e.resolvedOptions)return null;var n=e.resolvedOptions().timeZone;return n?n.toLowerCase():null}();return null===e?"utc":e}(),b=Object.keys(f).reduce(function(e,n){var t=n.split("/")[1]||"";return e[t=t.replace(/_/g," ")]=n,e},{}),k=function(e,n){if(!e)return g;var t=e.trim(),r=e.split("/");if(r.length>2&&!1===n.hasOwnProperty(t)&&(t=r[0]+"/"+r[1]),t=t.toLowerCase(),!0===n.hasOwnProperty(t))return t;if(t=function(e){return e=(e=(e=(e=(e=(e=e.replace(/ time/g,"")).replace(/ (standard|daylight|summer)/g,"")).replace(/\b(east|west|north|south)ern/g,"$1")).replace(/\b(africa|america|australia)n/g,"$1")).replace(/\beuropean/g,"europe")).replace(/\islands/g,"island")}(t),!0===n.hasOwnProperty(t))return t;if(!0===b.hasOwnProperty(t))return b[t];if(!0===/[0-9]/.test(t)){var a=v(t);if(a)return a}throw new Error("Spacetime: Cannot find timezone named: '"+e+"'. Please enter an IANA timezone id.")},w={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5};w.date=w.day,w.month=25488e5,w.week=6048e5,w.year=3154e7,Object.keys(w).forEach(function(e){w[e+"s"]=w[e]});var z=w,j=function(e,n,t,r,a){var o=e.d[t]();if(o!==n){var i=null===a?null:e.d[a](),u=e.epoch,s=n-o;e.epoch+=z[r]*s,"day"===r&&Math.abs(s)>28&&n<28&&(e.epoch+=z.hour);for(var c=z[r]/2;e.d[t]()n;)e.epoch-=c;null!==a&&i!==e.d[a]()&&(e.epoch=u,e.epoch+=z[r]*s*.97)}},O={year:{valid:function(e){return e>-4e3&&e<4e3},walkTo:function(e,n){return j(e,n,"getFullYear","year",null)}},month:{valid:function(e){return e>=0&&e<=11},walkTo:function(e,n){var t=e.d,r=t.getMonth(),a=e.epoch,o=t.getYear();if(r!==n){var i=n-r;for(e.epoch+=z.day*(28*i),o!==e.d.getYear()&&(e.epoch=a);e.d.getMonth()n;)e.epoch-=z.day}}},date:{valid:function(e){return e>0&&e<=31},walkTo:function(e,n){return j(e,n,"getDate","day","getMonth")}},hour:{valid:function(e){return e>=0&&e<24},walkTo:function(e,n){return j(e,n,"getHours","hour","getDate")}},minute:{valid:function(e){return e>=0&&e<60},walkTo:function(e,n){return j(e,n,"getMinutes","minute","getHours")}},second:{valid:function(e){return e>=0&&e<60},walkTo:function(e,n){e.epoch=e.seconds(n).epoch}},millisecond:{valid:function(e){return e>=0&&e<1e3},walkTo:function(e,n){e.epoch=e.milliseconds(n).epoch}}},_=function(e,n){for(var t=Object.keys(O),r=e.clone(),a=0;a100&&(t/=100),(t*=-1)>=0&&(t="+"+t);var r="etc/gmt"+t;return e.timezones[r]&&(e.tz=r),e},T=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=(n=n.replace(/^\s+/,"").toLowerCase()).match(/([0-9]{1,2}):([0-9]{1,2}):?([0-9]{1,2})?[:\.]?([0-9]{1,4})?/);if(null!==t){var r=Number(t[1]);if(r<0||r>24)return e.startOf("day");var a=Number(t[2]);if(t[2].length<2||a<0||a>59)return e.startOf("day");e=(e=(e=(e=e.hour(r)).minute(a)).seconds(t[3]||0)).millisecond(t[4]||0);var o=n.match(/[\b0-9](am|pm)\b/);return null!==o&&o[1]&&(e=e.ampm(o[1])),e}if(null!==(t=n.match(/([0-9]+) ?(am|pm)/))&&t[1]){var i=Number(t[1]);return i>12||i<1?e.startOf("day"):e=(e=(e=e.hour(t[1]||0)).ampm(t[2])).startOf("hour")}return e=e.startOf("day")},I=[31,28,31,30,31,30,31,31,30,31,30,31],A=n.isLeapYear,x=function(e){if(!0!==I.hasOwnProperty(e.month))return!1;if(1===e.month)return!!(A(e.year)&&e.date<=29)||e.date<=28;var n=I[e.month]||0;return e.date<=n},Y=S(),N=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=parseInt(e.trim(),10);return n=n||(new Date).getFullYear()},$=[{reg:/^(\-?0?0?[0-9]{3,4})-([0-9]{1,2})-([0-9]{1,2})[T| ]([0-9.:]+)(Z|[0-9\-\+:]+)?$/,parse:function(e,n,t,r){var a=parseInt(n[2],10)-1,o={year:n[1],month:a,date:n[3]};return!1===x(o)?(e.epoch=null,e):(E(e,n[5]),_(e,o),e=T(e,n[4]))}},{reg:/^([0-9]{4})[\-\/]([0-9]{1,2})[\-\/]([0-9]{1,2})$/,parse:function(e,n){var t={year:n[1],month:parseInt(n[2],10)-1,date:parseInt(n[3],10)};return t.month>=12&&(t.date=parseInt(n[2],10),t.month=parseInt(n[3],10)-1),!1===x(t)?(e.epoch=null,e):(_(e,t),e=T(e))}},{reg:/^([0-9]{1,2})[\-\/]([0-9]{1,2})[\-\/]?([0-9]{4})?$/,parse:function(e,n){var t=parseInt(n[1],10)-1,r=parseInt(n[2],10);t>=12&&(t=parseInt(n[2],10)-1,r=parseInt(n[1],10));var a={year:n[3]||(new Date).getFullYear(),month:t,date:r};return!1===x(a)?(e.epoch=null,e):(_(e,a),e=T(e))}},{reg:/^([a-z]+) ([0-9]{1,2}(?:st|nd|rd|th)?),?( [0-9]{4})?( ([0-9:]+( ?am| ?pm)?))?$/i,parse:function(e,t){var r=Y[t[1].toLowerCase()],a={year:N(t[3]),month:r,date:n.toCardinal(t[2]||"")};return!1===x(a)?(e.epoch=null,e):(_(e,a),e=T(e,t[4]))}},{reg:/^([a-z]+) ([0-9]{4})$/i,parse:function(e,n){var t=Y[n[1].toLowerCase()],r={year:N(n[2]),month:t,date:1};return!1===x(r)?(e.epoch=null,e):(_(e,r),e=T(e,n[4]))}},{reg:/^([0-9]{1,2}(?:st|nd|rd|th)?) ([a-z]+),?( [0-9]{4})?$/i,parse:function(e,t){var r=Y[t[2].toLowerCase()],a={year:N(t[3]),month:r,date:n.toCardinal(t[1])};return!1===x(a)?(e.epoch=null,e):(_(e,a),e=T(e))}},{reg:/^[0-9]{4}$/i,parse:function(e,n){var t=N(n[0]),r=new Date,a={year:t,month:r.getMonth(),date:r.getDate()};return!1===x(a)?(e.epoch=null,e):(_(e,a),e=T(e))}},{reg:/^[0-9,]+ ?b\.?c\.?$/i,parse:function(e,n){var t=n[0]||"";t=(t=t.replace(/^([0-9,]+) ?b\.?c\.?$/i,"-$1")).replace(/,/g,"");var r=parseInt(t.trim(),10),a=new Date,o={year:r,month:a.getMonth(),date:a.getDate()};return!1===x(o)?(e.epoch=null,e):(_(e,o),e=T(e))}}],L={now:function(e){return e.epoch=Date.now(),e},tonight:function(e){return e.epoch=Date.now(),e=e.hour(18)},today:function(e){return e.epoch=Date.now(),e},tomorrow:function(e){return e.epoch=Date.now(),e=(e=e.add(1,"day")).startOf("day")},yesterday:function(e){return e.epoch=Date.now(),e=(e=e.subtract(1,"day")).startOf("day")},christmas:function(e){var n=(new Date).getFullYear();return e=e.set([n,11,25,18,0,0])},"new years":function(e){var n=(new Date).getFullYear();return e=e.set([n,11,31,18,0,0])}};L["new years eve"]=L["new years"];var F=L,Z={year:(new Date).getFullYear(),month:0,date:1},H=function(e,t,r){if("number"==typeof t)return t>0&&t<25e8&&!1===e.silent&&(console.warn(" - Warning: You are setting the date to January 1970."),console.warn(" - did input seconds instead of milliseconds?")),e.epoch=t,e;if(e.epoch=Date.now(),null==t)return e;if(!0===n.isDate(t))return e.epoch=t.getTime(),e;if(!0===n.isArray(t))return e=function(e,n){for(var t=["year","month","date","hour","minute","second","millisecond"],r=0;r=0?Math.floor(t):Math.ceil(t)),r?(t*=-1,t="-"+(t=n.zeroPad(t,2))):t="+"+(t=n.zeroPad(t,2)),"+00:00"===(t=t+":"+a)&&(t="Z"),t},J={day:function(e){return n.titleCase(e.dayName())},"day-short":function(e){return n.titleCase(G()[e.day()])},"day-number":function(e){return e.day()},"day-ordinal":function(e){return n.ordinal(e.day())},"day-pad":function(e){return n.zeroPad(e.day())},date:function(e){return e.date()},"date-ordinal":function(e){return n.ordinal(e.date())},"date-pad":function(e){return n.zeroPad(e.date())},month:function(e){return n.titleCase(e.monthName())},"month-short":function(e){return n.titleCase(M()[e.month()])},"month-number":function(e){return e.month()},"month-ordinal":function(e){return n.ordinal(e.month())},"month-pad":function(e){return n.zeroPad(e.month())},"iso-month":function(e){return n.zeroPad(e.month()+1)},year:function(e){var n=e.year();return n>0?n:(n=Math.abs(n),n+" BC")},"year-short":function(e){var n=e.year();return n>0?"'".concat(String(e.year()).substr(2,4)):(n=Math.abs(n))+" BC"},"iso-year":function(e){var t=e.year(),r=t<0,a=n.zeroPad(Math.abs(t),4);return r&&(a="-"+(a=n.zeroPad(a,6))),a},time:function(e){return e.time()},"time-24":function(e){return"".concat(e.hour24(),":").concat(n.zeroPad(e.minute()))},hour:function(e){return e.hour12()},"hour-pad":function(e){return n.zeroPad(e.hour12())},"hour-24":function(e){return e.hour24()},"hour-24-pad":function(e){return n.zeroPad(e.hour24())},minute:function(e){return e.minute()},"minute-pad":function(e){return n.zeroPad(e.minute())},second:function(e){return e.second()},"second-pad":function(e){return n.zeroPad(e.second())},ampm:function(e){return e.ampm()},quarter:function(e){return"Q"+e.quarter()},season:function(e){return e.season()},era:function(e){return e.era()},timezone:function(e){return e.timezone().name},offset:function(e){return V(e)},numeric:function(e){return"".concat(e.year(),"/").concat(n.zeroPad(e.month()+1),"/").concat(n.zeroPad(e.date()))},"numeric-us":function(e){return"".concat(n.zeroPad(e.month()+1),"/").concat(n.zeroPad(e.date()),"/").concat(e.year())},"numeric-uk":function(e){return"".concat(n.zeroPad(e.date()),"/").concat(n.zeroPad(e.month()+1),"/").concat(e.year())},"mm/dd":function(e){return"".concat(n.zeroPad(e.month()+1),"/").concat(n.zeroPad(e.date()))},iso:function(e){var t=e.format("iso-year"),r=n.zeroPad(e.month()+1),a=n.zeroPad(e.date()),o=n.zeroPad(e.h24()),i=n.zeroPad(e.minute()),u=n.zeroPad(e.second()),s=n.zeroPad(e.millisecond(),3),c=V(e);return"".concat(t,"-").concat(r,"-").concat(a,"T").concat(o,":").concat(i,":").concat(u,".").concat(s).concat(c)},"iso-short":function(e){var t=n.zeroPad(e.month()+1),r=n.zeroPad(e.date());return"".concat(e.year(),"-").concat(t,"-").concat(r)},"iso-utc":function(e){return new Date(e.epoch).toISOString()},nice:function(e){return"".concat(M()[e.month()]," ").concat(n.ordinal(e.date()),", ").concat(e.time())},"nice-year":function(e){return"".concat(M()[e.month()]," ").concat(n.ordinal(e.date()),", ").concat(e.year())},"nice-day":function(e){return"".concat(G()[e.day()]," ").concat(n.titleCase(M()[e.month()])," ").concat(n.ordinal(e.date()))},"nice-full":function(e){return"".concat(e.dayName()," ").concat(n.titleCase(e.monthName())," ").concat(n.ordinal(e.date()),", ").concat(e.time())}},K={"day-name":"day","month-name":"month","iso 8601":"iso","time-h24":"time-24","time-12":"time","time-h12":"time",tz:"timezone","day-num":"day-number","month-num":"month-number","month-iso":"iso-month","year-iso":"iso-year","nice-short":"nice",mdy:"numeric-us",dmy:"numeric-uk",ymd:"numeric","yyyy/mm/dd":"numeric","mm/dd/yyyy":"numeric-us","dd/mm/yyyy":"numeric-us","little-endian":"numeric-uk","big-endian":"numeric","day-nice":"nice-day"};Object.keys(K).forEach(function(e){return J[e]=J[K[e]]});var R=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!0!==e.isValid())return"";if(J.hasOwnProperty(t)){var r=String(J[t](e)||"");return"ampm"!==t&&(r=n.titleCase(r)),r}if(-1!==t.indexOf("{")){var a=/\{(.+?)\}/g;return t=t.replace(a,function(n,t){return t=t.toLowerCase().trim(),J.hasOwnProperty(t)?String(J[t](e)||""):""})}return e.format("iso-short")},X=n.zeroPad,ee=n.formatTimezone,ne={G:function(e){return e.era()},GG:function(e){return e.era()},GGG:function(e){return e.era()},GGGG:function(e){return"AD"===e.era()?"Anno Domini":"Before Christ"},y:function(e){return e.year()},yy:function(e){return parseInt(String(e.year()).substr(2,4),10)},yyy:function(e){return e.year()},yyyy:function(e){return e.year()},yyyyy:function(e){return"0"+e.year()},Q:function(e){return e.quarter()},QQ:function(e){return e.quarter()},QQQ:function(e){return e.quarter()},QQQQ:function(e){return e.quarter()},M:function(e){return e.month()+1},MM:function(e){return X(e.month()+1)},MMM:function(e){return e.format("month-short")},MMMM:function(e){return e.format("month")},w:function(e){return e.week()},ww:function(e){return X(e.week())},d:function(e){return e.date()},dd:function(e){return X(e.date())},D:function(e){return e.dayOfYear()},DD:function(e){return X(e.dayOfYear())},DDD:function(e){return X(e.dayOfYear(),3)},E:function(e){return e.format("day-short")},EE:function(e){return e.format("day-short")},EEE:function(e){return e.format("day-short")},EEEE:function(e){return e.format("day")},EEEEE:function(e){return e.format("day")[0]},e:function(e){return e.day()},ee:function(e){return e.day()},eee:function(e){return e.format("day-short")},eeee:function(e){return e.format("day")},eeeee:function(e){return e.format("day")[0]},a:function(e){return e.ampm().toUpperCase()},aa:function(e){return e.ampm().toUpperCase()},aaa:function(e){return e.ampm().toUpperCase()},aaaa:function(e){return e.ampm().toUpperCase()},h:function(e){return e.h12()},hh:function(e){return X(e.h12())},H:function(e){return e.hour()},HH:function(e){return X(e.hour())},m:function(e){return e.minute()},mm:function(e){return X(e.minute())},s:function(e){return e.second()},ss:function(e){return X(e.second())},A:function(e){return e.epoch-e.startOf("day").epoch},z:function(e){return e.timezone().name},zz:function(e){return e.timezone().name},zzz:function(e){return e.timezone().name},zzzz:function(e){return e.timezone().name},Z:function(e){return ee(e.timezone().current.offset)},ZZ:function(e){return ee(e.timezone().current.offset)},ZZZ:function(e){return ee(e.timezone().current.offset)},ZZZZ:function(e){return ee(e.timezone().current.offset,":")}},te=function(e,n,t){for(var r=e,a=n,o=0;o.5&&(e=e.add(1,t)),e=e.startOf(t)):!1===e.silent&&console.warn("no known unit '"+t+"'"),e},se=function(e,n,t){var r=0;for(e=e.clone();e.isBefore(n);)e=e.add(1,t),r+=1;return e.isAfter(n,t)&&(r-=1),r},ce=function(e,n,t){return e.isBefore(n)?se(e,n,t):-1*se(n,e,t)},he=function(e,n){var t=n.epoch-e.epoch,r={milliseconds:t,seconds:parseInt(t/1e3,10)};r.minutes=parseInt(r.seconds/60,10),r.hours=parseInt(r.minutes/60,10);var a=e.clone();return r.years=function(e,n){var t=n.year()-e.year();return(e=e.year(n.year())).isAfter(n)&&(t-=1),t}(a,n),a=e.add(r.years,"year"),r.months=12*r.years,a=e.add(r.months,"month"),r.months+=ce(a,n,"month"),r.weeks=52*r.years,a=e.add(r.weeks,"week"),r.weeks+=ce(a,n,"week"),r.days=7*r.weeks,a=e.add(r.days,"day"),r.days+=ce(a,n,"day"),r},fe=function(e,t,r){t=n.beADate(t,e);var a=!1;if(e.isAfter(t)){var o=e;e=t,t=o,a=!0}var i=he(e,t);return a&&(i=function(e){return Object.keys(e).forEach(function(n){e[n]*=-1}),e}(i)),r?(r=n.normalize(r),!0!==/s$/.test(r)&&(r+="s"),"dates"===r&&(r="days"),i[r]):i},de={months:{almost:10,over:4},days:{almost:25,over:10},hours:{almost:20,over:8},minutes:{almost:50,over:20},seconds:{almost:50,over:20}};function me(e,n){return 1===e&&(n=n.slice(0,-1)),e+" "+n}var le=function(e,t){var r,a,o,i=function(e,n){var t=e.isBefore(n),r=t?n:e,a=t?e:n;a=a.clone();var o={years:0,months:0,days:0,hours:0,minutes:0,seconds:0};return Object.keys(o).forEach(function(e){if(!a.isSame(r,e)){var n=a.diff(r,e);a=a.add(n,e),o[e]=n}}),t&&Object.keys(o).forEach(function(e){0!==o[e]&&(o[e]*=-1)}),o}(e,t=n.beADate(t,e));if(!0===Object.keys(i).every(function(e){return!i[e]}))return{diff:i,rounded:"now",qualified:"now",precise:"now"};var u=[];return Object.keys(i).forEach(function(e,n,t){var o=Math.abs(i[e]);if(0!==o){var s=me(o,e);if(u.push(s),!r){if(r=a=s,n>4)return;var c=t[n+1],h=Math.abs(i[c]);h>de[c].almost?(r=me(o+1,e),a="almost "+r):h>de[c].over&&(a="over "+s)}}}),o=u.splice(0,2).join(", "),!0===e.isAfter(t)?(r+=" ago",a+=" ago",o+=" ago"):(r="in "+r,a="in "+a,o="in "+o),{diff:i,rounded:r,qualified:a,precise:o}},pe={north:[["spring",2,1],["summer",5,1],["fall",8,1],["autumn",8,1],["winter",11,1]],south:[["fall",2,1],["autumn",2,1],["winter",5,1],["spring",8,1],["summer",11,1]]},ye=[null,[0,1],[3,1],[6,1],[9,1]],ve={minute:function(e){return _(e,{second:0,millisecond:0}),e},quarterhour:function(e){var n=e.minutes();return e=n>=45?e.minutes(45):n>=30?e.minutes(30):n>=15?e.minutes(15):e.minutes(0),_(e,{second:0,millisecond:0}),e},hour:function(e){return _(e,{minute:0,second:0,millisecond:0}),e},day:function(e){return _(e,{hour:0,minute:0,second:0,millisecond:0}),e},week:function(e){var n=e.clone();return(e=e.day(e._weekStart)).isAfter(n)&&(e=e.subtract(1,"week")),_(e,{hour:0,minute:0,second:0,millisecond:0}),e},month:function(e){return _(e,{date:1,hour:0,minute:0,second:0,millisecond:0}),e},quarter:function(e){var n=e.quarter();return ye[n]&&_(e,{month:ye[n][0],date:ye[n][1],hour:0,minute:0,second:0,millisecond:0}),e},season:function(e){var n=e.season(),t="north";"South"===e.hemisphere()&&(t="south");for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2?arguments[2]:void 0;if(!t||!r)return[];if(t=n.normalize(t),r=e.clone().set(r),e.isAfter(r)){var a=e;e=r,r=a}var o=e.clone();ke(t)?(o=o.next(t),t="week"):o=o.next(t);for(var i=[];o.isBefore(r);)i.push(o),o=o.add(1,t);return i},ze=function(e){var n=e.timezones,t=e.tz;if(!1===n.hasOwnProperty(t)&&(t=k(e.tz,n)),null===t)return!1===e.silent&&console.warn("Warn: could not find given or local timezone - '"+e.tz+"'"),{current:{epochShift:0}};var a,o,i=n[t],u={name:(a=t,a=(a=(a=a[0].toUpperCase()+a.substr(1)).replace(/\/gmt/,"/GMT")).replace(/[\/_]([a-z])/gi,function(e){return e.toUpperCase()})),hasDst:Boolean(i.dst),default_offset:i.offset,hemisphere:"s"===i.hem?"South":"North",current:{}};if(u.hasDst){var s=(o=i.dst)?o.split("->"):[];u.change={start:s[0],back:s[1]}}var c=i.offset,h=c;return!0===u.hasDst&&(h="North"===u.hemisphere?c-1:i.offset+1),!1===u.hasDst?(u.current.offset=c,u.current.isDST=!1):!0===r(e.epoch,u.change.start,u.change.back,c)?(u.current.offset=c,u.current.isDST="North"===u.hemisphere):(u.current.offset=h,u.current.isDST="South"===u.hemisphere),u},je={set:function(e,n){var t=this.clone();return t=H(t,e),n&&(this.tz=k(n)),t},timezone:function(){return ze(this)},isDST:function(){return ze(this).current.isDST},hasDST:function(){return ze(this).hasDst},offset:function(){return 60*ze(this).current.offset},hemisphere:function(){return ze(this).hemisphere},format:function(e){return R(this,e)},unixFmt:function(e){return re(this,e)},startOf:function(e){return ge(this,e)},endOf:function(e){return be(this,e)},leapYear:function(){var e=this.year();return n.isLeapYear(e)},progress:function(e){return ie(this,e)},nearest:function(e){return ue(this,e)},diff:function(e,n){return fe(this,e,n)},since:function(e){return e||(e=this.clone().set()),le(this,e)},next:function(e){return this.add(1,e).startOf(e)},last:function(e){return this.subtract(1,e).startOf(e)},isValid:function(){return!(!this.epoch&&0!==this.epoch)&&!isNaN(this.d.getTime())},goto:function(e){var n=this.clone();return n.tz=k(e,n.timezones),n},every:function(e,n){return we(this,e,n)},isAwake:function(){var e=this.hour();return!(e<8||e>22)},isAsleep:function(){return!this.isAwake()},log:function(){return console.log(""),console.log(R(this,"nice-short")),this},logYear:function(){return console.log(""),console.log(R(this,"full-short")),this},debug:function(){var e=this.timezone(),n=this.format("MM")+" "+this.format("date-ordinal")+" "+this.year();return n+="\n - "+this.format("time"),console.log("\n\n",n+"\n - "+e.name+" ("+e.current.offset+")"),this},from:function(e){return(e=this.clone().set(e)).since(this)},fromNow:function(){return this.clone().set(Date.now()).since(this)},weekStart:function(e){if("number"==typeof e)return this._weekStart=e,this;if("string"==typeof e){e=e.toLowerCase().trim();var n=G().indexOf(e);-1===n&&(n=U().indexOf(e)),-1===n&&(n=1),this._weekStart=n}else console.warn("Spacetime Error: Cannot understand .weekStart() input:",e);return this}};je.inDST=je.isDST,je.round=je.nearest,je.each=je.every;var Oe=je,_e=function(e){return"string"==typeof e&&(e=parseInt(e,10)),e},De=["year","month","date","hour","minute","second","millisecond"],Pe=function(e,n,t){for(var r=De.indexOf(t),a=De.slice(r,De.length),o=0;o=24?n=24:n<0&&(n=0);var t=e.clone(),r=(e.hour()-n)*z.hour;return e.epoch-=r,_(e,{hour:n}),Pe(e,t,"minute"),e.epoch},Ee=function(e,n){var t=n.match(/([0-9]{1,2}):([0-9]{1,2})(am|pm)?/);if(!t){if(!(t=n.match(/([0-9]{1,2})(am|pm)/)))return e.epoch;t.splice(2,0,"0")}var r=!1,a=parseInt(t[1],10),o=parseInt(t[2],10);return a>12&&(r=!0),!1===r&&("am"===t[3]&&12===a&&(a=0),"pm"===t[3]&&a<12&&(a+=12)),(e=(e=(e=(e=e.hour(a)).minute(o)).second(0)).millisecond(0)).epoch},Te=function(e,n){if((n=_e(n))>28){var t=I[e.month()];n>t&&(n=t)}return n<=0&&(n=1),_(e,{date:n}),e.epoch},Ie=function(e,n){"string"==typeof n&&(n=S()[n.toLowerCase()]),(n=_e(n))>=12&&(n=11),n<=0&&(n=0);var t=e.date();return t>I[n]&&(t=I[n]),_(e,{month:n,date:t}),e.epoch},Ae=function(e,n){return n=_e(n),_(e,{year:n}),e.epoch},xe=function(e,n){n=_e(n);var t=e.clone();return(n-=1)<=0?n=0:n>=365&&(n=364),e=(e=e.startOf("year")).add(n,"day"),Pe(e,t,"hour"),e.epoch},Ye={millisecond:function(e){if(void 0!==e){var n=this.clone();return n.epoch=Me(n,e),n}return this.d.getMilliseconds()},second:function(e){if(void 0!==e){var n=this.clone();return n.epoch=qe(n,e),n}return this.d.getSeconds()},minute:function(e){if(void 0!==e){var n=this.clone();return n.epoch=Se(n,e),n}return this.d.getMinutes()},hour:function(e){var n=this.d;if(void 0!==e){var t=this.clone();return t.epoch=Ce(t,e),t}return n.getHours()},hourFloat:function(e){if(void 0!==e){var n=this.clone(),t=e%1;t*=60;var r=parseInt(e,10);return n.epoch=Ce(n,r),n.epoch=Se(n,t),n}var a=this.d,o=a.getHours(),i=a.getMinutes();return o+(i/=60)},hour12:function(e){var n=this.d;if(void 0!==e){var t=this.clone(),r=(e=""+e).match(/^([0-9]+)(am|pm)$/);if(r){var a=parseInt(r[1],10);"pm"===r[2]&&(a+=12),t.epoch=Ce(t,a)}return t}var o=n.getHours();return o>12&&(o-=12),0===o&&(o=12),o},time:function(e){if(void 0!==e){var t=this.clone();return t.epoch=Ee(t,e),t}return"".concat(this.h12(),":").concat(n.zeroPad(this.minute())).concat(this.ampm())},ampm:function(e){var n="am",t=this.hour();if(t>=12&&(n="pm"),"string"!=typeof e)return n;var r=this.clone();return e=e.toLowerCase().trim(),t>=12&&"am"===e?(t-=12,r.hour(t)):t<12&&"pm"===e?(t+=12,r.hour(t)):r},dayTime:function(e){if(void 0!==e){var n={morning:"7:00am",breakfast:"7:00am",noon:"12:00am",lunch:"12:00pm",afternoon:"2:00pm",evening:"6:00pm",dinner:"6:00pm",night:"11:00pm",midnight:"23:59pm"},t=this.clone();return e=(e=e||"").toLowerCase(),!0===n.hasOwnProperty(e)&&(t=t.time(n[e])),t}var r=this.hour();return r<6?"night":r<12?"morning":r<17?"afternoon":r<22?"evening":"night"},iso:function(e){return void 0!==e?this.set(e):this.format("iso")}},Ne={date:function(e){if(void 0!==e){var n=this.clone();return n.epoch=Te(n,e),n}return this.d.getDate()},day:function(e){if(void 0===e)return this.d.getDay();var n=this.clone(),t=e;"string"==typeof e&&(e=e.toLowerCase(),-1===(t=G().indexOf(e))&&(t=U().indexOf(e)));var r=this.d.getDay(),a=r-t,o=this.subtract(24*a,"hours");return _(o,{hour:n.hour(),minute:n.minute(),second:n.second()}),o},dayName:function(e){if(void 0===e)return U()[this.day()];var n=this.clone();return n=n.day(e)},month:function(e){if(void 0!==e){var n=this.clone();return n.epoch=Ie(n,e),n}return this.d.getMonth()}},$e=function(e){return e=(e=(e=e.minute(0)).second(0)).millisecond(1)},Le={dayOfYear:function(e){if(void 0!==e){var n=this.clone();return n.epoch=xe(n,e),n}for(var t,r=0,a=this.d.getMonth(),o=1;o<=a;o++)(t=new Date).setDate(1),t.setYear(this.d.getFullYear()),t.setHours(1),t.setMinutes(1),t.setMonth(o),t.setHours(-2),r+=t.getDate();return r+this.d.getDate()},week:function(e){if(void 0!==e){var n=this.clone();return n=(n=(n=n.month(0)).date(1)).day("monday"),"december"===(n=$e(n)).monthName()&&(n=n.add(1,"week")),e-=1,n=n.add(e,"weeks")}var t=this.clone();t=(t=t.month(0)).date(1),"december"===(t=(t=$e(t)).day("monday")).monthName()&&(t=t.add(1,"week"));var r=this.epoch;if(t.epoch>r)return 1;var a=0,o=4*this.month();for(t.epoch+=z.week*o,a+=o;a<52;a++){if(t.epoch>r)return a;t=t.add(1,"week")}return 52},monthName:function(e){if(void 0===e)return q()[this.month()];var n=this.clone();return n=n.month(e)},quarter:function(e){if(void 0!==e&&("string"==typeof e&&(e=e.replace(/^q/i,""),e=parseInt(e,10)),ye[e])){var n=this.clone(),t=ye[e][0];return n=(n=(n=n.month(t)).date(1)).startOf("day")}for(var r=this.d.getMonth(),a=1;a=pe[n][o][1]&&a0&&(n.epoch=Ae(n,-1*t)),"ad"===e&&t<0&&(n.epoch=Ae(n,-1*t)),n}return this.d.getFullYear()<0?"BC":"AD"}},Fe=Object.assign({},Ye,Ne,Le);Fe.milliseconds=Fe.millisecond,Fe.seconds=Fe.second,Fe.minutes=Fe.minute,Fe.hours=Fe.hour,Fe.hour24=Fe.hour,Fe.h12=Fe.hour12,Fe.h24=Fe.hour24,Fe.days=Fe.day;var Ze=function(e){Object.keys(Fe).forEach(function(n){e.prototype[n]=Fe[n]})},He=["millisecond","second","minute","hour","date","month"],Qe={second:He.slice(0,1),minute:He.slice(0,2),quarterhour:He.slice(0,2),hour:He.slice(0,3),date:He.slice(0,4),month:He.slice(0,4),quarter:He.slice(0,4),season:He.slice(0,4),year:He,decade:He,century:He};Qe.week=Qe.hour,Qe.season=Qe.date,Qe.quarter=Qe.date;var Be={year:!0,quarter:!0,season:!0,month:!0,week:!0,day:!0},Ge={month:!0,quarter:!0,season:!0,year:!0},Ue=function(e){e.prototype.add=function(e,t){var r=this.clone();if(!t||0===e)return r;var a=this.clone();t=n.normalize(t),z[t]?r.epoch+=z[t]*e:"week"===t?r.epoch+=z.day*(7*e):"quarter"===t||"season"===t?r.epoch+=z.month*(4*e):"season"===t?r.epoch+=z.month*(4*e):"quarterhour"===t&&(r.epoch+=15*z.minute*e);var o={};if(Qe[t]&&Qe[t].forEach(function(e){o[e]=a[e]()}),Be[t]){var i=a.timezone().current.offset-r.timezone().current.offset;r.epoch+=3600*i*1e3}if("month"===t&&(o.month=a.month()+e,o=function(e,n){if(e.month>0){var t=parseInt(e.month/12,10);e.year=n.year()+t,e.month=e.month%12}else if(e.month<0){var r=Math.floor(Math.abs(e.month)/13,10);r=Math.abs(r)+1,e.year=n.year()-r,e.month=e.month%12,e.month=e.month+12,12===e.month&&(e.month=0)}return e}(o,a)),"week"===t){var u=a.date()+7*e;u<=28&&u>1&&(o.date=u)}else if("date"===t){var s=a.date()+e;s<=28&&s>1?o.date=s:0!==e&&a.isSame(r,"day")&&(o.date=a.date()+e)}else"year"===t&&r.year()===a.year()?r.epoch+=z.week:"decade"===t?o.year=r.year()+10:"century"===t&&(o.year=r.year()+100);if(Ge[t]){var c=I[o.month];o.date=a.date(),o.date>c&&(o.date=c)}return _(r,o),r},e.prototype.subtract=function(e,n){return this.clone().add(-1*e,n)},e.prototype.minus=e.prototype.subtract,e.prototype.plus=e.prototype.add},We={millisecond:function(e){return e.epoch},second:function(e){return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second()].join("-")},minute:function(e){return[e.year(),e.month(),e.date(),e.hour(),e.minute()].join("-")},hour:function(e){return[e.year(),e.month(),e.date(),e.hour()].join("-")},day:function(e){return[e.year(),e.month(),e.date()].join("-")},week:function(e){return[e.year(),e.week()].join("-")},month:function(e){return[e.year(),e.month()].join("-")},quarter:function(e){return[e.year(),e.quarter()].join("-")},year:function(e){return e.year()}};We.date=We.day;var Ve=function(e){e.prototype.isSame=function(n,t){return t?("string"!=typeof n&&"number"!=typeof n||(n=new e(n,this.timezone.name)),t=t.replace(/s$/,""),We[t]?We[t](this)===We[t](n):null):null}},Je=function(e){var t={isAfter:function(e){e=n.beADate(e,this);var t=n.getEpoch(e);return null===t?null:this.epoch>t},isBefore:function(e){e=n.beADate(e,this);var t=n.getEpoch(e);return null===t?null:this.epoch2&&void 0!==arguments[2]?arguments[2]:{};if(this.epoch=null,this.tz=k(n,Re),this.silent=t.silent||!0,this._weekStart=1,void 0!==t.weekStart&&(this._weekStart=t.weekStart),Object.defineProperty(this,"d",{get:function(){var e=a(this),n=(new Date(this.epoch).getTimezoneOffset()||0)+60*e;n=60*n*1e3;var t=this.epoch+n;return new Date(t)}}),Object.defineProperty(this,"timezones",{get:function(){return Re},set:function(e){return Re=e,e}}),void 0!==e||null===e){var r=H(this,e,n);this.epoch=r.epoch}};Object.keys(Oe).forEach(function(e){Xe.prototype[e]=Oe[e]}),Xe.prototype.clone=function(){return new Xe(this.epoch,this.tz,{silent:this.silent,weekStart:this._weekStart})},Ze(Xe),Ue(Xe),Ve(Xe),Je(Xe),Ke(Xe);var en=Xe,nn=function(e,n){var t=new en(null),r=new en(null);t=t.time(e),r=n?r.time(n):t.add(59,"minutes");var a=t.hour(),o=r.hour();return Object.keys(t.timezones).filter(function(e){if(-1===e.indexOf("/"))return!1;var n=new en(null,e),i=n.hour();return i>=a&&i<=o&&(!(i===a&&n.minute()r.minute()))})},tn=function(e,n,t){return new en(e,n,t)};return tn.now=function(e,n){return new en((new Date).getTime(),e,n)},tn.today=function(e,n){return new en((new Date).getTime(),e,n).startOf("day")},tn.tomorrow=function(e,n){return new en((new Date).getTime(),e,n).add(1,"day").startOf("day")},tn.yesterday=function(e,n){return new en((new Date).getTime(),e,n).subtract(1,"day").startOf("day")},tn.extend=function(e){return Object.keys(e).forEach(function(n){en.prototype[n]=e[n]}),this},tn.whereIts=nn,tn.version="6.0.0",tn.plugin=tn.extend,tn}); diff --git a/static/js/update-timeout-modal.js b/static/js/update-timeout-modal.js index 57328d7e..3612cac5 100644 --- a/static/js/update-timeout-modal.js +++ b/static/js/update-timeout-modal.js @@ -163,5 +163,6 @@ $(function () { $(".kind-cron").click(showCron); $("#schedule").on("keyup", updateCronPreview); + $("#tz").on("change", updateCronPreview); }); diff --git a/templates/front/details.html b/templates/front/details.html index f78cfc00..0bdfdd15 100644 --- a/templates/front/details.html +++ b/templates/front/details.html @@ -208,14 +208,21 @@ Log Click on individual items for details
- + + {% if check.kind == "cron" and check.tz != "UTC" %} + + {% endif %}
@@ -255,7 +262,7 @@ - + diff --git a/templates/front/details_events.html b/templates/front/details_events.html index 9ee93ff1..8d316078 100644 --- a/templates/front/details_events.html +++ b/templates/front/details_events.html @@ -87,11 +87,9 @@ {% endfor %} - {% if check.n_pings > 20 %}

Show More…

- {% endif %} {% else %}
This check has not received any pings yet.
{% endif %} diff --git a/templates/front/log.html b/templates/front/log.html index 1a2443b6..1c2572d1 100644 --- a/templates/front/log.html +++ b/templates/front/log.html @@ -19,14 +19,21 @@
  • -
  • @@ -164,7 +171,7 @@ {% compress js %} - + {% endcompress %} {% endblock %}