import{F as I,r as R,R as B}from"./FormRunner.0cc770c9.js";import{d as P,eB as q,eA as x,G as D,J as p,H as y,u as d,b as s,ev as i,f as E,c as F,eE as S,eF as K,e as u,v as L}from"./outputWidgets.6830fc2d.js";import{u as h}from"./uuid.aef94e9c.js";import{a as N}from"./asyncComputed.46a733c1.js";import{a as A}from"./api.982dc47e.js";import{L as C}from"./CircularLoading.e5a979d6.js";import"./url.1f48e231.js";import"./Passwordless.1ac165b7.js";import"./index.60a3b943.js";import"./pubsub.6d4f7540.js";import"./icons.31e4fa46.js";import"./PlayerNavbar.959ff286.js";import"./ActionButton.2565b03b.js";import"./WidgetsFrame.33243032.js";import"./index.7bf97bdd.js";import"./Base.e8ab0cc0.js";import"./Link.9fd1fe6c.js";import"./Paragraph.c22304c7.js";import"./Text.b2a17f23.js";import"./Title.10b04a9c.js";import"./Card.03412a32.js";import"./TabPane.e9b52363.js";import"./hasIn.48daad41.js";import"./runnerData.d09750b2.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]="c0e4bef5-cbff-4f1d-b150-a94e4a21bb17",o._sentryDebugIdIdentifier="sentry-dbid-c0e4bef5-cbff-4f1d-b150-a94e4a21bb17")}catch{}})();const c=o=>(S("data-v-485e3719"),o=o(),K(),o),T={key:0,class:"loading"},V={key:1,class:"error"},G=c(()=>u("h1",null,"Oops! Something went wrong",-1)),H=c(()=>u("p",null,"An unknown error ocurred. Please try again or contact support.",-1)),J=[G,H],O={key:2,class:"form"},j={key:3,class:"error not-found",style:{height:"100vh"}},z=c(()=>u("h1",null,"Page not found",-1)),M=c(()=>u("p",null,"The page you requested could not be found.",-1)),Q=[z,M],U=P({__name:"Player",setup(o){const t=q(),l=x(),m=D({playerKey:h()});p(t,()=>w());function v(e,a){R("player",l,e,a)}const b=({path:e})=>{l.push({name:"player",query:t.query,params:{path:e.split("/")}})},f=async()=>{m.playerKey=h()};p([()=>t.path,()=>t.query],()=>f());const{loading:g,result:r,error:k,refetch:w}=N(()=>{var e;return A((e=t.path.slice(1))!=null?e:"")}),_=y(()=>n.value?B.create(n.value.id):null),n=y(()=>{var e,a;return(a=(e=r.value)==null?void 0:e.form)!=null?a: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,a)=>d(g)?(s(),i("div",T,[E(C)])):d(k)?(s(),i("div",V,J)):n.value&&_.value?(s(),i("div",O,[(s(),F(I,{key:m.playerKey,class:"player",form:n.value,"is-preview":!1,params:d(t).query,broker:_.value,"enable-auto-focus":!0,onNavigate:b,onLogout:f,onRedirect:v},null,8,["form","params","broker"]))])):(s(),i("div",j,Q))}});const be=L(U,[["__scopeId","data-v-485e3719"]]);export{be as default};
//# sourceMappingURL=Player.03601504.js.map
