var $k=M.U(xe,"AdfDhtmlInputColorPeer");v("AdfDhtmlInputColorPeer",$k);$k.Rq="lastUsedColor";
$k.m=function(){z.kb(AdfUIValue);z.kb(AdfRichChooseColor);z.kb(AdfRichInputColor);z.kb(Zk);z.kb($m);M.$b(this,AdfRichInputColor.COLOR_DATA,AdfRichInputColor.CUSTOM_COLOR_DATA,AdfRichInputColor.DEFAULT_COLOR,AdfRichInputColor.WIDTH,AdfRichInputColor.LABEL);M.ha(this,I.tc,I.ec,I.Wf,I.jb);M.hb(this,AdfRichInputColor.LABEL,AdfRichInputColor.DISABLED,AdfRichInputColor.CUSTOM_COLOR_DATA);M.ui(this,$k.Rq,AdfRichInputColor.CUSTOM_COLOR_DATA);this.jA="glyph";this.bra="swatch";this.rA="icPopWrap";this.Mpa=
"icPop";this.Ppa=M.g(this.rA,this.Mpa);this.yW=new TrColorConverter(["#RRGGBB"],l)};v("AdfDhtmlInputColorPeer.InitSubclass",$k.m);$k.gG=function(a){return a==n?n:this.yW.getAsString(a)};$k.prototype.rJ=function(a,b,d){(a.getChooseId()==n||b==AdfUIValue.VALUE)&&a.setProperty(b,d)};z.a("AdfDhtmlInputColorPeer.prototype.handleUpdateFromChooseComponent",{rJ:$k.prototype.rJ});$k.prototype.qJ=function(a){this.MG(a);this.cia(a);this.Yb(a);this.RP=1};
z.a("AdfDhtmlInputColorPeer.prototype.handleReturnFromChooseComponent",{qJ:$k.prototype.qJ});$k.prototype.cia=function(a){!a.getReadOnly()&&!a.getDisabled()&&(this.Jh(a)?(a=a.e(),subid=M.g(a,$k.jA),a=w.b.getElementById(subid),O.ra(a)):(a=U.W(a),"INPUT"==w.b.Ga(a)&&(O.ra(a),a.value=a.value)))};z.a("AdfDhtmlInputColorPeer.prototype.returnFocus",{cia:$k.prototype.cia});$k.prototype.H0=function(a){var b=al.getChooseId(a,AdfRichInputColor.CHOOSE_ID);b!=n&&al.zS(a,b,AdfUIValue.VALUE,Zk.Co)};
z.a("AdfDhtmlInputColorPeer.prototype.initChooseComponentValue",{H0:$k.prototype.H0});$k.prototype.cE=function(a){return an(a,AdfRichChooseColor.CUSTOM_COLOR_DATA)};z.a("AdfDhtmlInputColorPeer.prototype.GetComponentCustomColorData",{cE:$k.prototype.cE});$k.prototype.GK=function(a){return an(a,AdfRichChooseColor.COLOR_DATA)};z.a("AdfDhtmlInputColorPeer.prototype.GetComponentColorData",{GK:$k.prototype.GK});$k.prototype.HK=function(a){return an(a,AdfRichChooseColor.DEFAULT_COLOR)};
z.a("AdfDhtmlInputColorPeer.prototype.GetComponentDefaultColor",{HK:$k.prototype.HK});$k.prototype.JK=function(a){return an(a,AdfRichChooseColor.WIDTH)};z.a("AdfDhtmlInputColorPeer.prototype.GetComponentWidth",{JK:$k.prototype.JK});$k.prototype.IK=function(a){return an(a,Zk.Rq)};z.a("AdfDhtmlInputColorPeer.prototype.GetComponentLastUsedColor",{IK:$k.prototype.IK});$k.prototype.q=function(a,b){$k.f.q.call(this,a,b);return F.c.oa(this,this.tXa,a.e(),0)};
z.a("AdfDhtmlInputColorPeer.prototype.InitDomElement",{q:$k.prototype.q});$k.prototype.Oc=function(a,b){$k.f.Oc.call(this,a,b);if(!a.getConverter()){var d=new TrColorConverter(["RRGGBB","#RRGGBB","r,g,b"],l,"RRGGBB #RRGGBB r,g,b",{});a.setProperty("converter",d,p,J.Pc)}};z.a("AdfDhtmlInputColorPeer.prototype.LazyInitialize",{Oc:$k.prototype.Oc});$k.prototype.Ad=function(a){return this.rB(a)||F.c.OM!=R.xT&&(a=U.W(a),F.c.Qc!=a)?l:$k.f.Ad.call(this)};
z.a("AdfDhtmlInputColorPeer.prototype.VetoShowNoteWindow",{Ad:$k.prototype.Ad});$k.prototype.C=function(a){$k.f.C.call(this,a);var b=a.oh(),d=a.getSource();b==d&&(b.getDisabled()||bn(this,b,a))};z.a("AdfDhtmlInputColorPeer.prototype.HandleComponentClick",{C:$k.prototype.C});$k.prototype.Ha=function(a){$k.f.Ha.call(this,a);a=this.d();var b=al.getChooseId(a);b!=n&&al.QR(l,b,a.e())};z.a("AdfDhtmlInputColorPeer.prototype.HandleComponentFocus",{Ha:$k.prototype.Ha});
$k.prototype.ba=function(a){this.Li(a);var b=a.oh(),d=w.b,e=a.L(),d=d.ia(e);if(!e.ctrlKey)switch(d){case E.$a:this.Yf(b,a.Q());case E.Ja:bn(this,b,a);break;case E.xh:bn(this,b,a)}};z.a("AdfDhtmlInputColorPeer.prototype.HandleComponentKeyDown",{ba:$k.prototype.ba});$k.prototype.zb=function(a){this.Li(a)};z.a("AdfDhtmlInputColorPeer.prototype.HandleComponentKeyPress",{zb:$k.prototype.zb});$k.prototype.Aa=function(){return mg.Hc()};z.a("AdfDhtmlInputColorPeer.prototype.GetInlineEditor",{Aa:$k.prototype.Aa});
$k.prototype.Od=function(a,b,d){var e=a.e(),e=M.g(e,$k.jA),e=w.b.getElementById(e);a=U.W(a,b);d==l?(H.n(b,M.gb),e.style.display="none",a.setAttribute("disabled","true")):(H.F(b,M.gb),e.style.display="block",a.removeAttribute("disabled"))};z.a("AdfDhtmlInputColorPeer.prototype.ComponentDisabledChanged",{Od:$k.prototype.Od});$k.prototype.wK=function(a,b,d,e){e!=d&&(b=cn(a),al.zS(a,b,AdfRichInputColor.CUSTOM_COLOR_DATA,AdfRichChooseColor.CUSTOM_COLOR_DATA))};
z.a("AdfDhtmlInputColorPeer.prototype.ComponentCustomColorDataChanged",{wK:$k.prototype.wK});u=$k.prototype;u.an=function(a){return M.g(a.e(),$k.rA)};u.dB=function(a){a=this.an(a);return F.c.j(a)};u.rB=function(a){a=this.dB(a);return a!=n&&a.Qa()};u.MG=function(a){a=this.dB(a);a!=n&&a.Qa()&&a.rb()};function bn(a,b,d){var e=d.Q(),f=M.g(b.e(),$k.jA);a.Waa(e,f)&&(b=a.dB(b),b!=n&&(b.Qa()?b.rb():(a.sm(),b.show({align:AdfRichPopup.of,alignId:f,focus:l}))),d.cancel())}
u.$k=function(a,b,d,e){$k.f.$k.call(this,a,b,d,e);b=M.g(a.e(),$k.bra);b=w.b.getElementById(b);e=$k.gG(d);e==n?(b.alt=b.title=F.c.u().V("af_chooseColor.TIP_NO_COLOR"),b.style.backgroundColor="Transparent"):(d!=n&&0==d.alpha?(e="Transparent",b.alt=b.title=F.c.u().V("af_chooseColor.TIP_TRAN_NO_COLOR")):b.alt=b.title=e.substring(1),b.style.backgroundColor=e);d=cn(a);al.zS(a,d,AdfUIValue.VALUE,Zk.Co)};z.a("AdfDhtmlInputColorPeer.prototype.ComponentValueChanged",{$k:$k.prototype.$k});
$k.prototype.Va=function(a,b,d){d==$k.Mpa&&(a=a.e(),a=M.g(a,$k.rA),(a=w.b.getElementById(a))&&a.appendChild(b))};z.a("AdfDhtmlInputColorPeer.prototype.PopupClosed",{Va:$k.prototype.Va});$k.prototype.xa=function(a,b,d){B.s(d);b=U.W(a,b);var e="INPUT"==w.b.Ga(b);a.getReadOnly()?w.b.yb(b,d):(b.title=d,e?b.value=d:w.b.yb(b,d))};z.a("AdfDhtmlInputColorPeer.prototype.SetDisplayValue",{xa:$k.prototype.xa});
$k.prototype.pd=function(a,b){if(this.Jh(a)){var d=a.e();return w.b.getElementById(M.g(d,$k.bra))}return $k.f.pd.call(this,a,b)};z.a("AdfDhtmlInputColorPeer.prototype.GetNoteWindowAlignmentNode",{pd:$k.prototype.pd});$k.prototype.zm=function(a){return a.getCompact()==l?p:l};z.a("AdfDhtmlInputColorPeer.prototype.ShouldShowHint",{zm:$k.prototype.zm});function an(a,b){var d;d=M.g(a.e(),$k.Ppa);d=F.c.j(d);return d!=n?d.r(b):n}$k.prototype.Jh=function(a){return a.r(AdfRichInputColor.COMPACT)};
$k.prototype.tXa=function(a){a=F.c.j(a);var b=cn(a);b!=n&&F.c.OM!=R.xT&&(al.QR(l,b,a.e()),this.H0(a))};function cn(a){var b=al.getChooseId(a,AdfRichInputColor.CHOOSE_ID);b==n&&!a.getReadOnly()&&(b=M.g(a.e(),$k.Ppa));return b}$k.prototype.Waa=function(a,b){var d=w.b.getElementById(b);return d==n?p:a==d||a==d.getElementsByTagName("img")[0]?l:p};