import{d as v,K as D,b as d,c as g,z as t,t as p,D as c,F as w,J as b,H as k,q as I}from"./registerWidgets.f021c1a4.js";import{D as P,n as q}from"./DashPlayer.d250bbd5.js";import{L as x}from"./CircularLoading.403df380.js";import{r as B}from"./index.4db2f83c.js";import{B as R}from"./BackButton.80cc74bf.js";import{a as l}from"./asyncComputed.99b3d376.js";import{D as C}from"./dashes.1f934cf7.js";import{W as F}from"./workspaces.47f3c87c.js";import"./passwordlessManager.60015512.js";import"./runnerData.215fc732.js";import"./executeJs.d39ce091.js";import"./PlayerNavbar.b9e39d0d.js";import"./icons.b993259e.js";import"./WidgetsFrame.38d6628f.js";import"./colors.f679b0a6.js";import"./Modal.05754801.js";import"./log.76987186.js";import"./Passwordless.41457a61.js";import"./lottie.61fc86ea.js";import"./activeRecord.ae1eba97.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[a]="f9d8d8d1-5a75-4c67-80b8-b2d9d8023f6c",s._sentryDebugIdIdentifier="sentry-dbid-f9d8d8d1-5a75-4c67-80b8-b2d9d8023f6c")}catch{}})();const E=v({__name:"DashPreview",setup(s){const a=b(),o=k(),m=({id:e,type:n})=>{n==="dash"?(o.push({name:"dashPreview",params:{dashId:e},query:a.query}),h()):o.push({name:"form-preview",params:{formId:e},query:a.query})},f=()=>{var e;!((e=r.value)!=null&&e.path)||o.push(`/_editor/dash/${encodeURIComponent(r.value.path)}`)},{loading:y,result:r,refetch:h}=l(()=>C.get(a.params.dashPath)),{result:u}=l(()=>F.get()),i=D(()=>{if(!r.value||!u.value||!r.value.makeRunnerData(u.value))return null;const e=q.create(r.value.makeRunnerData(u.value),!1);return e.onRedirect(({url:n,queryParams:_})=>B(o,n,_)),e});return(e,n)=>(d(),g(w,null,[t(y)||!t(r)?(d(),p(x,{key:0,class:"loading",justify:"center"})):c("",!0),t(i)?(d(),p(P,{key:1,class:"player",dash:t(i).runnerData,"is-preview":!0,params:t(a).query,"dash-player-state":t(i),onNavigate:m},null,8,["dash","params","dash-player-state"])):c("",!0),t(r)?(d(),p(R,{key:2,onExitFullscreenPreview:f})):c("",!0)],64))}});const Z=I(E,[["__scopeId","data-v-dde58483"]]);export{Z as default};
//# sourceMappingURL=DashPreview.5fb54687.js.map
