import{K as m}from"./vendor-other.835e467b.js";import{o as y}from"./app-core.fa86622d.js";const _=m.bind(window.wp.element.createElement),d=e=>Object.prototype.toString.call(e).slice(8,-1).toLowerCase(),u=e=>{const r=t=>{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=u(e[s]))},n=()=>{const t={};return r(t),t},c=()=>e.map(function(t){return u(t)}),i=()=>{const t=new Map;for(const[s,p]of e)t.set(s,u(p));return t},a=()=>{const t=new Set;for(const s of e)t.add(u(s));return t},l=()=>{const t=e.bind(void 0);return r(t),t},o=d(e);return o==="object"?n():o==="array"?c():o==="map"?i():o==="set"?a():o==="function"?l():e},k=(e,r=!1,n=!0)=>{const{body:c}=document.implementation.createHTMLDocument("");c.innerHTML=e;const i=c.getElementsByTagName("*");let a=i.length;for(;a--;){const o=i[a];if(o.tagName==="SCRIPT")o.parentNode.removeChild(o);else{let t=o.attributes.length;for(;t--;){const{name:s}=o.attributes[t];s.startsWith("on")&&o.removeAttribute(s)}}}const l=r?c.textContent:c.innerHTML;return n?l.trim():l},x=()=>"aioseo-"+new Date().getTime().toString(36)+Math.random().toString(36).slice(2,7),B=(e,r)=>{const n=r.findIndex(c=>c.id===e);n!==-1&&(r[n].app.unmount(),r.splice(n,1))},{registerBlockCollection:f,registerBlockType:g}=window.wp.blocks,T=e=>{if(!e||!y())return;const{name:r,settings:n}=e;if(n?.icon&&!n?.icon?.foreground){const c={foreground:"#141B38",src:n.icon};n.icon=c}typeof f=="function"&&n.category==="aioseo"&&(n.category="widgets"),typeof f!="function"&&n.category!=="aioseo"&&(n.category="aioseo"),g(r,n)};export{k as c,u as d,x as g,_ as h,B as m,T as r};
