"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[2058],{92058:(y,d,a)=>{a.r(d),a.d(d,{plugin:()=>D});var u=a(40187),c=a(36666),r=a(62467),v=a(72316),m=a(81160),h=a(69850),g=a(79065),l=a(74730);class C extends u.mA{constructor(e){super(e)}getCollapsedText(e){return`Dashboard Reference: ${e.panelId}`}query(e){const s=e.scopedVars?.__sceneObject?.value;if(!s)throw new Error("Can only be called from a scene");const o=e.targets[0];if(!o)return(0,r.of)({data:[]});const f=o.panelId;if(!f)return(0,r.of)({data:[]});let i=this.findSourcePanel(s,f);if(!i)return(0,r.of)({data:[],error:{message:"Could not find source panel"}});let t=i.state.$data;return!o.withTransforms&&t instanceof g.Es&&(t=t.state.$data),!t||!t.getResultsStream?(0,r.of)({data:[]}):(0,v.v)(()=>{!t.isActive&&t?.setContainerWidth&&t?.setContainerWidth(500);const p=t.activate();return t.getResultsStream().pipe((0,m.T)(n=>({data:n.data.series,state:n.data.state,errors:n.data.errors,error:n.data.error})),(0,h.j)(p))})}findSourcePanel(e,s){return(0,l.vL)(e,(0,l.XA)(s))}testDatasource(){return Promise.resolve({message:"",status:""})}}const D=new u.tD(C).setQueryEditor(c.A)}}]);

//# sourceMappingURL=2058.9b65b8406071cb44c6ee.js.map