import{u as i,h as a,j as c,m as l}from"./app-core.0df0f3ff.js";import{q as u,k as m}from"./vendor-lodash.53ceb7f7.js";const p=n=>{const e=document.getElementById(n);return e?e?.contentWindow?e.contentWindow.document:e.contentDocument:null},y=()=>{let n=null;return async({editorData:e})=>{try{(n===null||!m(n,e))&&await l(),n=JSON.parse(JSON.stringify(e))}catch(t){console.error(t)}}},h=(n=null)=>{const e=i();if(u(e.currentPost))return;const t=()=>{e.isDirty=!1,e.saveCurrentPost(e.currentPost).then(()=>{const r=a(),o=c();!r.isUnlicensed&&o.hasPermission&&o.fetch()})};n==="elementor"?window.elementor.config.document.id===window.elementor.config.document.revisions.current_id&&t():t()},_=(n,e)=>{const t=window.parent.document,r=t.getElementById(e);r&&r.remove();try{new URL(n);const o=t.createElement("link");o.id=e,o.href=n,o.rel="stylesheet",t.head.appendChild(o)}catch{const s=t.createElement("style");s.id=e,s.textContent=n,t.head.appendChild(s)}};export{p as a,y as c,h,_ as i};
