function t(){return(t,n,i)=>{const e=new Set,{componentDidLoad:s,disconnectedCallback:o,connectedCallback:r}=t;t.componentDidLoad=function(){return e.add(this),s&&s.call(this)},t.disconnectedCallback=function(){return e.delete(this),this.componentDidLoadedFlag=!0,o&&o.call(this)},t.connectedCallback=function(){return this.componentDidLoadedFlag&&e.add(this),r&&r.call(this)};const c=i.value;return i.value=function(...t){return e.has(this)?c.apply(this,t):new Promise((n=>{const i=()=>{if(e.has(this))return n(c.apply(this,t));setTimeout(i,30)};i()}))},i}}export{t as C}