var $e=I.ea(O,"AdfDhtmlInputBasePeer");m("AdfDhtmlInputBasePeer",$e);$e.C=function(){I.hc(this,AdfUIEditableValue.SUBMITTED_VALUE);I.ra(this,D.Oc,D.Nd);this.NK="data-afr-lastvalue"};m("AdfDhtmlInputBasePeer.InitSubclass",$e.C);$e.prototype.Qa=function(a){$e.h.Qa.call(this,a);this.Mna=!1};r.a("AdfDhtmlInputBasePeer.prototype.initialize",{Qa:$e.prototype.Qa});$e.prototype.jq=function(){return!0};r.a("AdfDhtmlInputBasePeer.prototype.needsFocusTargetStyleClass",{jq:$e.prototype.jq});
$e.prototype.hv=function(){var a=document.activeElement,b=O.da(this.f());a==b&&(this.Mna=!0)};r.a("AdfDhtmlInputBasePeer.prototype.preventNextValueSubmission",{hv:$e.prototype.hv});$e.prototype.Ta=function(a){if(a.ce()==Qa.Ef&&($e.h.Ta.call(this,a),a=a.X(),!this.Wq())){var b=this.f(),b=O.da(b);a==b&&$e.wl(b)}};r.a("AdfDhtmlInputBasePeer.prototype.HandleComponentFocus",{Ta:$e.prototype.Ta});$e.prototype.xza=function(a){a=O.da(a);$e.wl(a)};r.a("AdfDhtmlInputBasePeer.prototype.UpdateLastValue",{xza:$e.prototype.xza});
$e.ks=function(a){return(a=q.b.yh(a,$e.NK))?a:""};m("AdfDhtmlInputBasePeer.getLastValue",$e.ks);$e.wl=function(a,b){void 0===b&&(b=a.value);q.b.tg(a,$e.NK,b)};m("AdfDhtmlInputBasePeer.setLastValue",$e.wl);$e.prototype.Lb=function(a){if(a.ce()==Qa.Ef){var b=this.f();a=a.X();this.Wq()||this.nd(b,a,!0)}};r.a("AdfDhtmlInputBasePeer.prototype.HandleComponentBlur",{Lb:$e.prototype.Lb});$e.prototype.d3=function(a){this.Wq()||this.nd(a,O.da(a),!0)};r.a("AdfDhtmlInputBasePeer.prototype.__simulateBlur",{d3:$e.prototype.d3});
$e.prototype.nd=function(a,b,d){if(this.Ll(a)){var e=O.da(a);if(b==e){b=$e.ks(e);var f=e.value;if(void 0===d){d=this.zc(f);var g=a.getRequired();d=d&&(g||A.c.gY)?!1:!0}d&&f==b||($e.wl(e,f),this.cc(a,f))}}};r.a("AdfDhtmlInputBasePeer.prototype.RunValidation",{nd:$e.prototype.nd});$e.prototype.Wq=function(){return!1};r.a("AdfDhtmlInputBasePeer.prototype.VetoBlurValidation",{Wq:$e.prototype.Wq});$e.prototype.Wa=function(a,b){var d=O.da(a,b);return a.getReadOnly()?q.b.mc(d):d.value};
r.a("AdfDhtmlInputBasePeer.prototype.GetSubmittedValue",{Wa:$e.prototype.Wa});$e.prototype.Po=function(){return!0};r.a("AdfDhtmlInputBasePeer.prototype.ShouldShowHint",{Po:$e.prototype.Po});$e.prototype.Oq=function(){return!0};r.a("AdfDhtmlInputBasePeer.prototype.NeedsSpuriousDirtyValueTracking",{Oq:$e.prototype.Oq});$e.prototype.Ll=function(a){return this.Mna?this.Mna=!1:$e.h.Ll.call(this,a)};r.a("AdfDhtmlInputBasePeer.prototype.WasSubmitted",{Ll:$e.prototype.Ll});
$e.prototype.OQ=function(a,b){if(a&&a.getMaximumLength){var d=a.getMaximumLength();if(null==d||1>d)return!1;var e;if(b.value){e=b.value;var f=a.getCharacterCountBy();null!=f&&(f=f.toLowerCase());var g=e.length,h=0;switch(f){case "codepoint":for(f=0;f<g;f++)55296===(e.charCodeAt(f)&63488)&&h++;u.assert(0===h%2,"the number of surrogate chars must be an even number.");e=g-h/2;break;default:e=g}}else e=0;if(e>=d){if(e>d){e=O.da(a);var g=e.selectionStart,h=e.selectionEnd,f=b.value,l=a.getCharacterCountBy();
null!=l&&(l=l.toLowerCase());var n=f.length,t=0,y,z;switch(l){case "codepoint":for(y=0;y<n&&0>t;y++)55296===(f.charCodeAt(y)&63488)&&(y++,u.assert(55296===(f.charCodeAt(y)&63488),"Skipped over a non-surrogate pair character.")),t++;l=y;t=0;for(z=y;z<n&&t<d;z++)55296===(f.charCodeAt(z)&63488)&&(z++,u.assert(55296===(f.charCodeAt(z)&63488),"Skipped over a non-surrogate pair character.")),t++;d=f.substr(l,z-y);break;default:d=f.substr(0,d)}b.value=d;e.selectionStart=g;e.selectionEnd=h}return!0}}return!1};
r.a("AdfDhtmlInputBasePeer.prototype.CheckLength",{OQ:$e.prototype.OQ});