import{d as _,eA as w,ez as g,J as D,b as n,et as b,u,c as d,ew as p,bg as k,x as P}from"./outputWidgets.c072fe4e.js";import{D as I,m as x}from"./DashPlayer.74f2acef.js";import{L as B}from"./CircularLoading.1db5d4d0.js";import{r as R}from"./index.00103e26.js";import{B as q}from"./BackButton.6e721ade.js";import{a as l}from"./asyncComputed.376cdc00.js";import{D as C}from"./dashes.6f548a30.js";import{W as E}from"./workspaces.921d369d.js";import"./executeJs.9d1a076f.js";import"./icons.158b4825.js";import"./index.ad809a50.js";import"./pubsub.98ad9fe0.js";import"./PlayerNavbar.26f9089b.js";import"./Steps.1df0e634.js";import"./Modal.dfafcf8c.js";import"./geometryUtils.c951785a.js";import"./WidgetsFrame.6a9a3802.js";import"./activeRecord.fdc25b97.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new Error().stack;r&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[r]="6bd3d8f3-0b9c-4759-9a86-ee584ce96087",t._sentryDebugIdIdentifier="sentry-dbid-6bd3d8f3-0b9c-4759-9a86-ee584ce96087")}catch{}})();const F=_({__name:"DashPreview",setup(t){const r=w(),s=g(),m=({id:e,type:o})=>{o==="dash"?(s.push({name:"dashPreview",params:{dashId:e},query:r.query}),h()):s.push({name:"formPreview",params:{formId:e},query:r.query})},f=()=>{var e;!((e=a.value)!=null&&e.path)||s.push(`/_editor/dash/${encodeURIComponent(a.value.path)}`)},{loading:v,result:a,refetch:h}=l(()=>C.get(r.params.dashPath)),{result:i}=l(()=>E.get()),c=D(()=>{if(!a.value||!i.value||!a.value.makeRunnerData(i.value))return null;const e=x(a.value.makeRunnerData(i.value));return e.onRedirect(({url:o,queryParams:y})=>R("preview",s,o,y)),e});return(e,o)=>(n(),b(k,null,[u(v)||!u(a)?(n(),d(B,{key:0,class:"loading",justify:"center"})):p("",!0),c.value?(n(),d(I,{key:1,class:"player",dash:c.value.runnerData,"widgets-with-errors":[],"is-preview":!0,params:u(r).query,"dash-player-service":c.value,onNavigate:m},null,8,["dash","params","dash-player-service"])):p("",!0),u(a)?(n(),d(q,{key:2,onExitFullscreenPreview:f})):p("",!0)],64))}});const X=P(F,[["__scopeId","data-v-1172cf43"]]);export{X as default};
//# sourceMappingURL=DashPreview.38750e60.js.map
