import{d as _,eB as w,eA as g,G as D,b as n,eu as k,u,c as d,ew as p,b8 as b,t as P}from"./outputWidgets.f8f8676d.js";import{D as I,m as B}from"./index.d410a0ab.js";import{L as x}from"./CircularLoading.7abe007d.js";import{r as R}from"./executeJs.1da1da3b.js";import{B as q}from"./BackButton.fe2db8de.js";import{a as l}from"./asyncComputed.9c91cdf6.js";import{D as C}from"./dashes.9d405fa0.js";import{W as E}from"./workspaces.31df14fc.js";import"./WidgetsFrame.a66fb7a8.js";import"./icons.c3170cf4.js";import"./geometryUtils.b568f193.js";import"./runnerData.8fc648cc.js";import"./index.3bb94425.js";import"./pubsub.8eddc628.js";import"./url.46c79102.js";import"./PlayerNavbar.4747a37d.js";import"./Steps.4e36f5e7.js";import"./activeRecord.913921b5.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]="2536af5d-82a8-487d-a0f0-bcdc617ca0dc",t._sentryDebugIdIdentifier="sentry-dbid-2536af5d-82a8-487d-a0f0-bcdc617ca0dc")}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}=l(()=>C.get(a.params.dashPath)),{result:i}=l(()=>E.get()),c=D(()=>{if(!r.value||!i.value||!r.value.makeRunnerData(i.value))return null;const e=B(r.value.makeRunnerData(i.value));return e.onRedirect(({url:o,queryParams:y})=>R("preview",s,o,y)),e});return(e,o)=>(n(),k(b,null,[u(v)||!u(r)?(n(),d(x,{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(a).query,"dash-player-service":c.value,onNavigate:m},null,8,["dash","params","dash-player-service"])):p("",!0),u(r)?(n(),d(q,{key:2,onExitFullscreenPreview:f})):p("",!0)],64))}});const X=P(F,[["__scopeId","data-v-1172cf43"]]);export{X as default};
//# sourceMappingURL=DashPreview.ac14e96e.js.map
