PageSourceSearch

https://swap.charisma.rocks/_next/static/chunks/4769.1f4333afbf82dfcd.js

js charisma.rocks collected 2026-10-09 02:53:18 UTC 45,985 bytes, 642 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4769],{405:(e,t,i)=>{i.d(t,{T:()=>d});var a=i(39482),o=i(34956),r=i(85777);class s{constructor(e){this.G=e}disconnect(){this.G=void 0}reconnect(e){this.G=e}deref(){return this.G}}class n{constructor(){this.Y=void 0,this.Z=void 0}get(){return this.Y}pause(){this.Y??=new Promise(e=>this.Z=e)}resume(){this.Z?.(),this.Y=this.Z=void 0}}var c=i(24764);let l=e=>!(0,o.sO)(e)&&"function"==typeof e.then;class w extends r.Kq{constructor(){super(...arguments),this._$Cwt=0x3fffffff,this._$Cbt=[],this._$CK=new s(this),this._$CX=new n}render(...e){return e.find(e=>!l(e))??a.c0}update(e,t){let i=this._$Cbt,o=i.length;this._$Cbt=t;let r=this._$CK,s=this._$CX;this.isConnected||this.disconnected();for(let e=0;e<t.length&&!(e>this._$Cwt);e++){let a=t[e];if(!l(a))return this._$Cwt=e,a;e<o&&a===i[e]||(this._$Cwt=0x3fffffff,o=0,Promise.resolve(a).then(async e=>{for(;s.get();)await s.get();let t=r.deref();if(void 0!==t){let i=t._$Cbt.indexOf(a);i>-1&&i<t._$Cwt&&(t._$Cwt=i,t.setValue(e))}}))}return a.c0}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}}let d=(0,c.u$)(w)},7626:(e,t,i)=>{i.d(t,{MZ:()=>r,wk:()=>s});var a=i(5761);let o={attribute:!0,type:String,converter:a.W3,reflect:!1,hasChanged:a.Ec};function r(e){return(t,i)=>"object"==typeof i?((e=o,t,i)=>{let{kind:a,metadata:r}=i,s=globalThis.litPropertyMetadata.get(r);if(void 0===s&&globalThis.litPropertyMetadata.set(r,s=new Map),"setter"===a&&((e=Object.create(e)).wrapped=!0),s.set(i.name,e),"accessor"===a){let{name:a}=i;return{set(i){let o=t.get.call(this);t.set.call(this,i),this.requestUpdate(a,o,e,!0,i)},init(t){return void 0!==t&&this.C(a,void 0,e,t),t}}}if("setter"===a){let{name:a}=i;return function(i){let o=this[a];t.call(this,i),this.requestUpdate(a,o,e,!0,i)}}throw Error("Unsupported decorator location: "+a)})(e,t,i):((e,t,i)=>{let a=t.hasOwnProperty(i);return t.constructor.createProperty(i,e),a?Object.getOwnPropertyDescriptor(t,i):void 0})(e,t,i)}function s(e){return r({...e,state:!0,attribute:!1})}},24764:(e,t,i)=>{i.d(t,{OA:()=>a,WL:()=>r,u$:()=>o});let a={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},o=e=>(...t)=>({_$litDirective$:e,values:t});class r{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}},32717:(e,t,i)=>{i.r(t),i.d(t,{AppKitModal:()=>ef,W3mModal:()=>eg,W3mModalBase:()=>ev});var a=i(29243),o=i(7626),r=i(61258),s=i(40819),n=i(1397),c=i(40843),l=i(48783),w=i(36671),d=i(64165),p=i(80774),u=i(49645),h=i(70835),m=i(58581);let v={isUnsupportedChainView:()=>"UnsupportedChain"===h.I.state.view||"SwitchNetwork"===h.I.state.view&&h.I.state.history.includes("UnsupportedChain"),async safeClose(){if(this.isUnsupportedChainView()||await m.U.isSIWXCloseDisabled())return void l.W.shake();("DataCapture"===h.I.state.view||"DataCaptureOtpConfirm"===h.I.state.view)&&u.x.disconnect(),l.W.close()}};var g=i(1019),f=i(98716),y=i(27417),b=i(68551),k=i(17438),x=i(52705);let C=(0,a.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`,$=class extends a.WF{render(){return(0,a.qy)`<slot></slot>`}};$.styles=[k.W5,C],$=function(e,t,i,a){var o,r=arguments.length,s=r<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,a);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(0,x.E)("wui-card")],$),i(27837);var A=i(27240);i(31246),i(30898),i(69708);let W=(0,a.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 S=function(e,t,i,a){var o,r=arguments.length,s=r<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,a);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let I=class extends a.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,a.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(){A.h.close()}};I.styles=[k.W5,W],S([(0,o.MZ)()],I.prototype,"message",void 0),S([(0,o.MZ)()],I.prototype,"backgroundColor",void 0),S([(0,o.MZ)()],I.prototype,"iconColor",void 0),S([(0,o.MZ)()],I.prototype,"icon",void 0),I=S([(0,x.E)("wui-alertbar")],I);let E=(0,a.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,a){var o,r=arguments.length,s=r<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,a);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let O={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"}},T=class extends a.WF{constructor(){super(),this.unsubscribe=[],this.open=A.h.state.open,this.onOpen(!0),this.unsubscribe.push(A.h.subscribeKey("open",e=>{this.open=e,this.onOpen(!1)}))}
82disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let{message:e,variant:t}=A.h.state,i=O[t];return(0,a.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")}};T.styles=E,N([(0,o.wk)()],T.prototype,"open",void 0),T=N([(0,b.EM)("w3m-alertbar")],T);var q=i(41017),R=i(13182),P=i(83622),_=i(90548);let D=(0,a.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    :host(:not([size='sm'])) 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 M=function(e,t,i,a){var o,r=arguments.length,s=r<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,a);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let j=class extends a.WF{constructor(){super(...arguments),this.size="md",this.disabled=!1,this.icon="copy",this.iconColor="inherit"}render(){this.dataset.size=this.size;let e="",t="";switch(this.size){case"lg":e="--wui-border-radius-xs",t="--wui-spacing-1xs";break;case"sm":e="--wui-border-radius-3xs",t="--wui-spacing-xxs";break;default:e="--wui-border-radius-xxs",t="--wui-spacing-2xs"}return this.style.cssText=`
114    --local-border-radius: var(${e});
115    --local-padding: var(${t});
116    `,(0,a.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=[k.W5,k.fD,k.ck,D],M([(0,o.MZ)()],j.prototype,"size",void 0),M([(0,o.MZ)({type:Boolean})],j.prototype,"disabled",void 0),M([(0,o.MZ)()],j.prototype,"icon",void 0),M([(0,o.MZ)()],j.prototype,"iconColor",void 0),j=M([(0,x.E)("wui-icon-link")],j),i(29852),i(52120);let H=(0,a.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 B=function(e,t,i,a){var o,r=arguments.length,s=r<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,a);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let U=class extends a.WF{constructor(){super(...arguments),this.imageSrc=""}render(){return(0,a.qy)`<button>
150      ${this.imageTemplate()}
151      <wui-icon size="xs" color="fg-200" name="chevronBottom"></wui-icon>
152    </button>`}imageTemplate(){return this.imageSrc?(0,a.qy)`<wui-image src=${this.imageSrc} alt="select visual"></wui-image>`:(0,a.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>`}};U.styles=[k.W5,k.fD,k.ck,H],B([(0,o.MZ)()],U.prototype,"imageSrc",void 0),U=B([(0,x.E)("wui-select")],U),i(74411),i(83493);var L=i(56094);let z=(0,a.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 K=function(e,t,i,a){var o,r=arguments.length,s=r<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,a);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let X=["SmartSessionList"];function Z(){let e=h.I.state.data?.connector?.name,t=h.I.state.data?.wallet?.name,i=h.I.state.data?.network?.name,a=t??e,o=d.a.getConnectors(),r=1===o.length&&o[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:a??"Connect Wallet",ConnectingWalletConnect:a??"WalletConnect",ConnectingWalletConnectBasic:"WalletConnect",ConnectingSiwe:"Sign In",Convert:"Convert",ConvertSelectToken:"Select token",ConvertPreview:"Preview convert",Downloads:a?`Get ${a}`:"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:i??"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:q.U.state.socialProvider?q.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"}}let V=class extends a.WF{constructor(){super(),this.unsubscribe=[],this.heading=Z()[h.I.state.view],this.network=w.W.state.activeCaipNetwork,this.networkImage=R.$.getNetworkImage(this.network),this.showBack=!1,this.prevHistoryLength=1,this.view=h.I.state.view,this.viewDirection="",this.headerText=Z()[h.I.state.view],this.unsubscribe.push(P.j.subscribeNetworkImages(()=>{this.networkImage=R.$.getNetworkImage(this.network)}),h.I.subscribeKey("view",e=>{setTimeout(()=>{this.view=e,this.headerText=Z()[e]},L.o.ANIMATION_DURATIONS.HeaderText),this.onViewChange(),this.onHistoryChange()}),w.W.subscribeKey("activeCaipNetwork",e=>{this.network=e,this.networkImage=R.$.getNetworkImage(this.network)}))}disconnectCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,a.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"}),h.I.push("WhatIsAWallet")}async onClose(){await v.safeClose()}rightHeaderTemplate(){let e=c.H?.state?.features?.smartSessions;return"Account"===h.I.state.view&&e?(0,a.qy)`<wui-flex>
239      <wui-icon-link
240        icon="clock"
241        @click=${()=>h.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,a.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=X.includes(this.view);return(0,a.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,a.qy)`<wui-tag variant="main">Beta</wui-tag>`:null}
262      </wui-flex>
263    `}leftHeaderTemplate(){let{view:e}=h.I.state,t="Connect"===e,i=c.H.state.enableEmbedded,o=c.H.state.enableNetworkSwitch;return"Account"===e&&o?(0,a.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,a.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,a.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"}),h.I.push("Networks"))}isAllowedNetworkSwitch(){let e=w.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}=h.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}=h.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(){h.I.goBack()}};V.styles=z,K([(0,o.wk)()],V.prototype,"heading",void 0),K([(0,o.wk)()],V.prototype,"network",void 0),K([(0,o.wk)()],V.prototype,"networkImage",void 0),K([(0,o.wk)()],V.prototype,"showBack",void 0),K([(0,o.wk)()],V.prototype,"prevHistoryLength",void 0),K([(0,o.wk)()],V.prototype,"view",void 0),K([(0,o.wk)()],V.prototype,"viewDirection",void 0),K([(0,o.wk)()],V.prototype,"headerText",void 0),V=K([(0,b.EM)("w3m-header")],V),i(75847);let Y=(0,a.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 F=function(e,t,i,a){var o,r=arguments.length,s=r<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,a);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let G=class extends a.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,a.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,a.qy)`<wui-loading-spinner size="md" color="accent-100"></wui-loading-spinner>`:"default"===this.iconType?(0,a.qy)`<wui-icon size="xl" color=${this.iconColor} name=${this.icon}></wui-icon>`:(0,a.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>`}};G.styles=[k.W5,Y],F([(0,o.MZ)()],G.prototype,"backgroundColor",void 0),F([(0,o.MZ)()],G.prototype,"iconColor",void 0),F([(0,o.MZ)()],G.prototype,"icon",void 0),F([(0,o.MZ)()],G.prototype,"message",void 0),F([(0,o.MZ)()],G.prototype,"loading",void 0),F([(0,o.MZ)()],G.prototype,"iconType",void 0),G=F([(0,x.E)("wui-snackbar")],G);let J=(0,a.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 Q=function(e,t,i,a){var o,r=arguments.length,s=r<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,a);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let ee={loading:void 0,success:{backgroundColor:"success-100",iconColor:"success-100",icon:"checkmark"},error:{backgroundColor:"error-100",iconColor:"error-100",icon:"close"}},et=class extends a.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=>e())}render(){let{message:e,variant:t,svg:i}=f.P.state,o=ee[t],{icon:r,iconColor:s}=i??o??{};return(0,a.qy)`
322      <wui-snackbar
323        message=${e}
324        backgroundColor=${o?.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),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"})}};et.styles=J,Q([(0,o.wk)()],et.prototype,"open",void 0),et=Q([(0,b.EM)("w3m-snackbar")],et);var ei=i(61977),ea=i(32225),eo=i(59926);let er=(0,ei.BX)({message:"",open:!1,triggerRect:{width:0,height:0,top:0,left:0},variant:"shade"}),es=(0,eo.X)({state:er,subscribe:e=>(0,ei.B1)(er,()=>e(er)),subscribeKey:(e,t)=>(0,ea.u$)(er,e,t),showTooltip({message:e,triggerRect:t,variant:i}){er.open=!0,er.message=e,er.triggerRect=t,er.variant=i},hide(){er.open=!1,er.message="",er.triggerRect={width:0,height:0,top:0,left:0}}});i(58411);let en=(0,a.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 ec=function(e,t,i,a){var o,r=arguments.length,s=r<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,a);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let el=class extends a.WF{constructor(){super(),this.unsubscribe=[],this.open=es.state.open,this.message=es.state.message,this.triggerRect=es.state.triggerRect,this.variant=es.state.variant,this.unsubscribe.push(es.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,a.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>`}};el.styles=[en],ec([(0,o.wk)()],el.prototype,"open",void 0),ec([(0,o.wk)()],el.prototype,"message",void 0),ec([(0,o.wk)()],el.prototype,"triggerRect",void 0),ec([(0,o.wk)()],el.prototype,"variant",void 0),el=ec([(0,b.EM)("w3m-tooltip"),(0,b.EM)("w3m-tooltip")],el);let ew=(0,a.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 ed=function(e,t,i,a){var o,r=arguments.length,s=r<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,a);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let ep=class extends a.WF{constructor(){super(),this.resizeObserver=void 0,this.prevHeight="0px",this.prevHistoryLength=1,this.unsubscribe=[],this.view=h.I.state.view,this.viewDirection="",this.unsubscribe.push(h.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,a.qy)`<div class="w3m-router-container" view-direction="${this.viewDirection}">
472      ${this.viewTemplate()}
473    </div>`}viewTemplate(){switch(this.view){case"AccountSettings":return(0,a.qy)`<w3m-account-settings-view></w3m-account-settings-view>`;case"Account":return(0,a.qy)`<w3m-account-view></w3m-account-view>`;case"AllWallets":return(0,a.qy)`<w3m-all-wallets-view></w3m-all-wallets-view>`;case"ApproveTransaction":return(0,a.qy)`<w3m-approve-transaction-view></w3m-approve-transaction-view>`;case"BuyInProgress":return(0,a.qy)`<w3m-buy-in-progress-view></w3m-buy-in-progress-view>`;case"ChooseAccountName":return(0,a.qy)`<w3m-choose-account-name-view></w3m-choose-account-name-view>`;case"Connect":default:return(0,a.qy)`<w3m-connect-view></w3m-connect-view>`;case"Create":return(0,a.qy)`<w3m-connect-view walletGuide="explore"></w3m-connect-view>`;case"ConnectingWalletConnect":return(0,a.qy)`<w3m-connecting-wc-view></w3m-connecting-wc-view>`;case"ConnectingWalletConnectBasic":return(0,a.qy)`<w3m-connecting-wc-basic-view></w3m-connecting-wc-basic-view>`;
473case"ConnectingExternal":return(0,a.qy)`<w3m-connecting-external-view></w3m-connecting-external-view>`;case"ConnectingSiwe":return(0,a.qy)`<w3m-connecting-siwe-view></w3m-connecting-siwe-view>`;case"ConnectWallets":return(0,a.qy)`<w3m-connect-wallets-view></w3m-connect-wallets-view>`;case"ConnectSocials":return(0,a.qy)`<w3m-connect-socials-view></w3m-connect-socials-view>`;case"ConnectingSocial":return(0,a.qy)`<w3m-connecting-social-view></w3m-connecting-social-view>`;case"DataCapture":return(0,a.qy)`<w3m-data-capture-view></w3m-data-capture-view>`;case"DataCaptureOtpConfirm":return(0,a.qy)`<w3m-data-capture-otp-confirm-view></w3m-data-capture-otp-confirm-view>`;case"Downloads":return(0,a.qy)`<w3m-downloads-view></w3m-downloads-view>`;case"EmailLogin":return(0,a.qy)`<w3m-email-login-view></w3m-email-login-view>`;case"EmailVerifyOtp":return(0,a.qy)`<w3m-email-verify-otp-view></w3m-email-verify-otp-view>`;case"EmailVerifyDevice":return(0,a.qy)`<w3m-email-verify-device-view></w3m-email-verify-device-view>`;case"GetWallet":return(0,a.qy)`<w3m-get-wallet-view></w3m-get-wallet-view>`;case"Networks":return(0,a.qy)`<w3m-networks-view></w3m-networks-view>`;case"SwitchNetwork":return(0,a.qy)`<w3m-network-switch-view></w3m-network-switch-view>`;case"ProfileWallets":return(0,a.qy)`<w3m-profile-wallets-view></w3m-profile-wallets-view>`;case"Transactions":return(0,a.qy)`<w3m-transactions-view></w3m-transactions-view>`;case"OnRampProviders":return(0,a.qy)`<w3m-onramp-providers-view></w3m-onramp-providers-view>`;case"OnRampTokenSelect":return(0,a.qy)`<w3m-onramp-token-select-view></w3m-onramp-token-select-view>`;case"OnRampFiatSelect":return(0,a.qy)`<w3m-onramp-fiat-select-view></w3m-onramp-fiat-select-view>`;case"UpgradeEmailWallet":return(0,a.qy)`<w3m-upgrade-wallet-view></w3m-upgrade-wallet-view>`;case"UpdateEmailWallet":return(0,a.qy)`<w3m-update-email-wallet-view></w3m-update-email-wallet-view>`;case"UpdateEmailPrimaryOtp":return(0,a.qy)`<w3m-update-email-primary-otp-view></w3m-update-email-primary-otp-view>`;case"UpdateEmailSecondaryOtp":return(0,a.qy)`<w3m-update-email-secondary-otp-view></w3m-update-email-secondary-otp-view>`;case"UnsupportedChain":return(0,a.qy)`<w3m-unsupported-chain-view></w3m-unsupported-chain-view>`;case"Swap":return(0,a.qy)`<w3m-swap-view></w3m-swap-view>`;case"SwapSelectToken":return(0,a.qy)`<w3m-swap-select-token-view></w3m-swap-select-token-view>`;case"SwapPreview":return(0,a.qy)`<w3m-swap-preview-view></w3m-swap-preview-view>`;case"WalletSend":return(0,a.qy)`<w3m-wallet-send-view></w3m-wallet-send-view>`;case"WalletSendSelectToken":return(0,a.qy)`<w3m-wallet-send-select-token-view></w3m-wallet-send-select-token-view>`;case"WalletSendPreview":return(0,a.qy)`<w3m-wallet-send-preview-view></w3m-wallet-send-preview-view>`;case"WhatIsABuy":return(0,a.qy)`<w3m-what-is-a-buy-view></w3m-what-is-a-buy-view>`;case"WalletReceive":return(0,a.qy)`<w3m-wallet-receive-view></w3m-wallet-receive-view>`;case"WalletCompatibleNetworks":return(0,a.qy)`<w3m-wallet-compatible-networks-view></w3m-wallet-compatible-networks-view>`;case"WhatIsAWallet":return(0,a.qy)`<w3m-what-is-a-wallet-view></w3m-what-is-a-wallet-view>`;case"ConnectingMultiChain":return(0,a.qy)`<w3m-connecting-multi-chain-view></w3m-connecting-multi-chain-view>`;case"WhatIsANetwork":return(0,a.qy)`<w3m-what-is-a-network-view></w3m-what-is-a-network-view>`;case"ConnectingFarcaster":return(0,a.qy)`<w3m-connecting-farcaster-view></w3m-connecting-farcaster-view>`;case"SwitchActiveChain":return(0,a.qy)`<w3m-switch-active-chain-view></w3m-switch-active-chain-view>`;case"RegisterAccountName":return(0,a.qy)`<w3m-register-account-name-view></w3m-register-account-name-view>`;case"RegisterAccountNameSuccess":return(0,a.qy)`<w3m-register-account-name-success-view></w3m-register-account-name-success-view>`;case"SmartSessionCreated":return(0,a.qy)`<w3m-smart-session-created-view></w3m-smart-session-created-view>`;case"SmartSessionList":return(0,a.qy)`<w3m-smart-session-list-view></w3m-smart-session-list-view>`;case"SIWXSignMessage":return(0,a.qy)`<w3m-siwx-sign-message-view></w3m-siwx-sign-message-view>`;case"Pay":return(0,a.qy)`<w3m-pay-view></w3m-pay-view>`;case"PayLoading":return(0,a.qy)`<w3m-pay-loading-view></w3m-pay-loading-view>`}}onViewChange(e){es.hide();let t=L.o.VIEW_DIRECTION.Next,{history:i}=h.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")}};ep.styles=ew,ed([(0,o.wk)()],ep.prototype,"view",void 0),ed([(0,o.wk)()],ep.prototype,"viewDirection",void 0),ep=ed([(0,b.EM)("w3m-router")],ep);let eu=(0,a.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 eh=function(e,t,i,a){var o,r=arguments.length,s=r<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,a);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let em="scroll-lock";class ev extends a.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=w.W.state.activeCaipAddress,this.caipNetwork=w.W.state.activeCaipNetwork,this.shake=l.W.state.shake,this.filterByNamespace=d.a.state.filterByNamespace,this.initializeTheming(),p.N.prefetchAnalyticsConfig(),this.unsubscribe.push(l.W.subscribeKey("open",e=>e?this.onOpen():this.onClose()),l.W.subscribeKey("shake",e=>this.shake=e),w.W.subscribeKey("activeCaipNetwork",e=>this.onNewNetwork(e)),w.W.subscribeKey("activeCaipAddress",e=>this.onNewAddress(e)),c.H.subscribeKey("enableEmbedded",e=>this.enableEmbedded=e),d.a.subscribeKey("filterByNamespace",e=>{this.filterByNamespace===e||w.W.getAccountData(e)?.caipAddress||(p.N.fetchRecommendedWallets(),this.filterByNamespace=e)}))}firstUpdated(){if(this.caipAddress){if(this.enableEmbedded){l.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,a.qy)`${this.contentTemplate()}
616        <w3m-tooltip></w3m-tooltip> `:this.open?(0,a.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,a.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 v.safeClose()}initializeTheming(){let{themeVariables:e,themeMode:t}=g.W.state,i=b.Zv.getColorTheme(t);(0,b.RF)(e,i)}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(){let e=document.createElement("style");e.dataset.w3m=em,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="${em}"]`);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=w.W.state.isSwitchingNamespace,i="ProfileWallets"===h.I.state.view;e?await this.onConnected({caipAddress:e,isSwitchingNamespace:t,isInProfileView:i}):t||this.enableEmbedded||i||l.W.close(),await m.U.initializeIfEnabled(e),this.caipAddress=e,w.W.setIsSwitchingNamespace(!1)}async onConnected(e){if(e.isInProfileView)return;let{chainNamespace:t,chainId:i,address:a}=s.C.parseCaipAddress(e.caipAddress),o=`${t}:${i}`,r=!y.w.getPlainAddress(this.caipAddress),n=await m.U.getSessions({address:a,caipNetworkId:o}),c=!m.U.getSIWX()||n.some(e=>e.data.accountAddress===a),w=e.isSwitchingNamespace&&c&&!this.enableEmbedded,d=this.enableEmbedded&&r;w?h.I.goBack():d&&l.W.close()}onNewNetwork(e){let t=this.caipNetwork,i=t?.caipNetworkId?.toString(),a=t?.chainNamespace,o=e?.caipNetworkId?.toString(),r=e?.chainNamespace,s=i!==o,c=t?.name===n.o.UNSUPPORTED_NETWORK_NAME,d="ConnectingExternal"===h.I.state.view,p="ProfileWallets"===h.I.state.view,u=!w.W.getAccountData(e?.chainNamespace)?.caipAddress,m="UnsupportedChain"===h.I.state.view,v=l.W.state.open,g=!1;this.enableEmbedded&&"SwitchNetwork"===h.I.state.view&&(g=!0),v&&!d&&!p&&(u?s&&(g=!0):m?g=!0:s&&a===r&&!c&&(g=!0)),g&&"SIWXSignMessage"!==h.I.state.view&&h.I.goBack(),this.caipNetwork=e}prefetch(){this.hasPrefetched||(p.N.prefetch(),p.N.fetchWalletsByPage({page:1}),this.hasPrefetched=!0)}}ev.styles=eu,eh([(0,o.MZ)({type:Boolean})],ev.prototype,"enableEmbedded",void 0),eh([(0,o.wk)()],ev.prototype,"open",void 0),eh([(0,o.wk)()],ev.prototype,"caipAddress",void 0),eh([(0,o.wk)()],ev.prototype,"caipNetwork",void 0),eh([(0,o.wk)()],ev.prototype,"shake",void 0),eh([(0,o.wk)()],ev.prototype,"filterByNamespace",void 0);let eg=class extends ev{};eg=eh([(0,b.EM)("w3m-modal")],eg);let ef=class extends ev{};ef=eh([(0,b.EM)("appkit-modal")],ef)},34956:(e,t,i)=>{i.d(t,{Rt:()=>r,sO:()=>o});let{I:a}=i(39482).ge,o=e=>null===e||"object"!=typeof e&&"function"!=typeof e,r=e=>void 0===e.strings},61258:(e,t,i)=>{i.d(t,{J:()=>
642o});var a=i(39482);let o=e=>e??a.s6},85777:(e,t,i)=>{i.d(t,{Kq:()=>d});var a=i(34956),o=i(24764);let r=(e,t)=>{let i=e._$AN;if(void 0===i)return!1;for(let e of i)e._$AO?.(t,!1),r(e,t);return!0},s=e=>{let t,i;do{if(void 0===(t=e._$AM))break;(i=t._$AN).delete(e),e=t}while(0===i?.size)},n=e=>{for(let t;t=e._$AM;e=t){let i=t._$AN;if(void 0===i)t._$AN=i=new Set;else if(i.has(e))break;i.add(e),w(t)}};function c(e){void 0!==this._$AN?(s(this),this._$AM=e,n(this)):this._$AM=e}function l(e,t=!1,i=0){let a=this._$AH,o=this._$AN;if(void 0!==o&&0!==o.size)if(t)if(Array.isArray(a))for(let e=i;e<a.length;e++)r(a[e],!1),s(a[e]);else null!=a&&(r(a,!1),s(a));else r(this,e)}let w=e=>{e.type==o.OA.CHILD&&(e._$AP??=l,e._$AQ??=c)};class d extends o.WL{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,i){super._$AT(e,t,i),n(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(r(this,e),s(this))}setValue(e){if((0,a.Rt)(this._$Ct))this._$Ct._$AI(e,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}}},92313:(e,t,i)=>{i.d(t,{H:()=>r});var a=i(39482),o=i(24764);let r=(0,o.u$)(class extends o.WL{constructor(e){if(super(e),e.type!==o.OA.ATTRIBUTE||"class"!==e.name||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){if(void 0===this.st){for(let i in this.st=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter(e=>""!==e))),t)t[i]&&!this.nt?.has(i)&&this.st.add(i);return this.render(t)}let i=e.element.classList;for(let e of this.st)e in t||(i.remove(e),this.st.delete(e));for(let e in t){let a=!!t[e];a===this.st.has(e)||this.nt?.has(e)||(a?(i.add(e),this.st.add(e)):(i.remove(e),this.st.delete(e)))}return a.c0}})}}]);

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.