1"use strict";(self.webpackChunkico_react=self.webpackChunkico_react||[]).push([[3364],{3364:(e,r,n)=>{n.r(r),n.d(r,{CrossAppAuthScreen:()=>h,CrossAppAuthScreenView:()=>u,default:()=>h});var i=n(90034),t=n(57722),o=n(99844),a=n(78055),l=n(51380),s=n(49931),c=n(1991),d=n(47098),p=n(23316);n(88404),n(30549),n(2035),n(82425),n(82595);const u=e=>{let{providerApp:r,success:n,error:o,onClose:a}=e,{title:l,subtitle:s}=(0,t.useMemo)(()=>n?{title:"Successfully connected with ".concat(r.name),subtitle:"You're good to go!"}:o?{title:"Authentication failed",subtitle:o.message}:{title:"Connecting to ".concat(r.name),subtitle:"Please check the pop-up from ".concat(r.name," to continue")},[n,o,r.name]);return(0,i.jsx)(p.S,{title:l,subtitle:s,icon:r.logoUrl,iconVariant:"loading",iconLoadingStatus:{success:n,fail:!!o},onBack:a,watermark:!0})},h={component:()=>{let e=(0,o.u)(),{data:r,navigate:n,setModalData:p,onUserCloseViaDialogOrKeybindRef:h}=(0,s.a)(),{crossAppAuthFlow:g,updateWallets:v,closePrivyModal:m,createAnalyticsEvent:f}=(0,l.u)(),{logout:y}=(0,c.z)(),[b,x]=(0,t.useState)({}),w=null===r||void 0===r?void 0:r.crossAppAuth,C={id:w.appId,name:w.name,logoUrl:w.logoUrl},I=new l.a("There was an issue connecting your ".concat(C.name," account. Please try again.")),A=new a.R(async e=>{if(w.popup)try{let r=await g({appId:e,popup:w.popup,action:w.action});x({data:r})}catch(e){if(e instanceof l.a)x({error:e});else if(e instanceof l.e){var r,i,t,o,a,s;if(e.privyErrorCode===l.b.ACCOUNT_TRANSFER_REQUIRED&&null!==(r=e.data)&&void 0!==r&&null!==(r=r.data)&&void 0!==r&&r.nonce)return p({accountTransfer:{nonce:null===(i=e.data)||void 0===i||null===(i=i.data)||void 0===i?void 0:i.nonce,account:null===(t=e.data)||void 0===t||null===(t=t.data)||void 0===t?void 0:t.subject,displayName:null===(o=e.data)||void 0===o||null===(o=o.data)||void 0===o||null===(o=o.account)||void 0===o?void 0:o.displayName,linkMethod:"privy:".concat(C.id),embeddedWalletAddress:null===(a=e.data)||void 0===a||null===(a=a.data)||void 0===a||null===(a=a.otherUser)||void 0===a?void 0:a.embeddedWalletAddress,oAuthUserInfo:null===(s=e.data)||void 0===s||null===(s=s.data)||void 0===s||null===(s=s.otherUser)||void 0===s?void 0:s.oAuthUserInfo}}),void n("LinkConflictScreen");w.popup&&w.popup.close(),x({error:I})}else x({error:I})}else x({error:I})}),j=()=>{var e;b.data&&(v(),w.onSuccess(b.data),m({shouldCallAuthOnSuccess:!0,isSuccess:!0})),w.onError(null!==(e=b.error)&&void 0!==e?e:new l.a("User canceled flow")),m({shouldCallAuthOnSuccess:!1,isSuccess:!1})};return h.current=j,(0,t.useEffect)(()=>{C.id.length&&A.execute(C.id)},[C.id]),(0,t.useEffect)(()=>{if(!b.data)return;let r=b.data;if(e.legal.requireUsersAcceptTerms&&!r.hasAcceptedTerms){let e=setTimeout(()=>{n("AffirmativeConsentScreen")},o.q);return()=>clearTimeout(e)}if((0,d.s)(r,e.embeddedWallets)){let e=setTimeout(()=>{p({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),f({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,provider:"privy:".concat(C.id),screen:"CrossAppAuthScreen"}}),y()},callAuthOnSuccessOnClose:!0}}),n("EmbeddedWalletOnAccountCreateScreen")},o.q);return()=>clearTimeout(e)}let i=setTimeout(j,o.q);return()=>clearTimeout(i)},[b.data]),(0,i.jsx)(u,{providerApp:C,success:!!b.data,error:b.error,onClose:j})},isShownBeforeReady:!0}},23316:(e,r,n)=>{n.d(r,{S:()=>p});var i=n(24107),t=n(15882),o=n(90034),a=n(67980),l=n(43122);const s=["primaryCta","secondaryCta","helpText","watermark","children"],c=["label"],d=["label"],p=e=>{let{primaryCta:r,secondaryCta:n,helpText:p,watermark:u=!0,children:h}=e,g=(0,t.A)(e,s),v=r||n?(0,o.jsxs)(o.Fragment,{children:[r&&(()=>{let{label:e}=r,n=(0,t.A)(r,c),l=n.variant||"primary";return(0,o.jsx)(a.B,(0,i.A)((0,i.A)({},n),{},{variant:l,style:(0,i.A)({width:"100%"},n.style),children:e}))})(),n&&(()=>{let{label:e}=n,r=(0,t.A)(n,d),l=r.variant||"secondary";return(0,o.jsx)(a.B,(0,i.A)((0,i.A)({},r),{},{variant:l,style:(0,i.A)({width:"100%"},r.style),children:e}))})()]}):null;return(0,o.jsxs)(l.S,{id:g.id,className:g.className,children:[(0,o.jsx)(l.S.Header,(0,i.A)({},g)),h?(0,o.jsx)(l.S.Body,{children:h}):null,p||v||u?(0,o.jsxs)(l.S.Footer,{children:[p?(0,o.jsx)(l.S.HelpText,{children:p}):null,v?(0,o.jsx)(l.S.Actions,{children:v}):null,u?(0,o.jsx)(l.S.Watermark,{}):null]}):null]})}},43122:(e,r,n)=>{n.d(r,{S:()=>z});var i=n(24107),t=n(15882),o=n(90034),a=n(57722),l=n(52610),s=n(1991),c=n(33898),d=n(76107);const p=["children"],u=["title","subtitle","icon","iconVariant","iconLoadingStatus","showBack","onBack","
1showInfo","onInfo","showClose","onClose","step"],h=["children"],g=["children"],v=["children"],m=["children"],f=l.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);"]),y=l.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);"]),b=l.I4.div.withConfig({displayName:"HeaderContainer",componentId:"sc-2e815abe-2"})(["position:relative;display:flex;flex-direction:column;"]),x=(0,l.I4)(c.M).withConfig({displayName:"StyledModalHeader",componentId:"sc-2e815abe-3"})(["margin:0 -8px;"]),w=l.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;"],e=>{let{$colorScheme:r}=e;return"light"===r?"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"===r?"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}),C=l.I4.div.withConfig({displayName:"FooterContainer",componentId:"sc-2e815abe-5"})(["display:flex;flex-direction:column;gap:var(--screen-space-lg);"]);let I=l.I4.div.withConfig({displayName:"CenteredHeader",componentId:"sc-2e815abe-6"})(["text-align:center;display:flex;flex-direction:column;align-items:center;gap:var(--screen-space);"]),A=l.I4.div.withConfig({displayName:"TitleContainer",componentId:"sc-2e815abe-7"})(["display:flex;flex-direction:column;gap:4px;"]),j=l.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;}"]),k=l.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);}"]),S=l.I4.div.withConfig({displayName:"IconContainer",componentId:"sc-2e815abe-10"})(["background:",";border-radius:50%;width:64px;height:64px;display:flex;align-items:center;justify-content:center;"],e=>{let{$variant:r}=e;switch(r){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)"}}),N=l.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;}"]),E=l.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%);}"]);const z=e=>{let{children:r}=e,n=(0,t.A)(e,p);return(0,o.jsx)(f,{children:(0,o.jsx)(y,(0,i.A)((0,i.A)({},n),{},{children:r}))})};let T=l.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;"]),F=(0,l.I4)(c.B).withConfig({displayName:"StyledBlobbyFooter",componentId:"sc-2e815abe-14"})(["padding:0;&& a{padding:0;color:var(--privy-color-foreground-3);}"]),B=l.I4.div.withConfig({displayName:"ProgressBarFill",componentId:"sc-2e815abe-15"}
1)(["height:100%;width:","%;background:var(--privy-color-foreground-3);border-radius:2px;transition:width 300ms ease-in-out;"],e=>{let{pct:r}=e;return r}),R=e=>{let{step:r}=e;return r?(0,o.jsx)(T,{children:(0,o.jsx)(B,{pct:Math.min(100,r.current/r.total*100)})}):null};z.Header=e=>{let{title:r,subtitle:n,icon:a,iconVariant:l,iconLoadingStatus:s,showBack:c,onBack:d,showInfo:p,onInfo:h,showClose:g,onClose:v,step:m}=e,f=(0,t.A)(e,u);return(0,o.jsxs)(b,(0,i.A)((0,i.A)({},f),{},{children:[(0,o.jsx)(x,{backFn:c?d:void 0,infoFn:p?h:void 0,onClose:g?v:void 0,closeable:g}),(a||l||r||n)&&(0,o.jsxs)(I,{children:[a||l?(0,o.jsx)(z.Icon,{icon:a,variant:l,loadingStatus:s}):null,(0,o.jsxs)(A,{children:[r&&(0,o.jsx)(j,{children:r}),n&&(0,o.jsx)(k,{children:n})]})]}),m&&(0,o.jsx)(R,{step:m})]}))},(z.Body=a.forwardRef((e,r)=>{let{children:n}=e,a=(0,t.A)(e,h);return(0,o.jsx)(w,(0,i.A)((0,i.A)({ref:r},a),{},{children:n}))})).displayName="Screen.Body",z.Footer=e=>{let{children:r}=e,n=(0,t.A)(e,g);return(0,o.jsx)(C,(0,i.A)((0,i.A)({id:"privy-content-footer-container"},n),{},{children:r}))},z.Actions=e=>{let{children:r}=e,n=(0,t.A)(e,v);return(0,o.jsx)(U,(0,i.A)((0,i.A)({},n),{},{children:r}))},z.HelpText=e=>{let{children:r}=e,n=(0,t.A)(e,m);return(0,o.jsx)(H,(0,i.A)((0,i.A)({},n),{},{children:r}))},z.Watermark=()=>(0,o.jsx)(F,{}),z.Icon=e=>{let{icon:r,variant:n="subtle",loadingStatus:i}=e;return"logo"===n&&r?(0,o.jsx)(N,"string"==typeof r?{children:(0,o.jsx)("img",{src:r,alt:""})}:a.isValidElement(r)?{children:r}:{children:a.createElement(r)}):"loading"===n?r?(0,o.jsx)(E,{children:(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:[(0,o.jsx)(s.a4,{success:null===i||void 0===i?void 0:i.success,fail:null===i||void 0===i?void 0:i.fail}),"string"==typeof r?(0,o.jsx)("span",{style:{background:"url('".concat(r,"') 0 0 / contain"),height:"38px",width:"38px",borderRadius:"6px",margin:"auto",backgroundSize:"contain"}}):a.isValidElement(r)?a.cloneElement(r,{style:{width:"38px",height:"38px"}}):a.createElement(r,{style:{width:"38px",height:"38px"}})]})}):(0,o.jsx)(S,{$variant:n,children:(0,o.jsx)(d.N,{size:"64px"})}):(0,o.jsx)(S,{$variant:n,children:r&&("string"==typeof r?(0,o.jsx)("img",{src:r,alt:"",style:{width:"32px",height:"32px",borderRadius:"6px"}}):a.isValidElement(r)?r:a.createElement(r,{width:32,height:32,stroke:(()=>{switch(n){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 U=l.I4.div.withConfig({displayName:"ActionsContainer",componentId:"sc-2e815abe-16"})(["width:100%;display:flex;flex-direction:column;gap:calc(var(--screen-space) / 2);"]),H=l.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);}}"])},47098:(e,r,n)=>{n.d(r,{s:()=>t});var i=n(78055);const t=(e,r)=>(0,i.s)(e,r.ethereum.createOnLogin)||(0,i.k)(e,r.solana.createOnLogin)},76107:(e,r,n)=>{n.d(r,{N:()=>o});var i=n(90034),t=n(52610);const o=e=>{let{size:r,centerIcon:n}=e;return(0,i.jsx)(a,{$size:r,children:(0,i.jsxs)(l,{children:[(0,i.jsx)(c,{}),(0,i.jsx)(d,{}),n?(0,i.jsx)(s,{children:n}):null]})})};let a=t.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"),l=t.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;"]),s=t.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=t.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=t.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);}}"])}}]); 2//# sourceMappingURL=3364.72f32e60.chunk.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.