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

//# sourceMappingURL=2058.0e5df44647184aaf02e2.js.map