import{r as g,m as B}from"./index.75f517f3.js";import{u as k}from"./uuid.cd57cf20.js";import{F as S,R as E}from"./broker.dd00d469.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.92d2f644.js";import{D as G,m as O}from"./DashPlayer.766f9779.js";import{a as j}from"./asyncComputed.969e5e52.js";import{L as z}from"./CircularLoading.e3659467.js";import"./passwordlessManager.d1484834.js";import"./pubsub.cabffe13.js";import"./storage.63ab52ef.js";import"./Passwordless.493e6d57.js";import"./icons.f7e2c66d.js";import"./executeJs.3da04476.js";import"./PlayerNavbar.e2f19917.js";import"./Steps.b001c6e8.js";import"./Modal.2ef1e90a.js";import"./WidgetsFrame.c49cae71.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.0b91cf80.js";import"./lottie.8475a642.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new Error().stack;r&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[r]="fc73fbd9-ed65-4d55-8cbb-90ad9c2057b9",o._sentryDebugIdIdentifier="sentry-dbid-fc73fbd9-ed65-4d55-8cbb-90ad9c2057b9")}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,$],re=F({__name:"Player",setup(o){const r=K(),c=N(),p=C({playerKey:k()});m(r,()=>D());function I(e,t){g("player",c,e,t)}const f=({path:e})=>{c.push({name:"player",query:r.query,params:{path:e.split("/")}})},_=async()=>{p.playerKey=k()};m([()=>r.path,()=>r.query],()=>_());const{loading:P,result:a,error:R,refetch:D}=j(()=>{var e;return B((e=r.path.slice(1))!=null?e:"")}),h=y(()=>l.value?E.create({formPath:l.value.path}):null),l=y(()=>{var e,t;return(t=(e=a.value)==null?void 0:e.form)!=null?t:null}),v=y(()=>{var t,b;if(!((t=a.value)!=null&&t.dash))return null;const e=O((b=a.value)==null?void 0:b.dash);return e.onRedirect(({url:q,queryParams:x})=>g("player",c,q,x)),e});return m(a,()=>{var e;!a.value||(a.value.form?document.title=(e=a.value.form.welcomeTitle)!=null?e:a.value.form.title:a.value.dash&&(document.title=a.value.dash.title))}),(e,t)=>u(P)?(s(),n("div",H,[L(z)])):u(R)?(s(),n("div",J,U)):l.value&&h.value?(s(),n("div",W,[(s(),w(S,{key:p.playerKey,class:"player",form:l.value,"is-preview":!1,params:u(r).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(r).query,"dash-player-service":v.value,onNavigate:f},null,8,["params","dash-player-service"]))])):(s(),n("div",Y,ee))}});const ke=A(re,[["__scopeId","data-v-b3aa3ca3"]]);export{ke as default};
//# sourceMappingURL=Player.d09cfac6.js.map
