1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[914],{3294:function(e,n,r){Promise.resolve().then(r.bind(r,2818))},7996:function(e,n,r){"use strict";r.r(n),r.d(n,{AuthContext:function(){return s},AuthProvider:function(){return u},useAuth:function(){return l}});var t=r(7437),a=r(2265),i=r(3105),o=r(2730);let s=(0,a.createContext)(),l=()=>(0,a.useContext)(s),u=e=>{let{children:n}=e,[r,l]=(0,a.useState)(null);return(0,a.useEffect)(()=>(0,o.Aj)(i.I,e=>{e&&e.emailVerified?l({...e,isLoggedIn:!0}):l(null)}),[]),(0,t.jsx)(s.Provider,{value:{user:r,setUser:l},children:n})}},3105:function(e,n,r){"use strict";r.d(n,{I:function(){return o}});var t=r(6142),a=r(2730);let i=(0,t.ZF)({databaseURL:"https://poc0-1170a-default-rtdb.europe-west1.firebasedatabase.app/",apiKey:"AIzaSyD-2uUCXhAfR60wdvD8IndoKDXV5CK_il8",authDomain:"poc0-1170a.firebaseapp.com",projectId:"ppoc0-1170a",storageBucket:"poc0-1170a.appspot.com",messagingSenderId:"92785370008",appId:"1:92785370008:web:64a935153880106c1601ed"}),o=(0,a.v0)(i);n.Z=i},2818:function(e,n,r){"use strict";r.r(n),r.d(n,{default:function(){return p}});var t=r(7437),a=r(2265),i=r(7907),o=r(1271),s=r(5908),l=r.n(s),u=r(8015),c=r(455),d=r(3830),_=r(3105),g=r(2730),h=r(703);function p(){let[e,n]=(0,a.useState)(""),[r,s]=(0,a.useState)(""),[p,m]=(0,a.useState)(!0),[v,b]=(0,a.useState)(!0),[x,f]=(0,a.useState)(null),y=(0,i.useRouter)(),j=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,w=new g.hJ,N=async n=>{if(m(!1),b(!1),n.preventDefault(),j.test(e)?(m(!0),console.log("Email is valid")):j.test(e)||(m(!1),console.log("Email is not valid")),r.length>=6?(b(!0),console.log("Password is valid")):r.length<6&&(b(!1),console.log("Password is not valid")),j.test(e)&&r.length>=6)try{let n=(await (0,g.Xb)(_.I,e,r)).user;await (0,g.w$)(n),y.push("/verify-email"),console.log("email verification sent")}catch(e){console.error("error creating user in fb"),console.error(e),f("This email is already registered. Please login or use a different email address")}else console.log("not submit")},C=async()=>{try{let e=await (0,g.rh)(_.I,w);g.hJ.credentialFromResult(e),console.log("user signed in"),y.push("/playground")}catch(a){let e=a.code,n=a.message,r=a.email,t=g.hJ.credentialFromError(a);f("Something went wrong"),console.error(e),console.error(n),console.error(r),console.error(t)}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c.default,{}),(0,t.jsx)("main",{children:(0,t.jsx)(u.Z,{backgroundImage:"/images/highlights.svg",children:(0,t.jsxs)("div",{className:l().card,children:[(0,t.jsxs)("div",{className:l().text,children:[(0,t.jsx)("h1",{className:l().title,children:"Create an account"}),(0,t.jsx)("p",{children:"Enter your email address and password to create your account."})]}),(0,t.jsxs)("form",{className:l().form,onSubmit:N,children:[(0,t.jsxs)("div",{className:l().inputs,children:[(0,t.jsx)(d.Z,{variant:"circular",showLabel:!0,label:"Email",type:"email",placeholder:"Enter your email",value:e,onChange:e=>{n(e.target.value),m(!0),f(null)},required:!0,error:p?null:"Enter a valid email address"}),(0,t.jsx)(d.Z,{variant:"circular",showLabel:!0,label:"Password",type:"password",placeholder:"Enter your password",value:r,onChange:e=>{s(e.target.value),e.target.value.length<=6&&b(!0)},required:!0,error:v?null:"Enter a password that is at least 6 characters"}),x&&(0,t.jsx)("p",{className:l().error,children:x})]}),(0,t.jsx)(o.Z,{variant:"primary",children:"Sign up"})]}),(0,t.jsxs)("div",{className:l().google_auth_container,children:[(0,t.jsx)("p",{children:"Or sign up with"}),(0,t.jsxs)(o.Z,{variant:"secondary",onClick:C,children:[(0,t.jsx)(h.default,{src:"/images/icons/google-logo.svg",alt:"Google logo",width:16,height:16}),"Sign up with Google"]})]})]})})})]})}},1271:function(e,n,r){"use strict";var t=r(7437);r(2265);var a=r(8792),i=r(5195),o=r.n(i);n.Z=e=>{let{children:n,variant:r,ariaLabel:i,href:s,type:l,onClick:u}=e;return s?(0,t.jsx)(a.default,{href:s,className:"primary"===r?o().button_primary:"secondary"===r?o().button_secondary:"tertiary"===r?o().button_tertiary:"ghost"===r?o().button_ghost:null,onClick:u,children:n}):(0,t.jsx)("button",{type:l||"submit",className:"primary"===r?o().button_primary:"secondary"===r?o().button_secondary:"tertiary"===r?o().button_tert
1iary:"ghost"===r?o().button_ghost:null,onClick:u,"aria-label":i,children:n})}},3830:function(e,n,r){"use strict";var t=r(7437);r(2265);var a=r(2695),i=r.n(a);n.Z=e=>{let{variant:n,showLabel:r,label:a,type:o,placeholder:s,value:l,onChange:u,required:c,error:d}=e;return(0,t.jsxs)("div",{className:i().container,children:[r&&(0,t.jsx)("label",{htmlFor:a,children:a}),(0,t.jsx)("input",{className:"circular"===n&&d?i().input_circular_invalid:"circular"!==n||d?"rounded"===n&&d?i().input_rounded_invalid:"rounded"!==n||d?null:i().input_rounded:i().input_circular,id:a,type:o,name:a,inputMode:o,placeholder:s,value:l,onChange:u,required:c,"aria-label":a}),d&&(0,t.jsx)("p",{className:i().error,children:d})]})}},455:function(e,n,r){"use strict";r.r(n);var t=r(7437),a=r(2265),i=r(703),o=r(1271),s=r(2665),l=r.n(s),u=r(8792),c=r(7907),d=r(7996),_=r(2730);n.default=e=>{let{playground:n,onSideMenuClick:r}=e,{user:s}=(0,d.useAuth)(),g=(0,_.v0)(),h=(0,c.useRouter)(),[p,m]=(0,a.useState)(!1),v=()=>{m(!p)},b=async()=>{try{await (0,_.w7)(g),h.push("/login")}catch(e){console.error("Error signing out:",e)}};return n?(0,t.jsx)("nav",{className:l().navigation_playground,children:(0,t.jsxs)("div",{className:l().content,children:[(0,t.jsx)(u.default,{href:"/",className:l().logo_playground,onClick:v,children:(0,t.jsx)(i.default,{src:"/images/logo.svg",alt:"PromptPoint Logo",width:184,height:42,priority:!0})}),(0,t.jsx)("button",{className:l().hamburger_playground,onClick:()=>r(),children:(0,t.jsx)(i.default,{src:"/images/icons/burger-menu-open.svg",alt:"Hamburger Menu",width:18,height:18})}),(0,t.jsxs)("div",{className:l().button_group_playground,children:[(0,t.jsx)(o.Z,{variant:"tertiary",href:s?null:"/login",onClick:s?b:()=>v(),children:s?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.default,{src:"/images/icons/logout.svg",alt:"logout",width:20,height:20})," Logout "]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.default,{src:"/images/icons/login.svg",alt:"logout",width:20,height:20})," Login "]})}),!s&&(0,t.jsx)(o.Z,{label:"Sign up",href:"/sign-up",onClick:()=>v()})]})]})}):(0,t.jsx)("nav",{className:l().navigation,children:(0,t.jsxs)("div",{className:l().content,children:[(0,t.jsx)(u.default,{href:"/",className:l().logo,onClick:()=>{m(!1)},children:(0,t.jsx)(i.default,{src:"/images/logo.svg",alt:"PromptPoint Logo",width:184,height:42,priority:!0})}),(0,t.jsxs)("div",{className:p?l().links:l().links_hidden,children:[(0,t.jsx)(u.default,{href:"/playground",onClick:()=>v(),children:"Playground"}),(0,t.jsx)(u.default,{href:"/pricing",onClick:()=>v(),children:"Pricing"}),(0,t.jsxs)("div",{className:l().button_group,children:[(0,t.jsx)(o.Z,{variant:"secondary",href:s?null:"/login",onClick:s?b:()=>v(),children:s?"Logout":"Login"}),!s&&(0,t.jsx)(o.Z,{variant:"primary",href:"/sign-up",onClick:()=>v(),children:"Sign up"})]})]}),(0,t.jsxs)("button",{className:p?l().hamburger_open:l().hamburger,onClick:()=>v(),children:[(0,t.jsx)("div",{className:l().bar1}),(0,t.jsx)("div",{className:l().bar2}),(0,t.jsx)("div",{className:l().bar3})]})]})})}},8015:function(e,n,r){"use strict";var t=r(7437);r(2265);var a=r(1667),i=r.n(a);n.Z=e=>{let{children:n,backgroundImage:r}=e;return(0,t.jsx)("section",{className:i().section,style:r?{backgroundImage:"url(".concat(r,")"),backgroundSize:"100% 100%",backgroundRepeat:"no-repeat"}:null,children:(0,t.jsx)("div",{className:i().container,children:n})})}},5908:function(e){e.exports={card:"page_card__ui6mT",text:"page_text__7PIcj",title:"page_title__IiR0Y",form:"page_form__CMhLR",inputs:"page_inputs__n9nyJ",error:"page_error__wDYWB",google_auth_container:"page_google_auth_container__KUCJt"}},5195:function(e){e.exports={button_primary:"button_button_primary__S2zAV",button_secondary:"button_button_secondary__5CBle",button_tertiary:"button_button_tertiary__3ibBE",button_ghost:"button_button_ghost__0VclQ"}},2695:function(e){e.exports={container:"input_container__q_Yo7",input_circular:"input_input_circular__HdgYp",input_circular_invalid:"input_input_circular_invalid__okCj6",input_rounded:"input_input_rounded__QpfRA",input_rounded_invalid:"input_input_rounded_invali
1d__ndcKx",error:"input_error__BRlhg"}},2665:function(e){e.exports={navigation:"navigation_navigation__JLOds",navigation_playground:"navigation_navigation_playground__4nIZZ",content:"navigation_content__NGvZ3",links:"navigation_links__6GPDh",links_hidden:"navigation_links_hidden__nEgAX",logo:"navigation_logo__QhQdX",logo_playground:"navigation_logo_playground__iP_3m",button_group:"navigation_button_group__Xtljm",button_group_playground:"navigation_button_group_playground__CXtYS",hamburger:"navigation_hamburger__59NBo",hamburger_open:"navigation_hamburger_open__H8yzY",hamburger_playground:"navigation_hamburger_playground__ygJ_M",bar1:"navigation_bar1__4amPo",bar2:"navigation_bar2__Fyo4P",bar3:"navigation_bar3__0wGsJ"}},1667:function(e){e.exports={section:"section_section__I0u9H",container:"section_container__iUAbC"}}},function(e){e.O(0,[124,55,607,971,69,744],function(){return e(e.s=3294)}),_N_E=e.O()}]);
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.