(()=>{"use strict";var e={n:n=>{var o=n&&n.__esModule?()=>n.default:()=>n;return e.d(o,{a:o}),o},d:(n,o)=>{for(var c in o)e.o(o,c)&&!e.o(n,c)&&Object.defineProperty(n,c,{enumerable:!0,get:o[c]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n)};const n=window.wp.domReady;e.n(n)()((function(){jQuery((function(e){e("html, body").css("scroll-behavior","smooth"),e(".mcv-menu-header").on("click",(function(){e(this).parent().toggleClass("mcv-menu-selected"),e(this).next(".mcv-menu-content").slideToggle("fast")}));let n="",o=[];e(".wp-block-heading").each((function(c){const s=e(this),t=s.text();let l="";"H3"===s[0].nodeName?l=' style="margin-left:16px;"':"H4"===s[0].nodeName&&(l=' style="margin-left:32px;"');const a=t+c;s.before(`<span style="position:absolute;margin-top:-59px;" \n                 id="${a}"></span>`),n+=`\n                <div class="mcv-anchor-link"${l}>\n                    <a class="mcv-anchor-link-title" title="${t}" href="#${a}">\n                        ${t}\n                    </a>\n                </div>`,o.push(s.offset().top)})),e(".mcv-doc-anchor").html(`\n            <div class="mcv-anchor-list">\n                <div class="mcv-anchor-inner">\n                    <div class="mcv-anchor-line-slider" style="top: 0px;"></div>\n                    <div class="mcv-anchor-list-inner">\n                        ${n}\n                    </div>\n                </div>\n            </div>\n        `),e(window).on("scroll",(function(){const n=e(document).scrollTop();let c=0;if(n>=o[o.length-1])c=o.length-1;else for(let e=0;e<o.length;e++)if(n>o[e]&&n<o[e+1]){c=e+1;break}e(".mcv-anchor-line-slider").css("top",32*c+"px")})),e(".mcv-doc-nav-item.left-menu").on("click",(function(){e(".mcv-doc-anchor").hasClass("open")?e(".mcv-doc-anchor").removeClass("open"):e(".mcv-doc-mask").toggleClass("open"),e(".mcv-doc-left").toggleClass("open")})),e(".mcv-doc-nav-item.right-menu").on("click",(function(){e(".mcv-doc-left").hasClass("open")?e(".mcv-doc-left").removeClass("open"):e(".mcv-doc-mask").toggleClass("open"),e(".mcv-doc-anchor").toggleClass("open")})),e(".mcv-doc-mask").on("click",(function(){e(".mcv-doc-mask").removeClass("open"),e(".mcv-doc-left").removeClass("open"),e(".mcv-doc-anchor").removeClass("open")}))}))}))})();