/*!@license
* Infragistics.Web.ClientUI infragistics.olapflatdatasource.js 21.2.20212.99
*
* Copyright (c) 2011-2022 Infragistics Inc.
*
* http://www.infragistics.com/
*
* Depends:
*     jquery-1.4.4.js
*     jquery.ui.core.js
*     jquery.ui.widget.js
*     infragistics.util.js
*     infragistics.ext_core.js
*     infragistics.ext_collections.js
*     infragistics.ext_collectionsExtended.js
*     infragistics.ext_threading.js
*     infragistics.olap.js
*/
(function(factory){if(typeof define==="function"&&define.amd){define(["./infragistics.util","./infragistics.ext_core","./infragistics.ext_collections","./infragistics.ext_collectionsExtended","./infragistics.ext_threading","./infragistics.olap"],factory)}else{factory(igRoot)}})(function($){$.ig=$.ig||{};var $$t={};$.ig.$currDefinitions=$$t;$.ig.util.bulkDefine(["FlatDataSourceImpl:a","OlapDataSource:b","Object:c","Type:d","Boolean:e","ValueType:f","Void:g","IConvertible:h","IFormatProvider:i","Number:j","String:k","IComparable:l","Number:m","IComparable$1:n","IEquatable$1:o","Number:p","Number:q","Number:r","NumberStyles:s","Enum:t","Array:u","IList:v","ICollection:w","IEnumerable:x","IEnumerator:y","Error:z","Error:aa","Number:ab","String:ac","StringComparison:ad","RegExp:ae","CultureInfo:af","DateTimeFormat:ag","Calendar:ah","Date:ai","Number:aj","DayOfWeek:ak","DateTimeKind:al","CalendarWeekRule:am","NumberFormatInfo:an","CompareInfo:ao","CompareOptions:ap","IEnumerable$1:aq","IEnumerator$1:ar","IDisposable:as","StringSplitOptions:at","Number:au","Number:av","Number:aw","Number:ax","Number:ay","Number:az","Assembly:a0","Stream:a1","SeekOrigin:a2","RuntimeTypeHandle:a3","MethodInfo:a4","MethodBase:a5","MemberInfo:a6","ParameterInfo:a7","TypeCode:a8","ConstructorInfo:a9","PropertyInfo:ba","IOlapDataSource:bb","OlapMetadataTreeItem:bc","ICoreOlapElement:bd","OlapMetadataTreeItemType:be","IList$1:bf","ICollection$1:bg","Hierarchy:bh","HierarchyOrigin:bi","Measure:bj","AggregatorType:bk","MeasureListLocation:bl","OlapResult:bm","OlapResultAxis:bn","PositionResolver$2:bo","List$1:bp","IArray:bq","Script:br","IArrayList:bs","Array:bt","CompareCallback:bu","MulticastDelegate:bv","IntPtr:bw","Func$3:bx","Action$1:by","Comparer$1:bz","IComparer:b0","IComparer$1:b1","DefaultComparer$1:b2","Comparison$1:b3","ReadOnlyCollection$1:b4","Predicate$1:b5","NotImplementedException:b6","IPosition$2:b7","IPositionItem$2:b8","PositionItemInfo$2:b9","Dictionary$2:ca","IDictionary$2:cb","KeyValuePair$2:cc","IDictionary:cd","IEqualityComparer$1:ce","EqualityComparer$1:cf","IEqualityComparer:cg","DefaultEqualityComparer$1:ch","InvalidOperationException:ci","ArgumentException:cj","Thread:ck","ThreadStart:cl","IHierarchicalPositionItem$2:cm","Math:cn","Enumerable:co","Func$2:cp","IOrderedEnumerable$1:cq","SortedList$1:cr","ArgumentNullException:cs","EventHandler$1:ct","AsyncCompletedEventArgs:cu","EventArgs:cv","Delegate:cw","Interlocked:cx","ListSortDirection:cy","Nullable$1:cz","OlapResultTuple:c0","OlapResultAxisMember:c1","StringBuilder:c2","Environment:c3","OlapResultCell:c4","ArrayListCollection$1:c5","INotifyCollectionChanged:c6","NotifyCollectionChangedEventHandler:c7","NotifyCollectionChangedEventArgs:c8","NotifyCollectionChangedAction:c9","Cube:da","CubeType:db","Task$1:dc","Task:dd","JQueryPromise:de","Action:df","AggregateException:dg","TaskStatus:dh","TaskCompletionSource$1:di","JQueryDeferred:dj","JQuery:dk","JQueryObject:dl","Element:dm","Node:dn","ElementAttributeCollection:dp","ElementCollection:dq","WebStyle:dr","ElementNodeType:ds","document:dt","EventListener$1:du","Event:dv","DOMTokenList:dw","EventListener:dx","IElementEventHandler:dy","ElementEventHandler:dz","ElementAttribute:d0","JQueryPosition:d1","JQueryCallback:d2","JQueryEvent:d3","JQueryUICallback:d4","Member:d5","MemberType:d6","Catalog:d7","MeasureGroup:d8","DataSourceBaseOptions:d9","IOlapDataProviderFactory:ea","IOlapDiscoverDataProvider:eb","KeyValueItem:ec","Dimension:ed","DimensionType:ee","Level:ef","MeasureGroupDimension:eg","CardinalityType:eh","Kpi:ei","OlapResultView:ej","PositionInfo:ek","ResultViewHelper:el","IPostionComparer:em","CubeMetaItemsCache:en","KpiMeasure:eo","MeasureGroupMetaItemsCache:ep","Tuple$2:eq","AxisElement:er","MeasureList:es","TaskFactory:et","TaskExtensions:eu","AxisDefinitionParser:ev","MetaTreeHelper:ew","HierarchyItemPosition:ex","KpiDimension:ey","ArgumentOutOfRangeException:ez","IFlatDataProvider:e0","FlatDataSourceOptions:e1","DataSourceMetadata:e2","CubeMetadata:e3","MeasuresDimensionMetadata:e4","MeasureMetadata:e5","CellMetadata:e6","DimensionMetadata:e7","HierarchyMetadata:e8","LevelMetadata:e9","IFlatDataProviderFactory:fa","FlatDataAxisProvider:fb","IFlatDataAxisProvider:fc","RowMetadata:fd","FlatDataProvider:fe","TableMetadata:ff","DataMemberMetadata:fg","KeyListPair$1:fh","FlatDataAxisProviderHelper:fi","FlatDataPartialAxisProvider:fj","DefaultFlatDataProviderFactory:fk","CoreOlapElementParser:fl","OlapFlatDataSource:fm","DataSourceBase:fn","jQueryUtils:fo","FlatDataSampleClass:fp","AbstractEnumerable:fq","Func$1:fr","AbstractEnumerator:fs","GenericEnumerable$1:ft","GenericEnumerator$1:fu"]);var $a=$.ig.intDivide,$b=$.ig.util.cast,$c=$.ig.util.defType,$d=$.ig.util.defEnum,$e=$.ig.util.getBoxIfEnum,$f=$.ig.util.getDefaultValue,$g=$.ig.util.getEnumValue,$h=$.ig.util.getValue,$i=$.ig.util.intSToU,$j=$.ig.util.nullableEquals,$k=$.ig.util.nullableIsNull,$l=$.ig.util.nullableNotEquals,$m=$.ig.util.toNullable,$n=$.ig.util.toString$1,$o=$.ig.util.u32BitwiseAnd,$p=$.ig.util.u32BitwiseOr,$q=$.ig.util.u32BitwiseXor,$r=$.ig.util.u32LS,$s=$.ig.util.unwrapNullable,$t=$.ig.util.wrapNullable,$u=String.fromCharCode,$v=$.ig.util.castObjTo$t,$w=$.ig.util.compare,$x=$.ig.util.replace,$y=$.ig.util.stringFormat,$z=$.ig.util.stringFormat1,$0=$.ig.util.stringFormat2,$1=$.ig.util.stringCompare1,$2=$.ig.util.stringCompare2,$3=$.ig.util.stringCompare3,$4=$.ig.util.equalsSimple,$5=$.ig.util.compareSimple,$6=$.ig.util.numberToString,$7=$.ig.util.tryParseInt32_1,$8=$.ig.util.tryParseInt32_2,$9=$.ig.util.intToString1,$aa=$.ig.util.parseInt32_1,$ab=$.ig.util.parseInt32_2;$c("FlatDataSourceImpl:a","OlapDataSource",{a5:null,dataProvider:function(){if(this.a5==null){this.a5=this.dataProviderFactory().createDataProvider()}return this.a5},init:function(a){this.a9=new $$t.bp($$t.$fb.$type,0);$$t.$b.init.call(this,a);this.flatDataSourceOptions(a);this.dataProviderFactory(a.dataProviderFactory())},h:function(){return new $$t.fk(this.flatDataSourceOptions().itemsSource(),this.flatDataSourceOptions().dataSourceMetadata())},_flatDataSourceOptions:null,flatDataSourceOptions:function(a){if(arguments.length===1){this._flatDataSourceOptions=a;return a}else{return this._flatDataSourceOptions}},ap:function(){var $self=this;var a=new $$t.di($$t.$bc.$type,0);if(this.isInitialized()){a.e(this.metadataTree());return a._b}var b=this.columnAxis();b.collectionChanged=$.ig.Delegate.prototype.combine(b.collectionChanged,this.bd.runOn(this));var c=this.rowAxis();c.collectionChanged=$.ig.Delegate.prototype.combine(c.collectionChanged,this.bh.runOn(this));var d=this.filters();d.collectionChanged=$.ig.Delegate.prototype.combine(d.collectionChanged,this.be.runOn(this));var e=this.measures();e.collectionChanged=$.ig.Delegate.prototype.combine(e.collectionChanged,this.bf.runOn(this));return $$t.$eu.b($$t.$bc.$type,$$t.$bc.$type,$$t.$eu.b($$t.$bf.$type.specialize($$t.$da.$type),$$t.$bc.$type,this.am(null),function(f){return $self.aq($$t.$co.ad($$t.$da.$type,$self.cubes()).name())}),function(f){return $self.ak()})},aj:function(){var a=this.dataProvider();var b=new $$t.bp($$t.$dd.$type,0);b.add(a.discoverDimensionsAsync(null,null));b.add(a.discoverHierarchiesAsync(null,null));b.add(a.discoverLevelsAsync(null,null));b.add(a.discoverMeasuresAsync(null,null));b.add(a.discoverKpisAsync(null,null));var c=new Array(b.count());b.copyTo(c,0);var d=new $$t.en;this._c=d;var e=new $$t.et;return e.c(c,function(f){var g=f[0];var h=f[1];var i=f[2];var j=f[3];var k=f[4];d._z=j.n();d._t=g.n();d._u=h.n();d._x=i.n();d._w=k.n()})},bj:function(a,b){var c=0;var d=this.measureListIndex();if(a){var e=this.a4(c);if(e!=null&&this.measureListLocation()==1){if(d>-1){var f=e.positionResolver().rootPositionInfo();if(f!=null){this.bg(f,d-1)}}}c++}if(b){var g=this.a4(c);if(g!=null&&this.measureListLocation()==0){if(d>-1){var h=g.positionResolver().rootPositionInfo();if(h!=null){this.bg(h,d-1)}}}}},bg:function(a,b){if(a.positionItemIndex()==b){a.clear()}else{var d=a.values().getEnumerator();while(d.moveNext()){var c=d.current();this.bg(c,b)}}},as:function(){var a=this.ba();if(!String.isNullOrEmpty(a)){var b=new $$t.di($$t.$bm.$type,0);b.d(new $$t.ci(1,a));return b._b}var c=this.columnAxis().count()>0;var d=this.rowAxis().count()>0;if(!d&&!c&&this.measures().count()==0){var e=function(){var $ret=new $$t.bm;$ret.isEmpty(true);return $ret}();var f=new $$t.di($$t.$bm.$type,0);f.e(e);this._l=new $$t.ej(e,e,false,false);this.result(e);this.clearPendingChanges();return f._b}var g=this._m;var h=this._s;var i=this._r||this._p;var j=this._n;var k=this.ab().count()>0;var l=this.aa().count()>0;var m=this.af.count()>0;if(!g&&!h&&!i&&!j&&!k&&!l&&!m){var n=new $$t.di($$t.$bm.$type,0);n.e(this.result());return n._b}if(this._r){this.bj(c,d)}var o=null;var p=null;var q=0;var r="Axis0";var s=this._m;if(this._r&&c&&this.measureListIndex()>-1&&this.measureListLocation()==1){s=true}o=this.a3(this.columnAxis(),s,q);this._m=false;if(o!=null){q++;r="Axis1"}var t=this._s;if(this._r&&d&&this.measureListIndex()>-1&&this.measureListLocation()==0){t=true}p=this.a3(this.rowAxis(),t,q);this._s=false;if(p!=null){if(p.axis()!=null){p.axis().name(r)}q++}this._r=false;this._n=false;var u=new $$t.bp($$t.$er.$type,0);var w=this._y.getEnumerator();while(w.moveNext()){var v=w.current();u.add(v)}var y=this._ag.getEnumerator();while(y.moveNext()){var x=y.current();u.add(x)}var aa=this._z.getEnumerator();while(aa.moveNext()){var z=aa.current();u.add(z)}var ab=this.bb(u,c,d,k,l,o,p);return ab},bb:function(a,b,c,d,e,f,g){var $self=this;if(this.af.count()>0){this.dataProvider().am(a);var i=this.a9.getEnumerator();while(i.moveNext()){var h=i.current();h.resetAxisMetadata()}this.af.clear()}this.a8(b,c);this.bc(b,c,true);if(d||e){var j=null;if(b){var k=this.ab();var l=$$t.$co.z($$t.$ek.$type,$$t.$co.u($$t.$ek.$type,k,function(m){return m._c=="Axis0"}));if(l.count()>0){var m=l.item(0);k.remove(m);var n=this.result().axes().item(0).tuples().__inner[m._b];var o=n.members().item(m._a);var p=new $$t.fj(this.dataProvider(),this.columnAxis(),o,this._c);var q=p.generateAxis("Axis0");j=$$t.$eu.b($$t.$bn.$type,$$t.$bm.$type,q,function(r){var s=$self.dataProvider().evaluateResult(p,g,$self.measures());return s});j=$$t.$eu.b($$t.$bm.$type,$$t.$bm.$type,j,function(r){if($self.d("Axis0",r.n()).tuples().count()==0){o.displayInfo($i(0))}var s=$self._l;$self._l=$self._l.extend(r.n(),"Axis0");$self.result($self._l.visibleResult());$$t.$el.h("Axis0",s,$self._l);{$$t.$el.g(m,true,$self._l)}f.extendWith(p);f.axis($self.d("Axis0",$self.result()));var t=new $$t.di($$t.$bm.$type,0);t.e($self._l.visibleResult());$$t.$el.f(m,true,f.positionResolver(),$self._l.visibleResult());return t._b})}}if(c){var r=b?"Axis1":"Axis0";var s=this.ab();var t=$$t.$co.z($$t.$ek.$type,$$t.$co.u($$t.$ek.$type,s,function(u){return u._c==r}));if(d&&t.count()>0){var u=t.item(0);s.remove(u);var v=$$t.$co.ad($$t.$bn.$type,$$t.$co.u($$t.$bn.$type,this.result().axes(),function(w){return w.name()==r})).tuples().__inner[u._b];var w=v.members().item(u._a);var x;var y=new $$t.fj(this.dataProvider(),this.rowAxis(),w,this._c);if(j!=null){x=$$t.$eu.b($$t.$bm.$type,$$t.$bn.$type,j,function(z){return y.generateAxis(r)})}else{x=y.generateAxis(r)}j=$$t.$eu.b($$t.$bn.$type,$$t.$bm.$type,x,function(z){var aa=$self.dataProvider().evaluateResult(f,y,$self.measures());return aa});j=$$t.$eu.b($$t.$bm.$type,$$t.$bm.$type,j,function(z){if($self._l==null){$self._l=new $$t.ej($self.result(),$self.result(),b,c)}var aa=$self._l.hasColumns()?"Axis1":"Axis0";if($self.d(aa,z.n()).tuples().count()==0){w.displayInfo($i(0))}var ab=$self._l;$self._l=$self._l.extend(z.n(),aa);$self.result($self._l.visibleResult());$$t.$el.h(aa,ab,$self._l);{$$t.$el.g(u,true,$self._l)}var ac=new $$t.di($$t.$bm.$type,0);ac.e($self._l.visibleResult());g.extendWith(y);g.axis($self.d(aa,$self.result()));$$t.$el.f(u,true,g.positionResolver(),$self.result());return ac._b})}}if(j!=null){return j}var z=new $$t.di($$t.$bm.$type,0);z.e(this.result());return z._b}else{var aa=new $$t.di($$t.$bm.$type,0);if(f==null&&g==null&&this.measures().count()==0){var ab=function(){var $ret=new $$t.bm;$ret.isEmpty(true);return $ret}();this.result(ab);aa.e(this.result());return aa._b}var ac=this.dataProvider().evaluateResult(f,g,this.measures());return $$t.$eu.b($$t.$bm.$type,$$t.$bm.$type,ac,function(ad){$self._l=new $$t.ej(ad.n(),ad.n(),b,c);$self.result($self._l.visibleResult());$self.clearPendingChanges();aa.e($self.result());return aa._b})}},ba:function(){var a=new $$t.ca(String,String,0);for(var b=0;b<this.columnAxis().count();b++){var c=this.columnAxis().item(b);if($b($$t.$es.$type,c)!==null){continue}if(!a.containsKey(c.uniqueName())){a.add(c.uniqueName(),"columns")}else{return"the "+c.uniqueName()+" hierarchy is used twice in columns"}}for(var d=0;d<this.rowAxis().count();d++){var e=this.rowAxis().item(d);if($b($$t.$es.$type,e)!==null){continue}if(!a.containsKey(e.uniqueName())){a.add(e.uniqueName(),"rows")}else{return"the "+e.uniqueName()+" hierarchy is used in rows and in columns"}}for(var f=0;f<this.filters().count();f++){var g=this.filters().item(f);var h;if(!function(){var i=a.tryGetValue(g.uniqueName(),h);h=i.p1;return i.ret}()){a.add(g.uniqueName(),"filters")}else{return"the "+g.uniqueName()+" hierarchy is used in filters and in "+h}}for(var i=0;i<this.measures().count();i++){var j=this.measures().item(i);var k;if(!function(){var l=a.tryGetValue(j.uniqueName(),k);k=l.p1;return l.ret}()){a.add(j.uniqueName(),"measures")}else{if(k=="measures"){return"the "+j.uniqueName()+" measure is used twice in measures"}return"the "+j.uniqueName()+" measure is used in measures and in "+k}}return null},a8:function(a,b){var c=new $$t.ca(String,$$t.$bf.$type.specialize($$t.$ek.$type),0);var d=this._l;var e=this.ab();for(var f=0;f<e.count();f++){var g=e.item(f);var h;if(!function(){var i=c.tryGetValue(g._c,h);h=i.p1;return i.ret}()){h=new $$t.bp($$t.$ek.$type,0);c.add(g._c,h)}if(this._l==null){this._l=new $$t.ej(this.result(),this.result(),a,b)}var i=this._l.expandTupleMember(g._c,g._b,g._a);if(i!=null){h.add(g);this._l=i;this.result(this._l.visibleResult())}}var k=c.getEnumerator();while(k.moveNext()){var j=k.current();var m=j.value().getEnumerator();while(m.moveNext()){var l=m.current();e.remove(l)}}var n=0;var o="Axis0";if(a){var p=$$t.$co.af(String,$$t.$co.u(String,c.keys(),function(q){return q==o}))!=null;var q=this.a4(n);if(q!=null&&p){var r=c.item(o);if(r.count()>0){$$t.$el.h(o,d,this._l);var t=r.getEnumerator();while(t.moveNext()){var s=t.current();$$t.$el.g(s,true,this._l);$$t.$el.f(s,true,q.positionResolver(),this._l.visibleResult())}var u=this.d(o,this.result());q.axis(u);$$t.$el.d(u.positionResolver(),q.positionResolver())}}n++;o="Axis1"}if(b){var v=$$t.$co.af(String,$$t.$co.u(String,c.keys(),function(w){return w==o}))!=null;var w=this.a4(n);if(w!=null&&v){var x=c.item(o);if(x.count()>0){$$t.$el.h(o,d,this._l);var z=x.getEnumerator();while(z.moveNext()){var y=z.current();$$t.$el.g(y,true,this._l);$$t.$el.f(y,true,w.positionResolver(),this._l.visibleResult())}var aa=this.d(o,this.result());w.axis(aa);$$t.$el.d(aa.positionResolver(),w.positionResolver())}}}return e.count()>0},bc:function(a,b,c){if(this.result()!=null){var d=this.aa();var e=new $$t.ca(String,$$t.$bf.$type.specialize($$t.$ek.$type),0);var f=this._l;for(var g=0;g<d.count();g++){var h=d.item(g);var i;if(!function(){var j=e.tryGetValue(h._c,i);i=j.p1;return j.ret}()){i=new $$t.bp($$t.$ek.$type,0);e.add(h._c,i)}i.add(h);if(c){if(this._l==null){this._l=new $$t.ej(this.result(),this.result(),a,b)}else{this._l=this._l.collapseTupleMember(h._c,h._b,h._a);this.result(this._l.visibleResult())}}}var j=0;var k="Axis0";if(a){var l=$$t.$co.af(String,$$t.$co.u(String,e.keys(),function(m){return m==k}))!=null;var m=this.a4(j);if(m!=null&&l){var n=e.item(k);if(n.count()>0){$$t.$el.h(k,f,this._l);var p=n.getEnumerator();while(p.moveNext()){var o=p.current();$$t.$el.f(o,false,m.positionResolver(),this._l.visibleResult())}var q=this.d(k,this.result());m.axis(q)}}j++;k="Axis1"}if(b){var r=$$t.$co.af(String,$$t.$co.u(String,e.keys(),function(s){return s==k}))!=null;var s=this.a4(j);if(s!=null&&r){var t=e.item(k);if(t.count()>0){$$t.$el.h(k,f,this._l);var v=t.getEnumerator();while(v.moveNext()){var u=v.current();$$t.$el.f(u,false,s.positionResolver(),this._l.visibleResult())}var w=this.d(k,this.result());s.axis(w)}}}d.clear()}},a3:function(a,b,c){var d=null;if(a.count()>0){d=this.a4(c);if(b){if(d!=null){d.resetAxis(a)}else{d=new $$t.fb(this.dataProvider(),a,this._c);this.bi(c,d)}}}return d},bi:function(a,b){this.a9.item(a,b)},a4:function(a){if(a<this.a9.count()){return this.a9.item(a)}return null},getMembersOfLevel:function(a){var $self=this;var b=new $$t.bp($$t.$ec.$type,0);var c=a;b.add(function(){var $ret=new $$t.ec;$ret._a="LEVEL_UNIQUE_NAME";$ret._b=a;return $ret}());var d=this.dataProvider().discoverMembersAsync(null,b);d.j(function(e){var g=e.n().getEnumerator();while(g.moveNext()){var f=g.current();$self._c.aa(f)}$self._c.ac(c)});return d},getMembersOfHierarchy:function(a){var $self=this;var b=a;var c=new $$t.fl(a);var d=c.b();if(d.count()<2){throw new $$t.cj(2,"Specified value: "+a+" is not valid.",a)}var e=new $$t.ec;e._a="HIERARCHY_UNIQUE_NAME";e._b=d.item(0)+"."+d.item(1);var f=new $$t.bp($$t.$ec.$type,0);f.add(e);var g=this.dataProvider().discoverMembersAsync(null,f);g.j(function(h){var j=h.n().getEnumerator();while(j.moveNext()){var i=j.current();$self._c.aa(i)}$self._c.ab(b)});return g},getMembersOfMember:function(a){var $self=this;var b=new $$t.fl(a);var c=b.b();var d=new $$t.ec;if(c.count()<3){throw new $$t.cj(2,"Specified value: "+a+" is not valid.",a)}switch(c.count()){case 1:d._a="DIMENSION_UNIQUE_NAME";d._b=c.item(0);break;case 2:d._a="HIERARCHY_UNIQUE_NAME";d._b=c.item(0)+"."+c.item(1);break;default:d._a="LEVEL_UNIQUE_NAME";d._b=c.item(0)+"."+c.item(1)+"."+c.item(2);break}var e=new $$t.bp($$t.$ec.$type,0);e.add(d);e.add(function(){var $ret=new $$t.ec;$ret._a="MEMBER_UNIQUE_NAME";$ret._b=a;return $ret}());var f=this.dataProvider().discoverMembersAsync(null,e);f.j(function(g){var i=g.n().getEnumerator();while(i.moveNext()){var h=i.current();$self._c.aa(h)}});return f},bd:function(a,b){this._m=true;this.bk(0,this.columnAxis(),this.rowAxis());this.a0(b,this._y);this.a2(b,this.columnAxis());if(b.action()!=4&&this.columnAxis()!=null){var c=Math.max(b.newStartingIndex(),b.oldStartingIndex());this.bl("Axis0",c)}},bh:function(a,b){this._s=true;this.bk(1,this.rowAxis(),this.columnAxis());this.a0(b,this._ag);this.a2(b,this.rowAxis());if(b.action()!=4&&this.rowAxis()!=null){var c=this.columnAxis()==null?"Axis0":"Axis1";var d=Math.max(b.newStartingIndex(),b.oldStartingIndex());this.bl(c,d)}},a9:null,bk:function(a,b,c){if(b.count()>0){if(c.count()>0){if(this.a9.count()<2){this.a9.insert(a,null)}}else{if(this.a9.count()==0){this.a9.insert(0,null)}}}else{if(this.a9.count()>0){if(this.a9.count()>1){this.a9.removeAt(a)}else{this.a9.removeAt(0)}}}},bl:function(a,b){var c=this.ab();var d=this.aa();for(var e=d.count()-1;e>=0;e--){var f=d.item(e);if(f._c==a&&f._a>=b){d.removeAt(e)}}for(var g=c.count()-1;g>=0;g--){var h=c.item(g);if(h._c==a&&h._a>=b){c.removeAt(g)}}},be:function(a,b){this._n=true;this.a0(b,this._z)},bf:function(a,b){this._r=true;this.a1()},$type:new $.ig.Type("FlatDataSourceImpl",$$t.$b.$type)},true);$c("IFlatDataProviderFactory:fa","Object",{$type:new $.ig.Type("IFlatDataProviderFactory",null,[$$t.$ea.$type])},true);$c("DefaultFlatDataProviderFactory:fk","Object",{b:null,a:null,init:function(a,b){$.ig.$op.init.call(this);this.b=a;this.a=b},createDataProvider:function(){return new $$t.fe(this.b,this.a)},$type:new $.ig.Type("DefaultFlatDataProviderFactory",$.ig.$ot,[$$t.$fa.$type])},true);$c("FlatDataSourceOptions:e1","DataSourceBaseOptions",{init:function(){$$t.$d9.init.call(this)},_itemsSource:null,itemsSource:function(a){if(arguments.length===1){this._itemsSource=a;return a}else{return this._itemsSource}},_dataSourceMetadata:null,dataSourceMetadata:function(a){if(arguments.length===1){this._dataSourceMetadata=a;return a}else{return this._dataSourceMetadata}},_dataProviderFactory:null,dataProviderFactory:function(a){if(arguments.length===1){this._dataProviderFactory=a;return a}else{return this._dataProviderFactory}},$type:new $.ig.Type("FlatDataSourceOptions",$$t.$d9.$type)},true);$c("OlapFlatDataSource:fm","DataSourceBase",{a6:null,init:function(a){this.a6=null;this.a5=false;$$t.$fn.init.call(this);if(a==null){throw new $$t.cs(0,"options")}this.a6=a;this.a9(this.a6)},a3:function(a){var b=$$t.$fo.getJavascriptObjectProperty(a,"metadata");if(b==null){throw new $$t.ci(1,"metadata is null or undefined.")}var c=new $$t.e2;var d=this.a2(b);c._a=d;return c},a2:function(a){var b=$$t.$fo.getJavascriptObjectProperty(a,"cube");if(b==null){throw new $$t.ci(1,"metadata.cube is null or undefined.")}var c=new $$t.e3;c._e=$$t.$fo.getJavascriptObjectProperty(b,"name");if(String.isNullOrEmpty(c._e)){throw new $$t.ci(1,"cube.name is null, empty or undefined")}c._c=$$t.$fo.getJavascriptObjectProperty(b,"caption");if(String.isNullOrEmpty(c._c)){c._c=c._e}c._b=this.a4(b);c._d=$$t.$fo.getJavascriptObjectProperty(b,"description");c._a=this.ay(b);return c},a4:function(a){var b=$$t.$fo.getJavascriptObjectProperty(a,"measuresDimension");if(b==null){return null}var c=$$t.$fo.getJavascriptObjectProperty(b,"caption");var d=$$t.$fo.getJavascriptObjectProperty(b,"name");var e=function(){var $ret=new $$t.e4;$ret._b=c;$ret._c=d;return $ret}();e._a=this.a1(b);return e},ay:function(a){var b=$$t.$fo.getJavascriptObjectProperty(a,"dimensions");if(b==null){return null}var c=new $$t.c5($$t.$e7.$type);for(var d=0;d<b.length;d++){var e=new $$t.e7;c.add(e);var f=b[d];e._e=$$t.$fo.getJavascriptObjectProperty(f,"name");if(String.isNullOrEmpty(e._e)){throw new $$t.ci(1,"dimension.name is null, empty or undefined")}e._b=$$t.$fo.getJavascriptObjectProperty(f,"caption");if(String.isNullOrEmpty(e._b)){e._b=e._e}e._c=$$t.$fo.getJavascriptObjectProperty(f,"defaultHierarchy");e._a=this.az(f);e._d=$$t.$fo.getJavascriptObjectProperty(f,"description")}return c},a1:function(a){var b=$$t.$fo.getJavascriptObjectProperty(a,"measures");if(b==null){return null}var c=new $$t.c5($$t.$e5.$type);for(var d=0;d<b.length;d++){var e=new $$t.e5;c.add(e);var f=b[d];e._f=$$t.$fo.getJavascriptObjectProperty(f,"name");if(String.isNullOrEmpty(e._f)){throw new $$t.ci(1,"measure.name is null, empty or undefined")}e._e=$$t.$fo.getJavascriptObjectProperty(f,"caption");if(String.isNullOrEmpty(e._e)){e._e=e._f}e._d=$$t.$fo.getJavascriptObjectProperty(f,"displayFormat");e._c=$$t.$fo.getJavascriptObjectProperty(f,"displayFolder");e._b=$$t.$fo.getJavascriptObjectProperty(f,"aggregator");if(e._b==null){throw new $$t.ci(1,"aggregator is null or undefined for measureMetadata: "+e._f)}}return c},az:function(a){var b=$$t.$fo.getJavascriptObjectProperty(a,"hierarchies");if(b==null){return null}var c=new $$t.c5($$t.$e8.$type);for(var d=0;d<b.length;d++){var e=new $$t.e8;c.add(e);var f=b[d];e._e=$$t.$fo.getJavascriptObjectProperty(f,"name");if(String.isNullOrEmpty(e._e)){throw new $$t.ci(1,"hierarchy.hierarchyName is null, empty or undefined")}e._b=$$t.$fo.getJavascriptObjectProperty(f,"caption");if(String.isNullOrEmpty(e._b)){e._b=e._e}e._d=$$t.$fo.getJavascriptObjectProperty(f,"displayFolder");e._a=this.a0(f);if(e._a==null||e._a.count()==0){throw new $$t.ci(1,"levelKeys is null, empty or undefined for hierarchyMetadata: "+e._e)}}return c},a0:function(a){var b=$$t.$fo.getJavascriptObjectProperty(a,"levels");if(b==null){return null}var c=new $$t.c5($$t.$e9.$type);for(var d=0;d<b.length;d++){var e=new $$t.e9;c.add(e);var f=b[d];e._c=$$t.$fo.getJavascriptObjectProperty(f,"name");if(String.isNullOrEmpty(e._c)){throw new $$t.ci(1,"level.name is null, empty or undefined")}e._b=$$t.$fo.getJavascriptObjectProperty(f,"caption");if(String.isNullOrEmpty(e._b)){e._b=e._c}e._a=$$t.$fo.getJavascriptObjectProperty(f,"memberProvider");if(e._a==null){throw new $$t.ci(1,"levelMetadata.memberProvider is null or undefined")}}return c},a9:function(a){var options_=a;var schema_=this.a7(a);var dataSource=options_.dataSource;if(!options_.dataSource&&options_.dataSourceUrl){options_.dataSource=options_.dataSourceUrl}var dataOptions={callback:this.dataSourceDataResolved,callee:this,dataSource:options_.dataSource,defaultChildrenDataProperty:options_.bindings.childDataProperty,responseDataType:options_.responseDataType,localSchemaTransform:options_.dataSourceType&&options_.dataSourceType==="xml"?true:false,schema:schema_};if(options_.dataSourceType){dataOptions.type=options_.dataSourceType}if(options_.responseDataKey){dataOptions.responseDataKey=options_.responseDataKey}if(!(options_.dataSource instanceof $.ig.DataSource)){options_.dataSource=new $.ig.DataSource(dataOptions)}options_.dataSource.dataBind(this.dataSourceDataResolved,this)},dataSourceDataResolved:function(){var a=$$t.$fo.getJavascriptObjectProperty(this.a6,"dataSource");if(a==null){throw new $$t.ci(1,"dataSource is null or undefined")}var b=this.a3(this.a6);var c=$$t.$fo.getJavascriptObjectProperty(this.a6,"measures");var d=$$t.$fo.getJavascriptObjectProperty(this.a6,"filters");var e=$$t.$fo.getJavascriptObjectProperty(this.a6,"columns");var f=$$t.$fo.getJavascriptObjectProperty(this.a6,"rows");var g=$$t.$fo.getJavascriptObjectMethodResult(a,"data",[]);var h=function(){var $ret=new $$t.e1;$ret.measures(c);$ret.filters(d);$ret.columns(e);$ret.rows(f);$ret.itemsSource(g);$ret.dataSourceMetadata(b);return $ret}();this.dataSource(new $$t.a(h));this.initDataSource()},initDataSource:function(){var $self=this;if(this.a5){this.a5=false;var a=this.dataSource().initialize();var promise_=a._d;a.j(function(b){$self.a8.e(b.n())});var $this=this;if(!this._isInitializedAttached){this._isInitializedAttached=true;promise_.always(function(result){var args={error:null,metadataTreeRoot:null};if(promise_.state()==="rejected"){args.error=result}else{args.metadataTreeRoot=result}$($this).trigger("initialized",args);$this._isInitializedAttached=false})}}},a5:false,a8:null,initialize:function(){if(this.dataSource()!=null){return $$t.$fn.initialize.call(this)}this.a5=true;this.a8=new $$t.di($$t.$bc.$type,0);return this.a8._a.promise()},a7:function(a){var options_=a;var schema_=null;var schema={},opt=options_,bindings=options_.bindings;if(bindings==null){opt.bindings={};schema.text={name:"Text",type:"string"};opt.bindings.textKey="Text";schema.value={name:"Value",type:"string"};opt.bindings.valueKey="Value";schema.imageUrl={name:"ImageUrl",type:"string"};opt.bindings.imageUrlKey="ImageUrl";schema.navigateUrl={name:"NavigateUrl",type:"string"};opt.bindings.navigateUrlKey="NavigateUrl";schema.childData={name:"Nodes",type:"object"};opt.bindings.childDataProperty="Nodes";schema.target={name:"Target",type:"string"};opt.bindings.targetKey="Target";bindings=opt.bindings}else if(opt.dataSourceType==="xml"){if(bindings.searchFieldXPath){schema.searchField=bindings.searchFieldXPath}}schema.fields=[];if(bindings.textKey){schema.fields.push({name:bindings.textKey,type:"string",xpath:bindings.textXPath});schema.textKey=bindings.textKey}if(bindings.valueKey){schema.fields.push({name:bindings.valueKey,type:"string",xpath:bindings.valueXPath});schema.valueKey=bindings.valueKey}if(bindings.navigateUrlKey){schema.fields.push({name:bindings.navigateUrlKey,type:"string",xpath:bindings.navigateUrlXPath});schema.navigateUrlKey=bindings.navigateUrlKey}if(bindings.imageUrlKey){schema.fields.push({name:bindings.imageUrlKey,type:"string",xpath:bindings.imageUrlXPath});schema.imageUrlKey=bindings.imageUrlKey}if(bindings.targetKey){schema.fields.push({name:bindings.targetKey,type:"string"});schema.targetKey=bindings.targetKey}if(bindings.expandedKey){schema.fields.push({name:"Expanded",type:"boolean"});schema.expandedKey=bindings.expandedKey}if(bindings.primaryKey){schema.fields.push({name:bindings.primaryKey,type:"string"});schema.primaryKey=bindings.primaryKey}if(bindings.childDataProperty){schema.fields.push({name:bindings.childDataProperty,type:"object",xpath:bindings.childDataXPath});schema.childDataProperty=bindings.childDataProperty}if(!schema.searchField&&opt.responseDataKey){schema.searchField=opt.responseDataKey}schema_=schema;return schema_},$type:new $.ig.Type("OlapFlatDataSource",$$t.$fn.$type)},true);$c("FlatDataSampleClass:fp","Object",{init:function(){$.ig.$op.init.call(this)},$type:new $.ig.Type("FlatDataSampleClass",$.ig.$ot)},true);$c("IFlatDataAxisProvider:fc","Object",{$type:new $.ig.Type("IFlatDataAxisProvider",null)},true);$c("FlatDataAxisProvider:fb","Object",{h:null,c:null,a:null,init:function(a,b,c){this.i=null;this.b=null;this.f=false;this.g=false;$.ig.$op.init.call(this);this.a=c;this.dataProvider(a);this.h=$$t.$co.z($$t.$bd.$type,$$t.$co.o($$t.$bd.$type,$$t.$bd.$type,b,function(d){return d}));this.c=new $$t.fi(a,b.count(),c)},_dataProvider:null,dataProvider:function(a){if(arguments.length===1){this._dataProvider=a;return a}else{return this._dataProvider}},_axis:null,axis:function(a){if(arguments.length===1){this._axis=a;return a}else{return this._axis}},positionResolver:function(){return this.c._d},i:null,b:null,f:false,g:false,resetAxis:function(a){if(this.axis()!=null){this.b=this.axis();this.i=$$t.$co.z($$t.$bd.$type,$$t.$co.o($$t.$bd.$type,$$t.$bd.$type,a,function(b){return b}));this.f=true}else{this.c=new $$t.fi(this.dataProvider(),a.count(),this.a);this.h=a}},resetAxisMetadata:function(){if(this.axis()!=null){this.g=true}},j:function(a){var $self=this;this.f=false;var b=this.i;var c=this.b;var d=new $$t.di($$t.$bn.$type,0);var e=new $$t.bp(String,0);for(var f=0;f<this.h.count();f++){var g=this.h.item(f);if($b($$t.$es.$type,g)!==null){e.add(this.dataProvider().sourceMetadata()._a._b._c);continue}e.add(g.uniqueName())}this.h=b;var h=new $$t.bp(String,0);var i=new $$t.bp($$t.$cc.$type.specialize(String,$$t.$m.$type),0);for(var j=0;j<this.h.count();j++){var k=this.h.item(j);if($b($$t.$es.$type,k)!==null){h.add(this.dataProvider().sourceMetadata()._a._b._c);continue}h.add(k.uniqueName());i.add(new $$t.cc(String,$$t.$m.$type,1,k.uniqueName(),0))}var l=new $$t.bp($$t.$cc.$type.specialize(String,$$t.$m.$type),0);if(e.count()>0){var m=-1;for(var n=0;n<h.count();n++){if(n==e.count()||e.item(n)!=h.item(n)){break}m=n}if(m<i.count()-1){for(var o=m+1;o<i.count();o++){l.add(i.item(o))}}else{l=i}var p=new Array(this.h.count());var q=new $$t.bp($$t.$c0.$type,0);this.c.m(l).j(function(r){$self.p(m,b,p,r.n(),q,c.name(),d,true)});return d._b}return this.generateAxis(a)},generateAxis:function(a){var $self=this;if(this.g||this.f){var b=null;if(this.g){b=this.k(a)}if(this.f){b=this.j(a)}return b}var c=new $$t.di($$t.$bn.$type,0);if(this.axis()!=null){c.e(this.axis());return c._b}var d=new Array(this.h.count());var e=new $$t.bp(String,0);var f=new $$t.bp($$t.$c0.$type,0);var g=new $$t.bp($$t.$cc.$type.specialize(String,$$t.$m.$type),0);var h=this.h;for(var i=0;i<this.h.count();i++){var j=this.h.item(i);if($b($$t.$es.$type,j)!==null){e.add(this.dataProvider().sourceMetadata()._a._b._c);continue}e.add(j.uniqueName());g.add(new $$t.cc(String,$$t.$m.$type,1,j.uniqueName(),0))}var k=new $$t.bp($$t.$cc.$type.specialize(String,$$t.$m.$type),0);var l=this.dataProvider().tableMetadata().e();k=g;var m=this.c.m(k);m.j(function(n){$self.c.o(h,0,d,n.n(),l,null,f);$self.axis(function(){var $ret=new $$t.bn(f,h.count());$ret.name(a);return $ret}());c.e($self.axis())});return c._b},p:function(a,b,c,d,e,f,g,h){var i=this.positionResolver();if(h){this.c=new $$t.fi(this.dataProvider(),b.count(),this.a)}if(a>-1&&i.rootPositionInfo().count()>0){this.c.p(b,a,i.rootPositionInfo(),c,d,e)}else{var j=$$t.$co.z($$t.$fd.$type,$$t.$co.u($$t.$fd.$type,this.dataProvider().tableMetadata().e(),function(k){return!k._a}));this.c.o(b,0,c,d,j,null,e)}this.axis(function(){var $ret=new $$t.bn(e,b.count());$ret.name(f);return $ret}());g.e(this.axis())},addTuples:function(a){if(this.axis()==null){throw new $$t.ci(0)}var c=a.getEnumerator();
while(c.moveNext()){var b=c.current();this.c.e(b.key(),b.value())}},extendWith:function(a){var b=new $$t.bp($$t.$cc.$type.specialize($$t.$c0.$type,$$t.$bf.$type.specialize($$t.$fd.$type)),0);var d=a.getPositionsMetadata().getEnumerator();while(d.moveNext()){var c=d.current();var e=a.getTupleRowsMetadata(c);b.add(new $$t.cc($$t.$c0.$type,$$t.$bf.$type.specialize($$t.$fd.$type),1,c,e))}this.addTuples(b)},k:function(a){var $self=this;this.g=false;var b=new $$t.di($$t.$bn.$type,0);var c=new $$t.bp($$t.$cc.$type.specialize($$t.$c0.$type,$$t.$bf.$type.specialize($$t.$fd.$type)),0);var d=new $$t.bp($$t.$c0.$type,0);for(var e=0;e<this.c._d.positions().count();e++){var f=this.c._d.positions().__inner[e];var g=$$t.$co.z($$t.$fd.$type,$$t.$co.u($$t.$fd.$type,this.dataProvider().u($$t.$co.a($$t.$c1.$type,f.members()),f.itemsCount()),function(h){return!h._a}));if(g.count()>0){d.add(f)}c.add(new $$t.cc($$t.$c0.$type,$$t.$bf.$type.specialize($$t.$fd.$type),1,f,g))}if(c.count()>0){this.addTuples(c)}var h=new Array(this.h.count());var i=new $$t.bp($$t.$cc.$type.specialize(String,$$t.$m.$type),0);for(var j=0;j<this.h.count();j++){var k=this.h.item(j);if($b($$t.$es.$type,k)!==null){continue}i.add(new $$t.cc(String,$$t.$m.$type,1,k.uniqueName(),0))}this.c.m(i).j(function(l){$self.p($self.h.count()-1,$self.h,h,l.n(),new $$t.bp($$t.$c0.$type,0),a,b,false)});return b._b},getTupleRowsMetadata:function(a){return this.c.i(a)},$type:new $.ig.Type("FlatDataAxisProvider",$.ig.$ot,[$$t.$fc.$type])},true);$c("FlatDataAxisProviderHelper:fi","Object",{b:null,f:null,_j:null,init:function(a,b,c){$.ig.$op.init.call(this);this.b=c;this._c=a;this.f=new $$t.ca($$t.$m.$type,$$t.$bf.$type.specialize($$t.$fd.$type),0);this._d=new $$t.bo(String,$.ig.$op.$type,new $$t.bp($$t.$b7.$type.specialize(String,$.ig.$op.$type),0),b);this._j=this._d.positions()},_c:null,_d:null,i:function(a){var b=null;var c=this._d.getPositionIndex(a);if(c>-1){var d=this.f.tryGetValue(c,b);b=d.p1}return b},e:function(a,b){var c=this._d.getPositionIndex(a);if(c==-1){this.f.add(this._j.count(),b);this._j.add(a);return true}this.f.item(c,b);return false},p:function(a,b,c,d,e,f){var g=c.positionItemDepthMin();var i=$$t.$co.u($$t.$b9.$type.specialize(String,$.ig.$op.$type),c.values(),function(j){return j.positionItemDepth()<=g}).getEnumerator();while(i.moveNext()){var h=i.current();if(h.positionItemIndex()==b||h.count()==0){if(h.count()==0){b=h.positionItemIndex()}this.n(c,h,d,a,b,e,f)}else{var j=$$t.$fi.a(a,d,h);this.p(a,b,h,j,e,f);var k=$$t.$co.u($$t.$b9.$type.specialize(String,$.ig.$op.$type),c.values(),function(l){return l.parentKey()==h.key()});var m=k.getEnumerator();while(m.moveNext()){var l=m.current();var n=$$t.$fi.a(a,d,l);this.p(a,b,l,n,e,f)}}}},n:function(a,b,c,d,e,f,g){var h=b.positionItem();var i=h.clone();var j=new Array(d.count());$.ig.util.arrayCopy1(c,0,j,0,d.count());j[b.positionItemIndex()]=i;var k=$$t.$co.z($$t.$fd.$type,this._c.u(j,b.positionItemIndex()+1));if(k.count()>0){if(e<d.count()-1){this.o(d,e+1,j,f,k,null,g)}else{var l=new $$t.c0(j);var m=$$t.$co.z($$t.$fd.$type,$$t.$co.u($$t.$fd.$type,k,function(n){return!n._a}));var n=this._d.getPositionIndex(l);if(n==-1){this.f.add(this._j.count(),m);this._j.add(l)}else{this._j.item(n,l)}for(var p=0;p<j.length;p++){var o=j[p];o.position(l)}if(m.count()>0){g.add(l)}}if(b.isExpanded()){var r=$$t.$co.u($$t.$b9.$type.specialize(String,$.ig.$op.$type),a.values(),function(s){return s.parentKey()==b.key()}).getEnumerator();while(r.moveNext()){var q=r.current();this.n(a,q,c,d,e,f,g)}}}},o:function(a,b,c,d,e,f,g){var h=a.item(b);if($b($$t.$bh.$type,h)!==null){if(d.containsKey(h.uniqueName())==false){return}var i=d.item(h.uniqueName());if(f!=null){i=$$t.$co.u($$t.$d5.$type,i,function(j){return j.parentUniqueName()==f})}if(i==null){return}var k=i.getEnumerator();while(k.moveNext()){var j=k.current();var l;var m=this._c.i(j.uniqueName(),l);l=m.p1;var n=$$t.$co.z($$t.$fd.$type,$$t.$co.u($$t.$fd.$type,e,function(o){return o.d(j.levelUniqueName())==l}));if(n.count()>0){var o=new Array(a.count());$.ig.util.arrayCopy1(c,0,o,0,a.count());var p=new $$t.c1;p.caption(j.caption());p.hierarchyUniqueName(j.hierarchyUniqueName());p.levelNumber(j.levelDepth());p.levelUniqueName(j.levelUniqueName());p.uniqueName(j.uniqueName());p.displayInfo($i(j.childrenCardinality()));p.properties().add("PARENT_UNIQUE_NAME",j.parentUniqueName());p.properties().add("memberId",l.toString());o[b]=p;if(b==a.count()-1){var q=$$t.$co.z($$t.$fd.$type,$$t.$co.u($$t.$fd.$type,n,function(r){return!r._a}));var r=new $$t.c0(o);var s=this._d.getPositionIndex(r);if(s==-1){this.f.add(this._j.count(),q);this._j.add(r)}else{this._j.item(s,r)}for(var u=0;u<o.length;u++){var t=o[u];t.position(r)}if(q.count()>0){g.add(r)}}else{this.o(a,b+1,o,d,n,null,g)}}}}else if($b($$t.$es.$type,h)!==null){var v=h;var x=v.measures().getEnumerator();while(x.moveNext()){var w=x.current();var y=new Array(a.count());$.ig.util.arrayCopy1(c,0,y,0,a.count());var z=new $$t.c1;z.caption(w.caption());var aa=this.k(this._c.sourceMetadata()._a._b._c);z.hierarchyUniqueName(aa);z.levelNumber(0);z.uniqueName(w.uniqueName());y[b]=z;if(b==a.count()-1){var ab=new $$t.c0(y);var ac=$$t.$co.z($$t.$fd.$type,$$t.$co.u($$t.$fd.$type,e,function(ad){return!ad._a}));var ad=this._d.getPositionIndex(ab);if(ad==-1){this.f.add(this._j.count(),ac);this._j.add(ab)}else{this._j.item(ad,ab)}for(var af=0;af<y.length;af++){var ae=y[af];ae.position(ab)}if(ac.count()>0){g.add(ab)}}else{this.o(a,b+1,y,d,e,null,g)}}}},m:function(a){var b=this.b;if(a.count()==0){var c=new $$t.di($$t.$cb.$type.specialize(String,$$t.$aq.$type.specialize($$t.$d5.$type)),0);c.e(new $$t.ca(String,$$t.$aq.$type.specialize($$t.$d5.$type),0));return c._b}var d=new $$t.ca(String,$$t.$ef.$type,0);for(var e=0;e<a.count();e++){var f=a.item(e).key();var g=a.item(e).value();var h=$$t.$co.af($$t.$ef.$type,$$t.$co.u($$t.$ef.$type,b._x,function(i){return i.hierarchyUniqueName()==f&&i.depth()==g}));if(!d.containsKey(f)){d.add(f,h)}}return this.l(d)},k:function(a){if(a.substr(0,1)!="["){a="["+a}if(a.substr(a.length-1,1)!="]"){a+="]"}return a},l:function(a){var $self=this;var b=this.b;var c=new $$t.ca(String,$$t.$aq.$type.specialize($$t.$d5.$type),0);var d=new $$t.bp(String,0);var f=a.getEnumerator();while(f.moveNext()){var e=f.current();var g=e.value().uniqueName();var h;if(b.c(g)&&function(){var i=b.j(g,h);h=i.p1;return i.ret}()){c.add(e.key(),h)}else{d.add(e.key())}}if(d.count()==0){var i=new $$t.di($$t.$cb.$type.specialize(String,$$t.$aq.$type.specialize($$t.$d5.$type)),0);i.e(c);return i._b}var j=new Array(d.count());var k=0;var m=d.getEnumerator();while(m.moveNext()){var l=m.current();var n=new $$t.bp($$t.$ec.$type,0);n.add(function(){var $ret=new $$t.ec;$ret._a="LEVEL_UNIQUE_NAME";$ret._b=a.item(l).uniqueName();return $ret}());j[k]=this._c.discoverMembersAsync(null,n);k++}var o=new $$t.et;var p=o.d($$t.$cb.$type.specialize(String,$$t.$aq.$type.specialize($$t.$d5.$type)),j,function(q){return $self.h(q,d,c)});return p},h:function(a,b,c){for(var d=0;d<b.count();d++){var e=b.__inner[d];if(!c.containsKey(e)){var f=a[d].n();var h=f.getEnumerator();while(h.moveNext()){var g=h.current();this.b.aa(g)}c.add(e,f)}}return c},g:function(a,b){var c=new $$t.ca(String,$$t.$ef.$type,0);for(var d=0;d<b.count();d++){var e=a[d];if(e._a!=null||e._b){return null}var f=b.item(d);var g=$$t.$co.af($$t.$ef.$type,$$t.$co.u($$t.$ef.$type,e.n(),function(h){return h.depth()==f}));if(g!=null&&!c.containsKey(g.hierarchyUniqueName())){c.add(g.hierarchyUniqueName(),g)}}return c},a:function(a,b,c){var d=c.positionItem();var e=d.clone();var f=new Array(a.count());$.ig.util.arrayCopy1(b,0,f,0,a.count());f[c.positionItemIndex()]=e;return f},$type:new $.ig.Type("FlatDataAxisProviderHelper",$.ig.$ot)},true);$c("FlatDataPartialAxisProvider:fj","Object",{b:null,d:null,a:null,init:function(a,b,c,d){$.ig.$op.init.call(this);this.dataProvider(a);this.b=new $$t.fi(a,b.count(),d);this.a=c;this.d=b},_dataProvider:null,dataProvider:function(a){if(arguments.length===1){this._dataProvider=a;return a}else{return this._dataProvider}},_axis:null,axis:function(a){if(arguments.length===1){this._axis=a;return a}else{return this._axis}},generateAxis:function(a){var $self=this;var b=new $$t.di($$t.$bn.$type,0);if(this.axis()!=null){b.e(this.axis());return b._b}var c=new Array(this.a.position().itemsCount());var d=new $$t.bp($$t.$c0.$type,0);var e=this.a.position().indexOf(this.a);var f=this.a.position();var g=new $$t.bp($$t.$cc.$type.specialize(String,$$t.$m.$type),0);for(var h=0;h<this.a.position().itemsCount();h++){if(h<e){c[h]=this.a.position().members().item(h).clone()}else if(h==e){if($b($$t.$es.$type,this.d.item(h))!==null){continue}var i=f.members().item(h);g.add(new $$t.cc(String,$$t.$m.$type,1,i.hierarchyUniqueName(),i.depth()+1))}else{if($b($$t.$es.$type,this.d.item(h))!==null){continue}var j=f.members().item(h);g.add(new $$t.cc(String,$$t.$m.$type,1,j.hierarchyUniqueName(),j.depth()))}}this.b.m(g).j(function(k){var l=$$t.$co.z($$t.$fd.$type,$self.dataProvider().u($$t.$co.a($$t.$c1.$type,f.members()),e+1));$self.b.o($self.d,e,c,k.n(),l,$self.a.uniqueName(),d);$self.axis(function(){var $ret=new $$t.bn(d,f.itemsCount());$ret.name(a);return $ret}());b.e($self.axis())});return b._b},getTupleRowsMetadata:function(a){return this.b.i(a)},getPositionsMetadata:function(){return this.b._j},$type:new $.ig.Type("FlatDataPartialAxisProvider",$.ig.$ot,[$$t.$fc.$type])},true);$c("IFlatDataProvider:e0","Object",{$type:new $.ig.Type("IFlatDataProvider",null,[$$t.$eb.$type])},true);$c("FlatDataProvider:fe","Object",{v:null,w:null,y:null,z:null,l:null,m:null,p:null,q:null,r:null,aa:null,o:null,n:null,_tableMetadata:null,tableMetadata:function(a){if(arguments.length===1){this._tableMetadata=a;return a}else{return this._tableMetadata}},init:function(a,b){this.p=new $$t.ca(String,$$t.$m.$type,0);this.q=new $$t.ca(String,$$t.$fg.$type,0);this.r=new $$t.ca(String,$$t.$fg.$type,0);this.k=new $$t.ca(String,$$t.$cb.$type.specialize(String,$$t.$fg.$type),0);$.ig.$op.init.call(this);this.itemsSource(a);this.sourceMetadata(b);this.tableMetadata(new $$t.ff(a));if(b._a!=null){if(b._a._b==null){b._a._b=function(){var $ret=new $$t.e4;$ret._b="Measures";$ret._c="Measures";return $ret}()}else{if(String.isNullOrEmpty(b._a._b._b)){b._a._b._b="Measures"}if(String.isNullOrEmpty(b._a._b._c)){b._a._b._c="Measures"}}}},_itemsSource:null,itemsSource:function(a){if(arguments.length===1){this._itemsSource=a;return a}else{return this._itemsSource}},_sourceMetadata:null,sourceMetadata:function(a){if(arguments.length===1){this._sourceMetadata=a;return a}else{return this._sourceMetadata}},discoverCatalogsAsync:function(a,b){throw new $$t.b6(0)},discoverCubesAsync:function(a,b){var c=new $$t.di($$t.$aq.$type.specialize($$t.$da.$type),0);if(this.v==null){this.v=this.ab()}c.e(this.v);return c._b},discoverDimensionsAsync:function(a,b){var c=new $$t.di($$t.$aq.$type.specialize($$t.$ed.$type),0);if(this.w==null){this.w=this.ac()}c.e(this.w);return c._b},discoverHierarchiesAsync:function(a,b){var c=new $$t.di($$t.$aq.$type.specialize($$t.$bh.$type),0);if(this.y==null){this.y=this.ad()}c.e(this.y);return c._b},discoverLevelsAsync:function(a,b){var c=new $$t.di($$t.$aq.$type.specialize($$t.$ef.$type),0);var d=this.s(a,b);c.e(d);return c._b},s:function(a,b){if(this.z==null){this.l=new $$t.ca(String,$$t.$bf.$type.specialize($$t.$ef.$type),0);this.z=this.ae()}var c=null;var d=null;if(b!=null){c=$$t.$co.af($$t.$ec.$type,$$t.$co.u($$t.$ec.$type,b,function(e){return e._a=="HIERARCHY_UNIQUE_NAME"}));d=$$t.$co.af($$t.$ec.$type,$$t.$co.u($$t.$ec.$type,b,function(e){return e._a=="LEVEL_UNIQUE_NAME"}))}var e;if(c!=null){e=$$t.$co.u($$t.$ef.$type,this.z,function(f){return f.hierarchyUniqueName()==c._b})}else{e=$$t.$co.z($$t.$ef.$type,this.z)}if(d!=null){e=$$t.$co.u($$t.$ef.$type,e,function(f){return f.uniqueName()==d._b})}return e},discoverMeasuresAsync:function(a,b){var c=new $$t.di($$t.$aq.$type.specialize($$t.$bj.$type),0);if(this.aa==null){this.o=new $$t.ca(String,$$t.$bx.$type.specialize($$t.$x.$type,$$t.$e6.$type,$.ig.$op.$type),0);this.aa=this.af(this.o)}c.e(this.aa);return c._b},discoverMeasureGroupsAsync:function(a,b){throw new $$t.b6(0)},discoverMeasureGroupDimensionsAsync:function(a,b){throw new $$t.b6(0)},discoverMembersAsync:function(a,b){var c=new $$t.di($$t.$aq.$type.specialize($$t.$d5.$type),0);var d=this.discoverMembers(a,b);c.e(d);return c._b},discoverKpisAsync:function(a,b){var c=new $$t.di($$t.$aq.$type.specialize($$t.$ei.$type),0);c.e(new $$t.bp($$t.$ei.$type,0));return c._b},discoverMembers:function(a,b){var $self=this;if(this.n==null){this.n=new $$t.ca(String,$$t.$cb.$type.specialize(String,$$t.$d5.$type),0)}var c=$$t.$co.af($$t.$ec.$type,$$t.$co.u($$t.$ec.$type,b,function(d){return d._a=="HIERARCHY_UNIQUE_NAME"}));var d=$$t.$co.af($$t.$ec.$type,$$t.$co.u($$t.$ec.$type,b,function(e){return e._a=="LEVEL_UNIQUE_NAME"}));var e=$$t.$co.af($$t.$ec.$type,$$t.$co.u($$t.$ec.$type,b,function(f){return f._a=="MEMBER_UNIQUE_NAME"}));if(this.z==null){this.z=this.ae()}var f=null;var g=this.z;if(c!=null){g=$$t.$co.z($$t.$ef.$type,$$t.$co.u($$t.$ef.$type,g,function(h){return h.hierarchyUniqueName()==c._b}))}if(d!=null){var h=$$t.$co.ad($$t.$ef.$type,$$t.$co.u($$t.$ef.$type,g,function(i){return i.uniqueName()==d._b}));var i=h.hierarchyUniqueName();var j=h.depth();var k=0;if(e!=null){k=1}g=$$t.$co.z($$t.$ef.$type,$$t.$co.u($$t.$ef.$type,g,function(l){return l.hierarchyUniqueName()==i&&l.depth()<=j+k}))}else if(e!=null){throw new $$t.ci(1,"LEVEL_UNIQUE_NAME restriction is required for MEMBER_UNIQUE_NAME restriction.")}f=new Array(g.count());for(var l=0;l<g.count();l++){f[l]=g.item(l)}var m=null;if(f.length>0){var n=f[0];var o=$$t.$co.ad($$t.$bh.$type,$$t.$co.u($$t.$bh.$type,this.y,function(p){return p.uniqueName()==n.hierarchyUniqueName()}));var p=this.tableMetadata().e();this.al(f,0,".",null,o,p);if(c!=null&&d==null&&e==null){var q=new $$t.bp($$t.$d5.$type,0);for(var r=0;r<f.length;r++){var s=f[r];var t;if(!function(){var u=$self.n.tryGetValue(s.uniqueName(),t);t=u.p1;return u.ret}()){}var v=t.values().getEnumerator();while(v.moveNext()){var u=v.current();q.add(u)}}m=q}else{n=f[f.length-1];if(e==null){var w;if(!function(){var x=$self.n.tryGetValue(n.uniqueName(),w);w=x.p1;return x.ret}()){}m=w.values()}else{var x;if(!function(){var y=$self.n.tryGetValue(n.uniqueName(),x);x=y.p1;return y.ret}()){}var y=new $$t.bp($$t.$d5.$type,0);var aa=x.values().getEnumerator();while(aa.moveNext()){var z=aa.current();if(z.parentUniqueName()==e._b){y.add(z)}}m=y}}}else{m=new $$t.bp($$t.$d5.$type,0)}return m},evaluateResult:function(a,b,c){var $self=this;var d=new $$t.bp($$t.$dd.$type,0);if(a!=null){d.add(a.generateAxis("Axis0"))}if(b!=null){var e=a==null?"Axis0":"Axis1";d.add(b.generateAxis(e))}if(d.count()>0){var f=new Array(d.count());for(var g=0;g<d.count();g++){f[g]=d.item(g)}var h=new $$t.et;return h.d($$t.$bm.$type,f,function(i){return $self.d(a,b,c)})}var i=new $$t.di($$t.$bm.$type,0);var j=this.d(null,null,c);i.e(j);return i._b},am:function(a){var $self=this;var b=new $$t.ca(String,$$t.$cb.$type.specialize($$t.$m.$type,$$t.$cb.$type.specialize(String,$$t.$fg.$type)),0);var d=a.getEnumerator();while(d.moveNext()){var c=d.current();if(c._a.count()>0){for(var e=0;e<c._a.count();e++){var f=c._a.item(e);var g;if(function(){var h=$self.q.tryGetValue(f,g);g=h.p1;return h.ret}()){var h;if(!function(){var i=b.tryGetValue(c._b,h);h=i.p1;return i.ret}()){h=new $$t.ca($$t.$m.$type,$$t.$cb.$type.specialize(String,$$t.$fg.$type),0);b.add(c._b,h)}var i;if(!function(){var j=h.tryGetValue(g._a.levelDepth(),i);i=j.p1;return j.ret}()){i=new $$t.ca(String,$$t.$fg.$type,0);h.add(g._a.levelDepth(),i)}if(!i.containsKey(f)){i.add(f,g)}}}}}var j=new $$t.ca(String,$$t.$cb.$type.specialize(String,$$t.$fg.$type),0);var l=b.getEnumerator();while(l.moveNext()){var k=l.current();var m=k.value();var n=$$t.$co.z($$t.$cb.$type.specialize(String,$$t.$fg.$type),$$t.$co.o($$t.$cc.$type.specialize($$t.$m.$type,$$t.$cb.$type.specialize(String,$$t.$fg.$type)),$$t.$cb.$type.specialize(String,$$t.$fg.$type),$$t.$co.x($$t.$cc.$type.specialize($$t.$m.$type,$$t.$cb.$type.specialize(String,$$t.$fg.$type)),$$t.$m.$type,m,function(o){return o.key()}),function(o){return o.value()}));for(var o=n.count()-1;o>=0;o--){var p=$$t.$co.z($$t.$fg.$type,$$t.$co.o($$t.$cc.$type.specialize(String,$$t.$fg.$type),$$t.$fg.$type,n.item(o),function(q){return q.value()}));for(var q=0;q<p.count();q++){var r=p.item(q);var s=r._a.levelDepth();if(s>0){var t;if(!function(){var u=m.tryGetValue(s-1,t);t=u.p1;return u.ret}()||!t.containsKey(r._a.parentUniqueName())){var u;if(!function(){var v=j.tryGetValue(r._a.parentUniqueName(),u);u=v.p1;return v.ret}()){u=new $$t.ca(String,$$t.$fg.$type,0);j.add(r._a.parentUniqueName(),u)}u.add(r._a.uniqueName(),r)}}}}var v=n.item(0);var w=$$t.$co.ad($$t.$fg.$type,v.values());if(!String.isNullOrEmpty(w._a.parentUniqueName())){w=this.q.item(w._a.parentUniqueName())}var x=new $$t.bp($$t.$ec.$type,0);x.add(function(){var $ret=new $$t.ec;$ret._a="LEVEL_UNIQUE_NAME";$ret._b=w._a.levelUniqueName();return $ret}());var y=$$t.$co.z($$t.$d5.$type,this.discoverMembers(null,x));for(var z=0;z<y.count();z++){var aa=y.item(z);if(!v.containsKey(aa.uniqueName())&&!j.containsKey(aa.uniqueName())){j.add(aa.uniqueName(),new $$t.ca(String,$$t.$fg.$type,0))}}}var ac=this.k.keys().getEnumerator();while(ac.moveNext()){var ab=ac.current();var ad;if(function(){var ae=$self.q.tryGetValue(ab,ad);ad=ae.p1;return ae.ret}()){for(var ae=0;ae<ad._d.count();ae++){var af=ad._d.item(ae);if(af._a){af.h()}}}}this.k=j;var ah=this.k.keys().getEnumerator();while(ah.moveNext()){var ag=ah.current();var ai;if(function(){var aj=$self.q.tryGetValue(ag,ai);ai=aj.p1;return aj.ret}()){if(!this.g(ai)){for(var aj=0;aj<ai._d.count();aj++){var ak=ai._d.item(aj);ak.f()}}}}var am=this.k.keys().getEnumerator();while(am.moveNext()){var al=am.current();var an;if(function(){var ao=$self.q.tryGetValue(al,an);an=ao.p1;return ao.ret}()){var ao=$$t.$co.z($$t.$fg.$type,this.k.item(al).values());for(var ap=0;ap<ao.count();ap++){var aq=ao.item(ap);for(var ar=0;ar<aq._d.count();ar++){var as=aq._d.item(ar);if(as._a){as.h()}}}}}},g:function(a){var $self=this;var b=a._a.parentUniqueName();while(!String.isNullOrEmpty(b)){if(this.k.containsKey(b)){return true}var c;if(function(){var d=$self.q.tryGetValue(b,c);c=d.p1;return d.ret}()){b=c._a.parentUniqueName()}else{return false}}return false},k:null,u:function(a,b){var $self=this;var c=null;var d=-1;for(var e=0;e<b;e++){var f=a[e];var g=null;var h;if(function(){var i=$self.h(f.uniqueName(),h);h=i.p1;return i.ret}()){g=h._d}if(g!=null){if(c==null||c.count()>g.count()){d=e;c=g}}}if(c==null){c=$$t.$co.z($$t.$fd.$type,this.tableMetadata().e())}var i=c;for(var j=0;j<b;j++){if(j!=d){var k=a[j];var l;if(function(){var m=k.properties().tryGetValue("memberId",l);l=m.p1;return m.ret}()){var m=k.levelUniqueName();var n=$$t.$m.parseInt(l);i=$$t.$co.z($$t.$fd.$type,$$t.$co.u($$t.$fd.$type,i,function(o){return o.d(m)==n}))}}}return i},i:function(a,b){var $self=this;return{ret:function(){var c=$self.p.tryGetValue(a,b);b=c.p1;return c.ret}(),p1:b}},h:function(a,b){var $self=this;return{ret:function(){var c=$self.q.tryGetValue(a,b);b=c.p1;return c.ret}(),p1:b}},b:function($t,a){var b=new $$t.c5($t);var d=a.getEnumerator();while(d.moveNext()){var c=d.current();b.add(c)}return b},d:function(a,b,c){var d=null;if(a!=null){d=a.axis()}var e=null;if(b!=null){e=b.axis()}var f=this.a(d,e,c);var g=f[0];var h=$h(f[1]);var i=null;var j=-1;var k=null;var l=new $$t.ca(String,$$t.$m.$type,0);var m=new $$t.bt;var n=new $$t.bt;var o=new $$t.bt;for(var p=0;p<c.count();p++){l.add(c.item(p).uniqueName(),p);m.add(c.item(p))}if(g=="none"&&c.count()>0){i=c.item(0).uniqueName();j=l.item(i);k=this.o.item(i)}if(d==null&&e==null){var q=new $$t.bp($$t.$c4.$type,0);if(k!=null){var r=$$t.$co.u($$t.$fd.$type,this.tableMetadata().e(),function(s){return!s._a});var s=new $$t.bt;var u=$$t.$co.o($$t.$fd.$type,$.ig.$op.$type,r,function(v){return v._e}).getEnumerator();while(u.moveNext()){var t=u.current();s.add(t)}if(s.length>0){var v=new $$t.e6(0,0,0,j,n,o,m);var w=k(s,v);if(w!=null){var x=new $$t.c4;x.cellOrdinal(0);x.properties().add("Value",w);x.properties().add("FmtValue",w.toString());q.add(x)}}}return this.c(null,null,q)}if(e!=null){var y=e.tuples();for(var z=0;z<y.count();z++){n.add(y.__inner[z])}}if(d!=null){var aa=d.tuples();for(var ab=0;ab<aa.count();ab++){o.add(aa.__inner[ab])}}var ac=1;if(d!=null){ac=d.tuples().count()}var ad=1;if(e!=null){ad=e.tuples().count()}var ae=new $$t.bp($$t.$c4.$type,0);for(var af=0;af<ad;af++){var ag=null;var ah=null;if(e!=null){ah=e.tuples().__inner[af];ag=b.getTupleRowsMetadata(ah);if(g=="rows"){i=ah.members().item(h).uniqueName();j=l.item(i);k=this.o.item(i)}}for(var ai=0;ai<ac;ai++){var aj=ag;var ak=null;var al=null;if(d!=null){al=d.tuples().__inner[ai];ak=a.getTupleRowsMetadata(al);if(g=="columns"){i=al.members().item(h).uniqueName();j=l.item(i);k=this.o.item(i)}}if(aj!=null){if(ak!=null){var am=h;if(g=="columns"&&ak.count()<ag.count()||g=="rows"&&ak.count()>=ag.count()||g=="none"){am=-1}aj=this.ag(aj,ak,ah,al,am)}}else{aj=ak}if(k!=null){var an=af*ac+ai;var ao=new $$t.e6(af,ai,an,j,n,o,m);var ap=new $$t.bt;var ar=$$t.$co.o($$t.$fd.$type,$.ig.$op.$type,aj,function(as){return as._e}).getEnumerator();while(ar.moveNext()){var aq=ar.current();ap.add(aq)}if(ap.length>0){var as=k(ap,ao);if(as!=null){var at=new $$t.c4;at.cellOrdinal(an);at.properties().add("Value",as.toString());at.properties().add("FmtValue",as.toString());ae.add(at)}}}}}var au=this.c(d,e,ae);return au},c:function(a,b,c){var d=function(){var $ret=new $$t.bm;$ret.axes(new $$t.bp($$t.$bn.$type,0));return $ret}();if(a!=null){d.axes().add(a)}if(b!=null){d.axes().add(b)}d.cells(c);d.isEmpty(b==null&&a==null&&c.count()==0);return d},ag:function(a,b,c,d,e){if(b.count()<a.count()){a=b;d=c}for(var f=0;f<d.members().count();f++){var g=d.members().item(f);var h;if(function(){var i=g.properties().tryGetValue("memberId",h);h=i.p1;return i.ret}()){var i=$$t.$m.parseInt(h);a=$$t.$co.z($$t.$fd.$type,$$t.$co.u($$t.$fd.$type,a,function(j){return j.d(g.levelUniqueName())==i}))}}return a},a:function(a,b,c){var d=this.aj(this.sourceMetadata()._a._b._c);var e="none";var f=-1;if(c.count()>0){if(a!=null&&a.tuples().count()>0){var g=a.tuples().__inner[0];for(var h=0;h<g.members().count();h++){var i=g.members().item(h);if(i.hierarchyUniqueName()==d){e="columns";f=h;break}}}if(e=="none"){if(b!=null&&b.tuples().count()>0){var j=b.tuples().__inner[0];for(var k=0;k<j.members().count();k++){var l=j.members().item(k);if(l.hierarchyUniqueName()==d){e="rows";f=k;break}}}}}return[e,f]},al:function(a,b,c,d,e,f){var $self=this;var g=a[b];var h=this.m.item(g.uniqueName());var i=$$t.$co.af($$t.$ef.$type,$$t.$co.u($$t.$ef.$type,this.z,function(j){return j.hierarchyUniqueName()==e.uniqueName()&&j.depth()==g.depth()+1}));var j=null;if(d!=null){j=d.uniqueName()}var k;if(!function(){var l=$self.n.tryGetValue(g.uniqueName(),k);k=l.p1;return l.ret}()){k=new $$t.ca(String,$$t.$d5.$type,0);this.n.add(g.uniqueName(),k)}var l=new $$t.bp($$t.$fh.$type.specialize($$t.$fd.$type),0);var m=new $$t.ca(String,$$t.$bf.$type.specialize($$t.$fd.$type),0);var o=f.getEnumerator();while(o.moveNext()){var n=o.current();var p=h(n._e);if(p!=null){var q;if(!function(){var r=m.tryGetValue(p,q);q=r.p1;return r.ret}()){q=new $$t.bp($$t.$fd.$type,0);m.add(p,q);l.add(new $$t.fh($$t.$fd.$type,1,p,q))}q.add(n)}}for(var r=0;r<l.count();r++){var s=l.item(r)._b;var t=l.item(r)._a;var u=c+"&"+this.aj(s);var v=g.uniqueName()+u;var w;var x;var y;if(!function(){var z=k.tryGetValue(v,w);w=z.p1;return z.ret}()){w=new $$t.d5;w.caption(s);w.dimensionUniqueName(g.dimensionUniqueName());w.hierarchyUniqueName(g.hierarchyUniqueName());w.levelDepth(g.depth());w.levelUniqueName(g.uniqueName());w.name(s);w.parentLevel(g.depth()-1);w.parentUniqueName(j);w.uniqueName(v);if(i!=null){w.childrenCardinality(1)}if(d!=null){d.childrenCardinality(d.childrenCardinality()+1)}k.add(v,w);x=this.p.count();this.p.add(w.uniqueName(),x);y=new $$t.fg(w,u,x,k.count());this.q.add(w.uniqueName(),y);this.r.add(w.uniqueName(),y);for(var z=0;z<t.count();z++){var aa=t.item(z);aa.g(g.uniqueName(),x);y.h(aa)}}if(b+1<a.length){this.al(a,b+1,u,w,e,t)}}if(d!=null){d.childrenCardinality(l.count())}},aj:function(a){if(a.substr(0,1)!="["){a="["+a}if(a.substr(a.length-1,1)!="]"){a+="]"}return a},x:null,j:null,ab:function(){var a=new $$t.bp($$t.$da.$type,0);if(this.sourceMetadata()==null||this.sourceMetadata()._a==null){return a}var b=new $$t.da;b.caption(this.sourceMetadata()._a._c);b.name(this.sourceMetadata()._a._e);b.description(this.sourceMetadata()._a._d);a.add(b);return a},af:function(a){var b=new $$t.bp($$t.$bj.$type,0);if(this.sourceMetadata()==null||this.sourceMetadata()._a==null||this.sourceMetadata()._a._b==null||this.sourceMetadata()._a._b._a==null){return b}var c=this.sourceMetadata()._a._b._c;var e=this.sourceMetadata()._a._b._a.getEnumerator();while(e.moveNext()){var d=e.current();var f=new $$t.bj;f.caption(d._e);f.defaultFormatString(d._d);f.measureDisplayFolder(d._c);f.name(d._f);f.uniqueName(this.aj(c)+"."+this.aj(d._f));b.add(f);a.item(f.uniqueName(),d._b)}return b},ac:function(){if(this.v==null){this.v=this.ab()}var a=new $$t.bp($$t.$ed.$type,0);if(this.sourceMetadata()==null||this.sourceMetadata()._a==null){return a}var b=new $$t.ed;b.dimensionType(2);b.caption(this.sourceMetadata()._a._b._b);b.uniqueName(this.aj(this.sourceMetadata()._a._b._c));a.add(b);if(this.sourceMetadata()._a._a==null){return a}this.x=new $$t.bp($$t.$e7.$type,0);var d=this.sourceMetadata()._a._a.getEnumerator();while(d.moveNext()){var c=d.current();this.x.add(c);var e=new $$t.ed;e.caption(c._b);e.defaultHierarchy(c._c);e.uniqueName(this.aj(c._e));e.name(c._e);e.description(c._d);a.add(e)}return a},ad:function(){var $self=this;if(this.w==null){this.w=this.ac()}var a=new $$t.bp($$t.$bh.$type,0);if(this.sourceMetadata()==null||this.sourceMetadata()._a==null){return a}var b=new $$t.bh;b.uniqueName(this.aj(this.sourceMetadata()._a._b._c));b.dimensionUniqueName(this.aj(this.sourceMetadata()._a._b._c));a.add(b);if(this.sourceMetadata()._a._a==null){return a}this.j=new $$t.ca(String,$$t.$bf.$type.specialize($$t.$e8.$type),0);for(var c=0;c<this.x.count();c++){var d=this.x.item(c);if(d._a!=null){var e;if(!function(){var f=$self.j.tryGetValue(d._e,e);e=f.p1;return f.ret}()){e=new $$t.bp($$t.$e8.$type,0);this.j.add(d._e,e)}var g=d._a.getEnumerator();while(g.moveNext()){var f=g.current();e.add(f);var h=new $$t.bh;h.caption(f._b);h.description(f._c);h.dimensionUniqueName(this.aj(d._e));h.hierarchyDisplayFolder(f._d);h.name(f._e);h.uniqueName(h.dimensionUniqueName()+"."+this.aj(h.name()));a.add(h)}}}return a},ae:function(){var $self=this;if(this.y==null){this.y=this.ad()}this.m=new $$t.ca(String,$$t.$cp.$type.specialize($.ig.$op.$type,String),0);var a=new $$t.bp($$t.$ef.$type,0);if(this.sourceMetadata()==null||this.sourceMetadata()._a==null){return a}var b=new $$t.ef;b.hierarchyUniqueName(this.aj(this.sourceMetadata()._a._b._c));b.uniqueName(b.hierarchyUniqueName()+".[MeasuresLevel]");b.depth(-1);a.add(b);if(this.sourceMetadata()._a._a==null){return a}var c=new $$t.e8;c._e=this.sourceMetadata()._a._b._c;c._b=this.sourceMetadata()._a._b._b;var d=new $$t.bp($$t.$e8.$type,0);d.add(c);for(var e=0;e<this.x.count();e++){var f=this.x.item(e);var g;if(function(){var h=$self.j.tryGetValue(f._e,g);g=h.p1;return h.ret}()){for(var h=0;h<g.count();h++){d.add(g.item(h))}}}for(var i=0;i<d.count();i++){var j=d.item(i);if(j._a==null){continue}var k=this.y.item(i);for(var l=0;l<j._a.count();l++){var m=j._a.item(l);var n=new $$t.ef;n.caption(m._b);n.depth(l);n.dimensionUniqueName(k.dimensionUniqueName());n.hierarchyUniqueName(k.uniqueName());n.name(m._c);n.uniqueName(k.uniqueName()+"."+this.aj(n.name()));a.add(n);var o;if(!function(){var p=$self.l.tryGetValue(k.uniqueName(),o);o=p.p1;return p.ret}()){o=new $$t.bp($$t.$ef.$type,0);this.l.add(k.uniqueName(),o)}o.add(n);this.m.item(n.uniqueName(),m._a)}}return a},$type:new $.ig.Type("FlatDataProvider",$.ig.$ot,[$$t.$e0.$type])},true);$c("KeyListPair$1:fh","Object",{$t:null,_b:null,_a:null,init:function($t,a){this.$t=$t;if(!this.hasOwnProperty("$type")){this.$type=this.$type.specialize(this.$t)}if(a>0){switch(a){case 1:this.init1.apply(this,arguments);break}return}$.ig.$op.init.call(this);this._b=String.empty();this._a=new $$t.bp(this.$t,0)},init1:function($t,a,b,c){this.$t=$t;if(!this.hasOwnProperty("$type")){this.$type=this.$type.specialize(this.$t)}$.ig.$op.init.call(this);this._b=b;this._a=c},$type:new $.ig.Type("KeyListPair$1",$.ig.$ot)},true);$c("CellMetadata:e6","Object",{init:function(a,b,c,d,e,f,g){$.ig.$op.init.call(this);this.rowIndex(a);this.columnIndex(b);this.cellOrdinal(c);this.measureIndex(d);this.rowTuples(e);this.columnTuples(f);this.measures(g)},_rowIndex:0,rowIndex:function(a){if(arguments.length===1){this._rowIndex=a;return a}else{return this._rowIndex}},_columnIndex:0,columnIndex:function(a){if(arguments.length===1){this._columnIndex=a;return a}else{return this._columnIndex}},_cellOrdinal:0,cellOrdinal:function(a){if(arguments.length===1){this._cellOrdinal=a;return a}else{return this._cellOrdinal}},_measureIndex:0,measureIndex:function(a){if(arguments.length===1){this._measureIndex=a;return a}else{return this._measureIndex}},_rowTuples:null,rowTuples:function(a){if(arguments.length===1){this._rowTuples=a;return a}else{return this._rowTuples}},_columnTuples:null,columnTuples:function(a){if(arguments.length===1){this._columnTuples=a;return a}else{return this._columnTuples}},_measures:null,measures:function(a){if(arguments.length===1){this._measures=a;return a}else{return this._measures}},$type:new $.ig.Type("CellMetadata",$.ig.$ot)},true);$c("CubeMetadata:e3","Object",{init:function(){$.ig.$op.init.call(this);this._a=new $$t.c5($$t.$e7.$type)},_e:null,_c:null,_d:null,_b:null,_a:null,$type:new $.ig.Type("CubeMetadata",$.ig.$ot)},true);$c("MeasuresDimensionMetadata:e4","Object",{init:function(){$.ig.$op.init.call(this)},_b:null,_c:null,_a:null,$type:new $.ig.Type("MeasuresDimensionMetadata",$.ig.$ot)},true);$c("DataMemberMetadata:fg","Object",{init:function(a,b,c,d){$.ig.$op.init.call(this);this._a=a;this._g=b;this._e=c;this._f=d;this._d=new $$t.bp($$t.$fd.$type,0)},_e:0,_a:null,_g:null,_f:0,_d:null,c:function(){return $$t.$co.z($$t.$fd.$type,$$t.$co.u($$t.$fd.$type,this._d,function(a){return a._a==false}))},h:function(a){this._d.add(a)},b:function(a){if(this._d.remove(a)){return true}return false},$type:new $.ig.Type("DataMemberMetadata",$.ig.$ot)},true);$c("DataSourceMetadata:e2","Object",{init:function(){$.ig.$op.init.call(this)},_a:null,$type:new $.ig.Type("DataSourceMetadata",$.ig.$ot)},true);$c("DimensionMetadata:e7","Object",{init:function(){$.ig.$op.init.call(this)},_e:null,_c:null,_b:null,_d:null,_a:null,$type:new $.ig.Type("DimensionMetadata",$.ig.$ot)},true);$c("HierarchyMetadata:e8","Object",{init:function(){$.ig.$op.init.call(this)},_e:null,_b:null,_c:null,_d:null,_a:null,$type:new $.ig.Type("HierarchyMetadata",$.ig.$ot)},true);$c("LevelMetadata:e9","Object",{init:function(){$.ig.$op.init.call(this)},_c:null,_b:null,_a:null,$type:new $.ig.Type("LevelMetadata",$.ig.$ot)},true);$c("MeasureMetadata:e5","Object",{init:function(){$.ig.$op.init.call(this);this._a=1},_b:null,_a:0,_d:null,_f:null,_e:null,_c:null,$type:new $.ig.Type("MeasureMetadata",$.ig.$ot)},true);$c("RowMetadata:fd","Object",{b:null,c:0,init:function(a){$.ig.$op.init.call(this);this.b=new $$t.ca(String,$$t.$m.$type,0);this.c=0;this._a=false;this._e=a},g:function(a,b){if(this.b.containsKey(a)){return}this.b.item(a,b)},d:function(a){var b;var c=this.b.tryGetValue(a,b);b=c.p1;return b},f:function(){this.c++;this._a=true},h:function(){this.c--;this._a=this.c>0},_e:null,_a:false,$type:new $.ig.Type("RowMetadata",$.ig.$ot)},true);$c("TableMetadata:ff","Object",{d:null,a:null,c:null,f:0,init:function(a){
$.ig.$op.init.call(this);var b=0;var c=$b($$t.$v.$type,a);if(c!=null){b=c.count()}else{var e=a.getEnumerator();while(e.moveNext()){var d=e.current();b++}}this.c=new $$t.bp($$t.$fd.$type,0);this.a=new Array(b);var g=a.getEnumerator();while(g.moveNext()){var f=g.current();var h=new $$t.fd(f);this.h(h);this.c.add(h)}this.d=new $$t.bp(String,0)},e:function(){return this.c},b:function(){return this.a},g:function(){return this.f},h:function(a){if(this.f==this.a.length){this.i()}this.a[this.f++]=a},j:function(a,b){if(this.f==this.a.length){this.i()}$.ig.util.arrayCopy1(this.a,a,this.a,a+1,this.f-a);this.a[a]=b;this.f++},k:function(a){this.f--;$.ig.util.arrayCopy1(this.a,a+1,this.a,a,this.f-a);var b=$$t.$u.resize$1($$t.$fd.$type,this.a,this.f);this.a=b.p0},i:function(){var a=new Array(this.f+1);$.ig.util.arrayCopy1(this.a,0,a,0,this.f);this.a=a},$type:new $.ig.Type("TableMetadata",$.ig.$ot)},true);$$t.$fe.defaultMeasureGroup="(All)"});