!function(a){"use strict";if("function"==typeof define&&define.amd)define(["jquery","moment"],a);else if("object"==typeof exports)a(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";a(jQuery,moment)}}(function(a,b){"use strict";if(!b)throw new Error("bootstrap-datetimepicker requires Moment.js to be loaded first");var c=function(c,d){var i,l,n,o,p,e={},f=b().startOf("d"),g=f.clone(),h=!0,j=!1,k=!1,m=0,q=[{clsName:"days",navFnc:"M",navStep:1},{clsName:"months",navFnc:"y",navStep:1},{clsName:"years",navFnc:"y",navStep:10}],r=["days","months","years"],s=["top","bottom","auto"],t=["left","right","auto"],u=["default","top","bottom"],v={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"},w={},x=function(a){if("string"!=typeof a||a.length>1)throw new TypeError("isEnabled expects a single character string parameter");switch(a){case"y":return n.indexOf("Y")!==-1;case"M":return n.indexOf("M")!==-1;case"d":return n.toLowerCase().indexOf("d")!==-1;case"h":case"H":return n.toLowerCase().indexOf("h")!==-1;case"m":return n.indexOf("m")!==-1;case"s":return n.indexOf("s")!==-1;default:return!1}},y=function(){return x("h")||x("m")||x("s")},z=function(){return x("y")||x("M")||x("d")},A=function(){var b=a("").append(a("").append(a("").addClass("prev").attr("data-action","previous").append(a("").addClass(d.icons.previous))).append(a("").addClass("picker-switch").attr("data-action","pickerSwitch").attr("colspan",d.calendarWeeks?"6":"5")).append(a("").addClass("next").attr("data-action","next").append(a("").addClass(d.icons.next)))),c=a("").append(a("").append(a("").attr("colspan",d.calendarWeeks?"8":"7")));return[a("
").addClass("datepicker-days").append(a("").addClass("table-condensed").append(b).append(a(""))),a("
").addClass("datepicker-months").append(a("
").addClass("table-condensed").append(b.clone()).append(c.clone())),a("
").addClass("datepicker-years").append(a("
").addClass("table-condensed").append(b.clone()).append(c.clone()))]},B=function(){var b=a(""),c=a(""),e=a("");return x("h")&&(b.append(a("
").append(a("").attr({href:"#",tabindex:"-1"}).addClass("btn").attr("data-action","incrementHours").append(a("").addClass(d.icons.up)))),c.append(a("").append(a("").addClass("timepicker-hour").attr("data-time-component","hours").attr("data-action","showHours"))),e.append(a("").append(a("").attr({href:"#",tabindex:"-1"}).addClass("btn").attr("data-action","decrementHours").append(a("").addClass(d.icons.down))))),x("m")&&(x("h")&&(b.append(a("").addClass("separator")),c.append(a("").addClass("separator").html(":")),e.append(a("").addClass("separator"))),b.append(a("").append(a("").attr({href:"#",tabindex:"-1"}).addClass("btn").attr("data-action","incrementMinutes").append(a("").addClass(d.icons.up)))),c.append(a("").append(a("").addClass("timepicker-minute").attr("data-time-component","minutes").attr("data-action","showMinutes"))),e.append(a("").append(a("").attr({href:"#",tabindex:"-1"}).addClass("btn").attr("data-action","decrementMinutes").append(a("").addClass(d.icons.down))))),x("s")&&(x("m")&&(b.append(a("").addClass("separator")),c.append(a("").addClass("separator").html(":")),e.append(a("").addClass("separator"))),b.append(a("").append(a("").attr({href:"#",tabindex:"-1"}).addClass("btn").attr("data-action","incrementSeconds").append(a("").addClass(d.icons.up)))),c.append(a("").append(a("").addClass("timepicker-second").attr("data-time-component","seconds").attr("data-action","showSeconds"))),e.append(a("").append(a("").attr({href:"#",tabindex:"-1"}).addClass("btn").attr("data-action","decrementSeconds").append(a("").addClass(d.icons.down))))),l||(b.append(a("").addClass("separator")),c.append(a("").append(a("").addClass("separator"))),a("
").addClass("timepicker-picker").append(a("").addClass("table-condensed").append([b,c,e]))},C=function(){var b=a("
").addClass("timepicker-hours").append(a("
").addClass("table-condensed")),c=a("
").addClass("timepicker-minutes").append(a("
").addClass("table-condensed")),d=a("
").addClass("timepicker-seconds").append(a("
").addClass("table-condensed")),e=[B()];return x("h")&&e.push(b),x("m")&&e.push(c),x("s")&&e.push(d),e},D=function(){var b=[];return d.showTodayButton&&b.push(a("
").append(a("").attr("data-action","today").append(a("").addClass(d.icons.today)))),!d.sideBySide&&z()&&y()&&b.push(a("").append(a("").attr("data-action","togglePicker").append(a("").addClass(d.icons.time)))),d.showClear&&b.push(a("").append(a("").attr("data-action","clear").append(a("").addClass(d.icons.clear)))),d.showClose&&b.push(a("").append(a("").attr("data-action","close").append(a("").addClass(d.icons.close)))),a("").addClass("table-condensed").append(a("").append(a("").append(b)))},E=function(){var b=a("
").addClass("bootstrap-datetimepicker-widget dropdown-menu"),c=a("
").addClass("datepicker").append(A()),e=a("
").addClass("timepicker").append(C()),f=a("
    ").addClass("list-unstyled"),g=a("
  • ").addClass("picker-switch"+(d.collapse?" accordion-toggle":"")).append(D());return d.inline&&b.removeClass("dropdown-menu"),l&&b.addClass("usetwentyfour"),d.sideBySide&&z()&&y()?(b.addClass("timepicker-sbs"),b.append(a("
    ").addClass("row").append(c.addClass("col-sm-6")).append(e.addClass("col-sm-6"))),b.append(g),b):("top"===d.toolbarPlacement&&f.append(g),z()&&f.append(a("
  • ").addClass(d.collapse&&y()?"collapse in":"").append(c)),"default"===d.toolbarPlacement&&f.append(g),y()&&f.append(a("
  • ").addClass(d.collapse&&z()?"collapse":"").append(e)),"bottom"===d.toolbarPlacement&&f.append(g),b.append(f))},F=function(){var b,e={};return b=c.is("input")||d.inline?c.data():c.find("input").data(),b.dateOptions&&b.dateOptions instanceof Object&&(e=a.extend(!0,e,b.dateOptions)),a.each(d,function(a){var c="date"+a.charAt(0).toUpperCase()+a.slice(1);void 0!==b[c]&&(e[a]=b[c])}),e},G=function(){var h,b=(j||c).position(),e=(j||c).offset(),f=d.widgetPositioning.vertical,g=d.widgetPositioning.horizontal;if(d.widgetParent)h=d.widgetParent.append(k);else if(c.is("input"))h=c.parent().append(k);else{if(d.inline)return void(h=c.append(k));h=c,c.children().first().after(k)}if("auto"===f&&(f=e.top+1.5*k.height()>=a(window).height()+a(window).scrollTop()&&k.height()+c.outerHeight()a(window).width()?"right":"left"),"top"===f?k.addClass("top").removeClass("bottom"):k.addClass("bottom").removeClass("top"),"right"===g?k.addClass("pull-right"):k.removeClass("pull-right"),"relative"!==h.css("position")&&(h=h.parents().filter(function(){return"relative"===a(this).css("position")}).first()),0===h.length)throw new Error("datetimepicker component should be placed within a relative positioned container");k.css({top:"top"===f?"auto":b.top+c.outerHeight(),bottom:"top"===f?b.top+c.outerHeight():"auto",left:"left"===g?h.css("padding-left"):"auto",right:"left"===g?"auto":h.width()-c.outerWidth()})},H=function(a){"dp.change"===a.type&&(a.date&&a.date.isSame(a.oldDate)||!a.date&&!a.oldDate)||c.trigger(a)},I=function(a){k&&(a&&(p=Math.max(m,Math.min(2,p+a))),k.find(".datepicker > div").hide().filter(".datepicker-"+q[p].clsName).show())},J=function(){var b=a("
"),c=g.clone().startOf("w");for(d.calendarWeeks===!0&&b.append(a(""),d.calendarWeeks&&l.append('"),j.push(l)),m="",i.isBefore(g,"M")&&(m+=" old"),i.isAfter(g,"M")&&(m+=" new"),i.isSame(f,"d")&&!h&&(m+=" active"),M(i,"d")||(m+=" disabled"),i.isSame(b(),"d")&&(m+=" today"),0!==i.day()&&6!==i.day()||(m+=" weekend"),l.append('"),i.add(1,"d");c.find("tbody").empty().append(j),O(),P()}},R=function(){var b=k.find(".timepicker-hours table"),c=g.clone().startOf("d"),d=[],e=a("");for(g.hour()>11&&!l&&c.hour(12);c.isSame(g,"d")&&(l||g.hour()<12&&c.hour()<12||g.hour()>11);)c.hour()%4===0&&(e=a(""),d.push(e)),e.append('"),c.add(1,"h");b.empty().append(d)},S=function(){for(var b=k.find(".timepicker-minutes table"),c=g.clone().startOf("h"),e=[],f=a(""),h=1===d.stepping?5:d.stepping;g.isSame(c,"h");)c.minute()%(4*h)===0&&(f=a(""),e.push(f)),f.append('"),c.add(h,"m");b.empty().append(e)},T=function(){for(var b=k.find(".timepicker-seconds table"),c=g.clone().startOf("m"),d=[],e=a("");g.isSame(c,"m");)c.second()%20===0&&(e=a(""),d.push(e)),e.append('"),c.add(5,"s");b.empty().append(d)},U=function(){var a=k.find(".timepicker span[data-time-component]");l||k.find(".timepicker [data-action=togglePeriod]").text(f.format("A")),a.filter("[data-time-component=hours]").text(f.format(l?"HH":"hh")),a.filter("[data-time-component=minutes]").text(f.format("mm")),a.filter("[data-time-component=seconds]").text(f.format("ss")),R(),S(),T()},V=function(){k&&(Q(),U())},W=function(a){var b=h?null:f;return a?(a=a.clone().locale(d.locale),1!==d.stepping&&a.minutes(Math.round(a.minutes()/d.stepping)*d.stepping%60).seconds(0),void(M(a)?(f=a,g=f.clone(),i.val(f.format(n)),c.data("date",f.format(n)),V(),h=!1,H({type:"dp.change",date:f.clone(),oldDate:b})):(d.keepInvalid||i.val(h?"":f.format(n)),H({type:"dp.error",date:a})))):(h=!0,i.val(""),c.data("date",""),H({type:"dp.change",date:null,oldDate:b}),void V())},X=function(){var b=!1;return k?(k.find(".collapse").each(function(){var c=a(this).data("collapse");return!c||!c.transitioning||(b=!0,!1)}),b?e:(j&&j.hasClass("btn")&&j.toggleClass("active"),k.hide(),a(window).off("resize",G),k.off("click","[data-action]"),k.off("mousedown",!1),k.remove(),k=!1,H({type:"dp.hide",date:f.clone()}),e)):e},Y=function(){W(null)},Z={next:function(){g.add(q[p].navStep,q[p].navFnc),Q()},previous:function(){g.subtract(q[p].navStep,q[p].navFnc),Q()},pickerSwitch:function(){I(1)},selectMonth:function(b){var c=a(b.target).closest("tbody").find("span").index(a(b.target));g.month(c),p===m?(W(f.clone().year(g.year()).month(g.month())),d.inline||X()):(I(-1),Q())},selectYear:function(b){var c=parseInt(a(b.target).text(),10)||0;g.year(c),p===m?(W(f.clone().year(g.year())),d.inline||X()):(I(-1),Q())},selectDay:function(b){var c=g.clone();a(b.target).is(".old")&&c.subtract(1,"M"),a(b.target).is(".new")&&c.add(1,"M"),W(c.date(parseInt(a(b.target).text(),10))),y()||d.keepOpen||d.inline||X()},incrementHours:function(){W(f.clone().add(1,"h"))},incrementMinutes:function(){W(f.clone().add(d.stepping,"m"))},incrementSeconds:function(){W(f.clone().add(1,"s"))},decrementHours:function(){W(f.clone().subtract(1,"h"))},decrementMinutes:function(){W(f.clone().subtract(d.stepping,"m"))},decrementSeconds:function(){W(f.clone().subtract(1,"s"))},togglePeriod:function(){W(f.clone().add(f.hours()>=12?-12:12,"h"))},togglePicker:function(b){var h,c=a(b.target),e=c.closest("ul"),f=e.find(".in"),g=e.find(".collapse:not(.in)");if(f&&f.length){if(h=f.data("collapse"),h&&h.transitioning)return;f.collapse?(f.collapse("hide"),g.collapse("show")):(f.removeClass("in"),g.addClass("in")),c.is("span")?c.toggleClass(d.icons.time+" "+d.icons.date):c.find("span").toggleClass(d.icons.time+" "+d.icons.date)}},showPicker:function(){k.find(".timepicker > div:not(.timepicker-picker)").hide(),k.find(".timepicker .timepicker-picker").show()},showHours:function(){k.find(".timepicker .timepicker-picker").hide(),k.find(".timepicker .timepicker-hours").show()},showMinutes:function(){k.find(".timepicker .timepicker-picker").hide(),k.find(".timepicker .timepicker-minutes").show()},showSeconds:function(){k.find(".timepicker .timepicker-picker").hide(),k.find(".timepicker .timepicker-seconds").show()},selectHour:function(b){var c=parseInt(a(b.target).text(),10);l||(f.hours()>=12?12!==c&&(c+=12):12===c&&(c=0)),W(f.clone().hours(c)),Z.showPicker.call(e)},selectMinute:function(b){W(f.clone().minutes(parseInt(a(b.target).text(),10))),Z.showPicker.call(e)},selectSecond:function(b){W(f.clone().seconds(parseInt(a(b.target).text(),10))),Z.showPicker.call(e)},clear:Y,today:function(){W(b())},close:X},$=function(b){return!a(b.currentTarget).is(".disabled")&&(Z[a(b.currentTarget).data("action")].apply(e,arguments),!1)},_=function(){var c,f={year:function(a){return a.month(0).date(1).hours(0).seconds(0).minutes(0)},month:function(a){return a.date(1).hours(0).seconds(0).minutes(0)},day:function(a){return a.hours(0).seconds(0).minutes(0)},hour:function(a){return a.seconds(0).minutes(0)},minute:function(a){return a.seconds(0)}};return i.prop("disabled")||!d.ignoreReadonly&&i.prop("readonly")||k?e:(d.useCurrent&&h&&(i.is("input")&&0===i.val().trim().length||d.inline)&&(c=b(),"string"==typeof d.useCurrent&&(c=f[d.useCurrent](c)),W(c)),k=E(),J(),N(),k.find(".timepicker-hours").hide(),k.find(".timepicker-minutes").hide(),k.find(".timepicker-seconds").hide(),V(),I(),a(window).on("resize",G),k.on("click","[data-action]",$),k.on("mousedown",!1),j&&j.hasClass("btn")&&j.toggleClass("active"),k.show(),G(),i.is(":focus")||i.focus(),H({type:"dp.show"}),e)},aa=function(){return k?X():_()},ba=function(a){return a=b.isMoment(a)||a instanceof Date?b(a):b(a,o,d.useStrict),a.locale(d.locale),a},ca=function(a){var c,f,j,l,b=null,g=[],h={},i=a.which,m="p";w[i]=m;for(c in w)w.hasOwnProperty(c)&&w[c]===m&&(g.push(c),parseInt(c,10)!==i&&(h[c]=!0));for(c in d.keyBinds)if(d.keyBinds.hasOwnProperty(c)&&"function"==typeof d.keyBinds[c]&&(j=c.split(" "),j.length===g.length&&v[i]===j[j.length-1])){for(l=!0,f=j.length-2;f>=0;f--)if(!(v[j[f]]in h)){l=!1;break}if(l){b=d.keyBinds[c];break}}b&&(b.call(e,k),a.stopPropagation(),a.preventDefault())},da=function(a){w[a.which]="r",a.stopPropagation(),a.preventDefault()},ea=function(b){var c=a(b.target).val().trim(),d=c?ba(c):null;return W(d),b.stopImmediatePropagation(),!1},fa=function(){i.on({change:ea,blur:d.debug?"":X,keydown:ca,keyup:da}),c.is("input")?i.on({focus:_}):j&&(j.on("click",aa),j.on("mousedown",!1))},ga=function(){i.off({change:ea,blur:X,keydown:ca,keyup:da}),c.is("input")?i.off({focus:_}):j&&(j.off("click",aa),j.off("mousedown",!1))},ha=function(b){var c={};return a.each(b,function(){var a=ba(this);a.isValid()&&(c[a.format("YYYY-MM-DD")]=!0)}),!!Object.keys(c).length&&c},ia=function(){var a=d.format||"L LT";n=a.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(a){var b=f.localeData().longDateFormat(a)||a;return b.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(a){return f.localeData().longDateFormat(a)||a})}),o=d.extraFormats?d.extraFormats.slice():[],o.indexOf(a)<0&&o.indexOf(n)<0&&o.push(n),l=n.toLowerCase().indexOf("a")<1&&n.indexOf("h")<1,x("y")&&(m=2),x("M")&&(m=1),x("d")&&(m=0),p=Math.max(m,p),h||W(f)};if(e.destroy=function(){X(),ga(),c.removeData("DateTimePicker"),c.removeData("date")},e.toggle=aa,e.show=_,e.hide=X,e.disable=function(){return X(),j&&j.hasClass("btn")&&j.addClass("disabled"),i.prop("disabled",!0),e},e.enable=function(){return j&&j.hasClass("btn")&&j.removeClass("disabled"),i.prop("disabled",!1),e},e.ignoreReadonly=function(a){if(0===arguments.length)return d.ignoreReadonly;if("boolean"!=typeof a)throw new TypeError("ignoreReadonly () expects a boolean parameter");return d.ignoreReadonly=a,e},e.options=function(b){if(0===arguments.length)return a.extend(!0,{},d);if(!(b instanceof Object))throw new TypeError("options() options parameter should be an object");return a.extend(!0,d,b),a.each(d,function(a,b){if(void 0===e[a])throw new TypeError("option "+a+" is not recognized!");e[a](b)}),e},e.date=function(a){if(0===arguments.length)return h?null:f.clone();if(!(null===a||"string"==typeof a||b.isMoment(a)||a instanceof Date))throw new TypeError("date() parameter must be one of [null, string, moment or Date]");return W(null===a?null:ba(a)),e},e.format=function(a){if(0===arguments.length)return d.format;if("string"!=typeof a&&("boolean"!=typeof a||a!==!1))throw new TypeError("format() expects a sting or boolean:false parameter "+a);return d.format=a,n&&ia(),e},e.dayViewHeaderFormat=function(a){if(0===arguments.length)return d.dayViewHeaderFormat;if("string"!=typeof a)throw new TypeError("dayViewHeaderFormat() expects a string parameter");return d.dayViewHeaderFormat=a,e},e.extraFormats=function(a){if(0===arguments.length)return d.extraFormats;if(a!==!1&&!(a instanceof Array))throw new TypeError("extraFormats() expects an array or false parameter");return d.extraFormats=a,o&&ia(),e},e.disabledDates=function(b){if(0===arguments.length)return d.disabledDates?a.extend({},d.disabledDates):d.disabledDates;if(!b)return d.disabledDates=!1,V(),e;if(!(b instanceof Array))throw new TypeError("disabledDates() expects an array parameter");return d.disabledDates=ha(b),d.enabledDates=!1,V(),e},e.enabledDates=function(b){if(0===arguments.length)return d.enabledDates?a.extend({},d.enabledDates):d.enabledDates;if(!b)return d.enabledDates=!1,V(),e;if(!(b instanceof Array))throw new TypeError("enabledDates() expects an array parameter");return d.enabledDates=ha(b),d.disabledDates=!1,V(),e},e.daysOfWeekDisabled=function(a){if(0===arguments.length)return d.daysOfWeekDisabled.splice(0);if(!(a instanceof Array))throw new TypeError("daysOfWeekDisabled() expects an array parameter");return d.daysOfWeekDisabled=a.reduce(function(a,b){return b=parseInt(b,10),b>6||b<0||isNaN(b)?a:(a.indexOf(b)===-1&&a.push(b),a)},[]).sort(),V(),e},e.maxDate=function(a){if(0===arguments.length)return d.maxDate?d.maxDate.clone():d.maxDate;if("boolean"==typeof a&&a===!1)return d.maxDate=!1,V(),e;"string"==typeof a&&("now"!==a&&"moment"!==a||(a=b()));var c=ba(a);if(!c.isValid())throw new TypeError("maxDate() Could not parse date parameter: "+a);if(d.minDate&&c.isBefore(d.minDate))throw new TypeError("maxDate() date parameter is before options.minDate: "+c.format(n));return d.maxDate=c,d.maxDate.isBefore(a)&&W(d.maxDate),g.isAfter(c)&&(g=c.clone()),V(),e},e.minDate=function(a){if(0===arguments.length)return d.minDate?d.minDate.clone():d.minDate;if("boolean"==typeof a&&a===!1)return d.minDate=!1,V(),e;"string"==typeof a&&("now"!==a&&"moment"!==a||(a=b()));var c=ba(a);if(!c.isValid())throw new TypeError("minDate() Could not parse date parameter: "+a);if(d.maxDate&&c.isAfter(d.maxDate))throw new TypeError("minDate() date parameter is after options.maxDate: "+c.format(n));return d.minDate=c,d.minDate.isAfter(a)&&W(d.minDate),g.isBefore(c)&&(g=c.clone()),V(),e},e.defaultDate=function(a){if(0===arguments.length)return d.defaultDate?d.defaultDate.clone():d.defaultDate;if(!a)return d.defaultDate=!1,e;"string"==typeof a&&("now"!==a&&"moment"!==a||(a=b()));var c=ba(a);if(!c.isValid())throw new TypeError("defaultDate() Could not parse date parameter: "+a);if(!M(c))throw new TypeError("defaultDate() date passed is invalid according to component setup validations");return d.defaultDate=c,d.defaultDate&&""===i.val().trim()&&void 0===i.attr("placeholder")&&W(d.defaultDate),e},e.locale=function(a){if(0===arguments.length)return d.locale;if(!b.localeData(a))throw new TypeError("locale() locale "+a+" is not loaded from moment locales!");return d.locale=a,f.locale(d.locale),g.locale(d.locale),n&&ia(),k&&(X(),_()),e},e.stepping=function(a){return 0===arguments.length?d.stepping:(a=parseInt(a,10),(isNaN(a)||a<1)&&(a=1),d.stepping=a,e)},e.useCurrent=function(a){var b=["year","month","day","hour","minute"];if(0===arguments.length)return d.useCurrent;if("boolean"!=typeof a&&"string"!=typeof a)throw new TypeError("useCurrent() expects a boolean or string parameter");if("string"==typeof a&&b.indexOf(a.toLowerCase())===-1)throw new TypeError("useCurrent() expects a string parameter of "+b.join(", "));return d.useCurrent=a,e},e.collapse=function(a){if(0===arguments.length)return d.collapse;if("boolean"!=typeof a)throw new TypeError("collapse() expects a boolean parameter");return d.collapse===a?e:(d.collapse=a,k&&(X(),_()),e)},e.icons=function(b){if(0===arguments.length)return a.extend({},d.icons);if(!(b instanceof Object))throw new TypeError("icons() expects parameter to be an Object");return a.extend(d.icons,b),k&&(X(),_()),e},e.useStrict=function(a){if(0===arguments.length)return d.useStrict;if("boolean"!=typeof a)throw new TypeError("useStrict() expects a boolean parameter");return d.useStrict=a,e},e.sideBySide=function(a){if(0===arguments.length)return d.sideBySide;if("boolean"!=typeof a)throw new TypeError("sideBySide() expects a boolean parameter");return d.sideBySide=a,k&&(X(),_()),e},e.viewMode=function(a){if(0===arguments.length)return d.viewMode;if("string"!=typeof a)throw new TypeError("viewMode() expects a string parameter");if(r.indexOf(a)===-1)throw new TypeError("viewMode() parameter must be one of ("+r.join(", ")+") value");return d.viewMode=a,p=Math.max(r.indexOf(a),m),I(),e},e.toolbarPlacement=function(a){if(0===arguments.length)return d.toolbarPlacement;if("string"!=typeof a)throw new TypeError("toolbarPlacement() expects a string parameter");if(u.indexOf(a)===-1)throw new TypeError("toolbarPlacement() parameter must be one of ("+u.join(", ")+") value");return d.toolbarPlacement=a,k&&(X(),_()),e},e.widgetPositioning=function(b){if(0===arguments.length)return a.extend({},d.widgetPositioning);if("[object Object]"!=={}.toString.call(b))throw new TypeError("widgetPositioning() expects an object variable");if(b.horizontal){if("string"!=typeof b.horizontal)throw new TypeError("widgetPositioning() horizontal variable must be a string");if(b.horizontal=b.horizontal.toLowerCase(),t.indexOf(b.horizontal)===-1)throw new TypeError("widgetPositioning() expects horizontal parameter to be one of ("+t.join(", ")+")");d.widgetPositioning.horizontal=b.horizontal}if(b.vertical){if("string"!=typeof b.vertical)throw new TypeError("widgetPositioning() vertical variable must be a string");if(b.vertical=b.vertical.toLowerCase(),s.indexOf(b.vertical)===-1)throw new TypeError("widgetPositioning() expects vertical parameter to be one of ("+s.join(", ")+")");d.widgetPositioning.vertical=b.vertical}return V(),e},e.calendarWeeks=function(a){if(0===arguments.length)return d.calendarWeeks;if("boolean"!=typeof a)throw new TypeError("calendarWeeks() expects parameter to be a boolean value");return d.calendarWeeks=a,V(),e},e.showTodayButton=function(a){if(0===arguments.length)return d.showTodayButton;if("boolean"!=typeof a)throw new TypeError("showTodayButton() expects a boolean parameter");return d.showTodayButton=a,k&&(X(),_()),e},e.showClear=function(a){if(0===arguments.length)return d.showClear;if("boolean"!=typeof a)throw new TypeError("showClear() expects a boolean parameter");return d.showClear=a,k&&(X(),_()),e},e.widgetParent=function(b){if(0===arguments.length)return d.widgetParent;if("string"==typeof b&&(b=a(b)),null!==b&&"string"!=typeof b&&!(b instanceof a))throw new TypeError("widgetParent() expects a string or a jQuery object parameter");return d.widgetParent=b,k&&(X(),_()),e},e.keepOpen=function(a){if(0===arguments.length)return d.keepOpen;if("boolean"!=typeof a)throw new TypeError("keepOpen() expects a boolean parameter");return d.keepOpen=a,e},e.inline=function(a){if(0===arguments.length)return d.inline;if("boolean"!=typeof a)throw new TypeError("inline() expects a boolean parameter");return d.inline=a,e},e.clear=function(){return Y(),e},e.keyBinds=function(a){return d.keyBinds=a,e},e.debug=function(a){if("boolean"!=typeof a)throw new TypeError("debug() expects a boolean parameter");return d.debug=a,e},e.showClose=function(a){if(0===arguments.length)return d.showClose;if("boolean"!=typeof a)throw new TypeError("showClose() expects a boolean parameter");return d.showClose=a,e},e.keepInvalid=function(a){if(0===arguments.length)return d.keepInvalid;if("boolean"!=typeof a)throw new TypeError("keepInvalid() expects a boolean parameter");return d.keepInvalid=a,e},e.datepickerInput=function(a){if(0===arguments.length)return d.datepickerInput;if("string"!=typeof a)throw new TypeError("datepickerInput() expects a string parameter");return d.datepickerInput=a,e},c.is("input"))i=c;else if(i=c.find(d.datepickerInput),0===i.size())i=c.find("input");else if(!i.is("input"))throw new Error('CSS class "'+d.datepickerInput+'" cannot be applied to non input element');if(c.hasClass("input-group")&&(j=0===c.find(".datepickerbutton").size()?c.find('[class^="input-group-"]'):c.find(".datepickerbutton")),!d.inline&&!i.is("input"))throw new Error("Could not initialize DateTimePicker without an input element");return a.extend(!0,d,F()),e.options(d),ia(),fa(),i.prop("disabled")&&e.disable(),i.is("input")&&0!==i.val().trim().length?W(ba(i.val().trim())):d.defaultDate&&void 0===i.attr("placeholder")&&W(d.defaultDate),d.inline&&_(),e};a.fn.datetimepicker=function(b){return this.each(function(){var d=a(this);d.data("DateTimePicker")||(b=a.extend(!0,{},a.fn.datetimepicker.defaults,b),d.data("DateTimePicker",c(d,b)))})},a.fn.datetimepicker.defaults={format:!1,dayViewHeaderFormat:"MMMM YYYY",extraFormats:!1,stepping:1,minDate:!1,maxDate:!1,useCurrent:!0,collapse:!0,locale:b.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:[],calendarWeeks:!1,viewMode:"days",toolbarPlacement:"default",showTodayButton:!1,showClear:!1,showClose:!1,widgetPositioning:{horizontal:"auto",vertical:"auto"},widgetParent:null,ignoreReadonly:!1,keepOpen:!1,inline:!1,keepInvalid:!1,datepickerInput:".datepickerinput",keyBinds:{up:function(a){if(a){var c=this.date()||b();a.find(".datepicker").is(":visible")?this.date(c.clone().subtract(7,"d")):this.date(c.clone().add(1,"m"))}},down:function(a){if(!a)return void this.show();var c=this.date()||b();a.find(".datepicker").is(":visible")?this.date(c.clone().add(7,"d")):this.date(c.clone().subtract(1,"m"))},"control up":function(a){if(a){var c=this.date()||b();a.find(".datepicker").is(":visible")?this.date(c.clone().subtract(1,"y")):this.date(c.clone().add(1,"h"))}},"control down":function(a){if(a){var c=this.date()||b();a.find(".datepicker").is(":visible")?this.date(c.clone().add(1,"y")):this.date(c.clone().subtract(1,"h"))}},left:function(a){if(a){var c=this.date()||b();a.find(".datepicker").is(":visible")&&this.date(c.clone().subtract(1,"d"))}},right:function(a){if(a){var c=this.date()||b();a.find(".datepicker").is(":visible")&&this.date(c.clone().add(1,"d"))}},pageUp:function(a){if(a){var c=this.date()||b();a.find(".datepicker").is(":visible")&&this.date(c.clone().subtract(1,"M"))}},pageDown:function(a){if(a){var c=this.date()||b();a.find(".datepicker").is(":visible")&&this.date(c.clone().add(1,"M"))}},enter:function(){this.hide()},escape:function(){this.hide()},"control space":function(a){a.find(".timepicker").is(":visible")&&a.find('.btn[data-action="togglePeriod"]').click()},t:function(){this.date(b())},delete:function(){this.clear()}},debug:!1}});
").addClass("cw").text("#"));c.isBefore(g.clone().endOf("w"));)b.append(a("").addClass("dow").text(c.format("dd"))),c.add(1,"d");k.find(".datepicker-days thead").append(b)},K=function(a){return d.disabledDates[a.format("YYYY-MM-DD")]===!0},L=function(a){return d.enabledDates[a.format("YYYY-MM-DD")]===!0},M=function(a,b){return!!a.isValid()&&((!d.disabledDates||!K(a)||"M"===b)&&(!(d.enabledDates&&!L(a)&&"M"!==b)&&((!d.minDate||!a.isBefore(d.minDate,b))&&((!d.maxDate||!a.isAfter(d.maxDate,b))&&("d"!==b||d.daysOfWeekDisabled.indexOf(a.day())===-1)))))},N=function(){for(var b=[],c=g.clone().startOf("y").hour(12);c.isSame(g,"y");)b.push(a("").attr("data-action","selectMonth").addClass("month").text(c.format("MMM"))),c.add(1,"M");k.find(".datepicker-months td").empty().append(b)},O=function(){var b=k.find(".datepicker-months"),c=b.find("th"),d=b.find("tbody").find("span");b.find(".disabled").removeClass("disabled"),M(g.clone().subtract(1,"y"),"y")||c.eq(0).addClass("disabled"),c.eq(1).text(g.year()),M(g.clone().add(1,"y"),"y")||c.eq(2).addClass("disabled"),d.removeClass("active"),f.isSame(g,"y")&&d.eq(f.month()).addClass("active"),d.each(function(b){M(g.clone().month(b),"M")||a(this).addClass("disabled")})},P=function(){var a=k.find(".datepicker-years"),b=a.find("th"),c=g.clone().subtract(5,"y"),e=g.clone().add(6,"y"),h="";for(a.find(".disabled").removeClass("disabled"),d.minDate&&d.minDate.isAfter(c,"y")&&b.eq(0).addClass("disabled"),b.eq(1).text(c.year()+"-"+e.year()),d.maxDate&&d.maxDate.isBefore(e,"y")&&b.eq(2).addClass("disabled");!c.isAfter(e,"y");)h+=''+c.year()+"",c.add(1,"y");a.find("td").html(h)},Q=function(){var i,l,m,c=k.find(".datepicker-days"),e=c.find("th"),j=[];if(z()){for(c.find(".disabled").removeClass("disabled"),e.eq(1).text(g.format(d.dayViewHeaderFormat)),M(g.clone().subtract(1,"M"),"M")||e.eq(0).addClass("disabled"),M(g.clone().add(1,"M"),"M")||e.eq(2).addClass("disabled"),i=g.clone().startOf("M").startOf("week");!g.clone().endOf("M").endOf("w").isBefore(i,"d");)0===i.weekday()&&(l=a("
'+i.week()+"'+i.date()+"
'+c.format(l?"HH":"hh")+"
'+c.format("mm")+"
'+c.format("ss")+"