import{d as _,K as w,J as g,L as D,b as n,c as k,A as u,u as d,E as p,F as b,t as P}from"./registerWidgets.a9b9c198.js";import{D as I,m as x}from"./DashPlayer.f295557b.js";import{L as B}from"./CircularLoading.7f46cf05.js";import{r as R}from"./index.e0dbf129.js";import{B as q}from"./BackButton.ef5c329d.js";import{a as l}from"./asyncComputed.380e0794.js";import{D as C}from"./dashes.7d3feda1.js";import{W as E}from"./workspaces.3f458914.js";import"./executeJs.28eb4656.js";import"./PlayerNavbar.8c4f0639.js";import"./icons.e4ff78f2.js";import"./Steps.0d4f20d5.js";import"./Modal.0c783a31.js";import"./passwordlessManager.18e9d509.js";import"./pubsub.d6cf90d7.js";import"./Passwordless.3e56a551.js";import"./WidgetsFrame.761f181e.js";import"./lottie.cb2a87b3.js";import"./activeRecord.ded96690.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]="b1e91938-7af0-4fac-a5dc-3f2ce8bd9468",t._sentryDebugIdIdentifier="sentry-dbid-b1e91938-7af0-4fac-a5dc-3f2ce8bd9468")}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}),h()):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:h}=l(()=>C.get(r.params.dashPath)),{result:i}=l(()=>E.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:y})=>R("preview",s,o,y)),e});return(e,o)=>(n(),k(b,null,[u(v)||!u(a)?(n(),d(B,{key:0,class:"loading",justify:"center"})):p("",!0),c.value?(n(),d(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"])):p("",!0),u(a)?(n(),d(q,{key:2,onExitFullscreenPreview:f})):p("",!0)],64))}});const Y=P(F,[["__scopeId","data-v-1172cf43"]]);export{Y as default};
//# sourceMappingURL=DashPreview.3c4003c8.js.map
