1"use strict";(self.webpackChunknowpayments_front=self.webpackChunknowpayments_front||[]).push([[7078],{47078:(e,t,o)=>{o.r(t),o.d(t,{AppKitModal:()=>re,W3mModal:()=>ae,W3mModalBase:()=>ie});var i=o(68032),a=o(97793),r=o(18529),s=o(17968),n=o(97154),c=o(11611),l=o(61234),d=o(40850),p=o(95880),h=o(97019),u=o(99721),w=o(70262),m=o(24712);const g={isUnsupportedChainView:()=>"UnsupportedChain"===w.I.state.view||"SwitchNetwork"===w.I.state.view&&w.I.state.history.includes("UnsupportedChain"),async safeClose(){this.isUnsupportedChainView()||await m.U.isSIWXCloseDisabled()?l.W.shake():("DataCapture"!==w.I.state.view&&"DataCaptureOtpConfirm"!==w.I.state.view||u.x.disconnect(),l.W.close())}};var b=o(29982),f=o(2241),v=o(14908),y=o(85701),k=o(93710),x=o(91335),C=o(76240);const W=i.AH` 2 :host { 3 display: block; 4 border-radius: clamp(0px, var(--wui-border-radius-l), 44px); 5 box-shadow: 0 0 0 1px var(--wui-color-gray-glass-005); 6 background-color: var(--wui-color-modal-bg); 7 overflow: hidden; 8 } 9 10 :host([data-embedded='true']) { 11 box-shadow: 12 0 0 0 1px var(--wui-color-gray-glass-005), 13 0px 4px 12px 4px var(--w3m-card-embedded-shadow-color); 14 } 15`;let S=class extends i.WF{render(){return i.qy`<slot></slot>`}};S.styles=[x.W5,W],S=function(e,t,o,i){var a,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,o,s):a(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s}([(0,C.E)("wui-card")],S),o(12924);var I=o(48157);o(18166),o(66215),o(90469);const N=i.AH` 16 :host { 17 display: flex; 18 align-items: center; 19 justify-content: center; 20 padding: var(--wui-spacing-s); 21 border-radius: var(--wui-border-radius-s); 22 border: 1px solid var(--wui-color-dark-glass-100); 23 box-sizing: border-box; 24 background-color: var(--wui-color-bg-325); 25 box-shadow: 0px 0px 16px 0px rgba(0, 0, 0, 0.25); 26 } 27 28 wui-flex { 29 width: 100%; 30 } 31 32 wui-text { 33 word-break: break-word; 34 flex: 1; 35 } 36 37 .close { 38 cursor: pointer; 39 } 40 41 .icon-box { 42 height: 40px; 43 width: 40px; 44 border-radius: var(--wui-border-radius-3xs); 45 background-color: var(--local-icon-bg-value); 46 } 47`;var $=function(e,t,o,i){var a,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,o,s):a(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s};let E=class extends i.WF{constructor(){super(...arguments),this.message="",this.backgroundColor="accent-100",this.iconColor="accent-100",this.icon="info"}render(){return this.style.cssText=`\n --local-icon-bg-value: var(--wui-color-${this.backgroundColor});\n `,i.qy` 48 <wui-flex flexDirection="row" justifyContent="space-between" alignItems="center"> 49 <wui-flex columnGap="xs" flexDirection="row" alignItems="center"> 50 <wui-flex 51 flexDirection="row" 52 alignItems="center" 53 justifyContent="center" 54 class="icon-box" 55 > 56 <wui-icon color=${this.iconColor} size="md" name=${this.icon}></wui-icon> 57 </wui-flex> 58 <wui-text variant="small-500" color="bg-350" data-testid="wui-alertbar-text" 59 >${this.message}</wui-text 60 > 61 </wui-flex> 62 <wui-icon 63 class="close" 64 color="bg-350" 65 size="sm" 66 name="close" 67 @click=${this.onClose} 68 ></wui-icon> 69 </wui-flex> 70 `}onClose(){I.h.close()}};E.styles=[x.W5,N],$([(0,a.MZ)()],E.prototype,"message",void 0),$([(0,a.MZ)()],E.prototype,"backgroundColor",void 0),$([(0,a.MZ)()],E.prototype,"iconColor",void 0),$([(0,a.MZ)()],E.prototype,"icon",void 0),E=$([(0,C.E)("wui-alertbar")],E);const A=i.AH` 71 :host { 72 display: block; 73 position: absolute; 74 top: var(--wui-spacing-s); 75 left: var(--wui-spacing-l); 76 right: var(--wui-spacing-l); 77 opacity: 0; 78 pointer-events: none; 79 } 80`;var P=function(e,t,o,i){var a,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,o,s):a(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s};const T={info:{backgroundColor:"fg-350",iconColor:"fg-325",icon:"info"},success:{backgroundColor:"success-glass-reown-020",iconColor:"success-125",icon:"checkmark"},warning:{backgroundColor:"warning-glass-reown-020",iconColor:"warning-100",icon:"warningCircle"},error:{backgroundColor:"error-glass-reown-020",iconColor:"error-125",icon:"exclamationTriangle"}};let O=class extends i.WF{constructor(){super(),this.unsubscribe=[],this.open=I.h.state.open,this.onOpen(!0),this.unsubscribe.push(I.h.subscribeKey("open",e=>{this.open=e,this.onOpen(!1)}))}
80disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const{message:e,variant:t}=I.h.state,o=T[t];return i.qy` 81 <wui-alertbar 82 message=${e} 83 backgroundColor=${o?.backgroundColor} 84 iconColor=${o?.iconColor} 85 icon=${o?.icon} 86 ></wui-alertbar> 87 `}onOpen(e){this.open?(this.animate([{opacity:0,transform:"scale(0.85)"},{opacity:1,transform:"scale(1)"}],{duration:150,fill:"forwards",easing:"ease"}),this.style.cssText="pointer-events: auto"):e||(this.animate([{opacity:1,transform:"scale(1)"},{opacity:0,transform:"scale(0.85)"}],{duration:150,fill:"forwards",easing:"ease"}),this.style.cssText="pointer-events: none")}};O.styles=A,P([(0,a.wk)()],O.prototype,"open",void 0),O=P([(0,k.EM)("w3m-alertbar")],O);var R=o(48092),z=o(91459),j=o(91275),M=o(26826);o(20675),o(32997),o(80721);const D=i.AH` 88 button { 89 display: block; 90 display: flex; 91 align-items: center; 92 padding: var(--wui-spacing-xxs); 93 gap: var(--wui-spacing-xxs); 94 transition: all var(--wui-ease-out-power-1) var(--wui-duration-md); 95 border-radius: var(--wui-border-radius-xxs); 96 } 97 98 wui-image { 99 border-radius: 100%; 100 width: var(--wui-spacing-xl); 101 height: var(--wui-spacing-xl); 102 } 103 104 wui-icon-box { 105 width: var(--wui-spacing-xl); 106 height: var(--wui-spacing-xl); 107 } 108 109 button:hover { 110 background-color: var(--wui-color-gray-glass-002); 111 } 112 113 button:active { 114 background-color: var(--wui-color-gray-glass-005); 115 } 116`;var B=function(e,t,o,i){var a,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,o,s):a(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s};let q=class extends i.WF{constructor(){super(...arguments),this.imageSrc=""}render(){return i.qy`<button> 117 ${this.imageTemplate()} 118 <wui-icon size="xs" color="fg-200" name="chevronBottom"></wui-icon> 119 </button>`}imageTemplate(){return this.imageSrc?i.qy`<wui-image src=${this.imageSrc} alt="select visual"></wui-image>`:i.qy`<wui-icon-box 120 size="xxs" 121 iconColor="fg-200" 122 backgroundColor="fg-100" 123 background="opaque" 124 icon="networkPlaceholder" 125 ></wui-icon-box>`}};q.styles=[x.W5,x.fD,x.ck,D],B([(0,a.MZ)()],q.prototype,"imageSrc",void 0),q=B([(0,C.E)("wui-select")],q),o(74175),o(22548);var H=o(36996);const L=i.AH` 126 :host { 127 height: 64px; 128 } 129 130 wui-text { 131 text-transform: capitalize; 132 } 133 134 wui-flex.w3m-header-title { 135 transform: translateY(0); 136 opacity: 1; 137 } 138 139 wui-flex.w3m-header-title[view-direction='prev'] { 140 animation: 141 slide-down-out 120ms forwards var(--wui-ease-out-power-2), 142 slide-down-in 120ms forwards var(--wui-ease-out-power-2); 143 animation-delay: 0ms, 200ms; 144 } 145 146 wui-flex.w3m-header-title[view-direction='next'] { 147 animation: 148 slide-up-out 120ms forwards var(--wui-ease-out-power-2), 149 slide-up-in 120ms forwards var(--wui-ease-out-power-2); 150 animation-delay: 0ms, 200ms; 151 } 152 153 wui-icon-link[data-hidden='true'] { 154 opacity: 0 !important; 155 pointer-events: none; 156 } 157 158 @keyframes slide-up-out { 159 from { 160 transform: translateY(0px); 161 opacity: 1; 162 } 163 to { 164 transform: translateY(3px); 165 opacity: 0; 166 } 167 } 168 169 @keyframes slide-up-in { 170 from { 171 transform: translateY(-3px); 172 opacity: 0; 173 } 174 to { 175 transform: translateY(0); 176 opacity: 1; 177 } 178 } 179 180 @keyframes slide-down-out { 181 from { 182 transform: translateY(0px); 183 opacity: 1; 184 } 185 to { 186 transform: translateY(-3px); 187 opacity: 0; 188 } 189 } 190 191 @keyframes slide-down-in { 192 from { 193 transform: translateY(3px); 194 opacity: 0; 195 } 196 to { 197 transform: translateY(0); 198 opacity: 1; 199 } 200 } 201`;var U=function(e,t,o,i){var a,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,o,s):a(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s};const Z=["SmartSessionList"];function K(){const e=w.I.state.data?.connector?.name,t=w.I.state.data?.wallet?.name,o=w.I.state.data?.network?.name,i=t??e,a=p.a.getConnectors();return{Connect:`Connect ${1===a.length&&"w3m-email"===a[0]?.id?"Email":""} Wallet`,Create:"Create Wallet",ChooseAccountName:void 0,Account:void 0,AccountSettings:void 0,AllWallets:"All Wallets",ApproveTransaction:"Approve Transaction",BuyInProgress:"Buy",ConnectingExter
201nal:i??"Connect Wallet",ConnectingWalletConnect:i??"WalletConnect",ConnectingWalletConnectBasic:"WalletConnect",ConnectingSiwe:"Sign In",Convert:"Convert",ConvertSelectToken:"Select token",ConvertPreview:"Preview convert",Downloads:i?`Get ${i}`:"Downloads",EmailLogin:"Email Login",EmailVerifyOtp:"Confirm Email",EmailVerifyDevice:"Register Device",GetWallet:"Get a wallet",Networks:"Choose Network",OnRampProviders:"Choose Provider",OnRampActivity:"Activity",OnRampTokenSelect:"Select Token",OnRampFiatSelect:"Select Currency",Pay:"How you pay",ProfileWallets:"Wallets",SwitchNetwork:o??"Switch Network",Transactions:"Activity",UnsupportedChain:"Switch Network",UpgradeEmailWallet:"Upgrade your Wallet",UpdateEmailWallet:"Edit Email",UpdateEmailPrimaryOtp:"Confirm Current Email",UpdateEmailSecondaryOtp:"Confirm New Email",WhatIsABuy:"What is Buy?",RegisterAccountName:"Choose name",RegisterAccountNameSuccess:"",WalletReceive:"Receive",WalletCompatibleNetworks:"Compatible Networks",Swap:"Swap",SwapSelectToken:"Select token",SwapPreview:"Preview swap",WalletSend:"Send",WalletSendPreview:"Review send",WalletSendSelectToken:"Select Token",WhatIsANetwork:"What is a network?",WhatIsAWallet:"What is a wallet?",ConnectWallets:"Connect wallet",ConnectSocials:"All socials",ConnectingSocial:R.U.state.socialProvider?R.U.state.socialProvider:"Connect Social",ConnectingMultiChain:"Select chain",ConnectingFarcaster:"Farcaster",SwitchActiveChain:"Switch chain",SmartSessionCreated:void 0,SmartSessionList:"Smart Sessions",SIWXSignMessage:"Sign In",PayLoading:"Payment in progress",DataCapture:"Profile",DataCaptureOtpConfirm:"Confirm Email",FundWallet:"Fund wallet",PayWithExchange:"Deposit from an exchange"}}let F=class extends i.WF{constructor(){super(),this.unsubscribe=[],this.heading=K()[w.I.state.view],this.network=d.W.state.activeCaipNetwork,this.networkImage=z.$.getNetworkImage(this.network),this.showBack=!1,this.prevHistoryLength=1,this.view=w.I.state.view,this.viewDirection="",this.headerText=K()[w.I.state.view],this.unsubscribe.push(j.j.subscribeNetworkImages(()=>{this.networkImage=z.$.getNetworkImage(this.network)}),w.I.subscribeKey("view",e=>{setTimeout(()=>{this.view=e,this.headerText=K()[e]},H.o.ANIMATION_DURATIONS.HeaderText),this.onViewChange(),this.onHistoryChange()}),d.W.subscribeKey("activeCaipNetwork",e=>{this.network=e,this.networkImage=z.$.getNetworkImage(this.network)}))}disconnectCallback(){this.unsubscribe.forEach(e=>e())}render(){return i.qy` 202 <wui-flex .padding=${this.getPadding()} justifyContent="space-between" alignItems="center"> 203 ${this.leftHeaderTemplate()} ${this.titleTemplate()} ${this.rightHeaderTemplate()} 204 </wui-flex> 205 `}onWalletHelp(){M.E.sendEvent({type:"track",event:"CLICK_WALLET_HELP"}),w.I.push("WhatIsAWallet")}async onClose(){await g.safeClose()}rightHeaderTemplate(){const e=c.H?.state?.features?.smartSessions;return"Account"===w.I.state.view&&e?i.qy`<wui-flex> 206 <wui-icon-link 207 icon="clock" 208 @click=${()=>w.I.push("SmartSessionList")} 209 data-testid="w3m-header-smart-sessions" 210 ></wui-icon-link> 211 ${this.closeButtonTemplate()} 212 </wui-flex> `:this.closeButtonTemplate()}closeButtonTemplate(){return i.qy` 213 <wui-icon-link 214 icon="close" 215 @click=${this.onClose.bind(this)} 216 data-testid="w3m-header-close" 217 ></wui-icon-link> 218 `}titleTemplate(){const e=Z.includes(this.view);return i.qy` 219 <wui-flex 220 view-direction="${this.viewDirection}" 221 class="w3m-header-title" 222 alignItems="center" 223 gap="xs" 224 > 225 <wui-text variant="paragraph-700" color="fg-100" data-testid="w3m-header-text" 226 >${this.headerText}</wui-text 227 > 228 ${e?i.qy`<wui-tag variant="main">Beta</wui-tag>`:null} 229 </wui-flex> 230 `}leftHeaderTemplate(){const{view:e}=w.I.state,t="Connect"===e,o=c.H.state.enableEmbedded,a="ApproveTransaction"===e,s="ConnectingSiwe"===e,n="Account"===e,l=c.H.state.enableNetworkSwitch,d=a||s||t&&o;return n&&l?i.qy`<wui-select 231 id="dynamic" 232 data-testid="w3m-account-select-network" 233 active-network=${(0,r.J)(this.network?.name)}
233 234 @click=${this.onNetworks.bind(this)} 235 imageSrc=${(0,r.J)(this.networkImage)} 236 ></wui-select>`:this.showBack&&!d?i.qy`<wui-icon-link 237 data-testid="header-back" 238 id="dynamic" 239 icon="chevronLeft" 240 @click=${this.onGoBack.bind(this)} 241 ></wui-icon-link>`:i.qy`<wui-icon-link 242 data-hidden=${!t} 243 id="dynamic" 244 icon="helpCircle" 245 @click=${this.onWalletHelp.bind(this)} 246 ></wui-icon-link>`}onNetworks(){this.isAllowedNetworkSwitch()&&(M.E.sendEvent({type:"track",event:"CLICK_NETWORKS"}),w.I.push("Networks"))}isAllowedNetworkSwitch(){const e=d.W.getAllRequestedCaipNetworks(),t=!!e&&e.length>1,o=e?.find(({id:e})=>e===this.network?.id);return t||!o}getPadding(){return this.heading?["l","2l","l","2l"]:["0","2l","0","2l"]}onViewChange(){const{history:e}=w.I.state;let t=H.o.VIEW_DIRECTION.Next;e.length<this.prevHistoryLength&&(t=H.o.VIEW_DIRECTION.Prev),this.prevHistoryLength=e.length,this.viewDirection=t}async onHistoryChange(){const{history:e}=w.I.state,t=this.shadowRoot?.querySelector("#dynamic");e.length>1&&!this.showBack&&t?(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.showBack=!0,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"})):e.length<=1&&this.showBack&&t&&(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.showBack=!1,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}onGoBack(){w.I.goBack()}};F.styles=L,U([(0,a.wk)()],F.prototype,"heading",void 0),U([(0,a.wk)()],F.prototype,"network",void 0),U([(0,a.wk)()],F.prototype,"networkImage",void 0),U([(0,a.wk)()],F.prototype,"showBack",void 0),U([(0,a.wk)()],F.prototype,"prevHistoryLength",void 0),U([(0,a.wk)()],F.prototype,"view",void 0),U([(0,a.wk)()],F.prototype,"viewDirection",void 0),U([(0,a.wk)()],F.prototype,"headerText",void 0),F=U([(0,k.EM)("w3m-header")],F),o(12070);const Y=i.AH` 247 :host { 248 display: flex; 249 column-gap: var(--wui-spacing-s); 250 align-items: center; 251 padding: var(--wui-spacing-xs) var(--wui-spacing-m) var(--wui-spacing-xs) var(--wui-spacing-xs); 252 border-radius: var(--wui-border-radius-s); 253 border: 1px solid var(--wui-color-gray-glass-005); 254 box-sizing: border-box; 255 background-color: var(--wui-color-bg-175); 256 box-shadow: 257 0px 14px 64px -4px rgba(0, 0, 0, 0.15), 258 0px 8px 22px -6px rgba(0, 0, 0, 0.15); 259 260 max-width: 300px; 261 } 262 263 :host wui-loading-spinner { 264 margin-left: var(--wui-spacing-3xs); 265 } 266`;var V=function(e,t,o,i){var a,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,o,s):a(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s};let _=class extends i.WF{constructor(){super(...arguments),this.backgroundColor="accent-100",this.iconColor="accent-100",this.icon="checkmark",this.message="",this.loading=!1,this.iconType="default"}render(){return i.qy` 267 ${this.templateIcon()} 268 <wui-text variant="paragraph-500" color="fg-100" data-testid="wui-snackbar-message" 269 >${this.message}</wui-text 270 > 271 `}templateIcon(){return this.loading?i.qy`<wui-loading-spinner size="md" color="accent-100"></wui-loading-spinner>`:"default"===this.iconType?i.qy`<wui-icon size="xl" color=${this.iconColor} name=${this.icon}></wui-icon>`:i.qy`<wui-icon-box 272 size="sm" 273 iconSize="xs" 274 iconColor=${this.iconColor} 275 backgroundColor=${this.backgroundColor} 276 icon=${this.icon} 277 background="opaque" 278 ></wui-icon-box>`}};_.styles=[x.W5,Y],V([(0,a.MZ)()],_.prototype,"backgroundColor",void 0),V([(0,a.MZ)()],_.prototype,"iconColor",void 0),V([(0,a.MZ)()],_.prototype,"icon",void 0),V([(0,a.MZ)()],_.prototype,"message",void 0),V([(0,a.MZ)()],_.prototype,"loading",void 0),V([(0,a.MZ)()],_.prototype,"iconType",void 0),_=V([(0,C.E)("wui-snackbar")],_);const X=i.AH` 279 :host { 280 display: block; 281 position: absolute; 282 opacity: 0; 283 pointer-events: none; 284 top: 11px; 285 left: 50%; 286 width: max-content; 287 } 288`;var G=function(e,t,o,i){var a,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,o,s):a(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s};const J={loading:void 0,success:{backgroundColor:"success-100",iconColor:"success-100",icon:"checkmark"},error:{backgroundColor:"error-100",iconColor:"error-100",icon:"close"}};let Q=class extends i.WF{constructor(){super(),this.unsubscribe=[],this.timeout=void 0,this.open=f.P.state.open,this.unsubscribe.push(f.P.subscribeKey("open",e=>{this.open=e,this.onOpen()}))}disconnectedCallback(){clearTimeout(this.timeout),this.unsubscribe.forEach(e
288=>e())}render(){const{message:e,variant:t,svg:o}=f.P.state,a=J[t],{icon:r,iconColor:s}=o??a??{};return i.qy` 289 <wui-snackbar 290 message=${e} 291 backgroundColor=${a?.backgroundColor} 292 iconColor=${s} 293 icon=${r} 294 .loading=${"loading"===t} 295 ></wui-snackbar> 296 `}onOpen(){clearTimeout(this.timeout),this.open?(this.animate([{opacity:0,transform:"translateX(-50%) scale(0.85)"},{opacity:1,transform:"translateX(-50%) scale(1)"}],{duration:150,fill:"forwards",easing:"ease"}),this.timeout&&clearTimeout(this.timeout),f.P.state.autoClose&&(this.timeout=setTimeout(()=>f.P.hide(),2500))):this.animate([{opacity:1,transform:"translateX(-50%) scale(1)"},{opacity:0,transform:"translateX(-50%) scale(0.85)"}],{duration:150,fill:"forwards",easing:"ease"})}};Q.styles=X,G([(0,a.wk)()],Q.prototype,"open",void 0),Q=G([(0,k.EM)("w3m-snackbar")],Q),o(94592),o(44479);const ee=i.AH` 297 :host { 298 z-index: var(--w3m-z-index); 299 display: block; 300 backface-visibility: hidden; 301 will-change: opacity; 302 position: fixed; 303 top: 0; 304 left: 0; 305 right: 0; 306 bottom: 0; 307 pointer-events: none; 308 opacity: 0; 309 background-color: var(--wui-cover); 310 transition: opacity 0.2s var(--wui-ease-out-power-2); 311 will-change: opacity; 312 } 313 314 :host(.open) { 315 opacity: 1; 316 } 317 318 :host(.appkit-modal) { 319 position: relative; 320 pointer-events: unset; 321 background: none; 322 width: 100%; 323 opacity: 1; 324 } 325 326 wui-card { 327 max-width: var(--w3m-modal-width); 328 width: 100%; 329 position: relative; 330 animation: zoom-in 0.2s var(--wui-ease-out-power-2); 331 animation-fill-mode: backwards; 332 outline: none; 333 transition: 334 border-radius var(--wui-duration-lg) var(--wui-ease-out-power-1), 335 background-color var(--wui-duration-lg) var(--wui-ease-out-power-1); 336 will-change: border-radius, background-color; 337 } 338 339 :host(.appkit-modal) wui-card { 340 max-width: 400px; 341 } 342 343 wui-card[shake='true'] { 344 animation: 345 zoom-in 0.2s var(--wui-ease-out-power-2), 346 w3m-shake 0.5s var(--wui-ease-out-power-2); 347 } 348 349 wui-flex { 350 overflow-x: hidden; 351 overflow-y: auto; 352 display: flex; 353 align-items: center; 354 justify-content: center; 355 width: 100%; 356 height: 100%; 357 } 358 359 @media (max-height: 700px) and (min-width: 431px) { 360 wui-flex { 361 align-items: flex-start; 362 } 363 364 wui-card { 365 margin: var(--wui-spacing-xxl) 0px; 366 } 367 } 368 369 @media (max-width: 430px) { 370 wui-flex { 371 align-items: flex-end; 372 } 373 374 wui-card { 375 max-width: 100%; 376 border-bottom-left-radius: var(--local-border-bottom-mobile-radius); 377 border-bottom-right-radius: var(--local-border-bottom-mobile-radius); 378 border-bottom: none; 379 animation: slide-in 0.2s var(--wui-ease-out-power-2); 380 } 381 382 wui-card[shake='true'] { 383 animation: 384 slide-in 0.2s var(--wui-ease-out-power-2), 385 w3m-shake 0.5s var(--wui-ease-out-power-2); 386 } 387 } 388 389 @keyframes zoom-in { 390 0% { 391 transform: scale(0.95) translateY(0); 392 } 393 100% { 394 transform: scale(1) translateY(0); 395 } 396 } 397 398 @keyframes slide-in { 399 0% { 400 transform: scale(1) translateY(50px); 401 } 402 100% { 403 transform: scale(1) translateY(0); 404 } 405 } 406 407 @keyframes w3m-shake { 408 0% { 409 transform: scale(1) rotate(0deg); 410 } 411 20% { 412 transform: scale(1) rotate(-1deg); 413 } 414 40% { 415 transform: scale(1) rotate(1.5deg); 416 } 417 60% { 418 transform: scale(1) rotate(-1.5deg); 419 } 420 80% { 421 transform: scale(1) rotate(1deg); 422 } 423 100% { 424 transform: scale(1) rotate(0deg); 425 } 426 } 427 428 @keyframes w3m-view-height { 429 from { 430 height: var(--prev-height); 431 } 432 to { 433 height: var(--new-height); 434 } 435 } 436`;var te=function(e,t,o,i){var a,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,o,s):a(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s};const oe="scroll-lock";class ie extends i.WF{constructor(){super(),this.unsubscribe=[],this.abortController=void 0,this.hasPrefetched=!1,this.enableEmbedded=c.H.state.enableEmbedded,this.open=l.W.state.open,this.caipAddress=d.W.state.activeCaipAddress,this.caipNetwork=d.W.state.activeCaipNetwork,this.shake=l.W.state.shake,this.filterByNamespace=p.a.state.filterByNamespace,this.initializeTheming(),h.N.prefetchAnalyticsConfig(),this.unsubscribe.push(l.W.subscribeKey("open",e=>e?this.onOpen():this.onClose()),l.W.subscribeKey("shake",e=>this.shake=e),d.W.subscribeKey("activeCaipNetwork",e=>this.onNewNetwork(e)),d.W.subscribeKey("activeCaipAddress",e=>this.onNewAddress(e)),c.H.subscribeKey("enableEmbedded",e=>this.enableEmbedded=e),p.a.subscribeKey("filterByNamespace",e=>{this.filterByNamespace===e||d.W.getAccountData(e)?.caipAddress||(h.N.fetchRecommendedWallets(),this.filterByNamespace=e)}))}firstUpdated(){if(this.caipAddress){if(this.enableEmbedded)return l.W.close(),void this.prefetch();this.onNewAddress(this.caipAddress)}this.open&&this.onOpen(),this.enableEmbedded&&this.prefetch()}
436disconnectedCallback(){this.unsubscribe.forEach(e=>e()),this.onRemoveKeyboardListener()}render(){return this.style.cssText=`\n --local-border-bottom-mobile-radius: ${this.enableEmbedded?"clamp(0px, var(--wui-border-radius-l), 44px)":"0px"};\n `,this.enableEmbedded?i.qy`${this.contentTemplate()} 437 <w3m-tooltip></w3m-tooltip> `:this.open?i.qy` 438 <wui-flex @click=${this.onOverlayClick.bind(this)} data-testid="w3m-modal-overlay"> 439 ${this.contentTemplate()} 440 </wui-flex> 441 <w3m-tooltip></w3m-tooltip> 442 `:null}contentTemplate(){return i.qy` <wui-card 443 shake="${this.shake}" 444 data-embedded="${(0,r.J)(this.enableEmbedded)}" 445 role="alertdialog" 446 aria-modal="true" 447 tabindex="0" 448 data-testid="w3m-modal-card" 449 > 450 <w3m-header></w3m-header> 451 <w3m-router></w3m-router> 452 <w3m-snackbar></w3m-snackbar> 453 <w3m-alertbar></w3m-alertbar> 454 </wui-card>`}async onOverlayClick(e){e.target===e.currentTarget&&await this.handleClose()}async handleClose(){await g.safeClose()}initializeTheming(){const{themeVariables:e,themeMode:t}=b.W.state,o=k.Zv.getColorTheme(t);(0,k.RF)(e,o)}onClose(){this.open=!1,this.classList.remove("open"),this.onScrollUnlock(),f.P.hide(),this.onRemoveKeyboardListener()}onOpen(){this.open=!0,this.classList.add("open"),this.onScrollLock(),this.onAddKeyboardListener()}onScrollLock(){const e=document.createElement("style");e.dataset.w3m=oe,e.textContent="\n body {\n touch-action: none;\n overflow: hidden;\n overscroll-behavior: contain;\n }\n w3m-modal {\n pointer-events: auto;\n }\n ",document.head.appendChild(e)}onScrollUnlock(){const e=document.head.querySelector(`style[data-w3m="${oe}"]`);e&&e.remove()}onAddKeyboardListener(){this.abortController=new AbortController;const e=this.shadowRoot?.querySelector("wui-card");e?.focus(),window.addEventListener("keydown",t=>{if("Escape"===t.key)this.handleClose();else if("Tab"===t.key){const{tagName:o}=t.target;!o||o.includes("W3M-")||o.includes("WUI-")||e?.focus()}},this.abortController)}onRemoveKeyboardListener(){this.abortController?.abort(),this.abortController=void 0}async onNewAddress(e){const t=d.W.state.isSwitchingNamespace,o="ProfileWallets"===w.I.state.view;e?await this.onConnected({caipAddress:e,isSwitchingNamespace:t,isInProfileView:o}):t||this.enableEmbedded||o||l.W.close(),await m.U.initializeIfEnabled(e),this.caipAddress=e,d.W.setIsSwitchingNamespace(!1)}async onConnected(e){if(e.isInProfileView)return;const{chainNamespace:t,chainId:o,address:i}=s.C.parseCaipAddress(e.caipAddress),a=`${t}:${o}`,r=!v.w.getPlainAddress(this.caipAddress),n=await m.U.getSessions({address:i,caipNetworkId:a}),c=!m.U.getSIWX()||n.some(e=>e.data.accountAddress===i),d=e.isSwitchingNamespace&&c&&!this.enableEmbedded,p=this.enableEmbedded&&r;d?w.I.goBack():p&&l.W.close()}onNewNetwork(e){const t=this.caipNetwork,o=t?.caipNetworkId?.toString(),i=t?.chainNamespace,a=e?.caipNetworkId?.toString(),r=e?.chainNamespace,s=o!==a,c=s&&!(i!==r),p=t?.name===n.o.UNSUPPORTED_NETWORK_NAME,h="ConnectingExternal"===w.I.state.view,u="ProfileWallets"===w.I.state.view,m=!d.W.getAccountData(e?.chainNamespace)?.caipAddress,g="UnsupportedChain"===w.I.state.view,b=l.W.state.open;let f=!1;this.enableEmbedded&&"SwitchNetwork"===w.I.state.view&&(f=!0),s&&y.GN.resetState(),!b||h||u||(m?s&&(f=!0):(g||c&&!p)&&(f=!0)),f&&"SIWXSignMessage"!==w.I.state.view&&w.I.goBack(),this.caipNetwork=e}prefetch(){this.hasPrefetched||(h.N.prefetch(),h.N.fetchWalletsByPage({page:1}),this.hasPrefetched=!0)}}ie.styles=ee,te([(0,a.MZ)({type:Boolean})],ie.prototype,"enableEmbedded",void 0),te([(0,a.wk)()],ie.prototype,"open",void 0),te([(0,a.wk)()],ie.prototype,"caipAddress",void 0),te([(0,a.wk)()],ie.prototype,"caipNetwork",void 0),te([(0,a.wk)()],ie.prototype,"shake",void 0),te([(0,a.wk)()],ie.prototype,"filterByNamespace",void 0);let ae=class extends ie{};ae=te([(0,k.EM)("w3m-modal")],ae);let re=class extends ie{};
454re=te([(0,k.EM)("appkit-modal")],re)},12070:(e,t,o)=>{var i=o(68032),a=o(97793),r=o(91335),s=o(76240);const n=i.AH` 455 :host { 456 display: flex; 457 } 458 459 :host([data-size='sm']) > svg { 460 width: 12px; 461 height: 12px; 462 } 463 464 :host([data-size='md']) > svg { 465 width: 16px; 466 height: 16px; 467 } 468 469 :host([data-size='lg']) > svg { 470 width: 24px; 471 height: 24px; 472 } 473 474 :host([data-size='xl']) > svg { 475 width: 32px; 476 height: 32px; 477 } 478 479 svg { 480 animation: rotate 2s linear infinite; 481 } 482 483 circle { 484 fill: none; 485 stroke: var(--local-color); 486 stroke-width: 4px; 487 stroke-dasharray: 1, 124; 488 stroke-dashoffset: 0; 489 stroke-linecap: round; 490 animation: dash 1.5s ease-in-out infinite; 491 } 492 493 :host([data-size='md']) > svg > circle { 494 stroke-width: 6px; 495 } 496 497 :host([data-size='sm']) > svg > circle { 498 stroke-width: 8px; 499 } 500 501 @keyframes rotate { 502 100% { 503 transform: rotate(360deg); 504 } 505 } 506 507 @keyframes dash { 508 0% { 509 stroke-dasharray: 1, 124; 510 stroke-dashoffset: 0; 511 } 512 513 50% { 514 stroke-dasharray: 90, 124; 515 stroke-dashoffset: -35; 516 } 517 518 100% { 519 stroke-dashoffset: -125; 520 } 521 } 522`;var c=function(e,t,o,i){var a,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,o,s):a(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s};let l=class extends i.WF{constructor(){super(...arguments),this.color="accent-100",this.size="lg"}render(){return this.style.cssText="--local-color: "+("inherit"===this.color?"inherit":`var(--wui-color-${this.color})`),this.dataset.size=this.size,i.qy`<svg viewBox="25 25 50 50"> 523 <circle r="20" cy="50" cx="50"></circle> 524 </svg>`}};l.styles=[r.W5,n],c([(0,a.MZ)()],l.prototype,"color",void 0),c([(0,a.MZ)()],l.prototype,"size",void 0),l=c([(0,s.E)("wui-loading-spinner")],l)},80721:(e,t,o)=>{var i=o(68032),a=o(97793),r=(o(18166),o(91335)),s=o(76240);const n=i.AH` 525 :host { 526 display: inline-flex; 527 justify-content: center; 528 align-items: center; 529 position: relative; 530 overflow: hidden; 531 background-color: var(--wui-color-gray-glass-020); 532 border-radius: var(--local-border-radius); 533 border: var(--local-border); 534 box-sizing: content-box; 535 width: var(--local-size); 536 height: var(--local-size); 537 min-height: var(--local-size); 538 min-width: var(--local-size); 539 } 540 541 @supports (background: color-mix(in srgb, white 50%, black)) { 542 :host { 543 background-color: color-mix(in srgb, var(--local-bg-value) var(--local-bg-mix), transparent); 544 } 545 } 546`;var c=function(e,t,o,i){var a,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,o,s):a(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s};let l=class extends i.WF{constructor(){super(...arguments),this.size="md",this.backgroundColor="accent-100",this.iconColor="accent-100",this.background="transparent",this.border=!1,this.borderColor="wui-color-bg-125",this.icon="copy"}render(){const e=this.iconSize||this.size,t="lg"===this.size,o="xl"===this.size,a=t?"12%":"16%",r=t?"xxs":o?"s":"3xl",s="gray"===this.background,n="opaque"===this.background,c="accent-100"===this.backgroundColor&&n||"success-100"===this.backgroundColor&&n||"error-100"===this.backgroundColor&&n||"inverse-100"===this.backgroundColor&&n;let l=`var(--wui-color-${this.backgroundColor})`;return c?l=`var(--wui-icon-box-bg-${this.backgroundColor})`:s&&(l=`var(--wui-color-gray-${this.backgroundColor})`),this.style.cssText=`\n --local-bg-value: ${l};\n --local-bg-mix: ${c||s?"100%":a};\n --local-border-radius: var(--wui-border-radius-${r});\n --local-size: var(--wui-icon-box-size-${this.size});\n --local-border: ${"wui-color-bg-125"===this.borderColor?"2px":"1px"} solid ${this.border?`var(--${this.borderColor})`:"transparent"}\n `,i.qy` <wui-icon color=${this.iconColor} size=${e} name=${this.icon}></wui-icon> `}};l.styles=[r.W5,r.fD,n],c([(0,a.MZ)()],l.prototype,"size",void 0),c([(0,a.MZ)()],l.prototype,"backgroundColor",void 0),c([(0,a.MZ)()],l.prototype,"iconColor",void 0),c([(0,a.MZ)()],l.prototype,"iconSize",void 0),c([(0,a.MZ)()],l.prototype,"background",void 0),c([(0,a.MZ)({type:Boolean})],l.prototype,"border",void 0),c([(0,a.MZ)()],l.prototype,"borderColor",void 0),c([(0,a.MZ)()],l.prototype,"icon",void 0),l=c([(0,s.E)("wui-icon-box")],l)}}]);
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.