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]=`ae3b6e53-61cd-48db-b441-10fbe1fd4228`,e._sentryDebugIdIdentifier=`sentry-dbid-ae3b6e53-61cd-48db-b441-10fbe1fd4228`)}catch{}import{o as e}from"./rolldown-runtime-eb2nym32.js";import{Ag as t,Fg as n,Ig as r,dn as i,ep as a,sh as o,th as s,wg as c}from"./entry.client-dr7r6s9a.js";import{t as l}from"./useFlowId-n9vqrww9.js";import{t as u}from"./RedeemHost-jvewtwjr.js";import{n as d}from"./DialogShell-k2jpaw9r.js";var f=n(),p=e(r(),1),m=t(),h=i(e=>{let t=(0,f.c)(3),n=u.useComponent(),r;return t[0]!==n||t[1]!==e?(r=(0,m.jsx)(n,{...e}),t[0]=n,t[1]=e,t[2]=r):r=t[2],r},e=>{let{queryClient:t,systems:{dialog:n}}=s(),r=l(),{authentication:{queries:{xToken:i}}}=o(),{mutate:u}=c(n.mutations.goBack.getOptions()),d=(0,p.useCallback)(async e=>(await t.fetchQuery(i.getActiveUserQuery().getOptions({relyingParty:a.MDollar,uri:e}))).toAuthenticationHeader(),[t,i]),f=(0,p.useCallback)(e=>{u()},[u]);return{...e,getAuthToken:d,onExit:f,flowId:r}}),g=e=>{let t=(0,f.c)(11),n=d.useComponent(),r=h.useComponent(),i=e.allowedStoreIds,a=e.redeemFlowConfiguration,o=e.disallowCsvRedemption,s=e.campaignId,c=e.optionalCampaignId,l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=performance.now(),t[0]=l):l=t[0];let u;t[1]!==r||t[2]!==e.allowedStoreIds||t[3]!==e.redeemFlowConfiguration||t[4]!==e.disallowCsvRedemption||t[5]!==e.campaignId||t[6]!==e.optionalCampaignId?(u=(0,m.jsx)(r,{allowedStoreIds:i,redeemFlowConfiguration:a,disallowCsvRedemption:o,campaignId:s,optionalCampaignId:c,redeemLaunchStartTime:l}),t[1]=r,t[2]=e.allowedStoreIds,t[3]=e.redeemFlowConfiguration,t[4]=e.disallowCsvRedemption,t[5]=e.campaignId,t[6]=e.optionalCampaignId,t[7]=u):u=t[7];let p;return t[8]!==n||t[9]!==u?(p=(0,m.jsx)(n,{className:`h-full w-full overflow-visible`,children:u}),t[8]=n,t[9]=u,t[10]=p):p=t[10],p};export{g as RedeemDialog,g as default};