1/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */ 2(()=>{"use strict";(()=>{(function(a){a.behaviors.bcjFeaturedContentTwoCol={attach(a){a.querySelectorAll(".featured-content-two-col").forEach((a)=>{if(a.dataset.featuredContentTwoColProcessed)return;a.dataset.featuredContentTwoColProcessed="true";const b=a.querySelectorAll(".featured-content-two-col__items > li .featured-item");if(!b.length)return;const c=new IntersectionObserver((a)=>{a.forEach((a)=>{.5<=a.intersectionRatio&&(a.target.classList.add("in-view"),c.unobserve(a.target));});},{root:null,threshold:.5});b.forEach((a)=>{c.observe(a);});});}};})(Drupal);})();(()=>{})();})();;; 3(()=>{"use strict";(()=>{Drupal.behaviors.bcjFeaturedTopics={attach(){const a=document.querySelectorAll(".featured-topics");a.forEach((a)=>{function b(){const b=a.offsetTop,c=a.offsetHeight,d=m.offsetHeight,e=window.innerHeight;return {scrollStart:b-e+d,scrollEnd:b+c-d,parentTop:b,parentHeight:c,stickyHeight:d};}function c(){const {scrollStart:a,scrollEnd:c}=b(),d=window.scrollY;return Math.min(Math.max(100*((d-a)/(c-a)),0),100);}function d(b){const c=a.offsetWidth-n.offsetWidth;n.style.transform=`translateX(${b/100*c}px)`;}function e(b){let c=0;const d=[20,20,20],e=(a,b,c)=>a+(b-a)*c;if(33>=b){const a=b/33;d[0]=e(60,20,a),d[1]=e(20,60,a);}else{const a=(b-33)/67;d[1]=e(60,20,a),d[2]=e(20,60,a);}o.forEach((a,b)=>{const e=a.querySelector(".featured-topic__heading");c=Math.max(c,e.scrollHeight);const f=(d[b]-20)/40,g=18+14*f;if(a.style.width=`${d[b]}%`,a.style.setProperty("--dynamic-opacity",f),a.style.setProperty("--dynamic-font-size",`${g}px`),a.classList.toggle("collapsed",30>=d[b]),b===o.length-1){const b=a.parentElement.offsetWidth,c=Math.max(0,a.offsetWidth-(.6*b-250)/32*g);e.style.setProperty("--dynamic-padding",`${c}px`);}}),a.dataset.jsTallestProcessed||(a.dataset.jsTallestProcessed=!0,a.style.setProperty("--tallest-heading",`${c}px`));}function f(){const a=c();d(a),e(a);}function g(a){const c=Array.from(a.parentElement.children).indexOf(a),d=[0,33,100][c]/100,{scrollStart:e,scrollEnd:f}=b();window.scrollTo({top:e+d*(f-e),behavior:"instant"});}function h(a){const b=a.target.closest(".featured-topic");b&&g(b);}function i(){o.forEach((a)=>{a.style.width="100%",a.classList.remove("collapsed");});}function j(){window.addEventListener("scroll",f),a.addEventListener("focusin",h),a.addEventListener("click",h),f();}function k(){window.removeEventListener("scroll",f),a.removeEventListener("focusin",h),a.removeEventListener("click",h),i();}function l(){const a=window.matchMedia("(min-width: 1050px)");a.matches?j():k();}if(a.dataset.jsProcessed)return;a.dataset.jsProcessed=!0;const m=a.querySelector(".featured-topics__inner"),n=a.querySelector(".featured-topics__progress"),o=a.querySelectorAll(".featured-topic");if(3<=o.length){let a;window.addEventListener("resize",()=>{clearTimeout(a),a=setTimeout(l,100);}),l();}else a.classList.add("disabled");});}};})();(()=>{})();})();;; 4(()=>{"use strict";(()=>{(function(a,b){"use strict";function c(a){return a.trim().split(/\s+/).filter(function(a){return 0<a.length&&!(8<a.length&&/[a-zA-Z]/.test(a)&&/[0-9]/.test(a));}).join(" ");}a.behaviors.bcjHeaderSearchToggle={attach:function(a){const b=a.querySelectorAll(".header-search:not([data-header-search-processed])");b.forEach(function(a){function b(){""===c.value.trim()?a.classList.remove("js-header-search-has-content"):a.classList.add("js-header-search-has-content");}a.setAttribute("data-header-search-processed","true");const c=a.querySelector(".header-search__input"),d=a.querySelector(".header-search__clear");c&&d&&(c.addEventListener("input",b),c.addEventListener("keyup",b),d.addEventListener("click",function(b){b.preventDefault(),c.value="",a.classList.remove("js-header-search-has-content"),c.focus();}),b());});}},a.behaviors.bcjHeaderSearchAutocomplete={attach:function(a){const d=a.querySelectorAll(".header-search:not([data-autocomplete-processed])");d.forEach(function(a){function d(a){const b=k.value.trim();o=b,n&&clearTimeout(n),""===b?f():n=setTimeout(function(){const a=c(b);""===a?f():e(a);},250);}function e(a){if(!b.bcj_search||!b.bcj_search.swiftype)return void console.warn("Swiftype settings not found");const c="https://search-api.swiftype.com/api/v1/public/engines/suggest.json?engine_key="+b.bcj_search.swiftype.engine_key+"&filters[page][langcode]="+b.path.currentLanguage+"&per_page=5&page=1&q="+encodeURIComponent(a);fetch(c,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}}).then((a)=>{if(!a.ok)throw new Error("Network response was not ok");return a.json();}).then((a)=>{g(a);}).catch((a)=>{console.error("Search error:",a),f();});}function f(){const a=m.querySelector(".header-search__autocomplete-results-list");m.classList.remove("header-search__autocomplete-results--visible");const b=a.querySelectorAll(".js-dynamic-result");b.forEach((a)=>a.remove());}
4function g(a){if(f(),!a.record_count||0===a.record_count)return;const b=m.querySelector(".header-search__autocomplete-results-list");a.records&&a.records.page&&a.records.page.forEach((a)=>{const c=h(a);c&&b.appendChild(c);}),i(),m.classList.add("header-search__autocomplete-results--visible");}function h(a){if(!a.title||!a.url)return null;const b=new DOMParser(),c=b.parseFromString(a.title,"text/html"),d=c.body.textContent||c.body.innerText||"",e=document.createElement("li");e.className="header-search__autocomplete-results-item js-dynamic-result",e.dataset.documentId=a.id;const f=document.createElement("a");return f.href=a.url,f.textContent=d,f.addEventListener("click",function(){j(a.id);}),e.appendChild(f),e;}function i(){const c=a.querySelector(".header-search__autocomplete-results-see-all");if(c&&o){const a=b.path.baseUrl+b.bcj_search.langprefix+"search/?q="+encodeURIComponent(o);c.href=a;}}function j(a){if(b.bcj_search&&b.bcj_search.swiftype){const c=new URLSearchParams({q:o,engine_key:b.bcj_search.swiftype.engine_key,doc_id:a});fetch("https://search-api.swiftype.com/api/v1/public/analytics/pas.json",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:c}).catch((a)=>{console.warn("Analytics tracking failed:",a);});}}a.setAttribute("data-autocomplete-processed","true");const k=a.querySelector(".header-search__input"),l=a.querySelector(".header-search__clear"),m=a.querySelector(".header-search__autocomplete-results");if(!k||!m||!l)return;let n=null,o="";a.addEventListener("submit",function d(a){a.preventDefault();const e=k.value.trim();if(""!==e){const a=c(e),d=b.path.baseUrl+b.bcj_search.langprefix+"search?q="+encodeURIComponent(a);window.location.href=d;}}),k.addEventListener("keyup",d),k.addEventListener("focus",function a(){""!==k.value.trim()&&0<m.children.length&&m.classList.add("header-search__autocomplete-results--visible");}),l.addEventListener("click",d),document.body.hasAttribute("data-bcj-search-outside-click-attached")||(document.body.setAttribute("data-bcj-search-outside-click-attached","true"),document.addEventListener("click",function b(a){document.querySelectorAll(".header-search").forEach((b)=>{if(!b.contains(a.target)){const a=b.querySelector(".header-search__autocomplete-results");a&&a.classList.remove("header-search__autocomplete-results--visible");}});}));});}};})(Drupal,drupalSettings);})();(()=>{})();})();;; 5(()=>{"use strict";(()=>{Drupal.behaviors.bcjKeyMessages={attach(a){a.querySelectorAll(".key-message__container").forEach((a)=>{if(a.dataset.keyMessagesProcessed)return;a.dataset.keyMessagesProcessed="true";const b=Array.from(a.querySelectorAll(".key-message__heading")),c=b.map((a)=>{const b=a.innerHTML.trim(),c=b.match(/^(.*?)<em[^>]*>(.*?)<\/em>(.*)$/i);if(!c)return {staticPrefix:`${b}<br>`,dynamic:"",staticSuffix:""};const [,d,e,f]=c;return {staticPrefix:`${d.trim()}<br>`,dynamic:e.trim(),staticSuffix:f.trim()};});if(1===c.length){const a=b[0];return /\<br\>/i.test(a.innerHTML)||(a.innerHTML=a.innerHTML.replace(/<em/i,"<br><em")),void a.classList.add("dynamic");}const d=b[0].tagName.toLowerCase(),e=document.createElement(d);e.className="key-message__heading dynamic",a.prepend(e);let f=0;(()=>{const a=c[0];e.innerHTML=`${a.staticPrefix}<span class="key-message__animator"><span class="key-message__anim-text">`+`<em>${a.dynamic}</em></span></span>${a.staticSuffix}`;})(),setInterval(()=>{const a=(f+1)%c.length,b=c[f],d=c[a];if(""===b.dynamic&&""===d.dynamic)e.innerHTML=`${d.staticPrefix}${d.staticSuffix}`;else{e.innerHTML=`${d.staticPrefix}<span class="key-message__animator"></span>${d.staticSuffix}`;const a=e.querySelector(".key-message__animator");if(b.dynamic){const c=document.createElement("span");c.className="key-message__anim-text anim-out",c.innerHTML=`<em>${b.dynamic}</em>`,a.appendChild(c);}if(d.dynamic){const b=document.createElement("span");b.className="key-message__anim-text anim-in",b.innerHTML=`<em>${d.dynamic}</em>`,a.appendChild(b),setTimeout(()=>{b.classList.remove("anim-in"),a.querySelectorAll(".anim-out").forEach((a)=>a.remove());},500);}}f=a;},5e3);});}};})();(()=>{})();})();;; 6(()=>{"use strict";(()=>{(function(a){"use strict";a.behaviors.bcjNewsletterSignUp={attach:function(a){a.querySelectorAll(".newsletter-signup-modal").forEach((a)=>{if(!a.dataset.bcjNewsletterSignUpProcessed){a.dataset.bcjNewsletterSignUpProcessed="true";const b=a.querySelector(".newsletter-signup-modal__close");b&&b.addEventListener("click",(b)=>{b.preventDefault(),a.close();}),document.addEventListener("keydown",(b)=>{"Escape"===b.key&&a.open&&a.close();});}}),a.querySelectorAll(".newsletter-signup-modal__subscribe-button").forEach((a)=>{a.addEventListener("click",(b)=>{b.preventDefault();let c=a.nextElementSibling;c&&"function"==typeof c.showModal?c.showModal():console.error("Modal not found or not supported");});});}};})(Drupal);})();(()=>{})();})();;; 7(()=>{"use strict";(()=>{(function(a){"use strict";a.behaviors.bcjSignupForm={attach:function(a){a.querySelectorAll(".sign-up-pardot-form").forEach((a)=>{if(a.dataset.bcjSignupFormProcessed)return;a.dataset.bcjSignupFormProcessed="true",a.id||(a.id="signup-form-"+Math.random().toString(36).slice(2,11));const b=a.querySelector("input[name=\"email\"]"),c=a.querySelector("input[name=\"zip\"]"),d=a.querySelector("input[name=\"firstname\"]"),e=a.querySelector("input[name=\"lastname\"]"),f=a.querySelector("button[type=\"submit\"], input[type=\"submit\"]"),g=a.querySelector("input[name=\"pardot_form_action\"]"),h=a.querySelector("input[name=\"pardot_extra_field\"]");if(!b||!c||!f||!g||!h)return;const i=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,j=/^\d{5}(-\d{4})?$/,k=(a)=>{const b=a.trim();if(!b)return !1;const c=/[A-Z]/.test(b),d=/[a-z]/.test(b);return c&&d&&2<(b.match(/[A-Z]/g)||[]).length;},l=(b,c)=>{const d=a.querySelector("[data-error-for=\""+b.name+"\"]");if(d)return d;if(!c)return null;const e=document.createElement("span");return e.className="sign-up-pardot-form__error",e.setAttribute("data-error-for",b.name),e.id=a.id+"-"+b.name+"-error",e.setAttribute("role","alert"),e.setAttribute("aria-live","polite"),b.parentNode.appendChild(e),e;},m=(a,b)=>{const c=l(a,!0);c.textContent=b,c.classList.add("is-visible"),a.setAttribute("aria-invalid","true"),a.setAttribute("aria-describedby",c.id),a.classList.add("js-bcj-signup-is-invalid"),a.classList.remove("js-bcj-signup-is-valid");},n=(a)=>{const b=l(a,!1);b&&b.classList.remove("is-visible"),a.setAttribute("aria-invalid","false"),a.removeAttribute("aria-describedby"),a.classList.remove("js-bcj-signup-is-invalid"),a.value.trim()?a.classList.add("js-bcj-signup-is-valid"):a.classList.remove("js-bcj-signup-is-valid");},o=(a)=>{const b=a.value.trim();switch(a.name){case "email":return b?i.test(b)?(n(a),!0):(m(a,"Please enter a valid email address"),!1):(m(a,"Please enter a valid email address"),!1);case "zip":return b?j.test(b)?(n(a),!0):(m(a,"Please enter a valid 5-digit ZIP code"),!1):(m(a,"Please enter a valid 5-digit ZIP code"),!1);case "firstname":case "lastname":if(b&&k(b)){const b="firstname"===a.name?"f
7irst":"last";return m(a,"Please enter a valid "+b+" name"),!1;}return n(a),!0;default:return !0;}},p=()=>{const a=o(b),g=o(c),i=!d||o(d),j=!e||o(e),k=""===h.value.trim(),l=a&&g&&i&&j&&k;return f.classList.toggle("js-bcj-signup-is-disabled",!l),l;};[b,c,d,e].forEach((a)=>{a&&(a.addEventListener("blur",()=>o(a)),a.addEventListener("input",()=>{l(a,!1)&&o(a);}));});const q=(b)=>{if(b.preventDefault(),!!p()){const b=g.value;return b?void (a.action=b,a.removeEventListener("submit",q),a.submit()):void console.error("Form action URL not found");}};a.addEventListener("submit",q);});}};})(Drupal);})();(()=>{})();})();;; 8(()=>{"use strict";(()=>{(function(a){"use strict";a.behaviors.bcjSiteHeaderMobileMenuToggle={attach(b){b.querySelectorAll(".site-header").forEach((b)=>{function c(){g.classList.add("is-open"),i.classList.add("is-open"),j.classList.add("is-open"),h.setAttribute("aria-expanded","true"),h.textContent=a.t("Close"),document.body.style.overflow="hidden";}function d(){g.classList.remove("is-open"),i.classList.remove("is-open"),j.classList.remove("is-open"),h.setAttribute("aria-expanded","false"),h.textContent=a.t("Menu"),document.body.style.overflow="";}function f(){const a="true"===h.getAttribute("aria-expanded");!a?c():d();}if(b.dataset.siteHeaderProcessed)return;b.dataset.siteHeaderProcessed="true";const g=b.querySelector(".site-header__top--mobile"),h=b.querySelector(".site-header__menu-button--mobile"),i=b.querySelector(".site-header__main--mobile"),j=b.querySelector(".site-header__overlay--mobile");h&&i&&j&&g&&(h.addEventListener("click",(a)=>{a.preventDefault(),f();}),j.addEventListener("click",()=>{d();}),document.addEventListener("click",(a)=>{b.contains(a.target)||d();}),document.addEventListener("keydown",(a)=>{"Escape"===a.key&&d();}),window.addEventListener("resize",()=>{setTimeout(()=>{const a=h.getBoundingClientRect(),b=i.getBoundingClientRect(),c=0===a.width&&0===a.height||0===b.width&&0===b.height||"none"===window.getComputedStyle(h).display||"none"===window.getComputedStyle(i).display;c&&(g.classList.contains("is-open")||i.classList.contains("is-open")||j.classList.contains("is-open"))&&d();},50);}));});}},a.behaviors.bcjSiteHeaderSticky={attach(a){a.querySelectorAll(".site-header[data-site-header-sticky=\"true\"]").forEach((a)=>{function b(){const b=window.pageYOffset||document.documentElement.scrollTop,c=window.innerHeight,i=1.5*c,m=b>j?"down":"up";"up"===m&&"down"===k?l=0:"up"===m?l+=j-b:l=0,j=b,k=m;const n=b>i&&"up"===k&&20<l&&b>e,o=2*d,p=e+o;!n||f||g?f&&!g&&b<=p?(g=!0,a.classList.add("site-header-js-is-hiding"),h=setTimeout(()=>{a.classList.remove("site-header-js-is-sticky","site-header-js-is-hiding"),document.body.style.paddingTop="",f=!1,g=!1,h=null;},200)):g&&n&&b>p&&(clearTimeout(h),h=null,a.classList.remove("site-header-js-is-hiding"),g=!1):(h&&(clearTimeout(h),h=null,a.classList.remove("site-header-js-is-hiding")),a.classList.add("site-header-js-is-sticky"),document.body.style.paddingTop=`${d}px`,f=!0);}function c(){if(m){const b=window.matchMedia("(max-width: 1080px)").matches,c=document.querySelector(".user-logged-in"),d=document.querySelector(".top-bar");if(m.classList.contains("stuck")&&f)m.style.top=`${a.getBoundingClientRect().height}px`;else{const a=c?d?.getBoundingClientRect().height:0;m.style.top=b?"0":`${a}px`;}}}if(a.dataset.siteHeaderStickyProcessed)return;a.dataset.siteHeaderStickyProcessed="true";let d=a.offsetHeight,e=a.offsetTop,f=!1,g=!1,h=null,i=!1,j=0,k="down",l=0;const m=document.querySelector(".in-page-nav__inside1");window.addEventListener("scroll",function a(){i||(requestAnimationFrame(()=>{b(),i=!1;}),i=!0),c();},{passive:!0}),window.addEventListener("resize",function i(){h&&(clearTimeout(h),h=null),d=a.offsetHeight,e=a.offsetTop,j=window.pageYOffset||document.documentElement.scrollTop,l=0,g=!1,a.classList.remove("site-header-js-is-hiding"),f&&(document.body.style.paddingTop=`${d}px`),b(),c();}),b();});}},a.behaviors.moveHeaderActions={attach(a){once("move-header-actions","[data-actions-container]",a).forEach((a)=>{function b(b){b.matches&&c?c.appendChild(a):!b.matches&&d&&d.appendChild(a);}const c=document.querySelector("[data-actions-mobile-placeholder]"),d=a.parentElement,e=window.matchMedia("(max-width: 1023px)");b(e),e.addEventListener("change",b);});}},a.behaviors.bcjMidtermsMenuHighlight={attach(a){function b(b){const c=a.querySelectorAll(".site-menu-desktop a, .site-menu-mobile a, .menu--main a");
8c.forEach((a)=>{/(Midterms 2026|Elecciones 2026|Elecciones Intermedias 2026)/i.test(a.textContent.trim())&&(a.style.color=b.matches?"#e7131a":"");});}const c=window.matchMedia("(min-width: 1024px)");c.addEventListener("change",b),b(c);}};})(Drupal);})();(()=>{})();})();;; 9(()=>{"use strict";(()=>{(function(a){"use strict";a.behaviors.bcjSiteMenuDesktopToggle={attach(a){a.querySelectorAll(".site-menu-desktop__menu-item-toggle").forEach((a)=>{a.dataset.bcjSiteMenuToggleProcessed||(a.dataset.bcjSiteMenuToggleProcessed="true",a.addEventListener("click",(b)=>{b.preventDefault();const c=a.closest(".site-menu-desktop__menu-item"),d=c?c.querySelector(".site-menu-desktop__sub-menu"):null,e=c?c.querySelector("a"):null,f="true"===a.getAttribute("aria-expanded"),g=!f;if(g){const a=c.parentElement,b=a.querySelectorAll(":scope > .site-menu-desktop__menu-item");b.forEach((a)=>{if(a!==c){const b=a.querySelector(".site-menu-desktop__menu-item-toggle"),c=a.querySelector(".site-menu-desktop__sub-menu"),d=a.querySelector("a");b&&b.setAttribute("aria-expanded","false"),c&&c.classList.remove("expanded"),d&&d.classList.remove("submenu-active");}});}a.setAttribute("aria-expanded",g),d&&d.classList.contains("site-menu-desktop__sub-menu")&&(g?(d.classList.add("expanded"),e&&e.classList.add("submenu-active")):(d.classList.remove("expanded"),e&&e.classList.remove("submenu-active")));}));}),document.addEventListener("keydown",(b)=>{"Escape"===b.key&&a.querySelectorAll(".site-menu-desktop__sub-menu.expanded").forEach((a)=>{const b=a.closest(".site-menu-desktop__menu-item"),c=b?b.querySelector(".site-menu-desktop__menu-item-toggle"):null,d=b?b.querySelector("a"):null;c&&c.setAttribute("aria-expanded","false"),d&&d.classList.remove("submenu-active"),a.classList.remove("expanded");});});}},a.behaviors.bcjSiteMenuDesktopHover={attach(a){a.querySelectorAll(".site-menu-desktop__menu-item--level-0").forEach((a)=>{if(a.dataset.bcjSiteMenuHoverProcessed)return;a.dataset.bcjSiteMenuHoverProcessed="true";const b=a.querySelector(".site-menu-desktop__menu-item-toggle"),c=a.querySelector(".site-menu-desktop__sub-menu"),d=a.querySelector("a");if(b&&c){a.addEventListener("mouseenter",()=>{const e=a.parentElement,f=e.querySelectorAll(":scope > .site-menu-desktop__menu-item--level-0");f.forEach((b)=>{if(b!==a){const a=b.querySelector(".site-menu-desktop__menu-item-toggle"),c=b.querySelector(".site-menu-desktop__sub-menu"),d=b.querySelector("a");a&&a.setAttribute("aria-expanded","false"),c&&c.classList.remove("expanded"),d&&d.classList.remove("submenu-active");}}),b.setAttribute("aria-expanded","true"),c.classList.add("expanded"),d&&d.classList.add("submenu-active");}),a.addEventListener("mouseleave",()=>{b.setAttribute("aria-expanded","false"),c.classList.remove("expanded"),d&&d.classList.remove("submenu-active");});const e=a.querySelector(".site-menu-desktop__menu-item-inner");e&&(e.addEventListener("focusin",()=>{d&&d.classList.add("submenu-active");}),e.addEventListener("focusout",(b)=>{!a.contains(b.relatedTarget)&&d&&d.classList.remove("submenu-active");})),c&&c.addEventListener("focusout",(a)=>{!c.contains(a.relatedTarget)&&c.classList.contains("expanded")&&(b.setAttribute("aria-expanded","false"),c.classList.remove("expanded"),d&&d.classList.remove("submenu-active"));});}});}};})(Drupal);})();(()=>{})();})();;; 10(()=>{"use strict";(()=>{(function(a){"use strict";a.behaviors.bcjSiteMenuMobileToggle={attach(a){a.querySelectorAll(".site-menu-mobile__menu-item-toggle").forEach((a)=>{a.dataset.bcjSiteMenuToggleProcessed||(a.dataset.bcjSiteMenuToggleProcessed="true",a.addEventListener("click",(b)=>{b.preventDefault();const c=a.closest(".site-menu-mobile__menu-item"),d=c?c.querySelector(".site-menu-mobile__sub-menu"):null,e="true"===a.getAttribute("aria-expanded"),f=!e;if(f){const a=c.parentElement,b=a.querySelectorAll(":scope > .site-menu-mobile__menu-item");b.forEach((a)=>{if(a!==c){const b=a.querySelector(".site-menu-mobile__menu-item-toggle"),c=a.querySelector(".site-menu-mobile__sub-menu");b&&b.setAttribute("aria-expanded","false"),c&&c.classList.remove("expanded");}});}a.setAttribute("aria-expanded",f),d&&d.classList.contains("site-menu-mobile__sub-menu")&&(f?d.classList.add("expanded"):d.classList.remove("expanded"));}));});}};})(Drupal);})();(()=>{})();})();;; 11(()=>{"use strict";(()=>{function pauseOtherVideos(a){const b=document.querySelectorAll(".vertical-video__video");b.forEach((b)=>{if(b!==a){const a=b.querySelector("video");if(a&&!a.paused)try{a.pause();}catch(a){}const c=b.querySelector("iframe");
11if(c&&c.contentWindow){const a=c.getAttribute("src")||"";try{/youtube\.com|youtu\.be/.test(a)?c.contentWindow.postMessage(JSON.stringify({event:"command",func:"pauseVideo",args:[]}),"*"):/vimeo\.com/.test(a)&&c.contentWindow.postMessage(JSON.stringify({method:"pause"}),"*");}catch(a){}}delete b.parentElement.dataset.playing;}});}const parseYouTubeId=(a)=>{if(!a)return null;const b=a.match(/\/shorts\/([\w-]{11})(?=[?#\/&]|$)/);if(b)return b[1];const c=a.match(/[?&]v=([\w-]{11})/);if(c)return c[1];const d=a.match(/youtube\.com\/embed\/([\w-]{11})/);return d?d[1]:null;},parseVimeoId=(a)=>{if(!a)return null;const b=a.match(/vimeo\.com\/(?:video\/)?(\d+)/);return b?b[1]:null;},youTubePlayers=new Map(),vimeoPlayers=new Map(),playerStates=new WeakMap(),getYouTubeThumbnails=(a)=>a?[`https://i.ytimg.com/vi/${a}/maxresdefault.jpg`,`https://img.youtube.com/vi/${a}/hqdefault.jpg`]:[],getVimeoThumbnails=(a)=>a?[`https://vumbnail.com/${a}_max.jpg`,`https://vumbnail.com/${a}_large.jpg`,`https://vumbnail.com/${a}.jpg`]:[];function resolveThumbnail(a,b){const c=a&&a.length?a:b?[b]:[];return c.length?new Promise((a)=>{let d=0;const e=()=>{if(d>=c.length)return void a(b||null);const f=c[d],g=new Image();g.onload=()=>a(f),g.onerror=()=>{d+=1,e();},g.src=f;};e();}):Promise.resolve(b||null);}function markPlayerReady(a,b){return a.ready?void (a.player=a.player||b):void (a.ready=!0,a.player=b,a.queue.forEach((a)=>{try{a(b);}catch(a){}}),a.queue=[]);}function queuePlayerAction(a,b){a.ready&&a.player?b(a.player):a.queue.push(b);}Drupal.behaviors.bcjVerticalVideo={attach(){const a=document.querySelectorAll(".vertical-video__video");a.forEach((a)=>{if(a.dataset.jsProcessed)return;a.dataset.jsProcessed=!0;const b=a.getAttribute("data-full")||"",c=a.parentElement.querySelector(".vertical-video__muted-button"),d=a.querySelector(".vertical-video__thumbnail"),e=parseYouTubeId(b),f=parseVimeoId(b);if(!e&&!f)return;const g={container:a,overlay:d,muteButton:c,wrapper:a.parentElement,provider:e?"youtube":"vimeo",iframe:null,player:null,ready:!1,queue:[],inFullMode:!1,ended:!1};playerStates.set(a,g);const h=(a)=>{if(c){const b=c.querySelector(".vertical-video__muted-text");b&&(b.textContent=a?"Play Audio":"Mute Audio");}},i=e?getYouTubeThumbnails(e):getVimeoThumbnails(f),j=i[i.length-1];j&&d&&d.style.setProperty("--vertical-video-thumbnail",`url("${j}")`),resolveThumbnail(i,j).then((a)=>{a&&d&&d.style.setProperty("--vertical-video-thumbnail",`url("${a}")`);});const k=()=>{d&&d.classList.remove("is-hidden"),a.classList.remove("is-active");},l=()=>{d&&d.classList.add("is-hidden"),a.classList.add("is-active");},m=(a)=>{c&&(a?c.classList.add("visible"):c.classList.remove("visible"));},n=(a)=>{g.inFullMode&&(a?g.wrapper.dataset.playing="true":delete g.wrapper.dataset.playing);},o=(a)=>`https://www.youtube.com/embed/${a}?autoplay=0&playsinline=1&enablejsapi=1&rel=0&controls=0&modestbranding=1&showinfo=0&origin=${location.origin}`,p=(a)=>`https://player.vimeo.com/video/${a}?autoplay=0&title=0&byline=0&portrait=0&controls=0&dnt=1&api=1&background=0`,q=()=>{if(g.iframe)return g.iframe;const b=document.createElement("iframe");if(b.setAttribute("title","Video player"),b.setAttribute("frameborder","0"),b.setAttribute("loading","lazy"),b.setAttribute("allow","autoplay; fullscreen; picture-in-picture; web-share"),b.setAttribute("allowfullscreen",""),b.src=e?o(e):p(f),a.dataset.videoProvider=e?"youtube":"vimeo",a.appendChild(b),g.iframe=b,e){const c=()=>{if(!window.YT||!YT.Player)return void setTimeout(c,100);const d=new YT.Player(b,{events:{onReady:(a)=>{const b=a.target;try{b.mute();}catch(a){}h(!0),markPlayerReady(g,b);},onStateChange:(b)=>{b.data===YT.PlayerState.PLAYING?(n(!0),a.classList.remove("ended"),g.ended=!1):b.data===YT.PlayerState.PAUSED?n(!1):b.data===YT.PlayerState.ENDED&&(n(!1),k(),a.classList.add("ended"),g.ended=!0);}}});youTubePlayers.set(a,d);};c();}else{if(f){const c=()=>{if(!window.Vimeo||!window.Vimeo.Player)return void setTimeout(c,100);const d=new window.Vimeo.Player(b);d.ready().then(()=>{d.setVolume(0).catch(()=>{}),h(!0),markPlayerReady(g,d);}).catch(()=>{}),d.on("play",()=>n(!0)),d.on("pause",()=>n(!1)),vimeoPlayers.set(a,d);};c();}}return b;},r=()=>!g.inFullMode&&(g.ended=!1,g.inFullMode=!0,a.classList.remove("ended"),pauseOtherVideos(a),q(),l(),m(!0),queuePlayerAction(g,(a)=>{if("youtube"===g.provider){try{a.unMute();}catch(a){}try{a.seekTo(0,!0);}catch(a){}h(!1),a.playVideo(),n(!0);}else a.setVolume(1).catch(()=>{}),a.setCurrentTime(0).catch(()=>{}),h(!1),a.play().then(()=>{n(!0);}).catch(()=>{n(!0);}),n(!0);}),!0),s=()=>
11{if(!g.inFullMode){const a=r();if(a)return;}queuePlayerAction(g,(a)=>{if("youtube"===g.provider){const b=a.getPlayerState();b===YT.PlayerState.PLAYING?a.pauseVideo():a.playVideo();}else a.getPaused().then((b)=>{b?a.play():a.pause();});});},t=()=>{a.classList.remove("ended"),g.ended=!1,s(),l();},u=(a)=>{a.stopPropagation(),a.preventDefault(),g.ended?t():s();};a.addEventListener("click",u),a.addEventListener("mouseenter",()=>{g.inFullMode||g.ended||(q(),l(),queuePlayerAction(g,(a)=>{if("youtube"===g.provider){try{a.mute();}catch(a){}a.playVideo(),h(!0);}else a.setVolume(0).then(()=>a.play()).catch(()=>a.play()),h(!0);}));}),a.addEventListener("mouseleave",()=>{g.inFullMode||g.ended||(queuePlayerAction(g,(a)=>{"youtube"===g.provider?(a.pauseVideo(),a.seekTo(0,!0)):(a.pause().catch(()=>{}),a.setCurrentTime(0).catch(()=>{}));}),k());}),a.addEventListener("keydown",(a)=>{const b=" "===a.key||"Space"===a.code,c="Enter"===a.key;(c||b)&&u(a);}),c&&c.addEventListener("click",(a)=>{a.stopPropagation(),a.preventDefault();g.inFullMode&&queuePlayerAction(g,(a)=>{"youtube"===g.provider?a.isMuted()?(a.unMute(),h(!1)):(a.mute(),h(!0)):a.getVolume().then((b)=>{const c=b&&0<b?0:1;a.setVolume(c).then(()=>{h(0==c);}).catch(()=>{});}).catch(()=>{});});}),m(!1),k(),a.setAttribute("tabindex","0"),a.setAttribute("role","button"),q();});}};})();(()=>{})();})();;; 12(function(Drupal,drupalSettings){'use strict';Drupal.behaviors.easyResponsiveImages={attach:function(context){const images=context.querySelectorAll('img[data-srcset]');if(!images||images.length===0)return;const updateImage=function(image){if(image.hasAttribute('data-loading')){setTimeout(function(){updateImage(image);},100);return;}let multiplier=1;const dataMultiplier=image.getAttribute('data-multiplier');if(dataMultiplier!==null)multiplier=parseFloat(dataMultiplier.replace('x',''));const multiplierMax=multiplier>=1?multiplier:1;const multiplierFactor=window.devicePixelRatio<multiplierMax?window.devicePixelRatio:multiplierMax;const cover=image.hasAttribute('data-cover');const imgWidth=Math.floor(image.clientWidth);const imgHeight=Math.floor(image.clientHeight);const parentWidth=Math.floor(image.parentNode.clientWidth);const parentHeight=Math.floor(image.parentNode.clientHeight);const availableWidth=parentWidth>imgWidth?parentWidth:imgWidth;const availableHeight=parentHeight>imgHeight?parentHeight:imgHeight;const targetWidth=multiplierFactor*availableWidth;const targetHeight=multiplierFactor*availableHeight;const attrWidth=image.getAttribute('width');const attrHeight=image.getAttribute('height');const sources=image.getAttribute('data-srcset').split(',');const currentSrc=image.getAttribute('src');let ratioWidth,ratioHeight;if(image.hasAttribute('data-ratio'))[ratioWidth,ratioHeight]=image.getAttribute('data-ratio').split(':');if(image.src&&attrWidth&&attrWidth>availableWidth&&attrHeight&&attrHeight>availableHeight){image.setAttribute('data-loaded',1);return;}let source,responsiveImgPath,responsiveImgWidth,responsiveImgHeight;for(source of sources){let array=source.split(' ');responsiveImgPath=array[0];responsiveImgWidth=array[1].slice(0,-1);if(cover&&parentWidth&&parentHeight)responsiveImgHeight=(responsiveImgWidth*parentWidth)/parentHeight;else if(ratioWidth&&ratioHeight)responsiveImgHeight=(responsiveImgWidth*ratioHeight)/ratioWidth;else{if(attrWidth&&attrHeight)responsiveImgHeight=(responsiveImgWidth*attrHeight)/attrWidth;}if(targetWidth<responsiveImgWidth&&(!cover||!responsiveImgHeight||targetHeight<responsiveImgHeight))break;}if(responsiveImgPath===currentSrc){image.setAttribute('data-loaded',1);return;}image.setAttribute('data-loading',1);image.src=responsiveImgPath;image.setAttribute('width',availableWidth);if(cover&&parentWidth&&parentHeight)image.setAttribute('height',Math.round((availableWidth*parentHeight)/parentWidth));else if(ratioWidth&&ratioHeight)image.setAttribute('height',Math.round((availableWidth*ratioHeight)/ratioWidth));else{if(attrWidth&&attrHeight)image.setAttribute('height',Math.round((availableWidth*attrHeight)/attrWidth));}image.onload=function(){this.setAttribute('data-loaded',1);image.removeAttribute('data-loading');if(cover||!ratioWidth||!ratioHeight){this.setAttribute('width',Math.floor(this.width));this.setAttribute('height',Math.floor(this.height));}};};const resizeObserver=new ResizeObserver((entries)=>
12{for(let entry of entries){const images=entry.target.querySelectorAll('img[data-srcset]');images.forEach((image)=>{updateImage(image);});}});let lazyLoadingThreshold=1250;if(drupalSettings?.easyResponsiveImages?.lazyLoadingThreshold)lazyLoadingThreshold=parseInt(drupalSettings.easyResponsiveImages.lazyLoadingThreshold);const connection=navigator.connection;const connectionType=connection?.effectiveType;const connectionSaveData=connection?.saveData;if(connectionType==="3G"||connectionSaveData)lazyLoadingThreshold=lazyLoadingThreshold*2;const intersectionObserver=new IntersectionObserver((entries)=>{for(let entry of entries)if(entry.isIntersecting){intersectionObserver.unobserve(entry.target);updateImage(entry.target);resizeObserver.observe(entry.target.parentNode);}},{rootMargin:lazyLoadingThreshold+'px'});images.forEach((image)=>{if(image.hasAttribute('data-observed'))return;image.setAttribute('data-observed','1');if(image.hasAttribute('loading')&&image.getAttribute('loading')==='lazy'){image.removeAttribute('src');intersectionObserver.observe(image);}else{updateImage(image);resizeObserver.observe(image.parentNode);}});}};})(Drupal,drupalSettings);; 13Drupal.behaviors.footnotesGroup={attach(context){const footnotesGroup=context.querySelector('#footnotes_group');if(footnotesGroup){const footnotes=context.querySelectorAll('.js-footnotes:not(#footnotes_group) .js-footnote-reference');if(footnotes.length>0){footnotes.forEach((footnote)=>footnotesGroup.appendChild(footnote));const allFootnoteLists=context.querySelectorAll('.js-footnotes');allFootnoteLists.forEach((list)=>{if(list.id!=='footnotes_group')list.remove();});}const autoNumberedFootnotes=document.querySelectorAll('.js-footnote-reference');let counter=1;autoNumberedFootnotes.forEach((footnote)=>{if(footnote.classList.contains('is-multiple')){let subCounter='a';footnote.querySelectorAll('.js-is-auto').forEach((anchor)=>{anchor.textContent=counter+subCounter;subCounter=String.fromCharCode(subCounter.charCodeAt(0)+1);});}else{const isAuto=footnote.querySelector('.js-is-auto');if(isAuto!==null)isAuto.textContent=counter;}counter+=1;});if(footnotesGroup.querySelectorAll('.js-footnote-reference').length>0)footnotesGroup.style.display='block';else footnotesGroup.style.display='none';}}};; 14(function($,Drupal){Drupal.theme.progressBar=function(id){const escapedId=Drupal.checkPlain(id);return (`<div id="${escapedId}" class="progress" aria-live="polite">`+'<div class="progress__label"> </div>'+'<div class="progress__track"><div class="progress__bar"></div></div>'+'<div class="progress__percentage"></div>'+'<div class="progress__description"> </div>'+'</div>');};Drupal.ProgressBar=function(id,updateCallback,method,errorCallback){this.id=id;this.method=method||'GET';this.updateCallback=updateCallback;this.errorCallback=errorCallback;this.element=$(Drupal.theme('progressBar',id));};$.extend(Drupal.ProgressBar.prototype,{setProgress(percentage,message,label){if(percentage>=0&&percentage<=100){$(this.element).find('div.progress__bar').each(function(){this.style.width=`${percentage}%`;});$(this.element).find('div.progress__percentage').html(`${percentage}%`);}$('div.progress__description',this.element).html(message);$('div.progress__label',this.element).html(label);if(this.updateCallback)this.updateCallback(percentage,message,this);},startMonitoring(uri,delay){this.delay=delay;this.uri=uri;this.sendPing();},stopMonitoring(){clearTimeout(this.timer);this.uri=null;},sendPing(){if(this.timer)clearTimeout(this.timer);if(this.uri){const pb=this;let uri=this.uri;if(!uri.includes('?'))uri+='?';else uri+='&';uri+='_format=json';$.ajax({type:this.method,url:uri,data:'',dataType:'json',success(progress){if(progress.status===0){pb.displayError(progress.data);return;}pb.setProgress(progress.percentage,progress.message,progress.label);pb.timer=setTimeout(()=>{pb.sendPing();},pb.delay);},error(xmlhttp){const e=new Drupal.AjaxError(xmlhttp,pb.uri);pb.displayError(`<pre>${e.message}</pre>`);}});}},displayError(string){const error=$('<div class="messages messages--error"></div>').html(string);$(this.element).before(error).hide();if(this.errorCallback)this.errorCallback(this);}});})(jQuery,Drupal);; 15/* @license MIT https://raw.githubusercontent.com/muicss/loadjs/4.3.0/LICENSE.txt */ 16loadjs=function(){var h=function(){},o={},c={},f={};function u(e,n){if(e){var t=f[e];if(c[e]=n,t)for(;t.length;)t[0](e,n),t.splice(0,1)}}function l(e,n){e.call&&(e={success:e}),n.length?(e.error||h)(n):(e.success||h)(e)}function p(t,r,i,s){var o,e,u,n=document,c=i.async,f=(i.numRetries||0)+1,l=i.before||h,a=t.replace(/[\?|#].*$/,""),d=t.replace(/^(css|img|module|nomodule)!/,"");if(s=s||0,/(^css!|\.css$)/.test(a))(u=n.createElement("link")).rel="stylesheet",u.href=d,(o="hideFocus"in u)&&u.relList&&(o=0,u.rel="preload",u.as="style");else if(/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(a))(u=n.createElement("img")).src=d;else if((u=n.createElement("script")).src=d,u.async=void 0===c||c,e="noModule"in u,/^module!/.test(a)){if(!e)return r(t,"l");u.type="module"}else if(/^nomodule!/.test(a)&&e)return r(t,"l");!(u.onload=u.onerror=u.onbeforeload=function(e){var n=e.type[0];if(o)try{u.sheet.cssText.length||(n="e")}catch(e){18!=e.code&&(n="e")}if("e"==n){if((s+=1)<f)return p(t,r,i,s)}else if("preload"==u.rel&&"style"==u.as)return u.rel="stylesheet";r(t,n,e.defaultPrevented)})!==l(t,u)&&n.head.appendChild(u)}function t(e,n,t){var r,i;if(n&&n.trim&&(r=n),i=(r?t:n)||{},r){if(r in o)throw"LoadJS";o[r]=!0}
16function s(n,t){!function(e,r,n){var t,i,s=(e=e.push?e:[e]).length,o=s,u=[];for(t=function(e,n,t){if("e"==n&&u.push(e),"b"==n){if(!t)return;u.push(e)}--s||r(u)},i=0;i<o;i++)p(e[i],t,n)}(e,function(e){l(i,e),n&&l({success:n,error:t},e),u(r,e)},i)}if(i.returnPromise)return new Promise(s);s()}return t.ready=function(e,n){return function(e,t){e=e.push?e:[e];var n,r,i,s=[],o=e.length,u=o;for(n=function(e,n){n.length&&s.push(e),--u||t(s)};o--;)r=e[o],(i=c[r])?n(r,i):(f[r]=f[r]||[]).push(n)}(e,function(e){l(n,e)}),t},t.done=function(e){u(e,[])},t.reset=function(){o={},c={},f={}},t.isDefined=function(e){return e in o},t}();; 17/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */ 18Drupal.debounce=function(func,wait,immediate){let timeout;let result;return function(...args){const context=this;const later=function(){timeout=null;if(!immediate)result=func.apply(context,args);};const callNow=immediate&&!timeout;clearTimeout(timeout);timeout=setTimeout(later,wait);if(callNow)result=func.apply(context,args);return result;};};; 19(function(Drupal,debounce){let liveElement;const announcements=[];Drupal.behaviors.drupalAnnounce={attach(context){if(!liveElement){liveElement=document.createElement('div');liveElement.id='drupal-live-announce';liveElement.className='visually-hidden';liveElement.setAttribute('aria-live','polite');liveElement.setAttribute('aria-busy','false');document.body.appendChild(liveElement);}}};function announce(){const text=[];let priority='polite';let announcement;const il=announcements.length;for(let i=0;i<il;i++){announcement=announcements.pop();text.unshift(announcement.text);if(announcement.priority==='assertive')priority='assertive';}if(text.length){liveElement.innerHTML='';liveElement.setAttribute('aria-busy','true');liveElement.setAttribute('aria-live',priority);liveElement.innerHTML=text.join('\n');liveElement.setAttribute('aria-busy','false');}}Drupal.announce=function(text,priority){announcements.push({text,priority});return debounce(announce,200)();};})(Drupal,Drupal.debounce);; 20((Drupal)=>{Drupal.Message=class{constructor(messageWrapper=null){if(!messageWrapper)this.messageWrapper=Drupal.Message.defaultWrapper();else this.messageWrapper=messageWrapper;}static defaultWrapper(){let wrapper=document.querySelector('[data-drupal-messages]')||document.querySelector('[data-drupal-messages-fallback]');if(!wrapper){wrapper=document.createElement('div');document.body.appendChild(wrapper);}if(wrapper.hasAttribute('data-drupal-messages-fallback')){wrapper.removeAttribute('data-drupal-messages-fallback');wrapper.classList.remove('hidden');}wrapper.setAttribute('data-drupal-messages','');return wrapper.innerHTML===''?Drupal.Message.messageInternalWrapper(wrapper):wrapper.firstElementChild;}static getMessageTypeLabels(){return {status:Drupal.t('Status message'),error:Drupal.t('Error message'),warning:Drupal.t('Warning message')};}add(message,options={}){if(!options.hasOwnProperty('type'))options.type='status';if(typeof message!=='string')throw new Error('Message must be a string.');Drupal.Message.announce(message,options);options.id=options.id?String(options.id):`${options.type}-${Math.random().toFixed(15).replace('0.','')}`;if(!Drupal.Message.getMessageTypeLabels().hasOwnProperty(options.type)){const {type}=options;throw new Error(`The message type, ${type}, is not present in Drupal.Message.getMessageTypeLabels().`);}this.messageWrapper.appendChild(Drupal.theme('message',{text:message},options));return options.id;}select(id){return this.messageWrapper.querySelector(`[data-drupal-message-id^="${id}"]`);}remove(id){return this.messageWrapper.removeChild(this.select(id));}clear(){this.messageWrapper.querySelectorAll('[data-drupal-message-id]').forEach((message)=>{this.messageWrapper.removeChild(message);});}static announce(message,options){if(!options.priority&&(options.type==='warning'||options.type==='error'))options.priority='assertive';if(options.announce!=='')Drupal.announce(options.announce||message,options.priority);}static messageInternalWrapper(messageWrapper){const innerWrapper=document.createElement('div');innerWrapper.setAttribute('class','messages__wrapper');messageWrapper.insertAdjacentElement('afterbegin',innerWrapper);return innerWrapper;}};Drupal.theme.message=({text},{type,id})=>
20{const messagesTypes=Drupal.Message.getMessageTypeLabels();const messageWrapper=document.createElement('div');messageWrapper.setAttribute('class',`messages messages--${type}`);messageWrapper.setAttribute('role',type==='error'||type==='warning'?'alert':'status');messageWrapper.setAttribute('data-drupal-message-id',id);messageWrapper.setAttribute('data-drupal-message-type',type);messageWrapper.setAttribute('aria-label',messagesTypes[type]);messageWrapper.innerHTML=`${text}`;return messageWrapper;};})(Drupal);; 21((Drupal)=>{Drupal.theme.ajaxProgressIndicatorFullscreen=()=>'<div class="ajax-progress ajax-progress--fullscreen"><div class="ajax-progress__throbber ajax-progress__throbber--fullscreen"> </div></div>';Drupal.theme.ajaxProgressThrobber=(message)=>{const messageMarkup=typeof message==='string'?Drupal.theme('ajaxProgressMessage',message):'';const throbber='<div class="ajax-progress__throbber"> </div>';return `<div class="ajax-progress ajax-progress--throbber">${throbber}${messageMarkup}</div>`;};Drupal.theme.ajaxProgressMessage=(message)=>`<div class="ajax-progress__message">${message}</div>`;})(Drupal);; 22(function($,window,Drupal,drupalSettings,loadjs,{isFocusable,tabbable}){Drupal.behaviors.AJAX={attach(context,settings){function loadAjaxBehavior(base){const elementSettings=settings.ajax[base];if(typeof elementSettings.selector==='undefined')elementSettings.selector=`#${base}`;once('drupal-ajax',$(elementSettings.selector)).forEach((el)=>{elementSettings.element=el;elementSettings.base=base;Drupal.ajax(elementSettings);});}Object.keys(settings.ajax||{}).forEach(loadAjaxBehavior);Drupal.ajax.bindAjaxLinks(document.body);once('ajax','.use-ajax-submit').forEach((el)=>{const elementSettings={url:$(el.form).attr('action'),setClick:true,event:'click',progress:{type:'throbber'},base:el.id,element:el};Drupal.ajax(elementSettings);});},detach(context,settings,trigger){if(trigger==='unload')Drupal.ajax.expired().forEach((instance)=>{Drupal.ajax.instances[instance.instanceIndex]=null;});}};Drupal.AjaxError=function(xmlhttp,uri,customMessage){let statusCode;let statusText;let responseText;if(xmlhttp.status)statusCode=`\n${Drupal.t('An AJAX HTTP error occurred.')}\n${Drupal.t('HTTP Result Code: !status',{'!status':xmlhttp.status})}`;else statusCode=`\n${Drupal.t('An AJAX HTTP request terminated abnormally.')}`;statusCode+=`\n${Drupal.t('Debugging information follows.')}`;const pathText=`\n${Drupal.t('Path: !uri',{'!uri':uri})}`;statusText='';try{statusText=`\n${Drupal.t('StatusText: !statusText',{'!statusText':xmlhttp.statusText.trim()})}`;}catch(e){}responseText='';try{responseText=`\n${Drupal.t('ResponseText: !responseText',{'!responseText':xmlhttp.responseText.trim()})}`;}catch(e){}responseText=responseText.replace(/<("[^"]*"|'[^']*'|[^'">])*>/gi,'');responseText=responseText.replace(/[\n]+\s+/g,'\n');const readyStateText=xmlhttp.status===0?`\n${Drupal.t('ReadyState: !readyState',{'!readyState':xmlhttp.readyState})}`:'';customMessage=customMessage?`\n${Drupal.t('CustomMessage: !customMessage',{'!customMessage':customMessage})}`:'';this.message=statusCode+pathText+statusText+customMessage+responseText+readyStateText;this.name='AjaxError';if(!Drupal.AjaxError.messages)Drupal.AjaxError.messages=new Drupal.Message();Drupal.AjaxError.messages.add(Drupal.t("Oops, something went wrong. Check your browser's developer console for more details."),{type:'error'});};Drupal.AjaxError.prototype=new Error();Drupal.AjaxError.prototype.constructor=Drupal.AjaxError;Drupal.ajax=function(settings){if(arguments.length!==1)throw new Error('Drupal.ajax() function must be called with one configuration object only');const base=settings.base||false;const element=settings.element||false;delete settings.base;delete settings.element;if(!settings.progress&&!element)settings.progress=false;const ajax=new Drupal.Ajax(base,element,settings);ajax.instanceIndex=Drupal.ajax.instances.length;Drupal.ajax.instances.push(ajax);return ajax;};Drupal.ajax.instances=[];Drupal.ajax.expired=function(){return Drupal.ajax.instances.filter((instance)=>instance&&instance.element!==false&&!document.body.contains(instance.element));};Drupal.ajax.bindAjaxLinks=(element)=>
22{once('ajax','.use-ajax',element).forEach((ajaxLink)=>{const $linkElement=$(ajaxLink);const elementSettings={progress:{type:'throbber'},dialogType:$linkElement.data('dialog-type'),dialog:$linkElement.data('dialog-options'),dialogRenderer:$linkElement.data('dialog-renderer'),base:$linkElement.attr('id'),element:ajaxLink};const href=$linkElement.attr('href');if(href){elementSettings.url=href;elementSettings.event='click';}const httpMethod=$linkElement.data('ajax-http-method');if(httpMethod)elementSettings.httpMethod=httpMethod;Drupal.ajax(elementSettings);});};Drupal.Ajax=function(base,element,elementSettings){const defaults={httpMethod:'POST',event:element?'mousedown':null,keypress:true,selector:base?`#${base}`:null,effect:'none',speed:'none',method:'replaceWith',progress:{type:'throbber',message:Drupal.t('Processing...')},submit:{js:true}};$.extend(this,defaults,elementSettings);this.commands=new Drupal.AjaxCommands();this.instanceIndex=false;if(this.wrapper)this.wrapper=`#${this.wrapper}`;this.element=element;this.preCommandsFocusedElementSelector=null;this.elementSettings=elementSettings;if(this.element?.form)this.$form=$(this.element.form);if(!this.url){const $element=$(this.element);if(this.element.tagName==='A')this.url=$element.attr('href');else{if(this.element&&element.form)this.url=this.$form.attr('action');}}const originalUrl=this.url;this.url=this.url.replace(/\/nojs(\/|$|\?|#)/,'/ajax$1');if(drupalSettings.ajaxTrustedUrl[originalUrl])drupalSettings.ajaxTrustedUrl[this.url]=true;const ajax=this;ajax.options={url:ajax.url,data:ajax.submit,isInProgress(){return ajax.ajaxing;},beforeSerialize(elementSettings,options){return ajax.beforeSerialize(elementSettings,options);},beforeSubmit(formValues,elementSettings,options){ajax.ajaxing=true;ajax.preCommandsFocusedElementSelector=null;return ajax.beforeSubmit(formValues,elementSettings,options);},beforeSend(xmlhttprequest,options){ajax.ajaxing=true;return ajax.beforeSend(xmlhttprequest,options);},success(response,status,xmlhttprequest){ajax.preCommandsFocusedElementSelector=document.activeElement.getAttribute('data-drupal-selector');if(typeof response==='string')response=JSON.parse(response);if(response!==null&&!drupalSettings.ajaxTrustedUrl[ajax.url])if(xmlhttprequest.getResponseHeader('X-Drupal-Ajax-Token')!=='1'){const customMessage=Drupal.t('The response failed verification so will not be processed.');return ajax.error(xmlhttprequest,ajax.url,customMessage);}return (Promise.resolve(ajax.success(response,status)).then(()=>{ajax.ajaxing=false;$(document).trigger('ajaxSuccess',[xmlhttprequest,this]);$(document).trigger('ajaxComplete',[xmlhttprequest,this]);if(--$.active===0)$(document).trigger('ajaxStop');}));},error(xmlhttprequest,status,error){ajax.ajaxing=false;},complete(xmlhttprequest,status){if(status==='error'||status==='parsererror')return ajax.error(xmlhttprequest,ajax.url);},dataType:'json',jsonp:false,method:ajax.httpMethod};if(elementSettings.dialog)ajax.options.data.dialogOptions=elementSettings.dialog;if(!ajax.options.url.includes('?'))ajax.options.url+='?';else ajax.options.url+='&';let wrapper=`drupal_${elementSettings.dialogType||'ajax'}`;if(elementSettings.dialogRenderer)wrapper+=`.${elementSettings.dialogRenderer}`;ajax.options.url+=`${Drupal.ajax.WRAPPER_FORMAT}=${wrapper}`;$(ajax.element).on(elementSettings.event,function(event){if(!drupalSettings.ajaxTrustedUrl[ajax.url]&&!Drupal.url.isLocal(ajax.url))throw new Error(Drupal.t('The callback URL is not local and not trusted: !url',{'!url':ajax.url}));return ajax.eventResponse(this,event);});if(elementSettings.keypress)$(ajax.element).on('keypress',function(event){return ajax.keypressResponse(this,event);});if(elementSettings.prevent)$(ajax.element).on(elementSettings.prevent,false);};Drupal.ajax.WRAPPER_FORMAT='_wrapper_format';Drupal.Ajax.AJAX_REQUEST_PARAMETER='_drupal_ajax';Drupal.Ajax.prototype.execute=function(){if(this.ajaxing)return;try{this.beforeSerialize(this.element,this.options);return $.ajax(this.options);}catch(e){this.ajaxing=false;window.alert(`An error occurred while attempting to process ${this.options.url}: ${e.message}`);return $.Deferred().reject();}};Drupal.Ajax.prototype.keypressResponse=function(element,event){const ajax=this;if(event.which===13||(event.which===32&&element.type!=='text'&&element.type!=='textarea'&&element.type!=='tel'&&element.type!=='number')){event.preventDefault();event.stopPropagation();$(element).trigger(ajax.elementSettings.event);}};Drupal.Ajax.prototype.eventResponse=function(element,event){event.preventDefault();event.stopPropagation();const ajax=this;if(ajax.ajaxing)return;try{if(ajax.$form){if(ajax.setClick)element.form.clk=element;ajax.$form.ajaxSubmit(ajax.options);}else{ajax.beforeSerialize(ajax.element,ajax.options);$.ajax(ajax.options);}}catch(e){ajax.ajaxing=false;window.alert(`An error occurred while attempting to process ${ajax.options.url}: ${e.message}`);}};Drupal.Ajax.prototype.beforeSerialize=function(element,options){if(this.$form&&document.body.contains(this.$form.get(0))){const settings=this.settings||drupalSettings;Drupal.detachBehaviors(this.$form.get(0),settings,'serialize');}options.data[Drupal.Ajax.AJAX_REQUEST_PARAMETER]=1;const pageState=drupalSettings.ajaxPageState;options.data['ajax_page_state[theme]']=pageState.theme;options.data['ajax_page_state[theme_token]']=pageState.theme_token;options.data['ajax_page_state[libraries]']=pageState.libraries;};Drupal.Ajax.prototype.beforeSubmit=function(formValues,element,options){};Drupal.Ajax.prototype.beforeSend=function(xmlhttprequest,options){if(this.$form){options.extraData=options.extraData||{};options.extraData.ajax_iframe_upload='1';const v=$.fieldValue(this.element);if(v!==null)options.extraData[this.element.name]=v;}$(this.element).prop('disabled',true);if(!this.progress||!this.progress.type)return;const progressIndicatorMethod=`setProgressIndicator${this.progress.type.slice(0,1).toUpperCase()}${this.progress.type.slice(1).toLowerCase()}`;if(progressIndicatorMethod in this&&typeof this[progressIndicatorMethod]==='function')this[progressIndicatorMethod].call(this);};Drupal.theme.ajaxProgressThrobber=(message)=>{const messageMarkup=typeof message==='string'?Drupal.theme('ajaxProgressMessage',message):'';const throbber='<div class="throbber"> </div>';return `<div class="ajax-progress ajax-progress-throbber">${throbber}${messageMarkup}</div>`;};Drupal.theme.ajaxProgressIndicatorFullscreen=()=>'<div class="ajax-progress ajax-progress-fullscreen"> </div>';Drupal.theme.ajaxProgressMessage=(message)=>`<div class="message">${message}</div>`;Drupal.theme.ajaxProgressBar=($element)=>$('<div class="ajax-progress ajax-progress-bar"></div>').append($element);Drupal.Ajax.prototype.setProgressIndicatorBar=function(){const progressBar=new Drupal.ProgressBar(`ajax-progress-${this.element.i
22d}`,$.noop,this.progress.method,$.noop);if(this.progress.message)progressBar.setProgress(-1,this.progress.message);if(this.progress.url)progressBar.startMonitoring(this.progress.url,this.progress.interval||1500);this.progress.element=$(Drupal.theme('ajaxProgressBar',progressBar.element));this.progress.object=progressBar;$(this.element).after(this.progress.element);};Drupal.Ajax.prototype.setProgressIndicatorThrobber=function(){this.progress.element=$(Drupal.theme('ajaxProgressThrobber',this.progress.message));if($(this.element).closest('[data-drupal-ajax-container]').length)$(this.element).closest('[data-drupal-ajax-container]').after(this.progress.element);else $(this.element).after(this.progress.element);};Drupal.Ajax.prototype.setProgressIndicatorFullscreen=function(){this.progress.element=$(Drupal.theme('ajaxProgressIndicatorFullscreen'));$('body').append(this.progress.element);};Drupal.Ajax.prototype.commandExecutionQueue=function(response,status){const ajaxCommands=this.commands;return Object.keys(response||{}).reduce((executionQueue,key)=>executionQueue.then(()=>{const {command}=response[key];if(command&&ajaxCommands[command])return ajaxCommands[command](this,response[key],status);}),Promise.resolve());};Drupal.Ajax.prototype.success=function(response,status){if(this.progress.element)$(this.progress.element).remove();if(this.progress.object)this.progress.object.stopMonitoring();$(this.element).prop('disabled',false);const elementParents=$(this.element).parents('[data-drupal-selector]').addBack().toArray();const focusChanged=Object.keys(response||{}).some((key)=>{const {command,method}=response[key];return (command==='focusFirst'||command==='openDialog'||(command==='invoke'&&method==='focus'));});return (this.commandExecutionQueue(response,status).then(()=>{if(!focusChanged){let target=false;if(this.element){if($(this.element).data('refocus-blur')&&this.preCommandsFocusedElementSelector)target=document.querySelector(`[data-drupal-selector="${this.preCommandsFocusedElementSelector}"]`);if(!target&&!$(this.element).data('disable-refocus')){for(let n=elementParents.length-1;!target&&n>=0;n--)target=document.querySelector(`[data-drupal-selector="${elementParents[n].getAttribute('data-drupal-selector')}"]`);}}if(target)$(target).trigger('focus');}if(this.$form&&document.body.contains(this.$form.get(0))){const settings=this.settings||drupalSettings;Drupal.attachBehaviors(this.$form.get(0),settings);}this.settings=null;}).catch((error)=>console.error(Drupal.t('An error occurred during the execution of the Ajax response: !error',{'!error':error}))));};Drupal.Ajax.prototype.getEffect=function(response){const type=response.effect||this.effect;const speed=response.speed||this.speed;const effect={};if(type==='none'){effect.showEffect='show';effect.hideEffect='hide';effect.showSpeed='';}else if(type==='fade'){effect.showEffect='fadeIn';effect.hideEffect='fadeOut';effect.showSpeed=speed;}else{effect.showEffect=`${type}Toggle`;effect.hideEffect=`${type}Toggle`;effect.showSpeed=speed;}return effect;};Drupal.Ajax.prototype.error=function(xmlhttprequest,uri,customMessage){if(this.progress.element)$(this.progress.element).remove();if(this.progress.object)this.progress.object.stopMonitoring();$(this.wrapper).show();$(this.element).prop('disabled',false);if(this.$form&&document.body.contains(this.$form.get(0))){const settings=this.settings||drupalSettings;Drupal.attachBehaviors(this.$form.get(0),settings);}throw new Drupal.AjaxError(xmlhttprequest,uri,customMessage);};Drupal.theme.ajaxWrapperNewContent=($newContent,ajax,response)=>(response.effect||ajax.effect)!=='none'&&$newContent.filter((i)=>!(($newContent[i].nodeName==='#comment'||($newContent[i].nodeName==='#text'&&/^(\s|\n|\r)*$/.test($newContent[i].textContent))))).length>1?Drupal.theme('ajaxWrapperMultipleRootElements',$newContent):$newContent;Drupal.theme.ajaxWrapperMultipleRootElements=($elements)=>$('<div></div>').append($elements);Drupal.AjaxCommands=function(){};Drupal.AjaxCommands.prototype={insert(ajax,response){const $wrapper=response.selector?$(response.selector):$(ajax.wrapper);const method=response.method||ajax.method;const effect=ajax.getEffect(response);const settings=response.settings||ajax.settings||drupalSettings;const parseHTML=(htmlString)=>{const fragment=document.createDocumentFragment();const template=fragment.appendChild(document.createElement('template'));template.innerHTML=htmlString;return template.content.childNodes;};let $newContent=$(parseHTML(response.data));
22$newContent=Drupal.theme('ajaxWrapperNewContent',$newContent,ajax,response);switch(method){case 'html':case 'replaceWith':case 'replaceAll':case 'empty':case 'remove':Drupal.detachBehaviors($wrapper.get(0),settings);break;default:break;}$wrapper[method]($newContent);if(effect.showEffect!=='show')$newContent.hide();const $ajaxNewContent=$newContent.find('.ajax-new-content');if($ajaxNewContent.length){$ajaxNewContent.hide();$newContent.show();$ajaxNewContent[effect.showEffect](effect.showSpeed);}else{if(effect.showEffect!=='show')$newContent[effect.showEffect](effect.showSpeed);}$newContent.each((index,element)=>{if(element.nodeType===Node.ELEMENT_NODE&&document.documentElement.contains(element))Drupal.attachBehaviors(element,settings);});},remove(ajax,response,status){const settings=response.settings||ajax.settings||drupalSettings;$(response.selector).each(function(){Drupal.detachBehaviors(this,settings);}).remove();},changed(ajax,response,status){const $element=$(response.selector);if(!$element.hasClass('ajax-changed')){$element.addClass('ajax-changed');if(response.asterisk)$element.find(response.asterisk).append(` <abbr class="ajax-changed" title="${Drupal.t('Changed')}">*</abbr> `);}},alert(ajax,response,status){window.alert(response.text);},announce(ajax,response){if(response.priority)Drupal.announce(response.text,response.priority);else Drupal.announce(response.text);},redirect(ajax,response,status){window.location=response.url;},css(ajax,response,status){$(response.selector).css(response.argument);},settings(ajax,response,status){const ajaxSettings=drupalSettings.ajax;if(ajaxSettings)Drupal.ajax.expired().forEach((instance)=>{if(instance.selector){const selector=instance.selector.replace('#','');if(selector in ajaxSettings)delete ajaxSettings[selector];}});if(response.merge)$.extend(true,drupalSettings,response.settings);else ajax.settings=response.settings;},data(ajax,response,status){$(response.selector).data(response.name,response.value);},focusFirst(ajax,response,status){let focusChanged=false;const container=document.querySelector(response.selector);if(container){const tabbableElements=tabbable(container);if(tabbableElements.length){tabbableElements[0].focus();focusChanged=true;}else{if(isFocusable(container)){container.focus();focusChanged=true;}}}if(ajax.hasOwnProperty('element')&&!focusChanged)ajax.element.focus();},invoke(ajax,response,status){const $element=$(response.selector);$element[response.method](...response.args);},restripe(ajax,response,status){$(response.selector).find('> tbody > tr:visible, > tr:visible').removeClass('odd even').filter(':even').addClass('odd').end().filter(':odd').addClass('even');},update_build_id(ajax,response,status){document.querySelectorAll(`input[name="form_build_id"][value="${response.old}"]`).forEach((item)=>{item.value=response.new;});},add_css(ajax,response,status){const allUniqueBundleIds=response.data.map(function(style){const uniqueBundleId=style.href;if(!loadjs.isDefined(uniqueBundleId))loadjs(`css!${style.href}`,uniqueBundleId,{before(path,styleEl){Object.keys(style).forEach((attributeKey)=>{styleEl.setAttribute(attributeKey,style[attributeKey]);});}});return uniqueBundleId;});return new Promise((resolve,reject)=>{loadjs.ready(allUniqueBundleIds,{success(){resolve();},error(depsNotFound){const message=Drupal.t(`The following files could not be loaded: @dependencies`,{'@dependencies':depsNotFound.join(', ')});reject(message);}});});},message(ajax,response){const messages=new Drupal.Message(document.querySelector(response.messageWrapperQuerySelector));if(response.clearPrevious)messages.clear();messages.add(response.message,response.messageOptions);},add_js(ajax,response,status){const parentEl=document.querySelector(response.selector||'body');const settings=ajax.settings||drupalSettings;const allUniqueBundleIds=response.data.map((script)=>{const uniqueBundleId=script.src;if(!loadjs.isDefined(uniqueBundleId))loadjs(script.src,uniqueBundleId,{async:false,before(path,scriptEl){Object.keys(script).forEach((attributeKey)=>{scriptEl.setAttribute(attributeKey,script[attributeKey]);});parentEl.appendChild(scriptEl);return false;}});return uniqueBundleId;});return new Promise((resolve,reject)=>{loadjs.ready(allUniqueBundleIds,{success(){Drupal.attachBehaviors(parentEl,settings);resolve();},error(depsNotFound){const message=Drupal.t(`The following files could not be loaded: @dependencies`,{'@dependencies':depsNotFound.join(', ')});reject(message);}});});},scrollTop(ajax,response){document.querySelector(response.selector)?.scrollIntoView();}};const stopEvent=(xhr,settings)=>{return (xhr.getResponseHeader('X-Drupal-Ajax-Token')==='1'&&typeof settings.isInProgress==='function'&&settings.isInProgress());};$.extend(true,$.event.special,{ajaxSuccess:{trigger(event,xhr,settings){if(stopEvent(xhr,settings))return false;}},ajaxComplete:{trigger(event,xhr,settings){if(stopEvent(xhr,settings)){$.active++;return false;}}}});})(jQuery,window,Drupal,drupalSettings,loadjs,window.tabbable);; 23(function(Drupal){Drupal.AjaxCommands.prototype.gtagEvent=function(ajax,response){gtag('event',response.event_name,response.data);};})(Drupal);;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.