import{d as _,K as w,J as g,L as D,b as n,c as k,A as u,u as c,E as d,F as b,t as P}from"./registerWidgets.163fba07.js";import{D as I,m as x}from"./DashPlayer.fb9a4703.js";import{L as B}from"./CircularLoading.926802eb.js";import{r as R}from"./index.0f874dbb.js";import{B as q}from"./BackButton.41535605.js";import{a as l}from"./asyncComputed.5f7867b2.js";import{D as C}from"./dashes.3e49528a.js";import{W as E}from"./workspaces.e858f4ee.js";import"./executeJs.6264eb3b.js";import"./PlayerNavbar.69057de4.js";import"./icons.89f10f59.js";import"./Steps.c7e4143d.js";import"./Modal.ea6a3e3a.js";import"./passwordlessManager.055571e3.js";import"./pubsub.2d612358.js";import"./Passwordless.5a241617.js";import"./WidgetsFrame.4b54ae2c.js";import"./lottie.981a9cff.js";import"./activeRecord.b56127d8.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="a037c653-a5f3-41da-86bb-a57442a08f79",t._sentryDebugIdIdentifier="sentry-dbid-a037c653-a5f3-41da-86bb-a57442a08f79")}catch{}})();const F=_({__name:"DashPreview",setup(t){const a=w(),s=g(),m=({id:e,type:o})=>{o==="dash"?(s.push({name:"dashPreview",params:{dashId:e},query:a.query}),h()):s.push({name:"formPreview",params:{formId:e},query:a.query})},f=()=>{var e;!((e=r.value)!=null&&e.path)||s.push(`/_editor/dash/${encodeURIComponent(r.value.path)}`)},{loading:v,result:r,refetch:h}=l(()=>C.get(a.params.dashPath)),{result:i}=l(()=>E.get()),p=D(()=>{if(!r.value||!i.value||!r.value.makeRunnerData(i.value))return null;const e=x(r.value.makeRunnerData(i.value));return e.onRedirect(({url:o,queryParams:y})=>R("preview",s,o,y)),e});return(e,o)=>(n(),k(b,null,[u(v)||!u(r)?(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(a).query,"dash-player-service":p.value,onNavigate:m},null,8,["dash","params","dash-player-service"])):d("",!0),u(r)?(n(),c(q,{key:2,onExitFullscreenPreview:f})):d("",!0)],64))}});const Y=P(F,[["__scopeId","data-v-1172cf43"]]);export{Y as default};
//# sourceMappingURL=DashPreview.284c5949.js.map
