PageSourceSearch

https://www.codedex.io/_next/static/chunks/pages/invite-9deca520181869ec.js

js codedex.io collected 2026-09-25 14:56:48 UTC 6,184 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6273],{386:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/invite",function(){return t(68e3)}])},68e3:function(n,e,t){"use strict";t.r(e),t.d(e,{default:function(){return invite}});var i=t(85893),r=t(82729),a=t(67294),s=t(19521);function _templateObject(){let n=(0,r._)(["\n  ",' {\n    margin-top: 6.5rem;\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    max-width: 1200px;\n    width: 100vw;\n    height: calc(100vh - 17.5rem);\n    font-family: "Work Sans", sans-serif;\n    color: ',';\n\n    img {\n      width: 200px;\n      height: auto;\n      margin-top: 4rem;\n    }\n\n    h1 {\n      margin-top: 3rem;\n      text-align: center;\n      font-size: 1.5rem;\n      font-family: "Press Start 2P", cursive;\n    }\n  }\n\n  '," {\n    h1 {\n      font-size: 1.5rem;\n    }\n  }\n\n  "," {\n    h1 {\n      font-size: 1.5rem;\n    }\n  }\n  "," {\n  }\n"]);return _templateObject=function(){return n},n}let l=s.default.div.withConfig({componentId:"sc-5395a03b-0"})(_templateObject(),n=>{let{theme:e}=n;return e.breakpoints.xs},n=>{let{theme:e}=n;return e.colors.text1},n=>{let{theme:e}=n;return e.breakpoints.sm},n=>{let{theme:e}=n;return e.breakpoints.md},n=>{let{theme:e}=n;return e.breakpoints.lg});function Header(){return(0,a.useEffect)(()=>{document.body.style.overflow=""},[]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("img",{src:"/images/workshop2.png",alt:"friends learning"}),(0,i.jsx)("h1",{children:"Invite a friend!"})]})}var o=t(99428),m=t(62069),c=t(9473),f=t(609),d=t(41664),u=t.n(d),h=t(62286),p=t.n(h);function InviteInterface_templateObject(){let n=(0,r._)(["\n  margin: auto 0rem;\n  margin-top: 0.5rem;\n  color: ",';\n\n  .main-container {\n    padding: 1rem;\n  }\n\n  .level-title {\n    font-size: 16px;\n    font-style: normal;\n    font-weight: 400;\n    line-height: 24px;\n    margin-left: 0.4rem;\n  }\n  p.message {\n    margin: 0px;\n    margin-top: 0.2rem;\n    //height: 21px;\n  }\n\n  input {\n    font-size: 14px;\n    font-family: "Work Sans", sans-serif;\n    font-weight: 600;\n    margin-left: 0.8rem;\n\n    ::placeholder {\n      font-weight: 600;\n      color: #adadad;\n    }\n  }\n  button.nes-btn {\n    font-size: 12px;\n    color: black;\n    width: fit-content;\n  }\n\n  .progress-container {\n    display: flex;\n    margin-left: 0.4rem;\n    align-items: center;\n    gap: 1rem;\n    progress {\n      height: 30px;\n      border-image-outset: 1;\n    }\n\n    p {\n      margin: 0px;\n      font-family: "Work Sans", sans-serif;\n      font-size: 15px;\n      font-style: normal;\n      font-weight: 500;\n      line-height: normal;\n      margin-left: 0.2rem;\n    }\n  }\n\n  .cta-container {\n    display: flex;\n    justify-content: center;
1\n    align-items: center;\n    flex-flow: column wrap;\n    font-family: Montserrat, sans-serif;\n    font-weight: 500;\n    font-size: 14px;\n    margin-right: 1.1rem;\n\n    label,\n    p {\n      color: ',";\n      width: 55%;\n      font-size: 16px;\n      text-align: center;\n      margin-left: 0.6rem;\n      margin-top: ",';\n      margin-bottom: 1rem;\n    }\n\n    button {\n      font-family: "Press Start 2P", cursive;\n      font-size: 14px;\n      margin-top: 0.5rem;\n      margin-left: 0.6rem;\n    }\n\n    .input-container {\n      display: flex;\n      width: 60%;\n      max-width: 800px;\n      margin-top: 1rem;\n      align-items: stretch;\n      button {\n        margin: 0;\n        margin-left: 0.5rem;\n      }\n    }\n  }\n\n  button.sign-in {\n    margin: 0 auto;\n    margin-top: 1.2rem;\n\n  }\n\n  button a {\n    font-family: "Press Start 2P", cursive;\n    color: hsla(0, 0%, 100%, 0.87);\n  }\n']);return InviteInterface_templateObject=function(){return n},n}let g=s.default.div.withConfig({componentId:"sc-1f5dd0dc-0"})(InviteInterface_templateObject(),n=>"dark"===n.theme.mode?"rgba(255, 255, 255, 0.87)":"#000000",n=>"dark"===n.theme.mode?"hsla(0,0%,100%,.6)":"hsla(0,0%,0%,.6)",n=>(n.theme.mode,"0.7rem"));var inviteFriends_InviteInterface=function(){let[n,e]=(0,a.useState)(""),[t,r]=(0,a.useState)(!1),s=(0,c.v9)(f.IC);(0,c.v9)(f.ot);let l=(0,c.v9)(f.o4),o=p().get().codedextoken||"",m=(0,a.useCallback)(async()=>{if(!n)return;let t=n.split(",").map(n=>n.trim()),i=/^[a-zA-Z0-9+._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/,a=t.filter(n=>i.test(n));if(0!==a.length){r(!0);try{await fetch("/api/invite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({inviteEmails:a,name:null==s?void 0:s.name,email:null==s?void 0:s.email})}),setTimeout(()=>{r(!1)},3e3)}catch(n){console.error(n)}finally{e("")}}},[n,null==s?void 0:s.email,null==s?void 0:s.name]);return o?(0,i.jsxs)(g,{children:[(0,i.jsx)("div",{className:"progress-container"}),(0,i.jsxs)("div",{className:"cta-container",children:[(0,i.jsx)("label",{htmlFor:"email",children:"Learning is more fun with friends! Fill your friend's email address and we'll send them a personal invite \uD83D\uDC8C"}),(0,i.jsxs)("div",{className:"input-container",children:[(0,i.jsx)("input",{type:"text",placeholder:"Email address",className:"nes-input ".concat("light"===l?"":"is-dark"),id:"email",name:"email",value:n,onChange:n=>e(n.target.value)}),(0,i.jsx)("button",{className:"nes-btn is-success close",onClick:()=>{m()},children:"Invite"})]}),(0,i.jsx)("p",{className:"message",children:t&&(0,i.jsx)("strong",{children:"Invitation sent successfully!"})})]})]}):(0,i.jsx)(g,{children:(0,i.jsxs)("div",{className:"cta-container",children:[(0,i.jsx)("p",{children:"Learning is more fun with friends! Fill your friend's email address and we'll send them a personal invite \uD83D\uDC8C"}),(0,i.jsx)("button",{className:"nes-btn is-error sign-in",children:(0,i.jsx)(u(),{href:"/login",children:"Sign in"})})]})})},x=t(86961),invite=function(){return(0,i.jsxs)("div",{style:{overflow:"hidden"},children:[(0,i.jsx)(o.Z,{}),(0,i.jsx)(m.Z,{children:(0,i.jsxs)(l,{children:[(0,i.jsx)(Header,{}),(0,i.jsx)(inviteFriends_InviteInterface,{})]})}),(0,i.jsx)(x.Z,{})]})}}},function(n){n.O(0,[1272,8700,4153,1622,9280,9428,6961,9774,2888,179],function(){return n(n.s=386)}),_N_E=n.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.