import{r as g,m as B}from"./index.3cb779ee.js";import{u as k}from"./uuid.14acfee8.js";import{F as S,R as E}from"./broker.b0552add.js";import{d as F,ey as K,ex as N,E as C,G as m,F as y,bu as u,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.a7f9f083.js";import{D as G,m as O}from"./DashPlayer.08a86f5b.js";import{a as j}from"./asyncComputed.b85a7eae.js";import{L as z}from"./CircularLoading.f04a39f3.js";import"./passwordlessManager.c97a120a.js";import"./pubsub.e3e6423a.js";import"./Passwordless.60541298.js";import"./icons.71d8e4fb.js";import"./executeJs.f647ea9a.js";import"./PlayerNavbar.ea2c3e5c.js";import"./Steps.2d54b29e.js";import"./Modal.9197d569.js";import"./WidgetsFrame.afc734a7.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.2548dd3d.js";import"./lottie.0b007633.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]="15e808bd-5bf0-48ad-b291-19abfcdc726d",o._sentryDebugIdIdentifier="sentry-dbid-15e808bd-5bf0-48ad-b291-19abfcdc726d")}catch{}})();const d=o=>(T("data-v-b3aa3ca3"),o=o(),V(),o),H={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=F({__name:"Player",setup(o){const a=K(),l=N(),p=C({playerKey:k()});m(a,()=>D());function I(e,t){g("player",l,e,t)}const f=({path:e})=>{l.push({name:"player",query:a.query,params:{path:e.split("/")}})},_=async()=>{p.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(()=>c.value?E.create({formPath:c.value.path}):null),c=y(()=>{var e,t;return(t=(e=r.value)==null?void 0:e.form)!=null?t:null}),v=y(()=>{var t,b;if(!((t=r.value)!=null&&t.dash))return null;const e=O((b=r.value)==null?void 0:b.dash);return e.onRedirect(({url:q,queryParams:x})=>g("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)=>u(P)?(s(),n("div",H,[L(z)])):u(R)?(s(),n("div",J,U)):c.value&&h.value?(s(),n("div",W,[(s(),w(S,{key:p.playerKey,class:"player",form:c.value,"is-preview":!1,params:u(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:p.playerKey,class:"player","is-preview":!1,params:u(a).query,"dash-player-service":v.value,onNavigate:f},null,8,["params","dash-player-service"]))])):(s(),n("div",Y,ee))}});const ge=A(ae,[["__scopeId","data-v-b3aa3ca3"]]);export{ge as default};
//# sourceMappingURL=Player.d517df3c.js.map
