(()=>{const e=document.querySelectorAll(".coblocks-animate");if("IntersectionObserver"in window){const t=new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&(e.target.classList.add(e.target.dataset.coblocksAnimation),t.unobserve(e.target))}))}),{threshold:[.15]});e.forEach((e=>{t.observe(e)}))}else e.forEach((e=>{e.classList.remove("coblocks-animate"),delete e.dataset.coblocksAnimation}))})();; (()=>{var e={2590:function(e){e.exports=function(){"use strict";function e(){return e=Object.assign||function(e){for(var t=1;te.longSwipesMs?c(r+h*(m>0?-1:1)):c(m>0?r-v:r+v),w(n,i)}}}}(r,e,t,o),u=c.preheat,l=c.move,f=c.stop;function p(e){var t=a?e.changedTouches[0]:e;return{x:t.pageX,y:t.pageY}}function d(t){for(var n=0;n0||navigator.msMaxTouchPoints>0||window.DocumentTouch&&document instanceof DocumentTouch);Object.assign(n,{touchable:o,element:e,measure:i,limitation:r})}return n.update=i,i(e),n}var T="data-shallow-slider",P="data-slider";function E(e,n){function i(i){var r=e.element.$wrapper,o=i.index;r.querySelectorAll("["+P+"]").forEach((function(e){var i,r,a=~~e.getAttribute(P);i=e,void 0===(r=[n.slidePrevClass,n.slideNextClass,n.slideActiveClass])&&(r=[]),Array.isArray(r)||(r=[r]),r.forEach((function(e){return i.classList.contains(e)&&i.classList.remove(e)})),a===o&&t(e,n.slideActiveClass),a===o-1&&t(e,n.slidePrevClass),a===o+1&&t(e,n.slideNextClass)}))}function a(){e.element.$wrapper.querySelectorAll("["+T+"]").forEach((function(t){return e.element.$wrapper.removeChild(t)}))}function s(){e.element.$list.forEach((function(e,t){return r(e,P,t)})),a(),function(){if(n.loop){var t=e.element,i=e.limitation,o=t.$list,a=t.$wrapper,s=i.expand,c=o.slice(-s).map((function(e){return e.cloneNode(!0)})),u=o.slice(0,s).map((function(e){return e.cloneNode(!0)}));c.forEach((function(e,t){a.appendChild(r(u[t],T)),a.insertBefore(r(c[t],T),o[0])}))}}()}function c(){var t,i=e.element,r=e.measure,a=i.$wrapper,s={display:"flex",willChange:"transform",flexDirection:n.isHorizontal?"row":"column"},c=((t={})[n.isHorizontal?"width":"height"]=r.slideSize+"px",t[n.isHorizontal?"margin-right":"margin-bottom"]=n.spaceBetween+"px",t);o(a,s),a.querySelectorAll("["+P+"]").forEach((function(e){return o(e,c)}))}return{init:function(){s(),c()},render:function(t,r,o,a){var s=e.element.$wrapper,c=void 0===r?n.speed:r;n.injections.translate(t,e,n,c),t.isStart||i(t),a&&getComputedStyle(s).transform,o&&setTimeout(o,c)},destroy:function(){var t=e.element,i=t.$list,r=t.$wrapper,o=n.isHorizontal?"margin-right":"margin-bottom";["display","will-change","flex-direction"].forEach((function(e){r.style.removeProperty(e)})),i.forEach((function(e){return e.style.removeProperty(o)})),a()},updateSize:c}}function M(e,t){var n=e-t.max,i=e-t.min;return n>0?n:i<0?i:0}function A(t,n,i,r,o){function a(e){var n=t.measure;return Math.ceil(Math.abs(e)/n.boxSize-i.longSwipesRatio)}function s(e,t,i){r.render(n,e,t,i)}function c(r){var a,s=t.limitation,c=s.min,u=s.max,f=u-c+(i.loop?t.measure.boxSize:0),p=f+1;n.transforms=r,i.loop?(a=(u-r)%p/f,n.progress=a<0?1+a:a>1?a-1:a):(a=(u-r)/f,n.progress=a<0?0:a>1?1:a),o.emit(l,e({},n))}function p(e,r){var l=t.measure,p=t.limitation,d=p.maxIndex-p.minIndex+1,m=i.loop?(e%d+d)%d:e>p.maxIndex?p.maxIndex:e0?1:-1)*(n.minIndex-r-1)+t-e;return Math.abs(i)>Math.abs(o)?o:i}(n.index,m,p,x);g===x||h?n.index===m&&c(h>0?p.min-l.boxSize+h:p.max+l.boxSize+h):c(g<0?p.min-l.boxSize:p.max+l.boxSize),s(0,void 0,!0)}o.emit(u,n.index,n,m),n.index=m,c(v),s(r,(function(){o.emit(f,m,n)}))}return{update:function(){p(n.index,0),r.updateSize()},render:s,transform:c,slideTo:p,scrollPixel:function(e){var r=n.transforms,o=t.measure,a=t.limitation,s=Number(e.toExponential().split("e")[1]),u=s<=0?Math.pow(10,-(s-1)):1,l=r;if(i.resistance&&!i.loop&&(e>0&&r>=a.max?e-=Math.pow(e*u,i.resistanceRatio)/u:e<0&&r<=a.min&&(e+=Math.pow(-e*u,i.resistanceRatio)/u)),l+=e,i.loop){var f=n.tracker.vector(),p=i.isHorizontal?f.velocityX:f.velocityY,d=M(r,a);d&&function(e,t,n){return e>0&&t>n.max||e<0&&t0?a.min-o.boxSize+d:a.max+o.boxSize+d)}c(l)},initStatus:function(e){void 0===e&&(e=0),n.startTransform=e,n.isStart=!1,n.isScrolling=!1,n.isTouching=!1},initLayout:function(e){c(e)},getOffsetSteps:a}}function C(e,t){var n="string"==typeof e?document.body.querySelector(e):e,i=n.querySelector("."+t.wrapperClass),r=[].slice.call(n.getElementsByClassName(t.slideClass));return{$el:n,$wrapper:i,$list:r=r.filter((function(e){return null===e.getAttribute("data-shallow-slider")}))}}var $=function t(n,i){var r,o=function(t){var n=e({},a,t);return e({},n,{isHorizontal:"horizontal"===n.direction})}(i),u=(r={},{on:function(e,t){r[e]?r[e].push(t):r[e]=[t]},off:function(e,t){if(r[e]){var n=r[e].indexOf(t);n>-1&&r[e].splice(n,1)}},emit:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i{var e={7152:function(e){e.exports=function(){"use strict";function e(){return(e=Object.assign||function(e){for(var t=1;te.longSwipesMs?l(p+m*(0h.maxIndex?h.maxIndex:eMath.abs(f)?f:v)===p||l?n.index===b&&d(0=s.max?e-=Math.pow(e*l,i.resistanceRatio)/l:e<0&&r<=s.min&&(e+=Math.pow(-e*l,i.resistanceRatio)/l)),c+=e,i.loop&&(o=n.tracker.vector(),l=i.isHorizontal?o.velocityX:o.velocityY,(e=w(r,s))&&(o=r,r=s,0r.max||l<0&&o{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e=n(7152),t=n.n(e),i=n(3266),o=n.n(i);!function(){const e=document.querySelectorAll(".wp-block-coblocks-gallery-carousel");for(let n=0;n{const t=s.querySelector(`.wp-block-coblocks-gallery-carousel-thumbnail-${r}`);if(t){t.classList.remove("is-active");const n=s.querySelector(`.wp-block-coblocks-gallery-carousel-thumbnail-${e}`);n&&n.classList.add("is-active")}},c=e=>{i?.slideTo(e),l(e),r=e},u=e=>{e!==r&&(l(e),r=e)},d=s.querySelector(".swiper-container");if(d){const e=d.getAttribute("data-swiper");if(e){const n=JSON.parse(e),r=s.querySelector(".nav-button__prev"),l=s.querySelector(".nav-button__next");r&&r.setAttribute("aria-label",coblocksTinyswiper.carouselPrevButtonAriaLabel),l&&l.setAttribute("aria-label",coblocksTinyswiper.carouselNextButtonAriaLabel);const p=s.querySelectorAll("img");for(let e=0;e{i.update()})).observe(d),n.thumbnails){const e=s.querySelectorAll(".wp-block-coblocks-gallery-carousel-thumbnail");for(const[t,n]of Object.entries(e))n.addEventListener("click",(()=>c(t)));const t=s.querySelector(".wp-block-coblocks-gallery-carousel-thumbnail-0");t&&t.classList.add("is-active")}if(!n.thumbnails&&n.pageDots){const e=s.querySelectorAll(".wp-block-coblocks-gallery-carousel-page-dot-pagination");for(const[t,n]of Object.entries(e))n.addEventListener("click",(()=>c(t)));const t=s.querySelector(".wp-block-coblocks-gallery-carousel-page-dot--0");t&&t.classList.add("is-active")}if(!0!==n.draggable){const e=s.querySelector(".swiper-wrapper");e?.addEventListener("mousedown",(e=>{e.stopPropagation()}))}!0===n.autoPlay&&n.autoPlaySpeed&&(!0===n.pauseHover&&(d.addEventListener("mouseenter",(()=>{a=!0})),d.addEventListener("mouseleave",(()=>{a=!1}))),setInterval((()=>{!0===n.pauseHover&&!0===a||i?.slideTo(i.state.index+1)}),n.autoPlaySpeed)),i.on("after-slide",u)}}}}()})()})();; jQuery(document).ready(function(){var t=!1;void 0!==eztoc_smooth_local.JumpJsLinks&&1===parseInt(eztoc_smooth_local.JumpJsLinks)&&(t=!0),document.querySelectorAll(".ez-toc-link").forEach(t=>{t=t.replaceWith(t.cloneNode(!0))}),document.querySelectorAll(".ez-toc-section").forEach(t=>{t.setAttribute("ez-toc-data-id","#"+decodeURI(t.getAttribute("id")))}),jQuery("a.ez-toc-link").click(function(){let e=jQuery(this).attr("data-href"),i=jQuery(this).attr("href");if(1===parseInt(eztoc_smooth_local.add_request_uri)){if(jQuery(this).attr("data-href")){let r=jQuery(this).attr("data-href").split("#");r&&r.length>1&&(e=`#${r[1]}`)}if(jQuery(this).attr("href")){let a=jQuery(this).attr("href").split("#");a&&a.length>1&&(i=`#${a[1]}`)}}let l=t?e:i,o=jQuery("#wpadminbar"),s=jQuery("header"),h=0;if(parseInt(eztoc_smooth_local.scroll_offset)>30&&(h=parseInt(eztoc_smooth_local.scroll_offset)),o.length&&(h+=o.height()),(s.length&&"fixed"==s.css("position")||"sticky"==s.css("position"))&&(h+=s.height()),jQuery('[ez-toc-data-id="'+decodeURI(l)+'"]').length>0&&(h=jQuery('[ez-toc-data-id="'+decodeURI(l)+'"]').offset().top-h),jQuery("html, body").animate({scrollTop:h},500),t)return!1})});; /*! * JavaScript Cookie v2.2.1 * https://github.com/js-cookie/js-cookie * * Copyright 2006, 2015 Klaus Hartl & Fagner Brack * Released under the MIT license */ !function(factory){var registeredInModuleLoader;if("function"==typeof define&&define.amd&&(define(factory),registeredInModuleLoader=!0),"object"==typeof exports&&(module.exports=factory(),registeredInModuleLoader=!0),!registeredInModuleLoader){var OldCookies=window.Cookies,api=window.Cookies=factory();api.noConflict=function(){return window.Cookies=OldCookies,api}}}((function(){function extend(){for(var i=0,result={};i");u=function(){var J,L,K;if(z){return;}I=p.height();J=parseInt(w.css("border-top-width"),10);L=parseInt(w.css("padding-top"),10); G=parseInt(w.css("padding-bottom"),10);q=w.offset().top+J+L;i=w.height();if(r){r=false;D=false;if(f==null){t.insertAfter(v);v.detach();}t.css({position:"",top:"",width:"",bottom:""}).removeClass(g); K=true;}B=t.offset().top-(parseInt(t.css("margin-top"),10)||0)-l;C=t.outerHeight(true);y=t.css("float");if(v){v.css({width:t.outerWidth(true),height:C,display:t.css("display"),"vertical-align":t.css("vertical-align"),"float":y}); }if(K){return E();}};u();if(C===i){return;}F=void 0;s=l;A=c;E=function(){var L,O,M,K,J,N;if(z){return;}M=false;if(A!=null){A-=1;if(A<=0){A=c;u();M=true; }}if(!M&&p.height()!==I){u();M=true;}K=b.scrollTop();if(F!=null){O=K-F;}F=K;if(r){if(o){J=K+C+s>i+q;if(D&&!J){D=false;t.css({position:"fixed",bottom:"",top:s}).trigger("sticky_kit:unbottom"); }}if(KN){if(!D){s-=O;s=Math.max(N-C,s);s=Math.min(l,s);if(r){t.css({top:s+"px"});}}}}}else{if(K>B){r=true;L={position:"fixed",top:s}; L.width=t.css("box-sizing")==="border-box"?t.outerWidth()+"px":t.width()+"px";t.css(L).addClass(g);if(f==null){t.after(v);if(y==="left"||y==="right"){v.append(t); }}t.trigger("sticky_kit:stick");}}if(r&&o){if(J==null){J=K+C+s>i+q;}if(!D&&J){D=true;if(w.css("position")==="static"){w.css({position:"relative"});}return t.css({position:"absolute",bottom:G,top:"auto"}).trigger("sticky_kit:bottom"); }}};x=function(){u();return E();};H=function(){z=true;b.off("touchmove",E);b.off("scroll",E);b.off("resize",x);a(document.body).off("sticky_kit:recalc",x); t.off("sticky_kit:detach",H);t.removeData("sticky_kit");t.css({position:"",bottom:"",top:"",width:""});w.position("position","");if(r){if(f==null){if(y==="left"||y==="right"){t.insertAfter(v); }v.remove();}return t.removeClass(g);}};b.on("touchmove",E);b.on("scroll",E);b.on("resize",x);a(document.body).on("sticky_kit:recalc",x);t.on("sticky_kit:detach",H); return setTimeout(E,0);};for(j=0,k=this.length;j0&&i'+v+""),p=e("#ez-toc-height-test"),b=p.height(),p.remove(),b-(g.children("ul").first().height()||0)),e(".ez-toc-widget-container ul.ez-toc-list li.active").css("height",m+"px")}}function f(){e(window).off("load resize scroll",h)}l.length>0&&e(".ez-toc-widget-container").length&&e(window).on("load resize scroll",h)}e("#ez-toc-container").length&&!e("#ez-toc-container .ez-toc-toggle label span").html()&&e("#ez-toc-container .ez-toc-toggle label").html(ezTOC.fallbackIcon),ezTOC.init=function(){t()},t(),void 0!==ezTOC.ajax_toggle&&1===parseInt(ezTOC.ajax_toggle)&&e(document).ajaxComplete(function(){t()})}e(document).on("click","#ez-toc-open-sub-hd",function(t){e(this).attr("id","ez-toc-open-sub-hd-active"),t.preventDefault()}),e(document).on("click","#ez-toc-open-sub-hd-active",function(t){e(this).attr("id","ez-toc-open-sub-hd"),t.preventDefault()}),e("#ez-toc-more-links-enabler").click(function(){e(".ez-toc-more-link").show(),e("#ez-toc-more-links-enabler").hide(),e("#ez-toc-more-links-disabler").attr("style","display:inline-block")}),e("#ez-toc-more-links-disabler").click(function(){e(".ez-toc-more-link").hide(),e("#ez-toc-more-links-enabler").show(),e("#ez-toc-more-links-disabler").hide()}),1===parseInt(ezTOC.chamomile_theme_is_on)&&e("#ez-toc-container").find(".hamburger").remove()});; /** * Makes "skip to content" link work correctly in IE9, Chrome, and Opera * for better accessibility. * * @link http://www.nczonline.net/blog/2013/01/15/fixing-skip-to-content-links/ */ ( function() { var isWebkit = navigator.userAgent.toLowerCase().indexOf( 'webkit' ) > -1, isOpera = navigator.userAgent.toLowerCase().indexOf( 'opera' ) > -1, isIE = navigator.userAgent.toLowerCase().indexOf( 'msie' ) > -1; if ( ( isWebkit || isOpera || isIE ) && document.getElementById && window.addEventListener ) { window.addEventListener( 'hashchange', function() { var id = location.hash.substring( 1 ), element; if ( ! ( /^[A-z0-9_-]+$/.test( id ) ) ) { return; } element = document.getElementById( id ); if ( element ) { if ( ! ( /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) ) { element.tabIndex = -1; } element.focus(); // Repositions the window on jump-to-anchor to account for admin bar and border height. window.scrollBy( 0, -53 ); } }, false ); } } )(); ; /* global screenReaderText */ /** * Theme functions file. * * Contains handlers for navigation and widget area. */ ( function () { 'use strict'; var mainNav, masthead, menuToggle, siteNavigation, socialNavigation, siteHeaderMenu, resizeTimer; function matches( el, sel ) { if ( Element.prototype.matches ) { return el.matches( sel ); } if ( Element.prototype.msMatchesSelector ) { return el.msMatchesSelector( sel ); } } // Based on https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#Polyfill function closest( el, sel ) { if ( el.closest ) { return el.closest( sel ); } var current = el; do { if ( matches( el, sel ) ) { return current; } current = current.parentElement || current.parentNode; } while ( current !== null && current.nodeType === 1 ); return null; } function forEachNode( parent, selector, fn ) { var nodes = parent.querySelectorAll( selector ); for ( var i = 0; i < nodes.length; i++ ) { fn( nodes[ i ] ); } } function initMainNavigation( container ) { forEachNode( container, '.menu-item-has-children > a', function ( el ) { // Add dropdown toggle that displays child menu items. var dropdownToggle = document.createElement( 'button' ); dropdownToggle.className = 'dropdown-toggle'; dropdownToggle.setAttribute( 'aria-expanded', 'false' ); var span = document.createElement( 'span' ); span.className = 'screen-reader-text'; span.textContent = screenReaderText.expand; dropdownToggle.appendChild( span ); el.parentNode.insertBefore( dropdownToggle, el.nextSibling ); } ); // Toggle buttons and submenu items with active children menu items. forEachNode( container, '.current-menu-ancestor > button', function ( el ) { el.classList.add( 'toggled-on' ); } ); forEachNode( container, '.current-menu-ancestor > .sub-menu', function ( el ) { el.classList.add( 'toggled-on' ); } ); // Add menu items with submenus to aria-haspopup="true". forEachNode( container, '.menu-item-has-children', function ( el ) { el.setAttribute( 'aria-haspopup', 'true' ); } ); forEachNode( container, '.dropdown-toggle', function ( el ) { el.addEventListener( 'click', function ( e ) { var screenReaderSpan = el.querySelector( '.screen-reader-text' ); e.preventDefault(); el.classList.toggle( 'toggled-on' ); var next = el.nextElementSibling; if ( next && matches( next, '.children, .sub-menu' ) ) { next.classList.toggle( 'toggled-on' ); } el.setAttribute( 'aria-expanded', el.getAttribute( 'aria-expanded' ) === 'false' ? 'true' : 'false' ); screenReaderSpan.textContent = screenReaderSpan.textContent === screenReaderText.expand ? screenReaderText.collapse: screenReaderText.expand; } ); } ); } mainNav = document.querySelector( '.main-navigation' ); if ( mainNav ) { initMainNavigation( mainNav ); } masthead = document.querySelector( '#masthead' ); menuToggle = masthead && masthead.querySelector( '#menu-toggle' ); siteHeaderMenu = masthead && masthead.querySelector( '#site-header-menu' ); siteNavigation = masthead && masthead.querySelector( '#site-navigation' ); socialNavigation = masthead && masthead.querySelector( '#social-navigation' ); // Enable menuToggle. ( function () { // Return early if menuToggle is missing. if ( ! menuToggle ) { return; } var controls = [ menuToggle, siteNavigation, socialNavigation ].filter( Boolean ); // Add an initial values for the attribute. controls.forEach( function ( el ) { el.setAttribute( 'aria-expanded', 'false' ); } ); menuToggle.addEventListener( 'click', function () { menuToggle.classList.toggle( 'toggled-on' ); siteHeaderMenu.classList.toggle( 'toggled-on' ); var newVal = menuToggle.getAttribute( 'aria-expanded' ) === 'false' ? 'true' : 'false'; controls.forEach( function ( el ) { el.setAttribute( 'aria-expanded', newVal ); } ); } ); } )(); // Fix sub-menus for touch devices and better focus for hidden submenu items for accessibility. ( function () { if ( ! siteNavigation || ! siteNavigation.children.length ) { return; } // Init `focus` class to allow submenu access on tablets. function initFocusClassTouchScreen() { document.body.addEventListener( 'touchstart', function ( e ) { if ( ! closest( e.target, '.main-navigation li' ) ) { forEachNode( document, '.main-navigation li', function ( el ) { el.classList.remove( 'focus' ); } ); } } ); forEachNode( siteNavigation, '.menu-item-has-children > a', function ( link ) { link.addEventListener( 'touchstart', function ( e ) { if ( window.innerWidth >= 910 ) { var el = link.parentElement; if ( matches( el, 'li' ) && ! el.classList.contains( 'focus' ) ) { e.preventDefault(); el.classList.toggle( 'focus' ); var children = el.parentElement.children; for ( var i = 0; i < children.length; i++ ) { if ( children[ i ] !== el ) { children[ i ].classList.remove( 'focus' ); } } } } } ); } ); } function toggleFocus( el ) { var item = closest( el, '.menu-item' ); if ( item ) { item.classList.toggle( 'focus' ); } } if ( 'ontouchstart' in window ) { initFocusClassTouchScreen(); } forEachNode( siteNavigation, 'a', function ( link ) { link.addEventListener( 'focus', toggleFocus( link ) ); link.addEventListener( 'blur', toggleFocus( link ) ); } ); } )(); // Add the default ARIA attributes for the menu toggle and the navigations. function onResizeARIA() { if ( window.innerWidth < 910 ) { if ( menuToggle && menuToggle.classList.contains( 'toggled-on' ) ) { menuToggle.setAttribute( 'aria-expanded', 'true' ); } else { menuToggle.setAttribute( 'aria-expanded', 'false' ); } if ( siteHeaderMenu && siteHeaderMenu.classList.contains( 'toggled-on' ) ) { siteNavigation && siteNavigation.setAttribute( 'aria-expanded', 'true' ); socialNavigation && socialNavigation.setAttribute( 'aria-expanded', 'true' ); } else { siteNavigation && siteNavigation.setAttribute( 'aria-expanded', 'false' ); socialNavigation && socialNavigation.setAttribute( 'aria-expanded', 'false' ); } menuToggle && menuToggle.setAttribute( 'aria-controls', 'site-navigation social-navigation' ); } else { menuToggle && menuToggle.removeAttribute( 'aria-expanded' ); siteNavigation && siteNavigation.removeAttribute( 'aria-expanded' ); socialNavigation && socialNavigation.removeAttribute( 'aria-expanded' ); menuToggle && menuToggle.removeAttribute( 'aria-controls' ); } } // Add 'below-entry-meta' class to elements. function belowEntryMetaClass( selector ) { if ( document.body.classList.contains( 'page' ) || document.body.classList.contains( 'search' ) || document.body.classList.contains( 'single-attachment' ) || document.body.classList.contains( 'error404' ) ) { return; } forEachNode( document, '.entry-content', function ( content ) { forEachNode( content, selector, function ( element ) { var elementPosTop = element.getBoundingClientRect().top; var article = closest( element, 'article' ); var entryFooter = article && article.querySelector( '.entry-footer' ); var entryFooterPosBottom = entryFooter ? entryFooter.getBoundingClientRect().top + entryFooter.offsetHeight + 28 : null; var caption = closest( element, 'figure' ); var next = element.nextSibling; var figcaption = next && matches( next, 'figcaption' ) ? next : null; var newImg; // Add 'below-entry-meta' to elements below the entry meta. if ( entryFooterPosBottom !== null && elementPosTop > entryFooterPosBottom ) { // Check if full-size images and captions are larger than or equal to 840px. if ( selector === 'img.size-full' || selector === '.wp-block-image img' ) { // Create an image to find native image width of resized images (i.e. max-width: 100%). newImg = new Image(); newImg.src = element.getAttribute( 'src' ); newImg.onload = function () { if ( newImg.width >= 840 ) { // Check if an image in an image block has a width attribute; if its value is less than 840, return. if ( selector === '.wp-block-image img' && element.hasAttribute( 'width' ) && element.getAttribute( 'width' ) < 840 ) { return; } element.classList.add( 'below-entry-meta' ); if ( caption && caption.classList.contains( 'wp-caption' ) ) { caption.classList.add( 'below-entry-meta' ); caption.removeAttribute( 'style' ); } if ( figcaption ) { figcaption.classList.add( 'below-entry-meta' ); } } }; } else { element.classList.add( 'below-entry-meta' ); } } else { element.classList.remove( 'below-entry-meta' ); caption && caption.classList.remove( 'below-entry-meta' ); } } ); } ); } function init() { window.addEventListener( 'load', onResizeARIA ); window.addEventListener( 'resize', function () { clearTimeout( resizeTimer ); resizeTimer = setTimeout( function () { belowEntryMetaClass( 'img.size-full' ); belowEntryMetaClass( 'blockquote.alignleft, blockquote.alignright' ); belowEntryMetaClass( '.wp-block-image img' ); }, 300 ); onResizeARIA(); } ); belowEntryMetaClass( 'img.size-full' ); belowEntryMetaClass( 'blockquote.alignleft, blockquote.alignright' ); belowEntryMetaClass( '.wp-block-image img' ); } if ( document.readyState === 'loading' ) { document.addEventListener( 'DOMContentLoaded', init ); } else { init(); } } )(); ; (()=>{var e=[],t=!1,i=[],n=new Promise((e=>{"loading"!==document.readyState?e():window.addEventListener("DOMContentLoaded",(()=>e()))}));function o(e,t){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){return}if(t&&"function"==typeof t.postMessage)try{t.postMessage(JSON.stringify({type:"likesMessage",data:e}),"*")}catch(e){return}}function s(){const t=[];document.querySelectorAll("div.jetpack-likes-widget-unloaded").forEach((i=>{if(!(e.indexOf(i.id)>-1)&&c(i)){e.push(i.id);var n,o=/like-(post|comment)-wrapper-(\d+)-(\d+)-(\w+)/.exec(i.id);o&&5===o.length&&(n={blog_id:o[2],width:i.width},"post"===o[1]?n.post_id=o[3]:"comment"===o[1]&&(n.comment_id=o[3]),n.obj_id=o[4],t.push(n))}})),t.length>0&&o({event:"initialBatch",requests:t},window.frames["likes-master"])}function l(){const e=document.querySelector("#likes-other-gravatars");if(e){e.style.display="none",e.setAttribute("aria-hidden","true");const t=e.__resizeHandler;t&&(window.removeEventListener("resize",t),delete e.__resizeHandler)}}function a(){var e;if(t){!function(){for(let e=i.length-1;e>=0;e--){const t=i[e];if(!c(t)){const n=t&&t.parentElement&&t.parentElement.parentElement;n.classList.remove("jetpack-likes-widget-loaded"),n.classList.remove("jetpack-likes-widget-loading"),n.classList.add("jetpack-likes-widget-unloaded"),n.querySelectorAll(".comment-likes-widget-placeholder").forEach((e=>e.style.display="block")),i.splice(e,1),t.remove()}}}();var n=[...document.querySelectorAll("div.jetpack-likes-widget-unloaded")].filter((e=>c(e)));n.length>0&&s();for(var o=0,l=n.length;o<=l-1;o++)(e=n[o].id)&&r(e)}else setTimeout(a,500)}function r(e){if(void 0===e)return;const t=document.querySelector("#"+e);t.querySelectorAll("iframe").forEach((e=>e.remove()));const n=t.querySelector(".likes-widget-placeholder");if(n&&n.classList.contains("post-likes-widget-placeholder")){const e=document.createElement("iframe");e.classList.add("post-likes-widget","jetpack-likes-widget"),e.name=t.dataset.name,e.src=t.dataset.src,e.height="55px",e.width="100%",e.frameBorder="0",e.scrolling="no",e.title=t.dataset.title,n.after(e)}if(n.classList.contains("comment-likes-widget-placeholder")){const e=document.createElement("iframe");e.class="comment-likes-widget-frame jetpack-likes-widget-frame",e.name=t.dataset.name,e.src=t.dataset.src,e.height="18px",e.width="100%",e.frameBorder="0",e.scrolling="no",t.querySelector(".comment-like-feedback").after(e),i.push(e)}t.classList.remove("jetpack-likes-widget-unloaded"),t.classList.add("jetpack-likes-widget-loading"),t.querySelector("iframe").addEventListener("load",(e=>{o({event:"loadLikeWidget",name:e.target.name,width:e.target.width},window.frames["likes-master"]),t.classList.remove("jetpack-likes-widget-loading"),t.classList.add("jetpack-likes-widget-loaded")}))}function c(e){const t=e.getBoundingClientRect().top,i=e.getBoundingClientRect().bottom;return t+2e3>=0&&i<=window.innerHeight+2e3}window.addEventListener("message",(function(e){let i=e&&e.data;if("string"==typeof i)try{i=JSON.parse(i)}catch(e){return}const a=i&&i.type,r=i&&i.data;if("likesMessage"!==a||void 0===r.event)return;if("https://widgets.wp.com"===e.origin)switch(r.event){case"masterReady":n.then((()=>{t=!0;const e={event:"injectStyles"},i=document.querySelector(".sd-text-color"),n=document.querySelector(".sd-link-color"),l=i&&getComputedStyle(i)||{},a=n&&getComputedStyle(n)||{};document.body.classList.contains("single")&&o({event:"reblogsEnabled"},window.frames["likes-master"]),e.textStyles={color:l.color,fontFamily:l["font-family"],fontSize:l["font-size"],direction:l.direction,fontWeight:l["font-weight"],fontStyle:l["font-style"],textDecoration:l["text-decoration"]},e.linkStyles={color:a.color,fontFamily:a["font-family"],fontSize:a["font-size"],textDecoration:a["text-decoration"],fontWeight:a["font-weight"],fontStyle:a["font-style"]},o(e,window.frames["likes-master"]),s()}));break;case"showLikeWidget":{const e=document.querySelector(`#${r.id} .likes-widget-placeholder`);e&&(e.style.display="none");break}case"showCommentLikeWidget":{const e=document.querySelector(`#${r.id} .likes-widget-placeholder`);e&&(e.style.display="none");break}case"killCommentLikes":document.querySelectorAll(".jetpack-comment-likes-widget-wrapper").forEach((e=>e.remove()));break;case"clickReblogFlair":wpcom_reblog&&"function"==typeof wpcom_reblog.toggle_reblog_box_flair&&wpcom_reblog.toggle_reblog_box_flair(r.obj_id);break;case"hideOtherGravatars":l();break;case"showOtherGravatars":{const e=document.querySelector("#likes-other-gravatars");if(!e)break;const t=e.classList.contains("wpl-new-layout"),i=e.querySelector("ul");e.style.display="none",i.innerHTML="",t?e.querySelectorAll(".likes-text span").forEach((e=>e.textContent=r.totalLikesLabel)):e.querySelectorAll(".likes-text span").forEach((e=>e.textContent=r.total)),(r.likers||[]).forEach((async(e,n)=>{if("http"!==e.profile_URL.substr(0,4))return;const s=document.createElement("li");i.append(s),s.innerHTML=t?`\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t`:`\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t`,s.classList.add(e.css_class),s.querySelector("img").alt=r.avatarAltTitle.replace("%s",e.name),t&&(s.querySelector("span").innerText=e.name),n===r.likers.length-1&&s.addEventListener("keydown",(e=>{"Tab"!==e.key||e.shiftKey||(e.preventDefault(),l(),o({event:"focusLikesCount",parent:r.parent},window.frames["likes-master"]))}))}));const n=function(){const n="rtl"===getComputedStyle(e).direction,o=document.querySelector(`*[name='${r.parent}']`),s=o.getBoundingClientRect(),l=o.ownerDocument.defaultView,a=s.top+l.pageYOffset,c=s.left+l.pageXOffset;let d=0;if(t){if(e.style.top=a+r.position.top-1+"px",n){const t=r&&r.likers?Math.min(r.likers.length,5):0;d=c+r.position.left+24*t+4,e.style.transform="translateX(-100%)"}else d=c+r.position.left;e.style.left=d+"px"}else e.style.left=c+r.position.left-10+"px",e.style.top=a+r.position.top-33+"px";const f=r.width-20,p=Math.floor(f/37);let m=37*Math.ceil(r.likers.length/p)+17+22;if(m>204&&(m=204),!t){const t=37*p+13;e.style.height=m+"px",e.style.width=t+"px";const n=37*p;i.style.width=n+"px"}if(t){e.style.left="-9999px",e.style.display="block";const t=e.offsetWidth;d+t>l.innerWidth&&(d=s.right-t),e.style.left=d+"px"}else e.style.display="block";e.setAttribute("aria-hidden","false")};n(),e.focus();const s=function(e,t){var i;return function(){var n=this,o=arguments;clearTimeout(i),i=setTimeout((function(){e.apply(n,o)}),t)}},a=s(n,100);e.__resizeHandler=a,window.addEventListener("resize",a),e.focus()}}})),document.addEventListener("click",l);var d,f,p,m=(d=250,f=a,function(){clearTimeout(p),p=setTimeout(f,d)});a(),window.addEventListener("scroll",m,!0)})();;