From 4d024305e2a6b28d96cf49807a4fd8e1c6734b03 Mon Sep 17 00:00:00 2001 From: dspitz Date: Sat, 26 Feb 2022 16:30:40 +0100 Subject: [PATCH] 0.0.4.2 #93 Maps that get deleted in the workshop now also get deleted in the database and as selected map. Takes after after saving game.ini #97 Could not crawl oculus profiles on steam! fix is not try to do that. #104 All hidden maps do now show a random mode. You need to change them to hide from hand #105 leaderboard now get the data via ajax * Did a lot of css fixes. its now a lot more better on phones etc. --- .../Controllers/LeaderBoardController.cs | 24 +- PavlovRconWebserver/Extensions/Staticscs.cs | 8 +- .../PavlovRconWebserver.csproj | 2 +- .../Services/ServerSelectedMapService.cs | 14 + PavlovRconWebserver/Services/SteamService.cs | 16 +- .../Views/LeaderBoard/Index.cshtml | 147 +++++-- .../PublicViewLists/PlayersFromServers.cshtml | 77 ++-- PavlovRconWebserver/Views/Rcon/Index.cshtml | 2 +- .../Views/Rcon/PlayerList.cshtml | 6 +- .../Views/Shared/_Layout.cshtml | 8 +- .../Views/Shared/_LoginPartial.cshtml | 2 +- .../Views/SshServer/Index.cshtml | 358 ++++++++---------- PavlovRconWebserver/wwwroot/js/rcon.js | 5 - PavlovRconWebserver/wwwroot/js/site.js | 4 + .../wwwroot/lib/dataTables/datetime-moment.js | 70 ++++ .../wwwroot/lib/dataTables/moment.min.js | 7 + 16 files changed, 474 insertions(+), 276 deletions(-) create mode 100644 PavlovRconWebserver/wwwroot/lib/dataTables/datetime-moment.js create mode 100644 PavlovRconWebserver/wwwroot/lib/dataTables/moment.min.js diff --git a/PavlovRconWebserver/Controllers/LeaderBoardController.cs b/PavlovRconWebserver/Controllers/LeaderBoardController.cs index 7ab0159..02247a5 100644 --- a/PavlovRconWebserver/Controllers/LeaderBoardController.cs +++ b/PavlovRconWebserver/Controllers/LeaderBoardController.cs @@ -42,9 +42,7 @@ public async Task Server(int server) { if(server==0) return RedirectToAction("Index"); var servers = (await _pavlovServerService.FindAll()).Where(x=>x.ServerType==ServerType.Community).ToList(); - if(!servers.Select(x=>x.Id).Contains(server)) return RedirectToAction("Index"); - var steamIdentityStats = (await _steamIdentityStatsServerService.FindAll()).Where(x=>x.ServerId==server); var tmp = new LeaderBoardViewModel() { server = servers.First(x=>x.Id==server).Id, @@ -52,8 +50,22 @@ public async Task Server(int server) { Id = 0, Name = "--Please select--" - }).ToList(), - list = steamIdentityStats.Select(x => new SteamIdentityStatsServerViewModel + }).ToList() + }; + return View("Index", tmp); + } + + [HttpGet("[controller]/Index/Server/Api/{server}")] + public async Task ServerApi(int server) + { + if(server==0) return new ObjectResult("you need to set a serverId or no server found!"); + var servers = (await _pavlovServerService.FindAll()).Where(x=>x.ServerType==ServerType.Community).ToList(); + + if(!servers.Select(x=>x.Id).Contains(server)) return new ObjectResult("you need to set a serverId or no server found!"); + var steamIdentityStats = (await _steamIdentityStatsServerService.FindAll()).Where(x=>x.ServerId==server); + var tmp = new + { + model = steamIdentityStats.Select(x => new SteamIdentityStatsServerViewModel { SteamId = x.SteamId, SteamName = x.SteamName, @@ -66,9 +78,11 @@ public async Task Server(int server) UpTime = x.UpTime, }) }; - return View("Index", tmp); + return new ObjectResult(tmp); } + + [HttpGet("[controller]/Index/User/{steamId}")] public async Task User(string steamId) { diff --git a/PavlovRconWebserver/Extensions/Staticscs.cs b/PavlovRconWebserver/Extensions/Staticscs.cs index a0e80bb..cde21ab 100644 --- a/PavlovRconWebserver/Extensions/Staticscs.cs +++ b/PavlovRconWebserver/Extensions/Staticscs.cs @@ -7,7 +7,7 @@ public static class Statics { public static string[] Models = { - "none", "clown", "prisoner", "naked", "farmer", "russian", "nato", "us", "soviet", "german", "cop","infinitum","hidden" + "none", "clown", "prisoner", "naked", "farmer", "russian", "nato", "us", "soviet", "german", "cop","infinitum","hidden","aurora","kevin" }; public static IDictionary BanList { get; } = new Dictionary @@ -40,7 +40,7 @@ public static class GameModes {"TTT", true}, {"OITC", false}, {"PUSH", true}, - {"HIDDEN", true}, + {"HIDE", true}, {"INFECTION", true}, {"PH", true} }; @@ -58,14 +58,14 @@ public static class GameModes {"TTT", false}, {"OITC", true}, {"PUSH", false}, - {"HIDDEN", false}, + {"HIDE", false}, {"INFECTION", false}, {"PH", false} }; public static string[] ModesString = { - "SND", "TDM", "DM", "GUN", "ZWV", "WW2GUN", "TANKTDM", "KOTH", "TTT", "OITC", "PUSH", "HIDDEN", "PH", "INFECTION" + "SND", "TDM", "DM", "GUN", "ZWV", "WW2GUN", "TANKTDM", "KOTH", "TTT", "OITC", "PUSH", "HIDE", "PH", "INFECTION" }; } } \ No newline at end of file diff --git a/PavlovRconWebserver/PavlovRconWebserver.csproj b/PavlovRconWebserver/PavlovRconWebserver.csproj index f2c84da..dec6061 100644 --- a/PavlovRconWebserver/PavlovRconWebserver.csproj +++ b/PavlovRconWebserver/PavlovRconWebserver.csproj @@ -6,7 +6,7 @@ 0.0.4 PavlovRconWebserver Devin Spitz - 0.0.4.1 + 0.0.4.2 9 diff --git a/PavlovRconWebserver/Services/ServerSelectedMapService.cs b/PavlovRconWebserver/Services/ServerSelectedMapService.cs index dc93acf..9b5ad25 100644 --- a/PavlovRconWebserver/Services/ServerSelectedMapService.cs +++ b/PavlovRconWebserver/Services/ServerSelectedMapService.cs @@ -26,6 +26,20 @@ public async Task FindAllFrom(PavlovServer pavlovServer) .Include(x => x.Map) .Include(x => x.PavlovServer) .FindAsync(x => x.Map != null && x.PavlovServer.Id == pavlovServer.Id)).ToArray(); + } + public async Task GetAllWithMapId(string mapId) + { + return (await _liteDb.LiteDatabaseAsync.GetCollection("ServerSelectedMap") + .Include(x => x.Map) + .Include(x => x.PavlovServer) + .FindAsync(x => x.Map != null && x.Map.Id == mapId)).ToArray(); + } + public async Task GetAllWithNoMoreMap() + { + return (await _liteDb.LiteDatabaseAsync.GetCollection("ServerSelectedMap") + .Include(x => x.Map) + .Include(x => x.PavlovServer) + .FindAsync(x => x.Map==null)).ToArray(); } public async Task Insert(ServerSelectedMap serverSelectedMap) diff --git a/PavlovRconWebserver/Services/SteamService.cs b/PavlovRconWebserver/Services/SteamService.cs index 6c2664e..f2f69db 100644 --- a/PavlovRconWebserver/Services/SteamService.cs +++ b/PavlovRconWebserver/Services/SteamService.cs @@ -193,9 +193,21 @@ await client.GetAsync( var tmp = tmpRconMaps.FirstOrDefault(x => x.Id == map.Id); var isNumeric = int.TryParse(map.Id, out _); if (tmp == null && isNumeric) + { + foreach (var selected in await _serverSelectedMapService.GetAllWithMapId(map.Id)) + await _serverSelectedMapService.Delete(selected.Id); + await _mapsService.Delete(map.Id); + } // i should my here delete them from the serverSelectedMaps as well + } + + //Clean maps that not exist anymore: + foreach (var invalidSelected in await _serverSelectedMapService.GetAllWithNoMoreMap()) + await _serverSelectedMapService.Delete(invalidSelected.Id); + + //Todo: Add a message to the server so the admin knows that he needs to save the Game.ini to get rid of the ghost maps. return true; } @@ -233,9 +245,9 @@ public async Task CrawlSteamProfile() var client = new HttpClient(); - var allSteamIdentityStats = await _steamIdentityStatsServerService.FindAll(); + var allSteamIdentityStats = (await _steamIdentityStatsServerService.FindAll()).Where(x=>!string.IsNullOrWhiteSpace(x.SteamId)).ToArray(); - var steamIdentities = allSteamIdentityStats.GroupBy(x => x.SteamId).Select(x => x.Key); + var steamIdentities = allSteamIdentityStats.GroupBy(x =>x.SteamId).Select(x => x.Key); foreach (var single in steamIdentities) { if(string.IsNullOrEmpty(single)) continue; diff --git a/PavlovRconWebserver/Views/LeaderBoard/Index.cshtml b/PavlovRconWebserver/Views/LeaderBoard/Index.cshtml index 19cb35e..c6cdbbc 100644 --- a/PavlovRconWebserver/Views/LeaderBoard/Index.cshtml +++ b/PavlovRconWebserver/Views/LeaderBoard/Index.cshtml @@ -1,67 +1,138 @@ @model LeaderBoardViewModel -
+
@Html.LabelFor(x => x.server) @Html.DropDownListFor(m => m.server, new SelectList(Model.AllServers, "Id", "Name", Model.server), new {@class = "form-control form-control-sm form-select ", onchange="submit()"})
- +
- - - - - - - - - + + + + + + + + + - @if (Model != null) - { - foreach (var steamIdentity in Model.list) - { - - - - - @if (string.IsNullOrEmpty(@steamIdentity.SteamPicture)) - { - - } - else - { - - } - - - - - - - } - } + @* gets autofilled *@
ServerNameSteamIdSteamNameSteamPictureKillsDeathsAssistsExpirenceUpTimeServerNameSteamIdSteamNameSteamPictureKillsDeathsAssistsExpirenceUpTime
@steamIdentity.serverName@steamIdentity.SteamId@steamIdentity.SteamName@steamIdentity.Kills@steamIdentity.Deaths@steamIdentity.Assists@steamIdentity.Exp@steamIdentity.UpTime
- - \ No newline at end of file diff --git a/PavlovRconWebserver/Views/Rcon/Index.cshtml b/PavlovRconWebserver/Views/Rcon/Index.cshtml index 61d797b..09f6c71 100644 --- a/PavlovRconWebserver/Views/Rcon/Index.cshtml +++ b/PavlovRconWebserver/Views/Rcon/Index.cshtml @@ -63,7 +63,7 @@ Player List *
-
+
@* Gets autopopulated *@
diff --git a/PavlovRconWebserver/Views/Rcon/PlayerList.cshtml b/PavlovRconWebserver/Views/Rcon/PlayerList.cshtml index da73608..3fdf649 100644 --- a/PavlovRconWebserver/Views/Rcon/PlayerList.cshtml +++ b/PavlovRconWebserver/Views/Rcon/PlayerList.cshtml @@ -16,7 +16,7 @@ @if (hasTwoTeams) { -
+
@Html.Raw(tableHeaer) @@ -29,7 +29,7 @@
-
+
@Html.Raw(tableHeaer) @@ -44,7 +44,7 @@ } else { -
+
@Html.Raw(tableHeaer) @foreach (var player in Model.PlayerList.OrderByDescending(x => x.Score)) { diff --git a/PavlovRconWebserver/Views/Shared/_Layout.cshtml b/PavlovRconWebserver/Views/Shared/_Layout.cshtml index bef2b9b..73872a4 100644 --- a/PavlovRconWebserver/Views/Shared/_Layout.cshtml +++ b/PavlovRconWebserver/Views/Shared/_Layout.cshtml @@ -39,14 +39,20 @@ + + + + + + -
- - - - - - - + @foreach (var sshServer in Model) { - - - - - - + + + @if (sshServer.PavlovServers != null) { - - + + + + + + + + + } + +
- Id - - Edit - - Name - - Adress -
+
+
+
+ Name: @sshServer.Name +
+
+ Adress: @sshServer.Adress +
+
+ Remove: @if (isOnPremise || isAdmin) { - + } - @sshServer.Id -
+ +
+ Edit: @if (isOnPremise || isAdmin) { - + } -
- @sshServer.Name - - @sshServer.Adress -
- - - - - - - @if (isOnPremise || isAdmin) - { - - - - - } - - - - - - - - - - @foreach (var pavlovServer in sshServer.PavlovServers) - { - var bg = ""; - @if (pavlovServer.ServerServiceState == ServerServiceState.active) - { - bg = "text-success"; - } - else if (pavlovServer.ServerServiceState == ServerServiceState.disabled) - { - bg = "text-danger"; - } - else if (pavlovServer.ServerServiceState == ServerServiceState.inactive) - { - bg = "text-warning"; - } - else if (pavlovServer.ServerServiceState == ServerServiceState.none) - { - bg = "text-light"; - } - - + var id = "Datatables"+sshServer.Id; + ids.Add(id); +
Pavlov Servers for: @sshServer.Name
Gui Name Service stateDelete
from list
Delete
incl. files
SystemReset StatsMapsServerSettingsStop/StartlogsStatsSteam
@pavlovServer.Name
+ + + + + + @if (isOnPremise || isAdmin) + { + + + + + } + + + + + + + + + + @foreach (var pavlovServer in sshServer.PavlovServers) + { + var bg = ""; + @if (pavlovServer.ServerServiceState == ServerServiceState.active) + { + bg = "text-success"; + } + else if (pavlovServer.ServerServiceState == ServerServiceState.disabled) + { + bg = "text-danger"; + } + else if (pavlovServer.ServerServiceState == ServerServiceState.inactive) + { + bg = "text-warning"; + } + else if (pavlovServer.ServerServiceState == ServerServiceState.none) + { + bg = "text-light"; + } + + - - @if (isOnPremise || isAdmin) + + @if (isOnPremise || isAdmin) + { + + - - - - } - - - - - - - - - - + } + + + } - -
Pavlov Servers for: @sshServer.Name
Gui NameService stateDelete
from list
Delete
incl. files
SystemReset StatsMapsServerSettingsStop/StartlogsStatsSteam
@pavlovServer.Name @pavlovServer.ServerServiceState @pavlovServer.ServerServiceState + + + + + @if (sshServer.SteamIsAvailable) { - - - - - - @if (sshServer.SteamIsAvailable) - { - - - - } - - - - - - - - - - - - - - - - - - WhiteList - - - Mods + + - - - - - - - - - Logs - - Stats - History - - @if (sshServer.SteamIsAvailable) - { - - Update - - } -
+ + + + + + + +
- @if (isOnPremise || isAdmin) - { - - - + +
+ + + + + + + + + WhiteList + + + Mods + + + + + + + + + + Logs + + Stats + History + @if (sshServer.SteamIsAvailable) { - - Create Pavlov Server + + Update } - } - x.Id).ToArray(), backgroundColorHex = "#222", fontColorHex = "#ffffff"})"> All Stats +
+
+ +
+ @if (isOnPremise || isAdmin) + { + + + +
+ @if (sshServer.SteamIsAvailable) + { + + Create Pavlov Server + - - +
+ } + } + x.Id).ToArray(), backgroundColorHex = "#222", fontColorHex = "#ffffff" })"> All Stats +
} +
} - - - - \ No newline at end of file diff --git a/PavlovRconWebserver/wwwroot/js/rcon.js b/PavlovRconWebserver/wwwroot/js/rcon.js index 86a708a..7f92846 100644 --- a/PavlovRconWebserver/wwwroot/js/rcon.js +++ b/PavlovRconWebserver/wwwroot/js/rcon.js @@ -173,7 +173,6 @@ function UpdatePlayerList(){ function PlayerAction() { - debugger; let command = ""; let playersSelected = ""; @@ -255,7 +254,6 @@ function sendSingleCommand(command) data: data, success: function(result) { - debugger; if(result.toString()==="") { alert("Did nothing!"); @@ -292,7 +290,6 @@ function sendSingleCommand(command) } function sendMultiCommand(command) { - debugger; $(".overlay").show(); let data = {}; let servers = []; @@ -306,7 +303,6 @@ function sendMultiCommand(command) }); let value = $("#PlayerAction").find("#PlayerValueParent :input").val(); if(typeof value === "undefined") value = ""; - debugger; if(playersSelected.length<=0) { alert("You have to have at least one player on the server!!"); @@ -314,7 +310,6 @@ function sendMultiCommand(command) return; } data = { server: servers[0], command: command, players: playersSelected, value: value }; - debugger; $.ajax({ type: 'POST', url: "/Rcon/SendCommandMulti", diff --git a/PavlovRconWebserver/wwwroot/js/site.js b/PavlovRconWebserver/wwwroot/js/site.js index 08688f9..e03eae9 100644 --- a/PavlovRconWebserver/wwwroot/js/site.js +++ b/PavlovRconWebserver/wwwroot/js/site.js @@ -16,4 +16,8 @@ function jsonTOHtmlPartialView(json) jsonTOHtmlPartialView(JSON.stringify(XMLHttpRequest)) } }); +} + +$.fn.exists = function () { + return this.length !== 0; } \ No newline at end of file diff --git a/PavlovRconWebserver/wwwroot/lib/dataTables/datetime-moment.js b/PavlovRconWebserver/wwwroot/lib/dataTables/datetime-moment.js new file mode 100644 index 0000000..52b537c --- /dev/null +++ b/PavlovRconWebserver/wwwroot/lib/dataTables/datetime-moment.js @@ -0,0 +1,70 @@ +/** + * This plug-in for DataTables represents the ultimate option in extensibility + * for sorting date / time strings correctly. It uses + * [Moment.js](http://momentjs.com) to create automatic type detection and + * sorting plug-ins for DataTables based on a given format. This way, DataTables + * will automatically detect your temporal information and sort it correctly. + * + * For usage instructions, please see the DataTables blog + * post that [introduces it](//datatables.net/blog/2014-12-18). + * + * @name Ultimate Date / Time sorting + * @summary Sort date and time in any format using Moment.js + * @author [Allan Jardine](//datatables.net) + * @depends DataTables 1.10+, Moment.js 1.7+ + * + * @example + * $.fn.dataTable.moment( 'HH:mm MMM D, YY' ); + * $.fn.dataTable.moment( 'dddd, MMMM Do, YYYY' ); + * + * $('#example').DataTable(); + */ + +(function (factory) { + if (typeof define === "function" && define.amd) { + define(["jquery", "moment", "datatables.net"], factory); + } else { + factory(jQuery, moment); + } +}(function ($, moment) { + +function strip (d) { + if ( typeof d === 'string' ) { + // Strip HTML tags and newline characters if possible + d = d.replace(/(<.*?>)|(\r?\n|\r)/g, ''); + + // Strip out surrounding white space + d = d.trim(); + } + + return d; +} + +$.fn.dataTable.moment = function ( format, locale, reverseEmpties ) { + var types = $.fn.dataTable.ext.type; + + // Add type detection + types.detect.unshift( function ( d ) { + d = strip(d); + + // Null and empty values are acceptable + if ( d === '' || d === null ) { + return 'moment-'+format; + } + + return moment( d, format, locale, true ).isValid() ? + 'moment-'+format : + null; + } ); + + // Add sorting method - use an integer for the sorting + types.order[ 'moment-'+format+'-pre' ] = function ( d ) { + d = strip(d); + + return !moment(d, format, locale, true).isValid() ? + (reverseEmpties ? -Infinity : Infinity) : + parseInt( moment( d, format, locale, true ).format( 'x' ), 10 ); + }; +}; + +})); diff --git a/PavlovRconWebserver/wwwroot/lib/dataTables/moment.min.js b/PavlovRconWebserver/wwwroot/lib/dataTables/moment.min.js new file mode 100644 index 0000000..9fb34ee --- /dev/null +++ b/PavlovRconWebserver/wwwroot/lib/dataTables/moment.min.js @@ -0,0 +1,7 @@ +//! moment.js +//! version : 2.8.4 +//! authors : Tim Wood, Iskren Chernev, Moment.js contributors +//! license : MIT +//! momentjs.com +(function(a){function b(a,b,c){switch(arguments.length){case 2:return null!=a?a:b;case 3:return null!=a?a:null!=b?b:c;default:throw new Error("Implement me")}}function c(a,b){return zb.call(a,b)}function d(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function e(a){tb.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+a)}function f(a,b){var c=!0;return m(function(){return c&&(e(a),c=!1),b.apply(this,arguments)},b)}function g(a,b){qc[a]||(e(b),qc[a]=!0)}function h(a,b){return function(c){return p(a.call(this,c),b)}}function i(a,b){return function(c){return this.localeData().ordinal(a.call(this,c),b)}}function j(){}function k(a,b){b!==!1&&F(a),n(this,a),this._d=new Date(+a._d)}function l(a){var b=y(a),c=b.year||0,d=b.quarter||0,e=b.month||0,f=b.week||0,g=b.day||0,h=b.hour||0,i=b.minute||0,j=b.second||0,k=b.millisecond||0;this._milliseconds=+k+1e3*j+6e4*i+36e5*h,this._days=+g+7*f,this._months=+e+3*d+12*c,this._data={},this._locale=tb.localeData(),this._bubble()}function m(a,b){for(var d in b)c(b,d)&&(a[d]=b[d]);return c(b,"toString")&&(a.toString=b.toString),c(b,"valueOf")&&(a.valueOf=b.valueOf),a}function n(a,b){var c,d,e;if("undefined"!=typeof b._isAMomentObject&&(a._isAMomentObject=b._isAMomentObject),"undefined"!=typeof b._i&&(a._i=b._i),"undefined"!=typeof b._f&&(a._f=b._f),"undefined"!=typeof b._l&&(a._l=b._l),"undefined"!=typeof b._strict&&(a._strict=b._strict),"undefined"!=typeof b._tzm&&(a._tzm=b._tzm),"undefined"!=typeof b._isUTC&&(a._isUTC=b._isUTC),"undefined"!=typeof b._offset&&(a._offset=b._offset),"undefined"!=typeof b._pf&&(a._pf=b._pf),"undefined"!=typeof b._locale&&(a._locale=b._locale),Ib.length>0)for(c in Ib)d=Ib[c],e=b[d],"undefined"!=typeof e&&(a[d]=e);return a}function o(a){return 0>a?Math.ceil(a):Math.floor(a)}function p(a,b,c){for(var d=""+Math.abs(a),e=a>=0;d.lengthd;d++)(c&&a[d]!==b[d]||!c&&A(a[d])!==A(b[d]))&&g++;return g+f}function x(a){if(a){var b=a.toLowerCase().replace(/(.)s$/,"$1");a=jc[a]||kc[b]||b}return a}function y(a){var b,d,e={};for(d in a)c(a,d)&&(b=x(d),b&&(e[b]=a[d]));return e}function z(b){var c,d;if(0===b.indexOf("week"))c=7,d="day";else{if(0!==b.indexOf("month"))return;c=12,d="month"}tb[b]=function(e,f){var g,h,i=tb._locale[b],j=[];if("number"==typeof e&&(f=e,e=a),h=function(a){var b=tb().utc().set(d,a);return i.call(tb._locale,b,e||"")},null!=f)return h(f);for(g=0;c>g;g++)j.push(h(g));return j}}function A(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=b>=0?Math.floor(b):Math.ceil(b)),c}function B(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function C(a,b,c){return hb(tb([a,11,31+b-c]),b,c).week}function D(a){return E(a)?366:365}function E(a){return a%4===0&&a%100!==0||a%400===0}function F(a){var b;a._a&&-2===a._pf.overflow&&(b=a._a[Bb]<0||a._a[Bb]>11?Bb:a._a[Cb]<1||a._a[Cb]>B(a._a[Ab],a._a[Bb])?Cb:a._a[Db]<0||a._a[Db]>24||24===a._a[Db]&&(0!==a._a[Eb]||0!==a._a[Fb]||0!==a._a[Gb])?Db:a._a[Eb]<0||a._a[Eb]>59?Eb:a._a[Fb]<0||a._a[Fb]>59?Fb:a._a[Gb]<0||a._a[Gb]>999?Gb:-1,a._pf._overflowDayOfYear&&(Ab>b||b>Cb)&&(b=Cb),a._pf.overflow=b)}function G(b){return null==b._isValid&&(b._isValid=!isNaN(b._d.getTime())&&b._pf.overflow<0&&!b._pf.empty&&!b._pf.invalidMonth&&!b._pf.nullInput&&!b._pf.invalidFormat&&!b._pf.userInvalidated,b._strict&&(b._isValid=b._isValid&&0===b._pf.charsLeftOver&&0===b._pf.unusedTokens.length&&b._pf.bigHour===a)),b._isValid}function H(a){return a?a.toLowerCase().replace("_","-"):a}function I(a){for(var b,c,d,e,f=0;f0;){if(d=J(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&w(e,c,!0)>=b-1)break;b--}f++}return null}function J(a){var b=null;if(!Hb[a]&&Jb)try{b=tb.locale(),require("./locale/"+a),tb.locale(b)}catch(c){}return Hb[a]}function K(a,b){var c,d;return b._isUTC?(c=b.clone(),d=(tb.isMoment(a)||v(a)?+a:+tb(a))-+c,c._d.setTime(+c._d+d),tb.updateOffset(c,!1),c):tb(a).local()}function L(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function M(a){var b,c,d=a.match(Nb);for(b=0,c=d.length;c>b;b++)d[b]=pc[d[b]]?pc[d[b]]:L(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function N(a,b){return a.isValid()?(b=O(b,a.localeData()),lc[b]||(lc[b]=M(b)),lc[b](a)):a.localeData().invalidDate()}function O(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(Ob.lastIndex=0;d>=0&&Ob.test(a);)a=a.replace(Ob,c),Ob.lastIndex=0,d-=1;return a}function P(a,b){var c,d=b._strict;switch(a){case"Q":return Zb;case"DDDD":return _b;case"YYYY":case"GGGG":case"gggg":return d?ac:Rb;case"Y":case"G":case"g":return cc;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return d?bc:Sb;case"S":if(d)return Zb;case"SS":if(d)return $b;case"SSS":if(d)return _b;case"DDD":return Qb;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return Ub;case"a":case"A":return b._locale._meridiemParse;case"x":return Xb;case"X":return Yb;case"Z":case"ZZ":return Vb;case"T":return Wb;case"SSSS":return Tb;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return d?$b:Pb;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return Pb;case"Do":return d?b._locale._ordinalParse:b._locale._ordinalParseLenient;default:return c=new RegExp(Y(X(a.replace("\\","")),"i"))}}function Q(a){a=a||"";var b=a.match(Vb)||[],c=b[b.length-1]||[],d=(c+"").match(hc)||["-",0,0],e=+(60*d[1])+A(d[2]);return"+"===d[0]?-e:e}function R(a,b,c){var d,e=c._a;switch(a){case"Q":null!=b&&(e[Bb]=3*(A(b)-1));break;case"M":case"MM":null!=b&&(e[Bb]=A(b)-1);break;case"MMM":case"MMMM":d=c._locale.monthsParse(b,a,c._strict),null!=d?e[Bb]=d:c._pf.invalidMonth=b;break;case"D":case"DD":null!=b&&(e[Cb]=A(b));break;case"Do":null!=b&&(e[Cb]=A(parseInt(b.match(/\d{1,2}/)[0],10)));break;case"DDD":case"DDDD":null!=b&&(c._dayOfYear=A(b));break;case"YY":e[Ab]=tb.parseTwoDigitYear(b);break;case"YYYY":case"YYYYY":case"YYYYYY":e[Ab]=A(b);break;case"a":case"A":c._isPm=c._locale.isPM(b);break;case"h":case"hh":c._pf.bigHour=!0;case"H":case"HH":e[Db]=A(b);break;case"m":case"mm":e[Eb]=A(b);break;case"s":case"ss":e[Fb]=A(b);break;case"S":case"SS":case"SSS":case"SSSS":e[Gb]=A(1e3*("0."+b));break;case"x":c._d=new Date(A(b));break;case"X":c._d=new Date(1e3*parseFloat(b));break;case"Z":case"ZZ":c._useUTC=!0,c._tzm=Q(b);break;case"dd":case"ddd":case"dddd":d=c._locale.weekdaysParse(b),null!=d?(c._w=c._w||{},c._w.d=d):c._pf.invalidWeekday=b;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":a=a.substr(0,1);case"gggg":case"GGGG":case"GGGGG":a=a.substr(0,2),b&&(c._w=c._w||{},c._w[a]=A(b));break;case"gg":case"GG":c._w=c._w||{},c._w[a]=tb.parseTwoDigitYear(b)}}function S(a){var c,d,e,f,g,h,i;c=a._w,null!=c.GG||null!=c.W||null!=c.E?(g=1,h=4,d=b(c.GG,a._a[Ab],hb(tb(),1,4).year),e=b(c.W,1),f=b(c.E,1)):(g=a._locale._week.dow,h=a._locale._week.doy,d=b(c.gg,a._a[Ab],hb(tb(),g,h).year),e=b(c.w,1),null!=c.d?(f=c.d,g>f&&++e):f=null!=c.e?c.e+g:g),i=ib(d,e,f,h,g),a._a[Ab]=i.year,a._dayOfYear=i.dayOfYear}function T(a){var c,d,e,f,g=[];if(!a._d){for(e=V(a),a._w&&null==a._a[Cb]&&null==a._a[Bb]&&S(a),a._dayOfYear&&(f=b(a._a[Ab],e[Ab]),a._dayOfYear>D(f)&&(a._pf._overflowDayOfYear=!0),d=db(f,0,a._dayOfYear),a._a[Bb]=d.getUTCMonth(),a._a[Cb]=d.getUTCDate()),c=0;3>c&&null==a._a[c];++c)a._a[c]=g[c]=e[c];for(;7>c;c++)a._a[c]=g[c]=null==a._a[c]?2===c?1:0:a._a[c];24===a._a[Db]&&0===a._a[Eb]&&0===a._a[Fb]&&0===a._a[Gb]&&(a._nextDay=!0,a._a[Db]=0),a._d=(a._useUTC?db:cb).apply(null,g),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()+a._tzm),a._nextDay&&(a._a[Db]=24)}}function U(a){var b;a._d||(b=y(a._i),a._a=[b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],T(a))}function V(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function W(b){if(b._f===tb.ISO_8601)return void $(b);b._a=[],b._pf.empty=!0;var c,d,e,f,g,h=""+b._i,i=h.length,j=0;for(e=O(b._f,b._locale).match(Nb)||[],c=0;c0&&b._pf.unusedInput.push(g),h=h.slice(h.indexOf(d)+d.length),j+=d.length),pc[f]?(d?b._pf.empty=!1:b._pf.unusedTokens.push(f),R(f,d,b)):b._strict&&!d&&b._pf.unusedTokens.push(f);b._pf.charsLeftOver=i-j,h.length>0&&b._pf.unusedInput.push(h),b._pf.bigHour===!0&&b._a[Db]<=12&&(b._pf.bigHour=a),b._isPm&&b._a[Db]<12&&(b._a[Db]+=12),b._isPm===!1&&12===b._a[Db]&&(b._a[Db]=0),T(b),F(b)}function X(a){return a.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e})}function Y(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Z(a){var b,c,e,f,g;if(0===a._f.length)return a._pf.invalidFormat=!0,void(a._d=new Date(0/0));for(f=0;fg)&&(e=g,c=b));m(a,c||b)}function $(a){var b,c,d=a._i,e=dc.exec(d);if(e){for(a._pf.iso=!0,b=0,c=fc.length;c>b;b++)if(fc[b][1].exec(d)){a._f=fc[b][0]+(e[6]||" ");break}for(b=0,c=gc.length;c>b;b++)if(gc[b][1].exec(d)){a._f+=gc[b][0];break}d.match(Vb)&&(a._f+="Z"),W(a)}else a._isValid=!1}function _(a){$(a),a._isValid===!1&&(delete a._isValid,tb.createFromInputFallback(a))}function ab(a,b){var c,d=[];for(c=0;ca&&h.setFullYear(a),h}function db(a){var b=new Date(Date.UTC.apply(null,arguments));return 1970>a&&b.setUTCFullYear(a),b}function eb(a,b){if("string"==typeof a)if(isNaN(a)){if(a=b.weekdaysParse(a),"number"!=typeof a)return null}else a=parseInt(a,10);return a}function fb(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function gb(a,b,c){var d=tb.duration(a).abs(),e=yb(d.as("s")),f=yb(d.as("m")),g=yb(d.as("h")),h=yb(d.as("d")),i=yb(d.as("M")),j=yb(d.as("y")),k=e0,k[4]=c,fb.apply({},k)}function hb(a,b,c){var d,e=c-b,f=c-a.day();return f>e&&(f-=7),e-7>f&&(f+=7),d=tb(a).add(f,"d"),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}function ib(a,b,c,d,e){var f,g,h=db(a,0,1).getUTCDay();return h=0===h?7:h,c=null!=c?c:e,f=e-h+(h>d?7:0)-(e>h?7:0),g=7*(b-1)+(c-e)+f+1,{year:g>0?a:a-1,dayOfYear:g>0?g:D(a-1)+g}}function jb(b){var c,d=b._i,e=b._f;return b._locale=b._locale||tb.localeData(b._l),null===d||e===a&&""===d?tb.invalid({nullInput:!0}):("string"==typeof d&&(b._i=d=b._locale.preparse(d)),tb.isMoment(d)?new k(d,!0):(e?u(e)?Z(b):W(b):bb(b),c=new k(b),c._nextDay&&(c.add(1,"d"),c._nextDay=a),c))}function kb(a,b){var c,d;if(1===b.length&&u(b[0])&&(b=b[0]),!b.length)return tb();for(c=b[0],d=1;d=0?"+":"-";return b+p(Math.abs(a),6)},gg:function(){return p(this.weekYear()%100,2)},gggg:function(){return p(this.weekYear(),4)},ggggg:function(){return p(this.weekYear(),5)},GG:function(){return p(this.isoWeekYear()%100,2)},GGGG:function(){return p(this.isoWeekYear(),4)},GGGGG:function(){return p(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return A(this.milliseconds()/100)},SS:function(){return p(A(this.milliseconds()/10),2)},SSS:function(){return p(this.milliseconds(),3)},SSSS:function(){return p(this.milliseconds(),3)},Z:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+p(A(a/60),2)+":"+p(A(a)%60,2)},ZZ:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+p(A(a/60),2)+p(A(a)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},x:function(){return this.valueOf()},X:function(){return this.unix()},Q:function(){return this.quarter()}},qc={},rc=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"];nc.length;)vb=nc.pop(),pc[vb+"o"]=i(pc[vb],vb);for(;oc.length;)vb=oc.pop(),pc[vb+vb]=h(pc[vb],2);pc.DDDD=h(pc.DDD,3),m(j.prototype,{set:function(a){var b,c;for(c in a)b=a[c],"function"==typeof b?this[c]=b:this["_"+c]=b;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(a){return this._months[a.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(a){return this._monthsShort[a.month()]},monthsParse:function(a,b,c){var d,e,f;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),d=0;12>d;d++){if(e=tb.utc([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}},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(a){return this._weekdays[a.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(a){return this._weekdaysShort[a.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(a){return this._weekdaysMin[a.day()]},weekdaysParse:function(a){var b,c,d;for(this._weekdaysParse||(this._weekdaysParse=[]),b=0;7>b;b++)if(this._weekdaysParse[b]||(c=tb([2e3,1]).day(b),d="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[b]=new RegExp(d.replace(".",""),"i")),this._weekdaysParse[b].test(a))return b},_longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},longDateFormat:function(a){var b=this._longDateFormat[a];return!b&&this._longDateFormat[a.toUpperCase()]&&(b=this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a]=b),b},isPM:function(a){return"p"===(a+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(a,b,c){var d=this._calendar[a];return"function"==typeof d?d.apply(b,[c]):d},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)},pastFuture:function(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)},ordinal:function(a){return this._ordinal.replace("%d",a)},_ordinal:"%d",_ordinalParse:/\d{1,2}/,preparse:function(a){return a},postformat:function(a){return a},week:function(a){return hb(a,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),tb=function(b,c,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._i=b,g._f=c,g._l=e,g._strict=f,g._isUTC=!1,g._pf=d(),jb(g)},tb.suppressDeprecationWarnings=!1,tb.createFromInputFallback=f("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))}),tb.min=function(){var a=[].slice.call(arguments,0);return kb("isBefore",a)},tb.max=function(){var a=[].slice.call(arguments,0);return kb("isAfter",a)},tb.utc=function(b,c,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._useUTC=!0,g._isUTC=!0,g._l=e,g._i=b,g._f=c,g._strict=f,g._pf=d(),jb(g).utc()},tb.unix=function(a){return tb(1e3*a)},tb.duration=function(a,b){var d,e,f,g,h=a,i=null;return tb.isDuration(a)?h={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(h={},b?h[b]=a:h.milliseconds=a):(i=Lb.exec(a))?(d="-"===i[1]?-1:1,h={y:0,d:A(i[Cb])*d,h:A(i[Db])*d,m:A(i[Eb])*d,s:A(i[Fb])*d,ms:A(i[Gb])*d}):(i=Mb.exec(a))?(d="-"===i[1]?-1:1,f=function(a){var b=a&&parseFloat(a.replace(",","."));return(isNaN(b)?0:b)*d},h={y:f(i[2]),M:f(i[3]),d:f(i[4]),h:f(i[5]),m:f(i[6]),s:f(i[7]),w:f(i[8])}):"object"==typeof h&&("from"in h||"to"in h)&&(g=r(tb(h.from),tb(h.to)),h={},h.ms=g.milliseconds,h.M=g.months),e=new l(h),tb.isDuration(a)&&c(a,"_locale")&&(e._locale=a._locale),e},tb.version=wb,tb.defaultFormat=ec,tb.ISO_8601=function(){},tb.momentProperties=Ib,tb.updateOffset=function(){},tb.relativeTimeThreshold=function(b,c){return mc[b]===a?!1:c===a?mc[b]:(mc[b]=c,!0)},tb.lang=f("moment.lang is deprecated. Use moment.locale instead.",function(a,b){return tb.locale(a,b)}),tb.locale=function(a,b){var c;return a&&(c="undefined"!=typeof b?tb.defineLocale(a,b):tb.localeData(a),c&&(tb.duration._locale=tb._locale=c)),tb._locale._abbr},tb.defineLocale=function(a,b){return null!==b?(b.abbr=a,Hb[a]||(Hb[a]=new j),Hb[a].set(b),tb.locale(a),Hb[a]):(delete Hb[a],null)},tb.langData=f("moment.langData is deprecated. Use moment.localeData instead.",function(a){return tb.localeData(a)}),tb.localeData=function(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return tb._locale;if(!u(a)){if(b=J(a))return b;a=[a]}return I(a)},tb.isMoment=function(a){return a instanceof k||null!=a&&c(a,"_isAMomentObject")},tb.isDuration=function(a){return a instanceof l};for(vb=rc.length-1;vb>=0;--vb)z(rc[vb]);tb.normalizeUnits=function(a){return x(a)},tb.invalid=function(a){var b=tb.utc(0/0);return null!=a?m(b._pf,a):b._pf.userInvalidated=!0,b},tb.parseZone=function(){return tb.apply(null,arguments).parseZone()},tb.parseTwoDigitYear=function(a){return A(a)+(A(a)>68?1900:2e3)},m(tb.fn=k.prototype,{clone:function(){return tb(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var a=tb(this).utc();return 00:!1},parsingFlags:function(){return m({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(a){return this.zone(0,a)},local:function(a){return this._isUTC&&(this.zone(0,a),this._isUTC=!1,a&&this.add(this._dateTzOffset(),"m")),this},format:function(a){var b=N(this,a||tb.defaultFormat);return this.localeData().postformat(b)},add:s(1,"add"),subtract:s(-1,"subtract"),diff:function(a,b,c){var d,e,f,g=K(a,this),h=6e4*(this.zone()-g.zone());return b=x(b),"year"===b||"month"===b?(d=432e5*(this.daysInMonth()+g.daysInMonth()),e=12*(this.year()-g.year())+(this.month()-g.month()),f=this-tb(this).startOf("month")-(g-tb(g).startOf("month")),f-=6e4*(this.zone()-tb(this).startOf("month").zone()-(g.zone()-tb(g).startOf("month").zone())),e+=f/d,"year"===b&&(e/=12)):(d=this-g,e="second"===b?d/1e3:"minute"===b?d/6e4:"hour"===b?d/36e5:"day"===b?(d-h)/864e5:"week"===b?(d-h)/6048e5:d),c?e:o(e)},from:function(a,b){return tb.duration({to:this,from:a}).locale(this.locale()).humanize(!b)},fromNow:function(a){return this.from(tb(),a)},calendar:function(a){var b=a||tb(),c=K(b,this).startOf("day"),d=this.diff(c,"days",!0),e=-6>d?"sameElse":-1>d?"lastWeek":0>d?"lastDay":1>d?"sameDay":2>d?"nextDay":7>d?"nextWeek":"sameElse";return this.format(this.localeData().calendar(e,this,tb(b)))},isLeapYear:function(){return E(this.year())},isDST:function(){return this.zone()+a):(c=tb.isMoment(a)?+a:+tb(a),c<+this.clone().startOf(b))},isBefore:function(a,b){var c;return b=x("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=tb.isMoment(a)?a:tb(a),+a>+this):(c=tb.isMoment(a)?+a:+tb(a),+this.clone().endOf(b)a?this:a}),max:f("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(a){return a=tb.apply(null,arguments),a>this?this:a}),zone:function(a,b){var c,d=this._offset||0;return null==a?this._isUTC?d:this._dateTzOffset():("string"==typeof a&&(a=Q(a)),Math.abs(a)<16&&(a=60*a),!this._isUTC&&b&&(c=this._dateTzOffset()),this._offset=a,this._isUTC=!0,null!=c&&this.subtract(c,"m"),d!==a&&(!b||this._changeInProgress?t(this,tb.duration(d-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,tb.updateOffset(this,!0),this._changeInProgress=null)),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.zone(this._tzm):"string"==typeof this._i&&this.zone(this._i),this},hasAlignedHourOffset:function(a){return a=a?tb(a).zone():0,(this.zone()-a)%60===0},daysInMonth:function(){return B(this.year(),this.month())},dayOfYear:function(a){var b=yb((tb(this).startOf("day")-tb(this).startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")},quarter:function(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)},weekYear:function(a){var b=hb(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==a?b:this.add(a-b,"y")},isoWeekYear:function(a){var b=hb(this,1,4).year;return null==a?b:this.add(a-b,"y")},week:function(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")},isoWeek:function(a){var b=hb(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")},weekday:function(a){var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")},isoWeekday:function(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)},isoWeeksInYear:function(){return C(this.year(),1,4)},weeksInYear:function(){var a=this.localeData()._week;return C(this.year(),a.dow,a.doy)},get:function(a){return a=x(a),this[a]()},set:function(a,b){return a=x(a),"function"==typeof this[a]&&this[a](b),this},locale:function(b){var c;return b===a?this._locale._abbr:(c=tb.localeData(b),null!=c&&(this._locale=c),this)},lang:f("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(b){return b===a?this.localeData():this.locale(b)}),localeData:function(){return this._locale},_dateTzOffset:function(){return 15*Math.round(this._d.getTimezoneOffset()/15)}}),tb.fn.millisecond=tb.fn.milliseconds=ob("Milliseconds",!1),tb.fn.second=tb.fn.seconds=ob("Seconds",!1),tb.fn.minute=tb.fn.minutes=ob("Minutes",!1),tb.fn.hour=tb.fn.hours=ob("Hours",!0),tb.fn.date=ob("Date",!0),tb.fn.dates=f("dates accessor is deprecated. Use date instead.",ob("Date",!0)),tb.fn.year=ob("FullYear",!0),tb.fn.years=f("years accessor is deprecated. Use year instead.",ob("FullYear",!0)),tb.fn.days=tb.fn.day,tb.fn.months=tb.fn.month,tb.fn.weeks=tb.fn.week,tb.fn.isoWeeks=tb.fn.isoWeek,tb.fn.quarters=tb.fn.quarter,tb.fn.toJSON=tb.fn.toISOString,m(tb.duration.fn=l.prototype,{_bubble:function(){var a,b,c,d=this._milliseconds,e=this._days,f=this._months,g=this._data,h=0;g.milliseconds=d%1e3,a=o(d/1e3),g.seconds=a%60,b=o(a/60),g.minutes=b%60,c=o(b/60),g.hours=c%24,e+=o(c/24),h=o(pb(e)),e-=o(qb(h)),f+=o(e/30),e%=30,h+=o(f/12),f%=12,g.days=e,g.months=f,g.years=h},abs:function(){return this._milliseconds=Math.abs(this._milliseconds),this._days=Math.abs(this._days),this._months=Math.abs(this._months),this._data.milliseconds=Math.abs(this._data.milliseconds),this._data.seconds=Math.abs(this._data.seconds),this._data.minutes=Math.abs(this._data.minutes),this._data.hours=Math.abs(this._data.hours),this._data.months=Math.abs(this._data.months),this._data.years=Math.abs(this._data.years),this},weeks:function(){return o(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*A(this._months/12)},humanize:function(a){var b=gb(this,!a,this.localeData());return a&&(b=this.localeData().pastFuture(+this,b)),this.localeData().postformat(b)},add:function(a,b){var c=tb.duration(a,b);return this._milliseconds+=c._milliseconds,this._days+=c._days,this._months+=c._months,this._bubble(),this},subtract:function(a,b){var c=tb.duration(a,b);return this._milliseconds-=c._milliseconds,this._days-=c._days,this._months-=c._months,this._bubble(),this},get:function(a){return a=x(a),this[a.toLowerCase()+"s"]()},as:function(a){var b,c;if(a=x(a),"month"===a||"year"===a)return b=this._days+this._milliseconds/864e5,c=this._months+12*pb(b),"month"===a?c:c/12;switch(b=this._days+Math.round(qb(this._months/12)),a){case"week":return b/7+this._milliseconds/6048e5;case"day":return b+this._milliseconds/864e5;case"hour":return 24*b+this._milliseconds/36e5;case"minute":return 24*b*60+this._milliseconds/6e4;case"second":return 24*b*60*60+this._milliseconds/1e3; +case"millisecond":return Math.floor(24*b*60*60*1e3)+this._milliseconds;default:throw new Error("Unknown unit "+a)}},lang:tb.fn.lang,locale:tb.fn.locale,toIsoString:f("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var a=Math.abs(this.years()),b=Math.abs(this.months()),c=Math.abs(this.days()),d=Math.abs(this.hours()),e=Math.abs(this.minutes()),f=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(a?a+"Y":"")+(b?b+"M":"")+(c?c+"D":"")+(d||e||f?"T":"")+(d?d+"H":"")+(e?e+"M":"")+(f?f+"S":""):"P0D"},localeData:function(){return this._locale}}),tb.duration.fn.toString=tb.duration.fn.toISOString;for(vb in ic)c(ic,vb)&&rb(vb.toLowerCase());tb.duration.fn.asMilliseconds=function(){return this.as("ms")},tb.duration.fn.asSeconds=function(){return this.as("s")},tb.duration.fn.asMinutes=function(){return this.as("m")},tb.duration.fn.asHours=function(){return this.as("h")},tb.duration.fn.asDays=function(){return this.as("d")},tb.duration.fn.asWeeks=function(){return this.as("weeks")},tb.duration.fn.asMonths=function(){return this.as("M")},tb.duration.fn.asYears=function(){return this.as("y")},tb.locale("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,c=1===A(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),Jb?module.exports=tb:"function"==typeof define&&define.amd?(define("moment",function(a,b,c){return c.config&&c.config()&&c.config().noGlobal===!0&&(xb.moment=ub),tb}),sb(!0)):sb()}).call(this); \ No newline at end of file