text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0d3124"],{"5ace":function(a,e,t){"use strict";t.r(e);var s=function(){var a=this,e=a.$createElement,t=a._self._c||e;return t("v-app",{attrs:{id:"inspire"}},[t("v-content",[t("v-container",{staticClass:"fill-height",attrs:{fluid:""}},[t("v-row",{attrs:{align:"center",justify:"center"}},[t("v-col",{attrs:{cols:"12",md:"4",sm:"8"}},[t("v-card",{staticClass:"elevation-12"},[t("v-toolbar",{attrs:{color:"primary",dark:"",flat:""}},[t("v-toolbar-title",[a._v("創建 ThisIsToDoList 帳號")]),t("v-spacer")],1),t("v-card-text",[t("v-form",{ref:"form",attrs:{"lazy-validation":a.lazy},model:{value:a.valid,callback:function(e){a.valid=e},expression:"valid"}},[t("v-text-field",{attrs:{rules:a.emailRules,label:"新帳號",name:"signup","prepend-icon":"mdi-login",required:"",type:"text"},model:{value:a.id,callback:function(e){a.id=e},expression:"id"}}),t("v-text-field",{attrs:{rules:a.pswdRules,id:"password",label:"建立密碼",name:"password","prepend-icon":"mdi-lock",required:"",type:"password"},model:{value:a.pswd,callback:function(e){a.pswd=e},expression:"pswd"}}),t("v-text-field",{attrs:{id:"password_again",label:"確認密碼",name:"password2","prepend-icon":"mdi-",required:"",type:"password"},model:{value:a.pswd_s,callback:function(e){a.pswd_s=e},expression:"pswd_s"}}),t("v-btn",{attrs:{disabled:!a.valid||!a.id.trim()||!a.pswd||!a.pswd_s||!this.validateRecaptcha,color:"red"},on:{click:a.validate}},[a._v("註冊 ")]),t("v-btn",{staticClass:"mx-2",attrs:{color:"amber"},on:{click:a.signin}},[a._v("登入")])],1),t("Recaptcha",{staticClass:"my-2",attrs:{size:"100%",theme:"dark"},on:{validate:a.recapchavalidate}})],1),t("v-card-actions",[t("v-spacer")],1)],1)],1)],1)],1)],1)],1)},i=[],l=(t("5319"),t("498a"),t("1da1")),r=t("bc3a"),n=t.n(r),d=t("33db"),o={name:"signup",components:{Recaptcha:d["a"]},data:()=>({recapchatoken:"",validateRecaptcha:!1,s_self:null,lazy:!0,valid:!0,id:"",pswd:"",pswd_s:"",emailRules:[a=>!!a||"請填入一組有效電子郵件!",a=>/.+@.+\..+/.test(a)||"電子郵件格式不正確！"],pswdRules:[a=>!!a||"請輸入一組8個字以上的密碼!",a=>a&&a.length>7||"密碼至少8個字元"]}),methods:{signin(){window.location.replace("./signin")},recapchavalidate(a){this.recapchatoken=a,this.validateRecaptcha=!0},validate:function(){var a=Object(l["a"])((function*(){if(this.$refs.form.validate()&&this.pswd===this.pswd_s){this.snackbar=!0;var a=t("4458").sha256;this.pswd=a(this.pswd);try{yield n.a.post("/signup",JSON.stringify({username:this.id.trim(),password:this.pswd,recapchatoken:this.recapchatoken}),{headers:{"Content-Type":"application/json;charset=UTF-8"}}),window.location.replace("./signin")}catch(e){console.log(e),alert("伺服器通訊失敗或未通過機器人驗證！")}}else alert("密碼或帳號驗證未通過！");this.$refs.form.reset(),window.location.replace("./signup")}));function e(){return a.apply(this,arguments)}return e}()},created(){this.s_self=this,this.valid=!1,this.$vuetify.theme.dark=!0}},c=o,p=t("2877"),v=t("6544"),h=t.n(v),u=t("7496"),w=t("8336"),f=t("b0af"),m=t("99d9"),b=t("62ad"),k=t("a523"),g=t("a75b"),y=t("4bd4"),V=t("0fd9"),_=t("2fa4"),x=t("8654"),C=t("71d9"),R=t("2a7f"),T=Object(p["a"])(c,s,i,!1,null,null,null);e["default"]=T.exports;h()(T,{VApp:u["a"],VBtn:w["a"],VCard:f["a"],VCardActions:m["a"],VCardText:m["b"],VCol:b["a"],VContainer:k["a"],VContent:g["a"],VForm:y["a"],VRow:V["a"],VSpacer:_["a"],VTextField:x["a"],VToolbar:C["a"],VToolbarTitle:R["a"]})}}]);
  //# sourceMappingURL=chunk-2d0d3124.13099095.js.map