import{d as _,ey as b,ex as w,F as g,b as n,c as D,bu as u,u as p,eu as d,bw as k,t as P}from"./registerWidgets.751c4cc6.js";import{D as I,m as x}from"./DashPlayer.00e50aa1.js";import{L as B}from"./CircularLoading.7ae0ffc2.js";import{r as R}from"./index.35c304ed.js";import{B as q}from"./BackButton.b97fc7df.js";import{a as l}from"./asyncComputed.4ba8b2d8.js";import{D as C}from"./dashes.29413617.js";import{W as F}from"./workspaces.8821a1e7.js";import"./executeJs.264e8788.js";import"./PlayerNavbar.5bbcffdf.js";import"./icons.839289ff.js";import"./Steps.2317232c.js";import"./Modal.2619bb1d.js";import"./passwordlessManager.8b22003c.js";import"./pubsub.87f27d54.js";import"./storage.fbef8aee.js";import"./Passwordless.5d103398.js";import"./WidgetsFrame.5ca14e96.js";import"./lottie.2da9cd67.js";import"./activeRecord.91f4e05e.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]="5760ecc5-2e05-409a-98e3-11abbbc01d3b",t._sentryDebugIdIdentifier="sentry-dbid-5760ecc5-2e05-409a-98e3-11abbbc01d3b")}catch{}})();const E=_({__name:"DashPreview",setup(t){const r=b(),s=w(),m=({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}=l(()=>C.get(r.params.dashPath)),{result:i}=l(()=>F.get()),c=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"})):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 Z=P(E,[["__scopeId","data-v-1172cf43"]]);export{Z as default};
//# sourceMappingURL=DashPreview.a338df65.js.map
