(async(o,i)=>{"use strict";await i.loadjQuery();const $=jQuery,n=(o,i)=>{const n=o.find(".sub-menu, .children").first(),r=o.find("> a .child-arrow");let e="open";!0===i?(n.css("visibility","visible").slideDown(),o.addClass("dropdown-open toggle-on"),r.removeClass("closed").addClass("open")):(n.slideUp((()=>{$(this).css("visibility","hidden")})),o.removeClass("dropdown-open toggle-on"),r.removeClass("open").addClass("closed"),e="close"),o.trigger("dropdown_"+e)};i.on("tf_dropdown_init",(o=>{void 0===o.length&&(o=[o]);for(let i=o.length-1;i>-1;--i)o[i].classList.contains("with-sub-arrow")||(o[i].className+=" with-sub-arrow")})),o.body.tfOn("click",(o=>{const i=o.target?.closest(".child-arrow,.with-sub-arrow a");if(i&&i.closest(".with-sub-arrow")){const r=i.classList.contains("child-arrow")?"":i.getAttribute("href");if(!r||"#"===r){o.stopPropagation(),o.preventDefault();const r=$(i),e=r.closest("li"),t=r.parents(".dropdown-open");r.closest(".with-sub-arrow").find("li.dropdown-open").not(t).each((function(){n($(this),!1)})),n(e,!e.hasClass("dropdown-open"))}}}),{passive:!1})})(document,Themify);