1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3316],{74613:function(e,n,r){r.d(n,{Z:function(){return h}});var t=r(42704);let i=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),o=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,r)=>r?r.toUpperCase():n.toLowerCase()),s=e=>{let n=o(e);return n.charAt(0).toUpperCase()+n.slice(1)},a=function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.filter((e,n,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===n).join(" ").trim()},l=e=>{for(let n in e)if(n.startsWith("aria-")||"role"===n||"title"===n)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,n)=>{let{color:r="currentColor",size:i=24,strokeWidth:o=2,absoluteStrokeWidth:s,className:d="",children:h,iconNode:u,...x}=e;return(0,t.createElement)("svg",{ref:n,...c,width:i,height:i,stroke:r,strokeWidth:s?24*Number(o)/Number(i):o,className:a("lucide",d),...!h&&!l(x)&&{"aria-hidden":"true"},...x},[...u.map(e=>{let[n,r]=e;return(0,t.createElement)(n,r)}),...Array.isArray(h)?h:[h]])}),h=(e,n)=>{let r=(0,t.forwardRef)((r,o)=>{let{className:l,...c}=r;return(0,t.createElement)(d,{ref:o,iconNode:n,className:a("lucide-".concat(i(s(e))),"lucide-".concat(e),l),...c})});return r.displayName=s(e),r}},18103:function(e,n,r){r.d(n,{Z:function(){return t}});let t=(0,r(74613).Z)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},54106:function(e,n,r){r.d(n,{Z:function(){return t}});let t=(0,r(74613).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"}]])},78546:function(e,n,r){r.d(n,{Z:function(){return t}});let t=(0,r(74613).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"}]])},64474:function(e,n,r){var t=r(42704);let i=t.forwardRef(function(e,n){let{title:r,titleId:i,...o}=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:n,"aria-labelledby":i},o),r?t.createElement("title",{id:i},r):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"}))});n.Z=i},89261:function(e,n,r){var t=r(42704);let i=t.forwardRef(function(e,n){let{title:r,titleId:i,...o}=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:n,"aria-labelledby":i},o),r?t.createElement("title",{id:i},r):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"}))});n.Z=i},34599:function(e,n,r){r.d(n,{Cr:function(){return s},LH:function(){return a},R1:function(){return o}});var t=r(71819),i=r(34067);function o(e){return e?`${e.slice(0,5)}â¦${e.slice(-4)}`:""}function s({wei:e,precision:n=3}){return parseFloat((0,t.d)(e)).toFixed(n).replace(/0+$/,"").replace(/\.$/,"")}function a({amount:e,decimals:n}){return(0,i.b)(BigInt(e),n)}},64695:function(e,n,r){r.d(n,{A:function(){return d}});var t=r(48470),i=r(18103),o=r(54106),s=r(42704),a=r(68471),l=r(75245),c=r(37707);let d=({address:e,showCopyIcon:n,url:r,className:a})=>
1{let[d,p]=(0,s.useState)(!1);function m(n){n.stopPropagation(),navigator.clipboard.writeText(e).then(()=>p(!0)).catch(console.error)}return(0,s.useEffect)(()=>{if(d){let e=setTimeout(()=>p(!1),3e3);return()=>clearTimeout(e)}},[d]),(0,t.jsxs)(h,r?{children:[(0,t.jsx)(x,{title:e,className:a,href:`${r}/address/${e}`,target:"_blank",children:(0,l.D)(e)}),n&&(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)(o.Z,{size:16})]})})]}:{children:[(0,t.jsx)(u,{title:e,className:a,children:(0,l.D)(e)}),n&&(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)(o.Z,{size:14})]})})]})},h=a.zo.span.withConfig({displayName:"AddressContainer",componentId:"sc-3a987cc8-0"})(["display:inline-flex;align-items:center;gap:0.5rem;"]),u=a.zo.span.withConfig({displayName:"AddressText",componentId:"sc-3a987cc8-1"})(["font-size:14px;font-weight:500;color:var(--privy-color-foreground);"]),x=a.zo.a.withConfig({displayName:"AddressLink",componentId:"sc-3a987cc8-2"})(["font-size:14px;color:var(--privy-color-foreground);text-decoration:none;&:hover{text-decoration:underline;}"])},96694:function(e,n,r){r.d(n,{C:function(){return o}});var t=r(48470),i=r(68471);let o=({className:e,checked:n,color:r="var(--privy-color-accent)",...i})=>(0,t.jsx)("label",{children:(0,t.jsxs)(s,{className:e,children:[(0,t.jsx)(l,{checked:n,...i}),(0,t.jsx)(c,{color:r,checked:n,children:(0,t.jsx)(a,{viewBox:"0 0 24 24",children:(0,t.jsx)("polyline",{points:"20 6 9 17 4 12"})})})]})}),s=i.zo.div.withConfig({displayName:"CheckboxContainer",componentId:"sc-db51b935-1"})(["display:inline-block;vertical-align:middle;"]),a=i.zo.svg.withConfig({displayName:"Icon",componentId:"sc-db51b935-2"})(["fill:none;stroke:white;stroke-width:3px;"]),l=i.zo.input.attrs({type:"checkbox"}).withConfig({displayName:"HiddenCheckbox",componentId:"sc-db51b935-3"})(["border:0;clip:rect(0 0 0 0);clippath:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px;"]),c=i.zo.div.withConfig({displayName:"StyledCheckbox",componentId:"sc-db51b935-4"})(["display:inline-block;width:18px;height:18px;transition:all 150ms;cursor:pointer;border-color:",";border-radius:3px;background:",";&&{border-width:1px;}",":focus + &{box-shadow:0 0 0 1px ",";}","{visibility:",";}"],e=>e.color,e=>e.checked?e.color:"var(--privy-color-background)",l,e=>e.color,a,e=>e.checked?"visible":"hidden")},82138:function(e,n,r){r.d(n,{E:function(){return s}});var t=r(48470),i=r(89261),o=r(68471);let s=({children:e,theme:n})=>(0,t.jsxs)(a,{$theme:n,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:n,children:e})]}),a=o.zo.div.withConfig({displayName:"Container",componentId:"sc-34910fd1-0"})(["display:flex;gap:0.75rem;background-color:var(--privy-color-error-bg);align-items:flex-start;padding:1rem;border-radius:0.75rem;"]),l=o.zo.div.withConfig({displayName:"Content",componentId:"sc-34910fd1-1"})(["color:",";font-size:1rem;font-weight:400;line-height:1.5;flex:1;text-align:left;"],e=>"dark"===e.$theme?"var(--privy-color-foreground-2)":"var(--privy-color-foreground)")},1472:function(e,n,r){r.d(n,{E:function(){return t}});let t=r(68471).zo.span.withConfig({displayName:"ErrorMessage",componentId:"sc-fcb8cd50-0"})(["text-align:left;font-size:0.75rem;font-weight:500;line-height:1.125rem;color:var(--privy-color-error);"])},58067:function(e,n,r){r.r(n),r.d(n,{ErrorScreen:function(){return f},ErrorScreenView:function(){return m},default:function(){return f}});var t=r(48470),i=r(74613);let o=(0,i.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"}]]),s=(0,i.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"}]]);
1var a=r(78546),l=r(68471),c=r(72059),d=r(70727),h=r(44925),u=r(16312),x=r(21418),p=r(97602);r(42704),r(85352),r(57442),r(97330),r(94864),r(90782);let m=({error:e,allowlistConfig:n,onRetry:r,onCaptchaReset:i,onBack:l})=>{let c=((e,n)=>{if(e instanceof x.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:o};if(e instanceof h.a)switch(e.privyErrorCode){case h.b.CLIENT_REQUEST_TIMEOUT:return{title:"Timed out",detail:e.message,ctaText:"Try again",icon:o};case h.b.INSUFFICIENT_BALANCE:return{title:"Insufficient balance",detail:e.message,ctaText:"Try again",icon:o};case h.b.TRANSACTION_FAILURE:return{title:"Transaction failure",detail:e.message,ctaText:"Try again",icon:o};default:return{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:o}}else{if(e instanceof d.P&&"twilio_verification_failed"===e.type)return{title:"Something went wrong",detail:e.message,ctaText:"Try again",icon:s};if(!(e instanceof h.c))return e instanceof h.e&&e.status&&[400,422].includes(e.status)?{title:"Something went wrong",detail:e.message,ctaText:"Try again",icon:o}:{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:o};switch(e.privyErrorCode){case h.b.INVALID_CAPTCHA:return{title:"Something went wrong",detail:"Please try again.",ctaText:"Try again",icon:o};case h.b.DISALLOWED_LOGIN_METHOD:return{title:"Not allowed",detail:e.message,ctaText:"Try another method",icon:o};case h.b.ALLOWLIST_REJECTED:return{title:n.errorTitle||"You don't have access to this app",detail:n.errorDetail||"Have you been invited?",ctaText:n.errorCtaText||"Try another account",icon:a.Z};case h.b.CAPTCHA_FAILURE:return{title:"Something went wrong",detail:"You did not pass CAPTCHA. Please try again.",ctaText:"Try again",icon:null};case h.b.CAPTCHA_TIMEOUT:return{title:"Something went wrong",detail:"Something went wrong! Please try again later.",ctaText:"Try again",icon:null};case h.b.LINKED_TO_ANOTHER_USER:return{title:"Authentication failed",detail:"This account has already been linked to another user.",ctaText:"Try again",icon:o};case h.b.NOT_SUPPORTED:return{title:"This region is not supported",detail:"SMS authentication from this region is not available",ctaText:"Try another method",icon:o};case h.b.TOO_MANY_REQUESTS:return{title:"Request failed",detail:"Too many attempts.",ctaText:"Try again later",icon:o};default:return{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:o}}}})(e,n);return(0,t.jsx)(p.S,{title:c.title,subtitle:c.detail,icon:c.icon,onBack:l,iconVariant:"error",primaryCta:{label:c.ctaText,onClick:()=>{e instanceof h.c&&(e.privyErrorCode===h.b.INVALID_CAPTCHA&&i?.(),e.privyErrorCode===h.b.ALLOWLIST_REJECTED&&n.errorCtaLink)?window.location.href=n.errorCtaLink:r?.()},variant:"error"},watermark:!0})},f={component:()=>{let{navigate:e,data:n,lastScreen:r,currentScreen:i}=(0,u.a)(),o=(0,c.u)(),{reset:s}=(0,d.a)(),a=n?.errorModalData?.previousScreen||(r===i?void 0:r);return(0,t.jsx)(m,{error:n?.errorModalData?.error||Error(),allowlistConfig:o.allowlistConfig,onRetry:()=>{e(a||"LandingScreen",!1)},onCaptchaReset:s})}},g=l.zo.a.withConfig({displayName:"Link",componentId:"sc-506514cb-0"})(["color:var(--privy-color-accent) !important;font-weight:600;"])},71945:function(e,n,r){r.d(n,{L:function(){return t}});let t=r(68471).zo.span.withConfig({displayName:"LabelXs",componentId:"sc-4c43f9fd-0"})(["color:var(--privy-color-foreground-3);font-size:0.75rem;font-weight:500;line-height:1.125rem;"])},55168:function(e,n,r){r.d(n,{L:function(){return o}});var t=r(68471);let i=(0,t.F4)(["from,to{background:var(--privy-color-foreground-4);color:var(--privy-color-foreground-4);}50%{background:var(--privy-color-foreground-accent);color:var(--privy-color-foreground-accent);}"]),o=(0,t.iv)(["",""],e=>e.$isLoading?(0,t.iv)(["width:35%;animation:"," 2s linear infinite;border-radius:var(--privy-border-radius-sm);"],i):"")},60105:function(e,n,r){r.d(n,{R:function(){return o},a:function(){return i}});var t=r(68471);let i=t.zo.span.withConfig({displayName:"Rows",componentId:"sc-b764aab6-0"})(["display:flex;flex-direction:column;gap:0.35rem;width:100%;"]),o=t.zo.span.withConfig({displayName:"Row",componentId:"sc-b764aab6-1"})(["display:flex;width:100%;justify-content:space-between;gap:0.5rem;"])},54351:function(e,n,r){r.d(n,{C:function(){return s},S:function(){return o}});var t=r(48470),i=r(68471);let o=({title:e,description:n,children:r,...i})=>(0,t.jsx)(a,{...i,children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h3",{children:e}),"string"==typeof n?(0,t.jsx)("p",{children:n}):n,r]})}),s=({title:e,description:n,icon:r,children:i,...o})=>(0,t.jsxs)(l,{...o,children:[r||null,(0,t.jsx)("h3",{children:e}),n&&"string"==typeof n?(0,t.jsx)("p",{children:n}):n,i]}),a=i.zo.div.withConfig({displayName:"StyledSection",componentId:"sc-523a75d6-1"})(["display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start;text-align:left;gap:8px;width:100%;margin-bottom:24px;&& h3{font-size:17px;color:var(--privy-color-foreground);}&& p{color:var(--privy-color-foreground-2);font-size:14px;}"]),l=(0,i.zo)(a).withConfig({displayName:"CenteredStyledSection",componentId:"sc-523a75d6-2"})(["align-items:center;text-align:center;gap:16px;h3{margin-bottom:24px;}"])},36502:function(e,n,r){r.d(n,{S:function(){return t}});let t=r(68471).zo.span.withConfig({displayName:"Subtitle",componentId:"sc-7a11f796-0"})(["margin-top:4px;color:var(--privy-color-foreground);text-align:center;font-size:0.875rem;font-weight:400;line-height:1.375rem;&& a{color:var(--privy-color-accent);}"])},61199:function(e,n,r){r.d(n,{T:function(){return t}});let t=r(68471).zo.span.withConfig({displayName:"Title",componentId:"sc-66de63c-0"})(["color:var(--privy-color-foreground);font-size:1.125rem;font-weight:600;line-height:1.875rem;text-align:center;"])},79446:function(e,n,r){r.d(n,{S:function(){return Z},T:function(){return Q},a:function(){return H}});var t=r(48470),i=r(42704);let o=i.forwardRef(function(e,n){let{title:r,titleId:t,...o}=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:n,"aria-labelledby":t},o),r?i.createElement("title",{id:t},r):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 s=r(37944);let a=i.forwardRef(function(e,n){let{title:r,titleId:t,...o}=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:n,"aria-labelledby":t},o),r?i.createElement("title",{id:t},r):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"}))});var l=r(68471),c=r(34599),d=r(37707),h=r(69882),u=r(46602),x=r(60105),p=r(1472),m=r(71945),f=r(36502),g=r(61199),j=r(64695),y=r(80863),w=r(72059),v=r(75245),b=r(55168),k=r(16511),C=r(79584),T=r(96694),I=r(82138),L=r(27503),A=r(64474);let S=i.forwardRef(function(e,n){let{title:r,titleId:t,...o}=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:n,"aria-labelledby":t},o),r?i.createElement("title",{id:t},r):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 N=r(89261),R=r(44925);let E=(0,l.zo)(u.L).withConfig({displayName:"InteractiveLabel",componentId:"sc-b57d0824-0"})(["cursor:pointer;display:inline-flex;gap:8px;align-items:center;color:var(--privy-color-accent);
1svg{fill:var(--privy-color-accent);}"]);var z=({iconUrl:e,value:n,symbol:r,usdValue:i,nftName:o,nftCount:s,decimals:a,$isLoading:l})=>{if(l)return(0,t.jsx)(V,{$isLoading:l});let c=n&&i&&a?function(e,n,r){let t=parseFloat(e),i=parseFloat(r);if(0===t||0===i||Number.isNaN(t)||Number.isNaN(i))return e;let o=Math.ceil(-Math.log10(.01/(i/t))),s=Math.pow(10,o=Math.max(o=Math.min(o,n),1)),a=+(Math.floor(t*s)/s).toFixed(o).replace(/\.?0+$/,"");return Intl.NumberFormat(void 0,{maximumFractionDigits:n}).format(a)}(n,a,i):n;return(0,t.jsxs)("div",{children:[(0,t.jsxs)(V,{$isLoading:l,children:[e&&(0,t.jsx)(O,{src:e,alt:"Token icon"}),s&&s>1?s+"x":void 0," ",o,c," ",r]}),i&&(0,t.jsxs)(M,{$isLoading:l,children:["$",i]})]})};let V=l.zo.span.withConfig({displayName:"Value",componentId:"sc-991db279-0"})(["color:var(--privy-color-foreground);font-size:0.875rem;font-weight:500;line-height:1.375rem;word-break:break-all;text-align:right;display:flex;justify-content:flex-end;",""],b.L),M=l.zo.span.withConfig({displayName:"Subvalue",componentId:"sc-991db279-1"})(["color:var(--privy-color-foreground-2);font-size:12px;font-weight:400;line-height:18px;word-break:break-all;text-align:right;display:flex;justify-content:flex-end;",""],b.L),O=l.zo.img.withConfig({displayName:"TokenIcon",componentId:"sc-991db279-2"})(["height:14px;width:14px;margin-right:4px;object-fit:contain;"]),$=e=>{let{chain:n,transactionDetails:r,isTokenContractInfoLoading:i,symbol:o}=e,{action:s,functionName:a}=r;return(0,t.jsx)(C.B,{children:(0,t.jsxs)(x.a,{children:["transaction"!==s&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Action"}),(0,t.jsx)(u.V,{children:a})]}),"mint"===a&&"args"in r&&r.args.filter(e=>e).map((e,r)=>(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:`Param ${r}`}),(0,t.jsx)(u.V,{children:"string"==typeof e&&(0,k.U)(e)?(0,t.jsx)(j.A,{address:e,url:n?.blockExplorers?.default?.url,showCopyIcon:!1}):e?.toString()})]},r)),"setApprovalForAll"===a&&r.operator&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Operator"}),(0,t.jsx)(u.V,{children:(0,t.jsx)(j.A,{address:r.operator,url:n?.blockExplorers?.default?.url,showCopyIcon:!1})})]}),"setApprovalForAll"===a&&void 0!==r.approved&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Set approval to"}),(0,t.jsx)(u.V,{children:r.approved?"true":"false"})]}),"transfer"===a||"transferFrom"===a||"safeTransferFrom"===a||"approve"===a?(0,t.jsxs)(t.Fragment,{children:["formattedAmount"in r&&r.formattedAmount&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Amount"}),(0,t.jsxs)(u.V,{$isLoading:i,children:[r.formattedAmount," ",o]})]}),"tokenId"in r&&r.tokenId&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Token ID"}),(0,t.jsx)(u.V,{children:r.tokenId.toString()})]})]}):null,"safeBatchTransferFrom"===a&&(0,t.jsxs)(t.Fragment,{children:["amounts"in r&&r.amounts&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Amounts"}),(0,t.jsx)(u.V,{children:r.amounts.join(", ")})]}),"tokenIds"in r&&r.tokenIds&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Token IDs"}),(0,t.jsx)(u.V,{children:r.tokenIds.join(", ")})]})]}),"approve"===a&&r.spender&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Spender"}),(0,t.jsx)(u.V,{children:(0,t.jsx)(j.A,{address:r.spender,url:n?.blockExplorers?.default?.url,showCopyIcon:!1})})]}),("transferFrom"===a||"safeTransferFrom"===a||"safeBatchTransferFrom"===a)&&r.transferFrom&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Transferring from"}),(0,t.jsx)(u.V,{children:(0,t.jsx)(j.A,{address:r.transferFrom,url:n?.blockExplorers?.default?.url,showCopyIcon:!1})})]}),("transferFrom"===a||"safeTransferFrom"===a||"safeBatchTransferFrom"===a)&&r.transferTo&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Transferring to"}),(0,t.jsx)(u.V,{children:(0,t.jsx)(j.A,{address:r.transferTo,url:n?.blockExplorers?.default?.url,showCopyIcon:!1})})]})]})})},F=({variant:e,setPreventMaliciousTransaction:n,colorScheme:r="light",preventMaliciousTransaction:i})=>"warn"===e?(0,t.jsx)(D,{children:(0,t.jsxs)(L.W,{theme:r,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)(D,{children:[(0,t.jsx)(I.E,{theme:r,children:(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)(P,{children:[(0,t.jsx)(T.C,{color:"var(--privy-color-error)",checked:!i,readOnly:!0,onClick:()=>n(!i)}),(0,t.jsx)("span",{children:"I understand and want to proceed anyways."})]})]})}):null,D=l.zo.div.withConfig({displayName:"BannerContainer",componentId:"sc-ab8a5a0b-0"})(["margin-top:1.5rem;"]),P=l.zo.div.withConfig({displayName:"CheckboxContainer",componentId:"sc-ab8a5a0b-1"})(["display:flex;align-items:center;gap:0.5rem;margin-top:0.75rem;"]),B=({transactionIndex:e,maxIndex:n})=>"number"!=typeof e||0===n?"":` (${e+1} / ${n+1})`,Z=({img:e,submitError:n,prepareError:r,onClose:l,action:c,title:m,subtitle:y,to:b,tokenAddress:k,network:C,missingFunds:T,fee:I,from:L,cta:A,disabled:S,chain:N,isSubmitting:R,isPreparing:V,isTokenPriceLoading:M,isTokenContractInfoLoading:O,isSponsored:D,symbol:P,balance:Z,onClick:H,transactionDetail
1s:W,transactionIndex:G,maxIndex:Q,onBack:X,chainName:K,validation:ee,hasScanDetails:en,setIsScanDetailsOpen:er,preventMaliciousTransaction:et,setPreventMaliciousTransaction:ei,tokensSent:eo,tokensReceived:es,isScanning:ea,isCancellable:el,functionName:ec})=>{let{showTransactionDetails:ed,setShowTransactionDetails:eh,hasMoreDetails:eu,isErc20Ish:ex}=(e=>{let[n,r]=(0,i.useState)(!1),t=!0,o=!1;return(!e||e.isErc20Ish||"transaction"===e.action)&&(t=!1),t&&(o=Object.entries(e||{}).some(([e,n])=>n&&!["action","isErc20Ish","isNFTIsh"].includes(e))),{showTransactionDetails:n,setShowTransactionDetails:r,hasMoreDetails:t&&o,isErc20Ish:e?.isErc20Ish}})(W),ep=(0,w.u)(),em=ex&&O||V||M||ea;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.M,{onClose:l,backFn:X}),e&&(0,t.jsx)(q,{children:e}),(0,t.jsxs)(g.T,{style:{marginTop:e?"1.5rem":0},children:[m,(0,t.jsx)(B,{maxIndex:Q,transactionIndex:G})]}),(0,t.jsx)(f.S,{children:y}),(0,t.jsxs)(x.a,{style:{marginTop:"2rem"},children:[(!!eo[0]||em)&&(0,t.jsxs)(x.R,{children:[es.length>0?(0,t.jsx)(u.L,{children:"Send"}):(0,t.jsx)(u.L,{children:"approve"===c?"Approval amount":"Amount"}),(0,t.jsx)("div",{className:"flex flex-col",children:eo.map((e,n)=>(0,t.jsx)(z,{iconUrl:e.iconUrl,value:"setApprovalForAll"===ec?"All":e.value,usdValue:e.usdValue,symbol:e.symbol,nftName:e.nftName,nftCount:e.nftCount,decimals:e.decimals},n))})]}),es.length>0&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Receive"}),(0,t.jsx)("div",{className:"flex flex-col",children:es.map((e,n)=>(0,t.jsx)(z,{iconUrl:e.iconUrl,value:e.value,usdValue:e.usdValue,symbol:e.symbol,nftName:e.nftName,nftCount:e.nftCount,decimals:e.decimals},n))})]}),W&&"spender"in W&&W?.spender?(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Spender"}),(0,t.jsx)(u.V,{children:(0,t.jsx)(j.A,{address:W.spender,url:N?.blockExplorers?.default?.url})})]}):null,b&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"To"}),(0,t.jsx)(u.V,{children:(0,t.jsx)(j.A,{address:b,url:N?.blockExplorers?.default?.url,showCopyIcon:!0})})]}),k&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Token address"}),(0,t.jsx)(u.V,{children:(0,t.jsx)(j.A,{address:k,url:N?.blockExplorers?.default?.url})})]}),(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Network"}),(0,t.jsx)(u.V,{children:C})]}),(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Estimated fee"}),(0,t.jsx)(u.V,{$isLoading:V||M||void 0===D,children:D?(0,t.jsxs)(Y,{children:[(0,t.jsxs)(J,{children:["Sponsored by ",ep.name]}),(0,t.jsx)(o,{height:16,width:16})]}):I})]}),eu&&!en&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.R,{className:"cursor-pointer",onClick:()=>eh(!ed),children:(0,t.jsxs)(u.a,{className:"flex items-center gap-x-1",children:["Details"," ",(0,t.jsx)(s.Z,{style:{width:"0.75rem",marginLeft:"0.25rem",transform:ed?"rotate(180deg)":void 0}})]})}),ed&&W&&(0,t.jsx)($,{action:c,chain:N,transactionDetails:W,isTokenContractInfoLoading:O,symbol:P})]}),en&&(0,t.jsx)(x.R,{children:(0,t.jsxs)(E,{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)(v.Y,{}),n?(0,t.jsx)(p.E,{style:{marginTop:"2rem"},children:n.message}):r&&0===G?(0,t.jsx)(p.E,{style:{marginTop:"2rem"},children:r.shortMessage??U}):null,(0,t.jsx)(F,{variant:ee,preventMaliciousTransaction:et,setPreventMaliciousTransaction:ei}),(0,t.jsx)(_,{$useSmallMargins:!(!r&&!n&&"warn"!==ee&&"error"!==ee),address:L,balance:Z,errMsg:V||r||n||!T?void 0:`Add funds on ${N?.name??K} to complete transaction.`}),(0,t.jsx)(d.P,{style:{marginTop:"1rem"},loading:R,disabled:S||V,onClick:H,children:A}),el&&(0,t.jsx)(d.E,{style:{marginTop:"1rem"},onClick:l,isSubmitting:!1,children:"Not now"}),(0,t.jsx)(h.B,{})]})},H=({img:e,title:n,subtitle:r,cta:a,instructions:l,network:y,blockExplorerUrl:b,isMissingFunds:k,submitError:C,parseError:T,total:I,swap:L,transactingWalletAddress:A,fee:S,balance:N,disabled:R,isSubmitting:z,isPreparing:V,isTokenPriceLoading:M,onClick:O,onClose:$,onBack:F,isSponsored:D})=>{let P=V||M,[B,Z]=(0,i.useState)(!1),H=(0,w.u)();return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.M,{onClose:$,backFn:F}),e&&(0,t.jsx)(q,{children:e}),(0,t.jsx)(g.T,{style:{marginTop:e?"1.5rem":0},children:n}),(0,t.jsx)(f.S,{children:r}),(0,t.jsxs)(x.a,{style:{marginTop:"2rem",marginBottom:".5rem"},children:[(I||P)&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Amount"}),(0,t.jsx)(u.V,{$isLoading:P,children:I})]}),L&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Swap"}),(0,t.jsx)(u.V,{children:L})]}),y&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Network"}),(0,t.jsx)(u.V,{children:y})]}),(S||P||void 0!==D)&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Estimated fee"}),(0,t.jsx)(u.V,{$isLoading:P,children:D&&!P?(0,t.jsxs)(Y,{children:[(0,t.jsxs)(J,{children:["Sponsored by ",H.name]}),(0,t.jsx)(o,{height:16,width:16})]}):S})]})]}),(0,t.jsx)(x.R,{children:(0,t.jsxs)(E,{onClick:()=>Z(e=>!e),children:[(0,t.jsx)("span",{children:"Advanced"}),(0,t.jsx)(s.Z,{height:"16px",width:"16px",strokeWidth:"2",style:{transition:"all 300ms",transform:B?"rotate(180deg)":void 0}})]})}),B&&(0,t.jsx)(t.Fragment,{children:l.map((e,n)=>"sol-transfer"===e.type?(0,t.jsxs)(W,{children:[(0,t.jsx)(x.R,{children:(0,t.jsxs)(m.L,{children:["Transfer ",e.withSeed?"with seed":""]})}),(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Amount"}),(0,t.jsxs)(u.V,{children:[(0,c.LH)({amount:e.value,decimals:e.token.decimals})," ",e.token.symbol]})]}),!!e.toAccount&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Destination"}),(0,t.jsx)(u.V,{children:(0,t.jsx)(j.A,{address:e.toAccount,url:b})})]})]},n):"spl-transfer"===e.type?(0,t.jsxs)(W,{children:[(0,t.jsx)(x.R,{children:(0,t.jsxs)(m.L,{children:["Transfer ",e.token.symbol]})}),(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Amount"}),(0,t.jsx)(u.V,{children:e.value.toString()})]}),!!e.fromAta&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Source"}),(0,t.jsx)(u.V,{children:(0,t.jsx)(j.A,{address:e.fromAta,url:b})})]}),!!e.toAta&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Destination"}),(0,t.jsx)(u.V,{children:(0,t.jsx)(j.A,{address:e.toAta,url:b})})]}),!!e.token.address&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Token"}),(0,t.jsx)(u.V,{children:(0,t.jsx)(j.A,{address:e.token.address,url:b})})]})]},n):"ata-creation"===e.type?(0,t.jsxs)(W,{children:[(0,t.jsx)(x.R,{children:(0,t.jsx)(m.L,{
1children:"Create token account"})}),(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Program ID"}),(0,t.jsx)(u.V,{children:(0,t.jsx)(j.A,{address:e.program,url:b})})]}),!!e.owner&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Owner"}),(0,t.jsx)(u.V,{children:(0,t.jsx)(j.A,{address:e.owner,url:b})})]})]},n):"create-account"===e.type?(0,t.jsxs)(W,{children:[(0,t.jsx)(x.R,{children:(0,t.jsxs)(m.L,{children:["Create account ",e.withSeed?"with seed":""]})}),!!e.account&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Account"}),(0,t.jsx)(u.V,{children:(0,t.jsx)(j.A,{address:e.account,url:b})})]}),(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Amount"}),(0,t.jsxs)(u.V,{children:[(0,c.LH)({amount:e.value,decimals:9})," SOL"]})]})]},n):"spl-init-account"===e.type?(0,t.jsxs)(W,{children:[(0,t.jsx)(x.R,{children:(0,t.jsx)(m.L,{children:"Initialize token account"})}),!!e.account&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Account"}),(0,t.jsx)(u.V,{children:(0,t.jsx)(j.A,{address:e.account,url:b})})]}),!!e.mint&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Mint"}),(0,t.jsx)(u.V,{children:(0,t.jsx)(j.A,{address:e.mint,url:b})})]}),!!e.owner&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Owner"}),(0,t.jsx)(u.V,{children:(0,t.jsx)(j.A,{address:e.owner,url:b})})]})]},n):"spl-close-account"===e.type?(0,t.jsxs)(W,{children:[(0,t.jsx)(x.R,{children:(0,t.jsx)(m.L,{children:"Close token account"})}),!!e.source&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Source"}),(0,t.jsx)(u.V,{children:(0,t.jsx)(j.A,{address:e.source,url:b})})]}),!!e.destination&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Destination"}),(0,t.jsx)(u.V,{children:(0,t.jsx)(j.A,{address:e.destination,url:b})})]}),!!e.owner&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Owner"}),(0,t.jsx)(u.V,{children:(0,t.jsx)(j.A,{address:e.owner,url:b})})]})]},n):"spl-sync-native"===e.type?(0,t.jsxs)(W,{children:[(0,t.jsx)(x.R,{children:(0,t.jsx)(m.L,{children:"Sync native"})}),(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Program ID"}),(0,t.jsx)(u.V,{children:(0,t.jsx)(j.A,{address:e.program,url:b})})]})]},n):"raydium-swap-base-input"===e.type?(0,t.jsxs)(W,{children:[(0,t.jsx)(x.R,{children:(0,t.jsxs)(m.L,{children:["Raydium swap"," ",e.tokenIn&&e.tokenOut?`${e.tokenIn.symbol} â ${e.tokenOut.symbol}`:""]})}),(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Amount in"}),(0,t.jsx)(u.V,{children:e.amountIn.toString()})]}),(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Minimum amount out"}),(0,t.jsx)(u.V,{children:e.minimumAmountOut.toString()})]}),e.mintIn&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Token in"}),(0,t.jsx)(u.V,{children:(0,t.jsx)(j.A,{address:e.mintIn,url:b})})]}),e.mintOut&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Token out"}),(0,t.jsx)(u.V,{children:(0,t.jsx)(j.A,{address:e.mintOut,url:b})})]})]},n):"raydium-swap-base-output"===e.type?(0,t.jsxs)(W,{children:[(0,t.jsx)(x.R,{children:(0,t.jsxs)(m.L,{children:["Raydium swap"," ",e.tokenIn&&e.tokenOut?`${e.tokenIn.symbol} â ${e.tokenOut.symbol}`:""]})}),(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Max amount in"}),(0,t.jsx)(u.V,{children:e.maxAmountIn.toString()})]}),(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Amount out"}),(0,t.jsx)(u.V,{children:e.amountOut.toString()})]}),e.mintIn&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Token in"}),(0,t.jsx)(u.V,{children:(0,t.jsx)(j.A,{address:e.mintIn,url:b})})]}),e.mintOut&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Token out"}),(0,t.jsx)(u.V,{children:(0,t.jsx)(j.A,{address:e.mintOut,url:b})})]})]},n):"jupiter-swap-shared-accounts-route"===e.type?(0,t.jsxs)(W,{children:[(0,t.jsx)(x.R,{children:(0,t.jsxs)(m.L,{children:["Jupiter swap"," ",e.tokenIn&&e.tokenOut?`${e.tokenIn.symbol} â ${e.tokenOut.symbol}`:""]})}),(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"In amount"}),(0,t.jsx)(u.V,{children:e.inAmount.toString()})]}),(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Quoted out amount"}),(0,t.jsx)(u.V,{children:e.quotedOutAmount.toString()})]}),e.mintIn&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Token in"}),(0,t.jsx)(u.V,{children:(0,t.jsx)(j.A,{address:e.mintIn,url:b})})]}),e.mintOut&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Token out"}),(0,t.jsx)(u.V,{children:(0,t.jsx)(j.A,{address:e.mintOut,url:b})})]})]},n):"jupiter-swap-exact-out-route"===e.type?(0,t.jsxs)(W,{children:[(0,t.jsx)(x.R,{children:(0,t.jsxs)(m.L,{children:["Jupiter swap"," ",e.tokenIn&&e.tokenOut?`${e.tokenIn.symbol} â ${e.tokenOut.symbol}`:""]})}),(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Quoted in amount"}),(0,t.jsx)(u.V,{children:e.quotedInAmount.toString()})]}),(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Amount out"}),(0,t.jsx)(u.V,{children:e.outAmount.toString()})]}),e.mintIn&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Token in"}),(0,t.jsx)(u.V,{children:(0,t.jsx)(j.A,{address:e.mintIn,url:b})})]}),e.mintOut&&(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Token out"}),(0,t.jsx)(u.V,{children:(0,t.jsx)(j.A,{address:e.mintOut,url:b})})]})]},n):(0,t.jsxs)(W,{children:[(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Program ID"}),(0,t.jsx)(u.V,{children:(0,t.jsx)(j.A,{address:e.program,url:b})})]}),(0,t.jsxs)(x.R,{children:[(0,t.jsx)(u.L,{children:"Data"}),(0,t.jsx)(u.V,{children:e.discriminator})]})]},n))}),(0,t.jsx)(v.Y,{}),C?(0,t.jsx)(p.E,{style:{marginTop:"2rem"},children:C.message}):T?(0,t.jsx)(p.E,{style:{marginTop:"2rem"},children:U}):null,(0,t.jsx)(_,{$useSmallMargins:!(!T&&!C),title:"",address:A,balance:N,errMsg:V||T||C||!k?void 0:"Add funds on Solana to complete transaction."}),(0,t.jsx)(d.P,{style:{marginTop:"1rem"},loading:z,disabled:R||V,onClick:O,children:a}),(0,t.jsx)(h.B,{})]})},_=(0,l.zo)(y.W).withConfig({displayName:"StyledWalletInfoCard",componentId:"sc-cbe5ab37-0"})(["",""],e=>e.$useSmallMargins?"margin-top: 0.5rem;":"margin-top: 2rem;"),W=(0,l.zo)(x.a).withConfig({displayName:"InstructionRows",componentId:"sc-cbe5ab37-1"})(["margin-top:0.5rem;border:1px solid var(--privy-color-foreground-4);border-radius:var(--privy-border-radius-sm);padding:0.5rem;"]),U="There was an error preparing your transaction. Your transaction request will likely fail.",q=l.zo.div.withConfig({displayName:"ImageContainer",componentId:"sc-cbe5ab37-2"})(["display:flex;width:100%;justify-content:center;max-height:40px;> img{object-fit:contain;border-radius:var(--privy-border-radius-sm);}"]),Y=l.zo.span.withConfig({displayName:"SponsoredRow",componentId:"sc-cbe5ab37-3"})(["display:inline-flex;align-items:center;gap:0.3rem;"]),J=l.zo.span.withConfig({displayName:"SponsoredText",componentId:"sc-cbe5ab37-4"})(["font-size:14px;font-weight:500;color:var(--privy-color-foreground);"]),G=()=>(0,t.jsxs)(en,{children:[(0,t.jsx)(et,{}),(0,t.jsx)(er,{})]}),Q=({transactionError:e,chainId:n,onClose:r,onRetry:o,chainType:s,transactionHash:a})=>{let{chains:l}=(0,R.u)(),[c,d]=(0,i.useState)(!1),{errorCode:u,errorMessage:x}=((e,n)=>{if("ethereum"===n)return{errorCode:e.details??e.message,errorMessage:e.shortMessage};let r=e.txSignature,t=e?.transactionMessage||"Something went wrong.";if(Array.isArray(e.logs)){let n=e.logs.find(e=>/insufficient (lamports|funds)/gi.test(e));n&&(t=n)}return{transactionHash:r,errorMessage:t}})(e,s),p=(({chains:e,chainId:n,chainType:r,transactionHash:t})=>{var i;return"ethereum"===r?e.find(e=>e.id===n)?.blockExplorers?.default.url??"https://etherscan.io":(i=t||"",`https://explorer.solana.com/tx/${i}?chain=${n}`)})({chains:l,chainId:n,chainType:s,transactionHash:a});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.M,{onClose:r}),(0,t.jsxs)(X,{children:[(0,t.jsx)(G,{}),(0,t.jsx)(K,{children:u}),(0,t.jsx)(ee,{children:"Please try again."}),(0,t.jsxs)(es,{children:[(0,t.jsx)(eo,{children:"Error message"}),(0,t.jsx)(el,{$clickable:!1,children:x})]}),a&&(0,t.jsxs)(es,{children:[(0,t.jsx)(eo,{children:"Transaction hash"}),(0,t.jsxs)(ea,{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)(el,{$clickable:!0,onClick:async()=>{await navigator.clipboard.writeText(a),d(!0)},children:[a,(0,t.jsx)(eh,{clicked:c})]})]}),(0,t.jsx)(ei,{onClick:()=>o({resetNonce:!!a}),children:"Retry transaction"})]}),(0,t.jsx)(h.a,{})]})},X=l.zo.div.withConfig({displayName:"TransactionErrorScreenContainer",componentId:"sc-d58f10e6-0"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;"]),K=l.zo.span.withConfig({displayName:"ErrorCode",componentId:"sc-d58f10e6-1"})(["color:var(--privy-color-foreground);text-align:center;font-size:1.125rem;font-weight:500;line-height:1.25rem;text-align:center;margin:10px;"]),ee=l.zo.span.withConfig({displayName:"Subtitle",componentId:"sc-d58f10e6-2"})(["margin-top:4px;margin-bottom:10px;color:var(--privy-color-foreground-3);text-align:center;font-size:0.875rem;font-style:normal;font-weight:400;line-height:20px;letter-spacing:-0.008px;"]),en=l.zo.div.withConfig({displayName:"CircleContainer",componentId:"sc-d58f10e6-3"})(["position:relative;width:60px;height:60px;margin:10px;display:flex;justify-content:center;align-items:center;"]),er=(0,l.zo)(N.Z).withConfig({displayName:"StyledExclamationCircleIcon",componentId:"sc-d58f10e6-4"})(["position:absolute;width:35px;height:35px;color:var(--privy-color-error);"]),et=l.zo.div.withConfig({displayName:"StyledRedCircle",componentId:"sc-d58f10e6-5"})(["position:absolute;width:60px;height:60px;border-radius:50%;background-color:var(--privy-color-error);opacity:0.1;"]),ei=(0,l.zo)(d.P).withConfig({displayName:"RetryButton",componentId:"sc-d58f10e6-6"})(["&&{margin-top:24px;}transition:color 350ms ease,background-color 350ms ease;"]),eo=l.zo.span.withConfig({displayName:"TextBoxTitle",componentId:"sc-d58f10e6-7"})(["width:100%;text-align:left;font-size:0.825rem;color:var(--privy-color-foreground);padding:4px;"]),es=l.zo.div.withConfig({displayName:"TextBoxContainer",componentId:"sc-d58f10e6-8"})(["width:100%;margin:5px;
1display:flex;flex-direction:column;justify-content:center;align-items:center;"]),ea=l.zo.text.withConfig({displayName:"HelperText",componentId:"sc-d58f10e6-9"})(["position:relative;width:100%;padding:5px;font-size:0.8rem;color:var(--privy-color-foreground-3);text-align:left;word-wrap:break-word;"]),el=l.zo.span.withConfig({displayName:"TextBox",componentId:"sc-d58f10e6-10"})(["position:relative;width:100%;background-color:var(--privy-color-background-2);padding:8px 12px;border-radius:10px;margin-top:5px;font-size:14px;color:var(--privy-color-foreground-3);text-align:left;word-wrap:break-word;",""],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 }"),ec=(0,l.zo)(S).withConfig({displayName:"StyledClipboardIcon",componentId:"sc-d58f10e6-11"})(["position:absolute;top:13px;right:13px;width:24px;height:24px;"]),ed=(0,l.zo)(A.Z).withConfig({displayName:"StyledClipboardCheckIcon",componentId:"sc-d58f10e6-12"})(["position:absolute;top:13px;right:13px;width:24px;height:24px;"]),eh=({clicked:e})=>(0,t.jsx)(e?ed:ec,{})},46602:function(e,n,r){r.d(n,{L:function(){return o},V:function(){return a},a:function(){return s}});var t=r(68471),i=r(55168);let o=t.zo.span.withConfig({displayName:"LabelSm",componentId:"sc-6c002d6-0"})(["color:var(--privy-color-foreground-3);font-size:0.875rem;font-weight:400;line-height:1.375rem;"]),s=(0,t.zo)(o).withConfig({displayName:"LabelSmPrimary",componentId:"sc-6c002d6-1"})(["color:var(--privy-color-accent);"]),a=t.zo.span.withConfig({displayName:"Value",componentId:"sc-72aa026-0"})(["color:var(--privy-color-foreground);font-size:0.875rem;font-weight:500;line-height:1.375rem;word-break:break-all;text-align:right;",""],i.L)},80863:function(e,n,r){r.d(n,{W:function(){return w}});var t=r(48470),i=r(18103),o=r(54106),s=r(42704),a=r(68471),l=r(37707),c=r(1472),d=r(71945),h=r(64695),u=r(79584);let x=(0,a.zo)(u.B).withConfig({displayName:"StyledBox",componentId:"sc-4010d8f3-0"})(["&&{padding:0.75rem;height:56px;}"]),p=a.zo.div.withConfig({displayName:"WalletContent",componentId:"sc-4010d8f3-1"})(["display:flex;align-items:center;justify-content:space-between;width:100%;"]),m=a.zo.div.withConfig({displayName:"AddressContainer",componentId:"sc-4010d8f3-2"})(["display:flex;flex-direction:column;gap:0;"]),f=a.zo.div.withConfig({displayName:"BalanceText",componentId:"sc-4010d8f3-3"})(["font-size:12px;line-height:1rem;color:var(--privy-color-foreground-3);"]),g=(0,a.zo)(d.L).withConfig({displayName:"TitleLabel",componentId:"sc-4010d8f3-4"})(["text-align:left;margin-bottom:0.5rem;"]),j=(0,a.zo)(c.E).withConfig({displayName:"StyledErrorMessage",componentId:"sc-4010d8f3-5"})(["margin-top:0.25rem;"]),y=(0,a.zo)(l.S).withConfig({displayName:"CopyButton",componentId:"sc-4010d8f3-6"})(["&&{gap:0.375rem;font-size:14px;}"]),w=({errMsg:e,balance:n,address:r,className:a,title:l,showCopyButton:c=!1})=>{let[d,u]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{if(d){let e=setTimeout(()=>u(!1),3e3);return()=>clearTimeout(e)}},[d]),(0,t.jsxs)("div",{children:[l&&(0,t.jsx)(g,{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:r,showCopyIcon:!1}),void 0!==n&&(0,t.jsx)(f,{children:n})]}),c&&(0,t.jsx)(y,{onClick:function(e){e.stopPropagation(),navigator.clipboard.writeText(r).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)(o.Z,{size:14})]})})]})}),e&&(0,t.jsx)(j,{children:e})]})}},27503:function(e,n,r){r.d(n,{W:function(){return s}});var t=r(48470),i=r(64357),o=r(68471);let s=({children:e,theme:n})=>(0,t.jsxs)(a,{$theme: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:n,children:e})]}),a=o.zo.div.withConfig({displayName:"Container",componentId:"sc-a77c2854-0"})(["display:flex;gap:0.75rem;background-color:var(--privy-color-warn-bg);align-items:flex-start;padding:1rem;border-radius:0.75rem;"]),l=o.zo.div.withConfig({displayName:"Content",componentId:"sc-a77c2854-1"})(["color:",";font-size:1rem;font-weight:400;line-height:1.5;flex:1;text-align:left;"],e=>"dark"===e.$theme?"var(--privy-color-foreground-2)":"var(--privy-color-foreground)")},21418:function(e,n,r){r.d(n,{R:function(){return f},a:function(){return s},b:function(){return o},c:function(){return x},d:function(){return a},g:function(){return u},t:function(){return c},u:function(){return m}});var t=r(42704),i=r(44925);let o=792703809,s="11111111111111111111111111111111",a="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",l="0x0000000000000000000000000000000000000000",c=({appId:e,originCurrency:n,destinationCurrency:r,...t})=>({tradeType:"EXPECTED_OUTPUT",originCurrency:n??l,destinationCurrency:r??l,referrer:`privy|${e}`,...t}),d="https://api.relay.link",h="https://api.testnets.relay.link",u=async({input:e,isTestnet:n})=>{let r=await fetch((n?h:d)+"/quote",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),t=await r.json();if(!(r.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 n=e.steps[0]?.items?.[0];if(n)return{from:n.data.from,to:n.data.to,value:Number(n.data.value),
1chainId:Number(n.data.chainId),data:n.data.data}};async function p({transactionHash:e,isTestnet:n}){let r=await fetch((n?h:d)+"/requests/v2?hash="+e),t=await r.json();if(!r.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 m({transactionHash:e,isTestnet:n,bridgingStatus:r,setBridgingStatus:i,onSuccess:o,onFailure:s}){(0,t.useEffect)(()=>{if(e&&r){if(["delayed","waiting","pending"].includes(r)){let r=setInterval(async()=>{try{let r=await p({transactionHash:e,isTestnet:n});i(r)}catch(e){console.error(e)}},1e3);return()=>clearInterval(r)}"success"===r?o({transactionHash:e}):["refund","failure"].includes(r)&&s({error:new f(e,n)})}},[r,e,n])}class f extends i.a{constructor(e,n){super("We were unable to complete the bridging transaction. Funds will be refunded on your wallet.",void 0,i.b.TRANSACTION_FAILURE),this.relayLink=n?`https://testnets.relay.link/transaction/${e}`:`https://relay.link/transaction/${e}`}}},79584:function(e,n,r){r.d(n,{B:function(){return o},a:function(){return i}});var t=r(68471);let i=(0,t.iv)(["&&{border-width:1px;padding:0.5rem 1rem;}width:100%;text-align:left;border:solid 1px var(--privy-color-foreground-4);border-radius:var(--privy-border-radius-md);display:flex;justify-content:space-between;align-items:center;",""],e=>"error"===e.$state?"\n border-color: var(--privy-color-error);\n background: var(--privy-color-error-bg);\n ":""),o=t.zo.div.withConfig({displayName:"Box",componentId:"sc-7252360a-0"})(["",""],i)}}]);
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.