function Qg(){this.Init()}m("AdfColumnDropTarget",Qg);r.v(Qg,Xa);Qg.prototype.Init=function(){Qg.h.Init.call(this,Ia.dh)};r.a("AdfColumnDropTarget.prototype.Init",{Init:Qg.prototype.Init});Qg.prototype.Ii=function(a){Rg(this);return Qg.h.Ii.apply(this,arguments)};r.a("AdfColumnDropTarget.prototype.dragExit",{Ii:Qg.prototype.Ii});Qg.prototype.Og=function(){return Ia.dh};r.a("AdfColumnDropTarget.prototype.GetAllowedActions",{Og:Qg.prototype.Og});
Qg.prototype.mi=function(a){Rg(this);if(null==a.G7||null==a.tp)return Ia.Ob;var b=this.f(),d=Sg(a),b=this.nx(b),d=new Tg(b,d.g(),"reorderColumn");d.saa(a.G7);d.W$(a.tp);d.F();delete a.G7;delete a.tp;return Ia.Ob};r.a("AdfColumnDropTarget.prototype.drop",{mi:Qg.prototype.mi});Qg.prototype.sf=function(){return[Qg.ABa]};r.a("AdfColumnDropTarget.prototype.GetAllowedFlavors",{sf:Qg.prototype.sf});
Qg.prototype.dO=function(a,b,d,e){var f=Qg.h.dO.apply(this,arguments);if(f!=Ia.Ob){if(!Ug(this,a))return Ia.Ob;var g=a,h=d,l=this.f(),l=this.nx(l),l=I.xm(l),n=l.ownerDocument.createElement("div");n.className=Qg.cZa;var t=n.style;t.position="absolute";t.width="10px";t.overflow="hidden";t.top="0px";t.zIndex=1E3;t.height=l.offsetHeight+"px";q.b.fe(n,80);l.appendChild(n);this.e4=n;Vg(this,g,h)}return f};r.a("AdfColumnDropTarget.prototype.acceptDragEnter",{dO:Qg.prototype.dO});
Qg.prototype.eO=function(a,b,d,e){var f=Qg.h.eO.apply(this,arguments);if(f!=Ia.Ob){if(!Ug(this,a))return Ia.Ob;Vg(this,a,d)}return f};r.a("AdfColumnDropTarget.prototype.acceptDragOver",{eO:Qg.prototype.eO});function Ug(a,b){var d=a.f(),e=Sg(b);return null==e||e==d||a.nx(e)!=a.nx(d)?!1:!0}Qg.prototype.nx=function(a){for(;null!=a;a=a.getParent())if(a instanceof AdfRichTable)return a;return null};function Sg(a){(a=a.ol().uo(Qg.ABa))&&(a=a[0]);return a instanceof AdfRichColumn?a:null}
function Vg(a,b,d){var e=A.c.Ka().La(),f=a.f(),g=a.nx(f),h=I.xm(g),f=a.e4,l=f.style,n=q.b.jc(h);d=Math.max(d-n.x,0);var t=g.o(),g=t.$b(),y,z=S.Ua(g,"t"),B,F=t.lha();0<=F&&(y=S.Ua(g,"d2"),B=S.Ua(y,"t2"));var K,g=0,n=null,P=t.kha();e?(K=h.offsetWidth-z.offsetWidth,y&&d<=K?(K=B,g=-a.Ce,a=t.nha(),t.mha().scrollHeight>a.offsetHeight&&(g+=a.offsetWidth-a.clientWidth)):(h.offsetWidth>z.offsetWidth&&(g=h.offsetWidth-z.offsetWidth),K=z)):d<=z.offsetWidth?K=z:y&&(g=z.offsetWidth,g-=P,K=B);if(null!=K){-1==F&&
(g-=P);for(a=z.rows.length-1;0<=a;--a)for(y=K.rows[a].cells,B=y.length,h=0;h<B;++h)if(t=y[h],t.getAttribute("_afrRoot")&&null==t.getAttribute("_afrRH"))if(cellLeft=t.offsetLeft+g,cellRight=cellLeft+t.offsetWidth,d>=cellLeft&&d<=cellRight-t.offsetWidth/2){b.tp=e;b.G7=t.id;n=cellLeft-f.offsetWidth/2;break}else if(d>=cellLeft&&d<=cellRight){b.tp=!e;b.G7=t.id;n=cellRight-f.offsetWidth/2;break}null!=n&&(l.left=Math.max(n,0)+"px")}}
function Rg(a){var b=a.nx(a.f()),b=I.xm(b);null!=a.e4&&(b.removeChild(a.e4),delete a.e4)}Qg.ABa=lb.JY(G,"AdfRichColumn");Qg.cZa="AFColumnDropTarget";