function pc(a){this.Init(a)}m("AdfRichPlainTextEditor",pc);r.v(pc,nc);pc.Yja=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.$s().R(),e=d.createElement("input");e.type="text";var f=q.b,g=a.K(this.ng);e.value=g;a.MNa=g;g=this.Pg();f.Gu(g,e);var h=e.style;h.position="absolute";h.MozBoxSizing&&(h.MozBoxSizing=null);h.zIndex=1;pc.SN=e;pc.Yja="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.gIa;f.ba(e,"keyup",d);f.ba(e,"keypress",d);a.addEventListener("propertyChange",this.dQa,this);f.hi(e,pc.nLa)};
r.a("AdfRichPlainTextEditor.prototype.startEdit",{xI:pc.prototype.xI});pc.prototype.Ps=function(){this.yh().setProperty(this.ng,pc.SN.value,!0);var a=this.yh();a.MNa=null;a.removeEventListener("propertyChange",this.dQa,this);var a=pc.SN,b=q.b,d=pc.gIa;b.xa(a,"keypress",d);b.xa(a,"keyup",d);b.nq(a,pc.nLa);b=this.Pg();b.ownerDocument.body.removeChild(a);b.style.visibility="visible";pc.SN=null;pc.Yja=0;pc.h.Ps.call(this)};r.a("AdfRichPlainTextEditor.prototype.stopEdit",{Ps:pc.prototype.Ps});
pc.prototype.Pg=function(){return this.$s().i()};r.a("AdfRichPlainTextEditor.prototype.GetEditedDomElement",{Pg:pc.prototype.Pg});pc.gIa=function(){var a=A.c.yh();null!=a&&(a=a.o().jd(a),null!=a&&(u.s(a,pc),a.yh().setProperty(a.ng,pc.SN.value,!0)))};
pc.nLa=function(a){a=a?a:window.event;var b=A.c.yh();if(null!=b&&(b=b.o().jd(b),null!=b))if(u.s(b,pc),"blur"==a.type)A.c.uv(null,a);else if("keyup"==a.type)switch(q.b.na(a)){case w.Ih:b=b.yh();pc.SN.value=b.MNa;A.c.uv(null,a);break;case w.jb:(a.altKey||!a.ctrlKey&&!a.shiftKey)&&A.c.uv(null,a);break;case w.tf:A.c.uv(null,a)}};pc.prototype.dQa=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.wv(a,b.offsetWidth+pc.Yja);e.Fh(a,b.offsetHeight)};