var xn=I.ea(I,"AdfDhtmlChooseColorBasePeer");m("AdfDhtmlChooseColorBasePeer",xn);xn.Mt="lastUsedColor";xn.hr="colorValue";xn.prototype.zP=function(a,b,d){a.setProperty(b,d)};r.a("AdfDhtmlChooseColorBasePeer.prototype.handleUpdateFromInputComponent",{zP:xn.prototype.zP});
xn.C=function(){r.bb(AdfRichChooseColor);r.bb(AdfRichInputColor);r.bb(AdfUIValue);r.bb(yn);this.d4=new TrColorConverter(["#RRGGBB"],!0);I.ra(this,D.wb,D.Bc,D.Ad,Za.ua);I.sb(this,xn.hr,xn.Mt,AdfRichChooseColor.DEFAULT_COLOR,AdfRichChooseColor.CUSTOM_COLOR_DATA);I.hc(this,AdfRichChooseColor.CUSTOM_COLOR_DATA,AdfRichChooseColor.COLOR_DATA,AdfRichChooseColor.WIDTH,xn.Mt,AdfRichChooseColor.DEFAULT_COLOR);this.sT="_adfSw";this.mS="_adfSwBtn";this.g1="_adfClr";this.hfa="LucBtn";this.qea="DfcBtn";this.j_a=
"cstcBtn";this.oea="ccRow";this.m_a="ccWrap";this.DK="ccPnl";this.k_a="tb";this.pga=0;this.rEa=1;this.pEa=2;this.tEa=3;this.sEa=4;this.rN={};this.m4={};this.GN={};this.W5a="stdTbl";this.vhb()};m("AdfDhtmlChooseColorBasePeer.InitSubclass",xn.C);xn.PL=function(a){return null==a?null:this.d4.getAsString(a)};xn.k4=function(a){return null==a?null:this.d4.getAsObject(a)};
xn.D$=function(a){u.J(a);for(var b=a.length,d=0;d<b;d++)if(-1=="0123456789".indexOf(a.charAt(d)))return null;a=parseInt(a);return!isNaN(a)&&0<=a&&255>=a?a:null};m("AdfDhtmlChooseColorBasePeer.parse0To255",xn.D$);xn.Tta=function(a){u.J(a);var b=a;if(6!=a.length)b=null;else for(var d=0;6>d;d++)if(-1=="0123456789ABCDEFabcdef".indexOf(a.charAt(d))){b=null;break}null!=b&&(b=parseInt(a,16));return b};m("AdfDhtmlChooseColorBasePeer.parseHexColor",xn.Tta);
xn.prototype.G=function(a,b){xn.h.G.call(this,a,b);var d=zn.k9(a.g());null!=d&&d.o().a$(d)};r.a("AdfDhtmlChooseColorBasePeer.prototype.InitDomElement",{G:xn.prototype.G});function An(a){a=a.getAttribute(xn.sT);return null!=a&&"No Color"!=a?xn.k4(a):null}xn.prototype.cR=function(a){a=I.j(a.g(),xn.hfa);if(a=q.b.getElementById(a))return a=a.getAttribute(xn.g1),xn.k4(a)};r.a("AdfDhtmlChooseColorBasePeer.prototype.GetComponentLastUsedColor",{cR:xn.prototype.cR});
xn.prototype.bR=function(a){a=I.j(a.g(),xn.qea);a=q.b.getElementById(a).getAttribute(xn.g1);return xn.k4(a)};r.a("AdfDhtmlChooseColorBasePeer.prototype.GetComponentDefaultColor",{bR:xn.prototype.bR});xn.prototype.eR=function(a){return Bn(a).length};r.a("AdfDhtmlChooseColorBasePeer.prototype.GetComponentWidth",{eR:xn.prototype.eR});function Bn(a){var b=I.j(a.g(),xn.W5a);a=q.b;b=a.getElementById(b);return a.uP(b)}
xn.prototype.aR=function(a){a=Bn(a);for(var b=a.length,d=[],e=null,f=0;f<b;f++)e=Cn(a[f]),d=d.concat(e);return d};r.a("AdfDhtmlChooseColorBasePeer.prototype.GetComponentColorData",{aR:xn.prototype.aR});xn.prototype.pJ=function(a){a=I.j(a.g(),xn.oea);if(a=q.b.getElementById(a))return Cn(a)};r.a("AdfDhtmlChooseColorBasePeer.prototype.GetComponentCustomColorData",{pJ:xn.prototype.pJ});
xn.prototype.PQ=function(a,b,d){b=I.j(a.g(),xn.oea);b=q.b.getElementById(b);var e=d,f=b.childNodes,g=f.length,h=null,l=null,n=q.b,t=null,y=0;n.yc(b);null==e&&(e=[]);for(var z=0;z<g;z++)if(h=f[z],"TD"==n.Na(h))if(l=h.firstChild,t=e[y],y++,C.O(l,"p_AFTransparent"),null!=t){var B=xn.PL(t);l.setAttribute(xn.sT,B);l.style.backgroundColor=B;null!=B&&(B=B.substring(1));B+=" / "+t.red+","+t.green+","+t.blue;l.setAttribute("alt",B);l.setAttribute("title",B);C.O(h,"p_AFDisabled")}else C.w(l,"p_AFTransparent");
n.Ia(b);zn.qz(a,AdfRichChooseColor.CUSTOM_COLOR_DATA,AdfRichInputColor.CUSTOM_COLOR_DATA,d)};r.a("AdfDhtmlChooseColorBasePeer.prototype.ComponentCustomColorDataChanged",{PQ:xn.prototype.PQ});
xn.prototype.uwa=function(a,b,d,e){var f=a.g(),g=null,h=null;switch(Dn(f)){case xn.rEa:g=xn.rN[f];h=En(a,d,!1);break;case xn.pEa:g=En(a,e,!1);h=this.dB(f);break;case xn.pga:case xn.sEa:g=En(a,e,!0);h=En(a,d,!1);break;case xn.tEa:g=xn.rN[f],h=this.dB(f)}if(null==h&&null!=d){if(b=this.pJ(a,b)){e=b.length;f=null;if(null!=b[e-1])f=b.slice(),f.splice(0,1),f[e-1]=d;else for(f=b.slice(),i=0;i<e;i++)if(null==f[i]){f[i]=d;break}zn.qz(a,AdfRichChooseColor.CUSTOM_COLOR_DATA,AdfRichInputColor.CUSTOM_COLOR_DATA,
f);a.setProperty(AdfRichChooseColor.CUSTOM_COLOR_DATA,f)}h=En(a,d,!1)}d=h;g!=d&&(b=this.f().g(),null!=g&&null!=g.parentNode&&C.O(g.parentNode,"p_AFSelected"),xn.rN[b]=g,null!=d&&C.w(d.parentNode,"p_AFSelected"),xn.m4[b]=d,xn.GN[b]=xn.sEa);zn.qz(a,xn.hr,AdfUIValue.VALUE)};r.a("AdfDhtmlChooseColorBasePeer.prototype.ComponentColorValueChanged",{uwa:xn.prototype.uwa});xn.prototype.Jwa=function(a,b,d){if(b=I.j(a.g(),xn.hfa))Fn(b,d),zn.qz(a,xn.Mt,yn.Mt)};
r.a("AdfDhtmlChooseColorBasePeer.prototype.ComponentLastUsedColorChanged",{Jwa:xn.prototype.Jwa});xn.prototype.Awa=function(a,b,d){a=I.j(a.g(),xn.qea);Fn(a,d)};r.a("AdfDhtmlChooseColorBasePeer.prototype.ComponentDefaultColorChanged",{Awa:xn.prototype.Awa});
xn.prototype.M=function(a){var b=a.getSource(),d=a.X(),e=q.b;if(null!=this.kp)a.cancel();else{var f=d;"TD"==q.b.Na(d)&&(f=d.firstChild);Gn(f)?(d="TD"==e.Na(d)?d.firstChild:d,e=b.g(),f=this.dB(e),xn.rN[e]=f,xn.m4[e]=d,f=Dn(e),xn.GN[e]=f!=xn.pga?xn.tEa:xn.pEa,d=An(d),b.setProperty(xn.hr,d,!1,!0),b.setProperty(xn.Mt,d,!1,G.fb),a.cancel(),zn.VC(b,!0)):null!=d.getAttribute(xn.mS)&&(d=d.getAttribute(xn.mS),d==xn.hfa?(d=b.K(xn.Mt),b.setProperty(xn.hr,d,!1,!0),zn.qz(b,xn.hr,AdfUIValue.VALUE),zn.VC(b)):d==
xn.qea?(d=b.K(AdfRichChooseColor.DEFAULT_COLOR),b.setProperty(xn.hr,d,!1,!0),zn.VC(b)):d==xn.j_a&&(d=Hn(b),e=b.K(xn.hr),null==this.kp&&(this.kp=new xn.Wb(e,d,this)),e=Hn(b),d=q.b.getElementById(e),e=I.j(e,xn.k_a),q.b.getElementById(e),d.parentNode.removeChild(d),this.He(b,d,null,xn.DK),this.kp.pz(),this.kp.Asb()),a.cancel())}};r.a("AdfDhtmlChooseColorBasePeer.prototype.HandleComponentClick",{M:xn.prototype.M});
function Hn(a){return"old"==A.c.H().qa("af|dialog-tr-button-type")?I.j(a.g(),xn.DK):"AdfRichPopup"==a.getParent().getTypeName()?a.getParent().getParent().g()+"_"+xn.DK:a.g()+"_"+xn.DK}function Gn(a){return a&&a.attributes&&null!=a.getAttribute(xn.sT)}
xn.prototype.sp=function(a,b){var d,e;switch(b){case w.ab:case w.Ra:if(d=b==w.ab?C.lc(a.parentNode):C.zb(a.parentNode))e=C.jc(a),d=C.Mi(d,a.nodeType,e);break;case w.vb:d=C.zb(a);d||null==a.parentNode||(e=C.zb(a.parentNode))&&(d=C.pa(e));d&&C.sa(d,"p_AFDisabled")&&(d=null);break;case w.ub:d=C.lc(a),d||null==a.parentNode||(e=C.lc(a.parentNode))&&(d=C.zm(e))}d&&(a&&a.setAttribute("tabIndex","-1"),d.setAttribute("tabIndex","0"),J.va(d))};
xn.prototype.ma=function(a){this.f();var b=q.b,d=a.U(),b=b.na(d);if(!d.ctrlKey)switch(b){case w.ab:case w.Ra:case w.vb:case w.ub:return d=a.X(),null!=this.kp?this.kp.sp(d,b):Gn(d.firstChild)&&this.sp(d,b),a.cancel(),!1}};r.a("AdfDhtmlChooseColorBasePeer.prototype.HandleComponentKeyDown",{ma:xn.prototype.ma});
xn.prototype.za=function(a){var b=this.f(),d=q.b,e=a.U(),d=d.na(e);if(!e.ctrlKey)switch(d){case w.jb:case w.gd:e=a.X().firstChild;Gn(e)&&(C.w(e,"p_AFSelected"),e=An(e),b.setProperty(xn.hr,e,!1,!0),zn.VC(b,!0),a.cancel());break;case w.Ih:zn.VC(b,!0),a.cancel()}};r.a("AdfDhtmlChooseColorBasePeer.prototype.HandleComponentKeyUp",{za:xn.prototype.za});
xn.prototype.ob=function(a,b,d){xn.h.ob.call(this,a,b);d==xn.DK&&(b=Hn(a),b=q.b.getElementById(b),a=I.j(a.g(),xn.m_a),q.b.getElementById(a).appendChild(b),this.kp=null)};r.a("AdfDhtmlChooseColorBasePeer.prototype.PopupClosed",{ob:xn.prototype.ob});xn.prototype.eg=function(a){var b=this.f();if(a.ll()==Za.Zm){var d=this.kp.Spb(),e=b.g(),f=this.dB(e);xn.rN[e]=f;xn.GN[e]=xn.rEa;b.setProperty(xn.hr,d,!1,!0);b.setProperty(xn.Mt,d,!1,G.fb)}a.cancel();this.Jb(this.f(),xn.DK);zn.VC(b)};
r.a("AdfDhtmlChooseColorBasePeer.prototype.HandleComponentDialog",{eg:xn.prototype.eg});
function En(a,b,d){b=xn.PL(b);var e=null;a:{for(var e=Bn(a),f=e.length,g=0;g<f;g++)for(var h=C.pa(e[g]);h;){if(!d||C.sa(h,"p_AFSelected")){var l=C.pa(h),n=l.getAttribute(xn.sT);"No Color"==n&&(n=null);if(n==b){e=l;break a}}h=C.zb(h)}e=null}if(!e)a:{a=I.j(a.g(),xn.oea);if(a=q.b.getElementById(a))for(a=C.pa(a);a;){if(!C.sa(a,"p_AFDisabled")&&(d=C.pa(a),d.getAttribute(xn.sT)==b)){e=d;break a}a=C.zb(a)}e=null}return e}
function Fn(a,b){var d=q.b.getElementById(a);if(d)if(C.O(d,"p_AFTransparent"),null!=b){var e=xn.PL(b);d.style.backgroundColor=e;d.setAttribute(xn.g1,e)}else C.w(d,"p_AFTransparent"),d.removeAttribute(xn.g1)}function Cn(a){var b=[];a=a.childNodes;for(var d=a.length,e=null,f=q.b,e=null,g=0,h=0;h<d;h++)e=a[h],"TD"==f.Na(e)&&(e=e.firstChild,Gn(e)?b[g]=An(e):b[g]=null,g++);return b}xn.prototype.dB=function(a){return xn.m4[a]};function Dn(a){var b=xn.GN[a];b||(xn.GN[a]=b=xn.pga);return b}
xn.Nub=function(){xn.Lga=function(){this.Init()};r.v(xn.Lga,r,"AdfDhtmlChooseColorBasePeer._SwatchSelectionHandler");xn.Lga.prototype.Init=function(){xn.Lga.h.Init.call(this);this.rN={};this.m4={};this.GN={}}};
xn.vhb=function(){xn.Wb=function(a,b,d){this.Init(a,b,d)};r.v(xn.Wb,r,"AdfDhtmlChooseColorBasePeer._CustomPanelHandler");xn.Wb.prototype.Init=function(a,b){xn.Wb.h.Init.call(this);this.Sh=b;var d=xn.PL(a),d=null!=d&&0!=a.alpha?d.substring(1):"3F7B7B",e=xn.Wb;this.GM=I.j(b,e.Z0a);this.SL=I.j(b,e.d_a);this.sG=I.j(b,e.W1a);this.Jma=I.j(b,e.V1a);this.MN=I.j(b,e.Q6a);this.Ibb=I.j(b,e.i_a);this.bkb=I.j(b,e.r4a);this.n5=I.j(b,e.aCa);this.eX=I.j(b,e.dEa);this.jV=I.j(b,e.QBa);this.$T=I.j(b,e.Wza);this.NPa=
xn.Wb.en.yRa(16777215);d=xn.Tta(d);this.jg=this.akb=xn.Wb.en.yRa(d);this.whb();this.D$a()};xn.Wb.prototype.whb=function(){var a=q.b,b=a.getElementById(this.SL);this.f_a=this.oM(a,b,"width");this.e_a=this.oM(a,b,"height");this.xS=Math.floor(this.f_a/2);this.p1=Math.floor(this.e_a/2);b=a.getElementById(this.MN);this.yga=this.oM(a,b,"height");b=a.getElementById(this.sG);this.xga=this.oM(a,b,"height");b=a.getElementById(this.GM);this.Yea=this.oM(a,b,"width");this.H1=this.oM(a,b,"height")};xn.Wb.ga=function(){this.Z0a=
"hueSatMap";this.d_a="crossHair";this.W1a="lumMap";this.V1a="lumImg";this.Q6a="thumb";this.aCa="hEdit";this.dEa="rEdit";this.QBa="gEdit";this.Wza="bEdit";this.r4a="cstPrevSwtch";this.i_a="cstCurSwtch";A.c.H()};xn.Wb.prototype.oM=function(a,b,d){var e=0;b=a.getComputedStyle(b);a=a.ik(b,d);null!=a&&(e=q.Ma(a));return e};xn.Wb.prototype.D$a=function(){var a=this.Sh;customHandlerClass=xn.Wb;var b=q.b,d=I.j(a,customHandlerClass.aCa),d=b.getElementById(d),e=this.D(this.EV);b.ba(d,"change",e);d=I.j(a,customHandlerClass.dEa);
d=b.getElementById(d);e=this.D(this.EV);b.ba(d,"change",e);d=I.j(a,customHandlerClass.QBa);d=q.b.getElementById(d);e=this.D(this.EV);b.ba(d,"change",e);a=I.j(a,customHandlerClass.Wza);d=q.b.getElementById(a);e=this.D(this.EV);b.ba(d,"change",e)};xn.Wb.prototype.Spb=function(){return xn.k4("#"+this.jg.E9())};xn.Wb.prototype.EV=function(a){targetElementId=q.b.ca(a).getAttribute("id");targetElementId==this.n5?this.mkb(a):targetElementId==this.eX?this.tkb(a):targetElementId==this.jV?this.kkb(a):targetElementId==
this.$T&&this.ekb(a)};xn.Wb.prototype.Asb=function(){this.PQa(this.bkb,this.akb)};xn.Wb.prototype.zsb=function(){this.PQa(this.Ibb,this.jg)};xn.Wb.prototype.PQa=function(a,b){q.b.getElementById(a).style.backgroundColor="#"+b.E9()};xn.Wb.prototype.pz=function(a){this.zsb();a!=this.GM&&a!=this.sG&&(this.hob(),this.job());a!=this.sG&&this.iob();a!=this.n5&&this.IQa();a!=this.eX&&a!=this.jV&&a!=this.$T&&(this.MQa(),this.HQa(),this.EQa())};xn.Wb.prototype.gTa=function(a){var b=a.X(),d=a.U();targetElementId=
b.getAttribute("id");if(targetElementId==this.GM||targetElementId==this.SL)this.okb(d),a.cancel();else if(targetElementId==this.sG||targetElementId==this.Jma||targetElementId==this.MN)this.fkb(d),a.cancel()};xn.Wb.prototype.hob=function(){var a=this.jg,b=q.b.getElementById(this.SL),d=this.Yea;b.style.top=(1-a.BN)*this.H1-this.p1+"px";A.c.Ka().La()?b.style.left=d-a.ZF*d/360-this.xS+"px":b.style.left=a.ZF*d/360-this.xS+"px"};xn.Wb.prototype.sp=function(a,b){switch(b){case w.ab:case w.Ra:case w.vb:case w.ub:var d=
a.getAttribute("id"),e=q.b.getElementById(d),f=b==w.vb?1:b==w.ub?-1:0,g=b==w.Ra?1:b==w.ab?-1:0;if(d==this.GM||d==this.SL)this.Mjb(f,g),J.va(e);else if(d==this.sG||d==this.Jma||d==this.MN)b!=w.ab&&b!=w.Ra||this.Ljb(g),J.va(e)}};xn.Wb.prototype.iob=function(){var a=this.jg,b=q.b.getElementById(this.Jma);this.NPa.ZZ(a.ZF,a.BN,.5);b.style.backgroundColor="#"+this.NPa.E9()};xn.Wb.prototype.job=function(){var a=this.jg;q.b.getElementById(this.MN).style.top=(1-a.tW)*this.xga-this.yga/2+"px"};xn.Wb.prototype.IQa=
function(){q.b.getElementById(this.n5).value=this.jg.E9()};xn.Wb.prototype.MQa=function(){q.b.getElementById(this.eX).value=this.jg.gX};xn.Wb.prototype.HQa=function(){q.b.getElementById(this.jV).value=this.jg.wV};xn.Wb.prototype.EQa=function(){q.b.getElementById(this.$T).value=this.jg.bU};xn.Wb.prototype.mkb=function(a){var b=q.b.getElementById(this.n5),d=xn.Tta(b.value);null==d?(q.b.Ea(a),this.Omb(b.value),J.va(b),this.IQa()):(this.jg.gVa(d),this.pz())};xn.Wb.prototype.Roa=function(a){var b=A.c.H();
a=TrFastMessageFormatUtils.format(b.Z("af_chooseColor.MSG_RGB_INVALID"),a);alert(a)};xn.Wb.prototype.Omb=function(a){var b=A.c.H();a=TrFastMessageFormatUtils.format(b.Z("af_chooseColor.MSG_HEX_INVALID"),a);alert(a)};xn.Wb.prototype.tkb=function(a){var b=q.b.getElementById(this.eX),d=xn.D$(b.value);null==d?(q.b.Ea(a),this.Roa(b.value),J.va(b),this.MQa()):(this.jg.Xrb(d),this.pz(this.eX))};xn.Wb.prototype.kkb=function(a){var b=q.b.getElementById(this.jV),d=xn.D$(b.value);null==d?(q.b.Ea(a),this.Roa(b.value),
J.va(b),this.HQa()):(this.jg.Qrb(d),this.pz(this.jV))};xn.Wb.prototype.ekb=function(a){var b=q.b.getElementById(this.$T),d=xn.D$(b.value);null==d?(q.b.Ea(a),this.Roa(b.value),J.va(b),this.EQa()):(this.jg.Orb(d),this.pz(this.$T))};xn.Wb.prototype.okb=function(a){this.oNa(a);A.c.Md(a,this.D(this.nkb));q.oa().Ea(a)};xn.Wb.prototype.fkb=function(a){this.nNa(a);A.c.Md(a,this.D(this.gkb));q.oa().Ea(a)};xn.Wb.prototype.oNa=function(a){var b=q.oa(),d=b.Xb(a);a=q.b.getElementById(this.GM);var e=b.jc(a),b=
d.x-e.x,d=d.y-e.y,f=this.Yea,e=this.H1,b=Math.min(b,f),b=Math.max(0,b),d=Math.min(d,this.H1),d=Math.max(0,d),g=q.b.getElementById(this.SL),h=d-this.p1;0==d&&h++;g.style.top=h+"px";h=b-this.xS;0==b&&h++;g.style.left=h+"px";b=Math.round(360*b/f);360==b&&(b=0);this.jg.ZZ(b,1-d/e,this.jg.tW);this.pz(a.id)};xn.Wb.prototype.Mjb=function(a,b){var d=q.b.getElementById(this.GM),e=q.b.getElementById(this.SL),f=e.offsetLeft+this.xS+a,g=e.offsetTop+this.p1+b,h=this.Yea,l=this.H1,f=Math.min(f,h),f=Math.max(0,
f),g=Math.min(g,l),g=Math.max(0,g);e.style.top=g-this.p1+"px";e.style.left=f-this.xS+"px";e=Math.round(360*f/h);360==e&&(e=0);this.jg.ZZ(e,1-g/l,this.jg.tW);this.pz(d.id)};xn.Wb.prototype.nNa=function(a){var b=q.oa(),d=b.Xb(a);a=q.b.getElementById(this.sG);b=b.jc(a);b=d.y-b.y;d=this.xga;b=Math.min(b,d);b=Math.max(0,b);q.b.getElementById(this.MN).style.top=b-Math.floor(this.yga/2)+"px";this.jg.ZZ(this.jg.ZF,this.jg.BN,1-b/d);this.pz(a.id)};xn.Wb.prototype.Ljb=function(a){var b=q.b.getElementById(this.sG),
d=q.b.getElementById(this.MN),e=this.xga,f=this.yga,g=d.offsetTop+Math.floor(f/2)+a,g=Math.min(g,e),g=Math.max(0,g);a=Math.min(d.offsetTop+a,e-Math.floor(f/2));a=Math.max(-Math.floor(f/2),a);d.style.top=a+"px";this.jg.ZZ(this.jg.ZF,this.jg.BN,1-g/e);this.pz(b.id)};xn.Wb.prototype.gkb=function(a){this.nNa(a)};xn.Wb.prototype.nkb=function(a){this.oNa(a)};xn.Wb.en=function(){};xn.Wb.en.yRa=function(a){u.Da(a,"createInstanceFromRgbTotal: input must be number.");var b=new xn.Wb.en;b.gVa(a);return b};xn.Wb.en.prototype.gVa=
function(a){var b=Math.floor(a/256);this.gX=Math.floor(b/256);this.wV=b%256;this.bU=a%256;this.D6()};xn.Wb.en.prototype.ZZ=function(a,b,d){this.ZF=a;this.BN=b;this.tW=d;this.Pkb()};xn.Wb.en.prototype.Xrb=function(a){this.gX=a;this.D6()};xn.Wb.en.prototype.Qrb=function(a){this.wV=a;this.D6()};xn.Wb.en.prototype.Orb=function(a){this.bU=a;this.D6()};xn.Wb.en.prototype.E9=function(){return this.pka(this.gX)+this.pka(this.wV)+this.pka(this.bU)};xn.Wb.en.prototype.pka=function(a){return"0123456789ABCDEF".charAt(Math.floor(a/
16))+"0123456789ABCDEF".charAt(a%16)};xn.Wb.en.prototype.D6=function(){var a=this.gX/255,b=this.wV/255,d=this.bU/255,e=Math.min(Math.min(a,b),d),f=Math.max(Math.max(a,b),d),g=f-e,h=null,l=null,n=(f+e)/2;0!=f?(l=0==g?0:.5>=n?g/(f+e):g/(2-f-e),0==g?h=0:(h=60*(a==f?(b-d)/g:b==f?2+(d-a)/g:4+(a-b)/g),0>h&&(h+=360))):h=l=0;this.ZF=h;this.BN=l;this.tW=n};xn.Wb.en.prototype.Pkb=function(){var a=this.ZF,b=this.BN,d=this.tW,e=null,f=null,g=null;if(0==b)e=f=g=d;else{var h=null,l=null,n=null,l=null,l=.5<=d?(1-
d)*b:d*b,h=l+d,l=d-l,b=Math.floor(a/60),d=h-l;switch(b){case 0:case 2:case 4:n=(a/60-b)*d+l;break;case 1:case 3:case 5:n=(b+1-a/60)*d+l}switch(b){case 0:e=h;f=n;g=l;break;case 1:e=n;f=h;g=l;break;case 2:e=l;f=h;g=n;break;case 3:e=l;f=n;g=h;break;case 4:e=n;f=l;g=h;break;case 5:e=h,f=l,g=n}}this.gX=Math.round(255*e);this.wV=Math.round(255*f);this.bU=Math.round(255*g)}};