exports.ids = [30,31];
exports.modules = {

/***/ 300:
/***/ (function(module, exports) {

// Exports
module.exports = {

};


/***/ }),

/***/ 313:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/ResetPasswordMail.vue?vue&type=template&id=5f1ed0ce&scoped=true
var render = function render() {
  var _vm = this,
    _c = _vm._self._c;
  return _c('div', [_vm._ssrNode("<div style=\"width: 100%; background-color: #f7f7f7; color: #4a596c; position: relative;\" data-v-5f1ed0ce><div style=\"\\n        width: 960px;\\n        box-sizing: border-box;\\n        padding: 20px 80px;\\n        margin: 0 auto;\\n        background-color: #fff;\\n      \" data-v-5f1ed0ce><div style=\"background-color: #fff; margin: 0 auto\" data-v-5f1ed0ce><p style=\"text-align: center\" data-v-5f1ed0ce><img src=\"https://promocollection.s3.ap-southeast-2.amazonaws.com/uploads/goodsfolder/logo.png\" data-v-5f1ed0ce></p> <hr data-v-5f1ed0ce> <div style=\"\\n            padding-top: 18px;\\n            margin-bottom: 38px;\\n            font-size: 18px;\\n          \" data-v-5f1ed0ce><table data-v-5f1ed0ce><tr data-v-5f1ed0ce><td style=\"position: relative; width: 200px; color: #02bde3; font-weight: bold;\" data-v-5f1ed0ce><div style=\"width: 100%; text-align: left\" data-v-5f1ed0ce>\n                Home&amp;lifestyle\n                </div></td> <td style=\"position: relative; width: 200px; color: #02bde3; font-weight: bold;\" data-v-5f1ed0ce><div style=\"width: 100%; text-align: center\" data-v-5f1ed0ce>\n                Antibacterial range\n                </div></td> <td style=\"position: relative; width: 200px; color: #02bde3; font-weight: bold;\" data-v-5f1ed0ce><div style=\"width: 100%; text-align: center\" data-v-5f1ed0ce>\n                Technology\n                </div></td> <td style=\"position: relative; width: 200px; color: #02bde3; font-weight: bold;\" data-v-5f1ed0ce><div style=\"width: 100%; text-align: right\" data-v-5f1ed0ce>\n                Outdoor &amp; leisure\n                </div></td></tr></table></div> <p data-v-5f1ed0ce>" + _vm._ssrEscape("Hello! " + _vm._s(_vm.mailData.name)) + "</p> <p style=\"width: 620px; margin: 40px 0px 20px\" data-v-5f1ed0ce>\n          Please click the link below or copy and paste it into your browser\n          to create a new password on the PromoCollection website.\n        </p> <p data-v-5f1ed0ce><a" + _vm._ssrAttr("href", _vm.mailData.Url + '?email=' + _vm.mailData.email) + " target=\"_blank\" style=\"color: #5c7dd4\" data-v-5f1ed0ce>" + _vm._ssrEscape("\n            " + _vm._s(_vm.mailData.Url + "?email=" + _vm.mailData.email) + "\n          ") + "</a></p> <p style=\"margin: 20px auto 30px\" data-v-5f1ed0ce>\n          This link is valid for 3 hours after receiving this email.\n        </p></div></div> <div style=\"height: 24px; width: 960px; background-color: #f7f7f7;\" data-v-5f1ed0ce></div> <div style=\"\\n        width: 960px;\\n        box-sizing: border-box;\\n        padding: 20px 80px;\\n        margin: 0 auto;\\n        background-color: #fff;\\n      \" data-v-5f1ed0ce><div style=\"height: 180px; background-color: #fff; margin: 0 auto\" data-v-5f1ed0ce><p style=\"color: #02bde3; font-size: 22px\" data-v-5f1ed0ce>\n          Have more questions? contact us!\n        </p> <p style=\"margin: 20px 0\" data-v-5f1ed0ce>Phone: 203 916 5098</p> <p data-v-5f1ed0ce>\n          Email:\n          <span style=\"color: #5c7dd4; text-decoration: underline\" data-v-5f1ed0ce>\n            Info@promocollection.uk\n          </span></p></div></div></div>")]);
};
var staticRenderFns = [];

// CONCATENATED MODULE: ./components/ResetPasswordMail.vue?vue&type=template&id=5f1ed0ce&scoped=true

// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/ResetPasswordMail.vue?vue&type=script&lang=js
/* harmony default export */ var ResetPasswordMailvue_type_script_lang_js = ({
  props: {
    mailData: {}
  }
});
// CONCATENATED MODULE: ./components/ResetPasswordMail.vue?vue&type=script&lang=js
 /* harmony default export */ var components_ResetPasswordMailvue_type_script_lang_js = (ResetPasswordMailvue_type_script_lang_js); 
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(2);

// CONCATENATED MODULE: ./components/ResetPasswordMail.vue



function injectStyles (context) {
  
  
}

/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  components_ResetPasswordMailvue_type_script_lang_js,
  render,
  staticRenderFns,
  false,
  injectStyles,
  "5f1ed0ce",
  "36a59575"
  
)

/* harmony default export */ var ResetPasswordMail = __webpack_exports__["default"] = (component.exports);

/***/ }),

/***/ 359:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_resetPasswordDialog_vue_vue_type_style_index_0_id_6548d9c2_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(300);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_resetPasswordDialog_vue_vue_type_style_index_0_id_6548d9c2_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_resetPasswordDialog_vue_vue_type_style_index_0_id_6548d9c2_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_resetPasswordDialog_vue_vue_type_style_index_0_id_6548d9c2_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_resetPasswordDialog_vue_vue_type_style_index_0_id_6548d9c2_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));


