{"version":3,"sources":["webpack:///./src/pages/login/recovery.vue?b609","webpack:///./src/pages/login/recovery.vue","webpack:///src/pages/login/recovery.vue","webpack:///./src/pages/login/recovery.vue?061d","webpack:///./src/pages/login/recovery.vue?7950"],"names":["render","_vm","this","_c","_self","staticClass","attrs","localePath","path","_v","_s","$tr","ref","recoverForm","ruleValidate","nativeOn","$event","preventDefault","type","indexOf","_k","keyCode","key","submitFrom","model","value","email","callback","$$v","$set","expression","isLoading","on","event","staticRenderFns","components","AppEventInfo","AppEventContactInfo","DirectionLeftIcon","AppHeaderActions","data","required","message","trigger","computed","methods","isValid","eventId","authGroupId","requestPasswordRequest","then","catch","finally","recoverError","console","recoverSuccess","LangService","query","component"],"mappings":"qIAAA,W,yCCAA,IAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACE,YAAY,WAAW,CAACF,EAAG,MAAM,CAACE,YAAY,gBAAgB,CAACF,EAAG,MAAM,CAACE,YAAY,4BAA4B,CAACF,EAAG,MAAM,CAACE,YAAY,wBAAwB,CAACF,EAAG,MAAM,CAACE,YAAY,eAAe,CAACF,EAAG,cAAc,CAACE,YAAY,iDAAiDC,MAAM,CAAC,GAAKL,EAAIM,WAAW,CAAEC,KAAM,aAAc,CAACL,EAAG,OAAO,CAACE,YAAY,0BAA0B,CAACF,EAAG,sBAAsB,GAAGA,EAAG,OAAO,CAACE,YAAY,0CAA0C,CAACJ,EAAIQ,GAAG,IAAIR,EAAIS,GAAGT,EAAIU,IAAI,qBAAqB,UAAU,GAAGR,EAAG,qBAAqB,KAAKA,EAAG,MAAM,CAACE,YAAY,oBAAoB,CAACJ,EAAIQ,GAAG,IAAIR,EAAIS,GAAGT,EAAIU,IAAI,kBAAkB,OAAOR,EAAG,MAAM,CAACE,YAAY,4CAA4C,CAACF,EAAG,MAAM,CAACE,YAAY,2BAA2B,CAACF,EAAG,MAAM,CAACE,YAAY,8BAA8B,CAACF,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a,+BAEAZ,cACAY,OACA,CACAe,YACAC,gDACAC,gBAEA,CACAzB,aACAwB,kDACAC,kBAIAZ,eAIAa,aACA,gBACAX,yBAIAY,SACA,oBACA,uCACAC,yBAEA,gBACA,kBAEA,yBACA,GACApB,2CACAqB,sBACAC,oEAEA,OACAC,0BACAC,UACA,sBAAAjB,qBACA,wBAEAkB,UACA,uBAEAC,aACA,qBAGAC,gBACA,8BACAC,iBACA,gDAEAC,iBACAC,qBACAhD,0BACAiD,OAAA/B,iDCrJiW,I,wBCQ7VgC,EAAY,eACd,EACA1D,EACAkC,GACA,EACA,KACA,KACA,MAIa,aAAAwB,E","file":"js/recovery.90fe384d.js","sourcesContent":["export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../node_modules/style-resources-loader/lib/index.js??ref--9-oneOf-1-4!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./recovery.vue?vue&type=style&index=0&id=7d267106&prod&lang=scss&\"","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"content\"},[_c('div',{staticClass:\"recover auth\"},[_c('div',{staticClass:\"auth__header auth-header\"},[_c('div',{staticClass:\"auth-header__actions\"},[_c('div',{staticClass:\"header-back\"},[_c('router-link',{staticClass:\"header-back__content s-card s-card--no-padding\",attrs:{\"to\":_vm.localePath({ path: '/login' })}},[_c('span',{staticClass:\"header-back__back-icon\"},[_c('DirectionLeftIcon')],1),_c('span',{staticClass:\"header-back__text s-subtitle-secondary\"},[_vm._v(\" \"+_vm._s(_vm.$tr('recover.backDist'))+\" \")])])],1),_c('AppHeaderActions')],1)]),_c('div',{staticClass:\"s-h3 auth__title\"},[_vm._v(\" \"+_vm._s(_vm.$tr('recover.title'))+\" \")]),_c('div',{staticClass:\"auth__card s-card s-card--no-padding row\"},[_c('div',{staticClass:\"col-12 col-md-5 divider\"},[_c('div',{staticClass:\"auth__authform recoverForm\"},[_c('Form',{ref:\"recoverForm\",staticClass:\"authform__form\",attrs:{\"model\":_vm.recoverForm,\"rules\":_vm.ruleValidate,\"hide-required-mark\":true},nativeOn:{\"submit\":function($event){$event.preventDefault();}}},[_c('FormItem',{staticClass:\"authform__form-item\",attrs:{\"label\":\"Email\",\"prop\":\"email\"}},[_c('Input',{ref:\"emailInput\",attrs:{\"placeholder\":_vm.$tr('auth.email.placeholder')},nativeOn:{\"keydown\":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\"))return null;$event.preventDefault();return _vm.submitFrom('recoverForm')}},model:{value:(_vm.recoverForm.email),callback:function ($$v) {_vm.$set(_vm.recoverForm, \"email\", $$v)},expression:\"recoverForm.email\"}})],1)],1),_c('div',{staticClass:\"authform__submit\"},[_c('Button',{attrs:{\"type\":\"warning\",\"long\":\"\",\"disabled\":_vm.isLoading},on:{\"click\":function($event){return _vm.submitFrom('recoverForm')}}},[_vm._v(\" \"+_vm._s(_vm.$tr('recover.submit'))+\" \")])],1)],1)]),_c('div',{staticClass:\"col-12 col-md-7\"},[_c('div',{staticClass:\"auth__event-info-main\"},[_c('AppEventInfo',{attrs:{\"show-date\":false,\"event\":_vm.event}})],1),_c('div',{staticClass:\"auth__event-info-contacts\"},[_c('AppEventContactInfo',{attrs:{\"event\":_vm.event}})],1)])])])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n  <div class=\"content\">\n    <div class=\"recover auth\">\n      <div class=\"auth__header auth-header\">\n        <div class=\"auth-header__actions\">\n          <div class=\"header-back\">\n            <router-link\n              class=\"header-back__content s-card s-card--no-padding\"\n              :to=\"localePath({ path: '/login' })\"\n            >\n              <span class=\"header-back__back-icon\">\n                <DirectionLeftIcon />\n              </span>\n              <span class=\"header-back__text s-subtitle-secondary\">\n                {{ $tr('recover.backDist') }}\n              </span>\n            </router-link>\n          </div>\n          <AppHeaderActions />\n        </div>\n      </div>\n      <div class=\"s-h3 auth__title\">\n        {{ $tr('recover.title') }}\n      </div>\n      <div class=\"auth__card s-card s-card--no-padding row\">\n        <div class=\"col-12 col-md-5 divider\">\n          <div class=\"auth__authform recoverForm\">\n            <Form\n              ref=\"recoverForm\"\n              :model=\"recoverForm\"\n              :rules=\"ruleValidate\"\n              :hide-required-mark=\"true\"\n              class=\"authform__form\"\n              @submit.native.prevent\n            >\n              <FormItem label=\"Email\" prop=\"email\" class=\"authform__form-item\">\n                <Input\n                  ref=\"emailInput\"\n                  v-model=\"recoverForm.email\"\n                  :placeholder=\"$tr('auth.email.placeholder')\"\n                  @keydown.enter.native.prevent=\"submitFrom('recoverForm')\"\n                />\n              </FormItem>\n            </Form>\n            <div class=\"authform__submit\">\n              <Button\n                type=\"warning\"\n                long\n                :disabled=\"isLoading\"\n                @click=\"submitFrom('recoverForm')\"\n              >\n                {{ $tr('recover.submit') }}\n              </Button>\n            </div>\n          </div>\n        </div>\n        <div class=\"col-12 col-md-7\">\n          <div class=\"auth__event-info-main\">\n            <AppEventInfo :show-date=\"false\" :event=\"event\" />\n          </div>\n          <div class=\"auth__event-info-contacts\">\n            <AppEventContactInfo :event=\"event\" />\n          </div>\n        </div>\n      </div>\n    </div>\n  </div>\n</template>\n\n<script>\nimport { mapState } from 'vuex'\nimport AppEventInfo from '@/components/base/app-event-info'\nimport AppEventContactInfo from '@/components/common/app-event-contact-info'\nimport AppHeaderActions from '@/components/base/header/app-header-actions'\nimport DirectionLeftIcon from '@/components/themed-icons/direction-left'\nimport { getExistingApiInstance } from '@/api'\nimport LangService from '@/domain/services/lang-service'\n\nexport default {\n  components: {\n    AppEventInfo,\n    AppEventContactInfo,\n    DirectionLeftIcon,\n    AppHeaderActions,\n  },\n  data() {\n    return {\n      recoverForm: {\n        email: this.$route.query.email,\n      },\n      ruleValidate: {\n        email: [\n          {\n            required: true,\n            message: this.$tr('auth.email.errorMessageLack'),\n            trigger: 'blur',\n          },\n          {\n            type: 'email',\n            message: this.$tr('auth.email.errorMessageFormat'),\n            trigger: 'blur',\n          },\n        ],\n      },\n      isLoading: false,\n    }\n  },\n\n  computed: {\n    ...mapState({\n      event: (state) => state.event.data,\n    }),\n  },\n\n  methods: {\n    async submitFrom(form) {\n      const isValid = await this.$refs[form].validate()\n      isValid && (await this.recover())\n    },\n    async recover() {\n      this.isLoading = true\n      // todo: должно быть в use-функции\n      const api = getExistingApiInstance()\n      const payload = {\n        email: this.recoverForm.email.toLowerCase(),\n        eventId: this.event.id,\n        authGroupId: this.$store.getters['domain/currentAuthGroupId'],\n      }\n      await api.user\n        .requestPasswordRequest(payload)\n        .then(() => {\n          this.$gtm.trackEvent({ event: 'pass-reset' })\n          this.recoverSuccess()\n        })\n        .catch((e) => {\n          this.recoverError(e)\n        })\n        .finally(() => {\n          this.isLoading = false\n        })\n    },\n    recoverError(e) {\n      this.$refs.emailInput.focus()\n      console.error(e)\n      this.$Message.error(this.$tr('recover.error'))\n    },\n    recoverSuccess() {\n      LangService.toLocalePath({\n        path: '/login/check-email',\n        query: { email: this.recoverForm.email.toLowerCase() },\n      })\n    },\n  },\n}\n</script>\n<style lang=\"scss\">\n@import '~@/styles/pages/login.scss';\n@import '~@/styles/blocks/header-back.scss';\n</style>\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./recovery.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./recovery.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./recovery.vue?vue&type=template&id=7d267106&\"\nimport script from \"./recovery.vue?vue&type=script&lang=js&\"\nexport * from \"./recovery.vue?vue&type=script&lang=js&\"\nimport style0 from \"./recovery.vue?vue&type=style&index=0&id=7d267106&prod&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\nexport default component.exports"],"sourceRoot":""}