import{d as _,eA as w,ez as g,J as D,b as n,et as k,u,c as d,ew as p,bg as P,x as I}from"./outputWidgets.cf5b7366.js";import{D as b,m as x}from"./DashPlayer.60ce78e2.js";import{L as B}from"./CircularLoading.832431bd.js";import{r as R}from"./index.3d2fbf9e.js";import{B as q}from"./BackButton.466b6f3a.js";import{a as l}from"./asyncComputed.2caa7fe6.js";import{D as C}from"./dashes.75890af5.js";import{W as E}from"./workspaces.510e9023.js";import"./executeJs.cf9bd84e.js";import"./icons.c510a141.js";import"./index.e4f20c17.js";import"./pubsub.664a70af.js";import"./PlayerNavbar.bb557329.js";import"./Steps.193c982b.js";import"./Modal.d2e187f0.js";import"./geometryUtils.218a0963.js";import"./WidgetsFrame.9f056f5d.js";import"./activeRecord.f30e02c2.js";import"./url.fb40e08c.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]="49672a85-ce8d-48d9-8f5c-e1c85a284719",t._sentryDebugIdIdentifier="sentry-dbid-49672a85-ce8d-48d9-8f5c-e1c85a284719")}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}=l(()=>C.get(r.params.dashPath)),{result:i}=l(()=>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(),d(B,{key:0,class:"loading",justify:"center"})):p("",!0),c.value?(n(),d(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"])):p("",!0),u(a)?(n(),d(q,{key:2,onExitFullscreenPreview:f})):p("",!0)],64))}});const Y=I(F,[["__scopeId","data-v-1172cf43"]]);export{Y as default};
//# sourceMappingURL=DashPreview.4869cfd1.js.map
