import{b as t}from"./p-2ade684f.js";class s{constructor(t,s){this.title=t,this.host=s}getDescription(){return`, this is a dom nodes subject of ${this.title}.(class name:${this.host.className}, id:${this.host.id})`}}const e=new class{constructor(){this.cache=new Map}getSubject(t,s){return this.isExist(t,s)?this.cache.get(t).get(s):this.setSubject(t,s)}isExist(t,s){return!!t&&this.cache.has(t)&&void 0!==this.cache.get(t)&&this.cache.get(t).has(s)}getSubjectFromParentNodeByEventId(s,e){let i;for(const r of this.cache)if(t(s,r[0])&&r[1].has(e)){i=r[1].get(e);break}return i}setSubject(t,e){const i=`${t.tagName}:${e.getName()}`,r=new s(i,t);return this.cache.get(t)||this.cache.set(t,new Map),this.cache.get(t).set(e,r),r}};export{e as d}