!function(){"use strict";function a(){function b(a,b){this.scrollLeft=a,this.scrollTop=b}function g(a){if(null===a||"object"!=typeof a||void 0===a.behavior||"auto"===a.behavior||"instant"===a.behavior)return!0;if("object"==typeof a&&"smooth"===a.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+a.behavior+" is not a valid value for enumeration ScrollBehavior.")}function f(a,b){return"Y"===b?a.clientHeight+e<a.scrollHeight:"X"===b?a.clientWidth+e<a.scrollWidth:void 0}function j(a,b){var c=d.getComputedStyle(a,null)["overflow"+b];return"auto"===c||"scroll"===c}function k(a){var b,f,g,h,j=(u()-a.startTime)/o;h=j=1<j?1:j,b=.5*(1-Math.cos(Math.PI*h)),f=a.startX+(a.x-a.startX)*b,g=a.startY+(a.y-a.startY)*b,a.method.call(a.scrollable,f,g),f===a.x&&g===a.y||d.requestAnimationFrame(k.bind(d,a))}function a(g,i,e){var j,l,n,o,r=u();g===m.body?(j=d,l=d.scrollX||d.pageXOffset,n=d.scrollY||d.pageYOffset,o=q.scroll):(j=g,l=g.scrollLeft,n=g.scrollTop,o=b),k({scrollable:j,method:o,startTime:r,startX:l,startY:n,x:i,y:e})}var d=window,m=document;if(!("scrollBehavior"in m.documentElement.style&&!0!==d.__forceSmoothScrollPolyfill__)){var h,n=d.HTMLElement||d.Element,o=468,q={scroll:d.scroll||d.scrollTo,scrollBy:d.scrollBy,elementScroll:n.prototype.scroll||b,scrollIntoView:n.prototype.scrollIntoView},u=d.performance&&d.performance.now?d.performance.now.bind(d.performance):Date.now,e=(h=d.navigator.userAgent,new RegExp("MSIE |Trident/|Edge/").test(h)?1:0);d.scroll=d.scrollTo=function(){void 0!==arguments[0]&&(!0===g(arguments[0])?q.scroll.call(d,void 0===arguments[0].left?"object"==typeof arguments[0]?d.scrollX||d.pageXOffset:arguments[0]:arguments[0].left,void 0===arguments[0].top?void 0===arguments[1]?d.scrollY||d.pageYOffset:arguments[1]:arguments[0].top):a.call(d,m.body,void 0===arguments[0].left?d.scrollX||d.pageXOffset:~~arguments[0].left,void 0===arguments[0].top?d.scrollY||d.pageYOffset:~~arguments[0].top))},d.scrollBy=function(){void 0!==arguments[0]&&(g(arguments[0])?q.scrollBy.call(d,void 0===arguments[0].left?"object"==typeof arguments[0]?0:arguments[0]:arguments[0].left,void 0===arguments[0].top?void 0===arguments[1]?0:arguments[1]:arguments[0].top):a.call(d,m.body,~~arguments[0].left+(d.scrollX||d.pageXOffset),~~arguments[0].top+(d.scrollY||d.pageYOffset)))},n.prototype.scroll=n.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==g(arguments[0])){var b=arguments[0].left,c=arguments[0].top;a.call(this,this,void 0===b?this.scrollLeft:~~b,void 0===c?this.scrollTop:~~c)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");q.elementScroll.call(this,void 0===arguments[0].left?"object"==typeof arguments[0]?this.scrollLeft:~~arguments[0]:~~arguments[0].left,void 0===arguments[0].top?void 0===arguments[1]?this.scrollTop:~~arguments[1]:~~arguments[0].top)}},n.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0===g(arguments[0])?q.elementScroll.call(this,void 0===arguments[0].left?~~arguments[0]+this.scrollLeft:~~arguments[0].left+this.scrollLeft,void 0===arguments[0].top?~~arguments[1]+this.scrollTop:~~arguments[0].top+this.scrollTop):this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}))},n.prototype.scrollIntoView=function(){if(!0!==g(arguments[0])){var b=function(a){for(;a!==m.body&&!1===(c=f(b=a,"Y")&&j(b,"Y"),d=f(b,"X")&&j(b,"X"),c||d);)a=a.parentNode||a.host;var b,c,d;return a}(this),c=b.getBoundingClientRect(),e=this.getBoundingClientRect();b===m.body?d.scrollBy({left:e.left,top:e.top,behavior:"smooth"}):(a.call(this,b,b.scrollLeft+e.left-c.left,b.scrollTop+e.top-c.top),"fixed"!==d.getComputedStyle(b).position&&d.scrollBy({left:c.left,top:c.top,behavior:"smooth"}))}else q.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}}"object"==typeof exports&&"undefined"!=typeof module?module.exports={polyfill:a}:a()}(),function(){"use strict";window.kadenceTOC={initAddAnchors:function(){var a=JSON.parse(kadence_blocks_toc.headings);for(let e=0;e<a.length;e++){var b=document.querySelectorAll("h"+a[e].level);if(!b.length)return;var c=encodeURIComponent(a[e].content).toString().normalize().replace(/[^\w\s]/gi,"");for(let f=0;f<b.length;f++){var d=b[f].textContent.replace(/×/g,"x").replace(/–/g,"-").replace(/—/g,"-").replace(/…/g,"...").replace(/′/g,"'").replace(/’/g,"'").replace(/‘/g,"'").replace(/“/g,"\"").replace(/”/g,"\"");if(d=encodeURIComponent(d).toString().normalize().replace(/[^\w\s]/gi,""),c===d&&!b[f].getAttribute("id")){b[f].setAttribute("id",a[e].anchor);break}}}},toggleAttribute:function(a,b,c,d){c===void 0&&(c=!0),d===void 0&&(d=!1),a.getAttribute(b)===c?a.setAttribute(b,d):a.setAttribute(b,c)},toggleClass:function(a,b,c){b===void 0&&(b="active"),c===void 0&&(c="hidden"),a.classList.contains(b)?(a.classList.remove(b),a.classList.add(c)):(a.classList.add(b),a.classList.remove(c))},initCollapse:function(){var a=document.querySelectorAll(".kb-collapsible-toc");if(a.length)for(let c=0;c<a.length;c++){var b=a[c].querySelector(".kb-table-of-contents-toggle");b.onclick=()=>{window.kadenceTOC.toggleAttribute(b,"aria-expanded","true","false"),window.kadenceTOC.toggleAttribute(b,"aria-label",kadence_blocks_toc.collapseText,kadence_blocks_toc.expandText),window.kadenceTOC.toggleClass(a[c],"kb-toc-toggle-active","kb-toc-toggle-hidden")}}},scrollToElement(a,b,c=!0){var d=Math.floor(a.getBoundingClientRect().top)-b;window.scrollBy({top:d,left:0,behavior:"smooth"}),a.tabIndex="-1",a.focus({preventScroll:!0}),c&&window.history.pushState("","","#"+a.id)},initScroll:function(){var a=document.querySelectorAll(".kb-toc-smooth-scroll");if(a.length)for(let d=0;d<a.length;d++){var b=parseInt(a[d].getAttribute("data-scroll-offset")),c=a[d].querySelectorAll("a.kb-table-of-contents__entry");for(let a=0;a<c.length;a++)c[a].onclick=a=>{if(a.target.getAttribute("href"))var c=a.target;else{var c=a.target.closest("a");if(!c)return;if(!c.getAttribute("href"))return}var d=c.getAttribute("href").substring(c.getAttribute("href").indexOf("#")),e=document.getElementById(d.replace("#",""));e&&(a.preventDefault(),window.kadenceTOC.scrollToElement(e,b))}}},initScrollSpy:function(){if("function"==typeof Gumshoe){var a=document.querySelectorAll(".wp-block-kadence-tableofcontents[data-scroll-spy=\"true\"]");if(!a.length)return;var b=[];for(let d=0;d<a.length;d++){var c=parseInt(a[d].getAttribute("data-scroll-offset"));b[d]=new Gumshoe("."+a[d].classList[2]+" .kb-table-of-content-list a",{nested:!0,nestedClass:"active-parent",offset:function(){return c?c:0}})}}},init:function(){window.kadenceTOC.initAddAnchors(),window.kadenceTOC.initCollapse(),window.kadenceTOC.initScroll(),window.kadenceTOC.initScrollSpy()}},"loading"===document.readyState?document.addEventListener("DOMContentLoaded",window.kadenceTOC.init):window.kadenceTOC.init()}();