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AKE,eAAiBJ,EAAK1F,UAAU+C,SAAS,mCAAoC,IACxJgD,KAAI,SAAAL,GAAI,OAAIA,EAAKb,YAAYC,MAAM,IACnCkB,KAAK,KAAKlB,QAAU,GAInBE,EAAY,CACdrD,MAAO,eACPsD,SAJaiB,EAAmB,GAAHzG,OAAMyG,EAAgB,OAAAzG,OAAMsF,GAAiBA,EAK1EG,WAAYtB,GAGd1F,OAAOiH,UAAUC,KAAKJ,EACxB,GACF,GAEJ,C","sources":["webpack://@hero-digital/zoom/./src/components/foundation/Tabs/Tabs.js","webpack://@hero-digital/zoom/./src/js/utilities/datalayer/data-layer-tab.js"],"sourcesContent":["import { DataLayerTab } from '../../../js/utilities/datalayer/data-layer-tab'\r\n\r\nclass Tabs {\r\n constructor(el) {\r\n this.el = el\r\n\r\n this.domMap = {\r\n $tabs: el.querySelectorAll('.fdn-tabs__tab:not([disabled])'),\r\n $tabPanels: el.querySelectorAll('.fdn-tabs__tabpanel'),\r\n initialActiveTabs: el.querySelectorAll('.nav-link.active'),\r\n $innerTabs: el.querySelectorAll('.nested-product-tab-wrapper__inner-nav .nav-link'),\r\n indicators: el.querySelectorAll('.nav-tabs__indicator--horizontal')\r\n }\r\n\r\n this.addListeners()\r\n this.DataLayerTab = new DataLayerTab()\r\n this.initNestedTabsIndicator()\r\n this.handleResize = this.debounce(this.handleResize.bind(this), 200)\r\n window.addEventListener('resize', this.handleResize)\r\n this.updateIndicatorWidth = this.updateIndicatorWidth.bind(this)\r\n window.addEventListener('resize', this.updateIndicatorWidth)\r\n this.updateIndicatorWidth()\r\n\r\n requestAnimationFrame(() => {\r\n const defaultTab = this.el.querySelector('.fdn-tabs__tab[aria-selected=\"true\"]') || this.domMap.initialActiveTabs[0]\r\n if (defaultTab) {\r\n this.scrollToSection(defaultTab)\r\n }\r\n })\r\n }\r\n\r\n addListeners() {\r\n const { $tabs, $innerTabs } = this.domMap\r\n $tabs.forEach((tab) =>\r\n tab.addEventListener('click', this.handleTabClick.bind(this))\r\n )\r\n $innerTabs.forEach((innerTab) =>\r\n innerTab.addEventListener('click', this.handleInnerTabClick.bind(this))\r\n )\r\n }\r\n\r\n handleTabClick(e) {\r\n const { $tabs, $tabPanels } = this.domMap\r\n const $tab = e.currentTarget\r\n const tabPanelId = $tab.getAttribute('aria-controls')\r\n const $tabPanel = this.el.querySelector(`#${tabPanelId}`)\r\n\r\n $tabs.forEach((tab) => tab.setAttribute('aria-selected', false))\r\n $tab.setAttribute('aria-selected', true)\r\n $tab.scrollIntoView({ behavior: 'smooth', inline: 'start', block: 'nearest' })\r\n\r\n $tabPanels.forEach((panel) => {\r\n panel.classList.remove('show', 'active')\r\n panel.hidden = true\r\n })\r\n \r\n this.scrollToSection($tab)\r\n\r\n $tabPanel.classList.add('show', 'active')\r\n $tabPanel.hidden = false\r\n\r\n const video = $tabPanel.querySelector('div[data-cmp-is=\"autosized-video\"]')\r\n if (video) {\r\n this.initInlineVideo(video)\r\n }\r\n\r\n const lottieWrapper = $tabPanel.querySelector('.lottie-animation-wrapper')\r\n if (lottieWrapper) {\r\n lottieWrapper.classList.remove('active')\r\n void lottieWrapper.offsetWidth\r\n lottieWrapper.classList.add('active')\r\n }\r\n\r\n const mainIndicator = this.el.querySelector('.nav-tabs__indicator--horizontal')\r\n if (mainIndicator) {\r\n this.updateIndicator($tab, 'horizontal', mainIndicator)\r\n }\r\n }\r\n\r\n initInlineVideo(video) {\r\n if (!video) return\r\n const videoPlayer = video.querySelector('video')\r\n const pauseBtn = video.querySelector('.fdn-autoVideo__video-control--pause')\r\n const playBtn = video.querySelector('.fdn-autoVideo__video-control--play')\r\n const restartBtn = video.querySelector('.fdn-autoVideo__video-control--restart')\r\n\r\n restartBtn.hidden = true\r\n videoPlayer.currentTime = 0\r\n videoPlayer.play()\r\n playBtn.hidden = true\r\n pauseBtn.hidden = false\r\n }\r\n\r\n initNestedTabsIndicator() {\r\n const { initialActiveTabs, indicators } = this.domMap\r\n if (indicators.length > 0 && initialActiveTabs.length > 0) {\r\n const indicator = indicators[0]\r\n const activeTab = initialActiveTabs[0]\r\n this.updateIndicator(activeTab, 'horizontal', indicator)\r\n }\r\n }\r\n\r\n updateIndicator(tab, orientation, indicator) {\r\n const context = tab.closest('.nested-product-tab-wrapper__inner-nav') || this.el\r\n const targetIndicator = indicator || context.querySelector(`.nav-tabs__indicator--${orientation}`)\r\n\r\n if (targetIndicator && tab) {\r\n if (orientation === 'horizontal') {\r\n const { offsetLeft, offsetWidth } = tab\r\n targetIndicator.style.left = `${offsetLeft}px`\r\n targetIndicator.style.width = `${offsetWidth}px`\r\n }\r\n }\r\n }\r\n\r\n handleInnerTabClick(event) {\r\n event.preventDefault()\r\n const currentTab = event.currentTarget\r\n const tabContainer = currentTab.closest('.nested-product-tab-wrapper__inner-nav')\r\n\r\n tabContainer.querySelectorAll('.nav-link').forEach((tab) => {\r\n tab.classList.remove('active', 'first-active')\r\n tab.setAttribute('aria-selected', 'false')\r\n })\r\n\r\n currentTab.classList.add('active')\r\n currentTab.setAttribute('aria-selected', 'true')\r\n\r\n const indicator = tabContainer.querySelector('.nav-tabs__indicator--horizontal')\r\n this.updateIndicator(currentTab, 'horizontal', indicator)\r\n\r\n this.scrollToSection(currentTab)\r\n\r\n const nestedTabPanelId = currentTab.getAttribute('data-target')\r\n const nestedTabPanel = this.el.querySelector(nestedTabPanelId)\r\n\r\n if (nestedTabPanel) {\r\n this.el.querySelectorAll('.fdn-tabs__tabpanel').forEach((pane) => {\r\n pane.classList.remove('show', 'active')\r\n pane.hidden = true\r\n })\r\n\r\n nestedTabPanel.classList.add('show', 'active')\r\n nestedTabPanel.hidden = false\r\n\r\n const lottieWrapper = nestedTabPanel.querySelector('.lottie-animation-wrapper')\r\n if (lottieWrapper) {\r\n lottieWrapper.classList.remove('active')\r\n void lottieWrapper.offsetWidth\r\n lottieWrapper.classList.add('active')\r\n }\r\n\r\n const lottieJsonEls = nestedTabPanel.querySelectorAll('.lottie-animation-json')\r\n lottieJsonEls.forEach(lottieJsonEl => {\r\n if (lottieJsonEl.LottieInstance) {\r\n lottieJsonEl.LottieInstance.goToAndPlay(0, true)\r\n }\r\n })\r\n }\r\n }\r\n\r\n scrollToSection(currentTab) {\r\n const container = currentTab.parentElement\r\n const containerRect = container.getBoundingClientRect()\r\n const tabRect = currentTab.getBoundingClientRect()\r\n const offset = currentTab.offsetLeft - ((containerRect.width - tabRect.width) / 2)\r\n container.scrollTo({ left: offset, behavior: 'smooth' })\r\n }\r\n \r\n \r\n\r\n updateIndicatorWidth() {\r\n const activeTab = this.el.querySelector('.fdn-tabs__tab[aria-selected=\"true\"]')\r\n const indicator = this.el.querySelector('.nav-tabs__indicator--horizontal')\r\n\r\n if (activeTab && indicator) {\r\n requestAnimationFrame(() => {\r\n let tabWidth = activeTab.getBoundingClientRect().width\r\n if (tabWidth === 0) {\r\n setTimeout(() => {\r\n tabWidth = activeTab.getBoundingClientRect().width\r\n if (tabWidth > 0) {\r\n indicator.style.width = `${tabWidth}px`\r\n indicator.style.left = `${activeTab.getBoundingClientRect().left}px`\r\n }\r\n }, 100)\r\n } else {\r\n indicator.style.width = `${tabWidth}px`\r\n indicator.style.left = `${activeTab.getBoundingClientRect().left}px`\r\n }\r\n })\r\n }\r\n }\r\n\r\n handleResize() {\r\n this.domMap.$innerTabs.forEach((tab) => {\r\n if (tab.classList.contains('active')) {\r\n this.updateIndicator(tab, 'horizontal')\r\n this.scrollToSection(tab)\r\n }\r\n })\r\n }\r\n \r\n\r\n debounce(func, wait) {\r\n let timeout\r\n const context = this\r\n return function (...args) {\r\n clearTimeout(timeout)\r\n timeout = setTimeout(() => func.apply(context, args), wait)\r\n }\r\n }\r\n}\r\n\r\nexport default Tabs\r\n","function DataLayerTab() {\r\n this.horizontalTabUiLocation = 'Horizontal Tab'\r\n this.pillTabUiLocation = 'Tabbed Pill'\r\n this.tabbedCarouselUiLocation = 'Tabbed Carousel'\r\n this.horizontalTabClickButton = document.querySelectorAll('.fdn-tabs__tab')\r\n this.pillTabClickButton = document.querySelectorAll('.fdn-tabbed-pills__pill')\r\n this.carouselTabClickButton = document.querySelectorAll('.tabbed-carousel__tab')\r\n}\r\n\r\nDataLayerTab.prototype._init = function () {\r\n this._TabClick()\r\n}\r\n\r\nDataLayerTab.prototype._TabClick = function () {\r\n this._horizontalTabClick(this.horizontalTabClickButton, this.horizontalTabUiLocation)\r\n this._pillTabClick(this.pillTabClickButton, this.pillTabUiLocation)\r\n this._carouselTabClick(this.carouselTabClickButton, this.tabbedCarouselUiLocation)\r\n}\r\n\r\nDataLayerTab.prototype._horizontalTabClick = function (tabs, horizontalTabUiLocation) {\r\n if (tabs) {\r\n tabs.forEach(button => {\r\n button.addEventListener('click', (e) => {\r\n let tabContainer = e.target.closest('.fdn-tabs')\r\n let horizontalTabTitle = tabContainer?.querySelector('.fdn-tabs__headline')?.textContent?.trim() || ''\r\n let targetButton = e.target.closest('.fdn-tabs__tab')\r\n let tabTextValue = targetButton.querySelector('.fdn-tabs__title')?.textContent.trim() || ''\r\n let linkText = horizontalTabTitle ? `${horizontalTabTitle} - ${tabTextValue}` : tabTextValue\r\n\r\n let eventData = {\r\n event: 'contentClick',\r\n linkText: linkText,\r\n uiLocation: horizontalTabUiLocation\r\n }\r\n \r\n window.dataLayer.push(eventData)\r\n })\r\n })\r\n }\r\n}\r\n\r\nDataLayerTab.prototype._pillTabClick = function (tabs, pillTabUiLocation) {\r\n if (tabs) {\r\n tabs.forEach(button => {\r\n button.addEventListener('click', (e) => {\r\n let tabContainer = e.target.closest('.fdn-tabbed-pills__content')\r\n let pillTabTitle = tabContainer?.querySelector('.fdn-tabbed-pills__title')?.textContent?.trim() || ''\r\n let tabTextValue = Array.from(e.target.childNodes)\r\n .filter(node => node.nodeType === Node.TEXT_NODE || (node.nodeType === Node.ELEMENT_NODE && !node.classList.contains('visually-hidden')))\r\n .map(node => node.textContent.trim())\r\n .join(' ').trim() || ''\r\n\r\n let linkText = pillTabTitle ? `${pillTabTitle} - ${tabTextValue}` : tabTextValue\r\n\r\n let eventData = {\r\n event: 'contentClick',\r\n linkText: linkText,\r\n uiLocation: pillTabUiLocation\r\n }\r\n window.dataLayer.push(eventData)\r\n })\r\n })\r\n }\r\n}\r\n\r\nDataLayerTab.prototype._carouselTabClick = function (tabs, tabbedCarouselUiLocation) {\r\n if (tabs) {\r\n tabs.forEach(button => {\r\n button.addEventListener('click', (e) => {\r\n let tabContainer = e.target.closest('.wrapper')\r\n let carouselTabTitle = tabContainer?.querySelector('.module-columns-title')?.textContent?.trim() || ''\r\n let tabTextValue = Array.from(e.target.childNodes)\r\n .filter(node => node.nodeType === Node.TEXT_NODE || (node.nodeType === Node.ELEMENT_NODE && !node.classList.contains('tabbed-carousel__tab-description')))\r\n .map(node => node.textContent.trim())\r\n .join(' ').trim() || ''\r\n\r\n let linkText = carouselTabTitle ? `${carouselTabTitle} - ${tabTextValue}` : tabTextValue\r\n\r\n let eventData = {\r\n event: 'contentClick',\r\n linkText: linkText,\r\n uiLocation: tabbedCarouselUiLocation\r\n }\r\n \r\n window.dataLayer.push(eventData)\r\n })\r\n })\r\n }\r\n}\r\n\r\nexport { DataLayerTab }\r\n"],"names":["Tabs","el","_this","_classCallCheck","this","domMap","$tabs","querySelectorAll","$tabPanels","initialActiveTabs","$innerTabs","indicators","addListeners","DataLayerTab","initNestedTabsIndicator","handleResize","debounce","bind","window","addEventListener","updateIndicatorWidth","requestAnimationFrame","defaultTab","querySelector","scrollToSection","key","value","_this2","_this$domMap","forEach","tab","handleTabClick","innerTab","handleInnerTabClick","e","_this$domMap2","$tab","currentTarget","tabPanelId","getAttribute","$tabPanel","concat","setAttribute","scrollIntoView","behavior","inline","block","panel","classList","remove","hidden","add","video","initInlineVideo","lottieWrapper","offsetWidth","mainIndicator","updateIndicator","videoPlayer","pauseBtn","playBtn","currentTime","play","_this$domMap3","length","indicator","activeTab","orientation","context","closest","targetIndicator","offsetLeft","style","left","width","event","preventDefault","currentTab","tabContainer","nestedTabPanelId","nestedTabPanel","pane","lottieJsonEl","LottieInstance","goToAndPlay","container","parentElement","containerRect","getBoundingClientRect","tabRect","offset","scrollTo","tabWidth","setTimeout","_this3","contains","func","wait","timeout","_len","arguments","args","Array","_key","clearTimeout","apply","horizontalTabUiLocation","pillTabUiLocation","tabbedCarouselUiLocation","horizontalTabClickButton","document","pillTabClickButton","carouselTabClickButton","prototype","_init","_TabClick","_horizontalTabClick","_pillTabClick","_carouselTabClick","tabs","button","_tabContainer$querySe","_targetButton$querySe","target","horizontalTabTitle","textContent","trim","tabTextValue","eventData","linkText","uiLocation","dataLayer","push","_tabContainer$querySe2","pillTabTitle","from","childNodes","filter","node","nodeType","Node","TEXT_NODE","ELEMENT_NODE","map","join","_tabContainer$querySe3","carouselTabTitle"],"sourceRoot":""}