import{d as _,ey as w,ex as b,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.4423f919.js";import{D as I,m as x}from"./DashPlayer.df932533.js";import{L as B}from"./CircularLoading.5965ebdd.js";import{r as R}from"./index.ef5cbb4e.js";import{B as q}from"./BackButton.bc5b3954.js";import{a as l}from"./asyncComputed.39878ec5.js";import{D as C}from"./dashes.1958ed82.js";import{W as F}from"./workspaces.2e933305.js";import"./executeJs.0cc22d46.js";import"./PlayerNavbar.72acb5f2.js";import"./icons.83f94343.js";import"./Steps.4da05aa4.js";import"./Modal.a1d02dc5.js";import"./passwordlessManager.c1306433.js";import"./pubsub.7260b9d2.js";import"./storage.f7ed9f01.js";import"./Passwordless.590b2e09.js";import"./WidgetsFrame.a7d4e3d5.js";import"./lottie.4638634c.js";import"./activeRecord.9d71c559.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]="9aa62b8f-6626-4ed9-93fb-fe980c2b14cd",t._sentryDebugIdIdentifier="sentry-dbid-9aa62b8f-6626-4ed9-93fb-fe980c2b14cd")}catch{}})();const E=_({__name:"DashPreview",setup(t){const r=w(),s=b(),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.8a3c6b54.js.map
