PageSourceSearch

https://shapeshift.com/_next/static/chunks/8309.59957fae8d29ae45.js

js shapeshift.com collected 2026-09-24 09:10:24 UTC 42,873 bytes, 765 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8309],{26208:(e,t,i)=>{var n=i(83138),r=i(98410),o=i(99865),a=i(20296),s=i(71084),l=i(8821),c=i(47327);let u=(0,a.AH)`
2  :host {
3    position: relative;
4    display: inline-block;
5  }
6
7  :host([data-error='true']) > input {
8    color: ${({tokens:e})=>e.core.textError};
9  }
10
11  :host([data-error='false']) > input {
12    color: ${({tokens:e})=>e.theme.textPrimary};
13  }
14
15  input {
16    background: transparent;
17    height: auto;
18    box-sizing: border-box;
19    color: ${({tokens:e})=>e.theme.textPrimary};
20    font-feature-settings: 'case' on;
21    font-size: ${({textSize:e})=>e.h4};
22    caret-color: ${({tokens:e})=>e.core.backgroundAccentPrimary};
23    line-height: ${({typography:e})=>e["h4-regular-mono"].lineHeight};
24    letter-spacing: ${({typography:e})=>e["h4-regular-mono"].letterSpacing};
25    -webkit-appearance: none;
26    -moz-appearance: textfield;
27    padding: 0px;
28    font-family: ${({fontFamily:e})=>e.mono};
29  }
30
31  :host([data-width-variant='auto']) input {
32    width: 100%;
33  }
34
35  :host([data-width-variant='fit']) input {
36    width: 1ch;
37  }
38
39  .wui-input-amount-fit-mirror {
40    position: absolute;
41    visibility: hidden;
42    white-space: pre;
43    font-size: var(--local-font-size);
44    line-height: 130%;
45    letter-spacing: -1.28px;
46    font-family: ${({fontFamily:e})=>e.mono};
47  }
48
49  .wui-input-amount-fit-width {
50    display: inline-block;
51    position: relative;
52  }
53
54  input::-webkit-outer-spin-button,
55  input::-webkit-inner-spin-button {
56    -webkit-appearance: none;
57    margin: 0;
58  }
59
60  input::placeholder {
61    color: ${({tokens:e})=>e.theme.textSecondary};
62  }
63`;var d=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let h=class extends n.WF{constructor(){super(...arguments),this.inputElementRef=(0,o._)(),this.disabled=!1,this.value="",this.placeholder="0",this.widthVariant="auto",this.maxDecimals=void 0,this.maxIntegers=void 0,this.fontSize="h4",this.error=!1}firstUpdated(){this.resizeInput()}updated(){this.style.setProperty("--local-font-size",a.f.textSize[this.fontSize]),this.resizeInput()}render(){return(this.dataset.widthVariant=this.widthVariant,this.dataset.error=String(this.error),this.inputElementRef?.value&&this.value&&(this.inputElementRef.value.value=this.value),"auto"===this.widthVariant)?this.inputTemplate():(0,n.qy)`
64      <div class="wui-input-amount-fit-width">
65        <span class="wui-input-amount-fit-mirror"></span>
66        ${this.inputTemplate()}
67      </div>
68    `}inputTemplate(){return(0,n.qy)`<input
69      ${(0,o.K)(this.inputElementRef)}
70      type="text"
71      inputmode="decimal"
72      pattern="[0-9,.]*"
73      placeholder=${this.placeholder}
74      ?disabled=${this.disabled}
75      autofocus
76      value=${this.value??""}
77      @input=${this.dispatchInputChangeEvent.bind(this)}
78    />`}dispatchInputChangeEvent(){this.inputElementRef.value&&(this.inputElementRef.value.value=l.Z.maskInput({value:this.inputElementRef.value.value,decimals:this.maxDecimals,integers:this.maxIntegers}),this.dispatchEvent(new CustomEvent("inputChange",{detail:this.inputElementRef.value.value,bubbles:!0,composed:!0})),this.resizeInput())}resizeInput(){if("fit"===this.widthVariant){let e=this.inputElementRef.value;if(e){let t=e.previousElementSibling;t&&(t.textContent=e.value||"0",e.style.width=`${t.offsetWidth}px`)}}}};h.styles=[s.W5,s.fD,u],d([(0,r.MZ)({type:Boolean})],h.prototype,"disabled",void 0),d([(0,r.MZ)({type:String})],h.prototype,"value",void 0),d([(0,r.MZ)({type:String})],h.prototype,"placeholder",void 0),d([(0,r.MZ)({type:String})],h.prototype,"widthVariant",void 0),d([(0,r.MZ)({type:Number})],h.prototype,"maxDecimals",void 0),d([(0,r.MZ)({type:Number})],h.prototype,"maxIntegers",void 0),d([(0,r.MZ)({type:String})],h.prototype,"fontSize",void 0),d([(0,r.MZ)({type:Boolean})],h.prototype,"error",void 0),h=d([(0,c.E)("wui-input-amount")],h)},28309:(e,t,i)=>{i.r(t),i.d(t,{W3mSendConfirmedView:()=>Q,W3mSendSelectTokenView:()=>N,W3mWalletSendPreviewView:()=>Y,W3mWalletSendView:()=>E});var n=i(83138),r=i(98410),o=i(89801),a=i(25654),s=i(67869),l=i(93481),c=i(24836),u=i(81701),d=i(3824),h=i(12319),p=i(65374),f=i(28977),m=i(14744),g=i(30982),w=i(36211);i(41028),i(40575),i(90721),i(39752);var y=i(99865);i(77237),i(41163);let v=(0,w.AH)`
79  :host {
80    width: 100%;
81    height: 100px;
82    border-radius: ${({borderRadius:e})=>e["5"]};
83    border: 1px solid ${({tokens:e})=>e.theme.foregroundPrimary};
84    background-color: ${({tokens:e})=>e.theme.foregroundPrimary};
85    transition: background-color ${({durations:e})=>e.lg}
86      ${({easings:e})=>e["ease-out-power-1"]};
87    will-change: background-color;
88    position: relative;
89  }
90
91  :host(:hover) {
92    background-color: ${({tokens:e})=>e.theme.foregroundSecondary};
93  }
94
95  wui-flex {
96    width: 100%;
97    height: fit-content;
98  }
99
100  wui-button {
101    display: ruby;
102    color: ${({tokens:e})=>e.theme.textPrimary};
103    margin: 0 ${({spacing:e})=>e["2"]};
104  }
105
106  .instruction {
107    position: absolute;
108    top: 50%;
109    transform: translateY(-50%);
110    z-index: 2;
111  }
112
113  .paste {
114    display: inline-flex;
115  }
116
117  textarea {
118    background: transparent;
119    width: 100%;
120    font-family: ${({fontFamily:e})=>e.regular};
121    font-style: normal;
122    font-size: ${({textSize:e})=>e.large};
123    font-weight: ${({fontWeight:e})=>e.regular};
124    line-height: ${({typography:e})=>e["lg-regular"].lineHeight};
125    letter-spacing: ${({typography:e})=>e["lg-regular"].letterSpacing};
126    color: ${({tokens:e})=>e.theme.textPrimary};
127    caret-color: ${({tokens:e})=>e.core.backgroundAccentPrimary};
128    box-sizing: border-box;
129    -webkit-appearance: none;
130    -moz-appearance: textfield;
131    padding: 0px;
132    border: none;
133    outline: none;
134    appearance: none;
135    resize: none;
136    overflow: hidden;
137  }
138`;var x=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let b=class extends n.WF{constructor(){super(...arguments),this.inputElementRef=(0,y._)(),this.instructionElementRef=(0,y._)(),this.readOnly=!1,this.instructionHidden=!!this.value,this.pasting=!1,this.onDebouncedSearch=h.w.debounce(async e=>{if(!e.length)return void this.setReceiverAddress("");let t=l.W.state.activeChain;if(h.w.isAddress(e,t))return void this.setReceiverAddress(e);try{let t=await d.x.getEnsAddress(e);if(t){a.R.setReceiverProfileName(e),a.R.setReceiverAddress(t);let i=await d.x.getEnsAvatar(e);a.R.setReceiverProfileImageUrl(i||void 0)}}catch(t){this.setReceiverAddress(e)}finally{a.R.setLoading(!1)}})}firstUpdated(){this.value&&(this.instructionHidden=!0),this.checkHidden()}render(){return this.readOnly?(0,n.qy)` <wui-flex
139        flexDirection="column"
140        justifyContent="center"
141        gap="01"
142        .padding=${["8","4","5","4"]}
143      >
144        <textarea
145          spellcheck="false"
146          ?disabled=${!0}
147          autocomplete="off"
148          .value=${this.value??""}
149        ></textarea>
150      </wui-flex>`:(0,n.qy)` <wui-flex
151      @click=${this.onBoxClick.bind(this)}
152      flexDirection="column"
153      justifyContent="center"
154      gap="01"
155      .padding=${["8","4","5","4"]}
156    >
157      <wui-text
158        ${(0,y.K)(this.instructionElementRef)}
159        class="instruction"
160        color="secondary"
161        variant="md-medium"
162      >
163        Type or
164        <wui-button
165          class="paste"
166          size="md"
167          variant="neutral-secondary"
168          iconLeft="copy"
169          @click=${this.onPasteClick.bind(this)}
170        >
171          <wui-icon size="sm" color="inherit" slot="iconLeft" name="copy"></wui-icon>
172          Paste
173        </wui-button>
173
174        address
175      </wui-text>
176      <textarea
177        spellcheck="false"
178        ?disabled=${!this.instructionHidden}
179        ${(0,y.K)(this.inputElementRef)}
180        @input=${this.onInputChange.bind(this)}
181        @blur=${this.onBlur.bind(this)}
182        .value=${this.value??""}
183        autocomplete="off"
184      ></textarea>
185    </wui-flex>`}async focusInput(){this.instructionElementRef.value&&(this.instructionHidden=!0,await this.toggleInstructionFocus(!1),this.instructionElementRef.value.style.pointerEvents="none",this.inputElementRef.value?.focus(),this.inputElementRef.value&&(this.inputElementRef.value.selectionStart=this.inputElementRef.value.selectionEnd=this.inputElementRef.value.value.length))}async focusInstruction(){this.instructionElementRef.value&&(this.instructionHidden=!1,await this.toggleInstructionFocus(!0),this.instructionElementRef.value.style.pointerEvents="auto",this.inputElementRef.value?.blur())}async toggleInstructionFocus(e){this.instructionElementRef.value&&await this.instructionElementRef.value.animate([{opacity:+!e},{opacity:+!!e}],{duration:100,easing:"ease",fill:"forwards"}).finished}onBoxClick(){this.value||this.instructionHidden||this.focusInput()}onBlur(){this.value||!this.instructionHidden||this.pasting||this.focusInstruction()}checkHidden(){this.instructionHidden&&this.focusInput()}async onPasteClick(){this.pasting=!0;let e=await navigator.clipboard.readText();a.R.setReceiverAddress(e),this.focusInput()}onInputChange(e){let t=e.target;this.pasting=!1,this.value=e.target?.value,t.value&&!this.instructionHidden&&this.focusInput(),a.R.setLoading(!0),this.onDebouncedSearch(t.value)}setReceiverAddress(e){a.R.setReceiverAddress(e),a.R.setReceiverProfileName(void 0),a.R.setReceiverProfileImageUrl(void 0),a.R.setLoading(!1)}};b.styles=v,x([(0,r.MZ)()],b.prototype,"value",void 0),x([(0,r.MZ)({type:Boolean})],b.prototype,"readOnly",void 0),x([(0,r.wk)()],b.prototype,"instructionHidden",void 0),x([(0,r.wk)()],b.prototype,"pasting",void 0),b=x([(0,w.EM)("w3m-input-address")],b),i(26208),i(48352),i(42103);let k=(0,w.AH)`
186  :host {
187    width: 100%;
188    height: 100px;
189    border-radius: ${({borderRadius:e})=>e["5"]};
190    border: 1px solid ${({tokens:e})=>e.theme.foregroundPrimary};
191    background-color: ${({tokens:e})=>e.theme.foregroundPrimary};
192    transition: background-color ${({durations:e})=>e.lg}
193      ${({easings:e})=>e["ease-out-power-1"]};
194    will-change: background-color;
195    transition: all ${({easings:e})=>e["ease-out-power-1"]}
196      ${({durations:e})=>e.lg};
197  }
198
199  :host(:hover) {
200    background-color: ${({tokens:e})=>e.theme.foregroundSecondary};
201  }
202
203  wui-flex {
204    width: 100%;
205    height: fit-content;
206  }
207
208  wui-button {
209    width: 100%;
210    display: flex;
211    justify-content: flex-end;
212  }
213
214  wui-input-amount {
215    mask-image: linear-gradient(
216      270deg,
217      transparent 0px,
218      transparent 8px,
219      black 24px,
220      black 25px,
221      black 32px,
222      black 100%
223    );
224  }
225
226  .totalValue {
227    width: 100%;
228  }
229`;var $=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let R=class extends n.WF{constructor(){super(...arguments),this.readOnly=!1,this.isInsufficientBalance=!1}render(){let e=this.readOnly||!this.token;return(0,n.qy)` <wui-flex
230      flexDirection="column"
231      gap="01"
232      .padding=${["5","3","4","3"]}
233    >
234      <wui-flex alignItems="center">
235        <wui-input-amount
236          @inputChange=${this.onInputChange.bind(this)}
237          ?disabled=${e}
238          .value=${this.sendTokenAmount??""}
239          ?error=${!!this.isInsufficientBalance}
240        ></wui-input-amount>
241        ${this.buttonTemplate()}
242      </wui-flex>
243      ${this.bottomTemplate()}
244    </wui-flex>`}buttonTemplate(){return this.token?(0,n.qy)`<wui-token-button
245        text=${this.token.symbol}
246        imageSrc=${this.token.iconUrl}
247        @click=${this.handleSelectButtonClick.bind(this)}
248      >
249      </wui-token-button>
249`:(0,n.qy)`<wui-button
250      size="md"
251      variant="neutral-secondary"
252      @click=${this.handleSelectButtonClick.bind(this)}
253      >Select token</wui-button
254    >`}handleSelectButtonClick(){this.readOnly||s.I.push("WalletSendSelectToken")}sendValueTemplate(){if(!this.readOnly&&this.token&&this.sendTokenAmount){let e=this.token.price*Number(this.sendTokenAmount);return(0,n.qy)`<wui-text class="totalValue" variant="sm-regular" color="secondary"
255        >${e?`$${o.S.formatNumberToLocalString(e,2)}`:"Incorrect value"}</wui-text
256      >`}return null}maxAmountTemplate(){return this.token?(0,n.qy)` <wui-text variant="sm-regular" color="secondary">
257        ${w.Zv.roundNumber(Number(this.token.quantity.numeric),6,5)}
258      </wui-text>`:null}actionTemplate(){return this.token?(0,n.qy)`<wui-link @click=${this.onMaxClick.bind(this)}>Max</wui-link>`:null}bottomTemplate(){return this.readOnly?null:(0,n.qy)`<wui-flex alignItems="center" justifyContent="space-between">
259      ${this.sendValueTemplate()}
260      <wui-flex alignItems="center" gap="01" justifyContent="flex-end">
261        ${this.maxAmountTemplate()} ${this.actionTemplate()}
262      </wui-flex>
263    </wui-flex>`}onInputChange(e){a.R.setTokenAmount(String(e.detail))}onMaxClick(){if(this.token){let e=Number(this.token.quantity.decimals),t=o.S.bigNumber(this.token.quantity.numeric);if(!this.token.address&&this.gasPrice){let i=65000n*BigInt(this.gasPrice),n=o.S.bigNumber(i.toString()).div(o.S.bigNumber(10).pow(e)),r=t.minus(n);a.R.setTokenAmount(r.gt(0)?r.toFixed(e,0):"0")}else a.R.setTokenAmount(t.toFixed(e,0))}}};R.styles=k,$([(0,r.MZ)({type:Object})],R.prototype,"token",void 0),$([(0,r.MZ)({type:Boolean})],R.prototype,"readOnly",void 0),$([(0,r.MZ)({type:String})],R.prototype,"sendTokenAmount",void 0),$([(0,r.MZ)({type:Boolean})],R.prototype,"isInsufficientBalance",void 0),$([(0,r.MZ)({type:String})],R.prototype,"gasPrice",void 0),R=$([(0,w.EM)("w3m-input-token")],R);let S=(0,w.AH)`
264  :host {
265    display: block;
266  }
267
268  wui-flex {
269    position: relative;
270  }
271
272  wui-icon-box {
273    width: 32px;
274    height: 32px;
275    border-radius: ${({borderRadius:e})=>e["10"]} !important;
276    border: 4px solid ${({tokens:e})=>e.theme.backgroundPrimary};
277    background: ${({tokens:e})=>e.theme.foregroundPrimary};
278    position: absolute;
279    top: 50%;
280    left: 50%;
281    transform: translate(-50%, -50%);
282    z-index: 3;
283  }
284
285  wui-button {
286    --local-border-radius: ${({borderRadius:e})=>e["4"]} !important;
287  }
288
289  .inputContainer {
290    height: fit-content;
291  }
292`;var A=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let T={INSUFFICIENT_FUNDS:"Insufficient Funds",INCORRECT_VALUE:"Incorrect Value",INVALID_ADDRESS:"Invalid Address",ADD_ADDRESS:"Add Address",ADD_AMOUNT:"Add Amount",SELECT_TOKEN:"Select Token",PREVIEW_SEND:"Preview Send"},E=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.isTryingToChooseDifferentWallet=!1,this.token=a.R.state.token,this.sendTokenAmount=a.R.state.sendTokenAmount,this.receiverAddress=a.R.state.receiverAddress,this.receiverProfileName=a.R.state.receiverProfileName,this.loading=a.R.state.loading,this.params=s.I.state.data?.send,this.caipAddress=l.W.getAccountData()?.caipAddress,this.disconnecting=!1,this.gasFee=c.GN.state.gasFee,this.token&&!this.params&&(this.fetchBalances(),this.fetchNetworkPrice());let e=l.W.subscribeKey("activeCaipAddress",t=>{!t&&this.isTryingToChooseDifferentWallet&&(this.isTryingToChooseDifferentWallet=!1,u.W.open({view:"Connect",data:{redirectView:"WalletSend"}}).catch(()=>null),e())});this.unsubscribe.push(l.W.subscribeAccountStateProp("caipAddress",e=>{this.caipAddress=e}),a.R.subscribe(e=>{this.token=e.token,this.sendTokenAmount=e.sendTokenAmount,this.receiverAddress=e.receiverAddress,this.receiverProfileName=e.receiverProfileName,this.loading=e.loading}),c.GN.subscribeKey("gasFee",e=>{this.gasFee=e}))}
292disconnectedCallback(){this.unsubscribe.forEach(e=>e())}async firstUpdated(){await this.handleSendParameters()}render(){let e=this.getMessage(),t=!!this.params;return(0,n.qy)` <wui-flex flexDirection="column" .padding=${["0","4","4","4"]}>
293      <wui-flex class="inputContainer" gap="2" flexDirection="column">
294        <w3m-input-token
295          .token=${this.token}
296          .sendTokenAmount=${this.sendTokenAmount}
297          .gasPrice=${this.gasFee}
298          ?readOnly=${t}
299          ?isInsufficientBalance=${e===T.INSUFFICIENT_FUNDS}
300        ></w3m-input-token>
301        <wui-icon-box size="md" variant="secondary" icon="arrowBottom"></wui-icon-box>
302        <w3m-input-address
303          ?readOnly=${t}
304          .value=${this.receiverProfileName?this.receiverProfileName:this.receiverAddress}
305        ></w3m-input-address>
306      </wui-flex>
307      ${this.buttonTemplate(e)}
308    </wui-flex>`}async fetchBalances(){await a.R.fetchTokenBalance(),a.R.fetchNetworkBalance()}async fetchNetworkPrice(){await c.GN.getNetworkTokenPrice(),await c.GN.getInitialGasPrice()}onButtonClick(){s.I.push("WalletSendPreview",{send:this.params})}onFundWalletClick(){s.I.push("FundWallet",{redirectView:"WalletSend"})}async onConnectDifferentWalletClick(){try{this.isTryingToChooseDifferentWallet=!0,this.disconnecting=!0,await d.x.disconnect()}finally{this.disconnecting=!1}}getMessage(){return this.token?this.sendTokenAmount?this.token.price&&!(Number(this.sendTokenAmount)*this.token.price)?T.INCORRECT_VALUE:o.S.bigNumber(this.sendTokenAmount).gt(this.token.quantity.numeric)?T.INSUFFICIENT_FUNDS:this.receiverAddress?h.w.isAddress(this.receiverAddress,l.W.state.activeChain)?T.PREVIEW_SEND:T.INVALID_ADDRESS:T.ADD_ADDRESS:T.ADD_AMOUNT:T.SELECT_TOKEN}buttonTemplate(e){let t=!e.startsWith(T.PREVIEW_SEND),i=e===T.INSUFFICIENT_FUNDS,r=!!this.params;return i&&!r?(0,n.qy)`
309        <wui-flex .margin=${["4","0","0","0"]} flexDirection="column" gap="4">
310          <wui-button
311            @click=${this.onFundWalletClick.bind(this)}
312            size="lg"
313            variant="accent-secondary"
314            fullWidth
315          >
316            Fund Wallet
317          </wui-button>
318
319          <wui-separator data-testid="wui-separator" text="or"></wui-separator>
320
321          <wui-button
322            @click=${this.onConnectDifferentWalletClick.bind(this)}
323            size="lg"
324            variant="neutral-secondary"
325            fullWidth
326            ?loading=${this.disconnecting}
327          >
328            Connect a different wallet
329          </wui-button>
330        </wui-flex>
331      `:(0,n.qy)`<wui-flex .margin=${["4","0","0","0"]}>
332      <wui-button
333        @click=${this.onButtonClick.bind(this)}
334        ?disabled=${t}
335        size="lg"
336        variant="accent-primary"
337        ?loading=${this.loading}
338        fullWidth
339      >
340        ${e}
341      </wui-button>
342    </wui-flex>`}async handleSendParameters(){if(this.loading=!0,!this.params){this.loading=!1;return}let e=Number(this.params.amount);if(isNaN(e)){p.P.showError("Invalid amount"),this.loading=!1;return}let{namespace:t,chainId:i,assetAddress:n}=this.params;if(!f.oU.SEND_PARAMS_SUPPORTED_CHAINS.includes(t)){p.P.showError(`Chain "${t}" is not supported for send parameters`),this.loading=!1;return}let r=l.W.getCaipNetworkById(i,t);if(!r){p.P.showError(`Network with id "${i}" not found`),this.loading=!1;return}try{let{balance:t,name:i,symbol:o,decimals:s}=await g.Z.fetchERC20Balance({caipAddress:this.caipAddress,assetAddress:n,caipNetwork:r});if(!i||!o||!s||!t)return void p.P.showError("Token not found");a.R.setToken({name:i,symbol:o,chainId:r.id.toString(),address:`${r.chainNamespace}:${r.id}:${n}`,value:0,price:0,quantity:{decimals:s.toString(),numeric:t.toString()},iconUrl:m.$.getTokenImage(o)??""}),a.R.setTokenAmount(String(e)),a.R.setReceiverAddress(this.params.to)}catch(e){console.error("Failed to load token information:",e),p.P.showError("Failed to load token information")}finally{this.loading=!1}}};E.styles=S,A([(0,r.wk)()],E.prototype,"token",void 0),A([(0,r.wk)()],E.prototype,"sendTokenAmount",void 0),A([(0,r.wk)()],E.prototype,"receiverAddress",void 0),A([(0,r.wk)()],E.prototype,"receiverProfileName",void 0),A([(0,r.wk)()],E.prototype,"loading",void 0),A([(0,r.wk)()],E.prototype,"params",void 0),A([(0,r.wk)()],E.prototype,"caipAddress",void 0),A([(0,r.wk)()],E.prototype,"disconnecting",void 0),A([(0,r.wk)()],E.prototype,"gasFee",void 0),E=A([(0,w.EM)("w3m-wallet-send-view")],E),i(40284),i(64501);let P=(0,w.AH)`
343  .contentContainer {
344    height: 440px;
345    overflow: scroll;
346    scrollbar-width: none;
347  }
348
349  .contentContainer::-webkit-scrollbar {
350    display: none;
351  }
352
353  wui-icon-box {
354    width: 40px;
355    height: 40px;
356    border-radius: ${({borderRadius:e})=>e["3"]};
357  }
358`;var C=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let N=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.tokenBalances=a.R.state.tokenBalances,this.search="",this.onDebouncedSearch=h.w.debounce(e=>{this.search=e}),this.fetchBalancesAndNetworkPrice(),this.unsubscribe.push(a.R.subscribe(e=>{this.tokenBalances=e.tokenBalances}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,n.qy)`
359      <wui-flex flexDirection="column">
360        ${this.templateSearchInput()} <wui-separator></wui-separator> ${this.templateTokens()}
361      </wui-flex>
362    `}async fetchBalancesAndNetworkPrice(){this.tokenBalances&&this.tokenBalances?.length!==0||(await this.fetchBalances(),await this.fetchNetworkPrice())}async fetchBalances(){await a.R.fetchTokenBalance(),a.R.fetchNetworkBalance()}async fetchNetworkPrice(){await c.GN.getNetworkTokenPrice()}templateSearchInput(){return(0,n.qy)`
363      <wui-flex gap="2" padding="3">
364        <wui-input-text
365          @inputChange=${this.onInputChange.bind(this)}
366          class="network-search-input"
367          size="sm"
368          placeholder="Search token"
369          icon="search"
370        ></wui-input-text>
371      </wui-flex>
372    `}templateTokens(){return this.tokens=this.tokenBalances?.filter(e=>e.chainId===l.W.state.activeCaipNetwork?.caipNetworkId),this.search?this.filteredTokens=this.tokenBalances?.filter(e=>e.name.toLowerCase().includes(this.search.toLowerCase())):this.filteredTokens=this.tokens,(0,n.qy)`
373      <wui-flex
374        class="contentContainer"
375        flexDirection="column"
376        .padding=${["0","3","0","3"]}
377      >
378        <wui-flex justifyContent="flex-start" .padding=${["4","3","3","3"]}>
379          <wui-text variant="md-medium" color="secondary">Your tokens</wui-text>
380        </wui-flex>
381        <wui-flex flexDirection="column" gap="2">
382          ${this.filteredTokens&&this.filteredTokens.length>0?this.filteredTokens.map(e=>(0,n.qy)`<wui-list-token
383                    @click=${this.handleTokenClick.bind(this,e)}
384                    ?clickable=${!0}
385                    tokenName=${e.name}
386                    tokenImageUrl=${e.iconUrl}
387                    tokenAmount=${e.quantity.numeric}
388                    tokenValue=${e.value}
389                    tokenCurrency=${e.symbol}
390                  ></wui-list-token>`):(0,n.qy)`<wui-flex
391                .padding=${["20","0","0","0"]}
392                alignItems="center"
393                flexDirection="column"
394                gap="4"
395              >
396                <wui-icon-box icon="coinPlaceholder" color="default" size="lg"></wui-icon-box>
397                <wui-flex
398                  class="textContent"
399                  gap="2"
400                  flexDirection="column"
401                  justifyContent="center"
402                  flexDirection="column"
403                >
404                  <wui-text variant="lg-medium" align="center" color="primary">
405                    No tokens found
406                  </wui-text>
407                  <wui-text variant="lg-regular" align="center" color="secondary">
408                    Your tokens will appear here
409                  </wui-text>
410                </wui-flex>
411                <wui-link @click=${this.onBuyClick.bind(this)}>Buy</wui-link>
412              </wui-flex>`}
413        </wui-flex>
414      </wui-flex>
415    `}onBuyClick(){s.I.push("OnRampProviders")}onInputChange(e){this.onDebouncedSearch(e.detail)}handleTokenClick(e){a.R.setToken(e),a.R.setTokenAmount(void 0),s.I.goBack()}};N.styles=P,C([(0,r.wk)()],N.prototype,"tokenBalances",void 0),C([(0,r.wk)()],N.prototype,"tokens",void 0),C([(0,r.wk)()],N.prototype,"filteredTokens",void 0),C([(0,r.wk)()],N.prototype,"search",void 0),N=C([(0,w.EM)("w3m-wallet-send-select-token-view")],N);var I=i(79530),D=i(36964),O=i(70417);i(91404),i(45166),i(24772),i(38534);var z=i(71084),W=i(47327);i(1418);var B=i(20296);let j=(0,B.AH)`
416  :host {
417    height: 32px;
418    display: flex;
419    align-items: center;
420    gap: ${({spacing:e})=>e[1]};
421    border-radius: ${({borderRadius:e})=>e[32]};
422    background-color: ${({tokens:e})=>e.theme.foregroundPrimary};
423    padding: ${({spacing:e})=>e[1]};
424    padding-left: ${({spacing:e})=>e[2]};
425  }
426
427  wui-avatar,
428  wui-image {
429    width: 24px;
430    height: 24px;
431    border-radius: ${({borderRadius:e})=>e[16]};
432  }
433
434  wui-icon {
435    border-radius: ${({borderRadius:e})=>e[16]};
436  }
437`;var M=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let q=class extends n.WF{constructor(){super(...arguments),this.text=""}render(){return(0,n.qy)`<wui-text variant="lg-regular" color="primary">${this.text}</wui-text>
438      ${this.imageTemplate()}`}imageTemplate(){return this.address?(0,n.qy)`<wui-avatar address=${this.address} .imageSrc=${this.imageSrc}></wui-avatar>`:this.imageSrc?(0,n.qy)`<wui-image src=${this.imageSrc}></wui-image>`:(0,n.qy)`<wui-icon size="lg" color="inverse" name="networkPlaceholder"></wui-icon>`}};q.styles=[z.W5,z.fD,j],M([(0,r.MZ)({type:String})],q.prototype,"text",void 0),M([(0,r.MZ)({type:String})],q.prototype,"address",void 0),M([(0,r.MZ)({type:String})],q.prototype,"imageSrc",void 0),q=M([(0,W.E)("wui-preview-item")],q);var F=i(78964);let _=(0,B.AH)`
439  :host {
440    display: flex;
441    padding: ${({spacing:e})=>e[4]} ${({spacing:e})=>e[3]};
442    width: 100%;
443    background-color: ${({tokens:e})=>e.theme.foregroundPrimary};
444    border-radius: ${({borderRadius:e})=>e[4]};
445  }
446
447  wui-image {
448    width: 20px;
449    height: 20px;
450    border-radius: ${({borderRadius:e})=>e[16]};
451  }
452
453  wui-icon {
454    width: 20px;
455    height: 20px;
456  }
457`;var Z=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let V=class extends n.WF{constructor(){super(...arguments),this.imageSrc=void 0,this.textTitle="",this.textValue=void 0}render(){return(0,n.qy)`
458      <wui-flex justifyContent="space-between" alignItems="center">
459        <wui-text variant="lg-regular" color="primary"> ${this.textTitle} </wui-text>
460        ${this.templateContent()}
461      </wui-flex>
462    `}templateContent(){return this.imageSrc?(0,n.qy)`<wui-image src=${this.imageSrc} alt=${this.textTitle}></wui-image>`:this.textValue?(0,n.qy)` <wui-text variant="md-regular" color="secondary"> ${this.textValue} </wui-text>`:(0,n.qy)`<wui-icon size="inherit" color="default" name="networkPlaceholder"></wui-icon>`}};V.styles=[z.W5,z.fD,_],Z([(0,r.MZ)()],V.prototype,"imageSrc",void 0),Z([(0,r.MZ)()],V.prototype,"textTitle",void 0),Z([(0,r.MZ)()],V.prototype,"textValue",void 0),V=Z([(0,W.E)("wui-list-content")],V);let U=(0,w.AH)`
463  :host {
464    display: flex;
465    width: auto;
466    flex-direction: column;
467    gap: ${({spacing:e})=>e["1"]};
468    border-radius: ${({borderRadius:e})=>e["5"]};
469    background: ${({tokens:e})=>e.theme.foregroundPrimary};
470    padding: ${({spacing:e})=>e["3"]} ${({spacing:e})=>e["2"]}
471      ${({spacing:e})=>e["2"]} ${({spacing:e})=>e["2"]};
472  }
473
474  wui-list-content {
475    width: -webkit-fill-available !important;
476  }
477
478  wui-text {
479    padding: 0 ${({spacing:e})=>e["2"]};
480  }
481
482  wui-flex {
483    margin-top: ${({spacing:e})=>e["2"]};
484  }
485
486  .network {
487    cursor: pointer;
488    transition: background-color ${({durations:e})=>e.lg}
489      ${({easings:e})=>e["ease-out-power-1"]};
490    will-change: background-color;
491  }
492
493  .network:focus-visible {
494    border: 1px solid ${({tokens:e})=>e.core.textAccentPrimary};
495    background-color: ${({tokens:e})=>e.core.glass010};
496    -webkit-box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent010};
497    -moz-box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent010};
498    box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent010};
499  }
500
501  .network:hover {
502    background-color: ${({tokens:e})=>e.core.glass010};
503  }
504
505  .network:active {
506    background-color: ${({tokens:e})=>e.core.glass010};
507  }
508`;var H=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let L=class extends n.WF{constructor(){super(...arguments),this.params=s.I.state.data?.send}render(){return(0,n.qy)` <wui-text variant="sm-regular" color="secondary">Details</wui-text>
509      <wui-flex flexDirection="column" gap="1">
510        <wui-list-content
511          textTitle="Address"
512          textValue=${w.Zv.getTruncateString({string:this.receiverAddress??"",charsStart:4,charsEnd:4,truncate:"middle"})}
513        >
514        </wui-list-content>
515        ${this.networkTemplate()}
516      </wui-flex>`}networkTemplate(){return this.caipNetwork?.name?(0,n.qy)` <wui-list-content
517        @click=${()=>this.onNetworkClick(this.caipNetwork)}
518        class="network"
519        textTitle="Network"
520        imageSrc=${(0,F.J)(m.$.getNetworkImage(this.caipNetwork))}
521      ></wui-list-content>`:null}onNetworkClick(e){e&&!this.params&&s.I.push("Networks",{network:e})}};L.styles=U,H([(0,r.MZ)()],L.prototype,"receiverAddress",void 0),H([(0,r.MZ)({type:Object})],L.prototype,"caipNetwork",void 0),H([(0,r.wk)()],L.prototype,"params",void 0),L=H([(0,w.EM)("w3m-wallet-send-details")],L);let K=(0,w.AH)`
522  wui-avatar,
523  wui-image {
524    display: ruby;
525    width: 32px;
526    height: 32px;
527    border-radius: ${({borderRadius:e})=>e["20"]};
528  }
529
530  .sendButton {
531    width: 70%;
532    --local-width: 100% !important;
533    --local-border-radius: ${({borderRadius:e})=>e["4"]} !important;
534  }
535
536  .cancelButton {
537    width: 30%;
538    --local-width: 100% !important;
539    --local-border-radius: ${({borderRadius:e})=>e["4"]} !important;
540  }
541`;var G=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let Y=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.token=a.R.state.token,this.sendTokenAmount=a.R.state.sendTokenAmount,this.receiverAddress=a.R.state.receiverAddress,this.receiverProfileName=a.R.state.receiverProfileName,this.receiverProfileImageUrl=a.R.state.receiverProfileImageUrl,this.caipNetwork=l.W.state.activeCaipNetwork,this.loading=a.R.state.loading,this.params=s.I.state.data?.send,this.unsubscribe.push(a.R.subscribe(e=>{this.token=e.token,this.sendTokenAmount=e.sendTokenAmount,this.receiverAddress=e.receiverAddress,this.receiverProfileName=e.receiverProfileName,this.receiverProfileImageUrl=e.receiverProfileImageUrl,this.loading=e.loading}),l.W.subscribeKey("activeCaipNetwork",e=>this.caipNetwork=e))}
541disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,n.qy)` <wui-flex flexDirection="column" .padding=${["0","4","4","4"]}>
542      <wui-flex gap="2" flexDirection="column" .padding=${["0","2","0","2"]}>
543        <wui-flex alignItems="center" justifyContent="space-between">
544          <wui-flex flexDirection="column" gap="01">
545            <wui-text variant="sm-regular" color="secondary">Send</wui-text>
546            ${this.sendValueTemplate()}
547          </wui-flex>
548          <wui-preview-item
549            text="${this.sendTokenAmount?w.Zv.roundNumber(Number(this.sendTokenAmount),6,5):"unknown"} ${this.token?.symbol}"
550            .imageSrc=${this.token?.iconUrl}
551          ></wui-preview-item>
552        </wui-flex>
553        <wui-flex>
554          <wui-icon color="default" size="md" name="arrowBottom"></wui-icon>
555        </wui-flex>
556        <wui-flex alignItems="center" justifyContent="space-between">
557          <wui-text variant="sm-regular" color="secondary">To</wui-text>
558          <wui-preview-item
559            text="${this.receiverProfileName?w.Zv.getTruncateString({string:this.receiverProfileName,charsStart:20,charsEnd:0,truncate:"end"}):w.Zv.getTruncateString({string:this.receiverAddress?this.receiverAddress:"",charsStart:4,charsEnd:4,truncate:"middle"})}"
560            address=${this.receiverAddress??""}
561            .imageSrc=${this.receiverProfileImageUrl??void 0}
562            .isAddress=${!0}
563          ></wui-preview-item>
564        </wui-flex>
565      </wui-flex>
566      <wui-flex flexDirection="column" .padding=${["6","0","0","0"]}>
567        <w3m-wallet-send-details
568          .caipNetwork=${this.caipNetwork}
569          .receiverAddress=${this.receiverAddress}
570        ></w3m-wallet-send-details>
571        <wui-flex justifyContent="center" gap="1" .padding=${["3","0","0","0"]}>
572          <wui-icon size="sm" color="default" name="warningCircle"></wui-icon>
573          <wui-text variant="sm-regular" color="secondary">Review transaction carefully</wui-text>
574        </wui-flex>
575        <wui-flex justifyContent="center" gap="3" .padding=${["4","0","0","0"]}>
576          <wui-button
577            class="cancelButton"
578            @click=${this.onCancelClick.bind(this)}
579            size="lg"
580            variant="neutral-secondary"
581          >
582            Cancel
583          </wui-button>
584          <wui-button
585            class="sendButton"
586            @click=${this.onSendClick.bind(this)}
587            size="lg"
588            variant="accent-primary"
589            .loading=${this.loading}
590          >
591            Send
592          </wui-button>
593        </wui-flex>
594      </wui-flex></wui-flex
595    >`}sendValueTemplate(){if(!this.params&&this.token&&this.sendTokenAmount){let e=this.token.price*Number(this.sendTokenAmount);return(0,n.qy)`<wui-text variant="md-regular" color="primary"
596        >$${e.toFixed(2)}</wui-text
597      >`}return null}async onSendClick(){if(!this.sendTokenAmount||!this.receiverAddress)return void p.P.showError("Please enter a valid amount and receiver address");try{await a.R.sendToken(),this.params?s.I.reset("WalletSendConfirmed"):(p.P.showSuccess("Transaction started"),s.I.replace("Account"))}catch(n){let e="Failed to send transaction",t=n instanceof D.A&&n.originalName===I.RQ.PROVIDER_RPC_ERROR_NAME.USER_REJECTED_REQUEST,i=n instanceof D.A&&n.originalName===I.RQ.PROVIDER_RPC_ERROR_NAME.SEND_TRANSACTION_ERROR;(t||i)&&(e=n.message),O.E.sendEvent({type:"track",event:t?"SEND_REJECTED":"SEND_ERROR",properties:a.R.getSdkEventProperties(n)}),p.P.showError(e)}}onCancelClick(){s.I.goBack()}};Y.styles=K,G([(0,r.wk)()],Y.prototype,"token",void 0),G([(0,r.wk)()],Y.prototype,"sendTokenAmount",void 0),G([(0,r.wk)()],Y.prototype,"receiverAddress",void 0),G([(0,r.wk)()],Y.prototype,"receiverProfileName",void 0),G([(0,r.wk)()],Y.prototype,"receiverProfileImageUrl",void 0),G([(0,r.wk)()],Y.prototype,"caipNetwork",void 0),G([(0,r.wk)()],Y.prototype,"loading",void 0),G([(0,r.wk)()],Y.prototype,"params",void 0),Y=G([(0,w.EM)("w3m-wallet-send-preview-view")],Y);let J=(0,w.AH)`
598  .icon-box {
599    width: 64px;
600    height: 64px;
601    border-radius: 16px;
602    background-color: ${({spacing:e})=>e[16]};
603    border: 8px solid ${({tokens:e})=>e.theme.borderPrimary};
604    border-radius: ${({borderRadius:e})=>e.round};
605  }
606`,Q=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.unsubscribe.push()}render(){return(0,n.qy)`
607      <wui-flex
608        flexDirection="column"
609        alignItems="center"
610        gap="4"
611        .padding="${["1","3","4","3"]}"
612      >
613        <wui-flex justifyContent="center" alignItems="center" class="icon-box">
614          <wui-icon size="xxl" color="success" name="checkmark"></wui-icon>
615        </wui-flex>
616
617        <wui-text variant="h6-medium" color="primary">You successfully sent asset</wui-text>
618
619        <wui-button
620          fullWidth
621          @click=${this.onCloseClick.bind(this)}
622          size="lg"
623          variant="neutral-secondary"
624        >
625          Close
626        </wui-button>
626
627      </wui-flex>
628    `}onCloseClick(){u.W.close()}};Q.styles=J,Q=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a}([(0,w.EM)("w3m-send-confirmed-view")],Q)},42103:(e,t,i)=>{var n=i(83138),r=i(98410);i(91404),i(45166),i(40396),i(24772),i(38534);var o=i(71084),a=i(47327),s=i(20296);let l=(0,s.AH)`
629  button {
630    display: block;
631    display: flex;
632    align-items: center;
633    padding: ${({spacing:e})=>e[1]};
634    transition: background-color ${({durations:e})=>e.lg}
635      ${({easings:e})=>e["ease-out-power-2"]};
636    will-change: background-color;
637    background-color: ${({tokens:e})=>e.theme.foregroundPrimary};
638    border-radius: ${({borderRadius:e})=>e[32]};
639  }
640
641  wui-image {
642    border-radius: ${({borderRadius:e})=>e[32]};
643  }
644
645  wui-text {
646    padding-left: ${({spacing:e})=>e[1]};
647    padding-right: ${({spacing:e})=>e[1]};
648  }
649
650  .left-icon-container {
651    width: 24px;
652    height: 24px;
653    justify-content: center;
654    align-items: center;
655  }
656
657  .left-image-container {
658    position: relative;
659    justify-content: center;
660    align-items: center;
661  }
662
663  .chain-image {
664    position: absolute;
665    border: 1px solid ${({tokens:e})=>e.theme.foregroundPrimary};
666  }
667
668  /* -- Sizes --------------------------------------------------- */
669  button[data-size='lg'] {
670    height: 32px;
671  }
672
673  button[data-size='md'] {
674    height: 28px;
675  }
676
677  button[data-size='sm'] {
678    height: 24px;
679  }
680
681  button[data-size='lg'] .token-image {
682    width: 24px;
683    height: 24px;
684  }
685
686  button[data-size='md'] .token-image {
687    width: 20px;
688    height: 20px;
689  }
690
691  button[data-size='sm'] .token-image {
692    width: 16px;
693    height: 16px;
694  }
695
696  button[data-size='lg'] .left-icon-container {
697    width: 24px;
698    height: 24px;
699  }
700
701  button[data-size='md'] .left-icon-container {
702    width: 20px;
703    height: 20px;
704  }
705
706  button[data-size='sm'] .left-icon-container {
707    width: 16px;
708    height: 16px;
709  }
710
711  button[data-size='lg'] .chain-image {
712    width: 12px;
713    height: 12px;
714    bottom: 2px;
715    right: -4px;
716  }
717
718  button[data-size='md'] .chain-image {
719    width: 10px;
720    height: 10px;
721    bottom: 2px;
722    right: -4px;
723  }
724
725  button[data-size='sm'] .chain-image {
726    width: 8px;
727    height: 8px;
728    bottom: 2px;
729    right: -3px;
730  }
731
732  /* -- Focus states --------------------------------------------------- */
733  button:focus-visible:enabled {
734    background-color: ${({tokens:e})=>e.theme.foregroundSecondary};
735    box-shadow: 0 0 0 4px ${({tokens:e})=>e.core.foregroundAccent040};
736  }
737
738  /* -- Hover & Active states ----------------------------------------------------------- */
739  @media (hover: hover) {
740    button:hover:enabled,
741    button:active:enabled {
742      background-color: ${({tokens:e})=>e.theme.foregroundSecondary};
743    }
744  }
745
746  /* -- Disabled states --------------------------------------------------- */
747  button:disabled {
748    background-color: ${({tokens:e})=>e.theme.foregroundSecondary};
749    opacity: 0.5;
750  }
751`;var c=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let u={lg:"lg-regular",md:"lg-regular",sm:"md-regular"},d={lg:"lg",md:"md",sm:"sm"},h=class extends n.WF{constructor(){super(...arguments),this.size="md",this.disabled=!1,this.text="",this.loading=!1}render(){return this.loading?(0,n.qy)` <wui-flex alignItems="center" gap="01" padding="01">
752        <wui-shimmer width="20px" height="20px"></wui-shimmer>
753        <wui-shimmer width="32px" height="18px" borderRadius="4xs"></wui-shimmer>
754      </wui-flex>`:(0,n.qy)`
755      <button ?disabled=${this.disabled} data-size=${this.size}>
756        ${this.imageTemplate()} ${this.textTemplate()}
757      </button>
758    `}imageTemplate(){if(this.imageSrc&&this.chainImageSrc)return(0,n.qy)`<wui-flex class="left-image-container">
759        <wui-image src=${this.imageSrc} class="token-image"></wui-image>
760        <wui-image src=${this.chainImageSrc} class="chain-image"></wui-image>
761      </wui-flex>`;if(this.imageSrc)return(0,n.qy)`<wui-image src=${this.imageSrc} class="token-image"></wui-image>`;let e=d[this.size];return(0,n.qy)`<wui-flex class="left-icon-container">
762      <wui-icon size=${e} name="networkPlaceholder"></wui-icon>
763    </wui-flex>`}textTemplate(){let e=u[this.size];return(0,n.qy)`<wui-text color="primary" variant=${e}
764      >${this.text}</wui-text
765    >`}};h.styles=[o.W5,o.fD,l],c([(0,r.MZ)()],h.prototype,"size",void 0),c([(0,r.MZ)()],h.prototype,"imageSrc",void 0),c([(0,r.MZ)()],h.prototype,"chainImageSrc",void 0),c([(0,r.MZ)({type:Boolean})],h.prototype,"disabled",void 0),c([(0,r.MZ)()],h.prototype,"text",void 0),c([(0,r.MZ)({type:Boolean})],h.prototype,"loading",void 0),h=c([(0,a.E)("wui-token-button")],h)}}]);

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.