1import{r as c,u as E,s as _,j as e,L as u,B as D}from"./index-EuY_-FAY.js";import{H as C}from"./Helmet-R-iL8Dqt.js";import{B as l}from"./button-DwzNqib_.js";import{B as h}from"./badge-BiGl0epm.js";import{H as L}from"./Header-CLdbyLbk.js";import{A as b,F as P}from"./Footer-DLYBYlrH.js";import{h as m}from"./vienna-startup-event-Cb0pVIEU.js";import{h as z}from"./breakfast-networking-CfzGIpLf.js";import{e as I}from"./event-networking-gathering-BQ_AMYo7.js";import{C as T}from"./calendar-TeXraZ6Q.js";import{C as F}from"./clock-C9pzXbgT.js";import{M as $}from"./map-pin-CiJS0zpt.js";import{U}from"./users-B7Eh8ycR.js";import{f}from"./index-h3IyJjLp.js";import"./index-CCnnvLwg.js";import"./menu-QX_7UXmx.js";import"./input-CwLsOgdz.js";import"./format-BJatCrh1.js";import"./index-DwFUDgNw.js";const B="/assets/london-startup-live-BxEEkFFr.jpg",re=()=>{const[i,v]=c.useState([]),[d,g]=c.useState(!0),[n,x]=c.useState(!1),j=E();c.useEffect(()=>{w()},[n]);const w=async()=>{g(!0);try{console.log("Fetching events from Supabase..."),console.log("showPastEvents:",n);const t=new Date;t.setDate(t.getDate()-14);const r=new Date;console.log("Today:",r.toISOString()),console.log("14 days ago:",t.toISOString());let s=_.from("events").select("*").in("visibility",["Public","Protected"]).eq("status","Live");n?(console.log("Fetching PAST events only"),s=s.lt("end_date",r.toISOString()).order("start_date",{ascending:!1})):(console.log("Fetching upcoming/recent events only"),s=s.or(`start_date.gte.${r.toISOString()},end_date.gte.${t.toISOString()}`).order("start_date",{ascending:!0}));const{data:a,error:o}=await s;console.log("Supabase response:",{data:a,error:o}),console.log("Number of events returned:",(a==null?void 0:a.length)||0),o?console.error("Error fetching events:",o):(console.log("Events fetched successfully:",a),v(a||[]))}catch(t){console.error("Error:",t)}finally{console.log("Setting loading to false"),g(!1)}},y=(t,r)=>{const s=new Date(t),a=new Date(r),o={month:"long",day:"numeric",year:"numeric"};return s.toDateString()===a.toDateString()?s.toLocaleDateString("en-US",o):`${s.toLocaleDateString("en-US",o)} - ${a.toLocaleDateString("en-US",o)}`},N=(t,r,s)=>{const a=s||"Europe/Vienna",o=f(new Date(t),a,"h:mm a"),k=f(new Date(r),a,"h:mm a");return`${o} - ${k}`},S=t=>{if(t.hero_image)return t.hero_image;const r=t.title.toLowerCase();return r.includes("vienna")?m:r.includes("london")?B:r.includes("berlin")?m:r.includes("breakfast")?z:m},p=t=>t.toLowerCase().replace(/[^a-z0-9\s]/g,"").replace(/\s+/g,"-").substring(0,50);return e.jsxs("div",{className:"min-h-screen bg-white",children:[e.jsxs(C,{children:[e.jsx("title",{children:"Startup Events | StartupLive Global Calendar"}),e.jsx("meta",{name:"title",content:"Startup Events | StartupLive Global Calendar"}),e.jsx("meta",{name:"description",content:"Join our global community of entrepreneurs, mentors, and innovators. From intensive 36-hour accelerations to casual networking breakfasts."}),e.jsx("meta",{name:"keywords",content:"startup events, entrepreneurship, accelerator, networking, innovation, mentorship"}),e.jsx("meta",{property:"og:type",content:"website"}),e.jsx("meta",{property:"og:url",content:window.location.href}),e.jsx("meta",{property:"og:title",content:"Startup Events | StartupLive Global Calendar"}),e.jsx("meta",{property:"og:description",content:"Join our global community of entrepreneurs, mentors, and innovators"}),e.jsx("meta",{property:"og:site_name",content:"StartupLive"}),e.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),e.jsx("meta",{name:"twitter:title",content:"Startup Events | StartupLive Global Calendar"}),e.jsx("meta",{name:"twitter:description",content:"Join our global community of entrepreneurs, mentors, and innovators"}),e.jsx("meta",{name:"twitter:site",content:"@startuplive"}),e.jsx("link",{rel:"canonical",href:window.location.href})]}),e.jsx(L,{}),e.jsxs("main",{className:"pt-16",children:[e.jsxs("section",{className:"relative py-16 lg:py-24 overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:`url(${I})`},children:e.jsx("div",{className:"absolute inset-0 bg-black/60"})}),e.jsx("div",{className:"relative z-10 max-w-7xl mx-auto px-8 lg:px-16",children:e.jsxs("div",{className:"text-center max-w-4xl mx-auto",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full bg-white/10 border border-white/20 backdrop-blur-sm mb-6",children:[e.jsx("div",{className:"w-2 h-2 rounded-full animate-pulse",style:{backgroundColor:"rgb(0, 200, 6)"}}),e.jsx("span",{className:"text-white text-sm font-medium",children:"Global Events Calendar"})]}),e.jsx("h1",{className:"text-4xl sm:text-5xl lg:text-6xl font-bold text-white mb-6",children:"Startup Events Timeline"}),e.jsx("p",{className:"text-xl text-white/90 mb-8 leading-relaxed",children:"Join our global community of entrepreneurs, mentors, and innovators. From intensive 36-hour accelerations to casual networking breakfasts."}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[e.jsx(l,{size:"lg",style:{backgroundColor:"rgb(0, 200, 6)"},className:"hover:opacity-90 text-white font-semibold",onClick:()=>{const t=new Date,s=i.filter(a=>new Date(a.start_date)>=t).sort((a,o)=>new Date(a.start_date).getTime()-new Date(o.start_date).getTime())[0];s&&j(`/events/${s.slug||p(s.title)}/register`)},children:"Register for Next Event"}),e.jsx(l,{variant:"outline",size:"lg",onClick:()=>x(!n),className:"border-white/30 text-black bg-white hover:bg-gray-100 backdrop-blur-sm font-semibold",children:n?"View Upcoming Events":"View Past Events"}),e.jsx(u,{to:"/events/pre-acceleration",children:e.jsx(l,{variant:"outline",size:"lg",className:"bg-white text-foreground hover:bg-gray-100 font-semibold",children:"PreâAcceleration Program"})})]})]})})]}),e.jsx("section",{className:"py-16 lg:py-24 bg-gray-50",children:e.jsxs("div",{className:"max-w-6xl mx-auto px-8 lg:px-16",children:[d&&e.jsx("div",{className:"flex justify-center py-16",children:e.jsx(D,{size:64})}
1),!d&&(i.length===0?e.jsxs("div",{className:"text-center py-16",children:[e.jsx("h3",{className:"text-2xl font-bold text-gray-800 mb-4",children:n?"No Past Events Found":"No Upcoming Events"}),e.jsx("p",{className:"text-gray-600 mb-8",children:n?"There are no past events to display at the moment.":"Check back soon for upcoming events or view our past events."}),e.jsx(l,{onClick:()=>x(!n),variant:"outline",className:"text-black",children:n?"View Upcoming Events":"View Past Events"})]}):e.jsx("div",{className:"space-y-12",children:i.map((t,r)=>{var s;return e.jsxs("div",{className:"relative",children:[r!==i.length-1&&e.jsx("div",{className:"absolute left-8 top-24 bottom-0 w-px bg-gray-300 hidden lg:block"}),e.jsx("div",{className:"absolute left-6 top-8 w-4 h-4 rounded-full border-4 border-gray-50 shadow-lg hidden lg:block",style:{backgroundColor:"rgb(0, 200, 6)"}}),e.jsx(u,{to:`/events/${t.slug||p(t.title)}`,children:e.jsx("div",{className:"lg:ml-16 group cursor-pointer",children:e.jsx("div",{className:"bg-white rounded-xl border border-gray-200 hover:border-gray-300 shadow-sm hover:shadow-lg transition-all duration-300 overflow-hidden hover:shadow-[0_10px_40px_rgba(0,200,6,0.1)]",children:e.jsxs("div",{className:"grid md:grid-cols-5 gap-0",children:[e.jsxs("div",{className:"md:col-span-2 relative overflow-hidden",children:[e.jsx("img",{src:S(t),alt:t.title,className:"w-full h-64 md:h-full object-cover group-hover:scale-105 transition-transform duration-500"}),e.jsxs("div",{className:"absolute top-4 left-4 bg-white rounded-lg p-3 shadow-lg",children:[e.jsx("div",{className:"text-2xl font-black",style:{color:"rgb(0, 200, 6)"},children:new Date(t.start_date).getDate()}),e.jsx("div",{className:"text-xs font-medium text-gray-500",children:new Date(t.start_date).toLocaleDateString("en-US",{month:"short",year:"numeric"})})]}),e.jsx("div",{className:"absolute top-4 right-4",children:e.jsx(h,{variant:"secondary",className:"bg-green-100 text-green-800",children:t.visibility})})]}),e.jsxs("div",{className:"md:col-span-3 p-6 lg:p-8",children:[e.jsxs("div",{className:"flex items-start justify-between mb-4",children:[e.jsx(h,{variant:"outline",className:"text-xs border-gray-300 text-gray-600",children:t.status}),e.jsx(b,{className:"w-5 h-5 text-gray-400 group-hover:translate-x-1 transition-all duration-300",style:{color:"rgb(0, 200, 6)"}})]}),e.jsx("h3",{className:"text-xl lg:text-2xl font-bold text-black mb-3 group-hover:text-black transition-colors duration-300",children:t.title}),e.jsx("div",{className:"text-gray-600 mb-6 leading-relaxed [&_p]:mb-2 [&_strong]:font-semibold [&_strong]:text-black [&_em]:italic [&_a]:text-primary [&_a]:underline",dangerouslySetInnerHTML:{__html:t.description}}),e.jsxs("div",{className:"grid sm:grid-cols-2 gap-4 text-sm",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(T,{className:"w-4 h-4",style:{color:"rgb(0, 200, 6)"}}),e.jsx("span",{className:"text-black font-medium",children:y(t.start_date,t.end_date)})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(F,{className:"w-4 h-4",style:{color:"rgb(0, 200, 6)"}}),e.jsxs("span",{className:"text-black font-medium",children:[N(t.start_date,t.end_date,t.timezone),t.timezone&&e.jsxs("span",{className:"text-gray-500 text-xs ml-1",children:["(",(s=t.timezone.split("/")[1])==null?void 0:s.replace("_"," "),")"]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx($,{className:"w-4 h-4",style:{color:"rgb(0, 200, 6)"}}),e.jsx("span",{className:"text-black font-medium",children:t.location})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(U,{className:"w-4 h-4",style:{color:"rgb(0, 200, 6)"}}),e.jsxs("span",{className:"text-black font-medium",children:[t.max_participants," max participants"]})]})]}),e.jsx("div",{className:"mt-6 pt-4 border-t border-gray-200",children:e.jsxs(l,{size:"sm",className:"group/btn text-white font-semibold hover:opacity-90",style:{backgroundColor:"rgb(0, 200, 6)"},children:["View Details",e.jsx(b,{className:"w-4 h-4 ml-2 group-hover/btn:translate-x-1 transition-transform"})]})})]})]})})})})]},t.id)})}))]})})]}),e.jsx(P,{})]})};export{re 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.