PageSourceSearch

https://tesana.com/assets/LaunchPage-2Qf0RoVx.js

js tesana.com collected 2026-10-09 22:40:18 UTC 13,732 bytes, 1 lines download raw bytes

1import{j as e}from"./vendor-motion-hRg_q8lq.js";import{b as E,r as o}from"./vendor-react-E98sgxjj.js";import{u as oe,P as m,N as re}from"./useCanonicalPlayPath-DJjTWyxc.js";import{u as D}from"./vendor-query-bOUN_gKe.js";import{l as L,m as G,b as se,q as ae,n as le,s as P,o as T,P as de,v as j,E as S,w as ce}from"./index-BKzE8EQ8.js";import{D as ue}from"./DesktopGamePanel-BehZ5Jia.js";import{P as pe,a as me,u as fe}from"./index-B_kJqugV.js";import{u as ge,a as he,b as xe,p as ye}from"./GameFrame-COJWxWBt.js";import{C as be}from"./CoinTopUpModal-CAwRJTIr.js";import{A as je}from"./index-BxtVm1Yj.js";import{u as Se}from"./usePlayFeatures-C6KNVcgO.js";import"./PlayPanelHost-DZaYs6Qz.js";import"./publicGameMetadata-qDtp_1-a.js";import"./vendor-fa-Bn2dnpnC.js";import"./useGameVolume-DDLs3th3.js";import"./StudioContext-C1fnzqLL.js";import"./useLocaleNavigate-BNriJdRU.js";import"./useOrchestrationEnabled-BWYxrOff.js";import"./paywall-CG7xVZtx.js";import"./plansApi-C_2vGYRm.js";import"./planChat-Cir7UVv6.js";import"./useFullscreen-Cs7diftf.js";import"./Tooltip-C8AvPGtA.js";import"./VolumeControl-DJ2K5ohZ.js";import"./screenshotStore-B6ItflPb.js";import"./ShareModal-YOmfr9ti.js";import"./SubmitVideoModal-DzX5MAqQ.js";import"./earnProgram-B9pqjKbP.js";import"./trailerShare-BGlMG0RV.js";import"./usePublishingFeatures-C8zY31rs.js";import"./planPerks-uEcgEuVc.js";import"./plans-CbMJY2XS.js";import"./socialLinks-DmmZmq5v.js";import"./useIsStaff-DZf24Ivp.js";import"./usePlayingNow-D0BSBy1C.js";import"./playingNowApi-CB_pr25U.js";import"./vanitySite-BtpHcDVO.js";import"./useChatUnread-BF3F7z48.js";import"./useGameChatSocket-Ca57ylO8.js";import"./chatRoomStore-oLAeRb02.js";import"./Avatar-B60wpoS5.js";import"./MediaImage-DKgx-nW4.js";import"./playIntent-BFBGkqRe.js";import"./chatReturn-BikAGK6w.js";import"./exploreHandoff-RQymaHkp.js";import"./AuthShell-DPeun0C_.js";import"./AuthPanel-B4zt6SJ5.js";import"./pendingReferral-B4JPXhl_.js";import"./LaunchPromoClips-eRoWsyBt.js";import"./PlayingNowBadge-CH2HUoBo.js";import"./useFocusTrap-BzqZufCW.js";const we="6747117832",A="launch-page-game-muted";function R(){return/iPad|iPhone|iPod/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1}function f(){return window.navigator.standalone===!0||window.matchMedia("(display-mode: standalone)").matches}function U(i){o.useEffect(()=>{if(i?.id){const r=new URLSearchParams(window.location.search),l=r.get("utm_source"),d=r.get("utm_medium"),c=r.get("ref");j(S.LAUNCH_PAGE_VIEWED,{game_id:i.id,game_name:i.name,is_standalone:f(),is_ios:R(),referrer:document.referrer||"direct",utm_source:l,utm_medium:d,ref:c}),ce({last_launch_game_id:i.id,last_launch_game_name:i.name,last_launch_source:l||c||"direct"})}},[i?.id]),o.useEffect(()=>{f()&&j(S.LAUNCH_PAGE_PWA_OPENED,{game_id:i?.id,game_name:i?.name})},[i?.id])}function St(){const{playerShell:i,ready:r}=Se();return r?i?e.jsx(ke,{}):e.jsx(z,{}):e.jsx("div",{style:t.centered,children:e.jsx("div",{style:t.spinner})})}function ke(){const{gameId:i}=E(),{data:r,isLoading:l}=D({queryKey:["launch-game",i],queryFn:()=>L.getPublic(i),enabled:!!i}),d=!!r&&!!G(r)&&r.platform_tier!=="desktop";return oe(d?r:null,i,"launch"),U(d?r:null),l?e.jsx("div",{style:t.centered,children:e.jsx("div",{style:t.spinner})}):!r||!d?e.jsx(z,{}):e.jsxs("div",{className:"fixed inset-0 bg-black",children:[e.jsx(m,{game:r,surface:"launch"}),e.jsx(pe,{game:r,surface:"launch"})]})}function z(){const{gameId:i}=E(),{user:r,isAuthenticated:l,loading:d}=se(),c=o.useRef(null),[B,g]=o.useState(!0),[M,w]=o.useState(!1),[N,k]=o.useState(!1),[O,W]=o.useState(!1),[a,q]=o.useState(()=>typeof window>"u"?!1:window.sessionStorage.getItem(A)==="1"),{data:n,isLoading:F,error:H}=D({queryKey:["launch-game",i],queryFn:()=>L.getPublic(i),enabled:!!i});o.useEffect(()=>{if(!(!n||!i)&&n.resolved_via_legacy_numeric_id&&n.public_id){ae("launch",i,n.public_id);const s=window.location.pathname.replace(`/launch/${i}`,`/launch/${n.public_id}`);s!==window.location.pathname&&window.history.replaceState(null,"",s+window.location.search+window.location.hash)}},[n,i]);const u=n?G(n):null,$=u?`${u}${typeof window<"u"?window.location.search:""}`:null,h=!!(l&&r&&n&&n.user===r.username);me(n?.id??null,!!n&&n.status==="completed",{surface:"launch",isOwner:h,gameName:n?.name,gamePublicId:n?.public_id,game:n}),fe(!!u);const x=o.useCallback(()=>{const s=c.current?.contentWindow;s&&s.postMessage({type:"set-muted",muted:a},"*")},[a]),[K,v]=o.useState(!1),C=o.useRef(()=>{}),[V,_]=o.useState(null),y=o.useRef(null),Y=o.useCallback(s=>new Promise(ie=>{y.current=ie,_({sku:s.sku})}),[]),{sendBootstrap:Q,completeTopUp:b,answerSignIn:J,session:p}=ge({iframeRef:c,gameId:n?.id??null,playGameId:n?.public_id??null,isAuthenticated:l,authLoading:d,onTo
1pUpRequest:()=>v(!0),onCheckoutRequest:Y,onSignInRequest:()=>C.current()}),{signInOpen:X,requestSignIn:Z,closeSignIn:ee}=he(l,J);C.current=Z;const te=o.useCallback(()=>{v(!1),le.getWallet().then(s=>b(!0,s.balance)).catch(()=>b(!1))},[b]),ne=o.useCallback(()=>{q(s=>!s)},[]);o.useEffect(()=>{typeof window>"u"||window.sessionStorage.setItem(A,a?"1":"0")},[a]),o.useEffect(()=>{u&&x()},[u,a,x]),U(n),o.useEffect(()=>{if(R()&&!f()&&!sessionStorage.getItem("install_guide_dismissed")){const s=setTimeout(()=>k(!0),1500);return()=>clearTimeout(s)}},[]);const I=()=>{k(!1),sessionStorage.setItem("install_guide_dismissed","1")};return F?e.jsxs("div",{style:t.centered,children:[e.jsx("div",{style:t.spinner}),e.jsx("p",{style:t.loadingText,children:"Loading game..."})]}):H||!n?e.jsxs("div",{style:t.centered,children:[e.jsx("p",{style:{fontSize:48,marginBottom:16},children:"🎮"}),e.jsx("h1",{style:t.errorTitle,children:"Game not found"}),e.jsx("a",{href:"https://tesana.ai",style:t.ctaButton,children:"Go to Tesana"})]}):n.platform_tier==="desktop"?e.jsxs("div",{style:t.container,className:P?"tesana-embedded-clearpath":void 0,children:[e.jsx(m,{game:n,surface:"launch"}),e.jsx("div",{style:t.gameFrame,children:P?e.jsx(re,{gameId:n.id,gameName:n.name,posterUrl:T(n),pckUrl:n.pck_url,pckSha:n.pck_sha,studioGameId:h?n.id:null,surface:"launch"}):e.jsx(ue,{gameName:n.name,posterUrl:T(n),surface:"launch",studioGameId:h?n.id:null})})]}):u?e.jsxs("div",{style:t.container,children:[e.jsx(m,{game:n,surface:"launch"}),e.jsxs("div",{style:t.gameFrame,children:[B&&e.jsxs("div",{style:t.loadingOverlay,children:[e.jsx("div",{style:t.spinner}),e.jsxs("p",{style:t.loadingText,children:["Loading ",n.name,"..."]})]}),M&&e.jsxs("div",{style:t.loadingOverlay,children:[e.jsx("p",{style:{fontSize:48,marginBottom:16},children:"⚠️"}),e.jsx("h2",{style:t.errorTitle,children:"Failed to load"}),e.jsx("button",{onClick:()=>{w(!1),g(!0)},style:t.ctaButton,children:"Try again"})]}),e.jsx("iframe",{ref:c,src:$??void 0,style:t.iframe,onLoad:()=>{g(!1),x(),Q()},onError:()=>{g(!1),w(!0)},title:n.name,sandbox:"allow-scripts allow-modals allow-same-origin allow-popups allow-forms allow-pointer-lock",allow:"fullscreen; autoplay; gamepad; pointer-lock"}),e.jsx("button",{onClick:ne,"aria-label":a?"Unmute game":"Mute game","aria-pressed":a,title:a?"Unmute game":"Mute game",style:t.muteButton,children:e.jsxs("span",{style:t.muteIconWrap,children:[e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("polygon",{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5"}),e.jsx("path",{d:"M15.54 8.46a5 5 0 0 1 0 7.07"}),e.jsx("path",{d:"M19.07 4.93a10 10 0 0 1 0 14.14"})]}),a&&e.jsx("span",{"aria-hidden":"true",style:t.muteSlash})]})})]}),!f()&&!O&&e.jsxs("div",{style:t.banner,children:[e.jsxs("div",{style:t.bannerContent,children:[e.jsx(de,{src:"/logos/logo.png",alt:"Tesana",style:t.bannerIcon}),e.jsxs("div",{style:t.bannerText,children:[e.jsx("strong",{style:{color:"#fff",fontSize:13},children:n.name}),e.jsx("span",{style:{color:"rgba(255,255,255,0.6)",fontSize:11},children:"Built with Tesana — Create your own games"})]})]}),e.jsxs("div",{style:t.bannerActions,children:[e.jsx("a",{href:`https://apps.apple.com/app/id${we}`,onClick:()=>j(S.LAUNCH_PAGE_APP_DOWNLOAD_CLICKED,{game_id:n.id,game_name:n.name}),style:t.bannerGetButton,children:"GET"}),e.jsx("button",{onClick:()=>W(!0),style:t.bannerDismiss,children:"✕"})]})]}),N&&e.jsx("div",{style:t.guideOverlay,onClick:I,children:e.jsxs("div",{style:t.guideCard,onClick:s=>s.stopPropagation(),children:[e.jsx("button",{onClick:I,style:t.guideClose,children:"✕"}),e.jsx("h3",{style:t.guideTitle,children:"Add to Home Screen"}),e.jsxs("p",{style:t.guideSubtitle,children:["Play ",n.name," like a real app"]}),e.jsxs("div",{style:t.guideSteps,children:[e.jsxs("div",{style:t.guideStep,children:[e.jsx("div",{style:t.guideStepNumber,children:"1"}),e.jsxs("div",{children:[e.jsx("strong",{style:{color:"#fff"},children:"Tap the Share button"}),e.jsxs("p",{style:t.guideStepDesc,children:["The ",e.jsx("span",{style:t.shareIcon,children:"⬆"})," icon at the bottom of Safari"]})]})]}),e.jsxs("div",{style:t.guideStep,children:[e.jsx("div",{style:t.guideStepNumber,children:"2"}),e.jsxs("div",{children:[e.jsx("strong",{style:{color:"#fff"},children:'Select "Add to Home Screen"'}),e.jsx("p",{style:t.guideStepDesc,children:"Scroll down in the share menu to find it"})]})]}),e.jsxs("div",{style:t.guideStep,children:[e.jsx("div",{style:t.guideStepNumber,children:"3"}),e.jsxs("div",{children:[e.jsx("strong",{style:{color:"#fff"},children:'Tap "Add"'}),e.jsx("p",{style:t.guideStepDesc,children:"Your game will appear on your home screen"})]})]})]}),e.jsx("div",{style:t.guideArrow,children:e.jsx("div",{style:t.bouncingArrow,children:"↓"})})]})}),e.jsx(be,{isOpen:K,onClose:te,returnUrl:window.location.href}),e.jsx(xe,{sku:V?.sku??null,play:p?{endpoint:ye(p),token:p.save_token||p.token}:null,onSettle:s=>{y.current?.(s),y.current=null},onClose:()=>_(null)}),e.jsx(je,{isOpen:X,onClose:ee,initialMode:"login"})]}):e.jsxs("div",{style:t.centered,children:[e.jsx(m,{game:n,surface:"launch"}),e.jsx("p",{style:{fontSize:48,marginBottom:16},children:"🔨"}),e.jsx("h1",{style:t.errorTitle,children:n.name}),e.jsx("p",{style:t.loadingText,children:"This game is still being built."})]})}const t={container:{position:"fixed",inset:0,backgroundColor:"#000",display:"flex",flexDirection:"column",overflow:"hidden"},centered:{position:"fixed",inset:0,backgroundColor:"#0a0a1a",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:24},gameFrame:{flex:1,position:"relative",overflow:"hidden"},iframe:{position:"absolute",inset:0,width:"100%",height:"100%",border:"none",backgroundColor:"#000"},muteButton:{position:"absolute",top:12,right:12,width:36,height:36,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.4)",border:"none",borderRadius:8,color:"#fff",cursor:"pointer",zIndex:20,padding:0},muteIconWrap:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",color:"#fff"},muteSlash:{position:"absolute",height:2,width:18,backgroundColor:"currentColor",borderRadius:1,transform:"rotate(45deg)"},loadingOverlay:{position:"absolute",inset:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:"#0a0a1a",zIndex:10},spinner:{width:32,height:32,border:"3px solid rgba(255,255,255,0.1)",borderTopColor:"#6366f1",borderRadius:"50%",animation:"spin 0.8s linear infinite",marginBottom:12},loadingText:{color:"rgba(255,255,255,0.5)",fontSize:14},errorTitle:{color:"#fff",fontSize:20,marginBottom:12},ctaButton:{display:"inline-block",padding:"10px 24px",backgroundColor:"#6366f1",color:"#fff",borderRadius:8,textDecoration:"none",fontSize:14,fontWeight:600,border:"none",cursor:"pointer"},banner:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 12px",backgroundColor:"rgba(15, 15, 30, 0.95)",borderTop:"1px solid rgba(255,255,255,0.08)"},bannerContent:{display:"flex",alignItems:"center",gap:10,flex:1,minWidth:0},bannerIcon:{width:36,height:36,borderRadius:8,flexShrink:0},bannerText:{display:"flex",flexDirection:"column",gap:1,minWidth:0},bannerActions:{display:"flex",alignItems:"center",gap:8,flexShrink:0},bannerGetButton:{padding:"5px 16px",backgroundColor:"#6366f1",color:"#fff",borderRadius:16,fontSize:12,fontWeight:700,textDecoration:"none",textTransform:"uppercase",letterSpacing:.5},bannerDismiss:{background:"none",border:"none",color:"rgba(255,255,255,0.4)",fontSize:16,cursor:"pointer",padding:4},guideOverlay:{position:"fixed",inset:0,backgroundColor:"rgba(0,0,0,0.8)",display:"flex",alignItems:"flex-end",justifyContent:"center",zIndex:100,padding:"0 16px 80px"},guideCard:{backgroundColor:"#1a1a2e",borderRadius:16,padding:"24px 20px",width:"100%",maxWidth:360,position:"relative"},guideClose:{position:"absolute",top:12,right:12,background:"none",border:"none",color:"rgba(255,255,255,0.4)",fontSize:18,cursor:"pointer"},guideTitle:{color:"#fff",fontSize:18,fontWeight:700,marginBottom:4},guideSubtitle:{color:"rgba(255,255,255,0.5)",fontSize:13,marginBottom:20},guideSteps:{display:"flex",flexDirection:"column",gap:16}
1,guideStep:{display:"flex",alignItems:"flex-start",gap:12},guideStepNumber:{width:28,height:28,borderRadius:"50%",backgroundColor:"#6366f1",color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:700,flexShrink:0},guideStepDesc:{color:"rgba(255,255,255,0.5)",fontSize:12,marginTop:2},shareIcon:{display:"inline-block",fontSize:14},guideArrow:{display:"flex",justifyContent:"center",marginTop:20},bouncingArrow:{fontSize:28,color:"#6366f1",animation:"bounce 1.5s ease-in-out infinite"}};export{St 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.