1import{e as c}from"./index-D_ClEXwR.js";import{g as f}from"./fundingSources-BpcYhFC_.js";const _="ACCOUNT_CREATION",h=40;var t=(a=>(a.HAS_AVAILABLE_BALANCE="HAS_AVAILABLE_BALANCE",a.HAS_VIRTUAL_CARDS="HAS_VIRTUAL_CARDS",a.HAS_PENDING_DEPOSITS="HAS_PENDING_DEPOSITS",a))(t||{});`${c.SourcePlatformChannel.WIDGET}`;const p=a=>a?.preferences?.image_url||void 0,u=a=>a?.created_by===_,I=a=>{const e=f(a);return{id:a?.user_cash_balance_id,name:e,imageUrl:p(a),isMain:a?.created_by===_,letter:e.charAt(0).toUpperCase()}},P=a=>{if(a.user_cash_balance_id)return{user_cash_balance_id:a.user_cash_balance_id,created_by:a.user_cash_balance_created_by??"",nickname:a.user_cash_balance_nickname,preferences:{image_url:a.user_cash_balance_image_url}}},T=u,l=a=>a?.is_default===!0,L=(a,e)=>!!(e&&a.account_id===e&&l(a)),D=a=>a.find(l)??a.find(u),y=(a,e,n)=>{if(!a)return 0;const{available_cash_balance:o=0,available_gift_card_balance:i=0,unlocked_rewards_balance:A=0,user_cash_balances:r=[]}=a,{use_prepayment_balance:d,use_rewards_balance:S}=n||{},s=(d?i:0)+(S?A:0);return e?((r||[]).find(b=>b?.user_cash_balance_id===e)?.available_cash_balance??0)+s:(D(r)?.available_cash_balance??o)+s},H=(a,e)=>`/cards?type=${e}&fundingSource=${a}`,m=a=>a?.created_by?.startsWith(c.SourcePlatformChannel.WIDGET),U=a=>!m(a),B=a=>{if(!a)return!1;const{balance:e}=a;return(e?.user_cash_balances||[]).length>=2},R=({hasPendingDeposits:a,hasActiveVirtualCards:e,hasAvailableBalance:n})=>a?t.HAS_PENDING_DEPOSITS:e?t.HAS_VIRTUAL_CARDS:n?t.HAS_AVAILABLE_BALANCE:null,V=(a,e)=>(a.created_by?.includes(c.SourcePlatformChannel.WIDGET)??!1)===e;export{t as C,_ as D,h as S,D as a,L as b,p as c,u as d,U as e,l as f,I as g,R as h,m as i,B as j,H as k,P as l,T as m,y as n,V as u};
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.