!function(){"use strict";var t=t=>{"complete"!==document.readyState&&"interactive"!==document.readyState||t(),document.addEventListener("DOMContentLoaded",t,{once:!0})};function e(e){const{component:i,load:n,name:r,querySelector:s={},querySelectorAll:o={},options:a={}}=e;if("function"!=typeof i)return;const d=()=>{(()=>{const t=void 0===r?null==e?void 0:e.root:`[data-component='${r}']`;let i;try{i=document.querySelectorAll(t)}catch(t){return console.error(t),[]}return i.length<1?(console.log(`No elements found for ${t}`),[]):Array.from(i).map((t=>{const e={};return Object.keys(s).forEach((i=>{e[i]=t.querySelector(s[i])})),Object.keys(o).forEach((i=>{const n=t.querySelectorAll(o[i]);e[i]=Array.from(n)})),{element:t,children:e,options:a}}))})().forEach((t=>new i(t)))};if(!1===n)return d;!function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;if(e)if("function"==typeof i)i(e);else if(Array.isArray(i)){const[t,n]=i;null==t||t.addEventListener(n,e)}}(d,n)}e({name:"menu",component:class{#t=void 0;constructor(t){let{element:e}=t;this.element=e,this.disclosures=[],this.expandedItemClass="menu__item--submenu-is-expanded",this.ariaCurrentPage=null,["UL","OL"].includes(e.nodeName)&&this.init()}set activeDisclosureId(t){const e=this.disclosures.find((e=>e.id===t)),i=void 0!==this.activeDisclosureId&&this.activeDisclosureId===t;this.setDisclosureState(e,!i),this.setDisclosureState(this.activeDisclosure,!1),this.#t=i?void 0:e,this.activeDisclosureId?document.body.addEventListener("keydown",this.bodyHandleKeydown):document.body.removeEventListener("keydown",this.bodyHandleKeydown)}get activeDisclosureId(){var t;return null===(t=this.activeDisclosure)||void 0===t?void 0:t.id}get activeDisclosure(){return this.#t}initSubmenuDisclosure=(t,e)=>{let i=e.querySelector(":scope > [aria-controls]");if(null===i){const[t,...n]=Array.from(e.children);i=t,null!=i&&i.matches("a,button")||([i]=Array.from(n).filter((t=>t.matches("a,button"))))}if(null==i)return t;const n=i.parentElement.querySelector("ul");if(null==n)return t;i.setAttribute("aria-expanded",!1),n.setAttribute("aria-hidden",!0),i.setAttribute("aria-controls",n.id),i.addEventListener("click",this.controllerHandleClick),i.addEventListener("keydown",this.controllerHandleKeydown);const r={id:i.id,controller:i,target:n};return[...t,r]};init=()=>{this.disclosures=Array.from(this.element.children).reduce(this.initSubmenuDisclosure,[]),this.disclosures.length>0&&this.element.addEventListener("focusout",this.menuHandleFocusout),this.ariaCurrentPage=this.element.querySelector('[aria-current="page"]'),this.element.addEventListener("keydown",this.menuHandleKeydown)};setDisclosureState=(t,e)=>{if(void 0!==t){var i;t.controller.setAttribute("aria-expanded",e),t.target.setAttribute("aria-hidden",!e);const n=null===(i=t.controller)||void 0===i?void 0:i.parentElement,r=e?"add":"remove";void 0!==n&&n.classList[r](this.expandedItemClass)}};controllerHandleClick=t=>{t.preventDefault(),this.activeDisclosureId=t.target.id};controllerHandleKeydown=t=>{const{target:e,key:i}=t;[" ","Enter"].includes(i)&&(t.preventDefault(),t.stopPropagation(),this.activeDisclosureId=e.id)};menuHandleFocusout=t=>{this.element.contains(t.relatedTarget)||(this.activeDisclosureId=void 0)};menuHandleKeydown=t=>{const{target:e,key:i}=t;var n;![" ","Enter"].includes(i)||e.hasAttribute("aria-controls")||e.hasAttribute("aria-current")||(null===(n=this.ariaCurrentPage)||void 0===n||n.removeAttribute("aria-current"),e.setAttribute("aria-current","page"),this.ariaCurrentPage=e)};bodyHandleKeydown=t=>{if("Escape"===t.key&&void 0!==this.activeDisclosureId){const{controller:t,target:e}=this.activeDisclosure;this.activeDisclosureId=void 0,e.contains(document.activeElement)&&t.focus()}}}});var i=JSON.parse('{"xl":"1280","lg":"1024","md":"768","sm":"600","xs":"480","adminbar-sm":"601","adminbar-lg":"783"}'),n=Object.keys(i).reduce(((t,e)=>{const n=i[e]/16+"rem",r=(i[e]-1)/16+"rem";return t[`${e}Min`]=window.matchMedia(`(min-width: ${n})`),t[`${e}Max`]=window.matchMedia(`(max-width: ${r})`),t}),{});e({name:"menu-button",component:class{#e=!1;static getTargetElement(t){if(!t.hasAttribute("aria-controls"))throw new Error("Configuration error: The component element is missing the required 'aria-controls' attribute");const e=t.getAttribute("aria-controls"),i=document.getElementById(e);if(null===i)throw new Error(`Configuration error: A target element with ID of '${e}' is not found`);return i}constructor(t){let{element:e,options:i}=t;this.controller=e,this.target=this.constructor.getTargetElement(e),this.initialized=!1;const{close:r,useTransition:s}={useTransition:!1,close:"",...i};this.useTransition=s,""!==r&&(this.closeButton=document.querySelector(r)),n.lgMin.addEventListener("change",this.init),this.init()}init=()=>{n.lgMin.matches?this.initialized&&this.destroy():this.setUp()};setUp=()=>{this.target.setAttribute("aria-hidden","true"),this.target.setAttribute("role","dialog"),this.target.setAttribute("aria-modal","true"),this.controller.addEventListener("click",this.show),this.target.addEventListener("keydown",this.handleTargetKeydown),null!=this.closeButton&&(this.closeButton.addEventListener("click",this.handleCloseButtonClick),this.closeButton.addEventListener("keydown",this.handleCloseButtonKeydown)),this.useTransition&&this.target.addEventListener("transitionend",this.handleTargetShown),this.initialized=!0};set expanded(t){if(this.#e=t,requestAnimationFrame((()=>{this.controller.setAttribute("aria-expanded",this.expanded)})),this.expanded?(requestAnimationFrame((()=>{this.target.setAttribute("aria-hidden","false")})),this.useTransition||this.closeButton.focus()):requestAnimationFrame((()=>{this.target.setAttribute("aria-hidden","true")})),!this.firstInteractiveChild||!this.lastInteractiveChild){const t=function(t){const e=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex^="-"])'].join(","),i=t.querySelectorAll(e);return Array.from(i).filter((t=>null!==t.offsetParent))}(this.target);if(t.length>0){const[e,i]=function(t){const e=(i=t,Array.isArray(i)?i:i instanceof HTMLElement?new Array(i):i instanceof NodeList||i instanceof HTMLCollection?Array.from(i):[]);var i;const n=e.length-1,{0:r,[n]:s}=e;return[r,s]}(t);this.firstInteractiveChild=e,this.lastInteractiveChild=i}}}get expanded(){return this.#e}handleTargetKeydown=t=>{const{code:e,shiftKey:i}=t,{activeElement:n}=document;"Escape"===e&&this.expanded?(t.preventDefault(),requestAnimationFrame((()=>{this.hide()}))):"Tab"===e&&(i?this.firstInteractiveChild===n&&(t.preventDefault(),this.closeButton?this.closeButton.focus():this.lastInteractiveChild.focus()):this.lastInteractiveChild===n&&(t.preventDefault(),this.closeButton?this.closeButton.focus():this.firstInteractiveChild.focus()))};handleCloseButtonClick=t=>{this.expanded&&(t.preventDefault(),requestAnimationFrame((()=>{this.hide()})))};handleCloseButtonKeydown=t=>{const{code:e,shiftKey:i}=t;"Escape"===e&&this.expanded?(t.preventDefault(),requestAnimationFrame((()=>{this.hide()}))):"Tab"===e&&this.expanded&&(t.preventDefault(),i?this.lastInteractiveChild.focus():this.firstInteractiveChild.focus())};handleTargetShown=t=>{this.target===t.target&&this.closeButton.focus()};show=()=>{this.expanded=!0};hide=()=>{this.expanded=!1,this.controller.focus()};destroy=()=>{this.controller.removeAttribute("aria-expanded"),this.target.removeAttribute("aria-hidden"),this.target.removeAttribute("role"),this.target.removeAttribute("aria-modal"),this.controller.removeEventListener("click",this.show),this.target.removeEventListener("keydown",this.handleTargetKeydown),null!=this.closeButton&&(this.closeButton.removeEventListener("click",this.handleCloseButtonClick),this.closeButton.removeEventListener("keydown",this.handleCloseButtonKeydown)),this.useTransition&&this.target.removeEventListener("transitionend",this.handleTargetShown),this.#e=!1}},options:{close:".site-header__menu-close"}});class r{#e=!1;static getTargetElement(t){if(!t.hasAttribute("aria-controls"))throw new Error("Configuration error: The component element is missing the required 'aria-controls' attribute");const e=t.getAttribute("aria-controls"),i=document.getElementById(e);if(null===i)throw new Error(`Configuration error: A target element with ID of '${e}' is not found`);return i}constructor(t){this.controller=t,this.target=this.constructor.getTargetElement(t),this.init()}init=()=>{"BUTTON"!==this.controller.nodeName&&(this.controller.setAttribute("role","button"),this.controller.addEventListener("keydown",this.handleControllerKeydown)),requestAnimationFrame((()=>{this.controller.setAttribute("aria-expanded","false")})),requestAnimationFrame((()=>{this.target.setAttribute("aria-hidden","true")})),this.controller.addEventListener("click",this.handleControllerClick),this.target.addEventListener("focusout",this.handleTargetFocusout)};set expanded(t){this.#e=t,requestAnimationFrame((()=>{this.controller.setAttribute("aria-expanded",this.expanded),this.target.setAttribute("aria-hidden",!this.expanded)})),this.expanded?document.body.addEventListener("keydown",this.handleBodyKeydown):document.body.removeEventListener("keydown",this.handleBodyKeydown)}get expanded(){return this.#e}handleControllerClick=t=>{t.preventDefault(),this.toggle()};handleControllerKeydown=t=>{const{code:e}=t;["Space","Enter"].includes(e)&&(t.preventDefault(),this.toggle())};handleTargetFocusout=t=>{this.target.contains(t.relatedTarget)||(this.expanded=!1)};handleBodyKeydown=t=>{const{code:e}=t;"Escape"===e&&this.expanded&&(t.preventDefault(),requestAnimationFrame((()=>{this.hide()})))};show=()=>{this.expanded=!0};hide=()=>{this.expanded=!1,this.target.contains(document.activeElement)&&this.controller.focus()};toggle=()=>{this.expanded=!this.expanded};destroy=()=>{requestAnimationFrame((()=>{this.target.removeAttribute("aria-hidden")})),requestAnimationFrame((()=>{this.controller.removeAttribute("aria-expanded")})),"BUTTON"!==this.controller.nodeName&&(this.controller.removeAttribute("role"),this.controller.removeEventListener("keydown",this.handleControllerKeydown)),this.controller.removeEventListener("click",this.handleControllerClick),this.target.removeEventListener("focusout",this.handleTargetFocusout),document.body.removeEventListener("keydown",this.handleBodyKeydown),this.#e=!1}}e({name:"search-toggle",component:function(t){let{element:e}=t;e.setAttribute("aria-controls","header-search-dropdown"),new r(e)},options:{dropdownId:"header-search-dropdown"}});class s{static getTargetElement(t){if(!t.hasAttribute("aria-controls"))throw new Error("Configuration error: The component element is missing the required 'aria-controls' attribute");const e=t.getAttribute("aria-controls"),i=document.getElementById(e);if(null===i)throw new Error(`Configuration error: A target element with ID of '${e}' is not found`);return i}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.controller=t,this.target=this.constructor.getTargetElement(t),this.init=this.init.bind(this),this.setup=this.setup.bind(this),this.setState=this.setState.bind(this),this.patchButtonKeydownSupport=this.patchButtonKeydownSupport.bind(this),this.controllerHandleClick=this.controllerHandleClick.bind(this),this.stateWasUpdated=this.stateWasUpdated.bind(this),this.toggle=this.toggle.bind(this),this.destroy=this.destroy.bind(this),this.options=Object.assign({breakpoint:"",shownClass:"accordion__target--is-shown",loadOpen:!1},e),this.state={expanded:this.options.loadOpen},this.mediaQuery=n[e.breakpoint],this.init(),this.mediaQuery&&this.mediaQuery.addEventListener("change",this.init)}init(){var t;!this.mediaQuery||null!==(t=this.mediaQuery)&&void 0!==t&&t.matches?this.setup():this.destroy()}setup(){const{expanded:t}=this.state;requestAnimationFrame((()=>{this.controller.setAttribute("aria-expanded",t)})),"BUTTON"!==this.controller.nodeName&&(this.controller.setAttribute("role","button"),this.controller.addEventListener("keydown",this.patchButtonKeydownSupport)),requestAnimationFrame((()=>{this.target.setAttribute("aria-hidden",!t)})),this.target.setAttribute("aria-labelledby",this.controller.id),this._overwriteRoleAttribute=!this.target.hasAttribute("role"),this._overwriteRoleAttribute&&this.target.setAttribute("role","region"),this.controller.addEventListener("click",this.controllerHandleClick)}setState(t){const e={...this.state,...t};this.state=e,this.stateWasUpdated(e)}stateWasUpdated(t){let{expanded:e}=t;const{shownClass:i}=this.options;requestAnimationFrame((()=>{this.controller.setAttribute("aria-expanded",`${e}`)})),e?requestAnimationFrame((()=>{this.target.setAttribute("aria-hidden","false"),this.target.classList.add(i)})):requestAnimationFrame((()=>{this.target.setAttribute("aria-hidden","true"),this.target.classList.remove(i)}))}patchButtonKeydownSupport(t){const{code:e}=t;["Space","Enter"].includes(e)&&(t.preventDefault(),this.toggle())}controllerHandleClick(t){t.preventDefault(),this.toggle()}toggle(){const{expanded:t}=this.state;this.setState({expanded:!t})}destroy(){const{shownClass:t}=this.options;requestAnimationFrame((()=>{this.controller.removeAttribute("aria-expanded")})),requestAnimationFrame((()=>{this.target.removeAttribute("aria-hidden"),this.target.classList.remove(t)})),this._overwriteRoleAttribute&&this.target.removeAttribute("role"),this.target.removeAttribute("aria-labelledby"),this.controller.removeEventListener("click",this.controllerHandleClick),this.controller.removeEventListener("keydown",this.patchButtonKeydownSupport),this.mediaQuery&&this.mediaQuery.removeEventListener("change",this.handleBreakpointChange),this.state={expanded:this.options.loadOpen}}}e({name:"site-footer",component:function(t){let{children:e,options:i}=t;const n=[],{toggles:r}=e;r.forEach((t=>{n.push(new s(t,i))}))},querySelectorAll:{toggles:".footer-menu__toggle"},options:{breakpoint:"mdMax"}})}(); //# sourceMappingURL=global.bundle.min.js.map