PageSourceSearch

https://baes.app/_next/static/chunks/app/page-1721fedbb7d2b487.js

js baes.app collected 2026-10-08 19:33:20 UTC 18,452 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8974],{9131:(e,t,s)=>{"use strict";s.d(t,{O2:()=>N,getCategoryBySlug:()=>k,vF:()=>_});var r=s(72606),a=s(97550),n=s(72948),i=s(40420),l=s(7887),o=s(77102),c=s(65580),d=s(58822),u=s(56325),m=s(69909),g=s(40318),h=s(96153),f=s(44689),p=s(43073),x=s(64520),b=s(75181),y=s(39534),v=s(68947),w=s(95881),j=s(84473);let N=[{name:"Action",slug:"action",icon:r.A},{name:"Adventure",slug:"adventure",icon:a.A},{name:"RPG",slug:"rpg",icon:n.A},{name:"Strategy",slug:"strategy",icon:i.A},{name:"Simulation",slug:"simulation",icon:l.A},{name:"Sports",slug:"sports",icon:o.A},{name:"Puzzle",slug:"puzzle",icon:c.A},{name:"Racing",slug:"racing",icon:d.A},{name:"Fighting",slug:"fighting",icon:u.A},{name:"Shooter",slug:"shooter",icon:m.A},{name:"Platformer",slug:"platformer",icon:g.A},{name:"Survival",slug:"survival",icon:h.A},{name:"Horror",slug:"horror",icon:f.A},{name:"Open World",slug:"open-world",icon:p.A},{name:"MMORPG",slug:"mmorpg",icon:x.A},{name:"Roguelike",slug:"roguelike",icon:b.A},{name:"Card Games",slug:"card-games",icon:y.A},{name:"Battle Royale",slug:"battle-royale",icon:v.A},{name:"Stealth",slug:"stealth",icon:w.A},{name:"Sandbox",slug:"sandbox",icon:j.A}];function k(e){return N.find(t=>t.slug===e)}function _(e){return N.find(t=>t.name===e)}N.map(e=>e.name)},12545:(e,t,s)=>{"use strict";s.d(t,{default:()=>v});var r=s(82322),a=s(47002),n=s(32828),i=s(39674),l=s(18482),o=s(90051),c=s(52589),d=s(13511),u=s(70503);let m=["/herocenter/1.webp","/herocenter/2.webp","/herocenter/3.webp","/herocenter/5.webp","/herocenter/6.webp","/herocenter/7.webp","/herocenter/8.webp","/herocenter/9.webp","/herocenter/10.webp","/herocenter/11.webp","/herocenter/12.webp"];
1function g({title:e="Your games.",subtitle:t="Your upside.",className:s,children:n}){let i=["upside","rewards","wins","value","move","moment","shot"],[l,g]=(0,a.useState)(0),h=(0,u.a)(),f=(0,a.useMemo)(()=>(function(e){let t=[...e];for(let e=t.length-1;e>0;e--){let s=Math.floor(Math.random()*(e+1));[t[e],t[s]]=[t[s],t[e]]}return t})(m),[]);return(0,a.useEffect)(()=>{let e=setInterval(()=>{g(e=>(e+1)%i.length)},2500);return()=>clearInterval(e)},[i.length]),(0,r.jsxs)("section",{className:(0,d.cn)("w-full h-[40vh] md:min-h-[500px] relative overflow-hidden","bg-black","rounded-[24px]","flex items-center justify-center",s),style:{boxShadow:"0 8px 32px rgba(136, 165, 191, 0.6), 0 -8px 32px rgba(255, 255, 255, 0.8)"},children:[(0,r.jsxs)("div",{className:"absolute inset-0 overflow-hidden",children:[h?(0,r.jsxs)("div",{className:"absolute inset-0",children:[(0,r.jsx)("img",{src:f[0],alt:"",className:"absolute -top-16 -left-16 w-48 h-48 object-contain rounded-lg"}),(0,r.jsx)("img",{src:f[1],alt:"",className:"absolute -top-4 left-1/2 transform -translate-x-1/2 w-32 h-32 object-contain rounded-lg"}),(0,r.jsx)("img",{src:f[2],alt:"",className:"absolute top-1/2 right-0 transform -translate-y-1/2 translate-x-3/4 w-60 h-60 object-contain rounded-lg"}),(0,r.jsx)("img",{src:f[3],alt:"",className:"absolute -bottom-24 -left-24 w-60 h-60 object-contain rounded-lg"}),(0,r.jsx)("img",{src:f[4],alt:"",className:"absolute -bottom-4 -right-4 w-36 h-36 object-contain rounded-lg"})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("img",{src:f[0],alt:"",className:"absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-[40rem] h-[40rem] object-contain"}),(0,r.jsx)("img",{src:f[1],alt:"",className:"absolute -top-12 -right-20 w-64 h-64 object-contain hidden md:block"})]}),(0,r.jsx)(o.P.img,{src:f[2],alt:"",className:"absolute -top-12 -left-20 w-60 h-60 object-contain hidden md:block",animate:{x:[0,4,0]},transition:{duration:6,repeat:1/0,ease:"easeInOut"}}),(0,r.jsx)("img",{src:f[3],alt:"",className:"absolute -bottom-12 left-16 w-48 h-48 object-contain hidden md:block"}),(0,r.jsx)(o.P.img,{src:f[4],alt:"",className:"absolute -bottom-20 -right-16 w-80 h-80 object-contain hidden md:block",animate:{y:[0,-6,0]},transition:{duration:5,repeat:1/0,ease:"easeInOut"}})]}),(0,r.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t from-black/20 via-transparent to-transparent"}),(0,r.jsx)("div",{className:"relative z-10 text-center px-6 max-w-4xl mx-auto",children:n||(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("h1",{className:"text-4xl sm:text-5xl md:text-6xl lg:text-7xl xl:text-8xl font-heading font-bold text-white leading-tight",children:e}),(0,r.jsxs)("h2",{className:"text-4xl sm:text-5xl md:text-6xl lg:text-7xl xl:text-8xl font-heading font-bold text-white leading-tight",children:["Your"," ",(0,r.jsxs)("span",{className:"relative inline-block",children:[(0,r.jsx)(c.N,{mode:"wait",children:(0,r.jsxs)(o.P.span,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.5,ease:"easeInOut"},className:"absolute left-0 top-0 underline decoration-2 underline-offset-4",children:[i[l],"."]},l)}),(0,r.jsxs)("span",{className:"invisible",children:[i[0],"."]})]})]})]})}),(0,r.jsx)("div",{className:"absolute inset-0 opacity-10",children:(0,r.jsx)("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_50%_50%,rgba(255,255,255,0.1)_1px,transparent_1px)] bg-[size:20px_20px] animate-pulse"})})]})}function h({activeSort:e,onSortChange:t}){return(0,r.jsx)("div",{className:"mb-8",children:(0,r.jsx)("div",{className:"flex items-center gap-8",children:[{key:"latest",label:"Latest"},{key:"popular",label:"Most Popular"},{key:"rated",label:"Top Rated"}].map(s=>(0,r.jsxs)("button",{onClick:()=>t(s.key),className:`relative pb-2 p-0 ${e===s.key?"text-black font-medium":"text-gray-500 hover:text-gray-700"}`,children:[s.label,e===s.key&&(0,r.jsx)("div",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-black"})]},s.key))})})}var f=s(78310),p=s(19483),x=s(19254),b=s(53345),y=s(35392);function v({initialGames:e=[]}){let t=e.length>0,[s,o]=(0,a.useState)(e),[c,d]=(0,a.useState)(e),[u,m]=(0,a.useState)(1),[v,w]=(0,a.useState)(!1),[j,N]=(0,a.useState)(!0),[k,_]=(0,a.useState)(t),[A,E]=(0,a.useState)(!t),[S,C]=(0,a.useState)(!1),F=(0,a.useRef)(new Set),[B,M]=(0,a.useState)(0),[$,T]=(0,a.useState)(null),[D,O]=(0,a.useState)(!1),[P,L]=(0,a.useState)("latest"),z=(0,a.useRef)(null),R=(0,f.k)(),{windowWidth:I}=R,{settings:G}=(0,b.h)(),W=(0,a.useRef)(()=>{}),Y=(0,a.useCallback)(e=>{F.current.add(e),B>0&&F.current.size>=B?setTimeout(()=>C(!1),100):0===B&&C(!1)},[B]),q=(0,a.useCallback)(e=>{Y(e)},[Y]);(0,a.useEffect)(()=>{let e=!1;async function s(){if(!e){if(t){try{let t=await (0,n.B)(P);if(e)return;let s=(0,p.$)(t,R.isMobile),r="hide"===G.nsfw_visibility?s.filter(e=>!e.is_nsfw):s;o(r),N(r.length>8)}catch(t){e||console.error("Error loading full game list:",t)}return}
1E(!0),C(!1),F.current=new Set,M(0),o([]),d([]),m(1),N(!0);try{let t=await (0,n.B)(P);if(e)return;let s=(0,p.$)(t,R.isMobile),r="hide"===G.nsfw_visibility?s.filter(e=>!e.is_nsfw):s;o(r);let a=r.slice(0,8);d(a),N(r.length>8),M(a.length),F.current=new Set,C(a.length>0),_(!0)}catch(t){e||(console.error("Error loading games:",t),C(!1))}finally{e||E(!1)}}}return(!k||t)&&s(),()=>{e=!0}},[R.isMobile,G.nsfw_visibility]);let H=(0,a.useCallback)(()=>{if(v||!j||A)return;w(!0);let e=s.slice(8*u,(u+1)*8);d(t=>[...t,...e]),m(e=>e+1),N((u+1)*8<s.length),w(!1)},[u,v,j,s,A]);(0,a.useEffect)(()=>{W.current=H},[H]);let Q=(0,a.useCallback)(e=>{!v&&(z.current&&z.current.disconnect(),z.current=new IntersectionObserver(e=>{e[0].isIntersecting&&j&&W.current()},{rootMargin:"100px"}),e&&z.current.observe(e))},[v,j]);(0,a.useEffect)(()=>()=>{z.current&&z.current.disconnect()},[]);let V=e=>{(0,y.r)({isNsfw:!!e.is_nsfw,slug:e.slug,settings:G,confirmMessage:"This game is marked NSFW. Are you sure you want to view it?"})&&(T(e),O(!0))},K=()=>{},J=()=>{},U=(0,a.useMemo)(()=>{if(0===I)return"grid grid-cols-2 sm:grid-cols-2 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-3 2xl:grid-cols-4 justify-items-center gap-8";let{isMobile:e,isTablet:t,isDesktop:s,isIpad:r,orientation:a}=R;if(e)return"grid grid-cols-2 justify-items-center gap-8";if(t||r)if("landscape"===a)if(I>=1366)return"grid grid-cols-4 justify-items-center gap-8";else if(I>=1194)return"grid grid-cols-3 justify-items-center gap-8";else if(I>=1024)return"grid grid-cols-3 justify-items-center gap-7";else return"grid grid-cols-3 justify-items-center gap-6";else if(I>=1024)return"grid grid-cols-3 justify-items-center gap-8";else if(I>=834)return"grid grid-cols-2 justify-items-center gap-10";else if(I>=768)return"grid grid-cols-2 justify-items-center gap-8";else return"grid grid-cols-2 justify-items-center gap-6";if(s){if(I>=1500)return"grid grid-cols-4 justify-items-center gap-8";else if(I>=1200)return"grid grid-cols-3 justify-items-center gap-8";else if(I>=1024)return"grid grid-cols-3 justify-items-center gap-7"}return"grid grid-cols-2 justify-items-center gap-8"},[R,I]),X=(0,a.useMemo)(()=>{if(0===I)return"small";let{isMobile:e,isTablet:t,isDesktop:s,isIpad:r,orientation:a}=R;if(e)return"mobile";if(t||r)if("landscape"===a)if(I>=1366)return"normal";else if(I>=1194)return"small";else if(I>=1024)return"small";else return"normal";else if(I>=1024)return"small";else if(I>=834)return"normal";else if(I>=768)return"normal";else return"large";if(s){if(I>=1500);else if(I>=1200)return"small";else if(I>=1024)return"small"}return"normal"},[R,I]),Z=async e=>{L(e);try{let t=await (0,n.B)(e),s=(0,p.$)(t,R.isMobile);o(s);let r=s.slice(0,8);d(r),m(1),N(s.length>8)}catch(e){console.error("Error sorting games:",e)}},ee=R.isTouchDevice||I<768;return(0,r.jsxs)("div",{className:"mx-auto px-4 pt-8 pb-0 max-w-[1600px]",children:[(0,r.jsx)(g,{}),(0,r.jsx)("div",{className:"mt-12"}),(0,r.jsxs)("div",{className:"pb-8 relative min-h-[60vh]",children:[(A||S)&&(0,r.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,r.jsx)("div",{className:"bg-gradient-to-r from-blue-400 to-blue-600 rounded-[32px] p-8 shadow-2xl",children:(0,r.jsx)(x.A,{className:"w-12 h-12 text-white animate-spin"})})}),!(A||S)&&(0,r.jsx)(h,{activeSort:P,onSortChange:Z}),(0,r.jsx)("div",{className:`${U} ${A||S?"opacity-0 pointer-events-none":"opacity-100"} transition-opacity duration-300`,children:c.map((e,t)=>(0,r.jsx)(l.H,{game:e,index:t,totalVisible:c.length,onMouseEnter:K,onMouseLeave:J,onTouchTap:V,lastElementRef:t===c.length-4?Q:void 0,size:X,forceSheetMode:ee,onImageLoad:()=>Y(e.id),onImageError:()=>q(e.id)},`cartridge-${e.id}-${t}`))})]}),!A&&!S&&(j||v)&&(0,r.jsx)("div",{className:"flex justify-center items-center py-8 mt-8",children:v&&(0,r.jsxs)("div",{className:"flex items-center justify-center",children:[(0,r.jsx)("div",{className:"w-8 h-8 border-4 border-blue-500 border-t-transparent rounded-full animate-spin"}),(0,r.jsx)("span",{className:"ml-2 text-gray-600",children:"Loading more cartridges..."})]})}),(0,r.jsx)(i.G,{game:$,isOpen:D,onClose:()=>{O(!1),T(null)}})]})}},19483:(e,t,s)=>{"use strict";function r(e,t){return e.filter(e=>{var t;return t=e.platform,!0})}s.d(t,{$:()=>r})},22929:(e,t,s)=>{"use strict";s.d(t,{HomepageSEOContent:()=>d});var r=s(82322),a=s(91269),n=s.n(a),i=s(9131),l=s(13907),o=s.n(l);let c={action:"#FF6B6B",adventure:"#4ECDC4",puzzle:"#45B7D1",strategy:"#96CEB4",rpg:"#F0A030",simulation:"#DDA0DD",racing:"#FF7675",fighting:"#E17055",shooter:"#74B9FF",platformer:"#A29BFE",horror:"#636E72",sports:"#00B894",survival:"#8B4513","open-world":"#32CD32",mmorpg:"#9370D
1B",roguelike:"#DC143C","card-games":"#20B2AA","battle-royale":"#E8911A",stealth:"#2F4F4F",sandbox:"#D48A3C"};function d({totalGames:e}){return(0,r.jsx)("div",{className:"bg-white",children:(0,r.jsxs)("div",{className:"max-w-[1600px] mx-auto px-4 py-16 md:py-24",children:[(0,r.jsxs)("section",{className:"mb-16 md:mb-20",children:[(0,r.jsx)("h2",{className:`font-semibold text-gray-900 text-[10px] mb-4 uppercase ${o().className}`,children:"Browse by Genre"}),(0,r.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-4",children:i.O2.map(e=>{let t=e.icon;return(0,r.jsxs)(n(),{href:`/genre/${e.slug}`,className:"rounded-[24px] p-4 text-left flex items-center gap-3 bg-gray-100 hover:bg-gray-200 transition-colors",children:[(0,r.jsx)("div",{children:(0,r.jsx)(t,{className:"h-7 w-7",style:{color:c[e.slug]||"#888"}})}),(0,r.jsx)("div",{className:"flex-1 min-w-0",children:(0,r.jsx)("span",{className:"font-medium block truncate text-gray-900",children:e.name})})]},e.slug)})})]}),(0,r.jsxs)("div",{className:"grid md:grid-cols-3 gap-6",children:[(0,r.jsxs)("section",{className:"p-6 rounded-[8px] bg-gray-100",children:[(0,r.jsx)("h2",{className:`font-semibold text-gray-900 text-[10px] mb-4 uppercase ${o().className}`,children:"About BAES"}),(0,r.jsxs)("p",{className:`text-sm text-black leading-relaxed uppercase ${o().className}`,children:["Bario Entertainment System is an onchain video game marketplace built on Base where players discover, collect, and play games."," ",e>0?`With ${e}+ titles`:"With dozens of titles"," spanning action, puzzle, RPG, racing, and more — each game is a collectible cartridge you can mint, own, and trade."]}),(0,r.jsx)("div",{className:"mt-6",children:(0,r.jsx)(n(),{href:"/about",className:`inline-flex items-center px-6 py-3 rounded-[24px] bg-black text-white text-sm font-medium uppercase hover:bg-gray-800 transition-colors ${o().className}`,children:"Learn more about BAES"})})]}),(0,r.jsxs)("section",{className:"p-6 rounded-[8px] bg-gray-100",children:[(0,r.jsx)("h2",{className:`font-semibold text-gray-900 text-[10px] mb-4 uppercase ${o().className}`,children:"For Players"}),(0,r.jsx)("p",{className:`text-sm text-black leading-relaxed uppercase ${o().className}`,children:"Every game you mint is yours forever — stored onchain, tied to your wallet, and tradeable on secondary markets. Play instantly on web or download to your device. Rate games, build your collection, and access your library from anywhere."})]}),(0,r.jsxs)("section",{className:"p-6 rounded-[8px] bg-gray-100",children:[(0,r.jsx)("h2",{className:`font-semibold text-gray-900 text-[10px] mb-4 uppercase ${o().className}`,children:"For Developers"}),(0,r.jsx)("p",{className:`text-sm text-black leading-relaxed uppercase ${o().className}`,children:"Publish your game and keep 90% of every sale. Get instant global payments, perpetual royalties on resales, and a full analytics dashboard to track plays, revenue, and player engagement."}),(0,r.jsx)("div",{className:"mt-6",children:(0,r.jsx)(n(),{href:"/developer",className:`inline-flex items-center px-6 py-3 rounded-[24px] bg-black text-white text-sm font-medium uppercase hover:bg-gray-800 transition-colors ${o().className}`,children:"Publish Your Game"})})]})]})]})})}},31750:(e,t,s)=>{"use strict";async function r(e){if(!e||"u"<typeof document)return!1;try{if(!function(){if("u"<typeof navigator||!window.isSecureContext||!document.hasFocus())return!0;let e=navigator.userAgent;return/WebView|wv|Instagram|FBAN|FBAV|Line\/|Twitter|Telegram|DuckDuckGo|TikTok|Snapchat/i.test(e)}()&&navigator.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0}catch{}try{let t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.opacity="0",t.style.pointerEvents="none",t.style.left="-9999px",document.body.appendChild(t),t.focus(),t.select(),t.setSelectionRange(0,t.value.length);let s=document.execCommand("copy");return document.body.removeChild(t),s}catch{return!1}}s.d(t,{e:()=>r})},53345:(e,t,s)=>{"use strict";s.d(t,{h:()=>d});var r=s(47002),a=s(55470),n=s(40928),i=s(37191);let l={nsfw_visibility:"show",skip_nsfw_gate:!1},o=["user-settings","nsfw"];async function c(){let e=await fetch("/api/user-settings",{method:"GET",credentials:"include"});if(401===e.status)return{settings:l,isAuthenticated:!1};let t=await e.json();if(!t.success||!t.settings)throw Error(t.error||"Failed to load settings");return{settings:{nsfw_visibility:t.settings.nsfw_visibility||"show",skip_nsfw_gate:!!t.settings.skip_nsfw_gate},isAuthenticated:!0}}function d(){let{data:e,status:t}=(0,a.useSession)(),s=(0,n.jE)(),d="loading"!==t,u="authenticated"===t&&!!e?.address,{data:m,isLoading:g,error:h}=(0,i.I)({queryKey:[...o,e?.address],queryFn:c,enabled:d&&u,staleTime:3e5,gcTime:6e5,refetchOnWindowFocus:!1,refetchOnMount:!1,retry:1}),f=u?m?.settings??l:l,p=!!u&&(m?.isAuthenticated??!1),x=!d||u&&g,b=h instanceof Error?h.message:null,y=(0,r.useCallback)(async t=>{s.setQueryData([...o,e?.address],e=>({settings:{...e?.settings??l,...t},isAuthenticated:e?.isAuthenticated??!0}));try{let r=await fetch("/api/user-settings",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({nsfw_visibility:t.nsfw_visibility??f.nsfw_visibility,skip_nsfw_gate:t.skip_nsfw_gate??f.skip_nsfw_gate})});if(!r.ok)throw Error("Failed to save settings");let a=await r.json();if(!a.success||!a.settings)throw Error(a.error||"Failed to save settings");s.setQueryData([...o,e?.address],{settings:{nsfw_visibility:a.settings.nsfw_visibility||"show",skip_nsfw_gate:!!a.settings.skip_nsfw_gate},isAuthenticated:!0})}catch(t){throw s.invalidateQueries({queryKey:[...o,e?.address]}),t}},[s,e?.address,f.nsfw_visibility,f.skip_nsfw_gate]);return{settings:f,loading:x,error:b,isAuthenticated:p,updateSettings:y}}},60400:(e,t,s)=>{Promise.resolve().then(s.bind(s,12545)),Promise.resolve().then(s.bind(s,22929))},70503:(e,t,s)=>{"use strict";s.d(t,{a:()=>a});var r=s(47002);function a(){let[e,t]=r.useState(void 0);return r.useEffect(()=>{let e=window.matchMedia("(max-width: 767px)"),s=()=>{t(window.innerWidth<768)};return e.addEventListener("change",s),t(window.innerWidth<768),()=>e.removeEventListener("change",s)},[]),!!e}},86357:(e,t,s)=>{"use strict";s.d(t,{W:()=>a});var r=s(47002);function a(e,t){(0,r.useEffect)(()=>{let s=s=>{let r=e?.current;!r||r.contains(s.target)||t(s)};return document.addEventListener("mousedown",s),document.addEventListener("touchstart",s),()=>{document.removeEventListener("mousedown",s),document.removeEventListener("touchstart",s)}},[e,t])}},86994:(e,t,s)=>{"use strict";s.d(t,{U:()=>a});var r=s(47002);function a(e){let[t,s]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let r=window.matchMedia(e);r.matches!==t&&s(r.matches);let a=()=>s(r.matches);return r.addEventListener("change",a),()=>r.removeEventListener("change",a)},[t,e]),t}}},e=>{e.O(0,[661,7259,3571,2481,1269,8766,2359,8671,5831,6677,7673,9049,2081,9640,8597,8694,3997,1886,5758,122,495,6122,2008,5960,7358],()=>e(e.s=60400)),_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.