import{d as _,ez as w,ey as g,H as D,b as n,et as b,u,c as p,ev as c,bf as k,v as P}from"./outputWidgets.1739e6b5.js";import{D as I,m as x}from"./index.341bb3d6.js";import{L as B}from"./CircularLoading.67a69d9a.js";import"./index.92715e30.js";import{r as R}from"./executeJs.3af85407.js";import{B as q}from"./BackButton.e11eb321.js";import{a as l}from"./asyncComputed.b4d87a94.js";import{D as C}from"./dashes.3d94d969.js";import{W as E}from"./workspaces.cad93b01.js";import"./WidgetsFrame.88941503.js";import"./icons.1c3e2bde.js";import"./geometryUtils.aedc4dba.js";import"./runnerData.f7d9251a.js";import"./index.3da0fea7.js";import"./pubsub.e4395938.js";import"./url.8bddfe76.js";import"./PlayerNavbar.9236d56f.js";import"./Steps.bfd262de.js";import"./activeRecord.55a23e4a.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]="5572d715-8ffb-459a-a4b8-ec1d5619f96a",t._sentryDebugIdIdentifier="sentry-dbid-5572d715-8ffb-459a-a4b8-ec1d5619f96a")}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}),y()):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:y}=l(()=>C.get(r.params.dashPath)),{result:i}=l(()=>E.get()),d=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:h})=>R("preview",s,o,h)),e});return(e,o)=>(n(),b(k,null,[u(v)||!u(a)?(n(),p(B,{key:0,class:"loading",justify:"center"})):c("",!0),d.value?(n(),p(I,{key:1,class:"player",dash:d.value.runnerData,"widgets-with-errors":[],"is-preview":!0,params:u(r).query,"dash-player-service":d.value,onNavigate:m},null,8,["dash","params","dash-player-service"])):c("",!0),u(a)?(n(),p(q,{key:2,onExitFullscreenPreview:f})):c("",!0)],64))}});const Y=P(F,[["__scopeId","data-v-1172cf43"]]);export{Y as default};
//# sourceMappingURL=DashPreview.c00ef17f.js.map
