// 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([],function(){"use strict";function _kzf(_arg){this._ufg=_arg;}_kzf.prototype._ujl=function(){var _0um=Q.defer();_5ml._jll(["_g8j"],function(_g8j){for(var i=0; i1){_8fm._jgn("_255", this, _0yd, _fyd, _6zb, _xjh, _cr6, _fsj, _2yl);}else{this._zl3(_0yd, _fyd, _6zb, _xjh, _cr6, _fsj, _2yl);}};_0ce.prototype._4m4=function(_83m){var _o8i=_agm._an3(_83m);var _lnj=[];for(var i=0; i<_o8i.length;++i){_lnj.push(_1ke._avc(_o8i[i]));} return _lnj;};_0ce.prototype._zoe=function(_83m){var _o8i=[];var _bud=_7hn._ij8(_83m, "modelPath");if(_bud){_o8i.push(_bud);}var nl=_7hn._x5g(_83m, ".//query/source/metadataPath");for(var i=0; i0&&_y1l>0){_2dm._jgn(null, _frh._c6j("IDS_MSG_UNSUPPORTED_MIX_DATASOURCE") + ":\n" + _iqg.join("\n"));return false; }return true;};_0ce.prototype._da2=function(_o8i){var _azg=0, _yyg=0;var _iqg=[];for(var i=0; i<_o8i.length;++i){var _30k=_o8i[i];var _kzi=_7hn._fkl(_30k)||_30k.getAttribute("path");if(_iqg.indexOf(_kzi)===-1){_iqg.push(_kzi);}var _4ui=_1ke._wfe(_kzi);if(!_4ui||_4ui.error||!_4ui.packageInfo){continue;}if(_4ui.packageInfo.isCQM){_yyg++;}else{_azg++;} }if(_yyg>0&&_azg>0||_yyg>1){_2dm._jgn(null, _frh._c6j("IDS_MSG_UNSUPPORTED_MIX_DATASOURCE") + ":\n" + _iqg.join("\n"));return false;}return true;};_0ce.prototype._zl3=function(_0yd, _fyd, _6zb, _xjh, _cr6, _fsj, _2yl, _gd2){var _rx7=this._m81();var _oyb=this._no();this._ja(_0yd, _fyd, _rx7, _oyb);var _1x7=['modelPath'].concat(_rx7);var _och=this._m4d(_0yd, _6zb, _1x7);var _wch=this._p4d(_fyd, _1x7);this._6k(_och, _wch, _rx7, _fsj, _2yl, _gd2);var _659=this._zoe(_fyd);if(!this._go7(_659)){return;}_5ml._jll(["_og4"],function(_og4){var _hia=_og4._ec4(_fyd);var _lr6=this._4m4(_fyd);_5ml._fll(Q.all([Q.all(_lr6), Q.all(_hia)])).done(function(){if(!this._da2(_659)){return;}if(_cr6&&_cr6.length>0){var _jxm=_frh._c6j("IDS_MSG_COPY_PASTE_WARNING", this._f01(_xjh));_8fm._jgn("_m57", null, _jxm, _cr6, null, _2dm._2qn);}_erh._sn9(_fyd, true);}.bind(this));}.bind(this));};_0ce.prototype._f01=function(_xjh){switch(_xjh){case "EXPLORE":return _frh._c6j("IDS_LBL_EXPLORATION");case "DASHBOARD":return _frh._c6j("IDS_LBL_DASHBOARD");case "STORY":return _frh._c6j("IDS_LBL_STORY");}};_0ce.prototype._d01=function(_0yd,_6zb){if(!_0yd||!_6zb){_67j("IDS_MSG_CLIPBOARD_EMPTY");return false; }if(_agm._vuc(_erh._vtc())!=_agm._vuc(_0yd)){Application._28j(_frh._c6j("IDS_MSG_UNSUPPORTED_PASTE_TO_REPORT"), {type: "warning"});return false; }for(var i=0; i<_6zb.length; i++){var _zpi=_7hn._ij8(_0yd, ".//*[@iid='" + _6zb[i] + "']");if(!this._en4(_zpi)){return false;}}return true;};_0ce.prototype._5j1=function(_vdn){switch(_vdn){case "list":case "crosstab":case "viz":case "vizControl":case "listControl":case "mapChart":case "singleton":case "repeater":case "repeaterTable":case "block":case "conditionalBlocks":case "layoutComponentRef":case "textItem":case "richTextItem":case "HTMLItem":case "textBox":case "tableCell":case "pageHeader":case "pageFooter":case "page":case "pageSet":case "bookletItem":case "vizDataSet":case "customControl":case "fieldSet":case "queryFilterBlock":case "selectValue":case "selectWithSearch":case "selectDateTime":case "selectDate":case "selectTime":case "selectInterval":case "selectWithTree":case "generatedPrompt":case "promptButton":case "hyperlink":case "TOCEntry":case "TOC":case "image":case "date":case "time":case "pageNumber":case "rowNumber":case "asOfTime":case "button":case "bookmark":case "CMMMap":case "appList":return true;}if(_geb._nml.indexOf(_vdn)!==-1){return true;}if(_j9g._89j.indexOf(_vdn)!==-1){return true;}return false;};_0ce.prototype._gv1=function(_vdn){switch(_vdn){case "query":case "dataItem":case "dataItemMember":case "dataItemMemberProperty":case "dataItemCalculatedMember":case "dataItemSet":case "dataItemChildrenSet":case "dataItemSetExpression":case "dataItemLevelSet":case "dataItemHierarchySet":case "dataItemNamedSet":case "dataItemTuple":case "dataItemMeasure":case "dataItemCalculatedMeasure":case "dataItemMeasurePercentage":case "dataItemMemberSet":case "dataItemListSummary":case "dataItemEdgeSummary":case "dataItemDimensionalEdgeSummary":case "dataItemCustomGroup":case "detailFilter":return true;}return false;};_0ce.prototype._zw3=function(_zpi){if(this._5j1(_zpi.nodeName)){return true;}switch(_zpi.nodeName){case "table":case "pageBody":return true;}return false;};_0ce.prototype._8o2=function(_och){for(var i=0; i<_och._3ob.length; i++){var _zpi=_7hn._ij8(_och._irl, ".//*[@iid='" + _och._3ob[i] + "']");if(this._zw3(_zpi)){return true;}}return false;};_0ce.prototype._en4=function(_zpi){if(this._5j1(_zpi.nodeName)||this._gv1(_zpi.nodeName)){return true;}switch(_zpi.nodeName){case "table":case "pageBody":var _oz5=_8qn._x5g(_zpi, ".//", ["contents"], "/*");for(var i=0; i<_oz5.length; i++){if(!this._en4(_oz5.item(i))){return false;}}break;default:return false;}return true;};_0ce.prototype._ja=function(_0yd, _clf, _rx7, _oyb){for(var i=0; i<_rx7.length; i++){this._yu3(_0yd, _clf, _rx7[i], true);}for(var i=0; i<_oyb.length; i++){this._yu3(_0yd, _clf, _oyb[i]);}};_0ce.prototype._yu3=function(_0yd,_clf,_1f2,_9ci){var _z5f=_8qn._fde(null, _8qn._x5g(_0yd, ".//", [_1f2], "/*/@name"));var _36f=_8qn._fde(null, _8qn._x5g(_clf, ".//", [_1f2], "/*/@name"));var _lw4=_z5f.filter(function(x){ return _36f.indexOf(x)!==-1; });if(_lw4.length===0){return;}var _yfl=_9ci?this._bm4(_1f2):undefined;var _c44=_36f.concat(_z5f);this._1a1(_lw4, _c44, _0yd, _1f2, _yfl);};_0ce.prototype._bm4=function(_vdn){var _yfl;switch(_vdn){case "queries":_yfl="refQuery";break;case "reportDataStores":_yfl="refDataStore";break;case "namedConditionalStyles":_yfl="refConditionalStyle";break;case "reportVariables":_yfl="refVariable";break;case "appVariables":_yfl="refAppVariable";break;}return _yfl;};_0ce.prototype._1a1=function(_lw4,_c44,_0yd,_1f2,_vdn){for(var i=0; i<_lw4.length; i++){var _527=_lw4[i];var _jlc=_8qn._wh2(_c44, _527, true);_c44.push(_jlc);var _q4l=(_1f2!=="reportPages" ?_7hn._ij8(_0yd, _1f2+"/*[@name=" + _cgm._zxc(_527) + "]"):undefined);switch(_1f2){case "queries":_6aj._p5g(_q4l, _jlc);break;case "reportPages":_7hn._ij8(_0yd, ".//reportPages/*[@name=" + _cgm._zxc(_527) + "]").setAttribute("name", _jlc);break;case "appVariables":_7hn._ij8(_0yd, ".//appVariables/*[@name=" + _cgm._zxc(_527) + "]").setAttribute("name", _jlc);break;default:_q4l.setAttribute("name", _jlc);_8qn._433(_7hn._x5g(_0yd, ".//*[@" + _vdn + "=" + _cgm._zxc(_527) + "]"),_vdn, _jlc);}}};_0ce.prototype._m4d=function(_0yd,_6zb,_1x7){var _och={_irl: _0yd,_3ob: _6zb};for(var i=0; i<_1x7.length; i++){var _q4l=_7hn._ij8(_0yd, ".//"+_1x7[i]);if(_q4l){_och[_1x7[i]]=_erh._q77(_q4l);}}if(_6zb.length===1){var _u05=_7hn._ij8(_0yd, ".//*[@iid='" + _6zb[0] + "']");if(_u05.nodeName==="pageBody"){_och._3ob=[];var nlSourceContainers=_7hn._x5g(_u05, "./contents/*");for(var i=0; i0){if(!_wch.namedConditionalStyles){_wch.namedConditionalStyles=_erh._u0g(_wch._irl, "namedConditionalStyles");}for(var i=0; i<_km1.length; i++){var _d31=_7hn._ij8(_och.namedConditionalStyles, "*[@name=" + _cgm._zxc(_km1[i]) + "]");if(_d31){_wch.namedConditionalStyles.appendChild(_erh._woh(_d31, true));}}}};_0ce.prototype._ff=function(_och,_wch){var _0s6=[];for(var i=0; i<_och._3ob.length; i++){var _zpi=_7hn._ij8(_och._irl, ".//*[@iid='" + _och._3ob[i] + "']");var _yzd=_7hn._x5g(_zpi, "descendant-or-self::*/@refVariable");for(var j=0; j<_yzd.length; j++){var _8wf=_7hn._fkl(_yzd.item(j));if(_0s6.indexOf(_8wf)===-1){_0s6.push(_8wf);}}}if(_0s6.length>0){if(!_wch.reportVariables){_wch.reportVariables=_erh._u0g(_wch._irl, "reportVariables");}for(var i=0; i<_0s6.length; i++){var _c74=_7hn._ij8(_och.reportVariables, "*[@name=" + _cgm._zxc(_0s6[i]) + "]");if(_c74){_wch.reportVariables.appendChild(_erh._woh(_c74, true));}}}};_0ce.prototype._1t=function(_och,_wch){var _0s6=[];for(var i=0; i<_och._3ob.length; i++){var _zpi=_7hn._ij8(_och._irl, ".//*[@iid='" + _och._3ob[i] + "']");var _yzd=_7hn._x5g(_zpi, "descendant-or-self::*/@refAppVariable");for(var j=0; j<_yzd.length; j++){var _8wf=_7hn._fkl(_yzd.item(j));if(_0s6.indexOf(_8wf)===-1){_0s6.push(_8wf);}}}if(_0s6.length>0){if(!_wch.appVariables){_wch.appVariables=_erh._u0g(_erh._h56(_wch._irl, "appProperties"), "appVariables");}for(var i=0; i<_0s6.length; i++){var _3z6=_7hn._ij8(_och.appVariables, "*[@name=" + _cgm._zxc(_0s6[i]) + "]");if(_3z6){_wch.appVariables.appendChild(_erh._woh(_3z6, true));}}}};_0ce.prototype._ps3=function(_gdk, _w6l, _yx7, _3e, _77){if(_yx7.indexOf(_gdk)===-1){_yx7.push(_gdk);var _1lf=_7hn._ij8(_w6l, "query[@name='" + _gdk + "']");if(_7hn._ij8(_1lf, "source/metadataPath")){_3e.push(_1lf);}else{_77.push(_1lf);}var _7f9=_7hn._x5g(_1lf, "source//queryRef");for(var i=0; i<_7f9.length; i++){var _f26=_7f9.item(i).getAttribute("refQuery");this._ps3(_f26, _w6l, _yx7, _3e, _77);}}};_0ce.prototype._h71=function(_och,_wch){var _yx7=[];var _77=[];var _3e=[];for(var i=0; i<_och._3ob.length; i++){var _zpi=_7hn._ij8(_och._irl, ".//*[@iid='" + _och._3ob[i] + "']");if(this._zw3(_zpi)){var _0si=_7hn._x5g(_zpi, "descendant-or-self::*/@refQuery");for(var j=0; j<_0si.length; j++){var _gdk=_7hn._fkl(_0si.item(j));this._ps3(_gdk, _och.queries, _yx7, _3e, _77);} }}this._q52(_och, _wch, _yx7, _3e, _77);};_0ce.prototype._zn=function(_och,_wch){var _mw4=[];for(var i=0; i<_och._3ob.length; i++){var _zpi=_7hn._ij8(_och._irl, ".//*[@iid='" + _och._3ob[i] + "']");if(this._zw3(_zpi)){var _aec=_7hn._x5g(_zpi, "descendant-or-self::*/@refDataStore");for(var j=0; j<_aec.length; j++){var _y8e=_7hn._fkl(_aec.item(j));_mw4.push(_y8e);} }}if(_mw4.length>0){if(!_wch.reportDataStores){_wch.reportDataStores=_erh._u0g(_wch._irl, "reportDataStores");}var _yx7=[];var _77=[];var _3e=[];for(var i=0; i<_mw4.length; i++){var _zh3=_7hn._ij8(_och.reportDataStores, "*[@name=" + _cgm._zxc(_mw4[i]) + "]");if(_zh3){_wch.reportDataStores.appendChild(_erh._woh(_zh3, true));var _0si=_7hn._x5g(_zh3, "descendant-or-self::*/@refQuery");for(var j=0; j<_0si.length; j++){var _gdk=_7hn._fkl(_0si.item(j));this._ps3(_gdk, _och.queries, _yx7, _3e, _77);} }}this._q52(_och, _wch, _yx7, _3e, _77);}};_0ce.prototype._l2=function(_3e,_wch){for(var i=0; i<_3e.length; i++){_wch.queries.appendChild(_erh._woh(_3e[i], true)); } };_0ce.prototype._71=function(_77,_3e,_och,_wch){if(!_wch.modelPath&&_och.modelPath){var _wni=_erh._woh(_och.modelPath, true);if(_77.length>0){for(var i=0; i<_77.length; i++){_wch.queries.appendChild(_erh._woh(_77[i], true)); } }else{_7hn._qll(_wni, _7hn._ij8(_3e[0], "source/metadataPath").getAttribute("path"));}_wch.modelPath=_wni; _wch._irl.appendChild(_wni);}else if(_wch.modelPath&&_och.modelPath&&_7hn._fkl(_wch.modelPath)!==_7hn._fkl(_och.modelPath)){for(var i=0; i<_77.length; i++){var _4sa=_wch.queries.appendChild(_erh._woh(_77[i], true)); _8qn._cqh(_4sa, "source/model");var _rvd=_8qn._u0g(_7hn._ij8(_4sa, "source"), "metadataPath");_rvd.setAttribute("path", _7hn._fkl(_och.modelPath));var _rk9=_och.modelPath.getAttribute("type");if(_rk9){_rvd.setAttribute("type", _rk9);}} }else{for(var i=0; i<_77.length; i++){_wch.queries.appendChild(_erh._woh(_77[i], true));} }};_0ce.prototype._q52=function(_och, _wch, _yx7, _3e, _77){if(_yx7.length>0){if(!_wch.queries){_wch.queries=_erh._u0g(_wch._irl, "queries");}this._l2(_3e, _wch);this._71(_77, _3e, _och, _wch);}};_0ce.prototype._a3=function(_och,_wch){var _yx7=[];var _77=[];var _3e=[];for(var i=0; i<_och._3ob.length; i++){var _zpi=_7hn._ij8(_och._irl, ".//*[@iid='" + _och._3ob[i] + "']");if(this._zw3(_zpi)){continue;}if(_zpi.nodeName==='query'){var _z0j=_zpi.getAttribute('name');this._ps3(_z0j, _och.queries, _yx7, _3e, _77); }else if(_r0d._5sh.indexOf(_zpi.nodeName)!==-1){var _elf=this._aw3(_wch);if(!_elf){continue;}var _g74=_7hn._ij8(_elf, "selection");_g74.appendChild(_erh._woh(_zpi, true));}else if(_zpi.nodeName==='detailFilter'){var _elf=this._aw3(_wch);if(!_elf){continue;}var _c9c=_erh._h56(_elf, "detailFilters");_c9c.appendChild(_erh._woh(_zpi, true));}else{continue;}}this._q52(_och, _wch, _yx7, _3e, _77);};_0ce.prototype._aw3=function(_wch){var _fsm;if(_wch._93i&&_wch._93i.nodeName==='query'){_fsm=_wch._93i;}else{var n=_k8j._p3g();if(n&&n.nodeName==='query'){_fsm=_7hn._ij8(_wch.queries, "./query[@name='" + n.getAttribute('name') + "']");}}return _fsm;};_0ce.prototype._f1=function(_yy5,_wch){if(_wch._93i.nodeName==='vizDataSet'||_wch._93i.nodeName==='viz'){var _hqi=_7hn._ij8(_wch._93i, "ancestor-or-self::viz[1]");if(_8qn._12g(_yy5, "viz").getAttribute("type")!==_hqi.getAttribute("type")){Application._28j(_frh._c6j("IDS_MSG_COPY_PASTE_BETWEEN_DIFF_VIZ_TYPE"), {type: "warning"});return;}var _o58;if(_wch._93i.nodeName==='vizDataSet'){_o58=_wch._93i;}else if(_wch._93i.nodeName==='viz'){_o58=_7hn._ij8(_wch._93i, ".//vizDataSet");}if(_o58){var _5z6=_o58.parentNode;_5z6.removeChild(_o58);_5z6.appendChild(_erh._woh(_yy5, true)); }}else{return; }};_0ce.prototype._s71=function(_yy5){var _5lh="";var _6z5=_7hn._x5g(_yy5, "ancestor::*[@refQuery]");for(var i=0; i<_6z5.length; i++){var _j28=_6z5.item(i);if(_j28.nodeName=="singleton"){continue;}var _gdk=_j28.getAttribute("refQuery");_5lh="\nObject '" + _j28.nodeName + "' references query '" + _gdk + "'";}if(_5lh){_vzm._ozm(_5lh);}};_0ce.prototype._38=function(_och,_wch,_fsj,_2yl,_gd2){var _dnf, _hsd;if(_wch._93i.nodeName=="table"){_dnf=_wch._93i.selectNodes("tableRows/tableRow/tableCells/tableCell");_hsd=_wch._93i.selectNodes("tableRows/tableRow[1]/tableCells/tableCell").length;}for(var i=0; i<_och._3ob.length; i++){var _yy5=_7hn._ij8(_och._irl, ".//*[@iid='" + _och._3ob[i] + "']");if(!_yy5){_67j("IDS_MSG_CLIPBOARD_EMPTY");return;}this._s71(_yy5);switch(_yy5.nodeName){case "vizDataSet":this._f1(_yy5, _wch);break;case "page":case "pageSet":case "bookletItem":var _kkf=_7hn._ij8(_wch._irl, "layouts/layout/reportPages");if(!_kkf){var _b2m=_7hn._ij8(_wch._irl, "layouts/layout");_kkf=_erh._u0g(_b2m, "reportPages");}_kkf.appendChild(_erh._woh(_yy5, true));break;default:if(_dnf){_wch._93i=_dnf.item(i);if(_gd2){if(_yy5.nodeName=="vizControl"){var _cz6=_erh._h56(_yy5, "vizPropertyValues");var _28l=_7hn._ij8(_cz6, "./vizPropertyLengthValue[@name='vcWidth']");if(!_28l){_28l=_erh._u0g(_cz6, "vizPropertyLengthValue");_28l.setAttribute("name", "vcWidth");}_7hn._qll(_28l, "100%"); }var _lsm=_erh._h56(_wch._93i, "style");var _tkn=_erh._h56(_lsm, "CSS");_tkn.setAttribute("value", _tkn.getAttribute("value") + ";width:" + Math.round(100/_hsd) + "%"); }}_ath._vge(new _4mh(_erh._q77(_yy5)), _wch._93i, _fsj);break;}}};function _8pc(){}_8pc.prototype._ujl=function(){this._nhj=_8qn._dhe('' +''+'' +'' +'' +''+'').documentElement;_8fm._jgn( "_wcm", null, _frh._c6j( "IDS_TITLE_PASTE_TO" ), this._nhj, this );};_8pc.prototype._io9=function(_e5m){var _mzj=this._nhj.selectSingleNode("listItems/listItem[@selected='true']");var _1yl;switch(_mzj.getAttribute("value")){case "before":_1yl=_ath._5me;break;case "after":_1yl=_ath._r9g;break;default:_1yl=_ath._6me;}setTimeout(_ypn._p5j.bind(_ypn, _1yl), 0);};var _of7={};_of7._rpn=function(_arg){(new _1mh(_arg))._ujl();};_of7._vfn=function(_arg){(new _kzf(_arg))._ujl();};_of7._nzm=function(_zpi,_fsj,_2yl){(new _0ce(_zpi))._ujl(_fsj, _2yl);};_of7._dll=function(){(new _8pc())._ujl();};_of7._b9=function(_0yd,_fyd){var _v0e=new _0ce();var _rx7=_v0e._m81();var _oyb=_v0e._no();_v0e._ja(_0yd, _fyd, _rx7, _oyb);};return _of7;});