import{r as g,g as S}from"./executeJs.cb9756c3.js";import{d as x,eB as F,eA as E,F as K,H as m,G as f,u,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.427e9347.js";import{u as w}from"./uuid.dfb0647f.js";import{F as T,R as V}from"./FormRunner.882e8824.js";import{D as G,m as H}from"./index.4fcacc67.js";import{a as O}from"./asyncComputed.32abd7c2.js";import{L as j}from"./CircularLoading.044df273.js";import"./runnerData.f3941ca5.js";import"./url.9044ee0d.js";import"./icons.2a865956.js";import"./index.8dcb7ead.js";import"./pubsub.9b59356e.js";import"./PlayerNavbar.a87eeb58.js";import"./Steps.e44a290d.js";import"./WidgetsFrame.e9d125d0.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.d8baf360.js";import"./geometryUtils.63eef928.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]="2f52efc4-b1ad-4eb6-b900-a1b5c87ce51b",o._sentryDebugIdIdentifier="sentry-dbid-2f52efc4-b1ad-4eb6-b900-a1b5c87ce51b")}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){g("player",c,e,t)}const y=({path:e})=>{c.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(()=>l.value?V.create({formPath:l.value.path}):null),l=f(()=>{var e,t;return(t=(e=r.value)==null?void 0:e.form)!=null?t:null}),v=f(()=>{var t,b;if(!((t=r.value)!=null&&t.dash))return null;const e=H((b=r.value)==null?void 0:b.dash);return e.onRedirect(({url:q,queryParams:B})=>g("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(),k(T,{key:p.playerKey,class:"player",form:l.value,"is-preview":!1,params:u(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:u(a).query,"dash-player-service":v.value,onNavigate:y},null,8,["params","dash-player-service"]))])):(s(),n("div",Y,ee))}});const be=C(ae,[["__scopeId","data-v-b3aa3ca3"]]);export{be as default};
//# sourceMappingURL=Player.4d918e4c.js.map
