{"version":3,"sources":["webpack:///./src/views/crafted/authentication/basic-flow/PasswordReset.vue?01a8","webpack:///./src/views/crafted/authentication/basic-flow/PasswordReset.vue?ad1d","webpack:///./src/views/crafted/authentication/basic-flow/PasswordReset.vue"],"names":["_hoisted_1","class","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","type","ref","id","_hoisted_11","_hoisted_12","_hoisted_13","render","_ctx","_cache","$props","$setup","$data","$options","_component_Field","_component_ErrorMessage","_component_router_link","_component_Form","onSubmit","onSubmitForgotPassword","forgotPassword","default","$t","currentLanguage","placeholder","name","autocomplete","to","_","components","Field","Form","ErrorMessage","setup","store","t","getters","getCurrentLanguage","localStorage","getItem","submitButton","value","shape","email","required","label","immediate","values","disabled","setAttribute","dispatch","FORGOT_PASSWORD","then","fire","text","icon","buttonsStyling","confirmButtonText","customClass","confirmButton","setItem","catch","Object","keys","getErrors","removeAttribute","__exports__"],"mappings":"uIAEMA,EAAa,CAAEC,MAAO,oEACtBC,EAAa,CAAED,MAAO,qBACtBE,EAAa,CAAEF,MAAO,kBACtBG,EAAa,CAAEH,MAAO,8BACtBI,EAAa,CAAEJ,MAAO,gBACtBK,EAA0B,gCAAoB,QAAS,CAAEL,MAAO,2CAA6C,UAAW,GACxHM,EAAa,CAAEN,MAAO,gCACtBO,EAAa,CAAEP,MAAO,iBACtBQ,EAAa,CAAER,MAAO,mDACtBS,EAAc,CAClBC,KAAM,SACNC,IAAK,eACLC,GAAI,2BACJZ,MAAO,yCAEHa,EAAc,CAAEb,MAAO,mBACvBc,EAAc,CAAEd,MAAO,sBACvBe,EAA2B,gCAAoB,OAAQ,CAAEf,MAAO,sDAAwD,MAAO,GAE9H,SAASgB,EAAOC,EAAUC,EAAYC,EAAYC,EAAYC,EAAWC,GAC9E,IAAMC,EAAmB,8BAAkB,SACrCC,EAA0B,8BAAkB,gBAC5CC,EAAyB,8BAAkB,eAC3CC,EAAkB,8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WAAM,OAAAW,EAAME,QAAQC,oBAAsBC,aAAaC,QAAQ,sBAE1FC,EAAe,iBAA8B,MAC7CpB,EAAiB,iBAAI,IAE3B,mBAAMG,GAAiB,WACtBH,EAAeqB,MAAS,SAAaC,MAAM,CACxCC,MAAO,SAAaA,MAAMR,EAAKZ,EAAgBkB,MAAK,8CAA8CG,SAAST,EAAKZ,EAAgBkB,MAAK,wCAAwCI,MAAM,aAEpL,CAAEC,WAAW,IAGhB,IAAM3B,EAAyB,SAAC4B,G,QAE9BP,EAAaC,MAAOO,UAAW,EAEb,QAAlB,EAAAR,EAAaC,aAAK,SAAEQ,aAAa,oBAAqB,MAKtDf,EACKgB,SAAS,OAAQC,gBAAiBJ,GAClCK,MAAK,WACJ,IAAKC,KAAK,CACRC,KAAMnB,EAAKZ,EAAgBkB,MAAK,+EAChCc,KAAM,UACNC,gBAAgB,EAChBC,kBAAmB,KACnBC,YAAa,CACXC,cAAe,mCAGnBrB,aAAasB,QAAQ,QAASb,EAAOJ,UAEtCkB,OAAM,WACWC,OAAOC,KAAK7B,EAAME,QAAQ4B,WAAU,GAEpD,IAAKX,KAAK,CACRC,KAAMnB,EAAKZ,EAAgBkB,MAAK,0FAChCc,KAAM,QACNC,gBAAgB,EAChBC,kBAAmBtB,EAAKZ,EAAgBkB,MAAK,uBAC7CiB,YAAa,CACXC,cAAe,qCAKP,QAAlB,EAAAnB,EAAaC,aAAK,SAAEwB,gBAAgB,qBAEpCzB,EAAaC,MAAOO,UAAW,GAKjC,MAAO,CACL7B,uBAAsB,EACtBC,eAAc,EACdoB,aAAY,EACZjB,gBAAe,M,qBC7ErB,MAAM2C,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAAS3D,KAErD","file":"js/chunk-2d2102f6.5a36ff22.js","sourcesContent":["import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"w-lg-500px custom-dark-bg rounded shadow-sm p-10 p-lg-15 mx-auto\" }\nconst _hoisted_2 = { class: \"text-center mb-10\" }\nconst _hoisted_3 = { class: \"text-dark mb-3\" }\nconst _hoisted_4 = { class: \"text-gray-400 fw-bold fs-4\" }\nconst _hoisted_5 = { class: \"fv-row mb-10\" }\nconst _hoisted_6 = /*#__PURE__*/_createElementVNode(\"label\", { class: \"form-label fw-bolder text-gray-900 fs-6\" }, \"E-mail\", -1)\nconst _hoisted_7 = { class: \"fv-plugins-message-container\" }\nconst _hoisted_8 = { class: \"fv-help-block\" }\nconst _hoisted_9 = { class: \"d-flex flex-wrap justify-content-center pb-lg-0\" }\nconst _hoisted_10 = {\n type: \"submit\",\n ref: \"submitButton\",\n id: \"kt_password_reset_submit\",\n class: \"btn btn-lg btn-success fw-bolder me-4\"\n}\nconst _hoisted_11 = { class: \"indicator-label\" }\nconst _hoisted_12 = { class: \"indicator-progress\" }\nconst _hoisted_13 = /*#__PURE__*/_createElementVNode(\"span\", { class: \"spinner-border spinner-border-sm align-middle ms-2\" }, null, -1)\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_Field = _resolveComponent(\"Field\")!\n const _component_ErrorMessage = _resolveComponent(\"ErrorMessage\")!\n const _component_router_link = _resolveComponent(\"router-link\")!\n const _component_Form = _resolveComponent(\"Form\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(_component_Form, {\n class: \"form w-100 fv-plugins-bootstrap5 fv-plugins-framework\",\n onSubmit: _ctx.onSubmitForgotPassword,\n id: \"kt_login_password_reset_form\",\n \"validation-schema\": _ctx.forgotPassword\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"h1\", _hoisted_3, _toDisplayString(_ctx.$t(`${_ctx.currentLanguage}.common.forgot_password`)), 1),\n _createElementVNode(\"div\", _hoisted_4, _toDisplayString(_ctx.$t(`${_ctx.currentLanguage}.auth.type_your_email_to_reset_your_password`)), 1)\n ]),\n _createElementVNode(\"div\", _hoisted_5, [\n _hoisted_6,\n _createVNode(_component_Field, {\n class: \"form-control form-control-solid\",\n type: \"email\",\n placeholder: _ctx.$t(`${_ctx.currentLanguage}.auth.enter_the_email_registered_on_the_platform`),\n name: \"email\",\n autocomplete: \"off\"\n }, null, 8, [\"placeholder\"]),\n _createElementVNode(\"div\", _hoisted_7, [\n _createElementVNode(\"div\", _hoisted_8, [\n _createVNode(_component_ErrorMessage, { name: \"email\" })\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_9, [\n _createElementVNode(\"button\", _hoisted_10, [\n _createElementVNode(\"span\", _hoisted_11, _toDisplayString(_ctx.$t(`${_ctx.currentLanguage}.auth.send_reset_link`)), 1),\n _createElementVNode(\"span\", _hoisted_12, [\n _createTextVNode(_toDisplayString(_ctx.$t(`${_ctx.currentLanguage}.profile.please_wait`)) + \"... \", 1),\n _hoisted_13\n ])\n ], 512),\n _createVNode(_component_router_link, {\n to: \"/sign-in\",\n class: \"btn btn-lg btn-secondary fw-bolder\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.$t(`${_ctx.currentLanguage}.auth.never_mind`)), 1)\n ]),\n _: 1\n })\n ])\n ]),\n _: 1\n }, 8, [\"onSubmit\", \"validation-schema\"])\n ]))\n}","\r\nimport {computed, defineComponent, ref, watch} from \"vue\";\r\nimport { ErrorMessage, Field, Form } from \"vee-validate\";\r\nimport { useStore } from \"vuex\";\r\nimport * as Yup from \"yup\";\r\nimport { Actions } from \"@/store/enums/StoreEnums\";\r\nimport Swal from \"sweetalert2/dist/sweetalert2.min.js\";\r\nimport {useI18n} from \"vue-i18n\";\r\nimport { onLoad } from \"@sentry/vue\";\r\n\r\nexport default defineComponent({\r\n name: \"password-reset\",\r\n components: {\r\n Field,\r\n Form,\r\n ErrorMessage,\r\n },\r\n setup()\r\n {\r\n const store = useStore();\r\n const { t } = useI18n();\r\n\r\n const currentLanguage = computed(() => store.getters.getCurrentLanguage || localStorage.getItem('currentLanguage'));\r\n\r\n const submitButton = ref(null)\r\n const forgotPassword = ref({});\r\n\r\n watch(currentLanguage, () => {\r\n forgotPassword.value = Yup.object().shape({\r\n email: Yup.string().email(t(`${currentLanguage.value}.messages.the_email_must_be_a_valid_email`)).required(t(`${currentLanguage.value}.messages.email_is_a_required_field`)).label(\"Email\"),\r\n });\r\n }, { immediate: true });\r\n\r\n //Form submit function\r\n const onSubmitForgotPassword = (values) => {\r\n // eslint-disable-next-line\r\n submitButton.value!.disabled = true;\r\n // Activate loading indicator\r\n submitButton.value?.setAttribute(\"data-kt-indicator\", \"on\");\r\n\r\n // dummy delay\r\n\r\n // Send login request\r\n store\r\n .dispatch(Actions.FORGOT_PASSWORD, values)\r\n .then(() => {\r\n Swal.fire({\r\n text: t(`${currentLanguage.value}.messages.request_sent_successfully_check_your_email_to_reset_your_password`),\r\n icon: \"success\",\r\n buttonsStyling: false,\r\n confirmButtonText: \"Ok\",\r\n customClass: {\r\n confirmButton: \"btn fw-bold btn-light-primary\",\r\n },\r\n });\r\n localStorage.setItem(\"email\", values.email);\r\n })\r\n .catch(() => {\r\n const [error] = Object.keys(store.getters.getErrors);\r\n // Alert then login failed\r\n Swal.fire({\r\n text: t(`${currentLanguage.value}.messages.we_had_a_problem_requesting_a_password_reset_check_that_the_email_is_correct`),\r\n icon: \"error\",\r\n buttonsStyling: false,\r\n confirmButtonText: t(`${currentLanguage.value}.messages.try_again`),\r\n customClass: {\r\n confirmButton: \"btn fw-bold btn-light-danger\",\r\n },\r\n });\r\n });\r\n\r\n submitButton.value?.removeAttribute(\"data-kt-indicator\");\r\n // eslint-disable-next-line\r\n submitButton.value!.disabled = false;\r\n\r\n };\r\n\r\n\r\n return {\r\n onSubmitForgotPassword,\r\n forgotPassword,\r\n submitButton,\r\n currentLanguage\r\n };\r\n }\r\n,\r\n});\r\n","import { render } from \"./PasswordReset.vue?vue&type=template&id=5c3ed7c3&ts=true\"\nimport script from \"./PasswordReset.vue?vue&type=script&lang=ts\"\nexport * from \"./PasswordReset.vue?vue&type=script&lang=ts\"\n\nimport exportComponent from \"/codebuild/output/src791094775/src/hackingclub-spa/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__"],"sourceRoot":""}