import{d as _,eA as w,ez as g,J as D,b as n,eu as k,u,c as p,ew as l,bg as P,x as I}from"./outputWidgets.5f5dca9f.js";import{D as b,m as x}from"./DashPlayer.d7375393.js";import{L as B}from"./CircularLoading.462d68bc.js";import{r as R}from"./index.92c8cf6e.js";import{B as q}from"./BackButton.e077de00.js";import{a as d}from"./asyncComputed.eae0c0ea.js";import{D as C}from"./dashes.1843abee.js";import{W as E}from"./workspaces.48c8fd8f.js";import"./executeJs.1c5ab6ff.js";import"./icons.a77543dc.js";import"./index.e7437d5b.js";import"./pubsub.628f19a6.js";import"./PlayerNavbar.4ee9e4d0.js";import"./Steps.1cddfe5a.js";import"./geometryUtils.b19709ee.js";import"./WidgetsFrame.17e6211e.js";import"./activeRecord.ad81cab4.js";import"./url.1555ad6e.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]="0a156c94-894f-4a70-9939-3079ece5545f",t._sentryDebugIdIdentifier="sentry-dbid-0a156c94-894f-4a70-9939-3079ece5545f")}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}=d(()=>C.get(r.params.dashPath)),{result:i}=d(()=>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(),k(P,null,[u(v)||!u(a)?(n(),p(B,{key:0,class:"loading",justify:"center"})):l("",!0),c.value?(n(),p(b,{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"])):l("",!0),u(a)?(n(),p(q,{key:2,onExitFullscreenPreview:f})):l("",!0)],64))}});const X=I(F,[["__scopeId","data-v-1172cf43"]]);export{X as default};
//# sourceMappingURL=DashPreview.18353c47.js.map
