import{C as t,S as s,a as i,b as o,V as c,L as n}from"./p-dcc98162.js";import{c as a}from"./p-9ec80349.js";import{i as e}from"./p-8b5d3a52.js";function r(){return function(o,c){var n;Object.defineProperty(o,c,{set:(n=c,function(o){this[t]||(this[t]=new Map),this[t].set(n,o),o[s]=this,function(t,s){const o=t.constructor.prototype;if(o[i])for(const c of o[i])s[c.componentMethodName]=u(s,t,s[c.componentMethodName],c)}(o,this)})})}}function u(t,s,i,c){return function(...n){const a=i.apply(t,n);return s[o]=c.componentMethodName,a&&"function"==typeof a.then?a.then((()=>s[c.slimmerMethodName].call(s,...n))):s[c.slimmerMethodName].call(s,...n),a}}class f extends c{constructor(t,s){super(),this.className=t,this.usageDefinitions=s}sendPublicAPIPayloadToTelemetry(t){try{const s=this.getPublicAPIMetricsPayload(t);s&&import("./p-5a25014f.js").then((t=>{t.default.emit("publicAPIMetrics",s)}))}catch(t){n.log("Public API payload failed to emit telemetry:",t)}}getPublicAPIMetricsPayload(t){const s={};return this.usageDefinitions.filter((s=>s.canAccept(this.className,this[o],t))).forEach((i=>{s[i.payloadKey]=i.payloadValue(t)})),e(s)?null:{publicAPIName:this.className,data:s}}}function l(t,s,i){const o=[];return s.map((t=>o.push({mapFrom:t,mapTo:"sendPublicAPIPayloadToTelemetry"}))),a(t,f,[],o,[t.name,i])}export{r as I,l as c}