1import{c as M,l as B,j as t,L as w,R as m,r as h,B as f,J as I}from"./index-CNPsGjEa.js";import{S as R}from"./SEO-BK0024z7.js";import{N as A,F}from"./Footer-C2mwZlj3.js";import{A as V}from"./arrow-right-ldXNpZKs.js";import{T as $}from"./trending-up-DeRnCVM6.js";import{T as H}from"./trophy-DYYQpnH-.js";import{B as _}from"./badge-BxnKxkwB.js";import{s as C}from"./client-BomsTZso.js";import{C as D}from"./chevron-right-CFMD2eVB.js";import{C as W}from"./calendar-CceEaajA.js";import{U as G}from"./users-8SPuLJdZ.js";import"./index-D9eVhfiJ.js";/** 2 * @license lucide-react v0.462.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const J=M("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);/** 7 * @license lucide-react v0.462.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */const Z=M("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]),q={"for-business":J,career:$,hackathons:H},K=({exclude:e})=>{const{t:a,localePath:r}=B(),i=[{key:"for-business",title:a("relatedPages.forBusiness.title"),desc:a("relatedPages.forBusiness.desc"),cta:a("relatedPages.cta")},{key:"career",title:a("relatedPages.career.title"),desc:a("relatedPages.career.desc"),cta:a("relatedPages.cta")},{key:"hackathons",title:a("relatedPages.hackathons.title"),desc:a("relatedPages.hackathons.desc"),cta:a("relatedPages.cta")}].filter(n=>n.key!==e);return t.jsx("section",{className:"py-16 border-t border-border bg-muted/20",children:t.jsxs("div",{className:"container mx-auto px-4 md:px-8",children:[t.jsx("h2",{className:"text-center font-display font-semibold text-2xl md:text-3xl text-foreground mb-10",children:a("relatedPages.heading")}),t.jsx("div",{className:"grid md:grid-cols-2 gap-6 max-w-4xl mx-auto",children:i.map(n=>{const l=q[n.key];return t.jsxs(w,{to:r(n.key==="for-business"?"/":`/${n.key}`),className:"group bg-background border border-border rounded-xl p-6 flex items-start gap-4 hover:border-primary/40 hover:shadow-md transition-all",children:[t.jsx("div",{className:"w-12 h-12 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:t.jsx(l,{className:"w-6 h-6 text-primary"})}),t.jsxs("div",{className:"flex-1",children:[t.jsx("h3",{className:"font-semibold text-lg text-foreground mb-1",children:n.title}),t.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:n.desc}),t.jsxs("span",{className:"inline-flex items-center gap-1 text-primary text-sm font-medium",children:[n.cta,t.jsx(V,{className:"w-4 h-4 group-hover:translate-x-1 transition-transform"})]})]})]},n.key)})})]})})};var T={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},E=m.createContext&&m.createContext(T),X=["attr","size","title"];function Q(e,a){if(e==null)return{};var r=Y(e,a),s,i;if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(i=0;i<n.length;i++)s=n[i],!(a.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}function Y(e,a){if(e==null)return{};var r={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(a.indexOf(s)>=0)continue;r[s]=e[s]}return r}function y(){return y=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];
vendor: 4,873 bytes, line 11
11for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},y.apply(this,arguments)}function z(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);a&&(s=s.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,s)}return r}function v(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?z(Object(r),!0).forEach(function(s){ee(e,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z(Object(r)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(r,s))})}return e}function ee(e,a,r){return a=te(a),a in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function te(e){var a=ae(e,"string");return typeof a=="symbol"?a:a+""}function ae(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var s=r.call(e,a||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function U(e){return e&&e.map((a,r)=>m.createElement(a.tag,v({key:r},a.attr),U(a.child)))}function j(e){return a=>m.createElement(re,y({attr:v({},e.attr)},a),U(e.child))}function re(e){var a=r=>{var{attr:s,size:i,title:n}=e,l=Q(e,X),o=i||r.size||"1em",c;return r.className&&(c=r.className),e.className&&(c=(c?c+" ":"")+e.className),m.createElement("svg",y({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,s,l,{className:c,style:v(v({color:e.color||r.color},r.style),e.style),height:o,width:o,xmlns:"http://www.w3.org/2000/svg"}),n&&m.createElement("title",null,n),e.children)};return E!==void 0?m.createElement(E.Consumer,null,r=>a(r)):a(T)}function se(e){return j({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M7.0301.084c-1.2768.0602-2.1487.264-2.911.5634-.7888.3075-1.4575.72-2.1228 1.3877-.6652.6677-1.075 1.3368-1.3802 2.127-.2954.7638-.4956 1.6365-.552 2.914-.0564 1.2775-.0689 1.6882-.0626 4.947.0062 3.2586.0206 3.6671.0825 4.9473.061 1.2765.264 2.1482.5635 2.9107.308.7889.72 1.4573 1.388 2.1228.6679.6655 1.3365 1.0743 2.1285 1.38.7632.295 1.6361.4961 2.9134.552 1.2773.056 1.6884.069 4.9462.0627 3.2578-.0062 3.668-.0207 4.9478-.0814 1.28-.0607 2.147-.2652 2.9098-.5633.7889-.3086 1.4578-.72 2.1228-1.3881.665-.6682 1.0745-1.3378 1.3795-2.1284.2957-.7632.4966-1.636.552-2.9124.056-1.2809.0692-1.6898.063-4.948-.0063-3.2583-.021-3.6668-.0817-4.9465-.0607-1.2797-.264-2.1487-.5633-2.9117-.3084-.7889-.72-1.4568-1.3876-2.1228C21.2982 1.33 20.628.9208 19.8378.6165 19.074.321 18.2017.1197 16.9244.0645 15.6471.0093 15.236-.005 11.977.0014 8.718.0076 8.31.0215 7.0301.0839m.1402 21.6932c-1.17-.0509-1.8053-.2453-2.2287-.408-.5606-.216-.96-.4771-1.3819-.895-.422-.4178-.6811-.8186-.9-1.378-.1644-.4234-.3624-1.058-.4171-2.228-.0595-1.2645-.072-1.6442-.079-4.848-.007-3.2037.0053-3.583.0607-4.848.05-1.169.2456-1.805.408-2.2282.216-.5613.4762-.96.895-1.3816.4188-.4217.8184-.6814 1.3783-.9003.423-.1651 1.0575-.3614 2.227-.4171 1.2655-.06 1.6447-.072 4.848-.079 3.2033-.007 3.5835.005 4.8495.0608 1.169.0508 1.8053.2445 2.228.408.5608.216.96.4754 1.3816.895.4217.4194.6816.8176.9005 1.3787.1653.4217.3617 1.056.4169 2.2263.0602 1.2655.0739 1.645.0796 4.848.0058 3.203-.0055 3.5834-.061 4.848-.051 1.17-.245 1.8055-.408 2.2294-.216.5604-.4763.96-.8954 1.3814-.419.4215-.8181.6811-1.3783.9-.4224.1649-1.0577.3617-2.2262.4174-1.2656.0595-1.6448.072-4.8493.079-3.2045.007-3.5825-.006-4.848-.0608M16.953 5.5864A1.44 1.44 0 1 0 18.39 4.144a1.44 1.44 0 0 0-1.437 1.4424M5.8385 12.012c.0067 3.4032 2.7706 6.1557 6.173 6.1493 3.4026-.0065 6.157-2.7701 6.1506-6.1733-.0065-3.4032-2.771-6.1565-6.174-6.1498-3.403.0067-6.156 2.771-6.1496 6.1738M8 12.0077a4 4 0 1 1 4.008 3.9921A3.9996 3.9996 0 0 1 8 12.0077"},child:[]}]})(e)}function ne(e){return j({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"},child:[]}]})(e)}function ie(e){return j({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08
11-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z"},child:[]}]})(e)}function ce(e){return j({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z"},child:[]}]})(e)}const be=()=>{const{t:e,language:a,localePath:r}=B(),[s,i]=h.useState("upcoming"),[n,l]=h.useState([]),[o,c]=h.useState({}),[p,u]=h.useState(!0);h.useEffect(()=>{(async()=>{try{const{data:b,error:O}=await C.from("hackathons").select("*").order("start_date",{ascending:!1});if(O)throw O;const L=b||[];l(L);const S={};for(const N of L)if(N.image_url){const{data:x}=await C.storage.from("hackathon-images").createSignedUrl(N.image_url,3600);x!=null&&x.signedUrl&&(S[N.id]=x.signedUrl)}c(S)}catch(b){console.error("Error fetching hackathons:",b),I.error("Failed to load hackathons")}finally{u(!1)}})()},[]);const g=n.filter(d=>d.status==="upcoming"||d.status==="ongoing"),k=n.filter(d=>d.status==="past"),P=s==="upcoming"?g:k;return t.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-chaincademy-purple/5 to-white",children:[t.jsx(R,{title:e("seo.hackathons.title"),description:e("seo.hackathons.description"),canonicalUrl:"/hackathons"}),t.jsx(A,{}),t.jsxs("section",{className:"pt-32 pb-16 container mx-auto px-4 md:px-8",children:[t.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[t.jsx("h1",{className:"heading-xl mb-6",children:t.jsx("span",{className:"gradient-text",children:e("hackathonList.title")})}),t.jsx("p",{className:"text-xl text-gray-600 mb-8",children:e("hackathonList.subtitle")})]}),t.jsxs("div",{className:"flex justify-center gap-4 mb-12",children:[t.jsxs(f,{onClick:()=>i("upcoming"),variant:s==="upcoming"?"default":"outline",size:"lg",className:s==="upcoming"?"btn-primary":"",children:[e("hackathonList.upcomingEvents")," (",g.length,")"]}),t.jsxs(f,{onClick:()=>i("past"),variant:s==="past"?"default":"outline",size:"lg",className:s==="past"?"btn-primary":"",children:[e("hackathonList.pastEvents")," (",k.length,")"]})]}),p?t.jsx("div",{className:"text-center py-16",children:t.jsx("p",{className:"text-xl text-gray-500",children:e("hackathonList.loading")})}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:P.map(d=>t.jsx(le,{hackathon:d,imageUrl:o[d.id],t:e,language:a,localePath:r},d.id))}),P.length===0&&t.jsxs("div",{className:"text-center py-16",children:[t.jsx("p",{className:"text-xl text-gray-500 mb-6",children:e(s==="upcoming"?"hackathonList.noUpcoming":"hackathonList.noPast")}),s==="upcoming"&&t.jsxs("div",{className:"flex justify-center gap-4",children:[t.jsx("a",{href:"https://x.com/thechaincademy",target:"_blank",rel:"noopener noreferrer",className:"p-3 bg-gray-100 rounded-full hover:bg-chaincademy-purple/10 hover:text-chaincademy-purple transition-colors",children:t.jsx(ce,{className:"h-5 w-5"})}),t.jsx("a",{href:"https://www.linkedin.com/company/thechaincademy",target:"_blank",rel:"noopener noreferrer",className:"p-3 bg-gray-100 rounded-full hover:bg-chaincademy-purple/10 hover:text-chaincademy-purple transition-colors",children:t.jsx(ne,{className:"h-5 w-5"})}),t.jsx("a",{href:"https://www.instagram.com/thechaincademy",target:"_blank",rel:"noopener noreferrer",className:"p-3 bg-gray-100 rounded-full hover:bg-chaincademy-purple/10 hover:text-chaincademy-purple transition-colors",children:t.jsx(se,{className:"h-5 w-5"})}),t.jsx("a",{href:"https://www.tiktok.com/@thechaincademy",target:"_blank",rel:"noopener noreferrer",className:"p-3 bg-gray-100 rounded-full hover:bg-chaincademy-purple/10 hover:text-chaincademy-purple transition-colors",children:t.jsx(ie,{className:"h-5 w-5"})})]})]})]})]}),t.jsx("section",{className:"py-16 bg-gradient-to-r from-chaincademy-purple to-chaincademy-purple-dark text-white",children:t.jsxs("div",{className:"container mx-auto px-4 md:px-8 text-center",children:[t.jsx("h2",{className:"text-3xl md:text-4xl font-bold mb-6",children:e("hackathonList.organiseTitle")}),t.jsx("p",{className:"text-xl mb-8 max-w-2xl mx-auto opacity-90",children:e("hackathonList.organiseSubtitle")}),t.jsx(w,{to:r("/contact"),children:t.jsxs(f,{size:"lg",variant:"secondary",className:"bg-white text-chaincademy-purple hover:bg-gray-100",children:[e("hackathonList.contactUs"),t.jsx(D,{className:"ml-2 h-5 w-5"})]})})]})}),t.jsx(K,{exclude:"hackathons"}),t.jsx(F,{})]})},le=({hackathon:e,imageUrl:a,t:r,language:s,localePath:i})=>{const n=(l,o)=>{const c=s==="pt"?"pt-PT":"en-GB",p={year:"numeric",month:"short",day:"numeric"},u=new Date(l).toLocaleDateString(c,p);if(o){const g=new Date(o).toLocaleDateString(c,p);return`${u} - ${g}`}return u};return t.jsxs("div",{className:"bg-white rounded-xl shadow-lg overflow-hidden hover:shadow-xl transition-shadow duration-300 group",children:[t.jsxs("div",{className:"relative h-48 overflow-hidden",children:[t.jsx("img",{src:a||"/placeholder.svg",alt:e.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"}),t.jsx("div",{className:"absolute top-4 right-4",children:t.jsx(_,{variant:e.status==="upcoming"?"default":"secondary",className:e.status==="upcoming"?"bg-green-500":"bg-gray-500",children:e.status==="upcoming"?r("hackathonList.upcoming"):r("hackathonList.pastEvent")})})]}),t.jsxs("div",{className:"p-6 space-y-4",children:[t.jsx("h3",{className:"text-xl font-bold text-gray-900 line-clamp-2 group-hover:text-chaincademy-purple transition-colors",children:e.title}),t.jsx("p",{className:"text-gray-600 text-sm line-clamp-3",children:e.short_description||e.description}),e.tags&&e.tags.length>0&&t.jsx("div",{className:"flex flex-wrap gap-2",children:e.tags.slice(0,3).map((l,o)=>t.jsx(_,{variant:"outline",className:"text-xs",children:l},o))}),t.jsxs("div",{className:"space-y-2 pt-2 border-t border-gray-100",children:[t.jsxs("div",{className:"flex items-center text-sm text-gray-600",children:[t.jsx(W,{className:"w-4 h-4 mr-2 text-chaincademy-purple"}),n(e.start_date,e.end_date)]}),t.jsxs("div",{className:"flex items-center text-sm text-gray-600",children:[t.jsx(Z,{className:"w-4 h-4 mr-2 text-chaincademy-purple"}),e.location]}),e.prize&&t.jsxs("div",{className:"flex items-center text-sm text-gray-600",children:[t.jsx(H,{className:"w-4 h-4 mr-2 text-chaincademy-purple"}),r("hackathonList.prizePool"),": ",e.prize]}),e.current_participants!==void 0&&e.max_participants&&t.jsxs("div",{className:"flex items-center text-sm text-gray-600",children:[t.jsx(G,{className:"w-4 h-4 mr-2 text-chaincademy-purple"}),e.current_participants,"/",e.max_participants," ",r("hackathonList.participants")]})]}),t.jsx(w,{to:i(`/hackathons/${e.slug}`),className:"block",children:t.jsxs(f,{className:"w-full btn-primary",children:[e.status==="upcoming"?r("hackathonList.viewDetails"):r("hackathonList.learnMore"),t.jsx(D,{className:"ml-2 h-4 w-4"})]})})]})]})};export{be 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.