{"version":3,"file":"AppointmentCreateView-68aa6d4b.js","sources":["../../src/components/ui/ThStepper.vue","../../src/components/ui/ThInput.vue","../../src/components/ui/ThLabel.vue","../../src/components/ui/ThSelect.vue","../../src/components/ui/ThTextarea.vue","../../src/components/ui/ThInputAddons.vue","../../src/components/ui/ThInputErrorsOverlay.vue","../../src/components/ui/ThCheckbox.vue","../../src/views/appointments/api/useServiceCategoriesQuery.ts","../../src/components/InteractiveCard.vue","../../src/api/useServicePriceQuery.ts","../../src/stores/useServicePricesStore.ts","../../src/views/appointments/components/choose-services/ServiceCard.vue","../../src/views/appointments/components/choose-services/CategoryServicesAccordion.vue","../../src/views/appointments/components/choose-services/ChooseServicesForm.vue","../../src/views/appointments/components/choose-time/StaffSelector.vue","../../src/views/appointments/components/choose-time/ChooseTimeForm.vue","../../src/views/appointments/components/choose-branch/BranchCard.vue","../../src/utils/formatURL.ts","../../src/views/appointments/api/useBranchesQuery.ts","../../src/utils/isFetchAbortError.ts","../../src/views/appointments/components/choose-branch/ChooseBranchForm.vue","../../src/utils/isEmail.ts","../../node_modules/@vuelidate/core/dist/index.mjs","../../node_modules/@vuelidate/validators/dist/index.mjs","../../src/views/appointments/components/contact/ContactForm.vue","../../src/views/appointments/api/useCreateAppointmentMutation.ts","../../src/views/appointments/components/booking/TermsAndConditions.vue","../../src/recaptcha/InvalidRecaptchaError.ts","../../src/recaptcha/getRecaptchaToken.ts","../../src/views/appointments/components/booking/BookingForm.vue","../../src/views/appointments/components/choose-services/AppointmentSummaryCard.vue","../../src/views/appointments/AppointmentCreateView.vue"],"sourcesContent":["\n\n\n","\n\n\n","\n\n","\n\n\n\n\n","\n\n\n","\n\n\n","\n\n\n\n\n","\n\n","import type { ServiceCategory } from '@/types/ServiceCategory'\nimport { useThFetch } from '@/composables/useThFetch'\nimport type { TillhubResponse } from '@/types/TillhubResponse'\nimport { useConfigurationStore } from '@/stores/useConfigurationStore'\nimport { toValue, type MaybeRefOrGetter } from 'vue'\nimport type { UseFetchOptions } from '@vueuse/core'\n\nexport interface ServiceCategoriesQueryParams {\n branchId: string\n}\n\nexport function useServiceCategoriesQuery(\n params: MaybeRefOrGetter,\n options: UseFetchOptions = {}\n) {\n const store = useConfigurationStore()\n\n const url = () =>\n `/v0/service_categories/${store.organization}?branch_id=${toValue(params).branchId}`\n\n return useThFetch(url, options).json>()\n}\n","\n\n\n","import { useThFetch } from '@/composables/useThFetch'\nimport { useConfigurationStore } from '@/stores/useConfigurationStore'\nimport { toValue, type MaybeRefOrGetter } from 'vue'\n\ninterface ProductPrice {\n amount_net: number\n amount_gross: number\n currency: string\n}\n\nexport interface UseServicePriceQueryParams {\n productId: string\n branchId: string\n}\n\nexport function useServicePriceQuery(params: MaybeRefOrGetter) {\n const store = useConfigurationStore()\n\n const url = () => {\n const { productId, branchId } = toValue(params)\n\n return `/v1/products/public/${store.organization}/prices/actual?product_id=${productId}&location=${branchId}`\n }\n\n return useThFetch(url, {\n afterFetch(ctx) {\n const results = ctx.data.results as ProductPrice[]\n\n return {\n ...ctx,\n data: results[0]?.amount_gross ?? 0\n }\n }\n }).json()\n}\n","import { useServicePriceQuery } from '@/api/useServicePriceQuery'\nimport { defineStore } from 'pinia'\n\n/**\n * This store is used to deduplicate/cache service price requests.\n * `useFetch` doesn't have a good way to do this and we need to cache them because\n * we fire separate request for each service and the user can filter the services using a\n * query\n */\nexport const useServicePricesStore = defineStore('servicePrices', {\n state() {\n return {\n cachedPromises: {} as Record>\n }\n },\n actions: {\n async getPrice(productId: string, branchId: string) {\n const cacheKey = productId + branchId\n\n if (typeof this.cachedPromises[cacheKey] !== 'undefined') {\n return this.cachedPromises[cacheKey]\n }\n\n const promise = new Promise((resolve) => {\n useServicePriceQuery({ productId, branchId }).then(({ data, error }) => {\n if (error.value) {\n delete this.cachedPromises[cacheKey]\n\n return resolve(new Error('Failed to fetch price.'))\n }\n\n resolve(data.value as number)\n })\n })\n\n this.cachedPromises[cacheKey] = promise\n\n return promise\n }\n }\n})\n","\n\n\n\n\n","\n\n\n","\n\n\n","\n\n\n","\n\n\n","\n\n\n","export function formatURL(url: string, query: Record) {\n const serializedQuery = Object.entries(query)\n .filter(([, value]) => typeof value !== 'undefined' && value !== '')\n .map((entries) => entries.join('='))\n .join('&')\n\n return serializedQuery ? `${url}?${serializedQuery}` : url\n}\n","import { useThFetch } from '@/composables/useThFetch'\nimport { useConfigurationStore } from '@/stores/useConfigurationStore'\nimport type { BranchBasic } from '@/types'\nimport { formatURL } from '@/utils/formatURL'\nimport type { UseFetchOptions } from '@vueuse/core'\nimport { toValue, type MaybeRefOrGetter } from 'vue'\n\nexport interface UseBranchesQueryParams {\n q?: string\n limit?: number\n}\n\nexport function useBranchesQuery(\n params: MaybeRefOrGetter = {},\n options: UseFetchOptions = {}\n) {\n const store = useConfigurationStore()\n\n const getURL = () => {\n const { q, limit = 20 } = toValue(params)\n\n return formatURL(`/v1/branches/public/${store.organization}`, {\n limit,\n deleted: false,\n available_in_online_booking: true,\n q\n })\n }\n\n return useThFetch(getURL, {\n afterFetch(ctx) {\n ctx.data = ctx.data.results\n\n return options.afterFetch?.(ctx) ?? ctx\n },\n ...options\n }).json()\n}\n","export function isFetchAbortError(error: unknown) {\n return (\n error instanceof Error && error.message.toLowerCase().includes('the user aborted a request')\n )\n}\n","\n\n\n","/**\n * Validating emails is tricky in multilingual systems and many regexes would not\n * allow valid emails. This is a simple one copied from here, see other replies in discussion\n * if adjusting, as it may cause issues for certain languages if they are to be supported in the future\n * https://stackoverflow.com/a/9204568/13992557\n */\n// const emailRegExp = new RegExp(/^\\S+@\\S+\\.\\S+$/)\n\n// There is a bug, because the front-end validation allowed certain emails, but then the back-end validation\n// respond with error because of their regex,\n// so this is a new one that is used from the back-end. The purpose is to not allow the emails that later will cause 422 response.\n// https://unz.atlassian.net/browse/UNTIL-8988\n\nconst emailRegex = new RegExp(\n /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\])|(\\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\\.[A-Za-z]{2,})+))$/\n)\n\nexport function isEmail(value: string) {\n return emailRegex.test(value)\n}\n","import { isReactive, isReadonly, computed, unref, ref, watch, isRef, reactive, nextTick, inject, provide, getCurrentInstance, onBeforeMount, onBeforeUnmount } from 'vue-demi';\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction unwrapObj(obj) {\n let ignoreKeys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n return Object.keys(obj).reduce((o, k) => {\n if (ignoreKeys.includes(k)) return o;\n o[k] = unref(obj[k]);\n return o;\n }, {});\n}\nfunction isFunction(val) {\n return typeof val === 'function';\n}\nfunction isProxy(value) {\n return isReactive(value) || isReadonly(value);\n}\nfunction get(obj, stringPath, def) {\n let current = obj;\n const path = stringPath.split('.');\n\n for (let i = 0; i < path.length; i++) {\n if (!current[path[i]]) return def;\n current = current[path[i]];\n }\n\n return current;\n}\nfunction gatherBooleanGroupProperties(group, nestedResults, property) {\n return computed(() => {\n return group.some(path => {\n return get(nestedResults, path, {\n [property]: false\n })[property];\n });\n });\n}\nfunction gatherArrayGroupProperties(group, nestedResults, property) {\n return computed(() => {\n return group.reduce((all, path) => {\n const fetchedProperty = get(nestedResults, path, {\n [property]: false\n })[property] || [];\n return all.concat(fetchedProperty);\n }, []);\n });\n}\n\nfunction callRule(rule, value, siblingState, instance) {\n return rule.call(instance, unref(value), unref(siblingState), instance);\n}\n\nfunction normalizeValidatorResponse(result) {\n return result.$valid !== undefined ? !result.$valid : !result;\n}\n\nfunction createAsyncResult(rule, model, $pending, $dirty, _ref, $response, instance) {\n let {\n $lazy,\n $rewardEarly\n } = _ref;\n let watchTargets = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : [];\n let siblingState = arguments.length > 8 ? arguments[8] : undefined;\n let $lastInvalidState = arguments.length > 9 ? arguments[9] : undefined;\n let $lastCommittedOn = arguments.length > 10 ? arguments[10] : undefined;\n const $invalid = ref(!!$dirty.value);\n const $pendingCounter = ref(0);\n $pending.value = false;\n const $unwatch = watch([model, $dirty].concat(watchTargets, $lastCommittedOn), () => {\n if ($lazy && !$dirty.value || $rewardEarly && !$lastInvalidState.value && !$pending.value) {\n return;\n }\n\n let ruleResult;\n\n try {\n ruleResult = callRule(rule, model, siblingState, instance);\n } catch (err) {\n ruleResult = Promise.reject(err);\n }\n\n $pendingCounter.value++;\n $pending.value = !!$pendingCounter.value;\n $invalid.value = false;\n Promise.resolve(ruleResult).then(data => {\n $pendingCounter.value--;\n $pending.value = !!$pendingCounter.value;\n $response.value = data;\n $invalid.value = normalizeValidatorResponse(data);\n }).catch(error => {\n $pendingCounter.value--;\n $pending.value = !!$pendingCounter.value;\n $response.value = error;\n $invalid.value = true;\n });\n }, {\n immediate: true,\n deep: typeof model === 'object'\n });\n return {\n $invalid,\n $unwatch\n };\n}\n\nfunction createSyncResult(rule, model, $dirty, _ref2, $response, instance, siblingState, $lastInvalidState) {\n let {\n $lazy,\n $rewardEarly\n } = _ref2;\n\n const $unwatch = () => ({});\n\n const $invalid = computed(() => {\n if ($lazy && !$dirty.value || $rewardEarly && !$lastInvalidState.value) {\n return false;\n }\n\n let returnValue = true;\n\n try {\n const result = callRule(rule, model, siblingState, instance);\n $response.value = result;\n returnValue = normalizeValidatorResponse(result);\n } catch (err) {\n $response.value = err;\n }\n\n return returnValue;\n });\n return {\n $unwatch,\n $invalid\n };\n}\n\nfunction createValidatorResult(rule, model, $dirty, config, instance, validatorName, propertyKey, propertyPath, siblingState, $lastInvalidState, $lastCommittedOn) {\n const $pending = ref(false);\n const $params = rule.$params || {};\n const $response = ref(null);\n let $invalid;\n let $unwatch;\n\n if (rule.$async) {\n ({\n $invalid,\n $unwatch\n } = createAsyncResult(rule.$validator, model, $pending, $dirty, config, $response, instance, rule.$watchTargets, siblingState, $lastInvalidState, $lastCommittedOn));\n } else {\n ({\n $invalid,\n $unwatch\n } = createSyncResult(rule.$validator, model, $dirty, config, $response, instance, siblingState, $lastInvalidState));\n }\n\n const message = rule.$message;\n const $message = isFunction(message) ? computed(() => message(unwrapObj({\n $pending,\n $invalid,\n $params: unwrapObj($params),\n $model: model,\n $response,\n $validator: validatorName,\n $propertyPath: propertyPath,\n $property: propertyKey\n }))) : message || '';\n return {\n $message,\n $params,\n $pending,\n $invalid,\n $response,\n $unwatch\n };\n}\n\nfunction sortValidations() {\n let validationsRaw = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n const validations = unref(validationsRaw);\n const validationKeys = Object.keys(validations);\n const rules = {};\n const nestedValidators = {};\n const config = {};\n let validationGroups = null;\n validationKeys.forEach(key => {\n const v = validations[key];\n\n switch (true) {\n case isFunction(v.$validator):\n rules[key] = v;\n break;\n\n case isFunction(v):\n rules[key] = {\n $validator: v\n };\n break;\n\n case key === '$validationGroups':\n validationGroups = v;\n break;\n\n case key.startsWith('$'):\n config[key] = v;\n break;\n\n default:\n nestedValidators[key] = v;\n }\n });\n return {\n rules,\n nestedValidators,\n config,\n validationGroups\n };\n}\n\nconst ROOT_PATH = '__root';\n\nfunction createValidationResults(rules, model, key, resultsCache, path, config, instance, externalResults, siblingState) {\n const ruleKeys = Object.keys(rules);\n const cachedResult = resultsCache.get(path, rules);\n const $dirty = ref(false);\n const $lastInvalidState = ref(false);\n const $lastCommittedOn = ref(0);\n\n if (cachedResult) {\n if (!cachedResult.$partial) return cachedResult;\n cachedResult.$unwatch();\n $dirty.value = cachedResult.$dirty.value;\n }\n\n const result = {\n $dirty,\n $path: path,\n $touch: () => {\n if (!$dirty.value) $dirty.value = true;\n },\n $reset: () => {\n if ($dirty.value) $dirty.value = false;\n },\n $commit: () => {}\n };\n\n if (!ruleKeys.length) {\n cachedResult && resultsCache.set(path, rules, result);\n return result;\n }\n\n ruleKeys.forEach(ruleKey => {\n result[ruleKey] = createValidatorResult(rules[ruleKey], model, result.$dirty, config, instance, ruleKey, key, path, siblingState, $lastInvalidState, $lastCommittedOn);\n });\n result.$externalResults = computed(() => {\n if (!externalResults.value) return [];\n return [].concat(externalResults.value).map((stringError, index) => ({\n $propertyPath: path,\n $property: key,\n $validator: '$externalResults',\n $uid: `${path}-externalResult-${index}`,\n $message: stringError,\n $params: {},\n $response: null,\n $pending: false\n }));\n });\n result.$invalid = computed(() => {\n const r = ruleKeys.some(ruleKey => unref(result[ruleKey].$invalid));\n $lastInvalidState.value = r;\n return !!result.$externalResults.value.length || r;\n });\n result.$pending = computed(() => ruleKeys.some(ruleKey => unref(result[ruleKey].$pending)));\n result.$error = computed(() => result.$dirty.value ? result.$pending.value || result.$invalid.value : false);\n result.$silentErrors = computed(() => ruleKeys.filter(ruleKey => unref(result[ruleKey].$invalid)).map(ruleKey => {\n const res = result[ruleKey];\n return reactive({\n $propertyPath: path,\n $property: key,\n $validator: ruleKey,\n $uid: `${path}-${ruleKey}`,\n $message: res.$message,\n $params: res.$params,\n $response: res.$response,\n $pending: res.$pending\n });\n }).concat(result.$externalResults.value));\n result.$errors = computed(() => result.$dirty.value ? result.$silentErrors.value : []);\n\n result.$unwatch = () => ruleKeys.forEach(ruleKey => {\n result[ruleKey].$unwatch();\n });\n\n result.$commit = () => {\n $lastInvalidState.value = true;\n $lastCommittedOn.value = Date.now();\n };\n\n resultsCache.set(path, rules, result);\n return result;\n}\n\nfunction collectNestedValidationResults(validations, nestedState, path, resultsCache, config, instance, nestedExternalResults) {\n const nestedValidationKeys = Object.keys(validations);\n if (!nestedValidationKeys.length) return {};\n return nestedValidationKeys.reduce((results, nestedKey) => {\n results[nestedKey] = setValidations({\n validations: validations[nestedKey],\n state: nestedState,\n key: nestedKey,\n parentKey: path,\n resultsCache,\n globalConfig: config,\n instance,\n externalResults: nestedExternalResults\n });\n return results;\n }, {});\n}\n\nfunction createMetaFields(results, nestedResults, childResults) {\n const allResults = computed(() => [nestedResults, childResults].filter(res => res).reduce((allRes, res) => {\n return allRes.concat(Object.values(unref(res)));\n }, []));\n const $dirty = computed({\n get() {\n return results.$dirty.value || (allResults.value.length ? allResults.value.every(r => r.$dirty) : false);\n },\n\n set(v) {\n results.$dirty.value = v;\n }\n\n });\n const $silentErrors = computed(() => {\n const modelErrors = unref(results.$silentErrors) || [];\n const nestedErrors = allResults.value.filter(result => (unref(result).$silentErrors || []).length).reduce((errors, result) => {\n return errors.concat(...result.$silentErrors);\n }, []);\n return modelErrors.concat(nestedErrors);\n });\n const $errors = computed(() => {\n const modelErrors = unref(results.$errors) || [];\n const nestedErrors = allResults.value.filter(result => (unref(result).$errors || []).length).reduce((errors, result) => {\n return errors.concat(...result.$errors);\n }, []);\n return modelErrors.concat(nestedErrors);\n });\n const $invalid = computed(() => allResults.value.some(r => r.$invalid) || unref(results.$invalid) || false);\n const $pending = computed(() => allResults.value.some(r => unref(r.$pending)) || unref(results.$pending) || false);\n const $anyDirty = computed(() => allResults.value.some(r => r.$dirty) || allResults.value.some(r => r.$anyDirty) || $dirty.value);\n const $error = computed(() => $dirty.value ? $pending.value || $invalid.value : false);\n\n const $touch = () => {\n results.$touch();\n allResults.value.forEach(result => {\n result.$touch();\n });\n };\n\n const $commit = () => {\n results.$commit();\n allResults.value.forEach(result => {\n result.$commit();\n });\n };\n\n const $reset = () => {\n results.$reset();\n allResults.value.forEach(result => {\n result.$reset();\n });\n };\n\n if (allResults.value.length && allResults.value.every(nr => nr.$dirty)) $touch();\n return {\n $dirty,\n $errors,\n $invalid,\n $anyDirty,\n $error,\n $pending,\n $touch,\n $reset,\n $silentErrors,\n $commit\n };\n}\n\nfunction setValidations(_ref) {\n let {\n validations,\n state,\n key,\n parentKey,\n childResults,\n resultsCache,\n globalConfig = {},\n instance,\n externalResults\n } = _ref;\n const path = parentKey ? `${parentKey}.${key}` : key;\n const {\n rules,\n nestedValidators,\n config,\n validationGroups\n } = sortValidations(validations);\n\n const mergedConfig = _objectSpread2(_objectSpread2({}, globalConfig), config);\n\n const nestedState = key ? computed(() => {\n const s = unref(state);\n return s ? unref(s[key]) : undefined;\n }) : state;\n\n const cachedExternalResults = _objectSpread2({}, unref(externalResults) || {});\n\n const nestedExternalResults = computed(() => {\n const results = unref(externalResults);\n if (!key) return results;\n return results ? unref(results[key]) : undefined;\n });\n const results = createValidationResults(rules, nestedState, key, resultsCache, path, mergedConfig, instance, nestedExternalResults, state);\n const nestedResults = collectNestedValidationResults(nestedValidators, nestedState, path, resultsCache, mergedConfig, instance, nestedExternalResults);\n const $validationGroups = {};\n\n if (validationGroups) {\n Object.entries(validationGroups).forEach(_ref2 => {\n let [key, group] = _ref2;\n $validationGroups[key] = {\n $invalid: gatherBooleanGroupProperties(group, nestedResults, '$invalid'),\n $error: gatherBooleanGroupProperties(group, nestedResults, '$error'),\n $pending: gatherBooleanGroupProperties(group, nestedResults, '$pending'),\n $errors: gatherArrayGroupProperties(group, nestedResults, '$errors'),\n $silentErrors: gatherArrayGroupProperties(group, nestedResults, '$silentErrors')\n };\n });\n }\n\n const {\n $dirty,\n $errors,\n $invalid,\n $anyDirty,\n $error,\n $pending,\n $touch,\n $reset,\n $silentErrors,\n $commit\n } = createMetaFields(results, nestedResults, childResults);\n const $model = key ? computed({\n get: () => unref(nestedState),\n set: val => {\n $dirty.value = true;\n const s = unref(state);\n const external = unref(externalResults);\n\n if (external) {\n external[key] = cachedExternalResults[key];\n }\n\n if (isRef(s[key])) {\n s[key].value = val;\n } else {\n s[key] = val;\n }\n }\n }) : null;\n\n if (key && mergedConfig.$autoDirty) {\n watch(nestedState, () => {\n if (!$dirty.value) $touch();\n const external = unref(externalResults);\n\n if (external) {\n external[key] = cachedExternalResults[key];\n }\n }, {\n flush: 'sync'\n });\n }\n\n async function $validate() {\n $touch();\n\n if (mergedConfig.$rewardEarly) {\n $commit();\n await nextTick();\n }\n\n await nextTick();\n return new Promise(resolve => {\n if (!$pending.value) return resolve(!$invalid.value);\n const unwatch = watch($pending, () => {\n resolve(!$invalid.value);\n unwatch();\n });\n });\n }\n\n function $getResultsForChild(key) {\n return (childResults.value || {})[key];\n }\n\n function $clearExternalResults() {\n if (isRef(externalResults)) {\n externalResults.value = cachedExternalResults;\n } else {\n if (Object.keys(cachedExternalResults).length === 0) {\n Object.keys(externalResults).forEach(k => {\n delete externalResults[k];\n });\n } else {\n Object.assign(externalResults, cachedExternalResults);\n }\n }\n }\n\n return reactive(_objectSpread2(_objectSpread2(_objectSpread2({}, results), {}, {\n $model,\n $dirty,\n $error,\n $errors,\n $invalid,\n $anyDirty,\n $pending,\n $touch,\n $reset,\n $path: path || ROOT_PATH,\n $silentErrors,\n $validate,\n $commit\n }, childResults && {\n $getResultsForChild,\n $clearExternalResults,\n $validationGroups\n }), nestedResults));\n}\n\nclass ResultsStorage {\n constructor() {\n this.storage = new Map();\n }\n\n set(path, rules, result) {\n this.storage.set(path, {\n rules,\n result\n });\n }\n\n checkRulesValidity(path, rules, storedRules) {\n const storedRulesKeys = Object.keys(storedRules);\n const newRulesKeys = Object.keys(rules);\n if (newRulesKeys.length !== storedRulesKeys.length) return false;\n const hasAllValidators = newRulesKeys.every(ruleKey => storedRulesKeys.includes(ruleKey));\n if (!hasAllValidators) return false;\n return newRulesKeys.every(ruleKey => {\n if (!rules[ruleKey].$params) return true;\n return Object.keys(rules[ruleKey].$params).every(paramKey => {\n return unref(storedRules[ruleKey].$params[paramKey]) === unref(rules[ruleKey].$params[paramKey]);\n });\n });\n }\n\n get(path, rules) {\n const storedRuleResultPair = this.storage.get(path);\n if (!storedRuleResultPair) return undefined;\n const {\n rules: storedRules,\n result\n } = storedRuleResultPair;\n const isValidCache = this.checkRulesValidity(path, rules, storedRules);\n const $unwatch = result.$unwatch ? result.$unwatch : () => ({});\n if (!isValidCache) return {\n $dirty: result.$dirty,\n $partial: true,\n $unwatch\n };\n return result;\n }\n\n}\n\nconst CollectFlag = {\n COLLECT_ALL: true,\n COLLECT_NONE: false\n};\nconst VuelidateInjectChildResults = Symbol('vuelidate#injectChildResults');\nconst VuelidateRemoveChildResults = Symbol('vuelidate#removeChildResults');\nfunction nestedValidations(_ref) {\n let {\n $scope,\n instance\n } = _ref;\n const childResultsRaw = {};\n const childResultsKeys = ref([]);\n const childResults = computed(() => childResultsKeys.value.reduce((results, key) => {\n results[key] = unref(childResultsRaw[key]);\n return results;\n }, {}));\n\n function injectChildResultsIntoParent(results, _ref2) {\n let {\n $registerAs: key,\n $scope: childScope,\n $stopPropagation\n } = _ref2;\n if ($stopPropagation || $scope === CollectFlag.COLLECT_NONE || childScope === CollectFlag.COLLECT_NONE || $scope !== CollectFlag.COLLECT_ALL && $scope !== childScope) return;\n childResultsRaw[key] = results;\n childResultsKeys.value.push(key);\n }\n\n instance.__vuelidateInjectInstances = [].concat(instance.__vuelidateInjectInstances || [], injectChildResultsIntoParent);\n\n function removeChildResultsFromParent(key) {\n childResultsKeys.value = childResultsKeys.value.filter(childKey => childKey !== key);\n delete childResultsRaw[key];\n }\n\n instance.__vuelidateRemoveInstances = [].concat(instance.__vuelidateRemoveInstances || [], removeChildResultsFromParent);\n const sendValidationResultsToParent = inject(VuelidateInjectChildResults, []);\n provide(VuelidateInjectChildResults, instance.__vuelidateInjectInstances);\n const removeValidationResultsFromParent = inject(VuelidateRemoveChildResults, []);\n provide(VuelidateRemoveChildResults, instance.__vuelidateRemoveInstances);\n return {\n childResults,\n sendValidationResultsToParent,\n removeValidationResultsFromParent\n };\n}\n\nfunction ComputedProxyFactory(target) {\n return new Proxy(target, {\n get(target, prop) {\n return typeof target[prop] === 'object' ? ComputedProxyFactory(target[prop]) : computed(() => target[prop]);\n }\n\n });\n}\n\nlet uid = 0;\nfunction useVuelidate(validations, state) {\n var _getCurrentInstance;\n\n let globalConfig = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n if (arguments.length === 1) {\n globalConfig = validations;\n validations = undefined;\n state = undefined;\n }\n\n let {\n $registerAs,\n $scope = CollectFlag.COLLECT_ALL,\n $stopPropagation,\n $externalResults,\n currentVueInstance\n } = globalConfig;\n const instance = currentVueInstance || ((_getCurrentInstance = getCurrentInstance()) === null || _getCurrentInstance === void 0 ? void 0 : _getCurrentInstance.proxy);\n const componentOptions = instance ? instance.$options : {};\n\n if (!$registerAs) {\n uid += 1;\n $registerAs = `_vuelidate_${uid}`;\n }\n\n const validationResults = ref({});\n const resultsCache = new ResultsStorage();\n const {\n childResults,\n sendValidationResultsToParent,\n removeValidationResultsFromParent\n } = instance ? nestedValidations({\n $scope,\n instance\n }) : {\n childResults: ref({})\n };\n\n if (!validations && componentOptions.validations) {\n const rules = componentOptions.validations;\n state = ref({});\n onBeforeMount(() => {\n state.value = instance;\n watch(() => isFunction(rules) ? rules.call(state.value, new ComputedProxyFactory(state.value)) : rules, validations => {\n validationResults.value = setValidations({\n validations,\n state,\n childResults,\n resultsCache,\n globalConfig,\n instance,\n externalResults: $externalResults || instance.vuelidateExternalResults\n });\n }, {\n immediate: true\n });\n });\n globalConfig = componentOptions.validationsConfig || globalConfig;\n } else {\n const validationsWatchTarget = isRef(validations) || isProxy(validations) ? validations : reactive(validations || {});\n watch(validationsWatchTarget, newValidationRules => {\n validationResults.value = setValidations({\n validations: newValidationRules,\n state,\n childResults,\n resultsCache,\n globalConfig,\n instance: instance !== null && instance !== void 0 ? instance : {},\n externalResults: $externalResults\n });\n }, {\n immediate: true\n });\n }\n\n if (instance) {\n sendValidationResultsToParent.forEach(f => f(validationResults, {\n $registerAs,\n $scope,\n $stopPropagation\n }));\n onBeforeUnmount(() => removeValidationResultsFromParent.forEach(f => f($registerAs)));\n }\n\n return computed(() => {\n return _objectSpread2(_objectSpread2({}, unref(validationResults.value)), childResults.value);\n });\n}\n\nexport { CollectFlag, useVuelidate as default, useVuelidate };\n","import { unref } from 'vue-demi';\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction isFunction(val) {\n return typeof val === 'function';\n}\nfunction isObject(o) {\n return o !== null && typeof o === 'object' && !Array.isArray(o);\n}\nfunction normalizeValidatorObject(validator) {\n return isFunction(validator.$validator) ? _objectSpread2({}, validator) : {\n $validator: validator\n };\n}\nfunction isPromise(object) {\n return isObject(object) && isFunction(object.then);\n}\nfunction unwrapValidatorResponse(result) {\n if (typeof result === 'object') return result.$valid;\n return result;\n}\nfunction unwrapNormalizedValidator(validator) {\n return validator.$validator || validator;\n}\n\nfunction withParams($params, $validator) {\n if (!isObject($params)) throw new Error(`[@vuelidate/validators]: First parameter to \"withParams\" should be an object, provided ${typeof $params}`);\n if (!isObject($validator) && !isFunction($validator)) throw new Error(`[@vuelidate/validators]: Validator must be a function or object with $validator parameter`);\n const validatorObj = normalizeValidatorObject($validator);\n validatorObj.$params = _objectSpread2(_objectSpread2({}, validatorObj.$params || {}), $params);\n return validatorObj;\n}\n\nfunction withMessage($message, $validator) {\n if (!isFunction($message) && typeof unref($message) !== 'string') throw new Error(`[@vuelidate/validators]: First parameter to \"withMessage\" should be string or a function returning a string, provided ${typeof $message}`);\n if (!isObject($validator) && !isFunction($validator)) throw new Error(`[@vuelidate/validators]: Validator must be a function or object with $validator parameter`);\n const validatorObj = normalizeValidatorObject($validator);\n validatorObj.$message = $message;\n return validatorObj;\n}\n\nfunction withAsync($validator) {\n let $watchTargets = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const validatorObj = normalizeValidatorObject($validator);\n return _objectSpread2(_objectSpread2({}, validatorObj), {}, {\n $async: true,\n $watchTargets\n });\n}\n\nfunction forEach(validators) {\n return {\n $validator(collection) {\n for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n others[_key - 1] = arguments[_key];\n }\n\n return unref(collection).reduce((previous, collectionItem, index) => {\n const collectionEntryResult = Object.entries(collectionItem).reduce((all, _ref) => {\n let [property, $model] = _ref;\n const innerValidators = validators[property] || {};\n const propertyResult = Object.entries(innerValidators).reduce((all, _ref2) => {\n let [validatorName, currentValidator] = _ref2;\n const validatorFunction = unwrapNormalizedValidator(currentValidator);\n const $response = validatorFunction.call(this, $model, collectionItem, index, ...others);\n const $valid = unwrapValidatorResponse($response);\n all.$data[validatorName] = $response;\n all.$data.$invalid = !$valid || !!all.$data.$invalid;\n all.$data.$error = all.$data.$invalid;\n\n if (!$valid) {\n let $message = currentValidator.$message || '';\n const $params = currentValidator.$params || {};\n\n if (typeof $message === 'function') {\n $message = $message({\n $pending: false,\n $invalid: !$valid,\n $params,\n $model,\n $response\n });\n }\n\n all.$errors.push({\n $property: property,\n $message,\n $params,\n $response,\n $model,\n $pending: false,\n $validator: validatorName\n });\n }\n\n return {\n $valid: all.$valid && $valid,\n $data: all.$data,\n $errors: all.$errors\n };\n }, {\n $valid: true,\n $data: {},\n $errors: []\n });\n all.$data[property] = propertyResult.$data;\n all.$errors[property] = propertyResult.$errors;\n return {\n $valid: all.$valid && propertyResult.$valid,\n $data: all.$data,\n $errors: all.$errors\n };\n }, {\n $valid: true,\n $data: {},\n $errors: {}\n });\n return {\n $valid: previous.$valid && collectionEntryResult.$valid,\n $data: previous.$data.concat(collectionEntryResult.$data),\n $errors: previous.$errors.concat(collectionEntryResult.$errors)\n };\n }, {\n $valid: true,\n $data: [],\n $errors: []\n });\n },\n\n $message: _ref3 => {\n let {\n $response\n } = _ref3;\n return $response ? $response.$errors.map(context => {\n return Object.values(context).map(errors => errors.map(error => error.$message)).reduce((a, b) => a.concat(b), []);\n }) : [];\n }\n };\n}\n\nconst req = value => {\n value = unref(value);\n if (Array.isArray(value)) return !!value.length;\n\n if (value === undefined || value === null) {\n return false;\n }\n\n if (value === false) {\n return true;\n }\n\n if (value instanceof Date) {\n return !isNaN(value.getTime());\n }\n\n if (typeof value === 'object') {\n for (let _ in value) return true;\n\n return false;\n }\n\n return !!String(value).length;\n};\nconst len = value => {\n value = unref(value);\n if (Array.isArray(value)) return value.length;\n\n if (typeof value === 'object') {\n return Object.keys(value).length;\n }\n\n return String(value).length;\n};\nfunction regex() {\n for (var _len = arguments.length, expr = new Array(_len), _key = 0; _key < _len; _key++) {\n expr[_key] = arguments[_key];\n }\n\n return value => {\n value = unref(value);\n return !req(value) || expr.every(reg => {\n reg.lastIndex = 0;\n return reg.test(value);\n });\n };\n}\n\nvar common = /*#__PURE__*/Object.freeze({\n __proto__: null,\n forEach: forEach,\n len: len,\n normalizeValidatorObject: normalizeValidatorObject,\n regex: regex,\n req: req,\n unwrap: unref,\n unwrapNormalizedValidator: unwrapNormalizedValidator,\n unwrapValidatorResponse: unwrapValidatorResponse,\n withAsync: withAsync,\n withMessage: withMessage,\n withParams: withParams\n});\n\nvar alpha$1 = regex(/^[a-zA-Z]*$/);\n\nvar alpha = {\n $validator: alpha$1,\n $message: 'The value is not alphabetical',\n $params: {\n type: 'alpha'\n }\n};\n\nvar alphaNum$1 = regex(/^[a-zA-Z0-9]*$/);\n\nvar alphaNum = {\n $validator: alphaNum$1,\n $message: 'The value must be alpha-numeric',\n $params: {\n type: 'alphaNum'\n }\n};\n\nvar numeric$1 = regex(/^\\d*(\\.\\d+)?$/);\n\nvar numeric = {\n $validator: numeric$1,\n $message: 'Value must be numeric',\n $params: {\n type: 'numeric'\n }\n};\n\nfunction between$1 (min, max) {\n return value => !req(value) || (!/\\s/.test(value) || value instanceof Date) && +unref(min) <= +value && +unref(max) >= +value;\n}\n\nfunction between (min, max) {\n return {\n $validator: between$1(min, max),\n $message: _ref => {\n let {\n $params\n } = _ref;\n return `The value must be between ${$params.min} and ${$params.max}`;\n },\n $params: {\n min,\n max,\n type: 'between'\n }\n };\n}\n\nconst emailRegex = /^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$/i;\nvar email$1 = regex(emailRegex);\n\nvar email = {\n $validator: email$1,\n $message: 'Value is not a valid email address',\n $params: {\n type: 'email'\n }\n};\n\nfunction ipAddress$1 (value) {\n if (!req(value)) {\n return true;\n }\n\n if (typeof value !== 'string') {\n return false;\n }\n\n const nibbles = value.split('.');\n return nibbles.length === 4 && nibbles.every(nibbleValid);\n}\n\nconst nibbleValid = nibble => {\n if (nibble.length > 3 || nibble.length === 0) {\n return false;\n }\n\n if (nibble[0] === '0' && nibble !== '0') {\n return false;\n }\n\n if (!nibble.match(/^\\d+$/)) {\n return false;\n }\n\n const numeric = +nibble | 0;\n return numeric >= 0 && numeric <= 255;\n};\n\nvar ipAddress = {\n $validator: ipAddress$1,\n $message: 'The value is not a valid IP address',\n $params: {\n type: 'ipAddress'\n }\n};\n\nfunction macAddress$1 () {\n let separator = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ':';\n return value => {\n separator = unref(separator);\n\n if (!req(value)) {\n return true;\n }\n\n if (typeof value !== 'string') {\n return false;\n }\n\n const parts = typeof separator === 'string' && separator !== '' ? value.split(separator) : value.length === 12 || value.length === 16 ? value.match(/.{2}/g) : null;\n return parts !== null && (parts.length === 6 || parts.length === 8) && parts.every(hexValid);\n };\n}\n\nconst hexValid = hex => hex.toLowerCase().match(/^[0-9a-f]{2}$/);\n\nfunction macAddress (separator) {\n return {\n $validator: macAddress$1(separator),\n $message: 'The value is not a valid MAC Address',\n $params: {\n type: 'macAddress'\n }\n };\n}\n\nfunction maxLength$1 (length) {\n return value => !req(value) || len(value) <= unref(length);\n}\n\nfunction maxLength (max) {\n return {\n $validator: maxLength$1(max),\n $message: _ref => {\n let {\n $params\n } = _ref;\n return `The maximum length allowed is ${$params.max}`;\n },\n $params: {\n max,\n type: 'maxLength'\n }\n };\n}\n\nfunction minLength$1 (length) {\n return value => !req(value) || len(value) >= unref(length);\n}\n\nfunction minLength (min) {\n return {\n $validator: minLength$1(min),\n $message: _ref => {\n let {\n $params\n } = _ref;\n return `This field should be at least ${$params.min} characters long`;\n },\n $params: {\n min,\n type: 'minLength'\n }\n };\n}\n\nfunction required$1 (value) {\n if (typeof value === 'string') {\n value = value.trim();\n }\n\n return req(value);\n}\n\nvar required = {\n $validator: required$1,\n $message: 'Value is required',\n $params: {\n type: 'required'\n }\n};\n\nconst validate$1 = (prop, val) => prop ? req(typeof val === 'string' ? val.trim() : val) : true;\n\nfunction requiredIf$1(propOrFunction) {\n return function (value, parentVM) {\n if (typeof propOrFunction !== 'function') {\n return validate$1(unref(propOrFunction), value);\n }\n\n const result = propOrFunction.call(this, value, parentVM);\n return validate$1(result, value);\n };\n}\n\nfunction requiredIf (prop) {\n return {\n $validator: requiredIf$1(prop),\n $message: 'The value is required',\n $params: {\n type: 'requiredIf',\n prop\n }\n };\n}\n\nconst validate = (prop, val) => !prop ? req(typeof val === 'string' ? val.trim() : val) : true;\n\nfunction requiredUnless$1(propOrFunction) {\n return function (value, parentVM) {\n if (typeof propOrFunction !== 'function') {\n return validate(unref(propOrFunction), value);\n }\n\n const result = propOrFunction.call(this, value, parentVM);\n return validate(result, value);\n };\n}\n\nfunction requiredUnless (prop) {\n return {\n $validator: requiredUnless$1(prop),\n $message: 'The value is required',\n $params: {\n type: 'requiredUnless',\n prop\n }\n };\n}\n\nfunction sameAs$1 (equalTo) {\n return value => unref(value) === unref(equalTo);\n}\n\nfunction sameAs (equalTo) {\n let otherName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'other';\n return {\n $validator: sameAs$1(equalTo),\n $message: _ref => {\n return `The value must be equal to the ${otherName} value`;\n },\n $params: {\n equalTo,\n otherName,\n type: 'sameAs'\n }\n };\n}\n\nconst urlRegex = /^(?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z0-9\\u00a1-\\uffff][a-z0-9\\u00a1-\\uffff_-]{0,62})?[a-z0-9\\u00a1-\\uffff]\\.)+(?:[a-z\\u00a1-\\uffff]{2,}\\.?))(?::\\d{2,5})?(?:[/?#]\\S*)?$/i;\nvar url$1 = regex(urlRegex);\n\nvar url = {\n $validator: url$1,\n $message: 'The value is not a valid URL address',\n $params: {\n type: 'url'\n }\n};\n\nfunction syncOr(validators) {\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return validators.reduce((valid, fn) => {\n if (unwrapValidatorResponse(valid)) return valid;\n return unwrapNormalizedValidator(fn).apply(this, args);\n }, false);\n };\n}\n\nfunction asyncOr(validators) {\n return function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return validators.reduce(async (valid, fn) => {\n const r = await valid;\n if (unwrapValidatorResponse(r)) return r;\n return unwrapNormalizedValidator(fn).apply(this, args);\n }, Promise.resolve(false));\n };\n}\n\nfunction or$1() {\n for (var _len3 = arguments.length, validators = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n validators[_key3] = arguments[_key3];\n }\n\n const $async = validators.some(v => v.$async);\n const $watchTargets = validators.reduce((all, v) => {\n if (!v.$watchTargets) return all;\n return all.concat(v.$watchTargets);\n }, []);\n\n let $validator = () => false;\n\n if (validators.length) $validator = $async ? asyncOr(validators) : syncOr(validators);\n return {\n $async,\n $validator,\n $watchTargets\n };\n}\n\nfunction or () {\n return withParams({\n type: 'or'\n }, withMessage('The value does not match any of the provided validators', or$1(...arguments)));\n}\n\nfunction syncAnd(validators) {\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return validators.reduce((valid, fn) => {\n if (!unwrapValidatorResponse(valid)) return valid;\n return unwrapNormalizedValidator(fn).apply(this, args);\n }, true);\n };\n}\n\nfunction asyncAnd(validators) {\n return function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return validators.reduce(async (valid, fn) => {\n const r = await valid;\n if (!unwrapValidatorResponse(r)) return r;\n return unwrapNormalizedValidator(fn).apply(this, args);\n }, Promise.resolve(true));\n };\n}\n\nfunction and$1() {\n for (var _len3 = arguments.length, validators = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n validators[_key3] = arguments[_key3];\n }\n\n const $async = validators.some(v => v.$async);\n const $watchTargets = validators.reduce((all, v) => {\n if (!v.$watchTargets) return all;\n return all.concat(v.$watchTargets);\n }, []);\n\n let $validator = () => false;\n\n if (validators.length) $validator = $async ? asyncAnd(validators) : syncAnd(validators);\n return {\n $async,\n $validator,\n $watchTargets\n };\n}\n\nfunction and () {\n return withParams({\n type: 'and'\n }, withMessage('The value does not match all of the provided validators', and$1(...arguments)));\n}\n\nfunction not$1 (validator) {\n return function (value, vm) {\n if (!req(value)) return true;\n const response = unwrapNormalizedValidator(validator).call(this, value, vm);\n if (!isPromise(response)) return !unwrapValidatorResponse(response);\n return response.then(r => !unwrapValidatorResponse(r));\n };\n}\n\nfunction not (validator) {\n return {\n $validator: not$1(validator),\n $message: `The value does not match the provided validator`,\n $params: {\n type: 'not'\n }\n };\n}\n\nfunction minValue$1 (min) {\n return value => !req(value) || (!/\\s/.test(value) || value instanceof Date) && +value >= +unref(min);\n}\n\nfunction minValue (min) {\n return {\n $validator: minValue$1(min),\n $message: _ref => {\n let {\n $params\n } = _ref;\n return `The minimum value allowed is ${$params.min}`;\n },\n $params: {\n min,\n type: 'minValue'\n }\n };\n}\n\nfunction maxValue$1 (max) {\n return value => !req(value) || (!/\\s/.test(value) || value instanceof Date) && +value <= +unref(max);\n}\n\nvar maxValue = (max => ({\n $validator: maxValue$1(max),\n $message: _ref => {\n let {\n $params\n } = _ref;\n return `The maximum value allowed is ${$params.max}`;\n },\n $params: {\n max,\n type: 'maxValue'\n }\n}));\n\nvar integer$1 = regex(/(^[0-9]*$)|(^-[0-9]+$)/);\n\nvar integer = {\n $validator: integer$1,\n $message: 'Value is not an integer',\n $params: {\n type: 'integer'\n }\n};\n\nvar decimal$1 = regex(/^[-]?\\d*(\\.\\d+)?$/);\n\nvar decimal = {\n $validator: decimal$1,\n $message: 'Value must be decimal',\n $params: {\n type: 'decimal'\n }\n};\n\nfunction createI18nMessage(_ref) {\n let {\n t,\n messagePath = _ref2 => {\n let {\n $validator\n } = _ref2;\n return `validations.${$validator}`;\n },\n messageParams = params => params\n } = _ref;\n return function withI18nMessage(validator) {\n let {\n withArguments = false,\n messagePath: localMessagePath = messagePath,\n messageParams: localMessageParams = messageParams\n } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n function message(props) {\n return t(localMessagePath(props), localMessageParams(_objectSpread2({\n model: props.$model,\n property: props.$property,\n pending: props.$pending,\n invalid: props.$invalid,\n response: props.$response,\n validator: props.$validator,\n propertyPath: props.$propertyPath\n }, props.$params)));\n }\n\n if (withArguments && typeof validator === 'function') {\n return function () {\n return withMessage(message, validator(...arguments));\n };\n }\n\n return withMessage(message, validator);\n };\n}\n\nexport { alpha, alphaNum, and, between, createI18nMessage, decimal, email, common as helpers, integer, ipAddress, macAddress, maxLength, maxValue, minLength, minValue, not, numeric, or, required, requiredIf, requiredUnless, sameAs, url };\n","\n\n\n","import { useThFetch } from '@/composables/useThFetch'\nimport { useConfigurationStore } from '@/stores/useConfigurationStore'\nimport { TimeSlotNotAvailableError } from './errors/TimeSlotNotAvailableError'\nimport type { AppointmentForm } from '../types/AppointmentForm'\nimport type { Appointment } from '@/types'\nimport type { TillhubResponse } from '@/types/TillhubResponse'\nimport { useSentry } from '@/plugins/sentry'\nimport { toValue, type MaybeRefOrGetter } from 'vue'\n\nexport function useCreateAppointmentMutation(\n captchaToken: MaybeRefOrGetter,\n getAppointment: MaybeRefOrGetter\n) {\n const { organization } = useConfigurationStore()\n const sentry = useSentry()\n\n const getUrl = () => {\n return `/v0/reservations/appointments/public/${organization}?token=${toValue(captchaToken)}`\n }\n\n return useThFetch(getUrl, {\n immediate: false,\n afterFetch(ctx) {\n const data = ctx.data as TillhubResponse\n\n return {\n ...ctx,\n data: data.results[0]\n }\n },\n onFetchError(ctx) {\n if (!ctx.response) {\n return ctx\n }\n\n const data = ctx.data as { msg?: string }\n\n let error: Error = ctx.error\n\n if (data.msg === 'Time slot is not available') {\n error = new TimeSlotNotAvailableError()\n } else if (ctx.response.status !== 500) {\n sentry.captureException(new Error('Unexpected exception while creating an appointment'), {\n extra: {\n error: JSON.stringify(data)\n }\n })\n }\n\n return {\n ...ctx,\n error\n }\n }\n })\n .post(() => {\n const appointment = toValue(getAppointment)\n const { customer } = appointment\n\n return {\n branchId: appointment.branchId,\n start: appointment.start,\n customer: {\n firstName: customer.firstName,\n lastName: customer.lastName,\n email: customer.email,\n phoneNumber: `${customer.phoneCode}${customer.phoneNumber}`\n },\n notes: customer.comment,\n reminder: appointment.reminder,\n lineItems: appointment.lineItems.map((lineItem) => ({\n serviceName: lineItem.service.name,\n categoryName: lineItem.categoryName,\n serviceId: lineItem.service.id,\n staffId: lineItem.staff?.id,\n duration: lineItem.service.duration\n }))\n }\n })\n .json()\n}\n","\n\n","export class InvalidRecaptchaError extends Error {\n constructor(message = 'Invalid recaptcha.') {\n super(message)\n }\n}\n","import { useSentry } from '@/plugins/sentry'\nimport { InvalidRecaptchaError } from './InvalidRecaptchaError'\nimport { Env } from '@/env'\n\ninterface Recaptcha {\n ready(callback: () => Promise): void\n execute(sitekey: string, options: Record): Promise\n}\n\ndeclare global {\n interface Window {\n grecaptcha: Recaptcha\n }\n}\n\nexport async function getRecaptchaToken(action: 'create_appointment') {\n const sentry = useSentry()\n\n return new Promise((resolve, reject) => {\n window.grecaptcha.ready(async () => {\n try {\n const token = await window.grecaptcha.execute(Env.VITE_GRECAPTCHA_SITE_KEY, {\n action\n })\n\n resolve(token)\n } catch (error) {\n // This type of recaptcha that we use does not require user input, so we care about all\n // errors that occurred here. This can be further optimized by reporting only specific errors, however\n // they throw a wide range of them and we have to check each of them by message, as there are no codes\n sentry.captureException(error)\n reject(new InvalidRecaptchaError((error as Error).message))\n }\n })\n })\n}\n","\n\n\n","\n\n\n","\n\n\n"],"names":["localSteps","computed","props","step","index","inputRef","ref","__expose","_a","_sfc_render","_ctx","_cache","_openBlock","_createElementBlock","_hoisted_1","computedModelValue","value","emit","focus","errorsToShow","errors","error","isChecked","onChange","event","checked","modelValue","nextValue","useServiceCategoriesQuery","params","options","store","useConfigurationStore","useThFetch","toValue","onSelect","useServicePriceQuery","productId","branchId","ctx","results","useServicePricesStore","defineStore","cacheKey","promise","resolve","data","isSelected","lineItem","price","n","t","useI18n","formatDuration","useDurationFormatter","servicePricesStore","duration","priceLoading","priceLoadingError","watch","priceOrError","expandDetails","notify","lineItemsModelValue","useModel","categoryHasSelectedServices","service","isExpanded","searchInput","query","isFetching","category","reactive","filteredCategories","q","matchingServices","clearSearchQuery","lineItemsWithStaffOptions","staffOptions","staff","getStaffName","syncModelValue","configStore","allowEmployeeSelection","timeSelectorState","isLoading","isError","branchStaff","staffMember","isStaffMemberAssignedToBranch","address","getBranchAddress","googleMapsAddressUrl","formatURL","url","serializedQuery","entries","useBranchesQuery","limit","isFetchAbortError","useNotification","debouncedQuery","useDebounce","branches","localSelectedBranchId","branchByIdQuery","useBranchQuery","branch","emailRegex","isEmail","ownKeys","object","enumerableOnly","keys","symbols","sym","_objectSpread2","target","i","source","key","_defineProperty","obj","unwrapObj","ignoreKeys","o","k","unref","isFunction","val","isProxy","isReactive","isReadonly","get","stringPath","def","current","path","gatherBooleanGroupProperties","group","nestedResults","property","gatherArrayGroupProperties","all","fetchedProperty","callRule","rule","siblingState","instance","normalizeValidatorResponse","result","createAsyncResult","model","$pending","$dirty","_ref","$response","$lazy","$rewardEarly","watchTargets","$lastInvalidState","$lastCommittedOn","$invalid","$pendingCounter","$unwatch","ruleResult","err","createSyncResult","_ref2","returnValue","createValidatorResult","config","validatorName","propertyKey","propertyPath","$params","message","sortValidations","validationsRaw","validations","validationKeys","rules","nestedValidators","validationGroups","v","ROOT_PATH","createValidationResults","resultsCache","externalResults","ruleKeys","cachedResult","ruleKey","stringError","r","res","collectNestedValidationResults","nestedState","nestedExternalResults","nestedValidationKeys","nestedKey","setValidations","createMetaFields","childResults","allResults","allRes","$silentErrors","modelErrors","nestedErrors","$errors","$anyDirty","$error","$touch","$commit","$reset","nr","state","parentKey","globalConfig","mergedConfig","s","cachedExternalResults","$validationGroups","$model","external","isRef","$validate","nextTick","unwatch","$getResultsForChild","$clearExternalResults","ResultsStorage","storedRules","storedRulesKeys","newRulesKeys","paramKey","storedRuleResultPair","isValidCache","CollectFlag","VuelidateInjectChildResults","VuelidateRemoveChildResults","nestedValidations","$scope","childResultsRaw","childResultsKeys","injectChildResultsIntoParent","childScope","$stopPropagation","removeChildResultsFromParent","childKey","sendValidationResultsToParent","inject","provide","removeValidationResultsFromParent","ComputedProxyFactory","prop","uid","useVuelidate","_getCurrentInstance","$registerAs","$externalResults","currentVueInstance","getCurrentInstance","componentOptions","validationResults","onBeforeMount","validationsWatchTarget","newValidationRules","f","onBeforeUnmount","isObject","normalizeValidatorObject","validator","unwrapValidatorResponse","unwrapNormalizedValidator","withParams","$validator","validatorObj","withMessage","$message","withAsync","$watchTargets","forEach","validators","collection","_len","others","_key","previous","collectionItem","collectionEntryResult","innerValidators","propertyResult","currentValidator","$valid","_ref3","context","b","req","_","len","regex","expr","reg","common","numeric$1","numeric","maxLength$1","length","maxLength","max","required$1","required","urlRegex","form","v$","helpers","phoneNumberCodes","CountryCallingCodes","a","code","useCreateAppointmentMutation","captchaToken","getAppointment","organization","sentry","useSentry","TimeSlotNotAvailableError","appointment","customer","tillhubCompanyName","merchantTermsOfServiceURL","privacyPolicyLink","PRIVACY_POLICY_URL","extendedTermsOfServiceHTML","tillhubTermsLink","TERMS_AND_CONDITIONS_URL","merchantTermsLink","termsOfServiceHTML","termsAndConditionsLink","InvalidRecaptchaError","getRecaptchaToken","action","reject","token","Env","configurationStore","merchantTimezone","remindersEnabled","_b","requestRedminderText","leadTime","recaptchaToken","createAppointment","timeSlotNotAvailable","onSubmit","appointmentDurationFormatted","getAppointmentDuration","appointmentTotal","total","appointmentTime","formatAppointmentDateTime","branchAddress","lineItems","useAddBodyMobilePaddingBottom","ampli","useAmpli","steps","ChooseBranchForm","ChooseServicesForm","ChooseTimeForm","ContactForm","BookingForm","branchesQuery","staffQuery","useStaffsQuery","branchQuery","onMounted","resourceQueries","useQueryBatch","updateAppointmentBranch","goToStep","activeFormIndex","activeForm","activeStepId","summaryCardErrorMessage","disableNextStep","id","goToNextStep","serviceLimit","goToPrevious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