import{d as _,ey as w,ex as g,H as D,b as n,er as b,u,c,eu as d,bu as k,v as P}from"./registerWidgets.7c26f935.js";import{D as I,m as x}from"./DashPlayer.beecae60.js";import{L as B}from"./CircularLoading.8fe9fc02.js";import{r as R}from"./index.1d4b40b5.js";import{B as q}from"./BackButton.279b3ecf.js";import{a as l}from"./asyncComputed.cfc29dee.js";import{D as C}from"./dashes.0c09108e.js";import{W as E}from"./workspaces.2b9ec268.js";import"./executeJs.cc17e4d8.js";import"./PlayerNavbar.85a5836e.js";import"./icons.d315d375.js";import"./Steps.0a01d796.js";import"./Modal.34b47b9a.js";import"./geometryUtils.194e35c2.js";import"./passwordlessManager.5d139655.js";import"./pubsub.c3a63076.js";import"./storage.53222b6f.js";import"./Passwordless.645f1350.js";import"./WidgetsFrame.fefe127b.js";import"./activeRecord.d07557d8.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]="7ee8a203-b437-4e08-8487-b5f928d54c54",t._sentryDebugIdIdentifier="sentry-dbid-7ee8a203-b437-4e08-8487-b5f928d54c54")}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()),p=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(),c(B,{key:0,class:"loading",justify:"center"})):d("",!0),p.value?(n(),c(I,{key:1,class:"player",dash:p.value.runnerData,"widgets-with-errors":[],"is-preview":!0,params:u(r).query,"dash-player-service":p.value,onNavigate:m},null,8,["dash","params","dash-player-service"])):d("",!0),u(a)?(n(),c(q,{key:2,onExitFullscreenPreview:f})):d("",!0)],64))}});const Z=P(F,[["__scopeId","data-v-1172cf43"]]);export{Z as default};
//# sourceMappingURL=DashPreview.20d13ca5.js.map
