cppay-sdk 0.0.2-beta.24 → 0.0.2-beta.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/dist/AlertController-BPGQ5PgH.js +12787 -0
  2. package/dist/AlertController-CjTbf-Vd.cjs +10 -0
  3. package/dist/ApiController-Crww70p3.js +5652 -0
  4. package/dist/ApiController-DB43iwF1.cjs +4 -0
  5. package/dist/CaipNetworkUtil-Bd4HeTLY.js +204 -0
  6. package/dist/CaipNetworkUtil-Bg22uavB.cjs +1 -0
  7. package/dist/HelpersUtil-CeTmhhZv.js +1415 -0
  8. package/dist/HelpersUtil-L0eeYoE2.cjs +225 -0
  9. package/dist/PhArrowCircleDown-BBy_VuPx.js +46 -0
  10. package/dist/PhArrowCircleDown-BU4QSsA3.cjs +14 -0
  11. package/dist/PhArrowClockwise-D8C24T6J.js +46 -0
  12. package/dist/PhArrowClockwise-DWqhijc2.cjs +14 -0
  13. package/dist/PhArrowDown-Qm1T2ueY.cjs +14 -0
  14. package/dist/PhArrowDown-p9Tekztm.js +46 -0
  15. package/dist/PhArrowLeft-CEtyMFdq.cjs +14 -0
  16. package/dist/PhArrowLeft-CgSKs9Xe.js +46 -0
  17. package/dist/PhArrowRight-ZatyoD6R.cjs +14 -0
  18. package/dist/PhArrowRight-dMdzUgrx.js +46 -0
  19. package/dist/PhArrowSquareOut-CbP71Gny.js +46 -0
  20. package/dist/PhArrowSquareOut-HyssV9za.cjs +14 -0
  21. package/dist/PhArrowUp-Cz127u8b.cjs +14 -0
  22. package/dist/PhArrowUp-DNn-RQ7v.js +46 -0
  23. package/dist/PhArrowUpRight-BX6LlOL0.cjs +14 -0
  24. package/dist/PhArrowUpRight-OyGUhoGi.js +46 -0
  25. package/dist/PhArrowsClockwise-B6w_d2Gy.cjs +14 -0
  26. package/dist/PhArrowsClockwise-BWITTwAP.js +46 -0
  27. package/dist/PhArrowsDownUp-CHHtczH8.js +46 -0
  28. package/dist/PhArrowsDownUp-WYzjhvmQ.cjs +14 -0
  29. package/dist/PhArrowsLeftRight-BA0fjcLn.js +46 -0
  30. package/dist/PhArrowsLeftRight-bgyrYWLt.cjs +14 -0
  31. package/dist/PhBank-BInxTxLw.js +46 -0
  32. package/dist/PhBank-CZ_uTsAN.cjs +14 -0
  33. package/dist/PhBrowser--6CxS13p.js +46 -0
  34. package/dist/PhBrowser-BzOw0W8k.cjs +14 -0
  35. package/dist/PhCaretDown-D-zrPZN9.js +46 -0
  36. package/dist/PhCaretDown-DvF3M2iu.cjs +14 -0
  37. package/dist/PhCaretLeft-DND0SNkF.cjs +14 -0
  38. package/dist/PhCaretLeft-Dm6NsnIS.js +46 -0
  39. package/dist/PhCaretRight-BkRzbZ5m.js +46 -0
  40. package/dist/PhCaretRight-xQkT3bmO.cjs +14 -0
  41. package/dist/PhCaretUp-BEk_5jnn.cjs +14 -0
  42. package/dist/PhCaretUp-DZRZQ-T1.js +46 -0
  43. package/dist/PhCheck-BmwCUZuW.js +46 -0
  44. package/dist/PhCheck-C-u2QP3y.cjs +14 -0
  45. package/dist/PhCircleHalf--TfGDEAT.js +46 -0
  46. package/dist/PhCircleHalf-keQfI7pU.cjs +14 -0
  47. package/dist/PhClock-BvmbjmRx.cjs +14 -0
  48. package/dist/PhClock-DNCf5CVD.js +46 -0
  49. package/dist/PhCompass-B6tcbOFZ.js +46 -0
  50. package/dist/PhCompass-rWCQ_cR8.cjs +14 -0
  51. package/dist/PhCopy-CzC1olDO.cjs +14 -0
  52. package/dist/PhCopy-rbBTM6ME.js +46 -0
  53. package/dist/PhCreditCard-DOpOB0Pl.js +46 -0
  54. package/dist/PhCreditCard-D_qRVKuY.cjs +14 -0
  55. package/dist/PhCurrencyDollar-4EASQkjs.js +46 -0
  56. package/dist/PhCurrencyDollar-RVJJ6bQ3.cjs +14 -0
  57. package/dist/PhDesktop-CPaC-lRj.cjs +14 -0
  58. package/dist/PhDesktop-DZPux6RD.js +46 -0
  59. package/dist/PhDeviceMobile-BnXs4f3Q.cjs +14 -0
  60. package/dist/PhDeviceMobile-CcdKzyah.js +46 -0
  61. package/dist/PhDotsThree-19bbXQaM.js +46 -0
  62. package/dist/PhDotsThree-DSmFeW6i.cjs +14 -0
  63. package/dist/PhEnvelope-F7RF6h58.js +46 -0
  64. package/dist/PhEnvelope-QuTMQbE9.cjs +14 -0
  65. package/dist/PhFunnelSimple-B_FRP21W.js +46 -0
  66. package/dist/PhFunnelSimple-D4Ztu4ri.cjs +14 -0
  67. package/dist/PhGlobe-B8GrTk4S.cjs +14 -0
  68. package/dist/PhGlobe-BSPoRqTV.js +46 -0
  69. package/dist/PhIdentificationCard-fGDBGII0.cjs +14 -0
  70. package/dist/PhIdentificationCard-giQnti3K.js +46 -0
  71. package/dist/PhImage-BpUk8j27.cjs +14 -0
  72. package/dist/PhImage-PtBaftbW.js +46 -0
  73. package/dist/PhInfo-DQEDS02h.js +46 -0
  74. package/dist/PhInfo-V5wKJJoK.cjs +14 -0
  75. package/dist/PhLightbulb-Cisg0Myw.js +46 -0
  76. package/dist/PhLightbulb-xP9kaUlD.cjs +14 -0
  77. package/dist/PhMagnifyingGlass-C1cVSYf2.cjs +14 -0
  78. package/dist/PhMagnifyingGlass-DlkOfQXn.js +46 -0
  79. package/dist/PhPaperPlaneRight-C7Jp2jl_.js +46 -0
  80. package/dist/PhPaperPlaneRight-Kh3uxxIy.cjs +14 -0
  81. package/dist/PhPlus-BgHn57eW.js +46 -0
  82. package/dist/PhPlus-hJ6DZNjc.cjs +14 -0
  83. package/dist/PhPower-C369g1jk.js +46 -0
  84. package/dist/PhPower-DZ-SpUrD.cjs +14 -0
  85. package/dist/PhPuzzlePiece-B0oABcWl.js +46 -0
  86. package/dist/PhPuzzlePiece-DLtOLrcw.cjs +14 -0
  87. package/dist/PhQrCode-BT_hyeEa.js +46 -0
  88. package/dist/PhQrCode-yI6bLoYY.cjs +14 -0
  89. package/dist/PhQuestion-B1UeE96D.js +46 -0
  90. package/dist/PhQuestion-icSeWABx.cjs +14 -0
  91. package/dist/PhQuestionMark-CBVW9Awo.js +46 -0
  92. package/dist/PhQuestionMark-Cmhqu81E.cjs +14 -0
  93. package/dist/PhSealCheck-DTKS5QAx.cjs +14 -0
  94. package/dist/PhSealCheck-Dm2I2X7k.js +46 -0
  95. package/dist/PhSignOut-25xp33w2.cjs +14 -0
  96. package/dist/PhSignOut-BTTDADPY.js +46 -0
  97. package/dist/PhSpinner-Dbua7p0Y.js +46 -0
  98. package/dist/PhSpinner-DtpwblyA.cjs +14 -0
  99. package/dist/PhTrash-B3wUg10m.cjs +14 -0
  100. package/dist/PhTrash-gZghJkGX.js +46 -0
  101. package/dist/PhUser-Bvcv05IM.js +46 -0
  102. package/dist/PhUser-COPP3N-M.cjs +14 -0
  103. package/dist/PhVault-CFa5lrPU.cjs +14 -0
  104. package/dist/PhVault-DvlBF0VI.js +46 -0
  105. package/dist/PhWallet-CzJcybaO.cjs +14 -0
  106. package/dist/PhWallet-Do_lf9BX.js +46 -0
  107. package/dist/PhWarning-BrbSc7gQ.cjs +14 -0
  108. package/dist/PhWarning-DiIpJVsx.js +46 -0
  109. package/dist/PhWarningCircle-DE9BlEIc.js +46 -0
  110. package/dist/PhWarningCircle-F5Piypme.cjs +14 -0
  111. package/dist/PhX-BK3VZT8X.cjs +14 -0
  112. package/dist/PhX-CNlXuiat.js +46 -0
  113. package/dist/basic-C16-Uba1.js +3796 -0
  114. package/dist/basic-ChiCOE6E.cjs +1329 -0
  115. package/dist/chunk-2qRSBEuq.js +18 -0
  116. package/dist/chunk-DT80SxnK.cjs +1 -0
  117. package/dist/core-DKXmyfMB.js +2337 -0
  118. package/dist/core-PuDBroil.cjs +1 -0
  119. package/dist/dijkstra-CNhLvnjU.cjs +1 -0
  120. package/dist/dijkstra-kFl0HtsI.js +56 -0
  121. package/dist/features-BYfQH2hG.cjs +2 -0
  122. package/dist/features-_5Pi-gXV.js +245 -0
  123. package/dist/index.cjs +1 -1
  124. package/dist/index.es-DDV8bPq_.js +8311 -0
  125. package/dist/index.es-fgFnvPDP.cjs +19 -0
  126. package/dist/property-Dil4gG0H.cjs +3 -0
  127. package/dist/property-JsW5AM1M.js +578 -0
  128. package/dist/react.cjs +1 -1
  129. package/dist/react.js +133 -131
  130. package/dist/vue.cjs +1 -1
  131. package/dist/vue.js +107 -105
  132. package/dist/w3m-modal-BBvmkTyb.cjs +2416 -0
  133. package/dist/w3m-modal-CFhImDZN.js +5286 -0
  134. package/dist/walletconnect-B0zXLUON.cjs +17 -0
  135. package/dist/walletconnect-Bb4rv9-G.js +11314 -0
  136. package/dist/wui-list-item-BGvfYb1W.cjs +1452 -0
  137. package/dist/wui-list-item-C4wJpGBn.js +2123 -0
  138. package/package.json +2 -5
  139. package/dist/walletconnect-B0L70Mgc.js +0 -1239
  140. package/dist/walletconnect-B_n5YF-h.cjs +0 -8
