dsql-admin/dsql-app/.local_dist/server/pages/create-account.js

1 line
10 KiB
JavaScript
Raw Normal View History

2025-01-14 15:27:08 +00:00
"use strict";(()=>{var e={};e.id=8810,e.ids=[3220,8810],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},73124:(e,t,r)=>{r.r(t),r.d(t,{config:()=>M,default:()=>I,getServerSideProps:()=>L,getStaticPaths:()=>D,getStaticProps:()=>C,reportWebVitals:()=>T,routeModule:()=>G,unstable_getServerProps:()=>Y,unstable_getServerSideProps:()=>F,unstable_getStaticParams:()=>k,unstable_getStaticPaths:()=>Q,unstable_getStaticProps:()=>R});var s={};r.r(s),r.d(s,{CreateAccountContext:()=>O,default:()=>q,getServerSideProps:()=>w});var n=r(63865),a=r(9455),i=r(30671),o=r(5583),c=r(19796),l=r(8732),u=r(82015),p=r.n(u),m=r(26228),d=r(91258),g=r(57660);function x(){let{query:e,invitingUser:t}=p().useContext(O);return(0,l.jsxs)("section",{className:"flex-col items-center lg:items-center gap-20 p-0",children:[(0,l.jsx)("img",{src:"/images/grid.webp",alt:"Dotted image background",className:"absolute top-0 left-0 w-full h-full object-cover opacity-80 dark:opacity-10 z-0"}),(0,l.jsxs)("div",{className:"w-full lg:w-1/2 max-w-6xl gap-4 flex-col items-center px-4 py-10 bg-white dark:bg-slate-900 relative z-10",children:[t?.first_name&&(0,l.jsxs)("span",{className:"text-xs bg-emerald-100 rounded-full px-4 py-1 mb-4",children:["You have been invited by"," ",(0,l.jsxs)("b",{children:[t.first_name," ",t.last_name," (",t.email,")"]})," ","to manage an account. Please create an account to gain access."]}),(0,l.jsx)("h1",{className:"m-0 text-center text-2xl",children:"Create An Account"}),(0,l.jsx)(g.A,{query:e})]})]})}r(92702),r(77047);var h=r(71934);let f=require("sanitize-html");var y=r.n(f);let j={allowedTags:["b","i","em","strong","a","p","span","ul","ol","li","h1","h2","h3","h4","h5","h6","img","div","button","pre","code","br"],allowedAttributes:{a:["href"],img:["src","alt","width","height","class","style"],"*":["style","class"]}};var _=r(84640),S=r(51779);async function v({paradigm:e,queryString:t,queryValues:r}){let s="Read Only"==e?(0,S.A)({ro:!0}):(0,S.A)({fa:!0});try{return await (0,_.A)(s,t,r)}catch(e){return console.log(`DSQL_USER_DB_HANDLER Error: ${e.message}`),null}finally{s?.end()}}var P=r(55511),b=r(79428),A=r(48243);async function E(...e){let t=(0,S.A)();console.log("Querying ...");try{let r=await t.query(...e);return JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e.message),{success:!1,error:e.message}}finally{await t?.end()}}r(46169);var N=r(32572);r(41939);let O=p().createContext({});function q(e){let t="Create Account | Datasquirel",r="Create a FREE account and start storing data.",s=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("title",{children:t}),(0,l.jsx)("meta",{name:"description",content:r}),(0,l.jsx)(d.A,{pageTitle:t,pageDescription:r,pagePathname:"/"})]}),[n,a]=p().useState(null);return e.query?.invite?(0,l.jsx)(N.A,{}):(0,l.jsx)(m.A,{head:s,children:(0,l.jsx)(O.Provider,{value:{user:n,query:e.query,invitingUser:e.invitingUser},children:(0,l.jsx)("main",{children:(0,l.jsx)(x,{})})})})}async function w({req:e,res:t,query:r}){return{redirect:{destination:"/login",permanent:!1}}}let I=(0,i.M)(s,"default"),C=(0,i.M)(s,"getStaticProps"),D=(0,i.M)(s,"getStaticPaths"),L=(0,i.M)(s,"getServerSideProps"),M=(0,i.M)(s,"config"),T=(0,i.M)(s,"reportWebVitals"),R=(0,i.M)(s,"unstable_getStaticProps"),Q=(0,i.M)(s,"unstable_getStaticPaths"),k=(0,i.M)(s,"unstable_getStaticParams"),Y=(0,i.M)(s,"unstable_getServerProps"),F=(0,i.M)(s,"unstable_getServerSideProps"),G=new n.PagesRouteModule({definition:{kind:a.A.PAGES,page:"/create-account",pathname:"/create-account",bundlePath:"",filename:""},components:{App:c.default,Document:o.default},userland:s})},10621:(e,t,r)=>{r.d(t,{A:()=>n});var s=r(8732);function n({message:e}){return(0,s.jsxs)("div",{className:"p-2 bg-orange-50 w-full justify-center rounded text-sm text-orange-700 border border-orange-400 border-solid",children:[(0,s.jsx)("img",{src:"/images/warning.png",alt:"Warning Image Icon",width:22,