import{cv as u,hd as d,ll as b,fN as v,mc as l,cL as o,gP as k,h1 as y,cN as p,cA as M,cK as E,cJ as O}from"./BQCsJfSh.js";import{ag as A}from"./DURqPrI0.js";import{s as S}from"./RrweKcqb.js";import{r as B}from"./QoDN-IkW.js";const I=a=>A(S(a,[{kinds:[u,O,E,o,M,p]}]),n=>{const g=s=>y(s.kind===o?"d":"h",s.tags),R=n.filter(s=>s.kind===u),c=[];for(const[s,_]of d(g,n)){if(!s)continue;const i=[],m=[],t=[];for(const e of _)switch(e.kind){case O:i.push(e);break;case E:m.push(e);break;case o:case M:case p:t.push(e);break}const h=new Set(B(a,s,t));c.push(...b(Array.from(d(e=>e.pubkey,i).values()).map(e=>v(l(e)))).filter(({pubkey:e,created_at:f})=>!(h.has(e)||t.some(r=>r.created_at<=f?!1:r.kind===o?!0:k(r.tags).includes(e))||m.some(r=>r.pubkey===e&&r.created_at>f))))}return l([...R,...c])}),D=Object.freeze(Object.defineProperty({__proto__:null,deriveSpaceActionItems:I},Symbol.toStringTag,{value:"Module"}));export{D as a,I as d};
//# sourceMappingURL=DfST1moa.js.map
