import{F as I,r as R,g as P,R as q}from"./FormRunner.7f674642.js";import{d as x,ez as B,ey as D,E,G as p,F as y,u as d,b as a,et as i,f as F,c as S,eC as C,eD as K,e as u,t as L}from"./outputWidgets.b00cf7e9.js";import{u as h}from"./uuid.564748f2.js";import{a as N}from"./asyncComputed.1f0126f2.js";import{L as T}from"./CircularLoading.432b1cc5.js";import"./url.255821a6.js";import"./storage.c80f95dc.js";import"./pubsub.b6fbda2c.js";import"./jwt-decode.esm.74bd4619.js";import"./index.24187c91.js";import"./icons.99873bd8.js";import"./PlayerNavbar.d681aae7.js";import"./ActionButton.5120a9f7.js";import"./WidgetsFrame.7d0e2ff8.js";import"./index.d039227c.js";import"./Card.7dd73857.js";import"./TabPane.42b37be1.js";import"./hasIn.606210e6.js";import"./index.77ec4d5c.js";import"./Text.20fe3ce1.js";import"./Link.29c2dd22.js";import"./Title.334eceae.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="1f892e44-3815-4362-87c9-b89b5d103828",o._sentryDebugIdIdentifier="sentry-dbid-1f892e44-3815-4362-87c9-b89b5d103828")}catch{}})();const c=o=>(C("data-v-485e3719"),o=o(),K(),o),V={key:0,class:"loading"},z={key:1,class:"error"},A=c(()=>u("h1",null,"Oops! Something went wrong",-1)),G=c(()=>u("p",null,"An unknown error ocurred. Please try again or contact support.",-1)),O=[A,G],j={key:2,class:"form"},H={key:3,class:"error not-found",style:{height:"100vh"}},J=c(()=>u("h1",null,"Page not found",-1)),M=c(()=>u("p",null,"The page you requested could not be found.",-1)),Q=[J,M],U=x({__name:"Player",setup(o){const t=B(),l=D(),m=E({playerKey:h()});p(t,()=>w());function v(e,s){R("player",l,e,s)}const g=({path:e})=>{l.push({name:"player",query:t.query,params:{path:e.split("/")}})},_=async()=>{m.playerKey=h()};p([()=>t.path,()=>t.query],()=>_());const{loading:b,result:r,error:k,refetch:w}=N(()=>{var e;return P((e=t.path.slice(1))!=null?e:"")}),f=y(()=>n.value?q.create(n.value.id):null),n=y(()=>{var e,s;return(s=(e=r.value)==null?void 0:e.form)!=null?s:null});return p(r,()=>{var e;!r.value||r.value.form&&(document.title=(e=r.value.form.welcomeTitle)!=null?e:r.value.form.title)}),(e,s)=>d(b)?(a(),i("div",V,[F(T)])):d(k)?(a(),i("div",z,O)):n.value&&f.value?(a(),i("div",j,[(a(),S(I,{key:m.playerKey,class:"player",form:n.value,"is-preview":!1,params:d(t).query,broker:f.value,"enable-auto-focus":!0,onNavigate:g,onLogout:_,onRedirect:v},null,8,["form","params","broker"]))])):(a(),i("div",H,Q))}});const he=L(U,[["__scopeId","data-v-485e3719"]]);export{he as default};
//# sourceMappingURL=Player.65f570b8.js.map
