_40g.js 10 KB

123456
  1. // Licensed Materials - Property of IBM
  2. // IBM Cognos Products: rs
  3. // (C) Copyright IBM Corp. 2003, 2022.
  4. // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  5. define(["_yc8", "_em9", "_kk3", "_xgk", "_vpc", "_636", "_u0d"], function(_yc8, _em9, _kk3, _xgk, _vpc, _636, _u0d){"use strict";function _40g(_74l, _j07, _vqd){this._8rk=_74l; this._pij=new _kk3(this);this._add=_vqd;this._zo6=_j07;this._5pk=false;this._4ze=_gth._t6b(_74l);this._mt7=new _636();this._oba=0;this._7d3=new Map();this._eq=new Map();}_40g.prototype._c75=function(){return this._mt7;};_40g.prototype._dwc=function(){this._pij._qzm();};_40g.prototype._6fm=function(_17k,_97m){var _83e=_17k._4kl();this._5pk=!!_83e.rows.length;this._pij._6fm(_83e.rows);this._cyh=[]; this._tp6={}; this._7d3.clear();this._eq.clear();if(!this._5pk){return;}var _s0e=_17k._c56();var _r4m=this._8rk.selectNodes("vcSlots/vcSlotData[vcSlotDsColumns]");for(var i=0;i<_r4m.length;i++){var _32k=_r4m.item(i);var _6df=this._cyh.length;var _een=_32k.getAttribute("idSlot");var _6ri=_8qn._12g(_32k, "vcDataSet");var _zcl=_6ri.getAttribute("idDataSet"); var _xyd=_32k.selectSingleNode("vcSlotDomain");var _eva=_32k.selectNodes("vcSlotDsColumns/vcSlotDsColumn | vcSlotDsColumns/vcSlotMeasureGroup");var _o7i=this._wq8(_32k);var _aua=_32k.selectSingleNode("vcSlotDomain/vcDiscreteUsed"); var _e9l=_97m.dataSets[ _zcl ];var _ybn=_e9l.slots[ _een ];if(_eva.length==1&&(!_aua||_ybn.latlong)){var _yxd=_eva.item(0);if(_yxd.nodeName=="vcSlotMeasureGroup"){this._b3(_6df, _o7i, _yxd, _s0e, _83e);}else{this._n6(_6df, _ybn, _o7i, _xyd, _yxd, _s0e, _83e, _17k);}}else{this._rz3(_6df, _ybn, _32k, _eva, _o7i, _s0e, _83e, _17k);}if(this._cyh.length==_6df+1){var _ram=_32k.getAttribute("idSlot");this._tp6[_ram]=[_6df];}}};_40g.prototype._wq8=function(_32k){var _zlf=_7hn._x5g(_32k, "vcBaselines/vcBaseline");if(_zlf.length>0){return _u0d._0h8(_zlf);}};_40g.prototype._rz3=function(_6df, _ybn, _32k, _eva, _o7i, _s0e, _83e, _17k){var _lvd=_7hn._ij8(_32k, "vcSlotDsColumns/vcSlotMeasureGroup");var _v6f=!!_lvd;if(!_v6f){var _qx6=_eva.item(0);var _08m=_qx6.getAttribute("refDsColumn");var _adf=_s0e[_08m];var _l5k=_83e.columns[ _adf ];_v6f=_l5k.values;}if(_v6f){var _agc=this._ug1(_83e, _32k, _eva, _s0e, _ybn);this._cyh.push(new _em9(_agc.columnNames, _agc.dataItemNames, _agc.tupleItems, this, _agc.lookupInfo.columnIdxs, _o7i));this._pij._sa4(_6df, _agc.lookupInfo);this._7d3.set(this._fn3(), _6df);}else{this._g4(_6df, _eva, _o7i, _17k);}};_40g.prototype._n6=function(_6df, _ybn, _o7i, _xyd, _yxd, _s0e, _83e, _17k){var _08m=_yxd.getAttribute("refDsColumn");var _adf=_s0e[_08m];var _l5k=_83e.columns[ _adf ];var _7sf=_l5k.label||_08m;if(!_l5k.values){if(!_ybn.acceptsContinuous){var _p1j=_ybn.label;if(!this._eq[_p1j]){this._eq[_p1j]=[];}this._eq[_p1j].push(_7sf);return;}var _oti=this._vf5(_yxd, _17k);this._mt7._612(_adf, _oti);this._cyh.push(new _yc8(_7sf, _oti, _xyd, _o7i));this._pij._v4b(_6df, _adf);}else if(_ybn.latlong){this._cyh.push(new _yc8(_7sf, null, null));this._pij._v4b(_6df, _adf);this._pij._755(_6df, _l5k.values);if(_l5k.formattedValues){this._pij._lw(_6df, _l5k.formattedValues);}}else{var _eia=[];var _k3e=null;if(this._4ze[ _08m ]){if(_l5k.keys){var _gnj=_l5k.values.concat().map(this._nv3(_l5k.keys)); var _vul=_gnj.sort(this._0j7(this._4ze[ _08m ]=="descending"));_k3e={};var _lha=_l5k.formattedValues||_l5k.values;for(var j=0;j<_vul.length;j++){ var _nvj=_l5k.keys.indexOf(_vul[j].key); _k3e[ _nvj ]=j; _eia.push([new _xgk(_l5k.name, _vul[j].key, _lha[_nvj], this, _nvj, _adf, j)]); }}else{var _vul=_l5k.values.concat().sort();if(this._4ze[ _08m ]=="descending"){_vul=_vul.reverse();}_k3e={};var _lha=_l5k.formattedValues||_l5k.values;for(var j=0;j<_vul.length;j++){var _nvj=_l5k.values.indexOf(_vul[j]); _k3e[ _nvj ]=j;var _gon=this._80a(_ybn, _lha[_nvj]);_eia.push([new _xgk(_l5k.name, _gon, _lha[_nvj], this, _nvj, _adf, j)]); }}}else{var _4vl=_l5k.formattedValues||_l5k.values;for(var j=0;j<_4vl.length;j++){var _gon=this._80a(_ybn, _4vl[j], null, _l5k.keys, j);_eia.push([new _xgk(_l5k.name, _gon, _4vl[j], this, j, _adf)]);}}this._cyh.push(new _em9([_7sf], [_08m], _eia, this, [_adf], _o7i));this._pij._v4b(_6df, _s0e[ _08m ], _k3e);this._7d3.set(this._fn3(), _6df);}};_40g.prototype._80a=function(_6bl,_uxm,_iii,_7jd,_qzl){_vzm._6dm(_6bl);if(_7jd){return _7jd[_qzl];}var _gon=_6bl.id+'-' + _uxm;return _iii?_gon+'-' + _iii:_gon;};_40g.prototype._b3=function(_6df,_o7i,_yxd,_s0e,_83e){var _2lc=_yxd.getAttribute("refSlot");var _74l=_8qn._12g(_yxd, "vcDataSet");var _bi3=_7hn._x5g( _74l, "vcSlots/vcSlotData[@idSlot=" + _cgm._zxc( _2lc ) + "]/vcSlotDsColumns/vcSlotDsColumn[@refDsColumn]");var _nrg=[];var _dwm=_frh._c6j("IDS_VIZ_MEASURE_GROUP_RENDERING");var _4z4=Object.keys(_s0e).length;for(var i=0;i<_bi3.length;i++){var _y64=_bi3.item(i);var _08m=_y64.getAttribute("refDsColumn");var _adf=_s0e[_08m];var _l5k=_83e.columns[ _adf ];var _uxm=_l5k.label||_08m;_nrg.push([new _xgk(_dwm, _uxm, _uxm, this, i, _4z4)]);}this._cyh.push(new _em9([_dwm], [_dwm], _nrg, this, [_4z4], _o7i));this._pij._v4b(_6df, _4z4);};_40g.prototype._g4=function(_6df,_eva,_o7i,_17k){var _bha=[]; var _b9m=_frh._c6j("IDS_VIZ_MEASURE_GROUP_VALUES_RENDERING");var _s0e=_17k._c56();for(var i=0; i<_eva.length; i++){var _yxd=_eva.item(i);var _oti=this._vf5(_yxd, _17k);var _06e=_yxd.getAttribute("refDsColumn");var _adf=_s0e[_06e];_bha.push(_adf);this._mt7._612(_adf, _oti);if(i==0){this._cyh.push(new _yc8(_b9m, _oti, null, _o7i));}}this._pij._w36(_6df, _bha);};_40g.prototype._vf5=function(_yxd,_17k){var _8yb=[];_8yb.push(_yxd.selectSingleNode("vcValueFormat/dataFormat"));var _jbh=_17k._375(_yxd.getAttribute("refDsColumn"));if(_jbh){_8yb.push(_gth._rh(_yxd, _jbh));}return new _vpc(this._zo6._sp1(_8yb)); };_40g.prototype._nv3=function(_7jd){return function(_3vm,_5qm){return { value: _3vm, key: _7jd[_5qm] };};};_40g.prototype._0j7=function(_myk){return function(_g8i,_h8i){if(_myk){return _h8i.value.localeCompare(_g8i.value);}return _g8i.value.localeCompare(_h8i.value);};};_40g.prototype._ug1=function(_83e,_32k,_eva,_s0e,_6bl){ var _nrg=[];var _rqf=[];var _ppg=[];var _74f=[];var _vxb=[];var _84f=[];var _nci=false;var _svj=_83e.rows.length;this._d04=[];var _lvd=_7hn._ij8(_32k, "vcSlotDsColumns/vcSlotMeasureGroup");var _y99=0, _064;if(_lvd){var _2lc=_lvd.getAttribute("refSlot");var _74l=_8qn._12g(_lvd, "vcDataSet");var _bi3=_7hn._x5g( _74l, "vcSlots/vcSlotData[@idSlot=" + _cgm._zxc( _2lc ) + "]/vcSlotDsColumns/vcSlotDsColumn[@refDsColumn]");_y99=_bi3.length;}for(var i=0;i<_svj;i++){var _sin=_83e.rows[i];var _r9i=[]; var _q9i=[];for(var j=0;j<_eva.length;j++){var _yxd=_eva.item(j);if(_yxd.nodeName==="vcSlotMeasureGroup"){_064=j;continue;}else{var _06e=_yxd.getAttribute("refDsColumn");var _9zl=_s0e[ _06e ];var _cwj=_sin[ _9zl ];var _l5k=_83e.columns[ _9zl ];var _7sf=_l5k.label||_06e;if(!_l5k.values){var _p1j=_6bl.label;if(!this._eq[ _p1j ]){this._eq[ _p1j ]=[];}this._eq[ _p1j ].push(_7sf);continue;}var _4vl=_l5k.formattedValues||_l5k.values;var _uxm=_4vl[ _cwj ];var _t2j=this._80a(_6bl, _uxm, j, _l5k.keys, _cwj);_r9i.push(new _xgk(_l5k.name, _t2j, _uxm, this, _cwj, _9zl));_q9i.push(_cwj);if(i==0){_ppg.push(_9zl);_74f.push(_7sf);_vxb.push(_06e);}if(this._4ze[_06e]){_nci=true;_84f[j]=this._4ze[ _06e ];}}}if(_y99===0){var _8fk=_q9i.join("-");if(_rqf[_8fk]==undefined){_rqf[_8fk]=_nrg.length;_nrg.push({ items: _r9i, key: _8fk });}}else{var _r99=Object.keys(_s0e).length;for(var iMg=0;iMg<_y99;iMg++){var _tkd=_q9i.slice(0);var _rzb=_r9i.slice(0);_tkd.splice(_064, 0, iMg);var _8fk=_tkd.join("-");if(_rqf[_8fk]==undefined){_rqf[_8fk]=_nrg.length;var _yxd=_bi3.item(iMg);var _08m=_yxd.getAttribute("refDsColumn");var _adf=_s0e[_08m];var _l5k=_83e.columns[ _adf ];var _uxm=_l5k.label||_08m;var _dwm=_frh._c6j("IDS_VIZ_MEASURE_GROUP_RENDERING");if(i==0&&iMg==0){_ppg.splice(_064, 0, _r99);_74f.splice(_064, 0, _dwm);_vxb.splice(_064, 0, _dwm);_s0e[ _dwm ]=_r99;}_rzb.splice(_064, 0, new _xgk(_dwm, _uxm, _uxm, this, iMg, _r99));_nrg.push({ items: _rzb, key: _8fk });}}}}if(_nci){ _nrg.sort(this._kib(_84f));var _w0l=0;var _si3={};for(var i=0;i<_nrg.length;i++){_rqf[ _nrg[i].key ]=i;var _n7k=_nrg[i].items[0];var _yhi=_n7k._m3g();if(_si3[_yhi]==undefined){_si3[_yhi]=_w0l++;}_n7k._bb5(_si3[_yhi]);}}return {"lookupInfo": {"columnIdxs": _ppg, "tupleLookup": _rqf},"tupleItems": _nrg.map(function(_6bn){ return _6bn.items; }),"columnNames": _74f,"dataItemNames": _vxb};};_40g.prototype._kib=function(_84f){return function(_56f,_66f){for(var i=0;i<_56f.items.length;i++){ if(_56f.items[i]._1km==_66f.items[i]._1km){continue;}if(_84f[i]=="descending"){return _66f.items[i]._1km.localeCompare(_56f.items[i]._1km);}return _56f.items[i]._1km.localeCompare(_66f.items[i]._1km); }return-1;};};_40g.prototype._gh8=function(){return !this._8rk.selectSingleNode("vcSlots/vcSlotData/vcSlotDsColumns");};_40g.prototype._okl=function(){return this._5pk;};_40g.prototype._wo3=function(_yhc){var _tjd=[];var _wah=_yhc.dataSets[this._8rk.getAttribute("idDataSet")];for(var _ram in _wah.slots){var _6bl=_wah.slots[_ram];if(!_6bl.optional){if(!this._8rk.selectSingleNode("vcSlots/vcSlotData[@idSlot=" + _cgm._zxc(_ram) + "]/vcSlotDsColumns") ){_tjd.push(_6bl.label); }}}return _tjd;};_40g.prototype._023=function(){var _mjd=[];for(var _ram in this._eq){var _dw4=this._eq[ _ram ];for(var i=0;i<_dw4.length;i++){_mjd.push({ slot: _ram, dataItem: _dw4[i]});}}return _mjd;};_40g.prototype.getDataItemsFor=function(_6bl){return this._tp6[_6bl.name];};_40g.prototype.getDataItem=function(_5qm){ return this._cyh[_5qm];};_40g.prototype.getDataItemCount=function(){return this._cyh.length;};_40g.prototype.getDataPointIterator=function(){return this._pij;};_40g.prototype._jg4=function(_x0m){this._oba+= _x0m;};_40g.prototype._cik=function(){return this._add;};_40g.prototype._6h2=function(_7zl){return this._7d3.get(_7zl);};_40g.prototype._fn3=function(){return this._7d3.size;};_40g.prototype.getDecoration=function(_vdn){if(_vdn=="hasSelection"){return this._oba>0;}_vzm._6dm("Unknown decoration requested");return null;};_40g.prototype.hasDecoration=function(_vdn){return _vdn==="hasSelection";};_40g.prototype._ppe=function(_75m){return _75m.dataType=="number";};return _40g;});