function A_oc(a,b,c){return AdfDhtmlPivotTablePeer.O(a.b.Tb,a.b.ic+"::ph::"+b+"::"+c)}function A_mc(a){return a.getComponent().ty()}function A_pc(a,b,c){var d=A_;d==A_&&(d=A_oc(a,b,c));return AdfAgent.AGENT.getAttribute(d,"_layerId")}function A_nc(a,b,c,d){d==A_&&(d=A_oc(a,b,c));return d==A_?A_c:AdfAgent.AGENT.getBooleanAttribute(d,"_canPivot")}function A_qc(a,b,c){var d=A_;if(d==A_||d==A_a)d=A_oc(a,b,c);return AdfAgent.AGENT.getBooleanAttribute(d,"_isMeasure")}
function A_Nf(a,b,c,d){if(!a.b.Xv&&!a.ak&&(A_mc(a)&&A_nc(a,b,c,d)||a.getComponent().wn())){a.gc=d;var e=a.getComponent().wn(),f=a.b.Tb,g=f._width,h=f.xI;h==A_a&&(h=f.offsetHeight-f.clientHeight,f.xI=h);var l=AdfAgent.AGENT.getPlatform()==AdfAgent.IE_PLATFORM,m=l&&8<=AdfAgent.AGENT.getVersion(),n=l&&!m,p=a.b.R,l=p&&n,m=p&&m;b==AdfPivotTableUtils.n?(b=a.b.na[1][0].childNodes[0],p=b.rows[c+1],b=p.cells[0],b=b.offsetHeight+1,c==a.b.Hb-1&&e&&++b,c=a.b.qa?0:a.b.fb[1].scrollTop,h=p.offsetTop-h-c-1,n&&h--,
c=d.rows[1].cells[0],n=Math.max(b-10,0),c.style.height=n+"px",p=d.offsetHeight-b,0!=p&&(c.style.height=n-p+"px"),n=d.rows[0].cells[0].offsetWidth,c=d.rows[0].cells[1],e?(c.style.display="",e=c,e._offsetWidth==A_a&&(e._offsetWidth=e.offsetWidth),n+=e._offsetWidth):c.style.display="none",l=l?0:g+f.scrollLeft-n,a.Uq=n):(b=a.b.Ga[1][0].childNodes[0],p=b.rows[0],b=p.cells[c+1],g=b.offsetWidth,n=g+1,b=b.offsetLeft,m&&(b=a.b.Kb[1].scrollWidth-b-g),c=a.b.qa?0:a.b.Kb[1].scrollLeft,l=b-c-(l?0:1),c=d.rows[0].cells[1],
g=Math.max(n-10,0),c.style.width=g+"px",p=d.offsetWidth-n,0!=p&&(c.style.width=g-p+"px"),b=d.rows[0].cells[0].offsetHeight,c=d.rows[1].cells[0],e?(c.style.display="",b+=c.offsetHeight):c.style.display="none",h=f._height-h+f.scrollTop-b,a.Uq=b);d.style.width=n+"px";d.style.height=b+"px";d.style.top=h+"px";d.style[m?"right":"left"]=l+"px";d.style.tableLayout="fixed";d.style.position="absolute";d.style.overflow="hidden";d.style.zIndex=2;d.style.visibility="visible"}}
function A_3e(a,b){if((!a.ak||b)&&a.gc)a.gc.style.visibility="hidden",a.gc=A_}function A_yc(a,b,c,d,e,f){var g=a.getComponent();b=new A_dh(g,b,c,d,e,f);b.setPartial(A_b);g.queueEvent(b);b.isCanceled()?A_mf(a,A_Ze(a)):(A_nf(a,AdfDhtmlPivotTablePeer.va),a.Id=A_,a.fa||a.wc(a.ad,A_b))}
function A_sc(a,b,c,d){var e=a.b.Kb[1],f=b.getElementPosition(e),g=e.scrollLeft,e=e.offsetWidth,h=A_8g(a.b.Ga[1]),l=Math.max(0,h._width-e);a.b.R&&(d==A_a&&(d=b.getWindowWidth()),c=d-c,f.x=d-f.x-e,g=l-g);c-=f.x;b=c+g;var m=h.childNodes[0].rows[0].cells,n=m.length,p=1,f=A_;for(d=h=0;p<n&&!(f=m[p],h=f.offsetWidth,d+=h,d>=b);p++);m={};m.edge=AdfPivotTableUtils.l;m.layer=p-1;p=-1;0<l&&(c<4*AdfDhtmlPivotTablePeer.Ee?0<g&&(p=Math.max(0,g-10)):c>e-4*AdfDhtmlPivotTablePeer.Ee&&g<l&&(p=g+10));m.ws=-1!=p&&a.b.R?
l-p:p;m.xs=-1;f!=A_&&(0==a.b.Db?(m.Pd=A_b,m.pn="after"):(m.Pd=A_c,a=h>3*AdfDhtmlPivotTablePeer.Ee?h/3:AdfDhtmlPivotTablePeer.Ee,m.pn=b-(d-h)<a?"before":b>d-a?"after":"swap"));return m}
function A_tc(a,b,c){var d=a.b.fb[1],e=b.getElementPosition(d),f=A_8g(a.b.na[1]),g=f.childNodes[0],h=d.scrollTop;b=c-e.y+h;c-=e.y;e=d.offsetHeight;d=-1;e<f._height&&(c<4*AdfDhtmlPivotTablePeer.Ee?(0<h&&(d=h-10),0>d&&(d=0)):c>e-4*AdfDhtmlPivotTablePeer.Ee&&f._height-e>h&&(d=h+10));h=g.rows;c=h.length;f=0;for(g=1;g<c;g++){var l=h[g].cells[0],f=f+l.offsetHeight;if(f>=b)break}h={};h.edge=AdfPivotTableUtils.n;h.layer=g-1;h.xs=d;h.ws=-1;l!=A_&&(0==a.b.Hb?(h.Pd=A_b,h.pn="after"):(h.Pd=A_c,a=l.offsetHeight,
l=a>3*AdfDhtmlPivotTablePeer.Ee?a/3:AdfDhtmlPivotTablePeer.Ee,h.pn=b-(f-a)<l?"before":b>f-l?"after":"swap"));return h}
function A_zc(a,b,c,d){var e=b+":"+c+":"+d;if(a.$w!=e)if(A_Ac(a),A_Bc(a),a.$w=e,"swap"==d)A_vc(a,b,c,A_);else{var f=a.b.R,g=A_eh(a.b,b).childNodes[0];indicator=a.b.Zw;e=indicator.style;if(b==AdfPivotTableUtils.l){c=g.rows[0].cells[c+1];g=a.b.Kb[1];g=g.Fj-g.scrollLeft+c.offsetLeft-6;if(f?"before"==d:"after"==d)g+=c.offsetWidth;e.left=g+"px";e.width="10px";e.top=a.b.Tb._height+"px";d=a.b.kb[1][1]._height;0<a.b.o[b]&&(d+=a.b.kb[0][1]._height);e.height=d+"px"}else c=g.rows[c+1].cells[0],g=0-a.b.fb[1].scrollTop+
c.offsetTop-6,"after"==d&&(g+=c.offsetHeight),e.top=g+"px",e.height="10px",e.left=a.b.kb[1][0<a.b.o[b]&&!f?0:1].Fj+"px",d=a.b.kb[1][1]._width-1,0<a.b.o[b]&&(d+=a.b.kb[1][0]._width-1),e.width=d+"px";e.visibility="visible";e.zIndex=5}}function A_Bc(a){var b=a.b.Zw;b&&(b.style.visibility="hidden");a.$w=""}function A_vc(a,b,c,d){d==A_&&a.Zj==b&&a.$j==c||(A_Ac(a),a.Zj=b,a.$j=c,A_fh(a,b,c,A_c,d))}function A_Ac(a){a.Zj!=A_&&a.$j!=A_&&A_fh(a,a.Zj,a.$j,A_b,A_);a.Zj=A_;a.$j=A_}
function A_fh(a,b,c,d,e){for(var f=AdfAgent.AGENT,g=a.b.i[b];2>g;++g)for(var h=a.b.T[b][g],l=h.length,m=0;m<l;m++){var n=a,p=f,q=b,v=c,u=d,w=h[m].childNodes[0];if(q==AdfPivotTableUtils.l)for(var w=w.rows,r=w.length,x=1;x<r;x++){var s=w[x],s=s.cells,z=s.length;if(n.b.PR)G=s[z-1],v==A_ag(p,G)-1&&(A_gh(n,G,u,A_b),A_hh(n,e,G,q));else for(var A=1;A<z&&!(A>v+1);A++){var G=s[A];if(v==A_ag(p,G)-1){A_gh(n,G,u,A_b);A_hh(n,e,G,q);break}}}else{s=w.rows[v+1];s=s.cells;z=s.length;p=n.b.R?w.offsetWidth:0;for(A=
1;A<z;A++)A_gh(n,s[A],u,A_c),A_hh(n,e,s[A],q,p)}e=A_}A_uc(a,b,A_oc(a,b,c),d)}function A_hh(a,b,c,d,e){if(b!=A_){if(d==AdfPivotTableUtils.l){var f=c.offsetWidth;if(b._width==A_a||b._width<f)b._width=f;b._height=c.offsetTop+c.offsetHeight}else{f=c.offsetHeight;if(b._height==A_a||b._height<f)b._height=f;b._width=c.offsetLeft+c.offsetWidth}b.appendChild(A_ih(a,d,c,b.dk,b.fH,e))}}
function A_ih(a,b,c,d,e,f){var g=document.createElement("DIV"),h=AdfAgent.AGENT.getComputedStyle(c),l=parseInt(h.paddingTop),m=parseInt(h.paddingRight),n=parseInt(h.paddingBottom),p=parseInt(h.paddingLeft);b==AdfPivotTableUtils.l?(g.className=a.r(AdfPivotTableUtils.Vo),e=c.offsetTop,d&&(e+=d),g.style.top=e+"px",g.style.width=c.offsetWidth-(p+m+2)+"px",g.style.height=c.offsetHeight-(l+n+1)+"px"):(g.className=a.r(AdfPivotTableUtils.Zn),a.b.R?(d=f-c.offsetLeft-c.offsetWidth,e&&(d+=e),g.style.right=d+
"px"):(d=c.offsetLeft,e&&(d+=e),g.style.left=d+"px"),g.style.width=c.offsetWidth-(p+m+1)+"px",g.style.height=c.offsetHeight-(l+n+2)+"px");g.style.color=h.color;g.innerHTML=c.innerHTML;return g}function A_gh(a,b,c,d){c?b.Ev&&(b.className=b.Ev):(b.Ev=b.className,b.className=d?a.r(AdfPivotTableUtils.Yo):a.r(AdfPivotTableUtils.ao))}
function A_uc(a,b,c,d){c!=A_&&(b==AdfPivotTableUtils.l?(A_jh(a,c.rows[0].cells[0],d,a.r(AdfPivotTableUtils.To)),A_jh(a,c.rows[0].cells[1],d,a.r(AdfPivotTableUtils.So)),A_jh(a,c.rows[0].cells[2],d,a.r(AdfPivotTableUtils.Uo)),A_jh(a,c.rows[1].cells[0],d,a.r(AdfPivotTableUtils.Xo))):(A_jh(a,c.rows[0].cells[0],d,a.r(AdfPivotTableUtils.eo)),A_jh(a,c.rows[0].cells[1],d,a.r(AdfPivotTableUtils.fo)),A_jh(a,c.rows[1].cells[0],d,a.r(AdfPivotTableUtils.co)),A_jh(a,c.rows[2].cells[0],d,a.r(AdfPivotTableUtils.bo))))}
function A_jh(a,b,c,d){c?b.className=d:(b.className=d,A_k.sa(b,a.r(AdfPivotTableUtils.ap)))}
function A_Of(a,b,c){var d,e,f;if(a.Km)e=a.Bj,f=a.Cj,d=a.Hq;else{if(!A_mc(a))return;e=A_of(a);if(e==A_||e==AdfPivotTableUtils.D)return;d=A_Mf(a);if(!A_nc(a,e,d))return;f=A_kh(d);a.Vf=e;a.Jm=f;d=A_lh(a,e,d)}if(b==AdfKeyStroke.ARROWUP_KEY&&(e==AdfPivotTableUtils.n&&0==f||a.Vf==AdfPivotTableUtils.n&&1==a.Jm&&1==f)){var g=a.Nd();if(g!=A_){a.Gm?c=a.lq:(d=a.Vf,f=Math.floor(a.Jm/2),c={},c.edge=d,c.layer=f,c.layerId=A_pc(a,d,f));A_4e(a,A_b);a=g.getPeer();a.xe=A_b;c.edge!=A_Z.tf?a.jc=c:(c=A_Qe(a,a.getDomElement(),
c.layer),a.V=c.id,a.da=a.V,a.mg!=A_&&(A_0(a,c,c,"focus"),a.mg=A_));AdfFocusUtils.focusElement(a.getDomElement());c=A_Be(a);c!=A_?(a.B=c.id,a.B==a.da?(c=A__(a.B),A_0(a,c,c,"drop"),a.U=A_Z.Fe):(A_Pe(a,AdfAgent.AGENT.getElementPageBounds(c),c.parentNode),a.U=A_Z.ae),A_Je(a)):(A_Te(a,A_xe(a,a.getDomElement())),a.U=A_Z.ae);return}}var h=b==(a.b.R?AdfKeyStroke.ARROWLEFT_KEY:AdfKeyStroke.ARROWRIGHT_KEY)||b==AdfKeyStroke.ARROWDOWN_KEY,g=b==AdfKeyStroke.ARROWLEFT_KEY||b==AdfKeyStroke.ARROWRIGHT_KEY?AdfPivotTableUtils.l:
AdfPivotTableUtils.n;if(e==g){if(e=A_mh(d[g],f,h),f==e)return}else e=A_mh(d[g],h?A_nh(a,g)-1:0,h);b=Math.floor(e/2);var h=g?a.b.Db:a.b.Hb,l;b==h?(l="after",0<h?(b=h-1,f=a.mH):f=g?a.pH:a.oH):A_oh(e)?(l="swap",f=a.pI):(l="before",f=a.nH);A_zc(a,g,b,l);0<h&&(b=A_oc(a,g,b).getAttribute("title"),f=TrFastMessageFormatUtils.format(f,b));AdfAgent.AGENT.setTextContent(a.b.ax,f);a.Km=A_b;a.$G=c;a.Bj=g;a.Cj=e;a.Hq=d}
function A_lh(a,b,c){for(var d=[],e=0;2>e;++e){var f=[];d[e]=f;for(var g=A_nh(a,e),h=0;h<g;++h){var l=Math.floor(h/2);A_oh(h)&&!A_nc(a,e,l)?f[h]=A_c:f[h]=e==b&&(l==c||l==c+1)&&!A_oh(h)?A_c:A_b}}return d}function A_oh(a){a/=2;return 0!=a-Math.floor(a)}function A_kh(a){a*=2;++a;return a}function A_nh(a,b){return 2*(b?a.b.Db:a.b.Hb)+1}function A_mh(a,b,c){var d=a.length;c=c?1:d-1;for(var e=0;e<d;++e)if(b=(b+c)%d,a[b])return b}
function A_4e(a,b){a.ak&&(A_3e(a,A_b),a.ak=A_c);if(a.Km){a.Km=A_c;A_Ac(a);A_Bc(a);AdfAgent.AGENT.setTextContent(a.b.ax,"");var c=a.Vf,d=a.Jm,e=a.Bj,f=a.Cj;if(!b&&!(c==e&&d==f)){var g=A_nh(a,e),d=Math.floor(d/2);f==g-1?1==g?(g=0,f="to"):(g=(e?a.b.Db:a.b.Hb)-1,f="after"):(g=Math.floor(f/2),f=A_oh(f)?"swap":"before");A_yc(a,c,d,e,g,f);a.Gm&&(c=a.Nd(),c!=A_&&(e=new AdfCustomEvent(c,"dragDropEnd"),c.queueEvent(e)),a.Gm=A_c,a.lq=A_)}else b&&(a.Gm=A_c,a.lq=A_)}}
AdfDhtmlPivotTablePeer.prototype.Nd=function(){var a=this.getComponent().getProperty("modelName");return a!=A_&&(a=AdfPage.PAGE.getPageProperty("PAGE_EDGE:"+a),a!=A_)?AdfPage.PAGE.findComponent(a):A_};
function A_Me(a,b){AdfFocusUtils.focusElement(a.getDomElement());a.lq=b;a.Vf=b.edge;var c=parseInt(b.layer);a.Km=A_b;a.Bj=AdfPivotTableUtils.n;a.Jm=A_kh(c);if(a.Vf==AdfPivotTableUtils.tf){a.Gm=A_b;var d=1==A_nh(a,a.Bj)?"after":"before";a.Cj=0;for(var c=[],e=0;2>e;++e){var f=[];c[e]=f;for(var g=A_nh(a,e),h=0;h<g;++h)f[h]=A_b}a.Hq=c}else a.Vf==AdfPivotTableUtils.n&&0==c?(d="swap",a.Cj=1):(d=1==A_nh(a,a.Bj)?"after":"before",a.Cj=0),a.Hq=A_lh(a,a.Vf,c);A_zc(a,AdfPivotTableUtils.n,0,d)};