1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="f836b7c1-8da1-fe27-6bae-d39b1db1863e")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,86257,e=>{"use strict";var t=e.i(843476),a=e.i(522016),s=e.i(618566),n=e.i(506046),i=e.i(375679);let r=[{label:"EXPLORE",href:"/explore",icon:function({active:e}){return(0,t.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:e?"#a43a3d":"#a8a29e",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,t.jsx)("polygon",{points:"16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76",fill:e?"#a43a3d":"none"})]})}},{label:"EVENTS",href:"/events",icon:function({active:e}){return(0,t.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:e?"#a43a3d":"#a8a29e",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),(0,t.jsx)("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),(0,t.jsx)("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),(0,t.jsx)("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]})}},{label:"CAT CRAWL",href:"/cat-crawl",icon:function({active:e}){return(0,t.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:e?"#a43a3d":"#a8a29e",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M12 5c-1.2-2.4-4-3-4-3s-.5 3.5 1 5"}),(0,t.jsx)("path",{d:"M12 5c1.2-2.4 4-3 4-3s.5 3.5-1 5"}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"6",fill:e?"#a43a3d":"none"}),(0,t.jsx)("circle",{cx:"10",cy:"11",r:"0.5",fill:e?"#fff":"#a8a29e"}),(0,t.jsx)("circle",{cx:"14",cy:"11",r:"0.5",fill:e?"#fff":"#a8a29e"}),(0,t.jsx)("path",{d:"M10 13.5c.8.8 3.2.8 4 0"})]})}},{label:"SAVED",href:"/saved",icon:function({active:e}){return(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:e?"#a43a3d":"none",stroke:e?"#a43a3d":"#a8a29e",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"})})}}];e.s(["default",0,function({showCatCrawl:e=!1}){let l=(0,s.usePathname)(),{user:o}=(0,n.useAuth)();if("/"===l||"/privacy"===l||"/creators"===l||"/terms"===l||l.startsWith("/admin")||l.startsWith("/premium")||l.startsWith("/signup")||l.startsWith("/welcome")||l.startsWith("/creators/content"))return null;let c=e?r:r.filter(e=>"/cat-crawl"!==e.href);return(0,t.jsx)("nav",{"data-bottom-nav":!0,className:"fixed bottom-0 left-0 right-0 z-50 h-[89px] bg-cream/80 backdrop-blur-xl border-t border-inactive/10",children:(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:`repeat(${c.length}, 1fr)`,paddingTop:8,maxWidth:448,margin:"0 auto",width:"100%"},children:c.map(e=>{let s=l===e.href||l.startsWith(e.href+"/");return(0,t.jsxs)(a.default,{href:e.href,onClick:()=>{let t=c.find(e=>l===e.href||l.startsWith(e.href+"/"))?.label.toLowerCase()||"unknown";(0,i.trackTabSwitched)(t,e.label.toLowerCase())},style:{display:"flex",flexDirection:"column",alignItems:"center",gap:2,textDecoration:"none",textAlign:"center",width:"100%"},children:[(0,t.jsx)("div",{style:{width:32,height:2,borderRadius:1,marginBottom:2,backgroundColor:s?"#ff7f7f":"transparent"}}),(0,t.jsx)(e.icon,{active:s}),(0,t.jsx)("span",{style:{fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.05em",color:s?"#a43a3d":"#a8a29e",whiteSpace:"nowrap",textAlign:"center"},children:e.label})]},e.href)})})})}])},411414,e=>{"use strict";var t=e.i(843476),a=e.i(618566),s=e.i(506046);e.i(247167);var n=e.i(271645),i=e.i(375679);let r="appBannerDismissed",l="https://apps.apple.com/app/id6791804845";function o(){let e=(0,a.usePathname)(),[s,o]=(0,n.useState)(!1),[c,d]=(0,n.useState)(l);return((0,n.useEffect)(()=>{let e=/iPhone|iPad/.test(navigator.userAgent),t=/Android/.test(navigator.userAgent),a=e&&/Safari/.test(navigator.userAgent)&&!/CriOS|FxiOS/.test(navigator.userAgent),s=window.matchMedia("(display-mode: standalone)").matches||navigator.standalone,n=localStorage.getItem(r);if(!s&&!n){if(t){d("https://play.google.com/store/apps/details?id=com.notboredapp.app");let e=navigator;e.getInstalledRelatedApps?e.getInstalledRelatedApps().then(e=>o(0===e.length)).catch(()=>o(!0)):o(!0);return}e&&!a&&(d(l),o(!0))}},[]),!s||"/"===e||"/install"===e||"/signup"===e||e.startsWith("/admin")||e.startsWith("/auth"))?null:(0,t.jsxs)("div",{className:"bg-white p-3 flex items-center gap-3 border-b border-calendar-border",children:[(0,t.jsx)("span",{className:"text-lg",children:"ð±"}),(0,t.jsx)("a",{href:c,onClick:()=>(0,i.trackInstallBannerTapped)(),className:"flex-1 text-sm text-dark",children:"Get the Not Bored app for a better experience."}),(0,t.jsx)("button",{onClick:()=>{localStorage.setItem(r,"true"),o(!1)},className:"text-inactive hover:text-dark flex-shrink-0 p-1","aria-label":"Dismiss",children:(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,t.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,t.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})}function c(){let e=(0,a.useSearchParams)(),s=(0,a.usePathname)(),[r,l]=(0,n.use
2State)(null);return((0,n.useEffect)(()=>{let t=e=>{try{localStorage.setItem("pendingShareToken",JSON.stringify({t:e,ts:Date.now()}));let t=localStorage.getItem("nb_anon_id");t||(t=Math.random().toString(36).slice(2,14),localStorage.setItem("nb_anon_id",t)),fetch("/api/shares/click",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({token:e,anonId:t,platform:"web"})}).then(e=>e.ok?e.json():null).then(t=>{!sessionStorage.getItem(`share_dismissed_${e}`)&&t?.bannerEnabled&&t?.sharer?.username&&(l(t.sharer),(0,i.trackSharerBannerShown)())}).catch(()=>{})}catch{}},a=e.get("s");if(a){(0,i.trackSharedLinkLanded)("share_token"),t(a);return}let s=e.get("aff");s&&fetch(`/api/shares/aff?u=${encodeURIComponent(s)}`).then(e=>e.ok?e.json():null).then(e=>{e?.token&&((0,i.trackSharedLinkLanded)("vanity"),t(e.token))}).catch(()=>{})},[e,s]),r)?(0,t.jsxs)("div",{className:"bg-white px-4 py-2.5 flex items-center gap-3 border-b border-calendar-border",children:[r.avatarUrl&&(0,t.jsx)("img",{src:r.avatarUrl,alt:"",referrerPolicy:"no-referrer",className:"w-7 h-7 rounded-full object-cover"}),(0,t.jsxs)("p",{className:"flex-1 text-sm text-dark",children:[(0,t.jsxs)("a",{href:`/@${r.username}`,className:"font-semibold text-dark-blue",children:["@",r.username]})," ","shared this with you"]}),(0,t.jsx)("button",{onClick:()=>{l(null);let t=e.get("s");if(t)try{sessionStorage.setItem(`share_dismissed_${t}`,"1")}catch{}},"aria-label":"Dismiss",className:"text-inactive p-1",children:"â"})]}):null}e.s(["default",0,function({children:e}){let i=(0,a.usePathname)(),{user:r}=(0,s.useAuth)(),l="/"!==i&&"/privacy"!==i&&"/terms"!==i&&!i.startsWith("/admin")&&!i.startsWith("/premium")&&!i.startsWith("/signup")&&!i.startsWith("/welcome");return(0,t.jsxs)("main",{className:`flex-1 ${l?"pb-[89px]":""}`,children:[(0,t.jsx)(o,{}),(0,t.jsx)(n.Suspense,{fallback:null,children:(0,t.jsx)(c,{})}),e]})}],411414)},66639,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(618566),n=e.i(506046),i=e.i(29250),r=e.i(375679);e.s(["default",0,function(){let{user:e}=(0,n.useAuth)(),l=(0,s.usePathname)(),[o,c]=(0,a.useState)(!1),[d,u]=(0,a.useState)(!1),[h,m]=(0,a.useState)(0),[x,p]=(0,a.useState)(!1);(0,a.useEffect)(()=>{p(!0)},[]),(0,a.useEffect)(()=>{if(h<=0)return;let e=setTimeout(()=>m(h-1),1e3);return()=>clearTimeout(e)},[h]);let f=(0,a.useCallback)(async()=>{if(e?.pendingEmail&&!(h>0)){c(!0);try{(await (0,i.apiFetch)("/api/user/email",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e.pendingEmail})})).ok&&((0,r.trackEmailVerificationSent)(!0),u(!0),m(60))}catch{}finally{c(!1)}}},[e?.pendingEmail,h]);return!x||!e||l?.startsWith("/welcome")||!e.pendingEmail||e.emailVerified?null:(0,t.jsxs)("div",{className:"bg-coral/10 px-4 py-3 flex items-start gap-3",children:[(0,t.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"#a43a3d",strokeWidth:"2",className:"flex-shrink-0 mt-0.5",children:[(0,t.jsx)("rect",{x:"2",y:"4",width:"20",height:"16",rx:"2"}),(0,t.jsx)("path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"})]}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("p",{className:"text-sm font-semibold text-dark",children:"Verify your email"}),(0,t.jsxs)("p",{className:"text-xs text-gray mt-0.5",children:["We sent a verification link to ",(0,t.jsx)("strong",{children:e.pendingEmail}),". Check your inbox (or spam)."]}),d&&h>0?(0,t.jsxs)("p",{className:"text-xs text-pink mt-1",children:["Link sent! You can resend in ",h,"s."]}):(0,t.jsx)("button",{onClick:f,disabled:o||h>0,className:"text-xs text-red font-semibold mt-1 disabled:opacity-50",children:o?"Sending...":"Resend verification link"})]})]})}])},881298,e=>{"use strict";var t=e.i(843476),a=e.i(271645);e.s(["default",0,function(){let[e,s]=(0,a.useState)(!1),[n,i]=(0,a.useState)(!1);(0,a.useEffect)(()=>{let e;if("u"<typeof navigator||!("serviceWorker"in navigator))return;let t=null;navigator.serviceWorker.getRegistration().then(a=>{if(!a)return;t=a,a.waiting&&navigator.serviceWorker.controller&&s(!0),a.addEventListener("updatefound",()=>{var e;(e=a.installing)&&e.addEventListener("statechange",()=>{"installed"===e.state&&navigator.serviceWorker.controller&&s(!0)})});let n=()=>a.update().catch(()=>{});e=setInterval(n,6e4),n()});let a=()=>
2{"visible"===document.visibilityState&&t?.update().catch(()=>{})};return document.addEventListener("visibilitychange",a),()=>{e&&clearInterval(e),document.removeEventListener("visibilitychange",a)}},[]);let r=(0,a.useCallback)(async()=>{i(!0);try{let e=await navigator.serviceWorker.getRegistration();e?.waiting?.postMessage({type:"SKIP_WAITING"})}catch{}window.location.reload()},[]);return e?(0,t.jsx)("div",{className:"fixed inset-x-0 bottom-20 z-[60] px-4 flex justify-center pointer-events-none",children:(0,t.jsxs)("div",{className:"pointer-events-auto flex items-center gap-3 bg-dark-blue text-white rounded-full shadow-lg pl-4 pr-2 py-2 max-w-md w-full sm:w-auto",children:[(0,t.jsx)("span",{className:"text-sm font-medium flex-1",children:"A new version is available."}),(0,t.jsx)("button",{onClick:r,disabled:n,className:"text-sm font-semibold bg-red text-white rounded-full px-4 py-1.5 disabled:opacity-60 whitespace-nowrap",children:n?"Refreshingâ¦":"Refresh"})]})}):null}])},812195,e=>{"use strict";var t=e.i(843476),a=e.i(618566),s=e.i(506046),n=e.i(463950),i=e.i(308930),r=e.i(271645);e.i(151718);var l=e.i(754716),l=l,o=l,c=e.i(22508),d=e.i(314985),u=e.i(81137),h=e.i(375679);function m(e){let t=e.replace(/\D/g,""),a=t.startsWith("1")&&t.length>10?t.slice(1):t;return 0===a.length?"":a.length<=3?`(${a}`:a.length<=6?`(${a.slice(0,3)}) ${a.slice(3)}`:`(${a.slice(0,3)}) ${a.slice(3,6)}-${a.slice(6,10)}`}function x(){let{showSignIn:e,signInConfig:a,setShowSignIn:n,sessionSyncing:i,sessionError:x,clearSessionError:p}=(0,s.useAuth)(),[f,g]=(0,r.useState)("options"),[b,y]=(0,r.useState)(""),[j,k]=(0,r.useState)(""),[w,v]=(0,r.useState)(""),[N,S]=(0,r.useState)(null),[C,E]=(0,r.useState)(!1),[T,W]=(0,r.useState)(!1),[P,A]=(0,r.useState)("google"),[I,L]=(0,r.useState)(null),[_,F]=(0,r.useState)(""),[R,B]=(0,r.useState)(0),[U,M]=(0,r.useState)(!1),O=a.title||"Never miss out",z=a.message||"",D=a.benefits||["See full event details and descriptions","Save events and build your plans","View by category to find your adventure","Get weekly updates in your inbox"];if((0,r.useEffect)(()=>{e&&(0,h.trackSignUpWallShown)("modal",z,a.source)},[e,z,a.source]),(0,r.useEffect)(()=>{x&&e&&(g("options"),S(x),E(!1),p())},[x,e,p]),(0,r.useEffect)(()=>{e&&("phone"===a.autoStart?((0,h.trackSignUpMethodSelected)("phone"),g("phone")):"email"===a.autoStart&&((0,h.trackSignUpMethodSelected)("email"),g("email")))},[e,a.autoStart]),(0,r.useEffect)(()=>{if(R<=0)return;let e=setTimeout(()=>B(e=>e-1),1e3);return()=>clearTimeout(e)},[R]),!e)return null;let V=()=>{(0,h.trackSignUpAbandoned)("phone"===f||"phone-otp"===f?"phone":"email"===f||"email-code"===f?"email":"none",f),n(!1),g("options"),S(null),y(""),k(""),v(""),F(""),B(0)},$=e=>{A(e),(0,u.runProviderSignIn)(e,{setError:S,setLoading:E,setShowRedirectFallback:W})},Y=async()=>{S(null),E(!0),localStorage.setItem("authReturnUrl",window.location.pathname);let e=b.trim();e.startsWith("+")||(e="+1"+e.replace(/\D/g,""));try{window.recaptchaVerifier||(window.recaptchaVerifier=new l.R(d.auth,"recaptcha-container",{size:"invisible"}));let t=window.recaptchaVerifier,a=await (0,o.s)(d.auth,e,t);L(a),g("phone-otp")}catch(e){(0,h.trackSignInError)("phone",e?.code),S((0,u.friendlyAuthError)(e))}finally{E(!1)}},J=async()=>{if(I){S(null),E(!0);try{await I.confirm(j)}catch(e){(0,h.trackSignInError)("phone",e?.code),S((0,u.friendlyAuthError)(e)),E(!1)}}},G=/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(w.trim()),K=async e=>{S(null),E(!0);try{localStorage.setItem("authReturnUrl",window.location.pathname);let t=await fetch("/api/auth/email-signin/request",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:w.trim()})});if(!t.ok){let e=await t.json().catch(()=>({}));S(e.error||"Couldn't send the email. Please try again.");return}(0,h.trackEmailSigninCodeSent)(e,"signin"),e||((0,h.trackEmailSigninPromptShown)("signin"),g("email-code")),F(""),B(60)}catch{S("Couldn't send the email. Please try again.")}finally{E(!1)}},H=()=>{G&&K(!1)},q=async(e=_)=>{S(null),M(!0);try{let t=await fetch("/api/auth/email-signin/redeem",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:w.trim(),code:e})}),a=await t.json().catch(()=>({}));if(!t.ok||!a.customToken){(0,h.trackSignInError)("email_code",a.reason??null),S(a.error||"That code isn't right."),M(!1);return}sessionStorage.setItem("emailRedeemVia","code"),await (0,c.signInWithCustomToken)(d.auth,a.customToken)}catch(e){(0,h.trackSignInError)("email_code",e?.code),S((0,u.friendlyAuthError)(e)),M(!1)}};return(0,t.jsxs)("div",{className:"fixed inset-0 z-[60] flex items-center justify-center",children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-dark/40 backdrop-blur-sm",onClick:i?void 0:V}),(0,t.jsxs)("div",{className:"relative bg-cream rounded-2xl w-full max-w-sm mx-4 p-6",onClick:e=>e.stopPropagation(),children:[!i&&(0,t.jsx)("button",{onClick:V,className:"absolute top-4 right-4 text-inactive hover:text-dark",children:(0,t.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,t.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,t.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),i&&(0,t.jsxs)("div",{className:"py-10 text-center",children:[(0,t.jsx)("div",{className:"w-8 h-8 border-3 border-red/30 border-t-red rounded-full animate-spin mx-auto mb-4"}),(0,t.jsx)("p",{className:"text-sm text-gray",children:"Signing you in..."})]}),!i&&"options"===f&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("h2",{className:"text-2xl font-bold text-dark-blue mb-3",children:[O,(0,t.jsx)("span",{className:"text-pink",children:"."})]}),z&&(0,t.jsx)("p",{className:"text-sm text-dark mb-4",children:z}),(0,t.jsx)("div",{className:"space-y-2 mb-6",children:D.map(e=>(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,t.jsx)("span",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-pink/10 flex items-center justify-center",children:(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"#fe4f70",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("polyline",{points:"20 6 9 17 4 12"})})}),(0,t.jsx)("span",{className:"text-sm text-dark",children:e})]},e))}),(0,t.jsxs)("div",{className:"space-y-2.5",children:[(0,t.jsxs)("button",{onClick:()=>{$("apple")},disabled:C,className:"w-full flex items-center justify-center gap-3 px-4 py-3.5 bg-black rounded-full hover:shadow-md transition-shadow disabled:opacity-50",children:[(0,t.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"#ffffff",children:(0,t.jsx)("path",{d:"M17.05 20.28c-.98.95-2.05.86-3.08.38-1.09-.5-2.08-.48-3.24 0-1.44.62-2.2.44-3.06-.38C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09l.01-.01zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z"})}),(0,t.jsx)("span",{className:"text-sm font-semibold text-white",children:"Continue with Apple"})]}),(0,t.jsxs)("button",{onClick:()=>{$("google")},disabled:C,className:"w-full flex items-center justify-center gap-3 px-4 py-3.5 bg-white rounded-full border border-calendar-border hover:shadow-md transition-shadow disabled:opacity-50",children:[(0,t.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",children:[(0,t.jsx)("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z",fill:"#4285F4"}),(0,t.jsx)("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),(0,t.jsx)("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),(0,t.jsx)("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})]}),(0,t.jsx)("span",{className:"text-sm font-semibold text-dark",children:"Continue with Google"})]}),(0,t.jsxs)("button",{onClick:()=>{(0,h.trackSignUpMethodSelected)("phone"),g("phone")},className:"w-full flex items-center justify-center gap-3 px-4 py-3.5 bg-white rounded-full border border-calendar-border hover:shadow-md transition-shadow",children:[(0,t.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"#1b1c18",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("rect",{x:"5",y:"2",width:"14",height:"20",rx:"2",ry:"2"}),(0,t.jsx)("line",{x1:"12",y1:"18",x2:"12.01",y2:"18"})]}),(0,t.jsx)("span",{className:"text-sm font-semibold text-dark",children:"Continue with Phone"})]}),(0,t.jsxs)("button",{onClick:()=>{(0,h.trackSignUpMethodSelected)("email"),g("email")},className:"w-full flex items-center justify-center gap-3 px-4 py-3.5 bg-white rounded-full border border-calendar-border hover:shadow-md transition-shadow",children:[(0,t.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"#1b1c18",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("rect",{x:"2",y:"4",width:"20",height:"16",rx:"2"}),(0,t.jsx)("path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"})]}),(0,t.jsx)("span",{className:"text-sm font-semibold text-dark",children:"Continue with Email"})]})]}),(0,t.jsxs)("p",{className:"text-[11px] text-inactive text-center mt-4",children:["By signing up, you agree to the"," ",(0,t.jsx)("a",{href:"/privacy",className:"underline",target:"_blank",children:"privacy policy"})," ","and"," ",(0,t.jsx)("a",{href:"/terms",className:"underline",target:"_blank",children:"terms of use"}),"."]})]}),!i&&"phone"===f&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h2",{className:"text-xl font-bold text-dark-blue mb-4",children:"Phone number"}),(0,t.jsx)("input",{type:"tel",value:b,onChange:e=>{let t=e.target.value;t.startsWith("+")?y(t):y(m(t))},placeholder:"(202) 555-0123",className:"w-full px-4 py-3 rounded-lg border border-calendar-border bg-white text-dark mb-4",autoFocus:!0}),(0,t.jsx)("button",{onClick:Y,disabled:C||!b,className:"w-full py-3 bg-red text-white font-semibold rounded-full disabled:opacity-50",children:C?"Sending...":"Send code"}),(0,t.jsx)("button",{onClick:()=>{g("options"),S(null)},className:"w-full mt-2 text-sm text-gray",children:"Back"})]}),!i&&"phone-otp"===f&&(C&&6===j.length?(0,t.jsxs)("div",{className:"py-8 text-center",children:[(0,t.jsx)("div",{className:"w-8 h-8 border-3 border-red/30 border-t-red rounded-full animate-spin mx-auto mb-4"}),(0,t.jsx)("p",{className:"text-sm text-gray",children:"Signing you in..."})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h2",{className:"text-xl font-bold text-dark-blue mb-2",children:"Enter code"}
2),(0,t.jsxs)("p",{className:"text-sm text-gray mb-4",children:["We sent a code to ",b.startsWith("+")&&!b.startsWith("+1")?b:m(b)]}),(0,t.jsx)("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",autoComplete:"one-time-code",value:j,onChange:e=>k(e.target.value.replace(/\D/g,"").slice(0,6)),placeholder:"123456",className:"w-full px-4 py-3 rounded-lg border border-calendar-border bg-white text-dark text-center text-lg tracking-widest font-mono mb-4",autoFocus:!0}),(0,t.jsx)("button",{onClick:J,disabled:C||j.length<6,className:"w-full py-3 bg-red text-white font-semibold rounded-full disabled:opacity-50",children:C?"Verifying...":"Verify"}),(0,t.jsx)("button",{onClick:()=>{g("phone"),S(null),k("")},className:"w-full mt-2 text-sm text-gray",children:"Back"})]})),!i&&"email"===f&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h2",{className:"text-xl font-bold text-dark-blue mb-4",children:"Email address"}),(0,t.jsx)("input",{type:"email",value:w,onChange:e=>v(e.target.value),onKeyDown:e=>{"Enter"===e.key&&G&&!C&&H()},placeholder:"[email protected]",className:"w-full px-4 py-3 rounded-lg border border-calendar-border bg-white text-dark mb-4",autoFocus:!0}),(0,t.jsx)("button",{onClick:H,disabled:C||!G,className:"w-full py-3 bg-red text-white font-semibold rounded-full disabled:opacity-50",children:C?"Sending...":"Email me a code"}),(0,t.jsx)("button",{onClick:()=>{g("options"),S(null)},className:"w-full mt-2 text-sm text-gray",children:"Back"})]}),!i&&"email-code"===f&&(U?(0,t.jsxs)("div",{className:"py-8 text-center",children:[(0,t.jsx)("div",{className:"w-8 h-8 border-3 border-red/30 border-t-red rounded-full animate-spin mx-auto mb-4"}),(0,t.jsx)("p",{className:"text-sm text-gray",children:"Signing you in..."})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h2",{className:"text-xl font-bold text-dark-blue mb-2",children:"Enter your code"}),(0,t.jsxs)("p",{className:"text-sm text-gray mb-4",children:["We emailed a 6-digit code and a sign-in link to ",(0,t.jsx)("strong",{children:w.trim()}),". Enter the code, or tap the link in the email."]}),(0,t.jsx)("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",autoComplete:"one-time-code",value:_,onChange:e=>{let t=e.target.value.replace(/\D/g,"").slice(0,6);F(t),6===t.length&&q(t)},placeholder:"123456",className:"w-full px-4 py-3 rounded-lg border border-calendar-border bg-white text-dark text-center text-lg tracking-widest font-mono mb-4",autoFocus:!0}),(0,t.jsx)("button",{onClick:()=>void q(),disabled:_.length<6,className:"w-full py-3 bg-red text-white font-semibold rounded-full disabled:opacity-50",children:"Sign in"}),(0,t.jsxs)("div",{className:"flex items-center justify-between mt-3",children:[(0,t.jsx)("button",{onClick:()=>{g("email"),S(null),F("")},className:"text-sm text-gray",children:"Change email"}),(0,t.jsx)("button",{onClick:()=>0===R&&void K(!0),disabled:R>0,className:"text-sm text-red font-medium disabled:text-gray disabled:font-normal",children:R>0?`Resend in ${R}s`:"Resend code"})]})]})),C&&"options"===f&&!N&&(0,t.jsx)("p",{className:"text-gray text-sm mt-4 text-center",children:"A popup window has opened to sign in. If you don't see it, make sure pop-ups are enabled for this site."}),!i&&T&&"options"===f&&(0,t.jsxs)("button",{onClick:()=>{W(!1),(0,u.runRedirectSignIn)(P,{setError:S,setLoading:E})},className:"w-full text-sm text-red font-medium mt-3",children:["apple"===P?"Apple":"Google","sign-in didn't finish. Try redirect sign-in?"]}),N&&(0,t.jsx)("p",{className:"text-pink text-sm mt-4",children:N}),(0,t.jsx)("div",{id:"recaptcha-container"})]})]})}var p=e.i(152618);function f(){let{showUpgrade:e,upgradeMessage:a,setShowUpgrade:n}=(0,s.useAuth)();return(0,r.useEffect)(()=>{e&&(0,h.trackUpgradePromptShown)("upgrade_modal")},[e]),(0,t.jsx)(p.default,{open:e,onClose:()=>n(!1),message:a})}var g=e.i(29250),b=e.i(845437);function y(){let{user:e,refreshUser:a}=(0,s.useAuth)(),[n,i]=(0,r.useState)(""),[l,o]=(0,r.useState)(null),[c,d]=(0,r.useState)(!1),[u,m]=(0,r.useState)(!1),[x,p]=(0,r.useState)(null);if(!e||!e.needsEmail)return null;let f=async()=>{if(n.includes("@")&&e){o(null),d(!0);try{let e=await (0,g.apiFetch)("/api/user/email",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:n})}),t=await e.json();if(t.mergeRequired){(0,h.trackAccountMergePrompted)(),p(t.email||n.trim()),d(!1);return}if(!e.ok){"existing_phone"===t.conflict&&(0,h.trackAccountMergeBlocked)("existing_phone"),o(t.error||"Failed to save email"),d(!1);return}(0,h.trackEmailVerificationSent)(!1),m(!0),(0,h.trackEmailCollected)(),await a()}catch(e){o(e instanceof Error?e.message:"Something went wrong")}finally{d(!1)}}};return(0,t.jsxs)("div",{className:"fixed inset-0 z-[60] flex items-center justify-center",children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-dark/40 backdrop-blur-sm"}),(0,t.jsx)("div",{className:"relative bg-cream rounded-2xl w-full max-w-sm mx-4 p-6",onClick:e=>e.stopPropagation(),children:x?(0,t.jsx)(b.default,{email:x,onMerged:()=>{p(null),a()},onCancel:()=>{p(null),i("")}}):u?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("h2",{className:"text-xl font-bold text-dark-blue mb-2",children:["Check your inbox",(0,t.jsx)("span",{className:"text-pink",children:"."})]}
2),(0,t.jsxs)("p",{className:"text-sm text-gray mb-4",children:["We sent a verification link to ",(0,t.jsx)("strong",{children:n}),". Click the link to verify your email."]}),(0,t.jsx)("p",{className:"text-sm text-gray mb-6",children:"You can continue using the app while you wait."}),(0,t.jsx)("button",{onClick:()=>a(),className:"w-full py-3 bg-red text-white font-semibold rounded-full",children:"Continue"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("h2",{className:"text-xl font-bold text-dark-blue mb-2",children:["One more thing",(0,t.jsx)("span",{className:"text-pink",children:"."})]}),(0,t.jsx)("p",{className:"text-sm text-gray mb-6",children:"Add your email to complete your profile. We'll send you a verification link."}),(0,t.jsx)("input",{type:"email",value:n,onChange:e=>{i(e.target.value),o(null)},placeholder:"[email protected]",className:"w-full px-4 py-3 rounded-lg border border-calendar-border bg-white text-dark mb-3",autoFocus:!0}),l&&(0,t.jsx)("p",{className:"text-pink text-sm mb-3",children:l}),(0,t.jsx)("button",{onClick:f,disabled:c||!n.includes("@"),className:"w-full py-3 bg-red text-white font-semibold rounded-full disabled:opacity-50",children:c?"Sending...":"Send verification email"}),(0,t.jsx)("p",{className:"text-[11px] text-inactive text-center mt-3",children:"This helps us personalize your experience and send you event picks."})]})})]})}function j(){let{user:e,authSynced:a,refreshUser:n,showUsernamePrompt:i,usernamePromptConfig:l,setShowUsernamePrompt:o,promptUpgrade:c}=(0,s.useAuth)(),[d,u]=(0,r.useState)(""),[m,x]=(0,r.useState)("idle"),[p,f]=(0,r.useState)(null),[b,y]=(0,r.useState)(!1),[j,k]=(0,r.useState)(!1),w=(0,r.useRef)(!1),v=(0,r.useRef)(null),N=!!e&&!e.username,S=!!e&&(i||a&&N&&(!!e.isNewUser||!j)),C=!!i||!e?.isNewUser,E=i&&!!e?.username,T=E?"edit":i?"gate":e?.isNewUser?"signup":"soft",W=(0,r.useRef)(!1);(0,r.useEffect)(()=>{S&&!W.current&&(W.current=!0,(0,h.trackUsernamePromptShown)(T,!C)),S||(W.current=!1)},[S,T,C]),(0,r.useEffect)(()=>{S&&!w.current&&(w.current=!0,e?.username?(u(e.username),x("idle")):(0,g.apiFetch)("/api/user/username?suggest=1").then(e=>e.ok?e.json():null).then(e=>{e?.suggestion&&(u(e.suggestion),x("ok"))}).catch(()=>{}))},[S,e?.username]);let P=(0,r.useCallback)(e=>{if(v.current&&clearTimeout(v.current),!e){x("idle"),f(null);return}x("checking"),v.current=setTimeout(async()=>{try{let t=await (0,g.apiFetch)(`/api/user/username?check=${encodeURIComponent(e)}`),a=await t.json();a.available?(x("ok"),f(null)):(x("error"),f(a.error||"That username isn't available."))}catch{x("idle")}},350)},[]);if(!S)return null;let A=async()=>{if(!d||"error"===m)return;let t=!e?.username;y(!0),f(null);try{let e=await (0,g.apiFetch)("/api/user/username",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:d})}),a=await e.json();if(!e.ok){x("error"),f(a.error||"Couldn't save that username."),y(!1);return}(0,h.trackUsernameSet)(T,t),await n(),o(!1),k(!0),w.current=!1;let s=!1;try{s=!!localStorage.getItem("nb_pending_checkout")}catch{}"signup"!==T||s||c("You're all set. Unlock every event, months ahead, with Premium.")}catch{f("Something went wrong.")}finally{y(!1)}},I=()=>{(0,h.trackUsernamePromptDismissed)(T),o(!1),k(!0)};return(0,t.jsxs)("div",{className:"fixed inset-0 z-[60] flex items-center justify-center",children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-dark/40 backdrop-blur-sm",onClick:C?I:void 0}),(0,t.jsxs)("div",{className:"relative bg-cream rounded-2xl w-full max-w-sm mx-4 p-6",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("h2",{className:"text-xl font-bold text-dark-blue mb-2",children:[i&&l?.title||(E?"Edit your username":"Choose a username"),(0,t.jsx)("span",{className:"text-pink",children:"."})]}),(0,t.jsx)("p",{className:"text-sm text-gray mb-5",children:i&&l?.subtitle?l.subtitle:E?"Pick a new handle. Your old links will redirect.":"This is how others find you and your shared lists. You can change it later."}),(0,t.jsxs)("div",{className:"flex items-center rounded-lg border border-calendar-border bg-white px-3 mb-1 focus-within:border-red",children:[(0,t.jsx)("span",{className:"text-gray text-lg",children:"@"}),(0,t.jsx)("input",{value:d,onChange:e=>{let t;u(t=e.target.value.toLowerCase().replace(/[^a-z0-9_]/g,"").slice(0,30)),P(t)},onKeyDown:e=>{"Enter"===e.key&&A()},placeholder:"username",autoFocus:!0,className:"flex-1 py-3 px-1 bg-transparent text-dark outline-none"}),"checking"===m&&(0,t.jsx)("span",{className:"text-xs text-gray",children:"â¦"}),"ok"===m&&(0,t.jsx)("span",{className:"text-green-600 text-sm",children:"â"})]}),p&&(0,t.jsx)("p",{className:"text-pink text-sm mb-2",children:p}),!p&&(0,t.jsx)("p",{className:"text-[11px] text-inactive mb-2",children:"Letters, numbers, and underscores. 3â30 characters."}),E&&(0,t.jsx)("p",{className:"text-[11px] text-inactive mb-2",children:"You can only change your username once every 30 days."}),(0,t.jsx)("button",{onClick:A,disabled:b||!d||"error"===m||"checking"===m,className:"w-full mt-3 py-3 bg-red text-white font-semibold rounded-full disabled:opacity-50",children:b?"Savingâ¦":i&&l?.cta||(E?"Save username":"Continue")}),C&&(0,t.jsx)("button",{onClick:I,className:"w-full mt-2 py-2 text-sm text-gray font-medium",children:E?"Cancel":"Maybe later"})]})]})}function k(){let{user:e,authSynced:t}=(0,s.useAuth)(),n=(0,a.usePathname)(),i=(0,a.useRouter)(),l=!!e&&(e.needsEmail||e.needsUsern
2ame);return(0,r.useEffect)(()=>{t&&l&&!n?.startsWith("/welcome")&&i.replace("/welcome")},[t,l,n,i]),null}let w={for_you:{title:"You're in the For You beta",lead:"Explore now has a For You section: personalized recommendations beyond just events.",points:["Save what's a good match.","Hide what isn't.","It gets better as you go. It's early, so tell us what feels off."],cta:"See your picks",destination:"explore"},imports:{title:"You're in the imports beta",lead:"Lose track of everything you find on social media and want to do later?",points:["Paste an Instagram or TikTok post.","We pull out the places, events and things to do in it.","They land in your saves and a private My imports list.","Find it under From social on your Saved page, or the + at the top of any page."],cta:"Try an import",destination:"saved"}},v={explore:"/explore",saved:"/saved"};function N(){let{user:e,authSynced:n}=(0,s.useAuth)(),i=(0,a.useRouter)(),l=(0,a.usePathname)(),[o,c]=(0,r.useState)([]),[d,u]=(0,r.useState)(0),[,h]=(0,r.useState)(0);(0,r.useEffect)(()=>{if(!d)return;let e=setTimeout(()=>h(e=>e+1),Math.max(0,d-Date.now())+20);return()=>clearTimeout(e)},[d]),(0,r.useEffect)(()=>{n&&e&&(0,g.apiFetch)("/api/user/beta-notices").then(e=>e.ok?e.json():null).then(e=>{e?.show?.length&&c(e.show)}).catch(()=>{})},[n,e]);let m=o[0];if(!m||Date.now()<d||"/explore"!==l)return null;let x=w[m],p=async e=>{c(e=>e.slice(1)),u(e?Date.now()+15e3:0),await (0,g.apiFetch)("/api/user/beta-notices",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({beta:m})}).catch(()=>{}),e&&i.push(v[x.destination])};return(0,t.jsx)("div",{className:"fixed inset-0 z-[65] bg-black/50 flex items-end sm:items-center justify-center",role:"dialog","aria-modal":"true","aria-label":x.title,children:(0,t.jsxs)("div",{className:"bg-cream w-full sm:max-w-md rounded-t-2xl sm:rounded-2xl p-6 pb-[max(1.5rem,env(safe-area-inset-bottom))]",children:[(0,t.jsx)("span",{className:"text-[10px] font-mono tracking-widest uppercase text-pink border border-pink rounded px-1.5 py-0.5",children:"beta"}),(0,t.jsxs)("h2",{className:"mt-2 text-xl font-bold text-dark-blue",children:[x.title,(0,t.jsx)("span",{className:"text-pink",children:"."})]}),(0,t.jsx)("p",{className:"mt-2 text-sm text-dark leading-relaxed",children:x.lead}),(0,t.jsx)("ul",{className:"mt-2 space-y-1 text-sm text-dark leading-relaxed list-disc pl-5",children:x.points.map(e=>(0,t.jsx)("li",{children:e},e))}),(0,t.jsxs)("div",{className:"mt-5 flex gap-2",children:[(0,t.jsx)("button",{onClick:()=>p(!0),className:"px-5 py-2.5 bg-red text-white text-sm font-semibold rounded-full cursor-pointer",children:x.cta}),(0,t.jsx)("button",{onClick:()=>p(!1),className:"px-5 py-2.5 border border-calendar-border text-dark-blue text-sm font-semibold rounded-full cursor-pointer",children:"Got it"})]})]})})}function S(){let e=(0,a.usePathname)(),{user:n}=(0,s.useAuth)(),i=!!e?.startsWith("/welcome")||!!n?.needsEmail||!!n?.needsUsername;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x,{}),!i&&(0,t.jsx)(f,{}),!i&&(0,t.jsx)(y,{}),!i&&(0,t.jsx)(j,{}),!i&&(0,t.jsx)(N,{})]})}e.s(["default",0,function({children:e}){return(0,t.jsx)(s.AuthProvider,{children:(0,t.jsx)(n.default,{children:(0,t.jsxs)(i.default,{children:[e,(0,t.jsx)(k,{}),(0,t.jsx)(S,{})]})})})}],812195)},405431,e=>{"use strict";var t=e.i(271645),a=e.i(506046),s=e.i(375679);e.s(["default",0,function(){let{user:e}=(0,a.useAuth)();return(0,t.useEffect)(()=>{(0,s.initAnalytics)()},[]),(0,t.useEffect)(()=>{e?(0,s.identifyUser)(`user_${e.id}`,{is_premium:e.isPremium,is_admin:e.isAdmin,email_verified:e.emailVerified,has_email:!!e.email,has_phone:!!e.phone,premium_plan:e.isPremium&&e.premiumPlan||null,was_existing_subscriber:e.wasExistingSubscriber,last_active_date:new Date().toISOString().split("T")[0]}):(0,s.resetUser)()},[e]),null}])}]); 3 4//# debugId=f836b7c1-8da1-fe27-6bae-d39b1db1863e
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.