import{d as _,eA as w,ez as g,J as b,b as n,eu as D,u,c as l,ew as c,bg as k,x as P}from"./outputWidgets.d94fff8c.js";import{D as I,m as x}from"./DashPlayer.c01dbd8d.js";import{L as B}from"./CircularLoading.8c280b78.js";import{r as R}from"./index.3dad0da1.js";import{B as q}from"./BackButton.49804c07.js";import{a as d}from"./asyncComputed.6da48dd7.js";import{D as C}from"./dashes.8c8e25c6.js";import{W as E}from"./workspaces.c4438eba.js";import"./executeJs.99ff6d52.js";import"./icons.fec42461.js";import"./index.7a77fb2c.js";import"./pubsub.39314a92.js";import"./PlayerNavbar.7583d5f4.js";import"./Steps.0a5e4246.js";import"./geometryUtils.afddc11b.js";import"./WidgetsFrame.2f3ca3a1.js";import"./activeRecord.4bb9e983.js";import"./url.596d80c9.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="34849727-84a3-4010-97aa-b1babf1871a5",t._sentryDebugIdIdentifier="sentry-dbid-34849727-84a3-4010-97aa-b1babf1871a5")}catch{}})();const F=_({__name:"DashPreview",setup(t){const a=w(),s=g(),m=({id:e,type:o})=>{o==="dash"?(s.push({name:"dashPreview",params:{dashId:e},query:a.query}),h()):s.push({name:"formPreview",params:{formId:e},query:a.query})},f=()=>{var e;!((e=r.value)!=null&&e.path)||s.push(`/_editor/dash/${encodeURIComponent(r.value.path)}`)},{loading:v,result:r,refetch:h}=d(()=>C.get(a.params.dashPath)),{result:i}=d(()=>E.get()),p=b(()=>{if(!r.value||!i.value||!r.value.makeRunnerData(i.value))return null;const e=x(r.value.makeRunnerData(i.value));return e.onRedirect(({url:o,queryParams:y})=>R("preview",s,o,y)),e});return(e,o)=>(n(),D(k,null,[u(v)||!u(r)?(n(),l(B,{key:0,class:"loading",justify:"center"})):c("",!0),p.value?(n(),l(I,{key:1,class:"player",dash:p.value.runnerData,"widgets-with-errors":[],"is-preview":!0,params:u(a).query,"dash-player-service":p.value,onNavigate:m},null,8,["dash","params","dash-player-service"])):c("",!0),u(r)?(n(),l(q,{key:2,onExitFullscreenPreview:f})):c("",!0)],64))}});const X=P(F,[["__scopeId","data-v-1172cf43"]]);export{X as default};
//# sourceMappingURL=DashPreview.bcc6be1e.js.map
