!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";n.r(t);var r=".wpml-language-switcher-block .wp-block-navigation-submenu__toggle, .wpml-language-switcher-navigation-block .wp-block-navigation-submenu__toggle";function o(e){var t=e?e.nextElementSibling:null;return t?Array.prototype.slice.call(t.querySelectorAll("a")):[]}function a(e){e.classList.add("wpml-ls-keyboard-focus"),e.setAttribute("aria-expanded","true")}function i(e,t){e&&(e.classList.remove("wpml-ls-keyboard-focus"),e.setAttribute("aria-expanded","false"),t&&e.focus())}function l(e,t){if(0!==e.length){var n=t;n<0&&(n=0),n>=e.length&&(n=e.length-1),e[n].focus()}}function u(e){if("1"!==e.dataset.wpmlFrontendKb){e.dataset.wpmlFrontendKb="1";var t=!!e.closest(".open-on-click"),n=e.nextElementSibling;null===e.getAttribute("aria-expanded")&&e.setAttribute("aria-expanded","false"),t||e.addEventListener("focus",(function(){"true"!==e.getAttribute("aria-expanded")&&(e.classList.remove("wpml-ls-keyboard-focus"),e.setAttribute("aria-expanded","false"))})),e.addEventListener("keydown",(function(n){var r=n.key||"";if("Enter"!==r&&" "!==r&&"Spacebar"!==r)if("ArrowDown"!==r&&"Down"!==r)"Escape"!==r&&"Esc"!==r||(n.preventDefault(),i(e,!0));else{n.preventDefault(),a(e);var l=o(e);l.length&&l[0].focus()}else if(n.preventDefault(),t){var u="true"===e.getAttribute("aria-expanded");if(e.setAttribute("aria-expanded",u?"false":"true"),!u){var c=o(e);c.length&&c[0].focus()}}else if(function(e){return"true"===e.getAttribute("aria-expanded")}(e))i(e,!0);else{a(e);var d=o(e);d.length&&d[0].focus()}})),n&&n.addEventListener("keydown",(function(t){var n=t.key||"",r=o(e),a=r.indexOf(document.activeElement);return"ArrowDown"===n||"Down"===n?(t.preventDefault(),void l(r,a+1)):"ArrowUp"===n||"Up"===n?(t.preventDefault(),void(a<=0?e.focus():l(r,a-1))):"Escape"===n||"Esc"===n?(t.preventDefault(),void i(e,!0)):void("Enter"!==n&&" "!==n&&"Spacebar"!==n||!document.activeElement||"A"!==document.activeElement.tagName||document.activeElement.click())})),t||e.addEventListener("blur",(function(){var t=e.closest("li");setTimeout((function(){t&&!t.contains(document.activeElement)&&i(e,!1)}),100)})),n&&n.addEventListener("focusout",(function(){var t=e.closest("li");setTimeout((function(){t&&!t.contains(document.activeElement)&&i(e,!1)}),100)}))}}function c(e){for(var t=document.querySelectorAll(r),n=0;n<t.length;n++){var o=t[n].closest("li");o&&!o.contains(e.target)&&i(t[n],!1)}}function d(){if(void 0===window.wpmlLSBlockKeyboardFrontend){window.wpmlLSBlockKeyboardFrontend=!0;for(var e=document.querySelectorAll(r),t=0;t<e.length;t++)e[t].closest("[data-block]")||u(e[t]);document.addEventListener("click",c)}}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",d):d()}]);