function kf(a,b,d,e){this.Init(a,b,d,e)}m("AdfMasonryLayoutBehavior",kf);r.v(kf,Aa);kf.prototype.Init=function(a,b,d,e){kf.h.Init.call(this);this.Pj=a;this.Tk=b;this.zg=d;this.XG=e};r.a("AdfMasonryLayoutBehavior.prototype.Init",{Init:kf.prototype.Init});kf.prototype.Qa=function(a){u.s(a,G);a instanceof AdfUICommand&&a.addEventListener(ab.cd,this.Uha,this)};r.a("AdfMasonryLayoutBehavior.prototype.initialize",{Qa:kf.prototype.Qa});
kf.gKa=function(a){for(a=a.getParent();a;){var b=a.o().i();if(b&&1==b.nodeType)return a;a=a.getParent()}return null};
kf.prototype.Uha=function(a){if(a.$H()){var b=a.getSource(),d=a=null;if(null==this.Pj)for(var e=null;null!=b;){if(b instanceof AdfRichMasonryLayout){a=b;d=e;break}e=b;b=kf.gKa(b)}else switch(this.Tk){case "delete":case "resize":d=b.m(this.Pj);null!=d&&(a=kf.gKa(d));break;default:a=b.m(this.Pj)}u.assert(null!=a,'The masonryLayout associated with the MasonryLayoutBehavior for\x3d"'+this.Pj+'" could not be found (masonryLayout component \x3d '+a+").");if(null!=a){e='The masonryLayout associated with the MasonryLayoutBehavior for\x3d"'+
this.Pj+'" is not a masonryLayout (masonryLayout component \x3d '+a+").";b=null;if("delete"==this.Tk||"resize"==this.Tk)u.assert(null!=d,'The tile associated with the MasonryLayoutBehavior for\x3d"'+this.Pj+'" could not be found (tile component \x3d '+d+")."),b=d.g(),u.J(b);switch(this.Tk){case "delete":u.assert(null!=a.fC,e);a.fC(b);break;case "resize":u.J(this.XG);u.assert(null!=a.lv,e);a.lv(b,this.XG);break;default:d=parseInt(this.zg),isNaN(d)&&(d=-1),u.J(this.XG),u.assert(null!=a.Cy,e),a.Cy(this.XG,
d)}}}};