(()=>{"use strict";var e={n:o=>{var t=o&&o.__esModule?()=>o.default:()=>o;return e.d(t,{a:t}),t},d:(o,t)=>{for(var c in t)e.o(t,c)&&!e.o(o,c)&&Object.defineProperty(o,c,{enumerable:!0,get:t[c]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};const o=window.wp.domReady;var t=e.n(o);const c=window.wp.data,r=window.wp.blocks,n=e=>{const{name:o,isValid:t,validationIssues:c}=e;return!!o&&!(t||!c.length)},l=window.wp.i18n,s=e=>e.map((e=>{const o=e;if((0,r.isReusableBlock)((0,r.getBlockType)(e.name))){const{attributes:{ref:t}}=e,l=(0,r.parse)((0,c.select)("core").getEntityRecords("postType","wp_block",{include:[t]})?.[0]?.content?.raw)||[],[s,d]=(e=>{const o=[...e];let t=!1;const c=e=>{e.forEach((e=>{if(n(e)){t=!0;const o=i(e);for(const t in o)e[t]=o[t]}e.innerBlocks.length&&c(e.innerBlocks)}))};return c(o),[o,t]})(l);if(d)return a(o),{blocks:s,isReusable:!0,ref:t}}if(o.innerBlocks&&o.innerBlocks.length){const e=s(o.innerBlocks);e.some((e=>e.recovered))&&(o.innerBlocks=e,o.replacedClientId=o.clientId,o.recovered=!0)}if(n(o)){const e=i(o);return e.replacedClientId=o.clientId,e.recovered=!0,a(o),e}return o})),i=e=>{let{name:o,attributes:t,innerBlocks:c}=e;return(0,r.createBlock)(o,t,c)},a=e=>{const o="%c"+(0,l.__)("Notice: ","auto-block-recovery")+e.name+(0,l.__)(" was auto recovery.","auto-block-recovery")+"\n"+(0,l.__)("Please check this page in preview and update this page.","auto-block-recovery");console.log(o,"width: 100%; padding: 6px 12px; background-color: #fef8ee; color: #1e1e1e;")};t()((()=>{window._wpLoadBlockEditor&&window._wpLoadBlockEditor.then((()=>{setTimeout((()=>{const e=(0,c.subscribe)((()=>{null!==(0,c.select)("core").getEntityRecords("postType","wp_block")&&(e(),s((0,c.select)("core/block-editor").getBlocks()).forEach((e=>{e.isReusable&&e.ref&&(0,c.dispatch)("core").editEntityRecord("postType","wp_block",e.ref,{content:(0,r.serialize)(e.blocks)}).then(),e.recovered&&e.replacedClientId&&(0,c.dispatch)("core/block-editor").replaceBlock(e.replacedClientId,e)})))}))}),0)}))}))})();