(()=>{"use strict";const e=window.wp.blocks,t=window.wp.data;!function(){const o=window.scb_embed_data;if(!o||!o.serviceId)return;const c=Number(o.serviceId);if(Number.isNaN(c))return;let r=!1;const s=(0,t.subscribe)((function(){if(r)return;const o=(0,t.select)("core/editor"),i=o.getCurrentPostType(),n=o.getCurrentPostId();if(!i||!n)return;if(!(0,t.select)("core").hasFinishedResolution("getEntityRecord",["postType",i,n]))return;r=!0,s();const d=(0,e.createBlock)("scbookings/booking-form",{services:[c]});(0,t.dispatch)("core/block-editor").insertBlocks(d),(0,t.dispatch)("core/block-editor").selectBlock(d.clientId),(0,t.dispatch)("core/edit-post")?.openGeneralSidebar("edit-post/block")}))}()})();