import{d as _,ey as b,ex as w,H as g,b as n,d2 as D,u,c as p,eu as c,bu as k,v as P}from"./registerWidgets.e46eca28.js";import{D as I,m as x}from"./DashPlayer.b5a39a32.js";import{L as B}from"./CircularLoading.484aa2f6.js";import{r as R}from"./index.2ced575c.js";import{B as q}from"./BackButton.916daf80.js";import{a as m}from"./asyncComputed.15fd30e0.js";import{D as C}from"./dashes.668993c6.js";import{W as E}from"./workspaces.5c5c851b.js";import"./executeJs.a5a141fd.js";import"./PlayerNavbar.6a57e760.js";import"./icons.db549bc5.js";import"./Steps.deb305bb.js";import"./Modal.47e24ea4.js";import"./geometryUtils.46a01de5.js";import"./passwordlessManager.f4cc4f94.js";import"./pubsub.8f2ecd1e.js";import"./storage.f303ee10.js";import"./Passwordless.5a77ee63.js";import"./WidgetsFrame.71d81391.js";import"./lottie.2b81658b.js";import"./activeRecord.d83b1b14.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]="b3e65be0-d606-4c80-b006-42ddbb7b2ec8",t._sentryDebugIdIdentifier="sentry-dbid-b3e65be0-d606-4c80-b006-42ddbb7b2ec8")}catch{}})();const F=_({__name:"DashPreview",setup(t){const r=b(),s=w(),l=({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}=m(()=>C.get(r.params.dashPath)),{result:i}=m(()=>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:h})=>R("preview",s,o,h)),e});return(e,o)=>(n(),D(k,null,[u(v)||!u(a)?(n(),p(B,{key:0,class:"loading",justify:"center"})):c("",!0),d.value?(n(),p(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:l},null,8,["dash","params","dash-player-service"])):c("",!0),u(a)?(n(),p(q,{key:2,onExitFullscreenPreview:f})):c("",!0)],64))}});const ee=P(F,[["__scopeId","data-v-1172cf43"]]);export{ee as default};
//# sourceMappingURL=DashPreview.057959c9.js.map
