/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
var c=new Set,f;var g=e=>typeof e=="string"?e:"el"in e?e.el.localName:"localName"in e?e.localName:e.declaredClass,p=(e,a,t,o)=>{let n=g(a);if(o?.once){let r=`${e}${n}${t}`;if(c.has(r))return;c.add(r)}let s;if(o?.detail){s={};for(let[r,i]of Object.entries(o.detail))if((typeof i=="object"||typeof i=="function")&&i!==null){let l=new WeakRef(i);Object.defineProperty(s,r,{get(){return l.deref()}})}else s[r]=i;f?.log.interceptors?.forEach(r=>r(e,n,t,s)),console[e](`[${n}]: ${t}`,s)}else f?.log.interceptors?.forEach(r=>r(e,n,t)),console[e](`[${n}]: ${t}`)},u=e=>{let a=`[${g(e)}] `;return t=>{let o=t instanceof Error&&t.message?t:new Error(String(t));o.message=`${a}${o.message}`,setTimeout(()=>{throw t})}};export{p as a,u as b};
