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]=`28912bed-fcce-4a34-aa9d-9a2402241006`,e._sentryDebugIdIdentifier=`sentry-dbid-28912bed-fcce-4a34-aa9d-9a2402241006`)}catch{}import"./rolldown-runtime-nx40z1zs.js";import{Dm as e,Lm as t}from"./entry.client-mpghtlrl.js";import{t as n}from"./home-pdp-leaf-utils-hnv6pld2.js";import{t as r}from"./ProductDetailPage-e885m6l9.js";var i=(e,t,n)=>{let r=()=>{t.getQueryCache().get(n)?.cancel().catch(()=>{})};return e.aborted?(r(),()=>{}):(e.addEventListener(`abort`,r,{once:!0}),()=>{e.removeEventListener(`abort`,r)})},a=(t,n)=>{if(n.length===0)return!1;try{let{pathname:r}=new URL(t.url);return n.some(t=>e(t,r)!==null)}catch{return!1}},o=n(({params:e,context:t,request:n})=>{let{productId:r}=e;if(!r)return;let{systems:o,queryClient:s,env:{queryHashCache:c}}=t;if(!a(n,o.performance.getCachedRoutePrefetchAllowedPathPatterns())||n.signal.aborted)return;let l=o.catalog.queries.productInfo.detailed.getOptions({productId:r}),u=i(n.signal,s,c.queryHashForQueryOptions(l));s.prefetchQuery(l).finally(u);let d=o.authentication.queries.isFullySignedIn.getOptions(),f=i(n.signal,s,c.queryHashForQueryOptions(d));s.ensureQueryData(d).then(e=>{if(f(),n.signal.aborted||typeof e!=`boolean`)return;let t=(e?o.xboxcomFD.queries.product.getActiveUserQuery():o.xboxcomFD.queries.product.getAnonymousQuery()).getOptions({productId:r}),a=i(n.signal,s,c.queryHashForQueryOptions(t));s.prefetchQuery(t).finally(a)}).catch(()=>{f()})}),s=t(r);export{o as clientLoader,s as default};