1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6155],{14491:(e,t,r)=>{r.d(t,{A:()=>l});var i=r(1831);let a=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},n=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim();var o={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 s=(0,i.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:a,className:s="",children:l,iconNode:c,...d},p)=>(0,i.createElement)("svg",{ref:p,...o,width:t,height:t,stroke:e,strokeWidth:a?24*Number(r)/Number(t):r,className:n("lucide",s),...!l&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(d)&&{"aria-hidden":"true"},...d},[...c.map(([e,t])=>(0,i.createElement)(e,t)),...Array.isArray(l)?l:[l]])),l=(e,t)=>{let r=(0,i.forwardRef)(({className:r,...o},l)=>(0,i.createElement)(s,{ref:l,iconNode:t,className:n(`lucide-${a(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,r),...o}));return r.displayName=a(e),r}},21554:(e,t,r)=>{r.d(t,{A:()=>i});let i=(0,r(14491).A)("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"}]])},36656:(e,t,r)=>{r.d(t,{S:()=>o});var i=r(36495),a=r(81800),n=r(48158);let o=({primaryCta:e,secondaryCta:t,helpText:r,watermark:o=!0,children:s,...l})=>{let c=e||t?(0,i.jsxs)(i.Fragment,{children:[e&&(()=>{let{label:t,...r}=e,n=r.variant||"primary";return(0,i.jsx)(a.B,{...r,variant:n,style:{width:"100%",...r.style},children:t})})(),t&&(()=>{let{label:e,...r}=t,n=r.variant||"secondary";return(0,i.jsx)(a.B,{...r,variant:n,style:{width:"100%",...r.style},children:e})})()]}):null;return(0,i.jsxs)(n.S,{id:l.id,className:l.className,children:[(0,i.jsx)(n.S.Header,{...l}),s?(0,i.jsx)(n.S.Body,{children:s}):null,r||c||o?(0,i.jsxs)(n.S.Footer,{children:[r?(0,i.jsx)(n.S.HelpText,{children:r}):null,c?(0,i.jsx)(n.S.Actions,{children:c}):null,o?(0,i.jsx)(n.S.Watermark,{}):null]}):null]})}},48158:(e,t,r)=>{r.d(t,{S:()=>C});var i=r(36495),a=r(1831),n=r(3589),o=r(80169),s=r(11396),l=r(92453);let c=n.I4.div.withConfig({displayName:"ScreenRoot",componentId:"sc-2e815abe-0"})(["--screen-space:16px;--screen-space-lg:calc(var(--screen-space) * 1.5);position:relative;overflow:hidden;margin:0 calc(-1 * var(--screen-space));height:100%;border-radius:var(--privy-border-radius-lg);"]),d=n.I4.div.withConfig({displayName:"ScreenRootInner",componentId:"sc-2e815abe-1"})(["display:flex;flex-direction:column;gap:calc(var(--screen-space) * 1.5);width:100%;background:var(--privy-color-background);padding:0 var(--screen-space-lg) var(--screen-space);height:100%;border-radius:var(--privy-border-radius-lg);"]),p=n.I4.div.withConfig({displayName:"HeaderContainer",componentId:"sc-2e815abe-2"})(["position:relative;display:flex;flex-direction:column;"]),h=(0,n.I4)(s.M).withConfig({displayName:"StyledModalHeader",componentId:"sc-2e815abe-3"})(["margin:0 -8px;"]),g=n.I4.div.withConfig({displayName:"BodyContainer",componentId:"sc-2e815abe-4"})(["flex:1 1 auto;display:flex;flex-direction:column;overflow-y:auto;padding:3px;margin:-3px;&::-webkit-scrollbar{display:none;}scrollbar-gutter:stable both-edges;scrollbar-width:none;-ms-overflow-style:none;"," background-repeat:no-repeat;background-size:100% 32px,100% 16px;background-attachment:local,scroll;"],({$colorScheme:e})=>"light"===e?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.06)) bottom;":"dark"===e?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.06)) bottom;":void 0),u=n.I4.div.withConfig({displayName:"FooterContainer",componentId:"sc-2e815abe-5"})(["display:flex;flex-direction:column;gap:var(--screen-space-lg);"]),m=n.I4.div.withConfig({displayName:"CenteredHeader",componentId:"sc-2e815abe-6"})(["text-align:center;display:flex;flex-direction:column;align-items:center;gap:var(--screen-space);"]),y=n.I4.div.withConfig({displayName:"TitleContainer",componentId:"sc-2e815abe-7"})(["display:flex;flex-direction:column;gap:4px;"]),f=n.I4.h3.withConfig({displayName:"HeaderTitle",componentId:"sc-2e815abe-8"})(["&&{font-size:20px;line-height:32px;font-weight:500;color:var(--privy-color-foreground);margin:0;}"]),v=n.I4.p.withConfig({displayName:"HeaderSubtitle",componentId:"sc-2e815abe-9"})(["&&{margin:0;font-size:16px;font-weight:300;line-height:24px;color:var(--privy-color-foreground);}"]),x=n.I4.div.withConfig({displayName:"IconContainer",componentId:"sc-2e815abe-10"})(["background:",";border-radius:50%;width:64px;
1height:64px;display:flex;align-items:center;justify-content:center;"],({$variant:e})=>{switch(e){case"success":return"var(--privy-color-success-bg, #EAFCEF)";case"warning":return"var(--privy-color-warn, #FEF3C7)";case"error":return"var(--privy-color-error-bg, #FEE2E2)";case"loading":case"logo":return"transparent";default:return"var(--privy-color-background-2)"}}),b=n.I4.div.withConfig({displayName:"LogoContainer",componentId:"sc-2e815abe-11"})(["display:flex;align-items:center;justify-content:center;margin-bottom:var(--screen-space);img,svg{max-height:90px;max-width:180px;}"]),w=n.I4.div.withConfig({displayName:"LoadingWithIconContainer",componentId:"sc-2e815abe-12"})(["display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:82px;> div{position:relative;}> div > :first-child{position:relative;}> div > :last-child{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);}"]),C=({children:e,...t})=>(0,i.jsx)(c,{children:(0,i.jsx)(d,{...t,children:e})}),T=n.I4.div.withConfig({displayName:"ProgressBarContainer",componentId:"sc-2e815abe-13"})(["position:absolute;top:0;left:calc(-1 * var(--screen-space-lg));width:calc(100% + calc(var(--screen-space-lg) * 2));height:4px;background:var(--privy-color-background-2);border-top-left-radius:inherit;border-top-right-radius:inherit;overflow:hidden;"]),I=(0,n.I4)(s.B).withConfig({displayName:"StyledBlobbyFooter",componentId:"sc-2e815abe-14"})(["padding:0;&& a{padding:0;color:var(--privy-color-foreground-3);}"]),k=n.I4.div.withConfig({displayName:"ProgressBarFill",componentId:"sc-2e815abe-15"})(["height:100%;width:","%;background:var(--privy-color-foreground-3);border-radius:2px;transition:width 300ms ease-in-out;"],({pct:e})=>e),j=({step:e})=>e?(0,i.jsx)(T,{children:(0,i.jsx)(k,{pct:Math.min(100,e.current/e.total*100)})}):null;C.Header=({title:e,subtitle:t,icon:r,iconVariant:a,iconLoadingStatus:n,showBack:o,onBack:s,showInfo:l,onInfo:c,showClose:d,onClose:g,step:u,...x})=>(0,i.jsxs)(p,{...x,children:[(0,i.jsx)(h,{backFn:o?s:void 0,infoFn:l?c:void 0,onClose:d?g:void 0,closeable:d}),(r||a||e||t)&&(0,i.jsxs)(m,{children:[r||a?(0,i.jsx)(C.Icon,{icon:r,variant:a,loadingStatus:n}):null,(0,i.jsxs)(y,{children:[e&&(0,i.jsx)(f,{children:e}),t&&(0,i.jsx)(v,{children:t})]})]}),u&&(0,i.jsx)(j,{step:u})]}),(C.Body=a.forwardRef(({children:e,...t},r)=>(0,i.jsx)(g,{ref:r,...t,children:e}))).displayName="Screen.Body",C.Footer=({children:e,...t})=>(0,i.jsx)(u,{id:"privy-content-footer-container",...t,children:e}),C.Actions=({children:e,...t})=>(0,i.jsx)(E,{...t,children:e}),C.HelpText=({children:e,...t})=>(0,i.jsx)(S,{...t,children:e}),C.Watermark=()=>(0,i.jsx)(I,{}),C.Icon=({icon:e,variant:t="subtle",loadingStatus:r})=>"logo"===t&&e?(0,i.jsx)(b,"string"==typeof e?{children:(0,i.jsx)("img",{src:e,alt:""})}:a.isValidElement(e)?{children:e}:{children:a.createElement(e)}):"loading"===t?e?(0,i.jsx)(w,{children:(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:[(0,i.jsx)(o.a4,{success:r?.success,fail:r?.fail}),"string"==typeof e?(0,i.jsx)("span",{style:{background:`url('${e}') 0 0 / contain`,height:"38px",width:"38px",borderRadius:"6px",margin:"auto",backgroundSize:"contain"}}):a.isValidElement(e)?a.cloneElement(e,{style:{width:"38px",height:"38px"}}):a.createElement(e,{style:{width:"38px",height:"38px"}})]})}):(0,i.jsx)(x,{$variant:t,children:(0,i.jsx)(l.N,{size:"64px"})}):(0,i.jsx)(x,{$variant:t,children:e&&("string"==typeof e?(0,i.jsx)("img",{src:e,alt:"",style:{width:"32px",height:"32px",borderRadius:"6px"}}):a.isValidElement(e)?e:a.createElement(e,{width:32,height:32,stroke:(()=>{switch(t){case"success":return"var(--privy-color-icon-success)";case"warning":return"var(--privy-color-icon-warning)";case"error":return"var(--privy-color-icon-error)";default:return"var(--privy-color-icon-muted)"}})(),strokeWidth:2}))});let E=n.I4.div.withConfig({displayName:"ActionsContainer",componentId:"sc-2e815abe-16"})(["width:100%;display:flex;flex-direction:column;gap:calc(var(--screen-space) / 2);"]),S=n.I4.p.withConfig({displayName:"HelpTextContainer",componentId:"sc-2e815abe-17"})(["&&{margin:0;width:100%;text-align:center;color:var(--privy-color-foreground-3);font-size:14px;line-height:22px;& a{color:var(--privy-color-accent);}}"])},78154:(e,t,r)=>{r.d(t,{R:()=>y,a:()=>o,b:()=>n,c:()=>g,d:()=>s,g:()=>h,t:()=>c,u:()=>m});var i=r(1831),a=r(55996);let n=0x2f3fb341,o="11111111111111111111111111111111",s="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",l="0x0000000000000000000000000000000000000000",c=({appId:e,originCurrency:t,destinationCurrency:r,...i})=>({tradeType:"EXPECTED_OUTPUT",originCurrency:t??l,destinationCurrency:r??l,referrer:`privy|${e}`,...i}),d="https://api.relay.link",p="https://api.testnets.relay.link",h=async({input:e,isTestnet:t})=>{let r=await fetch((t?p:d)+"/quote",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),i=await r.json();if(!(r.ok||"string"==typeof i.message&&i.message.startsWith("Invalid address")))throw console.error("Relay error:",i),Error(i.message??"Error fetching quote from relay");return i},g=e=>{let t=e.steps[0]?.items?.[0];if(t)return{from:t.data.from,to:t.data.to,value:Number(t.data.value),
1chainId:Number(t.data.chainId),data:t.data.data}};async function u({transactionHash:e,isTestnet:t}){let r=await fetch((t?p:d)+"/requests/v2?hash="+e),i=await r.json();if(!r.ok){if("message"in i&&"string"==typeof i.message)throw Error(i.message);throw Error("Error fetching request from relay")}return i.requests.at(0)?.status??"pending"}function m({transactionHash:e,isTestnet:t,bridgingStatus:r,setBridgingStatus:a,onSuccess:n,onFailure:o}){(0,i.useEffect)(()=>{if(e&&r){if(["delayed","waiting","pending"].includes(r)){let r=setInterval(async()=>{try{let r=await u({transactionHash:e,isTestnet:t});a(r)}catch(e){console.error(e)}},1e3);return()=>clearInterval(r)}"success"===r?n({transactionHash:e}):["refund","failure"].includes(r)&&o({error:new y(e,t)})}},[r,e,t])}class y extends a.a{constructor(e,t){super("We were unable to complete the bridging transaction. Funds will be refunded on your wallet.",void 0,a.b.TRANSACTION_FAILURE),this.relayLink=t?`https://testnets.relay.link/transaction/${e}`:`https://relay.link/transaction/${e}`}}},86155:(e,t,r)=>{r.r(t),r.d(t,{ErrorScreen:()=>y,ErrorScreenView:()=>m,default:()=>y});var i=r(36495),a=r(14491);let n=(0,a.A)("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"}]]),o=(0,a.A)("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 s=r(21554),l=r(3589),c=r(41674),d=r(13510),p=r(55996),h=r(38017),g=r(78154),u=r(36656);r(1831),r(87635),r(12226),r(45660),r(49606),r(21124);let m=({error:e,allowlistConfig:t,onRetry:r,onCaptchaReset:a,onBack:l})=>{let c=((e,t)=>{if(e instanceof g.R)return{title:"Transaction failed",detail:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{children:e.message}),(0,i.jsxs)("span",{children:[" ","Check the"," ",(0,i.jsx)(f,{href:e.relayLink,target:"_blank",children:"refund status"}),"."]})]}),ctaText:"Try again",icon:n};if(e instanceof p.a)switch(e.privyErrorCode){case p.b.CLIENT_REQUEST_TIMEOUT:return{title:"Timed out",detail:e.message,ctaText:"Try again",icon:n};case p.b.INSUFFICIENT_BALANCE:return{title:"Insufficient balance",detail:e.message,ctaText:"Try again",icon:n};case p.b.TRANSACTION_FAILURE:return{title:"Transaction failure",detail:e.message,ctaText:"Try again",icon:n};default:return{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:n}}if(e instanceof d.P&&"twilio_verification_failed"===e.type)return{title:"Something went wrong",detail:e.message,ctaText:"Try again",icon:o};if(!(e instanceof p.c))return e instanceof p.e&&e.status&&[400,422].includes(e.status)?{title:"Something went wrong",detail:e.message,ctaText:"Try again",icon:n}:{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:n};switch(e.privyErrorCode){case p.b.INVALID_CAPTCHA:return{title:"Something went wrong",detail:"Please try again.",ctaText:"Try again",icon:n};case p.b.DISALLOWED_LOGIN_METHOD:return{title:"Not allowed",detail:e.message,ctaText:"Try another method",icon:n};case p.b.ALLOWLIST_REJECTED:return{title:t.errorTitle||"You don't have access to this app",detail:t.errorDetail||"Have you been invited?",ctaText:t.errorCtaText||"Try another account",icon:s.A};case p.b.CAPTCHA_FAILURE:return{title:"Something went wrong",detail:"You did not pass CAPTCHA. Please try again.",ctaText:"Try again",icon:null};case p.b.CAPTCHA_TIMEOUT:return{title:"Something went wrong",detail:"Something went wrong! Please try again later.",ctaText:"Try again",icon:null};case p.b.LINKED_TO_ANOTHER_USER:return{title:"Authentication failed",detail:"This account has already been linked to another user.",ctaText:"Try again",icon:n};case p.b.NOT_SUPPORTED:return{title:"This region is not supported",detail:"SMS authentication from this region is not available",ctaText:"Try another method",icon:n};
1case p.b.TOO_MANY_REQUESTS:return{title:"Request failed",detail:"Too many attempts.",ctaText:"Try again later",icon:n};default:return{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:n}}})(e,t);return(0,i.jsx)(u.S,{title:c.title,subtitle:c.detail,icon:c.icon,onBack:l,iconVariant:"error",primaryCta:{label:c.ctaText,onClick:()=>{e instanceof p.c&&(e.privyErrorCode===p.b.INVALID_CAPTCHA&&a?.(),e.privyErrorCode===p.b.ALLOWLIST_REJECTED&&t.errorCtaLink)?window.location.href=t.errorCtaLink:r?.()},variant:"error"},watermark:!0})},y={component:()=>{let{navigate:e,data:t,lastScreen:r,currentScreen:a}=(0,h.a)(),n=(0,c.u)(),{reset:o}=(0,d.a)(),s=t?.errorModalData?.previousScreen||(r===a?void 0:r);return(0,i.jsx)(m,{error:t?.errorModalData?.error||Error(),allowlistConfig:n.allowlistConfig,onRetry:()=>{e(s||"LandingScreen",!1)},onCaptchaReset:o})}},f=l.I4.a.withConfig({displayName:"Link",componentId:"sc-506514cb-0"})(["color:var(--privy-color-accent) !important;font-weight:600;"])},92453:(e,t,r)=>{r.d(t,{N:()=>n});var i=r(36495),a=r(3589);let n=({size:e,centerIcon:t})=>(0,i.jsx)(o,{$size:e,children:(0,i.jsxs)(s,{children:[(0,i.jsx)(c,{}),(0,i.jsx)(d,{}),t?(0,i.jsx)(l,{children:t}):null]})}),o=a.I4.div.withConfig({displayName:"LoadingContainer",componentId:"sc-ebc93df8-0"})(["--spinner-size:",";display:inline-flex;justify-content:center;align-items:center;@media all and (display-mode:standalone){margin-bottom:30px;}"],e=>e.$size?e.$size:"96px"),s=a.I4.div.withConfig({displayName:"SpinnerContainer",componentId:"sc-ebc93df8-1"})(["position:relative;height:var(--spinner-size);width:var(--spinner-size);opacity:1;animation:fadein 200ms ease;"]),l=a.I4.div.withConfig({displayName:"CenterIconContainer",componentId:"sc-ebc93df8-2"})(["position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;svg,img{width:calc(var(--spinner-size) * 0.4);height:calc(var(--spinner-size) * 0.4);border-radius:var(--privy-border-radius-full);}"]),c=a.I4.div.withConfig({displayName:"CircleFixed",componentId:"sc-ebc93df8-3"})(["position:absolute;top:0;right:0;bottom:0;left:0;width:var(--spinner-size);height:var(--spinner-size);&&{border:4px solid var(--privy-color-border-default);border-radius:50%;}"]),d=a.I4.div.withConfig({displayName:"CircleRotate",componentId:"sc-ebc93df8-4"})(["position:absolute;top:0;right:0;bottom:0;left:0;width:var(--spinner-size);height:var(--spinner-size);animation:spin 1200ms linear infinite;&&{border:4px solid;border-color:var(--privy-color-icon-subtle) transparent transparent transparent;border-radius:50%;}@keyframes spin{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}"])}}]);
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.