(()=>{"use strict";class n{constructor(){this.runned=!1}runOnReady(){e.runOnReady(this)}}class o extends n{constructor(){super(...arguments),this.runnedAdmin=!1}}class e{constructor(){this.isReady=!1}static addModule(n){window.inobyModules||(window.inobyModules=[]),window.inobyModules.push(n)}static getInstance(){return e.instance||(e.instance=new e),e.instance}static runOnReady(n){e.addModule(n),window.wasReady&&e.runModule(n)}static onReady(){var n;window.wasReady=!0,null===(n=window.inobyModules)||void 0===n||n.forEach((n=>{e.runModule(n)}))}static runModule(n){n instanceof o&&(null===window||void 0===window?void 0:window.adminpage)&&!n.runnedAdmin?document.addEventListener("mb_blocks_preview/"+n.metaboxId,(()=>{n.runnedAdmin=!0,n.runAdmin()})):n.runned||(n.runned=!0,n.run(),"function"==typeof n.runAsync&&setTimeout((()=>{n.runAsync()}),200))}}"loading"!==document.readyState?e.onReady():document.addEventListener("DOMContentLoaded",(()=>e.onReady()));const t=jQuery;class i extends n{run(){this.disableRcAnchorScroll()}runAsync(){this.initAnchorScroll(),this.scrollToUrlAnchor()}disableRcAnchorScroll(){var n;(null===(n=window.rootcommerce)||void 0===n?void 0:n.App)&&(Object.getPrototypeOf(window.rootcommerce.App).initAnchorScroll=function(){})}static scrollTo(n,o=500){const e="string"==typeof n?t(n):n;e.length>0&&t("html,body").animate({scrollTop:e.offset().top-(window.pageScrollOffset||t("#header").height())},o)}static disableAnchorScrolling(){window.disableAnchorScroll=!0}static enableAnchorScrolling(){window.disableAnchorScroll=!1}initAnchorScroll(){window.anchorScrollInitialized||t('a[href*="#"]').on("click",(function(n){if("#"!==t(this).attr("href")){var o="#"+t(this).attr("href").split("#")[1],e=t(o);!window.disableAnchorScroll&&e.length&&"tabpanel"!==e.attr("role")&&(n.preventDefault(),i.scrollTo(e),window.location=o)}}))}scrollToUrlAnchor(){location.hash&&i.scrollTo(location.hash)}}(new class extends n{run(){i.disableAnchorScrolling();const n=$(location.hash);n.length>0&&i.scrollTo(n)}}).runOnReady()})();