import{D as w}from"./index.4b887428.js";import"./default-i18n.65d58dd6.js";var d=function(s,o,c,t){var l;o[0]=0;for(var n=1;n<o.length;n++){var r=o[n++],i=o[n]?(o[0]|=r?1:2,c[o[n++]]):o[++n];r===3?t[0]=i:r===4?t[1]=Object.assign(t[1]||{},i):r===5?(t[1]=t[1]||{})[o[++n]]=i:r===6?t[1][o[++n]]+=i+"":r?(l=s.apply(i,d(s,i,c,["",null])),t.push(l),i[0]?o[0]|=2:(o[n-2]=0,o[n]=l)):t.push(i)}return t},g=new Map;function _(s){var o=g.get(this);return o||(o=new Map,g.set(this,o)),(o=d(this,o.get(s)||(o.set(s,o=function(c){for(var t,l,n=1,r="",i="",e=[0],u=function(a){n===1&&(a||(r=r.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?e.push(0,a,r):n===3&&(a||r)?(e.push(3,a,r),n=2):n===2&&r==="..."&&a?e.push(4,a,0):n===2&&r&&!a?e.push(5,0,!0,r):n>=5&&((r||!a&&n===5)&&(e.push(n,0,r,l),n=6),a&&(e.push(n,a,0,l),n=6)),r=""},f=0;f<c.length;f++){f&&(n===1&&u(),u(f));for(var p=0;p<c[f].length;p++)t=c[f][p],n===1?t==="<"?(u(),e=[e],n=3):r+=t:n===4?r==="--"&&t===">"?(n=1,r=""):r=t+r[0]:i?t===i?i="":r+=t:t==='"'||t==="'"?i=t:t===">"?(u(),n=1):n&&(t==="="?(n=5,l=r,r=""):t==="/"&&(n<5||c[f][p+1]===">")?(u(),n===3&&(e=e[0]),n=e,(e=e[0]).push(2,0,n),n=0):t===" "||t==="	"||t===`
`||t==="\r"?(u(),n=2):r+=t),n===3&&r==="!--"&&(n=4,e=e[0])}return u(),e}(s)),o),arguments,[])).length>1?o:o[0]}const T=_.bind(window.wp.element.createElement),v=s=>Object.prototype.toString.call(s).slice(8,-1).toLowerCase(),m=s=>{const o=e=>{for(const u in s)Object.prototype.hasOwnProperty.call(s,u)&&(e[u]=m(s[u]))},c=()=>{const e={};return o(e),e},t=()=>s.map(function(e){return m(e)}),l=()=>{const e=new Map;for(const[u,f]of s)e.set(u,m(f));return e},n=()=>{const e=new Set;for(const u of s)e.add(m(u));return e},r=()=>{const e=s.bind(void 0);return o(e),e},i=v(s);return i==="object"?c():i==="array"?t():i==="map"?l():i==="set"?n():i==="function"?r():s},A=(s,o=!1,c=!0)=>{const{body:t}=document.implementation.createHTMLDocument("");t.innerHTML=s;const l=t.getElementsByTagName("*");let n=l.length;for(;n--;){const i=l[n];if(i.tagName==="SCRIPT")i.parentNode.removeChild(i);else{let e=i.attributes.length;for(;e--;){const{name:u}=i.attributes[e];u.startsWith("on")&&i.removeAttribute(u)}}}const r=o?t.textContent:t.innerHTML;return c?r.trim():r},I=()=>"aioseo-"+new Date().getTime().toString(36),L=(s,o)=>{const c=o.findIndex(t=>t.id===s);c!==-1&&(o[c].app.unmount(),o.splice(c,1))},{registerBlockCollection:y,registerBlockType:k}=window.wp.blocks,M=s=>{var t;if(!s||!w())return;const{name:o,settings:c}=s;if(c!=null&&c.icon&&!((t=c==null?void 0:c.icon)!=null&&t.foreground)){const l={foreground:"#141B38",src:c.icon};c.icon=l}typeof y=="function"&&c.category==="aioseo"&&(c.category="widgets"),typeof y!="function"&&c.category!=="aioseo"&&(c.category="aioseo"),k(o,c)};export{A as c,m as d,I as g,T as h,L as m,M as r};
