!function(t){OffSet={_setoffset:function(t){return window.matchMedia("(max-width: 767px)").matches?void 0==t.data("scroll-offset-mobile")?(scroll_offset=t.data("scroll-offset"),scroll_offset):(scroll_offset=t.data("scroll-offset-mobile"),scroll_offset):window.matchMedia("(max-width: 976px)").matches?void 0==t.data("scroll-offset-tablet")?(scroll_offset=t.data("scroll-offset"),scroll_offset):(scroll_offset=t.data("scroll-offset-tablet"),scroll_offset):(scroll_offset=t.data("scroll-offset"),scroll_offset)},__scroll_to_top_offset:function(t,o){return window.matchMedia("(max-width: 767px)").matches?void 0==t.data("scroll-to-top-offset-mobile")?o:o=t.data("scroll-to-top-offset-mobile"):window.matchMedia("(max-width: 976px)").matches?void 0==t.data("scroll-to-top-offset-tablet")?o:o=t.data("scroll-to-top-offset-tablet"):o}};var o=function(o){return this.each(function(){var e,a,l=t(this),n=l.data(),s=[l],i=this.tagName,c=0;e=t.extend({content:"body",headings:"h1,h2,h3,h4,h5,h6"},{content:n.toc||void 0,headings:n.tocHeadings||void 0},o),a=e.headings.split(","),t(e.content).find(e.headings).length||($widget_scope=t("body").find(".elementor-element-"+o.scope),$widget_scope.find(".uael-toc-main-wrapper").addClass("uael-toc-content-empty")),t(e.content).find(e.headings).addClass("uael-toc-text"),t("body").find(".uae-toc-hide-heading").each(function(o){var e=t(this);e.hasClass("uael-toc-text")&&e.addClass("uael-toc-hidden-item"),e.find(".uael-toc-text").addClass("uael-toc-hidden-item")}),t(e.content).find(e.headings).attr("id",function(o,e){void 0!==e&&(e=e.replace(/[&\/\\#,+()$!~%.'":*?<>{}]/g,""));return e||function(t){0===t.length&&(t="?");var o=t.replace(/\s+/g,"_"),e="",a=1;for(o=o.replace(/[&\/\\#,+()$!~%.'":*?<>{}]/g,"");null!==document.getElementById(o+e);)e="_"+a++;return o+e}(t(this).text())}).each(function(){var o=t(this),e=t.map(a,function(t,e){return o.is(t)?e:void 0})[0];if(!o.hasClass("uael-toc-hidden-item")){if(e>c){var l=s[0].children("li:last")[0];l&&s.unshift(t("<"+i+"/>").appendTo(l))}else s.splice(0,Math.min(c-e,Math.max(s.length-1,0)));t("
  • ").appendTo(s[0]).append(t("").text(o.text()).attr("href","#"+o.attr("id"))),c=e}})})},e=t.fn.toc;t.fn.toc=o,t.fn.toc.noConflict=function(){return t.fn.toc=e,this},t(function(){o.call(t("[data-toc]"))});var a=null;UAELTableOfContents={_showHideScroll:function(){null!=(a=t(".uael-scroll-top-icon"))&&(t(window).scrollTop()>300?a.addClass("uael-toc__show-scroll"):a.removeClass("uael-toc__show-scroll"))},_toggleButton:function(t,o,e){t.toggle(100),o.hasClass("content-show")?(e.slideUp(350),o.removeClass("content-show")):(e.slideDown(350),o.addClass("content-show")),o.hasClass("uael-toc-auto-collapse")?o.removeClass("uael-toc-auto-collapse"):o.toggleClass("uael-toc-hidden")}},WidgetUAELTableOfContents=function(t,o){var e=o("body"),a=e.find(".entry-content"),l=t.data("id"),n=t.find(".uael-toc-switch"),s=t.find(".uael-toc-toggle-content"),i=n.data("is-collapsible"),c=t.find(".uael-toc-main-wrapper"),d=c.data("headings"),f=t.find(".uael-toc-list"),r=f.data("scroll"),h=t.find(".uael-separator-parent"),u=OffSet._setoffset(f),p=f.data("scroll-to-top-offset"),m=OffSet.__scroll_to_top_offset(f,p);0===a.length&&(a=e.find(".page-content")),0===a.length&&(a=e.find("div[data-elementor-type]")),window.onresize=function(){u=OffSet._setoffset(f),p=f.data("scroll-to-top-offset"),m=OffSet.__scroll_to_top_offset(f,p)},n.on("click",function(t){"yes"===i&&UAELTableOfContents._toggleButton(h,c,s)}),t.find(".uael-toc-list").toc({content:a,headings:d,scope:l}),c.find(".uael-toc-list a").on("click",function(){return""==u||void 0===u?o("html, body").animate({scrollTop:o(o.attr(this,"href")).offset().top-30},r):o("html, body").animate({scrollTop:o(o.attr(this,"href")).offset().top-u},r),t.find(".uael-toc-list a").not(this).removeClass("uael-toc-active-heading"),o(this).addClass("uael-toc-active-heading"),!1}),t.find(".uael-toc-wrapper li").each(function(t){o(this).attr("id","toc-li-"+t)}),t.find(".uael-scroll-top-icon").on("click",function(t){""==m||void 0===m?o("html, body").animate({scrollTop:c.offset().top},r):o("html, body").animate({scrollTop:m},r)}),o(document).on("scroll",UAELTableOfContents._showHideScroll)},t(window).on("elementor/frontend/init",function(){elementorFrontend.hooks.addAction("frontend/element_ready/uael-table-of-contents.default",WidgetUAELTableOfContents)})}(jQuery);