dashboard-extensions.min.js 136 KB

12
  1. !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("react"),require("mobx-react"),require("ca-ui-toolkit"),require("mobx-state-tree"),require("underscore"),require("prop-types"),require("jquery"),require("react-dom"),require("polyglot"),require("ca-modeller/shaping"),require("explore-common"),require("gemini/lib/@waca/dashboard-common/dist/core/APIFactory"),require("gemini/lib/@waca/dashboard-common/dist/api/PropertiesProviderAPI"),require("bi/moser/moser.min"),require("gemini/lib/@waca/core-client/js/core-client/ui/core/View"));else if("function"==typeof define&&define.amd)define(["react","mobx-react","ca-ui-toolkit","mobx-state-tree","underscore","prop-types","jquery","react-dom","polyglot","ca-modeller/shaping","explore-common","gemini/lib/@waca/dashboard-common/dist/core/APIFactory","gemini/lib/@waca/dashboard-common/dist/api/PropertiesProviderAPI","bi/moser/moser.min","gemini/lib/@waca/core-client/js/core-client/ui/core/View"],t);else{var r="object"==typeof exports?t(require("react"),require("mobx-react"),require("ca-ui-toolkit"),require("mobx-state-tree"),require("underscore"),require("prop-types"),require("jquery"),require("react-dom"),require("polyglot"),require("ca-modeller/shaping"),require("explore-common"),require("gemini/lib/@waca/dashboard-common/dist/core/APIFactory"),require("gemini/lib/@waca/dashboard-common/dist/api/PropertiesProviderAPI"),require("bi/moser/moser.min"),require("gemini/lib/@waca/core-client/js/core-client/ui/core/View")):t(e.react,e["mobx-react"],e["ca-ui-toolkit"],e["mobx-state-tree"],e.underscore,e["prop-types"],e.jquery,e["react-dom"],e.polyglot,e["ca-modeller/shaping"],e["explore-common"],e["gemini/lib/@waca/dashboard-common/dist/core/APIFactory"],e["gemini/lib/@waca/dashboard-common/dist/api/PropertiesProviderAPI"],e["bi/moser/moser.min"],e["gemini/lib/@waca/core-client/js/core-client/ui/core/View"]);for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}("undefined"!=typeof self?self:this,function(e,t,r,o,n,i,a,s,l,u,c,d,p,h,g){return webpackJsonp([1],{0:function(t,r){t.exports=e},102:function(e,t){e.exports=d},103:function(e,t){e.exports=p},116:function(e,t,r){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var n=function(){function e(t,r){o(this,e),this.badgesFeature=r.badgesFeature,this.id=t.id,this.owner=t.owner,this.ownerWidget=t.ownerWidget,this.logger=t.logger,this.visAPI=t.visAPI,this.dashboardApi=t.dashboardApi,this._initializeStep=this.owner._initializeStep.bind(this.owner),this._isStepComplete=this.owner._isStepComplete.bind(this.owner),this._completeStep=this.owner._completeStep.bind(this.owner),this._logRenderContext=this.owner._logRenderContext.bind(this.owner),this.id&&this._initializeStep(this.id)}return e.prototype.getRenderState=function(){return this.owner._renderState},e.prototype.clearError=function(){this.visAPI.visHelper.clearError()},e.prototype.showError=function(e,t){this.visAPI.visHelper.showError(e,t)},e}();t.default=n},117:function(e,t,r){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var n=r(485),i=function(e){return e&&e.__esModule?e:{default:e}}(n),a=r(22),s=function(){function e(){o(this,e),this.polyglot=new a({phrases:i.default})}return e.prototype.get=function(e,t){return this.polyglot.t(e,t)},e}();t.default=new s},118:function(e,t,r){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=r(61),s=function(e){return e&&e.__esModule?e:{default:e}}(a),l=function(e){function t(r,i,a){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;o(this,t);var l=n(this,e.call(this,r,i,a,s));return l._unprocessedItems=[],l}return i(t,e),t.prototype.addQueryItem=function(e,t,r){if("fact"===t.getType()&&"countdistinct"===t.getAggregation()){var o=!1;if(r.isSelectionSummaryCollector){var n=t.getId(),i=r.getSummary(n),a=i&&i.valueMap&&Object.keys(i.valueMap);a&&1===a.length?(this.updateSummaryEntry(r,n,i.valueMap[a[0]],"filteredSummaryValueUse","filteredSummaryValue"),o=!0):a||(r.removeSummary(n),o=!0)}if(!o){var s={aggregate:t.getAggregation(),itemId:t.getColumnId(),id:t.getId()};e.dataItems.push(s),e.projections.push(t.getId())}}else"fact"===t.getType()&&this._unprocessedItems.push(t.getAggregation()+t.getColumnId())},t.prototype.getUnprocessedItems=function(){return this._unprocessedItems},t.prototype.processValue=function(e,t,r,o){this.updateSummaryEntry(o,e,r,"filteredSummaryValueUse","filteredSummaryValue")},t}(s.default);t.default=l},119:function(e,t,r){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,r,o){return r&&e(t.prototype,r),o&&e(t,o),t}}(),i=r(8),a=function(){function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];o(this,e),this.widgetApi=r,this.dashboardApi=t,this.isSelectionSummaryCollector=n,this.lastCategorySelection=[],this.summaryTable={}}return e.prototype.getSummaryTableJSON=function(){var e={};this.summaryTable=JSON.parse(JSON.stringify(this.summaryTable)),i.each(this.summaryTable,function(t,r){var o=t.metadata?t.metadata.itemId+"_"+t.metadata.aggregationType+"_"+t.metadata.layerId:r;e[o]=t,t.valueMap&&(t.values=[],i.each(t.valueMap,function(e){t.values.push(e)}))});var t={measures:e};if(this.lastCategorySelection.length){var r=this.widgetApi.getVisApi()&&this.widgetApi.getVisApi().getFormatter();t.lastCategorySelection=r?this.lastCategorySelection.map(function(e){return e||r.format(e)}):this.lastCategorySelection}return t},e.prototype.setLastCategorySelection=function(e){this.lastCategorySelection=e},e.prototype.reset=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;t?Object.keys(this.summaryTable).forEach(function(r){var o=e.summaryTable[r];o.metadata&&o.metadata.layerId===t&&(e.summaryTable[r]=null,delete e.summaryTable[r])}):this.summaryTable={}},e.prototype.getSummary=function(e){return this.summaryTable[e]||this._initializeSummary(e),this.summaryTable[e]},e.prototype.removeSummary=function(e){this.summaryTable[e]&&(this.summaryTable[e]=null,delete this.summaryTable[e])},e.prototype.updateSummary=function(e,t,r){var o=this.updateSummaryEntry(e);if(null===t)return void(o.missingValueCount=void 0===o.missingValueCount?1:o.missingValueCount+1);(void 0===o.maxUse||o.maxUse<t)&&(o.maxUse=t),(void 0===o.minUse||o.minUse>t)&&(o.minUse=t),t<0&&(o.hasNegativeValues=!0),o.totalUse=void 0===o.totalUse?t:o.totalUse+t,this._updateWeightedAverageFields(o,t,r)},e.prototype.updateSummaryEntry=function(e){var t=e.metadata&&e.metadata.itemUniqueId;if(t){var r=Object.assign({},e);return this.summaryTable[t]=r,r}return e},e.prototype.updateStackedSummary=function(e,t,r){e.stackedSummaryValueMap=e.stackedSummaryValueMap||{};var o=e.stackedSummaryValueMap[r]||{},n=o.currentPosHeightOfStack,i=o.currentNegHeightOfStack;t>=0?n=void 0===n?t:n+t:i=void 0===i?t:i+t,e.stackedSummaryValueMap[r]={currentPosHeightOfStack:n,currentNegHeightOfStack:i}},e.prototype.finalizeStackedSummary=function(e){var t=[];i.each(e.stackedSummaryValueMap,function(e){void 0!==e.currentPosHeightOfStack&&t.push(e.currentPosHeightOfStack),void 0!==e.currentNegHeightOfStack&&t.push(e.currentNegHeightOfStack)}),e.stackedDomainMax=t.length?Math.max.apply(Math,t):void 0,e.stackedDomainMin=t.length?Math.min.apply(Math,t):void 0,delete e.stackedSummaryValueMap},e.prototype.updateSelectionSummary=function(e,t,r,o){e.valueMap||(e.valueMap={}),o&&e.valueMap[JSON.stringify(r)]?delete e.valueMap[JSON.stringify(r)]:(e.valueMap[JSON.stringify(r)]=t.value,this._updateWeightedAverageFields(e,t.value,t.detailRowCountUse))},e.prototype.finalizeSummaries=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments[2];this.updateStackedSummary(e),this.finalizeStackedSummary(e);var o=this.widgetApi.getVisApi().getFormatter();e.rowCount=t-(e.missingValueCount||0),e.rowCount>0&&(e.avgUse=e.totalUse/e.rowCount),void 0!==e.detailSumUse&&void 0!==e.detailRowCountUse&&(e.weightedAvgUse=e.detailSumUse/e.detailRowCountUse);var n=e.metadata&&e.metadata.format;o&&n?(e.min=void 0!==e.minUse&&o.format(e.minUse,n),e.max=void 0!==e.maxUse&&o.format(e.maxUse,n),e.total=void 0!==e.totalUse&&o.format(e.totalUse,n),e.avg=void 0!==e.avgUse&&o.format(e.avgUse,n),void 0!==e.weightedAvgUse&&(e.weightedAvg=o.format(e.weightedAvgUse,n))):(e.min=e.minUse,e.max=e.maxUse,e.total=e.totalUse,e.avg=e.avgUse,void 0!==e.weightedAvgUse&&(e.weightedAvg=e.weightedAvgUse)),"avg"!==r&&"countdistinct"!==r||(delete e.totalUse,delete e.total)},e.prototype.applySelectionInfo=function(e,t){var r=this;if(!e._aOrdinalSelections||!e._aOrdinalSelections.length)return!1;var o=i.map(e._aCategorySelections,function(e){return{u:e.value.u,d:e.value.d}});return i.each(e._aOrdinalSelections,function(e){var n=r.getSummary(e.slotDataItem.getUniqueId());r.updateSelectionSummary(n,e,o,t)}),!0},e.prototype.applyLassoSelectionInfo=function(e,t){var r=this,o=e._aOrdinalSelections.concat(e._aAdditionalOrdinalSelections),n=i.map(e._aCategorySelections,function(e){return{u:e.value.u,d:e.value.d}}),a=null;i.each(o,function(o,s){s%e._aOrdinalSelections.length==0&&(a=i.first(n,t),n=i.rest(n,t));var l=r.getSummary(o.slotDataItem.getUniqueId());r.updateSelectionSummary(l,o,a)})},e.prototype.areOverallSummaryValuesNeeded=function(){return!!i.find(this.summaryTable,function(e){return void 0===e.summaryValue})},e.prototype._addMetadata=function(e){var t=this.dashboardApi.getCanvas().getContent(this.widgetApi.getId()),r=t.getFeature("Visualization").getSlots().getMappingInfo(e);if(r){var o=r.dataItem,n=r.slot,i=o.getAggregation(),a=n?n.getDefinition().getDatasetIdList():[],s=a[0];return{itemUniqueId:o.getId(),itemId:o.getColumnId(),label:o.getLabel(),aggregationType:i,layerId:s,format:o.getFormat(),slotId:n.getId()}}return null},e.prototype._updateWeightedAverageFields=function(e,t,r){if(void 0!==r){var o=t*r;e.detailSumUse=void 0===e.detailSumUse?o:e.detailSumUse+o,e.detailRowCountUse=void 0===e.detailRowCountUse?r:e.detailRowCountUse+r,e.weightedAvgUse=e.detailSumUse/e.detailRowCountUse}},e.prototype._initializeSummary=function(e){this.summaryTable[e]={metadata:this._addMetadata(e)}},e.prototype.isTupleInSelectionSummary=function(e){var t=this,r=void 0;return r=Array.isArray(e)?JSON.stringify(e):JSON.stringify([e]),Object.keys(this.summaryTable).some(function(e){if(void 0!==t.summaryTable[e].valueMap[r])return!0})},n(e,null,[{key:"NO_DETAIL_ROWCOUNT",get:function(){}}]),e}();t.default=a},14:function(e,t){e.exports=a},17:function(e,t){e.exports=s},22:function(e,t){e.exports=l},28:function(e,t){e.exports=u},33:function(e,t){e.exports=c},468:function(e,t,r){r(32),e.exports=r(469)},469:function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.ShowByView=t.ShowByAction=t.ExploreLayoutPropertiesProvider=t.VisTitleFetcherFeature=t.ImageCaptureFeature=t.SummarizerFeature=t.CrosshairsFeature=t.ChartInsights=t.BadgesFeature=void 0;var n=r(470),i=o(n),a=r(476),s=o(a),l=r(481),u=o(l),c=r(491),d=o(c),p=r(496),h=o(p),g=r(498),m=o(g),f=r(101),_=o(f),v=r(499),y=o(v),b=r(500),w=o(b);t.BadgesFeature=i.default,t.ChartInsights=s.default,t.CrosshairsFeature=u.default,t.SummarizerFeature=d.default,t.ImageCaptureFeature=h.default,t.VisTitleFetcherFeature=m.default,t.ExploreLayoutPropertiesProvider=_.default,t.ShowByAction=y.default,t.ShowByView=w.default},470:function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=r(471),a=o(i),s=r(472),l=o(s),u=r(473),c=o(u),d=r(475),p=[{min:.66,msgs:["badge_correlated_one_driver","badge_correlated_two_driver"]}],h=function(){function e(t,r){var o=this;n(this,e),this.badgeDataReadyDfd=new d,this.widgetApi=t,this.dashboardApi=r,this.badgeDataBySlots={},this.badgeClickHandlers=[],this._canRender=!1,this.widgetApi.on("visevent:customdataselection",this._onVisBadgeClick,this),this.dashboardApi.getCanvasWhenReady().then(function(e){o.layoutApi=e.getLayout(o.widgetApi.getId()),o.layoutApi.onTitleBadgeClick(o._onTitleBadgeClick,o),o._canRender=!0,o._isBadgesRendered&&o.renderBadges()})}return e.prototype.getFeatureTags=function(){return["interactive-only"]},e.prototype.destroy=function(){this.widgetApi.off("visevent:customdataselection",this._onVisBadgeClick,this),this.layoutApi&&this.layoutApi.offTitleBadgeClick(this._onTitleBadgeClick,this),this.badgeClickHandlers=[]},e.prototype.setBadgeData=function(e,t,r,o,n){var i=this.badgeDataBySlots[r];i||(i={slotId:o,data:{}},this.badgeDataBySlots[r]=i);var a=this._createBadgeData(e,t,n);a&&(i.data[e]=a,this._calculateBadgeDecorationLabel(i),this._invokeChange(),this.badgeDataReadyDfd&&this.badgeDataReadyDfd.resolve())},e.prototype.clearBadgesInfo=function(){var e=this.widgetApi.getVisApi().getDecoratorAPI(0);e&&(e.clearItemDecoration("badge"),e.updateDecorations()),this.layoutApi&&this.layoutApi.setTitleBadge(null),this._isBadgesRendered=!1,this.badgeDataBySlots={},this.badgeDataReadyDfd=new d},e.prototype.getTitleBadgeInfo=function(){return this.getBadgesInfoForSlot(-1)},e.prototype.getBadgesInfoForSlot=function(e){var t=void 0;return t=this.badgeDataBySlots[e]?this.badgeDataBySlots[e].data:{},JSON.parse(JSON.stringify(t))},e.prototype.getBadgesInfoForSlotBySlotId=function(e){var t=void 0,r=void 0;for(t in this.badgeDataBySlots)if(this.badgeDataBySlots[t].slotId===e){r=this.badgeDataBySlots[t].data;break}return JSON.parse(JSON.stringify(r||{}))},e.prototype.onBadgeSelect=function(e){this.badgeClickHandlers.push(e)},e.prototype.offBadgeSelect=function(e){var t=this.badgeClickHandlers.indexOf(e);t>-1&&this.badgeClickHandlers.splice(t,1)},e.prototype.getAPI=function(){return{onBadgeSelect:this.onBadgeSelect.bind(this),offBadgeSelect:this.offBadgeSelect.bind(this),getBadgeDataWhenReady:this.getBadgeDataWhenReady.bind(this)}},e.prototype.getExtraRenderSequenceSteps=function(){return[{id:"getBadgeInfo",module:a.default,moduleOptions:{badgesFeature:this}},{id:"renderBadgeInfo",dependencies:["getBadgeInfo","render"],module:l.default,moduleOptions:{badgesFeature:this}}]},e.prototype.renderBadges=function(){this._isBadgesRendered=!0,this._canRender&&(this._decorateSlots(),this._decorateTitle())},e.prototype.getBadgeDataWhenReady=function(e){var t=this;return this.badgeDataReadyDfd.promise.then(function(){return t.getBadgesInfoForSlotBySlotId(e)})},e.prototype._decorateSlots=function(){var e=void 0,t=void 0,r=this.widgetApi.getVisApi().getDecoratorAPI(0);if(r){for(e in this.badgeDataBySlots)if(e>=0){var o=this.badgeDataBySlots[e].label;o&&(r.decorateItem(e,"badge",o),t=!0)}t&&r.updateDecorations()}},e.prototype._decorateTitle=function(){this.badgeDataBySlots[-1]&&this.layoutApi&&this.layoutApi.setTitleBadge(this.badgeDataBySlots[-1].label,c.default.get("badge_label"))},e.prototype._getSlotId=function(e){return e.dataItem&&e.dataItem.itemClass?e.dataItem.itemClass.slotDef&&e.dataItem.itemClass.slotDef.name:e.dataItem&&e.dataItem.slotDef&&e.dataItem.slotDef.name},e.prototype._onVisBadgeClick=function(e){var t=e.items[0];if(t&&"badge"===t.key&&t.values&&t.values.length){var r=t.values[0].payload,o=this._getSlotId(r);if(o){var n=e.event.target.getBoundingClientRect(),i=this.getBadgesInfoForSlotBySlotId(o);this.badgeClickHandlers.forEach(function(e){e(i,n)})}}},e.prototype._onTitleBadgeClick=function(e){var t=e.event.target.getBoundingClientRect(),r=this.getTitleBadgeInfo();this.badgeClickHandlers.forEach(function(e){e(r,t)})},e.prototype._invokeChange=function(){this._isBadgesRendered&&this.renderBadges()},e.prototype._calculateBadgeDecorationLabel=function(e){var t=void 0,r=0;for(t in e.data)r+=e.data[t].drivers.length;e.label=r>0?r:""},e.prototype._createBadgeData=function(e,t,r){var o=this,n={id:e,label:t,drivers:[]};return r.results&&r.results.sort(function(e,t){return t.accuracy-e.accuracy}).forEach(function(t,r){if(!(r>=5)){var i=o._createDriverInfo(t,e);i&&n.drivers.push(i)}}),n.drivers.length?n:null},e.prototype._getAllFiltersAsLocalFilters=function(){var e=[],t=[],r=this.widgetApi.getVisualization();if(r){e=r.getLocalFilters().getFilterList();var o=this.dashboardApi.getFeature("GlobalFilters");if(o){var n=r.getDataSource()&&r.getDataSource().getId(),i=this.widgetApi.getScope();t=o.getFilters(n,i).getFilterList()}}return[].concat(e,t)},e.prototype._createDriverInfo=function(e,t){var r=null,o=p.find(function(t){return e.accuracy>t.min});if(o){var n=this.widgetApi.getVisualization(),i=n&&n.getDataSource(),a=i&&i.getId(),s=e.fields.inputs;r={accuracy:e.accuracy,inputs:s,target:t,widgetSpec:{type:"live",visId:"com.ibm.vis.rave2comet",visTypeLocked:!0,slotmapping:{slots:[{name:"values",dataItems:["1"]}]},data:{dataViews:[{modelRef:a,dataItems:[{itemId:t,id:"1"}]}]},localFilters:this._getAllFiltersAsLocalFilters(),customData:{selected:[{id:e.id,value:!0}]}}};var l=this._createLabelOptionsForDriver(r),u=Math.min(s.length-1,1);r.label=c.default.get(o.msgs[u],l)}return r},e.prototype._createLabelOptionsForDriver=function(e){var t={};if(t.percent=(100*e.accuracy).toFixed(0)+"%",e.inputs.length>2){var r=e.inputs.map(function(e){return e.label}),o=r.pop();t.column0=r.toString().replace(/,/g,", "),r.shift(),t.column1=o}else e.inputs.forEach(function(e,r){t["column"+r]=e.label});return t},e}();t.default=h},471:function(e,t,r){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=r(116),s=function(e){return e&&e.__esModule?e:{default:e}}(a),l=function(e){function t(){return o(this,t),n(this,e.apply(this,arguments))}return i(t,e),t.prototype._isVisTypeUnsupported=function(e){return["com.ibm.vis.rave2comet","com.ibm.vis.spiral","com.ibm.vis.sunburst","com.ibm.vis.decisiontree"].indexOf(e)>-1},t.prototype.process=function(e){var t=this;return this.dashboardApi.getCanvasWhenReady().then(function(r){t.content=r.getContent(t.ownerWidget.getId());var o=t.content.getFeature("Visualization"),n=o&&o.getDefinition(),i=n&&t._isVisTypeUnsupported(n.getId()),a=e.refresh&&e.refresh.data;if(!(o&&o.getSlots()).isMappingComplete()||i)return t.badgesFeature.clearBadgesInfo(),Promise.resolve();if(!a&&t._isStepComplete(e,"getBadgeInfo"))return Promise.resolve();t.badgesFeature.clearBadgesInfo();var s={requestMap:{}},l=[];return o.getSlots().getMappedSlotList().forEach(function(r,o){r.getDataItemList().forEach(function(n){if(!t._skipRequestForDataItem(n,l)){var i=n.getColumnId(),a=r.getDefinition().getId(),u=a+"--"+i;if("_multiMeasuresSeries"!==i&&!s.requestMap[u]){var c=-1,d=r.getDefinition().getTags();d&&-1!==d.indexOf("badge")&&(c=o),s.requestMap[u]=t.getKeyDriverAnalysis(i,n.getLabel(),c,a,e)}}})}),t._completeStep(e,"getBadgeInfo",s),Promise.resolve()})},t.prototype._skipRequestForDataItem=function(e,t){var r=e.getMetadataColumn&&e.getMetadataColumn();if(!r)return!0;if("fact"!==r.getType())return!0;if(r.isOlapColumn())return!0;var o=e.getColumnId();return t.indexOf(o)>-1||(t.push(o),!1)},t.prototype.getKeyDriverAnalysis=function(e,t,r,o,n){var i=this;return this.visAPI.whenPossibleKeyDriversAreReady(n,e,!1).then(function(n){var a=void 0;return a=n.recommendedDrivers?n.recommendedDrivers.map(function(e){return e.fieldIDForExpression}):[],i.visAPI.executeFastPatternDetectionRequest(e,a,null,{}).then(function(n){return i.badgesFeature.setBadgeData(e,t,r,o,n),n},function(n){var a="Error running the predict request for the badge: "+e;i.dashboardApi.getGlassCoreSvc(".Logger").error(a);var s={error:{message:a,rootCause:n}};return i.badgesFeature.setBadgeData(e,t,r,o,s),s})})},t}(s.default);t.default=l},472:function(e,t,r){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=r(116),s=function(e){return e&&e.__esModule?e:{default:e}}(a),l=function(e){function t(){return o(this,t),n(this,e.apply(this,arguments))}return i(t,e),t.prototype.process=function(){return this.badgesFeature.renderBadges(),Promise.resolve()},t}(s.default);t.default=l},473:function(e,t,r){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var n=r(474),i=function(e){return e&&e.__esModule?e:{default:e}}(n),a=r(22),s=function(){function e(){o(this,e),this.polyglot=new a({phrases:i.default})}return e.prototype.get=function(e,t){return this.polyglot.t(e,t)},e}();t.default=new s},474:function(e,t){var r={__root:{badge_label:"Correlations",badge_significantly_correlated_one_driver:"Significantly correlated with %{column0} and %{column1} (%{percent})",badge_strongly_correlated_one_driver:"Strongly correlated with %{column0} (%{percent})",badge_strongly_correlated_two_driver:"Strongly correlated with %{column0} and %{column1} (%{percent})",badge_positively_correlated_one_driver:"Positively correlated with %{column0} (%{percent})",badge_positively_correlated_two_driver:"Positively correlated with %{column0} and %{column1} (%{percent})",badge_correlated_one_driver:"Correlated with %{column0} (%{percent})",badge_correlated_two_driver:"Correlated with %{column0} and %{column1} (%{percent})"},__cs:{badge_label:"Korelace",badge_significantly_correlated_one_driver:"Výrazně korelováno s %{column0} a %{column1} (%{percent})",badge_strongly_correlated_one_driver:"Silně korelováno s %{column0} (%{percent})",badge_strongly_correlated_two_driver:"Silně korelováno s %{column0} a %{column1} (%{percent})",badge_positively_correlated_one_driver:"Kladně korelováno s %{column0} (%{percent})",badge_positively_correlated_two_driver:"Kladně korelováno s %{column0} a %{column1} (%{percent})",badge_correlated_one_driver:"Korelováno s %{column0} (%{percent})",badge_correlated_two_driver:"Korelováno s %{column0} a %{column1} (%{percent})"},__da:{badge_label:"Korrelationer",badge_significantly_correlated_one_driver:"Signifikant korreleret med %{column0} og %{column1} (%{percent})",badge_strongly_correlated_one_driver:"Stærkt korreleret med %{column0} (%{percent})",badge_strongly_correlated_two_driver:"Stærkt korreleret med %{column0} og %{column1} (%{percent})",badge_positively_correlated_one_driver:"Positivt korreleret med %{column0} (%{percent})",badge_positively_correlated_two_driver:"Positivt korreleret med %{column0} og %{column1} (%{percent})",badge_correlated_one_driver:"Korreleret med %{column0} (%{percent})",badge_correlated_two_driver:"Korreleret med %{column0} og %{column1} (%{percent})"},__de:{badge_label:"Korrelationen",badge_significantly_correlated_one_driver:"Signifikante Korrelation mit %{column0} und %{column1} (%{percent})",badge_strongly_correlated_one_driver:"Starke Korrelation mit %{column0} (%{percent})",badge_strongly_correlated_two_driver:"Starke Korrelation mit %{column0} und %{column1} (%{percent})",badge_positively_correlated_one_driver:"Positive Korrelation mit %{column0} (%{percent})",badge_positively_correlated_two_driver:"Positive Korrelation mit %{column0} und %{column1} (%{percent})",badge_correlated_one_driver:"Korrelation mit %{column0} (%{percent})",badge_correlated_two_driver:"Korrelation mit %{column0} und %{column1} (%{percent})"},__es:{badge_label:"Correlaciones",badge_significantly_correlated_one_driver:"Correlacionado significativamente con %{column0} y %{column1} (%{percent})",badge_strongly_correlated_one_driver:"Correlacionado fuertemente con %{column0} (%{percent})",badge_strongly_correlated_two_driver:"Correlacionado fuertemente con %{column0} y %{column1} (%{percent})",badge_positively_correlated_one_driver:"Correlacionado positivamente con %{column0} (%{percent})",badge_positively_correlated_two_driver:"Correlacionado positivamente con %{column0} y %{column1} (%{percent})",badge_correlated_one_driver:"Correlacionado con %{column0} (%{percent})",badge_correlated_two_driver:"Correlacionado con %{column0} y %{column1} (%{percent})"},__fi:{badge_label:"Korrelaatiot",badge_significantly_correlated_one_driver:"Merkittävä korrelaatio kohteiden %{column0} ja %{column1} kanssa (%{percent})",badge_strongly_correlated_one_driver:"Vahva korrelaatio kohteen %{column0} kanssa (%{percent})",badge_strongly_correlated_two_driver:"Vahva korrelaatio kohteiden %{column0} ja %{column1} kanssa (%{percent})",badge_positively_correlated_one_driver:"Positiivinen korrelaatio kohteen %{column0} kanssa (%{percent})",badge_positively_correlated_two_driver:"Positiivinen korrelaatio kohteiden %{column0} ja %{column1} kanssa (%{percent})",badge_correlated_one_driver:"Korrelaatio kohteen %{column0} kanssa (%{percent})",badge_correlated_two_driver:"Korrelaatio kohteiden %{column0} ja %{column1} kanssa (%{percent})"},__fr:{badge_label:"Corrélations",badge_significantly_correlated_one_driver:"Corrélé de manière significative avec %{column0} et %{column1} (%{percent})",badge_strongly_correlated_one_driver:"Fortement corrélé avec %{column0} (%{percent})",badge_strongly_correlated_two_driver:"Fortement corrélé avec %{column0} et %{column1} (%{percent})",badge_positively_correlated_one_driver:"Corrélé de manière positive avec %{column0} (%{percent})",badge_positively_correlated_two_driver:"Corrélé de manière positive avec %{column0} et %{column1} (%{percent})",badge_correlated_one_driver:"Corrélé avec %{column0} (%{percent})",badge_correlated_two_driver:"Corrélé avec %{column0} et %{column1} (%{percent})"},__hr:{badge_label:"Korelacije",badge_significantly_correlated_one_driver:"Značajno korelira s %{column0} i %{column1} (%{percent})",badge_strongly_correlated_one_driver:"Jaka korelacija s %{column0} (%{percent})",badge_strongly_correlated_two_driver:"Jaka korelacija s %{column0} i %{column1} (%{percent})",badge_positively_correlated_one_driver:"Pozitivna korelacija s %{column0} (%{percent})",badge_positively_correlated_two_driver:"Pozitivna korelacija s %{column0} i %{column1} (%{percent})",badge_correlated_one_driver:"Korelira s %{column0} (%{percent})",badge_correlated_two_driver:"Korelira s %{column0} i %{column1} (%{percent})"},__hu:{badge_label:"Korrelációk",badge_significantly_correlated_one_driver:"Jelentősen összefüggésbe hozva a következővel: %{column0} és %{column1} (%{percent})",badge_strongly_correlated_one_driver:"Erősen összefüggésbe hozva a következővel: %{column0} (%{percent})",badge_strongly_correlated_two_driver:"Erősen összefüggésbe hozva a következővel: %{column0} és %{column1} (%{percent})",badge_positively_correlated_one_driver:"Pozitívan összefüggésbe hozva a következővel: %{column0} (%{percent})",badge_positively_correlated_two_driver:"Pozitívan összefüggésbe hozva a következővel: %{column0} és %{column1} (%{percent})",badge_correlated_one_driver:"Összefüggésbe hozva a következővel: %{column0} (%{percent})",badge_correlated_two_driver:"Összefüggésbe hozva a következővel: %{column0} és %{column1} (%{percent})"},__it:{badge_label:"Correlazioni",badge_significantly_correlated_one_driver:"Correlato significativamente con %{column0} e %{column1} (%{percent})",badge_strongly_correlated_one_driver:"Correlato efficacemente con %{column0} (%{percent})",badge_strongly_correlated_two_driver:"Correlato efficacemente con %{column0} e %{column1} (%{percent})",badge_positively_correlated_one_driver:"Correlato positivamente con %{column0} (%{percent})",badge_positively_correlated_two_driver:"Correlato positivamente con %{column0} e %{column1} (%{percent})",badge_correlated_one_driver:"Correlato con %{column0} (%{percent})",badge_correlated_two_driver:"Correlato con %{column0} e %{column1} (%{percent})"},__ja:{badge_label:"相関",badge_significantly_correlated_one_driver:"%{column0} および %{column1} と著しく相関 (%{percent})",badge_strongly_correlated_one_driver:"%{column0} と強く相関 (%{percent})",badge_strongly_correlated_two_driver:"%{column0} および %{column1} と強く相関 (%{percent})",badge_positively_correlated_one_driver:"%{column0} と正の相関 (%{percent})",badge_positively_correlated_two_driver:"%{column0} および %{column1} と正の相関 (%{percent})",badge_correlated_one_driver:"%{column0} と相関 (%{percent})",badge_correlated_two_driver:"%{column0} および %{column1} と相関 (%{percent})"},__kk:{badge_label:"Корреляция",badge_significantly_correlated_one_driver:"%{column0} және %{column1} (%{percent}) -мен айтарлықтай байланысты",badge_strongly_correlated_one_driver:"%{column0} (%{percent}) -мен қатты байланысты",badge_strongly_correlated_two_driver:"%{column0} және %{column1} (%{percent}) -мен қатты байланысты",badge_positively_correlated_one_driver:"%{column0} (%{percent}) - мен оң байланысты",badge_positively_correlated_two_driver:"%{column0} және %{column1} (%{percent}) - мен оң байланысты",badge_correlated_one_driver:"%{column0} (%{percent}) байланысты",badge_correlated_two_driver:"%{column0} және %{column1} (%{percent}) - мен оң байланысты"},__ko:{badge_label:"상관",badge_significantly_correlated_one_driver:"%{column0} 및 %{column1}과(와) 상당히 상관관계가 있음(%{percent})",badge_strongly_correlated_one_driver:"%{column0}과(와) 매우 상관관계가 있음(%{percent})",badge_strongly_correlated_two_driver:"%{column0} 및 %{column1}과(와) 매우 상관관계가 있음(%{percent})",badge_positively_correlated_one_driver:"%{column0}과(와) 양의 상관관계가 있음(%{percent})",badge_positively_correlated_two_driver:"%{column0} 및 %{column1}과(와) 양의 상관관계가 있음(%{percent})",badge_correlated_one_driver:"%{column0}과(와) 상관관계가 있음(%{percent})",badge_correlated_two_driver:"%{column0} 및 %{column1}과(와) 상관관계가 있음(%{percent})"},__nb:{badge_label:"Korrelasjoner",badge_significantly_correlated_one_driver:"Betydelig korrelert med %{column0} og %{column1} (%{percent})",badge_strongly_correlated_one_driver:"Sterkt korrelert med %{column0} (%{percent})",badge_strongly_correlated_two_driver:"Sterkt korrelert med %{column0} og %{column1} (%{percent})",badge_positively_correlated_one_driver:"Positivt korrelert med %{column0} (%{percent})",badge_positively_correlated_two_driver:"Positivt korrelert med %{column0} og %{column1} (%{percent})",badge_correlated_one_driver:"Korrelert med %{column0} (%{percent})",badge_correlated_two_driver:"Korrelert med %{column0} og %{column1} (%{percent})"},__nl:{badge_label:"Correlaties",badge_significantly_correlated_one_driver:"Significante correlatie met %{column0} en %{column1} (%{percent})",badge_strongly_correlated_one_driver:"Sterke correlatie met %{column0} (%{percent})",badge_strongly_correlated_two_driver:"Sterke correlatie met %{column0} en %{column1} (%{percent})",badge_positively_correlated_one_driver:"Positieve correlatie met %{column0} (%{percent})",badge_positively_correlated_two_driver:"Positieve correlatie met %{column0} en %{column1} (%{percent})",badge_correlated_one_driver:"Correlatie met %{column0} (%{percent})",badge_correlated_two_driver:"Correlatie met %{column0} en %{column1} (%{percent})"},__no:{badge_label:"Korrelasjoner",badge_significantly_correlated_one_driver:"Betydelig korrelert med %{column0} og %{column1} (%{percent})",badge_strongly_correlated_one_driver:"Sterkt korrelert med %{column0} (%{percent})",badge_strongly_correlated_two_driver:"Sterkt korrelert med %{column0} og %{column1} (%{percent})",badge_positively_correlated_one_driver:"Positivt korrelert med %{column0} (%{percent})",badge_positively_correlated_two_driver:"Positivt korrelert med %{column0} og %{column1} (%{percent})",badge_correlated_one_driver:"Korrelert med %{column0} (%{percent})",badge_correlated_two_driver:"Korrelert med %{column0} og %{column1} (%{percent})"},__pl:{badge_label:"Korelacje",badge_significantly_correlated_one_driver:"Istotnie skorelowane z %{column0} i %{column1} (%{percent})",badge_strongly_correlated_one_driver:"Silnie skorelowane z %{column0} (%{percent})",badge_strongly_correlated_two_driver:"Silnie skorelowane z %{column0} i %{column1} (%{percent})",badge_positively_correlated_one_driver:"Dodatnio skorelowane z %{column0} (%{percent})",badge_positively_correlated_two_driver:"Dodatnio skorelowane z %{column0} i %{column1} (%{percent})",badge_correlated_one_driver:"Skorelowane z %{column0} (%{percent})",badge_correlated_two_driver:"Skorelowane z %{column0} i %{column1} (%{percent})"},__pt:{badge_label:"Correlações",badge_significantly_correlated_one_driver:"Correlacionado significativamente com %{column0} e %{column1} (%{percent})",badge_strongly_correlated_one_driver:"Fortemente correlacionado com %{column0} (%{percent})",badge_strongly_correlated_two_driver:"Fortemente correlacionado com %{column0} e %{column1} (%{percent})",badge_positively_correlated_one_driver:"Positivamente correlacionado com %{column0} (%{percent})",badge_positively_correlated_two_driver:"Positivamente correlacionado com %{column0} e %{column1} (%{percent})",badge_correlated_one_driver:"Correlacionado com %{column0} (%{percent})",badge_correlated_two_driver:"Correlacionado com %{column0} e %{column1} (%{percent})"},"__pt-br":{badge_label:"Correlações",badge_significantly_correlated_one_driver:"Correlacionado significativamente com %{column0} e %{column1} (%{percent})",badge_strongly_correlated_one_driver:"Fortemente correlacionado com %{column0} (%{percent})",badge_strongly_correlated_two_driver:"Fortemente correlacionado com %{column0} e %{column1} (%{percent})",badge_positively_correlated_one_driver:"Positivamente correlacionado com %{column0} (%{percent})",badge_positively_correlated_two_driver:"Positivamente correlacionado com %{column0} e %{column1} (%{percent})",badge_correlated_one_driver:"Correlacionado com %{column0} (%{percent})",badge_correlated_two_driver:"Correlacionado com %{column0} e %{column1} (%{percent})"},__ro:{badge_label:"Corelări",badge_significantly_correlated_one_driver:"Corelat semnificativ cu %{column0} şi %{column1} (%{percent})",badge_strongly_correlated_one_driver:"Corelat puternic cu %{column0} (%{percent})",badge_strongly_correlated_two_driver:"Corelat puternic cu %{column0} şi %{column1} (%{percent})",badge_positively_correlated_one_driver:"Corelat pozitiv cu %{column0} (%{percent})",badge_positively_correlated_two_driver:"Corelat pozitiv cu %{column0} şi %{column1} (%{percent})",badge_correlated_one_driver:"Corelat cu %{column0} (%{percent})",badge_correlated_two_driver:"Corelat cu %{column0} şi %{column1} (%{percent})"},__ru:{badge_label:"Корреляции",badge_significantly_correlated_one_driver:"Значительно коррелировано с %{column0} и %{column1} (%{percent})",badge_strongly_correlated_one_driver:"Сильно коррелировано с %{column0} (%{percent})",badge_strongly_correlated_two_driver:"Сильно коррелировано с %{column0} и %{column1} (%{percent})",badge_positively_correlated_one_driver:"Положительно коррелировано с %{column0} (%{percent})",badge_positively_correlated_two_driver:"Положительно коррелировано с %{column0} и %{column1} (%{percent})",badge_correlated_one_driver:"Коррелировано с %{column0} (%{percent})",badge_correlated_two_driver:"Коррелировано с %{column0} и %{column1} (%{percent})"},__sl:{badge_label:"Korelacije",badge_significantly_correlated_one_driver:"Bistvena korelacija s stolpcem %{column0} in %{column1} (%{percent})",badge_strongly_correlated_one_driver:"Močna korelacija s stolpcem %{column0} (%{percent})",badge_strongly_correlated_two_driver:"Močna korelacija s stolpcem %{column0} in %{column1} (%{percent})",badge_positively_correlated_one_driver:"Pozitivna korelacija s stolpcem %{column0} (%{percent})",badge_positively_correlated_two_driver:"Pozitivna korelacija s stolpcem %{column0} in %{column1} (%{percent})",badge_correlated_one_driver:"Korelacija s stolpcem %{column0} (%{percent})",badge_correlated_two_driver:"Korelacija s stolpcem %{column0} in %{column1} (%{percent})"},__sv:{badge_label:"Korrelationer",badge_significantly_correlated_one_driver:"Signifikant korrelerad med %{column0} och %{column1} (%{percent})",badge_strongly_correlated_one_driver:"Starkt korrelerad med %{column0} (%{percent})",badge_strongly_correlated_two_driver:"Starkt korrelerad med %{column0} och %{column1} (%{percent})",badge_positively_correlated_one_driver:"Positivt korrelated med %{column0} (%{percent})",badge_positively_correlated_two_driver:"Positivt korrelerad med %{column0} och %{column1} (%{percent})",badge_correlated_one_driver:"Korrelerad med %{column0} (%{percent})",badge_correlated_two_driver:"Korrelerad med %{column0} och %{column1} (%{percent})"},__th:{badge_label:"ความสัมพันธ์",badge_significantly_correlated_one_driver:"มีความสัมพันธ์อย่างชัดเจนกับ %{column0} และ %{column1} (%{percent})",badge_strongly_correlated_one_driver:"มีความสัมพันธ์อย่างมากกับ %{column0} (%{percent})",badge_strongly_correlated_two_driver:"มีความสัมพันธ์อย่างมากกับ %{column0} และ %{column1} (%{percent})",badge_positively_correlated_one_driver:"มีความสัมพันธ์เชิงบวกกับ %{column0} (%{percent})",badge_positively_correlated_two_driver:"มีความสัมพันธ์เชิงบวกกับ %{column0} และ %{column1} (%{percent})",badge_correlated_one_driver:"มีความสัมพันธ์กับ %{column0} (%{percent})",badge_correlated_two_driver:"มีความสัมพันธ์กับ %{column0} และ %{column1} (%{percent})"},__tr:{badge_label:"Bağıntılar",badge_significantly_correlated_one_driver:"%{column0} ve %{column1} ile önemli ölçüde bağıntılı (%{percent})",badge_strongly_correlated_one_driver:"%{column0} ile güçlü şekilde bağıntılı (%{percent})",badge_strongly_correlated_two_driver:"%{column0} ve %{column1} ile güçlü şekilde bağıntılı (%{percent})",badge_positively_correlated_one_driver:"%{column0} ile pozitif şekilde bağıntılı (%{percent})",badge_positively_correlated_two_driver:"%{column0} ve %{column1} ile pozitif şekilde bağıntılı (%{percent})",badge_correlated_one_driver:"%{column0} ile bağıntılı(%{percent})",badge_correlated_two_driver:"%{column0} ve %{column1} ile bağıntılı (%{percent})"},__zh:{badge_label:"相关性",badge_significantly_correlated_one_driver:"与 %{column0} 和 %{column1} 显著相关 (%{percent})",badge_strongly_correlated_one_driver:"与 %{column0} 强相关 (%{percent})",badge_strongly_correlated_two_driver:"与 %{column0} 和 %{column1} 强相关 (%{percent})",badge_positively_correlated_one_driver:"与 %{column0} 正相关 (%{percent})",badge_positively_correlated_two_driver:"与 %{column0} 和 %{column1} 正相关 (%{percent})",badge_correlated_one_driver:"与 %{column0} 相关 (%{percent})",badge_correlated_two_driver:"与 %{column0} 和 %{column1} 相关 (%{percent})"},"__zh-cn":{badge_label:"相关性",badge_significantly_correlated_one_driver:"与 %{column0} 和 %{column1} 显著相关 (%{percent})",badge_strongly_correlated_one_driver:"与 %{column0} 强相关 (%{percent})",badge_strongly_correlated_two_driver:"与 %{column0} 和 %{column1} 强相关 (%{percent})",badge_positively_correlated_one_driver:"与 %{column0} 正相关 (%{percent})",badge_positively_correlated_two_driver:"与 %{column0} 和 %{column1} 正相关 (%{percent})",badge_correlated_one_driver:"与 %{column0} 相关 (%{percent})",badge_correlated_two_driver:"与 %{column0} 和 %{column1} 相关 (%{percent})"},"__zh-tw":{badge_label:"相關性",badge_significantly_correlated_one_driver:"與 %{column0} 及 %{column1} 顯著相關 (%{percent})",badge_strongly_correlated_one_driver:"與 %{column0} 強烈相關 (%{percent})",badge_strongly_correlated_two_driver:"與 %{column0} 及 %{column1} 強烈相關 (%{percent})",badge_positively_correlated_one_driver:"與 %{column0} 正面相關 (%{percent})",badge_positively_correlated_two_driver:"與 %{column0} 及 %{column1} 正面相關 (%{percent})",badge_correlated_one_driver:"與 %{column0} 相關 (%{percent})",badge_correlated_two_driver:"與 %{column0} 及 %{column1} 相關 (%{percent})"}};r.init=function(e){e||(e=window._i18n&&window._i18n.locale?window._i18n.locale:document.documentElement.lang?document.documentElement.lang:"root");var t=this["__"+e]||this.__root;if(t)for(var r in t)this[r]=t[r];for(var r in this.__root)void 0===this[r]&&(this[r]=this.__root[r])},r.init(),e.exports=r},475:function(e,t,r){"use strict";var o,n;o=[],void 0!==(n=function(){return function(){var e,t,r=new Promise(function(){e=arguments[0],t=arguments[1]});return{resolve:e,reject:t,promise:r}}}.apply(t,o))&&(e.exports=n)},476:function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=r(477),a=o(i),s=r(479),l=o(s),u=function(){function e(t,r){n(this,e),this.widgetApi=t,this.dashboardApi=r}return e.prototype.destroy=function(){var e=this.getQueryAPI();e&&e.removeUnprocessedResultDataHandler(this._resultDataHandler)},e.prototype.getAPI=function(){var e=this;return{activate:function(t){return e.activate(t)},deactivate:function(){return e.deactivate()},getInsights:function(){return e.getInsights()},getChartInsightsCalculations:function(){return e.chartInsightsQuery.getChartInsightsCalculationArray()},getNLTData:function(t,r){return e.chartInsightsQuery.getChartInsightsCalculationArray(r)}}},e.prototype.activate=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.widgetContentApi=e.widgetContentApi,this.chartInsightsQuery=new l.default(this.widgetContentApi,this.dashboardApi),this.cbChartInsightsUpdated=e.cbChartInsightsUpdated,this._resultDataHandler=this._addUnprocessedResultDataHandler(this.buildChartInsightsQuerySpecsFromUnprocessedData)},e.prototype.getQueryAPI=function(){var e=this.widgetApi.getVisApi();return e&&e.getQueryAPI()},e.prototype._addUnprocessedResultDataHandler=function(e){var t=this.getQueryAPI();return t&&t.addUnprocessedResultDataHandler(e.bind(this))},e.prototype.deactivate=function(){this.cbChartInsightsUpdated=void 0},e.prototype.setChartInsightsData=function(e){this.chartInsightsQuery.useFPDAsInsightsInput()||(this.chartInsightsData=e,this.cbChartInsightsUpdated&&this.cbChartInsightsUpdated()),this._addUnprocessedResultDataHandler(this.buildChartInsightsQuerySpecsFromUnprocessedData)},e.prototype.buildChartInsightsQuerySpecsFromUnprocessedData=function(e,t){this.chartInsightsQuery.useFPDAsInsightsInput()&&t&&"FPD"===t.type&&(this._setQuerySpecs(e),this.cbChartInsightsUpdated&&this.cbChartInsightsUpdated())},e.prototype._setQuerySpecs=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this._querySpecs=Array.isArray(e)?e:[e]},e.prototype.getInsights=function(){var e=this,t=function(){return{insights:arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]}};if(!this.chartInsightsQuery.chartInsightsQuerySupported())return Promise.resolve(t());var r=this.widgetContentApi.getFeature("state");return r.whenStatusChanges(r.STATUS.RENDERED).then(function(){return e.chartInsightsQuery.useFPDAsInsightsInput()?e.chartInsightsQuery.executeQuerySpecs(e._querySpecs):e.chartInsightsQuery.execute(e.chartInsightsData)}).then(function(e){return t(e)})},e.prototype.getExtraRenderSequenceSteps=function(){return[{id:"ChartInsights",module:a.default,dependencies:["data"],moduleOptions:{chartInsightsFeature:this}}]},e}();t.default=u},477:function(e,t,r){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=r(478),s=function(e){return e&&e.__esModule?e:{default:e}}(a),l=function(e){function t(){return o(this,t),n(this,e.apply(this,arguments))}return i(t,e),t.prototype.process=function(e){return e&&e.data&&(e.data.getResult||e.data.getDefaultQueryResult)&&this.chartInsightsFeature.setChartInsightsData(e.data),Promise.resolve(e)},t}(s.default);t.default=l},478:function(e,t,r){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var n=function(){function e(t,r){o(this,e),this.chartInsightsFeature=r.chartInsightsFeature,this.id=t.id,this.owner=t.owner,this.ownerWidget=t.ownerWidget,this.logger=t.logger,this.visAPI=t.visAPI,this.dashboardApi=t.dashboardApi,this._initializeStep=this.owner&&this.owner._initializeStep.bind(this.owner),this._isStepComplete=this.owner&&this.owner._isStepComplete.bind(this.owner),this._completeStep=this.owner&&this.owner._completeStep.bind(this.owner),this._logRenderContext=this.owner&&this.owner._logRenderContext.bind(this.owner),this.id&&this._initializeStep&&this._initializeStep(this.id)}return e.prototype.getRenderState=function(){return this.owner&&this.owner._renderState},e.prototype.clearError=function(){this.visAPI&&this.visAPI.visHelper.clearError()},e.prototype.showError=function(e,t){this.visAPI&&this.visAPI.visHelper&&this.visAPI.visHelper.showError(e,t)},e}();t.default=n},479:function(e,t,r){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var n=r(480),i=function(e){return e&&e.__esModule?e:{default:e}}(n),a=function(){function e(t,r){o(this,e),this.widgetContentApi=t,this.dashboardApi=r}return e.prototype.useFPDAsInsightsInput=function(){return this.widgetContentApi.getFeature("Visualization").getDefinition().getProperty("useFPDAsInsightsInput")},e.prototype.execute=function(e){var t=this.getChartInsightsQuerySpecs(e);return this.executeQuerySpecs(t)},e.prototype.executeQuerySpecs=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=[],o=this.dashboardApi.getFeature("SmartsService");return t.forEach(function(t){return r.push(e._runSmartsQuery(t,o))}),r.length>0?Promise.all(r).then(function(e){var t=[];return e.forEach(function(e){e.data&&e.data.insights&&(t=t.concat(e.data.insights))}),t}):Promise.resolve([])},e.prototype.getChartInsightsQuerySpecs=function(e){var t=this,r=[];return e&&e.getResult&&e.getQueryResultIdList().forEach(function(o){var n=e.getResult(o),i=n&&n.getPropertyValue("RawData.internal"),a=i&&JSON.parse(i),s=t._buildQuerySpecFromUnprocessedDSSResponse(a,o);s&&r.push(s)}),r},e.prototype.getChartInsightsQuerySpecsFromUnprocessedDSSResponse=function(e,t){var r=[],o=this._buildQuerySpecFromUnprocessedDSSResponse(e,t&&t.layerId);return o&&r.push(o),r},e.prototype._buildQuerySpecFromUnprocessedDSSResponse=function(e,t){if(e&&e.data&&t){var r={data:{data:e.data,dataItems:this._getExecutionDataItemsDef(e.dataItems),hasNext:e.hasNext,version:e.version},params:this._getChartInsightsDictionary(t,e.version)};return e.edges&&(delete r.data.dataItems,r.data.edges=e.edges),r}return null},e.prototype._runSmartsQuery=function(e,t){var r={url:"v1/predict/explorations/chart-insights",querySpec:e,sender:"getInsights"};return t.runQuery(r).catch(function(){return[]})},e.prototype._getExecutionDatapointsDef=function(e){return e&&e.map(function(e){return{pt:e.pt}})},e.prototype._getExecutionDataItemsDef=function(e){var t=this;return e&&e.map(function(e){return t._processResultDataItem(e)})},e.prototype._processResultDataItem=function(e){return e.itemClass.h.length>1?this._processNestedResultDataItem(e):e},e.prototype._processNestedResultDataItem=function(e){var t=this.widgetContentApi.getFeature("Visualization").getSlots();return t?{itemClass:{h:e.itemClass.h.map(function(e){return{id:t.getDataItemList().filter(function(t){return t.getId()===e.id})[0].getId(),u:e.u,d:e.d}}),id:e.itemClass.id},items:e.items}:e},e.prototype.chartInsightsQuerySupported=function(){return!(this.widgetContentApi.getFeature("Visualization").getDefinition().getProperty("noDataQuery")&&!this.useFPDAsInsightsInput())&&!!this.widgetContentApi.getFeature("Visualization").getSlots().getMappedSlotList().some(function(e){return e.getDefinition().getRole()})},e.prototype.getChartInsightsCalculationArray=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(this._buildRolesById(t),!this.chartInsightsQuerySupported())return t;if(this.useFPDAsInsightsInput())return[];var r={},o={},n=this.dashboardApi.getActiveDataSourceId(),a=this.widgetContentApi.getFeature("Visualization").getDataSource(n),s=this.widgetContentApi.getFeature("Visualization").getSlots().getMappingInfoList();s.forEach(function(t){t.slot.getDefinition().getDatasetIdList().forEach(function(n){o[n]=o[n]||new i.default(n);var s=e.roleById[t.dataItem.getId()]||t.slot.getDefinition().getRole(),l="response"===t.slot.getDefinition().getRole()?"response":s;o[n].addParam(t.slot,t.dataItem,!1,l,a)&&(r[t.dataItem.getId()]=1)})});var l=[];l=l.concat(t);for(var u in o)o[u].hasParams()&&l.push(o[u].getParams());return l=l.concat(this._addRowCountCalculationsForAverages(r,s,a))},e.prototype._addRowCountCalculationsForAverages=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments[1],r=arguments[2],o=[];return t.forEach(function(t){t.slot.getDefinition().getDatasetIdList().forEach(function(n){var a=new i.default(n),s=t.slot.getDefinition().getType(),l=t.dataItem.getType(),u=t.dataItem.getAggregation();if(("ordinal"===s||"fact"===l&&"any"===s)&&"avg"===u&&!e[t.dataItem.getId()]){var c=a.addDSSRowCountCalculation(t.slot,t.dataItem,r);c&&o.push(c)}})}),o},e.prototype._buildRolesById=function(e){var t=this;this.roleById={},e&&e.forEach(function(e){e.dataItems.forEach(function(r,o){t.roleById[r]=e.roles[o]})})},e.prototype._isMultiMeasureSlot=function(e){return!!e.getDataItemList().find(function(e){return"_multiMeasuresSeries"==e.getColumnId()})},e.prototype._getChartInsightsDictionary=function(e,t){var r=this,o=new i.default(e,t),n=this.widgetContentApi.getFeature("Visualization").getSlots().getMappingInfoList(),a=this.dashboardApi.getActiveDataSourceId(),s=this.widgetContentApi.getFeature("Visualization").getDataSource(a),l=this.dashboardApi.getFeature("DataSources.moser").getModule(a);return n.forEach(function(t){var n=t.slot;-1===n.getDefinition().getDatasetIdList().indexOf(e)||r._isMultiMeasureSlot(n)||o.addParam(t.slot,t.dataItem,!0,void 0,s,l)}),{dictionary:o.getParams()}},e}();t.default=a},480:function(e,t,r){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var n=function(){function e(t,r){o(this,e),this.datasetId=t,this.version=r,this.dataItems=[],this.dataItemLabels=[],this.roles=[],this.dataItemsTypes=[],this.moduleAssetId=null,this.isShapedModule=!1,this.tempModuleJSON=null}return e.prototype.addParam=function(e,t,r,o,n){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null;o=o||e.getDefinition().getRole();var a=!1;n&&n.isOlapPackage&&(a=n.isOlapPackage());var s=!!i&&!!i.getShapingId(),l=i&&i.getTemporarySessionModuleJSON(),u=r&&e.isStacked()?e.getDefinition().getId():t.getId();if(!r&&t.getMetadataColumn()&&t.getMetadataColumn().isOlapColumn(a))return!1;if("response"===o){if(r||!t.getBinning())return this.dataItems.push(u),this.dataItemLabels.push(t.getLabel()),this.dataItemsTypes.push(this._getDataItemType(t)),this.moduleAssetId=n&&n.getAssetId(),this.roles.push(o),!0}else if(r)return this.isShapedModule=s,this.dataItems.push(u),this.dataItemLabels.push(t.getLabel()),this.dataItemsTypes.push(this._getDataItemType(t)),this.moduleAssetId=n&&n.getAssetId(),this.roles.push(o),this.tempModuleJSON=l,!0;return!1},e.prototype.addDSSRowCountCalculation=function(e,t,r){return this.addParam(e,t,!1,"response",r)?this.getParams(["rowCount"]):null},e.prototype.hasParams=function(){return this.dataItems.length>0&&this.roles.length>0||!1},e.prototype._getDataItemType=function(e){var t=["datetime","time","date"],r=e.getMetadataColumn(),o=r&&r.getTaxonomyList(),n=e.getType();return t.indexOf(n)>-1||o&&o.length&&"cTime"===o[0].getClass()?"datetime":"attribute"===n?"categorical":"fact"===n?e.getBinning()?"categorical":"continuous":""},e.prototype.getParams=function(e){var t={shapedModule:this.isShapedModule,datasetId:this.datasetId,dataItems:this.dataItems,dataItemsTypes:this.dataItemsTypes,roles:this.roles,moduleAssetId:this.moduleAssetId,reqStats:e||["rowCount","sumSqr"],type:"chartInsights"};return this.isShapedModule&&(t.tempModule=JSON.stringify(this.tempModuleJSON)),"2"===this.version&&(t.dataItemLabels=this.dataItemLabels),t},e}();t.default=n},481:function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=r(482),a=o(i),s=r(483),l=o(s),u=r(484),c=o(u),d=r(490),p=o(d),h=function(){function e(t,r){n(this,e),this.widgetApi=t,this.dashboardApi=r,this.isNewQueryApiEnabled=this._isNewQueryApiEnabled(),this._activated=!1,this.measureIndexes={},this.rangePercent=5,this.viewCtrl=new c.default(this,t,r),this._featureTags=[]}return e.prototype.destroy=function(){this.viewCtrl.destroy(),this.viewCtrl=null},e.prototype._isNewQueryApiEnabled=function(){return!this.dashboardApi.getGlassCoreSvc(".FeatureChecker").checkValue("dashboard","queryApi","disabled")},e.prototype.getFeatureTags=function(){return this._featureTags},e.prototype.getAPI=function(){return{activate:this.activate.bind(this),deactivate:this.deactivate.bind(this),isActivated:this.isActivated.bind(this),isSupported:this.isSupported.bind(this),onDataStart:this.onDataStart.bind(this),onDataRow:this.onDataRow.bind(this),onDataDone:this.onDataDone.bind(this),getCrossHairMatchingPoints:this.getCrossHairMatchingPoints.bind(this),renderPopOver:this.renderPopOver.bind(this),getDataPoints:this.getDataPoints.bind(this),renderCrosshairs:this.renderCrosshairs.bind(this),getOptimalLineValue:this.getOptimalLineValue.bind(this)}},e.prototype.isSupported=function(){var e=this.widgetApi.getVisId();return["com.ibm.vis.rave2bundlearea","com.ibm.vis.rave2bundlebar","com.ibm.vis.rave2bundlecolumn","com.ibm.vis.rave2bundlestackedbar","com.ibm.vis.rave2bundlestackedcolumn","com.ibm.vis.rave2line","com.ibm.vis.rave2point","com.ibm.vis.rave2bundlewaterfall"].some(function(t){return t===e})},e.prototype.isActivated=function(){return this._activated},e.prototype.activate=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._activated=!0,this._featureTags=["ResultDataReaderPlugin"],this.viewCtrl.activate(e)},e.prototype.deactivate=function(){this._activated=!1,this.viewCtrl.deactivate()},e.prototype.onDataStart=function(e,t){var r=this;this.queryResultsData=e,this.minMaxCollector=new a.default,this.minMaxCollector.reset(),this.valueSlotMeasureCount=t.valueSlotMeasureCount,this.measureItemHeaders=t.measureItemHeaders,this.categoryItemHeaders=t.categoryItemHeaders,this.measureItemHeaders.forEach(function(e){r.measureIndexes[e.dataItemUniqueId]=new l.default(e.dataItemUniqueId)})},e.prototype.onDataRow=function(e){var t=this,r=[];this.measureItemHeaders.forEach(function(o){var n=t.minMaxCollector.getMinMaxEntry(o.dataItemUniqueId),i=t._getCellValue(t.queryResultsData,e+o.valueItemIndex,o.index)||0;t.minMaxCollector.updateMinMaxEntry(n,i),r.push({dataItemUniqueId:o.dataItemUniqueId,value:i})}),this._saveMeasureValuesForRow(e,r)},e.prototype.onDataDone=function(){},e.prototype.getCrossHairMatchingPoints=function(){var e;if(this.viewCtrl)return(e=this.viewCtrl).getCrossHairMatchingPoints.apply(e,arguments)},e.prototype.renderPopOver=function(){var e;if(this.viewCtrl)return(e=this.viewCtrl).renderPopOver.apply(e,arguments)},e.prototype.getDataPoints=function(e,t){var r=[],o=this.measureIndexes[e],n=this.minMaxCollector.getMinMaxEntry(e);if(!o||!n)return r;var i=(n.maxUse-n.minUse)*(this.rangePercent/100);return o.getEntries(t,i)},e.prototype.getRowTuple=function(e){var t=this,r=[];return this.categoryItemHeaders.columnIndexes.forEach(function(o){r=r.concat(t._getCellValueObject(t.queryResultsData,e,o))}),r},e.prototype._getCellValueObject=function(e,t,r){return this.isNewQueryApiEnabled?e.getValue(t,r):e.getCellValue(t,r)},e.prototype._getCellValue=function(e,t,r){var o=this._getCellValueObject(e,t,r);return this.isNewQueryApiEnabled?o&&o.getValue?o.getValue():o.value:o&&o.getValue?o.getValue():o.v},e.prototype.getItemValue=function(e,t){return this.measureIndexes[t]&&this.measureIndexes[t].getValue(e)},e.prototype._saveMeasureValuesForRow=function(e,t){var r=this;this.measureIndexes&&t.forEach(function(t){r.measureIndexes[t.dataItemUniqueId].add(e,t.value)})},e.prototype.getItemToDecorate=function(){var e=this.dashboardApi.getCanvas().getContent(this.widgetApi.getId()),t=e.getFeature("Visualization").getSlots().getMappingInfoList(),r=t.find(function(e){return"ordinal"===e.slot.getDefinition().getType()});if(r){return{itemIndex:e.getFeature("Visualization").getSlots().getMappedSlotList().findIndex(function(e){return"ordinal"===e.getDefinition().getType()}),sourceItemUniqueId:r.dataItem.getId(),itemId:r.dataItem.getColumnId(),format:r.dataItem.getFormat()}}},e.prototype.getExtraRenderSequenceSteps=function(){return[{id:"renderVisCrosshairs",dependencies:["render"],module:p.default,moduleOptions:{visCrosshairFeature:this}}]},e.prototype.getOptimalLineValue=function(){var e=this.getItemToDecorate(),t=this.viewCtrl.getPreviousValue(),r=void 0;if(e){var o=e.sourceItemUniqueId;if(this.minMaxCollector&&this.minMaxCollector.minMaxTable&&this.minMaxCollector.minMaxTable[o]){var n=this.minMaxCollector.minMaxTable[o];r=(t||0===t)&&t<=n.maxUse&&t>=n.minUse?t:(n.maxUse+n.minUse)/2}}return r},e.prototype.renderCrosshairs=function(e){if(!this.viewCtrl)return Promise.resolve();var t=e;return e||0===e||(t=this.getOptimalLineValue()),this.isSupported()&&this.isActivated()?this.viewCtrl.renderCrosshairs(t):(this.viewCtrl.clearCrosshairs(),void this.viewCtrl.setPreviousValue(t))},e}();t.default=h},482:function(e,t,r){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var n=function(){function e(){o(this,e),this.minMaxTable={}}return e.prototype.reset=function(){this.minMaxTable={}},e.prototype.getMinMaxEntry=function(e){return this.minMaxTable[e]||this._initializeMinMaxEntry(e),this.minMaxTable[e]},e.prototype.updateMinMaxEntry=function(e,t){(void 0===e.maxUse||e.maxUse<t)&&(e.maxUse=t),(void 0===e.minUse||e.minUse>t)&&(e.minUse=t)},e.prototype._initializeMinMaxEntry=function(e){this.minMaxTable[e]={dataItemUniqueId:e}},e}();t.default=n},483:function(e,t,r){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var n=function(){function e(t){o(this,e),this.measureDataItemUniqueId=t,this.measureIndex=[]}return e.prototype.reset=function(){this.measureIndex=[]},e.prototype.getValue=function(e){return this.measureIndex[e]&&this.measureIndex[e].v},e.prototype.getEntries=function(e,t){var r=e-t/2,o=e+t/2;return this.measureIndex.filter(function(e){return e.v>=r&&e.v<=o})},e.prototype.add=function(e,t){this.measureIndex.push({v:t,r:e})},e}();t.default=n},484:function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=r(117),a=o(i),s=r(486),l=o(s),u=r(0),c=o(u),d=r(17),p=o(d),h=function(){function e(t,r,o){n(this,e),this.widgetApi=r,this.dashboardApi=o,this.feature=t,this._onMoveCrosshairsHandlers=[],this._widgetApiOnMoveListener=null}return e.prototype.getIsNewCompareLineEnabled=function(){return!this.dashboardApi.getGlassCoreSvc(".FeatureChecker").checkValue("explore","newCompareLine","false")},e.prototype.activate=function(e){e&&this._onMoveCrosshairsHandlers.push(e.cbOnMoveCrosshairs),this._widgetApiOnMoveListener||(this._widgetApiOnMoveListener=this.widgetApi.on("visevent:onmove",this.onMove,this))},e.prototype.deactivate=function(){return this._widgetApiOnMoveListener&&(this._widgetApiOnMoveListener.remove(),this._widgetApiOnMoveListener=null),this.clearCrosshairs()},e.prototype.destroy=function(){this._onMoveCrosshairsHandlers=[],this.deactivate()},e.prototype.onMove=function(e){return this._onMove(e.event,e.target,e.items,e.mouseDown||e.onHold)},e.prototype._onMove=function(e,t,r,o){var n=this;this._isDragging=!!o&&this._isDragging;var i=this._isDragging;if(o&&!this._isDragging){!function e(t,r){return t&&(r(t)?t:e(t.parentNode,r))}(e.target,function(e){var t=e.getAttribute&&e.getAttribute("class");return i=i||t&&t.indexOf("lineDecorations")>-1})}var a=!this.getIsNewCompareLineEnabled()||i;if(t&&t.getValuesAtPoint&&a){this._isDragging=!0;var s=t.getValuesAtPoint(e,3),l=s&&s.find(function(e){return"cont"===e.type});if(l&&l.value){var u=l.value;return this._onMoveCrosshairsHandlers.forEach(function(e){e({widgetApi:n.widgetApi,value:u,mouseDown:o})}),this.feature.renderCrosshairs(u)}}return Promise.resolve({})},e.prototype.renderCrosshairs=function(e){var t=this,r=this.widgetApi.getVisApi().getDecoratorAPIs();return r&&r.length?(r.forEach(function(r){t._decorateDataPointsNearCrosshairs(r,e)}),r[0].updateDecorations()):Promise.resolve({})},e.prototype.clearCrosshairs=function(){var e=this,t=null,r=this.widgetApi.getVisApi().getDecoratorAPIs();if(!r||!r.length)return Promise.resolve({});var o=this.feature.getItemToDecorate();return o&&void 0!==this._prevValue&&r.forEach(function(r){t=e._decoratePoints(r,o,e._prevValue,!1),e.getIsNewCompareLineEnabled()?r.decorateItem(o.itemIndex,"lines",null):r.decorateItem(o.itemIndex,"compareLine",null)}),t?r[0].updateDecorations():Promise.resolve({})},e.prototype.getPreviousValue=function(){return this._prevValue},e.prototype.setPreviousValue=function(e){this._prevValue=e},e.prototype._decorateDataPointsNearCrosshairs=function(e,t){t=t||0;var r=this.feature.getItemToDecorate(),o=null,n=null;if(r)if(this._prevValue&&(o=this._decoratePoints(e,r,this._prevValue,!1)),n=this._decoratePoints(e,r,t,!0),this.getIsNewCompareLineEnabled()){var i=this.widgetApi.getVisApi().getFormatter(),a=r.format,s=a?i.format(t,a):(Math.round(100*t)/100).toString();e.decorateItem(r.itemIndex,"lines",{baseLine:{position:t,color:"#C0BFC0"},grabber:{positionType:"BEGIN"},vane:{caption:s}})}else{var l=this._buildCompareLineSpec(r,n,t);e.decorateItem(r.itemIndex,"compareLine",JSON.stringify(l))}return this._prevValue=t,o||n},e.prototype._buildCompareLineSpec=function(e,t,r){var o={value:r,captions:this._buildLineCaptions(e,t),lineColor:"#C0BFC0",lineStrokeWidth:"1px"};return t.length>4&&(o.footer=a.default.get("n1_of_n2_items",{n1:o.captions.length,n2:t.length})),o},e.prototype._buildLineCaptions=function(e,t){var r=this,o=[],n=[];if(t&&t.length){var i=this.widgetApi.getVisApi().getFormatter(),a=e.format&&e.format.formatSpec;o=t.length<=4?t:t.slice(0,3),o.forEach(function(t){var o=r.feature.getItemValue(t.r,e.sourceItemUniqueId);n.push(r._addCaption(t.r,o,i,a))})}return n},e.prototype.getCrossHairMatchingPoints=function(e){var t=this,r=this.feature.getItemToDecorate(),o=this.widgetApi.getVisApi().getDecoratorAPIs(),n=null,i=[],a=[];if(!o||!o.length)return a;if(r&&(n=this._decoratePoints(o[0],r,e,!0)),n&&n.length){var s=this.widgetApi.getVisApi().getFormatter(),l=r.format;i=n,i.forEach(function(e){var o=t.feature.getItemValue(e.r,r.sourceItemUniqueId);a.push(t._addCaption(e.r,o,s,l))})}return a},e.prototype.renderPopOver=function(e,t,r,o,n){t&&p.default.render(c.default.createElement(l.default,{crossHairInfo:e,totalItems:r,footerInfo:o,containerNode:n}),t)},e.prototype._addCaption=function(e,t,r,o){var n=this.feature.getRowTuple(e),i=n&&n.map(function(e){return e.d})||[],a=o?r.format(t,o):t;return[i.join(" | "),a]},e.prototype._decoratePoints=function(e,t,r,o){var n=this.feature.getDataPoints(t.sourceItemUniqueId,r);return n.forEach(function(t){e.decoratePoint(t.r,"highlighted",o)}),n},e}();t.default=h},485:function(e,t){var r={__root:{n1_of_n2_items:"%{n1} of %{n2} items"},__cs:{n1_of_n2_items:"%{n1} z %{n2} položek"},__da:{n1_of_n2_items:"%{n1} af %{n2} elementer"},__de:{n1_of_n2_items:"%{n1} von %{n2} Elementen"},__es:{n1_of_n2_items:"%{n1} de %{n2} elementos"},__fi:{n1_of_n2_items:"%{n1} / %{n2} kohdetta"},__fr:{n1_of_n2_items:"%{n1} sur %{n2} éléments"},__hr:{n1_of_n2_items:"%{n1} od %{n2} stavki"},__hu:{n1_of_n2_items:"%{n1} / %{n2} elem"},__it:{n1_of_n2_items:"%{n1} di %{n2} elementi"},__ja:{n1_of_n2_items:"%{n2} 個のアイテム中 %{n1} 個"},__kk:{n1_of_n2_items:"%{n2} элементтің %{n1}"},__ko:{n1_of_n2_items:"%{n2}개 중 %{n1}개의 항목"},__nb:{n1_of_n2_items:"%{n1} av %{n2} elementer"},__nl:{n1_of_n2_items:"%{n1} van %{n2} items"},__pl:{n1_of_n2_items:"%{n1} z %{n2} elementów"},"__pt-br":{n1_of_n2_items:"%{n1} de %{n2} itens"},__ro:{n1_of_n2_items:"%{n1} din %{n2} articole"},__ru:{n1_of_n2_items:"%{n1} из %{n2} элементов"},__sl:{n1_of_n2_items:"%{n1} od %{n2} postavk"},__sv:{n1_of_n2_items:"%{n1} av %{n2} objekt"},__th:{n1_of_n2_items:"%{n1} จาก %{n2} รายการ"},__tr:{n1_of_n2_items:"%{n1} / %{n2} öğe"},__zh:{n1_of_n2_items:"第 %{n1} 项(共 %{n2} 项)"},"__zh-cn":{n1_of_n2_items:"第 %{n1} 项(共 %{n2} 项)"},"__zh-tw":{n1_of_n2_items:"%{n1} / %{n2} 個項目"}};r.init=function(e){e||(e=window._i18n&&window._i18n.locale?window._i18n.locale:document.documentElement.lang?document.documentElement.lang:"root");var t=this["__"+e]||this.__root;if(t)for(var r in t)this[r]=t[r];for(var r in this.__root)void 0===this[r]&&(this[r]=this.__root[r])},r.init(),e.exports=r},486:function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s,l=r(0),u=o(l),c=r(9),d=o(c),p=r(6),h=r(487),g=o(h),m=r(5),f=r(117),_=o(f);r(488);var v=["ArrowUp","ArrowDown","ArrowRight","ArrowLeft"],y=(0,m.observer)(s=function(e){function t(r){n(this,t);var o=i(this,e.call(this,r));return o.mouseDown=function(e){o.onMouseDown(e)},o.mouseUp=function(e){o.onMouseUp(e)},o.mouseMove=function(e){o.onMouseMove(e)},o.mouseLeave=function(e){o.onMouseLeave(e)},o.touchStart=function(e){o.onTouchStart(e)},o.touchMove=function(e){o.onTouchMove(e)},o.touchEnd=function(e){o.onTouchEnd(e)},o.resizeStartMouse=function(e){o.onResizeStart(e)},o.resizeMoveMouse=function(e){o.onResizeMove(e)},o.resizeStopMouse=function(e){o.onResizeStop(e)},o.resizeStartTouch=function(e){o.onTouchResizeStart(e)},o.resizeMoveTouch=function(e){o.onTouchResizeMove(e)},o.resizeStopTouch=function(e){o.onTouchResizeStop(e)},o.onKeySelect=function(e){o.onKeyDown(e)},o.state={x:0,y:0,dragging:!1,resizing:!1,footerItemsVisible:2},o.footerHeight=o.props.footerInfo.footerHeight,o.containerNode=o.props.containerNode,o.popover=u.default.createRef(),o.handle=u.default.createRef(),o.crossHairInfo=u.default.createRef(),o}return a(t,e),t.prototype.onStart=function(e){this.element=this.popover.current;var t=this.element.getBoundingClientRect();this.setState({x:e.pageX,y:e.pageY,relX:e.pageX-t.left,relY:e.pageY-t.top})},t.prototype.onMouseDown=function(e){0===e.button&&(this.setState({dragging:!0}),this.onStart(e),this.containerNode&&this.containerNode.addEventListener("mousemove",this.mouseMove),this.containerNode&&this.containerNode.addEventListener("mouseup",this.mouseUp),this.containerNode&&this.containerNode.addEventListener("mouseleave",this.mouseLeave),e.preventDefault())},t.prototype.onMouseUp=function(e){this.setState({dragging:!1}),this.containerNode&&this.containerNode.removeEventListener("mousemove",this.mouseMove),this.containerNode&&this.containerNode.removeEventListener("mouseup",this.mouseUp),this.containerNode&&this.containerNode.removeEventListener("mouseleave",this.mouseLeave),e.preventDefault()},t.prototype.onMouseMove=function(e){this.state.dragging&&(this.onMove(e),e.preventDefault())},t.prototype.onMouseLeave=function(e){this.onMouseUp(e),e.preventDefault()},t.prototype.onMove=function(e){var t=e.pageX,r=e.pageY,o=t-this.state.x,n=r-this.state.y;if(t!==this.state.x||r!==this.state.y){this.setState({x:t,y:r});var i=this.element;this._isBound(i,o,n)&&(i.style.left=i.offsetLeft+o+"px",i.style.top=i.offsetTop+n+"px")}},t.prototype.onTouchStart=function(e){this.setState({dragging:!0}),this.onStart(e.touches[0]),this.containerNode&&this.containerNode.addEventListener("touchmove",this.touchMove),this.containerNode&&this.containerNode.addEventListener("touchend",this.touchEnd),e.preventDefault()},t.prototype.onTouchMove=function(e){this.state.dragging&&(this.onMove(e.touches[0]),e.preventDefault(),e.stopPropagation())},t.prototype.onTouchEnd=function(e){this.setState({dragging:!1}),this.containerNode&&this.containerNode.removeEventListener("touchmove",this.touchMove),this.containerNode&&this.containerNode.removeEventListener("touchend",this.touchEnd),e.preventDefault()},t.prototype.onResizeStart=function(e){0===e.button&&(this.setState({resizing:!0}),this.onStart(e),this.containerNode&&this.containerNode.addEventListener("mousemove",this.resizeMoveMouse),this.containerNode&&this.containerNode.addEventListener("mouseup",this.resizeStopMouse),this.containerNode&&this.containerNode.addEventListener("mouseleave",this.resizeStopMouse),e.preventDefault(),e.stopPropagation())},t.prototype.onResizeMove=function(e){this.resizeBox(e,!1)},t.prototype.resizeBox=function(e,t){var r=t?e.touches[0]:e;if(this.state.resizing){var o=this.crossHairInfo,n=this.element,i=r.pageX,a=r.pageY,s=i-this.state.x,l=a-this.state.y,u=s-2,c=l-2;i===this.state.x&&a===this.state.y||(this.setState({x:i,y:a}),this._isBoundDuringResize(n,u,c)&&(n.style.width=n.offsetWidth+u+"px",n.style.height=n.offsetHeight+c+"px",o.current.style.height=n.offsetHeight-(18+this.footerHeight+2)+"px",this.props.footerInfo.showFooter&&this._calculateVisibleItemsOnResize())),e.preventDefault()}},t.prototype.onResizeStop=function(e){this.setState({resizing:!1}),this.containerNode&&this.containerNode.removeEventListener("mousemove",this.resizeMoveMouse),this.containerNode&&this.containerNode.removeEventListener("mouseup",this.resizeStopMouse),this.containerNode&&this.containerNode.removeEventListener("mouseleave",this.resizeStopMouse),e.preventDefault()},t.prototype.onTouchResizeStart=function(e){this.setState({resizing:!0}),this.onStart(e.touches[0]),this.containerNode&&this.containerNode.addEventListener("touchmove",this.resizeMoveTouch,{passive:!1}),this.containerNode&&this.containerNode.addEventListener("touchend",this.resizeStopTouch,{passive:!1}),e.preventDefault(),e.stopPropagation()},t.prototype.onTouchResizeMove=function(e){this.resizeBox(e,!0)},t.prototype.onTouchResizeStop=function(e){this.setState({resizing:!1}),this.containerNode&&this.containerNode.removeEventListener("touchmove",this.resizeMoveTouch,{passive:!1}),this.containerNode&&this.containerNode.removeEventListener("touchend",this.resizeStopTouch,{passive:!1}),e.preventDefault()},t.prototype.onKeyDown=function(e){var t=this.element?this.element:this.popover.current,r=this.crossHairInfo;switch(e.key){case"ArrowUp":e.shiftKey?this._isBoundDuringResize(t,0,-7)&&(t.style.height=t.offsetHeight+-7+"px"):this._isBound(t,0,-5)&&(t.style.top=t.offsetTop-5+"px");break;case"ArrowDown":e.shiftKey?this._isBoundDuringResize(t,0,-7)&&(t.style.height=t.offsetHeight+3+"px"):this._isBound(t,0,5)&&(t.style.top=t.offsetTop+5+"px");break;case"ArrowRight":e.shiftKey?this._isBoundDuringResize(t,0,-7)&&(t.style.width=t.offsetWidth+3+"px"):this._isBound(t,5,0)&&(t.style.left=t.offsetLeft+5+"px");break;case"ArrowLeft":e.shiftKey?this._isBoundDuringResize(t,0,-7)&&(t.style.width=t.offsetWidth+-7+"px"):this._isBound(t,-5,0)&&(t.style.left=t.offsetLeft-5+"px")}-1!==v.indexOf(e.key)&&e.shiftKey&&(r.current.style.height=t.offsetHeight-(18+this.footerHeight+2)+"px",this.props.footerInfo.showFooter&&this._calculateVisibleItemsOnResize()),e.preventDefault(),e.stopPropagation()},t.prototype._parentResize=function(){var e=this.element?this.element:this.popover.current,t=this.containerNode?this.containerNode.offsetWidth:0,r=this.containerNode?this.containerNode.offsetHeight:0,o=e.offsetLeft+e.offsetWidth,n=e.offsetTop+e.offsetHeight;o>t&&(e.style.left=Math.max(t-e.offsetWidth,0)+"px"),n>r&&(e.style.top=Math.max(r-e.offsetHeight,0)+"px")},t.prototype._isBound=function(e,t,r){var o=this._getDimensions(e,t,r),n=o.elementLeft>=0&&o.elementRight-2<=o.parentWidth,i=o.elementTop>=0&&o.elementBottom-2<=o.parentHeight;return n&&i},t.prototype._isBoundDuringResize=function(e,t,r){var o=this._getDimensions(e,t,r),n=o.elementRight-2<=o.parentWidth,i=o.elementBottom-2<=o.parentHeight;return n&&i},t.prototype._getDimensions=function(e,t,r){var o=this.containerNode&&this.containerNode.offsetWidth,n=this.containerNode&&this.containerNode.offsetHeight,i=e.offsetLeft+t,a=i+e.offsetWidth,s=e.offsetTop+r;return{parentWidth:o,parentHeight:n,elementLeft:i,elementRight:a,elementTop:s,elementBottom:s+e.offsetHeight}},t.prototype._calculateVisibleItemsOnResize=function(){var e=this.popover&&this.popover.current.offsetHeight,t=Math.round(Math.abs(e-(18+this.footerHeight))/this.footerHeight);this.setState({footerItemsVisible:t})},t.prototype.render=function(){return this.popover&&this.popover.current&&this._parentResize(),u.default.createElement("div",{draggable:"true",tabIndex:"0",className:"vis_crosshair_popover resizabe",autoFocus:!0,ref:this.popover,onMouseDown:this.mouseDown,onTouchStart:this.touchStart,onKeyDown:this.onKeySelect},u.default.createElement("div",{className:"dragHandle",tabIndex:"0",ref:this.handle},u.default.createElement(p.SVGIcon,{className:"dragIcon",iconId:g.default.id})),u.default.createElement("div",{className:"crossHairInfo",ref:this.crossHairInfo,onTouchMove:function(e){return e.stopPropagation()}},this.props.crossHairInfo),this.props.footerInfo.showFooter&&this.props.totalItems>2&&this.state.footerItemsVisible<=this.props.totalItems&&u.default.createElement("div",{className:"footerNotes"},_.default.get("n1_of_n2_items",{n1:this.state.footerItemsVisible,n2:this.props.totalItems})),u.default.createElement("div",{className:"resize",onMouseDown:this.resizeStartMouse,onTouchStart:this.resizeStartTouch}))},t}(l.Component))||s;y.propTypes={crossHairInfo:d.default.object,totalItems:d.default.number,footerInfo:d.default.object,containerNode:d.default.object},y.defaultProps={crossHairInfo:u.default.createElement("div",null),totalItems:0,footerInfo:{},containerNode:u.default.createElement("div",null)},t.default=y},487:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=r(12),n=r.n(o),i=r(13),a=r.n(i),s=new n.a({id:"handle_24",use:"handle_24-usage",viewBox:"0 0 24 24",content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="handle_24"><path d="M9.8 22.5H8.2v-21h1.5v21zm6-21h-1.5v21h1.5v-21z" /></symbol>'});a.a.add(s);t.default=s},488:function(e,t,r){var o=r(489);"string"==typeof o&&(o=[[e.i,o,""]]);var n={hmr:!0};n.transform=void 0;r(4)(o,n);o.locals&&(e.exports=o.locals)},489:function(e,t,r){t=e.exports=r(3)(!1),t.push([e.i,"/*\n *+------------------------------------------------------------------------+\n *| Licensed Materials - Property of IBM\n *| IBM Cognos Products: Explore\n *| (C) Copyright IBM Corp. 2019\n *|\n *| US Government Users Restricted Rights - Use, duplication or disclosure\n *| restricted by GSA ADP Schedule Contract with IBM Corp.\n *+------------------------------------------------------------------------+\n */\n\n.vis_crosshair_popover {\n width: 25%;\n height: 12%;\n min-width: 130px;\n min-height: 68px;\n max-width: 100%;\n max-height: 100%;\n top: 10%;\n left: 1%;\n z-index: 550;\n position: absolute;\n background-color: white;\n border-style: solid;\n border-width: 1px;\n border-color: #eaeaea;\n white-space: pre;\n -ms-touch-action: none;\n touch-action: none;\n overflow-y: hidden;\n overflow-x: hidden;\n cursor: move;\n box-shadow: -2px 3px 5px 0px rgba(130, 125, 125, 0.75);\n}\n\n.vis_crosshair_popover .dragHandle {\n background-color: #eaeaea;\n height: 10px;\n}\n\n.vis_crosshair_popover .dragHandle .dragIcon {\n position: relative;\n left: 50%;\n bottom: 85%;\n width: 8px;\n height: 14px;\n transform: rotate(90deg);\n}\n\n.vis_crosshair_popover .resize {\n width: 20px;\n height: 20px;\n position: absolute;\n right: 0;\n bottom: 0;\n -ms-touch-action: none;\n touch-action: none;\n cursor: se-resize;\n}\n\n.vis_crosshair_popover .crossHairInfo {\n height: 50%;\n display: -ms-flexbox;\n display: flex;\n overflow: auto;\n padding-top: 8px;\n}\n\n.vis_crosshair_popover .footerNotes {\n font-size: 12px;\n text-align: center;\n}\n\n",""])},490:function(e,t,r){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var n=function(){function e(t,r){o(this,e),this.crosshairFeature=r.visCrosshairFeature,this.id=t.id,this.owner=t.owner,this.visAPI=t.visAPI,this._initializeStep=this.owner._initializeStep.bind(this.owner),this._isStepComplete=this.owner._isStepComplete.bind(this.owner),this._completeStep=this.owner._completeStep.bind(this.owner),this._logRenderContext=this.owner._logRenderContext.bind(this.owner),this.id&&this._initializeStep(this.id)}return e.prototype.getRenderState=function(){return this.owner._renderState},e.prototype.clearError=function(){this.visAPI.visHelper.clearError()},e.prototype.showError=function(e,t){this.visAPI.visHelper.showError(e,t)},e.prototype.process=function(e){return this._isStepComplete(e,"renderVisCrosshairs")?Promise.resolve(e):(this.crosshairFeature.isActivated()&&this.crosshairFeature.renderCrosshairs(),Promise.resolve(!0))},e}();t.default=n},491:function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=r(492),l=o(s),u=r(118),c=o(u),d=r(119),p=o(d),h=r(493),g=o(h),m=r(494),f=o(m),_=r(495),v=o(_),y=function(){function e(t,r){n(this,e),this.widgetApi=t,this.dashboardApi=r,this.logger=r.getDashboardCoreSvc("Logger"),this.resultDataReaderPlugin=!0,this._activated=!1,this.overallSummaryValueQuery=new l.default(this.widgetApi,this.dashboardApi,this.logger),this.filteredSummaryValueQuery=new c.default(this.widgetApi,this.dashboardApi,this.logger,this.getRowTuples.bind(this)),this.hostAPI=new g.default(this,t,r),this.combinedSummaryValidator=new f.default(t,r,this.logger),this.hasResultData=!1,this.rowCountCalcs={},this.isNewQueryApiEnabled=this._isNewQueryApiEnabled(),this.firstRowDepths=[],this.isExpandCollapseEnabled=this._isExpandCollapseEnabled(),this.hasOlapColumns=!1}return e.prototype.destroy=function(){this.deactivate()},e.prototype._isNewQueryApiEnabled=function(){return!this.dashboardApi.getGlassCoreSvc(".FeatureChecker").checkValue("dashboard","queryApi","disabled")},e.prototype._isExpandCollapseEnabled=function(){return this.dashboardApi.getGlassCoreSvc(".FeatureChecker").checkValue("dashboard","expandCollapse","enabled")},e.prototype.setActivated=function(e){this._activated=e},e.prototype.isActivated=function(){return this._activated},e.prototype._isSupported=function(){var e=!0;if(this.widgetApi&&this.widgetApi.getVisApi()){var t=this.widgetApi.getVisApi().getDefinition();t&&t.noDataQuery&&(e=!1)}return e},e.prototype.getAPI=function(){return{isActivated:this.isActivated.bind(this),setActivated:this.setActivated.bind(this),getSummaryCollector:this.getSummaryCollector.bind(this),getSelectionSummaryCollector:this.getSelectionSummaryCollector.bind(this),onNewResults:this.onNewResults.bind(this),onDataStart:this.onDataStart.bind(this),onDataRow:this.onDataRow.bind(this),onDataDone:this.onDataDone.bind(this),activate:this.activate.bind(this),getCombinedSummaryValidator:this.getCombinedSummaryValidator.bind(this),createCombinedSummaryValueQuery:this.createCombinedSummaryValueQuery.bind(this)}},e.prototype.activate=function(e){return this.widgetApi.on("visevent:selectionchanged",this.recalculateSelectionData,this),this.overallSummaryValueQuery.activate(),this.filteredSummaryValueQuery.activate(),this.cbDeactivate=e.cbDeactivate,this.queryAPI=this.widgetApi.getVisApi()&&this.widgetApi.getVisApi().getQueryAPI(),this.queryAPI&&(this._resultDataHandler=this.queryAPI.addUnprocessedResultDataHandler(this.processDetailRowCountCalculations.bind(this))),this.hostAPI.activate(e)},e.prototype.deactivate=function(){this.isActivated()&&(this.widgetApi.off("visevent:selectionchanged",this.recalculateSelectionData,this),this.cbDeactivate&&this.cbDeactivate()),this.overallSummaryValueQuery.deactivate(),this.filteredSummaryValueQuery.deactivate(),this.queryAPI&&this.queryAPI.removeUnprocessedResultDataHandler(this.processDetailRowCountCalculations.bind(this)),this.setActivated(!1)},e.prototype.getFeatureTags=function(){return this._activated?["ResultDataReaderPlugin"]:[]},e.prototype.getCombinedSummaryValidator=function(){return this.combinedSummaryValidator},e.prototype.createCombinedSummaryValueQuery=function(e,t){return new v.default(e,this.dashboardApi,this.logger,t)},e.prototype.getSummaryCollector=function(){return this.summaryCollector=this.summaryCollector||new p.default(this.dashboardApi,this.widgetApi,!1),this.summaryCollector},e.prototype.getSelectionSummaryCollector=function(){return this.selectionSummaryCollector=this.selectionSummaryCollector||new p.default(this.dashboardApi,this.widgetApi,!0),this.selectionSummaryCollector},e.prototype.processDetailRowCountCalculations=function(e,t){var r=this,o=this.widgetApi.getVisualization(),n=t.layerId;if(this.cachedRowCounts={},this.rowCountCalcs[n]=this._buildRowCountCalculationsMap(e,n,o),Object.keys(this.rowCountCalcs[n]).length){o.getSlots().getSlotList().find(function(e){return r._isMultiMeasuresValueSlot(e)})&&Object.keys(this.rowCountCalcs[n]).forEach(function(t){r.cachedRowCounts[t]=[];for(var o=0;o<e.data.length;++o){var i=r.rowCountCalcs[n][t],a=e.data[o].pt,s=a[i];r.cachedRowCounts[t].push(s&&s.v)}})}},e.prototype._isMultiMeasuresValueSlot=function(e){return e.getDefinition().isMultiMeasureSupported()&&e.getDataItemList().length>1},e.prototype.recalculateSelectionData=function(){var e=this;this.queryResultDataByLayer&&this.rowHeadersByLayer&&(Object.keys(this.rowHeadersByLayer).forEach(function(t){var r=e.queryResultDataByLayer[t],o=e.rowHeadersByLayer[t];if(o&&r){var n=e._getRowCount(r);e.onDataStart(r,o);for(var i=0;i<n;i+=o.valueSlotMeasureCount)e.onDataRow(i);e.updateLastCategorySelected(),e.filteredSummaryValueQuery.execute(e.selectionSummaryCollector).then(function(){e.hostAPI.updateSelectionSummaries()})}}),this._forceRecalculateSelections=!1)},e.prototype.getSelectedContent=function(){return this.dashboardApi.getCanvas().getContent(this.widgetApi.getId())},e.prototype.updateLastCategorySelected=function(){var e=this.getSelectedContent(),t=e.getFeature("InteractivityController.deprecated"),r=t.getSelectedTuples(this.categoryItemHeaders.itemIds);if(r&&r.length){var o=this.findLastSelectedTupleInVisualization(r);o&&this._setLastSelectedTuple(o)}},e.prototype._setLastSelectedTuple=function(e){Array.isArray(e)?this.selectionSummaryCollector.setLastCategorySelection(e.map(function(e){return e?e.d:e})):this.selectionSummaryCollector.setLastCategorySelection([e?e.d:e])},e.prototype.findLastSelectedTupleInVisualization=function(e){for(var t=e.length-1;t>=0;--t)if(this.selectionSummaryCollector.isTupleInSelectionSummary(e[t]))return e[t];return null},e.prototype.onNewResults=function(e){var t=this;this.rowHeadersByLayer={},this.queryResultDataByLayer={},this.queryResultData=null;var r=Promise.resolve({}),o=this._getResultHasData(e);return this._isSupported()?(this._resetSummaryCollectors(),this.hasResultData&&!o&&(r=this.hostAPI.updateSummaries().then(function(){t.selectionSummaryCollector.setLastCategorySelection([]),t.hostAPI.updateSelectionSummaries()})),this.hasResultData=!!o,this.isNewQueryApiEnabled&&e.getQueryResultIdList&&e.getQueryResultIdList().forEach(function(r){var o=e.getResult(r),n=o&&o.getPropertyValue("RawData.internal"),i=n&&JSON.parse(n);t.processDetailRowCountCalculations(i,{layerId:r})}),r||Promise.resolve(!0)):r},e.prototype.onDataStart=function(e,t){var r=this;this.visAPI=this.widgetApi.getVisApi(),this.activeLayerId=t.layerId,this.queryResultDataByLayer=this.queryResultDataByLayer||{},this.rowHeadersByLayer=this.rowHeadersByLayer||{},this.queryResultDataByLayer[t.layerId]=e,this.rowHeadersByLayer[t.layerId]=t,this.queryResultData=e,this.isWaterfallStack="com.ibm.vis.rave2bundlewaterfall"===this.visAPI.getVisId(),this.widgetContentApi=this.dashboardApi.getCanvas().getContent(this.widgetApi.getId());var o=this.widgetContentApi.getFeature("Visualization").getSlots().getMappedSlotList().find(function(e){return r.isWaterfallStack?e:e.getDefinition().getProperty("stackValuesOnAxis")});this.stackedMultiMeasures=!(!o||!this._isMultiMeasuresSeriesSlot(o)),this.stackedSummaries=this.isWaterfallStack||!(!o||this.stackedMultiMeasures),this._resetSummaryCollectors(t.layerId),this.valueSlotMeasureCount=t.valueSlotMeasureCount,this.measureItemHeaders=t.measureItemHeaders,this.categoryItemHeaders=t.categoryItemHeaders,this.visSelected=this._getSelected(this.categoryItemHeaders),this.widgetContentApi.getFeature("Visualization").getSlots().getMappingInfoList().forEach(function(e){e.dataItem.getMetadataColumn()&&e.dataItem.getMetadataColumn().isOlapColumn()&&(r.hasOlapColumns=!0)})},e.prototype._isMultiMeasuresSeriesSlot=function(e){return!!e.getDataItemList().find(function(e){return"_multiMeasuresSeries"===e.getId()})},e.prototype.onDataRow=function(e){var t=this,r=[],o=0,n=!1;if(this.queryResultData.getVersion&&"2"===this.queryResultData.getVersion()){var i=this._getRowTuple(e,this.categoryItemHeaders);this.hasOlapColumns&&this.isExpandCollapseEnabled?0===e?this.firstRowDepths=i.map(function(e){return e.ln}):i.forEach(function(e){t.firstRowDepths.forEach(function(r){n=n||e.ln>r||e.type===t.queryResultData.VALUE_TYPE.SUMMARY})}):n=n||this.queryResultData.VALUE_TYPE&&i.find(function(e){return e.type===t.queryResultData.VALUE_TYPE.SUMMARY})}this.measureItemHeaders.forEach(function(i){var a=t._getMeasureCellValue(e,i),s=t._getDetailRowCount(e,i);if(!n){r.push({dataItemUniqueId:i.dataItemUniqueId,value:a,detailRowCountUse:s});var l=t.summaryCollector.getSummary(i.dataItemUniqueId);t.summaryCollector.updateSummary(l,a,s),t.stackedSummaries?t._applyStackedSummaries(e,l,i,a):t.stackedMultiMeasures&&(o+=a)}}),this.stackedMultiMeasures&&this.measureItemHeaders.forEach(function(r){if(r.multiMeasuresValueItem){var n=t.summaryCollector.getSummary(r.dataItemUniqueId);t._applyStackedSummaries(e,n,r,o)}}),this._processSelectionsForRow(e,r)},e.prototype._applyStackedSummaries=function(e,t,r,o){var n=this._getRowDataArray(this.queryResultData),i=n&&n[e+r.valueItemIndex],a=this.isWaterfallStack?0:i&&i.pt&&i.pt[0];a>=0&&this.summaryCollector.updateStackedSummary(t,o,a)},e.prototype._getMeasureCellValue=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.index,o=this.valueSlotMeasureCount>1?this._getCellValue(this.queryResultData,e+t.valueItemIndex,r):this._getCellValue(this.queryResultData,e,r+t.valueItemIndex);return""===o?0:o},e.prototype._getCellValueObject=function(e,t,r){return this.isNewQueryApiEnabled?e.getValue(t,r):e.getCellValue(t,r)},e.prototype._getCellValue=function(e,t,r){var o=this._getCellValueObject(e,t,r);return this.isNewQueryApiEnabled?o&&o.getValue?o.getValue():o.value:o&&o.getValue?o.getValue():o.v},e.prototype._getRowCount=function(e){return this.isNewQueryApiEnabled?e.getRowCount():e.getDatapointCount()},e.prototype._getRowDataArray=function(e){return this.isNewQueryApiEnabled?e.getDataPointValueList():e.getDatapoints()},e.prototype._getResultHasData=function(e){return this.isNewQueryApiEnabled&&e.getResult||!this.isNewQueryApiEnabled&&e.getQueryResults},e.prototype._getDetailRowCount=function(e,t){var r=this.activeLayerId,o=this.rowCountCalcs&&this.rowCountCalcs[r]&&this.rowCountCalcs[r][t.dataItemUniqueId];if("avg"!==t.aggregate||void 0===o)return p.default.NO_DETAIL_ROWCOUNT;var n=Math.floor(e/this.valueSlotMeasureCount),i=this.cachedRowCounts&&this.cachedRowCounts[t.dataItemUniqueId];return i&&i[n]?i[n]:this._getMeasureCellValue(e,t,o)},e.prototype._buildRowCountCalculationsMap=function(e,t){var r={},o=[],n=!1;if(this.dashboardApi.getCanvas().getContent(this.widgetApi.getId()).getFeature("Visualization").getSlots().getMappingInfoList().forEach(function(r){r.slot.getDefinition().getDatasetIdList().some(function(e){return e===t})&&"avg"===r.dataItem.getAggregation()&&(n=!0,e.dataItems||o.push(r.dataItem.getId()))}),n){var i={};if(e.dataItems)e.dataItems.forEach(function(e,t){i[e.itemClass.id]=t}),r=this._computeRowCountCalcs(i);else{var a=e.edges.findIndex(function(e){return e.itemClasses&&e.itemClasses.some(function(e){return e.h&&e.h[0]&&o.some(function(t){return t===e.h[0].di})})});a>=0&&(e.edges[a].itemClasses.map(function(e){return e.h[0]}).forEach(function(e,t){i[e.di]=a+t}),r=this._computeRowCountCalcs(i))}}return r},e.prototype._computeRowCountCalcs=function(e){var t={};return Object.keys(e).forEach(function(r){var o=e["rowCount:"+r];void 0!==o&&(t[r]=o)}),t},e.prototype.onDataDone=function(e){var t=this,r=this._getRowCount(this.queryResultData);return this.measureItemHeaders.forEach(function(e){var o=t.summaryCollector.getSummary(e.dataItemUniqueId);t.summaryCollector.finalizeSummaries(o,r/t.valueSlotMeasureCount,e.aggregate)}),this.summaryCollector.areOverallSummaryValuesNeeded()?this.overallSummaryValueQuery.execute(this.summaryCollector).then(function(){return t.filteredSummaryValueQuery.execute(t.summaryCollector).then(function(){return t.filteredSummaryValueQuery.execute(t.selectionSummaryCollector).then(function(){return t._updateSummaries(e)})})}):this._updateSummaries(e)},e.prototype._resetSummaryCollectors=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.summaryCollector=this.getSummaryCollector(),this.selectionSummaryCollector=this.getSelectionSummaryCollector(),this.summaryCollector.reset(e),this.selectionSummaryCollector.reset(e)},e.prototype._updateSummaries=function(e){var t=this;return this.hostAPI.updateSummaries().then(function(r){if(t.updateLastCategorySelected(),t.hostAPI.updateSelectionSummaries(),r&&"object"===(void 0===r?"undefined":a(r)))if(t.isNewQueryApiEnabled){var o=t.dashboardApi.getCanvas().getContent(t.widgetApi.getId()),n=o&&o.getFeature("DataQueryExecution.internal");n&&n.setMinMaxQueryResults(r[t.widgetApi.getId()])}else e&&e.data.setTopBottomMappings&&e.data.setTopBottomMappings(r[t.widgetApi.getId()],0);return{}})},e.prototype._getSelected=function(e){return this.getSelectedContent().getFeature("DataPointSelections.deprecated").getSelection(e.itemIds,{ignoreEdgeSelections:!0})},e.prototype._getRowTuple=function(e,t){var r=this,o=[];return t.columnIndexes.forEach(function(t){var n=r._getCellValueObject(r.queryResultData,e,t);n&&n.type&&(n=n.map(function(e){return i({},e,{type:n.type})})),o=o.concat(n)}),o},e.prototype.getRowTuples=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"data",r=[],o=this.rowHeadersByLayer[t],n=this.queryResultDataByLayer[t];if(n&&o&&o.categoryItemHeaders)for(var i=this._getRowCount(n),a=0;a<i;a+=o.valueSlotMeasureCount)e&&!this._processSelectionsForRow(a)||r.push(this._getRowTuple(a,o.categoryItemHeaders));var s=o&&o.categoryItemHeaders&&o.categoryItemHeaders.itemIds||[],l=s.indexOf("_multiMeasuresSeries");return-1!==l&&(s.splice(l,1),r.forEach(function(e){return e.splice(l,1)})),{itemIds:s,tuples:r}},e.prototype._processSelectionsForRow=function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=this._getRowTuple(e,this.categoryItemHeaders),n=this._processEdgeSelectionsForRow(o,r);return this.visSelected&&this.visSelected.isSelected(o)&&(r&&(r.forEach(function(e){var r=t.selectionSummaryCollector.getSummary(e.dataItemUniqueId);t.selectionSummaryCollector.updateSelectionSummary(r,e,o)}),this._setLastSelectedTuple(o,r)),n=!0),n},e.prototype._processEdgeSelectionsForRow=function(e,t){var r=this,o=this.getSelectedContent(),n=o.getFeature("InteractivityController.deprecated");if(!n)return!1;if(this.categoryItemHeaders.itemIds.find(function(e){return n.isItemSelected(e)})&&!e.find(function(e,t){var o=r.categoryItemHeaders.itemIds[t];return n.isItemSelected(o)&&!n.isValueSelected(o,e)}))return t&&(t.forEach(function(t){var o=r.selectionSummaryCollector.getSummary(t.dataItemUniqueId);r.selectionSummaryCollector.updateSelectionSummary(o,t,e)}),this._setLastSelectedTuple(e)),!0;return!1},e}();t.default=y},492:function(e,t,r){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=r(61),s=function(e){return e&&e.__esModule?e:{default:e}}(a),l=function(e){function t(r,i,a){o(this,t);var s=n(this,e.call(this,r,i,a));return s.overallSummariesCache={},s.includeFilters=!1,s}return i(t,e),t.prototype.onWidgetShapingChanged=function(){this.overallSummariesCache={}},t.prototype.addQueryItem=function(e,t,r){if("fact"===t.getType()){var o=!1,n=this.overallSummariesCache[t.getId()];if(n&&n.aggregationType===t.getAggregation()){var i=this.updateSummaryEntry(r,t.getId(),n.value,"summaryValueUse","summaryValue");i&&n.hasNegativeValues&&(i.hasNegativeValues=n.hasNegativeValues),o=!0}if(!o){var a=function(t){return e.dataItems.some(function(e){return e.id===t})},s={aggregate:t.getAggregation(),itemId:t.getColumnId(),id:t.getId()},l={aggregate:"min",itemId:t.getColumnId(),id:"__min__"+t.getId()};a(t.getId())||a("__min__"+t.getId())||(e.dataItems.push(s),e.projections.push(t.getId()),e.dataItems.push(l),e.projections.push(l.id))}}},t.prototype.processValue=function(e,t,r,o){this._isSummaryMinResult(e)?this._updateHasNegativeValuesFromSummaryMin(o,e,r):(this.overallSummariesCache[e]={aggregationType:t,value:r},this.updateSummaryEntry(o,e,r,"summaryValueUse","summaryValue"))},t.prototype._isSummaryMinResult=function(e){return 0===e.indexOf("__min__")},t.prototype._updateHasNegativeValuesFromSummaryMin=function(e,t,r){if(this._isSummaryMinResult(t)){var o=t.substr("__min__".length),n=e.getSummary(o);return n&&r<0&&(n.hasNegativeValues=!0,this.overallSummariesCache[o].hasNegativeValues=!0),!0}return!1},t}(s.default);t.default=l},493:function(e,t,r){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var n=function(){function e(t,r,n){o(this,e),this.feature=t,this.widgetApi=r,this.dashboardApi=n,this.statsReadyBeforeActivated=!1}return e.prototype.activate=function(e){var t=this;return this.summaryCollector=this.feature.getSummaryCollector(),this.selectionSummaryCollector=this.feature.getSelectionSummaryCollector(),this.cb=e.cb,this.cbSel=e.cbSel,this.cbDomain=e.cbDomain,this.feature.setActivated(!0),this.statsReadyBeforeActivated?(this.statsReadyBeforeActivated=!1,this._onStatsReady().then(function(){return t._onSelectedStatsReady()})):Promise.resolve()},e.prototype.updateSummaries=function(){return this._onStatsReady()},e.prototype._addHeader=function(){return[{id:"min",name:"Min"},{id:"max",name:"Max"},{id:"avg",name:"Average"},{id:"total",name:"Total"},{id:"totalPercent",name:"%Total"}]},e.prototype.updateSelectionSummaries=function(){this._onSelectedStatsReady()},e.prototype._onStatsReady=function(){var e=this.summaryCollector&&this.summaryCollector.getSummaryTableJSON()||{};return e.header=this._addHeader(),this.cb?this.cb(e):this.statsReadyBeforeActivated=!0,this.cbDomain&&this.cbDomain(e)||Promise.resolve()},e.prototype._onSelectedStatsReady=function(){var e=this.selectionSummaryCollector&&this.selectionSummaryCollector.getSummaryTableJSON()||{};e.header=this._addHeader(),this.cbSel?this.cbSel(e):this.statsReadyBeforeActivated=!0},e}();t.default=n},494:function(e,t,r){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var n=function(){function e(t,r,n){o(this,e),this.widgetApi=t,this.dashboardApi=r,this.otherWidgetApi=null,this.logger=n}return e.prototype.combineSummariesWith=function(e){this.otherWidgetApi=e},e.prototype.isInitialized=function(){return!(!this.widgetApi||!this.otherWidgetApi)},e.prototype.validate=function(){var e=this.widgetApi.getVisualization(),t=this.otherWidgetApi.getVisualization();return e&&t&&e.getDataSource().getId()===t.getDataSource().getId()?this._testForDisjointFilters(e,t):Promise.resolve(!1)},e.prototype._testForDisjointFilters=function(e,t){var r=this,o=arguments,n=this._createQuerySpecForDisjointFilterTest(e,t);if(!n||!n.dataItems||!n.filters)return Promise.resolve(!1);var i=this.dashboardApi.getCanvas().getContent(this.widgetApi.getId()),a=i.getFeature("Visualization"),s=this.dashboardApi.getFeature("QueryService"),l=a.getDataSource(),u=n.dataItems.map(function(e){return e.getAggregation()}),c=n.dataItems.map(function(e){return e.getColumnId()}),d=n.filters;return s.getColumnValues(l.getId(),c,d,void 0,[],u).then(function(e){var t=e&&e.getRowCount();if(0===t)return!0;if(1===t){var r=e.getValue(0,0),o=n.dataItems[0].getAggregation();return"count"===o||"countdistinct"===o?!(!r||0!==r.v):!(!r||null!==r.v)}return!1}).catch(function(){return r.logger.error("An error occured while testing for disjoint filters",o,e),!1})},e.prototype._createQuerySpecForDisjointFilterTest=function(e,t){var r={dataItems:[],filters:[]},o=e.getSlots().getDataItemList().find(function(e){return"fact"===e.getType()}),n=t.getSlots().getDataItemList().find(function(e){return"fact"===e.getType()});return o&&n?(r.dataItems=[o],e.getLocalFilters().getFilterList().length&&t.getLocalFilters().getFilterList().length?(e.getLocalFilters().getFilterList().forEach(function(e){r.filters.push(e)}),t.getLocalFilters().getFilterList().forEach(function(e){r.filters.push(e)}),r):null):null},e}();t.default=n},495:function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=r(61),l=o(s),u=r(118),c=o(u),d=r(119),p=o(d),h=function(e){function t(r,o,a,s){var l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;n(this,t);var u=i(this,e.call(this,r[0],o,a));return u.widgetApis=r,u.summaryCollector=l||new p.default(o,u.widgetApi,s),u.summaryValueQueries=[],r.forEach(function(e){u.summaryValueQueries.push(new c.default(e,o,a))}),u.widgetFilters=[],u.isSelectionStats=s,u}return a(t,e),t.prototype.hasUnprocessedItems=function(){var e=null;return this.summaryValueQueries.forEach(function(t){var r=t.getUnprocessedItems();e=e?e.filter(function(e){return-1!==r.indexOf(e)}):r}),e.length>0},t.prototype.build=function(){var e=this,t={dataItems:[],projections:[]};if(this.summaryValueQueries.length<2)return null;var r=0,o=null;return this.summaryValueQueries.forEach(function(n){t.dataItems=[],t.projections=[],n.build(e.summaryCollector,t,e.isSelectionStats),r+=t.dataItems.length>0?1:0;var i=t.dataItems.map(function(e){return e.aggregate+":"+e.itemId});o=o?o.filter(function(e){return-1!==i.indexOf(e)}):i,t.filters&&t.filters.length>0&&(e.widgetFilters.push(t.filters),t.filters=null)}),r<2?null:0===o.length?null:(t.filters=this.combineFilters(),t)},t.prototype.execute=function(){var e=this,t=this.build();return t?this._execute(this.summaryCollector,t).then(function(){return e.summaryCollector}):Promise.resolve(null)},t.prototype.processValue=function(e,t,r,o){this.updateSummaryEntry(o,e,r,"filteredSummaryValueUse","filteredSummaryValue")},t.prototype.combineFilters=function(){if(this.widgetFilters.length<2)return[];var e={operator:"or",values:[]};return this.widgetFilters.forEach(function(t){var r={operator:"and",values:[]};t.forEach(function(e){r.values.push(e)}),e.values.push(r)}),[e]},t}(l.default);t.default=h},496:function(e,t,r){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var n=r(497),i=function(e){return e&&e.__esModule?e:{default:e}}(n),a=["activate","deactivate","isActivated","registerCaptureHandlers"],s=function(){function e(t,r,n){o(this,e),this.widgetApi=t,this.dashboardApi=r,this._activated=!1,this.controller=n||new i.default(this,t,r)}return e.prototype.destroy=function(){this.deactivate(),this.controller.destroy(),this.controller=null},e.prototype.getAPI=function(){var e=this,t={};return a.forEach(function(r){return t[r]=e[r].bind(e)}),t},e.prototype.activate=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._activated=!0,this.controller.activate(e)},e.prototype.deactivate=function(){this._activated=!1,this.controller.deactivate()},e.prototype.isActivated=function(){return this._activated},e.prototype.registerCaptureHandlers=function(e,t){this.controller.registerCaptureHandlers(e,t)},e}();s.API_METHODS=a,t.default=s},497:function(e,t,r){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=r(14),s=function(e){return e&&e.__esModule?e:{default:e}}(a),l=function(){function e(t,r,n){var i=this;o(this,e),this.delay=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300;return new Promise(function(t){i.timeout=setTimeout(t,e)})},this.widgetApi=r,this.dashboardApi=n,this.feature=t,this._resetCaptureHandlers(),this._widgetApiHandlers={onRenderStart:null,onRenderComplete:null}}return e.prototype._resetCaptureHandlers=function(){this._captureHandlers={success:[],error:[],warning:[],clear:[],relink:[]}},e.prototype.activate=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.captureHandlers&&(t.captureHandlers.success&&this.registerSuccessCaptureHandler(t.captureHandlers.success),t.captureHandlers.error&&this.registerErrorCaptureHandler(t.captureHandlers.error),t.captureHandlers.warning&&this.registerWarningCaptureHandler(t.captureHandlers.warning),t.captureHandlers.clear&&this.registerClearCaptureHandler(t.captureHandlers.clear),t.captureHandlers.relink&&this.registerRelinkCaptureHandler(t.captureHandlers.relink));var r=this.dashboardApi.getCanvas(),o=r&&r.getContent(this.widgetApi.getId()),n=o&&o.getFeature("state");n&&n.whenStatusChanges(n.STATUS.RENDERED).then(function(){var t={isInitial:!0,isResizing:!1};e.onRenderStart(t),e.onRenderComplete(t),e._widgetApiHandlers.onRenderStart||(e._widgetApiHandlers.onRenderStart=e.widgetApi.on("renderStart",e.onRenderStart,e)),e._widgetApiHandlers.onRenderComplete||(e._widgetApiHandlers.onRenderComplete=e.widgetApi.on("renderComplete",e.onRenderComplete,e))}),this.dashboardApi.getDashboardSvc(".LifeCycleManager").then(function(t){t.registerLifeCycleHandler("pre:relink",e.onRelinkStart.bind(e))})},e.prototype.deactivate=function(){return this._widgetApiHandlers.onRenderComplete&&(this._widgetApiHandlers.onRenderComplete.remove(),this._widgetApiHandlers.onRenderComplete=null),this._resetCaptureHandlers(),Promise.resolve()},e.prototype.destroy=function(){this._onThumbnailGeneratedHandlers=[],this.deactivate()},e.prototype.registerCaptureHandlers=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;e&&this.registerSuccessCaptureHandler(e),t&&this.registerErrorCaptureHandler(t),r&&this.registerWarningCaptureHandler(r)},e.prototype.registerSuccessCaptureHandler=function(e){this._captureHandlers.success.push(e)},e.prototype.registerWarningCaptureHandler=function(e){this._captureHandlers.warning.push(e)},e.prototype.registerErrorCaptureHandler=function(e){this._captureHandlers.error.push(e)},e.prototype.registerClearCaptureHandler=function(e){this._captureHandlers.clear.push(e)},e.prototype.registerRelinkCaptureHandler=function(e){this._captureHandlers.relink.push(e)},e.prototype.callSuccessCaptureHandlers=function(e){this._captureHandlers.success.forEach(function(t){return t(e)})},e.prototype.callErrorCaptureHandlers=function(e){this._captureHandlers.error.forEach(function(t){return t(e)})},e.prototype.callWarningCaptureHandlers=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{message:"Widget has a warning."};this._captureHandlers.warning.forEach(function(t){return t(e)})},e.prototype.callClearCaptureHandlers=function(){this._captureHandlers.clear.forEach(function(e){return e()})},e.prototype.callRelinkCaptureHandlers=function(){this._captureHandlers.relink.forEach(function(e){return e()})},e.prototype.needsReGeneration=function(e){return!e.isResizing},e.prototype.needsClearing=function(e){return!e.isResizing&&!e.isInitial},e.prototype.onRenderStart=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(this.widgetApi.hasError()||this.needsClearing(e))&&this.callClearCaptureHandlers()},e.prototype.onRenderComplete=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=void 0;return this.widgetApi.hasError()?(this.callErrorCaptureHandlers(new Error("Widget has error")),r=Promise.resolve()):this.widgetApi.hasWarning()?(this.callWarningCaptureHandlers(),r=Promise.resolve()):this.needsReGeneration(t)?(this.timeout&&clearTimeout(this.timeout),r=this.delay().then(function(){return e._generateCapture()}).then(function(t){return e.callSuccessCaptureHandlers(t)}).catch(function(t){return e.callErrorCaptureHandlers(t)})):r=Promise.resolve(),r},e.prototype.onRelinkStart=function(){this.callRelinkCaptureHandlers()},e.prototype._generateCapture=function(){var e=this.dashboardApi.getAppConfig("thumbnail");if(!e)return Promise.resolve();var t=this.widgetApi.getLayoutAPI(),r=t.getSelfRatio(),o=r.width,a=r.height,l=e.size,u=l.width,c=l.height,d=e.type,p=void 0===d?"svg":d,h=u*o-16,g=c*a-16,m={width:h,height:g};return this.widgetApi.getVisApi().generateThumbnail({size:m,type:p}).then(function(e){var t=void 0,r=void 0;if(r="object"===(void 0===e?"undefined":i(e))?e.thumbnail:e){var o=(0,s.default)(r),a=(0,s.default)("<div>").append(o);o.first().removeAttr("class").attr("class","visThumbnail"),t=a.html()}return n({},"object"===(void 0===e?"undefined":i(e))?e:{},{thumbnail:t})})},e}();t.default=l},498:function(e,t,r){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var n=function(){function e(t,r){o(this,e),this.widgetApi=t,this.dashboardApi=r,this._initialRequestDone=!1,this._widgetApiHandlers={_onRenderStart:this.widgetApi.on("renderStart",this._onRenderStart.bind(this)),_onChangeDefinition:this.widgetApi.on("visevent:changeDefinition",this._triggerTitleUpdate.bind(this))},this._dashboardApiHandlers={_onShapingModelChange:this.dashboardApi.on("shapingmodel:changed",this._onShapingModelChange,this)}}return e.prototype.destroy=function(){return this._deregisterAllListeners(),Promise.resolve(!0)},e.prototype._deregisterAllListeners=function(){this._deregisterOnRenderStartListener(),this._widgetApiHandlers._onChangeDefinition&&(this._widgetApiHandlers._onChangeDefinition.remove(),this._widgetApiHandlers._onChangeDefinition=null),this._dashboardApiHandlers._onShapingModelChange&&(this._dashboardApiHandlers._onShapingModelChange.remove(),this._dashboardApiHandlers._onShapingModelChange=null)},e.prototype._deregisterOnRenderStartListener=function(){this._widgetApiHandlers._onRenderStart&&(this._widgetApiHandlers._onRenderStart.remove(),this._widgetApiHandlers._onRenderStart=null)},e.prototype._onRenderStart=function(){var e=this.widgetApi.getVisApi();e&&!this._initialRequestDone&&(this._initialRequestDone=!0,this._deregisterOnRenderStartListener(),e.getTitle()||this.widgetApi.updateTitle&&this.widgetApi.updateTitle())},e.prototype._onShapingModelChange=function(e){e&&!e.noRefresh&&this._triggerTitleUpdate()},e.prototype._triggerTitleUpdate=function(){this.widgetApi.updateTitle&&this.widgetApi.updateTitle()},e}();t.default=n},499:function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=r(14),a=o(i),s=r(8),l=o(s),u=r(2),c=o(u),d=function(){function e(t){n(this,e),this.content=t.content,this.content.getFeature("DataPointActions").registerProvider("ShowByAction",this),this.dashboardApi=t.dashboardAPI,this.visApi=null,this._showbyIdCntr=0}return e.prototype.getAPI=function(){return{setOnSelectCallback:this.setOnSelectCallback.bind(this)}},e.prototype.setOnSelectCallback=function(e){this.onSelectCallback=e.cb},e.prototype._resetVisInfo=function(){this.visApi=this.content.getFeature("WidgetAPI.deprecated").getVisApi(),this._projectedDataItems=null;var e=this.visApi&&this.visApi.getDefinition&&this.visApi.getDefinition();this._isMapWidget=e&&e.geo,this._isCrosstabWidget=e&&"crosstab"===e.id,this._module=this.visApi.getModule(),this.model=this.visApi.ownerWidget.model},e.prototype.getDataPointActionList=function(e,t){if("explore"!==this.dashboardApi.getApplicationName())return[];this._resetVisInfo();var r=this.visApi?this.visApi.getEventGroupId():null,o=this.visApi.getPageContextAPI().getPageContextItems?this.visApi.getPageContextAPI().getPageContextItems({scope:this.visApi.getScope(),origin:"visualization",eventGroupId:r}):[],n=this._getBrushingItemThatMatchesSelection(o);if(!n.length)return[];for(var i=0;i<n.length;++i){for(var a=n[i],s=0;s<a.getHierarchyCount();s++)if(a.getBinningAPI&&a.getBinningAPI(s))return[];if(this._hasLongitudeLatitudeColumn(a))return[]}var l=this.setToolbar.bind(this),u=this._getViewOptions(n,t.selections);if(!u)return[];var d=this._getValueCountOfBrushingItems(n);return this.compareByCase=2===d,this.pageContextItems=n,[{name:"ShowByAction",label:this.compareByCase?c.default.get("compare_by_label"):c.default.get("show_by_label"),type:"NextView",order:1,labelOnly:!0,viewModule:"explore/showByView",viewOptions:u,enableGoPrevious:!1,setToolbar:l}]},e.prototype._hasLongitudeLatitudeColumn=function(e){var t=this;if(this._isMapWidget){var r=e.getItemIds();return!(!r||!r.length)&&r.some(function(e){return t._getGeoTaxonomy(e).isLatLong})}},e.prototype._getValueCountOfBrushingItems=function(e){var t=null;if(1===e.length)t=e[0].getValueCount();else{var r=e.filter(function(e){return e.getValueCount()>1});t=1===r.length&&2===r[0].getValueCount()?2:1}return t},e.prototype.setToolbar=function(e){this.toolbar=e},e.prototype._getProjectedDataItems=function(){if(this._projectedDataItems&&this._projectedDataItems.length)return this._projectedDataItems;var e=this.content.getFeature("Visualization").getSlots().getMappingInfoList().map(function(e){return e.dataItem});return this._projectedDataItems=e.filter(function(e){return"_multiMeasuresSeries"!==e.getColumnId()}).map(function(e){return e.getColumnId()}),this._projectedDataItems},e.prototype._getBrushingItemThatMatchesSelection=function(e){if(e.length<2)return e;var t=[],r=this._getProjectedDataItems();if(e.forEach(function(e){if(e.getValueCount&&e.getValueCount()>0){var o=e.getItemIds();l.default.intersection(r,o).length===o.length&&t.push(e)}}),1===t.length)return t;var o=this.visApi&&this.visApi.getDefinition&&this.visApi.getDefinition();return o&&"JQGrid"===o.id?t:[]},e.prototype._getViewOptions=function(e,t){if(this.slotAndDataItemsToRemap=this._getSlotAndDataItemsToRemap(e,t,this._isCrosstabWidget),!this.slotAndDataItemsToRemap)return null;var r=this.showByHandler.bind(this),o=this._getCategoricalColumns(),n=this._getShapingHelper();return o.length?{eventHandler:r,widget:this.visApi.ownerWidget,slotId:this.slotAndDataItemsToRemap.slotId,closeOnActionApplied:!0,contextColumns:o,shapingHelper:n,getRecommendedColumns:this.getRecommendedColumns.bind(this)}:null},e.prototype._getSlotAndDataItemsToRemap=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t&&t._aCategorySelections&&t._aCategorySelections.length){var o=t._slotToCategoryCount,n=Object.keys(o);if(!n.length)return null;var i=null;i=1===n.length||n.length>1&&!r?n[0]:n[1];var a=[];e.forEach(function(e){a=a.concat(e.getItemIds())});var s=[];return{slotId:i,dataItems:function(){return t._aCategorySelections.forEach(function(e){if(e.slot.getId()===i){var t=e.slotDataItem.getColumnId();a.indexOf(t)>-1&&s.push({id:e.slotDataItem.getId(),itemId:t})}}),s}()}}return null},e.prototype.showByHandler=function(e){var t=void 0;e&&(t={showByCategory:{itemId:e.context.id,caption:e.context.label,id:""},slotAndDataItemsToRemap:this.slotAndDataItemsToRemap,compareByCase:this.compareByCase,pageContextItems:this.pageContextItems}),this.onSelectCategory(t)},e.prototype._isGoodCandidateColumnForShowBy=function(e){if(!e)return!1;var t=e.getId();return!(this._getProjectedDataItems().indexOf(t)>-1)&&(this._isMapWidget?this._getGeoTaxonomy(t).isLocation:"attribute"===e.getType())},e.prototype._getGeoTaxonomy=function(e){var t=this.content.getFeature("Visualization").getDataSource().getMetadataColumn(e),r=!1,o=!1;if(t){var n=t.getTaxonomyList();if(n&&n.length){var i=n[0].getFamily();r="cGeoLocation"===n[0].getClass(),o="cLatitude"===i||"cLongitude"===i}}return{isLocation:r,isLatLong:o}},e.prototype._getCategoryColumnOfKeyDriver=function(e){var t=this._module.getMetadataColumn(e.fieldIDForExpression);return this._isGoodCandidateColumnForShowBy(t)?t:null},e.prototype.getRecommendedColumns=function(){var e=this,t=this._getProjectedDataItems();if(!t||0===t.length)return Promise.resolve([]);var r=0,o=[],n={requestMap:{}};return t.forEach(function(t){o.push(e.visApi.whenPossibleKeyDriversAreReady(n,t,!1))}),Promise.all(o).then(function(t){var o=[];return t&&t.length&&t.forEach(function(t){t&&t.recommendedDrivers&&t.recommendedDrivers.length&&(r++,t.recommendedDrivers.forEach(function(t){var r=e._getCategoryColumnOfKeyDriver(t);r&&o.push({id:r.getId(),label:r.getLabel(),moserObject:r.getMoserObject()})}))}),o}).then(function(e){return r>1&&(e=l.default.uniq(e,function(e){return e.id})),e})},e.prototype._getCategoricalColumns=function(){var e=this,t=[],r=function(t){return e._isGoodCandidateColumnForShowBy(t)},o=this._module.getMetadataColumns(r);return o&&o.length&&o.forEach(function(e){var r=e.getId();t.push({value:r,label:e.getLabel(),title:r,moserObject:e.getMoserObject()})}),t},e.prototype._getShapingHelper=function(){return this.isNewShowCompareByEnabled()?this._module.getShapingHelper():null},e.prototype.isNewShowCompareByEnabled=function(){if(this.dashboardApi){var e=this.dashboardApi&&this.dashboardApi.getGlassCoreSvc(".FeatureChecker");return!(e&&e.checkValue("explore","newShowCompareBy","false"))}return!1},e.prototype.onSelectCategory=function(e){this.onSelectCallback&&(e.payloadOptions=e.payloadOptions||{},e.payloadOptions.payloadData=e.payloadOptions.payloadData||{},e.payloadOptions.payloadData.undoRedoTransactionId=e.payloadOptions.payloadData.undoRedoTransactionId||l.default.uniqueId("addShowByCard"),this.onSelectCallback(this.getNewWidgetSpecs(e),e.payloadOptions.payloadData))},e.prototype.getNewWidgetSpecs=function(e){if(!e||!e.pageContextItems)return[];this._showbyIdCntr=this._showbyIdCntr||0,e.showByCategory.id=this.visApi.ownerWidget.id+"_showBy_"+ ++this._showbyIdCntr;var t=[];return t=e.compareByCase?this._getWidgetSpecsForCompareBy(e):this._getWidgetSpecsForShowBy(e),t.forEach(function(e){e.localFilters&&e.localFilters.length&&e.localFilters.forEach(function(e){e.visualizationId=void 0})}),t},e.prototype._getWidgetSpecsForShowBy=function(e){var t=[],r=this.visApi.getAllFiltersAsLocalFiltersForPinning(!1),o=this.newWidgetSpecWithFilter(e,r,this.model);return o=this.removeUnwantedAttributesFromSpec(o),o&&t.push(o),this.clearSelections(e.payloadOptions),t},e.prototype._getWidgetSpecsForCompareBy=function(e){for(var t=e.pageContextItems.length,r=this.visApi.getSelectionAsLocalFilters({includeLocalFilters:!0}),o=this.visApi.getSelectionAsLocalFilters({includeLocalFilters:!0}),n=r.length,i=n-t;i<n;)2===r[i].values.length&&(r[i].values.splice(1,1),o[i].values.splice(0,1)),i++;var a=[r,o],s=[],l=this.newWidgetSpecWithFilter(e,a[0],this.model);return l=this._addExtraWidgetOptions(l),l=this.removeUnwantedAttributesFromSpec(l),l&&s.push(l),l=this.newWidgetSpecWithFilter(e,a[1],this.model),l=this._addExtraWidgetOptions(l),l=this.removeUnwantedAttributesFromSpec(l),l&&s.push(l),this.clearSelections(e.payloadOptions),s},e.prototype.clearSelections=function(e){this.visApi.clearSelectionsUsedForShowBy(e)},e.prototype.newDataItem=function(e){return{id:e.id,itemId:e.itemId,itemLabel:e.caption}},e.prototype.addDataItem=function(e,t){if(!e||!e.data||!e.data.dataViews||0===e.data.dataViews.length)return null;var r=this.newDataItem(t.showByCategory);return e.data.dataViews[0].dataItems.push(r),r},e.prototype.updateSlot=function(e,t,r){if(!e||!e.slotmapping||!e.slotmapping.slots)return null;var o=null,n=[];return e.slotmapping.slots.some(function(e){return e.name===t.slotAndDataItemsToRemap.slotId&&(o=e,n=t.slotAndDataItemsToRemap.dataItems.map(function(e){return e.id}),!0)}),o&&("JQGrid"===e.visId||"crosstab"===e.visId?(this.updateSlotForCrosstabAndTable(o,n,r),this.removeHeatSlotForXtabTable(e)):(o.dataItems=[r],o.caption=t.showByCategory.caption)),n.length&&this._removeBrushedItems(e,n),o},e.prototype.updateSlotForCrosstabAndTable=function(e,t,r){var o=[],n=-1;for(var i in e.dataItems)-1===t.indexOf(e.dataItems[i])?o.push(e.dataItems[i]):-1===n&&(o.push(r),n=o.length-1);e.dataItems=o},e.prototype.newWidgetSpecWithFilter=function(e,t,r){var o=r.toJSON(),n=a.default.extend(!0,{},o);delete n.containerPageId;var i=this.addDataItem(n,e);return i&&this.updateSlot(n,e,i.id)?(n.localFilters=t,n):null},e.prototype.removeHeatSlotForXtabTable=function(e){if(!this.dashboardApi.getGlassCoreSvc(".FeatureChecker").checkValue("dashboard","xtabcondFormat","disabled")&&["Crosstab","List"].indexOf(this.content.getFeature("Visualization").getType())>-1){for(var t=e.slotmapping.slots,r=e.data.dataViews[0],o=null,n=void 0,i=0;i<t.length;++i)if("heat"===t[i].name){o=i,n=t[i].dataItems;break}if(null!==o){t.splice(o,1);for(var a=r.dataItems,s=[],l=0;l<a.length;++l)-1===n.indexOf(a[l].id)&&s.push(a[l]);s.length&&(r.dataItems=s)}}return e},e.prototype._removeBrushedItems=function(e,t){for(var r=e.data.dataViews,o=0;o<r.length;o++)this._removeBrushedDataItemFromDataViews(r[o],t)},e.prototype._removeBrushedDataItemFromDataViews=function(e,t){for(var r=[],o=e.dataItems,n=0;n<o.length;n++)-1===t.indexOf(o[n].id)&&r.push(o[n]);r.length>0&&(e.dataItems=r)},e.prototype.removeUnwantedAttributesFromSpec=function(e){var t=["id","name","titleHtml","thumbnailId"];return l.default.each(t,function(t){delete e[t]}),e},e.prototype._addExtraWidgetOptions=function(e){var t={properties:[{id:"itemAxis.labels.layoutMode",value:"stagger"},{id:"widget.legend.position",value:"right"}]};return Object.assign(e,t),e},e}();t.default=d},5:function(e,r){e.exports=t},500:function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(501),i=o(n),a=r(0),s=o(a),l=r(17),u=o(l),c=r(505),d=c.extend({init:function(e){d.inherited("init",this,arguments),this.dialogOptions={eventHandler:e.eventHandler,contextColumns:e.contextColumns,shapingHelper:e.shapingHelper,getRecommendedColumns:e.getRecommendedColumns},this.selectionHandler=this.selectionHandler.bind(this)},render:function(){var e=this;return this._renderReactComponents(this.dialogOptions).then(function(){return e})},_renderReactComponents:function(e){var t=this;return this.$el.addClass("popoverDialogContainer"),e.getRecommendedColumns().then(function(r){e.recommendedColumns=r,u.default.render(s.default.createElement(i.default,{contextColumns:e.contextColumns,eventHandler:t.selectionHandler,recommendedColumns:e.recommendedColumns,shapingHelper:e.shapingHelper}),t.$el[0])})},selectionHandler:function(e){this.dialogOptions.eventHandler&&(this.remove(),this.dialogOptions.eventHandler({context:{id:e.id,label:e.label}}))},remove:function(){u.default.unmountComponentAtNode(this.$el[0]),this.toolbar&&this.toolbar.flyout&&this.toolbar.flyout.close(),d.inherited("remove",this)},renderCallBack:function(e){return this.toolbar=e,Promise.resolve()},preload:function(){return Promise.resolve()}});t.default=d},501:function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s,l,u,c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},d=r(0),p=o(d),h=r(1),g=o(h),m=r(2),f=o(m);r(502);var _=r(6),v=r(28),y=r(504),b=y.default,w=(l=s=function(e){function t(r){n(this,t);var o=i(this,e.call(this,r));return u.call(o),o.state={searchResult:"",searchString:"",mounted:!1,isSearchFocused:!r.recommendedColumns.length},o.contextColumns=r.contextColumns,o.contextColumnsMoser=o.contextColumns.map(function(e){return e.moserObject}),o.selectionHandler=r.eventHandler,o.recommendedColumns=r.recommendedColumns,o.recommendedColumnsMoser=o.recommendedColumns.map(function(e){return e.moserObject}),o.searchPlaceHolder=f.default.get("searchAll"),o.recommendedColumnsLabel=f.default.get("recommendedColumns"),o.allColumnsLabel=f.default.get("allColumns"),o.searchRef=null,o}return a(t,e),t.prototype.componentDidMount=function(){var e=this;setTimeout(function(){return e.setState({mounted:!0})},0),this.moserTreeMapRecommended=new Map,this.moserTreeMapSearch=new Map},t.prototype.componentWillUnmount=function(){this.moserTreeMapRecommended=null,this.moserTreeMapSearch=null},t.prototype.render=function(){var e=this;return this.props.shapingHelper?p.default.createElement("div",{className:"showByDialogAmb ba-theme-waca"},p.default.createElement(_.SearchInput,{className:"searchBar",value:this.state.searchString,placeholder:this.searchPlaceHolder,onChange:this._onInputChange,fullWidth:"true",onFocus:this._onFocus,onBlur:this._onBlur,ref:function(t){return e.searchRef=t}}),this._getTreeListComponent()):p.default.createElement("div",{className:"showByDialog ba-theme-waca"},p.default.createElement(_.AutoCompleteInput,{values:this.contextColumns,value:this.state.searchString,placeholder:this.searchPlaceHolder,onChange:this._onInputChange,onSelectionChange:this._onSelectionChange,onValueMatch:this._onValueMatch,fullWidth:"true"}),this._getListComponent())},t}(d.Component),u=function(){var e=this;this._onFocus=function(){e.setState({isSearchFocused:!0})},this._onBlur=function(){e.setState({isSearchFocused:!1})},this._onInputChange=function(t){t||e.setState({searchResult:""}),e.setState({searchString:t})},this._onValueMatch=function(t){e.setState({searchResult:t})},this._onSelectionChange=function(t){e.selectionHandler({id:t.value,label:t.label})},this._getListComponent=function(){return e.recommendedColumns&&e.recommendedColumns.length&&!e.state.searchResult&&!e.state.searchString?p.default.createElement("div",null,p.default.createElement("div",{className:"columnsListLabel"},p.default.createElement(_.Label,{label:e.recommendedColumnsLabel})),p.default.createElement("div",{className:"columnsListContainer"},p.default.createElement(_.List,{length:e.recommendedColumns.length,itemRenderer:e._itemRenderer,selectionMode:"single",onSelectionChange:e._onListSelection,tabIndex:0}))):null},this._getTreeListComponent=function(){var t=e.props.shapingHelper,r={};e.state.isSearchFocused||""!==e.state.searchString?e.searchRef&&(e.searchRef.focus(),r={moserObjectFilter:e.searchPredicate}):r={moserObjectFilter:e.recommendedPredicate};var o=null;return e.state.mounted&&(o=p.default.createElement(v.ShapingPickTree,c({filter:e.state.searchString,onSelect:e._onSelect},r))),p.default.createElement(t.ShapingProvider,null,p.default.createElement("div",null,p.default.createElement("div",{className:"columnsListLabel"},p.default.createElement(_.Label,{label:e.state.isSearchFocused||""!==e.state.searchString?e.allColumnsLabel:e.recommendedColumnsLabel})),p.default.createElement("div",{className:"columnsTreeContainer"},o)))},this.searchPredicate=function(t){if(t.getObjectType()===b.MoserObjectTypes.QUERY_ITEM)return e.contextColumnsMoser.indexOf(t)>=0;if(e.moserTreeMapSearch.has(t))return e.moserTreeMapSearch.get(t);var r=b.ModuleUtils.getTreeChildren(t).some(function(t){return e.searchPredicate(t)});return e.moserTreeMapSearch.set(t,r),r},this.recommendedPredicate=function(t){if(t.getObjectType()===b.MoserObjectTypes.QUERY_ITEM)return e.recommendedColumnsMoser.indexOf(t)>=0;if(e.moserTreeMapRecommended.has(t))return e.moserTreeMapRecommended.get(t);var r=b.ModuleUtils.getTreeChildren(t).some(function(t){return e.recommendedPredicate(t)});return e.moserTreeMapRecommended.set(t,r),r},this._onSelect=function(t){t.getObjectType()===b.MoserObjectTypes.QUERY_ITEM&&e.selectionHandler({id:t.idForExpression,label:t.label})},this._onListSelection=function(t){var r=e.recommendedColumns[t.index];e.selectionHandler(r)},this._itemRenderer=function(t){var r=e.recommendedColumns[t];return p.default.createElement(_.ListItem,{"data-index":t,selectable:"true"},p.default.createElement(_.FlexItem,{grow:!0},p.default.createElement(_.TruncatedText,{value:r.label})))}},l);w.propTypes={contextColumns:g.default.array,eventHandler:g.default.func,recommendedColumns:g.default.array,shapingHelper:g.default.object},t.default=w},502:function(e,t,r){var o=r(503);"string"==typeof o&&(o=[[e.i,o,""]]);var n={hmr:!0};n.transform=void 0;r(4)(o,n);o.locals&&(e.exports=o.locals)},503:function(e,t,r){t=e.exports=r(3)(!1),t.push([e.i,"/**\n* IBM Confidential\n* OCO Source Materials\n* IBM Business Platform: Dashboard\n* (C) Copyright IBM Corp. 2018\n* The source code for this program is not published or otherwise divested of its trade secrets,\n* irrespective of what has been deposited with the U.S. Copyright Office\n**/\n\n.showByDialog {\n color: #777677;\n width: 260px;\n}\n\n.showByDialog .columnsListLabel {\n margin-left: 16px;\n margin-right: 16px;\n margin-top: 12px;\n margin-bottom: 12px;\n font-size: 12px;\n font-weight: 600;\n}\n\n.showByDialog .columnsListContainer {\n margin-left: 16px;\n margin-right: 16px;\n margin-bottom: 16px;\n border-width: 1px;\n border-color: #e0e0e0;\n border-color: hsla(var(--ui-03-h, 0), var(--ui-03-s, 0%), var(--ui-03-l, 87.84314%), 1);\n border-style: solid;\n overflow-y: auto;\n max-height: 140px;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: column;\n flex-direction: column;\n -ms-flex-pack: start;\n justify-content: flex-start;\n color: #0f62fe;\n color: hsla(var(--interactive-01-h, 219.16318), var(--interactive-01-s, 99.17012%), var(--interactive-01-l, 52.7451%), 1);\n text-overflow: ellipsis;\n}\n\n.showByDialogAmb {\n color: #161616;\n color: hsla(var(--text-01-h, 0), var(--text-01-s, 0%), var(--text-01-l, 8.62745%), 1);\n width: 350px;\n height: 380px;\n}\n\n.showByDialogAmb .searchBar {\n margin-left: 16px;\n margin-right: 16px;\n margin-top: 8px;\n}\n\n.showByDialogAmb .columnsListLabel {\n margin-left: 16px;\n margin-right: 16px;\n margin-top: 12px;\n margin-bottom: 12px;\n font-size: 12px;\n font-weight: 600;\n}\n\n.showByDialogAmb .columnsTreeContainer {\n margin-left: 16px;\n margin-right: 16px;\n margin-bottom: 16px;\n border-width: 1px;\n border-color: #e0e0e0;\n border-color: hsla(var(--ui-03-h, 0), var(--ui-03-s, 0%), var(--ui-03-l, 87.84314%), 1);\n border-style: solid;\n overflow-y: auto;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: column;\n flex-direction: column;\n -ms-flex-pack: start;\n justify-content: flex-start;\n text-overflow: ellipsis;\n height: 282px;\n}\n\n.showByDialogAmb .bi-common-panelMessage {\n top: 0px !important;\n overflow: hidden !important;\n height: 440px;\n}\n\n.showByDialogAmb .bi-common-panelMessage__inner {\n padding-top: 130px;\n}\n\n",""])},504:function(e,t){e.exports=h},505:function(e,t){e.exports=g},6:function(e,t){e.exports=r},61:function(e,t,r){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var n=function(){function e(t,r,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;o(this,e),this.widgetApi=t,this.dashboardApi=r,this.logger=n,this.cbGetRowTuples=i,this.includeFilters=!0}return e.prototype.destroy=function(){this.deactivate()},e.prototype.activate=function(){this.widgetApi.on("shapingmodel:changed",this.onWidgetShapingChanged,this)},e.prototype.deactivate=function(){this.widgetApi.off("shapingmodel:changed",this.onWidgetShapingChanged,this)},e.prototype.onWidgetShapingChanged=function(){},e.prototype.addQueryItem=function(){},e.prototype.build=function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{dataItems:[],projections:[]},o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=this.dashboardApi.getCanvas().getContent(this.widgetApi.getId()),i=this.widgetApi.getVisualization(),a=i.getSavedPrompts();a&&a.getPromptSpecList()&&(r.parameterValues=a.getPromptSpecList()),o=o||!!e.isSelectionSummaryCollector;var s=i.getSlots();if(s&&s.getDataItemList().forEach(function(o){t.addQueryItem(r,o,e)}),0===r.dataItems.length||0===r.projections.length)return null;if(this.includeFilters){var l=this.addFilters(n,o);if(!l.canBuildFilterSpec)return r.dataItems=[],null;r.filters=l.filters}return r},e.prototype.execute=function(e){var t=this.build(e);return t?this._execute(e,t):Promise.resolve(!0)},e.prototype._execute=function(e,t){var r=this;return this._getColumnValues(t).then(function(o){return o.getResultItemList().forEach(function(n,i){var a=t.projections[i],s=n.getDataItemList(),l=o.getValue(0,i);if(l){var u=l.getValue&&l.getValue()||l.v;r.processValue(a,s[0].aggregate,u,e)}}),!0}).catch(function(e){r._logError(e)})},e.prototype.updateSummaryEntry=function(e,t,r,o,n){var i=e.getSummary(t);if(i)if(e.isSelectionSummaryCollector&&!i.valueMap)e.removeSummary(t),i=null;else{i=e.updateSummaryEntry(i),i[o]=r;var a=0===r?"0":(r||"").toString(),s=i.metadata&&i.metadata.format,l=this._getFormatter();i[n]=l&&s?l.format(i[o],s):a}return i},e.prototype.addFilters=function(e,t){var r=this,o=[],n=e.getFeature("DataPointSelections.deprecated"),i=n.getSelections(),a=this._getFilterInfo(e),s=this._useRowTuplesAsFilters(a);if(i.length>0&&o.push(this._buildDataPointFilterFromSelections(i)),s&&this.cbGetRowTuples){var l=this.cbGetRowTuples(t);if(!l||!l.tuples||0===l.tuples.length)return{canBuildFilterSpec:!1};if(1===l.itemIds.length){var u=l.tuples.map(function(e){return e[0]});o.push({columnId:l.itemIds[0],operator:"in",values:u})}else o.push(this._buildDataPointFilter(l))}return a&&a.forEach&&a.forEach(function(e){r._isPostAggregateRangeFilter(e)||o.push(e)}),{canBuildFilterSpec:!0,filters:o}},e.prototype._buildDataPointFilterFromSelections=function(e){var t={operator:"or",values:[]};return e.forEach(function(e){var r={operator:"and",values:[]};e.categories.forEach(function(e){r.values.push({columnId:e.columnId,operator:"in",values:[{d:e.label,label:e.label}]})}),t.values.push(r)}),t},e.prototype._buildDataPointFilter=function(e){var t=e.itemIds,r={operator:"or",values:[]};return e.tuples.forEach(function(e){var o={operator:"and",values:[]};e.forEach(function(e,r){o.values.push({columnId:t[r],operator:"in",values:[e]})}),r.values.push(o)}),r},e.prototype._isPostAggregateRangeFilter=function(e){return"post"===e.preOrPost&&e.operator&&this._isRangeFilter(e.operator)},e.prototype._isRangeFilter=function(e){return["between","notbetween","lt","gt"].indexOf(e)>-1},e.prototype._useRowTuplesAsFilters=function(e){return this._hasTopBottom()||this._hasPostAggregateRangeFilters(e)},e.prototype._hasTopBottom=function(){return!!this.dashboardApi.getCanvas().getContent(this.widgetApi.getId()).getFeature("Visualization").getSlots().getDataItemList().find(function(e){return e.getTopBottom()})},e.prototype._hasPostAggregateRangeFilters=function(e){var t=this;return!(!e||!e.some(function(e){return t._isPostAggregateRangeFilter(e)}))},e.prototype._getFormatter=function(){return this.widgetApi.getVisApi().getFormatter()},e.prototype._getFilterInfo=function(e){var t=this.dashboardApi.getFeature("GlobalFilters"),r=this.dashboardApi.getFeature("EventGroups"),o=e.getFeature("Visualization"),n=o.getDataSource(),i=o.getLocalFilters(),a=this.dashboardApi.getAppConfig("pageContainerType"),s=[];return s.push.apply(s,i.getFilterList()),s.push.apply(s,t.getFilterList({origin:"filter",sourceId:n.getId(),scope:this._getPageContent(e,a).getId(),eventGroupId:r.getGroupId(e.getId())})),s},e.prototype._getColumnValues=function(e){var t=this.dashboardApi.getCanvas().getContent(this.widgetApi.getId()),r=t.getFeature("Visualization"),o=this.dashboardApi.getFeature("QueryService"),n=r.getDataSource(),i=e.dataItems.map(function(e){return e.aggregate}),a=e.dataItems.map(function(e){return e.itemId});return o.getColumnValues(n.getId(),a,e.filters,void 0,[],i)},e.prototype._getPageContent=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"page",r=null;e;)t&&e.getType&&e.getType()===t&&(r=e),e=e.getContainer&&e.getContainer();return r},e.prototype._logError=function(){this.logger.error("An error occured while requesting measure summaries for statistics",arguments,this.widgetApi.getVisApi())},e}();t.default=n},7:function(e,t){e.exports=o},8:function(e,t){e.exports=n},9:function(e,t){e.exports=i}},[468])});
  2. //# sourceMappingURL=dashboard-extensions.min.js.map