text: // https://github.com/Gillardo/bootstrap-ui-datetime-picker
  // Version: 2.6.0
  // Released: 2017-05-12 
  angular.module("ui.bootstrap.datetimepicker",["ui.bootstrap.dateparser","ui.bootstrap.position"]).constant("uiDatetimePickerConfig",{dateFormat:"yyyy-MM-dd HH:mm",defaultTime:"00:00:00",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},initialPicker:"date",reOpenDefault:!1,enableDate:!0,enableTime:!0,buttonBar:{show:!0,now:{show:!0,text:"Now",cls:"btn-sm btn-default"},today:{show:!0,text:"Today",cls:"btn-sm btn-default"},clear:{show:!0,text:"Clear",cls:"btn-sm btn-default"},date:{show:!0,text:"Date",cls:"btn-sm btn-default"},time:{show:!0,text:"Time",cls:"btn-sm btn-default"},close:{show:!0,text:"Close",cls:"btn-sm btn-default"},cancel:{show:!1,text:"Cancel",cls:"btn-sm btn-default"}},closeOnDateSelection:!0,closeOnTimeNow:!0,appendToBody:!1,altInputFormats:[],ngModelOptions:{timezone:null},saveAs:!1,readAs:!1}).controller("DateTimePickerController",["$scope","$element","$attrs","$compile","$parse","$document","$timeout","$uibPosition","dateFilter","uibDateParser","uiDatetimePickerConfig","$rootScope",function(a,b,c,d,e,f,g,h,i,j,k,l){function m(c){var d=v[0],e=b[0].contains(c.target),f=void 0!==d.contains&&d.contains(c.target);!a.isOpen||e||f||a.$apply(function(){a.close(!1)})}function n(c){27===c.which&&a.isOpen?(c.preventDefault(),c.stopPropagation(),a.$apply(function(){a.close(!1)}),b[0].focus()):40!==c.which||a.isOpen||(c.preventDefault(),c.stopPropagation(),a.$apply(function(){a.isOpen=!0}))}function o(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function p(b){var c=j.parse(b,w,a.date);if(isNaN(c))for(var d=0;d<C.length;d++)if(c=j.parse(b,C[d],a.date),!isNaN(c))return c;return c}function q(a){if(angular.isNumber(a)&&!isNaN(a)&&(a=new Date(a)),!a)return null;if(angular.isDate(a)&&!isNaN(a))return a;if(angular.isString(a)){var b=p(a);return isNaN(b)?void 0:j.toTimezone(b,u.timezone)}return void 0}function r(b){return a.datepickerOptions.minDate&&b<a.datepickerOptions.minDate?!1:a.datepickerOptions.maxDate&&b>a.datepickerOptions.maxDate?!1:!0}function s(a,b){var d=a||b;return c.ngRequired||c.required||d?(angular.isNumber(d)&&(d=new Date(d)),d?angular.isDate(d)&&!isNaN(d)?r(d):angular.isDate(new Date(d))&&!isNaN(new Date(d).valueOf())?r(new Date(d)):angular.isString(d)?!isNaN(p(b))&&r(p(b)):!1:!0):!0}var t,u,v,w=k.dateFormat,x={},y=[],z=angular.isDefined(c.closeOnDateSelection)?a.$parent.$eval(c.closeOnDateSelection):k.closeOnDateSelection,A=angular.isDefined(c.closeOnTimeNow)?a.$parent.$eval(c.closeOnTimeNow):k.closeOnTimeNow,B=angular.isDefined(c.datepickerAppendToBody)?a.$parent.$eval(c.datepickerAppendToBody):k.appendToBody,C=angular.isDefined(c.altInputFormats)?a.$parent.$eval(c.altInputFormats):k.altInputFormats,D=angular.isDefined(c.saveAs)?a.$parent.$eval(c.saveAs)||c.saveAs:k.saveAs,E=angular.isDefined(c.readAs)?a.$parent.$eval(c.readAs):k.readAs,F=null;this.init=function(e){function g(a){if(t.$isEmpty(a))return a;var b=new Date(a);return angular.isDate(b)&&!isNaN(b)?b:a}function h(a){return!a||angular.isString(a)||!angular.isDate(a)||isNaN(a)?a:"ISO"===D?a.toISOString():"json"===D?a.toJSON():"number"===D?a.valueOf():i?j.fromTimezone(a,u.timezone).toLocaleString():(w=w.replace(/M!/,"MM").replace(/d!/,"dd"),j.filter(j.fromTimezone(a,u.timezone),w))}if(t=e,u=t.$options||k.ngModelOptions,a.buttonBar=angular.isDefined(c.buttonBar)?a.$parent.$eval(c.buttonBar):k.buttonBar,a.enableDate=angular.isDefined(a.enableDate)?a.enableDate:k.enableDate,a.enableTime=angular.isDefined(a.enableTime)?a.enableTime:k.enableTime,a.initialPicker=angular.isDefined(c.initialPicker)?c.initialPicker:a.enableDate?k.initialPicker:"time",a.reOpenDefault=angular.isDefined(c.reOpenDefault)?c.reOpenDefault:k.reOpenDefault,"date"==a.initialPicker&&!a.enableDate)throw new Error("datetimePicker can't have initialPicker set to date and have enableDate set to false.");a.showPicker=a.enableDate?a.initialPicker:"time";var i=!1;if(k.html5Types[c.type]?(w=k.html5Types[c.type],i=!0):(w=c.datetimePicker||k.dateFormat,c.$observe("datetimePicker",function(a){var b=a||k.dateFormat;if(b!==w&&(w=b,t.$modelValue=null,!w))throw new Error("datetimePicker must have a date format specified.")})),!w)throw new Error("datetimePicker must have a date format specified.");var l=angular.element('<div date-picker-wrap><div uib-datepicker></div></div><div time-picker-wrap><div uib-timepicker style="margin:0 auto"></div></div>');a.ngModelOptions=angular.copy(u),a.ngModelOptions.updateOnDefault===!0&&(a.ngModelOptions.updateOn=a.ngModelOptions.updateOn?a.ngModelOptions.updateOn+" default":"default"),l.attr({"ng-model":"date","ng-model-options":"ngModelOptions","ng-change":"dateSelection(date)"});var m=angular.element(l.children()[0]);a.datepickerOptions||(a.datepickerOptions={}),i&&"month"===c.type&&(a.datepickerOptions.datepickerMode="month",a.datepickerOptions.minMode="month"),m.attr("datepicker-options","datepickerOptions"),angular.isDefined(a.datepickerOptions.datepickerMode)||(a.datepickerOptions.datepickerMode="day");var r=angular.element(l.children()[1]);a.timepickerOptions||(a.timepickerOptions={showMeridian:!0});for(var x in a.timepickerOptions)r.attr(o(x),"timepickerOptions."+x);angular.forEach(["minDate","maxDate","initDate"],function(b){a.datepickerOptions[b]&&("minDate"==b?a.timepickerOptions.min?r.attr("min","timepickerOptions.min"):r.attr("min","datepickerOptions.minDate"):"maxDate"==b&&(a.timepickerOptions.max?r.attr("max","timepickerOptions.max"):r.attr("max","datepickerOptions.maxDate")))}),i?t.$formatters.push(function(b){return a.date=j.fromTimezone(b,u.timezone),b}):(t.$$parserName="datetime",t.$validators.datetime=s,t.$parsers.unshift(q),t.$formatters.push(function(b){return t.$isEmpty(b)?(a.date=b,b):(a.date=j.fromTimezone(b,u.timezone),w=w.replace(/M!/,"MM").replace(/d!/,"dd"),j.filter(a.date,w))})),D&&(angular.isFunction(D)?t.$parsers.push(D):t.$parsers.push(h),angular.isFunction(E)?t.$formatters.push(E):t.$formatters.push(g)),t.$viewChangeListeners.push(function(){if(a.timepickerOptions.min){var b=new Date(a.timepickerOptions.min).getHours(),c=new Date(a.timepickerOptions.min).getMinutes(),d=new Date(a.date);d.setHours(b),d.setMinutes(c),a.timepickerOptions.min=d}if(a.timepickerOptions.max){var e=new Date(a.timepickerOptions.max).getHours(),f=new Date(a.timepickerOptions.max).getMinutes(),g=new Date(a.date);g.setHours(e),g.setMinutes(f),a.timepickerOptions.max=g}a.date=p(t.$viewValue)}),b.bind("keydown",n),v=d(l)(a),l.remove(),B?f.find("body").append(v):b.after(v)},a.getText=function(b){return a.buttonBar[b].text||k.buttonBar[b].text},a.getClass=function(b){return a.buttonBar[b].cls||k.buttonBar[b].cls},a.keydown=function(c){27===c.which&&(c.preventDefault(),c.stopPropagation(),a.close(!1),g(function(){b[0].focus()},0))},a.doShow=function(b){return angular.isDefined(a.buttonBar[b].show)?a.buttonBar[b].show:k.buttonBar[b].show},a.dateSelection=function(d,e){if(a.enableTime&&"time"===a.showPicker)if(d||null!=d){if(angular.isDefined(a.date)&&null!=a.date||(a.date=new Date),d&&null!=d){var f=new Date(a.date);f.setHours(d.getHours()),f.setMinutes(d.getMinutes()),f.setSeconds(d.getSeconds()),f.setMilliseconds(d.getMilliseconds()),d=f}}else a.oldDate=a.date;if(angular.isDefined(d)){if(!a.date){var g=angular.isDefined(c.defaultTime)?c.defaultTime:k.defaultTime,h=new Date("2001-01-01 "+g);isNaN(h)||null==d||(d.setHours(h.getHours()),d.setMinutes(h.getMinutes()),d.setSeconds(h.getSeconds()),d.setMilliseconds(h.getMilliseconds()))}a.date=d,d&&a.oldDate&&(d.setDate(a.oldDate.getDate()),d.setMonth(a.oldDate.getMonth()),d.setFullYear(a.oldDate.getFullYear()),delete a.oldDate)}var f=a.date?i(a.date,w):null;b.val(f),t.$setViewValue(f),z&&("time"!=a.showPicker&&null!=f?a.enableTime?a.open("time"):a.close(!1):A&&"time"===a.showPicker&&null!=f&&"now"===e&&a.close(!1))},a.$watch("isOpen",function(c){if(a.dropdownStyle={display:c?"block":"none"},c){x.openDate=a.date;var d=B?h.offset(b):h.position(b);B?a.dropdownStyle.top=d.top+b.prop("offsetHeight")+"px":a.dropdownStyle.top=void 0,a.dropdownStyle.left=d.left+"px",g(function(){a.$broadcast("uib:datepicker.focus"),f.bind("click",m)},0,!1),a.open(a.showPicker)}else f.unbind("click",m)}),a.isDisabled=function(b){("today"===b||"now"===b)&&(b=j.fromTimezone(new Date,u.timezone));var c={};return angular.forEach(["minDate","maxDate"],function(b){a.datepickerOptions[b]?angular.isDate(a.datepickerOptions[b])?c[b]=j.fromTimezone(new Date(a.datepickerOptions[b]),u.timezone):c[b]=new Date(i(a.datepickerOptions[b],"medium")):c[b]=null}),a.datepickerOptions&&c.minDate&&a.compare(b,c.minDate)<0||c.maxDate&&a.compare(b,c.maxDate)>0},a.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},a.select=function(b,c){angular.isDefined(c)&&(c.preventDefault(),c.stopPropagation());var d=null;if("today"===b||"now"==b){var e=new Date;angular.isDate(a.date)?(d=new Date(a.date),d.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),d.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())):d=e}a.dateSelection(d,b)},a.cancel=function(c){angular.isDefined(c)&&(c.preventDefault(),c.stopPropagation()),b.val(i(F,w)),t.$setViewValue(i(F,w)),a.close(!1)},a.open=function(c,d){angular.isDefined(d)&&(d.preventDefault(),d.stopPropagation()),F=b.val(),g(function(){a.showPicker=c},0),"time"==c&&g(function(){a.date=p(t.$viewValue)},50)},a.close=function(c,d){angular.isDefined(d)&&(d.preventDefault(),d.stopPropagation()),a.isOpen=!1,a.enableDate&&a.enableTime&&(a.showPicker=a.reOpenDefault===!1?"date":a.reOpenDefault),angular.isDefined(c)?a.whenClosed({args:{closePressed:c,openDate:x.openDate||null,closeDate:a.date}}):b[0].focus()},a.$on("$destroy",function(){a.isOpen===!0&&(l.$$phase||a.$apply(function(){a.close()})),y.forEach(function(a){a()}),v.remove(),b.unbind("keydown",n),f.unbind("click",m)})}]).directive("datetimePicker",function(){return{restrict:"A",require:["ngModel","datetimePicker"],controller:"DateTimePickerController",scope:{isOpen:"=?",datepickerOptions:"=?",timepickerOptions:"=?",enableDate:"=?",enableTime:"=?",initialPicker:"=?",reOpenDefault:"=?",whenClosed:"&"},link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("datePickerWrap",function(){return{restrict:"EA",replace:!0,transclude:!0,templateUrl:"template/date-picker.html"}}).directive("timePickerWrap",function(){return{restrict:"EA",replace:!0,transclude:!0,templateUrl:"template/time-picker.html"}}),angular.module("ui.bootstrap.datetimepicker").run(["$templateCache",function(a){"use strict";a.put("template/date-picker.html","<ul class=\"dropdown-menu dropdown-menu-left datetime-picker-dropdown\" ng-if=\"isOpen && showPicker == 'date'\" ng-style=dropdownStyle style=left:inherit ng-keydown=keydown($event) ng-click=\"$event.preventDefault(); $event.stopPropagation()\"><li style=\"padding:0 5px 5px 5px\" class=date-picker-menu><div ng-transclude></div></li><li style=padding:5px ng-if=buttonBar.show><span class=\"btn-group pull-left\" style=margin-right:10px ng-if=\"doShow('today') || doShow('clear')\"><button type=button class=btn ng-class=\"getClass('today')\" ng-if=\"doShow('today')\" ng-click=\"select('today', $event)\" ng-disabled=\"isDisabled('today')\">{{ getText('today') }}</button> <button type=button class=btn ng-class=\"getClass('clear')\" ng-if=\"doShow('clear')\" ng-click=\"select('clear', $event)\">{{ getText('clear') }}</button></span> <span class=\"btn-group pull-right\" ng-if=\"(doShow('time') && enableTime) || doShow('close') || doShow('cancel')\"><button type=button class=btn ng-class=\"getClass('time')\" ng-if=\"doShow('time') && enableTime\" ng-click=\"open('time', $event)\">{{ getText('time')}}</button> <button type=button class=btn ng-class=\"getClass('close')\" ng-if=\"doShow('close')\" ng-click=\"close(true, $event)\">{{ getText('close') }}</button> <button type=button class=btn ng-class=\"getClass('cancel')\" ng-if=\"doShow('cancel')\" ng-click=cancel($event)>{{ getText('cancel') }}</button></span> <span class=clearfix></span></li></ul>"),a.put("template/time-picker.html","<ul class=\"dropdown-menu dropdown-menu-left datetime-picker-dropdown\" ng-if=\"isOpen && showPicker == 'time'\" ng-style=dropdownStyle style=left:inherit ng-keydown=keydown($event) ng-click=\"$event.preventDefault(); $event.stopPropagation()\"><li style=\"padding:0 5px 5px 5px\" class=time-picker-menu><div ng-transclude></div></li><li style=padding:5px ng-if=buttonBar.show><span class=\"btn-group pull-left\" style=margin-right:10px ng-if=\"doShow('now') || doShow('clear')\"><button type=button class=btn ng-class=\"getClass('now')\" ng-if=\"doShow('now')\" ng-click=\"select('now', $event)\" ng-disabled=\"isDisabled('now')\">{{ getText('now') }}</button> <button type=button class=btn ng-class=\"getClass('clear')\" ng-if=\"doShow('clear')\" ng-click=\"select('clear', $event)\">{{ getText('clear') }}</button></span> <span class=\"btn-group pull-right\" ng-if=\"(doShow('date') && enableDate) || doShow('close') || doShow('cancel')\"><button type=button class=btn ng-class=\"getClass('date')\" ng-if=\"doShow('date') && enableDate\" ng-click=\"open('date', $event)\">{{ getText('date')}}</button> <button type=button class=btn ng-class=\"getClass('close')\" ng-if=\"doShow('close')\" ng-click=\"close(true, $event)\">{{ getText('close') }}</button> <button type=button class=btn ng-class=\"getClass('cancel')\" ng-if=\"doShow('cancel')\" ng-click=cancel($event)>{{ getText('cancel') }}</button></span> <span class=clearfix></span></li></ul>")}]),"object"==typeof exports&&"object"==typeof module&&(module.exports="ui.bootstrap.datetimepicker");