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A+Bf,SAASuC,EAAcL,GACnB,IAAIM,EAAYN,EAAW,MAAIA,EAAMO,MAAQP,EAAMQ,QAC/CF,EAAW,KAAOA,EAAW,IAAMA,EAAW,KAC9CN,EAAMS,gBAEd,CACAhD,OAAOiD,OAAS,WACE/D,SAASmB,eAAe,YAC9BZ,iBAAiB,WAAYmD,EACzC,CACJ,C","sources":["webpack:///./global.ts"],"sourcesContent":["var mobilenavBar = document.querySelector(\"#mobile-nav-items\");\nvar menuSwitchOn = document.querySelector(\"#toggleOnMenu\");\nvar menuSwitchOff = document.querySelector(\"#toggleOffMenu\");\nvar contactSwitchOn = document.querySelector(\"#toggleOnContact\");\nvar contactSwitchOff = document.querySelector(\"#toggleOffContact\");\nvar contactInfo = document.querySelector(\"#contact-info\");\nfunction toggleMenu(switchOnElement, switchOffElement) {\n // Compute new display values for the toggled buttons\n var switchOnNewDisplay = switchOnElement.style.display === \"none\" ? \"inline-block\" : \"none\";\n var switchOffNewDisplay = switchOnNewDisplay === \"inline-block\" ? \"none\" : \"inline-block\";\n // Apply the computed display values\n switchOnElement.style.display = switchOnNewDisplay;\n switchOffElement.style.display = switchOffNewDisplay;\n // Handle the navigation bar visibility\n if (switchOnElement === menuSwitchOn) {\n mobilenavBar.style.display = mobilenavBar.style.display === \"flex\" ? \"none\" : \"flex\";\n contactInfo.style.display = \"none\";\n contactSwitchOff.style.display = \"none\";\n contactSwitchOn.style.display = \"flex\";\n }\n}\nfunction toggleContact(switchOnElement, switchOffElement) {\n // Compute new display values for the toggled buttons\n var switchOnNewDisplay = switchOnElement.style.display === \"none\" ? \"inline-block\" : \"none\";\n var switchOffNewDisplay = switchOnNewDisplay === \"inline-block\" ? \"none\" : \"inline-block\";\n // Apply the computed display values\n switchOnElement.style.display = switchOnNewDisplay;\n switchOffElement.style.display = switchOffNewDisplay;\n // Handle the navigation bar visibility\n if (switchOnElement === contactSwitchOn) {\n contactInfo.style.display = contactInfo.style.display === \"flex\" ? \"none\" : \"flex\";\n mobilenavBar.style.display = \"none\";\n menuSwitchOff.style.display = \"none\";\n menuSwitchOn.style.display = \"flex\";\n }\n}\nvar navBtn = document.querySelector(\"#navToggleMenu\");\nnavBtn.addEventListener(\"click\", function () { return toggleMenu(menuSwitchOn, menuSwitchOff); });\nvar contactBtn = document.querySelector(\"#navToggleContact\");\ncontactBtn.addEventListener(\"click\", function () { return toggleContact(contactSwitchOn, contactSwitchOff); });\nwindow.addEventListener('resize', function () {\n // Hide both menus and their toggle buttons on resize for small screens\n if (window.matchMedia(\"(max-width: 768px)\").matches) {\n menuSwitchOn.style.display = \"flex\";\n menuSwitchOff.style.display = \"none\";\n contactSwitchOn.style.display = \"flex\";\n contactSwitchOff.style.display = \"none\";\n mobilenavBar.style.display = \"none\";\n contactInfo.style.display = \"none\";\n }\n});\n//This adds the highlight to the navigation elements\n//const navLinks = document.querySelectorAll(\".js-main-nav-link\");\n//navLinks.forEach((navLink: HTMLElement) => {\n// if (window.location.pathname === navLink.dataset.navLink) {\n// navLink.classList.add(\"text-selective-yellow\");\n// }\n//});\n//this is for the timeline\nvar currentEventIndex = 0;\nvar timeline = document.getElementById('timeline');\nvar nextButton = document.getElementById('nextButton');\nvar prevButton = document.getElementById('prevButton');\nvar eventWidth = 235;\nvar eventMargin = 15;\nvar maxThreshold = 5;\nvar threshold = maxThreshold;\nvar totalEvents = 0;\nvar startX = 0;\nvar currentTranslate = 0;\nvar prevTranslate = 0;\nvar isDragging = false;\nif (timeline !== null) {\n var eventElements = timeline.querySelectorAll('.timeline-card');\n totalEvents = eventElements.length;\n prevButton.style.backgroundColor = \"grey\";\n prevButton.disabled = true;\n function updateThreshold() {\n var viewportWidth = window.innerWidth - 120;\n var adjustedEventWidth = eventWidth + eventMargin;\n var calculatedThreshold = Math.floor(viewportWidth / adjustedEventWidth);\n threshold = Math.min(Math.max(calculatedThreshold, 1), maxThreshold);\n updateCarouselWidth();\n setButtonStates();\n }\n function updateCarouselWidth() {\n var visibleWidth = threshold * (eventWidth + eventMargin + 8);\n var timelineWrapper = document.querySelector('.timeline-container');\n if (timelineWrapper) {\n timelineWrapper.style.width = \"\".concat(visibleWidth, \"px\");\n }\n updateTimelinePosition();\n }\n function setButtonStates() {\n var maxScrollIndex = Math.max(totalEvents - threshold, 0);\n prevButton.disabled = currentEventIndex === 0;\n prevButton.style.backgroundColor = prevButton.disabled ? \"grey\" : \"\";\n nextButton.disabled = currentEventIndex >= maxScrollIndex;\n nextButton.style.backgroundColor = nextButton.disabled ? \"grey\" : \"\";\n }\n function slideNext() {\n var maxScrollIndex = Math.max(totalEvents - threshold, 0);\n if (currentEventIndex < maxScrollIndex) {\n currentEventIndex += threshold;\n if (currentEventIndex > maxScrollIndex) {\n currentEventIndex = maxScrollIndex;\n }\n updateTimelinePosition();\n setButtonStates();\n }\n }\n function slidePrev() {\n if (currentEventIndex > 0) {\n currentEventIndex -= threshold;\n if (currentEventIndex < 0) {\n currentEventIndex = 0;\n }\n updateTimelinePosition();\n setButtonStates();\n }\n }\n function updateTimelinePosition() {\n var offset = -currentEventIndex * (eventWidth + eventMargin);\n timeline.style.transform = \"translateX(\".concat(offset, \"px)\");\n }\n nextButton.addEventListener('click', slideNext);\n prevButton.addEventListener('click', slidePrev);\n timeline.addEventListener('touchstart', function (event) {\n isDragging = true;\n startX = event.touches[0].clientX;\n prevTranslate = currentTranslate;\n });\n timeline.addEventListener('touchmove', function (event) {\n if (!isDragging)\n return;\n var currentX = event.touches[0].clientX;\n currentTranslate = prevTranslate + currentX - startX;\n timeline.style.transform = \"translateX(\".concat(currentTranslate, \"px)\");\n });\n timeline.addEventListener('touchend', function () {\n isDragging = false;\n var movedBy = currentTranslate - prevTranslate;\n if (movedBy < -eventWidth / 3 && currentEventIndex < totalEvents - threshold) {\n slideNext();\n }\n else if (movedBy > eventWidth / 3 && currentEventIndex > 0) {\n slidePrev();\n }\n else {\n updateTimelinePosition();\n }\n });\n timeline.addEventListener('mousedown', function (event) {\n isDragging = true;\n startX = event.clientX;\n prevTranslate = currentTranslate;\n });\n window.addEventListener('mousemove', function (event) {\n if (!isDragging)\n return;\n var currentX = event.clientX;\n currentTranslate = prevTranslate + currentX - startX;\n timeline.style.transform = \"translateX(\".concat(currentTranslate, \"px)\");\n });\n window.addEventListener('mouseup', function () {\n if (!isDragging)\n return;\n isDragging = false;\n var movedBy = currentTranslate - prevTranslate;\n if (movedBy < -eventWidth / 3 && currentEventIndex < totalEvents - threshold) {\n slideNext();\n }\n else if (movedBy > eventWidth / 3 && currentEventIndex > 0) {\n slidePrev();\n }\n else {\n updateTimelinePosition();\n }\n });\n window.addEventListener('resize', function () {\n updateThreshold();\n });\n window.addEventListener('load', function () {\n updateThreshold();\n });\n}\nvar form = document.getElementById('myform');\nif (form !== null) {\n //document.getElementById('myform').querySelector('form').addEventListener('submit', function (event) {\n // if (this.classList.contains('disabled')) {\n // event.preventDefault();\n // return;\n // }\n // this.classList.add('disabled');\n // const inputs = document.querySelectorAll('input:not([type=\"hidden\"]), textarea');\n // let valid = true;\n // inputs.forEach(i => {\n // const inputElement = i as HTMLInputElement | HTMLTextAreaElement;\n // const errorSpan = i.nextElementSibling;\n // if (errorSpan) {\n // if (!inputElement.value.trim()) {\n // console.log(\"I found an error...\", { i, errorSpan, });\n // i.classList.add('border-red', 'text-red');\n // errorSpan.classList.remove('hidden');\n // valid = false;\n // } else {\n // i.classList.remove('border-red', 'text-red');\n // errorSpan.classList.add('hidden');\n // }\n // }\n // });\n // if (valid) {\n // //Do nothing, let the form submit!\n // } else {\n // this.classList.remove('disabled');\n // event.preventDefault();\n // }\n //});\n function onlyNumberKey(event) {\n var charCode = (event.which) ? event.which : event.keyCode;\n if (charCode > 31 && (charCode < 48 || charCode > 57)) {\n event.preventDefault();\n }\n }\n window.onload = function () {\n var myInput = document.getElementById('phoneNum');\n myInput.addEventListener('keypress', onlyNumberKey);\n };\n}\n"],"names":["mobilenavBar","document","querySelector","menuSwitchOn","menuSwitchOff","contactSwitchOn","contactSwitchOff","contactInfo","addEventListener","switchOffElement","switchOffNewDisplay","switchOnNewDisplay","switchOnElement","style","display","window","matchMedia","matches","currentEventIndex","timeline","getElementById","nextButton","prevButton","threshold","totalEvents","startX","currentTranslate","prevTranslate","isDragging","eventElements","querySelectorAll","updateThreshold","visibleWidth","timelineWrapper","viewportWidth","innerWidth","calculatedThreshold","Math","floor","eventWidth","min","max","width","concat","updateTimelinePosition","setButtonStates","maxScrollIndex","disabled","backgroundColor","slideNext","slidePrev","offset","transform","length","event","touches","clientX","currentX","movedBy","onlyNumberKey","charCode","which","keyCode","preventDefault","onload"],"sourceRoot":""}