PageSourceSearch

https://tesana.com/assets/MarketplaceChartsPage-G0YWltpl.js

js tesana.com collected 2026-10-09 22:40:58 UTC 7,657 bytes, 1 lines download raw bytes

1import{j as e}from"./vendor-motion-hRg_q8lq.js";import{d as u,u as p,ao as v,N as j,v as g,H as N}from"./index-BKzE8EQ8.js";import{r as o,d as w}from"./vendor-react-E98sgxjj.js";import{u as T,k as C}from"./vendor-query-bOUN_gKe.js";import{M as F,a as K,f as V,g as R,h as P}from"./MarketplaceSkeletons-DX_hq4ax.js";import{du as _}from"./vendor-fa-Bn2dnpnC.js";import"./DashboardLayout-CkgbJsW1.js";import"./useLocaleNavigate-BNriJdRU.js";import"./SidebarContext-BL6EZ3Xi.js";import"./Avatar-B60wpoS5.js";import"./MediaImage-DKgx-nW4.js";import"./Tooltip-C8AvPGtA.js";import"./SiteBanner-DKwegxEe.js";import"./index-BxtVm1Yj.js";import"./exploreHandoff-RQymaHkp.js";import"./AuthShell-DPeun0C_.js";import"./AuthPanel-B4zt6SJ5.js";import"./pendingReferral-B4JPXhl_.js";import"./LaunchPromoClips-eRoWsyBt.js";import"./index-i1nPji9k.js";import"./paywall-CG7xVZtx.js";import"./plans-CbMJY2XS.js";import"./pricingExperiments-zMZby8z7.js";import"./organization-BuGhuc22.js";import"./useDevModelsVisible-BHgONHQI.js";import"./LandingFooter-DjCjfhwD.js";import"./UserAvatarMenu-BoKKInby.js";import"./tabBarStore-624ukDKJ.js";import"./socialLinks-DmmZmq5v.js";import"./GameRow-BewUztqS.js";import"./MediaVideo-CBR0-TKg.js";import"./FeaturedCard-CyVcJ61O.js";
1import"./useMarketplaceTaxonomy-NDNAXXOe.js";import"./BadgeRow-Dfwgl-tB.js";import"./PlayingNowBadge-CH2HUoBo.js";import"./playingNowApi-CB_pr25U.js";function E({items:l,value:a,onChange:n,ariaLabel:s}){return e.jsx("div",{className:"border-b border-border overflow-x-auto scrollbar-hide",children:e.jsx("nav",{className:"flex gap-1 min-w-max","aria-label":s,children:l.map(t=>{const r=t.value===a;return e.jsx("button",{type:"button",onClick:()=>n(t.value),className:u("px-4 py-2.5 text-base border-b-2 -mb-px transition-colors cursor-pointer whitespace-nowrap",r?"border-foreground text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),"aria-pressed":r,children:t.label},t.value)})})})}const M=o.memo(E),S=[{value:"trending",key:"charts.tabs.trending",fallback:"Trending"},{value:"played",key:"charts.tabs.played",fallback:"Most Played"},{value:"rated",key:"charts.tabs.rated",fallback:"Top Rated"},{value:"new",key:"charts.tabs.new",fallback:"New & Noteworthy"},{value:"rising",key:"charts.tabs.rising",fallback:"Rising"},{value:"sold",key:"charts.tabs.sold",fallback:"Top Sellers"}],A=o.memo(function({metric:a,onChange:n}){const{t:s}=p("marketplace"),t=o.useMemo(()=>S.map(r=>({value:r.value,label:s(r.key,{defaultValue:r.fallback})})),[s]);return e.jsx(M,{items:t,value:a,onChange:n,ariaLabel:"Charts"})}),I=[{value:"trending",icon:["far","fire"],nameKey:"charts.tabs.trending",nameFallback:"Trending",descKey:"charts.desc.trending",descFallback:"What's hot this week"},{value:"played",icon:["far","play"],nameKey:"charts.tabs.played",nameFallback:"Most Played",descKey:"charts.desc.played",descFallback:"The most-played games"},{value:"rated",icon:["far","star"],nameKey:"charts.tabs.rated",nameFallback:"Top Rated",descKey:"charts.desc.rated",descFallback:"Highest rated by players"},{value:"new",icon:["far","sparkles"],nameKey:"charts.tabs.new",nameFallback:"New & Noteworthy",descKey:"charts.desc.new",descFallback:"Fresh and worth a look"},{value:"rising",icon:["far","arrow-trend-up"],nameKey:"charts.tabs.rising",nameFallback:"Rising",descKey:"charts.desc.rising",descFallback:"Gaining momentum fast"},{value:"sold",icon:["far","sack-dollar"],nameKey:"charts.tabs.sold",nameFallback:"Top Sellers",descKey:"charts.desc.sold",descFallback:"Best sellers by revenue"}],D=o.memo(function({metric:a,onChange:n}){const{t:s}=p("marketplace");return e.jsx("nav",{className:"flex flex-col gap-1","aria-label":s("charts.navLabel",{defaultValue:"Charts"}),children:I.map(t=>{const r=t.value===a;return e.jsxs("button",{type:"button","aria-pressed":r,onClick:()=>n(t.value),className:u("flex items-start gap-3 w-full text-left rounded-md p-3 transition-colors cursor-pointer",r?"bg-foreground
1/10":"hover:bg-foreground/6"),children:[e.jsx("span",{className:u("mt-0.5 w-5 text-center shrink-0",r?"text-accent":"text-muted-foreground"),children:e.jsx(_,{icon:t.icon,className:"text-sm"})}),e.jsxs("span",{className:"min-w-0",children:[e.jsx("span",{className:u("block text-base","text-foreground"),children:s(t.nameKey,{defaultValue:t.nameFallback})}),e.jsx("span",{className:"block text-sm text-muted-foreground mt-0.5",children:s(t.descKey,{defaultValue:t.descFallback})})]})]},t.value)})})}),L=["trending","played","rated","new","rising","sold"];function H(l,a){return l.game?l:{rank:a+1,previous_rank:null,change:0,change_type:"new",weeks_on_chart:1,game:l}}function Ne(){const l=v(),{t:a}=p("marketplace"),[n,s]=w(),t=n.get("metric"),r=t&&L.includes(t)?t:"trending",{data:c,isFetching:f,isError:i}=T({queryKey:["marketplace-charts",r],queryFn:()=>j.getCharts({metric:r,limit:50}),staleTime:5*60*1e3,placeholderData:C});o.useEffect(()=>{g("marketplace_view",{surface:"charts",metric:r})},[r]);const h=d=>{const m=new URLSearchParams(n);m.set("metric",d),s(m,{replace:!1}),g("marketplace_filter_used",{surface:"charts",filter:"metric",value:d})},b=a("charts.title",{defaultValue:"Charts | Play on Tesana"}),k=a("charts.metaDescription",{defaultValue:"Top played, top rated, trending, and rising games on Tesana."});return e.jsx(F,{children:({topPad:d})=>e.jsxs("div",{className:`${K} ${d}`,children:[e.jsxs(N,{children:[e.jsx("title",{children:b}),e.jsx("meta",{name:"description",content:k}),typeof window>"u"?"":e.jsx("link",{rel:"canonical",href:l})]}),e.jsxs("header",{className:"mb-12",children:[e.jsx("h1",{className:"text-h3-sm md:text-h3 text-foreground tracking-tight",children:a("charts.heading",{defaultValue:"Top games on Tesana"})}),e.jsx("p",{className:"text-base text-muted-foreground mt-2 max-w-2xl",children:a("charts.subheading",{defaultValue:"Live rankings with weekly movement — see what is rising, selling, and loved."})})]}),e.jsx("div",{className:"lg:hidden mb-6",children:e.jsx(A,{metric:r,onChange:h})}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[1fr_2.5fr] gap-6 md:gap-8 items-start",children:[e.jsx("aside",{className:"hidden lg:block lg:sticky lg:top-6",children:e.jsx(D,{metric:r,onChange:h})}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:`${V} px-2 pb-2 mb-1 border-b border-border`,children:[e.jsx("span",{className:"text-xs uppercase text-muted-foreground text-center",children:a("charts.col.rank",{defaultValue:"Rank"})}),e.jsx("span",{className:"text-xs uppercase text-muted-foreground",children:a("charts.col.game",{defaultValue:"Game"})}),e.jsx("span",{className:"text-xs uppercase text-muted-foreground text-right",children:a("charts.col.price",{defaultValue:"Price"})}),e.jsx("span",{className:"hidden md:block text-xs uppercase text-muted-foreground text-right",children:a("charts.col.change",{defaultValue:"Change"})}),e.jsx("span",{className:"hidden md:block text-xs uppercase text-muted-foreground text-right",children:a("charts.col.weeks",{defaultValue:"Weeks"})})]}),i&&e.jsx("div",{"data-prerender-error":"1",className:"text-center py-12 text-base text-muted-foreground",children:a("charts.error",{defaultValue:"Could not load the chart right now."})}),!i&&!c&&e.jsx(R,{count:15}),!i&&c&&c.results.length===0&&e.jsx("div",{className:"text-center py-12 text-base text-muted-foreground",children:a("charts.empty",{defaultValue:"No games qualify for this chart yet."})}),!i&&c&&c.results.length>0&&e.jsx("ol",{className:`flex flex-col transition-opacity ${f?"opacity-60":""}`,children:c.results.map((m,y)=>{const x=H(m,y);return e.jsx(P,{entry:x},x.game.id)})})]})]})]})})}export{Ne 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.