(()=>{const{addAction:e}=JetPlugins.hooks,{isEmpty:t}=JetFormBuilderFunctions;e("jet.fb.multistep.page.init","jet-form-builder/switch-page-on-change",(function(e){e.node.addEventListener("click",(t=>{if("radio"===t.target.type){const c=t.target.closest(".jet-form-builder__field-wrap");c&&c.querySelector(".check-mark-control")?t.target.checked&&e.changePage(!1).then((()=>{})).catch((()=>{})):setTimeout((()=>{t.target.checked&&e.changePage(!1).then((()=>{})).catch((()=>{}))}),10)}}));const c=e.node.querySelectorAll(".jet-fb-switch-page-on-change");if(c)for(const n of c){let c=n;n.hasOwnProperty("jfbSync")||(c=n.querySelector("input, select")),c?.jfbSync&&e.isNodeBelongThis(c)&&c.jfbSync.watch((()=>{t(c.jfbSync.getValue())||e.changePage(!1).then((()=>{})).catch((()=>{}))}))}}))})();