1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3476],{83476:(e,t,i)=>{i.r(t),i.d(t,{AppKitModal:()=>ev,W3mModal:()=>em,W3mModalBase:()=>eh});var o=i(1850),a=i(85721),r=i(12689),s=i(96853),n=i(2928),c=i(61434),l=i(933),w=i(70803),d=i(70464),p=i(51105),u=i(49629);let h={isUnsupportedChainView:()=>"UnsupportedChain"===p.I.state.view||"SwitchNetwork"===p.I.state.view&&p.I.state.history.includes("UnsupportedChain"),async safeClose(){this.isUnsupportedChainView()||await u.U.isSIWXCloseDisabled()?c.W.shake():c.W.close()}};var m=i(90889),v=i(82570),g=i(21159),y=i(55822),f=i(54684),b=i(51127);let k=(0,o.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`,x=class extends o.WF{render(){return(0,o.qy)`<slot></slot>`}};x.styles=[f.W5,k],x=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(0,b.E)("wui-card")],x),i(85479);var C=i(91986);i(23456),i(53059),i(18341);let S=(0,o.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 W=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let q=class extends o.WF{constructor(){super(...arguments),this.message="",this.backgroundColor="accent-100",this.iconColor="accent-100",this.icon="info"}render(){return this.style.cssText=` 48 --local-icon-bg-value: var(--wui-color-${this.backgroundColor}); 49 `,(0,o.qy)` 50 <wui-flex flexDirection="row" justifyContent="space-between" alignItems="center"> 51 <wui-flex columnGap="xs" flexDirection="row" alignItems="center"> 52 <wui-flex 53 flexDirection="row" 54 alignItems="center" 55 justifyContent="center" 56 class="icon-box" 57 > 58 <wui-icon color=${this.iconColor} size="md" name=${this.icon}></wui-icon> 59 </wui-flex> 60 <wui-text variant="small-500" color="bg-350" data-testid="wui-alertbar-text" 61 >${this.message}</wui-text 62 > 63 </wui-flex> 64 <wui-icon 65 class="close" 66 color="bg-350" 67 size="sm" 68 name="close" 69 @click=${this.onClose} 70 ></wui-icon> 71 </wui-flex> 72 `}onClose(){C.h.close()}};q.styles=[f.W5,S],W([(0,a.MZ)()],q.prototype,"message",void 0),W([(0,a.MZ)()],q.prototype,"backgroundColor",void 0),W([(0,a.MZ)()],q.prototype,"iconColor",void 0),W([(0,a.MZ)()],q.prototype,"icon",void 0),q=W([(0,b.E)("wui-alertbar")],q);let I=(0,o.AH)` 73 :host { 74 display: block; 75 position: absolute; 76 top: var(--wui-spacing-s); 77 left: var(--wui-spacing-l); 78 right: var(--wui-spacing-l); 79 opacity: 0; 80 pointer-events: none; 81 } 82`;var N=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let R={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"}},A=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.open=C.h.state.open,this.onOpen(!0),this.unsubscribe.push(C.h.subscribeKey("open",e=>{this.open=e,this.onOpen(!1)}))}
82disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let{message:e,variant:t}=C.h.state,i=R[t];return(0,o.qy)` 83 <wui-alertbar 84 message=${e} 85 backgroundColor=${i?.backgroundColor} 86 iconColor=${i?.iconColor} 87 icon=${i?.icon} 88 ></wui-alertbar> 89 `}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")}};A.styles=I,N([(0,a.wk)()],A.prototype,"open",void 0),A=N([(0,y.EM)("w3m-alertbar")],A);var E=i(85859),O=i(11464),T=i(96320),$=i(24101);let P=(0,o.AH)` 90 button { 91 border-radius: var(--local-border-radius); 92 color: var(--wui-color-fg-100); 93 padding: var(--local-padding); 94 } 95 96 @media (max-width: 700px) { 97 button { 98 padding: var(--wui-spacing-s); 99 } 100 } 101 102 button > wui-icon { 103 pointer-events: none; 104 } 105 106 button:disabled > wui-icon { 107 color: var(--wui-color-bg-300) !important; 108 } 109 110 button:disabled { 111 background-color: transparent; 112 } 113`;var D=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let j=class extends o.WF{constructor(){super(...arguments),this.size="md",this.disabled=!1,this.icon="copy",this.iconColor="inherit"}
113render(){let e="lg"===this.size?"--wui-border-radius-xs":"--wui-border-radius-xxs",t="lg"===this.size?"--wui-spacing-1xs":"--wui-spacing-2xs";return this.style.cssText=` 114 --local-border-radius: var(${e}); 115 --local-padding: var(${t}); 116`,(0,o.qy)` 117 <button ?disabled=${this.disabled}> 118 <wui-icon color=${this.iconColor} size=${this.size} name=${this.icon}></wui-icon> 119 </button> 120 `}};j.styles=[f.W5,f.fD,f.ck,P],D([(0,a.MZ)()],j.prototype,"size",void 0),D([(0,a.MZ)({type:Boolean})],j.prototype,"disabled",void 0),D([(0,a.MZ)()],j.prototype,"icon",void 0),D([(0,a.MZ)()],j.prototype,"iconColor",void 0),j=D([(0,b.E)("wui-icon-link")],j),i(56349),i(49145);let H=(0,o.AH)` 121 button { 122 display: block; 123 display: flex; 124 align-items: center; 125 padding: var(--wui-spacing-xxs); 126 gap: var(--wui-spacing-xxs); 127 transition: all var(--wui-ease-out-power-1) var(--wui-duration-md); 128 border-radius: var(--wui-border-radius-xxs); 129 } 130 131 wui-image { 132 border-radius: 100%; 133 width: var(--wui-spacing-xl); 134 height: var(--wui-spacing-xl); 135 } 136 137 wui-icon-box { 138 width: var(--wui-spacing-xl); 139 height: var(--wui-spacing-xl); 140 } 141 142 button:hover { 143 background-color: var(--wui-color-gray-glass-002); 144 } 145 146 button:active { 147 background-color: var(--wui-color-gray-glass-005); 148 } 149`;var M=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let B=class extends o.WF{constructor(){super(...arguments),this.imageSrc=""}render(){return(0,o.qy)`<button> 150 ${this.imageTemplate()} 151 <wui-icon size="xs" color="fg-200" name="chevronBottom"></wui-icon> 152 </button>`}imageTemplate(){return this.imageSrc?(0,o.qy)`<wui-image src=${this.imageSrc} alt="select visual"></wui-image>`:(0,o.qy)`<wui-icon-box 153 size="xxs" 154 iconColor="fg-200" 155 backgroundColor="fg-100" 156 background="opaque" 157 icon="networkPlaceholder" 158 ></wui-icon-box>`}};B.styles=[f.W5,f.fD,f.ck,H],M([(0,a.MZ)()],B.prototype,"imageSrc",void 0),B=M([(0,b.E)("wui-select")],B),i(1610),i(60347);var L=i(22483);let z=(0,o.AH)` 159 :host { 160 height: 64px; 161 } 162 163 wui-text { 164 text-transform: capitalize; 165 } 166 167 wui-flex.w3m-header-title { 168 transform: translateY(0); 169 opacity: 1; 170 } 171 172 wui-flex.w3m-header-title[view-direction='prev'] { 173 animation: 174 slide-down-out 120ms forwards var(--wui-ease-out-power-2), 175 slide-down-in 120ms forwards var(--wui-ease-out-power-2); 176 animation-delay: 0ms, 200ms; 177 } 178 179 wui-flex.w3m-header-title[view-direction='next'] { 180 animation: 181 slide-up-out 120ms forwards var(--wui-ease-out-power-2), 182 slide-up-in 120ms forwards var(--wui-ease-out-power-2); 183 animation-delay: 0ms, 200ms; 184 } 185 186 wui-icon-link[data-hidden='true'] { 187 opacity: 0 !important; 188 pointer-events: none; 189 } 190 191 @keyframes slide-up-out { 192 from { 193 transform: translateY(0px); 194 opacity: 1; 195 } 196 to { 197 transform: translateY(3px); 198 opacity: 0; 199 } 200 } 201 202 @keyframes slide-up-in { 203 from { 204 transform: translateY(-3px); 205 opacity: 0; 206 } 207 to { 208 transform: translateY(0); 209 opacity: 1; 210 } 211 } 212 213 @keyframes slide-down-out { 214 from { 215 transform: translateY(0px); 216 opacity: 1; 217 } 218 to { 219 transform: translateY(-3px); 220 opacity: 0; 221 } 222 } 223 224 @keyframes slide-down-in { 225 from { 226 transform: translateY(3px); 227 opacity: 0; 228 } 229 to { 230 transform: translateY(0); 231 opacity: 1; 232 } 233 } 234`;var U=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let K=["SmartSessionList"];function X(){let e=p.I.state.data?.connector?.name,t=p.I.state.data?.wallet?.name,i=p.I.state.data?.network?.name,o=t??e,a=w.a.getConnectors(),r=1===a.length&&a[0]?.id==="w3m-email";return{Connect:`Connect ${r?"Email":""} Wallet`,Create:"Create Wallet",ChooseAccountName:void 0,Account:void 0,AccountSettings:void 0,AllWallets:"All Wallets",ApproveTransaction:"Approve Transaction",BuyInProgress:"Buy",ConnectingExter
234nal:o??"Connect Wallet",ConnectingWalletConnect:o??"WalletConnect",ConnectingWalletConnectBasic:"WalletConnect",ConnectingSiwe:"Sign In",Convert:"Convert",ConvertSelectToken:"Select token",ConvertPreview:"Preview convert",Downloads:o?`Get ${o}`:"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",Profile:void 0,SwitchNetwork:i??"Switch Network",SwitchAddress:"Switch Address",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:E.U.state.socialProvider?E.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"}}let F=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.heading=X()[p.I.state.view],this.network=l.W.state.activeCaipNetwork,this.networkImage=O.$.getNetworkImage(this.network),this.showBack=!1,this.prevHistoryLength=1,this.view=p.I.state.view,this.viewDirection="",this.headerText=X()[p.I.state.view],this.unsubscribe.push(T.j.subscribeNetworkImages(()=>{this.networkImage=O.$.getNetworkImage(this.network)}),p.I.subscribeKey("view",e=>{setTimeout(()=>{this.view=e,this.headerText=X()[e]},L.o.ANIMATION_DURATIONS.HeaderText),this.onViewChange(),this.onHistoryChange()}),l.W.subscribeKey("activeCaipNetwork",e=>{this.network=e,this.networkImage=O.$.getNetworkImage(this.network)}))}disconnectCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,o.qy)` 235 <wui-flex .padding=${this.getPadding()} justifyContent="space-between" alignItems="center"> 236 ${this.leftHeaderTemplate()} ${this.titleTemplate()} ${this.rightHeaderTemplate()} 237 </wui-flex> 238 `}onWalletHelp(){$.E.sendEvent({type:"track",event:"CLICK_WALLET_HELP"}),p.I.push("WhatIsAWallet")}async onClose(){await h.safeClose()}rightHeaderTemplate(){let e=n.H?.state?.features?.smartSessions;return"Account"===p.I.state.view&&e?(0,o.qy)`<wui-flex> 239 <wui-icon-link 240 icon="clock" 241 @click=${()=>p.I.push("SmartSessionList")} 242 data-testid="w3m-header-smart-sessions" 243 ></wui-icon-link> 244 ${this.closeButtonTemplate()} 245 </wui-flex> `:this.closeButtonTemplate()}closeButtonTemplate(){return(0,o.qy)` 246 <wui-icon-link 247 icon="close" 248 @click=${this.onClose.bind(this)} 249 data-testid="w3m-header-close" 250 ></wui-icon-link> 251 `}titleTemplate(){let e=K.includes(this.view);return(0,o.qy)` 252 <wui-flex 253 view-direction="${this.viewDirection}" 254 class="w3m-header-title" 255 alignItems="center" 256 gap="xs" 257 > 258 <wui-text variant="paragraph-700" color="fg-100" data-testid="w3m-header-text" 259 >${this.headerText}</wui-text 260 > 261 ${e?(0,o.qy)`<wui-tag variant="main">Beta</wui-tag>`:null} 262 </wui-flex> 263 `}leftHeaderTemplate(){let{view:e}=p.I.state,t="Connect"===e,i=n.H.state.enableEmbedded,a=n.H.state.enableNetworkSwitch;return"Account"===e&&a?(0,o.qy)`<wui-select 264 id="dynamic" 265 data-testid="w3m-account-select-network" 266 active-network=${(0,r.J)(this.network?.name)} 267 @click=${this.onNetworks.bind(this)} 268 imageSrc=${(0,r.J)(this.networkImage)} 269 ></wui-select>`:this.showBack&&!("ApproveTransaction"===e||"ConnectingSiwe"===e||t&&i)?(0,o.qy)`<wui-icon-link 270 data-testid="header-back" 271 id="dynamic" 272 icon="chevronLeft" 273 @click=${this.onGoBack.bind(this)} 274 ></wui-icon-link>`:(0,o.qy)`<wui-icon-link 275 data-hidden=${!t} 276 id="dynamic" 277 icon="helpCircle" 278 @click=${this.onWalletHelp.bind(this)} 279 ></wui-icon-link>`}onNetworks(){this.isAllowedNetworkSwitch()&&($.E.sendEvent({type:"track",event:"CLICK_NETWORKS"}),p.I.push("Networks"))}isAllowedNetworkSwitch(){let e=l.W.getAllRequestedCaipNetworks(),t=!!e&&e.length>1,i=e?.find(({id:e})=>e===this.network?.id);return t||!i}getPadding(){return this.heading?["l","2l","l","2l"]:["0","2l","0","2l"]}onViewChange(){let{history:e}=p.I.state,t=L.o.VIEW_DIRECTION.Next;e.length<this.prevHistoryLength&&(t=L.o.VIEW_DIRECTION.Prev),this.prevHistoryLength=e.length,this.viewDirection=t}async onHistoryChange(){let{history:e}=p.I.state,t=this.shadowRoot?.querySelector("#dynamic");e.length>1&&!this.showBack&&t?(await t.animate([{opacity:1},{opacity:0}
279],{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(){p.I.goBack()}};F.styles=z,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,y.EM)("w3m-header")],F),i(57074);let Z=(0,o.AH)` 280 :host { 281 display: flex; 282 column-gap: var(--wui-spacing-s); 283 align-items: center; 284 padding: var(--wui-spacing-xs) var(--wui-spacing-m) var(--wui-spacing-xs) var(--wui-spacing-xs); 285 border-radius: var(--wui-border-radius-s); 286 border: 1px solid var(--wui-color-gray-glass-005); 287 box-sizing: border-box; 288 background-color: var(--wui-color-bg-175); 289 box-shadow: 290 0px 14px 64px -4px rgba(0, 0, 0, 0.15), 291 0px 8px 22px -6px rgba(0, 0, 0, 0.15); 292 293 max-width: 300px; 294 } 295 296 :host wui-loading-spinner { 297 margin-left: var(--wui-spacing-3xs); 298 } 299`;var _=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let V=class extends o.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(0,o.qy)` 300 ${this.templateIcon()} 301 <wui-text variant="paragraph-500" color="fg-100" data-testid="wui-snackbar-message" 302 >${this.message}</wui-text 303 > 304 `}templateIcon(){return this.loading?(0,o.qy)`<wui-loading-spinner size="md" color="accent-100"></wui-loading-spinner>`:"default"===this.iconType?(0,o.qy)`<wui-icon size="xl" color=${this.iconColor} name=${this.icon}></wui-icon>`:(0,o.qy)`<wui-icon-box 305 size="sm" 306 iconSize="xs" 307 iconColor=${this.iconColor} 308 backgroundColor=${this.backgroundColor} 309 icon=${this.icon} 310 background="opaque" 311 ></wui-icon-box>`}};V.styles=[f.W5,Z],_([(0,a.MZ)()],V.prototype,"backgroundColor",void 0),_([(0,a.MZ)()],V.prototype,"iconColor",void 0),_([(0,a.MZ)()],V.prototype,"icon",void 0),_([(0,a.MZ)()],V.prototype,"message",void 0),_([(0,a.MZ)()],V.prototype,"loading",void 0),_([(0,a.MZ)()],V.prototype,"iconType",void 0),V=_([(0,b.E)("wui-snackbar")],V);let Y=(0,o.AH)` 312 :host { 313 display: block; 314 position: absolute; 315 opacity: 0; 316 pointer-events: none; 317 top: 11px; 318 left: 50%; 319 width: max-content; 320 } 321`;var G=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let J={loading:void 0,success:{backgroundColor:"success-100",iconColor:"success-100",icon:"checkmark"},error:{backgroundColor:"error-100",iconColor:"error-100",icon:"close"}},Q=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.timeout=void 0,this.open=v.P.state.open,this.unsubscribe.push(v.P.subscribeKey("open",e=>{this.open=e,this.onOpen()}))}disconnectedCallback(){clearTimeout(this.timeout),this.unsubscribe.forEach(e=>e())}render(){let{message:e,variant:t,svg:i}=v.P.state,a=J[t],{icon:r,iconColor:s}=i??a??{};return(0,o.qy)` 322 <wui-snackbar 323 message=${e} 324 backgroundColor=${a?.backgroundColor} 325 iconColor=${s} 326 icon=${r} 327 .loading=${"loading"===t} 328 ></wui-snackbar> 329 `}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),v.P.state.autoClose&&(this.timeout=setTimeout(()=>v.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=Y,G([(0,a.wk)()],Q.prototype,"open",void 0),Q=G([(0,y.EM)("w3m-snackbar")],Q);var ee=i(1274),et=i(81334),ei=i(41228);let eo=(0,ee.BX)({message:"",open:!1,triggerRect:{width:0,height:0,top:0,left:0},variant:"shade"}),ea=(0,ei.X)({state:eo,subscribe:e=>(0,ee.B1)(eo,()=>e(eo)),subscribeKey:(e,t)=>(0,et.u$)(eo,e,t),showTooltip({message:e,triggerRect:t,variant:i}){eo.open=!0,eo.message=e,eo.triggerRect=t,eo.variant=i},hide(){eo.open=!1,eo.message="",eo.triggerRect={width:0,height:0,top:0,left:0}}});i(80729);let er=(0,o.AH)` 330 :host { 331 pointer-events: none; 332 } 333 334 :host > wui-flex { 335 display: var(--w3m-tooltip-display); 336 opacity: var(--w3m-tooltip-opacity); 337 padding: 9px var(--wui-spacing-s) 10px var(--wui-spacing-s); 338 border-radius: var(--wui-border-radius-xxs); 339 color: var(--wui-color-bg-100); 340 position: fixed; 341 top: var(--w3m-tooltip-top); 342 left: var(--w3m-tooltip-left); 343 transform: translate(calc(-50% + var(--w3m-tooltip-parent-width)), calc(-100% - 8px)); 344 max-width: calc(var(--w3m-modal-width) - var(--wui-spacing-xl)); 345 transition: opacity 0.2s var(--wui-ease-out-power-2); 346 will-change: opacity; 347 } 348 349 :host([data-variant='shade']) > wui-flex { 350 background-color: var(--wui-color-bg-150); 351 border: 1px solid var(--wui-color-gray-glass-005); 352 } 353 354 :host([data-variant='shade']) > wui-flex > wui-text { 355 color: var(--wui-color-fg-150); 356 } 357 358 :host([data-variant='fill']) > wui-flex { 359 background-color: var(--wui-color-fg-100); 360 border: none; 361 } 362 363 wui-icon { 364 position: absolute; 365 width: 12px !important; 366 height: 4px !important; 367 color: var(--wui-color-bg-150); 368 } 369 370 wui-icon[data-placement='top'] { 371 bottom: 0px; 372 left: 50%; 373 transform: translate(-50%, 95%); 374 } 375 376 wui-icon[data-placement='bottom'] { 377 top: 0; 378 left: 50%; 379 transform: translate(-50%, -95%) rotate(180deg); 380 } 381 382 wui-icon[data-placement='right'] { 383 top: 50%; 384 left: 0; 385 transform: translate(-65%, -50%) rotate(90deg); 386 } 387 388 wui-icon[data-placement='left'] { 389 top: 50%; 390 right: 0%; 391 transform: translate(65%, -50%) rotate(270deg); 392 } 393`;var es=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let en=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.open=ea.state.open,this.message=ea.state.message,this.triggerRect=ea.state.triggerRect,this.variant=ea.state.variant,this.unsubscribe.push(ea.subscribe(e=>{this.open=e.open,this.message=e.message,this.triggerRect=e.triggerRect,this.variant=e.variant}))}
393disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){this.dataset.variant=this.variant;let e=this.triggerRect.top,t=this.triggerRect.left;return this.style.cssText=` 394 --w3m-tooltip-top: ${e}px; 395 --w3m-tooltip-left: ${t}px; 396 --w3m-tooltip-parent-width: ${this.triggerRect.width/2}px; 397 --w3m-tooltip-display: ${this.open?"flex":"none"}; 398 --w3m-tooltip-opacity: ${+!!this.open}; 399 `,(0,o.qy)`<wui-flex> 400 <wui-icon data-placement="top" color="fg-100" size="inherit" name="cursor"></wui-icon> 401 <wui-text color="inherit" variant="small-500">${this.message}</wui-text> 402 </wui-flex>`}};en.styles=[er],es([(0,a.wk)()],en.prototype,"open",void 0),es([(0,a.wk)()],en.prototype,"message",void 0),es([(0,a.wk)()],en.prototype,"triggerRect",void 0),es([(0,a.wk)()],en.prototype,"variant",void 0),en=es([(0,y.EM)("w3m-tooltip"),(0,y.EM)("w3m-tooltip")],en);let ec=(0,o.AH)` 403 :host { 404 --prev-height: 0px; 405 --new-height: 0px; 406 display: block; 407 } 408 409 div.w3m-router-container { 410 transform: translateY(0); 411 opacity: 1; 412 } 413 414 div.w3m-router-container[view-direction='prev'] { 415 animation: 416 slide-left-out 150ms forwards ease, 417 slide-left-in 150ms forwards ease; 418 animation-delay: 0ms, 200ms; 419 } 420 421 div.w3m-router-container[view-direction='next'] { 422 animation: 423 slide-right-out 150ms forwards ease, 424 slide-right-in 150ms forwards ease; 425 animation-delay: 0ms, 200ms; 426 } 427 428 @keyframes slide-left-out { 429 from { 430 transform: translateX(0px); 431 opacity: 1; 432 } 433 to { 434 transform: translateX(10px); 435 opacity: 0; 436 } 437 } 438 439 @keyframes slide-left-in { 440 from { 441 transform: translateX(-10px); 442 opacity: 0; 443 } 444 to { 445 transform: translateX(0); 446 opacity: 1; 447 } 448 } 449 450 @keyframes slide-right-out { 451 from { 452 transform: translateX(0px); 453 opacity: 1; 454 } 455 to { 456 transform: translateX(-10px); 457 opacity: 0; 458 } 459 } 460 461 @keyframes slide-right-in { 462 from { 463 transform: translateX(10px); 464 opacity: 0; 465 } 466 to { 467 transform: translateX(0); 468 opacity: 1; 469 } 470 } 471`;var el=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let ew=class extends o.WF{constructor(){super(),this.resizeObserver=void 0,this.prevHeight="0px",this.prevHistoryLength=1,this.unsubscribe=[],this.view=p.I.state.view,this.viewDirection="",this.unsubscribe.push(p.I.subscribeKey("view",e=>this.onViewChange(e)))}firstUpdated(){this.resizeObserver=new ResizeObserver(([e])=>{let t=`${e?.contentRect.height}px`;"0px"!==this.prevHeight&&(this.style.setProperty("--prev-height",this.prevHeight),this.style.setProperty("--new-height",t),this.style.animation="w3m-view-height 150ms forwards ease",this.style.height="auto"),setTimeout(()=>{this.prevHeight=t,this.style.animation="unset"},L.o.ANIMATION_DURATIONS.ModalHeight)}),this.resizeObserver?.observe(this.getWrapper())}disconnectedCallback(){this.resizeObserver?.unobserve(this.getWrapper()),this.unsubscribe.forEach(e=>e())}render(){return(0,o.qy)`<div class="w3m-router-container" view-direction="${this.viewDirection}"> 472 ${this.viewTemplate()} 473 </div>`}viewTemplate(){switch(this.view){case"AccountSettings":return(0,o.qy)`<w3m-account-settings-view></w3m-account-settings-view>`;case"Account":return(0,o.qy)`<w3m-account-view></w3m-account-view>`;case"AllWallets":return(0,o.qy)`<w3m-all-wallets-view></w3m-all-wallets-view>`;case"ApproveTransaction":return(0,o.qy)`<w3m-approve-transaction-view></w3m-approve-transaction-view>`;case"BuyInProgress":return(0,o.qy)`<w3m-buy-in-progress-view></w3m-buy-in-progress-view>`;case"ChooseAccountName":return(0,o.qy)`<w3m-choose-account-name-view></w3m-choose-account-name-view>`;case"Connect":default:return(0,o.qy)`<w3m-connect-view></w3m-connect-view>`;case"Create":return(0,o.qy)`<w3m-connect-view walletGuide="explore"></w3m-connect-view>`;case"ConnectingWalletConnect":return(0,o.qy)`<w3m-connecting-wc-view></w3m-connecting-wc-view>`;case"ConnectingWalletConnectBasic":return(0,o.qy)`<w3m-connecting-wc-basic-view></w3m-connecting-wc-basic-view>`;
473case"ConnectingExternal":return(0,o.qy)`<w3m-connecting-external-view></w3m-connecting-external-view>`;case"ConnectingSiwe":return(0,o.qy)`<w3m-connecting-siwe-view></w3m-connecting-siwe-view>`;case"ConnectWallets":return(0,o.qy)`<w3m-connect-wallets-view></w3m-connect-wallets-view>`;case"ConnectSocials":return(0,o.qy)`<w3m-connect-socials-view></w3m-connect-socials-view>`;case"ConnectingSocial":return(0,o.qy)`<w3m-connecting-social-view></w3m-connecting-social-view>`;case"Downloads":return(0,o.qy)`<w3m-downloads-view></w3m-downloads-view>`;case"EmailLogin":return(0,o.qy)`<w3m-email-login-view></w3m-email-login-view>`;case"EmailVerifyOtp":return(0,o.qy)`<w3m-email-verify-otp-view></w3m-email-verify-otp-view>`;case"EmailVerifyDevice":return(0,o.qy)`<w3m-email-verify-device-view></w3m-email-verify-device-view>`;case"GetWallet":return(0,o.qy)`<w3m-get-wallet-view></w3m-get-wallet-view>`;case"Networks":return(0,o.qy)`<w3m-networks-view></w3m-networks-view>`;case"SwitchNetwork":return(0,o.qy)`<w3m-network-switch-view></w3m-network-switch-view>`;case"Profile":return(0,o.qy)`<w3m-profile-view></w3m-profile-view>`;case"SwitchAddress":return(0,o.qy)`<w3m-switch-address-view></w3m-switch-address-view>`;case"Transactions":return(0,o.qy)`<w3m-transactions-view></w3m-transactions-view>`;case"OnRampProviders":return(0,o.qy)`<w3m-onramp-providers-view></w3m-onramp-providers-view>`;case"OnRampActivity":return(0,o.qy)`<w3m-onramp-activity-view></w3m-onramp-activity-view>`;case"OnRampTokenSelect":return(0,o.qy)`<w3m-onramp-token-select-view></w3m-onramp-token-select-view>`;case"OnRampFiatSelect":return(0,o.qy)`<w3m-onramp-fiat-select-view></w3m-onramp-fiat-select-view>`;case"UpgradeEmailWallet":return(0,o.qy)`<w3m-upgrade-wallet-view></w3m-upgrade-wallet-view>`;case"UpdateEmailWallet":return(0,o.qy)`<w3m-update-email-wallet-view></w3m-update-email-wallet-view>`;case"UpdateEmailPrimaryOtp":return(0,o.qy)`<w3m-update-email-primary-otp-view></w3m-update-email-primary-otp-view>`;case"UpdateEmailSecondaryOtp":return(0,o.qy)`<w3m-update-email-secondary-otp-view></w3m-update-email-secondary-otp-view>`;case"UnsupportedChain":return(0,o.qy)`<w3m-unsupported-chain-view></w3m-unsupported-chain-view>`;case"Swap":return(0,o.qy)`<w3m-swap-view></w3m-swap-view>`;case"SwapSelectToken":return(0,o.qy)`<w3m-swap-select-token-view></w3m-swap-select-token-view>`;case"SwapPreview":return(0,o.qy)`<w3m-swap-preview-view></w3m-swap-preview-view>`;case"WalletSend":return(0,o.qy)`<w3m-wallet-send-view></w3m-wallet-send-view>`;case"WalletSendSelectToken":return(0,o.qy)`<w3m-wallet-send-select-token-view></w3m-wallet-send-select-token-view>`;case"WalletSendPreview":return(0,o.qy)`<w3m-wallet-send-preview-view></w3m-wallet-send-preview-view>`;case"WhatIsABuy":return(0,o.qy)`<w3m-what-is-a-buy-view></w3m-what-is-a-buy-view>`;case"WalletReceive":return(0,o.qy)`<w3m-wallet-receive-view></w3m-wallet-receive-view>`;case"WalletCompatibleNetworks":return(0,o.qy)`<w3m-wallet-compatible-networks-view></w3m-wallet-compatible-networks-view>`;case"WhatIsAWallet":return(0,o.qy)`<w3m-what-is-a-wallet-view></w3m-what-is-a-wallet-view>`;case"ConnectingMultiChain":return(0,o.qy)`<w3m-connecting-multi-chain-view></w3m-connecting-multi-chain-view>`;case"WhatIsANetwork":return(0,o.qy)`<w3m-what-is-a-network-view></w3m-what-is-a-network-view>`;case"ConnectingFarcaster":return(0,o.qy)`<w3m-connecting-farcaster-view></w3m-connecting-farcaster-view>`;case"SwitchActiveChain":return(0,o.qy)`<w3m-switch-active-chain-view></w3m-switch-active-chain-view>`;case"RegisterAccountName":return(0,o.qy)`<w3m-register-account-name-view></w3m-register-account-name-view>`;case"RegisterAccountNameSuccess":return(0,o.qy)`<w3m-register-account-name-success-view></w3m-register-account-name-success-view>`;case"SmartSessionCreated":return(0,o.qy)`<w3m-smart-session-created-view></w3m-smart-session-created-view>`;case"SmartSessionList":return(0,o.qy)`<w3m-smart-session-list-view></w3m-smart-session-list-view>`;case"SIWXSignMessage":return(0,o.qy)`<w3m-siwx-sign-message-view></w3m-siwx-sign-message-view>`;case"Pay":return(0,o.qy)`<w3m-pay-view></w3m-pay-view>`;case"PayLoading":return(0,o.qy)`<w3m-pay-loading-view></w3m-pay-loading-view>`}}onViewChange(e){ea.hide();let t=L.o.VIEW_DIRECTION.Next,{history:i}=p.I.state;i.length<this.prevHistoryLength&&(t=L.o.VIEW_DIRECTION.Prev),this.prevHistoryLength=i.length,this.viewDirection=t,setTimeout(()=>{this.view=e},L.o.ANIMATION_DURATIONS.ViewTransition)}getWrapper(){return this.shadowRoot?.querySelector("div")}};ew.styles=ec,el([(0,a.wk)()],ew.prototype,"view",void 0),el([(0,a.wk)()],ew.prototype,"viewDirection",void 0),ew=el([(0,y.EM)("w3m-router")],ew);let ed=(0,o.AH)` 474 :host { 475 z-index: var(--w3m-z-index); 476 display: block; 477 backface-visibility: hidden; 478 will-change: opacity; 479 position: fixed; 480 top: 0; 481 left: 0; 482 right: 0; 483 bottom: 0; 484 pointer-events: none; 485 opacity: 0; 486 background-color: var(--wui-cover); 487 transition: opacity 0.2s var(--wui-ease-out-power-2); 488 will-change: opacity; 489 } 490 491 :host(.open) { 492 opacity: 1; 493 } 494 495 :host(.appkit-modal) { 496 position: relative; 497 pointer-events: unset; 498 background: none; 499 width: 100%; 500 opacity: 1; 501 } 502 503 wui-card { 504 max-width: var(--w3m-modal-width); 505 width: 100%; 506 position: relative; 507 animation: zoom-in 0.2s var(--wui-ease-out-power-2); 508 animation-fill-mode: backwards; 509 outline: none; 510 transition: 511 border-radius var(--wui-duration-lg) var(--wui-ease-out-power-1), 512 background-color var(--wui-duration-lg) var(--wui-ease-out-power-1); 513 will-change: border-radius, background-color; 514 } 515 516 :host(.appkit-modal) wui-card { 517 max-width: 400px; 518 } 519 520 wui-card[shake='true'] { 521 animation: 522 zoom-in 0.2s var(--wui-ease-out-power-2), 523 w3m-shake 0.5s var(--wui-ease-out-power-2); 524 } 525 526 wui-flex { 527 overflow-x: hidden; 528 overflow-y: auto; 529 display: flex; 530 align-items: center; 531 justify-content: center; 532 width: 100%; 533 height: 100%; 534 } 535 536 @media (max-height: 700px) and (min-width: 431px) { 537 wui-flex { 538 align-items: flex-start; 539 } 540 541 wui-card { 542 margin: var(--wui-spacing-xxl) 0px; 543 } 544 } 545 546 @media (max-width: 430px) { 547 wui-flex { 548 align-items: flex-end; 549 } 550 551 wui-card { 552 max-width: 100%; 553 border-bottom-left-radius: var(--local-border-bottom-mobile-radius); 554 border-bottom-right-radius: var(--local-border-bottom-mobile-radius); 555 border-bottom: none; 556 animation: slide-in 0.2s var(--wui-ease-out-power-2); 557 } 558 559 wui-card[shake='true'] { 560 animation: 561 slide-in 0.2s var(--wui-ease-out-power-2), 562 w3m-shake 0.5s var(--wui-ease-out-power-2); 563 } 564 } 565 566 @keyframes zoom-in { 567 0% { 568 transform: scale(0.95) translateY(0); 569 } 570 100% { 571 transform: scale(1) translateY(0); 572 } 573 } 574 575 @keyframes slide-in { 576 0% { 577 transform: scale(1) translateY(50px); 578 } 579 100% { 580 transform: scale(1) translateY(0); 581 } 582 } 583 584 @keyframes w3m-shake { 585 0% { 586 transform: scale(1) rotate(0deg); 587 } 588 20% { 589 transform: scale(1) rotate(-1deg); 590 } 591 40% { 592 transform: scale(1) rotate(1.5deg); 593 } 594 60% { 595 transform: scale(1) rotate(-1.5deg); 596 } 597 80% { 598 transform: scale(1) rotate(1deg); 599 } 600 100% { 601 transform: scale(1) rotate(0deg); 602 } 603 } 604 605 @keyframes w3m-view-height { 606 from { 607 height: var(--prev-height); 608 } 609 to { 610 height: var(--new-height); 611 } 612 } 613`;var ep=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let eu="scroll-lock";class eh extends o.WF{constructor(){super(),this.unsubscribe=[],this.abortController=void 0,this.hasPrefetched=!1,this.enableEmbedded=n.H.state.enableEmbedded,this.open=c.W.state.open,this.caipAddress=l.W.state.activeCaipAddress,this.caipNetwork=l.W.state.activeCaipNetwork,this.shake=c.W.state.shake,this.filterByNamespace=w.a.state.filterByNamespace,this.initializeTheming(),d.N.prefetchAnalyticsConfig(),this.unsubscribe.push(c.W.subscribeKey("open",e=>e?this.onOpen():this.onClose()),c.W.subscribeKey("shake",e=>this.shake=e),l.W.subscribeKey("activeCaipNetwork",e=>this.onNewNetwork(e)),l.W.subscribeKey("activeCaipAddress",e=>this.onNewAddress(e)),n.H.subscribeKey("enableEmbedded",e=>this.enableEmbedded=e),w.a.subscribeKey("filterByNamespace",e=>{this.filterByNamespace===e||l.W.getAccountData(e)?.caipAddress||(d.N.fetchRecommendedWallets(),this.filterByNamespace=e)}))}firstUpdated(){if(this.caipAddress){if(this.enableEmbedded){c.W.close(),this.prefetch();return}this.onNewAddress(this.caipAddress)}this.open&&this.onOpen(),this.enableEmbedded&&this.prefetch()}
613disconnectedCallback(){this.unsubscribe.forEach(e=>e()),this.onRemoveKeyboardListener()}render(){return(this.style.cssText=` 614 --local-border-bottom-mobile-radius: ${this.enableEmbedded?"clamp(0px, var(--wui-border-radius-l), 44px)":"0px"}; 615 `,this.enableEmbedded)?(0,o.qy)`${this.contentTemplate()} 616 <w3m-tooltip></w3m-tooltip> `:this.open?(0,o.qy)` 617 <wui-flex @click=${this.onOverlayClick.bind(this)} data-testid="w3m-modal-overlay"> 618 ${this.contentTemplate()} 619 </wui-flex> 620 <w3m-tooltip></w3m-tooltip> 621 `:null}contentTemplate(){return(0,o.qy)` <wui-card 622 shake="${this.shake}" 623 data-embedded="${(0,r.J)(this.enableEmbedded)}" 624 role="alertdialog" 625 aria-modal="true" 626 tabindex="0" 627 data-testid="w3m-modal-card" 628 > 629 <w3m-header></w3m-header> 630 <w3m-router></w3m-router> 631 <w3m-snackbar></w3m-snackbar> 632 <w3m-alertbar></w3m-alertbar> 633 </wui-card>`}async onOverlayClick(e){e.target===e.currentTarget&&await this.handleClose()}async handleClose(){await h.safeClose()}initializeTheming(){let{themeVariables:e,themeMode:t}=m.W.state,i=y.Zv.getColorTheme(t);(0,y.RF)(e,i)}onClose(){this.open=!1,this.classList.remove("open"),this.onScrollUnlock(),v.P.hide(),this.onRemoveKeyboardListener()}onOpen(){this.open=!0,this.classList.add("open"),this.onScrollLock(),this.onAddKeyboardListener()}onScrollLock(){let e=document.createElement("style");e.dataset.w3m=eu,e.textContent=` 634 body { 635 touch-action: none; 636 overflow: hidden; 637 overscroll-behavior: contain; 638 } 639 w3m-modal { 640 pointer-events: auto; 641 } 642 `,document.head.appendChild(e)}onScrollUnlock(){let e=document.head.querySelector(`style[data-w3m="${eu}"]`);e&&e.remove()}onAddKeyboardListener(){this.abortController=new AbortController;let e=this.shadowRoot?.querySelector("wui-card");e?.focus(),window.addEventListener("keydown",t=>{if("Escape"===t.key)this.handleClose();else if("Tab"===t.key){let{tagName:i}=t.target;!i||i.includes("W3M-")||i.includes("WUI-")||e?.focus()}},this.abortController)}onRemoveKeyboardListener(){this.abortController?.abort(),this.abortController=void 0}async onNewAddress(e){let t=l.W.state.isSwitchingNamespace,i=g.w.getPlainAddress(e);i||t?t&&i&&p.I.goBack():c.W.close(),await u.U.initializeIfEnabled(),this.caipAddress=e,l.W.setIsSwitchingNamespace(!1)}onNewNetwork(e){let t=this.caipNetwork,i=t?.caipNetworkId?.toString(),o=t?.chainNamespace,a=e?.caipNetworkId?.toString(),r=e?.chainNamespace,n=i!==a,w=t?.name===s.o.UNSUPPORTED_NETWORK_NAME,d="ConnectingExternal"===p.I.state.view,u=!l.W.getAccountData(e?.chainNamespace)?.caipAddress,h="UnsupportedChain"===p.I.state.view,m=c.W.state.open,v=!1;m&&!d&&(u?n&&(v=!0):h?v=!0:n&&o===r&&!w&&(v=!0)),v&&"SIWXSignMessage"!==p.I.state.view&&p.I.goBack(),this.caipNetwork=e}prefetch(){this.hasPrefetched||(d.N.prefetch(),d.N.fetchWalletsByPage({page:1}),this.hasPrefetched=!0)}}eh.styles=ed,ep([(0,a.MZ)({type:Boolean})],eh.prototype,"enableEmbedded",void 0),ep([(0,a.wk)()],eh.prototype,"open",void 0),ep([(0,a.wk)()],eh.prototype,"caipAddress",void 0),ep([(0,a.wk)()],eh.prototype,"caipNetwork",void 0),ep([(0,a.wk)()],eh.prototype,"shake",void 0),ep([(0,a.wk)()],eh.prototype,"filterByNamespace",void 0);let em=class extends eh{};em=ep([(0,y.EM)("w3m-modal")],em);let ev=class extends eh{};ev=ep([(0,y.EM)("appkit-modal")],ev)}}]);
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.