import{r as k,g as S}from"./executeJs.1da1da3b.js";import{d as x,eB as F,eA as E,F as K,H as m,G as y,u,b as s,eu as n,f as N,c as b,eE as L,eF as A,e as i,t as C}from"./outputWidgets.f8f8676d.js";import{u as w}from"./uuid.23323229.js";import{F as T,R as V}from"./FormRunner.c1e8a6ad.js";import{D as G,m as H}from"./index.d410a0ab.js";import{a as O}from"./asyncComputed.9c91cdf6.js";import{L as j}from"./CircularLoading.7abe007d.js";import"./runnerData.8fc648cc.js";import"./url.46c79102.js";import"./icons.c3170cf4.js";import"./index.3bb94425.js";import"./pubsub.8eddc628.js";import"./PlayerNavbar.4747a37d.js";import"./Steps.4e36f5e7.js";import"./WidgetsFrame.a66fb7a8.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.4a8d0188.js";import"./geometryUtils.b568f193.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]="c6d26cd3-56f0-4552-8302-c2ee314a9932",o._sentryDebugIdIdentifier="sentry-dbid-c6d26cd3-56f0-4552-8302-c2ee314a9932")}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(),c=E(),p=K({playerKey:w()});m(a,()=>D());function I(e,t){k("player",c,e,t)}const _=({path:e})=>{c.push({name:"player",query:a.query,params:{path:e.split("/")}})},f=async()=>{p.playerKey=w()};m([()=>a.path,()=>a.query],()=>f());const{loading:P,result:r,error:R,refetch:D}=O(()=>{var e;return S((e=a.path.slice(1))!=null?e:"")}),h=y(()=>l.value?V.create({formPath:l.value.path}):null),l=y(()=>{var e,t;return(t=(e=r.value)==null?void 0:e.form)!=null?t:null}),v=y(()=>{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})=>k("player",c,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)=>u(P)?(s(),n("div",z,[N(j)])):u(R)?(s(),n("div",J,U)):l.value&&h.value?(s(),n("div",W,[(s(),b(T,{key:p.playerKey,class:"player",form:l.value,"is-preview":!1,params:u(a).query,broker:h.value,"enable-auto-focus":!0,onNavigate:_,onLogout:f,onRedirect:I},null,8,["form","params","broker"]))])):v.value?(s(),n("div",X,[(s(),b(G,{key:p.playerKey,class:"player","is-preview":!1,params:u(a).query,"dash-player-service":v.value,onNavigate:_},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.b41be520.js.map
