import{r as g,m as B}from"./index.89742732.js";import{u as k}from"./uuid.eb101573.js";import{F as S,R as K}from"./broker.d4f9d0c3.js";import{d as N,ey as C,ex as E,G as F,J as m,H as y,u,b as s,er as n,f as L,c as w,eB as T,eC as V,e as i,v as A}from"./registerWidgets.1e9167ab.js";import{D as G,m as H}from"./DashPlayer.927cc972.js";import{a as J}from"./asyncComputed.8a644895.js";import{L as O}from"./CircularLoading.b699e65c.js";import"./passwordlessManager.b7f590c1.js";import"./pubsub.09eafe35.js";import"./storage.84fcb572.js";import"./Passwordless.a466b928.js";import"./icons.41af03d8.js";import"./executeJs.994915b2.js";import"./PlayerNavbar.399148eb.js";import"./Steps.64a40e70.js";import"./Modal.b646cd22.js";import"./WidgetsFrame.75884b13.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.2753de3d.js";import"./geometryUtils.ea06ddf6.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]="fb83a0eb-c925-4698-924c-c29e246a2134",o._sentryDebugIdIdentifier="sentry-dbid-fb83a0eb-c925-4698-924c-c29e246a2134")}catch{}})();const p=o=>(T("data-v-b3aa3ca3"),o=o(),V(),o),j={key:0,class:"loading"},z={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=N({__name:"Player",setup(o){const a=C(),c=E(),d=F({playerKey:k()});m(a,()=>D());function I(e,t){g("player",c,e,t)}const _=({path:e})=>{c.push({name:"player",query:a.query,params:{path:e.split("/")}})},f=async()=>{d.playerKey=k()};m([()=>a.path,()=>a.query],()=>f());const{loading:P,result:r,error:R,refetch:D}=J(()=>{var e;return B((e=a.path.slice(1))!=null?e:"")}),h=y(()=>l.value?K.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,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:x})=>g("player",c,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",j,[L(O)])):u(R)?(s(),n("div",z,U)):l.value&&h.value?(s(),n("div",W,[(s(),w(S,{key:d.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(),w(G,{key:d.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 ke=A(ae,[["__scopeId","data-v-b3aa3ca3"]]);export{ke as default};
//# sourceMappingURL=Player.9fb0f91e.js.map
