{"version":3,"sources":["webpack:///../../../src/components/VGrid/VFlex.ts","webpack:///../../../src/components/VForm/VForm.ts","webpack:///./src/@core/utils/validation.js","webpack:///../../../src/components/VGrid/VContainer.ts","webpack:///../../../src/components/VGrid/VLayout.ts","webpack:///./node_modules/vue-recaptcha/dist/vue-recaptcha.es.js","webpack:///../../../src/components/VGrid/grid.ts"],"names":["Grid","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","$slots","default","required","emailValidator","isEmpty","re","Array","isArray","every","test","String","passwordValidator","password","regExp","validPassword","alphaValidator","decimalValidator","numbersValidator","functional","id","tag","type","fluid","children","classes","keys","key","startsWith","domProps","mergeData","class","concat","_extends","assign","bind","target","arguments","source","prototype","call","apply","defer","state","callbacks","resolve","len","then","cb","deferred","resolved","promise","ownProp","createRecaptcha","notify","wait","ele","options","window","grecaptcha","widgetId","assertLoaded","execute","checkRecaptchaLoad","Error","recaptcha","vueRecaptchaApiLoaded","Recaptcha","sitekey","theme","badge","size","tabindex","loadRecaptchaScript","recaptchaScriptId","recaptchaHost","language","emits","setup","_ref","slots","emit","root","emitVerify","response","emitExpired","emitError","document","getElementById","script","createElement","src","async","head","appendChild","opts","callback","$root","container","defaultContent","defaultSlot","ref","VGrid","Vue","trim","join"],"mappings":"kHAAA,0BAIeA,sBAAK,S,6DCDpB,wCAiBeC,sBACbC,OACAC,eAAmB,SAEnBC,OAAO,CACPC,KAAM,SAENC,UACE,MAAO,CAAEC,KAAMC,OAGjBC,cAAc,EAEdC,MAAO,CACLC,SAAUC,QACVC,eAAgBD,QAChBE,SAAUF,QACV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,KAAM8G,OAEzD,MAAM,MAAE7G,GAAU3C,EAClB,GAAI2C,EAAO,CAET3C,EAAK2C,MAAQ,GACb,MAAM8B,EAAUjE,OAAOkE,KAAK/B,GAAOlB,OAAOkD,IAGxC,GAAY,SAARA,EAAgB,OAAO,EAE3B,MAAM5E,EAAQ4C,EAAMgC,GAIpB,OAAIA,EAAIC,WAAW,UACjB5E,EAAK2C,MAAOgC,GAAO5E,GACZ,GAGFA,GAA0B,kBAAVA,IAGrB0E,EAAQ/C,SAAQ1B,EAAK0C,aAAe,IAAI+B,EAAQgF,KAAK,MAQ3D,OALI/J,EAAM0E,KACRpE,EAAK6E,SAAW7E,EAAK6E,UAAY,GACjC7E,EAAK6E,SAAST,GAAK1E,EAAM0E,IAGpB3B,EAAE/C,EAAM2E,IAAKrE,EAAMwE","file":"js/chunk-6165e075.f396f2cb.js","sourcesContent":["import './_grid.sass'\n\nimport Grid from './grid'\n\nexport default Grid('flex')\n","// 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'\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 }, this.$slots.default)\n },\n})\n","import { isEmpty } from './index'\n\nexport const required = value => (value && value.length ? true : 'This field is required')\nexport const emailValidator = value => {\n if (isEmpty(value)) {\n return true\n }\n\n // eslint-disable-next-line\n const re = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/\n\n if (Array.isArray(value)) {\n return value.every(val => re.test(String(val)))\n }\n\n return re.test(String(value)) || 'The Email field must be a valid email'\n}\n\nexport const passwordValidator = password => {\n /* eslint-disable no-useless-escape */\n const regExp = /(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%&*()]).{8,}/\n /* eslint-enable no-useless-escape */\n const validPassword = regExp.test(password)\n\n return (\n // eslint-disable-next-line operator-linebreak\n validPassword ||\n 'Field must contain at least one uppercase, lowercase, special character and digit with min 8 chars'\n )\n}\n\nexport const confirmedValidator = (value, target) =>\n // eslint-disable-next-line implicit-arrow-linebreak\n value === target || 'The Confirm Password field confirmation does not match'\n\nexport const between = (value, min, max) => () => {\n const valueAsNumber = Number(value)\n\n return (Number(min) <= valueAsNumber && Number(max) >= valueAsNumber) || `Enter number between ${min} and ${max}`\n}\n\nexport const integerValidator = value => {\n if (isEmpty(value)) {\n return true\n }\n\n if (Array.isArray(value)) {\n return value.every(val => /^-?[0-9]+$/.test(String(val)))\n }\n\n return /^-?[0-9]+$/.test(String(value)) || 'This field must be an integer'\n}\n\nexport const regexValidator = (value, regex) => {\n if (isEmpty(value)) {\n return true\n }\n\n let regeX = regex\n if (typeof regeX === 'string') {\n regeX = new RegExp(regeX)\n }\n\n if (Array.isArray(value)) {\n return value.every(val => regexValidator(val, { regeX }))\n }\n\n return regeX.test(String(value)) || 'The Regex field format is invalid'\n}\n\nexport const alphaValidator = value => {\n if (isEmpty(value)) {\n return true\n }\n\n // const valueAsString = String(value)\n\n return /^[A-Z]*$/i.test(String(value)) || 'The Alpha field may only contain alphabetic characters'\n}\n\nexport const urlValidator = value => {\n if (value === undefined || value === null || value.length === 0) {\n return true\n }\n /* eslint-disable no-useless-escape */\n const re = /^(http[s]?:\\/\\/){0,1}(www\\.){0,1}[a-zA-Z0-9\\.\\-]+\\.[a-zA-Z]{2,5}[\\.]{0,1}/\n\n return re.test(value) || 'URL is invalid'\n}\n\nexport const lengthValidator = (value, length) => {\n if (isEmpty(value)) {\n return true\n }\n\n return value.length === length || `The Min Character field must be at least ${length} characters`\n}\nexport const alphaDashValidator = value => {\n if (isEmpty(value)) {\n return true\n }\n\n const valueAsString = String(value)\n\n return /^[0-9A-Z_-]*$/i.test(valueAsString) || 'All Character is not valid'\n}\nexport const decimalValidator = value => {\n if (isEmpty(value)) {\n return true\n }\n\n const re = /^[-+]?[0-9]+\\.[0-9]+$/\n\n return re.test(value) || 'This field must be a decimal'\n}\nexport const numbersValidator = value => {\n if (isEmpty(value)) {\n return 'This field must be a number'\n } \n\n const re = /^\\s*[+-]?(\\d+|\\d*\\.\\d+|\\d+\\.\\d*)([Ee][+-]?\\d+)?\\s*$/\n\n return re.test(value) || 'This field must be a number'\n}","import './_grid.sass'\nimport './VGrid.sass'\n\nimport Grid from './grid'\n\nimport mergeData from '../../util/mergeData'\n\n/* @vue/component */\nexport default Grid('container').extend({\n name: 'v-container',\n functional: true,\n props: {\n id: String,\n tag: {\n type: String,\n default: 'div',\n },\n fluid: {\n type: Boolean,\n default: false,\n },\n },\n render (h, { props, data, children }) {\n let classes\n const { attrs } = data\n if (attrs) {\n // reset attrs to extract utility clases like pa-3\n data.attrs = {}\n classes = Object.keys(attrs).filter(key => {\n // TODO: Remove once resolved\n // https://github.com/vuejs/vue/issues/7841\n if (key === 'slot') return false\n\n const value = attrs[key]\n\n // add back data attributes like data-test=\"foo\" but do not\n // add them as classes\n if (key.startsWith('data-')) {\n data.attrs![key] = value\n return false\n }\n\n return value || typeof value === 'string'\n })\n }\n\n if (props.id) {\n data.domProps = data.domProps || {}\n data.domProps.id = props.id\n }\n\n return h(\n props.tag,\n mergeData(data, {\n staticClass: 'container',\n class: Array({\n 'container--fluid': props.fluid,\n }).concat(classes || []),\n }),\n children\n )\n },\n})\n","import './_grid.sass'\n\nimport Grid from './grid'\n\nexport default Grid('layout')\n","import { defineComponent, ref, onMounted, h } from 'vue-demi';\n\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nvar defer = function defer() {\n var state = false; // Resolved or not\n\n var callbacks = [];\n\n var resolve = function resolve() {\n if (state) {\n return;\n }\n\n state = true;\n\n for (var i = 0, len = callbacks.length; i < len; i++) {\n callbacks[i]();\n }\n };\n\n var then = function then(cb) {\n if (!state) {\n callbacks.push(cb);\n return;\n }\n\n cb();\n };\n\n var deferred = {\n resolved: function resolved() {\n return state;\n },\n resolve: resolve,\n promise: {\n then: then\n }\n };\n return deferred;\n};\n\nvar ownProp = Object.prototype.hasOwnProperty;\nfunction createRecaptcha() {\n var deferred = defer();\n return {\n notify: function notify() {\n deferred.resolve();\n },\n wait: function wait() {\n return deferred.promise;\n },\n render: function render(ele, options, cb) {\n this.wait().then(function () {\n cb(window.grecaptcha.render(ele, options));\n });\n },\n reset: function reset(widgetId) {\n if (typeof widgetId === 'undefined') {\n return;\n }\n\n this.assertLoaded();\n this.wait().then(function () {\n return window.grecaptcha.reset(widgetId);\n });\n },\n execute: function execute(widgetId) {\n if (typeof widgetId === 'undefined') {\n return;\n }\n\n this.assertLoaded();\n this.wait().then(function () {\n return window.grecaptcha.execute(widgetId);\n });\n },\n checkRecaptchaLoad: function checkRecaptchaLoad() {\n if (ownProp.call(window, 'grecaptcha') && ownProp.call(window.grecaptcha, 'render')) {\n this.notify();\n }\n },\n assertLoaded: function assertLoaded() {\n if (!deferred.resolved()) {\n throw new Error('ReCAPTCHA has not been loaded');\n }\n }\n };\n}\nvar recaptcha = createRecaptcha();\n\nif (typeof window !== 'undefined') {\n window.vueRecaptchaApiLoaded = recaptcha.notify;\n}\n\nvar Recaptcha = defineComponent({\n name: 'VueRecaptcha',\n props: {\n sitekey: {\n type: String,\n required: true\n },\n theme: {\n type: String\n },\n badge: {\n type: String\n },\n type: {\n type: String\n },\n size: {\n type: String\n },\n tabindex: {\n type: String\n },\n loadRecaptchaScript: {\n type: Boolean,\n \"default\": true\n },\n recaptchaScriptId: {\n type: String,\n \"default\": '__RECAPTCHA_SCRIPT'\n },\n recaptchaHost: {\n type: String,\n \"default\": 'www.google.com'\n },\n language: {\n type: String,\n \"default\": ''\n }\n },\n emits: ['render', 'verify', 'expired', 'error'],\n setup: function setup(props, _ref) {\n var slots = _ref.slots,\n emit = _ref.emit;\n var root = ref(null);\n var widgetId = ref(null);\n\n var emitVerify = function emitVerify(response) {\n emit('verify', response);\n };\n\n var emitExpired = function emitExpired() {\n emit('expired');\n };\n\n var emitError = function emitError() {\n emit('error');\n };\n\n onMounted(function () {\n recaptcha.checkRecaptchaLoad();\n\n if (props.loadRecaptchaScript) {\n if (!document.getElementById(props.recaptchaScriptId)) {\n // Note: vueRecaptchaApiLoaded load callback name is per the latest documentation\n var script = document.createElement('script');\n script.id = props.recaptchaScriptId;\n script.src = \"https://\" + props.recaptchaHost + \"/recaptcha/api.js?onload=vueRecaptchaApiLoaded&render=explicit&hl=\" + props.language;\n script.async = true;\n script.defer = true;\n document.head.appendChild(script);\n }\n }\n\n var opts = _extends({}, props, {\n callback: emitVerify,\n 'expired-callback': emitExpired,\n 'error-callback': emitError\n });\n\n var $root = root.value;\n var container = slots[\"default\"] ? $root.children[0] : $root;\n recaptcha.render(container, opts, function (id) {\n widgetId.value = id;\n emit('render', id);\n });\n });\n return {\n root: root,\n widgetId: widgetId,\n reset: function reset() {\n recaptcha.reset(widgetId.value);\n },\n execute: function execute() {\n recaptcha.execute(widgetId.value);\n }\n };\n },\n render: function render() {\n var defaultSlot = this.$slots[\"default\"];\n var defaultContent;\n\n if (typeof defaultSlot === 'function') {\n defaultContent = defaultSlot();\n } else {\n defaultContent = defaultSlot;\n }\n\n return h('div', {\n ref: 'root'\n }, defaultContent);\n }\n});\n\nexport { Recaptcha as VueRecaptcha };\n","// Types\nimport Vue, { VNode } from 'vue'\n\nexport default function VGrid (name: string) {\n /* @vue/component */\n return Vue.extend({\n name: `v-${name}`,\n\n functional: true,\n\n props: {\n id: String,\n tag: {\n type: String,\n default: 'div',\n },\n },\n\n render (h, { props, data, children }): VNode {\n data.staticClass = (`${name} ${data.staticClass || ''}`).trim()\n\n const { attrs } = data\n if (attrs) {\n // reset attrs to extract utility clases like pa-3\n data.attrs = {}\n const classes = Object.keys(attrs).filter(key => {\n // TODO: Remove once resolved\n // https://github.com/vuejs/vue/issues/7841\n if (key === 'slot') return false\n\n const value = attrs[key]\n\n // add back data attributes like data-test=\"foo\" but do not\n // add them as classes\n if (key.startsWith('data-')) {\n data.attrs![key] = value\n return false\n }\n\n return value || typeof value === 'string'\n })\n\n if (classes.length) data.staticClass += ` ${classes.join(' ')}`\n }\n\n if (props.id) {\n data.domProps = data.domProps || {}\n data.domProps.id = props.id\n }\n\n return h(props.tag, data, children)\n },\n })\n}\n"],"sourceRoot":""}