try{let e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`5197b1a8-b43a-497f-ae9a-f840982fa417`,e._sentryDebugIdIdentifier=`sentry-dbid-5197b1a8-b43a-497f-ae9a-f840982fa417`)}catch{}import{o as e}from"./rolldown-runtime-eb2nym32.js";import{st as t}from"./xds-react-components-lks62tbl.js";import{Ag as n,Dg as r,Fg as i,Ig as a,Qn as o,Ym as s,Yn as c,dn as l,fs as u,lh as d,mr as f,sh as p}from"./entry.client-dr7r6s9a.js";import{n as m,r as h,t as g}from"./useCommonAccelerator-gnlmbc7n.js";import{t as _}from"./AcceleratorCanvas-11vakef6.js";import{o as v}from"./navigation-stack-m5o0zkpw.js";var y=i(),b=e(a(),1),x=n(),S=[`w-full`,`w-[90%]`,`w-[75%]`,`w-full`,`w-[85%]`,`w-[60%]`,`w-full`,`w-[95%]`,`w-[70%]`,`w-[80%]`,`w-[55%]`],C=40,w=l(e=>{let n=(0,y.c)(12),{isLoading:r,isError:i,content:a}=e,{t:s}=d(`NoticesPage`);if(r){let e;n[0]===s?e=n[1]:(e=s(`Loading third-party notices`,{shortKey:`notices_loading`}),n[0]=s,n[1]=e);let r=e,i;n[2]===r?i=n[3]:(i=Array.from({length:C},(e,t)=>(0,x.jsx)(c,{className:`h-[var(--V20X)] ${S[t%S.length]}`,label:t===0?r:void 0},t)),n[2]=r,n[3]=i);let a;return n[4]===i?a=n[5]:(a=(0,x.jsx)(t,{className:`h-screen overflow-y-auto`,scrollAxis:`vertical`,children:(0,x.jsx)(o,{className:`twscope ms-4 flex min-h-[100dvh] flex-col gap-2 overflow-hidden p-4`,children:i})}),n[4]=i,n[5]=a),a}if(i){let e;n[6]===s?e=n[7]:(e=s(`Unable to load third-party notices. Please try again later.`,{shortKey:`notices_error`}),n[6]=s,n[7]=e);let r=e,i;return n[8]===r?i=n[9]:(i=(0,x.jsx)(t,{className:`h-screen overflow-y-auto`,scrollAxis:`vertical`,children:(0,x.jsx)(`div`,{className:`twscope ms-4 p-4 type-body`,children:(0,x.jsx)(`p`,{children:r})})}),n[8]=r,n[9]=i),i}let l;return n[10]===a?l=n[11]:(l=(0,x.jsx)(t,{className:`h-screen overflow-y-auto`,scrollAxis:`vertical`,children:(0,x.jsx)(`pre`,{className:`twscope ms-4 whitespace-pre-wrap p-4 type-body`,children:a})}),n[10]=a,n[11]=l),l},e=>{let{navigateBack:t}=v();m(g(`gamepad-back`,t)),h((0,b.useMemo)(()=>({trigger:{type:`keyboard`,key:u.TVRemoteBack,modifiers:[]},action:t,sound:`back`,isHidden:!0}),[t]));let{ossNotices:n}=p(),{isLoading:i,isError:a,data:o}=r(n.queries.webNotices.getOptions()),{isLoading:s,data:c}=r(n.queries.nativeNotices.getOptions()),l=typeof o==`string`,d=a||!i&&!l,f=!i&&!d&&l?n.combineNotices(o,c??null):``,_=!i&&!s&&!d&&f.length===0;return{isLoading:i,isError:d||_,content:f}}),T=s(f(()=>{let e=w.useComponent(),t=_.useComponent();return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(e,{}),(0,x.jsx)(`div`,{className:`z-shell-bottom pointer-events-none fixed inset-0 flex flex-col justify-end`,children:(0,x.jsx)(t,{})})]})},`NoticesPage`));export{T as default};