import{r as b,g as S}from"./executeJs.db6ddd3b.js";import{d as x,eB as F,eA as E,F as K,H as m,G as f,u as c,b as s,eu as n,f as N,c as k,eE as L,eF as A,e as i,t as C}from"./outputWidgets.562826ac.js";import{u as w}from"./uuid.aae1573d.js";import{F as T,R as V}from"./FormRunner.e2193976.js";import{D as G,m as H}from"./index.ab1e9976.js";import{a as O}from"./asyncComputed.df2d9552.js";import{L as j}from"./CircularLoading.1d439fd2.js";import"./runnerData.52ec0396.js";import"./url.5a1383d2.js";import"./icons.63405824.js";import"./index.89e36de9.js";import"./pubsub.7185b91b.js";import"./PlayerNavbar.bf65d008.js";import"./Steps.cad82ea8.js";import"./WidgetsFrame.0453e297.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.8d5d072f.js";import"./geometryUtils.27c56739.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[a]="09d761ff-7a47-45fc-9a43-f53a737b2ba5",o._sentryDebugIdIdentifier="sentry-dbid-09d761ff-7a47-45fc-9a43-f53a737b2ba5")}catch{}})();const d=o=>(L("data-v-b3aa3ca3"),o=o(),A(),o),z={key:0,class:"loading"},J={key:1,class:"error"},M=d(()=>i("h1",null,"Oops! Something went wrong",-1)),Q=d(()=>i("p",null,"An unknown error ocurred. Please try again or contact support.",-1)),U=[M,Q],W={key:2,class:"form"},X={key:3,class:"dash-wrapper"},Y={key:4,class:"error not-found"},Z=d(()=>i("h1",null,"Page not found",-1)),$=d(()=>i("p",null,"The page you requested could not be found.",-1)),ee=[Z,$],ae=x({__name:"Player",setup(o){const a=F(),l=E(),p=K({playerKey:w()});m(a,()=>D());function I(e,t){b("player",l,e,t)}const y=({path:e})=>{l.push({name:"player",query:a.query,params:{path:e.split("/")}})},_=async()=>{p.playerKey=w()};m([()=>a.path,()=>a.query],()=>_());const{loading:P,result:r,error:R,refetch:D}=O(()=>{var e;return S((e=a.path.slice(1))!=null?e:"")}),h=f(()=>u.value?V.create({formPath:u.value.path}):null),u=f(()=>{var e,t;return(t=(e=r.value)==null?void 0:e.form)!=null?t:null}),v=f(()=>{var t,g;if(!((t=r.value)!=null&&t.dash))return null;const e=H((g=r.value)==null?void 0:g.dash);return e.onRedirect(({url:q,queryParams:B})=>b("player",l,q,B)),e});return m(r,()=>{var e;!r.value||(r.value.form?document.title=(e=r.value.form.welcomeTitle)!=null?e:r.value.form.title:r.value.dash&&(document.title=r.value.dash.title))}),(e,t)=>c(P)?(s(),n("div",z,[N(j)])):c(R)?(s(),n("div",J,U)):u.value&&h.value?(s(),n("div",W,[(s(),k(T,{key:p.playerKey,class:"player",form:u.value,"is-preview":!1,params:c(a).query,broker:h.value,"enable-auto-focus":!0,onNavigate:y,onLogout:_,onRedirect:I},null,8,["form","params","broker"]))])):v.value?(s(),n("div",X,[(s(),k(G,{key:p.playerKey,class:"player","is-preview":!1,params:c(a).query,"dash-player-service":v.value,onNavigate:y},null,8,["params","dash-player-service"]))])):(s(),n("div",Y,ee))}});const ge=C(ae,[["__scopeId","data-v-b3aa3ca3"]]);export{ge as default};
//# sourceMappingURL=Player.78fdc9ee.js.map
