PageSourceSearch

https://s9.com/_next/static/chunks/9375.fd3a12762855fed3.js

js s9.com collected 2026-10-02 06:39:52 UTC 15,593 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkgame_user_webfront=self.webpackChunkgame_user_webfront||[]).push([[9375],{25558:(e,t,r)=>{r.d(t,{L:()=>h,B:()=>b});var n=r(12115),o=r(97822),i=r(74077),a=r(47938);function u(){let e=(0,i.Z)();if(!e)throw Error("Sport API credentials unavailable (device not registered)");return e}class l extends a.S{async getSportGameToken(e){return this.authenticatedRequest("POST","/gvg/game-user/token/lucifergaming",{param:e},void 0,u())}async getSportGameTokenV2(e){return this.authenticatedRequest("POST","/gvg/game-user/token/lucifergaming",{param:e},void 0,u())}async getSportTopGameToken(e){return this.authenticatedRequest("POST","/gvg/game-user/token/top",{param:e},void 0,u())}async getSportBetbyGameToken(e){return this.authenticatedRequest("POST","/gvg/game-user/token/betby",{param:e},void 0,u())}}let c=new l;var s=r(375),d=r(96139),f=r(44318),m=r(55235),g=r(67354),w=r(76620);async function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(0,g.hA)(e);if(!r)throw Error(`Unknown sport game code: ${e}`);let{getUser:n,getLanguage:i,getToken:a}=o.o.getState(),u=(0,g.X5)(r);if(!u)throw Error(`No token route for sport game code: ${r}`);if("top"===u||"betby"===u){let e=Math.floor(Date.now()/1e3),o="top"===u?c.getSportTopGameToken.bind(c):c.getSportBetbyGameToken.bind(c),i=await o({account:n()?.nickname||"",currency:n()?.currency||"",user_id:n()?.user_id?.toString()||"",timestamp:e}),a=(0,f.ql)(i,{allowEmptyToken:t.allowEmptyToken??!1});if(!a?.brand_id||!t.allowEmptyToken&&!a.token){let e=(0,f.W1)(i);throw console.warn("[fetchSportTokenByGameCode] invalid top/betby response",{gameCode:r,tokenRoute:u,code:i?.code,payloadKeys:e?Object.keys(e):null,topResponse:i}),Error("Sport token response missing brand_id or token")}return{...a,token:a.token||"",theme:a.theme??d.jD.BETBY_SHELL_THEME}}let l=(0,w.xW)(r);if(!l?.game_id)throw Error(`Sport catalog game missing for code: ${r}`);let m=await (0,s.Dt)(),p=await c.getSportGameTokenV2({username:n()?.username||"",user_id:n()?.user_id?.toString()||"",currency:n()?.currency||"",language:i()||"en",token:a()||"",back_url:window.location.href.split("#")[0],game_id:l.game_id,game_ven_key:l.name||"",ip:m,device_type:2,ven_code:l.code||r});return{brand_id:p.info.brandId,token:p.info.jwtToken,theme:p.info.theme,library_url:p.info.library_url}}async function h(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m.ud,t=await p(e,{allowEmptyToken:!0});if(!t.brand_id)throw Error("Sport promo token response missing brand_id");return t}let b=e=>{let t=(0,n.useRef)(null),[r,i]=(0,n.useState)(!1),{getUser:a,setSportLoginInfo:u}=(0,o.o)(),l=(0,n.useRef)(null),c=(0,g.c_)(e),s=(0,n.useCallback)(async function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];let r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];i(!0),r&&l.current&&(console.log("Killing existing BTRenderer instance..."),l.current.kill(),l.current=null);try{let r=await p(e);return t.current=r,u({brand_id:r.brand_id,token:r.token}),"lucifier"===c&&(0,f.aX)(a()?.user_id),r.token}catch(e){throw console.error("Failed to get sport game token:",e),e}finally{i(!1)}},[e,a,c,u]);return{sportLoginInfo:t,isLoading:r,getToken:s,btInstance:l,provider:c}}},44318:(e,t,r)=>{r.d(t,{W1:()=>u,aX:()=>d,ao:()=>c,j0:()=>s,ql:()=>l});let n="promo-banner-login-info-v1",o=["token","jwtToken","jwt","jwt_token","access_token","accessToken","game_token","gameToken"],i=["brand_id","brandId","brand","brandID"];function a(e,t){for(let r of t){let t=e[r];if(null==t)continue;let n=String(t).trim();if(n)return n}return""}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!e||"object"!=typeof e||t>6)return null;let r=a(e,i),n=a(e,o);if(r||n)return e;for(let r of["info","data","result","param","payload"]){let n=function e(t){if(!t)return null;if(Array.isArray(t)){for(let r of t){let t=e(r);if(t)return t}return null}return"object"!=typeof t?null:t}(e[r]);if(!n)continue;let o=u(n,t+1);if(o)return o}for(let r of Object.values(e)){if(!r||"object"!=typeof r)continue;let e=u(r,t+1);if(e)return e}return null}function l(e,t){let r=u(e);if(!r)return null;let n=a(r,i),l=a(r,o),c=a(r,["library_url","libraryUrl","script_url","scriptUrl"]),s=a(r,["theme","themeName","theme_name"]);return n&&(l||t?.allowEmptyToken)?{brand_id:n,token:l,...s?{theme:s}:{},...c?{library_url:c}:{}}:null}function c(e){return`${n}:${e??"guest"}`}function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:30;if(!e?.trim())return!0;try{let r=e.split(".")[1];if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/"),o=n.padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(o));if("number"!=typeof i.exp)return!1;return 1e3*i.exp<=Date.now()+1e3*t}catch{return!1}}function d(e){try{sessionStorage.removeItem(c(e))}catch{}if(null==e)try{let e=[];for(let t=0;t<sessionStorage.length;t++){let r=sessionStorage.key(t);r?.startsWith(`${n}:`)&&e.push(r)}
1e.forEach(e=>sessionStorage.removeItem(e))}catch{}}},64141:(e,t,r)=>{r.d(t,{S:()=>a,y:()=>i});var n=r(97822),o=r(12834);function i(e){return(0,o.Gc)(e??void 0)}function a(){return i(n.o.getState().getLanguage())}},69375:(e,t,r)=>{r.r(t),r.d(t,{default:()=>T});var n=r(95155),o=r(12115),i=r(35695),a=r(97822),u=r(25558),l=r(55235),c=r(60019),s=r(96139),d=r(64141);let f="bt-renderer-script",m=new Map;var g=r(86650),w=r(44318),p=r(74077),h=r(86298);let b=["sptpub.com","invisiblesport.com","betby.com"];function y(){return window.matchMedia("(min-width: 768px)").matches,236}function k(){let e=a.o.getState();return!!(e.getUser()&&e.getToken())}function v(e){window.setTimeout(()=>{Promise.resolve(e()).catch(e=>{console.warn("[PromoBanner] betby work failed (non-fatal)",e)})},16)}async function _(){let e=window.scheduler;if("function"==typeof e?.yield)return void await e.yield();await new Promise(e=>{window.setTimeout(e,0)})}function T(){let e=(0,i.useRouter)(),t=(0,a.o)(e=>e.user?.user_id),r=(0,a.o)(e=>e.device_id),T=(0,a.o)(e=>e.user?.partner_id??e.partnerInfo?.partner_id),S=(0,a.o)(e=>e.sportGameCatalogLoaded),B=(0,a.o)(e=>e.sportGameCatalogList),E=S&&B.length>0&&!!(0,c.Gr)(l.ud),R=(0,w.ao)(t),I=(0,o.useRef)(null),P=(0,o.useRef)(null),L=(0,o.useRef)(null),G=(0,o.useRef)(!1),x=(0,o.useRef)(!1),O=(0,o.useRef)(null),j=(0,o.useRef)(null),C=(0,o.useRef)(0),D=(0,o.useRef)(null),M=(0,o.useRef)(null),N=(0,o.useRef)(()=>void 0),$=(0,o.useRef)(!1),[A,H]=(0,o.useState)(236),[q,U]=(0,o.useState)(!1),W=()=>{try{let e=sessionStorage.getItem(R);if(!e)return null;let t=JSON.parse(e);if(!t?.brand_id||!t?.cachedAt||Date.now()-t.cachedAt>9e4||t.token?.trim()&&(0,w.j0)(t.token))return sessionStorage.removeItem(R),null;return t}catch{return null}},X=e=>{let t={...e,cachedAt:Date.now()};sessionStorage.setItem(R,JSON.stringify(t))};(0,o.useEffect)(()=>{let e=()=>H(y());e();let t=window.matchMedia("(min-width: 768px)");return t.addEventListener("change",e),()=>t.removeEventListener("change",e)},[]);let Y=e=>{Number.isFinite(e)&&!(e<80)&&H(Math.ceil(Math.max(e,y())))};return((0,o.useEffect)(()=>{if(!E||!I.current||q)return;let e=new IntersectionObserver(t=>{t.some(e=>e.isIntersecting)&&(U(!0),e.disconnect())},{rootMargin:"300px 0px"});return e.observe(I.current),()=>e.disconnect()},[q,E]),(0,o.useEffect)(()=>{if(!E||!q)return;let e=e=>{var t;if(!((t=e.origin)&&"null"!==t&&b.some(e=>t.includes(e))))return;let r=e.data;if(!r||"object"!=typeof r)return;let n=r.height??r.frameHeight??r.iframeHeight;"number"==typeof n&&Y(n)};return window.addEventListener("message",e),()=>window.removeEventListener("message",e)},[q,E]),(0,o.useEffect)(()=>{if(!E||!q||!I.current)return;let e=I.current,t=()=>{let t=e.querySelector("iframe");t instanceof HTMLIFrameElement&&(e=>{M.current?.disconnect();let t=new ResizeObserver(()=>{Y(e.getBoundingClientRect().height)});t.observe(e),M.current=t,Y(e.getBoundingClientRect().height)})(t)},r=new MutationObserver(()=>t());return r.observe(e,{childList:!0,subtree:!0}),t(),()=>{r.disconnect(),M.current?.disconnect(),M.current=null}},[q,E]),(0,o.useEffect)(()=>{if(!E||!q)return;G.current=!1;let n=0,o=()=>{M.current?.disconnect(),M.current=null},i=()=>{P.current?.remove(),P.current=null},c=()=>{let e=I.current;if(!e)return null;if(P.current?.isConnected)return P.current;i();let t=document.createElement("div");return t.className="promo-banner-mount w-full",t.setAttribute("data-promo-banner-mount","true"),e.appendChild(t),P.current=t,t},h=async()=>{let e=L.current;L.current=null,o(),await (0,g.Rt)(e),i(),await (0,g.iq)(),c()},b=async()=>{let e=L.current;L.current=null,o(),await (0,g.Rt)(e),i()},y=async()=>{(0,w.aX)(t);try{let e=await (0,u.L)(l.ud),t={brand_id:e.brand_id,token:e.token||"",theme:e.theme,library_url:e.library_url};return D.current=t,a.o.getState().setSportLoginInfo({brand_id:t.brand_id,token:t.token||null}),X(t),W()}catch(e){return console.warn("[PromoBanner] token fetch failed",e),null}},S=async(r,n)=>{let o=c();if(!o||G.current)return;let i=function(t){let r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.push(`/login?${r?"isLogin=false&":""}redirect=${encodeURIComponent(t)}`)},a=e=>{if($.current)return;let t=function(e){if(!e)return l.ux;let t=e.startsWith("/")?e:`/${e}`;return`${l.ux}${t}`}(e);if(!k())return void i(t);window.location.href=`${window.location.origin}${t}`};
1try{L.current=new window.BTRenderer().initialize({brand_id:r.brand_id,token:r.token||"",lang:n,target:o,themeName:r.theme??s.jD.BETBY_SHELL_THEME,widgetName:"promo",onLogin:()=>{k()||i(l.ux)},onRegister:()=>{k()||i(l.ux,!0)},onRecharge:()=>{if(!k())return void i("/personal/recharge");e.push("/personal/recharge")},onTokenExpired:async()=>{if(!D.current?.token?.trim())return"";(0,w.aX)(t);try{let e=await (0,u.L)(l.ud);if(e.token&&!(0,w.j0)(e.token))return D.current=e,X({...e,token:e.token}),e.token}catch{}return""},onSessionRefresh:()=>N.current?.(),onBetSlipStateChange:()=>{},widgetParams:{placeholder:"operator_page",onBannerClick:e=>{let{url:t}=e;a(t)},onOutcomeClick:e=>{let{url:t}=e;t&&a(t)}}}),x.current=!0,O.current=n}catch(e){console.warn("[PromoBanner] mount failed (non-fatal)",e)}};j.current=async e=>{let t=D.current;!G.current&&t?.brand_id&&!$.current&&(await h(),G.current||await S(t,e))};let B=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(!(0,p.Z)())return;let o=++n,i=(0,d.S)();try{if(await (0,g.Wk)("promo"),G.current||o!==n)return void await (0,g.Bn)("promo",{kill:()=>void b()});let u=e>0||(0,g.Gu)()?null:W();if(u?D.current=u:u=await y(),G.current||o!==n)return void await (0,g.Bn)("promo",{kill:()=>void b()});if(!u?.brand_id){console.warn("[PromoBanner] sports login info unavailable",{attempt:e,deviceId:r,partnerId:T,userId:t??"guest",storeBrandId:a.o.getState().sportLoginInfo?.brand_id}),await (0,g.Bn)("promo"),0!==e||G.current||await B(1);return}let d=u.library_url?.trim()||(0,s.eX)(l.ud);if(await _(),await function(e){if("undefined"==typeof document)return Promise.resolve();let t=document.getElementById(f);if(window.BTRenderer&&t?.src===e)return Promise.resolve();if(t&&t.src!==e){m.delete(t.src);let e=document.getElementById(f);e&&(e.onload=null,e.onerror=null,e.remove(),window.BTRenderer=void 0)}let r=m.get(e);if(r)return r;let n=new Promise((t,r)=>{let n=document.createElement("script");n.id=f,n.src=e,n.async=!0,n.crossOrigin="anonymous",n.onload=()=>{new Promise((e,t)=>{if(window.BTRenderer)return void e();let r=0,n=()=>window.BTRenderer?void e():++r>=50?void t(Error("BTRenderer class missing after script load")):void setTimeout(n,100);setTimeout(n,100)}).then(t).catch(r)},n.onerror=()=>{n.onload=null,n.onerror=null,n.remove(),m.delete(e),window.BTRenderer=void 0,r(Error(`Betby script load failed: ${e}`))},document.head.appendChild(n)});return m.set(e,n),n}(d),G.current||o!==n)return void await (0,g.Bn)("promo",{kill:()=>void b()});c(),await S(u,i)}catch(r){let t=r instanceof Error&&/401|403|expired_token|unauthorized/i.test(r.message);console.error(`[PromoBanner] initialization failed (attempt ${e})`,r),await b(),x.current=!1,await (0,g.Bn)("promo"),0!==e||G.current||(((0,g.Gu)()||t)&&console.warn("[PromoBanner] retry after sportsbook teardown / auth error"),await B(1))}};return N.current=async()=>{if(G.current||$.current||!(0,p.Z)())return;$.current=!0;let e=++n,t=(0,d.S)();try{let r=await y();if(G.current||e!==n||!r?.brand_id||(await h(),G.current))return;return await S(r,t),r.token||void 0}catch(e){console.warn("[PromoBanner] session refresh failed",e);return}finally{$.current=!1}},v(()=>B()),()=>{G.current=!0,n+=1,N.current=()=>void 0,j.current=null,$.current=!1,x.current=!1,O.current=null,C.current+=1;let e=L.current;L.current=null,o(),v(()=>{(0,g.Bn)("promo",{kill:()=>{(0,g.Rt)(e).then(()=>i())}})})}},[q,E,t,r,T,R]),(0,o.useEffect)(()=>{if(E&&q)return a.o.subscribe((e,t)=>{if(e.language===t.language)return;let r=(0,d.y)(e.language);if(O.current===r)return;let n=++C.current;v(async()=>{if(n===C.current&&!G.current){if(!x.current)return void(0,h.MT)(r);try{await j.current?.(r),n===C.current&&(O.current=r,(0,h.a2)(r,!0))}catch(e){console.warn("[PromoBanner] banner lang update failed",e),(0,h.a2)(r,!1)}}})})},[q,E]),E)?(0,n.jsx)("div",{id:"SportsBanner",ref:I,className:"promo-banner-host w-full rounded-[0.5rem] md:rounded-xl",style:{minHeight:A}}):null}},74077:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(97822),o=r(18540);function i(){let e=n.o.getState(),t=e.getDeviceId();if(!t)return null;let r=e.getUser(),i=e.getToken(),a=e.partnerInfo,u=Number(r?.partner_id||a?.partner_id||0);
1return u?{did:t,mode:(0,o.B3)(r||a),pid:u,uid:r?.user_id?Number(r.user_id):0,token:i||""}:null}},86298:(e,t,r)=>{r.d(t,{$z:()=>a,MT:()=>l,a2:()=>u});var n=r(86650),o=r(64141);let i=null;function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:12e3;if(!("undefined"!=typeof document&&document.getElementById("SportsBanner")&&"promo"===(0,n.kW)()))return Promise.resolve(!0);let r=(0,o.y)(e);return new Promise(e=>{i&&(clearTimeout(i.timer),i.resolve(!1));let n=setTimeout(()=>{i=null,e(!1)},t);i={betbyLang:r,resolve:t=>{clearTimeout(n),i=null,e(t)},timer:n}})}function u(e,t){i&&i.betbyLang===e&&i.resolve(t)}function l(e){u(e,!0)}},86650:(e,t,r)=>{r.d(t,{Bn:()=>d,Gu:()=>u,Rt:()=>c,Wk:()=>s,iq:()=>l,kW:()=>a});let n=null,o=0,i=Promise.resolve();function a(){return n}function u(){return Date.now()-o<3e5}function l(){return new Promise(e=>setTimeout(e,300))}async function c(e){if(e?.kill)try{let t=e.kill();null!=t&&"function"==typeof t.then&&await t.catch(()=>{})}catch{}}async function s(e){!function(){let e=window;if(e.__betbyIdentifyProbe)return;e.__betbyIdentifyProbe=!0;let t=window.fetch.bind(window);window.fetch=async(e,r)=>{let i=await t(e,r);try{let t="string"==typeof e?e:e instanceof Request?e.url:String(e);t.includes("/auth/brand/")&&t.includes("/identify")&&401===i.status&&console.warn("[BetbyCoordinator] identify 401",{url:t,activeConsumer:n,msSinceSportsbookTeardown:o>0?Date.now()-o:null})}catch{}return i}}(),await i,n&&n!==e&&await d(n),n=e}function d(e,t){if(n!==e)return i;let r=async()=>{try{t?.kill?.()}catch{}try{window.btInstance=void 0}catch{}await new Promise(e=>setTimeout(e,300)),"sportsbook"===e&&(o=Date.now()),n===e&&(n=null)};return i=i.then(r,r)}},96139:(e,t,r)=>{r.d(t,{eX:()=>i,jD:()=>o});var n=r(67354);let o={SCRIPT_URL:"https://ui.invisiblesport.com/bt-renderer.min.js",BETBY_SHELL_THEME:"s9-dark",DEFAULT_BASENAME:"/sports",DEFAULT_BETSLIP_Z_INDEX:100,NAVIGATION:{TOP_HEIGHT:0,BOTTOM_HEIGHT:0}};function i(e){return(0,n.di)(e)?n.b2[e]:n.b2[n.x_.LG_BETBY]}n.b2["LG-BETBY-SP-1"],n.b2["TOP-BETBY-SP-1"],n.b2["BETBY-1"]}}]);

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.