PageSourceSearch

https://namag.app/_next/static/chunks/pages/pending-f0a25697de2868e7.js

js namag.app collected 2026-10-02 01:15:00 UTC 16,725 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2870],{96519:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pending",function(){return r(54512)}])},32602:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return s},noSSR:function(){return i}});let a=r(38754);r(85893),r(67294);let n=a._(r(35491));function l(e){return{default:(null==e?void 0:e.default)||e}}function i(e,t){return delete t.webpack,delete t.modules,e(t)}function s(e,t){let r=n.default,a={loading:e=>{let{error:t,isLoading:r,pastDelay:a}=e;return null}};e instanceof Promise?a.loader=()=>e:"function"==typeof e?a.loader=e:"object"==typeof e&&(a={...a,...e});let s=(a={...a,...t}).loader;return(a.loadableGenerated&&(a={...a,...a.loadableGenerated},delete a.loadableGenerated),"boolean"!=typeof a.ssr||a.ssr)?r({...a,loader:()=>null!=s?s().then(l):Promise.resolve(l(()=>null))}):(delete a.webpack,delete a.modules,i(r,a))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1159:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return a}});let a=r(38754)._(r(67294)).default.createContext(null)},35491:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return m}});let a=r(38754)._(r(67294)),n=r(1159),l=[],i=[],s=!1;function o(e){let t=e(),r={loading:!0,loaded:null,error:null};return r.promise=t.then(e=>(r.loading=!1,r.loaded=e,e)).catch(e=>{throw r.loading=!1,r.error=e,e}),r}class d{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:e,_opts:t}=this;e.loading&&("number"==typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},t.delay)),"number"==typeof t.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},t.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(e=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(e){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...e},this._callbacks.forEach(e=>e())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function u(e){return function(e,t){let r=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),l=null;function o(){if(!l){let t=new d(e,r);l={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return l.promise()}if(!s){let e=r.webpack?r.webpack():r.modules;e&&i.push(t=>{for(let r of e)if(t.includes(r))return o()})}function u(e,t){!function(){o();let e=a.default.useContext(n.LoadableContext);e&&Array.isArray(r.modules)&&r.modules.forEach(t=>{e(t)})}();let i=a.default.useSyncExternalStore(l.subscribe,l.getCurrentValue,l.getCurrentValue);return a.default.useImperativeHandle(t,()=>({retry:l.retry}),[]),a.default.useMemo(()=>{var t;return i.loading||i.error?a.default.createElement(r.loading,{isLoading:i.loading,pastDelay:i.pastDelay,timedOut:i.timedOut,error:i.error,retry:l.retry}):i.loaded?a.default.createElement((t=i.loaded)&&t.default?t.default:t,e):null},[e,i])}return u.preload=()=>o(),u.displayName="LoadableComponent",a.default.forwardRef(u)}(o,e)}function c(e,t){let r=[];for(;e.length;){let a=e.pop();r.push(a(t))}return Promise.all(r).then(()=>{if(e.length)return c(e,t)})}u.preloadAll=()=>new Promise((e,t)=>
1{c(l).then(e,t)}),u.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let r=()=>(s=!0,t());c(i,e).then(r,r)})),window.__NEXT_PRELOADREADY=u.preloadReady;let m=u},89180:function(e,t,r){"use strict";r.d(t,{R:function(){return d}});var a=r(85893),n=r(9008),l=r.n(n);let i=r(83454).env.NEXT_PUBLIC_SITE_URL||"https://namag.app",s="Namag",o="".concat(i,"/images/og-image.png");function d(e){let{title:t,description:r="An AI-powered library that makes saving effortless and finding instant, so you actually benefit from what you save.",path:n="",ogImage:d=o,ogImageAlt:u="Namag — an AI-powered library for everything you save.",ogType:c="website",noindex:m=!1,skipSuffix:h=!1,children:p}=e,x=h||t===s?t:"".concat(t," | ").concat(s),f="".concat(i).concat(n);return(0,a.jsxs)(l(),{children:[(0,a.jsx)("title",{children:x}),(0,a.jsx)("meta",{name:"description",content:r}),(0,a.jsx)("link",{rel:"canonical",href:f}),m&&(0,a.jsx)("meta",{name:"robots",content:"noindex, nofollow"}),(0,a.jsx)("meta",{property:"og:title",content:x}),(0,a.jsx)("meta",{property:"og:description",content:r}),(0,a.jsx)("meta",{property:"og:url",content:f}),(0,a.jsx)("meta",{property:"og:type",content:c}),(0,a.jsx)("meta",{property:"og:site_name",content:s}),(0,a.jsx)("meta",{property:"og:image",content:d}),(0,a.jsx)("meta",{property:"og:image:alt",content:u}),(0,a.jsx)("meta",{property:"og:image:width",content:"1200"}),(0,a.jsx)("meta",{property:"og:image:height",content:"630"}),(0,a.jsx)("meta",{property:"og:locale",content:"en_US"}),(0,a.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,a.jsx)("meta",{name:"twitter:title",content:x}),(0,a.jsx)("meta",{name:"twitter:description",content:r}),(0,a.jsx)("meta",{name:"twitter:image",content:d}),(0,a.jsx)("meta",{name:"twitter:image:alt",content:u}),p]})}},54512:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSP:function(){return j},default:function(){return k}});var a=r(85893),n=r(67294),l=r(11163),i=r(89180),s=r(9008),o=r.n(s),d=r(4298),u=r.n(d),c=r(5152),m=r.n(c),h=r(34516),p=r(67726),x=r(32474);let f=m()(()=>r.e(4920).then(r.bind(r,74920)).then(e=>e.DeleteAccountModal),{loadableGenerated:{webpack:()=>[74920]},ssr:!1}),b="0x4AAAAAACNZuLjE1-AqfJK5",y=e=>"".concat("noax-waitlist-requested",":").concat(e||"anon"),g={invalid:"The invitation link you opened is no longer valid — it may have already been used."};function v(e){let{email:t,inviteNotice:r}=e,{theme:l}=(0,h.F)(),[i,s]=(0,n.useState)(null!=t?t:""),[d,c]=(0,n.useState)(!1),[m,v]=(0,n.useState)(!1),[w,j]=(0,n.useState)(null),[k,_]=(0,n.use
1State)(null),[N,C]=(0,n.useState)(null),[S,E]=(0,n.useState)(!1),[P,O]=(0,n.useState)(!1),[L,A]=(0,n.useState)(!1),[T,F]=(0,n.useState)(!!r),[M,R]=(0,n.useState)(""),[D,I]=(0,n.useState)(!1),[B,V]=(0,n.useState)(null),W=(0,n.useRef)(null),q=(0,n.useRef)(null);(0,n.useEffect)(()=>{t&&s(e=>e||t)},[t]),(0,n.useEffect)(()=>{try{var e;let t=localStorage.getItem(y(null===(e=(0,p.vF)())||void 0===e?void 0:e.sub));t&&(j(t),v(!0))}catch(e){}},[]),(0,n.useEffect)(()=>{window.turnstile&&!S&&E(!0)},[S]),(0,n.useEffect)(()=>{if(!m&&!T)return S&&W.current&&b&&!q.current&&(q.current=window.turnstile.render(W.current,{sitekey:b,callback:e=>C(e),"error-callback":()=>{C(null),_("Verification failed. Please try again.")},"expired-callback":()=>C(null),theme:"system"===l?"auto":l})),()=>{if(q.current){var e;null===(e=window.turnstile)||void 0===e||e.remove(q.current),q.current=null}}},[S,l,m,T]);let z=async e=>{if(e.preventDefault(),i.trim()){if(!N){_("Please complete the verification");return}c(!0),_(null);try{let e=await fetch("/api/waitlist",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:i.trim(),turnstileToken:N})});if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(t.error||"Failed to join waitlist")}let r=i.trim();j(r),v(!0);try{var t;localStorage.setItem(y(null===(t=(0,p.vF)())||void 0===t?void 0:t.sub),r)}catch(e){}}catch(e){_(e instanceof Error?e.message:"Failed to join waitlist"),q.current&&(window.turnstile.reset(q.current),C(null))}finally{c(!1)}}},G=()=>{V(null),F(!0)},H=async e=>{e.preventDefault();let t=M.trim();if(t){I(!0),V(null);try{var r,a;let e=await (0,x.ON)(null!==(a=(0,p.hP)())&&void 0!==a?a:"",t);if(e.isInvited){window.location.href="/discover";return}(null===(r=e.error)||void 0===r?void 0:r.code)===x.Mn?V("This invitation code is invalid or has already been used."):V("Couldn't apply your code. Please try again.")}catch(e){V("Couldn't apply your code. Please try again.")}I(!1)}},J=async()=>{O(!0);let e=await (0,p.yE)();window.location.href=e||"/"},U="w-full px-4 py-2.5 bg-white dark:bg-white/5 border border-slate-200 dark:border-white/10 rounded-lg text-slate-900 dark:text-white placeholder-slate-400 dark:placeholder-white/40 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-transparent transition-colors";return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o(),{children:(0,a.jsx)("title",{children:"You're almost in - Namag"})}),b&&(0,a.jsx)(u(),{src:"https://challenges.cloudflare.com/turnstile/v0/api.js",onLoad:()=>E(!0)}),(0,a.jsx)("div",{className:"min-h-screen flex items-center justify-center p-4 bg-white dark:bg-black",children:(0,a.jsx)("div",{className:"w-full max-w-md",children:(0,a.jsxs)("div",{className:"bg-slate-50 dark:bg-white/[0.025] border border-black/[0.08] dark:border-white/[0.08] shadow-[0_20px_60px_-30px_rgba(0,0,0,0.4)] rounded-2xl p-8 text-center",children:[(0,a.jsx)("div",{className:"w-16 h-16 mx-auto mb-6 rounded-full bg-purple-100 dark:bg-purple-900/30 flex items-center justify-center",children:(0,a.jsx)("svg",{className:"w-8 h-8 text-purple-600 dark:text-purple-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"})})}),(0,a.jsx)("h1",{className:"text-2xl font-bold text-slate-900 dark:text-white mb-3",children:"You're almost in"}),(0,a.jsx)("p",{className:"text-slate-600 dark:text-white/70 mb-6",children:"Namag is currently in private beta."}),T?(0,a.jsxs)("form",{onSubmit:H,className:"space-y-4",children:[r&&(0,a.jsxs)("div",{id:"wall-invite-notice",className:"flex items-start gap-2.5 rounded-lg border border-amber-200 dark:border-amber-800/40 bg-amber-50 dark:bg-amber-900/20 px-3.5 py-3 text-left",children:[(0,a.jsx)("svg",{className:"w-4 h-4 mt-0.5 shrink-0 text-amber-600 dark:text-amber-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,"aria-hidden":"true",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"})}),(0,a.jsx)("p",{className:"text-sm text-amber-900 dark:text-amber-200/90",children:g[r]})]}),(0,a.jsx)("label",{htmlFor:"wall-invite-code",className:"block text-sm font-medium text-slate-700 dark:text-white/70",children:"Enter your invitation code"}),(0,a.jsx)("input",{id:"wall-invite-code",type:"text",value:M,onChange:e=>{R(e.target.value),B&&V(null)},placeholder:"e.g. a1b2c3d4-e5f6-7890-abcd-ef1234567890",autoComplete:"off",autoCapitalize:"off",spellCheck:!1,"aria-invalid":!!B,"aria-describedby":[r?"wall-invite-notice":null,B?"wall-invite-code-error":null].filter(
1Boolean).join(" ")||void 0,className:"".concat(U," font-mono text-sm")}),(0,a.jsx)("button",{type:"submit",disabled:D||!M.trim(),className:"w-full px-6 py-2.5 bg-primary hover:bg-primary-hover text-on-accent disabled:opacity-50 rounded-lg font-medium transition-colors flex items-center justify-center gap-2",children:D?(0,a.jsx)("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}):"Apply code"}),B&&(0,a.jsx)("p",{id:"wall-invite-code-error",role:"alert",className:"text-red-500 dark:text-red-400 text-sm",children:B}),(0,a.jsx)("button",{type:"button",onClick:()=>{F(!1),V(null)},className:"w-full text-sm text-slate-500 dark:text-white/50 hover:text-slate-700 dark:hover:text-white/70 transition",children:"Back"})]}):m?(0,a.jsxs)("div",{className:"mb-2",children:[(0,a.jsx)("div",{className:"w-12 h-12 mx-auto mb-4 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",children:(0,a.jsx)("svg",{className:"w-6 h-6 text-green-600 dark:text-green-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})}),(0,a.jsx)("p",{className:"text-green-600 dark:text-green-400 font-medium",children:"Invite request sent"}),(0,a.jsxs)("p",{className:"text-slate-500 dark:text-white/50 text-sm mt-1",children:["We'll email ",w||i," when your invite is ready."]}),(0,a.jsxs)("div",{className:"mt-4 flex items-center justify-center gap-3",children:[(0,a.jsx)("button",{type:"button",onClick:G,className:"text-sm text-purple-600 dark:text-purple-400 hover:opacity-80 transition font-medium",children:"I have an invitation code"}),(0,a.jsx)("span",{className:"text-slate-300 dark:text-white/20","aria-hidden":"true",children:"\xb7"}),(0,a.jsx)("button",{type:"button",onClick:()=>{var e,r;try{localStorage.removeItem(y(null===(e=(0,p.vF)())||void 0===e?void 0:e.sub))}catch(e){}v(!1),_(null),C(null),s(null!==(r=null!=w?w:t)&&void 0!==r?r:""),j(null)},className:"text-xs text-slate-500 dark:text-white/50 hover:text-slate-700 dark:hover:text-white/70 transition",children:"Use a different email"})]})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:"text-slate-600 dark:text-white/70 text-sm mb-4",children:"Join the waitlist and we'll notify you when your invite is ready."}),(0,a.jsxs)("form",{onSubmit:z,className:"space-y-4",children:[(0,a.jsx)("input",{type:"email",value:i,onChange:e=>s(e.target.value),placeholder:"Enter your email",required:!0,className:U}),b&&(0,a.jsx)("div",{className:"flex justify-center",children:(0,a.jsx)("div",{ref:W})}),(0,a.jsx)("button",{type:"submit",disabled:d||!i.trim()||!N,className:"w-full px-6 py-2.5 bg-primary hover:bg-primary-hover text-on-accent disabled:opacity-50 rounded-lg font-medium transition-colors flex items-center justify-center gap-2",children:d?(0,a.jsx)("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}):"Join the waitlist"}),k&&(0,a.jsx)("p",{className:"text-red-500 dark:text-red-400 text-sm",children:k})]}),(0,a.jsxs)("div",{className:"my-6 flex items-center gap-3",children:[(0,a.jsx)("div",{className:"h-px flex-1 bg-slate-200 dark:bg-white/10"}),(0,a.jsx)("span",{className:"text-xs uppercase tracking-wide text-slate-400 dark:text-white/40",children:"Have an invitation code?"}),(0,a.jsx)("div",{className:"h-px flex-1 bg-slate-200 dark:bg-white/10"})]}),(0,a.jsxs)("button",{type:"button",onClick:G,className:"inline-flex items-center gap-1.5 text-purple-600 dark:text-purple-400 hover:opacity-80 transition font-medium",children:["Enter your code",(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14 5l7 7m0 0l-7 7m7-7H3"})})]})]}),(0,a.jsxs)("div",{className:"pt-6 mt-6 border-t border-slate-200 dark:border-white/10 flex items-center justify-center gap-4 text-sm",children:[(0,a.jsx)("button",{type:"button",onClick:J,disabled:P,className:"text-slate-500 dark:text-white/50 hover:text-slate-700 dark:hover:text-white/70 transition disabled:opacity-50",children:"Sign out"}),(0,a.jsx)("span",{className:"text-slate-300 dark:text-white/20","aria-hidden":"true",children:"\xb7"}),(0,a.jsx)("button",{type:"button",onClick:()=>A(!0),className:"text-slate-500 dark:text-white/50 hover:text-red-600 dark:hover:text-red-400 transition",children:"Delete account"})]})]})})}),(0,a.jsx)(f,{isOpen:L,onClose:()=>A(!1),email:t,variant:"pending"})]})}var w=r(44265),j=!0;function k(e){let{inviteNotice:t}=e,r=(0,l.useRouter)(),{isInvited:s,isProfileLoading:o,email:d}=(0,w.a)();return(0,n.useEffect)(()=>
1{if(!0===s){r.replace("/discover");return}o||void 0!==s||r.replace("/login")},[s,o,r]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.R,{title:"You're almost in",path:"/pending",noindex:!0}),!1===s?(0,a.jsx)(v,{email:d,inviteNotice:t}):(0,a.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-white dark:bg-black",children:(0,a.jsx)("div",{className:"w-12 h-12 border-4 border-purple-500/20 border-t-purple-500 rounded-full animate-spin"})})]})}},5152:function(e,t,r){e.exports=r(32602)},4298:function(e,t,r){e.exports=r(23381)}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=96519)}),_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.