var ho=M.U(go,"AdfDhtmlInputNumberSpinboxPeer");v("AdfDhtmlInputNumberSpinboxPeer",ho);ho.m=function(){z.kb(AdfRichInputNumberSpinbox);M.ha(this,I.jb,I.Dd,I.Ve,I.Xf,I.Xc,I.ec,I.Wf);M.hb(this,AdfRichInputNumberSpinbox.DISABLED);this.Id=this.L9=n;this.DKa="increment";this.eJa="decrement";this.m6="_adfInc";this.D5="_adfDec"};v("AdfDhtmlInputNumberSpinboxPeer.InitSubclass",ho.m);ho.prototype.E3=function(a){return a.getStepSize()};z.a("AdfDhtmlInputNumberSpinboxPeer.prototype.GetStepSize",{E3:ho.prototype.E3});
ho.prototype.q=function(a,b){ho.f.q.call(this,a,b);var d=U.W(a,b),e=a.e(),f=M.g(e,ho.DKa),e=M.g(e,ho.eJa);b.setAttribute(ho.m6,f);b.setAttribute(ho.D5,e);if(!a.getReadOnly()&&!a.getDisabled()&&(d=xa.trim(d.value),""!=d)){if(f=a.getConverter())try{var g=f.getAsObject(d,n);g===k&&(g=d);d=parseFloat(g)}catch(h){}else d=parseFloat(d);g=io(a);f=jo(a);ko(this,b,d>=f,d<=g)}};z.a("AdfDhtmlInputNumberSpinboxPeer.prototype.InitDomElement",{q:ho.prototype.q});
ho.prototype.vb=function(a){this.d().getDisabled()||(a=this.bx(w.b.T(a.L())),lo(this,a)&&self.clearInterval(this.Id))};z.a("AdfDhtmlInputNumberSpinboxPeer.prototype.HandleComponentMouseOut",{vb:ho.prototype.vb});ho.prototype.qa=function(a){if(!this.d().getDisabled()&&(a=this.bx(w.b.T(a.L())),a=lo(this,a)))this.h(),this.L9=a,this.Id=self.setInterval(this.o(this.IXa),1E3)};z.a("AdfDhtmlInputNumberSpinboxPeer.prototype.HandleComponentMouseDown",{qa:ho.prototype.qa});
ho.prototype.C=function(a){var b=this.d();if(!b.getDisabled()&&(ho.f.C.call(this,a),a=this.bx(w.b.T(a.L())),a=lo(this,a)))"inc"==a?mo(this,l):"dec"==a&&mo(this,p),a=U.W(b),this.Yf(b,a)};z.a("AdfDhtmlInputNumberSpinboxPeer.prototype.HandleComponentClick",{C:ho.prototype.C});ho.prototype.Eb=function(a){var b=this.d();if(!b.getReadOnly())if(ho.f.Eb.call(this,a),a=no(this,b),isNaN(a))ko(this,n,l,l);else if(a==n)ko(this,n,p,p);else{var d=jo(b),b=io(b);ko(this,n,a>=d,a<=b)}};
z.a("AdfDhtmlInputNumberSpinboxPeer.prototype.HandleComponentBlur",{Eb:ho.prototype.Eb});ho.prototype.cc=function(a){this.d().getDisabled()||(a=this.bx(w.b.T(a.L())),lo(this,a)&&self.clearInterval(this.Id))};z.a("AdfDhtmlInputNumberSpinboxPeer.prototype.HandleComponentMouseUp",{cc:ho.prototype.cc});
ho.prototype.ba=function(a){this.Li(a);var b=w.b.ia(a.L()),d=this.d();switch(b){case E.$a:this.Yf(d,a.Q());break;case E.Ya:mo(this,l);this.Yf(d,a.Q());break;case E.Ja:mo(this,p);this.Yf(d,a.Q());break;case E.nm:a.L().ctrlKey&&d.getMaximum()!=n&&oo(this,d,d.getMaximum());break;case E.fi:a.L().ctrlKey&&d.getMinimum()!=n&&oo(this,d,d.getMinimum())}};z.a("AdfDhtmlInputNumberSpinboxPeer.prototype.HandleComponentKeyDown",{ba:ho.prototype.ba});ho.prototype.zb=function(a){this.Li(a)};
z.a("AdfDhtmlInputNumberSpinboxPeer.prototype.HandleComponentKeyPress",{zb:ho.prototype.zb});ho.prototype.Aa=function(){return mg.Hc()};z.a("AdfDhtmlInputNumberSpinboxPeer.prototype.GetInlineEditor",{Aa:ho.prototype.Aa});ho.prototype.Od=function(a,b,d){a=U.W(a,b);d==l?(H.n(b,M.gb),a.setAttribute("disabled","true"),ko(this,n,l,l)):(H.F(b,M.gb),ko(this,n,p,p),a.removeAttribute("disabled"))};z.a("AdfDhtmlInputNumberSpinboxPeer.prototype.ComponentDisabledChanged",{Od:ho.prototype.Od});
ho.prototype.IXa=function(){this.focus(this.d());self.clearInterval(this.Id);this.Id=self.setInterval(this.o(this.W_a),100)};ho.prototype.W_a=function(){"inc"==this.L9?mo(this,l):"dec"==this.L9&&mo(this,p)};function lo(a,b){if(b){var d=a.h(),e=d.getAttribute(ho.m6),d=d.getAttribute(ho.D5);return b.id==e?"inc":b.id==d?"dec":n}return n}
function mo(a,b){B.pc(b);var d=a.d(),e=no(a,d);if(!isNaN(e)){B.pc(b);var f=io(d),g=jo(d),h=a.E3(d),m=g-h,q=f+h,s=n;b==l?e==n?s=d.getMinimum()!=n?d.getMaximum()!=n?g:q:d.getMaximum()!=n?g:0:e>m?s=g:(s=e+h,s<f&&(s=f)):e==n?s=d.getMinimum()!=n?f:d.getMaximum()!=n?m:0:e<q?s=f:(s=e-h,s>g&&(s=g));e=d.getConverter();e instanceof eb&&(e=n);if(e&&s!=n)try{var y=e.getAsObject(e.getAsString(s,n),n);y!=n&&(s=y)}catch(A){}oo(a,d,s)}}
function no(a,b){var d=na.trim(U.W(b).value);if(""==d)return n;var e,f=b.getConverter();try{f&&(e=f.getAsObject(d,n)),e===k&&(e=parseFloat(d),isNaN(e)&&D.i.warning("inputNumberSpinbox: The value '",d,"' could not be converted to a number.")),d=e}catch(g){a.Yb(b,d),d=NaN}return d}
function oo(a,b,d){var e=b.getConverter();e instanceof eb&&(e=n);var f;if(e&&d!=n&&(f=e.getAsString(d,n),f==n)){D.i.warning("inputNumberSpinbox: The new value '",d,"' could not be converted for display.");return}var e=jo(b),g=io(b);ko(a,n,d>=e,d<=g);f!=n&&(d=f);d==n&&(d="");f=a.h();U.W(b,f).setAttribute("aria-valuenow",d.toString());a.xa(b,f,d.toString())}function io(a){a=a.getMinimum();a==n&&(a=-Number.MAX_VALUE);return a}function jo(a){a=a.getMaximum();a==n&&(a=Number.MAX_VALUE);return a}
ho.prototype.bx=function(a){var b=w.b;for("DIV"==b.Ga(a)&&a.children[0]&&(a=a.children[0]);a;){if("INPUT"==b.Ga(a)||"LABEL"==b.Ga(a))return n;if("A"==b.Ga(a))return a;a=a.parentNode}};function ko(a,b,d,e){B.Kr(b);B.pc(d);B.pc(e);var f=w.b;b=b?b:a.h();a=f.getElementById(b.getAttribute(ho.m6));f=f.getElementById(b.getAttribute(ho.D5));H.td(e,f,M.gb);H.td(d,a,M.gb);H.td(e,f.parentNode,M.gb);H.td(d,a.parentNode,M.gb)};