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