{"version":3,"sources":["webpack:///./src/views/auth/CreateRegister.vue?5c7e","webpack:///src/views/auth/CreateRegister.vue","webpack:///./src/views/auth/CreateRegister.vue?dc78","webpack:///./src/views/auth/CreateRegister.vue","webpack:///./src/views/auth/CreateRegister.vue?f8bb","webpack:///./src/scripts/toast.js","webpack:///./node_modules/toastify-js/src/toastify.js"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","on","$event","type","indexOf","_k","keyCode","key","preventDefault","_v","attrs","directives","name","rawName","value","expression","domProps","target","composing","email","username","password","staticStyle","isLoading","register","staticRenderFns","component","toast","success","message","Toastify","text","duration","newWindow","close","gravity","position","backgroundColor","stopOnFocus","onClick","showToast","error","root","factory","module","exports","global","options","lib","init","version","getAxisOffsetAValue","axis","offset","isNaN","containsClass","elem","yourClass","className","trim","split","prototype","toastify","constructor","toastElement","node","selector","callback","destination","positionLeft","avatar","undefined","x","y","buildToast","divElement","document","createElement","console","warn","style","background","nodeType","Node","ELEMENT_NODE","appendChild","innerHTML","avatarElement","src","insertAdjacentElement","closeElement","addEventListener","event","stopPropagation","removeElement","window","clearTimeout","timeOutValue","bind","width","innerWidth","screen","self","setTimeout","open","location","xOffset","yOffset","transform","rootElement","body","getElementById","insertBefore","firstChild","reposition","hideToast","replace","parentNode","removeChild","call","classUsed","topLeftOffsetSize","top","bottom","topRightOffsetSize","offsetSize","allToasts","getElementsByClassName","i","length","height","offsetHeight","substr"],"mappings":"gJAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,OAAO,CAACF,EAAG,OAAO,CAACE,YAAY,YAAYC,GAAG,CAAC,SAAW,SAASC,GAAQ,IAAIA,EAAOC,KAAKC,QAAQ,QAAQV,EAAIW,GAAGH,EAAOI,QAAQ,QAAQ,GAAGJ,EAAOK,IAAI,SAAW,OAAO,KAAOL,EAAOM,oBAAqB,CA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EAAa,CACfH,IAAK,GACLC,OAAQ,IAING,EAAYlD,SAASmD,uBAAuB,YAKvCC,EAAI,EAAGA,EAAIF,EAAUG,OAAQD,IAAK,CAGvCR,GADkD,IAAhDjE,EAAcuE,EAAUE,GAAI,gBAClB,eAEA,kBAGd,IAAIE,EAASJ,EAAUE,GAAGG,aAC1BX,EAAYA,EAAUY,OAAO,EAAGZ,EAAUS,OAAO,GAEjD,IAAI5E,EAAS,GAET8C,EAAQJ,OAAOK,WAAa,EAAIL,OAAOK,WAAaC,OAAOF,MAG3DA,GAAS,KAEX2B,EAAUE,GAAGhD,MAAMwC,GAAaK,EAAWL,GAAa,KAExDK,EAAWL,IAAcU,EAAS7E,IAEmB,IAAjDE,EAAcuE,EAAUE,GAAI,kBAE9BF,EAAUE,GAAGhD,MAAMwC,GAAaC,EAAkBD,GAAa,KAE/DC,EAAkBD,IAAcU,EAAS7E,IAGzCyE,EAAUE,GAAGhD,MAAMwC,GAAaI,EAAmBJ,GAAa,KAEhEI,EAAmBJ,IAAcU,EAAS7E,GAMhD,OAAO1D,MAoCTmC,EAASkB,IAAIC,KAAKY,UAAY/B,EAASkB,IAGhClB","file":"js/chunk-220463b2.6bc94ba6.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"app\"},[_c('form',{staticClass:\"auth-form\",on:{\"keypress\":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\")){ return null; }$event.preventDefault();}}},[_c('h1',[_vm._v(\"Create Account\")]),_c('div',{staticClass:\"auth-site-name\"},[_vm._v(\"afkadvantage.com\")]),_c('div',{staticClass:\"auth-input\"},[_c('label',{attrs:{\"for\":\"inputEmail\"}},[_vm._v(\"Email Address\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.email),expression:\"email\"}],attrs:{\"type\":\"email\",\"placeholder\":\"Email Address\",\"id\":\"inputEmail\"},domProps:{\"value\":(_vm.email)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.email=$event.target.value}}})]),_c('div',{staticClass:\"auth-input\"},[_c('label',{attrs:{\"for\":\"inputUsername\"}},[_vm._v(\"Username\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.username),expression:\"username\"}],attrs:{\"type\":\"name\",\"placeholder\":\"Username\",\"id\":\"inputUsername\"},domProps:{\"value\":(_vm.username)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.username=$event.target.value}}})]),_c('div',{staticClass:\"auth-input\"},[_c('label',{attrs:{\"for\":\"inputPassword\"}},[_vm._v(\"Password\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.password),expression:\"password\"}],attrs:{\"type\":\"password\",\"placeholder\":\"Password\",\"id\":\"inputPassword\"},domProps:{\"value\":(_vm.password)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.password=$event.target.value}}})]),_c('div',{staticClass:\"auth-input\",staticStyle:{\"margin-top\":\"50px\"}},[_c('button',{staticClass:\"button-primary-2\",attrs:{\"type\":\"button\",\"disabled\":_vm.isLoading},on:{\"click\":_vm.register}},[_vm._v(\"Sign up\")])]),_c('div',{staticClass:\"auth-switch-site\"},[_vm._v(\"Already have an account? \"),_c('router-link',{attrs:{\"to\":\"/auth/login\"}},[_vm._v(\"Sign in\")])],1)])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CreateRegister.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CreateRegister.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./CreateRegister.vue?vue&type=template&id=33663df1&scoped=true&\"\nimport script from \"./CreateRegister.vue?vue&type=script&lang=js&\"\nexport * from \"./CreateRegister.vue?vue&type=script&lang=js&\"\nimport style0 from \"./CreateRegister.vue?vue&type=style&index=0&id=33663df1&scoped=true&lang=css&\"\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 \"33663df1\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CreateRegister.vue?vue&type=style&index=0&id=33663df1&scoped=true&lang=css&\"","import Toastify from 'toastify-js';\n\nlet toast = {\n success: (message) => {\n return Toastify({\n text: message,\n duration: 3000, \n newWindow: true,\n close: true,\n gravity: 'bottom', // `top` or `bottom`\n position: 'right', // `left`, `center` or `right`\n backgroundColor: \"linear-gradient(124deg, rgba(43,203,115,1) 0%, rgba(13,68,139,1) 100%)\",\n stopOnFocus: true, // Prevents dismissing of toast on hover\n onClick: function(){} // Callback after click\n }).showToast();\n },\n error: (message) => {\n return Toastify({\n text: message,\n duration: 3000, \n newWindow: true,\n close: true,\n gravity: 'bottom', // `top` or `bottom`\n position: 'right', // `left`, `center` or `right`\n backgroundColor: \"linear-gradient(124deg, rgba(203,43,43,1) 0%, rgba(13,68,139,1) 100%)\",\n stopOnFocus: true, // Prevents dismissing of toast on hover\n onClick: function(){} // Callback after click\n }).showToast();\n }\n}\nexport default toast;","/*!\n * Toastify js 1.9.3\n * https://github.com/apvarun/toastify-js\n * @license MIT licensed\n *\n * Copyright (C) 2018 Varun A P\n */\n(function(root, factory) {\n if (typeof module === \"object\" && module.exports) {\n module.exports = factory();\n } else {\n root.Toastify = factory();\n }\n})(this, function(global) {\n // Object initialization\n var Toastify = function(options) {\n // Returning a new init object\n return new Toastify.lib.init(options);\n },\n // Library version\n version = \"1.9.3\";\n\n // Defining the prototype of the object\n Toastify.lib = Toastify.prototype = {\n toastify: version,\n\n constructor: Toastify,\n\n // Initializing the object with required parameters\n init: function(options) {\n // Verifying and validating the input object\n if (!options) {\n options = {};\n }\n\n // Creating the options object\n this.options = {};\n\n this.toastElement = null;\n\n // Validating the options\n this.options.text = options.text || \"Hi there!\"; // Display message\n this.options.node = options.node // Display content as node\n this.options.duration = options.duration === 0 ? 0 : options.duration || 3000; // Display duration\n this.options.selector = options.selector; // Parent selector\n this.options.callback = options.callback || function() {}; // Callback after display\n this.options.destination = options.destination; // On-click destination\n this.options.newWindow = options.newWindow || false; // Open destination in new window\n this.options.close = options.close || false; // Show toast close icon\n this.options.gravity = options.gravity === \"bottom\" ? \"toastify-bottom\" : \"toastify-top\"; // toast position - top or bottom\n this.options.positionLeft = options.positionLeft || false; // toast position - left or right\n this.options.position = options.position || ''; // toast position - left or right\n this.options.backgroundColor = options.backgroundColor; // toast background color\n this.options.avatar = options.avatar || \"\"; // img element src - url or a path\n this.options.className = options.className || \"\"; // additional class names for the toast\n this.options.stopOnFocus = options.stopOnFocus === undefined? true: options.stopOnFocus; // stop timeout on focus\n this.options.onClick = options.onClick; // Callback after click\n\n this.options.offset = options.offset || { x: 0, y: 0 }; // toast offset\n\n // Returning the current object for chaining functions\n return this;\n },\n\n // Building the DOM element\n buildToast: function() {\n // Validating if the options are defined\n if (!this.options) {\n throw \"Toastify is not initialized\";\n }\n\n // Creating the DOM object\n var divElement = document.createElement(\"div\");\n divElement.className = \"toastify on \" + this.options.className;\n\n // Positioning toast to left or right or center\n if (!!this.options.position) {\n divElement.className += \" toastify-\" + this.options.position;\n } else {\n // To be depreciated in further versions\n if (this.options.positionLeft === true) {\n divElement.className += \" toastify-left\";\n console.warn('Property `positionLeft` will be depreciated in further versions. Please use `position` instead.')\n } else {\n // Default position\n divElement.className += \" toastify-right\";\n }\n }\n\n // Assigning gravity of element\n divElement.className += \" \" + this.options.gravity;\n\n if (this.options.backgroundColor) {\n divElement.style.background = this.options.backgroundColor;\n }\n\n // Adding the toast message/node\n if (this.options.node && this.options.node.nodeType === Node.ELEMENT_NODE) {\n // If we have a valid node, we insert it\n divElement.appendChild(this.options.node)\n } else {\n divElement.innerHTML = this.options.text;\n\n if (this.options.avatar !== \"\") {\n var avatarElement = document.createElement(\"img\");\n avatarElement.src = this.options.avatar;\n\n avatarElement.className = \"toastify-avatar\";\n\n if (this.options.position == \"left\" || this.options.positionLeft === true) {\n // Adding close icon on the left of content\n divElement.appendChild(avatarElement);\n } else {\n // Adding close icon on the right of content\n divElement.insertAdjacentElement(\"afterbegin\", avatarElement);\n }\n }\n }\n\n // Adding a close icon to the toast\n if (this.options.close === true) {\n // Create a span for close element\n var closeElement = document.createElement(\"span\");\n closeElement.innerHTML = \"✖\";\n\n closeElement.className = \"toast-close\";\n\n // Triggering the removal of toast from DOM on close click\n closeElement.addEventListener(\n \"click\",\n function(event) {\n event.stopPropagation();\n this.removeElement(this.toastElement);\n window.clearTimeout(this.toastElement.timeOutValue);\n }.bind(this)\n );\n\n //Calculating screen width\n var width = window.innerWidth > 0 ? window.innerWidth : screen.width;\n\n // Adding the close icon to the toast element\n // Display on the right if screen width is less than or equal to 360px\n if ((this.options.position == \"left\" || this.options.positionLeft === true) && width > 360) {\n // Adding close icon on the left of content\n divElement.insertAdjacentElement(\"afterbegin\", closeElement);\n } else {\n // Adding close icon on the right of content\n divElement.appendChild(closeElement);\n }\n }\n\n // Clear timeout while toast is focused\n if (this.options.stopOnFocus && this.options.duration > 0) {\n var self = this;\n // stop countdown\n divElement.addEventListener(\n \"mouseover\",\n function(event) {\n window.clearTimeout(divElement.timeOutValue);\n }\n )\n // add back the timeout\n divElement.addEventListener(\n \"mouseleave\",\n function() {\n divElement.timeOutValue = window.setTimeout(\n function() {\n // Remove the toast from DOM\n self.removeElement(divElement);\n },\n self.options.duration\n )\n }\n )\n }\n \n // Adding an on-click destination path\n if (typeof this.options.destination !== \"undefined\") {\n divElement.addEventListener(\n \"click\",\n function(event) {\n event.stopPropagation();\n if (this.options.newWindow === true) {\n window.open(this.options.destination, \"_blank\");\n } else {\n window.location = this.options.destination;\n }\n }.bind(this)\n );\n }\n\n if (typeof this.options.onClick === \"function\" && typeof this.options.destination === \"undefined\") {\n divElement.addEventListener(\n \"click\",\n function(event) {\n event.stopPropagation();\n this.options.onClick(); \n }.bind(this)\n );\n }\n\n // Adding offset\n if(typeof this.options.offset === \"object\") {\n\n var x = getAxisOffsetAValue(\"x\", this.options);\n var y = getAxisOffsetAValue(\"y\", this.options);\n \n var xOffset = this.options.position == \"left\" ? x : \"-\" + x;\n var yOffset = this.options.gravity == \"toastify-top\" ? y : \"-\" + y;\n\n divElement.style.transform = \"translate(\" + xOffset + \",\" + yOffset + \")\";\n\n }\n\n // Returning the generated element\n return divElement;\n },\n\n // Displaying the toast\n showToast: function() {\n // Creating the DOM object for the toast\n this.toastElement = this.buildToast();\n\n // Getting the root element to with the toast needs to be added\n var rootElement;\n if (typeof this.options.selector === \"undefined\") {\n rootElement = document.body;\n } else {\n rootElement = document.getElementById(this.options.selector);\n }\n\n // Validating if root element is present in DOM\n if (!rootElement) {\n throw \"Root element is not defined\";\n }\n\n // Adding the DOM element\n rootElement.insertBefore(this.toastElement, rootElement.firstChild);\n\n // Repositioning the toasts in case multiple toasts are present\n Toastify.reposition();\n\n if (this.options.duration > 0) {\n this.toastElement.timeOutValue = window.setTimeout(\n function() {\n // Remove the toast from DOM\n this.removeElement(this.toastElement);\n }.bind(this),\n this.options.duration\n ); // Binding `this` for function invocation\n }\n\n // Supporting function chaining\n return this;\n },\n\n hideToast: function() {\n if (this.toastElement.timeOutValue) {\n clearTimeout(this.toastElement.timeOutValue);\n }\n this.removeElement(this.toastElement);\n },\n\n // Removing the element from the DOM\n removeElement: function(toastElement) {\n // Hiding the element\n // toastElement.classList.remove(\"on\");\n toastElement.className = toastElement.className.replace(\" on\", \"\");\n\n // Removing the element from DOM after transition end\n window.setTimeout(\n function() {\n // remove options node if any\n if (this.options.node && this.options.node.parentNode) {\n this.options.node.parentNode.removeChild(this.options.node);\n }\n\n // Remove the elemenf from the DOM, only when the parent node was not removed before.\n if (toastElement.parentNode) {\n toastElement.parentNode.removeChild(toastElement);\n }\n\n // Calling the callback function\n this.options.callback.call(toastElement);\n\n // Repositioning the toasts again\n Toastify.reposition();\n }.bind(this),\n 400\n ); // Binding `this` for function invocation\n },\n };\n\n // Positioning the toasts on the DOM\n Toastify.reposition = function() {\n\n // Top margins with gravity\n var topLeftOffsetSize = {\n top: 15,\n bottom: 15,\n };\n var topRightOffsetSize = {\n top: 15,\n bottom: 15,\n };\n var offsetSize = {\n top: 15,\n bottom: 15,\n };\n\n // Get all toast messages on the DOM\n var allToasts = document.getElementsByClassName(\"toastify\");\n\n var classUsed;\n\n // Modifying the position of each toast element\n for (var i = 0; i < allToasts.length; i++) {\n // Getting the applied gravity\n if (containsClass(allToasts[i], \"toastify-top\") === true) {\n classUsed = \"toastify-top\";\n } else {\n classUsed = \"toastify-bottom\";\n }\n\n var height = allToasts[i].offsetHeight;\n classUsed = classUsed.substr(9, classUsed.length-1)\n // Spacing between toasts\n var offset = 15;\n\n var width = window.innerWidth > 0 ? window.innerWidth : screen.width;\n\n // Show toast in center if screen with less than or qual to 360px\n if (width <= 360) {\n // Setting the position\n allToasts[i].style[classUsed] = offsetSize[classUsed] + \"px\";\n\n offsetSize[classUsed] += height + offset;\n } else {\n if (containsClass(allToasts[i], \"toastify-left\") === true) {\n // Setting the position\n allToasts[i].style[classUsed] = topLeftOffsetSize[classUsed] + \"px\";\n\n topLeftOffsetSize[classUsed] += height + offset;\n } else {\n // Setting the position\n allToasts[i].style[classUsed] = topRightOffsetSize[classUsed] + \"px\";\n\n topRightOffsetSize[classUsed] += height + offset;\n }\n }\n }\n\n // Supporting function chaining\n return this;\n };\n\n // Helper function to get offset.\n function getAxisOffsetAValue(axis, options) {\n\n if(options.offset[axis]) {\n if(isNaN(options.offset[axis])) {\n return options.offset[axis];\n }\n else {\n return options.offset[axis] + 'px';\n }\n }\n\n return '0px';\n\n }\n\n function containsClass(elem, yourClass) {\n if (!elem || typeof yourClass !== \"string\") {\n return false;\n } else if (\n elem.className &&\n elem.className\n .trim()\n .split(/\\s+/gi)\n .indexOf(yourClass) > -1\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n // Setting up the prototype for the init object\n Toastify.lib.init.prototype = Toastify.lib;\n\n // Returning the Toastify function to be assigned to the window object/module\n return Toastify;\n});\n"],"sourceRoot":""}