/** 
 * Kendo UI v2016.3.1118 (http://www.telerik.com/kendo-ui)                                                                                                                                              
 * Copyright 2016 Telerik AD. All rights reserved.                                                                                                                                                      
 *                                                                                                                                                                                                      
 * Kendo UI commercial licenses may be obtained at                                                                                                                                                      
 * http://www.telerik.com/purchase/license-agreement/kendo-ui-complete                                                                                                                                  
 * If you do not own a commercial license, this file shall be governed by the trial license terms.                                                                                                      
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       

*/
!function(e,define){define("kendo.timepicker.min",["kendo.popup.min"],e)}(function(){return function(e,t){function n(e,t,n){var i,o=e.getTimezoneOffset();e.setTime(e.getTime()+t),n||(i=e.getTimezoneOffset()-o,e.setTime(e.getTime()+i*A))}function i(){var e=new Q,t=new Q(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0),n=new Q(e.getFullYear(),e.getMonth(),e.getDate(),12,0,0);return-1*(t.getTimezoneOffset()-n.getTimezoneOffset())}function o(e){return 60*e.getHours()*A+e.getMinutes()*A+1e3*e.getSeconds()+e.getMilliseconds()}function a(e,t,n){var i,a=o(t),r=o(n);return!e||a==r||(i=o(e),a>i&&(i+=M),r<a&&(r+=M),i>=a&&i<=r)}function r(e){var t=e.parseFormats;e.format=m(e.format||c.getCulture(e.culture).calendars.standard.patterns.t),t=Y(t)?t:[t],t.splice(0,0,e.format),e.parseFormats=t}function s(e){e.preventDefault()}var l,u,c=window.kendo,d=c.keys,p=c.parseDate,f=c._activeElement,m=c._extractFormat,h=c.support,_=h.browser,g=c.ui,v=g.Widget,w="open",k="close",y="change",x=".kendoTimePicker",b="click"+x,T="k-state-default",C="disabled",D="readonly",V="li",F="<span/>",S="k-state-focused",H="k-state-hover",W="mouseenter"+x+" mouseleave"+x,O="mousedown"+x,A=6e4,M=864e5,I="k-state-selected",B="k-state-disabled",E="aria-selected",N="aria-expanded",R="aria-hidden",z="aria-disabled",L="aria-activedescendant",P="id",Y=e.isArray,j=e.extend,K=e.proxy,Q=Date,U=new Q;U=new Q(U.getFullYear(),U.getMonth(),U.getDate(),0,0,0),l=function(t){var n=this,i=t.id;n.options=t,n._dates=[],n.ul=e('<ul tabindex="-1" role="listbox" aria-hidden="true" unselectable="on" class="k-list k-reset"/>').css({overflow:h.kineticScrollNeeded?"":"auto"}).on(b,V,K(n._click,n)).on("mouseenter"+x,V,function(){e(this).addClass(H)}).on("mouseleave"+x,V,function(){e(this).removeClass(H)}),n.list=e("<div class='k-list-container k-list-scroller' unselectable='on'/>").append(n.ul).on(O,s),i&&(n._timeViewID=i+"_timeview",n._optionID=i+"_option_selected",n.ul.attr(P,n._timeViewID)),n._popup(),n._heightHandler=K(n._height,n),n.template=c.template('<li tabindex="-1" role="option" class="k-item" unselectable="on">#=data#</li>',{useWithBlock:!1})},l.prototype={current:function(n){var i=this,o=i.options.active;return n===t?i._current:(i._current&&i._current.removeClass(I).removeAttr(E).removeAttr(P),n&&(n=e(n).addClass(I).attr(P,i._optionID).attr(E,!0),i.scroll(n[0])),i._current=n,o&&o(n),t)},close:function(){this.popup.close()},destroy:function(){var e=this;e.ul.off(x),e.list.off(x),e.popup.destroy()},open:function(){var e=this;e.ul[0].firstChild||e.bind(),e.popup.open(),e._current&&e.scroll(e._current[0])},dataBind:function(e){for(var t,n=this,i=n.options,o=i.format,r=c.toString,s=n.template,l=e.length,u=0,d="";u<l;u++)t=e[u],a(t,i.min,i.max)&&(d+=s(r(t,o,i.culture)));n._html(d)},refresh:function(){var e,t,a,r=this,s=r.options,l=s.format,u=i(),d=u<0,p=s.min,f=s.max,m=o(p),h=o(f),_=s.interval*A,g=c.toString,v=r.template,w=new Q((+p)),k=w.getDate(),y=0,x="";for(a=d?(M+u*A)/_:M/_,m!=h&&(m>h&&(h+=M),a=(h-m)/_+1),t=parseInt(a,10);y<a;y++)y&&n(w,_,d),h&&t==y&&(e=o(w),k<w.getDate()&&(e+=M),e>h&&(w=new Q((+f)))),r._dates.push(o(w)),x+=v(g(w,l,s.culture));r._html(x)},bind:function(){var e=this,t=e.options.dates;t&&t[0]?e.dataBind(t):e.refresh()},_html:function(e){var t=this;t.ul[0].innerHTML=e,t.popup.unbind(w,t._heightHandler),t.popup.one(w,t._heightHandler),t.current(null),t.select(t._value)},scroll:function(e){if(e){var t=this.list[0],n=e.offsetTop,i=e.offsetHeight,o=t.scrollTop,a=t.clientHeight,r=n+i;o>n?o=n:r>o+a&&(o=r-a),t.scrollTop=o}},select:function(t){var n,i=this,o=i.options,a=i._current;t instanceof Date&&(t=c.toString(t,o.format,o.culture)),"string"==typeof t&&(a&&a.text()===t?t=a:(t=e.grep(i.ul[0].childNodes,function(e){return(e.textContent||e.innerText)==t}),t=t[0]?t:null)),n=i._distinctSelection(t),i.current(n)},_distinctSelection:function(t){var n,i,a=this;return t&&t.length>1&&(n=o(a._value),i=e.inArray(n,a._dates),t=a.ul.children()[i]),t},setOptions:function(e){var t=this.options;e.min=p(e.min),e.max=p(e.max),this.options=j(t,e,{active:t.active,change:t.change,close:t.close,open:t.open}),this.bind()},toggle:function(){var e=this;e.popup.visible()?e.close():e.open()},value:function(e){var t=this;t._value=e,t.ul[0].firstChild&&t.select(e)},_click:function(t){var n=this,i=e(t.currentTarget),o=i.text(),a=n.options.dates;a&&a.length>0&&(o=a[i.index()]),t.isDefaultPrevented()||(n.select(i),n.options.change(o,!0),n.close())},_height:function(){var e=this,t=e.list,n=t.parent(".k-animation-container"),i=e.options.height;e.ul[0].children.length&&t.add(n).show().height(e.ul[0].scrollHeight>i?i:"auto").hide()},_parse:function(e){var t=this,n=t.options,i=t._value||U;return e instanceof Q?e:(e=p(e,n.parseFormats,n.culture),e&&(e=new Q(i.getFullYear(),i.getMonth(),i.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())),e)},_adjustListWidth:function(){var e,t,n=this.list,i=n[0].style.width,o=this.options.anchor,a=c._outerWidth;!n.data("width")&&i||(e=window.getComputedStyle?window.getComputedStyle(o[0],null):0,t=e?parseFloat(e.width):a(o),e&&(_.mozilla||_.msie)&&(t+=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)+parseFloat(e.borderLeftWidth)+parseFloat(e.borderRightWidth)),i=t-(a(n)-n.width()),n.css({fontFamily:o.css("font-family"),width:i}).data("width",i))},_popup:function(){var e=this,t=e.list,n=e.options,i=n.anchor;e.popup=new g.Popup(t,j(n.popup,{anchor:i,open:n.open,close:n.close,animation:n.animation,isRtl:h.isRtl(n.anchor)}))},move:function(e){var n=this,i=e.keyCode,o=n.ul[0],a=n._current,r=i===d.DOWN;if(i===d.UP||r){if(e.altKey)return n.toggle(r),t;a=r?a?a[0].nextSibling:o.firstChild:a?a[0].previousSibling:o.lastChild,a&&n.select(a),n.options.change(n._current.text()),e.preventDefault()}else i!==d.ENTER&&i!==d.TAB&&i!==d.ESC||(e.preventDefault(),a&&n.options.change(a.text(),!0),n.close())}},l.getMilliseconds=o,c.TimeView=l,u=v.extend({init:function(t,n){var i,o,a,s=this;v.fn.init.call(s,t,n),t=s.element,n=s.options,n.min=p(t.attr("min"))||p(n.min),n.max=p(t.attr("max"))||p(n.max),r(n),s._initialOptions=j({},n),s._wrapper(),s.timeView=o=new l(j({},n,{id:t.attr(P),anchor:s.wrapper,format:n.format,change:function(e,n){n?s._change(e):t.val(e)},open:function(e){s.timeView._adjustListWidth(),s.trigger(w)?e.preventDefault():(t.attr(N,!0),i.attr(R,!1))},close:function(e){s.trigger(k)?e.preventDefault():(t.attr(N,!1),i.attr(R,!0))},active:function(e){t.removeAttr(L),e&&t.attr(L,o._optionID)}})),i=o.ul,s._icon(),s._reset();try{t[0].setAttribute("type","text")}catch(u){t[0].type="text"}t.addClass("k-input").attr({role:"combobox","aria-expanded":!1,"aria-owns":o._timeViewID}),a=t.is("[disabled]")||e(s.element).parents("fieldset").is(":disabled"),a?s.enable(!1):s.readonly(t.is("[readonly]")),s._old=s._update(n.value||s.element.val()),s._oldText=t.val(),c.notify(s)},options:{name:"TimePicker",min:U,max:U,format:"",dates:[],parseFormats:[],value:null,interval:30,height:200,animation:{}},events:[w,k,y],setOptions:function(e){var t=this,n=t._value;v.fn.setOptions.call(t,e),e=t.options,r(e),t.timeView.setOptions(e),n&&t.element.val(c.toString(n,e.format,e.culture))},dataBind:function(e){Y(e)&&this.timeView.dataBind(e)},_editable:function(e){var t=this,n=e.disable,i=e.readonly,o=t._arrow.off(x),a=t.element.off(x),r=t._inputWrapper.off(x);i||n?(r.addClass(n?B:T).removeClass(n?T:B),a.attr(C,n).attr(D,i).attr(z,n)):(r.addClass(T).removeClass(B).on(W,t._toggleHover),a.removeAttr(C).removeAttr(D).attr(z,!1).on("keydown"+x,K(t._keydown,t)).on("focusout"+x,K(t._blur,t)).on("focus"+x,function(){t._inputWrapper.addClass(S)}),o.on(b,K(t._click,t)).on(O,s))},readonly:function(e){this._editable({readonly:e===t||e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)})},destroy:function(){var e=this;v.fn.destroy.call(e),e.timeView.destroy(),e.element.off(x),e._arrow.off(x),e._inputWrapper.off(x),e._form&&e._form.off("reset",e._resetHandler)},close:function(){this.timeView.close()},open:function(){this.timeView.open()},min:function(e){return this._option("min",e)},max:function(e){return this._option("max",e)},value:function(e){var n=this;return e===t?n._value:(n._old=n._update(e),null===n._old&&n.element.val(""),n._oldText=n.element.val(),t)},_blur:function(){var e=this,t=e.element.val();e.close(),t!==e._oldText&&e._change(t),e._inputWrapper.removeClass(S)},_click:function(){var e=this,t=e.element;e.timeView.toggle(),h.touch||t[0]===f()||t.focus()},_change:function(e){var t=this;e=t._update(e),+t._old!=+e&&(t._old=e,t._oldText=t.element.val(),t._typing||t.element.trigger(y),t.trigger(y)),t._typing=!1},_icon:function(){var t,n=this,i=n.element;t=i.next("span.k-select"),t[0]||(t=e('<span unselectable="on" class="k-select" aria-label="select"><span class="k-icon k-i-clock"></span></span>').insertAfter(i)),n._arrow=t.attr({role:"button","aria-controls":n.timeView._timeViewID})},_keydown:function(e){var t=this,n=e.keyCode,i=t.timeView,o=t.element.val();i.popup.visible()||e.altKey?i.move(e):n===d.ENTER&&o!==t._oldText?t._change(o):t._typing=!0},_option:function(e,n){var i=this,o=i.options;return n===t?o[e]:(n=i.timeView._parse(n),n&&(n=new Q((+n)),o[e]=n,i.timeView.options[e]=n,i.timeView.bind()),t)},_toggleHover:function(t){e(t.currentTarget).toggleClass(H,"mouseenter"===t.type)},_update:function(e){var t=this,n=t.options,i=t.timeView,o=i._parse(e);return a(o,n.min,n.max)||(o=null),t._value=o,t.element.val(c.toString(o||e,n.format,n.culture)),i.value(o),o},_wrapper:function(){var t,n=this,i=n.element;t=i.parents(".k-timepicker"),t[0]||(t=i.wrap(F).parent().addClass("k-picker-wrap k-state-default"),t=t.wrap(F).parent()),t[0].style.cssText=i[0].style.cssText,n.wrapper=t.addClass("k-widget k-timepicker k-header").addClass(i[0].className),i.css({width:"100%",height:i[0].style.height}),n._inputWrapper=e(t[0].firstChild)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),o=i?e("#"+i):n.closest("form");o[0]&&(t._resetHandler=function(){t.value(n[0].defaultValue),t.max(t._initialOptions.max),t.min(t._initialOptions.min)},t._form=o.on("reset",t._resetHandler))}}),g.plugin(u)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()});
//# sourceMappingURL=kendo.timepicker.min.js.map
