'use strict';((f,q,k)=>{let m,n,p="click";k.isTouch&&(p+=" touchend");const h=(a,c)=>/touch/.test(a.type)?(a.originalEvent||a).changedTouches[0]["page"+c]:a["page"+c],r=(a,c)=>{const d=a.find(".sub-menu, .children").first(),b=a.find("> a .child-arrow");let e="open";!0===c?(d.css("visibility","visible").slideDown(),a.addClass("dropdown-open toggle-on"),b.removeClass("closed").addClass("open")):(d.slideUp(()=>{f(this).css("visibility","hidden")}),a.removeClass("dropdown-open toggle-on"),b.removeClass("open").addClass("closed"),
e="close");a.trigger("dropdown_"+e)},t=()=>{if(k.isTouch)k.body.on("touchstart",".child-arrow, .with-sub-arrow a",a=>{a.stopPropagation();m=h(a,"X");n=h(a,"Y")});k.body.on(p,".child-arrow",function(a){a.stopPropagation();if("click"===a.type||20>Math.abs(h(a,"X")-m)&&20>Math.abs(h(a,"Y")-n)){a=f(this).closest("li");const c=f(this).parents(".dropdown-open");f(this).closest(".with-sub-arrow").find("li.dropdown-open").not(c).each(function(){r(f(this),!1)});r(a,!a.hasClass("dropdown-open"))}return!1}).on(p,
".with-sub-arrow a",function(a){if(20>Math.abs(h(a,"X")-m)&&20>Math.abs(h(a,"Y")-n)&&"#"===f(this).attr("href"))return a.stopPropagation(),f(this).find("> .child-arrow").click(),!1})};k.on("tf_dropdown_init",a=>{a instanceof jQuery&&(a=a.get());void 0===a.length&&(a=[a]);for(let g=a.length-1;-1<g;--g)if(!a[g].classList.contains("with-sub-arrow")){a[g].className+=" with-sub-arrow";let l=a[g].getElementsByClassName("menu-item-has-children");for(var c=l.length-1;-1<c;--c){var d=l[c].children;for(var b=
d.length-1;-1<b;--b)if("A"===d[b].tagName&&!d[b].getElementsByClassName("child-arrow")[0]&&!d[b].classList.contains("themify_lightbox")){var e=q.createElement("span");e.className="child-arrow closed";d[b].appendChild(e)}}l=a[g].getElementsByClassName("page_item_has_children");for(c=l.length-1;-1<c;--c)for(d=l[c].children,b=d.length-1;-1<b;--b)"A"!==d[b].tagName||d[b].getElementsByClassName("child-arrow")[0]||d[b].classList.contains("themify_lightbox")||(e=q.createElement("span"),e.className="child-arrow closed",
d[b].appendChild(e))}t()})})(jQuery,document,Themify);
