import{d as _,K as w,J as g,L as D,b as n,c as b,A as u,u as p,E as d,F as k,t as P}from"./registerWidgets.2f354556.js";import{D as I,m as x}from"./DashPlayer.813c0f29.js";import{L as B}from"./CircularLoading.f70f248e.js";import{r as R}from"./index.afe47008.js";import{B as q}from"./BackButton.d3af3b6e.js";import{a as l}from"./asyncComputed.7c1b85ba.js";import{D as C}from"./dashes.d1956b8d.js";import{W as E}from"./workspaces.0873a2c8.js";import"./executeJs.27fe2afb.js";import"./PlayerNavbar.bedaf2b3.js";import"./icons.1cdfa11b.js";import"./Steps.74e2104a.js";import"./Modal.55b06151.js";import"./passwordlessManager.96ab3f5a.js";import"./pubsub.cb65003c.js";import"./Passwordless.1cb3171a.js";import"./WidgetsFrame.ade6550a.js";import"./lottie.61602e49.js";import"./activeRecord.931023a0.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]="d228c233-0bb3-4e9e-afcf-47ab56796f83",t._sentryDebugIdIdentifier="sentry-dbid-d228c233-0bb3-4e9e-afcf-47ab56796f83")}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(),b(k,null,[u(v)||!u(a)?(n(),p(B,{key:0,class:"loading",justify:"center"})):d("",!0),c.value?(n(),p(I,{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"])):d("",!0),u(a)?(n(),p(q,{key:2,onExitFullscreenPreview:f})):d("",!0)],64))}});const Y=P(F,[["__scopeId","data-v-1172cf43"]]);export{Y as default};
//# sourceMappingURL=DashPreview.9964186b.js.map