/***/ }),

/***/ 395:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/resetPasswordDialog.vue?vue&type=template&id=6548d9c2&scoped=true
var render = function render() {
  var _vm = this,
    _c = _vm._self._c;
  return _c('el-dialog', {
    attrs: {
      "lock-scroll": false,
      "visible": _vm.resetDialogVisible,
      "width": "700px"
    },
    on: {
      "update:visible": function ($event) {
        _vm.resetDialogVisible = $event;
      }
    }
  }, [_c('el-page-header', {
    on: {
      "back": _vm.goBack
    }
  }), _vm._v(" "), _c('div', {
    staticClass: "dialog-content"
  }, [_c('p', [_vm._v("Reset Password")]), _vm._v(" "), _c('p', [_vm._v("\n      Enter your email address and we'll send a link to reset your password.\n    ")]), _vm._v(" "), _c('el-input', {
    attrs: {
      "placeholder": "Email"
    },
    model: {
      value: _vm.email,
      callback: function ($$v) {
        _vm.email = $$v;
      },
      expression: "email"
    }
  }), _vm._v(" "), _c('el-button', {
    staticClass: "reset-btn",
    attrs: {
      "plain": "",
      "disabled": _vm.disabledFlag
    },
    on: {
      "click": _vm.debounceSendEmail
    }
  }, [_vm._v("\n      " + _vm._s(_vm.butonContent) + "\n    ")])], 1), _vm._v(" "), _c('reset-password-mail', {
    directives: [{
      name: "show",
      rawName: "v-show",
      value: false,
      expression: "false"
    }],
    ref: "resetPasswordMail",
    attrs: {
      "mailData": _vm.mailData
    }
  })], 1);
};
var staticRenderFns = [];

// CONCATENATED MODULE: ./components/resetPasswordDialog.vue?vue&type=template&id=6548d9c2&scoped=true

// EXTERNAL MODULE: ./plugins/AES.js
var AES = __webpack_require__(32);

// EXTERNAL MODULE: external "lodash"
var external_lodash_ = __webpack_require__(140);
var external_lodash_default = /*#__PURE__*/__webpack_require__.n(external_lodash_);

// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/resetPasswordDialog.vue?vue&type=script&lang=js


/* harmony default export */ var resetPasswordDialogvue_type_script_lang_js = ({
  name: 'resetPasswordDialog',
  data() {
    return {
      disabledFlag: false,
      resetDialogVisible: false,
      email: '',
      butonContent: 'SEND RESET EMAIL',
      time: 60,
      timer: null,
      mailData: {
        Url: '',
        name: '',
        email: ''
      }
    };
  },
  watch: {
    email: {
      handler(newValue, oldValue) {
        if (newValue) {
          let reg = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
          if (reg.test(this.email)) {
            this.disabledFlag = false;
          } else {
            this.disabledFlag = true;
          }
          this.getmailData();
        }
      },
      immediate: true
    }
  },
  mounted() {
    this.getmailData();
  },
  methods: {
    goBack() {
      this.resetDialogVisible = false;
      this.$emit('openLoginDialog');
    },
    getmailData() {
      this.mailData.Url = location.origin + '/setNewPassword';
      this.mailData.name = this.email;
      this.mailData.email = AES["a" /* default */].encrypt(this.email + '&t=' + Date.now());
    },
    debounceSendEmail: external_lodash_default.a.debounce(function () {
      this.sendEmail();
    }, 200),
    sendEmail() {
      if (this.email) {
        this.disabledFlag = true;
        this.getmailData();
        this.timer = setInterval(() => {
          if (this.time == 0) {
            this.resetData();
          } else {
            this.butonContent = 'Resend Passwords in ' + this.time + ' s';
            this.time--;
          }
        }, 1000);
        this.$axios.post('/uk-api/uk/resetemail', {
          email: this.email,
          content: this.$refs.resetPasswordMail.$el.innerHTML
        }).then(res => {
          if (res.code == 1) {
            this.resetData();
            this.time = 60;
            this.$notify({
              title: 'success',
              message: 'Sending an email successfully',
              type: 'success',
              duration: 3000
            });
          }
        }).catch(() => {
          this.resetData();
          this.time = 60;
          // this.$message.error(error.response.data.msg);
        });
      }
    },
    resetData(boolean = false) {
      clearInterval(this.timer);
      this.disabledFlag = boolean;
      this.butonContent = 'SEND RESET EMAIL';
    }
  },
  beforeDestroy() {
    clearInterval(this.timer);
  }
});
// CONCATENATED MODULE: ./components/resetPasswordDialog.vue?vue&type=script&lang=js
 /* harmony default export */ var components_resetPasswordDialogvue_type_script_lang_js = (resetPasswordDialogvue_type_script_lang_js); 
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(2);

// CONCATENATED MODULE: ./components/resetPasswordDialog.vue



function injectStyles (context) {
  
  var style0 = __webpack_require__(359)
if (style0.__inject__) style0.__inject__(context)

}

/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  components_resetPasswordDialogvue_type_script_lang_js,
  render,
  staticRenderFns,
  false,
  injectStyles,
  "6548d9c2",
  "b77419b4"
  
)

/* harmony default export */ var resetPasswordDialog = __webpack_exports__["default"] = (component.exports);

/* nuxt-component-imports */
installComponents(component, {ResetPasswordMail: __webpack_require__(313).default})


/***/ })

};;
//# sourceMappingURL=reset-password-dialog.js.map