{"version":3,"sources":["webpack:///./src/views/crafted/course/module/ModuleList.vue?3d1e","webpack:///./src/views/crafted/course/module/ModuleList.vue"],"names":["_hoisted_1","class","_hoisted_2","_hoisted_3","_hoisted_4","key","_hoisted_5","_hoisted_6","style","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","href","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_hoisted_26","_hoisted_27","_hoisted_28","_hoisted_29","_hoisted_30","_hoisted_31","_hoisted_32","_hoisted_33","_hoisted_34","_hoisted_35","_hoisted_36","_hoisted_37","_hoisted_38","_hoisted_39","_hoisted_40","_hoisted_41","_hoisted_42","_hoisted_43","_hoisted_44","_hoisted_45","_hoisted_46","_hoisted_47","_hoisted_48","_hoisted_49","_hoisted_50","role","_hoisted_51","_hoisted_52","_hoisted_53","_hoisted_54","_hoisted_55","src","alt","_hoisted_56","_hoisted_57","_hoisted_58","_hoisted_59","_hoisted_60","_hoisted_61","_hoisted_62","_hoisted_63","_hoisted_64","_hoisted_65","_hoisted_66","_hoisted_67","_hoisted_68","_hoisted_69","_hoisted_70","props","id","type","String","required","setup","__props","store","t","currentLanguage","getters","getCurrentLanguage","localStorage","getItem","user","currentUser","course","getCurrentCourse","showSpinner","showCourse","modules","value","length","truncateDescription","description","substring","truncateTitle","title","dispatch","GET_COURSE","then","console","log","router","push","modulesInProgress","filter","module","in_progress","completedModulesCount","completedModules","lessons","every","lesson","is_started","totalLessonsCount","getStatistics","total_lessons","completedLessonsCount","total_completed_lessons","completionMessage","count","moduleMessage","completedLessonsPercentage","total","completed","Math","floor","round","isModuleCompleted","moduleId","currentModuleId","currentModule","find","courseStatus","modulesInProgressCount","some","isComplete","_ctx","_cache","_component_router_link","to","name","default","$t","_","params","image_url","__exports__"],"mappings":"oMAGMA,G,UAAa,CAAEC,MAAO,a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AC3B4B,EAAOC,cAAgBqB,GAAkBtB,EAAOpC,KAC5C,yBAAc,gCAAoB,OAAQb,GAAa,6BAAiBgF,EAAKM,GAAM,mBAAOjE,IAAgB,+BAAgC,IAC3I,gCAAoB,IAAI,GAC1B4B,EAAOC,aAAgBqB,GAAkBtB,EAAOpC,IAE9C,gCAAoB,IAAI,IADvB,yBAAc,gCAAoB,OAAQZ,GAAa,6BAAiB+E,EAAKM,GAAM,mBAAOjE,IAAgB,yBAA0B,MAG3I,gCAAoB,MAAOnB,GAAa,6BAAiBoC,GAAcW,EAAOV,QAAS,GACvF,gCAAoB,MAAOpC,GAAa,CACtC,gCAAoB,IAAKC,GAAa,6BAAiB+B,GAA0B,OAANc,QAAM,IAANA,OAAM,EAANA,EAAQb,cAAe,OAGtG,gCAAoB,MAAO/B,GAAa,CACtC,gCAAoB,MAAOC,GAAa,CACtCC,GACA,6BAAiB,IAAM,6BAA+B,QAAf,EAAC0C,EAAOI,eAAO,eAAEnB,QAAU,IAAM,8BAA+B,QAAd,EAAAe,EAAOI,eAAO,eAAEnB,QAAS,EAAI8C,EAAKM,GAAM,mBAAOjE,IAAgB,mBAAqB2D,EAAKM,GAAM,mBAAOjE,IAAgB,mBAAoB,aAK3OkE,EAAG,GACF,KAAM,CAAC,YAEV,YAGP,yBAAc,gCAAoB,MAAO/E,GAAa,CACpDsB,GAAiB,OACb,yBAAc,gCAAoB,MAAOrB,GAAa,CACrDC,GACA,gCAAoB,OAAQC,GAAa,cAAgB,6BAAiBqE,EAAKM,GAAM,mBAAOjE,IAAgB,+BAAiC,MAAO,MAEtJ,gCAAoB,IAAI,YCnatC,MAAMqE,GAAc,GAEL","file":"js/chunk-76f03f8a.d08dbaee.js","sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, unref as _unref, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, normalizeStyle as _normalizeStyle, renderList as _renderList, Fragment as _Fragment, createStaticVNode as _createStaticVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"row mb-5\" }\nconst _hoisted_2 = { class: \"col-md-12 text-start\" }\nconst _hoisted_3 = /*#__PURE__*/_createElementVNode(\"i\", { class: \"bi bi-chevron-left text-primary\" }, null, -1)\nconst _hoisted_4 = {\n key: 0,\n class: \"d-flex flex-column\"\n}\nconst _hoisted_5 = { class: \"row\" }\nconst _hoisted_6 = {\n class: \"card card-flush\",\n style: {\"background-image\":\"url('/media/svg/shapes/wave-bg-dark.svg')\"}\n}\nconst _hoisted_7 = { class: \"card-header rounded bgi-no-repeat bgi-size-cover bgi-position-y-top bgi-position-x-center align-items-start h-200px\" }\nconst _hoisted_8 = { class: \"card-title align-items-start flex-column text-white pt-10\" }\nconst _hoisted_9 = { class: \"fw-bolder fs-2x mb-3\" }\nconst _hoisted_10 = { class: \"fs-4 text-white\" }\nconst _hoisted_11 = { class: \"opacity-75\" }\nconst _hoisted_12 = { class: \"position-relative d-inline-block\" }\nconst _hoisted_13 = {\n href: \"#\",\n class: \"link-white opacity-75-hover fw-bolder d-block mb-1 italic\"\n}\nconst _hoisted_14 = /*#__PURE__*/_createElementVNode(\"div\", { class: \"card-toolbar pt-5\" }, null, -1)\nconst _hoisted_15 = { class: \"card-body mt-n20\" }\nconst _hoisted_16 = { class: \"mt-n20 position-relative\" }\nconst _hoisted_17 = { class: \"row g-3 g-lg-6\" }\nconst _hoisted_18 = { class: \"col-6\" }\nconst _hoisted_19 = { class: \"bg-gray-100 bg-opacity-70 rounded-2 px-6 py-5\" }\nconst _hoisted_20 = /*#__PURE__*/_createStaticVNode(\"
\", 1)\nconst _hoisted_21 = { class: \"m-0\" }\nconst _hoisted_22 = { class: \"text-gray-700 fw-boldest d-block fs-2qx lh-1 ls-n1 mb-1\" }\nconst _hoisted_23 = { class: \"text-gray-500 fw-bold fs-6\" }\nconst _hoisted_24 = { class: \"col-6\" }\nconst _hoisted_25 = { class: \"bg-gray-100 bg-opacity-70 rounded-2 px-6 py-5\" }\nconst _hoisted_26 = /*#__PURE__*/_createStaticVNode(\"
\", 1)\nconst _hoisted_27 = {\n key: 0,\n class: \"m-0\"\n}\nconst _hoisted_28 = { class: \"text-gray-700 fw-boldest d-block fs-2qx lh-1 ls-n1 mb-1\" }\nconst _hoisted_29 = { class: \"text-gray-500 fw-bold fs-6\" }\nconst _hoisted_30 = {\n key: 1,\n class: \"m-0\"\n}\nconst _hoisted_31 = { class: \"text-gray-700 fw-boldest d-block fs-2qx lh-1 ls-n1 mb-1\" }\nconst _hoisted_32 = { class: \"text-gray-500 fw-bold fs-6\" }\nconst _hoisted_33 = { class: \"col-6\" }\nconst _hoisted_34 = { class: \"bg-gray-100 bg-opacity-70 rounded-2 px-6 py-5\" }\nconst _hoisted_35 = /*#__PURE__*/_createStaticVNode(\"
\", 1)\nconst _hoisted_36 = { class: \"m-0\" }\nconst _hoisted_37 = { class: \"text-gray-700 fw-boldest d-block fs-2qx lh-1 ls-n1 mb-1\" }\nconst _hoisted_38 = { class: \"text-gray-500 fw-bold fs-6\" }\nconst _hoisted_39 = { class: \"col-6\" }\nconst _hoisted_40 = { class: \"bg-gray-100 bg-opacity-70 rounded-2 px-6 py-5\" }\nconst _hoisted_41 = /*#__PURE__*/_createStaticVNode(\"
\", 1)\nconst _hoisted_42 = { class: \"m-0 pb-2\" }\nconst _hoisted_43 = { class: \"d-flex justify-content-between align-items-center\" }\nconst _hoisted_44 = { class: \"text-gray-700 fw-boldest d-block fs-2qx lh-1 ls-n1 mb-1\" }\nconst _hoisted_45 = { class: \"text-gray-500 fw-bold fs-6\" }\nconst _hoisted_46 = { class: \"text-gray-500 fw-bold fs-6\" }\nconst _hoisted_47 = { class: \"progress-lb col-md-12 mt-2\" }\nconst _hoisted_48 = { class: \"row g-3 g-xl-9 mt-5\" }\nconst _hoisted_49 = { class: \"text-gray-800\" }\nconst _hoisted_50 = {\n role: \"button\",\n class: \"card border-hover-primary h-100\"\n}\nconst _hoisted_51 = { class: \"card-header border-0 p-9 d-flex justify-content-center\" }\nconst _hoisted_52 = { class: \"card-title m-0\" }\nconst _hoisted_53 = { class: \"\" }\nconst _hoisted_54 = [\"src\"]\nconst _hoisted_55 = {\n key: 1,\n src: \"https://assets.hackingclub.com/course/avatar/webapp.png\",\n alt: \"image\",\n class: \"w-100 h-100 rounded\"\n}\nconst _hoisted_56 = {\n class: \"card-body\",\n style: {\"margin-top\":\"-30px\"}\n}\nconst _hoisted_57 = { class: \"card-toolbar mb-1\" }\nconst _hoisted_58 = {\n key: 0,\n class: \"badge badge-light-success fw-bolder me-auto px-4 py-3\"\n}\nconst _hoisted_59 = {\n key: 1,\n class: \"badge badge-light-primary fw-bolder me-auto px-4 py-3\"\n}\nconst _hoisted_60 = {\n key: 2,\n class: \"badge badge-light-warning fw-bolder me-auto px-4 py-3\"\n}\nconst _hoisted_61 = { class: \"fs-3 fw-bolder text-dark\" }\nconst _hoisted_62 = { class: \"d-flex align-items-center\" }\nconst _hoisted_63 = { class: \"text-gray-400 fw-bold fs-5 mt-2\" }\nconst _hoisted_64 = {\n class: \"card-footer\",\n style: {\"margin-top\":\"-20px\"}\n}\nconst _hoisted_65 = { class: \"text-gray-400 fw-bold fs-5\" }\nconst _hoisted_66 = /*#__PURE__*/_createElementVNode(\"i\", { class: \"bi bi-camera-reels\" }, null, -1)\nconst _hoisted_67 = {\n key: 1,\n class: \"container text-center itens-center mb-10\"\n}\nconst _hoisted_68 = { key: 0 }\nconst _hoisted_69 = /*#__PURE__*/_createElementVNode(\"span\", {\n class: \"spinner-border text-primary\",\n role: \"status\"\n}, null, -1)\nconst _hoisted_70 = { class: \"text-muted fs-3 fw-bold mt-5\" }\n\nimport {useStore} from \"vuex\";\nimport {computed, onMounted, ref} from \"vue\";\nimport {Actions} from \"@/store/enums/StoreEnums\";\nimport router from \"@/router\";\nimport { ModuleType} from \"@/types/ModuleType\";\nimport {CourseType} from \"@/types/CourseType\";\nimport {UserType} from \"@/types/UserType\";\nimport {useI18n} from \"vue-i18n\";\nimport Swal from \"sweetalert2/dist/sweetalert2.min.js\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {id: {type: String, required: true}},\n setup(__props) {\n\nconst props = __props\n\nconst store = useStore();\n\nconst { t } = useI18n();\n\nconst currentLanguage = computed(() => store.getters.getCurrentLanguage || localStorage.getItem('currentLanguage'));\nconst user = computed(() => store.getters.currentUser);\nconst course = computed(() => store.getters.getCurrentCourse);\nconst showSpinner = ref(false);\nconst showCourse = ref(false);\n\nconst modules = computed(() => {\n const modules = course.value.modules;\n return modules && modules?.length > 0 ? modules : null;\n});\n\nonMounted(async () => {\n showSpinner.value = true;\n try {\n await store.dispatch(Actions.GET_COURSE, props.id).then(() => {\n console.log(course.value)\n if(typeof(course.value.id) === 'undefined') {\n router.push('/training/course-catalog');\n }\n });\n showCourse.value = true;\n } catch (e) {\n await router.push('/training/course-catalog');\n }finally{\n // modalCourseCompleted();\n showSpinner.value = false;\n }\n})\n\nfunction truncateDescription(description: string) {\n if(!description) return;\n return description?.length > 63 ? description.substring(0, 63) + \"...\" : description;\n}\n\nfunction truncateTitle(title: string) {\n if(!title) return;\n return title?.length > 45 ? title.substring(0, 45) + \"...\" : title;\n}\n\nconst modulesInProgress = computed(() => {\n return course.value.modules?.filter(module => module.in_progress);\n});\n\nconst modulesInProgressCount = computed(() => {\n return modulesInProgress.value?.length;\n});\n\nconst completedModulesCount = computed(() => {\n const completedModules = course.value.modules?.filter(module => {\n return module.lessons?.every(lesson => lesson.is_started);\n });\n return completedModules?.length;\n});\n\nconst totalLessonsCount = computed(() => {\n return store.getters.getStatistics?.total_lessons;\n});\n\nconst completedLessonsCount = computed(() => {\n return store.getters.getStatistics?.total_completed_lessons;\n});\n\nconst completionMessage = computed(() => {\n const count = completedModulesCount.value;\n if (count === 0) {\n return t(`${currentLanguage.value}.common.you_have_not_started_any_modules_yet`);\n } else if (count === 1) {\n return t(`${currentLanguage.value}.common.you_have_completed_one_module_so_far`);\n } else {\n return t(`${currentLanguage.value}.common.you_have_completed_one_module_so_far`) +` ${count} `+ t(`${currentLanguage.value}.common.you_have_completed_one_module_so_far`);\n }\n});\n\n// statistics plural or singular module\nconst moduleMessage = computed(() => {\n if(modules.value?.length){\n const count = modules.value?.length;\n if (count > 1) {\n return t(`${currentLanguage.value}.common.modules`);\n } else {\n return t(`${currentLanguage.value}.common.module`);\n }\n }\n return t(`${currentLanguage.value}.common.module`);\n});\n\nconst completedLessonsPercentage = computed(() => {\n const total = totalLessonsCount.value;\n const completed = completedLessonsCount.value;\n if (total === 0) return 0;\n return Math.floor(Math.round((completed / total) * 100));\n});\n\nconst isModuleCompleted = (moduleId: number) => {\n const currentModuleId = moduleId;\n const currentModule = course.value.modules.find(module => module.id === currentModuleId);\n if (!currentModule) return false;\n return currentModule.lessons?.every(lesson => lesson.is_started);\n}\n\nconst courseStatus = computed(() => {\n const modulesInProgressCount = course.value.modules?.filter(module => module.lessons?.some(lesson => lesson.is_started))?.length;\n const completedModulesCount = course.value.modules?.filter(module => module.lessons?.every(lesson => lesson.is_started))?.length;\n\n return {\n isComplete: course.value.modules?.length === modulesInProgressCount && modulesInProgressCount === completedModulesCount,\n modulesInProgressCount,\n completedModulesCount\n };\n});\n\nconst modalCourseCompleted = () => {\n if(completedLessonsPercentage.value > 0) {\n Swal.fire({\n title: 'Parabéns!',\n icon: \"success\",\n text: \"Você concluiu o curso!\",\n showConfirmButton: true,\n confirmButtonText: 'OK',\n });\n }\n}\n// console.log(\"completedLessonsPercentageS\",completedLessonsPercentage.value )\n\nreturn (_ctx: any,_cache: any) => {\n const _component_router_link = _resolveComponent(\"router-link\")!\n\n return (_openBlock(), _createElementBlock(\"div\", null, [\n _createElementVNode(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createVNode(_component_router_link, {\n to: {name: 'course-catalog'},\n class: \"text-primary\"\n }, {\n default: _withCtx(() => [\n _hoisted_3,\n _createTextVNode(\" \" + _toDisplayString(_ctx.$t(`${_unref(currentLanguage)}.common.back`)), 1)\n ]),\n _: 1\n })\n ])\n ]),\n (showCourse.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_4, [\n _createElementVNode(\"div\", _hoisted_5, [\n _createElementVNode(\"div\", _hoisted_6, [\n _createElementVNode(\"div\", _hoisted_7, [\n _createElementVNode(\"h3\", _hoisted_8, [\n _createElementVNode(\"span\", _hoisted_9, _toDisplayString(_unref(course).name), 1),\n _createElementVNode(\"div\", _hoisted_10, [\n _createElementVNode(\"span\", _hoisted_11, _toDisplayString(_unref(user).name) + \", \", 1),\n _createElementVNode(\"span\", _hoisted_12, [\n _createElementVNode(\"a\", _hoisted_13, _toDisplayString(_unref(completionMessage)), 1)\n ])\n ])\n ]),\n _hoisted_14\n ]),\n _createElementVNode(\"div\", _hoisted_15, [\n _createElementVNode(\"div\", _hoisted_16, [\n _createElementVNode(\"div\", _hoisted_17, [\n _createElementVNode(\"div\", _hoisted_18, [\n _createElementVNode(\"div\", _hoisted_19, [\n _hoisted_20,\n _createElementVNode(\"div\", _hoisted_21, [\n _createElementVNode(\"span\", _hoisted_22, _toDisplayString(_unref(course).modules?.length), 1),\n _createElementVNode(\"span\", _hoisted_23, _toDisplayString(_unref(moduleMessage)), 1)\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_24, [\n _createElementVNode(\"div\", _hoisted_25, [\n _hoisted_26,\n (_unref(courseStatus).isComplete)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_27, [\n _createElementVNode(\"span\", _hoisted_28, _toDisplayString(_unref(courseStatus).completedModulesCount), 1),\n _createElementVNode(\"span\", _hoisted_29, _toDisplayString(_ctx.$t(`${_unref(currentLanguage)}.user_progress.completed`)), 1)\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_30, [\n _createElementVNode(\"span\", _hoisted_31, _toDisplayString(_unref(courseStatus).modulesInProgressCount), 1),\n _createElementVNode(\"span\", _hoisted_32, _toDisplayString(_ctx.$t(`${_unref(currentLanguage)}.user_progress.in_progress`)), 1)\n ]))\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_33, [\n _createElementVNode(\"div\", _hoisted_34, [\n _hoisted_35,\n _createElementVNode(\"div\", _hoisted_36, [\n _createElementVNode(\"span\", _hoisted_37, _toDisplayString(_unref(totalLessonsCount)), 1),\n _createElementVNode(\"span\", _hoisted_38, _toDisplayString(_ctx.$t(`${_unref(currentLanguage)}.common.lessons`)), 1)\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_39, [\n _createElementVNode(\"div\", _hoisted_40, [\n _hoisted_41,\n _createElementVNode(\"div\", _hoisted_42, [\n _createElementVNode(\"div\", _hoisted_43, [\n _createElementVNode(\"span\", _hoisted_44, [\n _createTextVNode(_toDisplayString(_unref(completedLessonsCount)) + \" \", 1),\n _createElementVNode(\"span\", _hoisted_45, \"/\" + _toDisplayString(_unref(totalLessonsCount)), 1)\n ]),\n _createElementVNode(\"span\", _hoisted_46, _toDisplayString(_unref(completedLessonsPercentage)) + \"% - \" + _toDisplayString(_ctx.$t(`${_unref(currentLanguage)}.common.lessons_attended`)), 1)\n ]),\n _createElementVNode(\"div\", _hoisted_47, [\n _createElementVNode(\"div\", {\n class: \"progress-value-lb bg-success\",\n style: _normalizeStyle([{\"margin-left\":\"-3px\"}, 'width: ' + _unref(completedLessonsPercentage) + '%'])\n }, null, 4)\n ])\n ])\n ])\n ])\n ])\n ])\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_48, [\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"h2\", _hoisted_49, _toDisplayString(_ctx.$t(`${_unref(currentLanguage)}.common.modules_of`)) + \" \" + _toDisplayString(_unref(course).name), 1)\n ]),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(course).modules, (module) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"col-md-6 col-xl-4\",\n key: module.id\n }, [\n _createVNode(_component_router_link, {\n to: {name: 'training-module-show', params: {id: module.id}}\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"a\", _hoisted_50, [\n _createElementVNode(\"div\", _hoisted_51, [\n _createElementVNode(\"div\", _hoisted_52, [\n _createElementVNode(\"div\", _hoisted_53, [\n (module.image_url)\n ? (_openBlock(), _createElementBlock(\"img\", {\n key: 0,\n src: module.image_url,\n alt: \"image\",\n class: \"w-100 h-100 rounded\"\n }, null, 8, _hoisted_54))\n : (_openBlock(), _createElementBlock(\"img\", _hoisted_55))\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_56, [\n _createElementVNode(\"div\", _hoisted_57, [\n (isModuleCompleted(module.id))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_58, _toDisplayString(_ctx.$t(`${_unref(currentLanguage)}.user_progress.completed`)), 1))\n : _createCommentVNode(\"\", true),\n (module.in_progress && !isModuleCompleted(module.id))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_59, _toDisplayString(_ctx.$t(`${_unref(currentLanguage)}.user_progress.in_progress`)), 1))\n : _createCommentVNode(\"\", true),\n (!module.in_progress && !isModuleCompleted(module.id))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_60, _toDisplayString(_ctx.$t(`${_unref(currentLanguage)}.user_progress.to_do`)), 1))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"div\", _hoisted_61, _toDisplayString(truncateTitle(module.title)), 1),\n _createElementVNode(\"div\", _hoisted_62, [\n _createElementVNode(\"p\", _hoisted_63, _toDisplayString(truncateDescription(module?.description)), 1)\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_64, [\n _createElementVNode(\"div\", _hoisted_65, [\n _hoisted_66,\n _createTextVNode(\" \" + _toDisplayString(module.lessons?.length) + \" \" + _toDisplayString(module.lessons?.length > 1 ? _ctx.$t(`${_unref(currentLanguage)}.common.lessons`) : _ctx.$t(`${_unref(currentLanguage)}.common.lesson`)), 1)\n ])\n ])\n ])\n ]),\n _: 2\n }, 1032, [\"to\"])\n ]))\n }), 128))\n ])\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_67, [\n (showSpinner.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_68, [\n _hoisted_69,\n _createElementVNode(\"span\", _hoisted_70, \"   Hacking \" + _toDisplayString(_ctx.$t(`${_unref(currentLanguage)}.user_progress.in_progress`)) + \"...\", 1)\n ]))\n : _createCommentVNode(\"\", true)\n ]))\n ]))\n}\n}\n\n})","import script from \"./ModuleList.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./ModuleList.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__"],"sourceRoot":""}