PageSourceSearch

https://devmatchups.vercel.app/_next/static/chunks/app/(dashboard)…/hackathons/page-6a67cce8a6021aac.js

js devmatchups.vercel.app collected 2026-10-03 06:42:52 UTC 17,442 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="527a3227-d339-4328-91ca-068594898fa6",e._sentryDebugIdIdentifier="sentry-dbid-527a3227-d339-4328-91ca-068594898fa6")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3308],{29437:function(e,t,a){Promise.resolve().then(a.bind(a,97744))},97744:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return y}});var r=a(57437),o=a(2265),l=a(33145),i={src:"/_next/static/media/unstop.22a15bdb.png",height:199,width:500,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAADCAMAAACZFr56AAAAGFBMVEUaR34cSYEbSH8bSYEbSYAcSIAaSX8cRHyuhiDAAAAACHRSTlMblIKeN+5yLSape+IAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAeSURBVHicBcGHAQAADIMgTdf/HxfIyAFU1Cg7BXQ/ApkAMpqvIyMAAAAASUVORK5CYII=",blurWidth:8,blurHeight:3},n={src:"/_next/static/media/Devfolio.0c14f88d.svg",height:129,width:619,blurWidth:0,blurHeight:0},s={src:"/_next/static/media/devpost.32e6ec06.svg",height:122,width:626,blurWidth:0,blurHeight:0},c=a(83464),d=a(45202),u=a(49089),f=a(9241),p=a(13337),m=a(65934),v=a(99376),h=e=>{let{id:t,title:a,url:o,logo:c,platform:h,mode:g,location:x,status:y,onFavoriteChange:w}=e,{toggleExternalFavorite:b,isExternalFavorited:j}=(0,p.r)(),{data:A,status:k}=(0,m.kP)(),O=(0,v.useRouter)(),N=async e=>{if(e.preventDefault(),e.stopPropagation(),"loading"!==k){if(!A){O.push("/login");return}await b({id:t,title:a,url:o,logo:c,platform:h,mode:g,location:x,status:y}),w&&w()}},_="unstop"===h&&"https://unstop.com/".concat(o)||"devpost"===h&&"".concat(o)||"devfolio"===h&&"https://".concat(o)||"",E="unstop"===h||"devpost"===h?c.startsWith("http")?c:"https:"+c:c;return(0,r.jsxs)(f.E.div,{className:"group min-w-[20vw] min-h-[20vh] px-5 py-4 flex flex-col justify-between items-start flex-wrap rounded-lg border border-gray-500 dark:border-gray-800 dark:backdrop-blur-xl transition-all ease-in-out duration-500 hover:border-accent hover:shadow-xl hover:scale-110 hover:bg-gray-200 dark:hover:bg-gray-700 relative",whileHover:{scale:1.1,boxShadow:"0px 6px 15px rgba(0, 0, 0, 0.3)"},initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.5,ease:"easeOut"},children:[(0,r.jsx)("button",{onClick:N,className:"absolute top-3 right-3 p-1 transition-transform z-10 ".concat(A?"hover:scale-110":"hover:scale-105 opacity-70"),title:A?"":"Login to favorite hackathons",children:A&&j(t,h)?(0,r.jsx)(u.QJe,{className:"w-5 h-5 text-yellow-500"}):(0,r.jsx)(u.jJN,{className:"w-5 h-5 ".concat(A?"":"text-gray-400")})}),(0,r.jsxs)(f.E.a,{href:_,target:"_blank",className:"w-full h-full flex flex-col justify-between",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.5,delay:.2},children:[(0,r.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,r.jsx)("div",{className:"relative w-10 h-10",children:(0,r.jsx)(l.default,{src:null!==E?E:"unstop"===h?i:"devpost"===h?s:"devfolio"===h?n:"",alt:h,layout:"fill",objectFit:"contain",className:"rounded-full"})}),(0,r.jsx)("h3",{className:"text-lg font-semibold pr-8",children:a})]}),(g||x)&&(0,r.jsxs)(f.E.div,{className:"flex flex-wrap gap-2 mt-2 text-sm text-gray-600 dark:text-gray-400",initial:{opacity:0}
1,animate:{opacity:1},transition:{duration:.3,delay:.3},children:[g&&(0,r.jsx)("span",{className:"px-2 py-1 rounded-full bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200",children:g}),y&&(0,r.jsx)("span",{className:"px-2 py-1 rounded-full ".concat("live"===y.toLowerCase()||"open"===y.toLowerCase()?"bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200":"bg-red-100 dark:bg-red-900 text-red-800 dark:text-red-200"),children:y}),x&&"Online"!==g&&(0,r.jsxs)("span",{className:"flex items-center gap-1 w-full mt-1",children:[(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M5.05 4.05a7 7 0 119.9 9.9L10 18.9l-4.95-4.95a7 7 0 010-9.9zM10 11a2 2 0 100-4 2 2 0 000 4z",clipRule:"evenodd"})}),x]})]}),(0,r.jsx)(f.E.div,{className:"opacity-0 group-hover:opacity-100 transition-opacity duration-300",initial:{opacity:0},animate:{opacity:1},transition:{duration:.3,delay:.4},children:(0,r.jsx)(d.$OI,{size:20})})]})]})},g=a(93022),x=a(94508),y=()=>{var e;let[t,a]=(0,o.useState)(!1),[d,y]=(0,o.useState)([]),[w,b]=(0,o.useState)([]),[j,A]=(0,o.useState)([]),[k,O]=(0,o.useState)("Unstop"),{favorites:N,loadExternalFavorites:_,loading:E}=(0,p.r)(),{data:C,status:F}=(0,m.kP)(),I=(0,v.useRouter)(),S=[{name:"Unstop",logo:i},{name:"Devpost",logo:s},{name:"Devfolio",logo:n}];(0,o.useEffect)(()=>{(async()=>{a(!0);try{let[e,t,a]=await Promise.all([c.Z.get("/api/unstopHackathon"),c.Z.get("/api/devpostHackathon"),c.Z.get("/api/devfolioHackathon")]),r=e.data.hackathon.map(e=>({...e,mode:"VIRTUAL"===e.event_type?"Online":"OFFLINE"===e.event_type?"Offline":"Hybrid"})),o=t.data.hackathon.hackathons.map(e=>{var t;return{...e,mode:(null===(t=e.displayed_location.location)||void 0===t?void 0:t.includes("Online"))?"Online":"Offline"}}),l=a.data.hackathon.hits.hits.map(e=>({...e,_source:{...e._source,mode:"both"===e._source.apply_mode?"Hybrid":e._source.is_online?"Online":"Offline",location:e._source.location||e._source.city||null}}));b(o),y(r),A(l)}catch(e){console.error("Error fetching data:",e)}finally{a(!1)}})()},[]);let P=(0,o.useCallback)(()=>{var e;(null==C?void 0:null===(e=C.user)||void 0===e?void 0:e.id)&&_()},[null==C?void 0:null===(e=C.user)||void 0===e?void 0:e.id,_]);(0,o.useEffect)(()=>{P()},[P]),(0,o.useEffect)(()=>{"Favorites"===k&&P()},[k,P]);let D=(0,o.useCallback)(()=>{"Favorites"===k&&_()},[k,_]),H=e=>{if("Favorites"===e){if("loading"===F)return;if(!C){I.push("/login");return}}O(e)};return(0,r.jsxs)("div",{className:"min-h-screen w-full text-black dark:bg-background bg-background dark:text-white mb-20 relative",children:[(0,r.jsxs)(f.E.button,{onClick:()=>{H("Favorites")},className:"fixed top-20 right-3 md:right-6 z-20 flex items-center transition-all duration-300 ".concat("Favorites"===k?"bg-gradient-to-r from-yellow-400 to-yellow-500 text-black shadow-lg scale-105":"bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-300 hover:bg-yellow-100 dark:hover:bg-yellow-900/30 hover:text-yellow-600 dark:hover:text-yellow-400"," ","p-2 md:px-4 md:py-2 md:space-x-2 rounded-full"),whileHover:{scale:"Favorites"===k?1.05:1.02},whileTap:{scale:.98},title:"Favorites",children:[(0,r.jsx)(u.QJe,{className:"w-4 h-4 ".concat("Favorites"===k?"text-black":"text-yellow-500")}),(0,r.jsx)("span",{className:"text-sm font-medium hidden md:inline",children:"Favorites"})]}),(0,r.jsxs)("div",{className:"w-full mt-16 flex flex-col justify-start items-start gap-5",children:[(0,r.jsx)("div",{className:" w-full flex justify-center items-center md:justify-start ",children:(0,r.jsx)("div",{className:"flex justify-center items-center md:items-start space-x-4 mx-auto w-full ",children:S.map(e=>(0,r.jsx)(f.E.button,{onClick:()=>H(e.name),className:(0,x.cn)("flex items-center  space-x-2 px-6 py-3 rounded-lg transition-all duration-300 bg-white",k===e.name?" outline outline-offset-4 outline-primary dark:outline-offset-4 dark:outline-primary":""),whileHover:{scale:1.05},whileTap:{scale:.95},children:(0,r.jsx)(l.default,{src:e.logo,alt:e.name,className:" w-auto h-[15px] md:h-[25px] "})},e.name))})}),(0,r.jsx)("hr",{className:"w-full text-text dark:text-text h-4 mt-5 opacity-50 "}),t&&(0,r.jsxs)("div",{className:"w-full grid grid-cols-2 lg:grid-cols-3 gap-2 flex-wrap px-10 ",children:[(0,r.jsx)(g.O,{className:" min-w-[20vw] min-h-[20vh] px-5 py-4 rounded-lg"}),(0,r.jsx)(g.O,{className:" min-w-[20vw] min-h-[20vh] px-5 py-4 rounded-lg"}),(0,r.jsx)(g.O,{className:" min-w-[20vw] min-h-[20vh] px-5 py-4 rounded-lg"}),(0,r.jsx)(g.O,{className:" min-w-[20vw] min-h-[20vh] px-5 py-4 rounded-lg"}),(0,r.jsx)(g.O,{className:" min-w-[20vw] min-h-[20vh] px-5 py-4 rounded-lg"}),(0,r.jsx)(g.O,{className:" min-w-[20vw] min-h-[20vh] px-5 py-4 rounded-lg"}),(0,r.jsx)(g.O,{className:" min-w-[20vw] min-h-[20vh] px-5 py-4 rounded-lg"}),(0,r.jsx)(g.O,{className:" min-w-[20vw] min-h-[20vh] px-5 py-4 rounded-lg"}),(0,r.jsx)(g.O,{className:" min-w-[20vw] min-h-[20vh] px-5 py-4 rounded-lg"})]}),"Unstop"===k&&(0,r.jsx)("div",{className:"w-full min-h-[50vh] grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 flex-wrap px-10 ",children:d&&d.map&&d.map(e=>(0,r.jsx)(h,{id:e.id.toString(),title:e.title,url:e.public_url,logo:e.logoUrl2,platform:"unstop",mode:"offline"===e.region?"Offline":"online"===e.region?"Online":"Hybrid",location:e.organisation.name,status:e.status},e.id))}),"Devpost"===k&&(0,r.jsx)("div",{className:"w-full min-h-[50vh] grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 flex-wrap px-10 ",children:w.map(e=>{var t;return(0,r.jsx)(h,{id:e.id.toString(),title:e.title,url:e.url,logo:e.thumbnail_url,platform:"devpost",mode:e.mode,location:(null===(t=e.displayed_location.location)||void 0===t?void 0:t.includes("Online"))?null:e.displayed_location.location,status:"open"===e.open_state?"LIVE":e.open_state},e.id)})}),"Devfolio"===k&&(0,r.jsx)("div",{className:"w-full min-h-[50vh] grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 flex-wrap px-10 ",children:j.map(e=>(0,r.jsx)(h,{id:e._source.name,title:e._source.name,url:"".concat(e._source.slug,".devfolio.co"),logo:e._source.hackathon_setting.logo,platform:"devfolio",mode:e._source.is_online?"Online":"Offline",location:e._source.location,status:"publish"===e._source.status?"LIVE":e._source.status},e._source.name))}),"Favorites"===k&&(0,r.jsx)("div",{className:"w-full min-h-[50vh] grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 px-10 ",children:0===N.length?(0,r.jsxs)("div",{className:"col-span-full text-center py-10",children:[(0,r.jsx)(u.QJe,{className:"w-16 h-16 text-gray-400 mx-auto mb-4"}),(0,r.jsx)("p",{className:"text-lg text-gray-500",children:"No favorite hackathons yet"}),(0,r.jsx)("p",{className:"text-sm text-gray-400",children:"Start favoriting hackathons by clicking the star icon!"})]}):N.map(e=>(0,r.jsx)(h,{id:e.externalId,title:e.title,url:e.url,logo:e.logo,platform:e.platform,mode:e.mode,location:e.location,status:e.status,onFavoriteChange:D},"".concat(e.platform,"-").concat(e.externalId)))})]})]})}},13337:function(e,t,a){"use strict";a.d(t,{r:function(){return n}});var r=a(2265),o=a(33881),l=a(22801),i=a(7261);let n=()=>{let e=(0,o.TL)(),t=(0,o.CG)(l.Tc),a=(0,o.CG)(l.gs),n=(0,r.useCallback)(async t=>{try{await e((0,l.Hh)(t)).unwrap(),i.Am.success("Added to favorites!")}catch(e){i.Am.error("Failed to add to favorites"),console.error(e)}},[e]),s=(0,r.useCallback)(async(t,a)=>
1{try{await e((0,l.EY)({externalId:t,platform:a})).unwrap(),i.Am.success("Removed from favorites!")}catch(e){i.Am.error("Failed to remove from favorites"),console.error(e)}},[e]),c=(0,r.useCallback)(async t=>{try{await e((0,l.D3)(t)).unwrap()}catch(e){i.Am.error("Failed to update favorites"),console.error(e)}},[e]),d=(0,r.useCallback)(async()=>{try{await e((0,l.s)()).unwrap()}catch(e){i.Am.error("Failed to load favorites"),console.error(e)}},[e]),u=(0,r.useCallback)((e,t)=>{let r="".concat(t,"-").concat(e);return a.includes(r)},[a]);return{favoriteIds:a,favorites:t.favorites,loading:t.loading,error:t.error,addExternalFavorite:n,removeExternalFavorite:s,toggleExternalFavorite:c,isExternalFavorited:u,loadExternalFavorites:d}}},93022:function(e,t,a){"use strict";a.d(t,{O:function(){return l}});var r=a(57437),o=a(94508);function l(e){let{className:t,...a}=e;return(0,r.jsx)("div",{className:(0,o.cn)("animate-pulse rounded-md bg-slate-100 dark:bg-slate-800",t),...a})}},22801:function(e,t,a){"use strict";a.d(t,{D3:function(){return s},EY:function(){return n},Hh:function(){return i},Tc:function(){return f},gs:function(){return p},s:function(){return l}});var r=a(1455),o=a(83464);let l=(0,r.hg)("favorites/loadExternalFavorites",async(e,t)=>{let{rejectWithValue:a,getState:r}=t;if(r().favorites.loading)return a("Already loading favorites");try{let e=(await o.Z.get("/api/external-favorites")).data,t=e.map(e=>"".concat(e.platform,"-").concat(e.externalId));return{favorites:e,favoriteKeys:t}}catch(e){return console.error("Failed to load favorites",e),a("Failed to load favorites")}}),i=(0,r.hg)("favorites/addExternalFavorite",async(e,t)=>{let{rejectWithValue:a,dispatch:r}=t;try{return await o.Z.post("/api/external-favorites",{externalId:e.id,title:e.title,url:e.url,logo:e.logo,platform:e.platform,mode:e.mode,location:e.location,status:e.status}),"".concat(e.platform,"-").concat(e.id)}catch(e){return console.error("Failed to add to favorites",e),a("Failed to add to favorites")}}),n=(0,r.hg)("favorites/removeExternalFavorite",async(e,t)=>{let{externalId:a,platform:r}=e,{rejectWithValue:l}=t;try{return await o.Z.post("/api/external-favorites",{externalId:a,platform:r}),"".concat(r,"-").concat(a)}catch(e){return console.error("Failed to remove from favorites",e),l("Failed to remove from favorites")}}),s=(0,r.hg)("favorites/toggleExternalFavorite",async(e,t)=>{let{getState:a,dispatch:r}=t;a().favorites.favoriteIds.includes("".concat(e.platform,"-").concat(e.id))?await r(n({externalId:e.id,platform:e.platform})):await r(i(e))}),c=(0,r.oM)({name:"favorites",initialState:{favoriteIds:[],favorites:[],loading:!1,error:null},reducers:{clearFavorites:e=>{e.favoriteIds=[],e.favorites=[],e.error=null},setError:(e,t)=>{e.error=t.payload}},extraReducers:e=>{e.addCase(l.pending,e=>{e.loading=!0,e.error=null}).addCase(l.fulfilled,(e,t)=>{e.loading=!1,e.favoriteIds=t.payload.favoriteKeys,e.favorites=t.payload.favorites,e.error=null}).addCase(l.rejected,(e,t)=>{e.loading=!1,e.error=t.payload}).addCase(i.fulfilled,(e,t)=>{e.favoriteIds.includes(t.payload)||e.favoriteIds.push(t.payload),e.error=null}).addCase(i.rejected,(e,t)=>{e.error=t.payload}).addCase(n.fulfilled,(e,t)=>{e.favoriteIds=e.favoriteIds.filter(e=>e!==t.payload),e.error=null}).addCase(n.rejected,(e,t)=>{e.error=t.payload})}}),{clearFavorites:d,setError:u}=c.actions,f=e=>e.favorites,p=e=>e.favorites.favoriteIds;t.ZP=c.reducer},33881:function(e,t,a){"use strict";a.d(t,{CG:function(){return l},TL:function(){return o}});var r=a(68575);let o=r.I0.withTypes(),l=r.v9.withTypes();r.oR.withTypes()},94508:function(e,t,a){"use strict";a.d(t,{cn:function(){return l}});var r=a(61994),o=a(53335);function l(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return(0,o.m6)((0,r.W)(t))}},99376:function(e,t,a){"use strict";var r=a(35475);a.o(r,"usePathname")&&a.d(t,{usePathname:function(){return r.usePathname}}),a.o(r,"useRouter")&&a.d(t,{useRouter:function(){return r.useRouter}}),a.o(r,"useSearchParams")&&a.d(t,{useSearchParams:function(){return r.useSearchParams}})},46231:function(e,t,a){"use strict";a.d(t,{w_:function(){return d}});var r=a(2265),o={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},l=r.createContext&&r.createContext(o),i=["attr","size","title"];function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(this,arguments)}function s(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),a.push.apply(a,r)}return a}function c(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};
1t%2?s(Object(a),!0).forEach(function(t){var r,o;r=t,o=a[t],(r=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var r=a.call(e,t||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(r))in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):s(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}function d(e){return t=>r.createElement(u,n({attr:c({},e.attr)},t),function e(t){return t&&t.map((t,a)=>r.createElement(t.tag,c({key:a},t.attr),e(t.child)))}(e.child))}function u(e){var t=t=>{var a,{attr:o,size:l,title:s}=e,d=function(e,t){if(null==e)return{};var a,r,o=function(e,t){if(null==e)return{};var a={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;a[r]=e[r]}return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)a=l[r],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}(e,i),u=l||t.size||"1em";return t.className&&(a=t.className),e.className&&(a=(a?a+" ":"")+e.className),r.createElement("svg",n({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,o,d,{className:a,style:c(c({color:e.color||t.color},t.style),e.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),s&&r.createElement("title",null,s),e.children)};return void 0!==l?r.createElement(l.Consumer,null,e=>t(e)):t(o)}}},function(e){e.O(0,[7699,9212,9908,3335,5934,3145,3464,8575,7261,1455,9241,2971,82,1744],function(){return e(e.s=29437)}),_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.