import{d as _,ey as w,ex as g,F as D,b as n,c as b,bu as u,u as p,eu as l,bw as k,t as P}from"./registerWidgets.f5996e62.js";import{D as I,m as x}from"./DashPlayer.3f4faf68.js";import{L as B}from"./CircularLoading.4634c666.js";import{r as R}from"./index.533e819a.js";import{B as q}from"./BackButton.9e6058bb.js";import{a as m}from"./asyncComputed.e780c3cc.js";import{D as C}from"./dashes.d00c3559.js";import{W as F}from"./workspaces.84478f96.js";import"./executeJs.4602d857.js";import"./PlayerNavbar.5839488e.js";import"./icons.c7a27230.js";import"./Steps.868ef23e.js";import"./Modal.5feb4598.js";import"./passwordlessManager.4aab4100.js";import"./pubsub.fa157108.js";import"./storage.0e3c3ef3.js";import"./Passwordless.9f5ca971.js";import"./WidgetsFrame.fbc3780a.js";import"./lottie.e46f0f68.js";import"./activeRecord.b33716ca.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]="c54e91a1-f628-40cb-accc-0beffe431c1e",t._sentryDebugIdIdentifier="sentry-dbid-c54e91a1-f628-40cb-accc-0beffe431c1e")}catch{}})();const E=_({__name:"DashPreview",setup(t){const r=w(),s=g(),d=({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(()=>F.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:h})=>R("preview",s,o,h)),e});return(e,o)=>(n(),b(k,null,[u(v)||!u(a)?(n(),p(B,{key:0,class:"loading",justify:"center"})):l("",!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:d},null,8,["dash","params","dash-player-service"])):l("",!0),u(a)?(n(),p(q,{key:2,onExitFullscreenPreview:f})):l("",!0)],64))}});const Z=P(E,[["__scopeId","data-v-1172cf43"]]);export{Z as default};
//# sourceMappingURL=DashPreview.09f898ef.js.map