@@ -0,0 +1,1329 @@
1
+ const e=require(`./chunk-DT80SxnK.cjs`),t=require(`./dijkstra-CNhLvnjU.cjs`),n=require(`./ApiController-DB43iwF1.cjs`),r=require(`./HelpersUtil-L0eeYoE2.cjs`),i=require(`./wui-list-item-BGvfYb1W.cjs`),a=require(`./CaipNetworkUtil-Bg22uavB.cjs`);var o=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},s=class extends r.p{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=n.m.state.connectors,this.count=n.t.state.count,this.filteredCount=n.t.state.filteredWallets.length,this.isFetchingRecommendedWallets=n.t.state.isFetchingRecommendedWallets,this.unsubscribe.push(n.m.subscribeKey(`connectors`,e=>this.connectors=e),n.t.subscribeKey(`count`,e=>this.count=e),n.t.subscribeKey(`filteredWallets`,e=>this.filteredCount=e.length),n.t.subscribeKey(`isFetchingRecommendedWallets`,e=>this.isFetchingRecommendedWallets=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=this.connectors.find(e=>e.id===`walletConnect`),{allWallets:t}=n.k.state;if(!e||t===`HIDE`||t===`ONLY_MOBILE`&&!n.j.isMobile())return null;let a=n.t.state.featured.length,o=this.count+a,s=o<10?o:Math.floor(o/10)*10,c=this.filteredCount>0?this.filteredCount:s,l=`${c}`;this.filteredCount>0?l=`${this.filteredCount}`:c<o&&(l=`${c}+`);let u=n.c.hasAnyConnection(n.J.CONNECTOR_ID.WALLET_CONNECT);return r._`
2
+ <wui-list-wallet
3
+ name="Search Wallet"
4
+ walletIcon="search"
5
+ showAllWallets
6
+ @click=${this.onAllWallets.bind(this)}
7
+ tagLabel=${l}
8
+ tagVariant="info"
9
+ data-testid="all-wallets"
10
+ tabIdx=${i.o(this.tabIdx)}
11
+ .loading=${this.isFetchingRecommendedWallets}
12
+ ?disabled=${u}
13
+ size="sm"
14
+ ></wui-list-wallet>
15
+ `}onAllWallets(){n.v.sendEvent({type:`track`,event:`CLICK_ALL_WALLETS`}),n.y.push(`AllWallets`,{redirectView:n.y.state.data?.redirectView})}};o([i.c()],s.prototype,`tabIdx`,void 0),o([i.s()],s.prototype,`connectors`,void 0),o([i.s()],s.prototype,`count`,void 0),o([i.s()],s.prototype,`filteredCount`,void 0),o([i.s()],s.prototype,`isFetchingRecommendedWallets`,void 0),s=o([r.r(`w3m-all-wallets-widget`)],s);var c=r.u`
16
+ :host {
17
+ margin-top: ${({spacing:e})=>e[1]};
18
+ }
19
+ wui-separator {
20
+ margin: ${({spacing:e})=>e[3]} calc(${({spacing:e})=>e[3]} * -1)
21
+ ${({spacing:e})=>e[2]} calc(${({spacing:e})=>e[3]} * -1);
22
+ width: calc(100% + ${({spacing:e})=>e[3]} * 2);
23
+ }
24
+ `,l=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},u=class extends r.p{constructor(){super(),this.unsubscribe=[],this.explorerWallets=n.t.state.explorerWallets,this.connections=n.c.state.connections,this.connectorImages=n.E.state.connectorImages,this.loadingTelegram=!1,this.unsubscribe.push(n.c.subscribeKey(`connections`,e=>this.connections=e),n.E.subscribeKey(`connectorImages`,e=>this.connectorImages=e),n.t.subscribeKey(`explorerFilteredWallets`,e=>{this.explorerWallets=e?.length?e:n.t.state.explorerWallets}),n.t.subscribeKey(`explorerWallets`,e=>{this.explorerWallets?.length||(this.explorerWallets=e)})),n.j.isTelegram()&&n.j.isIos()&&(this.loadingTelegram=!n.c.state.wcUri,this.unsubscribe.push(n.c.subscribeKey(`wcUri`,e=>this.loadingTelegram=!e)))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return r._`
25
+ <wui-flex flexDirection="column" gap="2"> ${this.connectorListTemplate()} </wui-flex>
26
+ `}connectorListTemplate(){return n.b.connectorList().map((e,t)=>e.kind===`connector`?this.renderConnector(e,t):this.renderWallet(e,t))}getConnectorNamespaces(e){return e.subtype===`walletConnect`?[]:e.subtype===`multiChain`?e.connector.connectors?.map(e=>e.chain)||[]:[e.connector.chain]}renderConnector(e,t){let a=e.connector,o=n.T.getConnectorImage(a)||this.connectorImages[a?.imageId??``],s=(this.connections.get(a.chain)??[]).some(e=>r.t.isLowerCaseMatch(e.connectorId,a.id)),c,l;e.subtype===`walletConnect`?(c=`qr code`,l=`accent`):e.subtype===`injected`||e.subtype===`announced`?(c=s?`connected`:`installed`,l=s?`info`:`success`):(c=void 0,l=void 0);let u=n.c.hasAnyConnection(n.J.CONNECTOR_ID.WALLET_CONNECT),d=e.subtype===`walletConnect`||e.subtype===`external`?u:!1;return r._`
27
+ <w3m-list-wallet
28
+ displayIndex=${t}
29
+ imageSrc=${i.o(o)}
30
+ .installed=${!0}
31
+ name=${a.name??`Unknown`}
32
+ .tagVariant=${l}
33
+ tagLabel=${i.o(c)}
34
+ data-testid=${`wallet-selector-${a.id.toLowerCase()}`}
35
+ size="sm"
36
+ @click=${()=>this.onClickConnector(e)}
37
+ tabIdx=${i.o(this.tabIdx)}
38
+ ?disabled=${d}
39
+ rdnsId=${i.o(a.explorerWallet?.rdns||void 0)}
40
+ walletRank=${i.o(a.explorerWallet?.order)}
41
+ .namespaces=${this.getConnectorNamespaces(e)}
42
+ >
43
+ </w3m-list-wallet>
44
+ `}onClickConnector(e){let t=n.y.state.data?.redirectView;if(e.subtype===`walletConnect`){n.m.setActiveConnector(e.connector),n.j.isMobile()?n.y.push(`AllWallets`):n.y.push(`ConnectingWalletConnect`,{redirectView:t});return}if(e.subtype===`multiChain`){n.m.setActiveConnector(e.connector),n.y.push(`ConnectingMultiChain`,{redirectView:t});return}if(e.subtype===`injected`){n.m.setActiveConnector(e.connector),n.y.push(`ConnectingExternal`,{connector:e.connector,redirectView:t,wallet:e.connector.explorerWallet});return}if(e.subtype===`announced`){if(e.connector.id===`walletConnect`){n.j.isMobile()?n.y.push(`AllWallets`):n.y.push(`ConnectingWalletConnect`,{redirectView:t});return}n.y.push(`ConnectingExternal`,{connector:e.connector,redirectView:t,wallet:e.connector.explorerWallet});return}n.y.push(`ConnectingExternal`,{connector:e.connector,redirectView:t})}renderWallet(e,t){let a=e.wallet,o=n.T.getWalletImage(a),s=n.c.hasAnyConnection(n.J.CONNECTOR_ID.WALLET_CONNECT),c=this.loadingTelegram,l=e.subtype===`recent`?`recent`:void 0,u=e.subtype===`recent`?`info`:void 0;return r._`
45
+ <w3m-list-wallet
46
+ displayIndex=${t}
47
+ imageSrc=${i.o(o)}
48
+ name=${a.name??`Unknown`}
49
+ @click=${()=>this.onClickWallet(e)}
50
+ size="sm"
51
+ data-testid=${`wallet-selector-${a.id}`}
52
+ tabIdx=${i.o(this.tabIdx)}
53
+ ?loading=${c}
54
+ ?disabled=${s}
55
+ rdnsId=${i.o(a.rdns||void 0)}
56
+ walletRank=${i.o(a.order)}
57
+ tagLabel=${i.o(l)}
58
+ .tagVariant=${u}
59
+ >
60
+ </w3m-list-wallet>
61
+ `}onClickWallet(e){let t=n.y.state.data?.redirectView,r=n.n.state.activeChain;if(e.subtype===`featured`){n.m.selectWalletConnector(e.wallet);return}if(e.subtype===`recent`){if(this.loadingTelegram)return;n.m.selectWalletConnector(e.wallet);return}if(e.subtype===`custom`){if(this.loadingTelegram)return;n.y.push(`ConnectingWalletConnect`,{wallet:e.wallet,redirectView:t});return}if(this.loadingTelegram)return;let i=r?n.m.getConnector({id:e.wallet.id,namespace:r}):void 0;i?n.y.push(`ConnectingExternal`,{connector:i,redirectView:t}):n.y.push(`ConnectingWalletConnect`,{wallet:e.wallet,redirectView:t})}};u.styles=c,l([i.c({type:Number})],u.prototype,`tabIdx`,void 0),l([i.s()],u.prototype,`explorerWallets`,void 0),l([i.s()],u.prototype,`connections`,void 0),l([i.s()],u.prototype,`connectorImages`,void 0),l([i.s()],u.prototype,`loadingTelegram`,void 0),u=l([r.r(`w3m-connector-list`)],u);var d=r.u`
62
+ :host {
63
+ flex: 1;
64
+ height: 100%;
65
+ }
66
+
67
+ button {
68
+ width: 100%;
69
+ height: 100%;
70
+ display: inline-flex;
71
+ align-items: center;
72
+ padding: ${({spacing:e})=>e[1]} ${({spacing:e})=>e[2]};
73
+ column-gap: ${({spacing:e})=>e[1]};
74
+ color: ${({tokens:e})=>e.theme.textSecondary};
75
+ border-radius: ${({borderRadius:e})=>e[20]};
76
+ background-color: transparent;
77
+ transition: background-color ${({durations:e})=>e.lg}
78
+ ${({easings:e})=>e[`ease-out-power-2`]};
79
+ will-change: background-color;
80
+ }
81
+
82
+ /* -- Hover & Active states ----------------------------------------------------------- */
83
+ button[data-active='true'] {
84
+ color: ${({tokens:e})=>e.theme.textPrimary};
85
+ background-color: ${({tokens:e})=>e.theme.foregroundTertiary};
86
+ }
87
+
88
+ button:hover:enabled:not([data-active='true']),
89
+ button:active:enabled:not([data-active='true']) {
90
+ wui-text,
91
+ wui-icon {
92
+ color: ${({tokens:e})=>e.theme.textPrimary};
93
+ }
94
+ }
95
+ `,f=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},p={lg:`lg-regular`,md:`md-regular`,sm:`sm-regular`},m={lg:`md`,md:`sm`,sm:`sm`},h=class extends r.p{constructor(){super(...arguments),this.icon=`mobile`,this.size=`md`,this.label=``,this.active=!1}render(){return r._`
96
+ <button data-active=${this.active}>
97
+ ${this.icon?r._`<wui-icon size=${m[this.size]} name=${this.icon}></wui-icon>`:``}
98
+ <wui-text variant=${p[this.size]}> ${this.label} </wui-text>
99
+ </button>
100
+ `}};h.styles=[r.s,r.a,d],f([i.c()],h.prototype,`icon`,void 0),f([i.c()],h.prototype,`size`,void 0),f([i.c()],h.prototype,`label`,void 0),f([i.c({type:Boolean})],h.prototype,`active`,void 0),h=f([r.r(`wui-tab-item`)],h);var g=r.u`
101
+ :host {
102
+ display: inline-flex;
103
+ align-items: center;
104
+ background-color: ${({tokens:e})=>e.theme.foregroundSecondary};
105
+ border-radius: ${({borderRadius:e})=>e[32]};
106
+ padding: ${({spacing:e})=>e[`01`]};
107
+ box-sizing: border-box;
108
+ }
109
+
110
+ :host([data-size='sm']) {
111
+ height: 26px;
112
+ }
113
+
114
+ :host([data-size='md']) {
115
+ height: 36px;
116
+ }
117
+ `,_=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},v=class extends r.p{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 n=t===this.activeTab;return r._`
118
+ <wui-tab-item
119
+ @click=${()=>this.onTabClick(t)}
120
+ icon=${e.icon}
121
+ size=${this.size}
122
+ label=${e.label}
123
+ ?active=${n}
124
+ data-active=${n}
125
+ data-testid="tab-${e.label?.toLowerCase()}"
126
+ ></wui-tab-item>
127
+ `})}onTabClick(e){this.activeTab=e,this.onTabChange(e)}};v.styles=[r.s,r.a,g],_([i.c({type:Array})],v.prototype,`tabs`,void 0),_([i.c()],v.prototype,`onTabChange`,void 0),_([i.c()],v.prototype,`size`,void 0),_([i.s()],v.prototype,`activeTab`,void 0),v=_([r.r(`wui-tabs`)],v);var y=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},b=class extends r.p{constructor(){super(...arguments),this.platformTabs=[],this.unsubscribe=[],this.platforms=[],this.onSelectPlatfrom=void 0}disconnectCallback(){this.unsubscribe.forEach(e=>e())}render(){return r._`
128
+ <wui-flex justifyContent="center" .padding=${[`0`,`0`,`4`,`0`]}>
129
+ <wui-tabs .tabs=${this.generateTabs()} .onTabChange=${this.onTabChange.bind(this)}></wui-tabs>
130
+ </wui-flex>
131
+ `}generateTabs(){let e=this.platforms.map(e=>e===`browser`?{label:`Browser`,icon:`extension`,platform:`browser`}:e===`mobile`?{label:`Mobile`,icon:`mobile`,platform:`mobile`}:e===`qrcode`?{label:`Mobile`,icon:`mobile`,platform:`qrcode`}:e===`web`?{label:`Webapp`,icon:`browser`,platform:`web`}:e===`desktop`?{label:`Desktop`,icon:`desktop`,platform:`desktop`}:{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)}};y([i.c({type:Array})],b.prototype,`platforms`,void 0),y([i.c()],b.prototype,`onSelectPlatfrom`,void 0),b=y([r.r(`w3m-connecting-header`)],b);var ee=r.u`
132
+ :host {
133
+ display: block;
134
+ width: 100px;
135
+ height: 100px;
136
+ }
137
+
138
+ svg {
139
+ width: 100px;
140
+ height: 100px;
141
+ }
142
+
143
+ rect {
144
+ fill: none;
145
+ stroke: ${e=>e.colors.accent100};
146
+ stroke-width: 3px;
147
+ stroke-linecap: round;
148
+ animation: dash 1s linear infinite;
149
+ }
150
+
151
+ @keyframes dash {
152
+ to {
153
+ stroke-dashoffset: 0px;
154
+ }
155
+ }
156
+ `,x=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},S=class extends r.p{constructor(){super(...arguments),this.radius=36}render(){return this.svgLoaderTemplate()}svgLoaderTemplate(){let e=this.radius>50?50:this.radius,t=36-e;return r._`
157
+ <svg viewBox="0 0 110 110" width="110" height="110">
158
+ <rect
159
+ x="2"
160
+ y="2"
161
+ width="106"
162
+ height="106"
163
+ rx=${e}
164
+ stroke-dasharray="${116+t} ${245+t}"
165
+ stroke-dashoffset=${360+t*1.75}
166
+ />
167
+ </svg>
168
+ `}};S.styles=[r.s,ee],x([i.c({type:Number})],S.prototype,`radius`,void 0),S=x([r.r(`wui-loading-thumbnail`)],S);var te=r.u`
169
+ wui-flex {
170
+ width: 100%;
171
+ height: 52px;
172
+ box-sizing: border-box;
173
+ background-color: ${({tokens:e})=>e.theme.foregroundPrimary};
174
+ border-radius: ${({borderRadius:e})=>e[5]};
175
+ padding-left: ${({spacing:e})=>e[3]};
176
+ padding-right: ${({spacing:e})=>e[3]};
177
+ display: flex;
178
+ align-items: center;
179
+ justify-content: space-between;
180
+ gap: ${({spacing:e})=>e[6]};
181
+ }
182
+
183
+ wui-text {
184
+ color: ${({tokens:e})=>e.theme.textSecondary};
185
+ }
186
+
187
+ wui-icon {
188
+ width: 12px;
189
+ height: 12px;
190
+ }
191
+ `,ne=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},C=class extends r.p{constructor(){super(...arguments),this.disabled=!1,this.label=``,this.buttonLabel=``}render(){return r._`
192
+ <wui-flex justifyContent="space-between" alignItems="center">
193
+ <wui-text variant="lg-regular" color="inherit">${this.label}</wui-text>
194
+ <wui-button variant="accent-secondary" size="sm">
195
+ ${this.buttonLabel}
196
+ <wui-icon name="chevronRight" color="inherit" size="inherit" slot="iconRight"></wui-icon>
197
+ </wui-button>
198
+ </wui-flex>
199
+ `}};C.styles=[r.s,r.a,te],ne([i.c({type:Boolean})],C.prototype,`disabled`,void 0),ne([i.c()],C.prototype,`label`,void 0),ne([i.c()],C.prototype,`buttonLabel`,void 0),C=ne([r.r(`wui-cta-button`)],C);var re=r.u`
200
+ :host {
201
+ display: block;
202
+ padding: 0 ${({spacing:e})=>e[5]} ${({spacing:e})=>e[5]};
203
+ }
204
+ `,ie=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},w=class extends r.p{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:a,homepage:o}=this.wallet,s=n.j.isMobile(),c=n.j.isIos(),l=n.j.isAndroid(),u=[t,i,o,a].filter(Boolean).length>1,d=r.i.getTruncateString({string:e,charsStart:12,charsEnd:0,truncate:`end`});return u&&!s?r._`
205
+ <wui-cta-button
206
+ label=${`Don't have ${d}?`}
207
+ buttonLabel="Get"
208
+ @click=${()=>n.y.push(`Downloads`,{wallet:this.wallet})}
209
+ ></wui-cta-button>
210
+ `:!u&&o?r._`
211
+ <wui-cta-button
212
+ label=${`Don't have ${d}?`}
213
+ buttonLabel="Get"
214
+ @click=${this.onHomePage.bind(this)}
215
+ ></wui-cta-button>
216
+ `:t&&c?r._`
217
+ <wui-cta-button
218
+ label=${`Don't have ${d}?`}
219
+ buttonLabel="Get"
220
+ @click=${this.onAppStore.bind(this)}
221
+ ></wui-cta-button>
222
+ `:i&&l?r._`
223
+ <wui-cta-button
224
+ label=${`Don't have ${d}?`}
225
+ buttonLabel="Get"
226
+ @click=${this.onPlayStore.bind(this)}
227
+ ></wui-cta-button>
228
+ `:(this.style.display=`none`,null)}onAppStore(){this.wallet?.app_store&&n.j.openHref(this.wallet.app_store,`_blank`)}onPlayStore(){this.wallet?.play_store&&n.j.openHref(this.wallet.play_store,`_blank`)}onHomePage(){this.wallet?.homepage&&n.j.openHref(this.wallet.homepage,`_blank`)}};w.styles=[re],ie([i.c({type:Object})],w.prototype,`wallet`,void 0),w=ie([r.r(`w3m-mobile-download-links`)],w);var ae=r.u`
229
+ @keyframes shake {
230
+ 0% {
231
+ transform: translateX(0);
232
+ }
233
+ 25% {
234
+ transform: translateX(3px);
235
+ }
236
+ 50% {
237
+ transform: translateX(-3px);
238
+ }
239
+ 75% {
240
+ transform: translateX(3px);
241
+ }
242
+ 100% {
243
+ transform: translateX(0);
244
+ }
245
+ }
246
+
247
+ wui-flex:first-child:not(:only-child) {
248
+ position: relative;
249
+ }
250
+
251
+ wui-wallet-image {
252
+ width: 56px;
253
+ height: 56px;
254
+ }
255
+
256
+ wui-loading-thumbnail {
257
+ position: absolute;
258
+ }
259
+
260
+ wui-icon-box {
261
+ position: absolute;
262
+ right: calc(${({spacing:e})=>e[1]} * -1);
263
+ bottom: calc(${({spacing:e})=>e[1]} * -1);
264
+ opacity: 0;
265
+ transform: scale(0.5);
266
+ transition-property: opacity, transform;
267
+ transition-duration: ${({durations:e})=>e.lg};
268
+ transition-timing-function: ${({easings:e})=>e[`ease-out-power-2`]};
269
+ will-change: opacity, transform;
270
+ }
271
+
272
+ wui-text[align='center'] {
273
+ width: 100%;
274
+ padding: 0px ${({spacing:e})=>e[4]};
275
+ }
276
+
277
+ [data-error='true'] wui-icon-box {
278
+ opacity: 1;
279
+ transform: scale(1);
280
+ }
281
+
282
+ [data-error='true'] > wui-flex:first-child {
283
+ animation: shake 250ms ${({easings:e})=>e[`ease-out-power-2`]} both;
284
+ }
285
+
286
+ [data-retry='false'] wui-link {
287
+ display: none;
288
+ }
289
+
290
+ [data-retry='true'] wui-link {
291
+ display: block;
292
+ opacity: 1;
293
+ }
294
+
295
+ w3m-mobile-download-links {
296
+ padding: 0px;
297
+ width: 100%;
298
+ }
299
+ `,T=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},E=class extends r.p{constructor(){super(),this.wallet=n.y.state.data?.wallet,this.connector=n.y.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=n.T.getConnectorImage(this.connector)??n.T.getWalletImage(this.wallet),this.name=this.wallet?.name??this.connector?.name??`Wallet`,this.isRetrying=!1,this.uri=n.c.state.wcUri,this.error=n.c.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(n.c.subscribeKey(`wcUri`,e=>{this.uri=e,this.isRetrying&&this.onRetry&&(this.isRetrying=!1,this.onConnect?.())}),n.c.subscribeKey(`wcError`,e=>this.error=e)),(n.j.isTelegram()||n.j.isSafari())&&n.j.isIos()&&n.c.state.wcUri&&this.onConnect?.()}firstUpdated(){this.onAutoConnect?.(),this.showRetry=!this.onAutoConnect}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),n.c.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`)),r._`
300
+ <wui-flex
301
+ data-error=${i.o(this.error)}
302
+ data-retry=${this.showRetry}
303
+ flexDirection="column"
304
+ alignItems="center"
305
+ .padding=${[`10`,`5`,`5`,`5`]}
306
+ gap="6"
307
+ >
308
+ <wui-flex gap="2" justifyContent="center" alignItems="center">
309
+ <wui-wallet-image size="lg" imageSrc=${i.o(this.imageSrc)}></wui-wallet-image>
310
+
311
+ ${this.error?null:this.loaderTemplate()}
312
+
313
+ <wui-icon-box
314
+ color="error"
315
+ icon="close"
316
+ size="sm"
317
+ border
318
+ borderColor="wui-color-bg-125"
319
+ ></wui-icon-box>
320
+ </wui-flex>
321
+
322
+ <wui-flex flexDirection="column" alignItems="center" gap="6"> <wui-flex
323
+ flexDirection="column"
324
+ alignItems="center"
325
+ gap="2"
326
+ .padding=${[`2`,`0`,`0`,`0`]}
327
+ >
328
+ <wui-text align="center" variant="lg-medium" color=${this.error?`error`:`primary`}>
329
+ ${t}
330
+ </wui-text>
331
+ <wui-text align="center" variant="lg-regular" color="secondary">${e}</wui-text>
332
+ </wui-flex>
333
+
334
+ ${this.secondaryBtnLabel?r._`
335
+ <wui-button
336
+ variant="neutral-secondary"
337
+ size="md"
338
+ ?disabled=${this.isRetrying||this.isLoading}
339
+ @click=${this.onTryAgain.bind(this)}
340
+ data-testid="w3m-connecting-widget-secondary-button"
341
+ >
342
+ <wui-icon
343
+ color="inherit"
344
+ slot="iconLeft"
345
+ name=${this.secondaryBtnIcon}
346
+ ></wui-icon>
347
+ ${this.secondaryBtnLabel}
348
+ </wui-button>
349
+ `:null}
350
+ </wui-flex>
351
+
352
+ ${this.isWalletConnect?r._`
353
+ <wui-flex .padding=${[`0`,`5`,`5`,`5`]} justifyContent="center">
354
+ <wui-link
355
+ @click=${this.onCopyUri}
356
+ variant="secondary"
357
+ icon="copy"
358
+ data-testid="wui-link-copy"
359
+ >
360
+ Copy link
361
+ </wui-link>
362
+ </wui-flex>
363
+ `:null}
364
+
365
+ <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links></wui-flex>
366
+ </wui-flex>
367
+ `}onShowRetry(){this.error&&!this.showRetry&&(this.showRetry=!0,(this.shadowRoot?.querySelector(`wui-button`))?.animate([{opacity:0},{opacity:1}],{fill:`forwards`,easing:`ease`}))}onTryAgain(){n.c.setWcError(!1),this.onRetry?(this.isRetrying=!0,this.onRetry?.()):this.onConnect?.()}loaderTemplate(){let e=n.h.state.themeVariables[`--w3m-border-radius-master`];return r._`<wui-loading-thumbnail radius=${(e?parseInt(e.replace(`px`,``),10):4)*9}></wui-loading-thumbnail>`}onCopyUri(){try{this.uri&&(n.j.copyToClopboard(this.uri),n.C.showSuccess(`Link copied`))}catch{n.C.showError(`Failed to copy`)}}};E.styles=ae,T([i.s()],E.prototype,`isRetrying`,void 0),T([i.s()],E.prototype,`uri`,void 0),T([i.s()],E.prototype,`error`,void 0),T([i.s()],E.prototype,`ready`,void 0),T([i.s()],E.prototype,`showRetry`,void 0),T([i.s()],E.prototype,`label`,void 0),T([i.s()],E.prototype,`secondaryBtnLabel`,void 0),T([i.s()],E.prototype,`secondaryLabel`,void 0),T([i.s()],E.prototype,`isLoading`,void 0),T([i.c({type:Boolean})],E.prototype,`isMobile`,void 0),T([i.c()],E.prototype,`onRetry`,void 0);var oe=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},se=class extends E{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),n.v.sendEvent({type:`track`,event:`SELECT_WALLET`,properties:{name:this.wallet.name,platform:`browser`,displayIndex:this.wallet?.display_index,walletRank:this.wallet.order,view:n.y.state.view}})}async onConnectProxy(){try{this.error=!1;let{connectors:e}=n.m.state,t=e.find(e=>e.type===`ANNOUNCED`&&e.info?.rdns===this.wallet?.rdns||e.type===`INJECTED`||e.name===this.wallet?.name);if(t)await n.c.connectExternal(t,t.chain);else throw Error(`w3m-connecting-wc-browser: No connector found`);n.g.close()}catch(e){e instanceof n.D&&e.originalName===n.H.PROVIDER_RPC_ERROR_NAME.USER_REJECTED_REQUEST?n.v.sendEvent({type:`track`,event:`USER_REJECTED`,properties:{message:e.message}}):n.v.sendEvent({type:`track`,event:`CONNECT_ERROR`,properties:{message:e?.message??`Unknown`}}),this.error=!0}}};se=oe([r.r(`w3m-connecting-wc-browser`)],se);var ce=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},le=class extends E{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),n.v.sendEvent({type:`track`,event:`SELECT_WALLET`,properties:{name:this.wallet.name,platform:`desktop`,displayIndex:this.wallet?.display_index,walletRank:this.wallet.order,view:n.y.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:r,href:i}=n.j.formatNativeUrl(e,this.uri);n.c.setWcLinking({name:t,href:i}),n.c.setRecentWallet(this.wallet),n.j.openHref(r,`_blank`)}catch{this.error=!0}}};le=ce([r.r(`w3m-connecting-wc-desktop`)],le);var D=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},O=class extends E{constructor(){if(super(),this.btnLabelTimeout=void 0,this.redirectDeeplink=void 0,this.redirectUniversalLink=void 0,this.target=void 0,this.preferUniversalLinks=n.k.state.experimental_preferUniversalLinks,this.isLoading=!0,this.onConnect=()=>{n.l.onConnectMobile(this.wallet)},!this.wallet)throw Error(`w3m-connecting-wc-mobile: No wallet provided`);this.secondaryBtnLabel=`Open`,this.secondaryLabel=n.N.CONNECT_LABELS.MOBILE,this.secondaryBtnIcon=`externalLink`,this.onHandleURI(),this.unsubscribe.push(n.c.subscribeKey(`wcUri`,()=>{this.onHandleURI()})),n.v.sendEvent({type:`track`,event:`SELECT_WALLET`,properties:{name:this.wallet.name,platform:`mobile`,displayIndex:this.wallet?.display_index,walletRank:this.wallet.order,view:n.y.state.view}})}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.btnLabelTimeout)}onHandleURI(){this.isLoading=!this.uri,!this.ready&&this.uri&&(this.ready=!0,this.onConnect?.())}onTryAgain(){n.c.setWcError(!1),this.onConnect?.()}};D([i.s()],O.prototype,`redirectDeeplink`,void 0),D([i.s()],O.prototype,`redirectUniversalLink`,void 0),D([i.s()],O.prototype,`target`,void 0),D([i.s()],O.prototype,`preferUniversalLinks`,void 0),D([i.s()],O.prototype,`isLoading`,void 0),O=D([r.r(`w3m-connecting-wc-mobile`)],O);var ue=e.t(((e,t)=>{t.exports=function(){return typeof Promise==`function`&&Promise.prototype&&Promise.prototype.then}})),k=e.t((e=>{var t,n=[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];e.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 e*4+17},e.getSymbolTotalCodewords=function(e){return n[e]},e.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t},e.setToSJISFunction=function(e){if(typeof e!=`function`)throw Error(`"toSJISFunc" is not a valid function.`);t=e},e.isKanjiModeEnabled=function(){return t!==void 0},e.toSJIS=function(e){return t(e)}})),de=e.t((e=>{e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`l`:case`low`:return e.L;case`m`:case`medium`:return e.M;case`q`:case`quartile`:return e.Q;case`h`:case`high`:return e.H;default:throw Error(`Unknown EC Level: `+t)}}e.isValid=function(e){return e&&e.bit!==void 0&&e.bit>=0&&e.bit<4},e.from=function(n,r){if(e.isValid(n))return n;try{return t(n)}catch{return r}}})),fe=e.t(((e,t)=>{function n(){this.buffer=[],this.length=0}n.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 n=0;n<t;n++)this.putBit((e>>>t-n-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++}},t.exports=n})),pe=e.t(((e,t)=>{function n(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)}n.prototype.set=function(e,t,n,r){let i=e*this.size+t;this.data[i]=n,r&&(this.reservedBit[i]=!0)},n.prototype.get=function(e,t){return this.data[e*this.size+t]},n.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},n.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},t.exports=n})),me=e.t((e=>{var t=k().getSymbolSize;e.getRowColCoords=function(e){if(e===1)return[];let n=Math.floor(e/7)+2,r=t(e),i=r===145?26:Math.ceil((r-13)/(2*n-2))*2,a=[r-7];for(let e=1;e<n-1;e++)a[e]=a[e-1]-i;return a.push(6),a.reverse()},e.getPositions=function(t){let n=[],r=e.getRowColCoords(t),i=r.length;for(let e=0;e<i;e++)for(let t=0;t<i;t++)e===0&&t===0||e===0&&t===i-1||e===i-1&&t===0||n.push([r[e],r[t]]);return n}})),he=e.t((e=>{var t=k().getSymbolSize,n=7;e.getPositions=function(e){let r=t(e);return[[0,0],[r-n,0],[0,r-n]]}})),ge=e.t((e=>{e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(e){return e!=null&&e!==``&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){let n=e.size,r=0,i=0,a=0,o=null,s=null;for(let c=0;c<n;c++){i=a=0,o=s=null;for(let l=0;l<n;l++){let n=e.get(c,l);n===o?i++:(i>=5&&(r+=t.N1+(i-5)),o=n,i=1),n=e.get(l,c),n===s?a++:(a>=5&&(r+=t.N1+(a-5)),s=n,a=1)}i>=5&&(r+=t.N1+(i-5)),a>=5&&(r+=t.N1+(a-5))}return r},e.getPenaltyN2=function(e){let n=e.size,r=0;for(let t=0;t<n-1;t++)for(let i=0;i<n-1;i++){let n=e.get(t,i)+e.get(t,i+1)+e.get(t+1,i)+e.get(t+1,i+1);(n===4||n===0)&&r++}return r*t.N2},e.getPenaltyN3=function(e){let n=e.size,r=0,i=0,a=0;for(let t=0;t<n;t++){i=a=0;for(let o=0;o<n;o++)i=i<<1&2047|e.get(t,o),o>=10&&(i===1488||i===93)&&r++,a=a<<1&2047|e.get(o,t),o>=10&&(a===1488||a===93)&&r++}return r*t.N3},e.getPenaltyN4=function(e){let n=0,r=e.data.length;for(let t=0;t<r;t++)n+=e.data[t];return Math.abs(Math.ceil(n*100/r/5)-10)*t.N4};function n(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw Error(`bad maskPattern:`+t)}}e.applyMask=function(e,t){let r=t.size;for(let i=0;i<r;i++)for(let a=0;a<r;a++)t.isReserved(a,i)||t.xor(a,i,n(e,a,i))},e.getBestMask=function(t,n){let r=Object.keys(e.Patterns).length,i=0,a=1/0;for(let o=0;o<r;o++){n(o),e.applyMask(o,t);let r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(o,t),r<a&&(a=r,i=o)}return i}})),_e=e.t((e=>{var t=de(),n=[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],r=[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,192,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];e.getBlocksCount=function(e,r){switch(r){case t.L:return n[(e-1)*4+0];case t.M:return n[(e-1)*4+1];case t.Q:return n[(e-1)*4+2];case t.H:return n[(e-1)*4+3];default:return}},e.getTotalCodewordsCount=function(e,n){switch(n){case t.L:return r[(e-1)*4+0];case t.M:return r[(e-1)*4+1];case t.Q:return r[(e-1)*4+2];case t.H:return r[(e-1)*4+3];default:return}}})),ve=e.t((e=>{var t=new Uint8Array(512),n=new Uint8Array(256);(function(){let e=1;for(let r=0;r<255;r++)t[r]=e,n[e]=r,e<<=1,e&256&&(e^=285);for(let e=255;e<512;e++)t[e]=t[e-255]})(),e.log=function(e){if(e<1)throw Error(`log(`+e+`)`);return n[e]},e.exp=function(e){return t[e]},e.mul=function(e,r){return e===0||r===0?0:t[n[e]+n[r]]}})),ye=e.t((e=>{var t=ve();e.mul=function(e,n){let r=new Uint8Array(e.length+n.length-1);for(let i=0;i<e.length;i++)for(let a=0;a<n.length;a++)r[i+a]^=t.mul(e[i],n[a]);return r},e.mod=function(e,n){let r=new Uint8Array(e);for(;r.length-n.length>=0;){let e=r[0];for(let i=0;i<n.length;i++)r[i]^=t.mul(n[i],e);let i=0;for(;i<r.length&&r[i]===0;)i++;r=r.slice(i)}return r},e.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let i=0;i<n;i++)r=e.mul(r,new Uint8Array([1,t.exp(i)]));return r}})),be=e.t(((e,t)=>{var n=ye();function r(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}r.prototype.initialize=function(e){this.degree=e,this.genPoly=n.generateECPolynomial(this.degree)},r.prototype.encode=function(e){if(!this.genPoly)throw Error(`Encoder not initialized`);let t=new Uint8Array(e.length+this.degree);t.set(e);let r=n.mod(t,this.genPoly),i=this.degree-r.length;if(i>0){let e=new Uint8Array(this.degree);return e.set(r,i),e}return r},t.exports=r})),xe=e.t((e=>{e.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}})),Se=e.t((e=>{var t=`[0-9]+`,n=`[A-Z $%*+\\-./:]+`,r=`(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+`;r=r.replace(/u/g,`\\u`);var i=`(?:(?![A-Z0-9 $%*+\\-./:]|`+r+`)(?:.|[\r
368
+ ]))+`;e.KANJI=new RegExp(r,`g`),e.BYTE_KANJI=RegExp(`[^A-Z0-9 $%*+\\-./:]+`,`g`),e.BYTE=new RegExp(i,`g`),e.NUMERIC=new RegExp(t,`g`),e.ALPHANUMERIC=new RegExp(n,`g`);var a=RegExp(`^`+r+`$`),o=RegExp(`^`+t+`$`),s=RegExp(`^[A-Z0-9 $%*+\\-./:]+$`);e.testKanji=function(e){return a.test(e)},e.testNumeric=function(e){return o.test(e)},e.testAlphanumeric=function(e){return s.test(e)}})),A=e.t((e=>{var t=xe(),n=Se();e.NUMERIC={id:`Numeric`,bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:`Alphanumeric`,bit:2,ccBits:[9,11,13]},e.BYTE={id:`Byte`,bit:4,ccBits:[8,16,16]},e.KANJI={id:`Kanji`,bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,n){if(!e.ccBits)throw Error(`Invalid mode: `+e);if(!t.isValid(n))throw Error(`Invalid version: `+n);return n>=1&&n<10?e.ccBits[0]:n<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(t){return n.testNumeric(t)?e.NUMERIC:n.testAlphanumeric(t)?e.ALPHANUMERIC:n.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw Error(`Invalid mode`)},e.isValid=function(e){return e&&e.bit&&e.ccBits};function r(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`numeric`:return e.NUMERIC;case`alphanumeric`:return e.ALPHANUMERIC;case`kanji`:return e.KANJI;case`byte`:return e.BYTE;default:throw Error(`Unknown mode: `+t)}}e.from=function(t,n){if(e.isValid(t))return t;try{return r(t)}catch{return n}}})),Ce=e.t((e=>{var t=k(),n=_e(),r=de(),i=A(),a=xe(),o=7973,s=t.getBCHDigit(o);function c(t,n,r){for(let i=1;i<=40;i++)if(n<=e.getCapacity(i,r,t))return i}function l(e,t){return i.getCharCountIndicator(e,t)+4}function u(e,t){let n=0;return e.forEach(function(e){let r=l(e.mode,t);n+=r+e.getBitsLength()}),n}function d(t,n){for(let r=1;r<=40;r++)if(u(t,r)<=e.getCapacity(r,n,i.MIXED))return r}e.from=function(e,t){return a.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,r,o){if(!a.isValid(e))throw Error(`Invalid QR Code version`);o===void 0&&(o=i.BYTE);let s=(t.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,r))*8;if(o===i.MIXED)return s;let c=s-l(o,e);switch(o){case i.NUMERIC:return Math.floor(c/10*3);case i.ALPHANUMERIC:return Math.floor(c/11*2);case i.KANJI:return Math.floor(c/13);case i.BYTE:default:return Math.floor(c/8)}},e.getBestVersionForData=function(e,t){let n,i=r.from(t,r.M);if(Array.isArray(e)){if(e.length>1)return d(e,i);if(e.length===0)return 1;n=e[0]}else n=e;return c(n.mode,n.getLength(),i)},e.getEncodedBits=function(e){if(!a.isValid(e)||e<7)throw Error(`Invalid QR Code version`);let n=e<<12;for(;t.getBCHDigit(n)-s>=0;)n^=o<<t.getBCHDigit(n)-s;return e<<12|n}})),we=e.t((e=>{var t=k(),n=1335,r=21522,i=t.getBCHDigit(n);e.getEncodedBits=function(e,a){let o=e.bit<<3|a,s=o<<10;for(;t.getBCHDigit(s)-i>=0;)s^=n<<t.getBCHDigit(s)-i;return(o<<10|s)^r}})),Te=e.t(((e,t)=>{var n=A();function r(e){this.mode=n.NUMERIC,this.data=e.toString()}r.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){let t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);let i=this.data.length-t;i>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,i*3+1))},t.exports=r})),Ee=e.t(((e,t)=>{var n=A(),r=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:`.split(``);function i(e){this.mode=n.ALPHANUMERIC,this.data=e}i.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let n=r.indexOf(this.data[t])*45;n+=r.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(r.indexOf(this.data[t]),6)},t.exports=i})),De=e.t(((e,t)=>{t.exports=function(e){for(var t=[],n=e.length,r=0;r<n;r++){var i=e.charCodeAt(r);if(i>=55296&&i<=56319&&n>r+1){var a=e.charCodeAt(r+1);a>=56320&&a<=57343&&(i=(i-55296)*1024+a-56320+65536,r+=1)}if(i<128){t.push(i);continue}if(i<2048){t.push(i>>6|192),t.push(i&63|128);continue}if(i<55296||i>=57344&&i<65536){t.push(i>>12|224),t.push(i>>6&63|128),t.push(i&63|128);continue}if(i>=65536&&i<=1114111){t.push(i>>18|240),t.push(i>>12&63|128),t.push(i>>6&63|128),t.push(i&63|128);continue}t.push(239,191,189)}return new Uint8Array(t).buffer}})),Oe=e.t(((e,t)=>{var n=De(),r=A();function i(e){this.mode=r.BYTE,typeof e==`string`&&(e=n(e)),this.data=new Uint8Array(e)}i.getBitsLength=function(e){return e*8},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},t.exports=i})),ke=e.t(((e,t)=>{var n=A(),r=k();function i(e){this.mode=n.KANJI,this.data=e}i.getBitsLength=function(e){return e*13},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let n=r.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw Error(`Invalid SJIS character: `+this.data[t]+`
369
+ Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}},t.exports=i})),Ae=e.t((e=>{var n=A(),r=Te(),i=Ee(),a=Oe(),o=ke(),s=Se(),c=k(),l=t.t();function u(e){return unescape(encodeURIComponent(e)).length}function d(e,t,n){let r=[],i;for(;(i=e.exec(n))!==null;)r.push({data:i[0],index:i.index,mode:t,length:i[0].length});return r}function f(e){let t=d(s.NUMERIC,n.NUMERIC,e),r=d(s.ALPHANUMERIC,n.ALPHANUMERIC,e),i,a;return c.isKanjiModeEnabled()?(i=d(s.BYTE,n.BYTE,e),a=d(s.KANJI,n.KANJI,e)):(i=d(s.BYTE_KANJI,n.BYTE,e),a=[]),t.concat(r,i,a).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function p(e,t){switch(t){case n.NUMERIC:return r.getBitsLength(e);case n.ALPHANUMERIC:return i.getBitsLength(e);case n.KANJI:return o.getBitsLength(e);case n.BYTE:return a.getBitsLength(e)}}function m(e){return e.reduce(function(e,t){let n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)},[])}function h(e){let t=[];for(let r=0;r<e.length;r++){let i=e[r];switch(i.mode){case n.NUMERIC:t.push([i,{data:i.data,mode:n.ALPHANUMERIC,length:i.length},{data:i.data,mode:n.BYTE,length:i.length}]);break;case n.ALPHANUMERIC:t.push([i,{data:i.data,mode:n.BYTE,length:i.length}]);break;case n.KANJI:t.push([i,{data:i.data,mode:n.BYTE,length:u(i.data)}]);break;case n.BYTE:t.push([{data:i.data,mode:n.BYTE,length:u(i.data)}])}}return t}function g(e,t){let r={},i={start:{}},a=[`start`];for(let o=0;o<e.length;o++){let s=e[o],c=[];for(let e=0;e<s.length;e++){let l=s[e],u=``+o+e;c.push(u),r[u]={node:l,lastCount:0},i[u]={};for(let e=0;e<a.length;e++){let o=a[e];r[o]&&r[o].node.mode===l.mode?(i[o][u]=p(r[o].lastCount+l.length,l.mode)-p(r[o].lastCount,l.mode),r[o].lastCount+=l.length):(r[o]&&(r[o].lastCount=l.length),i[o][u]=p(l.length,l.mode)+4+n.getCharCountIndicator(l.mode,t))}}a=c}for(let e=0;e<a.length;e++)i[a[e]].end=0;return{map:i,table:r}}function _(e,t){let s,l=n.getBestModeForData(e);if(s=n.from(t,l),s!==n.BYTE&&s.bit<l.bit)throw Error(`"`+e+`" cannot be encoded with mode `+n.toString(s)+`.
370
+ Suggested mode is: `+n.toString(l));switch(s===n.KANJI&&!c.isKanjiModeEnabled()&&(s=n.BYTE),s){case n.NUMERIC:return new r(e);case n.ALPHANUMERIC:return new i(e);case n.KANJI:return new o(e);case n.BYTE:return new a(e)}}e.fromArray=function(e){return e.reduce(function(e,t){return typeof t==`string`?e.push(_(t,null)):t.data&&e.push(_(t.data,t.mode)),e},[])},e.fromString=function(t,n){let r=g(h(f(t,c.isKanjiModeEnabled())),n),i=l.find_path(r.map,`start`,`end`),a=[];for(let e=1;e<i.length-1;e++)a.push(r.table[i[e]].node);return e.fromArray(m(a))},e.rawSplit=function(t){return e.fromArray(f(t,c.isKanjiModeEnabled()))}})),je=e.t((e=>{var t=k(),n=de(),r=fe(),i=pe(),a=me(),o=he(),s=ge(),c=_e(),l=be(),u=Ce(),d=we(),f=A(),p=Ae();function m(e,t){let n=e.size,r=o.getPositions(t);for(let t=0;t<r.length;t++){let i=r[t][0],a=r[t][1];for(let t=-1;t<=7;t++)if(!(i+t<=-1||n<=i+t))for(let r=-1;r<=7;r++)a+r<=-1||n<=a+r||(t>=0&&t<=6&&(r===0||r===6)||r>=0&&r<=6&&(t===0||t===6)||t>=2&&t<=4&&r>=2&&r<=4?e.set(i+t,a+r,!0,!0):e.set(i+t,a+r,!1,!0))}}function h(e){let t=e.size;for(let n=8;n<t-8;n++){let t=n%2==0;e.set(n,6,t,!0),e.set(6,n,t,!0)}}function g(e,t){let n=a.getPositions(t);for(let t=0;t<n.length;t++){let r=n[t][0],i=n[t][1];for(let t=-2;t<=2;t++)for(let n=-2;n<=2;n++)t===-2||t===2||n===-2||n===2||t===0&&n===0?e.set(r+t,i+n,!0,!0):e.set(r+t,i+n,!1,!0)}}function _(e,t){let n=e.size,r=u.getEncodedBits(t),i,a,o;for(let t=0;t<18;t++)i=Math.floor(t/3),a=t%3+n-8-3,o=(r>>t&1)==1,e.set(i,a,o,!0),e.set(a,i,o,!0)}function v(e,t,n){let r=e.size,i=d.getEncodedBits(t,n),a,o;for(a=0;a<15;a++)o=(i>>a&1)==1,a<6?e.set(a,8,o,!0):a<8?e.set(a+1,8,o,!0):e.set(r-15+a,8,o,!0),a<8?e.set(8,r-a-1,o,!0):a<9?e.set(8,15-a-1+1,o,!0):e.set(8,15-a-1,o,!0);e.set(r-8,8,1,!0)}function y(e,t){let n=e.size,r=-1,i=n-1,a=7,o=0;for(let s=n-1;s>0;s-=2)for(s===6&&s--;;){for(let n=0;n<2;n++)if(!e.isReserved(i,s-n)){let r=!1;o<t.length&&(r=(t[o]>>>a&1)==1),e.set(i,s-n,r),a--,a===-1&&(o++,a=7)}if(i+=r,i<0||n<=i){i-=r,r=-r;break}}}function b(e,n,i){let a=new r;i.forEach(function(t){a.put(t.mode.bit,4),a.put(t.getLength(),f.getCharCountIndicator(t.mode,e)),t.write(a)});let o=(t.getSymbolTotalCodewords(e)-c.getTotalCodewordsCount(e,n))*8;for(a.getLengthInBits()+4<=o&&a.put(0,4);a.getLengthInBits()%8!=0;)a.putBit(0);let s=(o-a.getLengthInBits())/8;for(let e=0;e<s;e++)a.put(e%2?17:236,8);return ee(a,e,n)}function ee(e,n,r){let i=t.getSymbolTotalCodewords(n),a=i-c.getTotalCodewordsCount(n,r),o=c.getBlocksCount(n,r),s=o-i%o,u=Math.floor(i/o),d=Math.floor(a/o),f=d+1,p=u-d,m=new l(p),h=0,g=Array(o),_=Array(o),v=0,y=new Uint8Array(e.buffer);for(let e=0;e<o;e++){let t=e<s?d:f;g[e]=y.slice(h,h+t),_[e]=m.encode(g[e]),h+=t,v=Math.max(v,t)}let b=new Uint8Array(i),ee=0,x,S;for(x=0;x<v;x++)for(S=0;S<o;S++)x<g[S].length&&(b[ee++]=g[S][x]);for(x=0;x<p;x++)for(S=0;S<o;S++)b[ee++]=_[S][x];return b}function x(e,n,r,a){let o;if(Array.isArray(e))o=p.fromArray(e);else if(typeof e==`string`){let t=n;if(!t){let n=p.rawSplit(e);t=u.getBestVersionForData(n,r)}o=p.fromString(e,t||40)}else throw Error(`Invalid data`);let c=u.getBestVersionForData(o,r);if(!c)throw Error(`The amount of data is too big to be stored in a QR Code`);if(!n)n=c;else if(n<c)throw Error(`
371
+ The chosen QR Code version cannot contain this amount of data.
372
+ Minimum version required to store current data is: `+c+`.
373
+ `);let l=b(n,r,o),d=new i(t.getSymbolSize(n));return m(d,n),h(d),g(d,n),v(d,r,0),n>=7&&_(d,n),y(d,l),isNaN(a)&&(a=s.getBestMask(d,v.bind(null,d,r))),s.applyMask(a,d),v(d,r,a),{modules:d,version:n,errorCorrectionLevel:r,maskPattern:a,segments:o}}e.create=function(e,r){if(e===void 0||e===``)throw Error(`No input text`);let i=n.M,a,o;return r!==void 0&&(i=n.from(r.errorCorrectionLevel,n.M),a=u.from(r.version),o=s.from(r.maskPattern),r.toSJISFunc&&t.setToSJISFunction(r.toSJISFunc)),x(e,a,i,o)}})),Me=e.t((e=>{function t(e){if(typeof e==`number`&&(e=e.toString()),typeof e!=`string`)throw Error(`Color should be defined as hex string`);let t=e.slice().replace(`#`,``).split(``);if(t.length<3||t.length===5||t.length>8)throw Error(`Invalid hex color: `+e);(t.length===3||t.length===4)&&(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),t.length===6&&t.push(`F`,`F`);let n=parseInt(t.join(``),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:`#`+t.slice(0,6).join(``)}}e.getOptions=function(e){e||={},e.color||={};let n=e.margin===void 0||e.margin===null||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:r,scale:r?4:i,margin:n,color:{dark:t(e.color.dark||`#000000ff`),light:t(e.color.light||`#ffffffff`)},type:e.type,rendererOpts:e.rendererOpts||{}}},e.getScale=function(e,t){return t.width&&t.width>=e+t.margin*2?t.width/(e+t.margin*2):t.scale},e.getImageWidth=function(t,n){let r=e.getScale(t,n);return Math.floor((t+n.margin*2)*r)},e.qrToImageData=function(t,n,r){let i=n.modules.size,a=n.modules.data,o=e.getScale(i,r),s=Math.floor((i+r.margin*2)*o),c=r.margin*o,l=[r.color.light,r.color.dark];for(let e=0;e<s;e++)for(let n=0;n<s;n++){let u=(e*s+n)*4,d=r.color.light;if(e>=c&&n>=c&&e<s-c&&n<s-c){let t=Math.floor((e-c)/o),r=Math.floor((n-c)/o);d=l[a[t*i+r]?1:0]}t[u++]=d.r,t[u++]=d.g,t[u++]=d.b,t[u]=d.a}}})),Ne=e.t((e=>{var t=Me();function n(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||={},t.height=n,t.width=n,t.style.height=n+`px`,t.style.width=n+`px`}function r(){try{return document.createElement(`canvas`)}catch{throw Error(`You need to specify a canvas element`)}}e.render=function(e,i,a){let o=a,s=i;o===void 0&&(!i||!i.getContext)&&(o=i,i=void 0),i||(s=r()),o=t.getOptions(o);let c=t.getImageWidth(e.modules.size,o),l=s.getContext(`2d`),u=l.createImageData(c,c);return t.qrToImageData(u.data,e,o),n(l,s,c),l.putImageData(u,0,0),s},e.renderToDataURL=function(t,n,r){let i=r;i===void 0&&(!n||!n.getContext)&&(i=n,n=void 0),i||={};let a=e.render(t,n,i),o=i.type||`image/png`,s=i.rendererOpts||{};return a.toDataURL(o,s.quality)}})),Pe=e.t((e=>{var t=Me();function n(e,t){let n=e.a/255,r=t+`="`+e.hex+`"`;return n<1?r+` `+t+`-opacity="`+n.toFixed(2).slice(1)+`"`:r}function r(e,t,n){let r=e+t;return n!==void 0&&(r+=` `+n),r}function i(e,t,n){let i=``,a=0,o=!1,s=0;for(let c=0;c<e.length;c++){let l=Math.floor(c%t),u=Math.floor(c/t);!l&&!o&&(o=!0),e[c]?(s++,c>0&&l>0&&e[c-1]||(i+=o?r(`M`,l+n,.5+u+n):r(`m`,a,0),a=0,o=!1),l+1<t&&e[c+1]||(i+=r(`h`,s),s=0)):a++}return i}e.render=function(e,r,a){let o=t.getOptions(r),s=e.modules.size,c=e.modules.data,l=s+o.margin*2,u=o.color.light.a?`<path `+n(o.color.light,`fill`)+` d="M0 0h`+l+`v`+l+`H0z"/>`:``,d=`<path `+n(o.color.dark,`stroke`)+` d="`+i(c,s,o.margin)+`"/>`,f=`viewBox="0 0 `+l+` `+l+`"`,p=`<svg xmlns="http://www.w3.org/2000/svg" `+(o.width?`width="`+o.width+`" height="`+o.width+`" `:``)+f+` shape-rendering="crispEdges">`+u+d+`</svg>
374
+ `;return typeof a==`function`&&a(null,p),p}})),Fe=e.t((e=>{var t=ue(),n=je(),r=Ne(),i=Pe();function a(e,r,i,a,o){let s=[].slice.call(arguments,1),c=s.length,l=typeof s[c-1]==`function`;if(!l&&!t())throw Error(`Callback required as last argument`);if(l){if(c<2)throw Error(`Too few arguments provided`);c===2?(o=i,i=r,r=a=void 0):c===3&&(r.getContext&&o===void 0?(o=a,a=void 0):(o=a,a=i,i=r,r=void 0))}else{if(c<1)throw Error(`Too few arguments provided`);return c===1?(i=r,r=a=void 0):c===2&&!r.getContext&&(a=i,i=r,r=void 0),new Promise(function(t,o){try{t(e(n.create(i,a),r,a))}catch(e){o(e)}})}try{let t=n.create(i,a);o(null,e(t,r,a))}catch(e){o(e)}}e.create=n.create,e.toCanvas=a.bind(null,r.render),e.toDataURL=a.bind(null,r.renderToDataURL),e.toString=a.bind(null,function(e,t,n){return i.render(e,n)})})),Ie=e.o(Fe(),1),Le=.1,Re=2.5,j=7;function ze(e,t,n){return e===t?!1:(e-t<0?t-e:e-t)<=n+Le}function Be(e,t){let n=Array.prototype.slice.call(Ie.create(e,{errorCorrectionLevel:t}).modules.data,0),r=Math.sqrt(n.length);return n.reduce((e,t,n)=>(n%r===0?e.push([t]):e[e.length-1].push(t))&&e,[])}const Ve={generate({uri:e,size:t,logoSize:n,padding:i=8,dotColor:a=`var(--apkt-colors-black)`}){let o=[],s=Be(e,`Q`),c=(t-2*i)/s.length,l=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];l.forEach(({x:e,y:t})=>{let n=(s.length-j)*c*e+i,u=(s.length-j)*c*t+i,d=.45;for(let e=0;e<l.length;e+=1){let t=c*(j-e*2);o.push(r.y`
375
+ <rect
376
+ fill=${e===2?`var(--apkt-colors-black)`:`var(--apkt-colors-white)`}
377
+ width=${e===0?t-10:t}
378
+ rx= ${e===0?(t-10)*d:t*d}
379
+ ry= ${e===0?(t-10)*d:t*d}
380
+ stroke=${a}
381
+ stroke-width=${e===0?10:0}
382
+ height=${e===0?t-10:t}
383
+ x= ${e===0?u+c*e+10/2:u+c*e}
384
+ y= ${e===0?n+c*e+10/2:n+c*e}
385
+ />
386
+ `)}});let u=Math.floor((n+25)/c),d=s.length/2-u/2,f=s.length/2+u/2-1,p=[];s.forEach((e,t)=>{e.forEach((e,n)=>{if(s[t][n]&&!(t<j&&n<j||t>s.length-(j+1)&&n<j||t<j&&n>s.length-(j+1))&&!(t>d&&t<f&&n>d&&n<f)){let e=t*c+c/2+i,r=n*c+c/2+i;p.push([e,r])}})});let m={};return p.forEach(([e,t])=>{m[e]?m[e]?.push(t):m[e]=[t]}),Object.entries(m).map(([e,t])=>{let n=t.filter(e=>t.every(t=>!ze(e,t,c)));return[Number(e),n]}).forEach(([e,t])=>{t.forEach(t=>{o.push(r.y`<circle cx=${e} cy=${t} fill=${a} r=${c/Re} />`)})}),Object.entries(m).filter(([e,t])=>t.length>1).map(([e,t])=>{let n=t.filter(e=>t.some(t=>ze(e,t,c)));return[Number(e),n]}).map(([e,t])=>{t.sort((e,t)=>e<t?-1:1);let n=[];for(let e of t){let t=n.find(t=>t.some(t=>ze(e,t,c)));t?t.push(e):n.push([e])}return[e,n.map(e=>[e[0],e[e.length-1]])]}).forEach(([e,t])=>{t.forEach(([t,n])=>{o.push(r.y`
387
+ <line
388
+ x1=${e}
389
+ x2=${e}
390
+ y1=${t}
391
+ y2=${n}
392
+ stroke=${a}
393
+ stroke-width=${c/(Re/2)}
394
+ stroke-linecap="round"
395
+ />
396
+ `)})}),o}};var He=r.u`
397
+ :host {
398
+ position: relative;
399
+ user-select: none;
400
+ display: block;
401
+ overflow: hidden;
402
+ aspect-ratio: 1 / 1;
403
+ width: 100%;
404
+ height: 100%;
405
+ background-color: ${({colors:e})=>e.white};
406
+ border: 1px solid ${({tokens:e})=>e.theme.borderPrimary};
407
+ }
408
+
409
+ :host {
410
+ border-radius: ${({borderRadius:e})=>e[4]};
411
+ display: flex;
412
+ align-items: center;
413
+ justify-content: center;
414
+ }
415
+
416
+ :host([data-clear='true']) > wui-icon {
417
+ display: none;
418
+ }
419
+
420
+ svg:first-child,
421
+ wui-image,
422
+ wui-icon {
423
+ position: absolute;
424
+ top: 50%;
425
+ left: 50%;
426
+ transform: translateY(-50%) translateX(-50%);
427
+ background-color: ${({tokens:e})=>e.theme.backgroundPrimary};
428
+ box-shadow: inset 0 0 0 4px ${({tokens:e})=>e.theme.backgroundPrimary};
429
+ border-radius: ${({borderRadius:e})=>e[6]};
430
+ }
431
+
432
+ wui-image {
433
+ width: 25%;
434
+ height: 25%;
435
+ border-radius: ${({borderRadius:e})=>e[2]};
436
+ }
437
+
438
+ wui-icon {
439
+ width: 100%;
440
+ height: 100%;
441
+ color: #3396ff !important;
442
+ transform: translateY(-50%) translateX(-50%) scale(0.25);
443
+ }
444
+
445
+ wui-icon > svg {
446
+ width: inherit;
447
+ height: inherit;
448
+ }
449
+ `,M=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},N=class extends r.p{constructor(){super(...arguments),this.uri=``,this.size=500,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),r._`<wui-flex
450
+ alignItems="center"
451
+ justifyContent="center"
452
+ class="wui-qr-code"
453
+ direction="column"
454
+ gap="4"
455
+ width="100%"
456
+ style="height: 100%"
457
+ >
458
+ ${this.templateVisual()} ${this.templateSvg()}
459
+ </wui-flex>`}templateSvg(){return r.y`
460
+ <svg viewBox="0 0 ${this.size} ${this.size}" width="100%" height="100%">
461
+ ${Ve.generate({uri:this.uri,size:this.size,logoSize:this.arenaClear?0:this.size/4})}
462
+ </svg>
463
+ `}templateVisual(){return this.imageSrc?r._`<wui-image src=${this.imageSrc} alt=${this.alt??`logo`}></wui-image>`:this.farcaster?r._`<wui-icon
464
+ class="farcaster"
465
+ size="inherit"
466
+ color="inherit"
467
+ name="farcaster"
468
+ ></wui-icon>`:r._`<wui-icon size="inherit" color="inherit" name="walletConnect"></wui-icon>`}};N.styles=[r.s,He],M([i.c()],N.prototype,`uri`,void 0),M([i.c({type:Number})],N.prototype,`size`,void 0),M([i.c()],N.prototype,`theme`,void 0),M([i.c()],N.prototype,`imageSrc`,void 0),M([i.c()],N.prototype,`alt`,void 0),M([i.c({type:Boolean})],N.prototype,`arenaClear`,void 0),M([i.c({type:Boolean})],N.prototype,`farcaster`,void 0),N=M([r.r(`wui-qr-code`)],N);var Ue=r.u`
469
+ wui-shimmer {
470
+ width: 100%;
471
+ aspect-ratio: 1 / 1;
472
+ border-radius: ${({borderRadius:e})=>e[4]};
473
+ }
474
+
475
+ wui-qr-code {
476
+ opacity: 0;
477
+ animation-duration: ${({durations:e})=>e.xl};
478
+ animation-timing-function: ${({easings:e})=>e[`ease-out-power-2`]};
479
+ animation-name: fade-in;
480
+ animation-fill-mode: forwards;
481
+ }
482
+
483
+ @keyframes fade-in {
484
+ from {
485
+ opacity: 0;
486
+ }
487
+ to {
488
+ opacity: 1;
489
+ }
490
+ }
491
+ `,We=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},P=class extends E{constructor(){super(),this.basic=!1}firstUpdated(){this.basic||n.v.sendEvent({type:`track`,event:`SELECT_WALLET`,properties:{name:this.wallet?.name??`WalletConnect`,platform:`qrcode`,displayIndex:this.wallet?.display_index,walletRank:this.wallet?.order,view:n.y.state.view}})}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribe?.forEach(e=>e())}render(){return this.onRenderProxy(),r._`
492
+ <wui-flex
493
+ flexDirection="column"
494
+ alignItems="center"
495
+ .padding=${[`0`,`5`,`5`,`5`]}
496
+ gap="5"
497
+ >
498
+ <wui-shimmer width="100%"> ${this.qrCodeTemplate()} </wui-shimmer>
499
+ <wui-text variant="lg-medium" color="primary"> Scan this QR Code with your phone </wui-text>
500
+ ${this.copyTemplate()}
501
+ </wui-flex>
502
+ <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links>
503
+ `}onRenderProxy(){!this.ready&&this.uri&&(this.ready=!0)}qrCodeTemplate(){if(!this.uri||!this.ready)return null;let e=this.wallet?this.wallet.name:void 0;n.c.setWcLinking(void 0),n.c.setRecentWallet(this.wallet);let t=n.h.state.themeVariables[`--apkt-qr-color`]??n.h.state.themeVariables[`--w3m-qr-color`];return r._` <wui-qr-code
504
+ theme=${n.h.state.themeMode}
505
+ uri=${this.uri}
506
+ imageSrc=${i.o(n.T.getWalletImage(this.wallet))}
507
+ color=${i.o(t)}
508
+ alt=${i.o(e)}
509
+ data-testid="wui-qr-code"
510
+ ></wui-qr-code>`}copyTemplate(){return r._`<wui-button
511
+ .disabled=${!this.uri||!this.ready}
512
+ @click=${this.onCopyUri}
513
+ variant="neutral-secondary"
514
+ size="sm"
515
+ data-testid="copy-wc2-uri"
516
+ >
517
+ Copy link
518
+ <wui-icon size="sm" color="inherit" name="copy" slot="iconRight"></wui-icon>
519
+ </wui-button>`}};P.styles=Ue,We([i.c({type:Boolean})],P.prototype,`basic`,void 0),P=We([r.r(`w3m-connecting-wc-qrcode`)],P);var Ge=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Ke=class extends r.p{constructor(){if(super(),this.wallet=n.y.state.data?.wallet,!this.wallet)throw Error(`w3m-connecting-wc-unsupported: No wallet provided`);n.v.sendEvent({type:`track`,event:`SELECT_WALLET`,properties:{name:this.wallet.name,platform:`browser`,displayIndex:this.wallet?.display_index,walletRank:this.wallet?.order,view:n.y.state.view}})}render(){return r._`
520
+ <wui-flex
521
+ flexDirection="column"
522
+ alignItems="center"
523
+ .padding=${[`10`,`5`,`5`,`5`]}
524
+ gap="5"
525
+ >
526
+ <wui-wallet-image
527
+ size="lg"
528
+ imageSrc=${i.o(n.T.getWalletImage(this.wallet))}
529
+ ></wui-wallet-image>
530
+
531
+ <wui-text variant="md-regular" color="primary">Not Detected</wui-text>
532
+ </wui-flex>
533
+
534
+ <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links>
535
+ `}};Ke=Ge([r.r(`w3m-connecting-wc-unsupported`)],Ke);var qe=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Je=class extends E{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=n.N.CONNECT_LABELS.MOBILE,this.secondaryBtnIcon=`externalLink`,this.updateLoadingState(),this.unsubscribe.push(n.c.subscribeKey(`wcUri`,()=>{this.updateLoadingState()})),n.v.sendEvent({type:`track`,event:`SELECT_WALLET`,properties:{name:this.wallet.name,platform:`web`,displayIndex:this.wallet?.display_index,walletRank:this.wallet?.order,view:n.y.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:r,href:i}=n.j.formatUniversalUrl(e,this.uri);n.c.setWcLinking({name:t,href:i}),n.c.setRecentWallet(this.wallet),n.j.openHref(r,`_blank`)}catch{this.error=!0}}};qe([i.s()],Je.prototype,`isLoading`,void 0),Je=qe([r.r(`w3m-connecting-wc-web`)],Je);var Ye=r.u`
536
+ :host([data-mobile-fullscreen='true']) {
537
+ height: 100%;
538
+ display: flex;
539
+ flex-direction: column;
540
+ }
541
+
542
+ :host([data-mobile-fullscreen='true']) wui-ux-by-reown {
543
+ margin-top: auto;
544
+ }
545
+ `,F=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},I=class extends r.p{constructor(){super(),this.wallet=n.y.state.data?.wallet,this.unsubscribe=[],this.platform=void 0,this.platforms=[],this.isSiwxEnabled=!!n.k.state.siwx,this.remoteFeatures=n.k.state.remoteFeatures,this.displayBranding=!0,this.basic=!1,this.determinePlatforms(),this.initializeConnection(),this.unsubscribe.push(n.k.subscribeKey(`remoteFeatures`,e=>this.remoteFeatures=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return n.k.state.enableMobileFullScreen&&this.setAttribute(`data-mobile-fullscreen`,`true`),r._`
546
+ ${this.headerTemplate()}
547
+ <div class="platform-container">${this.platformTemplate()}</div>
548
+ ${this.reownBrandingTemplate()}
549
+ `}reownBrandingTemplate(){return!this.remoteFeatures?.reownBranding||!this.displayBranding?null:r._`<wui-ux-by-reown></wui-ux-by-reown>`}async initializeConnection(e=!1){if(!(this.platform===`browser`||n.k.state.manualWCControl&&!e))try{let{wcPairingExpiry:t,status:r}=n.c.state,{redirectView:i}=n.y.state.data??{};if(e||n.k.state.enableEmbedded||n.j.isPairingExpired(t)||r===`connecting`){let e=n.c.getConnections(n.n.state.activeChain),t=this.remoteFeatures?.multiWallet,r=e.length>0;await n.c.connectWalletConnect({cache:`never`}),this.isSiwxEnabled||(r&&t?(n.y.replace(`ProfileWallets`),n.C.showSuccess(`New Wallet Added`)):i?n.y.replace(i):n.g.close())}}catch(e){if(e instanceof Error&&e.message.includes(`An error occurred when attempting to switch chain`)&&!n.k.state.enableNetworkSwitch&&n.n.state.activeChain){n.n.setActiveCaipNetwork(a.t.getUnsupportedNetwork(`${n.n.state.activeChain}:${n.n.state.activeCaipNetwork?.id}`)),n.n.showUnsupportedChainUI();return}e instanceof n.D&&e.originalName===n.H.PROVIDER_RPC_ERROR_NAME.USER_REJECTED_REQUEST?n.v.sendEvent({type:`track`,event:`USER_REJECTED`,properties:{message:e.message}}):n.v.sendEvent({type:`track`,event:`CONNECT_ERROR`,properties:{message:e?.message??`Unknown`}}),n.c.setWcError(!0),n.C.showError(e.message??`Connection error`),n.c.resetWcConnection(),n.y.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:r,injected:i,rdns:a}=this.wallet,o=i?.map(({injected_id:e})=>e).filter(Boolean),s=[...a?[a]:o??[]],c=n.k.state.isUniversalProvider?!1:s.length,l=e,u=r,d=n.c.checkInstalled(s),f=c&&d,p=t&&!n.j.isMobile();f&&!n.n.state.noAdapters&&this.platforms.push(`browser`),l&&this.platforms.push(n.j.isMobile()?`mobile`:`qrcode`),u&&this.platforms.push(`web`),p&&this.platforms.push(`desktop`),!f&&c&&!n.n.state.noAdapters&&this.platforms.push(`unsupported`),this.platform=this.platforms[0]}platformTemplate(){switch(this.platform){case`browser`:return r._`<w3m-connecting-wc-browser></w3m-connecting-wc-browser>`;case`web`:return r._`<w3m-connecting-wc-web></w3m-connecting-wc-web>`;case`desktop`:return r._`
550
+ <w3m-connecting-wc-desktop .onRetry=${()=>this.initializeConnection(!0)}>
551
+ </w3m-connecting-wc-desktop>
552
+ `;case`mobile`:return r._`
553
+ <w3m-connecting-wc-mobile isMobile .onRetry=${()=>this.initializeConnection(!0)}>
554
+ </w3m-connecting-wc-mobile>
555
+ `;case`qrcode`:return r._`<w3m-connecting-wc-qrcode ?basic=${this.basic}></w3m-connecting-wc-qrcode>`;default:return r._`<w3m-connecting-wc-unsupported></w3m-connecting-wc-unsupported>`}}headerTemplate(){return this.platforms.length>1?r._`
556
+ <w3m-connecting-header
557
+ .platforms=${this.platforms}
558
+ .onSelectPlatfrom=${this.onSelectPlatform.bind(this)}
559
+ >
560
+ </w3m-connecting-header>
561
+ `: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`}))}};I.styles=Ye,F([i.s()],I.prototype,`platform`,void 0),F([i.s()],I.prototype,`platforms`,void 0),F([i.s()],I.prototype,`isSiwxEnabled`,void 0),F([i.s()],I.prototype,`remoteFeatures`,void 0),F([i.c({type:Boolean})],I.prototype,`displayBranding`,void 0),F([i.c({type:Boolean})],I.prototype,`basic`,void 0),I=F([r.r(`w3m-connecting-wc-view`)],I);var Xe=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Ze=class extends r.p{constructor(){super(),this.unsubscribe=[],this.isMobile=n.j.isMobile(),this.remoteFeatures=n.k.state.remoteFeatures,this.unsubscribe.push(n.k.subscribeKey(`remoteFeatures`,e=>this.remoteFeatures=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){if(this.isMobile){let{featured:e,recommended:t}=n.t.state,{customWallets:i}=n.k.state,a=n.M.getRecentWallets();return r._`<wui-flex flexDirection="column" gap="2" .margin=${[`1`,`3`,`3`,`3`]}>
562
+ ${e.length||t.length||i?.length||a.length?r._`<w3m-connector-list></w3m-connector-list>`:null}
563
+ <w3m-all-wallets-widget></w3m-all-wallets-widget>
564
+ </wui-flex>`}return r._`<wui-flex flexDirection="column" .padding=${[`0`,`0`,`4`,`0`]}>
565
+ <w3m-connecting-wc-view ?basic=${!0} .displayBranding=${!1}></w3m-connecting-wc-view>
566
+ <wui-flex flexDirection="column" .padding=${[`0`,`3`,`0`,`3`]}>
567
+ <w3m-all-wallets-widget></w3m-all-wallets-widget>
568
+ </wui-flex>
569
+ </wui-flex>
570
+ ${this.reownBrandingTemplate()} `}reownBrandingTemplate(){return this.remoteFeatures?.reownBranding?r._` <wui-flex flexDirection="column" .padding=${[`1`,`0`,`1`,`0`]}>
571
+ <wui-ux-by-reown></wui-ux-by-reown>
572
+ </wui-flex>`:null}};Xe([i.s()],Ze.prototype,`isMobile`,void 0),Xe([i.s()],Ze.prototype,`remoteFeatures`,void 0),Ze=Xe([r.r(`w3m-connecting-wc-basic-view`)],Ze);var{I:Qe}=r.v,$e=e=>e,et=e=>e===null||typeof e!=`object`&&typeof e!=`function`,tt={HTML:1,SVG:2,MATHML:3},nt=(e,t)=>t===void 0?e?._$litType$!==void 0:e?._$litType$===t,rt=e=>e?._$litType$?.h!=null,it=e=>e?._$litDirective$!==void 0,at=e=>e?._$litDirective$,ot=e=>e.strings===void 0,st=()=>document.createComment(``),ct=(e,t,n)=>{let r=e._$AA.parentNode,i=t===void 0?e._$AB:t._$AA;if(n===void 0)n=new Qe(r.insertBefore(st(),i),r.insertBefore(st(),i),e,e.options);else{let t=n._$AB.nextSibling,a=n._$AM,o=a!==e;if(o){let t;n._$AQ?.(e),n._$AM=e,n._$AP!==void 0&&(t=e._$AU)!==a._$AU&&n._$AP(t)}if(t!==i||o){let e=n._$AA;for(;e!==t;){let t=$e(e).nextSibling;$e(r).insertBefore(e,i),e=t}}}return n},lt=(e,t,n=e)=>(e._$AI(t,n),e),ut={},dt=(e,t=ut)=>e._$AH=t,ft=e=>e._$AH,pt=e=>{e._$AR(),e._$AA.remove()},mt=e=>{e._$AR()},L=(e,t)=>{let n=e._$AN;if(n===void 0)return!1;for(let e of n)e._$AO?.(t,!1),L(e,t);return!0},R=e=>{let t,n;do{if((t=e._$AM)===void 0)break;n=t._$AN,n.delete(e),e=t}while(n?.size===0)},ht=e=>{for(let t;t=e._$AM;e=t){let n=t._$AN;if(n===void 0)t._$AN=n=new Set;else if(n.has(e))break;n.add(e),vt(t)}};function gt(e){this._$AN===void 0?this._$AM=e:(R(this),this._$AM=e,ht(this))}function _t(e,t=!1,n=0){let r=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(t)if(Array.isArray(r))for(let e=n;e<r.length;e++)L(r[e],!1),R(r[e]);else r!=null&&(L(r,!1),R(r));else L(this,e)}var vt=e=>{e.type==i.a.CHILD&&(e._$AP??=_t,e._$AQ??=gt)},yt=class extends i.i{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,n){super._$AT(e,t,n),ht(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(L(this,e),R(this))}setValue(e){if(ot(this._$Ct))this._$Ct._$AI(e,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}},bt=()=>new xt,xt=class{},St=new WeakMap,Ct=i.r(class extends yt{render(e){return r.m}update(e,[t]){let n=t!==this.G;return n&&this.G!==void 0&&this.rt(void 0),(n||this.lt!==this.ct)&&(this.G=t,this.ht=e.options?.host,this.rt(this.ct=e.element)),r.m}rt(e){if(this.isConnected||(e=void 0),typeof this.G==`function`){let t=this.ht??globalThis,n=St.get(t);n===void 0&&(n=new WeakMap,St.set(t,n)),n.get(this.G)!==void 0&&this.G.call(this.ht,void 0),n.set(this.G,e),e!==void 0&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){return typeof this.G==`function`?St.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),wt=r.u`
573
+ :host {
574
+ display: flex;
575
+ align-items: center;
576
+ justify-content: center;
577
+ }
578
+
579
+ label {
580
+ position: relative;
581
+ display: inline-block;
582
+ user-select: none;
583
+ transition:
584
+ background-color ${({durations:e})=>e.lg}
585
+ ${({easings:e})=>e[`ease-out-power-2`]},
586
+ color ${({durations:e})=>e.lg} ${({easings:e})=>e[`ease-out-power-2`]},
587
+ border ${({durations:e})=>e.lg} ${({easings:e})=>e[`ease-out-power-2`]},
588
+ box-shadow ${({durations:e})=>e.lg}
589
+ ${({easings:e})=>e[`ease-out-power-2`]},
590
+ width ${({durations:e})=>e.lg} ${({easings:e})=>e[`ease-out-power-2`]},
591
+ height ${({durations:e})=>e.lg} ${({easings:e})=>e[`ease-out-power-2`]},
592
+ transform ${({durations:e})=>e.lg}
593
+ ${({easings:e})=>e[`ease-out-power-2`]},
594
+ opacity ${({durations:e})=>e.lg} ${({easings:e})=>e[`ease-out-power-2`]};
595
+ will-change: background-color, color, border, box-shadow, width, height, transform, opacity;
596
+ }
597
+
598
+ input {
599
+ width: 0;
600
+ height: 0;
601
+ opacity: 0;
602
+ }
603
+
604
+ span {
605
+ position: absolute;
606
+ cursor: pointer;
607
+ top: 0;
608
+ left: 0;
609
+ right: 0;
610
+ bottom: 0;
611
+ background-color: ${({colors:e})=>e.neutrals300};
612
+ border-radius: ${({borderRadius:e})=>e.round};
613
+ border: 1px solid transparent;
614
+ will-change: border;
615
+ transition:
616
+ background-color ${({durations:e})=>e.lg}
617
+ ${({easings:e})=>e[`ease-out-power-2`]},
618
+ color ${({durations:e})=>e.lg} ${({easings:e})=>e[`ease-out-power-2`]},
619
+ border ${({durations:e})=>e.lg} ${({easings:e})=>e[`ease-out-power-2`]},
620
+ box-shadow ${({durations:e})=>e.lg}
621
+ ${({easings:e})=>e[`ease-out-power-2`]},
622
+ width ${({durations:e})=>e.lg} ${({easings:e})=>e[`ease-out-power-2`]},
623
+ height ${({durations:e})=>e.lg} ${({easings:e})=>e[`ease-out-power-2`]},
624
+ transform ${({durations:e})=>e.lg}
625
+ ${({easings:e})=>e[`ease-out-power-2`]},
626
+ opacity ${({durations:e})=>e.lg} ${({easings:e})=>e[`ease-out-power-2`]};
627
+ will-change: background-color, color, border, box-shadow, width, height, transform, opacity;
628
+ }
629
+
630
+ span:before {
631
+ content: '';
632
+ position: absolute;
633
+ background-color: ${({colors:e})=>e.white};
634
+ border-radius: 50%;
635
+ }
636
+
637
+ /* -- Sizes --------------------------------------------------------- */
638
+ label[data-size='lg'] {
639
+ width: 48px;
640
+ height: 32px;
641
+ }
642
+
643
+ label[data-size='md'] {
644
+ width: 40px;
645
+ height: 28px;
646
+ }
647
+
648
+ label[data-size='sm'] {
649
+ width: 32px;
650
+ height: 22px;
651
+ }
652
+
653
+ label[data-size='lg'] > span:before {
654
+ height: 24px;
655
+ width: 24px;
656
+ left: 4px;
657
+ top: 3px;
658
+ }
659
+
660
+ label[data-size='md'] > span:before {
661
+ height: 20px;
662
+ width: 20px;
663
+ left: 4px;
664
+ top: 3px;
665
+ }
666
+
667
+ label[data-size='sm'] > span:before {
668
+ height: 16px;
669
+ width: 16px;
670
+ left: 3px;
671
+ top: 2px;
672
+ }
673
+
674
+ /* -- Focus states --------------------------------------------------- */
675
+ input:focus-visible:not(:checked) + span,
676
+ input:focus:not(:checked) + span {
677
+ border: 1px solid ${({tokens:e})=>e.core.iconAccentPrimary};
678
+ background-color: ${({tokens:e})=>e.theme.textTertiary};
679
+ box-shadow: 0px 0px 0px 4px rgba(9, 136, 240, 0.2);
680
+ }
681
+
682
+ input:focus-visible:checked + span,
683
+ input:focus:checked + span {
684
+ border: 1px solid ${({tokens:e})=>e.core.iconAccentPrimary};
685
+ box-shadow: 0px 0px 0px 4px rgba(9, 136, 240, 0.2);
686
+ }
687
+
688
+ /* -- Checked states --------------------------------------------------- */
689
+ input:checked + span {
690
+ background-color: ${({tokens:e})=>e.core.iconAccentPrimary};
691
+ }
692
+
693
+ label[data-size='lg'] > input:checked + span:before {
694
+ transform: translateX(calc(100% - 9px));
695
+ }
696
+
697
+ label[data-size='md'] > input:checked + span:before {
698
+ transform: translateX(calc(100% - 9px));
699
+ }
700
+
701
+ label[data-size='sm'] > input:checked + span:before {
702
+ transform: translateX(calc(100% - 7px));
703
+ }
704
+
705
+ /* -- Hover states ------------------------------------------------------- */
706
+ label:hover > input:not(:checked):not(:disabled) + span {
707
+ background-color: ${({colors:e})=>e.neutrals400};
708
+ }
709
+
710
+ label:hover > input:checked:not(:disabled) + span {
711
+ background-color: ${({colors:e})=>e.accent080};
712
+ }
713
+
714
+ /* -- Disabled state --------------------------------------------------- */
715
+ label:has(input:disabled) {
716
+ pointer-events: none;
717
+ user-select: none;
718
+ }
719
+
720
+ input:not(:checked):disabled + span {
721
+ background-color: ${({colors:e})=>e.neutrals700};
722
+ }
723
+
724
+ input:checked:disabled + span {
725
+ background-color: ${({colors:e})=>e.neutrals700};
726
+ }
727
+
728
+ input:not(:checked):disabled + span::before {
729
+ background-color: ${({colors:e})=>e.neutrals400};
730
+ }
731
+
732
+ input:checked:disabled + span::before {
733
+ background-color: ${({tokens:e})=>e.theme.textTertiary};
734
+ }
735
+ `,z=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},B=class extends r.p{constructor(){super(...arguments),this.inputElementRef=bt(),this.checked=!1,this.disabled=!1,this.size=`md`}render(){return r._`
736
+ <label data-size=${this.size}>
737
+ <input
738
+ ${Ct(this.inputElementRef)}
739
+ type="checkbox"
740
+ ?checked=${this.checked}
741
+ ?disabled=${this.disabled}
742
+ @change=${this.dispatchChangeEvent.bind(this)}
743
+ />
744
+ <span></span>
745
+ </label>
746
+ `}dispatchChangeEvent(){this.dispatchEvent(new CustomEvent(`switchChange`,{detail:this.inputElementRef.value?.checked,bubbles:!0,composed:!0}))}};B.styles=[r.s,r.a,wt],z([i.c({type:Boolean})],B.prototype,`checked`,void 0),z([i.c({type:Boolean})],B.prototype,`disabled`,void 0),z([i.c()],B.prototype,`size`,void 0),B=z([r.r(`wui-toggle`)],B);var Tt=r.u`
747
+ :host {
748
+ height: auto;
749
+ }
750
+
751
+ :host > wui-flex {
752
+ height: 100%;
753
+ display: flex;
754
+ align-items: center;
755
+ justify-content: center;
756
+ column-gap: ${({spacing:e})=>e[2]};
757
+ padding: ${({spacing:e})=>e[2]} ${({spacing:e})=>e[3]};
758
+ background-color: ${({tokens:e})=>e.theme.foregroundPrimary};
759
+ border-radius: ${({borderRadius:e})=>e[4]};
760
+ box-shadow: inset 0 0 0 1px ${({tokens:e})=>e.theme.foregroundPrimary};
761
+ transition: background-color ${({durations:e})=>e.lg}
762
+ ${({easings:e})=>e[`ease-out-power-2`]};
763
+ will-change: background-color;
764
+ cursor: pointer;
765
+ }
766
+
767
+ wui-switch {
768
+ pointer-events: none;
769
+ }
770
+ `,Et=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},V=class extends r.p{constructor(){super(...arguments),this.checked=!1}render(){return r._`
771
+ <wui-flex>
772
+ <wui-icon size="xl" name="walletConnectBrown"></wui-icon>
773
+ <wui-toggle
774
+ ?checked=${this.checked}
775
+ size="sm"
776
+ @switchChange=${this.handleToggleChange.bind(this)}
777
+ ></wui-toggle>
778
+ </wui-flex>
779
+ `}handleToggleChange(e){e.stopPropagation(),this.checked=e.detail,this.dispatchSwitchEvent()}dispatchSwitchEvent(){this.dispatchEvent(new CustomEvent(`certifiedSwitchChange`,{detail:this.checked,bubbles:!0,composed:!0}))}};V.styles=[r.s,r.a,Tt],Et([i.c({type:Boolean})],V.prototype,`checked`,void 0),V=Et([r.r(`wui-certified-switch`)],V);var Dt=r.u`
780
+ :host {
781
+ position: relative;
782
+ width: 100%;
783
+ display: inline-flex;
784
+ flex-direction: column;
785
+ gap: ${({spacing:e})=>e[3]};
786
+ color: ${({tokens:e})=>e.theme.textPrimary};
787
+ caret-color: ${({tokens:e})=>e.core.textAccentPrimary};
788
+ }
789
+
790
+ .wui-input-text-container {
791
+ position: relative;
792
+ display: flex;
793
+ }
794
+
795
+ input {
796
+ width: 100%;
797
+ border-radius: ${({borderRadius:e})=>e[4]};
798
+ color: inherit;
799
+ background: transparent;
800
+ border: 1px solid ${({tokens:e})=>e.theme.borderPrimary};
801
+ caret-color: ${({tokens:e})=>e.core.textAccentPrimary};
802
+ padding: ${({spacing:e})=>e[3]} ${({spacing:e})=>e[3]}
803
+ ${({spacing:e})=>e[3]} ${({spacing:e})=>e[10]};
804
+ font-size: ${({textSize:e})=>e.large};
805
+ line-height: ${({typography:e})=>e[`lg-regular`].lineHeight};
806
+ letter-spacing: ${({typography:e})=>e[`lg-regular`].letterSpacing};
807
+ font-weight: ${({fontWeight:e})=>e.regular};
808
+ font-family: ${({fontFamily:e})=>e.regular};
809
+ }
810
+
811
+ input[data-size='lg'] {
812
+ padding: ${({spacing:e})=>e[4]} ${({spacing:e})=>e[3]}
813
+ ${({spacing:e})=>e[4]} ${({spacing:e})=>e[10]};
814
+ }
815
+
816
+ @media (hover: hover) and (pointer: fine) {
817
+ input:hover:enabled {
818
+ border: 1px solid ${({tokens:e})=>e.theme.borderSecondary};
819
+ }
820
+ }
821
+
822
+ input:disabled {
823
+ cursor: unset;
824
+ border: 1px solid ${({tokens:e})=>e.theme.borderPrimary};
825
+ }
826
+
827
+ input::placeholder {
828
+ color: ${({tokens:e})=>e.theme.textSecondary};
829
+ }
830
+
831
+ input:focus:enabled {
832
+ border: 1px solid ${({tokens:e})=>e.theme.borderSecondary};
833
+ background-color: ${({tokens:e})=>e.theme.foregroundPrimary};
834
+ -webkit-box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent040};
835
+ -moz-box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent040};
836
+ box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent040};
837
+ }
838
+
839
+ div.wui-input-text-container:has(input:disabled) {
840
+ opacity: 0.5;
841
+ }
842
+
843
+ wui-icon.wui-input-text-left-icon {
844
+ position: absolute;
845
+ top: 50%;
846
+ transform: translateY(-50%);
847
+ pointer-events: none;
848
+ left: ${({spacing:e})=>e[4]};
849
+ color: ${({tokens:e})=>e.theme.iconDefault};
850
+ }
851
+
852
+ button.wui-input-text-submit-button {
853
+ position: absolute;
854
+ top: 50%;
855
+ transform: translateY(-50%);
856
+ right: ${({spacing:e})=>e[3]};
857
+ width: 24px;
858
+ height: 24px;
859
+ border: none;
860
+ background: transparent;
861
+ border-radius: ${({borderRadius:e})=>e[2]};
862
+ color: ${({tokens:e})=>e.core.textAccentPrimary};
863
+ }
864
+
865
+ button.wui-input-text-submit-button:disabled {
866
+ opacity: 1;
867
+ }
868
+
869
+ button.wui-input-text-submit-button.loading wui-icon {
870
+ animation: spin 1s linear infinite;
871
+ }
872
+
873
+ button.wui-input-text-submit-button:hover {
874
+ background: ${({tokens:e})=>e.core.foregroundAccent010};
875
+ }
876
+
877
+ input:has(+ .wui-input-text-submit-button) {
878
+ padding-right: ${({spacing:e})=>e[12]};
879
+ }
880
+
881
+ input[type='number'] {
882
+ -moz-appearance: textfield;
883
+ }
884
+
885
+ input[type='search']::-webkit-search-decoration,
886
+ input[type='search']::-webkit-search-cancel-button,
887
+ input[type='search']::-webkit-search-results-button,
888
+ input[type='search']::-webkit-search-results-decoration {
889
+ -webkit-appearance: none;
890
+ }
891
+
892
+ /* -- Keyframes --------------------------------------------------- */
893
+ @keyframes spin {
894
+ from {
895
+ transform: rotate(0deg);
896
+ }
897
+ to {
898
+ transform: rotate(360deg);
899
+ }
900
+ }
901
+ `,H=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},U=class extends r.p{constructor(){super(...arguments),this.inputElementRef=bt(),this.disabled=!1,this.loading=!1,this.placeholder=``,this.type=`text`,this.value=``,this.size=`md`}render(){return r._` <div class="wui-input-text-container">
902
+ ${this.templateLeftIcon()}
903
+ <input
904
+ data-size=${this.size}
905
+ ${Ct(this.inputElementRef)}
906
+ data-testid="wui-input-text"
907
+ type=${this.type}
908
+ enterkeyhint=${i.o(this.enterKeyHint)}
909
+ ?disabled=${this.disabled}
910
+ placeholder=${this.placeholder}
911
+ @input=${this.dispatchInputChangeEvent.bind(this)}
912
+ @keydown=${this.onKeyDown}
913
+ .value=${this.value||``}
914
+ />
915
+ ${this.templateSubmitButton()}
916
+ <slot class="wui-input-text-slot"></slot>
917
+ </div>
918
+ ${this.templateError()} ${this.templateWarning()}`}templateLeftIcon(){return this.icon?r._`<wui-icon
919
+ class="wui-input-text-left-icon"
920
+ size="md"
921
+ data-size=${this.size}
922
+ color="inherit"
923
+ name=${this.icon}
924
+ ></wui-icon>`:null}templateSubmitButton(){return this.onSubmit?r._`<button
925
+ class="wui-input-text-submit-button ${this.loading?`loading`:``}"
926
+ @click=${this.onSubmit?.bind(this)}
927
+ ?disabled=${this.disabled||this.loading}
928
+ >
929
+ ${this.loading?r._`<wui-icon name="spinner" size="md"></wui-icon>`:r._`<wui-icon name="chevronRight" size="md"></wui-icon>`}
930
+ </button>`:null}templateError(){return this.errorText?r._`<wui-text variant="sm-regular" color="error">${this.errorText}</wui-text>`:null}templateWarning(){return this.warningText?r._`<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}))}};U.styles=[r.s,r.a,Dt],H([i.c()],U.prototype,`icon`,void 0),H([i.c({type:Boolean})],U.prototype,`disabled`,void 0),H([i.c({type:Boolean})],U.prototype,`loading`,void 0),H([i.c()],U.prototype,`placeholder`,void 0),H([i.c()],U.prototype,`type`,void 0),H([i.c()],U.prototype,`value`,void 0),H([i.c()],U.prototype,`errorText`,void 0),H([i.c()],U.prototype,`warningText`,void 0),H([i.c()],U.prototype,`onSubmit`,void 0),H([i.c()],U.prototype,`size`,void 0),H([i.c({attribute:!1})],U.prototype,`onKeyDown`,void 0),U=H([r.r(`wui-input-text`)],U);var Ot=r.u`
931
+ :host {
932
+ position: relative;
933
+ display: inline-block;
934
+ width: 100%;
935
+ }
936
+
937
+ wui-icon {
938
+ position: absolute;
939
+ top: 50%;
940
+ transform: translateY(-50%);
941
+ right: ${({spacing:e})=>e[3]};
942
+ color: ${({tokens:e})=>e.theme.iconDefault};
943
+ cursor: pointer;
944
+ padding: ${({spacing:e})=>e[2]};
945
+ background-color: transparent;
946
+ border-radius: ${({borderRadius:e})=>e[4]};
947
+ transition: background-color ${({durations:e})=>e.lg}
948
+ ${({easings:e})=>e[`ease-out-power-2`]};
949
+ }
950
+
951
+ @media (hover: hover) {
952
+ wui-icon:hover {
953
+ background-color: ${({tokens:e})=>e.theme.foregroundSecondary};
954
+ }
955
+ }
956
+ `,kt=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},W=class extends r.p{constructor(){super(...arguments),this.inputComponentRef=bt(),this.inputValue=``}render(){return r._`
957
+ <wui-input-text
958
+ ${Ct(this.inputComponentRef)}
959
+ placeholder="Search wallet"
960
+ icon="search"
961
+ type="search"
962
+ enterKeyHint="search"
963
+ size="sm"
964
+ @inputChange=${this.onInputChange}
965
+ >
966
+ ${this.inputValue?r._`<wui-icon
967
+ @click=${this.clearValue}
968
+ color="inherit"
969
+ size="sm"
970
+ name="close"
971
+ ></wui-icon>`:null}
972
+ </wui-input-text>
973
+ `}onInputChange(e){this.inputValue=e.detail||``}clearValue(){let e=this.inputComponentRef.value?.inputElementRef.value;e&&(e.value=``,this.inputValue=``,e.focus(),e.dispatchEvent(new Event(`input`)))}};W.styles=[r.s,Ot],kt([i.c()],W.prototype,`inputValue`,void 0),W=kt([r.r(`wui-search-bar`)],W);var At=r.u`
974
+ :host {
975
+ display: flex;
976
+ flex-direction: column;
977
+ justify-content: center;
978
+ align-items: center;
979
+ height: 104px;
980
+ width: 104px;
981
+ row-gap: ${({spacing:e})=>e[2]};
982
+ background-color: ${({tokens:e})=>e.theme.foregroundPrimary};
983
+ border-radius: ${({borderRadius:e})=>e[5]};
984
+ position: relative;
985
+ }
986
+
987
+ wui-shimmer[data-type='network'] {
988
+ border: none;
989
+ -webkit-clip-path: var(--apkt-path-network);
990
+ clip-path: var(--apkt-path-network);
991
+ }
992
+
993
+ svg {
994
+ position: absolute;
995
+ width: 48px;
996
+ height: 54px;
997
+ z-index: 1;
998
+ }
999
+
1000
+ svg > path {
1001
+ stroke: ${({tokens:e})=>e.theme.foregroundSecondary};
1002
+ stroke-width: 1px;
1003
+ }
1004
+
1005
+ @media (max-width: 350px) {
1006
+ :host {
1007
+ width: 100%;
1008
+ }
1009
+ }
1010
+ `,jt=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},G=class extends r.p{constructor(){super(...arguments),this.type=`wallet`}render(){return r._`
1011
+ ${this.shimmerTemplate()}
1012
+ <wui-shimmer width="80px" height="20px"></wui-shimmer>
1013
+ `}shimmerTemplate(){return this.type===`network`?r._` <wui-shimmer data-type=${this.type} width="48px" height="54px"></wui-shimmer>
1014
+ ${i.t}`:r._`<wui-shimmer width="56px" height="56px"></wui-shimmer>`}};G.styles=[r.s,r.a,At],jt([i.c()],G.prototype,`type`,void 0),G=jt([r.r(`wui-card-select-loader`)],G);var Mt=r.S`
1015
+ :host {
1016
+ display: grid;
1017
+ width: inherit;
1018
+ height: inherit;
1019
+ }
1020
+ `,K=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},q=class extends r.p{render(){return this.style.cssText=`
1021
+ grid-template-rows: ${this.gridTemplateRows};
1022
+ grid-template-columns: ${this.gridTemplateColumns};
1023
+ justify-items: ${this.justifyItems};
1024
+ align-items: ${this.alignItems};
1025
+ justify-content: ${this.justifyContent};
1026
+ align-content: ${this.alignContent};
1027
+ column-gap: ${this.columnGap&&`var(--apkt-spacing-${this.columnGap})`};
1028
+ row-gap: ${this.rowGap&&`var(--apkt-spacing-${this.rowGap})`};
1029
+ gap: ${this.gap&&`var(--apkt-spacing-${this.gap})`};
1030
+ padding-top: ${this.padding&&r.i.getSpacingStyles(this.padding,0)};
1031
+ padding-right: ${this.padding&&r.i.getSpacingStyles(this.padding,1)};
1032
+ padding-bottom: ${this.padding&&r.i.getSpacingStyles(this.padding,2)};
1033
+ padding-left: ${this.padding&&r.i.getSpacingStyles(this.padding,3)};
1034
+ margin-top: ${this.margin&&r.i.getSpacingStyles(this.margin,0)};
1035
+ margin-right: ${this.margin&&r.i.getSpacingStyles(this.margin,1)};
1036
+ margin-bottom: ${this.margin&&r.i.getSpacingStyles(this.margin,2)};
1037
+ margin-left: ${this.margin&&r.i.getSpacingStyles(this.margin,3)};
1038
+ `,r._`<slot></slot>`}};q.styles=[r.s,Mt],K([i.c()],q.prototype,`gridTemplateRows`,void 0),K([i.c()],q.prototype,`gridTemplateColumns`,void 0),K([i.c()],q.prototype,`justifyItems`,void 0),K([i.c()],q.prototype,`alignItems`,void 0),K([i.c()],q.prototype,`justifyContent`,void 0),K([i.c()],q.prototype,`alignContent`,void 0),K([i.c()],q.prototype,`columnGap`,void 0),K([i.c()],q.prototype,`rowGap`,void 0),K([i.c()],q.prototype,`gap`,void 0),K([i.c()],q.prototype,`padding`,void 0),K([i.c()],q.prototype,`margin`,void 0),q=K([r.r(`wui-grid`)],q);var Nt=r.u`
1039
+ button {
1040
+ display: flex;
1041
+ flex-direction: column;
1042
+ justify-content: center;
1043
+ align-items: center;
1044
+ cursor: pointer;
1045
+ width: 104px;
1046
+ row-gap: ${({spacing:e})=>e[2]};
1047
+ padding: ${({spacing:e})=>e[3]} ${({spacing:e})=>e[0]};
1048
+ background-color: ${({tokens:e})=>e.theme.foregroundPrimary};
1049
+ border-radius: clamp(0px, ${({borderRadius:e})=>e[4]}, 20px);
1050
+ transition:
1051
+ color ${({durations:e})=>e.lg} ${({easings:e})=>e[`ease-out-power-1`]},
1052
+ background-color ${({durations:e})=>e.lg}
1053
+ ${({easings:e})=>e[`ease-out-power-1`]},
1054
+ border-radius ${({durations:e})=>e.lg}
1055
+ ${({easings:e})=>e[`ease-out-power-1`]};
1056
+ will-change: background-color, color, border-radius;
1057
+ outline: none;
1058
+ border: none;
1059
+ }
1060
+
1061
+ button > wui-flex > wui-text {
1062
+ color: ${({tokens:e})=>e.theme.textPrimary};
1063
+ max-width: 86px;
1064
+ white-space: nowrap;
1065
+ overflow: hidden;
1066
+ text-overflow: ellipsis;
1067
+ justify-content: center;
1068
+ }
1069
+
1070
+ button > wui-flex > wui-text.certified {
1071
+ max-width: 66px;
1072
+ }
1073
+
1074
+ @media (hover: hover) and (pointer: fine) {
1075
+ button:hover:enabled {
1076
+ background-color: ${({tokens:e})=>e.theme.foregroundSecondary};
1077
+ }
1078
+ }
1079
+
1080
+ button:disabled > wui-flex > wui-text {
1081
+ color: ${({tokens:e})=>e.core.glass010};
1082
+ }
1083
+
1084
+ [data-selected='true'] {
1085
+ background-color: ${({colors:e})=>e.accent020};
1086
+ }
1087
+
1088
+ @media (hover: hover) and (pointer: fine) {
1089
+ [data-selected='true']:hover:enabled {
1090
+ background-color: ${({colors:e})=>e.accent010};
1091
+ }
1092
+ }
1093
+
1094
+ [data-selected='true']:active:enabled {
1095
+ background-color: ${({colors:e})=>e.accent010};
1096
+ }
1097
+
1098
+ @media (max-width: 350px) {
1099
+ button {
1100
+ width: 100%;
1101
+ }
1102
+ }
1103
+ `,J=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Y=class extends r.p{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=>{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 r._`
1104
+ <button>
1105
+ ${this.imageTemplate()}
1106
+ <wui-flex flexDirection="row" alignItems="center" justifyContent="center" gap="1">
1107
+ <wui-text
1108
+ variant="md-regular"
1109
+ color="inherit"
1110
+ class=${i.o(e?`certified`:void 0)}
1111
+ >${this.wallet?.name}</wui-text
1112
+ >
1113
+ ${e?r._`<wui-icon size="sm" name="walletConnectBrown"></wui-icon>`:null}
1114
+ </wui-flex>
1115
+ </button>
1116
+ `}imageTemplate(){return!this.visible&&!this.imageSrc||this.imageLoading?this.shimmerTemplate():r._`
1117
+ <wui-wallet-image
1118
+ size="lg"
1119
+ imageSrc=${i.o(this.imageSrc)}
1120
+ name=${i.o(this.wallet?.name)}
1121
+ .installed=${this.wallet?.installed??!1}
1122
+ badgeSize="sm"
1123
+ >
1124
+ </wui-wallet-image>
1125
+ `}shimmerTemplate(){return r._`<wui-shimmer width="56px" height="56px"></wui-shimmer>`}async fetchImageSrc(){this.wallet&&(this.imageSrc=n.T.getWalletImage(this.wallet),!this.imageSrc&&(this.imageLoading=!0,this.imageSrc=await n.T.fetchWalletImage(this.wallet.image_id),this.imageLoading=!1))}sendImpressionEvent(){!this.wallet||this.isImpressed||(this.isImpressed=!0,n.v.sendWalletImpressionEvent({name:this.wallet.name,walletRank:this.wallet.order,explorerId:this.explorerId,view:n.y.state.view,query:this.walletQuery,certified:this.certified,displayIndex:this.displayIndex}))}};Y.styles=Nt,J([i.s()],Y.prototype,`visible`,void 0),J([i.s()],Y.prototype,`imageSrc`,void 0),J([i.s()],Y.prototype,`imageLoading`,void 0),J([i.s()],Y.prototype,`isImpressed`,void 0),J([i.c()],Y.prototype,`explorerId`,void 0),J([i.c()],Y.prototype,`walletQuery`,void 0),J([i.c()],Y.prototype,`certified`,void 0),J([i.c()],Y.prototype,`displayIndex`,void 0),J([i.c({type:Object})],Y.prototype,`wallet`,void 0),Y=J([r.r(`w3m-all-wallets-list-item`)],Y);var Pt=r.u`
1126
+ wui-grid {
1127
+ max-height: clamp(360px, 400px, 80vh);
1128
+ overflow: scroll;
1129
+ scrollbar-width: none;
1130
+ grid-auto-rows: min-content;
1131
+ grid-template-columns: repeat(auto-fill, 104px);
1132
+ }
1133
+
1134
+ :host([data-mobile-fullscreen='true']) wui-grid {
1135
+ max-height: none;
1136
+ }
1137
+
1138
+ @media (max-width: 350px) {
1139
+ wui-grid {
1140
+ grid-template-columns: repeat(2, 1fr);
1141
+ }
1142
+ }
1143
+
1144
+ wui-grid[data-scroll='false'] {
1145
+ overflow: hidden;
1146
+ }
1147
+
1148
+ wui-grid::-webkit-scrollbar {
1149
+ display: none;
1150
+ }
1151
+
1152
+ w3m-all-wallets-list-item {
1153
+ opacity: 0;
1154
+ animation-duration: ${({durations:e})=>e.xl};
1155
+ animation-timing-function: ${({easings:e})=>e[`ease-inout-power-2`]};
1156
+ animation-name: fade-in;
1157
+ animation-fill-mode: forwards;
1158
+ }
1159
+
1160
+ @keyframes fade-in {
1161
+ from {
1162
+ opacity: 0;
1163
+ }
1164
+ to {
1165
+ opacity: 1;
1166
+ }
1167
+ }
1168
+
1169
+ wui-loading-spinner {
1170
+ padding-top: ${({spacing:e})=>e[4]};
1171
+ padding-bottom: ${({spacing:e})=>e[4]};
1172
+ justify-content: center;
1173
+ grid-column: 1 / span 4;
1174
+ }
1175
+ `,X=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Ft=`local-paginator`,Z=class extends r.p{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.loading=!n.t.state.wallets.length,this.wallets=n.t.state.wallets,this.mobileFullScreen=n.k.state.enableMobileFullScreen,this.unsubscribe.push(n.t.subscribeKey(`wallets`,e=>this.wallets=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`),r._`
1176
+ <wui-grid
1177
+ data-scroll=${!this.loading}
1178
+ .padding=${[`0`,`3`,`3`,`3`]}
1179
+ gap="2"
1180
+ justifyContent="space-between"
1181
+ >
1182
+ ${this.loading?this.shimmerTemplate(16):this.walletsTemplate()}
1183
+ ${this.paginationLoaderTemplate()}
1184
+ </wui-grid>
1185
+ `}async initialFetch(){this.loading=!0;let e=this.shadowRoot?.querySelector(`wui-grid`);e&&(await n.t.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(()=>r._`
1186
+ <wui-card-select-loader type="wallet" id=${i.o(t)}></wui-card-select-loader>
1187
+ `)}walletsTemplate(){return n.x.getWalletConnectWallets(this.wallets).map((e,t)=>r._`
1188
+ <w3m-all-wallets-list-item
1189
+ data-testid="wallet-search-item-${e.id}"
1190
+ @click=${()=>this.onConnectWallet(e)}
1191
+ .wallet=${e}
1192
+ explorerId=${e.id}
1193
+ certified=${this.badge===`certified`}
1194
+ displayIndex=${t}
1195
+ ></w3m-all-wallets-list-item>
1196
+ `)}paginationLoaderTemplate(){let{wallets:e,recommended:t,featured:r,count:i,mobileFilteredOutWalletsLength:a}=n.t.state,o=window.innerWidth<352?3:4,s=e.length+t.length,c=Math.ceil(s/o)*o-s+o;return c-=e.length?r.length%o:0,i===0&&r.length>0?null:i===0||[...r,...e,...t].length<i-(a??0)?this.shimmerTemplate(c,Ft):null}createPaginationObserver(){let e=this.shadowRoot?.querySelector(`#${Ft}`);e&&(this.paginationObserver=new IntersectionObserver(([e])=>{if(e?.isIntersecting&&!this.loading){let{page:e,count:t,wallets:r}=n.t.state;r.length<t&&n.t.fetchWalletsByPage({page:e+1})}}),this.paginationObserver.observe(e))}onConnectWallet(e){n.m.selectWalletConnector(e)}};Z.styles=Pt,X([i.s()],Z.prototype,`loading`,void 0),X([i.s()],Z.prototype,`wallets`,void 0),X([i.s()],Z.prototype,`badge`,void 0),X([i.s()],Z.prototype,`mobileFullScreen`,void 0),Z=X([r.r(`w3m-all-wallets-list`)],Z);var It=r.S`
1197
+ wui-grid,
1198
+ wui-loading-spinner,
1199
+ wui-flex {
1200
+ height: 360px;
1201
+ }
1202
+
1203
+ wui-grid {
1204
+ overflow: scroll;
1205
+ scrollbar-width: none;
1206
+ grid-auto-rows: min-content;
1207
+ grid-template-columns: repeat(auto-fill, 104px);
1208
+ }
1209
+
1210
+ :host([data-mobile-fullscreen='true']) wui-grid {
1211
+ max-height: none;
1212
+ height: auto;
1213
+ }
1214
+
1215
+ wui-grid[data-scroll='false'] {
1216
+ overflow: hidden;
1217
+ }
1218
+
1219
+ wui-grid::-webkit-scrollbar {
1220
+ display: none;
1221
+ }
1222
+
1223
+ wui-loading-spinner {
1224
+ justify-content: center;
1225
+ align-items: center;
1226
+ }
1227
+
1228
+ @media (max-width: 350px) {
1229
+ wui-grid {
1230
+ grid-template-columns: repeat(2, 1fr);
1231
+ }
1232
+ }
1233
+ `,Q=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},$=class extends r.p{constructor(){super(...arguments),this.prevQuery=``,this.prevBadge=void 0,this.loading=!0,this.mobileFullScreen=n.k.state.enableMobileFullScreen,this.query=``}render(){return this.mobileFullScreen&&this.setAttribute(`data-mobile-fullscreen`,`true`),this.onSearch(),this.loading?r._`<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 n.t.searchWallet({search:this.query,badge:this.badge}),this.loading=!1)}walletsTemplate(){let{search:e}=n.t.state,t=n.x.markWalletsAsInstalled(e),i=n.x.filterWalletsByWcSupport(t);return i.length?r._`
1234
+ <wui-grid
1235
+ data-testid="wallet-list"
1236
+ .padding=${[`0`,`3`,`3`,`3`]}
1237
+ rowGap="4"
1238
+ columngap="2"
1239
+ justifyContent="space-between"
1240
+ >
1241
+ ${i.map((e,t)=>r._`
1242
+ <w3m-all-wallets-list-item
1243
+ @click=${()=>this.onConnectWallet(e)}
1244
+ .wallet=${e}
1245
+ data-testid="wallet-search-item-${e.id}"
1246
+ explorerId=${e.id}
1247
+ certified=${this.badge===`certified`}
1248
+ walletQuery=${this.query}
1249
+ displayIndex=${t}
1250
+ ></w3m-all-wallets-list-item>
1251
+ `)}
1252
+ </wui-grid>
1253
+ `:r._`
1254
+ <wui-flex
1255
+ data-testid="no-wallet-found"
1256
+ justifyContent="center"
1257
+ alignItems="center"
1258
+ gap="3"
1259
+ flexDirection="column"
1260
+ >
1261
+ <wui-icon-box size="lg" color="default" icon="wallet"></wui-icon-box>
1262
+ <wui-text data-testid="no-wallet-found-text" color="secondary" variant="md-medium">
1263
+ No Wallet found
1264
+ </wui-text>
1265
+ </wui-flex>
1266
+ `}onConnectWallet(e){n.m.selectWalletConnector(e)}};$.styles=It,Q([i.s()],$.prototype,`loading`,void 0),Q([i.s()],$.prototype,`mobileFullScreen`,void 0),Q([i.c()],$.prototype,`query`,void 0),Q([i.c()],$.prototype,`badge`,void 0),$=Q([r.r(`w3m-all-wallets-search`)],$);var Lt=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Rt=class extends r.p{constructor(){super(...arguments),this.search=``,this.badge=void 0,this.onDebouncedSearch=n.j.debounce(e=>{this.search=e})}render(){let e=this.search.length>=2;return r._`
1267
+ <wui-flex .padding=${[`1`,`3`,`3`,`3`]} gap="2" alignItems="center">
1268
+ <wui-search-bar @inputChange=${this.onInputChange.bind(this)}></wui-search-bar>
1269
+ <wui-certified-switch
1270
+ ?checked=${this.badge===`certified`}
1271
+ @certifiedSwitchChange=${this.onCertifiedSwitchChange.bind(this)}
1272
+ data-testid="wui-certified-switch"
1273
+ ></wui-certified-switch>
1274
+ ${this.qrButtonTemplate()}
1275
+ </wui-flex>
1276
+ ${e||this.badge?r._`<w3m-all-wallets-search
1277
+ query=${this.search}
1278
+ .badge=${this.badge}
1279
+ ></w3m-all-wallets-search>`:r._`<w3m-all-wallets-list .badge=${this.badge}></w3m-all-wallets-list>`}
1280
+ `}onInputChange(e){this.onDebouncedSearch(e.detail)}onCertifiedSwitchChange(e){e.detail?(this.badge=`certified`,n.C.showSvg(`Only WalletConnect certified`,{icon:`walletConnectBrown`,iconColor:`accent-100`})):this.badge=void 0}qrButtonTemplate(){return n.j.isMobile()?r._`
1281
+ <wui-icon-box
1282
+ size="xl"
1283
+ iconSize="xl"
1284
+ color="accent-primary"
1285
+ icon="qrCode"
1286
+ border
1287
+ borderColor="wui-accent-glass-010"
1288
+ @click=${this.onWalletConnectQr.bind(this)}
1289
+ ></wui-icon-box>
1290
+ `:null}onWalletConnectQr(){n.y.push(`ConnectingWalletConnect`)}};Lt([i.s()],Rt.prototype,`search`,void 0),Lt([i.s()],Rt.prototype,`badge`,void 0),Rt=Lt([r.r(`w3m-all-wallets-view`)],Rt);var zt=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Bt=class extends r.p{constructor(){super(...arguments),this.wallet=n.y.state.data?.wallet}render(){if(!this.wallet)throw Error(`w3m-downloads-view`);return r._`
1291
+ <wui-flex gap="2" flexDirection="column" .padding=${[`3`,`3`,`4`,`3`]}>
1292
+ ${this.chromeTemplate()} ${this.iosTemplate()} ${this.androidTemplate()}
1293
+ ${this.homepageTemplate()}
1294
+ </wui-flex>
1295
+ `}chromeTemplate(){return this.wallet?.chrome_store?r._`<wui-list-item
1296
+ variant="icon"
1297
+ icon="chromeStore"
1298
+ iconVariant="square"
1299
+ @click=${this.onChromeStore.bind(this)}
1300
+ chevron
1301
+ >
1302
+ <wui-text variant="md-medium" color="primary">Chrome Extension</wui-text>
1303
+ </wui-list-item>`:null}iosTemplate(){return this.wallet?.app_store?r._`<wui-list-item
1304
+ variant="icon"
1305
+ icon="appStore"
1306
+ iconVariant="square"
1307
+ @click=${this.onAppStore.bind(this)}
1308
+ chevron
1309
+ >
1310
+ <wui-text variant="md-medium" color="primary">iOS App</wui-text>
1311
+ </wui-list-item>`:null}androidTemplate(){return this.wallet?.play_store?r._`<wui-list-item
1312
+ variant="icon"
1313
+ icon="playStore"
1314
+ iconVariant="square"
1315
+ @click=${this.onPlayStore.bind(this)}
1316
+ chevron
1317
+ >
1318
+ <wui-text variant="md-medium" color="primary">Android App</wui-text>
1319
+ </wui-list-item>`:null}homepageTemplate(){return this.wallet?.homepage?r._`
1320
+ <wui-list-item
1321
+ variant="icon"
1322
+ icon="browser"
1323
+ iconVariant="square-blue"
1324
+ @click=${this.onHomePage.bind(this)}
1325
+ chevron
1326
+ >
1327
+ <wui-text variant="md-medium" color="primary">Website</wui-text>
1328
+ </wui-list-item>
1329
+ `:null}openStore(e){e.href&&this.wallet&&(n.v.sendEvent({type:`track`,event:`GET_WALLET`,properties:{name:this.wallet.name,walletRank:this.wallet.order,explorerId:this.wallet.id,type:e.type}}),n.j.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`})}};Bt=zt([r.r(`w3m-downloads-view`)],Bt);