// Licensed Materials - Property of IBM // IBM Cognos Products: rs // (C) Copyright IBM Corp. 2003, 2022. // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. define(["halsvg!images/model/model_icons.svg"],function(){"use strict";var _hdj={"model":"ba_graphics_data-model_16","model_failure":"ba_graphics_warn_16","dimension":"ba_graphics_dimension_16","dimension_measure":"ba_graphics_dimension-measure_16","hierarchy":"ba_graphics_hierarchy_16","level":"ba_graphics_level_16","member":"ba_graphics_member_16","member_root":"ba_graphics_member-root_16","measure":"ba_graphics_measure_16","fact":"ba_graphics_measure_16","folder":"ba_graphics_folder_16","namespace":"ba_graphics_namespace_16","folder_expanded":"ba_graphics_folder-expand_16","querySubject":"ba_graphics_query_16","textMeasure":"ba_graphics_text-measure_16","filter":"ba_graphics_filter_16","namedSet":"ba_graphics_namedSet_16","macro":"ba_graphics_macro_16","search":"ba_graphics_search_16","chevron_right":"ba_graphics_chevron-right_16","chevron_down":"ba_graphics_chevron-down_16"};var _jn5={"string":"ba_graphics_text-measure_16","integer":"ba_graphics_numeric-identifier_16","decimal":"ba_graphics_numeric-identifier_16","float":"ba_graphics_numeric-identifier_16","dateTime":"ba_graphics_time_16","interval":"ba_graphics_time_16","date":"ba_graphics_time_16","time":"ba_graphics_time_16","blob":"ba_graphics_warn_16","unsupported":"ba_graphics_warn_16"};function _4m9(_waf, _b6k, _57k, _69f, _1ja){this._7we=_waf;this._vij=_b6k;this._7pl=[];this._kfg=[];this._ijj=_57k||this._ff6();this._xue=!!_69f;this._n8a=!!_1ja;}_4m9.prototype._fdm=function(){this._cej=true;this._412();if(this._jfd){this._jfd._fdm();this._jfd=null;}};_4m9.prototype._3fe=function(){return this._7we;};_4m9.prototype._uz9=function(){if(this._jfd){this._jfd._fdm();}var _u2k=_frh._53g("CCHL_PackageTree");_u2k.setAttribute("multiSelect", this._xue?"true":"false");if(this._n8a){_u2k.setAttribute( "htmlDrag", "true" );}var _lyg=this._vij._r4g?this._pv1.bind(this):null;this._jfd=new _vgk(this._7we, _u2k, {_fg4: this._7k5.bind(this),_7k2: this._693.bind(this),_k61: this._gj1.bind(this),_dg4: _lyg,_i42: _lyg});return _u2k;};_4m9.prototype._ff6=function(){var _snj=_qkk._qik("PackageTree").split(",");return {_o8g:_snj[5]=="0",_we7:_snj[6]=="0",_bh4:_snj[7]=="0",_lr3:_snj[4]=="0"};};_4m9.prototype._bd7=function(_iul){var _u2k=this._uz9();this._jfd._u6g(_frh._c6j("IDS_MSG_LOADING_MODEL"));this._7pl=_iul;var _lnj=_iul.map(function(_gum){ return _gum._yfe(); });Q.all(_lnj).done(function(_1mm){for(var i=0; i<_1mm.length;++i){var _rbn=_1mm[i];this._l43(_u2k, _rbn, i);}this._jfd._wfn();}.bind(this));};_4m9.prototype._yu9=function(_iul,_0um){var _u2k=this._uz9();this._jfd._u6g(_frh._c6j("IDS_MSG_LOADING_MODEL"));this._7pl=[];this._xob=true;var _lnj=_iul.map(function(_gum){ return _gum._697().then(function(_1an){ return _1an||_gum._yfe(); }); });Q.all(_lnj).done(function(_1mm){if(_0um){_0um.resolve(true);}for(var i=0; i<_1mm.length;++i){var _rbn=_1mm[i];if(_rbn){var _8qm=this._7pl.length;this._7pl.push(_iul[i]);this._l43(_u2k, _rbn, _8qm);}}this._jfd._wfn();}.bind(this));};_4m9.prototype._tbb=function(_gum,_3na){var _u2k=this._uz9();this._jfd._u6g(_frh._c6j("IDS_MSG_LOADING_MODEL"));this._7pl=[_gum];this._xob=true;_gum._697().done(function(_rbn){if(_rbn){this._1ba=_3na;this._l43(_u2k, _rbn, 0);}this._jfd._wfn();}.bind(this));};_4m9.prototype._6g4=function(_gum,_8on){var _u2k=this._uz9();this._jfd._u6g(_frh._c6j("IDS_MSG_LOADING_MODEL"));this._7pl=[_gum];_gum._n56().then(function(_i9l){return _gum._28b(_i9l._ele[_8on]);}).done(function(_4vk){for(var i=0; i<_4vk.length;++i){this._l43(_u2k, _4vk[i], 0);}if(_4vk.length==1){var _t2k=_7hn._ij8(_u2k, "treeNode");_t2k.setAttribute("expanded", "true");}this._jfd._wfn();}.bind(this));};_4m9.prototype._ru8=function(){return _4qn._py2(function(){this._jfd._u6g(_frh._c6j("IDS_MSG_SEARCHING"));}.bind(this), 1000);};_4m9.prototype._fwc=function(_gum,_5ui,_jbk,_90j,_e0c,_554){var _u2k=this._uz9();var _ez4=this._ru8();this._7pl=[_gum];this._kfg=[_5ui];_gum._fwc(_5ui._0hn, _jbk, _90j, _e0c, _554).done(function(_4vk){_4qn._rde(_ez4);this._g1d(_u2k, _4vk, 0, 0);this._jfd._wfn();}.bind(this));};_4m9.prototype._9c7=function(_gum,_5ui,_jbk,_90j,_e0c,_554){var _u2k=this._uz9();var _ez4=this._ru8();this._7pl=[_gum];this._kfg=[_5ui];_gum._9c7(_5ui, _jbk, _90j, _e0c, _554).done(function(_4vk){_4qn._rde(_ez4);this._g1d(_u2k, _4vk, 0, 0);this._jfd._wfn();}.bind(this));};_4m9.prototype._gj8=function(_gum,_5ui,_jbk,_90j,_e0c,_554){var _u2k=this._uz9();var _ez4=this._ru8();this._7pl=[_gum];_gum._gj8(_5ui, _jbk, _90j, _e0c, _554).done(function(_hqg){_4qn._rde(_ez4);for(var i=0; i<_hqg.length;++i){this._l43(_u2k, _hqg[i], 0);}this._jfd._wfn();}.bind(this));};_4m9.prototype._412=function(){_m0n._ehk(this._7pl, "_412");};_4m9.prototype._7k5=function(_h7k,_t2k){var _92e=this._d2a(_t2k);if(_t2k.getAttribute("searchButton")){if(this._vij._gjk){this._vij._gjk(_92e);}return;}if(_92e&&this._vij._25g){this._vij._25g(_92e);}};_4m9.prototype._693=function(_h7k,_t2k){var _92e=this._d2a(_t2k);if(_92e&&this._vij._af4){if ((_t2k.getAttribute( "expandable" ) != "true" )||( _t2k.getAttribute( "populated" )=="true"&&!_t2k.selectSingleNode( "treeNode" ) )){this._vij._af4(_92e);}}};_4m9.prototype._wc=function(_h7k,_t2k,_4vk){if(this._cej){return;}this._g1d(_t2k, _4vk, _t2k.getAttribute("idxModel"), _t2k.getAttribute("idxModelItem"));_h7k._hee(true);};_4m9.prototype._oi5=function(_h7k,_mmn){console.warn('_4m9._oi5: ', _mmn);if(this._cej){return;}_h7k._hee(false);};_4m9.prototype._gj1=function(_h7k,_t2k){var _gum=this._mmk(_t2k);var _5ui=this._yoe(_t2k);if(_t2k.getAttribute("rootMembersFolder")){_gum._28b(_5ui).done(this._wc.bind(this, _h7k, _t2k), this._oi5.bind(this, _h7k));}else if(_5ui._l0n=="member"){_gum._597(_5ui._0hn).done(this._wc.bind(this, _h7k, _t2k), this._oi5.bind(this, _h7k));}else{_gum._cg8(_5ui).done(function(_dmj){if(this._cej){return;}for(var i=0; i<_dmj.length;++i){var _wtm=_dmj[i];this._l43(_t2k, _wtm);}_h7k._hee(true);}.bind(this),this._oi5.bind(this, _h7k));}return true;};_4m9.prototype._pv1=function(_h7k,_n9i,_zdf,e){this._vij._r4g(this._gq8(_n9i), _zdf, e);};_4m9.prototype._g1d=function(_ksa,_4vk,_8qm,_eii){var _30h=this._gi1(this._7pl[_8qm]);var _hii=_4vk.length;var _vka=_hii<=_30h;var _4w6=_vka?_hii:_30h;for(var i=0; i<_4w6;++i){var _16m=_4vk[i];this._l43(_ksa, _16m, _8qm);}if(this._vij&&this._vij._gjk&&!_vka){var _t2k=_8qn._u0g(_ksa, "treeNode");_8qn._f96( _t2k, 'idsLabel="IDS_MI_POPUP_METADATA_SEARCH" classPrefix="clsTreeNode_hyperlink" forceHover="true" forceSelection="true" searchButton="true"' );_t2k.setAttribute("smallSvgIcon", _hdj["search"]);_t2k.setAttribute("idxModel", _8qm);_t2k.setAttribute("idxModelItem", _eii);}};var _vu={"memberProperty":"IDS_CCHL_AC_TYPE_ATTR","measure":"IDS_CCHL_AC_TYPE_FACT","textMeasure":"IDS_CCHL_AC_TYPE_FACT","filter":"IDS_CCHL_AC_TYPE_FILTER","namedSet":"IDS_CCHL_AC_TYPE_NAMEDSET","macro":"IDS_CCHL_AC_TYPE_MACROS","identifier":"IDS_CCHL_AC_TYPE_QUERY_ITEM","fact":"IDS_CCHL_AC_TYPE_FACT","attribute":"IDS_CCHL_AC_TYPE_ATTR"};_4m9.prototype._l43=function(_2ua,_5ui,_8qm){if(this._1ba&&this._1ba(_5ui)){return;}var _t2k=_8qn._u0g(_2ua, "treeNode");_8qn._qie(_t2k, "tooltip", _5ui._3hn||_5ui._g0d||_5ui._i0n);_t2k.setAttribute("label", _5ui._i0n);_t2k.setAttribute("smallSvgIcon", _4m9._joh(_5ui));_t2k.setAttribute("treeNodeChildId", _5ui._2aj);_8qm=(_8qm!==undefined)?_8qm:parseInt(_2ua.getAttribute("idxModel"));_t2k.setAttribute("idxModel", _8qm);_t2k.setAttribute("idxModelItem", this._kfg.length);this._kfg.push(_5ui);switch(_5ui._l0n){case "model":if(_5ui._rfm){_t2k.setAttribute( "expandable", "false" );_t2k.setAttribute("tooltip", _5ui._rfm._e0d);break;}_8qn._f96(_t2k, 'idsExtraAriaLabel="IDS_CCHL_AC_TYPE_PACKAGE" expandable="true"');if(_8qm==0){_t2k.setAttribute("expanded", "true");}break;case "dimension":var _ix4=(_5ui._6eb=="measure");_t2k.setAttribute("expandable", "true");_t2k.setAttribute( "idsExtraAriaLabel", _ix4?"IDS_CCHL_AC_TYPE_MEASURE_DIM":"IDS_CCHL_AC_TYPE_DIMENSION" );break;case "hierarchy":_t2k.setAttribute("expandable", (this._ijj._o8g&&this._ijj._lr3)?"false":"true");_t2k.setAttribute("idsExtraAriaLabel", "IDS_CCHL_AC_TYPE_HIERARCHY");if(!this._ijj._lr3){if(this._ijj._o8g){_t2k.setAttribute("rootMembersFolder", "true");}else{this._tl2(_t2k);}}break;case "level":_t2k.setAttribute("expandable", (this._ijj._we7&&this._ijj._bh4)?"false":"true");_t2k.setAttribute("idsExtraAriaLabel", "IDS_CCHL_AC_TYPE_LEVEL");if(!this._ijj._we7){if(this._ijj._bh4){_t2k.setAttribute("rootMembersFolder", "true");}else{this._tl2(_t2k);}}break;case "member":_t2k.setAttribute( "idsExtraAriaLabel", "IDS_CCHL_AC_TYPE_MEMBER" );_t2k.setAttribute("expandable", _5ui._hdb?"false":"true");if(_5ui._pzc&&this._xob){_t2k.setAttribute("label", _5ui._nsh._i0n);}break;case "measure":_t2k.setAttribute("idsExtraAriaLabel", _vu[_5ui._l0n]);_t2k.setAttribute("expandable", _5ui._zw9?"true":"false"); break;case "hierarchyRootMembers":_8qn._f96( _t2k, 'idsExtraAriaLabel="IDS_HAL_AC_TYPE_FOLDER" expandable="true" rootMembersFolder="true"' );_t2k.setAttribute("expandedSmallSvgIcon", _hdj["folder_expanded"]);break;case "folder":if(_5ui._yke){_t2k.setAttribute("expandable", "true");_t2k.setAttribute("idsExtraAriaLabel", "IDS_CCHL_AC_TYPE_NAMESPACE");break;}_8qn._f96( _t2k, 'idsExtraAriaLabel="IDS_HAL_AC_TYPE_FOLDER" expandable="true"' );_t2k.setAttribute("expandedSmallSvgIcon", _hdj["folder_expanded"]);break;case "querySubject":_t2k.setAttribute("expandable", "true");_t2k.setAttribute("idsExtraAriaLabel", "IDS_CCHL_AC_TYPE_QUERY_SUBJECT");break;case "identifier":case "attribute":case "memberProperty":_t2k.setAttribute("idsExtraAriaLabel", _vu[_5ui._l0n]);_t2k.setAttribute("expandable", _5ui._mzc?"true":"false");break;case "fact":case "textMeasure":case "filter":case "namedSet":case "macro":default:_t2k.setAttribute("idsExtraAriaLabel", _vu[_5ui._l0n]);_t2k.setAttribute("expandable", _5ui._mzc?"true":"false");break;}};_4m9.prototype._tl2=function(_t2k){var _pc9=_8qn._u0g(_t2k, "treeNode");_8qn._q5b(_pc9, _t2k, ["idxModel", "idxModelItem", "treeNodeChildId"]);_8qn._f96( _pc9, 'idsLabel="IDS_LBL_MEMBERS" idsExtraAriaLabel="IDS_HAL_AC_TYPE_FOLDER" expandable="true" rootMembersFolder="true"' );_pc9.setAttribute("smallSvgIcon", _hdj["folder"]);_pc9.setAttribute("expandedSmallSvgIcon", _hdj["folder_expanded"]);};_4m9.prototype._mmk=function(_t2k){return this._7pl[parseInt(_t2k.getAttribute("idxModel"))];};_4m9.prototype._yoe=function(_t2k){return this._kfg[parseInt(_t2k.getAttribute("idxModelItem"))];};_4m9.prototype._d2a=function(_t2k){var _5ui=this._yoe(_t2k);return _5ui?{_vfm:this._mmk(_t2k),_ssh:_5ui}:null;};_4m9.prototype._gq8=function(_n9i){var _kyb=[];if(_n9i){for(var i=0; i<_n9i.length;++i){_kyb.push(this._d2a(_n9i[i]));}}return _kyb;};_4m9.prototype._5r9=function(){var _t2k=this._jfd&&this._jfd._5r9();return _t2k?this._d2a(_t2k):null;};_4m9.prototype._b85=function(){return this._jfd&&this._jfd._5r9();};_4m9.prototype._xg8=function(){return this._gq8(this._jfd&&this._jfd._xg8());};_4m9.prototype._gi1=function(_gum){var _40h=_1ke._wfe(_gum._zij._j0n).memberDisplayCountLimit;var _v6c=_qkk._qik("MemberDisplayCountLimit");if(_40h&&_v6c){return(_40h<_v6c)?_40h:_v6c;}return _40h||_v6c||50;};_4m9.prototype._cb4=function(){var _u2k=this._jfd._cr9();var nl=_7hn._x5g(_u2k, "treeNode");if(nl.length==1){nl=_7hn._x5g(_u2k, "treeNode/treeNode");}for(var i=0;i