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]=`ddc38517-fc60-4837-9414-38dd5ab1deaf`,e._sentryDebugIdIdentifier=`sentry-dbid-ddc38517-fc60-4837-9414-38dd5ab1deaf`)}catch{}import{o as e}from"./rolldown-runtime-nx40z1zs.js";import{Ag as t,Um as n,jg as r,ng as i}from"./entry.client-mpghtlrl.js";import{lr as a}from"./workspace-leaf-files-oergw4h0.js";import{a as o}from"./purchasePageReadyUtils-h1z511qr.js";import{f as s,n as c,r as l,t as u}from"./Spinner-bhkd19qw.js";var d=t(),f=e(r(),1),p=i(),m={success:`https://www.microsoft.com/en-US/store/rds/v2/GeneralAddPISuccess`,failure:`https://www.microsoft.com/en-US/store/rds/v2/GeneralAddPIFailure`,gohome:`https://play.xbox.com`},h=e=>{let t=(0,d.c)(42),{getLogger:r}=n(),i,h;t[0]===r?h=t[1]:(h=new l(r),t[0]=r,t[1]=h),i=h;let g=i,[_,v]=(0,f.useState)(null),[y,b]=(0,f.useState)(!1),x;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(x=e=>v(e),t[2]=x):x=t[2];let S=x,C,w;t[3]!==e.requiresFingerprinting||t[4]!==e.returnOptions.callbacks||t[5]!==_||t[6]!==y?(C=()=>{e.requiresFingerprinting&&_&&y&&e.returnOptions.callbacks?.success?.(_)},w=[e.returnOptions.callbacks,_,y,e.requiresFingerprinting],t[3]=e.requiresFingerprinting,t[4]=e.returnOptions.callbacks,t[5]=_,t[6]=y,t[7]=C,t[8]=w):(C=t[7],w=t[8]),(0,f.useEffect)(C,w);let T=e.session.challengeStatus,E=e.session.challengeScenario,D=e.session.challengeWindowSize,O;t[9]!==e.session||t[10]!==T||t[11]!==E||t[12]!==D?(O={...e.session,challengeStatus:T,challengeScenario:E,challengeWindowSize:D},t[9]=e.session,t[10]=T,t[11]=E,t[12]=D,t[13]=O):O=t[13];let k;t[14]===e.returnOptions.urls?k=t[15]:(k={...m,...e.returnOptions.urls},t[14]=e.returnOptions.urls,t[15]=k);let A;t[16]===e?A=t[17]:(A=e.requiresFingerprinting&&{callbacks:{...e.returnOptions.callbacks,success:S}},t[16]=e,t[17]=A);let j;t[18]!==e.returnOptions||t[19]!==k||t[20]!==A?(j={...e.returnOptions,urls:k,...A},t[18]=e.returnOptions,t[19]=k,t[20]=A,t[21]=j):j=t[21];let M;t[22]===e.authToken?M=t[23]:(M={authToken:e.authToken,userId:`me`},t[22]=e.authToken,t[23]=M);let N;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(N={containerId:`bankChallengeContainer`},t[24]=N):N=t[24];let P;t[25]===e.cV?P=t[26]:(P={contextData:{cvInitValue:e.cV,partnerName:a}},t[25]=e.cV,t[26]=P);let F;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,p.jsx)(u,{}),t[27]=F):F=t[27];let I;t[28]!==O||t[29]!==j||t[30]!==M||t[31]!==P||t[32]!==e.containerRef||t[33]!==g?(I=(0,p.jsx)(c,{children:(0,p.jsx)(`div`,{id:`bankChallengeContainer`,className:`relative flex h-full justify-center`,children:(0,p.jsx)(s,{paymentSessionOrData:O,env:`prod`,returnOptions:j,userContext:M,displayOptions:N,telemetryOptions:P,containerRef:e.containerRef,busyBlockElement:F,elementFactory:g})})}),t[28]=O,t[29]=j,t[30]=M,t[31]=P,t[32]=e.containerRef,t[33]=g,t[34]=I):I=t[34];let L;t[35]!==_?.id||t[36]!==e?(L=(_?.id||e.session.id)&&(0,p.jsx)(o,{sessionId:_?.id||e.session.id,onFingerprintingDone:()=>b(!0)}),t[35]=_?.id,t[36]=e,t[37]=L):L=t[37];let R;return t[38]!==e.shell||t[39]!==I||t[40]!==L?(R=(0,p.jsxs)(e.shell,{children:[I,L]}),t[38]=e.shell,t[39]=I,t[40]=L,t[41]=R):R=t[41],R};export{h as t};