{"version":3,"sources":["../../src/js/adf-scripts.js"],"names":["chunkArray","arr","chunkSize","chunk","arrayLength","length","tempArray","index","slice","push","dynamicSort","property","sortOrder","substr","a","b","result","hasClass","el","cls","className","match","RegExp","addClass","removeClass","reg","replace","activateElement","deactivateElement","hideElement","showElement","getMonthDiff","dateFrom","dateTo","getMonth","getFullYear","getYearDiff","addMonths","date","months","d","getDate","setMonth","setDate","contains","selector","text","els","getAll","filter","call","test","textContent","clearElement","firstChild","removeChild","root","document","Array","prototype","querySelectorAll","getClosestEl","closestNode","closest","getSiblings","siblings","sibling","parentNode","nodeType","nextSibling","triggerEvent","evt","dispatchEvent","Event","increaseOnly","minAmount","event","target","value","isNaN","parseFloat","clearValue","getSelectedOptionAttribute","attr","options","selectedIndex","getAttribute","getSelectedOptionText","getSelectedOptionValue","selectOption","valueToSelect","clearOptions","childNodes","lastChild","createDesignationOption","option","opt","createElement","guid","name","setAttribute","lookupId","redirectURL","nodeName","toLowerCase","add","appendChild","createISOOption","obj","Id","Description","ISO","createOptGroup","dropdown","group","objs","optGroup","forEach","createOption","getUrlVars","vars","parts","window","location","href","m","key","numToFloat","num","decPlaces","toFixed","disableFields","fields","disabled","field","type","checked","enableFields","hidePage","body","querySelector","showPage","goToTop","scrollTo","addEventListener","removeSavedData","localStorage","removeItem","initForm","ui","bulmaCollapsible","attach","collapseCheckbox","previousElementSibling","click","collapsible","getElementById","elems","tabContentID","tabContent","otherTabs","getPreSelectedDesignation","designationId","designation","allDesignations","altLookupId","getPreSelectedData","preSelectedDesignation","JSON","parse","dataset","hidePreSelectedDesignation","innerText","showPreSelectedDesignation","editStatus","removeStatus","stringify","addPreSelectedDonation","amount","edit","remove","preSelectedGift","addPreSelectedGiftRow","preSelectDonation","hasParams","searchParams","has","preSelectedDesignations","preSelectedAmounts","get","giftCount","displayNextStep","isPreSelectedFundOnly","preSelectCategory","selectCategory","val","setTimeout","category","categoryIDs","categories","split","theForm","unitDropdowns","preSelectScode","sCode","getAppeals","qs","BLACKBAUD","api","QueryService","getResults","appealGUID","data","matchedAppeal","Rows","Values","appealID","createCheckoutForm","paymentForm","newForm","formtype","novalidate","checkoutFunctions","checkoutComplete","bbcheckout","postCheckoutFinish","setupConfirmation","checkoutError","console","log","checkoutExpired","enableNextButtons","checkoutReady","browserClose","checkoutCancel","checkoutLoaded","InitializeBBCheckout","BBCheckoutProcessor","checkoutModel","APIControllerName","TokenId","Configuration","Data","Key","PublicKey","TransactionType","ClientAppName","MerchantAccountId","IsEmailRequired","IsNameVisible","PrimaryColor","SecondaryColor","FontFamily","UseCaptcha","WorkflowType","WorkFlowType","HandleBrowserClosing","APITokenID","TempConfirmationHtml","intializeCheckout","makePayment","donor","donation","Donor","Amount","BillingAddressCity","Address","City","BillingAddressCountry","Country","BillingAddressLine","StreetAddress","BillingAddressPostCode","PostalCode","BillingAddressState","State","BillingAddressEmail","EmailAddress","BillingAddressFirstName","FirstName","MiddleName","BillingAddressLastName","LastName","Cardholder","UseVisaCheckout","Gift","Recurrence","UseMasterpass","UseApplePay","Card_Not_Present","CardToken","ProcessNow","DataKey","Store_Card","DonationSource","ADF","Type","TranType","Donation","DonorInfo","openCheckout","processPayment","ds","validateDonationRequest","errors","submitDonation","createDonation","returnedDonation","PaymentMethod","getConfirmation","search","returnedErrors","isCreditCard","isRecurring","giftType","getTotalGiftAmount","numberOfInstallments","parseInt","numPaymentsField","createAttribute","attribute","concatAttr","AttributeId","Value","saveSpecifiedFund","fund","setItem","getSpecifiedFund","mygift","Attributes","specifiedFund","getPledgeInstallments","pledgeInstallments","installmentAmount","getRecurringGiftInstallmentAmount","totalGiftAmount","NumberOfInstallments","InstallmentAmount","disableNextButtons","isInternational","maybeInternational","paymentMethod","Title","Phone","Comments","IsCorporate","Origin","PageId","pageId","PartId","partId","ClientSitesID","BBSPTemplateSitePageId","processorGUID","BBSPReturnUri","urlFinderNumber","FinderNumber","OrganizationName","attributes","isActive","id","indexOf","isTribute","tribute","isTributeChecked","hasAcknowledgee","TributeDefinition","notifyAddress","notifyCity","notifyFirstName","notifyLastName","notifyZip","notifyState","Acknowledgee","AddressLines","Tribute","designations","gift","giftAmount","DesignationId","Designations","recurrence","DayOfMonth","Date","EndDate","StartDate","Frequency","Month","PledgeInstallment","DirectDebitInformation","FinancialInstitution","BranchName","AccountHolderName","BankingType","RoutingNumber","AccountNumber","AccountType","AppealId","isFundSelected","input","isInputChecked","checkedInput","elements","createDropdown","showFunds","nextField","designationType","designationAreas","designationFunds","selectedUnit","hideFunds","nextElementSibling","allNotFeaturedSubFunds","giftAreas","concat","giftFunds","notFeaturedFunds","clearUnits","giftUnits","clearSpecifiedFund","hideGiftLevels","handleFundChange","addGiftLevelRow","level","row","infoLink","displayGiftLevels","levels","giftLevels","maybeGiftLevels","isArray","updateRecurrenceTotalAmount","numPayments","updateRecurrenceDates","today","startDate","endDate","giftFrequency","setFullYear","localeEndDate","toLocaleDateString","year","month","day","setRecurrenceFields","updateFrequencyText","enableMemorialTribute","helpText","tributeFields","clearTributeFields","notifyControl","clearNotifyFields","notifyFields","disableMemorialTribute","tributeToggle","toggleMemorialTribute","setFrequency","showHideBanner","banner","currentStep","initGiftButtons","editButtons","removeButtons","editGift","removeGift","updateButtonText","nextButtons","updateNextButtons","buttonText","updatePreviousButtons","prevButtons","hasAttribute","updateCancelButtons","cancelButtons","isAnotherGift","editingGift","updateStepMarkers","stepMarkers","i","updateStepMarkerText","normalText","completedText","displayStep","formSteps","handleAmountChange","getCurrentStep","displayPreviousStep","arg","currentTarget","cancelStep","clearGiftFields","restoreDesignationSearch","restoreSpecifiedDesignation","restoreDropdown","restoreDropdowns","selectedDesignation","selectDesignation","designationButtons","getGiftIndex","tryMatchingAmount","amountButtons","matchedAmount","setOtherAmount","blur","restoreAmount","Number","isInteger","restoreGift","giftIndex","updateGiftAmounts","updateGiftAmountTotal","myGifts","giftAmountTotals","giftAmountTotal","updateGiftAmount","updateReviewInfo","giftAmounts","thisButton","rowIndex","gifts","giftRowsContainers","giftRowIndex","getGiftAmount","selectedAmount","getGift","searchResult","isSearchResult","isSpecifiedFund","giftUnit","giftArea","giftFund","createGift","updateGiftRow","giftRows","getGiftRowTemplate","template","cloneNode","removeAttribute","addGiftRow","clone","insertBefore","giftFundCategory","fundCategories","giftFundUnit","giftFundArea","giftFundId","giftFundText","amountField","editButton","removeButton","getRecurringPayments","recurringGiftAmount","getGiftFrequency","URLSearchParams","checkoutData","displayDesignations","designationUnits","fundDropdowns","searchFunds","specifyFund","giftAmountOtherButton","giftAmountOther","frequencyButtons","paymentButtons","growingFields","addButtons","userEnteredFinder","finderNumber","sortGiftLevels","sortedLevels","pop","sort","getGiftLevels","fundGroup","getDesignationValues","values","isPriority","isFeatured","isMemTrib","removeArrayObj","item","removeBadData","hasOwnProperty","getAllDesignations","isDuplicate","found","splice","findIndex","getDisplayDesignations","getDesignationCategories","getCategoryGroups","categoryGroups","reduce","r","addOptions","opts","addGroupedOptions","groups","populateUnitDropdown","units","addLooseFunds","funds","looseFunds","getGroups","addGroupedFunds","groupedFunds","populateFundDropdown","getFunds","getAreas","unit","hasArea","area","getUnits","useOrOperator","str","getSearchResults","fuse","searchBox","searchField","searchResults","searchResultsLabels","noResultsFound","len","searchTerms","trim","results","resultsLen","searchDesignations","Fuse","shouldSort","threshold","minMatchCharLength","keys","distance","useExtendedSearch","debounce","processDesignations","doSearch","queryGUID","success","container","error","cts","CodeTableService","usesCodeTable","getEntries","cs","CountryService","countrySelect","getCountries","countries","country","provinceTextControl","provinceText","provinceSelectControl","provinceSelect","getStates","states","state","fv1","FormValidation","formValidation","validators","callback","message","notEmpty","plugins","trigger","Trigger","bulma","Bulma","defaultMessageContainer","rowSelector","aria","Aria","Message","clazz","utils","excluded","Excluded","on","activeCategorySelect","assign","from","revalidateField","fv2","honorIsChecked","isPledge","fv3","regexp","stringLength","max","payrollIsChecked","declarative","Declarative","html5Input","validate","e","keyIdentifier","keyCode","preventDefault","notFeatured","focus","existingPledge","measureText","style","width","offsetWidth","loadForm","showSpecifiedFund","getItem","unmappedFund","showRecurrenceSummary","recurrenceInfo","frequency","showDirectDebitSummary","isDirectDebit","payOptRow","insertConfirmationHtml","confirmationHtml","innerHTML","donationId","getDonationConfirmationHtml","returnedHtml","pageInformation","partid","DonationService","bbForm","theConfirmation","t","completeBBSPDonation","ErrorCode"],"mappings":"y9BAAC,CAAC,UAAY,CACZ,aAunFA,QAASA,CAAAA,CAAT,CAAoBC,CAApB,CAAyBC,CAAzB,CAAoC,CAIlC,OACMC,CAAAA,CADN,CAHMC,CAAW,CAAGH,CAAG,CAACI,MAGxB,CAFIC,CAAS,CAAG,EAEhB,CAASC,CAAK,CAAG,CAAjB,CAAoBA,CAAK,CAAGH,CAA5B,CAAyCG,CAAK,EAAIL,CAAlD,CACMC,CADN,CACcF,CAAG,CAACO,KAAJ,CAAUD,CAAV,CAAiBA,CAAK,CAAGL,CAAzB,CADd,CAEEI,CAAS,CAACG,IAAV,CAAeN,CAAf,CAFF,CAIA,MAAOG,CAAAA,CACR,CAED,QAASI,CAAAA,CAAT,CAAqBC,CAArB,CAA+B,CAC7B,GAAIC,CAAAA,CAAS,CAAG,CAAhB,CAKA,MAJoB,GAAhB,GAAAD,CAAQ,CAAC,CAAD,CAIZ,GAHEC,CAAS,CAAG,CAAC,CAGf,CAFED,CAAQ,CAAGA,CAAQ,CAACE,MAAT,CAAgB,CAAhB,CAEb,EAAO,SAAUC,CAAV,CAAaC,CAAb,CAAgB,CACrB,GAAIC,CAAAA,CAAM,CAAGF,CAAC,CAACH,CAAD,CAAD,CAAcI,CAAC,CAACJ,CAAD,CAAf,CAA4B,CAAC,CAA7B,CAAiCG,CAAC,CAACH,CAAD,CAAD,CAAcI,CAAC,CAACJ,CAAD,CAAf,CAA4B,CAA5B,CAAgC,CAA9E,CACA,MAAOK,CAAAA,CAAM,CAAGJ,CACjB,CACF,CAGD,QAASK,CAAAA,CAAT,CAAkBC,CAAlB,CAAsBC,CAAtB,CAA2B,CACzB,MAAOD,CAAAA,CAAE,CAACE,SAAH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CAUZqjB,CAAU,CAAG1lB,CAAU,GAAGkmB,CAVd,CAWd1qB,CAAG,OAXW,CAYd7B,EAAE,OAZY,CAadyb,EAAW,CAAG,CAbA,CAcd8D,EAAY,CAAG,CAdD,CAwmFd+M,CAAe,EAAIP,CAxmFL,CA0lFlB,UAA4B,CAW1Bna,CAAE,CAAC4a,oBAAH,CAAwBT,CAAxB,CAVgB,QAAVlF,CAAAA,OAAU,CAAU5U,CAAV,CAA4B,CAC1CE,CAAe,CAACF,CAAgB,CAACtM,EAAlB,CAChB,CAQD,CANc,QAARohB,CAAAA,KAAQ,CAAU1U,CAAV,CAA0B,CACF,GAAhC,GAAAA,CAAc,CAAC,CAAD,CAAd,CAAkBoa,SADgB,EAEpCvB,CAAQ,EAEX,CAED,CACD,CAGC,EAzmFgB,CA0mFP3f,CA1mFO,EA2mFhB2f,CAAQ,EAEX,CACD,GACD,CAhnFD,CA06FD,CA/6FA,G","sourcesContent":[";(function () {\r\n 'use strict'\r\n\r\n let root = document\r\n\r\n document.addEventListener('DOMContentLoaded', function () {\r\n function initBBIS() {\r\n const pageId = BLACKBAUD.api.pageInformation.pageId\r\n const partId = document.querySelector('.BBDonationApiContainer') ? document.querySelector('.BBDonationApiContainer').dataset.partid : null\r\n const ClientSitesID = document.querySelector('.BBDonationApiContainer')\r\n ? document.querySelector('.BBDonationApiContainer').getAttribute('ClientSitesID')\r\n : null\r\n const ds = new BLACKBAUD.api.DonationService(partId)\r\n const bbForm = document.getElementById('form1')\r\n const theForm = document.getElementById('baylor__adf')\r\n const theConfirmation = document.getElementById('baylor__adf-confirmation')\r\n const donationId = getUrlVars().t\r\n let els\r\n let el\r\n let currentStep = 0\r\n let giftRowIndex = 0\r\n // let isReturning = false\r\n\r\n function removeSavedData() {\r\n localStorage.removeItem('designations')\r\n localStorage.removeItem('specifiedFund')\r\n // localStorage.removeItem('savedHTML')\r\n // FormPersistence.clearStorage(bbForm, {\r\n // uuid: 'savedForm',\r\n // useSessionStorage: true,\r\n // })\r\n }\r\n\r\n function initForm() {\r\n root = theForm\r\n\r\n const searchParams = new URLSearchParams(window.location.search)\r\n const filter = Array.prototype.filter\r\n\r\n let donation = null\r\n let bbcheckout = null\r\n let checkoutModel = JSON.parse(checkoutData)\r\n\r\n let isAnotherGift = false\r\n let editingGift = false\r\n let isPreSelectedFundOnly = false\r\n let giftIndex = 0\r\n let allDesignations = []\r\n let displayDesignations = []\r\n let designationUnits = {}\r\n let designationAreas = {}\r\n let designationFunds = {}\r\n\r\n const academicFunds = 'Academic Areas'\r\n const campusFunds = 'Campus Life'\r\n const featuredFunds = 'Main Giving Page (Featured)'\r\n const priorityFunds = 'University Priorities'\r\n\r\n const fundCategories = {\r\n 'Academic Areas': 'Academics',\r\n 'Campus Life': 'Campus Life',\r\n 'Main Giving Page (Featured)': 'Featured',\r\n }\r\n\r\n let unitDropdowns = {}\r\n unitDropdowns[academicFunds] = 'unit-select-academics'\r\n unitDropdowns[campusFunds] = 'unit-select-campus-life'\r\n let fundDropdowns = {}\r\n fundDropdowns[featuredFunds] = 'fund-select-featured'\r\n fundDropdowns[priorityFunds] = 'fund-select-featured'\r\n let selectedUnit\r\n\r\n const designationButtons = getAll('[name=\"designation\"]')\r\n const giftUnits = getAll('.unit-select')\r\n const giftAreas = getAll('.area-select')\r\n const giftFunds = getAll('.fund-select')\r\n const searchFunds = getAll('.designation-search-select')\r\n const specifyFund = document.getElementById('specify-fund-checkbox')\r\n const giftAmountOtherButton = document.getElementById('gift-amount-other-button')\r\n const giftAmountOther = document.getElementById('gift-amount-other')\r\n const frequencyButtons = getAll('input[name=\"gift-type\"]')\r\n const paymentButtons = getAll('input[name=\"gift-payment-type\"]')\r\n const stepMarkers = getAll('.step-item')\r\n const growingFields = getAll('.is-growing')\r\n const addButtons = getAll('.step-action-add')\r\n const nextButtons = getAll('.step-action-next')\r\n const prevButtons = getAll('.step-action-previous')\r\n const cancelButtons = getAll('.step-action-cancel')\r\n const isTribute = document.getElementById('is-tribute')\r\n const userEnteredFinder = document.getElementById('donor-finder-number')\r\n let urlFinderNumber = document.getElementById('finder-number')\r\n\r\n let editButtons = null\r\n let removeButtons = null\r\n let giftFrequency = ''\r\n let appealID = ''\r\n\r\n const numPaymentsField = document.getElementById('gift-num-payments')\r\n\r\n const formSteps = []\r\n formSteps.push(theForm.querySelector('.js-step[data-step=\"1\"]'))\r\n formSteps.push(theForm.querySelector('.js-step[data-step=\"2\"]'))\r\n formSteps.push(theForm.querySelector('.js-step[data-step=\"3\"]'))\r\n formSteps.push(theForm.querySelector('.js-step[data-step=\"4\"]'))\r\n\r\n function ui() {\r\n // Collapsibles\r\n bulmaCollapsible.attach()\r\n els = getAll('[data-action=\"collapse\"]')\r\n if (els.length > 0) {\r\n els.forEach(function (el) {\r\n el.addEventListener('click', function (event) {\r\n let collapseCheckbox = el.previousElementSibling\r\n if (collapseCheckbox) {\r\n collapseCheckbox.click()\r\n }\r\n })\r\n })\r\n }\r\n\r\n els = getAll('.has-collapse-control')\r\n if (els.length > 0) {\r\n els.forEach(function (el) {\r\n const collapsible = document.getElementById(el.getAttribute('data-collapse'))\r\n if (collapsible) {\r\n const elems = el.querySelectorAll('input[type=\"radio\"]')\r\n\r\n if (elems.length > 0) {\r\n elems.forEach(function (el) {\r\n el.addEventListener('click', function (event) {\r\n if (hasClass(el, 'is-collapse-control')) {\r\n activateElement(collapsible)\r\n } else {\r\n deactivateElement(collapsible)\r\n }\r\n })\r\n })\r\n }\r\n }\r\n })\r\n }\r\n\r\n // Tabs\r\n els = getAll('.tab')\r\n if (els.length > 0) {\r\n els.forEach(function (el) {\r\n el.addEventListener('click', function (event) {\r\n let tabContentID = this.getAttribute('data-tab')\r\n let tabContent = tabContentID ? document.getElementById(tabContentID) : null\r\n\r\n if (tabContent) {\r\n let otherTabs = getSiblings(tabContent)\r\n if (otherTabs.length > 0) {\r\n otherTabs.forEach(function (el) {\r\n deactivateElement(el)\r\n })\r\n }\r\n activateElement(tabContent)\r\n }\r\n })\r\n })\r\n }\r\n }\r\n showUserEnteredFinder()\r\n getUrlFinderNumber()\r\n ui()\r\n\r\n //$.ajax({\r\n // url: bbisURL + 'components/custom.ashx?handler=ZuriGroup.BU.ADF.BBIS.DesignationHandler',\r\n // dataType: 'json',\r\n //})\r\n //.done(function (data) {\r\n // console.log(data);\r\n //})\r\n //.fail(function(xhr, desc, err) {\r\n // console.log('xhr: ' + xhr);\r\n // console.log('desc: ' + desc);\r\n // console.log('err: ' + err);\r\n //});\r\n\r\n function showUserEnteredFinder() {\r\n if (searchParams.has('showfinder')) {\r\n if (searchParams.get('showfinder') === '1') {\r\n showElement(userEnteredFinder)\r\n } else {\r\n hideElement(userEnteredFinder)\r\n }\r\n }\r\n }\r\n\r\n // Get Finder ID\r\n function getUrlFinderNumber() {\r\n const hasParams = function () {\r\n return searchParams.has('finder')\r\n }\r\n\r\n if (hasParams()) {\r\n const finderNumber = Number(searchParams.get('finder'))\r\n urlFinderNumber.value = finderNumber\r\n }\r\n }\r\n\r\n function getPreSelectedDesignation(designationId) {\r\n const designation = allDesignations.filter(function (obj) {\r\n return obj.lookupId === designationId || obj.altLookupId === designationId\r\n })\r\n return designation[0]\r\n }\r\n\r\n function getPreSelectedData() {\r\n const preSelectedDesignation = document.getElementById('js-preselected-designation')\r\n if (preSelectedDesignation) {\r\n return JSON.parse(preSelectedDesignation.dataset.designation)\r\n }\r\n }\r\n\r\n function hidePreSelectedDesignation() {\r\n let elems\r\n const preSelectedDesignation = document.getElementById('js-preselected-designation')\r\n\r\n if (preSelectedDesignation) {\r\n preSelectedDesignation.innerText = ''\r\n preSelectedDesignation.dataset.designation = ''\r\n }\r\n elems = getAll('.not-for-preselected')\r\n if (elems.length > 0) {\r\n elems.forEach(function (el) {\r\n showElement(el)\r\n })\r\n }\r\n elems = getAll('.for-preselected')\r\n if (elems.length > 0) {\r\n elems.forEach(function (el) {\r\n hideElement(el)\r\n })\r\n }\r\n }\r\n\r\n function showPreSelectedDesignation(designationId, editStatus, removeStatus) {\r\n let designation = getPreSelectedDesignation(designationId)\r\n\r\n if (designation) {\r\n let elems\r\n const preSelectedDesignation = document.getElementById('js-preselected-designation')\r\n\r\n if (preSelectedDesignation) {\r\n preSelectedDesignation.innerText = designation.name\r\n designation.editStatus = editStatus\r\n designation.removeStatus = removeStatus\r\n preSelectedDesignation.dataset.designation = JSON.stringify(designation)\r\n }\r\n elems = getAll('.not-for-preselected')\r\n if (elems.length > 0) {\r\n elems.forEach(function (el) {\r\n hideElement(el)\r\n })\r\n }\r\n elems = getAll('.for-preselected')\r\n if (elems.length > 0) {\r\n elems.forEach(function (el) {\r\n showElement(el)\r\n })\r\n }\r\n }\r\n }\r\n\r\n function addPreSelectedDonation(designationId, amount, edit, remove) {\r\n let preSelectedGift = {}\r\n let designation = getPreSelectedDesignation(designationId)\r\n\r\n if (designation) {\r\n preSelectedGift.designation = designation\r\n preSelectedGift.amount = Number(amount)\r\n preSelectedGift.edit = edit\r\n preSelectedGift.remove = remove\r\n addPreSelectedGiftRow(preSelectedGift)\r\n return true\r\n } else {\r\n return false\r\n }\r\n }\r\n\r\n function preSelectDonation() {\r\n const hasParams = function () {\r\n return searchParams.has('f')\r\n }\r\n\r\n // if (hasParams() && !isReturning) {\r\n if (hasParams()) {\r\n const preSelectedDesignations = searchParams.getAll('f')\r\n const preSelectedAmounts = searchParams.getAll('amount')\r\n const editStatus = searchParams.get('e')\r\n const removeStatus = searchParams.get('r')\r\n let giftCount = 0\r\n\r\n if (preSelectedDesignations.length > 0) {\r\n if (preSelectedDesignations.length === preSelectedAmounts.length) {\r\n // isPreSelectedGift = true;\r\n preSelectedDesignations.forEach(function (designationId, index) {\r\n if (addPreSelectedDonation(designationId, preSelectedAmounts[index], editStatus, removeStatus)) {\r\n giftCount++\r\n }\r\n })\r\n if (giftCount > 0) {\r\n displayNextStep()\r\n }\r\n } else if (preSelectedDesignations.length === 1 && preSelectedAmounts.length === 0) {\r\n isPreSelectedFundOnly = true\r\n showPreSelectedDesignation(preSelectedDesignations[0], editStatus, removeStatus)\r\n }\r\n }\r\n }\r\n }\r\n\r\n function preSelectCategory() {\r\n function selectCategory(dropdown, val) {\r\n selectOption(dropdown, val)\r\n setTimeout(function () {\r\n triggerEvent(dropdown, 'change')\r\n }, 100)\r\n }\r\n\r\n const hasParams = function () {\r\n return searchParams.has('c')\r\n }\r\n\r\n if (hasParams()) {\r\n const category = categoryIDs[searchParams.get('c')]\r\n\r\n if (category) {\r\n const categories = category.split('>')\r\n\r\n if (categories[0] === 'Campus Life') {\r\n theForm.querySelector('input[name=\"designation\"][value=\"Campus Life\"]').click()\r\n triggerEvent(theForm.querySelector('input[name=\"designation\"][value=\"Campus Life\"]'), 'click')\r\n selectCategory(document.getElementById(unitDropdowns[campusFunds]), categories[1])\r\n } else {\r\n selectCategory(document.getElementById(unitDropdowns[academicFunds]), categories[0])\r\n if (categories.length === 2) {\r\n setTimeout(function () {\r\n selectCategory(document.getElementById('area-select-academics'), categories[1])\r\n }, 100)\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n function preSelectScode() {\r\n const sCode = searchParams.get('scode') || ''\r\n\r\n if (sCode !== '') {\r\n document.getElementById('scode').value = sCode\r\n getAppeals(sCode)\r\n }\r\n }\r\n\r\n function getAppeals(sCode) {\r\n function success(data) {\r\n const matchedAppeal = data.Rows.filter(function (obj) {\r\n return obj.Values[0] === sCode\r\n })\r\n\r\n if (matchedAppeal.length > 0) {\r\n appealID = matchedAppeal[0].Values[1]\r\n }\r\n }\r\n\r\n function error(errors) {\r\n return false\r\n }\r\n\r\n const qs = new BLACKBAUD.api.QueryService()\r\n qs.getResults(appealGUID, success, error)\r\n }\r\n\r\n function getDesignations() {\r\n let categories = []\r\n let categoryGroups = []\r\n const catOffset = 2\r\n\r\n function sortGiftLevels(levels) {\r\n let sortedLevels = levels.split(' | ')\r\n sortedLevels = chunkArray(sortedLevels, 3)\r\n sortedLevels.pop()\r\n sortedLevels = sortedLevels.sort(function (a, b) {\r\n return a[0] - b[0]\r\n })\r\n return sortedLevels\r\n }\r\n\r\n function getGiftLevels(guid, data) {\r\n let levels = ''\r\n const fundGroup = data.Rows.filter(function (obj) {\r\n return obj.Values[2] === guid\r\n })\r\n\r\n if (fundGroup.length > 0) {\r\n fundGroup.forEach(function (fund) {\r\n levels += levels.indexOf(fund.Values[9]) === -1 ? fund.Values[9] + ' | ' : ''\r\n })\r\n }\r\n levels = sortGiftLevels(levels)\r\n return levels\r\n }\r\n\r\n function getDesignationValues(values, data) {\r\n const isPriority = values[12] === 'True' ? true : false\r\n\r\n return {\r\n lookupId: values[0],\r\n altLookupId: values[1],\r\n guid: values[2],\r\n category: isPriority && values[4].indexOf(featuredFunds) === -1 ? featuredFunds : values[4],\r\n name: values[5],\r\n isFeatured: values[6],\r\n levels: values[9] !== '' ? getGiftLevels(values[2], data) : '',\r\n isMemTrib: values[10],\r\n redirectURL: values[11],\r\n isPriority: values[12],\r\n }\r\n }\r\n\r\n function removeArrayObj(arr, item) {\r\n return arr.filter(function (obj) {\r\n return obj.guid !== item.guid\r\n })\r\n }\r\n\r\n // Can only use the designation if lookup ID, GUID and name are present\r\n function removeBadData() {\r\n allDesignations = allDesignations.filter(function (obj) {\r\n return obj.hasOwnProperty('lookupId') && obj.hasOwnProperty('guid') && obj.hasOwnProperty('name')\r\n })\r\n }\r\n\r\n function getAllDesignations(data) {\r\n function isDuplicate(guid, category) {\r\n const found = allDesignations.filter(function (obj) {\r\n return obj.guid === guid\r\n })\r\n\r\n if (found.length > 0) {\r\n if (found[0].category.split('>').length < category.split('>').length) {\r\n allDesignations = removeArrayObj(allDesignations, found[0])\r\n return false\r\n } else {\r\n return true\r\n }\r\n } else {\r\n return false\r\n }\r\n }\r\n\r\n data.Rows.forEach(function (el) {\r\n const guid = el.Values[2]\r\n const category = el.Values[4]\r\n const isActive = el.Values[7] === 'True' ? true : false\r\n const isPriority = el.Values[12] === 'True' ? true : false\r\n\r\n if (isActive && !isDuplicate(guid, category)) {\r\n allDesignations.push(getDesignationValues(el.Values, data))\r\n } else if (isActive && isPriority && category.indexOf(featuredFunds) > -1) {\r\n allDesignations.splice(\r\n allDesignations.findIndex((item) => item.guid === guid),\r\n 1\r\n )\r\n allDesignations.push(getDesignationValues(el.Values, data))\r\n }\r\n })\r\n }\r\n\r\n function getDisplayDesignations() {\r\n displayDesignations = allDesignations.filter(function (obj) {\r\n return obj.category !== '' && (obj.category.indexOf(campusFunds) > -1 || obj.category.indexOf(academicFunds) > -1 || obj.isPriority === 'True')\r\n })\r\n }\r\n\r\n function getDesignationCategories() {\r\n Array.prototype.slice\r\n .call(allDesignations)\r\n .concat(Array.prototype.slice.call(displayDesignations))\r\n .forEach(function (obj) {\r\n let categories = obj.category.split('>')\r\n obj.categories = categories\r\n })\r\n }\r\n\r\n function getCategoryGroups() {\r\n categoryGroups = displayDesignations.reduce((r, a) => {\r\n r[a.categories[0]] = [...(r[a.categories[0]] || []), a]\r\n return r\r\n }, {})\r\n }\r\n\r\n function addOptions(dropdown, opts) {\r\n opts.forEach(function (el) {\r\n return typeof el === 'string' ? createOption(dropdown, el) : createDesignationOption(dropdown, el)\r\n })\r\n }\r\n\r\n function addGroupedOptions(dropdown, groups) {\r\n for (let group in groups) {\r\n createOptGroup(dropdown, group, groups[group])\r\n }\r\n }\r\n\r\n function populateUnitDropdown(category, units) {\r\n if (unitDropdowns[category]) {\r\n addOptions(document.getElementById(unitDropdowns[category]), units)\r\n }\r\n }\r\n\r\n function addLooseFunds(category, funds) {\r\n const looseFunds = funds.filter(function (obj) {\r\n return !obj.categories[1]\r\n })\r\n\r\n if (fundDropdowns[category]) {\r\n addOptions(document.getElementById(fundDropdowns[category]), looseFunds)\r\n }\r\n }\r\n\r\n function getGroups(funds) {\r\n let groups = {}\r\n\r\n funds.forEach(function (obj) {\r\n const group = obj.categories[obj.categories.length - 1]\r\n\r\n if (!groups[group]) {\r\n groups[group] = []\r\n }\r\n groups[group].push(obj)\r\n })\r\n return groups\r\n }\r\n\r\n function addGroupedFunds(category, funds) {\r\n const groupedFunds = funds.filter(function (obj) {\r\n return obj.categories[1]\r\n })\r\n\r\n const groups = getGroups(groupedFunds)\r\n addGroupedOptions(document.getElementById(fundDropdowns[category]), groups)\r\n }\r\n\r\n function populateFundDropdown(category, funds) {\r\n if (fundDropdowns[category]) {\r\n addLooseFunds(category, funds)\r\n addGroupedFunds(category, funds)\r\n }\r\n }\r\n\r\n function getFunds(categories) {\r\n categories.forEach(function (obj) {\r\n const category = obj.categories[obj.categories.length - 1]\r\n\r\n if (category) {\r\n if (!designationFunds[category]) {\r\n designationFunds[category] = []\r\n }\r\n designationFunds[category].push(obj)\r\n }\r\n })\r\n\r\n for (let funds in designationFunds) {\r\n if (Array.isArray(designationFunds[funds])) {\r\n designationFunds[funds].sort(dynamicSort('name'))\r\n }\r\n }\r\n }\r\n\r\n function getAreas(category, units) {\r\n units.forEach(function (unit) {\r\n designationAreas[unit] = []\r\n\r\n const hasArea = categoryGroups[category].filter(function (obj) {\r\n return obj.categories[2] && obj.categories[0] !== featuredFunds && obj.categories[0] !== priorityFunds\r\n })\r\n\r\n hasArea.forEach(function (obj) {\r\n const area = obj.categories[2]\r\n\r\n if (obj.categories[1] === unit && designationAreas[unit].indexOf(area) === -1) {\r\n designationAreas[unit].push(area)\r\n }\r\n })\r\n\r\n if (Array.isArray(designationAreas[unit])) {\r\n designationAreas[unit].sort()\r\n }\r\n })\r\n }\r\n\r\n function getUnits(category, categories) {\r\n designationUnits[category] = []\r\n categories.forEach(function (obj) {\r\n const unit = obj.categories[1]\r\n\r\n if (unit && designationUnits[category].indexOf(unit) === -1) {\r\n designationUnits[category].push(unit)\r\n }\r\n })\r\n\r\n if (Array.isArray(designationUnits[category])) {\r\n designationUnits[category].sort()\r\n populateUnitDropdown(category, designationUnits[category])\r\n getAreas(category, designationUnits[category])\r\n }\r\n }\r\n\r\n function getCategory(el) {\r\n return categories[el.indexOf('True', catOffset) - catOffset]\r\n }\r\n\r\n const doSearch = debounce(function (fuse) {\r\n let results = fuse.search('fund')\r\n }, 250)\r\n\r\n function useOrOperator(str) {\r\n return str.replace(/\\s/g, ' | ')\r\n }\r\n\r\n function getSearchResults(fuse) {\r\n const searchBox = document.getElementById('designation-search')\r\n const searchField = document.getElementById('designation-search-field')\r\n const searchResults = document.getElementById('designation-search-results')\r\n const searchResultsLabels = getAll('.js-designation-search-result-count')\r\n const noResultsFound = document.getElementById('no-results-found')\r\n\r\n let len = searchResults.length\r\n for (let i = 1; i < len; i++) {\r\n searchResults.remove(1)\r\n }\r\n\r\n hideElement(searchField)\r\n\r\n if (searchBox.value.length > 2) {\r\n const searchTerms = useOrOperator(searchBox.value).trim()\r\n let results = fuse.search(searchTerms)\r\n let resultsLen = results.length\r\n\r\n if (resultsLen > 0) {\r\n hideElement(noResultsFound)\r\n showElement(searchField)\r\n addOptions(searchResults, results, resultsLen)\r\n searchResultsLabels.forEach(function (el) {\r\n el.innerText = 'We found ' + resultsLen + ' matching funds'\r\n })\r\n } else {\r\n hideElement(searchField)\r\n showElement(noResultsFound)\r\n }\r\n } else {\r\n hideElement(searchField)\r\n hideElement(noResultsFound)\r\n }\r\n }\r\n\r\n function searchDesignations() {\r\n const searchBox = document.getElementById('designation-search')\r\n const options = {\r\n shouldSort: true,\r\n threshold: 0.3,\r\n minMatchCharLength: 3,\r\n keys: ['name'],\r\n distance: 10000,\r\n useExtendedSearch: true,\r\n }\r\n let fuse = new Fuse(allDesignations, options)\r\n\r\n searchBox.addEventListener('focus', function () {\r\n showElement(specifyFund)\r\n })\r\n\r\n searchBox.addEventListener(\r\n 'keyup',\r\n debounce(function () {\r\n getSearchResults(fuse)\r\n }, 250)\r\n )\r\n\r\n searchBox.addEventListener('change', function () {\r\n getSearchResults(fuse)\r\n })\r\n }\r\n\r\n function processDesignations(data) {\r\n getAllDesignations(data)\r\n removeBadData()\r\n getDisplayDesignations()\r\n getDesignationCategories()\r\n getCategoryGroups()\r\n for (let category in categoryGroups) {\r\n if (category !== featuredFunds && category !== priorityFunds) {\r\n getUnits(category, categoryGroups[category])\r\n }\r\n getFunds(categoryGroups[category])\r\n if (category === featuredFunds || category === priorityFunds) {\r\n populateFundDropdown(category, categoryGroups[category])\r\n }\r\n }\r\n searchDesignations()\r\n preSelectCategory()\r\n preSelectDonation()\r\n preSelectScode()\r\n showPage()\r\n }\r\n\r\n function success(data) {\r\n // Cache designation data for faster loading\r\n localStorage.setItem('designations', JSON.stringify(data))\r\n processDesignations(data)\r\n // getEditorContent();\r\n // getPublicKey();\r\n // initCheckout();\r\n InitializeBBCheckout()\r\n }\r\n\r\n function error(errors) {\r\n return false\r\n }\r\n\r\n //if (localStorage.getItem('designations') !== null) {\r\n // Use cached data if available\r\n // processDesignations(JSON.parse(localStorage.getItem('designations')));\r\n //} else {\r\n // Otherwise get data from CRM\r\n const qs = new BLACKBAUD.api.QueryService()\r\n qs.getResults(queryGUID, success, error)\r\n //}\r\n }\r\n getDesignations()\r\n\r\n function getCodeTables() {\r\n const cts = new BLACKBAUD.api.CodeTableService()\r\n const usesCodeTable = getAll('[data-code-table]')\r\n let container = null\r\n\r\n function success(data) {\r\n const els = container.querySelectorAll('input')\r\n if (els.length > 0) {\r\n els.forEach(function (el, index) {\r\n el.value = data[index].Description\r\n if (el.type.toLowerCase() === 'radio') {\r\n el.nextElementSibling.innerText = el.value\r\n }\r\n })\r\n }\r\n }\r\n\r\n function error(errors) {\r\n return false\r\n }\r\n\r\n if (usesCodeTable.length > 0) {\r\n usesCodeTable.forEach(function (el) {\r\n container = el\r\n cts.getEntries(el.getAttribute('data-code-table'), success, error)\r\n })\r\n }\r\n }\r\n getCodeTables()\r\n\r\n function getCountries() {\r\n const cs = new BLACKBAUD.api.CountryService()\r\n const countrySelect = document.getElementById('donor-country')\r\n\r\n function handleCountryChange() {\r\n const provinceTextControl = document.getElementById('control--donor-province-intl--text')\r\n const provinceText = document.getElementById('donor-province-intl--text')\r\n const provinceSelectControl = document.getElementById('control--donor-province-intl--select')\r\n const provinceSelect = document.getElementById('donor-province-intl--select')\r\n\r\n cs.getStates(this.value, function (states) {\r\n clearOptions(provinceSelect)\r\n clearValue(provinceText)\r\n\r\n if (states.length > 0) {\r\n states.forEach(function (state) {\r\n createISOOption(provinceSelect, state)\r\n })\r\n hideElement(provinceTextControl)\r\n showElement(provinceSelectControl)\r\n } else {\r\n hideElement(provinceSelectControl)\r\n showElement(provinceTextControl)\r\n }\r\n })\r\n }\r\n\r\n cs.getCountries(function (countries) {\r\n countries.forEach(function (country) {\r\n createISOOption(countrySelect, country)\r\n })\r\n })\r\n\r\n countrySelect.addEventListener('change', handleCountryChange)\r\n }\r\n getCountries()\r\n\r\n function createCheckoutForm() {\r\n const paymentForm = document.getElementById('paymentForm')\r\n\r\n if (!paymentForm) {\r\n const newForm = document.createElement('form')\r\n\r\n newForm.setAttribute('id', 'paymentForm')\r\n newForm.setAttribute('method', 'get')\r\n newForm.dataset.formtype = 'bbCheckout'\r\n newForm.setAttribute('data-disable-submit', 'false')\r\n newForm.novalidate = true\r\n document.body.appendChild(newForm)\r\n }\r\n }\r\n\r\n function checkoutFunctions() {\r\n // If you want to override the functionality of any below mentioned events, then you can write your required code in respective Checkout Events Block\r\n let checkoutEvents = {\r\n checkoutComplete: function (e) {\r\n hidePage()\r\n // Invoke after Payment will successfully Completed\r\n bbcheckout.postCheckoutFinish()\r\n setupConfirmation()\r\n },\r\n checkoutError: function (data) {\r\n console.log(data)\r\n },\r\n checkoutExpired: function () {\r\n enableNextButtons()\r\n showPage()\r\n },\r\n checkoutReady: function () {\r\n hidePage()\r\n },\r\n browserClose: function () {\r\n // If you Close the Browser. Then write code in this block.\r\n },\r\n checkoutCancel: function () {\r\n enableNextButtons()\r\n showPage()\r\n },\r\n checkoutLoaded: function () {\r\n hidePage()\r\n },\r\n }\r\n return checkoutEvents\r\n }\r\n\r\n function InitializeBBCheckout() {\r\n createCheckoutForm()\r\n bbcheckout = new BBCheckoutProcessor(checkoutFunctions(), checkoutModel.APIControllerName, checkoutModel.TokenId, '.adf__confirmation')\r\n\r\n bbcheckout.Configuration.Data.Key = checkoutModel.PublicKey\r\n bbcheckout.Configuration.TransactionType = checkoutModel.TransactionType\r\n bbcheckout.Configuration.Data.ClientAppName = checkoutModel.ClientAppName\r\n bbcheckout.Configuration.Data.MerchantAccountId = checkoutModel.MerchantAccountId\r\n bbcheckout.Configuration.Data.IsEmailRequired = checkoutModel.IsEmailRequired\r\n bbcheckout.Configuration.Data.IsNameVisible = checkoutModel.IsNameVisible\r\n bbcheckout.Configuration.Data.PrimaryColor = checkoutModel.PrimaryColor\r\n bbcheckout.Configuration.Data.SecondaryColor = checkoutModel.SecondaryColor\r\n bbcheckout.Configuration.Data.FontFamily = checkoutModel.FontFamily\r\n bbcheckout.Configuration.Data.UseCaptcha = checkoutModel.UseCaptcha\r\n bbcheckout.Configuration.WorkflowType = checkoutModel.WorkFlowType\r\n bbcheckout.Configuration.HandleBrowserClosing = checkoutModel.HandleBrowserClosing === true ? 'True' : 'False'\r\n bbcheckout.Configuration.APITokenID = checkoutModel.TokenId\r\n // You can add your own message to display on screen, after checkout pop-up close\r\n bbcheckout.Configuration.TempConfirmationHtml = 'Thank you for your contribution, please wait while we process your transaction.'\r\n bbcheckout.intializeCheckout()\r\n }\r\n\r\n function makePayment() {\r\n const donor = donation.Donor\r\n\r\n bbcheckout.Configuration.Data.Amount = Number(\r\n document.querySelector('.js-gift-amount-total').textContent.replace(/\\$/, '').replace(/\\,/g, '')\r\n ).toFixed(2)\r\n bbcheckout.Configuration.Data.BillingAddressCity = donor.Address.City\r\n bbcheckout.Configuration.Data.BillingAddressCountry = donor.Address.Country\r\n bbcheckout.Configuration.Data.BillingAddressLine = donor.Address.StreetAddress\r\n bbcheckout.Configuration.Data.BillingAddressPostCode = donor.Address.PostalCode\r\n bbcheckout.Configuration.Data.BillingAddressState = donor.Address.State\r\n bbcheckout.Configuration.Data.BillingAddressEmail = donor.EmailAddress\r\n bbcheckout.Configuration.Data.BillingAddressFirstName = donor.FirstName + ' ' + (donor.MiddleName ? donor.MiddleName : '')\r\n bbcheckout.Configuration.Data.BillingAddressLastName = donor.LastName\r\n bbcheckout.Configuration.Data.Cardholder = donor.FirstName + ' ' + donor.LastName\r\n bbcheckout.Configuration.Data.UseVisaCheckout = donation.Gift && !donation.Gift.Recurrence\r\n bbcheckout.Configuration.Data.UseMasterpass = donation.Gift && !donation.Gift.Recurrence\r\n bbcheckout.Configuration.Data.UseApplePay = donation.Gift && !donation.Gift.Recurrence\r\n bbcheckout.Configuration.TransactionType = bbcheckout.TransactionType.Card_Not_Present\r\n bbcheckout.Configuration.Data.CardToken = null\r\n if (donation.Gift && donation.Gift.Recurrence && !donation.Gift.Recurrence.ProcessNow) {\r\n bbcheckout.Configuration.Data.CardToken = checkoutModel.DataKey\r\n bbcheckout.Configuration.TransactionType = bbcheckout.TransactionType.Store_Card //Store card transactions\r\n } else if (donation.Gift && donation.Gift.Recurrence) {\r\n //Set CardToken value only in case of recurring gifts.\r\n bbcheckout.Configuration.Data.CardToken = checkoutModel.DataKey\r\n }\r\n //Set Donor Info so that it will be passed to finish the transaction at the end.\r\n donation.DonationSource = bbcheckout.Configuration.DonationSource.ADF\r\n donation.Type = bbcheckout.Configuration.TranType.Donation\r\n bbcheckout.DonorInfo = donation\r\n bbcheckout.openCheckout()\r\n }\r\n\r\n function processPayment() {\r\n function onSuccess(data) {\r\n removeSavedData()\r\n makePayment()\r\n }\r\n\r\n function onFail(errors) {\r\n console.log(errors)\r\n }\r\n\r\n ds.validateDonationRequest(donation, onSuccess, onFail)\r\n }\r\n\r\n function submitDonation() {\r\n function success(returnedDonation) {\r\n removeSavedData()\r\n if (returnedDonation.Donation.Gift.PaymentMethod === 1) {\r\n getConfirmation(returnedDonation.Donation.Id)\r\n }\r\n\r\n if (returnedDonation.Donation.Gift.PaymentMethod === 2) {\r\n window.location.href = window.location.href + (window.location.search === '' ? '?t=' : '&t=') + returnedDonation.Donation.Id\r\n }\r\n }\r\n\r\n function error(returnedErrors) {\r\n console.log(returnedErrors)\r\n enableNextButtons()\r\n }\r\n\r\n ds.createDonation(donation, success, error)\r\n }\r\n\r\n function createDonation() {\r\n disableNextButtons()\r\n // saveForm()\r\n\r\n const isInternational = maybeInternational()\r\n const giftType = theForm.querySelector('[name=\"gift-type\"]:checked').value\r\n const paymentMethod = parseInt(theForm.querySelector('[name=\"gift-payment-type\"]:checked').value)\r\n let totalGiftAmount = 0\r\n\r\n donation = {\r\n // We can get some data directly from the form\r\n Donor: {\r\n Address: {\r\n City: isInternational ? document.getElementById('donor-city-intl').value : document.getElementById('donor-city').value,\r\n Country: isInternational ? getSelectedOptionText(document.getElementById('donor-country')) : 'United States',\r\n PostalCode: isInternational ? document.getElementById('donor-zip-intl').value : document.getElementById('donor-zip').value,\r\n State: isInternational\r\n ? document.getElementById('donor-province-intl--text').value || getSelectedOptionText(document.getElementById('donor-province-intl--select'))\r\n : getSelectedOptionValue(document.getElementById('donor-state')),\r\n StreetAddress: isInternational ? document.getElementById('donor-address-intl').value : document.getElementById('donor-address').value,\r\n },\r\n Title: getSelectedOptionValue(document.getElementById('donor-title')),\r\n FirstName: document.getElementById('donor-first-name').value,\r\n LastName: document.getElementById('donor-last-name').value,\r\n EmailAddress: document.getElementById('donor-email').value,\r\n Phone: document.getElementById('donor-phone').value,\r\n },\r\n Gift: {\r\n PaymentMethod: paymentMethod,\r\n Comments: document.getElementById('comments').value,\r\n IsCorporate: document.getElementById('is-corporate').checked,\r\n },\r\n Origin: {\r\n PageId: pageId,\r\n PartId: partId,\r\n ClientSitesID: ClientSitesID,\r\n },\r\n BBSPTemplateSitePageId: pageId,\r\n partId: partId,\r\n MerchantAccountId: processorGUID,\r\n }\r\n\r\n // The donation object needs a return URL for credit card payments\r\n if (donation.Gift.PaymentMethod === 0) {\r\n // donation.BBSPReturnUri = window.location.href;\r\n donation.BBSPReturnUri = 'https://www.google.com'\r\n }\r\n\r\n // Finder Number\r\n if (urlFinderNumber.value !== '') {\r\n donation.Gift.FinderNumber = urlFinderNumber.value\r\n }\r\n\r\n // Allow corporate gifts\r\n if (document.getElementById('is-corporate').checked) {\r\n donation.Donor.OrganizationName = document.getElementById('organization-name').value\r\n }\r\n\r\n // Is payment by credit card?\r\n function isCreditCard() {\r\n return donation.Gift.PaymentMethod === 0\r\n }\r\n\r\n // Is this a recurring gift?\r\n function isRecurring() {\r\n const giftType = theForm.querySelector('[name=\"gift-type\"]:checked').value\r\n const isRecurring = giftType === '2' || giftType === '4'\r\n\r\n return isRecurring\r\n }\r\n\r\n // Gets the total of all gifts if needed\r\n function getTotalGiftAmount(val) {\r\n const numberOfInstallments = parseInt(numPaymentsField.value)\r\n\r\n return val * numberOfInstallments\r\n }\r\n\r\n // The data-guid attibute on fields gives us the GUIDs for submission\r\n function createAttribute(el, val) {\r\n let attribute = {}\r\n const concatAttr = el.getAttribute('data-concat')\r\n\r\n attribute.AttributeId = el.getAttribute('data-guid')\r\n attribute.Value = val ? val : el.getAttribute('data-attribute-value') || el.value\r\n if (concatAttr && document.getElementById(concatAttr)) {\r\n attribute.Value += ' ' + document.getElementById(concatAttr).value\r\n }\r\n return attribute\r\n }\r\n\r\n function getAttributes() {\r\n let attributes = []\r\n\r\n document.querySelectorAll('.is-attribute').forEach(function (el) {\r\n const isActive = el.type.toLowerCase() === 'checkbox' || el.type.toLowerCase() === 'radio' ? el.checked : el.value !== ''\r\n\r\n if (el.id.indexOf('tribute-type') > -1 && !isTribute.checked) {\r\n return false\r\n }\r\n\r\n if (isActive) {\r\n attributes.push(createAttribute(el))\r\n }\r\n return true\r\n })\r\n return attributes\r\n }\r\n\r\n function getTribute() {\r\n const isTributeChecked = isTribute.checked\r\n const hasAcknowledgee = document.getElementById('is-notify').checked\r\n let tribute = {}\r\n\r\n if (isTributeChecked) {\r\n tribute.TributeDefinition = {\r\n Description: document.getElementById('notify-display-name').value || 'New Memorial-Tribute',\r\n FirstName: document.getElementById('honoree-first-name').value,\r\n LastName: document.getElementById('honoree-last-name').value,\r\n Type: theForm.querySelector('[name=\"tribute-type\"]:checked').value,\r\n }\r\n /*\r\n * 09-03-2021: JET4\r\n * These fields are required by the BBIS API but Not by this form.\r\n * Adding dummy text to ensure process can still continue when these\r\n * these values are not present.\r\n */\r\n\r\n if (hasAcknowledgee) {\r\n //Collect values\r\n let notifyAddress = document.getElementById('notify-address').value\r\n let notifyCity = document.getElementById('notify-city').value\r\n let notifyFirstName = document.getElementById('notify-first-name').value\r\n let notifyLastName = document.getElementById('notify-last-name').value\r\n let notifyZip = document.getElementById('notify-zip').value\r\n let notifyState = document.getElementById('notify-state').value\r\n\r\n //Ensure a value is present\r\n tribute.Acknowledgee = {\r\n AddressLines: notifyAddress !== '' ? notifyAddress : 'UNKNOWN',\r\n City: notifyCity !== '' ? notifyCity : 'UNKNOWN',\r\n Country: 'USA',\r\n FirstName: notifyFirstName !== '' ? notifyFirstName : 'UNKNOWN',\r\n LastName: notifyLastName !== '' ? notifyLastName : 'UNKNOWN',\r\n PostalCode: notifyZip !== '' ? notifyZip : 'UNKNOWN',\r\n State: notifyState !== '' ? notifyState : 'UNKNOWN',\r\n }\r\n }\r\n return tribute\r\n }\r\n return null\r\n }\r\n\r\n function saveSpecifiedFund(fund) {\r\n localStorage.setItem('specifiedFund', fund)\r\n }\r\n\r\n function getSpecifiedFund(mygift) {\r\n let el = document.getElementById('specify-fund')\r\n\r\n if (el) {\r\n if (!donation.Gift.Attributes) {\r\n donation.Gift.Attributes = []\r\n }\r\n const specifiedFund = createAttribute(el, mygift.querySelector('.gift-label').innerText)\r\n donation.Gift.Attributes.push(specifiedFund)\r\n saveSpecifiedFund(specifiedFund.Value)\r\n }\r\n return document.getElementById('is-specify-fund').getAttribute('data-guid')\r\n }\r\n\r\n function getDesignations() {\r\n let designations = []\r\n\r\n document\r\n .getElementById('my-gifts')\r\n .querySelectorAll('.my-gift')\r\n .forEach(function (mygift) {\r\n let gift = {}\r\n const giftAmount = parseFloat(mygift.querySelector('.amount').value)\r\n\r\n gift.Amount = isRecurring() && !isCreditCard() ? getTotalGiftAmount(giftAmount) : giftAmount\r\n gift.DesignationId =\r\n mygift.querySelector('.designation-specified').value === 'true' ? getSpecifiedFund(mygift) : mygift.querySelector('.designation-fund').value\r\n designations.push(gift)\r\n totalGiftAmount += gift.Amount\r\n })\r\n return designations\r\n }\r\n\r\n function getRecurrence() {\r\n const giftType = theForm.querySelector('[name=\"gift-type\"]:checked').value\r\n let recurrence = {}\r\n\r\n if (isRecurring()) {\r\n recurrence = {\r\n DayOfMonth: new Date().getDate(),\r\n EndDate: new Date(document.getElementById('gift-end-date').value),\r\n StartDate: isCreditCard() ? new Date() : addMonths(new Date(), 1),\r\n Frequency: parseInt(giftType),\r\n ProcessNow: isCreditCard() ? true : false,\r\n }\r\n if (giftType === '4') {\r\n recurrence.Month = new Date().getMonth() + 1\r\n }\r\n return recurrence\r\n }\r\n return null\r\n }\r\n\r\n function getPledgeInstallments() {\r\n let pledgeInstallments = {}\r\n\r\n if (isRecurring()) {\r\n const numberOfInstallments = parseInt(numPaymentsField.value)\r\n\r\n if (numberOfInstallments) {\r\n const installmentAmount = parseFloat(ds.getRecurringGiftInstallmentAmount(totalGiftAmount, numberOfInstallments))\r\n\r\n pledgeInstallments = {\r\n NumberOfInstallments: numberOfInstallments,\r\n InstallmentAmount: installmentAmount,\r\n }\r\n }\r\n }\r\n return pledgeInstallments\r\n }\r\n\r\n let attributes = getAttributes()\r\n if (attributes.length > 0) {\r\n donation.Gift.Attributes = attributes\r\n }\r\n\r\n let tribute = getTribute()\r\n if (tribute) {\r\n donation.Gift.Tribute = tribute\r\n }\r\n\r\n let designations = getDesignations()\r\n if (designations.length > 0) {\r\n donation.Gift.Designations = designations\r\n }\r\n\r\n let recurrence = getRecurrence()\r\n if (recurrence) {\r\n donation.Gift.Recurrence = recurrence\r\n }\r\n\r\n if (paymentMethod !== 0 && giftType !== '') {\r\n let pledgeInstallments = getPledgeInstallments()\r\n if (pledgeInstallments) {\r\n donation.Gift.PledgeInstallment = pledgeInstallments\r\n }\r\n }\r\n\r\n if (paymentMethod === 2) {\r\n donation.Gift.DirectDebitInformation = {}\r\n donation.Gift.DirectDebitInformation.FinancialInstitution =\r\n 'Baylor Payroll - ' + theForm.querySelector('[name=\"baylor-payroll-schedule\"]:checked').value\r\n donation.Gift.DirectDebitInformation.BranchName = ''\r\n donation.Gift.DirectDebitInformation.AccountHolderName =\r\n document.getElementById('donor-first-name').value + ' ' + document.getElementById('donor-last-name').value\r\n donation.Gift.DirectDebitInformation.BankingType = document.getElementById('ddlBankingSystemType').value\r\n donation.Gift.DirectDebitInformation.RoutingNumber = document.getElementById('txtRoutingNumber').value\r\n donation.Gift.DirectDebitInformation.AccountNumber = document.getElementById('txtAccountNumber').value\r\n donation.Gift.DirectDebitInformation.AccountType = document.getElementById('ddlAccountType').value\r\n }\r\n\r\n if (appealID !== '') {\r\n donation.Origin.AppealId = appealID\r\n }\r\n\r\n if (paymentMethod === 0) {\r\n processPayment()\r\n } else {\r\n submitDonation()\r\n }\r\n }\r\n\r\n function validation() {\r\n // Step 1 validation\r\n const fv1 = FormValidation.formValidation(formSteps[0], {\r\n fields: {\r\n 'finder-number': {\r\n validators: {\r\n callback: {\r\n message: 'Please enter your finder number',\r\n callback: function (input) {\r\n return searchParams.get('showfinder') === '1' ? input.value !== '' : true\r\n },\r\n },\r\n },\r\n },\r\n 'gift-amount': {\r\n validators: {\r\n notEmpty: {\r\n message: 'Please select a gift amount',\r\n },\r\n },\r\n },\r\n 'gift-amount-other': {\r\n validators: {\r\n notEmpty: {\r\n message: 'Please enter a gift amount',\r\n },\r\n },\r\n },\r\n 'fund-select-academics': {\r\n validators: {\r\n callback: {\r\n message: 'Please select a fund above before continuing.',\r\n callback: function (input) {\r\n return isFundSelected('designation-1', input)\r\n },\r\n },\r\n },\r\n },\r\n 'fund-select-campus-life': {\r\n validators: {\r\n callback: {\r\n message: 'Please select a fund above before continuing.',\r\n callback: function (input) {\r\n return isFundSelected('designation-2', input)\r\n },\r\n },\r\n },\r\n },\r\n 'fund-select-featured': {\r\n validators: {\r\n callback: {\r\n message: 'Please select a fund above before continuing.',\r\n callback: function (input) {\r\n return isFundSelected('designation-3', input)\r\n },\r\n },\r\n },\r\n },\r\n },\r\n plugins: {\r\n trigger: new FormValidation.plugins.Trigger({\r\n event: {\r\n 'designation-select': 'change',\r\n },\r\n }),\r\n bulma: new FormValidation.plugins.Bulma({\r\n defaultMessageContainer: false,\r\n rowSelector: function (field, ele) {\r\n return field === 'gift-amount-other' ? '.columns' : '.field'\r\n },\r\n }),\r\n aria: new FormValidation.plugins.Aria(),\r\n message: new FormValidation.plugins.Message({\r\n clazz: 'is-danger',\r\n container: function (field, el) {\r\n if (hasClass(el, 'unit-select') || hasClass(el, 'area-select') || hasClass(el, 'fund-select')) {\r\n return document.getElementById('designation-select-message')\r\n } else if (field === 'gift-amount-other') {\r\n return document.getElementById('gift-amount-message')\r\n } else if (field === 'finder-number') {\r\n return document.getElementById('finder-number-message')\r\n } else {\r\n return FormValidation.utils.closest(el, '.field')\r\n }\r\n },\r\n }),\r\n excluded: new FormValidation.plugins.Excluded({\r\n excluded: function (field, el, els) {\r\n const selectedAmount = theForm.querySelector('[name=\"gift-amount\"]:checked')\r\n const giftAmount = selectedAmount ? selectedAmount.value : ''\r\n\r\n return (field === 'gift-amount-other' && giftAmount !== 'other') || (field === 'gift-amount' && giftAmount === 'other')\r\n },\r\n }),\r\n },\r\n }).on('core.form.valid', function () {\r\n const activeCategorySelect =\r\n getSelectedOptionValue(document.getElementById('designation-search-results')) !== ''\r\n ? document.getElementById('designation-search-results')\r\n : theForm.querySelector('.tab-content.is-active .fund-select')\r\n const redirectURL = getSelectedOptionAttribute(activeCategorySelect, 'data-redirectURL')\r\n\r\n if (redirectURL) {\r\n window.location.assign(redirectURL)\r\n } else {\r\n if (editingGift) {\r\n updateGiftRow()\r\n } else if (isPreSelectedFundOnly) {\r\n const designation = getPreSelectedData()\r\n const amount = getGiftAmount()\r\n\r\n if (designation && amount) {\r\n addPreSelectedDonation(designation.lookupId, amount, designation.editStatus, designation.removeStatus)\r\n }\r\n isPreSelectedFundOnly = false\r\n hidePreSelectedDesignation()\r\n } else {\r\n addGiftRow()\r\n }\r\n clearGiftFields()\r\n displayNextStep()\r\n // saveForm()\r\n }\r\n })\r\n\r\n Array.from(getAll('[name=\"gift-amount\"]')).forEach(function (el) {\r\n el.addEventListener('click', function (e) {\r\n fv1.revalidateField('gift-amount-other')\r\n })\r\n })\r\n\r\n // Step 2 validation\r\n const fv2 = FormValidation.formValidation(formSteps[1], {\r\n fields: {\r\n 'honoree-name': {\r\n validators: {\r\n callback: {\r\n message: '(Required)',\r\n callback: function (input) {\r\n const honorIsChecked = theForm.querySelector('[name=\"is-tribute\"]:checked')\r\n\r\n return honorIsChecked ? input.value !== '' : true\r\n },\r\n },\r\n },\r\n },\r\n 'gift-num-payments': {\r\n validators: {\r\n callback: {\r\n message: '(Required)',\r\n callback: function (input) {\r\n const giftType = theForm.querySelector('[name=\"gift-type\"]:checked')\r\n const isPledge = giftType.value === '2' || giftType === '4' ? true : false\r\n\r\n return isPledge ? input.value !== '' && !isNaN(input.value) && parseInt(input.value) > 0 : true\r\n },\r\n },\r\n },\r\n },\r\n },\r\n plugins: {\r\n trigger: new FormValidation.plugins.Trigger(),\r\n bulma: new FormValidation.plugins.Bulma(),\r\n aria: new FormValidation.plugins.Aria(),\r\n },\r\n }).on('core.form.valid', function () {\r\n updateReviewInfo()\r\n displayNextStep()\r\n // saveForm()\r\n })\r\n\r\n // Step 3 validation\r\n const fv3 = FormValidation.formValidation(formSteps[2], {\r\n fields: {\r\n 'donor-first-name': {\r\n validators: {\r\n notEmpty: {\r\n message: '(Required)',\r\n },\r\n regexp: {\r\n regexp: /^(a-z|A-Z)*[^\\d#$%^&*()']*$/, // Non all numeric\r\n message: '(Cannot contain special chars or numbers.)',\r\n },\r\n stringLength: {\r\n max: 50,\r\n message: '(Cannot be more than 50 chars.)',\r\n },\r\n },\r\n },\r\n 'donor-last-name': {\r\n validators: {\r\n notEmpty: {\r\n message: '(Required)',\r\n },\r\n regexp: {\r\n regexp: /^(a-z|A-Z)*[^\\d#$%^&*()']*$/, // Non all numeric\r\n message: '(Cannot contain special chars or numbers.)',\r\n },\r\n stringLength: {\r\n max: 100,\r\n message: '(Cannot be more than 100 chars.)',\r\n },\r\n },\r\n },\r\n 'donor-phone': {\r\n validators: {\r\n notEmpty: {\r\n message: '(Required)',\r\n },\r\n regexp: {\r\n regexp: /^[^#$%^&*.']*$/, // Non all numeric\r\n message: '(Cannot contain special chars.)',\r\n },\r\n },\r\n },\r\n 'organization-name': {\r\n validators: {\r\n callback: {\r\n message: '(Required)',\r\n callback: function (input) {\r\n return document.getElementById('is-corporate').checked ? input.value !== '' : true\r\n },\r\n },\r\n },\r\n },\r\n 'bear-id': {\r\n validators: {\r\n callback: {\r\n message: '(Required)',\r\n callback: function (input) {\r\n const payrollIsChecked = theForm.querySelector('.is-collapse-control[name=\"gift-payment-type\"]:checked')\r\n\r\n return payrollIsChecked ? input.value !== '' : true\r\n },\r\n },\r\n regexp: {\r\n regexp: /^(?=.*?\\d*)(?=.*?[\\D])[\\D\\d]+$/, // Non all numeric\r\n message: '(Your Bear ID should not be an all numeric value)',\r\n },\r\n },\r\n },\r\n 'bear-password': {\r\n validators: {\r\n callback: {\r\n message: '(Required)',\r\n callback: function (input) {\r\n const payrollIsChecked = theForm.querySelector('.is-collapse-control[name=\"gift-payment-type\"]:checked')\r\n\r\n return payrollIsChecked ? input.value !== '' : true\r\n },\r\n },\r\n },\r\n },\r\n 'baylor-payroll-schedule': {\r\n validators: {\r\n callback: {\r\n message: '(Required)',\r\n callback: function (input) {\r\n const payrollIsChecked = theForm.querySelector('.is-collapse-control[name=\"gift-payment-type\"]:checked')\r\n\r\n return payrollIsChecked ? isInputChecked(input) : true\r\n },\r\n },\r\n },\r\n },\r\n },\r\n plugins: {\r\n trigger: new FormValidation.plugins.Trigger(),\r\n declarative: new FormValidation.plugins.Declarative({\r\n html5Input: true,\r\n }),\r\n bulma: new FormValidation.plugins.Bulma(),\r\n excluded: new FormValidation.plugins.Excluded(),\r\n aria: new FormValidation.plugins.Aria(),\r\n },\r\n }).on('core.form.valid', function () {\r\n updateReviewInfo()\r\n displayNextStep()\r\n // saveForm()\r\n })\r\n\r\n if (nextButtons.length > 0) {\r\n nextButtons.forEach(function (el) {\r\n el.addEventListener('click', function () {\r\n switch (currentStep) {\r\n case 0:\r\n fv1.validate()\r\n break\r\n case 1:\r\n fv2.validate()\r\n break\r\n case 2:\r\n fv3.validate()\r\n break\r\n case 3:\r\n createDonation()\r\n break\r\n default:\r\n break\r\n }\r\n })\r\n })\r\n }\r\n }\r\n validation()\r\n\r\n function isFundSelected(category, input) {\r\n return (\r\n !document.getElementById(category).checked ||\r\n input.value !== '' ||\r\n getSelectedOptionValue(document.getElementById('designation-search-results')) !== '' ||\r\n (document.getElementById('is-specify-fund').checked && document.getElementById('specify-fund').value !== '') ||\r\n isPreSelectedFundOnly\r\n )\r\n }\r\n\r\n function isInputChecked(input) {\r\n let checkedInput = input.elements.filter(function (obj) {\r\n return obj.checked\r\n })\r\n\r\n return checkedInput.length > 0\r\n }\r\n\r\n // Handlers\r\n window.addEventListener(\r\n 'keydown',\r\n function (e) {\r\n if (e.keyIdentifier == 'U+000A' || e.keyIdentifier == 'Enter' || e.keyCode == 13) {\r\n if (\r\n e.target.nodeName == 'INPUT' &&\r\n (e.target.type === 'text' || e.target.type === 'search' || e.target.type === 'email' || e.target.type === 'tel')\r\n ) {\r\n e.preventDefault()\r\n return false\r\n }\r\n }\r\n },\r\n true\r\n )\r\n\r\n function createDropdown(field, dropdown, els) {\r\n if (field && dropdown) {\r\n clearOptions(dropdown)\r\n els.forEach(function (el) {\r\n return typeof el === 'string' ? createOption(dropdown, el) : createDesignationOption(dropdown, el)\r\n })\r\n showElement(field)\r\n }\r\n }\r\n\r\n function showFunds(dropdown) {\r\n let nextField\r\n let designationType = designationAreas[dropdown.value] ? (designationAreas[dropdown.value].length > 0 ? 'area' : '') : ''\r\n\r\n designationType = designationType || (designationFunds[dropdown.value] ? (designationFunds[dropdown.value].length > 0 ? 'fund' : '') : '')\r\n\r\n if (hasClass(dropdown, 'unit-select')) {\r\n selectedUnit = getSelectedOptionValue(dropdown)\r\n }\r\n\r\n if (designationType === 'area' && !hasClass(dropdown, 'area-select')) {\r\n hideFunds()\r\n nextField = getClosestEl(dropdown, '.field').nextElementSibling\r\n createDropdown(nextField, nextField.querySelector('select'), designationAreas[dropdown.value])\r\n } else if (designationType === 'fund' || hasClass(dropdown, 'area-select')) {\r\n if (designationAreas[selectedUnit]) {\r\n if (designationAreas[selectedUnit].length > 0) {\r\n hideFunds('fund')\r\n } else {\r\n hideFunds('area')\r\n }\r\n }\r\n nextField = getClosestEl(dropdown, '.field').nextElementSibling.nextElementSibling || getClosestEl(dropdown, '.field').nextElementSibling\r\n createDropdown(nextField, nextField.querySelector('select'), designationFunds[dropdown.value])\r\n }\r\n }\r\n\r\n function hideFunds(type) {\r\n const allNotFeaturedSubFunds = Array.prototype.slice\r\n .call(giftAreas)\r\n .concat(Array.prototype.slice.call(giftFunds))\r\n .filter(function (el) {\r\n return el.id !== 'fund-select-featured'\r\n })\r\n\r\n const notFeaturedFunds = Array.prototype.slice.call(giftFunds).filter(function (el) {\r\n return el.id !== 'fund-select-featured'\r\n })\r\n\r\n const els = type ? (type === 'area' ? giftAreas : notFeaturedFunds) : allNotFeaturedSubFunds\r\n\r\n els.forEach(function (el) {\r\n hideElement(getClosestEl(el, '.field'))\r\n selectOption(el, '')\r\n })\r\n }\r\n\r\n function clearUnits() {\r\n giftUnits.forEach(function (el) {\r\n selectOption(el, '')\r\n })\r\n }\r\n\r\n function clearSpecifiedFund() {\r\n document.getElementById('specify-fund').value = ''\r\n if (document.getElementById('is-specify-fund').checked) {\r\n triggerEvent(document.getElementById('is-specify-fund-trigger'), 'click')\r\n }\r\n hideElement(document.getElementById('specify-fund-checkbox'))\r\n }\r\n\r\n function hideGiftLevels() {\r\n const els = getAll('.gift-levels')\r\n\r\n if (els.length > 0) {\r\n els.forEach(function (el) {\r\n hideElement(el)\r\n })\r\n }\r\n }\r\n\r\n function handleFundChange(e) {\r\n if (this.value !== '') {\r\n showFunds(this)\r\n } else {\r\n if (hasClass(this, 'unit-select')) {\r\n hideFunds('area')\r\n } else {\r\n hideFunds()\r\n }\r\n }\r\n }\r\n\r\n if (designationButtons.length > 0) {\r\n const notFeatured = Array.prototype.slice.call(designationButtons).filter(function (el) {\r\n return el.value !== 'Featured'\r\n })\r\n\r\n notFeatured.forEach(function (el) {\r\n el.addEventListener('click', function () {\r\n hideFunds()\r\n })\r\n })\r\n }\r\n\r\n if (giftUnits.length > 0 && giftAreas.length > 0) {\r\n els = Array.prototype.slice.call(giftUnits).concat(Array.prototype.slice.call(giftAreas))\r\n els.forEach(function (el) {\r\n el.addEventListener('change', handleFundChange)\r\n })\r\n }\r\n\r\n function addGiftLevelRow(level, index) {\r\n let row = document.createElement('li')\r\n\r\n row.innerText = '$' + level[0] + '+ ' + level[1]\r\n if (level[2] !== '') {\r\n let infoLink = document.createElement('a')\r\n\r\n infoLink.setAttribute('href', level[2])\r\n infoLink.setAttribute('target', '_blank')\r\n addClass(infoLink, 'fa fa-info-circle')\r\n row.appendChild(infoLink)\r\n }\r\n return row\r\n }\r\n\r\n function displayGiftLevels(levels) {\r\n const giftLevels = document.getElementById('gift-levels')\r\n\r\n if (giftLevels) {\r\n clearElement(giftLevels)\r\n levels.forEach(function (level, index) {\r\n giftLevels.appendChild(addGiftLevelRow(level, index))\r\n })\r\n }\r\n }\r\n\r\n function maybeGiftLevels(guid) {\r\n const giftLevels = theForm.querySelector('.gift-levels')\r\n const fund = allDesignations.filter(function (obj) {\r\n return obj.guid === guid && Array.isArray(obj.levels)\r\n })\r\n\r\n if (giftLevels) {\r\n if (fund.length === 1) {\r\n displayGiftLevels(fund[0].levels)\r\n showElement(giftLevels)\r\n } else {\r\n hideElement(giftLevels)\r\n }\r\n }\r\n }\r\n\r\n els = Array.prototype.slice.call(giftFunds).concat(Array.prototype.slice.call(searchFunds))\r\n if (els.length > 0) {\r\n els.forEach(function (el) {\r\n el.addEventListener('change', function () {\r\n maybeGiftLevels(getSelectedOptionValue(this))\r\n })\r\n })\r\n }\r\n\r\n if (giftAmountOtherButton && giftAmountOther) {\r\n giftAmountOtherButton.addEventListener('click', function () {\r\n setTimeout(function () {\r\n giftAmountOther.focus()\r\n }, 100)\r\n })\r\n }\r\n\r\n function isCreditCard() {\r\n return parseInt(theForm.querySelector('[name=\"gift-payment-type\"]:checked').value) === 0\r\n }\r\n\r\n function updateRecurrenceTotalAmount(numPayments) {\r\n const giftAmount = theForm.querySelector('.js-gift-amount-total').innerText\r\n const giftAmountRecurrence = giftAmount * numPayments\r\n\r\n const els = getAll('.js-gift-amount-total-recurring')\r\n if (els.length > 0) {\r\n els.forEach(function (el) {\r\n el.innerText = '$' + numToFloat(giftAmountRecurrence, 2)\r\n })\r\n }\r\n }\r\n\r\n function updateRecurrenceDates(numPayments) {\r\n const today = new Date()\r\n const startDate = new Date()\r\n const endDate =\r\n giftFrequency === 'monthly'\r\n ? new Date(startDate.setMonth(startDate.getMonth() + numPayments))\r\n : new Date(startDate.setFullYear(startDate.getFullYear() + numPayments))\r\n const localeEndDate = endDate.toLocaleDateString(undefined, { year: 'numeric', month: 'long', day: 'numeric' })\r\n const els = getAll('.js-gift-end-date')\r\n\r\n document.getElementById('gift-start-date').value = today\r\n document.getElementById('gift-end-date').value = endDate\r\n\r\n if (els.length > 0) {\r\n els.forEach(function (el) {\r\n el.innerText = localeEndDate\r\n })\r\n }\r\n }\r\n\r\n function setRecurrenceFields() {\r\n const numPayments = parseInt(numPaymentsField.value)\r\n\r\n if (!isNaN(numPayments) && numPayments > 0) {\r\n if (isCreditCard()) {\r\n updateRecurrenceDates(numPayments - 1)\r\n } else {\r\n updateRecurrenceDates(numPayments)\r\n }\r\n updateRecurrenceTotalAmount(numPayments)\r\n }\r\n }\r\n\r\n numPaymentsField.addEventListener('keyup', setRecurrenceFields)\r\n\r\n function updateFrequencyText() {\r\n const root = document.getElementById('recurring-gift-fields')\r\n let els = root.querySelectorAll('.js-gift-frequency')\r\n\r\n if (els.length > 0) {\r\n els.forEach(function (el) {\r\n el.innerText = giftFrequency\r\n })\r\n }\r\n\r\n els = root.querySelectorAll('.js-gift-amount-total')\r\n if (els.length > 0) {\r\n els.forEach(function (el) {\r\n el.innerText = theForm.querySelector('.js-gift-amount-total').innerText\r\n })\r\n }\r\n }\r\n\r\n function enableMemorialTribute() {\r\n const el = document.getElementById('gift-memory-tribute')\r\n const helpText = el.querySelector('.help')\r\n const tributeFields = document.getElementById('tribute-fields')\r\n\r\n if (el) {\r\n el.disabled = false\r\n if (helpText) {\r\n hideElement(helpText)\r\n }\r\n if (tributeFields) {\r\n showElement(tributeFields)\r\n }\r\n }\r\n }\r\n\r\n function collapseControlFilter(el) {\r\n if (el.nodeName.toLowerCase() === 'a' && el.dataset) {\r\n return (el.dataset['action'] = 'collapse')\r\n }\r\n return false\r\n }\r\n\r\n function clearTributeFields() {\r\n const tributeFields = document.getElementById('tribute-fields')\r\n\r\n if (tributeFields) {\r\n getAll('input:not([type=\"checkbox\"]), select', tributeFields).forEach(function (el) {\r\n el.value = ''\r\n })\r\n getAll('input[type=\"checkbox\"], input[type=\"radio\"]', tributeFields).forEach(function (el) {\r\n if (el.id === 'is-notify' && el.checked) {\r\n const notifyControl = tributeFields.querySelector('a[href=\"#tribute-fields__notify\"]')\r\n if (notifyControl) {\r\n notifyControl.click()\r\n }\r\n }\r\n el.checked = false\r\n })\r\n }\r\n }\r\n\r\n function clearNotifyFields() {\r\n const notifyFields = document.getElementById('tribute-fields__notify')\r\n\r\n if (notifyFields) {\r\n getAll('input:not([type=\"checkbox\"]), select', notifyFields).forEach(function (el) {\r\n el.value = ''\r\n })\r\n }\r\n }\r\n\r\n function disableMemorialTribute() {\r\n const el = document.getElementById('gift-memory-tribute')\r\n const helpText = el.querySelector('.help')\r\n const tributeToggle = document.getElementById('tribute-toggle')\r\n const tributeFields = document.getElementById('tribute-fields')\r\n\r\n if (el) {\r\n if (isTribute) {\r\n if (isTribute.checked) {\r\n if (tributeToggle) {\r\n tributeToggle.click()\r\n }\r\n }\r\n }\r\n el.disabled = true\r\n if (helpText) {\r\n showElement(helpText)\r\n }\r\n clearTributeFields()\r\n }\r\n }\r\n\r\n function toggleMemorialTribute(el) {\r\n if (el.value === '') {\r\n enableMemorialTribute()\r\n } else {\r\n disableMemorialTribute()\r\n }\r\n }\r\n\r\n el = document.getElementById('is-tribute')\r\n if (el) {\r\n el.addEventListener('click', function () {\r\n if (!this.checked) {\r\n clearTributeFields()\r\n }\r\n })\r\n }\r\n\r\n el = document.getElementById('is-notify')\r\n if (el) {\r\n el.addEventListener('click', function () {\r\n if (!this.checked) {\r\n clearNotifyFields()\r\n }\r\n })\r\n }\r\n\r\n if (paymentButtons.length > 0) {\r\n paymentButtons.forEach(function (el) {\r\n el.addEventListener('click', function () {\r\n const existingPledge = document.getElementById('is-pledge-field')\r\n\r\n if (this.value === '1') {\r\n hideElement(existingPledge)\r\n } else {\r\n showElement(existingPledge)\r\n }\r\n if (theForm.querySelector('[name=\"gift-type\"]:checked').value !== '') {\r\n setRecurrenceFields()\r\n updateReviewInfo()\r\n }\r\n })\r\n })\r\n }\r\n\r\n function setFrequency(el) {\r\n if (el) {\r\n switch (el.value) {\r\n case '':\r\n giftFrequency = ''\r\n break\r\n case '2':\r\n giftFrequency = 'monthly'\r\n break\r\n case '4':\r\n giftFrequency = 'annual'\r\n break\r\n }\r\n }\r\n }\r\n\r\n if (frequencyButtons.length > 0) {\r\n frequencyButtons.forEach(function (el) {\r\n el.addEventListener('click', function () {\r\n setFrequency(el)\r\n toggleMemorialTribute(el)\r\n updateFrequencyText()\r\n setRecurrenceFields()\r\n updateReviewInfo()\r\n })\r\n })\r\n }\r\n\r\n if (growingFields.length > 0) {\r\n growingFields.forEach(function (el) {\r\n el.addEventListener('keyup', function () {\r\n const measureText = el.nextElementSibling\r\n measureText.innerText = this.value\r\n this.style.width = measureText.offsetWidth + 'px'\r\n })\r\n })\r\n }\r\n\r\n if (addButtons.length > 0) {\r\n addButtons.forEach(function (el) {\r\n el.addEventListener('click', function () {\r\n editingGift = false\r\n isAnotherGift = true\r\n displayPreviousStep(this)\r\n })\r\n })\r\n }\r\n\r\n if (nextButtons.length > 0) {\r\n enableNextButtons()\r\n }\r\n\r\n if (prevButtons.length > 0) {\r\n prevButtons.forEach(function (el) {\r\n el.addEventListener('click', displayPreviousStep)\r\n })\r\n }\r\n\r\n if (cancelButtons.length > 0) {\r\n cancelButtons.forEach(function (el) {\r\n el.addEventListener('click', cancelStep)\r\n })\r\n }\r\n\r\n function showHideBanner() {\r\n const banner = document.querySelector('.baylor__banner')\r\n\r\n if (banner) {\r\n if (currentStep === 0) {\r\n showElement(banner)\r\n } else {\r\n hideElement(banner)\r\n }\r\n }\r\n }\r\n\r\n function initGiftButtons() {\r\n editButtons = getAll('.step-action-edit')\r\n removeButtons = getAll('.step-action-remove')\r\n\r\n if (editButtons.length > 0) {\r\n editButtons.forEach(function (el) {\r\n el.addEventListener('click', editGift)\r\n })\r\n }\r\n\r\n if (removeButtons.length > 0) {\r\n removeButtons.forEach(function (el) {\r\n el.addEventListener('click', removeGift)\r\n })\r\n }\r\n }\r\n\r\n function updateButtonText() {\r\n switch (currentStep) {\r\n case 0:\r\n return 'Next: Review Your Gift'\r\n case 1:\r\n return 'Next: Your Info'\r\n case 2:\r\n return 'Next: Confirm'\r\n case 3:\r\n return isCreditCard() ? 'Make Payment' : 'Submit Your Gift'\r\n }\r\n }\r\n\r\n function enableNextButtons() {\r\n nextButtons.forEach(function (el) {\r\n el.disabled = false\r\n removeClass(el, 'is-disabled')\r\n })\r\n }\r\n\r\n function disableNextButtons() {\r\n nextButtons.forEach(function (el) {\r\n el.disabled = true\r\n addClass(el, 'is-disabled')\r\n })\r\n }\r\n\r\n function updateNextButtons() {\r\n nextButtons.forEach(function (el) {\r\n const buttonText = el.querySelector('.button-text') ? el.querySelector('.button-text') : el\r\n buttonText.innerText = updateButtonText()\r\n })\r\n }\r\n\r\n function updatePreviousButtons() {\r\n prevButtons.forEach(function (el) {\r\n el.disabled = currentStep !== 2 && !el.hasAttribute('data-step-rel') ? true : false\r\n })\r\n }\r\n\r\n function updateCancelButtons() {\r\n cancelButtons.forEach(function (el) {\r\n el.disabled = (isAnotherGift || editingGift) && currentStep === 0 ? false : true\r\n })\r\n }\r\n\r\n function updateStepMarkers() {\r\n stepMarkers.forEach(function (el) {\r\n deactivateElement(el)\r\n removeClass(el, 'is-completed')\r\n })\r\n\r\n for (let i = 0; i < currentStep; i++) {\r\n addClass(stepMarkers[i], 'is-completed')\r\n }\r\n activateElement(stepMarkers[currentStep])\r\n }\r\n\r\n function updateStepMarkerText() {\r\n stepMarkers.forEach(function (el) {\r\n const normalText = el.querySelector('.step-title:not(.step-title--completed)')\r\n const completedText = el.querySelector('.step-title--completed')\r\n\r\n if (normalText && completedText) {\r\n if (hasClass(el, 'is-completed')) {\r\n hideElement(normalText)\r\n showElement(completedText)\r\n } else {\r\n hideElement(completedText)\r\n showElement(normalText)\r\n }\r\n }\r\n })\r\n }\r\n\r\n function displayStep() {\r\n formSteps.forEach(function (el) {\r\n removeClass(el, 'js-step-active')\r\n })\r\n addClass(formSteps[currentStep], 'js-step-active')\r\n\r\n showHideBanner()\r\n updateNextButtons()\r\n updatePreviousButtons()\r\n updateCancelButtons()\r\n updateStepMarkers()\r\n updateStepMarkerText()\r\n initGiftButtons()\r\n handleAmountChange()\r\n goToTop()\r\n isAnotherGift = false\r\n }\r\n\r\n function getCurrentStep(el) {\r\n currentStep = el.getAttribute('data-step-rel') ? parseInt(el.getAttribute('data-step-rel')) : currentStep\r\n }\r\n\r\n function displayNextStep() {\r\n currentStep++\r\n displayStep()\r\n }\r\n\r\n function displayPreviousStep(arg) {\r\n currentStep--\r\n getCurrentStep(arg.currentTarget ? arg.currentTarget : arg)\r\n displayStep()\r\n }\r\n\r\n function cancelStep() {\r\n getCurrentStep(this)\r\n if (currentStep === 1) {\r\n clearGiftFields()\r\n }\r\n displayStep()\r\n }\r\n\r\n function restoreDesignationSearch(gift) {\r\n let el = document.getElementById('designation-search')\r\n\r\n el.value = gift.querySelector('.gift-label').innerText\r\n triggerEvent(el, 'keyup')\r\n setTimeout(function () {\r\n document.getElementById('designation-search-results').value = gift.querySelector('.designation-fund').value\r\n }, 1000)\r\n }\r\n\r\n function restoreSpecifiedDesignation(gift) {\r\n showElement(document.getElementById('specify-fund-checkbox'))\r\n triggerEvent(document.getElementById('is-specify-fund-trigger'), 'click')\r\n document.getElementById('specify-fund').value = gift.querySelector('.gift-label').innerText\r\n }\r\n\r\n function restoreDropdown(dropdown, val) {\r\n selectOption(dropdown, val)\r\n triggerEvent(dropdown, 'change')\r\n }\r\n\r\n function restoreDropdowns(gift, selectedDesignation) {\r\n if (gift.querySelector('.designation-unit').value !== '') {\r\n restoreDropdown(selectedDesignation.querySelector('.unit-select'), gift.querySelector('.designation-unit').value)\r\n }\r\n if (gift.querySelector('.designation-area').value !== '') {\r\n restoreDropdown(selectedDesignation.querySelector('.area-select'), gift.querySelector('.designation-area').value)\r\n }\r\n if (gift.querySelector('.designation-fund').value !== '') {\r\n restoreDropdown(selectedDesignation.querySelector('.fund-select'), gift.querySelector('.designation-fund').value)\r\n }\r\n }\r\n\r\n function selectDesignation(gift) {\r\n const selectedDesignation = filter.call(designationButtons, function (el) {\r\n return el.value === gift.querySelector('.designation').value\r\n })\r\n\r\n if (selectedDesignation.length > 0) {\r\n selectedDesignation[0].checked = true\r\n triggerEvent(selectedDesignation[0], 'click')\r\n return selectedDesignation[0].getAttribute('data-tab')\r\n } else {\r\n return null\r\n }\r\n }\r\n\r\n function getGiftIndex(gift) {\r\n return gift.getAttribute('data-row-index')\r\n }\r\n\r\n function tryMatchingAmount(amount) {\r\n const amountButtons = getAll('[name=\"gift-amount\"]')\r\n const matchedAmount = filter.call(amountButtons, function (el) {\r\n return el.value === amount\r\n })\r\n\r\n if (matchedAmount[0]) {\r\n matchedAmount[0].checked = true\r\n triggerEvent(matchedAmount[0], 'click')\r\n return true\r\n }\r\n }\r\n\r\n function setOtherAmount(amount) {\r\n document.getElementById('gift-amount-other-button').checked = true\r\n triggerEvent(document.getElementById('gift-amount-other-button'), 'click')\r\n document.getElementById('gift-amount-other').value = amount\r\n setTimeout(function () {\r\n document.getElementById('gift-amount-other').blur()\r\n }, 100)\r\n }\r\n\r\n function restoreAmount(gift) {\r\n let amount = gift.querySelector('.amount').value\r\n\r\n amount = String(Number.isInteger(Number(amount)) ? parseInt(amount) : amount)\r\n if (tryMatchingAmount(amount)) {\r\n return\r\n } else {\r\n setOtherAmount(amount)\r\n }\r\n }\r\n\r\n function restoreGift(el) {\r\n const gift = getClosestEl(el, '.my-gift')\r\n const selectedDesignation = document.getElementById(selectDesignation(gift))\r\n\r\n giftIndex = getGiftIndex(gift)\r\n if (gift.querySelector('.designation-search').value === 'true' || !selectedDesignation) {\r\n restoreDesignationSearch(gift)\r\n } else if (gift.querySelector('.designation-specified').value === 'true') {\r\n restoreSpecifiedDesignation(gift)\r\n } else {\r\n restoreDropdowns(gift, selectedDesignation)\r\n }\r\n restoreAmount(gift)\r\n }\r\n\r\n function editGift() {\r\n editingGift = true\r\n getCurrentStep(this)\r\n displayStep()\r\n restoreGift(this)\r\n }\r\n\r\n function updateGiftAmounts(target) {\r\n const giftIndex = getClosestEl(target, '.my-gift').getAttribute('data-row-index')\r\n const els = getAll('[data-row-index=\"' + giftIndex + '\"]')\r\n\r\n if (els.length > 0) {\r\n els.forEach(function (el) {\r\n el.querySelector('.amount').value = target.value\r\n })\r\n }\r\n }\r\n\r\n function updateGiftAmountTotal(target = theForm.querySelector('.amount')) {\r\n const myGifts = getClosestEl(target, '.my-gifts').querySelectorAll('.my-gift')\r\n const giftAmountTotals = getAll('.js-gift-amount-total')\r\n let giftAmountTotal = 0\r\n\r\n if (myGifts.length > 0) {\r\n myGifts.forEach(function (el) {\r\n giftAmountTotal += Number(el.querySelector('.amount').value)\r\n })\r\n }\r\n\r\n if (giftAmountTotals.length > 0) {\r\n giftAmountTotals.forEach(function (el) {\r\n el.innerText = String(numToFloat(giftAmountTotal, 2))\r\n })\r\n }\r\n }\r\n\r\n function updateGiftAmount() {\r\n this.value = isNaN(parseFloat(this.value)) ? '' : numToFloat(parseFloat(this.value), 2)\r\n updateGiftAmounts(this)\r\n updateGiftAmountTotal(this)\r\n setRecurrenceFields()\r\n updateReviewInfo()\r\n }\r\n\r\n function handleAmountChange() {\r\n const giftAmounts = getAll('.amount')\r\n\r\n if (giftAmounts.length > 0) {\r\n giftAmounts.forEach(function (el) {\r\n el.addEventListener('change', updateGiftAmount)\r\n })\r\n }\r\n }\r\n\r\n function removeGift() {\r\n const thisButton = this\r\n const rowIndex = getClosestEl(thisButton, '.my-gift').getAttribute('data-row-index')\r\n\r\n getAll('[data-row-index=\"' + rowIndex + '\"]').forEach(function (el) {\r\n el.remove()\r\n })\r\n let gifts = getAll('.my-gift')\r\n if (gifts.length > 0) {\r\n const giftRowsContainers = getAll('.my-gifts')\r\n if (giftRowsContainers.length > 0) {\r\n giftRowIndex = gifts.length / giftRowsContainers.length\r\n giftRowsContainers.forEach(function (el) {\r\n gifts = el.querySelectorAll('.my-gift')\r\n gifts.forEach(function (el, i) {\r\n el.setAttribute('data-row-index', i + 1)\r\n })\r\n })\r\n }\r\n updateGiftAmountTotal()\r\n setRecurrenceFields()\r\n updateReviewInfo()\r\n } else {\r\n giftRowIndex = 0\r\n displayPreviousStep(thisButton)\r\n }\r\n }\r\n\r\n function getGiftAmount() {\r\n const selectedAmount = theForm.querySelector('[name=\"gift-amount\"]:checked').value\r\n\r\n return Number(selectedAmount !== 'other' ? selectedAmount : document.getElementById('gift-amount-other').value)\r\n }\r\n\r\n function getGift() {\r\n const designation = theForm.querySelector('.gift-designation .tab-content.is-active')\r\n const selectedAmount = theForm.querySelector('[name=\"gift-amount\"]:checked').value\r\n const gift = {\r\n searchResult: document.getElementById('designation-search-results'),\r\n isSearchResult: getSelectedOptionValue(document.getElementById('designation-search-results')) !== '',\r\n isSpecifiedFund: document.getElementById('is-specify-fund').checked && document.getElementById('specify-fund').value !== '',\r\n giftUnit: designation.querySelector('.unit-select') ? designation.querySelector('.unit-select') : null,\r\n giftArea: designation.querySelector('.area-select') ? designation.querySelector('.area-select') : null,\r\n giftFund: designation.querySelector('.fund-select') ? designation.querySelector('.fund-select') : null,\r\n giftAmount: getGiftAmount(),\r\n }\r\n return gift\r\n }\r\n\r\n function createGift(el, gift, index) {\r\n el.querySelector('.gift-label').innerText = gift.isSearchResult\r\n ? getSelectedOptionText(gift.searchResult)\r\n : gift.isSpecifiedFund\r\n ? document.getElementById('specify-fund').value\r\n : getSelectedOptionText(gift.giftFund)\r\n el.querySelector('.amount').value = numToFloat(gift.giftAmount, 2)\r\n el.querySelector('.amount').name = 'amount-' + giftRowIndex\r\n el.querySelector('.designation').value = theForm.querySelector('[name=\"designation\"]:checked').value\r\n el.querySelector('.designation').name = 'designation-' + giftRowIndex\r\n el.querySelector('.designation-unit').value =\r\n gift.isSpecifiedFund || gift.isSearchResult ? '' : gift.giftUnit ? getSelectedOptionValue(gift.giftUnit) : ''\r\n el.querySelector('.designation-unit').name = 'designation-unit-' + giftRowIndex\r\n el.querySelector('.designation-area').value =\r\n gift.isSpecifiedFund || gift.isSearchResult ? '' : gift.giftArea ? getSelectedOptionValue(gift.giftArea) : ''\r\n el.querySelector('.designation-area').name = 'designation-area-' + giftRowIndex\r\n el.querySelector('.designation-fund').value = gift.isSearchResult\r\n ? getSelectedOptionValue(gift.searchResult)\r\n : gift.giftFund\r\n ? getSelectedOptionValue(gift.giftFund)\r\n : ''\r\n el.querySelector('.designation-fund').name = 'designation-fund-' + giftRowIndex\r\n el.querySelector('.designation-search').value = gift.isSearchResult && !gift.isSpecifiedFund ? true : false\r\n el.querySelector('.designation-search').name = 'designation-search-' + giftRowIndex\r\n el.querySelector('.designation-specified').value = gift.isSpecifiedFund ? true : false\r\n el.querySelector('.designation-specified').name = 'designation-specified-' + giftRowIndex\r\n return el\r\n }\r\n\r\n function updateGiftRow() {\r\n const gift = getGift()\r\n const giftRows = getAll('[data-row-index=\"' + giftIndex + '\"]')\r\n\r\n if (giftRows.length > 0) {\r\n giftRows.forEach(function (el, index) {\r\n el = createGift(el, gift, index)\r\n })\r\n updateGiftAmountTotal()\r\n setRecurrenceFields()\r\n updateReviewInfo()\r\n }\r\n }\r\n\r\n function getGiftRowTemplate() {\r\n let template = document.getElementById('my-gift-template').cloneNode(true)\r\n\r\n template.removeAttribute('id')\r\n template.removeAttribute('style')\r\n template.setAttribute('data-row-index', giftRowIndex)\r\n return template\r\n }\r\n\r\n function addGiftRow() {\r\n const gift = getGift()\r\n const giftRowsContainers = getAll('.my-gifts')\r\n\r\n giftRowIndex++\r\n\r\n if (giftRowsContainers.length > 0) {\r\n giftRowsContainers.forEach(function (el) {\r\n let clone = getGiftRowTemplate()\r\n\r\n clone = createGift(clone, gift)\r\n el.insertBefore(clone, el.querySelector('.my-gift-add'))\r\n })\r\n updateGiftAmountTotal()\r\n setRecurrenceFields()\r\n updateReviewInfo()\r\n }\r\n }\r\n\r\n function addPreSelectedGiftRow(preSelectedGift) {\r\n const giftFundCategory = fundCategories[preSelectedGift.designation.categories[0]] ? fundCategories[preSelectedGift.designation.categories[0]] : ''\r\n const giftFundUnit = preSelectedGift.designation.categories[1] ? preSelectedGift.designation.categories[1] : ''\r\n const giftFundArea = preSelectedGift.designation.categories[2] ? preSelectedGift.designation.categories[2] : ''\r\n const giftFundId = preSelectedGift.designation.guid\r\n const giftFundText = preSelectedGift.designation.name\r\n const giftAmount = numToFloat(preSelectedGift.amount, 2)\r\n const editStatus = preSelectedGift.edit\r\n const removeStatus = preSelectedGift.remove\r\n const giftRowsContainers = getAll('.my-gifts')\r\n\r\n giftRowIndex++\r\n\r\n if (giftRowsContainers.length > 0) {\r\n giftRowsContainers.forEach(function (el) {\r\n let clone = getGiftRowTemplate()\r\n const amountField = clone.querySelector('.amount')\r\n const editButton = clone.querySelector('.gift-edit')\r\n const removeButton = clone.querySelector('.gift-remove')\r\n\r\n clone.querySelector('.gift-label').innerText = giftFundText\r\n amountField.value = giftAmount\r\n clone.querySelector('.designation').value = giftFundCategory\r\n clone.querySelector('.designation-unit').value = giftFundUnit\r\n clone.querySelector('.designation-area').value = giftFundArea\r\n clone.querySelector('.designation-fund').value = giftFundId\r\n clone.querySelector('.designation-search').value = false\r\n //if (editStatus === '1' || giftFundCategory === '') {\r\n if (editStatus === '1') {\r\n hideElement(editButton)\r\n amountField.addEventListener('change', function () {\r\n increaseOnly(giftAmount)\r\n })\r\n //} else if (editStatus === '2' || giftFundCategory === '') {\r\n } else if (editStatus === '2') {\r\n hideElement(editButton)\r\n amountField.disabled = true\r\n }\r\n if (removeStatus === '1') {\r\n hideElement(removeButton)\r\n }\r\n el.insertBefore(clone, el.querySelector('.my-gift-add'))\r\n })\r\n updateGiftAmountTotal()\r\n }\r\n }\r\n\r\n function clearGiftFields() {\r\n hideFunds()\r\n clearUnits()\r\n clearSpecifiedFund()\r\n hideGiftLevels()\r\n document.getElementById('designation-1').checked = true\r\n triggerEvent(document.getElementById('designation-1'), 'click')\r\n document.getElementById('gift-amount-1').checked = true\r\n triggerEvent(document.getElementById('gift-amount-1'), 'click')\r\n document.getElementById('designation-search').value = ''\r\n triggerEvent(document.getElementById('designation-search'), 'change')\r\n document.getElementById('designation-search').value = ''\r\n }\r\n\r\n function getRecurringPayments() {\r\n const numberOfInstallments = document.getElementById('gift-num-payments').value\r\n let giftFrequency = theForm.querySelector('[name=\"gift-type\"]:checked').nextElementSibling.innerText\r\n const totalGiftAmount = document.getElementById('gift-amount-total-recurring').innerText\r\n const recurringGiftAmount = ds.getRecurringGiftInstallmentAmount(parseFloat(totalGiftAmount.replace(/\\$/, '')), numberOfInstallments)\r\n\r\n if (giftFrequency === 'Annually') {\r\n giftFrequency = 'Annual'\r\n }\r\n return numberOfInstallments + ' ' + giftFrequency + ' Payments of $' + recurringGiftAmount + '\\nTotal Gift of ' + totalGiftAmount\r\n }\r\n\r\n function getGiftFrequency() {\r\n return isNaN(parseInt(theForm.querySelector('[name=\"gift-type\"]:checked').value))\r\n ? theForm.querySelector('[name=\"gift-type\"]:checked').nextElementSibling.innerText\r\n : getRecurringPayments()\r\n }\r\n\r\n function maybeInternational() {\r\n return document.getElementById('country-type-2').checked\r\n }\r\n\r\n function updateReviewInfo() {\r\n const isInternational = maybeInternational()\r\n const root = document.getElementById('donor-info')\r\n\r\n if (root) {\r\n root.querySelector('.js-gift-frequency').innerText = getGiftFrequency()\r\n root.querySelector('.js-payment-type').innerText = theForm.querySelector('[name=\"gift-payment-type\"]:checked').nextElementSibling.innerText\r\n root.querySelector('.js-donor-first-name').innerText = document.getElementById('donor-first-name').value\r\n root.querySelector('.js-donor-last-name').innerText = document.getElementById('donor-last-name').value\r\n root.querySelector('.js-donor-address').innerText = isInternational\r\n ? document.getElementById('donor-address-intl').value\r\n : document.getElementById('donor-address').value\r\n root.querySelector('.js-donor-city').innerText = isInternational\r\n ? document.getElementById('donor-city-intl').value\r\n : document.getElementById('donor-city').value\r\n root.querySelector('.js-donor-state').innerText = isInternational\r\n ? document.getElementById('donor-province-intl--text').value || getSelectedOptionText(document.getElementById('donor-province-intl--select'))\r\n : getSelectedOptionValue(document.getElementById('donor-state'))\r\n root.querySelector('.js-donor-zip-postal').innerText = isInternational\r\n ? document.getElementById('donor-zip-intl').value\r\n : document.getElementById('donor-zip').value\r\n root.querySelector('.js-donor-country').innerText = isInternational ? getSelectedOptionText(document.getElementById('donor-country')) : ''\r\n root.querySelector('.js-donor-email').innerText = document.getElementById('donor-email').value\r\n root.querySelector('.js-donor-phone').innerText = document.getElementById('donor-phone').value\r\n }\r\n }\r\n\r\n document.getElementById('is-corporate').addEventListener('click', function () {\r\n const el = document.getElementById('employer-matching')\r\n\r\n if (el) {\r\n if (this.checked) {\r\n if (document.getElementById('is-employer-matching').checked) {\r\n document.getElementById('employer-matching-control').click()\r\n }\r\n disableFields(el)\r\n } else {\r\n enableFields(el)\r\n }\r\n }\r\n })\r\n\r\n // function saveForm() {\r\n // // Save form input values\r\n // FormPersistence.save(bbForm, {\r\n // uuid: 'savedForm',\r\n // useSessionStorage: true,\r\n // })\r\n // // Save current form HTML\r\n // localStorage.setItem('savedHTML', JSON.stringify(theForm.innerHTML))\r\n // }\r\n\r\n // if (isReturning) {\r\n // displayStep()\r\n // setFrequency(theForm.querySelector('[name=\"gift-type\"]:checked'))\r\n // }\r\n }\r\n\r\n // function restoreForm() {\r\n // const modal = document.getElementById('modal-restore')\r\n // if (modal) {\r\n // showPage()\r\n // activateElement(modal)\r\n // modal.querySelectorAll('.modal-continue').forEach(function (el) {\r\n // el.addEventListener('click', function () {\r\n // theForm.innerHTML = JSON.parse(localStorage.getItem('savedHTML'))\r\n // FormPersistence.load(bbForm, {\r\n // uuid: 'savedForm',\r\n // useSessionStorage: true,\r\n // })\r\n // deactivateElement(modal)\r\n // isReturning = true\r\n // currentStep = 1\r\n // giftRowIndex = document.getElementById('my-gifts').querySelectorAll('.my-gift').length\r\n // initForm()\r\n // })\r\n // })\r\n // modal.querySelectorAll('.modal-reset').forEach(function (el) {\r\n // el.addEventListener('click', function () {\r\n // deactivateElement(modal)\r\n // initForm()\r\n // removeSavedData()\r\n // })\r\n // })\r\n // } else {\r\n // initForm()\r\n // }\r\n // }\r\n\r\n function loadForm() {\r\n // if (localStorage.getItem('savedHTML') !== null) {\r\n // restoreForm()\r\n // } else {\r\n // initForm()\r\n // }\r\n initForm()\r\n }\r\n\r\n function showSpecifiedFund() {\r\n const specifiedFund = localStorage.getItem('specifiedFund')\r\n const unmappedFund = contains('.DonationFieldControlCell > span', 'Unmapped')\r\n\r\n if (specifiedFund && unmappedFund[0]) {\r\n unmappedFund[0].innerText = 'Specified fund: ' + specifiedFund\r\n }\r\n }\r\n\r\n function showRecurrenceSummary() {\r\n const recurrenceInfo = document.getElementById('confirmation-recurrence-info')\r\n\r\n if (recurrenceInfo) {\r\n const isCreditCard = document.getElementById('baylor__adf-confirmation').innerText.indexOf('Credit Card') > -1\r\n const frequency = recurrenceInfo.querySelector('span:first-of-type').innerText.indexOf('month') > -1 ? 'Monthly' : 'Annual'\r\n const startDate = new Date(recurrenceInfo.querySelector('span:nth-of-type(2)').innerText)\r\n const endDate = new Date(recurrenceInfo.querySelector('span:nth-of-type(4)').innerText)\r\n const numPayments =\r\n frequency === 'Monthly'\r\n ? getMonthDiff(startDate, endDate) + 1\r\n : isCreditCard\r\n ? getYearDiff(startDate, endDate) + 1\r\n : getYearDiff(startDate, endDate)\r\n let giftAmount = document.getElementById('confirmation-gift-amount').innerText.replace(/\\$/, '').replace(/,/g, '')\r\n let totalGiftAmount\r\n\r\n giftAmount = isCreditCard ? giftAmount : numToFloat(parseFloat(giftAmount) / numPayments, 2)\r\n totalGiftAmount = String(numToFloat(parseFloat(giftAmount) * numPayments, 2))\r\n recurrenceInfo.innerText = numPayments + ' ' + frequency + ' Payments of $' + String(giftAmount) + '\\nTotal Gift of $' + totalGiftAmount\r\n }\r\n }\r\n\r\n function showDirectDebitSummary() {\r\n const isDirectDebit = document.querySelector('.BBDonationConfirmation').innerText.indexOf('Direct Debit') > -1\r\n\r\n if (isDirectDebit) {\r\n const payOptRow = contains('.DonationFieldCaption', 'Payment Option')\r\n\r\n if (payOptRow.length > 0) {\r\n const el = getClosestEl(payOptRow[0], 'dl')\r\n if (el) {\r\n hideElement(el)\r\n }\r\n }\r\n }\r\n }\r\n\r\n function setupConfirmation() {\r\n addClass(document.body, 'is-confirmation')\r\n showElement(document.querySelector('.baylor__banner'))\r\n hideElement(document.querySelector('.baylor__banner ~ .baylor__banner'))\r\n showPage()\r\n removeSavedData()\r\n }\r\n\r\n function insertConfirmationHtml(confirmationHtml) {\r\n if (confirmationHtml) {\r\n document.getElementById('baylor__adf-confirmation').innerHTML = confirmationHtml\r\n }\r\n showSpecifiedFund()\r\n showRecurrenceSummary()\r\n showDirectDebitSummary()\r\n }\r\n\r\n function getConfirmation(donationId) {\r\n const success = function (returnedHtml) {\r\n insertConfirmationHtml(returnedHtml)\r\n }\r\n\r\n const error = function (returnedErrors) {\r\n console.log(returnedErrors)\r\n }\r\n\r\n setupConfirmation()\r\n ds.getDonationConfirmationHtml(donationId, success, error)\r\n }\r\n\r\n function completeDonation() {\r\n const success = function (returnedDonation) {\r\n getConfirmation(returnedDonation.Id)\r\n }\r\n\r\n const error = function (returnedErrors) {\r\n if (returnedErrors[0].ErrorCode === 203) {\r\n loadForm()\r\n }\r\n }\r\n\r\n ds.completeBBSPDonation(donationId, success, error)\r\n }\r\n\r\n if (theConfirmation && donationId) {\r\n completeDonation()\r\n } else if (theForm) {\r\n loadForm()\r\n }\r\n }\r\n initBBIS()\r\n })\r\n\r\n // Array functions\r\n function chunkArray(arr, chunkSize) {\r\n const arrayLength = arr.length\r\n let tempArray = []\r\n\r\n for (let index = 0; index < arrayLength; index += chunkSize) {\r\n let chunk = arr.slice(index, index + chunkSize)\r\n tempArray.push(chunk)\r\n }\r\n return tempArray\r\n }\r\n\r\n function dynamicSort(property) {\r\n let sortOrder = 1\r\n if (property[0] === '-') {\r\n sortOrder = -1\r\n property = property.substr(1)\r\n }\r\n return function (a, b) {\r\n let result = a[property] < b[property] ? -1 : a[property] > b[property] ? 1 : 0\r\n return result * sortOrder\r\n }\r\n }\r\n\r\n // CSS class functions\r\n function hasClass(el, cls) {\r\n return el.className.match(new RegExp('(\\\\s|^)' + cls + '(\\\\s|$)'))\r\n }\r\n\r\n function clearClass(el) {\r\n el.className = ''\r\n }\r\n\r\n function addClass(el, cls) {\r\n if (!hasClass(el, cls)) el.className += ' ' + cls\r\n }\r\n\r\n function removeClass(el, cls) {\r\n if (hasClass(el, cls)) {\r\n let reg = new RegExp('(\\\\s|^)' + cls + '(\\\\s|$)')\r\n el.className = el.className.replace(reg, ' ')\r\n }\r\n }\r\n\r\n function activateElement(el) {\r\n addClass(el, 'is-active')\r\n }\r\n\r\n function deactivateElement(el) {\r\n removeClass(el, 'is-active')\r\n }\r\n\r\n function hideElement(el) {\r\n if (el) {\r\n addClass(el, 'is-hidden')\r\n }\r\n }\r\n\r\n function showElement(el) {\r\n if (el) {\r\n removeClass(el, 'is-hidden')\r\n }\r\n }\r\n\r\n // Date functions\r\n function getMonthDiff(dateFrom, dateTo) {\r\n return dateTo.getMonth() - dateFrom.getMonth() + 12 * (dateTo.getFullYear() - dateFrom.getFullYear())\r\n }\r\n\r\n function getYearDiff(dateFrom, dateTo) {\r\n return dateTo.getFullYear() - dateFrom.getFullYear()\r\n }\r\n\r\n function addMonths(date, months) {\r\n let d = date.getDate()\r\n\r\n date.setMonth(date.getMonth() + +months)\r\n if (date.getDate() != d) {\r\n date.setDate(0)\r\n }\r\n return date\r\n }\r\n\r\n // DOM functions\r\n function wrap(node, wrapper) {\r\n node.parentNode.insertBefore(wrapper, node)\r\n wrapper.appendChild(node)\r\n\r\n return wrapper\r\n }\r\n\r\n function wrapAll(nodes, wrapper) {\r\n let parent = nodes[0].parentNode\r\n let previousSibling = nodes[0].previousSibling\r\n\r\n for (let i = 0; nodes.length - i; wrapper.firstChild === nodes[0] && i++) {\r\n wrapper.appendChild(nodes[i])\r\n }\r\n\r\n let nextSibling = previousSibling ? previousSibling.nextSibling : parent.firstChild\r\n parent.insertBefore(wrapper, nextSibling)\r\n return wrapper\r\n }\r\n\r\n function contains(selector, text) {\r\n const els = getAll(selector)\r\n return [].filter.call(els, function (el) {\r\n return RegExp(text).test(el.textContent)\r\n })\r\n }\r\n\r\n function clearElement(el) {\r\n while (el.firstChild) {\r\n el.removeChild(el.firstChild)\r\n }\r\n }\r\n\r\n function getAll(selector, root = document) {\r\n return Array.prototype.slice.call(root.querySelectorAll(selector), 0)\r\n }\r\n\r\n function getClosestEl(el, selector) {\r\n let closestNode = el.closest(selector)\r\n\r\n return closestNode ? closestNode : null\r\n }\r\n\r\n function getSiblings(el) {\r\n let siblings = []\r\n let sibling = el.parentNode.firstChild\r\n\r\n while (sibling) {\r\n if (sibling.nodeType === 1 && sibling !== el) {\r\n siblings.push(sibling)\r\n }\r\n sibling = sibling.nextSibling\r\n }\r\n return siblings\r\n }\r\n\r\n function getNextSiblings(el, filter) {\r\n let siblings = []\r\n\r\n while ((el = el.nextSibling)) {\r\n if (!filter || filter(el)) siblings.push(el)\r\n }\r\n return siblings\r\n }\r\n\r\n function insertAfter(newNode, referenceNode) {\r\n referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling)\r\n }\r\n\r\n // Event functions\r\n function triggerEvent(el, evt) {\r\n el.dispatchEvent(new Event(evt))\r\n }\r\n\r\n // Input functions\r\n function increaseOnly(minAmount) {\r\n if (event.target.value < minAmount || isNaN(parseFloat(event.target.value))) {\r\n event.target.value = minAmount\r\n }\r\n }\r\n\r\n function clearValue(el) {\r\n el.value = ''\r\n }\r\n\r\n function addPlaceholder(el, placeholder) {\r\n el.placholder = placeholder\r\n }\r\n\r\n // Input select-one functions\r\n function getSelectedOptionAttribute(el, attr) {\r\n return el.options[el.selectedIndex].getAttribute(attr)\r\n }\r\n\r\n function getSelectedOptionText(el) {\r\n return el.options[el.selectedIndex].text\r\n }\r\n\r\n function getSelectedOptionValue(el) {\r\n return el.options[el.selectedIndex].value\r\n }\r\n\r\n function selectOption(el, valueToSelect) {\r\n el.value = valueToSelect\r\n }\r\n\r\n function clearOptions(el) {\r\n while (el.childNodes.length > 2) {\r\n el.removeChild(el.lastChild)\r\n }\r\n }\r\n\r\n function createDesignationOption(el, option) {\r\n let opt = document.createElement('option')\r\n\r\n opt.value = option.guid\r\n opt.text = option.name\r\n opt.setAttribute('data-lookupId', option.lookupId)\r\n if (option.redirectURL !== '') {\r\n opt.setAttribute('data-redirectURL', option.redirectURL)\r\n }\r\n return el.nodeName.toLowerCase() === 'select' ? el.add(opt) : el.appendChild(opt)\r\n }\r\n\r\n function createISOOption(el, obj) {\r\n let opt = document.createElement('option')\r\n\r\n opt.value = obj.Id\r\n opt.text = obj.Description\r\n opt.setAttribute('iso', obj.ISO)\r\n el.add(opt)\r\n }\r\n\r\n function createOptGroup(dropdown, group, objs) {\r\n let optGroup = document.createElement('optgroup')\r\n\r\n optGroup.setAttribute('label', '[' + group + ']')\r\n objs.forEach(function (obj) {\r\n createDesignationOption(optGroup, obj)\r\n })\r\n dropdown.appendChild(optGroup)\r\n }\r\n\r\n function createOption(el, option) {\r\n let opt = document.createElement('option')\r\n\r\n opt.value = option\r\n opt.text = option\r\n el.add(opt)\r\n }\r\n\r\n function addBlankOption(el) {\r\n return el.add(new Option('\\u2014 Select \\u2014', '', true, true), el.options[0])\r\n }\r\n\r\n // Location functions\r\n function getUrlVars() {\r\n let vars = {}\r\n let parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function (m, key, value) {\r\n vars[key] = value\r\n })\r\n return vars\r\n }\r\n\r\n // Number functions\r\n function numToFloat(num, decPlaces) {\r\n return num.toFixed(decPlaces)\r\n }\r\n\r\n //Property functions\r\n function disableFields(el) {\r\n const fields = el.querySelectorAll('input, select, textarea')\r\n\r\n el.disabled = true\r\n if (fields.length > 0) {\r\n fields.forEach(function (field) {\r\n field.disabled = true\r\n\r\n switch (field.type.toLowerCase()) {\r\n case 'checkbox' || 'radio':\r\n field.checked = false\r\n break\r\n case 'select-one' || 'textarea':\r\n field.value = ''\r\n break\r\n default:\r\n field.value = ''\r\n }\r\n })\r\n }\r\n }\r\n\r\n function enableFields(el) {\r\n const fields = el.querySelectorAll('input, select, textarea')\r\n\r\n el.disabled = false\r\n if (fields.length > 0) {\r\n fields.forEach(function (field) {\r\n field.disabled = false\r\n })\r\n }\r\n }\r\n\r\n function makeRequired(el) {\r\n el.required = true\r\n }\r\n\r\n // String functions\r\n function updateText(el, str) {\r\n el.innerText(str)\r\n }\r\n\r\n // Misc functions\r\n function hidePage() {\r\n document.body.setAttribute('style', 'position: fixed; width: 100%;')\r\n document.querySelector('main .container').setAttribute('style', 'opacity: 0 !important;')\r\n }\r\n\r\n function showPage() {\r\n document.body.setAttribute('style', 'position: static')\r\n document.querySelector('.baylor__header').setAttribute('style', 'position: relative !important;')\r\n document.querySelector('.pageloader').setAttribute('style', 'transform: translateY(-200%) !important;')\r\n document.querySelector('main .container').setAttribute('style', 'opacity: 1 !important;')\r\n }\r\n\r\n function goToTop() {\r\n window.scrollTo(0, 0)\r\n }\r\n})()\r\n"],"file":"adf-scripts.min.js"}