import{d as _,ez as b,ey as w,H as g,b as n,et as D,u,c as p,ev as d,bf as k,v as P}from"./outputWidgets.397b3720.js";import{D as I,m as x}from"./DashPlayer.92d70fea.js";import{L as B}from"./CircularLoading.2c694ce3.js";import"./index.06276212.js";import{r as R}from"./executeJs.1a09d42d.js";import{B as q}from"./BackButton.9f784a15.js";import{a as l}from"./asyncComputed.28fc9d36.js";import{D as C}from"./dashes.ba5de5ab.js";import{W as E}from"./workspaces.d5f1211a.js";import"./geometryUtils.1a25ef21.js";import"./runnerData.e0501241.js";import"./index.9ea8c44d.js";import"./pubsub.fe0f0397.js";import"./WidgetsFrame.cb4cea4e.js";import"./icons.5e65f599.js";import"./url.53bc193a.js";import"./PlayerNavbar.0fa53bf9.js";import"./Steps.85b9af0a.js";import"./activeRecord.6bb6b853.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]="35c2ecae-7dbb-44c1-b1e7-0c144b967447",t._sentryDebugIdIdentifier="sentry-dbid-35c2ecae-7dbb-44c1-b1e7-0c144b967447")}catch{}})();const F=_({__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(()=>E.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 Y=P(F,[["__scopeId","data-v-1172cf43"]]);export{Y as default};
//# sourceMappingURL=DashPreview.bf07ad62.js.map
