PageSourceSearch

https://www.gemphere.com/assets/SFTW-DG42AFvA.js

js gemphere.com collected 2026-09-24 14:43:51 UTC 25,297 bytes, 1 lines download raw bytes

1import{u as re,r as i,ea as U,dJ as me,eb as pe,ec as ne,ed as fe,ee as te,ef as ge,eg as ye,eh as ve,ei as be,ej as ke,j as e,ek as xe,z as je,d as we}from"./index-BVpny5eT.js";import{$ as Ne,a0 as Se}from"./api-CQKVmx9j.js";const Q=[{n:"Claude Founder House",h:"Anthropic",s:150},{n:"Riskgaming Salon",h:"Lux Capital, Stripe",s:145},{n:"B2B AI Supper Club",h:"Stripe, a16z",s:142},{n:"AI Faire",h:"a16z speedrun",s:140},{n:"Tech Week Kickoff",h:"Fireworks, Stripe, Vercel, ElevenLabs",s:138},{n:"CxO Roundtable: Enterprise AI Buying",h:"a16z speedrun",s:136},{n:"Deep Tech Investor Breakfast",h:"Renegade Partners, a16z Speedrun",s:134},{n:"Inside the First Rounds",h:"Khosla, Antler, Floodgate",s:132},{n:"Partner2Partner VC Breakfast",h:"8VC, Alpha Partners",s:130},{n:"Meet SF's Early Stage Founders & Investors",h:"Bling, Costanoa, Defy, Nextview",s:128},{n:"Founders Financial Future Collective",h:"a16z Perennial",s:126},{n:"Mahjong Night",h:"Cogent, Bain Capital Ventures",s:124},{n:"Engineering 10x",h:"Google for Startups, DeepMind",s:122},{n:"Chain of Thought LIVE",h:"Scale AI",s:120},{n:"Founders & Friends",h:"EQT",s:118},{n:"Capturing the Value of Intelligence",h:"HSBC, a16z Speedrun",s:117},{n:"Startups Networking Party",h:"Databricks",s:115},{n:"Aussie & Kiwi Brekkie",h:"Blackbird, Skip Capital, Atlassian",s:113},{n:"The Investment Game: Series A",h:"HubSpot, a16z",s:112},{n:"Founder Lunch Club",h:"Fin, Stripe",s:110},{n:"Watts & Wisdom",h:"a16z, Rillet",s:109},{n:"Alumni Reunion & Officewarming",h:"a16z speedrun",s:107},{n:"Durable Advantage in AI",h:"Rain, Acrew, J.P. Morgan",s:106},{n:"Uncork & Connect",h:"Uncork Capital",s:104},{n:"Founder & Investor Lounge",h:"Gunderson Dettmer, SVB",s:103},{n:"Base10 Partners <> Stripe Startups",h:"",s:101},{n:"Aaron Levie + Tanay Kothari",h:"Turing, AGI House",s:100},{n:"Who Will Own the Future?",h:"ARK Invest",s:98},{n:"Pioneer: CX Leaders Summit",h:"Fin",s:97},{n:"Sushi-Making",h:"Kindred Ventures, Fearn",s:95},{n:"Product Builders Meetup",h:"Lenny's Newsletter, PostHog",s:94},{n:"Analog Extravaganza",h:"Fin, Vanta, Fireworks, Linear, Dust",s:92},{n:"Vibe Coding Demo Night",h:"Atlassian, Lovable",s:91},{n:"Deel After Dark Gala",h:"Deel",s:89},{n:"The Afterparty",h:"a16z, Unicorner",s:88},{n:"Founding GPs VC Omakase",h:"Unicorner, Mercury",s:86},{n:"Raise Ready Breakfast",h:"Crunchbase, Carta, Morrison Foerster",s:85},{n:"After Hours",h:"Poolside",s:84},{n:"Chess Night",h:"M13",s:82},{n:"Hiring Founding Teams",h:"HigherPeople, Afore Capital",s:81},{n:"When Agents Spend Money",h:"Thomvest Ventures",s:80},{n:"B2B Founders & Funders Breakfast",h:"Forum Ventures",s:79},{n:"Founder Lounge",h:"Antler, Every.io",s:78},{n:"AGM & VC Happy Hour",h:"Vectors Capital",s:77},{n:"Secondaries are now Primary",h:"Kranz, Morgan Stanley",s:76},{n:"Liquidity, Before the Exit",h:"Section Partners, SVB",s:75},{n:"Data Partnerships Happy Hour",h:"Mercor",s:74},{n:"Deep Tech Investor-Only Happy Hour",h:"Alumni Ventures",s:73},{n:"Founder-led Sales Night",h:"Stage2 Capital",s:72},{n:"Best Coast LP + VC Exchange",h:"Rising Tide Partners",s:71},{n:"DeepTech LP & GP Dinner",h:"Axci Capital, Flex",s:70},{n:"Fireside with Carta's CFO",h:"Dust, Operators Guild",s:69},{n:"Demos After Dark",h:"Fin, Clay",s:68},{n:"GP/LP Luncheon, Deep Tech",h:"Actuate Ventures",s:67},{n:"The $1M Deal",h:"Deel, AWS, Sunshine Lake VC",s:66},{n:"Founders Flow",h:"Carta, WilmerHale",s:65},{n:"Continual Learning After Hours",h:"Fusion Fund",s:64},{n:"Early-Stage Founder Cafe",h:"Rackhouse VC, Stripe",s:63},{n:"State of Venture Deals",h:"DLA Piper",s:62},{n:"Private Fund CFO Breakfast",h:"Suntera, KPMG",s:61},{n:"Pitch Decks That Raise Money",h:"Mucker Capital",s:60},{n:"LP Dinner",h:"Untapped Ventures",s:59},{n:"The GTM Inflection Point",h:"Adobe",s:58},{n:"Meet the Lab",h:"Mistral",s:57},{n:"State of Models",h:"OpenRouter",s:56},{n:"Agentic Knowledge Happy Hour",h:"Pinecone",s:55},{n:"GP/LP Happy Hour",h:"Geek Ventures",s:54},{n:"VC/LP Meetup",h:"Founders Bay",s:53},{n:"Early-Stage GP Lunch",h:"Giano Capital",s:52},{n:"Funding Founders Dinner",h:"DealMaker, J.P. Morgan",s:51},{n:"FinTech Golden Hour",h:"Visa, Fin Capital, J.P. Morgan",s:50},{n:"High Tea Experience",h:"Council Capital, J.P. Morgan",s:49},{n:"Sports Tech Showcase",h:"IBM, a16z Speedrun",s:48},{n:"GP LP Dinner",h:"FirstGlance, MATCH HOUSE",s:47},{n:"Tech Week Flyover",h:"Sentry, Neon by Databricks, Exa.ai",s:46},{n:"100 Women in AI Launch",h:"Flybridge, SVB",s:45},{n:"Reset at the Sauna Garden",h:"Forerunner Ventures, Verci",s:44},{n:"Investor & Angel Networking Evening",h:"Luminar Ventures",s:43},{n:"Selling to Government",h:"Okta Ventures, M12",s:42},{n:"UnCommon Demo Night",h:"Rubicon Point Partners",s:41},{n:"Japanese LPs & Corporates × Global VCs",h:"DG Daiwa Ventures",s:40}
1,{n:"Investor Sushi Night: Japan",h:"500 Global",s:39},{n:"Fund or Fold",h:"GreatPoint Ventures, G2C",s:38},{n:"Building the Onchain Capital Stack",h:"Kindred Ventures",s:37},{n:"Deals & Drinks VC Happy Hour",h:"Runway Growth Capital",s:36},{n:"Investor Happy Hour",h:"Kapor Capital",s:35},{n:"Builder Book Club",h:"Notable Capital",s:34},{n:"Future of Creativity",h:"Gold House Ventures",s:33},{n:"Brave New World of Startup Fundraising",h:"Foundersuite, Nixon Peabody",s:32},{n:"SF Office Opening",h:"Town Hall Ventures",s:31},{n:"No Decks. Just Demos.",h:"Newgen Venture Partners",s:30},{n:"The AI Convergence",h:"Comcast Ventures, Liberty Global Ventures",s:29},{n:"Growth-Stage Founder Dinner",h:"Giano Capital",s:28},{n:"Private Dinner with Growth Equity VC",h:"Bear Holdings",s:27},{n:"Defense & DeepTech Investing",h:"TriplePoint Capital, PitchBook",s:26},{n:"Consumer Tech Day Pitch Show",h:"Flyer One Ventures, PvX Partners",s:25},{n:"Women Who Write Checks",h:"Co Ventures",s:24},{n:"Healthcare AI Happy Hour",h:"Flare Capital, CVS Health Ventures, J.P. Morgan",s:23},{n:"Table for Ten",h:"SevenTrain Ventures",s:22}],oe="https://gem-agent-38ae41bd5367.herokuapp.com".replace(/\/$/,""),ie=`${oe}/api/gemphere/sftw/votes`,Ce=`${oe}/api/gemphere/sftw/events`,_={tallies:{},mine:{}},le={up:0,down:0,net:0};function ce(n){return n.normalize("NFKD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,150)}function $(n,s){return`${n}:${ce(s)}`}function de(n){return n?{Authorization:`Bearer ${n}`}:{}}async function se(n){try{const s=await fetch(ie,{headers:de(n)});if(!s.ok)return _;const t=await s.json();return{tallies:t.tallies??{},mine:t.mine??{}}}catch{return _}}async function Pe(n,s,t,r){const h=await fetch(ie,{method:"POST",headers:{"Content-Type":"application/json",...de(n)},body:JSON.stringify({board:s,key:ce(t),vote:r})});if(!h.ok){const x=await h.json().catch(()=>null);throw new Error((x==null?void 0:x.error)||"Your vote did not save. Try again.")}return await h.json()}async function Te(n,s){const t=n.trim();if(t.length<2)return{total:0,events:[]};try{const r=await fetch(`${Ce}?q=${encodeURIComponent(t)}`,{signal:s});if(!r.ok)return{total:0,events:[]};const h=await r.json();return{total:h.total??0,events:h.events??[]}}catch{return{total:0,events:[]}}}function Fe(n){if(!n||typeof n!="object")return{};const s=n,t=s.data??s,r=(t==null?void 0:t.data)??t;return{accessToken:(r==null?void 0:r.accessToken)??(t==null?void 0:t.accessToken)??(s==null?void 0:s.accessToken),userId:(r==null?void 0:r.userId)??(t==null?void 0:t.userId)??(r==null?void 0:r.id)??(t==null?void 0:t.id),fullName:(r==null?void 0:r.fullName)??(t==null?void 0:t.fullName)??(r==null?void 0:r.fullname)??(t==null?void 0:t.fullname)}}function Ae(){const{login:n,user:s}=re(),[t,r]=i.useState("form"),[h,x]=i.useState(""),[l,g]=i.useState(!1),[y,c]=i.useState(""),T=i.useRef(null);i.useEffect(()=>()=>U(),[]);const D=!!(s!=null&&s.accessToken),B=i.useCallback(()=>{r("form"),x(""),c(""),U(),T.current=null},[]),F=i.useCallback(async p=>{if(c(""),!p.fullName.trim())return c("Your name is required"),!1;if(!p.email.trim()||!me(p.email))return c("Enter a valid email (e.g. [email protected])"),!1;if(!pe(p.phone))return c("Enter a valid phone number (7–15 digits)"),!1;if(!ne())return c("Phone verification isn't configured. Add the Firebase env vars and try again."),!1;g(!0);try{return T.current=await fe(te(p.phone,p.countryCode)),r("otp"),x(""),!0}catch(N){return c(ge(N)),!1}finally{g(!1)}},[]),w=i.useCallback(async p=>{var v;const N=h.replace(/\D/g,"");if(N.length!==6)return c("Enter the 6-digit code"),null;const I=T.current;if(!I)return c("That code expired. Send a new one."),null;g(!0),c("");try{await ye(I,N);const S=te(p.phone,p.countryCode),m=p.email.trim(),u=p.fullName.trim(),P=await ve({fullname:u,email:m,phoneNumber:S,password:"OTP",role:1,rememberMe:!0});let{accessToken:b,userId:o,fullName:f}=Fe(P);if(!b){const C=await be(S,!0);C.success&&((v=C.data)!=null&&v.accessToken)&&(b=C.data.accessToken,o=C.data.userId,f=C.data.fullName)}if(!b)return c((P==null?void 0:P.message)||"Account created but sign-in failed. Try again in a moment."),null;let A=f??u;if(u&&u.toLowerCase()!==(f??"").trim().toLowerCase())try{await ke(b,{fullname:u,email:m}),A=u}catch{}
1const E={userId:o??0,fullName:A,email:m,accessToken:b};return n(E),U(),T.current=null,E}catch(S){return c(S instanceof Error?S.message:"Could not verify that code"),null}finally{g(!1)}},[h,n]);return{phase:t,otp:h,setOtp:x,loading:l,err:y,setErr:c,sendCode:F,verifyAndSignup:w,backToForm:B,alreadySignedIn:D,firebaseReady:ne()}}function Ee(n){return n.kind==="choose"?{eyebrow:"SF Tech Week",title:"Which one suits you the best",lede:"Two ways in. Pick the one that's you."}:n.kind==="vote"?{eyebrow:"Before you vote",title:"One vote each.",lede:"Signup to vote"}:n.kind==="organizer"?{eyebrow:"For organizers",title:"Let's start with you.",lede:"Your name, where your matches get sent, and a number for the night itself. Your event is the next screen."}:{eyebrow:"Plan my week",title:"Let's start with you.",lede:"Your name, where your week gets sent, and a number we text the moment the names unlock."}}function Ve({intent:n,invite:s,onClose:t,onChoose:r,onBack:h,onDone:x}){const l=Ae(),[g,y]=i.useState(""),[c,T]=i.useState(""),[D,B]=i.useState("+1"),[F,w]=i.useState(""),p=i.useRef(null),N=i.useRef(null),{eyebrow:I,title:v,lede:S}=Ee(n),m={fullName:g,email:c,phone:F,countryCode:D},u=l.phase==="otp";i.useEffect(()=>{const o=f=>{f.key==="Escape"&&t()};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[t]),i.useEffect(()=>{const o=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=o}},[]),i.useEffect(()=>{var o;(o=p.current)==null||o.focus()},[]);function P(o){if(o.key!=="Tab"||!N.current)return;const f=N.current.querySelectorAll("button:not([disabled]),input:not([disabled]),select:not([disabled]),a[href]");if(!f.length)return;const A=f[0],E=f[f.length-1];o.shiftKey&&document.activeElement===A?(o.preventDefault(),E.focus()):!o.shiftKey&&document.activeElement===E&&(o.preventDefault(),A.focus())}async function b(o){if(o.preventDefault(),!l.loading){if(u){const f=await l.verifyAndSignup(m);f&&x(f);return}await l.sendCode(m)}}return e.jsx("div",{className:"sfd",role:"presentation",onMouseDown:o=>{o.target===o.currentTarget&&t()},children:e.jsxs("div",{className:"sfd-card",role:"dialog","aria-modal":"true","aria-labelledby":"sfd-title",ref:N,onKeyDown:P,children:[e.jsx("button",{className:"sfd-x",type:"button",onClick:t,"aria-label":"Close",children:e.jsx("span",{"aria-hidden":"true",children:"×"})}),e.jsx("span",{className:"sfd-eyeb",children:I}),e.jsx("h2",{className:"sfd-title",id:"sfd-title",children:v}),e.jsx("p",{className:"sfd-lede",children:S}),n.kind==="vote"&&e.jsxs("p",{className:"sfd-subject",children:["Voting on ",e.jsx("b",{children:n.subject})]}),s&&e.jsxs("p",{className:"sfd-subject",children:["You were invited to ",e.jsx("b",{children:s.title})," — finish this and you are"," ",s.kind==="league"?"in the league":"on the list","."]}
1),n.kind==="choose"?e.jsxs("div",{className:"sfd-pick",children:[e.jsxs("button",{type:"button",className:"sfd-pickbtn",onClick:()=>r==null?void 0:r("attendee"),children:[e.jsx("span",{className:"sfd-pickh",children:"I'm going to events"}),e.jsx("span",{className:"sfd-pickw",children:"Plan my week"}),e.jsx("span",{className:"sfd-pickd",children:"Which events to go to, who to meet, and who can open doors for you."})]}),e.jsxs("button",{type:"button",className:"sfd-pickbtn",onClick:()=>r==null?void 0:r("organizer"),children:[e.jsx("span",{className:"sfd-pickh",children:"I'm hosting events"}),e.jsx("span",{className:"sfd-pickw",children:"Add my event"}),e.jsx("span",{className:"sfd-pickd",children:"Become the room people choose. Guests arrive already knowing who to meet."})]})]}):e.jsxs("form",{className:"sfd-form",onSubmit:b,children:[e.jsxs("label",{className:"sfd-fld",children:[e.jsx("span",{className:"sfd-l",children:"Name"}),e.jsx("input",{ref:p,value:g,onChange:o=>y(o.target.value),placeholder:"Eda Ciris",autoComplete:"name",disabled:l.loading||u})]}),e.jsxs("label",{className:"sfd-fld",children:[e.jsx("span",{className:"sfd-l",children:"Email"}),e.jsx("input",{type:"email",value:c,onChange:o=>T(o.target.value),placeholder:"[email protected]",autoComplete:"email",disabled:l.loading||u})]}),e.jsxs("label",{className:"sfd-fld",children:[e.jsx("span",{className:"sfd-l",children:"Mobile"}
1),e.jsxs("div",{className:"sfd-phone",children:[e.jsx("select",{value:D,onChange:o=>B(o.target.value),disabled:l.loading||u,"aria-label":"Country code",children:xe.map(o=>e.jsxs("option",{value:o.code,children:[o.flag," ",o.code]},o.code+o.label))}),e.jsx("input",{type:"tel",value:F,onChange:o=>w(o.target.value),placeholder:"415 000 0000",autoComplete:"tel",disabled:l.loading||u})]})]}),u&&e.jsxs("label",{className:"sfd-fld",children:[e.jsx("span",{className:"sfd-l",children:"The code we just texted you"}),e.jsx("input",{className:"sfd-otp",inputMode:"numeric",autoComplete:"one-time-code",maxLength:6,value:l.otp,onChange:o=>l.setOtp(o.target.value.replace(/\D/g,"").slice(0,6)),placeholder:"000000","aria-label":"Six digit code",autoFocus:!0}),e.jsxs("span",{className:"sfd-note",children:["Sent to"," ",e.jsxs("b",{children:[D," ",F]}),". It lasts ten minutes."," ",e.jsx("button",{type:"button",className:"sfd-link",onClick:l.backToForm,disabled:l.loading,children:"Change number"})]})]}),l.err&&e.jsx("p",{className:"sfd-err",children:l.err}),e.jsxs("div",{className:"sfd-foot",children:[e.jsx("span",{className:"sfd-note",children:u?"Six digits and you are in.":"A 6-digit code, to check the number is yours. Nothing else."}),e.jsx("button",{className:"sfd-go",type:"submit",disabled:l.loading||u&&l.otp.length!==6,children:l.loading?"Just a moment…":u?"Verify and continue":"Send me a code"})]}),h&&!u&&e.jsx("button",{type:"button",className:"sfd-back",onClick:h,disabled:l.loading,children:"‹ Not you? Pick again"})]}),e.jsx("div",{id:"recaptcha-container"})]})})}const De="https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600&family=Instrument+Serif:ital@0;1&display=swap";function Ie(){i.useEffect(()=>{if(document.querySelector("link[data-sftw-fonts]"))return;const n=document.createElement("link");n.rel="stylesheet",n.href=De,n.setAttribute("data-sftw-fonts",""),document.head.appendChild(n)},[])}const Be=10,Le=260,O="events",Re=`The top ${Q.length} events of the week`,Me=e.jsxs(e.Fragment,{children:["Every room this week, vetted. We pulled from research, word of mouth, host submissions and time on the ground. Each one got a score, and we paid closest attention to"," ",e.jsx("b",{children:"relevance, access, intent alignment and network strength"}),". Vote a room up or down and the list moves. Search to reach the rest of the programme — every room of the week is in there."]}),Y={attendee:{q:e.jsx(e.Fragment,{children:"Want a week that's actually planned?"}),head:["How it works","Walk into the right rooms."],steps:[["Tell me what you are chasing","Customers, investors, partners, a hire."],["I read every attendee list","All 1500 rooms, and everyone on them."],["You get the rooms and the names","Ranked, with a reason for every name."],["I book the meetings","I write the ask, send it, book the time."]],cta:"Plan my week",branch:"attendee"},host:{q:e.jsx(e.Fragment,{children:"Think we've got your room wrong? Or belong higher up this list?"}),head:["Why people choose your room","Be the event people plan their week around."],steps:[["Become the room people choose","Guests arrive already knowing who to meet."],["Guests open doors for each other","Everyone sees what the others can open."],["Your guests fill the empty seats","We find who is missing; they bring them."],["Proof, not a headcount","Intros made, meetings booked, who came back."]],cta:"Add my event",branch:"organizer"}};function Ge(n){return Q.map(s=>{var r;const t=((r=n.tallies[$(O,s.n)])==null?void 0:r.net)??0;return{...s,net:t,score:s.s+t}}).sort((s,t)=>t.score-s.score||t.s-s.s||s.n.localeCompare(t.n)).map((s,t)=>({...s,rank:t+1}))}function Oe(n,s){var r;const t=((r=s.tallies[`${O}:${n.key}`])==null?void 0:r.net)??0;return{n:n.name,h:n.host,s:0,net:t,score:t,rank:0,programme:!0,when:[n.when,n.where].filter(Boolean).join(" · ")}}function He({board:n,name:s,votes:t,onVote:r}){const h=$(n,s),x=t.tallies[h]??le,l=t.mine[h]??0,g=x.net;return e.jsx("td",{className:"vote",children:e.jsxs("div",{className:"vbox",children:[e.jsx("button",{type:"button",className:l===1?"vb on":"vb","aria-pressed":l===1,"aria-label":`Vote up ${s}`,onClick:()=>r(n,s,1),children:e.jsx("span",{"aria-hidden":"true",children:"▲"})}),e.jsxs("span",{className:g>0?"vn pos":g<0?"vn neg":"vn",children:[g>0?`+${g}`:g,e.jsx("span",{className:"vh",children:" net votes"})]}),e.jsx("button",{type:"button",className:l===-1?"vb on":"vb","aria-pressed":l===-1,"aria-label":`Vote down ${s}`,onClick:()=>r(n,s,-1),children:e.jsx("span",{"aria-hidden":"true",children:"▼"})})]})})}function ae({row:n,votes:s,onVote:t}){const r=!n.programme||n.net!==0;return e.jsxs("tr",{className:`z${n.programme?" prog":""}${n.rank===1?" leader":""}`,children:[e.jsx("td",{className:"rank",children:n.programme?e.jsx("span",{className:"nil",children:"—"}):n.rank}),e.jsxs("td",{children:[e.jsx("span",{className:"name",children:n.n}),(n.h||n.when)&&e.jsx("span",{className:"sub",children:[n.h,n.when].filter(
1Boolean).join(" · ")})]}),e.jsx("td",{className:"num",children:r?e.jsx("span",{className:"score",children:n.score}):e.jsx("span",{className:"score nil",title:"Nobody has scored this one yet",children:"—"})}),e.jsx(He,{board:O,name:n.n,votes:s,onVote:t})]})}function J({ask:n,onGo:s}){return e.jsx("tr",{className:"ask",children:e.jsx("td",{colSpan:4,children:e.jsxs("div",{className:"askin stack",children:[e.jsx("p",{className:n.wide?"q wide":"q",children:n.q}),e.jsx("button",{className:"cta",type:"button",onClick:()=>s(n.branch,n.cta),children:n.cta}),e.jsxs("div",{className:"flow",children:[n.head&&e.jsxs("div",{className:"flowhead",children:[e.jsx("span",{className:"feyeb",children:n.head[0]}),e.jsx("h3",{className:"ftitle",children:n.head[1]})]}),e.jsx("ol",{className:"fsteps",style:{"--n":n.steps.length},children:n.steps.map(([t,r],h)=>e.jsxs("li",{className:"fstep",children:[e.jsx("span",{className:"c",children:h+1}),e.jsx("b",{children:t}),e.jsx("span",{className:"note",children:r})]},t))})]})]})})})}function $e(n){const s=new URLSearchParams;for(const t of["event","league","connector","join"]){const r=n.get(t);r&&s.set(t,r)}return s.toString()}function Ke(){const[n,s]=i.useState(_),[t,r]=i.useState(""),[h,x]=i.useState({q:"",total:0,events:[]}),[l,g]=i.useState(!1),[y,c]=i.useState(null),[T,D]=i.useState(null),[B,F]=i.useState(""),w=je(),[p]=we(),{user:N,isReady:I}=re(),v=N==null?void 0:N.accessToken;Ie();const S=i.useMemo(()=>Ge(n),[n]),m=t.trim().toLowerCase(),u=i.useMemo(()=>m?S.filter(a=>`${a.n} ${a.h}`.toLowerCase().includes(m)):S,[S,m]);i.useEffect(()=>{if(m.length<2){x({q:"",total:0,events:[]}),g(!1);return}const a=new AbortController;g(!0);const d=window.setTimeout(()=>{Te(m,a.signal).then(k=>{a.signal.aborted||(x({q:m,...k}),g(!1))})},Le);return()=>{a.abort(),window.clearTimeout(d)}},[m]);const P=i.useMemo(()=>new Set(Q.map(a=>$(O,a.n))),[]),b=i.useMemo(()=>!m||h.q!==m?[]:h.events.filter(a=>!P.has(`${O}:${a.key}`)).map(a=>Oe(a,n)),[m,h,P,n]),o=i.useCallback(a=>{const d=$e(p);return`/sf-tech-week?start=${a}${d?`&${d}`:""}`},[p]),f=i.useRef(0);i.useEffect(()=>{let a=!0;const d=++f.current;return se(v).then(k=>{a&&f.current===d&&s(k)}),()=>{a=!1}},[v]);const A=i.useRef(n);A.current=n;const E=i.useRef(!1);i.useEffect(()=>{if(E.current||!I)return;const a=p.get("signin");if(!(a!=="attendee"&&a!=="organizer"&&a!=="choose")){if(E.current=!0,a==="choose"){c({kind:"choose"});return}if(v){w(o(a),{replace:!0});return}c({kind:a,label:a==="organizer"?"Add my event":"Plan my week"})}},[p,v,I,w,o]);const C=p.get("event"),z=p.get("league");i.useEffect(()=>{if(!C&&!z)return;let a=!0;return(C?Ne(C).then(k=>{var V;return(V=k.event)!=null&&V.title?{title:k.event.title,kind:"event"}:null}):Se(z).then(k=>{var V;return(V=k.league)!=null&&V.name?{title:k.league.name,kind:"league"}:null})).then(k=>a&&D(k)).catch(()=>{}),()=>{a=!1}},[C,z]);const H=i.useCallback(async(a,d,k,V)=>{const R=$(d,k);F(""),f.current+=1;const K=A.current.mine[R]??0,M=K===V?0:V;s(j=>{const G=j.tallies[R]??le,L=G.up-(K===1?1:0)+(M===1?1:0),ee=G.down-(K===-1?1:0)+(M===-1?1:0),q={...j.mine};return M===0?delete q[R]:q[R]=M,{tallies:{...j.tallies,[R]:{up:L,down:ee,net:L-ee}},mine:q}});try{const j=await Pe(a,d,k,M);s(G=>{const L={...G.mine};return j.vote===0?delete L[j.key]:L[j.key]=j.vote,{tallies:{...G.tallies,[j.key]:j.tally},mine:L}})}catch(j){F(j instanceof Error?j.message:"Your vote did not save."),f.current+=1,s(await se(a))}},[]),X=i.useCallback((a,d,k)=>{if(!v){c({kind:"vote",board:a,name:d});return}H(v,a,d,k)},[v,H]),W=i.useCallback((a,d)=>{if(v){w(o(a));return}c({kind:a,label:d})},[v,w,o]),he=i.useCallback(a=>{const d=y;if(c(null),!!d){if(d.kind==="vote"){H(a.accessToken,d.board,d.name,1);return}d.kind!=="choose"&&w(o(d.kind))}},[y,H,w,o]),Z=y?y.kind==="vote"?{kind:"vote",subject:y.name}:y.kind==="choose"?{kind:"choose"}:{kind:y.kind,label:y.label}:null,ue=i.useCallback(a=>
1{if(v){c(null),w(o(a));return}c({kind:a,label:a==="organizer"?"Add my event":"Plan my week",fromChoose:!0})},[v,w,o]);return e.jsxs("div",{className:"sftw",children:[e.jsx("div",{className:"wrap",children:e.jsxs("div",{className:"head",children:[e.jsxs("h1",{className:"title",children:["SF Tech Week",e.jsx("br",{}),e.jsx("em",{children:"Ones to Watch"})]}),e.jsxs("p",{className:"under",children:["Updated daily · built by"," ",e.jsx("a",{className:"by",href:"https://gemphere.com",target:"_blank",rel:"noopener noreferrer",children:"Gemphere"})]}),e.jsx("p",{className:"statement",children:Me}),e.jsx("div",{className:"rule"})]})}),e.jsxs("main",{className:"wrap",children:[e.jsxs("div",{className:"bhead",children:[e.jsx("h2",{className:"btitle",children:Re}),e.jsxs("div",{className:"search",children:[e.jsx("input",{type:"search",className:"sinput",value:t,onChange:a=>r(a.target.value),placeholder:"Search a room or a host","aria-label":"Search a room or a host",autoComplete:"off"}),m&&e.jsx("p",{className:"scount",role:"status",children:l&&u.length===0?"Searching the programme…":u.length+b.length===0?"Nothing by that name.":[u.length?`${u.length} on the list`:null,b.length?`${b.length} more in the programme`:null].filter(Boolean).join(" · ")})]})]}),B&&e.jsx("p",{className:"vmsg",role:"status",children:B}),e.jsxs("table",{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",children:e.jsx("span",{className:"vh",children:"Rank"})}),e.jsx("th",{scope:"col",children:"Event"}),e.jsx("th",{scope:"col",className:"num",children:"Score"}),e.jsx("th",{scope:"col",className:"vhead",children:"Vote"})]})}),e.jsxs("tbody",{children:[u.map((a,d)=>e.jsxs(i.Fragment,{children:[e.jsx(ae,{row:a,votes:n,onVote:X}),!m&&d===4&&e.jsx(J,{ask:Y.attendee,onGo:W}),!m&&d===Be-1&&e.jsx(J,{ask:Y.host,onGo:W})]},a.n)),b.length>0&&e.jsx("tr",{className:"progsplit",children:e.jsxs("td",{colSpan:4,children:[e.jsx("span",{className:"pseyeb",children:"The rest of the programme"}),e.jsxs("span",{className:"psnote",children:["Nobody read these, so nobody scored them — no rank and no score until somebody votes. Vote one up and it starts climbing.",h.total>b.length&&` Closest ${b.length} of ${h.total.toLocaleString()}.`]})]})}),b.map(a=>e.jsx(ae,{row:a,votes:n,onVote:X},`p-${a.n}`)),m&&u.length===0&&b.length===0&&!l&&e.jsx("tr",{children:e.jsx("td",{className:"empty",colSpan:4,children:"No room by that name, on the list or anywhere in the programme. Try a host — Stripe, a16z, Carta."})}),m&&e.jsx(J,{ask:Y.host,onGo:W})]})]})]}),e.jsx("footer",{children:e.jsxs("div",{className:"wrap",children:["On this list and don't want to be? Reach out to"," ",e.jsx("a",{href:"mailto:[email protected]",children:"[email protected]"})]})}),Z&&e.jsx(Ve,{intent:Z,invite:T,onClose:()=>c(null),onChoose:ue,onBack:y&&y.kind!=="vote"&&y.kind!=="choose"&&y.fromChoose?()=>c({kind:"choose"}):void 0,onDone:he})]})}export{Ke as default};

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.