1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2672],{79205:function(e,r,n){n.d(r,{Z:function(){return h}});var t=n(2265);let i=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),s=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,n)=>n?n.toUpperCase():r.toLowerCase()),o=e=>{let r=s(e);return r.charAt(0).toUpperCase()+r.slice(1)},a=function(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];return r.filter((e,r,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===r).join(" ").trim()},l=e=>{for(let r in e)if(r.startsWith("aria-")||"role"===r||"title"===r)return!0};var c={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let d=(0,t.forwardRef)((e,r)=>{let{color:n="currentColor",size:i=24,strokeWidth:s=2,absoluteStrokeWidth:o,className:d="",children:h,iconNode:u,...x}=e;return(0,t.createElement)("svg",{ref:r,...c,width:i,height:i,stroke:n,strokeWidth:o?24*Number(s)/Number(i):s,className:a("lucide",d),...!h&&!l(x)&&{"aria-hidden":"true"},...x},[...u.map(e=>{let[r,n]=e;return(0,t.createElement)(r,n)}),...Array.isArray(h)?h:[h]])}),h=(e,r)=>{let n=(0,t.forwardRef)((n,s)=>{let{className:l,...c}=n;return(0,t.createElement)(d,{ref:s,iconNode:r,className:a("lucide-".concat(i(o(e))),"lucide-".concat(e),l),...c})});return n.displayName=o(e),n}},30401:function(e,r,n){n.d(r,{Z:function(){return t}});let t=(0,n(79205).Z)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},78867:function(e,r,n){n.d(r,{Z:function(){return t}});let t=(0,n(79205).Z)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},66337:function(e,r,n){n.d(r,{Z:function(){return t}});let t=(0,n(79205).Z)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])},76865:function(e,r,n){n.d(r,{Z:function(){return t}});let t=(0,n(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"}]])},58928:function(e,r,n){var t=n(2265);let i=t.forwardRef(function(e,r){let{title:n,titleId:i,...s}=e;return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":i},s),n?t.createElement("title",{id:i},n):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.35 3.836c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m8.9-4.414c.376.023.75.05 1.124.08 1.131.094 1.976 1.057 1.976 2.192V16.5A2.25 2.25 0 0 1 18 18.75h-2.25m-7.5-10.5H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V18.75m-7.5-10.5h6.375c.621 0 1.125.504 1.125 1.125v9.375m-8.25-3 1.5 1.5 3-3.75"}))});r.Z=i},45402:function(e,r,n){var t=n(2265);let i=t.forwardRef(function(e,r){let{title:n,titleId:i,...s}=e;return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":i},s),n?t.createElement("title",{id:i},n):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"}))});r.Z=i},3848:function(e,r,n){n.d(r,{Cr:function(){return o},LH:function(){return a},R1:function(){return s}});var t=n(71282),i=n(39502);function s(e){return e?`${e.slice(0,5)}â¦${e.slice(-4)}`:""}function o({wei:e,precision:r=3}){return parseFloat((0,t.d)(e)).toFixed(r).replace(/0+$/,"").replace(/\.$/,"")}function a({amount:e,decimals:r}){return(0,i.b)(BigInt(e),r)}},16676:function(e,r,n){n.d(r,{A:function(){return d}});var t=n(57437),i=n(30401),s=n(78867),o=n(2265),a=n(80717),l=n(9228),c=n(74002);let d=({address:e,showCopyIcon:r,url:n,className:a})=>{let[d,p]=(0,o.useState)(!1);function m(r){r.stopPropagation(),navigator.clipboard.writeText(e).then(()=>p(!0)).catch(console.error)}return(0,o.useEffect)(()=>
1{if(d){let e=setTimeout(()=>p(!1),3e3);return()=>clearTimeout(e)}},[d]),(0,t.jsxs)(h,n?{children:[(0,t.jsx)(x,{title:e,className:a,href:`${n}/address/${e}`,target:"_blank",children:(0,l.v)(e)}),r&&(0,t.jsx)(c.S,{onClick:m,size:"sm",style:{gap:"0.375rem"},children:(0,t.jsxs)(t.Fragment,d?{children:["Copied",(0,t.jsx)(i.Z,{size:16})]}:{children:["Copy",(0,t.jsx)(s.Z,{size:16})]})})]}:{children:[(0,t.jsx)(u,{title:e,className:a,children:(0,l.v)(e)}),r&&(0,t.jsx)(c.S,{onClick:m,size:"sm",style:{gap:"0.375rem",fontSize:"14px"},children:(0,t.jsxs)(t.Fragment,d?{children:["Copied",(0,t.jsx)(i.Z,{size:14})]}:{children:["Copy",(0,t.jsx)(s.Z,{size:14})]})})]})},h=a.zo.span` 2 display: inline-flex; 3 align-items: center; 4 gap: 0.5rem; 5`,u=a.zo.span` 6 font-size: 14px; 7 font-weight: 500; 8 color: var(--privy-color-foreground); 9`,x=a.zo.a` 10 font-size: 14px; 11 color: var(--privy-color-foreground); 12 text-decoration: none; 13 14 &:hover { 15 text-decoration: underline; 16 } 17`},57440:function(e,r,n){n.d(r,{C:function(){return s}});var t=n(57437),i=n(80717);let s=({className:e,checked:r,color:n="var(--privy-color-accent)",...i})=>(0,t.jsx)("label",{children:(0,t.jsxs)(o,{className:e,children:[(0,t.jsx)(l,{checked:r,...i}),(0,t.jsx)(c,{color:n,checked:r,children:(0,t.jsx)(a,{viewBox:"0 0 24 24",children:(0,t.jsx)("polyline",{points:"20 6 9 17 4 12"})})})]})});i.zo.label` 18 && { 19 cursor: pointer; 20 display: flex; 21 align-items: center; 22 gap: 0.75rem; 23 padding: 0.75rem 1rem; 24 text-align: left; 25 border-radius: 0.5rem; 26 border: 1px solid var(--privy-color-foreground-4); 27 width: 100%; 28 } 29`;let o=i.zo.div` 30 display: inline-block; 31 vertical-align: middle; 32`,a=i.zo.svg` 33 fill: none; 34 stroke: white; 35 stroke-width: 3px; 36`,l=i.zo.input.attrs({type:"checkbox"})` 37 border: 0; 38 clip: rect(0 0 0 0); 39 clippath: inset(50%); 40 height: 1px; 41 margin: -1px; 42 overflow: hidden; 43 padding: 0; 44 position: absolute; 45 white-space: nowrap; 46 width: 1px; 47`,c=i.zo.div` 48 display: inline-block; 49 width: 18px; 50 height: 18px; 51 transition: all 150ms; 52 cursor: pointer; 53 border-color: ${e=>e.color}; 54 border-radius: 3px; 55 background: ${e=>e.checked?e.color:"var(--privy-color-background)"}; 56 57 && { 58 /* This is necessary to override css reset for border width */ 59 border-width: 1px; 60 } 61 62 ${l}:focus + & { 63 box-shadow: 0 0 0 1px ${e=>e.color}; 64 } 65 66 ${a} { 67 visibility: ${e=>e.checked?"visible":"hidden"}; 68 } 69`},67478:function(e,r,n){n.d(r,{E:function(){return o}});var t=n(57437),i=n(45402),s=n(80717);let o=({children:e,theme:r})=>(0,t.jsxs)(a,{$theme:r,children:[(0,t.jsx)(i.Z,{width:"20px",height:"20px",color:"var(--privy-color-icon-error)",strokeWidth:2,style:{flexShrink:0}}),(0,t.jsx)(l,{$theme:r,children:e})]}),a=s.zo.div` 70 display: flex; 71 gap: 0.75rem; 72 background-color: var(--privy-color-error-bg); 73 align-items: flex-start; 74 padding: 1rem; 75 border-radius: 0.75rem; 76`,l=s.zo.div` 77 color: ${e=>"dark"===e.$theme?"var(--privy-color-foreground-2)":"var(--privy-color-foreground)"}; 78 font-size: 1rem; 79 font-weight: 400; 80 line-height: 1.5; 81 flex: 1; 82 text-align: left; 83`},70547:function(e,r,n){n.d(r,{E:function(){return i}});var t=n(80717);let i=t.zo.span` 84 text-align: left; 85 font-size: 0.75rem; 86 font-weight: 500; 87 line-height: 1.125rem; /* 150% */ 88 89 color: var(--privy-color-error); 90`},78999:function(e,r,n){n.r(r),n.d(r,{ErrorScreen:function(){return m},ErrorScreenView:function(){return p},default:function(){return m}});var t=n(57437),i=n(76865);let s=(0,n(79205).Z)("phone",[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]);var o=n(66337),a=n(80717),l=n(28071),c=n(6540),d=n(6140),h=n(22121),u=n(98065),x=n(23931);n(2265),n(29155),n(87336),n(97048),n(64131),n(84250);let p=({error:e,allowlistConfig:r,onRetry:n,onCaptchaReset:a,onBack:l})=>{let h=((e,r)=>{if(e instanceof u.R)return{title:"Transaction failed",detail:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:e.message}),(0,t.jsxs)("span",{children:[" ","Check the"," ",(0,t.jsx)(g,{href:e.relayLink,target:"_blank",children:"refund status"}),"."]})]}),ctaText:"Try again",icon:i.Z};if(e instanceof d.b)switch(e.privyErrorCode){case d.c.CLIENT_REQUEST_TIMEOUT:return{title:"Timed out",detail:e.message,ctaText:"Try again",icon:i.Z};case d.c.INSUFFICIENT_BALANCE:return{title:"Insufficient balance",detail:e.message,ctaText:"Try again",icon:i.Z};case d.c.TRANSACTION_FAILURE:return{title:"Transaction failure",detail:e.message,ctaText:"Try again",icon:i.Z};default:return{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:i.Z}}else{if(e instanceof c.P&&"twilio_verification_failed"===e.type)return{title:"Something went wrong",detail:e.message,ctaText:"Try again",icon:s};if(!(e instanceof d.g))return e instanceof d.e&&e.status&&[400,422].includes(e.status)?{title:"Something went wrong",detail:e.message,ctaText:"Try again",icon:i.Z}:{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:i.Z};switch(e.privyErrorCode){case d.c.INVALID_CAPTCHA:return{title:"Something went wrong",detail:"Please try again.",ctaText:"Try again",icon:i.Z};case d.c.DISALLOWED_LOGIN_METHOD:return{title:"Not allowed",detail
90:e.message,ctaText:"Try another method",icon:i.Z};case d.c.ALLOWLIST_REJECTED:return{title:r.errorTitle||"You don't have access to this app",detail:r.errorDetail||"Have you been invited?",ctaText:r.errorCtaText||"Try another account",icon:o.Z};case d.c.CAPTCHA_FAILURE:return{title:"Something went wrong",detail:"You did not pass CAPTCHA. Please try again.",ctaText:"Try again",icon:null};case d.c.CAPTCHA_TIMEOUT:return{title:"Something went wrong",detail:"Something went wrong! Please try again later.",ctaText:"Try again",icon:null};case d.c.LINKED_TO_ANOTHER_USER:return{title:"Authentication failed",detail:"This account has already been linked to another user.",ctaText:"Try again",icon:i.Z};case d.c.NOT_SUPPORTED:return{title:"This region is not supported",detail:"SMS authentication from this region is not available",ctaText:"Try another method",icon:i.Z};case d.c.TOO_MANY_REQUESTS:return{title:"Request failed",detail:"Too many attempts.",ctaText:"Try again later",icon:i.Z};default:return{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:i.Z}}}})(e,r);return(0,t.jsx)(x.S,{title:h.title,subtitle:h.detail,icon:h.icon,onBack:l,iconVariant:"error",primaryCta:{label:h.ctaText,onClick:()=>{e instanceof d.g&&(e.privyErrorCode===d.c.INVALID_CAPTCHA&&a?.(),e.privyErrorCode===d.c.ALLOWLIST_REJECTED&&r.errorCtaLink)?window.location.href=r.errorCtaLink:n?.()},variant:"error"},watermark:!0})},m={component:()=>{let{navigate:e,data:r,lastScreen:n,currentScreen:i}=(0,h.a)(),s=(0,l.u)(),{reset:o}=(0,c.a)(),a=r?.errorModalData?.previousScreen||(n===i?void 0:n);return(0,t.jsx)(p,{error:r?.errorModalData?.error||Error(),allowlistConfig:s.allowlistConfig,onRetry:()=>{e(a||"LandingScreen",!1)},onCaptchaReset:o})}},g=a.zo.a` 91 color: var(--privy-color-accent) !important; 92 font-weight: 600; 93`},28642:function(e,r,n){n.d(r,{L:function(){return i}});var t=n(80717);let i=t.zo.span` 94 color: var(--privy-color-foreground-3); 95 font-size: 0.75rem; 96 font-weight: 500; 97 line-height: 1.125rem; /* 150% */ 98`},29872:function(e,r,n){n.d(r,{L:function(){return s}});var t=n(80717);let i=(0,t.F4)` 99 from, to { 100 background: var(--privy-color-foreground-4); 101 color: var(--privy-color-foreground-4); 102 } 103 104 50% { 105 background: var(--privy-color-foreground-accent); 106 color: var(--privy-color-foreground-accent); 107 } 108`,s=(0,t.iv)` 109 ${e=>e.$isLoading?(0,t.iv)` 110 width: 35%; 111 animation: ${i} 2s linear infinite; 112 border-radius: var(--privy-border-radius-sm); 113 `:""} 114`},8557:function(e,r,n){n.d(r,{R:function(){return s},a:function(){return i}});var t=n(80717);let i=t.zo.span` 115 display: flex; 116 flex-direction: column; 117 gap: 0.35rem; 118 width: 100%; 119`,s=t.zo.span` 120 display: flex; 121 width: 100%; 122 justify-content: space-between; 123 gap: 0.5rem; 124`},97757:function(e,r,n){n.d(r,{C:function(){return o},S:function(){return s}});var t=n(57437),i=n(80717);let s=({title:e,description:r,children:n,...i})=>(0,t.jsx)(a,{...i,children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h3",{children:e}),"string"==typeof r?(0,t.jsx)("p",{children:r}):r,n]})});(0,i.zo)(s)` 125 margin-bottom: 24px; 126`;let o=({title:e,description:r,icon:n,children:i,...s})=>(0,t.jsxs)(l,{...s,children:[n||null,(0,t.jsx)("h3",{children:e}),r&&"string"==typeof r?(0,t.jsx)("p",{children:r}):r,i]}),a=i.zo.div` 127 display: flex; 128 flex-direction: column; 129 justify-content: flex-start; 130 align-items: flex-start; 131 text-align: left; 132 gap: 8px; 133 width: 100%; 134 margin-bottom: 24px; 135 136 && h3 { 137 font-size: 17px; 138 color: var(--privy-color-foreground); 139 } 140 141 /* Sugar assuming children are paragraphs. Otherwise, handling styling on your own */ 142 && p { 143 color: var(--privy-color-foreground-2); 144 font-size: 14px; 145 } 146`,l=(0,i.zo)(a)` 147 align-items: center; 148 text-align: center; 149 gap: 16px; 150 151 h3 { 152 margin-bottom: 24px; 153 } 154`},71471:function(e,r,n){n.d(r,{S:function(){return i}});var t=n(80717);let i=t.zo.span` 155 margin-top: 4px; 156 color: var(--privy-color-foreground); 157 text-align: center; 158 159 font-size: 0.875rem; 160 font-weight: 400; 161 line-height: 1.375rem; /* 157.143% */ 162 163 && a { 164 color: var(--privy-color-accent); 165 } 166`},41270:function(e,r,n){n.d(r,{T:function(){return i}});var t=n(80717);let i=t.zo.span` 167 color: var(--privy-color-foreground); 168 font-size: 1.125rem; 169 font-weight: 600; 170 line-height: 1.875rem; /* 166.667% */ 171 text-align: center; 172`},98922:function(e,r,n){n.d(r,{S:function(){return P},T:function(){return Q},a:function(){return _}});var t=n(57437),i=n(2265);let s=i.forwardRef(function(e,r){let{title:n,titleId:t,...s}=e;return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},s),n?i.createElement("title",{id:t},n):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m3.75 13.5 10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75Z"}))});var o=n(81801);let a=i.forwardRef(function(e,r){let{title:n,titleId:t,...s}=e;return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},s),n?i.createElement("title",{id:t},n):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"}))});var l=n(80717),c=n(3848),d=n(74002),h=n(60729),u=n(8557),x=n(70547),p=n(28642),m=n(71471),g=n(41270),j=n(16676),f=n(7605),v=n(28071),y=n(15588),w=n(29872),k=n(4012),b=n(41618),T=n(57440),L=n(67478),A=n(7454),C=n(58928);let R=i.forwardRef(function(e,r){let{title:n,titleId:t,...s}=e;return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},s),n?i.createElement("title",{id:t},n):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 7.5V6.108c0-1.135.845-2.098 1.976-2.192.373-.03.748-.057 1.123-.08M15.75 18H18a2.25 2.25 0 0 0 2.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 0 0-1.123-.08M15.75 18.75v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5A3.375 3.375 0 0 0 6.375 7.5H5.25m11.9-3.664A2.251 2.251 0 0 0 15 2.25h-1.5a2.251 2.251 0 0 0-2.15 1.586m5.8 0c.065.21.1.433.1.664v.75h-6V4.5c0-.231.035-.454.1-.664M6.75 7.5H4.875c-.621 0-1.125.504-1.125 1.125v12c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V16.5a9 9 0 0 0-9-9Z"}))});var E=n(45402),S=n(6140);let z=(0,l.zo)(h.L)` 173 cursor: pointer; 174 display: inline-flex; 175 gap: 8px; 176 align-items: center; 177 color: var(--privy-color-accent); 178 svg { 179 fill: var(--privy-color-accent); 180 } 181`;var I=({iconUrl:e,value:r,symbol:n,usdValue:i,nftName:s,nftCount:o,decimals:a,$isLoading:l})=>
181{if(l)return(0,t.jsx)(V,{$isLoading:l});let c=r&&i&&a?function(e,r,n){let t=parseFloat(e),i=parseFloat(n);if(0===t||0===i||Number.isNaN(t)||Number.isNaN(i))return e;let s=Math.ceil(-Math.log10(.01/(i/t))),o=Math.pow(10,s=Math.max(s=Math.min(s,r),1)),a=+(Math.floor(t*o)/o).toFixed(s).replace(/\.?0+$/,"");return Intl.NumberFormat(void 0,{maximumFractionDigits:r}).format(a)}(r,a,i):r;return(0,t.jsxs)("div",{children:[(0,t.jsxs)(V,{$isLoading:l,children:[e&&(0,t.jsx)(N,{src:e,alt:"Token icon"}),o&&o>1?o+"x":void 0," ",s,c," ",n]}),i&&(0,t.jsxs)($,{$isLoading:l,children:["$",i]})]})};let V=l.zo.span` 182 color: var(--privy-color-foreground); 183 font-size: 0.875rem; 184 font-weight: 500; 185 line-height: 1.375rem; 186 word-break: break-all; 187 text-align: right; 188 display: flex; 189 justify-content: flex-end; 190 191 ${w.L} 192`,$=l.zo.span` 193 color: var(--privy-color-foreground-2); 194 font-size: 12px; 195 font-weight: 400; 196 line-height: 18px; 197 word-break: break-all; 198 text-align: right; 199 display: flex; 200 justify-content: flex-end; 201 202 ${w.L} 203`,N=l.zo.img` 204 height: 14px; 205 width: 14px; 206 margin-right: 4px; 207 object-fit: contain; 208`,M=e=>{let{chain:r,transactionDetails:n,isTokenContractInfoLoading:i,symbol:s}=e,{action:o,functionName:a}=n;return(0,t.jsx)(b.B,{children:(0,t.jsxs)(u.a,{children:["transaction"!==o&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Action"}),(0,t.jsx)(h.V,{children:a})]}),"mint"===a&&"args"in n&&n.args.filter(e=>e).map((e,n)=>(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:`Param ${n}`}),(0,t.jsx)(h.V,{children:"string"==typeof e&&(0,k.U)(e)?(0,t.jsx)(j.A,{address:e,url:r?.blockExplorers?.default?.url,showCopyIcon:!1}):e?.toString()})]},n)),"setApprovalForAll"===a&&n.operator&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Operator"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:n.operator,url:r?.blockExplorers?.default?.url,showCopyIcon:!1})})]}),"setApprovalForAll"===a&&void 0!==n.approved&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Set approval to"}),(0,t.jsx)(h.V,{children:n.approved?"true":"false"})]}),"transfer"===a||"transferWithMemo"===a||"transferFrom"===a||"safeTransferFrom"===a||"approve"===a?(0,t.jsxs)(t.Fragment,{children:["formattedAmount"in n&&n.formattedAmount&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Amount"}),(0,t.jsxs)(h.V,{$isLoading:i,children:[n.formattedAmount," ",s]})]}),"tokenId"in n&&n.tokenId&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Token ID"}),(0,t.jsx)(h.V,{children:n.tokenId.toString()})]})]}):null,"safeBatchTransferFrom"===a&&(0,t.jsxs)(t.Fragment,{children:["amounts"in n&&n.amounts&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Amounts"}),(0,t.jsx)(h.V,{children:n.amounts.join(", ")})]}),"tokenIds"in n&&n.tokenIds&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Token IDs"}),(0,t.jsx)(h.V,{children:n.tokenIds.join(", ")})]})]}),"approve"===a&&n.spender&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Spender"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:n.spender,url:r?.blockExplorers?.default?.url,showCopyIcon:!1})})]}),("transferFrom"===a||"safeTransferFrom"===a||"safeBatchTransferFrom"===a)&&n.transferFrom&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Transferring from"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:n.transferFrom,url:r?.blockExplorers?.default?.url,showCopyIcon:!1})})]}),("transferFrom"===a||"safeTransferFrom"===a||"safeBatchTransferFrom"===a)&&n.transferTo&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Transferring to"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:n.transferTo,url:r?.blockExplorers?.default?.url,showCopyIcon:!1})})]})]})})},O=({variant:e,setPreventMaliciousTransaction:r,colorScheme:n="light",preventMaliciousTransaction:i})=>"warn"===e?(0,t.jsx)(F,{children:(0,t.jsxs)(A.W,{theme:n,children:[(0,t.jsx)("span",{style:{fontWeight:"500"},children:"Warning: Suspicious transaction"}),(0,t.jsx)("br",{}),"This has been flagged as a potentially deceptive request. Approving could put your assets or funds at risk."]})}):"error"===e?(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(F,{children:[(0,t.jsx)(L.E,{theme:n,
208children:(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"This is a malicious transaction"}),(0,t.jsx)("br",{}),"This transaction transfers tokens to a known malicious address. Proceeding may result in the loss of valuable assets."]})}),(0,t.jsxs)(Z,{children:[(0,t.jsx)(T.C,{color:"var(--privy-color-error)",checked:!i,readOnly:!0,onClick:()=>r(!i)}),(0,t.jsx)("span",{children:"I understand and want to proceed anyways."})]})]})}):null,F=l.zo.div` 209 margin-top: 1.5rem; 210`,Z=l.zo.div` 211 display: flex; 212 align-items: center; 213 gap: 0.5rem; 214 margin-top: 0.75rem; 215`,D=({transactionIndex:e,maxIndex:r})=>"number"!=typeof e||0===r?"":` (${e+1} / ${r+1})`,P=({img:e,submitError:r,prepareError:n,onClose:l,action:c,title:p,subtitle:f,to:w,tokenAddress:k,network:b,missingFunds:T,fee:L,from:A,cta:C,disabled:R,chain:E,isSubmitting:S,isPreparing:V,isTokenPriceLoading:$,isTokenContractInfoLoading:N,isSponsored:F,symbol:Z,balance:P,onClick:_,transactionDetails:W,transactionIndex:J,maxIndex:Q,onBack:Y,chainName:K,validation:X,hasScanDetails:ee,setIsScanDetailsOpen:er,preventMaliciousTransaction:en,setPreventMaliciousTransaction:et,tokensSent:ei,tokensReceived:es,isScanning:eo,isCancellable:ea,functionName:el})=>{let{showTransactionDetails:ec,setShowTransactionDetails:ed,hasMoreDetails:eh,isErc20Ish:eu}=(e=>{let[r,n]=(0,i.useState)(!1),t=!0,s=!1;return(!e||e.isErc20Ish||"transaction"===e.action)&&(t=!1),t&&(s=Object.entries(e||{}).some(([e,r])=>r&&!["action","isErc20Ish","isNFTIsh"].includes(e))),{showTransactionDetails:r,setShowTransactionDetails:n,hasMoreDetails:t&&s,isErc20Ish:e?.isErc20Ish}})(W),ex=(0,v.u)(),ep=eu&&N||V||$||eo;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.M,{onClose:l,backFn:Y}),e&&(0,t.jsx)(U,{children:e}),(0,t.jsxs)(g.T,{style:{marginTop:e?"1.5rem":0},children:[p,(0,t.jsx)(D,{maxIndex:Q,transactionIndex:J})]}),(0,t.jsx)(m.S,{children:f}),(0,t.jsxs)(u.a,{style:{marginTop:"2rem"},children:[(!!ei[0]||ep)&&(0,t.jsxs)(u.R,{children:[es.length>0?(0,t.jsx)(h.L,{children:"Send"}):(0,t.jsx)(h.L,{children:"approve"===c?"Approval amount":"Amount"}),(0,t.jsx)("div",{className:"flex flex-col",children:ei.map((e,r)=>(0,t.jsx)(I,{iconUrl:e.iconUrl,value:"setApprovalForAll"===el?"All":e.value,usdValue:e.usdValue,symbol:e.symbol,nftName:e.nftName,nftCount:e.nftCount,decimals:e.decimals},r))})]}),es.length>0&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Receive"}),(0,t.jsx)("div",{className:"flex flex-col",children:es.map((e,r)=>(0,t.jsx)(I,{iconUrl:e.iconUrl,value:e.value,usdValue:e.usdValue,symbol:e.symbol,nftName:e.nftName,nftCount:e.nftCount,decimals:e.decimals},r))})]}),W&&"spender"in W&&W?.spender?(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Spender"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:W.spender,url:E?.blockExplorers?.default?.url})})]}):null,w&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"To"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:w,url:E?.blockExplorers?.default?.url,showCopyIcon:!0})})]}),k&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Token address"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:k,url:E?.blockExplorers?.default?.url})})]}),(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Network"}),(0,t.jsx)(h.V,{children:b})]}),(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Estimated fee"}),(0,t.jsx)(h.V,{$isLoading:V||$||void 0===F,children:F?(0,t.jsxs)(q,{children:[(0,t.jsxs)(G,{children:["Sponsored by ",ex.name]}),(0,t.jsx)(s,{height:16,width:16})]}):L})]}),eh&&!ee&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.R,{className:"cursor-pointer",onClick:()=>ed(!ec),children:(0,t.jsxs)(h.a,{className:"flex items-center gap-x-1",children:["Details"," ",(0,t.jsx)(o.Z,{style:{width:"0.75rem",marginLeft:"0.25rem",transform:ec?"rotate(180deg)":void 0}})]})}),ec&&W&&(0,t.jsx)(M,{action:c,chain:E,transactionDetails:W,isTokenContractInfoLoading:N,symbol:Z})]}),ee&&(0,t.jsx)(u.R,{children:(0,t.jsxs)(z,{onClick:()=>er(!0),children:[(0,t.jsx)("span",{className:"text-color-primary",children:"Details"}),(0,t.jsx)(a,{height:"14px",width:"14px",strokeWidth:"2"})]})})]}),(0,t.jsx)(y.G,{}),r?(0,t.jsx)(x.E,{style:{marginTop:"2rem"},children:r.message}):n&&0===J?(0,t.jsx)(x.E,{style:{marginTop:"2rem"},children:n.shortMessage??B}):null,(0,t.jsx)(O,{variant:X,preventMaliciousTransaction:en,setPreventMaliciousTransaction:et}),(0,t.jsx)(H,{$useSmallMargins:!(!n&&!r&&"warn"!==X&&"error"!==X),address:A,balance:P,errMsg:V||n||r||!T?void 0:`Add funds on ${E?.name??K} to complete transaction.`}),(0,t.jsx)(d.P,{style:{marginTop:"1rem"},loading:S,disabled:R||V,onClick:_,children:C}),ea&&(0,t.jsx)(d.E,{style:{marginTop:"1rem"},onClick:l,isSubmitting:!1,children:"Not now"}),(0,t.jsx)(d.B,{})]})},_=({img:e,title:r,subtitle:n,cta:a,instructions:l,network:f,blockExplorerUrl:w,isMissingFunds:k,submitError:b,parseError:T,total:L,swap:A,transactingWalletAddress:C,fee:R,balance:E,disabled:S,isSubmitting:I,isPreparing:V,isTokenPriceLoading:$,onClick:N,onClose:M,onBack:O,isSponsored:F})=>{let Z=V||$,[D,P]=(0,i.useState)(!1),_=(0,v.u)();return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.M,{onClose:M,backFn:O}),e&&(0,t.jsx)(U,{children:e}),(0,t.jsx)(g.T,{style:{marginTop:e?"1.5rem":0},children:r}),(0,t.jsx)(m.S,{children:n}),(0,t.jsxs)(u.a,{style:{marginTop:"2rem",marginBottom:".5rem"},children:[(L||Z)&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Amount"}),(0,t.jsx)(h.V,{$isLoading:Z,children:L})]}),A&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Swap"}),(0,t.jsx)(h.V,{children:A})]}),f&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Network"}),(0,t.jsx)(h.V,{children:f})]}),(R||Z||void 0!==F)&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Estimated fee"}),(0,t.jsx)(h.V,{$isLoading:Z,children:F&&!Z?(0,t.jsxs)(q,{children:[(0,t.jsxs)(G,{children:["Sponsored by ",_.name]}),(0,t.jsx)(s,{height:16,width:16})]}):R})]})]}),(0,t.jsx)(u.R,{children:(0,t.jsxs)(z,{onClick:()=>P(e=>!e),children:[(0,t.jsx)("span",{children:"Advanced"}),(0,t.jsx)(o.Z,{height:"16px",width:"16px",strokeWidth:"2",style:{transition:"all 300ms",transform:D?"rotate(180deg)":void 0}})]})}),D&&(0,t.jsx)(t.Fragment,{children:l.map((e,r)=>"sol-transfer"===e.type?(0,t.jsxs)(W,{children:[(0,t.jsx)(u.R,{children:(0,t.jsxs)(p.L,{children:["Transfer ",e.withSeed?"with seed":""]})}),(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Amount"}),(0,t.jsxs)(h.V,{children:[(0,c.LH)({amount:e.value,decimals:e.token.decimals})," ",e.token.symbol]})]}),!!e.toAccount&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Destination"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.toAccount,url:w})})]})]},r):"spl-transfer"===e.type?(0,t.jsxs)(W,{children:[(0,t.jsx)(u.R,{children:(0,t.jsxs)(p.L,{children:["Transfer ",e.token.symbol]})}),(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Amount"}),(0,t.jsx)(h.V,{children:e.value.toString()})]}),!!e.fromAta&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Source"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.fromAta,url:w})})]}),!!e.toAta&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Destination"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.toAta,url:w})})]}),!!e.token.address&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Token"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.token.address,url:w})})]})]},r):"ata-creation"===e.type?(0,t.jsxs)(W,{children:[(0,t.jsx)(u.R,{children:(0,t.jsx)(p.L,{children:"Create token account"})}),(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Program ID"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.program,url:w})})]}),!!e.owner&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Owner"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.owner,url:w})})]})]},r):"create-account"===e.type?(0,t.jsxs)(W,{children:[(0,t.jsx)(u.R,{children:(0,t.jsxs)(p.L,{children:["Create account ",e.withSeed?"with seed":""]})}),!!e.account&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Account"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.account,url:w})})]}),(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Amount"}),(0,t.jsxs)(h.V,{children:[(0,c.LH)({amount:e.value,decimals:9})," SOL"]})]})]},r):"spl-init-account"===e.type?(0,t.jsxs)(W,{children:[(0,t.jsx)(u.R,{children:(0,t.jsx)(p.L,{children:"Initialize token account"})}),!!e.account&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Account"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.account,url:w})})]}),!!e.mint&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Mint"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.mint,url:w})})]}),!!e.owner&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Owner"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.owner,url:w})})]})]},r):"spl-close-account"===e.type?(0,t.jsxs)(W,{children:[(0,t.jsx)(u.R,{children:(0,t.jsx)(p.L,{children:"Close token account"})}),!!e.source&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Source"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.source,url:w})})]}),!!e.destination&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Destination"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.destination,url:w})})]}),!!e.owner&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Owner"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.owner,url:w})})]})]},r):"spl-sync-native"===e.type?(0,t.jsxs)(W,{children:[(0,t.jsx)(u.R,{children:(0,t.jsx)(p.L,{children:"Sync native"})}),(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Program ID"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.program,url:w})})]})]},r):"raydium-swap-base-input"===e.type?(0,t.jsxs)(W,{children:[(0,t.jsx)(u.R,{children:(0,t.jsxs)(p.L,{children:["Raydium swap"," ",e.tokenIn&&e.tokenOut?`${e.tokenIn.symbol} â ${e.tokenOut.symbol}`:""]})}),(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Amount in"}),(0,t.jsx)(h.V,{children:e.amountIn.toString()})]}),(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Minimum amount out"}),(0,t.jsx)(h.V,{children:e.minimumAmountOut.toString()})]}),e.mintIn&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Token in"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.mintIn,url:w})})]}),e.mintOut&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Token out"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.mintOut,url:w})})]})]},r):"raydium-swap-base-output"===e.type?(0,t.jsxs)(W,{children:[(0,t.jsx)(u.R,{children:(0,t.jsxs)(p.L,{children:["Raydium swap"," ",e.tokenIn&&e.tokenOut?`${e.tokenIn.symbol} â ${e.tokenOut.symbol}`:""]})}),(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Max amount in"}),(0,t.jsx)(h.V,{children:e.maxAmountIn.toString()})]}),(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Amount out"}),(0,t.jsx)(h.V,{children:e.amountOut.toString()})]}),e.mintIn&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Token in"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.mintIn,url:w})})]}),e.mintOut&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Token out"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.mintOut,url:w})})]})]},r):"jupiter-swap-shared-accounts-route"===e.type?(0,t.jsxs)(W,{children:[(0,t.jsx)(u.R,{children:(0,t.jsxs)(p.L,{children:["Jupiter swap"," ",e.tokenIn&&e.tokenOut?`${e.tokenIn.symbol} â ${e.tokenOut.symbol}`:""]})}),(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"In amount"}),(0,t.jsx)(h.V,{children:e.inAmount.toString()})]}),(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Quoted out amount"}),(0,t.jsx)(h.V,{children:e.quotedOutAmount.toString()})]}),e.mintIn&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Token in"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.mintIn,url:w})})]}),e.mintOut&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Token out"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.mintOut,url:w})})]})]},r):"jupiter-swap-exact-out-route"===e.type?(0,t.jsxs)(W,{children:[(0,t.jsx)(u.R,{children:(0,t.jsxs)(p.L,{children:["Jupiter swap"," ",e.tokenIn&&e.tokenOut?`${e.tokenIn.symbol} â ${e.tokenOut.symbol}`:""]})}),(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Quoted in amount"}),(0,t.jsx)(h.V,{children:e.quotedInAmount.toString()})]}),(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Amount out"}),(0,t.jsx)(h.V,{children:e.outAmount.toString()})]}),e.mintIn&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Token in"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.mintIn,url:w})})]}),e.mintOut&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Token out"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.mintOut,url:w})})]})]},r):(0,t.jsxs)(W,{children:[(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Program ID"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.program,url:w})})]}),(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Data"}),(0,t.jsx)(h.V,{children:e.discriminator})]})]},r))}),(0,t.jsx)(y.G,{}),b?(0,t.jsx)(x.E,{style:{marginTop:"2rem"},children:b.message}):T?(0,t.jsx)(x.E,{style:{marginTop:"2rem"},children:B}):null,(0,t.jsx)(H,{$useSmallMargins:!(!T&&!b),title:"",address:C,balance:E,errMsg:V||T||b||!k?void 0:"Add funds on Solana to complete transaction."}),(0,t.jsx)(d.P,{style:{marginTop:"1rem"},loading:I,disabled:S||V,onClick:N,children:a}),(0,t.jsx)(d.B,{})]})},H=(0,l.zo)(f.W)` 216 ${e=>e.$useSmallMargins?"margin-top: 0.5rem;":"margin-top: 2rem;"} 217`,W=(0,l.zo)(u.a)` 218 margin-top: 0.5rem; 219 border: 1px solid var(--privy-color-foreground-4); 220 border-radius: var(--privy-border-radius-sm); 221 padding: 0.5rem; 222`,B="There was an error preparing your transaction. Your transaction request will likely fail.",U=l.zo.div` 223 display: flex; 224 width: 100%; 225 justify-content: center; 226 max-height: 40px; 227 228 > img { 229 object-fit: contain; 230 border-radius: var(--privy-border-radius-sm); 231 } 232`,q=l.zo.span` 233 display: inline-flex; 234 align-items: center; 235 gap: 0.3rem; 236`,G=l.zo.span` 237 font-size: 14px; 238 font-weight: 500; 239 color: var(--privy-color-foreground); 240`,J=()=>(0,t.jsxs)(ee,{children:[(0,t.jsx)(en,{}),(0,t.jsx)(er,{})]}),Q=({transactionError:e,chainId:r,onClose:n,onRetry:s,chainType:o,transactionHash:a})=>{let{chains:l}=(0,S.u)(),[c,h]=(0,i.useState)(!1),{errorCode:u,errorMessage:x}=((e,r)=>{if("ethereum"===r)return{errorCode:e.details??e.message,errorMessage:e.shortMessage};let n=e.txSignature,t=e?.transactionMessage||"Something went wrong.";if(Array.isArray(e.logs)){let r=e.logs.find(e=>/insufficient (lamports|funds)/gi.test(e));r&&(t=r)}return{transactionHash:n,errorMessage:t}})(e,o),p=(({chains:e,chainId:r,chainType:n,transactionHash:t})=>{var i;return"ethereum"===n?e.find(e=>e.id===r)?.blockExplorers?.default.url??"https://etherscan.io":(i=t||"",`https://explorer.solana.com/tx/${i}?chain=${r}`)})({chains:l,chainId:r,chainType:o,transactionHash:a});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.M,{onClose:n}),(0,t.jsxs)(Y,{children:[(0,t.jsx)(J,{}),(0,t.jsx)(K,{children:u}),(0,t.jsx)(X,{children:"Please try again."}),(0,t.jsxs)(es,{children:[(0,t.jsx)(ei,{children:"Error message"}),(0,t.jsx)(ea,{$clickable:!1,children:x})]}),a&&(0,t.jsxs)(es,{children:[(0,t.jsx)(ei,{children:"Transaction hash"}),(0,t.jsxs)(eo,{children:["Copy this hash to view details about the transaction on a"," ",(0,t.jsx)("u",{children:(0,t.jsx)("a",{href:p,children:"block explorer"})}),"."]}),(0,t.jsxs)(ea,{$clickable:!0,onClick:async()=>{await navigator.clipboard.writeText(a),h(!0)},children:[a,(0,t.jsx)(ed,{clicked:c})]})]}),(0,t.jsx)(et,{onClick:()=>s({resetNonce:!!a}),children:"Retry transaction"})]}),(0,t.jsx)(d.b,{})]})},Y=l.zo.div` 241 display: flex; 242 flex-direction: column; 243 align-items: center; 244 justify-content: center; 245`,K=l.zo.span` 246 color: var(--privy-color-foreground); 247 text-align: center; 248 font-size: 1.125rem; 249 font-weight: 500; 250 line-height: 1.25rem; /* 111.111% */ 251 text-align: center; 252 margin: 10px; 253`,X=l.zo.span` 254 margin-top: 4px; 255 margin-bottom: 10px; 256 color: var(--privy-color-foreground-3); 257 text-align: center; 258 259 font-size: 0.875rem; 260 font-style: normal; 261 font-weight: 400; 262 line-height: 20px; /* 142.857% */ 263 letter-spacing: -0.008px; 264`,ee=l.zo.div` 265 position: relative; 266 width: 60px; 267 height: 60px; 268 margin: 10px; 269 display: flex; 270 justify-content: center; 271 align-items: center; 272`,er=(0,l.zo)(E.Z)` 273 position: absolute; 274 width: 35px; 275 height: 35px; 276 color: var(--privy-color-error); 277`,en=l.zo.div` 278 position: absolute; 279 width: 60px; 280 height: 60px; 281 border-radius: 50%; 282 background-color: var(--pri
282vy-color-error); 283 opacity: 0.1; 284`,et=(0,l.zo)(d.P)` 285 && { 286 margin-top: 24px; 287 } 288 transition: 289 color 350ms ease, 290 background-color 350ms ease; 291`,ei=l.zo.span` 292 width: 100%; 293 text-align: left; 294 font-size: 0.825rem; 295 color: var(--privy-color-foreground); 296 padding: 4px; 297`,es=l.zo.div` 298 width: 100%; 299 margin: 5px; 300 display: flex; 301 flex-direction: column; 302 justify-content: center; 303 align-items: center; 304`,eo=l.zo.text` 305 position: relative; 306 width: 100%; 307 padding: 5px; 308 font-size: 0.8rem; 309 color: var(--privy-color-foreground-3); 310 text-align: left; 311 word-wrap: break-word; 312`,ea=l.zo.span` 313 position: relative; 314 width: 100%; 315 background-color: var(--privy-color-background-2); 316 padding: 8px 12px; 317 border-radius: 10px; 318 margin-top: 5px; 319 font-size: 14px; 320 color: var(--privy-color-foreground-3); 321 text-align: left; 322 word-wrap: break-word; 323 ${e=>e.$clickable&&"cursor: pointer;\n transition: background-color 0.3s;\n padding-right: 45px;\n\n &:hover {\n background-color: var(--privy-color-foreground-4);\n }"} 324`,el=(0,l.zo)(R)` 325 position: absolute; 326 top: 13px; 327 right: 13px; 328 width: 24px; 329 height: 24px; 330`,ec=(0,l.zo)(C.Z)` 331 position: absolute; 332 top: 13px; 333 right: 13px; 334 width: 24px; 335 height: 24px; 336`,ed=({clicked:e})=>(0,t.jsx)(e?ec:el,{})},60729:function(e,r,n){n.d(r,{L:function(){return s},V:function(){return a},a:function(){return o}});var t=n(80717),i=n(29872);let s=t.zo.span` 337 color: var(--privy-color-foreground-3); 338 font-size: 0.875rem; 339 font-weight: 400; 340 line-height: 1.375rem; /* 157.143% */ 341`,o=(0,t.zo)(s)` 342 color: var(--privy-color-accent); 343`,a=t.zo.span` 344 color: var(--privy-color-foreground); 345 font-size: 0.875rem; 346 font-weight: 500; 347 line-height: 1.375rem; /* 157.143% */ 348 word-break: break-all; 349 text-align: right; 350 351 ${i.L} 352`},7605:function(e,r,n){n.d(r,{W:function(){return y}});var t=n(57437),i=n(30401),s=n(78867),o=n(2265),a=n(80717),l=n(74002),c=n(70547),d=n(28642),h=n(16676),u=n(41618);let x=(0,a.zo)(u.B)` 353 && { 354 padding: 0.75rem; 355 height: 56px; 356 } 357`,p=a.zo.div` 358 display: flex; 359 align-items: center; 360 justify-content: space-between; 361 width: 100%; 362`,m=a.zo.div` 363 display: flex; 364 flex-direction: column; 365 gap: 0; 366`,g=a.zo.div` 367 font-size: 12px; 368 line-height: 1rem; 369 color: var(--privy-color-foreground-3); 370`,j=(0,a.zo)(d.L)` 371 text-align: left; 372 margin-bottom: 0.5rem; 373`,f=(0,a.zo)(c.E)` 374 margin-top: 0.25rem; 375`,v=(0,a.zo)(l.S)` 376 && { 377 gap: 0.375rem; 378 font-size: 14px; 379 } 380`,y=({errMsg:e,balance:r,address:n,className:a,title:l,showCopyButton:c=!1})=>{let[d,u]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{if(d){let e=setTimeout(()=>u(!1),3e3);return()=>clearTimeout(e)}},[d]),(0,t.jsxs)("div",{children:[l&&(0,t.jsx)(j,{children:l}),(0,t.jsx)(x,{className:a,$state:e?"error":void 0,children:(0,t.jsxs)(p,{children:[(0,t.jsxs)(m,{children:[(0,t.jsx)(h.A,{address:n,showCopyIcon:!1}),void 0!==r&&(0,t.jsx)(g,{children:r})]}),c&&(0,t.jsx)(v,{onClick:function(e){e.stopPropagation(),navigator.clipboard.writeText(n).then(()=>u(!0)).catch(console.error)},size:"sm",children:(0,t.jsxs)(t.Fragment,d?{children:["Copied",(0,t.jsx)(i.Z,{size:14})]}:{children:["Copy",(0,t.jsx)(s.Z,{size:14})]})})]})}),e&&(0,t.jsx)(f,{children:e})]})}},7454:function(e,r,n){n.d(r,{W:function(){return o}});var t=n(57437),i=n(47842),s=n(80717);let o=({children:e,theme:r,className:n})=>(0,t.jsxs)(a,{$theme:r,className:n,children:[(0,t.jsx)(i.Z,{width:"20px",height:"20px",color:"var(--privy-color-icon-warning)",strokeWidth:2,style:{flexShrink:0}}),(0,t.jsx)(l,{$theme:r,children:e})]}),a=s.zo.div` 381 display: flex; 382 gap: 0.75rem; 383 background-color: var(--privy-color-warn-bg); 384 align-items: flex-start; 385 padding: 1rem; 386 border-radius: 0.75rem; 387`,l=s.zo.div` 388 color: ${e=>"dark"===e.$theme?"var(--privy-color-foreground-2)":"var(--privy-color-foreground)"}; 389 font-size: 1rem; 390 font-weight: 400; 391 line-height: 1.5; 392 flex: 1; 393 text-align: left; 394`},98065:function(e,r,n){n.d(r,{R:function(){return j},a:function(){return x},b:function(){return o},c:function(){return s},d:function(){return p},e:function(){return a},g:function(){return u},t:function(){return c},u:function(){return g}});var t=n(2265),i=n(6140);let s=792703809,o="11111111111111111111111111111111",a="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",l="0x0000000000000000000000000000000000000000",c=({appId:e,originCurrency:r,destinationCurrency:n,...t})=>({tradeType:"EXPECTED_OUTPUT",originCurrency:r??l,destinationCurrency:n??l,referrer:`privy|${e}`,...t}),d="https://api.relay.link",h="https://api.testnets.relay.link",u=async({input:e,isTestnet:r})=>{let n=await fetch((r?h:d)+"/quote",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),t=await n.json();if(!(n.ok||"string"==typeof t.message&&t.message.startsWith("Invalid address")))throw console.error("Relay error:",t),Error(t.message??"Error fetching quote from relay");return t},x=e=>{let r=e.steps[0]?.items?.[0];if(r)return{from:r.data.from,to:r.data.to,value:Number(r.data.value),
394chainId:Number(r.data.chainId),data:r.data.data}},p=e=>e.steps.flatMap(e=>e.items?.filter(e=>"incomplete"===e.status)??[]).map(e=>({from:e.data.from,to:e.data.to,value:Number(e.data.value),chainId:Number(e.data.chainId),data:e.data.data}));async function m({transactionHash:e,isTestnet:r}){let n=await fetch((r?h:d)+"/requests/v2?hash="+e),t=await n.json();if(!n.ok){if("message"in t&&"string"==typeof t.message)throw Error(t.message);throw Error("Error fetching request from relay")}return t.requests.at(0)?.status??"pending"}function g({transactionHash:e,isTestnet:r,bridgingStatus:n,setBridgingStatus:i,onSuccess:s,onFailure:o}){(0,t.useEffect)(()=>{if(e&&n){if(["delayed","waiting","pending"].includes(n)){let n=setInterval(async()=>{try{let n=await m({transactionHash:e,isTestnet:r});i(n)}catch(e){console.error(e)}},1e3);return()=>clearInterval(n)}"success"===n?s({transactionHash:e}):["refund","failure"].includes(n)&&o({error:new j(e,r)})}},[n,e,r])}class j extends i.b{constructor(e,r){super("We were unable to complete the bridging transaction. Funds will be refunded on your wallet.",void 0,i.c.TRANSACTION_FAILURE),this.relayLink=r?`https://testnets.relay.link/transaction/${e}`:`https://relay.link/transaction/${e}`}}},41618:function(e,r,n){n.d(r,{B:function(){return s},a:function(){return i}});var t=n(80717);let i=(0,t.iv)` 395 && { 396 border-width: 1px; 397 padding: 0.5rem 1rem; 398 } 399 400 width: 100%; 401 text-align: left; 402 border: solid 1px var(--privy-color-foreground-4); 403 border-radius: var(--privy-border-radius-md); 404 display: flex; 405 justify-content: space-between; 406 align-items: center; 407 408 ${e=>"error"===e.$state?"\n border-color: var(--privy-color-error);\n background: var(--privy-color-error-bg);\n ":""} 409`,s=t.zo.div` 410 ${i} 411`}}]); 412//# sourceMappingURL=2672.641846f1aee6f37d.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.