!function(){"use strict";var e,t={7706:function(e,t,o){var n=function(e){"complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",e,{once:!0}):e()};function i(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?r(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 r(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o0&&this.registerTriggers.apply(this,i(r)),this.onClick=this.onClick.bind(this),this.onKeydown=this.onKeydown.bind(this)}var t;return(t=[{key:"registerTriggers",value:function(){for(var e=this,t=arguments.length,o=new Array(t),n=0;n0&&void 0!==arguments[0]?arguments[0]:null;this.activeElement=document.activeElement,this.modal.setAttribute("aria-hidden","false"),this.modal.classList.add(this.config.openClass),this.scrollBehaviour("disable"),this.addEventListeners(),this.config.awaitOpenAnimation?this.modal.addEventListener("animationend",(function t(){e.modal.removeEventListener("animationend",t,!1),e.setFocusToFirstNode()}),!1):this.setFocusToFirstNode(),this.config.onShow(this.modal,this.activeElement,t)}},{key:"closeModal",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.modal;if(this.modal.setAttribute("aria-hidden","true"),this.removeEventListeners(),this.scrollBehaviour("enable"),this.activeElement&&this.activeElement.focus&&this.activeElement.focus(),this.config.onClose(this.modal,this.activeElement,e),this.config.awaitCloseAnimation){var o=this.config.openClass;this.modal.addEventListener("animationend",(function e(){t.classList.remove(o),t.removeEventListener("animationend",e,!1)}),!1)}else t.classList.remove(this.config.openClass)}},{key:"closeModalById",value:function(e){this.modal=document.getElementById(e),this.modal&&this.closeModal()}},{key:"scrollBehaviour",value:function(e){if(this.config.disableScroll){var t=document.querySelector("body");switch(e){case"enable":Object.assign(t.style,{overflow:""});break;case"disable":Object.assign(t.style,{overflow:"hidden"})}}}},{key:"addEventListeners",value:function(){this.modal.addEventListener("touchstart",this.onClick),this.modal.addEventListener("click",this.onClick),document.addEventListener("keydown",this.onKeydown)}},{key:"removeEventListeners",value:function(){this.modal.removeEventListener("touchstart",this.onClick),this.modal.removeEventListener("click",this.onClick),document.removeEventListener("keydown",this.onKeydown)}},{key:"onClick",value:function(e){(e.target.hasAttribute(this.config.closeTrigger)||e.target.parentNode.hasAttribute(this.config.closeTrigger))&&(e.preventDefault(),e.stopPropagation(),this.closeModal(e))}},{key:"onKeydown",value:function(e){27===e.keyCode&&this.closeModal(e),9===e.keyCode&&this.retainFocus(e)}},{key:"getFocusableNodes",value:function(){var e=this.modal.querySelectorAll(a);return Array.apply(void 0,i(e))}},{key:"setFocusToFirstNode",value:function(){var e=this;if(!this.config.disableFocus){var t=this.getFocusableNodes();if(0!==t.length){var o=t.filter((function(t){return!t.hasAttribute(e.config.closeTrigger)}));o.length>0&&o[0].focus(),0===o.length&&t[0].focus()}}}},{key:"retainFocus",value:function(e){var t=this.getFocusableNodes();if(0!==t.length)if(t=t.filter((function(e){return null!==e.offsetParent})),this.modal.contains(document.activeElement)){var o=t.indexOf(document.activeElement);e.shiftKey&&0===o&&(t[t.length-1].focus(),e.preventDefault()),!e.shiftKey&&t.length>0&&o===t.length-1&&(t[0].focus(),e.preventDefault())}else t[0].focus()}}])&&function(e,t){for(var o=0;o')),!1},d=function(e,t){if(function(e){e.length<=0&&(console.warn("MicroModal: ❗Please specify at least one %c'micromodal-trigger'","background-color: #f8f9fa;color: #50596c;font-weight: bold;","data attribute."),console.warn("%cExample:","background-color: #f8f9fa;color: #50596c;font-weight: bold;",''))}(e),!t)return!0;for(var o in t)c(o);return!0},{init:function(e){var t=Object.assign({},{openTrigger:"data-micromodal-trigger"},e),o=i(document.querySelectorAll("[".concat(t.openTrigger,"]"))),n=function(e,t){var o=[];return e.forEach((function(e){var n=e.attributes[t].value;void 0===o[n]&&(o[n]=[]),o[n].push(e)})),o}(o,t.openTrigger);if(!0!==t.debugMode||!1!==d(o,n))for(var r in n){var a=n[r];t.targetModal=r,t.triggers=i(a),l=new s(t)}},show:function(e,t){var o=t||{};o.targetModal=e,!0===o.debugMode&&!1===c(e)||(l&&l.removeEventListeners(),(l=new s(o)).showModal())},close:function(e){e?l.closeModalById(e):l.closeModal()}});"undefined"!=typeof window&&(window.MicroModal=u);var h=u,f=o(7519);const m=window.requestAnimationFrame;class v{constructor(e,t,o=window,n=250,i=!0){this.event=t,this.element=o,this.frequency=n,this.timer=0,this.initial=i,this.callback=e,this.requestTick=this.requestTick.bind(this),this.update=this.update.bind(this)}debounce(){this.callback?this.element.addEventListener(this.event,this.requestTick):console.error("Debounce error: you must specify a callback.")}update(){this.callback(),this.timer=0}requestTick(){!this.timer&&this.initial&&this.update(),0!==this.timer&&window.clearTimeout(this.timer),this.timer=window.setTimeout((()=>{m((()=>{this.update()}))}),this.frequency)}destroy(){this.element.removeEventListener(this.event,this.requestTick)}}const g={name:"imageModal",component:class{constructor({element:e,children:t,options:o}){this.element=e,this.children=t,this.options=o,this.alreadyBoundTriggers=new Set;const n=document.querySelectorAll("[data-modal-image]");this.attachEventListeners(n);const i=document.querySelector("#wpcom-liveblog-container");i&&this.observeLiveBlogContainer(i)}attachEventListeners(e){e&&e.length>0&&e.forEach((e=>{this.alreadyBoundTriggers.has(e)||(e.addEventListener("click",(e=>this.openModal(e))),this.alreadyBoundTriggers.add(e))}))}observeLiveBlogContainer(e){const t=new v((()=>{const t=e.querySelectorAll("[data-modal-image]");this.attachEventListeners(t)}),"",window,250);new MutationObserver((()=>{t.requestTick()})).observe(e,{childList:!0,subtree:!0})}getImage(){let e=null;const{imageID:t}=this.options;if(0!==t){this.element.setAttribute("id",t.toString());const o=document.querySelector(`.wp-image-${t}`);o&&(e=o.cloneNode(!0),e.setAttribute("sizes","(max-width: 1400px) 100vw, 1400px"),e.removeAttribute("class"))}return e}openModal(e){var t;const{modalContent:o}=this.children,n=e.target;(null===(t=null==n?void 0:n.dataset)||void 0===t?void 0:t.modalImage)&&(n.closest("a")&&e.preventDefault(),this.options.imageID=n.dataset.modalImage.toString());const i=this.getImage();o&&i&&(o.innerHTML=f.A.sanitize(i),h.show(this.options.imageID.toString()))}},querySelector:{modalContent:"[data-modal-content-image]"},options:{imageID:0}};!function(e){const{component:t,load:o,name:i,querySelector:r={},querySelectorAll:a={},options:s={}}=e;if("function"!=typeof t)return;const l=()=>{const o=(()=>{const t=void 0===i?null==e?void 0:e.root:`[data-component='${i}']`;let o;try{o=document.querySelectorAll(t)}catch(e){return console.error(e),[]}return o.length<1?(console.log(`No elements found for ${t}`),[]):Array.from(o).map((e=>{const t={};return Object.keys(r).forEach((o=>{t[o]=e.querySelector(r[o])})),Object.keys(a).forEach((o=>{const n=e.querySelectorAll(a[o]);t[o]=Array.from(n)})),{element:e,children:t,options:s}}))})();o.forEach((e=>new t(e)))};if(!1===o)return l;!0!==o?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;if(e)if("function"==typeof t)t(e);else if(Array.isArray(t)){const[o,n]=t;null==o||o.addEventListener(n,e)}}(l,o):l()}(g)}},o={};function n(e){var i=o[e];if(void 0!==i)return i.exports;var r=o[e]={exports:{}};return t[e](r,r.exports,n),r.exports}n.m=t,e=[],n.O=function(t,o,i,r){if(!o){var a=1/0;for(d=0;d=r)&&Object.keys(n.O).every((function(e){return n.O[e](o[l])}))?o.splice(l--,1):(s=!1,r0&&e[d-1][2]>r;d--)e[d]=e[d-1];e[d]=[o,i,r]},n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={2341:0};n.O.j=function(t){return 0===e[t]};var t=function(t,o){var i,r,a=o[0],s=o[1],l=o[2],c=0;if(a.some((function(t){return 0!==e[t]}))){for(i in s)n.o(s,i)&&(n.m[i]=s[i]);if(l)var d=l(n)}for(t&&t(o);c