PageSourceSearch

https://metaschool.so/_next/static/chunks/pages/core-marathon/leaderboard-7581b028cb4bb157.js

js metaschool.so collected 2026-09-24 17:59:03 UTC 16,851 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7418],{52129:function(e,t,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/core-marathon/leaderboard",function(){return l(92268)}])},23149:function(e,t,l){"use strict";var a=l(85893),s=l(67294);let r=e=>{let{onIntersect:t}=e,l=(0,s.useRef)(null);return(0,s.useEffect)(()=>{let e=new IntersectionObserver(e=>{e[0].isIntersecting&&t()},{threshold:.7});return l.current&&e.observe(l.current),()=>{l.current&&e.unobserve(l.current)}},[t]),(0,a.jsx)("div",{ref:l,className:"leaderboard-loader"})};t.Z=r},67210:function(e,t,l){"use strict";var a=l(85893);let s=()=>(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"float-left w-full flex",children:(0,a.jsxs)("div",{className:"float-left w-full flex flex-col gap-5",children:[(0,a.jsxs)("div",{className:" bg-light-gray float-left w-full flex items-center px-5 py-5 rounded-lg tablet:flex-col tablet:justify-start tablet:items-start ",children:[(0,a.jsxs)("div",{className:"animate-pulse w-6/12 float-left rounded-lg flex items-center tablet:w-full",children:[(0,a.jsx)("div",{className:"bg-gray-300 w-20 h-4 rounded-lg float-left tablet:w-10"}),(0,a.jsx)("div",{className:"bg-gray-300 w-10 h-10 rounded-full ml-7 float-left tablet:ml-5"}),(0,a.jsx)("div",{className:"bg-gray-300 w-40 h-4 rounded-lg ml-3 float-left"})]}),(0,a.jsxs)("div",{className:"animate-pulse w-6/12 float-left grid grid-cols-3 rounded-lg items-center tablet:w-full tablet:mt-8",children:[(0,a.jsx)("div",{className:"bg-gray-300 w-40 desktop:w-32 h-4 rounded-lg float-left tablet:w-10/12 "}),(0,a.jsx)("div",{className:"bg-gray-300 w-40 desktop:w-32 h-4 rounded-lg ml-7 float-left tablet:w-10/12 tablet:ml-0 "}),(0,a.jsx)("div",{className:"bg-gray-300 w-40 desktop:w-32 h-4 rounded-lg ml-7 float-left tablet:w-10/12 tablet:ml-0 "})]})]}),(0,a.jsxs)("div",{className:" bg-light-gray float-left w-full flex items-center px-5 py-5 rounded-lg tablet:flex-col tablet:justify-start tablet:items-start ",children:[(0,a.jsxs)("div",{className:"animate-pulse w-6/12 float-left rounded-lg flex items-center tablet:w-full",children:[(0,a.jsx)("div",{className:"bg-gray-300 w-20 h-4 rounded-lg float-left tablet:w-10"}),(0,a.jsx)("div",{className:"bg-gray-300 w-10 h-10 rounded-full ml-7 float-left tablet:ml-5"}),(0,a.jsx)("div",{className:"bg-gray-300 w-40 h-4 rounded-lg ml-3 float-left"})]}),(0,a.jsxs)("div",{className:"animate-pulse w-6/12 float-left grid grid-cols-3 rounded-lg items-center tablet:w-full tablet:mt-8",children:[(0,a.jsx)("div",{className:"bg-gray-300 w-40 desktop:w-32 h-4 rounded-lg float-left tablet:w-10/12 "}),(0,a.jsx)("div",{className:"bg-gray-300 w-40 desktop:w-32 h-4 rounded-lg ml-7 float-left tablet:w-10/12 tablet:ml-0 "}),(0,a.jsx)("div",{className:"bg-gray-300 w-40 desktop:w-32 h-4 rounded-lg ml-7 float-left tablet:w-10/12 tablet:ml-0 "})]})]}),(0,a.jsxs)("div",{className:" bg-light-gray float-left w-full flex items-center px-5 py-5 rounded-lg tablet:flex-col tablet:justify-start tablet:items-start ",children:[(0,a.jsxs)("div",{className:"animate-pulse w-6/12 float-left rounded-lg flex items-center tablet:w-full",children:[(0,a.jsx)("div",{className:"bg-gray-300 w-20 h-4 rounded-lg float-left tablet:w-10"}),(0,a.jsx)("div",{className:"bg-gray-300 w-10 h-10 rounded-full ml-7 float-left tablet:ml-5"}),(0,a.jsx)("div",{className:"bg-gray-300 w-40 h-4 rounded-lg ml-3 float-left"})]}),(0,a.jsxs)("div",{className:"animate-pulse w-6/12 float-left grid grid-cols-3 rounded-lg items-center tablet:w-full tablet:mt-8",children:[(0,a.jsx)("div",{className:"bg-gray-300 w-40 desktop:w-32 h-4 rounded-lg float-left tablet:w-10/12 "}),(0,a.jsx)("div",{className:"bg-gray-300 w-40 desktop:w-32 h-4 rounded-lg ml-7 float-left tablet:w-10/12 tablet:ml-0 "}),(0,a.jsx)("div",{className:"bg-gray-300 w-40 desktop:w-32 h-4 rounded-lg ml-7 float-left tablet:w-10/12 tablet:ml-0 "})]})]}),(0,a.jsxs)("div",{className:" bg-light-gray float-left w-full flex items-center px-5 py-5 rounded-lg tablet:flex-col tablet:justify-start tablet:items-start ",children:[(0,a.jsxs)("div",{className:"animate-pulse w-6/12 float-left rounded-lg flex items-center tablet:w-full",children:[(0,a.jsx)("div",{className:"bg-gray-300 w-20 h-4 rounded-lg float-left tablet:w-10"}),(0,a.jsx)("div",{className:"bg-gray-300 w-10 h-10 rounded-full ml-7 float-left tablet:ml-5"}),(0,a.jsx)("div",{className:"bg-gray-300 w-40 h-4 rounded-lg ml-3 float-left"})]}),(0,a.jsxs)("div",{className:"animate-pulse w-6/12 float-left grid grid-cols-3 rounded-lg items-center tablet:w-full tablet:mt-8",children:[(0,a.jsx)("div",{className:"bg-gray-300 w-40 desktop:w-32 h-4 rounded-lg float-left tablet:w-10/12 "}),(0,a.jsx)("div",{className:"bg-gray-300 w-40 desktop:w-32 h-4 rounded-lg ml-7 float-left tablet:w-10/12 tablet:ml-0 "}),(0,a.jsx)("div",{className:"bg-gray-300 w-40 desktop:w-32 h-4 rounded-lg ml-7 float-left tablet:w-10/12 tablet:ml-0 "})]})]}),(0,a.jsxs)("div",{className:" bg-light-gray float-left w-full flex items-center px-5 py-5 rounded-lg tablet:flex-col tablet:justify-start tablet:items-start ",children:[(0,a.jsxs)("div",{className:"animate-pulse w-6/12 float-left rounded-lg flex items-center tablet:w-full",children:[(0,a.jsx)("div",{className:"bg-gray-300 w-20 h-4 rounded-lg float-left tablet:w-10"}),(0,a.jsx)("div",{className:"bg-gray-300 w-10 h-10 rounded-full ml-7 float-left tablet:ml-5"}),(0,a.jsx)("div",{className:"bg-gray-300 w-40 h-4 rounded-lg ml-3 float-left"})]}),(0,a.jsxs)("div",{className:"animate-pulse w-6/12 float-left grid grid-cols-3 rounded-lg items-center tablet:w-full tablet:mt-8",children:[(0,a.jsx)("div",{className:"bg-gray-300 w-40 desktop:w-32 h-4 rounded-lg float-left tablet:w-10/12 "}),(0,a.jsx)("div",{className:"bg-gray-300 w-40 desktop:w-32 h-4 rounded-lg ml-7 float-left tablet:w-10/12 tablet:ml-0 "}),(0,a.jsx)("div",{className:"bg-gray-300 w-40 desktop:w-32 h-4 rounded-lg ml-7 float-left tablet:w-10/12 tablet:ml-0 "})]})]}),(0,a.jsxs)("div",{className:" bg-light-gray float-left w-full flex items-center px-5 py-5 rounded-lg tablet:flex-col tablet:justify-start tablet:items-start ",children:[(0,a.jsxs)("div",{className:"animate-pulse w-6/12 float-left rounded-lg flex items-center tablet:w-full",children:[(0,a.jsx)("div",{className:"bg-gray-300 w-20 h-4 rounded-lg float-left tablet:w-10"}),(0,a.jsx)("div",{className:"bg-gray-300 w-10 h-10 rounded-full ml-7 float-left tablet:ml-5"}),(0,a.jsx)("div",{className:"bg-gray-300 w-40 h-4 rounded-lg ml-3 float-left"})]}),(0,a.jsxs)("div",{className:"animate-pulse w-6/12 float-left grid grid-cols-3 rounded-lg items-center tablet:w-full tablet:mt-8",children:[(0,a.jsx)("div",{className:"bg-gray-300 w-40 desktop:w-32 h-4 rounded-lg float-left tablet:w-10/12 "}),(0,a.jsx)("div",{className:"bg-gray-300 w-40 desktop:w-32 h-4 rounded-lg ml-7 float-left tablet:w-10/12 tablet:ml-0 "}),(0,a.jsx)("div",{className:"bg-gray-300 w-40 desktop:w-32 h-4 rounded-lg ml-7 float-left tablet:w-10/12 tablet:ml-0 "})]})]})]})})});t.Z=s},19768:function(e,t,l){"use strict";var a=l(85893);l(67294);var s=l(74372),r=l(90304);let d=e=>{let{children:t}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"float-left w-full bg-white border-b border-gray-200 tablet:h-[54px]",children:(0,a.jsx)("div",{className:"",children:(0,a.jsx)(s.default,{})})}),(0,a.jsx)("div",{children:t}),(0,a.jsx)(r.Z,{})]})};t.Z=d},92268:function(e,t,l){"use strict";l.r(t);var a=l(85893),s=l(67294),r=l(37072),d=l(25675),i=l.n(d),n=l(19768),c=l(76310),f=l(96843),o=l(87397),x=l(67210),m=l(23149);let b=()=>{var e,t,l;
1let[d,n]=(0,s.useState)([]),[b,u]=(0,s.useState)(),[g,w]=(0,s.useState)({current_page:1,total_pages:1,total_items:0,items_per_page:15}),h=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15;try{let l=await r.default.get("/api/leaderboard/coredao",{params:{page:e,pageSize:t}});n(e=>[...e,...l.data.leaderboard]),w(e=>({...e,current_page:g.current_page+1}))}catch(e){console.error("Error fetching leaderboard data:",e)}};(0,s.useEffect)(()=>{h(g.current_page,g.items_per_page)},[]),(0,s.useEffect)(()=>{let e=async()=>{try{var e;let t=await r.default.get("/api/user-rank/coredao");u(null===(e=t.data)||void 0===e?void 0:e.user)}catch(e){console.error("Error fetching leaderboard data:",e)}};e()},[]);let j=e=>{switch(e){case 1:return"bg-[#FEF851] border-[#FAB600]";case 2:return"bg-[#E8EBED] border-[#9DA8B0]";case 3:return"bg-[#EEBEA6] border-[#D97D5E]";default:return"bg-[#FCF2EE] border-[#F4F5F6]"}},p=e=>{switch(e){case 1:return"bg-[#FFFEEB]";case 2:return"bg-[#F4F5F6]";case 3:return"bg-[#FCF2EE]";default:return""}},v=()=>{h(g.current_page,g.items_per_page)};return(0,a.jsxs)("div",{className:" float-left w-full px-20 py-8 tablet:px-4",children:[(0,a.jsx)("h1",{className:" text-h3_32 text-n100 font-semibold mb-8 tablet:text-p_24 tablet:mb-4",children:"Core Marathon"}),!!b&&(0,a.jsxs)("div",{className:" bg-n900 border border-n900 rounded-lg float-left w-full py-4 flex justify-between mb-16 items-center tablet:flex-col tablet:justify-start tablet:items-start tablet:p-4",children:[(0,a.jsxs)("div",{className:" w-6/12 flex items-center tablet:mb-4 tablet:w-full",children:[(0,a.jsx)("div",{className:" w-2/12 flex items-center justify-center tablet:w-auto",children:(0,a.jsxs)("span",{className:" tablet:w-10 tablet:px-0 tablet:mr-4 w-16 text-center text-p_14 text-n100 border bg-n900 border-n900 px-4 rounded-full py-1",children:["#",null==b?void 0:b.rank]})}),(0,a.jsx)("div",{className:" flex w-10/12 items-center tablet:w-full",children:(0,a.jsxs)("div",{className:" flex items-center",children:[(0,a.jsx)(i(),{src:null!==(e=null==b?void 0:b.cover_image)&&void 0!==e?e:o.Z,className:"rounded-full mr-4 w-10 h-10 object-cover",width:40,height:40,alt:""}),(0,a.jsxs)("span",{className:" text-n100 font-semibold",children:[null==b?void 0:b.username," (You)"]})]})})]}),(0,a.jsxs)("div",{className:" w-6/12 grid grid-cols-3 items-center justify-start tablet:w-full",children:[(0,a.jsxs)("div",{className:" float-left flex flex-col justify-start items-start",children:[(0,a.jsx)("span",{className:" float-left w-full text-p_14 text-n200 tablet:text-n300 mb-1 tablet:text-p_12 hidden",children:"Total XP Earned"}),(0,a.jsxs)("div",{className:" flex text-p_16 text-n200 font-semibold tablet:text-p_16",children:[null==b?void 0:b.xp_earned," XP"]})]}),(0,a.jsxs)("div",{className:" float-left flex flex-col justify-start items-start",children:[(0,a.jsx)("span",{className:" float-left w-full text-p_14 text-n200 tablet:text-n300 mb-1 tablet:text-p_12 hidden tablet:block",children:"Completed"}),(0,a.jsxs)("div",{className:" flex text-p_16 text-n200 font-semibold tablet:text-p_16",children:[(0,a.jsx)(i(),{className:" mr-1 opacity-80",width:18,src:f.Z,alt:""}),null==b?void 0:b.tasks_completed]})]}),(0,a.jsxs)("div",{className:" float-left flex flex-col justify-start items-start",children:[(0,a.jsx)("span",{className:" float-left w-full text-p_14 text-n200 tablet:text-n300 mb-1 tablet:text-p_12 hidden tablet:block",children:"Streaks"}),(0,a.jsxs)("div",{className:" flex text-p_16 text-n200 font-semibold tablet:text-p_16",children:[(0,a.jsx)(i(),{className:" mr-1 opacity-80",width:20,src:c.Z,alt:""}),"X",null==b?void 0:b.current_streak]})]})]})]}),(0,a.jsxs)("div",{className:" float-left w-full",children:[(0,a.jsxs)("div",{className:" flex items-center justify-center mb-4 float-left w-full tablet:hidden",children:[(0,a.jsx)("div",{className:" w-1/12 text-center text-n200",children:"#"}),(0,a.jsx)("div",{className:" w-5/12 text-n200",children:"Top Builders"}),(0,a.jsx)("div",{className:" w-2/12 text-n200",children:"XP Earned"}),(0,a.jsx)("div",{className:" w-2/12 text-n200",children:"Task Completed"}),(0,a.jsx)("div",{className:" w-2/12 text-n200",children:"Current Streak"})]}),d.length?(0,a.jsxs)("div",{className:" float-left w-full flex flex-col gap-y-2",children:[d.map((e,s)=>s<=2?(0,a.jsxs)("div",{className:"".concat(p(s+1)," rounded-lg  float-left w-full py-4 flex justify-between items-center tablet:flex-col tablet:justify-start tablet:items-start tablet:p-4"),children:[(0,a.jsxs)("div",{className:" w-6/12 flex items-center tablet:mb-4 tablet:w-full",children:[(0,a.jsx)("div",{className:" w-2/12 flex items-center justify-center tablet:w-auto",children:(0,a.jsx)("span",{className:"tablet:w-10 tablet:px-0 tablet:mr-4 text-p_14 text-n100 border px-4 roun
1ded-full py-1 w-16 text-center ".concat(j(s+1)),children:s+1})}),(0,a.jsx)("div",{className:" flex w-10/12 items-center tablet:w-full",children:(0,a.jsxs)("div",{className:" flex items-center",children:[(0,a.jsx)(i(),{src:null!==(t=null==e?void 0:e.cover_image)&&void 0!==t?t:o.Z,className:"rounded-full mr-4",width:40,height:40,alt:""}),(0,a.jsx)("span",{className:" text-n100 font-semibold",children:null==e?void 0:e.username})]})})]}),(0,a.jsxs)("div",{className:" w-6/12 grid grid-cols-3 items-center justify-start tablet:w-full",children:[(0,a.jsxs)("div",{className:" float-left flex flex-col justify-start items-start",children:[(0,a.jsx)("span",{className:" float-left w-full text-p_14 text-n200 tablet:text-n300 mb-1 tablet:text-p_12 hidden tablet:block",children:"Total XP Earned"}),(0,a.jsxs)("div",{className:" flex text-p_16 text-n200 font-semibold tablet:text-p_16",children:[null==e?void 0:e.xp_earned," XP"]})]}),(0,a.jsxs)("div",{className:" float-left flex flex-col justify-start items-start",children:[(0,a.jsx)("span",{className:" float-left w-full text-p_14 text-n200 tablet:text-n300 mb-1 tablet:text-p_12 hidden tablet:block",children:"Completed"}),(0,a.jsxs)("div",{className:" flex text-p_16 text-n200 font-semibold tablet:text-p_16",children:[(0,a.jsx)(i(),{className:" mr-1 opacity-80",width:18,src:f.Z,alt:""}),null==e?void 0:e.tasks_completed]})]}),(0,a.jsxs)("div",{className:" float-left flex flex-col justify-start items-start",children:[(0,a.jsx)("span",{className:" float-left w-full text-p_14 text-n200 tablet:text-n300 mb-1 tablet:text-p_12 hidden tablet:block",children:"Streaks"}),(0,a.jsxs)("div",{className:" flex text-p_16 text-n200 font-semibold tablet:text-p_16",children:[(0,a.jsx)(i(),{className:" mr-1 opacity-80",width:20,src:c.Z,alt:""}),"X",null==e?void 0:e.current_streak]})]})]})]},s):(0,a.jsxs)("div",{className:" border-b border-n900 float-left w-full py-4 flex justify-between items-center tablet:flex-col tablet:justify-start tablet:items-start tablet:p-4",children:[(0,a.jsxs)("div",{className:" w-6/12 flex items-center tablet:mb-4 tablet:w-full",children:[(0,a.jsx)("div",{className:" w-2/12 flex items-center justify-center tablet:w-auto",children:(0,a.jsx)("span",{className:"tablet:w-10 tablet:px-0 tablet:mr-4 w-16 text-center text-p_14 text-n100 border bg-n900 border-n900 px-4 rounded-full py-1",children:s+1})}),(0,a.jsx)("div",{className:" flex w-10/12 items-center tablet:w-full",children:(0,a.jsxs)("div",{className:" flex items-center",children:[(0,a.jsx)(i(),{src:null!==(l=null==e?void 0:e.cover_image)&&void 0!==l?l:o.Z,className:"rounded-full mr-4",width:40,height:40,alt:""}),(0,a.jsx)("span",{className:" text-n100 font-semibold",children:null==e?void 0:e.username})]})})]}),(0,a.jsxs)("div",{className:" w-6/12 grid grid-cols-3 items-center justify-start tablet:w-full",children:[(0,a.jsxs)("div",{className:" float-left flex flex-col justify-start items-start",children:[(0,a.jsx)("span",{className:" float-left w-full text-p_14 text-n200 tablet:text-n300 mb-1 tablet:text-p_12 hidden tablet:block",children:"Total XP Earned"}),(0,a.jsxs)("div",{className:" flex text-p_16 text-n200 font-semibold tablet:text-p_16",children:[null==e?void 0:e.xp_earned," XP"]})]}),(0,a.jsxs)("div",{className:" float-left flex flex-col justify-start items-start",children:[(0,a.jsx)("span",{className:" float-left w-full text-p_14 text-n200 tablet:text-n300 mb-1 tablet:text-p_12 hidden tablet:block",children:"Completed"}),(0,a.jsxs)("div",{className:" flex text-p_16 text-n200 font-semibold tablet:text-p_16",children:[(0,a.jsx)(i(),{className:" mr-1 opacity-80",width:18,src:f.Z,alt:""}),null==e?void 0:e.tasks_completed]})]}),(0,a.jsxs)("div",{className:" float-left flex flex-col justify-start items-start",children:[(0,a.jsx)("span",{className:" float-left w-full text-p_14 text-n200 tablet:text-n300 mb-1 tablet:text-p_12 hidden tablet:block",children:"Streaks"}),(0,a.jsxs)("div",{className:" flex text-p_16 text-n200 font-semibold tablet:text-p_16",children:[(0,a.jsx)(i(),{className:" mr-1 opacity-80",width:20,src:c.Z,alt:""}),"X",null==e?void 0:e.current_streak]})]})]})]},s)),(0,a.jsx)(m.Z,{onIntersect:v})]}):(0,a.jsx)(x.Z,{})]})]})};t.default=b,b.getLayout=function(e){return(0,a.jsx)(n.Z,{children:e})}}},function(e){e.O(0,[1664,9885,1257,5253,4709,4060,8354,9774,2888,179],function(){return e(e.s=52129)}),_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.