conflux-devkit 0.1.0

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 (176) hide show
  1. package/README.md +102 -0
  2. package/dist/cli.js +16338 -0
  3. package/package.json +55 -0
  4. package/ui/out/404/index.html +1 -0
  5. package/ui/out/404.html +1 -0
  6. package/ui/out/_next/static/--YsNpX1nEj74gOnGiYDR/_buildManifest.js +1 -0
  7. package/ui/out/_next/static/--YsNpX1nEj74gOnGiYDR/_ssgManifest.js +1 -0
  8. package/ui/out/_next/static/-7MZn09F75tC02XxCAzYQ/_buildManifest.js +1 -0
  9. package/ui/out/_next/static/-7MZn09F75tC02XxCAzYQ/_ssgManifest.js +1 -0
  10. package/ui/out/_next/static/-Yup9TU2qbfFuEoVK7cV3/_buildManifest.js +1 -0
  11. package/ui/out/_next/static/-Yup9TU2qbfFuEoVK7cV3/_ssgManifest.js +1 -0
  12. package/ui/out/_next/static/2FNwKfitLrla-BD4Pvi7U/_buildManifest.js +1 -0
  13. package/ui/out/_next/static/2FNwKfitLrla-BD4Pvi7U/_ssgManifest.js +1 -0
  14. package/ui/out/_next/static/3dg2q5Zn_zf7tMeBD4-2x/_buildManifest.js +1 -0
  15. package/ui/out/_next/static/3dg2q5Zn_zf7tMeBD4-2x/_ssgManifest.js +1 -0
  16. package/ui/out/_next/static/EMBrL2fIteEXHVOa9QqbR/_buildManifest.js +1 -0
  17. package/ui/out/_next/static/EMBrL2fIteEXHVOa9QqbR/_ssgManifest.js +1 -0
  18. package/ui/out/_next/static/HC9l66u-S82fZ45n1NJvV/_buildManifest.js +1 -0
  19. package/ui/out/_next/static/HC9l66u-S82fZ45n1NJvV/_ssgManifest.js +1 -0
  20. package/ui/out/_next/static/JDizq7Hn5WLnElAxCtqyg/_buildManifest.js +1 -0
  21. package/ui/out/_next/static/JDizq7Hn5WLnElAxCtqyg/_ssgManifest.js +1 -0
  22. package/ui/out/_next/static/KVufTmdF91v3IsRvyub2i/_buildManifest.js +1 -0
  23. package/ui/out/_next/static/KVufTmdF91v3IsRvyub2i/_ssgManifest.js +1 -0
  24. package/ui/out/_next/static/UVWp8ZgmXIqxga6tJZU2j/_buildManifest.js +1 -0
  25. package/ui/out/_next/static/UVWp8ZgmXIqxga6tJZU2j/_ssgManifest.js +1 -0
  26. package/ui/out/_next/static/WVZ0izyd9YpKZhSNF1OSe/_buildManifest.js +1 -0
  27. package/ui/out/_next/static/WVZ0izyd9YpKZhSNF1OSe/_ssgManifest.js +1 -0
  28. package/ui/out/_next/static/_jTgcoBsv_xqKZx36-jrD/_buildManifest.js +1 -0
  29. package/ui/out/_next/static/_jTgcoBsv_xqKZx36-jrD/_ssgManifest.js +1 -0
  30. package/ui/out/_next/static/_tUKGLiPpF-Ioygkq7-R9/_buildManifest.js +1 -0
  31. package/ui/out/_next/static/_tUKGLiPpF-Ioygkq7-R9/_ssgManifest.js +1 -0
  32. package/ui/out/_next/static/chunks/205-997c9580ac2ccb04.js +1 -0
  33. package/ui/out/_next/static/chunks/238-baf384d341a98f9f.js +1 -0
  34. package/ui/out/_next/static/chunks/363-11ecfe8307834c37.js +1 -0
  35. package/ui/out/_next/static/chunks/363-fd3f659dc66a2545.js +1 -0
  36. package/ui/out/_next/static/chunks/383-30e544e3db85d4b4.js +1 -0
  37. package/ui/out/_next/static/chunks/396-0d45f2627ca2432c.js +1 -0
  38. package/ui/out/_next/static/chunks/396-de3171781a3c5f52.js +1 -0
  39. package/ui/out/_next/static/chunks/476-1a499832716820dd.js +1 -0
  40. package/ui/out/_next/static/chunks/5b8f0dd8-7fc232be3e483640.js +1 -0
  41. package/ui/out/_next/static/chunks/5b8f0dd8-f9bbf8f44d8e6302.js +1 -0
  42. package/ui/out/_next/static/chunks/606-d510a7806cc50e18.js +1 -0
  43. package/ui/out/_next/static/chunks/628-ae8f2280d891101c.js +1 -0
  44. package/ui/out/_next/static/chunks/69-a23845cfa4a23071.js +1 -0
  45. package/ui/out/_next/static/chunks/706-142eb06ca4e1b468.js +1 -0
  46. package/ui/out/_next/static/chunks/749-27e561f3f17b1ad3.js +2 -0
  47. package/ui/out/_next/static/chunks/749-bd8c206e8e58f8b0.js +2 -0
  48. package/ui/out/_next/static/chunks/781-7af4662532da98ca.js +1 -0
  49. package/ui/out/_next/static/chunks/815-ab30cec2ff88e700.js +1 -0
  50. package/ui/out/_next/static/chunks/826-c38d836f8f2bac38.js +1 -0
  51. package/ui/out/_next/static/chunks/903-2887fe814dfa6d5e.js +1 -0
  52. package/ui/out/_next/static/chunks/app/_not-found/page-1a3d8ff7bd6fafe6.js +1 -0
  53. package/ui/out/_next/static/chunks/app/_not-found/page-fe94df087cbbeedb.js +1 -0
  54. package/ui/out/_next/static/chunks/app/accounts/page-21a02cc8bbbce9cf.js +1 -0
  55. package/ui/out/_next/static/chunks/app/accounts/page-2bf2eeddfcc46fd2.js +1 -0
  56. package/ui/out/_next/static/chunks/app/accounts/page-4fb77d9b03c79ef0.js +1 -0
  57. package/ui/out/_next/static/chunks/app/accounts/page-840e013892222293.js +1 -0
  58. package/ui/out/_next/static/chunks/app/accounts/page-8828d6c27ee45d5e.js +1 -0
  59. package/ui/out/_next/static/chunks/app/accounts/page-a5a4d066c57c6eba.js +1 -0
  60. package/ui/out/_next/static/chunks/app/accounts/page-cd6edb16de77e73a.js +1 -0
  61. package/ui/out/_next/static/chunks/app/accounts/page-ce44f544affcbb2e.js +1 -0
  62. package/ui/out/_next/static/chunks/app/accounts/page-f26a4c8967b60c31.js +1 -0
  63. package/ui/out/_next/static/chunks/app/accounts/page-fc53feb7e5bf6a0b.js +1 -0
  64. package/ui/out/_next/static/chunks/app/accounts/page-fe5a9daa4d22e115.js +1 -0
  65. package/ui/out/_next/static/chunks/app/contracts/page-091eba53f5dcb62b.js +1 -0
  66. package/ui/out/_next/static/chunks/app/contracts/page-265c4f26532b42ce.js +1 -0
  67. package/ui/out/_next/static/chunks/app/contracts/page-26c527bf8b829de6.js +1 -0
  68. package/ui/out/_next/static/chunks/app/contracts/page-53e2d2d715f76290.js +1 -0
  69. package/ui/out/_next/static/chunks/app/contracts/page-56d74025e6315a3d.js +1 -0
  70. package/ui/out/_next/static/chunks/app/contracts/page-844c9f55a6ec9218.js +1 -0
  71. package/ui/out/_next/static/chunks/app/contracts/page-88416cc33eabdddb.js +1 -0
  72. package/ui/out/_next/static/chunks/app/contracts/page-9361399f80e19ab7.js +1 -0
  73. package/ui/out/_next/static/chunks/app/contracts/page-afebd14c1ae73ec9.js +1 -0
  74. package/ui/out/_next/static/chunks/app/contracts/page-b0f74db982762c7e.js +1 -0
  75. package/ui/out/_next/static/chunks/app/contracts/page-d88227b11f5ac4f6.js +1 -0
  76. package/ui/out/_next/static/chunks/app/contracts/page-e454dad9b03f36df.js +1 -0
  77. package/ui/out/_next/static/chunks/app/contracts/page-f269686063be5d4b.js +1 -0
  78. package/ui/out/_next/static/chunks/app/layout-0bf0ed51d0d1d3e8.js +1 -0
  79. package/ui/out/_next/static/chunks/app/layout-56f011c6a6b2930f.js +1 -0
  80. package/ui/out/_next/static/chunks/app/layout-7422dc714ea7b763.js +1 -0
  81. package/ui/out/_next/static/chunks/app/layout-88938a963d68eb45.js +1 -0
  82. package/ui/out/_next/static/chunks/app/layout-a1d424de4fc1d283.js +1 -0
  83. package/ui/out/_next/static/chunks/app/layout-add77f8e78dbfbf5.js +1 -0
  84. package/ui/out/_next/static/chunks/app/layout-c087511efc77c1ef.js +1 -0
  85. package/ui/out/_next/static/chunks/app/layout-eaaaddaebabc1e84.js +1 -0
  86. package/ui/out/_next/static/chunks/app/layout-ecbbc3f527378bf4.js +1 -0
  87. package/ui/out/_next/static/chunks/app/layout-f8c5fec65e6ca0ff.js +1 -0
  88. package/ui/out/_next/static/chunks/app/mining/page-14579efdb2e8f6c3.js +1 -0
  89. package/ui/out/_next/static/chunks/app/mining/page-1e273a4949e2b650.js +1 -0
  90. package/ui/out/_next/static/chunks/app/mining/page-2d151bdd475474f6.js +1 -0
  91. package/ui/out/_next/static/chunks/app/mining/page-43cfe0d01f696e96.js +1 -0
  92. package/ui/out/_next/static/chunks/app/mining/page-4ab3daab428e05f1.js +1 -0
  93. package/ui/out/_next/static/chunks/app/mining/page-64c88d55a5788e20.js +1 -0
  94. package/ui/out/_next/static/chunks/app/mining/page-79e2f952fc54ff89.js +1 -0
  95. package/ui/out/_next/static/chunks/app/mining/page-8305d73847b829c9.js +1 -0
  96. package/ui/out/_next/static/chunks/app/mining/page-ab0458f12921230c.js +1 -0
  97. package/ui/out/_next/static/chunks/app/mining/page-ac2a555e62327efe.js +1 -0
  98. package/ui/out/_next/static/chunks/app/mining/page-bb3068075a8088dd.js +1 -0
  99. package/ui/out/_next/static/chunks/app/mining/page-d4bad0ff79dd463a.js +1 -0
  100. package/ui/out/_next/static/chunks/app/network/page-3d5fbcf1eb37e0c5.js +1 -0
  101. package/ui/out/_next/static/chunks/app/network/page-4b692d29a3e609a8.js +1 -0
  102. package/ui/out/_next/static/chunks/app/network/page-5e33fbeb3a40de20.js +1 -0
  103. package/ui/out/_next/static/chunks/app/network/page-62a4488ea3bc2526.js +1 -0
  104. package/ui/out/_next/static/chunks/app/network/page-97cebccc451eb5c6.js +1 -0
  105. package/ui/out/_next/static/chunks/app/network/page-a50ebf9988b322b5.js +1 -0
  106. package/ui/out/_next/static/chunks/app/network/page-d7c0ceaa242f38f9.js +1 -0
  107. package/ui/out/_next/static/chunks/app/network/page-e152fafa7a4d7361.js +1 -0
  108. package/ui/out/_next/static/chunks/app/network/page-eea297c1ae180bda.js +1 -0
  109. package/ui/out/_next/static/chunks/app/network/page-f3c51db982b5a388.js +1 -0
  110. package/ui/out/_next/static/chunks/app/network/page-f51d9ab619db1c20.js +1 -0
  111. package/ui/out/_next/static/chunks/app/network/page-f6b4c10c7d87957f.js +1 -0
  112. package/ui/out/_next/static/chunks/app/page-165b6a1747a64947.js +1 -0
  113. package/ui/out/_next/static/chunks/app/page-348c96e8d45c2559.js +1 -0
  114. package/ui/out/_next/static/chunks/app/page-3632f4f09f69c905.js +1 -0
  115. package/ui/out/_next/static/chunks/app/page-36afbe5e1cb8094f.js +1 -0
  116. package/ui/out/_next/static/chunks/app/page-557bd6270c5ad579.js +1 -0
  117. package/ui/out/_next/static/chunks/app/page-6d79f31ac0288bac.js +1 -0
  118. package/ui/out/_next/static/chunks/app/page-71fcaf2853c53e30.js +1 -0
  119. package/ui/out/_next/static/chunks/app/page-90d8520902c1a7b0.js +1 -0
  120. package/ui/out/_next/static/chunks/app/page-c430d30cb894c926.js +1 -0
  121. package/ui/out/_next/static/chunks/app/page-ce0f985468520dbc.js +1 -0
  122. package/ui/out/_next/static/chunks/app/page-f0dced734181e611.js +1 -0
  123. package/ui/out/_next/static/chunks/app/page-f27633bfbc515249.js +1 -0
  124. package/ui/out/_next/static/chunks/app/page-f7be59ea4e13f436.js +1 -0
  125. package/ui/out/_next/static/chunks/app/wallet/page-11fb46a5f4a8b0be.js +1 -0
  126. package/ui/out/_next/static/chunks/app/wallet/page-26003843604c7c8c.js +1 -0
  127. package/ui/out/_next/static/chunks/app/wallet/page-7041ba96cf94b9d6.js +1 -0
  128. package/ui/out/_next/static/chunks/app/wallet/page-716e9207662cbb13.js +1 -0
  129. package/ui/out/_next/static/chunks/app/wallet/page-74cdd3297d391701.js +1 -0
  130. package/ui/out/_next/static/chunks/app/wallet/page-766c3286d7fc1fbb.js +1 -0
  131. package/ui/out/_next/static/chunks/app/wallet/page-a3e3f3f091deed13.js +1 -0
  132. package/ui/out/_next/static/chunks/app/wallet/page-fb7030a6672345f4.js +1 -0
  133. package/ui/out/_next/static/chunks/app/wallet/page-feeafe9afcd3702d.js +1 -0
  134. package/ui/out/_next/static/chunks/framework-bef83a85c94ff7de.js +1 -0
  135. package/ui/out/_next/static/chunks/main-764c1d152dd64cdb.js +1 -0
  136. package/ui/out/_next/static/chunks/main-app-565ce517a559065d.js +1 -0
  137. package/ui/out/_next/static/chunks/pages/_app-32ee63fa91347547.js +1 -0
  138. package/ui/out/_next/static/chunks/pages/_error-79ee453ce9bad74d.js +1 -0
  139. package/ui/out/_next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
  140. package/ui/out/_next/static/chunks/webpack-ea02740f160b546a.js +1 -0
  141. package/ui/out/_next/static/css/0f4a493f8c2c55db.css +3 -0
  142. package/ui/out/_next/static/css/4169c0d861da624d.css +3 -0
  143. package/ui/out/_next/static/css/42c642225833b63d.css +3 -0
  144. package/ui/out/_next/static/css/4ec6b37afd49be73.css +3 -0
  145. package/ui/out/_next/static/css/6a8f3e28ef1137c2.css +3 -0
  146. package/ui/out/_next/static/css/6bbaea3800a74df9.css +3 -0
  147. package/ui/out/_next/static/css/73f87001fc8b2a52.css +3 -0
  148. package/ui/out/_next/static/css/90ccf9db21744740.css +3 -0
  149. package/ui/out/_next/static/css/9f0d4e440a0f0806.css +3 -0
  150. package/ui/out/_next/static/css/b1a2c26b7bd10f8d.css +3 -0
  151. package/ui/out/_next/static/css/c97b9630f605a98b.css +3 -0
  152. package/ui/out/_next/static/css/e5751e31c7620a6e.css +3 -0
  153. package/ui/out/_next/static/ezlluEQnUi2an273EFR3C/_buildManifest.js +1 -0
  154. package/ui/out/_next/static/ezlluEQnUi2an273EFR3C/_ssgManifest.js +1 -0
  155. package/ui/out/_next/static/ghzWYfWuW8Y8XavA7qfLx/_buildManifest.js +1 -0
  156. package/ui/out/_next/static/ghzWYfWuW8Y8XavA7qfLx/_ssgManifest.js +1 -0
  157. package/ui/out/_next/static/hzvSbCbk7BhWq0LE5xqx1/_buildManifest.js +1 -0
  158. package/ui/out/_next/static/hzvSbCbk7BhWq0LE5xqx1/_ssgManifest.js +1 -0
  159. package/ui/out/_next/static/p4x_NRy3wdFgXa-RI9_BQ/_buildManifest.js +1 -0
  160. package/ui/out/_next/static/p4x_NRy3wdFgXa-RI9_BQ/_ssgManifest.js +1 -0
  161. package/ui/out/_next/static/uKnkegMpJr2nHM4qD8J3D/_buildManifest.js +1 -0
  162. package/ui/out/_next/static/uKnkegMpJr2nHM4qD8J3D/_ssgManifest.js +1 -0
  163. package/ui/out/_next/static/vAN91b7edxmzrsDueacJ6/_buildManifest.js +1 -0
  164. package/ui/out/_next/static/vAN91b7edxmzrsDueacJ6/_ssgManifest.js +1 -0
  165. package/ui/out/accounts/index.html +1 -0
  166. package/ui/out/accounts/index.txt +9 -0
  167. package/ui/out/contracts/index.html +1 -0
  168. package/ui/out/contracts/index.txt +9 -0
  169. package/ui/out/index.html +1 -0
  170. package/ui/out/index.txt +9 -0
  171. package/ui/out/mining/index.html +1 -0
  172. package/ui/out/mining/index.txt +9 -0
  173. package/ui/out/network/index.html +1 -0
  174. package/ui/out/network/index.txt +9 -0
  175. package/ui/out/wallet/index.html +1 -0
  176. package/ui/out/wallet/index.txt +9 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[903],{7903:function(t,e,s){let i,r;s.d(e,{io:function(){return tC}});var n,o,a={};s.r(a),s.d(a,{Decoder:function(){return tm},Encoder:function(){return tg},PacketType:function(){return o},isPacketValid:function(){return tk},protocol:function(){return ty}});let h=Object.create(null);h.open="0",h.close="1",h.ping="2",h.pong="3",h.message="4",h.upgrade="5",h.noop="6";let c=Object.create(null);Object.keys(h).forEach(t=>{c[h[t]]=t});let l={type:"error",data:"parser error"},u="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),p="function"==typeof ArrayBuffer,d=t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,f=({type:t,data:e},s,i)=>u&&e instanceof Blob?s?i(e):y(e,i):p&&(e instanceof ArrayBuffer||d(e))?s?i(e):y(new Blob([e]),i):i(h[t]+(e||"")),y=(t,e)=>{let s=new FileReader;return s.onload=function(){e("b"+(s.result.split(",")[1]||""))},s.readAsDataURL(t)};function g(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<m.length;t++)_[m.charCodeAt(t)]=t;let b=t=>{let e=.75*t.length,s=t.length,i,r=0,n,o,a,h;"="===t[t.length-1]&&(e--,"="===t[t.length-2]&&e--);let c=new ArrayBuffer(e),l=new Uint8Array(c);for(i=0;i<s;i+=4)n=_[t.charCodeAt(i)],o=_[t.charCodeAt(i+1)],a=_[t.charCodeAt(i+2)],h=_[t.charCodeAt(i+3)],l[r++]=n<<2|o>>4,l[r++]=(15&o)<<4|a>>2,l[r++]=(3&a)<<6|63&h;return c},v="function"==typeof ArrayBuffer,k=(t,e)=>{if("string"!=typeof t)return{type:"message",data:E(t,e)};let s=t.charAt(0);return"b"===s?{type:"message",data:w(t.substring(1),e)}:c[s]?t.length>1?{type:c[s],data:t.substring(1)}:{type:c[s]}:l},w=(t,e)=>v?E(b(t),e):{base64:!0,data:t},E=(t,e)=>"blob"===e?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer,A=(t,e)=>{let s=t.length,i=Array(s),r=0;t.forEach((t,n)=>{f(t,!1,t=>{i[n]=t,++r===s&&e(i.join("\x1e"))})})},T=(t,e)=>{let s=t.split("\x1e"),i=[];for(let t=0;t<s.length;t++){let r=k(s[t],e);if(i.push(r),"error"===r.type)break}return i};function O(t){return t.reduce((t,e)=>t+e.length,0)}function R(t,e){if(t[0].length===e)return t.shift();let s=new Uint8Array(e),i=0;for(let r=0;r<e;r++)s[r]=t[0][i++],i===t[0].length&&(t.shift(),i=0);return t.length&&i<t[0].length&&(t[0]=t[0].slice(i)),s}function C(t){if(t)return function(t){for(var e in C.prototype)t[e]=C.prototype[e];return t}(t)}C.prototype.on=C.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},C.prototype.once=function(t,e){function s(){this.off(t,s),e.apply(this,arguments)}return s.fn=e,this.on(t,s),this},C.prototype.off=C.prototype.removeListener=C.prototype.removeAllListeners=C.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var s,i=this._callbacks["$"+t];if(!i)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var r=0;r<i.length;r++)if((s=i[r])===e||s.fn===e){i.splice(r,1);break}return 0===i.length&&delete this._callbacks["$"+t],this},C.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=Array(arguments.length-1),s=this._callbacks["$"+t],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(s){s=s.slice(0);for(var i=0,r=s.length;i<r;++i)s[i].apply(this,e)}return this},C.prototype.emitReserved=C.prototype.emit,C.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},C.prototype.hasListeners=function(t){return!!this.listeners(t).length};let B="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,e)=>e(t,0),N="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function x(t,...e){return e.reduce((e,s)=>(t.hasOwnProperty(s)&&(e[s]=t[s]),e),{})}let S=N.setTimeout,L=N.clearTimeout;function q(t,e){e.useNativeTimers?(t.setTimeoutFn=S.bind(N),t.clearTimeoutFn=L.bind(N)):(t.setTimeoutFn=N.setTimeout.bind(N),t.clearTimeoutFn=N.clearTimeout.bind(N))}function P(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class j extends Error{constructor(t,e,s){super(t),this.description=e,this.context=s,this.type="TransportError"}}class D extends C{constructor(t){super(),this.writable=!1,q(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,e,s){return super.emitReserved("error",new j(t,e,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return("opening"===this.readyState||"open"===this.readyState)&&(this.doClose(),this.onClose()),this}send(t){"open"===this.readyState&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){let e=k(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,e={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(e)}_hostname(){let t=this.opts.hostname;return -1===t.indexOf(":")?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&443!==Number(this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(t){let e=function(t){let e="";for(let s in t)t.hasOwnProperty(s)&&(e.length&&(e+="&"),e+=encodeURIComponent(s)+"="+encodeURIComponent(t[s]));return e}(t);return e.length?"?"+e:""}}class U extends D{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";let e=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let t=0;this._polling&&(t++,this.once("pollComplete",function(){--t||e()})),this.writable||(t++,this.once("drain",function(){--t||e()}))}else e()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){T(t,this.socket.binaryType).forEach(t=>{if("opening"===this.readyState&&"open"===t.type&&this.onOpen(),"close"===t.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(t)}),"closed"!==this.readyState&&(this._polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this._poll())}doClose(){let t=()=>{this.write([{type:"close"}])};"open"===this.readyState?t():this.once("open",t)}write(t){this.writable=!1,A(t,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.opts.secure?"https":"http",e=this.query||{};return!1!==this.opts.timestampRequests&&(e[this.opts.timestampParam]=P()),this.supportsBinary||e.sid||(e.b64=1),this.createUri(t,e)}}let I=!1;try{I="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}let F=I;function V(){}class M extends U{constructor(t){if(super(t),"undefined"!=typeof location){let e="https:"===location.protocol,s=location.port;s||(s=e?"443":"80"),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||s!==t.port}}doWrite(t,e){let s=this.request({method:"POST",data:t});s.on("success",e),s.on("error",(t,e)=>{this.onError("xhr post error",t,e)})}doPoll(){let t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(t,e)=>{this.onError("xhr poll error",t,e)}),this.pollXhr=t}}class H extends C{constructor(t,e,s){super(),this.createRequest=t,q(this,s),this._opts=s,this._method=s.method||"GET",this._uri=e,this._data=void 0!==s.data?s.data:null,this._create()}_create(){var t;let e=x(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this._opts.xd;let s=this._xhr=this.createRequest(e);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders)for(let t in s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0),this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(t)&&s.setRequestHeader(t,this._opts.extraHeaders[t])}catch(t){}if("POST"===this._method)try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{s.setRequestHeader("Accept","*/*")}catch(t){}null===(t=this._opts.cookieJar)||void 0===t||t.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var t;3===s.readyState&&(null===(t=this._opts.cookieJar)||void 0===t||t.parseCookies(s.getResponseHeader("set-cookie"))),4===s.readyState&&(200===s.status||1223===s.status?this._onLoad():this.setTimeoutFn(()=>{this._onError("number"==typeof s.status?s.status:0)},0))},s.send(this._data)}catch(t){this.setTimeoutFn(()=>{this._onError(t)},0);return}"undefined"!=typeof document&&(this._index=H.requestsCount++,H.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(void 0!==this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=V,t)try{this._xhr.abort()}catch(t){}"undefined"!=typeof document&&delete H.requests[this._index],this._xhr=null}}_onLoad(){let t=this._xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}function K(){for(let t in H.requests)H.requests.hasOwnProperty(t)&&H.requests[t].abort()}H.requestsCount=0,H.requests={},"undefined"!=typeof document&&("function"==typeof attachEvent?attachEvent("onunload",K):"function"==typeof addEventListener&&addEventListener("onpagehide"in N?"pagehide":"unload",K,!1));let W=function(){let t=z({xdomain:!1});return t&&null!==t.responseType}();class Y extends M{constructor(t){super(t);let e=t&&t.forceBase64;this.supportsBinary=W&&!e}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new H(z,this.uri(),t)}}function z(t){let e=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!e||F))return new XMLHttpRequest}catch(t){}if(!e)try{return new N[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(t){}}let J="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class $ extends D{get name(){return"websocket"}doOpen(){let t=this.uri(),e=this.opts.protocols,s=J?{}:x(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,e,s)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let e=0;e<t.length;e++){let s=t[e],i=e===t.length-1;f(s,this.supportsBinary,t=>{try{this.doWrite(s,t)}catch(t){}i&&B(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let t=this.opts.secure?"wss":"ws",e=this.query||{};return this.opts.timestampRequests&&(e[this.opts.timestampParam]=P()),this.supportsBinary||(e.b64=1),this.createUri(t,e)}}let Q=N.WebSocket||N.MozWebSocket;class X extends ${createSocket(t,e,s){return J?new Q(t,e,s):e?new Q(t,e):new Q(t)}doWrite(t,e){this.ws.send(e)}}class G extends D{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{let e=function(t,e){r||(r=new TextDecoder);let s=[],i=0,n=-1,o=!1;return new TransformStream({transform(a,h){for(s.push(a);;){if(0===i){if(1>O(s))break;let t=R(s,1);o=(128&t[0])==128,i=(n=127&t[0])<126?3:126===n?1:2}else if(1===i){if(2>O(s))break;let t=R(s,2);n=new DataView(t.buffer,t.byteOffset,t.length).getUint16(0),i=3}else if(2===i){if(8>O(s))break;let t=R(s,8),e=new DataView(t.buffer,t.byteOffset,t.length),r=e.getUint32(0);if(r>2097151){h.enqueue(l);break}n=4294967296*r+e.getUint32(4),i=3}else{if(O(s)<n)break;let t=R(s,n);h.enqueue(k(o?t:r.decode(t),e)),i=0}if(0===n||n>t){h.enqueue(l);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=t.readable.pipeThrough(e).getReader(),n=new TransformStream({transform(t,e){var s;s=s=>{let i;let r=s.length;if(r<126)new DataView((i=new Uint8Array(1)).buffer).setUint8(0,r);else if(r<65536){let t=new DataView((i=new Uint8Array(3)).buffer);t.setUint8(0,126),t.setUint16(1,r)}else{let t=new DataView((i=new Uint8Array(9)).buffer);t.setUint8(0,127),t.setBigUint64(1,BigInt(r))}t.data&&"string"!=typeof t.data&&(i[0]|=128),e.enqueue(i),e.enqueue(s)},u&&t.data instanceof Blob?t.data.arrayBuffer().then(g).then(s):p&&(t.data instanceof ArrayBuffer||d(t.data))?s(g(t.data)):f(t,!1,t=>{i||(i=new TextEncoder),s(i.encode(t))})}});n.readable.pipeTo(t.writable),this._writer=n.writable.getWriter();let o=()=>{s.read().then(({done:t,value:e})=>{t||(this.onPacket(e),o())}).catch(t=>{})};o();let a={type:"open"};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this._writer.write(a).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let e=0;e<t.length;e++){let s=t[e],i=e===t.length-1;this._writer.write(s).then(()=>{i&&B(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;null===(t=this._transport)||void 0===t||t.close()}}let Z={websocket:X,webtransport:G,polling:Y},tt=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,te=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function ts(t){if(t.length>8e3)throw"URI too long";let e=t,s=t.indexOf("["),i=t.indexOf("]");-1!=s&&-1!=i&&(t=t.substring(0,s)+t.substring(s,i).replace(/:/g,";")+t.substring(i,t.length));let r=tt.exec(t||""),n={},o=14;for(;o--;)n[te[o]]=r[o]||"";return -1!=s&&-1!=i&&(n.source=e,n.host=n.host.substring(1,n.host.length-1).replace(/;/g,":"),n.authority=n.authority.replace("[","").replace("]","").replace(/;/g,":"),n.ipv6uri=!0),n.pathNames=function(t,e){let s=e.replace(/\/{2,9}/g,"/").split("/");return("/"==e.slice(0,1)||0===e.length)&&s.splice(0,1),"/"==e.slice(-1)&&s.splice(s.length-1,1),s}(0,n.path),n.queryKey=function(t,e){let s={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(t,e,i){e&&(s[e]=i)}),s}(0,n.query),n}let ti="function"==typeof addEventListener&&"function"==typeof removeEventListener,tr=[];ti&&addEventListener("offline",()=>{tr.forEach(t=>t())},!1);class tn extends C{constructor(t,e){if(super(),this.binaryType="arraybuffer",this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&"object"==typeof t&&(e=t,t=null),t){let s=ts(t);e.hostname=s.host,e.secure="https"===s.protocol||"wss"===s.protocol,e.port=s.port,s.query&&(e.query=s.query)}else e.host&&(e.hostname=ts(e.host).host);q(this,e),this.secure=null!=e.secure?e.secure:"undefined"!=typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},e.transports.forEach(t=>{let e=t.prototype.name;this.transports.push(e),this._transportsByName[e]=t}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},e),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(t){let e={},s=t.split("&");for(let t=0,i=s.length;t<i;t++){let i=s[t].split("=");e[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return e}(this.opts.query)),ti&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},tr.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){let e=Object.assign({},this.opts.query);e.EIO=4,e.transport=t,this.id&&(e.sid=this.id);let s=Object.assign({},this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](s)}_open(){if(0===this.transports.length){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let t=this.opts.rememberUpgrade&&tn.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";let e=this.createTransport(t);e.open(),this.setTransport(e)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",t=>this._onClose("transport close",t))}onOpen(){this.readyState="open",tn.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()}_onPacket(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let e=Error("server error");e.code=t.data,this._onError(e);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data)}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),"closed"!==this.readyState&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let e=0;e<this.writeBuffer.length;e++){let s=this.writeBuffer[e].data;if(s&&(t+="string"==typeof s?function(t){let e=0,s=0;for(let i=0,r=t.length;i<r;i++)(e=t.charCodeAt(i))<128?s+=1:e<2048?s+=2:e<55296||e>=57344?s+=3:(i++,s+=4);return s}(s):Math.ceil(1.33*(s.byteLength||s.size))),e>0&&t>this._maxPayload)return this.writeBuffer.slice(0,e);t+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,B(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,e,s){return this._sendPacket("message",t,e,s),this}send(t,e,s){return this._sendPacket("message",t,e,s),this}_sendPacket(t,e,s,i){if("function"==typeof e&&(i=e,e=void 0),"function"==typeof s&&(i=s,s=null),"closing"===this.readyState||"closed"===this.readyState)return;(s=s||{}).compress=!1!==s.compress;let r={type:t,data:e,options:s};this.emitReserved("packetCreate",r),this.writeBuffer.push(r),i&&this.once("flush",i),this.flush()}close(){let t=()=>{this._onClose("forced close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},s=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return("opening"===this.readyState||"open"===this.readyState)&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():t()}):this.upgrading?s():t()),this}_onError(t){if(tn.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),ti&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let t=tr.indexOf(this._offlineEventListener);-1!==t&&tr.splice(t,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this._prevBufferLen=0}}}tn.protocol=4;class to extends tn{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),"open"===this.readyState&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let e=this.createTransport(t),s=!1;tn.priorWebsocketSuccess=!1;let i=()=>{s||(e.send([{type:"ping",data:"probe"}]),e.once("packet",t=>{if(!s){if("pong"===t.type&&"probe"===t.data)this.upgrading=!0,this.emitReserved("upgrading",e),e&&(tn.priorWebsocketSuccess="websocket"===e.name,this.transport.pause(()=>{s||"closed"===this.readyState||(c(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())}));else{let t=Error("probe error");t.transport=e.name,this.emitReserved("upgradeError",t)}}}))};function r(){s||(s=!0,c(),e.close(),e=null)}let n=t=>{let s=Error("probe error: "+t);s.transport=e.name,r(),this.emitReserved("upgradeError",s)};function o(){n("transport closed")}function a(){n("socket closed")}function h(t){e&&t.name!==e.name&&r()}let c=()=>{e.removeListener("open",i),e.removeListener("error",n),e.removeListener("close",o),this.off("close",a),this.off("upgrading",h)};e.once("open",i),e.once("error",n),e.once("close",o),this.once("close",a),this.once("upgrading",h),-1!==this._upgrades.indexOf("webtransport")&&"webtransport"!==t?this.setTimeoutFn(()=>{s||e.open()},200):e.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){let e=[];for(let s=0;s<t.length;s++)~this.transports.indexOf(t[s])&&e.push(t[s]);return e}}class ta extends to{constructor(t,e={}){let s="object"==typeof t?t:e;(!s.transports||s.transports&&"string"==typeof s.transports[0])&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(t=>Z[t]).filter(t=>!!t)),super(t,s)}}ta.protocol;let th="function"==typeof ArrayBuffer,tc=t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,tl=Object.prototype.toString,tu="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===tl.call(Blob),tp="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===tl.call(File);function td(t){return th&&(t instanceof ArrayBuffer||tc(t))||tu&&t instanceof Blob||tp&&t instanceof File}let tf=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],ty=5;(n=o||(o={}))[n.CONNECT=0]="CONNECT",n[n.DISCONNECT=1]="DISCONNECT",n[n.EVENT=2]="EVENT",n[n.ACK=3]="ACK",n[n.CONNECT_ERROR=4]="CONNECT_ERROR",n[n.BINARY_EVENT=5]="BINARY_EVENT",n[n.BINARY_ACK=6]="BINARY_ACK";class tg{constructor(t){this.replacer=t}encode(t){return(t.type===o.EVENT||t.type===o.ACK)&&function t(e,s){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let s=0,i=e.length;s<i;s++)if(t(e[s]))return!0;return!1}if(td(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1==arguments.length)return t(e.toJSON(),!0);for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&t(e[s]))return!0;return!1}(t)?this.encodeAsBinary({type:t.type===o.EVENT?o.BINARY_EVENT:o.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let e=""+t.type;return(t.type===o.BINARY_EVENT||t.type===o.BINARY_ACK)&&(e+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(e+=t.nsp+","),null!=t.id&&(e+=t.id),null!=t.data&&(e+=JSON.stringify(t.data,this.replacer)),e}encodeAsBinary(t){let e=function(t){let e=[],s=t.data;return t.data=function t(e,s){if(!e)return e;if(td(e)){let t={_placeholder:!0,num:s.length};return s.push(e),t}if(Array.isArray(e)){let i=Array(e.length);for(let r=0;r<e.length;r++)i[r]=t(e[r],s);return i}if("object"==typeof e&&!(e instanceof Date)){let i={};for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=t(e[r],s));return i}return e}(s,e),t.attachments=e.length,{packet:t,buffers:e}}(t),s=this.encodeAsString(e.packet),i=e.buffers;return i.unshift(s),i}}class tm extends C{constructor(t){super(),this.reviver=t}add(t){let e;if("string"==typeof t){if(this.reconstructor)throw Error("got plaintext data when reconstructing a packet");let s=(e=this.decodeString(t)).type===o.BINARY_EVENT;s||e.type===o.BINARY_ACK?(e.type=s?o.EVENT:o.ACK,this.reconstructor=new t_(e),0===e.attachments&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else if(td(t)||t.base64){if(this.reconstructor)(e=this.reconstructor.takeBinaryData(t))&&(this.reconstructor=null,super.emitReserved("decoded",e));else throw Error("got binary data when not reconstructing a packet")}else throw Error("Unknown type: "+t)}decodeString(t){let e=0,s={type:Number(t.charAt(0))};if(void 0===o[s.type])throw Error("unknown packet type "+s.type);if(s.type===o.BINARY_EVENT||s.type===o.BINARY_ACK){let i=e+1;for(;"-"!==t.charAt(++e)&&e!=t.length;);let r=t.substring(i,e);if(r!=Number(r)||"-"!==t.charAt(e))throw Error("Illegal attachments");s.attachments=Number(r)}if("/"===t.charAt(e+1)){let i=e+1;for(;++e&&","!==t.charAt(e)&&e!==t.length;);s.nsp=t.substring(i,e)}else s.nsp="/";let i=t.charAt(e+1);if(""!==i&&Number(i)==i){let i=e+1;for(;++e;){let s=t.charAt(e);if(null==s||Number(s)!=s){--e;break}if(e===t.length)break}s.id=Number(t.substring(i,e+1))}if(t.charAt(++e)){let i=this.tryParse(t.substr(e));if(tm.isPayloadValid(s.type,i))s.data=i;else throw Error("invalid payload")}return s}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(t){return!1}}static isPayloadValid(t,e){switch(t){case o.CONNECT:return tv(e);case o.DISCONNECT:return void 0===e;case o.CONNECT_ERROR:return"string"==typeof e||tv(e);case o.EVENT:case o.BINARY_EVENT:return Array.isArray(e)&&("number"==typeof e[0]||"string"==typeof e[0]&&-1===tf.indexOf(e[0]));case o.ACK:case o.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class t_{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){var e,s;let t=(e=this.reconPack,s=this.buffers,e.data=function t(e,s){if(!e)return e;if(e&&!0===e._placeholder){if("number"==typeof e.num&&e.num>=0&&e.num<s.length)return s[e.num];throw Error("illegal attachments")}if(Array.isArray(e))for(let i=0;i<e.length;i++)e[i]=t(e[i],s);else if("object"==typeof e)for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(e[i]=t(e[i],s));return e}(e.data,s),delete e.attachments,e);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}let tb=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t};function tv(t){return"[object Object]"===Object.prototype.toString.call(t)}function tk(t){var e;return"string"==typeof t.nsp&&(void 0===(e=t.id)||tb(e))&&function(t,e){switch(t){case o.CONNECT:return void 0===e||tv(e);case o.DISCONNECT:return void 0===e;case o.EVENT:return Array.isArray(e)&&("number"==typeof e[0]||"string"==typeof e[0]&&-1===tf.indexOf(e[0]));case o.ACK:return Array.isArray(e);case o.CONNECT_ERROR:return"string"==typeof e||tv(e);default:return!1}}(t.type,t.data)}function tw(t,e,s){return t.on(e,s),function(){t.off(e,s)}}let tE=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class tA extends C{constructor(t,e,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=e,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let t=this.io;this.subs=[tw(t,"open",this.onopen.bind(this)),tw(t,"packet",this.onpacket.bind(this)),tw(t,"error",this.onerror.bind(this)),tw(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...e){var s,i,r;if(tE.hasOwnProperty(t))throw Error('"'+t.toString()+'" is a reserved event name');if(e.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(e),this;let n={type:o.EVENT,data:e};if(n.options={},n.options.compress=!1!==this.flags.compress,"function"==typeof e[e.length-1]){let t=this.ids++,s=e.pop();this._registerAckCallback(t,s),n.id=t}let a=null===(i=null===(s=this.io.engine)||void 0===s?void 0:s.transport)||void 0===i?void 0:i.writable,h=this.connected&&!(null===(r=this.io.engine)||void 0===r?void 0:r._hasPingExpired());return this.flags.volatile&&!a||(h?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n)),this.flags={},this}_registerAckCallback(t,e){var s;let i=null!==(s=this.flags.timeout)&&void 0!==s?s:this._opts.ackTimeout;if(void 0===i){this.acks[t]=e;return}let r=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let e=0;e<this.sendBuffer.length;e++)this.sendBuffer[e].id===t&&this.sendBuffer.splice(e,1);e.call(this,Error("operation has timed out"))},i),n=(...t)=>{this.io.clearTimeoutFn(r),e.apply(this,t)};n.withError=!0,this.acks[t]=n}emitWithAck(t,...e){return new Promise((s,i)=>{let r=(t,e)=>t?i(t):s(e);r.withError=!0,e.push(r),this.emit(t,...e)})}_addToQueue(t){let e;"function"==typeof t[t.length-1]&&(e=t.pop());let s={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((t,...i)=>(this._queue[0],null!==t?s.tryCount>this._opts.retries&&(this._queue.shift(),e&&e(t)):(this._queue.shift(),e&&e(null,...i)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||0===this._queue.length)return;let e=this._queue[0];(!e.pending||t)&&(e.pending=!0,e.tryCount++,this.flags=e.flags,this.emit.apply(this,e.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){"function"==typeof this.auth?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:o.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,e){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,e),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(e=>String(e.id)===t)){let e=this.acks[t];delete this.acks[t],e.withError&&e.call(this,Error("socket has been disconnected"))}})}onpacket(t){if(!(t.nsp!==this.nsp))switch(t.type){case o.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case o.EVENT:case o.BINARY_EVENT:this.onevent(t);break;case o.ACK:case o.BINARY_ACK:this.onack(t);break;case o.DISCONNECT:this.ondisconnect();break;case o.CONNECT_ERROR:this.destroy();let e=Error(t.data.message);e.data=t.data.data,this.emitReserved("connect_error",e)}}onevent(t){let e=t.data||[];null!=t.id&&e.push(this.ack(t.id)),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length)for(let e of this._anyListeners.slice())e.apply(this,t);super.emit.apply(this,t),this._pid&&t.length&&"string"==typeof t[t.length-1]&&(this._lastOffset=t[t.length-1])}ack(t){let e=this,s=!1;return function(...i){s||(s=!0,e.packet({type:o.ACK,id:t,data:i}))}}onack(t){let e=this.acks[t.id];"function"==typeof e&&(delete this.acks[t.id],e.withError&&t.data.unshift(null),e.apply(this,t.data))}onconnect(t,e){this.id=t,this.recovered=e&&this._pid===e,this._pid=e,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:o.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){let e=this._anyListeners;for(let s=0;s<e.length;s++)if(t===e[s]){e.splice(s,1);break}}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){let e=this._anyOutgoingListeners;for(let s=0;s<e.length;s++)if(t===e[s]){e.splice(s,1);break}}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length)for(let e of this._anyOutgoingListeners.slice())e.apply(this,t.data)}}function tT(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}tT.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),s=Math.floor(e*this.jitter*t);t=(1&Math.floor(10*e))==0?t-s:t+s}return 0|Math.min(t,this.max)},tT.prototype.reset=function(){this.attempts=0},tT.prototype.setMin=function(t){this.ms=t},tT.prototype.setMax=function(t){this.max=t},tT.prototype.setJitter=function(t){this.jitter=t};class tO extends C{constructor(t,e){var s;super(),this.nsps={},this.subs=[],t&&"object"==typeof t&&(e=t,t=void 0),(e=e||{}).path=e.path||"/socket.io",this.opts=e,q(this,e),this.reconnection(!1!==e.reconnection),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(s=e.randomizationFactor)&&void 0!==s?s:.5),this.backoff=new tT({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this._readyState="closed",this.uri=t;let i=e.parser||a;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=!1!==e.autoConnect,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return void 0===t?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var e;return void 0===t?this._reconnectionDelay:(this._reconnectionDelay=t,null===(e=this.backoff)||void 0===e||e.setMin(t),this)}randomizationFactor(t){var e;return void 0===t?this._randomizationFactor:(this._randomizationFactor=t,null===(e=this.backoff)||void 0===e||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return void 0===t?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,null===(e=this.backoff)||void 0===e||e.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new ta(this.uri,this.opts);let e=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;let i=tw(e,"open",function(){s.onopen(),t&&t()}),r=e=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",e),t?t(e):this.maybeReconnectOnOpen()},n=tw(e,"error",r);if(!1!==this._timeout){let t=this._timeout,s=this.setTimeoutFn(()=>{i(),r(Error("timeout")),e.close()},t);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}return this.subs.push(i),this.subs.push(n),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let t=this.engine;this.subs.push(tw(t,"ping",this.onping.bind(this)),tw(t,"data",this.ondata.bind(this)),tw(t,"error",this.onerror.bind(this)),tw(t,"close",this.onclose.bind(this)),tw(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}}ondecoded(t){B(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,e){let s=this.nsps[t];return s?this._autoConnect&&!s.active&&s.connect():(s=new tA(this,t,e),this.nsps[t]=s),s}_destroy(t){for(let t of Object.keys(this.nsps))if(this.nsps[t].active)return;this._close()}_packet(t){let e=this.encoder.encode(t);for(let s=0;s<e.length;s++)this.engine.write(e[s],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,e){var s;this.cleanup(),null===(s=this.engine)||void 0===s||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,e),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let e=this.backoff.duration();this._reconnecting=!0;let s=this.setTimeoutFn(()=>{!t.skipReconnect&&(this.emitReserved("reconnect_attempt",t.backoff.attempts),t.skipReconnect||t.open(e=>{e?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",e)):t.onreconnect()}))},e);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){let t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}let tR={};function tC(t,e){let s;"object"==typeof t&&(e=t,t=void 0);let i=function(t,e="",s){let i=t;s=s||"undefined"!=typeof location&&location,null==t&&(t=s.protocol+"//"+s.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?s.protocol+t:s.host+t),/^(https?|wss?):\/\//.test(t)||(t=void 0!==s?s.protocol+"//"+t:"https://"+t),i=ts(t)),!i.port&&(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443")),i.path=i.path||"/";let r=-1!==i.host.indexOf(":")?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+r+":"+i.port+e,i.href=i.protocol+"://"+r+(s&&s.port===i.port?"":":"+i.port),i}(t,(e=e||{}).path||"/socket.io"),r=i.source,n=i.id,o=i.path,a=tR[n]&&o in tR[n].nsps;return e.forceNew||e["force new connection"]||!1===e.multiplex||a?s=new tO(r,e):(tR[n]||(tR[n]=new tO(r,e)),s=tR[n]),i.query&&!e.query&&(e.query=i.queryKey),s.socket(i.path,e)}Object.assign(tC,{Manager:tO,Socket:tA,io:tC,connect:tC})}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[409],{7042:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_not-found/page",function(){return n(2984)}])},2984:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}}),n(6150);let i=n(5853);n(4254);let o={fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},l={display:"inline-block"},r={display:"inline-block",margin:"0 20px 0 0",padding:"0 23px 0 0",fontSize:24,fontWeight:500,verticalAlign:"top",lineHeight:"49px"},d={fontSize:14,fontWeight:400,lineHeight:"49px",margin:0};function s(){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("title",{children:"404: This page could not be found."}),(0,i.jsx)("div",{style:o,children:(0,i.jsxs)("div",{children:[(0,i.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}),(0,i.jsx)("h1",{className:"next-error-h1",style:r,children:"404"}),(0,i.jsx)("div",{style:l,children:(0,i.jsx)("h2",{style:d,children:"This page could not be found."})})]})})]})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},function(e){e.O(0,[285,749,744],function(){return e(e.s=7042)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[409],{7042:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_not-found/page",function(){return n(2984)}])},2984:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}}),n(6150);let i=n(5853);n(4254);let o={fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},l={display:"inline-block"},r={display:"inline-block",margin:"0 20px 0 0",padding:"0 23px 0 0",fontSize:24,fontWeight:500,verticalAlign:"top",lineHeight:"49px"},d={fontSize:14,fontWeight:400,lineHeight:"49px",margin:0};function s(){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("title",{children:"404: This page could not be found."}),(0,i.jsx)("div",{style:o,children:(0,i.jsxs)("div",{children:[(0,i.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}),(0,i.jsx)("h1",{className:"next-error-h1",style:r,children:"404"}),(0,i.jsx)("div",{style:l,children:(0,i.jsx)("h2",{style:d,children:"This page could not be found."})})]})})]})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},function(e){e.O(0,[285,749,744],function(){return e(e.s=7042)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[423],{2929:function(e,t,s){Promise.resolve().then(s.bind(s,7691))},7691:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return j}});var a=s(5853),c=s(4852),n=s(6632),l=s(8990),r=s(4254),i=s(9928),d=s(3264),o=s(7201),x=s(3948),u=s(6804),m=s(8144);function h(e){let{text:t}=e,[s,c]=(0,r.useState)(!1);return(0,a.jsx)("button",{type:"button",title:"Copy",className:"rounded p-0.5 text-slate-500 hover:text-slate-300",onClick:async()=>{await navigator.clipboard.writeText(t),c(!0),setTimeout(()=>c(!1),1500)},children:s?(0,a.jsx)(i.Z,{className:"h-3 w-3 text-green-400"}):(0,a.jsx)(d.Z,{className:"h-3 w-3"})})}function p(e){let{onClose:t}=e,s=(0,c.NL)(),[l,i]=(0,r.useState)(""),[d,o]=(0,r.useState)(""),[x,u]=(0,r.useState)("evm"),[h,p]=(0,r.useState)(""),j=(0,n.D)({mutationFn:()=>m.SX.fund(l,d||void 0,x),onSuccess:e=>{p("✓ tx: ".concat(e.txHash)),s.invalidateQueries({queryKey:["accounts"]})},onError:e=>p("✗ ".concat(e.message))});return(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4",children:(0,a.jsxs)("div",{className:"card w-full max-w-md space-y-4",children:[(0,a.jsx)("h2",{className:"font-medium text-white",children:"Fund Address"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"label",children:"Address"}),(0,a.jsx)("input",{className:"input",value:l,onChange:e=>i(e.target.value),placeholder:"0x… or cfx:…"})]}),(0,a.jsxs)("div",{className:"flex gap-3",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"label",children:"Amount (optional)"}),(0,a.jsx)("input",{className:"input",value:d,onChange:e=>o(e.target.value),placeholder:"1000"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"label",children:"Chain"}),(0,a.jsxs)("select",{className:"input",value:x,onChange:e=>u(e.target.value),children:[(0,a.jsx)("option",{value:"evm",children:"EVM"}),(0,a.jsx)("option",{value:"core",children:"Core"})]})]})]}),h&&(0,a.jsx)("p",{className:"text-sm text-slate-300",children:h}),(0,a.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,a.jsx)("button",{type:"button",className:"btn-secondary",onClick:t,children:"Close"}),(0,a.jsx)("button",{type:"button",className:"btn-primary",disabled:!l||j.isPending,onClick:()=>j.mutate(),children:j.isPending?"Sending…":"Fund"})]})]})})}function j(){let[e,t]=(0,r.useState)(!1),[s,c]=(0,r.useState)(!1),{data:n=[],isLoading:i}=(0,l.a)({queryKey:["accounts"],queryFn:m.SX.list}),{data:d}=(0,l.a)({queryKey:["accounts","faucet"],queryFn:m.SX.faucet});return(0,a.jsxs)("div",{className:"space-y-6",children:[s&&(0,a.jsx)(p,{onClose:()=>c(!1)}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-xl font-semibold text-white",children:"Accounts"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-slate-400",children:"Pre-funded development accounts"})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)("button",{type:"button",className:"btn-secondary",onClick:()=>t(e=>!e),title:"Toggle private key visibility",children:[e?(0,a.jsx)(o.Z,{className:"h-4 w-4"}):(0,a.jsx)(x.Z,{className:"h-4 w-4"}),"Keys"]}),(0,a.jsxs)("button",{type:"button",className:"btn-primary",onClick:()=>c(!0),children:[(0,a.jsx)(u.Z,{className:"h-4 w-4"})," Fund"]})]})]}),d&&(0,a.jsxs)("div",{className:"card",children:[(0,a.jsx)("div",{className:"mb-2 text-xs font-medium uppercase tracking-wider text-slate-500",children:"Faucet Account"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-xs text-slate-500",children:"Core"}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"truncate text-xs text-blue-300",children:d.coreAddress}),(0,a.jsx)(h,{text:d.coreAddress})]}),(0,a.jsxs)("div",{className:"text-sm text-slate-300",children:[d.coreBalance," CFX"]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-xs text-slate-500",children:"EVM"}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"truncate text-xs text-blue-300",children:d.evmAddress}),(0,a.jsx)(h,{text:d.evmAddress})]}),(0,a.jsxs)("div",{className:"text-sm text-slate-300",children:[d.evmBalance," CFX"]})]})]})]}),i?(0,a.jsx)("p",{className:"text-sm text-slate-500",children:"Loading…"}):(0,a.jsx)("div",{className:"overflow-x-auto rounded-lg border border-[#2a3147]",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{className:"bg-[#161b27] text-xs uppercase tracking-wider text-slate-500",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"#"}),(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"Core Address"}),(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"EVM Address"}),(0,a.jsx)("th",{className:"px-4 py-2 text-right",children:"Core Balance"}),(0,a.jsx)("th",{className:"px-4 py-2 text-right",children:"EVM Balance"}),e&&(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"Private Key"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-[#2a3147]",children:n.map(t=>(0,a.jsxs)("tr",{className:"bg-[#0e1117] transition-colors hover:bg-[#161b27]",children:[(0,a.jsx)("td",{className:"px-4 py-2 text-slate-500",children:t.index}),(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"max-w-[200px] truncate text-xs text-blue-300",children:t.coreAddress}),(0,a.jsx)(h,{text:t.coreAddress})]})}),(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"max-w-[160px] truncate text-xs text-blue-300",children:t.evmAddress}),(0,a.jsx)(h,{text:t.evmAddress})]})}),(0,a.jsx)("td",{className:"px-4 py-2 text-right text-slate-300",children:t.coreBalance}),(0,a.jsx)("td",{className:"px-4 py-2 text-right text-slate-300",children:t.evmBalance}),e&&(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"max-w-[140px] truncate text-xs text-slate-400",children:t.privateKey}),(0,a.jsx)(h,{text:t.privateKey})]})})]},t.index))})]})})]})}},8144:function(e,t,s){"use strict";s.d(t,{N9:function(){return x},SC:function(){return j},SX:function(){return u},Vp:function(){return m},fA:function(){return p},mI:function(){return h},pJ:function(){return y}});var a,c=s(2608);let n="".concat(null!==(a=c.env.NEXT_PUBLIC_API_URL)&&void 0!==a?a:"","/api");async function l(e,t,s){let a=await fetch("".concat(n).concat(t),{method:e,headers:s?{"Content-Type":"application/json"}:void 0,body:s?JSON.stringify(s):void 0});if(!a.ok){var c;throw Error(null!==(c=(await a.json().catch(()=>({error:a.statusText}))).error)&&void 0!==c?c:a.statusText)}return a.json()}let r=e=>l("GET",e),i=(e,t)=>l("POST",e,t),d=e=>l("DELETE",e),o=(e,t)=>l("PUT",e,t),x={status:()=>r("/node/status"),start:()=>i("/node/start"),stop:()=>i("/node/stop"),restart:()=>i("/node/restart"),restartWipe:()=>i("/node/restart-wipe"),wipe:()=>i("/node/wipe")},u={list:()=>r("/accounts"),faucet:()=>r("/accounts/faucet"),fund:(e,t,s)=>i("/accounts/fund",{address:e,amount:t,chain:s})},m={templates:()=>r("/contracts/templates"),template:e=>r("/contracts/templates/".concat(e)),compile:(e,t)=>i("/contracts/compile",{source:e,contractName:t}),deploy:e=>i("/contracts/deploy",e),deployed:e=>r("/contracts/deployed".concat(e?"?chain=".concat(e):"")),deleteDeployed:e=>d("/contracts/deployed/".concat(e)),call:(e,t,s,a)=>i("/contracts/".concat(e,"/call"),{functionName:t,args:s,accountIndex:a})},h={status:()=>r("/mining/status"),mine:e=>i("/mining/mine",{blocks:e}),start:e=>i("/mining/start",{intervalMs:e}),stop:()=>i("/mining/stop")},p={config:()=>r("/network/config"),updateConfig:e=>o("/network/config",e),rpcUrls:()=>r("/network/rpc-urls")},j={status:()=>r("/keystore/status"),generate:()=>i("/keystore/generate"),setup:e=>i("/keystore/setup",e),unlock:e=>i("/keystore/unlock",{password:e}),lock:()=>i("/keystore/lock"),wallets:()=>r("/keystore/wallets"),addWallet:(e,t)=>i("/keystore/wallets",{mnemonic:e,label:t}),activateWallet:e=>i("/keystore/wallets/".concat(e,"/activate")),deleteWallet:e=>d("/keystore/wallets/".concat(e))},y={get:()=>r("/settings")}},9928:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("CheckCheck",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]])},3264:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},6804:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("Droplets",[["path",{d:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z",key:"1ptgy4"}],["path",{d:"M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97",key:"1sl1rz"}]])},7201:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},3948:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])}},function(e){e.O(0,[363,285,749,744],function(){return e(e.s=2929)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[423],{2929:function(e,t,s){Promise.resolve().then(s.bind(s,7691))},7691:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return j}});var a=s(5853),c=s(4852),n=s(6632),l=s(8990),r=s(9928),i=s(3264),d=s(7201),o=s(3948),x=s(6804),u=s(4254),m=s(8144);function h(e){let{text:t}=e,[s,c]=(0,u.useState)(!1);return(0,a.jsx)("button",{type:"button",title:"Copy",className:"rounded p-0.5 text-slate-500 hover:text-slate-300",onClick:async()=>{await navigator.clipboard.writeText(t),c(!0),setTimeout(()=>c(!1),1500)},children:s?(0,a.jsx)(r.Z,{className:"h-3 w-3 text-green-400"}):(0,a.jsx)(i.Z,{className:"h-3 w-3"})})}function p(e){let{onClose:t}=e,s=(0,c.NL)(),[l,r]=(0,u.useState)(""),[i,d]=(0,u.useState)(""),[o,x]=(0,u.useState)("evm"),[h,p]=(0,u.useState)(""),j=(0,n.D)({mutationFn:()=>m.SX.fund(l,i||void 0,o),onSuccess:e=>{p("✓ tx: ".concat(e.txHash)),s.invalidateQueries({queryKey:["accounts"]})},onError:e=>p("✗ ".concat(e.message))});return(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4",children:(0,a.jsxs)("div",{className:"card w-full max-w-md space-y-4",children:[(0,a.jsx)("h2",{className:"font-medium text-white",children:"Fund Address"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"label",children:"Address"}),(0,a.jsx)("input",{className:"input",value:l,onChange:e=>r(e.target.value),placeholder:"0x… or cfx:…"})]}),(0,a.jsxs)("div",{className:"flex gap-3",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"label",children:"Amount (optional)"}),(0,a.jsx)("input",{className:"input",value:i,onChange:e=>d(e.target.value),placeholder:"1000"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"label",children:"Chain"}),(0,a.jsxs)("select",{className:"input",value:o,onChange:e=>x(e.target.value),children:[(0,a.jsx)("option",{value:"evm",children:"EVM"}),(0,a.jsx)("option",{value:"core",children:"Core"})]})]})]}),h&&(0,a.jsx)("p",{className:"text-sm text-slate-300",children:h}),(0,a.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,a.jsx)("button",{type:"button",className:"btn-secondary",onClick:t,children:"Close"}),(0,a.jsx)("button",{type:"button",className:"btn-primary",disabled:!l||j.isPending,onClick:()=>j.mutate(),children:j.isPending?"Sending…":"Fund"})]})]})})}function j(){let[e,t]=(0,u.useState)(!1),[s,c]=(0,u.useState)(!1),{data:n=[],isLoading:r}=(0,l.a)({queryKey:["accounts"],queryFn:m.SX.list}),{data:i}=(0,l.a)({queryKey:["accounts","faucet"],queryFn:m.SX.faucet});return(0,a.jsxs)("div",{className:"space-y-6",children:[s&&(0,a.jsx)(p,{onClose:()=>c(!1)}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-xl font-semibold text-white",children:"Accounts"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-slate-400",children:"Pre-funded development accounts"})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)("button",{type:"button",className:"btn-secondary",onClick:()=>t(e=>!e),title:"Toggle private key visibility",children:[e?(0,a.jsx)(d.Z,{className:"h-4 w-4"}):(0,a.jsx)(o.Z,{className:"h-4 w-4"}),"Keys"]}),(0,a.jsxs)("button",{type:"button",className:"btn-primary",onClick:()=>c(!0),children:[(0,a.jsx)(x.Z,{className:"h-4 w-4"})," Fund"]})]})]}),i&&(0,a.jsxs)("div",{className:"card",children:[(0,a.jsx)("div",{className:"mb-2 text-xs font-medium uppercase tracking-wider text-slate-500",children:"Faucet Account"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-xs text-slate-500",children:"Core"}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"truncate text-xs text-blue-300",children:i.coreAddress}),(0,a.jsx)(h,{text:i.coreAddress})]}),(0,a.jsxs)("div",{className:"text-sm text-slate-300",children:[i.coreBalance," CFX"]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-xs text-slate-500",children:"EVM"}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"truncate text-xs text-blue-300",children:i.evmAddress}),(0,a.jsx)(h,{text:i.evmAddress})]}),(0,a.jsxs)("div",{className:"text-sm text-slate-300",children:[i.evmBalance," CFX"]})]})]})]}),r?(0,a.jsx)("p",{className:"text-sm text-slate-500",children:"Loading…"}):(0,a.jsx)("div",{className:"overflow-x-auto rounded-lg border border-[#2a3147]",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{className:"bg-[#161b27] text-xs uppercase tracking-wider text-slate-500",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"#"}),(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"Core Address"}),(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"EVM Address"}),(0,a.jsx)("th",{className:"px-4 py-2 text-right",children:"Core Balance"}),(0,a.jsx)("th",{className:"px-4 py-2 text-right",children:"EVM Balance"}),e&&(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"Private Key"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-[#2a3147]",children:n.map(t=>(0,a.jsxs)("tr",{className:"bg-[#0e1117] transition-colors hover:bg-[#161b27]",children:[(0,a.jsx)("td",{className:"px-4 py-2 text-slate-500",children:t.index}),(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"max-w-[200px] truncate text-xs text-blue-300",children:t.coreAddress}),(0,a.jsx)(h,{text:t.coreAddress})]})}),(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"max-w-[160px] truncate text-xs text-blue-300",children:t.evmAddress}),(0,a.jsx)(h,{text:t.evmAddress})]})}),(0,a.jsx)("td",{className:"px-4 py-2 text-right text-slate-300",children:t.coreBalance}),(0,a.jsx)("td",{className:"px-4 py-2 text-right text-slate-300",children:t.evmBalance}),e&&(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"max-w-[140px] truncate text-xs text-slate-400",children:t.privateKey}),(0,a.jsx)(h,{text:t.privateKey})]})})]},t.index))})]})})]})}},8144:function(e,t,s){"use strict";s.d(t,{N9:function(){return u},SC:function(){return y},SX:function(){return m},Vp:function(){return h},fA:function(){return j},mI:function(){return p},pJ:function(){return f}});var a,c=s(2608);let n="".concat(null!==(a=c.env.NEXT_PUBLIC_API_URL)&&void 0!==a?a:"","/api");async function l(e,t,s){let a=await fetch("".concat(n).concat(t),{method:e,headers:s?{"Content-Type":"application/json"}:void 0,body:s?JSON.stringify(s):void 0});if(!a.ok){var c;throw Error(null!==(c=(await a.json().catch(()=>({error:a.statusText}))).error)&&void 0!==c?c:a.statusText)}return a.json()}let r=e=>l("GET",e),i=(e,t)=>l("POST",e,t),d=e=>l("DELETE",e),o=(e,t)=>l("PUT",e,t),x=(e,t)=>l("PATCH",e,t),u={status:()=>r("/node/status"),start:()=>i("/node/start"),stop:()=>i("/node/stop"),restart:()=>i("/node/restart"),restartWipe:()=>i("/node/restart-wipe"),wipe:()=>i("/node/wipe")},m={list:()=>r("/accounts"),faucet:()=>r("/accounts/faucet"),fund:(e,t,s)=>i("/accounts/fund",{address:e,amount:t,chain:s})},h={templates:()=>r("/contracts/templates"),template:e=>r("/contracts/templates/".concat(e)),compile:(e,t)=>i("/contracts/compile",{source:e,contractName:t}),deploy:e=>i("/contracts/deploy",e),deployed:e=>r("/contracts/deployed".concat(e?"?chain=".concat(e):"")),deleteDeployed:e=>d("/contracts/deployed/".concat(e)),call:(e,t,s,a)=>i("/contracts/".concat(e,"/call"),{functionName:t,args:s,accountIndex:a})},p={status:()=>r("/mining/status"),mine:e=>i("/mining/mine",{blocks:e}),start:e=>i("/mining/start",{intervalMs:e}),stop:()=>i("/mining/stop")},j={config:()=>r("/network/config"),updateConfig:e=>o("/network/config",e),rpcUrls:()=>r("/network/rpc-urls")},y={status:()=>r("/keystore/status"),generate:()=>i("/keystore/generate"),setup:e=>i("/keystore/setup",e),unlock:e=>i("/keystore/unlock",{password:e}),lock:()=>i("/keystore/lock"),wallets:()=>r("/keystore/wallets"),addWallet:(e,t)=>i("/keystore/wallets",{mnemonic:e,label:t}),activateWallet:e=>i("/keystore/wallets/".concat(e,"/activate")),renameWallet:(e,t)=>x("/keystore/wallets/".concat(e),{label:t}),deleteWallet:e=>d("/keystore/wallets/".concat(e))},f={get:()=>r("/settings")}},9928:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("CheckCheck",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]])},3264:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},6804:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("Droplets",[["path",{d:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z",key:"1ptgy4"}],["path",{d:"M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97",key:"1sl1rz"}]])},7201:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},3948:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])}},function(e){e.O(0,[363,285,749,744],function(){return e(e.s=2929)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[423],{2929:function(e,t,s){Promise.resolve().then(s.bind(s,5131))},5131:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return y}});var a=s(5853),c=s(4852),l=s(6632),n=s(8990),r=s(4254),i=s(9928),d=s(3264),x=s(3035);let o=(0,x.Z)("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),u=(0,x.Z)("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),m=(0,x.Z)("Droplets",[["path",{d:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z",key:"1ptgy4"}],["path",{d:"M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97",key:"1sl1rz"}]]);var h=s(8144);function p(e){let{text:t}=e,[s,c]=(0,r.useState)(!1);return(0,a.jsx)("button",{type:"button",title:"Copy",className:"rounded p-0.5 text-slate-500 hover:text-slate-300",onClick:async()=>{await navigator.clipboard.writeText(t),c(!0),setTimeout(()=>c(!1),1500)},children:s?(0,a.jsx)(i.Z,{className:"h-3 w-3 text-green-400"}):(0,a.jsx)(d.Z,{className:"h-3 w-3"})})}function j(e){let{onClose:t}=e,s=(0,c.NL)(),[n,i]=(0,r.useState)(""),[d,x]=(0,r.useState)(""),[o,u]=(0,r.useState)("evm"),[m,p]=(0,r.useState)(""),j=(0,l.D)({mutationFn:()=>h.SX.fund(n,d||void 0,o),onSuccess:e=>{p("✓ tx: ".concat(e.txHash)),s.invalidateQueries({queryKey:["accounts"]})},onError:e=>p("✗ ".concat(e.message))});return(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4",children:(0,a.jsxs)("div",{className:"card w-full max-w-md space-y-4",children:[(0,a.jsx)("h2",{className:"font-medium text-white",children:"Fund Address"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"label",children:"Address"}),(0,a.jsx)("input",{className:"input",value:n,onChange:e=>i(e.target.value),placeholder:"0x… or cfx:…"})]}),(0,a.jsxs)("div",{className:"flex gap-3",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"label",children:"Amount (optional)"}),(0,a.jsx)("input",{className:"input",value:d,onChange:e=>x(e.target.value),placeholder:"1000"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"label",children:"Chain"}),(0,a.jsxs)("select",{className:"input",value:o,onChange:e=>u(e.target.value),children:[(0,a.jsx)("option",{value:"evm",children:"EVM"}),(0,a.jsx)("option",{value:"core",children:"Core"})]})]})]}),m&&(0,a.jsx)("p",{className:"text-sm text-slate-300",children:m}),(0,a.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,a.jsx)("button",{type:"button",className:"btn-secondary",onClick:t,children:"Close"}),(0,a.jsx)("button",{type:"button",className:"btn-primary",disabled:!n||j.isPending,onClick:()=>j.mutate(),children:j.isPending?"Sending…":"Fund"})]})]})})}function y(){let[e,t]=(0,r.useState)(!1),[s,c]=(0,r.useState)(!1),{data:l=[],isLoading:i}=(0,n.a)({queryKey:["accounts"],queryFn:h.SX.list}),{data:d}=(0,n.a)({queryKey:["accounts","faucet"],queryFn:h.SX.faucet});return(0,a.jsxs)("div",{className:"space-y-6",children:[s&&(0,a.jsx)(j,{onClose:()=>c(!1)}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-xl font-semibold text-white",children:"Accounts"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-slate-400",children:"Pre-funded development accounts"})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)("button",{type:"button",className:"btn-secondary",onClick:()=>t(e=>!e),title:"Toggle private key visibility",children:[e?(0,a.jsx)(o,{className:"h-4 w-4"}):(0,a.jsx)(u,{className:"h-4 w-4"}),"Keys"]}),(0,a.jsxs)("button",{type:"button",className:"btn-primary",onClick:()=>c(!0),children:[(0,a.jsx)(m,{className:"h-4 w-4"})," Fund"]})]})]}),d&&(0,a.jsxs)("div",{className:"card",children:[(0,a.jsx)("div",{className:"mb-2 text-xs font-medium uppercase tracking-wider text-slate-500",children:"Faucet Account"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-xs text-slate-500",children:"Core"}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"truncate text-xs text-blue-300",children:d.coreAddress}),(0,a.jsx)(p,{text:d.coreAddress})]}),(0,a.jsxs)("div",{className:"text-sm text-slate-300",children:[d.coreBalance," CFX"]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-xs text-slate-500",children:"EVM"}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"truncate text-xs text-blue-300",children:d.evmAddress}),(0,a.jsx)(p,{text:d.evmAddress})]}),(0,a.jsxs)("div",{className:"text-sm text-slate-300",children:[d.evmBalance," CFX"]})]})]})]}),i?(0,a.jsx)("p",{className:"text-sm text-slate-500",children:"Loading…"}):(0,a.jsx)("div",{className:"overflow-x-auto rounded-lg border border-[#2a3147]",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{className:"bg-[#161b27] text-xs uppercase tracking-wider text-slate-500",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"#"}),(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"Core Address"}),(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"EVM Address"}),(0,a.jsx)("th",{className:"px-4 py-2 text-right",children:"Core Balance"}),(0,a.jsx)("th",{className:"px-4 py-2 text-right",children:"EVM Balance"}),e&&(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"Private Key"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-[#2a3147]",children:l.map(t=>(0,a.jsxs)("tr",{className:"bg-[#0e1117] transition-colors hover:bg-[#161b27]",children:[(0,a.jsx)("td",{className:"px-4 py-2 text-slate-500",children:t.index}),(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"max-w-[200px] truncate text-xs text-blue-300",children:t.coreAddress}),(0,a.jsx)(p,{text:t.coreAddress})]})}),(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"max-w-[160px] truncate text-xs text-blue-300",children:t.evmAddress}),(0,a.jsx)(p,{text:t.evmAddress})]})}),(0,a.jsx)("td",{className:"px-4 py-2 text-right text-slate-300",children:t.coreBalance}),(0,a.jsx)("td",{className:"px-4 py-2 text-right text-slate-300",children:t.evmBalance}),e&&(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"max-w-[140px] truncate text-xs text-slate-400",children:t.privateKey}),(0,a.jsx)(p,{text:t.privateKey})]})})]},t.index))})]})})]})}},8144:function(e,t,s){"use strict";async function a(e,t,s){let a=await fetch("".concat("/api").concat(t),{method:e,headers:s?{"Content-Type":"application/json"}:void 0,body:s?JSON.stringify(s):void 0});if(!a.ok){var c;throw Error(null!==(c=(await a.json().catch(()=>({error:a.statusText}))).error)&&void 0!==c?c:a.statusText)}return a.json()}s.d(t,{N9:function(){return i},SC:function(){return m},SX:function(){return d},Vp:function(){return x},fA:function(){return u},mI:function(){return o}});let c=e=>a("GET",e),l=(e,t)=>a("POST",e,t),n=(e,t)=>a("PUT",e,t),r=e=>a("DELETE",e),i={status:()=>c("/node/status"),start:()=>l("/node/start"),stop:()=>l("/node/stop"),restart:()=>l("/node/restart")},d={list:()=>c("/accounts"),faucet:()=>c("/accounts/faucet"),fund:(e,t,s)=>l("/accounts/fund",{address:e,amount:t,chain:s})},x={templates:()=>c("/contracts/templates"),template:e=>c("/contracts/templates/".concat(e)),compile:(e,t)=>l("/contracts/compile",{source:e,contractName:t}),deploy:e=>l("/contracts/deploy",e)},o={status:()=>c("/mining/status"),mine:e=>l("/mining/mine",{blocks:e}),start:e=>l("/mining/start",{intervalMs:e}),stop:()=>l("/mining/stop")},u={config:()=>c("/network/config"),updateConfig:e=>n("/network/config",e),rpcUrls:()=>c("/network/rpc-urls")},m={status:()=>c("/keystore/status"),generate:()=>l("/keystore/generate"),setup:e=>l("/keystore/setup",e),unlock:e=>l("/keystore/unlock",{password:e}),lock:()=>l("/keystore/lock"),wallets:()=>c("/keystore/wallets"),addWallet:(e,t)=>l("/keystore/wallets",{mnemonic:e,label:t}),activateWallet:e=>l("/keystore/wallets/".concat(e,"/activate")),deleteWallet:e=>r("/keystore/wallets/".concat(e))}},9928:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("CheckCheck",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]])},3264:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])}},function(e){e.O(0,[383,815,285,749,744],function(){return e(e.s=2929)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[423],{2929:function(e,t,s){Promise.resolve().then(s.bind(s,7691))},7691:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return j}});var a=s(5853),c=s(4852),n=s(6632),l=s(8990),r=s(4254),i=s(9928),d=s(3264),o=s(7201),x=s(3948),u=s(6804),m=s(8144);function h(e){let{text:t}=e,[s,c]=(0,r.useState)(!1);return(0,a.jsx)("button",{type:"button",title:"Copy",className:"rounded p-0.5 text-slate-500 hover:text-slate-300",onClick:async()=>{await navigator.clipboard.writeText(t),c(!0),setTimeout(()=>c(!1),1500)},children:s?(0,a.jsx)(i.Z,{className:"h-3 w-3 text-green-400"}):(0,a.jsx)(d.Z,{className:"h-3 w-3"})})}function p(e){let{onClose:t}=e,s=(0,c.NL)(),[l,i]=(0,r.useState)(""),[d,o]=(0,r.useState)(""),[x,u]=(0,r.useState)("evm"),[h,p]=(0,r.useState)(""),j=(0,n.D)({mutationFn:()=>m.SX.fund(l,d||void 0,x),onSuccess:e=>{p("✓ tx: ".concat(e.txHash)),s.invalidateQueries({queryKey:["accounts"]})},onError:e=>p("✗ ".concat(e.message))});return(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4",children:(0,a.jsxs)("div",{className:"card w-full max-w-md space-y-4",children:[(0,a.jsx)("h2",{className:"font-medium text-white",children:"Fund Address"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"label",children:"Address"}),(0,a.jsx)("input",{className:"input",value:l,onChange:e=>i(e.target.value),placeholder:"0x… or cfx:…"})]}),(0,a.jsxs)("div",{className:"flex gap-3",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"label",children:"Amount (optional)"}),(0,a.jsx)("input",{className:"input",value:d,onChange:e=>o(e.target.value),placeholder:"1000"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"label",children:"Chain"}),(0,a.jsxs)("select",{className:"input",value:x,onChange:e=>u(e.target.value),children:[(0,a.jsx)("option",{value:"evm",children:"EVM"}),(0,a.jsx)("option",{value:"core",children:"Core"})]})]})]}),h&&(0,a.jsx)("p",{className:"text-sm text-slate-300",children:h}),(0,a.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,a.jsx)("button",{type:"button",className:"btn-secondary",onClick:t,children:"Close"}),(0,a.jsx)("button",{type:"button",className:"btn-primary",disabled:!l||j.isPending,onClick:()=>j.mutate(),children:j.isPending?"Sending…":"Fund"})]})]})})}function j(){let[e,t]=(0,r.useState)(!1),[s,c]=(0,r.useState)(!1),{data:n=[],isLoading:i}=(0,l.a)({queryKey:["accounts"],queryFn:m.SX.list}),{data:d}=(0,l.a)({queryKey:["accounts","faucet"],queryFn:m.SX.faucet});return(0,a.jsxs)("div",{className:"space-y-6",children:[s&&(0,a.jsx)(p,{onClose:()=>c(!1)}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-xl font-semibold text-white",children:"Accounts"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-slate-400",children:"Pre-funded development accounts"})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)("button",{type:"button",className:"btn-secondary",onClick:()=>t(e=>!e),title:"Toggle private key visibility",children:[e?(0,a.jsx)(o.Z,{className:"h-4 w-4"}):(0,a.jsx)(x.Z,{className:"h-4 w-4"}),"Keys"]}),(0,a.jsxs)("button",{type:"button",className:"btn-primary",onClick:()=>c(!0),children:[(0,a.jsx)(u.Z,{className:"h-4 w-4"})," Fund"]})]})]}),d&&(0,a.jsxs)("div",{className:"card",children:[(0,a.jsx)("div",{className:"mb-2 text-xs font-medium uppercase tracking-wider text-slate-500",children:"Faucet Account"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-xs text-slate-500",children:"Core"}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"truncate text-xs text-blue-300",children:d.coreAddress}),(0,a.jsx)(h,{text:d.coreAddress})]}),(0,a.jsxs)("div",{className:"text-sm text-slate-300",children:[d.coreBalance," CFX"]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-xs text-slate-500",children:"EVM"}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"truncate text-xs text-blue-300",children:d.evmAddress}),(0,a.jsx)(h,{text:d.evmAddress})]}),(0,a.jsxs)("div",{className:"text-sm text-slate-300",children:[d.evmBalance," CFX"]})]})]})]}),i?(0,a.jsx)("p",{className:"text-sm text-slate-500",children:"Loading…"}):(0,a.jsx)("div",{className:"overflow-x-auto rounded-lg border border-[#2a3147]",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{className:"bg-[#161b27] text-xs uppercase tracking-wider text-slate-500",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"#"}),(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"Core Address"}),(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"EVM Address"}),(0,a.jsx)("th",{className:"px-4 py-2 text-right",children:"Core Balance"}),(0,a.jsx)("th",{className:"px-4 py-2 text-right",children:"EVM Balance"}),e&&(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"Private Key"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-[#2a3147]",children:n.map(t=>(0,a.jsxs)("tr",{className:"bg-[#0e1117] transition-colors hover:bg-[#161b27]",children:[(0,a.jsx)("td",{className:"px-4 py-2 text-slate-500",children:t.index}),(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"max-w-[200px] truncate text-xs text-blue-300",children:t.coreAddress}),(0,a.jsx)(h,{text:t.coreAddress})]})}),(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"max-w-[160px] truncate text-xs text-blue-300",children:t.evmAddress}),(0,a.jsx)(h,{text:t.evmAddress})]})}),(0,a.jsx)("td",{className:"px-4 py-2 text-right text-slate-300",children:t.coreBalance}),(0,a.jsx)("td",{className:"px-4 py-2 text-right text-slate-300",children:t.evmBalance}),e&&(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"max-w-[140px] truncate text-xs text-slate-400",children:t.privateKey}),(0,a.jsx)(h,{text:t.privateKey})]})})]},t.index))})]})})]})}},8144:function(e,t,s){"use strict";s.d(t,{N9:function(){return x},SC:function(){return j},SX:function(){return u},Vp:function(){return m},fA:function(){return p},mI:function(){return h}});var a,c=s(2608);let n="".concat(null!==(a=c.env.NEXT_PUBLIC_API_URL)&&void 0!==a?a:"","/api");async function l(e,t,s){let a=await fetch("".concat(n).concat(t),{method:e,headers:s?{"Content-Type":"application/json"}:void 0,body:s?JSON.stringify(s):void 0});if(!a.ok){var c;throw Error(null!==(c=(await a.json().catch(()=>({error:a.statusText}))).error)&&void 0!==c?c:a.statusText)}return a.json()}let r=e=>l("GET",e),i=(e,t)=>l("POST",e,t),d=e=>l("DELETE",e),o=(e,t)=>l("PUT",e,t),x={status:()=>r("/node/status"),start:()=>i("/node/start"),stop:()=>i("/node/stop"),restart:()=>i("/node/restart"),restartWipe:()=>i("/node/restart-wipe")},u={list:()=>r("/accounts"),faucet:()=>r("/accounts/faucet"),fund:(e,t,s)=>i("/accounts/fund",{address:e,amount:t,chain:s})},m={templates:()=>r("/contracts/templates"),template:e=>r("/contracts/templates/".concat(e)),compile:(e,t)=>i("/contracts/compile",{source:e,contractName:t}),deploy:e=>i("/contracts/deploy",e),deployed:e=>r("/contracts/deployed".concat(e?"?chain=".concat(e):"")),deleteDeployed:e=>d("/contracts/deployed/".concat(e))},h={status:()=>r("/mining/status"),mine:e=>i("/mining/mine",{blocks:e}),start:e=>i("/mining/start",{intervalMs:e}),stop:()=>i("/mining/stop")},p={config:()=>r("/network/config"),updateConfig:e=>o("/network/config",e),rpcUrls:()=>r("/network/rpc-urls")},j={status:()=>r("/keystore/status"),generate:()=>i("/keystore/generate"),setup:e=>i("/keystore/setup",e),unlock:e=>i("/keystore/unlock",{password:e}),lock:()=>i("/keystore/lock"),wallets:()=>r("/keystore/wallets"),addWallet:(e,t)=>i("/keystore/wallets",{mnemonic:e,label:t}),activateWallet:e=>i("/keystore/wallets/".concat(e,"/activate")),deleteWallet:e=>d("/keystore/wallets/".concat(e))}},9928:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("CheckCheck",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]])},3264:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},6804:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("Droplets",[["path",{d:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z",key:"1ptgy4"}],["path",{d:"M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97",key:"1sl1rz"}]])},7201:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},3948:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])}},function(e){e.O(0,[363,285,749,744],function(){return e(e.s=2929)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[423],{2929:function(e,t,s){Promise.resolve().then(s.bind(s,7691))},7691:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return j}});var a=s(5853),c=s(4852),n=s(6632),l=s(8990),r=s(4254),i=s(9928),d=s(3264),x=s(7201),o=s(3948),u=s(6804),m=s(8144);function h(e){let{text:t}=e,[s,c]=(0,r.useState)(!1);return(0,a.jsx)("button",{type:"button",title:"Copy",className:"rounded p-0.5 text-slate-500 hover:text-slate-300",onClick:async()=>{await navigator.clipboard.writeText(t),c(!0),setTimeout(()=>c(!1),1500)},children:s?(0,a.jsx)(i.Z,{className:"h-3 w-3 text-green-400"}):(0,a.jsx)(d.Z,{className:"h-3 w-3"})})}function p(e){let{onClose:t}=e,s=(0,c.NL)(),[l,i]=(0,r.useState)(""),[d,x]=(0,r.useState)(""),[o,u]=(0,r.useState)("evm"),[h,p]=(0,r.useState)(""),j=(0,n.D)({mutationFn:()=>m.SX.fund(l,d||void 0,o),onSuccess:e=>{p("✓ tx: ".concat(e.txHash)),s.invalidateQueries({queryKey:["accounts"]})},onError:e=>p("✗ ".concat(e.message))});return(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4",children:(0,a.jsxs)("div",{className:"card w-full max-w-md space-y-4",children:[(0,a.jsx)("h2",{className:"font-medium text-white",children:"Fund Address"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"label",children:"Address"}),(0,a.jsx)("input",{className:"input",value:l,onChange:e=>i(e.target.value),placeholder:"0x… or cfx:…"})]}),(0,a.jsxs)("div",{className:"flex gap-3",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"label",children:"Amount (optional)"}),(0,a.jsx)("input",{className:"input",value:d,onChange:e=>x(e.target.value),placeholder:"1000"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"label",children:"Chain"}),(0,a.jsxs)("select",{className:"input",value:o,onChange:e=>u(e.target.value),children:[(0,a.jsx)("option",{value:"evm",children:"EVM"}),(0,a.jsx)("option",{value:"core",children:"Core"})]})]})]}),h&&(0,a.jsx)("p",{className:"text-sm text-slate-300",children:h}),(0,a.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,a.jsx)("button",{type:"button",className:"btn-secondary",onClick:t,children:"Close"}),(0,a.jsx)("button",{type:"button",className:"btn-primary",disabled:!l||j.isPending,onClick:()=>j.mutate(),children:j.isPending?"Sending…":"Fund"})]})]})})}function j(){let[e,t]=(0,r.useState)(!1),[s,c]=(0,r.useState)(!1),{data:n=[],isLoading:i}=(0,l.a)({queryKey:["accounts"],queryFn:m.SX.list}),{data:d}=(0,l.a)({queryKey:["accounts","faucet"],queryFn:m.SX.faucet});return(0,a.jsxs)("div",{className:"space-y-6",children:[s&&(0,a.jsx)(p,{onClose:()=>c(!1)}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-xl font-semibold text-white",children:"Accounts"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-slate-400",children:"Pre-funded development accounts"})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)("button",{type:"button",className:"btn-secondary",onClick:()=>t(e=>!e),title:"Toggle private key visibility",children:[e?(0,a.jsx)(x.Z,{className:"h-4 w-4"}):(0,a.jsx)(o.Z,{className:"h-4 w-4"}),"Keys"]}),(0,a.jsxs)("button",{type:"button",className:"btn-primary",onClick:()=>c(!0),children:[(0,a.jsx)(u.Z,{className:"h-4 w-4"})," Fund"]})]})]}),d&&(0,a.jsxs)("div",{className:"card",children:[(0,a.jsx)("div",{className:"mb-2 text-xs font-medium uppercase tracking-wider text-slate-500",children:"Faucet Account"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-xs text-slate-500",children:"Core"}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"truncate text-xs text-blue-300",children:d.coreAddress}),(0,a.jsx)(h,{text:d.coreAddress})]}),(0,a.jsxs)("div",{className:"text-sm text-slate-300",children:[d.coreBalance," CFX"]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-xs text-slate-500",children:"EVM"}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"truncate text-xs text-blue-300",children:d.evmAddress}),(0,a.jsx)(h,{text:d.evmAddress})]}),(0,a.jsxs)("div",{className:"text-sm text-slate-300",children:[d.evmBalance," CFX"]})]})]})]}),i?(0,a.jsx)("p",{className:"text-sm text-slate-500",children:"Loading…"}):(0,a.jsx)("div",{className:"overflow-x-auto rounded-lg border border-[#2a3147]",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{className:"bg-[#161b27] text-xs uppercase tracking-wider text-slate-500",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"#"}),(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"Core Address"}),(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"EVM Address"}),(0,a.jsx)("th",{className:"px-4 py-2 text-right",children:"Core Balance"}),(0,a.jsx)("th",{className:"px-4 py-2 text-right",children:"EVM Balance"}),e&&(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"Private Key"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-[#2a3147]",children:n.map(t=>(0,a.jsxs)("tr",{className:"bg-[#0e1117] transition-colors hover:bg-[#161b27]",children:[(0,a.jsx)("td",{className:"px-4 py-2 text-slate-500",children:t.index}),(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"max-w-[200px] truncate text-xs text-blue-300",children:t.coreAddress}),(0,a.jsx)(h,{text:t.coreAddress})]})}),(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"max-w-[160px] truncate text-xs text-blue-300",children:t.evmAddress}),(0,a.jsx)(h,{text:t.evmAddress})]})}),(0,a.jsx)("td",{className:"px-4 py-2 text-right text-slate-300",children:t.coreBalance}),(0,a.jsx)("td",{className:"px-4 py-2 text-right text-slate-300",children:t.evmBalance}),e&&(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"max-w-[140px] truncate text-xs text-slate-400",children:t.privateKey}),(0,a.jsx)(h,{text:t.privateKey})]})})]},t.index))})]})})]})}},8144:function(e,t,s){"use strict";s.d(t,{N9:function(){return o},SC:function(){return j},SX:function(){return u},Vp:function(){return m},fA:function(){return p},mI:function(){return h}});var a,c=s(2608);let n="".concat(null!==(a=c.env.NEXT_PUBLIC_API_URL)&&void 0!==a?a:"","/api");async function l(e,t,s){let a=await fetch("".concat(n).concat(t),{method:e,headers:s?{"Content-Type":"application/json"}:void 0,body:s?JSON.stringify(s):void 0});if(!a.ok){var c;throw Error(null!==(c=(await a.json().catch(()=>({error:a.statusText}))).error)&&void 0!==c?c:a.statusText)}return a.json()}let r=e=>l("GET",e),i=(e,t)=>l("POST",e,t),d=(e,t)=>l("PUT",e,t),x=e=>l("DELETE",e),o={status:()=>r("/node/status"),start:()=>i("/node/start"),stop:()=>i("/node/stop"),restart:()=>i("/node/restart")},u={list:()=>r("/accounts"),faucet:()=>r("/accounts/faucet"),fund:(e,t,s)=>i("/accounts/fund",{address:e,amount:t,chain:s})},m={templates:()=>r("/contracts/templates"),template:e=>r("/contracts/templates/".concat(e)),compile:(e,t)=>i("/contracts/compile",{source:e,contractName:t}),deploy:e=>i("/contracts/deploy",e)},h={status:()=>r("/mining/status"),mine:e=>i("/mining/mine",{blocks:e}),start:e=>i("/mining/start",{intervalMs:e}),stop:()=>i("/mining/stop")},p={config:()=>r("/network/config"),updateConfig:e=>d("/network/config",e),rpcUrls:()=>r("/network/rpc-urls")},j={status:()=>r("/keystore/status"),generate:()=>i("/keystore/generate"),setup:e=>i("/keystore/setup",e),unlock:e=>i("/keystore/unlock",{password:e}),lock:()=>i("/keystore/lock"),wallets:()=>r("/keystore/wallets"),addWallet:(e,t)=>i("/keystore/wallets",{mnemonic:e,label:t}),activateWallet:e=>i("/keystore/wallets/".concat(e,"/activate")),deleteWallet:e=>x("/keystore/wallets/".concat(e))}},9928:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("CheckCheck",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]])},3264:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},6804:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("Droplets",[["path",{d:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z",key:"1ptgy4"}],["path",{d:"M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97",key:"1sl1rz"}]])},7201:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},3948:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])}},function(e){e.O(0,[363,285,749,744],function(){return e(e.s=2929)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[423],{2929:function(e,t,s){Promise.resolve().then(s.bind(s,7691))},7691:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return j}});var a=s(5853),c=s(4852),n=s(6632),l=s(8990),r=s(4254),i=s(9928),d=s(3264),o=s(7201),x=s(3948),u=s(6804),m=s(8144);function h(e){let{text:t}=e,[s,c]=(0,r.useState)(!1);return(0,a.jsx)("button",{type:"button",title:"Copy",className:"rounded p-0.5 text-slate-500 hover:text-slate-300",onClick:async()=>{await navigator.clipboard.writeText(t),c(!0),setTimeout(()=>c(!1),1500)},children:s?(0,a.jsx)(i.Z,{className:"h-3 w-3 text-green-400"}):(0,a.jsx)(d.Z,{className:"h-3 w-3"})})}function p(e){let{onClose:t}=e,s=(0,c.NL)(),[l,i]=(0,r.useState)(""),[d,o]=(0,r.useState)(""),[x,u]=(0,r.useState)("evm"),[h,p]=(0,r.useState)(""),j=(0,n.D)({mutationFn:()=>m.SX.fund(l,d||void 0,x),onSuccess:e=>{p("✓ tx: ".concat(e.txHash)),s.invalidateQueries({queryKey:["accounts"]})},onError:e=>p("✗ ".concat(e.message))});return(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4",children:(0,a.jsxs)("div",{className:"card w-full max-w-md space-y-4",children:[(0,a.jsx)("h2",{className:"font-medium text-white",children:"Fund Address"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"label",children:"Address"}),(0,a.jsx)("input",{className:"input",value:l,onChange:e=>i(e.target.value),placeholder:"0x… or cfx:…"})]}),(0,a.jsxs)("div",{className:"flex gap-3",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"label",children:"Amount (optional)"}),(0,a.jsx)("input",{className:"input",value:d,onChange:e=>o(e.target.value),placeholder:"1000"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"label",children:"Chain"}),(0,a.jsxs)("select",{className:"input",value:x,onChange:e=>u(e.target.value),children:[(0,a.jsx)("option",{value:"evm",children:"EVM"}),(0,a.jsx)("option",{value:"core",children:"Core"})]})]})]}),h&&(0,a.jsx)("p",{className:"text-sm text-slate-300",children:h}),(0,a.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,a.jsx)("button",{type:"button",className:"btn-secondary",onClick:t,children:"Close"}),(0,a.jsx)("button",{type:"button",className:"btn-primary",disabled:!l||j.isPending,onClick:()=>j.mutate(),children:j.isPending?"Sending…":"Fund"})]})]})})}function j(){let[e,t]=(0,r.useState)(!1),[s,c]=(0,r.useState)(!1),{data:n=[],isLoading:i}=(0,l.a)({queryKey:["accounts"],queryFn:m.SX.list}),{data:d}=(0,l.a)({queryKey:["accounts","faucet"],queryFn:m.SX.faucet});return(0,a.jsxs)("div",{className:"space-y-6",children:[s&&(0,a.jsx)(p,{onClose:()=>c(!1)}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-xl font-semibold text-white",children:"Accounts"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-slate-400",children:"Pre-funded development accounts"})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)("button",{type:"button",className:"btn-secondary",onClick:()=>t(e=>!e),title:"Toggle private key visibility",children:[e?(0,a.jsx)(o.Z,{className:"h-4 w-4"}):(0,a.jsx)(x.Z,{className:"h-4 w-4"}),"Keys"]}),(0,a.jsxs)("button",{type:"button",className:"btn-primary",onClick:()=>c(!0),children:[(0,a.jsx)(u.Z,{className:"h-4 w-4"})," Fund"]})]})]}),d&&(0,a.jsxs)("div",{className:"card",children:[(0,a.jsx)("div",{className:"mb-2 text-xs font-medium uppercase tracking-wider text-slate-500",children:"Faucet Account"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-xs text-slate-500",children:"Core"}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"truncate text-xs text-blue-300",children:d.coreAddress}),(0,a.jsx)(h,{text:d.coreAddress})]}),(0,a.jsxs)("div",{className:"text-sm text-slate-300",children:[d.coreBalance," CFX"]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-xs text-slate-500",children:"EVM"}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"truncate text-xs text-blue-300",children:d.evmAddress}),(0,a.jsx)(h,{text:d.evmAddress})]}),(0,a.jsxs)("div",{className:"text-sm text-slate-300",children:[d.evmBalance," CFX"]})]})]})]}),i?(0,a.jsx)("p",{className:"text-sm text-slate-500",children:"Loading…"}):(0,a.jsx)("div",{className:"overflow-x-auto rounded-lg border border-[#2a3147]",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{className:"bg-[#161b27] text-xs uppercase tracking-wider text-slate-500",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"#"}),(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"Core Address"}),(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"EVM Address"}),(0,a.jsx)("th",{className:"px-4 py-2 text-right",children:"Core Balance"}),(0,a.jsx)("th",{className:"px-4 py-2 text-right",children:"EVM Balance"}),e&&(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"Private Key"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-[#2a3147]",children:n.map(t=>(0,a.jsxs)("tr",{className:"bg-[#0e1117] transition-colors hover:bg-[#161b27]",children:[(0,a.jsx)("td",{className:"px-4 py-2 text-slate-500",children:t.index}),(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"max-w-[200px] truncate text-xs text-blue-300",children:t.coreAddress}),(0,a.jsx)(h,{text:t.coreAddress})]})}),(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"max-w-[160px] truncate text-xs text-blue-300",children:t.evmAddress}),(0,a.jsx)(h,{text:t.evmAddress})]})}),(0,a.jsx)("td",{className:"px-4 py-2 text-right text-slate-300",children:t.coreBalance}),(0,a.jsx)("td",{className:"px-4 py-2 text-right text-slate-300",children:t.evmBalance}),e&&(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"max-w-[140px] truncate text-xs text-slate-400",children:t.privateKey}),(0,a.jsx)(h,{text:t.privateKey})]})})]},t.index))})]})})]})}},8144:function(e,t,s){"use strict";s.d(t,{N9:function(){return x},SC:function(){return j},SX:function(){return u},Vp:function(){return m},fA:function(){return p},mI:function(){return h}});var a,c=s(2608);let n="".concat(null!==(a=c.env.NEXT_PUBLIC_API_URL)&&void 0!==a?a:"","/api");async function l(e,t,s){let a=await fetch("".concat(n).concat(t),{method:e,headers:s?{"Content-Type":"application/json"}:void 0,body:s?JSON.stringify(s):void 0});if(!a.ok){var c;throw Error(null!==(c=(await a.json().catch(()=>({error:a.statusText}))).error)&&void 0!==c?c:a.statusText)}return a.json()}let r=e=>l("GET",e),i=(e,t)=>l("POST",e,t),d=e=>l("DELETE",e),o=(e,t)=>l("PUT",e,t),x={status:()=>r("/node/status"),start:()=>i("/node/start"),stop:()=>i("/node/stop"),restart:()=>i("/node/restart"),restartWipe:()=>i("/node/restart-wipe"),wipe:()=>i("/node/wipe")},u={list:()=>r("/accounts"),faucet:()=>r("/accounts/faucet"),fund:(e,t,s)=>i("/accounts/fund",{address:e,amount:t,chain:s})},m={templates:()=>r("/contracts/templates"),template:e=>r("/contracts/templates/".concat(e)),compile:(e,t)=>i("/contracts/compile",{source:e,contractName:t}),deploy:e=>i("/contracts/deploy",e),deployed:e=>r("/contracts/deployed".concat(e?"?chain=".concat(e):"")),deleteDeployed:e=>d("/contracts/deployed/".concat(e)),call:(e,t,s,a)=>i("/contracts/".concat(e,"/call"),{functionName:t,args:s,accountIndex:a})},h={status:()=>r("/mining/status"),mine:e=>i("/mining/mine",{blocks:e}),start:e=>i("/mining/start",{intervalMs:e}),stop:()=>i("/mining/stop")},p={config:()=>r("/network/config"),updateConfig:e=>o("/network/config",e),rpcUrls:()=>r("/network/rpc-urls")},j={status:()=>r("/keystore/status"),generate:()=>i("/keystore/generate"),setup:e=>i("/keystore/setup",e),unlock:e=>i("/keystore/unlock",{password:e}),lock:()=>i("/keystore/lock"),wallets:()=>r("/keystore/wallets"),addWallet:(e,t)=>i("/keystore/wallets",{mnemonic:e,label:t}),activateWallet:e=>i("/keystore/wallets/".concat(e,"/activate")),deleteWallet:e=>d("/keystore/wallets/".concat(e))}},9928:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("CheckCheck",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]])},3264:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},6804:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("Droplets",[["path",{d:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z",key:"1ptgy4"}],["path",{d:"M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97",key:"1sl1rz"}]])},7201:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},3948:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])}},function(e){e.O(0,[363,285,749,744],function(){return e(e.s=2929)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[423],{2929:function(e,t,s){Promise.resolve().then(s.bind(s,5131))},5131:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return y}});var a=s(5853),c=s(4852),l=s(6632),n=s(8990),r=s(4254),i=s(9928),d=s(3264),x=s(3035);let o=(0,x.Z)("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),u=(0,x.Z)("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),m=(0,x.Z)("Droplets",[["path",{d:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z",key:"1ptgy4"}],["path",{d:"M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97",key:"1sl1rz"}]]);var h=s(8144);function p(e){let{text:t}=e,[s,c]=(0,r.useState)(!1);return(0,a.jsx)("button",{type:"button",title:"Copy",className:"rounded p-0.5 text-slate-500 hover:text-slate-300",onClick:async()=>{await navigator.clipboard.writeText(t),c(!0),setTimeout(()=>c(!1),1500)},children:s?(0,a.jsx)(i.Z,{className:"h-3 w-3 text-green-400"}):(0,a.jsx)(d.Z,{className:"h-3 w-3"})})}function j(e){let{onClose:t}=e,s=(0,c.NL)(),[n,i]=(0,r.useState)(""),[d,x]=(0,r.useState)(""),[o,u]=(0,r.useState)("evm"),[m,p]=(0,r.useState)(""),j=(0,l.D)({mutationFn:()=>h.SX.fund(n,d||void 0,o),onSuccess:e=>{p("✓ tx: ".concat(e.txHash)),s.invalidateQueries({queryKey:["accounts"]})},onError:e=>p("✗ ".concat(e.message))});return(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4",children:(0,a.jsxs)("div",{className:"card w-full max-w-md space-y-4",children:[(0,a.jsx)("h2",{className:"font-medium text-white",children:"Fund Address"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"label",children:"Address"}),(0,a.jsx)("input",{className:"input",value:n,onChange:e=>i(e.target.value),placeholder:"0x… or cfx:…"})]}),(0,a.jsxs)("div",{className:"flex gap-3",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"label",children:"Amount (optional)"}),(0,a.jsx)("input",{className:"input",value:d,onChange:e=>x(e.target.value),placeholder:"1000"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"label",children:"Chain"}),(0,a.jsxs)("select",{className:"input",value:o,onChange:e=>u(e.target.value),children:[(0,a.jsx)("option",{value:"evm",children:"EVM"}),(0,a.jsx)("option",{value:"core",children:"Core"})]})]})]}),m&&(0,a.jsx)("p",{className:"text-sm text-slate-300",children:m}),(0,a.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,a.jsx)("button",{type:"button",className:"btn-secondary",onClick:t,children:"Close"}),(0,a.jsx)("button",{type:"button",className:"btn-primary",disabled:!n||j.isPending,onClick:()=>j.mutate(),children:j.isPending?"Sending…":"Fund"})]})]})})}function y(){let[e,t]=(0,r.useState)(!1),[s,c]=(0,r.useState)(!1),{data:l=[],isLoading:i}=(0,n.a)({queryKey:["accounts"],queryFn:h.SX.list}),{data:d}=(0,n.a)({queryKey:["accounts","faucet"],queryFn:h.SX.faucet});return(0,a.jsxs)("div",{className:"space-y-6",children:[s&&(0,a.jsx)(j,{onClose:()=>c(!1)}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-xl font-semibold text-white",children:"Accounts"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-slate-400",children:"Pre-funded development accounts"})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)("button",{type:"button",className:"btn-secondary",onClick:()=>t(e=>!e),title:"Toggle private key visibility",children:[e?(0,a.jsx)(o,{className:"h-4 w-4"}):(0,a.jsx)(u,{className:"h-4 w-4"}),"Keys"]}),(0,a.jsxs)("button",{type:"button",className:"btn-primary",onClick:()=>c(!0),children:[(0,a.jsx)(m,{className:"h-4 w-4"})," Fund"]})]})]}),d&&(0,a.jsxs)("div",{className:"card",children:[(0,a.jsx)("div",{className:"mb-2 text-xs font-medium uppercase tracking-wider text-slate-500",children:"Faucet Account"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-xs text-slate-500",children:"Core"}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"truncate text-xs text-blue-300",children:d.coreAddress}),(0,a.jsx)(p,{text:d.coreAddress})]}),(0,a.jsxs)("div",{className:"text-sm text-slate-300",children:[d.coreBalance," CFX"]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-xs text-slate-500",children:"EVM"}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"truncate text-xs text-blue-300",children:d.evmAddress}),(0,a.jsx)(p,{text:d.evmAddress})]}),(0,a.jsxs)("div",{className:"text-sm text-slate-300",children:[d.evmBalance," CFX"]})]})]})]}),i?(0,a.jsx)("p",{className:"text-sm text-slate-500",children:"Loading…"}):(0,a.jsx)("div",{className:"overflow-x-auto rounded-lg border border-[#2a3147]",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{className:"bg-[#161b27] text-xs uppercase tracking-wider text-slate-500",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"#"}),(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"Core Address"}),(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"EVM Address"}),(0,a.jsx)("th",{className:"px-4 py-2 text-right",children:"Core Balance"}),(0,a.jsx)("th",{className:"px-4 py-2 text-right",children:"EVM Balance"}),e&&(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"Private Key"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-[#2a3147]",children:l.map(t=>(0,a.jsxs)("tr",{className:"bg-[#0e1117] transition-colors hover:bg-[#161b27]",children:[(0,a.jsx)("td",{className:"px-4 py-2 text-slate-500",children:t.index}),(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"max-w-[200px] truncate text-xs text-blue-300",children:t.coreAddress}),(0,a.jsx)(p,{text:t.coreAddress})]})}),(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"max-w-[160px] truncate text-xs text-blue-300",children:t.evmAddress}),(0,a.jsx)(p,{text:t.evmAddress})]})}),(0,a.jsx)("td",{className:"px-4 py-2 text-right text-slate-300",children:t.coreBalance}),(0,a.jsx)("td",{className:"px-4 py-2 text-right text-slate-300",children:t.evmBalance}),e&&(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"max-w-[140px] truncate text-xs text-slate-400",children:t.privateKey}),(0,a.jsx)(p,{text:t.privateKey})]})})]},t.index))})]})})]})}},8144:function(e,t,s){"use strict";s.d(t,{N9:function(){return o},SC:function(){return j},SX:function(){return u},Vp:function(){return m},fA:function(){return p},mI:function(){return h}});var a,c=s(2608);let l="".concat(null!==(a=c.env.NEXT_PUBLIC_API_URL)&&void 0!==a?a:"","/api");async function n(e,t,s){let a=await fetch("".concat(l).concat(t),{method:e,headers:s?{"Content-Type":"application/json"}:void 0,body:s?JSON.stringify(s):void 0});if(!a.ok){var c;throw Error(null!==(c=(await a.json().catch(()=>({error:a.statusText}))).error)&&void 0!==c?c:a.statusText)}return a.json()}let r=e=>n("GET",e),i=(e,t)=>n("POST",e,t),d=(e,t)=>n("PUT",e,t),x=e=>n("DELETE",e),o={status:()=>r("/node/status"),start:()=>i("/node/start"),stop:()=>i("/node/stop"),restart:()=>i("/node/restart")},u={list:()=>r("/accounts"),faucet:()=>r("/accounts/faucet"),fund:(e,t,s)=>i("/accounts/fund",{address:e,amount:t,chain:s})},m={templates:()=>r("/contracts/templates"),template:e=>r("/contracts/templates/".concat(e)),compile:(e,t)=>i("/contracts/compile",{source:e,contractName:t}),deploy:e=>i("/contracts/deploy",e)},h={status:()=>r("/mining/status"),mine:e=>i("/mining/mine",{blocks:e}),start:e=>i("/mining/start",{intervalMs:e}),stop:()=>i("/mining/stop")},p={config:()=>r("/network/config"),updateConfig:e=>d("/network/config",e),rpcUrls:()=>r("/network/rpc-urls")},j={status:()=>r("/keystore/status"),generate:()=>i("/keystore/generate"),setup:e=>i("/keystore/setup",e),unlock:e=>i("/keystore/unlock",{password:e}),lock:()=>i("/keystore/lock"),wallets:()=>r("/keystore/wallets"),addWallet:(e,t)=>i("/keystore/wallets",{mnemonic:e,label:t}),activateWallet:e=>i("/keystore/wallets/".concat(e,"/activate")),deleteWallet:e=>x("/keystore/wallets/".concat(e))}},9928:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("CheckCheck",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]])},3264:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])}},function(e){e.O(0,[363,285,749,744],function(){return e(e.s=2929)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[423],{2929:function(e,t,s){Promise.resolve().then(s.bind(s,7691))},7691:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return j}});var a=s(5853),c=s(4852),n=s(6632),l=s(8990),r=s(4254),i=s(9928),d=s(3264),o=s(7201),x=s(3948),u=s(6804),m=s(8144);function h(e){let{text:t}=e,[s,c]=(0,r.useState)(!1);return(0,a.jsx)("button",{type:"button",title:"Copy",className:"rounded p-0.5 text-slate-500 hover:text-slate-300",onClick:async()=>{await navigator.clipboard.writeText(t),c(!0),setTimeout(()=>c(!1),1500)},children:s?(0,a.jsx)(i.Z,{className:"h-3 w-3 text-green-400"}):(0,a.jsx)(d.Z,{className:"h-3 w-3"})})}function p(e){let{onClose:t}=e,s=(0,c.NL)(),[l,i]=(0,r.useState)(""),[d,o]=(0,r.useState)(""),[x,u]=(0,r.useState)("evm"),[h,p]=(0,r.useState)(""),j=(0,n.D)({mutationFn:()=>m.SX.fund(l,d||void 0,x),onSuccess:e=>{p("✓ tx: ".concat(e.txHash)),s.invalidateQueries({queryKey:["accounts"]})},onError:e=>p("✗ ".concat(e.message))});return(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4",children:(0,a.jsxs)("div",{className:"card w-full max-w-md space-y-4",children:[(0,a.jsx)("h2",{className:"font-medium text-white",children:"Fund Address"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"label",children:"Address"}),(0,a.jsx)("input",{className:"input",value:l,onChange:e=>i(e.target.value),placeholder:"0x… or cfx:…"})]}),(0,a.jsxs)("div",{className:"flex gap-3",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"label",children:"Amount (optional)"}),(0,a.jsx)("input",{className:"input",value:d,onChange:e=>o(e.target.value),placeholder:"1000"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"label",children:"Chain"}),(0,a.jsxs)("select",{className:"input",value:x,onChange:e=>u(e.target.value),children:[(0,a.jsx)("option",{value:"evm",children:"EVM"}),(0,a.jsx)("option",{value:"core",children:"Core"})]})]})]}),h&&(0,a.jsx)("p",{className:"text-sm text-slate-300",children:h}),(0,a.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,a.jsx)("button",{type:"button",className:"btn-secondary",onClick:t,children:"Close"}),(0,a.jsx)("button",{type:"button",className:"btn-primary",disabled:!l||j.isPending,onClick:()=>j.mutate(),children:j.isPending?"Sending…":"Fund"})]})]})})}function j(){let[e,t]=(0,r.useState)(!1),[s,c]=(0,r.useState)(!1),{data:n=[],isLoading:i}=(0,l.a)({queryKey:["accounts"],queryFn:m.SX.list}),{data:d}=(0,l.a)({queryKey:["accounts","faucet"],queryFn:m.SX.faucet});return(0,a.jsxs)("div",{className:"space-y-6",children:[s&&(0,a.jsx)(p,{onClose:()=>c(!1)}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-xl font-semibold text-white",children:"Accounts"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-slate-400",children:"Pre-funded development accounts"})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)("button",{type:"button",className:"btn-secondary",onClick:()=>t(e=>!e),title:"Toggle private key visibility",children:[e?(0,a.jsx)(o.Z,{className:"h-4 w-4"}):(0,a.jsx)(x.Z,{className:"h-4 w-4"}),"Keys"]}),(0,a.jsxs)("button",{type:"button",className:"btn-primary",onClick:()=>c(!0),children:[(0,a.jsx)(u.Z,{className:"h-4 w-4"})," Fund"]})]})]}),d&&(0,a.jsxs)("div",{className:"card",children:[(0,a.jsx)("div",{className:"mb-2 text-xs font-medium uppercase tracking-wider text-slate-500",children:"Faucet Account"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-xs text-slate-500",children:"Core"}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"truncate text-xs text-blue-300",children:d.coreAddress}),(0,a.jsx)(h,{text:d.coreAddress})]}),(0,a.jsxs)("div",{className:"text-sm text-slate-300",children:[d.coreBalance," CFX"]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-xs text-slate-500",children:"EVM"}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"truncate text-xs text-blue-300",children:d.evmAddress}),(0,a.jsx)(h,{text:d.evmAddress})]}),(0,a.jsxs)("div",{className:"text-sm text-slate-300",children:[d.evmBalance," CFX"]})]})]})]}),i?(0,a.jsx)("p",{className:"text-sm text-slate-500",children:"Loading…"}):(0,a.jsx)("div",{className:"overflow-x-auto rounded-lg border border-[#2a3147]",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{className:"bg-[#161b27] text-xs uppercase tracking-wider text-slate-500",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"#"}),(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"Core Address"}),(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"EVM Address"}),(0,a.jsx)("th",{className:"px-4 py-2 text-right",children:"Core Balance"}),(0,a.jsx)("th",{className:"px-4 py-2 text-right",children:"EVM Balance"}),e&&(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"Private Key"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-[#2a3147]",children:n.map(t=>(0,a.jsxs)("tr",{className:"bg-[#0e1117] transition-colors hover:bg-[#161b27]",children:[(0,a.jsx)("td",{className:"px-4 py-2 text-slate-500",children:t.index}),(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"max-w-[200px] truncate text-xs text-blue-300",children:t.coreAddress}),(0,a.jsx)(h,{text:t.coreAddress})]})}),(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"max-w-[160px] truncate text-xs text-blue-300",children:t.evmAddress}),(0,a.jsx)(h,{text:t.evmAddress})]})}),(0,a.jsx)("td",{className:"px-4 py-2 text-right text-slate-300",children:t.coreBalance}),(0,a.jsx)("td",{className:"px-4 py-2 text-right text-slate-300",children:t.evmBalance}),e&&(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"max-w-[140px] truncate text-xs text-slate-400",children:t.privateKey}),(0,a.jsx)(h,{text:t.privateKey})]})})]},t.index))})]})})]})}},8144:function(e,t,s){"use strict";s.d(t,{N9:function(){return x},SC:function(){return j},SX:function(){return u},Vp:function(){return m},fA:function(){return p},mI:function(){return h}});var a,c=s(2608);let n="".concat(null!==(a=c.env.NEXT_PUBLIC_API_URL)&&void 0!==a?a:"","/api");async function l(e,t,s){let a=await fetch("".concat(n).concat(t),{method:e,headers:s?{"Content-Type":"application/json"}:void 0,body:s?JSON.stringify(s):void 0});if(!a.ok){var c;throw Error(null!==(c=(await a.json().catch(()=>({error:a.statusText}))).error)&&void 0!==c?c:a.statusText)}return a.json()}let r=e=>l("GET",e),i=(e,t)=>l("POST",e,t),d=e=>l("DELETE",e),o=(e,t)=>l("PUT",e,t),x={status:()=>r("/node/status"),start:()=>i("/node/start"),stop:()=>i("/node/stop"),restart:()=>i("/node/restart"),restartWipe:()=>i("/node/restart-wipe")},u={list:()=>r("/accounts"),faucet:()=>r("/accounts/faucet"),fund:(e,t,s)=>i("/accounts/fund",{address:e,amount:t,chain:s})},m={templates:()=>r("/contracts/templates"),template:e=>r("/contracts/templates/".concat(e)),compile:(e,t)=>i("/contracts/compile",{source:e,contractName:t}),deploy:e=>i("/contracts/deploy",e),deployed:e=>r("/contracts/deployed".concat(e?"?chain=".concat(e):"")),deleteDeployed:e=>d("/contracts/deployed/".concat(e)),call:(e,t,s,a)=>i("/contracts/".concat(e,"/call"),{functionName:t,args:s,accountIndex:a})},h={status:()=>r("/mining/status"),mine:e=>i("/mining/mine",{blocks:e}),start:e=>i("/mining/start",{intervalMs:e}),stop:()=>i("/mining/stop")},p={config:()=>r("/network/config"),updateConfig:e=>o("/network/config",e),rpcUrls:()=>r("/network/rpc-urls")},j={status:()=>r("/keystore/status"),generate:()=>i("/keystore/generate"),setup:e=>i("/keystore/setup",e),unlock:e=>i("/keystore/unlock",{password:e}),lock:()=>i("/keystore/lock"),wallets:()=>r("/keystore/wallets"),addWallet:(e,t)=>i("/keystore/wallets",{mnemonic:e,label:t}),activateWallet:e=>i("/keystore/wallets/".concat(e,"/activate")),deleteWallet:e=>d("/keystore/wallets/".concat(e))}},9928:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("CheckCheck",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]])},3264:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},6804:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("Droplets",[["path",{d:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z",key:"1ptgy4"}],["path",{d:"M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97",key:"1sl1rz"}]])},7201:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},3948:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])}},function(e){e.O(0,[363,285,749,744],function(){return e(e.s=2929)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[423],{2929:function(e,t,s){Promise.resolve().then(s.bind(s,7691))},7691:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return y}});var a=s(5853),c=s(4852),n=s(6632),l=s(8990),r=s(9928),i=s(3264),d=s(7201),o=s(3948),x=s(6804),u=s(4254),m=s(8144);function h(e){let{text:t}=e,[s,c]=(0,u.useState)(!1);return(0,a.jsx)("button",{type:"button",title:"Copy",className:"rounded p-0.5 text-slate-500 hover:text-slate-300",onClick:async()=>{await navigator.clipboard.writeText(t),c(!0),setTimeout(()=>c(!1),1500)},children:s?(0,a.jsx)(r.Z,{className:"h-3 w-3 text-green-400"}):(0,a.jsx)(i.Z,{className:"h-3 w-3"})})}function p(e){let{onClose:t}=e,s=(0,c.NL)(),[l,r]=(0,u.useState)(""),[i,d]=(0,u.useState)(""),[o,x]=(0,u.useState)("evm"),[h,p]=(0,u.useState)(""),y=(0,n.D)({mutationFn:()=>m.SX.fund(l,i||void 0,o),onSuccess:e=>{(null==e?void 0:e.confirmed)?p("✓ tx: ".concat(e.txHash," (confirmed)")):(null==e?void 0:e.txHash)?p("✓ tx: ".concat(e.txHash," (pending)")+((null==e?void 0:e.message)?" - ".concat(e.message):"")):p("Submitted"),s.invalidateQueries({queryKey:["accounts"]})},onError:e=>p("✗ ".concat(e.message))});return(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4",children:(0,a.jsxs)("div",{className:"card w-full max-w-md space-y-4",children:[(0,a.jsx)("h2",{className:"font-medium text-white",children:"Fund Address"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"label",children:"Address"}),(0,a.jsx)("input",{className:"input",value:l,onChange:e=>r(e.target.value),placeholder:"0x… or cfx:…"})]}),(0,a.jsxs)("div",{className:"flex gap-3",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"label",children:"Amount (optional)"}),(0,a.jsx)("input",{className:"input",value:i,onChange:e=>d(e.target.value),placeholder:"1000"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"label",children:"Chain"}),(0,a.jsxs)("select",{className:"input",value:o,onChange:e=>x(e.target.value),children:[(0,a.jsx)("option",{value:"evm",children:"EVM"}),(0,a.jsx)("option",{value:"core",children:"Core"})]})]})]}),h&&(0,a.jsx)("p",{className:"text-sm text-slate-300",children:h}),(0,a.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,a.jsx)("button",{type:"button",className:"btn-secondary",onClick:t,children:"Close"}),(0,a.jsx)("button",{type:"button",className:"btn-primary",disabled:!l||y.isPending,onClick:()=>y.mutate(),children:y.isPending?"Sending…":"Fund"})]})]})})}function y(){let[e,t]=(0,u.useState)(!1),[s,c]=(0,u.useState)(!1),{data:n=[],isLoading:r}=(0,l.a)({queryKey:["accounts"],queryFn:m.SX.list}),{data:i}=(0,l.a)({queryKey:["accounts","faucet"],queryFn:m.SX.faucet});return(0,a.jsxs)("div",{className:"space-y-6",children:[s&&(0,a.jsx)(p,{onClose:()=>c(!1)}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-xl font-semibold text-white",children:"Accounts"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-slate-400",children:"Pre-funded development accounts"})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)("button",{type:"button",className:"btn-secondary",onClick:()=>t(e=>!e),title:"Toggle private key visibility",children:[e?(0,a.jsx)(d.Z,{className:"h-4 w-4"}):(0,a.jsx)(o.Z,{className:"h-4 w-4"}),"Keys"]}),(0,a.jsxs)("button",{type:"button",className:"btn-primary",onClick:()=>c(!0),children:[(0,a.jsx)(x.Z,{className:"h-4 w-4"})," Fund"]})]})]}),i&&(0,a.jsxs)("div",{className:"card",children:[(0,a.jsx)("div",{className:"mb-2 text-xs font-medium uppercase tracking-wider text-slate-500",children:"Faucet Account"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-xs text-slate-500",children:"Core"}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"truncate text-xs text-blue-300",children:i.coreAddress}),(0,a.jsx)(h,{text:i.coreAddress})]}),(0,a.jsxs)("div",{className:"text-sm text-slate-300",children:[i.coreBalance," CFX"]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-xs text-slate-500",children:"EVM"}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"truncate text-xs text-blue-300",children:i.evmAddress}),(0,a.jsx)(h,{text:i.evmAddress})]}),(0,a.jsxs)("div",{className:"text-sm text-slate-300",children:[i.evmBalance," CFX"]})]})]})]}),r?(0,a.jsx)("p",{className:"text-sm text-slate-500",children:"Loading…"}):(0,a.jsx)("div",{className:"overflow-x-auto rounded-lg border border-[#2a3147]",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{className:"bg-[#161b27] text-xs uppercase tracking-wider text-slate-500",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"#"}),(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"Core Address"}),(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"EVM Address"}),(0,a.jsx)("th",{className:"px-4 py-2 text-right",children:"Core Balance"}),(0,a.jsx)("th",{className:"px-4 py-2 text-right",children:"EVM Balance"}),e&&(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"Private Key"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-[#2a3147]",children:n.map(t=>(0,a.jsxs)("tr",{className:"bg-[#0e1117] transition-colors hover:bg-[#161b27]",children:[(0,a.jsx)("td",{className:"px-4 py-2 text-slate-500",children:t.index}),(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"max-w-[200px] truncate text-xs text-blue-300",children:t.coreAddress}),(0,a.jsx)(h,{text:t.coreAddress})]})}),(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"max-w-[160px] truncate text-xs text-blue-300",children:t.evmAddress}),(0,a.jsx)(h,{text:t.evmAddress})]})}),(0,a.jsx)("td",{className:"px-4 py-2 text-right text-slate-300",children:t.coreBalance}),(0,a.jsx)("td",{className:"px-4 py-2 text-right text-slate-300",children:t.evmBalance}),e&&(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"max-w-[140px] truncate text-xs text-slate-400",children:t.privateKey}),(0,a.jsx)(h,{text:t.privateKey})]})})]},t.index))})]})})]})}},8144:function(e,t,s){"use strict";s.d(t,{N9:function(){return u},SC:function(){return j},SX:function(){return m},Vp:function(){return h},fA:function(){return y},mI:function(){return p},pJ:function(){return f}});var a,c=s(2608);let n="".concat(null!==(a=c.env.NEXT_PUBLIC_API_URL)&&void 0!==a?a:"","/api");async function l(e,t,s){let a=await fetch("".concat(n).concat(t),{method:e,headers:s?{"Content-Type":"application/json"}:void 0,body:s?JSON.stringify(s):void 0});if(!a.ok){var c;throw Error(null!==(c=(await a.json().catch(()=>({error:a.statusText}))).error)&&void 0!==c?c:a.statusText)}return a.json()}let r=e=>l("GET",e),i=(e,t)=>l("POST",e,t),d=e=>l("DELETE",e),o=(e,t)=>l("PUT",e,t),x=(e,t)=>l("PATCH",e,t),u={status:()=>r("/node/status"),start:()=>i("/node/start"),stop:()=>i("/node/stop"),restart:()=>i("/node/restart"),restartWipe:()=>i("/node/restart-wipe"),wipe:()=>i("/node/wipe")},m={list:()=>r("/accounts"),faucet:()=>r("/accounts/faucet"),fund:async(e,t,s)=>{let a=await fetch("/api/accounts/fund",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({address:e,amount:t,chain:s})});return await a.json()}},h={templates:()=>r("/contracts/templates"),template:e=>r("/contracts/templates/".concat(e)),compile:(e,t)=>i("/contracts/compile",{source:e,contractName:t}),deploy:e=>i("/contracts/deploy",e),deployed:e=>r("/contracts/deployed".concat(e?"?chain=".concat(e):"")),deleteDeployed:e=>d("/contracts/deployed/".concat(e)),call:(e,t,s,a)=>i("/contracts/".concat(e,"/call"),{functionName:t,args:s,accountIndex:a})},p={status:()=>r("/mining/status"),mine:e=>i("/mining/mine",{blocks:e}),start:e=>i("/mining/start",{intervalMs:e}),stop:()=>i("/mining/stop")},y={config:()=>r("/network/config"),updateConfig:e=>o("/network/config",e),rpcUrls:()=>r("/network/rpc-urls")},j={status:()=>r("/keystore/status"),generate:()=>i("/keystore/generate"),setup:e=>i("/keystore/setup",e),unlock:e=>i("/keystore/unlock",{password:e}),lock:()=>i("/keystore/lock"),wallets:()=>r("/keystore/wallets"),addWallet:(e,t)=>i("/keystore/wallets",{mnemonic:e,label:t}),activateWallet:e=>i("/keystore/wallets/".concat(e,"/activate")),renameWallet:(e,t)=>x("/keystore/wallets/".concat(e),{label:t}),deleteWallet:e=>d("/keystore/wallets/".concat(e))},f={get:()=>r("/settings")}},9928:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("CheckCheck",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]])},3264:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},6804:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("Droplets",[["path",{d:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z",key:"1ptgy4"}],["path",{d:"M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97",key:"1sl1rz"}]])},7201:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},3948:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])}},function(e){e.O(0,[363,285,749,744],function(){return e(e.s=2929)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[423],{2929:function(e,t,s){Promise.resolve().then(s.bind(s,7691))},7691:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return j}});var a=s(5853),c=s(4852),n=s(6632),l=s(8990),r=s(4254),i=s(9928),d=s(3264),x=s(7201),o=s(3948),u=s(6804),m=s(8144);function h(e){let{text:t}=e,[s,c]=(0,r.useState)(!1);return(0,a.jsx)("button",{type:"button",title:"Copy",className:"rounded p-0.5 text-slate-500 hover:text-slate-300",onClick:async()=>{await navigator.clipboard.writeText(t),c(!0),setTimeout(()=>c(!1),1500)},children:s?(0,a.jsx)(i.Z,{className:"h-3 w-3 text-green-400"}):(0,a.jsx)(d.Z,{className:"h-3 w-3"})})}function p(e){let{onClose:t}=e,s=(0,c.NL)(),[l,i]=(0,r.useState)(""),[d,x]=(0,r.useState)(""),[o,u]=(0,r.useState)("evm"),[h,p]=(0,r.useState)(""),j=(0,n.D)({mutationFn:()=>m.SX.fund(l,d||void 0,o),onSuccess:e=>{p("✓ tx: ".concat(e.txHash)),s.invalidateQueries({queryKey:["accounts"]})},onError:e=>p("✗ ".concat(e.message))});return(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4",children:(0,a.jsxs)("div",{className:"card w-full max-w-md space-y-4",children:[(0,a.jsx)("h2",{className:"font-medium text-white",children:"Fund Address"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"label",children:"Address"}),(0,a.jsx)("input",{className:"input",value:l,onChange:e=>i(e.target.value),placeholder:"0x… or cfx:…"})]}),(0,a.jsxs)("div",{className:"flex gap-3",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"label",children:"Amount (optional)"}),(0,a.jsx)("input",{className:"input",value:d,onChange:e=>x(e.target.value),placeholder:"1000"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"label",children:"Chain"}),(0,a.jsxs)("select",{className:"input",value:o,onChange:e=>u(e.target.value),children:[(0,a.jsx)("option",{value:"evm",children:"EVM"}),(0,a.jsx)("option",{value:"core",children:"Core"})]})]})]}),h&&(0,a.jsx)("p",{className:"text-sm text-slate-300",children:h}),(0,a.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,a.jsx)("button",{type:"button",className:"btn-secondary",onClick:t,children:"Close"}),(0,a.jsx)("button",{type:"button",className:"btn-primary",disabled:!l||j.isPending,onClick:()=>j.mutate(),children:j.isPending?"Sending…":"Fund"})]})]})})}function j(){let[e,t]=(0,r.useState)(!1),[s,c]=(0,r.useState)(!1),{data:n=[],isLoading:i}=(0,l.a)({queryKey:["accounts"],queryFn:m.SX.list}),{data:d}=(0,l.a)({queryKey:["accounts","faucet"],queryFn:m.SX.faucet});return(0,a.jsxs)("div",{className:"space-y-6",children:[s&&(0,a.jsx)(p,{onClose:()=>c(!1)}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-xl font-semibold text-white",children:"Accounts"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-slate-400",children:"Pre-funded development accounts"})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)("button",{type:"button",className:"btn-secondary",onClick:()=>t(e=>!e),title:"Toggle private key visibility",children:[e?(0,a.jsx)(x.Z,{className:"h-4 w-4"}):(0,a.jsx)(o.Z,{className:"h-4 w-4"}),"Keys"]}),(0,a.jsxs)("button",{type:"button",className:"btn-primary",onClick:()=>c(!0),children:[(0,a.jsx)(u.Z,{className:"h-4 w-4"})," Fund"]})]})]}),d&&(0,a.jsxs)("div",{className:"card",children:[(0,a.jsx)("div",{className:"mb-2 text-xs font-medium uppercase tracking-wider text-slate-500",children:"Faucet Account"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-xs text-slate-500",children:"Core"}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"truncate text-xs text-blue-300",children:d.coreAddress}),(0,a.jsx)(h,{text:d.coreAddress})]}),(0,a.jsxs)("div",{className:"text-sm text-slate-300",children:[d.coreBalance," CFX"]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-xs text-slate-500",children:"EVM"}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"truncate text-xs text-blue-300",children:d.evmAddress}),(0,a.jsx)(h,{text:d.evmAddress})]}),(0,a.jsxs)("div",{className:"text-sm text-slate-300",children:[d.evmBalance," CFX"]})]})]})]}),i?(0,a.jsx)("p",{className:"text-sm text-slate-500",children:"Loading…"}):(0,a.jsx)("div",{className:"overflow-x-auto rounded-lg border border-[#2a3147]",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{className:"bg-[#161b27] text-xs uppercase tracking-wider text-slate-500",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"#"}),(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"Core Address"}),(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"EVM Address"}),(0,a.jsx)("th",{className:"px-4 py-2 text-right",children:"Core Balance"}),(0,a.jsx)("th",{className:"px-4 py-2 text-right",children:"EVM Balance"}),e&&(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"Private Key"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-[#2a3147]",children:n.map(t=>(0,a.jsxs)("tr",{className:"bg-[#0e1117] transition-colors hover:bg-[#161b27]",children:[(0,a.jsx)("td",{className:"px-4 py-2 text-slate-500",children:t.index}),(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"max-w-[200px] truncate text-xs text-blue-300",children:t.coreAddress}),(0,a.jsx)(h,{text:t.coreAddress})]})}),(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"max-w-[160px] truncate text-xs text-blue-300",children:t.evmAddress}),(0,a.jsx)(h,{text:t.evmAddress})]})}),(0,a.jsx)("td",{className:"px-4 py-2 text-right text-slate-300",children:t.coreBalance}),(0,a.jsx)("td",{className:"px-4 py-2 text-right text-slate-300",children:t.evmBalance}),e&&(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"max-w-[140px] truncate text-xs text-slate-400",children:t.privateKey}),(0,a.jsx)(h,{text:t.privateKey})]})})]},t.index))})]})})]})}},8144:function(e,t,s){"use strict";s.d(t,{N9:function(){return o},SC:function(){return j},SX:function(){return u},Vp:function(){return m},fA:function(){return p},mI:function(){return h}});var a,c=s(2608);let n="".concat(null!==(a=c.env.NEXT_PUBLIC_API_URL)&&void 0!==a?a:"","/api");async function l(e,t,s){let a=await fetch("".concat(n).concat(t),{method:e,headers:s?{"Content-Type":"application/json"}:void 0,body:s?JSON.stringify(s):void 0});if(!a.ok){var c;throw Error(null!==(c=(await a.json().catch(()=>({error:a.statusText}))).error)&&void 0!==c?c:a.statusText)}return a.json()}let r=e=>l("GET",e),i=(e,t)=>l("POST",e,t),d=(e,t)=>l("PUT",e,t),x=e=>l("DELETE",e),o={status:()=>r("/node/status"),start:()=>i("/node/start"),stop:()=>i("/node/stop"),restart:()=>i("/node/restart"),restartWipe:()=>i("/node/restart-wipe")},u={list:()=>r("/accounts"),faucet:()=>r("/accounts/faucet"),fund:(e,t,s)=>i("/accounts/fund",{address:e,amount:t,chain:s})},m={templates:()=>r("/contracts/templates"),template:e=>r("/contracts/templates/".concat(e)),compile:(e,t)=>i("/contracts/compile",{source:e,contractName:t}),deploy:e=>i("/contracts/deploy",e)},h={status:()=>r("/mining/status"),mine:e=>i("/mining/mine",{blocks:e}),start:e=>i("/mining/start",{intervalMs:e}),stop:()=>i("/mining/stop")},p={config:()=>r("/network/config"),updateConfig:e=>d("/network/config",e),rpcUrls:()=>r("/network/rpc-urls")},j={status:()=>r("/keystore/status"),generate:()=>i("/keystore/generate"),setup:e=>i("/keystore/setup",e),unlock:e=>i("/keystore/unlock",{password:e}),lock:()=>i("/keystore/lock"),wallets:()=>r("/keystore/wallets"),addWallet:(e,t)=>i("/keystore/wallets",{mnemonic:e,label:t}),activateWallet:e=>i("/keystore/wallets/".concat(e,"/activate")),deleteWallet:e=>x("/keystore/wallets/".concat(e))}},9928:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("CheckCheck",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]])},3264:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},6804:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("Droplets",[["path",{d:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z",key:"1ptgy4"}],["path",{d:"M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97",key:"1sl1rz"}]])},7201:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},3948:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])}},function(e){e.O(0,[363,285,749,744],function(){return e(e.s=2929)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[423],{2929:function(e,t,s){Promise.resolve().then(s.bind(s,7691))},7691:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return j}});var a=s(5853),c=s(4852),n=s(6632),l=s(8990),r=s(9928),i=s(3264),d=s(7201),o=s(3948),x=s(6804),u=s(4254),m=s(8144);function h(e){let{text:t}=e,[s,c]=(0,u.useState)(!1);return(0,a.jsx)("button",{type:"button",title:"Copy",className:"rounded p-0.5 text-slate-500 hover:text-slate-300",onClick:async()=>{await navigator.clipboard.writeText(t),c(!0),setTimeout(()=>c(!1),1500)},children:s?(0,a.jsx)(r.Z,{className:"h-3 w-3 text-green-400"}):(0,a.jsx)(i.Z,{className:"h-3 w-3"})})}function p(e){let{onClose:t}=e,s=(0,c.NL)(),[l,r]=(0,u.useState)(""),[i,d]=(0,u.useState)(""),[o,x]=(0,u.useState)("evm"),[h,p]=(0,u.useState)(""),j=(0,n.D)({mutationFn:()=>m.SX.fund(l,i||void 0,o),onSuccess:e=>{p("✓ tx: ".concat(e.txHash)),s.invalidateQueries({queryKey:["accounts"]})},onError:e=>p("✗ ".concat(e.message))});return(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4",children:(0,a.jsxs)("div",{className:"card w-full max-w-md space-y-4",children:[(0,a.jsx)("h2",{className:"font-medium text-white",children:"Fund Address"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"label",children:"Address"}),(0,a.jsx)("input",{className:"input",value:l,onChange:e=>r(e.target.value),placeholder:"0x… or cfx:…"})]}),(0,a.jsxs)("div",{className:"flex gap-3",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"label",children:"Amount (optional)"}),(0,a.jsx)("input",{className:"input",value:i,onChange:e=>d(e.target.value),placeholder:"1000"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"label",children:"Chain"}),(0,a.jsxs)("select",{className:"input",value:o,onChange:e=>x(e.target.value),children:[(0,a.jsx)("option",{value:"evm",children:"EVM"}),(0,a.jsx)("option",{value:"core",children:"Core"})]})]})]}),h&&(0,a.jsx)("p",{className:"text-sm text-slate-300",children:h}),(0,a.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,a.jsx)("button",{type:"button",className:"btn-secondary",onClick:t,children:"Close"}),(0,a.jsx)("button",{type:"button",className:"btn-primary",disabled:!l||j.isPending,onClick:()=>j.mutate(),children:j.isPending?"Sending…":"Fund"})]})]})})}function j(){let[e,t]=(0,u.useState)(!1),[s,c]=(0,u.useState)(!1),{data:n=[],isLoading:r}=(0,l.a)({queryKey:["accounts"],queryFn:m.SX.list}),{data:i}=(0,l.a)({queryKey:["accounts","faucet"],queryFn:m.SX.faucet});return(0,a.jsxs)("div",{className:"space-y-6",children:[s&&(0,a.jsx)(p,{onClose:()=>c(!1)}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-xl font-semibold text-white",children:"Accounts"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-slate-400",children:"Pre-funded development accounts"})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)("button",{type:"button",className:"btn-secondary",onClick:()=>t(e=>!e),title:"Toggle private key visibility",children:[e?(0,a.jsx)(d.Z,{className:"h-4 w-4"}):(0,a.jsx)(o.Z,{className:"h-4 w-4"}),"Keys"]}),(0,a.jsxs)("button",{type:"button",className:"btn-primary",onClick:()=>c(!0),children:[(0,a.jsx)(x.Z,{className:"h-4 w-4"})," Fund"]})]})]}),i&&(0,a.jsxs)("div",{className:"card",children:[(0,a.jsx)("div",{className:"mb-2 text-xs font-medium uppercase tracking-wider text-slate-500",children:"Faucet Account"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-xs text-slate-500",children:"Core"}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"truncate text-xs text-blue-300",children:i.coreAddress}),(0,a.jsx)(h,{text:i.coreAddress})]}),(0,a.jsxs)("div",{className:"text-sm text-slate-300",children:[i.coreBalance," CFX"]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-xs text-slate-500",children:"EVM"}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"truncate text-xs text-blue-300",children:i.evmAddress}),(0,a.jsx)(h,{text:i.evmAddress})]}),(0,a.jsxs)("div",{className:"text-sm text-slate-300",children:[i.evmBalance," CFX"]})]})]})]}),r?(0,a.jsx)("p",{className:"text-sm text-slate-500",children:"Loading…"}):(0,a.jsx)("div",{className:"overflow-x-auto rounded-lg border border-[#2a3147]",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{className:"bg-[#161b27] text-xs uppercase tracking-wider text-slate-500",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"#"}),(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"Core Address"}),(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"EVM Address"}),(0,a.jsx)("th",{className:"px-4 py-2 text-right",children:"Core Balance"}),(0,a.jsx)("th",{className:"px-4 py-2 text-right",children:"EVM Balance"}),e&&(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"Private Key"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-[#2a3147]",children:n.map(t=>(0,a.jsxs)("tr",{className:"bg-[#0e1117] transition-colors hover:bg-[#161b27]",children:[(0,a.jsx)("td",{className:"px-4 py-2 text-slate-500",children:t.index}),(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"max-w-[200px] truncate text-xs text-blue-300",children:t.coreAddress}),(0,a.jsx)(h,{text:t.coreAddress})]})}),(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"max-w-[160px] truncate text-xs text-blue-300",children:t.evmAddress}),(0,a.jsx)(h,{text:t.evmAddress})]})}),(0,a.jsx)("td",{className:"px-4 py-2 text-right text-slate-300",children:t.coreBalance}),(0,a.jsx)("td",{className:"px-4 py-2 text-right text-slate-300",children:t.evmBalance}),e&&(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("code",{className:"max-w-[140px] truncate text-xs text-slate-400",children:t.privateKey}),(0,a.jsx)(h,{text:t.privateKey})]})})]},t.index))})]})})]})}},8144:function(e,t,s){"use strict";s.d(t,{N9:function(){return x},SC:function(){return j},SX:function(){return u},Vp:function(){return m},fA:function(){return p},mI:function(){return h},pJ:function(){return y}});var a,c=s(2608);let n="".concat(null!==(a=c.env.NEXT_PUBLIC_API_URL)&&void 0!==a?a:"","/api");async function l(e,t,s){let a=await fetch("".concat(n).concat(t),{method:e,headers:s?{"Content-Type":"application/json"}:void 0,body:s?JSON.stringify(s):void 0});if(!a.ok){var c;throw Error(null!==(c=(await a.json().catch(()=>({error:a.statusText}))).error)&&void 0!==c?c:a.statusText)}return a.json()}let r=e=>l("GET",e),i=(e,t)=>l("POST",e,t),d=e=>l("DELETE",e),o=(e,t)=>l("PUT",e,t),x={status:()=>r("/node/status"),start:()=>i("/node/start"),stop:()=>i("/node/stop"),restart:()=>i("/node/restart"),restartWipe:()=>i("/node/restart-wipe"),wipe:()=>i("/node/wipe")},u={list:()=>r("/accounts"),faucet:()=>r("/accounts/faucet"),fund:(e,t,s)=>i("/accounts/fund",{address:e,amount:t,chain:s})},m={templates:()=>r("/contracts/templates"),template:e=>r("/contracts/templates/".concat(e)),compile:(e,t)=>i("/contracts/compile",{source:e,contractName:t}),deploy:e=>i("/contracts/deploy",e),deployed:e=>r("/contracts/deployed".concat(e?"?chain=".concat(e):"")),deleteDeployed:e=>d("/contracts/deployed/".concat(e)),call:(e,t,s,a)=>i("/contracts/".concat(e,"/call"),{functionName:t,args:s,accountIndex:a})},h={status:()=>r("/mining/status"),mine:e=>i("/mining/mine",{blocks:e}),start:e=>i("/mining/start",{intervalMs:e}),stop:()=>i("/mining/stop")},p={config:()=>r("/network/config"),updateConfig:e=>o("/network/config",e),rpcUrls:()=>r("/network/rpc-urls")},j={status:()=>r("/keystore/status"),generate:()=>i("/keystore/generate"),setup:e=>i("/keystore/setup",e),unlock:e=>i("/keystore/unlock",{password:e}),lock:()=>i("/keystore/lock"),wallets:()=>r("/keystore/wallets"),addWallet:(e,t)=>i("/keystore/wallets",{mnemonic:e,label:t}),activateWallet:e=>i("/keystore/wallets/".concat(e,"/activate")),deleteWallet:e=>d("/keystore/wallets/".concat(e))},y={get:()=>r("/settings")}},9928:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("CheckCheck",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]])},3264:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},6804:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("Droplets",[["path",{d:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z",key:"1ptgy4"}],["path",{d:"M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97",key:"1sl1rz"}]])},7201:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},3948:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])}},function(e){e.O(0,[363,285,749,744],function(){return e(e.s=2929)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[913],{1033:function(e,t,s){Promise.resolve().then(s.bind(s,9985))},9985:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return k}});var a=s(5853),n=s(4852),l=s(8990),r=s(6632),c=s(4254),i=s(3035);let d=(0,i.Z)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);var o=s(9928),u=s(3264);let p=(0,i.Z)("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);var x=s(6970),m=s(1494);let h=(0,i.Z)("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);var y=s(9924),j=s(758),v=s(5710),g=s(8144);function f(e){var t,s,n,l,r,i;let{fn:o,contractId:u,chain:p,accounts:x,isRead:m}=e,[h,y]=(0,c.useState)(null!==(l=null===(t=o.inputs)||void 0===t?void 0:t.map(()=>""))&&void 0!==l?l:[]),[j,v]=(0,c.useState)(0),[f,N]=(0,c.useState)(null),[b,k]=(0,c.useState)(!1);async function w(){k(!0),N(null);try{let e=h.map(e=>{if(""===e.trim())return"";try{return JSON.parse(e)}catch(t){return e}}),t=await g.Vp.call(u,o.name,e,m?void 0:j);N({ok:!0,value:t})}catch(e){N({ok:!1,error:e instanceof Error?e.message:String(e)})}finally{k(!1)}}return(0,a.jsxs)("div",{className:"rounded border border-[#2a3147] bg-[#0d1117]/40 p-3 space-y-2",children:[(0,a.jsxs)("div",{className:"font-mono text-sm text-white",children:[o.name,(0,a.jsxs)("span",{className:"ml-1 text-slate-500 text-xs",children:["(",null!==(r=null===(s=o.inputs)||void 0===s?void 0:s.map(e=>e.type).join(", "))&&void 0!==r?r:"",")",o.outputs&&o.outputs.length>0?" → ".concat(o.outputs.map(e=>e.type).join(", ")):""]})]}),(null!==(i=null===(n=o.inputs)||void 0===n?void 0:n.length)&&void 0!==i?i:0)>0&&(0,a.jsx)("div",{className:"space-y-1.5",children:o.inputs.map((e,t)=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{className:"label",children:[e.name||"arg".concat(t)," ",(0,a.jsxs)("span",{className:"text-slate-600",children:["(",e.type,")"]})]}),(0,a.jsx)("input",{className:"input",placeholder:e.type,value:h[t],onChange:e=>y(s=>{let a=[...s];return a[t]=e.target.value,a})})]},t))}),!m&&x.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"label",children:"Caller account"}),(0,a.jsx)("select",{className:"input",value:j,onChange:e=>v(Number(e.target.value)),children:x.map(e=>(0,a.jsxs)("option",{value:e.index,children:["#",e.index," — ","evm"===p?e.evmAddress:e.coreAddress]},e.index))})]}),(0,a.jsx)("button",{type:"button",className:m?"btn-secondary":"btn-primary",disabled:b,onClick:w,children:b?(0,a.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,a.jsx)(d,{className:"h-3.5 w-3.5 animate-spin"}),m?"Reading…":"Sending…"]}):m?"Call":"Send"}),f&&(0,a.jsx)("pre",{className:"text-xs font-mono break-all whitespace-pre-wrap p-2 rounded ".concat(f.ok?"bg-[#0d1117] text-green-300":"bg-red-950/50 text-red-400"),children:f.ok?JSON.stringify(f.value,null,2):f.error})]})}function N(e){let{contract:t,accounts:s}=e,n=t.abi.filter(e=>"function"===e.type),l=n.filter(e=>"view"===e.stateMutability||"pure"===e.stateMutability),r=n.filter(e=>"view"!==e.stateMutability&&"pure"!==e.stateMutability);return(0,a.jsxs)("div",{className:"mt-3 pt-3 border-t border-[#2a3147] space-y-4",children:[l.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-2 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-widest text-green-500",children:"Read"}),(0,a.jsx)("span",{className:"text-[10px] text-slate-600",children:"(view / pure — no tx required)"})]}),(0,a.jsx)("div",{className:"space-y-2",children:l.map(e=>(0,a.jsx)(f,{fn:e,contractId:t.id,chain:t.chain,accounts:s,isRead:!0},e.name))})]}),r.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-2 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-widest text-orange-400",children:"Write"}),(0,a.jsx)("span",{className:"text-[10px] text-slate-600",children:"(state-changing — sends a tx + auto-mines)"})]}),(0,a.jsx)("div",{className:"space-y-2",children:r.map(e=>(0,a.jsx)(f,{fn:e,contractId:t.id,chain:t.chain,accounts:s,isRead:!1},e.name))})]}),0===n.length&&(0,a.jsx)("p",{className:"text-sm text-slate-500",children:"No callable functions found in ABI."})]})}function b(e){let{text:t}=e,[s,n]=(0,c.useState)(!1);return(0,a.jsx)("button",{type:"button",title:"Copy",className:"ml-1 rounded p-0.5 text-slate-500 hover:text-slate-300",onClick:async()=>{await navigator.clipboard.writeText(t),n(!0),setTimeout(()=>n(!1),1600)},children:s?(0,a.jsx)(o.Z,{className:"h-3 w-3 text-green-400"}):(0,a.jsx)(u.Z,{className:"h-3 w-3"})})}function k(){let e=(0,n.NL)(),[t,s]=(0,c.useState)("templates"),[i,d]=(0,c.useState)('// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ncontract HelloWorld {\n string public message = "Hello, Conflux!";\n\n function setMessage(string calldata _msg) external {\n message = _msg;\n }\n}\n'),[o,u]=(0,c.useState)("HelloWorld"),[f,k]=(0,c.useState)(null),[w,C]=(0,c.useState)("evm"),[S,Z]=(0,c.useState)(""),[E,M]=(0,c.useState)(""),[D,q]=(0,c.useState)(""),[I,V]=(0,c.useState)(new Set),{data:L}=(0,l.a)({queryKey:["node","status"],queryFn:g.N9.status,refetchInterval:3e3}),T=(null==L?void 0:L.server)==="running",{data:A=[]}=(0,l.a)({queryKey:["accounts"],queryFn:g.SX.list,enabled:T}),{data:P=[]}=(0,l.a)({queryKey:["contracts","templates"],queryFn:g.Vp.templates}),{data:F=[],isLoading:H}=(0,l.a)({queryKey:["contracts","deployed"],queryFn:()=>g.Vp.deployed(),refetchInterval:5e3}),_=(0,r.D)({mutationFn:()=>g.Vp.compile(i,o),onSuccess:e=>k(e)}),O=(0,r.D)({mutationFn:()=>{if(!f)throw Error("Compile first");if(!T)throw Error("Node is not running. Start it from the Dashboard first.");let e=[];if(S.trim())try{e=JSON.parse(S)}catch(e){throw Error("Invalid JSON for constructor args")}return g.Vp.deploy({bytecode:f.bytecode,abi:f.abi,args:e,chain:w,contractName:f.contractName})},onSuccess:t=>{M("✓ Deployed at ".concat(t.address," (tx: ").concat(t.txHash,")")),e.invalidateQueries({queryKey:["contracts","deployed"]})},onError:e=>{let t=e instanceof Error?e.message:String(e);M("✗ ".concat(t))}}),R=(0,r.D)({mutationFn:g.Vp.deleteDeployed,onSuccess:()=>e.invalidateQueries({queryKey:["contracts","deployed"]})});async function W(e){q("");try{let t=await g.Vp.template(e);d(t.source),u(e),s("custom"),k(null),M("")}catch(e){q(e instanceof Error?e.message:"Failed to load template")}}return(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-xl font-semibold text-white",children:"Contracts"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-slate-400",children:"Compile, deploy, and track Solidity contracts"})]}),L&&!T&&(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-md border border-yellow-800 bg-yellow-950/40 px-4 py-2 text-sm text-yellow-400",children:[(0,a.jsx)(p,{className:"h-4 w-4 shrink-0"}),"Node is not running — deploy will fail. Start the node from the Dashboard."]}),D&&(0,a.jsx)("div",{className:"rounded-md border border-red-800 bg-red-950/50 px-3 py-2 text-sm text-red-400",children:D}),(0,a.jsx)("div",{className:"flex gap-1 rounded-lg border border-[#2a3147] bg-[#161b27] p-1 w-fit",children:["templates","custom","deployed"].map(e=>(0,a.jsx)("button",{type:"button",className:"rounded-md px-4 py-1.5 text-sm capitalize transition-colors ".concat(t===e?"bg-blue-600 text-white":"text-slate-400 hover:text-slate-200"),onClick:()=>s(e),children:"deployed"===e?"Deployed".concat(F.length>0?" (".concat(F.length,")"):""):e},e))}),"templates"===t&&(0,a.jsx)("div",{className:"grid gap-3 sm:grid-cols-2",children:P.map(e=>(0,a.jsxs)("div",{className:"card flex items-start justify-between gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium text-white",children:[(0,a.jsx)(x.Z,{className:"h-4 w-4 text-blue-400"}),e.name]}),(0,a.jsxs)("pre",{className:"mt-2 max-h-32 overflow-auto text-xs text-slate-400",children:[e.source.slice(0,200),"…"]})]}),(0,a.jsx)("button",{type:"button",className:"btn-secondary shrink-0",onClick:()=>W(e.name),children:"Use"})]},e.name))}),"custom"===t&&(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"label",children:"Solidity Source"}),(0,a.jsx)("textarea",{className:"input h-56 resize-y font-mono",value:i,onChange:e=>{d(e.target.value),k(null)}})]}),(0,a.jsxs)("div",{className:"flex items-end gap-3",children:[(0,a.jsxs)("div",{className:"w-48",children:[(0,a.jsx)("label",{className:"label",children:"Contract Name"}),(0,a.jsx)("input",{className:"input",value:o,onChange:e=>u(e.target.value)})]}),(0,a.jsxs)("button",{type:"button",className:"btn-secondary",disabled:_.isPending,onClick:()=>_.mutate(),children:[(0,a.jsx)(m.Z,{className:"h-4 w-4"}),_.isPending?"Compiling…":"Compile"]})]}),_.error&&(0,a.jsx)("div",{className:"rounded-md border border-red-800 bg-red-950/50 px-3 py-2 text-sm text-red-400",children:_.error.message}),f&&(0,a.jsxs)("div",{className:"card space-y-3",children:[(0,a.jsxs)("div",{className:"text-sm font-medium text-green-400",children:["✓ Compiled: ",f.contractName," (",f.abi.length," ABI entries)"]}),(0,a.jsxs)("div",{className:"flex gap-3",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"label",children:"Constructor Args (JSON array)"}),(0,a.jsx)("input",{className:"input",value:S,onChange:e=>Z(e.target.value),placeholder:'e.g. ["Hello", 42]'})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"label",children:"Chain"}),(0,a.jsxs)("select",{className:"input",value:w,onChange:e=>C(e.target.value),children:[(0,a.jsx)("option",{value:"evm",children:"EVM (eSpace)"}),(0,a.jsx)("option",{value:"core",children:"Core Space"})]})]}),(0,a.jsx)("div",{className:"flex items-end",children:(0,a.jsxs)("button",{type:"button",className:"btn-primary",disabled:O.isPending||!T,title:T?void 0:"Start the node first",onClick:()=>O.mutate(),children:[(0,a.jsx)(h,{className:"h-4 w-4"}),O.isPending?"Deploying…":"Deploy"]})})]}),E&&(0,a.jsx)("p",{className:"break-all text-sm ".concat(E.startsWith("✓")?"text-green-400":"text-red-400"),children:E})]})]}),"deployed"===t&&(0,a.jsx)("div",{className:"space-y-3",children:H?(0,a.jsx)("p",{className:"text-sm text-slate-500",children:"Loading…"}):0===F.length?(0,a.jsx)("div",{className:"card text-center text-sm text-slate-500 py-8",children:"No deployed contracts yet. Deploy one from the Editor tab."}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:"text-xs text-slate-500",children:"Contracts are persisted per wallet in the node data directory. They survive node restarts (but not Wipe & Restart)."}),(0,a.jsx)("div",{className:"space-y-2",children:F.map(e=>{let t=I.has(e.id),s="evm"===e.chain?"http://localhost:8545":"http://localhost:12537";return(0,a.jsxs)("div",{className:"card space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium text-white",children:[(0,a.jsx)(x.Z,{className:"h-4 w-4 text-blue-400"}),e.name,(0,a.jsx)("span",{className:"rounded px-1.5 py-0.5 text-[10px] uppercase tracking-wider ".concat("evm"===e.chain?"bg-purple-900/50 text-purple-300":"bg-cyan-900/50 text-cyan-300"),children:"evm"===e.chain?"eSpace":"Core"})]}),(0,a.jsxs)("div",{className:"mt-1 flex items-center gap-1",children:[(0,a.jsx)("code",{className:"max-w-[300px] truncate text-xs text-blue-300",children:e.address}),(0,a.jsx)(b,{text:e.address})]}),(0,a.jsxs)("div",{className:"mt-0.5 flex items-center gap-3 text-[10px] text-slate-500",children:[(0,a.jsxs)("span",{children:["Chain ID: ",e.chainId]}),(0,a.jsx)("span",{children:"•"}),(0,a.jsx)("span",{children:new Date(e.deployedAt).toLocaleString()}),(0,a.jsx)("span",{children:"•"}),(0,a.jsxs)("span",{children:[e.abi.length," ABI entries"]})]})]}),(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-1",children:[(0,a.jsx)("div",{title:"Copy JSON-RPC URL: ".concat(s),children:(0,a.jsx)(b,{text:s})}),(0,a.jsx)("span",{className:"text-[10px] text-slate-600 -ml-0.5 mr-1",children:"RPC"}),(0,a.jsx)("button",{type:"button",title:"Remove from tracking",className:"rounded p-1 text-slate-500 hover:text-red-400",disabled:R.isPending,onClick:()=>R.mutate(e.id),children:(0,a.jsx)(y.Z,{className:"h-3.5 w-3.5"})})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between border-t border-[#2a3147] pt-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"text-[10px] text-slate-500",children:"tx:"}),(0,a.jsx)("code",{className:"max-w-[240px] truncate text-[10px] text-slate-400",children:e.txHash}),(0,a.jsx)(b,{text:e.txHash})]}),(0,a.jsx)("button",{type:"button",className:"flex items-center gap-1 rounded px-2 py-0.5 text-[11px] text-slate-400 hover:text-white hover:bg-[#2a3147] transition-colors",onClick:()=>V(t=>{let s=new Set(t);return s.has(e.id)?s.delete(e.id):s.add(e.id),s}),children:t?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(j.Z,{className:"h-3 w-3"})," Close"]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(v.Z,{className:"h-3 w-3"})," Interact"]})})]}),t&&(0,a.jsx)(N,{contract:e,accounts:A})]},e.id)})})]})})]})}},8144:function(e,t,s){"use strict";s.d(t,{N9:function(){return u},SC:function(){return y},SX:function(){return p},Vp:function(){return x},fA:function(){return h},mI:function(){return m}});var a,n=s(2608);let l="".concat(null!==(a=n.env.NEXT_PUBLIC_API_URL)&&void 0!==a?a:"","/api");async function r(e,t,s){let a=await fetch("".concat(l).concat(t),{method:e,headers:s?{"Content-Type":"application/json"}:void 0,body:s?JSON.stringify(s):void 0});if(!a.ok){var n;throw Error(null!==(n=(await a.json().catch(()=>({error:a.statusText}))).error)&&void 0!==n?n:a.statusText)}return a.json()}let c=e=>r("GET",e),i=(e,t)=>r("POST",e,t),d=e=>r("DELETE",e),o=(e,t)=>r("PUT",e,t),u={status:()=>c("/node/status"),start:()=>i("/node/start"),stop:()=>i("/node/stop"),restart:()=>i("/node/restart"),restartWipe:()=>i("/node/restart-wipe")},p={list:()=>c("/accounts"),faucet:()=>c("/accounts/faucet"),fund:(e,t,s)=>i("/accounts/fund",{address:e,amount:t,chain:s})},x={templates:()=>c("/contracts/templates"),template:e=>c("/contracts/templates/".concat(e)),compile:(e,t)=>i("/contracts/compile",{source:e,contractName:t}),deploy:e=>i("/contracts/deploy",e),deployed:e=>c("/contracts/deployed".concat(e?"?chain=".concat(e):"")),deleteDeployed:e=>d("/contracts/deployed/".concat(e)),call:(e,t,s,a)=>i("/contracts/".concat(e,"/call"),{functionName:t,args:s,accountIndex:a})},m={status:()=>c("/mining/status"),mine:e=>i("/mining/mine",{blocks:e}),start:e=>i("/mining/start",{intervalMs:e}),stop:()=>i("/mining/stop")},h={config:()=>c("/network/config"),updateConfig:e=>o("/network/config",e),rpcUrls:()=>c("/network/rpc-urls")},y={status:()=>c("/keystore/status"),generate:()=>i("/keystore/generate"),setup:e=>i("/keystore/setup",e),unlock:e=>i("/keystore/unlock",{password:e}),lock:()=>i("/keystore/lock"),wallets:()=>c("/keystore/wallets"),addWallet:(e,t)=>i("/keystore/wallets",{mnemonic:e,label:t}),activateWallet:e=>i("/keystore/wallets/".concat(e,"/activate")),deleteWallet:e=>d("/keystore/wallets/".concat(e))}},9928:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("CheckCheck",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]])},5710:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},758:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]])},3264:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},6970:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("FileCode2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m5 12-3 3 3 3",key:"oke12k"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]])},1494:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("Hammer",[["path",{d:"m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9",key:"eefl8a"}],["path",{d:"m18 15 4-4",key:"16gjal"}],["path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",key:"b7pghm"}]])},9924:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(3035).Z)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])}},function(e){e.O(0,[363,285,749,744],function(){return e(e.s=1033)}),_N_E=e.O()}]);