/*! formstone v0.8.29 [number.js] 2015-11-25 | MIT License | formstone.it */ !function(a,b){"use strict";function c(){s=b.$body}function d(a){var b=parseFloat(this.attr("min")),c=parseFloat(this.attr("max"));a.min=b||0===b?b:!1,a.max=c||0===c?c:!1,a.step=parseFloat(this.attr("step"))||1,a.timer=null,a.digits=l(a.step),a.disabled=this.is(":disabled")||this.is("[readonly]");var d="";d+='",d+='",this.wrap('
').after(d),a.$container=this.parent(o.base),a.$arrows=a.$container.find(o.arrow),this.on(q.keyPress,o.element,a,h),a.$container.on([q.touchStart,q.mouseDown].join(" "),o.arrow,a,i)}function e(a){a.$arrows.remove(),this.unwrap().off(q.namespace)}function f(a){a.disabled&&(this.prop("disabled",!1),a.$container.removeClass(p.disabled),a.disabled=!1)}function g(a){a.disabled||(this.prop("disabled",!0),a.$container.addClass(p.disabled),a.disabled=!0)}function h(a){var b=a.data;(38===a.keyCode||40===a.keyCode)&&(a.preventDefault(),k(b,38===a.keyCode?b.step:-b.step))}function i(b){r.killEvent(b),j(b);var c=b.data;if(!c.disabled){var d=a(b.target).hasClass(p.up)?c.step:-c.step;c.timer=r.startTimer(c.timer,300,function(){c.timer=r.startTimer(c.timer,125,function(){k(c,d,!1)},!0)}),k(c,d),s.on([q.touchEnd,q.mouseUp].join(" "),c,j)}}function j(a){r.killEvent(a);var b=a.data;r.clearTimer(b.timer,!0),s.off(q.namespace)}function k(b,c){var d=parseFloat(b.$el.val()),e=c;"undefined"===a.type(d)||isNaN(d)?e=b.min!==!1?b.min:0:b.min!==!1&&d