var sB=I.ea(I,"AdfDhtmlToolboxPeer",!1);m("AdfDhtmlToolboxPeer",sB);sB.C=function(){r.bb(Xq)};m("AdfDhtmlToolboxPeer.InitSubclass",sB.C);sB.prototype.G=function(a,b){sB.h.G.call(this,a,b);A.c.qr(a)};r.a("AdfDhtmlToolboxPeer.prototype.InitDomElement",{G:sB.prototype.G});sB.prototype.ka=function(a){delete this.Ag;A.c.cp(a);sB.h.ka.call(this,a)};r.a("AdfDhtmlToolboxPeer.prototype.ComponentRemoved",{ka:sB.prototype.ka});sB.prototype.ya=function(){return!0};
r.a("AdfDhtmlToolboxPeer.prototype.needsResizeNotify",{ya:sB.prototype.ya});
sB.prototype.Sa=function(a,b,d){if(!tB(this)){v.l.fine("toolbox#ResizeNotify, toolbox row size stale or not yet defined, recalculate row sizes");this.Ag=[];a=this.i().firstChild.childNodes;b=a.length;for(var e=0;e<b;e++){for(var f=this.Ag,g=e,h=q.b,l=[],n=0,t=0,y=0,z=a[e].getElementsByTagName("tr")[0].childNodes,B=z.length,F=0;F<B;F++){var K=z[F],P=C.pa(K);if(P&&P.id){var Q=P.id;K.style.width="";if(K=A.c.m(Q))Q=K.o(),l.push(Q),Q.yk?(P=Q.yk()+uB(P),n+=P,P=null!=K.getFlex&&null!=K.getFlex()?K.getFlex():
0,y+=P):(P=h.gP(P,P.offsetWidth),n+=P,t+=P)}}f[g]={qH:l,Fva:n,Mvb:t,Eva:y}}}a=q.b;b=this.i();d-=a.gP(b,0);d-=a.gP(C.pa(b),0);for(a=0;a<this.Ag.length;a++)if(b=this.Ag[a],e=d-b.qH.length,f=e-b.Fva,0>f)for(v.l.fine("toolbox#ResizeNotify, resizing toolbar row "+a+", available width "+e+", is smaller than row width "+b.Fva+", attempt to overflow. "),e=-f,f=b.qH.length-1;0<=f;--f){l=b.qH[f];if(null==l){v.l.severe("Unexpected null peer for toolbox child at index: ",f);break}g=l.i();if(null==g){v.l.warning("Unexpected child ["+
f+"] found in toolbox component.");break}g.style.width="";h=uB(g);if(l.yk){var da=l.yk()+h,ba;ba=l.wJ()+h;ba=Math.max(da-e,ba);h=ba-h;g.parentNode.style.width=ba+1+"px";g.style.width=h+"px"}e-=da-ba;0>=e?spaceToRemoved=0:g.parentNode.style.width=g.offsetWidth+1+"px"}else for(v.l.fine("toolbox#ResizeNotify, resizing toolbar row "+a+", available width "+e+", is not smaller than row width "+b.Fva+", attempt to stretch."),f=b.qH.length,g=f-1,h=0;h<f;h++){y=b.qH[h];if(null==y){v.l.severe("Unexpected null peer for toolbox child at index: ",
h);break}l=y.i();if(null==l){v.l.warning("Unexpected child ["+h+"] found in toolbox component.");break}l.style.width="";t=uB(l);y.yk?(n=y.yk(),t=n+t,y=y.f(),y=y.getFlex?y.getFlex()||0:0,0<y?l.parentNode.style.width=y/b.Eva*e+"px":h==g&&0==b.Eva?l.parentNode.style.width=e+"px":(l.parentNode.style.width=t+1+"px",l.style.width=n+"px")):l.parentNode.style.width=h==g&&0==b.Eva?e+"px":l.offsetWidth+1+"px"}};r.a("AdfDhtmlToolboxPeer.prototype.ResizeNotify",{Sa:sB.prototype.Sa});
sB.prototype.bd=function(a){this.bind(a);this.Ag=null};r.a("AdfDhtmlToolboxPeer.prototype.__preferredSizeChangeNotify",{bd:sB.prototype.bd});function uB(a){a=q.b.getComputedStyle(a);var b=q.Ma;return b(a.paddingLeft)+b(a.paddingRight)+b(a.marginLeft)+b(a.marginRight)}
function tB(a){if(!a.Ag)return!1;for(var b=0;b<a.Ag.length;b++)for(var d=a.Ag[b],e=0;e<d.qH.length;e++){var f=d.qH[e];if(null==f)return v.l.fine("Toolbox cached rows are not valid, due to unexpected null peer for toolbox child at row: "+b+", index: "+e),!1;if(null==f.i())return v.l.fine("Toolbox cached rows are not valid, due to toolbar peer without component (perhaps due to ppr) at row: "+b+", index: "+e),!1}return!0};