function kc(a){this.Init(a)}v("AdfRichPlainTextEditor",kc);z.l(kc,jc);kc.w$=0;kc.prototype.Init=function(a){B.s(a);kc.f.Init.call(this);this.vf=a};z.a("AdfRichPlainTextEditor.prototype.Init",{Init:kc.prototype.Init});kc.prototype.IE=function(){return this.Uf()!=n};z.a("AdfRichPlainTextEditor.prototype.PreEdit",{IE:kc.prototype.IE});kc.prototype.eR=r("vf");z.a("AdfRichPlainTextEditor.prototype.getEditedProperty",{eR:kc.prototype.eR});
kc.prototype.wD=function(a,b){kc.f.wD.call(this,a,b);var d=this.qq().w(),e=d.createElement("input");e.type="text";var f=w.b,g=a.r(this.vf);e.value=g;a.gya=g;g=this.Uf();f.Qr(g,e);var h=e.style;h.position="absolute";h.MozBoxSizing&&(h.MozBoxSizing=n);h.zIndex=1;kc.VH=e;kc.w$="left"==h.textAlign?20:0;d=d.body;d.insertBefore(e,d.firstChild);lc(e,g);g.style.visibility="hidden";O.EC(e,1);d=kc.Lta;f.S(e,"keyup",d);f.S(e,"keypress",d);a.addEventListener("propertyChange",this.gAa,this);f.hh(e,kc.Xva)};
z.a("AdfRichPlainTextEditor.prototype.startEdit",{wD:kc.prototype.wD});kc.prototype.dq=function(){this.zg().setProperty(this.vf,kc.VH.value,l);var a=this.zg();a.gya=n;a.removeEventListener("propertyChange",this.gAa,this);var a=kc.VH,b=w.b,d=kc.Lta;b.sa(a,"keypress",d);b.sa(a,"keyup",d);b.On(a,kc.Xva);b=this.Uf();b.ownerDocument.body.removeChild(a);b.style.visibility="visible";kc.VH=n;kc.w$=0;kc.f.dq.call(this)};z.a("AdfRichPlainTextEditor.prototype.stopEdit",{dq:kc.prototype.dq});
kc.prototype.Uf=function(){return this.qq().h()};z.a("AdfRichPlainTextEditor.prototype.GetEditedDomElement",{Uf:kc.prototype.Uf});kc.Lta=function(){var a=F.c.zg();a!=n&&(a=a.k().Hc(a),a!=n&&(B.J(a,kc),a.zg().setProperty(a.vf,kc.VH.value,l)))};
kc.Xva=function(a){a=a?a:window.event;var b=F.c.zg();if(b!=n&&(b=b.k().Hc(b),b!=n))if(B.J(b,kc),"blur"==a.type)F.c.ws(n,a);else if("keyup"==a.type)switch(w.b.ia(a)){case E.xh:b=b.zg();kc.VH.value=b.gya;F.c.ws(n,a);break;case E.$a:(a.altKey||!a.ctrlKey&&!a.shiftKey)&&F.c.ws(n,a);break;case E.Df:F.c.ws(n,a)}};kc.prototype.gAa=function(a){if(a.kJ()==this.vf){var b=kc.VH,d=this.Uf();lc(b,d);a=a.Ou();a==n&&(a="");b.value!=a&&(b.value=a)}};
function lc(a,b){var d=a.style,e=w.b,f=e.Uc(b),g=f.left;d.top=f.top+"px";d.left=g+"px";e.ys(a,b.offsetWidth+kc.w$);e.Hg(a,b.offsetHeight)};