jQuery((function(e){if("undefined"!=typeof ezTOC){function t(){var t;if(0!==e(".ez-toc-widget-container.ez-toc-affix").length){var o=30;void 0!==ezTOC.scroll_offset&&(o=parseInt(ezTOC.scroll_offset)),e(ezTOC.affixSelector).stick_in_parent({inner_scrolling:!1,offset_top:o})}if(e.fn.shrinkTOCWidth=function(){e(this).css({width:"auto",display:"table"}),/MSIE 7\./.test(navigator.userAgent)&&e(this).css("width","")},1===parseInt(ezTOC.smooth_scroll)&&e("a.ez-toc-link").on("click",(function(){var t=e(this),o="",i=t.prop("hostname"),n=t.prop("pathname"),s=t.prop("search"),a=t.prop("hash");if(n.length>0&&"/"!==n.charAt(0)&&(n="/"+n),window.location.hostname===i&&window.location.pathname===n&&window.location.search===s&&""!==a){if(o='[id="'+a.replace("#","")+'"]',0===e(o).length&&(console.log("ezTOC scrollTarget Not Found: "+o),o=""),void 0!==ezTOC.scroll_offset)var c=-1*ezTOC.scroll_offset;else{var l=e("#wpadminbar");c=l.length>0&&l.is(":visible")?-30:0}o&&e.smoothScroll({scrollTarget:o,offset:c,beforeScroll:d,afterScroll:function(){h(),f()}})}})),void 0!==ezTOC.visibility_hide_by_default){var i=e("ul.ez-toc-list"),n=e("a.ez-toc-toggle"),s=ezTOC.visibility_hide_by_default;n.css("display","inline"),Cookies?(1==Cookies.get("ezTOC_hidetoc")?n.data("visible",!1):n.data("visible",!0),Cookies.remove("ezTOC_hidetoc")):(n.data("visible",!0),t="ezTOC_hidetoc",document.cookie=t+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;"),s&&n.data("visible",!1),n.data("visible")||i.hide(),n.on("click",(function(t){t.preventDefault();const o=document.querySelector("#ez-toc-container");if(o)o.classList.toggle("toc_close");else{document.querySelector(".ez-toc-widget-container").classList.toggle("toc_close")}e(this).data("visible")?(e(this).data("visible",!1),Cookies&&(s?Cookies.set("ezTOC_hidetoc",null,{path:"/"}):Cookies.set("ezTOC_hidetoc","1",{expires:30,path:"/"})),i.hide("fast")):(e(this).data("visible",!0),Cookies&&(s?Cookies.set("ezTOC_hidetoc","1",{expires:30,path:"/"}):Cookies.set("ezTOC_hidetoc",null,{path:"/"})),i.show("fast"))}))}var a=e("span.ez-toc-section").toArray(),c=function(t){return t.reduce((function(t,o){return t[o.id]=function(t){return e('.ez-toc-widget-container .ez-toc-list a[href="#'+e(t).attr("id")+'"]')}(o),t}),{})}(a),l=e.map(c,(function(e,t){return e})),r=function(){var t=5;void 0!==ezTOC.smooth_scroll&&1===parseInt(ezTOC.smooth_scroll)&&(t=void 0!==ezTOC.scroll_offset?parseInt(ezTOC.scroll_offset):30);var o=e("#wpadminbar");o.length&&(t+=o.height());return t}();function h(){var t=function(t,o){var i=e(window).scrollTop()+t+1,n=o[0],s=i-e(n).offset().top;return o.forEach((function(t){var o=i-e(t).offset().top;o>0&&o.ez-toc-widget-container ul.ez-toc-list li.active {height:'+t+"px;} ").appendTo("head")}(function(t){var o=e(t),i=o.html();o.parent().append('
  • '+i+"
  • ");var n=e("#ez-toc-height-test"),s=n.height();return n.remove(),s-o.children("ul").first().height()}(t))}(o)}(o)}}function f(){a.length>0&&e(".ez-toc-widget-container").length&&e(window).on("load resize scroll",h)}function d(){e(window).off("load resize scroll",h)}f()}ezTOC.init=function(){t()},t()}}));