import{d as _,ey as w,ex as g,F as D,b as n,c as k,bu as u,u as p,eu as l,bw as b,t as P}from"./registerWidgets.ff0e603c.js";import{D as I,m as x}from"./DashPlayer.64f07090.js";import{L as B}from"./CircularLoading.b4308657.js";import{r as R}from"./index.e3ad034d.js";import{B as q}from"./BackButton.2c18bd2e.js";import{a as m}from"./asyncComputed.47db4727.js";import{D as C}from"./dashes.ae356330.js";import{W as F}from"./workspaces.145b71db.js";import"./executeJs.f91f5f90.js";import"./PlayerNavbar.9da36452.js";import"./icons.e90de051.js";import"./Steps.483489b6.js";import"./Modal.61a541af.js";import"./passwordlessManager.c02d6ee2.js";import"./pubsub.bd8735a3.js";import"./storage.db287aee.js";import"./Passwordless.e0f23eef.js";import"./WidgetsFrame.09aba4b0.js";import"./lottie.0af290d8.js";import"./activeRecord.193d97cb.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]="eb7af499-95e1-47d0-89fd-08503710ad00",t._sentryDebugIdIdentifier="sentry-dbid-eb7af499-95e1-47d0-89fd-08503710ad00")}catch{}})();const E=_({__name:"DashPreview",setup(t){const r=w(),s=g(),c=({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()),d=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(),k(b,null,[u(v)||!u(a)?(n(),p(B,{key:0,class:"loading",justify:"center"})):l("",!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:c},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.c6b99bec.js.map
