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AAEN,EAASK,IAC5EE,OAAOC,eAAeR,EAASK,EAAK,CAAEI,YAAY,EAAMxH,IAAKmH,EAAWC,IAG3E,ECPAT,EAAoBU,EAAI,SAASI,EAAKC,GAAQ,OAAOJ,OAAOK,UAAUC,eAAeC,KAAKJ,EAAKC,EAAO,ECEtGf,EAAoB,KAEMA,EAAoB,I","sources":["webpack://DDI-Main-Marketing-Website/./src/resources/resourceCard.js","webpack://DDI-Main-Marketing-Website/./src/resources/resourceFiltering.js","webpack://DDI-Main-Marketing-Website/./src/resources/resourceTypeURLParser.js","webpack://DDI-Main-Marketing-Website/./src/resources/resourceFetcher.js","webpack://DDI-Main-Marketing-Website/./src/resources/resourceURLAppender.js","webpack://DDI-Main-Marketing-Website/./src/resources/resourceLoadingAnimation.js","webpack://DDI-Main-Marketing-Website/./src/resources/resourcePagination.js","webpack://DDI-Main-Marketing-Website/./src/resources/resourcePrefilteredURL.js","webpack://DDI-Main-Marketing-Website/./src/resources/resourceSearchV2.js","webpack://DDI-Main-Marketing-Website/./src/resources/resourcesIndex.js","webpack://DDI-Main-Marketing-Website/./src/resources/resourceMobileNavigation.js","webpack://DDI-Main-Marketing-Website/webpack/bootstrap","webpack://DDI-Main-Marketing-Website/webpack/runtime/define property getters","webpack://DDI-Main-Marketing-Website/webpack/runtime/hasOwnProperty shorthand","webpack://DDI-Main-Marketing-Website/webpack/startup"],"sourcesContent":["let timelines = [];\r\n\r\nexport function initResourceCards() {\r\n const resourceCards = gsap.utils.toArray('.component_card');\r\n for (const card of resourceCards) {\r\n const overlay = card.querySelector('.overlay');\r\n const description = card.querySelector('.description');\r\n const chip = card.querySelector('.chip');\r\n const chipColor = '#faa41a';\r\n const boxShadow = '0px 0px 9px 0px rgba(0,0,0,0.16)';\r\n\r\n const tl = gsap.timeline({ paused: true });\r\n tl.set(overlay, { autoAlpha: 1 });\r\n tl.set(description, { autoAlpha: 1 });\r\n tl.from(overlay, { opacity: 0, duration: .2, ease: 'power1.out' });\r\n tl.from(description, { yPercent: '-2', opacity: 0, duration: .3, ease: 'power1.out' }, '<');\r\n tl.fromTo(chip, { backgroundColor: '#445664' }, { backgroundColor: chipColor, duration: .1 }, '<');\r\n tl.to(card, { boxShadow: boxShadow, duration: .25 }, '<')\r\n\r\n card.addEventListener('mouseenter', function () {\r\n tl.play();\r\n });\r\n card.addEventListener('mouseleave', function () {\r\n tl.reverse();\r\n })\r\n timelines.push(tl);\r\n }\r\n gsap.set(resourceCards, { autoAlpha: 1 });\r\n gsap.from(resourceCards, { opacity: 0, yPercent: 10, stagger: 0.1 })\r\n}\r\n\r\nexport function destroyResourceCards() {\r\n for (const tl of timelines) {\r\n tl.kill();\r\n }\r\n timelines = [];\r\n}","export const topicsFiltering = {\r\n topicsToggler : document.getElementById('topicFilterToggler'),\r\n resetTopicsMobile : document.getElementById('topicFilterReset-Mobile'),\r\n resetTopicsDesktop : document.getElementById('topicFilterReset-Desktop'),\r\n topicsContainer : document.querySelector('.resource-topic-filter__topics-container'),\r\n topics : document.querySelectorAll('.resource-topic-filter__check-container'),\r\n topicInputs : document.querySelectorAll('.resource-topic-filter__checkbox'),\r\n topicLabels : document.querySelectorAll('.resource-topic-filter__label'),\r\n init: function(){\r\n //On Mobile, the topics shelf is closed. This function handles that\r\n let mm = gsap.matchMedia();\r\n mm.add(\"(max-width: 600px)\", () => {\r\n const tl = gsap.timeline({ paused: true });\r\n tl.set(this.topicsContainer, { autoAlpha: 1, transformOrigin: \"top center\" });\r\n tl.from(this.topicsContainer, { scaleY: 0, display: \"none\", opacity: 0, duration: 0.1 });\r\n tl.from(this.topics, { yPercent: -20, opacity: 0, duration: .2, stagger: 0.03 });\r\n tl.to(this.topicsToggler, { rotate: 0, transformOrigin: \"center center\", duration: 0.08 }, \"<\");\r\n\r\n this.topicsToggler.addEventListener(\"click\", function (event) {\r\n event.preventDefault();\r\n if (tl.progress() === 0) {\r\n tl.play();\r\n } else {\r\n tl.reverse();\r\n }\r\n });\r\n\r\n return () => { // optional\r\n // custom cleanup code here (runs when it STOPS matching)\r\n };\r\n });\r\n },\r\n\r\n filterEvent: function () {\r\n const newTopicArray = [];\r\n for (const topicInput of this.topicInputs) {\r\n if (topicInput.checked == true) {\r\n newTopicArray.push(topicInput.dataset.value);\r\n }\r\n }\r\n return newTopicArray;\r\n },\r\n\r\n resetTopics: function (event) {\r\n event.preventDefault();\r\n for (const topicInput of this.topicInputs) {\r\n topicInput.checked = false;\r\n }\r\n }\r\n}\r\n\r\nexport const countryFiltering = {\r\n countryToggler: document.getElementById('countryFilterToggler'),\r\n resetCountryMobile: document.getElementById('countryFilterReset-Mobile'),\r\n resetCountryDesktop: document.getElementById('countryFilterReset-Desktop'),\r\n countryContainer: document.querySelector('.resource-country-filter__country-container'),\r\n countries: document.querySelectorAll('.resource-country-filter__check-container'),\r\n countryInputs: document.querySelectorAll('.resource-country-filter__checkbox'),\r\n countryLabels: document.querySelectorAll('.resource-country-filter__label'),\r\n init: function () {\r\n //On Mobile, the country shelf is closed. This function handles that\r\n let mm = gsap.matchMedia();\r\n mm.add(\"(max-width: 600px)\", () => {\r\n const tl = gsap.timeline({ paused: true });\r\n tl.set(this.countryContainer, { autoAlpha: 1, transformOrigin: \"top center\" });\r\n tl.from(this.countryContainer, { scaleY: 0, display: \"none\", opacity: 0, duration: 0.1 });\r\n tl.from(this.countries, { yPercent: -20, opacity: 0, duration: .2, stagger: 0.03 });\r\n tl.to(this.countryToggler, { rotate: 0, transformOrigin: \"center center\", duration: 0.08 }, \"<\");\r\n\r\n this.countryToggler.addEventListener(\"click\", function (event) {\r\n event.preventDefault();\r\n if (tl.progress() === 0) {\r\n tl.play();\r\n } else {\r\n tl.reverse();\r\n }\r\n });\r\n\r\n return () => { // optional\r\n // custom cleanup code here (runs when it STOPS matching)\r\n };\r\n });\r\n },\r\n\r\n filterEvent: function () {\r\n const newCountryArray = [];\r\n for (const countryInput of this.countryInputs) {\r\n if (countryInput.checked == true) {\r\n newCountryArray.push(countryInput.dataset.value);\r\n }\r\n }\r\n return newCountryArray;\r\n\r\n },\r\n resetCountries: function (event) {\r\n event.preventDefault();\r\n for (const countryInput of this.countryInputs) {\r\n countryInput.checked = false;\r\n }\r\n }\r\n}\r\n\r\nexport const formatFiltering = {\r\n formatToggler: document.getElementById('formatFilterToggler'),\r\n resetFormatMobile: document.getElementById('formatFilterReset-Mobile'),\r\n resetFormatDesktop: document.getElementById('formatFilterReset-Desktop'),\r\n formatContainer: document.querySelector('.resource-format-filter__format-container'),\r\n formats: document.querySelectorAll('.resource-format-filter__check-container'),\r\n formatInputs: document.querySelectorAll('.resource-format-filter__checkbox'),\r\n formatLabels: document.querySelectorAll('.resource-format-filter__label'),\r\n init: function () {\r\n //On Mobile, the format shelf is closed. This function handles that\r\n let mm = gsap.matchMedia();\r\n mm.add(\"(max-width: 600px)\", () => {\r\n const tl = gsap.timeline({ paused: true });\r\n tl.set(this.formatContainer, { autoAlpha: 1, transformOrigin: \"top center\" });\r\n tl.from(this.formatContainer, { scaleY: 0, display: \"none\", opacity: 0, duration: 0.1 });\r\n tl.from(this.formats, { yPercent: -20, opacity: 0, duration: .2, stagger: 0.03 });\r\n tl.to(this.formatToggler, { rotate: 0, transformOrigin: \"center center\", duration: 0.08 }, \"<\");\r\n\r\n this.formatToggler.addEventListener(\"click\", function (event) {\r\n event.preventDefault();\r\n if (tl.progress() === 0) {\r\n tl.play();\r\n } else {\r\n tl.reverse();\r\n }\r\n });\r\n\r\n return () => { // optional\r\n // custom cleanup code here (runs when it STOPS matching)\r\n };\r\n });\r\n },\r\n\r\n filterEvent: function () {\r\n const newFormatArray = [];\r\n for (const formatInput of this.formatInputs) {\r\n if (formatInput.checked == true) {\r\n newFormatArray.push(formatInput.dataset.value);\r\n }\r\n }\r\n return newFormatArray;\r\n },\r\n resetFormats: function (event) {\r\n event.preventDefault();\r\n for (const formatInput of this.formatInputs) {\r\n formatInput.checked = false;\r\n }\r\n }\r\n}\r\n\r\n//Types for workshops. Not generic Resource Types. \r\nexport const workshopTypeFiltering = {\r\n typeToggler: document.getElementById('typeFilterToggler'),\r\n resetTypeMobile: document.getElementById('typeFilterReset-Mobile'),\r\n resetTypeDesktop: document.getElementById('typeFilterReset-Desktop'),\r\n typeContainer: document.querySelector('.resource-type-filter__type-container'),\r\n types: document.querySelectorAll('.resource-type-filter__check-container'),\r\n typeInputs: document.querySelectorAll('.resource-type-filter__checkbox'),\r\n typeLabels: document.querySelectorAll('.resource-type-filter__label'),\r\n init: function () {\r\n //On Mobile, the type shelf is closed. This function handles that\r\n let mm = gsap.matchMedia();\r\n mm.add(\"(max-width: 600px)\", () => {\r\n const tl = gsap.timeline({ paused: true });\r\n tl.set(this.typeContainer, { autoAlpha: 1, transformOrigin: \"top center\" });\r\n tl.from(this.typeContainer, { scaleY: 0, display: \"none\", opacity: 0, duration: 0.1 });\r\n tl.from(this.types, { yPercent: -20, opacity: 0, duration: .2, stagger: 0.03 });\r\n tl.to(this.typeToggler, { rotate: 0, transformOrigin: \"center center\", duration: 0.08 }, \"<\");\r\n\r\n this.typeToggler.addEventListener(\"click\", function (event) {\r\n event.preventDefault();\r\n if (tl.progress() === 0) {\r\n tl.play();\r\n } else {\r\n tl.reverse();\r\n }\r\n });\r\n\r\n return () => { // optional\r\n // custom cleanup code here (runs when it STOPS matching)\r\n };\r\n });\r\n },\r\n filterEvent: function () {\r\n const newTypeArray = [];\r\n for (const typeInput of this.typeInputs) {\r\n if (typeInput.checked == true) {\r\n newTypeArray.push(typeInput.dataset.value);\r\n }\r\n }\r\n return newTypeArray;\r\n },\r\n resetTypes: function (event) {\r\n event.preventDefault();\r\n for (const typeInput of this.typeInputs) {\r\n typeInput.checked = false;\r\n }\r\n }\r\n}","export default function typeFilter() {\r\n const type = window.location.pathname;\r\n switch (type) {\r\n case '/resources': return '';\r\n case '/blogs': return 'blog';\r\n case '/guides': return 'guide';\r\n case '/research': return 'research';\r\n case '/client-story': return 'client_story';\r\n case '/podcasts': return 'podcast';\r\n case '/webinars': return 'webinar';\r\n case '/workshops': return 'workshop';\r\n case '/events': return 'event';\r\n default: return '';\r\n }\r\n}\r\n","export default async function fetchResource(url, body) {\r\n const response = await fetch(url, {\r\n method: \"POST\",\r\n headers: {\r\n 'Accept': 'application/json',\r\n 'Content-Type': 'application/json'\r\n },\r\n body: body\r\n });\r\n if (response.status === 200) {\r\n const data = await response.text();\r\n return Promise.resolve(data);\r\n }\r\n else {\r\n return Promise.reject(\"Something went wrong\");\r\n }\r\n}","export default function (data) {\r\n let url = new URL(window.location.origin + window.location.pathname);\r\n //Then we build a URL Params Object\r\n if (data.topics.length != 0) {\r\n url.searchParams.set('topic', (data.topics).toString());\r\n }\r\n if (data.country.length != 0) {\r\n url.searchParams.set('country', (data.country).toString());\r\n }\r\n if (data.format.length != 0) {\r\n url.searchParams.set('format', (data.format).toString());\r\n }\r\n if (data.type.length != 0) {\r\n url.searchParams.set('type', (data.type).toString());\r\n }\r\n //Finally we append the url\r\n window.history.pushState({}, '', url);\r\n}","export default function createLoadingAnimations() {\r\n const cardsLoadingRectangles = document.querySelectorAll('.resource-card-container__loading-rectangle');\r\n const cardsContainerAnimation = gsap.timeline({ paused: false, repeat: -1, repeatDelay: 0, ease: 'none' });\r\n cardsContainerAnimation.to(cardsLoadingRectangles, { scaleY: 2.5, stagger: 0.1, transformOrigin: 'center' });\r\n cardsContainerAnimation.to(cardsLoadingRectangles, { scaleY: 1, stagger: 0.1, transformOrigin: 'center' }, '<.1');\r\n\r\n const overlayLoadingRectangles = document.querySelectorAll('.resource-search-overlay__loading-rectangle');\r\n const overlaySearchAnimation = gsap.timeline({ paused: false, repeat: -1, repeatDelay: 0, ease: 'none' });\r\n overlaySearchAnimation.to(overlayLoadingRectangles, { scaleY: 2.5, stagger: 0.1, transformOrigin: 'center' });\r\n overlaySearchAnimation.to(overlayLoadingRectangles, { scaleY: 1, stagger: 0.1, transformOrigin: 'center' }, '<.1')\r\n}","export default function initResourcePagination() {\r\n\r\n\r\n const { hasPageNumQuery, pageNumQuery } = gatherURLParams();\r\n const {\r\n paginationContainer,\r\n pageCount,\r\n\r\n leftLabel,\r\n leftChevron,\r\n leftControls,\r\n\r\n rightLabel,\r\n rightChevron,\r\n rightControls,\r\n\r\n activePaginationElement,\r\n activePaginationElementLink\r\n } = gatherDOMElements(hasPageNumQuery, pageNumQuery);\r\n const activeInt = pageNumQuery !== null ? parseInt(pageNumQuery) : null;\r\n\r\n //If we have zero or 1 pages, none of this logic runs\r\n if (pageCount === 0 || pageCount === 1) {\r\n return;\r\n }\r\n //We have pages\r\n else {\r\n\r\n //highlight class on the first pagination link\r\n activePaginationElement.classList.add('resource-pagination__list-item--active');\r\n activePaginationElementLink.classList.add('resource-pagination__link--active');\r\n\r\n //Are we on the first page?\r\n if (!hasPageNumQuery || activeInt === 1) {\r\n\r\n //Disable left controls\r\n disableControls(leftControls);\r\n\r\n }\r\n //Are we on the last page?\r\n if (pageNumQuery !== null && activeInt === pageCount) {\r\n\r\n //Disable right controls\r\n disableControls(rightControls)\r\n }\r\n\r\n //Finally we set the chevron link destinations.\r\n //If we're on the first page, just set last one\r\n //if we're on the last page, just set first one\r\n //otherwise set both\r\n if (!hasPageNumQuery || pageNumQuery === \"1\") {\r\n rightChevron.closest('a').setAttribute('href', `${window.location.origin}/resources?pageNum=2`)\r\n }\r\n else if (pageCount === parseInt(pageNumQuery)) {\r\n leftChevron.closest('a').setAttribute('href', `${window.location.origin}/resources?pageNum=${activeInt - 1}`);\r\n }\r\n else {\r\n rightChevron.closest('a').setAttribute('href', `${window.location.origin}/resources?pageNum=${activeInt + 1}`);\r\n leftChevron.closest('a').setAttribute('href', `${window.location.origin}/resources?pageNum=${activeInt - 1}`);\r\n }\r\n \r\n\r\n }\r\n}\r\n\r\nfunction disableControls(controls) {\r\n for (const control of controls) {\r\n if (control.tagName === \"A\") {\r\n control.classList.add('resource-pagination__link--link-disabled')\r\n }\r\n else if (control.tagName === \"I\") {\r\n control.classList.add('resource-pagination__link--chevron-disabled');\r\n }\r\n }\r\n}\r\n\r\nfunction enableControls(controls) {\r\n for (const control of controls) {\r\n if (control.tagName === \"A\") {\r\n control.classList.remove('resource-pagination__link--link-disabled')\r\n }\r\n else if (control.tagName === \"I\") {\r\n control.classList.remove('resource-pagination__link--chevron-disabled')\r\n }\r\n }\r\n}\r\n\r\nfunction gatherDOMElements(hasPageNumQuery, pageNumQuery) {\r\n const paginationContainer = document.querySelector('.resource-pagination');\r\n const pageCount = parseInt(paginationContainer.dataset.pagination);\r\n const leftLabel = document.querySelector('.resource-pagination__first-link');\r\n const leftChevron = document.querySelector('.resource-pagination__chevron-left');\r\n const rightLabel = document.querySelector('.resource-pagination__last-link');\r\n const rightChevron = document.querySelector('.resource-pagination__chevron-right');\r\n const activePaginationElement = hasPageNumQuery ? document.querySelector(`#page-link-${pageNumQuery}`) : document.querySelector('#page-link-1');\r\n const activePaginationElementLink = activePaginationElement ? activePaginationElement.querySelector('a') : null;\r\n\r\n return {\r\n paginationContainer: paginationContainer,\r\n pageCount: pageCount,\r\n\r\n leftLabel: leftLabel,\r\n leftChevron: leftChevron,\r\n leftControls: [leftLabel, leftChevron],\r\n\r\n rightLabel: rightLabel,\r\n rightChevron: rightChevron,\r\n rightControls: [rightLabel, rightChevron],\r\n\r\n activePaginationElement: activePaginationElement,\r\n activePaginationElementLink: activePaginationElementLink\r\n }\r\n}\r\n\r\nfunction gatherURLParams() {\r\n\r\n const urlParams = new URLSearchParams(window.location.search);\r\n const hasPageNumQuery = urlParams.has('pageNum');\r\n const pageNumQuery = urlParams.get('pageNum');\r\n\r\n return {\r\n hasPageNumQuery: hasPageNumQuery,\r\n pageNumQuery: pageNumQuery,\r\n }\r\n}","export function topicPrefiltering(resourceState) {\r\n const paramsString = new URLSearchParams(window.location.search);\r\n const topicsParams = (paramsString.getAll('topic'));\r\n const topics = document.querySelectorAll('.resource-topic-filter__checkbox');\r\n if (topicsParams.length != 0 && topicsParams[0] !== \"\") {\r\n const topicsArray = topicsParams[0].split(',');\r\n resourceState.topics = topicsArray;\r\n for (const topic of topicsArray) {\r\n const input = document.querySelector(`input[data-value=\"${topic}\"]`);\r\n input.checked = true;\r\n }\r\n }\r\n}\r\n\r\nexport function countryPrefiltering(resourceState) {\r\n const paramsString = new URLSearchParams(window.location.search);\r\n const countryParams = (paramsString.getAll('country'));\r\n const countries = document.querySelectorAll('.resource-country-filter__checkbox');\r\n if (countryParams.length != 0 && countryParams[0] !== \"\") {\r\n const countriesArray = countryParams[0].split(',');\r\n resourceState.country = countriesArray;\r\n for (const country of countriesArray) {\r\n const input = document.querySelector(`input[data-value=\"${country}\"]`);\r\n input.checked = true;\r\n }\r\n }\r\n}\r\n\r\nexport function formatPrefiltering(resourceState) {\r\n const paramsString = new URLSearchParams(window.location.search);\r\n const formatParams = (paramsString.getAll('format'));\r\n const formats = document.querySelectorAll('.resource-format-filter__checkbox');\r\n if (formatParams.length != 0 && formatParams[0] !== \"\") {\r\n const formatsArray = formatParams[0].split(',');\r\n resourceState.format = formatsArray;\r\n for (const format of formatsArray) {\r\n const input = document.querySelector(`input[data-value=\"${format}\"]`);\r\n input.checked = true;\r\n }\r\n }\r\n}\r\n\r\nexport function typePrefiltering(resourceState) {\r\n\r\n}","import fetchResource from './resourceFetcher';\r\nimport typeFilter from './resourceTypeURLParser'\r\n\r\nexport const resourceSearch = {\r\n resourcesURL: '/resources/filter',\r\n workshopURL: '/workshops/filter',\r\n resourceType: typeFilter(),\r\n initiateSearchButton : document.querySelector('.resource-search__submit-button'),\r\n resourceSearchInput: document.querySelector('.resource-search__input-field'),\r\n initiateSeachButtonLoadingIcon : document.querySelector('.resource-search__loading-icon'),\r\n initiateSeachButtonChevron: document.querySelector('.resource-search__chevron-input-icon'),\r\n searchOverlaySearchTermDisplay : document.querySelector('.resource-search-overlay__search-term'),\r\n resourceOverlaySearchInput: document.querySelector('.resource-search-overlay__search-input'),\r\n initiateSearchOverlayButton : document.querySelector('.resource-search-overlay__submit-button'),\r\n searchOverlayResultContainer : document.querySelector('.resource-search-overlay__all-results'),\r\n searchOverlay: document.querySelector('.resource-search-overlay'),\r\n searchOverlayLoading: document.querySelector('.resource-search-overlay__loading-overlay'),\r\n closeSearchOverlayIcon : document.querySelector('.resource-search-overlay__close-icon'),\r\n\r\n init: function (resourceState) {\r\n //Are we on workshops?\r\n const isWorkshop = resourceState.page === 'workshop' ? true : false;\r\n //constants\r\n\r\n const that = this;\r\n //Attach event listener to resourceInput. When it's updated, update the resourceStateObject'\r\n this.resourceSearchInput.addEventListener('keyup', function (event) {\r\n if (event.keyCode === 13 && resourceState.search != '') {\r\n that.initialSearchLoadToggle({ isLoading: true });\r\n that.searchEvent(resourceState.search, \"\", isWorkshop);\r\n }\r\n else {\r\n resourceState.search = this.value;\r\n }\r\n });\r\n this.initiateSearchButton.addEventListener('click', function (event) {\r\n event.preventDefault();\r\n if (resourceState.search != '') {\r\n that.initialSearchLoadToggle({ isLoading: true });\r\n that.searchEvent(resourceState.search, \"\", isWorkshop);\r\n }\r\n });\r\n\r\n //Searching from the overlay\r\n this.resourceOverlaySearchInput.addEventListener('keyup', function (event) {\r\n if (event.keyCode === 13 && event.target.value != '') {\r\n //Let animation container show when searching from overlay\r\n that.searchOverlayLoading.classList.remove('resource-search-overlay__loading-overlay--hidden');\r\n that.searchEvent(resourceState.search, \"\", isWorkshop)\r\n }\r\n else {\r\n resourceState.search = this.value;\r\n }\r\n })\r\n this.initiateSearchOverlayButton.addEventListener('click', function (event) {\r\n event.preventDefault();\r\n if (resourceState.search != '') {\r\n //Let animation container show when searching from overlay\r\n that.searchOverlayLoading.classList.remove('resource-search-overlay__loading-overlay--hidden');\r\n that.searchEvent(resourceState.search, \"\", isWorkshop)\r\n }\r\n })\r\n\r\n //Close the overlay\r\n this.closeSearchOverlayIcon.addEventListener('click', function (event) {\r\n event.preventDefault();\r\n that.initialSearchLoadToggle({ isLoading: false });\r\n that.searchOverlay.classList.add('resource-search-overlay--closed');\r\n that.resourceSearchInput.value = '';\r\n })\r\n\r\n },\r\n\r\n\r\n bundleData(searchTerm) {\r\n return JSON.stringify({\r\n \"types\": this.resourceType,\r\n \"topics\": \"\",\r\n \"search\": searchTerm,\r\n \"minimal\": true\r\n })\r\n },\r\n\r\n\r\n initialSearchLoadToggle: function (loading) {\r\n if (loading.isLoading === true) {\r\n //disable button and add in hour glass icon to button\r\n this.resourceSearchInput.classList.add('disabled');\r\n this.initiateSearchButton.classList.add('disabled');\r\n this.initiateSeachButtonChevron.classList.add('d-none');\r\n this.initiateSeachButtonLoadingIcon.classList.remove('d-none');\r\n }\r\n else {\r\n //overlay is closing so enable button and add in original icon\r\n this.resourceSearchInput.classList.remove('disabled');\r\n this.initiateSearchButton.classList.remove('disabled');\r\n this.initiateSeachButtonChevron.classList.remove('d-none');\r\n this.initiateSeachButtonLoadingIcon.classList.add('d-none');\r\n }\r\n },\r\n\r\n toggleOverlay: function (state) {\r\n\r\n },\r\n\r\n overlaySearchLoadToggle: function () {\r\n\r\n }, \r\n\r\n searchEvent: function (searchTerm, type, isWorkshop) {\r\n const url = isWorkshop === true ? this.workshopURL : this.resourcesURL;\r\n fetchResource(url, this.bundleData(searchTerm, type)).then(data => {\r\n this.displaySearchResults(data, searchTerm);\r\n })\r\n },\r\n\r\n displaySearchResults: function (data, searchTerm) {\r\n\r\n this.searchOverlaySearchTermDisplay.textContent = String(searchTerm);\r\n this.resourceOverlaySearchInput.value = String(searchTerm);\r\n this.searchOverlayResultContainer.innerHTML = data;\r\n this.highlightSearchTerm(searchTerm);\r\n this.searchOverlayLoading.classList.add('resource-search-overlay__loading-overlay--hidden');\r\n this.searchOverlay.classList.remove('resource-search-overlay--closed');\r\n },\r\n\r\n highlightSearchTerm: function (searchTerm) {\r\n const results = document.querySelectorAll('.resource-search-overlay__result-container');\r\n for (const result of results) {\r\n let heading = result.querySelector('.resource-search-overlay__result-link');\r\n let description = result.querySelector('.resource-search-overlay__result-description');\r\n const regex = new RegExp(searchTerm, 'gi');\r\n const replacedHeading = heading.textContent.replace(regex, function (str) {\r\n return `${str}`\r\n })\r\n const replacedDescription = description.textContent.replace(regex, function (str) {\r\n return `${str}`\r\n })\r\n heading.innerHTML = replacedHeading;\r\n description.innerHTML = replacedDescription;\r\n }\r\n }\r\n}","import { initResourceCards, destroyResourceCards } from './resourceCard.js';\r\nimport { countryFiltering, topicsFiltering, formatFiltering, workshopTypeFiltering } from './resourceFiltering.js'\r\nimport typeFilter from './resourceTypeURLParser'\r\nimport fetchResource from './resourceFetcher';\r\nimport resourceURLAppender from './resourceURLAppender';\r\nimport createLoadingAnimations from './resourceLoadingAnimation.js';\r\nimport resourcePagination from './resourcePagination';\r\nimport { topicPrefiltering, countryPrefiltering, formatPrefiltering } from './resourcePrefilteredURL';\r\nimport { resourceSearch } from './resourceSearchV2.js';\r\nimport { initMobileNavigation } from './resourceMobileNavigation.js';\r\n\r\nfunction resourceHub() {\r\n initMobileNavigation();\r\n\r\n //STATE\r\n const resourceState = {\r\n page: '', //blogs, research, webinars, client stories, etc.\r\n search: '', //The users search term\r\n topics: [], //Topics to filter by like coaching or executive leadership\r\n country: [], //Country filter\r\n format: [], //onsite or virtual\r\n type: [], // workshop types. Not to be confused with resource types. I call those pages now but still call it types when calling the resource/filter controller and filtering.\r\n }\r\n resourceState.page = typeFilter();\r\n\r\n //CONSTANTS\r\n const mainCardContainer = document.querySelector('.cardContainer');\r\n \r\n\r\n\r\n //Run pagination\r\n resourcePagination();\r\n\r\n //SPECIFICS\r\n //If we're on all, blogs, research, client stories, or podcasts we just activate topics filtering\r\n if (resourceState.page === '' || resourceState.page === 'blog' || resourceState.page === 'research' || resourceState.page === 'client_story' || resourceState.page === 'podcast') {\r\n\r\n //Set fetching url\r\n const url = '/resources/filter';\r\n //initiate topic filtering\r\n topicsFiltering.init();\r\n //prefilter topics from url\r\n topicPrefiltering(resourceState);\r\n\r\n //create loading animations\r\n createLoadingAnimations()\r\n\r\n //Loading containers overlays. Hide/show when finished/loading\r\n const cardsContainerLoadingOverlay = document.querySelector('.resource-card-container__loading-overlay');\r\n\r\n //HELPER FUNCTIONS\r\n function updateResourceCards(cards) {\r\n //First we destroy old cards since these timelines aren't needed\r\n destroyResourceCards();\r\n //Then we init new ones\r\n mainCardContainer.innerHTML = cards;\r\n //Let pagination run\r\n resourcePagination();\r\n\r\n //Hide the loading animation container and init the cards after a delay\r\n setTimeout(() => {\r\n cardsContainerLoadingOverlay.classList.add('resource-card-container__loading-overlay--hidden');\r\n initResourceCards();\r\n }, 200)\r\n }\r\n\r\n\r\n //handle filter resets\r\n const resetTopicsMobile = document.getElementById('topicFilterReset-Mobile');\r\n const resetTopicsDesktop = document.getElementById('topicFilterReset-Desktop');\r\n resetTopicsMobile.addEventListener('click', (event) => {\r\n topicsFiltering.resetTopics(event);\r\n cardsContainerLoadingOverlay.classList.remove('resource-card-container__loading-overlay--hidden');\r\n resourceState.topics = topicsFiltering.filterEvent();\r\n resourceURLAppender({ topics: resourceState.topics, country: resourceState.country, format: resourceState.format, type: resourceState.type });\r\n bundleAndFetch();\r\n });\r\n resetTopicsDesktop.addEventListener('click', (event) => {\r\n topicsFiltering.resetTopics(event);\r\n cardsContainerLoadingOverlay.classList.remove('resource-card-container__loading-overlay--hidden');\r\n resourceState.topics = topicsFiltering.filterEvent();\r\n resourceURLAppender({ topics: resourceState.topics, country: resourceState.country, format: resourceState.format, type: resourceState.type });\r\n bundleAndFetch();\r\n });\r\n\r\n //attach event listeners to topics. When one is clicked, ask resourceFiltering to return array with updated topics array\r\n const topics = document.querySelectorAll('.resource-topic-filter__checkbox');\r\n for (const topic of topics) {\r\n topic.addEventListener('click', () => {\r\n cardsContainerLoadingOverlay.classList.remove('resource-card-container__loading-overlay--hidden');\r\n resourceState.topics = topicsFiltering.filterEvent();\r\n resourceURLAppender({ topics: resourceState.topics, country: resourceState.country, format: resourceState.format, type: resourceState.type });\r\n bundleAndFetch();\r\n })\r\n }\r\n\r\n function bundleAndFetch() {\r\n const requestBody = JSON.stringify({\r\n \"types\": resourceState.page,\r\n \"topics\": resourceState.topics.toString(),\r\n \"search\": \"\"\r\n })\r\n fetchResource(url, requestBody).then(data => updateResourceCards(data));\r\n }\r\n\r\n resourceSearch.init(resourceState);\r\n }\r\n //If we're on guides we don't actiavte anything because we currently have 2. When we have more will we activate topic filtering\r\n else if (resourceState.page === 'guide') {\r\n console.log('guides. No filtering');\r\n }\r\n //if we're on webinars, we activate topics, and countries filtering\r\n else if (resourceState.page === 'webinar') {\r\n //Set fetching url\r\n const url = '/resources/filter';\r\n //initiate topic and country filtering\r\n topicsFiltering.init();\r\n countryFiltering.init();\r\n\r\n //prefilter topics from url\r\n topicPrefiltering(resourceState);\r\n //prefilter countries from url\r\n countryPrefiltering(resourceState);\r\n\r\n //create loading animations\r\n createLoadingAnimations()\r\n\r\n //Loading containers overlays. Hide/show when finished/loading\r\n const cardsContainerLoadingOverlay = document.querySelector('.resource-card-container__loading-overlay');\r\n\r\n //HELPER FUNCTIONS\r\n function updateResourceCards(cards) {\r\n //First we destroy old cards since these timelines aren't needed\r\n destroyResourceCards();\r\n //Then we init new ones\r\n mainCardContainer.innerHTML = cards;\r\n //Let pagination run\r\n resourcePagination();\r\n\r\n //Hide the loading animation container and init the cards after a delay\r\n setTimeout(() => {\r\n cardsContainerLoadingOverlay.classList.add('resource-card-container__loading-overlay--hidden');\r\n initResourceCards();\r\n }, 200)\r\n }\r\n\r\n function bundleAndFetch() {\r\n const requestBody = JSON.stringify({\r\n \"types\": resourceState.page,\r\n \"topics\": resourceState.topics.toString(),\r\n \"country\": resourceState.country.toString(),\r\n \"search\": \"\"\r\n })\r\n fetchResource(url, requestBody).then(data => updateResourceCards(data));\r\n }\r\n\r\n\r\n //HANDLE TOPICS\r\n const resetTopicsMobile = document.getElementById('topicFilterReset-Mobile');\r\n const resetTopicsDesktop = document.getElementById('topicFilterReset-Desktop');\r\n resetTopicsMobile.addEventListener('click', (event) => {\r\n topicsFiltering.resetTopics(event);\r\n cardsContainerLoadingOverlay.classList.remove('resource-card-container__loading-overlay--hidden');\r\n resourceState.topics = topicsFiltering.filterEvent();\r\n resourceURLAppender({ topics: resourceState.topics, country: resourceState.country, format: resourceState.format, type: resourceState.type });\r\n bundleAndFetch();\r\n });\r\n resetTopicsDesktop.addEventListener('click', (event) => {\r\n topicsFiltering.resetTopics(event);\r\n cardsContainerLoadingOverlay.classList.remove('resource-card-container__loading-overlay--hidden');\r\n resourceState.topics = topicsFiltering.filterEvent();\r\n resourceURLAppender({ topics: resourceState.topics, country: resourceState.country, format: resourceState.format, type: resourceState.type });\r\n bundleAndFetch();\r\n });\r\n\r\n //attach event listeners to topics. When one is clicked, ask resourceFiltering to return array with updated topics array\r\n const topics = document.querySelectorAll('.resource-topic-filter__checkbox');\r\n for (const topic of topics) {\r\n topic.addEventListener('click', () => {\r\n cardsContainerLoadingOverlay.classList.remove('resource-card-container__loading-overlay--hidden');\r\n resourceState.topics = topicsFiltering.filterEvent();\r\n resourceURLAppender({ topics: resourceState.topics, country: resourceState.country, format: resourceState.format, type: resourceState.type });\r\n bundleAndFetch();\r\n })\r\n }\r\n\r\n\r\n //HANLDE COUNTRY\r\n const resetCountryMobile = document.getElementById('countryFilterReset-Mobile');\r\n const resetCountryDesktop = document.getElementById('countryFilterReset-Desktop');\r\n resetCountryMobile.addEventListener('click', (event) => {\r\n countryFiltering.resetCountries(event);\r\n cardsContainerLoadingOverlay.classList.remove('resource-card-container__loading-overlay--hidden');\r\n resourceState.country = countryFiltering.filterEvent();\r\n resourceURLAppender({ topics: resourceState.topics, country: resourceState.country, format: resourceState.format, type: resourceState.type });\r\n bundleAndFetch();\r\n })\r\n resetCountryDesktop.addEventListener('click', (event) => {\r\n countryFiltering.resetCountries(event);\r\n cardsContainerLoadingOverlay.classList.remove('resource-card-container__loading-overlay--hidden');\r\n resourceState.country = countryFiltering.filterEvent();\r\n resourceURLAppender({ topics: resourceState.topics, country: resourceState.country, format: resourceState.format, type: resourceState.type });\r\n bundleAndFetch();\r\n });\r\n const countries = document.querySelectorAll('.resource-country-filter__checkbox');\r\n for (const country of countries) {\r\n country.addEventListener('click', () => {\r\n cardsContainerLoadingOverlay.classList.remove('resource-card-container__loading-overlay--hidden');\r\n resourceState.country = countryFiltering.filterEvent();\r\n resourceURLAppender({ topics: resourceState.topics, country: resourceState.country, format: resourceState.format, type: resourceState.type });\r\n bundleAndFetch();\r\n })\r\n }\r\n\r\n //Finally activate search\r\n resourceSearch.init(resourceState);\r\n }\r\n //if we're on events we don't activate because we currently have 1. When we have more we will we activate format, type, and countries filtering\r\n else if (resourceState.page === 'event') {\r\n console.log('events. No filtering')\r\n }\r\n //If we're on workshops, we activate format, type, and countries filtering\r\n else if (resourceState.page === 'workshop') {\r\n //Set fetching url\r\n const url = '/workshops/filter';\r\n\r\n //initiate country, type, and format filtering\r\n countryFiltering.init();\r\n formatFiltering.init();\r\n\r\n //prefilter countries from url\r\n countryPrefiltering(resourceState);\r\n\r\n //prefilter types from url\r\n //TODO\r\n\r\n //prefilter formats from url\r\n formatPrefiltering(resourceState);\r\n\r\n //create loading animations\r\n createLoadingAnimations();\r\n\r\n //Loading containers overlays. Hide/show when finished/loading\r\n const cardsContainerLoadingOverlay = document.querySelector('.resource-card-container__loading-overlay');\r\n\r\n //HELPER FUNCTIONS\r\n function updateResourceCards(cards) {\r\n //First we destroy old cards since these timelines aren't needed\r\n destroyResourceCards();\r\n //Then we init new ones\r\n mainCardContainer.innerHTML = cards;\r\n //Let pagination run\r\n resourcePagination();\r\n\r\n //Hide the loading animation container and init the cards after a delay\r\n setTimeout(() => {\r\n cardsContainerLoadingOverlay.classList.add('resource-card-container__loading-overlay--hidden');\r\n initResourceCards();\r\n }, 200)\r\n }\r\n\r\n //Bundle and fetch method\r\n function bundleAndFetch() {\r\n const requestBody = JSON.stringify({\r\n \"format\": resourceState.format.toString(),\r\n \"country\": resourceState.country.toString(),\r\n \"types\": resourceState.type.toString(),\r\n \"search\": \"\"\r\n });\r\n fetchResource(url, requestBody).then(data => updateResourceCards(data));\r\n }\r\n\r\n //HANDLE FORMAT\r\n const resetFormatsMobile = document.getElementById('formatFilterReset-Mobile');\r\n const resetFormatsDesktop = document.getElementById('formatFilterReset-Desktop');\r\n //Reset buttons\r\n resetFormatsMobile.addEventListener('click', (event) => {\r\n formatFiltering.resetFormats(event);\r\n cardsContainerLoadingOverlay.classList.remove('resource-card-container__loading-overlay--hidden');\r\n resourceState.format = formatFiltering.filterEvent();\r\n resourceURLAppender({ topics: resourceState.topics, country: resourceState.country, format: resourceState.format, type: resourceState.type });\r\n bundleAndFetch();\r\n\r\n });\r\n resetFormatsDesktop.addEventListener('click', (event) => {\r\n formatFiltering.resetFormats(event);\r\n cardsContainerLoadingOverlay.classList.remove('resource-card-container__loading-overlay--hidden');\r\n resourceState.format = formatFiltering.filterEvent();\r\n resourceURLAppender({ topics: resourceState.topics, country: resourceState.country, format: resourceState.format, type: resourceState.type });\r\n bundleAndFetch();\r\n });\r\n //attach event listeners \r\n const formats = document.querySelectorAll('.resource-format-filter__checkbox');\r\n for (const format of formats) {\r\n format.addEventListener('click', () => {\r\n cardsContainerLoadingOverlay.classList.remove('resource-card-container__loading-overlay--hidden');\r\n resourceState.format = formatFiltering.filterEvent();\r\n resourceURLAppender({ topics: resourceState.topics, country: resourceState.country, format: resourceState.format, type: resourceState.type });\r\n bundleAndFetch();\r\n })\r\n }\r\n\r\n //HANDLE TYPE\r\n const resetTypesMobile = document.getElementById('typeFilterReset-Mobile');\r\n const resetTypesDesktop = document.getElementById('typeFilterReset-Desktop');\r\n resetTypesMobile.addEventListener('click', (event) => {\r\n workshopTypeFiltering.resetTypes(event);\r\n cardsContainerLoadingOverlay.classList.remove('resource-card-container__loading-overlay--hidden');\r\n resourceState.type = workshopTypeFiltering.filterEvent();\r\n resourceURLAppender({ topics: resourceState.topics, country: resourceState.country, format: resourceState.format, type: resourceState.type });\r\n bundleAndFetch();\r\n });\r\n resetTypesDesktop.addEventListener('click', (event) => {\r\n workshopTypeFiltering.resetTypes(event);\r\n cardsContainerLoadingOverlay.classList.remove('resource-card-container__loading-overlay--hidden');\r\n resourceState.type = workshopTypeFiltering.filterEvent();\r\n resourceURLAppender({ topics: resourceState.topics, country: resourceState.country, format: resourceState.format, type: resourceState.type });\r\n bundleAndFetch();\r\n });\r\n const types = document.querySelectorAll('.resource-type-filter__checkbox');\r\n for (const type of types) {\r\n type.addEventListener('click', () => {\r\n cardsContainerLoadingOverlay.classList.remove('resource-card-container__loading-overlay--hidden');\r\n resourceState.type = workshopTypeFiltering.filterEvent();\r\n resourceURLAppender({ topics: resourceState.topics, country: resourceState.country, format: resourceState.format, type: resourceState.type });\r\n bundleAndFetch();\r\n })\r\n }\r\n\r\n //HANDLE COUNTRIES\r\n const resetCountriesMobile = document.getElementById('countryFilterReset-Mobile');\r\n const resetCountriesDesktop = document.getElementById('countryFilterReset-Desktop');\r\n resetCountriesMobile.addEventListener('click', (event) => {\r\n countryFiltering.resetCountries(event);\r\n cardsContainerLoadingOverlay.classList.remove('resource-card-container__loading-overlay--hidden');\r\n resourceState.country = countryFiltering.filterEvent();\r\n resourceURLAppender({ topics: resourceState.topics, country: resourceState.country, format: resourceState.format, type: resourceState.type });\r\n bundleAndFetch();\r\n });\r\n resetCountriesDesktop.addEventListener('click', (event) => {\r\n countryFiltering.resetCountries(event);\r\n cardsContainerLoadingOverlay.classList.remove('resource-card-container__loading-overlay--hidden');\r\n resourceState.country = countryFiltering.filterEvent();\r\n resourceURLAppender({ topics: resourceState.topics, country: resourceState.country, format: resourceState.format, type: resourceState.type });\r\n bundleAndFetch();\r\n });\r\n const countries = document.querySelectorAll('.resource-country-filter__checkbox');\r\n for (const country of countries) {\r\n country.addEventListener('click', () => {\r\n cardsContainerLoadingOverlay.classList.remove('resource-card-container__loading-overlay--hidden');\r\n resourceState.country = countryFiltering.filterEvent();\r\n resourceURLAppender({ topics: resourceState.topics, country: resourceState.country, format: resourceState.format, type: resourceState.type });\r\n bundleAndFetch();\r\n })\r\n }\r\n }\r\n\r\n //Finally activate the cards\r\n initResourceCards();\r\n \r\n\r\n}\r\n\r\nresourceHub();","export function initMobileNavigation() {\r\n const mobileSelect = document.getElementById('mobile-resource-selection');\r\n const mobileSelectButton = document.querySelector('.resource-hub-header__mobile-select-cta');\r\n const host = window.location.origin;\r\n mobileSelectButton.addEventListener('click', function(event){\r\n event.preventDefault();\r\n const selectedValue = mobileSelect.value;\r\n if(selectedValue === \"Select Option\"){\r\n return;\r\n }\r\n else if(selectedValue === \"All\"){\r\n window.location.href = `${host}/resources`;\r\n }\r\n else if(selectedValue === \"Blog\"){\r\n window.location.href = `${host}/blogs`;\r\n }\r\n else if(selectedValue === \"Guides\"){\r\n window.location.href = `${host}/guides`;\r\n }\r\n else if(selectedValue === \"Research\"){\r\n window.location.href = `${host}/research`;\r\n }\r\n else if(selectedValue === \"Research\"){\r\n window.location.href = `${host}/research`;\r\n }\r\n else if(selectedValue === \"Client Stories\"){\r\n window.location.href = `${host}/client-story`;\r\n }\r\n else if(selectedValue === \"Podcasts\"){\r\n window.location.href = `${host}/podcasts`;\r\n }\r\n else if(selectedValue === \"Webinars\"){\r\n window.location.href = `${host}/webinars`;\r\n }\r\n else if(selectedValue === \"Events\"){\r\n window.location.href = `${host}/events`;\r\n }\r\n else if(selectedValue === \"Workshops\"){\r\n window.location.href = `${host}/workshops`;\r\n }\r\n })\r\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// startup\n// Load entry module and return exports\n__webpack_require__(616);\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(298);\n"],"names":["timelines","initResourceCards","resourceCards","gsap","utils","toArray","card","overlay","querySelector","description","chip","chipColor","boxShadow","tl","timeline","paused","set","autoAlpha","from","opacity","duration","ease","yPercent","fromTo","backgroundColor","to","addEventListener","play","reverse","push","stagger","destroyResourceCards","kill","topicsFiltering","topicsToggler","document","getElementById","resetTopicsMobile","resetTopicsDesktop","topicsContainer","topics","querySelectorAll","topicInputs","topicLabels","init","matchMedia","add","this","transformOrigin","scaleY","display","rotate","event","preventDefault","progress","filterEvent","newTopicArray","topicInput","checked","dataset","value","resetTopics","countryFiltering","countryToggler","resetCountryMobile","resetCountryDesktop","countryContainer","countries","countryInputs","countryLabels","newCountryArray","countryInput","resetCountries","formatFiltering","formatToggler","resetFormatMobile","resetFormatDesktop","formatContainer","formats","formatInputs","formatLabels","newFormatArray","formatInput","resetFormats","workshopTypeFiltering","typeToggler","resetTypeMobile","resetTypeDesktop","typeContainer","types","typeInputs","typeLabels","newTypeArray","typeInput","resetTypes","typeFilter","window","location","pathname","async","fetchResource","url","body","response","fetch","method","headers","status","data","text","Promise","resolve","reject","URL","origin","length","searchParams","toString","country","format","type","history","pushState","createLoadingAnimations","cardsLoadingRectangles","cardsContainerAnimation","repeat","repeatDelay","overlayLoadingRectangles","overlaySearchAnimation","initResourcePagination","hasPageNumQuery","pageNumQuery","urlParams","URLSearchParams","search","has","get","gatherURLParams","paginationContainer","pageCount","leftLabel","leftChevron","leftControls","rightLabel","rightChevron","rightControls","activePaginationElement","activePaginationElementLink","parseInt","pagination","gatherDOMElements","activeInt","classList","disableControls","closest","setAttribute","controls","control","tagName","topicPrefiltering","resourceState","topicsParams","getAll","topicsArray","split","topic","countryPrefiltering","countryParams","countriesArray","resourceSearch","resourcesURL","workshopURL","resourceType","initiateSearchButton","resourceSearchInput","initiateSeachButtonLoadingIcon","initiateSeachButtonChevron","searchOverlaySearchTermDisplay","resourceOverlaySearchInput","initiateSearchOverlayButton","searchOverlayResultContainer","searchOverlay","searchOverlayLoading","closeSearchOverlayIcon","isWorkshop","page","that","keyCode","initialSearchLoadToggle","isLoading","searchEvent","target","remove","bundleData","searchTerm","JSON","stringify","loading","toggleOverlay","state","overlaySearchLoadToggle","then","displaySearchResults","textContent","String","innerHTML","highlightSearchTerm","results","result","heading","regex","RegExp","replacedHeading","replace","str","replacedDescription","mobileSelect","mobileSelectButton","host","selectedValue","href","initMobileNavigation","mainCardContainer","cardsContainerLoadingOverlay","resourceURLAppender","bundleAndFetch","requestBody","updateResourceCards","cards","setTimeout","console","log","formatParams","formatsArray","formatPrefiltering","resetFormatsMobile","resetFormatsDesktop","resetTypesMobile","resetTypesDesktop","resetCountriesMobile","resetCountriesDesktop","resourceHub","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","d","definition","key","o","Object","defineProperty","enumerable","obj","prop","prototype","hasOwnProperty","call"],"sourceRoot":""}