1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8092],{33388:function(e,t,o){o.d(t,{Z:function(){return s}});let s=(0,o(79205).Z)("smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]])},76865:function(e,t,o){o.d(t,{Z:function(){return s}});let s=(0,o(79205).Z)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},91804:function(e,t,o){o.d(t,{Z:function(){return s}});let s=(0,o(79205).Z)("wallet",[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]])},18092:function(e,t,o){o.r(t),o.d(t,{FiatOnrampScreen:function(){return ee},default:function(){return ee}});var s=o(57437),r=o(22121),n=o(6540),a=o(68879),i=o(2782),l=o(23931),c=o(99388),d=o(30401),u=o(79205);let h=(0,u.Z)("credit-card",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);var p=o(33388);let m=(0,u.Z)("building",[["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M9 22v-3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3",key:"cabbwy"}],["rect",{x:"4",y:"2",width:"16",height:"20",rx:"2",key:"1uxh74"}]]);var y=o(91804),g=o(76865);let v=(0,u.Z)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),x=(0,u.Z)("landmark",[["path",{d:"M10 18v-7",key:"wt116b"}],["path",{d:"M11.12 2.198a2 2 0 0 1 1.76.006l7.866 3.847c.476.233.31.949-.22.949H3.474c-.53 0-.695-.716-.22-.949z",key:"1m329m"}],["path",{d:"M14 18v-7",key:"vav6t3"}],["path",{d:"M18 18v-7",key:"aexdmj"}],["path",{d:"M3 22h18",key:"8prr45"}],["path",{d:"M6 18v-7",key:"1ivflk"}]]);var C=o(80717),f=o(2506);o(2265),o(29155),o(87336),o(97048),o(64131),o(84250);let[w,j]=((e,t=750)=>{let o;return[(...s)=>{o&&clearTimeout(o),o=setTimeout(()=>{e(...s)},t)},()=>{o&&clearTimeout(o)}]})(async(e,t)=>{(0,n.I)({isLoading:!0});try{let{getQuotes:o}=(0,n.J)(),s=await o({source:{asset:t.source.selectedAsset.toUpperCase(),amount:e},destination:{asset:t.destination.asset.toUpperCase(),chain:t.destination.chain,address:t.destination.address},environment:t.environment}),r=s.quotes??[],a=s.provider_errors,i=(0,n.K)(r,e);(0,n.I)({localQuotes:r,localSelectedQuote:r[0]??null,isLoading:!1,quotesWarning:i,quotesErrors:a??null})}catch{(0,n.I)({localQuotes:[],localSelectedQuote:null,quotesWarning:"provider_errors",quotesErrors:null})}}),A=e=>{(0,n.I)({amount:e});let{opts:t}=(0,n.J)();w(e,t)},k=async()=>{let{error:e,state:t,onFailure:o,onSuccess:s}=(0,n.J)();j(),e?o(e):"provider-success"===t.status?await s({status:"confirmed"}):"provider-confirming"===t.status?await s({status:"submitted"}):o(Error("User exited flow"))},b=async()=>{let e,t=(0,n.L)();if(!t)return;let o=(0,a.X)();if(!o)return void(0,n.I)({state:{status:"provider-error"},error:Error("Unable to open payment window")});(0,n.I)({isLoading:!0});let{opts:s,amount:r,getProviderUrl:l,getStatus:c,controller:d}=(0,n.J)(),u=()=>{try{o.closed||o.close()}catch{}};d.current=new AbortController;try{let n=await l({source:{asset:s.source.selectedAsset.toUpperCase(),amount:r||"0"},destination:{asset:s.destination.asset.toUpperCase(),chain:s.destination.chain,address:s.destination.address},provider:t.provider,sub_provider:t.sub_provider??void 0,payment_method:t.payment_method,redirect_url:window.location.origin});o.location.href=n.url,e=n.session_id}catch(e){return u(),void(0,n.I)({state:{status:"provider-error"},isLoading:!1,error:Error("Unable to start payment session")})}(0,n.I)({isLoading:!1}),(0,n.I)({state:{status:"provider-confirming"}});let h=await (0,i.p)({operation:()=>c({session_id:e,provider:t.provider}),until:e=>"completed"===e.status||"failed"===e.status||"cancelled"===e.status,delay:0,interval:2e3,attempts:60,signal:d.current.signal});if("aborted"!==h.status){if("max_attempts"===h.status)return u(),h.error?(console.error(h.error),void(0,n.I)({state:{status:"select-amount"},isLoading:!1,error:Error("Unable to check payment status. Please try again.")})):void(0,n.I)({state:{status:"provider-error"},error:Error("Could not confirm payment status yet.")});"completed"===h.result?.status?(u(),(0,n.I)({state:{status:"provider-success"}})):(u(),(0,n.I)({state:{status:"provider-error"},error:Error(`Transaction ${h.result?.status??"failed"}`)}))}},E=()=>{let e=(0,n.M)();e&&e.length>0&&(0,n.I)({state:{status:"select-payment-method",quotes:e}})},z=()=>{(0,n.I)({state:{status:"select-source-asset"}})},M=()=>{(0,n.I)({error:null,state:{status:"select-amount"}})},P=e=>{(0,n.I)({localSelectedQuote:e,state:{status:"select-amount"}})},S=e=>{let{opts:t,amount:o}=(0,n.J)(),s={...t,source:{...t.source,selectedAsset:e}};(0,n.I)({opts:s,state:{status:"select-amount"}}),w(o,s)},_=({onClose:e})=>(0,s.jsx)(l.S,{showClose:!0,onClose:e,iconVariant:"loading",title:"Processing transaction",subtitle:"Your purchase is in progress. You can leave this screen â weâll notify you when itâs complete.",primaryCta:{label:"Done",onClick:e},watermark:!0}),I=({onClose:e,onRetry:t})=>(0,s.jsx)(l.S,{showClose:!0,onClose:e,icon:c.Z,iconVariant:"error",title:"Something went wrong",subt
1itle:"We couldn't complete your transaction. Please try again.",primaryCta:{label:"Try again",onClick:t},secondaryCta:{label:"Close",onClick:e},watermark:!0}),L=({onClose:e})=>(0,s.jsx)(l.S,{showClose:!0,onClose:e,icon:d.Z,iconVariant:"success",title:"Transaction confirmed",subtitle:"Your purchase is processing. Funds should arrive in your wallet within a few minutes.",primaryCta:{label:"Done",onClick:e},watermark:!0}),q={CREDIT_DEBIT_CARD:"card",APPLE_PAY:"Apple Pay",GOOGLE_PAY:"Google Pay",BANK_TRANSFER:"bank deposit",ACH:"bank deposit",SEPA:"bank deposit",PIX:"PIX"},R={CREDIT_DEBIT_CARD:(0,s.jsx)(h,{size:14}),APPLE_PAY:(0,s.jsx)(p.Z,{size:14}),GOOGLE_PAY:(0,s.jsx)(p.Z,{size:14}),BANK_TRANSFER:(0,s.jsx)(m,{size:14}),ACH:(0,s.jsx)(m,{size:14}),SEPA:(0,s.jsx)(m,{size:14}),PIX:(0,s.jsx)(y.Z,{size:14})},T=e=>R[e]??(0,s.jsx)(h,{size:14}),Z=({opts:e,onClose:t,onEditSourceAsset:o,onEditPaymentMethod:r,onContinue:n,onAmountChange:a,amount:c,selectedQuote:d,quotesWarning:u,quotesErrors:h,quotesCount:p,isLoading:m})=>{var y;return(0,s.jsxs)(l.S,{showClose:!0,onClose:t,headerTitle:`Buy ${e.destination.asset.toLocaleUpperCase()}`,primaryCta:{label:"Continue",onClick:n,loading:m,disabled:!d},helpText:u?(0,s.jsxs)(D,{children:[(0,s.jsx)(g.Z,{size:16,strokeWidth:2}),(0,s.jsx)(B,{children:(0,s.jsxs)(s.Fragment,"amount_too_low"===u?{children:[(0,s.jsx)(F,{children:"Amount too low"}),(0,s.jsx)(H,{children:"Please choose a higher amount to continue."})]}:{children:[(0,s.jsx)(F,{children:"Unable to get quotes"}),(0,s.jsx)(H,{children:h?.[0]?.error??"Something went wrong. Please try again."})]})})]}):d&&p>1?(0,s.jsxs)(Q,{onClick:r,children:[T(d.payment_method),(0,s.jsxs)("span",{children:["Pay with ",q[y=d.payment_method]??y.replace(/_/g," ").toLowerCase().replace(/^\w/,e=>e.toUpperCase())]}),(0,s.jsx)(v,{size:14})]}):null,watermark:!0,children:[(0,s.jsx)(i.A,{currency:e.source.selectedAsset,value:c,onChange:a,inputMode:"decimal",autoFocus:!0}),(0,s.jsx)(i.C,{selectedAsset:e.source.selectedAsset,onEditSourceAsset:o})]})},D=C.zo.div` 2 display: flex; 3 align-items: flex-start; 4 gap: 0.5rem; 5 padding: 0.75rem; 6 border-radius: 0.5rem; 7 background-color: var(--privy-color-warn-bg, #fffbbb); 8 border: 1px solid var(--privy-color-border-warning, #facd63); 9 overflow: clip; 10 width: 100%; 11 12 svg { 13 flex-shrink: 0; 14 color: var(--privy-color-icon-warning, #facd63); 15 } 16`,B=C.zo.div` 17 display: flex; 18 flex-direction: column; 19 gap: 0.125rem; 20 flex: 1; 21 min-width: 0; 22 font-size: 0.75rem; 23 line-height: 1.125rem; 24 color: var(--privy-color-foreground); 25 font-feature-settings: 26 'calt' 0, 27 'kern' 0; 28 text-align: left; 29`,F=C.zo.span` 30 font-weight: 600; 31`,H=C.zo.span` 32 font-weight: 400; 33`,Q=C.zo.button` 34 display: inline-flex; 35 align-items: center; 36 gap: 0.25rem; 37 background: none; 38 border: none; 39 cursor: pointer; 40 41 && { 42 padding: 0; 43 color: var(--privy-color-accent); 44 font-size: 0.875rem; 45 font-style: normal; 46 font-weight: 500; 47 line-height: 1.375rem; 48 } 49`,U={CREDIT_DEBIT_CARD:"Credit / debit card",APPLE_PAY:"Apple Pay",GOOGLE_PAY:"Google Pay",BANK_TRANSFER:"Bank transfer",ACH:"ACH",SEPA:"SEPA",PIX:"PIX"},G={CREDIT_DEBIT_CARD:(0,s.jsx)(h,{size:20}),APPLE_PAY:(0,s.jsx)(f.A,{width:20,height:20}),GOOGLE_PAY:(0,s.jsx)(f.G,{width:20,height:20}),BANK_TRANSFER:(0,s.jsx)(x,{size:20}),ACH:(0,s.jsx)(x,{size:20}),SEPA:(0,s.jsx)(x,{size:20}),PIX:(0,s.jsx)(x,{size:20})},N=e=>G[e]??(0,s.jsx)(h,{size:20}),Y=({onClose:e,onSelectPaymentMethod:t,quotes:o,isLoading:r})=>(0,s.jsx)(l.S,{showClose:!0,onClose:e,title:"Select payment method",subtitle:"Choose how you'd like to pay",watermark:!0,children:(0,s.jsx)(O,{children:o.map((e,o)=>{var n;return(0,s.jsx)(V,{onClick:()=>t(e),disabled:r,children:(0,s.jsxs)(W,{children:[(0,s.jsx)(X,{children:N(e.payment_method)}),(0,s.jsx)(K,{children:(0,s.jsx)(J,{children:U[n=e.payment_method]??n.replace(/_/g," ").toLowerCase().replace(/^\w/,e=>e.toUpperCase())})})]})},`${e.provider}-${e.payment_method}-${o}`)})})}),O=C.zo.div` 50 display: flex; 51 flex-direction: column; 52 gap: 0.75rem; 53 width: 100%; 54`,V=C.zo.button` 55 border-color: var(--privy-color-border-default); 56 border-width: 1px; 57 border-radius: var(--privy-border-radius-md); 58 border-style: solid; 59 display: flex; 60 61 && { 62 padding: 1rem 1rem; 63 } 64`,W=C.zo.div` 65 display: flex; 66 align-items: center; 67 gap: 1rem; 68 width: 100%; 69`,X=C.zo.div` 70 color: var(--privy-color-foreground-3); 71 display: flex; 72 align-items: center; 73 justify-content: center; 74 flex-shrink: 0; 75`,K=C.zo.div` 76 display: flex; 77 flex-direction: column; 78 align-items: flex-start; 79 gap: 0.125rem; 80 flex: 1; 81`,J=C.zo.span` 82 color: var(--privy-color-foreground); 83 font-size: 0.875rem; 84 font-weight: 400; 85 line-height: 1.25rem; 86`,$=({onClose:e,onContinue:t,onAmountChange:o,onSelectSource:r,onEditSourceAsset:n,onEditPaymentMethod:a,onSelectPaymentMethod:l,onRetry:c,opts:d,state:u,amount:h,selectedQuote:p,quotesWarning:m,quotesErrors:y,quotesCount:g,isLoading:v})=>"select-amount"===u.status?(0,s.jsx)(Z,{onClose:e,onContinue:t,onAmountChange:o,onEditSourceAsset:n,onEditPaymentMethod:a,opts:d,amount:h,selectedQuote:p,quotesWarning:m,quotesErrors:y,quotesCount:g,isLoading:v}):"select-source-asset"===u.status?(0,s.jsx)(i.S,{onSelectSource:r,opts:d,isLoading:v}):"select-payment-method"===u.status?(0,s.jsx)(Y,{onClose:e,onSelectPaymentMethod:l,quotes:u.quotes,isLoading:v}):"provider-confirming"===u.status?(0,s.jsx)(_,{onClose:e}):"provider-error"===u.status?(0,s.jsx)(I,{onClose:e,onRetry:c}):"provider-success"===u.status?(0,s.jsx)(L,{onClose:e}):null,ee={component:()=>{let{onUserCloseViaDialogOrKeybindRef:e}=(0,r.a)(),t=(0,n.N)();if(!t)return null;let{opts:o,state:a,isLoading:i,amount:l,quotesWarning:c,quotesErrors:d,localQuotes:u,localSelectedQuote:h,initialQuotes:p,initialSelectedQuote:m}=t;return e.current=k,(0,s.jsx)($,{onClose:k,opts:o,state:a,isLoading:i,amount:l,selectedQuote:h??m,quotesWarning:c,quotesErrors:d,quotesCount:(u??p)?.length??0,onAmountChange:A,onContinue:b,onSelectSource:S,onEditSourceAsset:z,onEditPaymentMethod:E,onSelectPaymentMethod:P,onRetry:M})}}},2506:function(e,t,o){o.d(t,{A:function(){return r},G:function(){return n}});var s=o(57437);let r=e=>(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 210.2",xmlSpace:"preserve",...e,children:(0,s.jsx)("path",{d:"M93.6,27.1C87.6,34.2,78,39.8,68.4,39c-1.2-9.6,3.5-19.8,9-26.1c6-7.3,16.5-12.5,25-12.9 C103.4,10,99.5,19.8,93.6,27.1 M102.3,40.9c-13.9-0.8-25.8,7.9-32.4,7.9c-6.7,0-16.8-7.5-27.8-7.3c-14.3,0.2-27.6,8.3-34.9,21.2 c-15,25.8-3.9,64,10.6,85c7.1,10.4,15.6,21.8,26.8,21.4c10.6-0.4,14.8-6.9,27.6-6.9c12.9,0,16.6,6.9,27.8,6.7 c11.6-0.2,18.9-10.4,26-20.8c8.1-11.8,11.4-23.3,11.6-23.9c-0.2-0.2-22.4-8.7-22.6-34.3c-0.2-21.4,17.5-31.6,18.3-32.2 C123.3,42.9,107.7,41.3,102.3,40.9 M182.6,11.9v155.9h24.2v-53.3h33.5c30.6,0,52.1-21,52.1-51.4c0-30.4-21.1-51.2-51.3-51.2H182.6z M206.8,32.3h27.9c21,0,33,11.2,33,30.9c0,19.7-12,31-33.1,31h-27.8V32.3z M336.6,169c15.2,0,29.3-7.7,35.7-19.9h0.5v18.7h22.4V90.2 c0-22.5-18-37-45.7-37c-25.7,0-44.7,14.7-45.4,34.9h21.8c1.8-9.6,10.7-15.9,22.9-15.9c14.8,0,23.1,6.9,23.1,19.6v8.6l-30.2,1.8 c-28.1,1.7-43.3,13.2-43.3,33.2C298.4,155.6,314.1,169,336.6,169z M343.1,150.5c-12.9,0-21.1-6.2-21.1-15.7c0-9.8,7.9-15.5,23-16.4 l26.9-1.7v8.8C371.9,140.1,359.5,150.5,343.1,150.5z M425.1,210.2c23.6,0,34.7-9,44.4-36.3L512,54.7h-24.6l-28.5,92.1h-0.5 l-28.5-92.1h-25.3l41,113.5l-2.2,6.9c-3.7,11.7-9.7,
8616.2-20.4,16.2c-1.9,0-5.6-0.2-7.1-0.4v18.7C417.3,210,423.3,210.2,425.1,210.2z"})}),n=e=>(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 80 38.1",xmlSpace:"preserve",...e,children:[(0,s.jsx)("path",{style:{fill:"#5F6368"},d:"M37.8,19.7V29h-3V6h7.8c1.9,0,3.7,0.7,5.1,2c1.4,1.2,2.1,3,2.1,4.9c0,1.9-0.7,3.6-2.1,4.9c-1.4,1.3-3.1,2-5.1,2 L37.8,19.7L37.8,19.7z M37.8,8.8v8h5c1.1,0,2.2-0.4,2.9-1.2c1.6-1.5,1.6-4,0.1-5.5c0,0-0.1-0.1-0.1-0.1c-0.8-0.8-1.8-1.3-2.9-1.2 L37.8,8.8L37.8,8.8z"}),(0,s.jsx)("path",{style:{fill:"#5F6368"},d:"M56.7,12.8c2.2,0,3.9,0.6,5.2,1.8s1.9,2.8,1.9,4.8V29H61v-2.2h-0.1c-1.2,1.8-2.9,2.7-4.9,2.7 c-1.7,0-3.2-0.5-4.4-1.5c-1.1-1-1.8-2.4-1.8-3.9c0-1.6,0.6-2.9,1.8-3.9c1.2-1,2.9-1.4,4.9-1.4c1.8,0,3.2,0.3,4.3,1v-0.7 c0-1-0.4-2-1.2-2.6c-0.8-0.7-1.8-1.1-2.9-1.1c-1.7,0-3,0.7-3.9,2.1l-2.6-1.6C51.8,13.8,53.9,12.8,56.7,12.8z M52.9,24.2 c0,0.8,0.4,1.5,1,1.9c0.7,0.5,1.5,0.8,2.3,0.8c1.2,0,2.4-0.5,3.3-1.4c1-0.9,1.5-2,1.5-3.2c-0.9-0.7-2.2-1.1-3.9-1.1 c-1.2,0-2.2,0.3-3,0.9C53.3,22.6,52.9,23.3,52.9,24.2z"}),(0,s.jsx)("path",{style:{fill:"#5F6368"},d:"M80,13.3l-9.9,22.7h-3l3.7-7.9l-6.5-14.7h3.2l4.7,11.3h0.1l4.6-11.3H80z"}),(0,s.jsx)("path",{style:{fill:"#4285F4"},d:"M25.9,17.7c0-0.9-0.1-1.8-0.2-2.7H13.2v5.1h7.1c-0.3,1.6-1.2,3.1-2.6,4v3.3H22C24.5,25.1,25.9,21.7,25.9,17.7z"}),(0,s.jsx)("path",{style:{fill:"#34A853"},d:"M13.2,30.6c3.6,0,6.6-1.2,8.8-3.2l-4.3-3.3c-1.2,0.8-2.7,1.3-4.5,1.3c-3.4,0-6.4-2.3-7.4-5.5H1.4v3.4 C3.7,27.8,8.2,30.6,13.2,30.6z"}),(0,s.jsx)("path",{style:{fill:"#FBBC04"},d:"M5.8,19.9c-0.6-1.6-0.6-3.4,0-5.1v-3.4H1.4c-1.9,3.7-1.9,8.1,0,11.9L5.8,19.9z"}),(0,s.jsx)("path",{style:{fill:"#EA4335"},d:"M13.2,9.4c1.9,0,3.7,0.7,5.1,2l0,0l3.8-3.8c-2.4-2.2-5.6-3.5-8.8-3.4c-5,0-9.6,2.8-11.8,7.3l4.4,3.4 C6.8,11.7,9.8,9.4,13.2,9.4z"})]})}}]); 87//# sourceMappingURL=8092.12be013b9ffd99b2.js.map
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.