/** 
 * 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.numerictextbox.min",["kendo.core.min","kendo.userevents.min"],e)}(function(){return function(e,t){function n(e,t){var n="k-i-arrow-"+("increase"===e?"n":"s");return'<span unselectable="on" class="k-link k-link-'+e+'" aria-label="'+t+'" title="'+t+'"><span unselectable="on" class="k-icon '+n+'"></span></span>'}function r(e,t){var n=(""+parseFloat(e,10)).split(E);return n[1]&&(n[1]=n[1].substring(0,t)),n.join(E)}var a=window.kendo,o=a.caret,s=a.keys,i=a.ui,l=i.Widget,u=a._activeElement,p=a._extractFormat,d=a.parseFloat,c=a.support.placeholder,_=a.getCulture,f="change",m="disabled",v="readonly",x="k-input",g="spin",h=".kendoNumericTextBox",w="touchend",y="mouseleave"+h,k="mouseenter"+h+" "+y,b="k-state-default",T="k-state-focused",A="k-state-hover",C="focus",E=".",H="k-state-selected",D="k-state-disabled",O="aria-disabled",R="aria-readonly",N=/^(-)?(\d*)$/,W=null,j=e.proxy,F=e.extend,K=l.extend({init:function(n,r){var o,s,i,u,d,c=this,_=r&&r.step!==t;l.fn.init.call(c,n,r),r=c.options,n=c.element.on("focusout"+h,j(c._focusout,c)).attr("role","spinbutton"),r.placeholder=r.placeholder||n.attr("placeholder"),c._initialOptions=F({},r),o=c.min(n.attr("min")),s=c.max(n.attr("max")),i=c._parse(n.attr("step")),r.min===W&&o!==W&&(r.min=o),r.max===W&&s!==W&&(r.max=s),_||i===W||(r.step=i),c._reset(),c._wrapper(),c._arrows(),c._input(),a.support.mobileOS?c._text.on(w+h+" "+C+h,function(){a.support.browser.edge?c._text.one(C+h,function(){c._toggleText(!1),n.focus()}):(c._toggleText(!1),n.focus())}):c._text.on(C+h,j(c._click,c)),n.attr("aria-valuemin",r.min).attr("aria-valuemax",r.max),r.format=p(r.format),u=r.value,c.value(u!==W?u:n.val()),d=n.is("[disabled]")||e(c.element).parents("fieldset").is(":disabled"),d?c.enable(!1):c.readonly(n.is("[readonly]")),a.notify(c)},options:{name:"NumericTextBox",decimals:W,restrictDecimals:!1,min:W,max:W,value:W,step:1,round:!0,culture:"",format:"n",spinners:!0,placeholder:"",upArrowText:"Increase value",downArrowText:"Decrease value"},events:[f,g],_editable:function(e){var t=this,n=t.element,r=e.disable,a=e.readonly,o=t._text.add(n),s=t._inputWrapper.off(k);t._toggleText(!0),t._upArrowEventHandler.unbind("press"),t._downArrowEventHandler.unbind("press"),n.off("keydown"+h).off("keypress"+h).off("paste"+h),a||r?(s.addClass(r?D:b).removeClass(r?b:D),o.attr(m,r).attr(v,a).attr(O,r).attr(R,a)):(s.addClass(b).removeClass(D).on(k,t._toggleHover),o.removeAttr(m).removeAttr(v).attr(O,!1).attr(R,!1),t._upArrowEventHandler.bind("press",function(e){e.preventDefault(),t._spin(1),t._upArrow.addClass(H)}),t._downArrowEventHandler.bind("press",function(e){e.preventDefault(),t._spin(-1),t._downArrow.addClass(H)}),t.element.on("keydown"+h,j(t._keydown,t)).on("keypress"+h,j(t._keypress,t)).on("paste"+h,j(t._paste,t)))},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;e.element.add(e._text).add(e._upArrow).add(e._downArrow).add(e._inputWrapper).off(h),e._upArrowEventHandler.destroy(),e._downArrowEventHandler.destroy(),e._form&&e._form.off("reset",e._resetHandler),l.fn.destroy.call(e)},min:function(e){return this._option("min",e)},max:function(e){return this._option("max",e)},step:function(e){return this._option("step",e)},value:function(e){var n,r=this;return e===t?r._value:(e=r._parse(e),n=r._adjust(e),e===n&&(r._update(e),r._old=r._value),t)},focus:function(){this._focusin()},_adjust:function(e){var t=this,n=t.options,r=n.min,a=n.max;return e===W?e:(r!==W&&e<r?e=r:a!==W&&e>a&&(e=a),e)},_arrows:function(){var t,r=this,o=function(){clearTimeout(r._spinning),t.removeClass(H)},s=r.options,i=s.spinners,l=r.element;t=l.siblings(".k-icon"),t[0]||(t=e(n("increase",s.upArrowText)+n("decrease",s.downArrowText)).insertAfter(l),t.wrapAll('<span class="k-select"/>')),i||(t.parent().toggle(i),r._inputWrapper.addClass("k-expand-padding")),r._upArrow=t.eq(0),r._upArrowEventHandler=new a.UserEvents(r._upArrow,{release:o}),r._downArrow=t.eq(1),r._downArrowEventHandler=new a.UserEvents(r._downArrow,{release:o})},_blur:function(){var e=this;e._toggleText(!0),e._change(e.element.val())},_click:function(e){var t=this;clearTimeout(t._focusing),t._focusing=setTimeout(function(){var n,r,a,s=e.target,i=o(s)[0],l=s.value.substring(0,i),u=t._format(t.options.format),p=u[","],d=0;p&&(r=RegExp("\\"+p,"g"),a=RegExp("([\\d\\"+p+"]+)(\\"+u[E]+")?(\\d+)?")),a&&(n=a.exec(l)),n&&(d=n[0].replace(r,"").length,l.indexOf("(")!=-1&&t._value<0&&d++),t._focusin(),o(t.element[0],d)})},_change:function(e){var t=this;t._update(e),e=t._value,t._old!=e&&(t._old=e,t._typing||t.element.trigger(f),t.trigger(f)),t._typing=!1},_culture:function(e){return e||_(this.options.culture)},_focusin:function(){var e=this;e._inputWrapper.addClass(T),e._toggleText(!1),e.element[0].focus()},_focusout:function(){var e=this;clearTimeout(e._focusing),e._inputWrapper.removeClass(T).removeClass(A),e._blur()},_format:function(e,t){var n=this._culture(t).numberFormat;return e=e.toLowerCase(),e.indexOf("c")>-1?n=n.currency:e.indexOf("p")>-1&&(n=n.percent),n},_input:function(){var t,n=this,r=n.options,a="k-formatted-value",o=n.element.addClass(x).show()[0],s=o.accessKey,i=n.wrapper;t=i.find(E+a),t[0]||(t=e('<input type="text"/>').insertBefore(o).addClass(a));try{o.setAttribute("type","text")}catch(l){o.type="text"}n._initialTitle=o.title,t[0].title=o.title,t[0].tabIndex=o.tabIndex,t[0].style.cssText=o.style.cssText,t.prop("placeholder",r.placeholder),s&&(t.attr("accesskey",s),o.accessKey=""),n._text=t.addClass(o.className).attr({role:"spinbutton","aria-valuemin":r.min,"aria-valuemax":r.max})},_keydown:function(e){var t=this,n=e.keyCode;t._key=n,n==s.DOWN?t._step(-1):n==s.UP?t._step(1):n==s.ENTER?t._change(t.element.val()):t._typing=!0},_keypress:function(e){var t,n,r,a,i,l,u,p,d,c,_;0===e.which||e.metaKey||e.ctrlKey||e.keyCode===s.BACKSPACE||e.keyCode===s.ENTER||(t=this,n=t.options.min,r=t.element,a=o(r),i=a[0],l=a[1],u=String.fromCharCode(e.which),p=t._format(t.options.format),d=t._key===s.NUMPAD_DOT,c=r.val(),d&&(u=p[E]),c=c.substring(0,i)+u+c.substring(l),_=t._numericRegex(p).test(c),_&&d?(r.val(c),o(r,i+u.length),e.preventDefault()):(null!==n&&n>=0&&"-"===c.charAt(0)||!_)&&e.preventDefault(),t._key=0)},_numericRegex:function(e){var t=this,n=e[E],r=t.options.decimals,a="*";return n===E&&(n="\\"+n),r===W&&(r=e.decimals),0===r?N:(t.options.restrictDecimals&&(a="{0,"+r+"}"),t._separator!==n&&(t._separator=n,t._floatRegExp=RegExp("^(-)?(((\\d+("+n+"\\d"+a+")?)|("+n+"\\d"+a+")))?$")),t._floatRegExp)},_paste:function(e){var t=this,n=e.target,r=n.value,a=t._format(t.options.format);setTimeout(function(){var e=t._parse(n.value),o=t._numericRegex(a).test(n.value);e!==W&&t._adjust(e)===e&&o||t._update(r)})},_option:function(e,n){var r=this,a=r.element,o=r.options;return n===t?o[e]:(n=r._parse(n),(n||"step"!==e)&&(o[e]=n,a.add(r._text).attr("aria-value"+e,n),a.attr(e,n)),t)},_spin:function(e,t){var n=this;t=t||500,clearTimeout(n._spinning),n._spinning=setTimeout(function(){n._spin(e,50)},t),n._step(e)},_step:function(e){var t=this,n=t.element,r=t._parse(n.val())||0;u()!=n[0]&&t._focusin(),r+=t.options.step*e,t._update(t._adjust(r)),t._typing=!1,t.trigger(g)},_toggleHover:function(t){e(t.currentTarget).toggleClass(A,"mouseenter"===t.type)},_toggleText:function(e){var t=this;t._text.toggle(e),t.element.toggle(!e)},_parse:function(e,t){return d(e,this._culture(t),this.options.format)},_round:function(e,t){var n=this.options.round?a._round:r;return n(e,t)},_update:function(e){var t,n=this,r=n.options,o=r.format,s=r.decimals,i=n._culture(),l=n._format(o,i);s===W&&(s=l.decimals),e=n._parse(e,i),t=e!==W,t&&(e=parseFloat(n._round(e,s),10)),n._value=e=n._adjust(e),n._placeholder(a.toString(e,o,i)),t?(e=""+e,e.indexOf("e")!==-1&&(e=n._round(+e,s)),e=e.replace(E,l[E])):e="",n.element.val(e),n.element.add(n._text).attr("aria-valuenow",e)},_placeholder:function(e){var t=this._text;t.val(e),c||e||t.val(this.options.placeholder),t.attr("title",this._initialTitle||t.val()),t.attr("aria-title",this._initialTitle||t.val())},_wrapper:function(){var t,n=this,r=n.element,a=r[0];t=r.parents(".k-numerictextbox"),t.is("span.k-numerictextbox")||(t=r.hide().wrap('<span class="k-numeric-wrap k-state-default" />').parent(),t=t.wrap("<span/>").parent()),t[0].style.cssText=a.style.cssText,a.style.width="",n.wrapper=t.addClass("k-widget k-numerictextbox").addClass(a.className).css("display",""),n._inputWrapper=e(t[0].firstChild)},_reset:function(){var t=this,n=t.element,r=n.attr("form"),a=r?e("#"+r):n.closest("form");a[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(n[0].value),t.max(t._initialOptions.max),t.min(t._initialOptions.min)})},t._form=a.on("reset",t._resetHandler))}});i.plugin(K)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()});
//# sourceMappingURL=kendo.numerictextbox.min.js.map
