1import{l as k,d as N,h as T,n as F}from"./index-HmgwubOw.js";import{s as I}from"./index-BCzVsn89.js";import{s as U}from"./index-efmP6CWd.js";import V from"./RegisterParent-d7xCe7v4.js";import{R as E}from"./RoarLogo-Short-Cmy0QsaZ.js";import{r as o,l as P,j as B,o as j,$ as L,U as u,Q as m,V as s,ac as O,y as i,P as $,u as g,a0 as w,Y as z,a7 as H}from"./tanstack-BuE7OpQV.js";import"./lodash-BxsARtUA.js";import"./firekit-DmdkEPY9.js";import"./sentry-CYO7dHw2.js";import"./index-BPUEvB0O.js";import"./index-CNxDTBGV.js";import"./index-nEfO_SFH.js";import"./index-BbrXYH0I.js";import"./index-DEbAlZMc.js";import"./index-BM8UMNpX.js";import"./ConsentModal-B6LFF_1q.js";import"./index-CBqC_RC6.js";import"./marked.esm-C9B6iGib.js";import"./lowerCase-BPOiiq7z.js";import"./toasts-DNRWHxzm.js";import"./ChallengeV3.vue_vue_type_script_setup_true_lang-BxIxpsNo.js";import"./index-BSCylq0V.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new a.Error().stack;r&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[r]="686cf4fa-3ca5-4fa2-a7a0-abff7619d3ff",a._sentryDebugIdIdentifier="sentry-dbid-686cf4fa-3ca5-4fa2-a7a0-abff7619d3ff")}catch{}})();const M={id:"register-container"},Q={id:"register"},Y={class:"flex flex-wrap p-3 justify-content-around align-items-center gap-3"},W={class:"signin-logo"},q={key:0},G={key:0,class:"flex flex-row justify-content-center align-content-center z-2 absolute ml-5",style:{"margin-top":"-5rem","margin-bottom":"4rem"}},J={key:1,class:"loading-container flex flex-column text-center justify-content-center align-content-center"},K={__name:"RegisterFamilyUsers",props:{code:{type:String,default:null}},setup(a){const r=N(),y=o(!1),c=o(!1),b=a,{data:h}=T({enabled:y}),_=P(()=>{var t,e;return!!((e=(t=h.value)==null?void 0:t.claims)!=null&&e.super_admin)}
1),d=o(!1),f=o(""),p=o(""),n=o(!1),x=o("consent-behavioral-eye-tracking"),D=()=>{n.value=!0},S=()=>{n.value=!1};async function R(t){try{c.value=!0;const v={version:(await r.getLegalDoc(x.value)).currentCommit,name:x.value},l={name:{first:t.firstName,last:t.lastName},canContactForFutureStudies:t.canContactForFutureStudies||!1,invitationCodes:b.code?[b.code]:[]};await r.createNewFamily(t.ParentEmail,t.password,l,[],v,d.value),await r.roarfirekit.logInWithEmailAndPassword({email:t.ParentEmail,password:t.password}),c.value=!1,f.value="Success!",p.value="Your account has been created! Redirecting to your dashboard...",n.value=!0,setTimeout(()=>{window.location.href="/"},1500)}catch(e){c.value=!1,f.value="Error!",p.value=e.message,D()}}async function C(t){R(t)}function A(){d.value=!d.value}return B(async()=>{document.body.classList.add("page-register")}),j(()=>{document.body.classList.remove("page-register")}),(t,e)=>{const v=L("AppSpinner");return m(),u("div",M,[s("section",Q,[s("header",null,[s("div",Y,[s("div",W,[i(E)]),e[2]||(e[2]=O('<div class="flex flex-wrap flex-column align-items-start gap-2" data-v-dcc1834c><div class="flex" data-v-dcc1834c><div class="text-center font-bold text-3xl text-red-800 mb-1 italic" data-v-dcc1834c>ROAR@Home</div><div class="text-sm font-bold text-red-800 ml-1 uppercase" data-v-dcc1834c>beta</div></div><div class="bg-gray-100 rounded p-2" data-v-dcc1834c><div class="flex flex-wrap text-gray-600 text-md font-bold" data-v-dcc1834c> Register a parent or guardian account for ROAR Research Portal </div><div class="flex flex-wrap text-gray-400 text-sm" data-v-dcc1834c> This account allows your family to participate in ROAR research studies! </div><div class="flex flex-wrap text-gray-400 text-sm" data-v-dcc1834c> After registration, you can add children from your dashboard. </div></div></div>',1))])]),s("div",null,[c.value===!1?(m(),u("div",q,[i(V,{code:a.code,onSubmit:e[0]||(e[0]=l=>C(l))},null,8,["code"]),_.value?(m(),u("div",G,[i(g(I),{"model-value":d.value,binary:!0,name:"isTestDatalabel",onChange:A},null,8,["model-value"]),e[3]||(e[3]=s("label",{for:"isTestDatalabel",class:"ml-2"},"This is test data",-1))])):$("",!0)])):(m(),u("div",J,[i(v,{style:{"margin-bottom":"1rem"}}),e[4]||(e[4]=s("span",{class:"text-center"},"Creating Family",-1))])),i(g(U),{visible:n.value,"onUpdate:visible":e[1]||(e[1]=l=>n.value=l),header:f.value,style:{width:"25rem"},modal:!0,draggable:!1},{default:w(()=>[s("p",null,z(p.value),1),i(g(F),{onClick:S},{default:w(()=>[...e[5]||(e[5]=[H("Close",-1)])]),_:1})]),_:1},8,["visible","header"])])])])}}},we=k(K,[["__scopeId","data-v-dcc1834c"]]);export{we as default}; 2//# sourceMappingURL=RegisterFamilyUsers-DT6iIGuk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.