{"version":3,"file":"login.obs.js","sources":["../../src/Security/types.partial.ts","../../src/Security/breakpointObserver.partial.obs","../../src/Security/Login/htmlRenderer.partial.obs","../../src/Security/Login/credentialLogin.partial.obs","../../src/Security/Login/divider.partial.obs","../../../Rock.JavaScript.Obsidian/node_modules/style-inject/dist/style-inject.es.js","../../src/Security/Login/externalLogin.partial.obs","../../src/Security/Login/loginMethodPicker.partial.obs","../../src/Security/Login/passwordlessLoginStartStep.partial.obs","../../src/Security/Login/passwordlessLoginVerifyStep.partial.obs","../../src/Security/Login/passwordlessLogin.partial.obs","../../src/Security/login.obs"],"sourcesContent":["// <copyright>\r\n// Copyright by the Spark Development Network\r\n//\r\n// Licensed under the Rock Community License (the \"License\");\r\n// you may not use this file except in compliance with the License.\r\n// You may obtain a copy of the License at\r\n//\r\n// http://www.rockrms.com/license\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an \"AS IS\" BASIS,\r\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n// See the License for the specific language governing permissions and\r\n// limitations under the License.\r\n// </copyright>\r\n//\r\n\r\nimport { InjectionKey, Ref, inject, provide } from \"vue\";\r\n\r\nexport type CodeBoxCharacterController = {\r\n focus(): void;\r\n clear(): void;\r\n boxIndex: number;\r\n};\r\n\r\nexport type Breakpoint = \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"unknown\";\r\n\r\n/**\r\n * An injection key to provide a reactive bootstrap breakpoint to descendent components.\r\n */\r\nconst bootstrapBreakpointInjectionKey: InjectionKey<Ref<Breakpoint>> = Symbol(\"bootstrap-breakpoint\");\r\n\r\n/**\r\n * Provides the reactive breakpoint that can be used by child components.\r\n */\r\nexport function provideBreakpoint(breakpoint: Ref<Breakpoint>): void {\r\n provide(bootstrapBreakpointInjectionKey, breakpoint);\r\n}\r\n\r\n/**\r\n * Gets the breakpoint that can be used to provide responsive behavior.\r\n */\r\nexport function useBreakpoint(): Ref<Breakpoint> {\r\n const breakpoint = inject(bootstrapBreakpointInjectionKey);\r\n\r\n if (!breakpoint) {\r\n throw \"provideBreakpoint must be invoked before useBreakpoint can be used. If useBreakpoint is in a component where <BreakpointObserver> is used in the template, then use the @breakpoint output binding to get the breakpoint.\";\r\n }\r\n\r\n return breakpoint;\r\n}","<!-- Copyright by the Spark Development Network; Licensed under the Rock Community License -->\r\n<template>\r\n <slot></slot>\r\n\r\n <div ref=\"breakpointHelperDiv\"\r\n style=\"visibility: collapse !important;\"\r\n :class=\"classes\"></div>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\n import { computed, onBeforeUnmount, onMounted, ref } from \"vue\";\r\n import { Breakpoint, provideBreakpoint } from \"./types.partial\";\r\n\r\n defineProps();\r\n\r\n const emit = defineEmits<{\r\n (e: \"breakpoint\", value: Breakpoint): void\r\n }>();\r\n\r\n const breakpointDisplays: Partial<Record<Breakpoint, string>> = {\r\n \"xs\": \"none\",\r\n \"sm\": \"inline\",\r\n \"md\": \"inline-block\",\r\n \"lg\": \"block\",\r\n \"xl\": \"table\"\r\n };\r\n\r\n const displayBreakpoints: Record<string, Breakpoint> = Object.entries(breakpointDisplays).reduce((swapped, [key, value]) => ({\r\n ...swapped,\r\n [value]: key\r\n }), {});\r\n\r\n const classes: string[] = Object.keys(breakpointDisplays)\r\n .map((breakpoint: string) => breakpoint as Breakpoint)\r\n .map((breakpoint: Breakpoint) => breakpoint === \"xs\" ? `d-${breakpointDisplays[breakpoint]}` : `d-${breakpoint}-${breakpointDisplays[breakpoint]}`);\r\n\r\n //#region Values\r\n\r\n /**\r\n * This div helps determine the responsive breakpoint based on CSS rules.\r\n *\r\n * The element has `class=\"d-none d-sm-inline d-md-inline-block d-lg-block d-xl-table\"`\r\n * so whenever the screen is a specific width, the div's `display` property will be updated.\r\n * We can efficiently re-check the breakpoint by listening to the window \"resize\" event\r\n * and examining the current `display` property.\r\n *\r\n * Lastly, we need `visibility: collapse !important` in the div's inline style\r\n * because we want to keep the element invisible while the `display` is being updated.\r\n */\r\n const breakpointHelperDiv = ref<HTMLElement | undefined>();\r\n const breakpoint = ref<Breakpoint>(\"unknown\");\r\n const internalBreakpoint = computed<Breakpoint>({\r\n get() {\r\n return breakpoint.value;\r\n },\r\n set(newValue: Breakpoint) {\r\n breakpoint.value = newValue;\r\n\r\n // Emit so client code can use output binding\r\n // if unable to use the provide/inject pattern.\r\n emit(\"breakpoint\", breakpoint.value);\r\n }\r\n });\r\n\r\n //#endregion\r\n\r\n //#region Functions\r\n\r\n /** Checks if the breakpoint changed */\r\n function checkBreakpoint(): void {\r\n // Skip if the div element is not set (this could happen if this component isn't mounted).\r\n if (!breakpointHelperDiv.value) {\r\n return;\r\n }\r\n\r\n // Get the breakpoint that is mapped to the `display` style property.\r\n const display = getComputedStyle(breakpointHelperDiv.value).display;\r\n const newBreakpoint: Breakpoint = displayBreakpoints[display] ?? \"unknown\";\r\n internalBreakpoint.value = newBreakpoint;\r\n }\r\n\r\n //#endregion\r\n\r\n //#region Event Handlers\r\n\r\n /** Event handler for the window \"resize\" event. */\r\n function onWindowResized(): void {\r\n checkBreakpoint();\r\n }\r\n\r\n //#endregion\r\n\r\n // Provide the reactive breakpoint to child components.\r\n provideBreakpoint(breakpoint);\r\n\r\n onMounted(() => {\r\n // Check the breakpoint initially and wire up the window \"resize\" event handler.\r\n checkBreakpoint();\r\n addEventListener(\"resize\", onWindowResized);\r\n });\r\n\r\n onBeforeUnmount(() => {\r\n // Remove the window \"resize\" event handler when this component is unmounted.\r\n removeEventListener(\"resize\", onWindowResized);\r\n });\r\n</script>","<!-- Copyright by the Spark Development Network; Licensed under the Rock Community License -->\r\n<template>\r\n <div :id=\"id\" style=\"display: none;\">\r\n <!-- This will be removed once the component is mounted. -->\r\n </div>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\n import { onMounted, PropType, ref, watch } from \"vue\";\r\n import { newGuid } from \"@Obsidian/Utility/guid\";\r\n\r\n const props = defineProps({\r\n html: {\r\n type: String as PropType<string>\r\n }\r\n });\r\n\r\n const id = newGuid();\r\n\r\n const mountPoint = ref<Node | undefined>();\r\n const mountedWrapper = ref<HTMLElement | undefined>();\r\n const mountedNodes = ref<Node[]>([]);\r\n\r\n /**\r\n * Mounts the supplied HTML onto the DOM between the mount points.\r\n *\r\n * If the supplied HTML has not been converted to HTMLElement objects\r\n * or if the mount points are not in the DOM, then this method does nothing.\r\n */\r\n function mountHtml(): void {\r\n const mountedWrapperElement = mountedWrapper.value;\r\n const mountPointElement = mountPoint.value;\r\n\r\n if (!mountedWrapperElement || !mountPointElement) {\r\n // Cannot mount because the mount point or element to be mounted are not defined yet.\r\n return;\r\n }\r\n\r\n const parentElement = mountPointElement.parentElement;\r\n\r\n if (!parentElement) {\r\n // Cannot mount because this component hasn't fully been mounted onto a parent element.\r\n return;\r\n }\r\n\r\n if (mountedWrapperElement.childNodes.length === 0) {\r\n // Nothing to mount.\r\n return;\r\n }\r\n\r\n mountedNodes.value = [];\r\n for (let i = 0; i < mountedWrapperElement.childNodes.length; i++) {\r\n // Insert the HTML before the mount point element.\r\n const childNode = mountedWrapperElement.childNodes[i];\r\n parentElement.insertBefore(childNode, mountPointElement);\r\n mountedNodes.value.push(childNode);\r\n }\r\n\r\n // Remove the comment node from the DOM (this will be added back when unmount is called);\r\n parentElement.removeChild(mountPointElement);\r\n }\r\n\r\n /**\r\n * Unmounts the supplied HTML from the DOM between the mount points.\r\n *\r\n * If the mount points are not in the DOM or if there is nothing to\r\n * unmount, then this method does nothing.\r\n */\r\n function unmountHtml(): void {\r\n const nodesToRemove = mountedNodes.value;\r\n\r\n if (nodesToRemove.length === 0) {\r\n // Nothing to unmount.\r\n return;\r\n }\r\n\r\n const mountPointElement = mountPoint.value;\r\n\r\n if (!mountPointElement) {\r\n // Nothing to unmount because the mount point is not defined yet.\r\n return;\r\n }\r\n\r\n // Clear mounted nodes.\r\n const parentElement = nodesToRemove[0].parentElement;\r\n if (!parentElement) {\r\n // Nothing to unmount because this component hasn't fully been mounted, itself.\r\n return;\r\n }\r\n\r\n // Add the comment before removing child nodes.\r\n parentElement.insertBefore(mountPointElement, nodesToRemove[0]);\r\n\r\n // Remove the child nodes.\r\n for (const node of nodesToRemove) {\r\n parentElement.removeChild(node);\r\n }\r\n }\r\n\r\n watch([() => props.html, mountPoint], ([newHtml, newMount], [oldHtml, _oldMount]) => {\r\n // If any changes are made, unmount the old HTML.\r\n unmountHtml();\r\n\r\n if (newHtml !== oldHtml) {\r\n // Reset the mounted wrapper if the HTML was changed.\r\n mountedWrapper.value = undefined;\r\n }\r\n\r\n // Create a new element to be mounted, if necessary.\r\n if (!mountedWrapper.value && newHtml) {\r\n const tempDiv = document.createElement(\"div\");\r\n tempDiv.innerHTML = newHtml;\r\n mountedWrapper.value = tempDiv;\r\n }\r\n\r\n if (newMount) {\r\n mountHtml();\r\n }\r\n });\r\n\r\n onMounted(() => {\r\n // Swap out the div placeholder for mount point comment node.\r\n // The comment node is what will be used to dynamically insert the HTML\r\n // into the correct location in the DOM without adding any rendered HTML elements.\r\n const div = document.getElementById(id);\r\n mountPoint.value = document.createComment(\"\");\r\n div?.parentElement?.insertBefore(mountPoint.value, div);\r\n div?.remove();\r\n });\r\n</script>","<!-- Copyright by the Spark Development Network; Licensed under the Rock Community License -->\r\n<template>\r\n <RockForm @submit=\"onCredentialLoginSubmitted\">\r\n <HtmlRenderer v-if=\"promptMessage\" :html=\"promptMessage\" />\r\n\r\n <TextBox v-model=\"username\"\r\n :disabled=\"disabled\"\r\n :isRequiredIndicatorHidden=\"true\"\r\n :label=\"usernameFieldLabel\"\r\n rules=\"required\"\r\n type=\"text\" />\r\n\r\n <TextBox v-model=\"password\"\r\n :disabled=\"disabled\"\r\n :isRequiredIndicatorHidden=\"true\"\r\n label=\"Password\"\r\n rules=\"required\"\r\n type=\"password\" />\r\n\r\n <InlineCheckBox v-if=\"!isRememberMeHidden\"\r\n v-model=\"rememberMe\"\r\n :disabled=\"disabled\"\r\n label=\"Keep me logged in\" />\r\n\r\n <RockButton autoDisable\r\n :btnType=\"BtnType.Primary\"\r\n :class=\"isMobile ? 'btn-block' : 'd-inline-block'\"\r\n :disabled=\"disabled\"\r\n type=\"submit\">Log In</RockButton>\r\n\r\n <RockButton v-if=\"!isNewAccountHidden\"\r\n autoDisable\r\n :btnType=\"BtnType.Action\"\r\n :class=\"isMobile ? 'btn-block mt-2' : 'ml-1 d-inline-block'\"\r\n :disabled=\"disabled\"\r\n type=\"button\"\r\n @click=\"onRegisterClicked\">{{ newAccountButtonText }}</RockButton>\r\n\r\n <RockButton autoDisable\r\n :btnType=\"BtnType.Link\"\r\n :class=\"isMobile ? 'btn-block mt-2' : 'ml-1 d-inline-block'\"\r\n :disabled=\"disabled\"\r\n type=\"button\"\r\n @click=\"onForgotAccountClicked\">Forgot Account</RockButton>\r\n </RockForm>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\n import { computed, PropType, ref } from \"vue\";\r\n import HtmlRenderer from \"./htmlRenderer.partial.obs\";\r\n import { useBreakpoint } from \"../types.partial\";\r\n import InlineCheckBox from \"@Obsidian/Controls/inlineCheckBox.obs\";\r\n import RockButton from \"@Obsidian/Controls/rockButton.obs\";\r\n import RockForm from \"@Obsidian/Controls/rockForm.obs\";\r\n import TextBox from \"@Obsidian/Controls/textBox.obs\";\r\n import { BtnType } from \"@Obsidian/Enums/Controls/btnType\";\r\n import { CredentialLoginRequestBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/credentialLoginRequestBag\";\r\n\r\n const props = defineProps({\r\n disabled: {\r\n type: Boolean as PropType<boolean>,\r\n required: false,\r\n default: false\r\n },\r\n isMobileForced: {\r\n type: Boolean as PropType<boolean>,\r\n required: false,\r\n default: false\r\n },\r\n isNewAccountHidden: {\r\n type: Boolean as PropType<boolean>,\r\n required: false,\r\n default: false\r\n },\r\n isRememberMeHidden: {\r\n type: Boolean as PropType<boolean>,\r\n required: false,\r\n default: false\r\n },\r\n newAccountButtonText: {\r\n type: String as PropType<string | null | undefined>,\r\n required: false\r\n },\r\n promptMessage: {\r\n type: String as PropType<string | null | undefined>,\r\n required: false\r\n },\r\n usernameFieldLabel: {\r\n type: String as PropType<string | null | undefined>,\r\n required: false\r\n }\r\n });\r\n\r\n const emit = defineEmits<{\r\n (e: \"forgotAccount\"): void,\r\n (e: \"login\", _value: CredentialLoginRequestBag): void,\r\n (e: \"register\"): void\r\n }>();\r\n\r\n // #region Values\r\n\r\n const breakpoint = useBreakpoint();\r\n const username = ref<string>(\"\");\r\n const password = ref<string>(\"\");\r\n const rememberMe = ref<boolean>(false);\r\n\r\n // #endregion\r\n\r\n // #region Computed Values\r\n\r\n const usernameFieldLabel = computed(() => props.usernameFieldLabel || \"Username\");\r\n const newAccountButtonText = computed(() => props.newAccountButtonText || \"Register\");\r\n const isMobile = computed<boolean>(() => props.isMobileForced || breakpoint.value === \"xs\");\r\n\r\n // #endregion\r\n\r\n // #region Event Handlers\r\n\r\n /**\r\n * Event handler for the credential login form being submitted.\r\n */\r\n function onCredentialLoginSubmitted(): void {\r\n emit(\"login\", {\r\n username: username.value,\r\n password: password.value,\r\n rememberMe: rememberMe.value\r\n });\r\n }\r\n\r\n /**\r\n * Event handler for the Forgot Account button being clicked.\r\n */\r\n function onForgotAccountClicked(): void {\r\n emit(\"forgotAccount\");\r\n }\r\n\r\n /**\r\n * Event handler for the Register button being clicked.\r\n */\r\n function onRegisterClicked(): void {\r\n emit(\"register\");\r\n }\r\n\r\n // #endregion\r\n</script>","<!-- Copyright by the Spark Development Network; Licensed under the Rock Community License -->\r\n<template>\r\n <div :class=\"dividerClassRef\">\r\n <div class=\"rock-divider-line\"></div><div v-if=\"isContentVisible\" class=\"rock-divider-content\" v-html=\"content\"></div><div v-if=\"isContentVisible\" class=\"rock-divider-line\"></div>\r\n </div>\r\n</template>\r\n\r\n\r\n<style scoped>\r\n* {\r\n --var-divider-color: #a4a4a4;\r\n}\r\n\r\n.rock-divider {\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n margin: 2rem 0;\r\n}\r\n\r\n.rock-divider-line {\r\n flex: 1;\r\n border-top: 1px solid var(--var-divider-color);\r\n}\r\n\r\n.rock-divider-content {\r\n padding: 0 1rem;\r\n color: var(--var-divider-color);\r\n}\r\n\r\n.rock-divider-vertical {\r\n flex-direction: column;\r\n margin: 0;\r\n}\r\n\r\n.rock-divider-vertical .rock-divider-line {\r\n border: 0;\r\n border-left: 1px solid var(--var-divider-color);\r\n}\r\n\r\n</style>\r\n\r\n<script setup lang=\"ts\">\r\n import { computed, PropType } from \"vue\";\r\n\r\n const props = defineProps({\r\n isVertical: {\r\n type: Object as PropType<boolean>,\r\n required: false,\r\n default: () => false\r\n },\r\n\r\n content: {\r\n type: Object as PropType<string>,\r\n required: false,\r\n default: () => null\r\n }\r\n });\r\n\r\n // #region Values\r\n\r\n // #endregion\r\n\r\n // #region Computed Values\r\n\r\n const isContentVisible = computed(() => !!props.content);\r\n const dividerClassRef = computed(() => `rock-divider${props.isVertical ? \" rock-divider-vertical\" : \"\"}`);\r\n\r\n // #endregion\r\n\r\n // #region Functions\r\n\r\n // #endregion\r\n\r\n // #region Event Handlers\r\n\r\n // #endregion\r\n</script>\r\n","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","<!-- Copyright by the Spark Development Network; Licensed under the Rock Community License -->\r\n<template>\r\n <p v-if=\"hasExternalLogins && isCaptionNotEmpty\" v-html=\"caption\"></p>\r\n\r\n <RockButton v-for=\"login in externalLogins\"\r\n :btnType=\"BtnType.Authentication\"\r\n :class=\"login.cssClass + ' btn-authentication-v2'\"\r\n :disabled=\"disabled\"\r\n @click=\"onExternalLoginClick(login)\">{{ login.text }}</RockButton>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\n import { computed, PropType } from \"vue\";\r\n import RockButton from \"@Obsidian/Controls/rockButton.obs\";\r\n import { BtnType } from \"@Obsidian/Enums/Controls/btnType\";\r\n import { ExternalAuthenticationButtonBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/externalAuthenticationButtonBag\";\r\n\r\n const props = defineProps({\r\n modelValue: {\r\n type: Array as PropType<ExternalAuthenticationButtonBag[]>,\r\n required: true,\r\n default: []\r\n },\r\n disabled: {\r\n type: Boolean as PropType<boolean>,\r\n required: false,\r\n default: false\r\n },\r\n caption: {\r\n type: String as PropType<string>,\r\n required: false,\r\n default: \"\"\r\n }\r\n });\r\n\r\n const emit = defineEmits<{\r\n (e: \"login\", value: ExternalAuthenticationButtonBag): void\r\n }>();\r\n\r\n // #endregion\r\n\r\n // #region Computed Values\r\n\r\n const externalLogins = computed<ExternalAuthenticationButtonBag[]>(() => {\r\n return props.modelValue?.filter(l => !!l.authenticationType) ?? [];\r\n });\r\n\r\n const hasExternalLogins = computed<boolean>(() => !!externalLogins.value.length);\r\n\r\n const isCaptionNotEmpty = computed<boolean>(() => !!props.caption);\r\n\r\n // #endregion\r\n\r\n // #region Event Handlers\r\n\r\n /**\r\n * Handles the event when an external login button is clicked.\r\n */\r\n function onExternalLoginClick(externalLogin: ExternalAuthenticationButtonBag): void {\r\n emit(\"login\", externalLogin);\r\n }\r\n\r\n // #endregion\r\n</script>","<!-- Copyright by the Spark Development Network; Licensed under the Rock Community License -->\r\n<template>\r\n\r\n <RockButton\r\n v-if=\"isCredentialLoginSupported && internalLoginMethod !== LoginMethod.InternalDatabase\"\r\n :btnType=\"BtnType.Default\"\r\n class=\"btn-block\"\r\n :disabled=\"disabled\"\r\n type=\"button\"\r\n @click=\"onSignInWithAccountClicked()\">Sign in with Account</RockButton>\r\n\r\n <RockButton\r\n v-else-if=\"isPasswordlessLoginSupported && internalLoginMethod !== LoginMethod.Passwordless\"\r\n :btnType=\"BtnType.Default\"\r\n class=\"btn-block\"\r\n :disabled=\"disabled\"\r\n type=\"button\"\r\n @click=\"onSignInWithEmailOrPhoneClicked()\">Sign in with Email or Phone</RockButton>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\n import { PropType } from \"vue\";\r\n import RockButton from \"@Obsidian/Controls/rockButton.obs\";\r\n import { LoginMethod } from \"@Obsidian/Enums/Blocks/Security/Login/loginMethod\";\r\n import { BtnType } from \"@Obsidian/Enums/Controls/btnType\";\r\n import { useVModelPassthrough } from \"@Obsidian/Utility/component\";\r\n\r\n const props = defineProps({\r\n modelValue: {\r\n type: Object as PropType<LoginMethod | undefined>,\r\n required: true\r\n },\r\n isCredentialLoginSupported: {\r\n type: Boolean as PropType<boolean>,\r\n required: true\r\n },\r\n isPasswordlessLoginSupported: {\r\n type: Boolean as PropType<boolean>,\r\n required: true\r\n },\r\n disabled: {\r\n type: Boolean as PropType<boolean>,\r\n required: false,\r\n default: false\r\n }\r\n });\r\n\r\n const emit = defineEmits<{\r\n (e: \"update:modelValue\", _value: LoginMethod | undefined): void\r\n }>();\r\n\r\n //#region Values\r\n\r\n //#endregion\r\n\r\n //#region Computed Values\r\n\r\n const internalLoginMethod = useVModelPassthrough(props, \"modelValue\", emit);\r\n\r\n //#endregion\r\n\r\n //#region Event Handlers\r\n\r\n function onSignInWithAccountClicked(): void {\r\n internalLoginMethod.value = LoginMethod.InternalDatabase;\r\n }\r\n\r\n function onSignInWithEmailOrPhoneClicked(): void {\r\n internalLoginMethod.value = LoginMethod.Passwordless;\r\n }\r\n\r\n //#endregion\r\n\r\n</script>","<!-- Copyright by the Spark Development Network; Licensed under the Rock Community License -->\r\n<template>\r\n <RockValidation :errors=\"validationErrors\" />\r\n\r\n <RockForm @submit=\"onPasswordlessLoginStartSubmitted\" >\r\n <TextBox\r\n v-model=\"emailOrPhoneNumber\"\r\n :disabled=\"disabled\"\r\n :isRequiredIndicatorHidden=\"true\"\r\n :label=\"label\"\r\n :rules=\"['required']\"></TextBox>\r\n\r\n <RockButton\r\n :btnType=\"BtnType.Primary\"\r\n :class=\"isMobileForced ? 'btn-block' : 'btn-block d-sm-none'\"\r\n :disabled=\"disabled\"\r\n type=\"submit\">Continue</RockButton>\r\n <RockButton\r\n v-if=\"!isMobileForced\"\r\n :btnType=\"BtnType.Primary\"\r\n class=\"d-none d-sm-inline-block\"\r\n :disabled=\"disabled\"\r\n type=\"submit\">Continue</RockButton>\r\n </RockForm>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\n import { computed, PropType, ref } from \"vue\";\r\n import RockValidation from \"@Obsidian/Controls/rockValidation.obs\";\r\n import RockButton from \"@Obsidian/Controls/rockButton.obs\";\r\n import RockForm from \"@Obsidian/Controls/rockForm.obs\";\r\n import TextBox from \"@Obsidian/Controls/textBox.obs\";\r\n import { BtnType } from \"@Obsidian/Enums/Controls/btnType\";\r\n import { isEmail } from \"@Obsidian/Utility/email\";\r\n import { FormError } from \"@Obsidian/Utility/form\";\r\n import { formatPhoneNumber, getPhoneNumberConfiguration, stripPhoneNumber } from \"@Obsidian/Utility/phone\";\r\n import { validateValue } from \"@Obsidian/ValidationRules\";\r\n import { PasswordlessLoginStartRequestBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/passwordlessLoginStartRequestBag\";\r\n import { PhoneNumberBoxGetConfigurationResultsBag } from \"@Obsidian/ViewModels/Rest/Controls/phoneNumberBoxGetConfigurationResultsBag\";\r\n import { PhoneNumberCountryCodeRulesConfigurationBag } from \"@Obsidian/ViewModels/Rest/Controls/phoneNumberCountryCodeRulesConfigurationBag\";\r\n\r\n const props = defineProps({\r\n modelValue: {\r\n type: Object as PropType<PasswordlessLoginStartRequestBag>,\r\n required: true\r\n },\r\n disabled: {\r\n type: Boolean as PropType<boolean>,\r\n required: false,\r\n default: false\r\n },\r\n isMobileForced: {\r\n type: Boolean as PropType<boolean>,\r\n required: false,\r\n default: false\r\n }\r\n });\r\n\r\n const emit = defineEmits<{\r\n (e: \"start\"): void,\r\n (e: \"update:modelValue\", _value: PasswordlessLoginStartRequestBag): void\r\n }>();\r\n\r\n //#region Values\r\n\r\n const label = \"Email or Phone\";\r\n const validationErrors = ref<FormError[]>([]);\r\n const phoneNumberConfig = ref<PhoneNumberBoxGetConfigurationResultsBag>();\r\n const emailOrPhoneNumberRaw = ref<string>(\"\");\r\n\r\n //#endregion\r\n\r\n //#region Computed Values\r\n\r\n const emailOrPhoneNumber = computed<string>({\r\n get() {\r\n return emailOrPhoneNumberRaw.value;\r\n },\r\n set(newValue: string) {\r\n emailOrPhoneNumberRaw.value = newValue;\r\n validateEmailOrPhoneNumber(newValue);\r\n }\r\n });\r\n\r\n //#endregion\r\n\r\n //#region Event Handlers\r\n\r\n /**\r\n * Handles the event where the passwordless login start form is submitted.\r\n */\r\n function onPasswordlessLoginStartSubmitted(): void {\r\n validateForm();\r\n\r\n if (validationErrors.value.length === 0) {\r\n emit(\"start\");\r\n }\r\n }\r\n\r\n //#endregion\r\n\r\n //#region Functions\r\n\r\n /** Get all rules for any country code */\r\n function getConfiguredRules(): PhoneNumberCountryCodeRulesConfigurationBag[] {\r\n const rules = phoneNumberConfig.value?.rules;\r\n const configuredRules: PhoneNumberCountryCodeRulesConfigurationBag[] = [];\r\n if (rules) {\r\n for (const key in rules) {\r\n const bag = rules[key];\r\n configuredRules.push(...bag);\r\n }\r\n }\r\n return configuredRules;\r\n }\r\n\r\n /**\r\n * Loads the phone number configuration for validation.\r\n */\r\n async function loadPhoneNumberConfig(): Promise<void> {\r\n phoneNumberConfig.value = await getPhoneNumberConfiguration();\r\n }\r\n\r\n /**\r\n *\r\n */\r\n function validateForm(): void {\r\n const errorMessages = validateValue(emailOrPhoneNumber.value, validateEmailOrPhoneNumber);\r\n\r\n if (errorMessages && errorMessages.length) {\r\n validationErrors.value = errorMessages.map(\r\n errorMessage => ({\r\n name: label,\r\n text: errorMessage\r\n })\r\n );\r\n }\r\n else {\r\n validationErrors.value = [];\r\n }\r\n }\r\n\r\n /**\r\n * Validates the \"Email or Phone\" field and emits modelValue updates depending on validity.\r\n *\r\n * @param value the value to validate.\r\n */\r\n function validateEmailOrPhoneNumber(value: unknown): string | boolean {\r\n if (!value) {\r\n return true;\r\n }\r\n\r\n let errors = validateEmail(value);\r\n if (errors === \"\") {\r\n emit(\"update:modelValue\", {\r\n ...props.modelValue,\r\n email: value as string,\r\n phoneNumber: null,\r\n shouldSendEmailCode: true,\r\n shouldSendEmailLink: true,\r\n shouldSendSmsCode: false\r\n });\r\n return true;\r\n }\r\n\r\n const formattedNumber = formatPhoneNumber(stripPhoneNumber(value as string));\r\n if (formattedNumber) {\r\n errors = validatePhoneNumber(stripPhoneNumber(formattedNumber));\r\n if (errors === \"\") {\r\n emailOrPhoneNumberRaw.value = formattedNumber;\r\n emit(\"update:modelValue\", {\r\n ...props.modelValue,\r\n email: null,\r\n phoneNumber: formattedNumber,\r\n shouldSendEmailCode: false,\r\n shouldSendEmailLink: false,\r\n shouldSendSmsCode: true\r\n });\r\n return true;\r\n }\r\n }\r\n\r\n // Clear modelValue when invalid.\r\n emit(\"update:modelValue\", {\r\n ...props.modelValue,\r\n email: null,\r\n phoneNumber: null,\r\n shouldSendEmailCode: false,\r\n shouldSendEmailLink: false,\r\n shouldSendSmsCode: false\r\n });\r\n return \"must be a valid email or phone number\";\r\n }\r\n\r\n /**\r\n * Validates a value as an email address.\r\n *\r\n * @param value The value to validate.\r\n */\r\n function validateEmail(value: unknown): string {\r\n if (!value) {\r\n return \"\";\r\n }\r\n\r\n if (isEmail(value)) {\r\n return \"\";\r\n }\r\n\r\n return \"Email must be a valid email address.\";\r\n }\r\n\r\n /**\r\n * Validates a value as a phone number using the configuration retrieved from the server.\r\n *\r\n * @param value The value to validate.\r\n */\r\n function validatePhoneNumber(value: string): string {\r\n const rules = getConfiguredRules();\r\n\r\n if (!value) {\r\n return \"\";\r\n }\r\n\r\n if (rules.length === 0) {\r\n return \"\";\r\n }\r\n\r\n for (let rule of rules) {\r\n const regex = new RegExp(rule.match ?? \"\");\r\n\r\n if (regex.test(value)) {\r\n return \"\";\r\n }\r\n }\r\n\r\n return `Phone number '${value}' must be a valid phone number.`;\r\n }\r\n\r\n //#endregion\r\n\r\n loadPhoneNumberConfig();\r\n</script>","<!-- Copyright by the Spark Development Network; Licensed under the Rock Community License -->\r\n<template>\r\n <RockForm v-model:submit=\"internalSubmitPasswordlessLoginVerification\"\r\n @submit=\"onPasswordlessLoginVerifySubmitted\">\r\n\r\n <div class=\"mb-2\" ref=\"instructionsDiv\">Please enter your confirmation code below.</div>\r\n\r\n <CodeBox v-model.capitalize=\"internalCode\"\r\n :disabled=\"disabled\"\r\n :maxLength=\"6\"\r\n rules=\"required\"\r\n validationTitle=\"Code\"\r\n @complete=\"onCodeCompleted\" />\r\n\r\n <template v-if=\"modelValue.isPersonSelectionRequired\">\r\n <p>The {{ internalCommunicationType }} you provided is matched to several different individuals. Please select the one that is you.</p>\r\n <RadioButtonList v-model=\"internalMatchingPersonValue\"\r\n v-model:items=\"internalMatchingPeople\" />\r\n </template>\r\n\r\n <RockButton :btnType=\"BtnType.Primary\"\r\n :class=\"['complete-sign-in-btn', isMobile ? 'btn-block' : '']\"\r\n :disabled=\"disabled\"\r\n type=\"submit\">Complete Sign In</RockButton>\r\n\r\n <RockButton autoDisable\r\n :btnType=\"BtnType.Action\"\r\n :class=\"isMobile ? 'btn-block mt-2' : 'ml-1'\"\r\n :disabled=\"disabled\"\r\n type=\"button\"\r\n @click=\"onResendCodeClicked\">Resend code</RockButton>\r\n </RockForm>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\n import { computed, PropType, ref } from \"vue\";\r\n import { PasswordlessCommunicationType } from \"./types.partial\";\r\n import CodeBox from \"../codeBox.obs\";\r\n import { useBreakpoint } from \"../types.partial\";\r\n import RadioButtonList from \"@Obsidian/Controls/radioButtonList.obs\";\r\n import RockButton from \"@Obsidian/Controls/rockButton.obs\";\r\n import RockForm from \"@Obsidian/Controls/rockForm.obs\";\r\n import { BtnType } from \"@Obsidian/Enums/Controls/btnType\";\r\n import { useVModelPassthrough } from \"@Obsidian/Utility/component\";\r\n import { PasswordlessLoginVerifyOptionsBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/passwordlessLoginVerifyOptionsBag\";\r\n import { ListItemBag } from \"@Obsidian/ViewModels/Utility/listItemBag\";\r\n\r\n const props = defineProps({\r\n modelValue: {\r\n type: Object as PropType<PasswordlessLoginVerifyOptionsBag>,\r\n required: true\r\n },\r\n communicationType: {\r\n type: String as PropType<PasswordlessCommunicationType>,\r\n required: false,\r\n default: \"data\"\r\n },\r\n disabled: {\r\n type: Boolean as PropType<boolean>,\r\n required: false,\r\n default: false\r\n },\r\n isMobileForced: {\r\n type: Boolean as PropType<boolean>,\r\n required: false,\r\n default: false\r\n },\r\n submitPasswordlessLoginVerification: {\r\n type: Boolean as PropType<boolean>,\r\n required: false,\r\n default: false\r\n }\r\n });\r\n\r\n const emit = defineEmits<{\r\n (e: \"resendCode\"): void,\r\n (e: \"update:submitPasswordlessLoginVerification\", _value: boolean): void\r\n (e: \"update:modelValue\", _value: PasswordlessLoginVerifyOptionsBag),\r\n (e: \"verify\"): void,\r\n }>();\r\n\r\n //#region Values\r\n\r\n const internalSubmitPasswordlessLoginVerification = useVModelPassthrough(props, \"submitPasswordlessLoginVerification\", emit);\r\n const instructionsDiv = ref<HTMLElement | undefined>();\r\n const breakpoint = useBreakpoint();\r\n\r\n //#endregion\r\n\r\n //#region Computed Values\r\n\r\n const internalCode = computed({\r\n get() {\r\n return props.modelValue.code || \"\";\r\n },\r\n set(newValue: string) {\r\n emit(\"update:modelValue\", {\r\n ...props.modelValue,\r\n code: newValue\r\n });\r\n }\r\n });\r\n\r\n const internalCommunicationType = computed(() => props.communicationType || \"data\");\r\n\r\n const internalMatchingPeople = computed({\r\n get() {\r\n return props.modelValue.matchingPeople ?? [];\r\n },\r\n set(newValue: ListItemBag[]) {\r\n emit(\"update:modelValue\", {\r\n ...props.modelValue,\r\n matchingPeople: newValue\r\n });\r\n }\r\n });\r\n\r\n const internalMatchingPersonValue = computed({\r\n get() {\r\n return props.modelValue.matchingPersonValue || \"\";\r\n },\r\n set(newValue: string) {\r\n emit(\"update:modelValue\", {\r\n ...props.modelValue,\r\n matchingPersonValue: newValue\r\n });\r\n }\r\n });\r\n\r\n const isMobile = computed<boolean>(() => props.isMobileForced || breakpoint.value === \"xs\");\r\n\r\n //#endregion\r\n\r\n //#region Event Handlers\r\n\r\n function onPasswordlessLoginVerifySubmitted(): void {\r\n emit(\"verify\");\r\n }\r\n\r\n function onResendCodeClicked(): void {\r\n internalCode.value = \"\";\r\n internalMatchingPersonValue.value = \"\";\r\n internalMatchingPeople.value = [];\r\n emit(\"resendCode\");\r\n }\r\n\r\n function onCodeCompleted(): void {\r\n const signInButton = instructionsDiv.value?.parentElement?.querySelector<HTMLButtonElement>(\"button.complete-sign-in-btn\");\r\n\r\n if (signInButton) {\r\n signInButton.focus();\r\n }\r\n }\r\n\r\n //#endregion\r\n</script>","<!-- Copyright by the Spark Development Network; Licensed under the Rock Community License -->\r\n<template>\r\n <PasswordlessLoginStartStep v-if=\"passwordlessLoginStep.isStart\"\r\n v-model=\"passwordlessLoginStartRequest\"\r\n :disabled=\"disabled\"\r\n :isMobileForced=\"isMobileForced\"\r\n @start=\"onStartPasswordlessLogin\" />\r\n\r\n <PasswordlessLoginVerifyStep v-else-if=\"passwordlessLoginStep.isVerify\"\r\n v-model=\"passwordlessLoginVerifyOptions\"\r\n v-model:submitPasswordlessLoginVerification=\"submitPasswordlessLoginVerification\"\r\n :communicationType=\"communicationType\"\r\n :disabled=\"disabled\"\r\n :isMobileForced=\"isMobileForced\"\r\n @resendCode=\"onResendCode\"\r\n @verify=\"onVerifyPasswordlessLogin\" />\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\n import { computed, onMounted, onUnmounted, PropType, ref, watch } from \"vue\";\r\n import { PasswordlessCommunicationType } from \"./types.partial\";\r\n import PasswordlessLoginStartStep from \"./passwordlessLoginStartStep.partial.obs\";\r\n import PasswordlessLoginVerifyStep from \"./passwordlessLoginVerifyStep.partial.obs\";\r\n import { PasswordlessLoginStep } from \"@Obsidian/Enums/Blocks/Security/Login/passwordlessLoginStep\";\r\n import { LoginInitializationBox } from \"@Obsidian/ViewModels/Blocks/Security/Login/loginInitializationBox\";\r\n import { PasswordlessLoginOptionsBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/passwordlessLoginOptionsBag\";\r\n import { PasswordlessLoginStartRequestBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/passwordlessLoginStartRequestBag\";\r\n import { PasswordlessLoginVerifyOptionsBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/passwordlessLoginVerifyOptionsBag\";\r\n import { PasswordlessLoginVerifyRequestBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/passwordlessLoginVerifyRequestBag\";\r\n\r\n const props = defineProps({\r\n modelValue: {\r\n type: Object as PropType<PasswordlessLoginOptionsBag>,\r\n required: true\r\n },\r\n config: {\r\n type: Object as PropType<LoginInitializationBox>,\r\n required: true\r\n },\r\n disabled: {\r\n type: Boolean as PropType<boolean>,\r\n required: false,\r\n default: false\r\n },\r\n isMobileForced: {\r\n type: Boolean as PropType<boolean>,\r\n required: false,\r\n default: false\r\n }\r\n });\r\n\r\n const emit = defineEmits<{\r\n (e: \"start\", value: PasswordlessLoginStartRequestBag): void,\r\n (e: \"update:modelValue\", value: PasswordlessLoginOptionsBag): void,\r\n (e: \"verify\", value: PasswordlessLoginVerifyRequestBag): void,\r\n }>();\r\n\r\n // #region Values\r\n\r\n const passwordlessLoginStartRequest = ref<PasswordlessLoginStartRequestBag>({\r\n shouldSendEmailCode: false,\r\n shouldSendEmailLink: false,\r\n shouldSendSmsCode: false,\r\n email: null,\r\n phoneNumber: null\r\n });\r\n\r\n const passwordlessLoginVerifyOptions = ref<PasswordlessLoginVerifyOptionsBag>({\r\n code: props.modelValue?.code,\r\n isPersonSelectionRequired: props.modelValue?.isPersonSelectionRequired,\r\n matchingPeople: props.modelValue?.matchingPeople,\r\n matchingPersonValue: null,\r\n state: props.modelValue?.state\r\n });\r\n\r\n /**\r\n * Enables programmatic submission of the Passwordless Login Verify form.\r\n */\r\n const submitPasswordlessLoginVerification = ref(false);\r\n\r\n /**\r\n * Initialize with Start step unless we need to automatically submit the verification code.\r\n */\r\n const passwordlessLoginStep = computed(() => ({\r\n isStart: internalStep.value === PasswordlessLoginStep.Start,\r\n isVerify: internalStep.value === PasswordlessLoginStep.Verify\r\n }));\r\n\r\n // #endregion\r\n\r\n // #region Computed Values\r\n\r\n const internalCode = computed<string>({\r\n get() {\r\n return props.modelValue.code ?? \"\";\r\n },\r\n set(newValue) {\r\n emit(\"update:modelValue\", {\r\n ...props.modelValue,\r\n code: newValue\r\n });\r\n }\r\n });\r\n\r\n const internalState = computed<string>({\r\n get() {\r\n return props.modelValue.state ?? \"\";\r\n },\r\n set(newValue) {\r\n emit(\"update:modelValue\", {\r\n ...props.modelValue,\r\n state: newValue\r\n });\r\n }\r\n });\r\n\r\n const internalStep = computed<PasswordlessLoginStep>({\r\n get() {\r\n return props.modelValue.step;\r\n },\r\n set(newValue: PasswordlessLoginStep) {\r\n emit(\"update:modelValue\", {\r\n ...props.modelValue,\r\n step: newValue\r\n });\r\n }\r\n });\r\n\r\n const communicationType = computed<PasswordlessCommunicationType>(() => passwordlessLoginStartRequest.value.email ? \"email\" : passwordlessLoginStartRequest.value.phoneNumber ? \"phone number\" : \"data\");\r\n\r\n // #endregion\r\n\r\n // #region Event Handlers\r\n\r\n /**\r\n * Event handler for the \"Resend code\" button being clicked.\r\n *\r\n * @param passwordlessLoginStepValue\r\n */\r\n function onResendCode(): void {\r\n internalCode.value = \"\";\r\n passwordlessLoginVerifyOptions.value.code = \"\";\r\n internalStep.value = PasswordlessLoginStep.Start;\r\n }\r\n\r\n /**\r\n * Event handler for the Passwordless Login Start form being submitted.\r\n */\r\n function onStartPasswordlessLogin(): void {\r\n // Make sure the code and state are cleared before starting a new passwordless authentication session.\r\n internalCode.value = \"\";\r\n passwordlessLoginVerifyOptions.value.code = \"\";\r\n internalState.value = \"\";\r\n\r\n emit(\"start\", passwordlessLoginStartRequest.value);\r\n }\r\n\r\n /**\r\n * Event handler for the Passwordless Login Verify form being submitted.\r\n * Handles the redirect to the return URL if authentication is successful.\r\n */\r\n async function onVerifyPasswordlessLogin(): Promise<void> {\r\n emit(\"verify\", {\r\n code: passwordlessLoginVerifyOptions.value.code,\r\n matchingPersonValue: passwordlessLoginVerifyOptions.value.matchingPersonValue,\r\n state: passwordlessLoginVerifyOptions.value.state,\r\n });\r\n }\r\n\r\n // #endregion\r\n\r\n // #region Watchers\r\n\r\n // Update the child passwordless verify options when the parent passwordless options are updated.\r\n watch(() => props.modelValue, (newPasswordlessLoginOptions, oldPasswordlessLoginOptions) => {\r\n // Only update the fields that were changed so we don't overwrite everything on the child options.\r\n if (newPasswordlessLoginOptions.code !== oldPasswordlessLoginOptions.code) {\r\n passwordlessLoginVerifyOptions.value.code = newPasswordlessLoginOptions.code;\r\n }\r\n\r\n if (newPasswordlessLoginOptions.isPersonSelectionRequired !== oldPasswordlessLoginOptions.isPersonSelectionRequired) {\r\n passwordlessLoginVerifyOptions.value.isPersonSelectionRequired = newPasswordlessLoginOptions.isPersonSelectionRequired;\r\n }\r\n\r\n if (newPasswordlessLoginOptions.matchingPeople !== oldPasswordlessLoginOptions.matchingPeople) {\r\n passwordlessLoginVerifyOptions.value.matchingPeople = newPasswordlessLoginOptions.matchingPeople;\r\n }\r\n\r\n if (newPasswordlessLoginOptions.state !== oldPasswordlessLoginOptions.state) {\r\n passwordlessLoginVerifyOptions.value.state = newPasswordlessLoginOptions.state;\r\n }\r\n });\r\n\r\n // #endregion\r\n\r\n // If the page was loaded as a result of clicking a passwordless login link,\r\n // then automatically submit the form.\r\n onMounted(() => {\r\n if (props.modelValue.isAutomaticVerificationRequired) {\r\n submitPasswordlessLoginVerification.value = true;\r\n }\r\n });\r\n\r\n onUnmounted(() => {\r\n // Reset to the start step when this component is unmounted.\r\n // We don't want to do this after mounting because the\r\n // step can be externally overridden.\r\n internalStep.value = PasswordlessLoginStep.Start;\r\n });\r\n</script>","<!-- Copyright by the Spark Development Network; Licensed under the Rock Community License -->\r\n<template>\r\n <BreakpointObserver @breakpoint=\"value => breakpoint = value\">\r\n <div>\r\n <div v-if=\"criticalErrorMessage\">\r\n <NotificationBox alertType=\"danger\" v-html=\"criticalErrorMessage\" />\r\n </div>\r\n <div v-else-if=\"isCompleted\">\r\n <NotificationBox alertType=\"warning\" v-html=\"completedCaption\" />\r\n </div>\r\n <div v-else class=\"login-block\">\r\n <fieldset>\r\n <legend>Log In</legend>\r\n\r\n <template v-if=\"config.configurationErrors?.length\">\r\n <NotificationBox v-for=\"configError in config.configurationErrors\"\r\n alertType=\"warning\"\r\n v-text=\"configError\" />\r\n </template>\r\n\r\n <div v-if=\"config.errorMessage\" class=\"row\">\r\n <NotificationBox alertType=\"danger\"\r\n class=\"col-sm-12\"\r\n v-html=\"config.errorMessage\" />\r\n </div>\r\n\r\n <div :class=\"['row', isMobile ? 'mobile-layout' : 'd-flex']\">\r\n <div v-if=\"isAnyExternalAuthProviderVisible || areBothInternalAuthProvidersVisible\"\r\n :class=\"['login-methods', isMobileForced ? 'col-sm-12' : 'col-sm-5', 'remote-logins']\">\r\n <ExternalLogin v-if=\"isAnyExternalAuthProviderVisible\"\r\n :modelValue=\"config.externalAuthProviderButtons || []\"\r\n :caption=\"config.remoteAuthorizationPromptMessage ?? ''\"\r\n :disabled=\"isAuthenticating || isNavigating\"\r\n @login=\"onExternalLogin($event)\" />\r\n\r\n <LoginMethodPicker v-if=\"areBothInternalAuthProvidersVisible\"\r\n :modelValue=\"loginMethod\"\r\n :disabled=\"isAuthenticating || isNavigating\"\r\n :isCredentialLoginSupported=\"config.isInternalDatabaseLoginSupported\"\r\n :isPasswordlessLoginSupported=\"config.isPasswordlessLoginSupported\"\r\n @update:modelValue=\"onLoginMethodPickerChanged\" />\r\n </div>\r\n\r\n <Divider v-if=\"areSecondaryAndPrimaryAuthVisible\"\r\n :class=\"isMobileForced ? 'col-sm-12' : 'col-sm-1'\"\r\n content=\"or\"\r\n :isVertical=\"!isMobile\" />\r\n\r\n <div :class=\"['login-entry', isMobileForced || (!isAnyExternalAuthProviderVisible && !areBothInternalAuthProvidersVisible) ? 'col-sm-12' : 'col-sm-6']\">\r\n <div v-if=\"mfaMessage\" v-html=\"mfaMessage\"></div>\r\n\r\n <CredentialLogin v-if=\"loginMethod === LoginMethod.InternalDatabase\r\n && ((config.isInternalDatabaseLoginSupported && !mfa?.credentialLogin) || mfa?.credentialLogin?.isError === false)\"\r\n :disabled=\"isAuthenticating || isNavigating\"\r\n :isMobileForced=\"isMobileForced\"\r\n :isNewAccountHidden=\"currentMfaFactor === LoginMethod.InternalDatabase || config.hideNewAccountOption\"\r\n :isRememberMeHidden=\"currentMfaFactor === LoginMethod.InternalDatabase\"\r\n :newAccountButtonText=\"config.newAccountButtonText\"\r\n :promptMessage=\"config.promptMessage\"\r\n :usernameFieldLabel=\"config.usernameFieldLabel\"\r\n @forgotAccount=\"onForgotAccount()\"\r\n @login=\"onCredentialLogin($event)\"\r\n @register=\"onRegister()\" />\r\n\r\n <PasswordlessLogin v-else-if=\"loginMethod !== LoginMethod.InternalDatabase\r\n && ((config.isPasswordlessLoginSupported && !mfa?.passwordless) || mfa?.passwordless?.isError === false)\"\r\n v-model=\"passwordlessLoginOptions\"\r\n :config=\"config\"\r\n :disabled=\"isAuthenticating || isNavigating\"\r\n :isMobileForced=\"isMobileForced\"\r\n @start=\"onPasswordlessLoginStart($event)\"\r\n @verify=\"onPasswordlessLoginVerify($event)\" />\r\n\r\n <NotificationBox v-if=\"errorMessage\"\r\n alertType=\"warning\"\r\n class=\"block-message margin-t-md\"\r\n v-html=\"errorMessage\" />\r\n </div>\r\n </div>\r\n </fieldset>\r\n\r\n <div v-if=\"config.contentText\" class=\"mt-3\" v-html=\"config.contentText\"></div>\r\n </div>\r\n </div>\r\n </BreakpointObserver>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\n import { computed, onMounted, ref } from \"vue\";\r\n import BreakpointObserver from \"./breakpointObserver.partial.obs\";\r\n import CredentialLogin from \"./Login/credentialLogin.partial.obs\";\r\n import Divider from \"./Login/divider.partial.obs\";\r\n import ExternalLogin from \"./Login/externalLogin.partial.obs\";\r\n import LoginMethodPicker from \"./Login/loginMethodPicker.partial.obs\";\r\n import PasswordlessLogin from \"./Login/passwordlessLogin.partial.obs\";\r\n import { Breakpoint } from \"./types.partial\";\r\n import NotificationBox from \"@Obsidian/Controls/notificationBox.obs\";\r\n import { LoginMethod } from \"@Obsidian/Enums/Blocks/Security/Login/loginMethod\";\r\n import { onConfigurationValuesChanged, useConfigurationValues, useInvokeBlockAction, useReloadBlock } from \"@Obsidian/Utility/block\";\r\n import { removeCurrentUrlQueryParams } from \"@Obsidian/Utility/url\";\r\n import { CredentialLoginMfaBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/credentialLoginMfaBag\";\r\n import { CredentialLoginRequestBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/credentialLoginRequestBag\";\r\n import { CredentialLoginResponseBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/credentialLoginResponseBag\";\r\n import { ExternalAuthenticationButtonBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/externalAuthenticationButtonBag\";\r\n import { LoginInitializationBox } from \"@Obsidian/ViewModels/Blocks/Security/Login/loginInitializationBox\";\r\n import { PasswordlessLoginMfaBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/passwordlessLoginMfaBag\";\r\n import { PasswordlessLoginOptionsBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/passwordlessLoginOptionsBag\";\r\n import { PasswordlessLoginStartRequestBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/passwordlessLoginStartRequestBag\";\r\n import { PasswordlessLoginStartResponseBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/passwordlessLoginStartResponseBag\";\r\n import { PasswordlessLoginStep } from \"@Obsidian/Enums/Blocks/Security/Login/passwordlessLoginStep\";\r\n import { PasswordlessLoginVerifyRequestBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/passwordlessLoginVerifyRequestBag\";\r\n import { PasswordlessLoginVerifyResponseBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/passwordlessLoginVerifyResponseBag\";\r\n import { RemoteLoginStartRequestBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/remoteLoginStartRequestBag\";\r\n import { RemoteLoginStartResponseBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/remoteLoginStartResponseBag\";\r\n\r\n const config = useConfigurationValues<LoginInitializationBox>();\r\n const invokeBlockAction = useInvokeBlockAction();\r\n\r\n // #region Types\r\n\r\n type Mfa = {\r\n passwordless?: Omit<PasswordlessLoginMfaBag, \"ticket\"> | null | undefined;\r\n credentialLogin?: Omit<CredentialLoginMfaBag, \"ticket\"> | null | undefined;\r\n ticket: string | null;\r\n is2FANotSupportedForAuthenticationFactor?: boolean | undefined;\r\n };\r\n\r\n // #endregion\r\n\r\n // #region Values\r\n\r\n const breakpoint = ref<Breakpoint>(\"unknown\");\r\n const isMobileForced = !!document.getElementById(\"splash\");\r\n\r\n const isAuthenticating = ref(config.shouldRedirect);\r\n const completedCaption = ref<string | null>(null);\r\n const errorMessage = ref<string | null>(config.errorMessage || null);\r\n const criticalErrorMessage = ref<string | null>(null);\r\n const isNavigating = ref(false);\r\n\r\n const passwordlessLoginOptions = ref<PasswordlessLoginOptionsBag>({\r\n code: config.passwordlessAutoVerifyOptions?.code,\r\n state: config.passwordlessAutoVerifyOptions?.state,\r\n isAutomaticVerificationRequired: !!config.passwordlessAutoVerifyOptions,\r\n isPersonSelectionRequired: false,\r\n matchingPeople: null,\r\n step: config.passwordlessAutoVerifyOptions ? PasswordlessLoginStep.Verify : PasswordlessLoginStep.Start\r\n });\r\n\r\n const isCompleted = ref<boolean>(false);\r\n\r\n const mfa = ref<Mfa | null | undefined>();\r\n const twoFactorEmailPhoneNotAvailableMessage = ref<string>(config.twoFactorEmailPhoneNotAvailableMessage ?? \"\");\r\n const twoFactorEmailPhoneRequiredMessage = ref<string>(config.twoFactorEmailPhoneRequiredMessage ?? \"\");\r\n const twoFactorLoginNotAvailableMessage = ref<string>(config.twoFactorLoginNotAvailableMessage ?? \"\");\r\n const twoFactorLoginRequiredMessage = ref<string>(config.twoFactorLoginRequiredMessage ?? \"\");\r\n const twoFactorNotSupportedByAuthenticationMethodMessage = ref<string>(config.twoFactorNotSupportedByAuthenticationMethodMessage ?? \"\");\r\n\r\n // #endregion\r\n\r\n // #region Computed Values\r\n\r\n const areBothInternalAuthProvidersVisible = computed<boolean>(() =>\r\n config.isInternalDatabaseLoginSupported && config.isPasswordlessLoginSupported\r\n );\r\n\r\n const isAnyExternalAuthProviderVisible = computed<boolean>(() =>\r\n !!config.externalAuthProviderButtons?.length\r\n );\r\n\r\n const areSecondaryAndPrimaryAuthVisible = computed<boolean>(() => {\r\n const isAnyInternalAuthProviderVisible = config.isInternalDatabaseLoginSupported || config.isPasswordlessLoginSupported;\r\n return (isAnyExternalAuthProviderVisible.value && isAnyInternalAuthProviderVisible) || areBothInternalAuthProvidersVisible.value;\r\n });\r\n\r\n const loginMethod = ref<LoginMethod | undefined>();\r\n\r\n const isMobile = computed<boolean>(() => isMobileForced || breakpoint.value === \"xs\");\r\n\r\n const mfaMessage = computed<string | null>(() => {\r\n if (!mfa.value) {\r\n return null;\r\n }\r\n else if (mfa.value.passwordless && !mfa.value.passwordless.isError) {\r\n return twoFactorEmailPhoneRequiredMessage.value;\r\n }\r\n else if (mfa.value.passwordless?.isEmailAndMobilePhoneMissing) {\r\n return twoFactorEmailPhoneNotAvailableMessage.value;\r\n }\r\n else if (mfa.value.credentialLogin && !mfa.value.credentialLogin.isError) {\r\n return twoFactorLoginRequiredMessage.value;\r\n }\r\n else if (mfa.value.credentialLogin?.isUsernameAndPasswordMissing) {\r\n return twoFactorLoginNotAvailableMessage.value;\r\n }\r\n else if (mfa.value.is2FANotSupportedForAuthenticationFactor) {\r\n return twoFactorNotSupportedByAuthenticationMethodMessage.value;\r\n }\r\n else {\r\n return null;\r\n }\r\n });\r\n\r\n const currentMfaFactor = computed<LoginMethod | null>(() => {\r\n const mfaDetails = mfa.value;\r\n\r\n if (!mfaDetails) {\r\n return null;\r\n }\r\n\r\n if (mfaDetails.credentialLogin) {\r\n return LoginMethod.InternalDatabase;\r\n }\r\n\r\n if (mfaDetails.passwordless) {\r\n return LoginMethod.Passwordless;\r\n }\r\n\r\n // This would only occur if a new auth factor if block is not added here.\r\n console.error(\"Unknown MFA factor\");\r\n return null;\r\n });\r\n\r\n // #endregion\r\n\r\n // #region Event Handlers\r\n\r\n /**\r\n * Event handler for the credential login form being submitted.\r\n * Handles the redirect to the return URL if authentication is successful.\r\n */\r\n async function onCredentialLogin(bag: CredentialLoginRequestBag): Promise<void> {\r\n isAuthenticating.value = true;\r\n\r\n try {\r\n // Attach the MFA state to the request.\r\n bag.mfaTicket = mfa.value?.ticket;\r\n const response = await invokeBlockAction<CredentialLoginResponseBag>(\"CredentialLogin\", { bag });\r\n const responseBag = response?.data;\r\n\r\n if (!response?.isSuccess || !responseBag) {\r\n uiState.error({\r\n errorMessage: response?.errorMessage || \"Something went wrong. Please try again.\"\r\n });\r\n return;\r\n }\r\n\r\n if (responseBag.isLockedOut) {\r\n uiState.criticalError({\r\n errorMessage: responseBag.errorMessage ?? null\r\n });\r\n return;\r\n }\r\n\r\n if (responseBag.isAuthenticated) {\r\n uiState.valid();\r\n await navigate(responseBag.redirectUrl || \"/\");\r\n return;\r\n }\r\n\r\n if (responseBag.isConfirmationRequired) {\r\n uiState.confirmationRequired({\r\n caption: responseBag.errorMessage || response.errorMessage\r\n });\r\n return;\r\n }\r\n\r\n if (responseBag.mfa) {\r\n uiState.initMfaFactor({\r\n mfa: {\r\n passwordless: responseBag.mfa,\r\n ticket: responseBag.mfa.ticket ?? null\r\n },\r\n loginMethod: LoginMethod.Passwordless,\r\n });\r\n return;\r\n }\r\n\r\n uiState.error({\r\n errorMessage: responseBag.errorMessage || \"Authentication failed. Please try again.\"\r\n });\r\n }\r\n finally {\r\n // Reset isAuthenticating in the event there is an error so the user can resubmit.\r\n isAuthenticating.value = false;\r\n }\r\n }\r\n\r\n /**\r\n * Handles the event when an external login button is clicked.\r\n */\r\n async function onExternalLogin(externalLogin: ExternalAuthenticationButtonBag): Promise<void> {\r\n isAuthenticating.value = true;\r\n const bag: RemoteLoginStartRequestBag = {\r\n authenticationType: externalLogin.authenticationType,\r\n route: location.pathname\r\n };\r\n\r\n try {\r\n const response = await invokeBlockAction<RemoteLoginStartResponseBag>(\"RemoteLoginStart\", { bag });\r\n\r\n if (response?.isSuccess && response?.data?.redirectUrl) {\r\n await navigate(response.data.redirectUrl);\r\n return;\r\n }\r\n\r\n uiState.error({\r\n errorMessage: response?.errorMessage\r\n });\r\n return;\r\n }\r\n finally {\r\n isAuthenticating.value = false;\r\n }\r\n }\r\n\r\n /**\r\n * Event handler for the forgot account button being clicked.\r\n */\r\n async function onForgotAccount(): Promise<void> {\r\n await navigate(config.helpPageUrl ?? \"/\");\r\n }\r\n\r\n /**\r\n * Event handler for the login method picker being changed.\r\n */\r\n function onLoginMethodPickerChanged(value: LoginMethod | undefined): void {\r\n if (typeof value !== \"undefined\") {\r\n uiState.init({\r\n loginMethod: value\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Event handler for the Passwordless Login being started.\r\n */\r\n async function onPasswordlessLoginStart(bag: PasswordlessLoginStartRequestBag): Promise<void> {\r\n isAuthenticating.value = true;\r\n\r\n uiState.valid();\r\n\r\n try {\r\n // Attach the MFA state to the request.\r\n bag.mfaTicket = mfa.value?.ticket;\r\n const response = await invokeBlockAction<PasswordlessLoginStartResponseBag>(\"PasswordlessLoginStart\", { bag });\r\n\r\n if (!response?.isSuccess || !response.data) {\r\n uiState.error({\r\n errorMessage: response?.errorMessage || \"Something went wrong. Please try again.\"\r\n });\r\n return;\r\n }\r\n\r\n if (response.data.isSuccessful) {\r\n passwordlessLoginOptions.value = {\r\n ...passwordlessLoginOptions.value,\r\n state: response.data.state || \"\",\r\n step: PasswordlessLoginStep.Verify\r\n };\r\n loginMethod.value = LoginMethod.Passwordless;\r\n return;\r\n }\r\n\r\n passwordlessLoginOptions.value = {\r\n ...passwordlessLoginOptions.value,\r\n step: PasswordlessLoginStep.Start\r\n };\r\n loginMethod.value = LoginMethod.Passwordless;\r\n\r\n uiState.error({\r\n errorMessage: response?.data?.errorMessage || response?.errorMessage || \"An unknown error occurred. Please submit email or phone number again.\"\r\n });\r\n return;\r\n }\r\n finally {\r\n isAuthenticating.value = false;\r\n }\r\n }\r\n\r\n /**\r\n * Event handler for the Passwordless Login being verified.\r\n * Handles the redirect to the return URL if authentication is successful.\r\n */\r\n async function onPasswordlessLoginVerify(bag: PasswordlessLoginVerifyRequestBag): Promise<void> {\r\n isAuthenticating.value = true;\r\n uiState.valid();\r\n\r\n try {\r\n // Attach the MFA state to the request.\r\n bag.mfaTicket = mfa.value?.ticket;\r\n var response = await invokeBlockAction<PasswordlessLoginVerifyResponseBag>(\"PasswordlessLoginVerify\", { bag });\r\n\r\n if (!response || !response.isSuccess || !response.data) {\r\n uiState.error({\r\n errorMessage: \"Something went wrong. Please try again.\",\r\n });\r\n return;\r\n }\r\n\r\n if (response.data.isAuthenticated) {\r\n uiState.valid();\r\n await navigate(config.redirectUrl || \"/\");\r\n return;\r\n }\r\n\r\n if (response.data.mfa) {\r\n uiState.initMfaFactor({\r\n mfa: {\r\n credentialLogin: response.data.mfa,\r\n ticket: response.data.mfa.ticket ?? null,\r\n },\r\n loginMethod: LoginMethod.InternalDatabase,\r\n });\r\n return;\r\n }\r\n\r\n if (response.data.isRegistrationRequired) {\r\n if (!response.data.registrationUrl) {\r\n uiState.error({ errorMessage: \"Redirecting to default registration page\" });\r\n }\r\n await navigate(response.data.registrationUrl || \"/NewAccount\");\r\n return;\r\n }\r\n\r\n if (response.data.isPersonSelectionRequired) {\r\n passwordlessLoginOptions.value = {\r\n ...passwordlessLoginOptions.value,\r\n isPersonSelectionRequired: true,\r\n matchingPeople: response.data.matchingPeople || []\r\n };\r\n loginMethod.value = LoginMethod.Passwordless;\r\n return;\r\n }\r\n\r\n uiState.error({\r\n errorMessage: response.data.errorMessage ?? \"Authentication failed. Please try again.\"\r\n });\r\n }\r\n finally {\r\n // Reset isAuthenticating in the event there is an error so the user can resubmit.\r\n isAuthenticating.value = false;\r\n }\r\n }\r\n\r\n /**\r\n * Event handler for the register button being clicked.\r\n */\r\n async function onRegister(): Promise<void> {\r\n await navigate(config.newAccountPageUrl ?? \"/\");\r\n }\r\n\r\n // #endregion\r\n\r\n //#region Functions\r\n\r\n /**\r\n * Gets the initial login method to display.\r\n */\r\n function getInitialLoginMethod(): LoginMethod {\r\n const configuredDefaultLoginMethod = config.defaultLoginMethod;\r\n\r\n // If the block loaded as a response to a passwordless verification,\r\n // then the initial login method should be passwordless.\r\n if (config.passwordlessAutoVerifyOptions) {\r\n return LoginMethod.Passwordless;\r\n }\r\n\r\n switch (configuredDefaultLoginMethod) {\r\n case LoginMethod.InternalDatabase: {\r\n // If block setting default is internal database but only passwordless is supported,\r\n // then initial login method should be passwordless.\r\n if (!config.isInternalDatabaseLoginSupported && config.isPasswordlessLoginSupported) {\r\n return LoginMethod.Passwordless;\r\n }\r\n break;\r\n }\r\n\r\n case LoginMethod.Passwordless: {\r\n // If block setting default is passwordless but only internal database is supported,\r\n // then initial login method should be internal database.\r\n if (!config.isPasswordlessLoginSupported && config.isInternalDatabaseLoginSupported) {\r\n return LoginMethod.InternalDatabase;\r\n }\r\n break;\r\n }\r\n\r\n default: {\r\n break;\r\n }\r\n }\r\n\r\n // Return the block setting value.\r\n return configuredDefaultLoginMethod;\r\n }\r\n\r\n /**\r\n * Handles the event when a component triggers navigation.\r\n *\r\n * @param url The URL to navigate to.\r\n * @returns an unresolving promise so the page/form remains unusable until the redirect is complete.\r\n */\r\n async function navigate(url: string): Promise<void> {\r\n isNavigating.value = true;\r\n window.location.href = url;\r\n return new Promise((_resolve, _reject) => {\r\n // Return an unresolving promise so the page/form remains unusable until the redirect is complete.\r\n });\r\n }\r\n\r\n /**\r\n * Displays a completed message to the user.\r\n * If caption is provided, then a generic error is displayed.\r\n *\r\n * @param error The optional error message.\r\n */\r\n function showCompleted(caption?: string | null | undefined): void {\r\n completedCaption.value = caption || \"An unknown error occurred\";\r\n isCompleted.value = true;\r\n }\r\n\r\n function getErrorOrDefault(error?: string | null | undefined): string {\r\n return error || \"An unknown error occurred\";\r\n }\r\n\r\n const uiState = {\r\n init(state: { loginMethod: LoginMethod }): void {\r\n // Clear the error, switch the login method, and set the MFA state.\r\n errorMessage.value = null;\r\n loginMethod.value = state.loginMethod;\r\n mfa.value = null;\r\n },\r\n\r\n initMfaFactor(state: { loginMethod: LoginMethod, mfa: Mfa }): void {\r\n // Clear the error, switch the login method, and set the MFA state.\r\n errorMessage.value = null;\r\n loginMethod.value = state.loginMethod;\r\n mfa.value = state.mfa;\r\n },\r\n\r\n criticalError(state: { errorMessage: string | null }): void {\r\n // Set the critical error message and leave everything else untouched.\r\n criticalErrorMessage.value = state.errorMessage;\r\n },\r\n\r\n error(state: { errorMessage: string | null }): void {\r\n // Set the error but do not modify the login method or MFA state.\r\n errorMessage.value = getErrorOrDefault(state.errorMessage);\r\n },\r\n\r\n valid(): void {\r\n // Clear the error but do not modify the login method or MFA state.\r\n errorMessage.value = null;\r\n },\r\n\r\n confirmationRequired(state: { caption: string | null }): void {\r\n // Clear the error and MFA state even though\r\n // this will transition to the completed state\r\n // where those fields are hidden.\r\n errorMessage.value = null;\r\n mfa.value = null;\r\n showCompleted(state.caption);\r\n },\r\n\r\n passwordlessCodeSent(): void {\r\n // Clear the error but do not modify the MFA state.\r\n errorMessage.value = null;\r\n },\r\n\r\n passwordlessResendCode(): void {\r\n // Clear the error but do not modify the MFA state.\r\n errorMessage.value = null;\r\n },\r\n\r\n unsupportedMfaFactor(): void {\r\n errorMessage.value = null;\r\n mfa.value = {\r\n is2FANotSupportedForAuthenticationFactor: true,\r\n ticket: null,\r\n credentialLogin: null,\r\n passwordless: null\r\n };\r\n }\r\n };\r\n\r\n //#endregion\r\n\r\n onMounted(() => {\r\n // Redirect since already authenticated.\r\n if (config.shouldRedirect) {\r\n // If the redirect URL is not set, then redirect to the default route.\r\n navigate(config.redirectUrl ? config.redirectUrl : \"/\");\r\n return;\r\n }\r\n\r\n if (mfaParameter) {\r\n uiState.initMfaFactor({\r\n mfa: {\r\n credentialLogin: null,\r\n passwordless: {\r\n isEmailAndMobilePhoneMissing: false,\r\n isError: false\r\n },\r\n ticket: mfaParameter,\r\n },\r\n loginMethod: LoginMethod.Passwordless\r\n });\r\n }\r\n else if (config.is2FANotSupportedForAuthenticationFactor) {\r\n uiState.unsupportedMfaFactor();\r\n }\r\n else {\r\n uiState.init({\r\n loginMethod: getInitialLoginMethod()\r\n });\r\n }\r\n });\r\n\r\n const [ mfaParameter, ..._ ] = removeCurrentUrlQueryParams(\"Mfa\", \"State\", \"Code\", \"IsPasswordless\", \"state\", \"code\", \"scope\", \"authuser\", \"prompt\");\r\n\r\n onConfigurationValuesChanged(useReloadBlock());\r\n</script>"],"names":["bootstrapBreakpointInjectionKey","Symbol","provideBreakpoint","breakpoint","provide","useBreakpoint","inject","breakpointDisplays","displayBreakpoints","Object","entries","reduce","swapped","_ref2","_ref3","_slicedToArray","key","value","_objectSpread","classes","keys","map","concat","breakpointHelperDiv","ref","internalBreakpoint","computed","get","set","newValue","emit","checkBreakpoint","_displayBreakpoints$d","display","getComputedStyle","newBreakpoint","onWindowResized","onMounted","addEventListener","onBeforeUnmount","removeEventListener","id","newGuid","mountPoint","mountedWrapper","mountedNodes","mountHtml","mountedWrapperElement","mountPointElement","parentElement","childNodes","length","i","childNode","insertBefore","push","removeChild","unmountHtml","nodesToRemove","_iterator","_createForOfIteratorHelper","_step","s","n","done","node","err","e","f","watch","props","html","_ref","newHtml","newMount","_ref4","oldHtml","_oldMount","undefined","tempDiv","document","createElement","innerHTML","_div$parentElement","div","getElementById","createComment","remove","username","password","rememberMe","usernameFieldLabel","newAccountButtonText","isMobile","isMobileForced","onCredentialLoginSubmitted","onForgotAccountClicked","onRegisterClicked","isContentVisible","content","dividerClassRef","isVertical","styleInject","css","insertAt","head","getElementsByTagName","style","type","firstChild","appendChild","styleSheet","cssText","createTextNode","externalLogins","_props$modelValue$fil","_props$modelValue","modelValue","filter","l","authenticationType","hasExternalLogins","isCaptionNotEmpty","caption","onExternalLoginClick","externalLogin","internalLoginMethod","useVModelPassthrough","onSignInWithAccountClicked","LoginMethod","InternalDatabase","onSignInWithEmailOrPhoneClicked","Passwordless","label","validationErrors","phoneNumberConfig","emailOrPhoneNumberRaw","emailOrPhoneNumber","validateEmailOrPhoneNumber","onPasswordlessLoginStartSubmitted","validateForm","getConfiguredRules","_phoneNumberConfig$va","rules","configuredRules","bag","loadPhoneNumberConfig","_loadPhoneNumberConfig","apply","arguments","_asyncToGenerator","getPhoneNumberConfiguration","errorMessages","validateValue","errorMessage","name","text","errors","validateEmail","email","phoneNumber","shouldSendEmailCode","shouldSendEmailLink","shouldSendSmsCode","formattedNumber","formatPhoneNumber","stripPhoneNumber","validatePhoneNumber","isEmail","_rule$match","rule","regex","RegExp","match","test","internalSubmitPasswordlessLoginVerification","instructionsDiv","internalCode","code","internalCommunicationType","communicationType","internalMatchingPeople","_props$modelValue$mat","matchingPeople","internalMatchingPersonValue","matchingPersonValue","onPasswordlessLoginVerifySubmitted","onResendCodeClicked","onCodeCompleted","_instructionsDiv$valu","_instructionsDiv$valu2","signInButton","querySelector","focus","passwordlessLoginStartRequest","passwordlessLoginVerifyOptions","isPersonSelectionRequired","_props$modelValue2","_props$modelValue3","state","_props$modelValue4","submitPasswordlessLoginVerification","passwordlessLoginStep","isStart","internalStep","PasswordlessLoginStep","Start","isVerify","Verify","_props$modelValue$cod","internalState","_props$modelValue$sta","step","onResendCode","onStartPasswordlessLogin","onVerifyPasswordlessLogin","_onVerifyPasswordlessLogin","newPasswordlessLoginOptions","oldPasswordlessLoginOptions","isAutomaticVerificationRequired","onUnmounted","config","useConfigurationValues","invokeBlockAction","useInvokeBlockAction","isAuthenticating","shouldRedirect","completedCaption","criticalErrorMessage","isNavigating","passwordlessLoginOptions","_config$passwordlessA","passwordlessAutoVerifyOptions","_config$passwordlessA2","isCompleted","mfa","twoFactorEmailPhoneNotAvailableMessage","_config$twoFactorEmai","twoFactorEmailPhoneRequiredMessage","_config$twoFactorEmai2","twoFactorLoginNotAvailableMessage","_config$twoFactorLogi","twoFactorLoginRequiredMessage","_config$twoFactorLogi2","twoFactorNotSupportedByAuthenticationMethodMessage","_config$twoFactorNotS","areBothInternalAuthProvidersVisible","isInternalDatabaseLoginSupported","isPasswordlessLoginSupported","isAnyExternalAuthProviderVisible","_config$externalAuthP","externalAuthProviderButtons","areSecondaryAndPrimaryAuthVisible","isAnyInternalAuthProviderVisible","loginMethod","mfaMessage","_mfa$value$passwordle","_mfa$value$credential","passwordless","isError","isEmailAndMobilePhoneMissing","credentialLogin","isUsernameAndPasswordMissing","is2FANotSupportedForAuthenticationFactor","currentMfaFactor","mfaDetails","console","error","onCredentialLogin","_x","_onCredentialLogin","_mfa$value5","mfaTicket","ticket","response","responseBag","data","isSuccess","uiState","isLockedOut","_responseBag$errorMes","criticalError","isAuthenticated","valid","navigate","redirectUrl","isConfirmationRequired","confirmationRequired","_responseBag$mfa$tick","initMfaFactor","onExternalLogin","_x2","_onExternalLogin","route","location","pathname","_response$data","onForgotAccount","_onForgotAccount","_config$helpPageUrl","helpPageUrl","onLoginMethodPickerChanged","init","onPasswordlessLoginStart","_x3","_onPasswordlessLoginStart","_mfa$value6","_response$data2","isSuccessful","onPasswordlessLoginVerify","_x4","_onPasswordlessLoginVerify","_mfa$value7","_response$data$errorM","_response$data$mfa$ti","isRegistrationRequired","registrationUrl","onRegister","_onRegister","_config$newAccountPag","newAccountPageUrl","getInitialLoginMethod","configuredDefaultLoginMethod","defaultLoginMethod","_x5","_navigate","url","window","href","Promise","_resolve","_reject","showCompleted","getErrorOrDefault","passwordlessCodeSent","passwordlessResendCode","unsupportedMfaFactor","mfaParameter","_removeCurrentUrlQuer","removeCurrentUrlQueryParams","_removeCurrentUrlQuer2","_toArray","slice","onConfigurationValuesChanged","useReloadBlock"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA8BA,IAAMA,+BAA8D,GAAGC,MAAM,CAAC,sBAAsB,CAAC,CAAA;MAK9F,SAASC,iBAAiBA,CAACC,UAA2B,EAAQ;MACjEC,EAAAA,OAAO,CAACJ,+BAA+B,EAAEG,UAAU,CAAC,CAAA;MACxD,CAAA;MAKO,SAASE,aAAaA,GAAoB;MAC7C,EAAA,IAAMF,UAAU,GAAGG,MAAM,CAACN,+BAA+B,CAAC,CAAA;QAE1D,IAAI,CAACG,UAAU,EAAE;MACb,IAAA,MAAM,2NAA2N,CAAA;MACrO,GAAA;MAEA,EAAA,OAAOA,UAAU,CAAA;MACrB;;;;;;;MC/BI,IAAA,IAAMI,kBAAuD,GAAG;MAC5D,MAAA,IAAI,EAAE,MAAM;MACZ,MAAA,IAAI,EAAE,QAAQ;MACd,MAAA,IAAI,EAAE,cAAc;MACpB,MAAA,IAAI,EAAE,OAAO;MACb,MAAA,IAAI,EAAE,OAAA;WACT,CAAA;MAED,IAAA,IAAMC,kBAA8C,GAAGC,MAAM,C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