{"version":3,"sources":["webpack:///static-appopensalud/js/133.2f7260556f01792a7384.js","webpack:///src/components/utils/QuestionCard.vue","webpack:///./src/mixins/selfEvaluationTest.mixin.js","webpack:///src/components/views/selfEvaluationTests/TestTemplate.vue","webpack:///./src/components/utils/QuestionCard.vue","webpack:///./src/components/utils/QuestionCard.vue?f819","webpack:///./src/components/utils/QuestionCard.vue?8828","webpack:///./src/components/utils/QuestionCard.vue?a504","webpack:///./src/helpers/tests.helpers.js","webpack:///./src/components/views/selfEvaluationTests/TestTemplate.vue","webpack:///./src/components/views/selfEvaluationTests/TestTemplate.vue?be23","webpack:///./src/components/views/selfEvaluationTests/TestTemplate.vue?27db","webpack:///./src/components/utils/WaveAnimation.vue","webpack:///./src/components/utils/WaveAnimation.vue?c22a","webpack:///./src/components/utils/WaveAnimation.vue?6746","webpack:///./src/components/utils/WaveAnimation.vue?ea59","webpack:///./src/components/views/selfEvaluationTests/TestTemplate.vue?3525","webpack:///./src/components/views/selfEvaluationTests/NicotineDependencyTest.vue","webpack:///src/components/views/selfEvaluationTests/NicotineDependencyTest.vue","webpack:///./src/components/views/selfEvaluationTests/NicotineDependencyTest.vue?604f"],"names":["webpackJsonp","2448","module","__webpack_exports__","__webpack_require__","__WEBPACK_IMPORTED_MODULE_0__components_base_forms_BaseRadioGroup_vue__","__WEBPACK_IMPORTED_MODULE_1_bootstrap_vue__","__WEBPACK_IMPORTED_MODULE_2__mixins_i18n_mixin__","mixins","components","BCard","data","localValue","props","progress","type","Number","required","questionnaireLength","question","Object","value","default","stacked","Boolean","labelsEnabled","fullWidthCard","customConditionToShowButton","customButtonText","String","created","this","$watch","methods","computed","leastImportantAnswer","answer","text","mostImportantAnswer","length","questionText","resultText","$t","lastQuestion","showButton","2449","__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__","__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default","n","__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_toConsumableArray__","__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_toConsumableArray___default","__WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_get_iterator__","__WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_get_iterator___default","__WEBPACK_IMPORTED_MODULE_3_bootstrap_vue__","__WEBPACK_IMPORTED_MODULE_4__constants_patientServices__","__WEBPACK_IMPORTED_MODULE_5__helpers_date_helpers__","__WEBPACK_IMPORTED_MODULE_6__constants_colours__","__WEBPACK_IMPORTED_MODULE_7_vuex__","__WEBPACK_IMPORTED_MODULE_8__helpers_tests_helpers__","__WEBPACK_IMPORTED_MODULE_9__components_utils_QuestionCard_vue__","QuestionCard","date","Date","calculateMultidimensionalDimPoints","dimension","sum","total","questions","val1","val2","result","opposedAnswers","includes","id","Math","max","percentResult","r","totalPoints","round","save","dimensions","percentage","$store","dispatch","testId","testName","userId","state","session","user","testResultsInfo","graphResult","DBResults","generalResult","resultInfo","TEST_ANXIETY_BECK","tag","color","GREEN_COLOUR","YELLOW_COLOUR","RED_COLOUR","TEST_CARDIOVASCULAR_RISK","risk","TEST_FINDRISK","GREEN_LIGHT_COLOUR","TEST_INTERPERSONAL_RELATIONSHIPS","description","ORANGE_MID_COLOUR","TEST_SOCIAL_SKILLS","TEST_MEDITERRANEAN_DIET","proCon","listOfProCon","resultsAnalysis","prosCons","p","push","name","$set","TEST_NICOTINE_DEPENDENCY","t","tips","tip","TEST_PHYSICAL_ACTIVITY","testResultLayout","testResult","tests","resultAnalysis","TEST_RYFF_SCALE","previousResults","previousTestResults","thisMonthResult","lastMonthResult","commit","replace","toLocaleLowerCase","alias","testRoute","$route","path","randomizeTest","test","TEST_PSYCHOSOCIAL_RISKS","TEST_WORK_ENVIRONMENT","TEST_GENERAL_HEALTH","flatMap","x","sort","random","TEST_SLEEP_QUALITY","cQ","get","currentSlide","questionResult","set","newValue","selectedAnswer","find","month","formatDateByMonthLong","mapState","2451","__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator__","__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default","__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_asyncToGenerator__","__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_asyncToGenerator___default","__WEBPACK_IMPORTED_MODULE_2_bootstrap_vue__","__WEBPACK_IMPORTED_MODULE_3__mixins_selfEvaluationTest_mixin__","__WEBPACK_IMPORTED_MODULE_5__repositories_PatientsRepository__","__WEBPACK_IMPORTED_MODULE_6__components_base_buttons_BaseButton_vue__","__WEBPACK_IMPORTED_MODULE_7__components_base_icons_BaseIcon_vue__","__WEBPACK_IMPORTED_MODULE_8__components_utils_WaveAnimation_vue__","__WEBPACK_IMPORTED_MODULE_9__constants_colours__","BForm","BModal","BButton","BProgress","BaseButton","BaseIcon","WaveAnimation","Array","multidimensional","started","goResults","songPlaying","BLUE_COLOUR","iconSize","$uiHelpers","isXlDevice","completed","getPreviousResults","startTest","$refs","song","play","showResults","pause","playPause","s","paused","checkTestAlreadyCompletedThisMonth","filteredTest","getters","results","$emit","goToPastResults","pastResults","checkTestAlreadyCompletedPastXMonths","filter","monthsDiff","monthsNumber","canSeePastResults","initialPage","questionsPage","goResultsPage","resultsPage","2484","injectStyle","ssrContext","disposed","normalizeComponent","__vue_styles__","Component","options","__file","2485","exports","content","i","locals","2486","2487","render","_vm","_h","$createElement","_c","_self","key","staticClass","attrs","cols","md","lg","_t","_v","_s","$slots","_e","class","staticStyle","model","callback","$$v","expression","sm","xs","appear","on","$event","action","apply","arguments","src","staticRenderFns","_withStripped","esExports","2488","testToShow","companyServices","inMx","professionalOrCenter","totalTests","EVALUATE_HEALTH_TESTS","some","COMPANIES_TESTS","item","ONLY_360_USERS_TESTS","NOT_IN_MX_TESTS","2492","2497","2498","2499","2500","2501","2502","_l","className","2503","active","loading","fullScreen","ref","loop","domProps","innerHTML","xl","height","width","click","mode","parseInt","border","icon","3333","3334","__WEBPACK_IMPORTED_MODULE_0__TestTemplate_vue__","__WEBPACK_IMPORTED_MODULE_1__mixins_selfEvaluationTest_mixin__","__WEBPACK_IMPORTED_MODULE_2__constants_patientServices__","values","values2","createQuestions","saveTestResults","3912","scopedSlots","_u","fn","answerQuestion","submitQuestionnaire","proxy","toUpperCase","style","title"],"mappings":"AAAAA,cAAc,IAAI,MAEZC,KACA,SAAUC,EAAQC,EAAqBC,GAE7C,YACqB,IAAIC,GAA0ED,EAAoB,MAC9FE,EAA8CF,EAAoB,IAClEG,EAAmDH,EAAoB,ICqChG,MACII,QAAS,OAAb,6BACIC,YACI,eAAgB,EAAxB,QACQC,MAAR,KAEIC,KANJ,WAOQ,OACIC,WAAY,OAGpBC,OACIC,UACIC,KAAMC,OACNC,UAAU,GAEdC,qBACIH,KAAMC,OACNC,UAAU,GAEdE,UACIJ,KAAMK,QAEVC,OACIN,KAAMC,OACNM,QAAS,MAEbC,SACIR,KAAMS,QACNF,SAAS,GAEbG,eACIV,KAAMS,QACNF,SAAS,GAEbI,eACIX,KAAMS,QACNF,SAAS,GAEbK,6BACIZ,KAAMS,QACNF,SAAS,GAEbM,kBACIb,KAAMc,SAGdC,QA/CJ,WA+CA,UACQC,MAAKnB,WAAamB,KAAKV,MACvBU,KAAKC,OAAO,aAAc,SAAlC,GACY,EAAZ,mBAEQD,KAAKC,OAAO,QAAS,SAA7B,GACY,EAAZ,gBAGIC,SACJ,OADA,WAEA,6BACA,mBACA,oCAIIC,UACIC,qBADR,WAEY,MAAOJ,MAAKZ,SAASiB,OAAO,GAAGC,MAEnCC,oBAJR,WAKY,MAAOP,MAAKZ,SAASiB,OAAOL,KAAKZ,SAASiB,OAAOG,OAAS,GAAGF,MAEjEG,aAPR,WAQY,MAAOT,MAAKH,kBAAoBG,KAAKZ,SAASsB,YAAcV,KAAKW,GAAGX,KAAKY,aAAe,iBAAmB,sBAE/GA,aAVR,WAWY,MAAOZ,MAAKjB,WAAaiB,KAAKb,oBAAsB,GAExD0B,WAbR,WAcY,MAAOb,MAAKJ,6BAAkD,MAAnBI,KA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PT,EACE,OACEG,YAAa,gCAEbH,EAAG,KACDG,YAAa,yBACbuD,UACEC,UAAW9D,EAAIa,GACbb,EAAI/L,GAAG,8CAIb+L,EAAIY,GAAG,KACPZ,EAAIqD,GAAGrD,EAAI1I,WAAW0B,KAAM,SAASD,GACnC,MAAOoH,GACL,OAEEE,IAAKtH,EAAEH,KACP0H,YAAa,0BAGbH,EACE,SAEEA,EACE,UAEEG,YAAa,WACbC,OAASkF,MAAOzF,EAAI/L,GAAG8E,EAAEH,SAGzBuH,EAAG,KACDG,YAAa,yBACbuD,UACEC,UAAW9D,EAAIa,GACbb,EAAI/L,GAAG8E,EAAEb,oBAOrB,IAGJ,MAIN,KAGJ8H,EAAIe,OAGZuE,OAAO,QAKf,IAGAvD,IACJhC,GAAOiC,eAAgB,CACvB,IAAIC,IAAclC,OAAQA,EAAQgC,gBAAiBA,EACpC","file":"static-appopensalud/js/133.2f7260556f01792a7384.js","sourcesContent":["webpackJsonp([133,138],{\n\n/***/ 2448:\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_base_forms_BaseRadioGroup_vue__ = __webpack_require__(1249);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_bootstrap_vue__ = __webpack_require__(18);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__mixins_i18n_mixin__ = __webpack_require__(110);\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n mixins: [Object(__WEBPACK_IMPORTED_MODULE_2__mixins_i18n_mixin__[\"a\" /* default */])('public/views/survey')],\n components: {\n 'radio-button': __WEBPACK_IMPORTED_MODULE_0__components_base_forms_BaseRadioGroup_vue__[\"default\"],\n BCard: __WEBPACK_IMPORTED_MODULE_1_bootstrap_vue__[\"e\" /* BCard */]\n },\n data: function data() {\n return {\n localValue: null\n };\n },\n\n props: {\n progress: {\n type: Number,\n required: true\n },\n questionnaireLength: {\n type: Number,\n required: true\n },\n question: {\n type: Object\n },\n value: {\n type: Number,\n default: null\n },\n stacked: {\n type: Boolean,\n default: false\n },\n labelsEnabled: {\n type: Boolean,\n default: false\n },\n fullWidthCard: {\n type: Boolean,\n default: false\n },\n customConditionToShowButton: {\n type: Boolean,\n default: false\n },\n customButtonText: {\n type: String\n }\n },\n created: function created() {\n var _this = this;\n\n this.localValue = this.value;\n this.$watch('localValue', function (value) {\n _this.$emit('input', value);\n });\n this.$watch('value', function (newValue) {\n _this.localValue = newValue;\n });\n },\n\n methods: {\n action: function action() {\n this.$emit('answerQuestion');\n if (this.lastQuestion) {\n this.$emit('submitQuestionnaire');\n }\n }\n },\n computed: {\n leastImportantAnswer: function leastImportantAnswer() {\n return this.question.answer[0].text;\n },\n mostImportantAnswer: function mostImportantAnswer() {\n return this.question.answer[this.question.answer.length - 1].text;\n },\n questionText: function questionText() {\n return this.customButtonText || this.question.resultText || this.$t(this.lastQuestion ? 'surveys.finish' : 'surveys.following');\n },\n lastQuestion: function lastQuestion() {\n return this.progress === this.questionnaireLength - 1;\n },\n showButton: function showButton() {\n return this.customConditionToShowButton || this.localValue != null;\n }\n }\n});\n\n/***/ }),\n\n/***/ 2449:\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(97);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_toConsumableArray__ = __webpack_require__(55);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_toConsumableArray___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_toConsumableArray__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_get_iterator__ = __webpack_require__(111);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_get_iterator___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_get_iterator__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_bootstrap_vue__ = __webpack_require__(18);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__constants_patientServices__ = __webpack_require__(508);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__helpers_date_helpers__ = __webpack_require__(215);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__constants_colours__ = __webpack_require__(46);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_vuex__ = __webpack_require__(216);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__helpers_tests_helpers__ = __webpack_require__(2488);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__components_utils_QuestionCard_vue__ = __webpack_require__(2484);\n\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n components: {\n BCard: __WEBPACK_IMPORTED_MODULE_3_bootstrap_vue__[\"e\" /* BCard */],\n 'loading-anim': function loadingAnim() {\n return new Promise(function(resolve) { resolve(); }).then(__webpack_require__.bind(null, 67));\n },\n QuestionCard: __WEBPACK_IMPORTED_MODULE_9__components_utils_QuestionCard_vue__[\"a\" /* default */]\n },\n data: function data() {\n return {\n date: new Date()\n };\n },\n\n methods: {\n calculateMultidimensionalDimPoints: function calculateMultidimensionalDimPoints(dimension) {\n var sum = 0;\n var total = 0;\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = __WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_get_iterator___default()(dimension.questions), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var question = _step.value;\n\n var val1 = question.answer[0].value;\n var val2 = question.answer[question.answer.length - 1].value;\n var ans = question.result !== null && this.opposedAnswers && this.opposedAnswers.includes(question.id) ? val1 + val2 - question.result : question.result;\n sum = sum + ans;\n total = total + Math.max(val1, val2);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n return { sum: sum, total: total };\n },\n percentResult: function percentResult(r, totalPoints) {\n return Math.round(r * 100 / totalPoints);\n },\n save: function save(dimensions, result) {\n var percentage = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\n this.$store.dispatch('tests/saveTestResult', { dimensions: dimensions, result: result, percentage: percentage || result, date: this.date, testId: this.testId, testName: this.testName, userId: this.$store.state.session.user.id });\n this.testResultsInfo(this.testId);\n },\n testResultsInfo: function testResultsInfo(testId, graphResult) {\n var result = graphResult != null ? graphResult : this.DBResults.generalResult;\n var resultInfo = {};\n switch (testId) {\n case __WEBPACK_IMPORTED_MODULE_4__constants_patientServices__[\"l\" /* TEST_ANXIETY_BECK */]:\n resultInfo = {\n tag: result <= 21 ? this.$t('tests.anxiety-beck.lowAnxiety') : result <= 35 ? this.$t('tests.anxiety-beck.moderateAnxiety') : this.$t('tests.anxiety-beck.severeAnxiety'),\n color: result <= 21 ? __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"g\" /* GREEN_COLOUR */] : result <= 35 ? __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"n\" /* YELLOW_COLOUR */] : __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"k\" /* RED_COLOUR */]\n };\n break;\n case __WEBPACK_IMPORTED_MODULE_4__constants_patientServices__[\"m\" /* TEST_CARDIOVASCULAR_RISK */]:\n switch (true) {\n case result < 10:\n resultInfo = { risk: 'lowRisk', tag: this.$t('tests.cardiovascular-risk.scores.lowRisk.name'), color: __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"g\" /* GREEN_COLOUR */] };\n break;\n case result >= 10 && result <= 20:\n resultInfo = { risk: 'midRisk', tag: this.$t('tests.cardiovascular-risk.scores.midRisk.name'), color: __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"n\" /* YELLOW_COLOUR */] };\n break;\n case result > 20:\n resultInfo = { risk: 'highRisk', tag: this.$t('tests.cardiovascular-risk.scores.highRisk.name'), color: __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"k\" /* RED_COLOUR */] };\n break;\n }\n break;\n case __WEBPACK_IMPORTED_MODULE_4__constants_patientServices__[\"n\" /* TEST_FINDRISK */]:\n switch (true) {\n case result < 7:\n resultInfo = { tag: this.$t('tests.findrisk.scores.lowRisk'), color: __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"g\" /* GREEN_COLOUR */] };\n break;\n case result >= 7 && result <= 11:\n resultInfo = { tag: this.$t('tests.findrisk.scores.lightRisk'), color: __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"h\" /* GREEN_LIGHT_COLOUR */] };\n break;\n case result >= 12 && result <= 14:\n resultInfo = { tag: this.$t('tests.findrisk.scores.moderateRisk'), color: __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"n\" /* YELLOW_COLOUR */] };\n break;\n case result >= 15 && result <= 20:\n resultInfo = { tag: this.$t('tests.findrisk.scores.highRisk'), color: __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"k\" /* RED_COLOUR */] };\n break;\n case result > 20:\n resultInfo = { tag: this.$t('tests.findrisk.scores.veryHighRisk'), color: __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"k\" /* RED_COLOUR */] };\n break;\n }\n break;\n case __WEBPACK_IMPORTED_MODULE_4__constants_patientServices__[\"p\" /* TEST_INTERPERSONAL_RELATIONSHIPS */]:\n switch (true) {\n case result <= 70:\n resultInfo = { tag: this.$t('tests.interpersonal-relationships.scores.lowScore.score'), description: this.$t('tests.interpersonal-relationships.scores.lowScore.description'), color: __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"k\" /* RED_COLOUR */] };\n break;\n case result <= 105:\n resultInfo = { tag: this.$t('tests.interpersonal-relationships.scores.mid-lowScore.score'), description: this.$t('tests.interpersonal-relationships.scores.mid-lowScore.description'), color: __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"j\" /* ORANGE_MID_COLOUR */] };\n break;\n case result <= 140:\n resultInfo = { tag: this.$t('tests.interpersonal-relationships.scores.midScore.score'), description: this.$t('tests.interpersonal-relationships.scores.midScore.description'), color: __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"n\" /* YELLOW_COLOUR */] };\n break;\n case result <= 160:\n resultInfo = { tag: this.$t('tests.interpersonal-relationships.scores.mid-highScore.score'), description: this.$t('tests.interpersonal-relationships.scores.mid-highScore.description'), color: __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"h\" /* GREEN_LIGHT_COLOUR */] };\n break;\n case result >= 161:\n resultInfo = { tag: this.$t('tests.interpersonal-relationships.scores.highScore.score'), description: this.$t('tests.interpersonal-relationships.scores.highScore.description'), color: __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"g\" /* GREEN_COLOUR */] };\n break;\n }\n break;\n case __WEBPACK_IMPORTED_MODULE_4__constants_patientServices__[\"w\" /* TEST_SOCIAL_SKILLS */]:\n switch (true) {\n case result <= 66:\n resultInfo = { tag: this.$t('tests.social-skills.scores.lowScore.score'), description: this.$t('tests.social-skills.scores.lowScore.description'), color: __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"k\" /* RED_COLOUR */] };\n break;\n case result <= 99:\n resultInfo = { tag: this.$t('tests.social-skills.scores.mid-lowScore.score'), description: this.$t('tests.social-skills.scores.mid-lowScore.description'), color: __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"j\" /* ORANGE_MID_COLOUR */] };\n break;\n case result <= 132:\n resultInfo = { tag: this.$t('tests.social-skills.scores.midScore.score'), description: this.$t('tests.social-skills.scores.midScore.description'), color: __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"n\" /* YELLOW_COLOUR */] };\n break;\n case result <= 149:\n resultInfo = { tag: this.$t('tests.social-skills.scores.mid-highScore.score'), description: this.$t('tests.social-skills.scores.mid-highScore.description'), color: __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"h\" /* GREEN_LIGHT_COLOUR */] };\n break;\n case result >= 150:\n resultInfo = { tag: this.$t('tests.social-skills.scores.highScore.score'), description: this.$t('tests.social-skills.scores.highScore.description'), color: __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"g\" /* GREEN_COLOUR */] };\n break;\n }\n break;\n case __WEBPACK_IMPORTED_MODULE_4__constants_patientServices__[\"q\" /* TEST_MEDITERRANEAN_DIET */]:\n var proCon = ['heartDiseasesRisk', 'diabetesRisk', 'cancerRisk', 'cognitiveFunction', 'mentalHealth'];\n var listOfProCon = [];\n if (result < 8) {\n resultInfo = {\n tag: this.$t('tests.mediterranean-diet.scores.lowAdherence.name'),\n color: __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"k\" /* RED_COLOUR */],\n resultsAnalysis: this.$t('tests.mediterranean-diet.scores.lowAdherence.description'),\n prosCons: 'consequences'\n };\n } else {\n resultInfo = {\n tag: this.$t('tests.mediterranean-diet.scores.goodAdherence.name'),\n color: __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"g\" /* GREEN_COLOUR */],\n resultsAnalysis: this.$t('tests.mediterranean-diet.scores.goodAdherence.description'),\n prosCons: 'benefits'\n };\n }\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n for (var _iterator2 = __WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_get_iterator___default()(proCon), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n var p = _step2.value;\n\n listOfProCon.push({ id: p, name: this.$t('tests.mediterranean-diet.' + resultInfo.prosCons + '.' + p + '.name'), description: this.$t('tests.mediterranean-diet.' + resultInfo.prosCons + '.' + p + '.description') });\n }\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n\n this.$set(resultInfo, 'listOfProCon', listOfProCon);\n break;\n case __WEBPACK_IMPORTED_MODULE_4__constants_patientServices__[\"r\" /* TEST_NICOTINE_DEPENDENCY */]:\n var t = [];\n var tips = [];\n switch (true) {\n case result === 0:\n resultInfo = {\n tag: this.$t('tests.nicotine-dependency.scores.noDependency.name'),\n color: __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"g\" /* GREEN_COLOUR */],\n resultsAnalysis: this.$t('tests.nicotine-dependency.scores.noDependency.description')\n };\n break;\n case result < 12:\n resultInfo = {\n tag: this.$t('tests.nicotine-dependency.scores.lowDependency.name'),\n color: __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"g\" /* GREEN_COLOUR */],\n resultsAnalysis: this.$t('tests.nicotine-dependency.scores.lowDependency.description')\n };\n t = ['conscious', 'endDate', 'reduceDaily', 'forgetTheHabit', 'lookForSupport'];\n break;\n case result >= 12 && result <= 22:\n resultInfo = {\n tag: this.$t('tests.nicotine-dependency.scores.midDependency.name'),\n color: __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"n\" /* YELLOW_COLOUR */],\n resultsAnalysis: this.$t('tests.nicotine-dependency.scores.midDependency.description')\n };\n t = ['motivation', 'causes', 'endDate', 'forgetTheHabit', 'relaxTechniques', 'rewards'];\n break;\n case result >= 22 && result <= 33:\n resultInfo = {\n tag: this.$t('tests.nicotine-dependency.scores.highDependency.name'),\n color: __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"k\" /* RED_COLOUR */],\n resultsAnalysis: this.$t('tests.nicotine-dependency.scores.highDependency.description')\n };\n t = ['motivation', 'causes', 'endDate', 'forgetTheHabit', 'relaxTechniques', 'rewards', 'rememberBenefits', 'healthyLifestyle'];\n break;\n case result > 33:\n resultInfo = {\n tag: this.$t('tests.nicotine-dependency.scores.veryHighDependency.name'),\n color: __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"k\" /* RED_COLOUR */],\n resultsAnalysis: this.$t('tests.nicotine-dependency.scores.veryHighDependency.description')\n };\n t = ['motivation', 'causes', 'endDate', 'forgetTheHabit', 'relaxTechniques', 'rewards', 'rememberBenefits', 'healthyLifestyle'];\n break;\n }\n var _iteratorNormalCompletion3 = true;\n var _didIteratorError3 = false;\n var _iteratorError3 = undefined;\n\n try {\n for (var _iterator3 = __WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_get_iterator___default()(t), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {\n var tip = _step3.value;\n\n tips.push({ name: this.$t('tests.nicotine-dependency.tips.' + tip + '.name'), description: this.$t('tests.nicotine-dependency.tips.' + tip + '.description') });\n }\n } catch (err) {\n _didIteratorError3 = true;\n _iteratorError3 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion3 && _iterator3.return) {\n _iterator3.return();\n }\n } finally {\n if (_didIteratorError3) {\n throw _iteratorError3;\n }\n }\n }\n\n this.$set(resultInfo, 'tips', tips);\n break;\n case __WEBPACK_IMPORTED_MODULE_4__constants_patientServices__[\"s\" /* TEST_PHYSICAL_ACTIVITY */]:\n if (this.testResultLayout(__WEBPACK_IMPORTED_MODULE_4__constants_patientServices__[\"s\" /* TEST_PHYSICAL_ACTIVITY */])) {\n var testResult = this.$store.state.tests.DBResults;\n if (testResult.generalResult >= 3000 || testResult.generalResult >= 1500 && testResult.dimensions[0].result >= 3) {\n resultInfo = {\n tag: this.$t('tests.physical-activity.levels.highLevel'),\n color: __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"g\" /* GREEN_COLOUR */],\n resultAnalysis: this.$t('tests.physical-activity.percentPopulationResult.high')\n };\n } else if (testResult.generalResult >= 600 || testResult.dimensions[0].result >= 3 && testResult.dimensions[1].result >= 20 || testResult.dimensions[2].result + testResult.dimensions[4].result >= 5 && testResult.dimensions[3].result + testResult.dimensions[5].result >= 30) {\n resultInfo = {\n tag: this.$t('tests.physical-activity.levels.moderateLevel'),\n color: __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"n\" /* YELLOW_COLOUR */],\n resultAnalysis: this.$t('tests.physical-activity.percentPopulationResult.moderate')\n };\n } else {\n resultInfo = {\n tag: this.$t('tests.physical-activity.levels.lowLevel'),\n color: __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"k\" /* RED_COLOUR */],\n resultAnalysis: this.$t('tests.physical-activity.percentPopulationResult.low')\n };\n }\n } else {\n if (result === 100) {\n resultInfo = {\n tag: this.$t('tests.physical-activity.levels.highLevel'),\n color: __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"g\" /* GREEN_COLOUR */],\n resultAnalysis: this.$t('tests.physical-activity.percentPopulationResult.high')\n };\n } else if (result === 50) {\n resultInfo = {\n tag: this.$t('tests.physical-activity.levels.moderateLevel'),\n color: __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"n\" /* YELLOW_COLOUR */],\n resultAnalysis: this.$t('tests.physical-activity.percentPopulationResult.moderate')\n };\n } else {\n resultInfo = {\n tag: this.$t('tests.physical-activity.levels.lowLevel'),\n color: __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"k\" /* RED_COLOUR */],\n resultAnalysis: this.$t('tests.physical-activity.percentPopulationResult.low')\n };\n }\n }\n\n break;\n case __WEBPACK_IMPORTED_MODULE_4__constants_patientServices__[\"u\" /* TEST_RYFF_SCALE */]:\n var color = result < 50 ? __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"k\" /* RED_COLOUR */] : result < 70 ? __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"n\" /* YELLOW_COLOUR */] : __WEBPACK_IMPORTED_MODULE_6__constants_colours__[\"g\" /* GREEN_COLOUR */];\n var resultAnalysis = '';\n if (this.testResultLayout(__WEBPACK_IMPORTED_MODULE_4__constants_patientServices__[\"u\" /* TEST_RYFF_SCALE */])) {\n var previousResults = this.$store.state.tests.previousTestResults;\n if (previousResults.length === 1) {\n resultAnalysis = this.$t('tests.ryff-scale.resultsAnalysisFirstTime');\n } else {\n var thisMonthResult = previousResults[previousResults.length - 1].generalResult;\n var lastMonthResult = previousResults[previousResults.length - 2].generalResult;\n\n resultAnalysis = thisMonthResult >= lastMonthResult + 5 ? this.$t('tests.ryff-scale.resultsAnalysisGood') : thisMonthResult <= lastMonthResult - 5 ? this.$t('tests.ryff-scale.resultsAnalysisBad') : this.$t('tests.ryff-scale.resultsAnalysisMedium');\n }\n }\n resultInfo = { resultAnalysis: resultAnalysis, color: color };\n break;\n }\n this.$store.commit('tests/setResultInfo', resultInfo);\n return resultInfo;\n },\n testResultLayout: function testResultLayout(testId) {\n var t = testId.replace('Test ', '').toLocaleLowerCase().replace(' ', '-');\n var alias = Object(__WEBPACK_IMPORTED_MODULE_8__helpers_tests_helpers__[\"a\" /* testRoute */])(t);\n return this.$route.path.includes(t) || this.$route.path.includes(alias);\n },\n randomizeTest: function randomizeTest() {\n var test = [].concat(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_toConsumableArray___default()(this.test));\n switch (this.testId) {\n //flatten dimensions and randomize\n case __WEBPACK_IMPORTED_MODULE_4__constants_patientServices__[\"t\" /* TEST_PSYCHOSOCIAL_RISKS */]:\n case __WEBPACK_IMPORTED_MODULE_4__constants_patientServices__[\"u\" /* TEST_RYFF_SCALE */]:\n case __WEBPACK_IMPORTED_MODULE_4__constants_patientServices__[\"y\" /* TEST_WORK_ENVIRONMENT */]:\n case __WEBPACK_IMPORTED_MODULE_4__constants_patientServices__[\"o\" /* TEST_GENERAL_HEALTH */]:\n test = test.flatMap(function (x) {\n return x.questions;\n }).sort(function () {\n return Math.random() - 0.5;\n });\n break;\n //flatten dimensions without randomize\n case __WEBPACK_IMPORTED_MODULE_4__constants_patientServices__[\"v\" /* TEST_SLEEP_QUALITY */]:\n test = test.flatMap(function (x) {\n return x.questions;\n }).sort();\n break;\n //return test without reorder\n case __WEBPACK_IMPORTED_MODULE_4__constants_patientServices__[\"s\" /* TEST_PHYSICAL_ACTIVITY */]:\n test = test.sort();\n break;\n //randomize test\n default:\n test.sort(function () {\n return Math.random() - 0.5;\n });\n break;\n }\n return test;\n }\n },\n computed: __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({\n cQ: {\n get: function get() {\n return this.$store.state.tests.test[this.$store.state.tests.currentSlide];\n }\n },\n questionResult: {\n get: function get() {\n return this.cQ ? this.cQ.result : null;\n },\n set: function set(newValue) {\n var selectedAnswer = this.cQ.answer.find(function (x) {\n return x.value === newValue;\n });\n this.$set(this.cQ, 'resultText', selectedAnswer.text);\n this.$set(this.cQ, 'result', newValue);\n }\n },\n month: function month() {\n return Object(__WEBPACK_IMPORTED_MODULE_5__helpers_date_helpers__[\"f\" /* formatDateByMonthLong */])(new Date(this.DBResults.date));\n },\n testRoute: function testRoute() {\n return this.testId.replace('Test ', '').toLocaleLowerCase().replace(' ', '-');\n }\n }, Object(__WEBPACK_IMPORTED_MODULE_7_vuex__[\"d\" /* mapState */])('tests', ['resultInfo', 'DBResults']))\n});\n\n/***/ }),\n\n/***/ 2451:\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator__ = __webpack_require__(66);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_asyncToGenerator__ = __webpack_require__(74);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_asyncToGenerator___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_asyncToGenerator__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_bootstrap_vue__ = __webpack_require__(18);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__mixins_selfEvaluationTest_mixin__ = __webpack_require__(2449);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__constants_patientServices__ = __webpack_require__(508);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__repositories_PatientsRepository__ = __webpack_require__(510);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__components_base_buttons_BaseButton_vue__ = __webpack_require__(124);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__components_base_icons_BaseIcon_vue__ = __webpack_require__(512);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__components_utils_WaveAnimation_vue__ = __webpack_require__(2499);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__constants_colours__ = __webpack_require__(46);\n\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n components: {\n BForm: __WEBPACK_IMPORTED_MODULE_2_bootstrap_vue__[\"m\" /* BForm */],\n BModal: __WEBPACK_IMPORTED_MODULE_2_bootstrap_vue__[\"_32\" /* BModal */],\n BButton: __WEBPACK_IMPORTED_MODULE_2_bootstrap_vue__[\"d\" /* BButton */],\n BProgress: __WEBPACK_IMPORTED_MODULE_2_bootstrap_vue__[\"_43\" /* BProgress */],\n BaseButton: __WEBPACK_IMPORTED_MODULE_6__components_base_buttons_BaseButton_vue__[\"default\"],\n BaseIcon: __WEBPACK_IMPORTED_MODULE_7__components_base_icons_BaseIcon_vue__[\"a\" /* default */],\n WaveAnimation: __WEBPACK_IMPORTED_MODULE_8__components_utils_WaveAnimation_vue__[\"a\" /* default */]\n },\n mixins: [__WEBPACK_IMPORTED_MODULE_3__mixins_selfEvaluationTest_mixin__[\"a\" /* default */]],\n props: {\n testName: {\n type: String,\n required: true\n },\n testId: {\n type: String,\n required: true\n },\n test: {\n type: Array,\n required: true\n },\n opposedAnswers: {\n type: Array,\n required: false\n },\n multidimensional: {\n type: Boolean,\n default: false\n }\n },\n data: function data() {\n return {\n started: false,\n goResults: false,\n songPlaying: true,\n BLUE_COLOUR: __WEBPACK_IMPORTED_MODULE_9__constants_colours__[\"c\" /* BLUE_COLOUR */],\n iconSize: !this.$uiHelpers.isXlDevice ? '30' : '40'\n };\n },\n created: function created() {\n this.$store.state.tests = {\n test: this.randomizeTest(),\n currentSlide: 0,\n completed: false,\n previousTestResults: [],\n DBResults: {}\n };\n this.getPreviousResults();\n },\n\n methods: {\n startTest: function startTest() {\n this.started = true;\n this.$refs.song.play();\n },\n showResults: function showResults() {\n this.goResults = true;\n this.$refs.song.pause();\n },\n playPause: function playPause() {\n var s = this.$refs.song;\n if (s.paused) {\n s.play();\n this.songPlaying = true;\n } else {\n s.pause();\n this.songPlaying = false;\n }\n },\n getPreviousResults: function getPreviousResults() {\n var _this = this;\n\n return __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_asyncToGenerator___default()( /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.mark(function _callee() {\n var id, patientId;\n return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n id = _this.$store.getters['session/userIsProfessional'] ? null : _this.$store.state.session.user.id;\n patientId = _this.$store.getters['session/userIsProfessional'] ? _this.$route.params.patientId : null;\n\n __WEBPACK_IMPORTED_MODULE_5__repositories_PatientsRepository__[\"a\" /* default */].getPreviousMonthsResults(id, patientId, _this.testId).then(function (response) {\n _this.checkTestAlreadyCompletedThisMonth(response.data);\n if (_this.$store.getters['session/userIsProfessional'] && !_this.$store.state.tests.completed) {\n if (response.data.length) {\n _this.$store.commit('tests/setTestCompletedThisMonth', response.data[response.data.length - 1]);\n _this.goResults = true;\n _this.testResultsInfo(_this.testId);\n } else {\n _this.$router.push('/error/unauthorized?returnUrl=' + encodeURIComponent(window.location.href));\n }\n }\n _this.$store.commit('tests/setPreviousTestResults', response.data);\n });\n\n case 3:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, _this);\n }))();\n },\n checkTestAlreadyCompletedThisMonth: function checkTestAlreadyCompletedThisMonth(results) {\n var filteredTest = this.testId === __WEBPACK_IMPORTED_MODULE_4__constants_patientServices__[\"y\" /* TEST_WORK_ENVIRONMENT */] ? this.checkTestAlreadyCompletedPastXMonths(results, 4) : this.checkTestAlreadyCompletedPastXMonths(results);\n if (filteredTest.length !== 1) return;\n if (this.$store.getters['session/userIsPatient'] && this.testId !== __WEBPACK_IMPORTED_MODULE_4__constants_patientServices__[\"t\" /* TEST_PSYCHOSOCIAL_RISKS */] && this.testId !== __WEBPACK_IMPORTED_MODULE_4__constants_patientServices__[\"y\" /* TEST_WORK_ENVIRONMENT */]) {\n this.$store.dispatch('showAlert', { text: this.$t('tests.alreadyCompletedMessage'), variant: 'secondary' });\n }\n this.goResults = true;\n this.$store.commit('tests/setTestCompletedThisMonth', filteredTest[0]);\n this.$store.commit('tests/setPreviousTestResults', results);\n this.testResultsInfo(this.testId);\n this.$emit('setFinishedMessageResultsHidden');\n },\n goToPastResults: function goToPastResults() {\n var pastResults = this.$store.state.tests.previousTestResults;\n this.goResults = true;\n this.$store.commit('tests/setTestCompletedThisMonth', pastResults[pastResults.length - 1]);\n this.testResultsInfo(this.testId);\n },\n checkTestAlreadyCompletedPastXMonths: function checkTestAlreadyCompletedPastXMonths(results) {\n var _this2 = this;\n\n var monthsNumber = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n\n return results.filter(function (x) {\n var resultDate = new Date(x.date);\n\n var resultYear = resultDate.getFullYear();\n var resultMonth = resultDate.getMonth();\n\n var currentYear = _this2.date.getFullYear();\n var currentMonth = _this2.date.getMonth();\n\n var monthsDiff = (currentYear - resultYear) * 12 + (currentMonth - resultMonth);\n\n return monthsDiff >= 0 && monthsDiff < monthsNumber;\n });\n }\n },\n computed: {\n canSeePastResults: function canSeePastResults() {\n return this.$store.state.tests.previousTestResults.length && this.testId !== __WEBPACK_IMPORTED_MODULE_4__constants_patientServices__[\"t\" /* TEST_PSYCHOSOCIAL_RISKS */] && this.testId !== __WEBPACK_IMPORTED_MODULE_4__constants_patientServices__[\"y\" /* TEST_WORK_ENVIRONMENT */];\n },\n initialPage: function initialPage() {\n return !this.started && !this.$store.state.tests.completed && this.$store.getters['session/userIsPatient'];\n },\n questionsPage: function questionsPage() {\n return this.started && !this.$store.state.tests.completed;\n },\n goResultsPage: function goResultsPage() {\n return !this.goResults && this.$store.state.tests.completed;\n },\n resultsPage: function resultsPage() {\n return this.goResults && this.$store.state.tests.completed;\n }\n }\n});\n\n/***/ }),\n\n/***/ 2484:\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_QuestionCard_vue__ = __webpack_require__(2448);\n/* unused harmony namespace reexport */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_124970e4_hasScoped_false_transformToRequire_video_src_poster_source_src_img_src_image_xlink_href_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_QuestionCard_vue__ = __webpack_require__(2487);\nvar disposed = false\nfunction injectStyle (ssrContext) {\n if (disposed) return\n __webpack_require__(2485)\n}\nvar normalizeComponent = __webpack_require__(6)\n/* script */\n\n\n/* template */\n\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_QuestionCard_vue__[\"a\" /* default */],\n __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_124970e4_hasScoped_false_transformToRequire_video_src_poster_source_src_img_src_image_xlink_href_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_QuestionCard_vue__[\"a\" /* default */],\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\nComponent.options.__file = \"src/components/utils/QuestionCard.vue\"\n\n/* hot reload */\nif (false) {(function () {\n var hotAPI = require(\"vue-hot-reload-api\")\n hotAPI.install(require(\"vue\"), false)\n if (!hotAPI.compatible) return\n module.hot.accept()\n if (!module.hot.data) {\n hotAPI.createRecord(\"data-v-124970e4\", Component.options)\n } else {\n hotAPI.reload(\"data-v-124970e4\", Component.options)\n }\n module.hot.dispose(function (data) {\n disposed = true\n })\n})()}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Component.exports);\n\n\n/***/ }),\n\n/***/ 2485:\n/***/ (function(module, exports, __webpack_require__) {\n\n// style-loader: Adds some css to the DOM by adding a \n\n\n// WEBPACK FOOTER //\n// src/components/utils/QuestionCard.vue","import { BCard } from 'bootstrap-vue'\r\nimport { TEST_SLEEP_QUALITY, TEST_PHYSICAL_ACTIVITY, TEST_PSYCHOSOCIAL_RISKS, TEST_RYFF_SCALE, TEST_CARDIOVASCULAR_RISK, TEST_FINDRISK, TEST_MEDITERRANEAN_DIET, TEST_ANXIETY_BECK, TEST_NICOTINE_DEPENDENCY, TEST_GENERAL_HEALTH, TEST_INTERPERSONAL_RELATIONSHIPS, TEST_SOCIAL_SKILLS, TEST_WORK_ENVIRONMENT } from '@/constants/patientServices'\r\nimport { formatDateByMonthLong } from '@/helpers/date.helpers'\r\nimport { GREEN_COLOUR, RED_COLOUR, YELLOW_COLOUR, ORANGE_MID_COLOUR, GREEN_LIGHT_COLOUR } from '@/constants/colours'\r\nimport { mapState } from 'vuex'\r\nimport { testRoute } from '@/helpers/tests.helpers'\r\nimport QuestionCard from '@/components/utils/QuestionCard.vue'\r\n\r\nexport default {\r\n components: {\r\n BCard,\r\n 'loading-anim': () => import('@/components/utils/LoadingAnim'),\r\n QuestionCard\r\n },\r\n data () {\r\n return {\r\n date: new Date()\r\n }\r\n },\r\n methods: {\r\n calculateMultidimensionalDimPoints (dimension) {\r\n let sum = 0\r\n let total = 0\r\n for (let question of dimension.questions) {\r\n let val1 = question.answer[0].value\r\n let val2 = question.answer[question.answer.length - 1].value\r\n let ans = question.result !== null && this.opposedAnswers && this.opposedAnswers.includes(question.id) ? val1 + val2 - question.result : question.result\r\n sum = sum + ans\r\n total = total + Math.max(val1, val2)\r\n }\r\n return {sum: sum, total: total}\r\n },\r\n percentResult (r, totalPoints) {\r\n return Math.round(r * 100 / totalPoints)\r\n },\r\n save (dimensions, result, percentage = null) {\r\n this.$store.dispatch('tests/saveTestResult', {dimensions: dimensions, result: result, percentage: percentage || result, date: this.date, testId: this.testId, testName: this.testName, userId: this.$store.state.session.user.id})\r\n this.testResultsInfo(this.testId)\r\n },\r\n testResultsInfo (testId, graphResult) {\r\n var result = graphResult != null ? graphResult : this.DBResults.generalResult\r\n var resultInfo = {}\r\n switch (testId) {\r\n case TEST_ANXIETY_BECK:\r\n resultInfo = {\r\n tag: result <= 21 ? this.$t('tests.anxiety-beck.lowAnxiety') : result <= 35 ? this.$t('tests.anxiety-beck.moderateAnxiety') : this.$t('tests.anxiety-beck.severeAnxiety'),\r\n color: result <= 21 ? GREEN_COLOUR : result <= 35 ? YELLOW_COLOUR : RED_COLOUR\r\n }\r\n break\r\n case TEST_CARDIOVASCULAR_RISK:\r\n switch (true) {\r\n case result < 10:\r\n resultInfo = { risk: 'lowRisk', tag: this.$t(`tests.cardiovascular-risk.scores.lowRisk.name`), color: GREEN_COLOUR }\r\n break\r\n case result >= 10 && result <= 20:\r\n resultInfo = { risk: 'midRisk', tag: this.$t(`tests.cardiovascular-risk.scores.midRisk.name`), color: YELLOW_COLOUR }\r\n break\r\n case result > 20:\r\n resultInfo = { risk: 'highRisk', tag: this.$t(`tests.cardiovascular-risk.scores.highRisk.name`), color: RED_COLOUR }\r\n break\r\n }\r\n break\r\n case TEST_FINDRISK:\r\n switch (true) {\r\n case result < 7:\r\n resultInfo = {tag: this.$t('tests.findrisk.scores.lowRisk'), color: GREEN_COLOUR}\r\n break\r\n case result >= 7 && result <= 11:\r\n resultInfo = {tag: this.$t('tests.findrisk.scores.lightRisk'), color: GREEN_LIGHT_COLOUR}\r\n break\r\n case result >= 12 && result <= 14:\r\n resultInfo = {tag: this.$t('tests.findrisk.scores.moderateRisk'), color: YELLOW_COLOUR}\r\n break\r\n case result >= 15 && result <= 20:\r\n resultInfo = {tag: this.$t('tests.findrisk.scores.highRisk'), color: RED_COLOUR}\r\n break\r\n case result > 20:\r\n resultInfo = {tag: this.$t('tests.findrisk.scores.veryHighRisk'), color: RED_COLOUR}\r\n break\r\n }\r\n break\r\n case TEST_INTERPERSONAL_RELATIONSHIPS:\r\n switch (true) {\r\n case result <= 70:\r\n resultInfo = {tag: this.$t('tests.interpersonal-relationships.scores.lowScore.score'), description: this.$t('tests.interpersonal-relationships.scores.lowScore.description'), color: RED_COLOUR}\r\n break\r\n case result <= 105:\r\n resultInfo = {tag: this.$t('tests.interpersonal-relationships.scores.mid-lowScore.score'), description: this.$t('tests.interpersonal-relationships.scores.mid-lowScore.description'), color: ORANGE_MID_COLOUR}\r\n break\r\n case result <= 140:\r\n resultInfo = {tag: this.$t('tests.interpersonal-relationships.scores.midScore.score'), description: this.$t('tests.interpersonal-relationships.scores.midScore.description'), color: YELLOW_COLOUR}\r\n break\r\n case result <= 160:\r\n resultInfo = {tag: this.$t('tests.interpersonal-relationships.scores.mid-highScore.score'), description: this.$t('tests.interpersonal-relationships.scores.mid-highScore.description'), color: GREEN_LIGHT_COLOUR}\r\n break\r\n case result >= 161:\r\n resultInfo = {tag: this.$t('tests.interpersonal-relationships.scores.highScore.score'), description: this.$t('tests.interpersonal-relationships.scores.highScore.description'), color: GREEN_COLOUR}\r\n break\r\n }\r\n break\r\n case TEST_SOCIAL_SKILLS:\r\n switch (true) {\r\n case result <= 66:\r\n resultInfo = {tag: this.$t('tests.social-skills.scores.lowScore.score'), description: this.$t('tests.social-skills.scores.lowScore.description'), color: RED_COLOUR}\r\n break\r\n case result <= 99:\r\n resultInfo = {tag: this.$t('tests.social-skills.scores.mid-lowScore.score'), description: this.$t('tests.social-skills.scores.mid-lowScore.description'), color: ORANGE_MID_COLOUR}\r\n break\r\n case result <= 132:\r\n resultInfo = {tag: this.$t('tests.social-skills.scores.midScore.score'), description: this.$t('tests.social-skills.scores.midScore.description'), color: YELLOW_COLOUR}\r\n break\r\n case result <= 149:\r\n resultInfo = {tag: this.$t('tests.social-skills.scores.mid-highScore.score'), description: this.$t('tests.social-skills.scores.mid-highScore.description'), color: GREEN_LIGHT_COLOUR}\r\n break\r\n case result >= 150:\r\n resultInfo = {tag: this.$t('tests.social-skills.scores.highScore.score'), description: this.$t('tests.social-skills.scores.highScore.description'), color: GREEN_COLOUR}\r\n break\r\n }\r\n break\r\n case TEST_MEDITERRANEAN_DIET:\r\n let proCon = ['heartDiseasesRisk', 'diabetesRisk', 'cancerRisk', 'cognitiveFunction', 'mentalHealth']\r\n var listOfProCon = []\r\n if (result < 8) {\r\n resultInfo = {\r\n tag: this.$t('tests.mediterranean-diet.scores.lowAdherence.name'),\r\n color: RED_COLOUR,\r\n resultsAnalysis: this.$t('tests.mediterranean-diet.scores.lowAdherence.description'),\r\n prosCons: 'consequences'\r\n }\r\n } else {\r\n resultInfo = {\r\n tag: this.$t('tests.mediterranean-diet.scores.goodAdherence.name'),\r\n color: GREEN_COLOUR,\r\n resultsAnalysis: this.$t('tests.mediterranean-diet.scores.goodAdherence.description'),\r\n prosCons: 'benefits'\r\n }\r\n }\r\n for (let p of proCon) {\r\n listOfProCon.push({ id: p, name: this.$t(`tests.mediterranean-diet.${resultInfo.prosCons}.${p}.name`), description: this.$t(`tests.mediterranean-diet.${resultInfo.prosCons}.${p}.description`) })\r\n }\r\n this.$set(resultInfo, 'listOfProCon', listOfProCon)\r\n break\r\n case TEST_NICOTINE_DEPENDENCY:\r\n let t = []\r\n var tips = []\r\n switch (true) {\r\n case result === 0:\r\n resultInfo = {\r\n tag: this.$t('tests.nicotine-dependency.scores.noDependency.name'),\r\n color: GREEN_COLOUR,\r\n resultsAnalysis: this.$t('tests.nicotine-dependency.scores.noDependency.description')\r\n }\r\n break\r\n case result < 12:\r\n resultInfo = {\r\n tag: this.$t('tests.nicotine-dependency.scores.lowDependency.name'),\r\n color: GREEN_COLOUR,\r\n resultsAnalysis: this.$t('tests.nicotine-dependency.scores.lowDependency.description')\r\n }\r\n t = ['conscious', 'endDate', 'reduceDaily', 'forgetTheHabit', 'lookForSupport']\r\n break\r\n case result >= 12 && result <= 22:\r\n resultInfo = {\r\n tag: this.$t('tests.nicotine-dependency.scores.midDependency.name'),\r\n color: YELLOW_COLOUR,\r\n resultsAnalysis: this.$t('tests.nicotine-dependency.scores.midDependency.description')\r\n }\r\n t = ['motivation', 'causes', 'endDate', 'forgetTheHabit', 'relaxTechniques', 'rewards']\r\n break\r\n case result >= 22 && result <= 33:\r\n resultInfo = {\r\n tag: this.$t('tests.nicotine-dependency.scores.highDependency.name'),\r\n color: RED_COLOUR,\r\n resultsAnalysis: this.$t('tests.nicotine-dependency.scores.highDependency.description')\r\n }\r\n t = ['motivation', 'causes', 'endDate', 'forgetTheHabit', 'relaxTechniques', 'rewards', 'rememberBenefits', 'healthyLifestyle']\r\n break\r\n case result > 33:\r\n resultInfo = {\r\n tag: this.$t('tests.nicotine-dependency.scores.veryHighDependency.name'),\r\n color: RED_COLOUR,\r\n resultsAnalysis: this.$t('tests.nicotine-dependency.scores.veryHighDependency.description')\r\n }\r\n t = ['motivation', 'causes', 'endDate', 'forgetTheHabit', 'relaxTechniques', 'rewards', 'rememberBenefits', 'healthyLifestyle']\r\n break\r\n }\r\n for (let tip of t) {\r\n tips.push({ name: this.$t(`tests.nicotine-dependency.tips.${tip}.name`), description: this.$t(`tests.nicotine-dependency.tips.${tip}.description`) })\r\n }\r\n this.$set(resultInfo, 'tips', tips)\r\n break\r\n case TEST_PHYSICAL_ACTIVITY:\r\n if (this.testResultLayout(TEST_PHYSICAL_ACTIVITY)) {\r\n var testResult = this.$store.state.tests.DBResults\r\n if (testResult.generalResult >= 3000 || (testResult.generalResult >= 1500 && testResult.dimensions[0].result >= 3)) {\r\n resultInfo = {\r\n tag: this.$t('tests.physical-activity.levels.highLevel'),\r\n color: GREEN_COLOUR,\r\n resultAnalysis: this.$t('tests.physical-activity.percentPopulationResult.high')\r\n }\r\n } else if (testResult.generalResult >= 600 || (testResult.dimensions[0].result >= 3 && testResult.dimensions[1].result >= 20) || (testResult.dimensions[2].result + testResult.dimensions[4].result >= 5 && testResult.dimensions[3].result + testResult.dimensions[5].result >= 30)) {\r\n resultInfo = {\r\n tag: this.$t('tests.physical-activity.levels.moderateLevel'),\r\n color: YELLOW_COLOUR,\r\n resultAnalysis: this.$t('tests.physical-activity.percentPopulationResult.moderate')\r\n }\r\n } else {\r\n resultInfo = {\r\n tag: this.$t('tests.physical-activity.levels.lowLevel'),\r\n color: RED_COLOUR,\r\n resultAnalysis: this.$t('tests.physical-activity.percentPopulationResult.low')\r\n }\r\n }\r\n } else {\r\n if (result === 100) {\r\n resultInfo = {\r\n tag: this.$t('tests.physical-activity.levels.highLevel'),\r\n color: GREEN_COLOUR,\r\n resultAnalysis: this.$t('tests.physical-activity.percentPopulationResult.high')\r\n }\r\n } else if (result === 50) {\r\n resultInfo = {\r\n tag: this.$t('tests.physical-activity.levels.moderateLevel'),\r\n color: YELLOW_COLOUR,\r\n resultAnalysis: this.$t('tests.physical-activity.percentPopulationResult.moderate')\r\n }\r\n } else {\r\n resultInfo = {\r\n tag: this.$t('tests.physical-activity.levels.lowLevel'),\r\n color: RED_COLOUR,\r\n resultAnalysis: this.$t('tests.physical-activity.percentPopulationResult.low')\r\n }\r\n }\r\n }\r\n \r\n break\r\n case TEST_RYFF_SCALE:\r\n var color = result < 50 ? RED_COLOUR : result < 70 ? YELLOW_COLOUR : GREEN_COLOUR\r\n var resultAnalysis = ''\r\n if(this.testResultLayout(TEST_RYFF_SCALE)) {\r\n const previousResults = this.$store.state.tests.previousTestResults\r\n if (previousResults.length === 1) {\r\n resultAnalysis = this.$t('tests.ryff-scale.resultsAnalysisFirstTime')\r\n } else {\r\n const thisMonthResult = previousResults[previousResults.length - 1].generalResult\r\n const lastMonthResult = previousResults[previousResults.length - 2].generalResult\r\n \r\n resultAnalysis = thisMonthResult >= lastMonthResult + 5 ? this.$t('tests.ryff-scale.resultsAnalysisGood')\r\n : thisMonthResult <= lastMonthResult - 5 ? this.$t('tests.ryff-scale.resultsAnalysisBad')\r\n : this.$t('tests.ryff-scale.resultsAnalysisMedium')\r\n }\r\n }\r\n resultInfo = { resultAnalysis: resultAnalysis, color: color }\r\n break\r\n }\r\n this.$store.commit('tests/setResultInfo', resultInfo)\r\n return resultInfo\r\n },\r\n testResultLayout (testId) {\r\n var t = testId.replace('Test ', '').toLocaleLowerCase().replace(' ', '-')\r\n var alias = testRoute(t)\r\n return this.$route.path.includes(t) || this.$route.path.includes(alias)\r\n },\r\n randomizeTest () {\r\n var test = [...this.test]\r\n switch (this.testId) {\r\n //flatten dimensions and randomize\r\n case TEST_PSYCHOSOCIAL_RISKS:\r\n case TEST_RYFF_SCALE:\r\n case TEST_WORK_ENVIRONMENT:\r\n case TEST_GENERAL_HEALTH:\r\n test = test.flatMap(x => x.questions).sort(() => Math.random() - 0.5)\r\n break\r\n //flatten dimensions without randomize\r\n case TEST_SLEEP_QUALITY:\r\n test = test.flatMap(x => x.questions).sort()\r\n break\r\n //return test without reorder\r\n case TEST_PHYSICAL_ACTIVITY:\r\n test = test.sort()\r\n break\r\n //randomize test\r\n default:\r\n test.sort(() => Math.random() - 0.5)\r\n break\r\n }\r\n return test\r\n }\r\n },\r\n computed: {\r\n cQ: {\r\n get () {\r\n return this.$store.state.tests.test[this.$store.state.tests.currentSlide]\r\n }\r\n },\r\n questionResult: {\r\n get () {\r\n return this.cQ ? this.cQ.result : null\r\n },\r\n set (newValue) {\r\n const selectedAnswer = this.cQ.answer.find(x => x.value === newValue)\r\n this.$set(this.cQ, 'resultText', selectedAnswer.text)\r\n this.$set(this.cQ, 'result', newValue)\r\n }\r\n },\r\n month () {\r\n return formatDateByMonthLong(new Date(this.DBResults.date))\r\n },\r\n testRoute () {\r\n return this.testId.replace('Test ', '').toLocaleLowerCase().replace(' ', '-')\r\n },\r\n ...mapState('tests', ['resultInfo', 'DBResults'])\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/mixins/selfEvaluationTest.mixin.js","\r\n\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// src/components/views/selfEvaluationTests/TestTemplate.vue","var disposed = false\nfunction injectStyle (ssrContext) {\n if (disposed) return\n require(\"!!vue-style-loader!css-loader?{\\\"sourceMap\\\":false}!../../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-124970e4\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!sass-loader?{\\\"data\\\":\\\"@import \\\\\\\"static-appopensalud/css/scss/shared.scss\\\\\\\";\\\",\\\"sourceMap\\\":false}!../../../node_modules/vue-loader/lib/selector?type=styles&index=0!./QuestionCard.vue\")\n}\nvar normalizeComponent = require(\"!../../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../../../node_modules/vue-loader/lib/selector?type=script&index=0!./QuestionCard.vue\"\nimport __vue_script__ from \"!!babel-loader!../../../node_modules/vue-loader/lib/selector?type=script&index=0!./QuestionCard.vue\"\n/* template */\nimport __vue_template__ from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-124970e4\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./QuestionCard.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\nComponent.options.__file = \"src/components/utils/QuestionCard.vue\"\n\n/* hot reload */\nif (module.hot) {(function () {\n var hotAPI = require(\"vue-hot-reload-api\")\n hotAPI.install(require(\"vue\"), false)\n if (!hotAPI.compatible) return\n module.hot.accept()\n if (!module.hot.data) {\n hotAPI.createRecord(\"data-v-124970e4\", Component.options)\n } else {\n hotAPI.reload(\"data-v-124970e4\", Component.options)\n }\n module.hot.dispose(function (data) {\n disposed = true\n })\n})()}\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/utils/QuestionCard.vue\n// module id = 2484\n// module chunks = 6 37 38 58 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138","// style-loader: Adds some css to the DOM by adding a