function pc(a){this.Init(a)}m("AdfRichPlainTextEditor",pc);r.v(pc,nc);pc.Vja=0;pc.prototype.Init=function(a){u.J(a);pc.h.Init.call(this);this.ng=a};r.a("AdfRichPlainTextEditor.prototype.Init",{Init:pc.prototype.Init});pc.prototype.YJ=function(){return null!=this.Pg()};r.a("AdfRichPlainTextEditor.prototype.PreEdit",{YJ:pc.prototype.YJ});pc.prototype.NY=function(){return this.ng};r.a("AdfRichPlainTextEditor.prototype.getEditedProperty",{NY:pc.prototype.NY});
pc.prototype.xI=function(a,b){pc.h.xI.call(this,a,b);var d=this.Zs().R(),e=d.createElement("input");e.type="text";var f=q.b,g=a.K(this.ng);e.value=g;a.HNa=g;g=this.Pg();f.Fu(g,e);var h=e.style;h.position="absolute";h.MozBoxSizing&&(h.MozBoxSizing=null);h.zIndex=1;pc.SN=e;pc.Vja="left"==h.textAlign?20:0;d=d.body;d.insertBefore(e,d.firstChild);qc(e,g);g.style.visibility="hidden";J.CO(e,1);d=pc.cIa;f.ba(e,"keyup",d);f.ba(e,"keypress",d);a.addEventListener("propertyChange",this.ZPa,this);f.hi(e,pc.iLa)};
r.a("AdfRichPlainTextEditor.prototype.startEdit",{xI:pc.prototype.xI});pc.prototype.Os=function(){this.xh().setProperty(this.ng,pc.SN.value,!0);var a=this.xh();a.HNa=null;a.removeEventListener("propertyChange",this.ZPa,this);var a=pc.SN,b=q.b,d=pc.cIa;b.xa(a,"keypress",d);b.xa(a,"keyup",d);b.nq(a,pc.iLa);b=this.Pg();b.ownerDocument.body.removeChild(a);b.style.visibility="visible";pc.SN=null;pc.Vja=0;pc.h.Os.call(this)};r.a("AdfRichPlainTextEditor.prototype.stopEdit",{Os:pc.prototype.Os});
pc.prototype.Pg=function(){return this.Zs().i()};r.a("AdfRichPlainTextEditor.prototype.GetEditedDomElement",{Pg:pc.prototype.Pg});pc.cIa=function(){var a=A.c.xh();null!=a&&(a=a.o().jd(a),null!=a&&(u.s(a,pc),a.xh().setProperty(a.ng,pc.SN.value,!0)))};
pc.iLa=function(a){a=a?a:window.event;var b=A.c.xh();if(null!=b&&(b=b.o().jd(b),null!=b))if(u.s(b,pc),"blur"==a.type)A.c.sv(null,a);else if("keyup"==a.type)switch(q.b.na(a)){case w.Ih:b=b.xh();pc.SN.value=b.HNa;A.c.sv(null,a);break;case w.jb:(a.altKey||!a.ctrlKey&&!a.shiftKey)&&A.c.sv(null,a);break;case w.tf:A.c.sv(null,a)}};pc.prototype.ZPa=function(a){if(a.lP()==this.ng){var b=pc.SN,d=this.Pg();qc(b,d);a=a.no();null==a&&(a="");b.value!=a&&(b.value=a)}};
function qc(a,b){var d=a.style,e=q.b,f=e.rd(b),g=f.left;d.top=f.top+"px";d.left=g+"px";e.uv(a,b.offsetWidth+pc.Vja);e.Fh(a,b.offsetHeight)};