1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b0e87523-a32a-5338-91bc-376e769ceb2c")}catch(e){}}(); 3!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];if(null!=i)for(var r in i)i.hasOwnProperty(r)&&(e[r]=i[r])}return e}({},e._sentryModuleMetadata[(new e.Error).stack],{"_sentryBundlerPluginAppKey:gensyn_ai_delphi":!0})}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[147],{32:e=>{"use strict";e.exports=function(e){for(var t=[],i=e.length,r=0;r<i;r++){var o=e.charCodeAt(r);if(o>=55296&&o<=56319&&i>r+1){var n=e.charCodeAt(r+1);n>=56320&&n<=57343&&(o=(o-55296)*1024+n-56320+65536,r+=1)}if(o<128){t.push(o);continue}if(o<2048){t.push(o>>6|192),t.push(63&o|128);continue}if(o<55296||o>=57344&&o<65536){t.push(o>>12|224),t.push(o>>6&63|128),t.push(63&o|128);continue}if(o>=65536&&o<=1114111){t.push(o>>18|240),t.push(o>>12&63|128),t.push(o>>6&63|128),t.push(63&o|128);continue}t.push(239,191,189)}return new Uint8Array(t).buffer}},147:(e,t,i)=>{"use strict";i.r(t),i.d(t,{W3mAllWalletsView:()=>tf,W3mConnectingWcBasicView:()=>eS,W3mDownloadsView:()=>ty});var r=i(58253),o=i(28772),n=i(70004),a=i(90607),s=i(75765),l=i(41120),c=i(26951);i(99964);var d=i(71223),u=i(15314),h=i(74698),p=i(64262),g=i(58046),f=i(8214);i(91908);var w=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let m=class extends r.WF{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=h.a.state.connectors,this.count=s.N.state.count,this.filteredCount=s.N.state.filteredWallets.length,this.isFetchingRecommendedWallets=s.N.state.isFetchingRecommendedWallets,this.unsubscribe.push(h.a.subscribeKey("connectors",e=>this.connectors=e),s.N.subscribeKey("count",e=>this.count=e),s.N.subscribeKey("filteredWallets",e=>this.filteredCount=e.length),s.N.subscribeKey("isFetchingRecommendedWallets",e=>this.isFetchingRecommendedWallets=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=this.connectors.find(e=>"walletConnect"===e.id),{allWallets:t}=a.H.state;if(!e||"HIDE"===t||"ONLY_MOBILE"===t&&!n.w.isMobile())return null;let i=s.N.state.featured.length,o=this.count+i,l=o<10?o:10*Math.floor(o/10),c=this.filteredCount>0?this.filteredCount:l,h=`${c}`;this.filteredCount>0?h=`${this.filteredCount}`:c<o&&(h=`${c}+`);let g=p.x.hasAnyConnection(u.o.CONNECTOR_ID.WALLET_CONNECT);return(0,r.qy)` 4 <wui-list-wallet 5 name="Search Wallet" 6 walletIcon="search" 7 showAllWallets 8 @click=${this.onAllWallets.bind(this)} 9 tagLabel=${h} 10 tagVariant="info" 11 data-testid="all-wallets" 12 tabIdx=${(0,d.J)(this.tabIdx)} 13 .loading=${this.isFetchingRecommendedWallets} 14 ?disabled=${g} 15 size="sm" 16 ></wui-list-wallet> 17 `}onAllWallets(){g.E.sendEvent({type:"track",event:"CLICK_ALL_WALLETS"}),f.I.push("AllWallets",{redirectView:f.I.state.data?.redirectView})}};w([(0,o.MZ)()],m.prototype,"tabIdx",void 0),w([(0,o.wk)()],m.prototype,"connectors",void 0),w([(0,o.wk)()],m.prototype,"count",void 0),w([(0,o.wk)()],m.prototype,"filteredCount",void 0),w([(0,o.wk)()],m.prototype,"isFetchingRecommendedWallets",void 0),m=w([(0,c.EM)("w3m-all-wallets-widget")],m);var b=i(32569),y=i(5481),v=i(32941),x=i(92057);let $=(0,c.AH)` 18 :host { 19 margin-top: ${({spacing:e})=>e["1"]}; 20 } 21 wui-separator { 22 margin: ${({spacing:e})=>e["3"]} calc(${({spacing:e})=>e["3"]} * -1) 23 ${({spacing:e})=>e["2"]} calc(${({spacing:e})=>e["3"]} * -1); 24 width: calc(100% + ${({spacing:e})=>e["3"]} * 2); 25 } 26`;var k=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let C=class extends r.WF{constructor(){super(),this.unsubscribe=[],this.connectors=h.a.state.connectors,this.recommended=s.N.state.recommended,this.featured=s.N.state.featured,this.explorerWallets=s.N.state.explorerWallets,this.connections=p.x.state.connections,this.connectorImages=b.j.state.connectorImages,this.loadingTelegram=!1,this.unsubscribe.push(h.a.subscribeKey("connectors",e=>this.connectors=e),p.x.subscribeKey("connections",e=>this.connections=e),b.j.subscribeKey("connectorImages",e=>this.connectorImages=e),s.N.subscribeKey("recommended",e=>this.recommended=e),s.N.subscribeKey("featured",e=>this.featured=e),s.N.subscribeKey("explorerFilteredWallets",e=>{this.explorerWallets=e?.length?e:s.N.state.explorerWallets}),s.N.subscribeKey("explorerWallets",e=>{this.explorerWallets?.length||(this.explorerWallets=e)})),n.w.isTelegram()&&n.w.isIos()&&(this.loadingTelegram=!p.x.state.wcUri,this.unsubscribe.push(p.x.subscribeKey("wcUri",e=>this.loadingTelegram=!e)))}
26disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,r.qy)` 27 <wui-flex flexDirection="column" gap="2"> ${this.connectorListTemplate()} </wui-flex> 28 `}mapConnectorsToExplorerWallets(e,t){return e.map(e=>{if("MULTI_CHAIN"===e.type&&e.connectors){let i=e.connectors.map(e=>e.id),r=e.connectors.map(e=>e.name),o=e.connectors.map(e=>e.info?.rdns);return e.explorerWallet=t?.find(e=>i.includes(e.id)||r.includes(e.name)||e.rdns&&(o.includes(e.rdns)||i.includes(e.rdns)))??e.explorerWallet,e}let i=t?.find(t=>t.id===e.id||t.rdns===e.info?.rdns||t.name===e.name);return e.explorerWallet=i??e.explorerWallet,e})}processConnectorsByType(e,t=!0){let i=x.g.sortConnectorsByExplorerWallet([...e]);return t?i.filter(x.g.showConnector):i}connectorListTemplate(){let e=this.mapConnectorsToExplorerWallets(this.connectors,this.explorerWallets??[]),t=x.g.getConnectorsByType(e,this.recommended,this.featured),i=this.processConnectorsByType(t.announced.filter(e=>"walletConnect"!==e.id)),r=this.processConnectorsByType(t.injected),o=this.processConnectorsByType(t.multiChain.filter(e=>"WalletConnect"!==e.name),!1),a=t.custom,s=t.recent,l=this.processConnectorsByType(t.external.filter(e=>e.id!==u.o.CONNECTOR_ID.COINBASE_SDK)),c=t.recommended,d=t.featured,h=x.g.getConnectorTypeOrder({custom:a,recent:s,announced:i,injected:r,multiChain:o,recommended:c,featured:d,external:l}),p=this.connectors.find(e=>"walletConnect"===e.id),g=n.w.isMobile(),f=[];for(let e of h)switch(e){case"walletConnect":!g&&p&&f.push({kind:"connector",subtype:"walletConnect",connector:p});break;case"recent":x.g.getFilteredRecentWallets().forEach(e=>f.push({kind:"wallet",subtype:"recent",wallet:e}));break;case"injected":o.forEach(e=>f.push({kind:"connector",subtype:"multiChain",connector:e}
28)),i.forEach(e=>f.push({kind:"connector",subtype:"announced",connector:e})),r.forEach(e=>f.push({kind:"connector",subtype:"injected",connector:e}));break;case"featured":d.forEach(e=>f.push({kind:"wallet",subtype:"featured",wallet:e}));break;case"custom":x.g.getFilteredCustomWallets(a??[]).forEach(e=>f.push({kind:"wallet",subtype:"custom",wallet:e}));break;case"external":l.forEach(e=>f.push({kind:"connector",subtype:"external",connector:e}));break;case"recommended":x.g.getCappedRecommendedWallets(c).forEach(e=>f.push({kind:"wallet",subtype:"recommended",wallet:e}));break;default:console.warn(`Unknown connector type: ${e}`)}return f.map((e,t)=>"connector"===e.kind?this.renderConnector(e,t):this.renderWallet(e,t))}renderConnector(e,t){let i,o,n=e.connector,a=y.$.getConnectorImage(n)||this.connectorImages[n?.imageId??""],s=(this.connections.get(n.chain)??[]).some(e=>v.y.isLowerCaseMatch(e.connectorId,n.id));"multiChain"===e.subtype?(i="multichain",o="info"):"walletConnect"===e.subtype?(i="qr code",o="accent"):"injected"===e.subtype||"announced"===e.subtype?(i=s?"connected":"installed",o=s?"info":"success"):(i=void 0,o=void 0);let l=p.x.hasAnyConnection(u.o.CONNECTOR_ID.WALLET_CONNECT),c=("walletConnect"===e.subtype||"external"===e.subtype)&&l;return(0,r.qy)` 29 <w3m-list-wallet 30 displayIndex=${t} 31 imageSrc=${(0,d.J)(a)} 32 .installed=${!0} 33 name=${n.name??"Unknown"} 34 .tagVariant=${o} 35 tagLabel=${(0,d.J)(i)} 36 data-testid=${`wallet-selector-${n.id.toLowerCase()}`} 37 size="sm" 38 @click=${()=>this.onClickConnector(e)} 39 tabIdx=${(0,d.J)(this.tabIdx)} 40 ?disabled=${c} 41 rdnsId=${(0,d.J)(n.explorerWallet?.rdns||void 0)} 42 walletRank=${(0,d.J)(n.explorerWallet?.order)} 43 > 44 </w3m-list-wallet> 45 `}onClickConnector(e){let t=f.I.state.data?.redirectView;if("walletConnect"===e.subtype){h.a.setActiveConnector(e.connector),n.w.isMobile()?f.I.push("AllWallets"):f.I.push("ConnectingWalletConnect",{redirectView:t});return}if("multiChain"===e.subtype){h.a.setActiveConnector(e.connector),f.I.push("ConnectingMultiChain",{redirectView:t});return}if("injected"===e.subtype){h.a.setActiveConnector(e.connector),f.I.push("ConnectingExternal",{connector:e.connector,redirectView:t,wallet:e.connector.explorerWallet});return}if("announced"===e.subtype)return"walletConnect"===e.connector.id?void(n.w.isMobile()?f.I.push("AllWallets"):f.I.push("ConnectingWalletConnect",{redirectView:t})):(f.I.push("ConnectingExternal",{connector:e.connector,redirectView:t,wallet:e.connector.explorerWallet}),void 0);f.I.push("ConnectingExternal",{connector:e.connector,redirectView:t})}renderWallet(e,t){let i=e.wallet,o=y.$.getWalletImage(i),n=p.x.hasAnyConnection(u.o.CONNECTOR_ID.WALLET_CONNECT),a=this.loadingTelegram,s="recent"===e.subtype?"recent":void 0,l="recent"===e.subtype?"info":void 0;return(0,r.qy)` 46 <w3m-list-wallet 47 displayIndex=${t} 48 imageSrc=${(0,d.J)(o)} 49 name=${i.name??"Unknown"} 50 @click=${()=>this.onClickWallet(e)} 51 size="sm" 52 data-testid=${`wallet-selector-${i.id}`} 53 tabIdx=${(0,d.J)(this.tabIdx)} 54 ?loading=${a} 55 ?disabled=${n} 56 rdnsId=${(0,d.J)(i.rdns||void 0)} 57 walletRank=${(0,d.J)(i.order)} 58 tagLabel=${(0,d.J)(s)} 59 .tagVariant=${l} 60 > 61 </w3m-list-wallet> 62 `}onClickWallet(e){let t=f.I.state.data?.redirectView;if("featured"===e.subtype)return void h.a.selectWalletConnector(e.wallet);if("recent"===e.subtype){if(this.loadingTelegram)return;h.a.selectWalletConnector(e.wallet);return}if("custom"===e.subtype){if(this.loadingTelegram)return;f.I.push("ConnectingWalletConnect",{wallet:e.wallet,redirectView:t});return}if(this.loadingTelegram)return;let i=h.a.getConnector({id:e.wallet.id,rdns:e.wallet.rdns});i?f.I.push("ConnectingExternal",{connector:i,redirectView:t}):f.I.push("ConnectingWalletConnect",{wallet:e.wallet,redirectView:t})}};C.styles=$,k([(0,o.MZ)({type:Number})],C.prototype,"tabIdx",void 0),k([(0,o.wk)()],C.prototype,"connectors",void 0),k([(0,o.wk)()],C.prototype,"recommended",void 0),k([(0,o.wk)()],C.prototype,"featured",void 0),k([(0,o.wk)()],C.prototype,"explorerWallets",void 0),k([(0,o.wk)()],C.prototype,"connections",void 0),k([(0,o.wk)()],C.prototype,"connectorImages",void 0),k([(0,o.wk)()],C.prototype,"loadingTelegram",void 0),C=k([(0,c.EM)("w3m-connector-list")],C);var E=i(31321),R=i(86188),I=i(58815),T=i(46790),A=i(74442),M=i(10909),P=i(81733),S=i(60610);i(93214),i(2200);var W=i(50153);let N=(0,W.AH)` 63 :host { 64 flex: 1; 65 height: 100%; 66 } 67 68 button { 69 width: 100%; 70 height: 100%; 71 display: inline-flex; 72 align-items: center; 73 padding: ${({spacing:e})=>e[1]} ${({spacing:e})=>e[2]}; 74 column-gap: ${({spacing:e})=>e[1]}; 75 color: ${({tokens:e})=>e.theme.textSecondary}; 76 border-radius: ${({borderRadius:e})=>e[20]}; 77 background-color: transparent; 78 transition: background-color ${({durations:e})=>e.lg} 79 ${({easings:e})=>e["ease-out-power-2"]}; 80 will-change: background-color; 81 } 82 83 /* -- Hover & Active states ----------------------------------------------------------- */ 84 button[data-active='true'] { 85 color: ${({tokens:e})=>e.theme.textPrimary}; 86 background-color: ${({tokens:e})=>e.theme.foregroundTertiary}; 87 } 88 89 button:hover:enabled:not([data-active='true']), 90 button:active:enabled:not([data-active='true']) { 91 wui-text, 92 wui-icon { 93 color: ${({tokens:e})=>e.theme.textPrimary}; 94 } 95 } 96`;var L=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let B={lg:"lg-regular",md:"md-regular",sm:"sm-regular"},O={lg:"md",md:"sm",sm:"sm"},j=class extends r.WF{constructor(){super(...arguments),this.icon="mobile",this.size="md",this.label="",this.active=!1}render(){return(0,r.qy)` 97 <button data-active=${this.active}> 98 ${this.icon?(0,r.qy)`<wui-icon size=${O[this.size]} name=${this.icon}></wui-icon>`:""} 99 <wui-text variant=${B[this.size]}> ${this.label} </wui-text> 100 </button> 101 `}};j.styles=[P.W5,P.fD,N],L([(0,o.MZ)()],j.prototype,"icon",void 0),L([(0,o.MZ)()],j.prototype,"size",void 0),L([(0,o.MZ)()],j.prototype,"label",void 0),L([(0,o.MZ)({type:Boolean})],j.prototype,"active",void 0),j=L([(0,S.E)("wui-tab-item")],j);let z=(0,W.AH)` 102 :host { 103 display: inline-flex; 104 align-items: center; 105 background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; 106 border-radius: ${({borderRadius:e})=>e[32]}; 107 padding: ${({spacing:e})=>e["01"]}; 108 box-sizing: border-box; 109 } 110 111 :host([data-size='sm']) {
112 height: 26px; 113 } 114 115 :host([data-size='md']) { 116 height: 36px; 117 } 118`;var q=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let _=class extends r.WF{constructor(){super(...arguments),this.tabs=[],this.onTabChange=()=>null,this.size="md",this.activeTab=0}render(){return this.dataset.size=this.size,this.tabs.map((e,t)=>{let i=t===this.activeTab;return(0,r.qy)` 119 <wui-tab-item 120 @click=${()=>this.onTabClick(t)} 121 icon=${e.icon} 122 size=${this.size} 123 label=${e.label} 124 ?active=${i} 125 data-active=${i} 126 data-testid="tab-${e.label?.toLowerCase()}" 127 ></wui-tab-item> 128 `})}onTabClick(e){this.activeTab=e,this.onTabChange(e)}};_.styles=[P.W5,P.fD,z],q([(0,o.MZ)({type:Array})],_.prototype,"tabs",void 0),q([(0,o.MZ)()],_.prototype,"onTabChange",void 0),q([(0,o.MZ)()],_.prototype,"size",void 0),q([(0,o.wk)()],_.prototype,"activeTab",void 0),_=q([(0,S.E)("wui-tabs")],_);var D=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let U=class extends r.WF{constructor(){super(...arguments),this.platformTabs=[],this.unsubscribe=[],this.platforms=[],this.onSelectPlatfrom=void 0}disconnectCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=this.generateTabs();return(0,r.qy)` 129 <wui-flex justifyContent="center" .padding=${["0","0","4","0"]}> 130 <wui-tabs .tabs=${e} .onTabChange=${this.onTabChange.bind(this)}></wui-tabs> 131 </wui-flex> 132 `}generateTabs(){let e=this.platforms.map(e=>{if("browser"===e)return{label:"Browser",icon:"extension",platform:"browser"};if("mobile"===e)return{label:"Mobile",icon:"mobile",platform:"mobile"};if("qrcode"===e)return{label:"Mobile",icon:"mobile",platform:"qrcode"};if("web"===e)return{label:"Webapp",icon:"browser",platform:"web"};if("desktop"===e)return{label:"Desktop",icon:"desktop",platform:"desktop"};return{label:"Browser",icon:"extension",platform:"unsupported"}});return this.platformTabs=e.map(({platform:e})=>e),e}onTabChange(e){let t=this.platformTabs[e];t&&this.onSelectPlatfrom?.(t)}};D([(0,o.MZ)({type:Array})],U.prototype,"platforms",void 0),D([(0,o.MZ)()],U.prototype,"onSelectPlatfrom",void 0),U=D([(0,c.EM)("w3m-connecting-header")],U);var Z=i(96144);i(10823);let F=(0,W.AH)` 133 :host { 134 width: var(--local-width); 135 } 136 137 button { 138 width: var(--local-width); 139 white-space: nowrap; 140 column-gap: ${({spacing:e})=>e[2]}; 141 transition: 142 scale ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-1"]}, 143 background-color ${({durations:e})=>e.lg} 144 ${({easings:e})=>e["ease-out-power-2"]}, 145 border-radius ${({durations:e})=>e.lg} 146 ${({easings:e})=>e["ease-out-power-1"]}; 147 will-change: scale, background-color, border-radius; 148 cursor: pointer; 149 } 150 151 /* -- Sizes --------------------------------------------------- */ 152 button[data-size='sm'] { 153 border-radius: ${({borderRadius:e})=>e[2]}; 154 padding: 0 ${({spacing:e})=>e[2]}; 155 height: 28px; 156 } 157 158 button[data-size='md'] { 159 border-radius: ${({borderRadius:e})=>e[3]}; 160 padding: 0 ${({spacing:e})=>e[4]}; 161 height: 38px; 162 } 163 164 button[data-size='lg'] { 165 border-radius: ${({borderRadius:e})=>e[4]}; 166 padding: 0 ${({spacing:e})=>e[5]}; 167 height: 48px; 168 } 169 170 /* -- Variants --------------------------------------------------------- */ 171 button[data-variant='accent-primary'] { 172 background-color: ${({tokens:e})=>e.core.backgroundAccentPrimary}; 173 color: ${({tokens:e})=>e.theme.textInvert}; 174 } 175 176 button[data-variant='accent-secondary'] { 177 background-color: ${({tokens:e})=>e.core.foregroundAccent010}; 178 color: ${({tokens:e})=>e.core.textAccentPrimary}; 179 } 180 181 button[data-variant='neutral-primary'] { 182 background-color: ${({tokens:e})=>e.theme.backgroundInvert}; 183 color: ${({tokens:e})=>e.theme.textInvert}; 184 } 185 186 button[data-variant='neutral-secondary'] { 187 background-color: transparent; 188 border: 1px solid ${({tokens:e})=>e.theme.borderSecondary}; 189 color: ${({tokens:e})=>e.theme.textPrimary}; 190 } 191 192 button[data-variant='neutral-tertiary'] { 193 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 194 color: ${({tokens:e})=>e.theme.textPrimary}; 195 } 196 197 button[data-variant='error-primary'] { 198 background-color: ${({tokens:e})=>e.core.textError}; 199 color: ${({tokens:e})=>e.theme.textInvert}; 200 } 201 202 button[data-variant='error-secondary'] { 203 background-color: ${({tokens:e})=>e.core.backgroundError}; 204 color: ${({tokens:e})=>e.core.textError}; 205 } 206 207 button[data-variant='shade'] { 208 background: var(--wui-color-gray-glass-002); 209 color: var(--wui-color-fg-200); 210 border: none; 211 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005); 212 } 213 214 /* -- Focus states --------------------------------------------------- */ 215 button[data-size='sm']:focus-visible:enabled { 216 border-radius: 28px; 217 } 218 219 button[data-size='md']:focus-visible:enabled { 220 border-radius: 38px; 221 } 222 223 button[data-size='lg']:focus-visible:enabled { 224 border-radius: 48px; 225 } 226 button[data-variant='shade']:focus-visible:enabled { 227 background: var(--wui-color-gray-glass-005); 228 box-shadow: 229 inset 0 0 0 1px var(--wui-color-gray-glass-010), 230 0 0 0 4px var(--wui-color-gray-glass-002); 231 } 232 233 /* -- Hover & Active states ----------------------------------------------------------- */ 234 @media (hover: hover) { 235 button[data-size='sm']:hover:enabled { 236 border-radius: 28px; 237 } 238 239 button[data-size='md']:hover:enabled { 240 border-radius: 38px; 241 } 242 243 button[data-size='lg']:hover:enabled { 244 border-radius: 48px; 245 } 246 247 button[data-variant='shade']:hover:enabled { 248 background: var(--wui-color-gray-glass-002); 249 } 250 251 button[data-variant='shade']:active:enabled { 252 background: var(--wui-color-gray-glass-005); 253 } 254 } 255 256 button[data-size='sm']:active:enabled { 257 border-radius: 28px; 258 } 259 260 button[data-size='md']:active:enabled { 261 border-radius: 38px; 262 } 263 264 button[data-size='lg']:active:enabled { 265 border-radius: 48px; 266 } 267 268 /* -- Disabled states --------------------------------------------------- */ 269 button:disabled { 270 opacity: 0.3; 271 } 272`;var H=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let J={lg:"lg-regular-mono",md:"md-regular-mono",sm:"sm-regular-mono"},K={lg:"md",md:"md",sm:"sm"},V=class extends r.WF{constructor(){super(...arguments),this.size="lg",this.disabled=!1,this.fullWidth=!1,this.loading=!1,this.variant="accent-primary"}render(){this.style.cssText=` 273 --local-width: ${this.fullWidth?"100%":"auto"}; 274 `;let e=this.textVariant??J[this.size];return(0,r.qy)` 275 <button data-variant=${this.variant} data-size=${this.size} ?disabled=${this.disabled}> 276 ${this.loadingTemplate()} 277 <slot name="iconLeft"></slot> 278 <wui-text variant=${e} color="inherit"> 279 <slot></slot> 280 </wui-text> 281 <slot name="iconRight"></slot> 282 </button> 283 `}loadingTemplate(){if(this.loading){let e=K[this.size],t="neutral-primary"===this.variant||"accent-primary"===this.variant?"invert":"primary";return(0,r.qy)`<wui-loading-spinner color=${t} size=${e}></wui-loading-spinner>`}return null}};V.styles=[P.W5,P.fD,F],H([(0,o.MZ)()],V.prototype,"size",void 0),H([(0,o.MZ)({type:Boolean})],V.prototype,"disabled",void 0),H([(0,o.MZ)({type:Boolean})],V.prototype,"fullWidth",void 0),H([(0,o.MZ)({type:Boolean})],V.prototype,"loading",void 0),H([(0,o.MZ)()],V.prototype,"variant",void 0),H([(0,o.MZ)()],V.prototype,"textVariant",void 0),V=H([(0,S.E)("wui-button")],V),i(69622),i(8774),i(40360);let Y=(0,W.AH)` 284 :host { 285 display: block; 286 width: 100px; 287 height: 100px; 288 } 289 290 svg { 291 width: 100px; 292 height: 100px; 293 } 294 295 rect { 296 fill: none; 297 stroke: ${e=>e.colors.accent100}; 298 stroke-width: 3px; 299 stroke-linecap: round; 300 animation: dash 1s linear infinite; 301 } 302 303 @keyframes dash { 304 to { 305 stroke-dashoffset: 0px; 306 } 307 } 308`;var Q=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let G=class extends r.WF{constructor(){super(...arguments),this.radius=36}render(){return this.svgLoaderTemplate()}svgLoaderTemplate(){let e=this.radius>50?50:this.radius,t=36-e;return(0,r.qy)` 309 <svg viewBox="0 0 110 110" width="110" height="110"> 310 <rect 311 x="2" 312 y="2" 313 width="106" 314 height="106" 315 rx=${e} 316 stroke-dasharray="${116+t} ${245+t}" 317 stroke-dashoffset=${360+1.75*t} 318 /> 319 </svg> 320 `}};G.styles=[P.W5,Y],Q([(0,o.MZ)({type:Number})],G.prototype,"radius",void 0),G=Q([(0,S.E)("wui-loading-thumbnail")],G),i(48736),i(94786),i(32846);let X=(0,W.AH)` 321 wui-flex { 322 width: 100%; 323 height: 52px; 324 box-sizing: border-box; 325 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 326 border-radius: ${({borderRadius:e})=>e[5]}; 327 padding-left: ${({spacing:e})=>e[3]}; 328 padding-right: ${({spacing:e})=>e[3]}; 329 display: flex; 330 align-items: center; 331 justify-content: space-between; 332 gap: ${({spacing:e})=>e[6]}; 333 } 334 335 wui-text { 336 color: ${({tokens:e})=>e.theme.textSecondary}; 337 } 338 339 wui-icon { 340 width: 12px; 341 height: 12px; 342 } 343`;var ee=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let et=class extends r.WF{constructor(){super(...arguments),this.disabled=!1,this.label="",this.buttonLabel=""}render(){return(0,r.qy)` 344 <wui-flex justifyContent="space-between" alignItems="center"> 345 <wui-text variant="lg-regular" color="inherit">${this.label}</wui-text> 346 <wui-button variant="accent-secondary" size="sm"> 347 ${this.buttonLabel} 348 <wui-icon name="chevronRight" color="inherit" size="inherit" slot="iconRight"></wui-icon> 349 </wui-button>
349 350 </wui-flex> 351 `}};et.styles=[P.W5,P.fD,X],ee([(0,o.MZ)({type:Boolean})],et.prototype,"disabled",void 0),ee([(0,o.MZ)()],et.prototype,"label",void 0),ee([(0,o.MZ)()],et.prototype,"buttonLabel",void 0),et=ee([(0,S.E)("wui-cta-button")],et);let ei=(0,c.AH)` 352 :host { 353 display: block; 354 padding: 0 ${({spacing:e})=>e["5"]} ${({spacing:e})=>e["5"]}; 355 } 356`;var er=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let eo=class extends r.WF{constructor(){super(...arguments),this.wallet=void 0}render(){if(!this.wallet)return this.style.display="none",null;let{name:e,app_store:t,play_store:i,chrome_store:o,homepage:a}=this.wallet,s=n.w.isMobile(),l=n.w.isIos(),d=n.w.isAndroid(),u=[t,i,a,o].filter(Boolean).length>1,h=c.Zv.getTruncateString({string:e,charsStart:12,charsEnd:0,truncate:"end"});return u&&!s?(0,r.qy)` 357 <wui-cta-button 358 label=${`Don't have ${h}?`} 359 buttonLabel="Get" 360 @click=${()=>f.I.push("Downloads",{wallet:this.wallet})} 361 ></wui-cta-button> 362 `:!u&&a?(0,r.qy)` 363 <wui-cta-button 364 label=${`Don't have ${h}?`} 365 buttonLabel="Get" 366 @click=${this.onHomePage.bind(this)} 367 ></wui-cta-button> 368 `:t&&l?(0,r.qy)` 369 <wui-cta-button 370 label=${`Don't have ${h}?`} 371 buttonLabel="Get" 372 @click=${this.onAppStore.bind(this)} 373 ></wui-cta-button> 374 `:i&&d?(0,r.qy)` 375 <wui-cta-button 376 label=${`Don't have ${h}?`} 377 buttonLabel="Get" 378 @click=${this.onPlayStore.bind(this)} 379 ></wui-cta-button> 380 `:(this.style.display="none",null)}onAppStore(){this.wallet?.app_store&&n.w.openHref(this.wallet.app_store,"_blank")}onPlayStore(){this.wallet?.play_store&&n.w.openHref(this.wallet.play_store,"_blank")}onHomePage(){this.wallet?.homepage&&n.w.openHref(this.wallet.homepage,"_blank")}};eo.styles=[ei],er([(0,o.MZ)({type:Object})],eo.prototype,"wallet",void 0),eo=er([(0,c.EM)("w3m-mobile-download-links")],eo);let en=(0,c.AH)` 381 @keyframes shake { 382 0% { 383 transform: translateX(0); 384 } 385 25% { 386 transform: translateX(3px); 387 } 388 50% { 389 transform: translateX(-3px); 390 } 391 75% { 392 transform: translateX(3px); 393 } 394 100% { 395 transform: translateX(0); 396 } 397 } 398 399 wui-flex:first-child:not(:only-child) { 400 position: relative; 401 } 402 403 wui-wallet-image { 404 width: 56px; 405 height: 56px; 406 } 407 408 wui-loading-thumbnail { 409 position: absolute; 410 } 411 412 wui-icon-box { 413 position: absolute; 414 right: calc(${({spacing:e})=>e["1"]} * -1); 415 bottom: calc(${({spacing:e})=>e["1"]} * -1); 416 opacity: 0; 417 transform: scale(0.5); 418 transition-property: opacity, transform; 419 transition-duration: ${({durations:e})=>e.lg}; 420 transition-timing-function: ${({easings:e})=>e["ease-out-power-2"]}; 421 will-change: opacity, transform; 422 } 423 424 wui-text[align='center'] { 425 width: 100%; 426 padding: 0px ${({spacing:e})=>e["4"]}; 427 } 428 429 [data-error='true'] wui-icon-box { 430 opacity: 1; 431 transform: scale(1); 432 } 433 434 [data-error='true'] > wui-flex:first-child { 435 animation: shake 250ms ${({easings:e})=>e["ease-out-power-2"]} both; 436 } 437 438 [data-retry='false'] wui-link { 439 display: none; 440 } 441 442 [data-retry='true'] wui-link { 443 display: block; 444 opacity: 1; 445 } 446 447 w3m-mobile-download-links { 448 padding: 0px; 449 width: 100%; 450 } 451`;var ea=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};class es extends r.WF{constructor(){super(),this.wallet=f.I.state.data?.wallet,this.connector=f.I.state.data?.connector,this.timeout=void 0,this.secondaryBtnIcon="refresh",this.onConnect=void 0,this.onRender=void 0,this.onAutoConnect=void 0,this.isWalletConnect=!0,this.unsubscribe=[],this.imageSrc=y.$.getConnectorImage(this.connector)??y.$.getWalletImage(this.wallet),this.name=this.wallet?.name??this.connector?.name??"Wallet",this.isRetrying=!1,this.uri=p.x.state.wcUri,this.error=p.x.state.wcError,this.ready=!1,this.showRetry=!1,this.label=void 0,this.secondaryBtnLabel="Try again",this.secondaryLabel="Accept connection request in the wallet",this.isLoading=!1,this.isMobile=!1,this.onRetry=void 0,this.unsubscribe.push(p.x.subscribeKey("wcUri",e=>{this.uri=e,this.isRetrying&&this.onRetry&&(this.isRetrying=!1,this.onConnect?.())}),p.x.subscribeKey("wcError",e=>this.error=e)),(n.w.isTelegram()||n.w.isSafari())&&n.w.isIos()&&p.x.state.wcUri&&this.onConnect?.()}firstUpdated(){this.onAutoConnect?.(),this.showRetry=!this.onAutoConnect}
451disconnectedCallback(){this.unsubscribe.forEach(e=>e()),p.x.setWcError(!1),clearTimeout(this.timeout)}render(){this.onRender?.(),this.onShowRetry();let e=this.error?"Connection can be declined if a previous request is still active":this.secondaryLabel,t="";return this.label?t=this.label:(t=`Continue in ${this.name}`,this.error&&(t="Connection declined")),(0,r.qy)` 452 <wui-flex 453 data-error=${(0,d.J)(this.error)} 454 data-retry=${this.showRetry} 455 flexDirection="column" 456 alignItems="center" 457 .padding=${["10","5","5","5"]} 458 gap="6" 459 > 460 <wui-flex gap="2" justifyContent="center" alignItems="center"> 461 <wui-wallet-image size="lg" imageSrc=${(0,d.J)(this.imageSrc)}></wui-wallet-image> 462 463 ${this.error?null:this.loaderTemplate()} 464 465 <wui-icon-box 466 color="error" 467 icon="close" 468 size="sm" 469 border 470 borderColor="wui-color-bg-125" 471 ></wui-icon-box> 472 </wui-flex> 473 474 <wui-flex flexDirection="column" alignItems="center" gap="6"> <wui-flex 475 flexDirection="column" 476 alignItems="center" 477 gap="2" 478 .padding=${["2","0","0","0"]} 479 > 480 <wui-text align="center" variant="lg-medium" color=${this.error?"error":"primary"}> 481 ${t} 482 </wui-text> 483 <wui-text align="center" variant="lg-regular" color="secondary">${e}</wui-text> 484 </wui-flex> 485 486 ${this.secondaryBtnLabel?(0,r.qy)` 487 <wui-button 488 variant="neutral-secondary" 489 size="md" 490 ?disabled=${this.isRetrying||this.isLoading} 491 @click=${this.onTryAgain.bind(this)} 492 data-testid="w3m-connecting-widget-secondary-button" 493 > 494 <wui-icon 495 color="inherit" 496 slot="iconLeft" 497 name=${this.secondaryBtnIcon} 498 ></wui-icon> 499 ${this.secondaryBtnLabel} 500 </wui-button> 501 `:null} 502 </wui-flex> 503 504 ${this.isWalletConnect?(0,r.qy)` 505 <wui-flex .padding=${["0","5","5","5"]} justifyContent="center"> 506 <wui-link 507 @click=${this.onCopyUri} 508 variant="secondary" 509 icon="copy" 510 data-testid="wui-link-copy" 511 > 512 Copy link 513 </wui-link> 514 </wui-flex> 515 `:null} 516 517 <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links></wui-flex> 518 </wui-flex> 519 `}onShowRetry(){if(this.error&&!this.showRetry){this.showRetry=!0;let e=this.shadowRoot?.querySelector("wui-button");e?.animate([{opacity:0},{opacity:1}],{fill:"forwards",easing:"ease"})}}onTryAgain(){p.x.setWcError(!1),this.onRetry?(this.isRetrying=!0,this.onRetry?.()):this.onConnect?.()}loaderTemplate(){let e=Z.W.state.themeVariables["--w3m-border-radius-master"],t=e?parseInt(e.replace("px",""),10):4;return(0,r.qy)`<wui-loading-thumbnail radius=${9*t}></wui-loading-thumbnail>`}onCopyUri(){try{this.uri&&(n.w.copyToClopboard(this.uri),I.P.showSuccess("Link copied"))}catch{I.P.showError("Failed to copy")}}}es.styles=en,ea([(0,o.wk)()],es.prototype,"isRetrying",void 0),ea([(0,o.wk)()],es.prototype,"uri",void 0),ea([(0,o.wk)()],es.prototype,"error",void 0),ea([(0,o.wk)()],es.prototype,"ready",void 0),ea([(0,o.wk)()],es.prototype,"showRetry",void 0),ea([(0,o.wk)()],es.prototype,"label",void 0),ea([(0,o.wk)()],es.prototype,"secondaryBtnLabel",void 0),ea([(0,o.wk)()],es.prototype,"secondaryLabel",void 0),ea([(0,o.wk)()],es.prototype,"isLoading",void 0),ea([(0,o.MZ)({type:Boolean})],es.prototype,"isMobile",void 0),ea([(0,o.MZ)()],es.prototype,"onRetry",void 0);let el=class extends es{constructor(){if(super(),!this.wallet)throw Error("w3m-connecting-wc-browser: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onAutoConnect=this.onConnectProxy.bind(this),g.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser",dis
519playIndex:this.wallet?.display_index,walletRank:this.wallet.order,view:f.I.state.view}})}async onConnectProxy(){try{this.error=!1;let{connectors:e}=h.a.state,t=e.find(e=>"ANNOUNCED"===e.type&&e.info?.rdns===this.wallet?.rdns||"INJECTED"===e.type||e.name===this.wallet?.name);if(t)await p.x.connectExternal(t,t.chain);else throw Error("w3m-connecting-wc-browser: No connector found");T.W.close(),g.E.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"browser",name:this.wallet?.name||"Unknown",view:f.I.state.view,walletRank:this.wallet?.order}})}catch(e){e instanceof A.A&&e.originalName===E.RQ.PROVIDER_RPC_ERROR_NAME.USER_REJECTED_REQUEST?g.E.sendEvent({type:"track",event:"USER_REJECTED",properties:{message:e.message}}):g.E.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:e?.message??"Unknown"}}),this.error=!0}}};el=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}([(0,c.EM)("w3m-connecting-wc-browser")],el);let ec=class extends es{constructor(){if(super(),!this.wallet)throw Error("w3m-connecting-wc-desktop: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onRender=this.onRenderProxy.bind(this),g.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"desktop",displayIndex:this.wallet?.display_index,walletRank:this.wallet.order,view:f.I.state.view}})}onRenderProxy(){!this.ready&&this.uri&&(this.ready=!0,this.onConnect?.())}onConnectProxy(){if(this.wallet?.desktop_link&&this.uri)try{this.error=!1;let{desktop_link:e,name:t}=this.wallet,{redirect:i,href:r}=n.w.formatNativeUrl(e,this.uri);p.x.setWcLinking({name:t,href:r}),p.x.setRecentWallet(this.wallet),n.w.openHref(i,"_blank")}catch{this.error=!0}}};ec=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}([(0,c.EM)("w3m-connecting-wc-desktop")],ec);var ed=i(72711),eu=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let eh=class extends es{constructor(){if(super(),this.btnLabelTimeout=void 0,this.redirectDeeplink=void 0,this.redirectUniversalLink=void 0,this.target=void 0,this.preferUniversalLinks=a.H.state.experimental_preferUniversalLinks,this.isLoading=!0,this.onConnect=()=>{if(this.wallet?.mobile_link&&this.uri)try{this.error=!1;let{mobile_link:e,link_mode:t,name:i}=this.wallet,{redirect:r,redirectUniversalLink:o,href:a}=n.w.formatNativeUrl(e,this.uri,t);this.redirectDeeplink=r,this.redirectUniversalLink=o,this.target=n.w.isIframe()?"_top":"_self",p.x.setWcLinking({name:i,href:a}),p.x.setRecentWallet(this.wallet),this.preferUniversalLinks&&this.redirectUniversalLink?n.w.openHref(this.redirectUniversalLink,this.target):n.w.openHref(this.redirectDeeplink,this.target)}catch(e){g.E.sendEvent({type:"track",event:"CONNECT_PROXY_ERROR",properties:{message:e instanceof Error?e.message:"Error parsing the deeplink",uri:this.uri,mobile_link:this.wallet.mobile_link,name:this.wallet.name}}),this.error=!0}},!this.wallet)throw Error("w3m-connecting-wc-mobile: No wallet provided");this.secondaryBtnLabel="Open",this.secondaryLabel=ed.oU.CONNECT_LABELS.MOBILE,this.secondaryBtnIcon="externalLink",this.onHandleURI(),this.unsubscribe.push(p.x.subscribeKey("wcUri",()=>{this.onHandleURI()})),g.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"mobile",displayIndex:this.wallet?.display_index,walletRank:this.wallet.order,view:f.I.state.view}})}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.btnLabelTimeout)}onHandleURI(){this.isLoading=!this.uri,!this.ready&&this.uri&&(this.ready=!0,this.onConnect?.())}onTryAgain(){p.x.setWcError(!1),this.onConnect?.()}};eu([(0,o.wk)()],eh.prototype,"redirectDeeplink",void 0),eu([(0,o.wk)()],eh.prototype,"redirectUniversalLink",void 0),eu([(0,o.wk)()],eh.prototype,"target",void 0),eu([(0,o.wk)()],eh.prototype,"preferUniversalLinks",void 0),eu([(0,o.wk)()],eh.prototype,"isLoading",void 0),eh=eu([(0,c.EM)("w3m-connecting-wc-mobile")],eh),i(41252);var ep=i(72643);function eg(e,t,i){return e!==t&&(e-t<0?t-e:e-t)<=i+.1}let ef={generate({uri:e,size:t,logoSize:i,padding:o=8,dotColor:n="var(--apkt-colors-black)"}){let a=[],s=function(e,t){let i=Array.prototype.slice.call(ep.create(e,{errorCorrectionLevel:"Q"}).modules.data,0),r=Math.sqrt(i.length);return i.reduce((e,t,i)=>(i%r==0?e.push([t]):e[e.length-1].push(t))&&e,[])}(e,0),l=(t-2*o)/s.length,c=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];
519c.forEach(({x:e,y:t})=>{let i=(s.length-7)*l*e+o,d=(s.length-7)*l*t+o;for(let e=0;e<c.length;e+=1){let t=l*(7-2*e);a.push((0,r.JW)` 520 <rect 521 fill=${2===e?"var(--apkt-colors-black)":"var(--apkt-colors-white)"} 522 width=${0===e?t-10:t} 523 rx= ${0===e?(t-10)*.45:.45*t} 524 ry= ${0===e?(t-10)*.45:.45*t} 525 stroke=${n} 526 stroke-width=${10*(0===e)} 527 height=${0===e?t-10:t} 528 x= ${0===e?d+l*e+5:d+l*e} 529 y= ${0===e?i+l*e+5:i+l*e} 530 /> 531 `)}});let d=Math.floor((i+25)/l),u=s.length/2-d/2,h=s.length/2+d/2-1,p=[];s.forEach((e,t)=>{e.forEach((e,i)=>{!s[t][i]||t<7&&i<7||t>s.length-8&&i<7||t<7&&i>s.length-8||t>u&&t<h&&i>u&&i<h||p.push([t*l+l/2+o,i*l+l/2+o])})});let g={};return p.forEach(([e,t])=>{g[e]?g[e]?.push(t):g[e]=[t]}),Object.entries(g).map(([e,t])=>{let i=t.filter(e=>t.every(t=>!eg(e,t,l)));return[Number(e),i]}).forEach(([e,t])=>{t.forEach(t=>{a.push((0,r.JW)`<circle cx=${e} cy=${t} fill=${n} r=${l/2.5} />`)})}),Object.entries(g).filter(([e,t])=>t.length>1).map(([e,t])=>{let i=t.filter(e=>t.some(t=>eg(e,t,l)));return[Number(e),i]}).map(([e,t])=>{t.sort((e,t)=>e<t?-1:1);let i=[];for(let e of t){let t=i.find(t=>t.some(t=>eg(e,t,l)));t?t.push(e):i.push([e])}return[e,i.map(e=>[e[0],e[e.length-1]])]}).forEach(([e,t])=>{t.forEach(([t,i])=>{a.push((0,r.JW)` 532 <line 533 x1=${e} 534 x2=${e} 535 y1=${t} 536 y2=${i} 537 stroke=${n} 538 stroke-width=${l/1.25} 539 stroke-linecap="round" 540 /> 541 `)})}),a}},ew=(0,W.AH)` 542 :host { 543 position: relative; 544 user-select: none; 545 display: block; 546 overflow: hidden; 547 aspect-ratio: 1 / 1; 548 width: 100%; 549 height: 100%; 550 background-color: ${({colors:e})=>e.white}; 551 border: 1px solid ${({tokens:e})=>e.theme.borderPrimary}; 552 } 553 554 :host { 555 border-radius: ${({borderRadius:e})=>e[4]}; 556 display: flex; 557 align-items: center; 558 justify-content: center; 559 } 560 561 :host([data-clear='true']) > wui-icon { 562 display: none; 563 } 564 565 svg:first-child, 566 wui-image, 567 wui-icon { 568 position: absolute; 569 top: 50%; 570 left: 50%; 571 transform: translateY(-50%) translateX(-50%); 572 background-color: ${({tokens:e})=>e.theme.backgroundPrimary}; 573 box-shadow: inset 0 0 0 4px ${({tokens:e})=>e.theme.backgroundPrimary}; 574 border-radius: ${({borderRadius:e})=>e[6]}; 575 } 576 577 wui-image { 578 width: 25%; 579 height: 25%; 580 border-radius: ${({borderRadius:e})=>e[2]}; 581 } 582 583 wui-icon { 584 width: 100%; 585 height: 100%; 586 color: #3396ff !important; 587 transform: translateY(-50%) translateX(-50%) scale(0.25); 588 } 589 590 wui-icon > svg { 591 width: inherit; 592 height: inherit; 593 } 594`;var em=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let eb=class extends r.WF{constructor(){super(...arguments),this.uri="",this.size=0,this.theme="dark",this.imageSrc=void 0,this.alt=void 0,this.arenaClear=void 0,this.farcaster=void 0}render(){return this.dataset.theme=this.theme,this.dataset.clear=String(this.arenaClear),this.style.cssText=`--local-size: ${this.size}px`,(0,r.qy)`<wui-flex 595 alignItems="center" 596 justifyContent="center" 597 class="wui-qr-code" 598 direction="column" 599 gap="4" 600 width="100%" 601 style="height: 100%" 602 > 603 ${this.templateVisual()} ${this.templateSvg()} 604 </wui-flex>`}templateSvg(){return(0,r.JW)` 605 <svg height=${this.size} width=${this.size}> 606 ${ef.generate({uri:this.uri,size:this.size,logoSize:this.arenaClear?0:this.size/4})} 607 </svg> 608 `}templateVisual(){return this.imageSrc?(0,r.qy)`<wui-image src=${this.imageSrc} alt=${this.alt??"logo"}></wui-image>`:this.farcaster?(0,r.qy)`<wui-icon 609 class="farcaster" 610 size="inherit" 611 color="inherit" 612 name="farcaster" 613 ></wui-icon>`:(0,r.qy)`<wui-icon size="inherit" color="inherit" name="walletConnect"></wui-icon>`}};eb.styles=[P.W5,ew],em([(0,o.MZ)()],eb.prototype,"uri",void 0),em([(0,o.MZ)({type:Number})],eb.prototype,"size",void 0),em([(0,o.MZ)()],eb.prototype,"theme",void 0),em([(0,o.MZ)()],eb.prototype,"imageSrc",void 0),em([(0,o.MZ)()],eb.prototype,"alt",void 0),em([(0,o.MZ)({type:Boolean})],eb.prototype,"arenaClear",void 0),em([(0,o.MZ)({type:Boolean})],eb.prototype,"farcaster",void 0),eb=em([(0,S.E)("wui-qr-code")],eb);let ey=(0,W.AH)` 614 :host { 615 display: block; 616 background: linear-gradient( 617 90deg, 618 ${({tokens:e})=>e.theme.foregroundSecondary} 0%, 619 ${({tokens:e})=>e.theme.foregroundTertiary} 50%, 620 ${({tokens:e})=>e.theme.foregroundSecondary} 100% 621 ); 622 background-size: 200% 100%; 623 animation: shimmer 1s ease-in-out infinite; 624 border-radius: ${({borderRadius:e})=>e[2]}; 625 } 626 627 :host([data-rounded='true']) { 628 border-radius: ${({borderRadius:e})=>e[16]}; 629 } 630 631 @keyframes shimmer { 632 0% { 633 background-position: 200% 0; 634 } 635 100% { 636 background-position: -200% 0; 637 } 638 } 639`;var ev=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let ex=class extends r.WF{constructor(){super(...arguments),this.width="",this.height="",this.variant="default",this.rounded=!1}render(){return this.style.cssText=` 640 width: ${this.width}; 641 height: ${this.height}; 642 `,this.dataset.rounded=this.rounded?"true":"false",(0,r.qy)`<slot></slot>`}};ex.styles=[ey],ev([(0,o.MZ)()],ex.prototype,"width",void 0),ev([(0,o.MZ)()],ex.prototype,"height",void 0),ev([(0,o.MZ)()],ex.prototype,"variant",void 0),ev([(0,o.MZ)({type:Boolean})],ex.prototype,"rounded",void 0),ex=ev([(0,S.E)("wui-shimmer")],ex),i(72679);let e$=(0,c.AH)` 643 wui-shimmer { 644 width: 100%; 645 aspect-ratio: 1 / 1; 646 border-radius: ${({borderRadius:e})=>e[4]}; 647 } 648 649 wui-qr-code { 650 opacity: 0; 651 animation-duration: ${({durations:e})=>e.xl}; 652 animation-timing-function: ${({easings:e})=>e["ease-out-power-2"]}; 653 animation-name: fade-in; 654 animation-fill-mode: forwards; 655 } 656 657 @keyframes fade-in { 658 from { 659 opacity: 0; 660 } 661 to { 662 opacity: 1; 663 } 664 } 665`;var ek=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let eC=class extends es{constructor(){super(),this.basic=!1,this.forceUpdate=()=>{this.requestUpdate()},window.addEventListener("resize",this.forceUpdate)}firstUpdated(){this.basic||g.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet?.name??"WalletConnect",platform:"qrcode",dis
665playIndex:this.wallet?.display_index,walletRank:this.wallet?.order,view:f.I.state.view}})}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribe?.forEach(e=>e()),window.removeEventListener("resize",this.forceUpdate)}render(){return this.onRenderProxy(),(0,r.qy)` 666 <wui-flex 667 flexDirection="column" 668 alignItems="center" 669 .padding=${["0","5","5","5"]} 670 gap="5" 671 > 672 <wui-shimmer width="100%"> ${this.qrCodeTemplate()} </wui-shimmer> 673 <wui-text variant="lg-medium" color="primary"> Scan this QR Code with your phone </wui-text> 674 ${this.copyTemplate()} 675 </wui-flex> 676 <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links> 677 `}onRenderProxy(){!this.ready&&this.uri&&(this.timeout=setTimeout(()=>{this.ready=!0},200))}qrCodeTemplate(){if(!this.uri||!this.ready)return null;let e=this.getBoundingClientRect().width-40,t=this.wallet?this.wallet.name:void 0;p.x.setWcLinking(void 0),p.x.setRecentWallet(this.wallet);let i=this.uri;if(this.wallet?.mobile_link){let{redirect:e}=n.w.formatNativeUrl(this.wallet?.mobile_link,this.uri,null);i=e}return(0,r.qy)` <wui-qr-code 678 size=${e} 679 theme=${Z.W.state.themeMode} 680 uri=${i} 681 imageSrc=${(0,d.J)(y.$.getWalletImage(this.wallet))} 682 color=${(0,d.J)(Z.W.state.themeVariables["--w3m-qr-color"])} 683 alt=${(0,d.J)(t)} 684 data-testid="wui-qr-code" 685 ></wui-qr-code>`}copyTemplate(){let e=!this.uri||!this.ready;return(0,r.qy)`<wui-button 686 .disabled=${e} 687 @click=${this.onCopyUri} 688 variant="neutral-secondary" 689 size="sm" 690 data-testid="copy-wc2-uri" 691 > 692 Copy link 693 <wui-icon size="sm" color="inherit" name="copy" slot="iconRight"></wui-icon> 694 </wui-button>`}};eC.styles=e$,ek([(0,o.MZ)({type:Boolean})],eC.prototype,"basic",void 0),eC=ek([(0,c.EM)("w3m-connecting-wc-qrcode")],eC);let eE=class extends r.WF{constructor(){if(super(),this.wallet=f.I.state.data?.wallet,!this.wallet)throw Error("w3m-connecting-wc-unsupported: No wallet provided");g.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser",displayIndex:this.wallet?.display_index,walletRank:this.wallet?.order,view:f.I.state.view}})}render(){return(0,r.qy)` 695 <wui-flex 696 flexDirection="column" 697 alignItems="center" 698 .padding=${["10","5","5","5"]} 699 gap="5" 700 > 701 <wui-wallet-image 702 size="lg" 703 imageSrc=${(0,d.J)(y.$.getWalletImage(this.wallet))} 704 ></wui-wallet-image> 705 706 <wui-text variant="md-regular" color="primary">Not Detected</wui-text> 707 </wui-flex> 708 709 <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links> 710 `}};eE=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}([(0,c.EM)("w3m-connecting-wc-unsupported")],eE);var eR=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let eI=class extends es{constructor(){if(super(),this.isLoading=!0,!this.wallet)throw Error("w3m-connecting-wc-web: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.secondaryBtnLabel="Open",this.secondaryLabel=ed.oU.CONNECT_LABELS.MOBILE,this.secondaryBtnIcon="externalLink",this.updateLoadingState(),this.unsubscribe.push(p.x.subscribeKey("wcUri",()=>{this.updateLoadingState()})),g.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"web",displayIndex:this.wallet?.display_index,walletRank:this.wallet?.order,view:f.I.state.view}})}updateLoadingState(){this.isLoading=!this.uri}onConnectProxy(){if(this.wallet?.webapp_link&&this.uri)try{this.error=!1;let{webapp_link:e,name:t}=this.wallet,{redirect:i,href:r}=n.w.formatUniversalUrl(e,this.uri);p.x.setWcLinking({name:t,href:r}),p.x.setRecentWallet(this.wallet),n.w.openHref(i,"_blank")}catch{this.error=!0}}};eR([(0,o.wk)()],eI.prototype,"isLoading",void 0),eI=eR([(0,c.EM)("w3m-connecting-wc-web")],eI);let eT=(0,c.AH)` 711 :host([data-mobile-fullscreen='true']) { 712 height: 100%; 713 display: flex; 714 flex-direction: column; 715 } 716 717 :host([data-mobile-fullscreen='true']) wui-ux-by-reown { 718 margin-top: auto; 719 } 720`;var eA=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let eM=class extends r.WF{constructor(){super(),this.wallet=f.I.state.data?.wallet,this.unsubscribe=[],this.platform=void 0,this.platforms=[],this.isSiwxEnabled=!!a.H.state.siwx,this.remoteFeatures=a.H.state.remoteFeatures,this.displayBranding=!0,this.basic=!1,this.determinePlatforms(),this.initializeConnection(),this.unsubscribe.push(a.H.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e))}
720disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return a.H.state.enableMobileFullScreen&&this.setAttribute("data-mobile-fullscreen","true"),(0,r.qy)` 721 ${this.headerTemplate()} 722 <div class="platform-container">${this.platformTemplate()}</div> 723 ${this.reownBrandingTemplate()} 724 `}reownBrandingTemplate(){return this.remoteFeatures?.reownBranding&&this.displayBranding?(0,r.qy)`<wui-ux-by-reown></wui-ux-by-reown>`:null}async initializeConnection(e=!1){if("browser"!==this.platform&&(!a.H.state.manualWCControl||e))try{let{wcPairingExpiry:t,status:i}=p.x.state,{redirectView:r}=f.I.state.data??{};if(e||a.H.state.enableEmbedded||n.w.isPairingExpired(t)||"connecting"===i){let e=p.x.getConnections(R.W.state.activeChain),t=this.remoteFeatures?.multiWallet,i=e.length>0;await p.x.connectWalletConnect({cache:"never"}),this.isSiwxEnabled||(i&&t?(f.I.replace("ProfileWallets"),I.P.showSuccess("New Wallet Added")):r?f.I.replace(r):T.W.close())}}catch(e){if(e instanceof Error&&e.message.includes("An error occurred when attempting to switch chain")&&!a.H.state.enableNetworkSwitch&&R.W.state.activeChain){R.W.setActiveCaipNetwork(M.R.getUnsupportedNetwork(`${R.W.state.activeChain}:${R.W.state.activeCaipNetwork?.id}`)),R.W.showUnsupportedChainUI();return}e instanceof A.A&&e.originalName===E.RQ.PROVIDER_RPC_ERROR_NAME.USER_REJECTED_REQUEST?g.E.sendEvent({type:"track",event:"USER_REJECTED",properties:{message:e.message}}):g.E.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:e?.message??"Unknown"}}),p.x.setWcError(!0),I.P.showError(e.message??"Connection error"),p.x.resetWcConnection(),f.I.goBack()}}determinePlatforms(){if(!this.wallet){this.platforms.push("qrcode"),this.platform="qrcode";return}if(this.platform)return;let{mobile_link:e,desktop_link:t,webapp_link:i,injected:r,rdns:o}=this.wallet,s=r?.map(({injected_id:e})=>
724e).filter(Boolean),l=[...o?[o]:s??[]],c=!a.H.state.isUniversalProvider&&l.length,d=p.x.checkInstalled(l),u=c&&d,h=t&&!n.w.isMobile();u&&!R.W.state.noAdapters&&this.platforms.push("browser"),e&&this.platforms.push(n.w.isMobile()?"mobile":"qrcode"),i&&this.platforms.push("web"),h&&this.platforms.push("desktop"),u||!c||R.W.state.noAdapters||this.platforms.push("unsupported"),this.platform=this.platforms[0]}platformTemplate(){switch(this.platform){case"browser":return(0,r.qy)`<w3m-connecting-wc-browser></w3m-connecting-wc-browser>`;case"web":return(0,r.qy)`<w3m-connecting-wc-web></w3m-connecting-wc-web>`;case"desktop":return(0,r.qy)` 725 <w3m-connecting-wc-desktop .onRetry=${()=>this.initializeConnection(!0)}> 726 </w3m-connecting-wc-desktop> 727 `;case"mobile":return(0,r.qy)` 728 <w3m-connecting-wc-mobile isMobile .onRetry=${()=>this.initializeConnection(!0)}> 729 </w3m-connecting-wc-mobile> 730 `;case"qrcode":return(0,r.qy)`<w3m-connecting-wc-qrcode ?basic=${this.basic}></w3m-connecting-wc-qrcode>`;default:return(0,r.qy)`<w3m-connecting-wc-unsupported></w3m-connecting-wc-unsupported>`}}headerTemplate(){return this.platforms.length>1?(0,r.qy)` 731 <w3m-connecting-header 732 .platforms=${this.platforms} 733 .onSelectPlatfrom=${this.onSelectPlatform.bind(this)} 734 > 735 </w3m-connecting-header> 736 `:null}async onSelectPlatform(e){let t=this.shadowRoot?.querySelector("div");t&&(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.platform=e,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}};eM.styles=eT,eA([(0,o.wk)()],eM.prototype,"platform",void 0),eA([(0,o.wk)()],eM.prototype,"platforms",void 0),eA([(0,o.wk)()],eM.prototype,"isSiwxEnabled",void 0),eA([(0,o.wk)()],eM.prototype,"remoteFeatures",void 0),eA([(0,o.MZ)({type:Boolean})],eM.prototype,"displayBranding",void 0),eA([(0,o.MZ)({type:Boolean})],eM.prototype,"basic",void 0),eM=eA([(0,c.EM)("w3m-connecting-wc-view")],eM);var eP=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let eS=class extends r.WF{constructor(){super(),this.unsubscribe=[],this.isMobile=n.w.isMobile(),this.remoteFeatures=a.H.state.remoteFeatures,this.unsubscribe.push(a.H.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){if(this.isMobile){let{featured:e,recommended:t}=s.N.state,{customWallets:i}=a.H.state,o=l.i.getRecentWallets(),n=e.length||t.length||i?.length||o.length;return(0,r.qy)`<wui-flex flexDirection="column" gap="2" .margin=${["1","3","3","3"]}> 737 ${n?(0,r.qy)`<w3m-connector-list></w3m-connector-list>`:null} 738 <w3m-all-wallets-widget></w3m-all-wallets-widget> 739 </wui-flex>`}return(0,r.qy)`<wui-flex flexDirection="column" .padding=${["0","0","4","0"]}> 740 <w3m-connecting-wc-view ?basic=${!0} .displayBranding=${!1}></w3m-connecting-wc-view> 741 <wui-flex flexDirection="column" .padding=${["0","3","0","3"]}> 742 <w3m-all-wallets-widget></w3m-all-wallets-widget> 743 </wui-flex> 744 </wui-flex> 745 ${this.reownBrandingTemplate()} `}reownBrandingTemplate(){return this.remoteFeatures?.reownBranding?(0,r.qy)` <wui-flex flexDirection="column" .padding=${["1","0","1","0"]}> 746 <wui-ux-by-reown></wui-ux-by-reown> 747 </wui-flex>`:null}};eP([(0,o.wk)()],eS.prototype,"isMobile",void 0),eP([(0,o.wk)()],eS.prototype,"remoteFeatures",void 0),eS=eP([(0,c.EM)("w3m-connecting-wc-basic-view")],eS);var eW=i(11008);let{I:eN}=eW.ge;var eL=i(79706);let eB=(e,t)=>{let i=e._$AN;if(void 0===i)return!1;for(let e of i)e._$AO?.(t,!1),eB(e,t);return!0},eO=e=>{let t,i;do{if(void 0===(t=e._$AM))break;(i=t._$AN).delete(e),e=t}while(0===i?.size)},ej=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),e_(t)}
747};function ez(e){void 0!==this._$AN?(eO(this),this._$AM=e,ej(this)):this._$AM=e}function eq(e,t=!1,i=0){let r=this._$AH,o=this._$AN;if(void 0!==o&&0!==o.size)if(t)if(Array.isArray(r))for(let e=i;e<r.length;e++)eB(r[e],!1),eO(r[e]);else null!=r&&(eB(r,!1),eO(r));else eB(this,e)}let e_=e=>{e.type==eL.OA.CHILD&&(e._$AP??=eq,e._$AQ??=ez)};class eD extends eL.WL{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,i){super._$AT(e,t,i),ej(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(eB(this,e),eO(this))}setValue(e){if(void 0===this._$Ct.strings)this._$Ct._$AI(e,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}}let eU=()=>new eZ;class eZ{}let eF=new WeakMap,eH=(0,eL.u$)(class extends eD{render(e){return eW.s6}update(e,[t]){let i=t!==this.G;return i&&void 0!==this.G&&this.rt(void 0),(i||this.lt!==this.ct)&&(this.G=t,this.ht=e.options?.host,this.rt(this.ct=e.element)),eW.s6}rt(e){if(this.isConnected||(e=void 0),"function"==typeof this.G){let t=this.ht??globalThis,i=eF.get(t);void 0===i&&(i=new WeakMap,eF.set(t,i)),void 0!==i.get(this.G)&&this.G.call(this.ht,void 0),i.set(this.G,e),void 0!==e&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){return"function"==typeof this.G?eF.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),eJ=(0,W.AH)` 748 :host { 749 display: flex; 750 align-items: center; 751 justify-content: center; 752 } 753 754 label { 755 position: relative; 756 display: inline-block; 757 user-select: none; 758 transition: 759 background-color ${({durations:e})=>e.lg} 760 ${({easings:e})=>e["ease-out-power-2"]}, 761 color ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, 762 border ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, 763 box-shadow ${({durations:e})=>e.lg} 764 ${({easings:e})=>e["ease-out-power-2"]}, 765 width ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, 766 height ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, 767 transform ${({durations:e})=>e.lg} 768 ${({easings:e})=>e["ease-out-power-2"]}, 769 opacity ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}; 770 will-change: background-color, color, border, box-shadow, width, height, transform, opacity; 771 } 772 773 input { 774 width: 0; 775 height: 0; 776 opacity: 0; 777 } 778 779 span { 780 position: absolute; 781 cursor: pointer; 782 top: 0; 783 left: 0; 784 right: 0; 785 bottom: 0; 786 background-color: ${({colors:e})=>e.neutrals300}; 787 border-radius: ${({borderRadius:e})=>e.round}; 788 border: 1px solid transparent; 789 will-change: border; 790 transition: 791 background-color ${({durations:e})=>e.lg} 792 ${({easings:e})=>e["ease-out-power-2"]}, 793 color ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, 794 border ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, 795 box-shadow ${({durations:e})=>e.lg} 796 ${({easings:e})=>e["ease-out-power-2"]}, 797 width ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, 798 height ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, 799 transform ${({durations:e})=>e.lg} 800 ${({easings:e})=>e["ease-out-power-2"]}, 801 opacity ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}; 802 will-change: background-color, color, border, box-shadow, width, height, transform, opacity; 803 } 804 805 span:before { 806 content: ''; 807 position: absolute; 808 background-color: ${({colors:e})=>e.white}; 809 border-radius: 50%; 810 } 811 812 /* -- Sizes --------------------------------------------------------- */ 813 label[data-size='lg'] { 814 width: 48px; 815 height: 32px; 816 } 817 818 label[data-size='md'] { 819 width: 40px; 820 height: 28px; 821 } 822 823 label[data-size='sm'] { 824 width: 32px; 825 height: 22px; 826 } 827 828 label[data-size='lg'] > span:before { 829 height: 24px; 830 width: 24px; 831 left: 4px; 832 top: 3px; 833 } 834 835 label[data-size='md'] > span:before { 836 height: 20px;
837 width: 20px; 838 left: 4px; 839 top: 3px; 840 } 841 842 label[data-size='sm'] > span:before { 843 height: 16px; 844 width: 16px; 845 left: 3px; 846 top: 2px; 847 } 848 849 /* -- Focus states --------------------------------------------------- */ 850 input:focus-visible:not(:checked) + span, 851 input:focus:not(:checked) + span { 852 border: 1px solid ${({tokens:e})=>e.core.iconAccentPrimary}; 853 background-color: ${({tokens:e})=>e.theme.textTertiary}; 854 box-shadow: 0px 0px 0px 4px rgba(9, 136, 240, 0.2); 855 } 856 857 input:focus-visible:checked + span, 858 input:focus:checked + span { 859 border: 1px solid ${({tokens:e})=>e.core.iconAccentPrimary}; 860 box-shadow: 0px 0px 0px 4px rgba(9, 136, 240, 0.2); 861 } 862 863 /* -- Checked states --------------------------------------------------- */ 864 input:checked + span { 865 background-color: ${({tokens:e})=>e.core.iconAccentPrimary}; 866 } 867 868 label[data-size='lg'] > input:checked + span:before { 869 transform: translateX(calc(100% - 9px)); 870 } 871 872 label[data-size='md'] > input:checked + span:before { 873 transform: translateX(calc(100% - 9px)); 874 } 875 876 label[data-size='sm'] > input:checked + span:before { 877 transform: translateX(calc(100% - 7px)); 878 } 879 880 /* -- Hover states ------------------------------------------------------- */ 881 label:hover > input:not(:checked):not(:disabled) + span { 882 background-color: ${({colors:e})=>e.neutrals400}; 883 } 884 885 label:hover > input:checked:not(:disabled) + span { 886 background-color: ${({colors:e})=>e.accent080}; 887 } 888 889 /* -- Disabled state --------------------------------------------------- */ 890 label:has(input:disabled) { 891 pointer-events: none; 892 user-select: none; 893 } 894 895 input:not(:checked):disabled + span { 896 background-color: ${({colors:e})=>e.neutrals700}; 897 } 898 899 input:checked:disabled + span { 900 background-color: ${({colors:e})=>e.neutrals700}; 901 } 902 903 input:not(:checked):disabled + span::before { 904 background-color: ${({colors:e})=>e.neutrals400}; 905 } 906 907 input:checked:disabled + span::before { 908 background-color: ${({tokens:e})=>e.theme.textTertiary}; 909 } 910`;var eK=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let eV=class extends r.WF{constructor(){super(...arguments),this.inputElementRef=eU(),this.checked=!1,this.disabled=!1,this.size="md"}render(){return(0,r.qy)` 911 <label data-size=${this.size}> 912 <input 913 ${eH(this.inputElementRef)} 914 type="checkbox" 915 ?checked=${this.checked} 916 ?disabled=${this.disabled} 917 @change=${this.dispatchChangeEvent.bind(this)} 918 /> 919 <span></span> 920 </label> 921 `}dispatchChangeEvent(){this.dispatchEvent(new CustomEvent("switchChange",{detail:this.inputElementRef.value?.checked,bubbles:!0,composed:!0}))}};eV.styles=[P.W5,P.fD,eJ],eK([(0,o.MZ)({type:Boolean})],eV.prototype,"checked",void 0),eK([(0,o.MZ)({type:Boolean})],eV.prototype,"disabled",void 0),eK([(0,o.MZ)()],eV.prototype,"size",void 0),eV=eK([(0,S.E)("wui-toggle")],eV);let eY=(0,W.AH)` 922 :host { 923 height: auto; 924 } 925 926 :host > wui-flex { 927 height: 100%; 928 display: flex; 929 align-items: center; 930 justify-content: center; 931 column-gap: ${({spacing:e})=>e["2"]}; 932 padding: ${({spacing:e})=>e["2"]} ${({spacing:e})=>e["3"]}; 933 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 934 border-radius: ${({borderRadius:e})=>e["4"]}; 935 box-shadow: inset 0 0 0 1px ${({tokens:e})=>e.theme.foregroundPrimary}; 936 transition: background-color ${({durations:e})=>e.lg} 937 ${({easings:e})=>e["ease-out-power-2"]}; 938 will-change: background-color; 939 cursor: pointer; 940 } 941 942 wui-switch { 943 pointer-events: none; 944 } 945`;var eQ=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let eG=class extends r.WF{constructor(){super(...arguments),this.checked=!1}
945render(){return(0,r.qy)` 946 <wui-flex> 947 <wui-icon size="xl" name="walletConnectBrown"></wui-icon> 948 <wui-toggle 949 ?checked=${this.checked} 950 size="sm" 951 @switchChange=${this.handleToggleChange.bind(this)} 952 ></wui-toggle> 953 </wui-flex> 954 `}handleToggleChange(e){e.stopPropagation(),this.checked=e.detail,this.dispatchSwitchEvent()}dispatchSwitchEvent(){this.dispatchEvent(new CustomEvent("certifiedSwitchChange",{detail:this.checked,bubbles:!0,composed:!0}))}};eG.styles=[P.W5,P.fD,eY],eQ([(0,o.MZ)({type:Boolean})],eG.prototype,"checked",void 0),eG=eQ([(0,S.E)("wui-certified-switch")],eG);let eX=(0,W.AH)` 955 :host { 956 position: relative; 957 width: 100%; 958 display: inline-flex; 959 flex-direction: column; 960 gap: ${({spacing:e})=>e[3]}; 961 color: ${({tokens:e})=>e.theme.textPrimary}; 962 caret-color: ${({tokens:e})=>e.core.textAccentPrimary}; 963 } 964 965 .wui-input-text-container { 966 position: relative; 967 display: flex; 968 } 969 970 input { 971 width: 100%; 972 border-radius: ${({borderRadius:e})=>e[4]}; 973 color: inherit; 974 background: transparent; 975 border: 1px solid ${({tokens:e})=>e.theme.borderPrimary}; 976 caret-color: ${({tokens:e})=>e.core.textAccentPrimary}; 977 padding: ${({spacing:e})=>e[3]} ${({spacing:e})=>e[3]} 978 ${({spacing:e})=>e[3]} ${({spacing:e})=>e[10]}; 979 font-size: ${({textSize:e})=>e.large}; 980 line-height: ${({typography:e})=>e["lg-regular"].lineHeight}; 981 letter-spacing: ${({typography:e})=>e["lg-regular"].letterSpacing}; 982 font-weight: ${({fontWeight:e})=>e.regular}; 983 font-family: ${({fontFamily:e})=>e.regular}; 984 } 985 986 input[data-size='lg'] { 987 padding: ${({spacing:e})=>e[4]} ${({spacing:e})=>e[3]} 988 ${({spacing:e})=>e[4]} ${({spacing:e})=>e[10]}; 989 } 990 991 @media (hover: hover) and (pointer: fine) { 992 input:hover:enabled { 993 border: 1px solid ${({tokens:e})=>e.theme.borderSecondary}; 994 } 995 } 996 997 input:disabled { 998 cursor: unset; 999 border: 1px solid ${({tokens:e})=>e.theme.borderPrimary}; 1000 } 1001 1002 input::placeholder { 1003 color: ${({tokens:e})=>e.theme.textSecondary}; 1004 } 1005 1006 input:focus:enabled { 1007 border: 1px solid ${({tokens:e})=>e.theme.borderSecondary}; 1008 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 1009 -webkit-box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent040}; 1010 -moz-box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent040}; 1011 box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent040}; 1012 } 1013 1014 div.wui-input-text-container:has(input:disabled) { 1015 opacity: 0.5; 1016 } 1017 1018 wui-icon.wui-input-text-left-icon { 1019 position: absolute; 1020 top: 50%; 1021 transform: translateY(-50%); 1022 pointer-events: none; 1023 left: ${({spacing:e})=>e[4]}; 1024 color: ${({tokens:e})=>e.theme.iconDefault}; 1025 } 1026 1027 button.wui-input-text-submit-button { 1028 position: absolute; 1029 top: 50%; 1030 transform: translateY(-50%); 1031 right: ${({spacing:e})=>e[3]}; 1032 width: 24px; 1033 height: 24px; 1034 border: none; 1035 background: transparent; 1036 border-radius: ${({borderRadius:e})=>e[2]}; 1037 color: ${({tokens:e})=>e.core.textAccentPrimary}; 1038 } 1039 1040 button.wui-input-text-submit-button:disabled { 1041 opacity: 1; 1042 } 1043 1044 button.wui-input-text-submit-button.loading wui-icon { 1045 animation: spin 1s linear infinite; 1046 } 1047 1048 button.wui-input-text-submit-button:hover { 1049 background: ${({tokens:e})=>e.core.foregroundAccent010}; 1050 } 1051 1052 input:has(+ .wui-input-text-submit-button) { 1053 padding-right: ${({spacing:e})=>e[12]}; 1054 } 1055 1056 input[type='number'] { 1057 -moz-appearance: textfield; 1058 } 1059 1060 input[type='search']::-webkit-search-decoration, 1061 input[type='search']::-webkit-search-cancel-button, 1062 input[type='search']::-webkit-search-results-button, 1063 input[type='search']::-webkit-search-results-decoration { 1064 -webkit-appearance: none; 1065 } 1066 1067 /* -- Keyframes --------------------------------------------------- */ 1068 @keyframes spin { 1069 from { 1070 transform: rotate(0deg); 1071 } 1072 to { 1073 transform: rotate(360deg); 1074 } 1075 } 1076`;var e0=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let e1=class extends r.WF{constructor(){super(...arguments),this.inputElementRef=eU(),this.disabled=!1,this.loading=!1,this.placeholder="",this.type="text",this.value="",this.size="md"}render(){return(0,r.qy)` <div class="wui-input-text-container"> 1077 ${this.templateLeftIcon()} 1078 <input 1079 data-size=${this.size} 1080 ${eH(this.inputElementRef)} 1081 data-testid="wui-input-text" 1082 type=${this.type} 1083 enterkeyhint=${(0,d.J)(this.enterKeyHint)} 1084 ?disabled=${this.disabled} 1085 placeholder=${this.placeholder}
1086 @input=${this.dispatchInputChangeEvent.bind(this)} 1087 @keydown=${this.onKeyDown} 1088 .value=${this.value||""} 1089 /> 1090 ${this.templateSubmitButton()} 1091 <slot class="wui-input-text-slot"></slot> 1092 </div> 1093 ${this.templateError()} ${this.templateWarning()}`}templateLeftIcon(){return this.icon?(0,r.qy)`<wui-icon 1094 class="wui-input-text-left-icon" 1095 size="md" 1096 data-size=${this.size} 1097 color="inherit" 1098 name=${this.icon} 1099 ></wui-icon>`:null}templateSubmitButton(){return this.onSubmit?(0,r.qy)`<button 1100 class="wui-input-text-submit-button ${this.loading?"loading":""}" 1101 @click=${this.onSubmit?.bind(this)} 1102 ?disabled=${this.disabled||this.loading} 1103 > 1104 ${this.loading?(0,r.qy)`<wui-icon name="spinner" size="md"></wui-icon>`:(0,r.qy)`<wui-icon name="chevronRight" size="md"></wui-icon>`} 1105 </button>`:null}templateError(){return this.errorText?(0,r.qy)`<wui-text variant="sm-regular" color="error">${this.errorText}</wui-text>`:null}templateWarning(){return this.warningText?(0,r.qy)`<wui-text variant="sm-regular" color="warning">${this.warningText}</wui-text>`:null}dispatchInputChangeEvent(){this.dispatchEvent(new CustomEvent("inputChange",{detail:this.inputElementRef.value?.value,bubbles:!0,composed:!0}))}};e1.styles=[P.W5,P.fD,eX],e0([(0,o.MZ)()],e1.prototype,"icon",void 0),e0([(0,o.MZ)({type:Boolean})],e1.prototype,"disabled",void 0),e0([(0,o.MZ)({type:Boolean})],e1.prototype,"loading",void 0),e0([(0,o.MZ)()],e1.prototype,"placeholder",void 0),e0([(0,o.MZ)()],e1.prototype,"type",void 0),e0([(0,o.MZ)()],e1.prototype,"value",void 0),e0([(0,o.MZ)()],e1.prototype,"errorText",void 0),e0([(0,o.MZ)()],e1.prototype,"warningText",void 0),e0([(0,o.MZ)()],e1.prototype,"onSubmit",void 0),e0([(0,o.MZ)()],e1.prototype,"size",void 0),e0([(0,o.MZ)({attribute:!1})],e1.prototype,"onKeyDown",void 0),e1=e0([(0,S.E)("wui-input-text")],e1);let e2=(0,W.AH)` 1106 :host { 1107 position: relative; 1108 display: inline-block; 1109 width: 100%; 1110 } 1111 1112 wui-icon { 1113 position: absolute; 1114 top: 50%; 1115 transform: translateY(-50%); 1116 right: ${({spacing:e})=>e[3]}; 1117 color: ${({tokens:e})=>e.theme.iconDefault}; 1118 cursor: pointer; 1119 padding: ${({spacing:e})=>e[2]}; 1120 background-color: transparent; 1121 border-radius: ${({borderRadius:e})=>e[4]}; 1122 transition: background-color ${({durations:e})=>e.lg} 1123 ${({easings:e})=>e["ease-out-power-2"]}; 1124 } 1125 1126 @media (hover: hover) { 1127 wui-icon:hover { 1128 background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; 1129 } 1130 } 1131`;var e3=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let e5=class extends r.WF{constructor(){super(...arguments),this.inputComponentRef=eU(),this.inputValue=""}render(){return(0,r.qy)` 1132 <wui-input-text 1133 ${eH(this.inputComponentRef)} 1134 placeholder="Search wallet" 1135 icon="search" 1136 type="search" 1137 enterKeyHint="search" 1138 size="sm" 1139 @inputChange=${this.onInputChange} 1140 > 1141 ${this.inputValue?(0,r.qy)`<wui-icon 1142 @click=${this.clearValue} 1143 color="inherit" 1144 size="sm" 1145 name="close" 1146 ></wui-icon>`:null} 1147 </wui-input-text> 1148 `}onInputChange(e){this.inputValue=e.detail||""}clearValue(){let e=this.inputComponentRef.value,t=e?.inputElementRef.value;t&&(t.value="",this.inputValue="",t.focus(),t.dispatchEvent(new Event("input")))}};e5.styles=[P.W5,e2],e3([(0,o.MZ)()],e5.prototype,"inputValue",void 0),e5=e3([(0,S.E)("wui-search-bar")],e5);let e4=(0,r.JW)`<svg viewBox="0 0 48 54" fill="none"> 1149 <path 1150 d="M43.4605 10.7248L28.0485 1.61089C25.5438 0.129705 22.4562 0.129705 19.9515 1.61088L4.53951 10.7248C2.03626 12.2051 0.5 14.9365 0.5 17.886V36.1139C0.5 39.0635 2.03626 41.7949 4.53951 43.2752L19.9515 52.3891C22.4562 53.8703 25.5438 53.8703 28.0485 52.3891L43.4605 43.2752C45.9637 41.7949 47.5 39.0635 47.5 36.114V17.8861C47.5 14.9365 45.9637 12.2051 43.4605 10.7248Z" 1151 /> 1152</svg>`,e6=(0,W.AH)` 1153 :host { 1154 display: flex; 1155 flex-direction: column; 1156 justify-content: center;
1157 align-items: center; 1158 height: 104px; 1159 width: 104px; 1160 row-gap: ${({spacing:e})=>e[2]}; 1161 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 1162 border-radius: ${({borderRadius:e})=>e[5]}; 1163 position: relative; 1164 } 1165 1166 wui-shimmer[data-type='network'] { 1167 border: none; 1168 -webkit-clip-path: var(--apkt-path-network); 1169 clip-path: var(--apkt-path-network); 1170 } 1171 1172 svg { 1173 position: absolute; 1174 width: 48px; 1175 height: 54px; 1176 z-index: 1; 1177 } 1178 1179 svg > path { 1180 stroke: ${({tokens:e})=>e.theme.foregroundSecondary}; 1181 stroke-width: 1px; 1182 } 1183 1184 @media (max-width: 350px) { 1185 :host { 1186 width: 100%; 1187 } 1188 } 1189`;var e8=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let e7=class extends r.WF{constructor(){super(...arguments),this.type="wallet"}render(){return(0,r.qy)` 1190 ${this.shimmerTemplate()} 1191 <wui-shimmer width="80px" height="20px"></wui-shimmer> 1192 `}shimmerTemplate(){return"network"===this.type?(0,r.qy)` <wui-shimmer data-type=${this.type} width="48px" height="54px"></wui-shimmer> 1193 ${e4}`:(0,r.qy)`<wui-shimmer width="56px" height="56px"></wui-shimmer>`}};e7.styles=[P.W5,P.fD,e6],e8([(0,o.MZ)()],e7.prototype,"type",void 0),e7=e8([(0,S.E)("wui-card-select-loader")],e7);var e9=i(90670);let te=(0,r.AH)` 1194 :host { 1195 display: grid; 1196 width: inherit; 1197 height: inherit; 1198 } 1199`;var tt=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let ti=class extends r.WF{render(){return this.style.cssText=` 1200 grid-template-rows: ${this.gridTemplateRows}; 1201 grid-template-columns: ${this.gridTemplateColumns}; 1202 justify-items: ${this.justifyItems}; 1203 align-items: ${this.alignItems}; 1204 justify-content: ${this.justifyContent}; 1205 align-content: ${this.alignContent}; 1206 column-gap: ${this.columnGap&&`var(--apkt-spacing-${this.columnGap})`}; 1207 row-gap: ${this.rowGap&&`var(--apkt-spacing-${this.rowGap})`}; 1208 gap: ${this.gap&&`var(--apkt-spacing-${this.gap})`}; 1209 padding-top: ${this.padding&&e9.Z.getSpacingStyles(this.padding,0)}; 1210 padding-right: ${this.padding&&e9.Z.getSpacingStyles(this.padding,1)}; 1211 padding-bottom: ${this.padding&&e9.Z.getSpacingStyles(this.padding,2)}; 1212 padding-left: ${this.padding&&e9.Z.getSpacingStyles(this.padding,3)}; 1213 margin-top: ${this.margin&&e9.Z.getSpacingStyles(this.margin,0)}; 1214 margin-right: ${this.margin&&e9.Z.getSpacingStyles(this.margin,1)}; 1215 margin-bottom: ${this.margin&&e9.Z.getSpacingStyles(this.margin,2)}; 1216 margin-left: ${this.margin&&e9.Z.getSpacingStyles(this.margin,3)}; 1217 `,(0,r.qy)`<slot></slot>`}};ti.styles=[P.W5,te],tt([(0,o.MZ)()],ti.prototype,"gridTemplateRows",void 0),tt([(0,o.MZ)()],ti.prototype,"gridTemplateColumns",void 0),tt([(0,o.MZ)()],ti.prototype,"justifyItems",void 0),tt([(0,o.MZ)()],ti.prototype,"alignItems",void 0),tt([(0,o.MZ)()],ti.prototype,"justifyContent",void 0),tt([(0,o.MZ)()],ti.prototype,"alignContent",void 0),tt([(0,o.MZ)()],ti.prototype,"columnGap",void 0),tt([(0,o.MZ)()],ti.prototype,"rowGap",void 0),tt([(0,o.MZ)()],ti.prototype,"gap",void 0),tt([(0,o.MZ)()],ti.prototype,"padding",void 0),tt([(0,o.MZ)()],ti.prototype,"margin",void 0),ti=tt([(0,S.E)("wui-grid")],ti);var tr=i(81983);let to=(0,c.AH)` 1218 button { 1219 display: flex; 1220 flex-direction: column; 1221 justify-content: center; 1222 align-items: center; 1223 cursor: pointer; 1224 width: 104px; 1225 row-gap: ${({spacing:e})=>e["2"]}; 1226 padding: ${({spacing:e})=>e["3"]} ${({spacing:e})=>e["0"]}; 1227 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 1228 border-radius: clamp(0px, ${({borderRadius:e})=>e["4"]}, 20px); 1229 transition: 1230 color ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-1"]}, 1231 background-color ${({durations:e})=>e.lg} 1232 ${({easings:e})=>e["ease-out-power-1"]}, 1233 border-radius ${({durations:e})=>e.lg} 1234 ${({easings:e})=>e["ease-out-power-1"]}; 1235 will-change: background-color, color, border-radius; 1236 outline: none; 1237 border: none; 1238 } 1239 1240 button > wui-flex > wui-text { 1241 color: ${({tokens:e})=>e.theme.textPrimary}; 1242 max-width: 86px; 1243 white-space: nowrap; 1244 overflow: hidden; 1245 text-overflow: ellipsis; 1246 justify-content: center; 1247 } 1248 1249 button > wui-flex > wui-text.certified { 1250 max-width: 66px; 1251 } 1252 1253 @media (hover: hover) and (pointer: fine) { 1254 button:hover:enabled { 1255 background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; 1256 } 1257 } 1258 1259 button:disabled > wui-flex > wui-text { 1260 color: ${({tokens:e})=>e.core.glass010}; 1261 } 1262 1263 [data-selected='true'] { 1264 background-color: ${({colors:e})=>e.accent020}; 1265 } 1266 1267 @media (hover: hover) and (pointer: fine) { 1268 [data-selected='true']:hover:enabled { 1269 background-color: ${({colors:e})=>e.accent010}; 1270 } 1271 } 1272 1273 [data-selected='true']:active:enabled { 1274 background-color: ${({colors:e})=>e.accent010}; 1275 } 1276 1277 @media (max-width: 350px) { 1278 button { 1279 width: 100%; 1280 } 1281 } 1282`;var tn=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let ta=class extends r.WF{constructor(){super(),this.observer=new IntersectionObserver(()=>void 0),this.visible=!1,this.imageSrc=void 0,this.imageLoading=!1,this.isImpressed=!1,this.explorerId="",this.walletQuery="",this.certified=!1,this.displayIndex=0,this.wallet=void 0,this.observer=new IntersectionObserver(e=>
1282{e.forEach(e=>{e.isIntersecting?(this.visible=!0,this.fetchImageSrc(),this.sendImpressionEvent()):this.visible=!1})},{threshold:.01})}firstUpdated(){this.observer.observe(this)}disconnectedCallback(){this.observer.disconnect()}render(){let e=this.wallet?.badge_type==="certified";return(0,r.qy)` 1283 <button> 1284 ${this.imageTemplate()} 1285 <wui-flex flexDirection="row" alignItems="center" justifyContent="center" gap="1"> 1286 <wui-text 1287 variant="md-regular" 1288 color="inherit" 1289 class=${(0,d.J)(e?"certified":void 0)} 1290 >${this.wallet?.name}</wui-text 1291 > 1292 ${e?(0,r.qy)`<wui-icon size="sm" name="walletConnectBrown"></wui-icon>`:null} 1293 </wui-flex> 1294 </button> 1295 `}imageTemplate(){return(this.visible||this.imageSrc)&&!this.imageLoading?(0,r.qy)` 1296 <wui-wallet-image 1297 size="lg" 1298 imageSrc=${(0,d.J)(this.imageSrc)} 1299 name=${(0,d.J)(this.wallet?.name)} 1300 .installed=${this.wallet?.installed??!1} 1301 badgeSize="sm" 1302 > 1303 </wui-wallet-image> 1304 `:this.shimmerTemplate()}shimmerTemplate(){return(0,r.qy)`<wui-shimmer width="56px" height="56px"></wui-shimmer>`}async fetchImageSrc(){this.wallet&&(this.imageSrc=y.$.getWalletImage(this.wallet),this.imageSrc||(this.imageLoading=!0,this.imageSrc=await y.$.fetchWalletImage(this.wallet.image_id),this.imageLoading=!1))}sendImpressionEvent(){this.wallet&&!this.isImpressed&&(this.isImpressed=!0,g.E.sendWalletImpressionEvent({name:this.wallet.name,walletRank:this.wallet.order,explorerId:this.explorerId,view:f.I.state.view,query:this.walletQuery,certified:this.certified,displayIndex:this.displayIndex}))}};ta.styles=to,tn([(0,o.wk)()],ta.prototype,"visible",void 0),tn([(0,o.wk)()],ta.prototype,"imageSrc",void 0),tn([(0,o.wk)()],ta.prototype,"imageLoading",void 0),tn([(0,o.wk)()],ta.prototype,"isImpressed",void 0),tn([(0,o.MZ)()],ta.prototype,"explorerId",void 0),tn([(0,o.MZ)()],ta.prototype,"walletQuery",void 0),tn([(0,o.MZ)()],ta.prototype,"certified",void 0),tn([(0,o.MZ)()],ta.prototype,"displayIndex",void 0),tn([(0,o.MZ)({type:Object})],ta.prototype,"wallet",void 0),ta=tn([(0,c.EM)("w3m-all-wallets-list-item")],ta);let ts=(0,c.AH)` 1305 wui-grid { 1306 max-height: clamp(360px, 400px, 80vh); 1307 overflow: scroll; 1308 scrollbar-width: none; 1309 grid-auto-rows: min-content; 1310 grid-template-columns: repeat(auto-fill, 104px); 1311 } 1312 1313 :host([data-mobile-fullscreen='true']) wui-grid { 1314 max-height: none; 1315 } 1316 1317 @media (max-width: 350px) { 1318 wui-grid { 1319 grid-template-columns: repeat(2, 1fr); 1320 } 1321 } 1322 1323 wui-grid[data-scroll='false'] { 1324 overflow: hidden; 1325 } 1326 1327 wui-grid::-webkit-scrollbar {
1328 display: none; 1329 } 1330 1331 w3m-all-wallets-list-item { 1332 opacity: 0; 1333 animation-duration: ${({durations:e})=>e.xl}; 1334 animation-timing-function: ${({easings:e})=>e["ease-inout-power-2"]}; 1335 animation-name: fade-in; 1336 animation-fill-mode: forwards; 1337 } 1338 1339 @keyframes fade-in { 1340 from { 1341 opacity: 0; 1342 } 1343 to { 1344 opacity: 1; 1345 } 1346 } 1347 1348 wui-loading-spinner { 1349 padding-top: ${({spacing:e})=>e["4"]}; 1350 padding-bottom: ${({spacing:e})=>e["4"]}; 1351 justify-content: center; 1352 grid-column: 1 / span 4; 1353 } 1354`;var tl=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let tc="local-paginator",td=class extends r.WF{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.loading=!s.N.state.wallets.length,this.wallets=s.N.state.wallets,this.recommended=s.N.state.recommended,this.featured=s.N.state.featured,this.filteredWallets=s.N.state.filteredWallets,this.mobileFullScreen=a.H.state.enableMobileFullScreen,this.unsubscribe.push(s.N.subscribeKey("wallets",e=>this.wallets=e),s.N.subscribeKey("recommended",e=>this.recommended=e),s.N.subscribeKey("featured",e=>this.featured=e),s.N.subscribeKey("filteredWallets",e=>this.filteredWallets=e))}firstUpdated(){this.initialFetch(),this.createPaginationObserver()}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),this.paginationObserver?.disconnect()}render(){return this.mobileFullScreen&&this.setAttribute("data-mobile-fullscreen","true"),(0,r.qy)` 1355 <wui-grid 1356 data-scroll=${!this.loading} 1357 .padding=${["0","3","3","3"]} 1358 gap="2" 1359 justifyContent="space-between" 1360 > 1361 ${this.loading?this.shimmerTemplate(16):this.walletsTemplate()} 1362 ${this.paginationLoaderTemplate()} 1363 </wui-grid> 1364 `}async initialFetch(){this.loading=!0;let e=this.shadowRoot?.querySelector("wui-grid");e&&(await s.N.fetchWalletsByPage({page:1}),await e.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.loading=!1,e.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}shimmerTemplate(e,t){return[...Array(e)].map(()=>(0,r.qy)` 1365 <wui-card-select-loader type="wallet" id=${(0,d.J)(t)}></wui-card-select-loader> 1366 `)}getWallets(){let e=[...this.featured,...this.recommended];this.filteredWallets?.length>0?e.push(...this.filteredWallets):e.push(...this.wallets);let t=n.w.uniqueBy(e,"id"),i=tr.A.markWalletsAsInstalled(t);return tr.A.markWalletsWithDisplayIndex(i)}walletsTemplate(){return this.getWallets().map((e,t)=>(0,r.qy)` 1367 <w3m-all-wallets-list-item 1368 data-testid="wallet-search-item-${e.id}" 1369 @click=${()=>this.onConnectWallet(e)} 1370 .wallet=${e} 1371 explorerId=${e.id} 1372 certified=${"certified"===this.badge} 1373 displayIndex=${t} 1374 ></w3m-all-wallets-list-item> 1375 `)}paginationLoaderTemplate(){let{wallets:e,recommended:t,featured:i,count:r,mobileFilteredOutWalletsLength:o}=s.N.state,n=window.innerWidth<352?3:4,a=e.length+t.length,l=Math.ceil(a/n)*n-a+n;return(l-=e.length?i.length%n:0,0===r&&i.length>0)?null:0===r||[...i,...e,...t].length<r-(o??0)?this.shimmerTemplate(l,tc):null}createPaginationObserver(){let e=this.shadowRoot?.querySelector(`#${tc}`);e&&(this.paginationObserver=new IntersectionObserver(([e])=>{if(e?.isIntersecting&&!this.loading){let{page:e,count:t,wallets:i}=s.N.state;i.length<t&&s.N.fetchWalletsByPage({page:e+1})}}),this.paginationObserver.observe(e))}onConnectWallet(e){h.a.selectWalletConnector(e)}};td.styles=ts,tl([(0,o.wk)()],td.prototype,"loading",void 0),tl([(0,o.wk)()],td.prototype,"wallets",void 0),tl([(0,o.wk)()],td.prototype,"recommended",void 0),tl([(0,o.wk)()],td.prototype,"featured",void 0),tl([(0,o.wk)()],td.prototype,"filteredWallets",void 0),tl([(0,o.wk)()],td.prototype,"badge",void 0),tl([(0,o.wk)()],td.prototype,"mobileFullScreen",void 0),td=tl([(0,c.EM)("w3m-all-wallets-list")],td);let tu=(0,r.AH)` 1376 wui-grid, 1377 wui-loading-spinner, 1378 wui-flex { 1379 height: 360px; 1380 } 1381 1382 wui-grid { 1383 overflow: scroll; 1384 scrollbar-width: none; 1385 grid-auto-rows: min-content; 1386 grid-template-columns: repeat(auto-fill, 104px); 1387 } 1388 1389 :host([data-mobile-fullscreen='true']) wui-grid { 1390 max-height: none; 1391 height: auto; 1392 } 1393 1394 wui-grid[data-scroll='false'] { 1395 overflow: hidden; 1396 } 1397 1398 wui-grid::-webkit-scrollbar {
1399 display: none; 1400 } 1401 1402 wui-loading-spinner { 1403 justify-content: center; 1404 align-items: center; 1405 } 1406 1407 @media (max-width: 350px) { 1408 wui-grid { 1409 grid-template-columns: repeat(2, 1fr); 1410 } 1411 } 1412`;var th=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let tp=class extends r.WF{constructor(){super(...arguments),this.prevQuery="",this.prevBadge=void 0,this.loading=!0,this.mobileFullScreen=a.H.state.enableMobileFullScreen,this.query=""}render(){return this.mobileFullScreen&&this.setAttribute("data-mobile-fullscreen","true"),this.onSearch(),this.loading?(0,r.qy)`<wui-loading-spinner color="accent-primary"></wui-loading-spinner>`:this.walletsTemplate()}async onSearch(){(this.query.trim()!==this.prevQuery.trim()||this.badge!==this.prevBadge)&&(this.prevQuery=this.query,this.prevBadge=this.badge,this.loading=!0,await s.N.searchWallet({search:this.query,badge:this.badge}),this.loading=!1)}walletsTemplate(){let{search:e}=s.N.state,t=tr.A.markWalletsAsInstalled(e);return e.length?(0,r.qy)` 1413 <wui-grid 1414 data-testid="wallet-list" 1415 .padding=${["0","3","3","3"]} 1416 rowGap="4" 1417 columngap="2" 1418 justifyContent="space-between" 1419 > 1420 ${t.map((e,t)=>(0,r.qy)` 1421 <w3m-all-wallets-list-item 1422 @click=${()=>this.onConnectWallet(e)} 1423 .wallet=${e} 1424 data-testid="wallet-search-item-${e.id}" 1425 explorerId=${e.id} 1426 certified=${"certified"===this.badge} 1427 walletQuery=${this.query} 1428 displayIndex=${t} 1429 ></w3m-all-wallets-list-item> 1430 `)} 1431 </wui-grid> 1432 `:(0,r.qy)` 1433 <wui-flex 1434 data-testid="no-wallet-found" 1435 justifyContent="center" 1436 alignItems="center" 1437 gap="3" 1438 flexDirection="column" 1439 > 1440 <wui-icon-box size="lg" color="default" icon="wallet"></wui-icon-box> 1441 <wui-text data-testid="no-wallet-found-text" color="secondary" variant="md-medium"> 1442 No Wallet found 1443 </wui-text> 1444 </wui-flex> 1445 `}onConnectWallet(e){h.a.selectWalletConnector(e)}};tp.styles=tu,th([(0,o.wk)()],tp.prototype,"loading",void 0),th([(0,o.wk)()],tp.prototype,"mobileFullScreen",void 0),th([(0,o.MZ)()],tp.prototype,"query",void 0),th([(0,o.MZ)()],tp.prototype,"badge",void 0),tp=th([(0,c.EM)("w3m-all-wallets-search")],tp);var tg=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let tf=class extends r.WF{constructor(){super(...arguments),this.search="",this.badge=void 0,this.onDebouncedSearch=n.w.debounce(e=>{this.search=e})}render(){let e=this.search.length>=2;return(0,r.qy)` 1446 <wui-flex .padding=${["1","3","3","3"]} gap="2" alignItems="center"> 1447 <wui-search-bar @inputChange=${this.onInputChange.bind(this)}></wui-search-bar> 1448 <wui-certified-switch 1449 ?checked=${"certified"===this.badge} 1450 @certifiedSwitchChange=${this.onCertifiedSwitchChange.bind(this)} 1451 data-testid="wui-certified-switch" 1452 ></wui-certified-switch> 1453 ${this.qrButtonTemplate()} 1454 </wui-flex> 1455 ${e||this.badge?(0,r.qy)`<w3m-all-wallets-search 1456 query=${this.search} 1457 .badge=${this.badge} 1458 ></w3m-all-wallets-search>`:(0,r.qy)`<w3m-all-wallets-list .badge=${this.badge}></w3m-all-wallets-list>`} 1459 `}onInputChange(e){this.onDebouncedSearch(e.detail)}onCertifiedSwitchChange(e){e.detail?(this.badge="certified",I.P.showSvg("Only WalletConnect certified",{icon:"walletConnectBrown",iconColor:"accent-100"})):this.badge=void 0}qrButtonTemplate(){return n.w.isMobile()?(0,r.qy)` 1460 <wui-icon-box 1461 size="xl" 1462 iconSize="xl" 1463 color="accent-primary" 1464 icon="qrCode" 1465 border 1466 borderColor="wui-accent-glass-010" 1467 @click=${this.onWalletConnectQr.bind(this)} 1468 ></wui-icon-box> 1469 `:null}onWalletConnectQr(){f.I.push("ConnectingWalletConnect")}};tg([(0,o.wk)()],tf.prototype,"search",void 0),tg([(0,o.wk)()],tf.prototype,"badge",void 0),tf=tg([(0,c.EM)("w3m-all-wallets-view")],tf);let tw=(0,W.AH)` 1470 :host { 1471 width: 100%; 1472 } 1473 1474 button { 1475 display: flex; 1476 align-items: center; 1477 justify-content: space-between; 1478 padding: ${({spacing:e})=>e[3]}; 1479 width: 100%; 1480 background-color: ${({tokens:e})=>e.theme.backgroundPrimary}; 1481 border-radius: ${({borderRadius:e})=>e[4]}; 1482 transition: 1483 background-color ${({durations:e})=>e.lg} 1484 ${({easings:e})=>e["ease-out-power-2"]}, 1485 scale ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}; 1486 will-change: background-color, scale; 1487 } 1488 1489 wui-text { 1490 text-transform: capitalize; 1491 } 1492 1493 wui-image { 1494 color: ${({tokens:e})=>e.theme.textPrimary}; 1495 } 1496 1497 @media (hover: hover) { 1498 button:hover:enabled { 1499 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 1500 } 1501 } 1502 1503 button:disabled { 1504 opacity: 0.5;
1505 cursor: not-allowed; 1506 } 1507`;var tm=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let tb=class extends r.WF{constructor(){super(...arguments),this.imageSrc="google",this.loading=!1,this.disabled=!1,this.rightIcon=!0,this.rounded=!1,this.fullSize=!1}render(){return this.dataset.rounded=this.rounded?"true":"false",(0,r.qy)` 1508 <button 1509 ?disabled=${!!this.loading||!!this.disabled} 1510 data-loading=${this.loading} 1511 tabindex=${(0,d.J)(this.tabIdx)} 1512 > 1513 <wui-flex gap="2" alignItems="center"> 1514 ${this.templateLeftIcon()} 1515 <wui-flex gap="1"> 1516 <slot></slot> 1517 </wui-flex> 1518 </wui-flex> 1519 ${this.templateRightIcon()} 1520 </button> 1521 `}templateLeftIcon(){return this.icon?(0,r.qy)`<wui-image 1522 icon=${this.icon} 1523 iconColor=${(0,d.J)(this.iconColor)} 1524 ?boxed=${!0} 1525 ?rounded=${this.rounded} 1526 ></wui-image>`:(0,r.qy)`<wui-image 1527 ?boxed=${!0} 1528 ?rounded=${this.rounded} 1529 ?fullSize=${this.fullSize} 1530 src=${this.imageSrc} 1531 ></wui-image>`}templateRightIcon(){return this.rightIcon?this.loading?(0,r.qy)`<wui-loading-spinner size="md" color="accent-primary"></wui-loading-spinner>`:(0,r.qy)`<wui-icon name="chevronRight" size="lg" color="default"></wui-icon>`:null}};tb.styles=[P.W5,P.fD,tw],tm([(0,o.MZ)()],tb.prototype,"imageSrc",void 0),tm([(0,o.MZ)()],tb.prototype,"icon",void 0),tm([(0,o.MZ)()],tb.prototype,"iconColor",void 0),tm([(0,o.MZ)({type:Boolean})],tb.prototype,"loading",void 0),tm([(0,o.MZ)()],tb.prototype,"tabIdx",void 0),tm([(0,o.MZ)({type:Boolean})],tb.prototype,"disabled",void 0),tm([(0,o.MZ)({type:Boolean})],tb.prototype,"rightIcon",void 0),tm([(0,o.MZ)({type:Boolean})],tb.prototype,"rounded",void 0),tm([(0,o.MZ)({type:Boolean})],tb.prototype,"fullSize",void 0),tb=tm([(0,S.E)("wui-list-item")],tb);let ty=class extends r.WF{constructor(){super(...arguments),this.wallet=f.I.state.data?.wallet}render(){if(!this.wallet)throw Error("w3m-downloads-view");return(0,r.qy)` 1532 <wui-flex gap="2" flexDirection="column" .padding=${["3","3","4","3"]}> 1533 ${this.chromeTemplate()} ${this.iosTemplate()} ${this.androidTemplate()} 1534 ${this.homepageTemplate()} 1535 </wui-flex> 1536 `}chromeTemplate(){return this.wallet?.chrome_store?(0,r.qy)`<wui-list-item 1537 variant="icon" 1538 icon="chromeStore" 1539 iconVariant="square" 1540 @click=${this.onChromeStore.bind(this)} 1541 chevron 1542 > 1543 <wui-text variant="md-medium" color="primary">Chrome Extension</wui-text> 1544 </wui-list-item>`:null}iosTemplate(){return this.wallet?.app_store?(0,r.qy)`<wui-list-item 1545 variant="icon" 1546 icon="appStore" 1547 iconVariant="square" 1548 @click=${this.onAppStore.bind(this)} 1549 chevron 1550 > 1551 <wui-text variant="md-medium" color="primary">iOS App</wui-text> 1552 </wui-list-item>`:null}androidTemplate(){return this.wallet?.play_store?(0,r.qy)`<wui-list-item 1553 variant="icon" 1554 icon="playStore" 1555 iconVariant="square" 1556 @click=${this.onPlayStore.bind(this)} 1557 chevron 1558 > 1559 <wui-text variant="md-medium" color="primary">Android App</wui-text> 1560 </wui-list-item>`:null}homepageTemplate(){return this.wallet?.homepage?(0,r.qy)` 1561 <wui-list-item 1562 variant="icon" 1563 icon="browser" 1564 iconVariant="square-blue" 1565 @click=${this.onHomePage.bind(this)} 1566 chevron 1567 > 1568 <wui-text variant="md-medium" color="primary">Website</wui-text> 1569 </wui-list-item> 1570 `:null}openStore(e){e.href&&this.wallet&&(g.E.sendEvent({type:"track",event:"GET_WALLET",properties:{name:this.wallet.name,walletRank:this.wallet.order,explorerId:this.wallet.id,type:e.type}}),n.w.openHref(e.href,"_blank"))}onChromeStore(){this.wallet?.chrome_store&&this.openStore({href:this.wallet.chrome_store,type:"chrome_store"})}onAppStore(){this.wallet?.app_store&&this.openStore({href:this.wallet.app_store,type:"app_store"})}onPlayStore(){this.wallet?.play_store&&this.openStore({href:this.wallet.play_store,type:"play_store"})}onHomePage(){this.wallet?.homepage&&this.openStore({href:this.wallet.homepage,type:"homepage"})}};ty=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}([(0,c.EM)("w3m-downloads-view")],ty)},777:(e,t)=>{t.L={bit:1},t.M={bit:0},t.Q={bit:3}
vendor: 4,455 bytes, line 1570
1570,t.H={bit:2},t.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},t.from=function(e,i){if(t.isValid(e))return e;try{if("string"!=typeof e)throw Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw Error("Unknown EC Level: "+e)}}catch(e){return i}}},9861:(e,t,i)=>{let r=i(81524);function o(e){this.mode=r.NUMERIC,this.data=e.toString()}o.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let t,i;for(t=0;t+3<=this.data.length;t+=3)i=parseInt(this.data.substr(t,3),10),e.put(i,10);let r=this.data.length-t;r>0&&(i=parseInt(this.data.substr(t),10),e.put(i,3*r+1))},e.exports=o},11577:(e,t,i)=>{let r=i(95255);t.mul=function(e,t){let i=new Uint8Array(e.length+t.length-1);for(let o=0;o<e.length;o++)for(let n=0;n<t.length;n++)i[o+n]^=r.mul(e[o],t[n]);return i},t.mod=function(e,t){let i=new Uint8Array(e);for(;i.length-t.length>=0;){let e=i[0];for(let o=0;o<t.length;o++)i[o]^=r.mul(t[o],e);let o=0;for(;o<i.length&&0===i[o];)o++;i=i.slice(o)}return i},t.generateECPolynomial=function(e){let i=new Uint8Array([1]);for(let o=0;o<e;o++)i=t.mul(i,new Uint8Array([1,r.exp(o)]));return i}},14025:(e,t,i)=>{let r=i(81524),o=i(21272);function n(e){this.mode=r.KANJI,this.data=e}n.getBitsLength=function(e){return 13*e},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let i=o.toSJIS(this.data[t]);if(i>=33088&&i<=40956)i-=33088;else if(i>=57408&&i<=60351)i-=49472;else throw Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");i=(i>>>8&255)*192+(255&i),e.put(i,13)}},e.exports=n},21272:(e,t)=>{let i,r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];t.getSymbolSize=function(e){if(!e)throw Error('"version" cannot be null or undefined');if(e<1||e>40)throw Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return r[e]},t.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!=typeof e)throw Error('"toSJISFunc" is not a valid function.');i=e},t.isKanjiModeEnabled=function(){return void 0!==i},t.toSJIS=function(e){return i(e)}},21813:(e,t,i)=>{let r=i(21272),o=i(28220),n=i(777),a=i(81524),s=i(65224),l=r.getBCHDigit(7973);function c(e,t){return a.getCharCountIndicator(e,t)+4}t.from=function(e,t){return s.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,i){if(!s.isValid(e))throw Error("Invalid QR Code version");void 0===i&&(i=a.BYTE);let n=(r.getSymbolTotalCodewords(e)-o.getTotalCodewordsCount(e,t))*8;if(i===a.MIXED)return n;let l=n-c(i,e);switch(i){case a.NUMERIC:return Math.floor(l/10*3);case a.ALPHANUMERIC:return Math.floor(l/11*2);case a.KANJI:return Math.floor(l/13);case a.BYTE:default:return Math.floor(l/8)}},t.getBestVersionForData=function(e,i){let r,o=n.from(i,n.M);if(Array.isArray(e)){if(e.length>1){for(let i=1;i<=40;i++)if(function(e,t){let i=0;return e.forEach(function(e){let r=c(e.mode,t);i+=r+e.getBitsLength()}),i}(e,i)<=t.getCapacity(i,o,a.MIXED))return i;return}if(0===e.length)return 1;r=e[0]}else r=e;return function(e,i,r){for(let o=1;o<=40;o++)if(i<=t.getCapacity(o,r,e))return o}(r.mode,r.getLength(),o)},t.getEncodedBits=function(e){if(!s.isValid(e)||e<7)throw Error("Invalid QR Code version");let t=e<<12;for(;r.getBCHDigit(t)-l>=0;)t^=7973<<r.getBCHDigit(t)-l;return e<<12|t}},28220:(e,t,i)=>{let r=i(777),o=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,
1570192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];t.getBlocksCount=function(e,t){switch(t){case r.L:return o[(e-1)*4+0];case r.M:return o[(e-1)*4+1];case r.Q:return o[(e-1)*4+2];case r.H:return o[(e-1)*4+3];default:return}},t.getTotalCodewordsCount=function(e,t){switch(t){case r.L:return n[(e-1)*4+0];case r.M:return n[(e-1)*4+1];case r.Q:return n[(e-1)*4+2];case r.H:return n[(e-1)*4+3];default:return}}},36576:(e,t,i)=>{let r=i(32),o=i(81524);function n(e){this.mode=o.BYTE,"string"==typeof e&&(e=r(e)),this.data=new Uint8Array(e)}n.getBitsLength=function(e){return 8*e},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){for(let t=0,i=this.data.length;t<i;t++)e.put(this.data[t],8)},e.exports=n},39048:(e,t)=>{t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};let i={N1:3,N2:3,N3:40,N4:10};t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){let t=e.size,r=0,o=0,n=0,a=null,s=null;for(let l=0;l<t;l++){o=n=0,a=s=null;for(let c=0;c<t;c++){let t=e.get(l,c);t===a?o++:(o>=5&&(r+=i.N1+(o-5)),a=t,o=1),(t=e.get(c,l))===s?n++:(n>=5&&(r+=i.N1+(n-5)),s=t,n=1)}o>=5&&(r+=i.N1+(o-5)),n>=5&&(r+=i.N1+(n-5))}return r},t.getPenaltyN2=function(e){let t=e.size,r=0;for(let i=0;i<t-1;i++)for(let o=0;o<t-1;o++){let t=e.get(i,o)+e.get(i,o+1)+e.get(i+1,o)+e.get(i+1,o+1);(4===t||0===t)&&r++}return r*i.N2},t.getPenaltyN3=function(e){let t=e.size,r=0,o=0,n=0;for(let i=0;i<t;i++){o=n=0;for(let a=0;a<t;a++)o=o<<1&2047|e.get(i,a),a>=10&&(1488===o||93===o)&&r++,n=n<<1&2047|e.get(a,i),a>=10&&(1488===n||93===n)&&r++}return r*i.N3},t.getPenaltyN4=function(e){let t=0,r=e.data.length;for(let i=0;i<r;i++)t+=e.data[i];return Math.abs(Math.ceil(100*t/r/5)-10)*i.N4},t.applyMask=function(e,i){let r=i.size;for(let o=0;o<r;o++)for(let n=0;n<r;n++)i.isReserved(n,o)||i.xor(n,o,function(e,i,r){switch(e){case t.Patterns.PATTERN000:return(i+r)%2==0;case t.Patterns.PATTERN001:return i%2==0;case t.Patterns.PATTERN010:return r%3==0;case t.Patterns.PATTERN011:return(i+r)%3==0;case t.Patterns.PATTERN100:return(Math.floor(i/2)+Math.floor(r/3))%2==0;case t.Patterns.PATTERN101:return i*r%2+i*r%3==0;case t.Patterns.PATTERN110:return(i*r%2+i*r%3)%2==0;case t.Patterns.PATTERN111:return(i*r%3+(i+r)%2)%2==0;default:throw Error("bad maskPattern:"+e)}}(e,n,o))},t.getBestMask=function(e,i){let r=Object.keys(t.Patterns).length,o=0,n=1/0;for(let a=0;a<r;a++){i(a),t.applyMask(a,e);let r=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(a,e),r<n&&(n=r,o=a)}return o}},40695:(e,t,i)=>{let r=i(21272).getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];let t=Math.floor(e/7)+2,i=r(e),o=145===i?26:2*Math.ceil((i-13)/(2*t-2)),n=[i-7];for(let e=1;e<t-1;e++)n[e]=n[e-1]-o;return n.push(6),n.reverse()},t.getPositions=function(e){let i=[],r=t.getRowColCoords(e),o=r.length;for(let e=0;e<o;e++)for(let t=0;t<o;t++)(0!==e||0!==t)&&(0!==e||t!==o-1)&&(e!==o-1||0!==t)&&i.push([r[e],r[t]]);return i}},46093:e=>{e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},51999:(e,t,i)=>{let r=i(21272),o=r.getBCHDigit(1335);t.getEncodedBits=function(e,t){let i=e.bit<<3|t,n=i<<10;for(;r.getBCHDigit(n)-o>=0;)n^=1335<<r.getBCHDigit(n)-o;return(i<<10|n)^21522}},61630:(e,t,i)=>{let r=i(86372);function o(e,t){let i=e.a/255,r=t+'="'+e.hex+'"';return i<1?r+" "+t+'-opacity="'+i.toFixed(2).slice(1)+'"':r}function n(e,t,i){let r=e+t;return void 0!==i&&(r+=" "+i),r}t.render=function(e,t,i){let a=r.getOptions(t),s=e.modules.size,l=e.modules.data,c=s+2*a.margin,d=a.color.light.a?"<path "+o(a.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",u="<path "+o(a.color.dark,"stroke")+' d="'+function(e,t,i){let r="",o=0,a=!1,s=0;for(let l=0;l<e.length;l++){let c=Math.floor(l%t),d=Math.floor(l/t);c||a||(a=!0),e[l]?(s++,l>0&&c>0&&e[l-1]||(r+=a?n("M",c+i,.5+d+i):n("m",o,0),o=0,a=!1),c+1<t&&e[l+1]||(r+=n("h",s),s=0)):o++}
vendor: 12,689 bytes, line 1570
1570return r}(l,s,a.margin)+'"/>',h='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+('viewBox="0 0 '+c+" ")+c+'" shape-rendering="crispEdges">'+d+u+"</svg>\n";return"function"==typeof i&&i(null,h),h}},65224:(e,t)=>{t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},68523:(e,t,i)=>{let r=i(81524),o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(e){this.mode=r.ALPHANUMERIC,this.data=e}n.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let i=45*o.indexOf(this.data[t]);i+=o.indexOf(this.data[t+1]),e.put(i,11)}this.data.length%2&&e.put(o.indexOf(this.data[t]),6)},e.exports=n},72643:(e,t,i)=>{let r=i(46093),o=i(82789),n=i(80391),a=i(61630);function s(e,t,i,n,a){let s=[].slice.call(arguments,1),l=s.length,c="function"==typeof s[l-1];if(!c&&!r())throw Error("Callback required as last argument");if(c){if(l<2)throw Error("Too few arguments provided");2===l?(a=i,i=t,t=n=void 0):3===l&&(t.getContext&&void 0===a?(a=n,n=void 0):(a=n,n=i,i=t,t=void 0))}else{if(l<1)throw Error("Too few arguments provided");return 1===l?(i=t,t=n=void 0):2!==l||t.getContext||(n=i,i=t,t=void 0),new Promise(function(r,a){try{let a=o.create(i,n);r(e(a,t,n))}catch(e){a(e)}})}try{let r=o.create(i,n);a(null,e(r,t,n))}catch(e){a(e)}}t.create=o.create,t.toCanvas=s.bind(null,n.render),t.toDataURL=s.bind(null,n.renderToDataURL),t.toString=s.bind(null,function(e,t,i){return a.render(e,i)})},73901:(e,t,i)=>{let r=i(81524),o=i(9861),n=i(68523),a=i(36576),s=i(14025),l=i(91622),c=i(21272),d=i(95906);function u(e){return unescape(encodeURIComponent(e)).length}function h(e,t,i){let r,o=[];for(;null!==(r=e.exec(i));)o.push({data:r[0],index:r.index,mode:t,length:r[0].length});return o}function p(e){let t,i,o=h(l.NUMERIC,r.NUMERIC,e),n=h(l.ALPHANUMERIC,r.ALPHANUMERIC,e);return c.isKanjiModeEnabled()?(t=h(l.BYTE,r.BYTE,e),i=h(l.KANJI,r.KANJI,e)):(t=h(l.BYTE_KANJI,r.BYTE,e),i=[]),o.concat(n,t,i).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function g(e,t){switch(t){case r.NUMERIC:return o.getBitsLength(e);case r.ALPHANUMERIC:return n.getBitsLength(e);case r.KANJI:return s.getBitsLength(e);case r.BYTE:return a.getBitsLength(e)}}function f(e,t){let i,l=r.getBestModeForData(e);if((i=r.from(t,l))!==r.BYTE&&i.bit<l.bit)throw Error('"'+e+'" cannot be encoded with mode '+r.toString(i)+".\n Suggested mode is: "+r.toString(l));switch(i===r.KANJI&&!c.isKanjiModeEnabled()&&(i=r.BYTE),i){case r.NUMERIC:return new o(e);case r.ALPHANUMERIC:return new n(e);case r.KANJI:return new s(e);case r.BYTE:return new a(e)}}t.fromArray=function(e){return e.reduce(function(e,t){return"string"==typeof t?e.push(f(t,null)):t.data&&e.push(f(t.data,t.mode)),e},[])},t.fromString=function(e,i){let o=function(e,t){let i={},o={start:{}},n=["start"];for(let a=0;a<e.length;a++){let s=e[a],l=[];for(let e=0;e<s.length;e++){let c=s[e],d=""+a+e;l.push(d),i[d]={node:c,lastCount:0},o[d]={};for(let e=0;e<n.length;e++){let a=n[e];i[a]&&i[a].node.mode===c.mode?(o[a][d]=g(i[a].lastCount+c.length,c.mode)-g(i[a].lastCount,c.mode),i[a].lastCount+=c.length):(i[a]&&(i[a].lastCount=c.length),o[a][d]=g(c.length,c.mode)+4+r.getCharCountIndicator(c.mode,t))}}n=l}for(let e=0;e<n.length;e++)o[n[e]].end=0;return{map:o,table:i}}(function(e){let t=[];for(let i=0;i<e.length;i++){let o=e[i];switch(o.mode){case r.NUMERIC:t.push([o,{data:o.data,mode:r.ALPHANUMERIC,length:o.length},{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.ALPHANUMERIC:t.push([o,{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.KANJI:t.push([o,{data:o.data,mode:r.BYTE,length:u(o.data)}]);break;case r.BYTE:t.push([{data:o.data,mode:r.BYTE,length:u(o.data)}])}}return t}(p(e,c.isKanjiModeEnabled())),i),n=d.find_path(o.map,"start","end"),a=[];for(let e=1;e<n.length-1;e++)a.push(o.table[n[e]].node);return t.fromArray(a.reduce(function(e,t){let i=e.length-1>=0?e[e.length-1]:null;return i&&i.mode===t.mode?e[e.length-1].data+=t.data:e.push(t),e},[]))},t.rawSplit=function(e){return t.fromArray(p(e,c.isKanjiModeEnabled()))}},76316:e=>{function t(e){if(!e||e<1)throw Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}t.prototype.set=function(e,t,i,r){let o=e*this.size+t;this.data[o]=i,r&&(this.reservedBit[o]=!0)},t.prototype.get=function(e,t){return this.data[e*this.size+t]},t.prototype.xor=function(e,t,i){this.data[e*this.size+t]^=i},t.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=t},80391:(e,t,i)=>{let r=i(86372);t.render=function(e,t,i){var o;let n=i,a=t;void 0!==n||t&&t.getContext||(n=t,t=void 0),t||(a=function(){try{return document.createElement("canvas")}catch(e){throw Error("You need to specify a canvas element")}}()),n=r.getOptions(n);let s=r.getImageWidth(e.modules.size,n),l=a.getContext("2d"),c=l.createImageData(s,s);return r.qrToImageData(c.data,e,n),o=a,l.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=s,o.width=s,o.style.height=s+"px",o.style.width=s+"px",l.putImageData(c,0,0),a},t.renderToDataURL=function(e,i,r){let o=r;void 0!==o||i&&i.getContext||(o=i,i=void 0),o||(o={});let n=t.render(e,i,o),a=o.type||"image/png",s=o.rendererOpts||{};return n.toDataURL(a,s.quality)}},81524:(e,t,i)=>{let r=i(65224),o=i(91622);t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(e,t){if(!e.ccBits)throw Error("Invalid mode: "+e);if(!r.isValid(t))throw Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return o.testNumeric(e)?t.NUMERIC:o.testAlphanumeric(e)?t.ALPHANUMERIC:o.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,i){if(t.isValid(e))return e;try{if("string"!=typeof e)throw Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw Error("Unknown mode: "+e)}}catch(e){return i}}},82789:(e,t,i)=>{let r=i(21272),o=i(777),n=i(93183),a=i(76316),s=i(40695),l=i(90812),c=i(39048),d=i(28220),u=i(98920),h=i(21813),p=i(51999),g=i(81524),f=i(73901);function w(e,t,i){let r,o,n=e.size,a=p.getEncodedBits(t,i);for(r=0;r<15;r++)o=(a>>r&1)==1,r<6?e.set(r,8,o,!0):r<8?e.set(r+1,8,o,!0):e.set(n-15+r,8,o,!0),r<8?e.set(8,n-r-1,o,!0):r<9?e.set(8,15-r-1+1,o,!0):e.set(8,15-r-1,o,!0);e.set(n-8,8,1,!0)}t.create=function(e,t){let i,p;if(void 0===e||""===e)throw Error("No input text");let m=o.M;return void 0!==t&&(m=o.from(t.errorCorrectionLevel,o.M),i=h.from(t.version),p=c.from(t.maskPattern),t.toSJISFunc&&r.setToSJISFunction(t.toSJISFunc)),function(e,t,i,o){let p;if(Array.isArray(e))p=f.fromArray(e);else if("string"==typeof e){let r=t;if(!r){let t=f.rawSplit(e);r=h.getBestVersionForData(t,i)}p=f.fromString(e,r||40)}else throw Error("Invalid data");let m=h.getBestVersionForData(p,i);if(!m)throw Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<m)throw Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+m+".\n")}else t=m;let b=function(e,t,i){let o=new n;i.forEach(function(t){o.put(t.mode.bit,4),o.put(t.getLength(),g.getCharCountIndicator(t.mode,e)),t.write(o)});let a=(r.getSymbolTotalCodewords(e)-d.getTotalCodewordsCount(e,t))*8;for(o.getLengthInBits()+4<=a&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(0);let s=(a-o.getLengthInBits())/8;for(let e=0;e<s;e++)o.put(e%2?17:236,8);return function(e,t,i){let o,n,a=r.getSymbolTotalCodewords(t),s=a-d.getTotalCodewordsCount(t,i),l=d.getBlocksCount(t,i),c=a%l,h=l-c,p=Math.floor(a/l),g=Math.floor(s/l),f=g+1,w=p-g,m=new u(w),b=0,y=Array(l),v=Array(l),x=0,$=new Uint8Array(e.buffer);for(let e=0;e<l;e++){let t=e<h?g:f;y[e]=$.slice(b,b+t),v[e]=m.encode(y[e]),b+=t,x=Math.max(x,t)}let k=new Uint8Array(a),C=0;for(o=0;o<x;o++)for(n=0;n<l;n++)o<y[n].length&&(k[C++]=y[n][o]);for(o=0;o<w;o++)for(n=0;n<l;n++)k[C++]=v[n][o];return k}(o,e,t)}(t,i,p),y=new a(r.getSymbolSize(t));!function(e,t){let i=e.size,r=l.getPositions(t);for(let t=0;t<r.length;t++){let o=r[t][0],n=r[t][1];for(let t=-1;t<=7;t++)if(!(o+t<=-1)&&!(i<=o+t))for(let r=-1;r<=7;r++)n+r<=-1||i<=n+r||(t>=0&&t<=6&&(0===r||6===r)||r>=0&&r<=6&&(0===t||6===t)||t>=2&&t<=4&&r>=2&&r<=4?e.set(o+t,n+r,!0,!0):e.set(o+t,n+r,!1,!0))}}(y,t);let v=y.size;for(let e=8;e<v-8;e++){let t=e%2==0;y.set(e,6,t,!0),y.set(6,e,t,!0)}return!function(e,t){let i=s.getPositions(t);for(let t=0;t<i.length;t++){let r=i[t][0],o=i[t][1];for(let t=-2;t<=2;t++)for(let i=-2;i<=2;i++)-2===t||2===t||-2===i||2===i||0===t&&0===i?e.set(r+t,o+i,!0,!0):e.set(r+t,o+i,!1,!0)}}(y,t),w(y,i,0),t>=7&&function(e,t){let i,r,o,n=e.size,a=h.getEncodedBits(t);for(let t=0;t<18;t++)i=Math.floor(t/3),r=t%3+n-8-3,o=(a>>t&1)==1,e.set(i,r,o,!0),e.set(r,i,o,!0)}(y,t),!function(e,t){let i=e.size,r=-1,o=i-1,n=7,a=0;for(let s=i-1;s>0;s-=2)for(6===s&&s--;;){for(let i=0;i<2;i++)if(!e.isReserved(o,s-i)){let r=!1;a<t.length&&(r=(t[a]>>>n&1)==1),e.set(o,s-i,r),-1==--n&&(a++,n=7)}if((o+=r)<0||i<=o){o-=r,r=-r;break}}}(y,b),isNaN(o)&&(o=c.getBestMask(y,w.bind(null,y,i))),c.applyMask(o,y),w(y,i,o),{modules:y,version:t,errorCorrectionLevel:i,maskPattern:o,segments:p}}(e,i,m,p)}},86372:(e,t)=>{function i(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw Error("Invalid hex color: "+e);(3===t.length||4===t.length)&&(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),6===t.length&&t.push("F","F");let i=parseInt(t.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:255&i,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});let t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,o=e.scale||4;return{width:r,scale:r?4:o,margin:t,color:{dark:i(e.color.dark||"#000000ff"),light:i(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,i){let r=t.getScale(e,i);return Math.floor((e+2*i.margin)*r)},t.qrToImageData=function(e,i,r){let o=i.modules.size,n=i.modules.data,a=t.getScale(o,r),s=Math.floor((o+2*r.margin)*a),l=r.margin*a,c=[r.color.light,r.color.dark];for(let t=0;t<s;t++)for(let i=0;i<s;i++){let d=(t*s+i)*4,u=r.color.light;t>=l&&i>=l&&t<s-l&&i<s-l&&(u=c[+!!n[Math.floor((t-l)/a)*o+Math.floor((i-l)/a)]]),e[d++]=u.r,e[d++]=u.g,e[d++]=u.b,e[d]=u.a}}},90812:(e,t,i)=>{let r=i(21272).getSymbolSize;t.getPositions=function(e){let t=r(e);return[[0,0],[t-7,0],[0,t-7]]}},91622:(e,t)=>{let i="[0-9]+",r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",o="(?:(?![A-Z0-9 $%*+\\-./:]|"+(r=r.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";t.KANJI=RegExp(r,"g"),t.BYTE_KANJI=RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=RegExp(o,"g"),t.NUMERIC=RegExp(i,"g"),t.ALPHANUMERIC=RegExp("[A-Z $%*+\\-./:]+","g");let n=RegExp("^"+r+"$"),a=RegExp("^"+i+"$"),s=RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return n.test(e)},t.testNumeric=function(e){return a.test(e)},t.testAlphanumeric=function(e){return s.test(e)}},93183:e=>{function t(){this.buffer=[],this.length=0}t.prototype={get:function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(let i=0;i<t;i++)this.putBit((e>>>t-i-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},95255:(e,t)=>{let i=new Uint8Array(512),r=new Uint8Array(256);!function(){let e=1;for(let t=0;t<255;t++)i[t]=e,r[e]=t,256&(e<<=1)&&(e^=285);for(let e=255;e<512;
1570e++)i[e]=i[e-255]}(),t.log=function(e){if(e<1)throw Error("log("+e+")");return r[e]},t.exp=function(e){return i[e]},t.mul=function(e,t){return 0===e||0===t?0:i[r[e]+r[t]]}},95906:e=>{"use strict";var t={single_source_shortest_paths:function(e,i,r){var o,n,a,s,l,c,d,u={},h={};h[i]=0;var p=t.PriorityQueue.make();for(p.push(i,0);!p.empty();)for(a in n=(o=p.pop()).value,s=o.cost,l=e[n]||{})l.hasOwnProperty(a)&&(c=s+l[a],d=h[a],(void 0===h[a]||d>c)&&(h[a]=c,p.push(a,c),u[a]=n));if(void 0!==r&&void 0===h[r])throw Error("Could not find a path from "+i+" to "+r+".");return u},extract_shortest_path_from_predecessor_list:function(e,t){for(var i=[],r=t;r;)i.push(r),e[r],r=e[r];return i.reverse(),i},find_path:function(e,i,r){var o=t.single_source_shortest_paths(e,i,r);return t.extract_shortest_path_from_predecessor_list(o,r)},PriorityQueue:{make:function(e){var i,r=t.PriorityQueue,o={};for(i in e=e||{},r)r.hasOwnProperty(i)&&(o[i]=r[i]);return o.queue=[],o.sorter=e.sorter||r.default_sorter,o},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){this.queue.push({value:e,cost:t}),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t},98920:(e,t,i)=>{let r=i(11577);function o(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}o.prototype.initialize=function(e){this.degree=e,this.genPoly=r.generateECPolynomial(this.degree)},o.prototype.encode=function(e){if(!this.genPoly)throw Error("Encoder not initialized");let t=new Uint8Array(e.length+this.degree);t.set(e);let i=r.mod(t,this.genPoly),o=this.degree-i.length;if(o>0){let e=new Uint8Array(this.degree);return e.set(i,o),e}return i},e.exports=o}}]); 1571//# debugId=b0e87523-a32a-5338-91bc-376e769ceb2c
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.