From d2577dbc26ba3775f93dca918837ddd307b813de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20D=C3=ADaz=20Soto?= Date: Mon, 4 Mar 2024 11:37:45 -0600 Subject: [PATCH 1/2] fix(shs-5504): prevent error when link is absent in vertical linked cards --- .../shared/vertical-linked-card/vertical-linked-card.js | 8 +++++++- docroot/themes/humsci/humsci_colorful/js/index.js | 2 +- docroot/themes/humsci/humsci_traditional/js/index.js | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/docroot/themes/humsci/humsci_basic/src/js/shared/vertical-linked-card/vertical-linked-card.js b/docroot/themes/humsci/humsci_basic/src/js/shared/vertical-linked-card/vertical-linked-card.js index 7a1095fad5..6767c4d4ab 100644 --- a/docroot/themes/humsci/humsci_basic/src/js/shared/vertical-linked-card/vertical-linked-card.js +++ b/docroot/themes/humsci/humsci_basic/src/js/shared/vertical-linked-card/vertical-linked-card.js @@ -5,7 +5,13 @@ function verticalLinkedCard() { // Loop through each card cards.forEach((card) => { // Find the main link within each card - const mainLink = card.querySelector('.hb-vertical-linked-card__title__link'); + const mainLink = card.querySelector( + '.hb-vertical-linked-card__title__link', + ); + + if (!mainLink) { + return; + } // Add a click event listener to each card function handleClick() { diff --git a/docroot/themes/humsci/humsci_colorful/js/index.js b/docroot/themes/humsci/humsci_colorful/js/index.js index 4ae72b5032..40f769f477 100644 --- a/docroot/themes/humsci/humsci_colorful/js/index.js +++ b/docroot/themes/humsci/humsci_colorful/js/index.js @@ -1 +1 @@ -(()=>{var e={418:()=>{function e(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=1){var a=!1;o.forEach((function(e){if(e.classList.contains("hb-accordion_toggle-all")){var t=function(){var e=document.createElement("Button");return e.innerText="Expand All",e.classList.add("hb-link"),e.classList.add("hb-accordion-toggle-all"),e}();e.parentNode.insertBefore(t,e)}}));var i=e(document.querySelectorAll(".hb-accordion-toggle-all"));i.forEach((function(e){e.addEventListener("click",(function(t){t.preventDefault(),a?(n(o,"closeAll"),r(i,"closeAll"),a=!1):(n(o,"openAll"),r(i,"openAll"),a=!0),e.scrollIntoView(!0)}))}))}var c,l=new URLSearchParams(window.location.search),u=Object.fromEntries(l.entries());Object.keys(u).length&&Object.prototype.hasOwnProperty.call(u,"search")&&(c=u.search.toLowerCase(),o.forEach((function(e){e.textContent.toLowerCase().includes(c)&&e.setAttribute("open","")})))},697:()=>{var e,t;e=document.querySelectorAll(".addtocal"),t=document.querySelector("body"),e.forEach((function(e){e.addEventListener("click",(function(){"true"===e.getAttribute("aria-expanded")?e.setAttribute("aria-expanded","false"):e.setAttribute("aria-expanded","true")}))})),t.addEventListener("click",(function(t){e.forEach((function(e){t.target!==e&&e.setAttribute("aria-expanded","false")}))}))},356:()=>{var e=document.querySelector(".hb-has-animation-enhancements"),t=document.querySelector(".hb-experimental"),n=[document.querySelectorAll(".hs-font-lead")],r=[document.querySelectorAll(".hb-gradient-hero"),document.querySelectorAll(".hb-gradient-hero__text"),document.querySelectorAll(".hb-gradient-hero__image-wrapper"),document.querySelectorAll(".field-hs-gradient-hero-image"),document.querySelectorAll(".hb-hero-overlay"),document.querySelectorAll(".hb-hero-overlay__text"),document.querySelectorAll(".hb-hero-overlay__image-wrapper"),document.querySelectorAll(".field-hs-hero-image"),document.querySelectorAll(".hs-font-splash")];t&&r.push(n);var o=new IntersectionObserver((function(e){e.forEach((function(e){e.intersectionRatio>0&&e.target.classList.add("animate")}))}));e&&r.forEach((function(e){e&&e.forEach((function(e){o.observe(e)}))}))},642:()=>{function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(o(),window.addEventListener("resize",(function(){clearTimeout(t),t=setTimeout(o,100)})))},738:()=>{window.editoria11yOptionsOverride=!0,window.editoria11yOptions=function(e){return ed11yLang&&ed11yLang.en&&(ed11yLang.en.buttonOutlineContent="Heading Outline"),e},window.addEventListener("load",(function(){ed11yOnce&&new MutationObserver((function(e){e.forEach((function(e){if(e.addedNodes.length&&"ED11Y-ELEMENT-PANEL"===e.addedNodes[0].nodeName){var t=e.addedNodes[0].shadowRoot.querySelector("style");t.textContent="".concat(t.textContent,"\n .shut.errors #toggle {\n color: #000000;\n }")}}))})).observe(document.body,{childList:!0})}))},808:()=>{var e=document.querySelectorAll(".field-media-oembed-video");if(e&&e.length>0)for(var t=0;t{var e=document.querySelector(".js-megamenu");if(e){var t=document.querySelector(".js-megamenu__mobile-btn"),n=e.querySelector(".js-megamenu__list--main"),r=e.querySelectorAll(".js-megamenu__toggle"),o=window.innerWidth,a=o<992;window.addEventListener("resize",(function(){o=window.innerWidth,a=o<=992}));var i=function(e){e.nextElementSibling.classList.remove("is-expanded"),e.classList.remove("is-expanded"),e.setAttribute("aria-expanded","false")};document.body.addEventListener("mousedown",(function(t){e.contains(t.target)||r.forEach((function(e){i(e)}))}));var c=function(e,t){var n=e.getAttribute("aria-".concat(t));n="true"===n?"false":"true",e.setAttribute("aria-".concat(t),n)};t&&(c(t,"expanded"),a&&function(){var e=document.querySelector(".js-megamenu__active-trail");if(e){var t=e.nextElementSibling;c(e,"expanded"),e.classList.add("is-expanded"),t.classList.add("is-expanded")}}(),t.addEventListener("click",(function(){c(t,"expanded"),n&&n.classList.toggle("is-active")}))),r.forEach((function(e){e.addEventListener("click",(function(t){var n=t.currentTarget,o=t.currentTarget.parentElement.querySelector(".js-megamenu__expanded-container");a||function(e){r.forEach((function(t){t!==e&&i(t)}))}(n),c(n,"expanded"),e.classList.toggle("is-expanded"),o.classList.toggle("is-expanded")}))}))}},979:()=>{document.addEventListener("DOMContentLoaded",(function(){!function(e){if(e.getElementById("colorbox")){var t=e.getElementById("cboxPrevious"),n=e.getElementById("cboxNext"),r=e.getElementById("cboxSlideshow");t.textContent="« Prev",n.textContent="Next »",r.textContent="Slideshow"}}(document)}))},725:()=>{!function(e,t,n){t.behaviors.mySlickBehavior={attach:function(t){var r=n.matchMedia("(prefers-reduced-motion: reduce)");function o(){var n=t.querySelector(".slick__slider");!r||r.matches?e(n).on("afterChange",(function(e,t){t.slickSetOption("cssEase","none",!0)})):e(n).on("afterChange",(function(e,t){t.slickSetOption("cssEase","ease",!0)}))}o(),r.addEventListener("change",o)}}}(jQuery,Drupal,window,document)},638:()=>{function e(e,t){for(var n=0;n{var e=document.querySelectorAll("".concat("div.hb-table-pattern__header > div.hb-table-pattern__row > div",", ").concat("div.hb-table-pattern__header > div.hb-table-pattern__row > span",", ").concat("div.hb-table-pattern__header > div.hb-table-pattern__row > p")),t=document.querySelectorAll(".hb-table-row");if(t)for(var n=0;n{function e(e){var t=document.createElement("div");t.className="hb-table-wrap",e.parentNode.insertBefore(t,e),t.appendChild(e)}for(var t=document.querySelectorAll("table"),n=document.querySelectorAll(".hb-table-pattern"),r=0;r{document.querySelectorAll(".hb-timeline__collapsed").forEach((function(e){e.querySelectorAll(".hb-timeline-item").forEach((function(e){e.removeAttribute("open")})),e.querySelectorAll(".hb-timeline-item__summary").forEach((function(e){e.setAttribute("aria-expanded","false"),e.setAttribute("aria-pressed","false")}))}));var e=document.querySelectorAll(".hb-timeline-item");e&&e.forEach((function(e){var t=e.querySelector(".hb-timeline-item__summary"),n=t.getAttribute("aria-expanded");t.addEventListener("click",(function(){"true"===n?(t.setAttribute("aria-expanded","false"),t.setAttribute("aria-pressed","false")):(t.setAttribute("aria-expanded","true"),t.setAttribute("aria-pressed","true")),n=t.getAttribute("aria-expanded")}))}));var t,n=new URLSearchParams(window.location.search),r=Object.fromEntries(n.entries());Object.keys(r).length&&Object.prototype.hasOwnProperty.call(r,"search")&&(t=r.search.toLowerCase(),e.forEach((function(e){if(e.textContent.toLowerCase().includes(t)){var n=e.querySelector("summary");e.setAttribute("open",""),n.setAttribute("aria-expanded","true"),n.setAttribute("aria-pressed","true")}})))},195:()=>{document.querySelectorAll(".hb-vertical-linked-card").forEach((function(e){var t=e.querySelector(".hb-vertical-linked-card__title__link");t.addEventListener("focus",(function(){e.classList.add("is-focused")})),t.addEventListener("blur",(function(){e.classList.remove("is-focused")})),e.addEventListener("click",(function(){t.click()}))}))},662:()=>{document.addEventListener("DOMContentLoaded",(function(){!function(){if(document.querySelector(".layout-builder-form")){var e=document.querySelector(".layout-builder-form details");e&&e.removeAttribute("open")}}(document)}))}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}(()=>{"use strict";n(642),n(42),n(638),n(965);const e=function(e,t,n){e.setAttribute("aria-expanded",n),t.setAttribute("aria-hidden",!n)};var t,r,o=document.querySelector(".hb-main-nav__toggle"),a=document.querySelector(".hb-main-nav__menu-lv1");o&&(o.addEventListener("click",(function(){var t="true"===o.getAttribute("aria-expanded");e(o,a,!t)})),window.addEventListener("resize",(function(){(t=window.innerWidth)>=992&&!r&&(e(o,a,!0),r=!0),t<992&&r&&(e(o,a,!1),r=!1)})));const i=function(t,n,r){t.preventDefault();var o="true"===t.target.getAttribute("aria-expanded");e(n,r,!o)};var c=document.querySelectorAll(".hb-nested-toggler");if(c)for(var l=function(){var t=window.innerWidth,n=c[u],r=n.getAttribute("id"),o=document.querySelector('[aria-labelledby="'.concat(r,'"]')),a=n.parentNode;if(!o)return"continue";n.addEventListener("click",(function(e){return i(e,n,o)})),n.addEventListener("keydown",(function(t){if(32===t.which){t.preventDefault();var r="true"===t.target.getAttribute("aria-expanded");e(n,o,!r)}})),window.addEventListener("resize",(function(){(t=window.innerWidth)>=992&&e(n,o,!1)})),["focusin","click"].forEach((function(r){document.body.addEventListener(r,(function(r){t>=992&&!a.contains(r.target)&&e(n,o,!1)}),!1)}))},u=0;u0){var t=Array.prototype.map.call(e,(function(e){return e.scrollHeight}));return new Promise((function(n){var r=Math.max.apply(null,t),o=t.indexOf(r);Array.prototype.forEach.call(e,(function(e,t){t!==o&&(e.style.minHeight="".concat(r,"px"))})),n()}))}},w=function(e){e.forEach((function(e){e.style.minHeight="auto"}))};function _(e){return function(e){if(Array.isArray(e))return q(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return q(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?q(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&w(r),e&&t.length>0&&w(t),e&&window.innerWidth>=576&&(t.length>0?E(t).then((function(){return E(r)})).catch((function(e){return console.error("issue loading equal height cards",e)})):r.length>0&&E(r))}))};setTimeout((function(){x()}),1e3),window.addEventListener("resize",(function(){setTimeout((function(){x()}),500)})),n(808),n(356),n(227),n(418),n(195),n(979),n(738),n(662),n(697),n(725),n(743)})()})(); \ No newline at end of file +(()=>{var e={418:()=>{function e(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=1){var a=!1;o.forEach((function(e){if(e.classList.contains("hb-accordion_toggle-all")){var t=function(){var e=document.createElement("Button");return e.innerText="Expand All",e.classList.add("hb-link"),e.classList.add("hb-accordion-toggle-all"),e}();e.parentNode.insertBefore(t,e)}}));var i=e(document.querySelectorAll(".hb-accordion-toggle-all"));i.forEach((function(e){e.addEventListener("click",(function(t){t.preventDefault(),a?(n(o,"closeAll"),r(i,"closeAll"),a=!1):(n(o,"openAll"),r(i,"openAll"),a=!0),e.scrollIntoView(!0)}))}))}var c,l=new URLSearchParams(window.location.search),u=Object.fromEntries(l.entries());Object.keys(u).length&&Object.prototype.hasOwnProperty.call(u,"search")&&(c=u.search.toLowerCase(),o.forEach((function(e){e.textContent.toLowerCase().includes(c)&&e.setAttribute("open","")})))},697:()=>{var e,t;e=document.querySelectorAll(".addtocal"),t=document.querySelector("body"),e.forEach((function(e){e.addEventListener("click",(function(){"true"===e.getAttribute("aria-expanded")?e.setAttribute("aria-expanded","false"):e.setAttribute("aria-expanded","true")}))})),t.addEventListener("click",(function(t){e.forEach((function(e){t.target!==e&&e.setAttribute("aria-expanded","false")}))}))},356:()=>{var e=document.querySelector(".hb-has-animation-enhancements"),t=document.querySelector(".hb-experimental"),n=[document.querySelectorAll(".hs-font-lead")],r=[document.querySelectorAll(".hb-gradient-hero"),document.querySelectorAll(".hb-gradient-hero__text"),document.querySelectorAll(".hb-gradient-hero__image-wrapper"),document.querySelectorAll(".field-hs-gradient-hero-image"),document.querySelectorAll(".hb-hero-overlay"),document.querySelectorAll(".hb-hero-overlay__text"),document.querySelectorAll(".hb-hero-overlay__image-wrapper"),document.querySelectorAll(".field-hs-hero-image"),document.querySelectorAll(".hs-font-splash")];t&&r.push(n);var o=new IntersectionObserver((function(e){e.forEach((function(e){e.intersectionRatio>0&&e.target.classList.add("animate")}))}));e&&r.forEach((function(e){e&&e.forEach((function(e){o.observe(e)}))}))},642:()=>{function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(o(),window.addEventListener("resize",(function(){clearTimeout(t),t=setTimeout(o,100)})))},738:()=>{window.editoria11yOptionsOverride=!0,window.editoria11yOptions=function(e){return ed11yLang&&ed11yLang.en&&(ed11yLang.en.buttonOutlineContent="Heading Outline"),e},window.addEventListener("load",(function(){ed11yOnce&&new MutationObserver((function(e){e.forEach((function(e){if(e.addedNodes.length&&"ED11Y-ELEMENT-PANEL"===e.addedNodes[0].nodeName){var t=e.addedNodes[0].shadowRoot.querySelector("style");t.textContent="".concat(t.textContent,"\n .shut.errors #toggle {\n color: #000000;\n }")}}))})).observe(document.body,{childList:!0})}))},808:()=>{var e=document.querySelectorAll(".field-media-oembed-video");if(e&&e.length>0)for(var t=0;t{var e=document.querySelector(".js-megamenu");if(e){var t=document.querySelector(".js-megamenu__mobile-btn"),n=e.querySelector(".js-megamenu__list--main"),r=e.querySelectorAll(".js-megamenu__toggle"),o=window.innerWidth,a=o<992;window.addEventListener("resize",(function(){o=window.innerWidth,a=o<=992}));var i=function(e){e.nextElementSibling.classList.remove("is-expanded"),e.classList.remove("is-expanded"),e.setAttribute("aria-expanded","false")};document.body.addEventListener("mousedown",(function(t){e.contains(t.target)||r.forEach((function(e){i(e)}))}));var c=function(e,t){var n=e.getAttribute("aria-".concat(t));n="true"===n?"false":"true",e.setAttribute("aria-".concat(t),n)};t&&(c(t,"expanded"),a&&function(){var e=document.querySelector(".js-megamenu__active-trail");if(e){var t=e.nextElementSibling;c(e,"expanded"),e.classList.add("is-expanded"),t.classList.add("is-expanded")}}(),t.addEventListener("click",(function(){c(t,"expanded"),n&&n.classList.toggle("is-active")}))),r.forEach((function(e){e.addEventListener("click",(function(t){var n=t.currentTarget,o=t.currentTarget.parentElement.querySelector(".js-megamenu__expanded-container");a||function(e){r.forEach((function(t){t!==e&&i(t)}))}(n),c(n,"expanded"),e.classList.toggle("is-expanded"),o.classList.toggle("is-expanded")}))}))}},979:()=>{document.addEventListener("DOMContentLoaded",(function(){!function(e){if(e.getElementById("colorbox")){var t=e.getElementById("cboxPrevious"),n=e.getElementById("cboxNext"),r=e.getElementById("cboxSlideshow");t.textContent="« Prev",n.textContent="Next »",r.textContent="Slideshow"}}(document)}))},725:()=>{!function(e,t,n){t.behaviors.mySlickBehavior={attach:function(t){var r=n.matchMedia("(prefers-reduced-motion: reduce)");function o(){var n=t.querySelector(".slick__slider");!r||r.matches?e(n).on("afterChange",(function(e,t){t.slickSetOption("cssEase","none",!0)})):e(n).on("afterChange",(function(e,t){t.slickSetOption("cssEase","ease",!0)}))}o(),r.addEventListener("change",o)}}}(jQuery,Drupal,window,document)},638:()=>{function e(e,t){for(var n=0;n{var e=document.querySelectorAll("".concat("div.hb-table-pattern__header > div.hb-table-pattern__row > div",", ").concat("div.hb-table-pattern__header > div.hb-table-pattern__row > span",", ").concat("div.hb-table-pattern__header > div.hb-table-pattern__row > p")),t=document.querySelectorAll(".hb-table-row");if(t)for(var n=0;n{function e(e){var t=document.createElement("div");t.className="hb-table-wrap",e.parentNode.insertBefore(t,e),t.appendChild(e)}for(var t=document.querySelectorAll("table"),n=document.querySelectorAll(".hb-table-pattern"),r=0;r{document.querySelectorAll(".hb-timeline__collapsed").forEach((function(e){e.querySelectorAll(".hb-timeline-item").forEach((function(e){e.removeAttribute("open")})),e.querySelectorAll(".hb-timeline-item__summary").forEach((function(e){e.setAttribute("aria-expanded","false"),e.setAttribute("aria-pressed","false")}))}));var e=document.querySelectorAll(".hb-timeline-item");e&&e.forEach((function(e){var t=e.querySelector(".hb-timeline-item__summary"),n=t.getAttribute("aria-expanded");t.addEventListener("click",(function(){"true"===n?(t.setAttribute("aria-expanded","false"),t.setAttribute("aria-pressed","false")):(t.setAttribute("aria-expanded","true"),t.setAttribute("aria-pressed","true")),n=t.getAttribute("aria-expanded")}))}));var t,n=new URLSearchParams(window.location.search),r=Object.fromEntries(n.entries());Object.keys(r).length&&Object.prototype.hasOwnProperty.call(r,"search")&&(t=r.search.toLowerCase(),e.forEach((function(e){if(e.textContent.toLowerCase().includes(t)){var n=e.querySelector("summary");e.setAttribute("open",""),n.setAttribute("aria-expanded","true"),n.setAttribute("aria-pressed","true")}})))},195:()=>{document.querySelectorAll(".hb-vertical-linked-card").forEach((function(e){var t=e.querySelector(".hb-vertical-linked-card__title__link");t&&(t.addEventListener("focus",(function(){e.classList.add("is-focused")})),t.addEventListener("blur",(function(){e.classList.remove("is-focused")})),e.addEventListener("click",(function(){t.click()})))}))},662:()=>{document.addEventListener("DOMContentLoaded",(function(){!function(){if(document.querySelector(".layout-builder-form")){var e=document.querySelector(".layout-builder-form details");e&&e.removeAttribute("open")}}(document)}))}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}(()=>{"use strict";n(642),n(42),n(638),n(965);const e=function(e,t,n){e.setAttribute("aria-expanded",n),t.setAttribute("aria-hidden",!n)};var t,r,o=document.querySelector(".hb-main-nav__toggle"),a=document.querySelector(".hb-main-nav__menu-lv1");o&&(o.addEventListener("click",(function(){var t="true"===o.getAttribute("aria-expanded");e(o,a,!t)})),window.addEventListener("resize",(function(){(t=window.innerWidth)>=992&&!r&&(e(o,a,!0),r=!0),t<992&&r&&(e(o,a,!1),r=!1)})));const i=function(t,n,r){t.preventDefault();var o="true"===t.target.getAttribute("aria-expanded");e(n,r,!o)};var c=document.querySelectorAll(".hb-nested-toggler");if(c)for(var l=function(){var t=window.innerWidth,n=c[u],r=n.getAttribute("id"),o=document.querySelector('[aria-labelledby="'.concat(r,'"]')),a=n.parentNode;if(!o)return"continue";n.addEventListener("click",(function(e){return i(e,n,o)})),n.addEventListener("keydown",(function(t){if(32===t.which){t.preventDefault();var r="true"===t.target.getAttribute("aria-expanded");e(n,o,!r)}})),window.addEventListener("resize",(function(){(t=window.innerWidth)>=992&&e(n,o,!1)})),["focusin","click"].forEach((function(r){document.body.addEventListener(r,(function(r){t>=992&&!a.contains(r.target)&&e(n,o,!1)}),!1)}))},u=0;u0){var t=Array.prototype.map.call(e,(function(e){return e.scrollHeight}));return new Promise((function(n){var r=Math.max.apply(null,t),o=t.indexOf(r);Array.prototype.forEach.call(e,(function(e,t){t!==o&&(e.style.minHeight="".concat(r,"px"))})),n()}))}},w=function(e){e.forEach((function(e){e.style.minHeight="auto"}))};function _(e){return function(e){if(Array.isArray(e))return q(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return q(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?q(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&w(r),e&&t.length>0&&w(t),e&&window.innerWidth>=576&&(t.length>0?E(t).then((function(){return E(r)})).catch((function(e){return console.error("issue loading equal height cards",e)})):r.length>0&&E(r))}))};setTimeout((function(){x()}),1e3),window.addEventListener("resize",(function(){setTimeout((function(){x()}),500)})),n(808),n(356),n(227),n(418),n(195),n(979),n(738),n(662),n(697),n(725),n(743)})()})(); \ No newline at end of file diff --git a/docroot/themes/humsci/humsci_traditional/js/index.js b/docroot/themes/humsci/humsci_traditional/js/index.js index 4ae72b5032..40f769f477 100644 --- a/docroot/themes/humsci/humsci_traditional/js/index.js +++ b/docroot/themes/humsci/humsci_traditional/js/index.js @@ -1 +1 @@ -(()=>{var e={418:()=>{function e(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=1){var a=!1;o.forEach((function(e){if(e.classList.contains("hb-accordion_toggle-all")){var t=function(){var e=document.createElement("Button");return e.innerText="Expand All",e.classList.add("hb-link"),e.classList.add("hb-accordion-toggle-all"),e}();e.parentNode.insertBefore(t,e)}}));var i=e(document.querySelectorAll(".hb-accordion-toggle-all"));i.forEach((function(e){e.addEventListener("click",(function(t){t.preventDefault(),a?(n(o,"closeAll"),r(i,"closeAll"),a=!1):(n(o,"openAll"),r(i,"openAll"),a=!0),e.scrollIntoView(!0)}))}))}var c,l=new URLSearchParams(window.location.search),u=Object.fromEntries(l.entries());Object.keys(u).length&&Object.prototype.hasOwnProperty.call(u,"search")&&(c=u.search.toLowerCase(),o.forEach((function(e){e.textContent.toLowerCase().includes(c)&&e.setAttribute("open","")})))},697:()=>{var e,t;e=document.querySelectorAll(".addtocal"),t=document.querySelector("body"),e.forEach((function(e){e.addEventListener("click",(function(){"true"===e.getAttribute("aria-expanded")?e.setAttribute("aria-expanded","false"):e.setAttribute("aria-expanded","true")}))})),t.addEventListener("click",(function(t){e.forEach((function(e){t.target!==e&&e.setAttribute("aria-expanded","false")}))}))},356:()=>{var e=document.querySelector(".hb-has-animation-enhancements"),t=document.querySelector(".hb-experimental"),n=[document.querySelectorAll(".hs-font-lead")],r=[document.querySelectorAll(".hb-gradient-hero"),document.querySelectorAll(".hb-gradient-hero__text"),document.querySelectorAll(".hb-gradient-hero__image-wrapper"),document.querySelectorAll(".field-hs-gradient-hero-image"),document.querySelectorAll(".hb-hero-overlay"),document.querySelectorAll(".hb-hero-overlay__text"),document.querySelectorAll(".hb-hero-overlay__image-wrapper"),document.querySelectorAll(".field-hs-hero-image"),document.querySelectorAll(".hs-font-splash")];t&&r.push(n);var o=new IntersectionObserver((function(e){e.forEach((function(e){e.intersectionRatio>0&&e.target.classList.add("animate")}))}));e&&r.forEach((function(e){e&&e.forEach((function(e){o.observe(e)}))}))},642:()=>{function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(o(),window.addEventListener("resize",(function(){clearTimeout(t),t=setTimeout(o,100)})))},738:()=>{window.editoria11yOptionsOverride=!0,window.editoria11yOptions=function(e){return ed11yLang&&ed11yLang.en&&(ed11yLang.en.buttonOutlineContent="Heading Outline"),e},window.addEventListener("load",(function(){ed11yOnce&&new MutationObserver((function(e){e.forEach((function(e){if(e.addedNodes.length&&"ED11Y-ELEMENT-PANEL"===e.addedNodes[0].nodeName){var t=e.addedNodes[0].shadowRoot.querySelector("style");t.textContent="".concat(t.textContent,"\n .shut.errors #toggle {\n color: #000000;\n }")}}))})).observe(document.body,{childList:!0})}))},808:()=>{var e=document.querySelectorAll(".field-media-oembed-video");if(e&&e.length>0)for(var t=0;t{var e=document.querySelector(".js-megamenu");if(e){var t=document.querySelector(".js-megamenu__mobile-btn"),n=e.querySelector(".js-megamenu__list--main"),r=e.querySelectorAll(".js-megamenu__toggle"),o=window.innerWidth,a=o<992;window.addEventListener("resize",(function(){o=window.innerWidth,a=o<=992}));var i=function(e){e.nextElementSibling.classList.remove("is-expanded"),e.classList.remove("is-expanded"),e.setAttribute("aria-expanded","false")};document.body.addEventListener("mousedown",(function(t){e.contains(t.target)||r.forEach((function(e){i(e)}))}));var c=function(e,t){var n=e.getAttribute("aria-".concat(t));n="true"===n?"false":"true",e.setAttribute("aria-".concat(t),n)};t&&(c(t,"expanded"),a&&function(){var e=document.querySelector(".js-megamenu__active-trail");if(e){var t=e.nextElementSibling;c(e,"expanded"),e.classList.add("is-expanded"),t.classList.add("is-expanded")}}(),t.addEventListener("click",(function(){c(t,"expanded"),n&&n.classList.toggle("is-active")}))),r.forEach((function(e){e.addEventListener("click",(function(t){var n=t.currentTarget,o=t.currentTarget.parentElement.querySelector(".js-megamenu__expanded-container");a||function(e){r.forEach((function(t){t!==e&&i(t)}))}(n),c(n,"expanded"),e.classList.toggle("is-expanded"),o.classList.toggle("is-expanded")}))}))}},979:()=>{document.addEventListener("DOMContentLoaded",(function(){!function(e){if(e.getElementById("colorbox")){var t=e.getElementById("cboxPrevious"),n=e.getElementById("cboxNext"),r=e.getElementById("cboxSlideshow");t.textContent="« Prev",n.textContent="Next »",r.textContent="Slideshow"}}(document)}))},725:()=>{!function(e,t,n){t.behaviors.mySlickBehavior={attach:function(t){var r=n.matchMedia("(prefers-reduced-motion: reduce)");function o(){var n=t.querySelector(".slick__slider");!r||r.matches?e(n).on("afterChange",(function(e,t){t.slickSetOption("cssEase","none",!0)})):e(n).on("afterChange",(function(e,t){t.slickSetOption("cssEase","ease",!0)}))}o(),r.addEventListener("change",o)}}}(jQuery,Drupal,window,document)},638:()=>{function e(e,t){for(var n=0;n{var e=document.querySelectorAll("".concat("div.hb-table-pattern__header > div.hb-table-pattern__row > div",", ").concat("div.hb-table-pattern__header > div.hb-table-pattern__row > span",", ").concat("div.hb-table-pattern__header > div.hb-table-pattern__row > p")),t=document.querySelectorAll(".hb-table-row");if(t)for(var n=0;n{function e(e){var t=document.createElement("div");t.className="hb-table-wrap",e.parentNode.insertBefore(t,e),t.appendChild(e)}for(var t=document.querySelectorAll("table"),n=document.querySelectorAll(".hb-table-pattern"),r=0;r{document.querySelectorAll(".hb-timeline__collapsed").forEach((function(e){e.querySelectorAll(".hb-timeline-item").forEach((function(e){e.removeAttribute("open")})),e.querySelectorAll(".hb-timeline-item__summary").forEach((function(e){e.setAttribute("aria-expanded","false"),e.setAttribute("aria-pressed","false")}))}));var e=document.querySelectorAll(".hb-timeline-item");e&&e.forEach((function(e){var t=e.querySelector(".hb-timeline-item__summary"),n=t.getAttribute("aria-expanded");t.addEventListener("click",(function(){"true"===n?(t.setAttribute("aria-expanded","false"),t.setAttribute("aria-pressed","false")):(t.setAttribute("aria-expanded","true"),t.setAttribute("aria-pressed","true")),n=t.getAttribute("aria-expanded")}))}));var t,n=new URLSearchParams(window.location.search),r=Object.fromEntries(n.entries());Object.keys(r).length&&Object.prototype.hasOwnProperty.call(r,"search")&&(t=r.search.toLowerCase(),e.forEach((function(e){if(e.textContent.toLowerCase().includes(t)){var n=e.querySelector("summary");e.setAttribute("open",""),n.setAttribute("aria-expanded","true"),n.setAttribute("aria-pressed","true")}})))},195:()=>{document.querySelectorAll(".hb-vertical-linked-card").forEach((function(e){var t=e.querySelector(".hb-vertical-linked-card__title__link");t.addEventListener("focus",(function(){e.classList.add("is-focused")})),t.addEventListener("blur",(function(){e.classList.remove("is-focused")})),e.addEventListener("click",(function(){t.click()}))}))},662:()=>{document.addEventListener("DOMContentLoaded",(function(){!function(){if(document.querySelector(".layout-builder-form")){var e=document.querySelector(".layout-builder-form details");e&&e.removeAttribute("open")}}(document)}))}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}(()=>{"use strict";n(642),n(42),n(638),n(965);const e=function(e,t,n){e.setAttribute("aria-expanded",n),t.setAttribute("aria-hidden",!n)};var t,r,o=document.querySelector(".hb-main-nav__toggle"),a=document.querySelector(".hb-main-nav__menu-lv1");o&&(o.addEventListener("click",(function(){var t="true"===o.getAttribute("aria-expanded");e(o,a,!t)})),window.addEventListener("resize",(function(){(t=window.innerWidth)>=992&&!r&&(e(o,a,!0),r=!0),t<992&&r&&(e(o,a,!1),r=!1)})));const i=function(t,n,r){t.preventDefault();var o="true"===t.target.getAttribute("aria-expanded");e(n,r,!o)};var c=document.querySelectorAll(".hb-nested-toggler");if(c)for(var l=function(){var t=window.innerWidth,n=c[u],r=n.getAttribute("id"),o=document.querySelector('[aria-labelledby="'.concat(r,'"]')),a=n.parentNode;if(!o)return"continue";n.addEventListener("click",(function(e){return i(e,n,o)})),n.addEventListener("keydown",(function(t){if(32===t.which){t.preventDefault();var r="true"===t.target.getAttribute("aria-expanded");e(n,o,!r)}})),window.addEventListener("resize",(function(){(t=window.innerWidth)>=992&&e(n,o,!1)})),["focusin","click"].forEach((function(r){document.body.addEventListener(r,(function(r){t>=992&&!a.contains(r.target)&&e(n,o,!1)}),!1)}))},u=0;u0){var t=Array.prototype.map.call(e,(function(e){return e.scrollHeight}));return new Promise((function(n){var r=Math.max.apply(null,t),o=t.indexOf(r);Array.prototype.forEach.call(e,(function(e,t){t!==o&&(e.style.minHeight="".concat(r,"px"))})),n()}))}},w=function(e){e.forEach((function(e){e.style.minHeight="auto"}))};function _(e){return function(e){if(Array.isArray(e))return q(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return q(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?q(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&w(r),e&&t.length>0&&w(t),e&&window.innerWidth>=576&&(t.length>0?E(t).then((function(){return E(r)})).catch((function(e){return console.error("issue loading equal height cards",e)})):r.length>0&&E(r))}))};setTimeout((function(){x()}),1e3),window.addEventListener("resize",(function(){setTimeout((function(){x()}),500)})),n(808),n(356),n(227),n(418),n(195),n(979),n(738),n(662),n(697),n(725),n(743)})()})(); \ No newline at end of file +(()=>{var e={418:()=>{function e(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=1){var a=!1;o.forEach((function(e){if(e.classList.contains("hb-accordion_toggle-all")){var t=function(){var e=document.createElement("Button");return e.innerText="Expand All",e.classList.add("hb-link"),e.classList.add("hb-accordion-toggle-all"),e}();e.parentNode.insertBefore(t,e)}}));var i=e(document.querySelectorAll(".hb-accordion-toggle-all"));i.forEach((function(e){e.addEventListener("click",(function(t){t.preventDefault(),a?(n(o,"closeAll"),r(i,"closeAll"),a=!1):(n(o,"openAll"),r(i,"openAll"),a=!0),e.scrollIntoView(!0)}))}))}var c,l=new URLSearchParams(window.location.search),u=Object.fromEntries(l.entries());Object.keys(u).length&&Object.prototype.hasOwnProperty.call(u,"search")&&(c=u.search.toLowerCase(),o.forEach((function(e){e.textContent.toLowerCase().includes(c)&&e.setAttribute("open","")})))},697:()=>{var e,t;e=document.querySelectorAll(".addtocal"),t=document.querySelector("body"),e.forEach((function(e){e.addEventListener("click",(function(){"true"===e.getAttribute("aria-expanded")?e.setAttribute("aria-expanded","false"):e.setAttribute("aria-expanded","true")}))})),t.addEventListener("click",(function(t){e.forEach((function(e){t.target!==e&&e.setAttribute("aria-expanded","false")}))}))},356:()=>{var e=document.querySelector(".hb-has-animation-enhancements"),t=document.querySelector(".hb-experimental"),n=[document.querySelectorAll(".hs-font-lead")],r=[document.querySelectorAll(".hb-gradient-hero"),document.querySelectorAll(".hb-gradient-hero__text"),document.querySelectorAll(".hb-gradient-hero__image-wrapper"),document.querySelectorAll(".field-hs-gradient-hero-image"),document.querySelectorAll(".hb-hero-overlay"),document.querySelectorAll(".hb-hero-overlay__text"),document.querySelectorAll(".hb-hero-overlay__image-wrapper"),document.querySelectorAll(".field-hs-hero-image"),document.querySelectorAll(".hs-font-splash")];t&&r.push(n);var o=new IntersectionObserver((function(e){e.forEach((function(e){e.intersectionRatio>0&&e.target.classList.add("animate")}))}));e&&r.forEach((function(e){e&&e.forEach((function(e){o.observe(e)}))}))},642:()=>{function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(o(),window.addEventListener("resize",(function(){clearTimeout(t),t=setTimeout(o,100)})))},738:()=>{window.editoria11yOptionsOverride=!0,window.editoria11yOptions=function(e){return ed11yLang&&ed11yLang.en&&(ed11yLang.en.buttonOutlineContent="Heading Outline"),e},window.addEventListener("load",(function(){ed11yOnce&&new MutationObserver((function(e){e.forEach((function(e){if(e.addedNodes.length&&"ED11Y-ELEMENT-PANEL"===e.addedNodes[0].nodeName){var t=e.addedNodes[0].shadowRoot.querySelector("style");t.textContent="".concat(t.textContent,"\n .shut.errors #toggle {\n color: #000000;\n }")}}))})).observe(document.body,{childList:!0})}))},808:()=>{var e=document.querySelectorAll(".field-media-oembed-video");if(e&&e.length>0)for(var t=0;t{var e=document.querySelector(".js-megamenu");if(e){var t=document.querySelector(".js-megamenu__mobile-btn"),n=e.querySelector(".js-megamenu__list--main"),r=e.querySelectorAll(".js-megamenu__toggle"),o=window.innerWidth,a=o<992;window.addEventListener("resize",(function(){o=window.innerWidth,a=o<=992}));var i=function(e){e.nextElementSibling.classList.remove("is-expanded"),e.classList.remove("is-expanded"),e.setAttribute("aria-expanded","false")};document.body.addEventListener("mousedown",(function(t){e.contains(t.target)||r.forEach((function(e){i(e)}))}));var c=function(e,t){var n=e.getAttribute("aria-".concat(t));n="true"===n?"false":"true",e.setAttribute("aria-".concat(t),n)};t&&(c(t,"expanded"),a&&function(){var e=document.querySelector(".js-megamenu__active-trail");if(e){var t=e.nextElementSibling;c(e,"expanded"),e.classList.add("is-expanded"),t.classList.add("is-expanded")}}(),t.addEventListener("click",(function(){c(t,"expanded"),n&&n.classList.toggle("is-active")}))),r.forEach((function(e){e.addEventListener("click",(function(t){var n=t.currentTarget,o=t.currentTarget.parentElement.querySelector(".js-megamenu__expanded-container");a||function(e){r.forEach((function(t){t!==e&&i(t)}))}(n),c(n,"expanded"),e.classList.toggle("is-expanded"),o.classList.toggle("is-expanded")}))}))}},979:()=>{document.addEventListener("DOMContentLoaded",(function(){!function(e){if(e.getElementById("colorbox")){var t=e.getElementById("cboxPrevious"),n=e.getElementById("cboxNext"),r=e.getElementById("cboxSlideshow");t.textContent="« Prev",n.textContent="Next »",r.textContent="Slideshow"}}(document)}))},725:()=>{!function(e,t,n){t.behaviors.mySlickBehavior={attach:function(t){var r=n.matchMedia("(prefers-reduced-motion: reduce)");function o(){var n=t.querySelector(".slick__slider");!r||r.matches?e(n).on("afterChange",(function(e,t){t.slickSetOption("cssEase","none",!0)})):e(n).on("afterChange",(function(e,t){t.slickSetOption("cssEase","ease",!0)}))}o(),r.addEventListener("change",o)}}}(jQuery,Drupal,window,document)},638:()=>{function e(e,t){for(var n=0;n{var e=document.querySelectorAll("".concat("div.hb-table-pattern__header > div.hb-table-pattern__row > div",", ").concat("div.hb-table-pattern__header > div.hb-table-pattern__row > span",", ").concat("div.hb-table-pattern__header > div.hb-table-pattern__row > p")),t=document.querySelectorAll(".hb-table-row");if(t)for(var n=0;n{function e(e){var t=document.createElement("div");t.className="hb-table-wrap",e.parentNode.insertBefore(t,e),t.appendChild(e)}for(var t=document.querySelectorAll("table"),n=document.querySelectorAll(".hb-table-pattern"),r=0;r{document.querySelectorAll(".hb-timeline__collapsed").forEach((function(e){e.querySelectorAll(".hb-timeline-item").forEach((function(e){e.removeAttribute("open")})),e.querySelectorAll(".hb-timeline-item__summary").forEach((function(e){e.setAttribute("aria-expanded","false"),e.setAttribute("aria-pressed","false")}))}));var e=document.querySelectorAll(".hb-timeline-item");e&&e.forEach((function(e){var t=e.querySelector(".hb-timeline-item__summary"),n=t.getAttribute("aria-expanded");t.addEventListener("click",(function(){"true"===n?(t.setAttribute("aria-expanded","false"),t.setAttribute("aria-pressed","false")):(t.setAttribute("aria-expanded","true"),t.setAttribute("aria-pressed","true")),n=t.getAttribute("aria-expanded")}))}));var t,n=new URLSearchParams(window.location.search),r=Object.fromEntries(n.entries());Object.keys(r).length&&Object.prototype.hasOwnProperty.call(r,"search")&&(t=r.search.toLowerCase(),e.forEach((function(e){if(e.textContent.toLowerCase().includes(t)){var n=e.querySelector("summary");e.setAttribute("open",""),n.setAttribute("aria-expanded","true"),n.setAttribute("aria-pressed","true")}})))},195:()=>{document.querySelectorAll(".hb-vertical-linked-card").forEach((function(e){var t=e.querySelector(".hb-vertical-linked-card__title__link");t&&(t.addEventListener("focus",(function(){e.classList.add("is-focused")})),t.addEventListener("blur",(function(){e.classList.remove("is-focused")})),e.addEventListener("click",(function(){t.click()})))}))},662:()=>{document.addEventListener("DOMContentLoaded",(function(){!function(){if(document.querySelector(".layout-builder-form")){var e=document.querySelector(".layout-builder-form details");e&&e.removeAttribute("open")}}(document)}))}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}(()=>{"use strict";n(642),n(42),n(638),n(965);const e=function(e,t,n){e.setAttribute("aria-expanded",n),t.setAttribute("aria-hidden",!n)};var t,r,o=document.querySelector(".hb-main-nav__toggle"),a=document.querySelector(".hb-main-nav__menu-lv1");o&&(o.addEventListener("click",(function(){var t="true"===o.getAttribute("aria-expanded");e(o,a,!t)})),window.addEventListener("resize",(function(){(t=window.innerWidth)>=992&&!r&&(e(o,a,!0),r=!0),t<992&&r&&(e(o,a,!1),r=!1)})));const i=function(t,n,r){t.preventDefault();var o="true"===t.target.getAttribute("aria-expanded");e(n,r,!o)};var c=document.querySelectorAll(".hb-nested-toggler");if(c)for(var l=function(){var t=window.innerWidth,n=c[u],r=n.getAttribute("id"),o=document.querySelector('[aria-labelledby="'.concat(r,'"]')),a=n.parentNode;if(!o)return"continue";n.addEventListener("click",(function(e){return i(e,n,o)})),n.addEventListener("keydown",(function(t){if(32===t.which){t.preventDefault();var r="true"===t.target.getAttribute("aria-expanded");e(n,o,!r)}})),window.addEventListener("resize",(function(){(t=window.innerWidth)>=992&&e(n,o,!1)})),["focusin","click"].forEach((function(r){document.body.addEventListener(r,(function(r){t>=992&&!a.contains(r.target)&&e(n,o,!1)}),!1)}))},u=0;u0){var t=Array.prototype.map.call(e,(function(e){return e.scrollHeight}));return new Promise((function(n){var r=Math.max.apply(null,t),o=t.indexOf(r);Array.prototype.forEach.call(e,(function(e,t){t!==o&&(e.style.minHeight="".concat(r,"px"))})),n()}))}},w=function(e){e.forEach((function(e){e.style.minHeight="auto"}))};function _(e){return function(e){if(Array.isArray(e))return q(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return q(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?q(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&w(r),e&&t.length>0&&w(t),e&&window.innerWidth>=576&&(t.length>0?E(t).then((function(){return E(r)})).catch((function(e){return console.error("issue loading equal height cards",e)})):r.length>0&&E(r))}))};setTimeout((function(){x()}),1e3),window.addEventListener("resize",(function(){setTimeout((function(){x()}),500)})),n(808),n(356),n(227),n(418),n(195),n(979),n(738),n(662),n(697),n(725),n(743)})()})(); \ No newline at end of file From f6e6d96b3db05c3c82db051dbcaa49bc9c2db62b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20D=C3=ADaz=20Soto?= Date: Mon, 4 Mar 2024 11:38:13 -0600 Subject: [PATCH 2/2] chore(shs-5504): add prettier config to match eslint --- docroot/themes/humsci/humsci_basic/.prettierrc | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 docroot/themes/humsci/humsci_basic/.prettierrc diff --git a/docroot/themes/humsci/humsci_basic/.prettierrc b/docroot/themes/humsci/humsci_basic/.prettierrc new file mode 100644 index 0000000000..dc75c8a808 --- /dev/null +++ b/docroot/themes/humsci/humsci_basic/.prettierrc @@ -0,0 +1,6 @@ +{ + "trailingComma": "all", + "tabWidth": 2, + "semi": true, + "singleQuote": true +}