(function(n){function it(n,t,i){switch(arguments.length){case 2:return null!=n?n:t;case 3:return null!=n?n:null!=t?t:i;default:throw new Error("Implement me");}}function p(n,t){return uf.call(n,t)}function ot(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function ri(n){t.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+n)}function o(n,t){var i=!0;return w(function(){return i&&(ri(n),i=!1),t.apply(this,arguments)},t)}function dr(n,t){br[n]||(ri(t),br[n]=!0)}function ui(n,t){return function(i){return r(n.call(this,i),t)}}function gr(n,t){return function(i){return this.localeData().ordinal(n.call(this,i),t)}}function nu(n,t){var r,f,u=12*(t.year()-n.year())+(t.month()-n.month()),i=n.clone().add(u,"months");return 0>t-i?(r=n.clone().add(u-1,"months"),f=(t-i)/(i-r)):(r=n.clone().add(u+1,"months"),f=(t-i)/(r-i)),-(u+f)}function tu(n,t,i){var r;return null==i?t:null!=n.meridiemHour?n.meridiemHour(t,i):null!=n.isPM?(r=n.isPM(i),r&&12>t&&(t+=12),r||12!==t||(t=0),t):t}function fi(){}function rt(n,i){i!==!1&&pi(n);ei(this,n);this._d=new Date(+n._d);ii===!1&&(ii=!0,t.updateOffset(this),ii=!1)}function st(n){var i=li(n),r=i.year||0,u=i.quarter||0,f=i.month||0,e=i.week||0,o=i.day||0,s=i.hour||0,h=i.minute||0,c=i.second||0,l=i.millisecond||0;this._milliseconds=+l+1e3*c+6e4*h+36e5*s;this._days=+o+7*e;this._months=+f+3*u+12*r;this._data={};this._locale=t.localeData();this._bubble()}function w(n,t){for(var i in t)p(t,i)&&(n[i]=t[i]);return p(t,"toString")&&(n.toString=t.toString),p(t,"valueOf")&&(n.valueOf=t.valueOf),n}function ei(n,t){var u,i,r;if("undefined"!=typeof t._isAMomentObject&&(n._isAMomentObject=t._isAMomentObject),"undefined"!=typeof t._i&&(n._i=t._i),"undefined"!=typeof t._f&&(n._f=t._f),"undefined"!=typeof t._l&&(n._l=t._l),"undefined"!=typeof t._strict&&(n._strict=t._strict),"undefined"!=typeof t._tzm&&(n._tzm=t._tzm),"undefined"!=typeof t._isUTC&&(n._isUTC=t._isUTC),"undefined"!=typeof t._offset&&(n._offset=t._offset),"undefined"!=typeof t._pf&&(n._pf=t._pf),"undefined"!=typeof t._locale&&(n._locale=t._locale),ft.length>0)for(u in ft)i=ft[u],r=t[i],"undefined"!=typeof r&&(n[i]=r);return n}function s(n){return 0>n?Math.ceil(n):Math.floor(n)}function r(n,t,i){for(var r=""+Math.abs(n),u=n>=0;r.length<t;)r="0"+r;return(u?i?"+":"":"-")+r}function oi(n,t){var i={milliseconds:0,months:0};return i.months=t.month()-n.month()+12*(t.year()-n.year()),n.clone().add(i.months,"M").isAfter(t)&&--i.months,i.milliseconds=+t-+n.clone().add(i.months,"M"),i}function iu(n,t){var i;return t=lt(t,n),n.isBefore(t)?i=oi(n,t):(i=oi(t,n),i.milliseconds=-i.milliseconds,i.months=-i.months),i}function si(n,i){return function(r,u){var f,e;return null===u||isNaN(+u)||(dr(i,"moment()."+i+"(period, number) is deprecated. Please use moment()."+i+"(number, period)."),e=r,r=u,u=e),r="string"==typeof r?+r:r,f=t.duration(r,u),hi(this,f,n),this}}function hi(n,i,r,u){var o=i._milliseconds,f=i._days,e=i._months;u=null==u?!0:u;o&&n._d.setTime(+n._d+o*r);f&&rr(n,"Date",bt(n,"Date")+f*r);e&&ir(n,bt(n,"Month")+e*r);u&&t.updateOffset(n,f||e)}function ut(n){return"[object Array]"===Object.prototype.toString.call(n)}function ht(n){return"[object Date]"===Object.prototype.toString.call(n)||n instanceof Date}function ci(n,t,r){for(var e=Math.min(n.length,t.length),o=Math.abs(n.length-t.length),f=0,u=0;e>u;u++)(r&&n[u]!==t[u]||!r&&i(n[u])!==i(t[u]))&&f++;return f+o}function f(n){if(n){var t=n.toLowerCase().replace(/(.)s$/,"$1");n=ne[n]||te[t]||t}return n}function li(n){var i,t,r={};for(t in n)p(n,t)&&(i=f(t),i&&(r[i]=n[t]));return r}function ru(i){var r,u;if(0===i.indexOf("week"))r=7,u="day";else{if(0!==i.indexOf("month"))return;r=12;u="month"}t[i]=function(f,e){var o,s,c=t._locale[i],h=[];if("number"==typeof f&&(e=f,f=n),s=function(n){var i=t().utc().set(u,n);return c.call(t._locale,i,f||"")},null!=e)return s(e);for(o=0;r>o;o++)h.push(s(o));return h}}function i(n){var t=+n,i=0;return 0!==t&&isFinite(t)&&(i=t>=0?Math.floor(t):Math.ceil(t)),i}function ct(n,t){return new Date(Date.UTC(n,t+1,0)).getUTCDate()}function ai(n,i,r){return b(t([n,11,31+i-r]),i,r).week}function vi(n){return yi(n)?366:365}function yi(n){return n%4==0&&n%100!=0||n%400==0}function pi(n){var t;n._a&&-2===n._pf.overflow&&(t=n._a[a]<0||n._a[a]>11?a:n._a[h]<1||n._a[h]>ct(n._a[l],n._a[a])?h:n._a[e]<0||n._a[e]>24||24===n._a[e]&&(0!==n._a[d]||0!==n._a[g]||0!==n._a[nt])?e:n._a[d]<0||n._a[d]>59?d:n._a[g]<0||n._a[g]>59?g:n._a[nt]<0||n._a[nt]>999?nt:-1,n._pf._overflowDayOfYear&&(l>t||t>h)&&(t=h),n._pf.overflow=t)}function wi(t){return null==t._isValid&&(t._isValid=!isNaN(t._d.getTime())&&t._pf.overflow<0&&!t._pf.empty&&!t._pf.invalidMonth&&!t._pf.nullInput&&!t._pf.invalidFormat&&!t._pf.userInvalidated,t._strict&&(t._isValid=t._isValid&&0===t._pf.charsLeftOver&&0===t._pf.unusedTokens.length&&t._pf.bigHour===n)),t._isValid}function bi(n){return n?n.toLowerCase().replace("_","-"):n}function uu(n){for(var i,t,f,r,u=0;u<n.length;){for(r=bi(n[u]).split("-"),i=r.length,t=bi(n[u+1]),t=t?t.split("-"):null;i>0;){if(f=ki(r.slice(0,i).join("-")))return f;if(t&&t.length>=i&&ci(r,t,!0)>=i-1)break;i--}u++}return null}function ki(n){var i=null;if(!tt[n]&&sr)try{i=t.locale();require("./locale/"+n);t.locale(i)}catch(r){}return tt[n]}function lt(n,i){var r,u;return i._isUTC?(r=i.clone(),u=(t.isMoment(n)||ht(n)?+n:+t(n))-+r,r._d.setTime(+r._d+u),t.updateOffset(r,!1),r):t(n).local()}function fu(n){return n.match(/\[[\s\S]/)?n.replace(/^\[|\]$/g,""):n.replace(/\\/g,"")}function eu(n){for(var i=n.match(hr),t=0,r=i.length;r>t;t++)i[t]=v[i[t]]?v[i[t]]:fu(i[t]);return function(u){var f="";for(t=0;r>t;t++)f+=i[t]instanceof Function?i[t].call(u,n):i[t];return f}}function at(n,t){return n.isValid()?(t=di(t,n.localeData()),ti[t]||(ti[t]=eu(t)),ti[t](n)):n.localeData().invalidDate()}function di(n,t){function r(n){return t.longDateFormat(n)||n}var i=5;for(et.lastIndex=0;i>=0&&et.test(n);)n=n.replace(et,r),et.lastIndex=0,i-=1;return n}function ou(n,t){var i=t._strict;switch(n){case"Q":return lr;case"DDDD":return vr;case"YYYY":case"GGGG":case"gggg":return i?wf:hf;case"Y":case"G":case"g":return kf;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return i?bf:cf;case"S":if(i)return lr;case"SS":if(i)return ar;case"SSS":if(i)return vr;case"DDD":return sf;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return af;case"a":case"A":return t._locale._meridiemParse;case"x":return yf;case"X":return pf;case"Z":case"ZZ":return dt;case"T":return vf;case"SSSS":return lf;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return i?ar:cr;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return cr;case"Do":return i?t._locale._ordinalParse:t._locale._ordinalParseLenient;default:return new RegExp(vu(au(n.replace("\\","")),"i"))}}function vt(n){n=n||"";var r=n.match(dt)||[],f=r[r.length-1]||[],t=(f+"").match(gf)||["-",0,0],u=+(60*t[1])+i(t[2]);return"+"===t[0]?u:-u}function su(n,r,u){var o,f=u._a;switch(n){case"Q":null!=r&&(f[a]=3*(i(r)-1));break;case"M":case"MM":null!=r&&(f[a]=i(r)-1);break;case"MMM":case"MMMM":o=u._locale.monthsParse(r,n,u._strict);null!=o?f[a]=o:u._pf.invalidMonth=r;break;case"D":case"DD":null!=r&&(f[h]=i(r));break;case"Do":null!=r&&(f[h]=i(parseInt(r.match(/\d{1,2}/)[0],10)));break;case"DDD":case"DDDD":null!=r&&(u._dayOfYear=i(r));break;case"YY":f[l]=t.parseTwoDigitYear(r);break;case"YYYY":case"YYYYY":case"YYYYYY":f[l]=i(r);break;case"a":case"A":u._meridiem=r;break;case"h":case"hh":u._pf.bigHour=!0;case"H":case"HH":f[e]=i(r);break;case"m":case"mm":f[d]=i(r);break;case"s":case"ss":f[g]=i(r);break;case"S":case"SS":case"SSS":case"SSSS":f[nt]=i(1e3*("0."+r));break;case"x":u._d=new Date(i(r));break;case"X":u._d=new Date(1e3*parseFloat(r));break;case"Z":case"ZZ":u._useUTC=!0;u._tzm=vt(r);break;case"dd":case"ddd":case"dddd":o=u._locale.weekdaysParse(r);null!=o?(u._w=u._w||{},u._w.d=o):u._pf.invalidWeekday=r;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":n=n.substr(0,1);case"gggg":case"GGGG":case"GGGGG":n=n.substr(0,2);r&&(u._w=u._w||{},u._w[n]=i(r));break;case"gg":case"GG":u._w=u._w||{};u._w[n]=t.parseTwoDigitYear(r)}}function hu(n){var i,o,f,u,r,e,s;i=n._w;null!=i.GG||null!=i.W||null!=i.E?(r=1,e=4,o=it(i.GG,n._a[l],b(t(),1,4).year),f=it(i.W,1),u=it(i.E,1)):(r=n._locale._week.dow,e=n._locale._week.doy,o=it(i.gg,n._a[l],b(t(),r,e).year),f=it(i.w,1),null!=i.d?(u=i.d,r>u&&++f):u=null!=i.e?i.e+r:r);s=tf(o,f,u,e,r);n._a[l]=s.year;n._dayOfYear=s.dayOfYear}function yt(n){var t,i,r,u,f=[];if(!n._d){for(r=lu(n),n._w&&null==n._a[h]&&null==n._a[a]&&hu(n),n._dayOfYear&&(u=it(n._a[l],r[l]),n._dayOfYear>vi(u)&&(n._pf._overflowDayOfYear=!0),i=wt(u,0,n._dayOfYear),n._a[a]=i.getUTCMonth(),n._a[h]=i.getUTCDate()),t=0;3>t&&null==n._a[t];++t)n._a[t]=f[t]=r[t];for(;7>t;t++)n._a[t]=f[t]=null==n._a[t]?2===t?1:0:n._a[t];24===n._a[e]&&0===n._a[d]&&0===n._a[g]&&0===n._a[nt]&&(n._nextDay=!0,n._a[e]=0);n._d=(n._useUTC?wt:ku).apply(null,f);null!=n._tzm&&n._d.setUTCMinutes(n._d.getUTCMinutes()-n._tzm);n._nextDay&&(n._a[e]=24)}}function cu(n){var t;n._d||(t=li(n._i),n._a=[t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],yt(n))}function lu(n){var t=new Date;return n._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function pt(i){if(i._f===t.ISO_8601)return void gi(i);i._a=[];i._pf.empty=!0;for(var r,f,h,u=""+i._i,l=u.length,c=0,s=di(i._f,i._locale).match(hr)||[],o=0;o<s.length;o++)f=s[o],r=(u.match(ou(f,i))||[])[0],r&&(h=u.substr(0,u.indexOf(r)),h.length>0&&i._pf.unusedInput.push(h),u=u.slice(u.indexOf(r)+r.length),c+=r.length),v[f]?(r?i._pf.empty=!1:i._pf.unusedTokens.push(f),su(f,r,i)):i._strict&&!r&&i._pf.unusedTokens.push(f);i._pf.charsLeftOver=l-c;u.length>0&&i._pf.unusedInput.push(u);i._pf.bigHour===!0&&i._a[e]<=12&&(i._pf.bigHour=n);i._a[e]=tu(i._locale,i._a[e],i._meridiem);yt(i);pi(i)}function au(n){return n.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(n,t,i,r,u){return t||i||r||u})}function vu(n){return n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function yu(n){var t,f,u,r,i;if(0===n._f.length)return n._pf.invalidFormat=!0,void(n._d=new Date(NaN));for(r=0;r<n._f.length;r++)i=0,t=ei({},n),null!=n._useUTC&&(t._useUTC=n._useUTC),t._pf=ot(),t._f=n._f[r],pt(t),wi(t)&&(i+=t._pf.charsLeftOver,i+=10*t._pf.unusedTokens.length,t._pf.score=i,(null==u||u>i)&&(u=i,f=t));w(n,f||t)}function gi(n){var t,i,r=n._i,u=df.exec(r);if(u){for(n._pf.iso=!0,t=0,i=gt.length;i>t;t++)if(gt[t][1].exec(r)){n._f=gt[t][0]+(u[6]||" ");break}for(t=0,i=ni.length;i>t;t++)if(ni[t][1].exec(r)){n._f+=ni[t][0];break}r.match(dt)&&(n._f+="Z");pt(n)}else n._isValid=!1}function pu(n){gi(n);n._isValid===!1&&(delete n._isValid,t.createFromInputFallback(n))}function wu(n,t){for(var r=[],i=0;i<n.length;++i)r.push(t(n[i],i));return r}function bu(i){var u,r=i._i;r===n?i._d=new Date:ht(r)?i._d=new Date(+r):null!==(u=ff.exec(r))?i._d=new Date(+u[1]):"string"==typeof r?pu(i):ut(r)?(i._a=wu(r.slice(0),function(n){return parseInt(n,10)}),yt(i)):"object"==typeof r?cu(i):"number"==typeof r?i._d=new Date(r):t.createFromInputFallback(i)}function ku(n,t,i,r,u,f,e){var o=new Date(n,t,i,r,u,f,e);return 1970>n&&o.setFullYear(n),o}function wt(n){var t=new Date(Date.UTC.apply(null,arguments));return 1970>n&&t.setUTCFullYear(n),t}function du(n,t){if("string"==typeof n)if(isNaN(n)){if(n=t.weekdaysParse(n),"number"!=typeof n)return null}else n=parseInt(n,10);return n}function gu(n,t,i,r,u){return u.relativeTime(t||1,!!i,n,r)}function nf(n,i,r){var u=t.duration(n).abs(),c=k(u.as("s")),e=k(u.as("m")),o=k(u.as("h")),s=k(u.as("d")),h=k(u.as("M")),l=k(u.as("y")),f=c<y.s&&["s",c]||1===e&&["m"]||e<y.m&&["mm",e]||1===o&&["h"]||o<y.h&&["hh",o]||1===s&&["d"]||s<y.d&&["dd",s]||1===h&&["M"]||h<y.M&&["MM",h]||1===l&&["y"]||["yy",l];return f[2]=i,f[3]=+n>0,f[4]=r,gu.apply({},f)}function b(n,i,r){var f,e=r-i,u=r-n.day();return u>e&&(u-=7),e-7>u&&(u+=7),f=t(n).add(u,"d"),{week:Math.ceil(f.dayOfYear()/7),year:f.year()}}function tf(n,t,i,r,u){var o,e,f=wt(n,0,1).getUTCDay();return f=0===f?7:f,i=null!=i?i:u,o=u-f+(f>r?7:0)-(u>f?7:0),e=7*(t-1)+(i-u)+o+1,{year:e>0?n:n-1,dayOfYear:e>0?e:vi(n-1)+e}}function nr(i){var u,r=i._i,f=i._f;return i._locale=i._locale||t.localeData(i._l),null===r||f===n&&""===r?t.invalid({nullInput:!0}):("string"==typeof r&&(i._i=r=i._locale.preparse(r)),t.isMoment(r)?new rt(r,!0):(f?ut(f)?yu(i):pt(i):bu(i),u=new rt(i),u._nextDay&&(u.add(1,"d"),u._nextDay=n),u))}function tr(n,i){var u,r;if(1===i.length&&ut(i[0])&&(i=i[0]),!i.length)return t();for(u=i[0],r=1;r<i.length;++r)i[r][n](u)&&(u=i[r]);return u}function ir(n,t){var i;return"string"==typeof t&&(t=n.localeData().monthsParse(t),"number"!=typeof t)?n:(i=Math.min(n.date(),ct(n.year(),t)),n._d["set"+(n._isUTC?"UTC":"")+"Month"](t,i),n)}function bt(n,t){return n._d["get"+(n._isUTC?"UTC":"")+t]()}function rr(n,t,i){return"Month"===t?ir(n,i):n._d["set"+(n._isUTC?"UTC":"")+t](i)}function c(n,i){return function(r){return null!=r?(rr(this,n,r),t.updateOffset(this,i),this):bt(this,n)}}function ur(n){return 400*n/146097}function fr(n){return 146097*n/400}function rf(n){t.duration.fn[n]=function(){return this._data[n]}}function er(n){"undefined"==typeof ender&&(or=kt.moment,kt.moment=n?o("Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release.",t):t)}for(var t,or,u,kt="undefined"==typeof global||"undefined"!=typeof window&&window!==global.window?this:global,k=Math.round,uf=Object.prototype.hasOwnProperty,l=0,a=1,h=2,e=3,d=4,g=5,nt=6,tt={},ft=[],sr="undefined"!=typeof module&&module&&module.exports,ff=/^\/?Date\((\-?\d+)/i,ef=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,of=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,hr=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|x|X|zz?|ZZ?|.)/g,et=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,cr=/\d\d?/,sf=/\d{1,3}/,hf=/\d{1,4}/,cf=/[+\-]?\d{1,6}/,lf=/\d+/,af=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,dt=/Z|[\+\-]\d\d:?\d\d/gi,vf=/T/i,yf=/[\+\-]?\d+/,pf=/[\+\-]?\d+(\.\d{1,3})?/,lr=/\d/,ar=/\d\d/,vr=/\d{3}/,wf=/\d{4}/,bf=/[+-]?\d{6}/,kf=/[+-]?\d+/,df=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,gt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],ni=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],gf=/([\+\-]|\d\d)/gi,yr=("Date|Hours|Minutes|Seconds|Milliseconds".split("|"),{Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6}),ne={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",D:"date",w:"week",W:"isoWeek",M:"month",Q:"quarter",y:"year",DDD:"dayOfYear",e:"weekday",E:"isoWeekday",gg:"weekYear",GG:"isoWeekYear"},te={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},ti={},y={s:45,m:45,h:22,d:26,M:11},pr="DDD w W M D d".split(" "),wr="M D H h m s w W".split(" "),v={M:function(){return this.month()+1},MMM:function(n){return this.localeData().monthsShort(this,n)},MMMM:function(n){return this.localeData().months(this,n)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(n){return this.localeData().weekdaysMin(this,n)},ddd:function(n){return this.localeData().weekdaysShort(this,n)},dddd:function(n){return this.localeData().weekdays(this,n)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return r(this.year()%100,2)},YYYY:function(){return r(this.year(),4)},YYYYY:function(){return r(this.year(),5)},YYYYYY:function(){var n=this.year(),t=n>=0?"+":"-";return t+r(Math.abs(n),6)},gg:function(){return r(this.weekYear()%100,2)},gggg:function(){return r(this.weekYear(),4)},ggggg:function(){return r(this.weekYear(),5)},GG:function(){return r(this.isoWeekYear()%100,2)},GGGG:function(){return r(this.isoWeekYear(),4)},GGGGG:function(){return r(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 i(this.milliseconds()/100)},SS:function(){return r(i(this.milliseconds()/10),2)},SSS:function(){return r(this.milliseconds(),3)},SSSS:function(){return r(this.milliseconds(),3)},Z:function(){var n=this.utcOffset(),t="+";return 0>n&&(n=-n,t="-"),t+r(i(n/60),2)+":"+r(i(n)%60,2)},ZZ:function(){var n=this.utcOffset(),t="+";return 0>n&&(n=-n,t="-"),t+r(i(n/60),2)+r(i(n)%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()}},br={},kr=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"],ii=!1;pr.length;)u=pr.pop(),v[u+"o"]=gr(v[u],u);for(;wr.length;)u=wr.pop(),v[u+u]=ui(v[u],2);for(v.DDDD=ui(v.DDD,3),w(fi.prototype,{set:function(n){var t,i;for(i in n)t=n[i],"function"==typeof t?this[i]=t:this["_"+i]=t;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(n){return this._months[n.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(n){return this._monthsShort[n.month()]},monthsParse:function(n,i,r){var u,f,e;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),u=0;12>u;u++)if((f=t.utc([2e3,u]),r&&!this._longMonthsParse[u]&&(this._longMonthsParse[u]=new RegExp("^"+this.months(f,"").replace(".","")+"$","i"),this._shortMonthsParse[u]=new RegExp("^"+this.monthsShort(f,"").replace(".","")+"$","i")),r||this._monthsParse[u]||(e="^"+this.months(f,"")+"|^"+this.monthsShort(f,""),this._monthsParse[u]=new RegExp(e.replace(".",""),"i")),r&&"MMMM"===i&&this._longMonthsParse[u].test(n))||r&&"MMM"===i&&this._shortMonthsParse[u].test(n)||!r&&this._monthsParse[u].test(n))return u},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(n){return this._weekdays[n.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(n){return this._weekdaysShort[n.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(n){return this._weekdaysMin[n.day()]},weekdaysParse:function(n){var i,r,u;for(this._weekdaysParse||(this._weekdaysParse=[]),i=0;7>i;i++)if(this._weekdaysParse[i]||(r=t([2e3,1]).day(i),u="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[i]=new RegExp(u.replace(".",""),"i")),this._weekdaysParse[i].test(n))return i},_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(n){var t=this._longDateFormat[n];return!t&&this._longDateFormat[n.toUpperCase()]&&(t=this._longDateFormat[n.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(n){return n.slice(1)}),this._longDateFormat[n]=t),t},isPM:function(n){return"p"===(n+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(n,t,i){return n>11?i?"pm":"PM":i?"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(n,t,i){var r=this._calendar[n];return"function"==typeof r?r.apply(t,[i]):r},_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(n,t,i,r){var u=this._relativeTime[i];return"function"==typeof u?u(n,t,i,r):u.replace(/%d/i,n)},pastFuture:function(n,t){var i=this._relativeTime[n>0?"future":"past"];return"function"==typeof i?i(t):i.replace(/%s/i,t)},ordinal:function(n){return this._ordinal.replace("%d",n)},_ordinal:"%d",_ordinalParse:/\d{1,2}/,preparse:function(n){return n},postformat:function(n){return n},week:function(n){return b(n,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},firstDayOfWeek:function(){return this._week.dow},firstDayOfYear:function(){return this._week.doy},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),t=function(t,i,r,u){var f;return"boolean"==typeof r&&(u=r,r=n),f={},f._isAMomentObject=!0,f._i=t,f._f=i,f._l=r,f._strict=u,f._isUTC=!1,f._pf=ot(),nr(f)},t.suppressDeprecationWarnings=!1,t.createFromInputFallback=o("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(n){n._d=new Date(n._i+(n._useUTC?" UTC":""))}),t.min=function(){var n=[].slice.call(arguments,0);return tr("isBefore",n)},t.max=function(){var n=[].slice.call(arguments,0);return tr("isAfter",n)},t.utc=function(t,i,r,u){var f;return"boolean"==typeof r&&(u=r,r=n),f={},f._isAMomentObject=!0,f._useUTC=!0,f._isUTC=!0,f._l=r,f._i=t,f._f=i,f._strict=u,f._pf=ot(),nr(f).utc()},t.unix=function(n){return t(1e3*n)},t.duration=function(n,r){var o,c,s,l,u=n,f=null;return t.isDuration(n)?u={ms:n._milliseconds,d:n._days,M:n._months}:"number"==typeof n?(u={},r?u[r]=n:u.milliseconds=n):(f=ef.exec(n))?(o="-"===f[1]?-1:1,u={y:0,d:i(f[h])*o,h:i(f[e])*o,m:i(f[d])*o,s:i(f[g])*o,ms:i(f[nt])*o}):(f=of.exec(n))?(o="-"===f[1]?-1:1,s=function(n){var t=n&&parseFloat(n.replace(",","."));return(isNaN(t)?0:t)*o},u={y:s(f[2]),M:s(f[3]),d:s(f[4]),h:s(f[5]),m:s(f[6]),s:s(f[7]),w:s(f[8])}):null==u?u={}:"object"==typeof u&&("from"in u||"to"in u)&&(l=iu(t(u.from),t(u.to)),u={},u.ms=l.milliseconds,u.M=l.months),c=new st(u),t.isDuration(n)&&p(n,"_locale")&&(c._locale=n._locale),c},t.version="2.9.0",t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.ISO_8601=function(){},t.momentProperties=ft,t.updateOffset=function(){},t.relativeTimeThreshold=function(t,i){return y[t]===n?!1:i===n?y[t]:(y[t]=i,!0)},t.lang=o("moment.lang is deprecated. Use moment.locale instead.",function(n,i){return t.locale(n,i)}),t.locale=function(n,i){var r;return n&&(r="undefined"!=typeof i?t.defineLocale(n,i):t.localeData(n),r&&(t.duration._locale=t._locale=r)),t._locale._abbr},t.defineLocale=function(n,i){return null!==i?(i.abbr=n,tt[n]||(tt[n]=new fi),tt[n].set(i),t.locale(n),tt[n]):(delete tt[n],null)},t.langData=o("moment.langData is deprecated. Use moment.localeData instead.",function(n){return t.localeData(n)}),t.localeData=function(n){var i;if(n&&n._locale&&n._locale._abbr&&(n=n._locale._abbr),!n)return t._locale;if(!ut(n)){if(i=ki(n))return i;n=[n]}return uu(n)},t.isMoment=function(n){return n instanceof rt||null!=n&&p(n,"_isAMomentObject")},t.isDuration=function(n){return n instanceof st},u=kr.length-1;u>=0;--u)ru(kr[u]);t.normalizeUnits=function(n){return f(n)};t.invalid=function(n){var i=t.utc(NaN);return null!=n?w(i._pf,n):i._pf.userInvalidated=!0,i};t.parseZone=function(){return t.apply(null,arguments).parseZone()};t.parseTwoDigitYear=function(n){return i(n)+(i(n)>68?1900:2e3)};t.isDate=ht;w(t.fn=rt.prototype,{clone:function(){return t(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 n=t(this).utc();return 0<n.year()&&n.year()<=9999?"function"==typeof Date.prototype.toISOString?this.toDate().toISOString():at(n,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):at(n,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var n=this;return[n.year(),n.month(),n.date(),n.hours(),n.minutes(),n.seconds(),n.milliseconds()]},isValid:function(){return wi(this)},isDSTShifted:function(){return this._a?this.isValid()&&ci(this._a,(this._isUTC?t.utc(this._a):t(this._a)).toArray())>0:!1},parsingFlags:function(){return w({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(n){return this.utcOffset(0,n)},local:function(n){return this._isUTC&&(this.utcOffset(0,n),this._isUTC=!1,n&&this.subtract(this._dateUtcOffset(),"m")),this},format:function(n){var i=at(this,n||t.defaultFormat);return this.localeData().postformat(i)},add:si(1,"add"),subtract:si(-1,"subtract"),diff:function(n,t,i){var r,u,e=lt(n,this),o=6e4*(e.utcOffset()-this.utcOffset());return t=f(t),"year"===t||"month"===t||"quarter"===t?(u=nu(this,e),"quarter"===t?u/=3:"year"===t&&(u/=12)):(r=this-e,u="second"===t?r/1e3:"minute"===t?r/6e4:"hour"===t?r/36e5:"day"===t?(r-o)/864e5:"week"===t?(r-o)/6048e5:r),i?u:s(u)},from:function(n,i){return t.duration({to:this,from:n}).locale(this.locale()).humanize(!i)},fromNow:function(n){return this.from(t(),n)},calendar:function(n){var r=n||t(),u=lt(r,this).startOf("day"),i=this.diff(u,"days",!0),f=-6>i?"sameElse":-1>i?"lastWeek":0>i?"lastDay":1>i?"sameDay":2>i?"nextDay":7>i?"nextWeek":"sameElse";return this.format(this.localeData().calendar(f,this,t(r)))},isLeapYear:function(){return yi(this.year())},isDST:function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},day:function(n){var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=n?(n=du(n,this.localeData()),this.add(n-t,"d")):t},month:c("Month",!0),startOf:function(n){switch(n=f(n)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===n?this.weekday(0):"isoWeek"===n&&this.isoWeekday(1),"quarter"===n&&this.month(3*Math.floor(this.month()/3)),this},endOf:function(t){return t=f(t),t===n||"millisecond"===t?this:this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms")},isAfter:function(n,i){var r;return i=f("undefined"!=typeof i?i:"millisecond"),"millisecond"===i?(n=t.isMoment(n)?n:t(n),+this>+n):(r=t.isMoment(n)?+n:+t(n),r<+this.clone().startOf(i))},isBefore:function(n,i){var r;return i=f("undefined"!=typeof i?i:"millisecond"),"millisecond"===i?(n=t.isMoment(n)?n:t(n),+n>+this):(r=t.isMoment(n)?+n:+t(n),+this.clone().endOf(i)<r)},isBetween:function(n,t,i){return this.isAfter(n,i)&&this.isBefore(t,i)},isSame:function(n,i){var r;return i=f(i||"millisecond"),"millisecond"===i?(n=t.isMoment(n)?n:t(n),+this==+n):(r=+t(n),+this.clone().startOf(i)<=r&&r<=+this.clone().endOf(i))},min:o("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(n){return n=t.apply(null,arguments),this>n?this:n}),max:o("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(n){return n=t.apply(null,arguments),n>this?this:n}),zone:o("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",function(n,t){return null!=n?("string"!=typeof n&&(n=-n),this.utcOffset(n,t),this):-this.utcOffset()}),utcOffset:function(n,i){var r,u=this._offset||0;return null!=n?("string"==typeof n&&(n=vt(n)),Math.abs(n)<16&&(n=60*n),!this._isUTC&&i&&(r=this._dateUtcOffset()),this._offset=n,this._isUTC=!0,null!=r&&this.add(r,"m"),u!==n&&(!i||this._changeInProgress?hi(this,t.duration(n-u,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?u:this._dateUtcOffset()},isLocal:function(){return!this._isUTC},isUtcOffset:function(){return this._isUTC},isUtc:function(){return this._isUTC&&0===this._offset},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(vt(this._i)),this},hasAlignedHourOffset:function(n){return n=n?t(n).utcOffset():0,(this.utcOffset()-n)%60==0},daysInMonth:function(){return ct(this.year(),this.month())},dayOfYear:function(n){var i=k((t(this).startOf("day")-t(this).startOf("year"))/864e5)+1;return null==n?i:this.add(n-i,"d")},quarter:function(n){return null==n?Math.ceil((this.month()+1)/3):this.month(3*(n-1)+this.month()%3)},weekYear:function(n){var t=b(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==n?t:this.add(n-t,"y")},isoWeekYear:function(n){var t=b(this,1,4).year;return null==n?t:this.add(n-t,"y")},week:function(n){var t=this.localeData().week(this);return null==n?t:this.add(7*(n-t),"d")},isoWeek:function(n){var t=b(this,1,4).week;return null==n?t:this.add(7*(n-t),"d")},weekday:function(n){var t=(this.day()+7-this.localeData()._week.dow)%7;return null==n?t:this.add(n-t,"d")},isoWeekday:function(n){return null==n?this.day()||7:this.day(this.day()%7?n:n-7)},isoWeeksInYear:function(){return ai(this.year(),1,4)},weeksInYear:function(){var n=this.localeData()._week;return ai(this.year(),n.dow,n.doy)},get:function(n){return n=f(n),this[n]()},set:function(n,t){var i;if("object"==typeof n)for(i in n)this.set(i,n[i]);else n=f(n),"function"==typeof this[n]&&this[n](t);return this},locale:function(i){var r;return i===n?this._locale._abbr:(r=t.localeData(i),null!=r&&(this._locale=r),this)},lang:o("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return t===n?this.localeData():this.locale(t)}),localeData:function(){return this._locale},_dateUtcOffset:function(){return 15*-Math.round(this._d.getTimezoneOffset()/15)}});t.fn.millisecond=t.fn.milliseconds=c("Milliseconds",!1);t.fn.second=t.fn.seconds=c("Seconds",!1);t.fn.minute=t.fn.minutes=c("Minutes",!1);t.fn.hour=t.fn.hours=c("Hours",!0);t.fn.date=c("Date",!0);t.fn.dates=o("dates accessor is deprecated. Use date instead.",c("Date",!0));t.fn.year=c("FullYear",!0);t.fn.years=o("years accessor is deprecated. Use year instead.",c("FullYear",!0));t.fn.days=t.fn.day;t.fn.months=t.fn.month;t.fn.weeks=t.fn.week;t.fn.isoWeeks=t.fn.isoWeek;t.fn.quarters=t.fn.quarter;t.fn.toJSON=t.fn.toISOString;t.fn.isUTC=t.fn.isUtc;w(t.duration.fn=st.prototype,{_bubble:function(){var u,f,e,o=this._milliseconds,t=this._days,i=this._months,n=this._data,r=0;n.milliseconds=o%1e3;u=s(o/1e3);n.seconds=u%60;f=s(u/60);n.minutes=f%60;e=s(f/60);n.hours=e%24;t+=s(e/24);r=s(ur(t));t-=s(fr(r));i+=s(t/30);t%=30;r+=s(i/12);i%=12;n.days=t;n.months=i;n.years=r},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 s(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*i(this._months/12)},humanize:function(n){var t=nf(this,!n,this.localeData());return n&&(t=this.localeData().pastFuture(+this,t)),this.localeData().postformat(t)},add:function(n,i){var r=t.duration(n,i);return this._milliseconds+=r._milliseconds,this._days+=r._days,this._months+=r._months,this._bubble(),this},subtract:function(n,i){var r=t.duration(n,i);return this._milliseconds-=r._milliseconds,this._days-=r._days,this._months-=r._months,this._bubble(),this},get:function(n){return n=f(n),this[n.toLowerCase()+"s"]()},as:function(n){var t,i;if(n=f(n),"month"===n||"year"===n)return t=this._days+this._milliseconds/864e5,i=this._months+12*ur(t),"month"===n?i:i/12;switch(t=this._days+Math.round(fr(this._months/12)),n){case"week":return t/7+this._milliseconds/6048e5;case"day":return t+this._milliseconds/864e5;case"hour":return 24*t+this._milliseconds/36e5;case"minute":return 1440*t+this._milliseconds/6e4;case"second":return 86400*t+this._milliseconds/1e3;case"millisecond":return Math.floor(864e5*t)+this._milliseconds;default:throw new Error("Unknown unit "+n);}},lang:t.fn.lang,locale:t.fn.locale,toIsoString:o("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var r=Math.abs(this.years()),u=Math.abs(this.months()),f=Math.abs(this.days()),n=Math.abs(this.hours()),t=Math.abs(this.minutes()),i=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(r?r+"Y":"")+(u?u+"M":"")+(f?f+"D":"")+(n||t||i?"T":"")+(n?n+"H":"")+(t?t+"M":"")+(i?i+"S":""):"P0D"},localeData:function(){return this._locale},toJSON:function(){return this.toISOString()}});t.duration.fn.toString=t.duration.fn.toISOString;for(u in yr)p(yr,u)&&rf(u.toLowerCase());t.duration.fn.asMilliseconds=function(){return this.as("ms")};t.duration.fn.asSeconds=function(){return this.as("s")};t.duration.fn.asMinutes=function(){return this.as("m")};t.duration.fn.asHours=function(){return this.as("h")};t.duration.fn.asDays=function(){return this.as("d")};t.duration.fn.asWeeks=function(){return this.as("weeks")};t.duration.fn.asMonths=function(){return this.as("M")};t.duration.fn.asYears=function(){return this.as("y")};t.locale("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(n){var t=n%10,r=1===i(n%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return n+r}});sr?module.exports=t:"function"==typeof define&&define.amd?(define(function(n,i,r){return r.config&&r.config()&&r.config().noGlobal===!0&&(kt.moment=or),t}),er(!0)):er()}).call(this);!function(n){"use strict";if("function"==typeof define&&define.amd)define(["jquery","moment"],n);else if("object"==typeof exports)n(require("jquery"),require("moment"));else{if("undefined"==typeof jQuery)throw"bootstrap-datetimepicker requires jQuery to be loaded first";if("undefined"==typeof moment)throw"bootstrap-datetimepicker requires Moment.js to be loaded first";n(jQuery,moment)}}(function(n,t){"use strict";if(!t)throw new Error("bootstrap-datetimepicker requires Moment.js to be loaded first");var i=function(i,r){var s,k,y,tt,b,u={},e=t().startOf("d"),o=e.clone(),d=!0,l=!1,f=!1,g=0,et=[{clsName:"days",navFnc:"M",navStep:1},{clsName:"months",navFnc:"y",navStep:1},{clsName:"years",navFnc:"y",navStep:10},{clsName:"decades",navFnc:"y",navStep:100}],at=["days","months","years","decades"],pt=["top","bottom","auto"],wt=["left","right","auto"],bt=["default","top","bottom"],kt={up:38,38:"up",down:40,40:"down",left:37,37:"left",right:39,39:"right",tab:9,9:"tab",escape:27,27:"escape",enter:13,13:"enter",pageUp:33,33:"pageUp",pageDown:34,34:"pageDown",shift:16,16:"shift",control:17,17:"control",space:32,32:"space",t:84,84:"t","delete":46,46:"delete"},ot={},p=function(n){if("string"!=typeof n||n.length>1)throw new TypeError("isEnabled expects a single character string parameter");switch(n){case"y":return-1!==y.indexOf("Y");case"M":return-1!==y.indexOf("M");case"d":return-1!==y.toLowerCase().indexOf("d");case"h":case"H":return-1!==y.toLowerCase().indexOf("h");case"m":return-1!==y.indexOf("m");case"s":return-1!==y.indexOf("s");default:return!1}},st=function(){return p("h")||p("m")||p("s")},ht=function(){return p("y")||p("M")||p("d")},ui=function(){var t=n("<thead>").append(n("<tr>").append(n("<th>").addClass("prev").attr("data-action","previous").append(n("<span>").addClass(r.icons.previous))).append(n("<th>").addClass("picker-switch").attr("data-action","pickerSwitch").attr("colspan",r.calendarWeeks?"6":"5")).append(n("<th>").addClass("next").attr("data-action","next").append(n("<span>").addClass(r.icons.next)))),i=n("<tbody>").append(n("<tr>").append(n("<td>").attr("colspan",r.calendarWeeks?"8":"7")));return[n("<div>").addClass("datepicker-days").append(n("<table>").addClass("table-condensed").append(t).append(n("<tbody>"))),n("<div>").addClass("datepicker-months").append(n("<table>").addClass("table-condensed").append(t.clone()).append(i.clone())),n("<div>").addClass("datepicker-years").append(n("<table>").addClass("table-condensed").append(t.clone()).append(i.clone())),n("<div>").addClass("datepicker-decades").append(n("<table>").addClass("table-condensed").append(t.clone()).append(i.clone()))]},fi=function(){var t=n("<tr>"),i=n("<tr>"),u=n("<tr>");return p("h")&&(t.append(n("<td>").append(n("<a>").attr({href:"#",tabindex:"-1",title:"Increment Hour"}).addClass("btn").attr("data-action","incrementHours").append(n("<span>").addClass(r.icons.up)))),i.append(n("<td>").append(n("<span>").addClass("timepicker-hour").attr({"data-time-component":"hours",title:"Pick Hour"}).attr("data-action","showHours"))),u.append(n("<td>").append(n("<a>").attr({href:"#",tabindex:"-1",title:"Decrement Hour"}).addClass("btn").attr("data-action","decrementHours").append(n("<span>").addClass(r.icons.down))))),p("m")&&(p("h")&&(t.append(n("<td>").addClass("separator")),i.append(n("<td>").addClass("separator").html(":")),u.append(n("<td>").addClass("separator"))),t.append(n("<td>").append(n("<a>").attr({href:"#",tabindex:"-1",title:"Increment Minute"}).addClass("btn").attr("data-action","incrementMinutes").append(n("<span>").addClass(r.icons.up)))),i.append(n("<td>").append(n("<span>").addClass("timepicker-minute").attr({"data-time-component":"minutes",title:"Pick Minute"}).attr("data-action","showMinutes"))),u.append(n("<td>").append(n("<a>").attr({href:"#",tabindex:"-1",title:"Decrement Minute"}).addClass("btn").attr("data-action","decrementMinutes").append(n("<span>").addClass(r.icons.down))))),p("s")&&(p("m")&&(t.append(n("<td>").addClass("separator")),i.append(n("<td>").addClass("separator").html(":")),u.append(n("<td>").addClass("separator"))),t.append(n("<td>").append(n("<a>").attr({href:"#",tabindex:"-1",title:"Increment Second"}).addClass("btn").attr("data-action","incrementSeconds").append(n("<span>").addClass(r.icons.up)))),i.append(n("<td>").append(n("<span>").addClass("timepicker-second").attr({"data-time-component":"seconds",title:"Pick Second"}).attr("data-action","showSeconds"))),u.append(n("<td>").append(n("<a>").attr({href:"#",tabindex:"-1",title:"Decrement Second"}).addClass("btn").attr("data-action","decrementSeconds").append(n("<span>").addClass(r.icons.down))))),k||(t.append(n("<td>").addClass("separator")),i.append(n("<td>").append(n("<button>").addClass("btn btn-primary").attr({"data-action":"togglePeriod",tabindex:"-1",title:"Toggle Period"}))),u.append(n("<td>").addClass("separator"))),n("<div>").addClass("timepicker-picker").append(n("<table>").addClass("table-condensed").append([t,i,u]))},ei=function(){var i=n("<div>").addClass("timepicker-hours").append(n("<table>").addClass("table-condensed")),r=n("<div>").addClass("timepicker-minutes").append(n("<table>").addClass("table-condensed")),u=n("<div>").addClass("timepicker-seconds").append(n("<table>").addClass("table-condensed")),t=[fi()];return p("h")&&t.push(i),p("m")&&t.push(r),p("s")&&t.push(u),t},oi=function(){var t=[];return r.showTodayButton&&t.push(n("<td>").append(n("<a>").attr({"data-action":"today",title:"Go to today"}).append(n("<span>").addClass(r.icons.today)))),!r.sideBySide&&ht()&&st()&&t.push(n("<td>").append(n("<a>").attr({"data-action":"togglePicker",title:"Select Time"}).append(n("<span>").addClass(r.icons.time)))),r.showClear&&t.push(n("<td>").append(n("<a>").attr({"data-action":"clear",title:"Clear selection"}).append(n("<span>").addClass(r.icons.clear)))),r.showClose&&t.push(n("<td>").append(n("<a>").attr({"data-action":"close",title:"Close the picker"}).append(n("<span>").addClass(r.icons.close)))),n("<table>").addClass("table-condensed").append(n("<tbody>").append(n("<tr>").append(t)))},si=function(){var t=n("<div>").addClass("bootstrap-datetimepicker-widget dropdown-menu"),f=n("<div>").addClass("datepicker").append(ui()),e=n("<div>").addClass("timepicker").append(ei()),i=n("<ul>").addClass("list-unstyled"),u=n("<li>").addClass("picker-switch"+(r.collapse?" accordion-toggle":"")).append(oi());return r.inline&&t.removeClass("dropdown-menu"),k&&t.addClass("usetwentyfour"),p("s")&&!k&&t.addClass("wider"),r.sideBySide&&ht()&&st()?(t.addClass("timepicker-sbs"),t.append(n("<div>").addClass("row").append(f.addClass("col-sm-6")).append(e.addClass("col-sm-6"))),t.append(u),t):("top"===r.toolbarPlacement&&i.append(u),ht()&&i.append(n("<li>").addClass(r.collapse&&st()?"collapse in":"").append(f)),"default"===r.toolbarPlacement&&i.append(u),st()&&i.append(n("<li>").addClass(r.collapse&&ht()?"collapse":"").append(e)),"bottom"===r.toolbarPlacement&&i.append(u),t.append(i))},hi=function(){var t,u={};return t=i.is("input")||r.inline?i.data():i.find("input").data(),t.dateOptions&&t.dateOptions instanceof Object&&(u=n.extend(!0,u,t.dateOptions)),n.each(r,function(n){var i="date"+n.charAt(0).toUpperCase()+n.slice(1);void 0!==t[i]&&(u[n]=t[i])}),u},vt=function(){var t,o=(l||i).position(),s=(l||i).offset(),u=r.widgetPositioning.vertical,e=r.widgetPositioning.horizontal;if(r.widgetParent)t=r.widgetParent.append(f);else if(i.is("input"))t=i.after(f).parent();else{if(r.inline)return void(t=i.append(f));t=i;i.children().first().after(f)}if("auto"===u&&(u=s.top+1.5*f.height()>=n(window).height()+n(window).scrollTop()&&f.height()+i.outerHeight()<s.top?"top":"bottom"),"auto"===e&&(e=t.width()<s.left+f.outerWidth()/2&&s.left+f.outerWidth()>n(window).width()?"right":"left"),"top"===u?f.addClass("top").removeClass("bottom"):f.addClass("bottom").removeClass("top"),"right"===e?f.addClass("pull-right"):f.removeClass("pull-right"),"relative"!==t.css("position")&&(t=t.parents().filter(function(){return"relative"===n(this).css("position")}).first()),0===t.length)throw new Error("datetimepicker component should be placed within a relative positioned container");f.css({top:"top"===u?"auto":o.top+i.outerHeight(),bottom:"top"===u?o.top+i.outerHeight():"auto",left:"left"===e?t===i?0:o.left:"auto",right:"left"===e?"auto":t.outerWidth()-i.outerWidth()-(t===i?0:o.left)})},it=function(n){"dp.change"===n.type&&(n.date&&n.date.isSame(n.oldDate)||!n.date&&!n.oldDate)||i.trigger(n)},rt=function(n){"y"===n&&(n="YYYY");it({type:"dp.update",change:n,viewDate:o.clone()})},ut=function(n){f&&(n&&(b=Math.max(g,Math.min(3,b+n))),f.find(".datepicker > div").hide().filter(".datepicker-"+et[b].clsName).show())},ci=function(){var t=n("<tr>"),i=o.clone().startOf("w").startOf("d");for(r.calendarWeeks===!0&&t.append(n("<th>").addClass("cw").text("#"));i.isBefore(o.clone().endOf("w"));)t.append(n("<th>").addClass("dow").text(i.format("dd"))),i.add(1,"d");f.find(".datepicker-days thead").append(t)},li=function(n){return r.disabledDates[n.format("YYYY-MM-DD")]===!0},ai=function(n){return r.enabledDates[n.format("YYYY-MM-DD")]===!0},vi=function(n){return r.disabledHours[n.format("H")]===!0},yi=function(n){return r.enabledHours[n.format("H")]===!0},c=function(t,i){if(!t.isValid()||r.disabledDates&&"d"===i&&li(t)||r.enabledDates&&"d"===i&&!ai(t)||r.minDate&&t.isBefore(r.minDate,i)||r.maxDate&&t.isAfter(r.maxDate,i)||r.daysOfWeekDisabled&&"d"===i&&-1!==r.daysOfWeekDisabled.indexOf(t.day())||r.disabledHours&&("h"===i||"m"===i||"s"===i)&&vi(t)||r.enabledHours&&("h"===i||"m"===i||"s"===i)&&!yi(t))return!1;if(r.disabledTimeIntervals&&("h"===i||"m"===i||"s"===i)){var u=!1;if(n.each(r.disabledTimeIntervals,function(){if(t.isBetween(this[0],this[1]))return(u=!0,!1)}),u)return!1}return!0},pi=function(){for(var i=[],t=o.clone().startOf("y").startOf("d");t.isSame(o,"y");)i.push(n("<span>").attr("data-action","selectMonth").addClass("month").text(t.format("MMM"))),t.add(1,"M");f.find(".datepicker-months td").empty().append(i)},wi=function(){var i=f.find(".datepicker-months"),t=i.find("th"),r=i.find("tbody").find("span");t.eq(0).find("span").attr("title","Previous Year");t.eq(1).attr("title","Select Year");t.eq(2).find("span").attr("title","Next Year");i.find(".disabled").removeClass("disabled");c(o.clone().subtract(1,"y"),"y")||t.eq(0).addClass("disabled");t.eq(1).text(o.year());c(o.clone().add(1,"y"),"y")||t.eq(2).addClass("disabled");r.removeClass("active");e.isSame(o,"y")&&!d&&r.eq(e.month()).addClass("active");r.each(function(t){c(o.clone().month(t),"M")||n(this).addClass("disabled")})},bi=function(){var i=f.find(".datepicker-years"),t=i.find("th"),n=o.clone().subtract(5,"y"),u=o.clone().add(6,"y"),s="";for(t.eq(0).find("span").attr("title","Previous Decade"),t.eq(1).attr("title","Select Decade"),t.eq(2).find("span").attr("title","Next Decade"),i.find(".disabled").removeClass("disabled"),r.minDate&&r.minDate.isAfter(n,"y")&&t.eq(0).addClass("disabled"),t.eq(1).text(n.year()+"-"+u.year()),r.maxDate&&r.maxDate.isBefore(u,"y")&&t.eq(2).addClass("disabled");!n.isAfter(u,"y");)s+='<span data-action="selectYear" class="year'+(n.isSame(e,"y")&&!d?" active":"")+(c(n,"y")?"":" disabled")+'">'+n.year()+"<\/span>",n.add(1,"y");i.find("td").html(s)},ki=function(){var u=f.find(".datepicker-decades"),i=u.find("th"),n=t(o.isBefore(t({y:1999}))?{y:1899}:{y:1999}),s=n.clone().add(100,"y"),h="";for(i.eq(0).find("span").attr("title","Previous Century"),i.eq(2).find("span").attr("title","Next Century"),u.find(".disabled").removeClass("disabled"),(n.isSame(t({y:1900}))||r.minDate&&r.minDate.isAfter(n,"y"))&&i.eq(0).addClass("disabled"),i.eq(1).text(n.year()+"-"+s.year()),(n.isSame(t({y:2e3}))||r.maxDate&&r.maxDate.isBefore(s,"y"))&&i.eq(2).addClass("disabled");!n.isAfter(s,"y");)h+='<span data-action="selectDecade" class="decade'+(n.isSame(e,"y")?" active":"")+(c(n,"y")?"":" disabled")+'" data-selection="'+(n.year()+6)+'">'+(n.year()+1)+" - "+(n.year()+12)+"<\/span>",n.add(12,"y");h+="<span><\/span><span><\/span><span><\/span>";u.find("td").html(h)},ft=function(){var i,h,u,l,a=f.find(".datepicker-days"),s=a.find("th"),v=[];if(ht()){for(s.eq(0).find("span").attr("title","Previous Month"),s.eq(1).attr("title","Select Month"),s.eq(2).find("span").attr("title","Next Month"),a.find(".disabled").removeClass("disabled"),s.eq(1).text(o.format(r.dayViewHeaderFormat)),c(o.clone().subtract(1,"M"),"M")||s.eq(0).addClass("disabled"),c(o.clone().add(1,"M"),"M")||s.eq(2).addClass("disabled"),i=o.clone().startOf("M").startOf("w").startOf("d"),l=0;42>l;l++)0===i.weekday()&&(h=n("<tr>"),r.calendarWeeks&&h.append('<td class="cw">'+i.week()+"<\/td>"),v.push(h)),u="",i.isBefore(o,"M")&&(u+=" old"),i.isAfter(o,"M")&&(u+=" new"),i.isSame(e,"d")&&!d&&(u+=" active"),c(i,"d")||(u+=" disabled"),i.isSame(t(),"d")&&(u+=" today"),(0===i.day()||6===i.day())&&(u+=" weekend"),h.append('<td data-action="selectDay" data-day="'+i.format("L")+'" class="day'+u+'">'+i.date()+"<\/td>"),i.add(1,"d");a.find("tbody").empty().append(v);wi();bi();ki()}},di=function(){var u=f.find(".timepicker-hours table"),t=o.clone().startOf("d"),r=[],i=n("<tr>");for(o.hour()>11&&!k&&t.hour(12);t.isSame(o,"d")&&(k||o.hour()<12&&t.hour()<12||o.hour()>11);)t.hour()%4==0&&(i=n("<tr>"),r.push(i)),i.append('<td data-action="selectHour" class="hour'+(c(t,"h")?"":" disabled")+'">'+t.format(k?"HH":"hh")+"<\/td>"),t.add(1,"h");u.empty().append(r)},gi=function(){for(var s=f.find(".timepicker-minutes table"),t=o.clone().startOf("h"),u=[],i=n("<tr>"),e=1===r.stepping?5:r.stepping;o.isSame(t,"h");)t.minute()%(4*e)==0&&(i=n("<tr>"),u.push(i)),i.append('<td data-action="selectMinute" class="minute'+(c(t,"m")?"":" disabled")+'">'+t.format("mm")+"<\/td>"),t.add(e,"m");s.empty().append(u)},nr=function(){for(var u=f.find(".timepicker-seconds table"),t=o.clone().startOf("m"),r=[],i=n("<tr>");o.isSame(t,"m");)t.second()%20==0&&(i=n("<tr>"),r.push(i)),i.append('<td data-action="selectSecond" class="second'+(c(t,"s")?"":" disabled")+'">'+t.format("ss")+"<\/td>"),t.add(5,"s");u.empty().append(r)},tr=function(){var n,i,t=f.find(".timepicker span[data-time-component]");k||(n=f.find(".timepicker [data-action=togglePeriod]"),i=e.clone().add(e.hours()>=12?-12:12,"h"),n.text(e.format("A")),c(i,"h")?n.removeClass("disabled"):n.addClass("disabled"));t.filter("[data-time-component=hours]").text(e.format(k?"HH":"hh"));t.filter("[data-time-component=minutes]").text(e.format("mm"));t.filter("[data-time-component=seconds]").text(e.format("ss"));di();gi();nr()},a=function(){f&&(ft(),tr())},h=function(n){var t=d?null:e;return n?(n=n.clone().locale(r.locale),1!==r.stepping&&n.minutes(Math.round(n.minutes()/r.stepping)*r.stepping%60).seconds(0),void(c(n)?(e=n,o=e.clone(),s.val(e.format(y)),i.data("date",e.format(y)),d=!1,a(),it({type:"dp.change",date:e.clone(),oldDate:t})):(r.keepInvalid||s.val(d?"":e.format(y)),it({type:"dp.error",date:n})))):(d=!0,s.val(""),i.data("date",""),it({type:"dp.change",date:!1,oldDate:t}),void a())},v=function(){var t=!1;return f?(f.find(".collapse").each(function(){var i=n(this).data("collapse");return i&&i.transitioning?(t=!0,!1):!0}),t?u:(l&&l.hasClass("btn")&&l.toggleClass("active"),f.hide(),n(window).off("resize",vt),f.off("click","[data-action]"),f.off("mousedown",!1),f.remove(),f=!1,it({type:"dp.hide",date:e.clone()}),u)):u},dt=function(){h(null)},ct={next:function(){var n=et[b].navFnc;o.add(et[b].navStep,n);ft();rt(n)},previous:function(){var n=et[b].navFnc;o.subtract(et[b].navStep,n);ft();rt(n)},pickerSwitch:function(){ut(1)},selectMonth:function(t){var i=n(t.target).closest("tbody").find("span").index(n(t.target));o.month(i);b===g?(h(e.clone().year(o.year()).month(o.month())),r.inline||v()):(ut(-1),ft());rt("M")},selectYear:function(t){var i=parseInt(n(t.target).text(),10)||0;o.year(i);b===g?(h(e.clone().year(o.year())),r.inline||v()):(ut(-1),ft());rt("YYYY")},selectDecade:function(t){var i=parseInt(n(t.target).data("selection"),10)||0;o.year(i);b===g?(h(e.clone().year(o.year())),r.inline||v()):(ut(-1),ft());rt("YYYY")},selectDay:function(t){var i=o.clone();n(t.target).is(".old")&&i.subtract(1,"M");n(t.target).is(".new")&&i.add(1,"M");h(i.date(parseInt(n(t.target).text(),10)));st()||r.keepOpen||r.inline||v()},incrementHours:function(){var n=e.clone().add(1,"h");c(n,"h")&&h(n)},incrementMinutes:function(){var n=e.clone().add(r.stepping,"m");c(n,"m")&&h(n)},incrementSeconds:function(){var n=e.clone().add(1,"s");c(n,"s")&&h(n)},decrementHours:function(){var n=e.clone().subtract(1,"h");c(n,"h")&&h(n)},decrementMinutes:function(){var n=e.clone().subtract(r.stepping,"m");c(n,"m")&&h(n)},decrementSeconds:function(){var n=e.clone().subtract(1,"s");c(n,"s")&&h(n)},togglePeriod:function(){h(e.clone().add(e.hours()>=12?-12:12,"h"))},togglePicker:function(t){var f,u=n(t.target),e=u.closest("ul"),i=e.find(".in"),o=e.find(".collapse:not(.in)");if(i&&i.length){if(f=i.data("collapse"),f&&f.transitioning)return;i.collapse?(i.collapse("hide"),o.collapse("show")):(i.removeClass("in"),o.addClass("in"));u.is("span")?u.toggleClass(r.icons.time+" "+r.icons.date):u.find("span").toggleClass(r.icons.time+" "+r.icons.date)}},showPicker:function(){f.find(".timepicker > div:not(.timepicker-picker)").hide();f.find(".timepicker .timepicker-picker").show()},showHours:function(){f.find(".timepicker .timepicker-picker").hide();f.find(".timepicker .timepicker-hours").show()},showMinutes:function(){f.find(".timepicker .timepicker-picker").hide();f.find(".timepicker .timepicker-minutes").show()},showSeconds:function(){f.find(".timepicker .timepicker-picker").hide();f.find(".timepicker .timepicker-seconds").show()},selectHour:function(t){var i=parseInt(n(t.target).text(),10);k||(e.hours()>=12?12!==i&&(i+=12):12===i&&(i=0));h(e.clone().hours(i));ct.showPicker.call(u)},selectMinute:function(t){h(e.clone().minutes(parseInt(n(t.target).text(),10)));ct.showPicker.call(u)},selectSecond:function(t){h(e.clone().seconds(parseInt(n(t.target).text(),10)));ct.showPicker.call(u)},clear:dt,today:function(){c(t(),"d")&&h(t())},close:v},ir=function(t){return n(t.currentTarget).is(".disabled")?!1:(ct[n(t.currentTarget).data("action")].apply(u,arguments),!1)},w=function(){var i,e={year:function(n){return n.month(0).date(1).hours(0).seconds(0).minutes(0)},month:function(n){return n.date(1).hours(0).seconds(0).minutes(0)},day:function(n){return n.hours(0).seconds(0).minutes(0)},hour:function(n){return n.seconds(0).minutes(0)},minute:function(n){return n.seconds(0)}};return s.prop("disabled")||!r.ignoreReadonly&&s.prop("readonly")||f?u:(void 0!==s.val()&&0!==s.val().trim().length?h(nt(s.val().trim())):r.useCurrent&&d&&(s.is("input")&&0===s.val().trim().length||r.inline)&&(i=t(),"string"==typeof r.useCurrent&&(i=e[r.useCurrent](i)),h(i)),f=si(),ci(),pi(),f.find(".timepicker-hours").hide(),f.find(".timepicker-minutes").hide(),f.find(".timepicker-seconds").hide(),a(),ut(),n(window).on("resize",vt),f.on("click","[data-action]",ir),f.on("mousedown",!1),l&&l.hasClass("btn")&&l.toggleClass("active"),f.show(),vt(),r.focusOnShow&&!s.is(":focus")&&s.focus(),it({type:"dp.show"}),u)},yt=function(){return f?v():w()},nt=function(n){return n=t.isMoment(n)||n instanceof Date?t(n):t(n,tt,r.useStrict),n.locale(r.locale),n},gt=function(n){var t,e,i,o,s=null,c=[],l={},h=n.which,a="p";ot[h]=a;for(t in ot)ot.hasOwnProperty(t)&&ot[t]===a&&(c.push(t),parseInt(t,10)!==h&&(l[t]=!0));for(t in r.keyBinds)if(r.keyBinds.hasOwnProperty(t)&&"function"==typeof r.keyBinds[t]&&(i=t.split(" "),i.length===c.length&&kt[h]===i[i.length-1])){for(o=!0,e=i.length-2;e>=0;e--)if(!(kt[i[e]]in l)){o=!1;break}if(o){s=r.keyBinds[t];break}}s&&(s.call(u,f),n.stopPropagation(),n.preventDefault())},ni=function(n){ot[n.which]="r";n.stopPropagation();n.preventDefault()},ti=function(t){var i=n(t.target).val().trim(),r=i?nt(i):null;return h(r),t.stopImmediatePropagation(),!1},rr=function(){s.on({change:ti,blur:r.debug?"":v,keydown:gt,keyup:ni,focus:r.allowInputToggle?w:""});i.is("input")?s.on({focus:w}):l&&(l.on("click",yt),l.on("mousedown",!1))},ur=function(){s.off({change:ti,blur:v,keydown:gt,keyup:ni,focus:r.allowInputToggle?v:""});i.is("input")?s.off({focus:w}):l&&(l.off("click",yt),l.off("mousedown",!1))},ii=function(t){var i={};return n.each(t,function(){var n=nt(this);n.isValid()&&(i[n.format("YYYY-MM-DD")]=!0)}),Object.keys(i).length?i:!1},ri=function(t){var i={};return n.each(t,function(){i[this]=!0}),Object.keys(i).length?i:!1},lt=function(){var n=r.format||"L LT";y=n.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(n){var t=e.localeData().longDateFormat(n)||n;return t.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(n){return e.localeData().longDateFormat(n)||n})});tt=r.extraFormats?r.extraFormats.slice():[];tt.indexOf(n)<0&&tt.indexOf(y)<0&&tt.push(y);k=y.toLowerCase().indexOf("a")<1&&y.replace(/\[.*?\]/g,"").indexOf("h")<1;p("y")&&(g=2);p("M")&&(g=1);p("d")&&(g=0);b=Math.max(g,b);d||h(e)};if(u.destroy=function(){v();ur();i.removeData("DateTimePicker");i.removeData("date")},u.toggle=yt,u.show=w,u.hide=v,u.disable=function(){return v(),l&&l.hasClass("btn")&&l.addClass("disabled"),s.prop("disabled",!0),u},u.enable=function(){return l&&l.hasClass("btn")&&l.removeClass("disabled"),s.prop("disabled",!1),u},u.ignoreReadonly=function(n){if(0===arguments.length)return r.ignoreReadonly;if("boolean"!=typeof n)throw new TypeError("ignoreReadonly () expects a boolean parameter");return r.ignoreReadonly=n,u},u.options=function(t){if(0===arguments.length)return n.extend(!0,{},r);if(!(t instanceof Object))throw new TypeError("options() options parameter should be an object");return n.extend(!0,r,t),n.each(r,function(n,t){if(void 0===u[n])throw new TypeError("option "+n+" is not recognized!");u[n](t)}),u},u.date=function(n){if(0===arguments.length)return d?null:e.clone();if(!(null===n||"string"==typeof n||t.isMoment(n)||n instanceof Date))throw new TypeError("date() parameter must be one of [null, string, moment or Date]");return h(null===n?null:nt(n)),u},u.format=function(n){if(0===arguments.length)return r.format;if("string"!=typeof n&&("boolean"!=typeof n||n!==!1))throw new TypeError("format() expects a sting or boolean:false parameter "+n);return r.format=n,y&&lt(),u},u.dayViewHeaderFormat=function(n){if(0===arguments.length)return r.dayViewHeaderFormat;if("string"!=typeof n)throw new TypeError("dayViewHeaderFormat() expects a string parameter");return r.dayViewHeaderFormat=n,u},u.extraFormats=function(n){if(0===arguments.length)return r.extraFormats;if(n!==!1&&!(n instanceof Array))throw new TypeError("extraFormats() expects an array or false parameter");return r.extraFormats=n,tt&&lt(),u},u.disabledDates=function(t){if(0===arguments.length)return r.disabledDates?n.extend({},r.disabledDates):r.disabledDates;if(!t)return r.disabledDates=!1,a(),u;if(!(t instanceof Array))throw new TypeError("disabledDates() expects an array parameter");return r.disabledDates=ii(t),r.enabledDates=!1,a(),u},u.enabledDates=function(t){if(0===arguments.length)return r.enabledDates?n.extend({},r.enabledDates):r.enabledDates;if(!t)return r.enabledDates=!1,a(),u;if(!(t instanceof Array))throw new TypeError("enabledDates() expects an array parameter");return r.enabledDates=ii(t),r.disabledDates=!1,a(),u},u.daysOfWeekDisabled=function(n){if(0===arguments.length)return r.daysOfWeekDisabled.splice(0);if("boolean"==typeof n&&!n)return r.daysOfWeekDisabled=!1,a(),u;if(!(n instanceof Array))throw new TypeError("daysOfWeekDisabled() expects an array parameter");if(r.daysOfWeekDisabled=n.reduce(function(n,t){return t=parseInt(t,10),t>6||0>t||isNaN(t)?n:(-1===n.indexOf(t)&&n.push(t),n)},[]).sort(),r.useCurrent&&!r.keepInvalid){for(var t=0;!c(e,"d");){if(e.add(1,"d"),7===t)throw"Tried 7 times to find a valid date";t++}h(e)}return a(),u},u.maxDate=function(n){if(0===arguments.length)return r.maxDate?r.maxDate.clone():r.maxDate;if("boolean"==typeof n&&n===!1)return r.maxDate=!1,a(),u;"string"==typeof n&&("now"===n||"moment"===n)&&(n=t());var i=nt(n);if(!i.isValid())throw new TypeError("maxDate() Could not parse date parameter: "+n);if(r.minDate&&i.isBefore(r.minDate))throw new TypeError("maxDate() date parameter is before options.minDate: "+i.format(y));return r.maxDate=i,r.useCurrent&&!r.keepInvalid&&e.isAfter(n)&&h(r.maxDate),o.isAfter(i)&&(o=i.clone()),a(),u},u.minDate=function(n){if(0===arguments.length)return r.minDate?r.minDate.clone():r.minDate;if("boolean"==typeof n&&n===!1)return r.minDate=!1,a(),u;"string"==typeof n&&("now"===n||"moment"===n)&&(n=t());var i=nt(n);if(!i.isValid())throw new TypeError("minDate() Could not parse date parameter: "+n);if(r.maxDate&&i.isAfter(r.maxDate))throw new TypeError("minDate() date parameter is after options.maxDate: "+i.format(y));return r.minDate=i,r.useCurrent&&!r.keepInvalid&&e.isBefore(n)&&h(r.minDate),o.isBefore(i)&&(o=i.clone()),a(),u},u.defaultDate=function(n){if(0===arguments.length)return r.defaultDate?r.defaultDate.clone():r.defaultDate;if(!n)return r.defaultDate=!1,u;"string"==typeof n&&("now"===n||"moment"===n)&&(n=t());var i=nt(n);if(!i.isValid())throw new TypeError("defaultDate() Could not parse date parameter: "+n);if(!c(i))throw new TypeError("defaultDate() date passed is invalid according to component setup validations");return r.defaultDate=i,(r.defaultDate&&r.inline||""===s.val().trim()&&void 0===s.attr("placeholder"))&&h(r.defaultDate),u},u.locale=function(n){if(0===arguments.length)return r.locale;if(!t.localeData(n))throw new TypeError("locale() locale "+n+" is not loaded from moment locales!");return r.locale=n,e.locale(r.locale),o.locale(r.locale),y&&lt(),f&&(v(),w()),u},u.stepping=function(n){return 0===arguments.length?r.stepping:(n=parseInt(n,10),(isNaN(n)||1>n)&&(n=1),r.stepping=n,u)},u.useCurrent=function(n){var t=["year","month","day","hour","minute"];if(0===arguments.length)return r.useCurrent;if("boolean"!=typeof n&&"string"!=typeof n)throw new TypeError("useCurrent() expects a boolean or string parameter");if("string"==typeof n&&-1===t.indexOf(n.toLowerCase()))throw new TypeError("useCurrent() expects a string parameter of "+t.join(", "));return r.useCurrent=n,u},u.collapse=function(n){if(0===arguments.length)return r.collapse;if("boolean"!=typeof n)throw new TypeError("collapse() expects a boolean parameter");return r.collapse===n?u:(r.collapse=n,f&&(v(),w()),u)},u.icons=function(t){if(0===arguments.length)return n.extend({},r.icons);if(!(t instanceof Object))throw new TypeError("icons() expects parameter to be an Object");return n.extend(r.icons,t),f&&(v(),w()),u},u.useStrict=function(n){if(0===arguments.length)return r.useStrict;if("boolean"!=typeof n)throw new TypeError("useStrict() expects a boolean parameter");return r.useStrict=n,u},u.sideBySide=function(n){if(0===arguments.length)return r.sideBySide;if("boolean"!=typeof n)throw new TypeError("sideBySide() expects a boolean parameter");return r.sideBySide=n,f&&(v(),w()),u},u.viewMode=function(n){if(0===arguments.length)return r.viewMode;if("string"!=typeof n)throw new TypeError("viewMode() expects a string parameter");if(-1===at.indexOf(n))throw new TypeError("viewMode() parameter must be one of ("+at.join(", ")+") value");return r.viewMode=n,b=Math.max(at.indexOf(n),g),ut(),u},u.toolbarPlacement=function(n){if(0===arguments.length)return r.toolbarPlacement;if("string"!=typeof n)throw new TypeError("toolbarPlacement() expects a string parameter");if(-1===bt.indexOf(n))throw new TypeError("toolbarPlacement() parameter must be one of ("+bt.join(", ")+") value");return r.toolbarPlacement=n,f&&(v(),w()),u},u.widgetPositioning=function(t){if(0===arguments.length)return n.extend({},r.widgetPositioning);if("[object Object]"!=={}.toString.call(t))throw new TypeError("widgetPositioning() expects an object variable");if(t.horizontal){if("string"!=typeof t.horizontal)throw new TypeError("widgetPositioning() horizontal variable must be a string");if(t.horizontal=t.horizontal.toLowerCase(),-1===wt.indexOf(t.horizontal))throw new TypeError("widgetPositioning() expects horizontal parameter to be one of ("+wt.join(", ")+")");r.widgetPositioning.horizontal=t.horizontal}if(t.vertical){if("string"!=typeof t.vertical)throw new TypeError("widgetPositioning() vertical variable must be a string");if(t.vertical=t.vertical.toLowerCase(),-1===pt.indexOf(t.vertical))throw new TypeError("widgetPositioning() expects vertical parameter to be one of ("+pt.join(", ")+")");r.widgetPositioning.vertical=t.vertical}return a(),u},u.calendarWeeks=function(n){if(0===arguments.length)return r.calendarWeeks;if("boolean"!=typeof n)throw new TypeError("calendarWeeks() expects parameter to be a boolean value");return r.calendarWeeks=n,a(),u},u.showTodayButton=function(n){if(0===arguments.length)return r.showTodayButton;if("boolean"!=typeof n)throw new TypeError("showTodayButton() expects a boolean parameter");return r.showTodayButton=n,f&&(v(),w()),u},u.showClear=function(n){if(0===arguments.length)return r.showClear;if("boolean"!=typeof n)throw new TypeError("showClear() expects a boolean parameter");return r.showClear=n,f&&(v(),w()),u},u.widgetParent=function(t){if(0===arguments.length)return r.widgetParent;if("string"==typeof t&&(t=n(t)),null!==t&&"string"!=typeof t&&!(t instanceof n))throw new TypeError("widgetParent() expects a string or a jQuery object parameter");return r.widgetParent=t,f&&(v(),w()),u},u.keepOpen=function(n){if(0===arguments.length)return r.keepOpen;if("boolean"!=typeof n)throw new TypeError("keepOpen() expects a boolean parameter");return r.keepOpen=n,u},u.focusOnShow=function(n){if(0===arguments.length)return r.focusOnShow;if("boolean"!=typeof n)throw new TypeError("focusOnShow() expects a boolean parameter");return r.focusOnShow=n,u},u.inline=function(n){if(0===arguments.length)return r.inline;if("boolean"!=typeof n)throw new TypeError("inline() expects a boolean parameter");return r.inline=n,u},u.clear=function(){return dt(),u},u.keyBinds=function(n){return r.keyBinds=n,u},u.debug=function(n){if("boolean"!=typeof n)throw new TypeError("debug() expects a boolean parameter");return r.debug=n,u},u.allowInputToggle=function(n){if(0===arguments.length)return r.allowInputToggle;if("boolean"!=typeof n)throw new TypeError("allowInputToggle() expects a boolean parameter");return r.allowInputToggle=n,u},u.showClose=function(n){if(0===arguments.length)return r.showClose;if("boolean"!=typeof n)throw new TypeError("showClose() expects a boolean parameter");return r.showClose=n,u},u.keepInvalid=function(n){if(0===arguments.length)return r.keepInvalid;if("boolean"!=typeof n)throw new TypeError("keepInvalid() expects a boolean parameter");return r.keepInvalid=n,u},u.datepickerInput=function(n){if(0===arguments.length)return r.datepickerInput;if("string"!=typeof n)throw new TypeError("datepickerInput() expects a string parameter");return r.datepickerInput=n,u},u.disabledTimeIntervals=function(t){if(0===arguments.length)return r.disabledTimeIntervals?n.extend({},r.disabledTimeIntervals):r.disabledTimeIntervals;if(!t)return r.disabledTimeIntervals=!1,a(),u;if(!(t instanceof Array))throw new TypeError("disabledTimeIntervals() expects an array parameter");return r.disabledTimeIntervals=t,a(),u},u.disabledHours=function(t){if(0===arguments.length)return r.disabledHours?n.extend({},r.disabledHours):r.disabledHours;if(!t)return r.disabledHours=!1,a(),u;if(!(t instanceof Array))throw new TypeError("disabledHours() expects an array parameter");if(r.disabledHours=ri(t),r.enabledHours=!1,r.useCurrent&&!r.keepInvalid){for(var i=0;!c(e,"h");){if(e.add(1,"h"),24===i)throw"Tried 24 times to find a valid date";i++}h(e)}return a(),u},u.enabledHours=function(t){if(0===arguments.length)return r.enabledHours?n.extend({},r.enabledHours):r.enabledHours;if(!t)return r.enabledHours=!1,a(),u;if(!(t instanceof Array))throw new TypeError("enabledHours() expects an array parameter");if(r.enabledHours=ri(t),r.disabledHours=!1,r.useCurrent&&!r.keepInvalid){for(var i=0;!c(e,"h");){if(e.add(1,"h"),24===i)throw"Tried 24 times to find a valid date";i++}h(e)}return a(),u},u.viewDate=function(n){if(0===arguments.length)return o.clone();if(!n)return o=e.clone(),u;if(!("string"==typeof n||t.isMoment(n)||n instanceof Date))throw new TypeError("viewDate() parameter must be one of [string, moment or Date]");return o=nt(n),rt(),u},i.is("input"))s=i;else if(s=i.find(r.datepickerInput),0===s.size())s=i.find("input");else if(!s.is("input"))throw new Error('CSS class "'+r.datepickerInput+'" cannot be applied to non input element');if(i.hasClass("input-group")&&(l=0===i.find(".datepickerbutton").size()?i.find('[class^="input-group-"]'):i.find(".datepickerbutton")),!r.inline&&!s.is("input"))throw new Error("Could not initialize DateTimePicker without an input element");return n.extend(!0,r,hi()),u.options(r),lt(),rr(),s.prop("disabled")&&u.disable(),s.is("input")&&0!==s.val().trim().length?h(nt(s.val().trim())):r.defaultDate&&void 0===s.attr("placeholder")&&h(r.defaultDate),r.inline&&w(),u};n.fn.datetimepicker=function(t){return this.each(function(){var r=n(this);r.data("DateTimePicker")||(t=n.extend(!0,{},n.fn.datetimepicker.defaults,t),r.data("DateTimePicker",i(r,t)))})};n.fn.datetimepicker.defaults={format:!1,dayViewHeaderFormat:"MMMM YYYY",extraFormats:!1,stepping:1,minDate:!1,maxDate:!1,useCurrent:!0,collapse:!0,locale:t.locale(),defaultDate:!1,disabledDates:!1,enabledDates:!1,icons:{time:"glyphicon glyphicon-time",date:"glyphicon glyphicon-calendar",up:"glyphicon glyphicon-chevron-up",down:"glyphicon glyphicon-chevron-down",previous:"glyphicon glyphicon-chevron-left",next:"glyphicon glyphicon-chevron-right",today:"glyphicon glyphicon-screenshot",clear:"glyphicon glyphicon-trash",close:"glyphicon glyphicon-remove"},useStrict:!1,sideBySide:!1,daysOfWeekDisabled:!1,calendarWeeks:!1,viewMode:"days",toolbarPlacement:"default",showTodayButton:!1,showClear:!1,showClose:!1,widgetPositioning:{horizontal:"auto",vertical:"auto"},widgetParent:null,ignoreReadonly:!1,keepOpen:!1,focusOnShow:!0,inline:!1,keepInvalid:!1,datepickerInput:".datepickerinput",keyBinds:{up:function(n){if(n){var i=this.date()||t();n.find(".datepicker").is(":visible")?this.date(i.clone().subtract(7,"d")):this.date(i.clone().add(1,"m"))}},down:function(n){if(!n)return void this.show();var i=this.date()||t();n.find(".datepicker").is(":visible")?this.date(i.clone().add(7,"d")):this.date(i.clone().subtract(1,"m"))},"control up":function(n){if(n){var i=this.date()||t();n.find(".datepicker").is(":visible")?this.date(i.clone().subtract(1,"y")):this.date(i.clone().add(1,"h"))}},"control down":function(n){if(n){var i=this.date()||t();n.find(".datepicker").is(":visible")?this.date(i.clone().add(1,"y")):this.date(i.clone().subtract(1,"h"))}},left:function(n){if(n){var i=this.date()||t();n.find(".datepicker").is(":visible")&&this.date(i.clone().subtract(1,"d"))}},right:function(n){if(n){var i=this.date()||t();n.find(".datepicker").is(":visible")&&this.date(i.clone().add(1,"d"))}},pageUp:function(n){if(n){var i=this.date()||t();n.find(".datepicker").is(":visible")&&this.date(i.clone().subtract(1,"M"))}},pageDown:function(n){if(n){var i=this.date()||t();n.find(".datepicker").is(":visible")&&this.date(i.clone().add(1,"M"))}},enter:function(){this.hide()},escape:function(){this.hide()},"control space":function(n){n.find(".timepicker").is(":visible")&&n.find('.btn[data-action="togglePeriod"]').click()},t:function(){this.date(t())},"delete":function(){this.clear()}},debug:!1,allowInputToggle:!1,disabledTimeIntervals:!1,disabledHours:!1,enabledHours:!1,viewDate:!1}})