import{d as _,eA as w,ez as b,J as g,b as n,eu as D,u,c,ew as p,bg as k,x as P}from"./outputWidgets.f120b477.js";import{D as I,m as x}from"./DashPlayer.119c5628.js";import{L as B}from"./CircularLoading.cab9f9eb.js";import{r as R}from"./index.5818bfb2.js";import{B as q}from"./BackButton.05b6cb28.js";import{a as l}from"./asyncComputed.5ccd4614.js";import{D as C}from"./dashes.4d7eaf1c.js";import{W as E}from"./workspaces.901e1f01.js";import"./executeJs.92438dd0.js";import"./icons.c367c256.js";import"./index.662a67e5.js";import"./pubsub.4681462f.js";import"./PlayerNavbar.a0c4b479.js";import"./Steps.114fc919.js";import"./geometryUtils.5f5c4c2b.js";import"./WidgetsFrame.54753673.js";import"./activeRecord.d87d7ef2.js";import"./url.8af07297.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]="b2673b80-b770-4da8-9998-ffd236701c8b",t._sentryDebugIdIdentifier="sentry-dbid-b2673b80-b770-4da8-9998-ffd236701c8b")}catch{}})();const F=_({__name:"DashPreview",setup(t){const r=w(),s=b(),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()),d=g(()=>{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(),D(k,null,[u(v)||!u(a)?(n(),c(B,{key:0,class:"loading",justify:"center"})):p("",!0),d.value?(n(),c(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"])):p("",!0),u(a)?(n(),c(q,{key:2,onExitFullscreenPreview:f})):p("",!0)],64))}});const X=P(F,[["__scopeId","data-v-1172cf43"]]);export{X as default};
//# sourceMappingURL=DashPreview.c8f0e48c.js.map
