{"version":3,"sources":["webpack:///./src/pages/request.vue","webpack:///./src/domain/composables/request/use-request.js","webpack:///./src/components/common/app-request-card.vue","webpack:///src/components/common/app-request-card.vue","webpack:///./src/components/common/app-request-card.vue?e6c1","webpack:///./src/components/common/app-request-card.vue?950e","webpack:///./src/components/common/app-view-formatter.vue","webpack:///src/components/common/app-view-formatter.vue","webpack:///./src/components/common/app-view-formatter.vue?ecb1","webpack:///./src/components/common/app-view-formatter.vue?dc74","webpack:///src/pages/request.vue","webpack:///./src/pages/request.vue?00c4","webpack:///./src/pages/request.vue?8c8f","webpack:///./src/domain/composables/use-auth.js","webpack:///./src/domain/services/login-service/strategies/auth-auth-strategy.js","webpack:///./src/domain/composables/use-registration.js","webpack:///./src/components/common/app-request-card.vue?2eb5","webpack:///./src/domain/services/login-service/strategies/familiar-user-login-strategy.js","webpack:///./src/domain/services/login-service/strategies/new-user-login-strategy.js","webpack:///./src/domain/services/login-service/login-service.js","webpack:///./src/pages/request.vue?4657","webpack:///./src/domain/services/event-date-service.js","webpack:///./src/domain/services/login-service/strategies/user-login-strategy.js"],"names":["render","_vm","this","_c","_self","request","staticClass","isLoading","attrs","description","scopedSlots","_u","key","fn","mapStatusToAlertType","_v","_s","alert","text","proxy","userRequests","length","$tr","getRequestI18n","_l","item","requestId","category","is_coauthor","dateExpired","on","deleteUserRequest","openUserRequestModal","sendCoAuthors","_e","isSendingLimitReached","isUserSendingLimitReached","directives","name","rawName","value","isFormHidden","expression","staticStyle","userSendingLimit","formId","setFields","handleSubmitForm","submit","formSubmit","requestStatus","closeUserRequestModal","model","modal","callback","$$v","loadModal","requestItem","staticRenderFns","useRequest","async","getRequest","id","api","getExistingApiInstance","data","getOne","include","getUserRequest","userRequest","getUserRequests","userId","idCoauthors","params","filter","perPage","getMany","deleteUserRequests","delete","createRequest","formRecord","createUserRequest","email","userData","request_user_id","userRequestCoauthor","create","class","statusClass","status","statusText","comment","isCoAuthor","emailCoAuthors","ref","domProps","$event","target","composing","checkEmailCoAuthors","sendCoAuthorsRequest","showAuthor","showAuthorName","fromISOToString","createdAt","openUserRequest","props","type","default","computed","authors","methods","component","load","formatData","index","val","i","baseUrl","path","city","region","country","required","components","AppInfoBlock","AppMarkdown","AppForm","AppCardRequest","AppViewFormatter","requestForm","fields","requestsRemaining","requestText","dateRange","watch","handler","immediate","fromStringToISO","DateTime","console","form","window","map","f","field","coAuthor","isCoauthor","useAuth","authenticate","password","authGroupId","LogicError","payload","isError","user","e","AuthAuthStrategy","UserLoginStrategy","constructor","event","super","gtm","GtmPlugin","gtmOptions","isLoginError","store","getters","Error","translateI18N","trackEvent","authService","AuthService","setAuthData","token","useRegistration","getFormData","join","isUserHasRegistration","eventId","meta","registration","isExist","isRegistrationExist","exist","getFieldValues","sort","registrationData","getRegistrationCode","registrationCode","getUserTicket","worksheets","ticketNumber","getRegistrationsByUser","eventIds","quickRegistration","fromEventId","FamiliarUserLoginStrategy","authAndAuth","eventData","execute","isRegistrationCheckError","_registrationUnavailableGuard","_toRegistration","_toStartPage","pages","state","startPagePath","EventService","defineStartPagePath","LangService","toLocalePath","query","NewUserLoginStrategy","_toCreateUser","LoginService","str","EMAIL_REGEX","test","strategyName","strategy","USER_STRATEGY_NAMES","UNREGISTERED","USER_STRATEGIES","FAMILIAR","MIN_DATE","fromSeconds","MAX_DATE","EventDateService","_event","getData","getMinDate","registrationStartedAt","getMaxDate","registrationEndedAt","isEventOccasion","eventOccasion","startedAt","endedAt","dateStr","date","fromISO","invalid","locale","start","end","entity","months","divider","formatDateWithDivider","year","startYear","month","startMonth","day","startDay","endYear","endMonth","endDay","monthToStr","message","formatDate","before","during","after","onGoing","TIME_STATUSES","ENDED","WILL_START","eventDateServise","AbstractMethod","args","translateFn","registrationTimeStatus","IN_PROGRESS","_throwUnavailableRegistrationAlert","startRegistrationTime","endRegistrationTime","getMessageWithOneDate","getAlertMessageWithDivider"],"mappings":"kHAAA,IAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,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EAhE,OACA,OACA1D,aACAF,aACA6H,iBACA9G,gBACAM,eACAyG,UACA9E,SACAG,aACAC,iBAIAoD,UACA5F,QACA,OACAC,sBACAyF,iCAGAyB,oBACA,qCAIA,uDAFA,yBAIA3F,eACA,OACA,wCACA,4BACA,oCACA,kBAGAZ,cACA,0CAEAqB,gBACA,gCAEAmF,cACA,SACA,6CACA,4CAEA,+CACA,0DACAC,KACAA,OAGA,uCACA,yDACAA,OAGA,kCACA,qDACAA,OAGA,IAEAxH,uBACA,+CACA,UAEA,uCACA,UAEA,kCACA,QAEA,SAGAyH,OACA,2BACAC,UACA,gBAEAC,eAGA1B,SACA2B,uBACAnC,uBACAoC,gBACApH,kBACA,6CAEA,gBACA,kBACA,IACA,kDACA,oBACA,2BACA,qBAAAgG,oBAEA,yBACA,SACAqB,iBACA,QACA,oBAGA,mCAAAC,GAAA,QACA,4BACA,+BACA,qBAEA,6BACA,2CACA,+BACA,qBAEA,uBACA,UACA,mBAAAA,OAAAnH,4BACAoH,qBACA,sBACA,qDAEA,SACA,oBACA,+BAEAF,mBAIA,6BACA,UACA,2BACAE,qBACA,yEACA,SACA,oBACA,+BAEAF,mBAIA,2BACA,UACA,gCACA,+BACA,oBACA,sEACA,SACAA,mBAGA,oCACA,cACA,oCAEA,kBACA,yCACAG,QACA,+CACA,UACA,qBACAC,iBACAL,oDACAK,SACA,0CACAA,mCAEA,CAAAC,QAAAzG,gBARA,KAUAkC,wBAEA,mBAEAvB,wBACA,cACA,kBACA,qBAEA,qBACA,IACA,kDACA,SACAyF,mBAGA,0BACA,IAEA,0BACA3E,cAAA,8BACAM,qCACA7C,2BAGA,4BACA,eACA,8BACA,sBACA8C,MAEA,gCACA,UACA9C,eACA8E,sBACAf,gBACAE,kBACAuD,oBACAC,sCAEA,SACAP,mBAGA9F,aACA,iBC7WiV,ICQ7U,G,UAAY,eACd,EACA9C,EACA0D,GACA,EACA,KACA,KACA,OAIa,e,iIChBA,SAAS0F,IAKtBxF,eAAeyF,EA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BACxB,OAAOC,eAAYpQ,KAAQmQ,GAG7B,sCACM7Q,KAAKqM,UAAU0E,yBAA2BP,OAAcQ,aAC1DhR,KAAKiR,qCAITA,qCACE,MAAM/B,EAAQlP,KAAK2Q,iBAAiBO,sBAC9B/B,EAAMnP,KAAK2Q,iBAAiBQ,oBAIlC,GAAInR,KAAKqM,UAAU0E,yBAA2BP,OAAcC,MAC1D,MAAM,IAAInG,MAAMtK,KAAKuK,cAAc,0BAIrC,GAAIvK,KAAKqM,UAAU0E,yBAA2BP,OAAcE,WAAY,CACtE,MAAMzB,EAAS,CACbG,OAAQpP,KAAKuK,cAAc,6BAC3B8E,OAAQrP,KAAKuK,cAAc,WAEvB2F,EAAUhC,OAAiBkD,sBAAsBnC,EAAQC,GAC/D,MAAM,IAAI5E,MAAM4F,GAGlB,MAAMjB,EAAS,CACbG,OAAQpP,KAAKuK,cAAc,0BAC3B8E,OAAQrP,KAAKuK,cAAc,UAC3B+E,QAAStP,KAAKuK,cAAc,8BAGxBhF,EAAS2I,OAAiBmD,2BAC9BpC,EACAC,EACAC,GAEF,MAAM,IAAI7E,MAAM/E,EAAO2K,Y","file":"js/request.316ba3c3.js","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return (_vm.request)?_c('div',{staticClass:\"request-page\"},[_c('div',{staticClass:\"request-page__request-head\"},[(!_vm.isLoading)?[_c('AppInfoBlock',{staticClass:\"request-page__info-block\",attrs:{\"limit\":85,\"description\":_vm.request.description},scopedSlots:_vm._u([{key:\"alert\",fn:function(){return [_c('Alert',{attrs:{\"type\":_vm.mapStatusToAlertType,\"banner\":\"\"}},[_vm._v(\" \"+_vm._s(_vm.alert.text)+\" \")])]},proxy:true},{key:\"text\",fn:function(){return [_c('AppMarkdown',{attrs:{\"text\":_vm.request.description}})]},proxy:true}],null,false,4193070747)}),_c('div',{staticClass:\"request-page--divider\"}),(_vm.userRequests && _vm.userRequests.length)?_c('div',{staticClass:\"request-page__request sent-requests\"},[_c('h3',{staticClass:\"sent-requests__title\"},[_vm._v(\" \"+_vm._s(_vm.$tr(_vm.getRequestI18n('sentRequests')))+\" \")]),_c('div',{staticClass:\"row\"},_vm._l((_vm.userRequests),function(item){return _c('div',{key:item.requestId,staticClass:\"col-xlg-4 col-lg-6 col-md-12 col-sm-12\"},[_c('AppCardRequest',{attrs:{\"data\":item,\"category\":_vm.request.category,\"coauthor\":_vm.request.is_coauthor,\"date-expired\":_vm.dateExpired},on:{\"del-request\":_vm.deleteUserRequest,\"open-request\":_vm.openUserRequestModal,\"send-coauthors\":_vm.sendCoAuthors}})],1)}),0)]):_vm._e()]:_c('Spin',{attrs:{\"fix\":\"\"}})],2),_c('div',{staticClass:\"request-page__request new-request\"},[(_vm.dateExpired)?[_c('Alert',{staticClass:\"new-request__count-alert\",attrs:{\"type\":\"error\"}},[_c('p',{staticClass:\"s-body\"},[_vm._v(\" \"+_vm._s(_vm.$tr(_vm.getRequestI18n('requestAlertSendDisabled')))+\" \")])])]:(_vm.request.isSendingLimitReached)?[_c('Alert',{staticClass:\"new-request__count-alert\",attrs:{\"type\":\"warning\"}},[_c('p',{staticClass:\"s-body\"},[_vm._v(\" \"+_vm._s(_vm.$tr('request.requestAlertTotalLimit'))+\" \")])])]:(_vm.request.isUserSendingLimitReached)?[_c('Alert',{staticClass:\"new-request__count-alert\",attrs:{\"type\":\"warning\"}},[_c('p',{staticClass:\"s-body\"},[_vm._v(\" \"+_vm._s(_vm.$tr(_vm.getRequestI18n('requestAlertLimit')))+\" \")])])]:_vm._e(),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(!_vm.isFormHidden),expression:\"!isFormHidden\"}],staticStyle:{\"position\":\"relative\"}},[_c('h3',{staticClass:\"new-request__title\"},[_vm._v(\" \"+_vm._s(_vm.$tr(_vm.getRequestI18n('newRequestTitle')))+\" \")]),(_vm.request.userSendingLimit)?_c('Alert',{staticClass:\"new-request__count-alert\",attrs:{\"type\":\"success\"}},[_c('p',{staticClass:\"s-body\"},[_vm._v(\" \"+_vm._s(_vm.$tr(_vm.getRequestI18n('requestAlertCount')))+\": \"+_vm._s(_vm.request.userSendingLimit)+\" \")]),_c('span',{staticClass:\"s-small-2\"},[_vm._v(\" \"+_vm._s(_vm.$tr(_vm.getRequestI18n('requestAlertCountLimit')))+\": \"+_vm._s(_vm.request.userSendingLimit - _vm.userRequests.length)+\" \")])]):_vm._e(),_c('AppForm',{attrs:{\"form-id\":_vm.request.formId,\"clear-form\":\"\"},on:{\"fields\":_vm.setFields,\"submit\":_vm.handleSubmitForm},scopedSlots:_vm._u([{key:\"submit\",fn:function({ submit: formSubmit }){return [_c('Portal',{attrs:{\"to\":\"profile-submit\"}},[_c('Button',{staticClass:\"registration-footer__submit\",attrs:{\"type\":\"primary\",\"size\":\"large\",\"disabled\":_vm.isLoading || _vm.requestStatus !== 'during'},on:{\"click\":formSubmit}},[_vm._v(\" \"+_vm._s(_vm.$tr(_vm.getRequestI18n('sendBtn')))+\" \")])],1)]}}],null,false,1421471222)}),_c('div',{staticClass:\"registration__registration-footer registration-footer\"},[_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-12 text-right\"},[_c('PortalTarget',{attrs:{\"name\":\"profile-submit\"}})],1)])])],1)],2),_c('Modal',{attrs:{\"footer-hide\":\"\"},on:{\"on-cancel\":_vm.closeUserRequestModal},model:{value:(_vm.modal),callback:function ($$v) {_vm.modal=$$v},expression:\"modal\"}},[_c('AppViewFormatter',{attrs:{\"load\":_vm.loadModal,\"data\":_vm.requestItem}}),(_vm.loadModal)?_c('Spin',{attrs:{\"fix\":\"\"}}):_vm._e()],1)],1):_vm._e()\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { getExistingApiInstance } from '@/api'\n\nexport default function useRequest() {\n  async function getRequest(id) {\n    const api = getExistingApiInstance()\n    const { data } = await api.request.getOne(id, { include: 'form' })\n    return data\n  }\n  async function getUserRequest(id) {\n    const api = getExistingApiInstance()\n    const { data } = await api.userRequest.getOne(id, { include: 'fields' })\n    return data\n  }\n  async function getUserRequests(id, userId, category, idCoauthors) {\n    const api = getExistingApiInstance()\n    const params = {\n      filter: {\n        'request.id': id,\n        'request.category': category,\n        id: idCoauthors,\n      },\n      perPage: 0,\n      include: 'request',\n    }\n    const { data } = await api.userRequest.getMany(params)\n    return data\n  }\n  async function deleteUserRequests(id) {\n    const api = getExistingApiInstance()\n    const { data } = await api.userRequest.delete(id)\n    return data\n  }\n  async function createRequest(params) {\n    const api = getExistingApiInstance()\n    const { data } = await api.formRecord.createRequest(params)\n    return data\n  }\n  async function createUserRequest(id, email) {\n    const api = getExistingApiInstance()\n    const userData = {\n      email: email,\n      request_user_id: id,\n    }\n    const { data } = await api.userRequestCoauthor.create(userData)\n    return data\n  }\n\n  return {\n    getRequest,\n    getUserRequest,\n    getUserRequests,\n    deleteUserRequests,\n    createRequest,\n    createUserRequest,\n  }\n}\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"request-item\"},[_c('div',{staticClass:\"request-item__table\"},[_c('div',{staticClass:\"request-item__row\"},[_c('div',{staticClass:\"request-item__head\"},[_vm._v(\"ID\")]),_c('div',{staticClass:\"request-item__content\",staticStyle:{\"display\":\"flex\",\"justify-content\":\"space-between\"}},[_vm._v(\" \"+_vm._s(_vm.data.requestId)+\" \")])]),_c('div',{staticClass:\"request-item__row\"},[_c('div',{staticClass:\"request-item__head\"},[_vm._v(\" \"+_vm._s(_vm.$tr(_vm.getRequestI18n('requestType')))+\" \")]),_c('div',{staticClass:\"request-item__content\"},[_vm._v(\" \"+_vm._s(_vm.data.name)+\" \")])]),_c('div',{staticClass:\"request-item__row\"},[_c('div',{staticClass:\"request-item__head\"},[_vm._v(\" \"+_vm._s(_vm.$tr('request.thesis.requestAlertStatus'))+\" \")]),_c('div',{staticClass:\"request-item__content\"},[_c('div',{staticClass:\"request-item__status\",class:_vm.statusClass(_vm.data.status)},[_vm._v(\" \"+_vm._s(_vm.statusText(_vm.data.status))+\" \")])])]),(_vm.data.comment)?_c('div',{staticClass:\"request-item__row\"},[_c('div',{staticClass:\"request-item__head\"},[_vm._v(\" \"+_vm._s(_vm.$tr('request.comment'))+\" \")]),_c('div',{staticClass:\"request-item__content\"},[_vm._v(\" \"+_vm._s(_vm.data.comment)+\" \")])]):_vm._e(),(_vm.isCoAuthor)?_c('div',{staticClass:\"request-item__row\"},[_c('div',{staticClass:\"request-item__head\"},[_vm._v(\" \"+_vm._s(_vm.$tr('request.thesis.addCoauthor'))+\" \")]),_c('div',{staticClass:\"request-item__content input\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.emailCoAuthors),expression:\"emailCoAuthors\"}],ref:\"inputCoAuthors\",staticClass:\"request-item__input\",attrs:{\"placeholder\":_vm.$tr('request.thesis.addCoauthorEmail'),\"required\":\"\"},domProps:{\"value\":(_vm.emailCoAuthors)},on:{\"input\":function($event){if($event.target.composing)return;_vm.emailCoAuthors=$event.target.value}}}),_c('button',{staticClass:\"request-item__button\",attrs:{\"disabled\":_vm.checkEmailCoAuthors},on:{\"click\":_vm.sendCoAuthorsRequest}},[_c('span',[_c('Icon',{staticClass:\"request-item__icon\",attrs:{\"type\":\"md-arrow-forward\",\"size\":20}})],1)])])]):_vm._e(),(_vm.showAuthor)?_c('div',{staticClass:\"request-item__row\"},[_c('div',{staticClass:\"request-item__head\"},[_vm._v(\" \"+_vm._s(_vm.$tr('request.thesis.coauthor'))+\" \")]),_c('div',{staticClass:\"request-item__content\"},[_vm._v(\" \"+_vm._s(_vm.showAuthorName)+\" \")])]):_vm._e(),_c('div',{staticClass:\"request-item__row\"},[_c('div',{staticClass:\"request-item__head\"},[_vm._v(\" \"+_vm._s(_vm.$tr(_vm.getRequestI18n('requestDate')))+\" \")]),_c('div',{staticClass:\"request-item__content\"},[_vm._v(\" \"+_vm._s(_vm.fromISOToString(_vm.data.createdAt))+\" \")])])]),_c('div',{staticClass:\"card-list-item__btn-block\",staticStyle:{\"display\":\"flex\",\"justify-content\":\"right\"}},[(!_vm.dateExpired)?_c('span',{staticClass:\"sent-requests__remove s-pointer\",on:{\"click\":_vm.deleteUserRequest}},[_vm._v(_vm._s(_vm.$tr('request.thesis.remove')))]):_vm._e(),_c('span',{staticClass:\"sent-requests__open s-pointer\",on:{\"click\":_vm.openUserRequest}},[_vm._v(_vm._s(_vm.$tr('request.thesis.open')))])])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n  <div class=\"request-item\">\n    <div class=\"request-item__table\">\n      <div class=\"request-item__row\">\n        <div class=\"request-item__head\">ID</div>\n        <div\n          class=\"request-item__content\"\n          style=\"display: flex; justify-content: space-between\"\n        >\n          {{ data.requestId }}\n          <!--\n            <Button\n                    v-if=\"!dateExpired\"\n                    type=\"error\"\n                    size=\"small\"\n                    class=\"request-item__delete\"\n                    ghost\n                    @click=\"deleteUserRequest\">\n                <Icon type=\"ios-trash-outline\" />\n            </Button>\n            <span\n                    v-if=\"!dateExpired\"\n                    class=\"request-item__remove s-pointer\"\n                    @click=\"deleteUserRequest\">\n                {{ $tr('request.thesis.remove') }}\n            </span>\n            -->\n        </div>\n      </div>\n      <div class=\"request-item__row\">\n        <div class=\"request-item__head\">\n          {{ $tr(getRequestI18n('requestType')) }}\n        </div>\n        <div class=\"request-item__content\">\n          {{ data.name }}\n        </div>\n      </div>\n      <div class=\"request-item__row\">\n        <div class=\"request-item__head\">\n          {{ $tr('request.thesis.requestAlertStatus') }}\n        </div>\n        <div class=\"request-item__content\">\n          <div class=\"request-item__status\" :class=\"statusClass(data.status)\">\n            {{ statusText(data.status) }}\n          </div>\n        </div>\n      </div>\n      <div v-if=\"data.comment\" class=\"request-item__row\">\n        <div class=\"request-item__head\">\n          {{ $tr('request.comment') }}\n        </div>\n        <div class=\"request-item__content\">\n          {{ data.comment }}\n        </div>\n      </div>\n      <div v-if=\"isCoAuthor\" class=\"request-item__row\">\n        <div class=\"request-item__head\">\n          {{ $tr('request.thesis.addCoauthor') }}\n        </div>\n        <div class=\"request-item__content input\">\n          <input\n            ref=\"inputCoAuthors\"\n            v-model=\"emailCoAuthors\"\n            class=\"request-item__input\"\n            :placeholder=\"$tr('request.thesis.addCoauthorEmail')\"\n            required\n          />\n          <button\n            class=\"request-item__button\"\n            :disabled=\"checkEmailCoAuthors\"\n            @click=\"sendCoAuthorsRequest\"\n          >\n            <span>\n              <Icon\n                class=\"request-item__icon\"\n                type=\"md-arrow-forward\"\n                :size=\"20\"\n              />\n            </span>\n          </button>\n        </div>\n      </div>\n      <div v-if=\"showAuthor\" class=\"request-item__row\">\n        <div class=\"request-item__head\">\n          {{ $tr('request.thesis.coauthor') }}\n        </div>\n        <div class=\"request-item__content\">\n          {{ showAuthorName }}\n        </div>\n      </div>\n      <div class=\"request-item__row\">\n        <div class=\"request-item__head\">\n          {{ $tr(getRequestI18n('requestDate')) }}\n        </div>\n        <div class=\"request-item__content\">\n          {{ fromISOToString(data.createdAt) }}\n        </div>\n      </div>\n    </div>\n    <div\n      class=\"card-list-item__btn-block\"\n      style=\"display: flex; justify-content: right\"\n    >\n      <span\n        v-if=\"!dateExpired\"\n        class=\"sent-requests__remove s-pointer\"\n        @click=\"deleteUserRequest\"\n        >{{ $tr('request.thesis.remove') }}</span\n      >\n\n      <span class=\"sent-requests__open s-pointer\" @click=\"openUserRequest\">{{\n        $tr('request.thesis.open')\n      }}</span>\n    </div>\n  </div>\n</template>\n<script>\nimport { fromISOToString } from '@/utils'\nimport { REQUESTS_TYPE_MAP, REQUESTS_TYPE_COLOR_MAP } from '@/utils/constants'\nimport loginService from '@/domain/services/login-service/login-service'\n\nexport default {\n  props: {\n    data: {\n      type: Object,\n      default: () => {},\n    },\n    category: { type: String, default: '' },\n    dateExpired: { type: Boolean, default: false },\n  },\n  data() {\n    return {\n      emailCoAuthors: '',\n    }\n  },\n  computed: {\n    isCoAuthor() {\n      return this.data.isCoauthor\n    },\n    showAuthor() {\n      return this.data.coAuthor\n    },\n    showAuthorName() {\n      const authors = []\n      for (const key in this.showAuthor) {\n        authors.push(\n          ' ' +\n            this.data.coAuthor[key].firstName +\n            ' ' +\n            this.data.coAuthor[key].lastName,\n        )\n      }\n      return authors.toString()\n    },\n    checkEmailCoAuthors() {\n      return !loginService.validateEmail(this.emailCoAuthors)\n    },\n  },\n  methods: {\n    fromISOToString,\n    getRequestI18n(key) {\n      return `request.${this.category}.` + key\n    },\n    statusClass(type) {\n      return `request-item__status--${REQUESTS_TYPE_COLOR_MAP[type]}`\n    },\n    statusText(status) {\n      return this.$tr(`request.status.${REQUESTS_TYPE_MAP[status]}`)\n    },\n    deleteUserRequest() {\n      this.$emit('del-request', this.data.requestId)\n    },\n    openUserRequest() {\n      this.$emit('open-request', this.data.requestId)\n    },\n    sendCoAuthorsRequest() {\n      this.$emit('send-coauthors', {\n        id: this.data.requestId,\n        email: this.emailCoAuthors,\n      })\n      this.emailCoAuthors = null\n    },\n  },\n}\n</script>\n<style lang=\"scss\">\n.request-item {\n  display: flex;\n  flex-direction: column;\n  position: relative;\n  margin-bottom: 15px;\n  border: 1px solid #e6e6e6;\n  border-radius: 5px;\n  overflow: hidden;\n  word-break: break-word;\n\n  &__table {\n    text-align: left;\n    width: 100%;\n    @include media-breakpoint-down(sm) {\n      padding: 6px 0px;\n    }\n  }\n\n  &__row {\n    display: flex;\n\n    &:first-child {\n      > .card-list-item__head {\n        padding: 16px 24px 0 24px;\n        border-radius: 5px 0 0 0;\n      }\n\n      > .card-list-item__content {\n        padding: 16px 24px 0 24px;\n      }\n    }\n\n    &:last-child {\n      > .card-list-item__head {\n        padding: 0 24px 16px 24px;\n        border-radius: 0 0 0 5px;\n      }\n\n      > .card-list-item__content {\n        padding: 0 24px 16px 24px;\n      }\n    }\n\n    @include media-breakpoint-down(sm) {\n      flex-direction: column;\n      padding: 5px 18px;\n    }\n  }\n\n  &__head {\n    min-width: 220px;\n    background-color: var(--s-black-color-5);\n    padding: 14px 20px;\n    letter-spacing: 0.1px;\n    font-family: var(--s-semi-bold-font-font);\n    font-weight: bold;\n    font-size: 14px;\n    line-height: 22px;\n    @include media-breakpoint-down(sm) {\n      min-width: initial;\n      background-color: #fff;\n      padding: 0;\n    }\n  }\n\n  &__content {\n    flex-grow: 1;\n    white-space: normal;\n    padding: 14px 20px;\n    color: var(--var-black-80);\n    font-size: 14px;\n    line-height: 22px;\n    letter-spacing: 0.1px;\n    font-family: var(--s-regular-font);\n    font-weight: 400;\n    @include media-breakpoint-down(sm) {\n      padding: 0;\n    }\n  }\n\n  &__status {\n    &--warning {\n      color: var(--s-warning-color);\n    }\n\n    &--danger {\n      color: var(--s-error-color);\n    }\n\n    &--success {\n      color: var(--s-success-color);\n    }\n  }\n  .ivu-icon {\n    color: #fff;\n    font-size: 20px;\n  }\n  &__input {\n    width: 80%;\n    display: inline-block;\n    width: 100%;\n    font-size: 14px;\n    border: 1px solid var(--s-black-color-60);\n    border-radius: 5px;\n  }\n  &__input:focus {\n    outline: none !important;\n    border: 1px solid var(--s-black-color-60);\n  }\n  &__input:hover {\n    border-color: var(--s-black-color-80);\n  }\n\n  &__button {\n    width: 20%;\n    cursor: pointer;\n    background-color: var(--s-primary-color-70);\n    border-color: var(--s-primary-color-70);\n    height: 32px;\n    font-size: 14px;\n    border-radius: 5px;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    border: none;\n    margin-left: 8px;\n    transition:\n      color 0.2s linear,\n      background-color 0.2s linear,\n      border 0.2s linear,\n      box-shadow 0.2s linear;\n\n    &[disabled],\n    &[disabled] .ivu-icon {\n      cursor: default;\n      background-color: var(--s-black-color-80);\n    }\n    &[disabled]:hover {\n      background-color: var(--s-black-color-80);\n    }\n  }\n  &__button:hover {\n    background-color: var(--s-primary-color);\n    border-color: var(--s-primary-color);\n  }\n\n  .input {\n    display: flex;\n    width: 80%;\n    justify-content: start;\n  }\n  &__icon {\n    color: var(--s-white-color);\n  }\n  &__delete i:before {\n    color: #fb4e4e;\n  }\n\n  &__remove {\n    color: #a0a4a8;\n  }\n  &__remove:hover {\n    color: #52575c;\n  }\n}\n\n.sent-requests {\n  &__remove {\n    position: absolute;\n    left: 0;\n  }\n}\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!./app-request-card.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!./app-request-card.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./app-request-card.vue?vue&type=template&id=00794c2e&\"\nimport script from \"./app-request-card.vue?vue&type=script&lang=js&\"\nexport * from \"./app-request-card.vue?vue&type=script&lang=js&\"\nimport style0 from \"./app-request-card.vue?vue&type=style&index=0&id=00794c2e&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","var render = function render(){var _vm=this,_c=_vm._self._c;return (!_vm.load)?_c('Row',{attrs:{\"type\":\"flex\"}},_vm._l((_vm.formatData(_vm.data)),function(item,index){return _c('i-col',{key:index,attrs:{\"lg\":12,\"span\":\"24\",\"class-name\":\"view-card-item\"}},[(item.type === 'file')?[_c('span',{staticClass:\"view-card-item__title\"},[_vm._v(_vm._s(item.name))]),(item.value)?_c('p',{staticClass:\"view-card-item__content\"},_vm._l((item.value),function(val,i){return _c('a',{key:i,staticStyle:{\"margin-right\":\"15px\"},attrs:{\"target\":\"_blank\",\"href\":`${val.baseUrl}${val.path}`}},[_vm._v(\"Скачать файл\")])}),0):_vm._e()]:(item.type === 'location')?[_c('span',{staticClass:\"view-card-item__title\"},[_vm._v(_vm._s(item.name))]),_c('p',{staticClass:\"view-card-item__content\"},[_vm._v(\" \"+_vm._s(`${item.value.city}${item.value.region ? ',' : ''}`)+\" \"),_c('span',{staticStyle:{\"font-weight\":\"normal\"}},[_vm._v(_vm._s(item.value.region || ''))])])]:(item.type === 'country')?[_c('span',{staticClass:\"view-card-item__title\"},[_vm._v(_vm._s(item.name))]),_c('p',{staticClass:\"view-card-item__content\"},[(item.value && item.value.country)?_c('span',[_vm._v(_vm._s(item.value.country))]):_vm._e()])]:[_c('span',{staticClass:\"view-card-item__title\"},[_vm._v(_vm._s(item.name))]),_c('p',{staticClass:\"view-card-item__content\"},[_vm._v(\" \"+_vm._s(item.value)+\" \")])]],2)}),1):_vm._e()\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n  <Row v-if=\"!load\" type=\"flex\">\n    <i-col\n      v-for=\"(item, index) in formatData(data)\"\n      :key=\"index\"\n      :lg=\"12\"\n      span=\"24\"\n      class-name=\"view-card-item\"\n    >\n      <template v-if=\"item.type === 'file'\">\n        <span class=\"view-card-item__title\">{{ item.name }}</span>\n        <p v-if=\"item.value\" class=\"view-card-item__content\">\n          <a\n            v-for=\"(val, i) in item.value\"\n            :key=\"i\"\n            target=\"_blank\"\n            :href=\"`${val.baseUrl}${val.path}`\"\n            style=\"margin-right: 15px\"\n            >Скачать файл</a\n          >\n        </p>\n      </template>\n\n      <template v-else-if=\"item.type === 'location'\">\n        <span class=\"view-card-item__title\">{{ item.name }}</span>\n        <p class=\"view-card-item__content\">\n          {{ `${item.value.city}${item.value.region ? ',' : ''}` }}\n          <span style=\"font-weight: normal\">{{ item.value.region || '' }}</span>\n        </p>\n      </template>\n\n      <template v-else-if=\"item.type === 'country'\">\n        <span class=\"view-card-item__title\">{{ item.name }}</span>\n        <p class=\"view-card-item__content\">\n          <span v-if=\"item.value && item.value.country\">{{\n            item.value.country\n          }}</span>\n        </p>\n      </template>\n\n      <template v-else>\n        <span class=\"view-card-item__title\">{{ item.name }}</span>\n        <p class=\"view-card-item__content\">\n          {{ item.value }}\n        </p>\n      </template>\n    </i-col>\n  </Row>\n</template>\n\n<script>\nexport default {\n  props: {\n    data: {\n      type: Array,\n      required: true,\n    },\n    load: {\n      type: Boolean,\n      required: true,\n    },\n  },\n  methods: {\n    formatData(data) {\n      return data.map((item) => {\n        return {\n          type: item.field.type,\n          name: item.field.name,\n          value: item.value,\n        }\n      })\n    },\n  },\n}\n</script>\n\n<style></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!./app-view-formatter.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!./app-view-formatter.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./app-view-formatter.vue?vue&type=template&id=80f2a1cc&\"\nimport script from \"./app-view-formatter.vue?vue&type=script&lang=js&\"\nexport * from \"./app-view-formatter.vue?vue&type=script&lang=js&\"\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","<template>\n  <div v-if=\"request\" class=\"request-page\">\n    <div class=\"request-page__request-head\">\n      <template v-if=\"!isLoading\">\n        <AppInfoBlock\n          :limit=\"85\"\n          :description=\"request.description\"\n          class=\"request-page__info-block\"\n        >\n          <template v-slot:alert>\n            <Alert :type=\"mapStatusToAlertType\" banner>\n              {{ alert.text }}\n            </Alert>\n          </template>\n          <template v-slot:text>\n            <AppMarkdown :text=\"request.description\"></AppMarkdown>\n          </template>\n        </AppInfoBlock>\n        <div class=\"request-page--divider\"></div>\n        <div\n          v-if=\"userRequests && userRequests.length\"\n          class=\"request-page__request sent-requests\"\n        >\n          <h3 class=\"sent-requests__title\">\n            {{ $tr(getRequestI18n('sentRequests')) }}\n          </h3>\n          <div class=\"row\">\n            <div\n              v-for=\"item in userRequests\"\n              :key=\"item.requestId\"\n              class=\"col-xlg-4 col-lg-6 col-md-12 col-sm-12\"\n            >\n              <AppCardRequest\n                :data=\"item\"\n                :category=\"request.category\"\n                :coauthor=\"request.is_coauthor\"\n                :date-expired=\"dateExpired\"\n                @del-request=\"deleteUserRequest\"\n                @open-request=\"openUserRequestModal\"\n                @send-coauthors=\"sendCoAuthors\"\n              >\n              </AppCardRequest>\n            </div>\n          </div>\n        </div>\n      </template>\n      <Spin v-else fix></Spin>\n    </div>\n    <div class=\"request-page__request new-request\">\n      <template v-if=\"dateExpired\">\n        <Alert type=\"error\" class=\"new-request__count-alert\">\n          <p class=\"s-body\">\n            {{ $tr(getRequestI18n('requestAlertSendDisabled')) }}\n          </p>\n        </Alert>\n      </template>\n      <template v-else-if=\"request.isSendingLimitReached\">\n        <Alert type=\"warning\" class=\"new-request__count-alert\">\n          <p class=\"s-body\">\n            {{ $tr('request.requestAlertTotalLimit') }}\n          </p>\n        </Alert>\n      </template>\n      <template v-else-if=\"request.isUserSendingLimitReached\">\n        <Alert type=\"warning\" class=\"new-request__count-alert\">\n          <p class=\"s-body\">\n            {{ $tr(getRequestI18n('requestAlertLimit')) }}\n          </p>\n        </Alert>\n      </template>\n      <div v-show=\"!isFormHidden\" style=\"position: relative\">\n        <h3 class=\"new-request__title\">\n          {{ $tr(getRequestI18n('newRequestTitle')) }}\n        </h3>\n        <Alert\n          v-if=\"request.userSendingLimit\"\n          type=\"success\"\n          class=\"new-request__count-alert\"\n        >\n          <p class=\"s-body\">\n            {{ $tr(getRequestI18n('requestAlertCount')) }}:\n            {{ request.userSendingLimit }}\n          </p>\n          <span class=\"s-small-2\">\n            {{ $tr(getRequestI18n('requestAlertCountLimit')) }}:\n            {{ request.userSendingLimit - userRequests.length }}\n          </span>\n        </Alert>\n        <AppForm\n          :form-id=\"request.formId\"\n          clear-form\n          @fields=\"setFields\"\n          @submit=\"handleSubmitForm\"\n        >\n          <template #submit=\"{ submit: formSubmit }\">\n            <Portal to=\"profile-submit\">\n              <Button\n                type=\"primary\"\n                size=\"large\"\n                :disabled=\"isLoading || requestStatus !== 'during'\"\n                class=\"registration-footer__submit\"\n                @click=\"formSubmit\"\n              >\n                {{ $tr(getRequestI18n('sendBtn')) }}\n              </Button>\n            </Portal>\n          </template>\n        </AppForm>\n        <div class=\"registration__registration-footer registration-footer\">\n          <div class=\"row\">\n            <div class=\"col-12 text-right\">\n              <PortalTarget name=\"profile-submit\"></PortalTarget>\n            </div>\n          </div>\n        </div>\n      </div>\n    </div>\n    <Modal v-model=\"modal\" footer-hide @on-cancel=\"closeUserRequestModal\">\n      <AppViewFormatter :load=\"loadModal\" :data=\"requestItem\" />\n      <Spin v-if=\"loadModal\" fix></Spin>\n    </Modal>\n  </div>\n</template>\n\n<script>\nimport { getExistingApiInstance } from '@/api'\n\nimport useRequest from '@/domain/composables/request/use-request'\nimport { fromISOToString, fromStringToISO, TIME_STATUSES } from '@/utils'\nimport { DateTime } from '@/plugins/luxon'\nimport AppForm from '@/components/common/app-form'\nimport AppInfoBlock from '@/components/common/app-info-block'\nimport AppMarkdown from '@/components/common/app-markdown'\nimport LangService from '@/domain/services/lang-service'\nimport HttpError from '@/domain/errors/http-error'\nimport AppCardRequest from '@/components/common/app-request-card'\nimport AppViewFormatter from '@/components/common/app-view-formatter'\n\nexport default {\n  components: {\n    AppInfoBlock,\n    AppMarkdown,\n    AppForm,\n    AppCardRequest,\n    AppViewFormatter,\n  },\n  data() {\n    return {\n      isLoading: false,\n      request: null,\n      requestForm: null,\n      userRequests: [],\n      requestId: null,\n      fields: [],\n      modal: false,\n      loadModal: true,\n      requestItem: [],\n    }\n  },\n\n  computed: {\n    alert() {\n      return {\n        text: this.requestText,\n        type: this.mapStatusToAlertType,\n      }\n    },\n    requestsRemaining() {\n      if (!this.request.userSendingLimit) {\n        // если ограничений нет, то загрузить можно сколько угодно\n        return Number.MAX_SAFE_INTEGER\n      }\n      return this.request.userSendingLimit - this.userRequests.length\n    },\n    isFormHidden() {\n      return (\n        this.request.isUserSendingLimitReached ||\n        this.requestsRemaining === 0 ||\n        this.request.isSendingLimitReached ||\n        this.dateExpired\n      )\n    },\n    dateExpired() {\n      return this.requestStatus === TIME_STATUSES.ENDED\n    },\n    requestStatus() {\n      return this.request.timeStatus\n    },\n    requestText() {\n      const dateRange = [\n        this.fromISOToString(this.request.startedAt),\n        this.fromISOToString(this.request.endedAt),\n      ]\n      if (this.requestStatus === TIME_STATUSES.IN_PROGRESS) {\n        return this.$tr(this.getRequestI18n('requestStatus.inProgress'), [\n          dateRange[0],\n          dateRange[1],\n        ])\n      }\n      if (this.requestStatus === TIME_STATUSES.WILL_START) {\n        return this.$tr(this.getRequestI18n('requestStatus.willStart'), [\n          dateRange[0],\n        ])\n      }\n      if (this.requestStatus === TIME_STATUSES.ENDED) {\n        return this.$tr(this.getRequestI18n('requestStatus.ended'), [\n          dateRange[1],\n        ])\n      }\n      return ''\n    },\n    mapStatusToAlertType() {\n      if (this.requestStatus === TIME_STATUSES.IN_PROGRESS) {\n        return 'success'\n      }\n      if (this.requestStatus === TIME_STATUSES.WILL_START) {\n        return 'warning'\n      }\n      if (this.requestStatus === TIME_STATUSES.ENDED) {\n        return 'error'\n      }\n      return 'info'\n    },\n  },\n  watch: {\n    '$route.params.requestId': {\n      handler() {\n        this.getData()\n      },\n      immediate: true,\n    },\n  },\n  methods: {\n    fromStringToISO,\n    fromISOToString,\n    DateTime,\n    getRequestI18n(key) {\n      return `request.${this.request.category}.` + key\n    },\n    async getData() {\n      this.isLoading = true\n      try {\n        this.requestId = this.$route.params.requestId\n        await this.fetchRequest()\n        if (!this.request.formId) {\n          await LangService.toLocalePath({ path: '/404' })\n        }\n        await this.fetchUserRequests()\n      } catch (e) {\n        console.error(e)\n      } finally {\n        this.isLoading = false\n      }\n    },\n    async handleSubmitForm({ form }) {\n      await this.createRequest(form)\n      await this.fetchUserRequests()\n      await this.fetchRequest()\n    },\n    async sendCoAuthors(data) {\n      await this.createUserRequest(data.id, data.email)\n      await this.fetchUserRequests()\n      await this.fetchRequest()\n    },\n    async createRequest(form) {\n      try {\n        await useRequest().createRequest({ form, requestId: this.request.id })\n        window.scrollTo(0, 0)\n        this.$Message.success(\n          this.$tr(this.getRequestI18n('sendSuccessMessage')),\n        )\n      } catch (e) {\n        if (e instanceof HttpError) {\n          this.$Message.error(e.message)\n        } else {\n          console.error(e)\n        }\n      }\n    },\n    async createUserRequest(id, email) {\n      try {\n        await useRequest().createUserRequest(id, email)\n        window.scrollTo(0, 0)\n        this.$Message.success(this.$tr('request.thesis.sendSuccessAddCoauthor'))\n      } catch (e) {\n        if (e instanceof HttpError) {\n          this.$Message.error(e.message)\n        } else {\n          console.error(e)\n        }\n      }\n    },\n    async deleteUserRequest(id) {\n      try {\n        await useRequest().deleteUserRequests(id)\n        await this.fetchUserRequests()\n        await this.fetchRequest()\n        this.$Message.success(this.$tr(this.getRequestI18n('deleteSuccess')))\n      } catch (e) {\n        console.error(e)\n      }\n    },\n    async openUserRequestModal(id) {\n      this.modal = true\n      const rawData = await useRequest().getUserRequest(id)\n\n      this.requestItem =\n        rawData.fields\n          ?.map((f) => {\n            const field = this.fields.find((field) => f.fieldId === +field.id)\n            if (!field) return {}\n            if (field.type == 'datatime')\n              f.value = +f.value\n                ? DateTime.fromSeconds(+f.value).toFormat('dd-MM-yyyy')\n                : f.value\n            if (field.type !== 'file' && Array.isArray(f.value))\n              f.value = f.value.join(', ').trim()\n\n            return { field, value: f.value }\n          })\n          .filter((f) => f.field) || []\n\n      this.loadModal = false\n    },\n    closeUserRequestModal() {\n      this.modal = false\n      this.loadModal = true\n      this.requestItem = []\n    },\n    async fetchRequest() {\n      try {\n        this.request = await useRequest().getRequest(this.requestId)\n      } catch (e) {\n        console.error(e)\n      }\n    },\n    async fetchUserRequests() {\n      try {\n        //id связанных соавторов\n        const api = getExistingApiInstance()\n        const { data: idCoauthors } = await api.requestUser.getRequestUser({\n          userId: this.$store.state.auth.userId,\n          requestId: this.requestId,\n        })\n\n        const userRequests = await useRequest().getUserRequests(\n          this.requestId,\n          this.$store.state.auth.userId,\n          this.request.category,\n          idCoauthors[0],\n        )\n        this.userRequests = userRequests.map((r) => ({\n          ...r.request,\n          requestId: r.id,\n          createdAt: r.createdAt,\n          status: r.status,\n          comment: r.comment,\n          coAuthor: r.coAuthor,\n          isCoauthor: this.request.isCoauthor,\n        }))\n      } catch (e) {\n        console.error(e)\n      }\n    },\n    setFields(fields) {\n      this.fields = fields\n    },\n  },\n}\n</script>\n\n<style lang=\"scss\">\n@import '~@/styles/pages/request.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!./request.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!./request.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./request.vue?vue&type=template&id=3b98747c&\"\nimport script from \"./request.vue?vue&type=script&lang=js&\"\nexport * from \"./request.vue?vue&type=script&lang=js&\"\nimport style0 from \"./request.vue?vue&type=style&index=0&id=3b98747c&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","import { getExistingApiInstance } from '@/api'\nimport LogicError from '@/domain/errors/logic-error'\n\nexport default function useAuth() {\n  /**\n   * Аутентификация по логину и паролю\n   * @returns {Promise<{data: {roles: Array, token: string, id: number}, isError: boolean}>}\n   */\n  async function authenticate(email, password, authGroupId) {\n    const api = getExistingApiInstance()\n\n    if (!authGroupId) {\n      throw new LogicError('Не найден id группы авторизации')\n    }\n\n    const payload = {\n      authGroupId,\n      email,\n      password,\n    }\n\n    let isError = false\n    let data = {}\n    try {\n      ({ data } = await api.user.authenticate(payload))\n    } catch (e) {\n      isError = true\n    }\n\n    return {\n      data,\n      isError,\n    }\n  }\n\n  return {\n    authenticate,\n  }\n}\n","import UserLoginStrategy from '@/domain/services/login-service/strategies/user-login-strategy'\nimport useAuth from '@/domain/composables/use-auth'\nimport store from '@/store'\nimport AuthService from '@/domain/services/auth-service'\nimport { GtmPlugin } from '@gtm-support/vue2-gtm'\nimport gtmOptions from '@/plugins/gtm'\n\n/**\n * authenticate then authorize\n */\nexport default class AuthAuthStrategy extends UserLoginStrategy {\n  constructor(event, user) {\n    super(event, user)\n    this.gtm = new GtmPlugin(gtmOptions)\n  }\n\n  async execute() {\n    const { authenticate } = useAuth()\n\n    const { data, isError: isLoginError } = await authenticate(\n      this.userData.email,\n      this.userData.password,\n      store.getters['domain/currentAuthGroupId'],\n    )\n\n    if (isLoginError) {\n      throw new Error(this.translateI18N('auth.authError'))\n    }\n\n    this.gtm.trackEvent({ event: 'event-auth' })\n\n    const authService = new AuthService()\n    await authService.setAuthData(data.token, data.id)\n  }\n}\n","import { getExistingApiInstance } from '@/api'\nimport LogicError from '@/domain/errors/logic-error'\n\n/**\n * Функция используется для работы с анкетой пользователя\n */\nexport default function useRegistration() {\n  async function getFormData(formId) {\n    const api = getExistingApiInstance()\n\n    const { data } = await api.form.getOne(formId, {\n      include: ['fields.values', 'groups'].join(','),\n    })\n    return data\n  }\n\n  async function isUserHasRegistration(email, eventId, authGroupId) {\n    const api = getExistingApiInstance()\n\n    const payload = {\n      eventId,\n      email,\n      authGroupId,\n    }\n    let isError = false\n    let meta\n\n    try {\n      ({ meta } = await api.registration.isExist(payload))\n    } catch {\n      isError = true\n    }\n\n    return { data: { isRegistrationExist: meta?.exist }, isError }\n  }\n\n  async function getFieldValues(userId, eventId) {\n    const params = {\n      include: ['fields.field'].join(','),\n      filter: {\n        userId,\n        eventId,\n      },\n      sort: 'id',\n      'per-page': 1,\n      fields: {\n        registration: ['id'].join(','),\n      },\n    }\n\n    const { data } = await getExistingApiInstance().registration.getMany(params)\n\n    const [registrationData] = data\n\n    return registrationData?.fields\n  }\n\n  async function getRegistrationCode(userId, eventId) {\n    const params = {\n      filter: {\n        userId,\n        eventId,\n      },\n      fields: {\n        registration: ['registrationCode'].join(','),\n      },\n    }\n\n    const { data } = await getExistingApiInstance().registration.getMany(params)\n\n    const [registrationData] = data\n\n    return registrationData?.registrationCode\n  }\n\n  async function getUserTicket(userId, eventId) {\n    const params = {\n      filter: {\n        userId,\n        eventId,\n      },\n      sort: 'id',\n      'per-page': 1,\n      fields: {\n        registration: ['ticketNumber'].join(','),\n      },\n    }\n\n    const { data } = await getExistingApiInstance().registration.getMany(params)\n\n    const [worksheets] = data\n\n    const ticketNumber = worksheets.ticketNumber\n\n    return ticketNumber\n  }\n\n  async function getRegistrationsByUser(eventIds, userId) {\n    const api = getExistingApiInstance()\n    const params = {\n      filter: {\n        userId,\n        eventId: eventIds,\n      },\n      perPage: 0,\n    }\n\n    const { data } = await api.registration.getMany(params)\n\n    return data\n  }\n\n  async function quickRegistration(eventId, fromEventId) {\n    if (fromEventId === eventId) {\n      throw new LogicError('Попытка быстрой регистрации на евент-кабинет')\n    }\n\n    const api = getExistingApiInstance()\n\n    const data = { fromEventId, eventId }\n\n    await api.registration.quickRegistration(data)\n  }\n\n  return {\n    getFormData,\n    getFieldValues,\n    getRegistrationCode,\n    getUserTicket,\n    getRegistrationsByUser,\n    quickRegistration,\n    isUserHasRegistration,\n  }\n}\n","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!./app-request-card.vue?vue&type=style&index=0&id=00794c2e&prod&lang=scss&\"","import UserLoginStrategy from '@/domain/services/login-service/strategies/user-login-strategy'\nimport AuthAuthStrategy from '@/domain/services/login-service/strategies/auth-auth-strategy'\nimport store from '@/store'\nimport useRegistration from '@/domain/composables/use-registration'\nimport EventService from '@/domain/services/event-service'\nimport LangService from '@/domain/services/lang-service'\nexport class FamiliarUserLoginStrategy extends UserLoginStrategy {\n  async execute() {\n    const authAndAuth = new AuthAuthStrategy(this.eventData, this.userData)\n    await authAndAuth.execute()\n\n    const { isUserHasRegistration } = useRegistration()\n    const authGroupId = store.getters['domain/currentAuthGroupId']\n\n    const {\n      data: { isRegistrationExist },\n      isError: isRegistrationCheckError,\n    } = await isUserHasRegistration(\n      this.userData.email,\n      this.eventData.id,\n      authGroupId\n    )\n\n    if (isRegistrationCheckError) {\n      throw new Error('Произошла ошибка при проверке регистрации')\n    }\n\n    if (!isRegistrationExist) {\n      await this._registrationUnavailableGuard()\n      await this._toRegistration()\n      return\n    }\n\n    await this._toStartPage()\n  }\n\n  async _toStartPage() {\n    const pages = store.state.pages.data\n    const startPagePath = EventService.defineStartPagePath(\n      this.eventData,\n      pages\n    )\n    await LangService.toLocalePath({ path: startPagePath })\n  }\n\n  async _toRegistration() {\n    await LangService.toLocalePath({\n      path: '/registration',\n      query: { email: this.userData.email },\n    })\n  }\n}\n","import UserLoginStrategy from '@/domain/services/login-service/strategies/user-login-strategy'\nimport LangService from '@/domain/services/lang-service'\n\nexport class NewUserLoginStrategy extends UserLoginStrategy {\n  async execute() {\n    await this._registrationUnavailableGuard()\n\n    await this._toCreateUser()\n  }\n\n  async _toCreateUser() {\n    await LangService.toLocalePath({\n      path: '/user',\n      query: { email: this.userData.email },\n    })\n  }\n}\n","import { EMAIL_REGEX } from '@/utils/constants'\nimport { FamiliarUserLoginStrategy } from '@/domain/services/login-service/strategies/familiar-user-login-strategy'\nimport { NewUserLoginStrategy } from '@/domain/services/login-service/strategies/new-user-login-strategy'\n\nimport LogicError from '@/domain/errors/logic-error'\n\nexport default class LoginService {\n  static USER_STRATEGY_NAMES = {\n    UNREGISTERED: 'unregistered',\n    FAMILIAR: 'familiar',\n  }\n\n  static USER_STRATEGIES = {\n    UNREGISTERED: NewUserLoginStrategy,\n    FAMILIAR: FamiliarUserLoginStrategy,\n  }\n\n  static validateEmail(str) {\n    return EMAIL_REGEX.test(str)\n  }\n\n  static validatePassword(str) {\n    return str.length >= 6\n  }\n\n  static async executeStrategy(strategyName, event, user) {\n    let strategy = {\n      execute: async () => {\n        throw new LogicError('Неверное имя стратегии')\n      },\n    }\n\n    if (strategyName === this.USER_STRATEGY_NAMES.UNREGISTERED) {\n      strategy = new this.USER_STRATEGIES.UNREGISTERED(event, user)\n    } else if (strategyName === this.USER_STRATEGY_NAMES.FAMILIAR) {\n      strategy = new this.USER_STRATEGIES.FAMILIAR(event, user)\n    }\n\n    await strategy.execute()\n  }\n}\n","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!./request.vue?vue&type=style&index=0&id=3b98747c&prod&lang=scss&\"","import EventService from '@/domain/services/event-service'\nimport { DateTime } from '@/plugins/luxon'\nimport { monthToStr, formatDate, TIME_STATUSES } from '@/utils'\n\nconst MIN_DATE = DateTime.fromSeconds(0)\nconst MAX_DATE = DateTime.fromSeconds(2177280000) // 2038 12 30\n\nexport default class EventDateService {\n  static MIN_DATE = MIN_DATE\n  static MAX_DATE = MAX_DATE\n  constructor(event) {\n    this._event = event\n  }\n\n  getData() {\n    return this._event\n  }\n\n  /**\n   * @returns {DateTime}\n   */\n  get startRegistrationTime() {\n    return EventDateService.getMinDate(this._event.registrationStartedAt)\n  }\n\n  /**\n   * @returns {DateTime}\n   */\n  get endRegistrationTime() {\n    return EventDateService.getMaxDate(this._event.registrationEndedAt)\n  }\n\n  /**\n   * @returns {DateTime}\n   */\n  get startEventTime() {\n    if (!EventService.isEventOccasion(this._event)) {\n      return EventDateService.MIN_DATE\n    }\n    return EventDateService.getMinDate(this._event.eventOccasion.startedAt)\n  }\n\n  /**\n   * @returns {DateTime}\n   */\n  get endEventTime() {\n    if (!EventService.isEventOccasion(this._event)) {\n      return EventDateService.MAX_DATE\n    }\n    return EventDateService.getMaxDate(this._event.eventOccasion.endedAt)\n  }\n\n  static getMinDate(dateStr) {\n    const date = DateTime.fromISO(dateStr)\n    if (date.invalid) {\n      return EventDateService.MIN_DATE\n    }\n    return date\n  }\n\n  static getMaxDate(dateStr) {\n    const date = DateTime.fromISO(dateStr)\n    if (date.invalid) {\n      return EventDateService.MAX_DATE\n    }\n    return date\n  }\n\n  /**\n   * функция возвращает две даты через символ, отправленный в поле \"locale.divider\" - по умолчанию черточка:\n   * @param locale\n   * @param start\n   * @param end\n   */\n  static getAlertMessageWithDivider(locale, start, end) {\n    if ((!start) instanceof DateTime || (!end) instanceof DateTime) {\n      throw new Error(\n        'Неверный тип даты, передаваемый в функцию getEntityStatus!',\n      )\n    }\n\n    const { entity = '', months = [], divider = '-' } = locale\n\n    const formatDateWithDivider = (start, end) => {\n      const { year: startYear, month: startMonth, day: startDay } = start\n      const { year: endYear, month: endMonth, day: endDay } = end\n\n      // отбрасываем одинаковые года и месяцы\n      if (\n        endDay === startDay &&\n        startMonth === endMonth &&\n        startYear === endYear\n      ) {\n        return `${startDay} ${monthToStr(startMonth, months)} ${startYear}`\n      } else if (startMonth === +endMonth && startYear === endYear) {\n        return `${startDay} ${divider} ${endDay} ${monthToStr(\n          startMonth,\n          months,\n        )} ${startYear}`\n      } else if (startYear === endYear) {\n        return `${startDay} ${monthToStr(\n          startMonth,\n          months,\n        )} ${divider} ${endDay} ${monthToStr(endMonth, months)} ${startYear}`\n      }\n      return `${startDay} ${monthToStr(\n        startMonth,\n        months,\n      )} ${startYear} ${divider} ${endDay} ${monthToStr(\n        endMonth,\n        months,\n      )} ${endYear}`\n    }\n\n    return {\n      message: `${entity} ${formatDateWithDivider(start, end)}`,\n      state: 'info',\n    }\n  }\n\n  static getMessageWithOneDate(locale, date) {\n    if (!locale.entity) {\n      return formatDate(date, locale.months)\n    }\n    return `${locale.entity} ${formatDate(date, locale.months)}`\n  }\n\n  static getEntityStatusAlert = (locale, start, end, status) => {\n    if ((!start) instanceof DateTime || (!end) instanceof DateTime) {\n      throw new Error(\n        'Неверный тип даты, передаваемый в функцию getEntityStatus!',\n      )\n    }\n\n    const {\n      entity = '',\n      before = '',\n      during = '',\n      after = '',\n      months = [''],\n      onGoing = '',\n    } = locale\n\n    if (status === TIME_STATUSES.ENDED) {\n      return {\n        message: `${entity} ${after} ${formatDate(end, months)}`,\n        state: 'after',\n      }\n    }\n\n    if (status === TIME_STATUSES.WILL_START) {\n      return {\n        message: `${entity} ${before} ${formatDate(start, months)}`,\n        state: 'before',\n      }\n    }\n\n    if (end === EventDateService.MAX_DATE) {\n      // \"Регистрация идет\" (без даты)\n      return {\n        message: `${entity} ${onGoing}`,\n        state: 'during',\n      }\n    }\n\n    return {\n      message: `${entity} ${during} ${formatDate(end, months)}`,\n      state: 'during',\n    }\n  }\n}\n","import EventDateService from '@/domain/services/event-date-service'\nimport { AbstractMethod } from '@/utils/oop-helpers'\nimport { translateFn } from '@/plugins/i18n'\nimport { TIME_STATUSES } from '@/utils'\n\nexport default class UserLoginStrategy {\n  constructor(event, user) {\n    this.userData = user\n    this.eventDateServise = new EventDateService(event)\n    this.eventData = event\n  }\n  execute() {\n    new AbstractMethod()\n  }\n\n  translateI18N(key, ...args) {\n    return translateFn(key, ...args)\n  }\n\n  async _registrationUnavailableGuard() {\n    if (this.eventData.registrationTimeStatus !== TIME_STATUSES.IN_PROGRESS) {\n      this._throwUnavailableRegistrationAlert()\n    }\n  }\n\n  _throwUnavailableRegistrationAlert() {\n    const start = this.eventDateServise.startRegistrationTime\n    const end = this.eventDateServise.endRegistrationTime\n\n    // регистрация может быть недоступна, если дата начала регистрации не указана,\n    // а дата окончания уже наступила\n    if (this.eventData.registrationTimeStatus === TIME_STATUSES.ENDED) {\n      throw new Error(this.translateI18N('alertTime.error.ended'))\n    }\n    // регистрация может быть недоступна, если дата окончания регистрации не указана,\n    // а дата начала еще не наступила\n    if (this.eventData.registrationTimeStatus === TIME_STATUSES.WILL_START) {\n      const locale = {\n        entity: this.translateI18N('alertTime.error.willStart'),\n        months: this.translateI18N('months'),\n      }\n      const message = EventDateService.getMessageWithOneDate(locale, start)\n      throw new Error(message)\n    }\n\n    const locale = {\n      entity: this.translateI18N('auth.regDateError.text'),\n      months: this.translateI18N('months'),\n      divider: this.translateI18N('auth.regDateError.divider'),\n    }\n\n    const status = EventDateService.getAlertMessageWithDivider(\n      locale,\n      start,\n      end,\n    )\n    throw new Error(status.message)\n  }\n}\n"],"sourceRoot":""}