(function(e){"use strict";var t={i18n:{en:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeek:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},nl:{months:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],dayOfWeek:["zo","ma","di","wo","do","vr","za"]}},value:"",lang:"en",format:"Y/m/d H:i",formatTime:"H:i",formatDate:"Y/m/d",startDate:false,step:60,monthChangeSpinner:true,closeOnDateSelect:false,closeOnWithoutClick:true,closeOnInputClick:true,timepicker:true,datepicker:true,weeks:false,defaultTime:false,defaultDate:false,minDate:false,maxDate:false,minTime:false,maxTime:false,allowTimes:[],opened:false,initTime:true,inline:false,theme:"",onSelectDate:function(){},onSelectTime:function(){},onChangeMonth:function(){},onChangeYear:function(){},onChangeDateTime:function(){},onShow:function(){},onClose:function(){},onGenerate:function(){},withoutCopyright:true,inverseButton:false,hours12:false,next:"xdsoft_next",prev:"xdsoft_prev",dayOfWeekStart:0,parentID:"body",timeHeightInTimePicker:25,timepickerScrollbar:true,todayButton:true,defaultSelect:true,scrollMonth:true,scrollTime:true,scrollInput:true,lazyInit:false,mask:false,validateOnBlur:true,allowBlank:true,yearStart:1950,yearEnd:2050,style:"",id:"",fixed:false,roundTime:"round",className:"",weekends:[],disabledDates:[],yearOffset:0,beforeShowDay:null,enterLikeTab:true};if(!Array.prototype.indexOf){Array.prototype.indexOf=function(e,t){var n,r;for(n=t||0,r=this.length;n');f=e('
');a.append(f);n.addClass("xdsoft_scroller_box").append(a);g=function(t){var i=r(t).y-h+m;if(i<0){i=0}if(i+f[0].offsetHeight>d){i=d-f[0].offsetHeight}n.trigger("scroll_element.xdsoft_scroller",[l?i/l:0])};f.on("touchstart.xdsoft_scroller mousedown.xdsoft_scroller",function(i){if(!o){n.trigger("resize_scroll.xdsoft_scroller",[t])}h=r(i).y;m=parseInt(f.css("margin-top"),10);d=a[0].offsetHeight;if(i.type==="mousedown"){if(document){e(document.body).addClass("xdsoft_noselect")}e([document.body,window]).on("mouseup.xdsoft_scroller",function s(){e([document.body,window]).off("mouseup.xdsoft_scroller",s).off("mousemove.xdsoft_scroller",g).removeClass("xdsoft_noselect")});e(document.body).on("mousemove.xdsoft_scroller",g)}else{v=true;i.stopPropagation();i.preventDefault()}}).on("touchmove",function(e){if(v){e.preventDefault();g(e)}}).on("touchend touchcancel",function(e){v=false;m=0});n.on("scroll_element.xdsoft_scroller",function(e,t){if(!o){n.trigger("resize_scroll.xdsoft_scroller",[t,true])}t=t>1?1:t<0||isNaN(t)?0:t;f.css("margin-top",l*t);setTimeout(function(){s.css("marginTop",-parseInt((s[0].offsetHeight-o)*t,10))},10)}).on("resize_scroll.xdsoft_scroller",function(e,t,r){var i,c;o=n[0].clientHeight;u=s[0].offsetHeight;i=o/u;c=i*a[0].offsetHeight;if(i>1){f.hide()}else{f.show();f.css("height",parseInt(c>10?c:10,10));l=a[0].offsetHeight-f[0].offsetHeight;if(r!==true){n.trigger("scroll_element.xdsoft_scroller",[t||Math.abs(parseInt(s.css("marginTop"),10))/(u-o)])}}});n.on("mousewheel",function(e){var t=Math.abs(parseInt(s.css("marginTop"),10));t=t-e.deltaY*20;if(t<0){t=0}n.trigger("scroll_element.xdsoft_scroller",[t/(u-o)]);e.stopPropagation();return false});n.on("touchstart",function(e){c=r(e);p=Math.abs(parseInt(s.css("marginTop"),10))});n.on("touchmove",function(e){if(c){e.preventDefault();var t=r(e);n.trigger("scroll_element.xdsoft_scroller",[(p-(t.y-c.y))/(u-o)])}});n.on("touchend touchcancel",function(e){c=false;p=0})}n.trigger("resize_scroll.xdsoft_scroller",[t])})};e.fn.datetimepicker=function(n){var r=48,i=57,s=96,o=105,u=17,a=46,f=13,l=27,c=8,h=37,p=38,d=39,v=40,m=9,g=116,y=65,b=67,w=86,E=90,S=89,x=false,T=e.isPlainObject(n)||!n?e.extend(true,{},t,n):e.extend(true,{},t),N=0,C,k,L=function(e){e.on("open.xdsoft focusin.xdsoft mousedown.xdsoft",function t(n){if(e.is(":disabled")||e.data("xdsoft_datetimepicker")){return}clearTimeout(N);N=setTimeout(function(){if(!e.data("xdsoft_datetimepicker")){C(e)}e.off("open.xdsoft focusin.xdsoft mousedown.xdsoft",t).trigger("open.xdsoft")},100)})};C=function(t){function W(){var e=false,n;if(T.startDate){e=z.strToDate(T.startDate)}else{e=T.value||(t&&t.val&&t.val()?t.val():"");if(e){e=z.strToDateTime(e)}else if(T.defaultDate){e=z.strToDate(T.defaultDate);if(T.defaultTime){n=z.strtotime(T.defaultTime);e.setHours(n.getHours());e.setMinutes(n.getMinutes())}}}if(e&&z.isValidDate(e)){N.data("changed",true)}else{e=""}return e||0}var N=e("
'),C=e(''),k=e('
'),L=e('
'+'
'+'
'+'
'),A=e('
'),O=e('
'),M=O.find(".xdsoft_time_box").eq(0),_=e('
'),D=e('
'),P=e('
'),H=false,B,j,F,I,q,R=0,U=0,z;L.find(".xdsoft_month span").after(D);L.find(".xdsoft_year span").after(P);L.find(".xdsoft_month,.xdsoft_year").on("mousedown.xdsoft",function(t){var n=e(this).find(".xdsoft_select").eq(0),r=0,i=0,s=n.is(":visible"),o,u;L.find(".xdsoft_select").hide();if(z.currentTime){r=z.currentTime[e(this).hasClass("xdsoft_month")?"getMonth":"getFullYear"]()}n[s?"hide":"show"]();for(o=n.find("div.xdsoft_option"),u=0;u=r&&C<=i||C>=s&&C<=o||C===c||C===a){k=A(this);L=C!==c&&C!==a?String.fromCharCode(s<=C&&C<=o?C-r:C):"_";if((C===c||C===a)&&k){k-=1;L="_"}while(/[^0-9_]/.test(T.mask.substr(k,1))&&k0){k+=C===c||C===a?-1:1}N=N.substr(0,k)+L+N.substr(k+1);if(e.trim(N)===""){N=T.mask.replace(/[0-9]/g,"_")}else{if(k===T.mask.length){n.preventDefault();return false}}k+=C===c||C===a?0:1;while(/[^0-9_]/.test(T.mask.substr(k,1))&&k0){k+=C===c||C===a?-1:1}if(D(T.mask,N)){this.value=N;_(this,k)}else if(e.trim(N)===""){this.value=T.mask.replace(/[0-9]/g,"_")}else{t.trigger("error_input.xdsoft")}}else{if([y,b,w,E,S].indexOf(C)!==-1&&x||[l,p,v,h,d,g,u,m,f].indexOf(C)!==-1){return true}}n.preventDefault();return false})}}if(T.validateOnBlur){t.off("blur.xdsoft").on("blur.xdsoft",function(){if(T.allowBlank&&!e.trim(e(this).val()).length){e(this).val(null);N.data("xdsoft_datetime").empty()}else if(!Date.parseDate(e(this).val(),T.format)){e(this).val(z.now().dateFormat(T.format));N.data("xdsoft_datetime").setCurrentTime(e(this).val())}else{N.data("xdsoft_datetime").setCurrentTime(e(this).val())}N.trigger("changedatetime.xdsoft")})}T.dayOfWeekStartPrev=T.dayOfWeekStart===0?6:T.dayOfWeekStart-1;N.trigger("xchange.xdsoft").trigger("afterOpen.xdsoft")};N.data("options",T).on("mousedown.xdsoft",function(e){e.stopPropagation();e.preventDefault();P.hide();D.hide();return false});M.append(_);M.xdsoftScroller();N.on("afterOpen.xdsoft",function(){M.xdsoftScroller()});N.append(k).append(O);if(T.withoutCopyright!==true){N.append(C)}k.append(L).append(A);e(T.parentID).append(N);B=function(){var t=this;t.now=function(e){var n=new Date,r,i;if(!e&&T.defaultDate){r=t.strToDate(T.defaultDate);n.setFullYear(r.getFullYear());n.setMonth(r.getMonth());n.setDate(r.getDate())}if(T.yearOffset){n.setFullYear(n.getFullYear()+T.yearOffset)}if(!e&&T.defaultTime){i=t.strtotime(T.defaultTime);n.setHours(i.getHours());n.setMinutes(i.getMinutes())}return n};t.isValidDate=function(e){if(Object.prototype.toString.call(e)!=="[object Date]"){return false}return!isNaN(e.getTime())};t.setCurrentTime=function(e){t.currentTime=typeof e==="string"?t.strToDateTime(e):t.isValidDate(e)?e:t.now();N.trigger("xchange.xdsoft")};t.empty=function(){t.currentTime=null};t.getCurrentTime=function(e){return t.currentTime};t.nextMonth=function(){var n=t.currentTime.getMonth()+1,r;if(n===12){t.currentTime.setFullYear(t.currentTime.getFullYear()+1);n=0}r=t.currentTime.getFullYear();t.currentTime.setDate(Math.min((new Date(t.currentTime.getFullYear(),n+1,0)).getDate(),t.currentTime.getDate()));t.currentTime.setMonth(n);if(T.onChangeMonth&&e.isFunction(T.onChangeMonth)){T.onChangeMonth.call(N,z.currentTime,N.data("input"))}if(r!==t.currentTime.getFullYear()&&e.isFunction(T.onChangeYear)){T.onChangeYear.call(N,z.currentTime,N.data("input"))}N.trigger("xchange.xdsoft");return n};t.prevMonth=function(){var n=t.currentTime.getMonth()-1;if(n===-1){t.currentTime.setFullYear(t.currentTime.getFullYear()-1);n=11}t.currentTime.setDate(Math.min((new Date(t.currentTime.getFullYear(),n+1,0)).getDate(),t.currentTime.getDate()));t.currentTime.setMonth(n);if(T.onChangeMonth&&e.isFunction(T.onChangeMonth)){T.onChangeMonth.call(N,z.currentTime,N.data("input"))}N.trigger("xchange.xdsoft");return n};t.getWeekOfYear=function(e){var t=new Date(e.getFullYear(),0,1);return Math.ceil(((e-t)/864e5+t.getDay()+1)/7)};t.strToDateTime=function(e){var n=[],r,i;if(e&&e instanceof Date&&t.isValidDate(e)){return e}n=/^(\+|\-)(.*)$/.exec(e);if(n){n[2]=Date.parseDate(n[2],T.formatDate)}if(n&&n[2]){r=n[2].getTime()-n[2].getTimezoneOffset()*6e4;i=new Date(z.now().getTime()+parseInt(n[1]+"1",10)*r)}else{i=e?Date.parseDate(e,T.format):t.now()}if(!t.isValidDate(i)){i=t.now()}return i};t.strToDate=function(e){if(e&&e instanceof Date&&t.isValidDate(e)){return e}var n=e?Date.parseDate(e,T.formatDate):t.now(true);if(!t.isValidDate(n)){n=t.now(true)}return n};t.strtotime=function(e){if(e&&e instanceof Date&&t.isValidDate(e)){return e}var n=e?Date.parseDate(e,T.formatTime):t.now(true);if(!t.isValidDate(n)){n=t.now(true)}return n};t.str=function(){return t.currentTime.dateFormat(T.format)};t.currentTime=this.now()};z=new B;L.find(".xdsoft_today_button").on("mousedown.xdsoft",function(){N.data("changed",true);z.setCurrentTime(0);N.trigger("afterOpen.xdsoft")}).on("dblclick.xdsoft",function(){t.val(z.str());N.trigger("close.xdsoft")});L.find(".xdsoft_prev,.xdsoft_next").on("mousedown.xdsoft",function(){var t=e(this),n=0,r=false;(function i(e){var s=z.currentTime.getMonth();if(t.hasClass(T.next)){z.nextMonth()}else if(t.hasClass(T.prev)){z.prevMonth()}if(T.monthChangeSpinner){if(!r){n=setTimeout(i,e||100)}}})(500);e([document.body,window]).on("mouseup.xdsoft",function s(){clearTimeout(n);r=true;e([document.body,window]).off("mouseup.xdsoft",s)})});O.find(".xdsoft_prev,.xdsoft_next").on("mousedown.xdsoft",function(){var t=e(this),n=0,r=false,i=110;(function s(e){var o=M[0].clientHeight,u=_[0].offsetHeight,a=Math.abs(parseInt(_.css("marginTop"),10));if(t.hasClass(T.next)&&u-o-T.timeHeightInTimePicker>=a){_.css("marginTop","-"+(a+T.timeHeightInTimePicker)+"px")}else if(t.hasClass(T.prev)&&a-T.timeHeightInTimePicker>=0){_.css("marginTop","-"+(a-T.timeHeightInTimePicker)+"px")}M.trigger("scroll_element.xdsoft_scroller",[Math.abs(parseInt(_.css("marginTop"),10)/(u-o))]);i=i>10?10:i-10;if(!r){n=setTimeout(s,e||i)}})(500);e([document.body,window]).on("mouseup.xdsoft",function o(){clearTimeout(n);r=true;e([document.body,window]).off("mouseup.xdsoft",o)})});j=0;N.on("xchange.xdsoft",function(t){clearTimeout(j);j=setTimeout(function(){var t="",r=new Date(z.currentTime.getFullYear(),z.currentTime.getMonth(),1,12,0,0),i=0,s,o=z.now(),u=false,a=false,f,l,c,h,p=[],d,v=true,m="",g="",y;while(r.getDay()!==T.dayOfWeekStart){r.setDate(r.getDate()-1)}t+="";if(T.weeks){t+=""}for(s=0;s<7;s+=1){t+=""}t+="";t+="";if(T.maxDate!==false){u=z.strToDate(T.maxDate);u=new Date(u.getFullYear(),u.getMonth(),u.getDate(),23,59,59,999)}if(T.minDate!==false){a=z.strToDate(T.minDate);a=new Date(a.getFullYear(),a.getMonth(),a.getDate())}while(iu||a!==false&&r";v=false;if(T.weeks){t+=""}}t+='";if(r.getDay()===T.dayOfWeekStartPrev){t+="";v=true}r.setDate(f+1)}t+="
"+T.i18n[T.lang].dayOfWeek[(s+T.dayOfWeekStart)%7]+"
"+h+"'+"
"+f+"
"+"
";A.html(t);L.find(".xdsoft_label span").eq(0).text(T.i18n[T.lang].months[z.currentTime.getMonth()]);L.find(".xdsoft_label span").eq(1).text(z.currentTime.getFullYear());m="";g="";c="";y=function(t,n){var r=z.now();r.setHours(t);t=parseInt(r.getHours(),10);r.setMinutes(n);n=parseInt(r.getMinutes(),10);var i=new Date(z.currentTime);i.setHours(t);i.setMinutes(n);p=[];if(T.minDateTime!==false&&T.minDateTime>i||T.maxTime!==false&&z.strtotime(T.maxTime).getTime()r.getTime()){p.push("xdsoft_disabled")}if((T.initTime||T.defaultSelect||N.data("changed"))&&parseInt(z.currentTime.getHours(),10)===parseInt(t,10)&&(T.step>59||Math[T.roundTime](z.currentTime.getMinutes()/T.step)*T.step===parseInt(n,10))){if(T.defaultSelect||N.data("changed")){p.push("xdsoft_current")}else if(T.initTime){p.push("xdsoft_init_time")}}if(parseInt(o.getHours(),10)===parseInt(t,10)&&parseInt(o.getMinutes(),10)===parseInt(n,10)){p.push("xdsoft_today")}m+='
'+r.dateFormat(T.formatTime)+"
"};if(!T.allowTimes||!e.isArray(T.allowTimes)||!T.allowTimes.length){for(i=0,s=0;i<(T.hours12?12:24);i+=1){for(s=0;s<60;s+=T.step){g=(i<10?"0":"")+i;c=(s<10?"0":"")+s;y(g,c)}}}else{for(i=0;i'+i+""}P.children().eq(0).html(n);for(i=0,n="";i<=11;i+=1){n+='
'+T.i18n[T.lang].months[i]+"
"}D.children().eq(0).html(n);e(N).trigger("generate.xdsoft")},10);t.stopPropagation()}).on("afterOpen.xdsoft",function(){if(T.timepicker){var e,t,n,r;if(_.find(".xdsoft_current").length){e=".xdsoft_current"}else if(_.find(".xdsoft_init_time").length){e=".xdsoft_init_time"}if(e){t=M[0].clientHeight;n=_[0].offsetHeight;r=_.find(e).index()*T.timeHeightInTimePicker+1;if(n-t1||T.closeOnDateSelect===true||T.closeOnDateSelect===0&&!T.timepicker)&&!T.inline){N.trigger("close.xdsoft")}if(T.onSelectDate&&e.isFunction(T.onSelectDate)){T.onSelectDate.call(N,z.currentTime,N.data("input"),n)}N.data("changed",true);N.trigger("xchange.xdsoft");N.trigger("changedatetime.xdsoft");setTimeout(function(){F=0},200)});_.on("click.xdsoft","div",function(t){t.stopPropagation();var n=e(this),r=z.currentTime;if(r===undefined||r===null){z.currentTime=z.now();r=z.currentTime}if(n.hasClass("xdsoft_disabled")){return false}r.setHours(n.data("hour"));r.setMinutes(n.data("minute"));N.trigger("select.xdsoft",[r]);N.data("input").val(z.str());if(!T.inline){N.trigger("close.xdsoft")}if(T.onSelectTime&&e.isFunction(T.onSelectTime)){T.onSelectTime.call(N,z.currentTime,N.data("input"),t)}N.data("changed",true);N.trigger("xchange.xdsoft");N.trigger("changedatetime.xdsoft")});k.on("mousewheel.xdsoft",function(e){if(!T.scrollMonth){return true}if(e.deltaY<0){z.nextMonth()}else{z.prevMonth()}return false});t.on("mousewheel.xdsoft",function(e){if(!T.scrollInput){return true}if(!T.datepicker&&T.timepicker){I=_.find(".xdsoft_current").length?_.find(".xdsoft_current").eq(0).index():0;if(I+e.deltaY>=0&&I+e.deltaY<_.children().length){I+=e.deltaY}if(_.children().eq(I).length){_.children().eq(I).trigger("mousedown")}return false}if(T.datepicker&&!T.timepicker){k.trigger(e,[e.deltaY,e.deltaX,e.deltaY]);if(t.val){t.val(z.str())}N.trigger("changedatetime.xdsoft");return false}});N.on("changedatetime.xdsoft",function(t){if(T.onChangeDateTime&&e.isFunction(T.onChangeDateTime)){var n=N.data("input");T.onChangeDateTime.call(N,z.currentTime,n,t);delete T.value;n.trigger("change")}}).on("generate.xdsoft",function(){if(T.onGenerate&&e.isFunction(T.onGenerate)){T.onGenerate.call(N,z.currentTime,N.data("input"))}if(H){N.trigger("afterOpen.xdsoft");H=false}}).on("click.xdsoft",function(e){e.stopPropagation()});I=0;q=function(){var t=N.data("input").offset(),n=t.top+N.data("input")[0].offsetHeight-1,r=t.left,i="absolute";if(T.fixed){n-=e(window).scrollTop();r-=e(window).scrollLeft();i="fixed"}else{if(n+N[0].offsetHeight>e(window).height()+e(window).scrollTop()){n=t.top-N[0].offsetHeight+1}if(n<0){n=0}if(r+N[0].offsetWidth>e(window).width()){r=e(window).width()-N[0].offsetWidth}}N.css({left:r,top:n,position:i})};N.on("open.xdsoft",function(t){var n=true;if(T.onShow&&e.isFunction(T.onShow)){n=T.onShow.call(N,z.currentTime,N.data("input"),t)}if(n!==false){N.show();q();e(window).off("resize.xdsoft",q).on("resize.xdsoft",q);if(T.closeOnWithoutClick){e([document.body,window]).on("mousedown.xdsoft",function r(){N.trigger("close.xdsoft");e([document.body,window]).off("mousedown.xdsoft",r)})}}}).on("close.xdsoft",function(t){var n=true;L.find(".xdsoft_month,.xdsoft_year").find(".xdsoft_select").hide();if(T.onClose&&e.isFunction(T.onClose)){n=T.onClose.call(N,z.currentTime,N.data("input"),t)}if(n!==false&&!T.opened&&!T.inline){N.hide()}t.stopPropagation()}).on("toggle.xdsoft",function(e){if(N.is(":visible")){N.trigger("close.xdsoft")}else{N.trigger("open.xdsoft")}}).data("input",t);R=0;U=0;N.data("xdsoft_datetime",z);N.setOptions(T);z.setCurrentTime(W());t.data("xdsoft_datetimepicker",N).on("open.xdsoft focusin.xdsoft mousedown.xdsoft",function(e){if(t.is(":disabled")||t.data("xdsoft_datetimepicker").is(":visible")&&T.closeOnInputClick){return}clearTimeout(R);R=setTimeout(function(){if(t.is(":disabled")){return}H=true;z.setCurrentTime(W());N.trigger("open.xdsoft")},100)}).on("keydown.xdsoft",function(t){var n=this.value,r,i=t.which;if([f].indexOf(i)!==-1&&T.enterLikeTab){r=e("input:visible,textarea:visible");N.trigger("close.xdsoft");r.eq(r.index(this)+1).focus();return false}if([m].indexOf(i)!==-1){N.trigger("close.xdsoft");return true}})};k=function(t){var n=t.data("xdsoft_datetimepicker");if(n){n.data("xdsoft_datetime",null);n.remove();t.data("xdsoft_datetimepicker",null).off(".xdsoft");e(window).off("resize.xdsoft");e([window,document.body]).off("mousedown.xdsoft");if(t.unmousewheel){t.unmousewheel()}}};e(document).off("keydown.xdsoftctrl keyup.xdsoftctrl").on("keydown.xdsoftctrl",function(e){if(e.keyCode===u){x=true}}).on("keyup.xdsoftctrl",function(e){if(e.keyCode===u){x=false}});return this.each(function(){var t=e(this).data("xdsoft_datetimepicker");if(t){if(e.type(n)==="string"){switch(n){case"show":e(this).select().focus();t.trigger("open.xdsoft");break;case"hide":t.trigger("close.xdsoft");break;case"toggle":t.trigger("toggle.xdsoft");break;case"destroy":k(e(this));break;case"reset":this.value=this.defaultValue;if(!this.value||!t.data("xdsoft_datetime").isValidDate(Date.parseDate(this.value,T.format))){t.data("changed",false)}t.data("xdsoft_datetime").setCurrentTime(this.value);break}}else{t.setOptions(n)}return 0}if(e.type(n)!=="string"){if(!T.lazyInit||T.open||T.inline){C(e(this))}else{L(e(this))}}})};e.fn.datetimepicker.defaults=t})(jQuery);(function(){!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(e){function t(t){var o=t||window.event,u=a.call(arguments,1),f=0,h=0,p=0,v=0,m=0,g=0;if(t=e.event.fix(o),t.type="mousewheel","detail"in o&&(p=-1*o.detail),"wheelDelta"in o&&(p=o.wheelDelta),"wheelDeltaY"in o&&(p=o.wheelDeltaY),"wheelDeltaX"in o&&(h=-1*o.wheelDeltaX),"axis"in o&&o.axis===o.HORIZONTAL_AXIS&&(h=-1*p,p=0),f=0===p?h:p,"deltaY"in o&&(p=-1*o.deltaY,f=p),"deltaX"in o&&(h=o.deltaX,0===p&&(f=-1*h)),0!==p||0!==h){if(1===o.deltaMode){var y=e.data(this,"mousewheel-line-height");f*=y,p*=y,h*=y}else if(2===o.deltaMode){var b=e.data(this,"mousewheel-page-height");f*=b,p*=b,h*=b}if(v=Math.max(Math.abs(p),Math.abs(h)),(!s||s>v)&&(s=v,r(o,v)&&(s/=40)),r(o,v)&&(f/=40,h/=40,p/=40),f=Math[f>=1?"floor":"ceil"](f/s),h=Math[h>=1?"floor":"ceil"](h/s),p=Math[p>=1?"floor":"ceil"](p/s),l.settings.normalizeOffset&&this.getBoundingClientRect){var w=this.getBoundingClientRect();m=t.clientX-w.left,g=t.clientY-w.top}return t.deltaX=h,t.deltaY=p,t.deltaFactor=s,t.offsetX=m,t.offsetY=g,t.deltaMode=0,u.unshift(t,f,h,p),i&&clearTimeout(i),i=setTimeout(n,200),(e.event.dispatch||e.event.handle).apply(this,u)}}function n(){s=null}function r(e,t){return l.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120===0}var i,s,o=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],u="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],a=Array.prototype.slice;if(e.event.fixHooks)for(var f=o.length;f;)e.event.fixHooks[o[--f]]=e.event.mouseHooks;var l=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var n=u.length;n;)this.addEventListener(u[--n],t,!1);else this.onmousewheel=t;e.data(this,"mousewheel-line-height",l.getLineHeight(this)),e.data(this,"mousewheel-page-height",l.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var n=u.length;n;)this.removeEventListener(u[--n],t,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var n=e(t),r=n["offsetParent"in e.fn?"offsetParent":"parent"]();return r.length||(r=e("body")),parseInt(r.css("fontSize"),10)||parseInt(n.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})});Date.parseFunctions={count:0};Date.parseRegexes=[];Date.formatFunctions={count:0};Date.prototype.dateFormat=function(e){if(e=="unixtime"){return parseInt(this.getTime()/1e3)}if(Date.formatFunctions[e]==null){Date.createNewFormat(e)}var t=Date.formatFunctions[e];return this[t]()};Date.createNewFormat=function(format){var funcName="format"+Date.formatFunctions.count++;Date.formatFunctions[format]=funcName;var code="Date.prototype."+funcName+" = function() {return ";var special=false;var ch="";for(var i=0;i 0) {";var regex="";var special=false;var ch="";for(var i=0;i 0 && z > 0){\nvar doyDate = new Date(y,0);\ndoyDate.setDate(z);\nm = doyDate.getMonth();\nd = doyDate.getDate();\n}";code+="if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0)\n{return new Date(y, m, d, h, i, s);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0)\n{return new Date(y, m, d, h, i);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0)\n{return new Date(y, m, d, h);}\nelse if (y > 0 && m >= 0 && d > 0)\n{return new Date(y, m, d);}\nelse if (y > 0 && m >= 0)\n{return new Date(y, m);}\nelse if (y > 0)\n{return new Date(y);}\n}return null;}";Date.parseRegexes[regexNum]=new RegExp("^"+regex+"$");eval(code)};Date.formatCodeToRegex=function(e,t){switch(e){case"D":return{g:0,c:null,s:"(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)"};case"j":case"d":return{g:1,c:"d = parseInt(results["+t+"], 10);\n",s:"(\\d{1,2})"};case"l":return{g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"};case"S":return{g:0,c:null,s:"(?:st|nd|rd|th)"};case"w":return{g:0,c:null,s:"\\d"};case"z":return{g:1,c:"z = parseInt(results["+t+"], 10);\n",s:"(\\d{1,3})"};case"W":return{g:0,c:null,s:"(?:\\d{2})"};case"F":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+t+"].substring(0, 3)], 10);\n",s:"("+Date.monthNames.join("|")+")"};case"M":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+t+"]], 10);\n",s:"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)"};case"n":case"m":return{g:1,c:"m = parseInt(results["+t+"], 10) - 1;\n",s:"(\\d{1,2})"};case"t":return{g:0,c:null,s:"\\d{1,2}"};case"L":return{g:0,c:null,s:"(?:1|0)"};case"Y":return{g:1,c:"y = parseInt(results["+t+"], 10);\n",s:"(\\d{4})"};case"y":return{g:1,c:"var ty = parseInt(results["+t+"], 10);\ny = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"};case"a":return{g:1,c:"if (results["+t+"] == 'am') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(am|pm)"};case"A":return{g:1,c:"if (results["+t+"] == 'AM') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(AM|PM)"};case"g":case"G":case"h":case"H":return{g:1,c:"h = parseInt(results["+t+"], 10);\n",s:"(\\d{1,2})"};case"i":return{g:1,c:"i = parseInt(results["+t+"], 10);\n",s:"(\\d{2})"};case"s":return{g:1,c:"s = parseInt(results["+t+"], 10);\n",s:"(\\d{2})"};case"O":return{g:0,c:null,s:"[+-]\\d{4}"};case"T":return{g:0,c:null,s:"[A-Z]{3}"};case"Z":return{g:0,c:null,s:"[+-]\\d{1,5}"};default:return{g:0,c:null,s:String.escape(e)}}};Date.prototype.getTimezone=function(){return this.toString().replace(/^.*? ([A-Z]{3}) [0-9]{4}.*$/,"$1").replace(/^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/,"$1$2$3")};Date.prototype.getGMTOffset=function(){return(this.getTimezoneOffset()>0?"-":"+")+String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset())/60),2,"0")+String.leftPad(Math.abs(this.getTimezoneOffset())%60,2,"0")};Date.prototype.getDayOfYear=function(){var e=0;Date.daysInMonth[1]=this.isLeapYear()?29:28;for(var t=0;t