(()=>{"use strict";var e={n:n=>{var t=n&&n.__esModule?()=>n.default:()=>n;return e.d(t,{a:t}),t},d:(n,t)=>{for(var o in t)e.o(t,o)&&!e.o(n,o)&&Object.defineProperty(n,o,{enumerable:!0,get:t[o]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n)};class n{constructor(){this.runned=!1}runOnReady(){o.runOnReady(this)}}class t extends n{constructor(){super(...arguments),this.runnedAdmin=!1}}class o{constructor(){this.isReady=!1}static addModule(e){window.inobyModules||(window.inobyModules=[]),window.inobyModules.push(e)}static getInstance(){return o.instance||(o.instance=new o),o.instance}static runOnReady(e){o.addModule(e),window.wasReady&&o.runModule(e)}static onReady(){var e;window.wasReady=!0,null===(e=window.inobyModules)||void 0===e||e.forEach((e=>{o.runModule(e)}))}static runModule(e){e instanceof t&&(null===window||void 0===window?void 0:window.adminpage)&&!e.runnedAdmin?document.addEventListener("mb_blocks_preview/"+e.metaboxId,(()=>{e.runnedAdmin=!0,e.runAdmin()})):e.runned||(e.runned=!0,e.run(),"function"==typeof e.runAsync&&setTimeout((()=>{e.runAsync()}),200))}}"loading"!==document.readyState?o.onReady():document.addEventListener("DOMContentLoaded",(()=>o.onReady()));const i=jQuery;var d=e.n(i);(new class extends n{run(){this.hideNotices(),this.initBlockSidebarResizing(),this.fixEditorRems(),this.iframeTextAreaPaste()}initBlockSidebarResizing(){setTimeout((()=>{d()(".interface-interface-skeleton__sidebar").resizable({handles:"w",minWidth:200})}),1e3)}hideNotices(){const e=".notice:not(.hidden), .updated, .woocommerce-store-alerts, .notice-yoast",n=d()("#wpbody-content");if(!n.length)return;const t=d()('<li id="inoby-notices">Notifikácie</li>'),o=d()('<div class="counter">0</div>');t.append(o),d()("#wp-admin-bar-root-default").append(t);const i=n=>{n.hide(),(()=>{const n=d()(e).length;o.html(n.toString()),n?t.show():t.hide()})()};i(d()(e)),new MutationObserver(((n,t)=>{n.forEach((n=>{n.addedNodes.forEach((n=>{d()(n).filter(e).length&&i(d()(n))}))}))})).observe(n[0],{attributes:!1,childList:!0,subtree:!0}),t.on("click",(n=>{const t=d()(n.target);t.hasClass("notices-shown")?(t.removeClass("notices-shown"),d()(e).slideUp()):(t.addClass("notices-shown"),d()(e).slideDown())}))}fixEditorRems(){d()("#wpbody-content>.block-editor").length&&(document.documentElement.style.fontSize="62.5%")}iframeTextAreaPaste(){d()(document).on("paste","textarea.rwmb-textarea",(e=>{var n,t,o,i=null===(n=e.originalEvent)||void 0===n?void 0:n.clipboardData;if(null!==i&&(o=i.getData("text")).startsWith("<iframe ")){const n=/"https?:\/\/(.*?)"/g,i=o.match(n);null!==i[0]&&(e.preventDefault(),e.target.value=null===(t=i[0])||void 0===t?void 0:t.replace('"',""))}}))}}).runOnReady()})();