import{r as b,m as B}from"./index.a5a2f87c.js";import{u as k}from"./uuid.1e408202.js";import{F as S,R as E}from"./broker.9a40da63.js";import{d as F,ey as K,ex as N,E as C,G as m,F as y,bu as c,b as s,c as n,e as L,u as w,eB as T,eC as V,er as i,t as A}from"./registerWidgets.daf4e0d4.js";import{D as G,m as O}from"./DashPlayer.8f003bd4.js";import{a as j}from"./asyncComputed.ea0509ca.js";import{L as z}from"./CircularLoading.56bf1e90.js";import"./passwordlessManager.cc6b1127.js";import"./pubsub.bf966380.js";import"./storage.62ab7605.js";import"./Passwordless.b90967a1.js";import"./icons.74a49ba5.js";import"./executeJs.a21550bd.js";import"./PlayerNavbar.cae0df6c.js";import"./Steps.5b08a7ec.js";import"./Modal.041843ec.js";import"./WidgetsFrame.88a82b36.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.a4b4dcd8.js";import"./lottie.1c3e1229.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]="3e37843a-5804-484f-8755-4bf79e13ea78",o._sentryDebugIdIdentifier="sentry-dbid-3e37843a-5804-484f-8755-4bf79e13ea78")}catch{}})();const p=o=>(T("data-v-b3aa3ca3"),o=o(),V(),o),H={key:0,class:"loading"},J={key:1,class:"error"},M=p(()=>i("h1",null,"Oops! Something went wrong",-1)),Q=p(()=>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=p(()=>i("h1",null,"Page not found",-1)),$=p(()=>i("p",null,"The page you requested could not be found.",-1)),ee=[Z,$],ae=F({__name:"Player",setup(o){const a=K(),l=N(),d=C({playerKey:k()});m(a,()=>D());function I(e,t){b("player",l,e,t)}const f=({path:e})=>{l.push({name:"player",query:a.query,params:{path:e.split("/")}})},_=async()=>{d.playerKey=k()};m([()=>a.path,()=>a.query],()=>_());const{loading:P,result:r,error:R,refetch:D}=j(()=>{var e;return B((e=a.path.slice(1))!=null?e:"")}),h=y(()=>u.value?E.create({formPath:u.value.path}):null),u=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=O((g=r.value)==null?void 0:g.dash);return e.onRedirect(({url:q,queryParams:x})=>b("player",l,q,x)),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",H,[L(z)])):c(R)?(s(),n("div",J,U)):u.value&&h.value?(s(),n("div",W,[(s(),w(S,{key:d.playerKey,class:"player",form:u.value,"is-preview":!1,params:c(a).query,broker:h.value,"enable-auto-focus":!0,onNavigate:f,onLogout:_,onRedirect:I},null,8,["form","params","broker"]))])):v.value?(s(),n("div",X,[(s(),w(G,{key:d.playerKey,class:"player","is-preview":!1,params:c(a).query,"dash-player-service":v.value,onNavigate:f},null,8,["params","dash-player-service"]))])):(s(),n("div",Y,ee))}});const ke=A(ae,[["__scopeId","data-v-b3aa3ca3"]]);export{ke as default};
//# sourceMappingURL=Player.3fc1355f.js.map
