import{d as _,ey as w,ex as g,H as b,b as n,er as D,u,c as p,eu as d,bu as k,v as P}from"./registerWidgets.faec4901.js";import{D as I,m as x}from"./DashPlayer.66e0598b.js";import{L as B}from"./CircularLoading.ca58d6f5.js";import{r as R}from"./index.dabe2e32.js";import{B as q}from"./BackButton.17fb9fc5.js";import{a as l}from"./asyncComputed.04758d6d.js";import{D as C}from"./dashes.ee327d44.js";import{W as E}from"./workspaces.6b009dc4.js";import"./executeJs.b1249f30.js";import"./PlayerNavbar.49b00875.js";import"./icons.4b27c20b.js";import"./Steps.77469d63.js";import"./Modal.c4a3eb37.js";import"./geometryUtils.146621f7.js";import"./passwordlessManager.90d3a316.js";import"./pubsub.c32c984e.js";import"./storage.02df2e1a.js";import"./Passwordless.961add2f.js";import"./WidgetsFrame.6243aeb3.js";import"./activeRecord.64153c3d.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]="684c0484-6ba4-46d5-8073-c5d37ea0bb01",t._sentryDebugIdIdentifier="sentry-dbid-684c0484-6ba4-46d5-8073-c5d37ea0bb01")}catch{}})();const F=_({__name:"DashPreview",setup(t){const r=w(),s=g(),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(()=>E.get()),c=b(()=>{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(F,[["__scopeId","data-v-1172cf43"]]);export{Z as default};
//# sourceMappingURL=DashPreview.bb89010c.js.map
