{"version":3,"sources":["webpack:///../../../src/components/VForm/VForm.ts","webpack:///./src/views/Register.vue?a796","webpack:///src/views/Register.vue","webpack:///./src/views/Register.vue?6b7c","webpack:///./src/views/Register.vue"],"names":["mixins","BindsAttrs","RegistrableProvide","extend","name","provide","form","this","inheritAttrs","props","disabled","Boolean","lazyValidation","readonly","value","data","inputs","watchers","errorBag","watch","handler","val","errors","Object","values","includes","$emit","deep","immediate","methods","watchInput","input","watcher","$watch","$set","_uid","valid","shouldValidate","hasOwnProperty","validate","filter","length","reset","forEach","resetErrorBag","setTimeout","resetValidation","register","push","unregister","found","find","i","unwatch","$delete","render","h","staticClass","attrs","novalidate","attrs$","on","submit","e","getSlot","_vm","_h","$createElement","_c","_self","_v","_s","errorMessage","model","callback","$$v","username","expression","email","password","registrationToken","$event","login","staticRenderFns","baseURL","URL","window","location","origin","requestOptions","method","headers","body","JSON","stringify","user","registration_token","fetch","then","response","json","ok","console","error","userAdded","$router","params","display","log","component","VBtn","VCol","VContainer","VForm","VRow","VTextField"],"mappings":"kHAGA,oDAkBeA,sBACbC,OACAC,eAAmB,SAEnBC,OAAO,CACPC,KAAM,SAENC,UACE,MAAO,CAAEC,KAAMC,OAGjBC,cAAc,EAEdC,MAAO,CACLC,SAAUC,QACVC,eAAgBD,QAChBE,SAAUF,QACVG,MAAOH,SAGTI,KAAMA,KAAA,CACJC,OAAQ,GACRC,SAAU,GACVC,SAAU,KAGZC,MAAO,CACLD,SAAU,CACRE,QAASC,GACP,MAAMC,EAASC,OAAOC,OAAOH,GAAKI,UAAS,GAE3ClB,KAAKmB,MAAM,SAAUJ,IAEvBK,MAAM,EACNC,WAAW,IAIfC,QAAS,CACPC,WAAYC,GACV,MAAMC,EAAWD,GACRA,EAAME,OAAO,WAAaZ,IAC/Bd,KAAK2B,KAAK3B,KAAKW,SAAUa,EAAMI,KAAMd,IACpC,CAAEO,WAAW,IAGZX,EAAqB,CACzBkB,KAAMJ,EAAMI,KACZC,MAAOA,OACPC,eAAgBA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AAI,IAAI,IAAI,IACrwCa,EAAkB,GCkCtB,IAAAC,EAAA,GAEAA,EAAA,IAAAC,IAAAC,OAAAC,UAAAC,OAMe,OACfpF,KAAA,QACAW,KAAA,WACA,OACA+D,MAAA,GACAF,SAAA,GACAG,SAAA,GACAC,kBAAA,GACAR,aAAA,KAGA3C,QAAA,CACAqD,MAAA,SAAAN,EAAAE,EAAAC,EAAAC,GACA,MAAAS,EAAA,CACAC,OAAA,OACAC,QAAA,oCACAC,KAAAC,KAAAC,UAAA,CAAAC,KAAAnB,EAAAE,QAAAC,WAAAiB,mBAAAhB,KAEAiB,MAAAb,EAAA,WAAAK,GACAS,KAAAC,IACAA,EAAAC,OAAAF,KAAAnF,IACA,IAAAoF,EAAAE,GAEA,YADAC,QAAAC,MAAA,uBAAAxF,GAGA,MAAAyF,EAAAzF,EAAA,aAEAyF,GACA,KAAAC,QAAAzD,KAAA,CAAA5C,KAAA,QAAAsG,OAAA,CAAAC,QAAA,kDAGAL,QAAAM,IAAA7F,UC1EiV,I,yGCO7U8F,EAAY,eACd,EACAtD,EACA4B,GACA,EACA,KACA,WACA,MAIa,aAAA0B,EAAiB,QAUhC,IAAkBA,EAAW,CAACC,OAAA,KAAKC,OAAA,KAAKC,aAAA,KAAWC,QAAA,KAAMC,OAAA,KAAKC,aAAA","file":"js/chunk-ef9c25ac.7b0af2e1.js","sourcesContent":["// Components\nimport VInput from '../VInput/VInput'\n\n// Mixins\nimport mixins from '../../util/mixins'\nimport BindsAttrs from '../../mixins/binds-attrs'\nimport { provide as RegistrableProvide } from '../../mixins/registrable'\n\n// Helpers\nimport { VNode } from 'vue'\nimport { getSlot } from '../../util/helpers'\n\ntype ErrorBag = Record\ntype VInputInstance = InstanceType\ntype Watchers = {\n _uid: number\n valid: () => void\n shouldValidate: () => void\n}\n\n/* @vue/component */\nexport default mixins(\n BindsAttrs,\n RegistrableProvide('form')\n /* @vue/component */\n).extend({\n name: 'v-form',\n\n provide (): object {\n return { form: this }\n },\n\n inheritAttrs: false,\n\n props: {\n disabled: Boolean,\n lazyValidation: Boolean,\n readonly: Boolean,\n value: Boolean,\n },\n\n data: () => ({\n inputs: [] as VInputInstance[],\n watchers: [] as Watchers[],\n errorBag: {} as ErrorBag,\n }),\n\n watch: {\n errorBag: {\n handler (val) {\n const errors = Object.values(val).includes(true)\n\n this.$emit('input', !errors)\n },\n deep: true,\n immediate: true,\n },\n },\n\n methods: {\n watchInput (input: any): Watchers {\n const watcher = (input: any): (() => void) => {\n return input.$watch('hasError', (val: boolean) => {\n this.$set(this.errorBag, input._uid, val)\n }, { immediate: true })\n }\n\n const watchers: Watchers = {\n _uid: input._uid,\n valid: () => {},\n shouldValidate: () => {},\n }\n\n if (this.lazyValidation) {\n // Only start watching inputs if we need to\n watchers.shouldValidate = input.$watch('shouldValidate', (val: boolean) => {\n if (!val) return\n\n // Only watch if we're not already doing it\n if (this.errorBag.hasOwnProperty(input._uid)) return\n\n watchers.valid = watcher(input)\n })\n } else {\n watchers.valid = watcher(input)\n }\n\n return watchers\n },\n /** @public */\n validate (): boolean {\n return this.inputs.filter(input => !input.validate(true)).length === 0\n },\n /** @public */\n reset (): void {\n this.inputs.forEach(input => input.reset())\n this.resetErrorBag()\n },\n resetErrorBag () {\n if (this.lazyValidation) {\n // Account for timeout in validatable\n setTimeout(() => {\n this.errorBag = {}\n }, 0)\n }\n },\n /** @public */\n resetValidation () {\n this.inputs.forEach(input => input.resetValidation())\n this.resetErrorBag()\n },\n register (input: VInputInstance) {\n this.inputs.push(input)\n this.watchers.push(this.watchInput(input))\n },\n unregister (input: VInputInstance) {\n const found = this.inputs.find(i => i._uid === input._uid)\n\n if (!found) return\n\n const unwatch = this.watchers.find(i => i._uid === found._uid)\n if (unwatch) {\n unwatch.valid()\n unwatch.shouldValidate()\n }\n\n this.watchers = this.watchers.filter(i => i._uid !== found._uid)\n this.inputs = this.inputs.filter(i => i._uid !== found._uid)\n this.$delete(this.errorBag, found._uid)\n },\n },\n\n render (h): VNode {\n return h('form', {\n staticClass: 'v-form',\n attrs: {\n novalidate: true,\n ...this.attrs$,\n },\n on: {\n submit: (e: Event) => this.$emit('submit', e),\n },\n }, getSlot(this))\n },\n})\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-form',{attrs:{\"lazy-validation\":\"\"}},[_vm._v(\" \"+_vm._s(_vm.errorMessage)+\" \"),_c('v-container',[_c('v-col',{attrs:{\"md\":\"4\",\"offset-md\":\"4\"}},[_c('h1',[_vm._v(\"Register\")]),_c('v-row',[_c('v-text-field',{attrs:{\"label\":\"Username\",\"autocomplete\":\"username\",\"required\":\"\"},model:{value:(_vm.username),callback:function ($$v) {_vm.username=$$v},expression:\"username\"}})],1),_c('v-row',[_c('v-text-field',{attrs:{\"label\":\"Email\",\"autocomplete\":\"email\",\"required\":\"\"},model:{value:(_vm.email),callback:function ($$v) {_vm.email=$$v},expression:\"email\"}})],1),_c('v-row',[_c('v-text-field',{attrs:{\"label\":\"Password\",\"type\":\"password\",\"autocomplete\":\"current-password\",\"required\":\"\"},model:{value:(_vm.password),callback:function ($$v) {_vm.password=$$v},expression:\"password\"}})],1),_c('v-row',[_c('v-text-field',{attrs:{\"label\":\"Registration Token\",\"required\":\"\"},model:{value:(_vm.registrationToken),callback:function ($$v) {_vm.registrationToken=$$v},expression:\"registrationToken\"}})],1),_c('v-row',[_c('v-btn',{attrs:{\"color\":\"success\"},on:{\"click\":function($event){return _vm.login(_vm.username, _vm.email, _vm.password, _vm.registrationToken)}}},[_vm._v(\" Register! \")])],1)],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\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!./Register.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!./Register.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./Register.vue?vue&type=template&id=785feb40&scoped=true\"\nimport script from \"./Register.vue?vue&type=script&lang=js\"\nexport * from \"./Register.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 \"785feb40\",\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VCol } from 'vuetify/lib/components/VGrid';\nimport { VContainer } from 'vuetify/lib/components/VGrid';\nimport { VForm } from 'vuetify/lib/components/VForm';\nimport { VRow } from 'vuetify/lib/components/VGrid';\nimport { VTextField } from 'vuetify/lib/components/VTextField';\ninstallComponents(component, {VBtn,VCol,VContainer,VForm,VRow,VTextField})\n"],"sourceRoot":""}