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GC,SAAU,WAsJtEhF,OAAOiF,UAAYjF,OAAOiF,WAAa,GACvCjF,OAAOiF,UAAUP,KAAKhG,KA5JNf,EA+HpB,SAAwBuH,EAAKC,GACzB,IAAIC,EAAQF,EAAIG,QAAQF,GACxB,OAAkB,IAAXC,EAAeF,EAAIzC,MAAM2C,EAAQD,EAAK5C,QAAU2C,CAC3D,CAlIyCI,CAAeT,EAAEU,gBAAgBC,QAAS,YAC/DnE,IACAlE,EAAa2E,cAAcf,OAAO,CAAEgE,IAAK,EAAGC,SAAU,WAK1D,IAIJjB,WAAW1G,GAAe4G,GAAG,uBAAuB,KAChD5C,GAAkB,GACpB,G","sources":["webpack://wwwroot/./src/scripts/contactTout.js"],"sourcesContent":["/* global $$epiforms */\r\n\r\nconst formSection = document.querySelector(\".adm-section-c32-popup\");\r\nconst popupOpener = document.querySelector(\".adm-btn-c32-popup-opener\");\r\nconst popupElement = formSection.querySelector(\".adm-div-c32-popup\");\r\nconst pageMainTag = document.querySelector(\"main\");\r\nconst epiServerForm = formSection.querySelector(\".EPiServerForms\");\r\nconst epiFormMainBody = formSection.querySelector(\".Form__MainBody\");\r\nconst formCloseBtn = formSection.querySelector(\".adm-btn-c32-popup-close\");\r\nconst formSubmitButton = formSection.querySelector(\".FormSubmitButton\");\r\nconst formTextareaWrapper = formSection?.querySelector(\".FormTextbox--Textarea\");\r\nconst formStatusSection = formSection?.querySelector(\".Form__Status\");\r\nvar submitErrorMessage = formSection?.getAttribute(\"data-submit-error\");\r\nconst allFormSelections = formSection.querySelectorAll(\".FormSelection\");\r\nconst allFormInputs = formSection?.querySelectorAll(\".FormTextbox\");\r\nconst allFormErrorSpans = formSection.querySelectorAll(\".Form__Element__ValidationError\");\r\nconst submitBtnAriaLabel = formSection?.getAttribute(\"data-form-aria-submit\");\r\nconst firstDropdownDefault = document.querySelector(\"input#MQ1\")?.value?.trim();\r\nconst secondDropdownDefault = document.querySelector(\"input#MQ2\")?.value?.trim();\r\nlet firstFocusableFormElement = epiFormMainBody?.querySelector(\"input, select, textarea, button\");\r\nformSection.removeAttribute(\"data-form-aria-submit\");\r\nformSection.removeAttribute(\"data-recaptcha-validation\");\r\n\r\nlet formSubmissionErrorTag;\r\nlet scrollTop = 0;\r\nlet dataLayerObj = {};\r\n\r\nsetupDropdowns();\r\nsetupInputs();\r\naddEventListenersToFormBtns();\r\nreplaceErrorSpanTag();\r\naddCharCounterToTextarea();\r\naddAriaLabelToElements();\r\nsetupLeadSourceDescription();\r\naddFunctionsToNativeEpiformEvents();\r\n\r\n// Lvl1 functions\r\nfunction setupDropdowns() {\r\n for (const selectionWrapper of allFormSelections) {\r\n const selectTag = selectionWrapper.querySelector(\"select\");\r\n\r\n if (firstDropdownDefault) {\r\n setupSecondDropdown(selectionWrapper, selectTag);\r\n setupFirstDropdown(selectTag);\r\n }\r\n\r\n selectTag.addEventListener(\"change\", () => removeErrorOnInput(selectionWrapper));\r\n selectTag.addEventListener(\"focusout\", () => removeRedOutlinePriority());\r\n }\r\n}\r\n\r\nfunction setupInputs() {\r\n for (const inputWrapper of allFormInputs) {\r\n const inputTag = inputWrapper.querySelector(\"input, textarea\");\r\n\r\n inputTag.addEventListener(\"input\", () => removeErrorOnInput(inputWrapper));\r\n inputTag.addEventListener(\"focusout\", () => removeRedOutlinePriority());\r\n }\r\n}\r\n\r\nfunction addEventListenersToFormBtns() {\r\n popupOpener?.addEventListener(\"click\", openPopup)\r\n formCloseBtn?.addEventListener(\"click\", closeForm);\r\n formCloseBtn?.addEventListener(\"keydown\", focusOnSubmitBtn);\r\n formSubmitButton?.addEventListener(\"keydown\", focusOnCloseBtn);\r\n}\r\n\r\nfunction replaceErrorSpanTag() {\r\n for (const errorSpanTag of allFormErrorSpans) {\r\n errorSpanTag.parentElement.insertBefore(errorSpanTag, errorSpanTag.parentElement.firstElementChild.nextElementSibling);\r\n }\r\n}\r\n\r\nfunction addCharCounterToTextarea() {\r\n const textareaTag = formTextareaWrapper?.querySelector(\"textarea\");\r\n const counterTag = document.createElement(\"SPAN\");\r\n counterTag.innerText = \"(0/1500)\";\r\n counterTag.classList.add(\"textarea-counter\");\r\n formTextareaWrapper?.appendChild(counterTag);\r\n textareaTag?.setAttribute(\"maxlength\", \"1500\")\r\n formTextareaWrapper?.addEventListener(\"input\", () => {\r\n const charCount = textareaTag.value.length;\r\n if (charCount <= 1500) {\r\n counterTag.innerText = `(${charCount}/1500)`;\r\n } else {\r\n const editedText = textareaTag.value.slice(0, 1500);\r\n textareaTag.value = editedText;\r\n }\r\n })\r\n}\r\n\r\nfunction addAriaLabelToElements() {\r\n formSubmitButton.setAttribute(\"aria-label\", submitBtnAriaLabel);\r\n formSubmitButton.setAttribute(\"title\", submitBtnAriaLabel);\r\n}\r\n\r\nfunction setupLeadSourceDescription() {\r\n const hiddenField = formSubmitButton.previousElementSibling;\r\n const sourceDescription = getSourceDescription();\r\n const fullNewValue = hiddenField?.getAttribute(\"value\") + \"-\" + sourceDescription;\r\n hiddenField.setAttribute(\"value\", fullNewValue);\r\n}\r\n\r\nfunction getSourceDescription() {\r\n const validUtmParamsKeys = [\"utm_source\", \"utm_medium\", \"utm_campaign\", \"utm_content\", \"utm_term\", \"utm_adgroup\", \"utm_experiment\"];\r\n const currentPageUrl = `${location.origin}${location.pathname}`;\r\n const urlParams = new URL(document.URL).searchParams;\r\n let validUtmParamsString = \"\";\r\n\r\n validUtmParamsKeys.forEach(paramKey => {\r\n const paramValue = urlParams.get(paramKey);\r\n const isFirstValidParamFound = validUtmParamsString.length < 1;\r\n\r\n if (paramValue) {\r\n validUtmParamsString += `${isFirstValidParamFound ? \"?\": \"&\"}${paramKey}=${paramValue}`;\r\n }\r\n })\r\n\r\n return currentPageUrl + validUtmParamsString;\r\n}\r\n\r\nfunction addFunctionsToNativeEpiformEvents() {\r\n if (typeof $$epiforms !== 'undefined') {\r\n $$epiforms(document).ready(() => {\r\n $$epiforms(epiServerForm).on(\"formsStepValidating\", () => {\r\n handleReadonlyMode();\r\n formSection.classList.add(\"adm-form-red-outline-priority\");\r\n });\r\n\r\n $$epiforms(epiServerForm).on(\"formsStartSubmitting\", () => {\r\n setupDataLayerObj();\r\n });\r\n\r\n $$epiforms(epiServerForm).on(\"formsSubmitted\", (e) => {\r\n formSubmissionErrorTag?.remove();\r\n if (!e.isSuccess) {\r\n submitErrorMessage = sliceAfterWord(e.returnedResult?.message, \"Reason: \")\r\n showErrorMessage();\r\n popupElement.parentElement.scroll({ top: 0, behavior: \"smooth\" });\r\n } else {\r\n formSection.classList.add(\"form-submitted\");\r\n popupElement.parentElement.scroll({ top: 0, behavior: \"smooth\" });\r\n pushDataLayer();\r\n }\r\n\r\n });\r\n\r\n $$epiforms(epiServerForm).on(\"formsSubmittedError\", () => {\r\n showErrorMessage();\r\n });\r\n });\r\n }\r\n}\r\n\r\n// Lvl2 functions\r\nfunction setupSecondDropdown(selectionWrapper, selectTag) {\r\n if (selectTag.getAttribute(\"title\")?.trim()?.toLowerCase() === firstDropdownDefault.toLowerCase()) {\r\n selectionWrapper.classList.remove(\"hide\");\r\n if (secondDropdownDefault) {\r\n selectTag.value = secondDropdownDefault;\r\n selectTag.dispatchEvent(new Event('change'));\r\n }\r\n }\r\n}\r\n\r\nfunction setupFirstDropdown(selectTag) {\r\n for (const option of selectTag?.options ?? []) {\r\n if (option.value === firstDropdownDefault) {\r\n selectTag.value = firstDropdownDefault;\r\n selectTag.dispatchEvent(new Event('change'));\r\n }\r\n }\r\n}\r\n\r\nfunction removeErrorOnInput(fieldWrapper) {\r\n const validationMessage = fieldWrapper.querySelector(\".Form__Element__ValidationError\");\r\n if (fieldWrapper.classList.contains(\"ValidationFail\")) {\r\n fieldWrapper.classList.remove(\"ValidationFail\")\r\n validationMessage.style.display = \"none\";\r\n }\r\n}\r\n\r\nfunction removeRedOutlinePriority() {\r\n if (formSection.classList.contains(\"adm-form-red-outline-priority\")) {\r\n formSection.classList.remove(\"adm-form-red-outline-priority\");\r\n }\r\n}\r\n\r\nfunction openPopup(event) {\r\n event.preventDefault();\r\n window.addEventListener(\"mousedown\", onOutsideFormClick);\r\n\r\n scrollTop = window.scrollY;\r\n\r\n formSection.classList.add(\"adm-gateway-opened\");\r\n document.body.classList.add(\"adm-body-no-scroll\");\r\n\r\n pageMainTag.style[\"margin-top\"] = `-${scrollTop}px`;\r\n setTimeout(() => {\r\n firstFocusableFormElement?.focus();\r\n }, 0);\r\n}\r\n\r\nfunction onOutsideFormClick(event) {\r\n const screenWidth = window.innerWidth;\r\n const clickPositionX = event.clientX;\r\n\r\n if (\r\n formSection.contains(event.target) &&\r\n !popupElement.contains(event.target) &&\r\n clickPositionX < screenWidth - 20\r\n ) {\r\n closeForm(event);\r\n }\r\n}\r\n\r\nfunction closeForm(event) {\r\n event?.preventDefault();\r\n window.removeEventListener(\"mousedown\", onOutsideFormClick);\r\n\r\n formSection.classList.remove(\"adm-gateway-opened\");\r\n document.body.classList.remove(\"adm-body-no-scroll\");\r\n\r\n pageMainTag.style[\"margin-top\"] = ``;\r\n window.scroll(0, scrollTop);\r\n setTimeout(() => popupOpener.focus(), 0);\r\n}\r\n\r\nfunction focusOnSubmitBtn (event) {\r\n const pressedKeyCode = event.which || event.keyCode;\r\n\r\n // TAB key press\r\n if (pressedKeyCode === 9 && event.shiftKey) {\r\n event.preventDefault();\r\n formSubmitButton.focus();\r\n }\r\n}\r\n\r\nfunction focusOnCloseBtn (event) {\r\n const pressedKeyCode = event.which || event.keyCode;\r\n\r\n // TAB key press\r\n if (pressedKeyCode === 9 && !event.shiftKey) {\r\n event.preventDefault();\r\n formCloseBtn.focus();\r\n }\r\n}\r\n\r\nasync function handleReadonlyMode() {\r\n const response = await fetch(window.location.origin + '/FormsPage/GetDatabaseReadonly/');\r\n const readonlyBoolean = await response.json();\r\n if (readonlyBoolean) {\r\n formSection.classList.add(\"adm-c32-popup-maintenance-mode\");\r\n }\r\n}\r\n\r\nfunction showErrorMessage() {\r\n formSubmissionErrorTag = document.createElement(\"SPAN\");\r\n formSubmissionErrorTag.innerText = submitErrorMessage;\r\n formSubmissionErrorTag.classList.add(\"adm-c32-popup-custom-error-message\");\r\n formStatusSection.appendChild(formSubmissionErrorTag)\r\n}\r\n\r\nfunction sliceAfterWord(str, word) {\r\n let index = str.indexOf(word);\r\n return index !== -1 ? str.slice(index + word.length) : str;\r\n}\r\n\r\nfunction setupDataLayerObj() {\r\n const allVisibleSelects = formSection.querySelectorAll(\".FormSelection:not(.hide) select\");\r\n const allInputElements = formSection.querySelectorAll(\".FormTextbox input\");\r\n const colectedData = [];\r\n\r\n colectedData.push(['event', 'contactuspopupformsuccess']);\r\n colectedData.push(['email_address', allInputElements[2]?.value?.toLowerCase()]);\r\n colectedData.push(['phone_number', allInputElements[3]?.value?.toLowerCase()]);\r\n colectedData.push(['industry_primary_selected', allVisibleSelects[0]?.value?.toLowerCase()]);\r\n\r\n if (allVisibleSelects.length > 2) {\r\n colectedData.push(['industry_sub_selected', allVisibleSelects[1]?.value?.toLowerCase()]);\r\n }\r\n\r\n dataLayerObj = {};\r\n for (const data of colectedData) {\r\n if (data[1]) {\r\n dataLayerObj[data[0]] = data[1];\r\n }\r\n }\r\n}\r\n\r\nfunction pushDataLayer() {\r\n window.dataLayer = window.dataLayer || [];\r\n window.dataLayer.push(dataLayerObj);\r\n}"],"names":["formSection","document","querySelector","popupOpener","popupElement","pageMainTag","epiServerForm","epiFormMainBody","formCloseBtn","formSubmitButton","formTextareaWrapper","formStatusSection","submitErrorMessage","getAttribute","allFormSelections","querySelectorAll","allFormInputs","allFormErrorSpans","submitBtnAriaLabel","firstDropdownDefault","value","trim","secondDropdownDefault","formSubmissionErrorTag","firstFocusableFormElement","removeAttribute","scrollTop","dataLayerObj","setupSecondDropdown","selectionWrapper","selectTag","toLowerCase","classList","remove","dispatchEvent","Event","setupFirstDropdown","option","options","removeErrorOnInput","fieldWrapper","validationMessage","contains","style","display","removeRedOutlinePriority","openPopup","event","preventDefault","window","addEventListener","onOutsideFormClick","scrollY","add","body","setTimeout","focus","screenWidth","innerWidth","clickPositionX","clientX","target","closeForm","removeEventListener","scroll","focusOnSubmitBtn","which","keyCode","shiftKey","focusOnCloseBtn","showErrorMessage","createElement","innerText","appendChild","setupDropdowns","inputWrapper","inputTag","setupInputs","errorSpanTag","parentElement","insertBefore","firstElementChild","nextElementSibling","replaceErrorSpanTag","textareaTag","counterTag","setAttribute","charCount","length","editedText","slice","addCharCounterToTextarea","hiddenField","previousElementSibling","sourceDescription","validUtmParamsKeys","currentPageUrl","location","origin","pathname","urlParams","URL","searchParams","validUtmParamsString","forEach","paramKey","paramValue","get","isFirstValidParamFound","getSourceDescription","fullNewValue","setupLeadSourceDescription","$$epiforms","ready","on","async","response","fetch","json","handleReadonlyMode","allVisibleSelects","allInputElements","colectedData","push","data","setupDataLayerObj","e","isSuccess","top","behavior","dataLayer","str","word","index","indexOf","sliceAfterWord","returnedResult","message"],"sourceRoot":""}