UNPKG

survey-analytics

Version:

SurveyJS analytics Library.

2 lines 218 kB
/*! For license information please see survey.analytics.core.min.js.LICENSE.txt */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("survey-core")):"function"==typeof define&&define.amd?define("SurveyAnalyticsCore",["survey-core"],t):"object"==typeof exports?exports.SurveyAnalyticsCore=t(require("survey-core")):e.SurveyAnalyticsCore=t(e.Survey)}(this,(e=>(()=>{var t={24:e=>{e.exports='<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 16 16" style="enable-background:new 0 0 16 16;" xml:space="preserve"><g><circle cx="8" cy="4" r="3"></circle><path d="M8,8c-3.31,0-6,2.73-6,4.67S5.27,15,8,15s6-0.4,6-2.33S11.31,8,8,8z"></path></g></svg>'},41:e=>{e.exports='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g><path d="M12.79,4.2L16,1l-1-1l-3.32,3.32C10.57,2.55,9.32,2,8,2C3.63,2,0,7.97,0,7.97s1.27,2.1,3.21,3.82l-3.23,3.23 L0.96,16l3.35-3.34C5.41,13.44,6.67,14,8,14c4.37,0,8-6,8-6S14.73,5.91,12.79,4.2z M2,7.97c1.07-1.47,3.61-4,6-4 c0.8,0,1.6,0.27,2.35,0.68L9.57,5.43C9.11,5.14,8.58,4.97,8,4.97c-1.66,0-3,1.34-3,3c0,0.58,0.17,1.11,0.46,1.57l-0.97,0.97 C3.36,9.64,2.45,8.59,2,7.97z M8,11.97c-0.8,0-1.59-0.27-2.33-0.67l0.78-0.77C6.9,10.8,7.43,10.97,8,10.97c1.66,0,3-1.34,3-3 c0-0.57-0.17-1.09-0.44-1.55l0.98-0.98c1.11,0.87,2.01,1.91,2.46,2.52C12.93,9.44,10.39,11.97,8,11.97z"></path></g></svg>'},70:(e,t,i)=>{"use strict";i.d(t,{NW:()=>l,QV:()=>a,QX:()=>u,Qk:()=>o,gf:()=>n});var r=i(156),s=i(240),n=function(){function e(){}return e.createSelector=function(t,i,r,s){var n=document.createElement("div");n.className="sa-question__select-wrapper";var o=e.createElement("span","sa-question__select-title"),a=document.createElement("select");return a.className="sa-question__select",a.onchange=r,n.appendChild(a),n.__updateSelect=function(){var r;r=!!s&&("string"==typeof s?s:s()),o.innerText=r,r?n.insertBefore(o,a):o.parentElement===n&&n.removeChild(o),function(){a.innerHTML="";var r=t||[];(Array.isArray(r)?r:r()).forEach((function(t){var r=e.createElement("option","",{value:t.value,text:t.text,selected:i(t)});a.appendChild(r)}))}()},n.__updateSelect(),n},e.createButton=function(t,i,r){return void 0===i&&(i=""),void 0===r&&(r="sa-toolbar__button"),e.createElement("span",r,{innerText:i,onclick:t})},e.createElement=function(e,t,i){void 0===t&&(t="");var r=document.createElement(e);return r.className=t,i&&Object.keys(i).forEach((function(e){r[e]=i[e]})),r},e.createSvgElement=function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","svg"),i=document.createElementNS("http://www.w3.org/2000/svg","use");return i.setAttributeNS("http://www.w3.org/1999/xlink","href","#sa-svg-"+e),t.appendChild(i),t},e.createSvgButton=function(t){var i=e.createElement("button","sa-table__svg-button");return i.appendChild(e.createSvgElement(t)),i},e.createSvgToggleButton=function(t,i,r,s,n,o,a,l){void 0===a&&(a="first"),void 0===l&&(l="sa-toolbar__button sa-toolbar__svg-button");var u=e.createSvgElement(t),h=e.createSvgElement(i),c=e.createElement("button",l);return"first"===a?(c.title=r,c.appendChild(u)):(a="second")&&(c.title=s,c.appendChild(h)),c.onclick=function(e){"first"===a?(a="second",c.title=s,c.removeChild(u),c.appendChild(h),o(e)):"second"===a&&(a="first",c.title=r,c.removeChild(h),c.appendChild(u),n(e))},c},e.createInput=function(t,i,r){return void 0===i&&(i=""),void 0===r&&(r=""),e.createElement("input",t,{placeholder:i,defaultValue:r})},e}();function o(){var e,t=n.createElement("div","sa-commercial"),i=n.createElement("div","sa-commercial__text"),o=n.createElement("span",""),a=n.createElement("span","sa-commercial__product",{innerHTML:(e=!!r.glc&&(0,r.glc)(1),e&&e.toLocaleDateString?s.qG.getString("license2").replace("{date}",e.toLocaleDateString()):s.qG.getString("license"))});return t.appendChild(i).appendChild(o),o.appendChild(a),t}function a(){var e=n.createElement("div","sa-data-loading-indicator-panel"),t=n.createElement("div","sa-data-loading-indicator");return t.innerHTML='\n <svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">\n <g clip-path="url(#clip0_17928_11482)">\n <path d="M32 64C14.36 64 0 49.65 0 32C0 14.35 14.36 0 32 0C49.64 0 64 14.35 64 32C64 49.65 49.64 64 32 64ZM32 4C16.56 4 4 16.56 4 32C4 47.44 16.56 60 32 60C47.44 60 60 47.44 60 32C60 16.56 47.44 4 32 4Z" fill="#E5E5E5"></path>\n <path d="M53.2101 55.2104C52.7001 55.2104 52.1901 55.0104 51.8001 54.6204C51.0201 53.8404 51.0201 52.5704 51.8001 51.7904C57.0901 46.5004 60.0001 39.4704 60.0001 31.9904C60.0001 24.5104 57.0901 17.4804 51.8001 12.1904C51.0201 11.4104 51.0201 10.1404 51.8001 9.36039C52.5801 8.58039 53.8501 8.58039 54.6301 9.36039C60.6701 15.4004 64.0001 23.4404 64.0001 31.9904C64.0001 40.5404 60.6701 48.5704 54.6301 54.6204C54.2401 55.0104 53.7301 55.2104 53.2201 55.2104H53.2101Z" fill="#19B394"></path>\n </g>\n <defs>\n <clipPath id="clip0_17928_11482">\n <rect width="64" height="64" fill="white"></rect>\n </clipPath>\n </defs>\n </svg>\n ',e.appendChild(t),e}window.URL.createObjectURL;var l=function(){function e(){}return e.zipArrays=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var i=[],r=function(t){i[t]=[],e.forEach((function(e){i[t].push(e[t])}))},s=0;s<e[0].length;s++)r(s);return i},e.unzipArrays=function(e){var t=[];return e.forEach((function(e,i){e.forEach((function(e,r){t[r]||(t[r]=[]),t[r][i]=e}))})),t},e.sortDictionary=function(e,t,i){var r=this.zipArrays(e,t),s=function(e,t,i){void 0===i&&(i=!0);var r=e[1]<t[1]?1:e[1]==t[1]?0:-1;return i?r:-1*r};r.sort((function(e,t){return i?s(e,t,!1):s(e,t)}));var n=this.unzipArrays(r);return{keys:n[0],values:n[1]}},e.toPercentage=function(e,t){return e/t*100},e}();function u(e,t){void 0===t&&(t=2);var i=Math.pow(10,t);return Math.round(i*e)/i}},87:(e,t,i)=>{"use strict";i.d(t,{C6:()=>s,Cl:()=>r,YH:()=>o,sH:()=>n});var r=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var s in t=arguments[i])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e};function s(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);function r(){this.constructor=e}e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function n(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))}function o(e,t){var i,r,s,n,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return n={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function a(n){return function(a){return function(n){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,r&&(s=2&n[0]?r.return:n[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,n[1])).done)return s;switch(r=0,s&&(n=[2&n[0],s.value]),n[0]){case 0:case 1:s=n;break;case 4:return o.label++,{value:n[1],done:!1};case 5:o.label++,r=n[1],n=[0];continue;case 7:n=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==n[0]&&2!==n[0])){o=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]<s[3])){o.label=n[1];break}if(6===n[0]&&o.label<s[1]){o.label=s[1],s=n;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(n);break}s[2]&&o.ops.pop(),o.trys.pop();continue}n=t.call(e,o)}catch(e){n=[6,e],r=0}finally{i=s=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,a])}}}},143:(e,t,i)=>{"use strict";i.d(t,{u:()=>a});var r=i(87),s=i(156),n=i(183),o=i(557),a=function(e){function t(t,i,r,s){var n=e.call(this,t,i,r,s||"matrix")||this;return n._transposeData=!0,n}return(0,r.C6)(t,e),Object.defineProperty(t.prototype,"matrixQuestion",{get:function(){return this.question},enumerable:!1,configurable:!0}),t.prototype.isSupportMissingAnswers=function(){return!1},t.prototype.getSeriesValues=function(){return this.matrixQuestion.rows.map((function(e){return""+e.value}))},t.prototype.getSeriesLabels=function(){var e=this;return this.matrixQuestion.rows.map((function(t){return s.ItemValue.getTextOrHtmlByValue(e.matrixQuestion.rows,t.value)}))},t.prototype.getSelectedItemByText=function(e){return this.matrixQuestion.columns.filter((function(t){return t.text===e}))[0]},t.prototype.valuesSource=function(){return this.matrixQuestion.columns},t.prototype.getHasAnswersInAllSeriesArray=function(e){for(var t=Array(),i=0;i<e[0].length;i++)for(var r=0;r<e.length;r++)0!=e[r][i]&&(t[i]=!0);return t},t.prototype.getHasAnswersInSeries=function(e){for(var t=0;t<e.length;t++)if(0!=e[t])return!0;return!1},t.prototype.hideEmptyAnswersInData=function(e){for(var t={datasets:[],labels:[],colors:[],texts:[],seriesLabels:[]},i=this.getHasAnswersInAllSeriesArray(e.datasets),r=0;r<e.datasets.length;r++)if(this.getHasAnswersInSeries(e.datasets[r])){t.labels.push(e.labels[r]),t.colors.push(e.colors[r]);for(var s=[],n=[],o=0;o<e.datasets[0].length;o++)i[o]&&(s.push(e.datasets[r][o]),n.push(e.texts[r][o]));t.datasets.push(s),t.texts.push(n)}for(r=0;r<e.datasets[0].length;r++)i[r]&&t.seriesLabels.push(e.seriesLabels[r]);return t},t}(n.o);o.g.registerVisualizer("matrix",a)},156:t=>{"use strict";t.exports=e},183:(e,t,i)=>{"use strict";i.d(t,{M:()=>u,o:()=>h});var r=i(87),s=i(156),n=i(267),o=i(240),a=i(70),l=i(557);function u(e){var t={datasets:[],labels:[],colors:[],texts:[],seriesLabels:[]};if(0===e.seriesLabels.length){t.datasets.push([]),t.texts.push([]);for(var i=0;i<e.datasets[0].length;i++)0!=e.datasets[0][i]&&(t.datasets[0].push(e.datasets[0][i]),t.labels.push(e.labels[i]),t.colors.push(e.colors[i]),t.texts[0].push(e.texts[0][i]));return t}var r=[];r.length=e.seriesLabels.length;var s=[];s.length=e.labels.length;for(var n=0;n<e.seriesLabels.length;n++)for(var o=0;o<e.labels.length;o++)0!=e.datasets[n][o]&&(r[n]=!0,s[o]=!0);for(o=0;o<s.length;o++)s[o]&&(t.labels.push(e.labels[o]),t.colors.push(e.colors[o]));for(n=0;n<e.seriesLabels.length;n++)r[n]&&t.seriesLabels.push(e.seriesLabels[n]);for(n=0;n<e.datasets.length;n++)if(r[n]){var a=[],l=[];for(o=0;o<e.labels.length;o++)s[o]&&(a.push(e.datasets[n][o]),l.push(e.texts[n][o]));t.datasets.push(a),t.texts.push(l)}return t}var h=function(e){function t(i,r,l,u){var h=e.call(this,i,r,l,u||"selectBase")||this;return h.selectedItem=void 0,h.choicesOrderSelector=void 0,h.showPercentageBtn=void 0,h.emptyAnswersBtn=void 0,h.transposeDataBtn=void 0,h.topNSelector=void 0,h._showOnlyPercentages=!1,h._percentagePrecision=2,h._answersOrder="default",h._hideEmptyAnswers=!1,h._topN=-1,h.topNValues=[].concat(t.topNValuesDefaults),h._transposeData=!1,h._showMissingAnswers=!1,h.missingAnswersBtn=void 0,h.chartTypes=[],h._chartType="bar",h.onAnswersDataReady=new s.Event,i&&(i.visibleChoicesChangedCallback=function(){h.dataProvider.raiseDataChanged()}),h._supportSelection=!0,h._showOnlyPercentages=!0===h.options.showOnlyPercentages,h.options.percentagePrecision&&(h._percentagePrecision=h.options.percentagePrecision),void 0!==h.options.transposeData&&(h._transposeData=h.options.transposeData),h._hideEmptyAnswers=!0===h.options.hideEmptyAnswers,h._answersOrder=h.options.answersOrder||"default",h._showMissingAnswers=h.isSupportMissingAnswers()&&!0===h.options.showMissingAnswers,h.options.allowExperimentalFeatures,n.w.chartAdapterType&&(h._chartAdapter=new n.w.chartAdapterType(h),h.chartTypes=h._chartAdapter.getChartTypes(),h.getSeriesValues().length>0&&-1===h.chartTypes.indexOf("stackedbar")&&h.chartTypes.push("stackedbar"),h._chartType=h.chartTypes[0],-1!==h.chartTypes.indexOf(h.options.defaultChartType)&&(h._chartType=h.options.defaultChartType)),h.registerToolbarItem("changeChartType",(function(){return h.chartTypes.length>1?a.gf.createSelector(h.chartTypes.map((function(e){return{value:e,text:o.qG.getString("chartType_"+e)}})),(function(e){return h.chartType===e.value}),(function(e){h.setChartType(e.target.value)})):null})),h.registerToolbarItem("changeAnswersOrder",(function(){return h.isSupportAnswersOrder()&&(h.choicesOrderSelector=a.gf.createSelector([{text:o.qG.getString("defaultOrder"),value:"default"},{text:o.qG.getString("ascOrder"),value:"asc"},{text:o.qG.getString("descOrder"),value:"desc"}],(function(e){return!1}),(function(e){h.answersOrder=e.target.value})),h.updateOrderSelector()),h.choicesOrderSelector})),h.registerToolbarItem("showPercentages",(function(){if(h.options.allowShowPercentages&&(-1!==h.chartTypes.indexOf("bar")||-1!==h.chartTypes.indexOf("stackedbar")))return h.showPercentageBtn=a.gf.createButton((function(){h.showPercentages=!h.showPercentages})),h.updateShowPercentageBtn(),h.showPercentageBtn})),h.registerToolbarItem("hideEmptyAnswers",(function(){return h.options.allowHideEmptyAnswers&&(h.emptyAnswersBtn=a.gf.createButton((function(){h.hideEmptyAnswers=!h._hideEmptyAnswers})),h.updateEmptyAnswersBtn()),h.emptyAnswersBtn}),1e3),h.registerToolbarItem("topNAnswers",(function(){return h.options.allowTopNAnswers&&0===h.getSeriesValues().length&&(h.topNSelector=a.gf.createSelector(h.topNValues.map((function(e){return{text:o.qG.getString("topNValueText"+e),value:e}})),(function(e){return!1}),(function(e){h.topN=parseInt(e.target.value)})),h.updateTopNSelector()),h.topNSelector})),h.registerToolbarItem("transposeData",(function(){return h.options.allowTransposeData&&(h.transposeDataBtn=a.gf.createButton((function(){h.transposeData=!h.transposeData})),h.updateTransposeDataBtn()),h.transposeDataBtn})),h.registerToolbarItem("showMissingAnswers",(function(){return h.isSupportMissingAnswers()&&h.options.allowShowMissingAnswers&&(h.missingAnswersBtn=a.gf.createButton((function(){h.showMissingAnswers=!h._showMissingAnswers})),h.updateMissingAnswersBtn()),h.missingAnswersBtn})),h}return(0,r.C6)(t,e),Object.defineProperty(t.prototype,"chartType",{get:function(){return this._chartType},set:function(e){this.setChartType(e)},enumerable:!1,configurable:!0}),t.prototype.updateEmptyAnswersBtn=function(){this.emptyAnswersBtn&&(this.emptyAnswersBtn.innerText=this._hideEmptyAnswers?o.qG.getString("showEmptyAnswers"):o.qG.getString("hideEmptyAnswers"),"bar"==this.chartType||"vbar"==this.chartType||"line"==this.chartType||"scatter"==this.chartType?this.emptyAnswersBtn.style.display="inline":this.emptyAnswersBtn.style.display="none")},t.prototype.updateTransposeDataBtn=function(){this.transposeDataBtn&&(this.transposeDataBtn.innerText=this.transposeData?o.qG.getString("showPerColumns"):o.qG.getString("showPerValues"),this.getSeriesValues().length>0?this.transposeDataBtn.style.display="inline":this.transposeDataBtn.style.display="none")},t.prototype.updateOrderSelector=function(){this.choicesOrderSelector&&("bar"==this.chartType||"vbar"==this.chartType||"line"==this.chartType||"scatter"==this.chartType||("pie"==this.chartType||"doughnut"==this.chartType)&&this.topN>0?this.choicesOrderSelector.style.display="inline-flex":this.choicesOrderSelector.style.display="none",this.choicesOrderSelector.getElementsByTagName("select")[0].value=this.answersOrder)},t.prototype.updateShowPercentageBtn=function(){this.showPercentageBtn&&(this.showPercentageBtn.innerText=this._showPercentages?o.qG.getString("hidePercentages"):o.qG.getString("showPercentages"),"bar"==this.chartType||"vbar"==this.chartType||"stackedbar"==this.chartType?this.showPercentageBtn.style.display="inline":this.showPercentageBtn.style.display="none")},t.prototype.updateTopNSelector=function(){this.topNSelector&&(this.topNSelector.getElementsByTagName("select")[0].value=this._topN)},t.prototype.updateMissingAnswersBtn=function(){this.missingAnswersBtn&&(this.missingAnswersBtn.innerText=this._showMissingAnswers?o.qG.getString("hideMissingAnswers"):o.qG.getString("showMissingAnswers"))},t.prototype.onChartTypeChanged=function(){this.updateOrderSelector(),this.updateShowPercentageBtn(),this.updateEmptyAnswersBtn(),this.updateTopNSelector(),this.stateChanged("chartType",this._chartType)},t.prototype.setChartType=function(e){-1!==this.chartTypes.indexOf(e)&&this._chartType!==e&&(this._chartType=e,this.onChartTypeChanged(),this.refreshContent())},t.prototype.getCorrectAnswerText=function(){var t=e.prototype.getCorrectAnswerText.call(this),i=Array.isArray(t)?t:[t],r=this.question;return i.map((function(e){return s.ItemValue.getTextOrHtmlByValue(r.choices,e)})).join(", ")},t.prototype.isSupportSoftUpdateContent=function(){return!0},t.prototype.softUpdateContent=function(){var e,t=null===(e=this.contentContainer)||void 0===e?void 0:e.children[0];t&&this._chartAdapter.update(t)},t.prototype.getSelectedItemByText=function(e){var t=this.question;return this.question.hasOther&&e==t.otherText?t.otherItem:t.choices.filter((function(t){return t.text===e}))[0]},t.prototype.setSelection=function(e){var t;this.selectedItem!==e&&(this.selectedItem=e,void 0!==this.onDataItemSelected&&this.onDataItemSelected(void 0!==e?e.value:void 0,void 0!==e?e.text:""),this.stateChanged("filter",null===(t=this.selectedItem)||void 0===t?void 0:t.value))},Object.defineProperty(t.prototype,"selection",{get:function(){return this.selectedItem},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showOnlyPercentages",{get:function(){return this._showOnlyPercentages},set:function(e){this._showOnlyPercentages=e,this.refreshContent(),this.stateChanged("showOnlyPercentages",e)},enumerable:!1,configurable:!0}),t.prototype.getShowPercentagesDefault=function(){return void 0===this.options.showPercentages?-1!==["pie","doughnut"].indexOf(this.chartType):!0===this.options.showPercentages},Object.defineProperty(t.prototype,"showPercentages",{get:function(){return void 0!==this._showPercentages?this._showPercentages:this.getShowPercentagesDefault()},set:function(e){this._showPercentages=e,this.updateShowPercentageBtn(),this.refreshContent(),this.stateChanged("showPercentages",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"answersOrder",{get:function(){return this._answersOrder},set:function(e){this._answersOrder=e,this.updateOrderSelector(),this.refreshContent(),this.stateChanged("answersOrder",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hideEmptyAnswers",{get:function(){return this._hideEmptyAnswers},set:function(e){this._hideEmptyAnswers=e,this.updateEmptyAnswersBtn(),this.refreshContent(),this.stateChanged("hideEmptyAnswers",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transposeData",{get:function(){return this._transposeData},set:function(e){this._transposeData=e,this.updateTransposeDataBtn(),this.refreshContent(),this.stateChanged("transposeData",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"topN",{get:function(){return this._topN},set:function(e){this._topN=e,this.updateTopNSelector(),this.updateOrderSelector(),this.refreshContent(),this.stateChanged("topN",e)},enumerable:!1,configurable:!0}),t.prototype.isSupportAnswersOrder=function(){return!1!==this.options.allowSortAnswers&&!1!==this.options.allowChangeAnswersOrder&&0===this.getSeriesValues().length},t.prototype.isSupportMissingAnswers=function(){return!0},Object.defineProperty(t.prototype,"showMissingAnswers",{get:function(){return this._showMissingAnswers},set:function(e){this._showMissingAnswers=this.isSupportMissingAnswers()&&e,this.updateMissingAnswersBtn(),this.dataProvider.raiseDataChanged(this.name),this.refreshContent(),this.stateChanged("showMissingAnsewrs",e)},enumerable:!1,configurable:!0}),t.prototype.refreshContent=function(){this.contentContainer&&(this.destroyContent(this.contentContainer),this.renderContent(this.contentContainer)),this.invokeOnUpdate()},Object.defineProperty(t.prototype,"showValuesInOriginalOrder",{get:function(){return!1!==this.options.showValuesInOriginalOrder},enumerable:!1,configurable:!0}),t.prototype.valuesSource=function(){var e=this.question;return e.choicesFromQuestion&&e.survey&&(e=e.survey.getQuestionByName(e.choicesFromQuestion)),e.activeChoices||e.visibleChoices||e.choices||[]},t.prototype.getValues=function(){var e=this.valuesSource().map((function(e){return e.value}));return this.question.hasNone&&e.push(this.question.noneItem.value),this.question.hasOther&&e.push("other"),this.showMissingAnswers&&e.unshift(void 0),this.showValuesInOriginalOrder?e.reverse():e},t.prototype.getLabels=function(){var e=this;if(this.options.useValuesAsLabels)return this.getValues();var t=this.valuesSource().map((function(t){return s.ItemValue.getTextOrHtmlByValue(e.valuesSource(),t.value)})),i=this.question;return i.hasNone&&t.push(i.noneText),i.hasOther&&t.push(i.otherText),this.showMissingAnswers&&t.unshift(o.qG.getString("missingAnswersLabel")),this.showValuesInOriginalOrder?t.reverse():t},t.prototype.getPercentages=function(e){var t=[],i=this._percentagePrecision;if(e.length<2){var r=e[0].reduce((function(e,t){return e+t}),0);t[0]=e[0].map((function(e){var t=i?+(e/r*100).toFixed(i):Math.round(e/r*100);return r&&t}))}else for(var s=0;s<e[0].length;s++){r=0;for(var n=0;n<e.length;n++)r+=e[n][s];for(n=0;n<e.length;n++){Array.isArray(t[n])||(t[n]=[]);var o=i?+(e[n][s]/r*100).toFixed(i):Math.round(e[n][s]/r*100);t[n][s]=r&&o}}return t},t.prototype.answersDataReady=function(e){var t={};return t=this.hideEmptyAnswers?u(e):e,this.topN>0&&(t.datasets[0]=t.datasets[0].slice(-this.topN),t.labels=t.labels.slice(-this.topN),t.colors=t.colors.slice(-this.topN),t.texts[0]=t.texts[0].slice(-this.topN)),t},t.prototype.getAnswersData=function(){return(0,r.sH)(this,void 0,void 0,(function(){var e,t,i,s,n,o,l,u,h,c;return(0,r.YH)(this,(function(r){switch(r.label){case 0:return e=this.getSeriesLabels(),[4,this.getCalculatedValues()];case 1:return t=r.sent(),i=this.getLabels(),s=this.getColors(),this.transposeData&&(t=this.transpose(t),n=e,e=i,i=n),o=this.showPercentages?this.getPercentages(t):t,"asc"!=this.answersOrder&&"desc"!=this.answersOrder||(l=this.showPercentages?a.NW.zipArrays(i,s,o[0]):a.NW.zipArrays(i,s),u=a.NW.sortDictionary(l,t[0],"desc"==this.answersOrder),h=a.NW.unzipArrays(u.keys),i=h[0],s=h[1],this.showPercentages&&(o[0]=h[2]),t[0]=u.values),c={datasets:t,labels:i,colors:s,texts:o,seriesLabels:e},c=this.answersDataReady(c),this.onAnswersDataReady.fire(this,c),[2,c]}}))}))},t.prototype.convertFromExternalData=function(e){var t=this.getValues(),i=this.getSeriesValues(),r=[];if(i.length>0)for(var s=0;s<i.length;s++){for(var n=[],o=0;o<t.length;o++)e[i[s]]?n.push(e[i[s]][t[o]]||0):n.push(0);r.push(n)}else{for(n=[],o=0;o<t.length;o++)n.push(e[t[o]]||0);r.push(n)}return r},t.prototype.transpose=function(e){for(var t=e[0].length,i=new Array(t),r=0;r<t;++r)i[r]=new Array(e.length);for(r=0;r<e.length;++r)for(var s=0;s<t;++s)i[s][r]=e[r][s];return i},t.prototype.getState=function(){var e=this,i={};return t._stateProperties.forEach((function(t){i[t]=e[t]})),this.selectedItem&&(i.filter=this.selectedItem.value),i},t.prototype.setState=function(e){var i=this;t._stateProperties.forEach((function(t){void 0!==e[t]&&(i[t]=e[t])}));var r=s.ItemValue.getItemByValue(this.question.visibleChoices,e.filter);this.setSelection(null!=r?r:void 0)},t.prototype.resetState=function(){e.prototype.resetState.call(this),this._hideEmptyAnswers=!0===this.options.hideEmptyAnswers,this._answersOrder=this.options.answersOrder||"default",this._topN=-1,this.chartType=this.chartTypes[0],this.setSelection(void 0)},t.topNValuesDefaults=[-1,5,10,20],t._stateProperties=["chartType","answersOrder","hideEmptyAnswers","topN"],t}(n.w);l.g.registerVisualizer("checkbox",h),l.g.registerVisualizer("radiogroup",h),l.g.registerVisualizer("dropdown",h),l.g.registerVisualizer("imagepicker",h),l.g.registerVisualizer("tagbox",h),l.g.registerVisualizer("rating",h,100)},226:(e,t,i)=>{"use strict";i.d(t,{Y:()=>u});var r=i(87),s=i(156),n=i(555),o=i(183),a=i(557),l=i(873),u=function(e){function t(t,i,r,s){var n=e.call(this,t,i,r,s||"histogram")||this;return n.valueType="number",n._cachedValues=void 0,n._continuousData=void 0,n._cachedIntervals=void 0,n._intervalPrecision=2,n._transposeData=!1,void 0!==n.options.intervalPrecision&&(n._intervalPrecision=n.options.intervalPrecision),"text"!==t.getType()||"date"!==t.inputType&&"datetime"!==t.inputType?n.valueType="number":n.valueType="date",n}return(0,r.C6)(t,e),t.prototype.reset=function(){this._continuousData=void 0,this._cachedValues=void 0,this._cachedIntervals=void 0},t.prototype.getContinuousValue=function(e){return"date"===this.valueType?Date.parse(e):parseFloat(e)},t.prototype.getString=function(e){return"date"===this.valueType?new Date(e).toLocaleDateString():""+e},t.prototype.toPrecision=function(e){var t=Math.pow(10,this._intervalPrecision);return Math.round(t*e)/t},t.prototype.getSelectedItemByText=function(e){if(this.hasCustomIntervals||this.getContinuousValues().length>t.UseIntervalsFrom){var i=this.intervals.filter((function(t){return t.label===e}))[0];return new s.ItemValue(i,void 0!==i?i.label:"")}var r=this.getLabels(),n=r.indexOf(e);return new s.ItemValue(this.getValues()[n],r[n])},t.prototype.updateData=function(t){this.reset(),e.prototype.updateData.call(this,t)},t.prototype.onDataChanged=function(){this.reset(),e.prototype.onDataChanged.call(this)},t.prototype.getContinuousValues=function(){var e=this;if(void 0===this._cachedValues){var t=this.getSeriesValues();0===t.length&&t.push(""),this._continuousData={},t.forEach((function(t){return e._continuousData[t]=[]}));var i={};this.data.forEach((function(t){var r=t[e.name];if(void 0!==r){var s=t[n.M.seriesMarkerKey]||"";e._continuousData[s].push(e.getContinuousValue(r)),i[r]=r}})),this._cachedValues=Object.keys(i).map((function(t){return{original:i[t],continuous:e.getContinuousValue(t)}})),this._cachedValues.sort((function(e,t){return e.continuous-t.continuous}))}return this._cachedValues},t.prototype.isSupportMissingAnswers=function(){return!1},Object.defineProperty(t.prototype,"needUseRateValues",{get:function(){return"rating"==this.question.getType()&&Array.isArray(this.question.rateValues)&&this.question.rateValues.length>0},enumerable:!1,configurable:!0}),t.prototype.getValues=function(){return this.intervals.map((function(e){return e.start}))},t.prototype.getLabels=function(){return this.intervals.map((function(e){return e.label}))},Object.defineProperty(t.prototype,"hasCustomIntervals",{get:function(){return!!this.questionOptions&&Array.isArray(this.questionOptions.intervals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"intervals",{get:function(){if(this.hasCustomIntervals)return this.questionOptions.intervals;if("rating"==this.question.getType()){if(this.needUseRateValues){var e=this.question.rateValues;return e.sort((function(e,t){return e.value-t.value})),e.map((function(t,i){return{start:t.value,end:i<e.length-1?e[i+1].value:t.value+1,label:t.text}}))}for(var i=[],r=this.question.rateMin||0;r<=(this.question.rateMax||t.IntervalsCount-1);r+=this.question.rateStep||1)i.push({start:r,end:r+1,label:""+(this.question.rateMin&&this.question.rateMax?r:r+"-"+(r+1))});return i}if(void 0===this._cachedIntervals){var s=this.getContinuousValues();if(this._cachedIntervals=[],s.length){var n=s[0].continuous,o=s[s.length-1].continuous,a=t.IntervalsCount,l=(o-n)/a;for(r=0;r<a;++r){var u=n+l,h=this.toPrecision(n),c=this.toPrecision(u);this._cachedIntervals.push({start:h,end:r<a-1?c:c+l/100,label:this.getString(h)+"-"+this.getString(c)}),n=u}}}return this._cachedIntervals},enumerable:!1,configurable:!0}),t.prototype.convertFromExternalData=function(e){return[e]},t.prototype.getCalculatedValuesCore=function(){return this.getContinuousValues(),(0,l.er)(this._continuousData,this.intervals,this.getSeriesValues())},t.prototype.getValueType=function(){return this.valueType},t.IntervalsCount=10,t.UseIntervalsFrom=10,t}(o.o);a.g.registerVisualizer("date",u),a.g.registerVisualizer("number",u,100),a.g.registerVisualizer("rating",u,300)},240:(e,t,i)=>{"use strict";i.d(t,{DQ:()=>o,UN:()=>a,qG:()=>n});var r=i(391),s=i(156),n={currentLocaleValue:"",defaultLocaleValue:"en",locales:{},localeNames:{},supportedLocales:[],get currentLocale(){return this.currentLocaleValue===this.defaultLocaleValue?"":this.currentLocaleValue},set currentLocale(e){this.currentLocaleValue=e},get defaultLocale(){return this.defaultLocaleValue},set defaultLocale(e){this.defaultLocaleValue=e},setupLocale:function(e,t){this.locales[e]=t},getLocaleName:function(e,t){return void 0===t&&(t=!1),(t?"":this.localeNames[e])||s.surveyLocalization.getLocaleName(e,t)},getString:function(e){var t=this.currentLocale?this.locales[this.currentLocale]:this.locales[this.defaultLocale];t&&t[e]||(t=this.locales[this.defaultLocale]);var i=t[e];return void 0===i&&(i=this.locales.en[e]||e),i},getLocales:function(){var e=[];if(e.push(""),this.supportedLocales&&this.supportedLocales.length>0)for(var t=0;t<this.supportedLocales.length;t++)e.push(this.supportedLocales[t]);else for(var i in this.locales)e.push(i);return e.sort(),e}},o=r.z;function a(e){var t=e.localeCode;n.setupLocale(t,e.strings),e.nativeName&&(n.localeNames[t]=e.nativeName)}a({localeCode:"en",strings:r.z,nativeName:"English"})},267:(e,t,i)=>{"use strict";i.d(t,{b:()=>c,w:()=>d});var r=i(87),s=i(156),n=i(555),o=i(818),a=i(557),l=i(70),u=i(240),h=i(873),c=function(){function e(){}return e.postpone=function(t,i){return e.postponeFunction?e.postponeFunction(t,i):setTimeout(t,i)},e}(),d=function(){function e(t,i,r,o){void 0===r&&(r={});var a,l=this;this.question=t,this.options=r,this._type=o,this._showToolbar=!0,this._footerVisualizer=void 0,this._dataProvider=void 0,this._getDataCore=void 0,this.labelTruncateLength=27,this.haveCommercialLicense=!1,this.renderResult=void 0,this.toolbarContainer=void 0,this.headerContainer=void 0,this.contentContainer=void 0,this.footerContainer=void 0,this._supportSelection=!1,this._chartAdapter=void 0,this._footerIsCollapsed=void 0,this.onAfterRender=new s.Event,this.onLocaleChanged=new s.Event,this.onStateChanged=new s.Event,this.toolbarItemCreators={},this._backgroundColor="#f7f7f7",this._calculationsCache=void 0,this.loadingData=!1,this._settingState=!1;var u=s.hasLicense;this.haveCommercialLicense=!!u&&u(4)||e.haveCommercialLicense||void 0!==r.haveCommercialLicense&&r.haveCommercialLicense,this._getDataCore=null===(a=this.questionOptions)||void 0===a?void 0:a.getDataCore,this._dataProvider=r.dataProvider||new n.M(i),this._dataProvider.onDataChanged.add((function(){return l.onDataChanged()})),this.loadingData=!!this._dataProvider.dataFn,void 0!==r.labelTruncateLength&&(this.labelTruncateLength=r.labelTruncateLength)}return e.prototype.afterRender=function(e){this.onAfterRender.fire(this,{htmlElement:e})},e.prototype.stateChanged=function(e,t){this._settingState||this.onStateChanged.fire(this,this.getState())},e.prototype.getToolbarItemCreators=function(){return Object.assign({},this.toolbarItemCreators,this.onGetToolbarItemCreators&&this.onGetToolbarItemCreators()||{})},Object.defineProperty(e.prototype,"questionOptions",{get:function(){var e;return this.options[null===(e=this.question)||void 0===e?void 0:e.name]},enumerable:!1,configurable:!0}),e.prototype.onDataChanged=function(){this._calculationsCache=void 0,this.loadingData=!!this._dataProvider.dataFn,this.refresh()},Object.defineProperty(e.prototype,"name",{get:function(){return this.question.valueName||this.question.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataNames",{get:function(){return[this.name]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasHeader",{get:function(){return!!(this.options&&this.options.showCorrectAnswers&&this.question&&this.question.correctAnswer)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasFooter",{get:function(){return!!this.question&&(this.question.hasComment||this.question.hasOther)},enumerable:!1,configurable:!0}),e.prototype.createVisualizer=function(e,t,i){var r=Object.assign({},t||this.options);return void 0===r.dataProvider&&(r.dataProvider=this.dataProvider),o.D.createVisualizer(e,i||this.data,r)},Object.defineProperty(e.prototype,"footerVisualizer",{get:function(){var e=this;if(this.hasFooter){if(!this._footerVisualizer){var t=new s.QuestionCommentModel(this.question.name+(s.settings||{}).commentPrefix);t.title=this.processText(this.question.title);var i=Object.assign({},this.options);i.renderContent=void 0,this._footerVisualizer=this.createVisualizer(t,i),this._footerVisualizer&&(this._footerVisualizer.onUpdate=function(){return e.invokeOnUpdate()})}return this._footerVisualizer}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"supportSelection",{get:function(){return(void 0===this.options.allowSelection||this.options.allowSelection)&&this._supportSelection},enumerable:!1,configurable:!0}),e.prototype.getSeriesValues=function(){return this.options.seriesValues||[]},e.prototype.getSeriesLabels=function(){return this.options.seriesLabels||this.getSeriesValues()},e.prototype.getValues=function(){throw new Error("Method not implemented.")},e.prototype.getLabels=function(){return this.getValues()},e.prototype.registerToolbarItem=function(e,t,i){void 0===i&&(i=100),this.toolbarItemCreators[e]={creator:t,order:i}},e.prototype.unregisterToolbarItem=function(e){if(void 0!==this.toolbarItemCreators[e]){var t=this.toolbarItemCreators[e];return delete this.toolbarItemCreators[e],t.creator}},Object.defineProperty(e.prototype,"type",{get:function(){return this._type||"visualizer"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this.dataProvider.filteredData},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"surveyData",{get:function(){return this.dataProvider.filteredData},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataProvider",{get:function(){return this._dataProvider},enumerable:!1,configurable:!0}),e.prototype.updateData=function(e){var t=this.options.dataPath,i=e;t&&Array.isArray(e)&&(i=[],e.forEach((function(e){e&&void 0!==e[t]&&(Array.isArray(e[t])?i=i.concat(e[t]):i.push(e[t]))}))),this.options.dataProvider||(this.dataProvider.data=i),this.hasFooter&&this.footerVisualizer.updateData(i)},e.prototype.invokeOnUpdate=function(){this.onUpdate&&this.onUpdate()},e.prototype.destroy=function(){this.renderResult&&(this.clear(),this.toolbarContainer=void 0,this.headerContainer=void 0,this.contentContainer=void 0,this.footerContainer=void 0,this.renderResult.innerHTML="",this.renderResult=void 0),this._footerVisualizer&&(this._footerVisualizer.destroy(),this._footerVisualizer.onUpdate=void 0,this._footerVisualizer=void 0)},e.prototype.clear=function(){this.toolbarContainer&&this.destroyToolbar(this.toolbarContainer),this.headerContainer&&this.destroyHeader(this.headerContainer),this.contentContainer&&this.destroyContent(this.contentContainer),this.footerContainer&&this.destroyFooter(this.footerContainer)},e.prototype.createToolbarItems=function(e){var t=this.getToolbarItemCreators();Object.keys(t||{}).map((function(e){return(0,r.Cl)({name:e},t[e])})).sort((function(e,t){return e.order-t.order})).forEach((function(t){var i=t.creator(e);i&&e.appendChild(i)}))},e.prototype.getCorrectAnswerText=function(){return this.question?this.question.correctAnswer:""},e.prototype.destroyToolbar=function(e){e.innerHTML=""},e.prototype.renderToolbar=function(e){if(this.showToolbar){var t=l.gf.createElement("div","sa-toolbar");this.createToolbarItems(t),e.appendChild(t)}},e.prototype.destroyHeader=function(e){this.options&&"function"==typeof this.options.destroyHeader?this.options.destroyHeader(e,this):e.innerHTML=""},e.prototype.destroyContent=function(e){this.options&&"function"==typeof this.options.destroyContent?this.options.destroyContent(e,this):this._chartAdapter&&this._chartAdapter.destroy(e.children[0]),e.innerHTML=""},e.prototype.renderHeader=function(e){if(this.options&&"function"==typeof this.options.renderHeader)this.options.renderHeader(e,this);else{var t=l.gf.createElement("div","sa-visualizer__correct-answer");t.innerText=u.qG.getString("correctAnswer")+this.getCorrectAnswerText(),e.appendChild(t)}},e.prototype.renderContentAsync=function(e){return(0,r.sH)(this,void 0,void 0,(function(){var t;return(0,r.YH)(this,(function(i){switch(i.label){case 0:return this._chartAdapter?(t=l.gf.createElement("div"),e.innerHTML="",e.appendChild(t),[4,this._chartAdapter.create(t)]):[3,2];case 1:return i.sent(),[3,3];case 2:e.innerText=u.qG.getString("noVisualizerForQuestion"),i.label=3;case 3:return[2,e]}}))}))},e.prototype.ensureQuestionIsReady=function(){var e=this;return new Promise((function(t){e.question?e.question.waitForQuestionIsReady().then((function(){return t()})):t()}))},e.prototype.renderContent=function(e){var t=this;this.options&&"function"==typeof this.options.renderContent?!1!==this.options.renderContent(e,this)&&this.afterRender(e):(this.loadingData&&this.renderLoadingIndicator(this.contentContainer),this.ensureQuestionIsReady().then((function(){return t.renderContentAsync(e).then((function(e){return t.afterRender(e)}))})))},e.prototype.destroyFooter=function(e){e.innerHTML=""},Object.defineProperty(e.prototype,"isFooterCollapsed",{get:function(){return void 0===this._footerIsCollapsed&&(this._footerIsCollapsed=e.otherCommentCollapsed),this._footerIsCollapsed},set:function(e){this._footerIsCollapsed=e},enumerable:!1,configurable:!0}),e.prototype.renderFooter=function(e){var t=this;if(e.innerHTML="",this.hasFooter){var i=l.gf.createElement("h4","sa-visualizer__footer-title",{innerText:u.qG.getString("otherCommentTitle")});e.appendChild(i);var r=l.gf.createElement("div","sa-visualizer__footer-content");r.style.display=this.isFooterCollapsed?"none":"block";var s=u.qG.getString(this.isFooterCollapsed?"showButton":"hideButton"),n=l.gf.createButton((function(){"none"===r.style.display?(r.style.display="block",n.innerText=u.qG.getString("hideButton"),t._footerIsCollapsed=!1):(r.style.display="none",n.innerText=u.qG.getString("showButton"),t._footerIsCollapsed=!0),t.footerVisualizer.invokeOnUpdate()}),s);e.appendChild(n),e.appendChild(r),this.footerVisualizer.render(r)}},e.prototype.render=function(e){"string"==typeof e&&(e=document.getElementById(e)),this.renderResult=e,this.toolbarContainer=l.gf.createElement("div","sa-visualizer__toolbar"),e.appendChild(this.toolbarContainer),this.renderToolbar(this.toolbarContainer),this.hasHeader&&(this.headerContainer=l.gf.createElement("div","sa-visualizer__header"),e.appendChild(this.headerContainer),this.renderHeader(this.headerContainer)),this.contentContainer=l.gf.createElement("div","sa-visualizer__content"),e.appendChild(this.contentContainer),this.renderContent(this.contentContainer),this.footerContainer=l.gf.createElement("div","sa-visualizer__footer"),e.appendChild(this.footerContainer),this.renderFooter(this.footerContainer)},e.prototype.updateToolbar=function(){var e=this;this.toolbarContainer&&c.postpone((function(){e.destroyToolbar(e.toolbarContainer),e.renderToolbar(e.toolbarContainer)}))},e.prototype.isSupportSoftUpdateContent=function(){return!1},e.prototype.softUpdateContent=function(){},e.prototype.hardUpdateContent=function(){this.destroyContent(this.contentContainer),this.renderContent(this.contentContainer)},e.prototype.updateContent=function(){this.isSupportSoftUpdateContent()?this.softUpdateContent():this.hardUpdateContent()},e.prototype.refresh=function(){var e=this;this.headerContainer&&c.postpone((function(){e.destroyHeader(e.headerContainer),e.renderHeader(e.headerContainer),e.invokeOnUpdate()})),this.contentContainer&&c.postpone((function(){e.updateContent(),e.invokeOnUpdate()})),this.footerContainer&&c.postpone((function(){e.destroyFooter(e.footerContainer),e.renderFooter(e.footerContainer),e.invokeOnUpdate()}))},e.prototype.processText=function(e){return!1!==this.options.stripHtmlFromTitles?(e||"").replace(/(<([^>]+)>)/gi,""):e},e.prototype.getRandomColor=function(){var e=this.getColors();return e[Math.floor(Math.random()*e.length)]},Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this.getBackgroundColorCore()},set:function(e){this.setBackgroundColorCore(e)},enumerable:!1,configurable:!0}),e.prototype.getBackgroundColorCore=function(){return this._backgroundColor},e.prototype.setBackgroundColorCore=function(e){this._backgroundColor=e,this.footerVisualizer&&(this.footerVisualizer.backgroundColor=e)},e.prototype.getColors=function(t){void 0===t&&(t=10);for(var i=Array.isArray(e.customColors)&&e.customColors.length>0?e.customColors:e.colors,r=[],s=0;s<t;s++)r=r.concat(i);return r},Object.defineProperty(e.prototype,"showToolbar",{get:function(){return this._showToolbar},set:function(e){e!=this._showToolbar&&(this._showToolbar=e,this.toolbarContainer&&(this.destroyToolbar(this.toolbarContainer),this.renderToolbar(this.toolbarContainer)))},enumerable:!1,configurable:!0}),e.prototype.getData=function(){return this.getCalculatedValuesCore()},e.prototype.getCalculatedValuesCore=function(){return this._getDataCore?this._getDataCore(this):(0,h.X3)(this.surveyData,this)},e.prototype.renderLoadingIndicator=function(e){e.appendChild((0,l.QV)())},e.prototype.convertFromExternalData=function(e){return e},e.prototype.getCalculatedValues=function(){var e=this;return new Promise((function(t,i){if(void 0!==e._calculationsCache&&t(e._calculationsCache),e.dataProvider.dataFn){e.loadingData=!0;var r=e.dataProvider.dataFn({visualizer:e,filter:e.dataProvider.getFilters(),callback:function(r){e.loadingData=!1,!r.error&&Array.isArray(r.data)?(e._calculationsCache=e.convertFromExternalData(r.data),t(e._calculationsCache)):i()}});r&&r.then((function(i){e.loadingData=!1,e._calculationsCache=e.convertFromExternalData(i),t(e._calculationsCache)})).catch((function(){e.loadingData=!1,i()}))}else e._calculationsCache=e.getCalculatedValuesCore(),t(e._calculationsCache)}))},e.prototype.getState=function(){return{}},e.prototype.setState=function(e){},e.prototype.resetState=function(){},Object.defineProperty(e.prototype,"locale",{get:function(){var e=this.options.survey;return e?e.locale:u.qG.currentLocale},set:function(e){this.setLocale(e),this.onLocaleChanged.fire(this,{locale:e}),this.refresh()},enumerable:!1,configurable:!0}),e.prototype.setLocale=function(e){u.qG.currentLocale=e;var t=this.options.survey;t&&t.locale!==e&&(t.locale=e)},e.haveCommercialLicense=!1,e.suppressVisualizerStubRendering=!1,e.chartAdapterType=void 0,e.otherCommentCollapsed=!0,e.customColors=[],e.colors=["#86e1fb","#3999fb","#ff6771","#1eb496","#ffc152","#aba1ff","#7d8da5","#4ec46c","#cf37a6","#4e6198"],e}();a.g.defaultVisualizer=d},288:(e,t,i)=>{var r={"./detail.svg":782,"./drag.svg":307,"./hide.svg":41,"./makeprivate.svg":24,"./makepublic.svg":452,"./moveToDetails.svg":637,"./nonCommercial.svg":388,"./sorting.svg":999};function s(e){var t=n(e);return i(t)}function n(e){if(!i.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}s.keys=function(){return Object.keys(r)},s.resolve=n,e.exports=s,s.id=288},307:e=>{e.exports='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g><polygon points="13,5 12,6 13,7 9,7 9,3 10,4 11,3 8,0 5,3 6,4 7,3 7,7 3,7 4,6 3,5 0,8 3,11 4,10 3,9 7,9 7,13 6,12 5,13 8,16 11,13 10,12 9,13 9,9 13,9 12,10 13,11 16,8 "></polygon></g></svg>'},388:e=>{e.exports='<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 16 16" style="enable-background:new 0 0 16 16;" xml:space="preserve"><path d="M8,0L0,15h16L8,0z M9,13H7v-2h2V13z M7,10V5h2v5H7z"></path></svg>'},391:(e,t,i)=>{"use strict";i.d(t,{z:()=>r});var r={groupButton:"Group By Me",ungroupButton:"Ungroup By Me",selectButton:"Select Me",hideColumn:"Hide column",showColumn:"Show column",makePrivateColumn:"Make column private",makePublicColumn:"Make column public",moveToDetail:"Move to Detail",showAsColumn:"Show as Column",filterPlaceholder:"Search...",removeRows:"Remove rows",showLabel:"Show",entriesLabel:"entries",visualizer_text:"Texts in table",visualizer_wordcloud:"Wordcloud",visualizer_histogram:"Histogram",visualizer_number:"Average",visualizer_choices:"Table",visualizer_selectBase:"Chart",visualizer_matrix:"Chart",chartType_bar:"Bar",chartType_vbar:"Vertical Bar",chartType_stackedbar:"Stacked Bar",chartType_doughnut:"Doughnut",chartType_pie:"Pie",chartType_scatter:"Scatter",chartType_gauge:"Gauge",chartType_bullet:"Bullet",chartType_line:"Line",chartType_radar:"Radar",hideButton:"Hide",makePrivateButton:"Make private",makePublicButton:"Make public",showButton:"Show",filter:"Filter",resetFilter:"Reset Filter",changeLocale:"Change Locale",clearButton:"Clear",addElement:"Choose question to show...",defaultOrder:"Default Order",ascOrder:"Ascending",descOrder:"Descending",showMinorColumns:"Show minor columns",actionsColumn:"Actions",otherCommentTitle:"Other items and comments",showPercentages:"Show percentages",hidePercentages:"Hide percentages",pdfDownloadCaption:"PDF",xlsxDownloadCaption:"Excel",csvDownloadCaption:"CSV",saveDiagramAsPNG:"Download plot as a PNG file",hideEmptyAnswers:"Hide empty answers",showEmptyAnswers:"Show empty answers","topNValueText-1":"All answers",topNValueText5:"Top 5 answers",topNValueText10:"Top 10 answers",topNValueText20:"Top 20 answers",hideMissingAnswers:"Hide missing answers",showMissingAnswers:"Show missing answers",missingAnswersLabel:"Missing answers",noVisualizerForQuestion:"This question type is not visualized yet",noResults:"There are no results yet",showPerValues:"Per Values",showPerColumns:"Per Columns",answer:"Answer",correctAnswer:"Correct answer: ",percent:"Percent",percentage:"Percentage",statistics_chart:"Chart",responses:"Responses",visualizer_nps:"NPS",visualizer_boolean:"Chart",visualizer_options:"Table",npsScore:"NPS",npsPromoters:"Promoters",npsPassives:"Passives",npsDetractors:"Detractors",axisXSelectorTitle:"Category (X Axis):",axisYSelectorTitle:"Legend (Series):",axisXAlternativeSelectorTitle:"Segments:",axisYAlternativeSelectorTitle:"Groups:",notSelected:"Not selected",license:"To use the Dashboard library in your application, a <a href='https://surveyjs.io/licensing' target='_blank'>developer license</a> is required. If you have an active license, please <a href='https://surveyjs.io/remove-alert-banner' target='_blank'>set up your license key</a> and ensure you're using the <a href='https://surveyjs.io/stay-updated/release-notes' target='_blank'>latest version</a>.",license2:"This banner appears because your maintenance subscription for the Dashboard library expired on {date}. You may continue using <a href='https://surveyjs.io/stay-updated/release-notes' target='_blank'>all versions released up to that date</a>. To remove this banner in the latest version, please <a href='https://surveyjs.io/manage#license-manager' target='_blank'>renew your subscription</a> and <a href='https://surveyjs.io/remove-alert-banner' target='_blank'>set up a new license key</a>."}},452:e=>{e.exports='<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 16 16" style="enable-background:new 0 0 16 16;" xml:space="preserve"><g><circle cx="6" cy="5" r="3"></circle><path d="M10,5c0,0.34-0.06,0.67-0.14,0.99C9.91,5.99,9.95,6,10,6c1.66,0,3-1.34,3-3s-1.34-3-3-3 C8.97,0,8.07,0.52,7.53,1.3C8.98,1.91,10,3.33,10,5z"></path><path d="M6,9c-3.31,0-6,2.73-6,4.67S3.27,16,6,16s6-0.4,6-2.33S9.31,9,6,9z"></path><path d="M10,7C9.81,7,9.62,7.01,9.43,7.03C9.09,7.6,8.62,8.07,8.06,8.42c3,0.83,5.23,3.31,5.42,5.28 c1.44-0.31,2.52-0.92,2.52-2.03C16,9.74,13.31,7,10,7z"></path></g></svg>'},472:(e,t,i)=>{"use strict";i.d(t,{y:()=>h});var r=i(87),s=i(156),n=i(183),o=i(70),a=i(267),l=i(240),u=i(557),h=function(e){function t(t,i,r,s,n){void 0===n&&(n=!0);var a=e.call(this,null,i,r,s||"pivot")||this;return a.questions=t,a.isRoot=n,a.valueType="enum",a._cachedValues=void 0,a._continuousData=void 0,a._cachedIntervals=void 0,a._intervalPrecision=2,a.axisYSelectors=[],a.axisYQuestionNames=[],a.questionsY=[],a.questions=a.questions.filter((function(e){return-1===["matrixdropdown","matrixdynamic","matrix","file","signature","multipletext","comment","html","image"].indexOf(e.getType())})),void 0!==a.options.intervalPrecision&&(a._intervalPrecision=a.options.intervalPrecision),a.axisXQuestionName=a.questions.length>0?a.questions[0].name:void 0,a.registerToolbarItem("axisXSelector",(function(){return a.axisXSelector=o.gf.createSelector(a.questions.map((function(e){return{value:e.name,text:e.title||e.name}})),(function(e){return a.axisXQuestionName===e.value}),(function(e){a.axisXQuestionName=e.target.value,a.updateQuestionsSelection(),a.updateToolbar(),a.setupPivot()}),(function(){return a.isXYChart()?l.qG.getString("axisXSelectorTitle"):l.qG.getString("axisXAlternativeSelectorTitle")}))})),a.registerToolbarItem("axisYSelector0",a.createYSelecterGenerator()),a.setupPivot(),a}return(0,r.C6)(t,e),t.prototype.createYSelecterGenerator=function(){var e=this,t=this.axisYSelectors.length;return function(){var i=e.axisYSelectors[t];return i?i.__updateSelect&&i.__updateSelect():(i=e.createAxisYSelector(t),e.axisYSelectors.push(i)),i}},t.prototype.setAxisQuestions=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];e.length<1||(this.axisXQuestionName=e[0],this.axisYQuestionNames=e.splice(1),this.setupPivot())},t.prototype.onAxisYSelectorChanged=function(e,t){if(this.axisYQuestionNames[e]=t,e<this.axisYSelectors.length-1){if(!t){for(var i=e+1;i<this.axisYSelectors.length;++i)this.unregisterToolbarItem("axisYSelector"+i);this.axisYSelectors=this.axisYSelectors.slice(0,e+1),this.axisYQuestionNames=this.axisYQuestionNames.slice(0,e+1)}}else t&&this.registerToolbarItem("axisYSelector"+this.axisYSelectors.length,this.createYSelecterGenerator