document.addEventListener("DOMContentLoaded",(()=>{let t=null;const e=()=>{if(document.querySelector(".wpmtk-button-quick-add"))return;const o=document.querySelector(".editor-document-tools__inserter-toggle");if(!o)return void setTimeout((()=>{clearTimeout(t),e()}),200);const n=document.createElement("a");n.innerHTML=WPMastertoolkitQuickAddPost.i18n.quick_add_button_text,n.className="wpmtk-button-quick-add components-button is-secondary",n.href="post-new.php?post_type="+WPMastertoolkitQuickAddPost.post_type,o.parentNode.insertBefore(n,o)};e(),wp.data.subscribe((()=>{clearTimeout(t),t=setTimeout((()=>{e()}),200)}))}));